@vertesia/common 0.56.0 → 0.58.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.
Files changed (77) hide show
  1. package/lib/cjs/index.js +2 -0
  2. package/lib/cjs/index.js.map +1 -1
  3. package/lib/cjs/interaction.js.map +1 -1
  4. package/lib/cjs/json-schema.js +3 -0
  5. package/lib/cjs/json-schema.js.map +1 -0
  6. package/lib/cjs/store/store.js +12 -1
  7. package/lib/cjs/store/store.js.map +1 -1
  8. package/lib/cjs/store/workflow.js.map +1 -1
  9. package/lib/cjs/tenant.js +3 -0
  10. package/lib/cjs/tenant.js.map +1 -0
  11. package/lib/esm/index.js +2 -0
  12. package/lib/esm/index.js.map +1 -1
  13. package/lib/esm/interaction.js.map +1 -1
  14. package/lib/esm/json-schema.js +2 -0
  15. package/lib/esm/json-schema.js.map +1 -0
  16. package/lib/esm/store/store.js +11 -0
  17. package/lib/esm/store/store.js.map +1 -1
  18. package/lib/esm/store/workflow.js.map +1 -1
  19. package/lib/esm/tenant.js +2 -0
  20. package/lib/esm/tenant.js.map +1 -0
  21. package/lib/tsconfig.tsbuildinfo +1 -1
  22. package/lib/types/Progress.d.ts +1 -0
  23. package/lib/types/access-control.d.ts +1 -0
  24. package/lib/types/analytics.d.ts +1 -0
  25. package/lib/types/apikey.d.ts +1 -0
  26. package/lib/types/common.d.ts +2 -1
  27. package/lib/types/common.d.ts.map +1 -1
  28. package/lib/types/environment.d.ts +1 -0
  29. package/lib/types/facets.d.ts +1 -0
  30. package/lib/types/index.d.ts +3 -0
  31. package/lib/types/index.d.ts.map +1 -1
  32. package/lib/types/integrations.d.ts +1 -0
  33. package/lib/types/interaction.d.ts +4 -2
  34. package/lib/types/interaction.d.ts.map +1 -1
  35. package/lib/types/json-schema.d.ts +2 -0
  36. package/lib/types/json-schema.d.ts.map +1 -0
  37. package/lib/types/meters.d.ts +1 -0
  38. package/lib/types/payload.d.ts +2 -1
  39. package/lib/types/payload.d.ts.map +1 -1
  40. package/lib/types/plugin.d.ts +1 -0
  41. package/lib/types/project.d.ts +1 -0
  42. package/lib/types/prompt.d.ts +1 -0
  43. package/lib/types/query.d.ts +1 -0
  44. package/lib/types/refs.d.ts +1 -0
  45. package/lib/types/runs.d.ts +1 -0
  46. package/lib/types/store/activity-catalog.d.ts +1 -0
  47. package/lib/types/store/agent.d.ts +1 -0
  48. package/lib/types/store/collections.d.ts +1 -0
  49. package/lib/types/store/common.d.ts +1 -0
  50. package/lib/types/store/doc-analyzer.d.ts +1 -0
  51. package/lib/types/store/dsl-workflow.d.ts +1 -0
  52. package/lib/types/store/index.d.ts +1 -0
  53. package/lib/types/store/object-types.d.ts +1 -0
  54. package/lib/types/store/signals.d.ts +1 -0
  55. package/lib/types/store/store.d.ts +17 -2
  56. package/lib/types/store/store.d.ts.map +1 -1
  57. package/lib/types/store/temporalio.d.ts +1 -0
  58. package/lib/types/store/workflow.d.ts +2 -0
  59. package/lib/types/store/workflow.d.ts.map +1 -1
  60. package/lib/types/tenant.d.ts +11 -0
  61. package/lib/types/tenant.d.ts.map +1 -0
  62. package/lib/types/training.d.ts +1 -0
  63. package/lib/types/transient-tokens.d.ts +1 -0
  64. package/lib/types/user.d.ts +1 -0
  65. package/lib/types/utils/auth.d.ts +1 -0
  66. package/lib/types/utils/schemas.d.ts +1 -0
  67. package/lib/vertesia-common.js +1 -1
  68. package/lib/vertesia-common.js.map +1 -1
  69. package/package.json +1 -1
  70. package/src/common.ts +1 -1
  71. package/src/index.ts +2 -0
  72. package/src/interaction.ts +3 -2
  73. package/src/json-schema.ts +7 -0
  74. package/src/payload.ts +1 -1
  75. package/src/store/store.ts +45 -7
  76. package/src/store/workflow.ts +2 -0
  77. package/src/tenant.ts +10 -0
@@ -2,7 +2,6 @@ import { SearchPayload } from "../payload.js";
2
2
  import { SupportedEmbeddingTypes } from "../project.js";
3
3
  import { ComplexSearchQuery } from "../query.js";
4
4
  import { BaseObject } from "./common.js";
5
- import { RenditionProperties } from "./index.js";
6
5
 
7
6
  export enum ContentObjectStatus {
8
7
  created = "created",
@@ -27,7 +26,13 @@ export interface ContentObject<T = any> extends ContentObjectItem<T> {
27
26
  transcript?: Transcript;
28
27
  }
29
28
 
30
- export type ContentNature = "video" | "image" | "audio" | "document" | "code" | "other";
29
+ export type ContentNature =
30
+ | "video"
31
+ | "image"
32
+ | "audio"
33
+ | "document"
34
+ | "code"
35
+ | "other";
31
36
 
32
37
  export interface Dimensions {
33
38
  width: number;
@@ -177,7 +182,12 @@ export interface ContentObjectItem<T = Record<string, any>> extends BaseObject {
177
182
  properties: T; // a JSON object that describes the object
178
183
 
179
184
  /** Technical metadata of the object */
180
- metadata?: VideoMetadata | AudioMetadata | ImageMetadata | DocumentMetadata | ContentMetadata;
185
+ metadata?:
186
+ | VideoMetadata
187
+ | AudioMetadata
188
+ | ImageMetadata
189
+ | DocumentMetadata
190
+ | ContentMetadata;
181
191
 
182
192
  /** Token information */
183
193
  tokens?: {
@@ -208,7 +218,12 @@ export interface ContentObjectItem<T = Record<string, any>> extends BaseObject {
208
218
  * When creating from an uploaded file the content should be an URL to the uploaded file
209
219
  */
210
220
  export interface CreateContentObjectPayload<T = any>
211
- extends Partial<Omit<ContentObject<T>, "id" | "root" | "created_at" | "updated_at" | "type" | "owner">> {
221
+ extends Partial<
222
+ Omit<
223
+ ContentObject<T>,
224
+ "id" | "root" | "created_at" | "updated_at" | "type" | "owner"
225
+ >
226
+ > {
212
227
  id?: string; // An optional existing object ID to be replaced by the new one
213
228
  type?: string; // the object type ID
214
229
  generation_run_info?: GenerationRunMetadata;
@@ -267,7 +282,10 @@ export interface ContentObjectTypeItem extends BaseObject {
267
282
  }
268
283
 
269
284
  export interface CreateContentObjectTypePayload
270
- extends Omit<ContentObjectType, "id" | "created_at" | "updated_at" | "created_by" | "updated_by"> { }
285
+ extends Omit<
286
+ ContentObjectType,
287
+ "id" | "created_at" | "updated_at" | "created_by" | "updated_by"
288
+ > { }
271
289
 
272
290
  export enum WorkflowRuleInputType {
273
291
  single = "single",
@@ -307,11 +325,31 @@ export interface CreateWorkflowRulePayload extends UploadWorkflowRulePayload {
307
325
  endpoint: string; // required
308
326
  }
309
327
  export interface UploadWorkflowRulePayload
310
- extends Partial<Omit<WorkflowRule, "id" | "created_at" | "updated_at" | "owner">> { }
328
+ extends Partial<
329
+ Omit<WorkflowRule, "id" | "created_at" | "updated_at" | "owner">
330
+ > { }
331
+
332
+ export enum ImageRenditionFormat {
333
+ jpeg = "jpeg",
334
+ png = "png",
335
+ webp = "webp",
336
+ }
337
+
338
+ export enum MarkdownRenditionFormat {
339
+ docx = "docx",
340
+ pdf = "pdf",
341
+ }
342
+
343
+ export interface GetRenditionParams {
344
+ format: ImageRenditionFormat | MarkdownRenditionFormat;
345
+ max_hw?: number;
346
+ generate_if_missing?: boolean;
347
+ sign_url?: boolean;
348
+ }
311
349
 
312
350
  export interface GetRenditionResponse {
313
351
  status: "found" | "generating" | "failed";
314
- rendition?: ContentObject<RenditionProperties>; //TODO add <Rendition>
352
+ renditions?: string[]; //file paths for the renditions
315
353
  workflow_run_id?: string;
316
354
  }
317
355
 
@@ -176,6 +176,8 @@ export interface ListWorkflowRunsPayload {
176
176
  * This is a full text search on the workflow run history.
177
177
  */
178
178
  query?: string;
179
+
180
+ type?: string;
179
181
  }
180
182
 
181
183
  interface WorkflowRunEvent {
package/src/tenant.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This interface is used only on the client side and is shared between @vertesia/ui/session and the main app.
3
+ */
4
+ export interface UIResolvedTenant {
5
+ firebaseTenantId: string;
6
+ label?: string;
7
+ logo?: string;
8
+ provider?: string;
9
+ name?: string;
10
+ }