@sphereon/ssi-sdk.contact-manager 0.18.2-next.57 → 0.18.2-next.62
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/agent/ContactManager.d.ts +21 -1
- package/dist/agent/ContactManager.d.ts.map +1 -1
- package/dist/agent/ContactManager.js +93 -12
- package/dist/agent/ContactManager.js.map +1 -1
- package/dist/types/IContactManager.d.ts +43 -1
- package/dist/types/IContactManager.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/agent/ContactManager.ts +128 -38
- package/src/types/IContactManager.ts +66 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { AbstractContactStore } from '@sphereon/ssi-sdk.data-store';
|
|
1
2
|
import { IAgentPlugin } from '@veramo/core';
|
|
2
3
|
import { IContactManager } from '../types/IContactManager';
|
|
3
|
-
import { AbstractContactStore } from '@sphereon/ssi-sdk.data-store';
|
|
4
4
|
/**
|
|
5
5
|
* {@inheritDoc IContactManager}
|
|
6
6
|
*/
|
|
@@ -51,6 +51,26 @@ export declare class ContactManager implements IAgentPlugin {
|
|
|
51
51
|
private cmUpdateContactType;
|
|
52
52
|
/** {@inheritDoc IContactManager.cmRemoveContactType} */
|
|
53
53
|
private cmRemoveContactType;
|
|
54
|
+
/** {@inheritDoc IContactManager.cmGetElectronicAddress} */
|
|
55
|
+
private cmGetElectronicAddress;
|
|
56
|
+
/** {@inheritDoc IContactManager.cmGetElectronicAddresses} */
|
|
57
|
+
private cmGetElectronicAddresses;
|
|
58
|
+
/** {@inheritDoc IContactManager.cmAddElectronicAddress} */
|
|
59
|
+
private cmAddElectronicAddress;
|
|
60
|
+
/** {@inheritDoc IContactManager.cmUpdateElectronicAddress} */
|
|
61
|
+
private cmUpdateElectronicAddress;
|
|
62
|
+
/** {@inheritDoc IContactManager.cmRemoveElectronicAddress} */
|
|
63
|
+
private cmRemoveElectronicAddress;
|
|
64
|
+
/** {@inheritDoc IContactManager.cmGetPhysicalAddress} */
|
|
65
|
+
private cmGetPhysicalAddress;
|
|
66
|
+
/** {@inheritDoc IContactManager.cmGetPhysicalAddresses} */
|
|
67
|
+
private cmGetPhysicalAddresses;
|
|
68
|
+
/** {@inheritDoc IContactManager.cmAddPhysicalAddress} */
|
|
69
|
+
private cmAddPhysicalAddress;
|
|
70
|
+
/** {@inheritDoc IContactManager.cmUpdatePhysicalAddress} */
|
|
71
|
+
private cmUpdatePhysicalAddress;
|
|
72
|
+
/** {@inheritDoc IContactManager.cmRemovePhysicalAddress} */
|
|
73
|
+
private cmRemovePhysicalAddress;
|
|
54
74
|
private getContactInformationFrom;
|
|
55
75
|
}
|
|
56
76
|
//# sourceMappingURL=ContactManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactManager.d.ts","sourceRoot":"","sources":["../../src/agent/ContactManager.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ContactManager.d.ts","sourceRoot":"","sources":["../../src/agent/ContactManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAUrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EAmBL,eAAe,EAchB,MAAM,0BAA0B,CAAA;AAEjC;;GAEG;AACH,qBAAa,cAAe,YAAW,YAAY;IACjD,QAAQ,CAAC,MAAM,MAAyB;IACxC,QAAQ,CAAC,OAAO,EAAE,eAAe,CA+BhC;IAED,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;gBAEhC,OAAO,EAAE;QAAE,KAAK,EAAE,oBAAoB,CAAA;KAAE;IAIpD,iDAAiD;YACnC,YAAY;IAK1B,kDAAkD;YACpC,aAAa;IAI3B,iDAAiD;YACnC,YAAY;IAmB1B,oDAAoD;YACtC,eAAe;IAK7B,oDAAoD;YACtC,eAAe;IAK7B,kDAAkD;YACpC,aAAa;IAI3B,oDAAoD;YACtC,eAAe;IAI7B,kDAAkD;YACpC,aAAa;IAK3B,qDAAqD;YACvC,gBAAgB;IAI9B,qDAAqD;YACvC,gBAAgB;IAI9B,sDAAsD;YACxC,iBAAiB;IAI/B,yDAAyD;YAC3C,oBAAoB;IAIlC,sDAAsD;YACxC,iBAAiB;IAI/B,uDAAuD;YACzC,kBAAkB;IAIhC,yDAAyD;YAC3C,oBAAoB;IAIlC,qDAAqD;YACvC,gBAAgB;IAK9B,sDAAsD;YACxC,iBAAiB;IAI/B,qDAAqD;YACvC,gBAAgB;IAI9B,wDAAwD;YAC1C,mBAAmB;IAKjC,wDAAwD;YAC1C,mBAAmB;IAKjC,2DAA2D;YAC7C,sBAAsB;IAIpC,6DAA6D;YAC/C,wBAAwB;IAItC,2DAA2D;YAC7C,sBAAsB;IAKpC,8DAA8D;YAChD,yBAAyB;IAIvC,8DAA8D;YAChD,yBAAyB;IAIvC,yDAAyD;YAC3C,oBAAoB;IAIlC,2DAA2D;YAC7C,sBAAsB;IAIpC,yDAAyD;YAC3C,oBAAoB;IAKlC,4DAA4D;YAC9C,uBAAuB;IAIrC,4DAA4D;YAC9C,uBAAuB;IAIrC,OAAO,CAAC,yBAAyB;CASlC"}
|
|
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ContactManager = void 0;
|
|
13
|
-
const index_1 = require("../index");
|
|
14
13
|
const ssi_sdk_data_store_1 = require("@sphereon/ssi-sdk.data-store");
|
|
14
|
+
const index_1 = require("../index");
|
|
15
15
|
/**
|
|
16
16
|
* {@inheritDoc IContactManager}
|
|
17
17
|
*/
|
|
@@ -39,13 +39,24 @@ class ContactManager {
|
|
|
39
39
|
cmAddContactType: this.cmAddContactType.bind(this),
|
|
40
40
|
cmUpdateContactType: this.cmUpdateContactType.bind(this),
|
|
41
41
|
cmRemoveContactType: this.cmRemoveContactType.bind(this),
|
|
42
|
+
cmGetElectronicAddress: this.cmGetElectronicAddress.bind(this),
|
|
43
|
+
cmGetElectronicAddresses: this.cmGetElectronicAddresses.bind(this),
|
|
44
|
+
cmAddElectronicAddress: this.cmAddElectronicAddress.bind(this),
|
|
45
|
+
cmUpdateElectronicAddress: this.cmUpdateElectronicAddress.bind(this),
|
|
46
|
+
cmRemoveElectronicAddress: this.cmRemoveElectronicAddress.bind(this),
|
|
47
|
+
cmGetPhysicalAddress: this.cmGetPhysicalAddress.bind(this),
|
|
48
|
+
cmGetPhysicalAddresses: this.cmGetPhysicalAddresses.bind(this),
|
|
49
|
+
cmAddPhysicalAddress: this.cmAddPhysicalAddress.bind(this),
|
|
50
|
+
cmUpdatePhysicalAddress: this.cmUpdatePhysicalAddress.bind(this),
|
|
51
|
+
cmRemovePhysicalAddress: this.cmRemovePhysicalAddress.bind(this),
|
|
42
52
|
};
|
|
43
53
|
this.store = options.store;
|
|
44
54
|
}
|
|
45
55
|
/** {@inheritDoc IContactManager.cmGetContact} */
|
|
46
56
|
cmGetContact(args, context) {
|
|
47
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
|
|
58
|
+
const { contactId } = args;
|
|
59
|
+
return this.store.getParty({ partyId: contactId });
|
|
49
60
|
});
|
|
50
61
|
}
|
|
51
62
|
/** {@inheritDoc IContactManager.cmGetContacts} */
|
|
@@ -57,25 +68,29 @@ class ContactManager {
|
|
|
57
68
|
/** {@inheritDoc IContactManager.cmAddContact} */
|
|
58
69
|
cmAddContact(args, context) {
|
|
59
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const { uri, contactType, identities, electronicAddresses, physicalAddresses } = args;
|
|
60
72
|
return this.store.addParty({
|
|
61
|
-
uri
|
|
62
|
-
partyType:
|
|
73
|
+
uri,
|
|
74
|
+
partyType: contactType,
|
|
63
75
|
contact: this.getContactInformationFrom(args),
|
|
64
|
-
identities
|
|
65
|
-
electronicAddresses
|
|
76
|
+
identities,
|
|
77
|
+
electronicAddresses,
|
|
78
|
+
physicalAddresses,
|
|
66
79
|
});
|
|
67
80
|
});
|
|
68
81
|
}
|
|
69
82
|
/** {@inheritDoc IContactManager.cmUpdateContact} */
|
|
70
83
|
cmUpdateContact(args, context) {
|
|
71
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
|
|
85
|
+
const { contact } = args;
|
|
86
|
+
return this.store.updateParty({ party: contact });
|
|
73
87
|
});
|
|
74
88
|
}
|
|
75
89
|
/** {@inheritDoc IContactManager.cmRemoveContact} */
|
|
76
90
|
cmRemoveContact(args, context) {
|
|
77
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
|
|
92
|
+
const { contactId } = args;
|
|
93
|
+
return this.store.removeParty({ partyId: contactId }).then(() => true);
|
|
79
94
|
});
|
|
80
95
|
}
|
|
81
96
|
/** {@inheritDoc IContactManager.cmGetIdentity} */
|
|
@@ -93,7 +108,8 @@ class ContactManager {
|
|
|
93
108
|
/** {@inheritDoc IContactManager.cmAddIdentity} */
|
|
94
109
|
cmAddIdentity(args, context) {
|
|
95
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
|
|
111
|
+
const { contactId, identity } = args;
|
|
112
|
+
return this.store.addIdentity({ partyId: contactId, identity });
|
|
97
113
|
});
|
|
98
114
|
}
|
|
99
115
|
/** {@inheritDoc IContactManager.cmUpdateIdentity} */
|
|
@@ -141,7 +157,8 @@ class ContactManager {
|
|
|
141
157
|
/** {@inheritDoc IContactManager.cmGetContactType} */
|
|
142
158
|
cmGetContactType(args, context) {
|
|
143
159
|
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
-
|
|
160
|
+
const { contactTypeId } = args;
|
|
161
|
+
return this.store.getPartyType({ partyTypeId: contactTypeId });
|
|
145
162
|
});
|
|
146
163
|
}
|
|
147
164
|
/** {@inheritDoc IContactManager.cmGetContactTypes} */
|
|
@@ -159,13 +176,77 @@ class ContactManager {
|
|
|
159
176
|
/** {@inheritDoc IContactManager.cmUpdateContactType} */
|
|
160
177
|
cmUpdateContactType(args, context) {
|
|
161
178
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
|
|
179
|
+
const { contactType } = args;
|
|
180
|
+
return this.store.updatePartyType({ partyType: contactType });
|
|
163
181
|
});
|
|
164
182
|
}
|
|
165
183
|
/** {@inheritDoc IContactManager.cmRemoveContactType} */
|
|
166
184
|
cmRemoveContactType(args, context) {
|
|
167
185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
|
|
186
|
+
const { contactTypeId } = args;
|
|
187
|
+
return this.store.removePartyType({ partyTypeId: contactTypeId }).then(() => true);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/** {@inheritDoc IContactManager.cmGetElectronicAddress} */
|
|
191
|
+
cmGetElectronicAddress(args, context) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
return this.store.getElectronicAddress(args);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
/** {@inheritDoc IContactManager.cmGetElectronicAddresses} */
|
|
197
|
+
cmGetElectronicAddresses(args) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
return this.store.getElectronicAddresses(args);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
/** {@inheritDoc IContactManager.cmAddElectronicAddress} */
|
|
203
|
+
cmAddElectronicAddress(args) {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
const { contactId, electronicAddress } = args;
|
|
206
|
+
return this.store.addElectronicAddress({ partyId: contactId, electronicAddress });
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/** {@inheritDoc IContactManager.cmUpdateElectronicAddress} */
|
|
210
|
+
cmUpdateElectronicAddress(args) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
return this.store.updateElectronicAddress(args);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/** {@inheritDoc IContactManager.cmRemoveElectronicAddress} */
|
|
216
|
+
cmRemoveElectronicAddress(args) {
|
|
217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
return this.store.removeElectronicAddress(args).then(() => true);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/** {@inheritDoc IContactManager.cmGetPhysicalAddress} */
|
|
222
|
+
cmGetPhysicalAddress(args) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
return this.store.getPhysicalAddress(args);
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
/** {@inheritDoc IContactManager.cmGetPhysicalAddresses} */
|
|
228
|
+
cmGetPhysicalAddresses(args) {
|
|
229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
return this.store.getPhysicalAddresses(args);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/** {@inheritDoc IContactManager.cmAddPhysicalAddress} */
|
|
234
|
+
cmAddPhysicalAddress(args) {
|
|
235
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
236
|
+
const { contactId, physicalAddress } = args;
|
|
237
|
+
return this.store.addPhysicalAddress({ partyId: contactId, physicalAddress });
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
/** {@inheritDoc IContactManager.cmUpdatePhysicalAddress} */
|
|
241
|
+
cmUpdatePhysicalAddress(args) {
|
|
242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
return this.store.updatePhysicalAddress(args);
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/** {@inheritDoc IContactManager.cmRemovePhysicalAddress} */
|
|
247
|
+
cmRemovePhysicalAddress(args) {
|
|
248
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
249
|
+
return this.store.removePhysicalAddress(args).then(() => true);
|
|
169
250
|
});
|
|
170
251
|
}
|
|
171
252
|
getContactInformationFrom(contact) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactManager.js","sourceRoot":"","sources":["../../src/agent/ContactManager.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ContactManager.js","sourceRoot":"","sources":["../../src/agent/ContactManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qEAWqC;AAErC,oCAAiC;AAoCjC;;GAEG;AACH,MAAa,cAAc;IAqCzB,YAAY,OAAwC;QApC3C,WAAM,GAAG,cAAM,CAAC,eAAe,CAAA;QAC/B,YAAO,GAAoB;YAClC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1C,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5C,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1C,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YAChD,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YAChD,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5C,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YAChD,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5C,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClD,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClD,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;YACpD,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1D,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;YACpD,kBAAkB,EAAE,IAAI,CAAC,kBAA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AAO,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAA;QAC/E,CAAC;KAAA;IAED,4DAA4D;IAC9C,uBAAuB,CAAC,IAA+B;;YACnE,OAAO,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAA;QAC/C,CAAC;KAAA;IAED,4DAA4D;IAC9C,uBAAuB,CAAC,IAA+B;;YACnE,OAAO,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAY,EAAE,CAAC,IAAI,CAAC,CAAA;QACzE,CAAC;KAAA;IAEO,yBAAyB,CAAC,OAAY;QAC5C,IAAI,IAAA,oCAAe,EAAC,OAAO,CAAC,EAAE;YAC5B,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAA;SACtI;aAAM,IAAI,IAAA,mCAAc,EAAC,OAAO,CAAC,EAAE;YAClC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAA;SAC1E;QAED,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAA;IAC1C,CAAC;CACF;AAhOD,wCAgOC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAgentContext, IPluginMethodMap } from '@veramo/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ElectronicAddress, FindElectronicAddressArgs, FindIdentityArgs, FindPartyArgs as FindContactArgs, FindPartyTypeArgs as FindContactTypeArgs, FindPhysicalAddressArgs, FindRelationshipArgs, Identity, NonPersistedContact, NonPersistedElectronicAddress, NonPersistedIdentity, NonPersistedParty, NonPersistedPartyType as NonPersistedContactType, NonPersistedPhysicalAddress, Party as Contact, PartyRelationship as ContactRelationship, PartyType as ContactType, PartyTypeEnum as ContactTypeEnum, PhysicalAddress } from '@sphereon/ssi-sdk.data-store';
|
|
3
3
|
export interface IContactManager extends IPluginMethodMap {
|
|
4
4
|
cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact>;
|
|
5
5
|
cmGetContacts(args?: GetContactsArgs): Promise<Array<Contact>>;
|
|
@@ -21,6 +21,16 @@ export interface IContactManager extends IPluginMethodMap {
|
|
|
21
21
|
cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType>;
|
|
22
22
|
cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType>;
|
|
23
23
|
cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean>;
|
|
24
|
+
cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress>;
|
|
25
|
+
cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>>;
|
|
26
|
+
cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress>;
|
|
27
|
+
cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress>;
|
|
28
|
+
cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean>;
|
|
29
|
+
cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress>;
|
|
30
|
+
cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>>;
|
|
31
|
+
cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress>;
|
|
32
|
+
cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress>;
|
|
33
|
+
cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean>;
|
|
24
34
|
}
|
|
25
35
|
export type GetContactArgs = {
|
|
26
36
|
contactId: string;
|
|
@@ -87,5 +97,37 @@ export type UpdateContactTypeArgs = {
|
|
|
87
97
|
export type RemoveContactTypeArgs = {
|
|
88
98
|
contactTypeId: string;
|
|
89
99
|
};
|
|
100
|
+
export type GetElectronicAddressArgs = {
|
|
101
|
+
electronicAddressId: string;
|
|
102
|
+
};
|
|
103
|
+
export type GetElectronicAddressesArgs = {
|
|
104
|
+
filter?: FindElectronicAddressArgs;
|
|
105
|
+
};
|
|
106
|
+
export type AddElectronicAddressArgs = {
|
|
107
|
+
contactId: string;
|
|
108
|
+
electronicAddress: NonPersistedElectronicAddress;
|
|
109
|
+
};
|
|
110
|
+
export type UpdateElectronicAddressArgs = {
|
|
111
|
+
electronicAddress: ElectronicAddress;
|
|
112
|
+
};
|
|
113
|
+
export type RemoveElectronicAddressArgs = {
|
|
114
|
+
electronicAddressId: string;
|
|
115
|
+
};
|
|
116
|
+
export type GetPhysicalAddressArgs = {
|
|
117
|
+
physicalAddressId: string;
|
|
118
|
+
};
|
|
119
|
+
export type GetPhysicalAddressesArgs = {
|
|
120
|
+
filter?: FindPhysicalAddressArgs;
|
|
121
|
+
};
|
|
122
|
+
export type AddPhysicalAddressArgs = {
|
|
123
|
+
contactId: string;
|
|
124
|
+
physicalAddress: NonPersistedPhysicalAddress;
|
|
125
|
+
};
|
|
126
|
+
export type UpdatePhysicalAddressArgs = {
|
|
127
|
+
physicalAddress: PhysicalAddress;
|
|
128
|
+
};
|
|
129
|
+
export type RemovePhysicalAddressArgs = {
|
|
130
|
+
physicalAddressId: string;
|
|
131
|
+
};
|
|
90
132
|
export type RequiredContext = IAgentContext<never>;
|
|
91
133
|
//# sourceMappingURL=IContactManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IContactManager.d.ts","sourceRoot":"","sources":["../../src/types/IContactManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,EACL,
|
|
1
|
+
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CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.contact-manager",
|
|
3
|
-
"version": "0.18.2-next.
|
|
3
|
+
"version": "0.18.2-next.62+d10151de",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"build:clean": "tsc --build --clean && tsc --build"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@sphereon/ssi-sdk.data-store": "0.18.2-next.
|
|
17
|
+
"@sphereon/ssi-sdk.data-store": "0.18.2-next.62+d10151de",
|
|
18
18
|
"cross-fetch": "^3.1.8",
|
|
19
19
|
"typeorm": "^0.3.12"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@sphereon/ssi-sdk.agent-config": "0.18.2-next.
|
|
22
|
+
"@sphereon/ssi-sdk.agent-config": "0.18.2-next.62+d10151de",
|
|
23
23
|
"@sphereon/ssi-sdk.data-store": "workspace:*",
|
|
24
24
|
"@veramo/remote-client": "4.2.0",
|
|
25
25
|
"@veramo/remote-server": "4.2.0"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"OpenID",
|
|
46
46
|
"Contact Manager"
|
|
47
47
|
],
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "d10151dee1bbf3f07b1f1a8b04437e8599e20e3b"
|
|
49
49
|
}
|
|
@@ -1,39 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AbstractContactStore,
|
|
3
|
+
ElectronicAddress,
|
|
4
|
+
Identity,
|
|
5
|
+
NonPersistedContact,
|
|
6
|
+
Party as Contact,
|
|
7
|
+
PartyRelationship as ContactRelationship,
|
|
8
|
+
PartyType as ContactType,
|
|
9
|
+
PhysicalAddress,
|
|
10
|
+
isNaturalPerson,
|
|
11
|
+
isOrganization,
|
|
12
|
+
} from '@sphereon/ssi-sdk.data-store'
|
|
1
13
|
import { IAgentPlugin } from '@veramo/core'
|
|
2
14
|
import { schema } from '../index'
|
|
3
15
|
import {
|
|
4
16
|
AddContactArgs,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
RemoveContactArgs,
|
|
17
|
+
AddContactTypeArgs,
|
|
18
|
+
AddElectronicAddressArgs,
|
|
8
19
|
AddIdentityArgs,
|
|
9
|
-
|
|
10
|
-
GetIdentityArgs,
|
|
11
|
-
RemoveIdentityArgs,
|
|
12
|
-
RequiredContext,
|
|
13
|
-
UpdateIdentityArgs,
|
|
14
|
-
GetContactsArgs,
|
|
15
|
-
GetContactArgs,
|
|
20
|
+
AddPhysicalAddressArgs,
|
|
16
21
|
AddRelationshipArgs,
|
|
17
|
-
|
|
18
|
-
GetRelationshipArgs,
|
|
19
|
-
GetRelationshipsArgs,
|
|
20
|
-
UpdateRelationshipArgs,
|
|
21
|
-
AddContactTypeArgs,
|
|
22
|
+
GetContactArgs,
|
|
22
23
|
GetContactTypeArgs,
|
|
23
24
|
GetContactTypesArgs,
|
|
25
|
+
GetContactsArgs,
|
|
26
|
+
GetElectronicAddressArgs,
|
|
27
|
+
GetElectronicAddressesArgs,
|
|
28
|
+
GetIdentitiesArgs,
|
|
29
|
+
GetIdentityArgs,
|
|
30
|
+
GetPhysicalAddressArgs,
|
|
31
|
+
GetPhysicalAddressesArgs,
|
|
32
|
+
GetRelationshipArgs,
|
|
33
|
+
GetRelationshipsArgs,
|
|
34
|
+
IContactManager,
|
|
35
|
+
RemoveContactArgs,
|
|
24
36
|
RemoveContactTypeArgs,
|
|
37
|
+
RemoveElectronicAddressArgs,
|
|
38
|
+
RemoveIdentityArgs,
|
|
39
|
+
RemovePhysicalAddressArgs,
|
|
40
|
+
RemoveRelationshipArgs,
|
|
41
|
+
RequiredContext,
|
|
42
|
+
UpdateContactArgs,
|
|
25
43
|
UpdateContactTypeArgs,
|
|
44
|
+
UpdateElectronicAddressArgs,
|
|
45
|
+
UpdateIdentityArgs,
|
|
46
|
+
UpdatePhysicalAddressArgs,
|
|
47
|
+
UpdateRelationshipArgs,
|
|
26
48
|
} from '../types/IContactManager'
|
|
27
|
-
import {
|
|
28
|
-
AbstractContactStore,
|
|
29
|
-
Party as Contact,
|
|
30
|
-
Identity,
|
|
31
|
-
PartyRelationship as ContactRelationship,
|
|
32
|
-
PartyType as ContactType,
|
|
33
|
-
NonPersistedContact,
|
|
34
|
-
isNaturalPerson,
|
|
35
|
-
isOrganization,
|
|
36
|
-
} from '@sphereon/ssi-sdk.data-store'
|
|
37
49
|
|
|
38
50
|
/**
|
|
39
51
|
* {@inheritDoc IContactManager}
|
|
@@ -61,6 +73,16 @@ export class ContactManager implements IAgentPlugin {
|
|
|
61
73
|
cmAddContactType: this.cmAddContactType.bind(this),
|
|
62
74
|
cmUpdateContactType: this.cmUpdateContactType.bind(this),
|
|
63
75
|
cmRemoveContactType: this.cmRemoveContactType.bind(this),
|
|
76
|
+
cmGetElectronicAddress: this.cmGetElectronicAddress.bind(this),
|
|
77
|
+
cmGetElectronicAddresses: this.cmGetElectronicAddresses.bind(this),
|
|
78
|
+
cmAddElectronicAddress: this.cmAddElectronicAddress.bind(this),
|
|
79
|
+
cmUpdateElectronicAddress: this.cmUpdateElectronicAddress.bind(this),
|
|
80
|
+
cmRemoveElectronicAddress: this.cmRemoveElectronicAddress.bind(this),
|
|
81
|
+
cmGetPhysicalAddress: this.cmGetPhysicalAddress.bind(this),
|
|
82
|
+
cmGetPhysicalAddresses: this.cmGetPhysicalAddresses.bind(this),
|
|
83
|
+
cmAddPhysicalAddress: this.cmAddPhysicalAddress.bind(this),
|
|
84
|
+
cmUpdatePhysicalAddress: this.cmUpdatePhysicalAddress.bind(this),
|
|
85
|
+
cmRemovePhysicalAddress: this.cmRemovePhysicalAddress.bind(this),
|
|
64
86
|
}
|
|
65
87
|
|
|
66
88
|
private readonly store: AbstractContactStore
|
|
@@ -71,7 +93,8 @@ export class ContactManager implements IAgentPlugin {
|
|
|
71
93
|
|
|
72
94
|
/** {@inheritDoc IContactManager.cmGetContact} */
|
|
73
95
|
private async cmGetContact(args: GetContactArgs, context: RequiredContext): Promise<Contact> {
|
|
74
|
-
|
|
96
|
+
const { contactId } = args
|
|
97
|
+
return this.store.getParty({ partyId: contactId })
|
|
75
98
|
}
|
|
76
99
|
|
|
77
100
|
/** {@inheritDoc IContactManager.cmGetContacts} */
|
|
@@ -81,23 +104,34 @@ export class ContactManager implements IAgentPlugin {
|
|
|
81
104
|
|
|
82
105
|
/** {@inheritDoc IContactManager.cmAddContact} */
|
|
83
106
|
private async cmAddContact(args: AddContactArgs, context: RequiredContext): Promise<Contact> {
|
|
107
|
+
const {
|
|
108
|
+
uri,
|
|
109
|
+
contactType,
|
|
110
|
+
identities,
|
|
111
|
+
electronicAddresses,
|
|
112
|
+
physicalAddresses
|
|
113
|
+
} = args
|
|
114
|
+
|
|
84
115
|
return this.store.addParty({
|
|
85
|
-
uri
|
|
86
|
-
partyType:
|
|
116
|
+
uri,
|
|
117
|
+
partyType: contactType,
|
|
87
118
|
contact: this.getContactInformationFrom(args),
|
|
88
|
-
identities
|
|
89
|
-
electronicAddresses
|
|
119
|
+
identities,
|
|
120
|
+
electronicAddresses,
|
|
121
|
+
physicalAddresses,
|
|
90
122
|
})
|
|
91
123
|
}
|
|
92
124
|
|
|
93
125
|
/** {@inheritDoc IContactManager.cmUpdateContact} */
|
|
94
126
|
private async cmUpdateContact(args: UpdateContactArgs, context: RequiredContext): Promise<Contact> {
|
|
95
|
-
|
|
127
|
+
const { contact } = args
|
|
128
|
+
return this.store.updateParty({ party: contact })
|
|
96
129
|
}
|
|
97
130
|
|
|
98
131
|
/** {@inheritDoc IContactManager.cmRemoveContact} */
|
|
99
132
|
private async cmRemoveContact(args: RemoveContactArgs, context: RequiredContext): Promise<boolean> {
|
|
100
|
-
|
|
133
|
+
const { contactId } = args
|
|
134
|
+
return this.store.removeParty({ partyId: contactId }).then((): boolean => true)
|
|
101
135
|
}
|
|
102
136
|
|
|
103
137
|
/** {@inheritDoc IContactManager.cmGetIdentity} */
|
|
@@ -112,7 +146,8 @@ export class ContactManager implements IAgentPlugin {
|
|
|
112
146
|
|
|
113
147
|
/** {@inheritDoc IContactManager.cmAddIdentity} */
|
|
114
148
|
private async cmAddIdentity(args: AddIdentityArgs, context: RequiredContext): Promise<Identity> {
|
|
115
|
-
|
|
149
|
+
const { contactId, identity } = args
|
|
150
|
+
return this.store.addIdentity({ partyId: contactId, identity })
|
|
116
151
|
}
|
|
117
152
|
|
|
118
153
|
/** {@inheritDoc IContactManager.cmUpdateIdentity} */
|
|
@@ -122,7 +157,7 @@ export class ContactManager implements IAgentPlugin {
|
|
|
122
157
|
|
|
123
158
|
/** {@inheritDoc IContactManager.cmRemoveIdentity} */
|
|
124
159
|
private async cmRemoveIdentity(args: RemoveIdentityArgs, context: RequiredContext): Promise<boolean> {
|
|
125
|
-
return this.store.removeIdentity(args).then(() => true)
|
|
160
|
+
return this.store.removeIdentity(args).then((): boolean => true)
|
|
126
161
|
}
|
|
127
162
|
|
|
128
163
|
/** {@inheritDoc IContactManager.cmAddRelationship} */
|
|
@@ -132,7 +167,7 @@ export class ContactManager implements IAgentPlugin {
|
|
|
132
167
|
|
|
133
168
|
/** {@inheritDoc IContactManager.cmRemoveRelationship} */
|
|
134
169
|
private async cmRemoveRelationship(args: RemoveRelationshipArgs, context: RequiredContext): Promise<boolean> {
|
|
135
|
-
return this.store.removeRelationship(args).then(() => true)
|
|
170
|
+
return this.store.removeRelationship(args).then((): boolean => true)
|
|
136
171
|
}
|
|
137
172
|
|
|
138
173
|
/** {@inheritDoc IContactManager.cmGetRelationship} */
|
|
@@ -152,7 +187,8 @@ export class ContactManager implements IAgentPlugin {
|
|
|
152
187
|
|
|
153
188
|
/** {@inheritDoc IContactManager.cmGetContactType} */
|
|
154
189
|
private async cmGetContactType(args: GetContactTypeArgs, context: RequiredContext): Promise<ContactType> {
|
|
155
|
-
|
|
190
|
+
const { contactTypeId } = args
|
|
191
|
+
return this.store.getPartyType({ partyTypeId: contactTypeId })
|
|
156
192
|
}
|
|
157
193
|
|
|
158
194
|
/** {@inheritDoc IContactManager.cmGetContactTypes} */
|
|
@@ -167,12 +203,66 @@ export class ContactManager implements IAgentPlugin {
|
|
|
167
203
|
|
|
168
204
|
/** {@inheritDoc IContactManager.cmUpdateContactType} */
|
|
169
205
|
private async cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType> {
|
|
170
|
-
|
|
206
|
+
const { contactType } = args
|
|
207
|
+
return this.store.updatePartyType({ partyType: contactType })
|
|
171
208
|
}
|
|
172
209
|
|
|
173
210
|
/** {@inheritDoc IContactManager.cmRemoveContactType} */
|
|
174
211
|
private async cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean> {
|
|
175
|
-
|
|
212
|
+
const { contactTypeId } = args
|
|
213
|
+
return this.store.removePartyType({ partyTypeId: contactTypeId }).then((): boolean => true)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** {@inheritDoc IContactManager.cmGetElectronicAddress} */
|
|
217
|
+
private async cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress> {
|
|
218
|
+
return this.store.getElectronicAddress(args)
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** {@inheritDoc IContactManager.cmGetElectronicAddresses} */
|
|
222
|
+
private async cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>> {
|
|
223
|
+
return this.store.getElectronicAddresses(args)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** {@inheritDoc IContactManager.cmAddElectronicAddress} */
|
|
227
|
+
private async cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress> {
|
|
228
|
+
const { contactId, electronicAddress } = args
|
|
229
|
+
return this.store.addElectronicAddress({ partyId: contactId, electronicAddress })
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** {@inheritDoc IContactManager.cmUpdateElectronicAddress} */
|
|
233
|
+
private async cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress> {
|
|
234
|
+
return this.store.updateElectronicAddress(args)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** {@inheritDoc IContactManager.cmRemoveElectronicAddress} */
|
|
238
|
+
private async cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean> {
|
|
239
|
+
return this.store.removeElectronicAddress(args).then((): boolean => true)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** {@inheritDoc IContactManager.cmGetPhysicalAddress} */
|
|
243
|
+
private async cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress> {
|
|
244
|
+
return this.store.getPhysicalAddress(args)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/** {@inheritDoc IContactManager.cmGetPhysicalAddresses} */
|
|
248
|
+
private async cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>> {
|
|
249
|
+
return this.store.getPhysicalAddresses(args)
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/** {@inheritDoc IContactManager.cmAddPhysicalAddress} */
|
|
253
|
+
private async cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress> {
|
|
254
|
+
const { contactId, physicalAddress } = args
|
|
255
|
+
return this.store.addPhysicalAddress({ partyId: contactId, physicalAddress })
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/** {@inheritDoc IContactManager.cmUpdatePhysicalAddress} */
|
|
259
|
+
private async cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress> {
|
|
260
|
+
return this.store.updatePhysicalAddress(args)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/** {@inheritDoc IContactManager.cmRemovePhysicalAddress} */
|
|
264
|
+
private async cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean> {
|
|
265
|
+
return this.store.removePhysicalAddress(args).then((): boolean => true)
|
|
176
266
|
}
|
|
177
267
|
|
|
178
268
|
private getContactInformationFrom(contact: any): NonPersistedContact {
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { IAgentContext, IPluginMethodMap } from '@veramo/core'
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
FindRelationshipArgs,
|
|
3
|
+
ElectronicAddress,
|
|
4
|
+
FindElectronicAddressArgs,
|
|
6
5
|
FindIdentityArgs,
|
|
6
|
+
FindPartyArgs as FindContactArgs,
|
|
7
|
+
FindPartyTypeArgs as FindContactTypeArgs,
|
|
8
|
+
FindPhysicalAddressArgs,
|
|
9
|
+
FindRelationshipArgs,
|
|
10
|
+
Identity,
|
|
7
11
|
NonPersistedContact,
|
|
8
|
-
|
|
12
|
+
NonPersistedElectronicAddress,
|
|
13
|
+
NonPersistedIdentity,
|
|
14
|
+
NonPersistedParty,
|
|
9
15
|
NonPersistedPartyType as NonPersistedContactType,
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
NonPersistedPhysicalAddress,
|
|
17
|
+
Party as Contact,
|
|
12
18
|
PartyRelationship as ContactRelationship,
|
|
13
19
|
PartyType as ContactType,
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
PartyTypeEnum as ContactTypeEnum,
|
|
21
|
+
PhysicalAddress,
|
|
16
22
|
} from '@sphereon/ssi-sdk.data-store'
|
|
17
23
|
|
|
18
24
|
export interface IContactManager extends IPluginMethodMap {
|
|
@@ -36,6 +42,16 @@ export interface IContactManager extends IPluginMethodMap {
|
|
|
36
42
|
cmAddContactType(args: AddContactTypeArgs, context: RequiredContext): Promise<ContactType>
|
|
37
43
|
cmUpdateContactType(args: UpdateContactTypeArgs, context: RequiredContext): Promise<ContactType>
|
|
38
44
|
cmRemoveContactType(args: RemoveContactTypeArgs, context: RequiredContext): Promise<boolean>
|
|
45
|
+
cmGetElectronicAddress(args: GetElectronicAddressArgs, context: RequiredContext): Promise<ElectronicAddress>
|
|
46
|
+
cmGetElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>>
|
|
47
|
+
cmAddElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress>
|
|
48
|
+
cmUpdateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress>
|
|
49
|
+
cmRemoveElectronicAddress(args: RemoveElectronicAddressArgs): Promise<boolean>
|
|
50
|
+
cmGetPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress>
|
|
51
|
+
cmGetPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>>
|
|
52
|
+
cmAddPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress>
|
|
53
|
+
cmUpdatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress>
|
|
54
|
+
cmRemovePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<boolean>
|
|
39
55
|
}
|
|
40
56
|
|
|
41
57
|
export type GetContactArgs = {
|
|
@@ -46,12 +62,6 @@ export type GetContactsArgs = {
|
|
|
46
62
|
filter?: FindContactArgs
|
|
47
63
|
}
|
|
48
64
|
|
|
49
|
-
// export type AddContactArgs = {
|
|
50
|
-
// uri?: string
|
|
51
|
-
// contactType: NonPersistedContactType
|
|
52
|
-
// identities?: Array<NonPersistedIdentity>
|
|
53
|
-
// } & NonPersistedNaturalPerson | NonPersistedOrganization
|
|
54
|
-
|
|
55
65
|
export type AddContactArgs = Omit<NonPersistedParty, 'contact' | 'partyType'> &
|
|
56
66
|
NonPersistedContact & {
|
|
57
67
|
contactType: NonPersistedContactType
|
|
@@ -130,4 +140,46 @@ export type RemoveContactTypeArgs = {
|
|
|
130
140
|
contactTypeId: string
|
|
131
141
|
}
|
|
132
142
|
|
|
143
|
+
export type GetElectronicAddressArgs = {
|
|
144
|
+
electronicAddressId: string
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type GetElectronicAddressesArgs = {
|
|
148
|
+
filter?: FindElectronicAddressArgs
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type AddElectronicAddressArgs = {
|
|
152
|
+
contactId: string
|
|
153
|
+
electronicAddress: NonPersistedElectronicAddress
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export type UpdateElectronicAddressArgs = {
|
|
157
|
+
electronicAddress: ElectronicAddress
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type RemoveElectronicAddressArgs = {
|
|
161
|
+
electronicAddressId: string
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export type GetPhysicalAddressArgs = {
|
|
165
|
+
physicalAddressId: string
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export type GetPhysicalAddressesArgs = {
|
|
169
|
+
filter?: FindPhysicalAddressArgs
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type AddPhysicalAddressArgs = {
|
|
173
|
+
contactId: string
|
|
174
|
+
physicalAddress: NonPersistedPhysicalAddress
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type UpdatePhysicalAddressArgs = {
|
|
178
|
+
physicalAddress: PhysicalAddress
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export type RemovePhysicalAddressArgs = {
|
|
182
|
+
physicalAddressId: string
|
|
183
|
+
}
|
|
184
|
+
|
|
133
185
|
export type RequiredContext = IAgentContext<never>
|