@naturalpay/sdk 0.11.0 → 0.13.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 (95) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +1 -1
  3. package/resources/agents.d.mts +54 -27
  4. package/resources/agents.d.mts.map +1 -1
  5. package/resources/agents.d.ts +54 -27
  6. package/resources/agents.d.ts.map +1 -1
  7. package/resources/api-keys.d.mts +24 -12
  8. package/resources/api-keys.d.mts.map +1 -1
  9. package/resources/api-keys.d.ts +24 -12
  10. package/resources/api-keys.d.ts.map +1 -1
  11. package/resources/approvals.d.mts +24 -12
  12. package/resources/approvals.d.mts.map +1 -1
  13. package/resources/approvals.d.ts +24 -12
  14. package/resources/approvals.d.ts.map +1 -1
  15. package/resources/counterparties.d.mts +6 -3
  16. package/resources/counterparties.d.mts.map +1 -1
  17. package/resources/counterparties.d.ts +6 -3
  18. package/resources/counterparties.d.ts.map +1 -1
  19. package/resources/customers.d.mts +12 -6
  20. package/resources/customers.d.mts.map +1 -1
  21. package/resources/customers.d.ts +12 -6
  22. package/resources/customers.d.ts.map +1 -1
  23. package/resources/external-accounts.d.mts +12 -6
  24. package/resources/external-accounts.d.mts.map +1 -1
  25. package/resources/external-accounts.d.ts +12 -6
  26. package/resources/external-accounts.d.ts.map +1 -1
  27. package/resources/invitations.d.mts +18 -9
  28. package/resources/invitations.d.mts.map +1 -1
  29. package/resources/invitations.d.ts +18 -9
  30. package/resources/invitations.d.ts.map +1 -1
  31. package/resources/parties.d.mts +24 -12
  32. package/resources/parties.d.mts.map +1 -1
  33. package/resources/parties.d.ts +24 -12
  34. package/resources/parties.d.ts.map +1 -1
  35. package/resources/payment-requests.d.mts +69 -75
  36. package/resources/payment-requests.d.mts.map +1 -1
  37. package/resources/payment-requests.d.ts +69 -75
  38. package/resources/payment-requests.d.ts.map +1 -1
  39. package/resources/payment-requests.js +49 -34
  40. package/resources/payment-requests.js.map +1 -1
  41. package/resources/payment-requests.mjs +49 -34
  42. package/resources/payment-requests.mjs.map +1 -1
  43. package/resources/payments.d.mts +46 -43
  44. package/resources/payments.d.mts.map +1 -1
  45. package/resources/payments.d.ts +46 -43
  46. package/resources/payments.d.ts.map +1 -1
  47. package/resources/payments.js +30 -23
  48. package/resources/payments.js.map +1 -1
  49. package/resources/payments.mjs +30 -23
  50. package/resources/payments.mjs.map +1 -1
  51. package/resources/transactions.d.mts +23 -15
  52. package/resources/transactions.d.mts.map +1 -1
  53. package/resources/transactions.d.ts +23 -15
  54. package/resources/transactions.d.ts.map +1 -1
  55. package/resources/transactions.js +18 -6
  56. package/resources/transactions.js.map +1 -1
  57. package/resources/transactions.mjs +18 -6
  58. package/resources/transactions.mjs.map +1 -1
  59. package/resources/transfers.d.mts +48 -43
  60. package/resources/transfers.d.mts.map +1 -1
  61. package/resources/transfers.d.ts +48 -43
  62. package/resources/transfers.d.ts.map +1 -1
  63. package/resources/transfers.js +29 -20
  64. package/resources/transfers.js.map +1 -1
  65. package/resources/transfers.mjs +29 -20
  66. package/resources/transfers.mjs.map +1 -1
  67. package/resources/wallet.d.mts +20 -30
  68. package/resources/wallet.d.mts.map +1 -1
  69. package/resources/wallet.d.ts +20 -30
  70. package/resources/wallet.d.ts.map +1 -1
  71. package/resources/wallet.js +4 -4
  72. package/resources/wallet.mjs +4 -4
  73. package/resources/webhooks.d.mts +36 -18
  74. package/resources/webhooks.d.mts.map +1 -1
  75. package/resources/webhooks.d.ts +36 -18
  76. package/resources/webhooks.d.ts.map +1 -1
  77. package/src/resources/agents.ts +54 -27
  78. package/src/resources/api-keys.ts +24 -12
  79. package/src/resources/approvals.ts +24 -12
  80. package/src/resources/counterparties.ts +6 -3
  81. package/src/resources/customers.ts +12 -6
  82. package/src/resources/external-accounts.ts +12 -6
  83. package/src/resources/invitations.ts +18 -9
  84. package/src/resources/parties.ts +24 -12
  85. package/src/resources/payment-requests.ts +113 -88
  86. package/src/resources/payments.ts +83 -53
  87. package/src/resources/transactions.ts +44 -21
  88. package/src/resources/transfers.ts +79 -51
  89. package/src/resources/wallet.ts +20 -34
  90. package/src/resources/webhooks.ts +36 -18
  91. package/src/version.ts +1 -1
  92. package/version.d.mts +1 -1
  93. package/version.d.ts +1 -1
  94. package/version.js +1 -1
  95. package/version.mjs +1 -1
@@ -13,12 +13,21 @@ export class Transactions extends APIResource {
13
13
  /**
14
14
  * List transactions visible to your party.
15
15
  */
16
- list(params: TransactionListParams, options?: RequestOptions): APIPromise<TransactionListResponse> {
17
- const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params;
16
+ list(
17
+ params: TransactionListParams | null | undefined = {},
18
+ options?: RequestOptions,
19
+ ): APIPromise<TransactionListResponse> {
20
+ const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
18
21
  return this._client.get('/transactions', {
19
22
  query,
20
23
  ...options,
21
- headers: buildHeaders([{ 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID }, options?.headers]),
24
+ headers: buildHeaders([
25
+ {
26
+ ...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
27
+ ...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
28
+ },
29
+ options?.headers,
30
+ ]),
22
31
  });
23
32
  }
24
33
 
@@ -27,14 +36,20 @@ export class Transactions extends APIResource {
27
36
  */
28
37
  get(
29
38
  transactionID: string,
30
- params: TransactionGetParams,
39
+ params: TransactionGetParams | null | undefined = {},
31
40
  options?: RequestOptions,
32
41
  ): APIPromise<TransactionGetResponse> {
33
- const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params;
42
+ const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
34
43
  return this._client.get(path`/transactions/${transactionID}`, {
35
44
  query,
36
45
  ...options,
37
- headers: buildHeaders([{ 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID }, options?.headers]),
46
+ headers: buildHeaders([
47
+ {
48
+ ...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
49
+ ...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
50
+ },
51
+ options?.headers,
52
+ ]),
38
53
  });
39
54
  }
40
55
  }
@@ -464,16 +479,6 @@ export namespace TransactionGetResponse {
464
479
  }
465
480
 
466
481
  export interface TransactionListParams {
467
- /**
468
- * Header param: Agent ID (agt_xxx) used for attribution and audit.
469
- */
470
- 'X-Agent-ID': string;
471
-
472
- /**
473
- * Header param: Stable run, session, or conversation ID for agent observability.
474
- */
475
- 'X-Instance-ID': string;
476
-
477
482
  /**
478
483
  * Query param: Pagination cursor from previous response
479
484
  */
@@ -488,23 +493,41 @@ export interface TransactionListParams {
488
493
  * Query param
489
494
  */
490
495
  type?: 'payment' | 'transfer' | 'all';
491
- }
492
496
 
493
- export interface TransactionGetParams {
494
497
  /**
495
- * Header param: Agent ID (agt_xxx) used for attribution and audit.
498
+ * Header param: Conditionally required for payment-related API requests. Pass an
499
+ * agent ID (agt_xxx) for attribution, or omit it only when your party has exactly
500
+ * one active agent, which Natural defaults automatically.
496
501
  */
497
- 'X-Agent-ID': string;
502
+ 'X-Agent-ID'?: string;
498
503
 
499
504
  /**
500
505
  * Header param: Stable run, session, or conversation ID for agent observability.
506
+ * If omitted on a payment-related API request, Natural generates one after
507
+ * resolving the attribution agent.
501
508
  */
502
- 'X-Instance-ID': string;
509
+ 'X-Instance-ID'?: string;
510
+ }
503
511
 
512
+ export interface TransactionGetParams {
504
513
  /**
505
514
  * Query param: Party ID for delegated transaction lookup
506
515
  */
507
516
  partyId?: string;
517
+
518
+ /**
519
+ * Header param: Conditionally required for payment-related API requests. Pass an
520
+ * agent ID (agt_xxx) for attribution, or omit it only when your party has exactly
521
+ * one active agent, which Natural defaults automatically.
522
+ */
523
+ 'X-Agent-ID'?: string;
524
+
525
+ /**
526
+ * Header param: Stable run, session, or conversation ID for agent observability.
527
+ * If omitted on a payment-related API request, Natural generates one after
528
+ * resolving the attribution agent.
529
+ */
530
+ 'X-Instance-ID'?: string;
508
531
  }
509
532
 
510
533
  export declare namespace Transactions {
@@ -15,18 +15,24 @@ export class Transfers extends APIResource {
15
15
  *
16
16
  * @example
17
17
  * ```ts
18
- * const transfers = await client.transfers.list({
19
- * 'X-Agent-ID': 'X-Agent-ID',
20
- * 'X-Instance-ID': 'X-Instance-ID',
21
- * });
18
+ * const transfers = await client.transfers.list();
22
19
  * ```
23
20
  */
24
- list(params: TransferListParams, options?: RequestOptions): APIPromise<TransferListResponse> {
25
- const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params;
21
+ list(
22
+ params: TransferListParams | null | undefined = {},
23
+ options?: RequestOptions,
24
+ ): APIPromise<TransferListResponse> {
25
+ const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
26
26
  return this._client.get('/transfers', {
27
27
  query,
28
28
  ...options,
29
- headers: buildHeaders([{ 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID }, options?.headers]),
29
+ headers: buildHeaders([
30
+ {
31
+ ...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
32
+ ...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
33
+ },
34
+ options?.headers,
35
+ ]),
30
36
  });
31
37
  }
32
38
 
@@ -37,23 +43,25 @@ export class Transfers extends APIResource {
37
43
  * ```ts
38
44
  * const transfer = await client.transfers.get(
39
45
  * 'trf_ecc2efdd09bd231a9ad9bd2aada37aa7',
40
- * {
41
- * 'X-Agent-ID': 'X-Agent-ID',
42
- * 'X-Instance-ID': 'X-Instance-ID',
43
- * },
44
46
  * );
45
47
  * ```
46
48
  */
47
49
  get(
48
50
  transferID: string,
49
- params: TransferGetParams,
51
+ params: TransferGetParams | null | undefined = {},
50
52
  options?: RequestOptions,
51
53
  ): APIPromise<TransferGetResponse> {
52
- const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params;
54
+ const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
53
55
  return this._client.get(path`/transfers/${transferID}`, {
54
56
  query,
55
57
  ...options,
56
- headers: buildHeaders([{ 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID }, options?.headers]),
58
+ headers: buildHeaders([
59
+ {
60
+ ...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
61
+ ...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
62
+ },
63
+ options?.headers,
64
+ ]),
57
65
  });
58
66
  }
59
67
 
@@ -66,8 +74,6 @@ export class Transfers extends APIResource {
66
74
  * amount: 100,
67
75
  * externalAccountId: 'eac_ecc2efdd09bd231a9ad9bd2aada37aa7',
68
76
  * 'Idempotency-Key': 'Idempotency-Key',
69
- * 'X-Agent-ID': 'X-Agent-ID',
70
- * 'X-Instance-ID': 'X-Instance-ID',
71
77
  * });
72
78
  * ```
73
79
  */
@@ -85,7 +91,11 @@ export class Transfers extends APIResource {
85
91
  body,
86
92
  ...options,
87
93
  headers: buildHeaders([
88
- { 'Idempotency-Key': idempotencyKey, 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID },
94
+ {
95
+ 'Idempotency-Key': idempotencyKey,
96
+ ...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
97
+ ...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
98
+ },
89
99
  options?.headers,
90
100
  ]),
91
101
  });
@@ -100,8 +110,6 @@ export class Transfers extends APIResource {
100
110
  * amount: 1,
101
111
  * externalAccountId: 'eac_ecc2efdd09bd231a9ad9bd2aada37aa7',
102
112
  * 'Idempotency-Key': 'Idempotency-Key',
103
- * 'X-Agent-ID': 'X-Agent-ID',
104
- * 'X-Instance-ID': 'X-Instance-ID',
105
113
  * });
106
114
  * ```
107
115
  */
@@ -119,7 +127,11 @@ export class Transfers extends APIResource {
119
127
  body,
120
128
  ...options,
121
129
  headers: buildHeaders([
122
- { 'Idempotency-Key': idempotencyKey, 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID },
130
+ {
131
+ 'Idempotency-Key': idempotencyKey,
132
+ ...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
133
+ ...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
134
+ },
123
135
  options?.headers,
124
136
  ]),
125
137
  });
@@ -1189,16 +1201,6 @@ export namespace TransferInitiateWithdrawalResponse {
1189
1201
  }
1190
1202
 
1191
1203
  export interface TransferListParams {
1192
- /**
1193
- * Header param: Agent ID (agt_xxx) used for attribution and audit.
1194
- */
1195
- 'X-Agent-ID': string;
1196
-
1197
- /**
1198
- * Header param: Stable run, session, or conversation ID for agent observability.
1199
- */
1200
- 'X-Instance-ID': string;
1201
-
1202
1204
  /**
1203
1205
  * Query param: Pagination cursor from previous response
1204
1206
  */
@@ -1213,23 +1215,41 @@ export interface TransferListParams {
1213
1215
  * Query param: Party ID for delegated transfer lookup
1214
1216
  */
1215
1217
  partyId?: string;
1216
- }
1217
1218
 
1218
- export interface TransferGetParams {
1219
1219
  /**
1220
- * Header param: Agent ID (agt_xxx) used for attribution and audit.
1220
+ * Header param: Conditionally required for payment-related API requests. Pass an
1221
+ * agent ID (agt_xxx) for attribution, or omit it only when your party has exactly
1222
+ * one active agent, which Natural defaults automatically.
1221
1223
  */
1222
- 'X-Agent-ID': string;
1224
+ 'X-Agent-ID'?: string;
1223
1225
 
1224
1226
  /**
1225
1227
  * Header param: Stable run, session, or conversation ID for agent observability.
1228
+ * If omitted on a payment-related API request, Natural generates one after
1229
+ * resolving the attribution agent.
1226
1230
  */
1227
- 'X-Instance-ID': string;
1231
+ 'X-Instance-ID'?: string;
1232
+ }
1228
1233
 
1234
+ export interface TransferGetParams {
1229
1235
  /**
1230
1236
  * Query param: Party ID for delegated transfer lookup
1231
1237
  */
1232
1238
  partyId?: string;
1239
+
1240
+ /**
1241
+ * Header param: Conditionally required for payment-related API requests. Pass an
1242
+ * agent ID (agt_xxx) for attribution, or omit it only when your party has exactly
1243
+ * one active agent, which Natural defaults automatically.
1244
+ */
1245
+ 'X-Agent-ID'?: string;
1246
+
1247
+ /**
1248
+ * Header param: Stable run, session, or conversation ID for agent observability.
1249
+ * If omitted on a payment-related API request, Natural generates one after
1250
+ * resolving the attribution agent.
1251
+ */
1252
+ 'X-Instance-ID'?: string;
1233
1253
  }
1234
1254
 
1235
1255
  export interface TransferInitiateDepositParams {
@@ -1250,24 +1270,28 @@ export interface TransferInitiateDepositParams {
1250
1270
  'Idempotency-Key': string;
1251
1271
 
1252
1272
  /**
1253
- * Header param: Agent ID (agt_xxx) used for attribution and audit.
1273
+ * Body param: Currency code
1254
1274
  */
1255
- 'X-Agent-ID': string;
1275
+ currency?: string;
1256
1276
 
1257
1277
  /**
1258
- * Header param: Stable run, session, or conversation ID for agent observability.
1278
+ * Body param: Deposit description
1259
1279
  */
1260
- 'X-Instance-ID': string;
1280
+ description?: string;
1261
1281
 
1262
1282
  /**
1263
- * Body param: Currency code
1283
+ * Header param: Conditionally required for payment-related API requests. Pass an
1284
+ * agent ID (agt_xxx) for attribution, or omit it only when your party has exactly
1285
+ * one active agent, which Natural defaults automatically.
1264
1286
  */
1265
- currency?: string;
1287
+ 'X-Agent-ID'?: string;
1266
1288
 
1267
1289
  /**
1268
- * Body param: Deposit description
1290
+ * Header param: Stable run, session, or conversation ID for agent observability.
1291
+ * If omitted on a payment-related API request, Natural generates one after
1292
+ * resolving the attribution agent.
1269
1293
  */
1270
- description?: string;
1294
+ 'X-Instance-ID'?: string;
1271
1295
  }
1272
1296
 
1273
1297
  export interface TransferInitiateWithdrawalParams {
@@ -1288,24 +1312,28 @@ export interface TransferInitiateWithdrawalParams {
1288
1312
  'Idempotency-Key': string;
1289
1313
 
1290
1314
  /**
1291
- * Header param: Agent ID (agt_xxx) used for attribution and audit.
1315
+ * Body param: Currency code
1292
1316
  */
1293
- 'X-Agent-ID': string;
1317
+ currency?: string;
1294
1318
 
1295
1319
  /**
1296
- * Header param: Stable run, session, or conversation ID for agent observability.
1320
+ * Body param: Withdrawal description
1297
1321
  */
1298
- 'X-Instance-ID': string;
1322
+ description?: string;
1299
1323
 
1300
1324
  /**
1301
- * Body param: Currency code
1325
+ * Header param: Conditionally required for payment-related API requests. Pass an
1326
+ * agent ID (agt_xxx) for attribution, or omit it only when your party has exactly
1327
+ * one active agent, which Natural defaults automatically.
1302
1328
  */
1303
- currency?: string;
1329
+ 'X-Agent-ID'?: string;
1304
1330
 
1305
1331
  /**
1306
- * Body param: Withdrawal description
1332
+ * Header param: Stable run, session, or conversation ID for agent observability.
1333
+ * If omitted on a payment-related API request, Natural generates one after
1334
+ * resolving the attribution agent.
1307
1335
  */
1308
- description?: string;
1336
+ 'X-Instance-ID'?: string;
1309
1337
  }
1310
1338
 
1311
1339
  export declare namespace Transfers {
@@ -11,8 +11,8 @@ import { path } from '../internal/utils/path';
11
11
  */
12
12
  export class Wallet extends APIResource {
13
13
  /**
14
- * List wallets for the authenticated party, including balance and ACH deposit
15
- * instructions when available. Currently returns at most one wallet.
14
+ * List wallets for the authenticated party, including balance and receiving bank
15
+ * name when available. Currently returns at most one wallet.
16
16
  */
17
17
  list(
18
18
  params: WalletListParams | null | undefined = {},
@@ -32,8 +32,8 @@ export class Wallet extends APIResource {
32
32
  }
33
33
 
34
34
  /**
35
- * Get a wallet visible to the authenticated party, including balance and ACH
36
- * deposit instructions when available.
35
+ * Get a wallet visible to the authenticated party, including balance and receiving
36
+ * bank name when available.
37
37
  */
38
38
  get(
39
39
  walletID: string,
@@ -99,7 +99,7 @@ export namespace WalletListResponse {
99
99
  claims: Attributes.Claims;
100
100
 
101
101
  /**
102
- * ACH deposit instructions for this wallet, when available
102
+ * ACH deposit-instruction metadata for this wallet, when available
103
103
  */
104
104
  depositInstructions: Attributes.DepositInstructions | null;
105
105
 
@@ -146,23 +146,13 @@ export namespace WalletListResponse {
146
146
  }
147
147
 
148
148
  /**
149
- * ACH deposit instructions for this wallet, when available
149
+ * ACH deposit-instruction metadata for this wallet, when available
150
150
  */
151
151
  export interface DepositInstructions {
152
- /**
153
- * Account number for ACH deposits
154
- */
155
- accountNumber: string;
156
-
157
152
  /**
158
153
  * Name of the receiving bank
159
154
  */
160
155
  bankName: string;
161
-
162
- /**
163
- * Bank routing number for ACH deposits
164
- */
165
- routingNumber: string;
166
156
  }
167
157
  }
168
158
 
@@ -259,7 +249,7 @@ export namespace WalletGetResponse {
259
249
  claims: Attributes.Claims;
260
250
 
261
251
  /**
262
- * ACH deposit instructions for this wallet, when available
252
+ * ACH deposit-instruction metadata for this wallet, when available
263
253
  */
264
254
  depositInstructions: Attributes.DepositInstructions | null;
265
255
 
@@ -306,23 +296,13 @@ export namespace WalletGetResponse {
306
296
  }
307
297
 
308
298
  /**
309
- * ACH deposit instructions for this wallet, when available
299
+ * ACH deposit-instruction metadata for this wallet, when available
310
300
  */
311
301
  export interface DepositInstructions {
312
- /**
313
- * Account number for ACH deposits
314
- */
315
- accountNumber: string;
316
-
317
302
  /**
318
303
  * Name of the receiving bank
319
304
  */
320
305
  bankName: string;
321
-
322
- /**
323
- * Bank routing number for ACH deposits
324
- */
325
- routingNumber: string;
326
306
  }
327
307
  }
328
308
 
@@ -366,26 +346,32 @@ export namespace WalletGetResponse {
366
346
 
367
347
  export interface WalletListParams {
368
348
  /**
369
- * Agent ID (agt_xxx) identifying which agent is making the request.
349
+ * Agent ID (agt_xxx) used for attribution. Required for payment-related API
350
+ * requests unless your party has exactly one active agent, which Natural defaults
351
+ * automatically.
370
352
  */
371
353
  'X-Agent-ID'?: string;
372
354
 
373
355
  /**
374
- * Required when X-Agent-ID is present. Session or conversation ID for agent
375
- * observability.
356
+ * Stable run, session, or conversation ID for agent observability. If omitted on a
357
+ * payment-related API request, Natural generates one after resolving the
358
+ * attribution agent.
376
359
  */
377
360
  'X-Instance-ID'?: string;
378
361
  }
379
362
 
380
363
  export interface WalletGetParams {
381
364
  /**
382
- * Agent ID (agt_xxx) identifying which agent is making the request.
365
+ * Agent ID (agt_xxx) used for attribution. Required for payment-related API
366
+ * requests unless your party has exactly one active agent, which Natural defaults
367
+ * automatically.
383
368
  */
384
369
  'X-Agent-ID'?: string;
385
370
 
386
371
  /**
387
- * Required when X-Agent-ID is present. Session or conversation ID for agent
388
- * observability.
372
+ * Stable run, session, or conversation ID for agent observability. If omitted on a
373
+ * payment-related API request, Natural generates one after resolving the
374
+ * attribution agent.
389
375
  */
390
376
  'X-Instance-ID'?: string;
391
377
  }
@@ -1045,13 +1045,16 @@ export interface WebhookCreateParams {
1045
1045
  tags?: { [key: string]: string };
1046
1046
 
1047
1047
  /**
1048
- * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
1048
+ * Header param: Agent ID (agt_xxx) used for attribution. Required for
1049
+ * payment-related API requests unless your party has exactly one active agent,
1050
+ * which Natural defaults automatically.
1049
1051
  */
1050
1052
  'X-Agent-ID'?: string;
1051
1053
 
1052
1054
  /**
1053
- * Header param: Required when X-Agent-ID is present. Session or conversation ID
1054
- * for agent observability.
1055
+ * Header param: Stable run, session, or conversation ID for agent observability.
1056
+ * If omitted on a payment-related API request, Natural generates one after
1057
+ * resolving the attribution agent.
1055
1058
  */
1056
1059
  'X-Instance-ID'?: string;
1057
1060
  }
@@ -1118,13 +1121,16 @@ export interface WebhookUpdateParams {
1118
1121
  url?: string;
1119
1122
 
1120
1123
  /**
1121
- * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
1124
+ * Header param: Agent ID (agt_xxx) used for attribution. Required for
1125
+ * payment-related API requests unless your party has exactly one active agent,
1126
+ * which Natural defaults automatically.
1122
1127
  */
1123
1128
  'X-Agent-ID'?: string;
1124
1129
 
1125
1130
  /**
1126
- * Header param: Required when X-Agent-ID is present. Session or conversation ID
1127
- * for agent observability.
1131
+ * Header param: Stable run, session, or conversation ID for agent observability.
1132
+ * If omitted on a payment-related API request, Natural generates one after
1133
+ * resolving the attribution agent.
1128
1134
  */
1129
1135
  'X-Instance-ID'?: string;
1130
1136
  }
@@ -1146,26 +1152,32 @@ export interface WebhookListParams {
1146
1152
  status?: 'ENABLED' | 'DISABLED';
1147
1153
 
1148
1154
  /**
1149
- * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
1155
+ * Header param: Agent ID (agt_xxx) used for attribution. Required for
1156
+ * payment-related API requests unless your party has exactly one active agent,
1157
+ * which Natural defaults automatically.
1150
1158
  */
1151
1159
  'X-Agent-ID'?: string;
1152
1160
 
1153
1161
  /**
1154
- * Header param: Required when X-Agent-ID is present. Session or conversation ID
1155
- * for agent observability.
1162
+ * Header param: Stable run, session, or conversation ID for agent observability.
1163
+ * If omitted on a payment-related API request, Natural generates one after
1164
+ * resolving the attribution agent.
1156
1165
  */
1157
1166
  'X-Instance-ID'?: string;
1158
1167
  }
1159
1168
 
1160
1169
  export interface WebhookGetParams {
1161
1170
  /**
1162
- * Agent ID (agt_xxx) identifying which agent is making the request.
1171
+ * Agent ID (agt_xxx) used for attribution. Required for payment-related API
1172
+ * requests unless your party has exactly one active agent, which Natural defaults
1173
+ * automatically.
1163
1174
  */
1164
1175
  'X-Agent-ID'?: string;
1165
1176
 
1166
1177
  /**
1167
- * Required when X-Agent-ID is present. Session or conversation ID for agent
1168
- * observability.
1178
+ * Stable run, session, or conversation ID for agent observability. If omitted on a
1179
+ * payment-related API request, Natural generates one after resolving the
1180
+ * attribution agent.
1169
1181
  */
1170
1182
  'X-Instance-ID'?: string;
1171
1183
  }
@@ -1178,13 +1190,16 @@ export interface WebhookRemoveParams {
1178
1190
  'Idempotency-Key': string;
1179
1191
 
1180
1192
  /**
1181
- * Agent ID (agt_xxx) identifying which agent is making the request.
1193
+ * Agent ID (agt_xxx) used for attribution. Required for payment-related API
1194
+ * requests unless your party has exactly one active agent, which Natural defaults
1195
+ * automatically.
1182
1196
  */
1183
1197
  'X-Agent-ID'?: string;
1184
1198
 
1185
1199
  /**
1186
- * Required when X-Agent-ID is present. Session or conversation ID for agent
1187
- * observability.
1200
+ * Stable run, session, or conversation ID for agent observability. If omitted on a
1201
+ * payment-related API request, Natural generates one after resolving the
1202
+ * attribution agent.
1188
1203
  */
1189
1204
  'X-Instance-ID'?: string;
1190
1205
  }
@@ -1203,13 +1218,16 @@ export interface WebhookRotateSecretParams {
1203
1218
  'Idempotency-Key': string;
1204
1219
 
1205
1220
  /**
1206
- * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
1221
+ * Header param: Agent ID (agt_xxx) used for attribution. Required for
1222
+ * payment-related API requests unless your party has exactly one active agent,
1223
+ * which Natural defaults automatically.
1207
1224
  */
1208
1225
  'X-Agent-ID'?: string;
1209
1226
 
1210
1227
  /**
1211
- * Header param: Required when X-Agent-ID is present. Session or conversation ID
1212
- * for agent observability.
1228
+ * Header param: Stable run, session, or conversation ID for agent observability.
1229
+ * If omitted on a payment-related API request, Natural generates one after
1230
+ * resolving the attribution agent.
1213
1231
  */
1214
1232
  'X-Instance-ID'?: string;
1215
1233
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.11.0'; // x-release-please-version
1
+ export const VERSION = '0.13.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.11.0";
1
+ export declare const VERSION = "0.13.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.11.0";
1
+ export declare const VERSION = "0.13.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.11.0'; // x-release-please-version
4
+ exports.VERSION = '0.13.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.11.0'; // x-release-please-version
1
+ export const VERSION = '0.13.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map