@metronome/sdk 0.1.0-beta.9 → 0.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 +194 -0
- package/README.md +30 -46
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +23 -14
- package/core.js.map +1 -1
- package/core.mjs +24 -15
- package/core.mjs.map +1 -1
- package/index.d.mts +3 -2
- package/index.d.ts +3 -2
- package/index.d.ts.map +1 -1
- package/index.js +6 -3
- package/index.js.map +1 -1
- package/index.mjs +6 -3
- package/index.mjs.map +1 -1
- package/package.json +1 -5
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -0
- package/pagination.js.map +1 -1
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/shared.d.ts +521 -37
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.ts +30 -10
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.js +19 -0
- package/resources/v1/alerts.js.map +1 -1
- package/resources/v1/alerts.mjs +19 -0
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/audit-logs.d.ts +8 -0
- package/resources/v1/audit-logs.d.ts.map +1 -1
- package/resources/v1/audit-logs.js.map +1 -1
- package/resources/v1/audit-logs.mjs.map +1 -1
- package/resources/v1/billable-metrics.d.ts +58 -3
- package/resources/v1/billable-metrics.d.ts.map +1 -1
- package/resources/v1/billable-metrics.js +41 -0
- package/resources/v1/billable-metrics.js.map +1 -1
- package/resources/v1/billable-metrics.mjs +41 -0
- package/resources/v1/billable-metrics.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +1556 -122
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +180 -3
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +180 -3
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/index.d.ts +2 -2
- package/resources/v1/contracts/index.d.ts.map +1 -1
- package/resources/v1/contracts/index.js.map +1 -1
- package/resources/v1/contracts/index.mjs.map +1 -1
- package/resources/v1/contracts/named-schedules.d.ts +21 -0
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/named-schedules.js +21 -0
- package/resources/v1/contracts/named-schedules.js.map +1 -1
- package/resources/v1/contracts/named-schedules.mjs +21 -0
- package/resources/v1/contracts/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/products.d.ts +51 -3
- package/resources/v1/contracts/products.d.ts.map +1 -1
- package/resources/v1/contracts/products.js +33 -0
- package/resources/v1/contracts/products.js.map +1 -1
- package/resources/v1/contracts/products.mjs +33 -0
- package/resources/v1/contracts/products.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.js.map +1 -1
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts +25 -0
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.js +25 -0
- package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.mjs +25 -0
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.ts +30 -0
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.js +30 -0
- package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.mjs +30 -0
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts +107 -10
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.js +71 -0
- package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.mjs +71 -0
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.ts +102 -14
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.js +68 -0
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs +68 -0
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/credit-grants.d.ts +77 -2
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.js +39 -2
- package/resources/v1/credit-grants.js.map +1 -1
- package/resources/v1/credit-grants.mjs +39 -2
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/custom-fields.d.ts +51 -7
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/custom-fields.js +35 -0
- package/resources/v1/custom-fields.js.map +1 -1
- package/resources/v1/custom-fields.mjs +35 -0
- package/resources/v1/custom-fields.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.ts +37 -0
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +23 -0
- package/resources/v1/customers/alerts.js.map +1 -1
- package/resources/v1/customers/alerts.mjs +23 -0
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/billing-config.d.ts +31 -0
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.js +27 -0
- package/resources/v1/customers/billing-config.js.map +1 -1
- package/resources/v1/customers/billing-config.mjs +27 -0
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.ts +94 -7
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.js +56 -1
- package/resources/v1/customers/commits.js.map +1 -1
- package/resources/v1/customers/commits.mjs +56 -1
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/credits.d.ts +73 -3
- package/resources/v1/customers/credits.d.ts.map +1 -1
- package/resources/v1/customers/credits.js +41 -1
- package/resources/v1/customers/credits.js.map +1 -1
- package/resources/v1/customers/credits.mjs +41 -1
- package/resources/v1/customers/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.ts +186 -9
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +106 -1
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +106 -1
- package/resources/v1/customers/customers.mjs.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.ts +144 -52
- 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/customers/named-schedules.d.ts +21 -0
- package/resources/v1/customers/named-schedules.d.ts.map +1 -1
- package/resources/v1/customers/named-schedules.js +21 -0
- package/resources/v1/customers/named-schedules.js.map +1 -1
- package/resources/v1/customers/named-schedules.mjs +21 -0
- package/resources/v1/customers/named-schedules.mjs.map +1 -1
- package/resources/v1/customers/plans.d.ts +46 -1
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.js +43 -0
- package/resources/v1/customers/plans.js.map +1 -1
- package/resources/v1/customers/plans.mjs +43 -0
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/dashboards.d.ts +31 -3
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.js +26 -0
- package/resources/v1/dashboards.js.map +1 -1
- package/resources/v1/dashboards.mjs +26 -0
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.ts +3 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/invoices.d.ts +14 -0
- package/resources/v1/invoices.d.ts.map +1 -1
- package/resources/v1/invoices.js +14 -0
- package/resources/v1/invoices.js.map +1 -1
- package/resources/v1/invoices.mjs +14 -0
- package/resources/v1/invoices.mjs.map +1 -1
- package/resources/v1/plans.d.ts +47 -4
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.js +27 -0
- package/resources/v1/plans.js.map +1 -1
- package/resources/v1/plans.mjs +27 -0
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/pricing-units.d.ts +8 -0
- package/resources/v1/pricing-units.d.ts.map +1 -1
- package/resources/v1/pricing-units.js.map +1 -1
- package/resources/v1/pricing-units.mjs.map +1 -1
- package/resources/v1/services.d.ts +5 -0
- package/resources/v1/services.d.ts.map +1 -1
- package/resources/v1/services.js +5 -0
- package/resources/v1/services.js.map +1 -1
- package/resources/v1/services.mjs +5 -0
- package/resources/v1/services.mjs.map +1 -1
- package/resources/v1/usage.d.ts +161 -3
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +46 -0
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +46 -0
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.ts +6 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.ts +3241 -205
- package/resources/v2/contracts.d.ts.map +1 -1
- package/resources/v2/contracts.js +90 -2
- package/resources/v2/contracts.js.map +1 -1
- package/resources/v2/contracts.mjs +90 -2
- package/resources/v2/contracts.mjs.map +1 -1
- package/resources/webhooks.js +5 -5
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +5 -5
- package/resources/webhooks.mjs.map +1 -1
- package/src/_shims/auto/runtime-bun.ts +1 -1
- package/src/_shims/auto/runtime-node.ts +1 -1
- package/src/_shims/auto/runtime.ts +1 -1
- package/src/_shims/auto/types-node.ts +1 -1
- package/src/_shims/bun-runtime.ts +2 -2
- package/src/_shims/index.d.ts +5 -3
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +6 -2
- package/src/_shims/node-runtime.ts +3 -3
- package/src/_shims/registry.ts +1 -1
- package/src/_shims/web-runtime.ts +3 -3
- package/src/core.ts +46 -18
- package/src/error.ts +1 -1
- package/src/index.ts +22 -16
- package/src/internal/qs/formats.ts +1 -1
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +3 -3
- package/src/internal/qs/utils.ts +2 -2
- package/src/pagination.ts +5 -1
- package/src/resource.ts +2 -2
- package/src/resources/index.ts +4 -4
- package/src/resources/shared.ts +605 -40
- package/src/resources/v1/alerts.ts +33 -13
- package/src/resources/v1/audit-logs.ts +12 -4
- package/src/resources/v1/billable-metrics.ts +57 -8
- package/src/resources/v1/contracts/contracts.ts +1723 -135
- package/src/resources/v1/contracts/index.ts +8 -4
- package/src/resources/v1/contracts/named-schedules.ts +23 -2
- package/src/resources/v1/contracts/products.ts +53 -9
- package/src/resources/v1/contracts/rate-cards/index.ts +6 -4
- package/src/resources/v1/contracts/rate-cards/named-schedules.ts +27 -2
- package/src/resources/v1/contracts/rate-cards/product-orders.ts +33 -3
- package/src/resources/v1/contracts/rate-cards/rate-cards.ts +113 -20
- package/src/resources/v1/contracts/rate-cards/rates.ts +86 -18
- package/src/resources/v1/contracts/rate-cards.ts +1 -1
- package/src/resources/v1/contracts.ts +1 -1
- package/src/resources/v1/credit-grants.ts +82 -10
- package/src/resources/v1/custom-fields.ts +57 -9
- package/src/resources/v1/customers/alerts.ts +44 -3
- package/src/resources/v1/customers/billing-config.ts +34 -2
- package/src/resources/v1/customers/commits.ts +97 -10
- package/src/resources/v1/customers/credits.ts +76 -6
- package/src/resources/v1/customers/customers.ts +208 -27
- package/src/resources/v1/customers/index.ts +10 -8
- package/src/resources/v1/customers/invoices.ts +123 -57
- package/src/resources/v1/customers/named-schedules.ts +23 -2
- package/src/resources/v1/customers/plans.ts +48 -5
- package/src/resources/v1/customers.ts +1 -1
- package/src/resources/v1/dashboards.ts +33 -5
- package/src/resources/v1/index.ts +20 -14
- package/src/resources/v1/invoices.ts +16 -2
- package/src/resources/v1/plans.ts +45 -10
- package/src/resources/v1/pricing-units.ts +12 -4
- package/src/resources/v1/services.ts +7 -2
- package/src/resources/v1/usage.ts +187 -6
- package/src/resources/v1/v1.ts +39 -27
- package/src/resources/v1.ts +1 -1
- package/src/resources/v2/contracts.ts +3838 -261
- package/src/resources/v2/index.ts +2 -2
- package/src/resources/v2/v2.ts +3 -3
- package/src/resources/v2.ts +1 -1
- package/src/resources/webhooks.ts +7 -7
- package/src/resources.ts +1 -1
- package/src/shims/node.ts +3 -3
- package/src/shims/web.ts +3 -3
- package/src/uploads.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -4,6 +4,16 @@ export class NamedSchedules extends APIResource {
|
|
|
4
4
|
/**
|
|
5
5
|
* Get a named schedule for the given customer. This endpoint's availability is
|
|
6
6
|
* dependent on your client's configuration.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const namedSchedule =
|
|
11
|
+
* await client.v1.customers.namedSchedules.retrieve({
|
|
12
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
13
|
+
* schedule_name: 'my-schedule',
|
|
14
|
+
* covering_date: '2022-02-15T00:00:00Z',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
7
17
|
*/
|
|
8
18
|
retrieve(body, options) {
|
|
9
19
|
return this._client.post('/v1/customers/getNamedSchedule', { body, ...options });
|
|
@@ -11,6 +21,17 @@ export class NamedSchedules extends APIResource {
|
|
|
11
21
|
/**
|
|
12
22
|
* Update a named schedule for the given customer. This endpoint's availability is
|
|
13
23
|
* dependent on your client's configuration.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* await client.v1.customers.namedSchedules.update({
|
|
28
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
29
|
+
* schedule_name: 'my-schedule',
|
|
30
|
+
* starting_at: '2022-02-01T00:00:00Z',
|
|
31
|
+
* value: { my_key: 'my_value' },
|
|
32
|
+
* ending_before: '2022-02-15T00:00:00Z',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
14
35
|
*/
|
|
15
36
|
update(body, options) {
|
|
16
37
|
return this._client.post('/v1/customers/updateNamedSchedule', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-schedules.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/named-schedules.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C
|
|
1
|
+
{"version":3,"file":"named-schedules.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/named-schedules.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAA+B,EAAE,OAA6B;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,EAAE;YAC5D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -5,22 +5,65 @@ import { CursorPage, type CursorPageParams } from "../../../pagination.js";
|
|
|
5
5
|
export declare class Plans extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* List the given customer's plans in reverse-chronological order.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // Automatically fetches more pages as needed.
|
|
12
|
+
* for await (const planListResponse of client.v1.customers.plans.list(
|
|
13
|
+
* { customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
|
|
14
|
+
* )) {
|
|
15
|
+
* // ...
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
8
18
|
*/
|
|
9
19
|
list(params: PlanListParams, options?: Core.RequestOptions): Core.PagePromise<PlanListResponsesCursorPage, PlanListResponse>;
|
|
10
20
|
/**
|
|
11
21
|
* Associate an existing customer with a plan for a specified date range. See the
|
|
12
22
|
* [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments)
|
|
13
23
|
* for details on the price adjustments.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const response = await client.v1.customers.plans.add({
|
|
28
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
29
|
+
* plan_id: 'd2c06dae-9549-4d7d-bc04-b78dd3d241b8',
|
|
30
|
+
* starting_on: '2021-02-01T00:00:00Z',
|
|
31
|
+
* ending_before: '2022-02-01T00:00:00Z',
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
14
34
|
*/
|
|
15
35
|
add(params: PlanAddParams, options?: Core.RequestOptions): Core.APIPromise<PlanAddResponse>;
|
|
16
36
|
/**
|
|
17
37
|
* Change the end date of a customer's plan.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const response = await client.v1.customers.plans.end({
|
|
42
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
43
|
+
* customer_plan_id: '7aa11640-0703-4600-8eb9-293f535a6b74',
|
|
44
|
+
* ending_before: '2021-02-01T00:00:00Z',
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
18
47
|
*/
|
|
19
48
|
end(params: PlanEndParams, options?: Core.RequestOptions): Core.APIPromise<PlanEndResponse>;
|
|
20
49
|
/**
|
|
21
50
|
* Lists a customer plans adjustments. See the
|
|
22
51
|
* [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments)
|
|
23
52
|
* for details.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* // Automatically fetches more pages as needed.
|
|
57
|
+
* for await (const planListPriceAdjustmentsResponse of client.v1.customers.plans.listPriceAdjustments(
|
|
58
|
+
* {
|
|
59
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
60
|
+
* customer_plan_id:
|
|
61
|
+
* '7aa11640-0703-4600-8eb9-293f535a6b74',
|
|
62
|
+
* },
|
|
63
|
+
* )) {
|
|
64
|
+
* // ...
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
24
67
|
*/
|
|
25
68
|
listPriceAdjustments(params: PlanListPriceAdjustmentsParams, options?: Core.RequestOptions): Core.PagePromise<PlanListPriceAdjustmentsResponsesCursorPage, PlanListPriceAdjustmentsResponse>;
|
|
26
69
|
}
|
|
@@ -33,7 +76,9 @@ export interface PlanListResponse {
|
|
|
33
76
|
* the ID of the customer plan
|
|
34
77
|
*/
|
|
35
78
|
id: string;
|
|
36
|
-
custom_fields:
|
|
79
|
+
custom_fields: {
|
|
80
|
+
[key: string]: string;
|
|
81
|
+
};
|
|
37
82
|
plan_description: string;
|
|
38
83
|
/**
|
|
39
84
|
* the ID of the plan
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/plans.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAExE,qBAAa,KAAM,SAAQ,WAAW;IACpC
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/plans.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAExE,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,WAAW,CAAC,2BAA2B,EAAE,gBAAgB,CAAC;IAQlE;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;IAK3F;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,MAAM,EAAE,aA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AA2C,IAAI,2CAA2C,EAC1F,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
|
|
@@ -7,6 +7,16 @@ const pagination_1 = require("../../../pagination.js");
|
|
|
7
7
|
class Plans extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* List the given customer's plans in reverse-chronological order.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* // Automatically fetches more pages as needed.
|
|
14
|
+
* for await (const planListResponse of client.v1.customers.plans.list(
|
|
15
|
+
* { customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
|
|
16
|
+
* )) {
|
|
17
|
+
* // ...
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
10
20
|
*/
|
|
11
21
|
list(params, options) {
|
|
12
22
|
const { customer_id, ...query } = params;
|
|
@@ -19,6 +29,16 @@ class Plans extends resource_1.APIResource {
|
|
|
19
29
|
* Associate an existing customer with a plan for a specified date range. See the
|
|
20
30
|
* [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments)
|
|
21
31
|
* for details on the price adjustments.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.v1.customers.plans.add({
|
|
36
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
37
|
+
* plan_id: 'd2c06dae-9549-4d7d-bc04-b78dd3d241b8',
|
|
38
|
+
* starting_on: '2021-02-01T00:00:00Z',
|
|
39
|
+
* ending_before: '2022-02-01T00:00:00Z',
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
22
42
|
*/
|
|
23
43
|
add(params, options) {
|
|
24
44
|
const { customer_id, ...body } = params;
|
|
@@ -26,6 +46,15 @@ class Plans extends resource_1.APIResource {
|
|
|
26
46
|
}
|
|
27
47
|
/**
|
|
28
48
|
* Change the end date of a customer's plan.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const response = await client.v1.customers.plans.end({
|
|
53
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
54
|
+
* customer_plan_id: '7aa11640-0703-4600-8eb9-293f535a6b74',
|
|
55
|
+
* ending_before: '2021-02-01T00:00:00Z',
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
29
58
|
*/
|
|
30
59
|
end(params, options) {
|
|
31
60
|
const { customer_id, customer_plan_id, ...body } = params;
|
|
@@ -38,6 +67,20 @@ class Plans extends resource_1.APIResource {
|
|
|
38
67
|
* Lists a customer plans adjustments. See the
|
|
39
68
|
* [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments)
|
|
40
69
|
* for details.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* // Automatically fetches more pages as needed.
|
|
74
|
+
* for await (const planListPriceAdjustmentsResponse of client.v1.customers.plans.listPriceAdjustments(
|
|
75
|
+
* {
|
|
76
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
77
|
+
* customer_plan_id:
|
|
78
|
+
* '7aa11640-0703-4600-8eb9-293f535a6b74',
|
|
79
|
+
* },
|
|
80
|
+
* )) {
|
|
81
|
+
* // ...
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
41
84
|
*/
|
|
42
85
|
listPriceAdjustments(params, options) {
|
|
43
86
|
const { customer_id, customer_plan_id, ...query } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/plans.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAGhD,uDAAwE;AAExE,MAAa,KAAM,SAAQ,sBAAW;IACpC
|
|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,EACzE,2CAA2C,EAC3C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AA/FD,sBA+FC;AAED,MAAa,2BAA4B,SAAQ,uBAA4B;CAAG;AAAhF,kEAAgF;AAEhF,MAAa,2CAA4C,SAAQ,uBAA4C;CAAG;AAAhH,kGAAgH;AA8PhH,KAAK,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AAChE,KAAK,CAAC,2CAA2C,GAAG,2CAA2C,CAAC"}
|
|
@@ -4,6 +4,16 @@ import { CursorPage } from "../../../pagination.mjs";
|
|
|
4
4
|
export class Plans extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* List the given customer's plans in reverse-chronological order.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* // Automatically fetches more pages as needed.
|
|
11
|
+
* for await (const planListResponse of client.v1.customers.plans.list(
|
|
12
|
+
* { customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
|
|
13
|
+
* )) {
|
|
14
|
+
* // ...
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
7
17
|
*/
|
|
8
18
|
list(params, options) {
|
|
9
19
|
const { customer_id, ...query } = params;
|
|
@@ -16,6 +26,16 @@ export class Plans extends APIResource {
|
|
|
16
26
|
* Associate an existing customer with a plan for a specified date range. See the
|
|
17
27
|
* [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments)
|
|
18
28
|
* for details on the price adjustments.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const response = await client.v1.customers.plans.add({
|
|
33
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
34
|
+
* plan_id: 'd2c06dae-9549-4d7d-bc04-b78dd3d241b8',
|
|
35
|
+
* starting_on: '2021-02-01T00:00:00Z',
|
|
36
|
+
* ending_before: '2022-02-01T00:00:00Z',
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
19
39
|
*/
|
|
20
40
|
add(params, options) {
|
|
21
41
|
const { customer_id, ...body } = params;
|
|
@@ -23,6 +43,15 @@ export class Plans extends APIResource {
|
|
|
23
43
|
}
|
|
24
44
|
/**
|
|
25
45
|
* Change the end date of a customer's plan.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const response = await client.v1.customers.plans.end({
|
|
50
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
51
|
+
* customer_plan_id: '7aa11640-0703-4600-8eb9-293f535a6b74',
|
|
52
|
+
* ending_before: '2021-02-01T00:00:00Z',
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
26
55
|
*/
|
|
27
56
|
end(params, options) {
|
|
28
57
|
const { customer_id, customer_plan_id, ...body } = params;
|
|
@@ -35,6 +64,20 @@ export class Plans extends APIResource {
|
|
|
35
64
|
* Lists a customer plans adjustments. See the
|
|
36
65
|
* [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments)
|
|
37
66
|
* for details.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* // Automatically fetches more pages as needed.
|
|
71
|
+
* for await (const planListPriceAdjustmentsResponse of client.v1.customers.plans.listPriceAdjustments(
|
|
72
|
+
* {
|
|
73
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
74
|
+
* customer_plan_id:
|
|
75
|
+
* '7aa11640-0703-4600-8eb9-293f535a6b74',
|
|
76
|
+
* },
|
|
77
|
+
* )) {
|
|
78
|
+
* // ...
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
38
81
|
*/
|
|
39
82
|
listPriceAdjustments(params, options) {
|
|
40
83
|
const { customer_id, customer_plan_id, ...query } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/plans.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAyB;AAE5C,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC
|
|
1
|
+
{"version":3,"file":"plans.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/plans.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAyB;AAE5C,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAsB,EACtB,OAA6B;QAE7B,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,WAAW,QAAQ,EAAE,2BAA2B,EAAE;YAChG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,MAAqB,EAAE,OAA6B;QACtD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,WAAW,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,MAAqB,EAAE,OAA6B;QACtD,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,WAAW,UAAU,gBAAgB,MAAM,EAAE;YACrF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,oBAAoB,CAClB,MAAsC,EACtC,OAA6B;QAE7B,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,iBAAiB,WAAW,UAAU,gBAAgB,mBAAmB,EACzE,2CAA2C,EAC3C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,UAA4B;CAAG;AAEhF,MAAM,OAAO,2CAA4C,SAAQ,UAA4C;CAAG;AA8PhH,KAAK,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AAChE,KAAK,CAAC,2CAA2C,GAAG,2CAA2C,CAAC"}
|
|
@@ -5,6 +5,32 @@ export declare class Dashboards extends APIResource {
|
|
|
5
5
|
* Retrieve an embeddable dashboard url for a customer. The dashboard can be
|
|
6
6
|
* embedded using an iframe in a website. This will show information such as usage
|
|
7
7
|
* data and customer invoices.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const response =
|
|
12
|
+
* await client.v1.dashboards.getEmbeddableURL({
|
|
13
|
+
* customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
|
|
14
|
+
* dashboard: 'invoices',
|
|
15
|
+
* bm_group_key_overrides: [
|
|
16
|
+
* {
|
|
17
|
+
* group_key_name: 'tenant_id',
|
|
18
|
+
* display_name: 'Org ID',
|
|
19
|
+
* value_display_names: {
|
|
20
|
+
* '48ecb18f358f': 'Cluster EU',
|
|
21
|
+
* e358f3ce242d: 'Cluster APAC',
|
|
22
|
+
* },
|
|
23
|
+
* },
|
|
24
|
+
* ],
|
|
25
|
+
* color_overrides: [
|
|
26
|
+
* { name: 'Gray_dark', value: '#ff0000' },
|
|
27
|
+
* ],
|
|
28
|
+
* dashboard_options: [
|
|
29
|
+
* { key: 'show_zero_usage_line_items', value: 'false' },
|
|
30
|
+
* { key: 'hide_voided_invoices', value: 'true' },
|
|
31
|
+
* ],
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
8
34
|
*/
|
|
9
35
|
getEmbeddableURL(body: DashboardGetEmbeddableURLParams, options?: Core.RequestOptions): Core.APIPromise<DashboardGetEmbeddableURLResponse>;
|
|
10
36
|
}
|
|
@@ -21,7 +47,7 @@ export interface DashboardGetEmbeddableURLParams {
|
|
|
21
47
|
/**
|
|
22
48
|
* The type of dashboard to retrieve.
|
|
23
49
|
*/
|
|
24
|
-
dashboard: 'invoices' | 'usage' | 'credits';
|
|
50
|
+
dashboard: 'invoices' | 'usage' | 'credits' | 'commits_and_credits';
|
|
25
51
|
/**
|
|
26
52
|
* Optional list of billable metric group key overrides
|
|
27
53
|
*/
|
|
@@ -49,13 +75,15 @@ export declare namespace DashboardGetEmbeddableURLParams {
|
|
|
49
75
|
* <key, value> pairs of the billable metric group key values and their display
|
|
50
76
|
* names. e.g. {"a": "Asia", "b": "Euro"}
|
|
51
77
|
*/
|
|
52
|
-
value_display_names?:
|
|
78
|
+
value_display_names?: {
|
|
79
|
+
[key: string]: unknown;
|
|
80
|
+
};
|
|
53
81
|
}
|
|
54
82
|
interface ColorOverride {
|
|
55
83
|
/**
|
|
56
84
|
* The color to override
|
|
57
85
|
*/
|
|
58
|
-
name?: 'Gray_dark' | 'Gray_medium' | 'Gray_light' | 'Gray_extralight' | 'White' | 'Primary_medium' | 'Primary_light' | 'UsageLine_0' | 'UsageLine_1' | 'UsageLine_2' | 'UsageLine_3' | 'UsageLine_4' | 'UsageLine_5' | 'UsageLine_6' | 'UsageLine_7' | 'UsageLine_8' | 'UsageLine_9' | 'Primary_green' | 'Primary_red';
|
|
86
|
+
name?: 'Gray_dark' | 'Gray_medium' | 'Gray_light' | 'Gray_extralight' | 'White' | 'Primary_medium' | 'Primary_light' | 'UsageLine_0' | 'UsageLine_1' | 'UsageLine_2' | 'UsageLine_3' | 'UsageLine_4' | 'UsageLine_5' | 'UsageLine_6' | 'UsageLine_7' | 'UsageLine_8' | 'UsageLine_9' | 'Primary_green' | 'Primary_red' | 'Progress_bar' | 'Progress_bar_background';
|
|
59
87
|
/**
|
|
60
88
|
* Hex value representation of the color
|
|
61
89
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboards.d.ts","sourceRoot":"","sources":["../../src/resources/v1/dashboards.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"dashboards.d.ts","sourceRoot":"","sources":["../../src/resources/v1/dashboards.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gBAAgB,CACd,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC;CAGtD;AAED,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC;CAC9C;AAED,yBAAiB,iCAAiC,CAAC;IACjD,UAAiB,IAAI;QACnB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,+BAA+B;IAC9C,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,qBAAqB,CAAC;IAEpE;;OAEG;IACH,sBAAsB,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,kBAAkB,CAAC,CAAC;IAEnF;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,aAAa,CAAC,CAAC;IAEvE;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,+BAA+B,CAAC,eAAe,CAAC,CAAC;CAC5E;AAED,yBAAiB,+BAA+B,CAAC;IAC/C,UAAiB,kBAAkB;QACjC;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QAEvB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;;WAGG;QACH,mBAAmB,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;KAClD;IAED,UAAiB,aAAa;QAC5B;;WAEG;QACH,IAAI,CAAC,EACD,WAAW,GACX,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,OAAO,GACP,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,eAAe,GACf,aAAa,GACb,cAAc,GACd,yBAAyB,CAAC;QAE9B;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAED,UAAiB,eAAe;QAC9B;;WAEG;QACH,GAAG,EAAE,MAAM,CAAC;QAEZ;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;KACf;CACF;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
|
@@ -8,6 +8,32 @@ class Dashboards extends resource_1.APIResource {
|
|
|
8
8
|
* Retrieve an embeddable dashboard url for a customer. The dashboard can be
|
|
9
9
|
* embedded using an iframe in a website. This will show information such as usage
|
|
10
10
|
* data and customer invoices.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const response =
|
|
15
|
+
* await client.v1.dashboards.getEmbeddableURL({
|
|
16
|
+
* customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
|
|
17
|
+
* dashboard: 'invoices',
|
|
18
|
+
* bm_group_key_overrides: [
|
|
19
|
+
* {
|
|
20
|
+
* group_key_name: 'tenant_id',
|
|
21
|
+
* display_name: 'Org ID',
|
|
22
|
+
* value_display_names: {
|
|
23
|
+
* '48ecb18f358f': 'Cluster EU',
|
|
24
|
+
* e358f3ce242d: 'Cluster APAC',
|
|
25
|
+
* },
|
|
26
|
+
* },
|
|
27
|
+
* ],
|
|
28
|
+
* color_overrides: [
|
|
29
|
+
* { name: 'Gray_dark', value: '#ff0000' },
|
|
30
|
+
* ],
|
|
31
|
+
* dashboard_options: [
|
|
32
|
+
* { key: 'show_zero_usage_line_items', value: 'false' },
|
|
33
|
+
* { key: 'hide_voided_invoices', value: 'true' },
|
|
34
|
+
* ],
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
11
37
|
*/
|
|
12
38
|
getEmbeddableURL(body, options) {
|
|
13
39
|
return this._client.post('/v1/dashboards/getEmbeddableUrl', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboards.js","sourceRoot":"","sources":["../../src/resources/v1/dashboards.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,UAAW,SAAQ,sBAAW;IACzC
|
|
1
|
+
{"version":3,"file":"dashboards.js","sourceRoot":"","sources":["../../src/resources/v1/dashboards.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gBAAgB,CACd,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF;AAtCD,gCAsCC"}
|
|
@@ -5,6 +5,32 @@ export class Dashboards extends APIResource {
|
|
|
5
5
|
* Retrieve an embeddable dashboard url for a customer. The dashboard can be
|
|
6
6
|
* embedded using an iframe in a website. This will show information such as usage
|
|
7
7
|
* data and customer invoices.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const response =
|
|
12
|
+
* await client.v1.dashboards.getEmbeddableURL({
|
|
13
|
+
* customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
|
|
14
|
+
* dashboard: 'invoices',
|
|
15
|
+
* bm_group_key_overrides: [
|
|
16
|
+
* {
|
|
17
|
+
* group_key_name: 'tenant_id',
|
|
18
|
+
* display_name: 'Org ID',
|
|
19
|
+
* value_display_names: {
|
|
20
|
+
* '48ecb18f358f': 'Cluster EU',
|
|
21
|
+
* e358f3ce242d: 'Cluster APAC',
|
|
22
|
+
* },
|
|
23
|
+
* },
|
|
24
|
+
* ],
|
|
25
|
+
* color_overrides: [
|
|
26
|
+
* { name: 'Gray_dark', value: '#ff0000' },
|
|
27
|
+
* ],
|
|
28
|
+
* dashboard_options: [
|
|
29
|
+
* { key: 'show_zero_usage_line_items', value: 'false' },
|
|
30
|
+
* { key: 'hide_voided_invoices', value: 'true' },
|
|
31
|
+
* ],
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
8
34
|
*/
|
|
9
35
|
getEmbeddableURL(body, options) {
|
|
10
36
|
return this._client.post('/v1/dashboards/getEmbeddableUrl', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboards.mjs","sourceRoot":"","sources":["../../src/resources/v1/dashboards.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"dashboards.mjs","sourceRoot":"","sources":["../../src/resources/v1/dashboards.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,gBAAgB,CACd,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF"}
|
package/resources/v1/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export { Alerts, type AlertCreateResponse, type AlertArchiveResponse, type AlertCreateParams, type AlertArchiveParams, } from "./alerts.js";
|
|
2
2
|
export { AuditLogListResponsesCursorPage, AuditLogs, type AuditLogListResponse, type AuditLogListParams, } from "./audit-logs.js";
|
|
3
3
|
export { BillableMetricListResponsesCursorPage, BillableMetrics, type BillableMetricCreateResponse, type BillableMetricRetrieveResponse, type BillableMetricListResponse, type BillableMetricArchiveResponse, type BillableMetricCreateParams, type BillableMetricRetrieveParams, type BillableMetricListParams, type BillableMetricArchiveParams, } from "./billable-metrics.js";
|
|
4
|
-
export { Contracts, type ContractCreateResponse, type ContractRetrieveResponse, type ContractListResponse, type ContractAmendResponse, type ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse, type ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse, type ContractCreateParams, type ContractRetrieveParams, type ContractListParams, type ContractAddManualBalanceEntryParams, type ContractAmendParams, type ContractArchiveParams, type ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams, type ContractRetrieveRateScheduleParams, type ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams, type ContractUpdateEndDateParams, } from "./contracts/index.js";
|
|
4
|
+
export { Contracts, type ContractCreateResponse, type ContractRetrieveResponse, type ContractListResponse, type ContractAmendResponse, type ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse, type ContractCreateParams, type ContractRetrieveParams, type ContractListParams, type ContractAddManualBalanceEntryParams, type ContractAmendParams, type ContractArchiveParams, type ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams, type ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams, type ContractUpdateEndDateParams, } from "./contracts/index.js";
|
|
5
5
|
export { CreditGrantListResponsesCursorPage, CreditGrants, type CreditLedgerEntry, type RolloverAmountMaxAmount, type RolloverAmountMaxPercentage, type CreditGrantCreateResponse, type CreditGrantListResponse, type CreditGrantEditResponse, type CreditGrantListEntriesResponse, type CreditGrantVoidResponse, type CreditGrantCreateParams, type CreditGrantListParams, type CreditGrantEditParams, type CreditGrantListEntriesParams, type CreditGrantVoidParams, } from "./credit-grants.js";
|
|
6
6
|
export { CustomFields, type CustomFieldListKeysResponse, type CustomFieldAddKeyParams, type CustomFieldDeleteValuesParams, type CustomFieldListKeysParams, type CustomFieldRemoveKeyParams, type CustomFieldSetValuesParams, } from "./custom-fields.js";
|
|
7
|
-
export { CustomerDetailsCursorPage, CustomerListBillableMetricsResponsesCursorPage, CustomerListCostsResponsesCursorPage, Customers, type Customer, type CustomerDetail, type CustomerCreateResponse, type CustomerRetrieveResponse, type CustomerArchiveResponse, type CustomerListBillableMetricsResponse, type CustomerListCostsResponse, type CustomerSetNameResponse, type CustomerCreateParams, type CustomerRetrieveParams, type CustomerListParams, type CustomerArchiveParams, type CustomerListBillableMetricsParams, type CustomerListCostsParams, type CustomerSetIngestAliasesParams, type CustomerSetNameParams, type CustomerUpdateConfigParams, } from "./customers/index.js";
|
|
7
|
+
export { CustomerDetailsCursorPage, CustomerListBillableMetricsResponsesCursorPage, CustomerListCostsResponsesCursorPage, Customers, type Customer, type CustomerDetail, type CustomerCreateResponse, type CustomerRetrieveResponse, type CustomerArchiveResponse, type CustomerListBillableMetricsResponse, type CustomerListCostsResponse, type CustomerPreviewEventsResponse, type CustomerSetNameResponse, type CustomerCreateParams, type CustomerRetrieveParams, type CustomerListParams, type CustomerArchiveParams, type CustomerListBillableMetricsParams, type CustomerListCostsParams, type CustomerPreviewEventsParams, type CustomerSetIngestAliasesParams, type CustomerSetNameParams, type CustomerUpdateConfigParams, } from "./customers/index.js";
|
|
8
8
|
export { Dashboards, type DashboardGetEmbeddableURLResponse, type DashboardGetEmbeddableURLParams, } from "./dashboards.js";
|
|
9
9
|
export { Invoices, type InvoiceRegenerateResponse, type InvoiceVoidResponse, type InvoiceRegenerateParams, type InvoiceVoidParams, } from "./invoices.js";
|
|
10
10
|
export { PlanListResponsesCursorPage, PlanListChargesResponsesCursorPage, PlanListCustomersResponsesCursorPage, Plans, type PlanDetail, type PlanListResponse, type PlanGetDetailsResponse, type PlanListChargesResponse, type PlanListCustomersResponse, type PlanListParams, type PlanGetDetailsParams, type PlanListChargesParams, type PlanListCustomersParams, } from "./plans.js";
|
|
11
11
|
export { PricingUnitListResponsesCursorPage, PricingUnits, type PricingUnitListResponse, type PricingUnitListParams, } from "./pricing-units.js";
|
|
12
12
|
export { Services, type ServiceListResponse } from "./services.js";
|
|
13
|
-
export { UsageListWithGroupsResponsesCursorPage, Usage, type UsageListResponse, type UsageListWithGroupsResponse, type UsageListParams, type UsageIngestParams, type UsageListWithGroupsParams, } from "./usage.js";
|
|
13
|
+
export { UsageListWithGroupsResponsesCursorPage, Usage, type UsageListResponse, type UsageListWithGroupsResponse, type UsageSearchResponse, type UsageListParams, type UsageIngestParams, type UsageListWithGroupsParams, type UsageSearchParams, } from "./usage.js";
|
|
14
14
|
export { V1 } from "./v1.js";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"m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CAAC;AACtB,OAAO,EACL,QAAQ,EACR,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,2BAA2B,EAC3B,kCAAkC,EAClC,oCAAoC,EACpC,KAAK,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,GAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,kCAAkC,EAClC,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EACL,sCAAsC,EACtC,KAAK,EACL,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,8CAKsB;AAJpB,6HAAA,+BAA+B,OAAA;AAC/B,uGAAA,SAAS,OAAA;AAIX,0DAW4B;AAV1B,yIAAA,qCAAqC,OAAA;AACrC,mHAAA,eAAe,OAAA;AAUjB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,8CAKsB;AAJpB,6HAAA,+BAA+B,OAAA;AAC/B,uGAAA,SAAS,OAAA;AAIX,0DAW4B;AAV1B,yIAAA,qCAAqC,OAAA;AACrC,mHAAA,eAAe,OAAA;AAUjB,8CA0B2B;AAzBzB,kGAAA,SAAS,OAAA;AA0BX,oDAgByB;AAfvB,mIAAA,kCAAkC,OAAA;AAClC,6GAAA,YAAY,OAAA;AAed,oDAQyB;AAPvB,6GAAA,YAAY,OAAA;AAQd,8CAwB2B;AAvBzB,kHAAA,yBAAyB,OAAA;AACzB,uIAAA,8CAA8C,OAAA;AAC9C,6HAAA,oCAAoC,OAAA;AACpC,kGAAA,SAAS,OAAA;AAqBX,8CAIsB;AAHpB,wGAAA,UAAU,OAAA;AAIZ,0CAMoB;AALlB,oGAAA,QAAQ,OAAA;AAMV,oCAciB;AAbf,oHAAA,2BAA2B,OAAA;AAC3B,2HAAA,kCAAkC,OAAA;AAClC,6HAAA,oCAAoC,OAAA;AACpC,8FAAA,KAAK,OAAA;AAWP,oDAKyB;AAJvB,mIAAA,kCAAkC,OAAA;AAClC,6GAAA,YAAY,OAAA;AAId,0CAAgE;AAAvD,oGAAA,QAAQ,OAAA;AACjB,oCAUiB;AATf,+HAAA,sCAAsC,OAAA;AACtC,8FAAA,KAAK,OAAA;AASP,8BAA0B;AAAjB,wFAAA,EAAE,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAKP;OACM,EACL,+BAA+B,EAC/B,SAAS,GAGV;OACM,EACL,qCAAqC,EACrC,eAAe,GAShB;OACM,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAKP;OACM,EACL,+BAA+B,EAC/B,SAAS,GAGV;OACM,EACL,qCAAqC,EACrC,eAAe,GAShB;OACM,EACL,SAAS,GAyBV;OACM,EACL,kCAAkC,EAClC,YAAY,GAcb;OACM,EACL,YAAY,GAOb;OACM,EACL,yBAAyB,EACzB,8CAA8C,EAC9C,oCAAoC,EACpC,SAAS,GAoBV;OACM,EACL,UAAU,GAGX;OACM,EACL,QAAQ,GAKT;OACM,EACL,2BAA2B,EAC3B,kCAAkC,EAClC,oCAAoC,EACpC,KAAK,GAUN;OACM,EACL,kCAAkC,EAClC,YAAY,GAGb;OACM,EAAE,QAAQ,EAA4B;OACtC,EACL,sCAAsC,EACtC,KAAK,GAQN;OACM,EAAE,EAAE,EAAE"}
|
|
@@ -3,10 +3,24 @@ import * as Core from "../../core.js";
|
|
|
3
3
|
export declare class Invoices extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Regenerate a voided contract invoice
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const response = await client.v1.invoices.regenerate({
|
|
10
|
+
* id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
6
13
|
*/
|
|
7
14
|
regenerate(body: InvoiceRegenerateParams, options?: Core.RequestOptions): Core.APIPromise<InvoiceRegenerateResponse>;
|
|
8
15
|
/**
|
|
9
16
|
* Void an invoice
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const response = await client.v1.invoices.void({
|
|
21
|
+
* id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
10
24
|
*/
|
|
11
25
|
void(body: InvoiceVoidParams, options?: Core.RequestOptions): Core.APIPromise<InvoiceVoidResponse>;
|
|
12
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../src/resources/v1/invoices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../src/resources/v1/invoices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,UAAU,CACR,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAI7C;;;;;;;;;OASG;IACH,IAAI,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;CAGnG;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC;CACvC;AAED,yBAAiB,yBAAyB,CAAC;IACzC,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;CACjC;AAED,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,IAAI;QACnB,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/v1/invoices.js
CHANGED
|
@@ -6,12 +6,26 @@ const resource_1 = require("../../resource.js");
|
|
|
6
6
|
class Invoices extends resource_1.APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Regenerate a voided contract invoice
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const response = await client.v1.invoices.regenerate({
|
|
13
|
+
* id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
9
16
|
*/
|
|
10
17
|
regenerate(body, options) {
|
|
11
18
|
return this._client.post('/v1/invoices/regenerate', { body, ...options });
|
|
12
19
|
}
|
|
13
20
|
/**
|
|
14
21
|
* Void an invoice
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const response = await client.v1.invoices.void({
|
|
26
|
+
* id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
15
29
|
*/
|
|
16
30
|
void(body, options) {
|
|
17
31
|
return this._client.post('/v1/invoices/void', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../src/resources/v1/invoices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../src/resources/v1/invoices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,IAAuB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF;AA/BD,4BA+BC"}
|
|
@@ -3,12 +3,26 @@ import { APIResource } from "../../resource.mjs";
|
|
|
3
3
|
export class Invoices extends APIResource {
|
|
4
4
|
/**
|
|
5
5
|
* Regenerate a voided contract invoice
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const response = await client.v1.invoices.regenerate({
|
|
10
|
+
* id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
6
13
|
*/
|
|
7
14
|
regenerate(body, options) {
|
|
8
15
|
return this._client.post('/v1/invoices/regenerate', { body, ...options });
|
|
9
16
|
}
|
|
10
17
|
/**
|
|
11
18
|
* Void an invoice
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const response = await client.v1.invoices.void({
|
|
23
|
+
* id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
12
26
|
*/
|
|
13
27
|
void(body, options) {
|
|
14
28
|
return this._client.post('/v1/invoices/void', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../../src/resources/v1/invoices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../../src/resources/v1/invoices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;OASG;IACH,UAAU,CACR,IAA6B,EAC7B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,IAAuB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;CACF"}
|