@solvapay/server 1.0.8-preview.6 → 1.0.8-preview.7
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/chunk-R5U7XKVJ.js +16 -0
- package/dist/dist-EPVKJAIP.js +94 -0
- package/dist/dist-JBJ4HMP7.js +94 -0
- package/dist/esm-5GYCIXIY.js +3475 -0
- package/dist/esm-UW7WCMEK.js +3475 -0
- package/dist/index.cjs +293 -12
- package/dist/index.d.cts +35 -3
- package/dist/index.d.ts +35 -3
- package/dist/index.js +289 -12
- package/dist/src/adapters/base.d.ts +57 -0
- package/dist/src/adapters/base.d.ts.map +1 -0
- package/dist/src/adapters/base.js +73 -0
- package/dist/src/adapters/base.js.map +1 -0
- package/dist/src/adapters/http.d.ts +25 -0
- package/dist/src/adapters/http.d.ts.map +1 -0
- package/dist/src/adapters/http.js +99 -0
- package/dist/src/adapters/http.js.map +1 -0
- package/dist/src/adapters/index.d.ts +11 -0
- package/dist/src/adapters/index.d.ts.map +1 -0
- package/dist/src/adapters/index.js +10 -0
- package/dist/src/adapters/index.js.map +1 -0
- package/dist/src/adapters/mcp.d.ts +24 -0
- package/dist/src/adapters/mcp.d.ts.map +1 -0
- package/dist/src/adapters/mcp.js +75 -0
- package/dist/src/adapters/mcp.js.map +1 -0
- package/dist/src/adapters/next.d.ts +24 -0
- package/dist/src/adapters/next.d.ts.map +1 -0
- package/dist/src/adapters/next.js +109 -0
- package/dist/src/adapters/next.js.map +1 -0
- package/dist/src/client.d.ts +58 -0
- package/dist/src/client.d.ts.map +1 -0
- package/dist/src/client.js +495 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/edge.d.ts +22 -0
- package/dist/src/edge.d.ts.map +1 -0
- package/dist/src/edge.js +91 -0
- package/dist/src/edge.js.map +1 -0
- package/dist/src/factory.d.ts +605 -0
- package/dist/src/factory.d.ts.map +1 -0
- package/dist/src/factory.js +215 -0
- package/dist/src/factory.js.map +1 -0
- package/dist/src/helpers/auth.d.ts +47 -0
- package/dist/src/helpers/auth.d.ts.map +1 -0
- package/dist/src/helpers/auth.js +73 -0
- package/dist/src/helpers/auth.js.map +1 -0
- package/dist/src/helpers/checkout.d.ts +45 -0
- package/dist/src/helpers/checkout.d.ts.map +1 -0
- package/dist/src/helpers/checkout.js +89 -0
- package/dist/src/helpers/checkout.js.map +1 -0
- package/dist/src/helpers/customer.d.ts +51 -0
- package/dist/src/helpers/customer.d.ts.map +1 -0
- package/dist/src/helpers/customer.js +77 -0
- package/dist/src/helpers/customer.js.map +1 -0
- package/dist/src/helpers/error.d.ts +15 -0
- package/dist/src/helpers/error.d.ts.map +1 -0
- package/dist/src/helpers/error.js +35 -0
- package/dist/src/helpers/error.js.map +1 -0
- package/dist/src/helpers/index.d.ts +17 -0
- package/dist/src/helpers/index.d.ts.map +1 -0
- package/dist/src/helpers/index.js +23 -0
- package/dist/src/helpers/index.js.map +1 -0
- package/dist/src/helpers/payment.d.ts +107 -0
- package/dist/src/helpers/payment.d.ts.map +1 -0
- package/dist/src/helpers/payment.js +150 -0
- package/dist/src/helpers/payment.js.map +1 -0
- package/dist/src/helpers/plans.d.ts +19 -0
- package/dist/src/helpers/plans.d.ts.map +1 -0
- package/dist/src/helpers/plans.js +53 -0
- package/dist/src/helpers/plans.js.map +1 -0
- package/dist/src/helpers/renewal.d.ts +23 -0
- package/dist/src/helpers/renewal.d.ts.map +1 -0
- package/dist/src/helpers/renewal.js +90 -0
- package/dist/src/helpers/renewal.js.map +1 -0
- package/dist/src/helpers/subscription.d.ts +23 -0
- package/dist/src/helpers/subscription.d.ts.map +1 -0
- package/dist/src/helpers/subscription.js +101 -0
- package/dist/src/helpers/subscription.js.map +1 -0
- package/dist/src/helpers/types.d.ts +22 -0
- package/dist/src/helpers/types.d.ts.map +1 -0
- package/dist/src/helpers/types.js +7 -0
- package/dist/src/helpers/types.js.map +1 -0
- package/dist/src/index.d.ts +73 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +106 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/mcp/auth-bridge.d.ts +9 -0
- package/dist/src/mcp/auth-bridge.d.ts.map +1 -0
- package/dist/src/mcp/auth-bridge.js +46 -0
- package/dist/src/mcp/auth-bridge.js.map +1 -0
- package/dist/src/mcp/oauth-bridge.d.ts +48 -0
- package/dist/src/mcp/oauth-bridge.d.ts.map +1 -0
- package/dist/src/mcp/oauth-bridge.js +110 -0
- package/dist/src/mcp/oauth-bridge.js.map +1 -0
- package/dist/src/mcp-auth.d.ts +17 -0
- package/dist/src/mcp-auth.d.ts.map +1 -0
- package/dist/src/mcp-auth.js +57 -0
- package/dist/src/mcp-auth.js.map +1 -0
- package/dist/src/paywall.d.ts +119 -0
- package/dist/src/paywall.d.ts.map +1 -0
- package/dist/src/paywall.js +700 -0
- package/dist/src/paywall.js.map +1 -0
- package/dist/src/register-virtual-tools-mcp.d.ts +23 -0
- package/dist/src/register-virtual-tools-mcp.d.ts.map +1 -0
- package/dist/src/register-virtual-tools-mcp.js +86 -0
- package/dist/src/register-virtual-tools-mcp.js.map +1 -0
- package/dist/src/types/client.d.ts +216 -0
- package/dist/src/types/client.d.ts.map +1 -0
- package/dist/src/types/client.js +7 -0
- package/dist/src/types/client.js.map +1 -0
- package/dist/src/types/generated.d.ts +2834 -0
- package/dist/src/types/generated.d.ts.map +1 -0
- package/dist/src/types/generated.js +6 -0
- package/dist/src/types/generated.js.map +1 -0
- package/dist/src/types/index.d.ts +13 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +8 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/options.d.ts +126 -0
- package/dist/src/types/options.d.ts.map +1 -0
- package/dist/src/types/options.js +8 -0
- package/dist/src/types/options.js.map +1 -0
- package/dist/src/types/paywall.d.ts +64 -0
- package/dist/src/types/paywall.d.ts.map +1 -0
- package/dist/src/types/paywall.js +7 -0
- package/dist/src/types/paywall.js.map +1 -0
- package/dist/src/types/webhook.d.ts +50 -0
- package/dist/src/types/webhook.d.ts.map +1 -0
- package/dist/src/types/webhook.js +2 -0
- package/dist/src/types/webhook.js.map +1 -0
- package/dist/src/utils.d.ts +110 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +217 -0
- package/dist/src/utils.js.map +1 -0
- package/dist/src/virtual-tools.d.ts +44 -0
- package/dist/src/virtual-tools.d.ts.map +1 -0
- package/dist/src/virtual-tools.js +140 -0
- package/dist/src/virtual-tools.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,2834 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/v1/sdk/payment-intents": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* List payment intents for the provider
|
|
15
|
+
* @description Retrieves a paginated list of all payment intents created by the authenticated provider. Supports pagination through limit and offset query parameters.
|
|
16
|
+
*/
|
|
17
|
+
get: operations["PaymentIntentSdkController_getPaymentIntents"];
|
|
18
|
+
put?: never;
|
|
19
|
+
/**
|
|
20
|
+
* Create a payment intent
|
|
21
|
+
* @description Creates a new payment intent for a customer to purchase a plan. Payment intents are used with Stripe.js to process payments. Requires an idempotency key to prevent duplicate charges. Returns client secret and publishable key needed for frontend integration.
|
|
22
|
+
*/
|
|
23
|
+
post: operations["PaymentIntentSdkController_createPaymentIntent"];
|
|
24
|
+
delete?: never;
|
|
25
|
+
options?: never;
|
|
26
|
+
head?: never;
|
|
27
|
+
patch?: never;
|
|
28
|
+
trace?: never;
|
|
29
|
+
};
|
|
30
|
+
"/v1/sdk/payment-intents/{id}": {
|
|
31
|
+
parameters: {
|
|
32
|
+
query?: never;
|
|
33
|
+
header?: never;
|
|
34
|
+
path?: never;
|
|
35
|
+
cookie?: never;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Get a specific payment intent by ID
|
|
39
|
+
* @description Retrieves detailed information about a specific payment intent including amount, currency, and client secret for Stripe integration.
|
|
40
|
+
*/
|
|
41
|
+
get: operations["PaymentIntentSdkController_getPaymentIntent"];
|
|
42
|
+
put?: never;
|
|
43
|
+
post?: never;
|
|
44
|
+
delete?: never;
|
|
45
|
+
options?: never;
|
|
46
|
+
head?: never;
|
|
47
|
+
patch?: never;
|
|
48
|
+
trace?: never;
|
|
49
|
+
};
|
|
50
|
+
"/v1/sdk/payment-intents/{id}/process": {
|
|
51
|
+
parameters: {
|
|
52
|
+
query?: never;
|
|
53
|
+
header?: never;
|
|
54
|
+
path?: never;
|
|
55
|
+
cookie?: never;
|
|
56
|
+
};
|
|
57
|
+
get?: never;
|
|
58
|
+
put?: never;
|
|
59
|
+
/**
|
|
60
|
+
* Process payment intent after client-side confirmation
|
|
61
|
+
* @description Processes a payment intent that has been confirmed on the client-side using Stripe.js. Polls the database for payment intent status to become succeeded (up to 10 seconds). Returns the current status of the payment intent.
|
|
62
|
+
*/
|
|
63
|
+
post: operations["PaymentIntentSdkController_processPaymentIntent"];
|
|
64
|
+
delete?: never;
|
|
65
|
+
options?: never;
|
|
66
|
+
head?: never;
|
|
67
|
+
patch?: never;
|
|
68
|
+
trace?: never;
|
|
69
|
+
};
|
|
70
|
+
"/v1/sdk/checkout-sessions": {
|
|
71
|
+
parameters: {
|
|
72
|
+
query?: never;
|
|
73
|
+
header?: never;
|
|
74
|
+
path?: never;
|
|
75
|
+
cookie?: never;
|
|
76
|
+
};
|
|
77
|
+
get?: never;
|
|
78
|
+
put?: never;
|
|
79
|
+
/**
|
|
80
|
+
* Create a checkout session
|
|
81
|
+
* @description Creates a hosted checkout session for a customer to purchase a product plan. Returns a session ID and checkout URL for redirect.
|
|
82
|
+
*/
|
|
83
|
+
post: operations["CheckoutSessionSdkController_createCheckoutSession"];
|
|
84
|
+
delete?: never;
|
|
85
|
+
options?: never;
|
|
86
|
+
head?: never;
|
|
87
|
+
patch?: never;
|
|
88
|
+
trace?: never;
|
|
89
|
+
};
|
|
90
|
+
"/v1/sdk/products/{productRef}/plans": {
|
|
91
|
+
parameters: {
|
|
92
|
+
query?: never;
|
|
93
|
+
header?: never;
|
|
94
|
+
path?: never;
|
|
95
|
+
cookie?: never;
|
|
96
|
+
};
|
|
97
|
+
/** List plans for a product */
|
|
98
|
+
get: operations["PlanSdkController_listPlans"];
|
|
99
|
+
put?: never;
|
|
100
|
+
/** Create a plan for a product */
|
|
101
|
+
post: operations["PlanSdkController_createPlan"];
|
|
102
|
+
delete?: never;
|
|
103
|
+
options?: never;
|
|
104
|
+
head?: never;
|
|
105
|
+
patch?: never;
|
|
106
|
+
trace?: never;
|
|
107
|
+
};
|
|
108
|
+
"/v1/sdk/products/{productRef}/plans/{planRef}": {
|
|
109
|
+
parameters: {
|
|
110
|
+
query?: never;
|
|
111
|
+
header?: never;
|
|
112
|
+
path?: never;
|
|
113
|
+
cookie?: never;
|
|
114
|
+
};
|
|
115
|
+
/** Get a plan for a product */
|
|
116
|
+
get: operations["PlanSdkController_getPlan"];
|
|
117
|
+
/** Update a plan for a product */
|
|
118
|
+
put: operations["PlanSdkController_updatePlan"];
|
|
119
|
+
post?: never;
|
|
120
|
+
/** Delete a plan from a product */
|
|
121
|
+
delete: operations["PlanSdkController_deletePlan"];
|
|
122
|
+
options?: never;
|
|
123
|
+
head?: never;
|
|
124
|
+
patch?: never;
|
|
125
|
+
trace?: never;
|
|
126
|
+
};
|
|
127
|
+
"/v1/sdk/products": {
|
|
128
|
+
parameters: {
|
|
129
|
+
query?: never;
|
|
130
|
+
header?: never;
|
|
131
|
+
path?: never;
|
|
132
|
+
cookie?: never;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* List products
|
|
136
|
+
* @description Retrieves a paginated list of products for the authenticated provider. Supports filtering by status, search term, and MCP Pay flag.
|
|
137
|
+
*/
|
|
138
|
+
get: operations["ProductSdkController_listProducts"];
|
|
139
|
+
put?: never;
|
|
140
|
+
/**
|
|
141
|
+
* Create a product
|
|
142
|
+
* @description Creates a new product for the authenticated provider.
|
|
143
|
+
*/
|
|
144
|
+
post: operations["ProductSdkController_createProduct"];
|
|
145
|
+
delete?: never;
|
|
146
|
+
options?: never;
|
|
147
|
+
head?: never;
|
|
148
|
+
patch?: never;
|
|
149
|
+
trace?: never;
|
|
150
|
+
};
|
|
151
|
+
"/v1/sdk/products/{productRef}": {
|
|
152
|
+
parameters: {
|
|
153
|
+
query?: never;
|
|
154
|
+
header?: never;
|
|
155
|
+
path?: never;
|
|
156
|
+
cookie?: never;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Get a product by reference
|
|
160
|
+
* @description Retrieves a product by its reference or ID, including embedded plans.
|
|
161
|
+
*/
|
|
162
|
+
get: operations["ProductSdkController_getProduct"];
|
|
163
|
+
/**
|
|
164
|
+
* Update a product
|
|
165
|
+
* @description Updates an existing product. Only provided fields are updated.
|
|
166
|
+
*/
|
|
167
|
+
put: operations["ProductSdkController_updateProduct"];
|
|
168
|
+
post?: never;
|
|
169
|
+
/**
|
|
170
|
+
* Delete a product
|
|
171
|
+
* @description Deletes a product permanently in sandbox or when no purchases exist. In live mode with purchases, the product is deactivated instead.
|
|
172
|
+
*/
|
|
173
|
+
delete: operations["ProductSdkController_deleteProduct"];
|
|
174
|
+
options?: never;
|
|
175
|
+
head?: never;
|
|
176
|
+
patch?: never;
|
|
177
|
+
trace?: never;
|
|
178
|
+
};
|
|
179
|
+
"/v1/sdk/products/mcp/bootstrap": {
|
|
180
|
+
parameters: {
|
|
181
|
+
query?: never;
|
|
182
|
+
header?: never;
|
|
183
|
+
path?: never;
|
|
184
|
+
cookie?: never;
|
|
185
|
+
};
|
|
186
|
+
get?: never;
|
|
187
|
+
put?: never;
|
|
188
|
+
/**
|
|
189
|
+
* Bootstrap MCP product integration
|
|
190
|
+
* @description Creates an MCP-enabled product with a unified plans array, configures origin URL, and maps tools to plans in one request.
|
|
191
|
+
*/
|
|
192
|
+
post: operations["ProductSdkController_bootstrapMcpProduct"];
|
|
193
|
+
delete?: never;
|
|
194
|
+
options?: never;
|
|
195
|
+
head?: never;
|
|
196
|
+
patch?: never;
|
|
197
|
+
trace?: never;
|
|
198
|
+
};
|
|
199
|
+
"/v1/sdk/products/{productRef}/mcp/plans": {
|
|
200
|
+
parameters: {
|
|
201
|
+
query?: never;
|
|
202
|
+
header?: never;
|
|
203
|
+
path?: never;
|
|
204
|
+
cookie?: never;
|
|
205
|
+
};
|
|
206
|
+
get?: never;
|
|
207
|
+
/**
|
|
208
|
+
* Configure MCP plans on an MCP product
|
|
209
|
+
* @description Configures plans and optional tool-to-plan mappings for an MCP product.
|
|
210
|
+
*/
|
|
211
|
+
put: operations["ProductSdkController_configureMcpPlans"];
|
|
212
|
+
post?: never;
|
|
213
|
+
delete?: never;
|
|
214
|
+
options?: never;
|
|
215
|
+
head?: never;
|
|
216
|
+
patch?: never;
|
|
217
|
+
trace?: never;
|
|
218
|
+
};
|
|
219
|
+
"/v1/sdk/products/{productRef}/clone": {
|
|
220
|
+
parameters: {
|
|
221
|
+
query?: never;
|
|
222
|
+
header?: never;
|
|
223
|
+
path?: never;
|
|
224
|
+
cookie?: never;
|
|
225
|
+
};
|
|
226
|
+
get?: never;
|
|
227
|
+
put?: never;
|
|
228
|
+
/**
|
|
229
|
+
* Clone a product
|
|
230
|
+
* @description Deep-copies a product including all its plans. Generates new references for the clone.
|
|
231
|
+
*/
|
|
232
|
+
post: operations["ProductSdkController_cloneProduct"];
|
|
233
|
+
delete?: never;
|
|
234
|
+
options?: never;
|
|
235
|
+
head?: never;
|
|
236
|
+
patch?: never;
|
|
237
|
+
trace?: never;
|
|
238
|
+
};
|
|
239
|
+
"/v1/sdk/usages": {
|
|
240
|
+
parameters: {
|
|
241
|
+
query?: never;
|
|
242
|
+
header?: never;
|
|
243
|
+
path?: never;
|
|
244
|
+
cookie?: never;
|
|
245
|
+
};
|
|
246
|
+
get?: never;
|
|
247
|
+
put?: never;
|
|
248
|
+
/**
|
|
249
|
+
* Record a usage event
|
|
250
|
+
* @description Records a usage event into the Usage timeseries collection.
|
|
251
|
+
*/
|
|
252
|
+
post: operations["UsageSdkController_recordUsage"];
|
|
253
|
+
delete?: never;
|
|
254
|
+
options?: never;
|
|
255
|
+
head?: never;
|
|
256
|
+
patch?: never;
|
|
257
|
+
trace?: never;
|
|
258
|
+
};
|
|
259
|
+
"/v1/sdk/usages/bulk": {
|
|
260
|
+
parameters: {
|
|
261
|
+
query?: never;
|
|
262
|
+
header?: never;
|
|
263
|
+
path?: never;
|
|
264
|
+
cookie?: never;
|
|
265
|
+
};
|
|
266
|
+
get?: never;
|
|
267
|
+
put?: never;
|
|
268
|
+
/**
|
|
269
|
+
* Record bulk usage events
|
|
270
|
+
* @description Records multiple usage events in a single request.
|
|
271
|
+
*/
|
|
272
|
+
post: operations["UsageSdkController_recordBulkUsage"];
|
|
273
|
+
delete?: never;
|
|
274
|
+
options?: never;
|
|
275
|
+
head?: never;
|
|
276
|
+
patch?: never;
|
|
277
|
+
trace?: never;
|
|
278
|
+
};
|
|
279
|
+
"/v1/sdk/meter-events": {
|
|
280
|
+
parameters: {
|
|
281
|
+
query?: never;
|
|
282
|
+
header?: never;
|
|
283
|
+
path?: never;
|
|
284
|
+
cookie?: never;
|
|
285
|
+
};
|
|
286
|
+
get?: never;
|
|
287
|
+
put?: never;
|
|
288
|
+
/**
|
|
289
|
+
* Record a meter event
|
|
290
|
+
* @description Records a single usage event against a named meter.
|
|
291
|
+
*/
|
|
292
|
+
post: operations["MeterEventsSdkController_recordEvent"];
|
|
293
|
+
delete?: never;
|
|
294
|
+
options?: never;
|
|
295
|
+
head?: never;
|
|
296
|
+
patch?: never;
|
|
297
|
+
trace?: never;
|
|
298
|
+
};
|
|
299
|
+
"/v1/sdk/meter-events/bulk": {
|
|
300
|
+
parameters: {
|
|
301
|
+
query?: never;
|
|
302
|
+
header?: never;
|
|
303
|
+
path?: never;
|
|
304
|
+
cookie?: never;
|
|
305
|
+
};
|
|
306
|
+
get?: never;
|
|
307
|
+
put?: never;
|
|
308
|
+
/**
|
|
309
|
+
* Record meter events in bulk
|
|
310
|
+
* @description Records multiple usage events in a single request for high throughput.
|
|
311
|
+
*/
|
|
312
|
+
post: operations["MeterEventsSdkController_recordBulkEvents"];
|
|
313
|
+
delete?: never;
|
|
314
|
+
options?: never;
|
|
315
|
+
head?: never;
|
|
316
|
+
patch?: never;
|
|
317
|
+
trace?: never;
|
|
318
|
+
};
|
|
319
|
+
"/v1/sdk/customers": {
|
|
320
|
+
parameters: {
|
|
321
|
+
query?: never;
|
|
322
|
+
header?: never;
|
|
323
|
+
path?: never;
|
|
324
|
+
cookie?: never;
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* Get customer by reference, externalRef, or email
|
|
328
|
+
* @description Retrieves a customer's details using their unique reference ID, externalRef, or email. Use query parameter 'reference' to look up by customer reference, 'externalRef' for external auth ID, or 'email' for customer email. Exactly one parameter must be provided. Returns the customer's name, email, and active purchases. Only customers owned by the authenticated provider can be accessed.
|
|
329
|
+
*/
|
|
330
|
+
get: operations["CustomerSdkController_getCustomerByQuery"];
|
|
331
|
+
put?: never;
|
|
332
|
+
/**
|
|
333
|
+
* Create a new customer
|
|
334
|
+
* @description Creates a new customer record for the authenticated provider. Customers represent end-users who will purchase your products. Email is required and must be unique per provider. The name field is optional but recommended for better tracking.
|
|
335
|
+
*/
|
|
336
|
+
post: operations["CustomerSdkController_createCustomer"];
|
|
337
|
+
delete?: never;
|
|
338
|
+
options?: never;
|
|
339
|
+
head?: never;
|
|
340
|
+
patch?: never;
|
|
341
|
+
trace?: never;
|
|
342
|
+
};
|
|
343
|
+
"/v1/sdk/customers/{reference}": {
|
|
344
|
+
parameters: {
|
|
345
|
+
query?: never;
|
|
346
|
+
header?: never;
|
|
347
|
+
path?: never;
|
|
348
|
+
cookie?: never;
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Get customer by reference
|
|
352
|
+
* @description Retrieves a customer's details using their unique reference ID. Returns the customer's name, email, and active purchases. Only customers owned by the authenticated provider can be accessed.
|
|
353
|
+
*/
|
|
354
|
+
get: operations["CustomerSdkController_getCustomer"];
|
|
355
|
+
put?: never;
|
|
356
|
+
post?: never;
|
|
357
|
+
delete?: never;
|
|
358
|
+
options?: never;
|
|
359
|
+
head?: never;
|
|
360
|
+
patch?: never;
|
|
361
|
+
trace?: never;
|
|
362
|
+
};
|
|
363
|
+
"/v1/sdk/customers/customer-sessions": {
|
|
364
|
+
parameters: {
|
|
365
|
+
query?: never;
|
|
366
|
+
header?: never;
|
|
367
|
+
path?: never;
|
|
368
|
+
cookie?: never;
|
|
369
|
+
};
|
|
370
|
+
get?: never;
|
|
371
|
+
put?: never;
|
|
372
|
+
/**
|
|
373
|
+
* Create a customer session
|
|
374
|
+
* @description Creates a customer session URL that can be used to redirect customers to the customer page. Returns the customer URL and session ID. The session is short-lived (15 minutes) for security reasons.
|
|
375
|
+
*/
|
|
376
|
+
post: operations["CustomerSdkController_createCustomerSession"];
|
|
377
|
+
delete?: never;
|
|
378
|
+
options?: never;
|
|
379
|
+
head?: never;
|
|
380
|
+
patch?: never;
|
|
381
|
+
trace?: never;
|
|
382
|
+
};
|
|
383
|
+
"/v1/sdk/customers/customer-sessions/{sessionId}": {
|
|
384
|
+
parameters: {
|
|
385
|
+
query?: never;
|
|
386
|
+
header?: never;
|
|
387
|
+
path?: never;
|
|
388
|
+
cookie?: never;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Get customer session by sessionId
|
|
392
|
+
* @description Retrieves a customer session by its sessionId with all data hydrated including customer details and purchases. The session must belong to the authenticated provider.
|
|
393
|
+
*/
|
|
394
|
+
get: operations["CustomerSdkController_getCustomerSession"];
|
|
395
|
+
put?: never;
|
|
396
|
+
post?: never;
|
|
397
|
+
delete?: never;
|
|
398
|
+
options?: never;
|
|
399
|
+
head?: never;
|
|
400
|
+
patch?: never;
|
|
401
|
+
trace?: never;
|
|
402
|
+
};
|
|
403
|
+
"/v1/sdk/user-info": {
|
|
404
|
+
parameters: {
|
|
405
|
+
query?: never;
|
|
406
|
+
header?: never;
|
|
407
|
+
path?: never;
|
|
408
|
+
cookie?: never;
|
|
409
|
+
};
|
|
410
|
+
get?: never;
|
|
411
|
+
put?: never;
|
|
412
|
+
/**
|
|
413
|
+
* Get user info and purchase status
|
|
414
|
+
* @description Returns customer profile, active purchase details including usage and plan info, and a customer portal URL.
|
|
415
|
+
*/
|
|
416
|
+
post: operations["UserInfoSdkController_getUserInfo"];
|
|
417
|
+
delete?: never;
|
|
418
|
+
options?: never;
|
|
419
|
+
head?: never;
|
|
420
|
+
patch?: never;
|
|
421
|
+
trace?: never;
|
|
422
|
+
};
|
|
423
|
+
"/v1/sdk/purchases": {
|
|
424
|
+
parameters: {
|
|
425
|
+
query?: never;
|
|
426
|
+
header?: never;
|
|
427
|
+
path?: never;
|
|
428
|
+
cookie?: never;
|
|
429
|
+
};
|
|
430
|
+
/**
|
|
431
|
+
* List purchases for provider
|
|
432
|
+
* @description Retrieves all purchases for the authenticated provider with optional filtering by status, product, or customer.
|
|
433
|
+
*/
|
|
434
|
+
get: operations["PurchaseSdkController_listPurchases"];
|
|
435
|
+
put?: never;
|
|
436
|
+
post?: never;
|
|
437
|
+
delete?: never;
|
|
438
|
+
options?: never;
|
|
439
|
+
head?: never;
|
|
440
|
+
patch?: never;
|
|
441
|
+
trace?: never;
|
|
442
|
+
};
|
|
443
|
+
"/v1/sdk/purchases/customer/{customerRef}": {
|
|
444
|
+
parameters: {
|
|
445
|
+
query?: never;
|
|
446
|
+
header?: never;
|
|
447
|
+
path?: never;
|
|
448
|
+
cookie?: never;
|
|
449
|
+
};
|
|
450
|
+
/**
|
|
451
|
+
* Get purchases for a customer
|
|
452
|
+
* @description Retrieves all purchases for a specific customer. Useful for billing history and access checks.
|
|
453
|
+
*/
|
|
454
|
+
get: operations["PurchaseSdkController_getPurchasesForCustomer"];
|
|
455
|
+
put?: never;
|
|
456
|
+
post?: never;
|
|
457
|
+
delete?: never;
|
|
458
|
+
options?: never;
|
|
459
|
+
head?: never;
|
|
460
|
+
patch?: never;
|
|
461
|
+
trace?: never;
|
|
462
|
+
};
|
|
463
|
+
"/v1/sdk/purchases/product/{productRef}": {
|
|
464
|
+
parameters: {
|
|
465
|
+
query?: never;
|
|
466
|
+
header?: never;
|
|
467
|
+
path?: never;
|
|
468
|
+
cookie?: never;
|
|
469
|
+
};
|
|
470
|
+
/**
|
|
471
|
+
* Get purchases for a product
|
|
472
|
+
* @description Retrieves all purchases for a specific product. Each billing period creates a new purchase document.
|
|
473
|
+
*/
|
|
474
|
+
get: operations["PurchaseSdkController_getPurchasesForProduct"];
|
|
475
|
+
put?: never;
|
|
476
|
+
post?: never;
|
|
477
|
+
delete?: never;
|
|
478
|
+
options?: never;
|
|
479
|
+
head?: never;
|
|
480
|
+
patch?: never;
|
|
481
|
+
trace?: never;
|
|
482
|
+
};
|
|
483
|
+
"/v1/sdk/purchases/{id}": {
|
|
484
|
+
parameters: {
|
|
485
|
+
query?: never;
|
|
486
|
+
header?: never;
|
|
487
|
+
path?: never;
|
|
488
|
+
cookie?: never;
|
|
489
|
+
};
|
|
490
|
+
/**
|
|
491
|
+
* Get a purchase by ID or reference
|
|
492
|
+
* @description Retrieves a single purchase including plan snapshot, usage, and billing details.
|
|
493
|
+
*/
|
|
494
|
+
get: operations["PurchaseSdkController_getPurchase"];
|
|
495
|
+
put?: never;
|
|
496
|
+
post?: never;
|
|
497
|
+
delete?: never;
|
|
498
|
+
options?: never;
|
|
499
|
+
head?: never;
|
|
500
|
+
patch?: never;
|
|
501
|
+
trace?: never;
|
|
502
|
+
};
|
|
503
|
+
"/v1/sdk/purchases/{purchaseRef}/cancel": {
|
|
504
|
+
parameters: {
|
|
505
|
+
query?: never;
|
|
506
|
+
header?: never;
|
|
507
|
+
path?: never;
|
|
508
|
+
cookie?: never;
|
|
509
|
+
};
|
|
510
|
+
get?: never;
|
|
511
|
+
put?: never;
|
|
512
|
+
/**
|
|
513
|
+
* Cancel a purchase
|
|
514
|
+
* @description Cancels an active purchase. For recurring purchases, cancellation takes effect at the end of the current billing period.
|
|
515
|
+
*/
|
|
516
|
+
post: operations["PurchaseSdkController_cancelPurchase"];
|
|
517
|
+
delete?: never;
|
|
518
|
+
options?: never;
|
|
519
|
+
head?: never;
|
|
520
|
+
patch?: never;
|
|
521
|
+
trace?: never;
|
|
522
|
+
};
|
|
523
|
+
"/v1/sdk/limits": {
|
|
524
|
+
parameters: {
|
|
525
|
+
query?: never;
|
|
526
|
+
header?: never;
|
|
527
|
+
path?: never;
|
|
528
|
+
cookie?: never;
|
|
529
|
+
};
|
|
530
|
+
get?: never;
|
|
531
|
+
put?: never;
|
|
532
|
+
/**
|
|
533
|
+
* Check usage limits for a customer and product
|
|
534
|
+
* @description Checks whether a customer has an active purchase for a product and is within their usage limits. Returns a checkout URL if payment is required.
|
|
535
|
+
*/
|
|
536
|
+
post: operations["LimitsSdkController_checkLimits"];
|
|
537
|
+
delete?: never;
|
|
538
|
+
options?: never;
|
|
539
|
+
head?: never;
|
|
540
|
+
patch?: never;
|
|
541
|
+
trace?: never;
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
export type webhooks = Record<string, never>;
|
|
545
|
+
export interface components {
|
|
546
|
+
schemas: {
|
|
547
|
+
CreatePaymentIntentDto: {
|
|
548
|
+
productRef?: string;
|
|
549
|
+
customerRef: string;
|
|
550
|
+
planRef?: string;
|
|
551
|
+
pricingTier?: string;
|
|
552
|
+
/**
|
|
553
|
+
* @default product
|
|
554
|
+
* @enum {string}
|
|
555
|
+
*/
|
|
556
|
+
purpose: "product" | "credit_topup" | "usage_billing";
|
|
557
|
+
amount?: number;
|
|
558
|
+
currency?: string;
|
|
559
|
+
description?: string;
|
|
560
|
+
};
|
|
561
|
+
CreateCheckoutSessionRequest: {
|
|
562
|
+
customerRef: string;
|
|
563
|
+
productRef?: string;
|
|
564
|
+
planRef?: string;
|
|
565
|
+
returnUrl?: string;
|
|
566
|
+
/** @enum {string} */
|
|
567
|
+
purpose?: "credit_topup";
|
|
568
|
+
};
|
|
569
|
+
CancelPurchaseRequest: {
|
|
570
|
+
reason?: string;
|
|
571
|
+
};
|
|
572
|
+
ProcessPaymentIntentDto: {
|
|
573
|
+
productRef: string;
|
|
574
|
+
customerRef: string;
|
|
575
|
+
planRef?: string;
|
|
576
|
+
};
|
|
577
|
+
CreateCheckoutSessionResponse: {
|
|
578
|
+
/**
|
|
579
|
+
* Checkout session ID/token
|
|
580
|
+
* @example e3f1c2d4b6a89f001122334455667788
|
|
581
|
+
*/
|
|
582
|
+
sessionId: string;
|
|
583
|
+
/**
|
|
584
|
+
* Full checkout URL based on backend configuration (ready to redirect customer)
|
|
585
|
+
* @example https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788
|
|
586
|
+
*/
|
|
587
|
+
checkoutUrl: string;
|
|
588
|
+
};
|
|
589
|
+
Plan: {
|
|
590
|
+
/**
|
|
591
|
+
* Plan type exposed in SDK
|
|
592
|
+
* @example recurring
|
|
593
|
+
* @enum {string}
|
|
594
|
+
*/
|
|
595
|
+
type: "recurring" | "one-time" | "usage-based";
|
|
596
|
+
/**
|
|
597
|
+
* Plan ID
|
|
598
|
+
* @example 507f1f77bcf86cd799439011
|
|
599
|
+
*/
|
|
600
|
+
id: string;
|
|
601
|
+
/**
|
|
602
|
+
* Plan reference
|
|
603
|
+
* @example pln_1A2B3C4D
|
|
604
|
+
*/
|
|
605
|
+
reference: string;
|
|
606
|
+
/**
|
|
607
|
+
* Plan name
|
|
608
|
+
* @example Starter
|
|
609
|
+
*/
|
|
610
|
+
name?: string;
|
|
611
|
+
/**
|
|
612
|
+
* Plan description
|
|
613
|
+
* @example Best for teams getting started
|
|
614
|
+
*/
|
|
615
|
+
description?: string;
|
|
616
|
+
/**
|
|
617
|
+
* Plan price in cents
|
|
618
|
+
* @example 2999
|
|
619
|
+
*/
|
|
620
|
+
price: number;
|
|
621
|
+
/**
|
|
622
|
+
* Currency code (ISO 4217)
|
|
623
|
+
* @example USD
|
|
624
|
+
*/
|
|
625
|
+
currency: string;
|
|
626
|
+
/**
|
|
627
|
+
* Currency symbol (derived from currency)
|
|
628
|
+
* @example $
|
|
629
|
+
*/
|
|
630
|
+
currencySymbol?: string;
|
|
631
|
+
/**
|
|
632
|
+
* Number of free units included
|
|
633
|
+
* @example 100
|
|
634
|
+
*/
|
|
635
|
+
freeUnits?: number;
|
|
636
|
+
/**
|
|
637
|
+
* One-time setup fee
|
|
638
|
+
* @example 500
|
|
639
|
+
*/
|
|
640
|
+
setupFee?: number;
|
|
641
|
+
/**
|
|
642
|
+
* Free trial period in days
|
|
643
|
+
* @example 14
|
|
644
|
+
*/
|
|
645
|
+
trialDays?: number;
|
|
646
|
+
/**
|
|
647
|
+
* Billing cycle
|
|
648
|
+
* @example monthly
|
|
649
|
+
*/
|
|
650
|
+
billingCycle?: string;
|
|
651
|
+
/**
|
|
652
|
+
* Billing model
|
|
653
|
+
* @example pre-paid
|
|
654
|
+
* @enum {string}
|
|
655
|
+
*/
|
|
656
|
+
billingModel?: "pre-paid" | "post-paid";
|
|
657
|
+
/**
|
|
658
|
+
* Price per usage unit in cents (supports decimals, e.g. 0.1 = 1/10 cent)
|
|
659
|
+
* @example 0.1
|
|
660
|
+
*/
|
|
661
|
+
pricePerUnit?: number;
|
|
662
|
+
/**
|
|
663
|
+
* What the plan measures for usage tracking
|
|
664
|
+
* @example requests
|
|
665
|
+
*/
|
|
666
|
+
measures?: string;
|
|
667
|
+
/**
|
|
668
|
+
* Usage limit for the meter
|
|
669
|
+
* @example 10000
|
|
670
|
+
*/
|
|
671
|
+
limit?: number;
|
|
672
|
+
/**
|
|
673
|
+
* Whether unused units roll over to next period
|
|
674
|
+
* @example false
|
|
675
|
+
*/
|
|
676
|
+
rolloverUnusedUnits?: boolean;
|
|
677
|
+
/** @description Usage limits */
|
|
678
|
+
limits?: {
|
|
679
|
+
[key: string]: unknown;
|
|
680
|
+
};
|
|
681
|
+
/** @description Plan features */
|
|
682
|
+
features?: {
|
|
683
|
+
[key: string]: unknown;
|
|
684
|
+
};
|
|
685
|
+
/**
|
|
686
|
+
* Whether payment is required
|
|
687
|
+
* @example true
|
|
688
|
+
*/
|
|
689
|
+
requiresPayment: boolean;
|
|
690
|
+
/**
|
|
691
|
+
* Whether the plan is active (derived from status)
|
|
692
|
+
* @example true
|
|
693
|
+
*/
|
|
694
|
+
isActive: boolean;
|
|
695
|
+
/** @description Maximum number of active users */
|
|
696
|
+
maxActiveUsers?: number;
|
|
697
|
+
/** @description Access expiry in days */
|
|
698
|
+
accessExpiryDays?: number;
|
|
699
|
+
/**
|
|
700
|
+
* Plan status
|
|
701
|
+
* @example active
|
|
702
|
+
*/
|
|
703
|
+
status: string;
|
|
704
|
+
/** @description Creation timestamp */
|
|
705
|
+
createdAt: string;
|
|
706
|
+
/** @description Last update timestamp */
|
|
707
|
+
updatedAt: string;
|
|
708
|
+
};
|
|
709
|
+
CreatePlanRequest: {
|
|
710
|
+
name?: string;
|
|
711
|
+
description?: string;
|
|
712
|
+
/** @enum {string} */
|
|
713
|
+
type?: "recurring" | "usage-based" | "hybrid" | "one-time";
|
|
714
|
+
/** @enum {string} */
|
|
715
|
+
billingCycle?: "weekly" | "monthly" | "quarterly" | "yearly" | "custom";
|
|
716
|
+
price?: number;
|
|
717
|
+
pricePerUnit?: number;
|
|
718
|
+
currency?: string;
|
|
719
|
+
/** @enum {string} */
|
|
720
|
+
billingModel?: "pre-paid" | "post-paid";
|
|
721
|
+
freeUnits?: number;
|
|
722
|
+
limit?: number;
|
|
723
|
+
limits: {
|
|
724
|
+
[key: string]: unknown;
|
|
725
|
+
};
|
|
726
|
+
metadata: {
|
|
727
|
+
[key: string]: unknown;
|
|
728
|
+
};
|
|
729
|
+
features: {
|
|
730
|
+
[key: string]: unknown;
|
|
731
|
+
};
|
|
732
|
+
/** @enum {string} */
|
|
733
|
+
status?: "active" | "inactive" | "archived";
|
|
734
|
+
maxActiveUsers?: number;
|
|
735
|
+
accessExpiryDays?: number;
|
|
736
|
+
default?: boolean;
|
|
737
|
+
};
|
|
738
|
+
UpdatePlanRequest: {
|
|
739
|
+
name?: string;
|
|
740
|
+
description?: string;
|
|
741
|
+
/** @enum {string} */
|
|
742
|
+
billingCycle?: "weekly" | "monthly" | "quarterly" | "yearly" | "custom";
|
|
743
|
+
price?: number;
|
|
744
|
+
pricePerUnit?: number;
|
|
745
|
+
currency?: string;
|
|
746
|
+
/** @enum {string} */
|
|
747
|
+
billingModel?: "pre-paid" | "post-paid";
|
|
748
|
+
freeUnits?: number;
|
|
749
|
+
limit?: number;
|
|
750
|
+
limits: {
|
|
751
|
+
[key: string]: unknown;
|
|
752
|
+
};
|
|
753
|
+
features: {
|
|
754
|
+
[key: string]: unknown;
|
|
755
|
+
};
|
|
756
|
+
/** @enum {string} */
|
|
757
|
+
status?: "active" | "inactive" | "archived";
|
|
758
|
+
maxActiveUsers?: number;
|
|
759
|
+
accessExpiryDays?: number;
|
|
760
|
+
metadata: {
|
|
761
|
+
[key: string]: unknown;
|
|
762
|
+
};
|
|
763
|
+
default?: boolean;
|
|
764
|
+
};
|
|
765
|
+
CreateProductRequest: {
|
|
766
|
+
name: string;
|
|
767
|
+
description?: string;
|
|
768
|
+
imageUrl?: string;
|
|
769
|
+
productType?: string;
|
|
770
|
+
isMcpPay?: boolean;
|
|
771
|
+
config: {
|
|
772
|
+
fulfillmentType?: string;
|
|
773
|
+
validityPeriod?: number;
|
|
774
|
+
deliveryMethod?: string;
|
|
775
|
+
};
|
|
776
|
+
metadata: {
|
|
777
|
+
[key: string]: unknown;
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
ProductConfigDto: {
|
|
781
|
+
/**
|
|
782
|
+
* Fulfillment type
|
|
783
|
+
* @example digital
|
|
784
|
+
*/
|
|
785
|
+
fulfillmentType?: string;
|
|
786
|
+
/**
|
|
787
|
+
* Validity period in days
|
|
788
|
+
* @example 30
|
|
789
|
+
*/
|
|
790
|
+
validityPeriod?: number;
|
|
791
|
+
/**
|
|
792
|
+
* Delivery method
|
|
793
|
+
* @example api
|
|
794
|
+
*/
|
|
795
|
+
deliveryMethod?: string;
|
|
796
|
+
};
|
|
797
|
+
SdkPlanResponse: {
|
|
798
|
+
/**
|
|
799
|
+
* Plan ID
|
|
800
|
+
* @example 507f1f77bcf86cd799439011
|
|
801
|
+
*/
|
|
802
|
+
id: string;
|
|
803
|
+
/**
|
|
804
|
+
* Plan reference
|
|
805
|
+
* @example pln_1A2B3C4D
|
|
806
|
+
*/
|
|
807
|
+
reference: string;
|
|
808
|
+
/**
|
|
809
|
+
* Plan price in cents
|
|
810
|
+
* @example 2999
|
|
811
|
+
*/
|
|
812
|
+
price: number;
|
|
813
|
+
/**
|
|
814
|
+
* Currency code (ISO 4217)
|
|
815
|
+
* @example USD
|
|
816
|
+
*/
|
|
817
|
+
currency: string;
|
|
818
|
+
/**
|
|
819
|
+
* Currency symbol
|
|
820
|
+
* @example $
|
|
821
|
+
*/
|
|
822
|
+
currencySymbol?: string;
|
|
823
|
+
/**
|
|
824
|
+
* One-time setup fee
|
|
825
|
+
* @example 500
|
|
826
|
+
*/
|
|
827
|
+
setupFee?: number;
|
|
828
|
+
/**
|
|
829
|
+
* Free trial period in days
|
|
830
|
+
* @example 14
|
|
831
|
+
*/
|
|
832
|
+
trialDays?: number;
|
|
833
|
+
/**
|
|
834
|
+
* Billing cycle
|
|
835
|
+
* @example monthly
|
|
836
|
+
*/
|
|
837
|
+
billingCycle?: string;
|
|
838
|
+
/**
|
|
839
|
+
* Billing model
|
|
840
|
+
* @example pre-paid
|
|
841
|
+
*/
|
|
842
|
+
billingModel?: string;
|
|
843
|
+
/**
|
|
844
|
+
* Price per usage unit in cents (supports decimals, e.g. 0.1 = 1/10 cent)
|
|
845
|
+
* @example 0.1
|
|
846
|
+
*/
|
|
847
|
+
pricePerUnit?: number;
|
|
848
|
+
/**
|
|
849
|
+
* What the plan measures for usage tracking
|
|
850
|
+
* @example requests
|
|
851
|
+
*/
|
|
852
|
+
measures?: string;
|
|
853
|
+
/**
|
|
854
|
+
* Usage limit for the meter
|
|
855
|
+
* @example 10000
|
|
856
|
+
*/
|
|
857
|
+
limit?: number;
|
|
858
|
+
/**
|
|
859
|
+
* Whether unused units roll over to next period
|
|
860
|
+
* @example false
|
|
861
|
+
*/
|
|
862
|
+
rolloverUnusedUnits?: boolean;
|
|
863
|
+
/**
|
|
864
|
+
* Included free units
|
|
865
|
+
* @example 1000
|
|
866
|
+
*/
|
|
867
|
+
freeUnits?: number;
|
|
868
|
+
/** @description Usage limits */
|
|
869
|
+
limits?: {
|
|
870
|
+
[key: string]: unknown;
|
|
871
|
+
};
|
|
872
|
+
/** @description Plan features */
|
|
873
|
+
features?: {
|
|
874
|
+
[key: string]: unknown;
|
|
875
|
+
};
|
|
876
|
+
/**
|
|
877
|
+
* Whether payment is required
|
|
878
|
+
* @example true
|
|
879
|
+
*/
|
|
880
|
+
requiresPayment: boolean;
|
|
881
|
+
/**
|
|
882
|
+
* Whether the plan is active
|
|
883
|
+
* @example true
|
|
884
|
+
*/
|
|
885
|
+
isActive: boolean;
|
|
886
|
+
/**
|
|
887
|
+
* Plan status
|
|
888
|
+
* @example active
|
|
889
|
+
*/
|
|
890
|
+
status: string;
|
|
891
|
+
/** @description Creation timestamp */
|
|
892
|
+
createdAt: string;
|
|
893
|
+
/** @description Last update timestamp */
|
|
894
|
+
updatedAt: string;
|
|
895
|
+
};
|
|
896
|
+
SdkProductResponse: {
|
|
897
|
+
/**
|
|
898
|
+
* Product ID
|
|
899
|
+
* @example 507f1f77bcf86cd799439011
|
|
900
|
+
*/
|
|
901
|
+
id: string;
|
|
902
|
+
/**
|
|
903
|
+
* Product reference
|
|
904
|
+
* @example prd_1A2B3C4D
|
|
905
|
+
*/
|
|
906
|
+
reference: string;
|
|
907
|
+
/**
|
|
908
|
+
* Product name
|
|
909
|
+
* @example AI Writing Assistant
|
|
910
|
+
*/
|
|
911
|
+
name: string;
|
|
912
|
+
/** @description Product description */
|
|
913
|
+
description?: string;
|
|
914
|
+
/** @description URL to the product image */
|
|
915
|
+
imageUrl?: string;
|
|
916
|
+
/** @description Free-form product type */
|
|
917
|
+
productType?: string;
|
|
918
|
+
/**
|
|
919
|
+
* Product status
|
|
920
|
+
* @example active
|
|
921
|
+
*/
|
|
922
|
+
status: string;
|
|
923
|
+
/**
|
|
924
|
+
* Product balance in cents
|
|
925
|
+
* @example 0
|
|
926
|
+
*/
|
|
927
|
+
balance: number;
|
|
928
|
+
/**
|
|
929
|
+
* Total number of transactions
|
|
930
|
+
* @example 0
|
|
931
|
+
*/
|
|
932
|
+
totalTransactions: number;
|
|
933
|
+
/**
|
|
934
|
+
* Whether this product uses MCP Pay proxy
|
|
935
|
+
* @example false
|
|
936
|
+
*/
|
|
937
|
+
isMcpPay: boolean;
|
|
938
|
+
/** @description Product-specific configuration */
|
|
939
|
+
config?: components["schemas"]["ProductConfigDto"];
|
|
940
|
+
/** @description Arbitrary key-value metadata */
|
|
941
|
+
metadata?: {
|
|
942
|
+
[key: string]: unknown;
|
|
943
|
+
};
|
|
944
|
+
/** @description Creation timestamp */
|
|
945
|
+
createdAt: string;
|
|
946
|
+
/** @description Last update timestamp */
|
|
947
|
+
updatedAt: string;
|
|
948
|
+
/** @description Plans associated with this product */
|
|
949
|
+
plans?: components["schemas"]["SdkPlanResponse"][];
|
|
950
|
+
/**
|
|
951
|
+
* MCP linkage details for MCP-enabled products
|
|
952
|
+
* @example {
|
|
953
|
+
* "mcpServerId": "67f90f1f1b1c9c0b8df0f111",
|
|
954
|
+
* "mcpServerRef": "mcp_ABC123",
|
|
955
|
+
* "mcpSubdomain": "acme-docs",
|
|
956
|
+
* "mcpProxyUrl": "https://acme-docs.mcp.solvapay.com/mcp",
|
|
957
|
+
* "originUrl": "https://origin.example.com/mcp",
|
|
958
|
+
* "defaultPlanId": "67f90f1f1b1c9c0b8df0f001"
|
|
959
|
+
* }
|
|
960
|
+
*/
|
|
961
|
+
mcp?: {
|
|
962
|
+
[key: string]: unknown;
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
UpdateProductRequest: {
|
|
966
|
+
name?: string;
|
|
967
|
+
description?: string;
|
|
968
|
+
imageUrl?: string;
|
|
969
|
+
productType?: string;
|
|
970
|
+
/** @enum {string} */
|
|
971
|
+
status?: "active" | "inactive" | "suspended";
|
|
972
|
+
config: {
|
|
973
|
+
fulfillmentType?: string;
|
|
974
|
+
validityPeriod?: number;
|
|
975
|
+
deliveryMethod?: string;
|
|
976
|
+
};
|
|
977
|
+
metadata: {
|
|
978
|
+
[key: string]: unknown;
|
|
979
|
+
};
|
|
980
|
+
};
|
|
981
|
+
McpBootstrapDto: {
|
|
982
|
+
name?: string;
|
|
983
|
+
description?: string;
|
|
984
|
+
imageUrl?: string;
|
|
985
|
+
productType?: string;
|
|
986
|
+
/** Format: uri */
|
|
987
|
+
originUrl: string;
|
|
988
|
+
mcpDomain?: string;
|
|
989
|
+
authHeaderName?: string;
|
|
990
|
+
authApiKey?: string;
|
|
991
|
+
plans?: {
|
|
992
|
+
key: string;
|
|
993
|
+
name: string;
|
|
994
|
+
price: number;
|
|
995
|
+
currency: string;
|
|
996
|
+
/** @enum {string} */
|
|
997
|
+
billingCycle?: "weekly" | "monthly" | "quarterly" | "yearly" | "custom";
|
|
998
|
+
/** @enum {string} */
|
|
999
|
+
type?: "recurring" | "one-time" | "usage-based";
|
|
1000
|
+
pricePerUnit?: number;
|
|
1001
|
+
/** @enum {string} */
|
|
1002
|
+
billingModel?: "pre-paid" | "post-paid";
|
|
1003
|
+
freeUnits?: number;
|
|
1004
|
+
meterId?: string;
|
|
1005
|
+
limit?: number;
|
|
1006
|
+
features?: {
|
|
1007
|
+
[key: string]: unknown;
|
|
1008
|
+
};
|
|
1009
|
+
}[];
|
|
1010
|
+
tools?: {
|
|
1011
|
+
name: string;
|
|
1012
|
+
description?: string;
|
|
1013
|
+
noPlan?: boolean;
|
|
1014
|
+
planIds?: string[];
|
|
1015
|
+
planRefs?: string[];
|
|
1016
|
+
planKeys?: string[];
|
|
1017
|
+
}[];
|
|
1018
|
+
metadata: {
|
|
1019
|
+
[key: string]: unknown;
|
|
1020
|
+
};
|
|
1021
|
+
};
|
|
1022
|
+
McpBootstrapResult: {
|
|
1023
|
+
/** @description Created product */
|
|
1024
|
+
product: components["schemas"]["SdkProductResponse"];
|
|
1025
|
+
/**
|
|
1026
|
+
* Created or updated MCP server identity
|
|
1027
|
+
* @example {
|
|
1028
|
+
* "id": "67f90f1f1b1c9c0b8df0f111",
|
|
1029
|
+
* "reference": "mcp_ABC123",
|
|
1030
|
+
* "subdomain": "acme-docs",
|
|
1031
|
+
* "mcpProxyUrl": "https://acme-docs.mcp.solvapay.com/mcp",
|
|
1032
|
+
* "url": "https://origin.example.com/mcp",
|
|
1033
|
+
* "defaultPlanId": "67f90f1f1b1c9c0b8df0f001"
|
|
1034
|
+
* }
|
|
1035
|
+
*/
|
|
1036
|
+
mcpServer: {
|
|
1037
|
+
[key: string]: unknown;
|
|
1038
|
+
};
|
|
1039
|
+
/**
|
|
1040
|
+
* Resolved plan mapping by bootstrap key
|
|
1041
|
+
* @example {
|
|
1042
|
+
* "free": {
|
|
1043
|
+
* "id": "67f90f1f1b1c9c0b8df0f001",
|
|
1044
|
+
* "reference": "pln_FREE123",
|
|
1045
|
+
* "name": "Free"
|
|
1046
|
+
* }
|
|
1047
|
+
* }
|
|
1048
|
+
*/
|
|
1049
|
+
planMap: {
|
|
1050
|
+
[key: string]: unknown;
|
|
1051
|
+
};
|
|
1052
|
+
/**
|
|
1053
|
+
* True when tools were auto-discovered from origin because the request omitted tools
|
|
1054
|
+
* @example true
|
|
1055
|
+
*/
|
|
1056
|
+
toolsAutoMapped?: boolean;
|
|
1057
|
+
/** @description Auto-discovered tools used during bootstrap */
|
|
1058
|
+
autoMappedTools?: {
|
|
1059
|
+
name?: string;
|
|
1060
|
+
description?: string;
|
|
1061
|
+
}[];
|
|
1062
|
+
};
|
|
1063
|
+
ConfigureMcpPlansDto: {
|
|
1064
|
+
plans?: {
|
|
1065
|
+
key: string;
|
|
1066
|
+
name: string;
|
|
1067
|
+
price: number;
|
|
1068
|
+
currency: string;
|
|
1069
|
+
/** @enum {string} */
|
|
1070
|
+
billingCycle?: "weekly" | "monthly" | "quarterly" | "yearly" | "custom";
|
|
1071
|
+
/** @enum {string} */
|
|
1072
|
+
type?: "recurring" | "one-time" | "usage-based";
|
|
1073
|
+
pricePerUnit?: number;
|
|
1074
|
+
/** @enum {string} */
|
|
1075
|
+
billingModel?: "pre-paid" | "post-paid";
|
|
1076
|
+
freeUnits?: number;
|
|
1077
|
+
meterId?: string;
|
|
1078
|
+
limit?: number;
|
|
1079
|
+
features?: {
|
|
1080
|
+
[key: string]: unknown;
|
|
1081
|
+
};
|
|
1082
|
+
}[];
|
|
1083
|
+
toolMapping?: {
|
|
1084
|
+
name: string;
|
|
1085
|
+
planKeys: string[];
|
|
1086
|
+
}[];
|
|
1087
|
+
};
|
|
1088
|
+
ConfigureMcpPlansResult: {
|
|
1089
|
+
/** @description Updated product */
|
|
1090
|
+
product: components["schemas"]["SdkProductResponse"];
|
|
1091
|
+
/** @description Updated MCP server identity */
|
|
1092
|
+
mcpServer: {
|
|
1093
|
+
[key: string]: unknown;
|
|
1094
|
+
};
|
|
1095
|
+
/** @description Resolved plan mapping by key (includes existing free plan) */
|
|
1096
|
+
planMap: {
|
|
1097
|
+
[key: string]: unknown;
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1100
|
+
CloneProductDto: {
|
|
1101
|
+
name?: string;
|
|
1102
|
+
};
|
|
1103
|
+
CreateUsageRequest: {
|
|
1104
|
+
customerId: string;
|
|
1105
|
+
/**
|
|
1106
|
+
* @default api_call
|
|
1107
|
+
* @enum {string}
|
|
1108
|
+
*/
|
|
1109
|
+
actionType: "transaction" | "api_call" | "hour" | "email" | "storage" | "custom";
|
|
1110
|
+
/** @default 1 */
|
|
1111
|
+
units: number;
|
|
1112
|
+
/**
|
|
1113
|
+
* @default success
|
|
1114
|
+
* @enum {string}
|
|
1115
|
+
*/
|
|
1116
|
+
outcome: "success" | "paywall" | "fail";
|
|
1117
|
+
productRef?: string;
|
|
1118
|
+
purchaseRef?: string;
|
|
1119
|
+
description?: string;
|
|
1120
|
+
errorMessage?: string;
|
|
1121
|
+
metadata: {
|
|
1122
|
+
[key: string]: unknown;
|
|
1123
|
+
};
|
|
1124
|
+
duration?: number;
|
|
1125
|
+
/** Format: date-time */
|
|
1126
|
+
timestamp: string;
|
|
1127
|
+
idempotencyKey?: string;
|
|
1128
|
+
};
|
|
1129
|
+
BulkCreateUsageRequest: {
|
|
1130
|
+
events: {
|
|
1131
|
+
customerId: string;
|
|
1132
|
+
/**
|
|
1133
|
+
* @default api_call
|
|
1134
|
+
* @enum {string}
|
|
1135
|
+
*/
|
|
1136
|
+
actionType: "transaction" | "api_call" | "hour" | "email" | "storage" | "custom";
|
|
1137
|
+
/** @default 1 */
|
|
1138
|
+
units: number;
|
|
1139
|
+
/**
|
|
1140
|
+
* @default success
|
|
1141
|
+
* @enum {string}
|
|
1142
|
+
*/
|
|
1143
|
+
outcome: "success" | "paywall" | "fail";
|
|
1144
|
+
productRef?: string;
|
|
1145
|
+
purchaseRef?: string;
|
|
1146
|
+
description?: string;
|
|
1147
|
+
errorMessage?: string;
|
|
1148
|
+
metadata?: {
|
|
1149
|
+
[key: string]: unknown;
|
|
1150
|
+
};
|
|
1151
|
+
duration?: number;
|
|
1152
|
+
/** Format: date-time */
|
|
1153
|
+
timestamp: string;
|
|
1154
|
+
idempotencyKey?: string;
|
|
1155
|
+
}[];
|
|
1156
|
+
};
|
|
1157
|
+
RecordMeterEventZodDto: {
|
|
1158
|
+
meterName: string;
|
|
1159
|
+
customerId: string;
|
|
1160
|
+
value?: number;
|
|
1161
|
+
properties: {
|
|
1162
|
+
[key: string]: unknown;
|
|
1163
|
+
};
|
|
1164
|
+
productId?: string;
|
|
1165
|
+
productRef?: string;
|
|
1166
|
+
timestamp?: string;
|
|
1167
|
+
};
|
|
1168
|
+
RecordBulkMeterEventsZodDto: {
|
|
1169
|
+
events: {
|
|
1170
|
+
meterName: string;
|
|
1171
|
+
customerId: string;
|
|
1172
|
+
value?: number;
|
|
1173
|
+
properties?: {
|
|
1174
|
+
[key: string]: unknown;
|
|
1175
|
+
};
|
|
1176
|
+
productId?: string;
|
|
1177
|
+
productRef?: string;
|
|
1178
|
+
timestamp?: string;
|
|
1179
|
+
}[];
|
|
1180
|
+
};
|
|
1181
|
+
CreateCustomerRequest: {
|
|
1182
|
+
/** Format: email */
|
|
1183
|
+
email: string;
|
|
1184
|
+
name?: string;
|
|
1185
|
+
telephone?: string;
|
|
1186
|
+
metadata: {
|
|
1187
|
+
[key: string]: unknown;
|
|
1188
|
+
};
|
|
1189
|
+
externalRef?: string;
|
|
1190
|
+
};
|
|
1191
|
+
CreateCustomerSessionRequest: {
|
|
1192
|
+
customerRef: string;
|
|
1193
|
+
productRef?: string;
|
|
1194
|
+
};
|
|
1195
|
+
PurchaseInfo: {
|
|
1196
|
+
/**
|
|
1197
|
+
* Purchase reference
|
|
1198
|
+
* @example pur_1A2B3C4D
|
|
1199
|
+
*/
|
|
1200
|
+
reference: string;
|
|
1201
|
+
/**
|
|
1202
|
+
* Product name
|
|
1203
|
+
* @example API Gateway Manager
|
|
1204
|
+
*/
|
|
1205
|
+
productName: string;
|
|
1206
|
+
/**
|
|
1207
|
+
* Product reference
|
|
1208
|
+
* @example prd_abc123
|
|
1209
|
+
*/
|
|
1210
|
+
productRef?: string;
|
|
1211
|
+
/**
|
|
1212
|
+
* Purchase status
|
|
1213
|
+
* @example active
|
|
1214
|
+
*/
|
|
1215
|
+
status: string;
|
|
1216
|
+
/**
|
|
1217
|
+
* Start date
|
|
1218
|
+
* @example 2025-10-27T10:00:00Z
|
|
1219
|
+
*/
|
|
1220
|
+
startDate: string;
|
|
1221
|
+
/**
|
|
1222
|
+
* Amount in USD cents (normalised for aggregation)
|
|
1223
|
+
* @example 9900
|
|
1224
|
+
*/
|
|
1225
|
+
amount: number;
|
|
1226
|
+
/**
|
|
1227
|
+
* Original amount in the payment currency (minor units)
|
|
1228
|
+
* @example 7500
|
|
1229
|
+
*/
|
|
1230
|
+
originalAmount?: number;
|
|
1231
|
+
/**
|
|
1232
|
+
* ISO 4217 currency code of the customer-facing charge
|
|
1233
|
+
* @example GBP
|
|
1234
|
+
*/
|
|
1235
|
+
currency: string;
|
|
1236
|
+
/**
|
|
1237
|
+
* Exchange rate from original currency to USD
|
|
1238
|
+
* @example 1.32
|
|
1239
|
+
*/
|
|
1240
|
+
exchangeRate?: number;
|
|
1241
|
+
/**
|
|
1242
|
+
* End date of purchase
|
|
1243
|
+
* @example 2025-11-27T10:00:00Z
|
|
1244
|
+
*/
|
|
1245
|
+
endDate?: string;
|
|
1246
|
+
/**
|
|
1247
|
+
* When purchase was cancelled
|
|
1248
|
+
* @example 2025-10-28T10:00:00Z
|
|
1249
|
+
*/
|
|
1250
|
+
cancelledAt?: string;
|
|
1251
|
+
/**
|
|
1252
|
+
* Reason for cancellation
|
|
1253
|
+
* @example Customer request
|
|
1254
|
+
*/
|
|
1255
|
+
cancellationReason?: string;
|
|
1256
|
+
/** @description Snapshot of the plan at time of purchase */
|
|
1257
|
+
planSnapshot?: Record<string, never>;
|
|
1258
|
+
};
|
|
1259
|
+
CustomerResponse: {
|
|
1260
|
+
/**
|
|
1261
|
+
* Customer reference identifier
|
|
1262
|
+
* @example cus_3c4d5e6f7g8h
|
|
1263
|
+
*/
|
|
1264
|
+
reference: string;
|
|
1265
|
+
/**
|
|
1266
|
+
* Customer full name
|
|
1267
|
+
* @example John Doe
|
|
1268
|
+
*/
|
|
1269
|
+
name: string;
|
|
1270
|
+
/**
|
|
1271
|
+
* Customer email address
|
|
1272
|
+
* @example customer@example.com
|
|
1273
|
+
*/
|
|
1274
|
+
email: string;
|
|
1275
|
+
/**
|
|
1276
|
+
* External reference ID from your auth system (if set during creation or update)
|
|
1277
|
+
* @example auth_user_12345
|
|
1278
|
+
*/
|
|
1279
|
+
externalRef?: string;
|
|
1280
|
+
/** @description Active purchases */
|
|
1281
|
+
purchases?: components["schemas"]["PurchaseInfo"][];
|
|
1282
|
+
};
|
|
1283
|
+
CreateCustomerSessionResponse: {
|
|
1284
|
+
/**
|
|
1285
|
+
* Customer session ID/token
|
|
1286
|
+
* @example e3f1c2d4b6a89f001122334455667788
|
|
1287
|
+
*/
|
|
1288
|
+
sessionId: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* Full customer URL based on backend configuration (ready to redirect customer)
|
|
1291
|
+
* @example https://solvapay.com/customer/manage?id=e3f1c2d4b6a89f001122334455667788
|
|
1292
|
+
*/
|
|
1293
|
+
customerUrl: string;
|
|
1294
|
+
};
|
|
1295
|
+
GetCustomerSessionResponse: {
|
|
1296
|
+
/**
|
|
1297
|
+
* Customer session ID/token
|
|
1298
|
+
* @example e3f1c2d4b6a89f001122334455667788
|
|
1299
|
+
*/
|
|
1300
|
+
sessionId: string;
|
|
1301
|
+
/**
|
|
1302
|
+
* Session status
|
|
1303
|
+
* @example active
|
|
1304
|
+
* @enum {string}
|
|
1305
|
+
*/
|
|
1306
|
+
status: "active" | "expired" | "used";
|
|
1307
|
+
/**
|
|
1308
|
+
* Full customer URL based on backend configuration (ready to redirect customer)
|
|
1309
|
+
* @example https://solvapay.com/customer/manage?id=e3f1c2d4b6a89f001122334455667788
|
|
1310
|
+
*/
|
|
1311
|
+
customerUrl: string;
|
|
1312
|
+
/**
|
|
1313
|
+
* Session expiration date
|
|
1314
|
+
* @example 2025-01-01T12:00:00.000Z
|
|
1315
|
+
*/
|
|
1316
|
+
expiresAt: string;
|
|
1317
|
+
/** @description Customer object from session data */
|
|
1318
|
+
customer: components["schemas"]["CustomerResponse"];
|
|
1319
|
+
/**
|
|
1320
|
+
* Session creation date
|
|
1321
|
+
* @example 2025-01-01T11:45:00.000Z
|
|
1322
|
+
*/
|
|
1323
|
+
createdAt: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Session last update date
|
|
1326
|
+
* @example 2025-01-01T11:45:00.000Z
|
|
1327
|
+
*/
|
|
1328
|
+
updatedAt: string;
|
|
1329
|
+
};
|
|
1330
|
+
UserInfoRequest: {
|
|
1331
|
+
customerRef: string;
|
|
1332
|
+
productRef: string;
|
|
1333
|
+
};
|
|
1334
|
+
UserInfoUserDto: {
|
|
1335
|
+
/** @example cus_3C4D5E6F */
|
|
1336
|
+
reference: string;
|
|
1337
|
+
/** @example John Doe */
|
|
1338
|
+
name?: string | null;
|
|
1339
|
+
/** @example john@example.com */
|
|
1340
|
+
email: string;
|
|
1341
|
+
/** @example auth_user_12345 */
|
|
1342
|
+
externalRef?: string | null;
|
|
1343
|
+
};
|
|
1344
|
+
UserInfoUsageDto: {
|
|
1345
|
+
/** @example 1000 */
|
|
1346
|
+
total: number;
|
|
1347
|
+
/** @example 250 */
|
|
1348
|
+
used: number;
|
|
1349
|
+
/** @example 750 */
|
|
1350
|
+
remaining: number;
|
|
1351
|
+
/**
|
|
1352
|
+
* Meter ObjectId reference
|
|
1353
|
+
* @example 507f1f77bcf86cd799439011
|
|
1354
|
+
*/
|
|
1355
|
+
meterId?: string;
|
|
1356
|
+
/** @example 25 */
|
|
1357
|
+
percentUsed?: number | null;
|
|
1358
|
+
};
|
|
1359
|
+
UserInfoPlanDto: {
|
|
1360
|
+
/** @example pln_2B3C4D5E */
|
|
1361
|
+
reference: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* Price in minor currency units (e.g. cents)
|
|
1364
|
+
* @example 2999
|
|
1365
|
+
*/
|
|
1366
|
+
price: number;
|
|
1367
|
+
/** @example USD */
|
|
1368
|
+
currency: string;
|
|
1369
|
+
/** @example recurring */
|
|
1370
|
+
type: string;
|
|
1371
|
+
/** @example monthly */
|
|
1372
|
+
billingCycle?: string | null;
|
|
1373
|
+
features?: string[] | null;
|
|
1374
|
+
limits?: {
|
|
1375
|
+
[key: string]: unknown;
|
|
1376
|
+
} | null;
|
|
1377
|
+
};
|
|
1378
|
+
UserInfoPurchaseDto: {
|
|
1379
|
+
/** @example pur_1A2B3C4D */
|
|
1380
|
+
reference: string;
|
|
1381
|
+
/** @example active */
|
|
1382
|
+
status: string;
|
|
1383
|
+
/** @example My API Product */
|
|
1384
|
+
productName: string;
|
|
1385
|
+
/** @example recurring */
|
|
1386
|
+
planType: string;
|
|
1387
|
+
/** @example 2025-10-27T10:00:00Z */
|
|
1388
|
+
startDate?: string | null;
|
|
1389
|
+
/** @example 2025-11-27T10:00:00Z */
|
|
1390
|
+
endDate?: string | null;
|
|
1391
|
+
usage?: components["schemas"]["UserInfoUsageDto"];
|
|
1392
|
+
plan?: components["schemas"]["UserInfoPlanDto"];
|
|
1393
|
+
};
|
|
1394
|
+
UserInfoResponse: {
|
|
1395
|
+
/**
|
|
1396
|
+
* Human-readable status summary
|
|
1397
|
+
* @example Active subscription: My API Product (25% usage consumed)
|
|
1398
|
+
*/
|
|
1399
|
+
status: string;
|
|
1400
|
+
/**
|
|
1401
|
+
* Customer portal session URL
|
|
1402
|
+
* @example https://solvapay.com/customer/manage?id=abc123
|
|
1403
|
+
*/
|
|
1404
|
+
verifyUrl?: string | null;
|
|
1405
|
+
user?: components["schemas"]["UserInfoUserDto"];
|
|
1406
|
+
purchase?: components["schemas"]["UserInfoPurchaseDto"];
|
|
1407
|
+
};
|
|
1408
|
+
PlanSnapshotDto: {
|
|
1409
|
+
/**
|
|
1410
|
+
* Plan reference
|
|
1411
|
+
* @example pln_1A2B3C4D
|
|
1412
|
+
*/
|
|
1413
|
+
reference?: string;
|
|
1414
|
+
/**
|
|
1415
|
+
* Plan price in cents
|
|
1416
|
+
* @example 2999
|
|
1417
|
+
*/
|
|
1418
|
+
price: number;
|
|
1419
|
+
/**
|
|
1420
|
+
* Currency code
|
|
1421
|
+
* @example USD
|
|
1422
|
+
*/
|
|
1423
|
+
currency: string;
|
|
1424
|
+
/**
|
|
1425
|
+
* Plan type
|
|
1426
|
+
* @example recurring
|
|
1427
|
+
*/
|
|
1428
|
+
planType: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* Billing cycle
|
|
1431
|
+
* @example monthly
|
|
1432
|
+
*/
|
|
1433
|
+
billingCycle?: string | null;
|
|
1434
|
+
/** @description Plan features */
|
|
1435
|
+
features?: {
|
|
1436
|
+
[key: string]: unknown;
|
|
1437
|
+
} | null;
|
|
1438
|
+
/** @description Usage limits */
|
|
1439
|
+
limits?: {
|
|
1440
|
+
[key: string]: unknown;
|
|
1441
|
+
} | null;
|
|
1442
|
+
/**
|
|
1443
|
+
* Meter ObjectId reference
|
|
1444
|
+
* @example 507f1f77bcf86cd799439011
|
|
1445
|
+
*/
|
|
1446
|
+
meterId?: string;
|
|
1447
|
+
/**
|
|
1448
|
+
* Usage limit for the meter
|
|
1449
|
+
* @example 5000
|
|
1450
|
+
*/
|
|
1451
|
+
limit?: number;
|
|
1452
|
+
/**
|
|
1453
|
+
* Number of free units included
|
|
1454
|
+
* @example 100
|
|
1455
|
+
*/
|
|
1456
|
+
freeUnits?: number;
|
|
1457
|
+
/**
|
|
1458
|
+
* Price per usage unit in cents (supports decimals, e.g. 0.1 = 1/10 cent)
|
|
1459
|
+
* @example 0.1
|
|
1460
|
+
*/
|
|
1461
|
+
pricePerUnit?: number;
|
|
1462
|
+
};
|
|
1463
|
+
UsageBillingDto: {
|
|
1464
|
+
/**
|
|
1465
|
+
* Units consumed in current period
|
|
1466
|
+
* @example 150
|
|
1467
|
+
*/
|
|
1468
|
+
used: number;
|
|
1469
|
+
/**
|
|
1470
|
+
* Units exceeding the plan limit
|
|
1471
|
+
* @example 0
|
|
1472
|
+
*/
|
|
1473
|
+
overageUnits: number;
|
|
1474
|
+
/**
|
|
1475
|
+
* Overage cost in cents
|
|
1476
|
+
* @example 0
|
|
1477
|
+
*/
|
|
1478
|
+
overageCost: number;
|
|
1479
|
+
/**
|
|
1480
|
+
* Period start date
|
|
1481
|
+
* @example 2025-10-01T00:00:00Z
|
|
1482
|
+
*/
|
|
1483
|
+
periodStart?: string;
|
|
1484
|
+
/**
|
|
1485
|
+
* Period end date
|
|
1486
|
+
* @example 2025-11-01T00:00:00Z
|
|
1487
|
+
*/
|
|
1488
|
+
periodEnd?: string;
|
|
1489
|
+
};
|
|
1490
|
+
PurchaseResponse: {
|
|
1491
|
+
/**
|
|
1492
|
+
* Purchase ID
|
|
1493
|
+
* @example 507f1f77bcf86cd799439011
|
|
1494
|
+
*/
|
|
1495
|
+
id: string;
|
|
1496
|
+
/**
|
|
1497
|
+
* Purchase reference
|
|
1498
|
+
* @example pur_1A2B3C4D
|
|
1499
|
+
*/
|
|
1500
|
+
reference: string;
|
|
1501
|
+
/**
|
|
1502
|
+
* Customer reference
|
|
1503
|
+
* @example cus_3C4D5E6F
|
|
1504
|
+
*/
|
|
1505
|
+
customerRef: string;
|
|
1506
|
+
/**
|
|
1507
|
+
* Customer email
|
|
1508
|
+
* @example customer@example.com
|
|
1509
|
+
*/
|
|
1510
|
+
customerEmail: string;
|
|
1511
|
+
/**
|
|
1512
|
+
* Product reference
|
|
1513
|
+
* @example prd_1A2B3C4D
|
|
1514
|
+
*/
|
|
1515
|
+
productRef: string;
|
|
1516
|
+
/**
|
|
1517
|
+
* Product ID
|
|
1518
|
+
* @example 507f1f77bcf86cd799439012
|
|
1519
|
+
*/
|
|
1520
|
+
productId?: string;
|
|
1521
|
+
/**
|
|
1522
|
+
* Product name
|
|
1523
|
+
* @example API Gateway Manager
|
|
1524
|
+
*/
|
|
1525
|
+
productName?: string;
|
|
1526
|
+
/** @description Plan snapshot at time of purchase (null for credit topups) */
|
|
1527
|
+
planSnapshot?: components["schemas"]["PlanSnapshotDto"];
|
|
1528
|
+
/**
|
|
1529
|
+
* Purchase status
|
|
1530
|
+
* @example active
|
|
1531
|
+
*/
|
|
1532
|
+
status: string;
|
|
1533
|
+
/**
|
|
1534
|
+
* Amount in USD cents (normalised for aggregation)
|
|
1535
|
+
* @example 9900
|
|
1536
|
+
*/
|
|
1537
|
+
amount: number;
|
|
1538
|
+
/**
|
|
1539
|
+
* Original amount in the payment currency (cents/pence)
|
|
1540
|
+
* @example 10000
|
|
1541
|
+
*/
|
|
1542
|
+
originalAmount?: number;
|
|
1543
|
+
/**
|
|
1544
|
+
* Original payment currency code
|
|
1545
|
+
* @example GBP
|
|
1546
|
+
*/
|
|
1547
|
+
currency: string;
|
|
1548
|
+
/**
|
|
1549
|
+
* Exchange rate from original currency to USD
|
|
1550
|
+
* @example 1.3082
|
|
1551
|
+
*/
|
|
1552
|
+
exchangeRate?: number;
|
|
1553
|
+
/** @description Start date */
|
|
1554
|
+
startDate: string;
|
|
1555
|
+
/** @description End date */
|
|
1556
|
+
endDate?: string;
|
|
1557
|
+
/** @description Paid at timestamp */
|
|
1558
|
+
paidAt?: string;
|
|
1559
|
+
/** @description Usage billing state for usage-based plans */
|
|
1560
|
+
usage?: components["schemas"]["UsageBillingDto"];
|
|
1561
|
+
/**
|
|
1562
|
+
* Is recurring
|
|
1563
|
+
* @example true
|
|
1564
|
+
*/
|
|
1565
|
+
isRecurring: boolean;
|
|
1566
|
+
/**
|
|
1567
|
+
* Billing cycle
|
|
1568
|
+
* @enum {string}
|
|
1569
|
+
*/
|
|
1570
|
+
billingCycle?: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
1571
|
+
/** @description Next billing date */
|
|
1572
|
+
nextBillingDate?: string;
|
|
1573
|
+
/** @description Auto-renew enabled */
|
|
1574
|
+
autoRenew?: boolean;
|
|
1575
|
+
/** @description Cancelled at */
|
|
1576
|
+
cancelledAt?: string;
|
|
1577
|
+
/** @description Cancellation reason */
|
|
1578
|
+
cancellationReason?: string;
|
|
1579
|
+
/** @description Arbitrary metadata attached to the purchase */
|
|
1580
|
+
metadata?: {
|
|
1581
|
+
[key: string]: unknown;
|
|
1582
|
+
};
|
|
1583
|
+
/** @description Created at */
|
|
1584
|
+
createdAt: string;
|
|
1585
|
+
};
|
|
1586
|
+
CheckLimitRequest: {
|
|
1587
|
+
customerRef: string;
|
|
1588
|
+
productRef: string;
|
|
1589
|
+
planRef?: string;
|
|
1590
|
+
meterName?: string;
|
|
1591
|
+
usageType?: string;
|
|
1592
|
+
};
|
|
1593
|
+
LimitPlanItemDto: {
|
|
1594
|
+
reference: string;
|
|
1595
|
+
name?: string;
|
|
1596
|
+
type: string;
|
|
1597
|
+
/** @description Price in smallest currency unit (e.g. cents) */
|
|
1598
|
+
price: number;
|
|
1599
|
+
currency: string;
|
|
1600
|
+
requiresPayment: boolean;
|
|
1601
|
+
freeUnits?: number;
|
|
1602
|
+
/** @description Price per usage unit in mils (usage-based plans) */
|
|
1603
|
+
pricePerUnit?: number;
|
|
1604
|
+
billingModel?: string;
|
|
1605
|
+
billingCycle?: string;
|
|
1606
|
+
};
|
|
1607
|
+
LimitBalanceDto: {
|
|
1608
|
+
/** @description Credit balance in mils */
|
|
1609
|
+
creditBalance: number;
|
|
1610
|
+
/** @description Price per usage unit in mils */
|
|
1611
|
+
pricePerUnit: number;
|
|
1612
|
+
currency: string;
|
|
1613
|
+
/** @description Estimated whole units remaining from prepaid balance at current pricePerUnit */
|
|
1614
|
+
remainingUnits?: number;
|
|
1615
|
+
};
|
|
1616
|
+
LimitProductBriefDto: {
|
|
1617
|
+
id?: string;
|
|
1618
|
+
reference: string;
|
|
1619
|
+
name?: string;
|
|
1620
|
+
};
|
|
1621
|
+
LimitResponse: {
|
|
1622
|
+
/**
|
|
1623
|
+
* Whether the customer is within their usage limits
|
|
1624
|
+
* @example true
|
|
1625
|
+
*/
|
|
1626
|
+
withinLimits: boolean;
|
|
1627
|
+
/**
|
|
1628
|
+
* Remaining usage units before hitting the limit
|
|
1629
|
+
* @example 997
|
|
1630
|
+
*/
|
|
1631
|
+
remaining: number;
|
|
1632
|
+
/**
|
|
1633
|
+
* Checkout session ID if payment is required
|
|
1634
|
+
* @example e3f1c2d4b6a89f001122334455667788
|
|
1635
|
+
*/
|
|
1636
|
+
checkoutSessionId?: string;
|
|
1637
|
+
/**
|
|
1638
|
+
* Checkout URL if payment is required
|
|
1639
|
+
* @example https://solvapay.com/customer/checkout?id=e3f1c2d4b6a89f001122334455667788
|
|
1640
|
+
*/
|
|
1641
|
+
checkoutUrl?: string;
|
|
1642
|
+
/**
|
|
1643
|
+
* The meter name to use when tracking usage events
|
|
1644
|
+
* @example requests
|
|
1645
|
+
*/
|
|
1646
|
+
meterName?: string;
|
|
1647
|
+
/** @description Credit balance in mils (for pre-paid usage-based plans) */
|
|
1648
|
+
creditBalance?: number;
|
|
1649
|
+
/** @description Price per usage unit in mils (for pre-paid usage-based plans) */
|
|
1650
|
+
pricePerUnit?: number;
|
|
1651
|
+
/** @description ISO 4217 currency code for credit fields */
|
|
1652
|
+
currency?: string;
|
|
1653
|
+
/** @description True when the customer must activate a priced default plan before usage is allowed */
|
|
1654
|
+
activationRequired?: boolean;
|
|
1655
|
+
/** @description Active plans on the product available for activation or checkout */
|
|
1656
|
+
plans?: components["schemas"]["LimitPlanItemDto"][];
|
|
1657
|
+
/** @description Prepaid usage balance context when the default plan is usage-based */
|
|
1658
|
+
balance?: components["schemas"]["LimitBalanceDto"];
|
|
1659
|
+
/** @description Product the limit check applies to */
|
|
1660
|
+
product?: components["schemas"]["LimitProductBriefDto"];
|
|
1661
|
+
/** @description Customer portal confirmation URL when activation is required (fallback when not starting checkout) */
|
|
1662
|
+
confirmationUrl?: string;
|
|
1663
|
+
};
|
|
1664
|
+
};
|
|
1665
|
+
responses: never;
|
|
1666
|
+
parameters: never;
|
|
1667
|
+
requestBodies: never;
|
|
1668
|
+
headers: never;
|
|
1669
|
+
pathItems: never;
|
|
1670
|
+
}
|
|
1671
|
+
export type $defs = Record<string, never>;
|
|
1672
|
+
export interface operations {
|
|
1673
|
+
PaymentIntentSdkController_getPaymentIntents: {
|
|
1674
|
+
parameters: {
|
|
1675
|
+
query?: {
|
|
1676
|
+
/** @description Maximum number of results */
|
|
1677
|
+
limit?: number;
|
|
1678
|
+
/** @description Pagination offset */
|
|
1679
|
+
offset?: number;
|
|
1680
|
+
};
|
|
1681
|
+
header?: never;
|
|
1682
|
+
path?: never;
|
|
1683
|
+
cookie?: never;
|
|
1684
|
+
};
|
|
1685
|
+
requestBody?: never;
|
|
1686
|
+
responses: {
|
|
1687
|
+
/** @description Payment intents retrieved successfully */
|
|
1688
|
+
200: {
|
|
1689
|
+
headers: {
|
|
1690
|
+
[name: string]: unknown;
|
|
1691
|
+
};
|
|
1692
|
+
content: {
|
|
1693
|
+
"application/json": unknown;
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
};
|
|
1697
|
+
};
|
|
1698
|
+
PaymentIntentSdkController_createPaymentIntent: {
|
|
1699
|
+
parameters: {
|
|
1700
|
+
query?: never;
|
|
1701
|
+
header: {
|
|
1702
|
+
/** @description Unique idempotency key to prevent duplicate payments (required) */
|
|
1703
|
+
"idempotency-key": string;
|
|
1704
|
+
};
|
|
1705
|
+
path?: never;
|
|
1706
|
+
cookie?: never;
|
|
1707
|
+
};
|
|
1708
|
+
/** @description Payment intent creation data */
|
|
1709
|
+
requestBody: {
|
|
1710
|
+
content: {
|
|
1711
|
+
"application/json": components["schemas"]["CreatePaymentIntentDto"];
|
|
1712
|
+
};
|
|
1713
|
+
};
|
|
1714
|
+
responses: {
|
|
1715
|
+
/** @description Payment intent created successfully */
|
|
1716
|
+
201: {
|
|
1717
|
+
headers: {
|
|
1718
|
+
[name: string]: unknown;
|
|
1719
|
+
};
|
|
1720
|
+
content: {
|
|
1721
|
+
"application/json": unknown;
|
|
1722
|
+
};
|
|
1723
|
+
};
|
|
1724
|
+
/** @description Missing required fields or invalid data */
|
|
1725
|
+
400: {
|
|
1726
|
+
headers: {
|
|
1727
|
+
[name: string]: unknown;
|
|
1728
|
+
};
|
|
1729
|
+
content: {
|
|
1730
|
+
"application/json": unknown;
|
|
1731
|
+
};
|
|
1732
|
+
};
|
|
1733
|
+
};
|
|
1734
|
+
};
|
|
1735
|
+
PaymentIntentSdkController_getPaymentIntent: {
|
|
1736
|
+
parameters: {
|
|
1737
|
+
query?: never;
|
|
1738
|
+
header?: never;
|
|
1739
|
+
path: {
|
|
1740
|
+
/** @description Payment intent MongoDB ID */
|
|
1741
|
+
id: string;
|
|
1742
|
+
};
|
|
1743
|
+
cookie?: never;
|
|
1744
|
+
};
|
|
1745
|
+
requestBody?: never;
|
|
1746
|
+
responses: {
|
|
1747
|
+
/** @description Payment intent retrieved successfully */
|
|
1748
|
+
200: {
|
|
1749
|
+
headers: {
|
|
1750
|
+
[name: string]: unknown;
|
|
1751
|
+
};
|
|
1752
|
+
content: {
|
|
1753
|
+
"application/json": unknown;
|
|
1754
|
+
};
|
|
1755
|
+
};
|
|
1756
|
+
/** @description Payment intent not found */
|
|
1757
|
+
404: {
|
|
1758
|
+
headers: {
|
|
1759
|
+
[name: string]: unknown;
|
|
1760
|
+
};
|
|
1761
|
+
content: {
|
|
1762
|
+
"application/json": unknown;
|
|
1763
|
+
};
|
|
1764
|
+
};
|
|
1765
|
+
};
|
|
1766
|
+
};
|
|
1767
|
+
PaymentIntentSdkController_processPaymentIntent: {
|
|
1768
|
+
parameters: {
|
|
1769
|
+
query?: never;
|
|
1770
|
+
header?: never;
|
|
1771
|
+
path: {
|
|
1772
|
+
/** @description Stripe payment intent ID (format: pi_xxx) */
|
|
1773
|
+
id: string;
|
|
1774
|
+
};
|
|
1775
|
+
cookie?: never;
|
|
1776
|
+
};
|
|
1777
|
+
/** @description Payment processing data */
|
|
1778
|
+
requestBody: {
|
|
1779
|
+
content: {
|
|
1780
|
+
"application/json": components["schemas"]["ProcessPaymentIntentDto"];
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
responses: {
|
|
1784
|
+
/** @description Payment intent status */
|
|
1785
|
+
200: {
|
|
1786
|
+
headers: {
|
|
1787
|
+
[name: string]: unknown;
|
|
1788
|
+
};
|
|
1789
|
+
content: {
|
|
1790
|
+
"application/json": {
|
|
1791
|
+
/**
|
|
1792
|
+
* Payment intent status
|
|
1793
|
+
* @example succeeded
|
|
1794
|
+
* @enum {string}
|
|
1795
|
+
*/
|
|
1796
|
+
status?: "succeeded" | "timeout" | "failed" | "cancelled";
|
|
1797
|
+
/**
|
|
1798
|
+
* Optional message, only present for timeout status
|
|
1799
|
+
* @example Timeout while waiting for payment intent confirmation, try again later. This could be due to Stripe webhooks not being configured correctly.
|
|
1800
|
+
*/
|
|
1801
|
+
message?: string;
|
|
1802
|
+
};
|
|
1803
|
+
};
|
|
1804
|
+
};
|
|
1805
|
+
/** @description Payment not succeeded, invalid request, or forbidden */
|
|
1806
|
+
400: {
|
|
1807
|
+
headers: {
|
|
1808
|
+
[name: string]: unknown;
|
|
1809
|
+
};
|
|
1810
|
+
content: {
|
|
1811
|
+
"application/json": unknown;
|
|
1812
|
+
};
|
|
1813
|
+
};
|
|
1814
|
+
};
|
|
1815
|
+
};
|
|
1816
|
+
CheckoutSessionSdkController_createCheckoutSession: {
|
|
1817
|
+
parameters: {
|
|
1818
|
+
query?: never;
|
|
1819
|
+
header?: never;
|
|
1820
|
+
path?: never;
|
|
1821
|
+
cookie?: never;
|
|
1822
|
+
};
|
|
1823
|
+
requestBody: {
|
|
1824
|
+
content: {
|
|
1825
|
+
"application/json": components["schemas"]["CreateCheckoutSessionRequest"];
|
|
1826
|
+
};
|
|
1827
|
+
};
|
|
1828
|
+
responses: {
|
|
1829
|
+
/** @description Checkout session created */
|
|
1830
|
+
201: {
|
|
1831
|
+
headers: {
|
|
1832
|
+
[name: string]: unknown;
|
|
1833
|
+
};
|
|
1834
|
+
content: {
|
|
1835
|
+
"application/json": components["schemas"]["CreateCheckoutSessionResponse"];
|
|
1836
|
+
};
|
|
1837
|
+
};
|
|
1838
|
+
/** @description Missing customerRef or productRef */
|
|
1839
|
+
400: {
|
|
1840
|
+
headers: {
|
|
1841
|
+
[name: string]: unknown;
|
|
1842
|
+
};
|
|
1843
|
+
content?: never;
|
|
1844
|
+
};
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1847
|
+
PlanSdkController_listPlans: {
|
|
1848
|
+
parameters: {
|
|
1849
|
+
query?: {
|
|
1850
|
+
limit?: number;
|
|
1851
|
+
offset?: number;
|
|
1852
|
+
};
|
|
1853
|
+
header?: never;
|
|
1854
|
+
path: {
|
|
1855
|
+
/** @description Product reference or ID */
|
|
1856
|
+
productRef: string;
|
|
1857
|
+
};
|
|
1858
|
+
cookie?: never;
|
|
1859
|
+
};
|
|
1860
|
+
requestBody?: never;
|
|
1861
|
+
responses: {
|
|
1862
|
+
/** @description Plans retrieved successfully */
|
|
1863
|
+
200: {
|
|
1864
|
+
headers: {
|
|
1865
|
+
[name: string]: unknown;
|
|
1866
|
+
};
|
|
1867
|
+
content: {
|
|
1868
|
+
"application/json": {
|
|
1869
|
+
plans?: components["schemas"]["Plan"][];
|
|
1870
|
+
/** @description Total number of plans for the product */
|
|
1871
|
+
total?: number;
|
|
1872
|
+
limit?: number;
|
|
1873
|
+
offset?: number;
|
|
1874
|
+
};
|
|
1875
|
+
};
|
|
1876
|
+
};
|
|
1877
|
+
/** @description Product not found */
|
|
1878
|
+
404: {
|
|
1879
|
+
headers: {
|
|
1880
|
+
[name: string]: unknown;
|
|
1881
|
+
};
|
|
1882
|
+
content?: never;
|
|
1883
|
+
};
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1886
|
+
PlanSdkController_createPlan: {
|
|
1887
|
+
parameters: {
|
|
1888
|
+
query?: never;
|
|
1889
|
+
header?: never;
|
|
1890
|
+
path: {
|
|
1891
|
+
/** @description Product reference or ID */
|
|
1892
|
+
productRef: string;
|
|
1893
|
+
};
|
|
1894
|
+
cookie?: never;
|
|
1895
|
+
};
|
|
1896
|
+
requestBody: {
|
|
1897
|
+
content: {
|
|
1898
|
+
"application/json": components["schemas"]["CreatePlanRequest"];
|
|
1899
|
+
};
|
|
1900
|
+
};
|
|
1901
|
+
responses: {
|
|
1902
|
+
/** @description Plan created successfully */
|
|
1903
|
+
201: {
|
|
1904
|
+
headers: {
|
|
1905
|
+
[name: string]: unknown;
|
|
1906
|
+
};
|
|
1907
|
+
content: {
|
|
1908
|
+
"application/json": components["schemas"]["Plan"];
|
|
1909
|
+
};
|
|
1910
|
+
};
|
|
1911
|
+
/** @description Product not found */
|
|
1912
|
+
404: {
|
|
1913
|
+
headers: {
|
|
1914
|
+
[name: string]: unknown;
|
|
1915
|
+
};
|
|
1916
|
+
content?: never;
|
|
1917
|
+
};
|
|
1918
|
+
};
|
|
1919
|
+
};
|
|
1920
|
+
PlanSdkController_getPlan: {
|
|
1921
|
+
parameters: {
|
|
1922
|
+
query?: never;
|
|
1923
|
+
header?: never;
|
|
1924
|
+
path: {
|
|
1925
|
+
/** @description Product reference or ID */
|
|
1926
|
+
productRef: string;
|
|
1927
|
+
/** @description Plan reference or ID */
|
|
1928
|
+
planRef: string;
|
|
1929
|
+
};
|
|
1930
|
+
cookie?: never;
|
|
1931
|
+
};
|
|
1932
|
+
requestBody?: never;
|
|
1933
|
+
responses: {
|
|
1934
|
+
/** @description Plan retrieved successfully */
|
|
1935
|
+
200: {
|
|
1936
|
+
headers: {
|
|
1937
|
+
[name: string]: unknown;
|
|
1938
|
+
};
|
|
1939
|
+
content: {
|
|
1940
|
+
"application/json": components["schemas"]["Plan"];
|
|
1941
|
+
};
|
|
1942
|
+
};
|
|
1943
|
+
/** @description Plan or product not found */
|
|
1944
|
+
404: {
|
|
1945
|
+
headers: {
|
|
1946
|
+
[name: string]: unknown;
|
|
1947
|
+
};
|
|
1948
|
+
content?: never;
|
|
1949
|
+
};
|
|
1950
|
+
};
|
|
1951
|
+
};
|
|
1952
|
+
PlanSdkController_updatePlan: {
|
|
1953
|
+
parameters: {
|
|
1954
|
+
query?: never;
|
|
1955
|
+
header?: never;
|
|
1956
|
+
path: {
|
|
1957
|
+
/** @description Product reference or ID */
|
|
1958
|
+
productRef: string;
|
|
1959
|
+
/** @description Plan reference or ID */
|
|
1960
|
+
planRef: string;
|
|
1961
|
+
};
|
|
1962
|
+
cookie?: never;
|
|
1963
|
+
};
|
|
1964
|
+
requestBody: {
|
|
1965
|
+
content: {
|
|
1966
|
+
"application/json": components["schemas"]["UpdatePlanRequest"];
|
|
1967
|
+
};
|
|
1968
|
+
};
|
|
1969
|
+
responses: {
|
|
1970
|
+
/** @description Plan updated successfully */
|
|
1971
|
+
200: {
|
|
1972
|
+
headers: {
|
|
1973
|
+
[name: string]: unknown;
|
|
1974
|
+
};
|
|
1975
|
+
content: {
|
|
1976
|
+
"application/json": components["schemas"]["Plan"];
|
|
1977
|
+
};
|
|
1978
|
+
};
|
|
1979
|
+
/** @description Plan or product not found */
|
|
1980
|
+
404: {
|
|
1981
|
+
headers: {
|
|
1982
|
+
[name: string]: unknown;
|
|
1983
|
+
};
|
|
1984
|
+
content?: never;
|
|
1985
|
+
};
|
|
1986
|
+
};
|
|
1987
|
+
};
|
|
1988
|
+
PlanSdkController_deletePlan: {
|
|
1989
|
+
parameters: {
|
|
1990
|
+
query?: never;
|
|
1991
|
+
header?: never;
|
|
1992
|
+
path: {
|
|
1993
|
+
/** @description Product reference or ID */
|
|
1994
|
+
productRef: string;
|
|
1995
|
+
/** @description Plan reference or ID */
|
|
1996
|
+
planRef: string;
|
|
1997
|
+
};
|
|
1998
|
+
cookie?: never;
|
|
1999
|
+
};
|
|
2000
|
+
requestBody?: never;
|
|
2001
|
+
responses: {
|
|
2002
|
+
/** @description Plan deleted successfully */
|
|
2003
|
+
200: {
|
|
2004
|
+
headers: {
|
|
2005
|
+
[name: string]: unknown;
|
|
2006
|
+
};
|
|
2007
|
+
content?: never;
|
|
2008
|
+
};
|
|
2009
|
+
/** @description Plan or product not found */
|
|
2010
|
+
404: {
|
|
2011
|
+
headers: {
|
|
2012
|
+
[name: string]: unknown;
|
|
2013
|
+
};
|
|
2014
|
+
content?: never;
|
|
2015
|
+
};
|
|
2016
|
+
};
|
|
2017
|
+
};
|
|
2018
|
+
ProductSdkController_listProducts: {
|
|
2019
|
+
parameters: {
|
|
2020
|
+
query?: {
|
|
2021
|
+
/** @description Max results (1-100) */
|
|
2022
|
+
limit?: number;
|
|
2023
|
+
/** @description Pagination offset */
|
|
2024
|
+
offset?: number;
|
|
2025
|
+
/** @description Search by name or description */
|
|
2026
|
+
search?: string;
|
|
2027
|
+
/** @description Filter by status */
|
|
2028
|
+
status?: "active" | "inactive" | "suspended";
|
|
2029
|
+
/** @description Filter MCP Pay products */
|
|
2030
|
+
isMcpPay?: boolean;
|
|
2031
|
+
};
|
|
2032
|
+
header?: never;
|
|
2033
|
+
path?: never;
|
|
2034
|
+
cookie?: never;
|
|
2035
|
+
};
|
|
2036
|
+
requestBody?: never;
|
|
2037
|
+
responses: {
|
|
2038
|
+
/** @description Products retrieved successfully */
|
|
2039
|
+
200: {
|
|
2040
|
+
headers: {
|
|
2041
|
+
[name: string]: unknown;
|
|
2042
|
+
};
|
|
2043
|
+
content?: never;
|
|
2044
|
+
};
|
|
2045
|
+
};
|
|
2046
|
+
};
|
|
2047
|
+
ProductSdkController_createProduct: {
|
|
2048
|
+
parameters: {
|
|
2049
|
+
query?: never;
|
|
2050
|
+
header?: never;
|
|
2051
|
+
path?: never;
|
|
2052
|
+
cookie?: never;
|
|
2053
|
+
};
|
|
2054
|
+
requestBody: {
|
|
2055
|
+
content: {
|
|
2056
|
+
"application/json": components["schemas"]["CreateProductRequest"];
|
|
2057
|
+
};
|
|
2058
|
+
};
|
|
2059
|
+
responses: {
|
|
2060
|
+
/** @description Product created successfully */
|
|
2061
|
+
201: {
|
|
2062
|
+
headers: {
|
|
2063
|
+
[name: string]: unknown;
|
|
2064
|
+
};
|
|
2065
|
+
content: {
|
|
2066
|
+
"application/json": components["schemas"]["SdkProductResponse"];
|
|
2067
|
+
};
|
|
2068
|
+
};
|
|
2069
|
+
/** @description Missing required fields or validation error */
|
|
2070
|
+
400: {
|
|
2071
|
+
headers: {
|
|
2072
|
+
[name: string]: unknown;
|
|
2073
|
+
};
|
|
2074
|
+
content?: never;
|
|
2075
|
+
};
|
|
2076
|
+
};
|
|
2077
|
+
};
|
|
2078
|
+
ProductSdkController_getProduct: {
|
|
2079
|
+
parameters: {
|
|
2080
|
+
query?: never;
|
|
2081
|
+
header?: never;
|
|
2082
|
+
path: {
|
|
2083
|
+
/** @description Product reference or ID */
|
|
2084
|
+
productRef: string;
|
|
2085
|
+
};
|
|
2086
|
+
cookie?: never;
|
|
2087
|
+
};
|
|
2088
|
+
requestBody?: never;
|
|
2089
|
+
responses: {
|
|
2090
|
+
/** @description Product retrieved successfully */
|
|
2091
|
+
200: {
|
|
2092
|
+
headers: {
|
|
2093
|
+
[name: string]: unknown;
|
|
2094
|
+
};
|
|
2095
|
+
content: {
|
|
2096
|
+
"application/json": components["schemas"]["SdkProductResponse"];
|
|
2097
|
+
};
|
|
2098
|
+
};
|
|
2099
|
+
/** @description Product not found */
|
|
2100
|
+
404: {
|
|
2101
|
+
headers: {
|
|
2102
|
+
[name: string]: unknown;
|
|
2103
|
+
};
|
|
2104
|
+
content?: never;
|
|
2105
|
+
};
|
|
2106
|
+
};
|
|
2107
|
+
};
|
|
2108
|
+
ProductSdkController_updateProduct: {
|
|
2109
|
+
parameters: {
|
|
2110
|
+
query?: never;
|
|
2111
|
+
header?: never;
|
|
2112
|
+
path: {
|
|
2113
|
+
/** @description Product reference or ID */
|
|
2114
|
+
productRef: string;
|
|
2115
|
+
};
|
|
2116
|
+
cookie?: never;
|
|
2117
|
+
};
|
|
2118
|
+
requestBody: {
|
|
2119
|
+
content: {
|
|
2120
|
+
"application/json": components["schemas"]["UpdateProductRequest"];
|
|
2121
|
+
};
|
|
2122
|
+
};
|
|
2123
|
+
responses: {
|
|
2124
|
+
/** @description Product updated successfully */
|
|
2125
|
+
200: {
|
|
2126
|
+
headers: {
|
|
2127
|
+
[name: string]: unknown;
|
|
2128
|
+
};
|
|
2129
|
+
content: {
|
|
2130
|
+
"application/json": components["schemas"]["SdkProductResponse"];
|
|
2131
|
+
};
|
|
2132
|
+
};
|
|
2133
|
+
/** @description Product not found */
|
|
2134
|
+
404: {
|
|
2135
|
+
headers: {
|
|
2136
|
+
[name: string]: unknown;
|
|
2137
|
+
};
|
|
2138
|
+
content?: never;
|
|
2139
|
+
};
|
|
2140
|
+
};
|
|
2141
|
+
};
|
|
2142
|
+
ProductSdkController_deleteProduct: {
|
|
2143
|
+
parameters: {
|
|
2144
|
+
query?: never;
|
|
2145
|
+
header?: never;
|
|
2146
|
+
path: {
|
|
2147
|
+
/** @description Product reference or ID */
|
|
2148
|
+
productRef: string;
|
|
2149
|
+
};
|
|
2150
|
+
cookie?: never;
|
|
2151
|
+
};
|
|
2152
|
+
requestBody?: never;
|
|
2153
|
+
responses: {
|
|
2154
|
+
/** @description Product deleted or deactivated successfully */
|
|
2155
|
+
200: {
|
|
2156
|
+
headers: {
|
|
2157
|
+
[name: string]: unknown;
|
|
2158
|
+
};
|
|
2159
|
+
content?: never;
|
|
2160
|
+
};
|
|
2161
|
+
/** @description Product not found */
|
|
2162
|
+
404: {
|
|
2163
|
+
headers: {
|
|
2164
|
+
[name: string]: unknown;
|
|
2165
|
+
};
|
|
2166
|
+
content?: never;
|
|
2167
|
+
};
|
|
2168
|
+
};
|
|
2169
|
+
};
|
|
2170
|
+
ProductSdkController_bootstrapMcpProduct: {
|
|
2171
|
+
parameters: {
|
|
2172
|
+
query?: never;
|
|
2173
|
+
header?: never;
|
|
2174
|
+
path?: never;
|
|
2175
|
+
cookie?: never;
|
|
2176
|
+
};
|
|
2177
|
+
requestBody: {
|
|
2178
|
+
content: {
|
|
2179
|
+
"application/json": components["schemas"]["McpBootstrapDto"];
|
|
2180
|
+
};
|
|
2181
|
+
};
|
|
2182
|
+
responses: {
|
|
2183
|
+
/** @description MCP product bootstrapped successfully */
|
|
2184
|
+
201: {
|
|
2185
|
+
headers: {
|
|
2186
|
+
[name: string]: unknown;
|
|
2187
|
+
};
|
|
2188
|
+
content: {
|
|
2189
|
+
"application/json": components["schemas"]["McpBootstrapResult"];
|
|
2190
|
+
};
|
|
2191
|
+
};
|
|
2192
|
+
/** @description Invalid bootstrap request */
|
|
2193
|
+
400: {
|
|
2194
|
+
headers: {
|
|
2195
|
+
[name: string]: unknown;
|
|
2196
|
+
};
|
|
2197
|
+
content?: never;
|
|
2198
|
+
};
|
|
2199
|
+
};
|
|
2200
|
+
};
|
|
2201
|
+
ProductSdkController_configureMcpPlans: {
|
|
2202
|
+
parameters: {
|
|
2203
|
+
query?: never;
|
|
2204
|
+
header?: never;
|
|
2205
|
+
path: {
|
|
2206
|
+
/** @description Product reference or ID */
|
|
2207
|
+
productRef: string;
|
|
2208
|
+
};
|
|
2209
|
+
cookie?: never;
|
|
2210
|
+
};
|
|
2211
|
+
requestBody: {
|
|
2212
|
+
content: {
|
|
2213
|
+
"application/json": components["schemas"]["ConfigureMcpPlansDto"];
|
|
2214
|
+
};
|
|
2215
|
+
};
|
|
2216
|
+
responses: {
|
|
2217
|
+
/** @description MCP plans configured successfully */
|
|
2218
|
+
200: {
|
|
2219
|
+
headers: {
|
|
2220
|
+
[name: string]: unknown;
|
|
2221
|
+
};
|
|
2222
|
+
content: {
|
|
2223
|
+
"application/json": components["schemas"]["ConfigureMcpPlansResult"];
|
|
2224
|
+
};
|
|
2225
|
+
};
|
|
2226
|
+
/** @description Invalid MCP plans request or product is not MCP-enabled */
|
|
2227
|
+
400: {
|
|
2228
|
+
headers: {
|
|
2229
|
+
[name: string]: unknown;
|
|
2230
|
+
};
|
|
2231
|
+
content?: never;
|
|
2232
|
+
};
|
|
2233
|
+
/** @description Product not found */
|
|
2234
|
+
404: {
|
|
2235
|
+
headers: {
|
|
2236
|
+
[name: string]: unknown;
|
|
2237
|
+
};
|
|
2238
|
+
content?: never;
|
|
2239
|
+
};
|
|
2240
|
+
};
|
|
2241
|
+
};
|
|
2242
|
+
ProductSdkController_cloneProduct: {
|
|
2243
|
+
parameters: {
|
|
2244
|
+
query?: never;
|
|
2245
|
+
header?: never;
|
|
2246
|
+
path: {
|
|
2247
|
+
/** @description Product reference or ID to clone */
|
|
2248
|
+
productRef: string;
|
|
2249
|
+
};
|
|
2250
|
+
cookie?: never;
|
|
2251
|
+
};
|
|
2252
|
+
requestBody: {
|
|
2253
|
+
content: {
|
|
2254
|
+
"application/json": components["schemas"]["CloneProductDto"];
|
|
2255
|
+
};
|
|
2256
|
+
};
|
|
2257
|
+
responses: {
|
|
2258
|
+
/** @description Product cloned successfully */
|
|
2259
|
+
201: {
|
|
2260
|
+
headers: {
|
|
2261
|
+
[name: string]: unknown;
|
|
2262
|
+
};
|
|
2263
|
+
content: {
|
|
2264
|
+
"application/json": components["schemas"]["SdkProductResponse"];
|
|
2265
|
+
};
|
|
2266
|
+
};
|
|
2267
|
+
/** @description Product not found */
|
|
2268
|
+
404: {
|
|
2269
|
+
headers: {
|
|
2270
|
+
[name: string]: unknown;
|
|
2271
|
+
};
|
|
2272
|
+
content?: never;
|
|
2273
|
+
};
|
|
2274
|
+
};
|
|
2275
|
+
};
|
|
2276
|
+
UsageSdkController_recordUsage: {
|
|
2277
|
+
parameters: {
|
|
2278
|
+
query?: never;
|
|
2279
|
+
header?: never;
|
|
2280
|
+
path?: never;
|
|
2281
|
+
cookie?: never;
|
|
2282
|
+
};
|
|
2283
|
+
requestBody: {
|
|
2284
|
+
content: {
|
|
2285
|
+
"application/json": components["schemas"]["CreateUsageRequest"];
|
|
2286
|
+
};
|
|
2287
|
+
};
|
|
2288
|
+
responses: {
|
|
2289
|
+
/** @description Usage recorded successfully */
|
|
2290
|
+
200: {
|
|
2291
|
+
headers: {
|
|
2292
|
+
[name: string]: unknown;
|
|
2293
|
+
};
|
|
2294
|
+
content: {
|
|
2295
|
+
"application/json": {
|
|
2296
|
+
/** @example true */
|
|
2297
|
+
success?: boolean;
|
|
2298
|
+
/** @example usage_A1B2C3D4 */
|
|
2299
|
+
reference?: string;
|
|
2300
|
+
};
|
|
2301
|
+
};
|
|
2302
|
+
};
|
|
2303
|
+
/** @description Validation failed */
|
|
2304
|
+
400: {
|
|
2305
|
+
headers: {
|
|
2306
|
+
[name: string]: unknown;
|
|
2307
|
+
};
|
|
2308
|
+
content?: never;
|
|
2309
|
+
};
|
|
2310
|
+
};
|
|
2311
|
+
};
|
|
2312
|
+
UsageSdkController_recordBulkUsage: {
|
|
2313
|
+
parameters: {
|
|
2314
|
+
query?: never;
|
|
2315
|
+
header?: never;
|
|
2316
|
+
path?: never;
|
|
2317
|
+
cookie?: never;
|
|
2318
|
+
};
|
|
2319
|
+
requestBody: {
|
|
2320
|
+
content: {
|
|
2321
|
+
"application/json": components["schemas"]["BulkCreateUsageRequest"];
|
|
2322
|
+
};
|
|
2323
|
+
};
|
|
2324
|
+
responses: {
|
|
2325
|
+
/** @description Bulk usage events processed */
|
|
2326
|
+
200: {
|
|
2327
|
+
headers: {
|
|
2328
|
+
[name: string]: unknown;
|
|
2329
|
+
};
|
|
2330
|
+
content?: never;
|
|
2331
|
+
};
|
|
2332
|
+
/** @description Validation failed */
|
|
2333
|
+
400: {
|
|
2334
|
+
headers: {
|
|
2335
|
+
[name: string]: unknown;
|
|
2336
|
+
};
|
|
2337
|
+
content?: never;
|
|
2338
|
+
};
|
|
2339
|
+
};
|
|
2340
|
+
};
|
|
2341
|
+
MeterEventsSdkController_recordEvent: {
|
|
2342
|
+
parameters: {
|
|
2343
|
+
query?: never;
|
|
2344
|
+
header?: never;
|
|
2345
|
+
path?: never;
|
|
2346
|
+
cookie?: never;
|
|
2347
|
+
};
|
|
2348
|
+
requestBody: {
|
|
2349
|
+
content: {
|
|
2350
|
+
"application/json": components["schemas"]["RecordMeterEventZodDto"];
|
|
2351
|
+
};
|
|
2352
|
+
};
|
|
2353
|
+
responses: {
|
|
2354
|
+
/** @description Event recorded */
|
|
2355
|
+
200: {
|
|
2356
|
+
headers: {
|
|
2357
|
+
[name: string]: unknown;
|
|
2358
|
+
};
|
|
2359
|
+
content: {
|
|
2360
|
+
"application/json": {
|
|
2361
|
+
/** @example true */
|
|
2362
|
+
success?: boolean;
|
|
2363
|
+
};
|
|
2364
|
+
};
|
|
2365
|
+
};
|
|
2366
|
+
/** @description Invalid meter name or meter is archived */
|
|
2367
|
+
400: {
|
|
2368
|
+
headers: {
|
|
2369
|
+
[name: string]: unknown;
|
|
2370
|
+
};
|
|
2371
|
+
content?: never;
|
|
2372
|
+
};
|
|
2373
|
+
};
|
|
2374
|
+
};
|
|
2375
|
+
MeterEventsSdkController_recordBulkEvents: {
|
|
2376
|
+
parameters: {
|
|
2377
|
+
query?: never;
|
|
2378
|
+
header?: never;
|
|
2379
|
+
path?: never;
|
|
2380
|
+
cookie?: never;
|
|
2381
|
+
};
|
|
2382
|
+
requestBody: {
|
|
2383
|
+
content: {
|
|
2384
|
+
"application/json": components["schemas"]["RecordBulkMeterEventsZodDto"];
|
|
2385
|
+
};
|
|
2386
|
+
};
|
|
2387
|
+
responses: {
|
|
2388
|
+
/** @description Events recorded */
|
|
2389
|
+
200: {
|
|
2390
|
+
headers: {
|
|
2391
|
+
[name: string]: unknown;
|
|
2392
|
+
};
|
|
2393
|
+
content: {
|
|
2394
|
+
"application/json": {
|
|
2395
|
+
/** @example true */
|
|
2396
|
+
success?: boolean;
|
|
2397
|
+
/** @example 50 */
|
|
2398
|
+
inserted?: number;
|
|
2399
|
+
};
|
|
2400
|
+
};
|
|
2401
|
+
};
|
|
2402
|
+
/** @description Invalid meter name or meter is archived */
|
|
2403
|
+
400: {
|
|
2404
|
+
headers: {
|
|
2405
|
+
[name: string]: unknown;
|
|
2406
|
+
};
|
|
2407
|
+
content?: never;
|
|
2408
|
+
};
|
|
2409
|
+
};
|
|
2410
|
+
};
|
|
2411
|
+
CustomerSdkController_getCustomerByQuery: {
|
|
2412
|
+
parameters: {
|
|
2413
|
+
query?: {
|
|
2414
|
+
/** @description Customer reference identifier (use exactly one query parameter) */
|
|
2415
|
+
reference?: string;
|
|
2416
|
+
/** @description External reference ID from your auth system (use exactly one query parameter) */
|
|
2417
|
+
externalRef?: string;
|
|
2418
|
+
/** @description Customer email address (use exactly one query parameter) */
|
|
2419
|
+
email?: string;
|
|
2420
|
+
};
|
|
2421
|
+
header?: never;
|
|
2422
|
+
path?: never;
|
|
2423
|
+
cookie?: never;
|
|
2424
|
+
};
|
|
2425
|
+
requestBody?: never;
|
|
2426
|
+
responses: {
|
|
2427
|
+
/** @description Customer retrieved successfully */
|
|
2428
|
+
200: {
|
|
2429
|
+
headers: {
|
|
2430
|
+
[name: string]: unknown;
|
|
2431
|
+
};
|
|
2432
|
+
content: {
|
|
2433
|
+
"application/json": components["schemas"]["CustomerResponse"];
|
|
2434
|
+
};
|
|
2435
|
+
};
|
|
2436
|
+
/** @description Invalid request - must provide exactly one of reference, externalRef, or email */
|
|
2437
|
+
400: {
|
|
2438
|
+
headers: {
|
|
2439
|
+
[name: string]: unknown;
|
|
2440
|
+
};
|
|
2441
|
+
content: {
|
|
2442
|
+
"application/json": unknown;
|
|
2443
|
+
};
|
|
2444
|
+
};
|
|
2445
|
+
/** @description Customer not found */
|
|
2446
|
+
404: {
|
|
2447
|
+
headers: {
|
|
2448
|
+
[name: string]: unknown;
|
|
2449
|
+
};
|
|
2450
|
+
content: {
|
|
2451
|
+
"application/json": unknown;
|
|
2452
|
+
};
|
|
2453
|
+
};
|
|
2454
|
+
};
|
|
2455
|
+
};
|
|
2456
|
+
CustomerSdkController_createCustomer: {
|
|
2457
|
+
parameters: {
|
|
2458
|
+
query?: never;
|
|
2459
|
+
header?: never;
|
|
2460
|
+
path?: never;
|
|
2461
|
+
cookie?: never;
|
|
2462
|
+
};
|
|
2463
|
+
/** @description Customer creation data */
|
|
2464
|
+
requestBody: {
|
|
2465
|
+
content: {
|
|
2466
|
+
"application/json": components["schemas"]["CreateCustomerRequest"];
|
|
2467
|
+
};
|
|
2468
|
+
};
|
|
2469
|
+
responses: {
|
|
2470
|
+
/** @description Customer created successfully */
|
|
2471
|
+
201: {
|
|
2472
|
+
headers: {
|
|
2473
|
+
[name: string]: unknown;
|
|
2474
|
+
};
|
|
2475
|
+
content: {
|
|
2476
|
+
"application/json": components["schemas"]["CustomerResponse"];
|
|
2477
|
+
};
|
|
2478
|
+
};
|
|
2479
|
+
/** @description Invalid email or missing required fields */
|
|
2480
|
+
400: {
|
|
2481
|
+
headers: {
|
|
2482
|
+
[name: string]: unknown;
|
|
2483
|
+
};
|
|
2484
|
+
content: {
|
|
2485
|
+
"application/json": unknown;
|
|
2486
|
+
};
|
|
2487
|
+
};
|
|
2488
|
+
};
|
|
2489
|
+
};
|
|
2490
|
+
CustomerSdkController_getCustomer: {
|
|
2491
|
+
parameters: {
|
|
2492
|
+
query?: never;
|
|
2493
|
+
header?: never;
|
|
2494
|
+
path: {
|
|
2495
|
+
/** @description Customer reference identifier */
|
|
2496
|
+
reference: string;
|
|
2497
|
+
};
|
|
2498
|
+
cookie?: never;
|
|
2499
|
+
};
|
|
2500
|
+
requestBody?: never;
|
|
2501
|
+
responses: {
|
|
2502
|
+
/** @description Customer retrieved successfully */
|
|
2503
|
+
200: {
|
|
2504
|
+
headers: {
|
|
2505
|
+
[name: string]: unknown;
|
|
2506
|
+
};
|
|
2507
|
+
content: {
|
|
2508
|
+
"application/json": components["schemas"]["CustomerResponse"];
|
|
2509
|
+
};
|
|
2510
|
+
};
|
|
2511
|
+
/** @description Customer not found */
|
|
2512
|
+
404: {
|
|
2513
|
+
headers: {
|
|
2514
|
+
[name: string]: unknown;
|
|
2515
|
+
};
|
|
2516
|
+
content: {
|
|
2517
|
+
"application/json": unknown;
|
|
2518
|
+
};
|
|
2519
|
+
};
|
|
2520
|
+
};
|
|
2521
|
+
};
|
|
2522
|
+
CustomerSdkController_createCustomerSession: {
|
|
2523
|
+
parameters: {
|
|
2524
|
+
query?: never;
|
|
2525
|
+
header?: never;
|
|
2526
|
+
path?: never;
|
|
2527
|
+
cookie?: never;
|
|
2528
|
+
};
|
|
2529
|
+
/** @description Customer session creation request data */
|
|
2530
|
+
requestBody: {
|
|
2531
|
+
content: {
|
|
2532
|
+
"application/json": components["schemas"]["CreateCustomerSessionRequest"];
|
|
2533
|
+
};
|
|
2534
|
+
};
|
|
2535
|
+
responses: {
|
|
2536
|
+
/** @description Customer session created successfully */
|
|
2537
|
+
201: {
|
|
2538
|
+
headers: {
|
|
2539
|
+
[name: string]: unknown;
|
|
2540
|
+
};
|
|
2541
|
+
content: {
|
|
2542
|
+
"application/json": components["schemas"]["CreateCustomerSessionResponse"];
|
|
2543
|
+
};
|
|
2544
|
+
};
|
|
2545
|
+
/** @description Invalid request data or customer not found */
|
|
2546
|
+
400: {
|
|
2547
|
+
headers: {
|
|
2548
|
+
[name: string]: unknown;
|
|
2549
|
+
};
|
|
2550
|
+
content: {
|
|
2551
|
+
"application/json": unknown;
|
|
2552
|
+
};
|
|
2553
|
+
};
|
|
2554
|
+
/** @description Customer not found */
|
|
2555
|
+
404: {
|
|
2556
|
+
headers: {
|
|
2557
|
+
[name: string]: unknown;
|
|
2558
|
+
};
|
|
2559
|
+
content: {
|
|
2560
|
+
"application/json": unknown;
|
|
2561
|
+
};
|
|
2562
|
+
};
|
|
2563
|
+
};
|
|
2564
|
+
};
|
|
2565
|
+
CustomerSdkController_getCustomerSession: {
|
|
2566
|
+
parameters: {
|
|
2567
|
+
query?: never;
|
|
2568
|
+
header?: never;
|
|
2569
|
+
path: {
|
|
2570
|
+
/** @description Customer session ID/token */
|
|
2571
|
+
sessionId: string;
|
|
2572
|
+
};
|
|
2573
|
+
cookie?: never;
|
|
2574
|
+
};
|
|
2575
|
+
requestBody?: never;
|
|
2576
|
+
responses: {
|
|
2577
|
+
/** @description Customer session retrieved successfully */
|
|
2578
|
+
200: {
|
|
2579
|
+
headers: {
|
|
2580
|
+
[name: string]: unknown;
|
|
2581
|
+
};
|
|
2582
|
+
content: {
|
|
2583
|
+
"application/json": components["schemas"]["GetCustomerSessionResponse"];
|
|
2584
|
+
};
|
|
2585
|
+
};
|
|
2586
|
+
/** @description Customer session not found */
|
|
2587
|
+
404: {
|
|
2588
|
+
headers: {
|
|
2589
|
+
[name: string]: unknown;
|
|
2590
|
+
};
|
|
2591
|
+
content: {
|
|
2592
|
+
"application/json": unknown;
|
|
2593
|
+
};
|
|
2594
|
+
};
|
|
2595
|
+
};
|
|
2596
|
+
};
|
|
2597
|
+
UserInfoSdkController_getUserInfo: {
|
|
2598
|
+
parameters: {
|
|
2599
|
+
query?: never;
|
|
2600
|
+
header?: never;
|
|
2601
|
+
path?: never;
|
|
2602
|
+
cookie?: never;
|
|
2603
|
+
};
|
|
2604
|
+
requestBody: {
|
|
2605
|
+
content: {
|
|
2606
|
+
"application/json": components["schemas"]["UserInfoRequest"];
|
|
2607
|
+
};
|
|
2608
|
+
};
|
|
2609
|
+
responses: {
|
|
2610
|
+
/** @description User info with purchase status */
|
|
2611
|
+
200: {
|
|
2612
|
+
headers: {
|
|
2613
|
+
[name: string]: unknown;
|
|
2614
|
+
};
|
|
2615
|
+
content: {
|
|
2616
|
+
"application/json": components["schemas"]["UserInfoResponse"];
|
|
2617
|
+
};
|
|
2618
|
+
};
|
|
2619
|
+
/** @description Missing customerRef or productRef */
|
|
2620
|
+
400: {
|
|
2621
|
+
headers: {
|
|
2622
|
+
[name: string]: unknown;
|
|
2623
|
+
};
|
|
2624
|
+
content?: never;
|
|
2625
|
+
};
|
|
2626
|
+
/** @description Customer or product not found */
|
|
2627
|
+
404: {
|
|
2628
|
+
headers: {
|
|
2629
|
+
[name: string]: unknown;
|
|
2630
|
+
};
|
|
2631
|
+
content?: never;
|
|
2632
|
+
};
|
|
2633
|
+
};
|
|
2634
|
+
};
|
|
2635
|
+
PurchaseSdkController_listPurchases: {
|
|
2636
|
+
parameters: {
|
|
2637
|
+
query?: {
|
|
2638
|
+
/** @description Filter by purchase status */
|
|
2639
|
+
status?: "pending" | "active" | "trialing" | "past_due" | "cancelled" | "expired" | "suspended" | "refunded";
|
|
2640
|
+
/** @description Filter by product ID */
|
|
2641
|
+
productId?: string;
|
|
2642
|
+
/** @description Filter by customer ID */
|
|
2643
|
+
customerId?: string;
|
|
2644
|
+
};
|
|
2645
|
+
header?: never;
|
|
2646
|
+
path?: never;
|
|
2647
|
+
cookie?: never;
|
|
2648
|
+
};
|
|
2649
|
+
requestBody?: never;
|
|
2650
|
+
responses: {
|
|
2651
|
+
/** @description Purchases retrieved successfully */
|
|
2652
|
+
200: {
|
|
2653
|
+
headers: {
|
|
2654
|
+
[name: string]: unknown;
|
|
2655
|
+
};
|
|
2656
|
+
content: {
|
|
2657
|
+
"application/json": {
|
|
2658
|
+
purchases?: components["schemas"]["PurchaseResponse"][];
|
|
2659
|
+
};
|
|
2660
|
+
};
|
|
2661
|
+
};
|
|
2662
|
+
};
|
|
2663
|
+
};
|
|
2664
|
+
PurchaseSdkController_getPurchasesForCustomer: {
|
|
2665
|
+
parameters: {
|
|
2666
|
+
query?: never;
|
|
2667
|
+
header?: never;
|
|
2668
|
+
path: {
|
|
2669
|
+
/** @description Customer reference or ID */
|
|
2670
|
+
customerRef: string;
|
|
2671
|
+
};
|
|
2672
|
+
cookie?: never;
|
|
2673
|
+
};
|
|
2674
|
+
requestBody?: never;
|
|
2675
|
+
responses: {
|
|
2676
|
+
/** @description Customer purchases retrieved successfully */
|
|
2677
|
+
200: {
|
|
2678
|
+
headers: {
|
|
2679
|
+
[name: string]: unknown;
|
|
2680
|
+
};
|
|
2681
|
+
content: {
|
|
2682
|
+
"application/json": {
|
|
2683
|
+
purchases?: components["schemas"]["PurchaseResponse"][];
|
|
2684
|
+
};
|
|
2685
|
+
};
|
|
2686
|
+
};
|
|
2687
|
+
/** @description Customer not found */
|
|
2688
|
+
404: {
|
|
2689
|
+
headers: {
|
|
2690
|
+
[name: string]: unknown;
|
|
2691
|
+
};
|
|
2692
|
+
content?: never;
|
|
2693
|
+
};
|
|
2694
|
+
};
|
|
2695
|
+
};
|
|
2696
|
+
PurchaseSdkController_getPurchasesForProduct: {
|
|
2697
|
+
parameters: {
|
|
2698
|
+
query?: never;
|
|
2699
|
+
header?: never;
|
|
2700
|
+
path: {
|
|
2701
|
+
/** @description Product reference or ID */
|
|
2702
|
+
productRef: string;
|
|
2703
|
+
};
|
|
2704
|
+
cookie?: never;
|
|
2705
|
+
};
|
|
2706
|
+
requestBody?: never;
|
|
2707
|
+
responses: {
|
|
2708
|
+
/** @description Product purchases retrieved successfully */
|
|
2709
|
+
200: {
|
|
2710
|
+
headers: {
|
|
2711
|
+
[name: string]: unknown;
|
|
2712
|
+
};
|
|
2713
|
+
content: {
|
|
2714
|
+
"application/json": {
|
|
2715
|
+
purchases?: components["schemas"]["PurchaseResponse"][];
|
|
2716
|
+
};
|
|
2717
|
+
};
|
|
2718
|
+
};
|
|
2719
|
+
/** @description Product not found */
|
|
2720
|
+
404: {
|
|
2721
|
+
headers: {
|
|
2722
|
+
[name: string]: unknown;
|
|
2723
|
+
};
|
|
2724
|
+
content?: never;
|
|
2725
|
+
};
|
|
2726
|
+
};
|
|
2727
|
+
};
|
|
2728
|
+
PurchaseSdkController_getPurchase: {
|
|
2729
|
+
parameters: {
|
|
2730
|
+
query?: never;
|
|
2731
|
+
header?: never;
|
|
2732
|
+
path: {
|
|
2733
|
+
/** @description Purchase ID or reference */
|
|
2734
|
+
id: string;
|
|
2735
|
+
};
|
|
2736
|
+
cookie?: never;
|
|
2737
|
+
};
|
|
2738
|
+
requestBody?: never;
|
|
2739
|
+
responses: {
|
|
2740
|
+
/** @description Purchase retrieved successfully */
|
|
2741
|
+
200: {
|
|
2742
|
+
headers: {
|
|
2743
|
+
[name: string]: unknown;
|
|
2744
|
+
};
|
|
2745
|
+
content: {
|
|
2746
|
+
"application/json": components["schemas"]["PurchaseResponse"];
|
|
2747
|
+
};
|
|
2748
|
+
};
|
|
2749
|
+
/** @description Purchase not found */
|
|
2750
|
+
404: {
|
|
2751
|
+
headers: {
|
|
2752
|
+
[name: string]: unknown;
|
|
2753
|
+
};
|
|
2754
|
+
content?: never;
|
|
2755
|
+
};
|
|
2756
|
+
};
|
|
2757
|
+
};
|
|
2758
|
+
PurchaseSdkController_cancelPurchase: {
|
|
2759
|
+
parameters: {
|
|
2760
|
+
query?: never;
|
|
2761
|
+
header?: never;
|
|
2762
|
+
path: {
|
|
2763
|
+
/** @description Purchase reference or ID */
|
|
2764
|
+
purchaseRef: string;
|
|
2765
|
+
};
|
|
2766
|
+
cookie?: never;
|
|
2767
|
+
};
|
|
2768
|
+
requestBody: {
|
|
2769
|
+
content: {
|
|
2770
|
+
"application/json": components["schemas"]["CancelPurchaseRequest"];
|
|
2771
|
+
};
|
|
2772
|
+
};
|
|
2773
|
+
responses: {
|
|
2774
|
+
/** @description Purchase cancelled successfully */
|
|
2775
|
+
200: {
|
|
2776
|
+
headers: {
|
|
2777
|
+
[name: string]: unknown;
|
|
2778
|
+
};
|
|
2779
|
+
content: {
|
|
2780
|
+
"application/json": {
|
|
2781
|
+
success?: boolean;
|
|
2782
|
+
purchase?: components["schemas"]["PurchaseResponse"];
|
|
2783
|
+
};
|
|
2784
|
+
};
|
|
2785
|
+
};
|
|
2786
|
+
/** @description Purchase not found */
|
|
2787
|
+
404: {
|
|
2788
|
+
headers: {
|
|
2789
|
+
[name: string]: unknown;
|
|
2790
|
+
};
|
|
2791
|
+
content?: never;
|
|
2792
|
+
};
|
|
2793
|
+
};
|
|
2794
|
+
};
|
|
2795
|
+
LimitsSdkController_checkLimits: {
|
|
2796
|
+
parameters: {
|
|
2797
|
+
query?: never;
|
|
2798
|
+
header?: never;
|
|
2799
|
+
path?: never;
|
|
2800
|
+
cookie?: never;
|
|
2801
|
+
};
|
|
2802
|
+
requestBody: {
|
|
2803
|
+
content: {
|
|
2804
|
+
"application/json": components["schemas"]["CheckLimitRequest"];
|
|
2805
|
+
};
|
|
2806
|
+
};
|
|
2807
|
+
responses: {
|
|
2808
|
+
/** @description Limit check result */
|
|
2809
|
+
200: {
|
|
2810
|
+
headers: {
|
|
2811
|
+
[name: string]: unknown;
|
|
2812
|
+
};
|
|
2813
|
+
content: {
|
|
2814
|
+
"application/json": components["schemas"]["LimitResponse"];
|
|
2815
|
+
};
|
|
2816
|
+
};
|
|
2817
|
+
/** @description Missing customerRef or productRef */
|
|
2818
|
+
400: {
|
|
2819
|
+
headers: {
|
|
2820
|
+
[name: string]: unknown;
|
|
2821
|
+
};
|
|
2822
|
+
content?: never;
|
|
2823
|
+
};
|
|
2824
|
+
/** @description Customer or product not found */
|
|
2825
|
+
404: {
|
|
2826
|
+
headers: {
|
|
2827
|
+
[name: string]: unknown;
|
|
2828
|
+
};
|
|
2829
|
+
content?: never;
|
|
2830
|
+
};
|
|
2831
|
+
};
|
|
2832
|
+
};
|
|
2833
|
+
}
|
|
2834
|
+
//# sourceMappingURL=generated.d.ts.map
|