@vertesia/common 1.1.0-dev.20260427.060440Z → 1.1.1-dev.20260505.160410Z

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 (114) 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/integrations.js.map +1 -1
  9. package/lib/cjs/interaction.js.map +1 -1
  10. package/lib/cjs/openapi.js +3 -0
  11. package/lib/cjs/openapi.js.map +1 -0
  12. package/lib/cjs/project.js.map +1 -1
  13. package/lib/cjs/store/dsl-workflow.js.map +1 -1
  14. package/lib/cjs/store/rendering.js.map +1 -1
  15. package/lib/cjs/store/store.js.map +1 -1
  16. package/lib/cjs/store/workflow.js.map +1 -1
  17. package/lib/esm/apikey.js.map +1 -1
  18. package/lib/esm/apps.js.map +1 -1
  19. package/lib/esm/data-platform.js.map +1 -1
  20. package/lib/esm/environment.js.map +1 -1
  21. package/lib/esm/group.js.map +1 -1
  22. package/lib/esm/index.js +1 -0
  23. package/lib/esm/index.js.map +1 -1
  24. package/lib/esm/integrations.js.map +1 -1
  25. package/lib/esm/interaction.js.map +1 -1
  26. package/lib/esm/openapi.js +2 -0
  27. package/lib/esm/openapi.js.map +1 -0
  28. package/lib/esm/project.js.map +1 -1
  29. package/lib/esm/store/dsl-workflow.js.map +1 -1
  30. package/lib/esm/store/rendering.js.map +1 -1
  31. package/lib/esm/store/store.js.map +1 -1
  32. package/lib/esm/store/workflow.js.map +1 -1
  33. package/lib/tsconfig.tsbuildinfo +1 -1
  34. package/lib/types/access-control.d.ts +4 -0
  35. package/lib/types/access-control.d.ts.map +1 -1
  36. package/lib/types/apikey.d.ts +9 -0
  37. package/lib/types/apikey.d.ts.map +1 -1
  38. package/lib/types/apps.d.ts +29 -12
  39. package/lib/types/apps.d.ts.map +1 -1
  40. package/lib/types/common.d.ts +18 -0
  41. package/lib/types/common.d.ts.map +1 -1
  42. package/lib/types/cost-analytics.d.ts +24 -0
  43. package/lib/types/cost-analytics.d.ts.map +1 -1
  44. package/lib/types/data-platform.d.ts +72 -0
  45. package/lib/types/data-platform.d.ts.map +1 -1
  46. package/lib/types/environment.d.ts +9 -2
  47. package/lib/types/environment.d.ts.map +1 -1
  48. package/lib/types/facets.d.ts +7 -0
  49. package/lib/types/facets.d.ts.map +1 -1
  50. package/lib/types/group.d.ts +10 -0
  51. package/lib/types/group.d.ts.map +1 -1
  52. package/lib/types/index.d.ts +1 -0
  53. package/lib/types/index.d.ts.map +1 -1
  54. package/lib/types/integrations.d.ts +21 -6
  55. package/lib/types/integrations.d.ts.map +1 -1
  56. package/lib/types/interaction.d.ts +55 -0
  57. package/lib/types/interaction.d.ts.map +1 -1
  58. package/lib/types/oauth-server.d.ts +10 -1
  59. package/lib/types/oauth-server.d.ts.map +1 -1
  60. package/lib/types/oauth.d.ts +10 -0
  61. package/lib/types/oauth.d.ts.map +1 -1
  62. package/lib/types/openapi.d.ts +90 -0
  63. package/lib/types/openapi.d.ts.map +1 -0
  64. package/lib/types/project.d.ts +30 -0
  65. package/lib/types/project.d.ts.map +1 -1
  66. package/lib/types/prompt.d.ts +12 -0
  67. package/lib/types/prompt.d.ts.map +1 -1
  68. package/lib/types/store/agent-run.d.ts +22 -1
  69. package/lib/types/store/agent-run.d.ts.map +1 -1
  70. package/lib/types/store/collections.d.ts +30 -0
  71. package/lib/types/store/collections.d.ts.map +1 -1
  72. package/lib/types/store/doc-analyzer.d.ts +2 -1
  73. package/lib/types/store/doc-analyzer.d.ts.map +1 -1
  74. package/lib/types/store/dsl-workflow.d.ts +12 -9
  75. package/lib/types/store/dsl-workflow.d.ts.map +1 -1
  76. package/lib/types/store/rendering.d.ts +4 -0
  77. package/lib/types/store/rendering.d.ts.map +1 -1
  78. package/lib/types/store/store.d.ts +139 -0
  79. package/lib/types/store/store.d.ts.map +1 -1
  80. package/lib/types/store/workflow.d.ts +27 -0
  81. package/lib/types/store/workflow.d.ts.map +1 -1
  82. package/lib/types/sts-token-types.d.ts +5 -0
  83. package/lib/types/sts-token-types.d.ts.map +1 -1
  84. package/lib/types/user.d.ts +14 -1
  85. package/lib/types/user.d.ts.map +1 -1
  86. package/lib/vertesia-common.js +1 -1
  87. package/lib/vertesia-common.js.map +1 -1
  88. package/package.json +2 -2
  89. package/src/access-control.ts +4 -0
  90. package/src/apikey.ts +12 -0
  91. package/src/apps.ts +36 -4
  92. package/src/common.ts +28 -0
  93. package/src/cost-analytics.ts +26 -0
  94. package/src/data-platform.ts +83 -0
  95. package/src/environment.ts +16 -4
  96. package/src/facets.ts +9 -0
  97. package/src/group.ts +13 -1
  98. package/src/index.ts +1 -0
  99. package/src/integrations.ts +32 -7
  100. package/src/interaction.ts +68 -0
  101. package/src/oauth-server.ts +11 -1
  102. package/src/oauth.ts +13 -0
  103. package/src/openapi.ts +102 -0
  104. package/src/project.ts +35 -0
  105. package/src/prompt.ts +15 -0
  106. package/src/store/agent-run.ts +29 -1
  107. package/src/store/collections.ts +37 -0
  108. package/src/store/doc-analyzer.ts +2 -1
  109. package/src/store/dsl-workflow.ts +14 -9
  110. package/src/store/rendering.ts +5 -0
  111. package/src/store/store.ts +164 -0
  112. package/src/store/workflow.ts +36 -1
  113. package/src/sts-token-types.ts +7 -1
  114. 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-dev.20260427.060440Z",
3
+ "version": "1.1.1-dev.20260505.160410Z",
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-dev.20260427.054520Z"
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;
@@ -39,6 +39,12 @@ export interface CostAnalyticsQuery {
39
39
  run_id?: string;
40
40
  /** Filter by agent run ID */
41
41
  agent_run_id?: string;
42
+ /** Filter by saved-interaction ObjectId */
43
+ interaction_id?: string;
44
+ /** Filter by in-code interaction code (e.g. "@sys:chat") */
45
+ interaction_code?: string;
46
+ /** Filter by principal (bare user or API key id; matched against the suffix of principal_id) */
47
+ principal_id?: string;
42
48
  /** Filter by account ID (set automatically by server) */
43
49
  account_id?: string;
44
50
  /** Scope: 'project' (default, current project) or 'org' (all projects in account) */
@@ -49,6 +55,26 @@ export interface CostAnalyticsQuery {
49
55
  no_cache?: boolean;
50
56
  }
51
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
+
52
78
  // ============================================================================
53
79
  // Response
54
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";
@@ -5,7 +5,9 @@ export interface IntegrationConfigurationBase {
5
5
  }
6
6
 
7
7
  export interface GladiaConfiguration extends IntegrationConfigurationBase {
8
- api_key: string;
8
+ api_key?: string;
9
+ has_api_key?: boolean;
10
+ api_key_hint?: string;
9
11
  url?: string;
10
12
  }
11
13
 
@@ -25,27 +27,37 @@ export interface MagicPdfConfiguration extends IntegrationConfigurationBase {
25
27
  }
26
28
 
27
29
  export interface SerperConfiguration extends IntegrationConfigurationBase {
28
- api_key: string;
30
+ api_key?: string;
31
+ has_api_key?: boolean;
32
+ api_key_hint?: string;
29
33
  url?: string;
30
34
  }
31
35
 
32
36
  export interface ExaConfiguration extends IntegrationConfigurationBase {
33
- api_key: string;
37
+ api_key?: string;
38
+ has_api_key?: boolean;
39
+ api_key_hint?: string;
34
40
  }
35
41
 
36
42
  export interface LinkupConfiguration extends IntegrationConfigurationBase {
37
- api_key: string;
43
+ api_key?: string;
44
+ has_api_key?: boolean;
45
+ api_key_hint?: string;
38
46
  }
39
47
 
40
48
  export interface ResendConfiguration extends IntegrationConfigurationBase {
41
49
  /** Resend API key for sending emails */
42
- api_key: string;
50
+ api_key?: string;
51
+ has_api_key?: boolean;
52
+ api_key_hint?: string;
43
53
  /** Domain for email (both sending and receiving). Must be verified in Resend. */
44
54
  email_domain: string;
45
55
  /** Default display name for outgoing emails (e.g., "Vertesia - Project Name") */
46
56
  default_from_name?: string;
47
57
  /** Webhook secret for validating inbound email webhooks (required for receiving emails) */
48
- webhook_secret: string;
58
+ webhook_secret?: string;
59
+ has_webhook_secret?: boolean;
60
+ webhook_secret_hint?: string;
49
61
  /** Domains allowed to send emails TO start agents (for inbound validation) */
50
62
  allowed_sender_domains?: string[];
51
63
  /** Require sender to have project access to start agents via email (default: true) */
@@ -63,6 +75,8 @@ export interface AskUserWebhookConfiguration extends IntegrationConfigurationBas
63
75
  webhook_url: string;
64
76
  /** Secret for signing webhook payloads (HMAC-SHA256) */
65
77
  webhook_secret?: string;
78
+ has_webhook_secret?: boolean;
79
+ webhook_secret_hint?: string;
66
80
  /** Which events to send: ['requested', 'resolved'] or subset (default: both) */
67
81
  events?: ('requested' | 'resolved')[];
68
82
  /** Custom headers to include in webhook requests */
@@ -79,4 +93,15 @@ export enum SupportedIntegrations {
79
93
  linkup = "linkup",
80
94
  resend = "resend",
81
95
  ask_user_webhook = "ask_user_webhook",
82
- }
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,
@@ -135,7 +135,7 @@ export interface OAuthAuthorizationServerMetadata {
135
135
 
136
136
  export interface OAuthClientMetadataDocument {
137
137
  client_id: string;
138
- client_name?: string;
138
+ client_name: string;
139
139
  redirect_uris: string[];
140
140
  grant_types?: OAuthGrantType[];
141
141
  response_types?: OAuthResponseType[];
@@ -143,6 +143,15 @@ export interface OAuthClientMetadataDocument {
143
143
  scope?: string;
144
144
  client_uri?: string;
145
145
  logo_uri?: string;
146
+ tos_uri?: string;
147
+ policy_uri?: string;
148
+ }
149
+
150
+ export interface OAuthClientDisplayMetadata {
151
+ client_uri?: string;
152
+ logo_uri?: string;
153
+ tos_uri?: string;
154
+ policy_uri?: string;
146
155
  }
147
156
 
148
157
  export interface OAuthAuthorizeQuery {
@@ -163,6 +172,7 @@ export interface OAuthAuthorizationRequest {
163
172
  request_id: string;
164
173
  client_id: string;
165
174
  client_name: string;
175
+ client_metadata?: OAuthClientDisplayMetadata;
166
176
  client_registration_mode?: OAuthClientRegistrationMode;
167
177
  redirect_uri: string;
168
178
  redirect_origin: 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
+ }