@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.
Files changed (184) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/client.d.mts +23 -20
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +23 -20
  5. package/client.d.ts.map +1 -1
  6. package/client.js +11 -8
  7. package/client.js.map +1 -1
  8. package/client.mjs +12 -9
  9. package/client.mjs.map +1 -1
  10. package/internal/tslib.js +17 -17
  11. package/internal/utils/query.d.mts +3 -0
  12. package/internal/utils/query.d.mts.map +1 -1
  13. package/internal/utils/query.d.ts +3 -0
  14. package/internal/utils/query.d.ts.map +1 -1
  15. package/internal/utils/query.js +16 -3
  16. package/internal/utils/query.js.map +1 -1
  17. package/internal/utils/query.mjs +16 -2
  18. package/internal/utils/query.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/resources/agents.d.mts +554 -268
  21. package/resources/agents.d.mts.map +1 -1
  22. package/resources/agents.d.ts +554 -268
  23. package/resources/agents.d.ts.map +1 -1
  24. package/resources/agents.js +72 -20
  25. package/resources/agents.js.map +1 -1
  26. package/resources/agents.mjs +72 -20
  27. package/resources/agents.mjs.map +1 -1
  28. package/resources/api-keys.d.mts +16 -2
  29. package/resources/api-keys.d.mts.map +1 -1
  30. package/resources/api-keys.d.ts +16 -2
  31. package/resources/api-keys.d.ts.map +1 -1
  32. package/resources/api-keys.js +7 -4
  33. package/resources/api-keys.js.map +1 -1
  34. package/resources/api-keys.mjs +7 -4
  35. package/resources/api-keys.mjs.map +1 -1
  36. package/resources/customers.d.mts +243 -114
  37. package/resources/customers.d.mts.map +1 -1
  38. package/resources/customers.d.ts +243 -114
  39. package/resources/customers.d.ts.map +1 -1
  40. package/resources/customers.js +6 -7
  41. package/resources/customers.js.map +1 -1
  42. package/resources/customers.mjs +6 -7
  43. package/resources/customers.mjs.map +1 -1
  44. package/resources/index.d.mts +7 -7
  45. package/resources/index.d.mts.map +1 -1
  46. package/resources/index.d.ts +7 -7
  47. package/resources/index.d.ts.map +1 -1
  48. package/resources/index.js +3 -3
  49. package/resources/index.js.map +1 -1
  50. package/resources/index.mjs +2 -2
  51. package/resources/index.mjs.map +1 -1
  52. package/resources/invitations.d.mts +16 -7
  53. package/resources/invitations.d.mts.map +1 -1
  54. package/resources/invitations.d.ts +16 -7
  55. package/resources/invitations.d.ts.map +1 -1
  56. package/resources/invitations.js +6 -4
  57. package/resources/invitations.js.map +1 -1
  58. package/resources/invitations.mjs +6 -4
  59. package/resources/invitations.mjs.map +1 -1
  60. package/resources/parties.d.mts +53 -26
  61. package/resources/parties.d.mts.map +1 -1
  62. package/resources/parties.d.ts +53 -26
  63. package/resources/parties.d.ts.map +1 -1
  64. package/resources/parties.js +27 -1
  65. package/resources/parties.js.map +1 -1
  66. package/resources/parties.mjs +27 -1
  67. package/resources/parties.mjs.map +1 -1
  68. package/resources/payment-requests.d.mts +738 -33
  69. package/resources/payment-requests.d.mts.map +1 -1
  70. package/resources/payment-requests.d.ts +738 -33
  71. package/resources/payment-requests.d.ts.map +1 -1
  72. package/resources/payment-requests.js +82 -1
  73. package/resources/payment-requests.js.map +1 -1
  74. package/resources/payment-requests.mjs +82 -1
  75. package/resources/payment-requests.mjs.map +1 -1
  76. package/resources/payments.d.mts +390 -24
  77. package/resources/payments.d.mts.map +1 -1
  78. package/resources/payments.d.ts +390 -24
  79. package/resources/payments.d.ts.map +1 -1
  80. package/resources/payments.js +53 -3
  81. package/resources/payments.js.map +1 -1
  82. package/resources/payments.mjs +53 -3
  83. package/resources/payments.mjs.map +1 -1
  84. package/resources/transactions.d.mts +50 -118
  85. package/resources/transactions.d.mts.map +1 -1
  86. package/resources/transactions.d.ts +50 -118
  87. package/resources/transactions.d.ts.map +1 -1
  88. package/resources/transactions.js +2 -2
  89. package/resources/transactions.mjs +2 -2
  90. package/resources/transfers.d.mts +1030 -0
  91. package/resources/transfers.d.mts.map +1 -0
  92. package/resources/transfers.d.ts +1030 -0
  93. package/resources/transfers.d.ts.map +1 -0
  94. package/resources/transfers.js +114 -0
  95. package/resources/transfers.js.map +1 -0
  96. package/resources/transfers.mjs +110 -0
  97. package/resources/transfers.mjs.map +1 -0
  98. package/resources/wallet.d.mts +1 -189
  99. package/resources/wallet.d.mts.map +1 -1
  100. package/resources/wallet.d.ts +1 -189
  101. package/resources/wallet.d.ts.map +1 -1
  102. package/resources/wallet.js +0 -66
  103. package/resources/wallet.js.map +1 -1
  104. package/resources/wallet.mjs +0 -66
  105. package/resources/wallet.mjs.map +1 -1
  106. package/resources/webhooks.d.mts +7 -7
  107. package/resources/webhooks.d.mts.map +1 -1
  108. package/resources/webhooks.d.ts +7 -7
  109. package/resources/webhooks.d.ts.map +1 -1
  110. package/src/client.ts +82 -43
  111. package/src/internal/utils/query.ts +18 -2
  112. package/src/resources/agents.ts +676 -300
  113. package/src/resources/api-keys.ts +26 -4
  114. package/src/resources/customers.ts +273 -132
  115. package/src/resources/index.ts +38 -18
  116. package/src/resources/invitations.ts +26 -10
  117. package/src/resources/parties.ts +85 -30
  118. package/src/resources/payment-requests.ts +949 -58
  119. package/src/resources/payments.ts +518 -23
  120. package/src/resources/transactions.ts +50 -136
  121. package/src/resources/transfers.ts +1338 -0
  122. package/src/resources/wallet.ts +0 -268
  123. package/src/resources/webhooks.ts +7 -0
  124. package/src/version.ts +1 -1
  125. package/version.d.mts +1 -1
  126. package/version.d.ts +1 -1
  127. package/version.js +1 -1
  128. package/version.mjs +1 -1
  129. package/internal/qs/formats.d.mts +0 -7
  130. package/internal/qs/formats.d.mts.map +0 -1
  131. package/internal/qs/formats.d.ts +0 -7
  132. package/internal/qs/formats.d.ts.map +0 -1
  133. package/internal/qs/formats.js +0 -13
  134. package/internal/qs/formats.js.map +0 -1
  135. package/internal/qs/formats.mjs +0 -9
  136. package/internal/qs/formats.mjs.map +0 -1
  137. package/internal/qs/index.d.mts +0 -10
  138. package/internal/qs/index.d.mts.map +0 -1
  139. package/internal/qs/index.d.ts +0 -10
  140. package/internal/qs/index.d.ts.map +0 -1
  141. package/internal/qs/index.js +0 -14
  142. package/internal/qs/index.js.map +0 -1
  143. package/internal/qs/index.mjs +0 -10
  144. package/internal/qs/index.mjs.map +0 -1
  145. package/internal/qs/stringify.d.mts +0 -3
  146. package/internal/qs/stringify.d.mts.map +0 -1
  147. package/internal/qs/stringify.d.ts +0 -3
  148. package/internal/qs/stringify.d.ts.map +0 -1
  149. package/internal/qs/stringify.js +0 -277
  150. package/internal/qs/stringify.js.map +0 -1
  151. package/internal/qs/stringify.mjs +0 -274
  152. package/internal/qs/stringify.mjs.map +0 -1
  153. package/internal/qs/types.d.mts +0 -57
  154. package/internal/qs/types.d.mts.map +0 -1
  155. package/internal/qs/types.d.ts +0 -57
  156. package/internal/qs/types.d.ts.map +0 -1
  157. package/internal/qs/types.js +0 -3
  158. package/internal/qs/types.js.map +0 -1
  159. package/internal/qs/types.mjs +0 -2
  160. package/internal/qs/types.mjs.map +0 -1
  161. package/internal/qs/utils.d.mts +0 -15
  162. package/internal/qs/utils.d.mts.map +0 -1
  163. package/internal/qs/utils.d.ts +0 -15
  164. package/internal/qs/utils.d.ts.map +0 -1
  165. package/internal/qs/utils.js +0 -230
  166. package/internal/qs/utils.js.map +0 -1
  167. package/internal/qs/utils.mjs +0 -217
  168. package/internal/qs/utils.mjs.map +0 -1
  169. package/resources/delegations.d.mts +0 -458
  170. package/resources/delegations.d.mts.map +0 -1
  171. package/resources/delegations.d.ts +0 -458
  172. package/resources/delegations.d.ts.map +0 -1
  173. package/resources/delegations.js +0 -47
  174. package/resources/delegations.js.map +0 -1
  175. package/resources/delegations.mjs +0 -43
  176. package/resources/delegations.mjs.map +0 -1
  177. package/src/internal/qs/LICENSE.md +0 -13
  178. package/src/internal/qs/README.md +0 -3
  179. package/src/internal/qs/formats.ts +0 -10
  180. package/src/internal/qs/index.ts +0 -13
  181. package/src/internal/qs/stringify.ts +0 -385
  182. package/src/internal/qs/types.ts +0 -71
  183. package/src/internal/qs/utils.ts +0 -265
  184. package/src/resources/delegations.ts +0 -580
@@ -6,14 +6,13 @@ import { RequestOptions } from "../internal/request-options.js";
6
6
  */
7
7
  export declare class Customers extends APIResource {
8
8
  /**
9
- * List active customers you can operate on behalf of.
9
+ * List all customer relationships across the current developer party's agents.
10
10
  */
11
11
  list(params?: CustomerListParams | null | undefined, options?: RequestOptions): APIPromise<CustomerListResponse>;
12
12
  /**
13
- * List the pending customer invitations you've sent agent invitations grouped by
14
- * recipient.
13
+ * Get a specific customer relationship visible to the current developer party.
15
14
  */
16
- listInvitations(params?: CustomerListInvitationsParams | null | undefined, options?: RequestOptions): APIPromise<CustomerListInvitationsResponse>;
15
+ get(customerID: string, params?: CustomerGetParams | null | undefined, options?: RequestOptions): APIPromise<CustomerGetResponse>;
17
16
  }
18
17
  export interface CustomerListResponse {
19
18
  data: Array<CustomerListResponse.Data>;
@@ -32,6 +31,10 @@ export declare namespace CustomerListResponse {
32
31
  * Resource attributes
33
32
  */
34
33
  attributes: Data.Attributes;
34
+ /**
35
+ * Resource relationships
36
+ */
37
+ relationships: Data.Relationships;
35
38
  /**
36
39
  * Resource type
37
40
  */
@@ -43,53 +46,140 @@ export declare namespace CustomerListResponse {
43
46
  */
44
47
  interface Attributes {
45
48
  /**
46
- * When the delegation was created
49
+ * When the customer party was created
47
50
  */
48
- createdAt: string;
51
+ createdAt: string | null;
49
52
  /**
50
- * Customer email, if known
53
+ * Primary email
51
54
  */
52
55
  email: string | null;
53
56
  /**
54
- * Party info
55
- */
56
- party: Attributes.Party;
57
- /**
58
- * Granted permissions
57
+ * Display name, falling back to legal name when display name is unset
59
58
  */
60
- permissions: Array<string>;
61
- /**
62
- * Status (ACTIVE, etc.)
63
- */
64
- status: string;
59
+ name: string;
60
+ }
61
+ /**
62
+ * Resource relationships
63
+ */
64
+ interface Relationships {
65
65
  /**
66
- * Why walletAvailableMinor may be null: "granted" balance is fresh; "denied"
67
- * caller lacks wallets.read; "noWallet" party has not provisioned a wallet.
66
+ * Per-agent access for this customer relationship
68
67
  */
69
- walletAccess: 'granted' | 'denied' | 'noWallet';
68
+ agents: Relationships.Agents;
70
69
  /**
71
- * Available wallet balance in cents. Null when access is denied or no wallet
72
- * exists — see walletAccess.
70
+ * Delegation state for this customer relationship
73
71
  */
74
- walletAvailableMinor: number | null;
72
+ delegation: Relationships.Delegation;
75
73
  }
76
- namespace Attributes {
74
+ namespace Relationships {
77
75
  /**
78
- * Party info
76
+ * Per-agent access for this customer relationship
79
77
  */
80
- interface Party {
78
+ interface Agents {
81
79
  /**
82
- * Party handle (pty_xxx)
80
+ * Agents attached to this customer relationship
83
81
  */
84
- id: string;
82
+ data: Array<Agents.Data>;
83
+ }
84
+ namespace Agents {
85
85
  /**
86
- * Primary email
86
+ * Embedded agent access details
87
87
  */
88
- email: string | null;
88
+ interface Data {
89
+ /**
90
+ * Agent handle (agt_xxx)
91
+ */
92
+ id: string;
93
+ /**
94
+ * Agent access attributes
95
+ */
96
+ attributes: Data.Attributes;
97
+ /**
98
+ * Resource type
99
+ */
100
+ type: string;
101
+ }
102
+ namespace Data {
103
+ /**
104
+ * Agent access attributes
105
+ */
106
+ interface Attributes {
107
+ /**
108
+ * Per-agent limits for this customer relationship
109
+ */
110
+ limits: Attributes.Limits | null;
111
+ /**
112
+ * Agent display name
113
+ */
114
+ name: string | null;
115
+ /**
116
+ * Permissions this agent has for the customer
117
+ */
118
+ permissions: Array<string>;
119
+ /**
120
+ * Agent-customer relationship status
121
+ */
122
+ status: string;
123
+ }
124
+ namespace Attributes {
125
+ /**
126
+ * Per-agent limits for this customer relationship
127
+ */
128
+ interface Limits {
129
+ /**
130
+ * Positive per-transaction limit in cents. null means no per-payment limit.
131
+ */
132
+ perTransaction?: number | null;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ /**
138
+ * Delegation state for this customer relationship
139
+ */
140
+ interface Delegation {
89
141
  /**
90
- * Display name, falling back to legal name when display name is unset
142
+ * Embedded customer delegation details
91
143
  */
92
- name: string;
144
+ data: Delegation.Data;
145
+ }
146
+ namespace Delegation {
147
+ /**
148
+ * Embedded customer delegation details
149
+ */
150
+ interface Data {
151
+ /**
152
+ * Delegation handle (dlg_xxx)
153
+ */
154
+ id: string;
155
+ /**
156
+ * Delegation attributes
157
+ */
158
+ attributes: Data.Attributes;
159
+ /**
160
+ * Resource type
161
+ */
162
+ type: string;
163
+ }
164
+ namespace Data {
165
+ /**
166
+ * Delegation attributes
167
+ */
168
+ interface Attributes {
169
+ /**
170
+ * When the customer relationship was created
171
+ */
172
+ createdAt: string;
173
+ /**
174
+ * Permissions available across this customer
175
+ */
176
+ permissions: Array<string>;
177
+ /**
178
+ * Customer relationship status
179
+ */
180
+ status: string;
181
+ }
182
+ }
93
183
  }
94
184
  }
95
185
  }
@@ -103,25 +193,29 @@ export declare namespace CustomerListResponse {
103
193
  }
104
194
  }
105
195
  }
106
- export interface CustomerListInvitationsResponse {
107
- data: Array<CustomerListInvitationsResponse.Data>;
108
- meta: CustomerListInvitationsResponse.Meta;
196
+ export interface CustomerGetResponse {
197
+ /**
198
+ * Customer resource for an active customer (type='customer', id=pty_xxx).
199
+ */
200
+ data: CustomerGetResponse.Data;
109
201
  }
110
- export declare namespace CustomerListInvitationsResponse {
202
+ export declare namespace CustomerGetResponse {
111
203
  /**
112
- * A pending customer invitation (type='customerInvitation', id=recipient email)
113
- * a grouping of agent invitations sent to one recipient.
204
+ * Customer resource for an active customer (type='customer', id=pty_xxx).
114
205
  */
115
206
  interface Data {
116
207
  /**
117
- * Recipient email the grouping key for the pending invitation. Stays the id even
118
- * after the recipient creates an account.
208
+ * Customer party handle (pty_xxx)
119
209
  */
120
210
  id: string;
121
211
  /**
122
212
  * Resource attributes
123
213
  */
124
214
  attributes: Data.Attributes;
215
+ /**
216
+ * Resource relationships
217
+ */
218
+ relationships: Data.Relationships;
125
219
  /**
126
220
  * Resource type
127
221
  */
@@ -133,100 +227,143 @@ export declare namespace CustomerListInvitationsResponse {
133
227
  */
134
228
  interface Attributes {
135
229
  /**
136
- * Pending agent delegation invitations sent to this recipient
137
- */
138
- agentInvitations: Array<Attributes.AgentInvitation>;
139
- /**
140
- * When the earliest agent invitation was created
230
+ * When the customer party was created
141
231
  */
142
- createdAt: string;
232
+ createdAt: string | null;
143
233
  /**
144
- * Recipient email — the grouping key
234
+ * Primary email
145
235
  */
146
- email: string;
236
+ email: string | null;
147
237
  /**
148
- * Party info (null until the recipient creates an account)
238
+ * Display name, falling back to legal name when display name is unset
149
239
  */
150
- party: Attributes.Party | null;
240
+ name: string;
241
+ }
242
+ /**
243
+ * Resource relationships
244
+ */
245
+ interface Relationships {
151
246
  /**
152
- * Status (always PENDING)
247
+ * Per-agent access for this customer relationship
153
248
  */
154
- status: string;
249
+ agents: Relationships.Agents;
155
250
  /**
156
- * Always 'denied' for pending customers
251
+ * Delegation state for this customer relationship
157
252
  */
158
- walletAccess: 'granted' | 'denied' | 'noWallet';
253
+ delegation: Relationships.Delegation;
254
+ }
255
+ namespace Relationships {
159
256
  /**
160
- * Always null for pending customers
257
+ * Per-agent access for this customer relationship
161
258
  */
162
- walletAvailableMinor: number | null;
163
- }
164
- namespace Attributes {
165
- interface AgentInvitation {
166
- /**
167
- * Agent the invitation targets
168
- */
169
- agent: AgentInvitation.Agent;
170
- /**
171
- * When the agent invitation was created
172
- */
173
- createdAt: string;
259
+ interface Agents {
174
260
  /**
175
- * When the agent invitation expires (null if it does not expire)
261
+ * Agents attached to this customer relationship
176
262
  */
177
- expiresAt: string | null;
178
- /**
179
- * Agent delegation invitation handle (adi_xxx)
180
- */
181
- invitationId: string;
182
- /**
183
- * Permissions the invitation requests
184
- */
185
- permissions: Array<string>;
263
+ data: Array<Agents.Data>;
186
264
  }
187
- namespace AgentInvitation {
265
+ namespace Agents {
188
266
  /**
189
- * Agent the invitation targets
267
+ * Embedded agent access details
190
268
  */
191
- interface Agent {
269
+ interface Data {
192
270
  /**
193
271
  * Agent handle (agt_xxx)
194
272
  */
195
273
  id: string;
196
274
  /**
197
- * Agent display name
275
+ * Agent access attributes
276
+ */
277
+ attributes: Data.Attributes;
278
+ /**
279
+ * Resource type
198
280
  */
199
- name: string | null;
281
+ type: string;
282
+ }
283
+ namespace Data {
284
+ /**
285
+ * Agent access attributes
286
+ */
287
+ interface Attributes {
288
+ /**
289
+ * Per-agent limits for this customer relationship
290
+ */
291
+ limits: Attributes.Limits | null;
292
+ /**
293
+ * Agent display name
294
+ */
295
+ name: string | null;
296
+ /**
297
+ * Permissions this agent has for the customer
298
+ */
299
+ permissions: Array<string>;
300
+ /**
301
+ * Agent-customer relationship status
302
+ */
303
+ status: string;
304
+ }
305
+ namespace Attributes {
306
+ /**
307
+ * Per-agent limits for this customer relationship
308
+ */
309
+ interface Limits {
310
+ /**
311
+ * Positive per-transaction limit in cents. null means no per-payment limit.
312
+ */
313
+ perTransaction?: number | null;
314
+ }
315
+ }
200
316
  }
201
317
  }
202
318
  /**
203
- * Party info (null until the recipient creates an account)
319
+ * Delegation state for this customer relationship
204
320
  */
205
- interface Party {
321
+ interface Delegation {
206
322
  /**
207
- * Party handle (pty_xxx)
323
+ * Embedded customer delegation details
208
324
  */
209
- id: string;
210
- /**
211
- * Primary email
212
- */
213
- email: string | null;
325
+ data: Delegation.Data;
326
+ }
327
+ namespace Delegation {
214
328
  /**
215
- * Display name, falling back to legal name when display name is unset
329
+ * Embedded customer delegation details
216
330
  */
217
- name: string;
331
+ interface Data {
332
+ /**
333
+ * Delegation handle (dlg_xxx)
334
+ */
335
+ id: string;
336
+ /**
337
+ * Delegation attributes
338
+ */
339
+ attributes: Data.Attributes;
340
+ /**
341
+ * Resource type
342
+ */
343
+ type: string;
344
+ }
345
+ namespace Data {
346
+ /**
347
+ * Delegation attributes
348
+ */
349
+ interface Attributes {
350
+ /**
351
+ * When the customer relationship was created
352
+ */
353
+ createdAt: string;
354
+ /**
355
+ * Permissions available across this customer
356
+ */
357
+ permissions: Array<string>;
358
+ /**
359
+ * Customer relationship status
360
+ */
361
+ status: string;
362
+ }
363
+ }
218
364
  }
219
365
  }
220
366
  }
221
- interface Meta {
222
- pagination: Meta.Pagination;
223
- }
224
- namespace Meta {
225
- interface Pagination {
226
- hasMore: boolean;
227
- nextCursor: string | null;
228
- }
229
- }
230
367
  }
231
368
  export interface CustomerListParams {
232
369
  /**
@@ -247,26 +384,18 @@ export interface CustomerListParams {
247
384
  */
248
385
  'X-Instance-ID'?: string;
249
386
  }
250
- export interface CustomerListInvitationsParams {
251
- /**
252
- * Query param: Cursor for pagination
253
- */
254
- cursor?: string;
255
- /**
256
- * Query param: Maximum number of results
257
- */
258
- limit?: number;
387
+ export interface CustomerGetParams {
259
388
  /**
260
- * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
389
+ * Agent ID (agt_xxx) identifying which agent is making the request.
261
390
  */
262
391
  'X-Agent-ID'?: string;
263
392
  /**
264
- * Header param: Required when X-Agent-ID is present. Session or conversation ID
265
- * for agent observability.
393
+ * Required when X-Agent-ID is present. Session or conversation ID for agent
394
+ * observability.
266
395
  */
267
396
  'X-Instance-ID'?: string;
268
397
  }
269
398
  export declare namespace Customers {
270
- export { type CustomerListResponse as CustomerListResponse, type CustomerListInvitationsResponse as CustomerListInvitationsResponse, type CustomerListParams as CustomerListParams, type CustomerListInvitationsParams as CustomerListInvitationsParams, };
399
+ export { type CustomerListResponse as CustomerListResponse, type CustomerGetResponse as CustomerGetResponse, type CustomerListParams as CustomerListParams, type CustomerGetParams as CustomerGetParams, };
271
400
  }
272
401
  //# sourceMappingURL=customers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../src/resources/customers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AAEjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,IAAI,CACF,MAAM,G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BAEG;wBACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;wBAE3B;;2BAEG;wBACH,MAAM,EAAE,MAAM,CAAC;qBAChB;iBACF;aACF;SACF;KACF;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -4,12 +4,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Customers = void 0;
5
5
  const resource_1 = require("../core/resource.js");
6
6
  const headers_1 = require("../internal/headers.js");
7
+ const path_1 = require("../internal/utils/path.js");
7
8
  /**
8
9
  * Customer management
9
10
  */
10
11
  class Customers extends resource_1.APIResource {
11
12
  /**
12
- * List active customers you can operate on behalf of.
13
+ * List all customer relationships across the current developer party's agents.
13
14
  */
14
15
  list(params = {}, options) {
15
16
  const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
@@ -26,13 +27,11 @@ class Customers extends resource_1.APIResource {
26
27
  });
27
28
  }
28
29
  /**
29
- * List the pending customer invitations you've sent agent invitations grouped by
30
- * recipient.
30
+ * Get a specific customer relationship visible to the current developer party.
31
31
  */
32
- listInvitations(params = {}, options) {
33
- const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
34
- return this._client.get('/customers/invitations', {
35
- query,
32
+ get(customerID, params = {}, options) {
33
+ const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID } = params ?? {};
34
+ return this._client.get((0, path_1.path) `/customers/${customerID}`, {
36
35
  ...options,
37
36
  headers: (0, headers_1.buildHeaders)([
38
37
  {
@@ -1 +1 @@
1
- {"version":3,"file":"customers.js","sourceRoot":"","sources":["../src/resources/customers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAGnD;;GAEG;AACH,MAAa,SAAU,SAAQ,sBAAW;IACxC;;OAEG;IACH,IAAI,CACF,SAAgD,EAAE,EAClD,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;YACpC,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC9D,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACxE;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,eAAe,CACb,SAA2D,EAAE,EAC7D,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC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;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CACD,UAAkB,EAClB,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,UAAU,EAAE,EAAE;YACtD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC9D,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACxE;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA1CD,8BA0CC"}
@@ -1,12 +1,13 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../core/resource.mjs";
3
3
  import { buildHeaders } from "../internal/headers.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
4
5
  /**
5
6
  * Customer management
6
7
  */
7
8
  export class Customers extends APIResource {
8
9
  /**
9
- * List active customers you can operate on behalf of.
10
+ * List all customer relationships across the current developer party's agents.
10
11
  */
11
12
  list(params = {}, options) {
12
13
  const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
@@ -23,13 +24,11 @@ export class Customers extends APIResource {
23
24
  });
24
25
  }
25
26
  /**
26
- * List the pending customer invitations you've sent agent invitations grouped by
27
- * recipient.
27
+ * Get a specific customer relationship visible to the current developer party.
28
28
  */
29
- listInvitations(params = {}, options) {
30
- const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
31
- return this._client.get('/customers/invitations', {
32
- query,
29
+ get(customerID, params = {}, options) {
30
+ const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID } = params ?? {};
31
+ return this._client.get(path `/customers/${customerID}`, {
33
32
  ...options,
34
33
  headers: buildHeaders([
35
34
  {
@@ -1 +1 @@
1
- {"version":3,"file":"customers.mjs","sourceRoot":"","sources":["../src/resources/customers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAGnD;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,IAAI,CACF,SAAgD,EAAE,EAClD,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;YACpC,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC9D,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACxE;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,eAAe,CACb,SAA2D,EAAE,EAC7D,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACxF,OAAO,IAAI,CAAC,OAAO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AAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CACD,UAAkB,EAClB,SAA+C,EAAE,EACjD,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC9E,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,UAAU,EAAE,EAAE;YACtD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBAC9D,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACxE;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,14 +1,14 @@
1
1
  export { APIKeys, type APIKeyCreateResponse, type APIKeyListResponse, type APIKeyGetResponse, type APIKeyRevokeResponse, type APIKeyCreateParams, type APIKeyListParams, type APIKeyGetParams, type APIKeyRevokeParams, } from "./api-keys.mjs";
2
- export { Agents, type AgentCreateResponse, type AgentUpdateResponse, type AgentListResponse, type AgentCreateInvitationsResponse, type AgentGetResponse, type AgentListInvitationsForDeveloperResponse, type AgentRemoveResponse, type AgentCreateParams, type AgentUpdateParams, type AgentListParams, type AgentCreateInvitationsParams, type AgentGetParams, type AgentListInvitationsForDeveloperParams, type AgentRemoveParams, } from "./agents.mjs";
2
+ export { Agents, type AgentCreateResponse, type AgentUpdateResponse, type AgentListResponse, type AgentCreateCustomerResponse, type AgentGetResponse, type AgentGetCustomerResponse, type AgentListCustomersResponse, type AgentRemoveResponse, type AgentRemoveCustomerResponse, type AgentCreateParams, type AgentUpdateParams, type AgentListParams, type AgentCreateCustomerParams, type AgentGetParams, type AgentGetCustomerParams, type AgentListCustomersParams, type AgentRemoveParams, type AgentRemoveCustomerParams, } from "./agents.mjs";
3
3
  export { Counterparties, type CounterpartyListResponse, type CounterpartyListParams } from "./counterparties.mjs";
4
- export { Customers, type CustomerListResponse, type CustomerListInvitationsResponse, type CustomerListParams, type CustomerListInvitationsParams, } from "./customers.mjs";
5
- export { Delegations, type DelegationGetAgentDelegationResponse, type DelegationListAgentDelegationsResponse, type DelegationGetAgentDelegationParams, type DelegationListAgentDelegationsParams, } from "./delegations.mjs";
4
+ export { Customers, type CustomerListResponse, type CustomerGetResponse, type CustomerListParams, type CustomerGetParams, } from "./customers.mjs";
6
5
  export { ExternalAccounts, type ExternalAccountListResponse, type ExternalAccountRemoveResponse, type ExternalAccountListParams, type ExternalAccountRemoveParams, } from "./external-accounts.mjs";
7
6
  export { Invitations, type InvitationCreateResponse, type InvitationListResponse, type InvitationRevokeResponse, type InvitationCreateParams, type InvitationListParams, type InvitationRevokeParams, } from "./invitations.mjs";
8
- export { Parties, type PartyUpdateResponse, type PartyGetResponse, type PartyListMembersResponse, type PartyUpdateParams, type PartyGetParams, type PartyListMembersParams, } from "./parties.mjs";
9
- export { PaymentRequests, type PaymentRequestCreateResponse, type PaymentRequestListResponse, type PaymentRequestGetResponse, type PaymentRequestCreateParams, type PaymentRequestListParams, type PaymentRequestGetParams, } from "./payment-requests.mjs";
10
- export { Payments, type PaymentCreateResponse, type PaymentCreateParams } from "./payments.mjs";
7
+ export { Parties, type PartyUpdateResponse, type PartyGetResponse, type PartyListMembersResponse, type PartyRemoveMemberResponse, type PartyUpdateParams, type PartyGetParams, type PartyListMembersParams, type PartyRemoveMemberParams, } from "./parties.mjs";
8
+ export { PaymentRequests, type PaymentRequestCreateResponse, type PaymentRequestListResponse, type PaymentRequestDeclineResponse, type PaymentRequestFulfillResponse, type PaymentRequestGetResponse, type PaymentRequestListIncomingResponse, type PaymentRequestCreateParams, type PaymentRequestListParams, type PaymentRequestDeclineParams, type PaymentRequestFulfillParams, type PaymentRequestGetParams, type PaymentRequestListIncomingParams, } from "./payment-requests.mjs";
9
+ export { Payments, type PaymentCreateResponse, type PaymentListResponse, type PaymentGetResponse, type PaymentCreateParams, type PaymentListParams, type PaymentGetParams, } from "./payments.mjs";
11
10
  export { Transactions, type TransactionListResponse, type TransactionGetResponse, type TransactionListParams, type TransactionGetParams, } from "./transactions.mjs";
12
- export { Wallet, type WalletListResponse, type WalletGetResponse, type WalletInitiateDepositResponse, type WalletInitiateWithdrawalResponse, type WalletListParams, type WalletGetParams, type WalletInitiateDepositParams, type WalletInitiateWithdrawalParams, } from "./wallet.mjs";
11
+ export { Transfers, type TransferListResponse, type TransferGetResponse, type TransferInitiateDepositResponse, type TransferInitiateWithdrawalResponse, type TransferListParams, type TransferGetParams, type TransferInitiateDepositParams, type TransferInitiateWithdrawalParams, } from "./transfers.mjs";
12
+ export { Wallet, type WalletListResponse, type WalletGetResponse, type WalletListParams, type WalletGetParams, } from "./wallet.mjs";
13
13
  export { Webhooks, type WebhookCreateResponse, type WebhookUpdateResponse, type WebhookListResponse, type WebhookGetResponse, type WebhookRemoveResponse, type WebhookRotateSecretResponse, type WebhookCreateParams, type WebhookUpdateParams, type WebhookListParams, type WebhookGetParams, type WebhookRemoveParams, type WebhookRotateSecretParams, } from "./webhooks.mjs";
14
14
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB,uBAAmB;AACpB,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,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mB,EAAE,uBAAmB;AAC5F,OAAO,EACL,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,2BAAuB;AACxB,OAAO,EACL,MAAM,EACN,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,GACpC,qBAAiB;AAClB,OAAO,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B,uBAAmB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB,uBAAmB;AACpB,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,K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