@4players/payment 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +545 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2318 -0
- package/dist/index.d.ts +2318 -0
- package/dist/index.js +530 -0
- package/dist/index.js.map +1 -0
- package/package.json +65 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2318 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
interface paths {
|
|
6
|
+
"/apps": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/** Get all apps the user has access to */
|
|
14
|
+
get: operations["getPaymentProjects"];
|
|
15
|
+
put?: never;
|
|
16
|
+
post?: never;
|
|
17
|
+
delete?: never;
|
|
18
|
+
options?: never;
|
|
19
|
+
head?: never;
|
|
20
|
+
patch?: never;
|
|
21
|
+
trace?: never;
|
|
22
|
+
};
|
|
23
|
+
"/apps/{app_id}": {
|
|
24
|
+
parameters: {
|
|
25
|
+
query?: never;
|
|
26
|
+
header?: never;
|
|
27
|
+
path: {
|
|
28
|
+
/** @description The ID of the app to retrieve */
|
|
29
|
+
app_id: string;
|
|
30
|
+
};
|
|
31
|
+
cookie?: never;
|
|
32
|
+
};
|
|
33
|
+
/** Get the details of the app including the payment project */
|
|
34
|
+
get: operations["getPaymentProjectForApp"];
|
|
35
|
+
put?: never;
|
|
36
|
+
post?: never;
|
|
37
|
+
delete?: never;
|
|
38
|
+
options?: never;
|
|
39
|
+
head?: never;
|
|
40
|
+
patch?: never;
|
|
41
|
+
trace?: never;
|
|
42
|
+
};
|
|
43
|
+
"/projects/{projectId}/peers-over-time": {
|
|
44
|
+
parameters: {
|
|
45
|
+
query?: never;
|
|
46
|
+
header?: never;
|
|
47
|
+
path?: never;
|
|
48
|
+
cookie?: never;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Get peak peers over time for a project
|
|
52
|
+
* @description Returns an array of peak number of peers over time starting from the specified timestamp for the given project ID.
|
|
53
|
+
*/
|
|
54
|
+
get: operations["getPeersOverTime"];
|
|
55
|
+
put?: never;
|
|
56
|
+
post?: never;
|
|
57
|
+
delete?: never;
|
|
58
|
+
options?: never;
|
|
59
|
+
head?: never;
|
|
60
|
+
patch?: never;
|
|
61
|
+
trace?: never;
|
|
62
|
+
};
|
|
63
|
+
"/billing/create-setup-session": {
|
|
64
|
+
parameters: {
|
|
65
|
+
query?: never;
|
|
66
|
+
header?: never;
|
|
67
|
+
path?: never;
|
|
68
|
+
cookie?: never;
|
|
69
|
+
};
|
|
70
|
+
get?: never;
|
|
71
|
+
put?: never;
|
|
72
|
+
/** Returns an url to the billing account setup session that will let the user create a new billing account at Stripe */
|
|
73
|
+
post: operations["createSetupSession"];
|
|
74
|
+
delete?: never;
|
|
75
|
+
options?: never;
|
|
76
|
+
head?: never;
|
|
77
|
+
patch?: never;
|
|
78
|
+
trace?: never;
|
|
79
|
+
};
|
|
80
|
+
"/billing": {
|
|
81
|
+
parameters: {
|
|
82
|
+
query?: never;
|
|
83
|
+
header?: never;
|
|
84
|
+
path?: never;
|
|
85
|
+
cookie?: never;
|
|
86
|
+
};
|
|
87
|
+
/** Get the billing accounts for the current user */
|
|
88
|
+
get: operations["getBillingAccounts"];
|
|
89
|
+
put?: never;
|
|
90
|
+
post?: never;
|
|
91
|
+
delete?: never;
|
|
92
|
+
options?: never;
|
|
93
|
+
head?: never;
|
|
94
|
+
patch?: never;
|
|
95
|
+
trace?: never;
|
|
96
|
+
};
|
|
97
|
+
"/billing/{billingAccountId}": {
|
|
98
|
+
parameters: {
|
|
99
|
+
query?: never;
|
|
100
|
+
header?: never;
|
|
101
|
+
path: {
|
|
102
|
+
/** @description The unique identifier of the billing account to retrieve. */
|
|
103
|
+
billingAccountId: string;
|
|
104
|
+
};
|
|
105
|
+
cookie?: never;
|
|
106
|
+
};
|
|
107
|
+
/** Get a specific billing account */
|
|
108
|
+
get: operations["getBillingAccount"];
|
|
109
|
+
put?: never;
|
|
110
|
+
post?: never;
|
|
111
|
+
delete?: never;
|
|
112
|
+
options?: never;
|
|
113
|
+
head?: never;
|
|
114
|
+
patch?: never;
|
|
115
|
+
trace?: never;
|
|
116
|
+
};
|
|
117
|
+
"/billing/{billingAccountId}/create-billing-portal-session": {
|
|
118
|
+
parameters: {
|
|
119
|
+
query?: never;
|
|
120
|
+
header?: never;
|
|
121
|
+
path: {
|
|
122
|
+
/** @description The unique identifier of the billing account to retrieve. */
|
|
123
|
+
billingAccountId: string;
|
|
124
|
+
};
|
|
125
|
+
cookie?: never;
|
|
126
|
+
};
|
|
127
|
+
get?: never;
|
|
128
|
+
put?: never;
|
|
129
|
+
/** Create a billing portal session for the specified billing account */
|
|
130
|
+
post: operations["createBillingPortalSession"];
|
|
131
|
+
delete?: never;
|
|
132
|
+
options?: never;
|
|
133
|
+
head?: never;
|
|
134
|
+
patch?: never;
|
|
135
|
+
trace?: never;
|
|
136
|
+
};
|
|
137
|
+
"/billing/{billingAccountId}/invoices": {
|
|
138
|
+
parameters: {
|
|
139
|
+
query?: never;
|
|
140
|
+
header?: never;
|
|
141
|
+
path: {
|
|
142
|
+
/** @description The unique identifier of the billing account to retrieve. */
|
|
143
|
+
billingAccountId: string;
|
|
144
|
+
};
|
|
145
|
+
cookie?: never;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Retrieve a list of invoices
|
|
149
|
+
* @description Fetches an array of invoices detailing charges, services, and tax information for a customer's subscription.
|
|
150
|
+
*/
|
|
151
|
+
get: operations["getBillingAccountInvoices"];
|
|
152
|
+
put?: never;
|
|
153
|
+
post?: never;
|
|
154
|
+
delete?: never;
|
|
155
|
+
options?: never;
|
|
156
|
+
head?: never;
|
|
157
|
+
patch?: never;
|
|
158
|
+
trace?: never;
|
|
159
|
+
};
|
|
160
|
+
"/projects/{projectId}": {
|
|
161
|
+
parameters: {
|
|
162
|
+
query?: never;
|
|
163
|
+
header?: never;
|
|
164
|
+
path: {
|
|
165
|
+
/** @description The unique identifier of the project to retrieve. */
|
|
166
|
+
projectId: string;
|
|
167
|
+
};
|
|
168
|
+
cookie?: never;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Get a Project
|
|
172
|
+
* @description Retrieves the details of a specific project by its unique identifier.
|
|
173
|
+
*/
|
|
174
|
+
get: operations["getProject"];
|
|
175
|
+
/**
|
|
176
|
+
* Edit a Project
|
|
177
|
+
* @description Updates the details of an existing project, such as its name and description.
|
|
178
|
+
*/
|
|
179
|
+
put: operations["editProject"];
|
|
180
|
+
post?: never;
|
|
181
|
+
delete?: never;
|
|
182
|
+
options?: never;
|
|
183
|
+
head?: never;
|
|
184
|
+
patch?: never;
|
|
185
|
+
trace?: never;
|
|
186
|
+
};
|
|
187
|
+
"/odin-access-keys/{accessKeyId}": {
|
|
188
|
+
parameters: {
|
|
189
|
+
query?: never;
|
|
190
|
+
header?: never;
|
|
191
|
+
path: {
|
|
192
|
+
/** @description The unique identifier of the access key to retrieve. */
|
|
193
|
+
accessKeyId: string;
|
|
194
|
+
};
|
|
195
|
+
cookie?: never;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Get an Access Key
|
|
199
|
+
* @description Retrieves the details of a specific access key by its unique identifier.
|
|
200
|
+
*/
|
|
201
|
+
get: operations["getAccessKey"];
|
|
202
|
+
/**
|
|
203
|
+
* Edit an Access Key
|
|
204
|
+
* @description Updates the details of an existing access key, such as its name and description.
|
|
205
|
+
*/
|
|
206
|
+
put: operations["editAccessKey"];
|
|
207
|
+
post?: never;
|
|
208
|
+
/**
|
|
209
|
+
* Delete an Access Key
|
|
210
|
+
* @description Deletes the specified access key from the system. This operation is irreversible.
|
|
211
|
+
*/
|
|
212
|
+
delete: operations["deleteAccessKey"];
|
|
213
|
+
options?: never;
|
|
214
|
+
head?: never;
|
|
215
|
+
patch?: never;
|
|
216
|
+
trace?: never;
|
|
217
|
+
};
|
|
218
|
+
"/odin-access-keys/": {
|
|
219
|
+
parameters: {
|
|
220
|
+
query?: never;
|
|
221
|
+
header?: never;
|
|
222
|
+
path?: never;
|
|
223
|
+
cookie?: never;
|
|
224
|
+
};
|
|
225
|
+
get?: never;
|
|
226
|
+
put?: never;
|
|
227
|
+
/**
|
|
228
|
+
* Create an Access Key
|
|
229
|
+
* @description Creates a new access key for a specific project with the provided name and optional description.
|
|
230
|
+
*/
|
|
231
|
+
post: operations["createAccessKey"];
|
|
232
|
+
delete?: never;
|
|
233
|
+
options?: never;
|
|
234
|
+
head?: never;
|
|
235
|
+
patch?: never;
|
|
236
|
+
trace?: never;
|
|
237
|
+
};
|
|
238
|
+
"/invoices": {
|
|
239
|
+
parameters: {
|
|
240
|
+
query?: never;
|
|
241
|
+
header?: never;
|
|
242
|
+
path?: never;
|
|
243
|
+
cookie?: never;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* Retrieve a list of invoices
|
|
247
|
+
* @description Fetches an array of invoices detailing charges, services, and tax information for a customer's subscription.
|
|
248
|
+
*/
|
|
249
|
+
get: operations["getInvoices"];
|
|
250
|
+
put?: never;
|
|
251
|
+
post?: never;
|
|
252
|
+
delete?: never;
|
|
253
|
+
options?: never;
|
|
254
|
+
head?: never;
|
|
255
|
+
patch?: never;
|
|
256
|
+
trace?: never;
|
|
257
|
+
};
|
|
258
|
+
"/projects/{projectId}/add-user-permission": {
|
|
259
|
+
parameters: {
|
|
260
|
+
query?: never;
|
|
261
|
+
header?: never;
|
|
262
|
+
path?: never;
|
|
263
|
+
cookie?: never;
|
|
264
|
+
};
|
|
265
|
+
get?: never;
|
|
266
|
+
put?: never;
|
|
267
|
+
/**
|
|
268
|
+
* Add a User to a Project
|
|
269
|
+
* @description Adds a user with the specified role to a project.
|
|
270
|
+
*/
|
|
271
|
+
post: operations["addProjectMember"];
|
|
272
|
+
delete?: never;
|
|
273
|
+
options?: never;
|
|
274
|
+
head?: never;
|
|
275
|
+
patch?: never;
|
|
276
|
+
trace?: never;
|
|
277
|
+
};
|
|
278
|
+
"/projects/{projectId}/revoke-user-permission": {
|
|
279
|
+
parameters: {
|
|
280
|
+
query?: never;
|
|
281
|
+
header?: never;
|
|
282
|
+
path?: never;
|
|
283
|
+
cookie?: never;
|
|
284
|
+
};
|
|
285
|
+
get?: never;
|
|
286
|
+
put?: never;
|
|
287
|
+
/**
|
|
288
|
+
* Add a User to a Project
|
|
289
|
+
* @description Adds a user with the specified role to a project.
|
|
290
|
+
*/
|
|
291
|
+
post: operations["deleteProjectMember"];
|
|
292
|
+
delete?: never;
|
|
293
|
+
options?: never;
|
|
294
|
+
head?: never;
|
|
295
|
+
patch?: never;
|
|
296
|
+
trace?: never;
|
|
297
|
+
};
|
|
298
|
+
"/projects/{projectId}/change-user-role": {
|
|
299
|
+
parameters: {
|
|
300
|
+
query?: never;
|
|
301
|
+
header?: never;
|
|
302
|
+
path?: never;
|
|
303
|
+
cookie?: never;
|
|
304
|
+
};
|
|
305
|
+
get?: never;
|
|
306
|
+
put?: never;
|
|
307
|
+
/**
|
|
308
|
+
* Add a User to a Project
|
|
309
|
+
* @description Adds a user with the specified role to a project.
|
|
310
|
+
*/
|
|
311
|
+
post: operations["changeMemberRole"];
|
|
312
|
+
delete?: never;
|
|
313
|
+
options?: never;
|
|
314
|
+
head?: never;
|
|
315
|
+
patch?: never;
|
|
316
|
+
trace?: never;
|
|
317
|
+
};
|
|
318
|
+
"/projects/{projectId}/set-billing-account": {
|
|
319
|
+
parameters: {
|
|
320
|
+
query?: never;
|
|
321
|
+
header?: never;
|
|
322
|
+
path?: never;
|
|
323
|
+
cookie?: never;
|
|
324
|
+
};
|
|
325
|
+
get?: never;
|
|
326
|
+
put?: never;
|
|
327
|
+
/**
|
|
328
|
+
* Set a billing account to a project
|
|
329
|
+
* @description By adding a billing account to a project, the project becomes a billable project and the user can consume resources
|
|
330
|
+
*/
|
|
331
|
+
post: operations["setBillingAccount"];
|
|
332
|
+
delete?: never;
|
|
333
|
+
options?: never;
|
|
334
|
+
head?: never;
|
|
335
|
+
patch?: never;
|
|
336
|
+
trace?: never;
|
|
337
|
+
};
|
|
338
|
+
"/projects/{projectId}/get-billing-options": {
|
|
339
|
+
parameters: {
|
|
340
|
+
query?: never;
|
|
341
|
+
header?: never;
|
|
342
|
+
path?: never;
|
|
343
|
+
cookie?: never;
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Get billing options for a project
|
|
347
|
+
* @description Returns the billing options for a project.
|
|
348
|
+
*/
|
|
349
|
+
get: operations["getBillingOptions"];
|
|
350
|
+
put?: never;
|
|
351
|
+
post?: never;
|
|
352
|
+
delete?: never;
|
|
353
|
+
options?: never;
|
|
354
|
+
head?: never;
|
|
355
|
+
patch?: never;
|
|
356
|
+
trace?: never;
|
|
357
|
+
};
|
|
358
|
+
"/projects/{projectId}/cancel-billing": {
|
|
359
|
+
parameters: {
|
|
360
|
+
query?: never;
|
|
361
|
+
header?: never;
|
|
362
|
+
path?: never;
|
|
363
|
+
cookie?: never;
|
|
364
|
+
};
|
|
365
|
+
get?: never;
|
|
366
|
+
put?: never;
|
|
367
|
+
/**
|
|
368
|
+
* Cancel a billing account to a project
|
|
369
|
+
* @description By adding a billing account to a project, the project becomes a billable project and the user can consume resources
|
|
370
|
+
*/
|
|
371
|
+
post: operations["cancelBilling"];
|
|
372
|
+
delete?: never;
|
|
373
|
+
options?: never;
|
|
374
|
+
head?: never;
|
|
375
|
+
patch?: never;
|
|
376
|
+
trace?: never;
|
|
377
|
+
};
|
|
378
|
+
"/projects/{projectId}/create-token": {
|
|
379
|
+
parameters: {
|
|
380
|
+
query?: never;
|
|
381
|
+
header?: never;
|
|
382
|
+
path?: never;
|
|
383
|
+
cookie?: never;
|
|
384
|
+
};
|
|
385
|
+
get?: never;
|
|
386
|
+
put?: never;
|
|
387
|
+
/**
|
|
388
|
+
* Creates an ODIN access token for the specified project
|
|
389
|
+
* @description Creates an ODIN access token for the specified Rooms project which allows other applications and bots to access the project's resources.'
|
|
390
|
+
*/
|
|
391
|
+
post: operations["createAccessToken"];
|
|
392
|
+
delete?: never;
|
|
393
|
+
options?: never;
|
|
394
|
+
head?: never;
|
|
395
|
+
patch?: never;
|
|
396
|
+
trace?: never;
|
|
397
|
+
};
|
|
398
|
+
"/projects/{projectId}/revoke-secret": {
|
|
399
|
+
parameters: {
|
|
400
|
+
query?: never;
|
|
401
|
+
header?: never;
|
|
402
|
+
path?: never;
|
|
403
|
+
cookie?: never;
|
|
404
|
+
};
|
|
405
|
+
get?: never;
|
|
406
|
+
put?: never;
|
|
407
|
+
/**
|
|
408
|
+
* Revokes the secret for the specified project
|
|
409
|
+
* @description Revokes the secret for the specified Rooms project.
|
|
410
|
+
*/
|
|
411
|
+
post: operations["revokeSecret"];
|
|
412
|
+
delete?: never;
|
|
413
|
+
options?: never;
|
|
414
|
+
head?: never;
|
|
415
|
+
patch?: never;
|
|
416
|
+
trace?: never;
|
|
417
|
+
};
|
|
418
|
+
"/projects/{projectId}/preview-invoice": {
|
|
419
|
+
parameters: {
|
|
420
|
+
query?: never;
|
|
421
|
+
header?: never;
|
|
422
|
+
path?: never;
|
|
423
|
+
cookie?: never;
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* Returns a preview of the invoice for the given project for the current month. It's just a simulation.
|
|
427
|
+
* @description This simulates how an invoice would look like if it were generated for the current month.
|
|
428
|
+
*/
|
|
429
|
+
get: operations["getInvoicePreview"];
|
|
430
|
+
put?: never;
|
|
431
|
+
post?: never;
|
|
432
|
+
delete?: never;
|
|
433
|
+
options?: never;
|
|
434
|
+
head?: never;
|
|
435
|
+
patch?: never;
|
|
436
|
+
trace?: never;
|
|
437
|
+
};
|
|
438
|
+
"/projects/{projectId}/resource-package-price": {
|
|
439
|
+
parameters: {
|
|
440
|
+
query?: never;
|
|
441
|
+
header?: never;
|
|
442
|
+
path?: never;
|
|
443
|
+
cookie?: never;
|
|
444
|
+
};
|
|
445
|
+
get?: never;
|
|
446
|
+
put?: never;
|
|
447
|
+
/**
|
|
448
|
+
* Returns the price for a resource package for the given project as a specific region
|
|
449
|
+
* @description Returns price information based on data provided in the request
|
|
450
|
+
*/
|
|
451
|
+
post: operations["getResourcePackagePrice"];
|
|
452
|
+
delete?: never;
|
|
453
|
+
options?: never;
|
|
454
|
+
head?: never;
|
|
455
|
+
patch?: never;
|
|
456
|
+
trace?: never;
|
|
457
|
+
};
|
|
458
|
+
"/projects/{projectId}/resource-package-prices": {
|
|
459
|
+
parameters: {
|
|
460
|
+
query?: never;
|
|
461
|
+
header?: never;
|
|
462
|
+
path?: never;
|
|
463
|
+
cookie?: never;
|
|
464
|
+
};
|
|
465
|
+
get?: never;
|
|
466
|
+
put?: never;
|
|
467
|
+
/**
|
|
468
|
+
* Returns the prices for all specified resource packages for the given project as a specific region
|
|
469
|
+
* @description Returns price information based on data provided in the request
|
|
470
|
+
*/
|
|
471
|
+
post: operations["getResourcePackagePrices"];
|
|
472
|
+
delete?: never;
|
|
473
|
+
options?: never;
|
|
474
|
+
head?: never;
|
|
475
|
+
patch?: never;
|
|
476
|
+
trace?: never;
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
interface components {
|
|
480
|
+
schemas: {
|
|
481
|
+
/**
|
|
482
|
+
* @description The status of the user.
|
|
483
|
+
* @enum {string}
|
|
484
|
+
*/
|
|
485
|
+
UserStatus: "active" | "pending" | "revoked";
|
|
486
|
+
/**
|
|
487
|
+
* @description The role of the user within the project.
|
|
488
|
+
* @enum {string}
|
|
489
|
+
*/
|
|
490
|
+
PermissionRole: "maintainer" | "admin" | "developer";
|
|
491
|
+
SuccessResponse: {
|
|
492
|
+
/** @description Indicates whether the operation was successful. */
|
|
493
|
+
success?: boolean;
|
|
494
|
+
};
|
|
495
|
+
ChangeUserRolePayload: {
|
|
496
|
+
/** @description The id of the user permission to change */
|
|
497
|
+
projectPermissionId: string;
|
|
498
|
+
role: components["schemas"]["PermissionRole"];
|
|
499
|
+
};
|
|
500
|
+
RevokeUserPayload: {
|
|
501
|
+
/** @description The id of the user permission to revoke */
|
|
502
|
+
projectPermissionId: string;
|
|
503
|
+
};
|
|
504
|
+
AddUserToProjectPayload: {
|
|
505
|
+
/**
|
|
506
|
+
* Format: email
|
|
507
|
+
* @description The email address of the user to be added to the project.
|
|
508
|
+
*/
|
|
509
|
+
email: string;
|
|
510
|
+
role: components["schemas"]["PermissionRole"];
|
|
511
|
+
};
|
|
512
|
+
SetBillingAccountPayload: {
|
|
513
|
+
/** @description The ID of the billing account to be set for the project. */
|
|
514
|
+
billingAccountId: string;
|
|
515
|
+
/** @description The billing state to be set for the project. This determines the billing plan and associated features. */
|
|
516
|
+
billingState: components["schemas"]["BillingState"];
|
|
517
|
+
};
|
|
518
|
+
EditProjectPayload: {
|
|
519
|
+
/** @description The new name for the project. */
|
|
520
|
+
name?: string;
|
|
521
|
+
/** @description A new description for the project. */
|
|
522
|
+
description?: string;
|
|
523
|
+
/** @description The new peer limit for the project. */
|
|
524
|
+
peerLimit?: number;
|
|
525
|
+
};
|
|
526
|
+
EditAccessKeyPayload: {
|
|
527
|
+
/** @description The new name for the access key. */
|
|
528
|
+
name: string;
|
|
529
|
+
/** @description A new description for the access key. */
|
|
530
|
+
description?: string;
|
|
531
|
+
};
|
|
532
|
+
CreateAccessKeyPayload: {
|
|
533
|
+
/** @description The name of the new access key. */
|
|
534
|
+
name: string;
|
|
535
|
+
/** @description An optional description for the access key. */
|
|
536
|
+
description?: string;
|
|
537
|
+
/** @description The identifier of the project for which the access key is created. */
|
|
538
|
+
projectId: string;
|
|
539
|
+
};
|
|
540
|
+
PaymentProject: {
|
|
541
|
+
/** @description Unique identifier for the project. */
|
|
542
|
+
id?: string;
|
|
543
|
+
/** @description Name of the project. */
|
|
544
|
+
name?: string;
|
|
545
|
+
/** @description A brief description of the project. */
|
|
546
|
+
description?: string;
|
|
547
|
+
/** @description The API endpoint URL for the specific project. */
|
|
548
|
+
url?: string;
|
|
549
|
+
/** @description The maximum number of peers that can be associated with the project. */
|
|
550
|
+
peerLimit?: number;
|
|
551
|
+
/** @description Type of hosting for the project, e.g., hosted or on-premise. */
|
|
552
|
+
hostingType?: string;
|
|
553
|
+
/**
|
|
554
|
+
* Format: date-time
|
|
555
|
+
* @description The creation date and time of the project.
|
|
556
|
+
*/
|
|
557
|
+
created?: string;
|
|
558
|
+
/**
|
|
559
|
+
* Format: date-time
|
|
560
|
+
* @description The last update date and time of the project.
|
|
561
|
+
*/
|
|
562
|
+
updated?: string;
|
|
563
|
+
/** @description A list of access keys associated with the project. */
|
|
564
|
+
accessKeys?: components["schemas"]["OdinAccessKey"][];
|
|
565
|
+
subscription?: components["schemas"]["Subscription"];
|
|
566
|
+
/** @description The role of the requesting user in the context of the project. */
|
|
567
|
+
role?: string;
|
|
568
|
+
permissions?: components["schemas"]["OdinUserPermissions"];
|
|
569
|
+
/** @description A list of users associated with the project. */
|
|
570
|
+
users?: components["schemas"]["OdinUserRole"][];
|
|
571
|
+
/** @description Application identifier associated with the project. */
|
|
572
|
+
appId?: string;
|
|
573
|
+
billingAccount?: components["schemas"]["BillingAccount"];
|
|
574
|
+
/** @description The secret for the project. */
|
|
575
|
+
secret?: string;
|
|
576
|
+
/** @description The domain name for the project. */
|
|
577
|
+
domain?: string;
|
|
578
|
+
/** @description The type of the project (conferencing or sdk) */
|
|
579
|
+
type?: string;
|
|
580
|
+
/** @description The billing state history */
|
|
581
|
+
billingStateHistory?: components["schemas"]["BillingState"][];
|
|
582
|
+
};
|
|
583
|
+
SetupSession: {
|
|
584
|
+
/** @description The URL that the user needs to be redirected to in order to create a new billing account at Stripe. */
|
|
585
|
+
url?: string;
|
|
586
|
+
};
|
|
587
|
+
CreateSetupSessionPayload: {
|
|
588
|
+
/** @description The name of the billing account */
|
|
589
|
+
name: string;
|
|
590
|
+
/** @description The email address that should be used for the billing account (this may be another email address than that of the user) */
|
|
591
|
+
email: string;
|
|
592
|
+
/** @description The URL to which the user will be redirected after successfully creating the billing account */
|
|
593
|
+
successUrl: string;
|
|
594
|
+
/** @description The URL to which the user will be redirected if they cancel the billing account creation */
|
|
595
|
+
cancelUrl: string;
|
|
596
|
+
/** @description Additional information that will later be printed on invoices */
|
|
597
|
+
additionalInfo?: string;
|
|
598
|
+
};
|
|
599
|
+
CreateBillingPortalSessionPayload: {
|
|
600
|
+
/** @description The URL shown in the Stripe Customer Portal to return to the service */
|
|
601
|
+
returnUrl: string;
|
|
602
|
+
};
|
|
603
|
+
PortalSession: {
|
|
604
|
+
/** @description The URL that the user needs to be redirected to in order to access the billing portal */
|
|
605
|
+
url?: string;
|
|
606
|
+
};
|
|
607
|
+
BillingAccount: {
|
|
608
|
+
/** @description The unique identifier of the billing account */
|
|
609
|
+
id?: number;
|
|
610
|
+
/** @description The email address that should be used for the billing account (this may be another email address than that of the user) */
|
|
611
|
+
email?: string;
|
|
612
|
+
/** @description The name of the billing account */
|
|
613
|
+
name?: string;
|
|
614
|
+
/** @description Additional information that will later be printed on invoices */
|
|
615
|
+
additionalInfo?: string;
|
|
616
|
+
/**
|
|
617
|
+
* Format: date-time
|
|
618
|
+
* @description The date and time when the billing account was created
|
|
619
|
+
*/
|
|
620
|
+
created?: string;
|
|
621
|
+
};
|
|
622
|
+
OdinAccessKey: {
|
|
623
|
+
/** @description Unique identifier for the access key. */
|
|
624
|
+
id?: string;
|
|
625
|
+
/** @description Name of the access key. */
|
|
626
|
+
name?: string;
|
|
627
|
+
/** @description A brief description of the access key. */
|
|
628
|
+
description?: string | null;
|
|
629
|
+
/** @description The public key. */
|
|
630
|
+
pubKey?: string;
|
|
631
|
+
/** @description Identifier for the key. */
|
|
632
|
+
keyId?: string;
|
|
633
|
+
/** @description The project ID that this access key is associated with. */
|
|
634
|
+
projectId?: string;
|
|
635
|
+
/**
|
|
636
|
+
* Format: date-time
|
|
637
|
+
* @description Expiration date of the access key.
|
|
638
|
+
*/
|
|
639
|
+
expirationDate?: string | null;
|
|
640
|
+
/** @description The API endpoint URL for the specific access key. */
|
|
641
|
+
url?: string;
|
|
642
|
+
/**
|
|
643
|
+
* Format: date-time
|
|
644
|
+
* @description The creation date and time of the access key.
|
|
645
|
+
*/
|
|
646
|
+
created?: string;
|
|
647
|
+
/**
|
|
648
|
+
* Format: date-time
|
|
649
|
+
* @description The last update date and time of the access key.
|
|
650
|
+
*/
|
|
651
|
+
updated?: string;
|
|
652
|
+
/** @description The access key. Only returned in the Create Access Key response otherwise null */
|
|
653
|
+
accessKey?: string;
|
|
654
|
+
};
|
|
655
|
+
/** @description Permissions associated with the project. */
|
|
656
|
+
OdinUserPermissions: {
|
|
657
|
+
/** @description Permission to add an access key. */
|
|
658
|
+
addAccessKey?: boolean;
|
|
659
|
+
/** @description Permission to edit an access key. */
|
|
660
|
+
editAccessKey?: boolean;
|
|
661
|
+
/** @description Permission to delete an access key. */
|
|
662
|
+
deleteAccessKey?: boolean;
|
|
663
|
+
/** @description Permission to add a user to the project. */
|
|
664
|
+
addUser?: boolean;
|
|
665
|
+
/** @description Permission to edit a user's details. */
|
|
666
|
+
editUser?: boolean;
|
|
667
|
+
/** @description Permission to delete a user from the project. */
|
|
668
|
+
deleteUser?: boolean;
|
|
669
|
+
/** @description Permission to set the peer limit for the project. */
|
|
670
|
+
setPeerLimit?: boolean;
|
|
671
|
+
/** @description Permission to change the project's name. */
|
|
672
|
+
setProjectName?: boolean;
|
|
673
|
+
/** @description Permission to download the project's license. */
|
|
674
|
+
downloadLicense?: boolean;
|
|
675
|
+
};
|
|
676
|
+
/** @description A user associated with the project. */
|
|
677
|
+
OdinUserRole: {
|
|
678
|
+
/** @description Unique identifier for the user. */
|
|
679
|
+
id?: string;
|
|
680
|
+
/** @description Name of the user. Can be empty if not provided. */
|
|
681
|
+
name?: string;
|
|
682
|
+
/** @description Email address of the user. */
|
|
683
|
+
email?: string;
|
|
684
|
+
role?: components["schemas"]["PermissionRole"];
|
|
685
|
+
status?: components["schemas"]["UserStatus"];
|
|
686
|
+
/**
|
|
687
|
+
* Format: date-time
|
|
688
|
+
* @description The creation date and time of the user's association with the project.
|
|
689
|
+
*/
|
|
690
|
+
created?: string;
|
|
691
|
+
};
|
|
692
|
+
OdinPeersOverTime: {
|
|
693
|
+
/** @description An array of pairs, each pair consists of a Unix timestamp in milliseconds and the number of peak users at this timestamp. */
|
|
694
|
+
peak: number[][];
|
|
695
|
+
/** @description An array of pairs, each pair consists of a Unix timestamp in milliseconds and the number of average users at this timestamp. */
|
|
696
|
+
average: number[][];
|
|
697
|
+
};
|
|
698
|
+
ResourcePackagePricePayload: {
|
|
699
|
+
/** @description The region for which the price is being requested. */
|
|
700
|
+
region: string;
|
|
701
|
+
/** @description The ID of the resource package for which the price is being requested. */
|
|
702
|
+
resourcePackageId: number;
|
|
703
|
+
/** @description The number of instances that should be used for price calculation. */
|
|
704
|
+
quantity: number;
|
|
705
|
+
};
|
|
706
|
+
ResourcePackagePricesPayload: {
|
|
707
|
+
/** @description The region for which the prices are being requested. */
|
|
708
|
+
region?: string;
|
|
709
|
+
/** @description The list of IDs of the resource packages for which the prices are being requested. */
|
|
710
|
+
resourcePackageIds: number[];
|
|
711
|
+
/** @description The number of instances that should be used for price calculation. */
|
|
712
|
+
quantity?: number;
|
|
713
|
+
};
|
|
714
|
+
ResourcePackagePrice: {
|
|
715
|
+
/**
|
|
716
|
+
* @description The ID of the resource package for which the price has been requested.
|
|
717
|
+
* @example 1
|
|
718
|
+
*/
|
|
719
|
+
resourcePackageId: number;
|
|
720
|
+
/** @description The name of the resource package for which the price has been requested. */
|
|
721
|
+
resourcePackageName: string;
|
|
722
|
+
/**
|
|
723
|
+
* Format: float
|
|
724
|
+
* @description The price for the resource package in the specified region pay day.
|
|
725
|
+
* @example 1.02
|
|
726
|
+
*/
|
|
727
|
+
pricePerDay: number;
|
|
728
|
+
/**
|
|
729
|
+
* Format: float
|
|
730
|
+
* @description The price for the resource package in the specified region per 30 days.
|
|
731
|
+
* @example 30.6
|
|
732
|
+
*/
|
|
733
|
+
pricePerMonth: number;
|
|
734
|
+
/**
|
|
735
|
+
* @description The currency in which the price is specified.
|
|
736
|
+
* @example EUR
|
|
737
|
+
*/
|
|
738
|
+
currency: string;
|
|
739
|
+
};
|
|
740
|
+
Subscription: {
|
|
741
|
+
/** @description The unique identifier of the subscription. */
|
|
742
|
+
id?: string;
|
|
743
|
+
/** @description The name of the subscription plan. */
|
|
744
|
+
name?: string;
|
|
745
|
+
/** @description The name of the service provider, e.g., "4Netplayers". */
|
|
746
|
+
service?: string;
|
|
747
|
+
/** @description Indicates whether the subscription is paid. */
|
|
748
|
+
isPaid?: boolean;
|
|
749
|
+
/** @description Indicates whether the subscription is currently active. */
|
|
750
|
+
isActive?: boolean;
|
|
751
|
+
/** @description The URL to the customer's details associated with this subscription. */
|
|
752
|
+
customer?: string;
|
|
753
|
+
/**
|
|
754
|
+
* Format: date
|
|
755
|
+
* @description The start date of the subscription.
|
|
756
|
+
*/
|
|
757
|
+
start?: string;
|
|
758
|
+
/** @description The end date of the subscription. Can be false if the subscription is ongoing. */
|
|
759
|
+
end?: string | null;
|
|
760
|
+
/**
|
|
761
|
+
* Format: date
|
|
762
|
+
* @description The date when the next invoice will be issued.
|
|
763
|
+
*/
|
|
764
|
+
nextInvoice?: string;
|
|
765
|
+
invoices?: components["schemas"]["Invoices"];
|
|
766
|
+
/**
|
|
767
|
+
* Format: float
|
|
768
|
+
* @description The monthly amount to be paid for the subscription.
|
|
769
|
+
*/
|
|
770
|
+
amount?: number;
|
|
771
|
+
/** @description Indicates whether changes to the subscription are allowed. */
|
|
772
|
+
changeAllowed?: boolean;
|
|
773
|
+
/** @description The number of days until changes to the subscription can be made. */
|
|
774
|
+
nextChange?: number;
|
|
775
|
+
/**
|
|
776
|
+
* Format: float
|
|
777
|
+
* @description The remaining amount to be paid.
|
|
778
|
+
*/
|
|
779
|
+
remainingAmount?: number;
|
|
780
|
+
/** @description The remaining time in days for the subscription. */
|
|
781
|
+
remainingTime?: number;
|
|
782
|
+
/** @description The billing interval in days. */
|
|
783
|
+
interval?: number;
|
|
784
|
+
positions?: components["schemas"]["SubscriptionPosition"][];
|
|
785
|
+
/** @description The URL to access the subscription details. */
|
|
786
|
+
url?: string;
|
|
787
|
+
/** @description The URL for upgrading the subscription. */
|
|
788
|
+
upgradeUrl?: string;
|
|
789
|
+
};
|
|
790
|
+
Invoices: {
|
|
791
|
+
/** @description The URL to access the invoices related to this subscription. */
|
|
792
|
+
url?: string;
|
|
793
|
+
/** @description An array of invoice identifiers related to this subscription. */
|
|
794
|
+
ids?: string[];
|
|
795
|
+
};
|
|
796
|
+
Invoice: {
|
|
797
|
+
/** @description The unique identifier for the invoice. */
|
|
798
|
+
id?: string;
|
|
799
|
+
/** @description The invoice number as it appears in financial records. */
|
|
800
|
+
invoicenumber?: string;
|
|
801
|
+
/**
|
|
802
|
+
* Format: datetime
|
|
803
|
+
* @description The date and time when the invoice was issued.
|
|
804
|
+
*/
|
|
805
|
+
date?: string;
|
|
806
|
+
/**
|
|
807
|
+
* Format: float
|
|
808
|
+
* @description The total amount charged on the invoice.
|
|
809
|
+
*/
|
|
810
|
+
amount?: number;
|
|
811
|
+
/**
|
|
812
|
+
* Format: float
|
|
813
|
+
* @description The net amount before taxes.
|
|
814
|
+
*/
|
|
815
|
+
netamount?: number;
|
|
816
|
+
/**
|
|
817
|
+
* Format: float
|
|
818
|
+
* @description The total tax amount on the invoice.
|
|
819
|
+
*/
|
|
820
|
+
tax?: number;
|
|
821
|
+
/** @description A descriptive name for the invoice, typically indicating the service period or bundle. */
|
|
822
|
+
name?: string;
|
|
823
|
+
/** @description Detailed line items for each charge included in the invoice. */
|
|
824
|
+
positions?: components["schemas"]["InvoicePosition"][];
|
|
825
|
+
/** @description URL to the customer details this invoice is associated with. */
|
|
826
|
+
customer?: string;
|
|
827
|
+
/** @description URL to this specific invoice's details. */
|
|
828
|
+
url?: string;
|
|
829
|
+
status?: components["schemas"]["InvoiceStatus"];
|
|
830
|
+
};
|
|
831
|
+
/**
|
|
832
|
+
* @description The status of the invoice.
|
|
833
|
+
* @enum {string}
|
|
834
|
+
*/
|
|
835
|
+
InvoiceStatus: "open" | "paid";
|
|
836
|
+
InvoicePosition: {
|
|
837
|
+
/** @description The index or line number of this position in the invoice. */
|
|
838
|
+
index?: number;
|
|
839
|
+
/** @description The name or description of the service or product charged. */
|
|
840
|
+
name?: string;
|
|
841
|
+
/**
|
|
842
|
+
* Format: float
|
|
843
|
+
* @description The total amount for this line item.
|
|
844
|
+
*/
|
|
845
|
+
amount?: number;
|
|
846
|
+
/**
|
|
847
|
+
* Format: float
|
|
848
|
+
* @description The net amount for this line item before taxes.
|
|
849
|
+
*/
|
|
850
|
+
netamount?: number;
|
|
851
|
+
/**
|
|
852
|
+
* Format: float
|
|
853
|
+
* @description The tax amount for this line item.
|
|
854
|
+
*/
|
|
855
|
+
tax?: number;
|
|
856
|
+
/**
|
|
857
|
+
* Format: float
|
|
858
|
+
* @description The amount per unit or piece for this line item.
|
|
859
|
+
*/
|
|
860
|
+
pieceamount?: number;
|
|
861
|
+
/**
|
|
862
|
+
* Format: float
|
|
863
|
+
* @description The net amount per unit or piece before taxes.
|
|
864
|
+
*/
|
|
865
|
+
piecenetamount?: number;
|
|
866
|
+
/** @description The tax rate applied to this line item, represented as a percentage. */
|
|
867
|
+
taxrate?: number;
|
|
868
|
+
/** @description The quantity of the item or service charged in this line item. */
|
|
869
|
+
quantity?: number;
|
|
870
|
+
/**
|
|
871
|
+
* Format: date
|
|
872
|
+
* @description The start date for the service period of this line item.
|
|
873
|
+
*/
|
|
874
|
+
start?: string;
|
|
875
|
+
/**
|
|
876
|
+
* Format: date
|
|
877
|
+
* @description The end date for the service period of this line item.
|
|
878
|
+
*/
|
|
879
|
+
end?: string;
|
|
880
|
+
};
|
|
881
|
+
SubscriptionPosition: {
|
|
882
|
+
/** @description The name of the service or item within the subscription. */
|
|
883
|
+
name?: string;
|
|
884
|
+
/**
|
|
885
|
+
* Format: float
|
|
886
|
+
* @description The cost associated with this position in the subscription.
|
|
887
|
+
*/
|
|
888
|
+
amount?: number;
|
|
889
|
+
/** @description An identifier for the user, possibly an IP address or a unique user string. */
|
|
890
|
+
userident?: string;
|
|
891
|
+
params?: components["schemas"]["TariffParams"];
|
|
892
|
+
};
|
|
893
|
+
/** @description A key-value store for various parameters related to the subscription's tariff. This flexible structure allows for any number of properties to be included, each represented as a string value. */
|
|
894
|
+
TariffParams: {
|
|
895
|
+
[key: string]: string;
|
|
896
|
+
};
|
|
897
|
+
BillingStateHistory: {
|
|
898
|
+
billingState?: components["schemas"]["BillingState"];
|
|
899
|
+
/**
|
|
900
|
+
* Format: date-time
|
|
901
|
+
* @description The start of that billing cycle
|
|
902
|
+
*/
|
|
903
|
+
start?: string;
|
|
904
|
+
/**
|
|
905
|
+
* Format: date-time
|
|
906
|
+
* @description The end of that billing cycle
|
|
907
|
+
*/
|
|
908
|
+
end?: string;
|
|
909
|
+
};
|
|
910
|
+
/**
|
|
911
|
+
* @description The billing state to be set for the project. This determines the billing plan and associated features.
|
|
912
|
+
* @enum {string}
|
|
913
|
+
*/
|
|
914
|
+
BillingState: "free" | "mini" | "indie" | "active" | "external";
|
|
915
|
+
TokenPayload: {
|
|
916
|
+
/** @description The access token to be used for authentication for Rooms */
|
|
917
|
+
token?: string;
|
|
918
|
+
/** @description The domain name of the Rooms instance associated with the token */
|
|
919
|
+
domain?: string;
|
|
920
|
+
};
|
|
921
|
+
CreateTokenPayload: {
|
|
922
|
+
/** @description The identifier of the room that the token should be created for */
|
|
923
|
+
roomId?: string;
|
|
924
|
+
/** @description The identifier of the user that the token should be created for */
|
|
925
|
+
userId?: string;
|
|
926
|
+
/** @description The secret key for the Rooms instance */
|
|
927
|
+
secret?: string;
|
|
928
|
+
};
|
|
929
|
+
BillingOptions: {
|
|
930
|
+
currentBillingState?: components["schemas"]["BillingState"];
|
|
931
|
+
changeOptions?: components["schemas"]["BillingChangeOptions"];
|
|
932
|
+
/** @description The billing state history */
|
|
933
|
+
billingStateHistory?: components["schemas"]["BillingState"][];
|
|
934
|
+
externalSubscription?: components["schemas"]["Subscription"];
|
|
935
|
+
};
|
|
936
|
+
BillingChangeOptions: {
|
|
937
|
+
/** Format: date */
|
|
938
|
+
free?: string;
|
|
939
|
+
/** Format: date */
|
|
940
|
+
mini?: string;
|
|
941
|
+
/** Format: date */
|
|
942
|
+
indie?: string;
|
|
943
|
+
/** Format: date */
|
|
944
|
+
active?: string;
|
|
945
|
+
};
|
|
946
|
+
};
|
|
947
|
+
responses: never;
|
|
948
|
+
parameters: never;
|
|
949
|
+
requestBodies: never;
|
|
950
|
+
headers: never;
|
|
951
|
+
pathItems: never;
|
|
952
|
+
}
|
|
953
|
+
interface operations {
|
|
954
|
+
getPaymentProjects: {
|
|
955
|
+
parameters: {
|
|
956
|
+
query?: never;
|
|
957
|
+
header?: never;
|
|
958
|
+
path?: never;
|
|
959
|
+
cookie?: never;
|
|
960
|
+
};
|
|
961
|
+
requestBody?: never;
|
|
962
|
+
responses: {
|
|
963
|
+
/** @description A list of apps and an error envelope. */
|
|
964
|
+
200: {
|
|
965
|
+
headers: {
|
|
966
|
+
[name: string]: unknown;
|
|
967
|
+
};
|
|
968
|
+
content: {
|
|
969
|
+
"application/json": components["schemas"]["PaymentProject"][];
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
};
|
|
974
|
+
getPaymentProjectForApp: {
|
|
975
|
+
parameters: {
|
|
976
|
+
query?: never;
|
|
977
|
+
header?: never;
|
|
978
|
+
path: {
|
|
979
|
+
/** @description The ID of the app to retrieve */
|
|
980
|
+
app_id: string;
|
|
981
|
+
};
|
|
982
|
+
cookie?: never;
|
|
983
|
+
};
|
|
984
|
+
requestBody?: never;
|
|
985
|
+
responses: {
|
|
986
|
+
/** @description Successful operation */
|
|
987
|
+
200: {
|
|
988
|
+
headers: {
|
|
989
|
+
[name: string]: unknown;
|
|
990
|
+
};
|
|
991
|
+
content: {
|
|
992
|
+
"application/json": components["schemas"]["PaymentProject"];
|
|
993
|
+
};
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
getPeersOverTime: {
|
|
998
|
+
parameters: {
|
|
999
|
+
query: {
|
|
1000
|
+
/** @description The start timestamp for querying the data, in Unix timestamp format. */
|
|
1001
|
+
start: number;
|
|
1002
|
+
};
|
|
1003
|
+
header?: never;
|
|
1004
|
+
path: {
|
|
1005
|
+
/** @description The unique identifier of the project. */
|
|
1006
|
+
projectId: string;
|
|
1007
|
+
};
|
|
1008
|
+
cookie?: never;
|
|
1009
|
+
};
|
|
1010
|
+
requestBody?: never;
|
|
1011
|
+
responses: {
|
|
1012
|
+
/** @description A successful response with peak peers data over time. */
|
|
1013
|
+
200: {
|
|
1014
|
+
headers: {
|
|
1015
|
+
[name: string]: unknown;
|
|
1016
|
+
};
|
|
1017
|
+
content: {
|
|
1018
|
+
"application/json": components["schemas"]["OdinPeersOverTime"];
|
|
1019
|
+
};
|
|
1020
|
+
};
|
|
1021
|
+
};
|
|
1022
|
+
};
|
|
1023
|
+
createSetupSession: {
|
|
1024
|
+
parameters: {
|
|
1025
|
+
query?: never;
|
|
1026
|
+
header?: never;
|
|
1027
|
+
path?: never;
|
|
1028
|
+
cookie?: never;
|
|
1029
|
+
};
|
|
1030
|
+
requestBody: {
|
|
1031
|
+
content: {
|
|
1032
|
+
"application/json": components["schemas"]["CreateSetupSessionPayload"];
|
|
1033
|
+
};
|
|
1034
|
+
};
|
|
1035
|
+
responses: {
|
|
1036
|
+
/** @description Setup Session created */
|
|
1037
|
+
200: {
|
|
1038
|
+
headers: {
|
|
1039
|
+
[name: string]: unknown;
|
|
1040
|
+
};
|
|
1041
|
+
content: {
|
|
1042
|
+
"application/json": components["schemas"]["SetupSession"];
|
|
1043
|
+
};
|
|
1044
|
+
};
|
|
1045
|
+
/** @description Bad Request – missing field or Stripe error */
|
|
1046
|
+
400: {
|
|
1047
|
+
headers: {
|
|
1048
|
+
[name: string]: unknown;
|
|
1049
|
+
};
|
|
1050
|
+
content: {
|
|
1051
|
+
"application/json": {
|
|
1052
|
+
error?: string;
|
|
1053
|
+
/**
|
|
1054
|
+
* @description - 1801: Customer already has a Stripe account
|
|
1055
|
+
* - 1802: Missing required field
|
|
1056
|
+
* - 1803: Stripe error while creating customer
|
|
1057
|
+
*/
|
|
1058
|
+
code?: number;
|
|
1059
|
+
};
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
1062
|
+
/** @description Unauthorized – no DIKunde available */
|
|
1063
|
+
401: {
|
|
1064
|
+
headers: {
|
|
1065
|
+
[name: string]: unknown;
|
|
1066
|
+
};
|
|
1067
|
+
content: {
|
|
1068
|
+
"application/json": {
|
|
1069
|
+
error?: string;
|
|
1070
|
+
};
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
|
+
};
|
|
1075
|
+
getBillingAccounts: {
|
|
1076
|
+
parameters: {
|
|
1077
|
+
query?: never;
|
|
1078
|
+
header?: never;
|
|
1079
|
+
path?: never;
|
|
1080
|
+
cookie?: never;
|
|
1081
|
+
};
|
|
1082
|
+
requestBody?: never;
|
|
1083
|
+
responses: {
|
|
1084
|
+
/** @description An array of billing accounts linked to the user. */
|
|
1085
|
+
200: {
|
|
1086
|
+
headers: {
|
|
1087
|
+
[name: string]: unknown;
|
|
1088
|
+
};
|
|
1089
|
+
content: {
|
|
1090
|
+
"application/json": components["schemas"]["BillingAccount"][];
|
|
1091
|
+
};
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
getBillingAccount: {
|
|
1096
|
+
parameters: {
|
|
1097
|
+
query?: never;
|
|
1098
|
+
header?: never;
|
|
1099
|
+
path: {
|
|
1100
|
+
/** @description The unique identifier of the billing account to retrieve. */
|
|
1101
|
+
billingAccountId: string;
|
|
1102
|
+
};
|
|
1103
|
+
cookie?: never;
|
|
1104
|
+
};
|
|
1105
|
+
requestBody?: never;
|
|
1106
|
+
responses: {
|
|
1107
|
+
/** @description A successful response with the details of the billing account. */
|
|
1108
|
+
200: {
|
|
1109
|
+
headers: {
|
|
1110
|
+
[name: string]: unknown;
|
|
1111
|
+
};
|
|
1112
|
+
content: {
|
|
1113
|
+
"application/json": components["schemas"]["BillingAccount"];
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
/** @description The billing account could not be found. */
|
|
1117
|
+
404: {
|
|
1118
|
+
headers: {
|
|
1119
|
+
[name: string]: unknown;
|
|
1120
|
+
};
|
|
1121
|
+
content?: never;
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
};
|
|
1125
|
+
createBillingPortalSession: {
|
|
1126
|
+
parameters: {
|
|
1127
|
+
query?: never;
|
|
1128
|
+
header?: never;
|
|
1129
|
+
path: {
|
|
1130
|
+
/** @description The unique identifier of the billing account to retrieve. */
|
|
1131
|
+
billingAccountId: string;
|
|
1132
|
+
};
|
|
1133
|
+
cookie?: never;
|
|
1134
|
+
};
|
|
1135
|
+
requestBody: {
|
|
1136
|
+
content: {
|
|
1137
|
+
"application/json": components["schemas"]["CreateBillingPortalSessionPayload"];
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
responses: {
|
|
1141
|
+
/** @description Portal Session created */
|
|
1142
|
+
200: {
|
|
1143
|
+
headers: {
|
|
1144
|
+
[name: string]: unknown;
|
|
1145
|
+
};
|
|
1146
|
+
content: {
|
|
1147
|
+
"application/json": components["schemas"]["PortalSession"];
|
|
1148
|
+
};
|
|
1149
|
+
};
|
|
1150
|
+
/** @description Bad Request – missing field or Stripe error */
|
|
1151
|
+
400: {
|
|
1152
|
+
headers: {
|
|
1153
|
+
[name: string]: unknown;
|
|
1154
|
+
};
|
|
1155
|
+
content: {
|
|
1156
|
+
"application/json": {
|
|
1157
|
+
error?: string;
|
|
1158
|
+
/**
|
|
1159
|
+
* @description - 1802: Missing required field
|
|
1160
|
+
* - 1803: Stripe error while creating setup session
|
|
1161
|
+
*/
|
|
1162
|
+
code?: number;
|
|
1163
|
+
};
|
|
1164
|
+
};
|
|
1165
|
+
};
|
|
1166
|
+
/** @description Unauthorized – no DIKunde available */
|
|
1167
|
+
401: {
|
|
1168
|
+
headers: {
|
|
1169
|
+
[name: string]: unknown;
|
|
1170
|
+
};
|
|
1171
|
+
content: {
|
|
1172
|
+
"application/json": {
|
|
1173
|
+
error?: string;
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
};
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
getBillingAccountInvoices: {
|
|
1180
|
+
parameters: {
|
|
1181
|
+
query?: never;
|
|
1182
|
+
header?: never;
|
|
1183
|
+
path: {
|
|
1184
|
+
/** @description The unique identifier of the billing account to retrieve. */
|
|
1185
|
+
billingAccountId: string;
|
|
1186
|
+
};
|
|
1187
|
+
cookie?: never;
|
|
1188
|
+
};
|
|
1189
|
+
requestBody?: never;
|
|
1190
|
+
responses: {
|
|
1191
|
+
/** @description An array of invoices. */
|
|
1192
|
+
200: {
|
|
1193
|
+
headers: {
|
|
1194
|
+
[name: string]: unknown;
|
|
1195
|
+
};
|
|
1196
|
+
content: {
|
|
1197
|
+
"application/json": components["schemas"]["Invoice"][];
|
|
1198
|
+
};
|
|
1199
|
+
};
|
|
1200
|
+
};
|
|
1201
|
+
};
|
|
1202
|
+
getProject: {
|
|
1203
|
+
parameters: {
|
|
1204
|
+
query?: never;
|
|
1205
|
+
header?: never;
|
|
1206
|
+
path: {
|
|
1207
|
+
/** @description The unique identifier of the project to retrieve. */
|
|
1208
|
+
projectId: string;
|
|
1209
|
+
};
|
|
1210
|
+
cookie?: never;
|
|
1211
|
+
};
|
|
1212
|
+
requestBody?: never;
|
|
1213
|
+
responses: {
|
|
1214
|
+
/** @description A successful response with the details of the project. */
|
|
1215
|
+
200: {
|
|
1216
|
+
headers: {
|
|
1217
|
+
[name: string]: unknown;
|
|
1218
|
+
};
|
|
1219
|
+
content: {
|
|
1220
|
+
"application/json": components["schemas"]["PaymentProject"];
|
|
1221
|
+
};
|
|
1222
|
+
};
|
|
1223
|
+
/** @description The project could not be found. */
|
|
1224
|
+
404: {
|
|
1225
|
+
headers: {
|
|
1226
|
+
[name: string]: unknown;
|
|
1227
|
+
};
|
|
1228
|
+
content?: never;
|
|
1229
|
+
};
|
|
1230
|
+
};
|
|
1231
|
+
};
|
|
1232
|
+
editProject: {
|
|
1233
|
+
parameters: {
|
|
1234
|
+
query?: never;
|
|
1235
|
+
header?: never;
|
|
1236
|
+
path: {
|
|
1237
|
+
/** @description The unique identifier of the project to retrieve. */
|
|
1238
|
+
projectId: string;
|
|
1239
|
+
};
|
|
1240
|
+
cookie?: never;
|
|
1241
|
+
};
|
|
1242
|
+
requestBody: {
|
|
1243
|
+
content: {
|
|
1244
|
+
"application/json": components["schemas"]["EditProjectPayload"];
|
|
1245
|
+
};
|
|
1246
|
+
};
|
|
1247
|
+
responses: {
|
|
1248
|
+
/** @description Successfully updated the project. */
|
|
1249
|
+
200: {
|
|
1250
|
+
headers: {
|
|
1251
|
+
[name: string]: unknown;
|
|
1252
|
+
};
|
|
1253
|
+
content: {
|
|
1254
|
+
"application/json": components["schemas"]["SuccessResponse"];
|
|
1255
|
+
};
|
|
1256
|
+
};
|
|
1257
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1258
|
+
400: {
|
|
1259
|
+
headers: {
|
|
1260
|
+
[name: string]: unknown;
|
|
1261
|
+
};
|
|
1262
|
+
content?: never;
|
|
1263
|
+
};
|
|
1264
|
+
/** @description Forbidden, e.g., the user does not have permission to edit the specified project. */
|
|
1265
|
+
403: {
|
|
1266
|
+
headers: {
|
|
1267
|
+
[name: string]: unknown;
|
|
1268
|
+
};
|
|
1269
|
+
content?: never;
|
|
1270
|
+
};
|
|
1271
|
+
/** @description The project could not be found or does not exist. */
|
|
1272
|
+
404: {
|
|
1273
|
+
headers: {
|
|
1274
|
+
[name: string]: unknown;
|
|
1275
|
+
};
|
|
1276
|
+
content?: never;
|
|
1277
|
+
};
|
|
1278
|
+
};
|
|
1279
|
+
};
|
|
1280
|
+
getAccessKey: {
|
|
1281
|
+
parameters: {
|
|
1282
|
+
query?: never;
|
|
1283
|
+
header?: never;
|
|
1284
|
+
path: {
|
|
1285
|
+
/** @description The unique identifier of the access key to retrieve. */
|
|
1286
|
+
accessKeyId: string;
|
|
1287
|
+
};
|
|
1288
|
+
cookie?: never;
|
|
1289
|
+
};
|
|
1290
|
+
requestBody?: never;
|
|
1291
|
+
responses: {
|
|
1292
|
+
/** @description A successful response with the details of the access key. */
|
|
1293
|
+
200: {
|
|
1294
|
+
headers: {
|
|
1295
|
+
[name: string]: unknown;
|
|
1296
|
+
};
|
|
1297
|
+
content: {
|
|
1298
|
+
"application/json": components["schemas"]["OdinAccessKey"];
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1301
|
+
/** @description The access key could not be found. */
|
|
1302
|
+
404: {
|
|
1303
|
+
headers: {
|
|
1304
|
+
[name: string]: unknown;
|
|
1305
|
+
};
|
|
1306
|
+
content?: never;
|
|
1307
|
+
};
|
|
1308
|
+
};
|
|
1309
|
+
};
|
|
1310
|
+
editAccessKey: {
|
|
1311
|
+
parameters: {
|
|
1312
|
+
query?: never;
|
|
1313
|
+
header?: never;
|
|
1314
|
+
path: {
|
|
1315
|
+
/** @description The unique identifier of the access key to retrieve. */
|
|
1316
|
+
accessKeyId: string;
|
|
1317
|
+
};
|
|
1318
|
+
cookie?: never;
|
|
1319
|
+
};
|
|
1320
|
+
requestBody: {
|
|
1321
|
+
content: {
|
|
1322
|
+
"application/json": components["schemas"]["EditAccessKeyPayload"];
|
|
1323
|
+
};
|
|
1324
|
+
};
|
|
1325
|
+
responses: {
|
|
1326
|
+
/** @description Successfully updated the access key. */
|
|
1327
|
+
200: {
|
|
1328
|
+
headers: {
|
|
1329
|
+
[name: string]: unknown;
|
|
1330
|
+
};
|
|
1331
|
+
content: {
|
|
1332
|
+
"application/json": components["schemas"]["SuccessResponse"];
|
|
1333
|
+
};
|
|
1334
|
+
};
|
|
1335
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1336
|
+
400: {
|
|
1337
|
+
headers: {
|
|
1338
|
+
[name: string]: unknown;
|
|
1339
|
+
};
|
|
1340
|
+
content?: never;
|
|
1341
|
+
};
|
|
1342
|
+
/** @description Forbidden, e.g., the user does not have permission to edit the specified access key. */
|
|
1343
|
+
403: {
|
|
1344
|
+
headers: {
|
|
1345
|
+
[name: string]: unknown;
|
|
1346
|
+
};
|
|
1347
|
+
content?: never;
|
|
1348
|
+
};
|
|
1349
|
+
/** @description The access key could not be found or does not exist. */
|
|
1350
|
+
404: {
|
|
1351
|
+
headers: {
|
|
1352
|
+
[name: string]: unknown;
|
|
1353
|
+
};
|
|
1354
|
+
content?: never;
|
|
1355
|
+
};
|
|
1356
|
+
};
|
|
1357
|
+
};
|
|
1358
|
+
deleteAccessKey: {
|
|
1359
|
+
parameters: {
|
|
1360
|
+
query?: never;
|
|
1361
|
+
header?: never;
|
|
1362
|
+
path: {
|
|
1363
|
+
/** @description The unique identifier of the access key to retrieve. */
|
|
1364
|
+
accessKeyId: string;
|
|
1365
|
+
};
|
|
1366
|
+
cookie?: never;
|
|
1367
|
+
};
|
|
1368
|
+
requestBody?: never;
|
|
1369
|
+
responses: {
|
|
1370
|
+
/** @description Successfully deleted the access key. */
|
|
1371
|
+
200: {
|
|
1372
|
+
headers: {
|
|
1373
|
+
[name: string]: unknown;
|
|
1374
|
+
};
|
|
1375
|
+
content: {
|
|
1376
|
+
"application/json": components["schemas"]["SuccessResponse"];
|
|
1377
|
+
};
|
|
1378
|
+
};
|
|
1379
|
+
/** @description Forbidden, e.g., the user does not have permission to delete the specified access key. */
|
|
1380
|
+
403: {
|
|
1381
|
+
headers: {
|
|
1382
|
+
[name: string]: unknown;
|
|
1383
|
+
};
|
|
1384
|
+
content?: never;
|
|
1385
|
+
};
|
|
1386
|
+
/** @description The access key could not be found or does not exist. */
|
|
1387
|
+
404: {
|
|
1388
|
+
headers: {
|
|
1389
|
+
[name: string]: unknown;
|
|
1390
|
+
};
|
|
1391
|
+
content?: never;
|
|
1392
|
+
};
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
createAccessKey: {
|
|
1396
|
+
parameters: {
|
|
1397
|
+
query?: never;
|
|
1398
|
+
header?: never;
|
|
1399
|
+
path?: never;
|
|
1400
|
+
cookie?: never;
|
|
1401
|
+
};
|
|
1402
|
+
requestBody: {
|
|
1403
|
+
content: {
|
|
1404
|
+
"application/json": components["schemas"]["CreateAccessKeyPayload"];
|
|
1405
|
+
};
|
|
1406
|
+
};
|
|
1407
|
+
responses: {
|
|
1408
|
+
/** @description Successfully created the access key. */
|
|
1409
|
+
201: {
|
|
1410
|
+
headers: {
|
|
1411
|
+
[name: string]: unknown;
|
|
1412
|
+
};
|
|
1413
|
+
content: {
|
|
1414
|
+
"application/json": components["schemas"]["OdinAccessKey"];
|
|
1415
|
+
};
|
|
1416
|
+
};
|
|
1417
|
+
/** @description Bad request, e.g., missing required fields or invalid data. */
|
|
1418
|
+
400: {
|
|
1419
|
+
headers: {
|
|
1420
|
+
[name: string]: unknown;
|
|
1421
|
+
};
|
|
1422
|
+
content?: never;
|
|
1423
|
+
};
|
|
1424
|
+
/** @description Forbidden, e.g., the user does not have permission to create an access key for the specified project. */
|
|
1425
|
+
403: {
|
|
1426
|
+
headers: {
|
|
1427
|
+
[name: string]: unknown;
|
|
1428
|
+
};
|
|
1429
|
+
content?: never;
|
|
1430
|
+
};
|
|
1431
|
+
};
|
|
1432
|
+
};
|
|
1433
|
+
getInvoices: {
|
|
1434
|
+
parameters: {
|
|
1435
|
+
query?: {
|
|
1436
|
+
/**
|
|
1437
|
+
* @description A comma-separated list of invoice IDs to filter the invoices by. Each ID should be URL-encoded to ensure proper parsing. For example, to filter by two IDs, `id1` and `id2`, the request URL should be structured as follows: `?filter:id=id1,id2`.
|
|
1438
|
+
* Note: The `filter:id` parameter expects the IDs to be in their encoded form if they include special characters.
|
|
1439
|
+
* @example MjY4R1pvTDdYM0pJZVdMQUszSHJWUT06,ei9HNTZVTFVKanBuMkxLSUhzdUJoUT06
|
|
1440
|
+
*/
|
|
1441
|
+
"filter:id"?: string;
|
|
1442
|
+
};
|
|
1443
|
+
header?: never;
|
|
1444
|
+
path?: never;
|
|
1445
|
+
cookie?: never;
|
|
1446
|
+
};
|
|
1447
|
+
requestBody?: never;
|
|
1448
|
+
responses: {
|
|
1449
|
+
/** @description An array of invoices. */
|
|
1450
|
+
200: {
|
|
1451
|
+
headers: {
|
|
1452
|
+
[name: string]: unknown;
|
|
1453
|
+
};
|
|
1454
|
+
content: {
|
|
1455
|
+
"application/json": components["schemas"]["Invoice"][];
|
|
1456
|
+
};
|
|
1457
|
+
};
|
|
1458
|
+
};
|
|
1459
|
+
};
|
|
1460
|
+
addProjectMember: {
|
|
1461
|
+
parameters: {
|
|
1462
|
+
query?: never;
|
|
1463
|
+
header?: never;
|
|
1464
|
+
path: {
|
|
1465
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1466
|
+
projectId: string;
|
|
1467
|
+
};
|
|
1468
|
+
cookie?: never;
|
|
1469
|
+
};
|
|
1470
|
+
requestBody: {
|
|
1471
|
+
content: {
|
|
1472
|
+
"application/json": components["schemas"]["AddUserToProjectPayload"];
|
|
1473
|
+
};
|
|
1474
|
+
};
|
|
1475
|
+
responses: {
|
|
1476
|
+
/** @description Successfully added the user to the project. */
|
|
1477
|
+
200: {
|
|
1478
|
+
headers: {
|
|
1479
|
+
[name: string]: unknown;
|
|
1480
|
+
};
|
|
1481
|
+
content: {
|
|
1482
|
+
"application/json": components["schemas"]["OdinUserRole"];
|
|
1483
|
+
};
|
|
1484
|
+
};
|
|
1485
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1486
|
+
400: {
|
|
1487
|
+
headers: {
|
|
1488
|
+
[name: string]: unknown;
|
|
1489
|
+
};
|
|
1490
|
+
content?: never;
|
|
1491
|
+
};
|
|
1492
|
+
/** @description Forbidden, e.g., the user does not have permission to add users to the specified project. */
|
|
1493
|
+
403: {
|
|
1494
|
+
headers: {
|
|
1495
|
+
[name: string]: unknown;
|
|
1496
|
+
};
|
|
1497
|
+
content?: never;
|
|
1498
|
+
};
|
|
1499
|
+
/** @description The project could not be found or does not exist. */
|
|
1500
|
+
404: {
|
|
1501
|
+
headers: {
|
|
1502
|
+
[name: string]: unknown;
|
|
1503
|
+
};
|
|
1504
|
+
content?: never;
|
|
1505
|
+
};
|
|
1506
|
+
};
|
|
1507
|
+
};
|
|
1508
|
+
deleteProjectMember: {
|
|
1509
|
+
parameters: {
|
|
1510
|
+
query?: never;
|
|
1511
|
+
header?: never;
|
|
1512
|
+
path: {
|
|
1513
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1514
|
+
projectId: string;
|
|
1515
|
+
};
|
|
1516
|
+
cookie?: never;
|
|
1517
|
+
};
|
|
1518
|
+
requestBody: {
|
|
1519
|
+
content: {
|
|
1520
|
+
"application/json": components["schemas"]["RevokeUserPayload"];
|
|
1521
|
+
};
|
|
1522
|
+
};
|
|
1523
|
+
responses: {
|
|
1524
|
+
/** @description Successfully added the user to the project. */
|
|
1525
|
+
200: {
|
|
1526
|
+
headers: {
|
|
1527
|
+
[name: string]: unknown;
|
|
1528
|
+
};
|
|
1529
|
+
content: {
|
|
1530
|
+
"application/json": components["schemas"]["SuccessResponse"];
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1534
|
+
400: {
|
|
1535
|
+
headers: {
|
|
1536
|
+
[name: string]: unknown;
|
|
1537
|
+
};
|
|
1538
|
+
content?: never;
|
|
1539
|
+
};
|
|
1540
|
+
/** @description Forbidden, e.g., the user does not have permission to add users to the specified project. */
|
|
1541
|
+
403: {
|
|
1542
|
+
headers: {
|
|
1543
|
+
[name: string]: unknown;
|
|
1544
|
+
};
|
|
1545
|
+
content?: never;
|
|
1546
|
+
};
|
|
1547
|
+
/** @description The project could not be found or does not exist. */
|
|
1548
|
+
404: {
|
|
1549
|
+
headers: {
|
|
1550
|
+
[name: string]: unknown;
|
|
1551
|
+
};
|
|
1552
|
+
content?: never;
|
|
1553
|
+
};
|
|
1554
|
+
};
|
|
1555
|
+
};
|
|
1556
|
+
changeMemberRole: {
|
|
1557
|
+
parameters: {
|
|
1558
|
+
query?: never;
|
|
1559
|
+
header?: never;
|
|
1560
|
+
path: {
|
|
1561
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1562
|
+
projectId: string;
|
|
1563
|
+
};
|
|
1564
|
+
cookie?: never;
|
|
1565
|
+
};
|
|
1566
|
+
requestBody: {
|
|
1567
|
+
content: {
|
|
1568
|
+
"application/json": components["schemas"]["ChangeUserRolePayload"];
|
|
1569
|
+
};
|
|
1570
|
+
};
|
|
1571
|
+
responses: {
|
|
1572
|
+
/** @description Successfully added the user to the project. */
|
|
1573
|
+
200: {
|
|
1574
|
+
headers: {
|
|
1575
|
+
[name: string]: unknown;
|
|
1576
|
+
};
|
|
1577
|
+
content: {
|
|
1578
|
+
"application/json": components["schemas"]["SuccessResponse"];
|
|
1579
|
+
};
|
|
1580
|
+
};
|
|
1581
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1582
|
+
400: {
|
|
1583
|
+
headers: {
|
|
1584
|
+
[name: string]: unknown;
|
|
1585
|
+
};
|
|
1586
|
+
content?: never;
|
|
1587
|
+
};
|
|
1588
|
+
/** @description Forbidden, e.g., the user does not have permission to add users to the specified project. */
|
|
1589
|
+
403: {
|
|
1590
|
+
headers: {
|
|
1591
|
+
[name: string]: unknown;
|
|
1592
|
+
};
|
|
1593
|
+
content?: never;
|
|
1594
|
+
};
|
|
1595
|
+
/** @description The project could not be found or does not exist. */
|
|
1596
|
+
404: {
|
|
1597
|
+
headers: {
|
|
1598
|
+
[name: string]: unknown;
|
|
1599
|
+
};
|
|
1600
|
+
content?: never;
|
|
1601
|
+
};
|
|
1602
|
+
};
|
|
1603
|
+
};
|
|
1604
|
+
setBillingAccount: {
|
|
1605
|
+
parameters: {
|
|
1606
|
+
query?: never;
|
|
1607
|
+
header?: never;
|
|
1608
|
+
path: {
|
|
1609
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1610
|
+
projectId: string;
|
|
1611
|
+
};
|
|
1612
|
+
cookie?: never;
|
|
1613
|
+
};
|
|
1614
|
+
requestBody: {
|
|
1615
|
+
content: {
|
|
1616
|
+
"application/json": components["schemas"]["SetBillingAccountPayload"];
|
|
1617
|
+
};
|
|
1618
|
+
};
|
|
1619
|
+
responses: {
|
|
1620
|
+
/** @description Successfully added the user to the project. */
|
|
1621
|
+
200: {
|
|
1622
|
+
headers: {
|
|
1623
|
+
[name: string]: unknown;
|
|
1624
|
+
};
|
|
1625
|
+
content: {
|
|
1626
|
+
"application/json": components["schemas"]["SuccessResponse"];
|
|
1627
|
+
};
|
|
1628
|
+
};
|
|
1629
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1630
|
+
400: {
|
|
1631
|
+
headers: {
|
|
1632
|
+
[name: string]: unknown;
|
|
1633
|
+
};
|
|
1634
|
+
content?: never;
|
|
1635
|
+
};
|
|
1636
|
+
/** @description Forbidden, e.g., the user does not have permission to add users to the specified project. */
|
|
1637
|
+
403: {
|
|
1638
|
+
headers: {
|
|
1639
|
+
[name: string]: unknown;
|
|
1640
|
+
};
|
|
1641
|
+
content?: never;
|
|
1642
|
+
};
|
|
1643
|
+
/** @description The project could not be found or does not exist. */
|
|
1644
|
+
404: {
|
|
1645
|
+
headers: {
|
|
1646
|
+
[name: string]: unknown;
|
|
1647
|
+
};
|
|
1648
|
+
content?: never;
|
|
1649
|
+
};
|
|
1650
|
+
};
|
|
1651
|
+
};
|
|
1652
|
+
getBillingOptions: {
|
|
1653
|
+
parameters: {
|
|
1654
|
+
query?: never;
|
|
1655
|
+
header?: never;
|
|
1656
|
+
path: {
|
|
1657
|
+
projectId: string;
|
|
1658
|
+
};
|
|
1659
|
+
cookie?: never;
|
|
1660
|
+
};
|
|
1661
|
+
requestBody?: never;
|
|
1662
|
+
responses: {
|
|
1663
|
+
/** @description Returns the billing options for a project. */
|
|
1664
|
+
200: {
|
|
1665
|
+
headers: {
|
|
1666
|
+
[name: string]: unknown;
|
|
1667
|
+
};
|
|
1668
|
+
content: {
|
|
1669
|
+
"application/json": components["schemas"]["BillingOptions"];
|
|
1670
|
+
};
|
|
1671
|
+
};
|
|
1672
|
+
};
|
|
1673
|
+
};
|
|
1674
|
+
cancelBilling: {
|
|
1675
|
+
parameters: {
|
|
1676
|
+
query?: never;
|
|
1677
|
+
header?: never;
|
|
1678
|
+
path: {
|
|
1679
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1680
|
+
projectId: string;
|
|
1681
|
+
};
|
|
1682
|
+
cookie?: never;
|
|
1683
|
+
};
|
|
1684
|
+
requestBody?: never;
|
|
1685
|
+
responses: {
|
|
1686
|
+
/** @description Successfully added the user to the project. */
|
|
1687
|
+
200: {
|
|
1688
|
+
headers: {
|
|
1689
|
+
[name: string]: unknown;
|
|
1690
|
+
};
|
|
1691
|
+
content: {
|
|
1692
|
+
"application/json": components["schemas"]["SuccessResponse"];
|
|
1693
|
+
};
|
|
1694
|
+
};
|
|
1695
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1696
|
+
400: {
|
|
1697
|
+
headers: {
|
|
1698
|
+
[name: string]: unknown;
|
|
1699
|
+
};
|
|
1700
|
+
content?: never;
|
|
1701
|
+
};
|
|
1702
|
+
/** @description Forbidden, e.g., the user does not have permission to add users to the specified project. */
|
|
1703
|
+
403: {
|
|
1704
|
+
headers: {
|
|
1705
|
+
[name: string]: unknown;
|
|
1706
|
+
};
|
|
1707
|
+
content?: never;
|
|
1708
|
+
};
|
|
1709
|
+
/** @description The project could not be found or does not exist. */
|
|
1710
|
+
404: {
|
|
1711
|
+
headers: {
|
|
1712
|
+
[name: string]: unknown;
|
|
1713
|
+
};
|
|
1714
|
+
content?: never;
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
};
|
|
1718
|
+
createAccessToken: {
|
|
1719
|
+
parameters: {
|
|
1720
|
+
query?: never;
|
|
1721
|
+
header?: never;
|
|
1722
|
+
path: {
|
|
1723
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1724
|
+
projectId: string;
|
|
1725
|
+
};
|
|
1726
|
+
cookie?: never;
|
|
1727
|
+
};
|
|
1728
|
+
requestBody: {
|
|
1729
|
+
content: {
|
|
1730
|
+
"application/json": components["schemas"]["CreateTokenPayload"];
|
|
1731
|
+
};
|
|
1732
|
+
};
|
|
1733
|
+
responses: {
|
|
1734
|
+
/** @description Successfully created the token */
|
|
1735
|
+
200: {
|
|
1736
|
+
headers: {
|
|
1737
|
+
[name: string]: unknown;
|
|
1738
|
+
};
|
|
1739
|
+
content: {
|
|
1740
|
+
"application/json": components["schemas"]["TokenPayload"];
|
|
1741
|
+
};
|
|
1742
|
+
};
|
|
1743
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1744
|
+
400: {
|
|
1745
|
+
headers: {
|
|
1746
|
+
[name: string]: unknown;
|
|
1747
|
+
};
|
|
1748
|
+
content?: never;
|
|
1749
|
+
};
|
|
1750
|
+
/** @description The project could not be found or does not exist. */
|
|
1751
|
+
404: {
|
|
1752
|
+
headers: {
|
|
1753
|
+
[name: string]: unknown;
|
|
1754
|
+
};
|
|
1755
|
+
content?: never;
|
|
1756
|
+
};
|
|
1757
|
+
};
|
|
1758
|
+
};
|
|
1759
|
+
revokeSecret: {
|
|
1760
|
+
parameters: {
|
|
1761
|
+
query?: never;
|
|
1762
|
+
header?: never;
|
|
1763
|
+
path: {
|
|
1764
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1765
|
+
projectId: string;
|
|
1766
|
+
};
|
|
1767
|
+
cookie?: never;
|
|
1768
|
+
};
|
|
1769
|
+
requestBody?: never;
|
|
1770
|
+
responses: {
|
|
1771
|
+
/** @description Returns the preview of the invoice for the given project for the current month. */
|
|
1772
|
+
200: {
|
|
1773
|
+
headers: {
|
|
1774
|
+
[name: string]: unknown;
|
|
1775
|
+
};
|
|
1776
|
+
content: {
|
|
1777
|
+
"application/json": components["schemas"]["PaymentProject"];
|
|
1778
|
+
};
|
|
1779
|
+
};
|
|
1780
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1781
|
+
400: {
|
|
1782
|
+
headers: {
|
|
1783
|
+
[name: string]: unknown;
|
|
1784
|
+
};
|
|
1785
|
+
content?: never;
|
|
1786
|
+
};
|
|
1787
|
+
/** @description Forbidden, e.g., the user does not have permission to add users to the specified project. */
|
|
1788
|
+
403: {
|
|
1789
|
+
headers: {
|
|
1790
|
+
[name: string]: unknown;
|
|
1791
|
+
};
|
|
1792
|
+
content?: never;
|
|
1793
|
+
};
|
|
1794
|
+
/** @description The project could not be found or does not exist. */
|
|
1795
|
+
404: {
|
|
1796
|
+
headers: {
|
|
1797
|
+
[name: string]: unknown;
|
|
1798
|
+
};
|
|
1799
|
+
content?: never;
|
|
1800
|
+
};
|
|
1801
|
+
};
|
|
1802
|
+
};
|
|
1803
|
+
getInvoicePreview: {
|
|
1804
|
+
parameters: {
|
|
1805
|
+
query?: never;
|
|
1806
|
+
header?: never;
|
|
1807
|
+
path: {
|
|
1808
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1809
|
+
projectId: string;
|
|
1810
|
+
};
|
|
1811
|
+
cookie?: never;
|
|
1812
|
+
};
|
|
1813
|
+
requestBody?: never;
|
|
1814
|
+
responses: {
|
|
1815
|
+
/** @description Returns the preview of the invoice for the given project for the current month. */
|
|
1816
|
+
200: {
|
|
1817
|
+
headers: {
|
|
1818
|
+
[name: string]: unknown;
|
|
1819
|
+
};
|
|
1820
|
+
content: {
|
|
1821
|
+
"application/json": components["schemas"]["Invoice"];
|
|
1822
|
+
};
|
|
1823
|
+
};
|
|
1824
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1825
|
+
400: {
|
|
1826
|
+
headers: {
|
|
1827
|
+
[name: string]: unknown;
|
|
1828
|
+
};
|
|
1829
|
+
content?: never;
|
|
1830
|
+
};
|
|
1831
|
+
/** @description Forbidden, e.g., the user does not have permission to add users to the specified project. */
|
|
1832
|
+
403: {
|
|
1833
|
+
headers: {
|
|
1834
|
+
[name: string]: unknown;
|
|
1835
|
+
};
|
|
1836
|
+
content?: never;
|
|
1837
|
+
};
|
|
1838
|
+
/** @description The project could not be found or does not exist. */
|
|
1839
|
+
404: {
|
|
1840
|
+
headers: {
|
|
1841
|
+
[name: string]: unknown;
|
|
1842
|
+
};
|
|
1843
|
+
content?: never;
|
|
1844
|
+
};
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1847
|
+
getResourcePackagePrice: {
|
|
1848
|
+
parameters: {
|
|
1849
|
+
query?: never;
|
|
1850
|
+
header?: never;
|
|
1851
|
+
path: {
|
|
1852
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1853
|
+
projectId: string;
|
|
1854
|
+
};
|
|
1855
|
+
cookie?: never;
|
|
1856
|
+
};
|
|
1857
|
+
requestBody: {
|
|
1858
|
+
content: {
|
|
1859
|
+
"application/json": components["schemas"]["ResourcePackagePricePayload"];
|
|
1860
|
+
};
|
|
1861
|
+
};
|
|
1862
|
+
responses: {
|
|
1863
|
+
/** @description Returns the preview of the invoice for the given project for the current month. */
|
|
1864
|
+
200: {
|
|
1865
|
+
headers: {
|
|
1866
|
+
[name: string]: unknown;
|
|
1867
|
+
};
|
|
1868
|
+
content: {
|
|
1869
|
+
"application/json": components["schemas"]["ResourcePackagePrice"];
|
|
1870
|
+
};
|
|
1871
|
+
};
|
|
1872
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1873
|
+
400: {
|
|
1874
|
+
headers: {
|
|
1875
|
+
[name: string]: unknown;
|
|
1876
|
+
};
|
|
1877
|
+
content?: never;
|
|
1878
|
+
};
|
|
1879
|
+
/** @description Forbidden, e.g., the user does not have permission to add users to the specified project. */
|
|
1880
|
+
403: {
|
|
1881
|
+
headers: {
|
|
1882
|
+
[name: string]: unknown;
|
|
1883
|
+
};
|
|
1884
|
+
content?: never;
|
|
1885
|
+
};
|
|
1886
|
+
/** @description The project could not be found or does not exist. */
|
|
1887
|
+
404: {
|
|
1888
|
+
headers: {
|
|
1889
|
+
[name: string]: unknown;
|
|
1890
|
+
};
|
|
1891
|
+
content?: never;
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
};
|
|
1895
|
+
getResourcePackagePrices: {
|
|
1896
|
+
parameters: {
|
|
1897
|
+
query?: never;
|
|
1898
|
+
header?: never;
|
|
1899
|
+
path: {
|
|
1900
|
+
/** @description The unique identifier of the project to which the user will be added. */
|
|
1901
|
+
projectId: string;
|
|
1902
|
+
};
|
|
1903
|
+
cookie?: never;
|
|
1904
|
+
};
|
|
1905
|
+
requestBody: {
|
|
1906
|
+
content: {
|
|
1907
|
+
"application/json": components["schemas"]["ResourcePackagePricesPayload"];
|
|
1908
|
+
};
|
|
1909
|
+
};
|
|
1910
|
+
responses: {
|
|
1911
|
+
/** @description Returns a list of prices matching the resource packages specified in the request. */
|
|
1912
|
+
200: {
|
|
1913
|
+
headers: {
|
|
1914
|
+
[name: string]: unknown;
|
|
1915
|
+
};
|
|
1916
|
+
content: {
|
|
1917
|
+
"application/json": components["schemas"]["ResourcePackagePrice"][];
|
|
1918
|
+
};
|
|
1919
|
+
};
|
|
1920
|
+
/** @description Bad request, e.g., invalid input data. */
|
|
1921
|
+
400: {
|
|
1922
|
+
headers: {
|
|
1923
|
+
[name: string]: unknown;
|
|
1924
|
+
};
|
|
1925
|
+
content?: never;
|
|
1926
|
+
};
|
|
1927
|
+
/** @description Forbidden, e.g., the user does not have permission to add users to the specified project. */
|
|
1928
|
+
403: {
|
|
1929
|
+
headers: {
|
|
1930
|
+
[name: string]: unknown;
|
|
1931
|
+
};
|
|
1932
|
+
content?: never;
|
|
1933
|
+
};
|
|
1934
|
+
/** @description The project could not be found or does not exist. */
|
|
1935
|
+
404: {
|
|
1936
|
+
headers: {
|
|
1937
|
+
[name: string]: unknown;
|
|
1938
|
+
};
|
|
1939
|
+
content?: never;
|
|
1940
|
+
};
|
|
1941
|
+
};
|
|
1942
|
+
};
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
/**
|
|
1946
|
+
* 4Players Payment API Client
|
|
1947
|
+
*
|
|
1948
|
+
* A type-safe client for the 4Players Payment API.
|
|
1949
|
+
* Works in browsers, Node.js, Deno, Bun, and edge runtimes.
|
|
1950
|
+
*
|
|
1951
|
+
* @example
|
|
1952
|
+
* ```typescript
|
|
1953
|
+
* import { PaymentClient } from '@4players/payment';
|
|
1954
|
+
*
|
|
1955
|
+
* const client = new PaymentClient({ sessionId: 'your-session-id' });
|
|
1956
|
+
*
|
|
1957
|
+
* const projects = await client.getPaymentProjects();
|
|
1958
|
+
* ```
|
|
1959
|
+
*/
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* Configuration options for the Payment client.
|
|
1963
|
+
*/
|
|
1964
|
+
interface PaymentClientConfig {
|
|
1965
|
+
/** Fusion session ID for authentication (sent as fusion-sid header) */
|
|
1966
|
+
sessionId: string;
|
|
1967
|
+
/** Base URL for the Payment API (default: https://secure.4players.de/public/api/v1) */
|
|
1968
|
+
baseUrl?: string;
|
|
1969
|
+
/** Custom fetch implementation (useful for testing or special environments) */
|
|
1970
|
+
fetch?: typeof fetch;
|
|
1971
|
+
}
|
|
1972
|
+
type PaymentProject = components["schemas"]["PaymentProject"];
|
|
1973
|
+
type BillingAccount = components["schemas"]["BillingAccount"];
|
|
1974
|
+
type OdinAccessKey = components["schemas"]["OdinAccessKey"];
|
|
1975
|
+
type OdinUserPermissions = components["schemas"]["OdinUserPermissions"];
|
|
1976
|
+
type OdinUserRole = components["schemas"]["OdinUserRole"];
|
|
1977
|
+
type OdinPeersOverTime = components["schemas"]["OdinPeersOverTime"];
|
|
1978
|
+
type Subscription = components["schemas"]["Subscription"];
|
|
1979
|
+
type Invoice = components["schemas"]["Invoice"];
|
|
1980
|
+
type InvoicePosition = components["schemas"]["InvoicePosition"];
|
|
1981
|
+
type Invoices = components["schemas"]["Invoices"];
|
|
1982
|
+
type SubscriptionPosition = components["schemas"]["SubscriptionPosition"];
|
|
1983
|
+
type TariffParams = components["schemas"]["TariffParams"];
|
|
1984
|
+
type SetupSession = components["schemas"]["SetupSession"];
|
|
1985
|
+
type PortalSession = components["schemas"]["PortalSession"];
|
|
1986
|
+
type TokenPayload = components["schemas"]["TokenPayload"];
|
|
1987
|
+
type BillingOptions = components["schemas"]["BillingOptions"];
|
|
1988
|
+
type BillingChangeOptions = components["schemas"]["BillingChangeOptions"];
|
|
1989
|
+
type BillingStateHistory = components["schemas"]["BillingStateHistory"];
|
|
1990
|
+
type ResourcePackagePrice = components["schemas"]["ResourcePackagePrice"];
|
|
1991
|
+
type SuccessResponse = components["schemas"]["SuccessResponse"];
|
|
1992
|
+
type BillingState = components["schemas"]["BillingState"];
|
|
1993
|
+
type PermissionRole = components["schemas"]["PermissionRole"];
|
|
1994
|
+
type UserStatus = components["schemas"]["UserStatus"];
|
|
1995
|
+
type InvoiceStatus = components["schemas"]["InvoiceStatus"];
|
|
1996
|
+
type AddUserToProjectPayload = components["schemas"]["AddUserToProjectPayload"];
|
|
1997
|
+
type ChangeUserRolePayload = components["schemas"]["ChangeUserRolePayload"];
|
|
1998
|
+
type CreateAccessKeyPayload = components["schemas"]["CreateAccessKeyPayload"];
|
|
1999
|
+
type CreateBillingPortalSessionPayload = components["schemas"]["CreateBillingPortalSessionPayload"];
|
|
2000
|
+
type CreateSetupSessionPayload = components["schemas"]["CreateSetupSessionPayload"];
|
|
2001
|
+
type CreateTokenPayload = components["schemas"]["CreateTokenPayload"];
|
|
2002
|
+
type EditAccessKeyPayload = components["schemas"]["EditAccessKeyPayload"];
|
|
2003
|
+
type EditProjectPayload = components["schemas"]["EditProjectPayload"];
|
|
2004
|
+
type ResourcePackagePricePayload = components["schemas"]["ResourcePackagePricePayload"];
|
|
2005
|
+
type ResourcePackagePricesPayload = components["schemas"]["ResourcePackagePricesPayload"];
|
|
2006
|
+
type RevokeUserPayload = components["schemas"]["RevokeUserPayload"];
|
|
2007
|
+
type SetBillingAccountPayload = components["schemas"]["SetBillingAccountPayload"];
|
|
2008
|
+
type GetPeersOverTimeQuery = operations["getPeersOverTime"]["parameters"]["query"];
|
|
2009
|
+
type GetInvoicesQuery = operations["getInvoices"]["parameters"]["query"];
|
|
2010
|
+
type GetPaymentProjectsResponse = operations["getPaymentProjects"]["responses"]["200"]["content"]["application/json"];
|
|
2011
|
+
type GetPaymentProjectForAppResponse = operations["getPaymentProjectForApp"]["responses"]["200"]["content"]["application/json"];
|
|
2012
|
+
type GetPeersOverTimeResponse = operations["getPeersOverTime"]["responses"]["200"]["content"]["application/json"];
|
|
2013
|
+
type GetBillingAccountsResponse = operations["getBillingAccounts"]["responses"]["200"]["content"]["application/json"];
|
|
2014
|
+
type GetBillingAccountResponse = operations["getBillingAccount"]["responses"]["200"]["content"]["application/json"];
|
|
2015
|
+
type GetBillingAccountInvoicesResponse = operations["getBillingAccountInvoices"]["responses"]["200"]["content"]["application/json"];
|
|
2016
|
+
type GetProjectResponse = operations["getProject"]["responses"]["200"]["content"]["application/json"];
|
|
2017
|
+
type GetAccessKeyResponse = operations["getAccessKey"]["responses"]["200"]["content"]["application/json"];
|
|
2018
|
+
type GetInvoicesResponse = operations["getInvoices"]["responses"]["200"]["content"]["application/json"];
|
|
2019
|
+
type GetBillingOptionsResponse = operations["getBillingOptions"]["responses"]["200"]["content"]["application/json"];
|
|
2020
|
+
type GetInvoicePreviewResponse = operations["getInvoicePreview"]["responses"]["200"]["content"]["application/json"];
|
|
2021
|
+
type CreateAccessKeyResponse = operations["createAccessKey"]["responses"]["201"]["content"]["application/json"];
|
|
2022
|
+
type CreateSetupSessionResponse = operations["createSetupSession"]["responses"]["200"]["content"]["application/json"];
|
|
2023
|
+
type CreateBillingPortalSessionResponse = operations["createBillingPortalSession"]["responses"]["200"]["content"]["application/json"];
|
|
2024
|
+
type CreateAccessTokenResponse = operations["createAccessToken"]["responses"]["200"]["content"]["application/json"];
|
|
2025
|
+
/**
|
|
2026
|
+
* 4Players Payment API Client
|
|
2027
|
+
*
|
|
2028
|
+
* Provides a type-safe interface to the 4Players Payment REST API for managing
|
|
2029
|
+
* projects, billing, invoices, access keys, and user permissions.
|
|
2030
|
+
*/
|
|
2031
|
+
declare class PaymentClient {
|
|
2032
|
+
private client;
|
|
2033
|
+
/**
|
|
2034
|
+
* Create a new Payment client instance.
|
|
2035
|
+
*
|
|
2036
|
+
* @param config - Client configuration
|
|
2037
|
+
* @throws {PaymentAuthError} If no session ID is provided
|
|
2038
|
+
*
|
|
2039
|
+
* @example
|
|
2040
|
+
* ```typescript
|
|
2041
|
+
* const client = new PaymentClient({
|
|
2042
|
+
* sessionId: 'your-fusion-sid'
|
|
2043
|
+
* });
|
|
2044
|
+
* ```
|
|
2045
|
+
*/
|
|
2046
|
+
constructor(config: PaymentClientConfig);
|
|
2047
|
+
/**
|
|
2048
|
+
* Creates middleware that unwraps the Payment API response envelope.
|
|
2049
|
+
*
|
|
2050
|
+
* The Payment API wraps ALL responses in `{ data, error }`.
|
|
2051
|
+
* This middleware:
|
|
2052
|
+
* 1. Checks `error.code` — if non-zero, throws `PaymentApiError`
|
|
2053
|
+
* 2. Checks `data` — if null, throws `PaymentApiError` (legacy error pattern)
|
|
2054
|
+
* 3. Returns a new Response containing only the unwrapped `data`
|
|
2055
|
+
*/
|
|
2056
|
+
private createEnvelopeMiddleware;
|
|
2057
|
+
private handleError;
|
|
2058
|
+
/**
|
|
2059
|
+
* Get all projects the user has access to.
|
|
2060
|
+
*
|
|
2061
|
+
* @returns Array of payment projects
|
|
2062
|
+
*/
|
|
2063
|
+
getPaymentProjects(): Promise<GetPaymentProjectsResponse>;
|
|
2064
|
+
/**
|
|
2065
|
+
* Get the details of a specific app including the payment project.
|
|
2066
|
+
*
|
|
2067
|
+
* @param appId - The ID of the app to retrieve
|
|
2068
|
+
* @returns Payment project details
|
|
2069
|
+
*/
|
|
2070
|
+
getPaymentProjectForApp(appId: string): Promise<GetPaymentProjectForAppResponse>;
|
|
2071
|
+
/**
|
|
2072
|
+
* Get a specific project by ID.
|
|
2073
|
+
*
|
|
2074
|
+
* @param projectId - The unique identifier of the project
|
|
2075
|
+
* @returns Project details
|
|
2076
|
+
*/
|
|
2077
|
+
getProject(projectId: string): Promise<GetProjectResponse>;
|
|
2078
|
+
/**
|
|
2079
|
+
* Update a project's name, description, or peer limit.
|
|
2080
|
+
*
|
|
2081
|
+
* @param projectId - The unique identifier of the project
|
|
2082
|
+
* @param body - Updated project fields
|
|
2083
|
+
* @returns Success response
|
|
2084
|
+
*/
|
|
2085
|
+
editProject(projectId: string, body: EditProjectPayload): Promise<SuccessResponse>;
|
|
2086
|
+
/**
|
|
2087
|
+
* Get peak peers over time for a project.
|
|
2088
|
+
*
|
|
2089
|
+
* @param projectId - The unique identifier of the project
|
|
2090
|
+
* @param query - Query parameters (start timestamp is required)
|
|
2091
|
+
* @returns Peers over time data
|
|
2092
|
+
*/
|
|
2093
|
+
getPeersOverTime(projectId: string, query: GetPeersOverTimeQuery): Promise<GetPeersOverTimeResponse>;
|
|
2094
|
+
/**
|
|
2095
|
+
* Get all billing accounts for the current user.
|
|
2096
|
+
*
|
|
2097
|
+
* @returns Array of billing accounts
|
|
2098
|
+
*/
|
|
2099
|
+
getBillingAccounts(): Promise<GetBillingAccountsResponse>;
|
|
2100
|
+
/**
|
|
2101
|
+
* Get a specific billing account.
|
|
2102
|
+
*
|
|
2103
|
+
* @param billingAccountId - The unique identifier of the billing account
|
|
2104
|
+
* @returns Billing account details
|
|
2105
|
+
*/
|
|
2106
|
+
getBillingAccount(billingAccountId: string): Promise<GetBillingAccountResponse>;
|
|
2107
|
+
/**
|
|
2108
|
+
* Get invoices for a specific billing account.
|
|
2109
|
+
*
|
|
2110
|
+
* @param billingAccountId - The unique identifier of the billing account
|
|
2111
|
+
* @returns Array of invoices
|
|
2112
|
+
*/
|
|
2113
|
+
getBillingAccountInvoices(billingAccountId: string): Promise<GetBillingAccountInvoicesResponse>;
|
|
2114
|
+
/**
|
|
2115
|
+
* Create a Stripe setup session for a new billing account.
|
|
2116
|
+
*
|
|
2117
|
+
* @param body - Setup session creation payload
|
|
2118
|
+
* @returns Setup session with redirect URL
|
|
2119
|
+
*/
|
|
2120
|
+
createSetupSession(body: CreateSetupSessionPayload): Promise<CreateSetupSessionResponse>;
|
|
2121
|
+
/**
|
|
2122
|
+
* Create a Stripe billing portal session.
|
|
2123
|
+
*
|
|
2124
|
+
* @param billingAccountId - The unique identifier of the billing account
|
|
2125
|
+
* @param body - Portal session creation payload
|
|
2126
|
+
* @returns Portal session with redirect URL
|
|
2127
|
+
*/
|
|
2128
|
+
createBillingPortalSession(billingAccountId: string, body: CreateBillingPortalSessionPayload): Promise<CreateBillingPortalSessionResponse>;
|
|
2129
|
+
/**
|
|
2130
|
+
* Get billing options for a project.
|
|
2131
|
+
*
|
|
2132
|
+
* @param projectId - The unique identifier of the project
|
|
2133
|
+
* @returns Billing options including current state and change options
|
|
2134
|
+
*/
|
|
2135
|
+
getBillingOptions(projectId: string): Promise<GetBillingOptionsResponse>;
|
|
2136
|
+
/**
|
|
2137
|
+
* Set a billing account on a project.
|
|
2138
|
+
*
|
|
2139
|
+
* @param projectId - The unique identifier of the project
|
|
2140
|
+
* @param body - Billing account and state to set
|
|
2141
|
+
* @returns Success response
|
|
2142
|
+
*/
|
|
2143
|
+
setBillingAccount(projectId: string, body: SetBillingAccountPayload): Promise<SuccessResponse>;
|
|
2144
|
+
/**
|
|
2145
|
+
* Cancel billing for a project.
|
|
2146
|
+
*
|
|
2147
|
+
* @param projectId - The unique identifier of the project
|
|
2148
|
+
* @returns Success response
|
|
2149
|
+
*/
|
|
2150
|
+
cancelBilling(projectId: string): Promise<SuccessResponse>;
|
|
2151
|
+
/**
|
|
2152
|
+
* Get all invoices for the current user, optionally filtered by ID.
|
|
2153
|
+
*
|
|
2154
|
+
* @param query - Optional query parameters for filtering by invoice IDs
|
|
2155
|
+
* @returns Array of invoices
|
|
2156
|
+
*/
|
|
2157
|
+
getInvoices(query?: GetInvoicesQuery): Promise<GetInvoicesResponse>;
|
|
2158
|
+
/**
|
|
2159
|
+
* Get a preview of the current month's invoice for a project.
|
|
2160
|
+
*
|
|
2161
|
+
* @param projectId - The unique identifier of the project
|
|
2162
|
+
* @returns Invoice preview
|
|
2163
|
+
*/
|
|
2164
|
+
getInvoicePreview(projectId: string): Promise<GetInvoicePreviewResponse>;
|
|
2165
|
+
/**
|
|
2166
|
+
* Get a specific access key.
|
|
2167
|
+
*
|
|
2168
|
+
* @param accessKeyId - The unique identifier of the access key
|
|
2169
|
+
* @returns Access key details
|
|
2170
|
+
*/
|
|
2171
|
+
getAccessKey(accessKeyId: string): Promise<GetAccessKeyResponse>;
|
|
2172
|
+
/**
|
|
2173
|
+
* Create a new access key for a project.
|
|
2174
|
+
*
|
|
2175
|
+
* @param body - Access key creation payload
|
|
2176
|
+
* @returns Created access key (includes the key value only in this response)
|
|
2177
|
+
*/
|
|
2178
|
+
createAccessKey(body: CreateAccessKeyPayload): Promise<CreateAccessKeyResponse>;
|
|
2179
|
+
/**
|
|
2180
|
+
* Update an existing access key's name or description.
|
|
2181
|
+
*
|
|
2182
|
+
* @param accessKeyId - The unique identifier of the access key
|
|
2183
|
+
* @param body - Updated access key fields
|
|
2184
|
+
* @returns Success response
|
|
2185
|
+
*/
|
|
2186
|
+
editAccessKey(accessKeyId: string, body: EditAccessKeyPayload): Promise<SuccessResponse>;
|
|
2187
|
+
/**
|
|
2188
|
+
* Delete an access key. This operation is irreversible.
|
|
2189
|
+
*
|
|
2190
|
+
* @param accessKeyId - The unique identifier of the access key
|
|
2191
|
+
* @returns Success response
|
|
2192
|
+
*/
|
|
2193
|
+
deleteAccessKey(accessKeyId: string): Promise<SuccessResponse>;
|
|
2194
|
+
/**
|
|
2195
|
+
* Add a user to a project with a specified role.
|
|
2196
|
+
*
|
|
2197
|
+
* @param projectId - The unique identifier of the project
|
|
2198
|
+
* @param body - User email and role
|
|
2199
|
+
* @returns The created user role
|
|
2200
|
+
*/
|
|
2201
|
+
addProjectMember(projectId: string, body: AddUserToProjectPayload): Promise<OdinUserRole>;
|
|
2202
|
+
/**
|
|
2203
|
+
* Revoke a user's permission from a project.
|
|
2204
|
+
*
|
|
2205
|
+
* @param projectId - The unique identifier of the project
|
|
2206
|
+
* @param body - The permission ID to revoke
|
|
2207
|
+
* @returns Success response
|
|
2208
|
+
*/
|
|
2209
|
+
deleteProjectMember(projectId: string, body: RevokeUserPayload): Promise<SuccessResponse>;
|
|
2210
|
+
/**
|
|
2211
|
+
* Change a project member's role.
|
|
2212
|
+
*
|
|
2213
|
+
* @param projectId - The unique identifier of the project
|
|
2214
|
+
* @param body - The permission ID and new role
|
|
2215
|
+
* @returns Success response
|
|
2216
|
+
*/
|
|
2217
|
+
changeMemberRole(projectId: string, body: ChangeUserRolePayload): Promise<SuccessResponse>;
|
|
2218
|
+
/**
|
|
2219
|
+
* Create an ODIN access token for a project.
|
|
2220
|
+
*
|
|
2221
|
+
* @param projectId - The unique identifier of the project
|
|
2222
|
+
* @param body - Token creation payload
|
|
2223
|
+
* @returns The created token
|
|
2224
|
+
*/
|
|
2225
|
+
createAccessToken(projectId: string, body: CreateTokenPayload): Promise<CreateAccessTokenResponse>;
|
|
2226
|
+
/**
|
|
2227
|
+
* Revoke the secret for a project.
|
|
2228
|
+
*
|
|
2229
|
+
* @param projectId - The unique identifier of the project
|
|
2230
|
+
* @returns Updated project with new secret
|
|
2231
|
+
*/
|
|
2232
|
+
revokeSecret(projectId: string): Promise<PaymentProject>;
|
|
2233
|
+
/**
|
|
2234
|
+
* Get the price for a single resource package in a specific region.
|
|
2235
|
+
*
|
|
2236
|
+
* @param projectId - The unique identifier of the project
|
|
2237
|
+
* @param body - Resource package, region, and quantity
|
|
2238
|
+
* @returns Price information
|
|
2239
|
+
*/
|
|
2240
|
+
getResourcePackagePrice(projectId: string, body: ResourcePackagePricePayload): Promise<ResourcePackagePrice>;
|
|
2241
|
+
/**
|
|
2242
|
+
* Get prices for multiple resource packages in a specific region.
|
|
2243
|
+
*
|
|
2244
|
+
* @param projectId - The unique identifier of the project
|
|
2245
|
+
* @param body - Resource package IDs, region, and quantity
|
|
2246
|
+
* @returns Array of price information
|
|
2247
|
+
*/
|
|
2248
|
+
getResourcePackagePrices(projectId: string, body: ResourcePackagePricesPayload): Promise<ResourcePackagePrice[]>;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
/**
|
|
2252
|
+
* Payment SDK Error Classes
|
|
2253
|
+
*
|
|
2254
|
+
* Provides structured error handling for Payment API operations.
|
|
2255
|
+
*/
|
|
2256
|
+
declare const Error: ErrorConstructor & {
|
|
2257
|
+
captureStackTrace?(targetObject: object, constructorOpt?: Function): void;
|
|
2258
|
+
};
|
|
2259
|
+
/**
|
|
2260
|
+
* Base error class for all Payment SDK errors.
|
|
2261
|
+
*/
|
|
2262
|
+
declare class PaymentError extends Error {
|
|
2263
|
+
readonly statusCode?: number | undefined;
|
|
2264
|
+
readonly details?: unknown | undefined;
|
|
2265
|
+
constructor(message: string, statusCode?: number | undefined, details?: unknown | undefined);
|
|
2266
|
+
}
|
|
2267
|
+
/**
|
|
2268
|
+
* Error thrown when the Payment API returns an application-level error
|
|
2269
|
+
* in its response envelope.
|
|
2270
|
+
*
|
|
2271
|
+
* The Payment API wraps all responses in an envelope:
|
|
2272
|
+
* ```json
|
|
2273
|
+
* { "data": T | null, "error": { "code": number, "message": string } }
|
|
2274
|
+
* ```
|
|
2275
|
+
*
|
|
2276
|
+
* A `PaymentApiError` is thrown when:
|
|
2277
|
+
* - `error.code !== 0` (application-level error, even if HTTP status is 200)
|
|
2278
|
+
* - `data` is `null` (legacy error pattern from before HTTP status codes were used)
|
|
2279
|
+
*/
|
|
2280
|
+
declare class PaymentApiError extends PaymentError {
|
|
2281
|
+
/**
|
|
2282
|
+
* Application-level error code from the response envelope.
|
|
2283
|
+
* A value of `0` means no specific error code was returned (legacy null-data case).
|
|
2284
|
+
*/
|
|
2285
|
+
readonly code: number;
|
|
2286
|
+
/**
|
|
2287
|
+
* The HTTP status code of the response.
|
|
2288
|
+
* Note: This may be `200` even when there is an application error.
|
|
2289
|
+
*/
|
|
2290
|
+
readonly httpStatus: number;
|
|
2291
|
+
constructor(message: string, code: number, httpStatus: number);
|
|
2292
|
+
}
|
|
2293
|
+
/**
|
|
2294
|
+
* Error thrown when authentication fails or is required.
|
|
2295
|
+
*/
|
|
2296
|
+
declare class PaymentAuthError extends PaymentError {
|
|
2297
|
+
constructor(message?: string);
|
|
2298
|
+
}
|
|
2299
|
+
/**
|
|
2300
|
+
* Error thrown when a requested resource is not found.
|
|
2301
|
+
*/
|
|
2302
|
+
declare class PaymentNotFoundError extends PaymentError {
|
|
2303
|
+
constructor(resource: string, id: string);
|
|
2304
|
+
}
|
|
2305
|
+
/**
|
|
2306
|
+
* Error thrown when request validation fails.
|
|
2307
|
+
*/
|
|
2308
|
+
declare class PaymentValidationError extends PaymentError {
|
|
2309
|
+
constructor(message: string, details?: unknown);
|
|
2310
|
+
}
|
|
2311
|
+
/**
|
|
2312
|
+
* Error thrown when the API rate limit is exceeded.
|
|
2313
|
+
*/
|
|
2314
|
+
declare class PaymentRateLimitError extends PaymentError {
|
|
2315
|
+
constructor(retryAfter?: number);
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
export { type AddUserToProjectPayload, type BillingAccount, type BillingChangeOptions, type BillingOptions, type BillingState, type BillingStateHistory, type ChangeUserRolePayload, type CreateAccessKeyPayload, type CreateAccessKeyResponse, type CreateAccessTokenResponse, type CreateBillingPortalSessionPayload, type CreateBillingPortalSessionResponse, type CreateSetupSessionPayload, type CreateSetupSessionResponse, type CreateTokenPayload, type EditAccessKeyPayload, type EditProjectPayload, type GetAccessKeyResponse, type GetBillingAccountInvoicesResponse, type GetBillingAccountResponse, type GetBillingAccountsResponse, type GetBillingOptionsResponse, type GetInvoicePreviewResponse, type GetInvoicesQuery, type GetInvoicesResponse, type GetPaymentProjectForAppResponse, type GetPaymentProjectsResponse, type GetPeersOverTimeQuery, type GetPeersOverTimeResponse, type GetProjectResponse, type Invoice, type InvoicePosition, type InvoiceStatus, type Invoices, type OdinAccessKey, type OdinPeersOverTime, type OdinUserPermissions, type OdinUserRole, PaymentApiError, PaymentAuthError, PaymentClient, type PaymentClientConfig, PaymentError, PaymentNotFoundError, type PaymentProject, PaymentRateLimitError, PaymentValidationError, type PermissionRole, type PortalSession, type ResourcePackagePrice, type ResourcePackagePricePayload, type ResourcePackagePricesPayload, type RevokeUserPayload, type SetBillingAccountPayload, type SetupSession, type Subscription, type SubscriptionPosition, type SuccessResponse, type TariffParams, type TokenPayload, type UserStatus, type components, PaymentClient as default, type operations, type paths };
|