@sphereon/ssi-sdk.contact-manager 0.34.1-next.29 → 0.34.1-next.299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -5
- package/src/agent/ContactManager.ts +3 -4
- package/src/types/IContactManager.ts +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../plugin.schema.json","../src/index.ts","../src/agent/ContactManager.ts","../src/types/IContactManager.ts"],"sourcesContent":["{\n \"IContactManager\": {\n \"components\": {\n \"schemas\": {\n \"IGetContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IGetContactsArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"IAddContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contact\": {\n \"$ref\": \"#/components/schemas/IBasicContact\"\n }\n },\n \"required\": [\"party\"]\n },\n \"IRemoveContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IUpdateContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contact\": {\n \"$ref\": \"#/components/schemas/IBasicContact\"\n }\n },\n \"required\": [\"party\"]\n },\n \"IGetIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identityId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identityId\"]\n },\n \"IGetIdentitiesArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IAddIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identity\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"required\": [\"identity\"]\n },\n \"IRemoveIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identityId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identityId\"]\n },\n \"IUpdateIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identity\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"required\": [\"identity\"]\n },\n \"IBasicContact\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"identities\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IBasicIdentity\"\n }\n }\n },\n \"required\": [\"name\", \"alias\"]\n },\n \"IContact\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"identities\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"alias\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"IMetadataItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"label\", \"value\"]\n },\n \"BasicMetadataItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"label\", \"value\"]\n },\n \"IBasicIdentity\": {\n \"type\": \"object\",\n \"properties\": {\n \"alias\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/BasicCorrelationIdentifier\"\n },\n \"connection\": {\n \"$ref\": \"#/components/schemas/IBasicConnection\"\n },\n \"metadata\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IMetadataItem\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"alias\", \"identifier\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"IIdentity\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/ICorrelationIdentifier\"\n },\n \"connection\": {\n \"$ref\": \"#/components/schemas/IConnection\"\n },\n \"metadata\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IMetadataItem\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"alias\", \"identifier\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"CorrelationIdentifierEnum\": {\n \"type\": \"string\",\n \"enum\": [\"did\", \"url\"]\n },\n \"BasicCorrelationIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"$ref\": \"#/components/schemas/CorrelationIdentifierEnum\"\n },\n \"correlationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"type\", \"correlationId\"]\n },\n \"ICorrelationIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/CorrelationIdentifierEnum\"\n },\n \"correlationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"type\", \"correlationId\"]\n },\n \"ConnectionTypeEnum\": {\n \"type\": \"string\",\n \"enum\": [\"openid\", \"didauth\", \"siopv2+oidc4vp\"]\n },\n \"IBasicConnection\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"$ref\": \"#/components/schemas/ConnectionTypeEnum\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/BasicConnectionConfig\"\n }\n },\n \"required\": [\"type\", \"config\"]\n },\n \"IConnection\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/ConnectionTypeEnum\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/ConnectionConfig\"\n }\n },\n \"required\": [\"id\", \"type\", \"config\"]\n },\n \"BasicConnectionConfig\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/BasicDidAuthConfig\"\n },\n {\n \"$ref\": \"#/components/schemas/BasicOpenIdConfig\"\n }\n ]\n },\n \"ConnectionConfig\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IOpenIdConfig\"\n },\n {\n \"$ref\": \"#/components/schemas/IDidAuthConfig\"\n }\n ]\n },\n \"BasicDidAuthConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"identifier\": {\n \"$ref\": \"#/components/schemas/IIdentifier\"\n },\n \"stateId\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identifier\", \"stateId\", \"redirectUrl\", \"sessionId\"]\n },\n \"BasicOpenIdConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"clientId\": {\n \"type\": \"string\"\n },\n \"clientSecret\": {\n \"type\": \"string\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"issuer\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"dangerouslyAllowInsecureHttpRequests\": {\n \"type\": \"boolean\"\n },\n \"clientAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"basic\", \"post\"]\n }\n },\n \"required\": [\"clientId\", \"clientSecret\", \"scopes\", \"issuer\", \"redirectUrl\", \"dangerouslyAllowInsecureHttpRequests\"]\n },\n \"IOpenIdConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"clientId\": {\n \"type\": \"string\"\n },\n \"clientSecret\": {\n \"type\": \"string\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"issuer\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"dangerouslyAllowInsecureHttpRequests\": {\n \"type\": \"boolean\"\n },\n \"clientAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"basic\", \"post\"]\n }\n },\n \"required\": [\"id\", \"clientId\", \"clientSecret\", \"scopes\", \"issuer\", \"redirectUrl\", \"dangerouslyAllowInsecureHttpRequests\"]\n },\n \"IDidAuthConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/IIdentifier\"\n },\n \"stateId\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"identifier\", \"stateId\", \"redirectUrl\", \"sessionId\"]\n },\n \"IIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"did\": {\n \"type\": \"string\",\n \"description\": \"Decentralized identifier\"\n },\n \"alias\": {\n \"type\": \"string\",\n \"description\": \"Optional. Identifier alias. Can be used to reference an object in an external system\"\n },\n \"provider\": {\n \"type\": \"string\",\n \"description\": \"Identifier provider name\"\n },\n \"controllerKeyId\": {\n \"type\": \"string\",\n \"description\": \"Controller key id\"\n },\n \"keys\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IKey\"\n },\n \"description\": \"Array of managed keys\"\n },\n \"services\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IService\"\n },\n \"description\": \"Array of services\"\n }\n },\n \"required\": [\"did\", \"provider\", \"keys\", \"services\"],\n \"description\": \"Identifier interface\"\n },\n \"IKey\": {\n \"type\": \"object\",\n \"properties\": {\n \"kid\": {\n \"type\": \"string\",\n \"description\": \"Key ID\"\n },\n \"kms\": {\n \"type\": \"string\",\n \"description\": \"Key Management System\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/TKeyType\",\n \"description\": \"Key type\"\n },\n \"publicKeyHex\": {\n \"type\": \"string\",\n \"description\": \"Public key\"\n },\n \"privateKeyHex\": {\n \"type\": \"string\",\n \"description\": \"Optional. Private key\"\n },\n \"meta\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/KeyMetadata\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"Optional. Key metadata. This should be used to determine which algorithms are supported.\"\n }\n },\n \"required\": [\"kid\", \"kms\", \"type\", \"publicKeyHex\"],\n \"description\": \"Cryptographic key\"\n },\n \"TKeyType\": {\n \"type\": \"string\",\n \"enum\": [\"Ed25519\", \"Secp256k1\", \"Secp256r1\", \"X25519\", \"Bls12381G1\", \"Bls12381G2\", \"RSA\"],\n \"description\": \"Cryptographic key type.\"\n },\n \"KeyMetadata\": {\n \"type\": \"object\",\n \"properties\": {\n \"algorithms\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"This encapsulates data about a key.\\n\\nImplementations of {@link @veramo/key-manager#AbstractKeyManagementSystem | AbstractKeyManagementSystem } should populate this object, for each key, with the algorithms that can be performed using it.\\n\\nThis can also be used to add various tags to the keys under management.\"\n },\n \"IService\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"ID\"\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"Service type\"\n },\n \"serviceEndpoint\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IServiceEndpoint\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IServiceEndpoint\"\n }\n }\n ],\n \"description\": \"Endpoint URL\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Optional. Description\"\n }\n },\n \"required\": [\"id\", \"type\", \"serviceEndpoint\"],\n \"description\": \"Identifier service\"\n },\n \"IServiceEndpoint\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\"\n }\n ],\n \"description\": \"Represents a service endpoint URL or a map of URLs\"\n }\n },\n \"methods\": {\n \"cmGetContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmGetContacts\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetContactsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n }\n },\n \"cmAddContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmRemoveContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveContactArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"cmUpdateContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmGetIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIdentityArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"cmGetIdentities\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIdentitiesArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n }\n },\n \"cmAddIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddIdentityArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"cmRemoveIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveIdentityArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"cmUpdateIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateConnectionArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n }\n }\n }\n }\n}\n","/**\n * @public\n */\nconst schema = require('../plugin.schema.json')\nexport { schema }\nexport { ContactManager, contactManagerMethods } from './agent/ContactManager'\nexport * from './types/IContactManager'\n","import {\n AbstractContactStore,\n BaseContactEntity,\n ElectronicAddress,\n Identity,\n NonPersistedContact,\n Party as Contact,\n PartyRelationship as ContactRelationship,\n PartyType as ContactType,\n PhysicalAddress,\n isNaturalPerson,\n isOrganization,\n} from '@sphereon/ssi-sdk.data-store'\nimport { IAgentPlugin } from '@veramo/core'\nimport { schema } from '../index'\nimport {\n AddContactArgs,\n AddContactTypeArgs,\n AddElectronicAddressArgs,\n AddIdentityArgs,\n AddPhysicalAddressArgs,\n AddRelationshipArgs,\n GetContactArgs,\n GetContactTypeArgs,\n GetContactTypesArgs,\n GetContactsArgs,\n GetElectronicAddressArgs,\n GetElectronicAddressesArgs,\n GetIdentitiesArgs,\n GetIdentityArgs,\n GetPhysicalAddressArgs,\n GetPhysicalAddressesArgs,\n GetRelationshipArgs,\n GetRelationshipsArgs,\n IContactManager,\n RemoveContactArgs,\n RemoveContactTypeArgs,\n RemoveElectronicAddressArgs,\n RemoveIdentityArgs,\n RemovePhysicalAddressArgs,\n RemoveRelationshipArgs,\n RequiredContext,\n UpdateContactArgs,\n UpdateContactTypeArgs,\n UpdateElectronicAddressArgs,\n UpdateIdentityArgs,\n UpdatePhysicalAddressArgs,\n UpdateRelationshipArgs,\n} from '../types/IContactManager'\n\n// Exposing the methods here for any REST implementation\nexport const contactManagerMethods: Array<string> = [\n 'cmGetContact',\n 'cmGetContacts',\n 'cmAddContact',\n 'cmUpdateContact',\n 'cmRemoveContact',\n 'cmGetIdentity',\n 'cmGetIdentities',\n 'cmAddIdentity',\n 'cmUpdateIdentity',\n 'cmRemoveIdentity',\n 'cmAddRelationship',\n 'cmRemoveRelationship',\n 'cmGetRelationship',\n 'cmGetRelationships',\n 'cmUpdateRelationship',\n 'cmGetContactType',\n 'cmGetContactTypes',\n 'cmAddContactType',\n 'cmUpdateContactType',\n 'cmRemoveContactType',\n 'cmGetElectronicAddress',\n 'cmGetElectronicAddresses',\n 'cmAddElectronicAddress',\n 'cmUpdateElectronicAddress',\n 'cmRemoveElectronicAddress',\n 'cmGetPhysicalAddress',\n 'cmGetPhysicalAddresses',\n 'cmAddPhysicalAddress',\n 'cmUpdatePhysicalAddress',\n 'cmRemovePhysicalAddress',\n]\n\n/**\n * {@inheritDoc IContactManager}\n */\nexport class ContactManager implements IAgentPlugin {\n readonly schema = schema.IContactManager\n readonly methods: IContactManager = {\n cmGetContact: this.cmGetContact.bind(this),\n cmGetContacts: this.cmGetContacts.bind(this),\n cmAddContact: this.cmAddContact.bind(this),\n cmUpdateContact: this.cmUpdateContact.bind(this),\n cmRemoveContact: this.cmRemoveContact.bind(this),\n cmGetIdentity: this.cmGetIdentity.bind(this),\n cmGetIdentities: this.cmGetIdentities.bind(this),\n cmAddIdentity: this.cmAddIdentity.bind(this),\n cmUpdateIdentity: this.cmUpdateIdentity.bind(this),\n cmRemoveIdentity: this.cmRemoveIdentity.bind(this),\n cmAddRelationship: this.cmAddRelationship.bind(this),\n cmRemoveRelationship: this.cmRemoveRelationship.bind(this),\n cmGetRelationship: this.cmGetRelationship.bind(this),\n cmGetRelationships: this.cmGetRelationships.bind(this),\n cmUpdateRelationship: this.cmUpdateRelationship.bind(this),\n cmGetContactType: this.cmGetContactType.bind(this),\n cmGetContactTypes: this.cmGetContactTypes.bind(this),\n cmAddContactType: this.cmAddContactType.bind(this),\n cmUpdateContactType: this.cmUpdateContactType.bind(this),\n cmRemoveContactType: this.cmRemoveContactType.bind(this),\n cmGetElectronicAddress: this.cmGetElectronicAddress.bind(this),\n cmGetElectronicAddresses: this.cmGetElectronicAddresses.bind(this),\n cmAddElectronicAddress: this.cmAddElectronicAddress.bind(this),\n cmUpdateElectronicAddress: this.cmUpdateElectronicAddress.bind(this),\n cmRemoveElectronicAddress: this.cmRemoveElectronicAddress.bind(this),\n cmGetPhysicalAddress: this.cmGetPhysicalAddress.bind(this),\n cmGetPhysicalAddresses: this.cmGetPhysicalAddresses.bind(this),\n cmAddPhysicalAddress: this.cmAddPhysicalAddress.bind(this),\n cmUpdatePhysicalAddress: this.cmUpdatePhysicalAddress.bind(this),\n cmRemovePhysicalAddress: this.cmRemovePhysicalAddress.bind(this),\n }\n\n private readonly store: AbstractContactStore\n\n constructor(options: { store: AbstractContactStore }) {\n this.store = options.store\n }\n\n /** {@inheritDoc IContactManager.cmGetContact} */\n private async cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact> {\n const { contactId } = args\n return this.store.getParty({ partyId: contactId })\n }\n\n /** {@inheritDoc IContactManager.cmGetContacts} */\n private async cmGetContacts(args?: GetContactsArgs): Promise<Array<Contact>> {\n return this.store.getParties(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddContact} */\n private async cmAddContact(args: AddContactArgs, context: RequiredContext): Promise<Contact> {\n const { uri, contactType, identities, electronicAddresses, physicalAddresses } = args\n\n return this.store.addParty({\n uri,\n partyType: contactType,\n contact: this.getContactInformationFrom(args),\n identities,\n electronicAddresses,\n physicalAddresses,\n })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateContact} */\n private async cmUpdateContact(args: UpdateContactArgs, context: RequiredContext): Promise<Contact> {\n const { contact } = args\n return this.store.updateParty({ party: contact })\n }\n\n /** {@inheritDoc IContactManager.cmRemoveContact} */\n private async cmRemoveContact(args: RemoveContactArgs, context: RequiredContext): Promise<boolean> {\n const { contactId } = args\n return this.store.removeParty({ partyId: contactId }).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetIdentity} */\n private async cmGetIdentity(args: GetIdentityArgs, context: RequiredContext): Promise<Identity> {\n return this.store.getIdentity(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetIdentities} */\n private async cmGetIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>> {\n return this.store.getIdentities(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddIdentity} */\n private async cmAddIdentity(args: AddIdentityArgs, context: RequiredContext): Promise<Identity> {\n const { contactId, identity } = args\n return this.store.addIdentity({ partyId: contactId, identity })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateIdentity} */\n private async cmUpdateIdentity(args: UpdateIdentityArgs, context: RequiredContext): Promise<Identity> {\n return this.store.updateIdentity(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveIdentity} */\n private async cmRemoveIdentity(args: RemoveIdentityArgs, context: RequiredContext): Promise<boolean> {\n return this.store.removeIdentity(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmAddRelationship} */\n private async cmAddRelationship(args: AddRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.addRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveRelationship} */\n private async cmRemoveRelationship(args: RemoveRelationshipArgs, context: RequiredContext): Promise<boolean> {\n return this.store.removeRelationship(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetRelationship} */\n private async cmGetRelationship(args: GetRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.getRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetRelationships} */\n private async cmGetRelationships(args?: GetRelationshipsArgs): Promise<Array<ContactRelationship>> {\n return this.store.getRelationships(args)\n }\n\n /** {@inheritDoc IContactManager.cmUpdateRelationship} */\n private async cmUpdateRelationship(args: UpdateRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.updateRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetContactType} */\n private async cmGetContactType(args: GetContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n const { contactTypeId } = args\n return this.store.getPartyType({ partyTypeId: contactTypeId })\n }\n\n /** {@inheritDoc IContactManager.cmGetContactTypes} */\n private async cmGetContactTypes(args?: GetContactTypesArgs): Promise<Array<ContactType>> {\n return this.store.getPartyTypes(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddContactType} */\n private async cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n return this.store.addPartyType(args)\n }\n\n /** {@inheritDoc IContactManager.cmUpdateContactType} */\n private async cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n const { contactType } = args\n return this.store.updatePartyType({ partyType: contactType })\n }\n\n /** {@inheritDoc IContactManager.cmRemoveContactType} */\n private async cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean> {\n const { contactTypeId } = args\n return this.store.removePartyType({ partyTypeId: contactTypeId }).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetElectronicAddress} */\n private async cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress> {\n return this.store.getElectronicAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetElectronicAddresses} */\n private async cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>> {\n return this.store.getElectronicAddresses(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddElectronicAddress} */\n private async cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress> {\n const { contactId, electronicAddress } = args\n return this.store.addElectronicAddress({ partyId: contactId, electronicAddress })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateElectronicAddress} */\n private async cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress> {\n return this.store.updateElectronicAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveElectronicAddress} */\n private async cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean> {\n return this.store.removeElectronicAddress(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetPhysicalAddress} */\n private async cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress> {\n return this.store.getPhysicalAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetPhysicalAddresses} */\n private async cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>> {\n return this.store.getPhysicalAddresses(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddPhysicalAddress} */\n private async cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress> {\n const { contactId, physicalAddress } = args\n return this.store.addPhysicalAddress({ partyId: contactId, physicalAddress })\n }\n\n /** {@inheritDoc IContactManager.cmUpdatePhysicalAddress} */\n private async cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress> {\n return this.store.updatePhysicalAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemovePhysicalAddress} */\n private async cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean> {\n return this.store.removePhysicalAddress(args).then((): boolean => true)\n }\n\n private getContactInformationFrom(contact: NonPersistedContact | BaseContactEntity): NonPersistedContact {\n if (isNaturalPerson(contact)) {\n return { firstName: contact.firstName, middleName: contact.middleName, lastName: contact.lastName, displayName: contact.displayName }\n } else if (isOrganization(contact)) {\n return { legalName: contact.legalName, displayName: contact.displayName }\n }\n\n throw new Error('Contact not supported')\n }\n}\n","import { contextHasPlugin } from '@sphereon/ssi-sdk.agent-config'\nimport { IAgentContext, IPluginMethodMap } from '@veramo/core'\nimport {\n ElectronicAddress,\n FindElectronicAddressArgs,\n FindIdentityArgs,\n FindPartyArgs as FindContactArgs,\n FindPartyTypeArgs as FindContactTypeArgs,\n FindPhysicalAddressArgs,\n FindRelationshipArgs,\n Identity,\n NonPersistedContact,\n NonPersistedElectronicAddress,\n NonPersistedIdentity,\n NonPersistedParty,\n NonPersistedPartyType as NonPersistedContactType,\n NonPersistedPhysicalAddress,\n Party as Contact,\n PartyOrigin,\n PartyRelationship as ContactRelationship,\n PartyType as ContactType,\n PartyTypeType as ContactTypeType,\n PhysicalAddress,\n} from '@sphereon/ssi-sdk.data-store'\n\nexport interface IContactManager extends IPluginMethodMap {\n cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact>\n cmGetContacts(args?: GetContactsArgs): Promise<Array<Contact>>\n cmAddContact(args: AddContactArgs, context: RequiredContext): Promise<Contact>\n cmUpdateContact(args: UpdateContactArgs, context: RequiredContext): Promise<Contact>\n cmRemoveContact(args: RemoveContactArgs, context: RequiredContext): Promise<boolean>\n cmGetIdentity(args: GetIdentityArgs, context: RequiredContext): Promise<Identity>\n cmGetIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>>\n cmAddIdentity(args: AddIdentityArgs, context: RequiredContext): Promise<Identity>\n cmUpdateIdentity(args: UpdateIdentityArgs, context: RequiredContext): Promise<Identity>\n cmRemoveIdentity(args: RemoveIdentityArgs, context: RequiredContext): Promise<boolean>\n cmGetRelationship(args: GetRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmGetRelationships(args?: GetRelationshipsArgs): Promise<Array<ContactRelationship>>\n cmUpdateRelationship(args: UpdateRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmAddRelationship(args: AddRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmRemoveRelationship(args: RemoveRelationshipArgs, context: RequiredContext): Promise<boolean>\n cmGetContactType(args: GetContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmGetContactTypes(args?: GetContactTypesArgs): Promise<Array<ContactType>>\n cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean>\n cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress>\n cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>>\n cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress>\n cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress>\n cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean>\n cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress>\n cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>>\n cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress>\n cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress>\n cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean>\n}\n\nexport function contextHasContactManager(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<IContactManager> {\n return contextHasPlugin(context, 'cmGetContact')\n}\n\nexport type GetContactArgs = {\n contactId: string\n}\n\nexport type GetContactsArgs = {\n filter?: FindContactArgs\n}\n\nexport type AddContactArgs = Omit<NonPersistedParty, 'contact' | 'partyType'> &\n NonPersistedContact & {\n contactType: NonPersistedContactType\n }\n\nexport type UpdateContactArgs = {\n contact: Contact\n}\n\nexport type RemoveContactArgs = {\n contactId: string\n}\n\nexport type GetIdentityArgs = {\n identityId: string\n}\n\nexport type GetIdentitiesArgs = {\n filter?: FindIdentityArgs\n}\n\nexport type AddIdentityArgs = {\n contactId: string\n identity: NonPersistedIdentity\n}\n\nexport type UpdateIdentityArgs = {\n identity: Identity\n}\n\nexport type RemoveIdentityArgs = {\n identityId: string\n}\n\nexport type AddRelationshipArgs = {\n leftId: string\n rightId: string\n}\n\nexport type RemoveRelationshipArgs = {\n relationshipId: string\n}\n\nexport type GetRelationshipArgs = {\n relationshipId: string\n}\n\nexport type GetRelationshipsArgs = {\n filter: FindRelationshipArgs\n}\n\nexport type UpdateRelationshipArgs = {\n relationship: Omit<ContactRelationship, 'createdAt' | 'lastUpdatedAt'>\n}\n\nexport type AddContactTypeArgs = {\n type: ContactTypeType\n origin: PartyOrigin\n name: string\n tenantId: string\n description?: string\n}\n\nexport type GetContactTypeArgs = {\n contactTypeId: string\n}\n\nexport type GetContactTypesArgs = {\n filter?: FindContactTypeArgs\n}\n\nexport type UpdateContactTypeArgs = {\n contactType: Omit<ContactType, 'createdAt' | 'lastUpdatedAt'>\n}\n\nexport type RemoveContactTypeArgs = {\n contactTypeId: string\n}\n\nexport type GetElectronicAddressArgs = {\n electronicAddressId: string\n}\n\nexport type GetElectronicAddressesArgs = {\n filter?: FindElectronicAddressArgs\n}\n\nexport type AddElectronicAddressArgs = {\n contactId: string\n electronicAddress: NonPersistedElectronicAddress\n}\n\nexport type UpdateElectronicAddressArgs = {\n electronicAddress: ElectronicAddress\n}\n\nexport type RemoveElectronicAddressArgs = {\n electronicAddressId: string\n}\n\nexport type GetPhysicalAddressArgs = {\n physicalAddressId: string\n}\n\nexport type GetPhysicalAddressesArgs = {\n filter?: FindPhysicalAddressArgs\n}\n\nexport type AddPhysicalAddressArgs = {\n contactId: string\n physicalAddress: NonPersistedPhysicalAddress\n}\n\nexport type UpdatePhysicalAddressArgs = {\n physicalAddress: PhysicalAddress\n}\n\nexport type RemovePhysicalAddressArgs = {\n physicalAddressId: string\n}\n\nexport type RequiredContext =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SAASC;","names":["module","contactManagerMethods","ContactManager","schema","IContactManager","methods","cmGetContact","bind","cmGetContacts","cmAddContact","cmUpdateContact","cmRemoveContact","cmGetIdentity","cmGetIdentities","cmAddIdentity","cmUpdateIdentity","cmRemoveIdentity","cmAddRelationship","cmRemoveRelationship","cmGetRelationship","cmGetRelationships","cmUpdateRelationship","cmGetContactType","cmGetContactTypes","cmAddContactType","cmUpdateContactType","cmRemoveContactType","cmGetElectronicAddress","cmGetElectronicAddresses","cmAddElectronicAddress","cmUpdateElectronicAddress","cmRemoveElectronicAddress","cmGetPhysicalAddress","cmGetPhysicalAddresses","cmAddPhysicalAddress","cmUpdatePhysicalAddress","cmRemovePhysicalAddress","store","options","args","context","contactId","getParty","partyId","getParties","uri","contactType","identities","electronicAddresses","physicalAddresses","addParty","partyType","contact","getContactInformationFrom","updateParty","party","removeParty","then","getIdentity","getIdentities","identity","addIdentity","updateIdentity","removeIdentity","addRelationship","removeRelationship","getRelationship","getRelationships","updateRelationship","contactTypeId","getPartyType","partyTypeId","getPartyTypes","addPartyType","updatePartyType","removePartyType","getElectronicAddress","getElectronicAddresses","electronicAddress","addElectronicAddress","updateElectronicAddress","removeElectronicAddress","getPhysicalAddress","getPhysicalAddresses","physicalAddress","addPhysicalAddress","updatePhysicalAddress","removePhysicalAddress","isNaturalPerson","firstName","middleName","lastName","displayName","isOrganization","legalName","Error","import_ssi_sdk","contextHasContactManager","context","contextHasPlugin","schema","require"]}
|
|
1
|
+
{"version":3,"sources":["../plugin.schema.json","../src/index.ts","../src/agent/ContactManager.ts","../src/types/IContactManager.ts"],"sourcesContent":["{\n \"IContactManager\": {\n \"components\": {\n \"schemas\": {\n \"IGetContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IGetContactsArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"IAddContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contact\": {\n \"$ref\": \"#/components/schemas/IBasicContact\"\n }\n },\n \"required\": [\"party\"]\n },\n \"IRemoveContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IUpdateContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contact\": {\n \"$ref\": \"#/components/schemas/IBasicContact\"\n }\n },\n \"required\": [\"party\"]\n },\n \"IGetIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identityId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identityId\"]\n },\n \"IGetIdentitiesArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IAddIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identity\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"required\": [\"identity\"]\n },\n \"IRemoveIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identityId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identityId\"]\n },\n \"IUpdateIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identity\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"required\": [\"identity\"]\n },\n \"IBasicContact\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"identities\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IBasicIdentity\"\n }\n }\n },\n \"required\": [\"name\", \"alias\"]\n },\n \"IContact\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"identities\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"alias\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"IMetadataItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"label\", \"value\"]\n },\n \"BasicMetadataItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"label\", \"value\"]\n },\n \"IBasicIdentity\": {\n \"type\": \"object\",\n \"properties\": {\n \"alias\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/BasicCorrelationIdentifier\"\n },\n \"connection\": {\n \"$ref\": \"#/components/schemas/IBasicConnection\"\n },\n \"metadata\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IMetadataItem\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"alias\", \"identifier\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"IIdentity\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/ICorrelationIdentifier\"\n },\n \"connection\": {\n \"$ref\": \"#/components/schemas/IConnection\"\n },\n \"metadata\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IMetadataItem\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"alias\", \"identifier\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"CorrelationIdentifierEnum\": {\n \"type\": \"string\",\n \"enum\": [\"did\", \"url\"]\n },\n \"BasicCorrelationIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"$ref\": \"#/components/schemas/CorrelationIdentifierEnum\"\n },\n \"correlationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"type\", \"correlationId\"]\n },\n \"ICorrelationIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/CorrelationIdentifierEnum\"\n },\n \"correlationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"type\", \"correlationId\"]\n },\n \"ConnectionTypeEnum\": {\n \"type\": \"string\",\n \"enum\": [\"openid\", \"didauth\", \"siopv2+oidc4vp\"]\n },\n \"IBasicConnection\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"$ref\": \"#/components/schemas/ConnectionTypeEnum\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/BasicConnectionConfig\"\n }\n },\n \"required\": [\"type\", \"config\"]\n },\n \"IConnection\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/ConnectionTypeEnum\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/ConnectionConfig\"\n }\n },\n \"required\": [\"id\", \"type\", \"config\"]\n },\n \"BasicConnectionConfig\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/BasicDidAuthConfig\"\n },\n {\n \"$ref\": \"#/components/schemas/BasicOpenIdConfig\"\n }\n ]\n },\n \"ConnectionConfig\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IOpenIdConfig\"\n },\n {\n \"$ref\": \"#/components/schemas/IDidAuthConfig\"\n }\n ]\n },\n \"BasicDidAuthConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"identifier\": {\n \"$ref\": \"#/components/schemas/IIdentifier\"\n },\n \"stateId\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identifier\", \"stateId\", \"redirectUrl\", \"sessionId\"]\n },\n \"BasicOpenIdConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"clientId\": {\n \"type\": \"string\"\n },\n \"clientSecret\": {\n \"type\": \"string\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"issuer\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"dangerouslyAllowInsecureHttpRequests\": {\n \"type\": \"boolean\"\n },\n \"clientAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"basic\", \"post\"]\n }\n },\n \"required\": [\"clientId\", \"clientSecret\", \"scopes\", \"issuer\", \"redirectUrl\", \"dangerouslyAllowInsecureHttpRequests\"]\n },\n \"IOpenIdConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"clientId\": {\n \"type\": \"string\"\n },\n \"clientSecret\": {\n \"type\": \"string\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"issuer\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"dangerouslyAllowInsecureHttpRequests\": {\n \"type\": \"boolean\"\n },\n \"clientAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"basic\", \"post\"]\n }\n },\n \"required\": [\"id\", \"clientId\", \"clientSecret\", \"scopes\", \"issuer\", \"redirectUrl\", \"dangerouslyAllowInsecureHttpRequests\"]\n },\n \"IDidAuthConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/IIdentifier\"\n },\n \"stateId\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"identifier\", \"stateId\", \"redirectUrl\", \"sessionId\"]\n },\n \"IIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"did\": {\n \"type\": \"string\",\n \"description\": \"Decentralized identifier\"\n },\n \"alias\": {\n \"type\": \"string\",\n \"description\": \"Optional. Identifier alias. Can be used to reference an object in an external system\"\n },\n \"provider\": {\n \"type\": \"string\",\n \"description\": \"Identifier provider name\"\n },\n \"controllerKeyId\": {\n \"type\": \"string\",\n \"description\": \"Controller key id\"\n },\n \"keys\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IKey\"\n },\n \"description\": \"Array of managed keys\"\n },\n \"services\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IService\"\n },\n \"description\": \"Array of services\"\n }\n },\n \"required\": [\"did\", \"provider\", \"keys\", \"services\"],\n \"description\": \"Identifier interface\"\n },\n \"IKey\": {\n \"type\": \"object\",\n \"properties\": {\n \"kid\": {\n \"type\": \"string\",\n \"description\": \"Key ID\"\n },\n \"kms\": {\n \"type\": \"string\",\n \"description\": \"Key Management System\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/TKeyType\",\n \"description\": \"Key type\"\n },\n \"publicKeyHex\": {\n \"type\": \"string\",\n \"description\": \"Public key\"\n },\n \"privateKeyHex\": {\n \"type\": \"string\",\n \"description\": \"Optional. Private key\"\n },\n \"meta\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/KeyMetadata\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"Optional. Key metadata. This should be used to determine which algorithms are supported.\"\n }\n },\n \"required\": [\"kid\", \"kms\", \"type\", \"publicKeyHex\"],\n \"description\": \"Cryptographic key\"\n },\n \"TKeyType\": {\n \"type\": \"string\",\n \"enum\": [\"Ed25519\", \"Secp256k1\", \"Secp256r1\", \"X25519\", \"Bls12381G1\", \"Bls12381G2\", \"RSA\"],\n \"description\": \"Cryptographic key type.\"\n },\n \"KeyMetadata\": {\n \"type\": \"object\",\n \"properties\": {\n \"algorithms\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"This encapsulates data about a key.\\n\\nImplementations of {@link @veramo/key-manager#AbstractKeyManagementSystem | AbstractKeyManagementSystem } should populate this object, for each key, with the algorithms that can be performed using it.\\n\\nThis can also be used to add various tags to the keys under management.\"\n },\n \"IService\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"ID\"\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"Service type\"\n },\n \"serviceEndpoint\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IServiceEndpoint\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IServiceEndpoint\"\n }\n }\n ],\n \"description\": \"Endpoint URL\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Optional. Description\"\n }\n },\n \"required\": [\"id\", \"type\", \"serviceEndpoint\"],\n \"description\": \"Identifier service\"\n },\n \"IServiceEndpoint\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\"\n }\n ],\n \"description\": \"Represents a service endpoint URL or a map of URLs\"\n }\n },\n \"methods\": {\n \"cmGetContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmGetContacts\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetContactsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n }\n },\n \"cmAddContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmRemoveContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveContactArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"cmUpdateContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmGetIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIdentityArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"cmGetIdentities\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIdentitiesArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n }\n },\n \"cmAddIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddIdentityArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"cmRemoveIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveIdentityArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"cmUpdateIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateConnectionArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n }\n }\n }\n }\n}\n","/**\n * @public\n */\nconst schema = require('../plugin.schema.json')\nexport { schema }\nexport { ContactManager, contactManagerMethods } from './agent/ContactManager'\nexport * from './types/IContactManager'\n","import {\n AbstractContactStore,\n ElectronicAddress,\n Identity,\n NonPersistedContact,\n Party as Contact,\n PartyRelationship as ContactRelationship,\n PartyType as ContactType,\n PhysicalAddress,\n} from '@sphereon/ssi-sdk.data-store-types'\nimport { BaseContactEntity, isNaturalPerson, isOrganization } from '@sphereon/ssi-sdk.data-store'\n\nimport { IAgentPlugin } from '@veramo/core'\nimport { schema } from '../index'\nimport {\n AddContactArgs,\n AddContactTypeArgs,\n AddElectronicAddressArgs,\n AddIdentityArgs,\n AddPhysicalAddressArgs,\n AddRelationshipArgs,\n GetContactArgs,\n GetContactTypeArgs,\n GetContactTypesArgs,\n GetContactsArgs,\n GetElectronicAddressArgs,\n GetElectronicAddressesArgs,\n GetIdentitiesArgs,\n GetIdentityArgs,\n GetPhysicalAddressArgs,\n GetPhysicalAddressesArgs,\n GetRelationshipArgs,\n GetRelationshipsArgs,\n IContactManager,\n RemoveContactArgs,\n RemoveContactTypeArgs,\n RemoveElectronicAddressArgs,\n RemoveIdentityArgs,\n RemovePhysicalAddressArgs,\n RemoveRelationshipArgs,\n RequiredContext,\n UpdateContactArgs,\n UpdateContactTypeArgs,\n UpdateElectronicAddressArgs,\n UpdateIdentityArgs,\n UpdatePhysicalAddressArgs,\n UpdateRelationshipArgs,\n} from '../types/IContactManager'\n\n// Exposing the methods here for any REST implementation\nexport const contactManagerMethods: Array<string> = [\n 'cmGetContact',\n 'cmGetContacts',\n 'cmAddContact',\n 'cmUpdateContact',\n 'cmRemoveContact',\n 'cmGetIdentity',\n 'cmGetIdentities',\n 'cmAddIdentity',\n 'cmUpdateIdentity',\n 'cmRemoveIdentity',\n 'cmAddRelationship',\n 'cmRemoveRelationship',\n 'cmGetRelationship',\n 'cmGetRelationships',\n 'cmUpdateRelationship',\n 'cmGetContactType',\n 'cmGetContactTypes',\n 'cmAddContactType',\n 'cmUpdateContactType',\n 'cmRemoveContactType',\n 'cmGetElectronicAddress',\n 'cmGetElectronicAddresses',\n 'cmAddElectronicAddress',\n 'cmUpdateElectronicAddress',\n 'cmRemoveElectronicAddress',\n 'cmGetPhysicalAddress',\n 'cmGetPhysicalAddresses',\n 'cmAddPhysicalAddress',\n 'cmUpdatePhysicalAddress',\n 'cmRemovePhysicalAddress',\n]\n\n/**\n * {@inheritDoc IContactManager}\n */\nexport class ContactManager implements IAgentPlugin {\n readonly schema = schema.IContactManager\n readonly methods: IContactManager = {\n cmGetContact: this.cmGetContact.bind(this),\n cmGetContacts: this.cmGetContacts.bind(this),\n cmAddContact: this.cmAddContact.bind(this),\n cmUpdateContact: this.cmUpdateContact.bind(this),\n cmRemoveContact: this.cmRemoveContact.bind(this),\n cmGetIdentity: this.cmGetIdentity.bind(this),\n cmGetIdentities: this.cmGetIdentities.bind(this),\n cmAddIdentity: this.cmAddIdentity.bind(this),\n cmUpdateIdentity: this.cmUpdateIdentity.bind(this),\n cmRemoveIdentity: this.cmRemoveIdentity.bind(this),\n cmAddRelationship: this.cmAddRelationship.bind(this),\n cmRemoveRelationship: this.cmRemoveRelationship.bind(this),\n cmGetRelationship: this.cmGetRelationship.bind(this),\n cmGetRelationships: this.cmGetRelationships.bind(this),\n cmUpdateRelationship: this.cmUpdateRelationship.bind(this),\n cmGetContactType: this.cmGetContactType.bind(this),\n cmGetContactTypes: this.cmGetContactTypes.bind(this),\n cmAddContactType: this.cmAddContactType.bind(this),\n cmUpdateContactType: this.cmUpdateContactType.bind(this),\n cmRemoveContactType: this.cmRemoveContactType.bind(this),\n cmGetElectronicAddress: this.cmGetElectronicAddress.bind(this),\n cmGetElectronicAddresses: this.cmGetElectronicAddresses.bind(this),\n cmAddElectronicAddress: this.cmAddElectronicAddress.bind(this),\n cmUpdateElectronicAddress: this.cmUpdateElectronicAddress.bind(this),\n cmRemoveElectronicAddress: this.cmRemoveElectronicAddress.bind(this),\n cmGetPhysicalAddress: this.cmGetPhysicalAddress.bind(this),\n cmGetPhysicalAddresses: this.cmGetPhysicalAddresses.bind(this),\n cmAddPhysicalAddress: this.cmAddPhysicalAddress.bind(this),\n cmUpdatePhysicalAddress: this.cmUpdatePhysicalAddress.bind(this),\n cmRemovePhysicalAddress: this.cmRemovePhysicalAddress.bind(this),\n }\n\n private readonly store: AbstractContactStore\n\n constructor(options: { store: AbstractContactStore }) {\n this.store = options.store\n }\n\n /** {@inheritDoc IContactManager.cmGetContact} */\n private async cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact> {\n const { contactId } = args\n return this.store.getParty({ partyId: contactId })\n }\n\n /** {@inheritDoc IContactManager.cmGetContacts} */\n private async cmGetContacts(args?: GetContactsArgs): Promise<Array<Contact>> {\n return this.store.getParties(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddContact} */\n private async cmAddContact(args: AddContactArgs, context: RequiredContext): Promise<Contact> {\n const { uri, contactType, identities, electronicAddresses, physicalAddresses } = args\n\n return this.store.addParty({\n uri,\n partyType: contactType,\n contact: this.getContactInformationFrom(args),\n identities,\n electronicAddresses,\n physicalAddresses,\n })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateContact} */\n private async cmUpdateContact(args: UpdateContactArgs, context: RequiredContext): Promise<Contact> {\n const { contact } = args\n return this.store.updateParty({ party: contact })\n }\n\n /** {@inheritDoc IContactManager.cmRemoveContact} */\n private async cmRemoveContact(args: RemoveContactArgs, context: RequiredContext): Promise<boolean> {\n const { contactId } = args\n return this.store.removeParty({ partyId: contactId }).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetIdentity} */\n private async cmGetIdentity(args: GetIdentityArgs, context: RequiredContext): Promise<Identity> {\n return this.store.getIdentity(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetIdentities} */\n private async cmGetIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>> {\n return this.store.getIdentities(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddIdentity} */\n private async cmAddIdentity(args: AddIdentityArgs, context: RequiredContext): Promise<Identity> {\n const { contactId, identity } = args\n return this.store.addIdentity({ partyId: contactId, identity })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateIdentity} */\n private async cmUpdateIdentity(args: UpdateIdentityArgs, context: RequiredContext): Promise<Identity> {\n return this.store.updateIdentity(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveIdentity} */\n private async cmRemoveIdentity(args: RemoveIdentityArgs, context: RequiredContext): Promise<boolean> {\n return this.store.removeIdentity(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmAddRelationship} */\n private async cmAddRelationship(args: AddRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.addRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveRelationship} */\n private async cmRemoveRelationship(args: RemoveRelationshipArgs, context: RequiredContext): Promise<boolean> {\n return this.store.removeRelationship(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetRelationship} */\n private async cmGetRelationship(args: GetRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.getRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetRelationships} */\n private async cmGetRelationships(args?: GetRelationshipsArgs): Promise<Array<ContactRelationship>> {\n return this.store.getRelationships(args)\n }\n\n /** {@inheritDoc IContactManager.cmUpdateRelationship} */\n private async cmUpdateRelationship(args: UpdateRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.updateRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetContactType} */\n private async cmGetContactType(args: GetContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n const { contactTypeId } = args\n return this.store.getPartyType({ partyTypeId: contactTypeId })\n }\n\n /** {@inheritDoc IContactManager.cmGetContactTypes} */\n private async cmGetContactTypes(args?: GetContactTypesArgs): Promise<Array<ContactType>> {\n return this.store.getPartyTypes(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddContactType} */\n private async cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n return this.store.addPartyType(args)\n }\n\n /** {@inheritDoc IContactManager.cmUpdateContactType} */\n private async cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n const { contactType } = args\n return this.store.updatePartyType({ partyType: contactType })\n }\n\n /** {@inheritDoc IContactManager.cmRemoveContactType} */\n private async cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean> {\n const { contactTypeId } = args\n return this.store.removePartyType({ partyTypeId: contactTypeId }).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetElectronicAddress} */\n private async cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress> {\n return this.store.getElectronicAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetElectronicAddresses} */\n private async cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>> {\n return this.store.getElectronicAddresses(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddElectronicAddress} */\n private async cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress> {\n const { contactId, electronicAddress } = args\n return this.store.addElectronicAddress({ partyId: contactId, electronicAddress })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateElectronicAddress} */\n private async cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress> {\n return this.store.updateElectronicAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveElectronicAddress} */\n private async cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean> {\n return this.store.removeElectronicAddress(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetPhysicalAddress} */\n private async cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress> {\n return this.store.getPhysicalAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetPhysicalAddresses} */\n private async cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>> {\n return this.store.getPhysicalAddresses(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddPhysicalAddress} */\n private async cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress> {\n const { contactId, physicalAddress } = args\n return this.store.addPhysicalAddress({ partyId: contactId, physicalAddress })\n }\n\n /** {@inheritDoc IContactManager.cmUpdatePhysicalAddress} */\n private async cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress> {\n return this.store.updatePhysicalAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemovePhysicalAddress} */\n private async cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean> {\n return this.store.removePhysicalAddress(args).then((): boolean => true)\n }\n\n private getContactInformationFrom(contact: NonPersistedContact | BaseContactEntity): NonPersistedContact {\n if (isNaturalPerson(contact)) {\n return { firstName: contact.firstName, middleName: contact.middleName, lastName: contact.lastName, displayName: contact.displayName }\n } else if (isOrganization(contact)) {\n return { legalName: contact.legalName, displayName: contact.displayName }\n }\n\n throw new Error('Contact not supported')\n }\n}\n","import { contextHasPlugin } from '@sphereon/ssi-sdk.agent-config'\nimport { IAgentContext, IPluginMethodMap } from '@veramo/core'\nimport {\n ElectronicAddress,\n FindElectronicAddressArgs,\n FindIdentityArgs,\n FindPartyArgs as FindContactArgs,\n FindPartyTypeArgs as FindContactTypeArgs,\n FindPhysicalAddressArgs,\n FindRelationshipArgs,\n Identity,\n NonPersistedContact,\n NonPersistedElectronicAddress,\n NonPersistedIdentity,\n NonPersistedParty,\n NonPersistedPartyType as NonPersistedContactType,\n NonPersistedPhysicalAddress,\n Party as Contact,\n PartyOrigin,\n PartyRelationship as ContactRelationship,\n PartyType as ContactType,\n PartyTypeType as ContactTypeType,\n PhysicalAddress,\n} from '@sphereon/ssi-sdk.data-store-types'\n\nexport interface IContactManager extends IPluginMethodMap {\n cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact>\n cmGetContacts(args?: GetContactsArgs): Promise<Array<Contact>>\n cmAddContact(args: AddContactArgs, context: RequiredContext): Promise<Contact>\n cmUpdateContact(args: UpdateContactArgs, context: RequiredContext): Promise<Contact>\n cmRemoveContact(args: RemoveContactArgs, context: RequiredContext): Promise<boolean>\n cmGetIdentity(args: GetIdentityArgs, context: RequiredContext): Promise<Identity>\n cmGetIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>>\n cmAddIdentity(args: AddIdentityArgs, context: RequiredContext): Promise<Identity>\n cmUpdateIdentity(args: UpdateIdentityArgs, context: RequiredContext): Promise<Identity>\n cmRemoveIdentity(args: RemoveIdentityArgs, context: RequiredContext): Promise<boolean>\n cmGetRelationship(args: GetRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmGetRelationships(args?: GetRelationshipsArgs): Promise<Array<ContactRelationship>>\n cmUpdateRelationship(args: UpdateRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmAddRelationship(args: AddRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmRemoveRelationship(args: RemoveRelationshipArgs, context: RequiredContext): Promise<boolean>\n cmGetContactType(args: GetContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmGetContactTypes(args?: GetContactTypesArgs): Promise<Array<ContactType>>\n cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean>\n cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress>\n cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>>\n cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress>\n cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress>\n cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean>\n cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress>\n cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>>\n cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress>\n cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress>\n cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean>\n}\n\nexport function contextHasContactManager(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<IContactManager> {\n return contextHasPlugin(context, 'cmGetContact')\n}\n\nexport type GetContactArgs = {\n contactId: string\n}\n\nexport type GetContactsArgs = {\n filter?: FindContactArgs\n}\n\nexport type AddContactArgs = Omit<NonPersistedParty, 'contact' | 'partyType'> &\n NonPersistedContact & {\n contactType: NonPersistedContactType\n }\n\nexport type UpdateContactArgs = {\n contact: Contact\n}\n\nexport type RemoveContactArgs = {\n contactId: string\n}\n\nexport type GetIdentityArgs = {\n identityId: string\n}\n\nexport type GetIdentitiesArgs = {\n filter?: FindIdentityArgs\n}\n\nexport type AddIdentityArgs = {\n contactId: string\n identity: NonPersistedIdentity\n}\n\nexport type UpdateIdentityArgs = {\n identity: Identity\n}\n\nexport type RemoveIdentityArgs = {\n identityId: string\n}\n\nexport type AddRelationshipArgs = {\n leftId: string\n rightId: string\n}\n\nexport type RemoveRelationshipArgs = {\n relationshipId: string\n}\n\nexport type GetRelationshipArgs = {\n relationshipId: string\n}\n\nexport type GetRelationshipsArgs = {\n filter: FindRelationshipArgs\n}\n\nexport type UpdateRelationshipArgs = {\n relationship: Omit<ContactRelationship, 'createdAt' | 'lastUpdatedAt'>\n}\n\nexport type AddContactTypeArgs = {\n type: ContactTypeType\n origin: PartyOrigin\n name: string\n tenantId: string\n description?: string\n}\n\nexport type GetContactTypeArgs = {\n contactTypeId: string\n}\n\nexport type GetContactTypesArgs = {\n filter?: FindContactTypeArgs\n}\n\nexport type UpdateContactTypeArgs = {\n contactType: Omit<ContactType, 'createdAt' | 'lastUpdatedAt'>\n}\n\nexport type RemoveContactTypeArgs = {\n contactTypeId: string\n}\n\nexport type GetElectronicAddressArgs = {\n electronicAddressId: string\n}\n\nexport type GetElectronicAddressesArgs = {\n filter?: FindElectronicAddressArgs\n}\n\nexport type AddElectronicAddressArgs = {\n contactId: string\n electronicAddress: NonPersistedElectronicAddress\n}\n\nexport type UpdateElectronicAddressArgs = {\n electronicAddress: ElectronicAddress\n}\n\nexport type RemoveElectronicAddressArgs = {\n electronicAddressId: string\n}\n\nexport type GetPhysicalAddressArgs = {\n physicalAddressId: string\n}\n\nexport type GetPhysicalAddressesArgs = {\n filter?: FindPhysicalAddressArgs\n}\n\nexport type AddPhysicalAddressArgs = {\n contactId: string\n physicalAddress: NonPersistedPhysicalAddress\n}\n\nexport type UpdatePhysicalAddressArgs = {\n physicalAddress: PhysicalAddress\n}\n\nexport type RemovePhysicalAddressArgs = {\n physicalAddressId: string\n}\n\nexport type RequiredContext = IAgentContext<never>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,gCAAAA,SAAA;AAAA,IAAAA,QAAA;AAAA,MACE,iBAAmB;AAAA,QACjB,YAAc;AAAA,UACZ,SAAW;AAAA,YACT,iBAAmB;AAAA,cACjB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,WAAa;AAAA,kBACX,MAAQ;AAAA,gBACV;AAAA,cACF;AAAA,cACA,UAAY,CAAC,WAAW;AAAA,YAC1B;AAAA,YACA,kBAAoB;AAAA,cAClB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,QAAU;AAAA,kBACR,MAAQ;AAAA,kBACR,OAAS;AAAA,oBACP,MAAQ;AAAA,kBACV;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,YACA,iBAAmB;AAAA,cACjB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,SAAW;AAAA,kBACT,MAAQ;AAAA,gBACV;AAAA,cACF;AAAA,cACA,UAAY,CAAC,OAA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F,MAAMiD,sBAAsB/C,IAAAA;EAC1C;;EAGA,MAAcH,wBAAwBG,MAAmD;AACvF,WAAO,KAAKF,MAAMkD,sBAAsBhD,IAAAA,EAAMkB,KAAK,MAAe,IAAA;EACpE;EAEQJ,0BAA0BD,SAAuE;AACvG,YAAIoC,gCAAgBpC,OAAAA,GAAU;AAC5B,aAAO;QAAEqC,WAAWrC,QAAQqC;QAAWC,YAAYtC,QAAQsC;QAAYC,UAAUvC,QAAQuC;QAAUC,aAAaxC,QAAQwC;MAAY;IACtI,eAAWC,+BAAezC,OAAAA,GAAU;AAClC,aAAO;QAAE0C,WAAW1C,QAAQ0C;QAAWF,aAAaxC,QAAQwC;MAAY;IAC1E;AAEA,UAAM,IAAIG,MAAM,uBAAA;EAClB;AACF;;;AChTA,IAAAC,kBAAiC;AA0D1B,SAASC,yBAAyBC,SAAwC;AAC/E,aAAOC,kCAAiBD,SAAS,cAAA;AACnC;AAFgBD;;;AFvDhB,IAAMG,SAASC;","names":["module","contactManagerMethods","ContactManager","schema","IContactManager","methods","cmGetContact","bind","cmGetContacts","cmAddContact","cmUpdateContact","cmRemoveContact","cmGetIdentity","cmGetIdentities","cmAddIdentity","cmUpdateIdentity","cmRemoveIdentity","cmAddRelationship","cmRemoveRelationship","cmGetRelationship","cmGetRelationships","cmUpdateRelationship","cmGetContactType","cmGetContactTypes","cmAddContactType","cmUpdateContactType","cmRemoveContactType","cmGetElectronicAddress","cmGetElectronicAddresses","cmAddElectronicAddress","cmUpdateElectronicAddress","cmRemoveElectronicAddress","cmGetPhysicalAddress","cmGetPhysicalAddresses","cmAddPhysicalAddress","cmUpdatePhysicalAddress","cmRemovePhysicalAddress","store","options","args","context","contactId","getParty","partyId","getParties","uri","contactType","identities","electronicAddresses","physicalAddresses","addParty","partyType","contact","getContactInformationFrom","updateParty","party","removeParty","then","getIdentity","getIdentities","identity","addIdentity","updateIdentity","removeIdentity","addRelationship","removeRelationship","getRelationship","getRelationships","updateRelationship","contactTypeId","getPartyType","partyTypeId","getPartyTypes","addPartyType","updatePartyType","removePartyType","getElectronicAddress","getElectronicAddresses","electronicAddress","addElectronicAddress","updateElectronicAddress","removeElectronicAddress","getPhysicalAddress","getPhysicalAddresses","physicalAddress","addPhysicalAddress","updatePhysicalAddress","removePhysicalAddress","isNaturalPerson","firstName","middleName","lastName","displayName","isOrganization","legalName","Error","import_ssi_sdk","contextHasContactManager","context","contextHasPlugin","schema","require"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Party, FindPartyArgs, NonPersistedParty, NonPersistedContact, NonPersistedPartyType, Identity, FindIdentityArgs, NonPersistedIdentity, PartyRelationship, FindRelationshipArgs, PartyType, FindPartyTypeArgs, PartyTypeType, PartyOrigin, ElectronicAddress, FindElectronicAddressArgs, NonPersistedElectronicAddress, PhysicalAddress, FindPhysicalAddressArgs, NonPersistedPhysicalAddress, AbstractContactStore } from '@sphereon/ssi-sdk.data-store';
|
|
1
|
+
import { Party, FindPartyArgs, NonPersistedParty, NonPersistedContact, NonPersistedPartyType, Identity, FindIdentityArgs, NonPersistedIdentity, PartyRelationship, FindRelationshipArgs, PartyType, FindPartyTypeArgs, PartyTypeType, PartyOrigin, ElectronicAddress, FindElectronicAddressArgs, NonPersistedElectronicAddress, PhysicalAddress, FindPhysicalAddressArgs, NonPersistedPhysicalAddress, AbstractContactStore } from '@sphereon/ssi-sdk.data-store-types';
|
|
2
2
|
import { IPluginMethodMap, IAgentContext, IAgentPlugin } from '@veramo/core';
|
|
3
3
|
|
|
4
4
|
interface IContactManager extends IPluginMethodMap {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Party, FindPartyArgs, NonPersistedParty, NonPersistedContact, NonPersistedPartyType, Identity, FindIdentityArgs, NonPersistedIdentity, PartyRelationship, FindRelationshipArgs, PartyType, FindPartyTypeArgs, PartyTypeType, PartyOrigin, ElectronicAddress, FindElectronicAddressArgs, NonPersistedElectronicAddress, PhysicalAddress, FindPhysicalAddressArgs, NonPersistedPhysicalAddress, AbstractContactStore } from '@sphereon/ssi-sdk.data-store';
|
|
1
|
+
import { Party, FindPartyArgs, NonPersistedParty, NonPersistedContact, NonPersistedPartyType, Identity, FindIdentityArgs, NonPersistedIdentity, PartyRelationship, FindRelationshipArgs, PartyType, FindPartyTypeArgs, PartyTypeType, PartyOrigin, ElectronicAddress, FindElectronicAddressArgs, NonPersistedElectronicAddress, PhysicalAddress, FindPhysicalAddressArgs, NonPersistedPhysicalAddress, AbstractContactStore } from '@sphereon/ssi-sdk.data-store-types';
|
|
2
2
|
import { IPluginMethodMap, IAgentContext, IAgentPlugin } from '@veramo/core';
|
|
3
3
|
|
|
4
4
|
interface IContactManager extends IPluginMethodMap {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../plugin.schema.json","../src/agent/ContactManager.ts","../src/types/IContactManager.ts","../src/index.ts"],"sourcesContent":["{\n \"IContactManager\": {\n \"components\": {\n \"schemas\": {\n \"IGetContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IGetContactsArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"IAddContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contact\": {\n \"$ref\": \"#/components/schemas/IBasicContact\"\n }\n },\n \"required\": [\"party\"]\n },\n \"IRemoveContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IUpdateContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contact\": {\n \"$ref\": \"#/components/schemas/IBasicContact\"\n }\n },\n \"required\": [\"party\"]\n },\n \"IGetIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identityId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identityId\"]\n },\n \"IGetIdentitiesArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IAddIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identity\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"required\": [\"identity\"]\n },\n \"IRemoveIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identityId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identityId\"]\n },\n \"IUpdateIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identity\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"required\": [\"identity\"]\n },\n \"IBasicContact\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"identities\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IBasicIdentity\"\n }\n }\n },\n \"required\": [\"name\", \"alias\"]\n },\n \"IContact\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"identities\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"alias\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"IMetadataItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"label\", \"value\"]\n },\n \"BasicMetadataItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"label\", \"value\"]\n },\n \"IBasicIdentity\": {\n \"type\": \"object\",\n \"properties\": {\n \"alias\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/BasicCorrelationIdentifier\"\n },\n \"connection\": {\n \"$ref\": \"#/components/schemas/IBasicConnection\"\n },\n \"metadata\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IMetadataItem\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"alias\", \"identifier\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"IIdentity\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/ICorrelationIdentifier\"\n },\n \"connection\": {\n \"$ref\": \"#/components/schemas/IConnection\"\n },\n \"metadata\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IMetadataItem\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"alias\", \"identifier\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"CorrelationIdentifierEnum\": {\n \"type\": \"string\",\n \"enum\": [\"did\", \"url\"]\n },\n \"BasicCorrelationIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"$ref\": \"#/components/schemas/CorrelationIdentifierEnum\"\n },\n \"correlationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"type\", \"correlationId\"]\n },\n \"ICorrelationIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/CorrelationIdentifierEnum\"\n },\n \"correlationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"type\", \"correlationId\"]\n },\n \"ConnectionTypeEnum\": {\n \"type\": \"string\",\n \"enum\": [\"openid\", \"didauth\", \"siopv2+oidc4vp\"]\n },\n \"IBasicConnection\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"$ref\": \"#/components/schemas/ConnectionTypeEnum\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/BasicConnectionConfig\"\n }\n },\n \"required\": [\"type\", \"config\"]\n },\n \"IConnection\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/ConnectionTypeEnum\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/ConnectionConfig\"\n }\n },\n \"required\": [\"id\", \"type\", \"config\"]\n },\n \"BasicConnectionConfig\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/BasicDidAuthConfig\"\n },\n {\n \"$ref\": \"#/components/schemas/BasicOpenIdConfig\"\n }\n ]\n },\n \"ConnectionConfig\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IOpenIdConfig\"\n },\n {\n \"$ref\": \"#/components/schemas/IDidAuthConfig\"\n }\n ]\n },\n \"BasicDidAuthConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"identifier\": {\n \"$ref\": \"#/components/schemas/IIdentifier\"\n },\n \"stateId\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identifier\", \"stateId\", \"redirectUrl\", \"sessionId\"]\n },\n \"BasicOpenIdConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"clientId\": {\n \"type\": \"string\"\n },\n \"clientSecret\": {\n \"type\": \"string\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"issuer\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"dangerouslyAllowInsecureHttpRequests\": {\n \"type\": \"boolean\"\n },\n \"clientAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"basic\", \"post\"]\n }\n },\n \"required\": [\"clientId\", \"clientSecret\", \"scopes\", \"issuer\", \"redirectUrl\", \"dangerouslyAllowInsecureHttpRequests\"]\n },\n \"IOpenIdConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"clientId\": {\n \"type\": \"string\"\n },\n \"clientSecret\": {\n \"type\": \"string\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"issuer\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"dangerouslyAllowInsecureHttpRequests\": {\n \"type\": \"boolean\"\n },\n \"clientAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"basic\", \"post\"]\n }\n },\n \"required\": [\"id\", \"clientId\", \"clientSecret\", \"scopes\", \"issuer\", \"redirectUrl\", \"dangerouslyAllowInsecureHttpRequests\"]\n },\n \"IDidAuthConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/IIdentifier\"\n },\n \"stateId\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"identifier\", \"stateId\", \"redirectUrl\", \"sessionId\"]\n },\n \"IIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"did\": {\n \"type\": \"string\",\n \"description\": \"Decentralized identifier\"\n },\n \"alias\": {\n \"type\": \"string\",\n \"description\": \"Optional. Identifier alias. Can be used to reference an object in an external system\"\n },\n \"provider\": {\n \"type\": \"string\",\n \"description\": \"Identifier provider name\"\n },\n \"controllerKeyId\": {\n \"type\": \"string\",\n \"description\": \"Controller key id\"\n },\n \"keys\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IKey\"\n },\n \"description\": \"Array of managed keys\"\n },\n \"services\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IService\"\n },\n \"description\": \"Array of services\"\n }\n },\n \"required\": [\"did\", \"provider\", \"keys\", \"services\"],\n \"description\": \"Identifier interface\"\n },\n \"IKey\": {\n \"type\": \"object\",\n \"properties\": {\n \"kid\": {\n \"type\": \"string\",\n \"description\": \"Key ID\"\n },\n \"kms\": {\n \"type\": \"string\",\n \"description\": \"Key Management System\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/TKeyType\",\n \"description\": \"Key type\"\n },\n \"publicKeyHex\": {\n \"type\": \"string\",\n \"description\": \"Public key\"\n },\n \"privateKeyHex\": {\n \"type\": \"string\",\n \"description\": \"Optional. Private key\"\n },\n \"meta\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/KeyMetadata\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"Optional. Key metadata. This should be used to determine which algorithms are supported.\"\n }\n },\n \"required\": [\"kid\", \"kms\", \"type\", \"publicKeyHex\"],\n \"description\": \"Cryptographic key\"\n },\n \"TKeyType\": {\n \"type\": \"string\",\n \"enum\": [\"Ed25519\", \"Secp256k1\", \"Secp256r1\", \"X25519\", \"Bls12381G1\", \"Bls12381G2\", \"RSA\"],\n \"description\": \"Cryptographic key type.\"\n },\n \"KeyMetadata\": {\n \"type\": \"object\",\n \"properties\": {\n \"algorithms\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"This encapsulates data about a key.\\n\\nImplementations of {@link @veramo/key-manager#AbstractKeyManagementSystem | AbstractKeyManagementSystem } should populate this object, for each key, with the algorithms that can be performed using it.\\n\\nThis can also be used to add various tags to the keys under management.\"\n },\n \"IService\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"ID\"\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"Service type\"\n },\n \"serviceEndpoint\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IServiceEndpoint\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IServiceEndpoint\"\n }\n }\n ],\n \"description\": \"Endpoint URL\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Optional. Description\"\n }\n },\n \"required\": [\"id\", \"type\", \"serviceEndpoint\"],\n \"description\": \"Identifier service\"\n },\n \"IServiceEndpoint\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\"\n }\n ],\n \"description\": \"Represents a service endpoint URL or a map of URLs\"\n }\n },\n \"methods\": {\n \"cmGetContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmGetContacts\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetContactsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n }\n },\n \"cmAddContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmRemoveContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveContactArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"cmUpdateContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmGetIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIdentityArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"cmGetIdentities\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIdentitiesArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n }\n },\n \"cmAddIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddIdentityArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"cmRemoveIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveIdentityArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"cmUpdateIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateConnectionArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n }\n }\n }\n }\n}\n","import {\n AbstractContactStore,\n BaseContactEntity,\n ElectronicAddress,\n Identity,\n NonPersistedContact,\n Party as Contact,\n PartyRelationship as ContactRelationship,\n PartyType as ContactType,\n PhysicalAddress,\n isNaturalPerson,\n isOrganization,\n} from '@sphereon/ssi-sdk.data-store'\nimport { IAgentPlugin } from '@veramo/core'\nimport { schema } from '../index'\nimport {\n AddContactArgs,\n AddContactTypeArgs,\n AddElectronicAddressArgs,\n AddIdentityArgs,\n AddPhysicalAddressArgs,\n AddRelationshipArgs,\n GetContactArgs,\n GetContactTypeArgs,\n GetContactTypesArgs,\n GetContactsArgs,\n GetElectronicAddressArgs,\n GetElectronicAddressesArgs,\n GetIdentitiesArgs,\n GetIdentityArgs,\n GetPhysicalAddressArgs,\n GetPhysicalAddressesArgs,\n GetRelationshipArgs,\n GetRelationshipsArgs,\n IContactManager,\n RemoveContactArgs,\n RemoveContactTypeArgs,\n RemoveElectronicAddressArgs,\n RemoveIdentityArgs,\n RemovePhysicalAddressArgs,\n RemoveRelationshipArgs,\n RequiredContext,\n UpdateContactArgs,\n UpdateContactTypeArgs,\n UpdateElectronicAddressArgs,\n UpdateIdentityArgs,\n UpdatePhysicalAddressArgs,\n UpdateRelationshipArgs,\n} from '../types/IContactManager'\n\n// Exposing the methods here for any REST implementation\nexport const contactManagerMethods: Array<string> = [\n 'cmGetContact',\n 'cmGetContacts',\n 'cmAddContact',\n 'cmUpdateContact',\n 'cmRemoveContact',\n 'cmGetIdentity',\n 'cmGetIdentities',\n 'cmAddIdentity',\n 'cmUpdateIdentity',\n 'cmRemoveIdentity',\n 'cmAddRelationship',\n 'cmRemoveRelationship',\n 'cmGetRelationship',\n 'cmGetRelationships',\n 'cmUpdateRelationship',\n 'cmGetContactType',\n 'cmGetContactTypes',\n 'cmAddContactType',\n 'cmUpdateContactType',\n 'cmRemoveContactType',\n 'cmGetElectronicAddress',\n 'cmGetElectronicAddresses',\n 'cmAddElectronicAddress',\n 'cmUpdateElectronicAddress',\n 'cmRemoveElectronicAddress',\n 'cmGetPhysicalAddress',\n 'cmGetPhysicalAddresses',\n 'cmAddPhysicalAddress',\n 'cmUpdatePhysicalAddress',\n 'cmRemovePhysicalAddress',\n]\n\n/**\n * {@inheritDoc IContactManager}\n */\nexport class ContactManager implements IAgentPlugin {\n readonly schema = schema.IContactManager\n readonly methods: IContactManager = {\n cmGetContact: this.cmGetContact.bind(this),\n cmGetContacts: this.cmGetContacts.bind(this),\n cmAddContact: this.cmAddContact.bind(this),\n cmUpdateContact: this.cmUpdateContact.bind(this),\n cmRemoveContact: this.cmRemoveContact.bind(this),\n cmGetIdentity: this.cmGetIdentity.bind(this),\n cmGetIdentities: this.cmGetIdentities.bind(this),\n cmAddIdentity: this.cmAddIdentity.bind(this),\n cmUpdateIdentity: this.cmUpdateIdentity.bind(this),\n cmRemoveIdentity: this.cmRemoveIdentity.bind(this),\n cmAddRelationship: this.cmAddRelationship.bind(this),\n cmRemoveRelationship: this.cmRemoveRelationship.bind(this),\n cmGetRelationship: this.cmGetRelationship.bind(this),\n cmGetRelationships: this.cmGetRelationships.bind(this),\n cmUpdateRelationship: this.cmUpdateRelationship.bind(this),\n cmGetContactType: this.cmGetContactType.bind(this),\n cmGetContactTypes: this.cmGetContactTypes.bind(this),\n cmAddContactType: this.cmAddContactType.bind(this),\n cmUpdateContactType: this.cmUpdateContactType.bind(this),\n cmRemoveContactType: this.cmRemoveContactType.bind(this),\n cmGetElectronicAddress: this.cmGetElectronicAddress.bind(this),\n cmGetElectronicAddresses: this.cmGetElectronicAddresses.bind(this),\n cmAddElectronicAddress: this.cmAddElectronicAddress.bind(this),\n cmUpdateElectronicAddress: this.cmUpdateElectronicAddress.bind(this),\n cmRemoveElectronicAddress: this.cmRemoveElectronicAddress.bind(this),\n cmGetPhysicalAddress: this.cmGetPhysicalAddress.bind(this),\n cmGetPhysicalAddresses: this.cmGetPhysicalAddresses.bind(this),\n cmAddPhysicalAddress: this.cmAddPhysicalAddress.bind(this),\n cmUpdatePhysicalAddress: this.cmUpdatePhysicalAddress.bind(this),\n cmRemovePhysicalAddress: this.cmRemovePhysicalAddress.bind(this),\n }\n\n private readonly store: AbstractContactStore\n\n constructor(options: { store: AbstractContactStore }) {\n this.store = options.store\n }\n\n /** {@inheritDoc IContactManager.cmGetContact} */\n private async cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact> {\n const { contactId } = args\n return this.store.getParty({ partyId: contactId })\n }\n\n /** {@inheritDoc IContactManager.cmGetContacts} */\n private async cmGetContacts(args?: GetContactsArgs): Promise<Array<Contact>> {\n return this.store.getParties(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddContact} */\n private async cmAddContact(args: AddContactArgs, context: RequiredContext): Promise<Contact> {\n const { uri, contactType, identities, electronicAddresses, physicalAddresses } = args\n\n return this.store.addParty({\n uri,\n partyType: contactType,\n contact: this.getContactInformationFrom(args),\n identities,\n electronicAddresses,\n physicalAddresses,\n })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateContact} */\n private async cmUpdateContact(args: UpdateContactArgs, context: RequiredContext): Promise<Contact> {\n const { contact } = args\n return this.store.updateParty({ party: contact })\n }\n\n /** {@inheritDoc IContactManager.cmRemoveContact} */\n private async cmRemoveContact(args: RemoveContactArgs, context: RequiredContext): Promise<boolean> {\n const { contactId } = args\n return this.store.removeParty({ partyId: contactId }).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetIdentity} */\n private async cmGetIdentity(args: GetIdentityArgs, context: RequiredContext): Promise<Identity> {\n return this.store.getIdentity(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetIdentities} */\n private async cmGetIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>> {\n return this.store.getIdentities(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddIdentity} */\n private async cmAddIdentity(args: AddIdentityArgs, context: RequiredContext): Promise<Identity> {\n const { contactId, identity } = args\n return this.store.addIdentity({ partyId: contactId, identity })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateIdentity} */\n private async cmUpdateIdentity(args: UpdateIdentityArgs, context: RequiredContext): Promise<Identity> {\n return this.store.updateIdentity(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveIdentity} */\n private async cmRemoveIdentity(args: RemoveIdentityArgs, context: RequiredContext): Promise<boolean> {\n return this.store.removeIdentity(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmAddRelationship} */\n private async cmAddRelationship(args: AddRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.addRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveRelationship} */\n private async cmRemoveRelationship(args: RemoveRelationshipArgs, context: RequiredContext): Promise<boolean> {\n return this.store.removeRelationship(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetRelationship} */\n private async cmGetRelationship(args: GetRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.getRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetRelationships} */\n private async cmGetRelationships(args?: GetRelationshipsArgs): Promise<Array<ContactRelationship>> {\n return this.store.getRelationships(args)\n }\n\n /** {@inheritDoc IContactManager.cmUpdateRelationship} */\n private async cmUpdateRelationship(args: UpdateRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.updateRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetContactType} */\n private async cmGetContactType(args: GetContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n const { contactTypeId } = args\n return this.store.getPartyType({ partyTypeId: contactTypeId })\n }\n\n /** {@inheritDoc IContactManager.cmGetContactTypes} */\n private async cmGetContactTypes(args?: GetContactTypesArgs): Promise<Array<ContactType>> {\n return this.store.getPartyTypes(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddContactType} */\n private async cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n return this.store.addPartyType(args)\n }\n\n /** {@inheritDoc IContactManager.cmUpdateContactType} */\n private async cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n const { contactType } = args\n return this.store.updatePartyType({ partyType: contactType })\n }\n\n /** {@inheritDoc IContactManager.cmRemoveContactType} */\n private async cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean> {\n const { contactTypeId } = args\n return this.store.removePartyType({ partyTypeId: contactTypeId }).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetElectronicAddress} */\n private async cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress> {\n return this.store.getElectronicAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetElectronicAddresses} */\n private async cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>> {\n return this.store.getElectronicAddresses(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddElectronicAddress} */\n private async cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress> {\n const { contactId, electronicAddress } = args\n return this.store.addElectronicAddress({ partyId: contactId, electronicAddress })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateElectronicAddress} */\n private async cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress> {\n return this.store.updateElectronicAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveElectronicAddress} */\n private async cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean> {\n return this.store.removeElectronicAddress(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetPhysicalAddress} */\n private async cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress> {\n return this.store.getPhysicalAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetPhysicalAddresses} */\n private async cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>> {\n return this.store.getPhysicalAddresses(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddPhysicalAddress} */\n private async cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress> {\n const { contactId, physicalAddress } = args\n return this.store.addPhysicalAddress({ partyId: contactId, physicalAddress })\n }\n\n /** {@inheritDoc IContactManager.cmUpdatePhysicalAddress} */\n private async cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress> {\n return this.store.updatePhysicalAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemovePhysicalAddress} */\n private async cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean> {\n return this.store.removePhysicalAddress(args).then((): boolean => true)\n }\n\n private getContactInformationFrom(contact: NonPersistedContact | BaseContactEntity): NonPersistedContact {\n if (isNaturalPerson(contact)) {\n return { firstName: contact.firstName, middleName: contact.middleName, lastName: contact.lastName, displayName: contact.displayName }\n } else if (isOrganization(contact)) {\n return { legalName: contact.legalName, displayName: contact.displayName }\n }\n\n throw new Error('Contact not supported')\n }\n}\n","import { contextHasPlugin } from '@sphereon/ssi-sdk.agent-config'\nimport { IAgentContext, IPluginMethodMap } from '@veramo/core'\nimport {\n ElectronicAddress,\n FindElectronicAddressArgs,\n FindIdentityArgs,\n FindPartyArgs as FindContactArgs,\n FindPartyTypeArgs as FindContactTypeArgs,\n FindPhysicalAddressArgs,\n FindRelationshipArgs,\n Identity,\n NonPersistedContact,\n NonPersistedElectronicAddress,\n NonPersistedIdentity,\n NonPersistedParty,\n NonPersistedPartyType as NonPersistedContactType,\n NonPersistedPhysicalAddress,\n Party as Contact,\n PartyOrigin,\n PartyRelationship as ContactRelationship,\n PartyType as ContactType,\n PartyTypeType as ContactTypeType,\n PhysicalAddress,\n} from '@sphereon/ssi-sdk.data-store'\n\nexport interface IContactManager extends IPluginMethodMap {\n cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact>\n cmGetContacts(args?: GetContactsArgs): Promise<Array<Contact>>\n cmAddContact(args: AddContactArgs, context: RequiredContext): Promise<Contact>\n cmUpdateContact(args: UpdateContactArgs, context: RequiredContext): Promise<Contact>\n cmRemoveContact(args: RemoveContactArgs, context: RequiredContext): Promise<boolean>\n cmGetIdentity(args: GetIdentityArgs, context: RequiredContext): Promise<Identity>\n cmGetIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>>\n cmAddIdentity(args: AddIdentityArgs, context: RequiredContext): Promise<Identity>\n cmUpdateIdentity(args: UpdateIdentityArgs, context: RequiredContext): Promise<Identity>\n cmRemoveIdentity(args: RemoveIdentityArgs, context: RequiredContext): Promise<boolean>\n cmGetRelationship(args: GetRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmGetRelationships(args?: GetRelationshipsArgs): Promise<Array<ContactRelationship>>\n cmUpdateRelationship(args: UpdateRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmAddRelationship(args: AddRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmRemoveRelationship(args: RemoveRelationshipArgs, context: RequiredContext): Promise<boolean>\n cmGetContactType(args: GetContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmGetContactTypes(args?: GetContactTypesArgs): Promise<Array<ContactType>>\n cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean>\n cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress>\n cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>>\n cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress>\n cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress>\n cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean>\n cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress>\n cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>>\n cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress>\n cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress>\n cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean>\n}\n\nexport function contextHasContactManager(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<IContactManager> {\n return contextHasPlugin(context, 'cmGetContact')\n}\n\nexport type GetContactArgs = {\n contactId: string\n}\n\nexport type GetContactsArgs = {\n filter?: FindContactArgs\n}\n\nexport type AddContactArgs = Omit<NonPersistedParty, 'contact' | 'partyType'> &\n NonPersistedContact & {\n contactType: NonPersistedContactType\n }\n\nexport type UpdateContactArgs = {\n contact: Contact\n}\n\nexport type RemoveContactArgs = {\n contactId: string\n}\n\nexport type GetIdentityArgs = {\n identityId: string\n}\n\nexport type GetIdentitiesArgs = {\n filter?: FindIdentityArgs\n}\n\nexport type AddIdentityArgs = {\n contactId: string\n identity: NonPersistedIdentity\n}\n\nexport type UpdateIdentityArgs = {\n identity: Identity\n}\n\nexport type RemoveIdentityArgs = {\n identityId: string\n}\n\nexport type AddRelationshipArgs = {\n leftId: string\n rightId: string\n}\n\nexport type RemoveRelationshipArgs = {\n relationshipId: string\n}\n\nexport type GetRelationshipArgs = {\n relationshipId: string\n}\n\nexport type GetRelationshipsArgs = {\n filter: FindRelationshipArgs\n}\n\nexport type UpdateRelationshipArgs = {\n relationship: Omit<ContactRelationship, 'createdAt' | 'lastUpdatedAt'>\n}\n\nexport type AddContactTypeArgs = {\n type: ContactTypeType\n origin: PartyOrigin\n name: string\n tenantId: string\n description?: string\n}\n\nexport type GetContactTypeArgs = {\n contactTypeId: string\n}\n\nexport type GetContactTypesArgs = {\n filter?: FindContactTypeArgs\n}\n\nexport type UpdateContactTypeArgs = {\n contactType: Omit<ContactType, 'createdAt' | 'lastUpdatedAt'>\n}\n\nexport type RemoveContactTypeArgs = {\n contactTypeId: string\n}\n\nexport type GetElectronicAddressArgs = {\n electronicAddressId: string\n}\n\nexport type GetElectronicAddressesArgs = {\n filter?: FindElectronicAddressArgs\n}\n\nexport type AddElectronicAddressArgs = {\n contactId: string\n electronicAddress: NonPersistedElectronicAddress\n}\n\nexport type UpdateElectronicAddressArgs = {\n electronicAddress: ElectronicAddress\n}\n\nexport type RemoveElectronicAddressArgs = {\n electronicAddressId: string\n}\n\nexport type GetPhysicalAddressArgs = {\n physicalAddressId: string\n}\n\nexport type GetPhysicalAddressesArgs = {\n filter?: FindPhysicalAddressArgs\n}\n\nexport type AddPhysicalAddressArgs = {\n contactId: string\n physicalAddress: NonPersistedPhysicalAddress\n}\n\nexport type UpdatePhysicalAddressArgs = {\n physicalAddress: PhysicalAddress\n}\n\nexport type RemovePhysicalAddressArgs = {\n physicalAddressId: string\n}\n\nexport type RequiredContext = IAgentContext<never>\n","/**\n * @public\n */\nconst schema = require('../plugin.schema.json')\nexport { schema }\nexport { ContactManager, contactManagerMethods } from './agent/ContactManager'\nexport * from './types/IContactManager'\n"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,iBAAmB;AAAA,QACjB,YAAc;AAAA,UACZ,SAAW;AAAA,YACT,iBAAmB;AAAA,cACjB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,WAAa;AAAA,kBACX,MAAQ;AAAA,gBACV;AAAA,cACF;AAAA,cACA,UAAY,CAAC,WAAW;AAAA,YAC1B;AAAA,YACA,kBAAoB;AAAA,cAClB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,QAAU;AAAA,kBACR,MAAQ;AAAA,kBACR,OAAS;AAAA,oBACP,MAAQ;AAAA,kBACV;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,YACA,iBAAmB;AAAA,cACjB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,SAAW;AAAA,kBACT,MAAQ;AAAA,gBACV;AAAA,cACF;AAAA,cACA,UAAY,CAAC,OAAO;AAAA,YACtB;AAAA,YACA,oBAAsB;AAAA,cACpB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,WAAa;AAAA,kBACX,MAAQ;AAAA,gBACV;AAAA,cACF;AAAA,cACA,UAAY,CAAC,WAAW;AAAA,YAC1B;AAAA,YACA,oBAAsB;AAAA,cACpB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,SAAW;AAAA,kBACT,MAAQ;AAAA,gBACV;AAAA,cACF;AAAA,cACA,UAAY,CAAC,OAAO;AAAA,YACtB;AAAA,YACA,kBAAoB;AAAA,cAClB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,YAAc;AAAA,kBACZ,MAAQ;AAAA,gBACV;AAAA,cACF;AAAA,c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AAA;EAClB;AACF;;;ACjTA,SAASC,wBAAwB;AA0D1B,SAASC,yBAAyBC,SAAwC;AAC/E,SAAOC,iBAAiBD,SAAS,cAAA;AACnC;AAFgBD;;;ACvDhB,IAAMG,SAASC;","names":["isNaturalPerson","isOrganization","contactManagerMethods","ContactManager","schema","IContactManager","methods","cmGetContact","bind","cmGetContacts","cmAddContact","cmUpdateContact","cmRemoveContact","cmGetIdentity","cmGetIdentities","cmAddIdentity","cmUpdateIdentity","cmRemoveIdentity","cmAddRelationship","cmRemoveRelationship","cmGetRelationship","cmGetRelationships","cmUpdateRelationship","cmGetContactType","cmGetContactTypes","cmAddContactType","cmUpdateContactType","cmRemoveContactType","cmGetElectronicAddress","cmGetElectronicAddresses","cmAddElectronicAddress","cmUpdateElectronicAddress","cmRemoveElectronicAddress","cmGetPhysicalAddress","cmGetPhysicalAddresses","cmAddPhysicalAddress","cmUpdatePhysicalAddress","cmRemovePhysicalAddress","store","options","args","context","contactId","getParty","partyId","getParties","uri","contactType","identities","electronicAddresses","physicalAddresses","addParty","partyType","contact","getContactInformationFrom","updateParty","party","removeParty","then","getIdentity","getIdentities","identity","addIdentity","updateIdentity","removeIdentity","addRelationship","removeRelationship","getRelationship","getRelationships","updateRelationship","contactTypeId","getPartyType","partyTypeId","getPartyTypes","addPartyType","updatePartyType","removePartyType","getElectronicAddress","getElectronicAddresses","electronicAddress","addElectronicAddress","updateElectronicAddress","removeElectronicAddress","getPhysicalAddress","getPhysicalAddresses","physicalAddress","addPhysicalAddress","updatePhysicalAddress","removePhysicalAddress","isNaturalPerson","firstName","middleName","lastName","displayName","isOrganization","legalName","Error","contextHasPlugin","contextHasContactManager","context","contextHasPlugin","schema","require"]}
|
|
1
|
+
{"version":3,"sources":["../plugin.schema.json","../src/agent/ContactManager.ts","../src/types/IContactManager.ts","../src/index.ts"],"sourcesContent":["{\n \"IContactManager\": {\n \"components\": {\n \"schemas\": {\n \"IGetContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IGetContactsArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"IAddContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contact\": {\n \"$ref\": \"#/components/schemas/IBasicContact\"\n }\n },\n \"required\": [\"party\"]\n },\n \"IRemoveContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IUpdateContactArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contact\": {\n \"$ref\": \"#/components/schemas/IBasicContact\"\n }\n },\n \"required\": [\"party\"]\n },\n \"IGetIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identityId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identityId\"]\n },\n \"IGetIdentitiesArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"contactId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"contactId\"]\n },\n \"IAddIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identity\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"required\": [\"identity\"]\n },\n \"IRemoveIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identityId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identityId\"]\n },\n \"IUpdateIdentityArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"identity\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"required\": [\"identity\"]\n },\n \"IBasicContact\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"identities\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IBasicIdentity\"\n }\n }\n },\n \"required\": [\"name\", \"alias\"]\n },\n \"IContact\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"identities\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"name\", \"alias\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"IMetadataItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"label\", \"value\"]\n },\n \"BasicMetadataItem\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"label\", \"value\"]\n },\n \"IBasicIdentity\": {\n \"type\": \"object\",\n \"properties\": {\n \"alias\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/BasicCorrelationIdentifier\"\n },\n \"connection\": {\n \"$ref\": \"#/components/schemas/IBasicConnection\"\n },\n \"metadata\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IMetadataItem\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"alias\", \"identifier\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"IIdentity\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/ICorrelationIdentifier\"\n },\n \"connection\": {\n \"$ref\": \"#/components/schemas/IConnection\"\n },\n \"metadata\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IMetadataItem\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"alias\", \"identifier\", \"createdAt\", \"lastUpdatedAt\"]\n },\n \"CorrelationIdentifierEnum\": {\n \"type\": \"string\",\n \"enum\": [\"did\", \"url\"]\n },\n \"BasicCorrelationIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"$ref\": \"#/components/schemas/CorrelationIdentifierEnum\"\n },\n \"correlationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"type\", \"correlationId\"]\n },\n \"ICorrelationIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/CorrelationIdentifierEnum\"\n },\n \"correlationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"type\", \"correlationId\"]\n },\n \"ConnectionTypeEnum\": {\n \"type\": \"string\",\n \"enum\": [\"openid\", \"didauth\", \"siopv2+oidc4vp\"]\n },\n \"IBasicConnection\": {\n \"type\": \"object\",\n \"properties\": {\n \"type\": {\n \"$ref\": \"#/components/schemas/ConnectionTypeEnum\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/BasicConnectionConfig\"\n }\n },\n \"required\": [\"type\", \"config\"]\n },\n \"IConnection\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/ConnectionTypeEnum\"\n },\n \"config\": {\n \"$ref\": \"#/components/schemas/ConnectionConfig\"\n }\n },\n \"required\": [\"id\", \"type\", \"config\"]\n },\n \"BasicConnectionConfig\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/BasicDidAuthConfig\"\n },\n {\n \"$ref\": \"#/components/schemas/BasicOpenIdConfig\"\n }\n ]\n },\n \"ConnectionConfig\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IOpenIdConfig\"\n },\n {\n \"$ref\": \"#/components/schemas/IDidAuthConfig\"\n }\n ]\n },\n \"BasicDidAuthConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"identifier\": {\n \"$ref\": \"#/components/schemas/IIdentifier\"\n },\n \"stateId\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"identifier\", \"stateId\", \"redirectUrl\", \"sessionId\"]\n },\n \"BasicOpenIdConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"clientId\": {\n \"type\": \"string\"\n },\n \"clientSecret\": {\n \"type\": \"string\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"issuer\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"dangerouslyAllowInsecureHttpRequests\": {\n \"type\": \"boolean\"\n },\n \"clientAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"basic\", \"post\"]\n }\n },\n \"required\": [\"clientId\", \"clientSecret\", \"scopes\", \"issuer\", \"redirectUrl\", \"dangerouslyAllowInsecureHttpRequests\"]\n },\n \"IOpenIdConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"clientId\": {\n \"type\": \"string\"\n },\n \"clientSecret\": {\n \"type\": \"string\"\n },\n \"scopes\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"issuer\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"dangerouslyAllowInsecureHttpRequests\": {\n \"type\": \"boolean\"\n },\n \"clientAuthMethod\": {\n \"type\": \"string\",\n \"enum\": [\"basic\", \"post\"]\n }\n },\n \"required\": [\"id\", \"clientId\", \"clientSecret\", \"scopes\", \"issuer\", \"redirectUrl\", \"dangerouslyAllowInsecureHttpRequests\"]\n },\n \"IDidAuthConfig\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"identifier\": {\n \"$ref\": \"#/components/schemas/IIdentifier\"\n },\n \"stateId\": {\n \"type\": \"string\"\n },\n \"redirectUrl\": {\n \"type\": \"string\"\n },\n \"sessionId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"identifier\", \"stateId\", \"redirectUrl\", \"sessionId\"]\n },\n \"IIdentifier\": {\n \"type\": \"object\",\n \"properties\": {\n \"did\": {\n \"type\": \"string\",\n \"description\": \"Decentralized identifier\"\n },\n \"alias\": {\n \"type\": \"string\",\n \"description\": \"Optional. Identifier alias. Can be used to reference an object in an external system\"\n },\n \"provider\": {\n \"type\": \"string\",\n \"description\": \"Identifier provider name\"\n },\n \"controllerKeyId\": {\n \"type\": \"string\",\n \"description\": \"Controller key id\"\n },\n \"keys\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IKey\"\n },\n \"description\": \"Array of managed keys\"\n },\n \"services\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IService\"\n },\n \"description\": \"Array of services\"\n }\n },\n \"required\": [\"did\", \"provider\", \"keys\", \"services\"],\n \"description\": \"Identifier interface\"\n },\n \"IKey\": {\n \"type\": \"object\",\n \"properties\": {\n \"kid\": {\n \"type\": \"string\",\n \"description\": \"Key ID\"\n },\n \"kms\": {\n \"type\": \"string\",\n \"description\": \"Key Management System\"\n },\n \"type\": {\n \"$ref\": \"#/components/schemas/TKeyType\",\n \"description\": \"Key type\"\n },\n \"publicKeyHex\": {\n \"type\": \"string\",\n \"description\": \"Public key\"\n },\n \"privateKeyHex\": {\n \"type\": \"string\",\n \"description\": \"Optional. Private key\"\n },\n \"meta\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/KeyMetadata\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"description\": \"Optional. Key metadata. This should be used to determine which algorithms are supported.\"\n }\n },\n \"required\": [\"kid\", \"kms\", \"type\", \"publicKeyHex\"],\n \"description\": \"Cryptographic key\"\n },\n \"TKeyType\": {\n \"type\": \"string\",\n \"enum\": [\"Ed25519\", \"Secp256k1\", \"Secp256r1\", \"X25519\", \"Bls12381G1\", \"Bls12381G2\", \"RSA\"],\n \"description\": \"Cryptographic key type.\"\n },\n \"KeyMetadata\": {\n \"type\": \"object\",\n \"properties\": {\n \"algorithms\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"This encapsulates data about a key.\\n\\nImplementations of {@link @veramo/key-manager#AbstractKeyManagementSystem | AbstractKeyManagementSystem } should populate this object, for each key, with the algorithms that can be performed using it.\\n\\nThis can also be used to add various tags to the keys under management.\"\n },\n \"IService\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"description\": \"ID\"\n },\n \"type\": {\n \"type\": \"string\",\n \"description\": \"Service type\"\n },\n \"serviceEndpoint\": {\n \"anyOf\": [\n {\n \"$ref\": \"#/components/schemas/IServiceEndpoint\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IServiceEndpoint\"\n }\n }\n ],\n \"description\": \"Endpoint URL\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Optional. Description\"\n }\n },\n \"required\": [\"id\", \"type\", \"serviceEndpoint\"],\n \"description\": \"Identifier service\"\n },\n \"IServiceEndpoint\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\"\n }\n ],\n \"description\": \"Represents a service endpoint URL or a map of URLs\"\n }\n },\n \"methods\": {\n \"cmGetContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmGetContacts\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetContactsArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n }\n },\n \"cmAddContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmRemoveContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveContactArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"cmUpdateContact\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateContactArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IContact\"\n }\n },\n \"cmGetIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIdentityArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"cmGetIdentities\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIdentitiesArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n }\n },\n \"cmAddIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddIdentityArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n },\n \"cmRemoveIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveIdentityArgs\"\n },\n \"returnType\": {\n \"type\": \"boolean\"\n }\n },\n \"cmUpdateIdentity\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateConnectionArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIdentity\"\n }\n }\n }\n }\n }\n}\n","import {\n AbstractContactStore,\n ElectronicAddress,\n Identity,\n NonPersistedContact,\n Party as Contact,\n PartyRelationship as ContactRelationship,\n PartyType as ContactType,\n PhysicalAddress,\n} from '@sphereon/ssi-sdk.data-store-types'\nimport { BaseContactEntity, isNaturalPerson, isOrganization } from '@sphereon/ssi-sdk.data-store'\n\nimport { IAgentPlugin } from '@veramo/core'\nimport { schema } from '../index'\nimport {\n AddContactArgs,\n AddContactTypeArgs,\n AddElectronicAddressArgs,\n AddIdentityArgs,\n AddPhysicalAddressArgs,\n AddRelationshipArgs,\n GetContactArgs,\n GetContactTypeArgs,\n GetContactTypesArgs,\n GetContactsArgs,\n GetElectronicAddressArgs,\n GetElectronicAddressesArgs,\n GetIdentitiesArgs,\n GetIdentityArgs,\n GetPhysicalAddressArgs,\n GetPhysicalAddressesArgs,\n GetRelationshipArgs,\n GetRelationshipsArgs,\n IContactManager,\n RemoveContactArgs,\n RemoveContactTypeArgs,\n RemoveElectronicAddressArgs,\n RemoveIdentityArgs,\n RemovePhysicalAddressArgs,\n RemoveRelationshipArgs,\n RequiredContext,\n UpdateContactArgs,\n UpdateContactTypeArgs,\n UpdateElectronicAddressArgs,\n UpdateIdentityArgs,\n UpdatePhysicalAddressArgs,\n UpdateRelationshipArgs,\n} from '../types/IContactManager'\n\n// Exposing the methods here for any REST implementation\nexport const contactManagerMethods: Array<string> = [\n 'cmGetContact',\n 'cmGetContacts',\n 'cmAddContact',\n 'cmUpdateContact',\n 'cmRemoveContact',\n 'cmGetIdentity',\n 'cmGetIdentities',\n 'cmAddIdentity',\n 'cmUpdateIdentity',\n 'cmRemoveIdentity',\n 'cmAddRelationship',\n 'cmRemoveRelationship',\n 'cmGetRelationship',\n 'cmGetRelationships',\n 'cmUpdateRelationship',\n 'cmGetContactType',\n 'cmGetContactTypes',\n 'cmAddContactType',\n 'cmUpdateContactType',\n 'cmRemoveContactType',\n 'cmGetElectronicAddress',\n 'cmGetElectronicAddresses',\n 'cmAddElectronicAddress',\n 'cmUpdateElectronicAddress',\n 'cmRemoveElectronicAddress',\n 'cmGetPhysicalAddress',\n 'cmGetPhysicalAddresses',\n 'cmAddPhysicalAddress',\n 'cmUpdatePhysicalAddress',\n 'cmRemovePhysicalAddress',\n]\n\n/**\n * {@inheritDoc IContactManager}\n */\nexport class ContactManager implements IAgentPlugin {\n readonly schema = schema.IContactManager\n readonly methods: IContactManager = {\n cmGetContact: this.cmGetContact.bind(this),\n cmGetContacts: this.cmGetContacts.bind(this),\n cmAddContact: this.cmAddContact.bind(this),\n cmUpdateContact: this.cmUpdateContact.bind(this),\n cmRemoveContact: this.cmRemoveContact.bind(this),\n cmGetIdentity: this.cmGetIdentity.bind(this),\n cmGetIdentities: this.cmGetIdentities.bind(this),\n cmAddIdentity: this.cmAddIdentity.bind(this),\n cmUpdateIdentity: this.cmUpdateIdentity.bind(this),\n cmRemoveIdentity: this.cmRemoveIdentity.bind(this),\n cmAddRelationship: this.cmAddRelationship.bind(this),\n cmRemoveRelationship: this.cmRemoveRelationship.bind(this),\n cmGetRelationship: this.cmGetRelationship.bind(this),\n cmGetRelationships: this.cmGetRelationships.bind(this),\n cmUpdateRelationship: this.cmUpdateRelationship.bind(this),\n cmGetContactType: this.cmGetContactType.bind(this),\n cmGetContactTypes: this.cmGetContactTypes.bind(this),\n cmAddContactType: this.cmAddContactType.bind(this),\n cmUpdateContactType: this.cmUpdateContactType.bind(this),\n cmRemoveContactType: this.cmRemoveContactType.bind(this),\n cmGetElectronicAddress: this.cmGetElectronicAddress.bind(this),\n cmGetElectronicAddresses: this.cmGetElectronicAddresses.bind(this),\n cmAddElectronicAddress: this.cmAddElectronicAddress.bind(this),\n cmUpdateElectronicAddress: this.cmUpdateElectronicAddress.bind(this),\n cmRemoveElectronicAddress: this.cmRemoveElectronicAddress.bind(this),\n cmGetPhysicalAddress: this.cmGetPhysicalAddress.bind(this),\n cmGetPhysicalAddresses: this.cmGetPhysicalAddresses.bind(this),\n cmAddPhysicalAddress: this.cmAddPhysicalAddress.bind(this),\n cmUpdatePhysicalAddress: this.cmUpdatePhysicalAddress.bind(this),\n cmRemovePhysicalAddress: this.cmRemovePhysicalAddress.bind(this),\n }\n\n private readonly store: AbstractContactStore\n\n constructor(options: { store: AbstractContactStore }) {\n this.store = options.store\n }\n\n /** {@inheritDoc IContactManager.cmGetContact} */\n private async cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact> {\n const { contactId } = args\n return this.store.getParty({ partyId: contactId })\n }\n\n /** {@inheritDoc IContactManager.cmGetContacts} */\n private async cmGetContacts(args?: GetContactsArgs): Promise<Array<Contact>> {\n return this.store.getParties(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddContact} */\n private async cmAddContact(args: AddContactArgs, context: RequiredContext): Promise<Contact> {\n const { uri, contactType, identities, electronicAddresses, physicalAddresses } = args\n\n return this.store.addParty({\n uri,\n partyType: contactType,\n contact: this.getContactInformationFrom(args),\n identities,\n electronicAddresses,\n physicalAddresses,\n })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateContact} */\n private async cmUpdateContact(args: UpdateContactArgs, context: RequiredContext): Promise<Contact> {\n const { contact } = args\n return this.store.updateParty({ party: contact })\n }\n\n /** {@inheritDoc IContactManager.cmRemoveContact} */\n private async cmRemoveContact(args: RemoveContactArgs, context: RequiredContext): Promise<boolean> {\n const { contactId } = args\n return this.store.removeParty({ partyId: contactId }).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetIdentity} */\n private async cmGetIdentity(args: GetIdentityArgs, context: RequiredContext): Promise<Identity> {\n return this.store.getIdentity(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetIdentities} */\n private async cmGetIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>> {\n return this.store.getIdentities(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddIdentity} */\n private async cmAddIdentity(args: AddIdentityArgs, context: RequiredContext): Promise<Identity> {\n const { contactId, identity } = args\n return this.store.addIdentity({ partyId: contactId, identity })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateIdentity} */\n private async cmUpdateIdentity(args: UpdateIdentityArgs, context: RequiredContext): Promise<Identity> {\n return this.store.updateIdentity(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveIdentity} */\n private async cmRemoveIdentity(args: RemoveIdentityArgs, context: RequiredContext): Promise<boolean> {\n return this.store.removeIdentity(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmAddRelationship} */\n private async cmAddRelationship(args: AddRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.addRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveRelationship} */\n private async cmRemoveRelationship(args: RemoveRelationshipArgs, context: RequiredContext): Promise<boolean> {\n return this.store.removeRelationship(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetRelationship} */\n private async cmGetRelationship(args: GetRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.getRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetRelationships} */\n private async cmGetRelationships(args?: GetRelationshipsArgs): Promise<Array<ContactRelationship>> {\n return this.store.getRelationships(args)\n }\n\n /** {@inheritDoc IContactManager.cmUpdateRelationship} */\n private async cmUpdateRelationship(args: UpdateRelationshipArgs, context: RequiredContext): Promise<ContactRelationship> {\n return this.store.updateRelationship(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetContactType} */\n private async cmGetContactType(args: GetContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n const { contactTypeId } = args\n return this.store.getPartyType({ partyTypeId: contactTypeId })\n }\n\n /** {@inheritDoc IContactManager.cmGetContactTypes} */\n private async cmGetContactTypes(args?: GetContactTypesArgs): Promise<Array<ContactType>> {\n return this.store.getPartyTypes(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddContactType} */\n private async cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n return this.store.addPartyType(args)\n }\n\n /** {@inheritDoc IContactManager.cmUpdateContactType} */\n private async cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType> {\n const { contactType } = args\n return this.store.updatePartyType({ partyType: contactType })\n }\n\n /** {@inheritDoc IContactManager.cmRemoveContactType} */\n private async cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean> {\n const { contactTypeId } = args\n return this.store.removePartyType({ partyTypeId: contactTypeId }).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetElectronicAddress} */\n private async cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress> {\n return this.store.getElectronicAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetElectronicAddresses} */\n private async cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>> {\n return this.store.getElectronicAddresses(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddElectronicAddress} */\n private async cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress> {\n const { contactId, electronicAddress } = args\n return this.store.addElectronicAddress({ partyId: contactId, electronicAddress })\n }\n\n /** {@inheritDoc IContactManager.cmUpdateElectronicAddress} */\n private async cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress> {\n return this.store.updateElectronicAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemoveElectronicAddress} */\n private async cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean> {\n return this.store.removeElectronicAddress(args).then((): boolean => true)\n }\n\n /** {@inheritDoc IContactManager.cmGetPhysicalAddress} */\n private async cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress> {\n return this.store.getPhysicalAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmGetPhysicalAddresses} */\n private async cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>> {\n return this.store.getPhysicalAddresses(args)\n }\n\n /** {@inheritDoc IContactManager.cmAddPhysicalAddress} */\n private async cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress> {\n const { contactId, physicalAddress } = args\n return this.store.addPhysicalAddress({ partyId: contactId, physicalAddress })\n }\n\n /** {@inheritDoc IContactManager.cmUpdatePhysicalAddress} */\n private async cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress> {\n return this.store.updatePhysicalAddress(args)\n }\n\n /** {@inheritDoc IContactManager.cmRemovePhysicalAddress} */\n private async cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean> {\n return this.store.removePhysicalAddress(args).then((): boolean => true)\n }\n\n private getContactInformationFrom(contact: NonPersistedContact | BaseContactEntity): NonPersistedContact {\n if (isNaturalPerson(contact)) {\n return { firstName: contact.firstName, middleName: contact.middleName, lastName: contact.lastName, displayName: contact.displayName }\n } else if (isOrganization(contact)) {\n return { legalName: contact.legalName, displayName: contact.displayName }\n }\n\n throw new Error('Contact not supported')\n }\n}\n","import { contextHasPlugin } from '@sphereon/ssi-sdk.agent-config'\nimport { IAgentContext, IPluginMethodMap } from '@veramo/core'\nimport {\n ElectronicAddress,\n FindElectronicAddressArgs,\n FindIdentityArgs,\n FindPartyArgs as FindContactArgs,\n FindPartyTypeArgs as FindContactTypeArgs,\n FindPhysicalAddressArgs,\n FindRelationshipArgs,\n Identity,\n NonPersistedContact,\n NonPersistedElectronicAddress,\n NonPersistedIdentity,\n NonPersistedParty,\n NonPersistedPartyType as NonPersistedContactType,\n NonPersistedPhysicalAddress,\n Party as Contact,\n PartyOrigin,\n PartyRelationship as ContactRelationship,\n PartyType as ContactType,\n PartyTypeType as ContactTypeType,\n PhysicalAddress,\n} from '@sphereon/ssi-sdk.data-store-types'\n\nexport interface IContactManager extends IPluginMethodMap {\n cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact>\n cmGetContacts(args?: GetContactsArgs): Promise<Array<Contact>>\n cmAddContact(args: AddContactArgs, context: RequiredContext): Promise<Contact>\n cmUpdateContact(args: UpdateContactArgs, context: RequiredContext): Promise<Contact>\n cmRemoveContact(args: RemoveContactArgs, context: RequiredContext): Promise<boolean>\n cmGetIdentity(args: GetIdentityArgs, context: RequiredContext): Promise<Identity>\n cmGetIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>>\n cmAddIdentity(args: AddIdentityArgs, context: RequiredContext): Promise<Identity>\n cmUpdateIdentity(args: UpdateIdentityArgs, context: RequiredContext): Promise<Identity>\n cmRemoveIdentity(args: RemoveIdentityArgs, context: RequiredContext): Promise<boolean>\n cmGetRelationship(args: GetRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmGetRelationships(args?: GetRelationshipsArgs): Promise<Array<ContactRelationship>>\n cmUpdateRelationship(args: UpdateRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmAddRelationship(args: AddRelationshipArgs, context: RequiredContext): Promise<ContactRelationship>\n cmRemoveRelationship(args: RemoveRelationshipArgs, context: RequiredContext): Promise<boolean>\n cmGetContactType(args: GetContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmGetContactTypes(args?: GetContactTypesArgs): Promise<Array<ContactType>>\n cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType>\n cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean>\n cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress>\n cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>>\n cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress>\n cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress>\n cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean>\n cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress>\n cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>>\n cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress>\n cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress>\n cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean>\n}\n\nexport function contextHasContactManager(context: IAgentContext<IPluginMethodMap>): context is IAgentContext<IContactManager> {\n return contextHasPlugin(context, 'cmGetContact')\n}\n\nexport type GetContactArgs = {\n contactId: string\n}\n\nexport type GetContactsArgs = {\n filter?: FindContactArgs\n}\n\nexport type AddContactArgs = Omit<NonPersistedParty, 'contact' | 'partyType'> &\n NonPersistedContact & {\n contactType: NonPersistedContactType\n }\n\nexport type UpdateContactArgs = {\n contact: Contact\n}\n\nexport type RemoveContactArgs = {\n contactId: string\n}\n\nexport type GetIdentityArgs = {\n identityId: string\n}\n\nexport type GetIdentitiesArgs = {\n filter?: FindIdentityArgs\n}\n\nexport type AddIdentityArgs = {\n contactId: string\n identity: NonPersistedIdentity\n}\n\nexport type UpdateIdentityArgs = {\n identity: Identity\n}\n\nexport type RemoveIdentityArgs = {\n identityId: string\n}\n\nexport type AddRelationshipArgs = {\n leftId: string\n rightId: string\n}\n\nexport type RemoveRelationshipArgs = {\n relationshipId: string\n}\n\nexport type GetRelationshipArgs = {\n relationshipId: string\n}\n\nexport type GetRelationshipsArgs = {\n filter: FindRelationshipArgs\n}\n\nexport type UpdateRelationshipArgs = {\n relationship: Omit<ContactRelationship, 'createdAt' | 'lastUpdatedAt'>\n}\n\nexport type AddContactTypeArgs = {\n type: ContactTypeType\n origin: PartyOrigin\n name: string\n tenantId: string\n description?: string\n}\n\nexport type GetContactTypeArgs = {\n contactTypeId: string\n}\n\nexport type GetContactTypesArgs = {\n filter?: FindContactTypeArgs\n}\n\nexport type UpdateContactTypeArgs = {\n contactType: Omit<ContactType, 'createdAt' | 'lastUpdatedAt'>\n}\n\nexport type RemoveContactTypeArgs = {\n contactTypeId: string\n}\n\nexport type GetElectronicAddressArgs = {\n electronicAddressId: string\n}\n\nexport type GetElectronicAddressesArgs = {\n filter?: FindElectronicAddressArgs\n}\n\nexport type AddElectronicAddressArgs = {\n contactId: string\n electronicAddress: NonPersistedElectronicAddress\n}\n\nexport type UpdateElectronicAddressArgs = {\n electronicAddress: ElectronicAddress\n}\n\nexport type RemoveElectronicAddressArgs = {\n electronicAddressId: string\n}\n\nexport type GetPhysicalAddressArgs = {\n physicalAddressId: string\n}\n\nexport type GetPhysicalAddressesArgs = {\n filter?: FindPhysicalAddressArgs\n}\n\nexport type AddPhysicalAddressArgs = {\n contactId: string\n physicalAddress: NonPersistedPhysicalAddress\n}\n\nexport type UpdatePhysicalAddressArgs = {\n physicalAddress: PhysicalAddress\n}\n\nexport type RemovePhysicalAddressArgs = {\n physicalAddressId: string\n}\n\nexport type RequiredContext = IAgentContext<never>\n","/**\n * @public\n */\nconst schema = require('../plugin.schema.json')\nexport { schema }\nexport { ContactManager, contactManagerMethods } from './agent/ContactManager'\nexport * from './types/IContactManager'\n"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,iBAAmB;AAAA,QACjB,YAAc;AAAA,UACZ,SAAW;AAAA,YACT,iBAAmB;AAAA,cACjB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,WAAa;AAAA,kBACX,MAAQ;AAAA,gBACV;AAAA,cACF;AAAA,cACA,UAAY,CAAC,WAAW;AAAA,YAC1B;AAAA,YACA,kBAAoB;AAAA,cAClB,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,QAAU;AAAA,kBACR,MAAQ;AAAA,kBACR,OAAS;AAAA,oBACP,MAAQ;AAAA,kBACV;AAAA,gBACF;AAAA,cACF;AAAA,YACF;AAAA,YACA,iBAAmB;AAAA,cACjB,MAAQ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AAMgD,mBAAmB;MAAE1C,SAASF;MAAW2C;IAAgB,CAAA;EAC7E;;EAGA,MAAcjD,wBAAwBI,MAA2D;AAC/F,WAAO,KAAKF,MAAMiD,sBAAsB/C,IAAAA;EAC1C;;EAGA,MAAcH,wBAAwBG,MAAmD;AACvF,WAAO,KAAKF,MAAMkD,sBAAsBhD,IAAAA,EAAMkB,KAAK,MAAe,IAAA;EACpE;EAEQJ,0BAA0BD,SAAuE;AACvG,QAAIoC,gBAAgBpC,OAAAA,GAAU;AAC5B,aAAO;QAAEqC,WAAWrC,QAAQqC;QAAWC,YAAYtC,QAAQsC;QAAYC,UAAUvC,QAAQuC;QAAUC,aAAaxC,QAAQwC;MAAY;IACtI,WAAWC,eAAezC,OAAAA,GAAU;AAClC,aAAO;QAAE0C,WAAW1C,QAAQ0C;QAAWF,aAAaxC,QAAQwC;MAAY;IAC1E;AAEA,UAAM,IAAIG,MAAM,uBAAA;EAClB;AACF;;;AChTA,SAASC,wBAAwB;AA0D1B,SAASC,yBAAyBC,SAAwC;AAC/E,SAAOC,iBAAiBD,SAAS,cAAA;AACnC;AAFgBD;;;ACvDhB,IAAMG,SAASC;","names":["isNaturalPerson","isOrganization","contactManagerMethods","ContactManager","schema","IContactManager","methods","cmGetContact","bind","cmGetContacts","cmAddContact","cmUpdateContact","cmRemoveContact","cmGetIdentity","cmGetIdentities","cmAddIdentity","cmUpdateIdentity","cmRemoveIdentity","cmAddRelationship","cmRemoveRelationship","cmGetRelationship","cmGetRelationships","cmUpdateRelationship","cmGetContactType","cmGetContactTypes","cmAddContactType","cmUpdateContactType","cmRemoveContactType","cmGetElectronicAddress","cmGetElectronicAddresses","cmAddElectronicAddress","cmUpdateElectronicAddress","cmRemoveElectronicAddress","cmGetPhysicalAddress","cmGetPhysicalAddresses","cmAddPhysicalAddress","cmUpdatePhysicalAddress","cmRemovePhysicalAddress","store","options","args","context","contactId","getParty","partyId","getParties","uri","contactType","identities","electronicAddresses","physicalAddresses","addParty","partyType","contact","getContactInformationFrom","updateParty","party","removeParty","then","getIdentity","getIdentities","identity","addIdentity","updateIdentity","removeIdentity","addRelationship","removeRelationship","getRelationship","getRelationships","updateRelationship","contactTypeId","getPartyType","partyTypeId","getPartyTypes","addPartyType","updatePartyType","removePartyType","getElectronicAddress","getElectronicAddresses","electronicAddress","addElectronicAddress","updateElectronicAddress","removeElectronicAddress","getPhysicalAddress","getPhysicalAddresses","physicalAddress","addPhysicalAddress","updatePhysicalAddress","removePhysicalAddress","isNaturalPerson","firstName","middleName","lastName","displayName","isOrganization","legalName","Error","contextHasPlugin","contextHasContactManager","context","contextHasPlugin","schema","require"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.contact-manager",
|
|
3
|
-
"version": "0.34.1-next.
|
|
3
|
+
"version": "0.34.1-next.299+9e9f5a50",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,13 +26,15 @@
|
|
|
26
26
|
"build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sphereon/ssi-sdk.data-store": "0.34.1-next.
|
|
30
|
-
"
|
|
29
|
+
"@sphereon/ssi-sdk.data-store": "0.34.1-next.299+9e9f5a50",
|
|
30
|
+
"@sphereon/ssi-sdk.data-store-types": "0.34.1-next.299+9e9f5a50",
|
|
31
|
+
"@sphereon/ssi-types": "0.34.1-next.299+9e9f5a50",
|
|
32
|
+
"cross-fetch": "^4.1.0",
|
|
31
33
|
"debug": "^4.3.5",
|
|
32
34
|
"typeorm": "0.3.20"
|
|
33
35
|
},
|
|
34
36
|
"devDependencies": {
|
|
35
|
-
"@sphereon/ssi-sdk.agent-config": "0.34.1-next.
|
|
37
|
+
"@sphereon/ssi-sdk.agent-config": "0.34.1-next.299+9e9f5a50",
|
|
36
38
|
"@veramo/remote-client": "4.2.0",
|
|
37
39
|
"@veramo/remote-server": "4.2.0"
|
|
38
40
|
},
|
|
@@ -57,5 +59,5 @@
|
|
|
57
59
|
"OpenID",
|
|
58
60
|
"Contact Manager"
|
|
59
61
|
],
|
|
60
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "9e9f5a50ead9373a078cb5291cbc4fb1e7865dc2"
|
|
61
63
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AbstractContactStore,
|
|
3
|
-
BaseContactEntity,
|
|
4
3
|
ElectronicAddress,
|
|
5
4
|
Identity,
|
|
6
5
|
NonPersistedContact,
|
|
@@ -8,9 +7,9 @@ import {
|
|
|
8
7
|
PartyRelationship as ContactRelationship,
|
|
9
8
|
PartyType as ContactType,
|
|
10
9
|
PhysicalAddress,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
} from '@sphereon/ssi-sdk.data-store-types'
|
|
11
|
+
import { BaseContactEntity, isNaturalPerson, isOrganization } from '@sphereon/ssi-sdk.data-store'
|
|
12
|
+
|
|
14
13
|
import { IAgentPlugin } from '@veramo/core'
|
|
15
14
|
import { schema } from '../index'
|
|
16
15
|
import {
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
PartyType as ContactType,
|
|
22
22
|
PartyTypeType as ContactTypeType,
|
|
23
23
|
PhysicalAddress,
|
|
24
|
-
} from '@sphereon/ssi-sdk.data-store'
|
|
24
|
+
} from '@sphereon/ssi-sdk.data-store-types'
|
|
25
25
|
|
|
26
26
|
export interface IContactManager extends IPluginMethodMap {
|
|
27
27
|
cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact>
|