Skip to content

Commit 76f3ed7

Browse files
feat(api): manual updates
1 parent 01bdaa0 commit 76f3ed7

File tree

6 files changed

+80
-200
lines changed

6 files changed

+80
-200
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-0470196862abd722b09f1af798d6f2bcbdeba0f82d1162f57c287b1a43233531.yml
33
openapi_spec_hash: 043dd7c67d741d0034b86f2fc0bce072
4-
config_hash: 70f9408b8d1dfbcf262a20d6eed50e1c
4+
config_hash: da949a1217f48ac01676eab81ca9d1b1

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Types:
44

55
- <code><a href="./src/resources/shared.ts">BaseOverlay</a></code>
6+
- <code><a href="./src/resources/shared.ts">Extensions</a></code>
67
- <code><a href="./src/resources/shared.ts">ImageOverlay</a></code>
78
- <code><a href="./src/resources/shared.ts">Overlay</a></code>
89
- <code><a href="./src/resources/shared.ts">OverlayPosition</a></code>

src/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ export declare namespace ImageKit {
909909
};
910910

911911
export type BaseOverlay = API.BaseOverlay;
912+
export type Extensions = API.Extensions;
912913
export type ImageOverlay = API.ImageOverlay;
913914
export type Overlay = API.Overlay;
914915
export type OverlayPosition = API.OverlayPosition;

src/resources/beta/v2/files.ts

Lines changed: 2 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../../core/resource';
4+
import * as Shared from '../../shared';
45
import * as FilesAPI from '../../files/files';
56
import { APIPromise } from '../../../core/api-promise';
67
import { type Uploadable } from '../../../core/uploads';
@@ -338,9 +339,7 @@ export interface FileUploadParams {
338339
* Array of extensions to be applied to the asset. Each extension can be configured
339340
* with specific parameters based on the extension type.
340341
*/
341-
extensions?: Array<
342-
FileUploadParams.RemoveBg | FileUploadParams.AutoTaggingExtension | FileUploadParams.AIAutoDescription
343-
>;
342+
extensions?: Shared.Extensions;
344343

345344
/**
346345
* The folder path in which the image has to be uploaded. If the folder(s) didn't
@@ -450,68 +449,6 @@ export interface FileUploadParams {
450449
}
451450

452451
export namespace FileUploadParams {
453-
export interface RemoveBg {
454-
/**
455-
* Specifies the background removal extension.
456-
*/
457-
name: 'remove-bg';
458-
459-
options?: RemoveBg.Options;
460-
}
461-
462-
export namespace RemoveBg {
463-
export interface Options {
464-
/**
465-
* Whether to add an artificial shadow to the result. Default is false. Note:
466-
* Adding shadows is currently only supported for car photos.
467-
*/
468-
add_shadow?: boolean;
469-
470-
/**
471-
* Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
472-
* color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
473-
* empty.
474-
*/
475-
bg_color?: string;
476-
477-
/**
478-
* Sets a background image from a URL. If this parameter is set, `bg_color` must be
479-
* empty.
480-
*/
481-
bg_image_url?: string;
482-
483-
/**
484-
* Allows semi-transparent regions in the result. Default is true. Note:
485-
* Semitransparency is currently only supported for car windows.
486-
*/
487-
semitransparency?: boolean;
488-
}
489-
}
490-
491-
export interface AutoTaggingExtension {
492-
/**
493-
* Maximum number of tags to attach to the asset.
494-
*/
495-
maxTags: number;
496-
497-
/**
498-
* Minimum confidence level for tags to be considered valid.
499-
*/
500-
minConfidence: number;
501-
502-
/**
503-
* Specifies the auto-tagging extension used.
504-
*/
505-
name: 'google-auto-tagging' | 'aws-auto-tagging';
506-
}
507-
508-
export interface AIAutoDescription {
509-
/**
510-
* Specifies the auto description extension.
511-
*/
512-
name: 'ai-auto-description';
513-
}
514-
515452
/**
516453
* Configure pre-processing (`pre`) and post-processing (`post`) transformations.
517454
*

src/resources/files/files.ts

Lines changed: 3 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../core/resource';
4+
import * as Shared from '../shared';
45
import * as BulkAPI from './bulk';
56
import {
67
Bulk,
@@ -879,11 +880,7 @@ export namespace FileUpdateParams {
879880
* Array of extensions to be applied to the asset. Each extension can be configured
880881
* with specific parameters based on the extension type.
881882
*/
882-
extensions?: Array<
883-
| UpdateFileDetails.RemoveBg
884-
| UpdateFileDetails.AutoTaggingExtension
885-
| UpdateFileDetails.AIAutoDescription
886-
>;
883+
extensions?: Shared.Extensions;
887884

888885
/**
889886
* An array of AITags associated with the file that you want to remove, e.g.
@@ -912,70 +909,6 @@ export namespace FileUpdateParams {
912909
webhookUrl?: string;
913910
}
914911

915-
export namespace UpdateFileDetails {
916-
export interface RemoveBg {
917-
/**
918-
* Specifies the background removal extension.
919-
*/
920-
name: 'remove-bg';
921-
922-
options?: RemoveBg.Options;
923-
}
924-
925-
export namespace RemoveBg {
926-
export interface Options {
927-
/**
928-
* Whether to add an artificial shadow to the result. Default is false. Note:
929-
* Adding shadows is currently only supported for car photos.
930-
*/
931-
add_shadow?: boolean;
932-
933-
/**
934-
* Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
935-
* color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
936-
* empty.
937-
*/
938-
bg_color?: string;
939-
940-
/**
941-
* Sets a background image from a URL. If this parameter is set, `bg_color` must be
942-
* empty.
943-
*/
944-
bg_image_url?: string;
945-
946-
/**
947-
* Allows semi-transparent regions in the result. Default is true. Note:
948-
* Semitransparency is currently only supported for car windows.
949-
*/
950-
semitransparency?: boolean;
951-
}
952-
}
953-
954-
export interface AutoTaggingExtension {
955-
/**
956-
* Maximum number of tags to attach to the asset.
957-
*/
958-
maxTags: number;
959-
960-
/**
961-
* Minimum confidence level for tags to be considered valid.
962-
*/
963-
minConfidence: number;
964-
965-
/**
966-
* Specifies the auto-tagging extension used.
967-
*/
968-
name: 'google-auto-tagging' | 'aws-auto-tagging';
969-
}
970-
971-
export interface AIAutoDescription {
972-
/**
973-
* Specifies the auto description extension.
974-
*/
975-
name: 'ai-auto-description';
976-
}
977-
}
978-
979912
export interface ChangePublicationStatus {
980913
/**
981914
* Configure the publication status of a file and its versions.
@@ -1148,9 +1081,7 @@ export interface FileUploadParams {
11481081
* Array of extensions to be applied to the asset. Each extension can be configured
11491082
* with specific parameters based on the extension type.
11501083
*/
1151-
extensions?: Array<
1152-
FileUploadParams.RemoveBg | FileUploadParams.AutoTaggingExtension | FileUploadParams.AIAutoDescription
1153-
>;
1084+
extensions?: Shared.Extensions;
11541085

11551086
/**
11561087
* The folder path in which the image has to be uploaded. If the folder(s) didn't
@@ -1282,68 +1213,6 @@ export interface FileUploadParams {
12821213
}
12831214

12841215
export namespace FileUploadParams {
1285-
export interface RemoveBg {
1286-
/**
1287-
* Specifies the background removal extension.
1288-
*/
1289-
name: 'remove-bg';
1290-
1291-
options?: RemoveBg.Options;
1292-
}
1293-
1294-
export namespace RemoveBg {
1295-
export interface Options {
1296-
/**
1297-
* Whether to add an artificial shadow to the result. Default is false. Note:
1298-
* Adding shadows is currently only supported for car photos.
1299-
*/
1300-
add_shadow?: boolean;
1301-
1302-
/**
1303-
* Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
1304-
* color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
1305-
* empty.
1306-
*/
1307-
bg_color?: string;
1308-
1309-
/**
1310-
* Sets a background image from a URL. If this parameter is set, `bg_color` must be
1311-
* empty.
1312-
*/
1313-
bg_image_url?: string;
1314-
1315-
/**
1316-
* Allows semi-transparent regions in the result. Default is true. Note:
1317-
* Semitransparency is currently only supported for car windows.
1318-
*/
1319-
semitransparency?: boolean;
1320-
}
1321-
}
1322-
1323-
export interface AutoTaggingExtension {
1324-
/**
1325-
* Maximum number of tags to attach to the asset.
1326-
*/
1327-
maxTags: number;
1328-
1329-
/**
1330-
* Minimum confidence level for tags to be considered valid.
1331-
*/
1332-
minConfidence: number;
1333-
1334-
/**
1335-
* Specifies the auto-tagging extension used.
1336-
*/
1337-
name: 'google-auto-tagging' | 'aws-auto-tagging';
1338-
}
1339-
1340-
export interface AIAutoDescription {
1341-
/**
1342-
* Specifies the auto description extension.
1343-
*/
1344-
name: 'ai-auto-description';
1345-
}
1346-
13471216
/**
13481217
* Configure pre-processing (`pre`) and post-processing (`post`) transformations.
13491218
*

src/resources/shared.ts

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,78 @@ export interface BaseOverlay {
66
timing?: OverlayTiming;
77
}
88

9+
/**
10+
* Array of extensions to be applied to the asset. Each extension can be configured
11+
* with specific parameters based on the extension type.
12+
*/
13+
export type Extensions = Array<
14+
Extensions.RemoveBg | Extensions.AutoTaggingExtension | Extensions.AIAutoDescription
15+
>;
16+
17+
export namespace Extensions {
18+
export interface RemoveBg {
19+
/**
20+
* Specifies the background removal extension.
21+
*/
22+
name: 'remove-bg';
23+
24+
options?: RemoveBg.Options;
25+
}
26+
27+
export namespace RemoveBg {
28+
export interface Options {
29+
/**
30+
* Whether to add an artificial shadow to the result. Default is false. Note:
31+
* Adding shadows is currently only supported for car photos.
32+
*/
33+
add_shadow?: boolean;
34+
35+
/**
36+
* Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
37+
* color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
38+
* empty.
39+
*/
40+
bg_color?: string;
41+
42+
/**
43+
* Sets a background image from a URL. If this parameter is set, `bg_color` must be
44+
* empty.
45+
*/
46+
bg_image_url?: string;
47+
48+
/**
49+
* Allows semi-transparent regions in the result. Default is true. Note:
50+
* Semitransparency is currently only supported for car windows.
51+
*/
52+
semitransparency?: boolean;
53+
}
54+
}
55+
56+
export interface AutoTaggingExtension {
57+
/**
58+
* Maximum number of tags to attach to the asset.
59+
*/
60+
maxTags: number;
61+
62+
/**
63+
* Minimum confidence level for tags to be considered valid.
64+
*/
65+
minConfidence: number;
66+
67+
/**
68+
* Specifies the auto-tagging extension used.
69+
*/
70+
name: 'google-auto-tagging' | 'aws-auto-tagging';
71+
}
72+
73+
export interface AIAutoDescription {
74+
/**
75+
* Specifies the auto description extension.
76+
*/
77+
name: 'ai-auto-description';
78+
}
79+
}
80+
981
export interface ImageOverlay extends BaseOverlay {
1082
/**
1183
* Specifies the relative path to the image used as an overlay.

0 commit comments

Comments
 (0)