@openmeter/sdk 1.0.0-beta.212 → 1.0.0-beta.214
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/src/client/addons.cjs +105 -0
- package/dist/cjs/src/client/addons.d.cts +152 -0
- package/dist/cjs/src/client/addons.js.map +1 -0
- package/dist/cjs/src/client/billing.cjs +11 -3
- package/dist/cjs/src/client/billing.d.cts +32 -59
- package/dist/cjs/src/client/billing.js.map +1 -1
- package/dist/cjs/src/client/customers.cjs +17 -0
- package/dist/cjs/src/client/customers.d.cts +11 -0
- package/dist/cjs/src/client/customers.js.map +1 -1
- package/dist/cjs/src/client/events.cjs +67 -20
- package/dist/cjs/src/client/events.d.cts +21 -5
- package/dist/cjs/src/client/events.js.map +1 -1
- package/dist/cjs/src/client/index.cjs +6 -0
- package/dist/cjs/src/client/index.d.cts +4 -0
- package/dist/cjs/src/client/index.js.map +1 -1
- package/dist/cjs/src/client/meters.cjs +19 -0
- package/dist/cjs/src/client/meters.d.cts +24 -0
- package/dist/cjs/src/client/meters.js.map +1 -1
- package/dist/cjs/src/client/notifications.d.cts +214 -36
- package/dist/cjs/src/client/plans.cjs +127 -50
- package/dist/cjs/src/client/plans.d.cts +129 -24
- package/dist/cjs/src/client/plans.js.map +1 -1
- package/dist/cjs/src/client/schemas.d.cts +1943 -1350
- package/dist/cjs/src/client/subscription-addons.cjs +70 -0
- package/dist/cjs/src/client/subscription-addons.d.cts +123 -0
- package/dist/cjs/src/client/subscription-addons.js.map +1 -0
- package/dist/cjs/src/client/subscriptions.cjs +16 -0
- package/dist/cjs/src/client/subscriptions.d.cts +23 -0
- package/dist/cjs/src/client/subscriptions.js.map +1 -1
- package/dist/cjs/src/portal/index.cjs +35 -6
- package/dist/cjs/src/portal/index.js.map +1 -1
- package/dist/cjs/src/zod/index.cjs +11134 -0
- package/dist/cjs/src/zod/index.d.cts +18506 -0
- package/dist/cjs/src/zod/index.js.map +1 -0
- package/dist/cjs/tsconfig.4615b2f8.tsbuildinfo +1 -0
- package/dist/cjs/tsconfig.9c445eac.tsbuildinfo +1 -0
- package/dist/src/client/addons.d.ts +152 -0
- package/dist/src/client/addons.js +101 -0
- package/dist/src/client/addons.js.map +1 -0
- package/dist/src/client/billing.d.ts +32 -59
- package/dist/src/client/billing.js +11 -3
- package/dist/src/client/billing.js.map +1 -1
- package/dist/src/client/customers.d.ts +11 -0
- package/dist/src/client/customers.js +17 -0
- package/dist/src/client/customers.js.map +1 -1
- package/dist/src/client/events.d.ts +21 -5
- package/dist/src/client/events.js +67 -17
- package/dist/src/client/events.js.map +1 -1
- package/dist/src/client/index.d.ts +4 -0
- package/dist/src/client/index.js +6 -0
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/meters.d.ts +24 -0
- package/dist/src/client/meters.js +19 -0
- package/dist/src/client/meters.js.map +1 -1
- package/dist/src/client/notifications.d.ts +214 -36
- package/dist/src/client/plans.d.ts +129 -24
- package/dist/src/client/plans.js +124 -48
- package/dist/src/client/plans.js.map +1 -1
- package/dist/src/client/schemas.d.ts +1943 -1350
- package/dist/src/client/subscription-addons.d.ts +123 -0
- package/dist/src/client/subscription-addons.js +66 -0
- package/dist/src/client/subscription-addons.js.map +1 -0
- package/dist/src/client/subscriptions.d.ts +23 -0
- package/dist/src/client/subscriptions.js +16 -0
- package/dist/src/client/subscriptions.js.map +1 -1
- package/dist/src/portal/index.js +1 -2
- package/dist/src/portal/index.js.map +1 -1
- package/dist/src/zod/index.d.ts +18506 -0
- package/dist/src/zod/index.js +11108 -0
- package/dist/src/zod/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/orval.config.ts +35 -0
- package/package.json +30 -16
- package/dist/cjs/tsconfig.065c79dd.tsbuildinfo +0 -1
- package/dist/cjs/tsconfig.9b7a0781.tsbuildinfo +0 -1
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Plans = void 0;
|
|
3
|
+
exports.PlanAddons = exports.Plans = void 0;
|
|
4
4
|
const utils_js_1 = require("./utils.cjs");
|
|
5
|
+
/**
|
|
6
|
+
* Plans
|
|
7
|
+
* Manage customer subscription plans and addon assignments.
|
|
8
|
+
*/
|
|
5
9
|
class Plans {
|
|
6
10
|
client;
|
|
11
|
+
addons;
|
|
7
12
|
constructor(client) {
|
|
8
13
|
this.client = client;
|
|
14
|
+
this.addons = new PlanAddons(this.client);
|
|
9
15
|
}
|
|
10
16
|
/**
|
|
11
17
|
* Create a plan
|
|
12
18
|
* @param plan - The plan to create
|
|
13
|
-
* @param
|
|
19
|
+
* @param options - Optional request options
|
|
14
20
|
* @returns The created plan
|
|
15
21
|
*/
|
|
16
22
|
async create(plan, options) {
|
|
@@ -21,17 +27,17 @@ class Plans {
|
|
|
21
27
|
return (0, utils_js_1.transformResponse)(resp);
|
|
22
28
|
}
|
|
23
29
|
/**
|
|
24
|
-
* Get a plan by ID
|
|
25
|
-
* @param
|
|
26
|
-
* @param
|
|
30
|
+
* Get a plan by ID
|
|
31
|
+
* @param planId - The ID of the plan to retrieve
|
|
32
|
+
* @param params - Optional query parameters
|
|
33
|
+
* @param options - Optional request options
|
|
27
34
|
* @returns The plan
|
|
28
35
|
*/
|
|
29
|
-
async get(
|
|
36
|
+
async get(planId, params, options) {
|
|
30
37
|
const resp = await this.client.GET('/api/v1/plans/{planId}', {
|
|
31
38
|
params: {
|
|
32
|
-
path: {
|
|
33
|
-
|
|
34
|
-
},
|
|
39
|
+
path: { planId },
|
|
40
|
+
query: params,
|
|
35
41
|
},
|
|
36
42
|
...options,
|
|
37
43
|
});
|
|
@@ -39,89 +45,160 @@ class Plans {
|
|
|
39
45
|
}
|
|
40
46
|
/**
|
|
41
47
|
* List plans
|
|
42
|
-
* @param
|
|
43
|
-
* @param
|
|
44
|
-
* @returns
|
|
48
|
+
* @param params - Optional parameters for listing plans
|
|
49
|
+
* @param options - Optional request options
|
|
50
|
+
* @returns A list of plans
|
|
45
51
|
*/
|
|
46
|
-
async list(
|
|
52
|
+
async list(params, options) {
|
|
47
53
|
const resp = await this.client.GET('/api/v1/plans', {
|
|
48
|
-
params: {
|
|
49
|
-
query,
|
|
50
|
-
},
|
|
54
|
+
params: { query: params },
|
|
51
55
|
...options,
|
|
52
56
|
});
|
|
53
57
|
return (0, utils_js_1.transformResponse)(resp);
|
|
54
58
|
}
|
|
55
59
|
/**
|
|
56
60
|
* Update a plan
|
|
57
|
-
* @param
|
|
58
|
-
* @param plan - The plan to update
|
|
59
|
-
* @param
|
|
61
|
+
* @param planId - The ID of the plan to update
|
|
62
|
+
* @param plan - The plan data to update
|
|
63
|
+
* @param options - Optional request options
|
|
60
64
|
* @returns The updated plan
|
|
61
65
|
*/
|
|
62
|
-
async update(
|
|
66
|
+
async update(planId, plan, options) {
|
|
63
67
|
const resp = await this.client.PUT('/api/v1/plans/{planId}', {
|
|
64
68
|
body: plan,
|
|
65
|
-
params: {
|
|
66
|
-
path: {
|
|
67
|
-
planId: id,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
69
|
+
params: { path: { planId } },
|
|
70
70
|
...options,
|
|
71
71
|
});
|
|
72
72
|
return (0, utils_js_1.transformResponse)(resp);
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
* Delete a plan
|
|
76
|
-
* @param
|
|
77
|
-
* @param
|
|
78
|
-
* @returns
|
|
75
|
+
* Delete a plan by ID
|
|
76
|
+
* @param planId - The ID of the plan to delete
|
|
77
|
+
* @param options - Optional request options
|
|
78
|
+
* @returns void or standard error response structure
|
|
79
79
|
*/
|
|
80
|
-
async delete(
|
|
80
|
+
async delete(planId, options) {
|
|
81
81
|
const resp = await this.client.DELETE('/api/v1/plans/{planId}', {
|
|
82
|
-
params: {
|
|
83
|
-
path: {
|
|
84
|
-
planId: id,
|
|
85
|
-
},
|
|
86
|
-
},
|
|
82
|
+
params: { path: { planId } },
|
|
87
83
|
...options,
|
|
88
84
|
});
|
|
89
85
|
return (0, utils_js_1.transformResponse)(resp);
|
|
90
86
|
}
|
|
91
87
|
/**
|
|
92
88
|
* Archive a plan
|
|
93
|
-
* @param
|
|
94
|
-
* @param
|
|
89
|
+
* @param planId - The ID of the plan to archive
|
|
90
|
+
* @param options - Optional request options
|
|
95
91
|
* @returns The archived plan
|
|
96
92
|
*/
|
|
97
|
-
async archive(
|
|
93
|
+
async archive(planId, options) {
|
|
98
94
|
const resp = await this.client.POST('/api/v1/plans/{planId}/archive', {
|
|
99
|
-
params: {
|
|
100
|
-
path: {
|
|
101
|
-
planId: id,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
95
|
+
params: { path: { planId } },
|
|
104
96
|
...options,
|
|
105
97
|
});
|
|
106
98
|
return (0, utils_js_1.transformResponse)(resp);
|
|
107
99
|
}
|
|
108
100
|
/**
|
|
109
101
|
* Publish a plan
|
|
110
|
-
* @param
|
|
111
|
-
* @param
|
|
102
|
+
* @param planId - The ID of the plan to publish
|
|
103
|
+
* @param options - Optional request options
|
|
112
104
|
* @returns The published plan
|
|
113
105
|
*/
|
|
114
|
-
async publish(
|
|
106
|
+
async publish(planId, options) {
|
|
115
107
|
const resp = await this.client.POST('/api/v1/plans/{planId}/publish', {
|
|
108
|
+
params: { path: { planId } },
|
|
109
|
+
...options,
|
|
110
|
+
});
|
|
111
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.Plans = Plans;
|
|
115
|
+
/**
|
|
116
|
+
* Plan Addons
|
|
117
|
+
* Manage addon assignments for plans.
|
|
118
|
+
*/
|
|
119
|
+
class PlanAddons {
|
|
120
|
+
client;
|
|
121
|
+
constructor(client) {
|
|
122
|
+
this.client = client;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* List plan addons
|
|
126
|
+
* @param planId - The ID of the plan
|
|
127
|
+
* @param params - Optional query parameters
|
|
128
|
+
* @param options - Optional request options
|
|
129
|
+
* @returns A list of plan addons
|
|
130
|
+
*/
|
|
131
|
+
async list(planId, params, options) {
|
|
132
|
+
const resp = await this.client.GET('/api/v1/plans/{planId}/addons', {
|
|
116
133
|
params: {
|
|
117
|
-
path: {
|
|
118
|
-
|
|
119
|
-
},
|
|
134
|
+
path: { planId },
|
|
135
|
+
query: params,
|
|
120
136
|
},
|
|
121
137
|
...options,
|
|
122
138
|
});
|
|
123
139
|
return (0, utils_js_1.transformResponse)(resp);
|
|
124
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Create a plan addon
|
|
143
|
+
* @param planId - The ID of the plan
|
|
144
|
+
* @param planAddon - The plan addon to create
|
|
145
|
+
* @param options - Optional request options
|
|
146
|
+
* @returns The created plan addon
|
|
147
|
+
*/
|
|
148
|
+
async create(planId, planAddon, options) {
|
|
149
|
+
const resp = await this.client.POST('/api/v1/plans/{planId}/addons', {
|
|
150
|
+
body: planAddon,
|
|
151
|
+
params: { path: { planId } },
|
|
152
|
+
...options,
|
|
153
|
+
});
|
|
154
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Get a plan addon by ID
|
|
158
|
+
* @param planId - The ID of the plan
|
|
159
|
+
* @param planAddonId - The ID of the plan addon
|
|
160
|
+
* @param options - Optional request options
|
|
161
|
+
* @returns The plan addon
|
|
162
|
+
*/
|
|
163
|
+
async get(planId, planAddonId, options) {
|
|
164
|
+
const resp = await this.client.GET('/api/v1/plans/{planId}/addons/{planAddonId}', {
|
|
165
|
+
params: {
|
|
166
|
+
path: { planAddonId, planId },
|
|
167
|
+
},
|
|
168
|
+
...options,
|
|
169
|
+
});
|
|
170
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Update a plan addon
|
|
174
|
+
* @param planId - The ID of the plan
|
|
175
|
+
* @param planAddonId - The ID of the plan addon to update
|
|
176
|
+
* @param planAddon - The plan addon data to update
|
|
177
|
+
* @param options - Optional request options
|
|
178
|
+
* @returns The updated plan addon
|
|
179
|
+
*/
|
|
180
|
+
async update(planId, planAddonId, planAddon, options) {
|
|
181
|
+
const resp = await this.client.PUT('/api/v1/plans/{planId}/addons/{planAddonId}', {
|
|
182
|
+
body: planAddon,
|
|
183
|
+
params: { path: { planAddonId, planId } },
|
|
184
|
+
...options,
|
|
185
|
+
});
|
|
186
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Delete a plan addon by ID
|
|
190
|
+
* @param planId - The ID of the plan
|
|
191
|
+
* @param planAddonId - The ID of the plan addon to delete
|
|
192
|
+
* @param options - Optional request options
|
|
193
|
+
* @returns void or standard error response structure
|
|
194
|
+
*/
|
|
195
|
+
async delete(planId, planAddonId, options) {
|
|
196
|
+
const resp = await this.client.DELETE('/api/v1/plans/{planId}/addons/{planAddonId}', {
|
|
197
|
+
params: { path: { planAddonId, planId } },
|
|
198
|
+
...options,
|
|
199
|
+
});
|
|
200
|
+
return (0, utils_js_1.transformResponse)(resp);
|
|
201
|
+
}
|
|
125
202
|
}
|
|
126
|
-
exports.
|
|
203
|
+
exports.PlanAddons = PlanAddons;
|
|
127
204
|
//# sourceMappingURL=plans.js.map
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import type { RequestOptions } from './common.cjs';
|
|
2
2
|
import type { operations, paths, PlanCreate, PlanReplaceUpdate } from './schemas.cjs';
|
|
3
3
|
import type { Client } from 'openapi-fetch';
|
|
4
|
+
/**
|
|
5
|
+
* Plans
|
|
6
|
+
* Manage customer subscription plans and addon assignments.
|
|
7
|
+
*/
|
|
4
8
|
export declare class Plans {
|
|
5
9
|
private client;
|
|
10
|
+
addons: PlanAddons;
|
|
6
11
|
constructor(client: Client<paths, `${string}/${string}`>);
|
|
7
12
|
/**
|
|
8
13
|
* Create a plan
|
|
9
14
|
* @param plan - The plan to create
|
|
10
|
-
* @param
|
|
15
|
+
* @param options - Optional request options
|
|
11
16
|
* @returns The created plan
|
|
12
17
|
*/
|
|
13
18
|
create(plan: PlanCreate, options?: RequestOptions): Promise<{
|
|
@@ -22,18 +27,22 @@ export declare class Plans {
|
|
|
22
27
|
alignment?: import("./schemas.cjs").components["schemas"]["Alignment"];
|
|
23
28
|
readonly version: number;
|
|
24
29
|
currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
|
|
30
|
+
billingCadence: string;
|
|
31
|
+
proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
|
|
25
32
|
readonly effectiveFrom?: Date;
|
|
26
33
|
readonly effectiveTo?: Date;
|
|
27
34
|
readonly status: import("./schemas.cjs").components["schemas"]["PlanStatus"];
|
|
28
35
|
phases: import("./schemas.cjs").components["schemas"]["PlanPhase"][];
|
|
36
|
+
readonly validationErrors: import("./schemas.cjs").components["schemas"]["ValidationError"][] | null;
|
|
29
37
|
}>;
|
|
30
38
|
/**
|
|
31
|
-
* Get a plan by ID
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
39
|
+
* Get a plan by ID
|
|
40
|
+
* @param planId - The ID of the plan to retrieve
|
|
41
|
+
* @param params - Optional query parameters
|
|
42
|
+
* @param options - Optional request options
|
|
34
43
|
* @returns The plan
|
|
35
44
|
*/
|
|
36
|
-
get(
|
|
45
|
+
get(planId: operations['getPlan']['parameters']['path']['planId'], params?: operations['getPlan']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
37
46
|
readonly id: string;
|
|
38
47
|
name: string;
|
|
39
48
|
description?: string;
|
|
@@ -45,18 +54,21 @@ export declare class Plans {
|
|
|
45
54
|
alignment?: import("./schemas.cjs").components["schemas"]["Alignment"];
|
|
46
55
|
readonly version: number;
|
|
47
56
|
currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
|
|
57
|
+
billingCadence: string;
|
|
58
|
+
proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
|
|
48
59
|
readonly effectiveFrom?: Date;
|
|
49
60
|
readonly effectiveTo?: Date;
|
|
50
61
|
readonly status: import("./schemas.cjs").components["schemas"]["PlanStatus"];
|
|
51
62
|
phases: import("./schemas.cjs").components["schemas"]["PlanPhase"][];
|
|
63
|
+
readonly validationErrors: import("./schemas.cjs").components["schemas"]["ValidationError"][] | null;
|
|
52
64
|
}>;
|
|
53
65
|
/**
|
|
54
66
|
* List plans
|
|
55
|
-
* @param
|
|
56
|
-
* @param
|
|
57
|
-
* @returns
|
|
67
|
+
* @param params - Optional parameters for listing plans
|
|
68
|
+
* @param options - Optional request options
|
|
69
|
+
* @returns A list of plans
|
|
58
70
|
*/
|
|
59
|
-
list(
|
|
71
|
+
list(params?: operations['listPlans']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
60
72
|
totalCount: number;
|
|
61
73
|
page: number;
|
|
62
74
|
pageSize: number;
|
|
@@ -64,12 +76,12 @@ export declare class Plans {
|
|
|
64
76
|
}>;
|
|
65
77
|
/**
|
|
66
78
|
* Update a plan
|
|
67
|
-
* @param
|
|
68
|
-
* @param plan - The plan to update
|
|
69
|
-
* @param
|
|
79
|
+
* @param planId - The ID of the plan to update
|
|
80
|
+
* @param plan - The plan data to update
|
|
81
|
+
* @param options - Optional request options
|
|
70
82
|
* @returns The updated plan
|
|
71
83
|
*/
|
|
72
|
-
update(
|
|
84
|
+
update(planId: operations['updatePlan']['parameters']['path']['planId'], plan: PlanReplaceUpdate, options?: RequestOptions): Promise<{
|
|
73
85
|
readonly id: string;
|
|
74
86
|
name: string;
|
|
75
87
|
description?: string;
|
|
@@ -81,25 +93,28 @@ export declare class Plans {
|
|
|
81
93
|
alignment?: import("./schemas.cjs").components["schemas"]["Alignment"];
|
|
82
94
|
readonly version: number;
|
|
83
95
|
currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
|
|
96
|
+
billingCadence: string;
|
|
97
|
+
proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
|
|
84
98
|
readonly effectiveFrom?: Date;
|
|
85
99
|
readonly effectiveTo?: Date;
|
|
86
100
|
readonly status: import("./schemas.cjs").components["schemas"]["PlanStatus"];
|
|
87
101
|
phases: import("./schemas.cjs").components["schemas"]["PlanPhase"][];
|
|
102
|
+
readonly validationErrors: import("./schemas.cjs").components["schemas"]["ValidationError"][] | null;
|
|
88
103
|
}>;
|
|
89
104
|
/**
|
|
90
|
-
* Delete a plan
|
|
91
|
-
* @param
|
|
92
|
-
* @param
|
|
93
|
-
* @returns
|
|
105
|
+
* Delete a plan by ID
|
|
106
|
+
* @param planId - The ID of the plan to delete
|
|
107
|
+
* @param options - Optional request options
|
|
108
|
+
* @returns void or standard error response structure
|
|
94
109
|
*/
|
|
95
|
-
delete(
|
|
110
|
+
delete(planId: operations['deletePlan']['parameters']['path']['planId'], options?: RequestOptions): Promise<undefined>;
|
|
96
111
|
/**
|
|
97
112
|
* Archive a plan
|
|
98
|
-
* @param
|
|
99
|
-
* @param
|
|
113
|
+
* @param planId - The ID of the plan to archive
|
|
114
|
+
* @param options - Optional request options
|
|
100
115
|
* @returns The archived plan
|
|
101
116
|
*/
|
|
102
|
-
archive(
|
|
117
|
+
archive(planId: operations['archivePlan']['parameters']['path']['planId'], options?: RequestOptions): Promise<{
|
|
103
118
|
readonly id: string;
|
|
104
119
|
name: string;
|
|
105
120
|
description?: string;
|
|
@@ -111,18 +126,21 @@ export declare class Plans {
|
|
|
111
126
|
alignment?: import("./schemas.cjs").components["schemas"]["Alignment"];
|
|
112
127
|
readonly version: number;
|
|
113
128
|
currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
|
|
129
|
+
billingCadence: string;
|
|
130
|
+
proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
|
|
114
131
|
readonly effectiveFrom?: Date;
|
|
115
132
|
readonly effectiveTo?: Date;
|
|
116
133
|
readonly status: import("./schemas.cjs").components["schemas"]["PlanStatus"];
|
|
117
134
|
phases: import("./schemas.cjs").components["schemas"]["PlanPhase"][];
|
|
135
|
+
readonly validationErrors: import("./schemas.cjs").components["schemas"]["ValidationError"][] | null;
|
|
118
136
|
}>;
|
|
119
137
|
/**
|
|
120
138
|
* Publish a plan
|
|
121
|
-
* @param
|
|
122
|
-
* @param
|
|
139
|
+
* @param planId - The ID of the plan to publish
|
|
140
|
+
* @param options - Optional request options
|
|
123
141
|
* @returns The published plan
|
|
124
142
|
*/
|
|
125
|
-
publish(
|
|
143
|
+
publish(planId: operations['publishPlan']['parameters']['path']['planId'], options?: RequestOptions): Promise<{
|
|
126
144
|
readonly id: string;
|
|
127
145
|
name: string;
|
|
128
146
|
description?: string;
|
|
@@ -134,9 +152,96 @@ export declare class Plans {
|
|
|
134
152
|
alignment?: import("./schemas.cjs").components["schemas"]["Alignment"];
|
|
135
153
|
readonly version: number;
|
|
136
154
|
currency: import("./schemas.cjs").components["schemas"]["CurrencyCode"];
|
|
155
|
+
billingCadence: string;
|
|
156
|
+
proRatingConfig?: import("./schemas.cjs").components["schemas"]["ProRatingConfig"];
|
|
137
157
|
readonly effectiveFrom?: Date;
|
|
138
158
|
readonly effectiveTo?: Date;
|
|
139
159
|
readonly status: import("./schemas.cjs").components["schemas"]["PlanStatus"];
|
|
140
160
|
phases: import("./schemas.cjs").components["schemas"]["PlanPhase"][];
|
|
161
|
+
readonly validationErrors: import("./schemas.cjs").components["schemas"]["ValidationError"][] | null;
|
|
141
162
|
}>;
|
|
142
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Plan Addons
|
|
166
|
+
* Manage addon assignments for plans.
|
|
167
|
+
*/
|
|
168
|
+
export declare class PlanAddons {
|
|
169
|
+
private client;
|
|
170
|
+
constructor(client: Client<paths, `${string}/${string}`>);
|
|
171
|
+
/**
|
|
172
|
+
* List plan addons
|
|
173
|
+
* @param planId - The ID of the plan
|
|
174
|
+
* @param params - Optional query parameters
|
|
175
|
+
* @param options - Optional request options
|
|
176
|
+
* @returns A list of plan addons
|
|
177
|
+
*/
|
|
178
|
+
list(planId: operations['listPlanAddons']['parameters']['path']['planId'], params?: operations['listPlanAddons']['parameters']['query'], options?: RequestOptions): Promise<{
|
|
179
|
+
totalCount: number;
|
|
180
|
+
page: number;
|
|
181
|
+
pageSize: number;
|
|
182
|
+
items: import("./schemas.cjs").components["schemas"]["PlanAddon"][];
|
|
183
|
+
}>;
|
|
184
|
+
/**
|
|
185
|
+
* Create a plan addon
|
|
186
|
+
* @param planId - The ID of the plan
|
|
187
|
+
* @param planAddon - The plan addon to create
|
|
188
|
+
* @param options - Optional request options
|
|
189
|
+
* @returns The created plan addon
|
|
190
|
+
*/
|
|
191
|
+
create(planId: operations['createPlanAddon']['parameters']['path']['planId'], planAddon: operations['createPlanAddon']['requestBody']['content']['application/json'], options?: RequestOptions): Promise<{
|
|
192
|
+
readonly createdAt: Date;
|
|
193
|
+
readonly updatedAt: Date;
|
|
194
|
+
readonly deletedAt?: Date;
|
|
195
|
+
readonly annotations?: import("./schemas.cjs").components["schemas"]["Annotations"];
|
|
196
|
+
metadata?: import("./schemas.cjs").components["schemas"]["Metadata"];
|
|
197
|
+
readonly addon: import("./schemas.cjs").components["schemas"]["Addon"];
|
|
198
|
+
fromPlanPhase: string;
|
|
199
|
+
maxQuantity?: number;
|
|
200
|
+
readonly validationErrors: import("./schemas.cjs").components["schemas"]["ValidationError"][] | null;
|
|
201
|
+
}>;
|
|
202
|
+
/**
|
|
203
|
+
* Get a plan addon by ID
|
|
204
|
+
* @param planId - The ID of the plan
|
|
205
|
+
* @param planAddonId - The ID of the plan addon
|
|
206
|
+
* @param options - Optional request options
|
|
207
|
+
* @returns The plan addon
|
|
208
|
+
*/
|
|
209
|
+
get(planId: operations['getPlanAddon']['parameters']['path']['planId'], planAddonId: operations['getPlanAddon']['parameters']['path']['planAddonId'], options?: RequestOptions): Promise<{
|
|
210
|
+
readonly createdAt: Date;
|
|
211
|
+
readonly updatedAt: Date;
|
|
212
|
+
readonly deletedAt?: Date;
|
|
213
|
+
readonly annotations?: import("./schemas.cjs").components["schemas"]["Annotations"];
|
|
214
|
+
metadata?: import("./schemas.cjs").components["schemas"]["Metadata"];
|
|
215
|
+
readonly addon: import("./schemas.cjs").components["schemas"]["Addon"];
|
|
216
|
+
fromPlanPhase: string;
|
|
217
|
+
maxQuantity?: number;
|
|
218
|
+
readonly validationErrors: import("./schemas.cjs").components["schemas"]["ValidationError"][] | null;
|
|
219
|
+
}>;
|
|
220
|
+
/**
|
|
221
|
+
* Update a plan addon
|
|
222
|
+
* @param planId - The ID of the plan
|
|
223
|
+
* @param planAddonId - The ID of the plan addon to update
|
|
224
|
+
* @param planAddon - The plan addon data to update
|
|
225
|
+
* @param options - Optional request options
|
|
226
|
+
* @returns The updated plan addon
|
|
227
|
+
*/
|
|
228
|
+
update(planId: operations['updatePlanAddon']['parameters']['path']['planId'], planAddonId: operations['updatePlanAddon']['parameters']['path']['planAddonId'], planAddon: operations['updatePlanAddon']['requestBody']['content']['application/json'], options?: RequestOptions): Promise<{
|
|
229
|
+
readonly createdAt: Date;
|
|
230
|
+
readonly updatedAt: Date;
|
|
231
|
+
readonly deletedAt?: Date;
|
|
232
|
+
readonly annotations?: import("./schemas.cjs").components["schemas"]["Annotations"];
|
|
233
|
+
metadata?: import("./schemas.cjs").components["schemas"]["Metadata"];
|
|
234
|
+
readonly addon: import("./schemas.cjs").components["schemas"]["Addon"];
|
|
235
|
+
fromPlanPhase: string;
|
|
236
|
+
maxQuantity?: number;
|
|
237
|
+
readonly validationErrors: import("./schemas.cjs").components["schemas"]["ValidationError"][] | null;
|
|
238
|
+
}>;
|
|
239
|
+
/**
|
|
240
|
+
* Delete a plan addon by ID
|
|
241
|
+
* @param planId - The ID of the plan
|
|
242
|
+
* @param planAddonId - The ID of the plan addon to delete
|
|
243
|
+
* @param options - Optional request options
|
|
244
|
+
* @returns void or standard error response structure
|
|
245
|
+
*/
|
|
246
|
+
delete(planId: operations['deletePlanAddon']['parameters']['path']['planId'], planAddonId: operations['deletePlanAddon']['parameters']['path']['planAddonId'], options?: RequestOptions): Promise<undefined>;
|
|
247
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.js","sourceRoot":"","sources":["../../../../src/client/plans.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAU9C,MAAa,KAAK;
|
|
1
|
+
{"version":3,"file":"plans.js","sourceRoot":"","sources":["../../../../src/client/plans.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAU9C;;;GAGG;AACH,MAAa,KAAK;IAGI;IAFb,MAAM,CAAY;IAEzB,YAAoB,MAA4C;QAA5C,WAAM,GAAN,MAAM,CAAsC;QAC9D,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC3C,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CAAC,IAAgB,EAAE,OAAwB;QAC5D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE;YACnD,IAAI,EAAE,IAAI;YACV,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,GAAG,CACd,MAA6D,EAC7D,MAAqD,EACrD,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,wBAAwB,EAAE;YAC3D,MAAM,EAAE;gBACN,IAAI,EAAE,EAAE,MAAM,EAAE;gBAChB,KAAK,EAAE,MAAM;aACd;YACD,GAAG,OAAO;SACX,CAAC,CAAA;QAEF,OAAO,IAAA,4BAAiB,EAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,IAAI,CACf,MAAuD,EACvD,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,EAAE;YAClD,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;YACzB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