@deliverart/sdk-js-image 0.0.0-dev-20260721002647
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/README.md +141 -0
- package/dist/index.cjs +281 -0
- package/dist/index.d.cts +461 -0
- package/dist/index.d.ts +461 -0
- package/dist/index.js +231 -0
- package/package.json +33 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
3
|
+
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
4
|
+
|
|
5
|
+
declare const imageSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
8
|
+
contentUrl: z.ZodURL;
|
|
9
|
+
filePath: z.ZodString;
|
|
10
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
11
|
+
createdAt: z.ZodString;
|
|
12
|
+
updatedAt: z.ZodString;
|
|
13
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
16
|
+
contentUrl: z.ZodURL;
|
|
17
|
+
filePath: z.ZodString;
|
|
18
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
19
|
+
createdAt: z.ZodString;
|
|
20
|
+
updatedAt: z.ZodString;
|
|
21
|
+
}, z.core.$strip>>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
type Image = z.infer<typeof imageSchema>;
|
|
24
|
+
declare const imagesQuerySchema: z.ZodObject<{
|
|
25
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
26
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
27
|
+
'tags.match': z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
all: "all";
|
|
29
|
+
any: "any";
|
|
30
|
+
}>>;
|
|
31
|
+
'exists[original]': z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
type ImagesQueryParams = z.infer<typeof imagesQuerySchema>;
|
|
34
|
+
|
|
35
|
+
declare const deleteImageInputSchema: z.ZodUndefined;
|
|
36
|
+
declare const deleteImageResponseSchema: z.ZodUnion<readonly [z.ZodVoid, z.ZodUndefined, z.ZodNull]>;
|
|
37
|
+
declare class DeleteImage extends AbstractApiRequest<typeof deleteImageInputSchema, typeof deleteImageResponseSchema> {
|
|
38
|
+
readonly method = "DELETE";
|
|
39
|
+
readonly contentType = "application/json";
|
|
40
|
+
readonly accept = "application/json";
|
|
41
|
+
readonly inputSchema: z.ZodUndefined;
|
|
42
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodVoid, z.ZodUndefined, z.ZodNull]>;
|
|
43
|
+
readonly querySchema: undefined;
|
|
44
|
+
readonly headersSchema: undefined;
|
|
45
|
+
private readonly imageId;
|
|
46
|
+
constructor(imageId: string);
|
|
47
|
+
getPath(): string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare const getImageDetailsInputSchema: z.ZodUndefined;
|
|
51
|
+
type GetImageDetailsInput = z.input<typeof getImageDetailsInputSchema>;
|
|
52
|
+
declare const getImageDetailsResponseSchema: z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
55
|
+
contentUrl: z.ZodURL;
|
|
56
|
+
filePath: z.ZodString;
|
|
57
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
58
|
+
createdAt: z.ZodString;
|
|
59
|
+
updatedAt: z.ZodString;
|
|
60
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
63
|
+
contentUrl: z.ZodURL;
|
|
64
|
+
filePath: z.ZodString;
|
|
65
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
66
|
+
createdAt: z.ZodString;
|
|
67
|
+
updatedAt: z.ZodString;
|
|
68
|
+
}, z.core.$strip>>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
type GetImageDetailsResponse = z.infer<typeof getImageDetailsResponseSchema>;
|
|
71
|
+
declare class GetImageDetails extends AbstractApiRequest<typeof getImageDetailsInputSchema, typeof getImageDetailsResponseSchema> {
|
|
72
|
+
readonly method = "GET";
|
|
73
|
+
readonly contentType = "application/json";
|
|
74
|
+
readonly accept = "application/json";
|
|
75
|
+
readonly inputSchema: z.ZodUndefined;
|
|
76
|
+
readonly outputSchema: z.ZodObject<{
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
79
|
+
contentUrl: z.ZodURL;
|
|
80
|
+
filePath: z.ZodString;
|
|
81
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
82
|
+
createdAt: z.ZodString;
|
|
83
|
+
updatedAt: z.ZodString;
|
|
84
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
85
|
+
id: z.ZodString;
|
|
86
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
87
|
+
contentUrl: z.ZodURL;
|
|
88
|
+
filePath: z.ZodString;
|
|
89
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
90
|
+
createdAt: z.ZodString;
|
|
91
|
+
updatedAt: z.ZodString;
|
|
92
|
+
}, z.core.$strip>>>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
readonly querySchema: undefined;
|
|
95
|
+
readonly headersSchema: undefined;
|
|
96
|
+
private readonly imageId;
|
|
97
|
+
constructor(imageId: string);
|
|
98
|
+
getPath(): string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare const getImagesQuerySchema: z.ZodObject<{
|
|
102
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
103
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
|
+
'tags.match': z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
all: "all";
|
|
106
|
+
any: "any";
|
|
107
|
+
}>>;
|
|
108
|
+
'exists[original]': z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
type GetImagesQueryParams = z.infer<typeof getImagesQuerySchema>;
|
|
111
|
+
declare const getImagesInputSchema: z.ZodUndefined;
|
|
112
|
+
type GetImagesInput = z.infer<typeof getImagesInputSchema>;
|
|
113
|
+
declare const getImagesResponseSchema: z.ZodObject<{
|
|
114
|
+
data: z.ZodArray<z.ZodObject<{
|
|
115
|
+
id: z.ZodString;
|
|
116
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
117
|
+
contentUrl: z.ZodURL;
|
|
118
|
+
filePath: z.ZodString;
|
|
119
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
120
|
+
createdAt: z.ZodString;
|
|
121
|
+
updatedAt: z.ZodString;
|
|
122
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
123
|
+
id: z.ZodString;
|
|
124
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
125
|
+
contentUrl: z.ZodURL;
|
|
126
|
+
filePath: z.ZodString;
|
|
127
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
128
|
+
createdAt: z.ZodString;
|
|
129
|
+
updatedAt: z.ZodString;
|
|
130
|
+
}, z.core.$strip>>>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
pagination: z.ZodObject<{
|
|
133
|
+
from: z.ZodCoercedNumber<unknown>;
|
|
134
|
+
to: z.ZodCoercedNumber<unknown>;
|
|
135
|
+
itemsPerPage: z.ZodCoercedNumber<unknown>;
|
|
136
|
+
totalItems: z.ZodCoercedNumber<unknown>;
|
|
137
|
+
currentPage: z.ZodCoercedNumber<unknown>;
|
|
138
|
+
lastPage: z.ZodCoercedNumber<unknown>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
type GetImagesResponse = z.infer<typeof getImagesResponseSchema>;
|
|
142
|
+
declare class GetImages extends AbstractApiRequest<typeof getImagesInputSchema, typeof getImagesResponseSchema, GetImagesQueryParams> {
|
|
143
|
+
readonly method: "GET";
|
|
144
|
+
readonly contentType: "application/json";
|
|
145
|
+
readonly accept: "application/json";
|
|
146
|
+
readonly inputSchema: z.ZodUndefined;
|
|
147
|
+
readonly outputSchema: z.ZodObject<{
|
|
148
|
+
data: z.ZodArray<z.ZodObject<{
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
151
|
+
contentUrl: z.ZodURL;
|
|
152
|
+
filePath: z.ZodString;
|
|
153
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
154
|
+
createdAt: z.ZodString;
|
|
155
|
+
updatedAt: z.ZodString;
|
|
156
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
159
|
+
contentUrl: z.ZodURL;
|
|
160
|
+
filePath: z.ZodString;
|
|
161
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
162
|
+
createdAt: z.ZodString;
|
|
163
|
+
updatedAt: z.ZodString;
|
|
164
|
+
}, z.core.$strip>>>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
pagination: z.ZodObject<{
|
|
167
|
+
from: z.ZodCoercedNumber<unknown>;
|
|
168
|
+
to: z.ZodCoercedNumber<unknown>;
|
|
169
|
+
itemsPerPage: z.ZodCoercedNumber<unknown>;
|
|
170
|
+
totalItems: z.ZodCoercedNumber<unknown>;
|
|
171
|
+
currentPage: z.ZodCoercedNumber<unknown>;
|
|
172
|
+
lastPage: z.ZodCoercedNumber<unknown>;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
readonly querySchema: z.ZodObject<{
|
|
176
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
177
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
178
|
+
'tags.match': z.ZodOptional<z.ZodEnum<{
|
|
179
|
+
all: "all";
|
|
180
|
+
any: "any";
|
|
181
|
+
}>>;
|
|
182
|
+
'exists[original]': z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
readonly headersSchema: undefined;
|
|
185
|
+
readonly listItemSchema: z.ZodObject<{
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
188
|
+
contentUrl: z.ZodURL;
|
|
189
|
+
filePath: z.ZodString;
|
|
190
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
191
|
+
createdAt: z.ZodString;
|
|
192
|
+
updatedAt: z.ZodString;
|
|
193
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
196
|
+
contentUrl: z.ZodURL;
|
|
197
|
+
filePath: z.ZodString;
|
|
198
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
199
|
+
createdAt: z.ZodString;
|
|
200
|
+
updatedAt: z.ZodString;
|
|
201
|
+
}, z.core.$strip>>>;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
readonly paginationDefaultEnabled = true;
|
|
204
|
+
constructor(options?: {
|
|
205
|
+
query?: GetImagesQueryParams;
|
|
206
|
+
});
|
|
207
|
+
getPath(): string;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare const getImagesFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
211
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
212
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
213
|
+
'tags.match': z.ZodOptional<z.ZodEnum<{
|
|
214
|
+
all: "all";
|
|
215
|
+
any: "any";
|
|
216
|
+
}>>;
|
|
217
|
+
'exists[original]': z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
type GetImagesFromPointOfSaleQueryParams = z.infer<typeof getImagesFromPointOfSaleQuerySchema>;
|
|
220
|
+
declare const getImagesFromPointOfSaleInputSchema: z.ZodUndefined;
|
|
221
|
+
type GetImagesFromPointOfSaleInput = z.infer<typeof getImagesFromPointOfSaleInputSchema>;
|
|
222
|
+
declare const getImagesFromPointOfSaleResponseSchema: z.ZodObject<{
|
|
223
|
+
data: z.ZodArray<z.ZodObject<{
|
|
224
|
+
id: z.ZodString;
|
|
225
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
226
|
+
contentUrl: z.ZodURL;
|
|
227
|
+
filePath: z.ZodString;
|
|
228
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
229
|
+
createdAt: z.ZodString;
|
|
230
|
+
updatedAt: z.ZodString;
|
|
231
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
232
|
+
id: z.ZodString;
|
|
233
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
234
|
+
contentUrl: z.ZodURL;
|
|
235
|
+
filePath: z.ZodString;
|
|
236
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
237
|
+
createdAt: z.ZodString;
|
|
238
|
+
updatedAt: z.ZodString;
|
|
239
|
+
}, z.core.$strip>>>;
|
|
240
|
+
}, z.core.$strip>>;
|
|
241
|
+
pagination: z.ZodObject<{
|
|
242
|
+
from: z.ZodCoercedNumber<unknown>;
|
|
243
|
+
to: z.ZodCoercedNumber<unknown>;
|
|
244
|
+
itemsPerPage: z.ZodCoercedNumber<unknown>;
|
|
245
|
+
totalItems: z.ZodCoercedNumber<unknown>;
|
|
246
|
+
currentPage: z.ZodCoercedNumber<unknown>;
|
|
247
|
+
lastPage: z.ZodCoercedNumber<unknown>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
type GetImagesFromPointOfSaleResponse = z.infer<typeof getImagesFromPointOfSaleResponseSchema>;
|
|
251
|
+
declare class GetImagesFromPointOfSale extends AbstractApiRequest<typeof getImagesFromPointOfSaleInputSchema, typeof getImagesFromPointOfSaleResponseSchema, GetImagesFromPointOfSaleQueryParams> {
|
|
252
|
+
readonly method: "GET";
|
|
253
|
+
readonly contentType: "application/json";
|
|
254
|
+
readonly accept: "application/json";
|
|
255
|
+
readonly inputSchema: z.ZodUndefined;
|
|
256
|
+
readonly outputSchema: z.ZodObject<{
|
|
257
|
+
data: z.ZodArray<z.ZodObject<{
|
|
258
|
+
id: z.ZodString;
|
|
259
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
260
|
+
contentUrl: z.ZodURL;
|
|
261
|
+
filePath: z.ZodString;
|
|
262
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
263
|
+
createdAt: z.ZodString;
|
|
264
|
+
updatedAt: z.ZodString;
|
|
265
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
266
|
+
id: z.ZodString;
|
|
267
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
268
|
+
contentUrl: z.ZodURL;
|
|
269
|
+
filePath: z.ZodString;
|
|
270
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
271
|
+
createdAt: z.ZodString;
|
|
272
|
+
updatedAt: z.ZodString;
|
|
273
|
+
}, z.core.$strip>>>;
|
|
274
|
+
}, z.core.$strip>>;
|
|
275
|
+
pagination: z.ZodObject<{
|
|
276
|
+
from: z.ZodCoercedNumber<unknown>;
|
|
277
|
+
to: z.ZodCoercedNumber<unknown>;
|
|
278
|
+
itemsPerPage: z.ZodCoercedNumber<unknown>;
|
|
279
|
+
totalItems: z.ZodCoercedNumber<unknown>;
|
|
280
|
+
currentPage: z.ZodCoercedNumber<unknown>;
|
|
281
|
+
lastPage: z.ZodCoercedNumber<unknown>;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
readonly querySchema: z.ZodObject<{
|
|
285
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
286
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
287
|
+
'tags.match': z.ZodOptional<z.ZodEnum<{
|
|
288
|
+
all: "all";
|
|
289
|
+
any: "any";
|
|
290
|
+
}>>;
|
|
291
|
+
'exists[original]': z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
readonly headersSchema: undefined;
|
|
294
|
+
readonly listItemSchema: z.ZodObject<{
|
|
295
|
+
id: z.ZodString;
|
|
296
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
297
|
+
contentUrl: z.ZodURL;
|
|
298
|
+
filePath: z.ZodString;
|
|
299
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
300
|
+
createdAt: z.ZodString;
|
|
301
|
+
updatedAt: z.ZodString;
|
|
302
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
303
|
+
id: z.ZodString;
|
|
304
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
305
|
+
contentUrl: z.ZodURL;
|
|
306
|
+
filePath: z.ZodString;
|
|
307
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
308
|
+
createdAt: z.ZodString;
|
|
309
|
+
updatedAt: z.ZodString;
|
|
310
|
+
}, z.core.$strip>>>;
|
|
311
|
+
}, z.core.$strip>;
|
|
312
|
+
readonly paginationDefaultEnabled = true;
|
|
313
|
+
private readonly pointOfSaleId;
|
|
314
|
+
constructor(pointOfSaleId: string, options?: {
|
|
315
|
+
query?: GetImagesFromPointOfSaleQueryParams;
|
|
316
|
+
});
|
|
317
|
+
getPath(): string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
declare const getImageTagsFromPointOfSaleInputSchema: z.ZodUndefined;
|
|
321
|
+
type GetImageTagsFromPointOfSaleInput = z.infer<typeof getImageTagsFromPointOfSaleInputSchema>;
|
|
322
|
+
declare const getImageTagsFromPointOfSaleResponseSchema: z.ZodArray<z.ZodString>;
|
|
323
|
+
type GetImageTagsFromPointOfSaleResponse = z.infer<typeof getImageTagsFromPointOfSaleResponseSchema>;
|
|
324
|
+
declare class GetImageTagsFromPointOfSale extends AbstractApiRequest<typeof getImageTagsFromPointOfSaleInputSchema, typeof getImageTagsFromPointOfSaleResponseSchema> {
|
|
325
|
+
readonly method = "GET";
|
|
326
|
+
readonly contentType = "application/json";
|
|
327
|
+
readonly accept = "application/json";
|
|
328
|
+
readonly inputSchema: z.ZodUndefined;
|
|
329
|
+
readonly outputSchema: z.ZodArray<z.ZodString>;
|
|
330
|
+
readonly querySchema: undefined;
|
|
331
|
+
readonly headersSchema: undefined;
|
|
332
|
+
private readonly pointOfSaleId;
|
|
333
|
+
constructor(pointOfSaleId: string);
|
|
334
|
+
getPath(): string;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
declare const updateImageInputSchema: z.ZodObject<{
|
|
338
|
+
tags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
type UpdateImageInput = z.input<typeof updateImageInputSchema>;
|
|
341
|
+
declare const updateImageResponseSchema: z.ZodObject<{
|
|
342
|
+
id: z.ZodString;
|
|
343
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
344
|
+
contentUrl: z.ZodURL;
|
|
345
|
+
filePath: z.ZodString;
|
|
346
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
347
|
+
createdAt: z.ZodString;
|
|
348
|
+
updatedAt: z.ZodString;
|
|
349
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
350
|
+
id: z.ZodString;
|
|
351
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
352
|
+
contentUrl: z.ZodURL;
|
|
353
|
+
filePath: z.ZodString;
|
|
354
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
355
|
+
createdAt: z.ZodString;
|
|
356
|
+
updatedAt: z.ZodString;
|
|
357
|
+
}, z.core.$strip>>>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
type UpdateImageResponse = z.infer<typeof updateImageResponseSchema>;
|
|
360
|
+
declare class UpdateImage extends AbstractApiRequest<typeof updateImageInputSchema, typeof updateImageResponseSchema> {
|
|
361
|
+
readonly method = "PATCH";
|
|
362
|
+
readonly contentType = "application/merge-patch+json";
|
|
363
|
+
readonly accept = "application/json";
|
|
364
|
+
readonly inputSchema: z.ZodObject<{
|
|
365
|
+
tags: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
|
|
366
|
+
}, z.core.$strip>;
|
|
367
|
+
readonly outputSchema: z.ZodObject<{
|
|
368
|
+
id: z.ZodString;
|
|
369
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
370
|
+
contentUrl: z.ZodURL;
|
|
371
|
+
filePath: z.ZodString;
|
|
372
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
373
|
+
createdAt: z.ZodString;
|
|
374
|
+
updatedAt: z.ZodString;
|
|
375
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
376
|
+
id: z.ZodString;
|
|
377
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
378
|
+
contentUrl: z.ZodURL;
|
|
379
|
+
filePath: z.ZodString;
|
|
380
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
381
|
+
createdAt: z.ZodString;
|
|
382
|
+
updatedAt: z.ZodString;
|
|
383
|
+
}, z.core.$strip>>>;
|
|
384
|
+
}, z.core.$strip>;
|
|
385
|
+
readonly querySchema: undefined;
|
|
386
|
+
readonly headersSchema: undefined;
|
|
387
|
+
private readonly imageId;
|
|
388
|
+
constructor(imageId: string, input: UpdateImageInput);
|
|
389
|
+
getPath(): string;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
declare const uploadImageInputSchema: z.ZodCustom<FormData, FormData>;
|
|
393
|
+
type UploadImageInput = z.input<typeof uploadImageInputSchema>;
|
|
394
|
+
declare const uploadImageResponseSchema: z.ZodObject<{
|
|
395
|
+
id: z.ZodString;
|
|
396
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
397
|
+
contentUrl: z.ZodURL;
|
|
398
|
+
filePath: z.ZodString;
|
|
399
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
400
|
+
createdAt: z.ZodString;
|
|
401
|
+
updatedAt: z.ZodString;
|
|
402
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
403
|
+
id: z.ZodString;
|
|
404
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
405
|
+
contentUrl: z.ZodURL;
|
|
406
|
+
filePath: z.ZodString;
|
|
407
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
408
|
+
createdAt: z.ZodString;
|
|
409
|
+
updatedAt: z.ZodString;
|
|
410
|
+
}, z.core.$strip>>>;
|
|
411
|
+
}, z.core.$strip>;
|
|
412
|
+
type UploadImageResponse = z.infer<typeof uploadImageResponseSchema>;
|
|
413
|
+
/**
|
|
414
|
+
* Upload a new image to a Point of Sale
|
|
415
|
+
* Uses multipart/form-data to send the file
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* const formData = new FormData();
|
|
419
|
+
* formData.append('file', file);
|
|
420
|
+
* formData.append('pointOfSale', '/point_of_sales/xxx-xxx-xxx');
|
|
421
|
+
* formData.append('tags[]', 'tag1');
|
|
422
|
+
* formData.append('tags[]', 'tag2');
|
|
423
|
+
*
|
|
424
|
+
* const response = await sdk.call(new UploadImage(formData));
|
|
425
|
+
*/
|
|
426
|
+
declare class UploadImage extends AbstractApiRequest<typeof uploadImageInputSchema, typeof uploadImageResponseSchema> {
|
|
427
|
+
readonly method = "POST";
|
|
428
|
+
readonly contentType = "multipart/form-data";
|
|
429
|
+
readonly accept = "application/json";
|
|
430
|
+
readonly inputSchema: z.ZodCustom<FormData, FormData>;
|
|
431
|
+
readonly outputSchema: z.ZodObject<{
|
|
432
|
+
id: z.ZodString;
|
|
433
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
434
|
+
contentUrl: z.ZodURL;
|
|
435
|
+
filePath: z.ZodString;
|
|
436
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
437
|
+
createdAt: z.ZodString;
|
|
438
|
+
updatedAt: z.ZodString;
|
|
439
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
440
|
+
id: z.ZodString;
|
|
441
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
442
|
+
contentUrl: z.ZodURL;
|
|
443
|
+
filePath: z.ZodString;
|
|
444
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
445
|
+
createdAt: z.ZodString;
|
|
446
|
+
updatedAt: z.ZodString;
|
|
447
|
+
}, z.core.$strip>>>;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
readonly querySchema: undefined;
|
|
450
|
+
readonly headersSchema: undefined;
|
|
451
|
+
constructor(input: FormData);
|
|
452
|
+
getPath(): string;
|
|
453
|
+
}
|
|
454
|
+
declare function createImageUploadFormData(pointOfSaleId: string, file: File, tags?: string[]): FormData;
|
|
455
|
+
|
|
456
|
+
declare const imageIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/images/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/images/:id">, unknown>>;
|
|
457
|
+
type imageIri = z.infer<typeof imageIriSchema>;
|
|
458
|
+
declare const imageNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/images/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/images/:id"> | null, unknown>>;
|
|
459
|
+
type imageNullableIri = z.infer<typeof imageNullableIriSchema>;
|
|
460
|
+
|
|
461
|
+
export { DeleteImage, GetImageDetails, type GetImageDetailsInput, type GetImageDetailsResponse, GetImageTagsFromPointOfSale, type GetImageTagsFromPointOfSaleInput, type GetImageTagsFromPointOfSaleResponse, GetImages, GetImagesFromPointOfSale, type GetImagesFromPointOfSaleInput, type GetImagesFromPointOfSaleQueryParams, type GetImagesFromPointOfSaleResponse, type GetImagesInput, type GetImagesQueryParams, type GetImagesResponse, type Image, type ImagesQueryParams, UpdateImage, type UpdateImageInput, type UpdateImageResponse, UploadImage, type UploadImageInput, type UploadImageResponse, createImageUploadFormData, deleteImageInputSchema, deleteImageResponseSchema, getImageDetailsInputSchema, getImageDetailsResponseSchema, getImageTagsFromPointOfSaleInputSchema, getImageTagsFromPointOfSaleResponseSchema, getImagesFromPointOfSaleInputSchema, getImagesFromPointOfSaleQuerySchema, getImagesFromPointOfSaleResponseSchema, getImagesInputSchema, getImagesQuerySchema, getImagesResponseSchema, type imageIri, imageIriSchema, type imageNullableIri, imageNullableIriSchema, imageSchema, imagesQuerySchema, updateImageInputSchema, updateImageResponseSchema, uploadImageInputSchema, uploadImageResponseSchema };
|