lark-billing 0.1.5 → 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.
Files changed (77) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +16 -45
  3. package/client.d.mts +6 -9
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +6 -9
  6. package/client.d.ts.map +1 -1
  7. package/client.js +0 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +0 -3
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/customer-portal.d.mts +5 -0
  13. package/resources/customer-portal.d.mts.map +1 -1
  14. package/resources/customer-portal.d.ts +5 -0
  15. package/resources/customer-portal.d.ts.map +1 -1
  16. package/resources/index.d.mts +3 -4
  17. package/resources/index.d.mts.map +1 -1
  18. package/resources/index.d.ts +3 -4
  19. package/resources/index.d.ts.map +1 -1
  20. package/resources/index.js +1 -3
  21. package/resources/index.js.map +1 -1
  22. package/resources/index.mjs +0 -1
  23. package/resources/index.mjs.map +1 -1
  24. package/resources/invoices.d.mts +15 -5
  25. package/resources/invoices.d.mts.map +1 -1
  26. package/resources/invoices.d.ts +15 -5
  27. package/resources/invoices.d.ts.map +1 -1
  28. package/resources/pricing-metrics.d.mts +19 -19
  29. package/resources/pricing-metrics.d.mts.map +1 -1
  30. package/resources/pricing-metrics.d.ts +19 -19
  31. package/resources/pricing-metrics.d.ts.map +1 -1
  32. package/resources/pricing-metrics.js +12 -12
  33. package/resources/pricing-metrics.js.map +1 -1
  34. package/resources/pricing-metrics.mjs +12 -12
  35. package/resources/pricing-metrics.mjs.map +1 -1
  36. package/resources/rate-cards.d.mts +4 -23
  37. package/resources/rate-cards.d.mts.map +1 -1
  38. package/resources/rate-cards.d.ts +4 -23
  39. package/resources/rate-cards.d.ts.map +1 -1
  40. package/resources/rate-cards.js +0 -20
  41. package/resources/rate-cards.js.map +1 -1
  42. package/resources/rate-cards.mjs +0 -20
  43. package/resources/rate-cards.mjs.map +1 -1
  44. package/resources/subscriptions.d.mts +92 -14
  45. package/resources/subscriptions.d.mts.map +1 -1
  46. package/resources/subscriptions.d.ts +92 -14
  47. package/resources/subscriptions.d.ts.map +1 -1
  48. package/resources/subscriptions.js +8 -5
  49. package/resources/subscriptions.js.map +1 -1
  50. package/resources/subscriptions.mjs +8 -5
  51. package/resources/subscriptions.mjs.map +1 -1
  52. package/resources/usage-events.d.mts +1 -1
  53. package/resources/usage-events.d.ts +1 -1
  54. package/resources/usage-events.js +1 -1
  55. package/resources/usage-events.mjs +1 -1
  56. package/src/client.ts +8 -20
  57. package/src/resources/customer-portal.ts +6 -0
  58. package/src/resources/index.ts +4 -9
  59. package/src/resources/invoices.ts +21 -5
  60. package/src/resources/pricing-metrics.ts +22 -22
  61. package/src/resources/rate-cards.ts +5 -23
  62. package/src/resources/subscriptions.ts +108 -14
  63. package/src/resources/usage-events.ts +1 -1
  64. package/src/version.ts +1 -1
  65. package/version.d.mts +1 -1
  66. package/version.d.ts +1 -1
  67. package/version.js +1 -1
  68. package/version.mjs +1 -1
  69. package/resources/checkout.d.mts +0 -61
  70. package/resources/checkout.d.mts.map +0 -1
  71. package/resources/checkout.d.ts +0 -61
  72. package/resources/checkout.d.ts.map +0 -1
  73. package/resources/checkout.js +0 -15
  74. package/resources/checkout.js.map +0 -1
  75. package/resources/checkout.mjs +0 -11
  76. package/resources/checkout.mjs.map +0 -1
  77. package/src/resources/checkout.ts +0 -81
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkout.d.mts","sourceRoot":"","sources":["../src/resources/checkout.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGjG;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IAErB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,sBAAsB,EAAE,gBAAgB,CAAC;IAEzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -1,61 +0,0 @@
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 Checkout extends APIResource {
5
- /**
6
- * Create Subscription Checkout Session
7
- */
8
- create(body: CheckoutCreateParams, options?: RequestOptions): APIPromise<CheckoutCreateResponse>;
9
- }
10
- export interface AmountOutput {
11
- /**
12
- * The currency code of the amount.
13
- */
14
- currency_code: string;
15
- /**
16
- * The value of the amount in the smallest unit of the currency.
17
- */
18
- value: string;
19
- }
20
- export interface CheckoutCallback {
21
- /**
22
- * The URL to redirect to after the checkout is cancelled.
23
- */
24
- cancelled_url: string;
25
- /**
26
- * The URL to redirect to after the checkout is successful.
27
- */
28
- success_url: string;
29
- }
30
- export interface CheckoutCreateResponse {
31
- /**
32
- * The ID of the checkout session.
33
- */
34
- id: string;
35
- /**
36
- * The amount of the checkout session.
37
- */
38
- amount: AmountOutput;
39
- /**
40
- * The URL to redirect to the checkout session.
41
- */
42
- url: string;
43
- }
44
- export interface CheckoutCreateParams {
45
- /**
46
- * The URLs to redirect to after the checkout is completed or cancelled.
47
- */
48
- checkout_callback_urls: CheckoutCallback;
49
- /**
50
- * The ID of the rate card to subscribe to.
51
- */
52
- rate_card_id: string;
53
- /**
54
- * The ID or external ID of the subject to create the checkout for.
55
- */
56
- subject_id: string;
57
- }
58
- export declare namespace Checkout {
59
- export { type AmountOutput as AmountOutput, type CheckoutCallback as CheckoutCallback, type CheckoutCreateResponse as CheckoutCreateResponse, type CheckoutCreateParams as CheckoutCreateParams, };
60
- }
61
- //# sourceMappingURL=checkout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../src/resources/checkout.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGjG;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IAErB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,sBAAsB,EAAE,gBAAgB,CAAC;IAEzC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -1,15 +0,0 @@
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.Checkout = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- class Checkout extends resource_1.APIResource {
7
- /**
8
- * Create Subscription Checkout Session
9
- */
10
- create(body, options) {
11
- return this._client.post('/checkout', { body, ...options });
12
- }
13
- }
14
- exports.Checkout = Checkout;
15
- //# sourceMappingURL=checkout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkout.js","sourceRoot":"","sources":["../src/resources/checkout.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF;AAPD,4BAOC"}
@@ -1,11 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- export class Checkout extends APIResource {
4
- /**
5
- * Create Subscription Checkout Session
6
- */
7
- create(body, options) {
8
- return this._client.post('/checkout', { body, ...options });
9
- }
10
- }
11
- //# sourceMappingURL=checkout.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkout.mjs","sourceRoot":"","sources":["../src/resources/checkout.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF"}
@@ -1,81 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../core/resource';
4
- import { APIPromise } from '../core/api-promise';
5
- import { RequestOptions } from '../internal/request-options';
6
-
7
- export class Checkout extends APIResource {
8
- /**
9
- * Create Subscription Checkout Session
10
- */
11
- create(body: CheckoutCreateParams, options?: RequestOptions): APIPromise<CheckoutCreateResponse> {
12
- return this._client.post('/checkout', { body, ...options });
13
- }
14
- }
15
-
16
- export interface AmountOutput {
17
- /**
18
- * The currency code of the amount.
19
- */
20
- currency_code: string;
21
-
22
- /**
23
- * The value of the amount in the smallest unit of the currency.
24
- */
25
- value: string;
26
- }
27
-
28
- export interface CheckoutCallback {
29
- /**
30
- * The URL to redirect to after the checkout is cancelled.
31
- */
32
- cancelled_url: string;
33
-
34
- /**
35
- * The URL to redirect to after the checkout is successful.
36
- */
37
- success_url: string;
38
- }
39
-
40
- export interface CheckoutCreateResponse {
41
- /**
42
- * The ID of the checkout session.
43
- */
44
- id: string;
45
-
46
- /**
47
- * The amount of the checkout session.
48
- */
49
- amount: AmountOutput;
50
-
51
- /**
52
- * The URL to redirect to the checkout session.
53
- */
54
- url: string;
55
- }
56
-
57
- export interface CheckoutCreateParams {
58
- /**
59
- * The URLs to redirect to after the checkout is completed or cancelled.
60
- */
61
- checkout_callback_urls: CheckoutCallback;
62
-
63
- /**
64
- * The ID of the rate card to subscribe to.
65
- */
66
- rate_card_id: string;
67
-
68
- /**
69
- * The ID or external ID of the subject to create the checkout for.
70
- */
71
- subject_id: string;
72
- }
73
-
74
- export declare namespace Checkout {
75
- export {
76
- type AmountOutput as AmountOutput,
77
- type CheckoutCallback as CheckoutCallback,
78
- type CheckoutCreateResponse as CheckoutCreateResponse,
79
- type CheckoutCreateParams as CheckoutCreateParams,
80
- };
81
- }