@opengeni/contracts 0.44.1 → 1.0.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.js +10 -8
- package/dist/canonical-human-identities.d.ts +157 -0
- package/dist/canonical-human-identities.js +23 -0
- package/dist/canonical-human-identities.js.map +1 -0
- package/dist/chunk-CM6BMECR.js +24 -0
- package/dist/chunk-CM6BMECR.js.map +1 -0
- package/dist/{chunk-FJBG5E4O.js → chunk-JBCIY7QD.js} +12 -12
- package/dist/chunk-JUFK3T4Q.js +80 -0
- package/dist/chunk-JUFK3T4Q.js.map +1 -0
- package/dist/{chunk-H5BVCZKF.js → chunk-LW7OH6CS.js} +2 -2
- package/dist/{chunk-52SGB2QO.js → chunk-M5ZGRVIQ.js} +37 -6
- package/dist/chunk-M5ZGRVIQ.js.map +1 -0
- package/dist/{chunk-VA22KRHS.js → chunk-NX5JNF4L.js} +6533 -4923
- package/dist/chunk-NX5JNF4L.js.map +1 -0
- package/dist/codex-provider-account-authority.d.ts +23 -0
- package/dist/codex-provider-account-authority.js +23 -0
- package/dist/codex-provider-account-authority.js.map +1 -0
- package/dist/editable-artifact-codec-registry.js +5 -5
- package/dist/editable-artifact-live.js +3 -3
- package/dist/editable-artifact-serialized-commit.js +4 -4
- package/dist/editable-artifacts.js +27 -27
- package/dist/google-drive.d.ts +88 -1
- package/dist/google-drive.js +75 -13
- package/dist/google-drive.js.map +1 -1
- package/dist/index.d.ts +1385 -122
- package/dist/index.js +406 -80
- package/dist/interaction.d.ts +1415 -20
- package/dist/knowledge.d.ts +616 -0
- package/dist/slack-task-policy.d.ts +294 -0
- package/dist/task-notes.d.ts +128 -0
- package/dist/video-generation.d.ts +48 -0
- package/dist/video-generation.js +9 -1
- package/dist/xai-provider-account-authority.d.ts +23 -0
- package/dist/xai-provider-account-authority.js +9 -0
- package/dist/xai-provider-account-authority.js.map +1 -0
- package/package.json +13 -1
- package/src/artifacts.ts +1 -1
- package/src/canonical-human-identities.ts +93 -0
- package/src/codex-provider-account-authority.ts +37 -0
- package/src/google-drive.ts +76 -4
- package/src/index.ts +921 -270
- package/src/interaction.ts +886 -5
- package/src/knowledge.ts +222 -0
- package/src/slack-task-policy.ts +215 -0
- package/src/task-notes.ts +92 -0
- package/src/video-generation.ts +43 -6
- package/src/xai-provider-account-authority.ts +37 -0
- package/dist/chunk-52SGB2QO.js.map +0 -1
- package/dist/chunk-VA22KRHS.js.map +0 -1
- /package/dist/{chunk-FJBG5E4O.js.map → chunk-JBCIY7QD.js.map} +0 -0
- /package/dist/{chunk-H5BVCZKF.js.map → chunk-LW7OH6CS.js.map} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Opaque authority frozen at a Codex provider-account acceptance boundary.
|
|
4
|
+
*
|
|
5
|
+
* The snapshot deliberately carries no organization, membership, credential,
|
|
6
|
+
* provider-account, subject, label, quota, token, or plan identity. A later
|
|
7
|
+
* activation slice may use the user generation only together with separately
|
|
8
|
+
* authorized durable state; this value is never sufficient authority alone.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CodexProviderAccountAuthoritySnapshotV1: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
11
|
+
version: z.ZodLiteral<1>;
|
|
12
|
+
scope: z.ZodLiteral<"workspace">;
|
|
13
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
14
|
+
version: z.ZodLiteral<1>;
|
|
15
|
+
scope: z.ZodLiteral<"user">;
|
|
16
|
+
authorityGeneration: z.ZodNumber;
|
|
17
|
+
}, z.core.$strict>], "scope">;
|
|
18
|
+
export type CodexProviderAccountAuthoritySnapshotV1 = z.infer<typeof CodexProviderAccountAuthoritySnapshotV1>;
|
|
19
|
+
/** Explicit compatibility value for all pre-foundation accepted work. */
|
|
20
|
+
export declare const LEGACY_WORKSPACE_CODEX_PROVIDER_ACCOUNT_AUTHORITY_SNAPSHOT_V1: {
|
|
21
|
+
readonly version: 1;
|
|
22
|
+
readonly scope: "workspace";
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/codex-provider-account-authority.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var PositiveSafeInteger = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);
|
|
4
|
+
var CodexProviderAccountAuthoritySnapshotV1 = z.discriminatedUnion("scope", [
|
|
5
|
+
z.object({
|
|
6
|
+
version: z.literal(1),
|
|
7
|
+
scope: z.literal("workspace")
|
|
8
|
+
}).strict(),
|
|
9
|
+
z.object({
|
|
10
|
+
version: z.literal(1),
|
|
11
|
+
scope: z.literal("user"),
|
|
12
|
+
authorityGeneration: PositiveSafeInteger
|
|
13
|
+
}).strict()
|
|
14
|
+
]);
|
|
15
|
+
var LEGACY_WORKSPACE_CODEX_PROVIDER_ACCOUNT_AUTHORITY_SNAPSHOT_V1 = {
|
|
16
|
+
version: 1,
|
|
17
|
+
scope: "workspace"
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
CodexProviderAccountAuthoritySnapshotV1,
|
|
21
|
+
LEGACY_WORKSPACE_CODEX_PROVIDER_ACCOUNT_AUTHORITY_SNAPSHOT_V1
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=codex-provider-account-authority.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/codex-provider-account-authority.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst PositiveSafeInteger = z.number().int().positive().max(Number.MAX_SAFE_INTEGER);\n\n/**\n * Opaque authority frozen at a Codex provider-account acceptance boundary.\n *\n * The snapshot deliberately carries no organization, membership, credential,\n * provider-account, subject, label, quota, token, or plan identity. A later\n * activation slice may use the user generation only together with separately\n * authorized durable state; this value is never sufficient authority alone.\n */\nexport const CodexProviderAccountAuthoritySnapshotV1 = z.discriminatedUnion(\"scope\", [\n z\n .object({\n version: z.literal(1),\n scope: z.literal(\"workspace\"),\n })\n .strict(),\n z\n .object({\n version: z.literal(1),\n scope: z.literal(\"user\"),\n authorityGeneration: PositiveSafeInteger,\n })\n .strict(),\n]);\n\nexport type CodexProviderAccountAuthoritySnapshotV1 = z.infer<\n typeof CodexProviderAccountAuthoritySnapshotV1\n>;\n\n/** Explicit compatibility value for all pre-foundation accepted work. */\nexport const LEGACY_WORKSPACE_CODEX_PROVIDER_ACCOUNT_AUTHORITY_SNAPSHOT_V1 = {\n version: 1,\n scope: \"workspace\",\n} as const satisfies CodexProviderAccountAuthoritySnapshotV1;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,IAAM,sBAAsB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,OAAO,gBAAgB;AAU5E,IAAM,0CAA0C,EAAE,mBAAmB,SAAS;AAAA,EACnF,EACG,OAAO;AAAA,IACN,SAAS,EAAE,QAAQ,CAAC;AAAA,IACpB,OAAO,EAAE,QAAQ,WAAW;AAAA,EAC9B,CAAC,EACA,OAAO;AAAA,EACV,EACG,OAAO;AAAA,IACN,SAAS,EAAE,QAAQ,CAAC;AAAA,IACpB,OAAO,EAAE,QAAQ,MAAM;AAAA,IACvB,qBAAqB;AAAA,EACvB,CAAC,EACA,OAAO;AACZ,CAAC;AAOM,IAAM,gEAAgE;AAAA,EAC3E,SAAS;AAAA,EACT,OAAO;AACT;","names":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EDITABLE_ARTIFACT_CODEC_REGISTRY,
|
|
3
3
|
editableArtifactCodecFor
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-CADSX6UN.js";
|
|
4
|
+
} from "./chunk-JBCIY7QD.js";
|
|
6
5
|
import "./chunk-RIY7GYQS.js";
|
|
6
|
+
import "./chunk-CADSX6UN.js";
|
|
7
|
+
import "./chunk-D2HKF2EF.js";
|
|
8
|
+
import "./chunk-MYBZRDTY.js";
|
|
9
|
+
import "./chunk-LSB7GRLG.js";
|
|
7
10
|
import {
|
|
8
11
|
EDITABLE_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
9
12
|
EDITABLE_ARTIFACT_SNAPSHOT_VERSION
|
|
10
13
|
} from "./chunk-BVGIYW7D.js";
|
|
11
|
-
import "./chunk-D2HKF2EF.js";
|
|
12
|
-
import "./chunk-MYBZRDTY.js";
|
|
13
|
-
import "./chunk-LSB7GRLG.js";
|
|
14
14
|
export {
|
|
15
15
|
EDITABLE_ARTIFACT_CODEC_REGISTRY,
|
|
16
16
|
EDITABLE_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
hashEditableArtifactMutationIntentBytes
|
|
4
4
|
} from "./chunk-TZ6YEYN4.js";
|
|
5
5
|
import "./chunk-YRKRZ6OF.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-CADSX6UN.js";
|
|
6
|
+
import "./chunk-JBCIY7QD.js";
|
|
8
7
|
import "./chunk-RIY7GYQS.js";
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-CADSX6UN.js";
|
|
10
9
|
import "./chunk-D2HKF2EF.js";
|
|
11
10
|
import "./chunk-MYBZRDTY.js";
|
|
12
11
|
import "./chunk-LSB7GRLG.js";
|
|
12
|
+
import "./chunk-BVGIYW7D.js";
|
|
13
13
|
|
|
14
14
|
// src/editable-artifact-live.ts
|
|
15
15
|
var MAGIC = new TextEncoder().encode("OGALV001");
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
assertCanonicalEditableArtifactSerializedCommit,
|
|
6
6
|
decodeEditableArtifactSerializedCommit,
|
|
7
7
|
encodeEditableArtifactSerializedCommit
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LW7OH6CS.js";
|
|
9
9
|
import "./chunk-TZ6YEYN4.js";
|
|
10
10
|
import "./chunk-YRKRZ6OF.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-CADSX6UN.js";
|
|
11
|
+
import "./chunk-JBCIY7QD.js";
|
|
13
12
|
import "./chunk-RIY7GYQS.js";
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-CADSX6UN.js";
|
|
15
14
|
import "./chunk-D2HKF2EF.js";
|
|
16
15
|
import "./chunk-MYBZRDTY.js";
|
|
17
16
|
import "./chunk-LSB7GRLG.js";
|
|
17
|
+
import "./chunk-BVGIYW7D.js";
|
|
18
18
|
export {
|
|
19
19
|
EDITABLE_ARTIFACT_NATIVE_RECEIPT_MAX_BYTES,
|
|
20
20
|
EDITABLE_ARTIFACT_SERIALIZED_COMMIT_MAX_BYTES,
|
|
@@ -23,30 +23,7 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
EDITABLE_ARTIFACT_CODEC_REGISTRY,
|
|
25
25
|
editableArtifactCodecFor
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import {
|
|
28
|
-
SPREADSHEET_ARTIFACT_METADATA_MAX_SHEETS,
|
|
29
|
-
SPREADSHEET_ARTIFACT_METADATA_MIN_RESPONSE_BYTES,
|
|
30
|
-
SPREADSHEET_ARTIFACT_PROJECTION_MAX_BYTES,
|
|
31
|
-
SPREADSHEET_ARTIFACT_PROJECTION_MAX_STRING_BYTES,
|
|
32
|
-
SPREADSHEET_ARTIFACT_QUERY_MAX_BYTES,
|
|
33
|
-
SPREADSHEET_ARTIFACT_QUERY_VERSION,
|
|
34
|
-
SPREADSHEET_ARTIFACT_VIEWPORT_MAX_AREA,
|
|
35
|
-
SPREADSHEET_ARTIFACT_VIEWPORT_MAX_CELLS,
|
|
36
|
-
SPREADSHEET_ARTIFACT_VIEWPORT_MIN_RESPONSE_BYTES,
|
|
37
|
-
assertCanonicalSpreadsheetArtifactKernelProjectionBytes,
|
|
38
|
-
assertCanonicalSpreadsheetArtifactKernelQueryBytes,
|
|
39
|
-
decodeSpreadsheetArtifactKernelProjection,
|
|
40
|
-
decodeSpreadsheetArtifactKernelQuery,
|
|
41
|
-
decodeSpreadsheetMetadataKernelProjection,
|
|
42
|
-
decodeSpreadsheetViewportKernelProjection,
|
|
43
|
-
encodeSpreadsheetArtifactKernelProjection,
|
|
44
|
-
encodeSpreadsheetArtifactKernelQuery,
|
|
45
|
-
encodeSpreadsheetMetadataKernelProjection,
|
|
46
|
-
encodeSpreadsheetMetadataKernelQuery,
|
|
47
|
-
encodeSpreadsheetViewportKernelProjection,
|
|
48
|
-
encodeSpreadsheetViewportKernelQuery
|
|
49
|
-
} from "./chunk-CADSX6UN.js";
|
|
26
|
+
} from "./chunk-JBCIY7QD.js";
|
|
50
27
|
import {
|
|
51
28
|
DOCUMENT_ARTIFACT_COMMAND_MAX_BYTES,
|
|
52
29
|
DOCUMENT_ARTIFACT_COMMAND_MAX_COMMANDS,
|
|
@@ -74,9 +51,28 @@ import {
|
|
|
74
51
|
encodeDocumentArtifactQueryResponse
|
|
75
52
|
} from "./chunk-RIY7GYQS.js";
|
|
76
53
|
import {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
54
|
+
SPREADSHEET_ARTIFACT_METADATA_MAX_SHEETS,
|
|
55
|
+
SPREADSHEET_ARTIFACT_METADATA_MIN_RESPONSE_BYTES,
|
|
56
|
+
SPREADSHEET_ARTIFACT_PROJECTION_MAX_BYTES,
|
|
57
|
+
SPREADSHEET_ARTIFACT_PROJECTION_MAX_STRING_BYTES,
|
|
58
|
+
SPREADSHEET_ARTIFACT_QUERY_MAX_BYTES,
|
|
59
|
+
SPREADSHEET_ARTIFACT_QUERY_VERSION,
|
|
60
|
+
SPREADSHEET_ARTIFACT_VIEWPORT_MAX_AREA,
|
|
61
|
+
SPREADSHEET_ARTIFACT_VIEWPORT_MAX_CELLS,
|
|
62
|
+
SPREADSHEET_ARTIFACT_VIEWPORT_MIN_RESPONSE_BYTES,
|
|
63
|
+
assertCanonicalSpreadsheetArtifactKernelProjectionBytes,
|
|
64
|
+
assertCanonicalSpreadsheetArtifactKernelQueryBytes,
|
|
65
|
+
decodeSpreadsheetArtifactKernelProjection,
|
|
66
|
+
decodeSpreadsheetArtifactKernelQuery,
|
|
67
|
+
decodeSpreadsheetMetadataKernelProjection,
|
|
68
|
+
decodeSpreadsheetViewportKernelProjection,
|
|
69
|
+
encodeSpreadsheetArtifactKernelProjection,
|
|
70
|
+
encodeSpreadsheetArtifactKernelQuery,
|
|
71
|
+
encodeSpreadsheetMetadataKernelProjection,
|
|
72
|
+
encodeSpreadsheetMetadataKernelQuery,
|
|
73
|
+
encodeSpreadsheetViewportKernelProjection,
|
|
74
|
+
encodeSpreadsheetViewportKernelQuery
|
|
75
|
+
} from "./chunk-CADSX6UN.js";
|
|
80
76
|
import {
|
|
81
77
|
PRESENTATION_ARTIFACT_COMMAND_MAX_BYTES,
|
|
82
78
|
PRESENTATION_ARTIFACT_COMMAND_MAX_COMMANDS,
|
|
@@ -123,6 +119,10 @@ import {
|
|
|
123
119
|
encodeSpreadsheetArtifactCommandBatch,
|
|
124
120
|
spreadsheetSheetId
|
|
125
121
|
} from "./chunk-LSB7GRLG.js";
|
|
122
|
+
import {
|
|
123
|
+
EDITABLE_ARTIFACT_MODEL_SCHEMA_VERSION,
|
|
124
|
+
EDITABLE_ARTIFACT_SNAPSHOT_VERSION
|
|
125
|
+
} from "./chunk-BVGIYW7D.js";
|
|
126
126
|
export {
|
|
127
127
|
DOCUMENT_ARTIFACT_COMMAND_MAX_BYTES,
|
|
128
128
|
DOCUMENT_ARTIFACT_COMMAND_MAX_COMMANDS,
|
package/dist/google-drive.d.ts
CHANGED
|
@@ -8,15 +8,19 @@ export declare const GOOGLE_DRIVE_READONLY_SCOPE: "https://www.googleapis.com/au
|
|
|
8
8
|
export declare const GOOGLE_DRIVE_CREDENTIAL_ROLE: "google_drive_metadata";
|
|
9
9
|
export declare const GOOGLE_DRIVE_CREDENTIAL_LABEL: "Google Drive read-only source sync";
|
|
10
10
|
export declare const GOOGLE_DRIVE_LEGACY_CREDENTIAL_LABEL: "Google Drive metadata browser";
|
|
11
|
+
export declare const GOOGLE_DRIVE_PUBLICATION_SERVER_ID: "google-drive-publishing";
|
|
12
|
+
export declare const GOOGLE_DRIVE_PUBLICATION_TOOL_NAME: "google_drive_publish_file";
|
|
13
|
+
export declare const GOOGLE_DRIVE_PUBLICATION_CREATE_ACTION: "create";
|
|
11
14
|
export declare const GoogleDriveOAuthCapability: z.ZodEnum<{
|
|
12
15
|
picker_file_read: "picker_file_read";
|
|
16
|
+
publish_file: "publish_file";
|
|
13
17
|
recursive_source_sync: "recursive_source_sync";
|
|
14
18
|
source_content_read: "source_content_read";
|
|
15
19
|
source_metadata_discovery: "source_metadata_discovery";
|
|
16
20
|
}>;
|
|
17
21
|
export type GoogleDriveOAuthCapability = z.infer<typeof GoogleDriveOAuthCapability>;
|
|
18
22
|
export type GoogleDriveOAuthScopeDecision = {
|
|
19
|
-
accessMode: "metadata_readonly" | "readonly" | null;
|
|
23
|
+
accessMode: "file_only" | "metadata_readonly" | "readonly" | null;
|
|
20
24
|
capabilities: GoogleDriveOAuthCapability[];
|
|
21
25
|
};
|
|
22
26
|
/**
|
|
@@ -122,6 +126,17 @@ export declare const GoogleDriveSelectedSource: z.ZodObject<{
|
|
|
122
126
|
selectedAt: z.ZodString;
|
|
123
127
|
}, z.core.$strip>;
|
|
124
128
|
export type GoogleDriveSelectedSource = z.infer<typeof GoogleDriveSelectedSource>;
|
|
129
|
+
export declare const GoogleDriveOutputDestination: z.ZodObject<{
|
|
130
|
+
folderId: z.ZodString;
|
|
131
|
+
folderName: z.ZodString;
|
|
132
|
+
driveId: z.ZodNullable<z.ZodString>;
|
|
133
|
+
location: z.ZodEnum<{
|
|
134
|
+
my_drive: "my_drive";
|
|
135
|
+
shared_drive: "shared_drive";
|
|
136
|
+
}>;
|
|
137
|
+
selectedAt: z.ZodString;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
export type GoogleDriveOutputDestination = z.infer<typeof GoogleDriveOutputDestination>;
|
|
125
140
|
export declare const GoogleDriveConnectionMetadata: z.ZodObject<{
|
|
126
141
|
credentialRole: z.ZodLiteral<"google_drive_metadata">;
|
|
127
142
|
credentialLabel: z.ZodUnion<readonly [z.ZodLiteral<"Google Drive read-only source sync">, z.ZodLiteral<"Google Drive metadata browser">]>;
|
|
@@ -130,6 +145,7 @@ export declare const GoogleDriveConnectionMetadata: z.ZodObject<{
|
|
|
130
145
|
googleDisplayName: z.ZodNullable<z.ZodString>;
|
|
131
146
|
verifiedAt: z.ZodString;
|
|
132
147
|
accessMode: z.ZodEnum<{
|
|
148
|
+
file_only: "file_only";
|
|
133
149
|
metadata_readonly: "metadata_readonly";
|
|
134
150
|
readonly: "readonly";
|
|
135
151
|
}>;
|
|
@@ -162,6 +178,16 @@ export declare const GoogleDriveConnectionMetadata: z.ZodObject<{
|
|
|
162
178
|
recoverable: z.ZodLiteral<true>;
|
|
163
179
|
observedAt: z.ZodString;
|
|
164
180
|
}, z.core.$strip>], "state">>;
|
|
181
|
+
outputDestination: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
folderId: z.ZodString;
|
|
183
|
+
folderName: z.ZodString;
|
|
184
|
+
driveId: z.ZodNullable<z.ZodString>;
|
|
185
|
+
location: z.ZodEnum<{
|
|
186
|
+
my_drive: "my_drive";
|
|
187
|
+
shared_drive: "shared_drive";
|
|
188
|
+
}>;
|
|
189
|
+
selectedAt: z.ZodString;
|
|
190
|
+
}, z.core.$strict>>;
|
|
165
191
|
documentDestination: z.ZodOptional<z.ZodObject<{
|
|
166
192
|
authorityKind: z.ZodEnum<{
|
|
167
193
|
organization: "organization";
|
|
@@ -247,6 +273,10 @@ export declare const GoogleDriveConnectionMetadata: z.ZodObject<{
|
|
|
247
273
|
export type GoogleDriveConnectionMetadata = z.infer<typeof GoogleDriveConnectionMetadata>;
|
|
248
274
|
export declare const GoogleDriveOAuthStartRequest: z.ZodObject<{
|
|
249
275
|
connectionId: z.ZodOptional<z.ZodString>;
|
|
276
|
+
capability: z.ZodDefault<z.ZodEnum<{
|
|
277
|
+
publish: "publish";
|
|
278
|
+
source_read: "source_read";
|
|
279
|
+
}>>;
|
|
250
280
|
}, z.core.$strip>;
|
|
251
281
|
export type GoogleDriveOAuthStartRequest = z.infer<typeof GoogleDriveOAuthStartRequest>;
|
|
252
282
|
export declare const GoogleDriveOAuthStartResponse: z.ZodObject<{
|
|
@@ -267,6 +297,63 @@ export declare const GoogleDriveDisconnectRequest: z.ZodObject<{
|
|
|
267
297
|
idempotencyKey: z.ZodString;
|
|
268
298
|
}, z.core.$strip>;
|
|
269
299
|
export type GoogleDriveDisconnectRequest = z.infer<typeof GoogleDriveDisconnectRequest>;
|
|
300
|
+
export declare const GoogleDrivePublicationExportFile: z.ZodObject<{
|
|
301
|
+
fileId: z.ZodString;
|
|
302
|
+
filename: z.ZodString;
|
|
303
|
+
contentType: z.ZodString;
|
|
304
|
+
sizeBytes: z.ZodNumber;
|
|
305
|
+
sha256: z.ZodString;
|
|
306
|
+
artifactId: z.ZodString;
|
|
307
|
+
versionId: z.ZodString;
|
|
308
|
+
materializationJobId: z.ZodString;
|
|
309
|
+
sourceHeadSequence: z.ZodNumber;
|
|
310
|
+
sourceStateHash: z.ZodString;
|
|
311
|
+
}, z.core.$strict>;
|
|
312
|
+
export type GoogleDrivePublicationExportFile = z.infer<typeof GoogleDrivePublicationExportFile>;
|
|
313
|
+
export declare const GoogleDrivePublicationToolInput: z.ZodObject<{
|
|
314
|
+
title: z.ZodString;
|
|
315
|
+
modality: z.ZodEnum<{
|
|
316
|
+
document: "document";
|
|
317
|
+
presentation: "presentation";
|
|
318
|
+
spreadsheet: "spreadsheet";
|
|
319
|
+
}>;
|
|
320
|
+
file: z.ZodObject<{
|
|
321
|
+
fileId: z.ZodString;
|
|
322
|
+
filename: z.ZodString;
|
|
323
|
+
contentType: z.ZodString;
|
|
324
|
+
sizeBytes: z.ZodNumber;
|
|
325
|
+
sha256: z.ZodString;
|
|
326
|
+
artifactId: z.ZodString;
|
|
327
|
+
versionId: z.ZodString;
|
|
328
|
+
materializationJobId: z.ZodString;
|
|
329
|
+
sourceHeadSequence: z.ZodNumber;
|
|
330
|
+
sourceStateHash: z.ZodString;
|
|
331
|
+
}, z.core.$strict>;
|
|
332
|
+
idempotencyKey: z.ZodString;
|
|
333
|
+
}, z.core.$strict>;
|
|
334
|
+
export type GoogleDrivePublicationToolInput = z.infer<typeof GoogleDrivePublicationToolInput>;
|
|
335
|
+
export declare const GoogleDrivePublicationReceipt: z.ZodObject<{
|
|
336
|
+
connectionId: z.ZodString;
|
|
337
|
+
providerFileId: z.ZodString;
|
|
338
|
+
webViewLink: z.ZodString;
|
|
339
|
+
mimeType: z.ZodEnum<{
|
|
340
|
+
"application/vnd.google-apps.document": "application/vnd.google-apps.document";
|
|
341
|
+
"application/vnd.google-apps.presentation": "application/vnd.google-apps.presentation";
|
|
342
|
+
"application/vnd.google-apps.spreadsheet": "application/vnd.google-apps.spreadsheet";
|
|
343
|
+
}>;
|
|
344
|
+
destination: z.ZodObject<{
|
|
345
|
+
folderId: z.ZodString;
|
|
346
|
+
folderName: z.ZodString;
|
|
347
|
+
driveId: z.ZodNullable<z.ZodString>;
|
|
348
|
+
location: z.ZodEnum<{
|
|
349
|
+
my_drive: "my_drive";
|
|
350
|
+
shared_drive: "shared_drive";
|
|
351
|
+
}>;
|
|
352
|
+
selectedAt: z.ZodString;
|
|
353
|
+
}, z.core.$strict>;
|
|
354
|
+
replayed: z.ZodBoolean;
|
|
355
|
+
}, z.core.$strict>;
|
|
356
|
+
export type GoogleDrivePublicationReceipt = z.infer<typeof GoogleDrivePublicationReceipt>;
|
|
270
357
|
export declare const GoogleDriveBrowseItem: z.ZodObject<{
|
|
271
358
|
id: z.ZodString;
|
|
272
359
|
name: z.ZodString;
|
package/dist/google-drive.js
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConnectionMetadata
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-H5BVCZKF.js";
|
|
5
|
-
import "./chunk-5UDNP7AO.js";
|
|
6
|
-
import "./chunk-52SGB2QO.js";
|
|
7
|
-
import "./chunk-TZ6YEYN4.js";
|
|
8
|
-
import "./chunk-YRKRZ6OF.js";
|
|
3
|
+
} from "./chunk-NX5JNF4L.js";
|
|
9
4
|
import {
|
|
10
5
|
ConnectorDocumentDestination,
|
|
11
6
|
ConnectorDocumentDestinationSelection
|
|
12
7
|
} from "./chunk-WYBDERIY.js";
|
|
8
|
+
import "./chunk-5UDNP7AO.js";
|
|
13
9
|
import "./chunk-Y3MLSLB4.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-CM6BMECR.js";
|
|
11
|
+
import "./chunk-JUFK3T4Q.js";
|
|
12
|
+
import "./chunk-M5ZGRVIQ.js";
|
|
13
|
+
import "./chunk-LW7OH6CS.js";
|
|
14
|
+
import "./chunk-TZ6YEYN4.js";
|
|
15
|
+
import "./chunk-YRKRZ6OF.js";
|
|
16
|
+
import "./chunk-JBCIY7QD.js";
|
|
16
17
|
import "./chunk-RIY7GYQS.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-CADSX6UN.js";
|
|
18
19
|
import "./chunk-D2HKF2EF.js";
|
|
19
20
|
import "./chunk-MYBZRDTY.js";
|
|
20
21
|
import "./chunk-LSB7GRLG.js";
|
|
22
|
+
import "./chunk-BVGIYW7D.js";
|
|
21
23
|
|
|
22
24
|
// src/google-drive.ts
|
|
23
25
|
import { z } from "zod";
|
|
@@ -29,8 +31,12 @@ var GOOGLE_DRIVE_READONLY_SCOPE = "https://www.googleapis.com/auth/drive.readonl
|
|
|
29
31
|
var GOOGLE_DRIVE_CREDENTIAL_ROLE = "google_drive_metadata";
|
|
30
32
|
var GOOGLE_DRIVE_CREDENTIAL_LABEL = "Google Drive read-only source sync";
|
|
31
33
|
var GOOGLE_DRIVE_LEGACY_CREDENTIAL_LABEL = "Google Drive metadata browser";
|
|
34
|
+
var GOOGLE_DRIVE_PUBLICATION_SERVER_ID = "google-drive-publishing";
|
|
35
|
+
var GOOGLE_DRIVE_PUBLICATION_TOOL_NAME = "google_drive_publish_file";
|
|
36
|
+
var GOOGLE_DRIVE_PUBLICATION_CREATE_ACTION = "create";
|
|
32
37
|
var GoogleDriveOAuthCapability = z.enum([
|
|
33
38
|
"picker_file_read",
|
|
39
|
+
"publish_file",
|
|
34
40
|
"source_metadata_discovery",
|
|
35
41
|
"source_content_read",
|
|
36
42
|
"recursive_source_sync"
|
|
@@ -39,16 +45,18 @@ function googleDriveOAuthScopeDecision(grantedScopes) {
|
|
|
39
45
|
const granted = new Set(grantedScopes);
|
|
40
46
|
const hasFullDrive = granted.has(GOOGLE_DRIVE_FULL_SCOPE);
|
|
41
47
|
const hasSourceContentRead = hasFullDrive || granted.has(GOOGLE_DRIVE_READONLY_SCOPE);
|
|
48
|
+
const hasFileWrite = hasFullDrive || granted.has(GOOGLE_DRIVE_FILE_SCOPE);
|
|
42
49
|
const hasSourceMetadataDiscovery = hasSourceContentRead || granted.has(GOOGLE_DRIVE_METADATA_READONLY_SCOPE);
|
|
43
|
-
const hasPickerFileRead = hasSourceContentRead ||
|
|
50
|
+
const hasPickerFileRead = hasSourceContentRead || hasFileWrite;
|
|
44
51
|
const capabilities = [];
|
|
45
52
|
if (hasPickerFileRead) capabilities.push("picker_file_read");
|
|
53
|
+
if (hasFileWrite) capabilities.push("publish_file");
|
|
46
54
|
if (hasSourceMetadataDiscovery) capabilities.push("source_metadata_discovery");
|
|
47
55
|
if (hasSourceContentRead) {
|
|
48
56
|
capabilities.push("source_content_read", "recursive_source_sync");
|
|
49
57
|
}
|
|
50
58
|
return {
|
|
51
|
-
accessMode: hasSourceContentRead ? "readonly" : hasSourceMetadataDiscovery ? "metadata_readonly" : null,
|
|
59
|
+
accessMode: hasSourceContentRead ? "readonly" : hasSourceMetadataDiscovery ? "metadata_readonly" : hasFileWrite ? "file_only" : null,
|
|
52
60
|
capabilities
|
|
53
61
|
};
|
|
54
62
|
}
|
|
@@ -119,6 +127,21 @@ var GoogleDriveSelectedSource = z.object({
|
|
|
119
127
|
readPolicy: GoogleDriveReadPolicy.default("allow"),
|
|
120
128
|
selectedAt: z.string().datetime({ offset: true })
|
|
121
129
|
});
|
|
130
|
+
var GoogleDriveOutputDestination = z.object({
|
|
131
|
+
folderId: z.string().min(1).max(256),
|
|
132
|
+
folderName: z.string().min(1).max(1024),
|
|
133
|
+
driveId: z.string().min(1).max(256).nullable(),
|
|
134
|
+
location: z.enum(["my_drive", "shared_drive"]),
|
|
135
|
+
selectedAt: z.string().datetime({ offset: true })
|
|
136
|
+
}).strict().superRefine((value, context) => {
|
|
137
|
+
if (value.location === "my_drive" !== (value.driveId === null)) {
|
|
138
|
+
context.addIssue({
|
|
139
|
+
code: "custom",
|
|
140
|
+
path: ["driveId"],
|
|
141
|
+
message: "Google Drive destination location does not match its drive identity"
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
});
|
|
122
145
|
var GoogleDriveConnectionMetadata = z.object({
|
|
123
146
|
credentialRole: z.literal(GOOGLE_DRIVE_CREDENTIAL_ROLE),
|
|
124
147
|
credentialLabel: z.union([
|
|
@@ -129,15 +152,17 @@ var GoogleDriveConnectionMetadata = z.object({
|
|
|
129
152
|
googleEmail: z.string().email().max(320),
|
|
130
153
|
googleDisplayName: z.string().min(1).max(512).nullable(),
|
|
131
154
|
verifiedAt: z.string().datetime({ offset: true }),
|
|
132
|
-
accessMode: z.enum(["metadata_readonly", "readonly"]),
|
|
155
|
+
accessMode: z.enum(["file_only", "metadata_readonly", "readonly"]),
|
|
133
156
|
lifecycle: GoogleDriveConnectionLifecycle.optional(),
|
|
157
|
+
outputDestination: GoogleDriveOutputDestination.optional(),
|
|
134
158
|
documentDestination: ConnectorDocumentDestination.optional(),
|
|
135
159
|
selectedSources: z.array(GoogleDriveSelectedSource).max(100).optional(),
|
|
136
160
|
/** @deprecated Read `selectedSources`; retained while existing connections migrate. */
|
|
137
161
|
selectedSource: GoogleDriveSelectedSource.nullable().optional()
|
|
138
162
|
}).passthrough();
|
|
139
163
|
var GoogleDriveOAuthStartRequest = z.object({
|
|
140
|
-
connectionId: z.string().uuid().optional()
|
|
164
|
+
connectionId: z.string().uuid().optional(),
|
|
165
|
+
capability: z.enum(["source_read", "publish"]).default("source_read")
|
|
141
166
|
});
|
|
142
167
|
var GoogleDriveOAuthStartResponse = z.object({
|
|
143
168
|
authorizationUrl: z.string().url(),
|
|
@@ -151,6 +176,36 @@ var GoogleDriveDisconnectRequest = z.object({
|
|
|
151
176
|
expectedVersion: z.number().int().positive(),
|
|
152
177
|
idempotencyKey: z.string().trim().min(1).max(200)
|
|
153
178
|
});
|
|
179
|
+
var GoogleDrivePublicationExportFile = z.object({
|
|
180
|
+
fileId: z.string().uuid(),
|
|
181
|
+
filename: z.string().trim().min(1).max(512),
|
|
182
|
+
contentType: z.string().trim().min(1).max(256),
|
|
183
|
+
sizeBytes: z.number().int().positive(),
|
|
184
|
+
sha256: z.string().regex(/^[0-9a-f]{64}$/u),
|
|
185
|
+
artifactId: z.string().regex(/^[0-9a-f]{32}$/u),
|
|
186
|
+
versionId: z.string().regex(/^[0-9a-f]{32}$/u),
|
|
187
|
+
materializationJobId: z.string().regex(/^[0-9a-f]{32}$/u),
|
|
188
|
+
sourceHeadSequence: z.number().int().nonnegative(),
|
|
189
|
+
sourceStateHash: z.string().regex(/^sha256:[0-9a-f]{64}$/u)
|
|
190
|
+
}).strict();
|
|
191
|
+
var GoogleDrivePublicationToolInput = z.object({
|
|
192
|
+
title: z.string().trim().min(1).max(512),
|
|
193
|
+
modality: z.enum(["document", "spreadsheet", "presentation"]),
|
|
194
|
+
file: GoogleDrivePublicationExportFile,
|
|
195
|
+
idempotencyKey: z.string().trim().min(1).max(200)
|
|
196
|
+
}).strict();
|
|
197
|
+
var GoogleDrivePublicationReceipt = z.object({
|
|
198
|
+
connectionId: z.string().uuid(),
|
|
199
|
+
providerFileId: z.string().min(1).max(256),
|
|
200
|
+
webViewLink: z.string().url(),
|
|
201
|
+
mimeType: z.enum([
|
|
202
|
+
"application/vnd.google-apps.document",
|
|
203
|
+
"application/vnd.google-apps.spreadsheet",
|
|
204
|
+
"application/vnd.google-apps.presentation"
|
|
205
|
+
]),
|
|
206
|
+
destination: GoogleDriveOutputDestination,
|
|
207
|
+
replayed: z.boolean()
|
|
208
|
+
}).strict();
|
|
154
209
|
var GoogleDriveBrowseItem = z.object({
|
|
155
210
|
id: z.string().min(1).max(256),
|
|
156
211
|
name: z.string().min(1).max(1024),
|
|
@@ -229,6 +284,9 @@ export {
|
|
|
229
284
|
GOOGLE_DRIVE_LEGACY_CREDENTIAL_LABEL,
|
|
230
285
|
GOOGLE_DRIVE_METADATA_READONLY_SCOPE,
|
|
231
286
|
GOOGLE_DRIVE_PROVIDER_DOMAIN,
|
|
287
|
+
GOOGLE_DRIVE_PUBLICATION_CREATE_ACTION,
|
|
288
|
+
GOOGLE_DRIVE_PUBLICATION_SERVER_ID,
|
|
289
|
+
GOOGLE_DRIVE_PUBLICATION_TOOL_NAME,
|
|
232
290
|
GOOGLE_DRIVE_READONLY_SCOPE,
|
|
233
291
|
GoogleDriveBrowseItem,
|
|
234
292
|
GoogleDriveBrowseResponse,
|
|
@@ -243,6 +301,10 @@ export {
|
|
|
243
301
|
GoogleDriveOAuthCapability,
|
|
244
302
|
GoogleDriveOAuthStartRequest,
|
|
245
303
|
GoogleDriveOAuthStartResponse,
|
|
304
|
+
GoogleDriveOutputDestination,
|
|
305
|
+
GoogleDrivePublicationExportFile,
|
|
306
|
+
GoogleDrivePublicationReceipt,
|
|
307
|
+
GoogleDrivePublicationToolInput,
|
|
246
308
|
GoogleDriveReadPolicy,
|
|
247
309
|
GoogleDriveSelectedSource,
|
|
248
310
|
GoogleDriveSyncCadence,
|
package/dist/google-drive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/google-drive.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ConnectionMetadata } from \"./index\";\nimport {\n ConnectorDocumentDestination,\n ConnectorDocumentDestinationSelection,\n} from \"./connector-destinations\";\n\nexport const GOOGLE_DRIVE_PROVIDER_DOMAIN = \"googleapis.com\" as const;\nexport const GOOGLE_DRIVE_FULL_SCOPE = \"https://www.googleapis.com/auth/drive\" as const;\nexport const GOOGLE_DRIVE_FILE_SCOPE = \"https://www.googleapis.com/auth/drive.file\" as const;\nexport const GOOGLE_DRIVE_METADATA_READONLY_SCOPE =\n \"https://www.googleapis.com/auth/drive.metadata.readonly\" as const;\nexport const GOOGLE_DRIVE_READONLY_SCOPE =\n \"https://www.googleapis.com/auth/drive.readonly\" as const;\n/** Stable serialized role retained for existing connection rows; not product-facing copy. */\nexport const GOOGLE_DRIVE_CREDENTIAL_ROLE = \"google_drive_metadata\" as const;\nexport const GOOGLE_DRIVE_CREDENTIAL_LABEL = \"Google Drive read-only source sync\" as const;\nexport const GOOGLE_DRIVE_LEGACY_CREDENTIAL_LABEL = \"Google Drive metadata browser\" as const;\n\nexport const GoogleDriveOAuthCapability = z.enum([\n \"picker_file_read\",\n \"source_metadata_discovery\",\n \"source_content_read\",\n \"recursive_source_sync\",\n]);\nexport type GoogleDriveOAuthCapability = z.infer<typeof GoogleDriveOAuthCapability>;\n\nexport type GoogleDriveOAuthScopeDecision = {\n accessMode: \"metadata_readonly\" | \"readonly\" | null;\n capabilities: GoogleDriveOAuthCapability[];\n};\n\n/**\n * Converts exact Google OAuth grants into the Drive capabilities OpenGeni may\n * rely on. Unknown or malformed grants add no authority. In particular,\n * drive.file covers only files explicitly opened or shared with the app and\n * never authorizes arbitrary recursive descendant discovery.\n */\nexport function googleDriveOAuthScopeDecision(\n grantedScopes: readonly string[],\n): GoogleDriveOAuthScopeDecision {\n const granted = new Set(grantedScopes);\n const hasFullDrive = granted.has(GOOGLE_DRIVE_FULL_SCOPE);\n const hasSourceContentRead = hasFullDrive || granted.has(GOOGLE_DRIVE_READONLY_SCOPE);\n const hasSourceMetadataDiscovery =\n hasSourceContentRead || granted.has(GOOGLE_DRIVE_METADATA_READONLY_SCOPE);\n const hasPickerFileRead = hasSourceContentRead || granted.has(GOOGLE_DRIVE_FILE_SCOPE);\n const capabilities: GoogleDriveOAuthCapability[] = [];\n if (hasPickerFileRead) capabilities.push(\"picker_file_read\");\n if (hasSourceMetadataDiscovery) capabilities.push(\"source_metadata_discovery\");\n if (hasSourceContentRead) {\n capabilities.push(\"source_content_read\", \"recursive_source_sync\");\n }\n return {\n accessMode: hasSourceContentRead\n ? \"readonly\"\n : hasSourceMetadataDiscovery\n ? \"metadata_readonly\"\n : null,\n capabilities,\n };\n}\n\nexport function googleDriveScopesAllowCapability(\n grantedScopes: readonly string[],\n capability: GoogleDriveOAuthCapability,\n): boolean {\n return googleDriveOAuthScopeDecision(grantedScopes).capabilities.includes(capability);\n}\n\n/** @deprecated Connector document destinations use organization/workspace/personal authority. */\nexport const GoogleDriveTargetScope = z.enum([\"user\", \"workspace\", \"organization\"]);\nexport type GoogleDriveTargetScope = z.infer<typeof GoogleDriveTargetScope>;\n\nexport const GoogleDriveSyncCadence = z.enum([\"manual\", \"hourly\", \"daily\"]);\nexport type GoogleDriveSyncCadence = z.infer<typeof GoogleDriveSyncCadence>;\n\nexport const GoogleDriveReadPolicy = z.enum([\"allow\", \"ask\", \"block\"]);\nexport type GoogleDriveReadPolicy = z.infer<typeof GoogleDriveReadPolicy>;\n\nexport const GoogleDriveConnectionLifecycleState = z.enum([\n \"active\",\n \"paused\",\n \"token_revoked\",\n \"app_removed\",\n \"disconnected\",\n \"reconnect_required\",\n \"reconsent_required\",\n]);\nexport type GoogleDriveConnectionLifecycleState = z.infer<\n typeof GoogleDriveConnectionLifecycleState\n>;\n\nconst GoogleDriveLifecycleObservedAt = z.string().datetime({ offset: true });\nexport const GoogleDriveConnectionLifecycle = z.discriminatedUnion(\"state\", [\n z.object({\n state: z.literal(\"active\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"paused\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"token_revoked\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"app_removed\"),\n recoverable: z.literal(false),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"disconnected\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"reconnect_required\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"reconsent_required\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n]);\nexport type GoogleDriveConnectionLifecycle = z.infer<typeof GoogleDriveConnectionLifecycle>;\n\nexport const GoogleDriveSelectedSource = z.object({\n id: z.string().min(1).max(256),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n driveId: z.string().min(1).max(256).nullable().default(null),\n destination: ConnectorDocumentDestination.optional(),\n /** @deprecated Missing destinations resolve to the current workspace boundary. */\n targetScope: GoogleDriveTargetScope.optional(),\n syncCadence: GoogleDriveSyncCadence.default(\"hourly\"),\n syncEnabled: z.boolean().default(false),\n configGeneration: z.number().int().positive().default(1),\n readPolicy: GoogleDriveReadPolicy.default(\"allow\"),\n selectedAt: z.string().datetime({ offset: true }),\n});\nexport type GoogleDriveSelectedSource = z.infer<typeof GoogleDriveSelectedSource>;\n\nexport const GoogleDriveConnectionMetadata = z\n .object({\n credentialRole: z.literal(GOOGLE_DRIVE_CREDENTIAL_ROLE),\n credentialLabel: z.union([\n z.literal(GOOGLE_DRIVE_CREDENTIAL_LABEL),\n z.literal(GOOGLE_DRIVE_LEGACY_CREDENTIAL_LABEL),\n ]),\n googlePermissionId: z.string().min(1).max(256),\n googleEmail: z.string().email().max(320),\n googleDisplayName: z.string().min(1).max(512).nullable(),\n verifiedAt: z.string().datetime({ offset: true }),\n accessMode: z.enum([\"metadata_readonly\", \"readonly\"]),\n lifecycle: GoogleDriveConnectionLifecycle.optional(),\n documentDestination: ConnectorDocumentDestination.optional(),\n selectedSources: z.array(GoogleDriveSelectedSource).max(100).optional(),\n /** @deprecated Read `selectedSources`; retained while existing connections migrate. */\n selectedSource: GoogleDriveSelectedSource.nullable().optional(),\n })\n .passthrough();\nexport type GoogleDriveConnectionMetadata = z.infer<typeof GoogleDriveConnectionMetadata>;\n\nexport const GoogleDriveOAuthStartRequest = z.object({\n connectionId: z.string().uuid().optional(),\n});\nexport type GoogleDriveOAuthStartRequest = z.infer<typeof GoogleDriveOAuthStartRequest>;\n\nexport const GoogleDriveOAuthStartResponse = z.object({\n authorizationUrl: z.string().url(),\n expiresAt: z.string().datetime({ offset: true }),\n});\nexport type GoogleDriveOAuthStartResponse = z.infer<typeof GoogleDriveOAuthStartResponse>;\n\nexport const GoogleDriveLifecycleActionRequest = z.object({\n action: z.enum([\"pause\", \"resume\"]),\n expectedVersion: z.number().int().positive(),\n});\nexport type GoogleDriveLifecycleActionRequest = z.infer<typeof GoogleDriveLifecycleActionRequest>;\n\nexport const GoogleDriveDisconnectRequest = z.object({\n expectedVersion: z.number().int().positive(),\n idempotencyKey: z.string().trim().min(1).max(200),\n});\nexport type GoogleDriveDisconnectRequest = z.infer<typeof GoogleDriveDisconnectRequest>;\n\nexport const GoogleDriveBrowseItem = z.object({\n id: z.string().min(1).max(256),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n kind: z.enum([\"folder\", \"file\"]),\n driveId: z.string().min(1).max(256).nullable(),\n modifiedTime: z.string().datetime({ offset: true }).nullable(),\n size: z.string().regex(/^\\d+$/).nullable(),\n webViewLink: z.string().url().nullable(),\n});\nexport type GoogleDriveBrowseItem = z.infer<typeof GoogleDriveBrowseItem>;\n\nexport const GoogleDriveBrowseResponse = z.object({\n connection: z.lazy(() => ConnectionMetadata),\n parentId: z.string().min(1).max(256),\n current: GoogleDriveBrowseItem.nullable(),\n items: z.array(GoogleDriveBrowseItem),\n nextPageToken: z.string().min(1).max(4096).nullable(),\n incompleteSearch: z.boolean(),\n});\nexport type GoogleDriveBrowseResponse = z.infer<typeof GoogleDriveBrowseResponse>;\n\nconst GoogleDriveSourceSelection = z\n .array(\n GoogleDriveBrowseItem.pick({\n id: true,\n name: true,\n mimeType: true,\n driveId: true,\n }),\n )\n .max(100)\n .refine((sources) => new Set(sources.map((source) => source.id)).size === sources.length, {\n message: \"Google Drive sources must be unique\",\n });\n\nexport const SaveGoogleDriveSourceRequest = z\n .object({\n sources: GoogleDriveSourceSelection,\n destination: ConnectorDocumentDestinationSelection.optional(),\n /** @deprecated Legacy requests are accepted but resolve to workspace authority. */\n targetScope: GoogleDriveTargetScope.optional(),\n syncCadence: GoogleDriveSyncCadence.default(\"hourly\"),\n syncEnabled: z.boolean().default(false),\n readPolicy: GoogleDriveReadPolicy.default(\"allow\"),\n })\n .refine((request) => request.destination !== undefined || request.targetScope !== undefined, {\n message: \"Google Drive document destination is required\",\n });\nexport type SaveGoogleDriveSourceRequest = z.infer<typeof SaveGoogleDriveSourceRequest>;\n\nexport const GoogleDriveKnowledgeSourceItem = z.object({\n id: z.string().min(1).max(512),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n driveId: z.string().min(1).max(512).optional(),\n sourceKind: z.enum([\"my_drive\", \"shared_drive\", \"folder\"]),\n includeDescendants: z.boolean(),\n});\nexport type GoogleDriveKnowledgeSourceItem = z.infer<typeof GoogleDriveKnowledgeSourceItem>;\n\nexport const GoogleDriveKnowledgeSourceDestination = z.object({\n authorityKind: z.enum([\"organization\", \"workspace\", \"personal\"]),\n authorityAccountId: z.string().min(1).max(128),\n authorityWorkspaceId: z.string().min(1).max(128).optional(),\n authoritySubjectId: z.string().min(1).max(512).optional(),\n collectionId: z.string().min(1).max(512).optional(),\n});\nexport type GoogleDriveKnowledgeSourceDestination = z.infer<\n typeof GoogleDriveKnowledgeSourceDestination\n>;\n\nexport const GoogleDriveKnowledgeSourceConfig = z.object({\n sources: z.array(GoogleDriveKnowledgeSourceItem).min(1).max(100),\n destination: GoogleDriveKnowledgeSourceDestination,\n syncCadence: GoogleDriveSyncCadence,\n readPolicy: GoogleDriveReadPolicy,\n});\nexport type GoogleDriveKnowledgeSourceConfig = z.infer<typeof GoogleDriveKnowledgeSourceConfig>;\n\nexport const SaveGoogleDriveIntegrationSourceRequest = z.intersection(\n SaveGoogleDriveSourceRequest,\n z.object({\n sources: GoogleDriveSourceSelection.refine((sources) => sources.length > 0, {\n message: \"At least one Google Drive source is required\",\n }),\n expectedVersion: z.number().int().positive().optional(),\n idempotencyKey: z.string().uuid(),\n }),\n);\nexport type SaveGoogleDriveIntegrationSourceRequest = z.infer<\n typeof SaveGoogleDriveIntegrationSourceRequest\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAQX,IAAM,+BAA+B;AACrC,IAAM,0BAA0B;AAChC,IAAM,0BAA0B;AAChC,IAAM,uCACX;AACK,IAAM,8BACX;AAEK,IAAM,+BAA+B;AACrC,IAAM,gCAAgC;AACtC,IAAM,uCAAuC;AAE7C,IAAM,6BAA6B,EAAE,KAAK;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAcM,SAAS,8BACd,eAC+B;AAC/B,QAAM,UAAU,IAAI,IAAI,aAAa;AACrC,QAAM,eAAe,QAAQ,IAAI,uBAAuB;AACxD,QAAM,uBAAuB,gBAAgB,QAAQ,IAAI,2BAA2B;AACpF,QAAM,6BACJ,wBAAwB,QAAQ,IAAI,oCAAoC;AAC1E,QAAM,oBAAoB,wBAAwB,QAAQ,IAAI,uBAAuB;AACrF,QAAM,eAA6C,CAAC;AACpD,MAAI,kBAAmB,cAAa,KAAK,kBAAkB;AAC3D,MAAI,2BAA4B,cAAa,KAAK,2BAA2B;AAC7E,MAAI,sBAAsB;AACxB,iBAAa,KAAK,uBAAuB,uBAAuB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AGM,IAAM,0CAA0C,EAAE;AAAA,EACvD;AAAA,EACA,EAAE,OAAO;AAAA,IACP,SAAS,2BAA2B,OAAO,CAAC,YAAY,QAAQ,SAAS,GAAG;AAAA,MAC1E,SAAS;AAAA,IACX,CAAC;AAAA,IACD,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS;AAAA,IACtD,gBAAgB,EAAE,OAAO,EAAE,KAAK;AAAA,EAClC,CAAC;AACH;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/google-drive.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ConnectionMetadata } from \"./index\";\nimport {\n ConnectorDocumentDestination,\n ConnectorDocumentDestinationSelection,\n} from \"./connector-destinations\";\n\nexport const GOOGLE_DRIVE_PROVIDER_DOMAIN = \"googleapis.com\" as const;\nexport const GOOGLE_DRIVE_FULL_SCOPE = \"https://www.googleapis.com/auth/drive\" as const;\nexport const GOOGLE_DRIVE_FILE_SCOPE = \"https://www.googleapis.com/auth/drive.file\" as const;\nexport const GOOGLE_DRIVE_METADATA_READONLY_SCOPE =\n \"https://www.googleapis.com/auth/drive.metadata.readonly\" as const;\nexport const GOOGLE_DRIVE_READONLY_SCOPE =\n \"https://www.googleapis.com/auth/drive.readonly\" as const;\n/** Stable serialized role retained for existing connection rows; not product-facing copy. */\nexport const GOOGLE_DRIVE_CREDENTIAL_ROLE = \"google_drive_metadata\" as const;\nexport const GOOGLE_DRIVE_CREDENTIAL_LABEL = \"Google Drive read-only source sync\" as const;\nexport const GOOGLE_DRIVE_LEGACY_CREDENTIAL_LABEL = \"Google Drive metadata browser\" as const;\nexport const GOOGLE_DRIVE_PUBLICATION_SERVER_ID = \"google-drive-publishing\" as const;\nexport const GOOGLE_DRIVE_PUBLICATION_TOOL_NAME = \"google_drive_publish_file\" as const;\nexport const GOOGLE_DRIVE_PUBLICATION_CREATE_ACTION = \"create\" as const;\n\nexport const GoogleDriveOAuthCapability = z.enum([\n \"picker_file_read\",\n \"publish_file\",\n \"source_metadata_discovery\",\n \"source_content_read\",\n \"recursive_source_sync\",\n]);\nexport type GoogleDriveOAuthCapability = z.infer<typeof GoogleDriveOAuthCapability>;\n\nexport type GoogleDriveOAuthScopeDecision = {\n accessMode: \"file_only\" | \"metadata_readonly\" | \"readonly\" | null;\n capabilities: GoogleDriveOAuthCapability[];\n};\n\n/**\n * Converts exact Google OAuth grants into the Drive capabilities OpenGeni may\n * rely on. Unknown or malformed grants add no authority. In particular,\n * drive.file covers only files explicitly opened or shared with the app and\n * never authorizes arbitrary recursive descendant discovery.\n */\nexport function googleDriveOAuthScopeDecision(\n grantedScopes: readonly string[],\n): GoogleDriveOAuthScopeDecision {\n const granted = new Set(grantedScopes);\n const hasFullDrive = granted.has(GOOGLE_DRIVE_FULL_SCOPE);\n const hasSourceContentRead = hasFullDrive || granted.has(GOOGLE_DRIVE_READONLY_SCOPE);\n const hasFileWrite = hasFullDrive || granted.has(GOOGLE_DRIVE_FILE_SCOPE);\n const hasSourceMetadataDiscovery =\n hasSourceContentRead || granted.has(GOOGLE_DRIVE_METADATA_READONLY_SCOPE);\n const hasPickerFileRead = hasSourceContentRead || hasFileWrite;\n const capabilities: GoogleDriveOAuthCapability[] = [];\n if (hasPickerFileRead) capabilities.push(\"picker_file_read\");\n if (hasFileWrite) capabilities.push(\"publish_file\");\n if (hasSourceMetadataDiscovery) capabilities.push(\"source_metadata_discovery\");\n if (hasSourceContentRead) {\n capabilities.push(\"source_content_read\", \"recursive_source_sync\");\n }\n return {\n accessMode: hasSourceContentRead\n ? \"readonly\"\n : hasSourceMetadataDiscovery\n ? \"metadata_readonly\"\n : hasFileWrite\n ? \"file_only\"\n : null,\n capabilities,\n };\n}\n\nexport function googleDriveScopesAllowCapability(\n grantedScopes: readonly string[],\n capability: GoogleDriveOAuthCapability,\n): boolean {\n return googleDriveOAuthScopeDecision(grantedScopes).capabilities.includes(capability);\n}\n\n/** @deprecated Connector document destinations use organization/workspace/personal authority. */\nexport const GoogleDriveTargetScope = z.enum([\"user\", \"workspace\", \"organization\"]);\nexport type GoogleDriveTargetScope = z.infer<typeof GoogleDriveTargetScope>;\n\nexport const GoogleDriveSyncCadence = z.enum([\"manual\", \"hourly\", \"daily\"]);\nexport type GoogleDriveSyncCadence = z.infer<typeof GoogleDriveSyncCadence>;\n\nexport const GoogleDriveReadPolicy = z.enum([\"allow\", \"ask\", \"block\"]);\nexport type GoogleDriveReadPolicy = z.infer<typeof GoogleDriveReadPolicy>;\n\nexport const GoogleDriveConnectionLifecycleState = z.enum([\n \"active\",\n \"paused\",\n \"token_revoked\",\n \"app_removed\",\n \"disconnected\",\n \"reconnect_required\",\n \"reconsent_required\",\n]);\nexport type GoogleDriveConnectionLifecycleState = z.infer<\n typeof GoogleDriveConnectionLifecycleState\n>;\n\nconst GoogleDriveLifecycleObservedAt = z.string().datetime({ offset: true });\nexport const GoogleDriveConnectionLifecycle = z.discriminatedUnion(\"state\", [\n z.object({\n state: z.literal(\"active\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"paused\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"token_revoked\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"app_removed\"),\n recoverable: z.literal(false),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"disconnected\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"reconnect_required\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n z.object({\n state: z.literal(\"reconsent_required\"),\n recoverable: z.literal(true),\n observedAt: GoogleDriveLifecycleObservedAt,\n }),\n]);\nexport type GoogleDriveConnectionLifecycle = z.infer<typeof GoogleDriveConnectionLifecycle>;\n\nexport const GoogleDriveSelectedSource = z.object({\n id: z.string().min(1).max(256),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n driveId: z.string().min(1).max(256).nullable().default(null),\n destination: ConnectorDocumentDestination.optional(),\n /** @deprecated Missing destinations resolve to the current workspace boundary. */\n targetScope: GoogleDriveTargetScope.optional(),\n syncCadence: GoogleDriveSyncCadence.default(\"hourly\"),\n syncEnabled: z.boolean().default(false),\n configGeneration: z.number().int().positive().default(1),\n readPolicy: GoogleDriveReadPolicy.default(\"allow\"),\n selectedAt: z.string().datetime({ offset: true }),\n});\nexport type GoogleDriveSelectedSource = z.infer<typeof GoogleDriveSelectedSource>;\n\nexport const GoogleDriveOutputDestination = z\n .object({\n folderId: z.string().min(1).max(256),\n folderName: z.string().min(1).max(1024),\n driveId: z.string().min(1).max(256).nullable(),\n location: z.enum([\"my_drive\", \"shared_drive\"]),\n selectedAt: z.string().datetime({ offset: true }),\n })\n .strict()\n .superRefine((value, context) => {\n if ((value.location === \"my_drive\") !== (value.driveId === null)) {\n context.addIssue({\n code: \"custom\",\n path: [\"driveId\"],\n message: \"Google Drive destination location does not match its drive identity\",\n });\n }\n });\nexport type GoogleDriveOutputDestination = z.infer<typeof GoogleDriveOutputDestination>;\n\nexport const GoogleDriveConnectionMetadata = z\n .object({\n credentialRole: z.literal(GOOGLE_DRIVE_CREDENTIAL_ROLE),\n credentialLabel: z.union([\n z.literal(GOOGLE_DRIVE_CREDENTIAL_LABEL),\n z.literal(GOOGLE_DRIVE_LEGACY_CREDENTIAL_LABEL),\n ]),\n googlePermissionId: z.string().min(1).max(256),\n googleEmail: z.string().email().max(320),\n googleDisplayName: z.string().min(1).max(512).nullable(),\n verifiedAt: z.string().datetime({ offset: true }),\n accessMode: z.enum([\"file_only\", \"metadata_readonly\", \"readonly\"]),\n lifecycle: GoogleDriveConnectionLifecycle.optional(),\n outputDestination: GoogleDriveOutputDestination.optional(),\n documentDestination: ConnectorDocumentDestination.optional(),\n selectedSources: z.array(GoogleDriveSelectedSource).max(100).optional(),\n /** @deprecated Read `selectedSources`; retained while existing connections migrate. */\n selectedSource: GoogleDriveSelectedSource.nullable().optional(),\n })\n .passthrough();\nexport type GoogleDriveConnectionMetadata = z.infer<typeof GoogleDriveConnectionMetadata>;\n\nexport const GoogleDriveOAuthStartRequest = z.object({\n connectionId: z.string().uuid().optional(),\n capability: z.enum([\"source_read\", \"publish\"]).default(\"source_read\"),\n});\nexport type GoogleDriveOAuthStartRequest = z.infer<typeof GoogleDriveOAuthStartRequest>;\n\nexport const GoogleDriveOAuthStartResponse = z.object({\n authorizationUrl: z.string().url(),\n expiresAt: z.string().datetime({ offset: true }),\n});\nexport type GoogleDriveOAuthStartResponse = z.infer<typeof GoogleDriveOAuthStartResponse>;\n\nexport const GoogleDriveLifecycleActionRequest = z.object({\n action: z.enum([\"pause\", \"resume\"]),\n expectedVersion: z.number().int().positive(),\n});\nexport type GoogleDriveLifecycleActionRequest = z.infer<typeof GoogleDriveLifecycleActionRequest>;\n\nexport const GoogleDriveDisconnectRequest = z.object({\n expectedVersion: z.number().int().positive(),\n idempotencyKey: z.string().trim().min(1).max(200),\n});\nexport type GoogleDriveDisconnectRequest = z.infer<typeof GoogleDriveDisconnectRequest>;\n\nexport const GoogleDrivePublicationExportFile = z\n .object({\n fileId: z.string().uuid(),\n filename: z.string().trim().min(1).max(512),\n contentType: z.string().trim().min(1).max(256),\n sizeBytes: z.number().int().positive(),\n sha256: z.string().regex(/^[0-9a-f]{64}$/u),\n artifactId: z.string().regex(/^[0-9a-f]{32}$/u),\n versionId: z.string().regex(/^[0-9a-f]{32}$/u),\n materializationJobId: z.string().regex(/^[0-9a-f]{32}$/u),\n sourceHeadSequence: z.number().int().nonnegative(),\n sourceStateHash: z.string().regex(/^sha256:[0-9a-f]{64}$/u),\n })\n .strict();\nexport type GoogleDrivePublicationExportFile = z.infer<typeof GoogleDrivePublicationExportFile>;\n\nexport const GoogleDrivePublicationToolInput = z\n .object({\n title: z.string().trim().min(1).max(512),\n modality: z.enum([\"document\", \"spreadsheet\", \"presentation\"]),\n file: GoogleDrivePublicationExportFile,\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict();\nexport type GoogleDrivePublicationToolInput = z.infer<typeof GoogleDrivePublicationToolInput>;\n\nexport const GoogleDrivePublicationReceipt = z\n .object({\n connectionId: z.string().uuid(),\n providerFileId: z.string().min(1).max(256),\n webViewLink: z.string().url(),\n mimeType: z.enum([\n \"application/vnd.google-apps.document\",\n \"application/vnd.google-apps.spreadsheet\",\n \"application/vnd.google-apps.presentation\",\n ]),\n destination: GoogleDriveOutputDestination,\n replayed: z.boolean(),\n })\n .strict();\nexport type GoogleDrivePublicationReceipt = z.infer<typeof GoogleDrivePublicationReceipt>;\n\nexport const GoogleDriveBrowseItem = z.object({\n id: z.string().min(1).max(256),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n kind: z.enum([\"folder\", \"file\"]),\n driveId: z.string().min(1).max(256).nullable(),\n modifiedTime: z.string().datetime({ offset: true }).nullable(),\n size: z.string().regex(/^\\d+$/).nullable(),\n webViewLink: z.string().url().nullable(),\n});\nexport type GoogleDriveBrowseItem = z.infer<typeof GoogleDriveBrowseItem>;\n\nexport const GoogleDriveBrowseResponse = z.object({\n connection: z.lazy(() => ConnectionMetadata),\n parentId: z.string().min(1).max(256),\n current: GoogleDriveBrowseItem.nullable(),\n items: z.array(GoogleDriveBrowseItem),\n nextPageToken: z.string().min(1).max(4096).nullable(),\n incompleteSearch: z.boolean(),\n});\nexport type GoogleDriveBrowseResponse = z.infer<typeof GoogleDriveBrowseResponse>;\n\nconst GoogleDriveSourceSelection = z\n .array(\n GoogleDriveBrowseItem.pick({\n id: true,\n name: true,\n mimeType: true,\n driveId: true,\n }),\n )\n .max(100)\n .refine((sources) => new Set(sources.map((source) => source.id)).size === sources.length, {\n message: \"Google Drive sources must be unique\",\n });\n\nexport const SaveGoogleDriveSourceRequest = z\n .object({\n sources: GoogleDriveSourceSelection,\n destination: ConnectorDocumentDestinationSelection.optional(),\n /** @deprecated Legacy requests are accepted but resolve to workspace authority. */\n targetScope: GoogleDriveTargetScope.optional(),\n syncCadence: GoogleDriveSyncCadence.default(\"hourly\"),\n syncEnabled: z.boolean().default(false),\n readPolicy: GoogleDriveReadPolicy.default(\"allow\"),\n })\n .refine((request) => request.destination !== undefined || request.targetScope !== undefined, {\n message: \"Google Drive document destination is required\",\n });\nexport type SaveGoogleDriveSourceRequest = z.infer<typeof SaveGoogleDriveSourceRequest>;\n\nexport const GoogleDriveKnowledgeSourceItem = z.object({\n id: z.string().min(1).max(512),\n name: z.string().min(1).max(1024),\n mimeType: z.string().min(1).max(256),\n driveId: z.string().min(1).max(512).optional(),\n sourceKind: z.enum([\"my_drive\", \"shared_drive\", \"folder\"]),\n includeDescendants: z.boolean(),\n});\nexport type GoogleDriveKnowledgeSourceItem = z.infer<typeof GoogleDriveKnowledgeSourceItem>;\n\nexport const GoogleDriveKnowledgeSourceDestination = z.object({\n authorityKind: z.enum([\"organization\", \"workspace\", \"personal\"]),\n authorityAccountId: z.string().min(1).max(128),\n authorityWorkspaceId: z.string().min(1).max(128).optional(),\n authoritySubjectId: z.string().min(1).max(512).optional(),\n collectionId: z.string().min(1).max(512).optional(),\n});\nexport type GoogleDriveKnowledgeSourceDestination = z.infer<\n typeof GoogleDriveKnowledgeSourceDestination\n>;\n\nexport const GoogleDriveKnowledgeSourceConfig = z.object({\n sources: z.array(GoogleDriveKnowledgeSourceItem).min(1).max(100),\n destination: GoogleDriveKnowledgeSourceDestination,\n syncCadence: GoogleDriveSyncCadence,\n readPolicy: GoogleDriveReadPolicy,\n});\nexport type GoogleDriveKnowledgeSourceConfig = z.infer<typeof GoogleDriveKnowledgeSourceConfig>;\n\nexport const SaveGoogleDriveIntegrationSourceRequest = z.intersection(\n SaveGoogleDriveSourceRequest,\n z.object({\n sources: GoogleDriveSourceSelection.refine((sources) => sources.length > 0, {\n message: \"At least one Google Drive source is required\",\n }),\n expectedVersion: z.number().int().positive().optional(),\n idempotencyKey: z.string().uuid(),\n }),\n);\nexport type SaveGoogleDriveIntegrationSourceRequest = z.infer<\n typeof SaveGoogleDriveIntegrationSourceRequest\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAQX,IAAM,+BAA+B;AACrC,IAAM,0BAA0B;AAChC,IAAM,0BAA0B;AAChC,IAAM,uCACX;AACK,IAAM,8BACX;AAEK,IAAM,+BAA+B;AACrC,IAAM,gCAAgC;AACtC,IAAM,uCAAuC;AAC7C,IAAM,qCAAqC;AAC3C,IAAM,qCAAqC;AAC3C,IAAM,yCAAyC;AAE/C,IAAM,6BAA6B,EAAE,KAAK;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAcM,SAAS,8BACd,eAC+B;AAC/B,QAAM,UAAU,IAAI,IAAI,aAAa;AACrC,QAAM,eAAe,QAAQ,IAAI,uBAAuB;AACxD,QAAM,uBAAuB,gBAAgB,QAAQ,IAAI,2BAA2B;AACpF,QAAM,eAAe,gBAAgB,QAAQ,IAAI,uBAAuB;AACxE,QAAM,6BACJ,wBAAwB,QAAQ,IAAI,oCAAoC;AAC1E,QAAM,oBAAoB,wBAAwB;AAClD,QAAM,eAA6C,CAAC;AACpD,MAAI,kBAAmB,cAAa,KAAK,kBAAkB;AAC3D,MAAI,aAAc,cAAa,KAAK,cAAc;AAClD,MAAI,2BAA4B,cAAa,KAAK,2BAA2B;AAC7E,MAAI,sBAAsB;AACxB,iBAAa,KAAK,uBAAuB,uBAAuB;AAAA,EAClE;AACA,SAAO;AAAA,IACL,YAAY,uBACR,aACA,6BACE,sBACA,eACE,cACA;AAAA,IACR;AAAA,EACF;AACF;AAEO,SAAS,iCACd,eACA,YACS;AACT,SAAO,8BAA8B,aAAa,EAAE,aAAa,SAAS,UAAU;AACtF;AAGO,IAAM,yBAAyB,EAAE,KAAK,CAAC,QAAQ,aAAa,cAAc,CAAC;AAG3E,IAAM,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