@contrail/entity-types 1.6.2-alpha-trace-log-level-1 → 1.6.3

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.
@@ -0,0 +1,91 @@
1
+ import { OrgManagedEntity } from './org-managed-entity';
2
+ export declare enum AIOperationType {
3
+ GENERATE_IMAGES = "GENERATE_IMAGES"
4
+ }
5
+ export declare enum AIOperationStatus {
6
+ PENDING = "PENDING",
7
+ PROCESSING = "PROCESSING",
8
+ COMPLETED = "COMPLETED",
9
+ FAILED = "FAILED"
10
+ }
11
+ export declare enum AIOperationErrorCode {
12
+ TIMEOUT = "TIMEOUT",
13
+ QUEUE_ENQUEUE_FAILED = "QUEUE_ENQUEUE_FAILED",
14
+ PROVIDER_ERROR = "PROVIDER_ERROR",
15
+ INTERNAL_ERROR = "INTERNAL_ERROR",
16
+ UNKNOWN_ERROR = "UNKNOWN_ERROR"
17
+ }
18
+ export declare enum AIModel {
19
+ GEMINI_3_1_FLASH_IMAGE = "gemini-3.1-flash-image",
20
+ GEMINI_3_PRO_IMAGE = "gemini-3-pro-image"
21
+ }
22
+ export declare enum AIOperationReferenceType {
23
+ SUBJECT_IMAGE = "SUBJECT_IMAGE",
24
+ REFERENCE_IMAGE = "REFERENCE_IMAGE",
25
+ COLOR = "COLOR"
26
+ }
27
+ export interface AIOperationImageReference {
28
+ referenceType: AIOperationReferenceType.SUBJECT_IMAGE | AIOperationReferenceType.REFERENCE_IMAGE;
29
+ entityReference: string;
30
+ }
31
+ export interface AIOperationColorReference {
32
+ referenceType: AIOperationReferenceType.COLOR;
33
+ entityReference?: string;
34
+ hexCode?: string;
35
+ }
36
+ export type AIOperationReference = AIOperationImageReference | AIOperationColorReference;
37
+ export interface AIOperationInputs {
38
+ promptText: string;
39
+ references: AIOperationReference[];
40
+ }
41
+ export interface AIOperationError {
42
+ code: AIOperationErrorCode;
43
+ message: string;
44
+ status?: string;
45
+ httpStatus?: number;
46
+ details?: unknown;
47
+ }
48
+ export interface AIOperationCommit {
49
+ createdEntityReferences?: string[];
50
+ }
51
+ export interface AIOperation extends OrgManagedEntity {
52
+ threadId: string;
53
+ operationType: AIOperationType;
54
+ model: AIModel;
55
+ status: AIOperationStatus;
56
+ inputs: AIOperationInputs;
57
+ outputs?: unknown;
58
+ commit?: AIOperationCommit;
59
+ error?: AIOperationError;
60
+ }
61
+ export declare const AI_IMAGE_ASPECT_RATIOS: readonly ["1:1", "3:4", "4:3", "9:16", "16:9"];
62
+ export type AIImageAspectRatio = (typeof AI_IMAGE_ASPECT_RATIOS)[number];
63
+ export declare const MAX_AI_IMAGE_VARIATIONS = 4;
64
+ export declare enum AIImageStyle {
65
+ SKETCH = "SKETCH",
66
+ REALISTIC = "REALISTIC"
67
+ }
68
+ export declare enum AIImageGenerationIntent {
69
+ GENERATE = "GENERATE",
70
+ EDIT = "EDIT",
71
+ RECOLOR = "RECOLOR"
72
+ }
73
+ export interface AIImageGenerationParameters {
74
+ intent?: AIImageGenerationIntent;
75
+ aspectRatio?: AIImageAspectRatio;
76
+ numberOfVariations?: number;
77
+ imageStyle?: AIImageStyle;
78
+ }
79
+ export interface AIImageGenerationInputs extends AIOperationInputs {
80
+ promptText: string;
81
+ references: AIOperationReference[];
82
+ parameters: AIImageGenerationParameters;
83
+ }
84
+ export interface AIImageGenerationOutput {
85
+ fileIds: string[];
86
+ }
87
+ export interface AIImageGenerationOperation extends AIOperation {
88
+ operationType: AIOperationType.GENERATE_IMAGES;
89
+ inputs: AIImageGenerationInputs;
90
+ outputs?: AIImageGenerationOutput;
91
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AIImageGenerationIntent = exports.AIImageStyle = exports.MAX_AI_IMAGE_VARIATIONS = exports.AI_IMAGE_ASPECT_RATIOS = exports.AIOperationReferenceType = exports.AIModel = exports.AIOperationErrorCode = exports.AIOperationStatus = exports.AIOperationType = void 0;
4
+ var AIOperationType;
5
+ (function (AIOperationType) {
6
+ AIOperationType["GENERATE_IMAGES"] = "GENERATE_IMAGES";
7
+ })(AIOperationType = exports.AIOperationType || (exports.AIOperationType = {}));
8
+ var AIOperationStatus;
9
+ (function (AIOperationStatus) {
10
+ AIOperationStatus["PENDING"] = "PENDING";
11
+ AIOperationStatus["PROCESSING"] = "PROCESSING";
12
+ AIOperationStatus["COMPLETED"] = "COMPLETED";
13
+ AIOperationStatus["FAILED"] = "FAILED";
14
+ })(AIOperationStatus = exports.AIOperationStatus || (exports.AIOperationStatus = {}));
15
+ var AIOperationErrorCode;
16
+ (function (AIOperationErrorCode) {
17
+ AIOperationErrorCode["TIMEOUT"] = "TIMEOUT";
18
+ AIOperationErrorCode["QUEUE_ENQUEUE_FAILED"] = "QUEUE_ENQUEUE_FAILED";
19
+ AIOperationErrorCode["PROVIDER_ERROR"] = "PROVIDER_ERROR";
20
+ AIOperationErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
21
+ AIOperationErrorCode["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
22
+ })(AIOperationErrorCode = exports.AIOperationErrorCode || (exports.AIOperationErrorCode = {}));
23
+ var AIModel;
24
+ (function (AIModel) {
25
+ AIModel["GEMINI_3_1_FLASH_IMAGE"] = "gemini-3.1-flash-image";
26
+ AIModel["GEMINI_3_PRO_IMAGE"] = "gemini-3-pro-image";
27
+ })(AIModel = exports.AIModel || (exports.AIModel = {}));
28
+ var AIOperationReferenceType;
29
+ (function (AIOperationReferenceType) {
30
+ AIOperationReferenceType["SUBJECT_IMAGE"] = "SUBJECT_IMAGE";
31
+ AIOperationReferenceType["REFERENCE_IMAGE"] = "REFERENCE_IMAGE";
32
+ AIOperationReferenceType["COLOR"] = "COLOR";
33
+ })(AIOperationReferenceType = exports.AIOperationReferenceType || (exports.AIOperationReferenceType = {}));
34
+ exports.AI_IMAGE_ASPECT_RATIOS = ['1:1', '3:4', '4:3', '9:16', '16:9'];
35
+ exports.MAX_AI_IMAGE_VARIATIONS = 4;
36
+ var AIImageStyle;
37
+ (function (AIImageStyle) {
38
+ AIImageStyle["SKETCH"] = "SKETCH";
39
+ AIImageStyle["REALISTIC"] = "REALISTIC";
40
+ })(AIImageStyle = exports.AIImageStyle || (exports.AIImageStyle = {}));
41
+ var AIImageGenerationIntent;
42
+ (function (AIImageGenerationIntent) {
43
+ AIImageGenerationIntent["GENERATE"] = "GENERATE";
44
+ AIImageGenerationIntent["EDIT"] = "EDIT";
45
+ AIImageGenerationIntent["RECOLOR"] = "RECOLOR";
46
+ })(AIImageGenerationIntent = exports.AIImageGenerationIntent || (exports.AIImageGenerationIntent = {}));
package/lib/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './action-definition-config';
2
+ export * from './ai-operation';
2
3
  export * from './app';
3
4
  export * from './app-access-grant';
4
5
  export * from './app-api-key';
package/lib/index.js CHANGED
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./action-definition-config"), exports);
18
+ __exportStar(require("./ai-operation"), exports);
18
19
  __exportStar(require("./app"), exports);
19
20
  __exportStar(require("./app-access-grant"), exports);
20
21
  __exportStar(require("./app-api-key"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/entity-types",
3
- "version": "1.6.2-alpha-trace-log-level-1",
3
+ "version": "1.6.3",
4
4
  "description": "A types library for Vibeiq entities.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",