@opengeni/contracts 3.1.0-canary.1 → 3.1.2
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/agent-authored-durable-text.d.ts +9 -9
- package/dist/agent-config.d.ts +971 -0
- package/dist/agent-instruction-changes.d.ts +110 -0
- package/dist/agent-learning.d.ts +243 -0
- package/dist/allowance-refusal.d.ts +9 -0
- package/dist/allowance-refusal.js +50 -0
- package/dist/allowance-refusal.js.map +1 -0
- package/dist/analytics-consent-report.d.ts +19 -0
- package/dist/analytics-consent-report.js +10 -0
- package/dist/analytics-consent-report.js.map +1 -0
- package/dist/api-key-presets.d.ts +19 -0
- package/dist/artifact-catalog.d.ts +188 -0
- package/dist/artifacts.d.ts +86 -0
- package/dist/atlassian-native-retirement.d.ts +16 -0
- package/dist/atlassian-native-retirement.js +30 -0
- package/dist/atlassian-native-retirement.js.map +1 -0
- package/dist/atlassian.d.ts +1 -0
- package/dist/atlassian.js +34 -19
- package/dist/browser-storage.d.ts +5 -0
- package/dist/browser-storage.js +9 -0
- package/dist/browser-storage.js.map +1 -0
- package/dist/bundled-skills.d.ts +24 -1
- package/dist/canonical-human-identities.js +2 -1
- package/dist/chunk-2ZIHHL72.js +153 -0
- package/dist/chunk-2ZIHHL72.js.map +1 -0
- package/dist/{chunk-5LYFSZ7O.js → chunk-352X6ENP.js} +31 -31
- package/dist/chunk-4JGHSSB7.js +11 -0
- package/dist/chunk-4JGHSSB7.js.map +1 -0
- package/dist/chunk-4QO6GJUX.js +85 -0
- package/dist/chunk-4QO6GJUX.js.map +1 -0
- package/dist/chunk-4VDMHLLL.js +49 -0
- package/dist/chunk-4VDMHLLL.js.map +1 -0
- package/dist/chunk-56SNIMDO.js +9 -0
- package/dist/chunk-56SNIMDO.js.map +1 -0
- package/dist/chunk-6C2HKFTU.js +207 -0
- package/dist/chunk-6C2HKFTU.js.map +1 -0
- package/dist/chunk-6IXO76Z6.js +72 -0
- package/dist/chunk-6IXO76Z6.js.map +1 -0
- package/dist/chunk-7272KVWZ.js +60 -0
- package/dist/chunk-7272KVWZ.js.map +1 -0
- package/dist/{chunk-7ABONTXE.js → chunk-E3GGUBHS.js} +49 -5
- package/dist/chunk-E3GGUBHS.js.map +1 -0
- package/dist/chunk-EFZYKUE2.js +767 -0
- package/dist/chunk-EFZYKUE2.js.map +1 -0
- package/dist/chunk-EKWNTOG3.js +154 -0
- package/dist/chunk-EKWNTOG3.js.map +1 -0
- package/dist/chunk-HABQ7ADB.js +234 -0
- package/dist/chunk-HABQ7ADB.js.map +1 -0
- package/dist/chunk-HRRU4QPI.js +91 -0
- package/dist/chunk-HRRU4QPI.js.map +1 -0
- package/dist/{chunk-3SIZGL3O.js → chunk-IK36LXKC.js} +18 -2
- package/dist/chunk-IK36LXKC.js.map +1 -0
- package/dist/{chunk-TXTQIYCV.js → chunk-ILJ72KPO.js} +56 -3
- package/dist/chunk-ILJ72KPO.js.map +1 -0
- package/dist/chunk-J4HQ3UKY.js +93 -0
- package/dist/chunk-J4HQ3UKY.js.map +1 -0
- package/dist/chunk-KHHZTBP7.js +11 -0
- package/dist/chunk-KHHZTBP7.js.map +1 -0
- package/dist/{chunk-WYBDERIY.js → chunk-LZ2LAHIX.js} +47 -41
- package/dist/chunk-LZ2LAHIX.js.map +1 -0
- package/dist/chunk-NDZHPTCL.js +400 -0
- package/dist/chunk-NDZHPTCL.js.map +1 -0
- package/dist/chunk-OF6OKOBF.js +54793 -0
- package/dist/chunk-OF6OKOBF.js.map +1 -0
- package/dist/chunk-OL23ARTF.js +94 -0
- package/dist/chunk-OL23ARTF.js.map +1 -0
- package/dist/chunk-PUIUXIOL.js +189 -0
- package/dist/chunk-PUIUXIOL.js.map +1 -0
- package/dist/{chunk-WBYTNVIW.js → chunk-RKX3NQYS.js} +1 -1
- package/dist/{chunk-Y3KNXVTD.js → chunk-RMWXDZEO.js} +128 -21
- package/dist/chunk-RMWXDZEO.js.map +1 -0
- package/dist/{chunk-MRWYRAS5.js → chunk-SHO4YO4B.js} +27 -35
- package/dist/chunk-SHO4YO4B.js.map +1 -0
- package/dist/chunk-SWRN2DJ3.js +153 -0
- package/dist/chunk-SWRN2DJ3.js.map +1 -0
- package/dist/chunk-TCXCRBPF.js +267 -0
- package/dist/chunk-TCXCRBPF.js.map +1 -0
- package/dist/chunk-TLU3UEMD.js +324 -0
- package/dist/chunk-TLU3UEMD.js.map +1 -0
- package/dist/chunk-TSWWZMUS.js +186 -0
- package/dist/chunk-TSWWZMUS.js.map +1 -0
- package/dist/{chunk-PX3VCKAU.js → chunk-WVCFSOUZ.js} +1 -1
- package/dist/{chunk-PX3VCKAU.js.map → chunk-WVCFSOUZ.js.map} +1 -1
- package/dist/chunk-XDLAGX66.js +127 -0
- package/dist/chunk-XDLAGX66.js.map +1 -0
- package/dist/chunk-YKZ4WU4P.js +33 -0
- package/dist/chunk-YKZ4WU4P.js.map +1 -0
- package/dist/{chunk-O5LEQHDM.js → chunk-Z7WEVGCL.js} +3 -3
- package/dist/{chunk-YBW5JSA3.js → chunk-ZDCRWCGZ.js} +119 -101
- package/dist/chunk-ZDCRWCGZ.js.map +1 -0
- package/dist/claude-provider-account-authority.d.ts +18 -0
- package/dist/claude-subscription-oauth.d.ts +42 -0
- package/dist/claude-subscription-usage.d.ts +159 -0
- package/dist/client-error-report.d.ts +158 -0
- package/dist/client-error-report.js +164 -0
- package/dist/client-error-report.js.map +1 -0
- package/dist/code-search.d.ts +52 -0
- package/dist/code-search.js +40 -0
- package/dist/code-search.js.map +1 -0
- package/dist/codex-provider-account-authority.js +20 -12
- package/dist/codex-provider-account-authority.js.map +1 -1
- package/dist/company-brain.d.ts +19 -81
- package/dist/company-profile.d.ts +144 -6
- package/dist/connect.d.ts +37 -0
- package/dist/connect.js +216 -159
- package/dist/connect.js.map +1 -1
- package/dist/connection-account-label.d.ts +2 -0
- package/dist/connection-account-label.js +35 -0
- package/dist/connection-account-label.js.map +1 -0
- package/dist/connection-authority.d.ts +9 -317
- package/dist/connection-authority.js +37 -42
- package/dist/connector-attachments.js +2 -1
- package/dist/connector-destinations.js +2 -1
- package/dist/connector-tool-permissions.d.ts +137 -0
- package/dist/cua-desktop-tools.d.ts +17 -0
- package/dist/define-schema.d.ts +8 -0
- package/dist/direct-model-provider.d.ts +36 -0
- package/dist/editable-artifact-codec-registry.js +5 -5
- package/dist/editable-artifact-committed-transaction.js +3 -2
- package/dist/editable-artifact-live.js +5 -5
- package/dist/editable-artifact-serialized-commit.js +6 -6
- package/dist/editable-artifact-versions.d.ts +7 -1
- package/dist/editable-artifact-versions.js +1 -1
- package/dist/editable-artifacts.js +62 -56
- package/dist/event-preview.d.ts +22 -0
- package/dist/external-identities.d.ts +174 -0
- package/dist/external-identities.js +15 -4
- package/dist/first-party-tool-authorization.d.ts +815 -0
- package/dist/github-repository-contracts.js +60 -43
- package/dist/github-repository-contracts.js.map +1 -1
- package/dist/google-drive.d.ts +2 -1
- package/dist/google-drive.js +305 -238
- package/dist/google-drive.js.map +1 -1
- package/dist/host-mcp-bindings.d.ts +39 -10
- package/dist/host-mcp-bindings.js +256 -171
- package/dist/host-mcp-bindings.js.map +1 -1
- package/dist/image-generation.d.ts +1 -0
- package/dist/index.d.ts +15715 -3850
- package/dist/index.js +2088 -289
- package/dist/insights-usage.d.ts +877 -0
- package/dist/insights-usage.js +559 -0
- package/dist/insights-usage.js.map +1 -0
- package/dist/interaction.d.ts +1176 -829
- package/dist/knowledge-entries.d.ts +984 -0
- package/dist/knowledge-preparation.d.ts +239 -0
- package/dist/managed-auth-session-sets.d.ts +7 -0
- package/dist/managed-auth-session-sets.js +198 -132
- package/dist/managed-auth-session-sets.js.map +1 -1
- package/dist/managed-sign-in-methods.d.ts +56 -0
- package/dist/managed-sign-in-methods.js +64 -0
- package/dist/managed-sign-in-methods.js.map +1 -0
- package/dist/mcp-catalog-limits.d.ts +2 -0
- package/dist/mcp-endpoint.js +9 -0
- package/dist/mcp-endpoint.js.map +1 -0
- package/dist/mcp-oauth.d.ts +2 -2
- package/dist/mcp-structured-content.d.ts +25 -0
- package/dist/modal-native-proof-v2.d.ts +587 -0
- package/dist/modal-native-proof-v2.js +38 -0
- package/dist/modal-native-proof-v2.js.map +1 -0
- package/dist/model-account-choice.d.ts +235 -0
- package/dist/model-account-settings.d.ts +422 -0
- package/dist/model-availability.d.ts +15 -0
- package/dist/model-connection-access.d.ts +13 -0
- package/dist/model-context-inspector.d.ts +98 -0
- package/dist/model-display.d.ts +43 -0
- package/dist/model-display.js +17 -0
- package/dist/model-display.js.map +1 -0
- package/dist/model-picker-order.d.ts +3 -1
- package/dist/model-picker-order.js +3 -0
- package/dist/model-picker-order.js.map +1 -1
- package/dist/organization-access.d.ts +412 -0
- package/dist/organization-access.js +39 -0
- package/dist/organization-access.js.map +1 -0
- package/dist/organization-integration-policy.d.ts +27 -0
- package/dist/organization-membership-lifecycle.d.ts +38 -0
- package/dist/organization-model-usage.d.ts +146 -0
- package/dist/organization-model-usage.js +78 -0
- package/dist/organization-model-usage.js.map +1 -0
- package/dist/organization-recovery.js +2 -1
- package/dist/organization-usage.d.ts +138 -0
- package/dist/permissions.d.ts +18 -0
- package/dist/personal-github.d.ts +1 -0
- package/dist/personal-github.js +199 -144
- package/dist/personal-github.js.map +1 -1
- package/dist/plugin-discovery.js +1 -1
- package/dist/prepared-mcp-setup.d.ts +54 -0
- package/dist/prepared-mcp-setup.js +12 -0
- package/dist/prepared-mcp-setup.js.map +1 -0
- package/dist/product-analytics.d.ts +116 -0
- package/dist/product-lifecycle-facts.d.ts +73 -0
- package/dist/remember.d.ts +98 -6
- package/dist/retained-output.d.ts +8 -0
- package/dist/sandbox-file-artifacts.d.ts +1 -0
- package/dist/sandbox-provider-command.d.ts +91 -1
- package/dist/sandbox-recovery.d.ts +146 -0
- package/dist/secret-generator.d.ts +44 -0
- package/dist/secret-references.d.ts +90 -0
- package/dist/secret-resolution.d.ts +111 -0
- package/dist/secret-totp.d.ts +41 -0
- package/dist/session-final-reply.d.ts +6 -0
- package/dist/session-final-reply.js +9 -0
- package/dist/session-final-reply.js.map +1 -0
- package/dist/session-goal-reports.d.ts +21 -0
- package/dist/session-history-import.d.ts +1272 -0
- package/dist/session-list-entries.d.ts +4 -0
- package/dist/session-list-entries.js +56 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-mcp-projections.d.ts +6 -0
- package/dist/session-mcp-tool-permissions.d.ts +62 -0
- package/dist/session-message-search.d.ts +68 -0
- package/dist/session-target.d.ts +18 -0
- package/dist/session-titles.d.ts +8 -0
- package/dist/session-titles.js +5 -1
- package/dist/session-usage-limit-refusal.d.ts +34 -0
- package/dist/session-usage-limit-refusal.js +15 -0
- package/dist/session-usage-limit-refusal.js.map +1 -0
- package/dist/session-usage-limits.d.ts +127 -0
- package/dist/session-usage-limits.js +41 -0
- package/dist/session-usage-limits.js.map +1 -0
- package/dist/signup-attribution.d.ts +39 -0
- package/dist/site-data.d.ts +286 -0
- package/dist/site-operations.d.ts +39 -0
- package/dist/site-publishing.d.ts +778 -0
- package/dist/site-session-http.d.ts +89 -4
- package/dist/site-session-http.js +25 -1
- package/dist/site-sql.d.ts +421 -0
- package/dist/skill-catalog-context.d.ts +7 -0
- package/dist/skill-files.d.ts +1 -1
- package/dist/skill-use.d.ts +61 -0
- package/dist/skills.d.ts +15 -0
- package/dist/slack-bot-scopes.d.ts +17 -12
- package/dist/slack-bot-scopes.js +10 -3
- package/dist/slack-rest-mcp.d.ts +36 -0
- package/dist/slack-rest-mcp.js +25 -0
- package/dist/slack-rest-mcp.js.map +1 -0
- package/dist/spreadsheet-artifact-commands.d.ts +14 -1
- package/dist/spreadsheet-artifact-commands.js +8 -2
- package/dist/spreadsheet-artifact-query.d.ts +13 -6
- package/dist/spreadsheet-artifact-query.js +3 -3
- package/dist/subscription-account-actions.d.ts +64 -0
- package/dist/subscription-account-pools.d.ts +292 -0
- package/dist/subscription-personal-authority-v2.d.ts +28 -0
- package/dist/subscription-personal-authority-v2.js +12 -0
- package/dist/subscription-personal-authority-v2.js.map +1 -0
- package/dist/tool-action-review.d.ts +132 -0
- package/dist/tool-catalog.d.ts +408 -0
- package/dist/tool-policy.d.ts +5 -0
- package/dist/tool-review-presentation.d.ts +12 -0
- package/dist/tool-review-presentation.js +17 -0
- package/dist/tool-review-presentation.js.map +1 -0
- package/dist/transcription-recordings.d.ts +21 -0
- package/dist/turn-serving-policy.d.ts +221 -0
- package/dist/usage-allowances.d.ts +314 -0
- package/dist/usage-allowances.js +52 -0
- package/dist/usage-allowances.js.map +1 -0
- package/dist/vaults.d.ts +1286 -0
- package/dist/video-generation.d.ts +3 -0
- package/dist/video-generation.js +2 -1
- package/dist/workspace-instruction-policies.d.ts +13 -0
- package/dist/workspace-integration-wire.d.ts +36 -0
- package/dist/workspace-integration-wire.js +23 -0
- package/dist/workspace-integration-wire.js.map +1 -0
- package/dist/workspace-integrations.d.ts +1028 -0
- package/dist/workspace-state.d.ts +85 -416
- package/dist/xai-provider-account-authority.js +2 -1
- package/package.json +98 -2
- package/src/agent-authored-durable-text.ts +14 -11
- package/src/agent-config.ts +1698 -0
- package/src/agent-instruction-changes.ts +115 -0
- package/src/agent-learning.ts +188 -0
- package/src/agent-topology.ts +57 -52
- package/src/allowance-refusal.ts +81 -0
- package/src/analytics-consent-report.ts +20 -0
- package/src/api-key-presets.ts +28 -0
- package/src/artifact-catalog.ts +82 -0
- package/src/artifacts.ts +299 -227
- package/src/atlassian-native-retirement.ts +33 -0
- package/src/atlassian.ts +135 -108
- package/src/browser-storage.ts +10 -0
- package/src/bundled-skills.ts +60 -17
- package/src/canonical-human-identities.ts +60 -58
- package/src/claude-provider-account-authority.ts +12 -0
- package/src/claude-subscription-oauth.ts +73 -0
- package/src/claude-subscription-usage.ts +68 -0
- package/src/client-error-report.ts +343 -0
- package/src/code-search.ts +105 -0
- package/src/codex-provider-account-authority.ts +21 -16
- package/src/company-brain-governed-writes.ts +255 -233
- package/src/company-brain.ts +164 -153
- package/src/company-profile.ts +365 -292
- package/src/connect.ts +212 -173
- package/src/connection-account-label.ts +46 -0
- package/src/connection-authority.ts +183 -364
- package/src/connector-attachments.ts +137 -122
- package/src/connector-destinations.ts +46 -42
- package/src/connector-tool-permissions.ts +117 -0
- package/src/cua-desktop-tools.gen.json +6512 -0
- package/src/cua-desktop-tools.linux.gen.json +6600 -0
- package/src/cua-desktop-tools.ts +36 -0
- package/src/cua-desktop-tools.windows.gen.json +6353 -0
- package/src/define-schema.ts +10 -0
- package/src/direct-model-provider.ts +108 -0
- package/src/editable-artifact-committed-transaction.ts +17 -0
- package/src/editable-artifact-versions.ts +7 -1
- package/src/event-preview.ts +53 -3
- package/src/external-identities.ts +262 -145
- package/src/feedback.ts +43 -30
- package/src/first-party-tool-authorization.ts +356 -0
- package/src/github-repository-contracts.ts +78 -64
- package/src/google-drive.ts +285 -234
- package/src/governed-learning-activation.ts +152 -131
- package/src/governed-learning-evaluator.ts +140 -133
- package/src/host-mcp-bindings.ts +292 -198
- package/src/image-generation.ts +104 -95
- package/src/index.ts +13354 -8654
- package/src/insights-usage.ts +727 -0
- package/src/interaction.ts +3070 -2326
- package/src/knowledge-entries.ts +428 -0
- package/src/knowledge-preparation.ts +57 -0
- package/src/knowledge.ts +246 -213
- package/src/managed-auth-session-sets.ts +220 -144
- package/src/managed-sign-in-methods.ts +52 -0
- package/src/mcp-catalog-limits.ts +2 -0
- package/src/mcp-oauth.ts +43 -34
- package/src/mcp-receipts.ts +192 -192
- package/src/mcp-structured-content.ts +81 -0
- package/src/memory-slack-delivery.ts +171 -142
- package/src/modal-native-proof-v2.ts +429 -0
- package/src/model-account-choice.ts +177 -0
- package/src/model-account-settings.ts +210 -0
- package/src/model-availability.ts +22 -0
- package/src/model-connection-access.ts +61 -14
- package/src/model-context-inspector.ts +133 -99
- package/src/model-display.ts +221 -0
- package/src/model-picker-order.ts +12 -1
- package/src/organization-access.ts +217 -0
- package/src/organization-integration-policy.ts +63 -0
- package/src/organization-membership-lifecycle.ts +528 -382
- package/src/organization-model-usage.ts +81 -0
- package/src/organization-recovery.ts +147 -135
- package/src/organization-usage.ts +94 -0
- package/src/permissions.ts +88 -52
- package/src/personal-github.ts +210 -171
- package/src/preference-registry.ts +314 -258
- package/src/prepared-mcp-setup.ts +189 -0
- package/src/product-analytics.ts +261 -0
- package/src/product-lifecycle-facts.ts +122 -0
- package/src/remember.ts +181 -167
- package/src/retained-output.ts +194 -165
- package/src/sandbox-file-artifacts.ts +60 -47
- package/src/sandbox-provider-command.ts +88 -20
- package/src/sandbox-recovery.ts +129 -0
- package/src/scoped-knowledge.ts +61 -43
- package/src/secret-generator.ts +155 -0
- package/src/secret-references.ts +414 -0
- package/src/secret-resolution.ts +274 -0
- package/src/secret-totp.ts +188 -0
- package/src/session-final-reply.ts +16 -0
- package/src/session-goal-reports.ts +64 -0
- package/src/session-history-import.ts +177 -0
- package/src/session-list-entries.ts +96 -0
- package/src/session-mcp-projections.ts +11 -0
- package/src/session-mcp-tool-permissions.ts +108 -0
- package/src/session-message-search.ts +61 -0
- package/src/session-target.ts +57 -0
- package/src/session-titles.ts +80 -10
- package/src/session-topology-primitives.ts +19 -12
- package/src/session-usage-limit-refusal.ts +101 -0
- package/src/session-usage-limits.ts +171 -0
- package/src/signup-attribution.ts +86 -0
- package/src/site-data.ts +339 -0
- package/src/site-operations.ts +154 -0
- package/src/site-publishing.ts +876 -0
- package/src/site-session-http.ts +294 -16
- package/src/site-sql.ts +1123 -0
- package/src/skill-catalog-context.ts +50 -0
- package/src/skill-files.ts +3 -3
- package/src/skill-use.ts +80 -0
- package/src/skills.ts +82 -54
- package/src/slack-bot-scopes.ts +31 -39
- package/src/slack-rest-mcp.ts +222 -0
- package/src/slack-task-policy.ts +96 -73
- package/src/spreadsheet-artifact-commands.ts +73 -2
- package/src/spreadsheet-artifact-query.ts +187 -39
- package/src/subscription-account-actions.ts +84 -0
- package/src/subscription-account-pools.ts +53 -0
- package/src/subscription-personal-authority-v2.ts +66 -0
- package/src/task-notes.ts +55 -51
- package/src/tool-action-review.ts +258 -0
- package/src/tool-catalog.ts +609 -372
- package/src/tool-policy.ts +82 -0
- package/src/tool-result-spill.ts +12 -9
- package/src/tool-review-presentation.ts +385 -0
- package/src/transcription-recordings.ts +145 -131
- package/src/turn-serving-policy.ts +166 -0
- package/src/usage-allowances.ts +248 -0
- package/src/vaults.ts +850 -0
- package/src/video-generation.ts +385 -360
- package/src/work-claims.ts +173 -149
- package/src/workspace-instruction-policies.ts +349 -275
- package/src/workspace-integration-wire.ts +101 -0
- package/src/workspace-integrations.ts +724 -0
- package/src/workspace-learning-administration.ts +57 -44
- package/src/workspace-learning-policy.ts +127 -96
- package/src/workspace-state.ts +253 -333
- package/src/xai-provider-account-authority.ts +22 -17
- package/dist/chunk-3SIZGL3O.js.map +0 -1
- package/dist/chunk-7ABONTXE.js.map +0 -1
- package/dist/chunk-BCS7WHCK.js +0 -139
- package/dist/chunk-BCS7WHCK.js.map +0 -1
- package/dist/chunk-GRG7PHWQ.js +0 -25
- package/dist/chunk-GRG7PHWQ.js.map +0 -1
- package/dist/chunk-JUFK3T4Q.js +0 -80
- package/dist/chunk-JUFK3T4Q.js.map +0 -1
- package/dist/chunk-M5ZGRVIQ.js +0 -719
- package/dist/chunk-M5ZGRVIQ.js.map +0 -1
- package/dist/chunk-MRWYRAS5.js.map +0 -1
- package/dist/chunk-OSBYTE3O.js +0 -348
- package/dist/chunk-OSBYTE3O.js.map +0 -1
- package/dist/chunk-P3HLDT77.js +0 -59
- package/dist/chunk-P3HLDT77.js.map +0 -1
- package/dist/chunk-TEMFILR7.js +0 -143
- package/dist/chunk-TEMFILR7.js.map +0 -1
- package/dist/chunk-TXTQIYCV.js.map +0 -1
- package/dist/chunk-UR2GFYIE.js +0 -22598
- package/dist/chunk-UR2GFYIE.js.map +0 -1
- package/dist/chunk-WYBDERIY.js.map +0 -1
- package/dist/chunk-Y3KNXVTD.js.map +0 -1
- package/dist/chunk-YBW5JSA3.js.map +0 -1
- package/dist/chunk-YRXAWWCU.js +0 -45
- package/dist/chunk-YRXAWWCU.js.map +0 -1
- /package/dist/{chunk-5LYFSZ7O.js.map → chunk-352X6ENP.js.map} +0 -0
- /package/dist/{chunk-WBYTNVIW.js.map → chunk-RKX3NQYS.js.map} +0 -0
- /package/dist/{chunk-O5LEQHDM.js.map → chunk-Z7WEVGCL.js.map} +0 -0
package/src/google-drive.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineSchema } from "./define-schema";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
|
|
3
4
|
import { ConnectionMetadata } from "./index";
|
|
@@ -21,13 +22,15 @@ export const GOOGLE_DRIVE_PUBLICATION_SERVER_ID = "google-drive-publishing" as c
|
|
|
21
22
|
export const GOOGLE_DRIVE_PUBLICATION_TOOL_NAME = "google_drive_publish_file" as const;
|
|
22
23
|
export const GOOGLE_DRIVE_PUBLICATION_CREATE_ACTION = "create" as const;
|
|
23
24
|
|
|
24
|
-
export const GoogleDriveOAuthCapability =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
export const GoogleDriveOAuthCapability = /* @__PURE__ */ defineSchema(() =>
|
|
26
|
+
z.enum([
|
|
27
|
+
"picker_file_read",
|
|
28
|
+
"publish_file",
|
|
29
|
+
"source_metadata_discovery",
|
|
30
|
+
"source_content_read",
|
|
31
|
+
"recursive_source_sync",
|
|
32
|
+
]),
|
|
33
|
+
);
|
|
31
34
|
export type GoogleDriveOAuthCapability = z.infer<typeof GoogleDriveOAuthCapability>;
|
|
32
35
|
|
|
33
36
|
export type GoogleDriveOAuthScopeDecision = {
|
|
@@ -36,7 +39,7 @@ export type GoogleDriveOAuthScopeDecision = {
|
|
|
36
39
|
};
|
|
37
40
|
|
|
38
41
|
/**
|
|
39
|
-
* Converts exact Google OAuth grants into the Drive capabilities
|
|
42
|
+
* Converts exact Google OAuth grants into the Drive capabilities Opengeni may
|
|
40
43
|
* rely on. Unknown or malformed grants add no authority. In particular,
|
|
41
44
|
* drive.file covers only files explicitly opened or shared with the app and
|
|
42
45
|
* never authorizes arbitrary recursive descendant discovery.
|
|
@@ -78,281 +81,329 @@ export function googleDriveScopesAllowCapability(
|
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
/** @deprecated Connector document destinations use organization/workspace/personal authority. */
|
|
81
|
-
export const GoogleDriveTargetScope =
|
|
84
|
+
export const GoogleDriveTargetScope = /* @__PURE__ */ defineSchema(() =>
|
|
85
|
+
z.enum(["user", "workspace", "organization"]),
|
|
86
|
+
);
|
|
82
87
|
export type GoogleDriveTargetScope = z.infer<typeof GoogleDriveTargetScope>;
|
|
83
88
|
|
|
84
|
-
export const GoogleDriveSyncCadence =
|
|
89
|
+
export const GoogleDriveSyncCadence = /* @__PURE__ */ defineSchema(() =>
|
|
90
|
+
z.enum(["manual", "hourly", "daily"]),
|
|
91
|
+
);
|
|
85
92
|
export type GoogleDriveSyncCadence = z.infer<typeof GoogleDriveSyncCadence>;
|
|
86
93
|
|
|
87
|
-
export const GoogleDriveReadPolicy =
|
|
94
|
+
export const GoogleDriveReadPolicy = /* @__PURE__ */ defineSchema(() =>
|
|
95
|
+
z.enum(["allow", "ask", "block"]),
|
|
96
|
+
);
|
|
88
97
|
export type GoogleDriveReadPolicy = z.infer<typeof GoogleDriveReadPolicy>;
|
|
89
98
|
|
|
90
|
-
export const GoogleDriveConnectionLifecycleState =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
export const GoogleDriveConnectionLifecycleState = /* @__PURE__ */ defineSchema(() =>
|
|
100
|
+
z.enum([
|
|
101
|
+
"active",
|
|
102
|
+
"paused",
|
|
103
|
+
"token_revoked",
|
|
104
|
+
"app_removed",
|
|
105
|
+
"disconnected",
|
|
106
|
+
"reconnect_required",
|
|
107
|
+
"reconsent_required",
|
|
108
|
+
]),
|
|
109
|
+
);
|
|
99
110
|
export type GoogleDriveConnectionLifecycleState = z.infer<
|
|
100
111
|
typeof GoogleDriveConnectionLifecycleState
|
|
101
112
|
>;
|
|
102
113
|
|
|
103
|
-
const GoogleDriveLifecycleObservedAt =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
114
|
+
const GoogleDriveLifecycleObservedAt = /* @__PURE__ */ defineSchema(() =>
|
|
115
|
+
z.string().datetime({ offset: true }),
|
|
116
|
+
);
|
|
117
|
+
export const GoogleDriveConnectionLifecycle = /* @__PURE__ */ defineSchema(() =>
|
|
118
|
+
z.discriminatedUnion("state", [
|
|
119
|
+
z.object({
|
|
120
|
+
state: z.literal("active"),
|
|
121
|
+
recoverable: z.literal(true),
|
|
122
|
+
observedAt: GoogleDriveLifecycleObservedAt,
|
|
123
|
+
}),
|
|
124
|
+
z.object({
|
|
125
|
+
state: z.literal("paused"),
|
|
126
|
+
recoverable: z.literal(true),
|
|
127
|
+
observedAt: GoogleDriveLifecycleObservedAt,
|
|
128
|
+
}),
|
|
129
|
+
z.object({
|
|
130
|
+
state: z.literal("token_revoked"),
|
|
131
|
+
recoverable: z.literal(true),
|
|
132
|
+
observedAt: GoogleDriveLifecycleObservedAt,
|
|
133
|
+
}),
|
|
134
|
+
z.object({
|
|
135
|
+
state: z.literal("app_removed"),
|
|
136
|
+
recoverable: z.literal(false),
|
|
137
|
+
observedAt: GoogleDriveLifecycleObservedAt,
|
|
138
|
+
}),
|
|
139
|
+
z.object({
|
|
140
|
+
state: z.literal("disconnected"),
|
|
141
|
+
recoverable: z.literal(true),
|
|
142
|
+
observedAt: GoogleDriveLifecycleObservedAt,
|
|
143
|
+
}),
|
|
144
|
+
z.object({
|
|
145
|
+
state: z.literal("reconnect_required"),
|
|
146
|
+
recoverable: z.literal(true),
|
|
147
|
+
observedAt: GoogleDriveLifecycleObservedAt,
|
|
148
|
+
}),
|
|
149
|
+
z.object({
|
|
150
|
+
state: z.literal("reconsent_required"),
|
|
151
|
+
recoverable: z.literal(true),
|
|
152
|
+
observedAt: GoogleDriveLifecycleObservedAt,
|
|
153
|
+
}),
|
|
154
|
+
]),
|
|
155
|
+
);
|
|
141
156
|
export type GoogleDriveConnectionLifecycle = z.infer<typeof GoogleDriveConnectionLifecycle>;
|
|
142
157
|
|
|
143
|
-
export const GoogleDriveSelectedSource =
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
})
|
|
158
|
+
export const GoogleDriveSelectedSource = /* @__PURE__ */ defineSchema(() =>
|
|
159
|
+
z.object({
|
|
160
|
+
id: z.string().min(1).max(256),
|
|
161
|
+
name: z.string().min(1).max(1024),
|
|
162
|
+
mimeType: z.string().min(1).max(256),
|
|
163
|
+
driveId: z.string().min(1).max(256).nullable().default(null),
|
|
164
|
+
destination: ConnectorDocumentDestination.optional(),
|
|
165
|
+
/** @deprecated Missing destinations resolve to the current workspace boundary. */
|
|
166
|
+
targetScope: GoogleDriveTargetScope.optional(),
|
|
167
|
+
syncCadence: GoogleDriveSyncCadence.default("hourly"),
|
|
168
|
+
syncEnabled: z.boolean().default(false),
|
|
169
|
+
configGeneration: z.number().int().positive().default(1),
|
|
170
|
+
readPolicy: GoogleDriveReadPolicy.default("allow"),
|
|
171
|
+
selectedAt: z.string().datetime({ offset: true }),
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
157
174
|
export type GoogleDriveSelectedSource = z.infer<typeof GoogleDriveSelectedSource>;
|
|
158
175
|
|
|
159
|
-
export const GoogleDriveOutputDestination =
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
export const GoogleDriveOutputDestination = /* @__PURE__ */ defineSchema(() =>
|
|
177
|
+
z
|
|
178
|
+
.object({
|
|
179
|
+
folderId: z.string().min(1).max(256),
|
|
180
|
+
folderName: z.string().min(1).max(1024),
|
|
181
|
+
driveId: z.string().min(1).max(256).nullable(),
|
|
182
|
+
location: z.enum(["my_drive", "shared_drive"]),
|
|
183
|
+
selectedAt: z.string().datetime({ offset: true }),
|
|
184
|
+
})
|
|
185
|
+
.strict()
|
|
186
|
+
.superRefine((value, context) => {
|
|
187
|
+
if ((value.location === "my_drive") !== (value.driveId === null)) {
|
|
188
|
+
context.addIssue({
|
|
189
|
+
code: "custom",
|
|
190
|
+
path: ["driveId"],
|
|
191
|
+
message: "Google Drive destination location does not match its drive identity",
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}),
|
|
195
|
+
);
|
|
177
196
|
export type GoogleDriveOutputDestination = z.infer<typeof GoogleDriveOutputDestination>;
|
|
178
197
|
|
|
179
|
-
export const GoogleDriveConnectionMetadata =
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
z.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
198
|
+
export const GoogleDriveConnectionMetadata = /* @__PURE__ */ defineSchema(() =>
|
|
199
|
+
z
|
|
200
|
+
.object({
|
|
201
|
+
credentialRole: z.literal(GOOGLE_DRIVE_CREDENTIAL_ROLE),
|
|
202
|
+
credentialLabel: z.union([
|
|
203
|
+
z.literal(GOOGLE_DRIVE_CREDENTIAL_LABEL),
|
|
204
|
+
z.literal(GOOGLE_DRIVE_LEGACY_CREDENTIAL_LABEL),
|
|
205
|
+
]),
|
|
206
|
+
googlePermissionId: z.string().min(1).max(256),
|
|
207
|
+
googleEmail: z.string().email().max(320),
|
|
208
|
+
googleDisplayName: z.string().min(1).max(512).nullable(),
|
|
209
|
+
verifiedAt: z.string().datetime({ offset: true }),
|
|
210
|
+
accessMode: z.enum(["file_only", "metadata_readonly", "readonly"]),
|
|
211
|
+
lifecycle: GoogleDriveConnectionLifecycle.optional(),
|
|
212
|
+
outputDestination: GoogleDriveOutputDestination.optional(),
|
|
213
|
+
documentDestination: ConnectorDocumentDestination.optional(),
|
|
214
|
+
selectedSources: z.array(GoogleDriveSelectedSource).max(100).optional(),
|
|
215
|
+
/** @deprecated Read `selectedSources`; retained while existing connections migrate. */
|
|
216
|
+
selectedSource: GoogleDriveSelectedSource.nullable().optional(),
|
|
217
|
+
})
|
|
218
|
+
.passthrough(),
|
|
219
|
+
);
|
|
199
220
|
export type GoogleDriveConnectionMetadata = z.infer<typeof GoogleDriveConnectionMetadata>;
|
|
200
221
|
|
|
201
|
-
export const GoogleDriveOAuthStartRequest =
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
222
|
+
export const GoogleDriveOAuthStartRequest = /* @__PURE__ */ defineSchema(() =>
|
|
223
|
+
z.object({
|
|
224
|
+
connectionId: z.string().uuid().optional(),
|
|
225
|
+
capability: z.enum(["source_read", "publish"]).default("source_read"),
|
|
226
|
+
}),
|
|
227
|
+
);
|
|
205
228
|
export type GoogleDriveOAuthStartRequest = z.infer<typeof GoogleDriveOAuthStartRequest>;
|
|
206
229
|
|
|
207
|
-
export const GoogleDriveOAuthStartResponse =
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
})
|
|
230
|
+
export const GoogleDriveOAuthStartResponse = /* @__PURE__ */ defineSchema(() =>
|
|
231
|
+
z.object({
|
|
232
|
+
authorizationUrl: z.string().url(),
|
|
233
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
234
|
+
}),
|
|
235
|
+
);
|
|
211
236
|
export type GoogleDriveOAuthStartResponse = z.infer<typeof GoogleDriveOAuthStartResponse>;
|
|
212
237
|
|
|
213
|
-
export const GoogleDriveLifecycleActionRequest =
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
238
|
+
export const GoogleDriveLifecycleActionRequest = /* @__PURE__ */ defineSchema(() =>
|
|
239
|
+
z.object({
|
|
240
|
+
action: z.enum(["pause", "resume"]),
|
|
241
|
+
expectedVersion: z.number().int().positive(),
|
|
242
|
+
}),
|
|
243
|
+
);
|
|
217
244
|
export type GoogleDriveLifecycleActionRequest = z.infer<typeof GoogleDriveLifecycleActionRequest>;
|
|
218
245
|
|
|
219
|
-
export const GoogleDriveDisconnectRequest =
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
246
|
+
export const GoogleDriveDisconnectRequest = /* @__PURE__ */ defineSchema(() =>
|
|
247
|
+
z.object({
|
|
248
|
+
expectedVersion: z.number().int().positive(),
|
|
249
|
+
idempotencyKey: z.string().trim().min(1).max(200),
|
|
250
|
+
}),
|
|
251
|
+
);
|
|
223
252
|
export type GoogleDriveDisconnectRequest = z.infer<typeof GoogleDriveDisconnectRequest>;
|
|
224
253
|
|
|
225
|
-
export const GoogleDrivePublicationExportFile =
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
254
|
+
export const GoogleDrivePublicationExportFile = /* @__PURE__ */ defineSchema(() =>
|
|
255
|
+
z
|
|
256
|
+
.object({
|
|
257
|
+
fileId: z.string().uuid(),
|
|
258
|
+
filename: z.string().trim().min(1).max(512),
|
|
259
|
+
contentType: z.string().trim().min(1).max(256),
|
|
260
|
+
sizeBytes: z.number().int().positive(),
|
|
261
|
+
sha256: z.string().regex(/^[0-9a-f]{64}$/u),
|
|
262
|
+
artifactId: z.string().regex(/^[0-9a-f]{32}$/u),
|
|
263
|
+
versionId: z.string().regex(/^[0-9a-f]{32}$/u),
|
|
264
|
+
materializationJobId: z.string().regex(/^[0-9a-f]{32}$/u),
|
|
265
|
+
sourceHeadSequence: z.number().int().nonnegative(),
|
|
266
|
+
sourceStateHash: z.string().regex(/^sha256:[0-9a-f]{64}$/u),
|
|
267
|
+
})
|
|
268
|
+
.strict(),
|
|
269
|
+
);
|
|
239
270
|
export type GoogleDrivePublicationExportFile = z.infer<typeof GoogleDrivePublicationExportFile>;
|
|
240
271
|
|
|
241
|
-
export const GoogleDrivePublicationToolInput =
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
272
|
+
export const GoogleDrivePublicationToolInput = /* @__PURE__ */ defineSchema(() =>
|
|
273
|
+
z
|
|
274
|
+
.object({
|
|
275
|
+
title: z.string().trim().min(1).max(512),
|
|
276
|
+
modality: z.enum(["document", "spreadsheet", "presentation"]),
|
|
277
|
+
file: GoogleDrivePublicationExportFile,
|
|
278
|
+
idempotencyKey: z.string().trim().min(1).max(200),
|
|
279
|
+
})
|
|
280
|
+
.strict(),
|
|
281
|
+
);
|
|
249
282
|
export type GoogleDrivePublicationToolInput = z.infer<typeof GoogleDrivePublicationToolInput>;
|
|
250
283
|
|
|
251
|
-
export const GoogleDrivePublicationReceipt =
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
284
|
+
export const GoogleDrivePublicationReceipt = /* @__PURE__ */ defineSchema(() =>
|
|
285
|
+
z
|
|
286
|
+
.object({
|
|
287
|
+
connectionId: z.string().uuid(),
|
|
288
|
+
providerFileId: z.string().min(1).max(256),
|
|
289
|
+
webViewLink: z.string().url(),
|
|
290
|
+
mimeType: z.enum([
|
|
291
|
+
"application/vnd.google-apps.document",
|
|
292
|
+
"application/vnd.google-apps.spreadsheet",
|
|
293
|
+
"application/vnd.google-apps.presentation",
|
|
294
|
+
]),
|
|
295
|
+
destination: GoogleDriveOutputDestination,
|
|
296
|
+
replayed: z.boolean(),
|
|
297
|
+
})
|
|
298
|
+
.strict(),
|
|
299
|
+
);
|
|
265
300
|
export type GoogleDrivePublicationReceipt = z.infer<typeof GoogleDrivePublicationReceipt>;
|
|
266
301
|
|
|
267
|
-
export const GoogleDriveBrowseItem =
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
302
|
+
export const GoogleDriveBrowseItem = /* @__PURE__ */ defineSchema(() =>
|
|
303
|
+
z.object({
|
|
304
|
+
id: z.string().min(1).max(256),
|
|
305
|
+
name: z.string().min(1).max(1024),
|
|
306
|
+
mimeType: z.string().min(1).max(256),
|
|
307
|
+
kind: z.enum(["folder", "file"]),
|
|
308
|
+
driveId: z.string().min(1).max(256).nullable(),
|
|
309
|
+
modifiedTime: z.string().datetime({ offset: true }).nullable(),
|
|
310
|
+
size: z.string().regex(/^\d+$/).nullable(),
|
|
311
|
+
webViewLink: z.string().url().nullable(),
|
|
312
|
+
}),
|
|
313
|
+
);
|
|
277
314
|
export type GoogleDriveBrowseItem = z.infer<typeof GoogleDriveBrowseItem>;
|
|
278
315
|
|
|
279
|
-
export const GoogleDriveBrowseResponse =
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
316
|
+
export const GoogleDriveBrowseResponse = /* @__PURE__ */ defineSchema(() =>
|
|
317
|
+
z.object({
|
|
318
|
+
connection: z.lazy(() => ConnectionMetadata),
|
|
319
|
+
parentId: z.string().min(1).max(256),
|
|
320
|
+
current: GoogleDriveBrowseItem.nullable(),
|
|
321
|
+
items: z.array(GoogleDriveBrowseItem),
|
|
322
|
+
nextPageToken: z.string().min(1).max(4096).nullable(),
|
|
323
|
+
incompleteSearch: z.boolean(),
|
|
324
|
+
}),
|
|
325
|
+
);
|
|
287
326
|
export type GoogleDriveBrowseResponse = z.infer<typeof GoogleDriveBrowseResponse>;
|
|
288
327
|
|
|
289
|
-
const GoogleDriveSourceSelection =
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
328
|
+
const GoogleDriveSourceSelection = /* @__PURE__ */ defineSchema(() =>
|
|
329
|
+
z
|
|
330
|
+
.array(
|
|
331
|
+
GoogleDriveBrowseItem.pick({
|
|
332
|
+
id: true,
|
|
333
|
+
name: true,
|
|
334
|
+
mimeType: true,
|
|
335
|
+
driveId: true,
|
|
336
|
+
}),
|
|
337
|
+
)
|
|
338
|
+
.max(100)
|
|
339
|
+
.refine((sources) => new Set(sources.map((source) => source.id)).size === sources.length, {
|
|
340
|
+
message: "Google Drive sources must be unique",
|
|
296
341
|
}),
|
|
297
|
-
|
|
298
|
-
.max(100)
|
|
299
|
-
.refine((sources) => new Set(sources.map((source) => source.id)).size === sources.length, {
|
|
300
|
-
message: "Google Drive sources must be unique",
|
|
301
|
-
});
|
|
342
|
+
);
|
|
302
343
|
|
|
303
|
-
export const SaveGoogleDriveSourceRequest =
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
344
|
+
export const SaveGoogleDriveSourceRequest = /* @__PURE__ */ defineSchema(() =>
|
|
345
|
+
z
|
|
346
|
+
.object({
|
|
347
|
+
sources: GoogleDriveSourceSelection,
|
|
348
|
+
destination: ConnectorDocumentDestinationSelection.optional(),
|
|
349
|
+
/** @deprecated Legacy requests are accepted but resolve to workspace authority. */
|
|
350
|
+
targetScope: GoogleDriveTargetScope.optional(),
|
|
351
|
+
syncCadence: GoogleDriveSyncCadence.default("hourly"),
|
|
352
|
+
syncEnabled: z.boolean().default(false),
|
|
353
|
+
readPolicy: GoogleDriveReadPolicy.default("allow"),
|
|
354
|
+
})
|
|
355
|
+
.refine((request) => request.destination !== undefined || request.targetScope !== undefined, {
|
|
356
|
+
message: "Google Drive document destination is required",
|
|
357
|
+
}),
|
|
358
|
+
);
|
|
316
359
|
export type SaveGoogleDriveSourceRequest = z.infer<typeof SaveGoogleDriveSourceRequest>;
|
|
317
360
|
|
|
318
|
-
export const GoogleDriveKnowledgeSourceItem =
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
361
|
+
export const GoogleDriveKnowledgeSourceItem = /* @__PURE__ */ defineSchema(() =>
|
|
362
|
+
z.object({
|
|
363
|
+
id: z.string().min(1).max(512),
|
|
364
|
+
name: z.string().min(1).max(1024),
|
|
365
|
+
mimeType: z.string().min(1).max(256),
|
|
366
|
+
driveId: z.string().min(1).max(512).optional(),
|
|
367
|
+
sourceKind: z.enum(["my_drive", "shared_drive", "folder"]),
|
|
368
|
+
includeDescendants: z.boolean(),
|
|
369
|
+
}),
|
|
370
|
+
);
|
|
326
371
|
export type GoogleDriveKnowledgeSourceItem = z.infer<typeof GoogleDriveKnowledgeSourceItem>;
|
|
327
372
|
|
|
328
|
-
export const GoogleDriveKnowledgeSourceDestination =
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
373
|
+
export const GoogleDriveKnowledgeSourceDestination = /* @__PURE__ */ defineSchema(() =>
|
|
374
|
+
z.object({
|
|
375
|
+
authorityKind: z.enum(["organization", "workspace", "personal"]),
|
|
376
|
+
authorityAccountId: z.string().min(1).max(128),
|
|
377
|
+
authorityWorkspaceId: z.string().min(1).max(128).optional(),
|
|
378
|
+
authoritySubjectId: z.string().min(1).max(512).optional(),
|
|
379
|
+
collectionId: z.string().min(1).max(512).optional(),
|
|
380
|
+
}),
|
|
381
|
+
);
|
|
335
382
|
export type GoogleDriveKnowledgeSourceDestination = z.infer<
|
|
336
383
|
typeof GoogleDriveKnowledgeSourceDestination
|
|
337
384
|
>;
|
|
338
385
|
|
|
339
|
-
export const GoogleDriveKnowledgeSourceConfig =
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
386
|
+
export const GoogleDriveKnowledgeSourceConfig = /* @__PURE__ */ defineSchema(() =>
|
|
387
|
+
z.object({
|
|
388
|
+
sources: z.array(GoogleDriveKnowledgeSourceItem).min(1).max(100),
|
|
389
|
+
destination: GoogleDriveKnowledgeSourceDestination,
|
|
390
|
+
syncCadence: GoogleDriveSyncCadence,
|
|
391
|
+
readPolicy: GoogleDriveReadPolicy,
|
|
392
|
+
}),
|
|
393
|
+
);
|
|
345
394
|
export type GoogleDriveKnowledgeSourceConfig = z.infer<typeof GoogleDriveKnowledgeSourceConfig>;
|
|
346
395
|
|
|
347
|
-
export const SaveGoogleDriveIntegrationSourceRequest =
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
396
|
+
export const SaveGoogleDriveIntegrationSourceRequest = /* @__PURE__ */ defineSchema(() =>
|
|
397
|
+
z.intersection(
|
|
398
|
+
SaveGoogleDriveSourceRequest,
|
|
399
|
+
z.object({
|
|
400
|
+
sources: GoogleDriveSourceSelection.refine((sources) => sources.length > 0, {
|
|
401
|
+
message: "At least one Google Drive source is required",
|
|
402
|
+
}),
|
|
403
|
+
expectedVersion: z.number().int().positive().optional(),
|
|
404
|
+
idempotencyKey: z.string().uuid(),
|
|
352
405
|
}),
|
|
353
|
-
|
|
354
|
-
idempotencyKey: z.string().uuid(),
|
|
355
|
-
}),
|
|
406
|
+
),
|
|
356
407
|
);
|
|
357
408
|
export type SaveGoogleDriveIntegrationSourceRequest = z.infer<
|
|
358
409
|
typeof SaveGoogleDriveIntegrationSourceRequest
|