@zennify/sdk-js 1.47.0 → 2.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/.github/workflows/npm-publish-package-ofc.yml +4 -7
- package/dist/lib/api/client/client.gen.js +221 -0
- package/dist/lib/api/client/index.js +17 -0
- package/dist/{interfaces/Products.js → lib/api/client/types.gen.js} +1 -0
- package/dist/lib/api/client/utils.gen.js +242 -0
- package/dist/lib/api/client.gen.js +6 -0
- package/dist/lib/api/core/auth.gen.js +18 -0
- package/dist/lib/api/core/bodySerializer.gen.js +60 -0
- package/dist/lib/api/core/params.gen.js +107 -0
- package/dist/lib/api/core/pathSerializer.gen.js +123 -0
- package/dist/lib/api/core/queryKeySerializer.gen.js +105 -0
- package/dist/lib/api/core/serverSentEvents.gen.js +139 -0
- package/dist/{errors.js → lib/api/core/types.gen.js} +1 -0
- package/dist/lib/api/core/utils.gen.js +93 -0
- package/dist/lib/api/index.js +61 -0
- package/dist/lib/api/sdk.gen.js +610 -0
- package/dist/{interfaces/Media.js → lib/api/types.gen.js} +1 -0
- package/dist/main.js +1 -10
- package/package.json +1 -1
- package/src/lib/api/client/client.gen.ts +303 -0
- package/src/lib/api/client/index.ts +25 -0
- package/src/lib/api/client/types.gen.ts +247 -0
- package/src/lib/api/client/utils.gen.ts +337 -0
- package/src/lib/api/client.gen.ts +25 -0
- package/src/lib/api/core/auth.gen.ts +42 -0
- package/src/lib/api/core/bodySerializer.gen.ts +96 -0
- package/src/lib/api/core/params.gen.ts +181 -0
- package/src/lib/api/core/pathSerializer.gen.ts +180 -0
- package/src/lib/api/core/queryKeySerializer.gen.ts +136 -0
- package/src/lib/api/core/serverSentEvents.gen.ts +265 -0
- package/src/lib/api/core/types.gen.ts +118 -0
- package/src/lib/api/core/utils.gen.ts +143 -0
- package/src/lib/api/index.ts +325 -0
- package/src/lib/api/sdk.gen.ts +1188 -0
- package/src/lib/api/types.gen.ts +3328 -0
- package/src/main.ts +42 -13
- package/types/lib/api/client/client.gen.d.ts +2 -0
- package/types/lib/api/client/index.d.ts +8 -0
- package/types/lib/api/client/types.gen.d.ts +120 -0
- package/types/lib/api/client/utils.gen.d.ts +37 -0
- package/types/lib/api/client.gen.d.ts +12 -0
- package/types/lib/api/core/auth.gen.d.ts +18 -0
- package/types/lib/api/core/bodySerializer.gen.d.ts +25 -0
- package/types/lib/api/core/params.gen.d.ts +43 -0
- package/types/lib/api/core/pathSerializer.gen.d.ts +33 -0
- package/types/lib/api/core/queryKeySerializer.gen.d.ts +18 -0
- package/types/lib/api/core/serverSentEvents.gen.d.ts +71 -0
- package/types/lib/api/core/types.gen.d.ts +78 -0
- package/types/lib/api/core/utils.gen.d.ts +19 -0
- package/types/lib/api/index.d.ts +2 -0
- package/types/lib/api/sdk.gen.d.ts +235 -0
- package/types/lib/api/types.gen.d.ts +2910 -0
- package/types/main.d.ts +19 -12
- package/dist/RequestError.js +0 -55
- package/dist/interfaces/Panels.js +0 -2
- package/dist/interfaces/Statistics.js +0 -2
- package/dist/interfaces/Stores.js +0 -2
- package/dist/interfaces/Transactions.js +0 -2
- package/dist/utils.js +0 -13
- package/dist/var.js +0 -8
- package/src/RequestError.ts +0 -66
- package/src/errors.ts +0 -224
- package/src/interfaces/Media.ts +0 -5
- package/src/interfaces/Panels.ts +0 -18
- package/src/interfaces/Products.ts +0 -29
- package/src/interfaces/Statistics.ts +0 -21
- package/src/interfaces/Stores.ts +0 -58
- package/src/interfaces/Transactions.ts +0 -80
- package/src/utils.ts +0 -19
- package/src/var.ts +0 -5
- package/types/RequestError.d.ts +0 -11
- package/types/errors.d.ts +0 -214
- package/types/interfaces/Media.d.ts +0 -5
- package/types/interfaces/Panels.d.ts +0 -17
- package/types/interfaces/Products.d.ts +0 -28
- package/types/interfaces/Statistics.d.ts +0 -19
- package/types/interfaces/Stores.d.ts +0 -47
- package/types/interfaces/Transactions.d.ts +0 -78
- package/types/utils.d.ts +0 -5
- package/types/var.d.ts +0 -3
|
@@ -0,0 +1,2910 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: "https://api.zennify.app" | (string & {});
|
|
3
|
+
};
|
|
4
|
+
export type DefaultError = {
|
|
5
|
+
code: string;
|
|
6
|
+
title: string;
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
export type GetServiceHealthData = {
|
|
10
|
+
body?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
query?: never;
|
|
13
|
+
url: "/health";
|
|
14
|
+
};
|
|
15
|
+
export type GetServiceHealthResponses = {
|
|
16
|
+
/**
|
|
17
|
+
* All running fine :)
|
|
18
|
+
*/
|
|
19
|
+
200: {
|
|
20
|
+
fine: boolean;
|
|
21
|
+
cache: boolean;
|
|
22
|
+
database: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type GetServiceHealthResponse = GetServiceHealthResponses[keyof GetServiceHealthResponses];
|
|
26
|
+
export type GetServiceApiSchemaData = {
|
|
27
|
+
body?: never;
|
|
28
|
+
path?: never;
|
|
29
|
+
query?: never;
|
|
30
|
+
url: "/openapi.json";
|
|
31
|
+
};
|
|
32
|
+
export type GetServiceApiSchemaResponses = {
|
|
33
|
+
/**
|
|
34
|
+
* Success, good work with our API :)
|
|
35
|
+
*/
|
|
36
|
+
200: unknown;
|
|
37
|
+
};
|
|
38
|
+
export type DeleteStoreDiscordPanelData = {
|
|
39
|
+
body?: never;
|
|
40
|
+
path: {
|
|
41
|
+
storeId: string;
|
|
42
|
+
panelId: string;
|
|
43
|
+
};
|
|
44
|
+
query?: never;
|
|
45
|
+
url: "/stores/{storeId}/discord_panels/{panelId}";
|
|
46
|
+
};
|
|
47
|
+
export type DeleteStoreDiscordPanelErrors = {
|
|
48
|
+
/**
|
|
49
|
+
* User not authenticated.
|
|
50
|
+
*/
|
|
51
|
+
401: DefaultError;
|
|
52
|
+
/**
|
|
53
|
+
* This store has expired.
|
|
54
|
+
*/
|
|
55
|
+
402: DefaultError;
|
|
56
|
+
/**
|
|
57
|
+
* Permission denied.
|
|
58
|
+
*/
|
|
59
|
+
403: DefaultError;
|
|
60
|
+
/**
|
|
61
|
+
* Not Found
|
|
62
|
+
*/
|
|
63
|
+
404: DefaultError;
|
|
64
|
+
};
|
|
65
|
+
export type DeleteStoreDiscordPanelError = DeleteStoreDiscordPanelErrors[keyof DeleteStoreDiscordPanelErrors];
|
|
66
|
+
export type DeleteStoreDiscordPanelResponses = {
|
|
67
|
+
/**
|
|
68
|
+
* Discord panel deleted successfully.
|
|
69
|
+
*/
|
|
70
|
+
204: void;
|
|
71
|
+
};
|
|
72
|
+
export type DeleteStoreDiscordPanelResponse = DeleteStoreDiscordPanelResponses[keyof DeleteStoreDiscordPanelResponses];
|
|
73
|
+
export type UpdateStoreDiscordPanelData = {
|
|
74
|
+
body?: {
|
|
75
|
+
/**
|
|
76
|
+
* Public name. Must be 3 to 50 valid characters.
|
|
77
|
+
*/
|
|
78
|
+
name?: string;
|
|
79
|
+
placeholder?: null | string;
|
|
80
|
+
/**
|
|
81
|
+
* Discord panel description.
|
|
82
|
+
*/
|
|
83
|
+
description?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Products displayed in the panel.
|
|
86
|
+
*/
|
|
87
|
+
products?: Array<{
|
|
88
|
+
/**
|
|
89
|
+
* Product id to show in the panel.
|
|
90
|
+
*/
|
|
91
|
+
id: number;
|
|
92
|
+
emoji?: null | string;
|
|
93
|
+
label?: null | string;
|
|
94
|
+
}>;
|
|
95
|
+
};
|
|
96
|
+
path: {
|
|
97
|
+
storeId: string;
|
|
98
|
+
panelId: string;
|
|
99
|
+
};
|
|
100
|
+
query?: never;
|
|
101
|
+
url: "/stores/{storeId}/discord_panels/{panelId}";
|
|
102
|
+
};
|
|
103
|
+
export type UpdateStoreDiscordPanelErrors = {
|
|
104
|
+
/**
|
|
105
|
+
* Invalid JSON payload.
|
|
106
|
+
*/
|
|
107
|
+
400: DefaultError;
|
|
108
|
+
/**
|
|
109
|
+
* User not authenticated.
|
|
110
|
+
*/
|
|
111
|
+
401: DefaultError;
|
|
112
|
+
/**
|
|
113
|
+
* This store has expired.
|
|
114
|
+
*/
|
|
115
|
+
402: DefaultError;
|
|
116
|
+
/**
|
|
117
|
+
* Permission denied.
|
|
118
|
+
*/
|
|
119
|
+
403: DefaultError;
|
|
120
|
+
/**
|
|
121
|
+
* Not Found
|
|
122
|
+
*/
|
|
123
|
+
404: DefaultError;
|
|
124
|
+
/**
|
|
125
|
+
* Payload too large.
|
|
126
|
+
*/
|
|
127
|
+
413: DefaultError;
|
|
128
|
+
/**
|
|
129
|
+
* Unprocessable Entity
|
|
130
|
+
*/
|
|
131
|
+
422: DefaultError;
|
|
132
|
+
};
|
|
133
|
+
export type UpdateStoreDiscordPanelError = UpdateStoreDiscordPanelErrors[keyof UpdateStoreDiscordPanelErrors];
|
|
134
|
+
export type UpdateStoreDiscordPanelResponses = {
|
|
135
|
+
/**
|
|
136
|
+
* Discord panel updated successfully.
|
|
137
|
+
*/
|
|
138
|
+
204: void;
|
|
139
|
+
};
|
|
140
|
+
export type UpdateStoreDiscordPanelResponse = UpdateStoreDiscordPanelResponses[keyof UpdateStoreDiscordPanelResponses];
|
|
141
|
+
export type GetStoreDiscordPanelsData = {
|
|
142
|
+
body?: never;
|
|
143
|
+
path: {
|
|
144
|
+
storeId: string;
|
|
145
|
+
};
|
|
146
|
+
query?: never;
|
|
147
|
+
url: "/stores/{storeId}/discord_panels";
|
|
148
|
+
};
|
|
149
|
+
export type GetStoreDiscordPanelsErrors = {
|
|
150
|
+
/**
|
|
151
|
+
* User not authenticated.
|
|
152
|
+
*/
|
|
153
|
+
401: DefaultError;
|
|
154
|
+
/**
|
|
155
|
+
* This store has expired.
|
|
156
|
+
*/
|
|
157
|
+
402: DefaultError;
|
|
158
|
+
/**
|
|
159
|
+
* Permission denied.
|
|
160
|
+
*/
|
|
161
|
+
403: DefaultError;
|
|
162
|
+
/**
|
|
163
|
+
* Unknown store.
|
|
164
|
+
*/
|
|
165
|
+
404: DefaultError;
|
|
166
|
+
};
|
|
167
|
+
export type GetStoreDiscordPanelsError = GetStoreDiscordPanelsErrors[keyof GetStoreDiscordPanelsErrors];
|
|
168
|
+
export type GetStoreDiscordPanelsResponses = {
|
|
169
|
+
/**
|
|
170
|
+
* Discord panels listed successfully.
|
|
171
|
+
*/
|
|
172
|
+
200: Array<{
|
|
173
|
+
id: number;
|
|
174
|
+
name: string;
|
|
175
|
+
placeholder: null | string;
|
|
176
|
+
description: null | string;
|
|
177
|
+
created_at: number;
|
|
178
|
+
owner_id: number;
|
|
179
|
+
store_id: number;
|
|
180
|
+
icon_id?: null | string;
|
|
181
|
+
banner_id?: null | string;
|
|
182
|
+
products: Array<{
|
|
183
|
+
id: number;
|
|
184
|
+
emoji: null | string;
|
|
185
|
+
label: null | string;
|
|
186
|
+
}>;
|
|
187
|
+
}>;
|
|
188
|
+
};
|
|
189
|
+
export type GetStoreDiscordPanelsResponse = GetStoreDiscordPanelsResponses[keyof GetStoreDiscordPanelsResponses];
|
|
190
|
+
export type CreateStoreDiscordPanelData = {
|
|
191
|
+
body?: {
|
|
192
|
+
/**
|
|
193
|
+
* Public name. Must be 3 to 50 valid characters.
|
|
194
|
+
*/
|
|
195
|
+
name: string;
|
|
196
|
+
/**
|
|
197
|
+
* Discord panel description.
|
|
198
|
+
*/
|
|
199
|
+
description?: string;
|
|
200
|
+
placeholder?: null | string;
|
|
201
|
+
};
|
|
202
|
+
path: {
|
|
203
|
+
storeId: string;
|
|
204
|
+
};
|
|
205
|
+
query?: never;
|
|
206
|
+
url: "/stores/{storeId}/discord_panels";
|
|
207
|
+
};
|
|
208
|
+
export type CreateStoreDiscordPanelErrors = {
|
|
209
|
+
/**
|
|
210
|
+
* Invalid JSON payload.
|
|
211
|
+
*/
|
|
212
|
+
400: DefaultError;
|
|
213
|
+
/**
|
|
214
|
+
* User not authenticated.
|
|
215
|
+
*/
|
|
216
|
+
401: DefaultError;
|
|
217
|
+
/**
|
|
218
|
+
* This store has expired.
|
|
219
|
+
*/
|
|
220
|
+
402: DefaultError;
|
|
221
|
+
/**
|
|
222
|
+
* Permission denied.
|
|
223
|
+
*/
|
|
224
|
+
403: DefaultError;
|
|
225
|
+
/**
|
|
226
|
+
* Unknown store.
|
|
227
|
+
*/
|
|
228
|
+
404: DefaultError;
|
|
229
|
+
/**
|
|
230
|
+
* Payload too large.
|
|
231
|
+
*/
|
|
232
|
+
413: DefaultError;
|
|
233
|
+
/**
|
|
234
|
+
* Unprocessable Entity
|
|
235
|
+
*/
|
|
236
|
+
422: DefaultError;
|
|
237
|
+
};
|
|
238
|
+
export type CreateStoreDiscordPanelError = CreateStoreDiscordPanelErrors[keyof CreateStoreDiscordPanelErrors];
|
|
239
|
+
export type CreateStoreDiscordPanelResponses = {
|
|
240
|
+
/**
|
|
241
|
+
* Discord panel created successfully.
|
|
242
|
+
*/
|
|
243
|
+
200: {
|
|
244
|
+
/**
|
|
245
|
+
* Discord panel ID.
|
|
246
|
+
*/
|
|
247
|
+
id: number;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
export type CreateStoreDiscordPanelResponse = CreateStoreDiscordPanelResponses[keyof CreateStoreDiscordPanelResponses];
|
|
251
|
+
export type PostStoreDiscordPanelMessageData = {
|
|
252
|
+
body?: {
|
|
253
|
+
/**
|
|
254
|
+
* Discord channel id where the panel message should be posted.
|
|
255
|
+
*/
|
|
256
|
+
channel_id: string;
|
|
257
|
+
};
|
|
258
|
+
path: {
|
|
259
|
+
storeId: string;
|
|
260
|
+
panelId: string;
|
|
261
|
+
};
|
|
262
|
+
query?: never;
|
|
263
|
+
url: "/stores/{storeId}/discord_panels/{panelId}/discord_messages";
|
|
264
|
+
};
|
|
265
|
+
export type PostStoreDiscordPanelMessageErrors = {
|
|
266
|
+
/**
|
|
267
|
+
* Invalid JSON payload.
|
|
268
|
+
*/
|
|
269
|
+
400: DefaultError;
|
|
270
|
+
/**
|
|
271
|
+
* User not authenticated.
|
|
272
|
+
*/
|
|
273
|
+
401: DefaultError;
|
|
274
|
+
/**
|
|
275
|
+
* This store has expired.
|
|
276
|
+
*/
|
|
277
|
+
402: DefaultError;
|
|
278
|
+
/**
|
|
279
|
+
* Permission denied.
|
|
280
|
+
*/
|
|
281
|
+
403: DefaultError;
|
|
282
|
+
/**
|
|
283
|
+
* Not Found
|
|
284
|
+
*/
|
|
285
|
+
404: DefaultError;
|
|
286
|
+
/**
|
|
287
|
+
* Payload too large.
|
|
288
|
+
*/
|
|
289
|
+
413: DefaultError;
|
|
290
|
+
/**
|
|
291
|
+
* Unknown channel.
|
|
292
|
+
*/
|
|
293
|
+
422: DefaultError;
|
|
294
|
+
};
|
|
295
|
+
export type PostStoreDiscordPanelMessageError = PostStoreDiscordPanelMessageErrors[keyof PostStoreDiscordPanelMessageErrors];
|
|
296
|
+
export type PostStoreDiscordPanelMessageResponses = {
|
|
297
|
+
/**
|
|
298
|
+
* Discord panel message queued successfully.
|
|
299
|
+
*/
|
|
300
|
+
202: unknown;
|
|
301
|
+
};
|
|
302
|
+
export type PostStoreProductDiscordMessageData = {
|
|
303
|
+
body?: {
|
|
304
|
+
/**
|
|
305
|
+
* Discord channel id where the product message should be posted.
|
|
306
|
+
*/
|
|
307
|
+
channel_id: string;
|
|
308
|
+
};
|
|
309
|
+
path: {
|
|
310
|
+
storeId: string;
|
|
311
|
+
productId: string;
|
|
312
|
+
};
|
|
313
|
+
query?: never;
|
|
314
|
+
url: "/stores/{storeId}/products/{productId}/discord_messages";
|
|
315
|
+
};
|
|
316
|
+
export type PostStoreProductDiscordMessageErrors = {
|
|
317
|
+
/**
|
|
318
|
+
* Invalid JSON payload.
|
|
319
|
+
*/
|
|
320
|
+
400: DefaultError;
|
|
321
|
+
/**
|
|
322
|
+
* User not authenticated.
|
|
323
|
+
*/
|
|
324
|
+
401: DefaultError;
|
|
325
|
+
/**
|
|
326
|
+
* This store has expired.
|
|
327
|
+
*/
|
|
328
|
+
402: DefaultError;
|
|
329
|
+
/**
|
|
330
|
+
* Permission denied.
|
|
331
|
+
*/
|
|
332
|
+
403: DefaultError;
|
|
333
|
+
/**
|
|
334
|
+
* Not Found
|
|
335
|
+
*/
|
|
336
|
+
404: DefaultError;
|
|
337
|
+
/**
|
|
338
|
+
* Payload too large.
|
|
339
|
+
*/
|
|
340
|
+
413: DefaultError;
|
|
341
|
+
/**
|
|
342
|
+
* Unknown channel.
|
|
343
|
+
*/
|
|
344
|
+
422: DefaultError;
|
|
345
|
+
};
|
|
346
|
+
export type PostStoreProductDiscordMessageError = PostStoreProductDiscordMessageErrors[keyof PostStoreProductDiscordMessageErrors];
|
|
347
|
+
export type PostStoreProductDiscordMessageResponses = {
|
|
348
|
+
/**
|
|
349
|
+
* Discord product message queued successfully.
|
|
350
|
+
*/
|
|
351
|
+
202: unknown;
|
|
352
|
+
};
|
|
353
|
+
export type DeleteStoreProductData = {
|
|
354
|
+
body?: never;
|
|
355
|
+
path: {
|
|
356
|
+
storeId: string;
|
|
357
|
+
productId: string;
|
|
358
|
+
};
|
|
359
|
+
query?: never;
|
|
360
|
+
url: "/stores/{storeId}/products/{productId}";
|
|
361
|
+
};
|
|
362
|
+
export type DeleteStoreProductErrors = {
|
|
363
|
+
/**
|
|
364
|
+
* User not authenticated.
|
|
365
|
+
*/
|
|
366
|
+
401: DefaultError;
|
|
367
|
+
/**
|
|
368
|
+
* This store has expired.
|
|
369
|
+
*/
|
|
370
|
+
402: DefaultError;
|
|
371
|
+
/**
|
|
372
|
+
* Permission denied.
|
|
373
|
+
*/
|
|
374
|
+
403: DefaultError;
|
|
375
|
+
/**
|
|
376
|
+
* Unknown store.
|
|
377
|
+
*/
|
|
378
|
+
404: DefaultError;
|
|
379
|
+
};
|
|
380
|
+
export type DeleteStoreProductError = DeleteStoreProductErrors[keyof DeleteStoreProductErrors];
|
|
381
|
+
export type DeleteStoreProductResponses = {
|
|
382
|
+
/**
|
|
383
|
+
* Product deleted successfully.
|
|
384
|
+
*/
|
|
385
|
+
204: void;
|
|
386
|
+
};
|
|
387
|
+
export type DeleteStoreProductResponse = DeleteStoreProductResponses[keyof DeleteStoreProductResponses];
|
|
388
|
+
export type GetStoreProductData = {
|
|
389
|
+
body?: never;
|
|
390
|
+
path: {
|
|
391
|
+
storeId: string;
|
|
392
|
+
productId: string;
|
|
393
|
+
};
|
|
394
|
+
query?: never;
|
|
395
|
+
url: "/stores/{storeId}/products/{productId}";
|
|
396
|
+
};
|
|
397
|
+
export type GetStoreProductErrors = {
|
|
398
|
+
/**
|
|
399
|
+
* User not authenticated.
|
|
400
|
+
*/
|
|
401
|
+
401: DefaultError;
|
|
402
|
+
/**
|
|
403
|
+
* This store has expired.
|
|
404
|
+
*/
|
|
405
|
+
402: DefaultError;
|
|
406
|
+
/**
|
|
407
|
+
* Permission denied.
|
|
408
|
+
*/
|
|
409
|
+
403: DefaultError;
|
|
410
|
+
/**
|
|
411
|
+
* Unknown store.
|
|
412
|
+
*/
|
|
413
|
+
404: DefaultError;
|
|
414
|
+
};
|
|
415
|
+
export type GetStoreProductError = GetStoreProductErrors[keyof GetStoreProductErrors];
|
|
416
|
+
export type GetStoreProductResponses = {
|
|
417
|
+
/**
|
|
418
|
+
* Product returned successfully.
|
|
419
|
+
*/
|
|
420
|
+
200: {
|
|
421
|
+
id: number;
|
|
422
|
+
name: string;
|
|
423
|
+
value: number;
|
|
424
|
+
icon_id?: null | string;
|
|
425
|
+
banner_id?: null | string;
|
|
426
|
+
owner_id: number;
|
|
427
|
+
store_id: number;
|
|
428
|
+
created_at: number;
|
|
429
|
+
stock: {
|
|
430
|
+
size: number;
|
|
431
|
+
locked: boolean;
|
|
432
|
+
};
|
|
433
|
+
description: {
|
|
434
|
+
discord: string;
|
|
435
|
+
short: string;
|
|
436
|
+
website: string;
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
export type GetStoreProductResponse = GetStoreProductResponses[keyof GetStoreProductResponses];
|
|
441
|
+
export type UpdateStoreProductData = {
|
|
442
|
+
body?: {
|
|
443
|
+
/**
|
|
444
|
+
* Public name. Must be 3 to 50 valid characters.
|
|
445
|
+
*/
|
|
446
|
+
name?: string;
|
|
447
|
+
/**
|
|
448
|
+
* Product price in BRL.
|
|
449
|
+
*/
|
|
450
|
+
value?: number;
|
|
451
|
+
description?: {
|
|
452
|
+
/**
|
|
453
|
+
* Product description used in Discord messages.
|
|
454
|
+
*/
|
|
455
|
+
discord?: string;
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
path: {
|
|
459
|
+
storeId: string;
|
|
460
|
+
productId: string;
|
|
461
|
+
};
|
|
462
|
+
query?: never;
|
|
463
|
+
url: "/stores/{storeId}/products/{productId}";
|
|
464
|
+
};
|
|
465
|
+
export type UpdateStoreProductErrors = {
|
|
466
|
+
/**
|
|
467
|
+
* Invalid JSON payload.
|
|
468
|
+
*/
|
|
469
|
+
400: DefaultError;
|
|
470
|
+
/**
|
|
471
|
+
* User not authenticated.
|
|
472
|
+
*/
|
|
473
|
+
401: DefaultError;
|
|
474
|
+
/**
|
|
475
|
+
* This store has expired.
|
|
476
|
+
*/
|
|
477
|
+
402: DefaultError;
|
|
478
|
+
/**
|
|
479
|
+
* Permission denied.
|
|
480
|
+
*/
|
|
481
|
+
403: DefaultError;
|
|
482
|
+
/**
|
|
483
|
+
* Unknown store.
|
|
484
|
+
*/
|
|
485
|
+
404: DefaultError;
|
|
486
|
+
/**
|
|
487
|
+
* Payload too large.
|
|
488
|
+
*/
|
|
489
|
+
413: DefaultError;
|
|
490
|
+
/**
|
|
491
|
+
* Unprocessable Entity
|
|
492
|
+
*/
|
|
493
|
+
422: DefaultError;
|
|
494
|
+
};
|
|
495
|
+
export type UpdateStoreProductError = UpdateStoreProductErrors[keyof UpdateStoreProductErrors];
|
|
496
|
+
export type UpdateStoreProductResponses = {
|
|
497
|
+
/**
|
|
498
|
+
* Product updated successfully.
|
|
499
|
+
*/
|
|
500
|
+
204: void;
|
|
501
|
+
};
|
|
502
|
+
export type UpdateStoreProductResponse = UpdateStoreProductResponses[keyof UpdateStoreProductResponses];
|
|
503
|
+
export type ListStoreProductsData = {
|
|
504
|
+
body?: never;
|
|
505
|
+
path: {
|
|
506
|
+
storeId: string;
|
|
507
|
+
};
|
|
508
|
+
query?: never;
|
|
509
|
+
url: "/stores/{storeId}/products";
|
|
510
|
+
};
|
|
511
|
+
export type ListStoreProductsErrors = {
|
|
512
|
+
/**
|
|
513
|
+
* User not authenticated.
|
|
514
|
+
*/
|
|
515
|
+
401: DefaultError;
|
|
516
|
+
/**
|
|
517
|
+
* This store has expired.
|
|
518
|
+
*/
|
|
519
|
+
402: DefaultError;
|
|
520
|
+
/**
|
|
521
|
+
* Permission denied.
|
|
522
|
+
*/
|
|
523
|
+
403: DefaultError;
|
|
524
|
+
/**
|
|
525
|
+
* Unknown store.
|
|
526
|
+
*/
|
|
527
|
+
404: DefaultError;
|
|
528
|
+
};
|
|
529
|
+
export type ListStoreProductsError = ListStoreProductsErrors[keyof ListStoreProductsErrors];
|
|
530
|
+
export type ListStoreProductsResponses = {
|
|
531
|
+
/**
|
|
532
|
+
* Products listed successfully.
|
|
533
|
+
*/
|
|
534
|
+
200: Array<{
|
|
535
|
+
id: number;
|
|
536
|
+
name: string;
|
|
537
|
+
icon_id: null | string;
|
|
538
|
+
banner_id: null | string;
|
|
539
|
+
value: number;
|
|
540
|
+
stock_locked: null | boolean;
|
|
541
|
+
stock_count: string;
|
|
542
|
+
}>;
|
|
543
|
+
};
|
|
544
|
+
export type ListStoreProductsResponse = ListStoreProductsResponses[keyof ListStoreProductsResponses];
|
|
545
|
+
export type CreateStoreProductData = {
|
|
546
|
+
body?: {
|
|
547
|
+
/**
|
|
548
|
+
* Public name. Must be 3 to 50 valid characters.
|
|
549
|
+
*/
|
|
550
|
+
name: string;
|
|
551
|
+
/**
|
|
552
|
+
* Product price in BRL.
|
|
553
|
+
*/
|
|
554
|
+
value: number;
|
|
555
|
+
};
|
|
556
|
+
path: {
|
|
557
|
+
storeId: string;
|
|
558
|
+
};
|
|
559
|
+
query?: never;
|
|
560
|
+
url: "/stores/{storeId}/products";
|
|
561
|
+
};
|
|
562
|
+
export type CreateStoreProductErrors = {
|
|
563
|
+
/**
|
|
564
|
+
* Invalid JSON payload.
|
|
565
|
+
*/
|
|
566
|
+
400: DefaultError;
|
|
567
|
+
/**
|
|
568
|
+
* User not authenticated.
|
|
569
|
+
*/
|
|
570
|
+
401: DefaultError;
|
|
571
|
+
/**
|
|
572
|
+
* This store has expired.
|
|
573
|
+
*/
|
|
574
|
+
402: DefaultError;
|
|
575
|
+
/**
|
|
576
|
+
* Permission denied.
|
|
577
|
+
*/
|
|
578
|
+
403: DefaultError;
|
|
579
|
+
/**
|
|
580
|
+
* Unknown store.
|
|
581
|
+
*/
|
|
582
|
+
404: DefaultError;
|
|
583
|
+
/**
|
|
584
|
+
* Payload too large.
|
|
585
|
+
*/
|
|
586
|
+
413: DefaultError;
|
|
587
|
+
/**
|
|
588
|
+
* Unprocessable Entity
|
|
589
|
+
*/
|
|
590
|
+
422: DefaultError;
|
|
591
|
+
};
|
|
592
|
+
export type CreateStoreProductError = CreateStoreProductErrors[keyof CreateStoreProductErrors];
|
|
593
|
+
export type CreateStoreProductResponses = {
|
|
594
|
+
/**
|
|
595
|
+
* Product created successfully.
|
|
596
|
+
*/
|
|
597
|
+
200: {
|
|
598
|
+
/**
|
|
599
|
+
* Product ID.
|
|
600
|
+
*/
|
|
601
|
+
id: number;
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
export type CreateStoreProductResponse = CreateStoreProductResponses[keyof CreateStoreProductResponses];
|
|
605
|
+
export type UpdateStoreProductStockItemData = {
|
|
606
|
+
body?: {
|
|
607
|
+
/**
|
|
608
|
+
* Private stock content delivered to the buyer.
|
|
609
|
+
*/
|
|
610
|
+
content?: string;
|
|
611
|
+
/**
|
|
612
|
+
* Internal cost for this stock item.
|
|
613
|
+
*/
|
|
614
|
+
cost?: number;
|
|
615
|
+
};
|
|
616
|
+
path: {
|
|
617
|
+
storeId: string;
|
|
618
|
+
productId: string;
|
|
619
|
+
stockId: string;
|
|
620
|
+
};
|
|
621
|
+
query?: never;
|
|
622
|
+
url: "/stores/{storeId}/products/{productId}/stock/{stockId}";
|
|
623
|
+
};
|
|
624
|
+
export type UpdateStoreProductStockItemErrors = {
|
|
625
|
+
/**
|
|
626
|
+
* Invalid JSON payload.
|
|
627
|
+
*/
|
|
628
|
+
400: DefaultError;
|
|
629
|
+
/**
|
|
630
|
+
* User not authenticated.
|
|
631
|
+
*/
|
|
632
|
+
401: DefaultError;
|
|
633
|
+
/**
|
|
634
|
+
* This store has expired.
|
|
635
|
+
*/
|
|
636
|
+
402: DefaultError;
|
|
637
|
+
/**
|
|
638
|
+
* Permission denied.
|
|
639
|
+
*/
|
|
640
|
+
403: DefaultError;
|
|
641
|
+
/**
|
|
642
|
+
* Not Found
|
|
643
|
+
*/
|
|
644
|
+
404: DefaultError;
|
|
645
|
+
/**
|
|
646
|
+
* Payload too large.
|
|
647
|
+
*/
|
|
648
|
+
413: DefaultError;
|
|
649
|
+
/**
|
|
650
|
+
* Unprocessable Entity
|
|
651
|
+
*/
|
|
652
|
+
422: DefaultError;
|
|
653
|
+
};
|
|
654
|
+
export type UpdateStoreProductStockItemError = UpdateStoreProductStockItemErrors[keyof UpdateStoreProductStockItemErrors];
|
|
655
|
+
export type UpdateStoreProductStockItemResponses = {
|
|
656
|
+
/**
|
|
657
|
+
* Stock item updated successfully.
|
|
658
|
+
*/
|
|
659
|
+
204: void;
|
|
660
|
+
};
|
|
661
|
+
export type UpdateStoreProductStockItemResponse = UpdateStoreProductStockItemResponses[keyof UpdateStoreProductStockItemResponses];
|
|
662
|
+
export type GetStoreProductStockData = {
|
|
663
|
+
body?: never;
|
|
664
|
+
path: {
|
|
665
|
+
storeId: string;
|
|
666
|
+
productId: string;
|
|
667
|
+
};
|
|
668
|
+
query?: never;
|
|
669
|
+
url: "/stores/{storeId}/products/{productId}/stock";
|
|
670
|
+
};
|
|
671
|
+
export type GetStoreProductStockErrors = {
|
|
672
|
+
/**
|
|
673
|
+
* User not authenticated.
|
|
674
|
+
*/
|
|
675
|
+
401: DefaultError;
|
|
676
|
+
/**
|
|
677
|
+
* This store has expired.
|
|
678
|
+
*/
|
|
679
|
+
402: DefaultError;
|
|
680
|
+
/**
|
|
681
|
+
* Permission denied.
|
|
682
|
+
*/
|
|
683
|
+
403: DefaultError;
|
|
684
|
+
/**
|
|
685
|
+
* Unknown store.
|
|
686
|
+
*/
|
|
687
|
+
404: DefaultError;
|
|
688
|
+
};
|
|
689
|
+
export type GetStoreProductStockError = GetStoreProductStockErrors[keyof GetStoreProductStockErrors];
|
|
690
|
+
export type GetStoreProductStockResponses = {
|
|
691
|
+
/**
|
|
692
|
+
* Stock items listed successfully.
|
|
693
|
+
*/
|
|
694
|
+
200: Array<{
|
|
695
|
+
/**
|
|
696
|
+
* Stock item ID.
|
|
697
|
+
*/
|
|
698
|
+
id: number;
|
|
699
|
+
/**
|
|
700
|
+
* Private stock content delivered to the buyer.
|
|
701
|
+
*/
|
|
702
|
+
content: string;
|
|
703
|
+
/**
|
|
704
|
+
* Internal cost for this stock item.
|
|
705
|
+
*/
|
|
706
|
+
cost: number;
|
|
707
|
+
}>;
|
|
708
|
+
};
|
|
709
|
+
export type GetStoreProductStockResponse = GetStoreProductStockResponses[keyof GetStoreProductStockResponses];
|
|
710
|
+
export type UpdateStoreProductStockData = {
|
|
711
|
+
body?: {
|
|
712
|
+
stock_locked?: boolean;
|
|
713
|
+
add?: Array<{
|
|
714
|
+
/**
|
|
715
|
+
* Private stock content delivered to the buyer.
|
|
716
|
+
*/
|
|
717
|
+
content: string;
|
|
718
|
+
/**
|
|
719
|
+
* Internal cost for this stock item.
|
|
720
|
+
*/
|
|
721
|
+
cost: number;
|
|
722
|
+
id?: number;
|
|
723
|
+
}>;
|
|
724
|
+
remove?: Array<number>;
|
|
725
|
+
};
|
|
726
|
+
path: {
|
|
727
|
+
storeId: string;
|
|
728
|
+
productId: string;
|
|
729
|
+
};
|
|
730
|
+
query?: never;
|
|
731
|
+
url: "/stores/{storeId}/products/{productId}/stock";
|
|
732
|
+
};
|
|
733
|
+
export type UpdateStoreProductStockErrors = {
|
|
734
|
+
/**
|
|
735
|
+
* Invalid JSON payload.
|
|
736
|
+
*/
|
|
737
|
+
400: DefaultError;
|
|
738
|
+
/**
|
|
739
|
+
* User not authenticated.
|
|
740
|
+
*/
|
|
741
|
+
401: DefaultError;
|
|
742
|
+
/**
|
|
743
|
+
* This store has expired.
|
|
744
|
+
*/
|
|
745
|
+
402: DefaultError;
|
|
746
|
+
/**
|
|
747
|
+
* Permission denied.
|
|
748
|
+
*/
|
|
749
|
+
403: DefaultError;
|
|
750
|
+
/**
|
|
751
|
+
* Unknown store.
|
|
752
|
+
*/
|
|
753
|
+
404: DefaultError;
|
|
754
|
+
/**
|
|
755
|
+
* Payload too large.
|
|
756
|
+
*/
|
|
757
|
+
413: DefaultError;
|
|
758
|
+
/**
|
|
759
|
+
* Unprocessable Entity
|
|
760
|
+
*/
|
|
761
|
+
422: DefaultError;
|
|
762
|
+
};
|
|
763
|
+
export type UpdateStoreProductStockError = UpdateStoreProductStockErrors[keyof UpdateStoreProductStockErrors];
|
|
764
|
+
export type UpdateStoreProductStockResponses = {
|
|
765
|
+
/**
|
|
766
|
+
* Product stock updated successfully.
|
|
767
|
+
*/
|
|
768
|
+
200: {
|
|
769
|
+
stock_locked: boolean;
|
|
770
|
+
stock: Array<{
|
|
771
|
+
/**
|
|
772
|
+
* Stock item ID.
|
|
773
|
+
*/
|
|
774
|
+
id: number;
|
|
775
|
+
/**
|
|
776
|
+
* Private stock content delivered to the buyer.
|
|
777
|
+
*/
|
|
778
|
+
content: string;
|
|
779
|
+
/**
|
|
780
|
+
* Internal cost for this stock item.
|
|
781
|
+
*/
|
|
782
|
+
cost: number;
|
|
783
|
+
}>;
|
|
784
|
+
};
|
|
785
|
+
};
|
|
786
|
+
export type UpdateStoreProductStockResponse = UpdateStoreProductStockResponses[keyof UpdateStoreProductStockResponses];
|
|
787
|
+
export type GetApiReferenceData = {
|
|
788
|
+
body?: never;
|
|
789
|
+
path?: never;
|
|
790
|
+
query?: never;
|
|
791
|
+
url: "/reference";
|
|
792
|
+
};
|
|
793
|
+
export type GetApiReferenceResponses = {
|
|
794
|
+
/**
|
|
795
|
+
* Success, good work with our API :)
|
|
796
|
+
*/
|
|
797
|
+
200: '\n<!doctype html>\n<html>\n <head>\n <title>Zennify API Reference</title>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <meta name="title" content="Zennify API" />\n <meta name="description" content="Zennify API Documentation" />\n <meta property="og:description" content="Zennify API Documentation" />\n <meta property="og:title" content="Zennify API" />\n <meta property="og:image" content="https://zennify.app/logo.png" />\n <meta name="twitter:card" content="summary_large_image" />\n </head>\n <body>\n <div id="app"></div>\n <!-- Load the Script -->\n <script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>\n <!-- Initialize the API Reference -->\n <script>\n Scalar.createApiReference("#app", {\n // The URL of the OpenAPI/Swagger document\n url: "https://api.zennify.app/openapi.json",\n // Avoid CORS issues\n proxyUrl: "",\n showOperationId: true,\n persistAuth: true,\n telemetry: false,\n theme: "deepSpace",\n });\n </script>\n </body>\n</html>' | '\n<!doctype html>\n<html>\n <head>\n <title>Zennify API Reference</title>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <meta name="title" content="Zennify API" />\n <meta name="description" content="Zennify API Documentation" />\n <meta property="og:description" content="Zennify API Documentation" />\n <meta property="og:title" content="Zennify API" />\n <meta property="og:image" content="https://zennify.app/logo.png" />\n <meta name="twitter:card" content="summary_large_image" />\n </head>\n <body>\n <div id="app"></div>\n <!-- Load the Script -->\n <script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>\n <!-- Initialize the API Reference -->\n <script>\n Scalar.createApiReference("#app", {\n // The URL of the OpenAPI/Swagger document\n url: "https://api.zennify.space/openapi.json",\n // Avoid CORS issues\n proxyUrl: "",\n showOperationId: true,\n persistAuth: true,\n telemetry: false,\n theme: "deepSpace",\n });\n </script>\n </body>\n</html>';
|
|
798
|
+
};
|
|
799
|
+
export type GetApiReferenceResponse = GetApiReferenceResponses[keyof GetApiReferenceResponses];
|
|
800
|
+
export type GetServiceDataData = {
|
|
801
|
+
body?: never;
|
|
802
|
+
path?: never;
|
|
803
|
+
query?: never;
|
|
804
|
+
url: "/service";
|
|
805
|
+
};
|
|
806
|
+
export type GetServiceDataResponses = {
|
|
807
|
+
/**
|
|
808
|
+
* Success - Get service data
|
|
809
|
+
*/
|
|
810
|
+
200: {
|
|
811
|
+
servers: Array<{
|
|
812
|
+
/**
|
|
813
|
+
* Discord server id.
|
|
814
|
+
*/
|
|
815
|
+
id: string;
|
|
816
|
+
/**
|
|
817
|
+
* Discord server name.
|
|
818
|
+
*/
|
|
819
|
+
name: string;
|
|
820
|
+
/**
|
|
821
|
+
* Discord server member count.
|
|
822
|
+
*/
|
|
823
|
+
members: number;
|
|
824
|
+
/**
|
|
825
|
+
* Discord server icon URL.
|
|
826
|
+
*/
|
|
827
|
+
icon_url: string;
|
|
828
|
+
}>;
|
|
829
|
+
random: Array<{
|
|
830
|
+
/**
|
|
831
|
+
* Discord server id.
|
|
832
|
+
*/
|
|
833
|
+
id: string;
|
|
834
|
+
/**
|
|
835
|
+
* Discord server name.
|
|
836
|
+
*/
|
|
837
|
+
name: string;
|
|
838
|
+
/**
|
|
839
|
+
* Discord server member count.
|
|
840
|
+
*/
|
|
841
|
+
members: number;
|
|
842
|
+
/**
|
|
843
|
+
* Discord server icon URL.
|
|
844
|
+
*/
|
|
845
|
+
icon_url: string;
|
|
846
|
+
}>;
|
|
847
|
+
pricing: {
|
|
848
|
+
/**
|
|
849
|
+
* Store plan price.
|
|
850
|
+
*/
|
|
851
|
+
store: number;
|
|
852
|
+
/**
|
|
853
|
+
* Store renewal price.
|
|
854
|
+
*/
|
|
855
|
+
renew: number;
|
|
856
|
+
limits: {
|
|
857
|
+
/**
|
|
858
|
+
* Discord server limit price.
|
|
859
|
+
*/
|
|
860
|
+
discord_server: number;
|
|
861
|
+
/**
|
|
862
|
+
* Product limit price.
|
|
863
|
+
*/
|
|
864
|
+
product: number;
|
|
865
|
+
};
|
|
866
|
+
};
|
|
867
|
+
statistics: {
|
|
868
|
+
/**
|
|
869
|
+
* Service revenue.
|
|
870
|
+
*/
|
|
871
|
+
revenue: number;
|
|
872
|
+
/**
|
|
873
|
+
* Store count.
|
|
874
|
+
*/
|
|
875
|
+
stores: number;
|
|
876
|
+
/**
|
|
877
|
+
* Sales count.
|
|
878
|
+
*/
|
|
879
|
+
sales: number;
|
|
880
|
+
/**
|
|
881
|
+
* User count.
|
|
882
|
+
*/
|
|
883
|
+
users: number;
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
export type GetServiceDataResponse = GetServiceDataResponses[keyof GetServiceDataResponses];
|
|
888
|
+
export type UpdateStoreDiscordChannelsData = {
|
|
889
|
+
body?: {
|
|
890
|
+
/**
|
|
891
|
+
* Discord guild and channel binding.
|
|
892
|
+
*/
|
|
893
|
+
carts?: {
|
|
894
|
+
/**
|
|
895
|
+
* Discord guild id.
|
|
896
|
+
*/
|
|
897
|
+
guild_id: string;
|
|
898
|
+
channel_id?: null | string;
|
|
899
|
+
};
|
|
900
|
+
/**
|
|
901
|
+
* Discord guild and channel binding.
|
|
902
|
+
*/
|
|
903
|
+
feedbacks?: {
|
|
904
|
+
/**
|
|
905
|
+
* Discord guild id.
|
|
906
|
+
*/
|
|
907
|
+
guild_id: string;
|
|
908
|
+
channel_id?: null | string;
|
|
909
|
+
};
|
|
910
|
+
/**
|
|
911
|
+
* Discord guild and channel binding.
|
|
912
|
+
*/
|
|
913
|
+
sales?: {
|
|
914
|
+
/**
|
|
915
|
+
* Discord guild id.
|
|
916
|
+
*/
|
|
917
|
+
guild_id: string;
|
|
918
|
+
channel_id?: null | string;
|
|
919
|
+
};
|
|
920
|
+
/**
|
|
921
|
+
* Discord guild and channel binding.
|
|
922
|
+
*/
|
|
923
|
+
voice?: {
|
|
924
|
+
/**
|
|
925
|
+
* Discord guild id.
|
|
926
|
+
*/
|
|
927
|
+
guild_id: string;
|
|
928
|
+
channel_id?: null | string;
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
path: {
|
|
932
|
+
storeId: string;
|
|
933
|
+
};
|
|
934
|
+
query?: never;
|
|
935
|
+
url: "/stores/{storeId}/app/discord/channels";
|
|
936
|
+
};
|
|
937
|
+
export type UpdateStoreDiscordChannelsErrors = {
|
|
938
|
+
/**
|
|
939
|
+
* Invalid JSON payload.
|
|
940
|
+
*/
|
|
941
|
+
400: DefaultError;
|
|
942
|
+
/**
|
|
943
|
+
* User not authenticated.
|
|
944
|
+
*/
|
|
945
|
+
401: DefaultError;
|
|
946
|
+
/**
|
|
947
|
+
* This store has expired.
|
|
948
|
+
*/
|
|
949
|
+
402: DefaultError;
|
|
950
|
+
/**
|
|
951
|
+
* Permission denied.
|
|
952
|
+
*/
|
|
953
|
+
403: DefaultError;
|
|
954
|
+
/**
|
|
955
|
+
* Unknown store.
|
|
956
|
+
*/
|
|
957
|
+
404: DefaultError;
|
|
958
|
+
/**
|
|
959
|
+
* Payload too large.
|
|
960
|
+
*/
|
|
961
|
+
413: DefaultError;
|
|
962
|
+
/**
|
|
963
|
+
* Unprocessable Entity
|
|
964
|
+
*/
|
|
965
|
+
422: DefaultError;
|
|
966
|
+
};
|
|
967
|
+
export type UpdateStoreDiscordChannelsError = UpdateStoreDiscordChannelsErrors[keyof UpdateStoreDiscordChannelsErrors];
|
|
968
|
+
export type UpdateStoreDiscordChannelsResponses = {
|
|
969
|
+
/**
|
|
970
|
+
* Discord channels updated successfully.
|
|
971
|
+
*/
|
|
972
|
+
204: void;
|
|
973
|
+
};
|
|
974
|
+
export type UpdateStoreDiscordChannelsResponse = UpdateStoreDiscordChannelsResponses[keyof UpdateStoreDiscordChannelsResponses];
|
|
975
|
+
export type CreateStoreDiscordEmojisData = {
|
|
976
|
+
body?: {
|
|
977
|
+
emojis: Array<Blob | File>;
|
|
978
|
+
};
|
|
979
|
+
path: {
|
|
980
|
+
storeId: string;
|
|
981
|
+
serverId: string;
|
|
982
|
+
};
|
|
983
|
+
query?: never;
|
|
984
|
+
url: "/stores/{storeId}/app/discord/{serverId}/emojis";
|
|
985
|
+
};
|
|
986
|
+
export type CreateStoreDiscordEmojisErrors = {
|
|
987
|
+
/**
|
|
988
|
+
* Invalid Multipart payload.
|
|
989
|
+
*/
|
|
990
|
+
400: DefaultError;
|
|
991
|
+
/**
|
|
992
|
+
* User not authenticated.
|
|
993
|
+
*/
|
|
994
|
+
401: DefaultError;
|
|
995
|
+
/**
|
|
996
|
+
* This store has expired.
|
|
997
|
+
*/
|
|
998
|
+
402: DefaultError;
|
|
999
|
+
/**
|
|
1000
|
+
* Permission denied.
|
|
1001
|
+
*/
|
|
1002
|
+
403: DefaultError;
|
|
1003
|
+
/**
|
|
1004
|
+
* Unknown store.
|
|
1005
|
+
*/
|
|
1006
|
+
404: DefaultError;
|
|
1007
|
+
/**
|
|
1008
|
+
* Payload too large.
|
|
1009
|
+
*/
|
|
1010
|
+
413: DefaultError;
|
|
1011
|
+
/**
|
|
1012
|
+
* Unprocessable Entity
|
|
1013
|
+
*/
|
|
1014
|
+
422: DefaultError;
|
|
1015
|
+
/**
|
|
1016
|
+
* Your actions are being limited.
|
|
1017
|
+
*/
|
|
1018
|
+
429: DefaultError;
|
|
1019
|
+
};
|
|
1020
|
+
export type CreateStoreDiscordEmojisError = CreateStoreDiscordEmojisErrors[keyof CreateStoreDiscordEmojisErrors];
|
|
1021
|
+
export type CreateStoreDiscordEmojisResponses = {
|
|
1022
|
+
/**
|
|
1023
|
+
* Discord emojis created successfully.
|
|
1024
|
+
*/
|
|
1025
|
+
200: Array<{
|
|
1026
|
+
/**
|
|
1027
|
+
* Discord emoji id.
|
|
1028
|
+
*/
|
|
1029
|
+
id: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* Discord emoji name.
|
|
1032
|
+
*/
|
|
1033
|
+
name: string;
|
|
1034
|
+
}>;
|
|
1035
|
+
};
|
|
1036
|
+
export type CreateStoreDiscordEmojisResponse = CreateStoreDiscordEmojisResponses[keyof CreateStoreDiscordEmojisResponses];
|
|
1037
|
+
export type GetStoreDiscordBotData = {
|
|
1038
|
+
body?: never;
|
|
1039
|
+
path: {
|
|
1040
|
+
storeId: string;
|
|
1041
|
+
};
|
|
1042
|
+
query?: never;
|
|
1043
|
+
url: "/stores/{storeId}/app/discord";
|
|
1044
|
+
};
|
|
1045
|
+
export type GetStoreDiscordBotErrors = {
|
|
1046
|
+
/**
|
|
1047
|
+
* User not authenticated.
|
|
1048
|
+
*/
|
|
1049
|
+
401: DefaultError;
|
|
1050
|
+
/**
|
|
1051
|
+
* This store has expired.
|
|
1052
|
+
*/
|
|
1053
|
+
402: DefaultError;
|
|
1054
|
+
/**
|
|
1055
|
+
* Permission denied.
|
|
1056
|
+
*/
|
|
1057
|
+
403: DefaultError;
|
|
1058
|
+
/**
|
|
1059
|
+
* Unknown store.
|
|
1060
|
+
*/
|
|
1061
|
+
404: DefaultError;
|
|
1062
|
+
};
|
|
1063
|
+
export type GetStoreDiscordBotError = GetStoreDiscordBotErrors[keyof GetStoreDiscordBotErrors];
|
|
1064
|
+
export type GetStoreDiscordBotResponses = {
|
|
1065
|
+
/**
|
|
1066
|
+
* Discord bot status returned successfully.
|
|
1067
|
+
*/
|
|
1068
|
+
200: {
|
|
1069
|
+
valid: false;
|
|
1070
|
+
} | {
|
|
1071
|
+
valid: true;
|
|
1072
|
+
/**
|
|
1073
|
+
* Discord bot id.
|
|
1074
|
+
*/
|
|
1075
|
+
id: string;
|
|
1076
|
+
/**
|
|
1077
|
+
* Discord bot username.
|
|
1078
|
+
*/
|
|
1079
|
+
username: string;
|
|
1080
|
+
avatar: null | string;
|
|
1081
|
+
/**
|
|
1082
|
+
* Discord bot discriminator.
|
|
1083
|
+
*/
|
|
1084
|
+
discriminator: string;
|
|
1085
|
+
banner: null | string;
|
|
1086
|
+
/**
|
|
1087
|
+
* Discord bot bio.
|
|
1088
|
+
*/
|
|
1089
|
+
bio: string;
|
|
1090
|
+
guilds: Array<{
|
|
1091
|
+
/**
|
|
1092
|
+
* Discord guild id.
|
|
1093
|
+
*/
|
|
1094
|
+
id: string;
|
|
1095
|
+
/**
|
|
1096
|
+
* Discord guild name.
|
|
1097
|
+
*/
|
|
1098
|
+
name: string;
|
|
1099
|
+
icon: null | string;
|
|
1100
|
+
banner: boolean;
|
|
1101
|
+
hasAdmin: boolean;
|
|
1102
|
+
/**
|
|
1103
|
+
* Approximate guild member count.
|
|
1104
|
+
*/
|
|
1105
|
+
members: number;
|
|
1106
|
+
}>;
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
export type GetStoreDiscordBotResponse = GetStoreDiscordBotResponses[keyof GetStoreDiscordBotResponses];
|
|
1110
|
+
export type DeleteStoreDiscordServerData = {
|
|
1111
|
+
body?: {
|
|
1112
|
+
/**
|
|
1113
|
+
* Discord guild id.
|
|
1114
|
+
*/
|
|
1115
|
+
id: string;
|
|
1116
|
+
};
|
|
1117
|
+
path: {
|
|
1118
|
+
storeId: string;
|
|
1119
|
+
};
|
|
1120
|
+
query?: never;
|
|
1121
|
+
url: "/stores/{storeId}/app/discord/servers";
|
|
1122
|
+
};
|
|
1123
|
+
export type DeleteStoreDiscordServerErrors = {
|
|
1124
|
+
/**
|
|
1125
|
+
* Invalid JSON payload.
|
|
1126
|
+
*/
|
|
1127
|
+
400: DefaultError;
|
|
1128
|
+
/**
|
|
1129
|
+
* User not authenticated.
|
|
1130
|
+
*/
|
|
1131
|
+
401: DefaultError;
|
|
1132
|
+
/**
|
|
1133
|
+
* This store has expired.
|
|
1134
|
+
*/
|
|
1135
|
+
402: DefaultError;
|
|
1136
|
+
/**
|
|
1137
|
+
* Permission denied.
|
|
1138
|
+
*/
|
|
1139
|
+
403: DefaultError;
|
|
1140
|
+
/**
|
|
1141
|
+
* Unknown store.
|
|
1142
|
+
*/
|
|
1143
|
+
404: DefaultError;
|
|
1144
|
+
/**
|
|
1145
|
+
* Payload too large.
|
|
1146
|
+
*/
|
|
1147
|
+
413: DefaultError;
|
|
1148
|
+
/**
|
|
1149
|
+
* Unprocessable Entity
|
|
1150
|
+
*/
|
|
1151
|
+
422: DefaultError;
|
|
1152
|
+
};
|
|
1153
|
+
export type DeleteStoreDiscordServerError = DeleteStoreDiscordServerErrors[keyof DeleteStoreDiscordServerErrors];
|
|
1154
|
+
export type DeleteStoreDiscordServerResponses = {
|
|
1155
|
+
/**
|
|
1156
|
+
* Discord guild removed successfully.
|
|
1157
|
+
*/
|
|
1158
|
+
204: void;
|
|
1159
|
+
};
|
|
1160
|
+
export type DeleteStoreDiscordServerResponse = DeleteStoreDiscordServerResponses[keyof DeleteStoreDiscordServerResponses];
|
|
1161
|
+
export type GetStoreDiscordServersData = {
|
|
1162
|
+
body?: never;
|
|
1163
|
+
path: {
|
|
1164
|
+
storeId: string;
|
|
1165
|
+
};
|
|
1166
|
+
query?: never;
|
|
1167
|
+
url: "/stores/{storeId}/app/discord/servers";
|
|
1168
|
+
};
|
|
1169
|
+
export type GetStoreDiscordServersErrors = {
|
|
1170
|
+
/**
|
|
1171
|
+
* User not authenticated.
|
|
1172
|
+
*/
|
|
1173
|
+
401: DefaultError;
|
|
1174
|
+
/**
|
|
1175
|
+
* This store has expired.
|
|
1176
|
+
*/
|
|
1177
|
+
402: DefaultError;
|
|
1178
|
+
/**
|
|
1179
|
+
* Permission denied.
|
|
1180
|
+
*/
|
|
1181
|
+
403: DefaultError;
|
|
1182
|
+
/**
|
|
1183
|
+
* Unknown store.
|
|
1184
|
+
*/
|
|
1185
|
+
404: DefaultError;
|
|
1186
|
+
};
|
|
1187
|
+
export type GetStoreDiscordServersError = GetStoreDiscordServersErrors[keyof GetStoreDiscordServersErrors];
|
|
1188
|
+
export type GetStoreDiscordServersResponses = {
|
|
1189
|
+
/**
|
|
1190
|
+
* Discord guilds listed successfully.
|
|
1191
|
+
*/
|
|
1192
|
+
200: unknown;
|
|
1193
|
+
};
|
|
1194
|
+
export type UpdateStoreDiscordBotTokenData = {
|
|
1195
|
+
body?: {
|
|
1196
|
+
/**
|
|
1197
|
+
* Discord bot token.
|
|
1198
|
+
*/
|
|
1199
|
+
token: string;
|
|
1200
|
+
};
|
|
1201
|
+
path: {
|
|
1202
|
+
storeId: string;
|
|
1203
|
+
};
|
|
1204
|
+
query?: never;
|
|
1205
|
+
url: "/stores/{storeId}/app/discord/token";
|
|
1206
|
+
};
|
|
1207
|
+
export type UpdateStoreDiscordBotTokenErrors = {
|
|
1208
|
+
/**
|
|
1209
|
+
* Invalid JSON payload.
|
|
1210
|
+
*/
|
|
1211
|
+
400: DefaultError;
|
|
1212
|
+
/**
|
|
1213
|
+
* User not authenticated.
|
|
1214
|
+
*/
|
|
1215
|
+
401: DefaultError;
|
|
1216
|
+
/**
|
|
1217
|
+
* This store has expired.
|
|
1218
|
+
*/
|
|
1219
|
+
402: DefaultError;
|
|
1220
|
+
/**
|
|
1221
|
+
* Permission denied.
|
|
1222
|
+
*/
|
|
1223
|
+
403: DefaultError;
|
|
1224
|
+
/**
|
|
1225
|
+
* Unknown store.
|
|
1226
|
+
*/
|
|
1227
|
+
404: DefaultError;
|
|
1228
|
+
/**
|
|
1229
|
+
* Bot already configured.
|
|
1230
|
+
*/
|
|
1231
|
+
409: DefaultError;
|
|
1232
|
+
/**
|
|
1233
|
+
* Payload too large.
|
|
1234
|
+
*/
|
|
1235
|
+
413: DefaultError;
|
|
1236
|
+
/**
|
|
1237
|
+
* Unprocessable Entity
|
|
1238
|
+
*/
|
|
1239
|
+
422: DefaultError;
|
|
1240
|
+
};
|
|
1241
|
+
export type UpdateStoreDiscordBotTokenError = UpdateStoreDiscordBotTokenErrors[keyof UpdateStoreDiscordBotTokenErrors];
|
|
1242
|
+
export type UpdateStoreDiscordBotTokenResponses = {
|
|
1243
|
+
/**
|
|
1244
|
+
* Discord bot token updated successfully.
|
|
1245
|
+
*/
|
|
1246
|
+
204: void;
|
|
1247
|
+
};
|
|
1248
|
+
export type UpdateStoreDiscordBotTokenResponse = UpdateStoreDiscordBotTokenResponses[keyof UpdateStoreDiscordBotTokenResponses];
|
|
1249
|
+
export type DeleteStoreCouponData = {
|
|
1250
|
+
body?: never;
|
|
1251
|
+
path: {
|
|
1252
|
+
storeId: string;
|
|
1253
|
+
couponId: string;
|
|
1254
|
+
};
|
|
1255
|
+
query?: never;
|
|
1256
|
+
url: "/stores/{storeId}/coupons/{couponId}";
|
|
1257
|
+
};
|
|
1258
|
+
export type DeleteStoreCouponErrors = {
|
|
1259
|
+
/**
|
|
1260
|
+
* User not authenticated.
|
|
1261
|
+
*/
|
|
1262
|
+
401: DefaultError;
|
|
1263
|
+
/**
|
|
1264
|
+
* This store has expired.
|
|
1265
|
+
*/
|
|
1266
|
+
402: DefaultError;
|
|
1267
|
+
/**
|
|
1268
|
+
* Permission denied.
|
|
1269
|
+
*/
|
|
1270
|
+
403: DefaultError;
|
|
1271
|
+
/**
|
|
1272
|
+
* Unknown store.
|
|
1273
|
+
*/
|
|
1274
|
+
404: DefaultError;
|
|
1275
|
+
};
|
|
1276
|
+
export type DeleteStoreCouponError = DeleteStoreCouponErrors[keyof DeleteStoreCouponErrors];
|
|
1277
|
+
export type DeleteStoreCouponResponses = {
|
|
1278
|
+
/**
|
|
1279
|
+
* Coupon deleted successfully.
|
|
1280
|
+
*/
|
|
1281
|
+
204: void;
|
|
1282
|
+
};
|
|
1283
|
+
export type DeleteStoreCouponResponse = DeleteStoreCouponResponses[keyof DeleteStoreCouponResponses];
|
|
1284
|
+
export type GetStoreCouponData = {
|
|
1285
|
+
body?: never;
|
|
1286
|
+
path: {
|
|
1287
|
+
storeId: string;
|
|
1288
|
+
couponId: string;
|
|
1289
|
+
};
|
|
1290
|
+
query?: never;
|
|
1291
|
+
url: "/stores/{storeId}/coupons/{couponId}";
|
|
1292
|
+
};
|
|
1293
|
+
export type GetStoreCouponErrors = {
|
|
1294
|
+
/**
|
|
1295
|
+
* User not authenticated.
|
|
1296
|
+
*/
|
|
1297
|
+
401: DefaultError;
|
|
1298
|
+
/**
|
|
1299
|
+
* This store has expired.
|
|
1300
|
+
*/
|
|
1301
|
+
402: DefaultError;
|
|
1302
|
+
/**
|
|
1303
|
+
* Permission denied.
|
|
1304
|
+
*/
|
|
1305
|
+
403: DefaultError;
|
|
1306
|
+
/**
|
|
1307
|
+
* Unknown store.
|
|
1308
|
+
*/
|
|
1309
|
+
404: DefaultError;
|
|
1310
|
+
};
|
|
1311
|
+
export type GetStoreCouponError = GetStoreCouponErrors[keyof GetStoreCouponErrors];
|
|
1312
|
+
export type GetStoreCouponResponses = {
|
|
1313
|
+
/**
|
|
1314
|
+
* Coupon returned successfully.
|
|
1315
|
+
*/
|
|
1316
|
+
200: unknown;
|
|
1317
|
+
};
|
|
1318
|
+
export type UpdateStoreCouponData = {
|
|
1319
|
+
body?: {
|
|
1320
|
+
/**
|
|
1321
|
+
* Coupon code. Only letters and numbers are allowed.
|
|
1322
|
+
*/
|
|
1323
|
+
name?: string;
|
|
1324
|
+
type?: "value" | "percentage";
|
|
1325
|
+
/**
|
|
1326
|
+
* Coupon discount value. Percentage coupons accept 1 to 100; value coupons accept up to 999999.
|
|
1327
|
+
*/
|
|
1328
|
+
value?: number;
|
|
1329
|
+
/**
|
|
1330
|
+
* Total uses available for this coupon.
|
|
1331
|
+
*/
|
|
1332
|
+
amount?: number;
|
|
1333
|
+
/**
|
|
1334
|
+
* Minimum order value required to use this coupon.
|
|
1335
|
+
*/
|
|
1336
|
+
min_value?: number;
|
|
1337
|
+
expires_at?: string | number;
|
|
1338
|
+
/**
|
|
1339
|
+
* Maximum uses per user.
|
|
1340
|
+
*/
|
|
1341
|
+
max_uses_per_user?: number;
|
|
1342
|
+
only_first_buy?: boolean;
|
|
1343
|
+
/**
|
|
1344
|
+
* Product ids allowed for this coupon.
|
|
1345
|
+
*/
|
|
1346
|
+
products?: Array<number>;
|
|
1347
|
+
/**
|
|
1348
|
+
* Discord role ids allowed for this coupon.
|
|
1349
|
+
*/
|
|
1350
|
+
discord_roles?: Array<string>;
|
|
1351
|
+
};
|
|
1352
|
+
path: {
|
|
1353
|
+
storeId: string;
|
|
1354
|
+
couponId: string;
|
|
1355
|
+
};
|
|
1356
|
+
query?: never;
|
|
1357
|
+
url: "/stores/{storeId}/coupons/{couponId}";
|
|
1358
|
+
};
|
|
1359
|
+
export type UpdateStoreCouponErrors = {
|
|
1360
|
+
/**
|
|
1361
|
+
* Invalid JSON payload.
|
|
1362
|
+
*/
|
|
1363
|
+
400: DefaultError;
|
|
1364
|
+
/**
|
|
1365
|
+
* User not authenticated.
|
|
1366
|
+
*/
|
|
1367
|
+
401: DefaultError;
|
|
1368
|
+
/**
|
|
1369
|
+
* This store has expired.
|
|
1370
|
+
*/
|
|
1371
|
+
402: DefaultError;
|
|
1372
|
+
/**
|
|
1373
|
+
* Permission denied.
|
|
1374
|
+
*/
|
|
1375
|
+
403: DefaultError;
|
|
1376
|
+
/**
|
|
1377
|
+
* Not Found
|
|
1378
|
+
*/
|
|
1379
|
+
404: DefaultError;
|
|
1380
|
+
/**
|
|
1381
|
+
* Payload too large.
|
|
1382
|
+
*/
|
|
1383
|
+
413: DefaultError;
|
|
1384
|
+
/**
|
|
1385
|
+
* Unprocessable Entity
|
|
1386
|
+
*/
|
|
1387
|
+
422: DefaultError;
|
|
1388
|
+
};
|
|
1389
|
+
export type UpdateStoreCouponError = UpdateStoreCouponErrors[keyof UpdateStoreCouponErrors];
|
|
1390
|
+
export type UpdateStoreCouponResponses = {
|
|
1391
|
+
/**
|
|
1392
|
+
* Coupon updated successfully.
|
|
1393
|
+
*/
|
|
1394
|
+
204: void;
|
|
1395
|
+
};
|
|
1396
|
+
export type UpdateStoreCouponResponse = UpdateStoreCouponResponses[keyof UpdateStoreCouponResponses];
|
|
1397
|
+
export type GetStoreCouponsData = {
|
|
1398
|
+
body?: never;
|
|
1399
|
+
path: {
|
|
1400
|
+
storeId: string;
|
|
1401
|
+
};
|
|
1402
|
+
query?: never;
|
|
1403
|
+
url: "/stores/{storeId}/coupons";
|
|
1404
|
+
};
|
|
1405
|
+
export type GetStoreCouponsErrors = {
|
|
1406
|
+
/**
|
|
1407
|
+
* User not authenticated.
|
|
1408
|
+
*/
|
|
1409
|
+
401: DefaultError;
|
|
1410
|
+
/**
|
|
1411
|
+
* This store has expired.
|
|
1412
|
+
*/
|
|
1413
|
+
402: DefaultError;
|
|
1414
|
+
/**
|
|
1415
|
+
* Permission denied.
|
|
1416
|
+
*/
|
|
1417
|
+
403: DefaultError;
|
|
1418
|
+
/**
|
|
1419
|
+
* Unknown store.
|
|
1420
|
+
*/
|
|
1421
|
+
404: DefaultError;
|
|
1422
|
+
};
|
|
1423
|
+
export type GetStoreCouponsError = GetStoreCouponsErrors[keyof GetStoreCouponsErrors];
|
|
1424
|
+
export type GetStoreCouponsResponses = {
|
|
1425
|
+
/**
|
|
1426
|
+
* Coupons listed successfully.
|
|
1427
|
+
*/
|
|
1428
|
+
200: unknown;
|
|
1429
|
+
};
|
|
1430
|
+
export type CreateStoreCouponData = {
|
|
1431
|
+
body?: {
|
|
1432
|
+
/**
|
|
1433
|
+
* Coupon code. Only letters and numbers are allowed.
|
|
1434
|
+
*/
|
|
1435
|
+
name: string;
|
|
1436
|
+
type: "value" | "percentage";
|
|
1437
|
+
/**
|
|
1438
|
+
* Coupon discount value. Percentage coupons accept 1 to 100; value coupons accept up to 999999.
|
|
1439
|
+
*/
|
|
1440
|
+
value: number;
|
|
1441
|
+
/**
|
|
1442
|
+
* Total uses available for this coupon.
|
|
1443
|
+
*/
|
|
1444
|
+
amount: number;
|
|
1445
|
+
/**
|
|
1446
|
+
* Minimum order value required to use this coupon.
|
|
1447
|
+
*/
|
|
1448
|
+
min_value: number;
|
|
1449
|
+
/**
|
|
1450
|
+
* Expiration timestamp in milliseconds, or 0 for no expiration.
|
|
1451
|
+
*/
|
|
1452
|
+
expires_at: number;
|
|
1453
|
+
/**
|
|
1454
|
+
* Maximum uses per user.
|
|
1455
|
+
*/
|
|
1456
|
+
max_uses_per_user: number;
|
|
1457
|
+
only_first_buy: boolean;
|
|
1458
|
+
};
|
|
1459
|
+
path: {
|
|
1460
|
+
storeId: string;
|
|
1461
|
+
};
|
|
1462
|
+
query?: never;
|
|
1463
|
+
url: "/stores/{storeId}/coupons";
|
|
1464
|
+
};
|
|
1465
|
+
export type CreateStoreCouponErrors = {
|
|
1466
|
+
/**
|
|
1467
|
+
* Invalid JSON payload.
|
|
1468
|
+
*/
|
|
1469
|
+
400: DefaultError;
|
|
1470
|
+
/**
|
|
1471
|
+
* User not authenticated.
|
|
1472
|
+
*/
|
|
1473
|
+
401: DefaultError;
|
|
1474
|
+
/**
|
|
1475
|
+
* This store has expired.
|
|
1476
|
+
*/
|
|
1477
|
+
402: DefaultError;
|
|
1478
|
+
/**
|
|
1479
|
+
* Permission denied.
|
|
1480
|
+
*/
|
|
1481
|
+
403: DefaultError;
|
|
1482
|
+
/**
|
|
1483
|
+
* Unknown store.
|
|
1484
|
+
*/
|
|
1485
|
+
404: DefaultError;
|
|
1486
|
+
/**
|
|
1487
|
+
* Payload too large.
|
|
1488
|
+
*/
|
|
1489
|
+
413: DefaultError;
|
|
1490
|
+
/**
|
|
1491
|
+
* Unprocessable Entity
|
|
1492
|
+
*/
|
|
1493
|
+
422: DefaultError;
|
|
1494
|
+
};
|
|
1495
|
+
export type CreateStoreCouponError = CreateStoreCouponErrors[keyof CreateStoreCouponErrors];
|
|
1496
|
+
export type CreateStoreCouponResponses = {
|
|
1497
|
+
/**
|
|
1498
|
+
* Coupon created successfully.
|
|
1499
|
+
*/
|
|
1500
|
+
200: {
|
|
1501
|
+
/**
|
|
1502
|
+
* Coupon ID.
|
|
1503
|
+
*/
|
|
1504
|
+
id: number;
|
|
1505
|
+
};
|
|
1506
|
+
};
|
|
1507
|
+
export type CreateStoreCouponResponse = CreateStoreCouponResponses[keyof CreateStoreCouponResponses];
|
|
1508
|
+
export type CreateStoreEditOrderData = {
|
|
1509
|
+
body?: {
|
|
1510
|
+
/**
|
|
1511
|
+
* Store addons to add.
|
|
1512
|
+
*/
|
|
1513
|
+
addons?: Array<"custom_bot" | "divulgation" | "antiraid" | "managed_automod">;
|
|
1514
|
+
/**
|
|
1515
|
+
* Store limits to increase.
|
|
1516
|
+
*/
|
|
1517
|
+
limits?: {
|
|
1518
|
+
/**
|
|
1519
|
+
* Discord server limit to set.
|
|
1520
|
+
*/
|
|
1521
|
+
discord_server?: number;
|
|
1522
|
+
/**
|
|
1523
|
+
* Product limit to set.
|
|
1524
|
+
*/
|
|
1525
|
+
product?: number;
|
|
1526
|
+
};
|
|
1527
|
+
};
|
|
1528
|
+
path: {
|
|
1529
|
+
storeId: string;
|
|
1530
|
+
};
|
|
1531
|
+
query?: never;
|
|
1532
|
+
url: "/stores/{storeId}/financial/edit";
|
|
1533
|
+
};
|
|
1534
|
+
export type CreateStoreEditOrderErrors = {
|
|
1535
|
+
/**
|
|
1536
|
+
* Invalid JSON payload.
|
|
1537
|
+
*/
|
|
1538
|
+
400: DefaultError;
|
|
1539
|
+
/**
|
|
1540
|
+
* User not authenticated.
|
|
1541
|
+
*/
|
|
1542
|
+
401: DefaultError;
|
|
1543
|
+
/**
|
|
1544
|
+
* This store has expired.
|
|
1545
|
+
*/
|
|
1546
|
+
402: DefaultError;
|
|
1547
|
+
/**
|
|
1548
|
+
* Forbidden
|
|
1549
|
+
*/
|
|
1550
|
+
403: DefaultError;
|
|
1551
|
+
/**
|
|
1552
|
+
* Not Found
|
|
1553
|
+
*/
|
|
1554
|
+
404: DefaultError;
|
|
1555
|
+
/**
|
|
1556
|
+
* Payload too large.
|
|
1557
|
+
*/
|
|
1558
|
+
413: DefaultError;
|
|
1559
|
+
/**
|
|
1560
|
+
* Unprocessable Entity
|
|
1561
|
+
*/
|
|
1562
|
+
422: DefaultError;
|
|
1563
|
+
/**
|
|
1564
|
+
* Unknown error.
|
|
1565
|
+
*/
|
|
1566
|
+
500: DefaultError;
|
|
1567
|
+
};
|
|
1568
|
+
export type CreateStoreEditOrderError = CreateStoreEditOrderErrors[keyof CreateStoreEditOrderErrors];
|
|
1569
|
+
export type CreateStoreEditOrderResponses = {
|
|
1570
|
+
/**
|
|
1571
|
+
* Store edit order created successfully.
|
|
1572
|
+
*/
|
|
1573
|
+
200: {
|
|
1574
|
+
/**
|
|
1575
|
+
* Payment transaction id.
|
|
1576
|
+
*/
|
|
1577
|
+
id: string;
|
|
1578
|
+
};
|
|
1579
|
+
};
|
|
1580
|
+
export type CreateStoreEditOrderResponse = CreateStoreEditOrderResponses[keyof CreateStoreEditOrderResponses];
|
|
1581
|
+
export type CreateStoreRenewOrderData = {
|
|
1582
|
+
body?: {
|
|
1583
|
+
/**
|
|
1584
|
+
* Number of months to renew the store.
|
|
1585
|
+
*/
|
|
1586
|
+
months: number;
|
|
1587
|
+
};
|
|
1588
|
+
path: {
|
|
1589
|
+
storeId: string;
|
|
1590
|
+
};
|
|
1591
|
+
query?: never;
|
|
1592
|
+
url: "/stores/{storeId}/financial/renew";
|
|
1593
|
+
};
|
|
1594
|
+
export type CreateStoreRenewOrderErrors = {
|
|
1595
|
+
/**
|
|
1596
|
+
* Invalid JSON payload.
|
|
1597
|
+
*/
|
|
1598
|
+
400: DefaultError;
|
|
1599
|
+
/**
|
|
1600
|
+
* User not authenticated.
|
|
1601
|
+
*/
|
|
1602
|
+
401: DefaultError;
|
|
1603
|
+
/**
|
|
1604
|
+
* This store has expired.
|
|
1605
|
+
*/
|
|
1606
|
+
402: DefaultError;
|
|
1607
|
+
/**
|
|
1608
|
+
* Forbidden
|
|
1609
|
+
*/
|
|
1610
|
+
403: DefaultError;
|
|
1611
|
+
/**
|
|
1612
|
+
* Not Found
|
|
1613
|
+
*/
|
|
1614
|
+
404: DefaultError;
|
|
1615
|
+
/**
|
|
1616
|
+
* Payload too large.
|
|
1617
|
+
*/
|
|
1618
|
+
413: DefaultError;
|
|
1619
|
+
/**
|
|
1620
|
+
* Unprocessable Entity
|
|
1621
|
+
*/
|
|
1622
|
+
422: DefaultError;
|
|
1623
|
+
/**
|
|
1624
|
+
* Unknown error.
|
|
1625
|
+
*/
|
|
1626
|
+
500: DefaultError;
|
|
1627
|
+
};
|
|
1628
|
+
export type CreateStoreRenewOrderError = CreateStoreRenewOrderErrors[keyof CreateStoreRenewOrderErrors];
|
|
1629
|
+
export type CreateStoreRenewOrderResponses = {
|
|
1630
|
+
/**
|
|
1631
|
+
* Store renew order created successfully.
|
|
1632
|
+
*/
|
|
1633
|
+
200: {
|
|
1634
|
+
/**
|
|
1635
|
+
* Payment transaction id.
|
|
1636
|
+
*/
|
|
1637
|
+
id: string;
|
|
1638
|
+
};
|
|
1639
|
+
};
|
|
1640
|
+
export type CreateStoreRenewOrderResponse = CreateStoreRenewOrderResponses[keyof CreateStoreRenewOrderResponses];
|
|
1641
|
+
export type DeleteStoreMediaData = {
|
|
1642
|
+
body?: {
|
|
1643
|
+
store?: Array<"banner" | "icon" | "background_ranking" | "banner_sale_approved">;
|
|
1644
|
+
/**
|
|
1645
|
+
* Construct a type with a set of properties K of type T
|
|
1646
|
+
*/
|
|
1647
|
+
products?: {
|
|
1648
|
+
[key: string]: Array<"banner" | "icon">;
|
|
1649
|
+
};
|
|
1650
|
+
/**
|
|
1651
|
+
* Construct a type with a set of properties K of type T
|
|
1652
|
+
*/
|
|
1653
|
+
discord_sale_panels?: {
|
|
1654
|
+
[key: string]: Array<"banner" | "icon">;
|
|
1655
|
+
};
|
|
1656
|
+
};
|
|
1657
|
+
path: {
|
|
1658
|
+
storeId: string;
|
|
1659
|
+
};
|
|
1660
|
+
query?: never;
|
|
1661
|
+
url: "/stores/{storeId}/media";
|
|
1662
|
+
};
|
|
1663
|
+
export type DeleteStoreMediaErrors = {
|
|
1664
|
+
/**
|
|
1665
|
+
* Invalid JSON payload.
|
|
1666
|
+
*/
|
|
1667
|
+
400: DefaultError;
|
|
1668
|
+
/**
|
|
1669
|
+
* User not authenticated.
|
|
1670
|
+
*/
|
|
1671
|
+
401: DefaultError;
|
|
1672
|
+
/**
|
|
1673
|
+
* This store has expired.
|
|
1674
|
+
*/
|
|
1675
|
+
402: DefaultError;
|
|
1676
|
+
/**
|
|
1677
|
+
* Permission denied.
|
|
1678
|
+
*/
|
|
1679
|
+
403: DefaultError;
|
|
1680
|
+
/**
|
|
1681
|
+
* Unknown store.
|
|
1682
|
+
*/
|
|
1683
|
+
404: DefaultError;
|
|
1684
|
+
/**
|
|
1685
|
+
* Payload too large.
|
|
1686
|
+
*/
|
|
1687
|
+
413: DefaultError;
|
|
1688
|
+
};
|
|
1689
|
+
export type DeleteStoreMediaError = DeleteStoreMediaErrors[keyof DeleteStoreMediaErrors];
|
|
1690
|
+
export type DeleteStoreMediaResponses = {
|
|
1691
|
+
/**
|
|
1692
|
+
* Media detached successfully.
|
|
1693
|
+
*/
|
|
1694
|
+
204: void;
|
|
1695
|
+
};
|
|
1696
|
+
export type DeleteStoreMediaResponse = DeleteStoreMediaResponses[keyof DeleteStoreMediaResponses];
|
|
1697
|
+
export type UploadStoreMediaData = {
|
|
1698
|
+
body?: {
|
|
1699
|
+
file: Blob | File;
|
|
1700
|
+
set: {
|
|
1701
|
+
store?: Array<"banner" | "icon" | "background_ranking" | "banner_sale_approved">;
|
|
1702
|
+
/**
|
|
1703
|
+
* Construct a type with a set of properties K of type T
|
|
1704
|
+
*/
|
|
1705
|
+
products?: {
|
|
1706
|
+
[key: string]: Array<"banner" | "icon">;
|
|
1707
|
+
};
|
|
1708
|
+
/**
|
|
1709
|
+
* Construct a type with a set of properties K of type T
|
|
1710
|
+
*/
|
|
1711
|
+
discord_sale_panels?: {
|
|
1712
|
+
[key: string]: Array<"banner" | "icon">;
|
|
1713
|
+
};
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
path: {
|
|
1717
|
+
storeId: string;
|
|
1718
|
+
};
|
|
1719
|
+
query?: never;
|
|
1720
|
+
url: "/stores/{storeId}/media";
|
|
1721
|
+
};
|
|
1722
|
+
export type UploadStoreMediaErrors = {
|
|
1723
|
+
/**
|
|
1724
|
+
* Invalid Multipart payload.
|
|
1725
|
+
*/
|
|
1726
|
+
400: DefaultError;
|
|
1727
|
+
/**
|
|
1728
|
+
* User not authenticated.
|
|
1729
|
+
*/
|
|
1730
|
+
401: DefaultError;
|
|
1731
|
+
/**
|
|
1732
|
+
* This store has expired.
|
|
1733
|
+
*/
|
|
1734
|
+
402: DefaultError;
|
|
1735
|
+
/**
|
|
1736
|
+
* Permission denied.
|
|
1737
|
+
*/
|
|
1738
|
+
403: DefaultError;
|
|
1739
|
+
/**
|
|
1740
|
+
* Unknown store.
|
|
1741
|
+
*/
|
|
1742
|
+
404: DefaultError;
|
|
1743
|
+
/**
|
|
1744
|
+
* Payload too large.
|
|
1745
|
+
*/
|
|
1746
|
+
413: DefaultError;
|
|
1747
|
+
/**
|
|
1748
|
+
* Unsupported Media Type
|
|
1749
|
+
*/
|
|
1750
|
+
415: DefaultError;
|
|
1751
|
+
};
|
|
1752
|
+
export type UploadStoreMediaError = UploadStoreMediaErrors[keyof UploadStoreMediaErrors];
|
|
1753
|
+
export type UploadStoreMediaResponses = {
|
|
1754
|
+
/**
|
|
1755
|
+
* Media uploaded successfully.
|
|
1756
|
+
*/
|
|
1757
|
+
201: {
|
|
1758
|
+
/**
|
|
1759
|
+
* Uploaded media hash.
|
|
1760
|
+
*/
|
|
1761
|
+
hash: string;
|
|
1762
|
+
};
|
|
1763
|
+
};
|
|
1764
|
+
export type UploadStoreMediaResponse = UploadStoreMediaResponses[keyof UploadStoreMediaResponses];
|
|
1765
|
+
export type RemoveStoreModeratorData = {
|
|
1766
|
+
body?: never;
|
|
1767
|
+
path: {
|
|
1768
|
+
storeId: string;
|
|
1769
|
+
modId: string;
|
|
1770
|
+
};
|
|
1771
|
+
query?: never;
|
|
1772
|
+
url: "/stores/{storeId}/moderators/{modId}";
|
|
1773
|
+
};
|
|
1774
|
+
export type RemoveStoreModeratorErrors = {
|
|
1775
|
+
/**
|
|
1776
|
+
* User not authenticated.
|
|
1777
|
+
*/
|
|
1778
|
+
401: DefaultError;
|
|
1779
|
+
/**
|
|
1780
|
+
* This store has expired.
|
|
1781
|
+
*/
|
|
1782
|
+
402: DefaultError;
|
|
1783
|
+
/**
|
|
1784
|
+
* Permission denied.
|
|
1785
|
+
*/
|
|
1786
|
+
403: DefaultError;
|
|
1787
|
+
/**
|
|
1788
|
+
* Not Found
|
|
1789
|
+
*/
|
|
1790
|
+
404: DefaultError;
|
|
1791
|
+
};
|
|
1792
|
+
export type RemoveStoreModeratorError = RemoveStoreModeratorErrors[keyof RemoveStoreModeratorErrors];
|
|
1793
|
+
export type RemoveStoreModeratorResponses = {
|
|
1794
|
+
/**
|
|
1795
|
+
* Moderator deleted successfully.
|
|
1796
|
+
*/
|
|
1797
|
+
204: void;
|
|
1798
|
+
};
|
|
1799
|
+
export type RemoveStoreModeratorResponse = RemoveStoreModeratorResponses[keyof RemoveStoreModeratorResponses];
|
|
1800
|
+
export type EditStoreModeratorData = {
|
|
1801
|
+
body?: {
|
|
1802
|
+
/**
|
|
1803
|
+
* Permissions granted to the moderator.
|
|
1804
|
+
*/
|
|
1805
|
+
permissions: Array<"MANAGE_DISCORD_PANELS" | "MANAGE_PRODUCTS" | "MANAGE_COUPONS" | "MANAGE_STORE" | "MANAGE_SALES" | "VIEW_STATISTICS" | "VIEW_DISCKETS" | "MANAGE_DISCKETS">;
|
|
1806
|
+
};
|
|
1807
|
+
path: {
|
|
1808
|
+
storeId: string;
|
|
1809
|
+
modId: string;
|
|
1810
|
+
};
|
|
1811
|
+
query?: never;
|
|
1812
|
+
url: "/stores/{storeId}/moderators/{modId}";
|
|
1813
|
+
};
|
|
1814
|
+
export type EditStoreModeratorErrors = {
|
|
1815
|
+
/**
|
|
1816
|
+
* Invalid JSON payload.
|
|
1817
|
+
*/
|
|
1818
|
+
400: DefaultError;
|
|
1819
|
+
/**
|
|
1820
|
+
* User not authenticated.
|
|
1821
|
+
*/
|
|
1822
|
+
401: DefaultError;
|
|
1823
|
+
/**
|
|
1824
|
+
* This store has expired.
|
|
1825
|
+
*/
|
|
1826
|
+
402: DefaultError;
|
|
1827
|
+
/**
|
|
1828
|
+
* Permission denied.
|
|
1829
|
+
*/
|
|
1830
|
+
403: DefaultError;
|
|
1831
|
+
/**
|
|
1832
|
+
* Not Found
|
|
1833
|
+
*/
|
|
1834
|
+
404: DefaultError;
|
|
1835
|
+
/**
|
|
1836
|
+
* Payload too large.
|
|
1837
|
+
*/
|
|
1838
|
+
413: DefaultError;
|
|
1839
|
+
/**
|
|
1840
|
+
* Invalid permissions.
|
|
1841
|
+
*/
|
|
1842
|
+
422: DefaultError;
|
|
1843
|
+
};
|
|
1844
|
+
export type EditStoreModeratorError = EditStoreModeratorErrors[keyof EditStoreModeratorErrors];
|
|
1845
|
+
export type EditStoreModeratorResponses = {
|
|
1846
|
+
/**
|
|
1847
|
+
* Moderator updated successfully.
|
|
1848
|
+
*/
|
|
1849
|
+
204: void;
|
|
1850
|
+
};
|
|
1851
|
+
export type EditStoreModeratorResponse = EditStoreModeratorResponses[keyof EditStoreModeratorResponses];
|
|
1852
|
+
export type AddModeratorToStoreData = {
|
|
1853
|
+
body?: {
|
|
1854
|
+
/**
|
|
1855
|
+
* Permissions granted to the invited moderator.
|
|
1856
|
+
*/
|
|
1857
|
+
permissions: Array<"MANAGE_DISCORD_PANELS" | "MANAGE_PRODUCTS" | "MANAGE_COUPONS" | "MANAGE_STORE" | "MANAGE_SALES" | "VIEW_STATISTICS" | "VIEW_DISCKETS" | "MANAGE_DISCKETS">;
|
|
1858
|
+
};
|
|
1859
|
+
path: {
|
|
1860
|
+
storeId: string;
|
|
1861
|
+
};
|
|
1862
|
+
query?: never;
|
|
1863
|
+
url: "/stores/{storeId}/moderators";
|
|
1864
|
+
};
|
|
1865
|
+
export type AddModeratorToStoreErrors = {
|
|
1866
|
+
/**
|
|
1867
|
+
* Invalid JSON payload.
|
|
1868
|
+
*/
|
|
1869
|
+
400: DefaultError;
|
|
1870
|
+
/**
|
|
1871
|
+
* User not authenticated.
|
|
1872
|
+
*/
|
|
1873
|
+
401: DefaultError;
|
|
1874
|
+
/**
|
|
1875
|
+
* This store has expired.
|
|
1876
|
+
*/
|
|
1877
|
+
402: DefaultError;
|
|
1878
|
+
/**
|
|
1879
|
+
* Permission denied.
|
|
1880
|
+
*/
|
|
1881
|
+
403: DefaultError;
|
|
1882
|
+
/**
|
|
1883
|
+
* Unknown store.
|
|
1884
|
+
*/
|
|
1885
|
+
404: DefaultError;
|
|
1886
|
+
/**
|
|
1887
|
+
* Conflict
|
|
1888
|
+
*/
|
|
1889
|
+
409: DefaultError;
|
|
1890
|
+
/**
|
|
1891
|
+
* Payload too large.
|
|
1892
|
+
*/
|
|
1893
|
+
413: DefaultError;
|
|
1894
|
+
/**
|
|
1895
|
+
* Invalid permissions.
|
|
1896
|
+
*/
|
|
1897
|
+
422: DefaultError;
|
|
1898
|
+
};
|
|
1899
|
+
export type AddModeratorToStoreError = AddModeratorToStoreErrors[keyof AddModeratorToStoreErrors];
|
|
1900
|
+
export type AddModeratorToStoreResponses = {
|
|
1901
|
+
/**
|
|
1902
|
+
* Moderator invite created successfully.
|
|
1903
|
+
*/
|
|
1904
|
+
200: {
|
|
1905
|
+
/**
|
|
1906
|
+
* Moderator invite code.
|
|
1907
|
+
*/
|
|
1908
|
+
code: string;
|
|
1909
|
+
};
|
|
1910
|
+
};
|
|
1911
|
+
export type AddModeratorToStoreResponse = AddModeratorToStoreResponses[keyof AddModeratorToStoreResponses];
|
|
1912
|
+
export type GetStoreRankingCustomersData = {
|
|
1913
|
+
body?: never;
|
|
1914
|
+
path: {
|
|
1915
|
+
storeId: string;
|
|
1916
|
+
};
|
|
1917
|
+
query?: {
|
|
1918
|
+
/**
|
|
1919
|
+
* Want to see the rankings from the last few days?
|
|
1920
|
+
*/
|
|
1921
|
+
days?: string;
|
|
1922
|
+
};
|
|
1923
|
+
url: "/stores/{storeId}/ranking/customers";
|
|
1924
|
+
};
|
|
1925
|
+
export type GetStoreRankingCustomersErrors = {
|
|
1926
|
+
/**
|
|
1927
|
+
* User not authenticated.
|
|
1928
|
+
*/
|
|
1929
|
+
401: DefaultError;
|
|
1930
|
+
/**
|
|
1931
|
+
* This store has expired.
|
|
1932
|
+
*/
|
|
1933
|
+
402: DefaultError;
|
|
1934
|
+
/**
|
|
1935
|
+
* Permission denied.
|
|
1936
|
+
*/
|
|
1937
|
+
403: DefaultError;
|
|
1938
|
+
/**
|
|
1939
|
+
* Unknown store.
|
|
1940
|
+
*/
|
|
1941
|
+
404: DefaultError;
|
|
1942
|
+
/**
|
|
1943
|
+
* Invalid ranking days.
|
|
1944
|
+
*/
|
|
1945
|
+
422: DefaultError;
|
|
1946
|
+
};
|
|
1947
|
+
export type GetStoreRankingCustomersError = GetStoreRankingCustomersErrors[keyof GetStoreRankingCustomersErrors];
|
|
1948
|
+
export type GetStoreRankingCustomersResponses = {
|
|
1949
|
+
/**
|
|
1950
|
+
* trade-offs e pontos conhecidos de falha:
|
|
1951
|
+
* 1. usuário pode comprar
|
|
1952
|
+
* 2. em cache atualiza o lastBuy com a data dessa compra.
|
|
1953
|
+
* 3. pedido é reembolsado
|
|
1954
|
+
* 4. continua considerando o antigo lastBuy
|
|
1955
|
+
*/
|
|
1956
|
+
200: Array<{
|
|
1957
|
+
id: number;
|
|
1958
|
+
count: number;
|
|
1959
|
+
value: number;
|
|
1960
|
+
firstBuy: number;
|
|
1961
|
+
lastBuy: number;
|
|
1962
|
+
}>;
|
|
1963
|
+
};
|
|
1964
|
+
export type GetStoreRankingCustomersResponse = GetStoreRankingCustomersResponses[keyof GetStoreRankingCustomersResponses];
|
|
1965
|
+
export type GetStoreStatsProductsData = {
|
|
1966
|
+
body?: never;
|
|
1967
|
+
path: {
|
|
1968
|
+
storeId: string;
|
|
1969
|
+
};
|
|
1970
|
+
query?: never;
|
|
1971
|
+
url: "/stores/{storeId}/stats/products";
|
|
1972
|
+
};
|
|
1973
|
+
export type GetStoreStatsProductsErrors = {
|
|
1974
|
+
/**
|
|
1975
|
+
* User not authenticated.
|
|
1976
|
+
*/
|
|
1977
|
+
401: DefaultError;
|
|
1978
|
+
/**
|
|
1979
|
+
* This store has expired.
|
|
1980
|
+
*/
|
|
1981
|
+
402: DefaultError;
|
|
1982
|
+
/**
|
|
1983
|
+
* Permission denied.
|
|
1984
|
+
*/
|
|
1985
|
+
403: DefaultError;
|
|
1986
|
+
/**
|
|
1987
|
+
* Unknown store.
|
|
1988
|
+
*/
|
|
1989
|
+
404: DefaultError;
|
|
1990
|
+
};
|
|
1991
|
+
export type GetStoreStatsProductsError = GetStoreStatsProductsErrors[keyof GetStoreStatsProductsErrors];
|
|
1992
|
+
export type GetStoreStatsProductsResponses = {
|
|
1993
|
+
/**
|
|
1994
|
+
* Store product statistics returned successfully.
|
|
1995
|
+
*/
|
|
1996
|
+
200: {
|
|
1997
|
+
total: {
|
|
1998
|
+
value: number;
|
|
1999
|
+
count: number;
|
|
2000
|
+
users: number;
|
|
2001
|
+
rating: null | number;
|
|
2002
|
+
};
|
|
2003
|
+
/**
|
|
2004
|
+
* Construct a type with a set of properties K of type T
|
|
2005
|
+
*/
|
|
2006
|
+
history: {
|
|
2007
|
+
[key: string]: {
|
|
2008
|
+
[key: string]: {
|
|
2009
|
+
value: number;
|
|
2010
|
+
count: number;
|
|
2011
|
+
users: number;
|
|
2012
|
+
rating: null | number;
|
|
2013
|
+
};
|
|
2014
|
+
};
|
|
2015
|
+
};
|
|
2016
|
+
};
|
|
2017
|
+
};
|
|
2018
|
+
export type GetStoreStatsProductsResponse = GetStoreStatsProductsResponses[keyof GetStoreStatsProductsResponses];
|
|
2019
|
+
export type GetStoreData = {
|
|
2020
|
+
body?: never;
|
|
2021
|
+
path: {
|
|
2022
|
+
storeId: string;
|
|
2023
|
+
};
|
|
2024
|
+
query?: never;
|
|
2025
|
+
url: "/stores/{storeId}";
|
|
2026
|
+
};
|
|
2027
|
+
export type GetStoreErrors = {
|
|
2028
|
+
/**
|
|
2029
|
+
* User not authenticated.
|
|
2030
|
+
*/
|
|
2031
|
+
401: DefaultError;
|
|
2032
|
+
/**
|
|
2033
|
+
* This store has expired.
|
|
2034
|
+
*/
|
|
2035
|
+
402: DefaultError;
|
|
2036
|
+
/**
|
|
2037
|
+
* Permission denied.
|
|
2038
|
+
*/
|
|
2039
|
+
403: DefaultError;
|
|
2040
|
+
/**
|
|
2041
|
+
* Unknown store.
|
|
2042
|
+
*/
|
|
2043
|
+
404: DefaultError;
|
|
2044
|
+
};
|
|
2045
|
+
export type GetStoreError = GetStoreErrors[keyof GetStoreErrors];
|
|
2046
|
+
export type GetStoreResponses = {
|
|
2047
|
+
/**
|
|
2048
|
+
* Store data returned successfully.
|
|
2049
|
+
*/
|
|
2050
|
+
200: {
|
|
2051
|
+
id: number;
|
|
2052
|
+
name: string;
|
|
2053
|
+
created_at: number;
|
|
2054
|
+
expires_at: number;
|
|
2055
|
+
owner_id: number;
|
|
2056
|
+
icon_id?: null | string;
|
|
2057
|
+
banner_id?: null | string;
|
|
2058
|
+
background_ranking_id?: null | string;
|
|
2059
|
+
banner_sale_approved_id?: null | string;
|
|
2060
|
+
blocked_banks?: null | Array<string>;
|
|
2061
|
+
addons: Array<"custom_bot" | "divulgation" | "antiraid" | "managed_automod">;
|
|
2062
|
+
limit_product: number;
|
|
2063
|
+
limit_discord_server: number;
|
|
2064
|
+
/**
|
|
2065
|
+
* Construct a type with a set of properties K of type T
|
|
2066
|
+
*/
|
|
2067
|
+
moderators: {
|
|
2068
|
+
[key: string]: {
|
|
2069
|
+
discord_user_id: string;
|
|
2070
|
+
username: string;
|
|
2071
|
+
permissions: Array<"MANAGE_DISCORD_PANELS" | "MANAGE_PRODUCTS" | "MANAGE_COUPONS" | "MANAGE_STORE" | "MANAGE_SALES" | "VIEW_STATISTICS" | "VIEW_DISCKETS" | "MANAGE_DISCKETS">;
|
|
2072
|
+
created_at: number;
|
|
2073
|
+
};
|
|
2074
|
+
};
|
|
2075
|
+
discord_bot: {
|
|
2076
|
+
id: string;
|
|
2077
|
+
cluster: string;
|
|
2078
|
+
};
|
|
2079
|
+
};
|
|
2080
|
+
};
|
|
2081
|
+
export type GetStoreResponse = GetStoreResponses[keyof GetStoreResponses];
|
|
2082
|
+
export type UpdateStoreData = {
|
|
2083
|
+
body?: {
|
|
2084
|
+
/**
|
|
2085
|
+
* Public name. Must be 3 to 50 valid characters.
|
|
2086
|
+
*/
|
|
2087
|
+
name?: string;
|
|
2088
|
+
blocked_banks?: Array<string>;
|
|
2089
|
+
};
|
|
2090
|
+
path: {
|
|
2091
|
+
storeId: string;
|
|
2092
|
+
};
|
|
2093
|
+
query?: never;
|
|
2094
|
+
url: "/stores/{storeId}";
|
|
2095
|
+
};
|
|
2096
|
+
export type UpdateStoreErrors = {
|
|
2097
|
+
/**
|
|
2098
|
+
* Invalid JSON payload.
|
|
2099
|
+
*/
|
|
2100
|
+
400: DefaultError;
|
|
2101
|
+
/**
|
|
2102
|
+
* User not authenticated.
|
|
2103
|
+
*/
|
|
2104
|
+
401: DefaultError;
|
|
2105
|
+
/**
|
|
2106
|
+
* This store has expired.
|
|
2107
|
+
*/
|
|
2108
|
+
402: DefaultError;
|
|
2109
|
+
/**
|
|
2110
|
+
* Permission denied.
|
|
2111
|
+
*/
|
|
2112
|
+
403: DefaultError;
|
|
2113
|
+
/**
|
|
2114
|
+
* Unknown store.
|
|
2115
|
+
*/
|
|
2116
|
+
404: DefaultError;
|
|
2117
|
+
/**
|
|
2118
|
+
* Payload too large.
|
|
2119
|
+
*/
|
|
2120
|
+
413: DefaultError;
|
|
2121
|
+
/**
|
|
2122
|
+
* Unprocessable Entity
|
|
2123
|
+
*/
|
|
2124
|
+
422: DefaultError;
|
|
2125
|
+
};
|
|
2126
|
+
export type UpdateStoreError = UpdateStoreErrors[keyof UpdateStoreErrors];
|
|
2127
|
+
export type UpdateStoreResponses = {
|
|
2128
|
+
/**
|
|
2129
|
+
* Store updated successfully.
|
|
2130
|
+
*/
|
|
2131
|
+
204: void;
|
|
2132
|
+
};
|
|
2133
|
+
export type UpdateStoreResponse = UpdateStoreResponses[keyof UpdateStoreResponses];
|
|
2134
|
+
export type GetStoresData = {
|
|
2135
|
+
body?: never;
|
|
2136
|
+
path?: never;
|
|
2137
|
+
query?: never;
|
|
2138
|
+
url: "/stores";
|
|
2139
|
+
};
|
|
2140
|
+
export type GetStoresErrors = {
|
|
2141
|
+
/**
|
|
2142
|
+
* User not authenticated.
|
|
2143
|
+
*/
|
|
2144
|
+
401: DefaultError;
|
|
2145
|
+
};
|
|
2146
|
+
export type GetStoresError = GetStoresErrors[keyof GetStoresErrors];
|
|
2147
|
+
export type GetStoresResponses = {
|
|
2148
|
+
/**
|
|
2149
|
+
* Stores listed successfully.
|
|
2150
|
+
*/
|
|
2151
|
+
200: Array<{
|
|
2152
|
+
id: number;
|
|
2153
|
+
name: string;
|
|
2154
|
+
created_at: number;
|
|
2155
|
+
expires_at: number;
|
|
2156
|
+
icon_id: null | string;
|
|
2157
|
+
banner_id: null | string;
|
|
2158
|
+
is_owner: boolean;
|
|
2159
|
+
}>;
|
|
2160
|
+
};
|
|
2161
|
+
export type GetStoresResponse = GetStoresResponses[keyof GetStoresResponses];
|
|
2162
|
+
export type CreateStoreData = {
|
|
2163
|
+
body?: {
|
|
2164
|
+
/**
|
|
2165
|
+
* Public name. Must be 3 to 50 valid characters.
|
|
2166
|
+
*/
|
|
2167
|
+
name: string;
|
|
2168
|
+
};
|
|
2169
|
+
path?: never;
|
|
2170
|
+
query?: never;
|
|
2171
|
+
url: "/stores";
|
|
2172
|
+
};
|
|
2173
|
+
export type CreateStoreErrors = {
|
|
2174
|
+
/**
|
|
2175
|
+
* Invalid JSON payload.
|
|
2176
|
+
*/
|
|
2177
|
+
400: DefaultError;
|
|
2178
|
+
/**
|
|
2179
|
+
* User not authenticated.
|
|
2180
|
+
*/
|
|
2181
|
+
401: DefaultError;
|
|
2182
|
+
/**
|
|
2183
|
+
* PIX not configured.
|
|
2184
|
+
*/
|
|
2185
|
+
403: DefaultError;
|
|
2186
|
+
/**
|
|
2187
|
+
* Not Found
|
|
2188
|
+
*/
|
|
2189
|
+
404: DefaultError;
|
|
2190
|
+
/**
|
|
2191
|
+
* Payload too large.
|
|
2192
|
+
*/
|
|
2193
|
+
413: DefaultError;
|
|
2194
|
+
/**
|
|
2195
|
+
* Unprocessable Entity
|
|
2196
|
+
*/
|
|
2197
|
+
422: DefaultError;
|
|
2198
|
+
/**
|
|
2199
|
+
* Unknown error.
|
|
2200
|
+
*/
|
|
2201
|
+
500: DefaultError;
|
|
2202
|
+
};
|
|
2203
|
+
export type CreateStoreError = CreateStoreErrors[keyof CreateStoreErrors];
|
|
2204
|
+
export type CreateStoreResponses = {
|
|
2205
|
+
/**
|
|
2206
|
+
* Store checkout order created successfully.
|
|
2207
|
+
*/
|
|
2208
|
+
200: {
|
|
2209
|
+
id: string;
|
|
2210
|
+
};
|
|
2211
|
+
};
|
|
2212
|
+
export type CreateStoreResponse = CreateStoreResponses[keyof CreateStoreResponses];
|
|
2213
|
+
export type ListTransactionsData = {
|
|
2214
|
+
body?: never;
|
|
2215
|
+
path?: never;
|
|
2216
|
+
query?: {
|
|
2217
|
+
/**
|
|
2218
|
+
* Transaction id or Pix E2E id.
|
|
2219
|
+
*/
|
|
2220
|
+
q?: string;
|
|
2221
|
+
/**
|
|
2222
|
+
* Maximum creation date.
|
|
2223
|
+
*/
|
|
2224
|
+
before?: string;
|
|
2225
|
+
/**
|
|
2226
|
+
* Transaction status filter.
|
|
2227
|
+
*/
|
|
2228
|
+
status?: string;
|
|
2229
|
+
/**
|
|
2230
|
+
* Transaction value filter.
|
|
2231
|
+
*/
|
|
2232
|
+
value?: string;
|
|
2233
|
+
/**
|
|
2234
|
+
* Transaction type filter.
|
|
2235
|
+
*/
|
|
2236
|
+
type?: string;
|
|
2237
|
+
/**
|
|
2238
|
+
* Maximum number of transactions.
|
|
2239
|
+
*/
|
|
2240
|
+
limit?: string;
|
|
2241
|
+
/**
|
|
2242
|
+
* User id or Discord user id filter.
|
|
2243
|
+
*/
|
|
2244
|
+
user?: string;
|
|
2245
|
+
};
|
|
2246
|
+
url: "/transactions";
|
|
2247
|
+
};
|
|
2248
|
+
export type ListTransactionsErrors = {
|
|
2249
|
+
/**
|
|
2250
|
+
* User not authenticated.
|
|
2251
|
+
*/
|
|
2252
|
+
401: DefaultError;
|
|
2253
|
+
};
|
|
2254
|
+
export type ListTransactionsError = ListTransactionsErrors[keyof ListTransactionsErrors];
|
|
2255
|
+
export type ListTransactionsResponses = {
|
|
2256
|
+
/**
|
|
2257
|
+
* Transactions listed successfully.
|
|
2258
|
+
*/
|
|
2259
|
+
200: Array<{
|
|
2260
|
+
id: string;
|
|
2261
|
+
base_value: number;
|
|
2262
|
+
value: number;
|
|
2263
|
+
created_at: number;
|
|
2264
|
+
status: "inactive" | "invalid-pix-key" | "pending" | "approved" | "cancelled" | "expired" | "refused" | "refunded" | "analysis";
|
|
2265
|
+
}>;
|
|
2266
|
+
};
|
|
2267
|
+
export type ListTransactionsResponse = ListTransactionsResponses[keyof ListTransactionsResponses];
|
|
2268
|
+
export type GetTransactionData = {
|
|
2269
|
+
body?: never;
|
|
2270
|
+
path: {
|
|
2271
|
+
transactionId: string;
|
|
2272
|
+
};
|
|
2273
|
+
query?: never;
|
|
2274
|
+
url: "/transactions/{transactionId}";
|
|
2275
|
+
};
|
|
2276
|
+
export type GetTransactionErrors = {
|
|
2277
|
+
/**
|
|
2278
|
+
* User not authenticated.
|
|
2279
|
+
*/
|
|
2280
|
+
401: DefaultError;
|
|
2281
|
+
/**
|
|
2282
|
+
* Transaction not found.
|
|
2283
|
+
*/
|
|
2284
|
+
404: DefaultError;
|
|
2285
|
+
};
|
|
2286
|
+
export type GetTransactionError = GetTransactionErrors[keyof GetTransactionErrors];
|
|
2287
|
+
export type GetTransactionResponses = {
|
|
2288
|
+
/**
|
|
2289
|
+
* Transaction returned successfully.
|
|
2290
|
+
*/
|
|
2291
|
+
200: {
|
|
2292
|
+
id: string;
|
|
2293
|
+
created_at: number;
|
|
2294
|
+
value: number;
|
|
2295
|
+
status: "pending" | "inactive" | "invalid-pix-key" | "approved" | "cancelled" | "expired" | "refused" | "refunded" | "analysis";
|
|
2296
|
+
method: "pix" | "boleto";
|
|
2297
|
+
expires_at: number;
|
|
2298
|
+
type: "transfer" | "withdraw" | "sale" | "deposit";
|
|
2299
|
+
entity: "mercadopago" | "semiauto" | "efi" | "wallet-efi";
|
|
2300
|
+
managed?: null | boolean;
|
|
2301
|
+
base_value: number;
|
|
2302
|
+
refunded_value: number;
|
|
2303
|
+
refund_reason?: null | "fraud" | "pix_med" | "by_admin" | "requested_with_zennify" | "requested_with_bank" | "stock_out" | "stock_low" | "internal_reason" | "internal_error" | "bank_blacklist" | "bank_rejected" | "coupon_out";
|
|
2304
|
+
refund_comment?: null | string;
|
|
2305
|
+
refund_requested_by?: null | number;
|
|
2306
|
+
pix_e2eid?: null | string;
|
|
2307
|
+
pix_qrcode?: null | string;
|
|
2308
|
+
payer_bank?: null | string;
|
|
2309
|
+
metadata?: unknown;
|
|
2310
|
+
order: {
|
|
2311
|
+
id: string;
|
|
2312
|
+
platform: "discord" | "website" | "marketplace" | "whatsapp" | "telegram";
|
|
2313
|
+
discord_guild_id?: null | string;
|
|
2314
|
+
discord_channel_id?: null | string;
|
|
2315
|
+
discord_channel_message_id?: null | string;
|
|
2316
|
+
discord_sale_message?: null | string;
|
|
2317
|
+
discord_feedback_message?: null | string;
|
|
2318
|
+
subtotal: number;
|
|
2319
|
+
discount: number;
|
|
2320
|
+
total_value: number;
|
|
2321
|
+
rating?: null | number;
|
|
2322
|
+
rating_message?: null | string;
|
|
2323
|
+
/**
|
|
2324
|
+
* From T, pick a set of properties whose keys are in the union K
|
|
2325
|
+
*/
|
|
2326
|
+
payer: {
|
|
2327
|
+
id: number;
|
|
2328
|
+
discord_user_id: string;
|
|
2329
|
+
username: string;
|
|
2330
|
+
};
|
|
2331
|
+
/**
|
|
2332
|
+
* From T, pick a set of properties whose keys are in the union K
|
|
2333
|
+
*/
|
|
2334
|
+
store: {
|
|
2335
|
+
id: number;
|
|
2336
|
+
name: string;
|
|
2337
|
+
icon_id?: null | string;
|
|
2338
|
+
banner_id?: null | string;
|
|
2339
|
+
};
|
|
2340
|
+
/**
|
|
2341
|
+
* From T, pick a set of properties whose keys are in the union K
|
|
2342
|
+
*/
|
|
2343
|
+
seller: {
|
|
2344
|
+
id: number;
|
|
2345
|
+
discord_user_id: string;
|
|
2346
|
+
username: string;
|
|
2347
|
+
};
|
|
2348
|
+
products: Array<{
|
|
2349
|
+
id: number;
|
|
2350
|
+
name: string;
|
|
2351
|
+
icon_id?: null | string;
|
|
2352
|
+
banner_id?: null | string;
|
|
2353
|
+
value: number;
|
|
2354
|
+
short_description?: null | string;
|
|
2355
|
+
discord_description?: null | string;
|
|
2356
|
+
website_description?: null | string;
|
|
2357
|
+
amount: number;
|
|
2358
|
+
delivered: Array<string>;
|
|
2359
|
+
}>;
|
|
2360
|
+
};
|
|
2361
|
+
/**
|
|
2362
|
+
* From T, pick a set of properties whose keys are in the union K
|
|
2363
|
+
*/
|
|
2364
|
+
withdraw: {
|
|
2365
|
+
subtotal: number;
|
|
2366
|
+
discount: number;
|
|
2367
|
+
total_value: number;
|
|
2368
|
+
fee: number;
|
|
2369
|
+
sended_pix_key: null | string;
|
|
2370
|
+
};
|
|
2371
|
+
};
|
|
2372
|
+
};
|
|
2373
|
+
export type GetTransactionResponse = GetTransactionResponses[keyof GetTransactionResponses];
|
|
2374
|
+
export type UpdateTransactionData = {
|
|
2375
|
+
body?: {
|
|
2376
|
+
status?: "approved" | "cancelled" | "refunded";
|
|
2377
|
+
/**
|
|
2378
|
+
* Refund amount.
|
|
2379
|
+
*/
|
|
2380
|
+
refund_value?: number;
|
|
2381
|
+
/**
|
|
2382
|
+
* Refund comment.
|
|
2383
|
+
*/
|
|
2384
|
+
refund_comment?: string;
|
|
2385
|
+
metadata?: {
|
|
2386
|
+
/**
|
|
2387
|
+
* Compile-time marker property for typia transformer.
|
|
2388
|
+
*
|
|
2389
|
+
* This phantom property carries tag metadata in the type system. It is never
|
|
2390
|
+
* assigned at runtime - it exists only for the transformer to read during
|
|
2391
|
+
* compilation.
|
|
2392
|
+
*/
|
|
2393
|
+
"typia.tag"?: {
|
|
2394
|
+
target: "string" | "number" | "bigint" | "boolean" | "object" | "array";
|
|
2395
|
+
kind: "jsonPlugin";
|
|
2396
|
+
schema: {
|
|
2397
|
+
description: "Transaction metadata.";
|
|
2398
|
+
examples: [
|
|
2399
|
+
{
|
|
2400
|
+
key: "value";
|
|
2401
|
+
}
|
|
2402
|
+
];
|
|
2403
|
+
};
|
|
2404
|
+
};
|
|
2405
|
+
};
|
|
2406
|
+
[key: string]: unknown;
|
|
2407
|
+
};
|
|
2408
|
+
path: {
|
|
2409
|
+
transactionId: string;
|
|
2410
|
+
};
|
|
2411
|
+
query?: never;
|
|
2412
|
+
url: "/transactions/{transactionId}";
|
|
2413
|
+
};
|
|
2414
|
+
export type UpdateTransactionErrors = {
|
|
2415
|
+
/**
|
|
2416
|
+
* Bad Request
|
|
2417
|
+
*/
|
|
2418
|
+
400: DefaultError;
|
|
2419
|
+
/**
|
|
2420
|
+
* User not authenticated.
|
|
2421
|
+
*/
|
|
2422
|
+
401: DefaultError;
|
|
2423
|
+
/**
|
|
2424
|
+
* Permission denied.
|
|
2425
|
+
*/
|
|
2426
|
+
403: DefaultError;
|
|
2427
|
+
/**
|
|
2428
|
+
* Not Found
|
|
2429
|
+
*/
|
|
2430
|
+
404: DefaultError;
|
|
2431
|
+
/**
|
|
2432
|
+
* Order already refunded.
|
|
2433
|
+
*/
|
|
2434
|
+
409: DefaultError;
|
|
2435
|
+
/**
|
|
2436
|
+
* Payload too large.
|
|
2437
|
+
*/
|
|
2438
|
+
413: DefaultError;
|
|
2439
|
+
/**
|
|
2440
|
+
* Unprocessable Entity
|
|
2441
|
+
*/
|
|
2442
|
+
422: DefaultError;
|
|
2443
|
+
/**
|
|
2444
|
+
* Internal Server Error
|
|
2445
|
+
*/
|
|
2446
|
+
500: DefaultError;
|
|
2447
|
+
};
|
|
2448
|
+
export type UpdateTransactionError = UpdateTransactionErrors[keyof UpdateTransactionErrors];
|
|
2449
|
+
export type UpdateTransactionResponses = {
|
|
2450
|
+
/**
|
|
2451
|
+
* Transaction update completed successfully.
|
|
2452
|
+
*/
|
|
2453
|
+
200: unknown;
|
|
2454
|
+
/**
|
|
2455
|
+
* Transaction update accepted.
|
|
2456
|
+
*/
|
|
2457
|
+
202: unknown;
|
|
2458
|
+
/**
|
|
2459
|
+
* No transaction update was requested.
|
|
2460
|
+
*/
|
|
2461
|
+
204: void;
|
|
2462
|
+
};
|
|
2463
|
+
export type UpdateTransactionResponse = UpdateTransactionResponses[keyof UpdateTransactionResponses];
|
|
2464
|
+
export type GetUserByIdData = {
|
|
2465
|
+
body?: never;
|
|
2466
|
+
path: {
|
|
2467
|
+
userId: string;
|
|
2468
|
+
};
|
|
2469
|
+
query?: never;
|
|
2470
|
+
url: "/users/{userId}";
|
|
2471
|
+
};
|
|
2472
|
+
export type GetUserByIdErrors = {
|
|
2473
|
+
/**
|
|
2474
|
+
* User not authenticated.
|
|
2475
|
+
*/
|
|
2476
|
+
401: DefaultError;
|
|
2477
|
+
/**
|
|
2478
|
+
* User not found.
|
|
2479
|
+
*/
|
|
2480
|
+
404: DefaultError;
|
|
2481
|
+
};
|
|
2482
|
+
export type GetUserByIdError = GetUserByIdErrors[keyof GetUserByIdErrors];
|
|
2483
|
+
export type GetUserByIdResponses = {
|
|
2484
|
+
/**
|
|
2485
|
+
* Successful response
|
|
2486
|
+
*/
|
|
2487
|
+
200: {
|
|
2488
|
+
id: number;
|
|
2489
|
+
name: string;
|
|
2490
|
+
avatar?: null | string;
|
|
2491
|
+
connections: {
|
|
2492
|
+
discord: string;
|
|
2493
|
+
};
|
|
2494
|
+
};
|
|
2495
|
+
};
|
|
2496
|
+
export type GetUserByIdResponse = GetUserByIdResponses[keyof GetUserByIdResponses];
|
|
2497
|
+
export type UpdateUserAvatarData = {
|
|
2498
|
+
body?: {
|
|
2499
|
+
file: Blob | File;
|
|
2500
|
+
};
|
|
2501
|
+
path?: never;
|
|
2502
|
+
query?: never;
|
|
2503
|
+
url: "/users/me/avatar";
|
|
2504
|
+
};
|
|
2505
|
+
export type UpdateUserAvatarErrors = {
|
|
2506
|
+
/**
|
|
2507
|
+
* Invalid Multipart payload.
|
|
2508
|
+
*/
|
|
2509
|
+
400: DefaultError;
|
|
2510
|
+
/**
|
|
2511
|
+
* User not authenticated.
|
|
2512
|
+
*/
|
|
2513
|
+
401: DefaultError;
|
|
2514
|
+
/**
|
|
2515
|
+
* No file uploaded.
|
|
2516
|
+
*/
|
|
2517
|
+
404: DefaultError;
|
|
2518
|
+
/**
|
|
2519
|
+
* Payload Too Large
|
|
2520
|
+
*/
|
|
2521
|
+
413: DefaultError;
|
|
2522
|
+
};
|
|
2523
|
+
export type UpdateUserAvatarError = UpdateUserAvatarErrors[keyof UpdateUserAvatarErrors];
|
|
2524
|
+
export type UpdateUserAvatarResponses = {
|
|
2525
|
+
/**
|
|
2526
|
+
* Avatar updated successfuly
|
|
2527
|
+
*/
|
|
2528
|
+
200: {
|
|
2529
|
+
/**
|
|
2530
|
+
* Uploaded avatar hash.
|
|
2531
|
+
*/
|
|
2532
|
+
hash: string;
|
|
2533
|
+
};
|
|
2534
|
+
};
|
|
2535
|
+
export type UpdateUserAvatarResponse = UpdateUserAvatarResponses[keyof UpdateUserAvatarResponses];
|
|
2536
|
+
export type GetUserData = {
|
|
2537
|
+
body?: never;
|
|
2538
|
+
path?: never;
|
|
2539
|
+
query?: never;
|
|
2540
|
+
url: "/users/me";
|
|
2541
|
+
};
|
|
2542
|
+
export type GetUserErrors = {
|
|
2543
|
+
/**
|
|
2544
|
+
* User not authenticated.
|
|
2545
|
+
*/
|
|
2546
|
+
401: DefaultError;
|
|
2547
|
+
};
|
|
2548
|
+
export type GetUserError = GetUserErrors[keyof GetUserErrors];
|
|
2549
|
+
export type GetUserResponses = {
|
|
2550
|
+
/**
|
|
2551
|
+
* Successful response
|
|
2552
|
+
*/
|
|
2553
|
+
200: {
|
|
2554
|
+
/**
|
|
2555
|
+
* User ID.
|
|
2556
|
+
*/
|
|
2557
|
+
id: number;
|
|
2558
|
+
/**
|
|
2559
|
+
* Public user name.
|
|
2560
|
+
*/
|
|
2561
|
+
name: string;
|
|
2562
|
+
/**
|
|
2563
|
+
* User email.
|
|
2564
|
+
*/
|
|
2565
|
+
email: string;
|
|
2566
|
+
/**
|
|
2567
|
+
* User avatar hash.
|
|
2568
|
+
*/
|
|
2569
|
+
avatar?: string;
|
|
2570
|
+
/**
|
|
2571
|
+
* Configured webhook URL.
|
|
2572
|
+
*/
|
|
2573
|
+
webhook?: string;
|
|
2574
|
+
/**
|
|
2575
|
+
* User timezone.
|
|
2576
|
+
*/
|
|
2577
|
+
timezone?: string;
|
|
2578
|
+
/**
|
|
2579
|
+
* User creation timestamp.
|
|
2580
|
+
*/
|
|
2581
|
+
joinedAt: number;
|
|
2582
|
+
payment: {
|
|
2583
|
+
entities: {
|
|
2584
|
+
efi: {
|
|
2585
|
+
id?: string;
|
|
2586
|
+
/**
|
|
2587
|
+
* Configured Pix key.
|
|
2588
|
+
*/
|
|
2589
|
+
pixKey?: string;
|
|
2590
|
+
};
|
|
2591
|
+
mercadopago: {
|
|
2592
|
+
id?: string;
|
|
2593
|
+
/**
|
|
2594
|
+
* Configured Pix key.
|
|
2595
|
+
*/
|
|
2596
|
+
pixKey?: string;
|
|
2597
|
+
};
|
|
2598
|
+
semiauto: {
|
|
2599
|
+
id?: string;
|
|
2600
|
+
/**
|
|
2601
|
+
* Configured Pix key.
|
|
2602
|
+
*/
|
|
2603
|
+
pixKey?: string;
|
|
2604
|
+
};
|
|
2605
|
+
"wallet-efi": {
|
|
2606
|
+
id?: string;
|
|
2607
|
+
/**
|
|
2608
|
+
* Configured Pix key.
|
|
2609
|
+
*/
|
|
2610
|
+
pixKey?: string;
|
|
2611
|
+
};
|
|
2612
|
+
};
|
|
2613
|
+
preferences: {
|
|
2614
|
+
pix: null | "mercadopago" | "semiauto" | "efi" | "wallet-efi";
|
|
2615
|
+
};
|
|
2616
|
+
};
|
|
2617
|
+
connections: {
|
|
2618
|
+
discord?: string;
|
|
2619
|
+
};
|
|
2620
|
+
legal: {
|
|
2621
|
+
status?: "pending" | "approved" | "rejected";
|
|
2622
|
+
type?: "cpf" | "cnpj";
|
|
2623
|
+
rejectedReason?: string;
|
|
2624
|
+
};
|
|
2625
|
+
};
|
|
2626
|
+
};
|
|
2627
|
+
export type GetUserResponse = GetUserResponses[keyof GetUserResponses];
|
|
2628
|
+
export type EditUserData = {
|
|
2629
|
+
body?: {
|
|
2630
|
+
/**
|
|
2631
|
+
* Public name. Must be 3 to 50 valid characters.
|
|
2632
|
+
*/
|
|
2633
|
+
name: string;
|
|
2634
|
+
};
|
|
2635
|
+
path?: never;
|
|
2636
|
+
query?: never;
|
|
2637
|
+
url: "/users/me";
|
|
2638
|
+
};
|
|
2639
|
+
export type EditUserErrors = {
|
|
2640
|
+
/**
|
|
2641
|
+
* Invalid JSON payload.
|
|
2642
|
+
*/
|
|
2643
|
+
400: DefaultError;
|
|
2644
|
+
/**
|
|
2645
|
+
* User not authenticated.
|
|
2646
|
+
*/
|
|
2647
|
+
401: DefaultError;
|
|
2648
|
+
/**
|
|
2649
|
+
* Payload too large.
|
|
2650
|
+
*/
|
|
2651
|
+
413: DefaultError;
|
|
2652
|
+
/**
|
|
2653
|
+
* Invalid name.
|
|
2654
|
+
*/
|
|
2655
|
+
422: DefaultError;
|
|
2656
|
+
};
|
|
2657
|
+
export type EditUserError = EditUserErrors[keyof EditUserErrors];
|
|
2658
|
+
export type EditUserResponses = {
|
|
2659
|
+
/**
|
|
2660
|
+
* User modified succesfully
|
|
2661
|
+
*/
|
|
2662
|
+
204: void;
|
|
2663
|
+
};
|
|
2664
|
+
export type EditUserResponse = EditUserResponses[keyof EditUserResponses];
|
|
2665
|
+
export type UpdatePaymentMethodData = {
|
|
2666
|
+
body?: {
|
|
2667
|
+
pix: null | string;
|
|
2668
|
+
};
|
|
2669
|
+
path?: never;
|
|
2670
|
+
query?: never;
|
|
2671
|
+
url: "/users/me/payment-method";
|
|
2672
|
+
};
|
|
2673
|
+
export type UpdatePaymentMethodErrors = {
|
|
2674
|
+
/**
|
|
2675
|
+
* Invalid JSON payload.
|
|
2676
|
+
*/
|
|
2677
|
+
400: DefaultError;
|
|
2678
|
+
/**
|
|
2679
|
+
* User not authenticated.
|
|
2680
|
+
*/
|
|
2681
|
+
401: DefaultError;
|
|
2682
|
+
/**
|
|
2683
|
+
* Payload too large.
|
|
2684
|
+
*/
|
|
2685
|
+
413: DefaultError;
|
|
2686
|
+
/**
|
|
2687
|
+
* Invalid payment method.
|
|
2688
|
+
*/
|
|
2689
|
+
422: DefaultError;
|
|
2690
|
+
};
|
|
2691
|
+
export type UpdatePaymentMethodError = UpdatePaymentMethodErrors[keyof UpdatePaymentMethodErrors];
|
|
2692
|
+
export type UpdatePaymentMethodResponses = {
|
|
2693
|
+
/**
|
|
2694
|
+
* Payment method updated.
|
|
2695
|
+
*/
|
|
2696
|
+
204: void;
|
|
2697
|
+
};
|
|
2698
|
+
export type UpdatePaymentMethodResponse = UpdatePaymentMethodResponses[keyof UpdatePaymentMethodResponses];
|
|
2699
|
+
export type SetupEfiData = {
|
|
2700
|
+
body?: {
|
|
2701
|
+
certificate: Blob | File;
|
|
2702
|
+
pix_key: string;
|
|
2703
|
+
client_id: string;
|
|
2704
|
+
client_secret: string;
|
|
2705
|
+
};
|
|
2706
|
+
path?: never;
|
|
2707
|
+
query?: never;
|
|
2708
|
+
url: "/users/me/payments/efi/setup";
|
|
2709
|
+
};
|
|
2710
|
+
export type SetupEfiErrors = {
|
|
2711
|
+
/**
|
|
2712
|
+
* Bad Request
|
|
2713
|
+
*/
|
|
2714
|
+
400: DefaultError;
|
|
2715
|
+
/**
|
|
2716
|
+
* User not authenticated.
|
|
2717
|
+
*/
|
|
2718
|
+
401: DefaultError;
|
|
2719
|
+
/**
|
|
2720
|
+
* Forbidden
|
|
2721
|
+
*/
|
|
2722
|
+
403: DefaultError;
|
|
2723
|
+
/**
|
|
2724
|
+
* Invalid certificate.
|
|
2725
|
+
*/
|
|
2726
|
+
415: DefaultError;
|
|
2727
|
+
/**
|
|
2728
|
+
* Unprocessable Entity
|
|
2729
|
+
*/
|
|
2730
|
+
422: DefaultError;
|
|
2731
|
+
/**
|
|
2732
|
+
* Internal Server Error
|
|
2733
|
+
*/
|
|
2734
|
+
500: DefaultError;
|
|
2735
|
+
};
|
|
2736
|
+
export type SetupEfiError = SetupEfiErrors[keyof SetupEfiErrors];
|
|
2737
|
+
export type SetupEfiResponses = {
|
|
2738
|
+
/**
|
|
2739
|
+
* Efí integration configured. Returns account ID
|
|
2740
|
+
*/
|
|
2741
|
+
200: {
|
|
2742
|
+
/**
|
|
2743
|
+
* Efí account ID.
|
|
2744
|
+
*/
|
|
2745
|
+
id: string;
|
|
2746
|
+
};
|
|
2747
|
+
};
|
|
2748
|
+
export type SetupEfiResponse = SetupEfiResponses[keyof SetupEfiResponses];
|
|
2749
|
+
export type UpdatePixKeyData = {
|
|
2750
|
+
body?: {
|
|
2751
|
+
/**
|
|
2752
|
+
* Pix key.
|
|
2753
|
+
*/
|
|
2754
|
+
pix_key: string;
|
|
2755
|
+
};
|
|
2756
|
+
path?: never;
|
|
2757
|
+
query?: never;
|
|
2758
|
+
url: "/users/me/pix_key";
|
|
2759
|
+
};
|
|
2760
|
+
export type UpdatePixKeyErrors = {
|
|
2761
|
+
/**
|
|
2762
|
+
* Invalid JSON payload.
|
|
2763
|
+
*/
|
|
2764
|
+
400: DefaultError;
|
|
2765
|
+
/**
|
|
2766
|
+
* User not authenticated.
|
|
2767
|
+
*/
|
|
2768
|
+
401: DefaultError;
|
|
2769
|
+
/**
|
|
2770
|
+
* Payload too large.
|
|
2771
|
+
*/
|
|
2772
|
+
413: DefaultError;
|
|
2773
|
+
/**
|
|
2774
|
+
* Unprocessable Entity
|
|
2775
|
+
*/
|
|
2776
|
+
422: DefaultError;
|
|
2777
|
+
};
|
|
2778
|
+
export type UpdatePixKeyError = UpdatePixKeyErrors[keyof UpdatePixKeyErrors];
|
|
2779
|
+
export type UpdatePixKeyResponses = {
|
|
2780
|
+
/**
|
|
2781
|
+
* Pix key updated or unchanged.
|
|
2782
|
+
*/
|
|
2783
|
+
204: void;
|
|
2784
|
+
};
|
|
2785
|
+
export type UpdatePixKeyResponse = UpdatePixKeyResponses[keyof UpdatePixKeyResponses];
|
|
2786
|
+
export type WalletBalanceData = {
|
|
2787
|
+
body?: never;
|
|
2788
|
+
path?: never;
|
|
2789
|
+
query?: never;
|
|
2790
|
+
url: "/users/me/wallet/balance";
|
|
2791
|
+
};
|
|
2792
|
+
export type WalletBalanceErrors = {
|
|
2793
|
+
/**
|
|
2794
|
+
* User not authenticated.
|
|
2795
|
+
*/
|
|
2796
|
+
401: DefaultError;
|
|
2797
|
+
};
|
|
2798
|
+
export type WalletBalanceError = WalletBalanceErrors[keyof WalletBalanceErrors];
|
|
2799
|
+
export type WalletBalanceResponses = {
|
|
2800
|
+
/**
|
|
2801
|
+
* Balance returned successfully.
|
|
2802
|
+
*/
|
|
2803
|
+
200: {
|
|
2804
|
+
/**
|
|
2805
|
+
* Pending wallet balance.
|
|
2806
|
+
*/
|
|
2807
|
+
pending: number;
|
|
2808
|
+
/**
|
|
2809
|
+
* Available wallet balance.
|
|
2810
|
+
*/
|
|
2811
|
+
available: number;
|
|
2812
|
+
};
|
|
2813
|
+
};
|
|
2814
|
+
export type WalletBalanceResponse = WalletBalanceResponses[keyof WalletBalanceResponses];
|
|
2815
|
+
export type WalletWithdrawData = {
|
|
2816
|
+
body?: {
|
|
2817
|
+
/**
|
|
2818
|
+
* Money value.
|
|
2819
|
+
*/
|
|
2820
|
+
value: number;
|
|
2821
|
+
automatic: boolean;
|
|
2822
|
+
};
|
|
2823
|
+
path?: never;
|
|
2824
|
+
query?: never;
|
|
2825
|
+
url: "/users/me/wallet/withdraw";
|
|
2826
|
+
};
|
|
2827
|
+
export type WalletWithdrawErrors = {
|
|
2828
|
+
/**
|
|
2829
|
+
* Invalid JSON payload.
|
|
2830
|
+
*/
|
|
2831
|
+
400: DefaultError;
|
|
2832
|
+
/**
|
|
2833
|
+
* User not authenticated.
|
|
2834
|
+
*/
|
|
2835
|
+
401: DefaultError;
|
|
2836
|
+
/**
|
|
2837
|
+
* Conflict
|
|
2838
|
+
*/
|
|
2839
|
+
409: DefaultError;
|
|
2840
|
+
/**
|
|
2841
|
+
* Payload too large.
|
|
2842
|
+
*/
|
|
2843
|
+
413: DefaultError;
|
|
2844
|
+
/**
|
|
2845
|
+
* Invalid parameter.
|
|
2846
|
+
*/
|
|
2847
|
+
422: DefaultError;
|
|
2848
|
+
/**
|
|
2849
|
+
* Withdrawal limit exceeded.
|
|
2850
|
+
*/
|
|
2851
|
+
429: DefaultError;
|
|
2852
|
+
};
|
|
2853
|
+
export type WalletWithdrawError = WalletWithdrawErrors[keyof WalletWithdrawErrors];
|
|
2854
|
+
export type WalletWithdrawResponses = {
|
|
2855
|
+
/**
|
|
2856
|
+
* Withdraw requested succesfully.
|
|
2857
|
+
*/
|
|
2858
|
+
200: {
|
|
2859
|
+
/**
|
|
2860
|
+
* Withdraw transaction ID.
|
|
2861
|
+
*/
|
|
2862
|
+
id: string;
|
|
2863
|
+
};
|
|
2864
|
+
};
|
|
2865
|
+
export type WalletWithdrawResponse = WalletWithdrawResponses[keyof WalletWithdrawResponses];
|
|
2866
|
+
export type SetupWebhookData = {
|
|
2867
|
+
body?: {
|
|
2868
|
+
/**
|
|
2869
|
+
* HTTPS URL.
|
|
2870
|
+
*/
|
|
2871
|
+
url: string;
|
|
2872
|
+
};
|
|
2873
|
+
path?: never;
|
|
2874
|
+
query?: never;
|
|
2875
|
+
url: "/users/me/webhook";
|
|
2876
|
+
};
|
|
2877
|
+
export type SetupWebhookErrors = {
|
|
2878
|
+
/**
|
|
2879
|
+
* Invalid JSON payload.
|
|
2880
|
+
*/
|
|
2881
|
+
400: DefaultError;
|
|
2882
|
+
/**
|
|
2883
|
+
* User not authenticated.
|
|
2884
|
+
*/
|
|
2885
|
+
401: DefaultError;
|
|
2886
|
+
/**
|
|
2887
|
+
* URL timeout exceeded.
|
|
2888
|
+
*/
|
|
2889
|
+
408: DefaultError;
|
|
2890
|
+
/**
|
|
2891
|
+
* Payload too large.
|
|
2892
|
+
*/
|
|
2893
|
+
413: DefaultError;
|
|
2894
|
+
/**
|
|
2895
|
+
* Unprocessable Entity
|
|
2896
|
+
*/
|
|
2897
|
+
422: DefaultError;
|
|
2898
|
+
/**
|
|
2899
|
+
* URL inaccessible.
|
|
2900
|
+
*/
|
|
2901
|
+
424: DefaultError;
|
|
2902
|
+
};
|
|
2903
|
+
export type SetupWebhookError = SetupWebhookErrors[keyof SetupWebhookErrors];
|
|
2904
|
+
export type SetupWebhookResponses = {
|
|
2905
|
+
/**
|
|
2906
|
+
* Webhook configured successfully.
|
|
2907
|
+
*/
|
|
2908
|
+
204: void;
|
|
2909
|
+
};
|
|
2910
|
+
export type SetupWebhookResponse = SetupWebhookResponses[keyof SetupWebhookResponses];
|