@vertesia/common 0.78.0-dev-28b447d → 0.78.0-dev.1

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.
Files changed (270) hide show
  1. package/LICENSE +13 -0
  2. package/lib/cjs/Progress.js +61 -0
  3. package/lib/cjs/Progress.js.map +1 -0
  4. package/lib/cjs/access-control.js +55 -0
  5. package/lib/cjs/access-control.js.map +1 -0
  6. package/lib/cjs/analytics.js +3 -0
  7. package/lib/cjs/analytics.js.map +1 -0
  8. package/lib/cjs/apikey.js +16 -0
  9. package/lib/cjs/apikey.js.map +1 -0
  10. package/lib/cjs/apps.js +3 -0
  11. package/lib/cjs/apps.js.map +1 -0
  12. package/lib/cjs/common.js +3 -0
  13. package/lib/cjs/common.js.map +1 -0
  14. package/lib/cjs/environment.js +44 -0
  15. package/lib/cjs/environment.js.map +1 -0
  16. package/lib/cjs/facets.js +3 -0
  17. package/lib/cjs/facets.js.map +1 -0
  18. package/lib/cjs/group.js +5 -0
  19. package/lib/cjs/group.js.map +1 -0
  20. package/lib/cjs/index.js +47 -0
  21. package/lib/cjs/index.js.map +1 -0
  22. package/lib/cjs/integrations.js +12 -0
  23. package/lib/cjs/integrations.js.map +1 -0
  24. package/lib/cjs/interaction.js +64 -0
  25. package/lib/cjs/interaction.js.map +1 -0
  26. package/lib/cjs/json-schema.js +3 -0
  27. package/lib/cjs/json-schema.js.map +1 -0
  28. package/lib/cjs/json.js +3 -0
  29. package/lib/cjs/json.js.map +1 -0
  30. package/lib/cjs/meters.js +13 -0
  31. package/lib/cjs/meters.js.map +1 -0
  32. package/lib/cjs/model_utility.js +6 -0
  33. package/lib/cjs/model_utility.js.map +1 -0
  34. package/lib/cjs/package.json +3 -0
  35. package/lib/cjs/payload.js +3 -0
  36. package/lib/cjs/payload.js.map +1 -0
  37. package/lib/cjs/project.js +61 -0
  38. package/lib/cjs/project.js.map +1 -0
  39. package/lib/cjs/prompt.js +20 -0
  40. package/lib/cjs/prompt.js.map +1 -0
  41. package/lib/cjs/query.js +3 -0
  42. package/lib/cjs/query.js.map +1 -0
  43. package/lib/cjs/rate-limiter.js +6 -0
  44. package/lib/cjs/rate-limiter.js.map +1 -0
  45. package/lib/cjs/refs.js +14 -0
  46. package/lib/cjs/refs.js.map +1 -0
  47. package/lib/cjs/runs.js +3 -0
  48. package/lib/cjs/runs.js.map +1 -0
  49. package/lib/cjs/store/activity-catalog.js +3 -0
  50. package/lib/cjs/store/activity-catalog.js.map +1 -0
  51. package/lib/cjs/store/agent.js +3 -0
  52. package/lib/cjs/store/agent.js.map +1 -0
  53. package/lib/cjs/store/collections.js +9 -0
  54. package/lib/cjs/store/collections.js.map +1 -0
  55. package/lib/cjs/store/common.js +3 -0
  56. package/lib/cjs/store/common.js.map +1 -0
  57. package/lib/cjs/store/doc-analyzer.js +3 -0
  58. package/lib/cjs/store/doc-analyzer.js.map +1 -0
  59. package/lib/cjs/store/dsl-workflow.js +5 -0
  60. package/lib/cjs/store/dsl-workflow.js.map +1 -0
  61. package/lib/cjs/store/index.js +28 -0
  62. package/lib/cjs/store/index.js.map +1 -0
  63. package/lib/cjs/store/object-types.js +98 -0
  64. package/lib/cjs/store/object-types.js.map +1 -0
  65. package/lib/cjs/store/signals.js +3 -0
  66. package/lib/cjs/store/signals.js.map +1 -0
  67. package/lib/cjs/store/store.js +41 -0
  68. package/lib/cjs/store/store.js.map +1 -0
  69. package/lib/cjs/store/temporalio.js +44 -0
  70. package/lib/cjs/store/temporalio.js.map +1 -0
  71. package/lib/cjs/store/workflow.js +49 -0
  72. package/lib/cjs/store/workflow.js.map +1 -0
  73. package/lib/cjs/sts-token-types.js +32 -0
  74. package/lib/cjs/sts-token-types.js.map +1 -0
  75. package/lib/cjs/tenant.js +3 -0
  76. package/lib/cjs/tenant.js.map +1 -0
  77. package/lib/cjs/training.js +14 -0
  78. package/lib/cjs/training.js.map +1 -0
  79. package/lib/cjs/transient-tokens.js +9 -0
  80. package/lib/cjs/transient-tokens.js.map +1 -0
  81. package/lib/cjs/user.js +17 -0
  82. package/lib/cjs/user.js.map +1 -0
  83. package/lib/cjs/utils/auth.js +15 -0
  84. package/lib/cjs/utils/auth.js.map +1 -0
  85. package/lib/cjs/utils/schemas.js +66 -0
  86. package/lib/cjs/utils/schemas.js.map +1 -0
  87. package/lib/cjs/utils/type-helpers.js +3 -0
  88. package/lib/cjs/utils/type-helpers.js.map +1 -0
  89. package/lib/cjs/versions.js +8 -0
  90. package/lib/cjs/versions.js.map +1 -0
  91. package/lib/esm/Progress.js +57 -0
  92. package/lib/esm/Progress.js.map +1 -0
  93. package/lib/esm/access-control.js +52 -0
  94. package/lib/esm/access-control.js.map +1 -0
  95. package/lib/esm/analytics.js +2 -0
  96. package/lib/esm/analytics.js.map +1 -0
  97. package/lib/esm/apikey.js +13 -0
  98. package/lib/esm/apikey.js.map +1 -0
  99. package/lib/esm/apps.js +2 -0
  100. package/lib/esm/apps.js.map +1 -0
  101. package/lib/esm/common.js +2 -0
  102. package/lib/esm/common.js.map +1 -0
  103. package/lib/esm/environment.js +41 -0
  104. package/lib/esm/environment.js.map +1 -0
  105. package/lib/esm/facets.js +2 -0
  106. package/lib/esm/facets.js.map +1 -0
  107. package/lib/esm/group.js +2 -0
  108. package/lib/esm/group.js.map +1 -0
  109. package/lib/esm/index.js +31 -0
  110. package/lib/esm/index.js.map +1 -0
  111. package/lib/esm/integrations.js +9 -0
  112. package/lib/esm/integrations.js.map +1 -0
  113. package/lib/esm/interaction.js +61 -0
  114. package/lib/esm/interaction.js.map +1 -0
  115. package/lib/esm/json-schema.js +2 -0
  116. package/lib/esm/json-schema.js.map +1 -0
  117. package/lib/esm/json.js +2 -0
  118. package/lib/esm/json.js.map +1 -0
  119. package/lib/esm/meters.js +10 -0
  120. package/lib/esm/meters.js.map +1 -0
  121. package/lib/esm/model_utility.js +2 -0
  122. package/lib/esm/model_utility.js.map +1 -0
  123. package/lib/esm/payload.js +2 -0
  124. package/lib/esm/payload.js.map +1 -0
  125. package/lib/esm/project.js +57 -0
  126. package/lib/esm/project.js.map +1 -0
  127. package/lib/esm/prompt.js +17 -0
  128. package/lib/esm/prompt.js.map +1 -0
  129. package/lib/esm/query.js +2 -0
  130. package/lib/esm/query.js.map +1 -0
  131. package/lib/esm/rate-limiter.js +5 -0
  132. package/lib/esm/rate-limiter.js.map +1 -0
  133. package/lib/esm/refs.js +11 -0
  134. package/lib/esm/refs.js.map +1 -0
  135. package/lib/esm/runs.js +2 -0
  136. package/lib/esm/runs.js.map +1 -0
  137. package/lib/esm/store/activity-catalog.js +2 -0
  138. package/lib/esm/store/activity-catalog.js.map +1 -0
  139. package/lib/esm/store/agent.js +2 -0
  140. package/lib/esm/store/agent.js.map +1 -0
  141. package/lib/esm/store/collections.js +6 -0
  142. package/lib/esm/store/collections.js.map +1 -0
  143. package/lib/esm/store/common.js +2 -0
  144. package/lib/esm/store/common.js.map +1 -0
  145. package/lib/esm/store/doc-analyzer.js +2 -0
  146. package/lib/esm/store/doc-analyzer.js.map +1 -0
  147. package/lib/esm/store/dsl-workflow.js +2 -0
  148. package/lib/esm/store/dsl-workflow.js.map +1 -0
  149. package/lib/esm/store/index.js +12 -0
  150. package/lib/esm/store/index.js.map +1 -0
  151. package/lib/esm/store/object-types.js +95 -0
  152. package/lib/esm/store/object-types.js.map +1 -0
  153. package/lib/esm/store/signals.js +2 -0
  154. package/lib/esm/store/signals.js.map +1 -0
  155. package/lib/esm/store/store.js +38 -0
  156. package/lib/esm/store/store.js.map +1 -0
  157. package/lib/esm/store/temporalio.js +41 -0
  158. package/lib/esm/store/temporalio.js.map +1 -0
  159. package/lib/esm/store/workflow.js +45 -0
  160. package/lib/esm/store/workflow.js.map +1 -0
  161. package/lib/esm/sts-token-types.js +24 -0
  162. package/lib/esm/sts-token-types.js.map +1 -0
  163. package/lib/esm/tenant.js +2 -0
  164. package/lib/esm/tenant.js.map +1 -0
  165. package/lib/esm/training.js +11 -0
  166. package/lib/esm/training.js.map +1 -0
  167. package/lib/esm/transient-tokens.js +6 -0
  168. package/lib/esm/transient-tokens.js.map +1 -0
  169. package/lib/esm/user.js +14 -0
  170. package/lib/esm/user.js.map +1 -0
  171. package/lib/esm/utils/auth.js +11 -0
  172. package/lib/esm/utils/auth.js.map +1 -0
  173. package/lib/esm/utils/schemas.js +61 -0
  174. package/lib/esm/utils/schemas.js.map +1 -0
  175. package/lib/esm/utils/type-helpers.js +2 -0
  176. package/lib/esm/utils/type-helpers.js.map +1 -0
  177. package/lib/esm/versions.js +5 -0
  178. package/lib/esm/versions.js.map +1 -0
  179. package/lib/tsconfig.tsbuildinfo +1 -0
  180. package/lib/types/Progress.d.ts +21 -0
  181. package/lib/types/Progress.d.ts.map +1 -0
  182. package/lib/types/access-control.d.ts +72 -0
  183. package/lib/types/access-control.d.ts.map +1 -0
  184. package/lib/types/analytics.d.ts +36 -0
  185. package/lib/types/analytics.d.ts.map +1 -0
  186. package/lib/types/apikey.d.ts +80 -0
  187. package/lib/types/apikey.d.ts.map +1 -0
  188. package/lib/types/apps.d.ts +123 -0
  189. package/lib/types/apps.d.ts.map +1 -0
  190. package/lib/types/common.d.ts +31 -0
  191. package/lib/types/common.d.ts.map +1 -0
  192. package/lib/types/environment.d.ts +84 -0
  193. package/lib/types/environment.d.ts.map +1 -0
  194. package/lib/types/facets.d.ts +34 -0
  195. package/lib/types/facets.d.ts.map +1 -0
  196. package/lib/types/group.d.ts +21 -0
  197. package/lib/types/group.d.ts.map +1 -0
  198. package/lib/types/index.d.ts +31 -0
  199. package/lib/types/index.d.ts.map +1 -0
  200. package/lib/types/integrations.d.ts +28 -0
  201. package/lib/types/integrations.d.ts.map +1 -0
  202. package/lib/types/interaction.d.ts +521 -0
  203. package/lib/types/interaction.d.ts.map +1 -0
  204. package/lib/types/json-schema.d.ts +1 -0
  205. package/lib/types/json-schema.d.ts.map +1 -0
  206. package/lib/types/json.d.ts +1 -0
  207. package/lib/types/json.d.ts.map +1 -0
  208. package/lib/types/meters.d.ts +23 -0
  209. package/lib/types/meters.d.ts.map +1 -0
  210. package/lib/types/model_utility.d.ts +1 -0
  211. package/lib/types/model_utility.d.ts.map +1 -0
  212. package/lib/types/payload.d.ts +60 -0
  213. package/lib/types/payload.d.ts.map +1 -0
  214. package/lib/types/project.d.ts +114 -0
  215. package/lib/types/project.d.ts.map +1 -0
  216. package/lib/types/prompt.d.ts +77 -0
  217. package/lib/types/prompt.d.ts.map +1 -0
  218. package/lib/types/query.d.ts +116 -0
  219. package/lib/types/query.d.ts.map +1 -0
  220. package/lib/types/rate-limiter.d.ts +28 -0
  221. package/lib/types/rate-limiter.d.ts.map +1 -0
  222. package/lib/types/refs.d.ts +22 -0
  223. package/lib/types/refs.d.ts.map +1 -0
  224. package/lib/types/runs.d.ts +32 -0
  225. package/lib/types/runs.d.ts.map +1 -0
  226. package/lib/types/store/activity-catalog.d.ts +26 -0
  227. package/lib/types/store/activity-catalog.d.ts.map +1 -0
  228. package/lib/types/store/agent.d.ts +18 -0
  229. package/lib/types/store/agent.d.ts.map +1 -0
  230. package/lib/types/store/collections.d.ts +64 -0
  231. package/lib/types/store/collections.d.ts.map +1 -0
  232. package/lib/types/store/common.d.ts +22 -0
  233. package/lib/types/store/common.d.ts.map +1 -0
  234. package/lib/types/store/doc-analyzer.d.ts +132 -0
  235. package/lib/types/store/doc-analyzer.d.ts.map +1 -0
  236. package/lib/types/store/dsl-workflow.d.ts +238 -0
  237. package/lib/types/store/dsl-workflow.d.ts.map +1 -0
  238. package/lib/types/store/index.d.ts +11 -0
  239. package/lib/types/store/index.d.ts.map +1 -0
  240. package/lib/types/store/object-types.d.ts +23 -0
  241. package/lib/types/store/object-types.d.ts.map +1 -0
  242. package/lib/types/store/signals.d.ts +5 -0
  243. package/lib/types/store/signals.d.ts.map +1 -0
  244. package/lib/types/store/store.d.ts +304 -0
  245. package/lib/types/store/store.d.ts.map +1 -0
  246. package/lib/types/store/temporalio.d.ts +16 -0
  247. package/lib/types/store/temporalio.d.ts.map +1 -0
  248. package/lib/types/store/workflow.d.ts +372 -0
  249. package/lib/types/store/workflow.d.ts.map +1 -0
  250. package/lib/types/sts-token-types.d.ts +69 -0
  251. package/lib/types/sts-token-types.d.ts.map +1 -0
  252. package/lib/types/tenant.d.ts +10 -0
  253. package/lib/types/tenant.d.ts.map +1 -0
  254. package/lib/types/training.d.ts +38 -0
  255. package/lib/types/training.d.ts.map +1 -0
  256. package/lib/types/transient-tokens.d.ts +24 -0
  257. package/lib/types/transient-tokens.d.ts.map +1 -0
  258. package/lib/types/user.d.ts +113 -0
  259. package/lib/types/user.d.ts.map +1 -0
  260. package/lib/types/utils/auth.d.ts +3 -0
  261. package/lib/types/utils/auth.d.ts.map +1 -0
  262. package/lib/types/utils/schemas.d.ts +7 -0
  263. package/lib/types/utils/schemas.d.ts.map +1 -0
  264. package/lib/types/utils/type-helpers.d.ts +3 -0
  265. package/lib/types/utils/type-helpers.d.ts.map +1 -0
  266. package/lib/types/versions.d.ts +4 -0
  267. package/lib/types/versions.d.ts.map +1 -0
  268. package/lib/vertesia-common.js +2 -0
  269. package/lib/vertesia-common.js.map +1 -0
  270. package/package.json +43 -43
@@ -0,0 +1,304 @@
1
+ import { SearchPayload } from "../payload.js";
2
+ import { SupportedEmbeddingTypes } from "../project.js";
3
+ import { ComplexSearchQuery } from "../query.js";
4
+ import { BaseObject } from "./common.js";
5
+ export declare enum ContentObjectApiHeaders {
6
+ COLLECTION_ID = "x-collection-id",
7
+ PROCESSING_PRIORITY = "x-processing-priority",
8
+ CREATE_REVISION = "x-create-revision",
9
+ REVISION_LABEL = "x-revision-label"
10
+ }
11
+ export declare enum ContentObjectStatus {
12
+ created = "created",
13
+ processing = "processing",// the was created and still processing
14
+ completed = "completed",
15
+ failed = "failed",
16
+ archived = "archived"
17
+ }
18
+ export interface Embedding {
19
+ model: string;
20
+ values: number[];
21
+ etag?: string;
22
+ }
23
+ export interface ContentObject<T = any> extends ContentObjectItem<T> {
24
+ text?: string;
25
+ text_etag?: string;
26
+ embeddings: Partial<Record<SupportedEmbeddingTypes, Embedding>>;
27
+ parts?: string[];
28
+ parts_etag?: string;
29
+ transcript?: Transcript;
30
+ security?: Record<string, string[]>;
31
+ }
32
+ export type ContentNature = "video" | "image" | "audio" | "document" | "code" | "other";
33
+ export interface Dimensions {
34
+ width: number;
35
+ height: number;
36
+ }
37
+ export interface Location {
38
+ latitude: number;
39
+ longitude: number;
40
+ }
41
+ export interface GenerationRunMetadata {
42
+ id: string;
43
+ date: string;
44
+ model: string;
45
+ target?: string;
46
+ }
47
+ export interface ContentMetadata {
48
+ type?: ContentNature;
49
+ size?: number;
50
+ languages?: string[];
51
+ location?: Location;
52
+ generation_runs: GenerationRunMetadata[];
53
+ etag?: string;
54
+ }
55
+ export interface TemporalMediaMetadata extends ContentMetadata {
56
+ duration?: number;
57
+ transcript?: Transcript;
58
+ }
59
+ export interface ImageMetadata extends ContentMetadata {
60
+ type: "image";
61
+ dimensions?: Dimensions;
62
+ }
63
+ export interface AudioMetadata extends TemporalMediaMetadata {
64
+ type: "audio";
65
+ }
66
+ export interface VideoMetadata extends TemporalMediaMetadata {
67
+ type: "video";
68
+ dimensions?: Dimensions;
69
+ }
70
+ export interface TextSection {
71
+ description: string;
72
+ first_line_index: number;
73
+ last_line_index: number;
74
+ }
75
+ export interface DocumentMetadata extends ContentMetadata {
76
+ type: "document";
77
+ page_count?: number;
78
+ content_processor?: {
79
+ type?: string;
80
+ features_requested?: string[];
81
+ zones_requested?: string[];
82
+ table_count?: number;
83
+ image_count: number;
84
+ zone_count: number;
85
+ needs_ocr_count?: number;
86
+ };
87
+ sections?: TextSection[];
88
+ }
89
+ export interface Transcript {
90
+ text?: string;
91
+ segments?: TranscriptSegment[];
92
+ etag?: string;
93
+ }
94
+ export interface TranscriptSegment {
95
+ start: number;
96
+ text: string;
97
+ speaker?: number;
98
+ end?: number;
99
+ confidence?: number;
100
+ language?: string;
101
+ }
102
+ export interface ContentSource {
103
+ source?: string;
104
+ type?: string;
105
+ name?: string;
106
+ etag?: string;
107
+ }
108
+ /**
109
+ *
110
+ */
111
+ export interface RevisionInfo {
112
+ /** Direct parent revision id (omit on the first revision) */
113
+ parent?: string;
114
+ /** The root revision id (omit on the first revision) */
115
+ root: string;
116
+ /** True if this revision is the head revision */
117
+ head: boolean;
118
+ /** Human‑friendly tag or state ("v1.2", "approved") */
119
+ label?: string;
120
+ }
121
+ /**
122
+ * The content object item is a simplified version of the ContentObject that is returned by the store API when listing objects.
123
+ */
124
+ export interface ContentObjectItem<T = Record<string, any>> extends BaseObject {
125
+ parent: string;
126
+ /** An optional path based location for the object */
127
+ location: string;
128
+ /**
129
+ * Object status.
130
+ * - created: the object was created and is being processed
131
+ * - processing: the object is being processed
132
+ * - completed: the object was processed and is ready to use
133
+ * - failed: the object processing failed
134
+ * - archived: the object was archived and is no longer available
135
+ */
136
+ status: ContentObjectStatus;
137
+ /**
138
+ * Object type id.
139
+ */
140
+ type?: ContentObjectTypeRef;
141
+ /**
142
+ * Content source information, typically a link to an object store
143
+ */
144
+ content: ContentSource;
145
+ /**
146
+ * External identifier for integration with other systems
147
+ */
148
+ external_id?: string;
149
+ /** The object properties. This is a JSON object that describes the object, matching the object type schema */
150
+ properties: T;
151
+ /** Technical metadata of the object */
152
+ metadata?: VideoMetadata | AudioMetadata | ImageMetadata | DocumentMetadata | ContentMetadata;
153
+ /** Token information */
154
+ tokens?: {
155
+ count: number;
156
+ encoding: string;
157
+ etag: string;
158
+ };
159
+ /**
160
+ * Revision information. This is used to track the history of the object.
161
+ */
162
+ revision: RevisionInfo;
163
+ /**
164
+ * Soft delete flag. When true, the object should be considered deleted
165
+ * but is still retained in the database for historical purposes.
166
+ */
167
+ is_deleted?: boolean;
168
+ /**
169
+ * Soft lock flag. When true, the object should be considered read-only
170
+ * and modification attempts should be rejected.
171
+ */
172
+ is_locked?: boolean;
173
+ /**
174
+ * The document score, used for ranking and sorting.
175
+ */
176
+ score?: number;
177
+ }
178
+ /**
179
+ * When creating from an uploaded file the content should be an URL to the uploaded file
180
+ */
181
+ export interface CreateContentObjectPayload<T = any> extends Partial<Omit<ContentObject<T>, "id" | "root" | "created_at" | "updated_at" | "type" | "owner">> {
182
+ id?: string;
183
+ type?: string;
184
+ generation_run_info?: GenerationRunMetadata;
185
+ }
186
+ export interface ContentObjectTypeRef {
187
+ id: string;
188
+ name: string;
189
+ }
190
+ export interface ComplexSearchPayload extends Omit<SearchPayload, "query"> {
191
+ query?: ComplexSearchQuery;
192
+ }
193
+ export interface ColumnLayout {
194
+ /**
195
+ * The path of the field to use (e.g. "properties.title")
196
+ */
197
+ field: string;
198
+ /**
199
+ * The name to display in the table column
200
+ */
201
+ name: string;
202
+ /**
203
+ * The type of the field specifies how the rendering will be done. If not specified the string type will be used.
204
+ * The type may contain additional parameters prepended using a web-like query string syntax: date?LLL
205
+ */
206
+ type?: string;
207
+ fallback?: string;
208
+ /**
209
+ * A default value to be used if the field is not present in the object
210
+ */
211
+ default?: any;
212
+ }
213
+ export interface ContentObjectType extends ContentObjectTypeItem {
214
+ }
215
+ export interface ContentObjectTypeItem extends BaseObject {
216
+ is_chunkable?: boolean;
217
+ /**
218
+ * This is only included in ContentObjectTypeItem if explicitly requested
219
+ * It is always included in ContentObjectType
220
+ */
221
+ table_layout?: ColumnLayout[];
222
+ /**
223
+ * this is only included in ContentObjectTypeItem if explicitly requested
224
+ * It is always included in ContentObjectType
225
+ */
226
+ object_schema?: Record<string, any>;
227
+ /**
228
+ * Determines if the content will be validated against the object schema a generation time and save/update time.
229
+ */
230
+ strict_mode?: boolean;
231
+ }
232
+ export interface CreateContentObjectTypePayload extends Omit<ContentObjectType, "id" | "created_at" | "updated_at" | "created_by" | "updated_by"> {
233
+ }
234
+ export declare enum WorkflowRuleInputType {
235
+ single = "single",
236
+ multiple = "multiple",
237
+ none = "none"
238
+ }
239
+ export interface WorkflowRuleItem extends BaseObject {
240
+ endpoint: string;
241
+ input_type: WorkflowRuleInputType;
242
+ }
243
+ export interface WorkflowRule extends WorkflowRuleItem {
244
+ match?: Record<string, any>;
245
+ /**
246
+ * Activities configuration if any.
247
+ */
248
+ config?: Record<string, any>;
249
+ /**
250
+ * Debug mode for the rule
251
+ * @default false
252
+ */
253
+ debug?: boolean;
254
+ /**
255
+ * Customer override for the rule
256
+ * When set to true the rule will not be updated by the system
257
+ */
258
+ customer_override?: boolean;
259
+ }
260
+ export interface CreateWorkflowRulePayload extends UploadWorkflowRulePayload {
261
+ name: string;
262
+ endpoint: string;
263
+ }
264
+ export interface UploadWorkflowRulePayload extends Partial<Omit<WorkflowRule, "id" | "created_at" | "updated_at" | "owner">> {
265
+ }
266
+ export declare enum ImageRenditionFormat {
267
+ jpeg = "jpeg",
268
+ png = "png",
269
+ webp = "webp"
270
+ }
271
+ export declare enum MarkdownRenditionFormat {
272
+ docx = "docx",
273
+ pdf = "pdf"
274
+ }
275
+ export interface GetRenditionParams {
276
+ format: ImageRenditionFormat | MarkdownRenditionFormat;
277
+ max_hw?: number;
278
+ generate_if_missing?: boolean;
279
+ sign_url?: boolean;
280
+ }
281
+ export interface GetRenditionResponse {
282
+ status: "found" | "generating" | "failed";
283
+ renditions?: string[];
284
+ workflow_run_id?: string;
285
+ }
286
+ export interface GetUploadUrlPayload {
287
+ name: string;
288
+ id?: string;
289
+ mime_type?: string;
290
+ ttl?: number;
291
+ }
292
+ export interface GetFileUrlPayload {
293
+ file: string;
294
+ }
295
+ export interface GetFileUrlResponse {
296
+ url: string;
297
+ id: string;
298
+ mime_type: string;
299
+ path: string;
300
+ }
301
+ export declare enum ContentObjectProcessingPriority {
302
+ normal = "normal",
303
+ low = "low"
304
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/store/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EA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;IACX,IAAI,SAAS;CAChB;AAED,oBAAY,uBAAuB;IAC/B,IAAI,SAAS;IACb,GAAG,QAAQ;CACd;AAED,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,oBAAoB,GAAG,uBAAuB,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,oBAAY,+BAA+B;IACvC,MAAM,WAAW;IACjB,GAAG,QAAQ;CACd"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copied from temporalio
3
+ * The temporalio ParentClosePolicy
4
+ */
5
+ export type ParentClosePolicyType = "TERMINATE" | "ABANDON" | "REQUEST_CANCEL" | undefined;
6
+ interface ParentClosePolicyI {
7
+ TERMINATE: "TERMINATE";
8
+ ABANDON: "ABANDON";
9
+ REQUEST_CANCEL: "REQUEST_CANCEL";
10
+ PARENT_CLOSE_POLICY_UNSPECIFIED: undefined;
11
+ PARENT_CLOSE_POLICY_TERMINATE: "TERMINATE";
12
+ PARENT_CLOSE_POLICY_ABANDON: "ABANDON";
13
+ PARENT_CLOSE_POLICY_REQUEST_CANCEL: "REQUEST_CANCEL";
14
+ }
15
+ export declare const ParentClosePolicy: ParentClosePolicyI;
16
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"temporalio.d.ts","sourceRoot":"","sources":["../../../src/store/temporalio.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAC3F,UAAU,kBAAkB;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,OAAO,EAAE,SAAS,CAAC;IACnB,cAAc,EAAE,gBAAgB,CAAC;IACjC,+BAA+B,EAAE,SAAS,CAAC;IAC3C,6BAA6B,EAAE,WAAW,CAAC;IAC3C,2BAA2B,EAAE,SAAS,CAAC;IACvC,kCAAkC,EAAE,gBAAgB,CAAA;CACvD;AACD,eAAO,MAAM,iBAAiB,EAuCzB,kBAAkB,CAAC"}
@@ -0,0 +1,372 @@
1
+ import { JSONSchema4 } from "json-schema";
2
+ import { InteractionRef } from "../interaction.js";
3
+ export declare enum ContentEventName {
4
+ create = "create",
5
+ change_type = "change_type",
6
+ update = "update",
7
+ revision_created = "revision_created",
8
+ delete = "delete",
9
+ workflow_finished = "workflow_finished",
10
+ workflow_execution_request = "workflow_execution_request",
11
+ api_request = "api_request"
12
+ }
13
+ export interface Queue {
14
+ name: string;
15
+ queue_suffix?: string;
16
+ queue_full_name?: string;
17
+ }
18
+ export interface WorkflowExecutionBaseParams<T = Record<string, any>> {
19
+ /**
20
+ * The ref of the user who initiated the workflow.
21
+ */
22
+ initiated_by?: string;
23
+ /**
24
+ * The account ID of the user who created the activity.
25
+ * This is useful to select the right database to work on.
26
+ */
27
+ account_id: string;
28
+ /**
29
+ * The project ID of the account who created the activity.
30
+ */
31
+ project_id: string;
32
+ /**
33
+ * The vars field is mainly used to pass the user input to the workflow.
34
+ * The user input ar custom user options that can be used to configure the workflow.
35
+ * You can see the user input as the arguments for a command line app.
36
+ *
37
+ * In the case of workflows started by events (e.g. using a a workflow rule) the user input vars will be initialized with the workflow rule configuration field.
38
+ *
39
+ * In case of dsl workflows the workflow execution payload vars will be applied over the default vars values stored in the DSL vars field.
40
+ */
41
+ vars: T;
42
+ /**
43
+ * Auth Token to access Zeno and Composable from the workers
44
+ */
45
+ auth_token?: string;
46
+ /**
47
+ * The configuration for the workflow execution.
48
+ */
49
+ config?: {
50
+ studio_url: string;
51
+ store_url: string;
52
+ slack_app_url?: string;
53
+ enabled_integrations?: string[];
54
+ };
55
+ /**
56
+ * The list of endpoints to notify when the workflow finishes.
57
+ * It is handled by a sub-workflow execution, so the main workflow will not wait for the notification to be sent.
58
+ */
59
+ notify_endpoints?: string[];
60
+ /** If this is a child workflow, parent contains parent's ids */
61
+ parent?: {
62
+ run_id: string;
63
+ workflow_id: string;
64
+ /**
65
+ * the depth of nested parent workflows
66
+ */
67
+ run_depth?: number;
68
+ };
69
+ /**
70
+ * List of enabled processing queues. Managed by the application.
71
+ */
72
+ _enabled_queues?: Queue[];
73
+ }
74
+ export interface WorkflowExecutionPayload<T = Record<string, any>> extends WorkflowExecutionBaseParams<T> {
75
+ /**
76
+ * The event which started the workflow who created the activity.
77
+ */
78
+ event: ContentEventName;
79
+ wf_rule_name?: string;
80
+ /**
81
+ * The ID of the target objects processed by the workflow.
82
+ */
83
+ objectIds: string[];
84
+ /**
85
+ * Auth Token to access Zeno and Composable from the workers
86
+ */
87
+ auth_token: string;
88
+ }
89
+ export declare function getDocumentIds(payload: WorkflowExecutionPayload): string[];
90
+ export interface ExecuteWorkflowPayload {
91
+ /**
92
+ * The task queue to assign the workflow to. Deprecated, queues are choosend server side
93
+ */
94
+ task_queue?: string;
95
+ /**
96
+ * Docuument IDs pon which the workflow will be executed, deprecated, replaced params in vars
97
+ */
98
+ objectIds?: string[];
99
+ /**
100
+ * Parameters to pass to the workflow
101
+ */
102
+ vars?: Record<string, any>;
103
+ /**
104
+ * Make the workflow ID unique by always adding a random token to the ID.
105
+ */
106
+ unique?: boolean;
107
+ /**
108
+ * A custom ID to use for the workflow execution id instead of the generated one.
109
+ */
110
+ custom_id?: string;
111
+ /**
112
+ * Timeout for the workflow execution to complete, in seconds.
113
+ */
114
+ timeout?: number;
115
+ }
116
+ export interface ListWorkflowRunsPayload {
117
+ /**
118
+ * The document ID passed to a workflow run.
119
+ */
120
+ document_id?: string;
121
+ /**
122
+ * The event name that triggered the workflow.
123
+ */
124
+ event_name?: string;
125
+ /**
126
+ * The workflow rule ID that triggered the workflow.
127
+ */
128
+ rule_id?: string;
129
+ /**
130
+ * The start time for filtering workflow runs.
131
+ */
132
+ start?: string;
133
+ /**
134
+ * The end time for filtering workflow runs.
135
+ */
136
+ end?: string;
137
+ /**
138
+ * The status of the workflow run.
139
+ */
140
+ status?: string;
141
+ /**
142
+ * search term to filter on workflow id and run id
143
+ */
144
+ search_term?: string;
145
+ /**
146
+ * The user or service account that initiated the workflow run.
147
+ */
148
+ initiated_by?: string;
149
+ /**
150
+ * Lucene query string to search for the workflow runs.
151
+ * This is a full text search on the workflow run history.
152
+ */
153
+ query?: string;
154
+ type?: string;
155
+ /**
156
+ * The maximum number of results to return per page.
157
+ */
158
+ page_size?: number;
159
+ /**
160
+ * The page token for Temporal pagination.
161
+ */
162
+ next_page_token?: string;
163
+ }
164
+ interface WorkflowRunEvent {
165
+ event_id: number;
166
+ event_time: number;
167
+ event_type: string;
168
+ task_id?: string;
169
+ attempt: number;
170
+ activity?: {
171
+ name?: string;
172
+ id?: string;
173
+ input?: any;
174
+ scheduledEventId?: string;
175
+ startedEventId?: string;
176
+ };
177
+ childWorkflow?: {
178
+ workflowId?: string;
179
+ workflowType?: string;
180
+ runId?: string;
181
+ scheduledEventId?: string;
182
+ startedEventId?: string;
183
+ input?: any;
184
+ result?: any;
185
+ };
186
+ signal?: {
187
+ direction: "receiving" | "sending";
188
+ signalName?: string;
189
+ input?: any;
190
+ sender?: {
191
+ workflowId?: string;
192
+ runId?: string;
193
+ };
194
+ recipient?: {
195
+ workflowId?: string;
196
+ runId?: string;
197
+ };
198
+ initiatedEventId?: string;
199
+ };
200
+ error?: {
201
+ message?: string;
202
+ source?: string;
203
+ stacktrace?: string;
204
+ type?: string;
205
+ };
206
+ result?: any;
207
+ }
208
+ export interface WorkflowRun {
209
+ status?: WorkflowExecutionStatus | string;
210
+ /**
211
+ * The Temporal Workflow Type of this Workflow Run.
212
+ *
213
+ * @see https://docs.temporal.io/workflows
214
+ */
215
+ type?: string;
216
+ started_at?: number;
217
+ closed_at?: number;
218
+ execution_duration?: number;
219
+ run_id?: string;
220
+ workflow_id?: string;
221
+ initiated_by?: string;
222
+ interaction_name?: string;
223
+ input?: any;
224
+ result?: any;
225
+ error?: any;
226
+ raw?: any;
227
+ /**
228
+ * The Vertesia Workflow Type of this Workflow Run.
229
+ * - For DSL workflows (`type:dslWorkflow`), the vertesia_type refers to the "Workflow Rule Name" specified in the
230
+ * DSL. For example, "Standard Document Intake" or "Standard Image Intake".
231
+ * - For non-DSL workflows, the vertesia_type is the name of the Temporal Workflow Type.
232
+ */
233
+ vertesia_workflow_type?: string;
234
+ /**
235
+ * An interaction is used to start the agent, the data is stored on temporal "vars"
236
+ */
237
+ interactions?: InteractionRef[];
238
+ }
239
+ export interface WorkflowRunWithDetails extends WorkflowRun {
240
+ history?: WorkflowRunEvent[];
241
+ memo?: {
242
+ [key: string]: any;
243
+ } | null;
244
+ pendingActivities?: {
245
+ activityId?: string;
246
+ activityType?: string;
247
+ attempt: number;
248
+ maximumAttempts: number;
249
+ lastFailure?: string;
250
+ lastStartedTime?: number;
251
+ }[];
252
+ }
253
+ export interface ListWorkflowRunsResponse {
254
+ runs: WorkflowRun[];
255
+ next_page_token?: string;
256
+ has_more?: boolean;
257
+ }
258
+ export interface ListWorkflowInteractionsResponse {
259
+ workflow_id: string;
260
+ run_id: string;
261
+ interaction: WorkflowInteraction;
262
+ }
263
+ export interface WorkflowInteraction {
264
+ type: string;
265
+ model: string;
266
+ tools: [];
267
+ interaction: string;
268
+ environment: string;
269
+ prompt_data: JSONSchema4;
270
+ interactive: boolean;
271
+ interactionParamsSchema?: JSONSchema4;
272
+ debug_mode?: boolean;
273
+ collection_id?: string;
274
+ }
275
+ export interface MultiDocumentsInteractionParams extends Omit<WorkflowExecutionPayload, "config"> {
276
+ config: {
277
+ interactionName: string;
278
+ action: DocumentActionConfig;
279
+ data: Record<string, any>;
280
+ };
281
+ }
282
+ export interface DocumentActionConfig {
283
+ contentTypeName?: string;
284
+ setAsProperties: boolean;
285
+ setAsText: string;
286
+ setNameFrom: string;
287
+ upsert: boolean;
288
+ documentId?: string;
289
+ parentId?: string;
290
+ }
291
+ export declare enum WorkflowExecutionStatus {
292
+ UNKNOWN = 0,
293
+ RUNNING = 1,
294
+ COMPLETED = 2,
295
+ FAILED = 3,
296
+ CANCELED = 4,
297
+ TERMINATED = 5,
298
+ CONTINUED_AS_NEW = 6,
299
+ TIMED_OUT = 7
300
+ }
301
+ /**
302
+ * Basic response for anything run with an async workflow
303
+ */
304
+ export interface WorkflowRunStatus {
305
+ workflow_id: string | null;
306
+ workflow_run_id: string | null;
307
+ status: WorkflowExecutionStatus;
308
+ }
309
+ /**
310
+ * Workflow Update Message
311
+ */
312
+ export interface AgentMessage {
313
+ timestamp: number;
314
+ workflow_run_id: string;
315
+ type: AgentMessageType;
316
+ message: string;
317
+ details?: any;
318
+ workstream_id?: string;
319
+ }
320
+ export declare enum AgentMessageType {
321
+ SYSTEM = "system",
322
+ THOUGHT = "thought",
323
+ PLAN = "plan",
324
+ UPDATE = "update",
325
+ COMPLETE = "complete",
326
+ WARNING = "warning",
327
+ ERROR = "error",
328
+ ANSWER = "answer",
329
+ QUESTION = "question",
330
+ REQUEST_INPUT = "request_input",
331
+ IDLE = "idle",
332
+ TERMINATED = "terminated"
333
+ }
334
+ export interface PlanTask {
335
+ id: number;
336
+ goal: string;
337
+ instructions: string[];
338
+ comment?: string;
339
+ status?: "pending" | "in_progress" | "completed" | "skipped";
340
+ }
341
+ export interface Plan {
342
+ plan: PlanTask[];
343
+ comment?: string;
344
+ }
345
+ export declare const LOW_PRIORITY_TASK_QUEUE = "low_priority";
346
+ /**
347
+ * WebSocket message types for bidirectional communication
348
+ */
349
+ export interface WebSocketSignalMessage {
350
+ type: 'signal';
351
+ signalName: string;
352
+ data: any;
353
+ requestId?: string | number;
354
+ }
355
+ export interface WebSocketPingMessage {
356
+ type: 'ping';
357
+ }
358
+ export interface WebSocketPongMessage {
359
+ type: 'pong';
360
+ }
361
+ export interface WebSocketAckMessage {
362
+ type: 'ack';
363
+ requestId: string | number;
364
+ }
365
+ export interface WebSocketErrorMessage {
366
+ type: 'error';
367
+ requestId?: string | number;
368
+ error: string;
369
+ }
370
+ export type WebSocketClientMessage = WebSocketSignalMessage | WebSocketPingMessage;
371
+ export type WebSocketServerMessage = WebSocketPongMessage | WebSocketAckMessage | WebSocketErrorMessage | AgentMessage;
372
+ export {};