@deliverart/sdk-js-image 2.5.34 → 2.6.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/dist/index.cjs +6 -16
- package/dist/index.d.cts +120 -17
- package/dist/index.d.ts +120 -17
- package/dist/index.js +8 -24
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -11265,7 +11265,7 @@ var import_sdk_js_core3 = require("@deliverart/sdk-js-core");
|
|
|
11265
11265
|
var import_sdk_js_global_types3 = require("@deliverart/sdk-js-global-types");
|
|
11266
11266
|
var getImagesQuerySchema = imagesQuerySchema;
|
|
11267
11267
|
var getImagesInputSchema = external_exports.undefined();
|
|
11268
|
-
var getImagesResponseSchema = (0, import_sdk_js_global_types3.
|
|
11268
|
+
var getImagesResponseSchema = (0, import_sdk_js_global_types3.mixedPaginationSchema)(imageSchema);
|
|
11269
11269
|
var GetImages = class extends import_sdk_js_core3.AbstractApiRequest {
|
|
11270
11270
|
constructor(options) {
|
|
11271
11271
|
super(void 0, options);
|
|
@@ -11276,17 +11276,12 @@ var GetImages = class extends import_sdk_js_core3.AbstractApiRequest {
|
|
|
11276
11276
|
this.outputSchema = getImagesResponseSchema;
|
|
11277
11277
|
this.querySchema = getImagesQuerySchema;
|
|
11278
11278
|
this.headersSchema = void 0;
|
|
11279
|
+
this.listItemSchema = imageSchema;
|
|
11280
|
+
this.paginationDefaultEnabled = true;
|
|
11279
11281
|
}
|
|
11280
11282
|
getPath() {
|
|
11281
11283
|
return "/images";
|
|
11282
11284
|
}
|
|
11283
|
-
parseResponse(data, rawResponse) {
|
|
11284
|
-
const images = external_exports.array(imageSchema).parse(data);
|
|
11285
|
-
return this.validateOutput({
|
|
11286
|
-
data: images,
|
|
11287
|
-
pagination: (0, import_sdk_js_global_types3.responseToPagination)(rawResponse)
|
|
11288
|
-
});
|
|
11289
|
-
}
|
|
11290
11285
|
};
|
|
11291
11286
|
|
|
11292
11287
|
// src/requests/GetImagesFromPointOfSale.ts
|
|
@@ -11294,7 +11289,7 @@ var import_sdk_js_core4 = require("@deliverart/sdk-js-core");
|
|
|
11294
11289
|
var import_sdk_js_global_types4 = require("@deliverart/sdk-js-global-types");
|
|
11295
11290
|
var getImagesFromPointOfSaleQuerySchema = imagesQuerySchema;
|
|
11296
11291
|
var getImagesFromPointOfSaleInputSchema = external_exports.undefined();
|
|
11297
|
-
var getImagesFromPointOfSaleResponseSchema = (0, import_sdk_js_global_types4.
|
|
11292
|
+
var getImagesFromPointOfSaleResponseSchema = (0, import_sdk_js_global_types4.mixedPaginationSchema)(imageSchema);
|
|
11298
11293
|
var GetImagesFromPointOfSale = class extends import_sdk_js_core4.AbstractApiRequest {
|
|
11299
11294
|
constructor(pointOfSaleId, options) {
|
|
11300
11295
|
super(void 0, options);
|
|
@@ -11305,18 +11300,13 @@ var GetImagesFromPointOfSale = class extends import_sdk_js_core4.AbstractApiRequ
|
|
|
11305
11300
|
this.outputSchema = getImagesFromPointOfSaleResponseSchema;
|
|
11306
11301
|
this.querySchema = getImagesFromPointOfSaleQuerySchema;
|
|
11307
11302
|
this.headersSchema = void 0;
|
|
11303
|
+
this.listItemSchema = imageSchema;
|
|
11304
|
+
this.paginationDefaultEnabled = true;
|
|
11308
11305
|
this.pointOfSaleId = pointOfSaleId;
|
|
11309
11306
|
}
|
|
11310
11307
|
getPath() {
|
|
11311
11308
|
return `/point_of_sales/${this.pointOfSaleId}/images`;
|
|
11312
11309
|
}
|
|
11313
|
-
parseResponse(data, rawResponse) {
|
|
11314
|
-
const images = external_exports.array(imageSchema).parse(data);
|
|
11315
|
-
return this.validateOutput({
|
|
11316
|
-
data: images,
|
|
11317
|
-
pagination: (0, import_sdk_js_global_types4.responseToPagination)(rawResponse)
|
|
11318
|
-
});
|
|
11319
|
-
}
|
|
11320
11310
|
};
|
|
11321
11311
|
|
|
11322
11312
|
// src/requests/GetImageTagsFromPointOfSale.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
3
3
|
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
4
|
-
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
5
4
|
|
|
6
5
|
declare const imageSchema: z.ZodObject<{
|
|
7
6
|
id: z.ZodString;
|
|
@@ -111,7 +110,7 @@ declare const getImagesQuerySchema: z.ZodObject<{
|
|
|
111
110
|
type GetImagesQueryParams = z.infer<typeof getImagesQuerySchema>;
|
|
112
111
|
declare const getImagesInputSchema: z.ZodUndefined;
|
|
113
112
|
type GetImagesInput = z.infer<typeof getImagesInputSchema>;
|
|
114
|
-
declare const getImagesResponseSchema: z.ZodObject<{
|
|
113
|
+
declare const getImagesResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
115
114
|
data: z.ZodArray<z.ZodObject<{
|
|
116
115
|
id: z.ZodString;
|
|
117
116
|
variant: z.ZodNullable<z.ZodString>;
|
|
@@ -138,14 +137,31 @@ declare const getImagesResponseSchema: z.ZodObject<{
|
|
|
138
137
|
currentPage: z.ZodCoercedNumber<unknown>;
|
|
139
138
|
lastPage: z.ZodCoercedNumber<unknown>;
|
|
140
139
|
}, z.core.$strip>;
|
|
141
|
-
}, z.core.$strip
|
|
140
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
143
|
+
contentUrl: z.ZodURL;
|
|
144
|
+
filePath: z.ZodString;
|
|
145
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
146
|
+
createdAt: z.ZodString;
|
|
147
|
+
updatedAt: z.ZodString;
|
|
148
|
+
variants: z.ZodDefault<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
|
+
}, z.core.$strip>>>;
|
|
157
|
+
}, z.core.$strip>>]>;
|
|
142
158
|
type GetImagesResponse = z.infer<typeof getImagesResponseSchema>;
|
|
143
159
|
declare class GetImages extends AbstractApiRequest<typeof getImagesInputSchema, typeof getImagesResponseSchema, GetImagesQueryParams> {
|
|
144
|
-
readonly method
|
|
145
|
-
readonly contentType
|
|
146
|
-
readonly accept
|
|
160
|
+
readonly method: "GET";
|
|
161
|
+
readonly contentType: "application/json";
|
|
162
|
+
readonly accept: "application/json";
|
|
147
163
|
readonly inputSchema: z.ZodUndefined;
|
|
148
|
-
readonly outputSchema: z.ZodObject<{
|
|
164
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
149
165
|
data: z.ZodArray<z.ZodObject<{
|
|
150
166
|
id: z.ZodString;
|
|
151
167
|
variant: z.ZodNullable<z.ZodString>;
|
|
@@ -172,7 +188,24 @@ declare class GetImages extends AbstractApiRequest<typeof getImagesInputSchema,
|
|
|
172
188
|
currentPage: z.ZodCoercedNumber<unknown>;
|
|
173
189
|
lastPage: z.ZodCoercedNumber<unknown>;
|
|
174
190
|
}, z.core.$strip>;
|
|
175
|
-
}, z.core.$strip
|
|
191
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
194
|
+
contentUrl: z.ZodURL;
|
|
195
|
+
filePath: z.ZodString;
|
|
196
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
197
|
+
createdAt: z.ZodString;
|
|
198
|
+
updatedAt: z.ZodString;
|
|
199
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
200
|
+
id: z.ZodString;
|
|
201
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
202
|
+
contentUrl: z.ZodURL;
|
|
203
|
+
filePath: z.ZodString;
|
|
204
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
205
|
+
createdAt: z.ZodString;
|
|
206
|
+
updatedAt: z.ZodString;
|
|
207
|
+
}, z.core.$strip>>>;
|
|
208
|
+
}, z.core.$strip>>]>;
|
|
176
209
|
readonly querySchema: z.ZodObject<{
|
|
177
210
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
178
211
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -183,11 +216,29 @@ declare class GetImages extends AbstractApiRequest<typeof getImagesInputSchema,
|
|
|
183
216
|
'exists[original]': z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
184
217
|
}, z.core.$strip>;
|
|
185
218
|
readonly headersSchema: undefined;
|
|
219
|
+
readonly listItemSchema: z.ZodObject<{
|
|
220
|
+
id: z.ZodString;
|
|
221
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
222
|
+
contentUrl: z.ZodURL;
|
|
223
|
+
filePath: z.ZodString;
|
|
224
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
225
|
+
createdAt: z.ZodString;
|
|
226
|
+
updatedAt: z.ZodString;
|
|
227
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
230
|
+
contentUrl: z.ZodURL;
|
|
231
|
+
filePath: z.ZodString;
|
|
232
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
233
|
+
createdAt: z.ZodString;
|
|
234
|
+
updatedAt: z.ZodString;
|
|
235
|
+
}, z.core.$strip>>>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
readonly paginationDefaultEnabled = true;
|
|
186
238
|
constructor(options?: {
|
|
187
239
|
query?: GetImagesQueryParams;
|
|
188
240
|
});
|
|
189
241
|
getPath(): string;
|
|
190
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Image>;
|
|
191
242
|
}
|
|
192
243
|
|
|
193
244
|
declare const getImagesFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
@@ -202,7 +253,7 @@ declare const getImagesFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
|
202
253
|
type GetImagesFromPointOfSaleQueryParams = z.infer<typeof getImagesFromPointOfSaleQuerySchema>;
|
|
203
254
|
declare const getImagesFromPointOfSaleInputSchema: z.ZodUndefined;
|
|
204
255
|
type GetImagesFromPointOfSaleInput = z.infer<typeof getImagesFromPointOfSaleInputSchema>;
|
|
205
|
-
declare const getImagesFromPointOfSaleResponseSchema: z.ZodObject<{
|
|
256
|
+
declare const getImagesFromPointOfSaleResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
206
257
|
data: z.ZodArray<z.ZodObject<{
|
|
207
258
|
id: z.ZodString;
|
|
208
259
|
variant: z.ZodNullable<z.ZodString>;
|
|
@@ -229,14 +280,31 @@ declare const getImagesFromPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
229
280
|
currentPage: z.ZodCoercedNumber<unknown>;
|
|
230
281
|
lastPage: z.ZodCoercedNumber<unknown>;
|
|
231
282
|
}, z.core.$strip>;
|
|
232
|
-
}, z.core.$strip
|
|
283
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
284
|
+
id: z.ZodString;
|
|
285
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
286
|
+
contentUrl: z.ZodURL;
|
|
287
|
+
filePath: z.ZodString;
|
|
288
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
289
|
+
createdAt: z.ZodString;
|
|
290
|
+
updatedAt: z.ZodString;
|
|
291
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
292
|
+
id: z.ZodString;
|
|
293
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
294
|
+
contentUrl: z.ZodURL;
|
|
295
|
+
filePath: z.ZodString;
|
|
296
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
297
|
+
createdAt: z.ZodString;
|
|
298
|
+
updatedAt: z.ZodString;
|
|
299
|
+
}, z.core.$strip>>>;
|
|
300
|
+
}, z.core.$strip>>]>;
|
|
233
301
|
type GetImagesFromPointOfSaleResponse = z.infer<typeof getImagesFromPointOfSaleResponseSchema>;
|
|
234
302
|
declare class GetImagesFromPointOfSale extends AbstractApiRequest<typeof getImagesFromPointOfSaleInputSchema, typeof getImagesFromPointOfSaleResponseSchema, GetImagesFromPointOfSaleQueryParams> {
|
|
235
|
-
readonly method
|
|
236
|
-
readonly contentType
|
|
237
|
-
readonly accept
|
|
303
|
+
readonly method: "GET";
|
|
304
|
+
readonly contentType: "application/json";
|
|
305
|
+
readonly accept: "application/json";
|
|
238
306
|
readonly inputSchema: z.ZodUndefined;
|
|
239
|
-
readonly outputSchema: z.ZodObject<{
|
|
307
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
240
308
|
data: z.ZodArray<z.ZodObject<{
|
|
241
309
|
id: z.ZodString;
|
|
242
310
|
variant: z.ZodNullable<z.ZodString>;
|
|
@@ -263,7 +331,24 @@ declare class GetImagesFromPointOfSale extends AbstractApiRequest<typeof getImag
|
|
|
263
331
|
currentPage: z.ZodCoercedNumber<unknown>;
|
|
264
332
|
lastPage: z.ZodCoercedNumber<unknown>;
|
|
265
333
|
}, z.core.$strip>;
|
|
266
|
-
}, z.core.$strip
|
|
334
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
335
|
+
id: z.ZodString;
|
|
336
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
337
|
+
contentUrl: z.ZodURL;
|
|
338
|
+
filePath: z.ZodString;
|
|
339
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
340
|
+
createdAt: z.ZodString;
|
|
341
|
+
updatedAt: z.ZodString;
|
|
342
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
343
|
+
id: z.ZodString;
|
|
344
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
345
|
+
contentUrl: z.ZodURL;
|
|
346
|
+
filePath: z.ZodString;
|
|
347
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
348
|
+
createdAt: z.ZodString;
|
|
349
|
+
updatedAt: z.ZodString;
|
|
350
|
+
}, z.core.$strip>>>;
|
|
351
|
+
}, z.core.$strip>>]>;
|
|
267
352
|
readonly querySchema: z.ZodObject<{
|
|
268
353
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
269
354
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -274,12 +359,30 @@ declare class GetImagesFromPointOfSale extends AbstractApiRequest<typeof getImag
|
|
|
274
359
|
'exists[original]': z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
275
360
|
}, z.core.$strip>;
|
|
276
361
|
readonly headersSchema: undefined;
|
|
362
|
+
readonly listItemSchema: z.ZodObject<{
|
|
363
|
+
id: z.ZodString;
|
|
364
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
365
|
+
contentUrl: z.ZodURL;
|
|
366
|
+
filePath: z.ZodString;
|
|
367
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
368
|
+
createdAt: z.ZodString;
|
|
369
|
+
updatedAt: z.ZodString;
|
|
370
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
371
|
+
id: z.ZodString;
|
|
372
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
373
|
+
contentUrl: z.ZodURL;
|
|
374
|
+
filePath: z.ZodString;
|
|
375
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
376
|
+
createdAt: z.ZodString;
|
|
377
|
+
updatedAt: z.ZodString;
|
|
378
|
+
}, z.core.$strip>>>;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
readonly paginationDefaultEnabled = true;
|
|
277
381
|
private readonly pointOfSaleId;
|
|
278
382
|
constructor(pointOfSaleId: string, options?: {
|
|
279
383
|
query?: GetImagesFromPointOfSaleQueryParams;
|
|
280
384
|
});
|
|
281
385
|
getPath(): string;
|
|
282
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Image>;
|
|
283
386
|
}
|
|
284
387
|
|
|
285
388
|
declare const getImageTagsFromPointOfSaleInputSchema: z.ZodUndefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
3
3
|
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
4
|
-
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
5
4
|
|
|
6
5
|
declare const imageSchema: z.ZodObject<{
|
|
7
6
|
id: z.ZodString;
|
|
@@ -111,7 +110,7 @@ declare const getImagesQuerySchema: z.ZodObject<{
|
|
|
111
110
|
type GetImagesQueryParams = z.infer<typeof getImagesQuerySchema>;
|
|
112
111
|
declare const getImagesInputSchema: z.ZodUndefined;
|
|
113
112
|
type GetImagesInput = z.infer<typeof getImagesInputSchema>;
|
|
114
|
-
declare const getImagesResponseSchema: z.ZodObject<{
|
|
113
|
+
declare const getImagesResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
115
114
|
data: z.ZodArray<z.ZodObject<{
|
|
116
115
|
id: z.ZodString;
|
|
117
116
|
variant: z.ZodNullable<z.ZodString>;
|
|
@@ -138,14 +137,31 @@ declare const getImagesResponseSchema: z.ZodObject<{
|
|
|
138
137
|
currentPage: z.ZodCoercedNumber<unknown>;
|
|
139
138
|
lastPage: z.ZodCoercedNumber<unknown>;
|
|
140
139
|
}, z.core.$strip>;
|
|
141
|
-
}, z.core.$strip
|
|
140
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
143
|
+
contentUrl: z.ZodURL;
|
|
144
|
+
filePath: z.ZodString;
|
|
145
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
146
|
+
createdAt: z.ZodString;
|
|
147
|
+
updatedAt: z.ZodString;
|
|
148
|
+
variants: z.ZodDefault<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
|
+
}, z.core.$strip>>>;
|
|
157
|
+
}, z.core.$strip>>]>;
|
|
142
158
|
type GetImagesResponse = z.infer<typeof getImagesResponseSchema>;
|
|
143
159
|
declare class GetImages extends AbstractApiRequest<typeof getImagesInputSchema, typeof getImagesResponseSchema, GetImagesQueryParams> {
|
|
144
|
-
readonly method
|
|
145
|
-
readonly contentType
|
|
146
|
-
readonly accept
|
|
160
|
+
readonly method: "GET";
|
|
161
|
+
readonly contentType: "application/json";
|
|
162
|
+
readonly accept: "application/json";
|
|
147
163
|
readonly inputSchema: z.ZodUndefined;
|
|
148
|
-
readonly outputSchema: z.ZodObject<{
|
|
164
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
149
165
|
data: z.ZodArray<z.ZodObject<{
|
|
150
166
|
id: z.ZodString;
|
|
151
167
|
variant: z.ZodNullable<z.ZodString>;
|
|
@@ -172,7 +188,24 @@ declare class GetImages extends AbstractApiRequest<typeof getImagesInputSchema,
|
|
|
172
188
|
currentPage: z.ZodCoercedNumber<unknown>;
|
|
173
189
|
lastPage: z.ZodCoercedNumber<unknown>;
|
|
174
190
|
}, z.core.$strip>;
|
|
175
|
-
}, z.core.$strip
|
|
191
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
194
|
+
contentUrl: z.ZodURL;
|
|
195
|
+
filePath: z.ZodString;
|
|
196
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
197
|
+
createdAt: z.ZodString;
|
|
198
|
+
updatedAt: z.ZodString;
|
|
199
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
200
|
+
id: z.ZodString;
|
|
201
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
202
|
+
contentUrl: z.ZodURL;
|
|
203
|
+
filePath: z.ZodString;
|
|
204
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
205
|
+
createdAt: z.ZodString;
|
|
206
|
+
updatedAt: z.ZodString;
|
|
207
|
+
}, z.core.$strip>>>;
|
|
208
|
+
}, z.core.$strip>>]>;
|
|
176
209
|
readonly querySchema: z.ZodObject<{
|
|
177
210
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
178
211
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -183,11 +216,29 @@ declare class GetImages extends AbstractApiRequest<typeof getImagesInputSchema,
|
|
|
183
216
|
'exists[original]': z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
184
217
|
}, z.core.$strip>;
|
|
185
218
|
readonly headersSchema: undefined;
|
|
219
|
+
readonly listItemSchema: z.ZodObject<{
|
|
220
|
+
id: z.ZodString;
|
|
221
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
222
|
+
contentUrl: z.ZodURL;
|
|
223
|
+
filePath: z.ZodString;
|
|
224
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
225
|
+
createdAt: z.ZodString;
|
|
226
|
+
updatedAt: z.ZodString;
|
|
227
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
230
|
+
contentUrl: z.ZodURL;
|
|
231
|
+
filePath: z.ZodString;
|
|
232
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
233
|
+
createdAt: z.ZodString;
|
|
234
|
+
updatedAt: z.ZodString;
|
|
235
|
+
}, z.core.$strip>>>;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
readonly paginationDefaultEnabled = true;
|
|
186
238
|
constructor(options?: {
|
|
187
239
|
query?: GetImagesQueryParams;
|
|
188
240
|
});
|
|
189
241
|
getPath(): string;
|
|
190
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Image>;
|
|
191
242
|
}
|
|
192
243
|
|
|
193
244
|
declare const getImagesFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
@@ -202,7 +253,7 @@ declare const getImagesFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
|
202
253
|
type GetImagesFromPointOfSaleQueryParams = z.infer<typeof getImagesFromPointOfSaleQuerySchema>;
|
|
203
254
|
declare const getImagesFromPointOfSaleInputSchema: z.ZodUndefined;
|
|
204
255
|
type GetImagesFromPointOfSaleInput = z.infer<typeof getImagesFromPointOfSaleInputSchema>;
|
|
205
|
-
declare const getImagesFromPointOfSaleResponseSchema: z.ZodObject<{
|
|
256
|
+
declare const getImagesFromPointOfSaleResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
206
257
|
data: z.ZodArray<z.ZodObject<{
|
|
207
258
|
id: z.ZodString;
|
|
208
259
|
variant: z.ZodNullable<z.ZodString>;
|
|
@@ -229,14 +280,31 @@ declare const getImagesFromPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
229
280
|
currentPage: z.ZodCoercedNumber<unknown>;
|
|
230
281
|
lastPage: z.ZodCoercedNumber<unknown>;
|
|
231
282
|
}, z.core.$strip>;
|
|
232
|
-
}, z.core.$strip
|
|
283
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
284
|
+
id: z.ZodString;
|
|
285
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
286
|
+
contentUrl: z.ZodURL;
|
|
287
|
+
filePath: z.ZodString;
|
|
288
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
289
|
+
createdAt: z.ZodString;
|
|
290
|
+
updatedAt: z.ZodString;
|
|
291
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
292
|
+
id: z.ZodString;
|
|
293
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
294
|
+
contentUrl: z.ZodURL;
|
|
295
|
+
filePath: z.ZodString;
|
|
296
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
297
|
+
createdAt: z.ZodString;
|
|
298
|
+
updatedAt: z.ZodString;
|
|
299
|
+
}, z.core.$strip>>>;
|
|
300
|
+
}, z.core.$strip>>]>;
|
|
233
301
|
type GetImagesFromPointOfSaleResponse = z.infer<typeof getImagesFromPointOfSaleResponseSchema>;
|
|
234
302
|
declare class GetImagesFromPointOfSale extends AbstractApiRequest<typeof getImagesFromPointOfSaleInputSchema, typeof getImagesFromPointOfSaleResponseSchema, GetImagesFromPointOfSaleQueryParams> {
|
|
235
|
-
readonly method
|
|
236
|
-
readonly contentType
|
|
237
|
-
readonly accept
|
|
303
|
+
readonly method: "GET";
|
|
304
|
+
readonly contentType: "application/json";
|
|
305
|
+
readonly accept: "application/json";
|
|
238
306
|
readonly inputSchema: z.ZodUndefined;
|
|
239
|
-
readonly outputSchema: z.ZodObject<{
|
|
307
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
240
308
|
data: z.ZodArray<z.ZodObject<{
|
|
241
309
|
id: z.ZodString;
|
|
242
310
|
variant: z.ZodNullable<z.ZodString>;
|
|
@@ -263,7 +331,24 @@ declare class GetImagesFromPointOfSale extends AbstractApiRequest<typeof getImag
|
|
|
263
331
|
currentPage: z.ZodCoercedNumber<unknown>;
|
|
264
332
|
lastPage: z.ZodCoercedNumber<unknown>;
|
|
265
333
|
}, z.core.$strip>;
|
|
266
|
-
}, z.core.$strip
|
|
334
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
335
|
+
id: z.ZodString;
|
|
336
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
337
|
+
contentUrl: z.ZodURL;
|
|
338
|
+
filePath: z.ZodString;
|
|
339
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
340
|
+
createdAt: z.ZodString;
|
|
341
|
+
updatedAt: z.ZodString;
|
|
342
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
343
|
+
id: z.ZodString;
|
|
344
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
345
|
+
contentUrl: z.ZodURL;
|
|
346
|
+
filePath: z.ZodString;
|
|
347
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
348
|
+
createdAt: z.ZodString;
|
|
349
|
+
updatedAt: z.ZodString;
|
|
350
|
+
}, z.core.$strip>>>;
|
|
351
|
+
}, z.core.$strip>>]>;
|
|
267
352
|
readonly querySchema: z.ZodObject<{
|
|
268
353
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
269
354
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -274,12 +359,30 @@ declare class GetImagesFromPointOfSale extends AbstractApiRequest<typeof getImag
|
|
|
274
359
|
'exists[original]': z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
275
360
|
}, z.core.$strip>;
|
|
276
361
|
readonly headersSchema: undefined;
|
|
362
|
+
readonly listItemSchema: z.ZodObject<{
|
|
363
|
+
id: z.ZodString;
|
|
364
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
365
|
+
contentUrl: z.ZodURL;
|
|
366
|
+
filePath: z.ZodString;
|
|
367
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
368
|
+
createdAt: z.ZodString;
|
|
369
|
+
updatedAt: z.ZodString;
|
|
370
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
371
|
+
id: z.ZodString;
|
|
372
|
+
variant: z.ZodNullable<z.ZodString>;
|
|
373
|
+
contentUrl: z.ZodURL;
|
|
374
|
+
filePath: z.ZodString;
|
|
375
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
376
|
+
createdAt: z.ZodString;
|
|
377
|
+
updatedAt: z.ZodString;
|
|
378
|
+
}, z.core.$strip>>>;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
readonly paginationDefaultEnabled = true;
|
|
277
381
|
private readonly pointOfSaleId;
|
|
278
382
|
constructor(pointOfSaleId: string, options?: {
|
|
279
383
|
query?: GetImagesFromPointOfSaleQueryParams;
|
|
280
384
|
});
|
|
281
385
|
getPath(): string;
|
|
282
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<Image>;
|
|
283
386
|
}
|
|
284
387
|
|
|
285
388
|
declare const getImageTagsFromPointOfSaleInputSchema: z.ZodUndefined;
|
package/dist/index.js
CHANGED
|
@@ -11219,13 +11219,10 @@ var GetImageDetails = class extends AbstractApiRequest2 {
|
|
|
11219
11219
|
|
|
11220
11220
|
// src/requests/GetImages.ts
|
|
11221
11221
|
import { AbstractApiRequest as AbstractApiRequest3 } from "@deliverart/sdk-js-core";
|
|
11222
|
-
import {
|
|
11223
|
-
createPaginatedSchema,
|
|
11224
|
-
responseToPagination
|
|
11225
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11222
|
+
import { mixedPaginationSchema } from "@deliverart/sdk-js-global-types";
|
|
11226
11223
|
var getImagesQuerySchema = imagesQuerySchema;
|
|
11227
11224
|
var getImagesInputSchema = external_exports.undefined();
|
|
11228
|
-
var getImagesResponseSchema =
|
|
11225
|
+
var getImagesResponseSchema = mixedPaginationSchema(imageSchema);
|
|
11229
11226
|
var GetImages = class extends AbstractApiRequest3 {
|
|
11230
11227
|
constructor(options) {
|
|
11231
11228
|
super(void 0, options);
|
|
@@ -11236,28 +11233,20 @@ var GetImages = class extends AbstractApiRequest3 {
|
|
|
11236
11233
|
this.outputSchema = getImagesResponseSchema;
|
|
11237
11234
|
this.querySchema = getImagesQuerySchema;
|
|
11238
11235
|
this.headersSchema = void 0;
|
|
11236
|
+
this.listItemSchema = imageSchema;
|
|
11237
|
+
this.paginationDefaultEnabled = true;
|
|
11239
11238
|
}
|
|
11240
11239
|
getPath() {
|
|
11241
11240
|
return "/images";
|
|
11242
11241
|
}
|
|
11243
|
-
parseResponse(data, rawResponse) {
|
|
11244
|
-
const images = external_exports.array(imageSchema).parse(data);
|
|
11245
|
-
return this.validateOutput({
|
|
11246
|
-
data: images,
|
|
11247
|
-
pagination: responseToPagination(rawResponse)
|
|
11248
|
-
});
|
|
11249
|
-
}
|
|
11250
11242
|
};
|
|
11251
11243
|
|
|
11252
11244
|
// src/requests/GetImagesFromPointOfSale.ts
|
|
11253
11245
|
import { AbstractApiRequest as AbstractApiRequest4 } from "@deliverart/sdk-js-core";
|
|
11254
|
-
import {
|
|
11255
|
-
createPaginatedSchema as createPaginatedSchema2,
|
|
11256
|
-
responseToPagination as responseToPagination2
|
|
11257
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11246
|
+
import { mixedPaginationSchema as mixedPaginationSchema2 } from "@deliverart/sdk-js-global-types";
|
|
11258
11247
|
var getImagesFromPointOfSaleQuerySchema = imagesQuerySchema;
|
|
11259
11248
|
var getImagesFromPointOfSaleInputSchema = external_exports.undefined();
|
|
11260
|
-
var getImagesFromPointOfSaleResponseSchema =
|
|
11249
|
+
var getImagesFromPointOfSaleResponseSchema = mixedPaginationSchema2(imageSchema);
|
|
11261
11250
|
var GetImagesFromPointOfSale = class extends AbstractApiRequest4 {
|
|
11262
11251
|
constructor(pointOfSaleId, options) {
|
|
11263
11252
|
super(void 0, options);
|
|
@@ -11268,18 +11257,13 @@ var GetImagesFromPointOfSale = class extends AbstractApiRequest4 {
|
|
|
11268
11257
|
this.outputSchema = getImagesFromPointOfSaleResponseSchema;
|
|
11269
11258
|
this.querySchema = getImagesFromPointOfSaleQuerySchema;
|
|
11270
11259
|
this.headersSchema = void 0;
|
|
11260
|
+
this.listItemSchema = imageSchema;
|
|
11261
|
+
this.paginationDefaultEnabled = true;
|
|
11271
11262
|
this.pointOfSaleId = pointOfSaleId;
|
|
11272
11263
|
}
|
|
11273
11264
|
getPath() {
|
|
11274
11265
|
return `/point_of_sales/${this.pointOfSaleId}/images`;
|
|
11275
11266
|
}
|
|
11276
|
-
parseResponse(data, rawResponse) {
|
|
11277
|
-
const images = external_exports.array(imageSchema).parse(data);
|
|
11278
|
-
return this.validateOutput({
|
|
11279
|
-
data: images,
|
|
11280
|
-
pagination: responseToPagination2(rawResponse)
|
|
11281
|
-
});
|
|
11282
|
-
}
|
|
11283
11267
|
};
|
|
11284
11268
|
|
|
11285
11269
|
// src/requests/GetImageTagsFromPointOfSale.ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-image",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for Image Management",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@deliverart/sdk-js-core": "2.
|
|
22
|
-
"@deliverart/sdk-js-global-types": "2.
|
|
23
|
-
"@deliverart/sdk-js-point-of-sale": "2.
|
|
21
|
+
"@deliverart/sdk-js-core": "2.6.1",
|
|
22
|
+
"@deliverart/sdk-js-global-types": "2.6.1",
|
|
23
|
+
"@deliverart/sdk-js-point-of-sale": "2.6.1"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|