lark-billing 0.1.1 → 0.1.2
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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/subscriptions/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/subscriptions/client/Client.js +4 -1
- package/dist/cjs/api/resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.d.ts +1 -0
- package/dist/cjs/api/resources/usageEvents/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/usageEvents/client/Client.js +2 -2
- package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.ts +2 -2
- package/dist/cjs/api/types/ChangeSubscriptionRateCardResponse.d.ts +7 -0
- package/dist/cjs/api/types/ChangeSubscriptionRateCardResponse.js +5 -0
- package/dist/cjs/api/types/CheckoutAction.d.ts +7 -0
- package/dist/cjs/api/types/CheckoutAction.js +5 -0
- package/dist/cjs/api/types/RequiresActionResponse.d.ts +7 -0
- package/dist/cjs/api/types/RequiresActionResponse.js +5 -0
- package/dist/cjs/api/types/Result.d.ts +13 -0
- package/dist/cjs/api/types/Result.js +5 -0
- package/dist/cjs/api/types/SuccessResponse.d.ts +7 -0
- package/dist/cjs/api/types/SuccessResponse.js +5 -0
- package/dist/cjs/api/types/index.d.ts +5 -0
- package/dist/cjs/api/types/index.js +5 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/subscriptions/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/subscriptions/client/Client.mjs +4 -1
- package/dist/esm/api/resources/subscriptions/client/requests/ChangeSubscriptionRateCardRequest.d.mts +1 -0
- package/dist/esm/api/resources/usageEvents/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/usageEvents/client/Client.mjs +2 -2
- package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.mts +2 -2
- package/dist/esm/api/types/ChangeSubscriptionRateCardResponse.d.mts +7 -0
- package/dist/esm/api/types/ChangeSubscriptionRateCardResponse.mjs +4 -0
- package/dist/esm/api/types/CheckoutAction.d.mts +7 -0
- package/dist/esm/api/types/CheckoutAction.mjs +4 -0
- package/dist/esm/api/types/RequiresActionResponse.d.mts +7 -0
- package/dist/esm/api/types/RequiresActionResponse.mjs +4 -0
- package/dist/esm/api/types/Result.d.mts +13 -0
- package/dist/esm/api/types/Result.mjs +4 -0
- package/dist/esm/api/types/SuccessResponse.d.mts +7 -0
- package/dist/esm/api/types/SuccessResponse.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +5 -0
- package/dist/esm/api/types/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +3 -3
package/dist/cjs/Client.js
CHANGED
|
@@ -53,8 +53,8 @@ class LarkClient {
|
|
|
53
53
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
54
54
|
"X-Fern-Language": "JavaScript",
|
|
55
55
|
"X-Fern-SDK-Name": "lark-billing",
|
|
56
|
-
"X-Fern-SDK-Version": "0.1.
|
|
57
|
-
"User-Agent": "lark-billing/0.1.
|
|
56
|
+
"X-Fern-SDK-Version": "0.1.2",
|
|
57
|
+
"User-Agent": "lark-billing/0.1.2",
|
|
58
58
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
59
59
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
60
60
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -93,7 +93,7 @@ export declare class Subscriptions {
|
|
|
93
93
|
* rate_card_id: "rc_jQK2n0wutCj6bBcAIrL6o07g"
|
|
94
94
|
* })
|
|
95
95
|
*/
|
|
96
|
-
changeSubscriptionRateCard(subscriptionId: string, request: Lark.ChangeSubscriptionRateCardRequest, requestOptions?: Subscriptions.RequestOptions): core.HttpResponsePromise<Lark.
|
|
96
|
+
changeSubscriptionRateCard(subscriptionId: string, request: Lark.ChangeSubscriptionRateCardRequest, requestOptions?: Subscriptions.RequestOptions): core.HttpResponsePromise<Lark.ChangeSubscriptionRateCardResponse>;
|
|
97
97
|
private __changeSubscriptionRateCard;
|
|
98
98
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
99
99
|
"X-API-Key": string;
|
|
@@ -340,7 +340,10 @@ class Subscriptions {
|
|
|
340
340
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
341
341
|
});
|
|
342
342
|
if (_response.ok) {
|
|
343
|
-
return {
|
|
343
|
+
return {
|
|
344
|
+
data: _response.body,
|
|
345
|
+
rawResponse: _response.rawResponse,
|
|
346
|
+
};
|
|
344
347
|
}
|
|
345
348
|
if (_response.error.reason === "status-code") {
|
|
346
349
|
switch (_response.error.statusCode) {
|
|
@@ -37,10 +37,10 @@ export declare class UsageEvents {
|
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* await client.usageEvents.createUsageEvent({
|
|
40
|
-
* idempotency_key: "
|
|
40
|
+
* idempotency_key: "c49b13a8-b0f3-4d61-8fa6-c5e779301682",
|
|
41
41
|
* event_name: "compute_hours",
|
|
42
42
|
* subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
43
|
-
* timestamp: "2025-11-
|
|
43
|
+
* timestamp: "2025-11-06T00:08:40Z",
|
|
44
44
|
* data: {
|
|
45
45
|
* "compute_hours": 100,
|
|
46
46
|
* "instance_type": "t2.micro",
|
|
@@ -63,10 +63,10 @@ class UsageEvents {
|
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
65
|
* await client.usageEvents.createUsageEvent({
|
|
66
|
-
* idempotency_key: "
|
|
66
|
+
* idempotency_key: "c49b13a8-b0f3-4d61-8fa6-c5e779301682",
|
|
67
67
|
* event_name: "compute_hours",
|
|
68
68
|
* subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
69
|
-
* timestamp: "2025-11-
|
|
69
|
+
* timestamp: "2025-11-06T00:08:40Z",
|
|
70
70
|
* data: {
|
|
71
71
|
* "compute_hours": 100,
|
|
72
72
|
* "instance_type": "t2.micro",
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* idempotency_key: "
|
|
7
|
+
* idempotency_key: "c49b13a8-b0f3-4d61-8fa6-c5e779301682",
|
|
8
8
|
* event_name: "compute_hours",
|
|
9
9
|
* subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
10
|
-
* timestamp: "2025-11-
|
|
10
|
+
* timestamp: "2025-11-06T00:08:40Z",
|
|
11
11
|
* data: {
|
|
12
12
|
* "compute_hours": 100,
|
|
13
13
|
* "instance_type": "t2.micro",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Lark from "../index.js";
|
|
5
|
+
export type Result = Lark.Result.RequiresAction | Lark.Result.Success;
|
|
6
|
+
export declare namespace Result {
|
|
7
|
+
interface RequiresAction extends Lark.RequiresActionResponse {
|
|
8
|
+
type: "requires_action";
|
|
9
|
+
}
|
|
10
|
+
interface Success extends Lark.SuccessResponse {
|
|
11
|
+
type: "success";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from "./ActiveSubscription.js";
|
|
2
2
|
export * from "./Amount.js";
|
|
3
3
|
export * from "./BillingStateResponse.js";
|
|
4
|
+
export * from "./Result.js";
|
|
5
|
+
export * from "./ChangeSubscriptionRateCardResponse.js";
|
|
6
|
+
export * from "./CheckoutAction.js";
|
|
4
7
|
export * from "./CountAggregationPricingMetricInterface.js";
|
|
5
8
|
export * from "./CountAggregationPricingMetricResource.js";
|
|
6
9
|
export * from "./CreateCustomerPortalSessionResponse.js";
|
|
@@ -32,9 +35,11 @@ export * from "./PricingMetricResource.js";
|
|
|
32
35
|
export * from "./PricingMetricSummaryResource.js";
|
|
33
36
|
export * from "./RateCardResourceUsageBasedRatesItem.js";
|
|
34
37
|
export * from "./RateCardResource.js";
|
|
38
|
+
export * from "./RequiresActionResponse.js";
|
|
35
39
|
export * from "./SimpleUsageBasedRateInterface.js";
|
|
36
40
|
export * from "./SubjectResource.js";
|
|
37
41
|
export * from "./SubscriptionResource.js";
|
|
42
|
+
export * from "./SuccessResponse.js";
|
|
38
43
|
export * from "./SumAggregationPricingMetricInterface.js";
|
|
39
44
|
export * from "./SumAggregationPricingMetricResource.js";
|
|
40
45
|
export * from "./UsageDataForRate.js";
|
|
@@ -17,6 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./ActiveSubscription.js"), exports);
|
|
18
18
|
__exportStar(require("./Amount.js"), exports);
|
|
19
19
|
__exportStar(require("./BillingStateResponse.js"), exports);
|
|
20
|
+
__exportStar(require("./Result.js"), exports);
|
|
21
|
+
__exportStar(require("./ChangeSubscriptionRateCardResponse.js"), exports);
|
|
22
|
+
__exportStar(require("./CheckoutAction.js"), exports);
|
|
20
23
|
__exportStar(require("./CountAggregationPricingMetricInterface.js"), exports);
|
|
21
24
|
__exportStar(require("./CountAggregationPricingMetricResource.js"), exports);
|
|
22
25
|
__exportStar(require("./CreateCustomerPortalSessionResponse.js"), exports);
|
|
@@ -48,9 +51,11 @@ __exportStar(require("./PricingMetricResource.js"), exports);
|
|
|
48
51
|
__exportStar(require("./PricingMetricSummaryResource.js"), exports);
|
|
49
52
|
__exportStar(require("./RateCardResourceUsageBasedRatesItem.js"), exports);
|
|
50
53
|
__exportStar(require("./RateCardResource.js"), exports);
|
|
54
|
+
__exportStar(require("./RequiresActionResponse.js"), exports);
|
|
51
55
|
__exportStar(require("./SimpleUsageBasedRateInterface.js"), exports);
|
|
52
56
|
__exportStar(require("./SubjectResource.js"), exports);
|
|
53
57
|
__exportStar(require("./SubscriptionResource.js"), exports);
|
|
58
|
+
__exportStar(require("./SuccessResponse.js"), exports);
|
|
54
59
|
__exportStar(require("./SumAggregationPricingMetricInterface.js"), exports);
|
|
55
60
|
__exportStar(require("./SumAggregationPricingMetricResource.js"), exports);
|
|
56
61
|
__exportStar(require("./UsageDataForRate.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.2";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -17,8 +17,8 @@ export class LarkClient {
|
|
|
17
17
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
18
18
|
"X-Fern-Language": "JavaScript",
|
|
19
19
|
"X-Fern-SDK-Name": "lark-billing",
|
|
20
|
-
"X-Fern-SDK-Version": "0.1.
|
|
21
|
-
"User-Agent": "lark-billing/0.1.
|
|
20
|
+
"X-Fern-SDK-Version": "0.1.2",
|
|
21
|
+
"User-Agent": "lark-billing/0.1.2",
|
|
22
22
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
23
23
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
24
24
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -93,7 +93,7 @@ export declare class Subscriptions {
|
|
|
93
93
|
* rate_card_id: "rc_jQK2n0wutCj6bBcAIrL6o07g"
|
|
94
94
|
* })
|
|
95
95
|
*/
|
|
96
|
-
changeSubscriptionRateCard(subscriptionId: string, request: Lark.ChangeSubscriptionRateCardRequest, requestOptions?: Subscriptions.RequestOptions): core.HttpResponsePromise<Lark.
|
|
96
|
+
changeSubscriptionRateCard(subscriptionId: string, request: Lark.ChangeSubscriptionRateCardRequest, requestOptions?: Subscriptions.RequestOptions): core.HttpResponsePromise<Lark.ChangeSubscriptionRateCardResponse>;
|
|
97
97
|
private __changeSubscriptionRateCard;
|
|
98
98
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
99
99
|
"X-API-Key": string;
|
|
@@ -304,7 +304,10 @@ export class Subscriptions {
|
|
|
304
304
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
305
305
|
});
|
|
306
306
|
if (_response.ok) {
|
|
307
|
-
return {
|
|
307
|
+
return {
|
|
308
|
+
data: _response.body,
|
|
309
|
+
rawResponse: _response.rawResponse,
|
|
310
|
+
};
|
|
308
311
|
}
|
|
309
312
|
if (_response.error.reason === "status-code") {
|
|
310
313
|
switch (_response.error.statusCode) {
|
|
@@ -37,10 +37,10 @@ export declare class UsageEvents {
|
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* await client.usageEvents.createUsageEvent({
|
|
40
|
-
* idempotency_key: "
|
|
40
|
+
* idempotency_key: "c49b13a8-b0f3-4d61-8fa6-c5e779301682",
|
|
41
41
|
* event_name: "compute_hours",
|
|
42
42
|
* subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
43
|
-
* timestamp: "2025-11-
|
|
43
|
+
* timestamp: "2025-11-06T00:08:40Z",
|
|
44
44
|
* data: {
|
|
45
45
|
* "compute_hours": 100,
|
|
46
46
|
* "instance_type": "t2.micro",
|
|
@@ -27,10 +27,10 @@ export class UsageEvents {
|
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* await client.usageEvents.createUsageEvent({
|
|
30
|
-
* idempotency_key: "
|
|
30
|
+
* idempotency_key: "c49b13a8-b0f3-4d61-8fa6-c5e779301682",
|
|
31
31
|
* event_name: "compute_hours",
|
|
32
32
|
* subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
33
|
-
* timestamp: "2025-11-
|
|
33
|
+
* timestamp: "2025-11-06T00:08:40Z",
|
|
34
34
|
* data: {
|
|
35
35
|
* "compute_hours": 100,
|
|
36
36
|
* "instance_type": "t2.micro",
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* idempotency_key: "
|
|
7
|
+
* idempotency_key: "c49b13a8-b0f3-4d61-8fa6-c5e779301682",
|
|
8
8
|
* event_name: "compute_hours",
|
|
9
9
|
* subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
10
|
-
* timestamp: "2025-11-
|
|
10
|
+
* timestamp: "2025-11-06T00:08:40Z",
|
|
11
11
|
* data: {
|
|
12
12
|
* "compute_hours": 100,
|
|
13
13
|
* "instance_type": "t2.micro",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Lark from "../index.mjs";
|
|
5
|
+
export type Result = Lark.Result.RequiresAction | Lark.Result.Success;
|
|
6
|
+
export declare namespace Result {
|
|
7
|
+
interface RequiresAction extends Lark.RequiresActionResponse {
|
|
8
|
+
type: "requires_action";
|
|
9
|
+
}
|
|
10
|
+
interface Success extends Lark.SuccessResponse {
|
|
11
|
+
type: "success";
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from "./ActiveSubscription.mjs";
|
|
2
2
|
export * from "./Amount.mjs";
|
|
3
3
|
export * from "./BillingStateResponse.mjs";
|
|
4
|
+
export * from "./Result.mjs";
|
|
5
|
+
export * from "./ChangeSubscriptionRateCardResponse.mjs";
|
|
6
|
+
export * from "./CheckoutAction.mjs";
|
|
4
7
|
export * from "./CountAggregationPricingMetricInterface.mjs";
|
|
5
8
|
export * from "./CountAggregationPricingMetricResource.mjs";
|
|
6
9
|
export * from "./CreateCustomerPortalSessionResponse.mjs";
|
|
@@ -32,9 +35,11 @@ export * from "./PricingMetricResource.mjs";
|
|
|
32
35
|
export * from "./PricingMetricSummaryResource.mjs";
|
|
33
36
|
export * from "./RateCardResourceUsageBasedRatesItem.mjs";
|
|
34
37
|
export * from "./RateCardResource.mjs";
|
|
38
|
+
export * from "./RequiresActionResponse.mjs";
|
|
35
39
|
export * from "./SimpleUsageBasedRateInterface.mjs";
|
|
36
40
|
export * from "./SubjectResource.mjs";
|
|
37
41
|
export * from "./SubscriptionResource.mjs";
|
|
42
|
+
export * from "./SuccessResponse.mjs";
|
|
38
43
|
export * from "./SumAggregationPricingMetricInterface.mjs";
|
|
39
44
|
export * from "./SumAggregationPricingMetricResource.mjs";
|
|
40
45
|
export * from "./UsageDataForRate.mjs";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from "./ActiveSubscription.mjs";
|
|
2
2
|
export * from "./Amount.mjs";
|
|
3
3
|
export * from "./BillingStateResponse.mjs";
|
|
4
|
+
export * from "./Result.mjs";
|
|
5
|
+
export * from "./ChangeSubscriptionRateCardResponse.mjs";
|
|
6
|
+
export * from "./CheckoutAction.mjs";
|
|
4
7
|
export * from "./CountAggregationPricingMetricInterface.mjs";
|
|
5
8
|
export * from "./CountAggregationPricingMetricResource.mjs";
|
|
6
9
|
export * from "./CreateCustomerPortalSessionResponse.mjs";
|
|
@@ -32,9 +35,11 @@ export * from "./PricingMetricResource.mjs";
|
|
|
32
35
|
export * from "./PricingMetricSummaryResource.mjs";
|
|
33
36
|
export * from "./RateCardResourceUsageBasedRatesItem.mjs";
|
|
34
37
|
export * from "./RateCardResource.mjs";
|
|
38
|
+
export * from "./RequiresActionResponse.mjs";
|
|
35
39
|
export * from "./SimpleUsageBasedRateInterface.mjs";
|
|
36
40
|
export * from "./SubjectResource.mjs";
|
|
37
41
|
export * from "./SubscriptionResource.mjs";
|
|
42
|
+
export * from "./SuccessResponse.mjs";
|
|
38
43
|
export * from "./SumAggregationPricingMetricInterface.mjs";
|
|
39
44
|
export * from "./SumAggregationPricingMetricResource.mjs";
|
|
40
45
|
export * from "./UsageDataForRate.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.2";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.1.
|
|
1
|
+
export const SDK_VERSION = "0.1.2";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -303,10 +303,10 @@ await client.rateCards.getRateCard("rate_card_id");
|
|
|
303
303
|
|
|
304
304
|
```typescript
|
|
305
305
|
await client.usageEvents.createUsageEvent({
|
|
306
|
-
idempotency_key: "
|
|
306
|
+
idempotency_key: "c49b13a8-b0f3-4d61-8fa6-c5e779301682",
|
|
307
307
|
event_name: "compute_hours",
|
|
308
308
|
subject_id: "subj_VyX6Q96h5avMho8O7QWlKeXE",
|
|
309
|
-
timestamp: "2025-11-
|
|
309
|
+
timestamp: "2025-11-06T00:08:40Z",
|
|
310
310
|
data: {
|
|
311
311
|
compute_hours: 100,
|
|
312
312
|
instance_type: "t2.micro",
|
|
@@ -556,7 +556,7 @@ await client.subscriptions.cancelSubscription("subscription_id");
|
|
|
556
556
|
</dl>
|
|
557
557
|
</details>
|
|
558
558
|
|
|
559
|
-
<details><summary><code>client.subscriptions.<a href="/src/api/resources/subscriptions/client/Client.ts">changeSubscriptionRateCard</a>(subscriptionId, { ...params }) -> Lark.
|
|
559
|
+
<details><summary><code>client.subscriptions.<a href="/src/api/resources/subscriptions/client/Client.ts">changeSubscriptionRateCard</a>(subscriptionId, { ...params }) -> Lark.ChangeSubscriptionRateCardResponse</code></summary>
|
|
560
560
|
<dl>
|
|
561
561
|
<dd>
|
|
562
562
|
|