@imagekit/nodejs 7.0.1 → 7.1.0
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/CHANGELOG.md +40 -0
- package/package.json +1 -1
- package/resources/beta/v2/files.d.mts +63 -1
- package/resources/beta/v2/files.d.mts.map +1 -1
- package/resources/beta/v2/files.d.ts +63 -1
- package/resources/beta/v2/files.d.ts.map +1 -1
- package/resources/custom-metadata-fields.d.mts +13 -1
- package/resources/custom-metadata-fields.d.mts.map +1 -1
- package/resources/custom-metadata-fields.d.ts +13 -1
- package/resources/custom-metadata-fields.d.ts.map +1 -1
- package/resources/custom-metadata-fields.js +5 -0
- package/resources/custom-metadata-fields.js.map +1 -1
- package/resources/custom-metadata-fields.mjs +5 -0
- package/resources/custom-metadata-fields.mjs.map +1 -1
- package/resources/files/files.d.mts +125 -1
- package/resources/files/files.d.mts.map +1 -1
- package/resources/files/files.d.ts +125 -1
- package/resources/files/files.d.ts.map +1 -1
- package/resources/files/files.js.map +1 -1
- package/resources/files/files.mjs.map +1 -1
- package/resources/webhooks.d.mts +62 -0
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +62 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/src/resources/beta/v2/files.ts +72 -0
- package/src/resources/custom-metadata-fields.ts +14 -1
- package/src/resources/files/files.ts +143 -0
- package/src/resources/webhooks.ts +71 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -174,6 +174,17 @@ export interface FileUploadResponse {
|
|
|
174
174
|
*/
|
|
175
175
|
name?: string;
|
|
176
176
|
|
|
177
|
+
/**
|
|
178
|
+
* This field is included in the response only if the Path policy feature is
|
|
179
|
+
* available in the plan. It contains schema definitions for the custom metadata
|
|
180
|
+
* fields selected for the specified file path. Field selection can only be done
|
|
181
|
+
* when the Path policy feature is enabled.
|
|
182
|
+
*
|
|
183
|
+
* Keys are the names of the custom metadata fields; the value object has details
|
|
184
|
+
* about the custom metadata schema.
|
|
185
|
+
*/
|
|
186
|
+
selectedFieldsSchema?: { [key: string]: FileUploadResponse.SelectedFieldsSchema };
|
|
187
|
+
|
|
177
188
|
/**
|
|
178
189
|
* Size of the image file in Bytes.
|
|
179
190
|
*/
|
|
@@ -253,6 +264,66 @@ export namespace FileUploadResponse {
|
|
|
253
264
|
'remove-bg'?: 'success' | 'pending' | 'failed';
|
|
254
265
|
}
|
|
255
266
|
|
|
267
|
+
export interface SelectedFieldsSchema {
|
|
268
|
+
/**
|
|
269
|
+
* Type of the custom metadata field.
|
|
270
|
+
*/
|
|
271
|
+
type: 'Text' | 'Textarea' | 'Number' | 'Date' | 'Boolean' | 'SingleSelect' | 'MultiSelect';
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* The default value for this custom metadata field. The value should match the
|
|
275
|
+
* `type` of custom metadata field.
|
|
276
|
+
*/
|
|
277
|
+
defaultValue?: string | number | boolean | Array<string | number | boolean>;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Specifies if the custom metadata field is required or not.
|
|
281
|
+
*/
|
|
282
|
+
isValueRequired?: boolean;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
286
|
+
*/
|
|
287
|
+
maxLength?: number;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
291
|
+
* `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
292
|
+
* field, it will be a numeric value.
|
|
293
|
+
*/
|
|
294
|
+
maxValue?: string | number;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
298
|
+
*/
|
|
299
|
+
minLength?: number;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
303
|
+
* `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
304
|
+
* field, it will be a numeric value.
|
|
305
|
+
*/
|
|
306
|
+
minValue?: string | number;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Indicates whether the custom metadata field is read only. A read only field
|
|
310
|
+
* cannot be modified after being set. This field is configurable only via the
|
|
311
|
+
* **Path policy** feature.
|
|
312
|
+
*/
|
|
313
|
+
readOnly?: boolean;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
317
|
+
*/
|
|
318
|
+
selectOptions?: Array<string | number | boolean>;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Specifies if the selectOptions array is truncated. It is truncated when number
|
|
322
|
+
* of options are > 100.
|
|
323
|
+
*/
|
|
324
|
+
selectOptionsTruncated?: boolean;
|
|
325
|
+
}
|
|
326
|
+
|
|
256
327
|
/**
|
|
257
328
|
* An object containing the file or file version's `id` (versionId) and `name`.
|
|
258
329
|
*/
|
|
@@ -403,6 +474,7 @@ export interface FileUploadParams {
|
|
|
403
474
|
| 'isPublished'
|
|
404
475
|
| 'customMetadata'
|
|
405
476
|
| 'metadata'
|
|
477
|
+
| 'selectedFieldsSchema'
|
|
406
478
|
>;
|
|
407
479
|
|
|
408
480
|
/**
|
|
@@ -59,6 +59,11 @@ export class CustomMetadataFields extends APIResource {
|
|
|
59
59
|
* the API returns only non deleted field objects, but you can include deleted
|
|
60
60
|
* fields in the API response.
|
|
61
61
|
*
|
|
62
|
+
* You can also filter results by a specific folder path to retrieve custom
|
|
63
|
+
* metadata fields applicable at that location. This path-specific filtering is
|
|
64
|
+
* useful when using the **Path policy** feature to determine which custom metadata
|
|
65
|
+
* fields are selected for a given path.
|
|
66
|
+
*
|
|
62
67
|
* @example
|
|
63
68
|
* ```ts
|
|
64
69
|
* const customMetadataFields =
|
|
@@ -126,7 +131,7 @@ export namespace CustomMetadataField {
|
|
|
126
131
|
type: 'Text' | 'Textarea' | 'Number' | 'Date' | 'Boolean' | 'SingleSelect' | 'MultiSelect';
|
|
127
132
|
|
|
128
133
|
/**
|
|
129
|
-
* The default value for this custom metadata field.
|
|
134
|
+
* The default value for this custom metadata field. Data type of default value
|
|
130
135
|
* depends on the field type.
|
|
131
136
|
*/
|
|
132
137
|
defaultValue?: string | number | boolean | Array<string | number | boolean>;
|
|
@@ -319,6 +324,14 @@ export namespace CustomMetadataFieldUpdateParams {
|
|
|
319
324
|
}
|
|
320
325
|
|
|
321
326
|
export interface CustomMetadataFieldListParams {
|
|
327
|
+
/**
|
|
328
|
+
* The folder path (e.g., `/path/to/folder`) for which to retrieve applicable
|
|
329
|
+
* custom metadata fields. Useful for determining path-specific field selections
|
|
330
|
+
* when the [Path policy](https://imagekit.io/docs/dam/path-policy) feature is in
|
|
331
|
+
* use.
|
|
332
|
+
*/
|
|
333
|
+
folderPath?: string;
|
|
334
|
+
|
|
322
335
|
/**
|
|
323
336
|
* Set it to `true` to include deleted field objects in the API response.
|
|
324
337
|
*/
|
|
@@ -269,6 +269,17 @@ export interface File {
|
|
|
269
269
|
*/
|
|
270
270
|
name?: string;
|
|
271
271
|
|
|
272
|
+
/**
|
|
273
|
+
* This field is included in the response only if the Path policy feature is
|
|
274
|
+
* available in the plan. It contains schema definitions for the custom metadata
|
|
275
|
+
* fields selected for the specified file path. Field selection can only be done
|
|
276
|
+
* when the Path policy feature is enabled.
|
|
277
|
+
*
|
|
278
|
+
* Keys are the names of the custom metadata fields; the value object has details
|
|
279
|
+
* about the custom metadata schema.
|
|
280
|
+
*/
|
|
281
|
+
selectedFieldsSchema?: { [key: string]: File.SelectedFieldsSchema };
|
|
282
|
+
|
|
272
283
|
/**
|
|
273
284
|
* Size of the file in bytes.
|
|
274
285
|
*/
|
|
@@ -332,6 +343,66 @@ export namespace File {
|
|
|
332
343
|
source?: string;
|
|
333
344
|
}
|
|
334
345
|
|
|
346
|
+
export interface SelectedFieldsSchema {
|
|
347
|
+
/**
|
|
348
|
+
* Type of the custom metadata field.
|
|
349
|
+
*/
|
|
350
|
+
type: 'Text' | 'Textarea' | 'Number' | 'Date' | 'Boolean' | 'SingleSelect' | 'MultiSelect';
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* The default value for this custom metadata field. The value should match the
|
|
354
|
+
* `type` of custom metadata field.
|
|
355
|
+
*/
|
|
356
|
+
defaultValue?: string | number | boolean | Array<string | number | boolean>;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Specifies if the custom metadata field is required or not.
|
|
360
|
+
*/
|
|
361
|
+
isValueRequired?: boolean;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
365
|
+
*/
|
|
366
|
+
maxLength?: number;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
370
|
+
* `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
371
|
+
* field, it will be a numeric value.
|
|
372
|
+
*/
|
|
373
|
+
maxValue?: string | number;
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
377
|
+
*/
|
|
378
|
+
minLength?: number;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
382
|
+
* `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
383
|
+
* field, it will be a numeric value.
|
|
384
|
+
*/
|
|
385
|
+
minValue?: string | number;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Indicates whether the custom metadata field is read only. A read only field
|
|
389
|
+
* cannot be modified after being set. This field is configurable only via the
|
|
390
|
+
* **Path policy** feature.
|
|
391
|
+
*/
|
|
392
|
+
readOnly?: boolean;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
396
|
+
*/
|
|
397
|
+
selectOptions?: Array<string | number | boolean>;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Specifies if the selectOptions array is truncated. It is truncated when number
|
|
401
|
+
* of options are > 100.
|
|
402
|
+
*/
|
|
403
|
+
selectOptionsTruncated?: boolean;
|
|
404
|
+
}
|
|
405
|
+
|
|
335
406
|
/**
|
|
336
407
|
* An object with details of the file version.
|
|
337
408
|
*/
|
|
@@ -838,6 +909,17 @@ export interface FileUploadResponse {
|
|
|
838
909
|
*/
|
|
839
910
|
name?: string;
|
|
840
911
|
|
|
912
|
+
/**
|
|
913
|
+
* This field is included in the response only if the Path policy feature is
|
|
914
|
+
* available in the plan. It contains schema definitions for the custom metadata
|
|
915
|
+
* fields selected for the specified file path. Field selection can only be done
|
|
916
|
+
* when the Path policy feature is enabled.
|
|
917
|
+
*
|
|
918
|
+
* Keys are the names of the custom metadata fields; the value object has details
|
|
919
|
+
* about the custom metadata schema.
|
|
920
|
+
*/
|
|
921
|
+
selectedFieldsSchema?: { [key: string]: FileUploadResponse.SelectedFieldsSchema };
|
|
922
|
+
|
|
841
923
|
/**
|
|
842
924
|
* Size of the image file in Bytes.
|
|
843
925
|
*/
|
|
@@ -917,6 +999,66 @@ export namespace FileUploadResponse {
|
|
|
917
999
|
'remove-bg'?: 'success' | 'pending' | 'failed';
|
|
918
1000
|
}
|
|
919
1001
|
|
|
1002
|
+
export interface SelectedFieldsSchema {
|
|
1003
|
+
/**
|
|
1004
|
+
* Type of the custom metadata field.
|
|
1005
|
+
*/
|
|
1006
|
+
type: 'Text' | 'Textarea' | 'Number' | 'Date' | 'Boolean' | 'SingleSelect' | 'MultiSelect';
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* The default value for this custom metadata field. The value should match the
|
|
1010
|
+
* `type` of custom metadata field.
|
|
1011
|
+
*/
|
|
1012
|
+
defaultValue?: string | number | boolean | Array<string | number | boolean>;
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Specifies if the custom metadata field is required or not.
|
|
1016
|
+
*/
|
|
1017
|
+
isValueRequired?: boolean;
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
1021
|
+
*/
|
|
1022
|
+
maxLength?: number;
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
1026
|
+
* `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
1027
|
+
* field, it will be a numeric value.
|
|
1028
|
+
*/
|
|
1029
|
+
maxValue?: string | number;
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
1033
|
+
*/
|
|
1034
|
+
minLength?: number;
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
1038
|
+
* `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
1039
|
+
* field, it will be a numeric value.
|
|
1040
|
+
*/
|
|
1041
|
+
minValue?: string | number;
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Indicates whether the custom metadata field is read only. A read only field
|
|
1045
|
+
* cannot be modified after being set. This field is configurable only via the
|
|
1046
|
+
* **Path policy** feature.
|
|
1047
|
+
*/
|
|
1048
|
+
readOnly?: boolean;
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
1052
|
+
*/
|
|
1053
|
+
selectOptions?: Array<string | number | boolean>;
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Specifies if the selectOptions array is truncated. It is truncated when number
|
|
1057
|
+
* of options are > 100.
|
|
1058
|
+
*/
|
|
1059
|
+
selectOptionsTruncated?: boolean;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
920
1062
|
/**
|
|
921
1063
|
* An object containing the file or file version's `id` (versionId) and `name`.
|
|
922
1064
|
*/
|
|
@@ -1236,6 +1378,7 @@ export interface FileUploadParams {
|
|
|
1236
1378
|
| 'isPublished'
|
|
1237
1379
|
| 'customMetadata'
|
|
1238
1380
|
| 'metadata'
|
|
1381
|
+
| 'selectedFieldsSchema'
|
|
1239
1382
|
>;
|
|
1240
1383
|
|
|
1241
1384
|
/**
|
|
@@ -383,6 +383,17 @@ export namespace UploadPreTransformSuccessEvent {
|
|
|
383
383
|
*/
|
|
384
384
|
name?: string;
|
|
385
385
|
|
|
386
|
+
/**
|
|
387
|
+
* This field is included in the response only if the Path policy feature is
|
|
388
|
+
* available in the plan. It contains schema definitions for the custom metadata
|
|
389
|
+
* fields selected for the specified file path. Field selection can only be done
|
|
390
|
+
* when the Path policy feature is enabled.
|
|
391
|
+
*
|
|
392
|
+
* Keys are the names of the custom metadata fields; the value object has details
|
|
393
|
+
* about the custom metadata schema.
|
|
394
|
+
*/
|
|
395
|
+
selectedFieldsSchema?: { [key: string]: Data.SelectedFieldsSchema };
|
|
396
|
+
|
|
386
397
|
/**
|
|
387
398
|
* Size of the image file in Bytes.
|
|
388
399
|
*/
|
|
@@ -462,6 +473,66 @@ export namespace UploadPreTransformSuccessEvent {
|
|
|
462
473
|
'remove-bg'?: 'success' | 'pending' | 'failed';
|
|
463
474
|
}
|
|
464
475
|
|
|
476
|
+
export interface SelectedFieldsSchema {
|
|
477
|
+
/**
|
|
478
|
+
* Type of the custom metadata field.
|
|
479
|
+
*/
|
|
480
|
+
type: 'Text' | 'Textarea' | 'Number' | 'Date' | 'Boolean' | 'SingleSelect' | 'MultiSelect';
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* The default value for this custom metadata field. The value should match the
|
|
484
|
+
* `type` of custom metadata field.
|
|
485
|
+
*/
|
|
486
|
+
defaultValue?: string | number | boolean | Array<string | number | boolean>;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Specifies if the custom metadata field is required or not.
|
|
490
|
+
*/
|
|
491
|
+
isValueRequired?: boolean;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
495
|
+
*/
|
|
496
|
+
maxLength?: number;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
500
|
+
* `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
501
|
+
* field, it will be a numeric value.
|
|
502
|
+
*/
|
|
503
|
+
maxValue?: string | number;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
507
|
+
*/
|
|
508
|
+
minLength?: number;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
512
|
+
* `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
513
|
+
* field, it will be a numeric value.
|
|
514
|
+
*/
|
|
515
|
+
minValue?: string | number;
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Indicates whether the custom metadata field is read only. A read only field
|
|
519
|
+
* cannot be modified after being set. This field is configurable only via the
|
|
520
|
+
* **Path policy** feature.
|
|
521
|
+
*/
|
|
522
|
+
readOnly?: boolean;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
526
|
+
*/
|
|
527
|
+
selectOptions?: Array<string | number | boolean>;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Specifies if the selectOptions array is truncated. It is truncated when number
|
|
531
|
+
* of options are > 100.
|
|
532
|
+
*/
|
|
533
|
+
selectOptionsTruncated?: boolean;
|
|
534
|
+
}
|
|
535
|
+
|
|
465
536
|
/**
|
|
466
537
|
* An object containing the file or file version's `id` (versionId) and `name`.
|
|
467
538
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '7.0
|
|
1
|
+
export const VERSION = '7.1.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.0
|
|
1
|
+
export declare const VERSION = "7.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.0
|
|
1
|
+
export declare const VERSION = "7.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '7.0
|
|
1
|
+
export const VERSION = '7.1.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|