@naturalpay/sdk 0.4.0 → 0.7.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 +17 -0
- package/client.d.mts +7 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -16
- package/client.d.ts.map +1 -1
- package/client.js +3 -12
- package/client.js.map +1 -1
- package/client.mjs +3 -12
- 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 +435 -260
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +435 -260
- 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/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 +2 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -2
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +23 -60
- package/src/internal/utils/query.ts +18 -2
- package/src/resources/agents.ts +541 -294
- package/src/resources/customers.ts +273 -132
- package/src/resources/index.ts +10 -24
- 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/resources/escalations.d.mts +0 -1124
- package/resources/escalations.d.mts.map +0 -1
- package/resources/escalations.d.ts +0 -1124
- package/resources/escalations.d.ts.map +0 -1
- package/resources/escalations.js +0 -110
- package/resources/escalations.js.map +0 -1
- package/resources/escalations.mjs +0 -106
- package/resources/escalations.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/escalations.ts +0 -1422
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
|
|
729
|
+
*/
|
|
730
|
+
recipient: Attributes.UnionMember0 | Attributes.UnionMember1 | Attributes.UnionMember2;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Current invitation status
|
|
695
734
|
*/
|
|
696
|
-
status: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
|
|
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 and invitation attributes
|
|
984
1014
|
*/
|
|
985
1015
|
attributes: Data.Attributes;
|
|
986
1016
|
|
|
987
1017
|
/**
|
|
988
|
-
* Related
|
|
1018
|
+
* Related agent details
|
|
989
1019
|
*/
|
|
990
1020
|
relationships: Data.Relationships;
|
|
991
1021
|
|
|
@@ -997,78 +1027,182 @@ export namespace AgentListInvitationsForDeveloperResponse {
|
|
|
997
1027
|
|
|
998
1028
|
export namespace Data {
|
|
999
1029
|
/**
|
|
1000
|
-
*
|
|
1030
|
+
* Customer party and invitation attributes
|
|
1001
1031
|
*/
|
|
1002
1032
|
export interface Attributes {
|
|
1003
1033
|
/**
|
|
1004
|
-
* When this
|
|
1034
|
+
* When this agent-customer relationship was created
|
|
1005
1035
|
*/
|
|
1006
|
-
|
|
1036
|
+
createdAt: string;
|
|
1007
1037
|
|
|
1008
1038
|
/**
|
|
1009
|
-
*
|
|
1039
|
+
* Customer email, when known
|
|
1010
1040
|
*/
|
|
1011
|
-
|
|
1041
|
+
email: string | null;
|
|
1012
1042
|
|
|
1013
1043
|
/**
|
|
1014
|
-
*
|
|
1044
|
+
* Per-agent customer transaction limits
|
|
1015
1045
|
*/
|
|
1016
|
-
|
|
1046
|
+
limits: Attributes.Limits | null;
|
|
1017
1047
|
|
|
1018
1048
|
/**
|
|
1019
|
-
*
|
|
1049
|
+
* Customer party display name, when known
|
|
1020
1050
|
*/
|
|
1021
|
-
|
|
1051
|
+
name: string | null;
|
|
1022
1052
|
|
|
1023
1053
|
/**
|
|
1024
|
-
*
|
|
1054
|
+
* Permissions granted or requested for this agent
|
|
1025
1055
|
*/
|
|
1026
|
-
|
|
1056
|
+
permissions: Array<string>;
|
|
1027
1057
|
|
|
1028
1058
|
/**
|
|
1029
|
-
*
|
|
1059
|
+
* Current agent-customer relationship status
|
|
1030
1060
|
*/
|
|
1031
|
-
|
|
1061
|
+
status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
|
|
1032
1062
|
|
|
1033
1063
|
/**
|
|
1034
|
-
*
|
|
1064
|
+
* When this agent-customer relationship was last updated
|
|
1035
1065
|
*/
|
|
1036
|
-
|
|
1066
|
+
updatedAt: string | null;
|
|
1067
|
+
}
|
|
1037
1068
|
|
|
1069
|
+
export namespace Attributes {
|
|
1038
1070
|
/**
|
|
1039
|
-
*
|
|
1071
|
+
* Per-agent customer transaction limits
|
|
1040
1072
|
*/
|
|
1041
|
-
|
|
1073
|
+
export interface Limits {
|
|
1074
|
+
/**
|
|
1075
|
+
* Per-transaction cap, integer cents (USD).
|
|
1076
|
+
*/
|
|
1077
|
+
perTransaction?: number | null;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1042
1080
|
|
|
1081
|
+
/**
|
|
1082
|
+
* Related agent details
|
|
1083
|
+
*/
|
|
1084
|
+
export interface Relationships {
|
|
1043
1085
|
/**
|
|
1044
|
-
*
|
|
1086
|
+
* Agent attached to this customer
|
|
1045
1087
|
*/
|
|
1046
|
-
|
|
1088
|
+
agent: Relationships.Agent;
|
|
1089
|
+
}
|
|
1047
1090
|
|
|
1091
|
+
export namespace Relationships {
|
|
1048
1092
|
/**
|
|
1049
|
-
*
|
|
1093
|
+
* Agent attached to this customer
|
|
1094
|
+
*/
|
|
1095
|
+
export interface Agent {
|
|
1096
|
+
data: Agent.Data;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
export namespace Agent {
|
|
1100
|
+
export interface Data {
|
|
1101
|
+
/**
|
|
1102
|
+
* Agent ID (agt\_\*)
|
|
1103
|
+
*/
|
|
1104
|
+
id: string;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Agent attributes
|
|
1108
|
+
*/
|
|
1109
|
+
attributes: Data.Attributes;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* Resource type
|
|
1113
|
+
*/
|
|
1114
|
+
type: string;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
export namespace Data {
|
|
1118
|
+
/**
|
|
1119
|
+
* Agent attributes
|
|
1120
|
+
*/
|
|
1121
|
+
export interface Attributes {
|
|
1122
|
+
/**
|
|
1123
|
+
* Agent display name
|
|
1124
|
+
*/
|
|
1125
|
+
name: string | null;
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
export interface AgentListCustomersResponse {
|
|
1134
|
+
data: Array<AgentListCustomersResponse.Data>;
|
|
1135
|
+
|
|
1136
|
+
meta: AgentListCustomersResponse.Meta;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
export namespace AgentListCustomersResponse {
|
|
1140
|
+
export interface Data {
|
|
1141
|
+
/**
|
|
1142
|
+
* Customer party ID when known; otherwise the lowercased customer email
|
|
1143
|
+
*/
|
|
1144
|
+
id: string;
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* Customer party and invitation attributes
|
|
1148
|
+
*/
|
|
1149
|
+
attributes: Data.Attributes;
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Related agent details
|
|
1153
|
+
*/
|
|
1154
|
+
relationships: Data.Relationships;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Resource type
|
|
1158
|
+
*/
|
|
1159
|
+
type: string;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
export namespace Data {
|
|
1163
|
+
/**
|
|
1164
|
+
* Customer party and invitation attributes
|
|
1165
|
+
*/
|
|
1166
|
+
export interface Attributes {
|
|
1167
|
+
/**
|
|
1168
|
+
* When this agent-customer relationship was created
|
|
1169
|
+
*/
|
|
1170
|
+
createdAt: string;
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* Customer email, when known
|
|
1174
|
+
*/
|
|
1175
|
+
email: string | null;
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Per-agent customer transaction limits
|
|
1050
1179
|
*/
|
|
1051
1180
|
limits: Attributes.Limits | null;
|
|
1052
1181
|
|
|
1053
1182
|
/**
|
|
1054
|
-
*
|
|
1183
|
+
* Customer party display name, when known
|
|
1184
|
+
*/
|
|
1185
|
+
name: string | null;
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Permissions granted or requested for this agent
|
|
1055
1189
|
*/
|
|
1056
1190
|
permissions: Array<string>;
|
|
1057
1191
|
|
|
1058
1192
|
/**
|
|
1059
|
-
*
|
|
1193
|
+
* Current agent-customer relationship status
|
|
1060
1194
|
*/
|
|
1061
|
-
status: 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED';
|
|
1195
|
+
status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
|
|
1062
1196
|
|
|
1063
1197
|
/**
|
|
1064
|
-
* When this
|
|
1198
|
+
* When this agent-customer relationship was last updated
|
|
1065
1199
|
*/
|
|
1066
|
-
updatedAt: string;
|
|
1200
|
+
updatedAt: string | null;
|
|
1067
1201
|
}
|
|
1068
1202
|
|
|
1069
1203
|
export namespace Attributes {
|
|
1070
1204
|
/**
|
|
1071
|
-
* Per-agent transaction limits
|
|
1205
|
+
* Per-agent customer transaction limits
|
|
1072
1206
|
*/
|
|
1073
1207
|
export interface Limits {
|
|
1074
1208
|
/**
|
|
@@ -1079,126 +1213,51 @@ export namespace AgentListInvitationsForDeveloperResponse {
|
|
|
1079
1213
|
}
|
|
1080
1214
|
|
|
1081
1215
|
/**
|
|
1082
|
-
* Related
|
|
1216
|
+
* Related agent details
|
|
1083
1217
|
*/
|
|
1084
1218
|
export interface Relationships {
|
|
1085
1219
|
/**
|
|
1086
|
-
* Agent
|
|
1220
|
+
* Agent attached to this customer
|
|
1087
1221
|
*/
|
|
1088
1222
|
agent: Relationships.Agent;
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* Resulting agent delegation once accepted; currently null on public create/list
|
|
1092
|
-
* responses
|
|
1093
|
-
*/
|
|
1094
|
-
agentDelegation: Relationships.AgentDelegation;
|
|
1095
|
-
|
|
1096
|
-
/**
|
|
1097
|
-
* Customer party the invitation was accepted on (null until accept)
|
|
1098
|
-
*/
|
|
1099
|
-
customerParty: Relationships.CustomerParty;
|
|
1100
|
-
|
|
1101
|
-
/**
|
|
1102
|
-
* Developer party that issued the invitation
|
|
1103
|
-
*/
|
|
1104
|
-
developerParty: Relationships.DeveloperParty;
|
|
1105
1223
|
}
|
|
1106
1224
|
|
|
1107
1225
|
export namespace Relationships {
|
|
1108
1226
|
/**
|
|
1109
|
-
* Agent
|
|
1227
|
+
* Agent attached to this customer
|
|
1110
1228
|
*/
|
|
1111
1229
|
export interface Agent {
|
|
1112
|
-
/**
|
|
1113
|
-
* Related resource identifier
|
|
1114
|
-
*/
|
|
1115
1230
|
data: Agent.Data;
|
|
1116
1231
|
}
|
|
1117
1232
|
|
|
1118
1233
|
export namespace Agent {
|
|
1119
|
-
/**
|
|
1120
|
-
* Related resource identifier
|
|
1121
|
-
*/
|
|
1122
1234
|
export interface Data {
|
|
1123
|
-
id: string;
|
|
1124
|
-
|
|
1125
1235
|
/**
|
|
1126
|
-
*
|
|
1236
|
+
* Agent ID (agt\_\*)
|
|
1127
1237
|
*/
|
|
1128
|
-
type: string;
|
|
1129
|
-
}
|
|
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
1238
|
id: string;
|
|
1149
1239
|
|
|
1150
1240
|
/**
|
|
1151
|
-
*
|
|
1241
|
+
* Agent attributes
|
|
1152
1242
|
*/
|
|
1153
|
-
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
/**
|
|
1158
|
-
* Customer party the invitation was accepted on (null until accept)
|
|
1159
|
-
*/
|
|
1160
|
-
export interface CustomerParty {
|
|
1161
|
-
/**
|
|
1162
|
-
* Related resource identifier
|
|
1163
|
-
*/
|
|
1164
|
-
data: CustomerParty.Data | null;
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
export namespace CustomerParty {
|
|
1168
|
-
/**
|
|
1169
|
-
* Related resource identifier
|
|
1170
|
-
*/
|
|
1171
|
-
export interface Data {
|
|
1172
|
-
id: string;
|
|
1243
|
+
attributes: Data.Attributes;
|
|
1173
1244
|
|
|
1174
1245
|
/**
|
|
1175
1246
|
* Resource type
|
|
1176
1247
|
*/
|
|
1177
1248
|
type: string;
|
|
1178
1249
|
}
|
|
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
1250
|
|
|
1251
|
+
export namespace Data {
|
|
1198
1252
|
/**
|
|
1199
|
-
*
|
|
1253
|
+
* Agent attributes
|
|
1200
1254
|
*/
|
|
1201
|
-
|
|
1255
|
+
export interface Attributes {
|
|
1256
|
+
/**
|
|
1257
|
+
* Agent display name
|
|
1258
|
+
*/
|
|
1259
|
+
name: string | null;
|
|
1260
|
+
}
|
|
1202
1261
|
}
|
|
1203
1262
|
}
|
|
1204
1263
|
}
|
|
@@ -1341,6 +1400,147 @@ export namespace AgentRemoveResponse {
|
|
|
1341
1400
|
}
|
|
1342
1401
|
}
|
|
1343
1402
|
|
|
1403
|
+
export interface AgentRemoveCustomerResponse {
|
|
1404
|
+
data: AgentRemoveCustomerResponse.Data;
|
|
1405
|
+
|
|
1406
|
+
meta: AgentRemoveCustomerResponse.Meta;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
export namespace AgentRemoveCustomerResponse {
|
|
1410
|
+
export interface Data {
|
|
1411
|
+
/**
|
|
1412
|
+
* Customer party ID when known; otherwise the lowercased customer email
|
|
1413
|
+
*/
|
|
1414
|
+
id: string;
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* Customer party and invitation attributes
|
|
1418
|
+
*/
|
|
1419
|
+
attributes: Data.Attributes;
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* Related agent details
|
|
1423
|
+
*/
|
|
1424
|
+
relationships: Data.Relationships;
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Resource type
|
|
1428
|
+
*/
|
|
1429
|
+
type: string;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
export namespace Data {
|
|
1433
|
+
/**
|
|
1434
|
+
* Customer party and invitation attributes
|
|
1435
|
+
*/
|
|
1436
|
+
export interface Attributes {
|
|
1437
|
+
/**
|
|
1438
|
+
* When this agent-customer relationship was created
|
|
1439
|
+
*/
|
|
1440
|
+
createdAt: string;
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* Customer email, when known
|
|
1444
|
+
*/
|
|
1445
|
+
email: string | null;
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* Per-agent customer transaction limits
|
|
1449
|
+
*/
|
|
1450
|
+
limits: Attributes.Limits | null;
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* Customer party display name, when known
|
|
1454
|
+
*/
|
|
1455
|
+
name: string | null;
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* Permissions granted or requested for this agent
|
|
1459
|
+
*/
|
|
1460
|
+
permissions: Array<string>;
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* Current agent-customer relationship status
|
|
1464
|
+
*/
|
|
1465
|
+
status: 'ACTIVE' | 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED' | 'REVOKED';
|
|
1466
|
+
|
|
1467
|
+
/**
|
|
1468
|
+
* When this agent-customer relationship was last updated
|
|
1469
|
+
*/
|
|
1470
|
+
updatedAt: string | null;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
export namespace Attributes {
|
|
1474
|
+
/**
|
|
1475
|
+
* Per-agent customer transaction limits
|
|
1476
|
+
*/
|
|
1477
|
+
export interface Limits {
|
|
1478
|
+
/**
|
|
1479
|
+
* Per-transaction cap, integer cents (USD).
|
|
1480
|
+
*/
|
|
1481
|
+
perTransaction?: number | null;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* Related agent details
|
|
1487
|
+
*/
|
|
1488
|
+
export interface Relationships {
|
|
1489
|
+
/**
|
|
1490
|
+
* Agent attached to this customer
|
|
1491
|
+
*/
|
|
1492
|
+
agent: Relationships.Agent;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
export namespace Relationships {
|
|
1496
|
+
/**
|
|
1497
|
+
* Agent attached to this customer
|
|
1498
|
+
*/
|
|
1499
|
+
export interface Agent {
|
|
1500
|
+
data: Agent.Data;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
export namespace Agent {
|
|
1504
|
+
export interface Data {
|
|
1505
|
+
/**
|
|
1506
|
+
* Agent ID (agt\_\*)
|
|
1507
|
+
*/
|
|
1508
|
+
id: string;
|
|
1509
|
+
|
|
1510
|
+
/**
|
|
1511
|
+
* Agent attributes
|
|
1512
|
+
*/
|
|
1513
|
+
attributes: Data.Attributes;
|
|
1514
|
+
|
|
1515
|
+
/**
|
|
1516
|
+
* Resource type
|
|
1517
|
+
*/
|
|
1518
|
+
type: string;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
export namespace Data {
|
|
1522
|
+
/**
|
|
1523
|
+
* Agent attributes
|
|
1524
|
+
*/
|
|
1525
|
+
export interface Attributes {
|
|
1526
|
+
/**
|
|
1527
|
+
* Agent display name
|
|
1528
|
+
*/
|
|
1529
|
+
name: string | null;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
export interface Meta {
|
|
1537
|
+
/**
|
|
1538
|
+
* Indicates the resource was deleted
|
|
1539
|
+
*/
|
|
1540
|
+
deleted: true;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1344
1544
|
export interface AgentCreateParams {
|
|
1345
1545
|
/**
|
|
1346
1546
|
* Body param: Agent display name
|
|
@@ -1462,16 +1662,16 @@ export interface AgentListParams {
|
|
|
1462
1662
|
'X-Instance-ID'?: string;
|
|
1463
1663
|
}
|
|
1464
1664
|
|
|
1465
|
-
export interface
|
|
1665
|
+
export interface AgentCreateCustomerParams {
|
|
1466
1666
|
/**
|
|
1467
|
-
* Body param:
|
|
1667
|
+
* Body param: Permissions to request
|
|
1468
1668
|
*/
|
|
1469
|
-
|
|
1669
|
+
permissions: Array<string>;
|
|
1470
1670
|
|
|
1471
1671
|
/**
|
|
1472
|
-
* Body param:
|
|
1672
|
+
* Body param: Customer recipients to invite (1-50)
|
|
1473
1673
|
*/
|
|
1474
|
-
|
|
1674
|
+
recipients: Array<AgentCreateCustomerParams.UnionMember0 | AgentCreateCustomerParams.UnionMember1>;
|
|
1475
1675
|
|
|
1476
1676
|
/**
|
|
1477
1677
|
* Header param: Unique key for idempotent request handling. If a request with the
|
|
@@ -1484,6 +1684,11 @@ export interface AgentCreateInvitationsParams {
|
|
|
1484
1684
|
*/
|
|
1485
1685
|
expiresAt?: string;
|
|
1486
1686
|
|
|
1687
|
+
/**
|
|
1688
|
+
* Body param: Optional per-transaction limit
|
|
1689
|
+
*/
|
|
1690
|
+
limits?: AgentCreateCustomerParams.Limits;
|
|
1691
|
+
|
|
1487
1692
|
/**
|
|
1488
1693
|
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1489
1694
|
*/
|
|
@@ -1496,22 +1701,33 @@ export interface AgentCreateInvitationsParams {
|
|
|
1496
1701
|
'X-Instance-ID'?: string;
|
|
1497
1702
|
}
|
|
1498
1703
|
|
|
1499
|
-
export namespace
|
|
1500
|
-
export interface
|
|
1501
|
-
|
|
1704
|
+
export namespace AgentCreateCustomerParams {
|
|
1705
|
+
export interface UnionMember0 {
|
|
1706
|
+
type: string;
|
|
1502
1707
|
|
|
1503
|
-
|
|
1708
|
+
/**
|
|
1709
|
+
* Email address
|
|
1710
|
+
*/
|
|
1711
|
+
value: string;
|
|
1712
|
+
}
|
|
1504
1713
|
|
|
1505
|
-
|
|
1714
|
+
export interface UnionMember1 {
|
|
1715
|
+
type: string;
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* Phone number in E.164 format
|
|
1719
|
+
*/
|
|
1720
|
+
value: string;
|
|
1506
1721
|
}
|
|
1507
1722
|
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1723
|
+
/**
|
|
1724
|
+
* Optional per-transaction limit
|
|
1725
|
+
*/
|
|
1726
|
+
export interface Limits {
|
|
1727
|
+
/**
|
|
1728
|
+
* Per-transaction cap, integer cents (USD).
|
|
1729
|
+
*/
|
|
1730
|
+
perTransaction?: number | null;
|
|
1515
1731
|
}
|
|
1516
1732
|
}
|
|
1517
1733
|
|
|
@@ -1528,31 +1744,34 @@ export interface AgentGetParams {
|
|
|
1528
1744
|
'X-Instance-ID'?: string;
|
|
1529
1745
|
}
|
|
1530
1746
|
|
|
1531
|
-
export interface
|
|
1747
|
+
export interface AgentGetCustomerParams {
|
|
1532
1748
|
/**
|
|
1533
|
-
*
|
|
1749
|
+
* Path param: Agent ID
|
|
1534
1750
|
*/
|
|
1535
|
-
agentId
|
|
1751
|
+
agentId: string;
|
|
1536
1752
|
|
|
1537
1753
|
/**
|
|
1538
|
-
*
|
|
1754
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1539
1755
|
*/
|
|
1540
|
-
|
|
1756
|
+
'X-Agent-ID'?: string;
|
|
1541
1757
|
|
|
1542
1758
|
/**
|
|
1543
|
-
*
|
|
1759
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1760
|
+
* for agent observability.
|
|
1544
1761
|
*/
|
|
1545
|
-
|
|
1762
|
+
'X-Instance-ID'?: string;
|
|
1763
|
+
}
|
|
1546
1764
|
|
|
1765
|
+
export interface AgentListCustomersParams {
|
|
1547
1766
|
/**
|
|
1548
1767
|
* Query param
|
|
1549
1768
|
*/
|
|
1550
|
-
|
|
1769
|
+
cursor?: string;
|
|
1551
1770
|
|
|
1552
1771
|
/**
|
|
1553
1772
|
* Query param
|
|
1554
1773
|
*/
|
|
1555
|
-
|
|
1774
|
+
limit?: number;
|
|
1556
1775
|
|
|
1557
1776
|
/**
|
|
1558
1777
|
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
@@ -1585,21 +1804,49 @@ export interface AgentRemoveParams {
|
|
|
1585
1804
|
'X-Instance-ID'?: string;
|
|
1586
1805
|
}
|
|
1587
1806
|
|
|
1807
|
+
export interface AgentRemoveCustomerParams {
|
|
1808
|
+
/**
|
|
1809
|
+
* Path param: Agent ID
|
|
1810
|
+
*/
|
|
1811
|
+
agentId: string;
|
|
1812
|
+
|
|
1813
|
+
/**
|
|
1814
|
+
* Header param: Unique key for idempotent request handling. If a request with the
|
|
1815
|
+
* same key was already processed, the original response is returned.
|
|
1816
|
+
*/
|
|
1817
|
+
'Idempotency-Key': string;
|
|
1818
|
+
|
|
1819
|
+
/**
|
|
1820
|
+
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
1821
|
+
*/
|
|
1822
|
+
'X-Agent-ID'?: string;
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
1826
|
+
* for agent observability.
|
|
1827
|
+
*/
|
|
1828
|
+
'X-Instance-ID'?: string;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1588
1831
|
export declare namespace Agents {
|
|
1589
1832
|
export {
|
|
1590
1833
|
type AgentCreateResponse as AgentCreateResponse,
|
|
1591
1834
|
type AgentUpdateResponse as AgentUpdateResponse,
|
|
1592
1835
|
type AgentListResponse as AgentListResponse,
|
|
1593
|
-
type
|
|
1836
|
+
type AgentCreateCustomerResponse as AgentCreateCustomerResponse,
|
|
1594
1837
|
type AgentGetResponse as AgentGetResponse,
|
|
1595
|
-
type
|
|
1838
|
+
type AgentGetCustomerResponse as AgentGetCustomerResponse,
|
|
1839
|
+
type AgentListCustomersResponse as AgentListCustomersResponse,
|
|
1596
1840
|
type AgentRemoveResponse as AgentRemoveResponse,
|
|
1841
|
+
type AgentRemoveCustomerResponse as AgentRemoveCustomerResponse,
|
|
1597
1842
|
type AgentCreateParams as AgentCreateParams,
|
|
1598
1843
|
type AgentUpdateParams as AgentUpdateParams,
|
|
1599
1844
|
type AgentListParams as AgentListParams,
|
|
1600
|
-
type
|
|
1845
|
+
type AgentCreateCustomerParams as AgentCreateCustomerParams,
|
|
1601
1846
|
type AgentGetParams as AgentGetParams,
|
|
1602
|
-
type
|
|
1847
|
+
type AgentGetCustomerParams as AgentGetCustomerParams,
|
|
1848
|
+
type AgentListCustomersParams as AgentListCustomersParams,
|
|
1603
1849
|
type AgentRemoveParams as AgentRemoveParams,
|
|
1850
|
+
type AgentRemoveCustomerParams as AgentRemoveCustomerParams,
|
|
1604
1851
|
};
|
|
1605
1852
|
}
|