@sokol111/ecommerce-image-service-api 1.0.27 → 1.0.28
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 +24 -675
- package/dist/api.js +45 -808
- package/dist/api.schemas.d.ts +277 -0
- package/dist/api.schemas.js +60 -0
- package/dist/index.d.ts +2 -13
- package/dist/index.js +2 -15
- package/package.json +3 -8
- package/dist/base.d.ts +0 -42
- package/dist/base.js +0 -41
- package/dist/common.d.ts +0 -28
- package/dist/common.js +0 -112
- package/dist/configuration.d.ts +0 -98
- package/dist/configuration.js +0 -40
package/dist/api.d.ts
CHANGED
|
@@ -1,675 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
}
|
|
56
|
-
export interface ConfirmRequest {
|
|
57
|
-
/**
|
|
58
|
-
* Signed JWT token from presign response
|
|
59
|
-
*/
|
|
60
|
-
'uploadToken': string;
|
|
61
|
-
'alt': string;
|
|
62
|
-
'role': ImageRole;
|
|
63
|
-
/**
|
|
64
|
-
* e.g., SHA256 hex for additional integrity check
|
|
65
|
-
*/
|
|
66
|
-
'checksum'?: string | null;
|
|
67
|
-
}
|
|
68
|
-
export interface GetDeliveryUrl200Response {
|
|
69
|
-
'url': string;
|
|
70
|
-
'expiresAt'?: string;
|
|
71
|
-
}
|
|
72
|
-
export interface Image {
|
|
73
|
-
'id': string;
|
|
74
|
-
'ownerType': OwnerType;
|
|
75
|
-
'ownerId': string;
|
|
76
|
-
'role': ImageRole;
|
|
77
|
-
/**
|
|
78
|
-
* S3 key of the original image
|
|
79
|
-
*/
|
|
80
|
-
'key': string;
|
|
81
|
-
/**
|
|
82
|
-
* Optional — direct URL if public or via proxy
|
|
83
|
-
*/
|
|
84
|
-
'url'?: string | null;
|
|
85
|
-
'alt': string;
|
|
86
|
-
'mime': string;
|
|
87
|
-
'size': number;
|
|
88
|
-
'hash'?: string | null;
|
|
89
|
-
'status': ImageStatus;
|
|
90
|
-
'variants'?: Array<Variant>;
|
|
91
|
-
'createdAt': string;
|
|
92
|
-
'modifiedAt': string;
|
|
93
|
-
}
|
|
94
|
-
export interface ImagePatch {
|
|
95
|
-
'alt'?: string;
|
|
96
|
-
'role'?: ImageRole;
|
|
97
|
-
/**
|
|
98
|
-
* Position in the product gallery
|
|
99
|
-
*/
|
|
100
|
-
'order'?: number;
|
|
101
|
-
}
|
|
102
|
-
export declare const ImageRole: {
|
|
103
|
-
readonly Main: "main";
|
|
104
|
-
readonly Gallery: "gallery";
|
|
105
|
-
readonly Other: "other";
|
|
106
|
-
};
|
|
107
|
-
export type ImageRole = typeof ImageRole[keyof typeof ImageRole];
|
|
108
|
-
export declare const ImageStatus: {
|
|
109
|
-
readonly Pending: "pending";
|
|
110
|
-
readonly Uploaded: "uploaded";
|
|
111
|
-
readonly Processing: "processing";
|
|
112
|
-
readonly Ready: "ready";
|
|
113
|
-
readonly Failed: "failed";
|
|
114
|
-
readonly Deleted: "deleted";
|
|
115
|
-
};
|
|
116
|
-
export type ImageStatus = typeof ImageStatus[keyof typeof ImageStatus];
|
|
117
|
-
export interface ImageUrl {
|
|
118
|
-
'imageId': string;
|
|
119
|
-
'url': string;
|
|
120
|
-
'expiresAt'?: string;
|
|
121
|
-
}
|
|
122
|
-
export interface ListImages200Response {
|
|
123
|
-
'items'?: Array<Image>;
|
|
124
|
-
'page'?: number;
|
|
125
|
-
'pageSize'?: number;
|
|
126
|
-
'total'?: number;
|
|
127
|
-
}
|
|
128
|
-
export declare const OwnerType: {
|
|
129
|
-
readonly ProductDraft: "productDraft";
|
|
130
|
-
readonly Product: "product";
|
|
131
|
-
readonly User: "user";
|
|
132
|
-
};
|
|
133
|
-
export type OwnerType = typeof OwnerType[keyof typeof OwnerType];
|
|
134
|
-
export interface PresignRequest {
|
|
135
|
-
'ownerType': OwnerType;
|
|
136
|
-
/**
|
|
137
|
-
* Draft ID or owner ID
|
|
138
|
-
*/
|
|
139
|
-
'ownerId': string;
|
|
140
|
-
'filename': string;
|
|
141
|
-
'contentType': PresignRequestContentTypeEnum;
|
|
142
|
-
/**
|
|
143
|
-
* Size in bytes
|
|
144
|
-
*/
|
|
145
|
-
'size': number;
|
|
146
|
-
'role': ImageRole;
|
|
147
|
-
}
|
|
148
|
-
export declare const PresignRequestContentTypeEnum: {
|
|
149
|
-
readonly ImageJpeg: "image/jpeg";
|
|
150
|
-
readonly ImagePng: "image/png";
|
|
151
|
-
readonly ImageWebp: "image/webp";
|
|
152
|
-
readonly ImageAvif: "image/avif";
|
|
153
|
-
};
|
|
154
|
-
export type PresignRequestContentTypeEnum = typeof PresignRequestContentTypeEnum[keyof typeof PresignRequestContentTypeEnum];
|
|
155
|
-
export interface PresignResponse {
|
|
156
|
-
'uploadUrl': string;
|
|
157
|
-
/**
|
|
158
|
-
* Signed JWT token containing upload metadata (key, ownerType, ownerId, role, etc.)
|
|
159
|
-
*/
|
|
160
|
-
'uploadToken': string;
|
|
161
|
-
/**
|
|
162
|
-
* TTL in seconds
|
|
163
|
-
*/
|
|
164
|
-
'expiresIn': number;
|
|
165
|
-
'requiredHeaders': {
|
|
166
|
-
[key: string]: string;
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* RFC7807 Problem Details
|
|
171
|
-
*/
|
|
172
|
-
export interface Problem {
|
|
173
|
-
'type': string;
|
|
174
|
-
'title': string;
|
|
175
|
-
'status': number;
|
|
176
|
-
'detail'?: string;
|
|
177
|
-
'instance'?: string;
|
|
178
|
-
'traceId'?: string;
|
|
179
|
-
'errors'?: Array<ProblemErrorsInner>;
|
|
180
|
-
}
|
|
181
|
-
export interface ProblemErrorsInner {
|
|
182
|
-
'field'?: string;
|
|
183
|
-
'message'?: string;
|
|
184
|
-
}
|
|
185
|
-
export interface ProcessImageRequest {
|
|
186
|
-
'imageId'?: string;
|
|
187
|
-
/**
|
|
188
|
-
* Name of the preset (variant set), if used
|
|
189
|
-
*/
|
|
190
|
-
'preset'?: string;
|
|
191
|
-
}
|
|
192
|
-
export interface PromoteImages200Response {
|
|
193
|
-
'promoted'?: Array<Image>;
|
|
194
|
-
}
|
|
195
|
-
export interface PromoteRequest {
|
|
196
|
-
'draftId': string;
|
|
197
|
-
'productId': string;
|
|
198
|
-
/**
|
|
199
|
-
* If true — copy to products/{productId}/... and remove old objects
|
|
200
|
-
*/
|
|
201
|
-
'move': boolean;
|
|
202
|
-
/**
|
|
203
|
-
* If omitted — promote all images of the draft
|
|
204
|
-
*/
|
|
205
|
-
'images'?: Array<string>;
|
|
206
|
-
}
|
|
207
|
-
export interface Variant {
|
|
208
|
-
'name'?: string;
|
|
209
|
-
/**
|
|
210
|
-
* S3 key of the variant
|
|
211
|
-
*/
|
|
212
|
-
'key'?: string;
|
|
213
|
-
'width'?: number;
|
|
214
|
-
'height'?: number;
|
|
215
|
-
'mime'?: string;
|
|
216
|
-
'size'?: number;
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* DefaultApi - axios parameter creator
|
|
220
|
-
*/
|
|
221
|
-
export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
222
|
-
/**
|
|
223
|
-
*
|
|
224
|
-
* @summary Confirm upload (HEAD against S3), persist metadata
|
|
225
|
-
* @param {ConfirmRequest} confirmRequest
|
|
226
|
-
* @param {*} [options] Override http request option.
|
|
227
|
-
* @throws {RequiredError}
|
|
228
|
-
*/
|
|
229
|
-
confirmUpload: (confirmRequest: ConfirmRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
230
|
-
/**
|
|
231
|
-
*
|
|
232
|
-
* @summary Create a presigned PUT URL for uploading an image to MinIO/S3
|
|
233
|
-
* @param {PresignRequest} presignRequest
|
|
234
|
-
* @param {*} [options] Override http request option.
|
|
235
|
-
* @throws {RequiredError}
|
|
236
|
-
*/
|
|
237
|
-
createPresign: (presignRequest: PresignRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
238
|
-
/**
|
|
239
|
-
*
|
|
240
|
-
* @summary Delete image (soft or hard, per policy)
|
|
241
|
-
* @param {string} id
|
|
242
|
-
* @param {boolean} [hard]
|
|
243
|
-
* @param {*} [options] Override http request option.
|
|
244
|
-
* @throws {RequiredError}
|
|
245
|
-
*/
|
|
246
|
-
deleteImage: (id: string, hard?: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
247
|
-
/**
|
|
248
|
-
*
|
|
249
|
-
* @summary Generate a signed imgproxy URL for delivery with requested params
|
|
250
|
-
* @param {string} id
|
|
251
|
-
* @param {string} [variant]
|
|
252
|
-
* @param {number} [w]
|
|
253
|
-
* @param {number} [h]
|
|
254
|
-
* @param {GetDeliveryUrlFitEnum} [fit]
|
|
255
|
-
* @param {GetDeliveryUrlFormatEnum} [format]
|
|
256
|
-
* @param {number} [quality]
|
|
257
|
-
* @param {number} [dpr]
|
|
258
|
-
* @param {number} [ttlSeconds]
|
|
259
|
-
* @param {*} [options] Override http request option.
|
|
260
|
-
* @throws {RequiredError}
|
|
261
|
-
*/
|
|
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>;
|
|
271
|
-
/**
|
|
272
|
-
*
|
|
273
|
-
* @summary Get image metadata
|
|
274
|
-
* @param {string} id
|
|
275
|
-
* @param {*} [options] Override http request option.
|
|
276
|
-
* @throws {RequiredError}
|
|
277
|
-
*/
|
|
278
|
-
getImage: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
279
|
-
/**
|
|
280
|
-
*
|
|
281
|
-
* @summary List/search images by owner/filters
|
|
282
|
-
* @param {OwnerType} [ownerType]
|
|
283
|
-
* @param {string} [ownerId]
|
|
284
|
-
* @param {ImageStatus} [status]
|
|
285
|
-
* @param {number} [page]
|
|
286
|
-
* @param {number} [pageSize]
|
|
287
|
-
* @param {*} [options] Override http request option.
|
|
288
|
-
* @throws {RequiredError}
|
|
289
|
-
*/
|
|
290
|
-
listImages: (ownerType?: OwnerType, ownerId?: string, status?: ImageStatus, page?: number, pageSize?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
291
|
-
/**
|
|
292
|
-
*
|
|
293
|
-
* @summary Trigger (or retry) variant generation for an image
|
|
294
|
-
* @param {ProcessImageRequest} processImageRequest
|
|
295
|
-
* @param {*} [options] Override http request option.
|
|
296
|
-
* @throws {RequiredError}
|
|
297
|
-
*/
|
|
298
|
-
processImage: (processImageRequest: ProcessImageRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
299
|
-
/**
|
|
300
|
-
*
|
|
301
|
-
* @summary Promote images from a product draft to a final product
|
|
302
|
-
* @param {PromoteRequest} promoteRequest
|
|
303
|
-
* @param {*} [options] Override http request option.
|
|
304
|
-
* @throws {RequiredError}
|
|
305
|
-
*/
|
|
306
|
-
promoteImages: (promoteRequest: PromoteRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
307
|
-
/**
|
|
308
|
-
*
|
|
309
|
-
* @summary Update image metadata (alt, role, order)
|
|
310
|
-
* @param {string} id
|
|
311
|
-
* @param {ImagePatch} imagePatch
|
|
312
|
-
* @param {*} [options] Override http request option.
|
|
313
|
-
* @throws {RequiredError}
|
|
314
|
-
*/
|
|
315
|
-
updateImage: (id: string, imagePatch: ImagePatch, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
316
|
-
};
|
|
317
|
-
/**
|
|
318
|
-
* DefaultApi - functional programming interface
|
|
319
|
-
*/
|
|
320
|
-
export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
321
|
-
/**
|
|
322
|
-
*
|
|
323
|
-
* @summary Confirm upload (HEAD against S3), persist metadata
|
|
324
|
-
* @param {ConfirmRequest} confirmRequest
|
|
325
|
-
* @param {*} [options] Override http request option.
|
|
326
|
-
* @throws {RequiredError}
|
|
327
|
-
*/
|
|
328
|
-
confirmUpload(confirmRequest: ConfirmRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Image>>;
|
|
329
|
-
/**
|
|
330
|
-
*
|
|
331
|
-
* @summary Create a presigned PUT URL for uploading an image to MinIO/S3
|
|
332
|
-
* @param {PresignRequest} presignRequest
|
|
333
|
-
* @param {*} [options] Override http request option.
|
|
334
|
-
* @throws {RequiredError}
|
|
335
|
-
*/
|
|
336
|
-
createPresign(presignRequest: PresignRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PresignResponse>>;
|
|
337
|
-
/**
|
|
338
|
-
*
|
|
339
|
-
* @summary Delete image (soft or hard, per policy)
|
|
340
|
-
* @param {string} id
|
|
341
|
-
* @param {boolean} [hard]
|
|
342
|
-
* @param {*} [options] Override http request option.
|
|
343
|
-
* @throws {RequiredError}
|
|
344
|
-
*/
|
|
345
|
-
deleteImage(id: string, hard?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
346
|
-
/**
|
|
347
|
-
*
|
|
348
|
-
* @summary Generate a signed imgproxy URL for delivery with requested params
|
|
349
|
-
* @param {string} id
|
|
350
|
-
* @param {string} [variant]
|
|
351
|
-
* @param {number} [w]
|
|
352
|
-
* @param {number} [h]
|
|
353
|
-
* @param {GetDeliveryUrlFitEnum} [fit]
|
|
354
|
-
* @param {GetDeliveryUrlFormatEnum} [format]
|
|
355
|
-
* @param {number} [quality]
|
|
356
|
-
* @param {number} [dpr]
|
|
357
|
-
* @param {number} [ttlSeconds]
|
|
358
|
-
* @param {*} [options] Override http request option.
|
|
359
|
-
* @throws {RequiredError}
|
|
360
|
-
*/
|
|
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>>;
|
|
370
|
-
/**
|
|
371
|
-
*
|
|
372
|
-
* @summary Get image metadata
|
|
373
|
-
* @param {string} id
|
|
374
|
-
* @param {*} [options] Override http request option.
|
|
375
|
-
* @throws {RequiredError}
|
|
376
|
-
*/
|
|
377
|
-
getImage(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Image>>;
|
|
378
|
-
/**
|
|
379
|
-
*
|
|
380
|
-
* @summary List/search images by owner/filters
|
|
381
|
-
* @param {OwnerType} [ownerType]
|
|
382
|
-
* @param {string} [ownerId]
|
|
383
|
-
* @param {ImageStatus} [status]
|
|
384
|
-
* @param {number} [page]
|
|
385
|
-
* @param {number} [pageSize]
|
|
386
|
-
* @param {*} [options] Override http request option.
|
|
387
|
-
* @throws {RequiredError}
|
|
388
|
-
*/
|
|
389
|
-
listImages(ownerType?: OwnerType, ownerId?: string, status?: ImageStatus, page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListImages200Response>>;
|
|
390
|
-
/**
|
|
391
|
-
*
|
|
392
|
-
* @summary Trigger (or retry) variant generation for an image
|
|
393
|
-
* @param {ProcessImageRequest} processImageRequest
|
|
394
|
-
* @param {*} [options] Override http request option.
|
|
395
|
-
* @throws {RequiredError}
|
|
396
|
-
*/
|
|
397
|
-
processImage(processImageRequest: ProcessImageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
398
|
-
/**
|
|
399
|
-
*
|
|
400
|
-
* @summary Promote images from a product draft to a final product
|
|
401
|
-
* @param {PromoteRequest} promoteRequest
|
|
402
|
-
* @param {*} [options] Override http request option.
|
|
403
|
-
* @throws {RequiredError}
|
|
404
|
-
*/
|
|
405
|
-
promoteImages(promoteRequest: PromoteRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PromoteImages200Response>>;
|
|
406
|
-
/**
|
|
407
|
-
*
|
|
408
|
-
* @summary Update image metadata (alt, role, order)
|
|
409
|
-
* @param {string} id
|
|
410
|
-
* @param {ImagePatch} imagePatch
|
|
411
|
-
* @param {*} [options] Override http request option.
|
|
412
|
-
* @throws {RequiredError}
|
|
413
|
-
*/
|
|
414
|
-
updateImage(id: string, imagePatch: ImagePatch, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Image>>;
|
|
415
|
-
};
|
|
416
|
-
/**
|
|
417
|
-
* DefaultApi - factory interface
|
|
418
|
-
*/
|
|
419
|
-
export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
420
|
-
/**
|
|
421
|
-
*
|
|
422
|
-
* @summary Confirm upload (HEAD against S3), persist metadata
|
|
423
|
-
* @param {DefaultApiConfirmUploadRequest} requestParameters Request parameters.
|
|
424
|
-
* @param {*} [options] Override http request option.
|
|
425
|
-
* @throws {RequiredError}
|
|
426
|
-
*/
|
|
427
|
-
confirmUpload(requestParameters: DefaultApiConfirmUploadRequest, options?: RawAxiosRequestConfig): AxiosPromise<Image>;
|
|
428
|
-
/**
|
|
429
|
-
*
|
|
430
|
-
* @summary Create a presigned PUT URL for uploading an image to MinIO/S3
|
|
431
|
-
* @param {DefaultApiCreatePresignRequest} requestParameters Request parameters.
|
|
432
|
-
* @param {*} [options] Override http request option.
|
|
433
|
-
* @throws {RequiredError}
|
|
434
|
-
*/
|
|
435
|
-
createPresign(requestParameters: DefaultApiCreatePresignRequest, options?: RawAxiosRequestConfig): AxiosPromise<PresignResponse>;
|
|
436
|
-
/**
|
|
437
|
-
*
|
|
438
|
-
* @summary Delete image (soft or hard, per policy)
|
|
439
|
-
* @param {DefaultApiDeleteImageRequest} requestParameters Request parameters.
|
|
440
|
-
* @param {*} [options] Override http request option.
|
|
441
|
-
* @throws {RequiredError}
|
|
442
|
-
*/
|
|
443
|
-
deleteImage(requestParameters: DefaultApiDeleteImageRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
444
|
-
/**
|
|
445
|
-
*
|
|
446
|
-
* @summary Generate a signed imgproxy URL for delivery with requested params
|
|
447
|
-
* @param {DefaultApiGetDeliveryUrlRequest} requestParameters Request parameters.
|
|
448
|
-
* @param {*} [options] Override http request option.
|
|
449
|
-
* @throws {RequiredError}
|
|
450
|
-
*/
|
|
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>;
|
|
460
|
-
/**
|
|
461
|
-
*
|
|
462
|
-
* @summary Get image metadata
|
|
463
|
-
* @param {DefaultApiGetImageRequest} requestParameters Request parameters.
|
|
464
|
-
* @param {*} [options] Override http request option.
|
|
465
|
-
* @throws {RequiredError}
|
|
466
|
-
*/
|
|
467
|
-
getImage(requestParameters: DefaultApiGetImageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Image>;
|
|
468
|
-
/**
|
|
469
|
-
*
|
|
470
|
-
* @summary List/search images by owner/filters
|
|
471
|
-
* @param {DefaultApiListImagesRequest} requestParameters Request parameters.
|
|
472
|
-
* @param {*} [options] Override http request option.
|
|
473
|
-
* @throws {RequiredError}
|
|
474
|
-
*/
|
|
475
|
-
listImages(requestParameters?: DefaultApiListImagesRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListImages200Response>;
|
|
476
|
-
/**
|
|
477
|
-
*
|
|
478
|
-
* @summary Trigger (or retry) variant generation for an image
|
|
479
|
-
* @param {DefaultApiProcessImageRequest} requestParameters Request parameters.
|
|
480
|
-
* @param {*} [options] Override http request option.
|
|
481
|
-
* @throws {RequiredError}
|
|
482
|
-
*/
|
|
483
|
-
processImage(requestParameters: DefaultApiProcessImageRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
484
|
-
/**
|
|
485
|
-
*
|
|
486
|
-
* @summary Promote images from a product draft to a final product
|
|
487
|
-
* @param {DefaultApiPromoteImagesRequest} requestParameters Request parameters.
|
|
488
|
-
* @param {*} [options] Override http request option.
|
|
489
|
-
* @throws {RequiredError}
|
|
490
|
-
*/
|
|
491
|
-
promoteImages(requestParameters: DefaultApiPromoteImagesRequest, options?: RawAxiosRequestConfig): AxiosPromise<PromoteImages200Response>;
|
|
492
|
-
/**
|
|
493
|
-
*
|
|
494
|
-
* @summary Update image metadata (alt, role, order)
|
|
495
|
-
* @param {DefaultApiUpdateImageRequest} requestParameters Request parameters.
|
|
496
|
-
* @param {*} [options] Override http request option.
|
|
497
|
-
* @throws {RequiredError}
|
|
498
|
-
*/
|
|
499
|
-
updateImage(requestParameters: DefaultApiUpdateImageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Image>;
|
|
500
|
-
};
|
|
501
|
-
/**
|
|
502
|
-
* Request parameters for confirmUpload operation in DefaultApi.
|
|
503
|
-
*/
|
|
504
|
-
export interface DefaultApiConfirmUploadRequest {
|
|
505
|
-
readonly confirmRequest: ConfirmRequest;
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
* Request parameters for createPresign operation in DefaultApi.
|
|
509
|
-
*/
|
|
510
|
-
export interface DefaultApiCreatePresignRequest {
|
|
511
|
-
readonly presignRequest: PresignRequest;
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* Request parameters for deleteImage operation in DefaultApi.
|
|
515
|
-
*/
|
|
516
|
-
export interface DefaultApiDeleteImageRequest {
|
|
517
|
-
readonly id: string;
|
|
518
|
-
readonly hard?: boolean;
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Request parameters for getDeliveryUrl operation in DefaultApi.
|
|
522
|
-
*/
|
|
523
|
-
export interface DefaultApiGetDeliveryUrlRequest {
|
|
524
|
-
readonly id: string;
|
|
525
|
-
readonly variant?: string;
|
|
526
|
-
readonly w?: number;
|
|
527
|
-
readonly h?: number;
|
|
528
|
-
readonly fit?: GetDeliveryUrlFitEnum;
|
|
529
|
-
readonly format?: GetDeliveryUrlFormatEnum;
|
|
530
|
-
readonly quality?: number;
|
|
531
|
-
readonly dpr?: number;
|
|
532
|
-
readonly ttlSeconds?: number;
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
* Request parameters for getDeliveryUrls operation in DefaultApi.
|
|
536
|
-
*/
|
|
537
|
-
export interface DefaultApiGetDeliveryUrlsRequest {
|
|
538
|
-
readonly batchUrlRequest: BatchUrlRequest;
|
|
539
|
-
}
|
|
540
|
-
/**
|
|
541
|
-
* Request parameters for getImage operation in DefaultApi.
|
|
542
|
-
*/
|
|
543
|
-
export interface DefaultApiGetImageRequest {
|
|
544
|
-
readonly id: string;
|
|
545
|
-
}
|
|
546
|
-
/**
|
|
547
|
-
* Request parameters for listImages operation in DefaultApi.
|
|
548
|
-
*/
|
|
549
|
-
export interface DefaultApiListImagesRequest {
|
|
550
|
-
readonly ownerType?: OwnerType;
|
|
551
|
-
readonly ownerId?: string;
|
|
552
|
-
readonly status?: ImageStatus;
|
|
553
|
-
readonly page?: number;
|
|
554
|
-
readonly pageSize?: number;
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
* Request parameters for processImage operation in DefaultApi.
|
|
558
|
-
*/
|
|
559
|
-
export interface DefaultApiProcessImageRequest {
|
|
560
|
-
readonly processImageRequest: ProcessImageRequest;
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* Request parameters for promoteImages operation in DefaultApi.
|
|
564
|
-
*/
|
|
565
|
-
export interface DefaultApiPromoteImagesRequest {
|
|
566
|
-
readonly promoteRequest: PromoteRequest;
|
|
567
|
-
}
|
|
568
|
-
/**
|
|
569
|
-
* Request parameters for updateImage operation in DefaultApi.
|
|
570
|
-
*/
|
|
571
|
-
export interface DefaultApiUpdateImageRequest {
|
|
572
|
-
readonly id: string;
|
|
573
|
-
readonly imagePatch: ImagePatch;
|
|
574
|
-
}
|
|
575
|
-
/**
|
|
576
|
-
* DefaultApi - object-oriented interface
|
|
577
|
-
*/
|
|
578
|
-
export declare class DefaultApi extends BaseAPI {
|
|
579
|
-
/**
|
|
580
|
-
*
|
|
581
|
-
* @summary Confirm upload (HEAD against S3), persist metadata
|
|
582
|
-
* @param {DefaultApiConfirmUploadRequest} requestParameters Request parameters.
|
|
583
|
-
* @param {*} [options] Override http request option.
|
|
584
|
-
* @throws {RequiredError}
|
|
585
|
-
*/
|
|
586
|
-
confirmUpload(requestParameters: DefaultApiConfirmUploadRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Image, any, {}>>;
|
|
587
|
-
/**
|
|
588
|
-
*
|
|
589
|
-
* @summary Create a presigned PUT URL for uploading an image to MinIO/S3
|
|
590
|
-
* @param {DefaultApiCreatePresignRequest} requestParameters Request parameters.
|
|
591
|
-
* @param {*} [options] Override http request option.
|
|
592
|
-
* @throws {RequiredError}
|
|
593
|
-
*/
|
|
594
|
-
createPresign(requestParameters: DefaultApiCreatePresignRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PresignResponse, any, {}>>;
|
|
595
|
-
/**
|
|
596
|
-
*
|
|
597
|
-
* @summary Delete image (soft or hard, per policy)
|
|
598
|
-
* @param {DefaultApiDeleteImageRequest} requestParameters Request parameters.
|
|
599
|
-
* @param {*} [options] Override http request option.
|
|
600
|
-
* @throws {RequiredError}
|
|
601
|
-
*/
|
|
602
|
-
deleteImage(requestParameters: DefaultApiDeleteImageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
603
|
-
/**
|
|
604
|
-
*
|
|
605
|
-
* @summary Generate a signed imgproxy URL for delivery with requested params
|
|
606
|
-
* @param {DefaultApiGetDeliveryUrlRequest} requestParameters Request parameters.
|
|
607
|
-
* @param {*} [options] Override http request option.
|
|
608
|
-
* @throws {RequiredError}
|
|
609
|
-
*/
|
|
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, {}>>;
|
|
619
|
-
/**
|
|
620
|
-
*
|
|
621
|
-
* @summary Get image metadata
|
|
622
|
-
* @param {DefaultApiGetImageRequest} requestParameters Request parameters.
|
|
623
|
-
* @param {*} [options] Override http request option.
|
|
624
|
-
* @throws {RequiredError}
|
|
625
|
-
*/
|
|
626
|
-
getImage(requestParameters: DefaultApiGetImageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Image, any, {}>>;
|
|
627
|
-
/**
|
|
628
|
-
*
|
|
629
|
-
* @summary List/search images by owner/filters
|
|
630
|
-
* @param {DefaultApiListImagesRequest} requestParameters Request parameters.
|
|
631
|
-
* @param {*} [options] Override http request option.
|
|
632
|
-
* @throws {RequiredError}
|
|
633
|
-
*/
|
|
634
|
-
listImages(requestParameters?: DefaultApiListImagesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListImages200Response, any, {}>>;
|
|
635
|
-
/**
|
|
636
|
-
*
|
|
637
|
-
* @summary Trigger (or retry) variant generation for an image
|
|
638
|
-
* @param {DefaultApiProcessImageRequest} requestParameters Request parameters.
|
|
639
|
-
* @param {*} [options] Override http request option.
|
|
640
|
-
* @throws {RequiredError}
|
|
641
|
-
*/
|
|
642
|
-
processImage(requestParameters: DefaultApiProcessImageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
643
|
-
/**
|
|
644
|
-
*
|
|
645
|
-
* @summary Promote images from a product draft to a final product
|
|
646
|
-
* @param {DefaultApiPromoteImagesRequest} requestParameters Request parameters.
|
|
647
|
-
* @param {*} [options] Override http request option.
|
|
648
|
-
* @throws {RequiredError}
|
|
649
|
-
*/
|
|
650
|
-
promoteImages(requestParameters: DefaultApiPromoteImagesRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PromoteImages200Response, any, {}>>;
|
|
651
|
-
/**
|
|
652
|
-
*
|
|
653
|
-
* @summary Update image metadata (alt, role, order)
|
|
654
|
-
* @param {DefaultApiUpdateImageRequest} requestParameters Request parameters.
|
|
655
|
-
* @param {*} [options] Override http request option.
|
|
656
|
-
* @throws {RequiredError}
|
|
657
|
-
*/
|
|
658
|
-
updateImage(requestParameters: DefaultApiUpdateImageRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Image, any, {}>>;
|
|
659
|
-
}
|
|
660
|
-
export declare const GetDeliveryUrlFitEnum: {
|
|
661
|
-
readonly Cover: "cover";
|
|
662
|
-
readonly Contain: "contain";
|
|
663
|
-
readonly Fill: "fill";
|
|
664
|
-
readonly Inside: "inside";
|
|
665
|
-
readonly Outside: "outside";
|
|
666
|
-
};
|
|
667
|
-
export type GetDeliveryUrlFitEnum = typeof GetDeliveryUrlFitEnum[keyof typeof GetDeliveryUrlFitEnum];
|
|
668
|
-
export declare const GetDeliveryUrlFormatEnum: {
|
|
669
|
-
readonly Original: "original";
|
|
670
|
-
readonly Webp: "webp";
|
|
671
|
-
readonly Avif: "avif";
|
|
672
|
-
readonly Jpeg: "jpeg";
|
|
673
|
-
readonly Png: "png";
|
|
674
|
-
};
|
|
675
|
-
export type GetDeliveryUrlFormatEnum = typeof GetDeliveryUrlFormatEnum[keyof typeof GetDeliveryUrlFormatEnum];
|
|
1
|
+
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
+
import type { BatchUrlRequest, BatchUrlResponse, ConfirmRequest, DeleteImageParams, GetDeliveryUrl200, GetDeliveryUrlParams, Image, ImagePatch, ListImages200, ListImagesParams, PresignRequest, PresignResponse, ProcessImageBody, PromoteImages200, PromoteRequest } from './api.schemas';
|
|
3
|
+
export declare const getImageServiceAPI: () => {
|
|
4
|
+
createPresign: <TData = AxiosResponse<PresignResponse, any, {}>>(presignRequest: PresignRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
5
|
+
confirmUpload: <TData = AxiosResponse<Image, any, {}>>(confirmRequest: ConfirmRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
6
|
+
listImages: <TData = AxiosResponse<ListImages200, any, {}>>(params?: ListImagesParams, options?: AxiosRequestConfig) => Promise<TData>;
|
|
7
|
+
getImage: <TData = AxiosResponse<Image, any, {}>>(id: string, options?: AxiosRequestConfig) => Promise<TData>;
|
|
8
|
+
updateImage: <TData = AxiosResponse<Image, any, {}>>(id: string, imagePatch: ImagePatch, options?: AxiosRequestConfig) => Promise<TData>;
|
|
9
|
+
deleteImage: <TData = AxiosResponse<void, any, {}>>(id: string, params?: DeleteImageParams, options?: AxiosRequestConfig) => Promise<TData>;
|
|
10
|
+
getDeliveryUrl: <TData = AxiosResponse<GetDeliveryUrl200, any, {}>>(id: string, params?: GetDeliveryUrlParams, options?: AxiosRequestConfig) => Promise<TData>;
|
|
11
|
+
getDeliveryUrls: <TData = AxiosResponse<BatchUrlResponse, any, {}>>(batchUrlRequest: BatchUrlRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
12
|
+
promoteImages: <TData = AxiosResponse<PromoteImages200, any, {}>>(promoteRequest: PromoteRequest, options?: AxiosRequestConfig) => Promise<TData>;
|
|
13
|
+
processImage: <TData = AxiosResponse<void, any, {}>>(processImageBody: ProcessImageBody, options?: AxiosRequestConfig) => Promise<TData>;
|
|
14
|
+
};
|
|
15
|
+
export type CreatePresignResult = AxiosResponse<PresignResponse>;
|
|
16
|
+
export type ConfirmUploadResult = AxiosResponse<Image>;
|
|
17
|
+
export type ListImagesResult = AxiosResponse<ListImages200>;
|
|
18
|
+
export type GetImageResult = AxiosResponse<Image>;
|
|
19
|
+
export type UpdateImageResult = AxiosResponse<Image>;
|
|
20
|
+
export type DeleteImageResult = AxiosResponse<void>;
|
|
21
|
+
export type GetDeliveryUrlResult = AxiosResponse<GetDeliveryUrl200>;
|
|
22
|
+
export type GetDeliveryUrlsResult = AxiosResponse<BatchUrlResponse>;
|
|
23
|
+
export type PromoteImagesResult = AxiosResponse<PromoteImages200>;
|
|
24
|
+
export type ProcessImageResult = AxiosResponse<void>;
|