@sokol111/ecommerce-image-service-api 1.0.25 → 1.0.27
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/api.d.ts +84 -1
- package/dist/api.js +81 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Image Service API
|
|
3
3
|
* API for managing images
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0.
|
|
5
|
+
* The version of the OpenAPI document: 1.0.27
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -13,6 +13,46 @@ import type { Configuration } from './configuration';
|
|
|
13
13
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
14
|
import type { RequestArgs } from './base';
|
|
15
15
|
import { BaseAPI } from './base';
|
|
16
|
+
export interface BatchUrlRequest {
|
|
17
|
+
/**
|
|
18
|
+
* List of image IDs to get URLs for (max 50)
|
|
19
|
+
*/
|
|
20
|
+
'imageIds': Array<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Width in pixels
|
|
23
|
+
*/
|
|
24
|
+
'w'?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Height in pixels
|
|
27
|
+
*/
|
|
28
|
+
'h'?: number;
|
|
29
|
+
'fit'?: BatchUrlRequestFitEnum;
|
|
30
|
+
'format'?: BatchUrlRequestFormatEnum;
|
|
31
|
+
'quality'?: number;
|
|
32
|
+
}
|
|
33
|
+
export declare const BatchUrlRequestFitEnum: {
|
|
34
|
+
readonly Cover: "cover";
|
|
35
|
+
readonly Contain: "contain";
|
|
36
|
+
readonly Fill: "fill";
|
|
37
|
+
readonly Inside: "inside";
|
|
38
|
+
readonly Outside: "outside";
|
|
39
|
+
};
|
|
40
|
+
export type BatchUrlRequestFitEnum = typeof BatchUrlRequestFitEnum[keyof typeof BatchUrlRequestFitEnum];
|
|
41
|
+
export declare const BatchUrlRequestFormatEnum: {
|
|
42
|
+
readonly Original: "original";
|
|
43
|
+
readonly Webp: "webp";
|
|
44
|
+
readonly Avif: "avif";
|
|
45
|
+
readonly Jpeg: "jpeg";
|
|
46
|
+
readonly Png: "png";
|
|
47
|
+
};
|
|
48
|
+
export type BatchUrlRequestFormatEnum = typeof BatchUrlRequestFormatEnum[keyof typeof BatchUrlRequestFormatEnum];
|
|
49
|
+
export interface BatchUrlResponse {
|
|
50
|
+
'urls': Array<ImageUrl>;
|
|
51
|
+
/**
|
|
52
|
+
* Image IDs that were not found
|
|
53
|
+
*/
|
|
54
|
+
'notFound'?: Array<string>;
|
|
55
|
+
}
|
|
16
56
|
export interface ConfirmRequest {
|
|
17
57
|
/**
|
|
18
58
|
* Signed JWT token from presign response
|
|
@@ -74,6 +114,11 @@ export declare const ImageStatus: {
|
|
|
74
114
|
readonly Deleted: "deleted";
|
|
75
115
|
};
|
|
76
116
|
export type ImageStatus = typeof ImageStatus[keyof typeof ImageStatus];
|
|
117
|
+
export interface ImageUrl {
|
|
118
|
+
'imageId': string;
|
|
119
|
+
'url': string;
|
|
120
|
+
'expiresAt'?: string;
|
|
121
|
+
}
|
|
77
122
|
export interface ListImages200Response {
|
|
78
123
|
'items'?: Array<Image>;
|
|
79
124
|
'page'?: number;
|
|
@@ -215,6 +260,14 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
|
|
|
215
260
|
* @throws {RequiredError}
|
|
216
261
|
*/
|
|
217
262
|
getDeliveryUrl: (id: string, variant?: string, w?: number, h?: number, fit?: GetDeliveryUrlFitEnum, format?: GetDeliveryUrlFormatEnum, quality?: number, dpr?: number, ttlSeconds?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
* @summary Generate signed imgproxy URLs for multiple images in a single request
|
|
266
|
+
* @param {BatchUrlRequest} batchUrlRequest
|
|
267
|
+
* @param {*} [options] Override http request option.
|
|
268
|
+
* @throws {RequiredError}
|
|
269
|
+
*/
|
|
270
|
+
getDeliveryUrls: (batchUrlRequest: BatchUrlRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
218
271
|
/**
|
|
219
272
|
*
|
|
220
273
|
* @summary Get image metadata
|
|
@@ -306,6 +359,14 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
|
306
359
|
* @throws {RequiredError}
|
|
307
360
|
*/
|
|
308
361
|
getDeliveryUrl(id: string, variant?: string, w?: number, h?: number, fit?: GetDeliveryUrlFitEnum, format?: GetDeliveryUrlFormatEnum, quality?: number, dpr?: number, ttlSeconds?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDeliveryUrl200Response>>;
|
|
362
|
+
/**
|
|
363
|
+
*
|
|
364
|
+
* @summary Generate signed imgproxy URLs for multiple images in a single request
|
|
365
|
+
* @param {BatchUrlRequest} batchUrlRequest
|
|
366
|
+
* @param {*} [options] Override http request option.
|
|
367
|
+
* @throws {RequiredError}
|
|
368
|
+
*/
|
|
369
|
+
getDeliveryUrls(batchUrlRequest: BatchUrlRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BatchUrlResponse>>;
|
|
309
370
|
/**
|
|
310
371
|
*
|
|
311
372
|
* @summary Get image metadata
|
|
@@ -388,6 +449,14 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
|
|
|
388
449
|
* @throws {RequiredError}
|
|
389
450
|
*/
|
|
390
451
|
getDeliveryUrl(requestParameters: DefaultApiGetDeliveryUrlRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetDeliveryUrl200Response>;
|
|
452
|
+
/**
|
|
453
|
+
*
|
|
454
|
+
* @summary Generate signed imgproxy URLs for multiple images in a single request
|
|
455
|
+
* @param {DefaultApiGetDeliveryUrlsRequest} requestParameters Request parameters.
|
|
456
|
+
* @param {*} [options] Override http request option.
|
|
457
|
+
* @throws {RequiredError}
|
|
458
|
+
*/
|
|
459
|
+
getDeliveryUrls(requestParameters: DefaultApiGetDeliveryUrlsRequest, options?: RawAxiosRequestConfig): AxiosPromise<BatchUrlResponse>;
|
|
391
460
|
/**
|
|
392
461
|
*
|
|
393
462
|
* @summary Get image metadata
|
|
@@ -462,6 +531,12 @@ export interface DefaultApiGetDeliveryUrlRequest {
|
|
|
462
531
|
readonly dpr?: number;
|
|
463
532
|
readonly ttlSeconds?: number;
|
|
464
533
|
}
|
|
534
|
+
/**
|
|
535
|
+
* Request parameters for getDeliveryUrls operation in DefaultApi.
|
|
536
|
+
*/
|
|
537
|
+
export interface DefaultApiGetDeliveryUrlsRequest {
|
|
538
|
+
readonly batchUrlRequest: BatchUrlRequest;
|
|
539
|
+
}
|
|
465
540
|
/**
|
|
466
541
|
* Request parameters for getImage operation in DefaultApi.
|
|
467
542
|
*/
|
|
@@ -533,6 +608,14 @@ export declare class DefaultApi extends BaseAPI {
|
|
|
533
608
|
* @throws {RequiredError}
|
|
534
609
|
*/
|
|
535
610
|
getDeliveryUrl(requestParameters: DefaultApiGetDeliveryUrlRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDeliveryUrl200Response, any, {}>>;
|
|
611
|
+
/**
|
|
612
|
+
*
|
|
613
|
+
* @summary Generate signed imgproxy URLs for multiple images in a single request
|
|
614
|
+
* @param {DefaultApiGetDeliveryUrlsRequest} requestParameters Request parameters.
|
|
615
|
+
* @param {*} [options] Override http request option.
|
|
616
|
+
* @throws {RequiredError}
|
|
617
|
+
*/
|
|
618
|
+
getDeliveryUrls(requestParameters: DefaultApiGetDeliveryUrlsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<BatchUrlResponse, any, {}>>;
|
|
536
619
|
/**
|
|
537
620
|
*
|
|
538
621
|
* @summary Get image metadata
|
package/dist/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Image Service API
|
|
5
5
|
* API for managing images
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.0.
|
|
7
|
+
* The version of the OpenAPI document: 1.0.27
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -26,6 +26,20 @@ import globalAxios from 'axios';
|
|
|
26
26
|
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import { BASE_PATH, BaseAPI, operationServerMap } from './base';
|
|
29
|
+
export const BatchUrlRequestFitEnum = {
|
|
30
|
+
Cover: 'cover',
|
|
31
|
+
Contain: 'contain',
|
|
32
|
+
Fill: 'fill',
|
|
33
|
+
Inside: 'inside',
|
|
34
|
+
Outside: 'outside'
|
|
35
|
+
};
|
|
36
|
+
export const BatchUrlRequestFormatEnum = {
|
|
37
|
+
Original: 'original',
|
|
38
|
+
Webp: 'webp',
|
|
39
|
+
Avif: 'avif',
|
|
40
|
+
Jpeg: 'jpeg',
|
|
41
|
+
Png: 'png'
|
|
42
|
+
};
|
|
29
43
|
export const ImageRole = {
|
|
30
44
|
Main: 'main',
|
|
31
45
|
Gallery: 'gallery',
|
|
@@ -209,6 +223,36 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
209
223
|
options: localVarRequestOptions,
|
|
210
224
|
};
|
|
211
225
|
}),
|
|
226
|
+
/**
|
|
227
|
+
*
|
|
228
|
+
* @summary Generate signed imgproxy URLs for multiple images in a single request
|
|
229
|
+
* @param {BatchUrlRequest} batchUrlRequest
|
|
230
|
+
* @param {*} [options] Override http request option.
|
|
231
|
+
* @throws {RequiredError}
|
|
232
|
+
*/
|
|
233
|
+
getDeliveryUrls: (batchUrlRequest_1, ...args_1) => __awaiter(this, [batchUrlRequest_1, ...args_1], void 0, function* (batchUrlRequest, options = {}) {
|
|
234
|
+
// verify required parameter 'batchUrlRequest' is not null or undefined
|
|
235
|
+
assertParamExists('getDeliveryUrls', 'batchUrlRequest', batchUrlRequest);
|
|
236
|
+
const localVarPath = `/v1/images/urls`;
|
|
237
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
238
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
239
|
+
let baseOptions;
|
|
240
|
+
if (configuration) {
|
|
241
|
+
baseOptions = configuration.baseOptions;
|
|
242
|
+
}
|
|
243
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
244
|
+
const localVarHeaderParameter = {};
|
|
245
|
+
const localVarQueryParameter = {};
|
|
246
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
247
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
248
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
249
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
250
|
+
localVarRequestOptions.data = serializeDataIfNeeded(batchUrlRequest, localVarRequestOptions, configuration);
|
|
251
|
+
return {
|
|
252
|
+
url: toPathString(localVarUrlObj),
|
|
253
|
+
options: localVarRequestOptions,
|
|
254
|
+
};
|
|
255
|
+
}),
|
|
212
256
|
/**
|
|
213
257
|
*
|
|
214
258
|
* @summary Get image metadata
|
|
@@ -458,6 +502,22 @@ export const DefaultApiFp = function (configuration) {
|
|
|
458
502
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
459
503
|
});
|
|
460
504
|
},
|
|
505
|
+
/**
|
|
506
|
+
*
|
|
507
|
+
* @summary Generate signed imgproxy URLs for multiple images in a single request
|
|
508
|
+
* @param {BatchUrlRequest} batchUrlRequest
|
|
509
|
+
* @param {*} [options] Override http request option.
|
|
510
|
+
* @throws {RequiredError}
|
|
511
|
+
*/
|
|
512
|
+
getDeliveryUrls(batchUrlRequest, options) {
|
|
513
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
514
|
+
var _a, _b, _c;
|
|
515
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getDeliveryUrls(batchUrlRequest, options);
|
|
516
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
517
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.getDeliveryUrls']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
518
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
519
|
+
});
|
|
520
|
+
},
|
|
461
521
|
/**
|
|
462
522
|
*
|
|
463
523
|
* @summary Get image metadata
|
|
@@ -591,6 +651,16 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
591
651
|
getDeliveryUrl(requestParameters, options) {
|
|
592
652
|
return localVarFp.getDeliveryUrl(requestParameters.id, requestParameters.variant, requestParameters.w, requestParameters.h, requestParameters.fit, requestParameters.format, requestParameters.quality, requestParameters.dpr, requestParameters.ttlSeconds, options).then((request) => request(axios, basePath));
|
|
593
653
|
},
|
|
654
|
+
/**
|
|
655
|
+
*
|
|
656
|
+
* @summary Generate signed imgproxy URLs for multiple images in a single request
|
|
657
|
+
* @param {DefaultApiGetDeliveryUrlsRequest} requestParameters Request parameters.
|
|
658
|
+
* @param {*} [options] Override http request option.
|
|
659
|
+
* @throws {RequiredError}
|
|
660
|
+
*/
|
|
661
|
+
getDeliveryUrls(requestParameters, options) {
|
|
662
|
+
return localVarFp.getDeliveryUrls(requestParameters.batchUrlRequest, options).then((request) => request(axios, basePath));
|
|
663
|
+
},
|
|
594
664
|
/**
|
|
595
665
|
*
|
|
596
666
|
* @summary Get image metadata
|
|
@@ -687,6 +757,16 @@ export class DefaultApi extends BaseAPI {
|
|
|
687
757
|
getDeliveryUrl(requestParameters, options) {
|
|
688
758
|
return DefaultApiFp(this.configuration).getDeliveryUrl(requestParameters.id, requestParameters.variant, requestParameters.w, requestParameters.h, requestParameters.fit, requestParameters.format, requestParameters.quality, requestParameters.dpr, requestParameters.ttlSeconds, options).then((request) => request(this.axios, this.basePath));
|
|
689
759
|
}
|
|
760
|
+
/**
|
|
761
|
+
*
|
|
762
|
+
* @summary Generate signed imgproxy URLs for multiple images in a single request
|
|
763
|
+
* @param {DefaultApiGetDeliveryUrlsRequest} requestParameters Request parameters.
|
|
764
|
+
* @param {*} [options] Override http request option.
|
|
765
|
+
* @throws {RequiredError}
|
|
766
|
+
*/
|
|
767
|
+
getDeliveryUrls(requestParameters, options) {
|
|
768
|
+
return DefaultApiFp(this.configuration).getDeliveryUrls(requestParameters.batchUrlRequest, options).then((request) => request(this.axios, this.basePath));
|
|
769
|
+
}
|
|
690
770
|
/**
|
|
691
771
|
*
|
|
692
772
|
* @summary Get image metadata
|
package/dist/base.d.ts
CHANGED
package/dist/base.js
CHANGED
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sokol111/ecommerce-image-service-api",
|
|
3
3
|
"description": "Generated TypeScript Axios client from OpenAPI for ecommerce-image-service-api",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.27",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"module": "dist/index.js",
|