Skip to content

Commit 13d12e0

Browse files
feat(api): manual updates
1 parent 37f670b commit 13d12e0

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
@@ -908,6 +908,7 @@ export declare namespace ImageKit {
908908
};
909909

910910
export type BaseOverlay = API.BaseOverlay;
911+
export type Extensions = API.Extensions;
911912
export type ImageOverlay = API.ImageOverlay;
912913
export type Overlay = API.Overlay;
913914
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';
@@ -335,9 +336,7 @@ export interface FileUploadParams {
335336
* Array of extensions to be applied to the asset. Each extension can be configured
336337
* with specific parameters based on the extension type.
337338
*/
338-
extensions?: Array<
339-
FileUploadParams.RemoveBg | FileUploadParams.AutoTaggingExtension | FileUploadParams.AIAutoDescription
340-
>;
339+
extensions?: Shared.Extensions;
341340

342341
/**
343342
* The folder path in which the image has to be uploaded. If the folder(s) didn't
@@ -447,68 +446,6 @@ export interface FileUploadParams {
447446
}
448447

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

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,
@@ -876,11 +877,7 @@ export namespace FileUpdateParams {
876877
* Array of extensions to be applied to the asset. Each extension can be configured
877878
* with specific parameters based on the extension type.
878879
*/
879-
extensions?: Array<
880-
| UpdateFileDetails.RemoveBg
881-
| UpdateFileDetails.AutoTaggingExtension
882-
| UpdateFileDetails.AIAutoDescription
883-
>;
880+
extensions?: Shared.Extensions;
884881

885882
/**
886883
* An array of AITags associated with the file that you want to remove, e.g.
@@ -909,70 +906,6 @@ export namespace FileUpdateParams {
909906
webhookUrl?: string;
910907
}
911908

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

11521083
/**
11531084
* The folder path in which the image has to be uploaded. If the folder(s) didn't
@@ -1279,68 +1210,6 @@ export interface FileUploadParams {
12791210
}
12801211

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

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)