@opengeni/contracts 0.39.0 → 0.44.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atlassian.d.ts +278 -0
- package/dist/atlassian.js +55 -0
- package/dist/atlassian.js.map +1 -0
- package/dist/chunk-52SGB2QO.js +688 -0
- package/dist/chunk-52SGB2QO.js.map +1 -0
- package/dist/{chunk-7JZMI22I.js → chunk-5UDNP7AO.js} +34 -2
- package/dist/chunk-5UDNP7AO.js.map +1 -0
- package/dist/chunk-BVGIYW7D.js +11 -0
- package/dist/chunk-BVGIYW7D.js.map +1 -0
- package/dist/chunk-CADSX6UN.js +1145 -0
- package/dist/chunk-CADSX6UN.js.map +1 -0
- package/dist/chunk-D2HKF2EF.js +1460 -0
- package/dist/chunk-D2HKF2EF.js.map +1 -0
- package/dist/chunk-FJBG5E4O.js +194 -0
- package/dist/chunk-FJBG5E4O.js.map +1 -0
- package/dist/chunk-H5BVCZKF.js +382 -0
- package/dist/chunk-H5BVCZKF.js.map +1 -0
- package/dist/chunk-LSB7GRLG.js +779 -0
- package/dist/chunk-LSB7GRLG.js.map +1 -0
- package/dist/chunk-MYBZRDTY.js +340 -0
- package/dist/chunk-MYBZRDTY.js.map +1 -0
- package/dist/chunk-RIY7GYQS.js +1204 -0
- package/dist/chunk-RIY7GYQS.js.map +1 -0
- package/dist/chunk-TZ6YEYN4.js +386 -0
- package/dist/chunk-TZ6YEYN4.js.map +1 -0
- package/dist/chunk-VA22KRHS.js +15177 -0
- package/dist/chunk-VA22KRHS.js.map +1 -0
- package/dist/chunk-Y3MLSLB4.js +392 -0
- package/dist/chunk-Y3MLSLB4.js.map +1 -0
- package/dist/chunk-YRKRZ6OF.js +134 -0
- package/dist/chunk-YRKRZ6OF.js.map +1 -0
- package/dist/company-profile.d.ts +629 -0
- package/dist/document-artifact-commands.d.ts +282 -0
- package/dist/document-artifact-commands.js +54 -0
- package/dist/document-artifact-commands.js.map +1 -0
- package/dist/document-artifact-query.d.ts +2 -0
- package/dist/document-artifact-query.js +54 -0
- package/dist/document-artifact-query.js.map +1 -0
- package/dist/editable-artifact-binary.d.ts +56 -0
- package/dist/editable-artifact-causal-frontier.d.ts +12 -0
- package/dist/editable-artifact-causal-frontier.js +18 -0
- package/dist/editable-artifact-causal-frontier.js.map +1 -0
- package/dist/editable-artifact-codec-registry.d.ts +48 -0
- package/dist/editable-artifact-codec-registry.js +20 -0
- package/dist/editable-artifact-codec-registry.js.map +1 -0
- package/dist/editable-artifact-committed-transaction.d.ts +35 -0
- package/dist/editable-artifact-committed-transaction.js +19 -0
- package/dist/editable-artifact-committed-transaction.js.map +1 -0
- package/dist/editable-artifact-live.d.ts +276 -0
- package/dist/editable-artifact-live.js +907 -0
- package/dist/editable-artifact-live.js.map +1 -0
- package/dist/editable-artifact-serialized-commit.d.ts +53 -0
- package/dist/editable-artifact-serialized-commit.js +26 -0
- package/dist/editable-artifact-serialized-commit.js.map +1 -0
- package/dist/editable-artifact-versions.d.ts +6 -0
- package/dist/editable-artifact-versions.js +11 -0
- package/dist/editable-artifact-versions.js.map +1 -0
- package/dist/editable-artifacts.d.ts +46 -0
- package/dist/editable-artifacts.js +236 -0
- package/dist/editable-artifacts.js.map +1 -0
- package/dist/event-preview.d.ts +7 -7
- package/dist/google-drive.d.ts +114 -2
- package/dist/google-drive.js +70 -14
- package/dist/google-drive.js.map +1 -1
- package/dist/image-generation.d.ts +70 -0
- package/dist/index.d.ts +5180 -329
- package/dist/index.js +1173 -40
- package/dist/interaction.d.ts +6895 -0
- package/dist/mcp-receipts.d.ts +96 -0
- package/dist/memory-slack-delivery.d.ts +397 -0
- package/dist/presentation-artifact-commands.d.ts +349 -0
- package/dist/presentation-artifact-commands.js +66 -0
- package/dist/presentation-artifact-commands.js.map +1 -0
- package/dist/presentation-artifact-query.d.ts +2 -0
- package/dist/presentation-artifact-query.js +66 -0
- package/dist/presentation-artifact-query.js.map +1 -0
- package/dist/retained-output.d.ts +83 -6
- package/dist/sandbox-snapshots.d.ts +9 -0
- package/dist/scoped-knowledge.d.ts +14 -13
- package/dist/slack-bot-scopes.d.ts +4 -0
- package/dist/slack-bot-scopes.js +3 -1
- package/dist/spreadsheet-artifact-commands.d.ts +101 -0
- package/dist/spreadsheet-artifact-commands.js +27 -0
- package/dist/spreadsheet-artifact-commands.js.map +1 -0
- package/dist/spreadsheet-artifact-date.d.ts +4 -0
- package/dist/spreadsheet-artifact-query.d.ts +120 -0
- package/dist/spreadsheet-artifact-query.js +48 -0
- package/dist/spreadsheet-artifact-query.js.map +1 -0
- package/dist/tool-catalog.d.ts +576 -0
- package/dist/video-generation.d.ts +532 -0
- package/dist/video-generation.js +51 -0
- package/dist/video-generation.js.map +1 -0
- package/dist/workspace-learning-policy.d.ts +208 -0
- package/package.json +61 -1
- package/src/atlassian.ts +160 -0
- package/src/company-profile.ts +306 -0
- package/src/document-artifact-commands.ts +1709 -0
- package/src/document-artifact-query.ts +2 -0
- package/src/editable-artifact-binary.ts +396 -0
- package/src/editable-artifact-causal-frontier.ts +154 -0
- package/src/editable-artifact-codec-registry.ts +261 -0
- package/src/editable-artifact-committed-transaction.ts +478 -0
- package/src/editable-artifact-live.ts +1379 -0
- package/src/editable-artifact-serialized-commit.ts +494 -0
- package/src/editable-artifact-versions.ts +8 -0
- package/src/editable-artifacts.ts +473 -0
- package/src/event-preview.ts +6 -6
- package/src/google-drive.ts +68 -15
- package/src/image-generation.ts +106 -0
- package/src/index.ts +2535 -282
- package/src/interaction.ts +2292 -0
- package/src/mcp-receipts.ts +281 -0
- package/src/memory-slack-delivery.ts +183 -0
- package/src/presentation-artifact-commands.ts +2035 -0
- package/src/presentation-artifact-query.ts +2 -0
- package/src/retained-output.ts +248 -8
- package/src/sandbox-snapshots.ts +28 -1
- package/src/scoped-knowledge.ts +18 -4
- package/src/slack-bot-scopes.ts +34 -1
- package/src/spreadsheet-artifact-commands.ts +999 -0
- package/src/spreadsheet-artifact-date.ts +21 -0
- package/src/spreadsheet-artifact-query.ts +1411 -0
- package/src/tool-catalog.ts +334 -0
- package/src/video-generation.ts +394 -0
- package/src/workspace-learning-policy.ts +233 -0
- package/dist/chunk-7JZMI22I.js.map +0 -1
- package/dist/chunk-PCTCJEAF.js +0 -10799
- package/dist/chunk-PCTCJEAF.js.map +0 -1
- package/dist/secret-redaction.d.ts +0 -40
- package/src/secret-redaction.ts +0 -364
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const WORKSPACE_LEARNING_POLICY_MAX_SOURCE_OVERRIDES = 256;
|
|
3
|
+
export declare const WORKSPACE_LEARNING_POLICY_SOURCE_KIND_MAX_CHARS = 96;
|
|
4
|
+
export declare const WORKSPACE_LEARNING_POLICY_SOURCE_ID_MAX_CHARS = 1024;
|
|
5
|
+
export declare const WORKSPACE_LEARNING_POLICY_REASON_MAX_CHARS = 4096;
|
|
6
|
+
export declare const WORKSPACE_LEARNING_POLICY_DEFAULT_OFF_REVISION_ID = "workspace-learning-policy:default-off:v1";
|
|
7
|
+
export declare const WorkspaceLearningMode: z.ZodEnum<{
|
|
8
|
+
automatic: "automatic";
|
|
9
|
+
off: "off";
|
|
10
|
+
suggest: "suggest";
|
|
11
|
+
}>;
|
|
12
|
+
export type WorkspaceLearningMode = z.infer<typeof WorkspaceLearningMode>;
|
|
13
|
+
export declare const WorkspaceLearningOverrideMode: z.ZodEnum<{
|
|
14
|
+
automatic: "automatic";
|
|
15
|
+
inherit: "inherit";
|
|
16
|
+
off: "off";
|
|
17
|
+
suggest: "suggest";
|
|
18
|
+
}>;
|
|
19
|
+
export type WorkspaceLearningOverrideMode = z.infer<typeof WorkspaceLearningOverrideMode>;
|
|
20
|
+
export declare function normalizeWorkspaceLearningSourceKind(value: string): string;
|
|
21
|
+
export declare const WorkspaceLearningSourceKind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
22
|
+
export type WorkspaceLearningSourceKind = z.infer<typeof WorkspaceLearningSourceKind>;
|
|
23
|
+
export declare const WorkspaceLearningSourceId: z.ZodString;
|
|
24
|
+
export type WorkspaceLearningSourceId = z.infer<typeof WorkspaceLearningSourceId>;
|
|
25
|
+
export declare const WorkspaceLearningSourceRef: z.ZodObject<{
|
|
26
|
+
kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type WorkspaceLearningSourceRef = z.infer<typeof WorkspaceLearningSourceRef>;
|
|
30
|
+
export declare const WorkspaceLearningSourceOverrideInput: z.ZodObject<{
|
|
31
|
+
kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
mode: z.ZodEnum<{
|
|
34
|
+
automatic: "automatic";
|
|
35
|
+
inherit: "inherit";
|
|
36
|
+
off: "off";
|
|
37
|
+
suggest: "suggest";
|
|
38
|
+
}>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
export type WorkspaceLearningSourceOverrideInput = z.infer<typeof WorkspaceLearningSourceOverrideInput>;
|
|
41
|
+
export declare const WorkspaceLearningSourceOverride: z.ZodObject<{
|
|
42
|
+
kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
mode: z.ZodEnum<{
|
|
45
|
+
automatic: "automatic";
|
|
46
|
+
off: "off";
|
|
47
|
+
suggest: "suggest";
|
|
48
|
+
}>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type WorkspaceLearningSourceOverride = z.infer<typeof WorkspaceLearningSourceOverride>;
|
|
51
|
+
export declare const WorkspaceLearningSourceOverrides: z.ZodArray<z.ZodObject<{
|
|
52
|
+
kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
mode: z.ZodEnum<{
|
|
55
|
+
automatic: "automatic";
|
|
56
|
+
off: "off";
|
|
57
|
+
suggest: "suggest";
|
|
58
|
+
}>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
export type WorkspaceLearningSourceOverrides = z.infer<typeof WorkspaceLearningSourceOverrides>;
|
|
61
|
+
export declare function workspaceLearningSourceKey(source: WorkspaceLearningSourceRef): string;
|
|
62
|
+
/**
|
|
63
|
+
* Canonicalize caller input before hashing or persistence. `inherit` is a
|
|
64
|
+
* request-only reset operation: inherited entries are deliberately absent from
|
|
65
|
+
* immutable revisions so the persisted policy stays sparse and transparent.
|
|
66
|
+
*/
|
|
67
|
+
export declare function canonicalizeWorkspaceLearningSourceOverrides(input: readonly WorkspaceLearningSourceOverrideInput[]): WorkspaceLearningSourceOverride[];
|
|
68
|
+
export declare const WorkspaceLearningPolicyRevisionIdentity: z.ZodObject<{
|
|
69
|
+
id: z.ZodString;
|
|
70
|
+
revision: z.ZodNumber;
|
|
71
|
+
policyHash: z.ZodString;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export type WorkspaceLearningPolicyRevisionIdentity = z.infer<typeof WorkspaceLearningPolicyRevisionIdentity>;
|
|
74
|
+
export declare const WorkspaceLearningPolicyRevision: z.ZodObject<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
revision: z.ZodNumber;
|
|
77
|
+
policyHash: z.ZodString;
|
|
78
|
+
operationId: z.ZodString;
|
|
79
|
+
accountId: z.ZodString;
|
|
80
|
+
workspaceId: z.ZodString;
|
|
81
|
+
workspaceMode: z.ZodEnum<{
|
|
82
|
+
automatic: "automatic";
|
|
83
|
+
off: "off";
|
|
84
|
+
suggest: "suggest";
|
|
85
|
+
}>;
|
|
86
|
+
sourceOverrides: z.ZodArray<z.ZodObject<{
|
|
87
|
+
kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
mode: z.ZodEnum<{
|
|
90
|
+
automatic: "automatic";
|
|
91
|
+
off: "off";
|
|
92
|
+
suggest: "suggest";
|
|
93
|
+
}>;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
supersedesRevisionId: z.ZodNullable<z.ZodString>;
|
|
96
|
+
createdBySubjectId: z.ZodString;
|
|
97
|
+
createdAt: z.ZodString;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
export type WorkspaceLearningPolicyRevision = z.infer<typeof WorkspaceLearningPolicyRevision>;
|
|
100
|
+
export declare const WorkspaceLearningPolicyHead: z.ZodObject<{
|
|
101
|
+
accountId: z.ZodString;
|
|
102
|
+
workspaceId: z.ZodString;
|
|
103
|
+
revisionId: z.ZodString;
|
|
104
|
+
revision: z.ZodNumber;
|
|
105
|
+
policyHash: z.ZodString;
|
|
106
|
+
activationVersion: z.ZodNumber;
|
|
107
|
+
activatedAt: z.ZodString;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
export type WorkspaceLearningPolicyHead = z.infer<typeof WorkspaceLearningPolicyHead>;
|
|
110
|
+
export declare const WorkspaceLearningPolicyActivationType: z.ZodEnum<{
|
|
111
|
+
activate: "activate";
|
|
112
|
+
rollback: "rollback";
|
|
113
|
+
}>;
|
|
114
|
+
export type WorkspaceLearningPolicyActivationType = z.infer<typeof WorkspaceLearningPolicyActivationType>;
|
|
115
|
+
export declare const WorkspaceLearningPolicyActivationEvent: z.ZodObject<{
|
|
116
|
+
id: z.ZodString;
|
|
117
|
+
operationId: z.ZodString;
|
|
118
|
+
accountId: z.ZodString;
|
|
119
|
+
workspaceId: z.ZodString;
|
|
120
|
+
type: z.ZodEnum<{
|
|
121
|
+
activate: "activate";
|
|
122
|
+
rollback: "rollback";
|
|
123
|
+
}>;
|
|
124
|
+
activationVersion: z.ZodNumber;
|
|
125
|
+
oldRevision: z.ZodNullable<z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
revision: z.ZodNumber;
|
|
128
|
+
policyHash: z.ZodString;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
newRevision: z.ZodObject<{
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
revision: z.ZodNumber;
|
|
133
|
+
policyHash: z.ZodString;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
actorSubjectId: z.ZodString;
|
|
136
|
+
reason: z.ZodString;
|
|
137
|
+
createdAt: z.ZodString;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
export type WorkspaceLearningPolicyActivationEvent = z.infer<typeof WorkspaceLearningPolicyActivationEvent>;
|
|
140
|
+
export declare const WorkspaceLearningPolicySnapshot: z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
accountId: z.ZodString;
|
|
143
|
+
workspaceId: z.ZodString;
|
|
144
|
+
sessionId: z.ZodString;
|
|
145
|
+
turnId: z.ZodString;
|
|
146
|
+
attemptId: z.ZodString;
|
|
147
|
+
executionGeneration: z.ZodNumber;
|
|
148
|
+
revision: z.ZodNullable<z.ZodObject<{
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
revision: z.ZodNumber;
|
|
151
|
+
policyHash: z.ZodString;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
activationVersion: z.ZodNumber;
|
|
154
|
+
activatedAt: z.ZodNullable<z.ZodString>;
|
|
155
|
+
workspaceMode: z.ZodEnum<{
|
|
156
|
+
automatic: "automatic";
|
|
157
|
+
off: "off";
|
|
158
|
+
suggest: "suggest";
|
|
159
|
+
}>;
|
|
160
|
+
sourceOverrides: z.ZodArray<z.ZodObject<{
|
|
161
|
+
kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
162
|
+
id: z.ZodString;
|
|
163
|
+
mode: z.ZodEnum<{
|
|
164
|
+
automatic: "automatic";
|
|
165
|
+
off: "off";
|
|
166
|
+
suggest: "suggest";
|
|
167
|
+
}>;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
snapshotHash: z.ZodString;
|
|
170
|
+
createdAt: z.ZodString;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
export type WorkspaceLearningPolicySnapshot = z.infer<typeof WorkspaceLearningPolicySnapshot>;
|
|
173
|
+
export declare const WorkspaceLearningPolicyRouterContext: z.ZodObject<{
|
|
174
|
+
mode: z.ZodEnum<{
|
|
175
|
+
automatic: "automatic";
|
|
176
|
+
off: "off";
|
|
177
|
+
suggest: "suggest";
|
|
178
|
+
}>;
|
|
179
|
+
snapshotId: z.ZodString;
|
|
180
|
+
revisionId: z.ZodString;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
export type WorkspaceLearningPolicyRouterContext = z.infer<typeof WorkspaceLearningPolicyRouterContext>;
|
|
183
|
+
export declare const WorkspaceLearningPolicyEffectiveMode: z.ZodObject<{
|
|
184
|
+
mode: z.ZodEnum<{
|
|
185
|
+
automatic: "automatic";
|
|
186
|
+
off: "off";
|
|
187
|
+
suggest: "suggest";
|
|
188
|
+
}>;
|
|
189
|
+
snapshotId: z.ZodString;
|
|
190
|
+
revisionId: z.ZodString;
|
|
191
|
+
inherited: z.ZodBoolean;
|
|
192
|
+
source: z.ZodObject<{
|
|
193
|
+
kind: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
policyRevision: z.ZodNullable<z.ZodObject<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
revision: z.ZodNumber;
|
|
199
|
+
policyHash: z.ZodString;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
activationVersion: z.ZodNumber;
|
|
202
|
+
snapshotHash: z.ZodString;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
export type WorkspaceLearningPolicyEffectiveMode = z.infer<typeof WorkspaceLearningPolicyEffectiveMode>;
|
|
205
|
+
/** Stable router seam: resolve only from an immutable accepted-attempt snapshot. */
|
|
206
|
+
export declare function resolveWorkspaceLearningPolicyEffectiveMode(snapshot: WorkspaceLearningPolicySnapshot, source: WorkspaceLearningSourceRef): WorkspaceLearningPolicyEffectiveMode;
|
|
207
|
+
/** Exact provider-neutral context consumed by the canonical durable-learning router. */
|
|
208
|
+
export declare function workspaceLearningPolicyRouterContext(effectiveMode: WorkspaceLearningPolicyEffectiveMode): WorkspaceLearningPolicyRouterContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.1",
|
|
4
4
|
"description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -30,9 +30,69 @@
|
|
|
30
30
|
"types": "./dist/google-drive.d.ts",
|
|
31
31
|
"import": "./dist/google-drive.js"
|
|
32
32
|
},
|
|
33
|
+
"./atlassian": {
|
|
34
|
+
"types": "./dist/atlassian.d.ts",
|
|
35
|
+
"import": "./dist/atlassian.js"
|
|
36
|
+
},
|
|
33
37
|
"./connector-destinations": {
|
|
34
38
|
"types": "./dist/connector-destinations.d.ts",
|
|
35
39
|
"import": "./dist/connector-destinations.js"
|
|
40
|
+
},
|
|
41
|
+
"./video-generation": {
|
|
42
|
+
"types": "./dist/video-generation.d.ts",
|
|
43
|
+
"import": "./dist/video-generation.js"
|
|
44
|
+
},
|
|
45
|
+
"./editable-artifacts": {
|
|
46
|
+
"types": "./dist/editable-artifacts.d.ts",
|
|
47
|
+
"import": "./dist/editable-artifacts.js"
|
|
48
|
+
},
|
|
49
|
+
"./editable-artifact-committed-transaction": {
|
|
50
|
+
"types": "./dist/editable-artifact-committed-transaction.d.ts",
|
|
51
|
+
"import": "./dist/editable-artifact-committed-transaction.js"
|
|
52
|
+
},
|
|
53
|
+
"./editable-artifact-serialized-commit": {
|
|
54
|
+
"types": "./dist/editable-artifact-serialized-commit.d.ts",
|
|
55
|
+
"import": "./dist/editable-artifact-serialized-commit.js"
|
|
56
|
+
},
|
|
57
|
+
"./editable-artifact-live": {
|
|
58
|
+
"types": "./dist/editable-artifact-live.d.ts",
|
|
59
|
+
"import": "./dist/editable-artifact-live.js"
|
|
60
|
+
},
|
|
61
|
+
"./editable-artifact-causal-frontier": {
|
|
62
|
+
"types": "./dist/editable-artifact-causal-frontier.d.ts",
|
|
63
|
+
"import": "./dist/editable-artifact-causal-frontier.js"
|
|
64
|
+
},
|
|
65
|
+
"./editable-artifact-codec-registry": {
|
|
66
|
+
"types": "./dist/editable-artifact-codec-registry.d.ts",
|
|
67
|
+
"import": "./dist/editable-artifact-codec-registry.js"
|
|
68
|
+
},
|
|
69
|
+
"./editable-artifact-versions": {
|
|
70
|
+
"types": "./dist/editable-artifact-versions.d.ts",
|
|
71
|
+
"import": "./dist/editable-artifact-versions.js"
|
|
72
|
+
},
|
|
73
|
+
"./spreadsheet-artifact-commands": {
|
|
74
|
+
"types": "./dist/spreadsheet-artifact-commands.d.ts",
|
|
75
|
+
"import": "./dist/spreadsheet-artifact-commands.js"
|
|
76
|
+
},
|
|
77
|
+
"./spreadsheet-artifact-query": {
|
|
78
|
+
"types": "./dist/spreadsheet-artifact-query.d.ts",
|
|
79
|
+
"import": "./dist/spreadsheet-artifact-query.js"
|
|
80
|
+
},
|
|
81
|
+
"./document-artifact-commands": {
|
|
82
|
+
"types": "./dist/document-artifact-commands.d.ts",
|
|
83
|
+
"import": "./dist/document-artifact-commands.js"
|
|
84
|
+
},
|
|
85
|
+
"./document-artifact-query": {
|
|
86
|
+
"types": "./dist/document-artifact-query.d.ts",
|
|
87
|
+
"import": "./dist/document-artifact-query.js"
|
|
88
|
+
},
|
|
89
|
+
"./presentation-artifact-commands": {
|
|
90
|
+
"types": "./dist/presentation-artifact-commands.d.ts",
|
|
91
|
+
"import": "./dist/presentation-artifact-commands.js"
|
|
92
|
+
},
|
|
93
|
+
"./presentation-artifact-query": {
|
|
94
|
+
"types": "./dist/presentation-artifact-query.d.ts",
|
|
95
|
+
"import": "./dist/presentation-artifact-query.js"
|
|
36
96
|
}
|
|
37
97
|
},
|
|
38
98
|
"publishConfig": {
|
package/src/atlassian.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ConnectionMetadata } from "./index";
|
|
3
|
+
import { ConnectorDocumentDestination } from "./connector-destinations";
|
|
4
|
+
|
|
5
|
+
export const ATLASSIAN_PROVIDER_DOMAIN = "api.atlassian.com" as const;
|
|
6
|
+
export const ATLASSIAN_CREDENTIAL_ROLE = "atlassian_knowledge" as const;
|
|
7
|
+
export const ATLASSIAN_CREDENTIAL_LABEL = "Atlassian read-only knowledge sync" as const;
|
|
8
|
+
|
|
9
|
+
export const ATLASSIAN_REQUIRED_SCOPES = [
|
|
10
|
+
"offline_access",
|
|
11
|
+
"read:me",
|
|
12
|
+
"read:jira-work",
|
|
13
|
+
"read:jira-user",
|
|
14
|
+
"read:confluence-content.all",
|
|
15
|
+
"read:confluence-space.summary",
|
|
16
|
+
"search:confluence",
|
|
17
|
+
"read:space:confluence",
|
|
18
|
+
"read:page:confluence",
|
|
19
|
+
"read:comment:confluence",
|
|
20
|
+
] as const;
|
|
21
|
+
|
|
22
|
+
export const AtlassianSourceKind = z.enum(["jira_project", "confluence_space"]);
|
|
23
|
+
export type AtlassianSourceKind = z.infer<typeof AtlassianSourceKind>;
|
|
24
|
+
|
|
25
|
+
export const AtlassianSyncCadence = z.enum(["manual", "hourly", "daily"]);
|
|
26
|
+
export type AtlassianSyncCadence = z.infer<typeof AtlassianSyncCadence>;
|
|
27
|
+
|
|
28
|
+
export const AtlassianReadPolicy = z.enum(["allow", "ask", "block"]);
|
|
29
|
+
export type AtlassianReadPolicy = z.infer<typeof AtlassianReadPolicy>;
|
|
30
|
+
|
|
31
|
+
export const AtlassianConnectionLifecycle = z.object({
|
|
32
|
+
state: z.enum([
|
|
33
|
+
"active",
|
|
34
|
+
"paused",
|
|
35
|
+
"token_revoked",
|
|
36
|
+
"app_removed",
|
|
37
|
+
"disconnected",
|
|
38
|
+
"reconnect_required",
|
|
39
|
+
"reconsent_required",
|
|
40
|
+
]),
|
|
41
|
+
recoverable: z.boolean(),
|
|
42
|
+
observedAt: z.string().datetime(),
|
|
43
|
+
});
|
|
44
|
+
export type AtlassianConnectionLifecycle = z.infer<typeof AtlassianConnectionLifecycle>;
|
|
45
|
+
|
|
46
|
+
export const AtlassianSelectedSource = z.object({
|
|
47
|
+
id: z.string().min(1).max(300),
|
|
48
|
+
cloudId: z.string().min(1).max(256),
|
|
49
|
+
siteName: z.string().min(1).max(512),
|
|
50
|
+
siteUrl: z.string().url(),
|
|
51
|
+
resourceId: z.string().min(1).max(256),
|
|
52
|
+
key: z.string().min(1).max(128),
|
|
53
|
+
name: z.string().min(1).max(512),
|
|
54
|
+
kind: AtlassianSourceKind,
|
|
55
|
+
destination: ConnectorDocumentDestination.optional(),
|
|
56
|
+
syncCadence: AtlassianSyncCadence,
|
|
57
|
+
syncEnabled: z.boolean(),
|
|
58
|
+
configGeneration: z.number().int().positive(),
|
|
59
|
+
readPolicy: AtlassianReadPolicy,
|
|
60
|
+
selectedAt: z.string().datetime(),
|
|
61
|
+
});
|
|
62
|
+
export type AtlassianSelectedSource = z.infer<typeof AtlassianSelectedSource>;
|
|
63
|
+
|
|
64
|
+
export const AtlassianConnectionMetadata = z.object({
|
|
65
|
+
credentialRole: z.literal(ATLASSIAN_CREDENTIAL_ROLE),
|
|
66
|
+
credentialLabel: z.literal(ATLASSIAN_CREDENTIAL_LABEL),
|
|
67
|
+
atlassianAccountId: z.string().min(1).max(256),
|
|
68
|
+
displayName: z.string().min(1).max(512),
|
|
69
|
+
email: z.string().email().nullable().optional(),
|
|
70
|
+
sites: z
|
|
71
|
+
.array(
|
|
72
|
+
z.object({
|
|
73
|
+
cloudId: z.string().min(1).max(256),
|
|
74
|
+
name: z.string().min(1).max(512),
|
|
75
|
+
url: z.string().url(),
|
|
76
|
+
products: z.array(z.enum(["jira", "confluence"])).max(2),
|
|
77
|
+
}),
|
|
78
|
+
)
|
|
79
|
+
.min(1)
|
|
80
|
+
.max(50),
|
|
81
|
+
verifiedAt: z.string().datetime(),
|
|
82
|
+
accessMode: z.literal("readonly"),
|
|
83
|
+
lifecycle: AtlassianConnectionLifecycle.optional(),
|
|
84
|
+
documentDestination: ConnectorDocumentDestination.optional(),
|
|
85
|
+
selectedSources: z.array(AtlassianSelectedSource).max(100).default([]),
|
|
86
|
+
});
|
|
87
|
+
export type AtlassianConnectionMetadata = z.infer<typeof AtlassianConnectionMetadata>;
|
|
88
|
+
|
|
89
|
+
export const AtlassianOAuthStartRequest = z.object({
|
|
90
|
+
connectionId: z.string().uuid().optional(),
|
|
91
|
+
});
|
|
92
|
+
export type AtlassianOAuthStartRequest = z.infer<typeof AtlassianOAuthStartRequest>;
|
|
93
|
+
|
|
94
|
+
export const AtlassianOAuthStartResponse = z.object({
|
|
95
|
+
authorizationUrl: z.string().url(),
|
|
96
|
+
expiresAt: z.string().datetime(),
|
|
97
|
+
});
|
|
98
|
+
export type AtlassianOAuthStartResponse = z.infer<typeof AtlassianOAuthStartResponse>;
|
|
99
|
+
|
|
100
|
+
export const AtlassianBrowseItem = z.object({
|
|
101
|
+
id: z.string().min(1).max(300),
|
|
102
|
+
cloudId: z.string().min(1).max(256),
|
|
103
|
+
siteName: z.string().min(1).max(512),
|
|
104
|
+
siteUrl: z.string().url(),
|
|
105
|
+
resourceId: z.string().min(1).max(256),
|
|
106
|
+
key: z.string().min(1).max(128),
|
|
107
|
+
name: z.string().min(1).max(512),
|
|
108
|
+
kind: AtlassianSourceKind,
|
|
109
|
+
description: z.string().max(2_000).nullable(),
|
|
110
|
+
webUrl: z.string().url(),
|
|
111
|
+
});
|
|
112
|
+
export type AtlassianBrowseItem = z.infer<typeof AtlassianBrowseItem>;
|
|
113
|
+
|
|
114
|
+
export const AtlassianBrowseResponse = z.object({
|
|
115
|
+
connection: z.lazy(() => ConnectionMetadata),
|
|
116
|
+
items: z.array(AtlassianBrowseItem).max(200),
|
|
117
|
+
});
|
|
118
|
+
export type AtlassianBrowseResponse = z.infer<typeof AtlassianBrowseResponse>;
|
|
119
|
+
|
|
120
|
+
export const SaveAtlassianSourcesRequest = z.object({
|
|
121
|
+
sources: z
|
|
122
|
+
.array(
|
|
123
|
+
AtlassianBrowseItem.pick({
|
|
124
|
+
id: true,
|
|
125
|
+
cloudId: true,
|
|
126
|
+
siteName: true,
|
|
127
|
+
siteUrl: true,
|
|
128
|
+
resourceId: true,
|
|
129
|
+
key: true,
|
|
130
|
+
name: true,
|
|
131
|
+
kind: true,
|
|
132
|
+
}),
|
|
133
|
+
)
|
|
134
|
+
.max(100),
|
|
135
|
+
destination: z.object({
|
|
136
|
+
authorityKind: z.enum(["organization", "workspace", "personal"]),
|
|
137
|
+
collectionId: z.string().uuid().nullable().default(null),
|
|
138
|
+
}),
|
|
139
|
+
syncCadence: AtlassianSyncCadence,
|
|
140
|
+
syncEnabled: z.boolean(),
|
|
141
|
+
readPolicy: AtlassianReadPolicy.default("allow"),
|
|
142
|
+
});
|
|
143
|
+
export type SaveAtlassianSourcesRequest = z.infer<typeof SaveAtlassianSourcesRequest>;
|
|
144
|
+
|
|
145
|
+
export const AtlassianLifecycleActionRequest = z.object({
|
|
146
|
+
action: z.enum(["pause", "resume"]),
|
|
147
|
+
expectedVersion: z.number().int().positive(),
|
|
148
|
+
});
|
|
149
|
+
export type AtlassianLifecycleActionRequest = z.infer<typeof AtlassianLifecycleActionRequest>;
|
|
150
|
+
|
|
151
|
+
export const AtlassianDisconnectRequest = z.object({
|
|
152
|
+
expectedVersion: z.number().int().positive(),
|
|
153
|
+
idempotencyKey: z.string().uuid(),
|
|
154
|
+
});
|
|
155
|
+
export type AtlassianDisconnectRequest = z.infer<typeof AtlassianDisconnectRequest>;
|
|
156
|
+
|
|
157
|
+
export function atlassianScopesAllowRead(scopes: readonly string[]): boolean {
|
|
158
|
+
const granted = new Set(scopes);
|
|
159
|
+
return ATLASSIAN_REQUIRED_SCOPES.every((scope) => granted.has(scope));
|
|
160
|
+
}
|