@metronome/sdk 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/bin/cli +5 -12
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/package.json +1 -1
- package/resources/shared.d.mts +129 -5
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +129 -5
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +68 -64
- package/resources/v1/alerts.d.mts.map +1 -1
- package/resources/v1/alerts.d.ts +68 -64
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.js +40 -39
- package/resources/v1/alerts.js.map +1 -1
- package/resources/v1/alerts.mjs +40 -39
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +28 -6
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +28 -6
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +4 -3
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +4 -3
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +98 -77
- package/resources/v1/customers/alerts.d.mts.map +1 -1
- package/resources/v1/customers/alerts.d.ts +98 -77
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +65 -46
- package/resources/v1/customers/alerts.js.map +1 -1
- package/resources/v1/customers/alerts.mjs +65 -46
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +17 -16
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +17 -16
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +7 -4
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +7 -4
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +1 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.mts +117 -2
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts +117 -2
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.js +49 -0
- package/resources/v1/customers/invoices.js.map +1 -1
- package/resources/v1/customers/invoices.mjs +49 -0
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -0
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -0
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/payments.d.mts +116 -0
- package/resources/v1/payments.d.mts.map +1 -0
- package/resources/v1/payments.d.ts +116 -0
- package/resources/v1/payments.d.ts.map +1 -0
- package/resources/v1/payments.js +71 -0
- package/resources/v1/payments.js.map +1 -0
- package/resources/v1/payments.mjs +67 -0
- package/resources/v1/payments.mjs.map +1 -0
- package/resources/v1/usage.d.mts +4 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +4 -2
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +4 -2
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +4 -2
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.mts +4 -0
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +4 -0
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +4 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +4 -0
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.mts +109 -3
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +109 -3
- package/resources/v2/contracts.d.ts.map +1 -1
- package/src/internal/to-file.ts +1 -1
- package/src/resources/shared.ts +160 -5
- package/src/resources/v1/alerts.ts +68 -64
- package/src/resources/v1/contracts/contracts.ts +32 -6
- package/src/resources/v1/customers/alerts.ts +98 -77
- package/src/resources/v1/customers/customers.ts +18 -15
- package/src/resources/v1/customers/index.ts +1 -0
- package/src/resources/v1/customers/invoices.ts +142 -1
- package/src/resources/v1/index.ts +11 -0
- package/src/resources/v1/payments.ts +170 -0
- package/src/resources/v1/usage.ts +4 -2
- package/src/resources/v1/v1.ts +26 -0
- package/src/resources/v2/contracts.ts +144 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -373,7 +373,7 @@ export namespace ContractGetEditHistoryResponse {
|
|
|
373
373
|
/**
|
|
374
374
|
* The schedule that the customer will be invoiced for this commit.
|
|
375
375
|
*/
|
|
376
|
-
invoice_schedule?:
|
|
376
|
+
invoice_schedule?: AddCommit.InvoiceSchedule;
|
|
377
377
|
|
|
378
378
|
name?: string;
|
|
379
379
|
|
|
@@ -414,6 +414,36 @@ export namespace ContractGetEditHistoryResponse {
|
|
|
414
414
|
|
|
415
415
|
name: string;
|
|
416
416
|
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* The schedule that the customer will be invoiced for this commit.
|
|
420
|
+
*/
|
|
421
|
+
export interface InvoiceSchedule {
|
|
422
|
+
credit_type?: Shared.CreditTypeData;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* If true, this schedule will not generate an invoice.
|
|
426
|
+
*/
|
|
427
|
+
do_not_invoice?: boolean;
|
|
428
|
+
|
|
429
|
+
schedule_items?: Array<InvoiceSchedule.ScheduleItem>;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export namespace InvoiceSchedule {
|
|
433
|
+
export interface ScheduleItem {
|
|
434
|
+
id: string;
|
|
435
|
+
|
|
436
|
+
timestamp: string;
|
|
437
|
+
|
|
438
|
+
amount?: number;
|
|
439
|
+
|
|
440
|
+
invoice_id?: string | null;
|
|
441
|
+
|
|
442
|
+
quantity?: number;
|
|
443
|
+
|
|
444
|
+
unit_price?: number;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
417
447
|
}
|
|
418
448
|
|
|
419
449
|
export interface AddCredit {
|
|
@@ -495,7 +525,7 @@ export namespace ContractGetEditHistoryResponse {
|
|
|
495
525
|
|
|
496
526
|
override_tiers?: Array<Shared.OverrideTier>;
|
|
497
527
|
|
|
498
|
-
overwrite_rate?:
|
|
528
|
+
overwrite_rate?: AddOverride.OverwriteRate;
|
|
499
529
|
|
|
500
530
|
priority?: number;
|
|
501
531
|
|
|
@@ -525,6 +555,40 @@ export namespace ContractGetEditHistoryResponse {
|
|
|
525
555
|
recurring_credit_ids?: Array<string>;
|
|
526
556
|
}
|
|
527
557
|
|
|
558
|
+
export interface OverwriteRate {
|
|
559
|
+
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
560
|
+
|
|
561
|
+
credit_type?: Shared.CreditTypeData;
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
565
|
+
* processors.
|
|
566
|
+
*/
|
|
567
|
+
custom_rate?: { [key: string]: unknown };
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
571
|
+
* set to true.
|
|
572
|
+
*/
|
|
573
|
+
is_prorated?: boolean;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
577
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
578
|
+
*/
|
|
579
|
+
price?: number;
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
583
|
+
*/
|
|
584
|
+
quantity?: number;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Only set for TIERED rate_type.
|
|
588
|
+
*/
|
|
589
|
+
tiers?: Array<Shared.Tier>;
|
|
590
|
+
}
|
|
591
|
+
|
|
528
592
|
export interface Product {
|
|
529
593
|
id: string;
|
|
530
594
|
|
|
@@ -1301,6 +1365,8 @@ export namespace ContractGetEditHistoryResponse {
|
|
|
1301
1365
|
ending_before?: string;
|
|
1302
1366
|
|
|
1303
1367
|
invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
|
|
1368
|
+
|
|
1369
|
+
rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
|
|
1304
1370
|
}
|
|
1305
1371
|
|
|
1306
1372
|
export namespace UpdateRecurringCommit {
|
|
@@ -1323,6 +1389,8 @@ export namespace ContractGetEditHistoryResponse {
|
|
|
1323
1389
|
access_amount?: UpdateRecurringCredit.AccessAmount;
|
|
1324
1390
|
|
|
1325
1391
|
ending_before?: string;
|
|
1392
|
+
|
|
1393
|
+
rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
|
|
1326
1394
|
}
|
|
1327
1395
|
|
|
1328
1396
|
export namespace UpdateRecurringCredit {
|
|
@@ -1494,6 +1562,13 @@ export interface ContractEditParams {
|
|
|
1494
1562
|
*/
|
|
1495
1563
|
customer_id: string;
|
|
1496
1564
|
|
|
1565
|
+
/**
|
|
1566
|
+
* Update the billing provider configuration on the contract. Currently only
|
|
1567
|
+
* supports adding a billing provider configuration to a contract that does not
|
|
1568
|
+
* already have one.
|
|
1569
|
+
*/
|
|
1570
|
+
add_billing_provider_configuration_update?: ContractEditParams.AddBillingProviderConfigurationUpdate;
|
|
1571
|
+
|
|
1497
1572
|
add_commits?: Array<ContractEditParams.AddCommit>;
|
|
1498
1573
|
|
|
1499
1574
|
add_credits?: Array<ContractEditParams.AddCredit>;
|
|
@@ -1601,6 +1676,50 @@ export interface ContractEditParams {
|
|
|
1601
1676
|
}
|
|
1602
1677
|
|
|
1603
1678
|
export namespace ContractEditParams {
|
|
1679
|
+
/**
|
|
1680
|
+
* Update the billing provider configuration on the contract. Currently only
|
|
1681
|
+
* supports adding a billing provider configuration to a contract that does not
|
|
1682
|
+
* already have one.
|
|
1683
|
+
*/
|
|
1684
|
+
export interface AddBillingProviderConfigurationUpdate {
|
|
1685
|
+
billing_provider_configuration: AddBillingProviderConfigurationUpdate.BillingProviderConfiguration;
|
|
1686
|
+
|
|
1687
|
+
/**
|
|
1688
|
+
* Indicates when the billing provider will be active on the contract. Any charges
|
|
1689
|
+
* accrued during the schedule will be billed to the indicated billing provider.
|
|
1690
|
+
*/
|
|
1691
|
+
schedule: AddBillingProviderConfigurationUpdate.Schedule;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
export namespace AddBillingProviderConfigurationUpdate {
|
|
1695
|
+
export interface BillingProviderConfiguration {
|
|
1696
|
+
billing_provider?:
|
|
1697
|
+
| 'aws_marketplace'
|
|
1698
|
+
| 'stripe'
|
|
1699
|
+
| 'netsuite'
|
|
1700
|
+
| 'custom'
|
|
1701
|
+
| 'azure_marketplace'
|
|
1702
|
+
| 'quickbooks_online'
|
|
1703
|
+
| 'workday'
|
|
1704
|
+
| 'gcp_marketplace';
|
|
1705
|
+
|
|
1706
|
+
billing_provider_configuration_id?: string;
|
|
1707
|
+
|
|
1708
|
+
delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* Indicates when the billing provider will be active on the contract. Any charges
|
|
1713
|
+
* accrued during the schedule will be billed to the indicated billing provider.
|
|
1714
|
+
*/
|
|
1715
|
+
export interface Schedule {
|
|
1716
|
+
/**
|
|
1717
|
+
* When the billing provider update will take effect.
|
|
1718
|
+
*/
|
|
1719
|
+
effective_at: 'START_OF_CURRENT_PERIOD';
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1604
1723
|
export interface AddCommit {
|
|
1605
1724
|
product_id: string;
|
|
1606
1725
|
|
|
@@ -1858,7 +1977,7 @@ export namespace ContractEditParams {
|
|
|
1858
1977
|
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1859
1978
|
* will default to NONE.
|
|
1860
1979
|
*/
|
|
1861
|
-
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1980
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'AVALARA' | 'PRECALCULATED';
|
|
1862
1981
|
}
|
|
1863
1982
|
|
|
1864
1983
|
export namespace PaymentGateConfig {
|
|
@@ -3187,6 +3306,12 @@ export namespace ContractEditParams {
|
|
|
3187
3306
|
ending_before?: string | null;
|
|
3188
3307
|
|
|
3189
3308
|
invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
|
|
3309
|
+
|
|
3310
|
+
/**
|
|
3311
|
+
* If provided, updates the recurring commit to use the specified rate type when
|
|
3312
|
+
* generating future commits.
|
|
3313
|
+
*/
|
|
3314
|
+
rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
|
|
3190
3315
|
}
|
|
3191
3316
|
|
|
3192
3317
|
export namespace UpdateRecurringCommit {
|
|
@@ -3209,6 +3334,12 @@ export namespace ContractEditParams {
|
|
|
3209
3334
|
access_amount?: UpdateRecurringCredit.AccessAmount;
|
|
3210
3335
|
|
|
3211
3336
|
ending_before?: string | null;
|
|
3337
|
+
|
|
3338
|
+
/**
|
|
3339
|
+
* If provided, updates the recurring credit to use the specified rate type when
|
|
3340
|
+
* generating future credits.
|
|
3341
|
+
*/
|
|
3342
|
+
rate_type?: 'LIST_RATE' | 'COMMIT_RATE';
|
|
3212
3343
|
}
|
|
3213
3344
|
|
|
3214
3345
|
export namespace UpdateRecurringCredit {
|
|
@@ -3344,6 +3475,11 @@ export interface ContractEditCommitParams {
|
|
|
3344
3475
|
*/
|
|
3345
3476
|
applicable_product_tags?: Array<string> | null;
|
|
3346
3477
|
|
|
3478
|
+
/**
|
|
3479
|
+
* Optional configuration for commit hierarchy access control
|
|
3480
|
+
*/
|
|
3481
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
3482
|
+
|
|
3347
3483
|
/**
|
|
3348
3484
|
* ID of contract to use for invoicing
|
|
3349
3485
|
*/
|
|
@@ -3472,6 +3608,11 @@ export interface ContractEditCreditParams {
|
|
|
3472
3608
|
*/
|
|
3473
3609
|
applicable_product_tags?: Array<string> | null;
|
|
3474
3610
|
|
|
3611
|
+
/**
|
|
3612
|
+
* Optional configuration for credit hierarchy access control
|
|
3613
|
+
*/
|
|
3614
|
+
hierarchy_configuration?: Shared.CommitHierarchyConfiguration;
|
|
3615
|
+
|
|
3475
3616
|
/**
|
|
3476
3617
|
* If multiple commits are applicable, the one with the lower priority will apply
|
|
3477
3618
|
* first.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '
|
|
1
|
+
export const VERSION = '2.0.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "
|
|
1
|
+
export declare const VERSION = "2.0.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "
|
|
1
|
+
export declare const VERSION = "2.0.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '
|
|
1
|
+
export const VERSION = '2.0.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|