@scanlab/api-types 0.0.1
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 +23 -0
- package/scanlab-api.d.ts +333 -0
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@scanlab/api-types",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "TypeScript types for the ScanLab API",
|
|
5
|
+
"main": "scanlab-api.d.ts",
|
|
6
|
+
"types": "scanlab-api.d.ts",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"api",
|
|
9
|
+
"deno",
|
|
10
|
+
"film-scanning",
|
|
11
|
+
"openapi",
|
|
12
|
+
"order-management",
|
|
13
|
+
"scanlab",
|
|
14
|
+
"types",
|
|
15
|
+
"typescript"
|
|
16
|
+
],
|
|
17
|
+
"author": "Tony Spegel",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/TonySpegel/scan-lab-api.git"
|
|
22
|
+
}
|
|
23
|
+
}
|
package/scanlab-api.d.ts
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface paths {
|
|
7
|
+
"/orders": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
/** Retrieves all orders */
|
|
15
|
+
get: operations["getOrders"];
|
|
16
|
+
put?: never;
|
|
17
|
+
/** Creates a new order */
|
|
18
|
+
post: operations["createOrder"];
|
|
19
|
+
delete?: never;
|
|
20
|
+
options?: never;
|
|
21
|
+
head?: never;
|
|
22
|
+
patch?: never;
|
|
23
|
+
trace?: never;
|
|
24
|
+
};
|
|
25
|
+
"/orders/{code}": {
|
|
26
|
+
parameters: {
|
|
27
|
+
query?: never;
|
|
28
|
+
header?: never;
|
|
29
|
+
path: {
|
|
30
|
+
/** @description The unique code of the order */
|
|
31
|
+
code: string;
|
|
32
|
+
};
|
|
33
|
+
cookie?: never;
|
|
34
|
+
};
|
|
35
|
+
/** Retrieves a specific order by its code */
|
|
36
|
+
get: operations["getOrder"];
|
|
37
|
+
put?: never;
|
|
38
|
+
post?: never;
|
|
39
|
+
delete?: never;
|
|
40
|
+
options?: never;
|
|
41
|
+
head?: never;
|
|
42
|
+
/** Updates the status of an existing order */
|
|
43
|
+
patch: operations["updateOrderStatus"];
|
|
44
|
+
trace?: never;
|
|
45
|
+
};
|
|
46
|
+
"/orders/{code}/status-history": {
|
|
47
|
+
parameters: {
|
|
48
|
+
query?: never;
|
|
49
|
+
header?: never;
|
|
50
|
+
path: {
|
|
51
|
+
/** @description The unique code of the order */
|
|
52
|
+
code: string;
|
|
53
|
+
};
|
|
54
|
+
cookie?: never;
|
|
55
|
+
};
|
|
56
|
+
/** Retrieves the status history of a specific order */
|
|
57
|
+
get: operations["getOrderStatusHistory"];
|
|
58
|
+
put?: never;
|
|
59
|
+
post?: never;
|
|
60
|
+
delete?: never;
|
|
61
|
+
options?: never;
|
|
62
|
+
head?: never;
|
|
63
|
+
patch?: never;
|
|
64
|
+
trace?: never;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export type webhooks = Record<string, never>;
|
|
68
|
+
export interface components {
|
|
69
|
+
schemas: {
|
|
70
|
+
/**
|
|
71
|
+
* @description Status of the order:
|
|
72
|
+
* - `pending`: Order has been created, but film has not yet been received
|
|
73
|
+
* - `received`: Film has been received
|
|
74
|
+
* - `processing`: Film has been received and is being processed
|
|
75
|
+
* - `completed`: Film has been digitalized
|
|
76
|
+
* - `paid`: Order has been paid
|
|
77
|
+
* - `cancelled`: Order cancelled
|
|
78
|
+
*
|
|
79
|
+
* @example pending
|
|
80
|
+
* @enum {string}
|
|
81
|
+
*/
|
|
82
|
+
OrderStatus: "pending" | "received" | "processing" | "completed" | "paid" | "cancelled";
|
|
83
|
+
/** @description Data Transfer Object for an order (API response) */
|
|
84
|
+
OrderDto: {
|
|
85
|
+
/**
|
|
86
|
+
* @description Unique code of the order
|
|
87
|
+
* @example ATX-B2C
|
|
88
|
+
*/
|
|
89
|
+
code: string;
|
|
90
|
+
status: components["schemas"]["OrderStatus"];
|
|
91
|
+
/**
|
|
92
|
+
* Format: date-time
|
|
93
|
+
* @description ISO 8601 timestamp of when the order was created
|
|
94
|
+
* @example 2025-04-05T10:30:00Z
|
|
95
|
+
*/
|
|
96
|
+
createdAt: string;
|
|
97
|
+
/**
|
|
98
|
+
* Format: float
|
|
99
|
+
* @description Price of the order (optional)
|
|
100
|
+
* @example 15.99
|
|
101
|
+
*/
|
|
102
|
+
price?: number;
|
|
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
|
+
};
|
|
110
|
+
/** @description Data Transfer Object for an order's status history */
|
|
111
|
+
OrderStatusHistoryDto: {
|
|
112
|
+
status: components["schemas"]["OrderStatus"];
|
|
113
|
+
/**
|
|
114
|
+
* Format: date-time
|
|
115
|
+
* @description ISO 8601 timestamp of when the status was changed
|
|
116
|
+
* @example 2025-04-06T12:00:00Z
|
|
117
|
+
*/
|
|
118
|
+
changedAt: string;
|
|
119
|
+
};
|
|
120
|
+
ErrorDetail: {
|
|
121
|
+
/** @description The field related to the error */
|
|
122
|
+
field?: string;
|
|
123
|
+
/** @description Specific error message for the field */
|
|
124
|
+
message?: string;
|
|
125
|
+
/** @description The value that caused the error (optional, type may vary) */
|
|
126
|
+
value?: unknown;
|
|
127
|
+
};
|
|
128
|
+
ErrorResponse: {
|
|
129
|
+
/**
|
|
130
|
+
* @description Application-specific error code
|
|
131
|
+
* @example ORDER_NOT_FOUND
|
|
132
|
+
*/
|
|
133
|
+
code?: string;
|
|
134
|
+
/**
|
|
135
|
+
* @description General error message
|
|
136
|
+
* @example Order not found
|
|
137
|
+
*/
|
|
138
|
+
message?: string;
|
|
139
|
+
errors?: components["schemas"]["ErrorDetail"][];
|
|
140
|
+
};
|
|
141
|
+
SuccessMessage: {
|
|
142
|
+
/** @example Operation successful */
|
|
143
|
+
message: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
responses: never;
|
|
147
|
+
parameters: never;
|
|
148
|
+
requestBodies: never;
|
|
149
|
+
headers: never;
|
|
150
|
+
pathItems: never;
|
|
151
|
+
}
|
|
152
|
+
export type $defs = Record<string, never>;
|
|
153
|
+
export interface operations {
|
|
154
|
+
getOrders: {
|
|
155
|
+
parameters: {
|
|
156
|
+
query?: never;
|
|
157
|
+
header?: never;
|
|
158
|
+
path?: never;
|
|
159
|
+
cookie?: never;
|
|
160
|
+
};
|
|
161
|
+
requestBody?: never;
|
|
162
|
+
responses: {
|
|
163
|
+
/** @description A list of all orders */
|
|
164
|
+
200: {
|
|
165
|
+
headers: {
|
|
166
|
+
[name: string]: unknown;
|
|
167
|
+
};
|
|
168
|
+
content: {
|
|
169
|
+
"application/json": components["schemas"]["OrderDto"][];
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
createOrder: {
|
|
175
|
+
parameters: {
|
|
176
|
+
query?: never;
|
|
177
|
+
header?: never;
|
|
178
|
+
path?: never;
|
|
179
|
+
cookie?: never;
|
|
180
|
+
};
|
|
181
|
+
/** @description Object containing the details of the new order */
|
|
182
|
+
requestBody: {
|
|
183
|
+
content: {
|
|
184
|
+
"application/json": {
|
|
185
|
+
/**
|
|
186
|
+
* @description Unique code of the order
|
|
187
|
+
* @example ATX-B2C
|
|
188
|
+
*/
|
|
189
|
+
code: string;
|
|
190
|
+
status: components["schemas"]["OrderStatus"];
|
|
191
|
+
/**
|
|
192
|
+
* Format: float
|
|
193
|
+
* @description Price of the order (optional)
|
|
194
|
+
* @example 15.99
|
|
195
|
+
*/
|
|
196
|
+
price?: number;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
responses: {
|
|
201
|
+
/** @description Order successfully created */
|
|
202
|
+
201: {
|
|
203
|
+
headers: {
|
|
204
|
+
[name: string]: unknown;
|
|
205
|
+
};
|
|
206
|
+
content: {
|
|
207
|
+
"application/json": components["schemas"]["SuccessMessage"];
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
/** @description Invalid request (e.g., missing required fields) */
|
|
211
|
+
400: {
|
|
212
|
+
headers: {
|
|
213
|
+
[name: string]: unknown;
|
|
214
|
+
};
|
|
215
|
+
content: {
|
|
216
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
/** @description Internal server error */
|
|
220
|
+
500: {
|
|
221
|
+
headers: {
|
|
222
|
+
[name: string]: unknown;
|
|
223
|
+
};
|
|
224
|
+
content: {
|
|
225
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
getOrder: {
|
|
231
|
+
parameters: {
|
|
232
|
+
query?: never;
|
|
233
|
+
header?: never;
|
|
234
|
+
path: {
|
|
235
|
+
/** @description The unique code of the order */
|
|
236
|
+
code: string;
|
|
237
|
+
};
|
|
238
|
+
cookie?: never;
|
|
239
|
+
};
|
|
240
|
+
requestBody?: never;
|
|
241
|
+
responses: {
|
|
242
|
+
/** @description Successful query, returns the order details */
|
|
243
|
+
200: {
|
|
244
|
+
headers: {
|
|
245
|
+
[name: string]: unknown;
|
|
246
|
+
};
|
|
247
|
+
content: {
|
|
248
|
+
"application/json": components["schemas"]["OrderDto"];
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
/** @description Order with the given code not found */
|
|
252
|
+
404: {
|
|
253
|
+
headers: {
|
|
254
|
+
[name: string]: unknown;
|
|
255
|
+
};
|
|
256
|
+
content: {
|
|
257
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
updateOrderStatus: {
|
|
263
|
+
parameters: {
|
|
264
|
+
query?: never;
|
|
265
|
+
header?: never;
|
|
266
|
+
path: {
|
|
267
|
+
/** @description The unique code of the order */
|
|
268
|
+
code: string;
|
|
269
|
+
};
|
|
270
|
+
cookie?: never;
|
|
271
|
+
};
|
|
272
|
+
/** @description Object with the new status for the order */
|
|
273
|
+
requestBody: {
|
|
274
|
+
content: {
|
|
275
|
+
"application/json": {
|
|
276
|
+
status: components["schemas"]["OrderStatus"];
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
responses: {
|
|
281
|
+
/** @description Order status successfully updated */
|
|
282
|
+
200: {
|
|
283
|
+
headers: {
|
|
284
|
+
[name: string]: unknown;
|
|
285
|
+
};
|
|
286
|
+
content: {
|
|
287
|
+
"application/json": components["schemas"]["SuccessMessage"];
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
/** @description Invalid request (e.g. status missing in body, invalid body, missing code in path - even though path parameter is required) */
|
|
291
|
+
400: {
|
|
292
|
+
headers: {
|
|
293
|
+
[name: string]: unknown;
|
|
294
|
+
};
|
|
295
|
+
content: {
|
|
296
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
getOrderStatusHistory: {
|
|
302
|
+
parameters: {
|
|
303
|
+
query?: never;
|
|
304
|
+
header?: never;
|
|
305
|
+
path: {
|
|
306
|
+
/** @description The unique code of the order */
|
|
307
|
+
code: string;
|
|
308
|
+
};
|
|
309
|
+
cookie?: never;
|
|
310
|
+
};
|
|
311
|
+
requestBody?: never;
|
|
312
|
+
responses: {
|
|
313
|
+
/** @description A list of status changes for the specified order */
|
|
314
|
+
200: {
|
|
315
|
+
headers: {
|
|
316
|
+
[name: string]: unknown;
|
|
317
|
+
};
|
|
318
|
+
content: {
|
|
319
|
+
"application/json": components["schemas"]["OrderStatusHistoryDto"][];
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
/** @description No status history found for the given order code */
|
|
323
|
+
404: {
|
|
324
|
+
headers: {
|
|
325
|
+
[name: string]: unknown;
|
|
326
|
+
};
|
|
327
|
+
content: {
|
|
328
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
}
|