@metronome/sdk 2.0.0 → 2.2.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 +99 -0
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/shared.d.mts +73 -20
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +73 -20
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +20 -1
- package/resources/v1/alerts.d.mts.map +1 -1
- package/resources/v1/alerts.d.ts +20 -1
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +89 -12
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +89 -12
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +1 -1
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +1 -1
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/credit-grants.d.mts +10 -5
- package/resources/v1/credit-grants.d.mts.map +1 -1
- package/resources/v1/credit-grants.d.ts +10 -5
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.js +10 -5
- package/resources/v1/credit-grants.js.map +1 -1
- package/resources/v1/credit-grants.mjs +10 -5
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +39 -1
- package/resources/v1/customers/alerts.d.mts.map +1 -1
- package/resources/v1/customers/alerts.d.ts +39 -1
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.d.mts +25 -7
- package/resources/v1/customers/billing-config.d.mts.map +1 -1
- package/resources/v1/customers/billing-config.d.ts +25 -7
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.js +6 -3
- package/resources/v1/customers/billing-config.js.map +1 -1
- package/resources/v1/customers/billing-config.mjs +6 -3
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.mts +3 -2
- package/resources/v1/customers/commits.d.mts.map +1 -1
- package/resources/v1/customers/commits.d.ts +3 -2
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.js +2 -1
- package/resources/v1/customers/commits.js.map +1 -1
- package/resources/v1/customers/commits.mjs +2 -1
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.mts +89 -14
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +89 -14
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +13 -8
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +13 -8
- 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 +62 -5
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts +62 -5
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.js +2 -1
- package/resources/v1/customers/invoices.js.map +1 -1
- package/resources/v1/customers/invoices.mjs +2 -1
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/customers/plans.d.mts +9 -4
- package/resources/v1/customers/plans.d.mts.map +1 -1
- package/resources/v1/customers/plans.d.ts +9 -4
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.js +8 -4
- package/resources/v1/customers/plans.js.map +1 -1
- package/resources/v1/customers/plans.mjs +8 -4
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/index.d.mts +2 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -1
- 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 +1 -0
- package/resources/v1/payments.d.mts.map +1 -1
- package/resources/v1/payments.d.ts +1 -0
- package/resources/v1/payments.d.ts.map +1 -1
- package/resources/v1/plans.d.mts +8 -4
- package/resources/v1/plans.d.mts.map +1 -1
- package/resources/v1/plans.d.ts +8 -4
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.js +8 -4
- package/resources/v1/plans.js.map +1 -1
- package/resources/v1/plans.mjs +8 -4
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/settings/billing-providers.d.mts +103 -0
- package/resources/v1/settings/billing-providers.d.mts.map +1 -0
- package/resources/v1/settings/billing-providers.d.ts +103 -0
- package/resources/v1/settings/billing-providers.d.ts.map +1 -0
- package/resources/v1/settings/billing-providers.js +48 -0
- package/resources/v1/settings/billing-providers.js.map +1 -0
- package/resources/v1/settings/billing-providers.mjs +44 -0
- package/resources/v1/settings/billing-providers.mjs.map +1 -0
- package/resources/v1/settings/index.d.mts +3 -0
- package/resources/v1/settings/index.d.mts.map +1 -0
- package/resources/v1/settings/index.d.ts +3 -0
- package/resources/v1/settings/index.d.ts.map +1 -0
- package/resources/v1/settings/index.js +9 -0
- package/resources/v1/settings/index.js.map +1 -0
- package/resources/v1/settings/index.mjs +4 -0
- package/resources/v1/settings/index.mjs.map +1 -0
- package/resources/v1/settings/settings.d.mts +60 -0
- package/resources/v1/settings/settings.d.mts.map +1 -0
- package/resources/v1/settings/settings.d.ts +60 -0
- package/resources/v1/settings/settings.d.ts.map +1 -0
- package/resources/v1/settings/settings.js +40 -0
- package/resources/v1/settings/settings.js.map +1 -0
- package/resources/v1/settings/settings.mjs +35 -0
- package/resources/v1/settings/settings.mjs.map +1 -0
- package/resources/v1/settings.d.mts +2 -0
- package/resources/v1/settings.d.mts.map +1 -0
- package/resources/v1/settings.d.ts +2 -0
- package/resources/v1/settings.d.ts.map +1 -0
- package/resources/v1/settings.js +6 -0
- package/resources/v1/settings.js.map +1 -0
- package/resources/v1/settings.mjs +3 -0
- package/resources/v1/settings.mjs.map +1 -0
- package/resources/v1/usage.d.mts +3 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +3 -2
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/v1.d.mts +6 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +6 -2
- 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 +204 -3
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +204 -3
- package/resources/v2/contracts.d.ts.map +1 -1
- package/src/client.ts +1 -1
- package/src/resources/shared.ts +80 -20
- package/src/resources/v1/alerts.ts +24 -1
- package/src/resources/v1/contracts/contracts.ts +97 -12
- package/src/resources/v1/credit-grants.ts +10 -5
- package/src/resources/v1/customers/alerts.ts +45 -0
- package/src/resources/v1/customers/billing-config.ts +32 -7
- package/src/resources/v1/customers/commits.ts +3 -2
- package/src/resources/v1/customers/customers.ts +112 -18
- package/src/resources/v1/customers/index.ts +1 -0
- package/src/resources/v1/customers/invoices.ts +80 -3
- package/src/resources/v1/customers/plans.ts +10 -4
- package/src/resources/v1/index.ts +6 -0
- package/src/resources/v1/payments.ts +2 -0
- package/src/resources/v1/plans.ts +8 -4
- package/src/resources/v1/settings/billing-providers.ts +139 -0
- package/src/resources/v1/settings/index.ts +14 -0
- package/src/resources/v1/settings/settings.ts +94 -0
- package/src/resources/v1/settings.ts +3 -0
- package/src/resources/v1/usage.ts +3 -2
- package/src/resources/v1/v1.ts +16 -0
- package/src/resources/v2/contracts.ts +249 -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
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
export declare class BillingProviders extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Set up account-level configuration for a billing provider. Once configured,
|
|
7
|
+
* individual contracts across customers can be mapped to this configuration using
|
|
8
|
+
* the returned delivery_method_id.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const billingProvider =
|
|
13
|
+
* await client.v1.settings.billingProviders.create({
|
|
14
|
+
* billing_provider: 'aws_marketplace',
|
|
15
|
+
* configuration: {
|
|
16
|
+
* aws_external_id:
|
|
17
|
+
* '47b4f6b7-e297-42e8-b175-331d933b402c',
|
|
18
|
+
* aws_iam_role_arn: 'arn:aws:iam::test',
|
|
19
|
+
* },
|
|
20
|
+
* delivery_method: 'direct_to_billing_provider',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body: BillingProviderCreateParams, options?: RequestOptions): APIPromise<BillingProviderCreateResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Lists all configured billing providers and their delivery method configurations
|
|
27
|
+
* for your account. Returns provider details, delivery method IDs, and
|
|
28
|
+
* configuration settings needed for mapping individual customer contracts to
|
|
29
|
+
* billing integrations.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const billingProviders =
|
|
34
|
+
* await client.v1.settings.billingProviders.list({
|
|
35
|
+
* next_page: 'af26878a-de62-4a0d-9b77-3936f7c2b6d6',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
list(body?: BillingProviderListParams | null | undefined, options?: RequestOptions): APIPromise<BillingProviderListResponse>;
|
|
40
|
+
}
|
|
41
|
+
export interface BillingProviderCreateResponse {
|
|
42
|
+
data: BillingProviderCreateResponse.Data;
|
|
43
|
+
}
|
|
44
|
+
export declare namespace BillingProviderCreateResponse {
|
|
45
|
+
interface Data {
|
|
46
|
+
delivery_method_id: string;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export interface BillingProviderListResponse {
|
|
50
|
+
data: Array<BillingProviderListResponse.Data>;
|
|
51
|
+
next_page?: string | null;
|
|
52
|
+
}
|
|
53
|
+
export declare namespace BillingProviderListResponse {
|
|
54
|
+
interface Data {
|
|
55
|
+
/**
|
|
56
|
+
* The billing provider set for this configuration.
|
|
57
|
+
*/
|
|
58
|
+
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace' | 'metronome';
|
|
59
|
+
/**
|
|
60
|
+
* The method to use for delivering invoices to this customer.
|
|
61
|
+
*/
|
|
62
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
63
|
+
/**
|
|
64
|
+
* Configuration for the delivery method. The structure of this object is specific
|
|
65
|
+
* to the delivery method. Some configuration may be omitted for security reasons.
|
|
66
|
+
*/
|
|
67
|
+
delivery_method_configuration: {
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* ID of the delivery method to use for this customer.
|
|
72
|
+
*/
|
|
73
|
+
delivery_method_id: string;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export interface BillingProviderCreateParams {
|
|
77
|
+
/**
|
|
78
|
+
* The billing provider set for this configuration.
|
|
79
|
+
*/
|
|
80
|
+
billing_provider: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace';
|
|
81
|
+
/**
|
|
82
|
+
* Account-level configuration for the billing provider. The structure of this
|
|
83
|
+
* object is specific to the billing provider and delivery provider combination.
|
|
84
|
+
* See examples below.
|
|
85
|
+
*/
|
|
86
|
+
configuration: {
|
|
87
|
+
[key: string]: unknown;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* The method to use for delivering invoices for this configuration.
|
|
91
|
+
*/
|
|
92
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'aws_sns';
|
|
93
|
+
}
|
|
94
|
+
export interface BillingProviderListParams {
|
|
95
|
+
/**
|
|
96
|
+
* The cursor to the next page of results
|
|
97
|
+
*/
|
|
98
|
+
next_page?: string | null;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace BillingProviders {
|
|
101
|
+
export { type BillingProviderCreateResponse as BillingProviderCreateResponse, type BillingProviderListResponse as BillingProviderListResponse, type BillingProviderCreateParams as BillingProviderCreateParams, type BillingProviderListParams as BillingProviderListParams, };
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=billing-providers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-providers.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/settings/billing-providers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAI5C;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,IAAI,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,6BAA6B,CAAC,IAAI,CAAC;CAC1C;AAED,yBAAiB,6BAA6B,CAAC;IAC7C,UAAiB,IAAI;QACnB,kBAAkB,EAAE,MAAM,CAAC;KAC5B;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;IAE9C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,yBAAiB,2BAA2B,CAAC;IAC3C,UAAiB,IAAI;QACnB;;WAEG;QACH,gBAAgB,EACZ,iBAAiB,GACjB,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,SAAS,GACT,iBAAiB,GACjB,WAAW,CAAC;QAEhB;;WAEG;QACH,eAAe,EAAE,4BAA4B,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;QAEjF;;;WAGG;QACH,6BAA6B,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QAE1D;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;KAC5B;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,gBAAgB,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;IAE9E;;;;OAIG;IACH,aAAa,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE1C;;OAEG;IACH,eAAe,EAAE,4BAA4B,GAAG,SAAS,GAAG,SAAS,CAAC;CACvE;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
+
export declare class BillingProviders extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Set up account-level configuration for a billing provider. Once configured,
|
|
7
|
+
* individual contracts across customers can be mapped to this configuration using
|
|
8
|
+
* the returned delivery_method_id.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const billingProvider =
|
|
13
|
+
* await client.v1.settings.billingProviders.create({
|
|
14
|
+
* billing_provider: 'aws_marketplace',
|
|
15
|
+
* configuration: {
|
|
16
|
+
* aws_external_id:
|
|
17
|
+
* '47b4f6b7-e297-42e8-b175-331d933b402c',
|
|
18
|
+
* aws_iam_role_arn: 'arn:aws:iam::test',
|
|
19
|
+
* },
|
|
20
|
+
* delivery_method: 'direct_to_billing_provider',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body: BillingProviderCreateParams, options?: RequestOptions): APIPromise<BillingProviderCreateResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Lists all configured billing providers and their delivery method configurations
|
|
27
|
+
* for your account. Returns provider details, delivery method IDs, and
|
|
28
|
+
* configuration settings needed for mapping individual customer contracts to
|
|
29
|
+
* billing integrations.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const billingProviders =
|
|
34
|
+
* await client.v1.settings.billingProviders.list({
|
|
35
|
+
* next_page: 'af26878a-de62-4a0d-9b77-3936f7c2b6d6',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
list(body?: BillingProviderListParams | null | undefined, options?: RequestOptions): APIPromise<BillingProviderListResponse>;
|
|
40
|
+
}
|
|
41
|
+
export interface BillingProviderCreateResponse {
|
|
42
|
+
data: BillingProviderCreateResponse.Data;
|
|
43
|
+
}
|
|
44
|
+
export declare namespace BillingProviderCreateResponse {
|
|
45
|
+
interface Data {
|
|
46
|
+
delivery_method_id: string;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export interface BillingProviderListResponse {
|
|
50
|
+
data: Array<BillingProviderListResponse.Data>;
|
|
51
|
+
next_page?: string | null;
|
|
52
|
+
}
|
|
53
|
+
export declare namespace BillingProviderListResponse {
|
|
54
|
+
interface Data {
|
|
55
|
+
/**
|
|
56
|
+
* The billing provider set for this configuration.
|
|
57
|
+
*/
|
|
58
|
+
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace' | 'metronome';
|
|
59
|
+
/**
|
|
60
|
+
* The method to use for delivering invoices to this customer.
|
|
61
|
+
*/
|
|
62
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
63
|
+
/**
|
|
64
|
+
* Configuration for the delivery method. The structure of this object is specific
|
|
65
|
+
* to the delivery method. Some configuration may be omitted for security reasons.
|
|
66
|
+
*/
|
|
67
|
+
delivery_method_configuration: {
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* ID of the delivery method to use for this customer.
|
|
72
|
+
*/
|
|
73
|
+
delivery_method_id: string;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export interface BillingProviderCreateParams {
|
|
77
|
+
/**
|
|
78
|
+
* The billing provider set for this configuration.
|
|
79
|
+
*/
|
|
80
|
+
billing_provider: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace';
|
|
81
|
+
/**
|
|
82
|
+
* Account-level configuration for the billing provider. The structure of this
|
|
83
|
+
* object is specific to the billing provider and delivery provider combination.
|
|
84
|
+
* See examples below.
|
|
85
|
+
*/
|
|
86
|
+
configuration: {
|
|
87
|
+
[key: string]: unknown;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* The method to use for delivering invoices for this configuration.
|
|
91
|
+
*/
|
|
92
|
+
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'aws_sns';
|
|
93
|
+
}
|
|
94
|
+
export interface BillingProviderListParams {
|
|
95
|
+
/**
|
|
96
|
+
* The cursor to the next page of results
|
|
97
|
+
*/
|
|
98
|
+
next_page?: string | null;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace BillingProviders {
|
|
101
|
+
export { type BillingProviderCreateResponse as BillingProviderCreateResponse, type BillingProviderListResponse as BillingProviderListResponse, type BillingProviderCreateParams as BillingProviderCreateParams, type BillingProviderListParams as BillingProviderListParams, };
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=billing-providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-providers.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/settings/billing-providers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAI5C;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,IAAI,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;CAG3C;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,6BAA6B,CAAC,IAAI,CAAC;CAC1C;AAED,yBAAiB,6BAA6B,CAAC;IAC7C,UAAiB,IAAI;QACnB,kBAAkB,EAAE,MAAM,CAAC;KAC5B;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;IAE9C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,yBAAiB,2BAA2B,CAAC;IAC3C,UAAiB,IAAI;QACnB;;WAEG;QACH,gBAAgB,EACZ,iBAAiB,GACjB,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,SAAS,GACT,iBAAiB,GACjB,WAAW,CAAC;QAEhB;;WAEG;QACH,eAAe,EAAE,4BAA4B,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;QAEjF;;;WAGG;QACH,6BAA6B,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QAE1D;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;KAC5B;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,gBAAgB,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;IAE9E;;;;OAIG;IACH,aAAa,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE1C;;OAEG;IACH,eAAe,EAAE,4BAA4B,GAAG,SAAS,GAAG,SAAS,CAAC;CACvE;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.BillingProviders = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
class BillingProviders extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Set up account-level configuration for a billing provider. Once configured,
|
|
9
|
+
* individual contracts across customers can be mapped to this configuration using
|
|
10
|
+
* the returned delivery_method_id.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const billingProvider =
|
|
15
|
+
* await client.v1.settings.billingProviders.create({
|
|
16
|
+
* billing_provider: 'aws_marketplace',
|
|
17
|
+
* configuration: {
|
|
18
|
+
* aws_external_id:
|
|
19
|
+
* '47b4f6b7-e297-42e8-b175-331d933b402c',
|
|
20
|
+
* aws_iam_role_arn: 'arn:aws:iam::test',
|
|
21
|
+
* },
|
|
22
|
+
* delivery_method: 'direct_to_billing_provider',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
create(body, options) {
|
|
27
|
+
return this._client.post('/v1/setUpBillingProvider', { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Lists all configured billing providers and their delivery method configurations
|
|
31
|
+
* for your account. Returns provider details, delivery method IDs, and
|
|
32
|
+
* configuration settings needed for mapping individual customer contracts to
|
|
33
|
+
* billing integrations.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const billingProviders =
|
|
38
|
+
* await client.v1.settings.billingProviders.list({
|
|
39
|
+
* next_page: 'af26878a-de62-4a0d-9b77-3936f7c2b6d6',
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
list(body = {}, options) {
|
|
44
|
+
return this._client.post('/v1/listConfiguredBillingProviders', { body, ...options });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
exports.BillingProviders = BillingProviders;
|
|
48
|
+
//# sourceMappingURL=billing-providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-providers.js","sourceRoot":"","sources":["../../../src/resources/v1/settings/billing-providers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,MAAa,gBAAiB,SAAQ,sBAAW;IAC/C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,OAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF;AA/CD,4CA+CC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
export class BillingProviders extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Set up account-level configuration for a billing provider. Once configured,
|
|
6
|
+
* individual contracts across customers can be mapped to this configuration using
|
|
7
|
+
* the returned delivery_method_id.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const billingProvider =
|
|
12
|
+
* await client.v1.settings.billingProviders.create({
|
|
13
|
+
* billing_provider: 'aws_marketplace',
|
|
14
|
+
* configuration: {
|
|
15
|
+
* aws_external_id:
|
|
16
|
+
* '47b4f6b7-e297-42e8-b175-331d933b402c',
|
|
17
|
+
* aws_iam_role_arn: 'arn:aws:iam::test',
|
|
18
|
+
* },
|
|
19
|
+
* delivery_method: 'direct_to_billing_provider',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(body, options) {
|
|
24
|
+
return this._client.post('/v1/setUpBillingProvider', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Lists all configured billing providers and their delivery method configurations
|
|
28
|
+
* for your account. Returns provider details, delivery method IDs, and
|
|
29
|
+
* configuration settings needed for mapping individual customer contracts to
|
|
30
|
+
* billing integrations.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const billingProviders =
|
|
35
|
+
* await client.v1.settings.billingProviders.list({
|
|
36
|
+
* next_page: 'af26878a-de62-4a0d-9b77-3936f7c2b6d6',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
list(body = {}, options) {
|
|
41
|
+
return this._client.post('/v1/listConfiguredBillingProviders', { body, ...options });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=billing-providers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-providers.mjs","sourceRoot":"","sources":["../../../src/resources/v1/settings/billing-providers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,OAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { BillingProviders, type BillingProviderCreateResponse, type BillingProviderListResponse, type BillingProviderCreateParams, type BillingProviderListParams, } from "./billing-providers.mjs";
|
|
2
|
+
export { Settings, type SettingUpsertAvalaraCredentialsResponse, type SettingUpsertAvalaraCredentialsParams, } from "./settings.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/settings/index.ts"],"names":[],"mappings":"OAEO,EACL,gBAAgB,EAChB,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B;OACM,EACL,QAAQ,EACR,KAAK,uCAAuC,EAC5C,KAAK,qCAAqC,GAC3C"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { BillingProviders, type BillingProviderCreateResponse, type BillingProviderListResponse, type BillingProviderCreateParams, type BillingProviderListParams, } from "./billing-providers.js";
|
|
2
|
+
export { Settings, type SettingUpsertAvalaraCredentialsResponse, type SettingUpsertAvalaraCredentialsParams, } from "./settings.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/settings/index.ts"],"names":[],"mappings":"OAEO,EACL,gBAAgB,EAChB,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,GAC/B;OACM,EACL,QAAQ,EACR,KAAK,uCAAuC,EAC5C,KAAK,qCAAqC,GAC3C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Settings = exports.BillingProviders = void 0;
|
|
5
|
+
var billing_providers_1 = require("./billing-providers.js");
|
|
6
|
+
Object.defineProperty(exports, "BillingProviders", { enumerable: true, get: function () { return billing_providers_1.BillingProviders; } });
|
|
7
|
+
var settings_1 = require("./settings.js");
|
|
8
|
+
Object.defineProperty(exports, "Settings", { enumerable: true, get: function () { return settings_1.Settings; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1/settings/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAM6B;AAL3B,qHAAA,gBAAgB,OAAA;AAMlB,0CAIoB;AAHlB,oGAAA,QAAQ,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1/settings/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,gBAAgB,GAKjB;OACM,EACL,QAAQ,GAGT"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as BillingProvidersAPI from "./billing-providers.mjs";
|
|
3
|
+
import { BillingProviderCreateParams, BillingProviderCreateResponse, BillingProviderListParams, BillingProviderListResponse, BillingProviders } from "./billing-providers.mjs";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
6
|
+
export declare class Settings extends APIResource {
|
|
7
|
+
billingProviders: BillingProvidersAPI.BillingProviders;
|
|
8
|
+
/**
|
|
9
|
+
* Set the Avalara credentials for some specified `delivery_method_ids`, which can
|
|
10
|
+
* be found in the `/listConfiguredBillingProviders` response. This maps the
|
|
11
|
+
* Avalara credentials to the appropriate billing entity. These credentials are
|
|
12
|
+
* only used for PLG Invoicing today.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.v1.settings.upsertAvalaraCredentials({
|
|
18
|
+
* avalara_environment: 'PRODUCTION',
|
|
19
|
+
* avalara_password: 'my_password_123',
|
|
20
|
+
* avalara_username: 'test@metronome.com',
|
|
21
|
+
* delivery_method_ids: [
|
|
22
|
+
* '9a906ebb-fbc7-42e8-8e29-53bfd2db3aca',
|
|
23
|
+
* ],
|
|
24
|
+
* commit_transactions: true,
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
upsertAvalaraCredentials(body: SettingUpsertAvalaraCredentialsParams, options?: RequestOptions): APIPromise<SettingUpsertAvalaraCredentialsResponse>;
|
|
29
|
+
}
|
|
30
|
+
export interface SettingUpsertAvalaraCredentialsResponse {
|
|
31
|
+
}
|
|
32
|
+
export interface SettingUpsertAvalaraCredentialsParams {
|
|
33
|
+
/**
|
|
34
|
+
* The Avalara environment to use (SANDBOX or PRODUCTION).
|
|
35
|
+
*/
|
|
36
|
+
avalara_environment: 'PRODUCTION' | 'SANDBOX';
|
|
37
|
+
/**
|
|
38
|
+
* The password for the Avalara account.
|
|
39
|
+
*/
|
|
40
|
+
avalara_password: string;
|
|
41
|
+
/**
|
|
42
|
+
* The username for the Avalara account.
|
|
43
|
+
*/
|
|
44
|
+
avalara_username: string;
|
|
45
|
+
/**
|
|
46
|
+
* The delivery method IDs of the billing provider configurations to update, can be
|
|
47
|
+
* found in the response of the `/listConfiguredBillingProviders` endpoint.
|
|
48
|
+
*/
|
|
49
|
+
delivery_method_ids: Array<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Commit transactions if you want Metronome tax calculations used for reporting
|
|
52
|
+
* and tax filings.
|
|
53
|
+
*/
|
|
54
|
+
commit_transactions?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare namespace Settings {
|
|
57
|
+
export { type SettingUpsertAvalaraCredentialsResponse as SettingUpsertAvalaraCredentialsResponse, type SettingUpsertAvalaraCredentialsParams as SettingUpsertAvalaraCredentialsParams, };
|
|
58
|
+
export { BillingProviders as BillingProviders, type BillingProviderCreateResponse as BillingProviderCreateResponse, type BillingProviderListResponse as BillingProviderListResponse, type BillingProviderCreateParams as BillingProviderCreateParams, type BillingProviderListParams as BillingProviderListParams, };
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=settings.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/settings/settings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,2BAA2B,EAC3B,gBAAgB,EACjB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC,gBAAgB,EAAE,mBAAmB,CAAC,gBAAgB,CAEpD;IAEF;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wBAAwB,CACtB,IAAI,EAAE,qCAAqC,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uCAAuC,CAAC;CAGvD;AAED,MAAM,WAAW,uCAAuC;CAAG;AAE3D,MAAM,WAAW,qCAAqC;IACpD;;OAEG;IACH,mBAAmB,EAAE,YAAY,GAAG,SAAS,CAAC;IAE9C;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEnC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,qCAAqC,IAAI,qCAAqC,GACpF,CAAC;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as BillingProvidersAPI from "./billing-providers.js";
|
|
3
|
+
import { BillingProviderCreateParams, BillingProviderCreateResponse, BillingProviderListParams, BillingProviderListResponse, BillingProviders } from "./billing-providers.js";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
6
|
+
export declare class Settings extends APIResource {
|
|
7
|
+
billingProviders: BillingProvidersAPI.BillingProviders;
|
|
8
|
+
/**
|
|
9
|
+
* Set the Avalara credentials for some specified `delivery_method_ids`, which can
|
|
10
|
+
* be found in the `/listConfiguredBillingProviders` response. This maps the
|
|
11
|
+
* Avalara credentials to the appropriate billing entity. These credentials are
|
|
12
|
+
* only used for PLG Invoicing today.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const response =
|
|
17
|
+
* await client.v1.settings.upsertAvalaraCredentials({
|
|
18
|
+
* avalara_environment: 'PRODUCTION',
|
|
19
|
+
* avalara_password: 'my_password_123',
|
|
20
|
+
* avalara_username: 'test@metronome.com',
|
|
21
|
+
* delivery_method_ids: [
|
|
22
|
+
* '9a906ebb-fbc7-42e8-8e29-53bfd2db3aca',
|
|
23
|
+
* ],
|
|
24
|
+
* commit_transactions: true,
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
upsertAvalaraCredentials(body: SettingUpsertAvalaraCredentialsParams, options?: RequestOptions): APIPromise<SettingUpsertAvalaraCredentialsResponse>;
|
|
29
|
+
}
|
|
30
|
+
export interface SettingUpsertAvalaraCredentialsResponse {
|
|
31
|
+
}
|
|
32
|
+
export interface SettingUpsertAvalaraCredentialsParams {
|
|
33
|
+
/**
|
|
34
|
+
* The Avalara environment to use (SANDBOX or PRODUCTION).
|
|
35
|
+
*/
|
|
36
|
+
avalara_environment: 'PRODUCTION' | 'SANDBOX';
|
|
37
|
+
/**
|
|
38
|
+
* The password for the Avalara account.
|
|
39
|
+
*/
|
|
40
|
+
avalara_password: string;
|
|
41
|
+
/**
|
|
42
|
+
* The username for the Avalara account.
|
|
43
|
+
*/
|
|
44
|
+
avalara_username: string;
|
|
45
|
+
/**
|
|
46
|
+
* The delivery method IDs of the billing provider configurations to update, can be
|
|
47
|
+
* found in the response of the `/listConfiguredBillingProviders` endpoint.
|
|
48
|
+
*/
|
|
49
|
+
delivery_method_ids: Array<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Commit transactions if you want Metronome tax calculations used for reporting
|
|
52
|
+
* and tax filings.
|
|
53
|
+
*/
|
|
54
|
+
commit_transactions?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare namespace Settings {
|
|
57
|
+
export { type SettingUpsertAvalaraCredentialsResponse as SettingUpsertAvalaraCredentialsResponse, type SettingUpsertAvalaraCredentialsParams as SettingUpsertAvalaraCredentialsParams, };
|
|
58
|
+
export { BillingProviders as BillingProviders, type BillingProviderCreateResponse as BillingProviderCreateResponse, type BillingProviderListResponse as BillingProviderListResponse, type BillingProviderCreateParams as BillingProviderCreateParams, type BillingProviderListParams as BillingProviderListParams, };
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/settings/settings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,2BAA2B,EAC3B,gBAAgB,EACjB;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC,gBAAgB,EAAE,mBAAmB,CAAC,gBAAgB,CAEpD;IAEF;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wBAAwB,CACtB,IAAI,EAAE,qCAAqC,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uCAAuC,CAAC;CAGvD;AAED,MAAM,WAAW,uCAAuC;CAAG;AAE3D,MAAM,WAAW,qCAAqC;IACpD;;OAEG;IACH,mBAAmB,EAAE,YAAY,GAAG,SAAS,CAAC;IAE9C;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEnC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAID,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,qCAAqC,IAAI,qCAAqC,GACpF,CAAC;IAEF,OAAO,EACL,gBAAgB,IAAI,gBAAgB,EACpC,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Settings = void 0;
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
|
+
const BillingProvidersAPI = tslib_1.__importStar(require("./billing-providers.js"));
|
|
8
|
+
const billing_providers_1 = require("./billing-providers.js");
|
|
9
|
+
class Settings extends resource_1.APIResource {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.billingProviders = new BillingProvidersAPI.BillingProviders(this._client);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Set the Avalara credentials for some specified `delivery_method_ids`, which can
|
|
16
|
+
* be found in the `/listConfiguredBillingProviders` response. This maps the
|
|
17
|
+
* Avalara credentials to the appropriate billing entity. These credentials are
|
|
18
|
+
* only used for PLG Invoicing today.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const response =
|
|
23
|
+
* await client.v1.settings.upsertAvalaraCredentials({
|
|
24
|
+
* avalara_environment: 'PRODUCTION',
|
|
25
|
+
* avalara_password: 'my_password_123',
|
|
26
|
+
* avalara_username: 'test@metronome.com',
|
|
27
|
+
* delivery_method_ids: [
|
|
28
|
+
* '9a906ebb-fbc7-42e8-8e29-53bfd2db3aca',
|
|
29
|
+
* ],
|
|
30
|
+
* commit_transactions: true,
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
upsertAvalaraCredentials(body, options) {
|
|
35
|
+
return this._client.post('/v1/upsertAvalaraCredentials', { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.Settings = Settings;
|
|
39
|
+
Settings.BillingProviders = billing_providers_1.BillingProviders;
|
|
40
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/resources/v1/settings/settings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,oFAA2D;AAC3D,8DAM6B;AAI7B,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IA4BJ,CAAC;IA1BC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wBAAwB,CACtB,IAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AA/BD,4BA+BC;AAiCD,QAAQ,CAAC,gBAAgB,GAAG,oCAAgB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import * as BillingProvidersAPI from "./billing-providers.mjs";
|
|
4
|
+
import { BillingProviders, } from "./billing-providers.mjs";
|
|
5
|
+
export class Settings extends APIResource {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.billingProviders = new BillingProvidersAPI.BillingProviders(this._client);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Set the Avalara credentials for some specified `delivery_method_ids`, which can
|
|
12
|
+
* be found in the `/listConfiguredBillingProviders` response. This maps the
|
|
13
|
+
* Avalara credentials to the appropriate billing entity. These credentials are
|
|
14
|
+
* only used for PLG Invoicing today.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const response =
|
|
19
|
+
* await client.v1.settings.upsertAvalaraCredentials({
|
|
20
|
+
* avalara_environment: 'PRODUCTION',
|
|
21
|
+
* avalara_password: 'my_password_123',
|
|
22
|
+
* avalara_username: 'test@metronome.com',
|
|
23
|
+
* delivery_method_ids: [
|
|
24
|
+
* '9a906ebb-fbc7-42e8-8e29-53bfd2db3aca',
|
|
25
|
+
* ],
|
|
26
|
+
* commit_transactions: true,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
upsertAvalaraCredentials(body, options) {
|
|
31
|
+
return this._client.post('/v1/upsertAvalaraCredentials', { body, ...options });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
Settings.BillingProviders = BillingProviders;
|
|
35
|
+
//# sourceMappingURL=settings.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.mjs","sourceRoot":"","sources":["../../../src/resources/v1/settings/settings.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,mBAAmB;OACxB,EAKL,gBAAgB,GACjB;AAID,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,qBAAgB,GAAyC,IAAI,mBAAmB,CAAC,gBAAgB,CAC/F,IAAI,CAAC,OAAO,CACb,CAAC;IA4BJ,CAAC;IA1BC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wBAAwB,CACtB,IAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAiCD,QAAQ,CAAC,gBAAgB,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.mts","sourceRoot":"","sources":["../../src/resources/v1/settings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/resources/v1/settings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./settings/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/resources/v1/settings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.mjs","sourceRoot":"","sources":["../../src/resources/v1/settings.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
package/resources/v1/usage.d.mts
CHANGED
|
@@ -314,9 +314,10 @@ export declare namespace UsageSearchResponse {
|
|
|
314
314
|
*/
|
|
315
315
|
aggregation_key?: string;
|
|
316
316
|
/**
|
|
317
|
-
* Specifies the type of aggregation performed on matching events.
|
|
317
|
+
* Specifies the type of aggregation performed on matching events. Includes
|
|
318
|
+
* "custom_sql" for events search endpoint responses.
|
|
318
319
|
*/
|
|
319
|
-
aggregation_type?: 'COUNT' | 'LATEST' | 'MAX' | 'SUM' | 'UNIQUE';
|
|
320
|
+
aggregation_type?: 'COUNT' | 'LATEST' | 'MAX' | 'SUM' | 'UNIQUE' | 'custom_sql';
|
|
320
321
|
/**
|
|
321
322
|
* RFC 3339 timestamp indicating when the billable metric was archived. If not
|
|
322
323
|
* provided, the billable metric is not archived.
|