@stigg/typescript 0.1.0-beta.47 → 0.1.0-beta.49

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 (57) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/v1/contracts.d.mts +1618 -0
  4. package/resources/v1/contracts.d.mts.map +1 -0
  5. package/resources/v1/contracts.d.ts +1618 -0
  6. package/resources/v1/contracts.d.ts.map +1 -0
  7. package/resources/v1/contracts.js +108 -0
  8. package/resources/v1/contracts.js.map +1 -0
  9. package/resources/v1/contracts.mjs +104 -0
  10. package/resources/v1/contracts.mjs.map +1 -0
  11. package/resources/v1/customers/customers.d.mts +342 -1
  12. package/resources/v1/customers/customers.d.mts.map +1 -1
  13. package/resources/v1/customers/customers.d.ts +342 -1
  14. package/resources/v1/customers/customers.d.ts.map +1 -1
  15. package/resources/v1/customers/customers.js +41 -0
  16. package/resources/v1/customers/customers.js.map +1 -1
  17. package/resources/v1/customers/customers.mjs +41 -0
  18. package/resources/v1/customers/customers.mjs.map +1 -1
  19. package/resources/v1/customers/index.d.mts +1 -1
  20. package/resources/v1/customers/index.d.mts.map +1 -1
  21. package/resources/v1/customers/index.d.ts +1 -1
  22. package/resources/v1/customers/index.d.ts.map +1 -1
  23. package/resources/v1/customers/index.js.map +1 -1
  24. package/resources/v1/customers/index.mjs.map +1 -1
  25. package/resources/v1/index.d.mts +2 -1
  26. package/resources/v1/index.d.mts.map +1 -1
  27. package/resources/v1/index.d.ts +2 -1
  28. package/resources/v1/index.d.ts.map +1 -1
  29. package/resources/v1/index.js +3 -1
  30. package/resources/v1/index.js.map +1 -1
  31. package/resources/v1/index.mjs +1 -0
  32. package/resources/v1/index.mjs.map +1 -1
  33. package/resources/v1/subscriptions/subscriptions.d.mts +12 -0
  34. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  35. package/resources/v1/subscriptions/subscriptions.d.ts +12 -0
  36. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  37. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  38. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  39. package/resources/v1/v1.d.mts +6 -2
  40. package/resources/v1/v1.d.mts.map +1 -1
  41. package/resources/v1/v1.d.ts +6 -2
  42. package/resources/v1/v1.d.ts.map +1 -1
  43. package/resources/v1/v1.js +4 -0
  44. package/resources/v1/v1.js.map +1 -1
  45. package/resources/v1/v1.mjs +4 -0
  46. package/resources/v1/v1.mjs.map +1 -1
  47. package/src/resources/v1/contracts.ts +3228 -0
  48. package/src/resources/v1/customers/customers.ts +573 -0
  49. package/src/resources/v1/customers/index.ts +5 -0
  50. package/src/resources/v1/index.ts +19 -0
  51. package/src/resources/v1/subscriptions/subscriptions.ts +15 -0
  52. package/src/resources/v1/v1.ts +42 -0
  53. package/src/version.ts +1 -1
  54. package/version.d.mts +1 -1
  55. package/version.d.ts +1 -1
  56. package/version.js +1 -1
  57. package/version.mjs +1 -1
@@ -0,0 +1,3228 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../core/pagination';
6
+ import { buildHeaders } from '../../internal/headers';
7
+ import { RequestOptions } from '../../internal/request-options';
8
+ import { path } from '../../internal/utils/path';
9
+
10
+ export class Contracts extends APIResource {
11
+ /**
12
+ * Creates a contract for a customer together with all of its (custom)
13
+ * subscriptions in a single atomic operation. Every new subscription is created
14
+ * inside one transaction — any validation or creation failure rolls the whole
15
+ * contract back. Each subscription entry is either a new subscription to create or
16
+ * a reference to an existing custom subscription. Returns the created contract.
17
+ */
18
+ create(params: ContractCreateParams, options?: RequestOptions): APIPromise<ContractCreateResponse> {
19
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
20
+ return this._client.post('/api/v1/contracts', {
21
+ body,
22
+ ...options,
23
+ headers: buildHeaders([
24
+ {
25
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
26
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
27
+ },
28
+ options?.headers,
29
+ ]),
30
+ });
31
+ }
32
+
33
+ /**
34
+ * Retrieves a single contract by its ID, enriched with a preview of its upcoming
35
+ * (next) invoice when one is available. Returns 404 when no contract with that ID
36
+ * exists in the environment.
37
+ */
38
+ retrieve(
39
+ id: string,
40
+ params: ContractRetrieveParams | null | undefined = {},
41
+ options?: RequestOptions,
42
+ ): APIPromise<ContractRetrieveResponse> {
43
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
44
+ return this._client.get(path`/api/v1/contracts/${id}`, {
45
+ ...options,
46
+ headers: buildHeaders([
47
+ {
48
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
49
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
50
+ },
51
+ options?.headers,
52
+ ]),
53
+ });
54
+ }
55
+
56
+ /**
57
+ * Updates a contract's metadata (name, PO number, activation dates) and optionally
58
+ * re-links its subscriptions. Best-effort re-syncs the change to the connected
59
+ * billing provider.
60
+ */
61
+ update(
62
+ id: string,
63
+ params: ContractUpdateParams,
64
+ options?: RequestOptions,
65
+ ): APIPromise<ContractUpdateResponse> {
66
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
67
+ return this._client.patch(path`/api/v1/contracts/${id}`, {
68
+ body,
69
+ ...options,
70
+ headers: buildHeaders([
71
+ {
72
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
73
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
74
+ },
75
+ options?.headers,
76
+ ]),
77
+ });
78
+ }
79
+
80
+ /**
81
+ * Retrieves a cursor-paginated list of contracts in the environment, fetched live
82
+ * from the connected billing provider. Each contract is enriched with a preview of
83
+ * its upcoming (next) invoice when one is available. Returns an empty list when no
84
+ * billing provider is connected. Supports filtering by customer external ID,
85
+ * state, and name.
86
+ */
87
+ list(
88
+ params: ContractListParams | null | undefined = {},
89
+ options?: RequestOptions,
90
+ ): PagePromise<ContractListResponsesMyCursorIDPage, ContractListResponse> {
91
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
92
+ return this._client.getAPIList('/api/v1/contracts', MyCursorIDPage<ContractListResponse>, {
93
+ query,
94
+ ...options,
95
+ headers: buildHeaders([
96
+ {
97
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
98
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
99
+ },
100
+ options?.headers,
101
+ ]),
102
+ });
103
+ }
104
+
105
+ /**
106
+ * Deletes a contract: cancels the contract in the connected billing provider and
107
+ * cancels every subscription linked to it.
108
+ */
109
+ delete(
110
+ id: string,
111
+ params: ContractDeleteParams | null | undefined = {},
112
+ options?: RequestOptions,
113
+ ): APIPromise<ContractDeleteResponse> {
114
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID } = params ?? {};
115
+ return this._client.post(path`/api/v1/contracts/${id}/archive`, {
116
+ ...options,
117
+ headers: buildHeaders([
118
+ {
119
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
120
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
121
+ },
122
+ options?.headers,
123
+ ]),
124
+ });
125
+ }
126
+ }
127
+
128
+ export type ContractListResponsesMyCursorIDPage = MyCursorIDPage<ContractListResponse>;
129
+
130
+ /**
131
+ * Response object
132
+ */
133
+ export interface ContractCreateResponse {
134
+ /**
135
+ * A billing contract as reported by the connected billing provider.
136
+ */
137
+ data: ContractCreateResponse.Data;
138
+ }
139
+
140
+ export namespace ContractCreateResponse {
141
+ /**
142
+ * A billing contract as reported by the connected billing provider.
143
+ */
144
+ export interface Data {
145
+ /**
146
+ * The persisted Stigg contract id (matches a subscription’s contractId; present
147
+ * for Stigg-managed contracts)
148
+ */
149
+ id: string | null;
150
+
151
+ /**
152
+ * The date the contract activation ends
153
+ */
154
+ activationEndDate: string | null;
155
+
156
+ /**
157
+ * The date the contract becomes active
158
+ */
159
+ activationStartDate: string | null;
160
+
161
+ /**
162
+ * The billing provider (Received) contract ID; null until the contract has synced
163
+ * to the billing provider
164
+ */
165
+ billingId: string | null;
166
+
167
+ /**
168
+ * The Stigg contract ref ID (the key used to fetch/update/delete this contract)
169
+ */
170
+ contractId: string;
171
+
172
+ /**
173
+ * The date the contract was created
174
+ */
175
+ createdAt: string | null;
176
+
177
+ /**
178
+ * The external identifier of the customer the contract belongs to
179
+ */
180
+ customerExternalId: string | null;
181
+
182
+ /**
183
+ * The external identifier of the contract
184
+ */
185
+ externalId: string;
186
+
187
+ /**
188
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
189
+ * or null when none exists
190
+ */
191
+ latestInvoice: Data.LatestInvoice | null;
192
+
193
+ /**
194
+ * The contract name (the purchase-order number when set, otherwise the
195
+ * contract/customer name)
196
+ */
197
+ name: string | null;
198
+
199
+ /**
200
+ * A preview of the contract's upcoming invoice, or null when none is available
201
+ */
202
+ nextInvoice: Data.NextInvoice | null;
203
+
204
+ /**
205
+ * Purchase-order number, when set on the contract
206
+ */
207
+ poNumber: string | null;
208
+
209
+ /**
210
+ * The Stigg contract ref ID (present for Stigg-managed contracts; the key used to
211
+ * update/delete)
212
+ */
213
+ refId: string | null;
214
+
215
+ /**
216
+ * The current state of the contract
217
+ */
218
+ state: 'DRAFT' | 'ACTIVE' | 'CANCELED' | 'END_BILLING';
219
+
220
+ /**
221
+ * The custom subscriptions attached to this contract (empty when none)
222
+ */
223
+ subscriptions: Array<Data.Subscription>;
224
+ }
225
+
226
+ export namespace Data {
227
+ /**
228
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
229
+ * or null when none exists
230
+ */
231
+ export interface LatestInvoice {
232
+ /**
233
+ * Invoice billing ID
234
+ */
235
+ billingId: string;
236
+
237
+ /**
238
+ * Invoice creation date
239
+ */
240
+ createdAt: string;
241
+
242
+ /**
243
+ * Whether payment requires action
244
+ */
245
+ requiresAction: boolean;
246
+
247
+ /**
248
+ * Invoice status
249
+ */
250
+ status: 'OPEN' | 'CANCELED' | 'PAID';
251
+
252
+ /**
253
+ * Amount due
254
+ */
255
+ amountDue?: number | null;
256
+
257
+ /**
258
+ * Billing reason
259
+ */
260
+ billingReason?:
261
+ | 'BILLING_CYCLE'
262
+ | 'SUBSCRIPTION_CREATION'
263
+ | 'SUBSCRIPTION_UPDATE'
264
+ | 'MANUAL'
265
+ | 'MINIMUM_INVOICE_AMOUNT_EXCEEDED'
266
+ | 'OTHER'
267
+ | null;
268
+
269
+ /**
270
+ * Invoice currency
271
+ */
272
+ currency?: string | null;
273
+
274
+ /**
275
+ * Invoice PDF URL
276
+ */
277
+ pdfUrl?: string | null;
278
+
279
+ /**
280
+ * Total amount
281
+ */
282
+ total?: number | null;
283
+ }
284
+
285
+ /**
286
+ * A preview of the contract's upcoming invoice, or null when none is available
287
+ */
288
+ export interface NextInvoice {
289
+ /**
290
+ * The total amount of the upcoming invoice
291
+ */
292
+ amount: NextInvoice.Amount;
293
+
294
+ /**
295
+ * The date the upcoming invoice is due
296
+ */
297
+ dueDate: string | null;
298
+
299
+ /**
300
+ * The end of the billing period the upcoming invoice covers
301
+ */
302
+ periodEnd: string | null;
303
+
304
+ /**
305
+ * The start of the billing period the upcoming invoice covers
306
+ */
307
+ periodStart: string | null;
308
+ }
309
+
310
+ export namespace NextInvoice {
311
+ /**
312
+ * The total amount of the upcoming invoice
313
+ */
314
+ export interface Amount {
315
+ /**
316
+ * The price amount
317
+ */
318
+ amount: number;
319
+
320
+ /**
321
+ * ISO 4217 currency code
322
+ */
323
+ currency:
324
+ | 'usd'
325
+ | 'aed'
326
+ | 'all'
327
+ | 'amd'
328
+ | 'ang'
329
+ | 'aud'
330
+ | 'awg'
331
+ | 'azn'
332
+ | 'bam'
333
+ | 'bbd'
334
+ | 'bdt'
335
+ | 'bgn'
336
+ | 'bif'
337
+ | 'bmd'
338
+ | 'bnd'
339
+ | 'bsd'
340
+ | 'bwp'
341
+ | 'byn'
342
+ | 'bzd'
343
+ | 'brl'
344
+ | 'cad'
345
+ | 'cdf'
346
+ | 'chf'
347
+ | 'cny'
348
+ | 'czk'
349
+ | 'dkk'
350
+ | 'dop'
351
+ | 'dzd'
352
+ | 'egp'
353
+ | 'etb'
354
+ | 'eur'
355
+ | 'fjd'
356
+ | 'gbp'
357
+ | 'gel'
358
+ | 'gip'
359
+ | 'gmd'
360
+ | 'gyd'
361
+ | 'hkd'
362
+ | 'hrk'
363
+ | 'htg'
364
+ | 'idr'
365
+ | 'ils'
366
+ | 'inr'
367
+ | 'isk'
368
+ | 'jmd'
369
+ | 'jpy'
370
+ | 'kes'
371
+ | 'kgs'
372
+ | 'khr'
373
+ | 'kmf'
374
+ | 'krw'
375
+ | 'kyd'
376
+ | 'kzt'
377
+ | 'lbp'
378
+ | 'lkr'
379
+ | 'lrd'
380
+ | 'lsl'
381
+ | 'mad'
382
+ | 'mdl'
383
+ | 'mga'
384
+ | 'mkd'
385
+ | 'mmk'
386
+ | 'mnt'
387
+ | 'mop'
388
+ | 'mro'
389
+ | 'mvr'
390
+ | 'mwk'
391
+ | 'mxn'
392
+ | 'myr'
393
+ | 'mzn'
394
+ | 'nad'
395
+ | 'ngn'
396
+ | 'nok'
397
+ | 'npr'
398
+ | 'nzd'
399
+ | 'pgk'
400
+ | 'php'
401
+ | 'pkr'
402
+ | 'pln'
403
+ | 'qar'
404
+ | 'ron'
405
+ | 'rsd'
406
+ | 'rub'
407
+ | 'rwf'
408
+ | 'sar'
409
+ | 'sbd'
410
+ | 'scr'
411
+ | 'sek'
412
+ | 'sgd'
413
+ | 'sle'
414
+ | 'sll'
415
+ | 'sos'
416
+ | 'szl'
417
+ | 'thb'
418
+ | 'tjs'
419
+ | 'top'
420
+ | 'try'
421
+ | 'ttd'
422
+ | 'tzs'
423
+ | 'uah'
424
+ | 'uzs'
425
+ | 'vnd'
426
+ | 'vuv'
427
+ | 'wst'
428
+ | 'xaf'
429
+ | 'xcd'
430
+ | 'yer'
431
+ | 'zar'
432
+ | 'zmw'
433
+ | 'clp'
434
+ | 'djf'
435
+ | 'gnf'
436
+ | 'ugx'
437
+ | 'pyg'
438
+ | 'xof'
439
+ | 'xpf';
440
+ }
441
+ }
442
+
443
+ /**
444
+ * A custom subscription attached to a contract.
445
+ */
446
+ export interface Subscription {
447
+ /**
448
+ * Display name of the subscription plan
449
+ */
450
+ planDisplayName: string | null;
451
+
452
+ /**
453
+ * Display name of the product the subscription plan belongs to
454
+ */
455
+ productDisplayName: string | null;
456
+
457
+ /**
458
+ * The subscription ref ID (use it to deep-link to the subscription)
459
+ */
460
+ subscriptionId: string;
461
+ }
462
+ }
463
+ }
464
+
465
+ /**
466
+ * Response object
467
+ */
468
+ export interface ContractRetrieveResponse {
469
+ /**
470
+ * A billing contract as reported by the connected billing provider.
471
+ */
472
+ data: ContractRetrieveResponse.Data;
473
+ }
474
+
475
+ export namespace ContractRetrieveResponse {
476
+ /**
477
+ * A billing contract as reported by the connected billing provider.
478
+ */
479
+ export interface Data {
480
+ /**
481
+ * The persisted Stigg contract id (matches a subscription’s contractId; present
482
+ * for Stigg-managed contracts)
483
+ */
484
+ id: string | null;
485
+
486
+ /**
487
+ * The date the contract activation ends
488
+ */
489
+ activationEndDate: string | null;
490
+
491
+ /**
492
+ * The date the contract becomes active
493
+ */
494
+ activationStartDate: string | null;
495
+
496
+ /**
497
+ * The billing provider (Received) contract ID; null until the contract has synced
498
+ * to the billing provider
499
+ */
500
+ billingId: string | null;
501
+
502
+ /**
503
+ * The Stigg contract ref ID (the key used to fetch/update/delete this contract)
504
+ */
505
+ contractId: string;
506
+
507
+ /**
508
+ * The date the contract was created
509
+ */
510
+ createdAt: string | null;
511
+
512
+ /**
513
+ * The external identifier of the customer the contract belongs to
514
+ */
515
+ customerExternalId: string | null;
516
+
517
+ /**
518
+ * The external identifier of the contract
519
+ */
520
+ externalId: string;
521
+
522
+ /**
523
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
524
+ * or null when none exists
525
+ */
526
+ latestInvoice: Data.LatestInvoice | null;
527
+
528
+ /**
529
+ * The contract name (the purchase-order number when set, otherwise the
530
+ * contract/customer name)
531
+ */
532
+ name: string | null;
533
+
534
+ /**
535
+ * A preview of the contract's upcoming invoice, or null when none is available
536
+ */
537
+ nextInvoice: Data.NextInvoice | null;
538
+
539
+ /**
540
+ * Purchase-order number, when set on the contract
541
+ */
542
+ poNumber: string | null;
543
+
544
+ /**
545
+ * The Stigg contract ref ID (present for Stigg-managed contracts; the key used to
546
+ * update/delete)
547
+ */
548
+ refId: string | null;
549
+
550
+ /**
551
+ * The current state of the contract
552
+ */
553
+ state: 'DRAFT' | 'ACTIVE' | 'CANCELED' | 'END_BILLING';
554
+
555
+ /**
556
+ * The custom subscriptions attached to this contract (empty when none)
557
+ */
558
+ subscriptions: Array<Data.Subscription>;
559
+ }
560
+
561
+ export namespace Data {
562
+ /**
563
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
564
+ * or null when none exists
565
+ */
566
+ export interface LatestInvoice {
567
+ /**
568
+ * Invoice billing ID
569
+ */
570
+ billingId: string;
571
+
572
+ /**
573
+ * Invoice creation date
574
+ */
575
+ createdAt: string;
576
+
577
+ /**
578
+ * Whether payment requires action
579
+ */
580
+ requiresAction: boolean;
581
+
582
+ /**
583
+ * Invoice status
584
+ */
585
+ status: 'OPEN' | 'CANCELED' | 'PAID';
586
+
587
+ /**
588
+ * Amount due
589
+ */
590
+ amountDue?: number | null;
591
+
592
+ /**
593
+ * Billing reason
594
+ */
595
+ billingReason?:
596
+ | 'BILLING_CYCLE'
597
+ | 'SUBSCRIPTION_CREATION'
598
+ | 'SUBSCRIPTION_UPDATE'
599
+ | 'MANUAL'
600
+ | 'MINIMUM_INVOICE_AMOUNT_EXCEEDED'
601
+ | 'OTHER'
602
+ | null;
603
+
604
+ /**
605
+ * Invoice currency
606
+ */
607
+ currency?: string | null;
608
+
609
+ /**
610
+ * Invoice PDF URL
611
+ */
612
+ pdfUrl?: string | null;
613
+
614
+ /**
615
+ * Total amount
616
+ */
617
+ total?: number | null;
618
+ }
619
+
620
+ /**
621
+ * A preview of the contract's upcoming invoice, or null when none is available
622
+ */
623
+ export interface NextInvoice {
624
+ /**
625
+ * The total amount of the upcoming invoice
626
+ */
627
+ amount: NextInvoice.Amount;
628
+
629
+ /**
630
+ * The date the upcoming invoice is due
631
+ */
632
+ dueDate: string | null;
633
+
634
+ /**
635
+ * The end of the billing period the upcoming invoice covers
636
+ */
637
+ periodEnd: string | null;
638
+
639
+ /**
640
+ * The start of the billing period the upcoming invoice covers
641
+ */
642
+ periodStart: string | null;
643
+ }
644
+
645
+ export namespace NextInvoice {
646
+ /**
647
+ * The total amount of the upcoming invoice
648
+ */
649
+ export interface Amount {
650
+ /**
651
+ * The price amount
652
+ */
653
+ amount: number;
654
+
655
+ /**
656
+ * ISO 4217 currency code
657
+ */
658
+ currency:
659
+ | 'usd'
660
+ | 'aed'
661
+ | 'all'
662
+ | 'amd'
663
+ | 'ang'
664
+ | 'aud'
665
+ | 'awg'
666
+ | 'azn'
667
+ | 'bam'
668
+ | 'bbd'
669
+ | 'bdt'
670
+ | 'bgn'
671
+ | 'bif'
672
+ | 'bmd'
673
+ | 'bnd'
674
+ | 'bsd'
675
+ | 'bwp'
676
+ | 'byn'
677
+ | 'bzd'
678
+ | 'brl'
679
+ | 'cad'
680
+ | 'cdf'
681
+ | 'chf'
682
+ | 'cny'
683
+ | 'czk'
684
+ | 'dkk'
685
+ | 'dop'
686
+ | 'dzd'
687
+ | 'egp'
688
+ | 'etb'
689
+ | 'eur'
690
+ | 'fjd'
691
+ | 'gbp'
692
+ | 'gel'
693
+ | 'gip'
694
+ | 'gmd'
695
+ | 'gyd'
696
+ | 'hkd'
697
+ | 'hrk'
698
+ | 'htg'
699
+ | 'idr'
700
+ | 'ils'
701
+ | 'inr'
702
+ | 'isk'
703
+ | 'jmd'
704
+ | 'jpy'
705
+ | 'kes'
706
+ | 'kgs'
707
+ | 'khr'
708
+ | 'kmf'
709
+ | 'krw'
710
+ | 'kyd'
711
+ | 'kzt'
712
+ | 'lbp'
713
+ | 'lkr'
714
+ | 'lrd'
715
+ | 'lsl'
716
+ | 'mad'
717
+ | 'mdl'
718
+ | 'mga'
719
+ | 'mkd'
720
+ | 'mmk'
721
+ | 'mnt'
722
+ | 'mop'
723
+ | 'mro'
724
+ | 'mvr'
725
+ | 'mwk'
726
+ | 'mxn'
727
+ | 'myr'
728
+ | 'mzn'
729
+ | 'nad'
730
+ | 'ngn'
731
+ | 'nok'
732
+ | 'npr'
733
+ | 'nzd'
734
+ | 'pgk'
735
+ | 'php'
736
+ | 'pkr'
737
+ | 'pln'
738
+ | 'qar'
739
+ | 'ron'
740
+ | 'rsd'
741
+ | 'rub'
742
+ | 'rwf'
743
+ | 'sar'
744
+ | 'sbd'
745
+ | 'scr'
746
+ | 'sek'
747
+ | 'sgd'
748
+ | 'sle'
749
+ | 'sll'
750
+ | 'sos'
751
+ | 'szl'
752
+ | 'thb'
753
+ | 'tjs'
754
+ | 'top'
755
+ | 'try'
756
+ | 'ttd'
757
+ | 'tzs'
758
+ | 'uah'
759
+ | 'uzs'
760
+ | 'vnd'
761
+ | 'vuv'
762
+ | 'wst'
763
+ | 'xaf'
764
+ | 'xcd'
765
+ | 'yer'
766
+ | 'zar'
767
+ | 'zmw'
768
+ | 'clp'
769
+ | 'djf'
770
+ | 'gnf'
771
+ | 'ugx'
772
+ | 'pyg'
773
+ | 'xof'
774
+ | 'xpf';
775
+ }
776
+ }
777
+
778
+ /**
779
+ * A custom subscription attached to a contract.
780
+ */
781
+ export interface Subscription {
782
+ /**
783
+ * Display name of the subscription plan
784
+ */
785
+ planDisplayName: string | null;
786
+
787
+ /**
788
+ * Display name of the product the subscription plan belongs to
789
+ */
790
+ productDisplayName: string | null;
791
+
792
+ /**
793
+ * The subscription ref ID (use it to deep-link to the subscription)
794
+ */
795
+ subscriptionId: string;
796
+ }
797
+ }
798
+ }
799
+
800
+ /**
801
+ * Response object
802
+ */
803
+ export interface ContractUpdateResponse {
804
+ /**
805
+ * A billing contract as reported by the connected billing provider.
806
+ */
807
+ data: ContractUpdateResponse.Data;
808
+ }
809
+
810
+ export namespace ContractUpdateResponse {
811
+ /**
812
+ * A billing contract as reported by the connected billing provider.
813
+ */
814
+ export interface Data {
815
+ /**
816
+ * The persisted Stigg contract id (matches a subscription’s contractId; present
817
+ * for Stigg-managed contracts)
818
+ */
819
+ id: string | null;
820
+
821
+ /**
822
+ * The date the contract activation ends
823
+ */
824
+ activationEndDate: string | null;
825
+
826
+ /**
827
+ * The date the contract becomes active
828
+ */
829
+ activationStartDate: string | null;
830
+
831
+ /**
832
+ * The billing provider (Received) contract ID; null until the contract has synced
833
+ * to the billing provider
834
+ */
835
+ billingId: string | null;
836
+
837
+ /**
838
+ * The Stigg contract ref ID (the key used to fetch/update/delete this contract)
839
+ */
840
+ contractId: string;
841
+
842
+ /**
843
+ * The date the contract was created
844
+ */
845
+ createdAt: string | null;
846
+
847
+ /**
848
+ * The external identifier of the customer the contract belongs to
849
+ */
850
+ customerExternalId: string | null;
851
+
852
+ /**
853
+ * The external identifier of the contract
854
+ */
855
+ externalId: string;
856
+
857
+ /**
858
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
859
+ * or null when none exists
860
+ */
861
+ latestInvoice: Data.LatestInvoice | null;
862
+
863
+ /**
864
+ * The contract name (the purchase-order number when set, otherwise the
865
+ * contract/customer name)
866
+ */
867
+ name: string | null;
868
+
869
+ /**
870
+ * A preview of the contract's upcoming invoice, or null when none is available
871
+ */
872
+ nextInvoice: Data.NextInvoice | null;
873
+
874
+ /**
875
+ * Purchase-order number, when set on the contract
876
+ */
877
+ poNumber: string | null;
878
+
879
+ /**
880
+ * The Stigg contract ref ID (present for Stigg-managed contracts; the key used to
881
+ * update/delete)
882
+ */
883
+ refId: string | null;
884
+
885
+ /**
886
+ * The current state of the contract
887
+ */
888
+ state: 'DRAFT' | 'ACTIVE' | 'CANCELED' | 'END_BILLING';
889
+
890
+ /**
891
+ * The custom subscriptions attached to this contract (empty when none)
892
+ */
893
+ subscriptions: Array<Data.Subscription>;
894
+ }
895
+
896
+ export namespace Data {
897
+ /**
898
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
899
+ * or null when none exists
900
+ */
901
+ export interface LatestInvoice {
902
+ /**
903
+ * Invoice billing ID
904
+ */
905
+ billingId: string;
906
+
907
+ /**
908
+ * Invoice creation date
909
+ */
910
+ createdAt: string;
911
+
912
+ /**
913
+ * Whether payment requires action
914
+ */
915
+ requiresAction: boolean;
916
+
917
+ /**
918
+ * Invoice status
919
+ */
920
+ status: 'OPEN' | 'CANCELED' | 'PAID';
921
+
922
+ /**
923
+ * Amount due
924
+ */
925
+ amountDue?: number | null;
926
+
927
+ /**
928
+ * Billing reason
929
+ */
930
+ billingReason?:
931
+ | 'BILLING_CYCLE'
932
+ | 'SUBSCRIPTION_CREATION'
933
+ | 'SUBSCRIPTION_UPDATE'
934
+ | 'MANUAL'
935
+ | 'MINIMUM_INVOICE_AMOUNT_EXCEEDED'
936
+ | 'OTHER'
937
+ | null;
938
+
939
+ /**
940
+ * Invoice currency
941
+ */
942
+ currency?: string | null;
943
+
944
+ /**
945
+ * Invoice PDF URL
946
+ */
947
+ pdfUrl?: string | null;
948
+
949
+ /**
950
+ * Total amount
951
+ */
952
+ total?: number | null;
953
+ }
954
+
955
+ /**
956
+ * A preview of the contract's upcoming invoice, or null when none is available
957
+ */
958
+ export interface NextInvoice {
959
+ /**
960
+ * The total amount of the upcoming invoice
961
+ */
962
+ amount: NextInvoice.Amount;
963
+
964
+ /**
965
+ * The date the upcoming invoice is due
966
+ */
967
+ dueDate: string | null;
968
+
969
+ /**
970
+ * The end of the billing period the upcoming invoice covers
971
+ */
972
+ periodEnd: string | null;
973
+
974
+ /**
975
+ * The start of the billing period the upcoming invoice covers
976
+ */
977
+ periodStart: string | null;
978
+ }
979
+
980
+ export namespace NextInvoice {
981
+ /**
982
+ * The total amount of the upcoming invoice
983
+ */
984
+ export interface Amount {
985
+ /**
986
+ * The price amount
987
+ */
988
+ amount: number;
989
+
990
+ /**
991
+ * ISO 4217 currency code
992
+ */
993
+ currency:
994
+ | 'usd'
995
+ | 'aed'
996
+ | 'all'
997
+ | 'amd'
998
+ | 'ang'
999
+ | 'aud'
1000
+ | 'awg'
1001
+ | 'azn'
1002
+ | 'bam'
1003
+ | 'bbd'
1004
+ | 'bdt'
1005
+ | 'bgn'
1006
+ | 'bif'
1007
+ | 'bmd'
1008
+ | 'bnd'
1009
+ | 'bsd'
1010
+ | 'bwp'
1011
+ | 'byn'
1012
+ | 'bzd'
1013
+ | 'brl'
1014
+ | 'cad'
1015
+ | 'cdf'
1016
+ | 'chf'
1017
+ | 'cny'
1018
+ | 'czk'
1019
+ | 'dkk'
1020
+ | 'dop'
1021
+ | 'dzd'
1022
+ | 'egp'
1023
+ | 'etb'
1024
+ | 'eur'
1025
+ | 'fjd'
1026
+ | 'gbp'
1027
+ | 'gel'
1028
+ | 'gip'
1029
+ | 'gmd'
1030
+ | 'gyd'
1031
+ | 'hkd'
1032
+ | 'hrk'
1033
+ | 'htg'
1034
+ | 'idr'
1035
+ | 'ils'
1036
+ | 'inr'
1037
+ | 'isk'
1038
+ | 'jmd'
1039
+ | 'jpy'
1040
+ | 'kes'
1041
+ | 'kgs'
1042
+ | 'khr'
1043
+ | 'kmf'
1044
+ | 'krw'
1045
+ | 'kyd'
1046
+ | 'kzt'
1047
+ | 'lbp'
1048
+ | 'lkr'
1049
+ | 'lrd'
1050
+ | 'lsl'
1051
+ | 'mad'
1052
+ | 'mdl'
1053
+ | 'mga'
1054
+ | 'mkd'
1055
+ | 'mmk'
1056
+ | 'mnt'
1057
+ | 'mop'
1058
+ | 'mro'
1059
+ | 'mvr'
1060
+ | 'mwk'
1061
+ | 'mxn'
1062
+ | 'myr'
1063
+ | 'mzn'
1064
+ | 'nad'
1065
+ | 'ngn'
1066
+ | 'nok'
1067
+ | 'npr'
1068
+ | 'nzd'
1069
+ | 'pgk'
1070
+ | 'php'
1071
+ | 'pkr'
1072
+ | 'pln'
1073
+ | 'qar'
1074
+ | 'ron'
1075
+ | 'rsd'
1076
+ | 'rub'
1077
+ | 'rwf'
1078
+ | 'sar'
1079
+ | 'sbd'
1080
+ | 'scr'
1081
+ | 'sek'
1082
+ | 'sgd'
1083
+ | 'sle'
1084
+ | 'sll'
1085
+ | 'sos'
1086
+ | 'szl'
1087
+ | 'thb'
1088
+ | 'tjs'
1089
+ | 'top'
1090
+ | 'try'
1091
+ | 'ttd'
1092
+ | 'tzs'
1093
+ | 'uah'
1094
+ | 'uzs'
1095
+ | 'vnd'
1096
+ | 'vuv'
1097
+ | 'wst'
1098
+ | 'xaf'
1099
+ | 'xcd'
1100
+ | 'yer'
1101
+ | 'zar'
1102
+ | 'zmw'
1103
+ | 'clp'
1104
+ | 'djf'
1105
+ | 'gnf'
1106
+ | 'ugx'
1107
+ | 'pyg'
1108
+ | 'xof'
1109
+ | 'xpf';
1110
+ }
1111
+ }
1112
+
1113
+ /**
1114
+ * A custom subscription attached to a contract.
1115
+ */
1116
+ export interface Subscription {
1117
+ /**
1118
+ * Display name of the subscription plan
1119
+ */
1120
+ planDisplayName: string | null;
1121
+
1122
+ /**
1123
+ * Display name of the product the subscription plan belongs to
1124
+ */
1125
+ productDisplayName: string | null;
1126
+
1127
+ /**
1128
+ * The subscription ref ID (use it to deep-link to the subscription)
1129
+ */
1130
+ subscriptionId: string;
1131
+ }
1132
+ }
1133
+ }
1134
+
1135
+ /**
1136
+ * A billing contract as reported by the connected billing provider.
1137
+ */
1138
+ export interface ContractListResponse {
1139
+ /**
1140
+ * The persisted Stigg contract id (matches a subscription’s contractId; present
1141
+ * for Stigg-managed contracts)
1142
+ */
1143
+ id: string | null;
1144
+
1145
+ /**
1146
+ * The date the contract activation ends
1147
+ */
1148
+ activationEndDate: string | null;
1149
+
1150
+ /**
1151
+ * The date the contract becomes active
1152
+ */
1153
+ activationStartDate: string | null;
1154
+
1155
+ /**
1156
+ * The billing provider (Received) contract ID; null until the contract has synced
1157
+ * to the billing provider
1158
+ */
1159
+ billingId: string | null;
1160
+
1161
+ /**
1162
+ * The Stigg contract ref ID (the key used to fetch/update/delete this contract)
1163
+ */
1164
+ contractId: string;
1165
+
1166
+ /**
1167
+ * The date the contract was created
1168
+ */
1169
+ createdAt: string | null;
1170
+
1171
+ /**
1172
+ * The external identifier of the customer the contract belongs to
1173
+ */
1174
+ customerExternalId: string | null;
1175
+
1176
+ /**
1177
+ * The external identifier of the contract
1178
+ */
1179
+ externalId: string;
1180
+
1181
+ /**
1182
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
1183
+ * or null when none exists
1184
+ */
1185
+ latestInvoice: ContractListResponse.LatestInvoice | null;
1186
+
1187
+ /**
1188
+ * The contract name (the purchase-order number when set, otherwise the
1189
+ * contract/customer name)
1190
+ */
1191
+ name: string | null;
1192
+
1193
+ /**
1194
+ * A preview of the contract's upcoming invoice, or null when none is available
1195
+ */
1196
+ nextInvoice: ContractListResponse.NextInvoice | null;
1197
+
1198
+ /**
1199
+ * Purchase-order number, when set on the contract
1200
+ */
1201
+ poNumber: string | null;
1202
+
1203
+ /**
1204
+ * The Stigg contract ref ID (present for Stigg-managed contracts; the key used to
1205
+ * update/delete)
1206
+ */
1207
+ refId: string | null;
1208
+
1209
+ /**
1210
+ * The current state of the contract
1211
+ */
1212
+ state: 'DRAFT' | 'ACTIVE' | 'CANCELED' | 'END_BILLING';
1213
+
1214
+ /**
1215
+ * The custom subscriptions attached to this contract (empty when none)
1216
+ */
1217
+ subscriptions: Array<ContractListResponse.Subscription>;
1218
+ }
1219
+
1220
+ export namespace ContractListResponse {
1221
+ /**
1222
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
1223
+ * or null when none exists
1224
+ */
1225
+ export interface LatestInvoice {
1226
+ /**
1227
+ * Invoice billing ID
1228
+ */
1229
+ billingId: string;
1230
+
1231
+ /**
1232
+ * Invoice creation date
1233
+ */
1234
+ createdAt: string;
1235
+
1236
+ /**
1237
+ * Whether payment requires action
1238
+ */
1239
+ requiresAction: boolean;
1240
+
1241
+ /**
1242
+ * Invoice status
1243
+ */
1244
+ status: 'OPEN' | 'CANCELED' | 'PAID';
1245
+
1246
+ /**
1247
+ * Amount due
1248
+ */
1249
+ amountDue?: number | null;
1250
+
1251
+ /**
1252
+ * Billing reason
1253
+ */
1254
+ billingReason?:
1255
+ | 'BILLING_CYCLE'
1256
+ | 'SUBSCRIPTION_CREATION'
1257
+ | 'SUBSCRIPTION_UPDATE'
1258
+ | 'MANUAL'
1259
+ | 'MINIMUM_INVOICE_AMOUNT_EXCEEDED'
1260
+ | 'OTHER'
1261
+ | null;
1262
+
1263
+ /**
1264
+ * Invoice currency
1265
+ */
1266
+ currency?: string | null;
1267
+
1268
+ /**
1269
+ * Invoice PDF URL
1270
+ */
1271
+ pdfUrl?: string | null;
1272
+
1273
+ /**
1274
+ * Total amount
1275
+ */
1276
+ total?: number | null;
1277
+ }
1278
+
1279
+ /**
1280
+ * A preview of the contract's upcoming invoice, or null when none is available
1281
+ */
1282
+ export interface NextInvoice {
1283
+ /**
1284
+ * The total amount of the upcoming invoice
1285
+ */
1286
+ amount: NextInvoice.Amount;
1287
+
1288
+ /**
1289
+ * The date the upcoming invoice is due
1290
+ */
1291
+ dueDate: string | null;
1292
+
1293
+ /**
1294
+ * The end of the billing period the upcoming invoice covers
1295
+ */
1296
+ periodEnd: string | null;
1297
+
1298
+ /**
1299
+ * The start of the billing period the upcoming invoice covers
1300
+ */
1301
+ periodStart: string | null;
1302
+ }
1303
+
1304
+ export namespace NextInvoice {
1305
+ /**
1306
+ * The total amount of the upcoming invoice
1307
+ */
1308
+ export interface Amount {
1309
+ /**
1310
+ * The price amount
1311
+ */
1312
+ amount: number;
1313
+
1314
+ /**
1315
+ * ISO 4217 currency code
1316
+ */
1317
+ currency:
1318
+ | 'usd'
1319
+ | 'aed'
1320
+ | 'all'
1321
+ | 'amd'
1322
+ | 'ang'
1323
+ | 'aud'
1324
+ | 'awg'
1325
+ | 'azn'
1326
+ | 'bam'
1327
+ | 'bbd'
1328
+ | 'bdt'
1329
+ | 'bgn'
1330
+ | 'bif'
1331
+ | 'bmd'
1332
+ | 'bnd'
1333
+ | 'bsd'
1334
+ | 'bwp'
1335
+ | 'byn'
1336
+ | 'bzd'
1337
+ | 'brl'
1338
+ | 'cad'
1339
+ | 'cdf'
1340
+ | 'chf'
1341
+ | 'cny'
1342
+ | 'czk'
1343
+ | 'dkk'
1344
+ | 'dop'
1345
+ | 'dzd'
1346
+ | 'egp'
1347
+ | 'etb'
1348
+ | 'eur'
1349
+ | 'fjd'
1350
+ | 'gbp'
1351
+ | 'gel'
1352
+ | 'gip'
1353
+ | 'gmd'
1354
+ | 'gyd'
1355
+ | 'hkd'
1356
+ | 'hrk'
1357
+ | 'htg'
1358
+ | 'idr'
1359
+ | 'ils'
1360
+ | 'inr'
1361
+ | 'isk'
1362
+ | 'jmd'
1363
+ | 'jpy'
1364
+ | 'kes'
1365
+ | 'kgs'
1366
+ | 'khr'
1367
+ | 'kmf'
1368
+ | 'krw'
1369
+ | 'kyd'
1370
+ | 'kzt'
1371
+ | 'lbp'
1372
+ | 'lkr'
1373
+ | 'lrd'
1374
+ | 'lsl'
1375
+ | 'mad'
1376
+ | 'mdl'
1377
+ | 'mga'
1378
+ | 'mkd'
1379
+ | 'mmk'
1380
+ | 'mnt'
1381
+ | 'mop'
1382
+ | 'mro'
1383
+ | 'mvr'
1384
+ | 'mwk'
1385
+ | 'mxn'
1386
+ | 'myr'
1387
+ | 'mzn'
1388
+ | 'nad'
1389
+ | 'ngn'
1390
+ | 'nok'
1391
+ | 'npr'
1392
+ | 'nzd'
1393
+ | 'pgk'
1394
+ | 'php'
1395
+ | 'pkr'
1396
+ | 'pln'
1397
+ | 'qar'
1398
+ | 'ron'
1399
+ | 'rsd'
1400
+ | 'rub'
1401
+ | 'rwf'
1402
+ | 'sar'
1403
+ | 'sbd'
1404
+ | 'scr'
1405
+ | 'sek'
1406
+ | 'sgd'
1407
+ | 'sle'
1408
+ | 'sll'
1409
+ | 'sos'
1410
+ | 'szl'
1411
+ | 'thb'
1412
+ | 'tjs'
1413
+ | 'top'
1414
+ | 'try'
1415
+ | 'ttd'
1416
+ | 'tzs'
1417
+ | 'uah'
1418
+ | 'uzs'
1419
+ | 'vnd'
1420
+ | 'vuv'
1421
+ | 'wst'
1422
+ | 'xaf'
1423
+ | 'xcd'
1424
+ | 'yer'
1425
+ | 'zar'
1426
+ | 'zmw'
1427
+ | 'clp'
1428
+ | 'djf'
1429
+ | 'gnf'
1430
+ | 'ugx'
1431
+ | 'pyg'
1432
+ | 'xof'
1433
+ | 'xpf';
1434
+ }
1435
+ }
1436
+
1437
+ /**
1438
+ * A custom subscription attached to a contract.
1439
+ */
1440
+ export interface Subscription {
1441
+ /**
1442
+ * Display name of the subscription plan
1443
+ */
1444
+ planDisplayName: string | null;
1445
+
1446
+ /**
1447
+ * Display name of the product the subscription plan belongs to
1448
+ */
1449
+ productDisplayName: string | null;
1450
+
1451
+ /**
1452
+ * The subscription ref ID (use it to deep-link to the subscription)
1453
+ */
1454
+ subscriptionId: string;
1455
+ }
1456
+ }
1457
+
1458
+ /**
1459
+ * Response object
1460
+ */
1461
+ export interface ContractDeleteResponse {
1462
+ /**
1463
+ * A billing contract as reported by the connected billing provider.
1464
+ */
1465
+ data: ContractDeleteResponse.Data;
1466
+ }
1467
+
1468
+ export namespace ContractDeleteResponse {
1469
+ /**
1470
+ * A billing contract as reported by the connected billing provider.
1471
+ */
1472
+ export interface Data {
1473
+ /**
1474
+ * The persisted Stigg contract id (matches a subscription’s contractId; present
1475
+ * for Stigg-managed contracts)
1476
+ */
1477
+ id: string | null;
1478
+
1479
+ /**
1480
+ * The date the contract activation ends
1481
+ */
1482
+ activationEndDate: string | null;
1483
+
1484
+ /**
1485
+ * The date the contract becomes active
1486
+ */
1487
+ activationStartDate: string | null;
1488
+
1489
+ /**
1490
+ * The billing provider (Received) contract ID; null until the contract has synced
1491
+ * to the billing provider
1492
+ */
1493
+ billingId: string | null;
1494
+
1495
+ /**
1496
+ * The Stigg contract ref ID (the key used to fetch/update/delete this contract)
1497
+ */
1498
+ contractId: string;
1499
+
1500
+ /**
1501
+ * The date the contract was created
1502
+ */
1503
+ createdAt: string | null;
1504
+
1505
+ /**
1506
+ * The external identifier of the customer the contract belongs to
1507
+ */
1508
+ customerExternalId: string | null;
1509
+
1510
+ /**
1511
+ * The external identifier of the contract
1512
+ */
1513
+ externalId: string;
1514
+
1515
+ /**
1516
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
1517
+ * or null when none exists
1518
+ */
1519
+ latestInvoice: Data.LatestInvoice | null;
1520
+
1521
+ /**
1522
+ * The contract name (the purchase-order number when set, otherwise the
1523
+ * contract/customer name)
1524
+ */
1525
+ name: string | null;
1526
+
1527
+ /**
1528
+ * A preview of the contract's upcoming invoice, or null when none is available
1529
+ */
1530
+ nextInvoice: Data.NextInvoice | null;
1531
+
1532
+ /**
1533
+ * Purchase-order number, when set on the contract
1534
+ */
1535
+ poNumber: string | null;
1536
+
1537
+ /**
1538
+ * The Stigg contract ref ID (present for Stigg-managed contracts; the key used to
1539
+ * update/delete)
1540
+ */
1541
+ refId: string | null;
1542
+
1543
+ /**
1544
+ * The current state of the contract
1545
+ */
1546
+ state: 'DRAFT' | 'ACTIVE' | 'CANCELED' | 'END_BILLING';
1547
+
1548
+ /**
1549
+ * The custom subscriptions attached to this contract (empty when none)
1550
+ */
1551
+ subscriptions: Array<Data.Subscription>;
1552
+ }
1553
+
1554
+ export namespace Data {
1555
+ /**
1556
+ * The most recent non-draft invoice for this contract (open, paid, or canceled),
1557
+ * or null when none exists
1558
+ */
1559
+ export interface LatestInvoice {
1560
+ /**
1561
+ * Invoice billing ID
1562
+ */
1563
+ billingId: string;
1564
+
1565
+ /**
1566
+ * Invoice creation date
1567
+ */
1568
+ createdAt: string;
1569
+
1570
+ /**
1571
+ * Whether payment requires action
1572
+ */
1573
+ requiresAction: boolean;
1574
+
1575
+ /**
1576
+ * Invoice status
1577
+ */
1578
+ status: 'OPEN' | 'CANCELED' | 'PAID';
1579
+
1580
+ /**
1581
+ * Amount due
1582
+ */
1583
+ amountDue?: number | null;
1584
+
1585
+ /**
1586
+ * Billing reason
1587
+ */
1588
+ billingReason?:
1589
+ | 'BILLING_CYCLE'
1590
+ | 'SUBSCRIPTION_CREATION'
1591
+ | 'SUBSCRIPTION_UPDATE'
1592
+ | 'MANUAL'
1593
+ | 'MINIMUM_INVOICE_AMOUNT_EXCEEDED'
1594
+ | 'OTHER'
1595
+ | null;
1596
+
1597
+ /**
1598
+ * Invoice currency
1599
+ */
1600
+ currency?: string | null;
1601
+
1602
+ /**
1603
+ * Invoice PDF URL
1604
+ */
1605
+ pdfUrl?: string | null;
1606
+
1607
+ /**
1608
+ * Total amount
1609
+ */
1610
+ total?: number | null;
1611
+ }
1612
+
1613
+ /**
1614
+ * A preview of the contract's upcoming invoice, or null when none is available
1615
+ */
1616
+ export interface NextInvoice {
1617
+ /**
1618
+ * The total amount of the upcoming invoice
1619
+ */
1620
+ amount: NextInvoice.Amount;
1621
+
1622
+ /**
1623
+ * The date the upcoming invoice is due
1624
+ */
1625
+ dueDate: string | null;
1626
+
1627
+ /**
1628
+ * The end of the billing period the upcoming invoice covers
1629
+ */
1630
+ periodEnd: string | null;
1631
+
1632
+ /**
1633
+ * The start of the billing period the upcoming invoice covers
1634
+ */
1635
+ periodStart: string | null;
1636
+ }
1637
+
1638
+ export namespace NextInvoice {
1639
+ /**
1640
+ * The total amount of the upcoming invoice
1641
+ */
1642
+ export interface Amount {
1643
+ /**
1644
+ * The price amount
1645
+ */
1646
+ amount: number;
1647
+
1648
+ /**
1649
+ * ISO 4217 currency code
1650
+ */
1651
+ currency:
1652
+ | 'usd'
1653
+ | 'aed'
1654
+ | 'all'
1655
+ | 'amd'
1656
+ | 'ang'
1657
+ | 'aud'
1658
+ | 'awg'
1659
+ | 'azn'
1660
+ | 'bam'
1661
+ | 'bbd'
1662
+ | 'bdt'
1663
+ | 'bgn'
1664
+ | 'bif'
1665
+ | 'bmd'
1666
+ | 'bnd'
1667
+ | 'bsd'
1668
+ | 'bwp'
1669
+ | 'byn'
1670
+ | 'bzd'
1671
+ | 'brl'
1672
+ | 'cad'
1673
+ | 'cdf'
1674
+ | 'chf'
1675
+ | 'cny'
1676
+ | 'czk'
1677
+ | 'dkk'
1678
+ | 'dop'
1679
+ | 'dzd'
1680
+ | 'egp'
1681
+ | 'etb'
1682
+ | 'eur'
1683
+ | 'fjd'
1684
+ | 'gbp'
1685
+ | 'gel'
1686
+ | 'gip'
1687
+ | 'gmd'
1688
+ | 'gyd'
1689
+ | 'hkd'
1690
+ | 'hrk'
1691
+ | 'htg'
1692
+ | 'idr'
1693
+ | 'ils'
1694
+ | 'inr'
1695
+ | 'isk'
1696
+ | 'jmd'
1697
+ | 'jpy'
1698
+ | 'kes'
1699
+ | 'kgs'
1700
+ | 'khr'
1701
+ | 'kmf'
1702
+ | 'krw'
1703
+ | 'kyd'
1704
+ | 'kzt'
1705
+ | 'lbp'
1706
+ | 'lkr'
1707
+ | 'lrd'
1708
+ | 'lsl'
1709
+ | 'mad'
1710
+ | 'mdl'
1711
+ | 'mga'
1712
+ | 'mkd'
1713
+ | 'mmk'
1714
+ | 'mnt'
1715
+ | 'mop'
1716
+ | 'mro'
1717
+ | 'mvr'
1718
+ | 'mwk'
1719
+ | 'mxn'
1720
+ | 'myr'
1721
+ | 'mzn'
1722
+ | 'nad'
1723
+ | 'ngn'
1724
+ | 'nok'
1725
+ | 'npr'
1726
+ | 'nzd'
1727
+ | 'pgk'
1728
+ | 'php'
1729
+ | 'pkr'
1730
+ | 'pln'
1731
+ | 'qar'
1732
+ | 'ron'
1733
+ | 'rsd'
1734
+ | 'rub'
1735
+ | 'rwf'
1736
+ | 'sar'
1737
+ | 'sbd'
1738
+ | 'scr'
1739
+ | 'sek'
1740
+ | 'sgd'
1741
+ | 'sle'
1742
+ | 'sll'
1743
+ | 'sos'
1744
+ | 'szl'
1745
+ | 'thb'
1746
+ | 'tjs'
1747
+ | 'top'
1748
+ | 'try'
1749
+ | 'ttd'
1750
+ | 'tzs'
1751
+ | 'uah'
1752
+ | 'uzs'
1753
+ | 'vnd'
1754
+ | 'vuv'
1755
+ | 'wst'
1756
+ | 'xaf'
1757
+ | 'xcd'
1758
+ | 'yer'
1759
+ | 'zar'
1760
+ | 'zmw'
1761
+ | 'clp'
1762
+ | 'djf'
1763
+ | 'gnf'
1764
+ | 'ugx'
1765
+ | 'pyg'
1766
+ | 'xof'
1767
+ | 'xpf';
1768
+ }
1769
+ }
1770
+
1771
+ /**
1772
+ * A custom subscription attached to a contract.
1773
+ */
1774
+ export interface Subscription {
1775
+ /**
1776
+ * Display name of the subscription plan
1777
+ */
1778
+ planDisplayName: string | null;
1779
+
1780
+ /**
1781
+ * Display name of the product the subscription plan belongs to
1782
+ */
1783
+ productDisplayName: string | null;
1784
+
1785
+ /**
1786
+ * The subscription ref ID (use it to deep-link to the subscription)
1787
+ */
1788
+ subscriptionId: string;
1789
+ }
1790
+ }
1791
+ }
1792
+
1793
+ export interface ContractCreateParams {
1794
+ /**
1795
+ * Body param: The customer ref ID the contract belongs to
1796
+ */
1797
+ customerId: string;
1798
+
1799
+ /**
1800
+ * Body param: The subscriptions to attach to the contract (must be non-empty).
1801
+ * Each entry is either a new subscription to create or a reference to an existing
1802
+ * custom subscription.
1803
+ */
1804
+ subscriptions: Array<ContractCreateParams.Subscription>;
1805
+
1806
+ /**
1807
+ * Body param: Optional contract activation end date
1808
+ */
1809
+ activationEndDate?: string;
1810
+
1811
+ /**
1812
+ * Body param: Optional contract activation start date
1813
+ */
1814
+ activationStartDate?: string;
1815
+
1816
+ /**
1817
+ * Body param: Optional contract name
1818
+ */
1819
+ name?: string | null;
1820
+
1821
+ /**
1822
+ * Body param: Optional purchase-order number
1823
+ */
1824
+ poNumber?: string | null;
1825
+
1826
+ /**
1827
+ * Body param: Whether to set up billing for the contract by creating a billing
1828
+ * contract in the connected billing provider. When false, the contract only
1829
+ * provisions access (grants entitlements) and no billing contract is created.
1830
+ * Defaults to true.
1831
+ */
1832
+ setupBilling?: boolean;
1833
+
1834
+ /**
1835
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
1836
+ * token); falls back to the user's first membership. Ignored for API-key auth.
1837
+ */
1838
+ 'X-ACCOUNT-ID'?: string;
1839
+
1840
+ /**
1841
+ * Header param: Environment ID — required when authenticating with a user JWT
1842
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
1843
+ * intrinsic to the key).
1844
+ */
1845
+ 'X-ENVIRONMENT-ID'?: string;
1846
+ }
1847
+
1848
+ export namespace ContractCreateParams {
1849
+ /**
1850
+ * A single subscription on a contract: exactly one of newSubscription or
1851
+ * existingSubscriptionId must be set.
1852
+ */
1853
+ export interface Subscription {
1854
+ /**
1855
+ * The subscription ref ID of an already-created custom subscription to link
1856
+ */
1857
+ existingSubscriptionId?: string;
1858
+
1859
+ /**
1860
+ * A new subscription to create, using the same body the provision-subscription
1861
+ * endpoint accepts
1862
+ */
1863
+ newSubscription?: Subscription.NewSubscription;
1864
+ }
1865
+
1866
+ export namespace Subscription {
1867
+ /**
1868
+ * A new subscription to create, using the same body the provision-subscription
1869
+ * endpoint accepts
1870
+ */
1871
+ export interface NewSubscription {
1872
+ /**
1873
+ * Customer ID to provision the subscription for
1874
+ */
1875
+ customerId: string;
1876
+
1877
+ /**
1878
+ * Plan ID to provision
1879
+ */
1880
+ planId: string;
1881
+
1882
+ /**
1883
+ * Unique identifier for the subscription
1884
+ */
1885
+ id?: string;
1886
+
1887
+ addons?: Array<NewSubscription.Addon>;
1888
+
1889
+ /**
1890
+ * Coupon configuration
1891
+ */
1892
+ appliedCoupon?: NewSubscription.AppliedCoupon;
1893
+
1894
+ /**
1895
+ * Whether to wait for payment confirmation before returning the subscription
1896
+ */
1897
+ awaitPaymentConfirmation?: boolean;
1898
+
1899
+ /**
1900
+ * The ISO 3166-1 alpha-2 country code for billing
1901
+ */
1902
+ billingCountryCode?: string | null;
1903
+
1904
+ /**
1905
+ * Billing cycle anchor behavior for the subscription
1906
+ */
1907
+ billingCycleAnchor?: 'UNCHANGED' | 'NOW';
1908
+
1909
+ /**
1910
+ * External billing system identifier
1911
+ */
1912
+ billingId?: string | null;
1913
+
1914
+ billingInformation?: NewSubscription.BillingInformation;
1915
+
1916
+ /**
1917
+ * Billing period (MONTHLY or ANNUALLY)
1918
+ */
1919
+ billingPeriod?: 'MONTHLY' | 'ANNUALLY';
1920
+
1921
+ budget?: NewSubscription.Budget | null;
1922
+
1923
+ /**
1924
+ * Subscription cancellation date
1925
+ */
1926
+ cancellationDate?: string;
1927
+
1928
+ charges?: Array<NewSubscription.Charge>;
1929
+
1930
+ /**
1931
+ * Checkout page configuration for payment collection
1932
+ */
1933
+ checkoutOptions?: NewSubscription.CheckoutOptions;
1934
+
1935
+ entitlements?: Array<NewSubscription.Feature | NewSubscription.Credit>;
1936
+
1937
+ /**
1938
+ * Additional metadata for the subscription
1939
+ */
1940
+ metadata?: { [key: string]: string };
1941
+
1942
+ /**
1943
+ * Minimum spend amount
1944
+ */
1945
+ minimumSpend?: NewSubscription.MinimumSpend | null;
1946
+
1947
+ /**
1948
+ * Optional paying customer ID for split billing scenarios
1949
+ */
1950
+ payingCustomerId?: string | null;
1951
+
1952
+ /**
1953
+ * How payments should be collected for this subscription
1954
+ */
1955
+ paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE';
1956
+
1957
+ priceOverrides?: Array<NewSubscription.PriceOverride>;
1958
+
1959
+ /**
1960
+ * Optional resource ID for multi-instance subscriptions
1961
+ */
1962
+ resourceId?: string | null;
1963
+
1964
+ /**
1965
+ * Salesforce ID
1966
+ */
1967
+ salesforceId?: string | null;
1968
+
1969
+ /**
1970
+ * Strategy for scheduling subscription changes
1971
+ */
1972
+ scheduleStrategy?: 'END_OF_BILLING_PERIOD' | 'END_OF_BILLING_MONTH' | 'IMMEDIATE';
1973
+
1974
+ /**
1975
+ * Subscription start date
1976
+ */
1977
+ startDate?: string;
1978
+
1979
+ /**
1980
+ * Trial period override settings
1981
+ */
1982
+ trialOverrideConfiguration?: NewSubscription.TrialOverrideConfiguration;
1983
+
1984
+ /**
1985
+ * Unit quantity for per-unit pricing. Minimum is 0 (zero is allowed).
1986
+ */
1987
+ unitQuantity?: number;
1988
+ }
1989
+
1990
+ export namespace NewSubscription {
1991
+ /**
1992
+ * Addon configuration
1993
+ */
1994
+ export interface Addon {
1995
+ /**
1996
+ * Addon ID
1997
+ */
1998
+ id: string;
1999
+
2000
+ /**
2001
+ * Number of addon instances
2002
+ */
2003
+ quantity: number;
2004
+ }
2005
+
2006
+ /**
2007
+ * Coupon configuration
2008
+ */
2009
+ export interface AppliedCoupon {
2010
+ /**
2011
+ * Billing provider coupon ID
2012
+ */
2013
+ billingCouponId?: string;
2014
+
2015
+ /**
2016
+ * Coupon timing configuration
2017
+ */
2018
+ configuration?: AppliedCoupon.Configuration;
2019
+
2020
+ /**
2021
+ * Stigg coupon ID
2022
+ */
2023
+ couponId?: string;
2024
+
2025
+ /**
2026
+ * Ad-hoc discount configuration
2027
+ */
2028
+ discount?: AppliedCoupon.Discount;
2029
+
2030
+ /**
2031
+ * Promotion code to apply
2032
+ */
2033
+ promotionCode?: string;
2034
+ }
2035
+
2036
+ export namespace AppliedCoupon {
2037
+ /**
2038
+ * Coupon timing configuration
2039
+ */
2040
+ export interface Configuration {
2041
+ /**
2042
+ * Coupon start date
2043
+ */
2044
+ startDate?: string;
2045
+ }
2046
+
2047
+ /**
2048
+ * Ad-hoc discount configuration
2049
+ */
2050
+ export interface Discount {
2051
+ /**
2052
+ * Fixed amounts off by currency
2053
+ */
2054
+ amountsOff?: Array<Discount.AmountsOff> | null;
2055
+
2056
+ /**
2057
+ * Ad-hoc discount
2058
+ */
2059
+ description?: string;
2060
+
2061
+ /**
2062
+ * Duration in months
2063
+ */
2064
+ durationInMonths?: number;
2065
+
2066
+ /**
2067
+ * Discount name
2068
+ */
2069
+ name?: string;
2070
+
2071
+ /**
2072
+ * Percentage discount
2073
+ */
2074
+ percentOff?: number;
2075
+ }
2076
+
2077
+ export namespace Discount {
2078
+ export interface AmountsOff {
2079
+ /**
2080
+ * The price amount
2081
+ */
2082
+ amount: number;
2083
+
2084
+ /**
2085
+ * ISO 4217 currency code
2086
+ */
2087
+ currency:
2088
+ | 'usd'
2089
+ | 'aed'
2090
+ | 'all'
2091
+ | 'amd'
2092
+ | 'ang'
2093
+ | 'aud'
2094
+ | 'awg'
2095
+ | 'azn'
2096
+ | 'bam'
2097
+ | 'bbd'
2098
+ | 'bdt'
2099
+ | 'bgn'
2100
+ | 'bif'
2101
+ | 'bmd'
2102
+ | 'bnd'
2103
+ | 'bsd'
2104
+ | 'bwp'
2105
+ | 'byn'
2106
+ | 'bzd'
2107
+ | 'brl'
2108
+ | 'cad'
2109
+ | 'cdf'
2110
+ | 'chf'
2111
+ | 'cny'
2112
+ | 'czk'
2113
+ | 'dkk'
2114
+ | 'dop'
2115
+ | 'dzd'
2116
+ | 'egp'
2117
+ | 'etb'
2118
+ | 'eur'
2119
+ | 'fjd'
2120
+ | 'gbp'
2121
+ | 'gel'
2122
+ | 'gip'
2123
+ | 'gmd'
2124
+ | 'gyd'
2125
+ | 'hkd'
2126
+ | 'hrk'
2127
+ | 'htg'
2128
+ | 'idr'
2129
+ | 'ils'
2130
+ | 'inr'
2131
+ | 'isk'
2132
+ | 'jmd'
2133
+ | 'jpy'
2134
+ | 'kes'
2135
+ | 'kgs'
2136
+ | 'khr'
2137
+ | 'kmf'
2138
+ | 'krw'
2139
+ | 'kyd'
2140
+ | 'kzt'
2141
+ | 'lbp'
2142
+ | 'lkr'
2143
+ | 'lrd'
2144
+ | 'lsl'
2145
+ | 'mad'
2146
+ | 'mdl'
2147
+ | 'mga'
2148
+ | 'mkd'
2149
+ | 'mmk'
2150
+ | 'mnt'
2151
+ | 'mop'
2152
+ | 'mro'
2153
+ | 'mvr'
2154
+ | 'mwk'
2155
+ | 'mxn'
2156
+ | 'myr'
2157
+ | 'mzn'
2158
+ | 'nad'
2159
+ | 'ngn'
2160
+ | 'nok'
2161
+ | 'npr'
2162
+ | 'nzd'
2163
+ | 'pgk'
2164
+ | 'php'
2165
+ | 'pkr'
2166
+ | 'pln'
2167
+ | 'qar'
2168
+ | 'ron'
2169
+ | 'rsd'
2170
+ | 'rub'
2171
+ | 'rwf'
2172
+ | 'sar'
2173
+ | 'sbd'
2174
+ | 'scr'
2175
+ | 'sek'
2176
+ | 'sgd'
2177
+ | 'sle'
2178
+ | 'sll'
2179
+ | 'sos'
2180
+ | 'szl'
2181
+ | 'thb'
2182
+ | 'tjs'
2183
+ | 'top'
2184
+ | 'try'
2185
+ | 'ttd'
2186
+ | 'tzs'
2187
+ | 'uah'
2188
+ | 'uzs'
2189
+ | 'vnd'
2190
+ | 'vuv'
2191
+ | 'wst'
2192
+ | 'xaf'
2193
+ | 'xcd'
2194
+ | 'yer'
2195
+ | 'zar'
2196
+ | 'zmw'
2197
+ | 'clp'
2198
+ | 'djf'
2199
+ | 'gnf'
2200
+ | 'ugx'
2201
+ | 'pyg'
2202
+ | 'xof'
2203
+ | 'xpf';
2204
+ }
2205
+ }
2206
+ }
2207
+
2208
+ export interface BillingInformation {
2209
+ /**
2210
+ * Billing address for the subscription
2211
+ */
2212
+ billingAddress?: BillingInformation.BillingAddress;
2213
+
2214
+ /**
2215
+ * Stripe Connect account to charge on behalf of
2216
+ */
2217
+ chargeOnBehalfOfAccount?: string | null;
2218
+
2219
+ /**
2220
+ * Billing integration identifier
2221
+ */
2222
+ integrationId?: string | null;
2223
+
2224
+ /**
2225
+ * Number of days until invoice is due
2226
+ */
2227
+ invoiceDaysUntilDue?: number;
2228
+
2229
+ /**
2230
+ * Whether the subscription is backdated
2231
+ */
2232
+ isBackdated?: boolean;
2233
+
2234
+ /**
2235
+ * Whether the invoice is marked as paid
2236
+ */
2237
+ isInvoicePaid?: boolean;
2238
+
2239
+ /**
2240
+ * Additional metadata for the subscription
2241
+ */
2242
+ metadata?: { [key: string]: string };
2243
+
2244
+ /**
2245
+ * How to handle proration for billing changes
2246
+ */
2247
+ prorationBehavior?: 'INVOICE_IMMEDIATELY' | 'CREATE_PRORATIONS' | 'NONE';
2248
+
2249
+ /**
2250
+ * Customer tax identification numbers
2251
+ */
2252
+ taxIds?: Array<BillingInformation.TaxID>;
2253
+
2254
+ /**
2255
+ * Tax percentage (0-100)
2256
+ */
2257
+ taxPercentage?: number;
2258
+
2259
+ /**
2260
+ * Tax rate identifiers to apply
2261
+ */
2262
+ taxRateIds?: Array<string>;
2263
+ }
2264
+
2265
+ export namespace BillingInformation {
2266
+ /**
2267
+ * Billing address for the subscription
2268
+ */
2269
+ export interface BillingAddress {
2270
+ city?: string;
2271
+
2272
+ country?: string;
2273
+
2274
+ line1?: string;
2275
+
2276
+ line2?: string;
2277
+
2278
+ postalCode?: string;
2279
+
2280
+ state?: string;
2281
+ }
2282
+
2283
+ /**
2284
+ * Tax identifier with type and value for customer tax exemptions.
2285
+ */
2286
+ export interface TaxID {
2287
+ /**
2288
+ * The type of tax exemption identifier, such as VAT.
2289
+ */
2290
+ type: string;
2291
+
2292
+ /**
2293
+ * The actual tax identifier value
2294
+ */
2295
+ value: string;
2296
+ }
2297
+ }
2298
+
2299
+ export interface Budget {
2300
+ /**
2301
+ * Whether the budget is a soft limit
2302
+ */
2303
+ hasSoftLimit: boolean;
2304
+
2305
+ /**
2306
+ * Maximum spending limit
2307
+ */
2308
+ limit: number;
2309
+ }
2310
+
2311
+ /**
2312
+ * A charge selection for a subscription (references a catalog charge with a
2313
+ * quantity).
2314
+ */
2315
+ export interface Charge {
2316
+ /**
2317
+ * Charge ID
2318
+ */
2319
+ id: string;
2320
+
2321
+ /**
2322
+ * Charge quantity. Minimum is 0 (zero is allowed).
2323
+ */
2324
+ quantity: number;
2325
+
2326
+ /**
2327
+ * Charge type
2328
+ */
2329
+ type: 'FEATURE' | 'CREDIT';
2330
+ }
2331
+
2332
+ /**
2333
+ * Checkout page configuration for payment collection
2334
+ */
2335
+ export interface CheckoutOptions {
2336
+ /**
2337
+ * URL to redirect to if checkout is canceled
2338
+ */
2339
+ cancelUrl: string;
2340
+
2341
+ /**
2342
+ * URL to redirect to after successful checkout
2343
+ */
2344
+ successUrl: string;
2345
+
2346
+ /**
2347
+ * Allow promotional codes during checkout
2348
+ */
2349
+ allowPromoCodes?: boolean;
2350
+
2351
+ /**
2352
+ * Allow tax ID collection during checkout
2353
+ */
2354
+ allowTaxIdCollection?: boolean;
2355
+
2356
+ /**
2357
+ * Collect billing address during checkout
2358
+ */
2359
+ collectBillingAddress?: boolean;
2360
+
2361
+ /**
2362
+ * Collect phone number during checkout
2363
+ */
2364
+ collectPhoneNumber?: boolean;
2365
+
2366
+ /**
2367
+ * Optional reference ID for the checkout session
2368
+ */
2369
+ referenceId?: string | null;
2370
+ }
2371
+
2372
+ /**
2373
+ * Feature entitlement configuration for a subscription
2374
+ */
2375
+ export interface Feature {
2376
+ /**
2377
+ * The feature ID to attach the entitlement to
2378
+ */
2379
+ id: string;
2380
+
2381
+ /**
2382
+ * SubscriptionFeatureEntitlementRequest
2383
+ */
2384
+ type: 'FEATURE';
2385
+
2386
+ /**
2387
+ * Whether the usage limit is a soft limit
2388
+ */
2389
+ hasSoftLimit?: boolean;
2390
+
2391
+ /**
2392
+ * Whether usage is unlimited
2393
+ */
2394
+ hasUnlimitedUsage?: boolean;
2395
+
2396
+ /**
2397
+ * Configuration for monthly reset period
2398
+ */
2399
+ monthlyResetPeriodConfiguration?: Feature.MonthlyResetPeriodConfiguration | null;
2400
+
2401
+ /**
2402
+ * Period at which usage resets
2403
+ */
2404
+ resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
2405
+
2406
+ /**
2407
+ * Maximum allowed usage for the feature
2408
+ */
2409
+ usageLimit?: number;
2410
+
2411
+ /**
2412
+ * Configuration for weekly reset period
2413
+ */
2414
+ weeklyResetPeriodConfiguration?: Feature.WeeklyResetPeriodConfiguration | null;
2415
+
2416
+ /**
2417
+ * Configuration for yearly reset period
2418
+ */
2419
+ yearlyResetPeriodConfiguration?: Feature.YearlyResetPeriodConfiguration | null;
2420
+ }
2421
+
2422
+ export namespace Feature {
2423
+ /**
2424
+ * Configuration for monthly reset period
2425
+ */
2426
+ export interface MonthlyResetPeriodConfiguration {
2427
+ /**
2428
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
2429
+ */
2430
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
2431
+ }
2432
+
2433
+ /**
2434
+ * Configuration for weekly reset period
2435
+ */
2436
+ export interface WeeklyResetPeriodConfiguration {
2437
+ /**
2438
+ * Reset anchor (SubscriptionStart or specific day)
2439
+ */
2440
+ accordingTo:
2441
+ | 'SubscriptionStart'
2442
+ | 'EverySunday'
2443
+ | 'EveryMonday'
2444
+ | 'EveryTuesday'
2445
+ | 'EveryWednesday'
2446
+ | 'EveryThursday'
2447
+ | 'EveryFriday'
2448
+ | 'EverySaturday';
2449
+ }
2450
+
2451
+ /**
2452
+ * Configuration for yearly reset period
2453
+ */
2454
+ export interface YearlyResetPeriodConfiguration {
2455
+ /**
2456
+ * Reset anchor (SubscriptionStart)
2457
+ */
2458
+ accordingTo: 'SubscriptionStart';
2459
+ }
2460
+ }
2461
+
2462
+ /**
2463
+ * Credit entitlement configuration for a subscription
2464
+ */
2465
+ export interface Credit {
2466
+ /**
2467
+ * The custom currency ID for the credit entitlement
2468
+ */
2469
+ id: string;
2470
+
2471
+ /**
2472
+ * Credit grant amount
2473
+ */
2474
+ amount: number;
2475
+
2476
+ /**
2477
+ * Credit grant cadence (MONTH or YEAR)
2478
+ */
2479
+ cadence: 'MONTH' | 'YEAR';
2480
+
2481
+ /**
2482
+ * SubscriptionCreditEntitlementRequest
2483
+ */
2484
+ type: 'CREDIT';
2485
+ }
2486
+
2487
+ /**
2488
+ * Minimum spend amount
2489
+ */
2490
+ export interface MinimumSpend {
2491
+ /**
2492
+ * The price amount
2493
+ */
2494
+ amount?: number;
2495
+
2496
+ /**
2497
+ * The price currency
2498
+ */
2499
+ currency?:
2500
+ | 'usd'
2501
+ | 'aed'
2502
+ | 'all'
2503
+ | 'amd'
2504
+ | 'ang'
2505
+ | 'aud'
2506
+ | 'awg'
2507
+ | 'azn'
2508
+ | 'bam'
2509
+ | 'bbd'
2510
+ | 'bdt'
2511
+ | 'bgn'
2512
+ | 'bif'
2513
+ | 'bmd'
2514
+ | 'bnd'
2515
+ | 'bsd'
2516
+ | 'bwp'
2517
+ | 'byn'
2518
+ | 'bzd'
2519
+ | 'brl'
2520
+ | 'cad'
2521
+ | 'cdf'
2522
+ | 'chf'
2523
+ | 'cny'
2524
+ | 'czk'
2525
+ | 'dkk'
2526
+ | 'dop'
2527
+ | 'dzd'
2528
+ | 'egp'
2529
+ | 'etb'
2530
+ | 'eur'
2531
+ | 'fjd'
2532
+ | 'gbp'
2533
+ | 'gel'
2534
+ | 'gip'
2535
+ | 'gmd'
2536
+ | 'gyd'
2537
+ | 'hkd'
2538
+ | 'hrk'
2539
+ | 'htg'
2540
+ | 'idr'
2541
+ | 'ils'
2542
+ | 'inr'
2543
+ | 'isk'
2544
+ | 'jmd'
2545
+ | 'jpy'
2546
+ | 'kes'
2547
+ | 'kgs'
2548
+ | 'khr'
2549
+ | 'kmf'
2550
+ | 'krw'
2551
+ | 'kyd'
2552
+ | 'kzt'
2553
+ | 'lbp'
2554
+ | 'lkr'
2555
+ | 'lrd'
2556
+ | 'lsl'
2557
+ | 'mad'
2558
+ | 'mdl'
2559
+ | 'mga'
2560
+ | 'mkd'
2561
+ | 'mmk'
2562
+ | 'mnt'
2563
+ | 'mop'
2564
+ | 'mro'
2565
+ | 'mvr'
2566
+ | 'mwk'
2567
+ | 'mxn'
2568
+ | 'myr'
2569
+ | 'mzn'
2570
+ | 'nad'
2571
+ | 'ngn'
2572
+ | 'nok'
2573
+ | 'npr'
2574
+ | 'nzd'
2575
+ | 'pgk'
2576
+ | 'php'
2577
+ | 'pkr'
2578
+ | 'pln'
2579
+ | 'qar'
2580
+ | 'ron'
2581
+ | 'rsd'
2582
+ | 'rub'
2583
+ | 'rwf'
2584
+ | 'sar'
2585
+ | 'sbd'
2586
+ | 'scr'
2587
+ | 'sek'
2588
+ | 'sgd'
2589
+ | 'sle'
2590
+ | 'sll'
2591
+ | 'sos'
2592
+ | 'szl'
2593
+ | 'thb'
2594
+ | 'tjs'
2595
+ | 'top'
2596
+ | 'try'
2597
+ | 'ttd'
2598
+ | 'tzs'
2599
+ | 'uah'
2600
+ | 'uzs'
2601
+ | 'vnd'
2602
+ | 'vuv'
2603
+ | 'wst'
2604
+ | 'xaf'
2605
+ | 'xcd'
2606
+ | 'yer'
2607
+ | 'zar'
2608
+ | 'zmw'
2609
+ | 'clp'
2610
+ | 'djf'
2611
+ | 'gnf'
2612
+ | 'ugx'
2613
+ | 'pyg'
2614
+ | 'xof'
2615
+ | 'xpf';
2616
+ }
2617
+
2618
+ export interface PriceOverride {
2619
+ /**
2620
+ * Addon identifier for the price override
2621
+ */
2622
+ addonId?: string | null;
2623
+
2624
+ /**
2625
+ * The price amount
2626
+ */
2627
+ amount?: number;
2628
+
2629
+ /**
2630
+ * Whether this is a base charge override
2631
+ */
2632
+ baseCharge?: boolean;
2633
+
2634
+ /**
2635
+ * The billing country code of the price
2636
+ */
2637
+ billingCountryCode?: string;
2638
+
2639
+ /**
2640
+ * Block size for pricing
2641
+ */
2642
+ blockSize?: number;
2643
+
2644
+ creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
2645
+
2646
+ creditRate?: PriceOverride.CreditRate;
2647
+
2648
+ /**
2649
+ * The price currency
2650
+ */
2651
+ currency?:
2652
+ | 'usd'
2653
+ | 'aed'
2654
+ | 'all'
2655
+ | 'amd'
2656
+ | 'ang'
2657
+ | 'aud'
2658
+ | 'awg'
2659
+ | 'azn'
2660
+ | 'bam'
2661
+ | 'bbd'
2662
+ | 'bdt'
2663
+ | 'bgn'
2664
+ | 'bif'
2665
+ | 'bmd'
2666
+ | 'bnd'
2667
+ | 'bsd'
2668
+ | 'bwp'
2669
+ | 'byn'
2670
+ | 'bzd'
2671
+ | 'brl'
2672
+ | 'cad'
2673
+ | 'cdf'
2674
+ | 'chf'
2675
+ | 'cny'
2676
+ | 'czk'
2677
+ | 'dkk'
2678
+ | 'dop'
2679
+ | 'dzd'
2680
+ | 'egp'
2681
+ | 'etb'
2682
+ | 'eur'
2683
+ | 'fjd'
2684
+ | 'gbp'
2685
+ | 'gel'
2686
+ | 'gip'
2687
+ | 'gmd'
2688
+ | 'gyd'
2689
+ | 'hkd'
2690
+ | 'hrk'
2691
+ | 'htg'
2692
+ | 'idr'
2693
+ | 'ils'
2694
+ | 'inr'
2695
+ | 'isk'
2696
+ | 'jmd'
2697
+ | 'jpy'
2698
+ | 'kes'
2699
+ | 'kgs'
2700
+ | 'khr'
2701
+ | 'kmf'
2702
+ | 'krw'
2703
+ | 'kyd'
2704
+ | 'kzt'
2705
+ | 'lbp'
2706
+ | 'lkr'
2707
+ | 'lrd'
2708
+ | 'lsl'
2709
+ | 'mad'
2710
+ | 'mdl'
2711
+ | 'mga'
2712
+ | 'mkd'
2713
+ | 'mmk'
2714
+ | 'mnt'
2715
+ | 'mop'
2716
+ | 'mro'
2717
+ | 'mvr'
2718
+ | 'mwk'
2719
+ | 'mxn'
2720
+ | 'myr'
2721
+ | 'mzn'
2722
+ | 'nad'
2723
+ | 'ngn'
2724
+ | 'nok'
2725
+ | 'npr'
2726
+ | 'nzd'
2727
+ | 'pgk'
2728
+ | 'php'
2729
+ | 'pkr'
2730
+ | 'pln'
2731
+ | 'qar'
2732
+ | 'ron'
2733
+ | 'rsd'
2734
+ | 'rub'
2735
+ | 'rwf'
2736
+ | 'sar'
2737
+ | 'sbd'
2738
+ | 'scr'
2739
+ | 'sek'
2740
+ | 'sgd'
2741
+ | 'sle'
2742
+ | 'sll'
2743
+ | 'sos'
2744
+ | 'szl'
2745
+ | 'thb'
2746
+ | 'tjs'
2747
+ | 'top'
2748
+ | 'try'
2749
+ | 'ttd'
2750
+ | 'tzs'
2751
+ | 'uah'
2752
+ | 'uzs'
2753
+ | 'vnd'
2754
+ | 'vuv'
2755
+ | 'wst'
2756
+ | 'xaf'
2757
+ | 'xcd'
2758
+ | 'yer'
2759
+ | 'zar'
2760
+ | 'zmw'
2761
+ | 'clp'
2762
+ | 'djf'
2763
+ | 'gnf'
2764
+ | 'ugx'
2765
+ | 'pyg'
2766
+ | 'xof'
2767
+ | 'xpf';
2768
+
2769
+ /**
2770
+ * Feature identifier for the price override
2771
+ */
2772
+ featureId?: string | null;
2773
+
2774
+ /**
2775
+ * Pricing tiers configuration
2776
+ */
2777
+ tiers?: Array<PriceOverride.Tier>;
2778
+ }
2779
+
2780
+ export namespace PriceOverride {
2781
+ export interface CreditRate {
2782
+ /**
2783
+ * The credit rate amount
2784
+ */
2785
+ amount: number;
2786
+
2787
+ /**
2788
+ * The custom currency refId for the credit rate
2789
+ */
2790
+ currencyId: string;
2791
+
2792
+ /**
2793
+ * A custom formula for calculating cost based on single event dimensions
2794
+ */
2795
+ costFormula?: string | null;
2796
+ }
2797
+
2798
+ export interface Tier {
2799
+ /**
2800
+ * The flat fee price of the price tier
2801
+ */
2802
+ flatPrice?: Tier.FlatPrice;
2803
+
2804
+ /**
2805
+ * The unit price of the price tier
2806
+ */
2807
+ unitPrice?: Tier.UnitPrice;
2808
+
2809
+ /**
2810
+ * The up to quantity of the price tier
2811
+ */
2812
+ upTo?: number;
2813
+ }
2814
+
2815
+ export namespace Tier {
2816
+ /**
2817
+ * The flat fee price of the price tier
2818
+ */
2819
+ export interface FlatPrice {
2820
+ /**
2821
+ * The price amount
2822
+ */
2823
+ amount: number;
2824
+
2825
+ /**
2826
+ * ISO 4217 currency code
2827
+ */
2828
+ currency:
2829
+ | 'usd'
2830
+ | 'aed'
2831
+ | 'all'
2832
+ | 'amd'
2833
+ | 'ang'
2834
+ | 'aud'
2835
+ | 'awg'
2836
+ | 'azn'
2837
+ | 'bam'
2838
+ | 'bbd'
2839
+ | 'bdt'
2840
+ | 'bgn'
2841
+ | 'bif'
2842
+ | 'bmd'
2843
+ | 'bnd'
2844
+ | 'bsd'
2845
+ | 'bwp'
2846
+ | 'byn'
2847
+ | 'bzd'
2848
+ | 'brl'
2849
+ | 'cad'
2850
+ | 'cdf'
2851
+ | 'chf'
2852
+ | 'cny'
2853
+ | 'czk'
2854
+ | 'dkk'
2855
+ | 'dop'
2856
+ | 'dzd'
2857
+ | 'egp'
2858
+ | 'etb'
2859
+ | 'eur'
2860
+ | 'fjd'
2861
+ | 'gbp'
2862
+ | 'gel'
2863
+ | 'gip'
2864
+ | 'gmd'
2865
+ | 'gyd'
2866
+ | 'hkd'
2867
+ | 'hrk'
2868
+ | 'htg'
2869
+ | 'idr'
2870
+ | 'ils'
2871
+ | 'inr'
2872
+ | 'isk'
2873
+ | 'jmd'
2874
+ | 'jpy'
2875
+ | 'kes'
2876
+ | 'kgs'
2877
+ | 'khr'
2878
+ | 'kmf'
2879
+ | 'krw'
2880
+ | 'kyd'
2881
+ | 'kzt'
2882
+ | 'lbp'
2883
+ | 'lkr'
2884
+ | 'lrd'
2885
+ | 'lsl'
2886
+ | 'mad'
2887
+ | 'mdl'
2888
+ | 'mga'
2889
+ | 'mkd'
2890
+ | 'mmk'
2891
+ | 'mnt'
2892
+ | 'mop'
2893
+ | 'mro'
2894
+ | 'mvr'
2895
+ | 'mwk'
2896
+ | 'mxn'
2897
+ | 'myr'
2898
+ | 'mzn'
2899
+ | 'nad'
2900
+ | 'ngn'
2901
+ | 'nok'
2902
+ | 'npr'
2903
+ | 'nzd'
2904
+ | 'pgk'
2905
+ | 'php'
2906
+ | 'pkr'
2907
+ | 'pln'
2908
+ | 'qar'
2909
+ | 'ron'
2910
+ | 'rsd'
2911
+ | 'rub'
2912
+ | 'rwf'
2913
+ | 'sar'
2914
+ | 'sbd'
2915
+ | 'scr'
2916
+ | 'sek'
2917
+ | 'sgd'
2918
+ | 'sle'
2919
+ | 'sll'
2920
+ | 'sos'
2921
+ | 'szl'
2922
+ | 'thb'
2923
+ | 'tjs'
2924
+ | 'top'
2925
+ | 'try'
2926
+ | 'ttd'
2927
+ | 'tzs'
2928
+ | 'uah'
2929
+ | 'uzs'
2930
+ | 'vnd'
2931
+ | 'vuv'
2932
+ | 'wst'
2933
+ | 'xaf'
2934
+ | 'xcd'
2935
+ | 'yer'
2936
+ | 'zar'
2937
+ | 'zmw'
2938
+ | 'clp'
2939
+ | 'djf'
2940
+ | 'gnf'
2941
+ | 'ugx'
2942
+ | 'pyg'
2943
+ | 'xof'
2944
+ | 'xpf';
2945
+ }
2946
+
2947
+ /**
2948
+ * The unit price of the price tier
2949
+ */
2950
+ export interface UnitPrice {
2951
+ /**
2952
+ * The price amount
2953
+ */
2954
+ amount: number;
2955
+
2956
+ /**
2957
+ * ISO 4217 currency code
2958
+ */
2959
+ currency:
2960
+ | 'usd'
2961
+ | 'aed'
2962
+ | 'all'
2963
+ | 'amd'
2964
+ | 'ang'
2965
+ | 'aud'
2966
+ | 'awg'
2967
+ | 'azn'
2968
+ | 'bam'
2969
+ | 'bbd'
2970
+ | 'bdt'
2971
+ | 'bgn'
2972
+ | 'bif'
2973
+ | 'bmd'
2974
+ | 'bnd'
2975
+ | 'bsd'
2976
+ | 'bwp'
2977
+ | 'byn'
2978
+ | 'bzd'
2979
+ | 'brl'
2980
+ | 'cad'
2981
+ | 'cdf'
2982
+ | 'chf'
2983
+ | 'cny'
2984
+ | 'czk'
2985
+ | 'dkk'
2986
+ | 'dop'
2987
+ | 'dzd'
2988
+ | 'egp'
2989
+ | 'etb'
2990
+ | 'eur'
2991
+ | 'fjd'
2992
+ | 'gbp'
2993
+ | 'gel'
2994
+ | 'gip'
2995
+ | 'gmd'
2996
+ | 'gyd'
2997
+ | 'hkd'
2998
+ | 'hrk'
2999
+ | 'htg'
3000
+ | 'idr'
3001
+ | 'ils'
3002
+ | 'inr'
3003
+ | 'isk'
3004
+ | 'jmd'
3005
+ | 'jpy'
3006
+ | 'kes'
3007
+ | 'kgs'
3008
+ | 'khr'
3009
+ | 'kmf'
3010
+ | 'krw'
3011
+ | 'kyd'
3012
+ | 'kzt'
3013
+ | 'lbp'
3014
+ | 'lkr'
3015
+ | 'lrd'
3016
+ | 'lsl'
3017
+ | 'mad'
3018
+ | 'mdl'
3019
+ | 'mga'
3020
+ | 'mkd'
3021
+ | 'mmk'
3022
+ | 'mnt'
3023
+ | 'mop'
3024
+ | 'mro'
3025
+ | 'mvr'
3026
+ | 'mwk'
3027
+ | 'mxn'
3028
+ | 'myr'
3029
+ | 'mzn'
3030
+ | 'nad'
3031
+ | 'ngn'
3032
+ | 'nok'
3033
+ | 'npr'
3034
+ | 'nzd'
3035
+ | 'pgk'
3036
+ | 'php'
3037
+ | 'pkr'
3038
+ | 'pln'
3039
+ | 'qar'
3040
+ | 'ron'
3041
+ | 'rsd'
3042
+ | 'rub'
3043
+ | 'rwf'
3044
+ | 'sar'
3045
+ | 'sbd'
3046
+ | 'scr'
3047
+ | 'sek'
3048
+ | 'sgd'
3049
+ | 'sle'
3050
+ | 'sll'
3051
+ | 'sos'
3052
+ | 'szl'
3053
+ | 'thb'
3054
+ | 'tjs'
3055
+ | 'top'
3056
+ | 'try'
3057
+ | 'ttd'
3058
+ | 'tzs'
3059
+ | 'uah'
3060
+ | 'uzs'
3061
+ | 'vnd'
3062
+ | 'vuv'
3063
+ | 'wst'
3064
+ | 'xaf'
3065
+ | 'xcd'
3066
+ | 'yer'
3067
+ | 'zar'
3068
+ | 'zmw'
3069
+ | 'clp'
3070
+ | 'djf'
3071
+ | 'gnf'
3072
+ | 'ugx'
3073
+ | 'pyg'
3074
+ | 'xof'
3075
+ | 'xpf';
3076
+ }
3077
+ }
3078
+ }
3079
+
3080
+ /**
3081
+ * Trial period override settings
3082
+ */
3083
+ export interface TrialOverrideConfiguration {
3084
+ /**
3085
+ * Whether the subscription should start with a trial period
3086
+ */
3087
+ isTrial: boolean;
3088
+
3089
+ /**
3090
+ * Behavior when trial ends: CONVERT_TO_PAID or CANCEL_SUBSCRIPTION
3091
+ */
3092
+ trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION';
3093
+
3094
+ /**
3095
+ * Custom trial end date
3096
+ */
3097
+ trialEndDate?: string;
3098
+ }
3099
+ }
3100
+ }
3101
+ }
3102
+
3103
+ export interface ContractRetrieveParams {
3104
+ /**
3105
+ * Account ID — optional when authenticating with a user JWT (Bearer token); falls
3106
+ * back to the user's first membership. Ignored for API-key auth.
3107
+ */
3108
+ 'X-ACCOUNT-ID'?: string;
3109
+
3110
+ /**
3111
+ * Environment ID — required when authenticating with a user JWT (Bearer token) on
3112
+ * environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
3113
+ * key).
3114
+ */
3115
+ 'X-ENVIRONMENT-ID'?: string;
3116
+ }
3117
+
3118
+ export interface ContractUpdateParams {
3119
+ /**
3120
+ * Body param: New activation end date
3121
+ */
3122
+ activationEndDate?: string;
3123
+
3124
+ /**
3125
+ * Body param: New activation start date
3126
+ */
3127
+ activationStartDate?: string;
3128
+
3129
+ /**
3130
+ * Body param: New contract name
3131
+ */
3132
+ name?: string | null;
3133
+
3134
+ /**
3135
+ * Body param: New purchase-order number
3136
+ */
3137
+ poNumber?: string | null;
3138
+
3139
+ /**
3140
+ * Body param: Enable billing on a provision-access-only contract by creating a
3141
+ * billing contract in the connected billing provider. Only takes effect when true
3142
+ * and the contract has no billing yet; omitting it leaves billing unchanged.
3143
+ * Billing is never removed by an update.
3144
+ */
3145
+ setupBilling?: boolean;
3146
+
3147
+ /**
3148
+ * Body param: When provided, replaces the set of subscriptions linked to the
3149
+ * contract (subscription ref IDs)
3150
+ */
3151
+ subscriptionIds?: Array<string>;
3152
+
3153
+ /**
3154
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
3155
+ * token); falls back to the user's first membership. Ignored for API-key auth.
3156
+ */
3157
+ 'X-ACCOUNT-ID'?: string;
3158
+
3159
+ /**
3160
+ * Header param: Environment ID — required when authenticating with a user JWT
3161
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
3162
+ * intrinsic to the key).
3163
+ */
3164
+ 'X-ENVIRONMENT-ID'?: string;
3165
+ }
3166
+
3167
+ export interface ContractListParams extends MyCursorIDPageParams {
3168
+ /**
3169
+ * Query param: Filter by the exact external ID of the customer the contract
3170
+ * belongs to
3171
+ */
3172
+ customerExternalId?: string;
3173
+
3174
+ /**
3175
+ * Query param: Filter by exact contract name
3176
+ */
3177
+ name?: string;
3178
+
3179
+ /**
3180
+ * Query param: Filter by contract state. Supports comma-separated values for
3181
+ * multiple states
3182
+ */
3183
+ state?: string;
3184
+
3185
+ /**
3186
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
3187
+ * token); falls back to the user's first membership. Ignored for API-key auth.
3188
+ */
3189
+ 'X-ACCOUNT-ID'?: string;
3190
+
3191
+ /**
3192
+ * Header param: Environment ID — required when authenticating with a user JWT
3193
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
3194
+ * intrinsic to the key).
3195
+ */
3196
+ 'X-ENVIRONMENT-ID'?: string;
3197
+ }
3198
+
3199
+ export interface ContractDeleteParams {
3200
+ /**
3201
+ * Account ID — optional when authenticating with a user JWT (Bearer token); falls
3202
+ * back to the user's first membership. Ignored for API-key auth.
3203
+ */
3204
+ 'X-ACCOUNT-ID'?: string;
3205
+
3206
+ /**
3207
+ * Environment ID — required when authenticating with a user JWT (Bearer token) on
3208
+ * environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the
3209
+ * key).
3210
+ */
3211
+ 'X-ENVIRONMENT-ID'?: string;
3212
+ }
3213
+
3214
+ export declare namespace Contracts {
3215
+ export {
3216
+ type ContractCreateResponse as ContractCreateResponse,
3217
+ type ContractRetrieveResponse as ContractRetrieveResponse,
3218
+ type ContractUpdateResponse as ContractUpdateResponse,
3219
+ type ContractListResponse as ContractListResponse,
3220
+ type ContractDeleteResponse as ContractDeleteResponse,
3221
+ type ContractListResponsesMyCursorIDPage as ContractListResponsesMyCursorIDPage,
3222
+ type ContractCreateParams as ContractCreateParams,
3223
+ type ContractRetrieveParams as ContractRetrieveParams,
3224
+ type ContractUpdateParams as ContractUpdateParams,
3225
+ type ContractListParams as ContractListParams,
3226
+ type ContractDeleteParams as ContractDeleteParams,
3227
+ };
3228
+ }