@meshery/schemas 1.2.22 → 1.3.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 (88) hide show
  1. package/dist/cloudApi.d.mts +1719 -1518
  2. package/dist/cloudApi.d.ts +1719 -1518
  3. package/dist/cloudApi.js +1 -1
  4. package/dist/cloudApi.mjs +1 -1
  5. package/dist/constructs/v1alpha1/capability/Capability.d.ts +111 -106
  6. package/dist/constructs/v1alpha1/core/Core.d.ts +734 -822
  7. package/dist/constructs/v1alpha2/catalog/Catalog.d.ts +40 -45
  8. package/dist/constructs/v1alpha3/relationship/Relationship.d.ts +1716 -1829
  9. package/dist/constructs/v1beta1/academy/Academy.d.ts +6648 -6029
  10. package/dist/constructs/v1beta1/badge/Badge.d.ts +600 -439
  11. package/dist/constructs/v1beta1/capability/Capability.d.ts +111 -106
  12. package/dist/constructs/v1beta1/catalog/Catalog.d.ts +40 -45
  13. package/dist/constructs/v1beta1/category/Category.d.ts +26 -38
  14. package/dist/constructs/v1beta1/component/Component.d.ts +729 -833
  15. package/dist/constructs/v1beta1/connection/Connection.d.ts +1357 -1170
  16. package/dist/constructs/v1beta1/core/Core.d.ts +734 -822
  17. package/dist/constructs/v1beta1/credential/Credential.d.ts +593 -458
  18. package/dist/constructs/v1beta1/environment/Environment.d.ts +835 -666
  19. package/dist/constructs/v1beta1/evaluation/Evaluation.d.ts +5508 -6030
  20. package/dist/constructs/v1beta1/event/Event.d.ts +898 -527
  21. package/dist/constructs/v1beta1/feature/Feature.d.ts +287 -249
  22. package/dist/constructs/v1beta1/invitation/Invitation.d.ts +1244 -877
  23. package/dist/constructs/v1beta1/key/Key.d.ts +589 -444
  24. package/dist/constructs/v1beta1/keychain/Keychain.d.ts +796 -575
  25. package/dist/constructs/v1beta1/model/Model.d.ts +572 -598
  26. package/dist/constructs/v1beta1/organization/Organization.d.ts +1829 -1410
  27. package/dist/constructs/v1beta1/pattern/Pattern.d.ts +17093 -17910
  28. package/dist/constructs/v1beta1/plan/Plan.d.ts +159 -115
  29. package/dist/constructs/v1beta1/role/Role.d.ts +933 -688
  30. package/dist/constructs/v1beta1/schedule/Schedule.d.ts +425 -315
  31. package/dist/constructs/v1beta1/subcategory/Subcategory.d.ts +18 -61
  32. package/dist/constructs/v1beta1/subscription/Subscription.d.ts +839 -674
  33. package/dist/constructs/v1beta1/support/Support.d.ts +115 -74
  34. package/dist/constructs/v1beta1/system/System.d.ts +434 -0
  35. package/dist/constructs/v1beta1/system/System.js +1 -0
  36. package/dist/constructs/v1beta1/system/System.mjs +0 -0
  37. package/dist/constructs/v1beta1/system/SystemSchema.d.ts +2 -0
  38. package/dist/constructs/v1beta1/system/SystemSchema.js +2 -0
  39. package/dist/constructs/v1beta1/system/SystemSchema.mjs +2 -0
  40. package/dist/constructs/v1beta1/team/Team.d.ts +1028 -762
  41. package/dist/constructs/v1beta1/token/Token.d.ts +612 -475
  42. package/dist/constructs/v1beta1/user/User.d.ts +1723 -1554
  43. package/dist/constructs/v1beta1/view/View.d.ts +833 -664
  44. package/dist/constructs/v1beta1/workspace/Workspace.d.ts +4900 -4695
  45. package/dist/constructs/v1beta2/academy/Academy.d.ts +7840 -7222
  46. package/dist/constructs/v1beta2/badge/Badge.d.ts +610 -453
  47. package/dist/constructs/v1beta2/catalog/Catalog.d.ts +40 -45
  48. package/dist/constructs/v1beta2/component/Component.d.ts +747 -851
  49. package/dist/constructs/v1beta2/connection/Connection.d.ts +1376 -1189
  50. package/dist/constructs/v1beta2/core/Core.d.ts +768 -856
  51. package/dist/constructs/v1beta2/credential/Credential.d.ts +572 -437
  52. package/dist/constructs/v1beta2/design/Design.d.ts +17682 -18467
  53. package/dist/constructs/v1beta2/event/Event.d.ts +946 -575
  54. package/dist/constructs/v1beta2/invitation/Invitation.d.ts +1268 -901
  55. package/dist/constructs/v1beta2/key/Key.d.ts +599 -454
  56. package/dist/constructs/v1beta2/keychain/Keychain.d.ts +806 -585
  57. package/dist/constructs/v1beta2/model/Model.d.ts +610 -636
  58. package/dist/constructs/v1beta2/organization/Organization.d.ts +2135 -1724
  59. package/dist/constructs/v1beta2/plan/Plan.d.ts +169 -128
  60. package/dist/constructs/v1beta2/relationship/Relationship.d.ts +1842 -2011
  61. package/dist/constructs/v1beta2/role/Role.d.ts +940 -695
  62. package/dist/constructs/v1beta2/schedule/Schedule.d.ts +466 -356
  63. package/dist/constructs/v1beta2/subscription/Subscription.d.ts +866 -701
  64. package/dist/constructs/v1beta2/team/Team.d.ts +1118 -852
  65. package/dist/constructs/v1beta2/token/Token.d.ts +616 -479
  66. package/dist/constructs/v1beta2/user/User.d.ts +1723 -1554
  67. package/dist/constructs/v1beta2/view/View.d.ts +838 -669
  68. package/dist/constructs/v1beta3/academy/Academy.d.ts +7836 -7218
  69. package/dist/constructs/v1beta3/component/Component.d.ts +753 -857
  70. package/dist/constructs/v1beta3/connection/Connection.d.ts +1447 -1260
  71. package/dist/constructs/v1beta3/design/Design.d.ts +5727 -5305
  72. package/dist/constructs/v1beta3/environment/Environment.d.ts +858 -689
  73. package/dist/constructs/v1beta3/event/Event.d.ts +1041 -666
  74. package/dist/constructs/v1beta3/filter/Filter.d.ts +1437 -1299
  75. package/dist/constructs/v1beta3/invitation/Invitation.d.ts +1277 -910
  76. package/dist/constructs/v1beta3/performance_profile/PerformanceProfile.d.ts +850 -690
  77. package/dist/constructs/v1beta3/plan/Plan.d.ts +197 -156
  78. package/dist/constructs/v1beta3/relationship/Relationship.d.ts +1842 -2011
  79. package/dist/constructs/v1beta3/subscription/Subscription.d.ts +969 -804
  80. package/dist/constructs/v1beta3/token/Token.d.ts +616 -479
  81. package/dist/constructs/v1beta3/workspace/Workspace.d.ts +5030 -4822
  82. package/dist/index.d.mts +5480 -5022
  83. package/dist/index.d.ts +5480 -5022
  84. package/dist/mesheryApi.d.mts +1314 -522
  85. package/dist/mesheryApi.d.ts +1314 -522
  86. package/dist/mesheryApi.js +1 -1
  87. package/dist/mesheryApi.mjs +1 -1
  88. package/package.json +1 -2
@@ -4,364 +4,186 @@
4
4
  */
5
5
 
6
6
  export interface paths {
7
- "/api/entitlement/subscriptions": {
8
- /** Returns all subscriptions for the organization */
9
- get: operations["getSubscriptions"];
10
- };
11
- "/api/entitlement/subscriptions/{subscriptionId}/cancel": {
12
- post: operations["cancelSubscription"];
13
- };
14
- "/api/entitlement/subscriptions/create": {
15
- post: operations["createSubscription"];
16
- };
17
- "/api/entitlement/subscriptions/{subscriptionId}/upgrade": {
18
- post: operations["upgradeSubscription"];
19
- };
20
- "/api/entitlement/subscriptions/{subscriptionId}/upgrade-preview": {
21
- post: operations["previewSubscriptionUpgrade"];
22
- };
23
- "/api/entitlement/subscriptions/webhooks": {
24
- post: operations["handleSubscriptionWebhook"];
25
- };
26
- }
27
-
28
- export interface components {
29
- schemas: {
30
- /**
31
- * @description Payment processor used to charge the subscription.
32
- * @enum {string}
33
- */
34
- PaymentProcessor: "stripe" | "paypal" | "braintree";
35
- /** @description Payload for creating a new subscription through a payment processor. */
36
- CreateSubscriptionRequest: {
37
- /**
38
- * Format: uuid
39
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
40
- */
41
- orgId?: string;
42
- /** @description Price ID from the payment processor. */
43
- planId?: string;
44
- /** @description Coupon ID to apply. */
45
- couponId?: string;
46
- /** @description Number of users in the organization. */
47
- userCount?: number;
48
- /**
49
- * Format: email
50
- * @description Email of the customer.
51
- */
52
- email?: string;
53
- /**
54
- * @description Payment processor used to complete the subscription checkout.
55
- * @enum {string}
56
- */
57
- paymentProcessor?: "stripe" | "paypal" | "braintree";
58
- };
59
- /** @description Payload for upgrading or downgrading a subscription by changing one of its plans. */
60
- UpgradeSubscriptionRequest: {
61
- /**
62
- * Format: uuid
63
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
64
- */
65
- oldPlanId?: string;
66
- /**
67
- * Format: uuid
68
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
69
- */
70
- newPlanId?: string;
71
- };
72
- /** @description Response body returned after a subscription is created. */
73
- CreateSubscriptionResponse: {
74
- /** @description ID of the associated subscription in the payment processor. */
75
- subscriptionId?: string;
76
- /** @description Client secret returned by the payment processor for the subscription checkout flow. */
77
- clientSecret?: string;
78
- };
79
- /** @description Payload for synchronizing the current user count with the payment processor. */
80
- UpdateUsersRequest: {
81
- /**
82
- * @description Payment processor currently billing the subscription.
83
- * @enum {string}
84
- */
85
- paymentProcessor?: "stripe" | "paypal" | "braintree";
86
- };
87
- /** @description Payload for cancelling a subscription in an external processor. */
88
- CancelSubscriptionRequest: {
89
- /** @description Subscription ID from the payment processor. */
90
- subscriptionId?: string;
91
- /**
92
- * @description Payment processor currently billing the subscription.
93
- * @enum {string}
94
- */
95
- paymentProcessor?: "stripe" | "paypal" | "braintree";
96
- };
97
- /** @description Payload for webhook events from payment processors. */
98
- WebhookEvent: { [key: string]: unknown };
99
- /** @description Paginated list of subscriptions. */
100
- SubscriptionPage: {
101
- /** @description Current page number of the result set. */
102
- page: number;
103
- /** @description Number of items per page. */
104
- pageSize: number;
105
- /** @description Total number of items available. */
106
- totalCount: number;
107
- /** @description Subscriptions returned on the current page. */
108
- subscriptions: {
109
- /**
110
- * Format: uuid
111
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
112
- */
113
- id: string;
114
- /**
115
- * Format: uuid
116
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
117
- */
118
- orgId: string;
119
- /**
120
- * Format: uuid
121
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
122
- */
123
- planId: string;
124
- /** @description Eager-loaded plan associated with this subscription. */
125
- plan?: {
126
- /**
127
- * Format: uuid
128
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
129
- */
130
- id: string;
131
- /**
132
- * @description Display name of the plan.
133
- * @enum {string}
134
- */
135
- name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
136
- /**
137
- * @description Billing cadence for the plan (monthly, annually, or none).
138
- * @enum {string}
139
- */
140
- cadence: "none" | "monthly" | "annually";
141
- /**
142
- * @description Unit of consumption this plan charges against (e.g. user).
143
- * @enum {string}
144
- */
145
- unit: "user" | "free";
146
- /** @description Minimum number of units required for the plan. */
147
- minimumUnits: number;
148
- /** @description Price per unit of the plan. */
149
- pricePerUnit: number;
150
- /**
151
- * @description Currency in which the plan is priced.
152
- * @enum {string}
153
- */
154
- currency: "usd";
155
- };
156
- /** @description Number of units subscribed (eg number of users). */
157
- quantity: number;
158
- /**
159
- * Format: date-time
160
- * @description Timestamp when the subscription period started.
161
- */
162
- startDate?: string;
163
- /**
164
- * Format: date-time
165
- * @description Timestamp when the current subscription period ends.
166
- */
167
- endDate?: string;
168
- /**
169
- * @description Current status of the subscription (e.g. active, past_due, canceled).
170
- * @enum {string}
171
- */
172
- status:
173
- | "incomplete"
174
- | "incomplete_expired"
175
- | "trialing"
176
- | "active"
177
- | "past_due"
178
- | "canceled"
179
- | "unpaid";
180
- /**
181
- * Format: date-time
182
- * @description Timestamp when the subscription was created.
183
- */
184
- createdAt?: string;
185
- /**
186
- * Format: date-time
187
- * @description Timestamp when the subscription was last updated.
188
- */
189
- updatedAt?: string;
7
+ "/api/entitlement/subscriptions": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
190
14
  /**
191
- * Format: date-time
192
- * @description Timestamp when the subscription was soft-deleted, if applicable.
15
+ * Read subscriptions
16
+ * @description Returns all subscriptions for the organization
193
17
  */
194
- deletedAt?: string;
195
- /** @description Billing ID of the subscription. The ID of the subscription in the external billing system (for example, Stripe). */
196
- billingId: string;
197
- }[];
18
+ get: operations["getSubscriptions"];
19
+ put?: never;
20
+ post?: never;
21
+ delete?: never;
22
+ options?: never;
23
+ head?: never;
24
+ patch?: never;
25
+ trace?: never;
198
26
  };
199
- /** @description Subscription entity schema. */
200
- Subscription: {
201
- /**
202
- * Format: uuid
203
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
204
- */
205
- id: string;
206
- /**
207
- * Format: uuid
208
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
209
- */
210
- orgId: string;
211
- /**
212
- * Format: uuid
213
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
214
- */
215
- planId: string;
216
- /** @description Eager-loaded plan associated with this subscription. */
217
- plan?: {
218
- /**
219
- * Format: uuid
220
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
221
- */
222
- id: string;
223
- /**
224
- * @description Display name of the plan.
225
- * @enum {string}
226
- */
227
- name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
228
- /**
229
- * @description Billing cadence for the plan (monthly, annually, or none).
230
- * @enum {string}
231
- */
232
- cadence: "none" | "monthly" | "annually";
233
- /**
234
- * @description Unit of consumption this plan charges against (e.g. user).
235
- * @enum {string}
236
- */
237
- unit: "user" | "free";
238
- /** @description Minimum number of units required for the plan. */
239
- minimumUnits: number;
240
- /** @description Price per unit of the plan. */
241
- pricePerUnit: number;
242
- /**
243
- * @description Currency in which the plan is priced.
244
- * @enum {string}
245
- */
246
- currency: "usd";
247
- };
248
- /** @description Number of units subscribed (eg number of users). */
249
- quantity: number;
250
- /**
251
- * Format: date-time
252
- * @description Timestamp when the subscription period started.
253
- */
254
- startDate?: string;
255
- /**
256
- * Format: date-time
257
- * @description Timestamp when the current subscription period ends.
258
- */
259
- endDate?: string;
260
- /**
261
- * @description Current status of the subscription (e.g. active, past_due, canceled).
262
- * @enum {string}
263
- */
264
- status:
265
- | "incomplete"
266
- | "incomplete_expired"
267
- | "trialing"
268
- | "active"
269
- | "past_due"
270
- | "canceled"
271
- | "unpaid";
272
- /**
273
- * Format: date-time
274
- * @description Timestamp when the subscription was created.
275
- */
276
- createdAt?: string;
277
- /**
278
- * Format: date-time
279
- * @description Timestamp when the subscription was last updated.
280
- */
281
- updatedAt?: string;
282
- /**
283
- * Format: date-time
284
- * @description Timestamp when the subscription was soft-deleted, if applicable.
285
- */
286
- deletedAt?: string;
287
- /** @description Billing ID of the subscription. The ID of the subscription in the external billing system (for example, Stripe). */
288
- billingId: string;
27
+ "/api/entitlement/subscriptions/{subscriptionId}/cancel": {
28
+ parameters: {
29
+ query?: never;
30
+ header?: never;
31
+ path?: never;
32
+ cookie?: never;
33
+ };
34
+ get?: never;
35
+ put?: never;
36
+ /** Cancel an existing subscription. The subscription will remain active until the end of the billing period and then it will be canceled. */
37
+ post: operations["cancelSubscription"];
38
+ delete?: never;
39
+ options?: never;
40
+ head?: never;
41
+ patch?: never;
42
+ trace?: never;
289
43
  };
290
- /**
291
- * @description Possible statuses of a Stripe subscription.
292
- * @enum {string}
293
- */
294
- SubscriptionStatus:
295
- | "incomplete"
296
- | "incomplete_expired"
297
- | "trialing"
298
- | "active"
299
- | "past_due"
300
- | "canceled"
301
- | "unpaid";
302
- };
303
- responses: {
304
- /** Invalid request body or request param */
305
- 400: {
306
- content: {
307
- "text/plain": string;
308
- };
44
+ "/api/entitlement/subscriptions/create": {
45
+ parameters: {
46
+ query?: never;
47
+ header?: never;
48
+ path?: never;
49
+ cookie?: never;
50
+ };
51
+ get?: never;
52
+ put?: never;
53
+ /** Create a new subscription for an organization */
54
+ post: operations["createSubscription"];
55
+ delete?: never;
56
+ options?: never;
57
+ head?: never;
58
+ patch?: never;
59
+ trace?: never;
309
60
  };
310
- /** Expired JWT token used or insufficient privilege */
311
- 401: {
312
- content: {
313
- "text/plain": string;
314
- };
61
+ "/api/entitlement/subscriptions/{subscriptionId}/upgrade": {
62
+ parameters: {
63
+ query?: never;
64
+ header?: never;
65
+ path?: never;
66
+ cookie?: never;
67
+ };
68
+ get?: never;
69
+ put?: never;
70
+ /** Upgrade or downgrade an existing subscription by changing one of the plans in the subscription */
71
+ post: operations["upgradeSubscription"];
72
+ delete?: never;
73
+ options?: never;
74
+ head?: never;
75
+ patch?: never;
76
+ trace?: never;
315
77
  };
316
- /** Result not found */
317
- 404: {
318
- content: {
319
- "text/plain": string;
320
- };
78
+ "/api/entitlement/subscriptions/{subscriptionId}/upgrade-preview": {
79
+ parameters: {
80
+ query?: never;
81
+ header?: never;
82
+ path?: never;
83
+ cookie?: never;
84
+ };
85
+ get?: never;
86
+ put?: never;
87
+ /** Preview the invoice for upgrading or downgrading an existing subscription by changing one of the plans in the subscription */
88
+ post: operations["previewSubscriptionUpgrade"];
89
+ delete?: never;
90
+ options?: never;
91
+ head?: never;
92
+ patch?: never;
93
+ trace?: never;
321
94
  };
322
- /** Internal server error */
323
- 500: {
324
- content: {
325
- "text/plain": string;
326
- };
95
+ "/api/entitlement/subscriptions/webhooks": {
96
+ parameters: {
97
+ query?: never;
98
+ header?: never;
99
+ path?: never;
100
+ cookie?: never;
101
+ };
102
+ get?: never;
103
+ put?: never;
104
+ /** Handle webhook events from payment processors */
105
+ post: operations["handleSubscriptionWebhook"];
106
+ delete?: never;
107
+ options?: never;
108
+ head?: never;
109
+ patch?: never;
110
+ trace?: never;
327
111
  };
328
- };
329
- parameters: {
330
- /** @description Subscription ID */
331
- subscriptionId: string;
332
- /** @description Get responses by page */
333
- page: string;
334
- /** @description Get responses by pagesize */
335
- pagesize: string;
336
- /** @description Get responses by pagesize (pass all to get all responses) */
337
- pagesizeWithAll: string;
338
- /** @description Get ordered responses */
339
- order: string;
340
- };
341
112
  }
342
-
343
- export interface operations {
344
- /** Returns all subscriptions for the organization */
345
- getSubscriptions: {
346
- parameters: {
347
- query: {
348
- /** Get responses by page */
349
- page?: string;
350
- /** Get responses by pagesize */
351
- pagesize?: string;
352
- /** Get ordered responses */
353
- order?: string;
354
- /** Filter subscriptions by status */
355
- status?: string[];
356
- /** Filter subscriptions by plan UUID. Repeat for multiple values. */
357
- planId?: string[];
358
- };
359
- };
360
- responses: {
361
- /** Subscriptions response */
362
- 200: {
363
- content: {
364
- "application/json": {
113
+ export type webhooks = Record<string, never>;
114
+ export interface components {
115
+ schemas: {
116
+ /**
117
+ * @description Payment processor used to charge the subscription.
118
+ * @enum {string}
119
+ */
120
+ PaymentProcessor: "stripe" | "paypal" | "braintree";
121
+ /** @description Payload for creating a new subscription through a payment processor. */
122
+ CreateSubscriptionRequest: {
123
+ /**
124
+ * Format: uuid
125
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
126
+ */
127
+ orgId?: string;
128
+ /** @description Price ID from the payment processor. */
129
+ planId?: string;
130
+ /** @description Coupon ID to apply. */
131
+ couponId?: string;
132
+ /** @description Number of users in the organization. */
133
+ userCount?: number;
134
+ /**
135
+ * Format: email
136
+ * @description Email of the customer.
137
+ */
138
+ email?: string;
139
+ /**
140
+ * @description Payment processor used to complete the subscription checkout.
141
+ * @enum {string}
142
+ */
143
+ paymentProcessor?: "stripe" | "paypal" | "braintree";
144
+ };
145
+ /** @description Payload for upgrading or downgrading a subscription by changing one of its plans. */
146
+ UpgradeSubscriptionRequest: {
147
+ /**
148
+ * Format: uuid
149
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
150
+ */
151
+ oldPlanId?: string;
152
+ /**
153
+ * Format: uuid
154
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
155
+ */
156
+ newPlanId?: string;
157
+ };
158
+ /** @description Response body returned after a subscription is created. */
159
+ CreateSubscriptionResponse: {
160
+ /** @description ID of the associated subscription in the payment processor. */
161
+ subscriptionId?: string;
162
+ /** @description Client secret returned by the payment processor for the subscription checkout flow. */
163
+ clientSecret?: string;
164
+ };
165
+ /** @description Payload for synchronizing the current user count with the payment processor. */
166
+ UpdateUsersRequest: {
167
+ /**
168
+ * @description Payment processor currently billing the subscription.
169
+ * @enum {string}
170
+ */
171
+ paymentProcessor?: "stripe" | "paypal" | "braintree";
172
+ };
173
+ /** @description Payload for cancelling a subscription in an external processor. */
174
+ CancelSubscriptionRequest: {
175
+ /** @description Subscription ID from the payment processor. */
176
+ subscriptionId?: string;
177
+ /**
178
+ * @description Payment processor currently billing the subscription.
179
+ * @enum {string}
180
+ */
181
+ paymentProcessor?: "stripe" | "paypal" | "braintree";
182
+ };
183
+ /** @description Payload for webhook events from payment processors. */
184
+ WebhookEvent: Record<string, never>;
185
+ /** @description Paginated list of subscriptions. */
186
+ SubscriptionPage: {
365
187
  /** @description Current page number of the result set. */
366
188
  page: number;
367
189
  /** @description Number of items per page. */
@@ -370,155 +192,108 @@ export interface operations {
370
192
  totalCount: number;
371
193
  /** @description Subscriptions returned on the current page. */
372
194
  subscriptions: {
373
- /**
374
- * Format: uuid
375
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
376
- */
377
- id: string;
378
- /**
379
- * Format: uuid
380
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
381
- */
382
- orgId: string;
383
- /**
384
- * Format: uuid
385
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
386
- */
387
- planId: string;
388
- /** @description Eager-loaded plan associated with this subscription. */
389
- plan?: {
390
195
  /**
391
196
  * Format: uuid
392
197
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
393
198
  */
394
199
  id: string;
395
200
  /**
396
- * @description Display name of the plan.
397
- * @enum {string}
201
+ * Format: uuid
202
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
398
203
  */
399
- name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
204
+ orgId: string;
400
205
  /**
401
- * @description Billing cadence for the plan (monthly, annually, or none).
402
- * @enum {string}
206
+ * Format: uuid
207
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
403
208
  */
404
- cadence: "none" | "monthly" | "annually";
209
+ planId: string;
210
+ /** @description Eager-loaded plan associated with this subscription. */
211
+ plan?: {
212
+ /**
213
+ * Format: uuid
214
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
215
+ */
216
+ id: string;
217
+ /**
218
+ * @description Display name of the plan.
219
+ * @enum {string}
220
+ */
221
+ name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
222
+ /**
223
+ * @description Billing cadence for the plan (monthly, annually, or none).
224
+ * @enum {string}
225
+ */
226
+ cadence: "none" | "monthly" | "annually";
227
+ /**
228
+ * @description Unit of consumption this plan charges against (e.g. user).
229
+ * @enum {string}
230
+ */
231
+ unit: "user" | "free";
232
+ /** @description Minimum number of units required for the plan. */
233
+ minimumUnits: number;
234
+ /** @description Price per unit of the plan. */
235
+ pricePerUnit: number;
236
+ /**
237
+ * @description Currency in which the plan is priced.
238
+ * @enum {string}
239
+ */
240
+ currency: "usd";
241
+ };
242
+ /** @description Number of units subscribed (eg number of users). */
243
+ quantity: number;
405
244
  /**
406
- * @description Unit of consumption this plan charges against (e.g. user).
407
- * @enum {string}
245
+ * Format: date-time
246
+ * @description Timestamp when the subscription period started.
408
247
  */
409
- unit: "user" | "free";
410
- /** @description Minimum number of units required for the plan. */
411
- minimumUnits: number;
412
- /** @description Price per unit of the plan. */
413
- pricePerUnit: number;
248
+ startDate?: string;
414
249
  /**
415
- * @description Currency in which the plan is priced.
250
+ * Format: date-time
251
+ * @description Timestamp when the current subscription period ends.
252
+ */
253
+ endDate?: string;
254
+ /**
255
+ * @description Current status of the subscription (e.g. active, past_due, canceled).
416
256
  * @enum {string}
417
257
  */
418
- currency: "usd";
419
- };
420
- /** @description Number of units subscribed (eg number of users). */
421
- quantity: number;
422
- /**
423
- * Format: date-time
424
- * @description Timestamp when the subscription period started.
425
- */
426
- startDate?: string;
427
- /**
428
- * Format: date-time
429
- * @description Timestamp when the current subscription period ends.
430
- */
431
- endDate?: string;
432
- /**
433
- * @description Current status of the subscription (e.g. active, past_due, canceled).
434
- * @enum {string}
435
- */
436
- status:
437
- | "incomplete"
438
- | "incomplete_expired"
439
- | "trialing"
440
- | "active"
441
- | "past_due"
442
- | "canceled"
443
- | "unpaid";
444
- /**
445
- * Format: date-time
446
- * @description Timestamp when the subscription was created.
447
- */
448
- createdAt?: string;
449
- /**
450
- * Format: date-time
451
- * @description Timestamp when the subscription was last updated.
452
- */
453
- updatedAt?: string;
454
- /**
455
- * Format: date-time
456
- * @description Timestamp when the subscription was soft-deleted, if applicable.
457
- */
458
- deletedAt?: string;
459
- /** @description Billing ID of the subscription. The ID of the subscription in the external billing system (for example, Stripe). */
460
- billingId: string;
258
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
259
+ /**
260
+ * Format: date-time
261
+ * @description Timestamp when the subscription was created.
262
+ */
263
+ createdAt?: string;
264
+ /**
265
+ * Format: date-time
266
+ * @description Timestamp when the subscription was last updated.
267
+ */
268
+ updatedAt?: string;
269
+ /**
270
+ * Format: date-time
271
+ * @description Timestamp when the subscription was soft-deleted, if applicable.
272
+ */
273
+ deletedAt?: string;
274
+ /** @description Billing ID of the subscription. The ID of the subscription in the external billing system (for example, Stripe). */
275
+ billingId: string;
461
276
  }[];
462
- };
463
- };
464
- };
465
- /** Invalid request body or request param */
466
- 400: {
467
- content: {
468
- "text/plain": string;
469
- };
470
- };
471
- /** Expired JWT token used or insufficient privilege */
472
- 401: {
473
- content: {
474
- "text/plain": string;
475
- };
476
- };
477
- /** Internal server error */
478
- 500: {
479
- content: {
480
- "text/plain": string;
481
- };
482
- };
483
- };
484
- };
485
- cancelSubscription: {
486
- parameters: {
487
- path: {
488
- /** Subscription ID */
489
- subscriptionId: string;
490
- };
491
- };
492
- responses: {
493
- /** Subscription cancellation scheduled */
494
- 200: {
495
- content: {
496
- "application/json": {
497
- /** @description Current page number of the result set. */
498
- page: number;
499
- /** @description Number of items per page. */
500
- pageSize: number;
501
- /** @description Total number of items available. */
502
- totalCount: number;
503
- /** @description Subscriptions returned on the current page. */
504
- subscriptions: {
505
- /**
506
- * Format: uuid
507
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
508
- */
509
- id: string;
510
- /**
511
- * Format: uuid
512
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
513
- */
514
- orgId: string;
515
- /**
516
- * Format: uuid
517
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
518
- */
519
- planId: string;
520
- /** @description Eager-loaded plan associated with this subscription. */
521
- plan?: {
277
+ };
278
+ /** @description Subscription entity schema. */
279
+ Subscription: {
280
+ /**
281
+ * Format: uuid
282
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
283
+ */
284
+ id: string;
285
+ /**
286
+ * Format: uuid
287
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
288
+ */
289
+ orgId: string;
290
+ /**
291
+ * Format: uuid
292
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
293
+ */
294
+ planId: string;
295
+ /** @description Eager-loaded plan associated with this subscription. */
296
+ plan?: {
522
297
  /**
523
298
  * Format: uuid
524
299
  * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
@@ -548,196 +323,6 @@ export interface operations {
548
323
  * @enum {string}
549
324
  */
550
325
  currency: "usd";
551
- };
552
- /** @description Number of units subscribed (eg number of users). */
553
- quantity: number;
554
- /**
555
- * Format: date-time
556
- * @description Timestamp when the subscription period started.
557
- */
558
- startDate?: string;
559
- /**
560
- * Format: date-time
561
- * @description Timestamp when the current subscription period ends.
562
- */
563
- endDate?: string;
564
- /**
565
- * @description Current status of the subscription (e.g. active, past_due, canceled).
566
- * @enum {string}
567
- */
568
- status:
569
- | "incomplete"
570
- | "incomplete_expired"
571
- | "trialing"
572
- | "active"
573
- | "past_due"
574
- | "canceled"
575
- | "unpaid";
576
- /**
577
- * Format: date-time
578
- * @description Timestamp when the subscription was created.
579
- */
580
- createdAt?: string;
581
- /**
582
- * Format: date-time
583
- * @description Timestamp when the subscription was last updated.
584
- */
585
- updatedAt?: string;
586
- /**
587
- * Format: date-time
588
- * @description Timestamp when the subscription was soft-deleted, if applicable.
589
- */
590
- deletedAt?: string;
591
- /** @description Billing ID of the subscription. The ID of the subscription in the external billing system (for example, Stripe). */
592
- billingId: string;
593
- }[];
594
- };
595
- };
596
- };
597
- /** Invalid request body or request param */
598
- 400: {
599
- content: {
600
- "text/plain": string;
601
- };
602
- };
603
- /** Expired JWT token used or insufficient privilege */
604
- 401: {
605
- content: {
606
- "text/plain": string;
607
- };
608
- };
609
- /** Result not found */
610
- 404: {
611
- content: {
612
- "text/plain": string;
613
- };
614
- };
615
- /** Internal server error */
616
- 500: {
617
- content: {
618
- "text/plain": string;
619
- };
620
- };
621
- };
622
- };
623
- createSubscription: {
624
- responses: {
625
- /** A new subscription has been created */
626
- 201: {
627
- content: {
628
- "application/json": {
629
- /** @description ID of the associated subscription in the payment processor. */
630
- subscriptionId?: string;
631
- /** @description Client secret returned by the payment processor for the subscription checkout flow. */
632
- clientSecret?: string;
633
- };
634
- };
635
- };
636
- /** Invalid request body or request param */
637
- 400: {
638
- content: {
639
- "text/plain": string;
640
- };
641
- };
642
- /** Expired JWT token used or insufficient privilege */
643
- 401: {
644
- content: {
645
- "text/plain": string;
646
- };
647
- };
648
- /** Internal server error */
649
- 500: {
650
- content: {
651
- "text/plain": string;
652
- };
653
- };
654
- };
655
- requestBody: {
656
- content: {
657
- "application/json": {
658
- /**
659
- * Format: uuid
660
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
661
- */
662
- orgId?: string;
663
- /** @description Price ID from the payment processor. */
664
- planId?: string;
665
- /** @description Coupon ID to apply. */
666
- couponId?: string;
667
- /** @description Number of users in the organization. */
668
- userCount?: number;
669
- /**
670
- * Format: email
671
- * @description Email of the customer.
672
- */
673
- email?: string;
674
- /**
675
- * @description Payment processor used to complete the subscription checkout.
676
- * @enum {string}
677
- */
678
- paymentProcessor?: "stripe" | "paypal" | "braintree";
679
- };
680
- };
681
- };
682
- };
683
- upgradeSubscription: {
684
- parameters: {
685
- path: {
686
- /** Subscription ID */
687
- subscriptionId: string;
688
- };
689
- };
690
- responses: {
691
- /** Subscription upgraded */
692
- 200: {
693
- content: {
694
- "application/json": {
695
- /**
696
- * Format: uuid
697
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
698
- */
699
- id: string;
700
- /**
701
- * Format: uuid
702
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
703
- */
704
- orgId: string;
705
- /**
706
- * Format: uuid
707
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
708
- */
709
- planId: string;
710
- /** @description Eager-loaded plan associated with this subscription. */
711
- plan?: {
712
- /**
713
- * Format: uuid
714
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
715
- */
716
- id: string;
717
- /**
718
- * @description Display name of the plan.
719
- * @enum {string}
720
- */
721
- name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
722
- /**
723
- * @description Billing cadence for the plan (monthly, annually, or none).
724
- * @enum {string}
725
- */
726
- cadence: "none" | "monthly" | "annually";
727
- /**
728
- * @description Unit of consumption this plan charges against (e.g. user).
729
- * @enum {string}
730
- */
731
- unit: "user" | "free";
732
- /** @description Minimum number of units required for the plan. */
733
- minimumUnits: number;
734
- /** @description Price per unit of the plan. */
735
- pricePerUnit: number;
736
- /**
737
- * @description Currency in which the plan is priced.
738
- * @enum {string}
739
- */
740
- currency: "usd";
741
326
  };
742
327
  /** @description Number of units subscribed (eg number of users). */
743
328
  quantity: number;
@@ -755,14 +340,7 @@ export interface operations {
755
340
  * @description Current status of the subscription (e.g. active, past_due, canceled).
756
341
  * @enum {string}
757
342
  */
758
- status:
759
- | "incomplete"
760
- | "incomplete_expired"
761
- | "trialing"
762
- | "active"
763
- | "past_due"
764
- | "canceled"
765
- | "unpaid";
343
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
766
344
  /**
767
345
  * Format: date-time
768
346
  * @description Timestamp when the subscription was created.
@@ -780,136 +358,723 @@ export interface operations {
780
358
  deletedAt?: string;
781
359
  /** @description Billing ID of the subscription. The ID of the subscription in the external billing system (for example, Stripe). */
782
360
  billingId: string;
783
- };
784
- };
785
- };
786
- /** Invalid request body or request param */
787
- 400: {
788
- content: {
789
- "text/plain": string;
790
- };
791
- };
792
- /** Expired JWT token used or insufficient privilege */
793
- 401: {
794
- content: {
795
- "text/plain": string;
796
- };
797
- };
798
- /** Result not found */
799
- 404: {
800
- content: {
801
- "text/plain": string;
802
- };
803
- };
804
- /** Internal server error */
805
- 500: {
806
- content: {
807
- "text/plain": string;
808
- };
809
- };
361
+ };
362
+ /**
363
+ * @description Possible statuses of a Stripe subscription.
364
+ * @enum {string}
365
+ */
366
+ SubscriptionStatus: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
810
367
  };
811
- requestBody: {
812
- content: {
813
- "application/json": {
814
- /**
815
- * Format: uuid
816
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
817
- */
818
- oldPlanId?: string;
819
- /**
820
- * Format: uuid
821
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
822
- */
823
- newPlanId?: string;
824
- };
825
- };
368
+ responses: {
369
+ /** @description Invalid request body or request param */
370
+ 400: {
371
+ headers: {
372
+ [name: string]: unknown;
373
+ };
374
+ content: {
375
+ "text/plain": string;
376
+ };
377
+ };
378
+ /** @description Expired JWT token used or insufficient privilege */
379
+ 401: {
380
+ headers: {
381
+ [name: string]: unknown;
382
+ };
383
+ content: {
384
+ "text/plain": string;
385
+ };
386
+ };
387
+ /** @description Result not found */
388
+ 404: {
389
+ headers: {
390
+ [name: string]: unknown;
391
+ };
392
+ content: {
393
+ "text/plain": string;
394
+ };
395
+ };
396
+ /** @description Internal server error */
397
+ 500: {
398
+ headers: {
399
+ [name: string]: unknown;
400
+ };
401
+ content: {
402
+ "text/plain": string;
403
+ };
404
+ };
826
405
  };
827
- };
828
- previewSubscriptionUpgrade: {
829
406
  parameters: {
830
- path: {
831
- /** Subscription ID */
407
+ /** @description Subscription ID */
832
408
  subscriptionId: string;
833
- };
409
+ /** @description Get responses by page */
410
+ page: string;
411
+ /** @description Get responses by pagesize */
412
+ pagesize: string;
413
+ /** @description Get responses by pagesize (pass all to get all responses) */
414
+ pagesizeWithAll: string;
415
+ /** @description Get ordered responses */
416
+ order: string;
834
417
  };
835
- responses: {
836
- /** Preview of the upgraded subscription invoice */
837
- 200: {
838
- content: {
839
- "application/json": { [key: string]: unknown };
840
- };
841
- };
842
- /** Invalid request body or request param */
843
- 400: {
844
- content: {
845
- "text/plain": string;
846
- };
847
- };
848
- /** Expired JWT token used or insufficient privilege */
849
- 401: {
850
- content: {
851
- "text/plain": string;
852
- };
853
- };
854
- /** Result not found */
855
- 404: {
856
- content: {
857
- "text/plain": string;
858
- };
859
- };
860
- /** Internal server error */
861
- 500: {
862
- content: {
863
- "text/plain": string;
864
- };
865
- };
418
+ requestBodies: never;
419
+ headers: never;
420
+ pathItems: never;
421
+ }
422
+ export type $defs = Record<string, never>;
423
+ export interface operations {
424
+ getSubscriptions: {
425
+ parameters: {
426
+ query?: {
427
+ /** @description Get responses by page */
428
+ page?: string;
429
+ /** @description Get responses by pagesize */
430
+ pagesize?: string;
431
+ /** @description Get ordered responses */
432
+ order?: string;
433
+ /** @description Filter subscriptions by status */
434
+ status?: string[];
435
+ /** @description Filter subscriptions by plan UUID. Repeat for multiple values. */
436
+ planId?: string[];
437
+ };
438
+ header?: never;
439
+ path?: never;
440
+ cookie?: never;
441
+ };
442
+ requestBody?: never;
443
+ responses: {
444
+ /** @description Subscriptions response */
445
+ 200: {
446
+ headers: {
447
+ [name: string]: unknown;
448
+ };
449
+ content: {
450
+ "application/json": {
451
+ /** @description Current page number of the result set. */
452
+ page: number;
453
+ /** @description Number of items per page. */
454
+ pageSize: number;
455
+ /** @description Total number of items available. */
456
+ totalCount: number;
457
+ /** @description Subscriptions returned on the current page. */
458
+ subscriptions: {
459
+ /**
460
+ * Format: uuid
461
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
462
+ */
463
+ id: string;
464
+ /**
465
+ * Format: uuid
466
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
467
+ */
468
+ orgId: string;
469
+ /**
470
+ * Format: uuid
471
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
472
+ */
473
+ planId: string;
474
+ /** @description Eager-loaded plan associated with this subscription. */
475
+ plan?: {
476
+ /**
477
+ * Format: uuid
478
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
479
+ */
480
+ id: string;
481
+ /**
482
+ * @description Display name of the plan.
483
+ * @enum {string}
484
+ */
485
+ name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
486
+ /**
487
+ * @description Billing cadence for the plan (monthly, annually, or none).
488
+ * @enum {string}
489
+ */
490
+ cadence: "none" | "monthly" | "annually";
491
+ /**
492
+ * @description Unit of consumption this plan charges against (e.g. user).
493
+ * @enum {string}
494
+ */
495
+ unit: "user" | "free";
496
+ /** @description Minimum number of units required for the plan. */
497
+ minimumUnits: number;
498
+ /** @description Price per unit of the plan. */
499
+ pricePerUnit: number;
500
+ /**
501
+ * @description Currency in which the plan is priced.
502
+ * @enum {string}
503
+ */
504
+ currency: "usd";
505
+ };
506
+ /** @description Number of units subscribed (eg number of users). */
507
+ quantity: number;
508
+ /**
509
+ * Format: date-time
510
+ * @description Timestamp when the subscription period started.
511
+ */
512
+ startDate?: string;
513
+ /**
514
+ * Format: date-time
515
+ * @description Timestamp when the current subscription period ends.
516
+ */
517
+ endDate?: string;
518
+ /**
519
+ * @description Current status of the subscription (e.g. active, past_due, canceled).
520
+ * @enum {string}
521
+ */
522
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
523
+ /**
524
+ * Format: date-time
525
+ * @description Timestamp when the subscription was created.
526
+ */
527
+ createdAt?: string;
528
+ /**
529
+ * Format: date-time
530
+ * @description Timestamp when the subscription was last updated.
531
+ */
532
+ updatedAt?: string;
533
+ /**
534
+ * Format: date-time
535
+ * @description Timestamp when the subscription was soft-deleted, if applicable.
536
+ */
537
+ deletedAt?: string;
538
+ /** @description Billing ID of the subscription. The ID of the subscription in the external billing system (for example, Stripe). */
539
+ billingId: string;
540
+ }[];
541
+ };
542
+ };
543
+ };
544
+ /** @description Invalid request body or request param */
545
+ 400: {
546
+ headers: {
547
+ [name: string]: unknown;
548
+ };
549
+ content: {
550
+ "text/plain": string;
551
+ };
552
+ };
553
+ /** @description Expired JWT token used or insufficient privilege */
554
+ 401: {
555
+ headers: {
556
+ [name: string]: unknown;
557
+ };
558
+ content: {
559
+ "text/plain": string;
560
+ };
561
+ };
562
+ /** @description Internal server error */
563
+ 500: {
564
+ headers: {
565
+ [name: string]: unknown;
566
+ };
567
+ content: {
568
+ "text/plain": string;
569
+ };
570
+ };
571
+ };
866
572
  };
867
- requestBody: {
868
- content: {
869
- "application/json": {
870
- /**
871
- * Format: uuid
872
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
873
- */
874
- oldPlanId?: string;
875
- /**
876
- * Format: uuid
877
- * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
878
- */
879
- newPlanId?: string;
880
- };
881
- };
573
+ cancelSubscription: {
574
+ parameters: {
575
+ query?: never;
576
+ header?: never;
577
+ path: {
578
+ /** @description Subscription ID */
579
+ subscriptionId: string;
580
+ };
581
+ cookie?: never;
582
+ };
583
+ requestBody?: never;
584
+ responses: {
585
+ /** @description Subscription cancellation scheduled */
586
+ 200: {
587
+ headers: {
588
+ [name: string]: unknown;
589
+ };
590
+ content: {
591
+ "application/json": {
592
+ /** @description Current page number of the result set. */
593
+ page: number;
594
+ /** @description Number of items per page. */
595
+ pageSize: number;
596
+ /** @description Total number of items available. */
597
+ totalCount: number;
598
+ /** @description Subscriptions returned on the current page. */
599
+ subscriptions: {
600
+ /**
601
+ * Format: uuid
602
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
603
+ */
604
+ id: string;
605
+ /**
606
+ * Format: uuid
607
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
608
+ */
609
+ orgId: string;
610
+ /**
611
+ * Format: uuid
612
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
613
+ */
614
+ planId: string;
615
+ /** @description Eager-loaded plan associated with this subscription. */
616
+ plan?: {
617
+ /**
618
+ * Format: uuid
619
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
620
+ */
621
+ id: string;
622
+ /**
623
+ * @description Display name of the plan.
624
+ * @enum {string}
625
+ */
626
+ name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
627
+ /**
628
+ * @description Billing cadence for the plan (monthly, annually, or none).
629
+ * @enum {string}
630
+ */
631
+ cadence: "none" | "monthly" | "annually";
632
+ /**
633
+ * @description Unit of consumption this plan charges against (e.g. user).
634
+ * @enum {string}
635
+ */
636
+ unit: "user" | "free";
637
+ /** @description Minimum number of units required for the plan. */
638
+ minimumUnits: number;
639
+ /** @description Price per unit of the plan. */
640
+ pricePerUnit: number;
641
+ /**
642
+ * @description Currency in which the plan is priced.
643
+ * @enum {string}
644
+ */
645
+ currency: "usd";
646
+ };
647
+ /** @description Number of units subscribed (eg number of users). */
648
+ quantity: number;
649
+ /**
650
+ * Format: date-time
651
+ * @description Timestamp when the subscription period started.
652
+ */
653
+ startDate?: string;
654
+ /**
655
+ * Format: date-time
656
+ * @description Timestamp when the current subscription period ends.
657
+ */
658
+ endDate?: string;
659
+ /**
660
+ * @description Current status of the subscription (e.g. active, past_due, canceled).
661
+ * @enum {string}
662
+ */
663
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
664
+ /**
665
+ * Format: date-time
666
+ * @description Timestamp when the subscription was created.
667
+ */
668
+ createdAt?: string;
669
+ /**
670
+ * Format: date-time
671
+ * @description Timestamp when the subscription was last updated.
672
+ */
673
+ updatedAt?: string;
674
+ /**
675
+ * Format: date-time
676
+ * @description Timestamp when the subscription was soft-deleted, if applicable.
677
+ */
678
+ deletedAt?: string;
679
+ /** @description Billing ID of the subscription. The ID of the subscription in the external billing system (for example, Stripe). */
680
+ billingId: string;
681
+ }[];
682
+ };
683
+ };
684
+ };
685
+ /** @description Invalid request body or request param */
686
+ 400: {
687
+ headers: {
688
+ [name: string]: unknown;
689
+ };
690
+ content: {
691
+ "text/plain": string;
692
+ };
693
+ };
694
+ /** @description Expired JWT token used or insufficient privilege */
695
+ 401: {
696
+ headers: {
697
+ [name: string]: unknown;
698
+ };
699
+ content: {
700
+ "text/plain": string;
701
+ };
702
+ };
703
+ /** @description Result not found */
704
+ 404: {
705
+ headers: {
706
+ [name: string]: unknown;
707
+ };
708
+ content: {
709
+ "text/plain": string;
710
+ };
711
+ };
712
+ /** @description Internal server error */
713
+ 500: {
714
+ headers: {
715
+ [name: string]: unknown;
716
+ };
717
+ content: {
718
+ "text/plain": string;
719
+ };
720
+ };
721
+ };
882
722
  };
883
- };
884
- handleSubscriptionWebhook: {
885
- responses: {
886
- /** Webhook processed */
887
- 200: unknown;
888
- /** Invalid request body or request param */
889
- 400: {
890
- content: {
891
- "text/plain": string;
892
- };
893
- };
894
- /** Expired JWT token used or insufficient privilege */
895
- 401: {
896
- content: {
897
- "text/plain": string;
898
- };
899
- };
900
- /** Internal server error */
901
- 500: {
902
- content: {
903
- "text/plain": string;
904
- };
905
- };
723
+ createSubscription: {
724
+ parameters: {
725
+ query?: never;
726
+ header?: never;
727
+ path?: never;
728
+ cookie?: never;
729
+ };
730
+ requestBody: {
731
+ content: {
732
+ "application/json": {
733
+ /**
734
+ * Format: uuid
735
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
736
+ */
737
+ orgId?: string;
738
+ /** @description Price ID from the payment processor. */
739
+ planId?: string;
740
+ /** @description Coupon ID to apply. */
741
+ couponId?: string;
742
+ /** @description Number of users in the organization. */
743
+ userCount?: number;
744
+ /**
745
+ * Format: email
746
+ * @description Email of the customer.
747
+ */
748
+ email?: string;
749
+ /**
750
+ * @description Payment processor used to complete the subscription checkout.
751
+ * @enum {string}
752
+ */
753
+ paymentProcessor?: "stripe" | "paypal" | "braintree";
754
+ };
755
+ };
756
+ };
757
+ responses: {
758
+ /** @description A new subscription has been created */
759
+ 201: {
760
+ headers: {
761
+ [name: string]: unknown;
762
+ };
763
+ content: {
764
+ "application/json": {
765
+ /** @description ID of the associated subscription in the payment processor. */
766
+ subscriptionId?: string;
767
+ /** @description Client secret returned by the payment processor for the subscription checkout flow. */
768
+ clientSecret?: string;
769
+ };
770
+ };
771
+ };
772
+ /** @description Invalid request body or request param */
773
+ 400: {
774
+ headers: {
775
+ [name: string]: unknown;
776
+ };
777
+ content: {
778
+ "text/plain": string;
779
+ };
780
+ };
781
+ /** @description Expired JWT token used or insufficient privilege */
782
+ 401: {
783
+ headers: {
784
+ [name: string]: unknown;
785
+ };
786
+ content: {
787
+ "text/plain": string;
788
+ };
789
+ };
790
+ /** @description Internal server error */
791
+ 500: {
792
+ headers: {
793
+ [name: string]: unknown;
794
+ };
795
+ content: {
796
+ "text/plain": string;
797
+ };
798
+ };
799
+ };
906
800
  };
907
- requestBody: {
908
- content: {
909
- "application/json": { [key: string]: unknown };
910
- };
801
+ upgradeSubscription: {
802
+ parameters: {
803
+ query?: never;
804
+ header?: never;
805
+ path: {
806
+ /** @description Subscription ID */
807
+ subscriptionId: string;
808
+ };
809
+ cookie?: never;
810
+ };
811
+ requestBody: {
812
+ content: {
813
+ "application/json": {
814
+ /**
815
+ * Format: uuid
816
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
817
+ */
818
+ oldPlanId?: string;
819
+ /**
820
+ * Format: uuid
821
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
822
+ */
823
+ newPlanId?: string;
824
+ };
825
+ };
826
+ };
827
+ responses: {
828
+ /** @description Subscription upgraded */
829
+ 200: {
830
+ headers: {
831
+ [name: string]: unknown;
832
+ };
833
+ content: {
834
+ "application/json": {
835
+ /**
836
+ * Format: uuid
837
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
838
+ */
839
+ id: string;
840
+ /**
841
+ * Format: uuid
842
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
843
+ */
844
+ orgId: string;
845
+ /**
846
+ * Format: uuid
847
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
848
+ */
849
+ planId: string;
850
+ /** @description Eager-loaded plan associated with this subscription. */
851
+ plan?: {
852
+ /**
853
+ * Format: uuid
854
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
855
+ */
856
+ id: string;
857
+ /**
858
+ * @description Display name of the plan.
859
+ * @enum {string}
860
+ */
861
+ name: "Free" | "Team Designer" | "Team Operator" | "Enterprise";
862
+ /**
863
+ * @description Billing cadence for the plan (monthly, annually, or none).
864
+ * @enum {string}
865
+ */
866
+ cadence: "none" | "monthly" | "annually";
867
+ /**
868
+ * @description Unit of consumption this plan charges against (e.g. user).
869
+ * @enum {string}
870
+ */
871
+ unit: "user" | "free";
872
+ /** @description Minimum number of units required for the plan. */
873
+ minimumUnits: number;
874
+ /** @description Price per unit of the plan. */
875
+ pricePerUnit: number;
876
+ /**
877
+ * @description Currency in which the plan is priced.
878
+ * @enum {string}
879
+ */
880
+ currency: "usd";
881
+ };
882
+ /** @description Number of units subscribed (eg number of users). */
883
+ quantity: number;
884
+ /**
885
+ * Format: date-time
886
+ * @description Timestamp when the subscription period started.
887
+ */
888
+ startDate?: string;
889
+ /**
890
+ * Format: date-time
891
+ * @description Timestamp when the current subscription period ends.
892
+ */
893
+ endDate?: string;
894
+ /**
895
+ * @description Current status of the subscription (e.g. active, past_due, canceled).
896
+ * @enum {string}
897
+ */
898
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
899
+ /**
900
+ * Format: date-time
901
+ * @description Timestamp when the subscription was created.
902
+ */
903
+ createdAt?: string;
904
+ /**
905
+ * Format: date-time
906
+ * @description Timestamp when the subscription was last updated.
907
+ */
908
+ updatedAt?: string;
909
+ /**
910
+ * Format: date-time
911
+ * @description Timestamp when the subscription was soft-deleted, if applicable.
912
+ */
913
+ deletedAt?: string;
914
+ /** @description Billing ID of the subscription. The ID of the subscription in the external billing system (for example, Stripe). */
915
+ billingId: string;
916
+ };
917
+ };
918
+ };
919
+ /** @description Invalid request body or request param */
920
+ 400: {
921
+ headers: {
922
+ [name: string]: unknown;
923
+ };
924
+ content: {
925
+ "text/plain": string;
926
+ };
927
+ };
928
+ /** @description Expired JWT token used or insufficient privilege */
929
+ 401: {
930
+ headers: {
931
+ [name: string]: unknown;
932
+ };
933
+ content: {
934
+ "text/plain": string;
935
+ };
936
+ };
937
+ /** @description Result not found */
938
+ 404: {
939
+ headers: {
940
+ [name: string]: unknown;
941
+ };
942
+ content: {
943
+ "text/plain": string;
944
+ };
945
+ };
946
+ /** @description Internal server error */
947
+ 500: {
948
+ headers: {
949
+ [name: string]: unknown;
950
+ };
951
+ content: {
952
+ "text/plain": string;
953
+ };
954
+ };
955
+ };
956
+ };
957
+ previewSubscriptionUpgrade: {
958
+ parameters: {
959
+ query?: never;
960
+ header?: never;
961
+ path: {
962
+ /** @description Subscription ID */
963
+ subscriptionId: string;
964
+ };
965
+ cookie?: never;
966
+ };
967
+ requestBody: {
968
+ content: {
969
+ "application/json": {
970
+ /**
971
+ * Format: uuid
972
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
973
+ */
974
+ oldPlanId?: string;
975
+ /**
976
+ * Format: uuid
977
+ * @description A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.
978
+ */
979
+ newPlanId?: string;
980
+ };
981
+ };
982
+ };
983
+ responses: {
984
+ /** @description Preview of the upgraded subscription invoice */
985
+ 200: {
986
+ headers: {
987
+ [name: string]: unknown;
988
+ };
989
+ content: {
990
+ "application/json": Record<string, never>;
991
+ };
992
+ };
993
+ /** @description Invalid request body or request param */
994
+ 400: {
995
+ headers: {
996
+ [name: string]: unknown;
997
+ };
998
+ content: {
999
+ "text/plain": string;
1000
+ };
1001
+ };
1002
+ /** @description Expired JWT token used or insufficient privilege */
1003
+ 401: {
1004
+ headers: {
1005
+ [name: string]: unknown;
1006
+ };
1007
+ content: {
1008
+ "text/plain": string;
1009
+ };
1010
+ };
1011
+ /** @description Result not found */
1012
+ 404: {
1013
+ headers: {
1014
+ [name: string]: unknown;
1015
+ };
1016
+ content: {
1017
+ "text/plain": string;
1018
+ };
1019
+ };
1020
+ /** @description Internal server error */
1021
+ 500: {
1022
+ headers: {
1023
+ [name: string]: unknown;
1024
+ };
1025
+ content: {
1026
+ "text/plain": string;
1027
+ };
1028
+ };
1029
+ };
1030
+ };
1031
+ handleSubscriptionWebhook: {
1032
+ parameters: {
1033
+ query?: never;
1034
+ header?: never;
1035
+ path?: never;
1036
+ cookie?: never;
1037
+ };
1038
+ requestBody: {
1039
+ content: {
1040
+ "application/json": Record<string, never>;
1041
+ };
1042
+ };
1043
+ responses: {
1044
+ /** @description Webhook processed */
1045
+ 200: {
1046
+ headers: {
1047
+ [name: string]: unknown;
1048
+ };
1049
+ content?: never;
1050
+ };
1051
+ /** @description Invalid request body or request param */
1052
+ 400: {
1053
+ headers: {
1054
+ [name: string]: unknown;
1055
+ };
1056
+ content: {
1057
+ "text/plain": string;
1058
+ };
1059
+ };
1060
+ /** @description Expired JWT token used or insufficient privilege */
1061
+ 401: {
1062
+ headers: {
1063
+ [name: string]: unknown;
1064
+ };
1065
+ content: {
1066
+ "text/plain": string;
1067
+ };
1068
+ };
1069
+ /** @description Internal server error */
1070
+ 500: {
1071
+ headers: {
1072
+ [name: string]: unknown;
1073
+ };
1074
+ content: {
1075
+ "text/plain": string;
1076
+ };
1077
+ };
1078
+ };
911
1079
  };
912
- };
913
1080
  }
914
-
915
- export interface external {}