@naturalpay/sdk 0.3.0 → 0.5.0
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/CHANGELOG.md +22 -0
- package/client.d.mts +23 -20
- package/client.d.mts.map +1 -1
- package/client.d.ts +23 -20
- package/client.d.ts.map +1 -1
- package/client.js +11 -8
- package/client.js.map +1 -1
- package/client.mjs +12 -9
- package/client.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/query.d.mts +3 -0
- package/internal/utils/query.d.mts.map +1 -1
- package/internal/utils/query.d.ts +3 -0
- package/internal/utils/query.d.ts.map +1 -1
- package/internal/utils/query.js +16 -3
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs +16 -2
- package/internal/utils/query.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents.d.mts +554 -268
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +554 -268
- package/resources/agents.d.ts.map +1 -1
- package/resources/agents.js +72 -20
- package/resources/agents.js.map +1 -1
- package/resources/agents.mjs +72 -20
- package/resources/agents.mjs.map +1 -1
- package/resources/api-keys.d.mts +16 -2
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +16 -2
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +7 -4
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +7 -4
- package/resources/api-keys.mjs.map +1 -1
- package/resources/customers.d.mts +243 -114
- package/resources/customers.d.mts.map +1 -1
- package/resources/customers.d.ts +243 -114
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.js +6 -7
- package/resources/customers.js.map +1 -1
- package/resources/customers.mjs +6 -7
- package/resources/customers.mjs.map +1 -1
- package/resources/index.d.mts +7 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invitations.d.mts +16 -7
- package/resources/invitations.d.mts.map +1 -1
- package/resources/invitations.d.ts +16 -7
- package/resources/invitations.d.ts.map +1 -1
- package/resources/invitations.js +6 -4
- package/resources/invitations.js.map +1 -1
- package/resources/invitations.mjs +6 -4
- package/resources/invitations.mjs.map +1 -1
- package/resources/parties.d.mts +53 -26
- package/resources/parties.d.mts.map +1 -1
- package/resources/parties.d.ts +53 -26
- package/resources/parties.d.ts.map +1 -1
- package/resources/parties.js +27 -1
- package/resources/parties.js.map +1 -1
- package/resources/parties.mjs +27 -1
- package/resources/parties.mjs.map +1 -1
- package/resources/payment-requests.d.mts +738 -33
- package/resources/payment-requests.d.mts.map +1 -1
- package/resources/payment-requests.d.ts +738 -33
- package/resources/payment-requests.d.ts.map +1 -1
- package/resources/payment-requests.js +82 -1
- package/resources/payment-requests.js.map +1 -1
- package/resources/payment-requests.mjs +82 -1
- package/resources/payment-requests.mjs.map +1 -1
- package/resources/payments.d.mts +390 -24
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +390 -24
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +53 -3
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +53 -3
- package/resources/payments.mjs.map +1 -1
- package/resources/transactions.d.mts +50 -118
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +50 -118
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +2 -2
- package/resources/transactions.mjs +2 -2
- package/resources/transfers.d.mts +1030 -0
- package/resources/transfers.d.mts.map +1 -0
- package/resources/transfers.d.ts +1030 -0
- package/resources/transfers.d.ts.map +1 -0
- package/resources/transfers.js +114 -0
- package/resources/transfers.js.map +1 -0
- package/resources/transfers.mjs +110 -0
- package/resources/transfers.mjs.map +1 -0
- package/resources/wallet.d.mts +1 -189
- package/resources/wallet.d.mts.map +1 -1
- package/resources/wallet.d.ts +1 -189
- package/resources/wallet.d.ts.map +1 -1
- package/resources/wallet.js +0 -66
- package/resources/wallet.js.map +1 -1
- package/resources/wallet.mjs +0 -66
- package/resources/wallet.mjs.map +1 -1
- package/resources/webhooks.d.mts +7 -7
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +7 -7
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +82 -43
- package/src/internal/utils/query.ts +18 -2
- package/src/resources/agents.ts +676 -300
- package/src/resources/api-keys.ts +26 -4
- package/src/resources/customers.ts +273 -132
- package/src/resources/index.ts +38 -18
- package/src/resources/invitations.ts +26 -10
- package/src/resources/parties.ts +85 -30
- package/src/resources/payment-requests.ts +949 -58
- package/src/resources/payments.ts +518 -23
- package/src/resources/transactions.ts +50 -136
- package/src/resources/transfers.ts +1338 -0
- package/src/resources/wallet.ts +0 -268
- package/src/resources/webhooks.ts +7 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/internal/qs/formats.d.mts +0 -7
- package/internal/qs/formats.d.mts.map +0 -1
- package/internal/qs/formats.d.ts +0 -7
- package/internal/qs/formats.d.ts.map +0 -1
- package/internal/qs/formats.js +0 -13
- package/internal/qs/formats.js.map +0 -1
- package/internal/qs/formats.mjs +0 -9
- package/internal/qs/formats.mjs.map +0 -1
- package/internal/qs/index.d.mts +0 -10
- package/internal/qs/index.d.mts.map +0 -1
- package/internal/qs/index.d.ts +0 -10
- package/internal/qs/index.d.ts.map +0 -1
- package/internal/qs/index.js +0 -14
- package/internal/qs/index.js.map +0 -1
- package/internal/qs/index.mjs +0 -10
- package/internal/qs/index.mjs.map +0 -1
- package/internal/qs/stringify.d.mts +0 -3
- package/internal/qs/stringify.d.mts.map +0 -1
- package/internal/qs/stringify.d.ts +0 -3
- package/internal/qs/stringify.d.ts.map +0 -1
- package/internal/qs/stringify.js +0 -277
- package/internal/qs/stringify.js.map +0 -1
- package/internal/qs/stringify.mjs +0 -274
- package/internal/qs/stringify.mjs.map +0 -1
- package/internal/qs/types.d.mts +0 -57
- package/internal/qs/types.d.mts.map +0 -1
- package/internal/qs/types.d.ts +0 -57
- package/internal/qs/types.d.ts.map +0 -1
- package/internal/qs/types.js +0 -3
- package/internal/qs/types.js.map +0 -1
- package/internal/qs/types.mjs +0 -2
- package/internal/qs/types.mjs.map +0 -1
- package/internal/qs/utils.d.mts +0 -15
- package/internal/qs/utils.d.mts.map +0 -1
- package/internal/qs/utils.d.ts +0 -15
- package/internal/qs/utils.d.ts.map +0 -1
- package/internal/qs/utils.js +0 -230
- package/internal/qs/utils.js.map +0 -1
- package/internal/qs/utils.mjs +0 -217
- package/internal/qs/utils.mjs.map +0 -1
- package/resources/delegations.d.mts +0 -458
- package/resources/delegations.d.mts.map +0 -1
- package/resources/delegations.d.ts +0 -458
- package/resources/delegations.d.ts.map +0 -1
- package/resources/delegations.js +0 -47
- package/resources/delegations.js.map +0 -1
- package/resources/delegations.mjs +0 -43
- package/resources/delegations.mjs.map +0 -1
- package/src/internal/qs/LICENSE.md +0 -13
- package/src/internal/qs/README.md +0 -3
- package/src/internal/qs/formats.ts +0 -10
- package/src/internal/qs/index.ts +0 -13
- package/src/internal/qs/stringify.ts +0 -385
- package/src/internal/qs/types.ts +0 -71
- package/src/internal/qs/utils.ts +0 -265
- package/src/resources/delegations.ts +0 -580
package/src/resources/agents.ts
CHANGED
|
@@ -105,34 +105,34 @@ export class Agents extends APIResource {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
109
|
-
* to the customer.
|
|
108
|
+
* Add or invite customer relationships for this agent.
|
|
110
109
|
*
|
|
111
110
|
* @example
|
|
112
111
|
* ```ts
|
|
113
|
-
* const response = await client.agents.
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
112
|
+
* const response = await client.agents.createCustomer(
|
|
113
|
+
* 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
114
|
+
* {
|
|
115
|
+
* permissions: ['string'],
|
|
116
|
+
* recipients: [
|
|
117
|
+
* { type: 'type', value: 'dev@stainless.com' },
|
|
118
|
+
* ],
|
|
119
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
120
|
+
* },
|
|
121
|
+
* );
|
|
123
122
|
* ```
|
|
124
123
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
createCustomer(
|
|
125
|
+
agentID: string,
|
|
126
|
+
params: AgentCreateCustomerParams,
|
|
127
127
|
options?: RequestOptions,
|
|
128
|
-
): APIPromise<
|
|
128
|
+
): APIPromise<AgentCreateCustomerResponse> {
|
|
129
129
|
const {
|
|
130
130
|
'Idempotency-Key': idempotencyKey,
|
|
131
131
|
'X-Agent-ID': xAgentID,
|
|
132
132
|
'X-Instance-ID': xInstanceID,
|
|
133
133
|
...body
|
|
134
134
|
} = params;
|
|
135
|
-
return this._client.post(
|
|
135
|
+
return this._client.post(path`/agents/${agentID}/customers`, {
|
|
136
136
|
body,
|
|
137
137
|
...options,
|
|
138
138
|
headers: buildHeaders([
|
|
@@ -175,20 +175,51 @@ export class Agents extends APIResource {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
|
-
*
|
|
178
|
+
* Get a specific customer invitation for this agent.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```ts
|
|
182
|
+
* const response = await client.agents.getCustomer(
|
|
183
|
+
* 'pty_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
184
|
+
* { agentId: 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7' },
|
|
185
|
+
* );
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
getCustomer(
|
|
189
|
+
customerID: string,
|
|
190
|
+
params: AgentGetCustomerParams,
|
|
191
|
+
options?: RequestOptions,
|
|
192
|
+
): APIPromise<AgentGetCustomerResponse> {
|
|
193
|
+
const { agentId, 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID } = params;
|
|
194
|
+
return this._client.get(path`/agents/${agentId}/customers/${customerID}`, {
|
|
195
|
+
...options,
|
|
196
|
+
headers: buildHeaders([
|
|
197
|
+
{
|
|
198
|
+
...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
|
|
199
|
+
...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
|
|
200
|
+
},
|
|
201
|
+
options?.headers,
|
|
202
|
+
]),
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* List customer invitations for this agent.
|
|
179
208
|
*
|
|
180
209
|
* @example
|
|
181
210
|
* ```ts
|
|
182
|
-
* const response =
|
|
183
|
-
*
|
|
211
|
+
* const response = await client.agents.listCustomers(
|
|
212
|
+
* 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
213
|
+
* );
|
|
184
214
|
* ```
|
|
185
215
|
*/
|
|
186
|
-
|
|
187
|
-
|
|
216
|
+
listCustomers(
|
|
217
|
+
agentID: string,
|
|
218
|
+
params: AgentListCustomersParams | null | undefined = {},
|
|
188
219
|
options?: RequestOptions,
|
|
189
|
-
): APIPromise<
|
|
220
|
+
): APIPromise<AgentListCustomersResponse> {
|
|
190
221
|
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
|
|
191
|
-
return this._client.get(
|
|
222
|
+
return this._client.get(path`/agents/${agentID}/customers`, {
|
|
192
223
|
query,
|
|
193
224
|
...options,
|
|
194
225
|
headers: buildHeaders([
|
|
@@ -202,7 +233,7 @@ export class Agents extends APIResource {
|
|
|
202
233
|
}
|
|
203
234
|
|
|
204
235
|
/**
|
|
205
|
-
*
|
|
236
|
+
* Delete an agent. Deleting an agent revokes it and cleans up active access.
|
|
206
237
|
*
|
|
207
238
|
* @example
|
|
208
239
|
* ```ts
|
|
@@ -234,6 +265,44 @@ export class Agents extends APIResource {
|
|
|
234
265
|
]),
|
|
235
266
|
});
|
|
236
267
|
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Revoke this customer invitation so the agent can no longer act for the customer.
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* ```ts
|
|
274
|
+
* const response = await client.agents.removeCustomer(
|
|
275
|
+
* 'pty_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
276
|
+
* {
|
|
277
|
+
* agentId: 'agt_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
278
|
+
* 'Idempotency-Key': 'Idempotency-Key',
|
|
279
|
+
* },
|
|
280
|
+
* );
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
removeCustomer(
|
|
284
|
+
customerID: string,
|
|
285
|
+
params: AgentRemoveCustomerParams,
|
|
286
|
+
options?: RequestOptions,
|
|
287
|
+
): APIPromise<AgentRemoveCustomerResponse> {
|
|
288
|
+
const {
|
|
289
|
+
agentId,
|
|
290
|
+
'Idempotency-Key': idempotencyKey,
|
|
291
|
+
'X-Agent-ID': xAgentID,
|
|
292
|
+
'X-Instance-ID': xInstanceID,
|
|
293
|
+
} = params;
|
|
294
|
+
return this._client.delete(path`/agents/${agentId}/customers/${customerID}`, {
|
|
295
|
+
...options,
|
|
296
|
+
headers: buildHeaders([
|
|
297
|
+
{
|
|
298
|
+
'Idempotency-Key': idempotencyKey,
|
|
299
|
+
...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
|
|
300
|
+
...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
|
|
301
|
+
},
|
|
302
|
+
options?.headers,
|
|
303
|
+
]),
|
|
304
|
+
});
|
|
305
|
+
}
|
|
237
306
|
}
|
|
238
307
|
|
|
239
308
|
export interface AgentCreateResponse {
|
|
@@ -595,32 +664,32 @@ export namespace AgentListResponse {
|
|
|
595
664
|
}
|
|
596
665
|
}
|
|
597
666
|
|
|
598
|
-
export interface
|
|
667
|
+
export interface AgentCreateCustomerResponse {
|
|
599
668
|
/**
|
|
600
|
-
*
|
|
669
|
+
* Created customer invitation resources
|
|
601
670
|
*/
|
|
602
|
-
data: Array<
|
|
671
|
+
data: Array<AgentCreateCustomerResponse.Data>;
|
|
603
672
|
|
|
604
673
|
/**
|
|
605
674
|
* Batch invitation metadata
|
|
606
675
|
*/
|
|
607
|
-
meta:
|
|
676
|
+
meta: AgentCreateCustomerResponse.Meta;
|
|
608
677
|
}
|
|
609
678
|
|
|
610
|
-
export namespace
|
|
679
|
+
export namespace AgentCreateCustomerResponse {
|
|
611
680
|
export interface Data {
|
|
612
681
|
/**
|
|
613
|
-
*
|
|
682
|
+
* Customer invitation ID (adi\_\*)
|
|
614
683
|
*/
|
|
615
684
|
id: string;
|
|
616
685
|
|
|
617
686
|
/**
|
|
618
|
-
*
|
|
687
|
+
* Invitation attributes
|
|
619
688
|
*/
|
|
620
689
|
attributes: Data.Attributes;
|
|
621
690
|
|
|
622
691
|
/**
|
|
623
|
-
* Related
|
|
692
|
+
* Related agent and customer party
|
|
624
693
|
*/
|
|
625
694
|
relationships: Data.Relationships;
|
|
626
695
|
|
|
@@ -632,78 +701,48 @@ export namespace AgentCreateInvitationsResponse {
|
|
|
632
701
|
|
|
633
702
|
export namespace Data {
|
|
634
703
|
/**
|
|
635
|
-
*
|
|
704
|
+
* Invitation attributes
|
|
636
705
|
*/
|
|
637
706
|
export interface Attributes {
|
|
638
|
-
/**
|
|
639
|
-
* When this invitation was accepted
|
|
640
|
-
*/
|
|
641
|
-
acceptedAt: string | null;
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* Display name of the agent being delegated
|
|
645
|
-
*/
|
|
646
|
-
agentName: string;
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* Why the invitation was cancelled
|
|
650
|
-
*/
|
|
651
|
-
cancelReason: 'AGENT_RETIRED' | 'DEVELOPER_RETIRED' | null;
|
|
652
|
-
|
|
653
707
|
/**
|
|
654
708
|
* When this invitation was created
|
|
655
709
|
*/
|
|
656
710
|
createdAt: string;
|
|
657
711
|
|
|
658
|
-
/**
|
|
659
|
-
* When this invitation was declined
|
|
660
|
-
*/
|
|
661
|
-
declinedAt: string | null;
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Display name of the developer party
|
|
665
|
-
*/
|
|
666
|
-
developerName: string;
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Status after applying expiry and cancel-reason overlays
|
|
670
|
-
*/
|
|
671
|
-
effectiveStatus: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
* Customer email the invitation was sent to
|
|
675
|
-
*/
|
|
676
|
-
email: string;
|
|
677
|
-
|
|
678
712
|
/**
|
|
679
713
|
* When this invitation expires
|
|
680
714
|
*/
|
|
681
715
|
expiresAt: string;
|
|
682
716
|
|
|
683
717
|
/**
|
|
684
|
-
*
|
|
718
|
+
* Requested per-agent customer limits
|
|
685
719
|
*/
|
|
686
720
|
limits: Attributes.Limits | null;
|
|
687
721
|
|
|
688
722
|
/**
|
|
689
|
-
* Permissions
|
|
723
|
+
* Permissions requested for this agent invitation
|
|
690
724
|
*/
|
|
691
725
|
permissions: Array<string>;
|
|
692
726
|
|
|
693
727
|
/**
|
|
694
|
-
*
|
|
728
|
+
* Recipient identifier used to create the invitation
|
|
695
729
|
*/
|
|
696
|
-
|
|
730
|
+
recipient: Attributes.UnionMember0 | Attributes.UnionMember1 | Attributes.UnionMember2;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Current invitation status
|
|
734
|
+
*/
|
|
735
|
+
status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
|
|
697
736
|
|
|
698
737
|
/**
|
|
699
738
|
* When this invitation was last updated
|
|
700
739
|
*/
|
|
701
|
-
updatedAt: string;
|
|
740
|
+
updatedAt: string | null;
|
|
702
741
|
}
|
|
703
742
|
|
|
704
743
|
export namespace Attributes {
|
|
705
744
|
/**
|
|
706
|
-
*
|
|
745
|
+
* Requested per-agent customer limits
|
|
707
746
|
*/
|
|
708
747
|
export interface Limits {
|
|
709
748
|
/**
|
|
@@ -711,119 +750,112 @@ export namespace AgentCreateInvitationsResponse {
|
|
|
711
750
|
*/
|
|
712
751
|
perTransaction?: number | null;
|
|
713
752
|
}
|
|
753
|
+
|
|
754
|
+
export interface UnionMember0 {
|
|
755
|
+
type: string;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Email address
|
|
759
|
+
*/
|
|
760
|
+
value: string;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
export interface UnionMember1 {
|
|
764
|
+
type: string;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Phone number in E.164 format
|
|
768
|
+
*/
|
|
769
|
+
value: string;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
export interface UnionMember2 {
|
|
773
|
+
type: string;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Natural party ID (pty\_\*)
|
|
777
|
+
*/
|
|
778
|
+
value: string;
|
|
779
|
+
}
|
|
714
780
|
}
|
|
715
781
|
|
|
716
782
|
/**
|
|
717
|
-
* Related
|
|
783
|
+
* Related agent and customer party
|
|
718
784
|
*/
|
|
719
785
|
export interface Relationships {
|
|
720
786
|
/**
|
|
721
|
-
* Agent
|
|
787
|
+
* Agent attached to this invitation
|
|
722
788
|
*/
|
|
723
789
|
agent: Relationships.Agent;
|
|
724
790
|
|
|
725
791
|
/**
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
*/
|
|
729
|
-
agentDelegation: Relationships.AgentDelegation;
|
|
730
|
-
|
|
731
|
-
/**
|
|
732
|
-
* Customer party the invitation was accepted on (null until accept)
|
|
792
|
+
* Customer party when the recipient is an existing party or once the invitation is
|
|
793
|
+
* accepted
|
|
733
794
|
*/
|
|
734
795
|
customerParty: Relationships.CustomerParty;
|
|
735
|
-
|
|
736
|
-
/**
|
|
737
|
-
* Developer party that issued the invitation
|
|
738
|
-
*/
|
|
739
|
-
developerParty: Relationships.DeveloperParty;
|
|
740
796
|
}
|
|
741
797
|
|
|
742
798
|
export namespace Relationships {
|
|
743
799
|
/**
|
|
744
|
-
* Agent
|
|
800
|
+
* Agent attached to this invitation
|
|
745
801
|
*/
|
|
746
802
|
export interface Agent {
|
|
747
|
-
/**
|
|
748
|
-
* Related resource identifier
|
|
749
|
-
*/
|
|
750
803
|
data: Agent.Data;
|
|
751
804
|
}
|
|
752
805
|
|
|
753
806
|
export namespace Agent {
|
|
754
|
-
/**
|
|
755
|
-
* Related resource identifier
|
|
756
|
-
*/
|
|
757
807
|
export interface Data {
|
|
808
|
+
/**
|
|
809
|
+
* Agent ID (agt\_\*)
|
|
810
|
+
*/
|
|
758
811
|
id: string;
|
|
759
812
|
|
|
760
813
|
/**
|
|
761
|
-
*
|
|
814
|
+
* Agent attributes
|
|
762
815
|
*/
|
|
763
|
-
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* Resulting agent delegation once accepted; currently null on public create/list
|
|
769
|
-
* responses
|
|
770
|
-
*/
|
|
771
|
-
export interface AgentDelegation {
|
|
772
|
-
/**
|
|
773
|
-
* Related resource identifier
|
|
774
|
-
*/
|
|
775
|
-
data: AgentDelegation.Data | null;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
export namespace AgentDelegation {
|
|
779
|
-
/**
|
|
780
|
-
* Related resource identifier
|
|
781
|
-
*/
|
|
782
|
-
export interface Data {
|
|
783
|
-
id: string;
|
|
816
|
+
attributes: Data.Attributes;
|
|
784
817
|
|
|
785
818
|
/**
|
|
786
819
|
* Resource type
|
|
787
820
|
*/
|
|
788
821
|
type: string;
|
|
789
822
|
}
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Customer party the invitation was accepted on (null until accept)
|
|
794
|
-
*/
|
|
795
|
-
export interface CustomerParty {
|
|
796
|
-
/**
|
|
797
|
-
* Related resource identifier
|
|
798
|
-
*/
|
|
799
|
-
data: CustomerParty.Data | null;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
export namespace CustomerParty {
|
|
803
|
-
/**
|
|
804
|
-
* Related resource identifier
|
|
805
|
-
*/
|
|
806
|
-
export interface Data {
|
|
807
|
-
id: string;
|
|
808
823
|
|
|
824
|
+
export namespace Data {
|
|
809
825
|
/**
|
|
810
|
-
*
|
|
826
|
+
* Agent attributes
|
|
811
827
|
*/
|
|
812
|
-
|
|
828
|
+
export interface Attributes {
|
|
829
|
+
/**
|
|
830
|
+
* Agent description
|
|
831
|
+
*/
|
|
832
|
+
description: string | null;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Agent display name
|
|
836
|
+
*/
|
|
837
|
+
name: string | null;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Agent status
|
|
841
|
+
*/
|
|
842
|
+
status: 'ACTIVE' | 'REVOKED';
|
|
843
|
+
}
|
|
813
844
|
}
|
|
814
845
|
}
|
|
815
846
|
|
|
816
847
|
/**
|
|
817
|
-
*
|
|
848
|
+
* Customer party when the recipient is an existing party or once the invitation is
|
|
849
|
+
* accepted
|
|
818
850
|
*/
|
|
819
|
-
export interface
|
|
851
|
+
export interface CustomerParty {
|
|
820
852
|
/**
|
|
821
853
|
* Related resource identifier
|
|
822
854
|
*/
|
|
823
|
-
data:
|
|
855
|
+
data: CustomerParty.Data | null;
|
|
824
856
|
}
|
|
825
857
|
|
|
826
|
-
export namespace
|
|
858
|
+
export namespace CustomerParty {
|
|
827
859
|
/**
|
|
828
860
|
* Related resource identifier
|
|
829
861
|
*/
|
|
@@ -966,26 +998,24 @@ export namespace AgentGetResponse {
|
|
|
966
998
|
}
|
|
967
999
|
}
|
|
968
1000
|
|
|
969
|
-
export interface
|
|
970
|
-
data:
|
|
971
|
-
|
|
972
|
-
meta: AgentListInvitationsForDeveloperResponse.Meta;
|
|
1001
|
+
export interface AgentGetCustomerResponse {
|
|
1002
|
+
data: AgentGetCustomerResponse.Data;
|
|
973
1003
|
}
|
|
974
1004
|
|
|
975
|
-
export namespace
|
|
1005
|
+
export namespace AgentGetCustomerResponse {
|
|
976
1006
|
export interface Data {
|
|
977
1007
|
/**
|
|
978
|
-
*
|
|
1008
|
+
* Customer party ID when known; otherwise the lowercased customer email
|
|
979
1009
|
*/
|
|
980
1010
|
id: string;
|
|
981
1011
|
|
|
982
1012
|
/**
|
|
983
|
-
*
|
|
1013
|
+
* Customer party attributes
|
|
984
1014
|
*/
|
|
985
1015
|
attributes: Data.Attributes;
|
|
986
1016
|
|
|
987
1017
|
/**
|
|
988
|
-
* Related
|
|
1018
|
+
* Related agent and access details
|
|
989
1019
|
*/
|
|
990
1020
|
relationships: Data.Relationships;
|
|
991
1021
|
|
|
@@ -997,208 +1027,323 @@ export namespace AgentListInvitationsForDeveloperResponse {
|
|
|
997
1027
|
|
|
998
1028
|
export namespace Data {
|
|
999
1029
|
/**
|
|
1000
|
-
*
|
|
1030
|
+
* Customer party attributes
|
|
1001
1031
|
*/
|
|
1002
1032
|
export interface Attributes {
|
|
1003
1033
|
/**
|
|
1004
|
-
*
|
|
1034
|
+
* Customer email, when known
|
|
1005
1035
|
*/
|
|
1006
|
-
|
|
1036
|
+
email: string | null;
|
|
1007
1037
|
|
|
1008
1038
|
/**
|
|
1009
|
-
*
|
|
1039
|
+
* Customer party display name, when known
|
|
1010
1040
|
*/
|
|
1011
|
-
|
|
1041
|
+
name: string | null;
|
|
1012
1042
|
|
|
1013
1043
|
/**
|
|
1014
|
-
*
|
|
1044
|
+
* The customer is represented by a party
|
|
1015
1045
|
*/
|
|
1016
|
-
|
|
1046
|
+
type: string;
|
|
1047
|
+
}
|
|
1017
1048
|
|
|
1049
|
+
/**
|
|
1050
|
+
* Related agent and access details
|
|
1051
|
+
*/
|
|
1052
|
+
export interface Relationships {
|
|
1018
1053
|
/**
|
|
1019
|
-
*
|
|
1054
|
+
* This agent's access state for the customer
|
|
1020
1055
|
*/
|
|
1021
|
-
|
|
1056
|
+
access: Relationships.Access;
|
|
1022
1057
|
|
|
1023
1058
|
/**
|
|
1024
|
-
*
|
|
1059
|
+
* Agent attached to this customer
|
|
1025
1060
|
*/
|
|
1026
|
-
|
|
1061
|
+
agent: Relationships.Agent;
|
|
1062
|
+
}
|
|
1027
1063
|
|
|
1064
|
+
export namespace Relationships {
|
|
1028
1065
|
/**
|
|
1029
|
-
*
|
|
1066
|
+
* This agent's access state for the customer
|
|
1030
1067
|
*/
|
|
1031
|
-
|
|
1068
|
+
export interface Access {
|
|
1069
|
+
data: Access.Data;
|
|
1070
|
+
}
|
|
1032
1071
|
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1072
|
+
export namespace Access {
|
|
1073
|
+
export interface Data {
|
|
1074
|
+
/**
|
|
1075
|
+
* Underlying access record ID
|
|
1076
|
+
*/
|
|
1077
|
+
id: string;
|
|
1037
1078
|
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1079
|
+
/**
|
|
1080
|
+
* Access attributes
|
|
1081
|
+
*/
|
|
1082
|
+
attributes: Data.Attributes;
|
|
1042
1083
|
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1084
|
+
/**
|
|
1085
|
+
* Resource type
|
|
1086
|
+
*/
|
|
1087
|
+
type: string;
|
|
1088
|
+
}
|
|
1047
1089
|
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1090
|
+
export namespace Data {
|
|
1091
|
+
/**
|
|
1092
|
+
* Access attributes
|
|
1093
|
+
*/
|
|
1094
|
+
export interface Attributes {
|
|
1095
|
+
/**
|
|
1096
|
+
* When this agent-customer relationship was created
|
|
1097
|
+
*/
|
|
1098
|
+
createdAt: string;
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* Per-agent customer transaction limits
|
|
1102
|
+
*/
|
|
1103
|
+
limits: Attributes.Limits | null;
|
|
1104
|
+
|
|
1105
|
+
/**
|
|
1106
|
+
* Permissions granted or requested for this agent
|
|
1107
|
+
*/
|
|
1108
|
+
permissions: Array<string>;
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Current agent-customer relationship status
|
|
1112
|
+
*/
|
|
1113
|
+
status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* When this agent-customer relationship was last updated
|
|
1117
|
+
*/
|
|
1118
|
+
updatedAt: string | null;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
export namespace Attributes {
|
|
1122
|
+
/**
|
|
1123
|
+
* Per-agent customer transaction limits
|
|
1124
|
+
*/
|
|
1125
|
+
export interface Limits {
|
|
1126
|
+
/**
|
|
1127
|
+
* Per-transaction cap, integer cents (USD).
|
|
1128
|
+
*/
|
|
1129
|
+
perTransaction?: number | null;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1052
1134
|
|
|
1053
1135
|
/**
|
|
1054
|
-
*
|
|
1136
|
+
* Agent attached to this customer
|
|
1055
1137
|
*/
|
|
1056
|
-
|
|
1138
|
+
export interface Agent {
|
|
1139
|
+
data: Agent.Data;
|
|
1140
|
+
}
|
|
1057
1141
|
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1142
|
+
export namespace Agent {
|
|
1143
|
+
export interface Data {
|
|
1144
|
+
/**
|
|
1145
|
+
* Agent ID (agt\_\*)
|
|
1146
|
+
*/
|
|
1147
|
+
id: string;
|
|
1062
1148
|
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
}
|
|
1149
|
+
/**
|
|
1150
|
+
* Agent attributes
|
|
1151
|
+
*/
|
|
1152
|
+
attributes: Data.Attributes;
|
|
1068
1153
|
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1154
|
+
/**
|
|
1155
|
+
* Resource type
|
|
1156
|
+
*/
|
|
1157
|
+
type: string;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
export namespace Data {
|
|
1161
|
+
/**
|
|
1162
|
+
* Agent attributes
|
|
1163
|
+
*/
|
|
1164
|
+
export interface Attributes {
|
|
1165
|
+
/**
|
|
1166
|
+
* Agent display name
|
|
1167
|
+
*/
|
|
1168
|
+
name: string | null;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1078
1171
|
}
|
|
1079
1172
|
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
export interface AgentListCustomersResponse {
|
|
1177
|
+
data: Array<AgentListCustomersResponse.Data>;
|
|
1178
|
+
|
|
1179
|
+
meta: AgentListCustomersResponse.Meta;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
export namespace AgentListCustomersResponse {
|
|
1183
|
+
export interface Data {
|
|
1184
|
+
/**
|
|
1185
|
+
* Customer party ID when known; otherwise the lowercased customer email
|
|
1186
|
+
*/
|
|
1187
|
+
id: string;
|
|
1080
1188
|
|
|
1081
1189
|
/**
|
|
1082
|
-
*
|
|
1190
|
+
* Customer party attributes
|
|
1083
1191
|
*/
|
|
1084
|
-
|
|
1192
|
+
attributes: Data.Attributes;
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* Related agent and access details
|
|
1196
|
+
*/
|
|
1197
|
+
relationships: Data.Relationships;
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* Resource type
|
|
1201
|
+
*/
|
|
1202
|
+
type: string;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
export namespace Data {
|
|
1206
|
+
/**
|
|
1207
|
+
* Customer party attributes
|
|
1208
|
+
*/
|
|
1209
|
+
export interface Attributes {
|
|
1085
1210
|
/**
|
|
1086
|
-
*
|
|
1211
|
+
* Customer email, when known
|
|
1087
1212
|
*/
|
|
1088
|
-
|
|
1213
|
+
email: string | null;
|
|
1089
1214
|
|
|
1090
1215
|
/**
|
|
1091
|
-
*
|
|
1092
|
-
* responses
|
|
1216
|
+
* Customer party display name, when known
|
|
1093
1217
|
*/
|
|
1094
|
-
|
|
1218
|
+
name: string | null;
|
|
1095
1219
|
|
|
1096
1220
|
/**
|
|
1097
|
-
*
|
|
1221
|
+
* The customer is represented by a party
|
|
1098
1222
|
*/
|
|
1099
|
-
|
|
1223
|
+
type: string;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* Related agent and access details
|
|
1228
|
+
*/
|
|
1229
|
+
export interface Relationships {
|
|
1230
|
+
/**
|
|
1231
|
+
* This agent's access state for the customer
|
|
1232
|
+
*/
|
|
1233
|
+
access: Relationships.Access;
|
|
1100
1234
|
|
|
1101
1235
|
/**
|
|
1102
|
-
*
|
|
1236
|
+
* Agent attached to this customer
|
|
1103
1237
|
*/
|
|
1104
|
-
|
|
1238
|
+
agent: Relationships.Agent;
|
|
1105
1239
|
}
|
|
1106
1240
|
|
|
1107
1241
|
export namespace Relationships {
|
|
1108
1242
|
/**
|
|
1109
|
-
*
|
|
1243
|
+
* This agent's access state for the customer
|
|
1110
1244
|
*/
|
|
1111
|
-
export interface
|
|
1112
|
-
|
|
1113
|
-
* Related resource identifier
|
|
1114
|
-
*/
|
|
1115
|
-
data: Agent.Data;
|
|
1245
|
+
export interface Access {
|
|
1246
|
+
data: Access.Data;
|
|
1116
1247
|
}
|
|
1117
1248
|
|
|
1118
|
-
export namespace
|
|
1119
|
-
/**
|
|
1120
|
-
* Related resource identifier
|
|
1121
|
-
*/
|
|
1249
|
+
export namespace Access {
|
|
1122
1250
|
export interface Data {
|
|
1251
|
+
/**
|
|
1252
|
+
* Underlying access record ID
|
|
1253
|
+
*/
|
|
1123
1254
|
id: string;
|
|
1124
1255
|
|
|
1256
|
+
/**
|
|
1257
|
+
* Access attributes
|
|
1258
|
+
*/
|
|
1259
|
+
attributes: Data.Attributes;
|
|
1260
|
+
|
|
1125
1261
|
/**
|
|
1126
1262
|
* Resource type
|
|
1127
1263
|
*/
|
|
1128
1264
|
type: string;
|
|
1129
1265
|
}
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
* Resulting agent delegation once accepted; currently null on public create/list
|
|
1134
|
-
* responses
|
|
1135
|
-
*/
|
|
1136
|
-
export interface AgentDelegation {
|
|
1137
|
-
/**
|
|
1138
|
-
* Related resource identifier
|
|
1139
|
-
*/
|
|
1140
|
-
data: AgentDelegation.Data | null;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
export namespace AgentDelegation {
|
|
1144
|
-
/**
|
|
1145
|
-
* Related resource identifier
|
|
1146
|
-
*/
|
|
1147
|
-
export interface Data {
|
|
1148
|
-
id: string;
|
|
1149
1266
|
|
|
1267
|
+
export namespace Data {
|
|
1150
1268
|
/**
|
|
1151
|
-
*
|
|
1269
|
+
* Access attributes
|
|
1152
1270
|
*/
|
|
1153
|
-
|
|
1271
|
+
export interface Attributes {
|
|
1272
|
+
/**
|
|
1273
|
+
* When this agent-customer relationship was created
|
|
1274
|
+
*/
|
|
1275
|
+
createdAt: string;
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Per-agent customer transaction limits
|
|
1279
|
+
*/
|
|
1280
|
+
limits: Attributes.Limits | null;
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Permissions granted or requested for this agent
|
|
1284
|
+
*/
|
|
1285
|
+
permissions: Array<string>;
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* Current agent-customer relationship status
|
|
1289
|
+
*/
|
|
1290
|
+
status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* When this agent-customer relationship was last updated
|
|
1294
|
+
*/
|
|
1295
|
+
updatedAt: string | null;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
export namespace Attributes {
|
|
1299
|
+
/**
|
|
1300
|
+
* Per-agent customer transaction limits
|
|
1301
|
+
*/
|
|
1302
|
+
export interface Limits {
|
|
1303
|
+
/**
|
|
1304
|
+
* Per-transaction cap, integer cents (USD).
|
|
1305
|
+
*/
|
|
1306
|
+
perTransaction?: number | null;
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1154
1309
|
}
|
|
1155
1310
|
}
|
|
1156
1311
|
|
|
1157
1312
|
/**
|
|
1158
|
-
*
|
|
1313
|
+
* Agent attached to this customer
|
|
1159
1314
|
*/
|
|
1160
|
-
export interface
|
|
1161
|
-
|
|
1162
|
-
* Related resource identifier
|
|
1163
|
-
*/
|
|
1164
|
-
data: CustomerParty.Data | null;
|
|
1315
|
+
export interface Agent {
|
|
1316
|
+
data: Agent.Data;
|
|
1165
1317
|
}
|
|
1166
1318
|
|
|
1167
|
-
export namespace
|
|
1168
|
-
/**
|
|
1169
|
-
* Related resource identifier
|
|
1170
|
-
*/
|
|
1319
|
+
export namespace Agent {
|
|
1171
1320
|
export interface Data {
|
|
1321
|
+
/**
|
|
1322
|
+
* Agent ID (agt\_\*)
|
|
1323
|
+
*/
|
|
1172
1324
|
id: string;
|
|
1173
1325
|
|
|
1326
|
+
/**
|
|
1327
|
+
* Agent attributes
|
|
1328
|
+
*/
|
|
1329
|
+
attributes: Data.Attributes;
|
|
1330
|
+
|
|
1174
1331
|
/**
|
|
1175
1332
|
* Resource type
|
|
1176
1333
|
*/
|
|
1177
1334
|
type: string;
|
|
1178
1335
|
}
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
/**
|
|
1182
|
-
* Developer party that issued the invitation
|
|
1183
|
-
*/
|
|
1184
|
-
export interface DeveloperParty {
|
|
1185
|
-
/**
|
|
1186
|
-
* Related resource identifier
|
|
1187
|
-
*/
|
|
1188
|
-
data: DeveloperParty.Data;
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
export namespace DeveloperParty {
|
|
1192
|
-
/**
|
|
1193
|
-
* Related resource identifier
|
|
1194
|
-
*/
|
|
1195
|
-
export interface Data {
|
|
1196
|
-
id: string;
|
|
1197
1336
|
|
|
1337
|
+
export namespace Data {
|
|
1198
1338
|
/**
|
|
1199
|
-
*
|
|
1339
|
+
* Agent attributes
|
|
1200
1340
|
*/
|
|
1201
|
-
|
|
1341
|
+
export interface Attributes {
|
|
1342
|
+
/**
|
|
1343
|
+
* Agent display name
|
|
1344
|
+
*/
|
|
1345
|
+
name: string | null;
|
|
1346
|
+
}
|
|
1202
1347
|
}
|
|
1203
1348
|
}
|
|
1204
1349
|
}
|
|
@@ -1341,6 +1486,190 @@ export namespace AgentRemoveResponse {
|
|
|
1341
1486
|
}
|
|
1342
1487
|
}
|
|
1343
1488
|
|
|
1489
|
+
export interface AgentRemoveCustomerResponse {
|
|
1490
|
+
data: AgentRemoveCustomerResponse.Data;
|
|
1491
|
+
|
|
1492
|
+
meta: AgentRemoveCustomerResponse.Meta;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
export namespace AgentRemoveCustomerResponse {
|
|
1496
|
+
export interface Data {
|
|
1497
|
+
/**
|
|
1498
|
+
* Customer party ID when known; otherwise the lowercased customer email
|
|
1499
|
+
*/
|
|
1500
|
+
id: string;
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* Customer party attributes
|
|
1504
|
+
*/
|
|
1505
|
+
attributes: Data.Attributes;
|
|
1506
|
+
|
|
1507
|
+
/**
|
|
1508
|
+
* Related agent and access details
|
|
1509
|
+
*/
|
|
1510
|
+
relationships: Data.Relationships;
|
|
1511
|
+
|
|
1512
|
+
/**
|
|
1513
|
+
* Resource type
|
|
1514
|
+
*/
|
|
1515
|
+
type: string;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
export namespace Data {
|
|
1519
|
+
/**
|
|
1520
|
+
* Customer party attributes
|
|
1521
|
+
*/
|
|
1522
|
+
export interface Attributes {
|
|
1523
|
+
/**
|
|
1524
|
+
* Customer email, when known
|
|
1525
|
+
*/
|
|
1526
|
+
email: string | null;
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* Customer party display name, when known
|
|
1530
|
+
*/
|
|
1531
|
+
name: string | null;
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* The customer is represented by a party
|
|
1535
|
+
*/
|
|
1536
|
+
type: string;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* Related agent and access details
|
|
1541
|
+
*/
|
|
1542
|
+
export interface Relationships {
|
|
1543
|
+
/**
|
|
1544
|
+
* This agent's access state for the customer
|
|
1545
|
+
*/
|
|
1546
|
+
access: Relationships.Access;
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* Agent attached to this customer
|
|
1550
|
+
*/
|
|
1551
|
+
agent: Relationships.Agent;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
export namespace Relationships {
|
|
1555
|
+
/**
|
|
1556
|
+
* This agent's access state for the customer
|
|
1557
|
+
*/
|
|
1558
|
+
export interface Access {
|
|
1559
|
+
data: Access.Data;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
export namespace Access {
|
|
1563
|
+
export interface Data {
|
|
1564
|
+
/**
|
|
1565
|
+
* Underlying access record ID
|
|
1566
|
+
*/
|
|
1567
|
+
id: string;
|
|
1568
|
+
|
|
1569
|
+
/**
|
|
1570
|
+
* Access attributes
|
|
1571
|
+
*/
|
|
1572
|
+
attributes: Data.Attributes;
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* Resource type
|
|
1576
|
+
*/
|
|
1577
|
+
type: string;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
export namespace Data {
|
|
1581
|
+
/**
|
|
1582
|
+
* Access attributes
|
|
1583
|
+
*/
|
|
1584
|
+
export interface Attributes {
|
|
1585
|
+
/**
|
|
1586
|
+
* When this agent-customer relationship was created
|
|
1587
|
+
*/
|
|
1588
|
+
createdAt: string;
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* Per-agent customer transaction limits
|
|
1592
|
+
*/
|
|
1593
|
+
limits: Attributes.Limits | null;
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* Permissions granted or requested for this agent
|
|
1597
|
+
*/
|
|
1598
|
+
permissions: Array<string>;
|
|
1599
|
+
|
|
1600
|
+
/**
|
|
1601
|
+
* Current agent-customer relationship status
|
|
1602
|
+
*/
|
|
1603
|
+
status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
|
|
1604
|
+
|
|
1605
|
+
/**
|
|
1606
|
+
* When this agent-customer relationship was last updated
|
|
1607
|
+
*/
|
|
1608
|
+
updatedAt: string | null;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
export namespace Attributes {
|
|
1612
|
+
/**
|
|
1613
|
+
* Per-agent customer transaction limits
|
|
1614
|
+
*/
|
|
1615
|
+
export interface Limits {
|
|
1616
|
+
/**
|
|
1617
|
+
* Per-transaction cap, integer cents (USD).
|
|
1618
|
+
*/
|
|
1619
|
+
perTransaction?: number | null;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
/**
|
|
1626
|
+
* Agent attached to this customer
|
|
1627
|
+
*/
|
|
1628
|
+
export interface Agent {
|
|
1629
|
+
data: Agent.Data;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
export namespace Agent {
|
|
1633
|
+
export interface Data {
|
|
1634
|
+
/**
|
|
1635
|
+
* Agent ID (agt\_\*)
|
|
1636
|
+
*/
|
|
1637
|
+
id: string;
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* Agent attributes
|
|
1641
|
+
*/
|
|
1642
|
+
attributes: Data.Attributes;
|
|
1643
|
+
|
|
1644
|
+
/**
|
|
1645
|
+
* Resource type
|
|
1646
|
+
*/
|
|
1647
|
+
type: string;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
export namespace Data {
|
|
1651
|
+
/**
|
|
1652
|
+
* Agent attributes
|
|
1653
|
+
*/
|
|
1654
|
+
export interface Attributes {
|
|
1655
|
+
/**
|
|
1656
|
+
* Agent display name
|
|
1657
|
+
*/
|
|
1658
|
+
name: string | null;
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
export interface Meta {
|
|
1666
|
+
/**
|
|
1667
|
+
* Indicates the resource was deleted
|
|
1668
|
+
*/
|
|
1669
|
+
deleted: true;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1344
1673
|
export interface AgentCreateParams {
|
|
1345
1674
|
/**
|
|
1346
1675
|
* Body param: Agent display name
|
|
@@ -1462,16 +1791,16 @@ export interface AgentListParams {
|
|
|
1462
1791
|
'X-Instance-ID'?: string;
|
|
1463
1792
|
}
|
|
1464
1793
|
|
|
1465
|
-
export interface
|
|
1794
|
+
export interface AgentCreateCustomerParams {
|
|
1466
1795
|
/**
|
|
1467
|
-
* Body param:
|
|
1796
|
+
* Body param: Permissions to request
|
|
1468
1797
|
*/
|
|
1469
|
-
|
|
1798
|
+
permissions: Array<string>;
|
|
1470
1799
|
|
|
1471
1800
|
/**
|
|
1472
|
-
* Body param:
|
|
1801
|
+
* Body param: Customer recipients to invite (1-50)
|
|
1473
1802
|
*/
|
|
1474
|
-
|
|
1803
|
+
recipients: Array<AgentCreateCustomerParams.UnionMember0 | AgentCreateCustomerParams.UnionMember1>;
|
|
1475
1804
|
|
|
1476
1805
|
/**
|
|
1477
1806
|
* Header param: Unique key for idempotent request handling. If a request with the
|
|
@@ -1484,6 +1813,11 @@ export interface AgentCreateInvitationsParams {
|
|
|
1484
1813
|
*/
|
|
1485
1814
|
expiresAt?: string;
|
|
1486
1815
|
|
|
1816
|
+
/**
|
|
1817
|
+
* Body param: Optional per-transaction limit
|
|
1818
|
+
*/
|
|
1819
|
+
limits?: AgentCreateCustomerParams.Limits;
|
|
1820
|
+
|
|
1487
1821
|
/**
|
|
1488
1822
|
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1489
1823
|
*/
|
|
@@ -1496,22 +1830,33 @@ export interface AgentCreateInvitationsParams {
|
|
|
1496
1830
|
'X-Instance-ID'?: string;
|
|
1497
1831
|
}
|
|
1498
1832
|
|
|
1499
|
-
export namespace
|
|
1500
|
-
export interface
|
|
1501
|
-
|
|
1833
|
+
export namespace AgentCreateCustomerParams {
|
|
1834
|
+
export interface UnionMember0 {
|
|
1835
|
+
type: string;
|
|
1502
1836
|
|
|
1503
|
-
|
|
1837
|
+
/**
|
|
1838
|
+
* Email address
|
|
1839
|
+
*/
|
|
1840
|
+
value: string;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
export interface UnionMember1 {
|
|
1844
|
+
type: string;
|
|
1504
1845
|
|
|
1505
|
-
|
|
1846
|
+
/**
|
|
1847
|
+
* Phone number in E.164 format
|
|
1848
|
+
*/
|
|
1849
|
+
value: string;
|
|
1506
1850
|
}
|
|
1507
1851
|
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1852
|
+
/**
|
|
1853
|
+
* Optional per-transaction limit
|
|
1854
|
+
*/
|
|
1855
|
+
export interface Limits {
|
|
1856
|
+
/**
|
|
1857
|
+
* Per-transaction cap, integer cents (USD).
|
|
1858
|
+
*/
|
|
1859
|
+
perTransaction?: number | null;
|
|
1515
1860
|
}
|
|
1516
1861
|
}
|
|
1517
1862
|
|
|
@@ -1528,31 +1873,34 @@ export interface AgentGetParams {
|
|
|
1528
1873
|
'X-Instance-ID'?: string;
|
|
1529
1874
|
}
|
|
1530
1875
|
|
|
1531
|
-
export interface
|
|
1876
|
+
export interface AgentGetCustomerParams {
|
|
1532
1877
|
/**
|
|
1533
|
-
*
|
|
1878
|
+
* Path param: Agent ID
|
|
1534
1879
|
*/
|
|
1535
|
-
agentId
|
|
1880
|
+
agentId: string;
|
|
1536
1881
|
|
|
1537
1882
|
/**
|
|
1538
|
-
*
|
|
1883
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1539
1884
|
*/
|
|
1540
|
-
|
|
1885
|
+
'X-Agent-ID'?: string;
|
|
1541
1886
|
|
|
1542
1887
|
/**
|
|
1543
|
-
*
|
|
1888
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1889
|
+
* for agent observability.
|
|
1544
1890
|
*/
|
|
1545
|
-
|
|
1891
|
+
'X-Instance-ID'?: string;
|
|
1892
|
+
}
|
|
1546
1893
|
|
|
1894
|
+
export interface AgentListCustomersParams {
|
|
1547
1895
|
/**
|
|
1548
1896
|
* Query param
|
|
1549
1897
|
*/
|
|
1550
|
-
|
|
1898
|
+
cursor?: string;
|
|
1551
1899
|
|
|
1552
1900
|
/**
|
|
1553
1901
|
* Query param
|
|
1554
1902
|
*/
|
|
1555
|
-
|
|
1903
|
+
limit?: number;
|
|
1556
1904
|
|
|
1557
1905
|
/**
|
|
1558
1906
|
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
@@ -1585,21 +1933,49 @@ export interface AgentRemoveParams {
|
|
|
1585
1933
|
'X-Instance-ID'?: string;
|
|
1586
1934
|
}
|
|
1587
1935
|
|
|
1936
|
+
export interface AgentRemoveCustomerParams {
|
|
1937
|
+
/**
|
|
1938
|
+
* Path param: Agent ID
|
|
1939
|
+
*/
|
|
1940
|
+
agentId: string;
|
|
1941
|
+
|
|
1942
|
+
/**
|
|
1943
|
+
* Header param: Unique key for idempotent request handling. If a request with the
|
|
1944
|
+
* same key was already processed, the original response is returned.
|
|
1945
|
+
*/
|
|
1946
|
+
'Idempotency-Key': string;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1950
|
+
*/
|
|
1951
|
+
'X-Agent-ID'?: string;
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1955
|
+
* for agent observability.
|
|
1956
|
+
*/
|
|
1957
|
+
'X-Instance-ID'?: string;
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1588
1960
|
export declare namespace Agents {
|
|
1589
1961
|
export {
|
|
1590
1962
|
type AgentCreateResponse as AgentCreateResponse,
|
|
1591
1963
|
type AgentUpdateResponse as AgentUpdateResponse,
|
|
1592
1964
|
type AgentListResponse as AgentListResponse,
|
|
1593
|
-
type
|
|
1965
|
+
type AgentCreateCustomerResponse as AgentCreateCustomerResponse,
|
|
1594
1966
|
type AgentGetResponse as AgentGetResponse,
|
|
1595
|
-
type
|
|
1967
|
+
type AgentGetCustomerResponse as AgentGetCustomerResponse,
|
|
1968
|
+
type AgentListCustomersResponse as AgentListCustomersResponse,
|
|
1596
1969
|
type AgentRemoveResponse as AgentRemoveResponse,
|
|
1970
|
+
type AgentRemoveCustomerResponse as AgentRemoveCustomerResponse,
|
|
1597
1971
|
type AgentCreateParams as AgentCreateParams,
|
|
1598
1972
|
type AgentUpdateParams as AgentUpdateParams,
|
|
1599
1973
|
type AgentListParams as AgentListParams,
|
|
1600
|
-
type
|
|
1974
|
+
type AgentCreateCustomerParams as AgentCreateCustomerParams,
|
|
1601
1975
|
type AgentGetParams as AgentGetParams,
|
|
1602
|
-
type
|
|
1976
|
+
type AgentGetCustomerParams as AgentGetCustomerParams,
|
|
1977
|
+
type AgentListCustomersParams as AgentListCustomersParams,
|
|
1603
1978
|
type AgentRemoveParams as AgentRemoveParams,
|
|
1979
|
+
type AgentRemoveCustomerParams as AgentRemoveCustomerParams,
|
|
1604
1980
|
};
|
|
1605
1981
|
}
|