@vertesia/common 0.24.0-dev.202601221707
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.
- package/LICENSE +13 -0
- package/README.md +53 -0
- package/lib/cjs/Progress.js +61 -0
- package/lib/cjs/Progress.js.map +1 -0
- package/lib/cjs/access-control.js +56 -0
- package/lib/cjs/access-control.js.map +1 -0
- package/lib/cjs/analytics.js +3 -0
- package/lib/cjs/analytics.js.map +1 -0
- package/lib/cjs/apikey.js +16 -0
- package/lib/cjs/apikey.js.map +1 -0
- package/lib/cjs/apps.js +35 -0
- package/lib/cjs/apps.js.map +1 -0
- package/lib/cjs/ask-user.js +8 -0
- package/lib/cjs/ask-user.js.map +1 -0
- package/lib/cjs/channels.js +63 -0
- package/lib/cjs/channels.js.map +1 -0
- package/lib/cjs/common.js +3 -0
- package/lib/cjs/common.js.map +1 -0
- package/lib/cjs/data-platform.js +127 -0
- package/lib/cjs/data-platform.js.map +1 -0
- package/lib/cjs/email.js +20 -0
- package/lib/cjs/email.js.map +1 -0
- package/lib/cjs/environment.js +44 -0
- package/lib/cjs/environment.js.map +1 -0
- package/lib/cjs/facets.js +3 -0
- package/lib/cjs/facets.js.map +1 -0
- package/lib/cjs/group.js +5 -0
- package/lib/cjs/group.js.map +1 -0
- package/lib/cjs/index.js +55 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/integrations.js +14 -0
- package/lib/cjs/integrations.js.map +1 -0
- package/lib/cjs/interaction.js +97 -0
- package/lib/cjs/interaction.js.map +1 -0
- package/lib/cjs/json-schema.js +3 -0
- package/lib/cjs/json-schema.js.map +1 -0
- package/lib/cjs/json.js +3 -0
- package/lib/cjs/json.js.map +1 -0
- package/lib/cjs/meters.js +13 -0
- package/lib/cjs/meters.js.map +1 -0
- package/lib/cjs/model_utility.js +6 -0
- package/lib/cjs/model_utility.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/payload.js +3 -0
- package/lib/cjs/payload.js.map +1 -0
- package/lib/cjs/pending-asks.js +7 -0
- package/lib/cjs/pending-asks.js.map +1 -0
- package/lib/cjs/project.js +107 -0
- package/lib/cjs/project.js.map +1 -0
- package/lib/cjs/prompt.js +21 -0
- package/lib/cjs/prompt.js.map +1 -0
- package/lib/cjs/query.js +3 -0
- package/lib/cjs/query.js.map +1 -0
- package/lib/cjs/rate-limiter.js +6 -0
- package/lib/cjs/rate-limiter.js.map +1 -0
- package/lib/cjs/refs.js +14 -0
- package/lib/cjs/refs.js.map +1 -0
- package/lib/cjs/runs.js +3 -0
- package/lib/cjs/runs.js.map +1 -0
- package/lib/cjs/skill.js +14 -0
- package/lib/cjs/skill.js.map +1 -0
- package/lib/cjs/store/activity-catalog.js +3 -0
- package/lib/cjs/store/activity-catalog.js.map +1 -0
- package/lib/cjs/store/collections.js +9 -0
- package/lib/cjs/store/collections.js.map +1 -0
- package/lib/cjs/store/common.js +3 -0
- package/lib/cjs/store/common.js.map +1 -0
- package/lib/cjs/store/conversation-state.js +3 -0
- package/lib/cjs/store/conversation-state.js.map +1 -0
- package/lib/cjs/store/doc-analyzer.js +3 -0
- package/lib/cjs/store/doc-analyzer.js.map +1 -0
- package/lib/cjs/store/dsl-workflow.js +5 -0
- package/lib/cjs/store/dsl-workflow.js.map +1 -0
- package/lib/cjs/store/index.js +30 -0
- package/lib/cjs/store/index.js.map +1 -0
- package/lib/cjs/store/object-types.js +98 -0
- package/lib/cjs/store/object-types.js.map +1 -0
- package/lib/cjs/store/schedule.js +32 -0
- package/lib/cjs/store/schedule.js.map +1 -0
- package/lib/cjs/store/signals.js +3 -0
- package/lib/cjs/store/signals.js.map +1 -0
- package/lib/cjs/store/store.js +166 -0
- package/lib/cjs/store/store.js.map +1 -0
- package/lib/cjs/store/temporalio.js +44 -0
- package/lib/cjs/store/temporalio.js.map +1 -0
- package/lib/cjs/store/worker.js +3 -0
- package/lib/cjs/store/worker.js.map +1 -0
- package/lib/cjs/store/workflow.js +241 -0
- package/lib/cjs/store/workflow.js.map +1 -0
- package/lib/cjs/sts-token-types.js +32 -0
- package/lib/cjs/sts-token-types.js.map +1 -0
- package/lib/cjs/tenant.js +3 -0
- package/lib/cjs/tenant.js.map +1 -0
- package/lib/cjs/tool-execution.js +6 -0
- package/lib/cjs/tool-execution.js.map +1 -0
- package/lib/cjs/training.js +14 -0
- package/lib/cjs/training.js.map +1 -0
- package/lib/cjs/transient-tokens.js +9 -0
- package/lib/cjs/transient-tokens.js.map +1 -0
- package/lib/cjs/user.js +25 -0
- package/lib/cjs/user.js.map +1 -0
- package/lib/cjs/utils/auth.js +15 -0
- package/lib/cjs/utils/auth.js.map +1 -0
- package/lib/cjs/utils/schemas.js +114 -0
- package/lib/cjs/utils/schemas.js.map +1 -0
- package/lib/cjs/utils/type-helpers.js +3 -0
- package/lib/cjs/utils/type-helpers.js.map +1 -0
- package/lib/cjs/versions.js +8 -0
- package/lib/cjs/versions.js.map +1 -0
- package/lib/cjs/workflow-analytics.js +52 -0
- package/lib/cjs/workflow-analytics.js.map +1 -0
- package/lib/esm/Progress.js +57 -0
- package/lib/esm/Progress.js.map +1 -0
- package/lib/esm/access-control.js +53 -0
- package/lib/esm/access-control.js.map +1 -0
- package/lib/esm/analytics.js +2 -0
- package/lib/esm/analytics.js.map +1 -0
- package/lib/esm/apikey.js +13 -0
- package/lib/esm/apikey.js.map +1 -0
- package/lib/esm/apps.js +32 -0
- package/lib/esm/apps.js.map +1 -0
- package/lib/esm/ask-user.js +7 -0
- package/lib/esm/ask-user.js.map +1 -0
- package/lib/esm/channels.js +57 -0
- package/lib/esm/channels.js.map +1 -0
- package/lib/esm/common.js +2 -0
- package/lib/esm/common.js.map +1 -0
- package/lib/esm/data-platform.js +124 -0
- package/lib/esm/data-platform.js.map +1 -0
- package/lib/esm/email.js +16 -0
- package/lib/esm/email.js.map +1 -0
- package/lib/esm/environment.js +41 -0
- package/lib/esm/environment.js.map +1 -0
- package/lib/esm/facets.js +2 -0
- package/lib/esm/facets.js.map +1 -0
- package/lib/esm/group.js +2 -0
- package/lib/esm/group.js.map +1 -0
- package/lib/esm/index.js +39 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/integrations.js +11 -0
- package/lib/esm/integrations.js.map +1 -0
- package/lib/esm/interaction.js +92 -0
- package/lib/esm/interaction.js.map +1 -0
- package/lib/esm/json-schema.js +2 -0
- package/lib/esm/json-schema.js.map +1 -0
- package/lib/esm/json.js +2 -0
- package/lib/esm/json.js.map +1 -0
- package/lib/esm/meters.js +10 -0
- package/lib/esm/meters.js.map +1 -0
- package/lib/esm/model_utility.js +2 -0
- package/lib/esm/model_utility.js.map +1 -0
- package/lib/esm/payload.js +2 -0
- package/lib/esm/payload.js.map +1 -0
- package/lib/esm/pending-asks.js +6 -0
- package/lib/esm/pending-asks.js.map +1 -0
- package/lib/esm/project.js +102 -0
- package/lib/esm/project.js.map +1 -0
- package/lib/esm/prompt.js +18 -0
- package/lib/esm/prompt.js.map +1 -0
- package/lib/esm/query.js +2 -0
- package/lib/esm/query.js.map +1 -0
- package/lib/esm/rate-limiter.js +5 -0
- package/lib/esm/rate-limiter.js.map +1 -0
- package/lib/esm/refs.js +11 -0
- package/lib/esm/refs.js.map +1 -0
- package/lib/esm/runs.js +2 -0
- package/lib/esm/runs.js.map +1 -0
- package/lib/esm/skill.js +13 -0
- package/lib/esm/skill.js.map +1 -0
- package/lib/esm/store/activity-catalog.js +2 -0
- package/lib/esm/store/activity-catalog.js.map +1 -0
- package/lib/esm/store/collections.js +6 -0
- package/lib/esm/store/collections.js.map +1 -0
- package/lib/esm/store/common.js +2 -0
- package/lib/esm/store/common.js.map +1 -0
- package/lib/esm/store/conversation-state.js +2 -0
- package/lib/esm/store/conversation-state.js.map +1 -0
- package/lib/esm/store/doc-analyzer.js +2 -0
- package/lib/esm/store/doc-analyzer.js.map +1 -0
- package/lib/esm/store/dsl-workflow.js +2 -0
- package/lib/esm/store/dsl-workflow.js.map +1 -0
- package/lib/esm/store/index.js +14 -0
- package/lib/esm/store/index.js.map +1 -0
- package/lib/esm/store/object-types.js +95 -0
- package/lib/esm/store/object-types.js.map +1 -0
- package/lib/esm/store/schedule.js +29 -0
- package/lib/esm/store/schedule.js.map +1 -0
- package/lib/esm/store/signals.js +2 -0
- package/lib/esm/store/signals.js.map +1 -0
- package/lib/esm/store/store.js +160 -0
- package/lib/esm/store/store.js.map +1 -0
- package/lib/esm/store/temporalio.js +41 -0
- package/lib/esm/store/temporalio.js.map +1 -0
- package/lib/esm/store/worker.js +2 -0
- package/lib/esm/store/worker.js.map +1 -0
- package/lib/esm/store/workflow.js +228 -0
- package/lib/esm/store/workflow.js.map +1 -0
- package/lib/esm/sts-token-types.js +24 -0
- package/lib/esm/sts-token-types.js.map +1 -0
- package/lib/esm/tenant.js +2 -0
- package/lib/esm/tenant.js.map +1 -0
- package/lib/esm/tool-execution.js +5 -0
- package/lib/esm/tool-execution.js.map +1 -0
- package/lib/esm/training.js +11 -0
- package/lib/esm/training.js.map +1 -0
- package/lib/esm/transient-tokens.js +6 -0
- package/lib/esm/transient-tokens.js.map +1 -0
- package/lib/esm/user.js +22 -0
- package/lib/esm/user.js.map +1 -0
- package/lib/esm/utils/auth.js +11 -0
- package/lib/esm/utils/auth.js.map +1 -0
- package/lib/esm/utils/schemas.js +107 -0
- package/lib/esm/utils/schemas.js.map +1 -0
- package/lib/esm/utils/type-helpers.js +2 -0
- package/lib/esm/utils/type-helpers.js.map +1 -0
- package/lib/esm/versions.js +5 -0
- package/lib/esm/versions.js.map +1 -0
- package/lib/esm/workflow-analytics.js +49 -0
- package/lib/esm/workflow-analytics.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/Progress.d.ts +21 -0
- package/lib/types/Progress.d.ts.map +1 -0
- package/lib/types/access-control.d.ts +73 -0
- package/lib/types/access-control.d.ts.map +1 -0
- package/lib/types/analytics.d.ts +87 -0
- package/lib/types/analytics.d.ts.map +1 -0
- package/lib/types/apikey.d.ts +98 -0
- package/lib/types/apikey.d.ts.map +1 -0
- package/lib/types/apps.d.ts +236 -0
- package/lib/types/apps.d.ts.map +1 -0
- package/lib/types/ask-user.d.ts +32 -0
- package/lib/types/ask-user.d.ts.map +1 -0
- package/lib/types/channels.d.ts +21 -0
- package/lib/types/channels.d.ts.map +1 -0
- package/lib/types/common.d.ts +31 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/data-platform.d.ts +860 -0
- package/lib/types/data-platform.d.ts.map +1 -0
- package/lib/types/email.d.ts +66 -0
- package/lib/types/email.d.ts.map +1 -0
- package/lib/types/environment.d.ts +106 -0
- package/lib/types/environment.d.ts.map +1 -0
- package/lib/types/facets.d.ts +34 -0
- package/lib/types/facets.d.ts.map +1 -0
- package/lib/types/group.d.ts +21 -0
- package/lib/types/group.d.ts.map +1 -0
- package/lib/types/index.d.ts +39 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/integrations.d.ts +60 -0
- package/lib/types/integrations.d.ts.map +1 -0
- package/lib/types/interaction.d.ts +958 -0
- package/lib/types/interaction.d.ts.map +1 -0
- package/lib/types/json-schema.d.ts +1 -0
- package/lib/types/json-schema.d.ts.map +1 -0
- package/lib/types/json.d.ts +1 -0
- package/lib/types/json.d.ts.map +1 -0
- package/lib/types/meters.d.ts +23 -0
- package/lib/types/meters.d.ts.map +1 -0
- package/lib/types/model_utility.d.ts +1 -0
- package/lib/types/model_utility.d.ts.map +1 -0
- package/lib/types/payload.d.ts +60 -0
- package/lib/types/payload.d.ts.map +1 -0
- package/lib/types/pending-asks.d.ts +93 -0
- package/lib/types/pending-asks.d.ts.map +1 -0
- package/lib/types/project.d.ts +179 -0
- package/lib/types/project.d.ts.map +1 -0
- package/lib/types/prompt.d.ts +78 -0
- package/lib/types/prompt.d.ts.map +1 -0
- package/lib/types/query.d.ts +118 -0
- package/lib/types/query.d.ts.map +1 -0
- package/lib/types/rate-limiter.d.ts +28 -0
- package/lib/types/rate-limiter.d.ts.map +1 -0
- package/lib/types/refs.d.ts +22 -0
- package/lib/types/refs.d.ts.map +1 -0
- package/lib/types/runs.d.ts +32 -0
- package/lib/types/runs.d.ts.map +1 -0
- package/lib/types/skill.d.ts +78 -0
- package/lib/types/skill.d.ts.map +1 -0
- package/lib/types/store/activity-catalog.d.ts +26 -0
- package/lib/types/store/activity-catalog.d.ts.map +1 -0
- package/lib/types/store/collections.d.ts +78 -0
- package/lib/types/store/collections.d.ts.map +1 -0
- package/lib/types/store/common.d.ts +22 -0
- package/lib/types/store/common.d.ts.map +1 -0
- package/lib/types/store/conversation-state.d.ts +120 -0
- package/lib/types/store/conversation-state.d.ts.map +1 -0
- package/lib/types/store/doc-analyzer.d.ts +140 -0
- package/lib/types/store/doc-analyzer.d.ts.map +1 -0
- package/lib/types/store/dsl-workflow.d.ts +244 -0
- package/lib/types/store/dsl-workflow.d.ts.map +1 -0
- package/lib/types/store/index.d.ts +13 -0
- package/lib/types/store/index.d.ts.map +1 -0
- package/lib/types/store/object-types.d.ts +23 -0
- package/lib/types/store/object-types.d.ts.map +1 -0
- package/lib/types/store/schedule.d.ts +182 -0
- package/lib/types/store/schedule.d.ts.map +1 -0
- package/lib/types/store/signals.d.ts +24 -0
- package/lib/types/store/signals.d.ts.map +1 -0
- package/lib/types/store/store.d.ts +407 -0
- package/lib/types/store/store.d.ts.map +1 -0
- package/lib/types/store/temporalio.d.ts +16 -0
- package/lib/types/store/temporalio.d.ts.map +1 -0
- package/lib/types/store/worker.d.ts +18 -0
- package/lib/types/store/worker.d.ts.map +1 -0
- package/lib/types/store/workflow.d.ts +730 -0
- package/lib/types/store/workflow.d.ts.map +1 -0
- package/lib/types/sts-token-types.d.ts +72 -0
- package/lib/types/sts-token-types.d.ts.map +1 -0
- package/lib/types/tenant.d.ts +10 -0
- package/lib/types/tenant.d.ts.map +1 -0
- package/lib/types/tool-execution.d.ts +45 -0
- package/lib/types/tool-execution.d.ts.map +1 -0
- package/lib/types/training.d.ts +38 -0
- package/lib/types/training.d.ts.map +1 -0
- package/lib/types/transient-tokens.d.ts +24 -0
- package/lib/types/transient-tokens.d.ts.map +1 -0
- package/lib/types/user.d.ts +116 -0
- package/lib/types/user.d.ts.map +1 -0
- package/lib/types/utils/auth.d.ts +3 -0
- package/lib/types/utils/auth.d.ts.map +1 -0
- package/lib/types/utils/schemas.d.ts +9 -0
- package/lib/types/utils/schemas.d.ts.map +1 -0
- package/lib/types/utils/type-helpers.d.ts +3 -0
- package/lib/types/utils/type-helpers.d.ts.map +1 -0
- package/lib/types/versions.d.ts +3 -0
- package/lib/types/versions.d.ts.map +1 -0
- package/lib/types/workflow-analytics.d.ts +777 -0
- package/lib/types/workflow-analytics.d.ts.map +1 -0
- package/lib/vertesia-common.js +2 -0
- package/lib/vertesia-common.js.map +1 -0
- package/package.json +54 -0
- package/src/Progress.ts +57 -0
- package/src/access-control.ts +98 -0
- package/src/analytics.ts +106 -0
- package/src/apikey.ts +116 -0
- package/src/apps.ts +296 -0
- package/src/ask-user.ts +35 -0
- package/src/channels.ts +70 -0
- package/src/common.ts +37 -0
- package/src/data-platform.ts +976 -0
- package/src/email.ts +80 -0
- package/src/environment.ts +137 -0
- package/src/facets.ts +44 -0
- package/src/group.ts +26 -0
- package/src/index.ts +40 -0
- package/src/integrations.ts +72 -0
- package/src/interaction.ts +1182 -0
- package/src/json-schema.ts +7 -0
- package/src/json.ts +4 -0
- package/src/meters.ts +30 -0
- package/src/model_utility.ts +1 -0
- package/src/payload.ts +83 -0
- package/src/pending-asks.ts +106 -0
- package/src/project.ts +263 -0
- package/src/prompt.ts +103 -0
- package/src/query.ts +137 -0
- package/src/rate-limiter.ts +34 -0
- package/src/refs.ts +30 -0
- package/src/runs.ts +36 -0
- package/src/skill.ts +90 -0
- package/src/store/activity-catalog.ts +44 -0
- package/src/store/collections.ts +87 -0
- package/src/store/common.ts +30 -0
- package/src/store/conversation-state.ts +146 -0
- package/src/store/doc-analyzer.ts +161 -0
- package/src/store/dsl-workflow.ts +288 -0
- package/src/store/index.ts +14 -0
- package/src/store/ms.d.ts +11 -0
- package/src/store/object-types.ts +127 -0
- package/src/store/schedule.ts +238 -0
- package/src/store/signals.ts +25 -0
- package/src/store/store.ts +579 -0
- package/src/store/temporalio.ts +54 -0
- package/src/store/worker.ts +19 -0
- package/src/store/workflow.test.ts +578 -0
- package/src/store/workflow.ts +973 -0
- package/src/sts-token-types.ts +117 -0
- package/src/tenant.ts +10 -0
- package/src/tool-execution.ts +47 -0
- package/src/training.ts +44 -0
- package/src/transient-tokens.ts +30 -0
- package/src/user.ts +153 -0
- package/src/utils/auth.ts +12 -0
- package/src/utils/schemas.ts +108 -0
- package/src/utils/type-helpers.ts +6 -0
- package/src/versions.ts +3 -0
- package/src/workflow-analytics.ts +925 -0
- package/tsconfig.dist.json +20 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { UserGroupRef } from "./group.js";
|
|
2
|
+
import { ProjectRef, ProjectRoles } from "./project.js";
|
|
3
|
+
import { AccountRef } from "./user.js";
|
|
4
|
+
export declare enum ApiKeyTypes {
|
|
5
|
+
secret = "sk"
|
|
6
|
+
}
|
|
7
|
+
export interface ApiKey {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
type: ApiKeyTypes;
|
|
11
|
+
role: ProjectRoles;
|
|
12
|
+
maskedValue?: string;
|
|
13
|
+
account: string;
|
|
14
|
+
project: ProjectRef;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
created_by: string;
|
|
17
|
+
updated_by: string;
|
|
18
|
+
created_at: Date;
|
|
19
|
+
updated_at: Date;
|
|
20
|
+
expires_at?: Date;
|
|
21
|
+
}
|
|
22
|
+
export interface CreateOrUpdateApiKeyPayload extends Partial<ApiKey> {
|
|
23
|
+
}
|
|
24
|
+
export interface ApiKeyWithValue extends Omit<ApiKey, "maskedValue"> {
|
|
25
|
+
value: string;
|
|
26
|
+
}
|
|
27
|
+
export interface CreatePublicKeyPayload {
|
|
28
|
+
name?: string;
|
|
29
|
+
projectId?: string;
|
|
30
|
+
ttl?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface AuthTokenResponse {
|
|
33
|
+
token: string;
|
|
34
|
+
}
|
|
35
|
+
export interface AuthTokenPayload {
|
|
36
|
+
sub: string;
|
|
37
|
+
name: string;
|
|
38
|
+
email?: string;
|
|
39
|
+
picture?: string;
|
|
40
|
+
type: PrincipalType;
|
|
41
|
+
account: AccountRef;
|
|
42
|
+
account_roles: ProjectRoles[];
|
|
43
|
+
accounts: AccountRef[];
|
|
44
|
+
project?: ProjectRef;
|
|
45
|
+
project_roles?: ProjectRoles[];
|
|
46
|
+
/**
|
|
47
|
+
* The app names enabled for this token. Defaults to an empty array if no apps are enabled.
|
|
48
|
+
*/
|
|
49
|
+
apps: string[];
|
|
50
|
+
/**
|
|
51
|
+
* The user ID (if any) attached to the token.
|
|
52
|
+
* This is set when the token is a user token or an agent token running as a user.
|
|
53
|
+
* Not set for impersonating tokens like project tokens.
|
|
54
|
+
*/
|
|
55
|
+
user_id?: string;
|
|
56
|
+
/** groups */
|
|
57
|
+
groups?: UserGroupRef[];
|
|
58
|
+
/**
|
|
59
|
+
* API endpoints information to be used with this token.
|
|
60
|
+
* Either a n API domain like 'api.vertesia.io' | 'api-preview.vertesia.io' | 'api-staging.vertesia.io' | 'local'
|
|
61
|
+
* or explicit studio, store, and token URLs.
|
|
62
|
+
*/
|
|
63
|
+
endpoints?: string | {
|
|
64
|
+
studio: string;
|
|
65
|
+
store: string;
|
|
66
|
+
token?: string;
|
|
67
|
+
};
|
|
68
|
+
iss: string;
|
|
69
|
+
aud: string;
|
|
70
|
+
exp: number;
|
|
71
|
+
tags?: string[];
|
|
72
|
+
permissions?: string[];
|
|
73
|
+
scopes?: string[];
|
|
74
|
+
/**
|
|
75
|
+
* Service caller information for agent and service account tokens.
|
|
76
|
+
* Contains audit information about who/what initiated the token request.
|
|
77
|
+
* For agent tokens, includes `onBehalfOf` with the original user's token payload.
|
|
78
|
+
*/
|
|
79
|
+
service_caller?: {
|
|
80
|
+
/** The principal that requested the token (e.g., service account identity) */
|
|
81
|
+
id?: string;
|
|
82
|
+
name?: string;
|
|
83
|
+
email?: string;
|
|
84
|
+
/**
|
|
85
|
+
* For agent tokens: the verified token payload of the user/apikey the agent acts on behalf of.
|
|
86
|
+
* Contains the original user's name, email, picture, user_id, etc.
|
|
87
|
+
*/
|
|
88
|
+
onBehalfOf?: AuthTokenPayload;
|
|
89
|
+
[key: string]: unknown;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export declare enum PrincipalType {
|
|
93
|
+
User = "user",
|
|
94
|
+
Group = "group",
|
|
95
|
+
ApiKey = "apikey",
|
|
96
|
+
ServiceAccount = "service_account",
|
|
97
|
+
Agent = "agent"
|
|
98
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apikey.d.ts","sourceRoot":"","sources":["../../src/apikey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,oBAAY,WAAW;IACnB,MAAM,OAAO;CAChB;AACD,MAAM,WAAW,MAAM;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,UAAU,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,2BAA4B,SAAQ,OAAO,CAAC,MAAM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;IACH,cAAc,CAAC,EAAE;QACb,8EAA8E;QAC9E,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;;WAGG;QACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;QAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KAC1B,CAAC;CACL;AAED,oBAAY,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,cAAc,oBAAoB;IAClC,KAAK,UAAU;CAClB"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { JSONSchema } from "@llumiverse/common";
|
|
2
|
+
export interface AppUIConfig {
|
|
3
|
+
/**
|
|
4
|
+
* The source URL of the app. The src can be a template which contain
|
|
5
|
+
* a variable named `buildId` which will be replaced with the current build id.
|
|
6
|
+
* For example: `/plugins/vertesia-review-center-${buildId}`
|
|
7
|
+
*/
|
|
8
|
+
src: string;
|
|
9
|
+
/**
|
|
10
|
+
* The isolation strategy. If not specified it defaults to shadow
|
|
11
|
+
* - shadow - use Shadow DOM to fully isolate the plugin from the host.
|
|
12
|
+
* - css - use CSS processing (like prefixing or other isolation techniques). Ligther but plugins may conflict with the host
|
|
13
|
+
*/
|
|
14
|
+
isolation?: "shadow" | "css";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Authentication type for tool collections
|
|
18
|
+
*/
|
|
19
|
+
export type ToolCollectionAuthType = "oauth" | "other";
|
|
20
|
+
/**
|
|
21
|
+
* Tool collection type
|
|
22
|
+
*/
|
|
23
|
+
export type ToolCollectionType = "mcp" | "vertesia_sdk";
|
|
24
|
+
/**
|
|
25
|
+
* Base tool collection configuration
|
|
26
|
+
*/
|
|
27
|
+
interface BaseToolCollectionObject {
|
|
28
|
+
/**
|
|
29
|
+
* The URL endpoint for the tool collection
|
|
30
|
+
*/
|
|
31
|
+
url: string;
|
|
32
|
+
/**
|
|
33
|
+
* Optional authentication type required for this tool collection
|
|
34
|
+
*/
|
|
35
|
+
auth?: ToolCollectionAuthType;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* MCP tool collection configuration (requires name, description, and namespace)
|
|
39
|
+
*/
|
|
40
|
+
export interface MCPToolCollectionObject extends BaseToolCollectionObject {
|
|
41
|
+
type: "mcp";
|
|
42
|
+
/**
|
|
43
|
+
* Name for the tool collection.
|
|
44
|
+
* Used as an identifier for the collection (e.g., for OAuth authentication).
|
|
45
|
+
*/
|
|
46
|
+
name: string;
|
|
47
|
+
/**
|
|
48
|
+
* Description for the tool collection.
|
|
49
|
+
* Helps users understand what tools this collection provides.
|
|
50
|
+
*/
|
|
51
|
+
description: string;
|
|
52
|
+
/**
|
|
53
|
+
* Prefix to use for tool names from this collection.
|
|
54
|
+
* Provides clean, readable tool names (e.g., "jira" instead of "https://mcp.atlassian.com/v1/mcp")
|
|
55
|
+
*/
|
|
56
|
+
namespace: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Vertesia SDK tool collection configuration
|
|
60
|
+
*/
|
|
61
|
+
export interface VertesiaSDKToolCollectionObject extends BaseToolCollectionObject {
|
|
62
|
+
type: "vertesia_sdk";
|
|
63
|
+
/**
|
|
64
|
+
* Optional namespace to use for tool names from this collection.
|
|
65
|
+
* If not provided, the tool server default will be used.
|
|
66
|
+
*/
|
|
67
|
+
namespace?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Optional name for the tool collection.
|
|
70
|
+
* If not provided, the tool server default will be used.
|
|
71
|
+
*/
|
|
72
|
+
name?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Optional description for the tool collection.
|
|
75
|
+
* If not provided, the tool server default will be used.
|
|
76
|
+
*/
|
|
77
|
+
description?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Tool collection configuration (object format)
|
|
81
|
+
*/
|
|
82
|
+
export type ToolCollectionObject = MCPToolCollectionObject | VertesiaSDKToolCollectionObject;
|
|
83
|
+
/**
|
|
84
|
+
* Tool collection can be either:
|
|
85
|
+
* - A string URL (legacy format, with "mcp:" prefix for MCP servers)
|
|
86
|
+
* - An object with url, type, and optional auth (new format)
|
|
87
|
+
*/
|
|
88
|
+
export type ToolCollection = string | ToolCollectionObject;
|
|
89
|
+
/**
|
|
90
|
+
* Normalizes a tool collection to the object format.
|
|
91
|
+
* Handles backward compatibility with string URLs.
|
|
92
|
+
*
|
|
93
|
+
* @param collection - String URL or ToolCollectionObject
|
|
94
|
+
* @returns Normalized ToolCollectionObject
|
|
95
|
+
*/
|
|
96
|
+
export declare function normalizeToolCollection(collection: ToolCollection): ToolCollectionObject;
|
|
97
|
+
export interface AppManifestData {
|
|
98
|
+
/**
|
|
99
|
+
* The name of the app, used as the id in the system.
|
|
100
|
+
* Must be in kebab case (e.g. my-app).
|
|
101
|
+
*/
|
|
102
|
+
name: string;
|
|
103
|
+
/**
|
|
104
|
+
* Visibility level of the app:
|
|
105
|
+
* - "public": visible to all accounts
|
|
106
|
+
* - "private": visible only to the owning account
|
|
107
|
+
* - "vertesia": visible only to Vertesia team members (any project)
|
|
108
|
+
*/
|
|
109
|
+
visibility: "public" | "private" | "vertesia";
|
|
110
|
+
title: string;
|
|
111
|
+
description: string;
|
|
112
|
+
publisher: string;
|
|
113
|
+
/**
|
|
114
|
+
* A svg icon for the app.
|
|
115
|
+
*/
|
|
116
|
+
icon?: string;
|
|
117
|
+
/**
|
|
118
|
+
* A color name to be used as the color of the app card (e.g. blue, red, green, etc.)
|
|
119
|
+
* If not specified a random color will be picked.
|
|
120
|
+
*/
|
|
121
|
+
color?: string;
|
|
122
|
+
status: "beta" | "stable" | "deprecated";
|
|
123
|
+
ui?: AppUIConfig;
|
|
124
|
+
/**
|
|
125
|
+
* A list of tool collections endpoints to be used by this app.
|
|
126
|
+
* A tools collection endpoint is an URL which may end with a `?import` query string.
|
|
127
|
+
* If the `?import` query string is used the tool will be imported as a javascript module and not executed through a POST on the collections endpoint.
|
|
128
|
+
*/
|
|
129
|
+
tool_collections?: ToolCollection[];
|
|
130
|
+
/**
|
|
131
|
+
* An URL providing interactions definitions in JSON format.
|
|
132
|
+
* The URL must provide 2 endpoints:
|
|
133
|
+
* 1. GET URL - must return a JSON array with the list of interactions (as AppInteractionRef[])
|
|
134
|
+
* 2. GET URL/{interaction_name} - must return the full interaction definition for the specified interaction.
|
|
135
|
+
*/
|
|
136
|
+
interactions?: string;
|
|
137
|
+
/**
|
|
138
|
+
* A JSON chema for the app installation settings.
|
|
139
|
+
*/
|
|
140
|
+
settings_schema?: JSONSchema;
|
|
141
|
+
}
|
|
142
|
+
export interface AppManifest extends AppManifestData {
|
|
143
|
+
id: string;
|
|
144
|
+
account: string;
|
|
145
|
+
created_at: string;
|
|
146
|
+
updated_at: string;
|
|
147
|
+
}
|
|
148
|
+
export interface AppInstallation {
|
|
149
|
+
id: string;
|
|
150
|
+
project: string;
|
|
151
|
+
manifest: string;
|
|
152
|
+
settings?: Record<string, any>;
|
|
153
|
+
created_at: string;
|
|
154
|
+
updated_at: string;
|
|
155
|
+
}
|
|
156
|
+
export interface AppInstallationWithManifest extends Omit<AppInstallation, 'manifest'> {
|
|
157
|
+
manifest: AppManifest;
|
|
158
|
+
}
|
|
159
|
+
export interface AppInstallationPayload {
|
|
160
|
+
app_id: string;
|
|
161
|
+
settings?: Record<string, any>;
|
|
162
|
+
}
|
|
163
|
+
export type AppInstallationKind = 'ui' | 'tools' | 'all';
|
|
164
|
+
/**
|
|
165
|
+
* A description of the tools provided by an app
|
|
166
|
+
*/
|
|
167
|
+
export interface AppToolCollection {
|
|
168
|
+
/**
|
|
169
|
+
* The collection name
|
|
170
|
+
*/
|
|
171
|
+
name: string;
|
|
172
|
+
/**
|
|
173
|
+
* Optional collection description
|
|
174
|
+
*/
|
|
175
|
+
description?: string;
|
|
176
|
+
/**
|
|
177
|
+
* the tools provided by this collection
|
|
178
|
+
*/
|
|
179
|
+
tools: {
|
|
180
|
+
name: string;
|
|
181
|
+
description?: string;
|
|
182
|
+
}[];
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Information about a tool and its associated app installation.
|
|
186
|
+
* Used to look up which app provides a specific tool.
|
|
187
|
+
*/
|
|
188
|
+
export interface ProjectToolInfo {
|
|
189
|
+
/**
|
|
190
|
+
* The tool name
|
|
191
|
+
*/
|
|
192
|
+
tool_name: string;
|
|
193
|
+
/**
|
|
194
|
+
* Optional tool description
|
|
195
|
+
*/
|
|
196
|
+
tool_description?: string;
|
|
197
|
+
/**
|
|
198
|
+
* The app name that provides this tool
|
|
199
|
+
*/
|
|
200
|
+
app_name: string;
|
|
201
|
+
/**
|
|
202
|
+
* The app installation ID
|
|
203
|
+
*/
|
|
204
|
+
app_install_id: string;
|
|
205
|
+
/**
|
|
206
|
+
* The app installation settings.
|
|
207
|
+
* Only included for agent tokens, not user tokens (security: may contain API keys).
|
|
208
|
+
*/
|
|
209
|
+
settings?: Record<string, any>;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* OAuth authentication status for an MCP tool collection
|
|
213
|
+
*/
|
|
214
|
+
export interface OAuthAuthStatus {
|
|
215
|
+
collection_name: string;
|
|
216
|
+
authenticated: boolean;
|
|
217
|
+
mcp_server_url: string;
|
|
218
|
+
expires_at?: string;
|
|
219
|
+
scope?: string;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Response from OAuth authorization endpoint
|
|
223
|
+
*/
|
|
224
|
+
export interface OAuthAuthorizeResponse {
|
|
225
|
+
authorization_url: string;
|
|
226
|
+
state: string;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Response from OAuth metadata endpoint
|
|
230
|
+
*/
|
|
231
|
+
export interface OAuthMetadataResponse {
|
|
232
|
+
collection_name: string;
|
|
233
|
+
mcp_server_url: string;
|
|
234
|
+
metadata: any;
|
|
235
|
+
}
|
|
236
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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BAAmB,GAAG,IAAI,GAAG,OAAO,GAAG,KAAK,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAClD;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,GAAG,CAAC;CACjB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for ask_user tool UX configuration.
|
|
3
|
+
* These types enable the model to transmit structured UX parameters
|
|
4
|
+
* that render as interactive widgets instead of plain text.
|
|
5
|
+
*/
|
|
6
|
+
/** Option for user selection in ask_user widget */
|
|
7
|
+
export interface AskUserOption {
|
|
8
|
+
/** Unique identifier returned when this option is selected */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Display text for the option */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Optional tooltip/description shown on hover */
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
/** UX configuration for ask_user messages */
|
|
16
|
+
export interface AskUserUxConfig {
|
|
17
|
+
/** Predefined options for the user to select from */
|
|
18
|
+
options?: AskUserOption[];
|
|
19
|
+
/** Visual style variant */
|
|
20
|
+
variant?: 'default' | 'warning' | 'info' | 'success';
|
|
21
|
+
/** Allow selecting multiple options (renders checkboxes instead of buttons) */
|
|
22
|
+
multiSelect?: boolean;
|
|
23
|
+
/** Show text input for free-form response */
|
|
24
|
+
allowFreeResponse?: boolean;
|
|
25
|
+
/** Placeholder text for free-form input */
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Message details structure for REQUEST_INPUT messages with UX config */
|
|
29
|
+
export interface AskUserMessageDetails {
|
|
30
|
+
/** UX configuration for rendering the ask_user widget */
|
|
31
|
+
ux?: AskUserUxConfig;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-user.d.ts","sourceRoot":"","sources":["../../src/ask-user.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,mDAAmD;AACnD,MAAM,WAAW,aAAa;IAC1B,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC5B,qDAAqD;IACrD,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IACrD,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB;IAClC,yDAAyD;IACzD,EAAE,CAAC,EAAE,eAAe,CAAC;CACxB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EmailChannel, UserChannel } from "./interaction.js";
|
|
2
|
+
/**
|
|
3
|
+
* Find the email channel from a list of channels.
|
|
4
|
+
* @returns The email channel if found, undefined otherwise
|
|
5
|
+
*/
|
|
6
|
+
export declare function findEmailChannel(channels?: UserChannel[]): EmailChannel | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Check if email channel is enabled in the channels list.
|
|
9
|
+
*/
|
|
10
|
+
export declare function hasEmailChannel(channels?: UserChannel[]): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Update the email channel in a channels array (immutable).
|
|
13
|
+
* Returns a new array with the updated channel.
|
|
14
|
+
* If no email channel exists and to_email is provided, creates one.
|
|
15
|
+
*/
|
|
16
|
+
export declare function updateEmailChannel(channels: UserChannel[] | undefined, updates: Partial<Omit<EmailChannel, "type">>): UserChannel[];
|
|
17
|
+
/**
|
|
18
|
+
* Update email threading info after sending or receiving an email.
|
|
19
|
+
* Adds the new messageId to references and updates in_reply_to.
|
|
20
|
+
*/
|
|
21
|
+
export declare function updateEmailThreading(channels: UserChannel[] | undefined, messageId: string, subject?: string): UserChannel[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/channels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE7E;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,YAAY,GAAG,SAAS,CAEnF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAC9B,QAAQ,EAAE,WAAW,EAAE,GAAG,SAAS,EACnC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,GAC7C,WAAW,EAAE,CAoBf;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,WAAW,EAAE,GAAG,SAAS,EACnC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACjB,WAAW,EAAE,CAcf"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface FindPayload {
|
|
2
|
+
query: Record<string, any>;
|
|
3
|
+
offset?: number;
|
|
4
|
+
limit?: number;
|
|
5
|
+
select?: string;
|
|
6
|
+
all_revisions?: boolean;
|
|
7
|
+
from_root?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface GenericCommandResponse {
|
|
10
|
+
status: string;
|
|
11
|
+
message: string;
|
|
12
|
+
err?: any;
|
|
13
|
+
details?: any;
|
|
14
|
+
}
|
|
15
|
+
export interface BulkOperationPayload {
|
|
16
|
+
/**
|
|
17
|
+
* The operation name
|
|
18
|
+
*/
|
|
19
|
+
name: "change_type" | "delete" | "start_workflow" | "update";
|
|
20
|
+
/**
|
|
21
|
+
* The IDs of the objects to operate on
|
|
22
|
+
*/
|
|
23
|
+
ids: string[];
|
|
24
|
+
/**
|
|
25
|
+
* The operation parameters.
|
|
26
|
+
*/
|
|
27
|
+
params: Record<string, any>;
|
|
28
|
+
}
|
|
29
|
+
export interface BulkOperationResult {
|
|
30
|
+
status: "in_progress" | "completed" | "failed";
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,IAAI,EAAE,aAAa,GAAG,QAAQ,GAAG,gBAAgB,GAAG,QAAQ,CAAC;IAE7D;;OAEG;IACH,GAAG,EAAE,MAAM,EAAE,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;CAClD"}
|