@scanlab/api-types 0.0.2 → 0.0.3
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/package.json +1 -1
- package/scanlab-api.d.ts +269 -7
package/package.json
CHANGED
package/scanlab-api.d.ts
CHANGED
|
@@ -63,6 +63,94 @@ export interface paths {
|
|
|
63
63
|
patch?: never;
|
|
64
64
|
trace?: never;
|
|
65
65
|
};
|
|
66
|
+
"/admin/orders": {
|
|
67
|
+
parameters: {
|
|
68
|
+
query?: never;
|
|
69
|
+
header?: never;
|
|
70
|
+
path?: never;
|
|
71
|
+
cookie?: never;
|
|
72
|
+
};
|
|
73
|
+
/** Retrieves all orders, with all fields */
|
|
74
|
+
get: operations["adminGetOrders"];
|
|
75
|
+
put?: never;
|
|
76
|
+
post?: never;
|
|
77
|
+
delete?: never;
|
|
78
|
+
options?: never;
|
|
79
|
+
head?: never;
|
|
80
|
+
patch?: never;
|
|
81
|
+
trace?: never;
|
|
82
|
+
};
|
|
83
|
+
"/admin/orders/{code}": {
|
|
84
|
+
parameters: {
|
|
85
|
+
query?: never;
|
|
86
|
+
header?: never;
|
|
87
|
+
path: {
|
|
88
|
+
/** @description The unique code of the order */
|
|
89
|
+
code: string;
|
|
90
|
+
};
|
|
91
|
+
cookie?: never;
|
|
92
|
+
};
|
|
93
|
+
/** Retrieves a specific order by its code, with all fields */
|
|
94
|
+
get: operations["adminGetOrder"];
|
|
95
|
+
put?: never;
|
|
96
|
+
post?: never;
|
|
97
|
+
delete?: never;
|
|
98
|
+
options?: never;
|
|
99
|
+
head?: never;
|
|
100
|
+
patch?: never;
|
|
101
|
+
trace?: never;
|
|
102
|
+
};
|
|
103
|
+
"/admin/orders/status": {
|
|
104
|
+
parameters: {
|
|
105
|
+
query?: never;
|
|
106
|
+
header?: never;
|
|
107
|
+
path?: never;
|
|
108
|
+
cookie?: never;
|
|
109
|
+
};
|
|
110
|
+
get?: never;
|
|
111
|
+
put?: never;
|
|
112
|
+
post?: never;
|
|
113
|
+
delete?: never;
|
|
114
|
+
options?: never;
|
|
115
|
+
head?: never;
|
|
116
|
+
/** Updates the status of an order */
|
|
117
|
+
patch: operations["adminUpdateOrderStatus"];
|
|
118
|
+
trace?: never;
|
|
119
|
+
};
|
|
120
|
+
"/admin/orders/image-count": {
|
|
121
|
+
parameters: {
|
|
122
|
+
query?: never;
|
|
123
|
+
header?: never;
|
|
124
|
+
path?: never;
|
|
125
|
+
cookie?: never;
|
|
126
|
+
};
|
|
127
|
+
get?: never;
|
|
128
|
+
put?: never;
|
|
129
|
+
post?: never;
|
|
130
|
+
delete?: never;
|
|
131
|
+
options?: never;
|
|
132
|
+
head?: never;
|
|
133
|
+
/** Updates the image count for an order */
|
|
134
|
+
patch: operations["updateOrderImageCount"];
|
|
135
|
+
trace?: never;
|
|
136
|
+
};
|
|
137
|
+
"/admin/orders/download-link": {
|
|
138
|
+
parameters: {
|
|
139
|
+
query?: never;
|
|
140
|
+
header?: never;
|
|
141
|
+
path?: never;
|
|
142
|
+
cookie?: never;
|
|
143
|
+
};
|
|
144
|
+
get?: never;
|
|
145
|
+
put?: never;
|
|
146
|
+
post?: never;
|
|
147
|
+
delete?: never;
|
|
148
|
+
options?: never;
|
|
149
|
+
head?: never;
|
|
150
|
+
/** Updates the image count for an order */
|
|
151
|
+
patch: operations["updateOrderImageCount"];
|
|
152
|
+
trace?: never;
|
|
153
|
+
};
|
|
66
154
|
}
|
|
67
155
|
export type webhooks = Record<string, never>;
|
|
68
156
|
export interface components {
|
|
@@ -75,7 +163,6 @@ export interface components {
|
|
|
75
163
|
* - `completed`: Film has been digitalized
|
|
76
164
|
* - `paid`: Order has been paid
|
|
77
165
|
* - `cancelled`: Order cancelled
|
|
78
|
-
*
|
|
79
166
|
* @example pending
|
|
80
167
|
* @enum {string}
|
|
81
168
|
*/
|
|
@@ -100,12 +187,6 @@ export interface components {
|
|
|
100
187
|
* @example 2025-04-05T10:30:00Z
|
|
101
188
|
*/
|
|
102
189
|
updatedAt?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Format: date-time
|
|
105
|
-
* @description ISO 8601 timestamp of payment (optional)
|
|
106
|
-
* @example 2025-04-10T14:00:00Z
|
|
107
|
-
*/
|
|
108
|
-
paidAt?: string;
|
|
109
190
|
/**
|
|
110
191
|
* Format: float
|
|
111
192
|
* @description Price of the order (optional)
|
|
@@ -117,12 +198,22 @@ export interface components {
|
|
|
117
198
|
* @example 5
|
|
118
199
|
*/
|
|
119
200
|
imageCount?: number;
|
|
201
|
+
/**
|
|
202
|
+
* @description Whether a discount was applied to the order
|
|
203
|
+
* @example true
|
|
204
|
+
*/
|
|
205
|
+
withDiscount?: boolean | null;
|
|
120
206
|
/**
|
|
121
207
|
* Format: uri
|
|
122
208
|
* @description Link to download the digitalized images
|
|
123
209
|
* @example https://example.com/download/ATX-B2C
|
|
124
210
|
*/
|
|
125
211
|
downloadLink?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* @description The final price after applying the discount (optional)
|
|
214
|
+
* @example 10
|
|
215
|
+
*/
|
|
216
|
+
discountedPrice?: number | null;
|
|
126
217
|
};
|
|
127
218
|
/** @description Data Transfer Object for an order's status history */
|
|
128
219
|
OrderStatusHistoryDto: {
|
|
@@ -143,6 +234,11 @@ export interface components {
|
|
|
143
234
|
value?: unknown;
|
|
144
235
|
};
|
|
145
236
|
ErrorResponse: {
|
|
237
|
+
/**
|
|
238
|
+
* @description HTTP status code of the error
|
|
239
|
+
* @example 404
|
|
240
|
+
*/
|
|
241
|
+
status?: number;
|
|
146
242
|
/**
|
|
147
243
|
* @description Application-specific error code
|
|
148
244
|
* @example ORDER_NOT_FOUND
|
|
@@ -347,4 +443,170 @@ export interface operations {
|
|
|
347
443
|
};
|
|
348
444
|
};
|
|
349
445
|
};
|
|
446
|
+
adminGetOrders: {
|
|
447
|
+
parameters: {
|
|
448
|
+
query?: never;
|
|
449
|
+
header?: never;
|
|
450
|
+
path?: never;
|
|
451
|
+
cookie?: never;
|
|
452
|
+
};
|
|
453
|
+
requestBody?: never;
|
|
454
|
+
responses: {
|
|
455
|
+
/** @description A list of all orders */
|
|
456
|
+
200: {
|
|
457
|
+
headers: {
|
|
458
|
+
[name: string]: unknown;
|
|
459
|
+
};
|
|
460
|
+
content: {
|
|
461
|
+
"application/json": components["schemas"]["OrderDto"][];
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
adminGetOrder: {
|
|
467
|
+
parameters: {
|
|
468
|
+
query?: never;
|
|
469
|
+
header?: never;
|
|
470
|
+
path: {
|
|
471
|
+
/** @description The unique code of the order */
|
|
472
|
+
code: string;
|
|
473
|
+
};
|
|
474
|
+
cookie?: never;
|
|
475
|
+
};
|
|
476
|
+
requestBody?: never;
|
|
477
|
+
responses: {
|
|
478
|
+
/** @description Successful query, returns the order details */
|
|
479
|
+
200: {
|
|
480
|
+
headers: {
|
|
481
|
+
[name: string]: unknown;
|
|
482
|
+
};
|
|
483
|
+
content: {
|
|
484
|
+
"application/json": components["schemas"]["OrderDto"];
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
/** @description Order with the given code not found */
|
|
488
|
+
404: {
|
|
489
|
+
headers: {
|
|
490
|
+
[name: string]: unknown;
|
|
491
|
+
};
|
|
492
|
+
content: {
|
|
493
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
adminUpdateOrderStatus: {
|
|
499
|
+
parameters: {
|
|
500
|
+
query?: never;
|
|
501
|
+
header?: never;
|
|
502
|
+
path?: never;
|
|
503
|
+
cookie?: never;
|
|
504
|
+
};
|
|
505
|
+
/** @description Object containing the order code and new status */
|
|
506
|
+
requestBody: {
|
|
507
|
+
content: {
|
|
508
|
+
"application/json": {
|
|
509
|
+
/**
|
|
510
|
+
* @description Unique code of the order
|
|
511
|
+
* @example ATX-B2C
|
|
512
|
+
*/
|
|
513
|
+
code: string;
|
|
514
|
+
status: components["schemas"]["OrderStatus"];
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
responses: {
|
|
519
|
+
/** @description Order status successfully updated */
|
|
520
|
+
200: {
|
|
521
|
+
headers: {
|
|
522
|
+
[name: string]: unknown;
|
|
523
|
+
};
|
|
524
|
+
content: {
|
|
525
|
+
"application/json": {
|
|
526
|
+
/** @example Order status updated successfully */
|
|
527
|
+
message?: string;
|
|
528
|
+
};
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
updateOrderImageCount: {
|
|
534
|
+
parameters: {
|
|
535
|
+
query?: never;
|
|
536
|
+
header?: never;
|
|
537
|
+
path?: never;
|
|
538
|
+
cookie?: never;
|
|
539
|
+
};
|
|
540
|
+
/** @description Object containing the order code and new image count */
|
|
541
|
+
requestBody: {
|
|
542
|
+
content: {
|
|
543
|
+
"application/json": {
|
|
544
|
+
/**
|
|
545
|
+
* @description Unique code of the order
|
|
546
|
+
* @example ATX-B2C
|
|
547
|
+
*/
|
|
548
|
+
code: string;
|
|
549
|
+
/**
|
|
550
|
+
* @description New image count for the order
|
|
551
|
+
* @example 10
|
|
552
|
+
*/
|
|
553
|
+
imageCount: number;
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
responses: {
|
|
558
|
+
/** @description Image count successfully updated */
|
|
559
|
+
200: {
|
|
560
|
+
headers: {
|
|
561
|
+
[name: string]: unknown;
|
|
562
|
+
};
|
|
563
|
+
content: {
|
|
564
|
+
"application/json": {
|
|
565
|
+
/** @example Order image count updated successfully */
|
|
566
|
+
message?: string;
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
updateOrderImageCount: {
|
|
573
|
+
parameters: {
|
|
574
|
+
query?: never;
|
|
575
|
+
header?: never;
|
|
576
|
+
path?: never;
|
|
577
|
+
cookie?: never;
|
|
578
|
+
};
|
|
579
|
+
/** @description Object containing the order code and new image count */
|
|
580
|
+
requestBody: {
|
|
581
|
+
content: {
|
|
582
|
+
"application/json": {
|
|
583
|
+
/**
|
|
584
|
+
* @description Unique code of the order
|
|
585
|
+
* @example ATX-B2C
|
|
586
|
+
*/
|
|
587
|
+
code: string;
|
|
588
|
+
/**
|
|
589
|
+
* Format: uri
|
|
590
|
+
* @description New download link for the order
|
|
591
|
+
* @example https://example.com/download/ATX-B2C
|
|
592
|
+
*/
|
|
593
|
+
downloadLink?: string;
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
};
|
|
597
|
+
responses: {
|
|
598
|
+
/** @description Image count successfully updated */
|
|
599
|
+
200: {
|
|
600
|
+
headers: {
|
|
601
|
+
[name: string]: unknown;
|
|
602
|
+
};
|
|
603
|
+
content: {
|
|
604
|
+
"application/json": {
|
|
605
|
+
/** @example Order download link updated successfully */
|
|
606
|
+
message?: string;
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
};
|
|
350
612
|
}
|