@umbraco-ai/core 1.14.0 → 17.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/package.json
CHANGED
|
@@ -483,7 +483,6 @@ export declare type PropertyValueOperationRequestModel = {
|
|
|
483
483
|
operation: AiPropertyOperationModel;
|
|
484
484
|
args?: JsonNode | null;
|
|
485
485
|
rootValue?: JsonNode | null;
|
|
486
|
-
rootEditorSchemaAlias: string;
|
|
487
486
|
documentMetadata: AiDocumentMetadataModel;
|
|
488
487
|
};
|
|
489
488
|
|
|
@@ -492,7 +491,6 @@ export declare type PropertyValueOperationRequestModelWritable = {
|
|
|
492
491
|
operation: AiPropertyOperationModel;
|
|
493
492
|
args?: JsonNodeWritable | null;
|
|
494
493
|
rootValue?: JsonNodeWritable | null;
|
|
495
|
-
rootEditorSchemaAlias: string;
|
|
496
494
|
documentMetadata: AiDocumentMetadataModelWritable;
|
|
497
495
|
};
|
|
498
496
|
|
|
@@ -571,7 +569,6 @@ declare type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, o
|
|
|
571
569
|
export declare function resolveAndPrepareValue(value: unknown, editorAlias: string | undefined, currentValue: unknown): Promise<unknown>;
|
|
572
570
|
|
|
573
571
|
declare interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
574
|
-
headers: Headers;
|
|
575
572
|
serializedBody?: string;
|
|
576
573
|
}
|
|
577
574
|
|
|
@@ -1392,6 +1389,85 @@ export declare interface UaiFrontendToolRepositoryApi extends UmbApi {
|
|
|
1392
1389
|
getTools(): Promise<UaiFrontendToolData[]>;
|
|
1393
1390
|
}
|
|
1394
1391
|
|
|
1392
|
+
/**
|
|
1393
|
+
* A single generated image, returned as base64 data and/or a URL.
|
|
1394
|
+
* @public
|
|
1395
|
+
*/
|
|
1396
|
+
export declare interface UaiGeneratedImage {
|
|
1397
|
+
/** Base64-encoded image data, when the provider returned inline data. */
|
|
1398
|
+
data?: string;
|
|
1399
|
+
/** Image URL, when the provider returned a hosted/URI image. */
|
|
1400
|
+
url?: string;
|
|
1401
|
+
/** Media type of the image (e.g. "image/png"). */
|
|
1402
|
+
mediaType?: string;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* Public API for generating images from a text prompt.
|
|
1407
|
+
*
|
|
1408
|
+
* Image generation is experimental and only available when the
|
|
1409
|
+
* `Umbraco:AI:Experimental:ImageGeneration` feature flag is enabled server-side;
|
|
1410
|
+
* otherwise the server returns 404.
|
|
1411
|
+
* @public
|
|
1412
|
+
*/
|
|
1413
|
+
export declare class UaiImageGenerationController extends UmbControllerBase {
|
|
1414
|
+
#private;
|
|
1415
|
+
constructor(host: UmbControllerHost);
|
|
1416
|
+
/**
|
|
1417
|
+
* Generates one or more images from a text prompt.
|
|
1418
|
+
* @param prompt - The text prompt describing the desired image(s).
|
|
1419
|
+
* @param options - Optional configuration (profile ID/alias, count, size, original images, abort signal).
|
|
1420
|
+
* @returns The generation result or error.
|
|
1421
|
+
*/
|
|
1422
|
+
generate(prompt: string, options?: UaiImageGenerationOptions): Promise<{
|
|
1423
|
+
data?: UaiImageGenerationResult;
|
|
1424
|
+
error?: unknown;
|
|
1425
|
+
}>;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* Options for image generation (public API).
|
|
1430
|
+
* @public
|
|
1431
|
+
*/
|
|
1432
|
+
export declare interface UaiImageGenerationOptions {
|
|
1433
|
+
/** Profile ID (GUID) or alias. If omitted, uses the default image-generation profile. */
|
|
1434
|
+
profileIdOrAlias?: string;
|
|
1435
|
+
/** Number of images to generate. */
|
|
1436
|
+
count?: number;
|
|
1437
|
+
/** Image size as "{width}x{height}" (e.g. "1024x1024"). */
|
|
1438
|
+
size?: string;
|
|
1439
|
+
/** Response format: "url", "data", or "hosted". */
|
|
1440
|
+
responseFormat?: string;
|
|
1441
|
+
/** Original images to edit (maskless edit). */
|
|
1442
|
+
originalImages?: UaiImageInput[];
|
|
1443
|
+
/** AbortSignal for cancellation. */
|
|
1444
|
+
signal?: AbortSignal;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
/* Excluded from this release type: UaiImageGenerationRequest */
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
* Result of an image-generation request.
|
|
1451
|
+
* @public
|
|
1452
|
+
*/
|
|
1453
|
+
export declare interface UaiImageGenerationResult {
|
|
1454
|
+
images: UaiGeneratedImage[];
|
|
1455
|
+
usage?: {
|
|
1456
|
+
inputTokens?: number;
|
|
1457
|
+
outputTokens?: number;
|
|
1458
|
+
totalTokens?: number;
|
|
1459
|
+
};
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* A base64-encoded input image for maskless editing.
|
|
1464
|
+
* @public
|
|
1465
|
+
*/
|
|
1466
|
+
export declare interface UaiImageInput {
|
|
1467
|
+
data: string;
|
|
1468
|
+
mediaType: string;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1395
1471
|
/**
|
|
1396
1472
|
* A card with background/border chrome wrapping a labeled field.
|
|
1397
1473
|
*/
|