@musallam/ffs-firefly-client 1.0.0 → 2.0.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/dist/flat.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as Options$2, t as ky } from "./index-B2PznWi7.cjs";
1
+ import ky, { Options as Options$1 } from "ky";
2
2
 
3
3
  //#region packages/firefly/src/flat/core/auth.gen.d.ts
4
4
  type AuthToken = string | undefined;
@@ -187,6 +187,7 @@ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> =
187
187
  };
188
188
  //#endregion
189
189
  //#region packages/firefly/src/flat/client/utils.gen.d.ts
190
+ declare const mergeHeaders: (...headers: Array<Required<Config>["headers"] | undefined>) => Headers;
190
191
  type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
191
192
  type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
192
193
  type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
@@ -204,6 +205,7 @@ interface Middleware<Req, Res, Err, Options> {
204
205
  request: Interceptors<ReqInterceptor<Req, Options>>;
205
206
  response: Interceptors<ResInterceptor<Res, Req, Options>>;
206
207
  }
208
+ declare const createConfig: <T extends ClientOptions$1 = ClientOptions$1>(override?: Config<Omit<ClientOptions$1, keyof T> & T>) => Config<Omit<ClientOptions$1, keyof T> & T>;
207
209
  //#endregion
208
210
  //#region packages/firefly/src/flat/client/types.gen.d.ts
209
211
  type ResponseStyle = 'data' | 'fields';
@@ -227,7 +229,7 @@ interface RetryOptions {
227
229
  */
228
230
  statusCodes?: number[];
229
231
  }
230
- interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Options$2, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>, Config$1 {
232
+ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Options$1, 'body' | 'headers' | 'method' | 'prefixUrl' | 'retry' | 'throwHttpErrors'>, Config$1 {
231
233
  /**
232
234
  * Base URL for all requests made by this client.
233
235
  */
@@ -241,7 +243,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Optio
241
243
  * Additional ky-specific options that will be passed directly to ky.
242
244
  * This allows you to use any ky option not explicitly exposed in the config.
243
245
  */
244
- kyOptions?: Omit<Options$2, 'method' | 'prefixUrl'>;
246
+ kyOptions?: Omit<Options$1, 'method' | 'prefixUrl'>;
245
247
  /**
246
248
  * Return the response data parsed in a specified format. By default, `auto`
247
249
  * will infer the appropriate method from the `Content-Type` response header.
@@ -322,7 +324,7 @@ type BuildUrlFn = <TData extends {
322
324
  path?: Record<string, unknown>;
323
325
  query?: Record<string, unknown>;
324
326
  url: string;
325
- }>(options: TData & Options$1<TData>) => string;
327
+ }>(options: TData & Options$2<TData>) => string;
326
328
  type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
327
329
  interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
328
330
  };
@@ -334,7 +336,10 @@ interface TDataShape {
334
336
  url: string;
335
337
  }
336
338
  type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
337
- type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
339
+ type Options$2<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
340
+ //#endregion
341
+ //#region packages/firefly/src/flat/client/client.gen.d.ts
342
+ declare const createClient: (config?: Config) => Client;
338
343
  //#endregion
339
344
  //#region packages/firefly/src/flat/types.gen.d.ts
340
345
  type ClientOptions = {
@@ -372,6 +377,10 @@ type ApiError = {
372
377
  */
373
378
  validation_errors?: Array<ValidationErrorMessage>;
374
379
  };
380
+ /**
381
+ * AspectRatio
382
+ */
383
+ type AspectRatio = '1:1' | '4:3' | '3:4' | '16:9' | '9:16';
375
384
  /**
376
385
  * ApiErrorGeneric
377
386
  *
@@ -535,8 +544,19 @@ type ValidationErrorDetail = {
535
544
  [key: string]: unknown;
536
545
  };
537
546
  };
547
+ /**
548
+ * ValidationErrorCode422
549
+ *
550
+ * Error code for HTTP 422 responses (request validation only).
551
+ */
552
+ type ValidationErrorCode422 = 'validation_error' | 'cai_assertion_violation_error';
553
+ /**
554
+ * ValidationErrorResponse
555
+ *
556
+ * Error response body for HTTP 422 (validation failures).
557
+ */
538
558
  type ValidationErrorResponse = {
539
- error_code?: string;
559
+ error_code: ValidationErrorCode422;
540
560
  /**
541
561
  * Human-readable error description.
542
562
  */
@@ -546,6 +566,24 @@ type ValidationErrorResponse = {
546
566
  */
547
567
  validation_errors?: Array<ValidationErrorDetail>;
548
568
  };
569
+ /**
570
+ * ContentPolicyErrorCode451
571
+ *
572
+ * Error code for HTTP 451 responses (content policy, legal, or safety).
573
+ */
574
+ type ContentPolicyErrorCode451 = 'legal_error' | 'prompt_unsafe' | 'prompt_entity_denied' | 'image_unsafe' | 'video_unsafe' | 'reference_image_unsafe_error' | 'input_media_unsafe';
575
+ /**
576
+ * ContentPolicyErrorResponse
577
+ *
578
+ * Error response body for HTTP 451 (content policy, legal, or safety).
579
+ */
580
+ type ContentPolicyErrorResponse = {
581
+ error_code: ContentPolicyErrorCode451;
582
+ /**
583
+ * Human-readable error description.
584
+ */
585
+ message?: string;
586
+ };
549
587
  /**
550
588
  * JobOutput
551
589
  *
@@ -619,7 +657,10 @@ type JobSucceededPayload = {
619
657
  * The job ID.
620
658
  */
621
659
  jobId: string;
622
- result: JobResult;
660
+ /**
661
+ * The result of the completed job. The schema depends on the async operation (for example generation, composite, or upscale).
662
+ */
663
+ result: JobResult | CreativeUpsamplerResponse;
623
664
  };
624
665
  /**
625
666
  * PublicBinary-Output
@@ -682,6 +723,34 @@ type AsyncApiErrorV3 = {
682
723
  */
683
724
  validation_errors?: Array<ValidationErrorMessage>;
684
725
  };
726
+ /**
727
+ * AsyncTaskLink
728
+ */
729
+ type AsyncTaskLink = {
730
+ /**
731
+ * Href
732
+ */
733
+ href: string;
734
+ };
735
+ /**
736
+ * AsyncTaskLinkType
737
+ */
738
+ type AsyncTaskLinkType = 'cancel' | 'result';
739
+ /**
740
+ * AsyncTaskResponse
741
+ *
742
+ * Response type for async requests.
743
+ */
744
+ type AsyncTaskResponse = {
745
+ /**
746
+ * Links
747
+ */
748
+ links: { [key in AsyncTaskLinkType]?: AsyncTaskLink };
749
+ /**
750
+ * Progress
751
+ */
752
+ progress?: number;
753
+ };
685
754
  /**
686
755
  * AsyncTaskResponseV3
687
756
  */
@@ -714,10 +783,101 @@ type AsyncTaskResponseV3 = {
714
783
  */
715
784
  type BaseInputImageV3 = {
716
785
  /**
717
- * Source image that Firefly expands, fills or uses to generate similar images.
786
+ * Source image that Firefly expands, fills, uses to generate similar images, or upscales (beta).
718
787
  */
719
788
  source: PublicBinaryInputV3;
720
789
  };
790
+ /**
791
+ * CreativeUpscaleAcceptResponseV3
792
+ *
793
+ * Response for async upscale requests (beta). Use links.result.href to poll for status and links.cancel.href to cancel.
794
+ */
795
+ type CreativeUpscaleAcceptResponseV3 = {
796
+ /**
797
+ * Links to cancel and to fetch the job status or result.
798
+ */
799
+ links: {
800
+ [key: string]: CreativeUpscaleTaskLink;
801
+ };
802
+ /**
803
+ * Progress percentage when available (for example when polling status).
804
+ */
805
+ progress?: number;
806
+ };
807
+ /**
808
+ * CreativeUpscaleTaskLink
809
+ */
810
+ type CreativeUpscaleTaskLink = {
811
+ /**
812
+ * URL for the cancel or result endpoint.
813
+ */
814
+ href: string;
815
+ };
816
+ /**
817
+ * CreativeUpsamplerRequestV3
818
+ *
819
+ * Request body for upscaling an image (beta). Provide the input image via uploadId from storage or a presigned URL. Seeds are required for reproducible results.
820
+ */
821
+ type CreativeUpsamplerRequestV3 = {
822
+ /**
823
+ * The input image for the upsampler (source uploadId or url).
824
+ */
825
+ image: BaseInputImageV3;
826
+ /**
827
+ * The seed for each variation. Provide one seed per output (1–4 seeds).
828
+ */
829
+ seeds: Array<number>;
830
+ /**
831
+ * The upscale factor (2, 3, 4, or 6). Output dimensions are input dimensions multiplied by this factor.
832
+ */
833
+ upscaleFactor?: UpsampleFactor;
834
+ };
835
+ /**
836
+ * CreativeUpsamplerResponse
837
+ *
838
+ * Upscale result (beta). Each item in outputs is a storage reference for an upscaled image.
839
+ */
840
+ type CreativeUpsamplerResponse = {
841
+ /**
842
+ * The list of upscaled images (storage items).
843
+ */
844
+ outputs: Array<UpscaleBinaryOutput>;
845
+ /**
846
+ * The version of the upscale feature.
847
+ */
848
+ version: string;
849
+ };
850
+ /**
851
+ * Supported upscale factors. Output size equals input size multiplied by this factor.
852
+ */
853
+ type UpsampleFactor = 2 | 3 | 4 | 6;
854
+ /**
855
+ * UpscaleBinaryOutput
856
+ *
857
+ * Reference to output binary (for example an upscaled image). Use id in subsequent API calls or the presigned URL to download.
858
+ */
859
+ type UpscaleBinaryOutput = {
860
+ /**
861
+ * The internal ID for a storage item.
862
+ */
863
+ id?: string;
864
+ /**
865
+ * URL to download the file. Expires in one hour.
866
+ */
867
+ presignedUrl?: string;
868
+ /**
869
+ * Optional ID of the file in ACP. Must be an ACP File asset ID.
870
+ */
871
+ creativeCloudFileId?: string;
872
+ /**
873
+ * Optional ID of the component in ACP. Must be an ACP Component asset ID.
874
+ */
875
+ creativeCloudComponentId?: string;
876
+ /**
877
+ * Optional name for the item (for example for lookup in multipart responses).
878
+ */
879
+ name?: string;
880
+ };
721
881
  /**
722
882
  * BaseInputMaskV3
723
883
  */
@@ -915,6 +1075,10 @@ type FillImageResponseV3 = {
915
1075
  */
916
1076
  size: Size;
917
1077
  };
1078
+ /**
1079
+ * FireflyModelId
1080
+ */
1081
+ type FireflyModelId = 'firefly_image';
918
1082
  /**
919
1083
  * Generating images from prompt
920
1084
  */
@@ -968,6 +1132,98 @@ type GenerateImagesRequestV3 = {
968
1132
  */
969
1133
  visualIntensity?: number;
970
1134
  };
1135
+ /**
1136
+ * ImageGenerateRequestV3
1137
+ */
1138
+ type ImageGenerateRequestV3 = {
1139
+ /**
1140
+ * The prompt
1141
+ *
1142
+ * The prompt used to generate the image. The longer the prompt, the better.
1143
+ */
1144
+ prompt: string;
1145
+ /**
1146
+ * The aspect ratio of the requested generations. This controls the size of the generated image.
1147
+ */
1148
+ aspectRatio?: AspectRatio;
1149
+ /**
1150
+ * The specific model to use for image generation. Available options: 'firefly_image' for Firefly Image model.
1151
+ */
1152
+ modelId?: FireflyModelId;
1153
+ /**
1154
+ * Additional model-specific parameters for controlling the generation process.
1155
+ */
1156
+ modelSpecificPayload?: ModelSpecificPayloadV3;
1157
+ /**
1158
+ * The number of variations
1159
+ *
1160
+ * The number of image variations to generate. Greater than 1 is not supported. Only one image per variation is allowed. For multiple variations, send separate requests.
1161
+ */
1162
+ numVariations?: number;
1163
+ /**
1164
+ * Reference blobs
1165
+ *
1166
+ * List of reference blobs that will be used as additional input for the generation process. Only one reference image is supported. [Pre-signed URLs can be used from supported domains](https://developer.adobe.com/firefly-services/docs/firefly-api/getting-started/usage-notes/#image-api-usage).
1167
+ */
1168
+ referenceBlobs?: Array<ReferenceBlobV3>;
1169
+ /**
1170
+ * The seeds for the generations
1171
+ *
1172
+ * The seed value to vary the image generation. Only one seed per variation is allowed. If specified alongside with numVariations, the number of seeds must be equal to numVariations.
1173
+ */
1174
+ seeds?: Array<number>;
1175
+ };
1176
+ /**
1177
+ * ModelSpecificPayloadV3
1178
+ *
1179
+ * Model-specific payload parameters for V3 generation workflows.
1180
+ */
1181
+ type ModelSpecificPayloadV3 = {
1182
+ /**
1183
+ * The locale code used for image generations
1184
+ *
1185
+ * The locale code (following RFC 5646 format, e.g., 'en-US') will be used to generate content that is more relevant for user's country and language.
1186
+ */
1187
+ localeCode?: string;
1188
+ };
1189
+ /**
1190
+ * ReferenceBlobV3
1191
+ *
1192
+ * Reference blob for V3 API. Style Guide compliant: The 'source' property specifies the input location, and other properties like 'usage' are peers of 'source'.
1193
+ */
1194
+ type ReferenceBlobV3 = {
1195
+ /**
1196
+ * The source location of the reference image.
1197
+ */
1198
+ source: ReferenceBlobSourceV3;
1199
+ /**
1200
+ * The usage of the reference blob. Available options: 'general' for general reference.
1201
+ */
1202
+ usage?: ReferenceBlobUsageV3;
1203
+ };
1204
+ /**
1205
+ * ReferenceBlobSourceV3
1206
+ *
1207
+ * Source specification for a reference blob input asset. Input images must meet these requirements: file size must be 10 MB or less; image area must be between 512×512 and 2048×2048 pixels (inclusive); aspect ratio must be between 1:5 and 5:1 (inclusive).
1208
+ */
1209
+ type ReferenceBlobSourceV3 = {
1210
+ /**
1211
+ * Upload ID
1212
+ *
1213
+ * The ID of an asset previously uploaded to the Firefly Upload Image API.
1214
+ */
1215
+ uploadId?: string;
1216
+ /**
1217
+ * URL
1218
+ *
1219
+ * URL of the reference image. Presigned URLs are not supported for Image5; images must be uploaded to Adobe storage.
1220
+ */
1221
+ url?: string;
1222
+ };
1223
+ /**
1224
+ * ReferenceBlobUsageV3
1225
+ */
1226
+ type ReferenceBlobUsageV3 = 'general';
971
1227
  /**
972
1228
  * Generating images from prompt
973
1229
  */
@@ -1698,7 +1954,7 @@ type GenerateImagesV3AsyncErrors = {
1698
1954
  /**
1699
1955
  * Unprocessable Entity
1700
1956
  */
1701
- 422: ApiError;
1957
+ 422: ValidationErrorResponse;
1702
1958
  /**
1703
1959
  * Too Many Requests
1704
1960
  */
@@ -1716,6 +1972,88 @@ type GenerateImagesV3AsyncResponses = {
1716
1972
  202: AsyncAcceptResponseV3;
1717
1973
  };
1718
1974
  type GenerateImagesV3AsyncResponse = GenerateImagesV3AsyncResponses[keyof GenerateImagesV3AsyncResponses];
1975
+ type FireflyImageV5GenerateAsyncV4Data = {
1976
+ body: ImageGenerateRequestV3;
1977
+ headers: {
1978
+ /**
1979
+ * The model version to use for image generation.
1980
+ */
1981
+ 'x-model-version': 'image5';
1982
+ };
1983
+ path?: never;
1984
+ query?: never;
1985
+ url: '/v4/images/generate-async';
1986
+ };
1987
+ type FireflyImageV5GenerateAsyncV4Errors = {
1988
+ /**
1989
+ * Bad Request
1990
+ */
1991
+ 400: ApiError;
1992
+ /**
1993
+ * Unauthorized
1994
+ */
1995
+ 401: ApiError;
1996
+ /**
1997
+ * Forbidden
1998
+ */
1999
+ 403: ApiError;
2000
+ /**
2001
+ * Requested Resource Was Not Found
2002
+ */
2003
+ 404: ApiError;
2004
+ /**
2005
+ * Request Timeout
2006
+ */
2007
+ 408: ApiError;
2008
+ /**
2009
+ * Conflict
2010
+ */
2011
+ 409: ApiError;
2012
+ /**
2013
+ * Gone
2014
+ */
2015
+ 410: ApiError;
2016
+ /**
2017
+ * Unsupported Media Type
2018
+ */
2019
+ 415: ApiError;
2020
+ /**
2021
+ * Unprocessable Entity
2022
+ */
2023
+ 422: ValidationErrorResponse;
2024
+ /**
2025
+ * Too Many Requests
2026
+ */
2027
+ 429: ApiError;
2028
+ /**
2029
+ * Unavailable For Legal Reasons
2030
+ */
2031
+ 451: ContentPolicyErrorResponse;
2032
+ /**
2033
+ * Client Closed Request
2034
+ */
2035
+ 499: ApiError;
2036
+ /**
2037
+ * Internal Server Error
2038
+ */
2039
+ 500: ApiError;
2040
+ /**
2041
+ * Not Implemented
2042
+ */
2043
+ 501: ApiError;
2044
+ /**
2045
+ * Service Unavailable
2046
+ */
2047
+ 503: ApiError;
2048
+ };
2049
+ type FireflyImageV5GenerateAsyncV4Error = FireflyImageV5GenerateAsyncV4Errors[keyof FireflyImageV5GenerateAsyncV4Errors];
2050
+ type FireflyImageV5GenerateAsyncV4Responses = {
2051
+ /**
2052
+ * Success
2053
+ */
2054
+ 200: AsyncTaskResponse;
2055
+ };
2056
+ type FireflyImageV5GenerateAsyncV4Response = FireflyImageV5GenerateAsyncV4Responses[keyof FireflyImageV5GenerateAsyncV4Responses];
1719
2057
  type GenerateSimilarImagesV3AsyncData = {
1720
2058
  body: GenerateSimilarImagesRequestV3;
1721
2059
  headers?: {
@@ -1752,7 +2090,7 @@ type GenerateSimilarImagesV3AsyncErrors = {
1752
2090
  /**
1753
2091
  * Unprocessable Entity
1754
2092
  */
1755
- 422: ApiError;
2093
+ 422: ValidationErrorResponse;
1756
2094
  /**
1757
2095
  * Too Many Requests
1758
2096
  */
@@ -1800,7 +2138,7 @@ type ExpandImagesV3AsyncErrors = {
1800
2138
  /**
1801
2139
  * Unprocessable Entity
1802
2140
  */
1803
- 422: ApiError;
2141
+ 422: ValidationErrorResponse;
1804
2142
  /**
1805
2143
  * Too Many Requests
1806
2144
  */
@@ -1848,7 +2186,7 @@ type FillImagesV3AsyncErrors = {
1848
2186
  /**
1849
2187
  * Unprocessable Entity
1850
2188
  */
1851
- 422: ApiError;
2189
+ 422: ValidationErrorResponse;
1852
2190
  /**
1853
2191
  * Too Many Requests
1854
2192
  */
@@ -1892,7 +2230,7 @@ type GenerateObjectCompositeV3AsyncErrors = {
1892
2230
  /**
1893
2231
  * Unprocessable Entity
1894
2232
  */
1895
- 422: ApiError;
2233
+ 422: ValidationErrorResponse;
1896
2234
  /**
1897
2235
  * Too Many Requests
1898
2236
  */
@@ -1926,7 +2264,7 @@ type PreciseCompositeErrors = {
1926
2264
  /**
1927
2265
  * Bad Request
1928
2266
  */
1929
- 400: ValidationErrorResponse;
2267
+ 400: ApiErrorGeneric;
1930
2268
  /**
1931
2269
  * Unauthorized
1932
2270
  */
@@ -1935,10 +2273,18 @@ type PreciseCompositeErrors = {
1935
2273
  * Forbidden
1936
2274
  */
1937
2275
  403: ApiErrorGeneric;
2276
+ /**
2277
+ * Unprocessable Entity
2278
+ */
2279
+ 422: ValidationErrorResponse;
1938
2280
  /**
1939
2281
  * Too Many Requests
1940
2282
  */
1941
2283
  429: ApiErrorGeneric;
2284
+ /**
2285
+ * Unavailable For Legal Reasons
2286
+ */
2287
+ 451: ContentPolicyErrorResponse;
1942
2288
  /**
1943
2289
  * Internal Server Error
1944
2290
  */
@@ -1972,7 +2318,7 @@ type AdaptiveCompositeErrors = {
1972
2318
  /**
1973
2319
  * Bad Request
1974
2320
  */
1975
- 400: ValidationErrorResponse;
2321
+ 400: ApiErrorGeneric;
1976
2322
  /**
1977
2323
  * Unauthorized
1978
2324
  */
@@ -1981,10 +2327,18 @@ type AdaptiveCompositeErrors = {
1981
2327
  * Forbidden
1982
2328
  */
1983
2329
  403: ApiErrorGeneric;
2330
+ /**
2331
+ * Unprocessable Entity
2332
+ */
2333
+ 422: ValidationErrorResponse;
1984
2334
  /**
1985
2335
  * Too Many Requests
1986
2336
  */
1987
2337
  429: ApiErrorGeneric;
2338
+ /**
2339
+ * Unavailable For Legal Reasons
2340
+ */
2341
+ 451: ContentPolicyErrorResponse;
1988
2342
  /**
1989
2343
  * Internal Server Error
1990
2344
  */
@@ -2002,6 +2356,60 @@ type AdaptiveCompositeResponses = {
2002
2356
  202: AsyncJobResponse;
2003
2357
  };
2004
2358
  type AdaptiveCompositeResponse = AdaptiveCompositeResponses[keyof AdaptiveCompositeResponses];
2359
+ type CreativeUpsamplerV3AsyncData = {
2360
+ body: CreativeUpsamplerRequestV3;
2361
+ headers?: {
2362
+ /**
2363
+ * Model version for the upscale operation. Use creative_upsampler_v1.
2364
+ */
2365
+ 'x-model-version'?: string;
2366
+ };
2367
+ path?: never;
2368
+ query?: never;
2369
+ url: '/v3/images/upscale';
2370
+ };
2371
+ type CreativeUpsamplerV3AsyncErrors = {
2372
+ /**
2373
+ * Bad Request
2374
+ */
2375
+ 400: ValidationErrorResponse;
2376
+ /**
2377
+ * Unauthorized
2378
+ */
2379
+ 401: ApiErrorGeneric;
2380
+ /**
2381
+ * Forbidden
2382
+ */
2383
+ 403: ApiErrorGeneric;
2384
+ /**
2385
+ * Requested Resource Was Not Found
2386
+ */
2387
+ 404: ApiErrorGeneric;
2388
+ /**
2389
+ * Input Validation Error
2390
+ */
2391
+ 422: ValidationErrorResponse;
2392
+ /**
2393
+ * Too Many Requests
2394
+ */
2395
+ 429: ApiErrorGeneric;
2396
+ /**
2397
+ * Internal Server Error
2398
+ */
2399
+ 500: ApiErrorGeneric;
2400
+ /**
2401
+ * Service Unavailable
2402
+ */
2403
+ 503: ApiErrorGeneric;
2404
+ };
2405
+ type CreativeUpsamplerV3AsyncError = CreativeUpsamplerV3AsyncErrors[keyof CreativeUpsamplerV3AsyncErrors];
2406
+ type CreativeUpsamplerV3AsyncResponses = {
2407
+ /**
2408
+ * Accepted
2409
+ */
2410
+ 202: CreativeUpscaleAcceptResponseV3;
2411
+ };
2412
+ type CreativeUpsamplerV3AsyncResponse = CreativeUpsamplerV3AsyncResponses[keyof CreativeUpsamplerV3AsyncResponses];
2005
2413
  type GenerateVideoV3Data = {
2006
2414
  /**
2007
2415
  * The request body for the video generation.
@@ -2037,7 +2445,7 @@ type GenerateVideoV3Errors = {
2037
2445
  /**
2038
2446
  * Unprocessable Entity
2039
2447
  */
2040
- 422: ApiError;
2448
+ 422: ValidationErrorResponse;
2041
2449
  /**
2042
2450
  * Too Many Requests
2043
2451
  */
@@ -2124,7 +2532,7 @@ type GetCustomModelsResponses = {
2124
2532
  type GetCustomModelsResponse = GetCustomModelsResponses[keyof GetCustomModelsResponses];
2125
2533
  type StorageImageV2Data = {
2126
2534
  /**
2127
- * The PNG/JPEG/WEBP image to be stored (binary data). The maximum file size supported for uploading an image is 15MB.
2535
+ * The PNG, JPEG, WEBP, TIFF, or JXL image to be stored (binary data). The maximum file size supported for uploading an image is 15MB.
2128
2536
  */
2129
2537
  body: Blob | File;
2130
2538
  path?: never;
@@ -2151,7 +2559,7 @@ type StorageImageV2Errors = {
2151
2559
  /**
2152
2560
  * Unavailable for Legal Reasons
2153
2561
  */
2154
- 451: ErrorBody;
2562
+ 451: ContentPolicyErrorResponse;
2155
2563
  /**
2156
2564
  * Internal Server Error
2157
2565
  */
@@ -2171,7 +2579,7 @@ type JobResultV3Data = {
2171
2579
  /**
2172
2580
  * Job ID
2173
2581
  *
2174
- * The job ID to retrieve status for.
2582
+ * The job ID or URN returned in async response links.
2175
2583
  */
2176
2584
  jobId: string;
2177
2585
  };
@@ -2194,7 +2602,7 @@ type JobResultV3Errors = {
2194
2602
  /**
2195
2603
  * Unprocessable Entity
2196
2604
  */
2197
- 422: ApiErrorGeneric;
2605
+ 422: ValidationErrorResponse;
2198
2606
  /**
2199
2607
  * Too Many Requests
2200
2608
  */
@@ -2222,7 +2630,7 @@ type CancelJobV4Data = {
2222
2630
  /**
2223
2631
  * Job ID
2224
2632
  *
2225
- * The job ID to cancel.
2633
+ * The job ID or URN returned in async response links.
2226
2634
  */
2227
2635
  jobId: string;
2228
2636
  };
@@ -2272,7 +2680,7 @@ type CancelJobV4Responses = {
2272
2680
  };
2273
2681
  //#endregion
2274
2682
  //#region packages/firefly/src/flat/sdk.gen.d.ts
2275
- type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
2683
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$2<TData, ThrowOnError> & {
2276
2684
  /**
2277
2685
  * You can provide a client instance returned by `createClient()` instead of
2278
2686
  * individual options. This might be also useful if you want to implement a
@@ -2291,6 +2699,12 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
2291
2699
  * Generate images based on a text prompt. You may also include a reference image and Firefly will try to mimic the characteristics, such as color scheme, lighting, layout of objects in the image, etc.
2292
2700
  */
2293
2701
  declare const generateImagesV3Async: <ThrowOnError extends boolean = false>(options: Options<GenerateImagesV3AsyncData, ThrowOnError>) => RequestResult<GenerateImagesV3AsyncResponses, GenerateImagesV3AsyncErrors, ThrowOnError, "fields">;
2702
+ /**
2703
+ * Generate images with Image5
2704
+ *
2705
+ * Generate images asynchronously using Firefly's Image5 model.
2706
+ */
2707
+ declare const fireflyImageV5GenerateAsyncV4: <ThrowOnError extends boolean = false>(options: Options<FireflyImageV5GenerateAsyncV4Data, ThrowOnError>) => RequestResult<FireflyImageV5GenerateAsyncV4Responses, FireflyImageV5GenerateAsyncV4Errors, ThrowOnError, "fields">;
2294
2708
  /**
2295
2709
  * Generate similar images
2296
2710
  *
@@ -2327,6 +2741,12 @@ declare const preciseComposite: <ThrowOnError extends boolean = false>(options:
2327
2741
  * Submits an asynchronous adaptive composite generation job using the adaptive composite pipeline.
2328
2742
  */
2329
2743
  declare const adaptiveComposite: <ThrowOnError extends boolean = false>(options: Options<AdaptiveCompositeData, ThrowOnError>) => RequestResult<AdaptiveCompositeResponses, AdaptiveCompositeErrors, ThrowOnError, "fields">;
2744
+ /**
2745
+ * Upscale image (beta)
2746
+ *
2747
+ * Upscales an image asynchronously using the creative upsampler (beta). Provide the input image via an upload ID from the storage API or a presigned URL. The response includes links to check status and retrieve the result. Poll the status URL until the job completes, then fetch the result for the upscaled image(s).
2748
+ */
2749
+ declare const creativeUpsamplerV3Async: <ThrowOnError extends boolean = false>(options: Options<CreativeUpsamplerV3AsyncData, ThrowOnError>) => RequestResult<CreativeUpsamplerV3AsyncResponses, CreativeUpsamplerV3AsyncErrors, ThrowOnError, "fields">;
2330
2750
  /**
2331
2751
  * Generate video
2332
2752
  *
@@ -2342,13 +2762,13 @@ declare const getCustomModels: <ThrowOnError extends boolean = false>(options: O
2342
2762
  /**
2343
2763
  * Upload image
2344
2764
  *
2345
- * Upload source image or mask for image-to-image operations, such as fill, expand. This API returns an identifier that is used to refer to uploaded content. The uploaded assets will be valid for 7 days from the date you upload them.
2765
+ * Upload source image or mask for image-to-image operations, such as fill, expand, or upscale (beta). This API returns an identifier that is used to refer to uploaded content. The uploaded assets will be valid for 7 days from the date you upload them.
2346
2766
  */
2347
2767
  declare const storageImageV2: <ThrowOnError extends boolean = false>(options: Options<StorageImageV2Data, ThrowOnError>) => RequestResult<StorageImageV2Responses, StorageImageV2Errors, ThrowOnError, "fields">;
2348
2768
  /**
2349
2769
  * Get job status
2350
2770
  *
2351
- * Get the status of an asynchronous job.
2771
+ * Get the status of an asynchronous job (including upscale jobs). When the job has completed successfully, the result reflects the operation type (for example generation, composite, or upscale).
2352
2772
  */
2353
2773
  declare const jobResultV3: <ThrowOnError extends boolean = false>(options: Options<JobResultV3Data, ThrowOnError>) => RequestResult<JobResultV3Responses, JobResultV3Errors, ThrowOnError, "fields">;
2354
2774
  /**
@@ -2358,5 +2778,8 @@ declare const jobResultV3: <ThrowOnError extends boolean = false>(options: Optio
2358
2778
  */
2359
2779
  declare const cancelJobV4: <ThrowOnError extends boolean = false>(options: Options<CancelJobV4Data, ThrowOnError>) => RequestResult<CancelJobV4Responses, CancelJobV4Errors, ThrowOnError, "fields">;
2360
2780
  //#endregion
2361
- export { type AdaptiveCompositeData, type AdaptiveCompositeError, type AdaptiveCompositeErrors, type AdaptiveCompositeRequest, type AdaptiveCompositeResponse, type AdaptiveCompositeResponses, type AdaptiveObjectInput, type AlignmentHorizontal, type AlignmentVertical, type ApiError, type ApiErrorGeneric, type AsyncAcceptResponseV3, type AsyncApiErrorV3, type AsyncJobResponse, type AsyncResponseV3, type AsyncResult, type AsyncTaskResponseV3, type BackgroundInput, type BaseInputImageV3, type BaseInputMaskV3, type BaseModel, type BodyExpandImagesV3Async, type BodyFillImagesV3Async, type BodyGenerateImagesV3Async, type BodyGenerateObjectCompositeV3Async, type BodyGenerateSimilarImagesV3Async, type CameraMotion, type CancelJobV4Data, type CancelJobV4Error, type CancelJobV4Errors, type CancelJobV4Responses, type ClientOptions, type ClinetoSize, type ColligoAsyncCancelErrorCodeV3, type ColligoErrorCodeAsyncV3, type ColliogAsyncStatusErrorCodeV3, type ContentClassV3, type CustomModelFf3pInfo, type CustomModelsFf3pInfo, type ErrorBody, type ErrorResponse, type ExpandImageRequestV3, type ExpandImageResponseV3, type ExpandImagesV3AsyncData, type ExpandImagesV3AsyncError, type ExpandImagesV3AsyncErrors, type ExpandImagesV3AsyncResponse, type ExpandImagesV3AsyncResponses, type FillImageRequestV3, type FillImageResponseV3, type FillImagesV3AsyncData, type FillImagesV3AsyncError, type FillImagesV3AsyncErrors, type FillImagesV3AsyncResponse, type FillImagesV3AsyncResponses, type GenerateImagesRequestV3, type GenerateImagesResponseV3, type GenerateImagesV3AsyncData, type GenerateImagesV3AsyncError, type GenerateImagesV3AsyncErrors, type GenerateImagesV3AsyncResponse, type GenerateImagesV3AsyncResponses, type GenerateObjectCompositeRequestV3, type GenerateObjectCompositeResponseV3, type GenerateObjectCompositeV3AsyncData, type GenerateObjectCompositeV3AsyncError, type GenerateObjectCompositeV3AsyncErrors, type GenerateObjectCompositeV3AsyncResponse, type GenerateObjectCompositeV3AsyncResponses, type GenerateSimilarImagesRequestV3, type GenerateSimilarImagesResponseV3, type GenerateSimilarImagesV3AsyncData, type GenerateSimilarImagesV3AsyncError, type GenerateSimilarImagesV3AsyncErrors, type GenerateSimilarImagesV3AsyncResponse, type GenerateSimilarImagesV3AsyncResponses, type GenerateVideoRequestV3, type GenerateVideoV3Data, type GenerateVideoV3Error, type GenerateVideoV3Errors, type GenerateVideoV3Response, type GenerateVideoV3Responses, type GetCustomModelsData, type GetCustomModelsError, type GetCustomModelsErrors, type GetCustomModelsResponse, type GetCustomModelsResponses, type HttpValidationError, type ImageConditionV3, type ImageRef, type ImageSource, type InputImageV3, type InputImageVideoV3, type InputMaskV3, type JobOutput, type JobPollPayload, type JobResponse, type JobResult, type JobResultV3Data, type JobResultV3Error, type JobResultV3Errors, type JobResultV3Response, type JobResultV3Responses, type JobSucceededPayload, type Link, type Links, type ObjectInput, type Options, type OutputImageV3, type OutputSpec, type PageSpec, type Placement, type PlacementAlignment, type PlacementInset, type PlacementStart, type PreciseCompositeData, type PreciseCompositeError, type PreciseCompositeErrors, type PreciseCompositeRequest, type PreciseCompositeResponse, type PreciseCompositeResponses, type PublicBinaryInputV3, type PublicBinaryOutput, type PublicBinaryOutputV3, type ShotAngle, type ShotSize, type Size, type StorageImage, type StorageImageResponse, type StorageImageV2Data, type StorageImageV2Error, type StorageImageV2Errors, type StorageImageV2Response, type StorageImageV2Responses, type StructureImageReferenceV3, type StructureReferenceV3, type StylesImageReferenceV3, type StylesV3, type ValidationError, type ValidationErrorDetail, type ValidationErrorMessage, type ValidationErrorResponse, type VideoOutput, type VideoPromptStyle, type VideoResult, type VideoSettingsV3, adaptiveComposite, cancelJobV4, expandImagesV3Async, fillImagesV3Async, generateImagesV3Async, generateObjectCompositeV3Async, generateSimilarImagesV3Async, generateVideoV3, getCustomModels, jobResultV3, preciseComposite, storageImageV2 };
2781
+ //#region packages/firefly/src/flat/client.gen.d.ts
2782
+ declare const client: Client;
2783
+ //#endregion
2784
+ export { type AdaptiveCompositeData, type AdaptiveCompositeError, type AdaptiveCompositeErrors, type AdaptiveCompositeRequest, type AdaptiveCompositeResponse, type AdaptiveCompositeResponses, type AdaptiveObjectInput, type AlignmentHorizontal, type AlignmentVertical, type ApiError, type ApiErrorGeneric, type AspectRatio, type AsyncAcceptResponseV3, type AsyncApiErrorV3, type AsyncJobResponse, type AsyncResponseV3, type AsyncResult, type AsyncTaskLink, type AsyncTaskLinkType, type AsyncTaskResponse, type AsyncTaskResponseV3, type BackgroundInput, type BaseInputImageV3, type BaseInputMaskV3, type BaseModel, type BodyExpandImagesV3Async, type BodyFillImagesV3Async, type BodyGenerateImagesV3Async, type BodyGenerateObjectCompositeV3Async, type BodyGenerateSimilarImagesV3Async, type CameraMotion, type CancelJobV4Data, type CancelJobV4Error, type CancelJobV4Errors, type CancelJobV4Responses, type ClientOptions, type ClinetoSize, type ColligoAsyncCancelErrorCodeV3, type ColligoErrorCodeAsyncV3, type ColliogAsyncStatusErrorCodeV3, type ContentClassV3, type ContentPolicyErrorCode451, type ContentPolicyErrorResponse, type CreativeUpsamplerRequestV3, type CreativeUpsamplerResponse, type CreativeUpsamplerV3AsyncData, type CreativeUpsamplerV3AsyncError, type CreativeUpsamplerV3AsyncErrors, type CreativeUpsamplerV3AsyncResponse, type CreativeUpsamplerV3AsyncResponses, type CreativeUpscaleAcceptResponseV3, type CreativeUpscaleTaskLink, type CustomModelFf3pInfo, type CustomModelsFf3pInfo, type ErrorBody, type ErrorResponse, type ExpandImageRequestV3, type ExpandImageResponseV3, type ExpandImagesV3AsyncData, type ExpandImagesV3AsyncError, type ExpandImagesV3AsyncErrors, type ExpandImagesV3AsyncResponse, type ExpandImagesV3AsyncResponses, type FillImageRequestV3, type FillImageResponseV3, type FillImagesV3AsyncData, type FillImagesV3AsyncError, type FillImagesV3AsyncErrors, type FillImagesV3AsyncResponse, type FillImagesV3AsyncResponses, type FireflyImageV5GenerateAsyncV4Data, type FireflyImageV5GenerateAsyncV4Error, type FireflyImageV5GenerateAsyncV4Errors, type FireflyImageV5GenerateAsyncV4Response, type FireflyImageV5GenerateAsyncV4Responses, type FireflyModelId, type GenerateImagesRequestV3, type GenerateImagesResponseV3, type GenerateImagesV3AsyncData, type GenerateImagesV3AsyncError, type GenerateImagesV3AsyncErrors, type GenerateImagesV3AsyncResponse, type GenerateImagesV3AsyncResponses, type GenerateObjectCompositeRequestV3, type GenerateObjectCompositeResponseV3, type GenerateObjectCompositeV3AsyncData, type GenerateObjectCompositeV3AsyncError, type GenerateObjectCompositeV3AsyncErrors, type GenerateObjectCompositeV3AsyncResponse, type GenerateObjectCompositeV3AsyncResponses, type GenerateSimilarImagesRequestV3, type GenerateSimilarImagesResponseV3, type GenerateSimilarImagesV3AsyncData, type GenerateSimilarImagesV3AsyncError, type GenerateSimilarImagesV3AsyncErrors, type GenerateSimilarImagesV3AsyncResponse, type GenerateSimilarImagesV3AsyncResponses, type GenerateVideoRequestV3, type GenerateVideoV3Data, type GenerateVideoV3Error, type GenerateVideoV3Errors, type GenerateVideoV3Response, type GenerateVideoV3Responses, type GetCustomModelsData, type GetCustomModelsError, type GetCustomModelsErrors, type GetCustomModelsResponse, type GetCustomModelsResponses, type HttpValidationError, type ImageConditionV3, type ImageGenerateRequestV3, type ImageRef, type ImageSource, type InputImageV3, type InputImageVideoV3, type InputMaskV3, type JobOutput, type JobPollPayload, type JobResponse, type JobResult, type JobResultV3Data, type JobResultV3Error, type JobResultV3Errors, type JobResultV3Response, type JobResultV3Responses, type JobSucceededPayload, type Link, type Links, type ModelSpecificPayloadV3, type ObjectInput, type Options, type OutputImageV3, type OutputSpec, type PageSpec, type Placement, type PlacementAlignment, type PlacementInset, type PlacementStart, type PreciseCompositeData, type PreciseCompositeError, type PreciseCompositeErrors, type PreciseCompositeRequest, type PreciseCompositeResponse, type PreciseCompositeResponses, type PublicBinaryInputV3, type PublicBinaryOutput, type PublicBinaryOutputV3, type ReferenceBlobSourceV3, type ReferenceBlobUsageV3, type ReferenceBlobV3, type ShotAngle, type ShotSize, type Size, type StorageImage, type StorageImageResponse, type StorageImageV2Data, type StorageImageV2Error, type StorageImageV2Errors, type StorageImageV2Response, type StorageImageV2Responses, type StructureImageReferenceV3, type StructureReferenceV3, type StylesImageReferenceV3, type StylesV3, type UpsampleFactor, type UpscaleBinaryOutput, type ValidationError, type ValidationErrorCode422, type ValidationErrorDetail, type ValidationErrorMessage, type ValidationErrorResponse, type VideoOutput, type VideoPromptStyle, type VideoResult, type VideoSettingsV3, adaptiveComposite, cancelJobV4, client, createClient, createConfig, creativeUpsamplerV3Async, expandImagesV3Async, fillImagesV3Async, fireflyImageV5GenerateAsyncV4, generateImagesV3Async, generateObjectCompositeV3Async, generateSimilarImagesV3Async, generateVideoV3, getCustomModels, jobResultV3, mergeHeaders, preciseComposite, storageImageV2 };
2362
2785
  //# sourceMappingURL=flat.d.cts.map