lark-billing 0.0.5 → 0.0.6

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 (123) hide show
  1. package/README.md +10 -10
  2. package/dist/cjs/Client.d.ts +1 -6
  3. package/dist/cjs/Client.js +2 -12
  4. package/dist/cjs/api/resources/checkout/client/Client.d.ts +19 -4
  5. package/dist/cjs/api/resources/checkout/client/Client.js +78 -9
  6. package/dist/cjs/api/resources/checkout/client/requests/{CreateRateCardCheckoutRequest.d.ts → CreateSubscriptionCheckoutSessionRequest.d.ts} +1 -1
  7. package/dist/cjs/api/resources/checkout/client/requests/index.d.ts +1 -1
  8. package/dist/cjs/api/resources/featureAccess/client/Client.d.ts +4 -0
  9. package/dist/cjs/api/resources/featureAccess/client/Client.js +7 -1
  10. package/dist/cjs/api/resources/index.d.ts +0 -2
  11. package/dist/cjs/api/resources/index.js +1 -3
  12. package/dist/cjs/api/resources/rateCards/client/Client.d.ts +8 -0
  13. package/dist/cjs/api/resources/rateCards/client/Client.js +16 -6
  14. package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardRequest.d.ts +1 -0
  15. package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardVersionRequest.d.ts +3 -0
  16. package/dist/cjs/api/resources/subjects/client/Client.d.ts +4 -0
  17. package/dist/cjs/api/resources/subjects/client/Client.js +11 -5
  18. package/dist/cjs/api/resources/subscriptions/client/Client.d.ts +4 -0
  19. package/dist/cjs/api/resources/subscriptions/client/Client.js +11 -5
  20. package/dist/cjs/api/resources/usageEvents/client/Client.d.ts +23 -0
  21. package/dist/cjs/api/resources/usageEvents/client/Client.js +75 -1
  22. package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.ts +1 -1
  23. package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventSummaryRequest.d.ts +30 -0
  24. package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventSummaryRequest.js +14 -0
  25. package/dist/cjs/api/resources/usageEvents/client/requests/index.d.ts +1 -0
  26. package/dist/cjs/api/types/CompleteSubscriptionCheckoutResponse.d.ts +8 -0
  27. package/dist/cjs/api/types/CreateDimensionalUsageBasedRateInterface.d.ts +2 -0
  28. package/dist/cjs/api/types/CreateFixedRateInterface.d.ts +1 -0
  29. package/dist/cjs/api/types/CreatePricingMetricInterface.d.ts +1 -0
  30. package/dist/cjs/api/types/CreateSimpleUsageBasedRateInterface.d.ts +2 -0
  31. package/dist/cjs/api/types/CreateSubscriptionCheckoutSessionResponse.d.ts +10 -0
  32. package/dist/cjs/api/{resources/creditPools/client/index.js → types/CreateSubscriptionCheckoutSessionResponse.js} +3 -0
  33. package/dist/cjs/api/types/CreateUsageEventSummaryResponse.d.ts +10 -0
  34. package/dist/cjs/api/{resources/pricingPlans/client/index.js → types/CreateUsageEventSummaryResponse.js} +3 -0
  35. package/dist/cjs/api/types/CustomAggregationPricingMetricInterface.d.ts +1 -0
  36. package/dist/cjs/api/types/DimensionalUsageBasedRateInterface.d.ts +3 -0
  37. package/dist/cjs/api/types/FixedRateInterface.d.ts +2 -0
  38. package/dist/cjs/api/types/LastAggregationPricingMetricInterface.d.ts +1 -0
  39. package/dist/cjs/api/types/MaxAggregationPricingMetricInterface.d.ts +1 -0
  40. package/dist/cjs/api/types/Period.d.ts +9 -0
  41. package/dist/cjs/api/types/Period.js +5 -0
  42. package/dist/cjs/api/types/PricingMetricInterface.d.ts +2 -0
  43. package/dist/cjs/api/types/SimpleUsageBasedRateInterface.d.ts +3 -0
  44. package/dist/cjs/api/types/SumAggregationPricingMetricInterface.d.ts +1 -0
  45. package/dist/cjs/api/types/index.d.ts +4 -1
  46. package/dist/cjs/api/types/index.js +4 -1
  47. package/dist/cjs/version.d.ts +1 -1
  48. package/dist/cjs/version.js +1 -1
  49. package/dist/esm/Client.d.mts +1 -6
  50. package/dist/esm/Client.mjs +2 -12
  51. package/dist/esm/api/resources/checkout/client/Client.d.mts +19 -4
  52. package/dist/esm/api/resources/checkout/client/Client.mjs +79 -10
  53. package/dist/esm/api/resources/checkout/client/requests/{CreateRateCardCheckoutRequest.d.mts → CreateSubscriptionCheckoutSessionRequest.d.mts} +1 -1
  54. package/dist/esm/api/resources/checkout/client/requests/index.d.mts +1 -1
  55. package/dist/esm/api/resources/featureAccess/client/Client.d.mts +4 -0
  56. package/dist/esm/api/resources/featureAccess/client/Client.mjs +8 -2
  57. package/dist/esm/api/resources/index.d.mts +0 -2
  58. package/dist/esm/api/resources/index.mjs +0 -2
  59. package/dist/esm/api/resources/rateCards/client/Client.d.mts +8 -0
  60. package/dist/esm/api/resources/rateCards/client/Client.mjs +17 -7
  61. package/dist/esm/api/resources/rateCards/client/requests/CreateRateCardRequest.d.mts +1 -0
  62. package/dist/esm/api/resources/rateCards/client/requests/CreateRateCardVersionRequest.d.mts +3 -0
  63. package/dist/esm/api/resources/subjects/client/Client.d.mts +4 -0
  64. package/dist/esm/api/resources/subjects/client/Client.mjs +12 -6
  65. package/dist/esm/api/resources/subscriptions/client/Client.d.mts +4 -0
  66. package/dist/esm/api/resources/subscriptions/client/Client.mjs +12 -6
  67. package/dist/esm/api/resources/usageEvents/client/Client.d.mts +23 -0
  68. package/dist/esm/api/resources/usageEvents/client/Client.mjs +76 -2
  69. package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.mts +1 -1
  70. package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventSummaryRequest.d.mts +30 -0
  71. package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventSummaryRequest.mjs +11 -0
  72. package/dist/esm/api/resources/usageEvents/client/requests/index.d.mts +1 -0
  73. package/dist/esm/api/types/CompleteSubscriptionCheckoutResponse.d.mts +8 -0
  74. package/dist/esm/api/types/CreateDimensionalUsageBasedRateInterface.d.mts +2 -0
  75. package/dist/esm/api/types/CreateFixedRateInterface.d.mts +1 -0
  76. package/dist/esm/api/types/CreatePricingMetricInterface.d.mts +1 -0
  77. package/dist/esm/api/types/CreateSimpleUsageBasedRateInterface.d.mts +2 -0
  78. package/dist/esm/api/types/CreateSubscriptionCheckoutSessionResponse.d.mts +10 -0
  79. package/dist/{cjs/api/types/CreateRateCardCheckoutResponse.d.ts → esm/api/types/CreateSubscriptionCheckoutSessionResponse.mjs} +1 -3
  80. package/dist/esm/api/types/CreateUsageEventSummaryResponse.d.mts +10 -0
  81. package/dist/esm/api/types/{CreateRateCardCheckoutResponse.d.mts → CreateUsageEventSummaryResponse.mjs} +1 -3
  82. package/dist/esm/api/types/CustomAggregationPricingMetricInterface.d.mts +1 -0
  83. package/dist/esm/api/types/DimensionalUsageBasedRateInterface.d.mts +3 -0
  84. package/dist/esm/api/types/FixedRateInterface.d.mts +2 -0
  85. package/dist/esm/api/types/LastAggregationPricingMetricInterface.d.mts +1 -0
  86. package/dist/esm/api/types/MaxAggregationPricingMetricInterface.d.mts +1 -0
  87. package/dist/esm/api/types/Period.d.mts +9 -0
  88. package/dist/esm/api/types/Period.mjs +4 -0
  89. package/dist/esm/api/types/PricingMetricInterface.d.mts +2 -0
  90. package/dist/esm/api/types/SimpleUsageBasedRateInterface.d.mts +3 -0
  91. package/dist/esm/api/types/SumAggregationPricingMetricInterface.d.mts +1 -0
  92. package/dist/esm/api/types/index.d.mts +4 -1
  93. package/dist/esm/api/types/index.mjs +4 -1
  94. package/dist/esm/version.d.mts +1 -1
  95. package/dist/esm/version.mjs +1 -1
  96. package/package.json +1 -1
  97. package/reference.md +111 -351
  98. package/dist/cjs/api/resources/creditPools/client/Client.d.ts +0 -53
  99. package/dist/cjs/api/resources/creditPools/client/Client.js +0 -204
  100. package/dist/cjs/api/resources/creditPools/client/index.d.ts +0 -1
  101. package/dist/cjs/api/resources/creditPools/index.d.ts +0 -1
  102. package/dist/cjs/api/resources/creditPools/index.js +0 -17
  103. package/dist/cjs/api/resources/pricingPlans/client/Client.d.ts +0 -72
  104. package/dist/cjs/api/resources/pricingPlans/client/Client.js +0 -305
  105. package/dist/cjs/api/resources/pricingPlans/client/index.d.ts +0 -1
  106. package/dist/cjs/api/resources/pricingPlans/index.d.ts +0 -1
  107. package/dist/cjs/api/resources/pricingPlans/index.js +0 -17
  108. package/dist/esm/api/resources/creditPools/client/Client.d.mts +0 -53
  109. package/dist/esm/api/resources/creditPools/client/Client.mjs +0 -167
  110. package/dist/esm/api/resources/creditPools/client/index.d.mts +0 -1
  111. package/dist/esm/api/resources/creditPools/client/index.mjs +0 -1
  112. package/dist/esm/api/resources/creditPools/index.d.mts +0 -1
  113. package/dist/esm/api/resources/creditPools/index.mjs +0 -1
  114. package/dist/esm/api/resources/pricingPlans/client/Client.d.mts +0 -72
  115. package/dist/esm/api/resources/pricingPlans/client/Client.mjs +0 -268
  116. package/dist/esm/api/resources/pricingPlans/client/index.d.mts +0 -1
  117. package/dist/esm/api/resources/pricingPlans/client/index.mjs +0 -1
  118. package/dist/esm/api/resources/pricingPlans/index.d.mts +0 -1
  119. package/dist/esm/api/resources/pricingPlans/index.mjs +0 -1
  120. /package/dist/cjs/api/resources/checkout/client/requests/{CreateRateCardCheckoutRequest.js → CreateSubscriptionCheckoutSessionRequest.js} +0 -0
  121. /package/dist/cjs/api/types/{CreateRateCardCheckoutResponse.js → CompleteSubscriptionCheckoutResponse.js} +0 -0
  122. /package/dist/esm/api/resources/checkout/client/requests/{CreateRateCardCheckoutRequest.mjs → CreateSubscriptionCheckoutSessionRequest.mjs} +0 -0
  123. /package/dist/esm/api/types/{CreateRateCardCheckoutResponse.mjs → CompleteSubscriptionCheckoutResponse.mjs} +0 -0
@@ -12,7 +12,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
12
12
  };
13
13
  import * as core from "../../../../core/index.mjs";
14
14
  import * as Lark from "../../../index.mjs";
15
- import { mergeHeaders } from "../../../../core/headers.mjs";
15
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
16
16
  import * as errors from "../../../../errors/index.mjs";
17
17
  export class UsageEvents {
18
18
  constructor(_options) {
@@ -41,7 +41,7 @@ export class UsageEvents {
41
41
  __createUsageEvent(request, requestOptions) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
43
  var _a, _b;
44
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
44
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
45
45
  const _response = yield core.fetcher({
46
46
  url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "usage-events"),
47
47
  method: "POST",
@@ -86,4 +86,78 @@ export class UsageEvents {
86
86
  }
87
87
  });
88
88
  }
89
+ /**
90
+ * @param {Lark.CreateUsageEventSummaryRequest} request
91
+ * @param {UsageEvents.RequestOptions} requestOptions - Request-specific configuration.
92
+ *
93
+ * @throws {@link Lark.UnprocessableEntityError}
94
+ *
95
+ * @example
96
+ * await client.usageEvents.createUsageEventSummary({
97
+ * event_name: "event_name",
98
+ * subject_id: "subject_id",
99
+ * period: {
100
+ * start: "2024-01-15T09:30:00Z",
101
+ * end: "2024-01-15T09:30:00Z"
102
+ * },
103
+ * aggregation_type: "sum"
104
+ * })
105
+ */
106
+ createUsageEventSummary(request, requestOptions) {
107
+ return core.HttpResponsePromise.fromPromise(this.__createUsageEventSummary(request, requestOptions));
108
+ }
109
+ __createUsageEventSummary(request, requestOptions) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ var _a, _b;
112
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
113
+ const _response = yield core.fetcher({
114
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "usage-events/summary"),
115
+ method: "POST",
116
+ headers: _headers,
117
+ contentType: "application/json",
118
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
119
+ requestType: "json",
120
+ body: request,
121
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
122
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
123
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
124
+ });
125
+ if (_response.ok) {
126
+ return { data: _response.body, rawResponse: _response.rawResponse };
127
+ }
128
+ if (_response.error.reason === "status-code") {
129
+ switch (_response.error.statusCode) {
130
+ case 422:
131
+ throw new Lark.UnprocessableEntityError(_response.error.body, _response.rawResponse);
132
+ default:
133
+ throw new errors.LarkError({
134
+ statusCode: _response.error.statusCode,
135
+ body: _response.error.body,
136
+ rawResponse: _response.rawResponse,
137
+ });
138
+ }
139
+ }
140
+ switch (_response.error.reason) {
141
+ case "non-json":
142
+ throw new errors.LarkError({
143
+ statusCode: _response.error.statusCode,
144
+ body: _response.error.rawBody,
145
+ rawResponse: _response.rawResponse,
146
+ });
147
+ case "timeout":
148
+ throw new errors.LarkTimeoutError("Timeout exceeded when calling POST /usage-events/summary.");
149
+ case "unknown":
150
+ throw new errors.LarkError({
151
+ message: _response.error.errorMessage,
152
+ rawResponse: _response.rawResponse,
153
+ });
154
+ }
155
+ });
156
+ }
157
+ _getCustomAuthorizationHeaders() {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
160
+ return { "X-API-Key": apiKeyValue };
161
+ });
162
+ }
89
163
  }
@@ -18,5 +18,5 @@ export interface CreateUsageEventRequest {
18
18
  event_name: string;
19
19
  subject_id: string;
20
20
  timestamp: string;
21
- data: Record<string, string>;
21
+ data: Record<string, unknown>;
22
22
  }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Lark from "../../../../index.mjs";
5
+ /**
6
+ * @example
7
+ * {
8
+ * event_name: "event_name",
9
+ * subject_id: "subject_id",
10
+ * period: {
11
+ * start: "2024-01-15T09:30:00Z",
12
+ * end: "2024-01-15T09:30:00Z"
13
+ * },
14
+ * aggregation_type: "sum"
15
+ * }
16
+ */
17
+ export interface CreateUsageEventSummaryRequest {
18
+ event_name: string;
19
+ subject_id: string;
20
+ period: Lark.Period;
21
+ aggregation_type: CreateUsageEventSummaryRequest.AggregationType;
22
+ }
23
+ export declare namespace CreateUsageEventSummaryRequest {
24
+ type AggregationType = "sum" | "count" | "max";
25
+ const AggregationType: {
26
+ readonly Sum: "sum";
27
+ readonly Count: "count";
28
+ readonly Max: "max";
29
+ };
30
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export var CreateUsageEventSummaryRequest;
5
+ (function (CreateUsageEventSummaryRequest) {
6
+ CreateUsageEventSummaryRequest.AggregationType = {
7
+ Sum: "sum",
8
+ Count: "count",
9
+ Max: "max",
10
+ };
11
+ })(CreateUsageEventSummaryRequest || (CreateUsageEventSummaryRequest = {}));
@@ -1 +1,2 @@
1
1
  export { type CreateUsageEventRequest } from "./CreateUsageEventRequest.mjs";
2
+ export { type CreateUsageEventSummaryRequest } from "./CreateUsageEventSummaryRequest.mjs";
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Lark from "../index.mjs";
5
+ export interface CompleteSubscriptionCheckoutResponse {
6
+ id: string;
7
+ amount: Lark.Amount;
8
+ }
@@ -3,6 +3,8 @@
3
3
  */
4
4
  import * as Lark from "../index.mjs";
5
5
  export interface CreateDimensionalUsageBasedRateInterface {
6
+ /** Code of this rate to be used for overrides and external reference. */
7
+ code: string;
6
8
  name: string;
7
9
  description?: string;
8
10
  included_units?: number;
@@ -7,5 +7,6 @@ export interface CreateFixedRateInterface {
7
7
  description?: string;
8
8
  price?: Lark.Price;
9
9
  credit_grants?: Lark.CreateCreditGrantInterface[];
10
+ /** Code of this rate to be used for setting quantity. */
10
11
  quantity_code?: string;
11
12
  }
@@ -6,5 +6,6 @@ export interface CreatePricingMetricInterface {
6
6
  name: string;
7
7
  event_name: string;
8
8
  aggregation: Lark.Aggregation;
9
+ /** Unit of the value computed by the pricing metric. */
9
10
  unit: string;
10
11
  }
@@ -3,6 +3,8 @@
3
3
  */
4
4
  import * as Lark from "../index.mjs";
5
5
  export interface CreateSimpleUsageBasedRateInterface {
6
+ /** Code of this rate to be used for overrides and external reference. */
7
+ code: string;
6
8
  name: string;
7
9
  description?: string;
8
10
  price?: Lark.Price;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Lark from "../index.mjs";
5
+ export interface CreateSubscriptionCheckoutSessionResponse {
6
+ id: string;
7
+ amount: Lark.Amount;
8
+ payment_intent_client_secret?: string;
9
+ setup_intent_client_secret?: string;
10
+ }
@@ -1,6 +1,4 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export interface CreateRateCardCheckoutResponse {
5
- url: string;
6
- }
4
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Lark from "../index.mjs";
5
+ export interface CreateUsageEventSummaryResponse {
6
+ event_name: string;
7
+ subject_id: string;
8
+ value?: number;
9
+ period: Lark.Period;
10
+ }
@@ -1,6 +1,4 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export interface CreateRateCardCheckoutResponse {
5
- url: string;
6
- }
4
+ export {};
@@ -2,5 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface CustomAggregationPricingMetricInterface {
5
+ /** SQL to compute the pricing metric. */
5
6
  sql: string;
6
7
  }
@@ -3,6 +3,9 @@
3
3
  */
4
4
  import * as Lark from "../index.mjs";
5
5
  export interface DimensionalUsageBasedRateInterface {
6
+ id: string;
7
+ /** Code of this rate to be used for overrides and external reference. */
8
+ code: string;
6
9
  name: string;
7
10
  description: string;
8
11
  included_units: number;
@@ -3,9 +3,11 @@
3
3
  */
4
4
  import * as Lark from "../index.mjs";
5
5
  export interface FixedRateInterface {
6
+ id: string;
6
7
  name: string;
7
8
  description: string;
8
9
  price?: Lark.Price;
9
10
  credit_grants: Lark.CreditGrantInterface[];
11
+ /** Code of this rate to be used for setting quantity. */
10
12
  quantity_code?: string;
11
13
  }
@@ -2,5 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface LastAggregationPricingMetricInterface {
5
+ /** Field to get the last value of. */
5
6
  value_field: string;
6
7
  }
@@ -2,5 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface MaxAggregationPricingMetricInterface {
5
+ /** Field to get the max value of. */
5
6
  value_field: string;
6
7
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface Period {
5
+ inclusive_start?: boolean;
6
+ inclusive_end?: boolean;
7
+ start: string;
8
+ end: string;
9
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -3,8 +3,10 @@
3
3
  */
4
4
  import * as Lark from "../index.mjs";
5
5
  export interface PricingMetricInterface {
6
+ id: string;
6
7
  name: string;
7
8
  event_name: string;
8
9
  aggregation: Lark.Aggregation;
10
+ /** Unit of the value computed by the pricing metric. */
9
11
  unit: string;
10
12
  }
@@ -3,6 +3,9 @@
3
3
  */
4
4
  import * as Lark from "../index.mjs";
5
5
  export interface SimpleUsageBasedRateInterface {
6
+ id: string;
7
+ /** Code of this rate to be used for overrides and external reference. */
8
+ code: string;
6
9
  name: string;
7
10
  description: string;
8
11
  price?: Lark.Price;
@@ -2,5 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface SumAggregationPricingMetricInterface {
5
+ /** Field to sum over. */
5
6
  value_field: string;
6
7
  }
@@ -1,6 +1,7 @@
1
1
  export * from "./Amount.mjs";
2
2
  export * from "./CheckFeatureAccessRequest.mjs";
3
3
  export * from "./CheckFeatureAccessResponse.mjs";
4
+ export * from "./CompleteSubscriptionCheckoutResponse.mjs";
4
5
  export * from "./CountAggregationPricingMetricInterface.mjs";
5
6
  export * from "./CreateCreditGrantInterfaceExpiration.mjs";
6
7
  export * from "./CreateCreditGrantInterface.mjs";
@@ -13,13 +14,14 @@ export * from "./CreatePricingMatrixCellInterface.mjs";
13
14
  export * from "./CreatePricingMatrixInterface.mjs";
14
15
  export * from "./Aggregation.mjs";
15
16
  export * from "./CreatePricingMetricInterface.mjs";
16
- export * from "./CreateRateCardCheckoutResponse.mjs";
17
17
  export * from "./CreateRateCardResponseUsageBasedRatesItem.mjs";
18
18
  export * from "./CreateRateCardResponse.mjs";
19
19
  export * from "./CreateRateCardVersionResponseUsageBasedRatesItem.mjs";
20
20
  export * from "./CreateRateCardVersionResponse.mjs";
21
21
  export * from "./CreateSimpleUsageBasedRateInterface.mjs";
22
22
  export * from "./CreateSubjectResponse.mjs";
23
+ export * from "./CreateSubscriptionCheckoutSessionResponse.mjs";
24
+ export * from "./CreateUsageEventSummaryResponse.mjs";
23
25
  export * from "./CreditGrantDateTimeExpirationInterface.mjs";
24
26
  export * from "./CreditGrantDateTimeExpirationResource.mjs";
25
27
  export * from "./CreditGrantDurationExpirationInterface.mjs";
@@ -54,6 +56,7 @@ export * from "./ListSubjectsResponse.mjs";
54
56
  export * from "./ListSubscriptionsResponse.mjs";
55
57
  export * from "./MaxAggregationPricingMetricInterface.mjs";
56
58
  export * from "./PackagePrice.mjs";
59
+ export * from "./Period.mjs";
57
60
  export * from "./PricingMatrixCellInterface.mjs";
58
61
  export * from "./PricingMatrixInterface.mjs";
59
62
  export * from "./PricingMetricInterface.mjs";
@@ -1,6 +1,7 @@
1
1
  export * from "./Amount.mjs";
2
2
  export * from "./CheckFeatureAccessRequest.mjs";
3
3
  export * from "./CheckFeatureAccessResponse.mjs";
4
+ export * from "./CompleteSubscriptionCheckoutResponse.mjs";
4
5
  export * from "./CountAggregationPricingMetricInterface.mjs";
5
6
  export * from "./CreateCreditGrantInterfaceExpiration.mjs";
6
7
  export * from "./CreateCreditGrantInterface.mjs";
@@ -13,13 +14,14 @@ export * from "./CreatePricingMatrixCellInterface.mjs";
13
14
  export * from "./CreatePricingMatrixInterface.mjs";
14
15
  export * from "./Aggregation.mjs";
15
16
  export * from "./CreatePricingMetricInterface.mjs";
16
- export * from "./CreateRateCardCheckoutResponse.mjs";
17
17
  export * from "./CreateRateCardResponseUsageBasedRatesItem.mjs";
18
18
  export * from "./CreateRateCardResponse.mjs";
19
19
  export * from "./CreateRateCardVersionResponseUsageBasedRatesItem.mjs";
20
20
  export * from "./CreateRateCardVersionResponse.mjs";
21
21
  export * from "./CreateSimpleUsageBasedRateInterface.mjs";
22
22
  export * from "./CreateSubjectResponse.mjs";
23
+ export * from "./CreateSubscriptionCheckoutSessionResponse.mjs";
24
+ export * from "./CreateUsageEventSummaryResponse.mjs";
23
25
  export * from "./CreditGrantDateTimeExpirationInterface.mjs";
24
26
  export * from "./CreditGrantDateTimeExpirationResource.mjs";
25
27
  export * from "./CreditGrantDurationExpirationInterface.mjs";
@@ -54,6 +56,7 @@ export * from "./ListSubjectsResponse.mjs";
54
56
  export * from "./ListSubscriptionsResponse.mjs";
55
57
  export * from "./MaxAggregationPricingMetricInterface.mjs";
56
58
  export * from "./PackagePrice.mjs";
59
+ export * from "./Period.mjs";
57
60
  export * from "./PricingMatrixCellInterface.mjs";
58
61
  export * from "./PricingMatrixInterface.mjs";
59
62
  export * from "./PricingMetricInterface.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.5";
1
+ export declare const SDK_VERSION = "0.0.6";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.5";
1
+ export const SDK_VERSION = "0.0.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lark-billing",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "private": false,
5
5
  "repository": "github:fern-demo/lark-ts-sdk",
6
6
  "type": "commonjs",