@vertesia/common 1.1.0 → 1.1.1-dev.20260505.163000Z

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 (109) hide show
  1. package/lib/cjs/apikey.js.map +1 -1
  2. package/lib/cjs/apps.js.map +1 -1
  3. package/lib/cjs/data-platform.js.map +1 -1
  4. package/lib/cjs/environment.js.map +1 -1
  5. package/lib/cjs/group.js.map +1 -1
  6. package/lib/cjs/index.js +1 -0
  7. package/lib/cjs/index.js.map +1 -1
  8. package/lib/cjs/interaction.js.map +1 -1
  9. package/lib/cjs/openapi.js +3 -0
  10. package/lib/cjs/openapi.js.map +1 -0
  11. package/lib/cjs/project.js.map +1 -1
  12. package/lib/cjs/store/dsl-workflow.js.map +1 -1
  13. package/lib/cjs/store/rendering.js.map +1 -1
  14. package/lib/cjs/store/store.js.map +1 -1
  15. package/lib/cjs/store/workflow.js.map +1 -1
  16. package/lib/esm/apikey.js.map +1 -1
  17. package/lib/esm/apps.js.map +1 -1
  18. package/lib/esm/data-platform.js.map +1 -1
  19. package/lib/esm/environment.js.map +1 -1
  20. package/lib/esm/group.js.map +1 -1
  21. package/lib/esm/index.js +1 -0
  22. package/lib/esm/index.js.map +1 -1
  23. package/lib/esm/interaction.js.map +1 -1
  24. package/lib/esm/openapi.js +2 -0
  25. package/lib/esm/openapi.js.map +1 -0
  26. package/lib/esm/project.js.map +1 -1
  27. package/lib/esm/store/dsl-workflow.js.map +1 -1
  28. package/lib/esm/store/rendering.js.map +1 -1
  29. package/lib/esm/store/store.js.map +1 -1
  30. package/lib/esm/store/workflow.js.map +1 -1
  31. package/lib/tsconfig.tsbuildinfo +1 -1
  32. package/lib/types/access-control.d.ts +4 -0
  33. package/lib/types/access-control.d.ts.map +1 -1
  34. package/lib/types/apikey.d.ts +9 -0
  35. package/lib/types/apikey.d.ts.map +1 -1
  36. package/lib/types/apps.d.ts +29 -12
  37. package/lib/types/apps.d.ts.map +1 -1
  38. package/lib/types/common.d.ts +18 -0
  39. package/lib/types/common.d.ts.map +1 -1
  40. package/lib/types/cost-analytics.d.ts +18 -0
  41. package/lib/types/cost-analytics.d.ts.map +1 -1
  42. package/lib/types/data-platform.d.ts +72 -0
  43. package/lib/types/data-platform.d.ts.map +1 -1
  44. package/lib/types/environment.d.ts +9 -2
  45. package/lib/types/environment.d.ts.map +1 -1
  46. package/lib/types/facets.d.ts +7 -0
  47. package/lib/types/facets.d.ts.map +1 -1
  48. package/lib/types/group.d.ts +10 -0
  49. package/lib/types/group.d.ts.map +1 -1
  50. package/lib/types/index.d.ts +1 -0
  51. package/lib/types/index.d.ts.map +1 -1
  52. package/lib/types/integrations.d.ts +1 -0
  53. package/lib/types/integrations.d.ts.map +1 -1
  54. package/lib/types/interaction.d.ts +55 -0
  55. package/lib/types/interaction.d.ts.map +1 -1
  56. package/lib/types/oauth.d.ts +10 -0
  57. package/lib/types/oauth.d.ts.map +1 -1
  58. package/lib/types/openapi.d.ts +90 -0
  59. package/lib/types/openapi.d.ts.map +1 -0
  60. package/lib/types/project.d.ts +19 -0
  61. package/lib/types/project.d.ts.map +1 -1
  62. package/lib/types/prompt.d.ts +12 -0
  63. package/lib/types/prompt.d.ts.map +1 -1
  64. package/lib/types/store/agent-run.d.ts +22 -1
  65. package/lib/types/store/agent-run.d.ts.map +1 -1
  66. package/lib/types/store/collections.d.ts +30 -0
  67. package/lib/types/store/collections.d.ts.map +1 -1
  68. package/lib/types/store/doc-analyzer.d.ts +2 -1
  69. package/lib/types/store/doc-analyzer.d.ts.map +1 -1
  70. package/lib/types/store/dsl-workflow.d.ts +12 -9
  71. package/lib/types/store/dsl-workflow.d.ts.map +1 -1
  72. package/lib/types/store/rendering.d.ts +4 -0
  73. package/lib/types/store/rendering.d.ts.map +1 -1
  74. package/lib/types/store/store.d.ts +139 -0
  75. package/lib/types/store/store.d.ts.map +1 -1
  76. package/lib/types/store/workflow.d.ts +27 -0
  77. package/lib/types/store/workflow.d.ts.map +1 -1
  78. package/lib/types/sts-token-types.d.ts +5 -0
  79. package/lib/types/sts-token-types.d.ts.map +1 -1
  80. package/lib/types/user.d.ts +14 -1
  81. package/lib/types/user.d.ts.map +1 -1
  82. package/lib/vertesia-common.js +1 -1
  83. package/lib/vertesia-common.js.map +1 -1
  84. package/package.json +2 -2
  85. package/src/access-control.ts +4 -0
  86. package/src/apikey.ts +12 -0
  87. package/src/apps.ts +36 -4
  88. package/src/common.ts +28 -0
  89. package/src/cost-analytics.ts +20 -0
  90. package/src/data-platform.ts +83 -0
  91. package/src/environment.ts +16 -4
  92. package/src/facets.ts +9 -0
  93. package/src/group.ts +13 -1
  94. package/src/index.ts +1 -0
  95. package/src/integrations.ts +11 -0
  96. package/src/interaction.ts +68 -0
  97. package/src/oauth.ts +13 -0
  98. package/src/openapi.ts +102 -0
  99. package/src/project.ts +24 -0
  100. package/src/prompt.ts +15 -0
  101. package/src/store/agent-run.ts +29 -1
  102. package/src/store/collections.ts +37 -0
  103. package/src/store/doc-analyzer.ts +2 -1
  104. package/src/store/dsl-workflow.ts +14 -9
  105. package/src/store/rendering.ts +5 -0
  106. package/src/store/store.ts +164 -0
  107. package/src/store/workflow.ts +36 -1
  108. package/src/sts-token-types.ts +7 -1
  109. package/src/user.ts +18 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertesia/common",
3
- "version": "1.1.0",
3
+ "version": "1.1.1-dev.20260505.163000Z",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "types": "./lib/types/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "ajv": "^8.17.1",
29
- "@llumiverse/common": "1.1.0"
29
+ "@llumiverse/common": "1.1.1-dev.20260505.151157Z"
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",
@@ -88,6 +88,10 @@ export interface ACECreatePayload extends
88
88
  export interface ACEUpdatePayload extends Partial<ACECreatePayload> {
89
89
  }
90
90
 
91
+ export interface RoleDefinition {
92
+ name: ProjectRoles;
93
+ permissions: Permission[];
94
+ }
91
95
 
92
96
  export interface AcesQueryOptions {
93
97
 
package/src/apikey.ts CHANGED
@@ -28,6 +28,10 @@ export interface ApiKeyWithValue extends Omit<ApiKey, "maskedValue"> {
28
28
  value: string;
29
29
  }
30
30
 
31
+ export interface ApiKeyReadResponse extends ApiKey {
32
+ value?: string;
33
+ }
34
+
31
35
  export interface CreatePublicKeyPayload {
32
36
  name?: string;
33
37
  projectId?: string;
@@ -38,6 +42,14 @@ export interface AuthTokenResponse {
38
42
  token: string;
39
43
  }
40
44
 
45
+ export interface ApiKeyListQuery {
46
+ level?: 'account' | 'project';
47
+ }
48
+
49
+ export interface ApiKeyReadQuery {
50
+ withValue?: boolean;
51
+ }
52
+
41
53
  export interface AuthTokenPayload {
42
54
  sub: string;
43
55
  name: string;
package/src/apps.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { JSONSchema, ToolDefinition } from "@llumiverse/common";
1
+ import { JSONObject, JSONSchema, ToolDefinition } from "@llumiverse/common";
2
2
  import { CatalogInteractionRef } from "./interaction.js";
3
3
  import { DSLActivityOptions, InCodeTypeDefinition } from "./store/index.js";
4
4
 
@@ -59,6 +59,16 @@ export interface AppUIConfig {
59
59
  available_in?: AppAvailableIn[];
60
60
  }
61
61
 
62
+ export interface AppInstallationProjectsQuery {
63
+ name?: string;
64
+ id?: string;
65
+ }
66
+
67
+ export interface AppInstallationsQuery {
68
+ kind?: AppInstallationKind;
69
+ available_in?: AppAvailableIn;
70
+ }
71
+
62
72
  /**
63
73
  * Authentication type for tool collections
64
74
  */
@@ -643,6 +653,24 @@ export interface AppInstallationWithManifest extends Omit<AppInstallation, 'mani
643
653
  oauth_collection_ids?: string[];
644
654
  }
645
655
 
656
+ export interface AppInstallationListEntry extends Omit<AppInstallation, 'manifest'> {
657
+ manifest: AppManifest | null;
658
+ oauth_collection_ids?: string[];
659
+ }
660
+
661
+ export interface OrphanedAppInstallation extends Omit<AppInstallation, 'manifest'> {
662
+ manifest: null;
663
+ }
664
+
665
+ export interface OAuthClientCredentials {
666
+ client_id?: string;
667
+ client_secret?: string;
668
+ scopes?: string[];
669
+ }
670
+
671
+ export type AppOAuthCollectionParams = Record<string, OAuthClientCredentials>;
672
+ export type AppOAuthProviderParams = Record<string, OAuthClientCredentials>;
673
+
646
674
  export interface AppInstallationPayload {
647
675
  app_id: string;
648
676
  settings?: Record<string, any>;
@@ -651,13 +679,17 @@ export interface AppInstallationPayload {
651
679
  * Legacy callers may still use collection.name for older manifests.
652
680
  * Collected from the user at install time for collections with oauth_config.required_at_install.
653
681
  */
654
- oauth_params?: Record<string, { client_id?: string; client_secret?: string; scopes?: string[] }>;
682
+ oauth_params?: AppOAuthCollectionParams;
655
683
  /**
656
684
  * OAuth credentials for named providers, keyed by the provider key from oauth_providers.
657
685
  * Collected from the user at install time for providers with required_at_install.
658
686
  * Separate from oauth_params to avoid key collisions between provider keys and collection ids.
659
687
  */
660
- oauth_provider_params?: Record<string, { client_id?: string; client_secret?: string; scopes?: string[] }>;
688
+ oauth_provider_params?: AppOAuthProviderParams;
689
+ }
690
+
691
+ export interface UpdateAppInstallationToolAllowlistPayload {
692
+ tool_allowlist: string[] | null;
661
693
  }
662
694
 
663
695
  export type AppInstallationKind = 'ui' | 'tools' | 'all';
@@ -766,7 +798,7 @@ export interface OAuthMetadataResponse {
766
798
  collection_id: string;
767
799
  collection_name: string;
768
800
  mcp_server_url: string;
769
- metadata: any;
801
+ metadata: JSONObject;
770
802
  }
771
803
 
772
804
  // ============================================================================
package/src/common.ts CHANGED
@@ -15,6 +15,28 @@ export interface GenericCommandResponse {
15
15
  details?: any;
16
16
  }
17
17
 
18
+ export interface DeleteByIdResult {
19
+ id: string;
20
+ }
21
+
22
+ export interface DeleteCountResult {
23
+ id: string;
24
+ count: number;
25
+ }
26
+
27
+ export interface SuccessResponse {
28
+ success: true;
29
+ }
30
+
31
+ export interface DeleteOperationResult {
32
+ acknowledged: boolean;
33
+ deletedCount: number;
34
+ }
35
+
36
+ export interface CountResult {
37
+ count: number;
38
+ }
39
+
18
40
  export interface BulkOperationPayload {
19
41
  /**
20
42
  * The operation name
@@ -58,3 +80,9 @@ export interface BulkObjectCreateResult extends BulkOperationResult {
58
80
  /** Objects that failed to create */
59
81
  failed: { external_id?: string; index: number; error: string }[];
60
82
  }
83
+
84
+ export type BulkOperationResponse =
85
+ | BulkOperationResult
86
+ | BulkObjectCreateResult
87
+ | BulkObjectUpdateResult
88
+ | BulkObjectDeleteResult;
@@ -55,6 +55,26 @@ export interface CostAnalyticsQuery {
55
55
  no_cache?: boolean;
56
56
  }
57
57
 
58
+ export interface CostModelPricesQuery {
59
+ /** Start time (ISO string or epoch ms) */
60
+ from?: string | number;
61
+ /** End time (ISO string or epoch ms) */
62
+ to?: string | number;
63
+ }
64
+
65
+ export interface CostExportQuery {
66
+ /** Start time (ISO string or epoch ms) */
67
+ from?: string | number;
68
+ /** End time (ISO string or epoch ms) */
69
+ to?: string | number;
70
+ /** Scope: 'project' (default, current project) or 'org' (all projects in account) */
71
+ scope?: 'project' | 'org';
72
+ /** Filter by project ID (optional, for org scope) */
73
+ project_id?: string;
74
+ /** Filter by workflow / agent run ID */
75
+ workflow_id?: string;
76
+ }
77
+
58
78
  // ============================================================================
59
79
  // Response
60
80
  // ============================================================================
@@ -299,6 +299,15 @@ export interface DataStoreVersion {
299
299
  snapshot_name?: string;
300
300
  }
301
301
 
302
+ export interface ListDataStoreVersionsQuery {
303
+ limit?: number;
304
+ snapshots_only?: boolean;
305
+ }
306
+
307
+ export interface GetDataStoreTableQuery {
308
+ sample?: boolean;
309
+ }
310
+
302
311
  // ============================================================================
303
312
  // Import Types
304
313
  // ============================================================================
@@ -395,6 +404,14 @@ export interface CreateTablesPayload {
395
404
  message: string;
396
405
  }
397
406
 
407
+ export interface QueryValidationPayload {
408
+ queries: Array<{ name: string; sql: string }>;
409
+ }
410
+
411
+ export interface BatchQueryPayload {
412
+ queries: Array<{ name: string; sql: string; limit?: number }>;
413
+ }
414
+
398
415
  /**
399
416
  * Schema change operation types.
400
417
  */
@@ -518,6 +535,72 @@ export interface QueryResult {
518
535
  error?: string;
519
536
  }
520
537
 
538
+ export interface BatchQueryResultItem extends QueryResult {
539
+ name: string;
540
+ }
541
+
542
+ export interface BatchQueryResult {
543
+ results: BatchQueryResultItem[];
544
+ }
545
+
546
+ export interface QueryValidationError {
547
+ query: string;
548
+ error: string;
549
+ }
550
+
551
+ export interface QueryValidationResult {
552
+ valid: boolean;
553
+ errors: QueryValidationError[];
554
+ }
555
+
556
+ export interface DataStoreDownloadInfo {
557
+ url: string;
558
+ gcs_generation: number;
559
+ schema_version: string;
560
+ store_id: string;
561
+ store_name: string;
562
+ tables: string[];
563
+ expires_in: number;
564
+ }
565
+
566
+ export interface DataStoreArchiveResult {
567
+ id: string;
568
+ status: DataStoreStatus;
569
+ }
570
+
571
+ export type DataStoreSchemaResponse = DataSchema | DataSchemaForAI;
572
+
573
+ export interface DataStoreTableDetail extends DataTable {
574
+ sample_data?: Record<string, unknown>[];
575
+ }
576
+
577
+ export interface DataStoreTableDropResult {
578
+ dropped: string;
579
+ }
580
+
581
+ export interface DashboardArchiveResult {
582
+ id: string;
583
+ status: DashboardStatus;
584
+ }
585
+
586
+ export interface DashboardBulkArchiveResult {
587
+ archived: number;
588
+ failed: number;
589
+ }
590
+
591
+ export interface DashboardBulkDeleteResult {
592
+ deleted: number;
593
+ failed: number;
594
+ }
595
+
596
+ export interface DashboardVersioningStatusResponse {
597
+ versioning_enabled: boolean;
598
+ }
599
+
600
+ export interface DashboardVersioningPayload {
601
+ enabled: boolean;
602
+ }
603
+
521
604
  // ============================================================================
522
605
  // AI Agent Interface
523
606
  // ============================================================================
@@ -1,4 +1,8 @@
1
- import type { AIModel, ProviderParams, TextFallbackOptions } from "@llumiverse/common";
1
+ import type {
2
+ AIModel,
3
+ ProviderParams,
4
+ TextFallbackOptions
5
+ } from "@llumiverse/common";
2
6
  import { ProviderList, Providers } from "@llumiverse/common";
3
7
 
4
8
  // Virtual providers from studio
@@ -55,6 +59,10 @@ export interface VirtualEnvEntry {
55
59
  model: string;
56
60
  }
57
61
 
62
+ export interface ListEnvironmentsQuery {
63
+ all?: boolean;
64
+ }
65
+
58
66
  /**
59
67
  * Custom configuration for virtual environments
60
68
  **/
@@ -121,8 +129,12 @@ export interface ExecutionEnvironmentRef {
121
129
 
122
130
  export const ExecutionEnvironmentRefPopulate = "id name provider enabled_models default_model endpoint_url allowed_projects account created_at updated_at";
123
131
 
124
- export interface ExecutionEnvironmentCreatePayload extends Omit<ExecutionEnvironment, 'id' | 'account' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by' | 'project'> { }
125
- export interface ExecutionEnvironmentUpdatePayload extends Partial<Omit<ExecutionEnvironment, 'id' | 'account' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by'>> { }
132
+ export interface ExecutionEnvironmentCreatePayload extends Omit<ExecutionEnvironment, 'id' | 'account' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by' | 'project' | 'apikey_hint'> { }
133
+ export interface ExecutionEnvironmentUpdatePayload extends Partial<Omit<ExecutionEnvironment, 'id' | 'account' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by' | 'apikey_hint'>> { }
134
+ export interface ExecutionEnvironmentConfigUpdatePayload {
135
+ enabled_models?: AIModel[];
136
+ config?: MediatorEnvConfig | LoadBalancingEnvConfig;
137
+ }
126
138
 
127
139
  export interface MigrateInteractionsPayload {
128
140
  /**
@@ -144,4 +156,4 @@ export interface MigrateInteractionsPayload {
144
156
  export interface MigrateInteractionsResult {
145
157
  matched_count: number;
146
158
  modified_count: number;
147
- }
159
+ }
package/src/facets.ts CHANGED
@@ -42,3 +42,12 @@ export interface FacetNameBucket {
42
42
  export interface FacetResult {
43
43
  buckets: FacetBucket[]
44
44
  }
45
+
46
+ export interface ComputedFacetBucket {
47
+ _id: string;
48
+ count: number;
49
+ }
50
+
51
+ export type ComputedFacetResponse = Record<string, ComputedFacetBucket[] | number> & {
52
+ total?: number;
53
+ };
package/src/group.ts CHANGED
@@ -17,6 +17,18 @@ export interface PopulatesUserGroup extends UserGroup {
17
17
  members: UserRef[];
18
18
  }
19
19
 
20
+ export interface CreateUserGroupPayload {
21
+ name: string;
22
+ description?: string;
23
+ tags?: string[];
24
+ }
25
+
26
+ export interface UpdateUserGroupPayload {
27
+ name: string;
28
+ description?: string;
29
+ tags?: string[];
30
+ }
31
+
20
32
  export interface UserGroupRef {
21
33
  id: string;
22
34
  name: string;
@@ -25,4 +37,4 @@ export interface UserGroupRef {
25
37
 
26
38
  export const UserGroupRefPopulate = 'id name tags description';
27
39
 
28
- export const MEMBERS_GROUP_NAME = 'members';
40
+ export const MEMBERS_GROUP_NAME = 'members';
package/src/index.ts CHANGED
@@ -19,6 +19,7 @@ export * from './json.js';
19
19
  export * from './meters.js';
20
20
  export * from './oauth-server.js';
21
21
  export * from './model_utility.js';
22
+ export * from './openapi.js';
22
23
  export * from './oauth.js';
23
24
  export * from './payload.js';
24
25
  export * from "./Progress.js";
@@ -94,3 +94,14 @@ export enum SupportedIntegrations {
94
94
  resend = "resend",
95
95
  ask_user_webhook = "ask_user_webhook",
96
96
  }
97
+
98
+ export type ProjectIntegrationConfig =
99
+ | GladiaConfiguration
100
+ | GithubConfiguration
101
+ | AwsConfiguration
102
+ | MagicPdfConfiguration
103
+ | SerperConfiguration
104
+ | ExaConfiguration
105
+ | LinkupConfiguration
106
+ | ResendConfiguration
107
+ | AskUserWebhookConfiguration;
@@ -125,6 +125,30 @@ export interface CatalogInteractionRef {
125
125
  description?: string;
126
126
  }
127
127
 
128
+ export interface CatalogTagQuery {
129
+ tag?: string;
130
+ }
131
+
132
+ export interface StoredCatalogInteractionsQuery extends CatalogTagQuery {
133
+ status?: string;
134
+ published?: boolean;
135
+ }
136
+
137
+ export interface ExecuteInteractionByEndpointQuery {
138
+ tag?: string;
139
+ }
140
+
141
+ export interface ExecuteInteractionByEndpointHeaders {
142
+ 'x-interaction-tag'?: string;
143
+ }
144
+
145
+ export interface ResolveInteractionQuery {
146
+ environment?: string;
147
+ model?: string;
148
+ hasImage?: boolean;
149
+ hasVideo?: boolean;
150
+ }
151
+
128
152
  export interface InCodePrompt {
129
153
  role: PromptRole,
130
154
  content: string,
@@ -807,6 +831,12 @@ export interface AsyncInteractionExecutionPayload extends AsyncExecutionPayloadB
807
831
 
808
832
  export type AsyncExecutionPayload = AsyncConversationExecutionPayload | AsyncInteractionExecutionPayload;
809
833
 
834
+ export interface AsyncExecutionResult {
835
+ runId: string;
836
+ workflowId: string;
837
+ agentRunId?: string;
838
+ }
839
+
810
840
  /**
811
841
  * Telemetry context for streaming mode.
812
842
  * Contains info not available in current_state needed to send LlmCallEvent.
@@ -1073,6 +1103,13 @@ export interface InteractionExecutionResult<P = any> extends ExecutionRun<P> {
1073
1103
  options?: StatelessExecutionOptions;
1074
1104
  }
1075
1105
 
1106
+ export interface LegacyInteractionExecutionResult<P = any>
1107
+ extends Omit<InteractionExecutionResult<P>, 'result' | 'account' | 'project'> {
1108
+ account: string | AccountRef;
1109
+ project: string | ProjectRef;
1110
+ result?: JSONObject | string | null;
1111
+ }
1112
+
1076
1113
  export interface ExecutionRunRef extends Omit<ExecutionRun, "result" | "parameters" | "interaction"> {
1077
1114
  interaction?: InteractionRef;
1078
1115
  interaction_code?: string;
@@ -1118,6 +1155,10 @@ export interface GenerateTestDataPayload {
1118
1155
  config: InteractionExecutionConfiguration;
1119
1156
  }
1120
1157
 
1158
+ export interface GeneratedTestDataRecord {
1159
+ [key: string]: unknown;
1160
+ }
1161
+
1121
1162
  export interface ImprovePromptPayloadConfig {
1122
1163
  config: InteractionExecutionConfiguration;
1123
1164
  }
@@ -1129,6 +1170,33 @@ export interface ImprovePromptPayload extends ImprovePromptPayloadConfig {
1129
1170
  result_schema?: JSONSchema, // optional interactionr result schema
1130
1171
  }
1131
1172
 
1173
+ export interface GeneratedInteractionPromptTemplate {
1174
+ role: 'safety' | 'system' | 'user';
1175
+ name: string;
1176
+ content: string;
1177
+ content_type: 'jst';
1178
+ inputSchema: JSONSchema;
1179
+ }
1180
+
1181
+ export interface GeneratedInteractionPromptSegment {
1182
+ type: 'template';
1183
+ template: GeneratedInteractionPromptTemplate;
1184
+ }
1185
+
1186
+ export interface GeneratedInteractionDefinition {
1187
+ name: string;
1188
+ description: string;
1189
+ temperature: number;
1190
+ prompts: GeneratedInteractionPromptSegment[];
1191
+ max_tokens?: number;
1192
+ result_schema: JSONSchema;
1193
+ tags: Array<'generated' | 'agent'>;
1194
+ }
1195
+
1196
+ export interface PromptImprovementResponse {
1197
+ result: CompletionResult[];
1198
+ }
1199
+
1132
1200
  export interface RateLimitRequestPayload {
1133
1201
  interaction: string,
1134
1202
  environment_id?: string,
package/src/oauth.ts CHANGED
@@ -80,6 +80,10 @@ export interface OAuthProvider extends OAuthProviderData {
80
80
  id: string;
81
81
  }
82
82
 
83
+ export interface RevokeOAuthGrantQuery {
84
+ include_consent?: boolean;
85
+ }
86
+
83
87
  /**
84
88
  * Payload for creating an OAuth Provider.
85
89
  * The client_secret is accepted as plaintext on create and stored encrypted.
@@ -129,3 +133,12 @@ export interface OAuthProviderAuthorizeResponse {
129
133
  state?: string;
130
134
  connected?: boolean;
131
135
  }
136
+
137
+ export interface OAuthProviderAccessTokenResponse {
138
+ access_token: string;
139
+ }
140
+
141
+ export interface OAuthProviderExchangePayload {
142
+ code: string;
143
+ state: string;
144
+ }
package/src/openapi.ts ADDED
@@ -0,0 +1,102 @@
1
+ export interface OpenApiEmbedding {
2
+ model: string;
3
+ values: number[];
4
+ etag?: string;
5
+ }
6
+
7
+ export interface OpenApiContentSource {
8
+ source?: string;
9
+ type?: string;
10
+ name?: string;
11
+ etag?: string;
12
+ }
13
+
14
+ export interface OpenApiContentObjectTypeRef {
15
+ id?: string;
16
+ code?: string;
17
+ name: string;
18
+ }
19
+
20
+ export interface OpenApiContentObjectRevision {
21
+ parent?: string;
22
+ root: string;
23
+ head: boolean;
24
+ label?: string;
25
+ }
26
+
27
+ export interface OpenApiContentObjectUserPermissions {
28
+ can_write: boolean;
29
+ can_delete: boolean;
30
+ }
31
+
32
+ export interface OpenApiInheritedPropertyMetadata {
33
+ name: string;
34
+ collection: string;
35
+ }
36
+
37
+ export interface OpenApiContentObjectItem {
38
+ id: string;
39
+ name: string;
40
+ description?: string;
41
+ tags?: string[];
42
+ created_by: string;
43
+ updated_by: string;
44
+ created_at: string;
45
+ updated_at: string;
46
+ parent: string;
47
+ location: string;
48
+ status: string;
49
+ type?: OpenApiContentObjectTypeRef;
50
+ content: OpenApiContentSource;
51
+ external_id?: string;
52
+ properties: Record<string, unknown>;
53
+ metadata?: Record<string, unknown>;
54
+ tokens?: {
55
+ count: number;
56
+ encoding: string;
57
+ etag: string;
58
+ };
59
+ revision: OpenApiContentObjectRevision;
60
+ is_deleted?: boolean;
61
+ is_locked?: boolean;
62
+ score?: number;
63
+ user_permissions?: OpenApiContentObjectUserPermissions;
64
+ }
65
+
66
+ export interface OpenApiContentObject extends OpenApiContentObjectItem {
67
+ text?: string;
68
+ text_etag?: string;
69
+ embeddings?: Record<string, OpenApiEmbedding>;
70
+ parts?: string[];
71
+ parts_etag?: string;
72
+ transcript?: Record<string, unknown>;
73
+ security?: Record<string, string[]>;
74
+ inherited_properties?: OpenApiInheritedPropertyMetadata[];
75
+ }
76
+
77
+ export interface OpenApiObjectSearchResponse {
78
+ results: OpenApiContentObjectItem[];
79
+ facets: Record<string, unknown>;
80
+ aggregations?: Record<string, unknown>;
81
+ }
82
+
83
+ export interface OpenApiAdaptedTable {
84
+ comment?: string;
85
+ data: Record<string, unknown>[];
86
+ }
87
+
88
+ export interface OpenApiAdaptedTableResponse {
89
+ [key: string]: OpenApiAdaptedTable;
90
+ }
91
+
92
+ export interface OpenApiDocTable {
93
+ page_number?: number;
94
+ table_number?: number;
95
+ title?: string;
96
+ format: 'application/csv' | 'application/json';
97
+ data: string | Record<string, unknown>[];
98
+ }
99
+
100
+ export interface OpenApiAnnotatedPdfResponse {
101
+ url: string | null;
102
+ }
package/src/project.ts CHANGED
@@ -57,6 +57,14 @@ export interface ProjectRef {
57
57
  restricted?: boolean;
58
58
  }
59
59
 
60
+ export interface ProjectTagQuery {
61
+ tag?: string;
62
+ }
63
+
64
+ export interface ListProjectsQuery {
65
+ account?: string;
66
+ }
67
+
60
68
  export enum ResourceVisibility {
61
69
  public = "public",
62
70
  account = "account",
@@ -259,6 +267,10 @@ export interface ProjectCreatePayload {
259
267
 
260
268
  export interface ProjectUpdatePayload extends Partial<Project> { }
261
269
 
270
+ export interface ProjectPluginsUpdatePayload {
271
+ plugins: string[];
272
+ }
273
+
262
274
 
263
275
  export const ProjectRefPopulate = "id name account";
264
276
 
@@ -346,6 +358,14 @@ export interface IndexingStatusResponse {
346
358
  };
347
359
  }
348
360
 
361
+ export interface StartProjectReindexPayload {
362
+ shard_size?: number;
363
+ parallel_shard_count?: number;
364
+ concurrency?: number;
365
+ bulk_size_bytes?: number;
366
+ bulk_concurrency?: number;
367
+ }
368
+
349
369
  // ============================================================================
350
370
  // Internal indexing types (used by Temporal workflows)
351
371
  // ============================================================================
@@ -698,3 +718,7 @@ export interface ProjectIntegrationListEntry {
698
718
  id: SupportedIntegrations;
699
719
  enabled: boolean;
700
720
  }
721
+
722
+ export interface ProjectIntegrationListResponse {
723
+ integrations: ProjectIntegrationListEntry[];
724
+ }