Skip to content

Commit

Permalink
Merge pull request #51 from 1Password/update_item_categories
Browse files Browse the repository at this point in the history
Update item categories in Connect Item definition
  • Loading branch information
jkyjustin authored May 9, 2022
2 parents aa4521f + 7f2f7f9 commit 549d476
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions onepassword/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type ItemCategory string
const (
Login ItemCategory = "LOGIN"
Password ItemCategory = "PASSWORD"
ApiCredential ItemCategory = "API_CREDENTIAL"
Server ItemCategory = "SERVER"
Database ItemCategory = "DATABASE"
CreditCard ItemCategory = "CREDIT_CARD"
Expand All @@ -28,7 +29,8 @@ const (
Document ItemCategory = "DOCUMENT"
EmailAccount ItemCategory = "EMAIL_ACCOUNT"
SocialSecurityNumber ItemCategory = "SOCIAL_SECURITY_NUMBER"
ApiCredential ItemCategory = "API_CREDENTIAL"
MedicalRecord ItemCategory = "MEDICAL_RECORD"
SSHKey ItemCategory = "SSH_KEY"
Custom ItemCategory = "CUSTOM"
)

Expand All @@ -40,7 +42,7 @@ func (ic *ItemCategory) UnmarshalJSON(b []byte) error {
switch category {
case Login, Password, Server, Database, CreditCard, Membership, Passport, SoftwareLicense,
OutdoorLicense, SecureNote, WirelessRouter, BankAccount, DriverLicense, Identity, RewardProgram,
Document, EmailAccount, SocialSecurityNumber, ApiCredential:
Document, EmailAccount, SocialSecurityNumber, ApiCredential, MedicalRecord, SSHKey:
*ic = category
default:
*ic = Custom
Expand Down

0 comments on commit 549d476

Please sign in to comment.