@opengeni/contracts 3.1.0-canary.2 → 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 +0 -2
- 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-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-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 +138 -0
- package/dist/external-identities.js +9 -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 +5 -0
- package/dist/host-mcp-bindings.js +233 -170
- package/dist/host-mcp-bindings.js.map +1 -1
- package/dist/image-generation.d.ts +1 -0
- package/dist/index.d.ts +16761 -5946
- package/dist/index.js +1973 -260
- 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 +81 -2
- 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-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/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-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/xai-provider-account-authority.js +2 -1
- package/package.json +93 -5
- package/src/agent-authored-durable-text.ts +14 -11
- package/src/agent-config.ts +1698 -0
- package/src/agent-instruction-changes.ts +91 -74
- package/src/agent-learning.ts +94 -67
- 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 +249 -176
- 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 +252 -198
- package/src/image-generation.ts +104 -95
- package/src/index.ts +13235 -8687
- package/src/insights-usage.ts +727 -0
- package/src/interaction.ts +3070 -2326
- package/src/knowledge-entries.ts +361 -276
- 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 -276
- 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 +250 -220
- package/src/xai-provider-account-authority.ts +22 -17
- package/dist/chunk-2AC63F4S.js +0 -171
- package/dist/chunk-2AC63F4S.js.map +0 -1
- 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-OVFORMPW.js +0 -348
- package/dist/chunk-OVFORMPW.js.map +0 -1
- package/dist/chunk-P3HLDT77.js +0 -59
- package/dist/chunk-P3HLDT77.js.map +0 -1
- package/dist/chunk-QQUJ6NPW.js +0 -23093
- package/dist/chunk-QQUJ6NPW.js.map +0 -1
- package/dist/chunk-TXTQIYCV.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/host-mcp-resolvers.d.ts +0 -32
- package/dist/host-mcp-resolvers.js +0 -34
- package/dist/host-mcp-resolvers.js.map +0 -1
- package/src/host-mcp-resolvers.ts +0 -50
- /package/dist/{chunk-5LYFSZ7O.js.map → chunk-352X6ENP.js.map} +0 -0
- /package/dist/{chunk-O5LEQHDM.js.map → chunk-Z7WEVGCL.js.map} +0 -0
|
@@ -1,369 +1,474 @@
|
|
|
1
|
+
import { defineSchema } from "./define-schema";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import { Permission } from "./permissions";
|
|
3
4
|
|
|
4
|
-
export const OrganizationMembershipRole =
|
|
5
|
+
export const OrganizationMembershipRole = /* @__PURE__ */ defineSchema(() =>
|
|
6
|
+
z.enum(["owner", "admin", "member"]),
|
|
7
|
+
);
|
|
5
8
|
export type OrganizationMembershipRole = z.infer<typeof OrganizationMembershipRole>;
|
|
6
9
|
|
|
7
|
-
export const WorkspaceMemberRole =
|
|
10
|
+
export const WorkspaceMemberRole = /* @__PURE__ */ defineSchema(() =>
|
|
11
|
+
z.enum(["viewer", "member", "admin", "custom"]),
|
|
12
|
+
);
|
|
8
13
|
export type WorkspaceMemberRole = z.infer<typeof WorkspaceMemberRole>;
|
|
9
14
|
|
|
10
|
-
export const AssignableWorkspaceMemberRole =
|
|
15
|
+
export const AssignableWorkspaceMemberRole = /* @__PURE__ */ defineSchema(() =>
|
|
16
|
+
z.enum(["viewer", "member", "admin"]),
|
|
17
|
+
);
|
|
11
18
|
export type AssignableWorkspaceMemberRole = z.infer<typeof AssignableWorkspaceMemberRole>;
|
|
12
19
|
|
|
13
|
-
export const OrganizationInvitationStatus =
|
|
20
|
+
export const OrganizationInvitationStatus = /* @__PURE__ */ defineSchema(() =>
|
|
21
|
+
z.enum(["pending", "accepted", "revoked", "expired"]),
|
|
22
|
+
);
|
|
14
23
|
export type OrganizationInvitationStatus = z.infer<typeof OrganizationInvitationStatus>;
|
|
15
24
|
|
|
16
|
-
export const OrganizationUserSetupDeliveryState =
|
|
17
|
-
"pending",
|
|
18
|
-
|
|
19
|
-
"failed",
|
|
20
|
-
"outcome_unknown",
|
|
21
|
-
"revoked",
|
|
22
|
-
]);
|
|
25
|
+
export const OrganizationUserSetupDeliveryState = /* @__PURE__ */ defineSchema(() =>
|
|
26
|
+
z.enum(["pending", "sent", "failed", "outcome_unknown", "revoked"]),
|
|
27
|
+
);
|
|
23
28
|
export type OrganizationUserSetupDeliveryState = z.infer<typeof OrganizationUserSetupDeliveryState>;
|
|
24
29
|
|
|
25
|
-
export const OrganizationUserSetupDelivery =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})
|
|
30
|
+
export const OrganizationUserSetupDelivery = /* @__PURE__ */ defineSchema(() =>
|
|
31
|
+
z.object({
|
|
32
|
+
id: z.string().uuid(),
|
|
33
|
+
state: OrganizationUserSetupDeliveryState,
|
|
34
|
+
attemptCount: z.number().int().nonnegative(),
|
|
35
|
+
revision: z.number().int().positive(),
|
|
36
|
+
errorClass: z.string().min(1).max(64).nullable(),
|
|
37
|
+
retryState: z.enum(["available", "reconciliation_required", "unavailable"]),
|
|
38
|
+
sentAt: z.string().datetime({ offset: true }).nullable(),
|
|
39
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
35
42
|
export type OrganizationUserSetupDelivery = z.infer<typeof OrganizationUserSetupDelivery>;
|
|
36
43
|
|
|
37
|
-
export const OrganizationInvitation =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
export const OrganizationInvitation = /* @__PURE__ */ defineSchema(() =>
|
|
45
|
+
z.object({
|
|
46
|
+
id: z.string().uuid(),
|
|
47
|
+
organizationId: z.string().uuid(),
|
|
48
|
+
organizationName: z.string().trim().min(1).max(120).nullable().default(null),
|
|
49
|
+
targetEmail: z.string().email(),
|
|
50
|
+
targetName: z.string().trim().min(1).max(120).nullable().default(null),
|
|
51
|
+
initialWorkspaceIds: z.array(z.string().uuid()).max(100).default([]),
|
|
52
|
+
role: OrganizationMembershipRole,
|
|
53
|
+
status: OrganizationInvitationStatus,
|
|
54
|
+
revision: z.number().int().positive(),
|
|
55
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
56
|
+
acceptedMembershipId: z.string().uuid().nullable(),
|
|
57
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
58
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
59
|
+
delivery: OrganizationUserSetupDelivery.nullable().default(null),
|
|
60
|
+
}),
|
|
61
|
+
);
|
|
53
62
|
export type OrganizationInvitation = z.infer<typeof OrganizationInvitation>;
|
|
54
63
|
|
|
55
|
-
export const OrganizationMember =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
})
|
|
64
|
+
export const OrganizationMember = /* @__PURE__ */ defineSchema(() =>
|
|
65
|
+
z.object({
|
|
66
|
+
id: z.string().uuid(),
|
|
67
|
+
organizationId: z.string().uuid(),
|
|
68
|
+
subjectId: z.string().min(1).max(1024),
|
|
69
|
+
name: z.string().min(1).max(1024).nullable().default(null),
|
|
70
|
+
email: z.string().email().max(320).nullable().default(null),
|
|
71
|
+
role: OrganizationMembershipRole,
|
|
72
|
+
status: z.enum(["provisioning", "active", "suspended", "revoked"]),
|
|
73
|
+
authorizationRevision: z.number().int().positive(),
|
|
74
|
+
personalWorkspaceId: z.string().uuid().nullable(),
|
|
75
|
+
revokedAt: z.string().datetime({ offset: true }).nullable(),
|
|
76
|
+
personalRetentionUntil: z.string().datetime({ offset: true }).nullable(),
|
|
77
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
78
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
70
81
|
export type OrganizationMember = z.infer<typeof OrganizationMember>;
|
|
71
82
|
|
|
72
|
-
export const OrganizationAdministrationMemberWorkspaceAccess =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
})
|
|
83
|
+
export const OrganizationAdministrationMemberWorkspaceAccess = /* @__PURE__ */ defineSchema(() =>
|
|
84
|
+
z.object({
|
|
85
|
+
workspaceId: z.string().uuid(),
|
|
86
|
+
workspaceName: z.string().min(1).max(255),
|
|
87
|
+
membershipId: z.string().uuid(),
|
|
88
|
+
role: WorkspaceMemberRole,
|
|
89
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
79
92
|
export type OrganizationAdministrationMemberWorkspaceAccess = z.infer<
|
|
80
93
|
typeof OrganizationAdministrationMemberWorkspaceAccess
|
|
81
94
|
>;
|
|
82
95
|
|
|
83
96
|
/** Safe admin projection. Personal-workspace and personal-resource metadata are absent. */
|
|
84
|
-
export const OrganizationAdministrationMember =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
})
|
|
97
|
+
export const OrganizationAdministrationMember = /* @__PURE__ */ defineSchema(() =>
|
|
98
|
+
z.object({
|
|
99
|
+
id: z.string().uuid(),
|
|
100
|
+
organizationId: z.string().uuid(),
|
|
101
|
+
subjectId: z.string().min(1).max(1024),
|
|
102
|
+
name: z.string().min(1).max(1024).nullable(),
|
|
103
|
+
email: z.string().email().max(320).nullable(),
|
|
104
|
+
role: OrganizationMembershipRole,
|
|
105
|
+
status: z.enum(["provisioning", "active", "suspended", "revoked"]),
|
|
106
|
+
authorizationRevision: z.number().int().positive(),
|
|
107
|
+
sharedWorkspaceAccess: z.array(OrganizationAdministrationMemberWorkspaceAccess).max(500),
|
|
108
|
+
revokedAt: z.string().datetime({ offset: true }).nullable(),
|
|
109
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
110
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
111
|
+
}),
|
|
112
|
+
);
|
|
98
113
|
export type OrganizationAdministrationMember = z.infer<typeof OrganizationAdministrationMember>;
|
|
99
114
|
|
|
100
|
-
export const OrganizationSummary =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
})
|
|
115
|
+
export const OrganizationSummary = /* @__PURE__ */ defineSchema(() =>
|
|
116
|
+
z.object({
|
|
117
|
+
id: z.string().uuid(),
|
|
118
|
+
name: z.string().trim().min(1).max(120),
|
|
119
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
120
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
121
|
+
}),
|
|
122
|
+
);
|
|
106
123
|
export type OrganizationSummary = z.infer<typeof OrganizationSummary>;
|
|
107
124
|
|
|
108
|
-
export const OrganizationPrivateSessionSettings =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
125
|
+
export const OrganizationPrivateSessionSettings = /* @__PURE__ */ defineSchema(() =>
|
|
126
|
+
z.object({
|
|
127
|
+
organizationId: z.string().uuid(),
|
|
128
|
+
enabled: z.boolean(),
|
|
129
|
+
available: z.boolean(),
|
|
130
|
+
version: z.number().int().nonnegative(),
|
|
131
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
132
|
+
changed: z.boolean().optional(),
|
|
133
|
+
}),
|
|
134
|
+
);
|
|
116
135
|
export type OrganizationPrivateSessionSettings = z.infer<typeof OrganizationPrivateSessionSettings>;
|
|
117
136
|
|
|
118
|
-
export const UpdateOrganizationPrivateSessionSettingsRequest =
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
137
|
+
export const UpdateOrganizationPrivateSessionSettingsRequest = /* @__PURE__ */ defineSchema(() =>
|
|
138
|
+
z
|
|
139
|
+
.object({
|
|
140
|
+
enabled: z.boolean(),
|
|
141
|
+
expectedVersion: z.number().int().nonnegative(),
|
|
142
|
+
operationId: z.string().uuid(),
|
|
143
|
+
})
|
|
144
|
+
.strict(),
|
|
145
|
+
);
|
|
125
146
|
export type UpdateOrganizationPrivateSessionSettingsRequest = z.infer<
|
|
126
147
|
typeof UpdateOrganizationPrivateSessionSettingsRequest
|
|
127
148
|
>;
|
|
128
149
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
150
|
+
/**
|
|
151
|
+
* An organization's privacy choices, after the deployment's limits. A product
|
|
152
|
+
* that embeds Opengeni can only narrow these: `limits` says which choices are
|
|
153
|
+
* fixed for every organization on this deployment.
|
|
154
|
+
*/
|
|
155
|
+
export const OrganizationPrivacySettings = /* @__PURE__ */ defineSchema(() =>
|
|
156
|
+
z.object({
|
|
157
|
+
organizationId: z.string().uuid(),
|
|
158
|
+
/** Who can see new chats and schedules unless the person picks otherwise. */
|
|
159
|
+
defaultVisibility: z.enum(["private", "workspace"]),
|
|
160
|
+
/** Whether admins see that other people's Only me schedules exist, and can pause them. */
|
|
161
|
+
adminsSeePrivateSchedules: z.boolean(),
|
|
162
|
+
limits: z.object({
|
|
163
|
+
/** False when this deployment turns Only me off in shared workspaces. */
|
|
164
|
+
onlyMeAllowed: z.boolean(),
|
|
165
|
+
/** True when new chats and schedules always start as Workspace. */
|
|
166
|
+
defaultVisibilityLocked: z.boolean(),
|
|
167
|
+
/** True when admins always see that other people's Only me schedules exist. */
|
|
168
|
+
adminsSeePrivateSchedulesLocked: z.boolean(),
|
|
169
|
+
}),
|
|
170
|
+
updatedAt: z.string().datetime({ offset: true }).nullable(),
|
|
171
|
+
}),
|
|
172
|
+
);
|
|
173
|
+
export type OrganizationPrivacySettings = z.infer<typeof OrganizationPrivacySettings>;
|
|
174
|
+
|
|
175
|
+
export const UpdateOrganizationPrivacySettingsRequest = /* @__PURE__ */ defineSchema(() =>
|
|
176
|
+
z
|
|
177
|
+
.object({
|
|
178
|
+
defaultVisibility: z.enum(["private", "workspace"]).optional(),
|
|
179
|
+
adminsSeePrivateSchedules: z.boolean().optional(),
|
|
180
|
+
})
|
|
181
|
+
.strict()
|
|
182
|
+
.refine(
|
|
183
|
+
(value) =>
|
|
184
|
+
value.defaultVisibility !== undefined || value.adminsSeePrivateSchedules !== undefined,
|
|
185
|
+
{ message: "Change at least one setting." },
|
|
186
|
+
),
|
|
187
|
+
);
|
|
188
|
+
export type UpdateOrganizationPrivacySettingsRequest = z.infer<
|
|
189
|
+
typeof UpdateOrganizationPrivacySettingsRequest
|
|
190
|
+
>;
|
|
191
|
+
|
|
192
|
+
export const OrganizationWorkspaceAccessMember = /* @__PURE__ */ defineSchema(() =>
|
|
193
|
+
z.object({
|
|
194
|
+
membershipId: z.string().uuid(),
|
|
195
|
+
organizationMembershipId: z.string().uuid().nullable(),
|
|
196
|
+
subjectId: z.string().min(1).max(1024),
|
|
197
|
+
name: z.string().min(1).max(1024).nullable(),
|
|
198
|
+
email: z.string().email().max(320).nullable(),
|
|
199
|
+
subjectLabel: z.string().min(1).max(1024).nullable(),
|
|
200
|
+
principalKind: z.enum(["human", "service"]),
|
|
201
|
+
organizationRole: OrganizationMembershipRole.nullable(),
|
|
202
|
+
role: WorkspaceMemberRole,
|
|
203
|
+
permissions: z.array(z.string().min(1).max(128)),
|
|
204
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
205
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
206
|
+
}),
|
|
207
|
+
);
|
|
143
208
|
export type OrganizationWorkspaceAccessMember = z.infer<typeof OrganizationWorkspaceAccessMember>;
|
|
144
209
|
|
|
145
|
-
export const OrganizationWorkspaceAccess =
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
210
|
+
export const OrganizationWorkspaceAccess = /* @__PURE__ */ defineSchema(() =>
|
|
211
|
+
z.object({
|
|
212
|
+
id: z.string().uuid(),
|
|
213
|
+
name: z.string().min(1),
|
|
214
|
+
slug: z.string().nullable(),
|
|
215
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
216
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
217
|
+
members: z.array(OrganizationWorkspaceAccessMember).max(1000),
|
|
218
|
+
}),
|
|
219
|
+
);
|
|
153
220
|
export type OrganizationWorkspaceAccess = z.infer<typeof OrganizationWorkspaceAccess>;
|
|
154
221
|
|
|
155
|
-
export const OrganizationWorkspaceRoleDefinition =
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
222
|
+
export const OrganizationWorkspaceRoleDefinition = /* @__PURE__ */ defineSchema(() =>
|
|
223
|
+
z.object({
|
|
224
|
+
role: AssignableWorkspaceMemberRole,
|
|
225
|
+
label: z.string().min(1).max(64),
|
|
226
|
+
description: z.string().min(1).max(512),
|
|
227
|
+
permissions: z.array(Permission).min(1),
|
|
228
|
+
}),
|
|
229
|
+
);
|
|
161
230
|
export type OrganizationWorkspaceRoleDefinition = z.infer<
|
|
162
231
|
typeof OrganizationWorkspaceRoleDefinition
|
|
163
232
|
>;
|
|
164
233
|
|
|
165
|
-
export const OrganizationAdministrationOverview =
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
234
|
+
export const OrganizationAdministrationOverview = /* @__PURE__ */ defineSchema(() =>
|
|
235
|
+
z.object({
|
|
236
|
+
organization: OrganizationSummary,
|
|
237
|
+
roles: z.array(OrganizationWorkspaceRoleDefinition).length(3),
|
|
238
|
+
workspaces: z.array(OrganizationWorkspaceAccess).max(500),
|
|
239
|
+
}),
|
|
240
|
+
);
|
|
170
241
|
export type OrganizationAdministrationOverview = z.infer<typeof OrganizationAdministrationOverview>;
|
|
171
242
|
|
|
172
|
-
export const CreateOrganizationWorkspaceRequest =
|
|
173
|
-
.object({
|
|
174
|
-
name: z.string().trim().min(1).max(120),
|
|
175
|
-
operationId: z.string().uuid(),
|
|
176
|
-
})
|
|
177
|
-
.strict();
|
|
178
|
-
export type CreateOrganizationWorkspaceRequest = z.infer<typeof CreateOrganizationWorkspaceRequest>;
|
|
179
|
-
|
|
180
|
-
export const UpdateOrganizationWorkspaceRequest = z
|
|
181
|
-
.object({
|
|
182
|
-
name: z.string().trim().min(1).max(120),
|
|
183
|
-
expectedUpdatedAt: z.string().datetime({ offset: true }),
|
|
184
|
-
operationId: z.string().uuid(),
|
|
185
|
-
})
|
|
186
|
-
.strict();
|
|
187
|
-
export type UpdateOrganizationWorkspaceRequest = z.infer<typeof UpdateOrganizationWorkspaceRequest>;
|
|
188
|
-
|
|
189
|
-
export const PutOrganizationWorkspaceMemberRequest = z.discriminatedUnion("role", [
|
|
243
|
+
export const CreateOrganizationWorkspaceRequest = /* @__PURE__ */ defineSchema(() =>
|
|
190
244
|
z
|
|
191
245
|
.object({
|
|
192
|
-
|
|
193
|
-
expectedUpdatedAt: z.string().datetime({ offset: true }).nullable(),
|
|
246
|
+
name: z.string().trim().min(1).max(120),
|
|
194
247
|
operationId: z.string().uuid(),
|
|
195
248
|
})
|
|
196
249
|
.strict(),
|
|
250
|
+
);
|
|
251
|
+
export type CreateOrganizationWorkspaceRequest = z.infer<typeof CreateOrganizationWorkspaceRequest>;
|
|
252
|
+
|
|
253
|
+
export const UpdateOrganizationWorkspaceRequest = /* @__PURE__ */ defineSchema(() =>
|
|
197
254
|
z
|
|
198
255
|
.object({
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
expectedUpdatedAt: z.string().datetime({ offset: true }).nullable(),
|
|
256
|
+
name: z.string().trim().min(1).max(120),
|
|
257
|
+
expectedUpdatedAt: z.string().datetime({ offset: true }),
|
|
202
258
|
operationId: z.string().uuid(),
|
|
203
259
|
})
|
|
204
260
|
.strict(),
|
|
205
|
-
|
|
261
|
+
);
|
|
262
|
+
export type UpdateOrganizationWorkspaceRequest = z.infer<typeof UpdateOrganizationWorkspaceRequest>;
|
|
263
|
+
|
|
264
|
+
export const PutOrganizationWorkspaceMemberRequest = /* @__PURE__ */ defineSchema(() =>
|
|
265
|
+
z.discriminatedUnion("role", [
|
|
266
|
+
z
|
|
267
|
+
.object({
|
|
268
|
+
role: AssignableWorkspaceMemberRole,
|
|
269
|
+
expectedUpdatedAt: z.string().datetime({ offset: true }).nullable(),
|
|
270
|
+
operationId: z.string().uuid(),
|
|
271
|
+
})
|
|
272
|
+
.strict(),
|
|
273
|
+
z
|
|
274
|
+
.object({
|
|
275
|
+
role: z.literal("custom"),
|
|
276
|
+
permissions: z.array(Permission).max(128),
|
|
277
|
+
expectedUpdatedAt: z.string().datetime({ offset: true }).nullable(),
|
|
278
|
+
operationId: z.string().uuid(),
|
|
279
|
+
})
|
|
280
|
+
.strict(),
|
|
281
|
+
]),
|
|
282
|
+
);
|
|
206
283
|
export type PutOrganizationWorkspaceMemberRequest = z.infer<
|
|
207
284
|
typeof PutOrganizationWorkspaceMemberRequest
|
|
208
285
|
>;
|
|
209
286
|
|
|
210
|
-
export const RevokeOrganizationWorkspaceMemberRequest =
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
287
|
+
export const RevokeOrganizationWorkspaceMemberRequest = /* @__PURE__ */ defineSchema(() =>
|
|
288
|
+
z
|
|
289
|
+
.object({
|
|
290
|
+
expectedUpdatedAt: z.string().datetime({ offset: true }),
|
|
291
|
+
operationId: z.string().uuid(),
|
|
292
|
+
})
|
|
293
|
+
.strict(),
|
|
294
|
+
);
|
|
216
295
|
export type RevokeOrganizationWorkspaceMemberRequest = z.infer<
|
|
217
296
|
typeof RevokeOrganizationWorkspaceMemberRequest
|
|
218
297
|
>;
|
|
219
298
|
|
|
220
|
-
export const RevokeOrganizationWorkspaceMemberResponse =
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
299
|
+
export const RevokeOrganizationWorkspaceMemberResponse = /* @__PURE__ */ defineSchema(() =>
|
|
300
|
+
z
|
|
301
|
+
.object({
|
|
302
|
+
removed: z.boolean(),
|
|
303
|
+
replay: z.boolean(),
|
|
304
|
+
})
|
|
305
|
+
.strict(),
|
|
306
|
+
);
|
|
226
307
|
export type RevokeOrganizationWorkspaceMemberResponse = z.infer<
|
|
227
308
|
typeof RevokeOrganizationWorkspaceMemberResponse
|
|
228
309
|
>;
|
|
229
310
|
|
|
230
|
-
export const CreateOrganizationRequest =
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
311
|
+
export const CreateOrganizationRequest = /* @__PURE__ */ defineSchema(() =>
|
|
312
|
+
z.object({
|
|
313
|
+
name: z.string().trim().min(1).max(120),
|
|
314
|
+
operationId: z.string().uuid(),
|
|
315
|
+
}),
|
|
316
|
+
);
|
|
234
317
|
export type CreateOrganizationRequest = z.infer<typeof CreateOrganizationRequest>;
|
|
235
318
|
|
|
236
|
-
export const CreateOrganizationResponse =
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
319
|
+
export const CreateOrganizationResponse = /* @__PURE__ */ defineSchema(() =>
|
|
320
|
+
z.object({
|
|
321
|
+
organization: OrganizationSummary,
|
|
322
|
+
workspaceId: z.string().uuid(),
|
|
323
|
+
}),
|
|
324
|
+
);
|
|
240
325
|
export type CreateOrganizationResponse = z.infer<typeof CreateOrganizationResponse>;
|
|
241
326
|
|
|
242
|
-
export const CreateAdditionalOrganizationRequest =
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
327
|
+
export const CreateAdditionalOrganizationRequest = /* @__PURE__ */ defineSchema(() =>
|
|
328
|
+
z
|
|
329
|
+
.object({
|
|
330
|
+
name: z.string().trim().min(1).max(120),
|
|
331
|
+
workspaceName: z.string().trim().min(1).max(120),
|
|
332
|
+
operationId: z.string().uuid(),
|
|
333
|
+
})
|
|
334
|
+
.strict(),
|
|
335
|
+
);
|
|
249
336
|
export type CreateAdditionalOrganizationRequest = z.infer<
|
|
250
337
|
typeof CreateAdditionalOrganizationRequest
|
|
251
338
|
>;
|
|
252
339
|
|
|
253
|
-
export const CreateAdditionalOrganizationResponse =
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
340
|
+
export const CreateAdditionalOrganizationResponse = /* @__PURE__ */ defineSchema(() =>
|
|
341
|
+
z.object({
|
|
342
|
+
organization: OrganizationSummary,
|
|
343
|
+
workspaceId: z.string().uuid(),
|
|
344
|
+
personalWorkspaceId: z.string().uuid(),
|
|
345
|
+
}),
|
|
346
|
+
);
|
|
258
347
|
export type CreateAdditionalOrganizationResponse = z.infer<
|
|
259
348
|
typeof CreateAdditionalOrganizationResponse
|
|
260
349
|
>;
|
|
261
350
|
|
|
262
|
-
export const UpdateOrganizationNameRequest =
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
351
|
+
export const UpdateOrganizationNameRequest = /* @__PURE__ */ defineSchema(() =>
|
|
352
|
+
z.object({
|
|
353
|
+
name: z.string().trim().min(1).max(120),
|
|
354
|
+
expectedUpdatedAt: z.string().datetime({ offset: true }),
|
|
355
|
+
operationId: z.string().uuid(),
|
|
356
|
+
}),
|
|
357
|
+
);
|
|
267
358
|
export type UpdateOrganizationNameRequest = z.infer<typeof UpdateOrganizationNameRequest>;
|
|
268
359
|
|
|
269
|
-
export const OrganizationRetentionPolicy =
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
360
|
+
export const OrganizationRetentionPolicy = /* @__PURE__ */ defineSchema(() =>
|
|
361
|
+
z
|
|
362
|
+
.object({
|
|
363
|
+
organizationId: z.string().uuid(),
|
|
364
|
+
mode: z.enum(["retain", "delete_after"]),
|
|
365
|
+
retentionDays: z.number().int().min(30).max(90).nullable(),
|
|
366
|
+
version: z.number().int().positive(),
|
|
367
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
368
|
+
})
|
|
369
|
+
.superRefine((value, context) => {
|
|
370
|
+
if ((value.mode === "retain") !== (value.retentionDays === null)) {
|
|
371
|
+
context.addIssue({
|
|
372
|
+
code: "custom",
|
|
373
|
+
path: ["retentionDays"],
|
|
374
|
+
message: "retain requires no duration; delete_after requires a duration",
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
}),
|
|
378
|
+
);
|
|
286
379
|
export type OrganizationRetentionPolicy = z.infer<typeof OrganizationRetentionPolicy>;
|
|
287
380
|
|
|
288
|
-
export const OrganizationRetentionDeletionClaim =
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
381
|
+
export const OrganizationRetentionDeletionClaim = /* @__PURE__ */ defineSchema(() =>
|
|
382
|
+
z.object({
|
|
383
|
+
organizationId: z.string().uuid(),
|
|
384
|
+
membershipId: z.string().uuid(),
|
|
385
|
+
operationId: z.string().uuid(),
|
|
386
|
+
retentionUntil: z.string().datetime({ offset: true }),
|
|
387
|
+
claimExpiresAt: z.string().datetime({ offset: true }),
|
|
388
|
+
personalWorkspaceId: z.string().uuid().nullable(),
|
|
389
|
+
objectCount: z.number().int().nonnegative(),
|
|
390
|
+
deletedObjectCount: z.number().int().nonnegative(),
|
|
391
|
+
}),
|
|
392
|
+
);
|
|
298
393
|
export type OrganizationRetentionDeletionClaim = z.infer<typeof OrganizationRetentionDeletionClaim>;
|
|
299
394
|
|
|
300
|
-
export const OrganizationRetentionDeletionObject =
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
395
|
+
export const OrganizationRetentionDeletionObject = /* @__PURE__ */ defineSchema(() =>
|
|
396
|
+
z.object({
|
|
397
|
+
objectKind: z.enum([
|
|
398
|
+
"file",
|
|
399
|
+
"session_recording",
|
|
400
|
+
"browser_state_artifact",
|
|
401
|
+
"browser_state_upload",
|
|
402
|
+
"transcription_recording_object",
|
|
403
|
+
"video_staging_reference",
|
|
404
|
+
"workspace_artifact_version",
|
|
405
|
+
"editable_artifact_blob",
|
|
406
|
+
"workspace_capture_manifest",
|
|
407
|
+
"workspace_capture_tree_index",
|
|
408
|
+
"workspace_capture_blob",
|
|
409
|
+
]),
|
|
410
|
+
sourceId: z.string().min(1).max(2048),
|
|
411
|
+
objectBucket: z.string().min(1).max(1024),
|
|
412
|
+
objectKey: z.string().min(1).max(4096),
|
|
413
|
+
}),
|
|
414
|
+
);
|
|
318
415
|
export type OrganizationRetentionDeletionObject = z.infer<
|
|
319
416
|
typeof OrganizationRetentionDeletionObject
|
|
320
417
|
>;
|
|
321
418
|
|
|
322
|
-
export const OrganizationRetentionDatabaseFinalization =
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
})
|
|
419
|
+
export const OrganizationRetentionDatabaseFinalization = /* @__PURE__ */ defineSchema(() =>
|
|
420
|
+
z.object({
|
|
421
|
+
organizationId: z.string().uuid(),
|
|
422
|
+
membershipId: z.string().uuid(),
|
|
423
|
+
operationId: z.string().uuid(),
|
|
424
|
+
outcome: z.literal("cleanup_pending"),
|
|
425
|
+
objectBucket: z.string().min(1).max(1024),
|
|
426
|
+
objectCount: z.number().int().nonnegative(),
|
|
427
|
+
deletedResources: z.record(z.string(), z.number().int().nonnegative()),
|
|
428
|
+
databaseFinalizedAt: z.string().datetime({ offset: true }),
|
|
429
|
+
}),
|
|
430
|
+
);
|
|
332
431
|
export type OrganizationRetentionDatabaseFinalization = z.infer<
|
|
333
432
|
typeof OrganizationRetentionDatabaseFinalization
|
|
334
433
|
>;
|
|
335
434
|
|
|
336
|
-
export const OrganizationRetentionDeletionResult =
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
})
|
|
435
|
+
export const OrganizationRetentionDeletionResult = /* @__PURE__ */ defineSchema(() =>
|
|
436
|
+
z.object({
|
|
437
|
+
organizationId: z.string().uuid(),
|
|
438
|
+
membershipId: z.string().uuid(),
|
|
439
|
+
operationId: z.string().uuid(),
|
|
440
|
+
outcome: z.enum(["completed", "already_completed"]),
|
|
441
|
+
deletedResources: z.record(z.string(), z.number().int().nonnegative()),
|
|
442
|
+
completedAt: z.string().datetime({ offset: true }),
|
|
443
|
+
}),
|
|
444
|
+
);
|
|
344
445
|
export type OrganizationRetentionDeletionResult = z.infer<
|
|
345
446
|
typeof OrganizationRetentionDeletionResult
|
|
346
447
|
>;
|
|
347
448
|
|
|
348
|
-
export const OrganizationRetentionDeletionPreview =
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
449
|
+
export const OrganizationRetentionDeletionPreview = /* @__PURE__ */ defineSchema(() =>
|
|
450
|
+
z.object({
|
|
451
|
+
membershipId: z.string().uuid(),
|
|
452
|
+
retentionUntil: z.string().datetime({ offset: true }),
|
|
453
|
+
personalWorkspaceId: z.string().uuid().nullable(),
|
|
454
|
+
resourceCount: z.number().int().nonnegative(),
|
|
455
|
+
objectCount: z.number().int().nonnegative(),
|
|
456
|
+
}),
|
|
457
|
+
);
|
|
355
458
|
export type OrganizationRetentionDeletionPreview = z.infer<
|
|
356
459
|
typeof OrganizationRetentionDeletionPreview
|
|
357
460
|
>;
|
|
358
461
|
|
|
359
|
-
export const CreateOrganizationInvitationRequest =
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
462
|
+
export const CreateOrganizationInvitationRequest = /* @__PURE__ */ defineSchema(() =>
|
|
463
|
+
z.object({
|
|
464
|
+
email: z.string().email().max(320),
|
|
465
|
+
name: z.string().trim().min(1).max(120).optional(),
|
|
466
|
+
initialWorkspaceIds: z.array(z.string().uuid()).max(100).default([]),
|
|
467
|
+
role: OrganizationMembershipRole.default("member"),
|
|
468
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
469
|
+
operationId: z.string().uuid(),
|
|
470
|
+
}),
|
|
471
|
+
);
|
|
367
472
|
export type CreateOrganizationInvitationRequest = z.infer<
|
|
368
473
|
typeof CreateOrganizationInvitationRequest
|
|
369
474
|
>;
|
|
@@ -374,94 +479,120 @@ export type CreateOrganizationInvitationRequest = z.infer<
|
|
|
374
479
|
* never persisted in plaintext; `operationId` makes an outcome-unknown retry
|
|
375
480
|
* converge on the first committed result.
|
|
376
481
|
*/
|
|
377
|
-
export const CompleteOrganizationUserSetupRequest =
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
482
|
+
export const CompleteOrganizationUserSetupRequest = /* @__PURE__ */ defineSchema(() =>
|
|
483
|
+
z.object({
|
|
484
|
+
token: z.string().min(32).max(2048),
|
|
485
|
+
name: z.string().trim().min(1).max(120),
|
|
486
|
+
password: z.string().min(8).max(128),
|
|
487
|
+
operationId: z.string().uuid(),
|
|
488
|
+
}),
|
|
489
|
+
);
|
|
383
490
|
export type CompleteOrganizationUserSetupRequest = z.infer<
|
|
384
491
|
typeof CompleteOrganizationUserSetupRequest
|
|
385
492
|
>;
|
|
386
493
|
|
|
387
|
-
export const CompleteOrganizationUserSetupResponse =
|
|
388
|
-
|
|
389
|
-
|
|
494
|
+
export const CompleteOrganizationUserSetupResponse = /* @__PURE__ */ defineSchema(() =>
|
|
495
|
+
z.object({
|
|
496
|
+
status: z.literal("complete"),
|
|
497
|
+
}),
|
|
498
|
+
);
|
|
390
499
|
export type CompleteOrganizationUserSetupResponse = z.infer<
|
|
391
500
|
typeof CompleteOrganizationUserSetupResponse
|
|
392
501
|
>;
|
|
393
502
|
|
|
394
|
-
export const PreviewOrganizationUserSetupRequest =
|
|
395
|
-
.object({ token: z.string().min(32).max(2048) })
|
|
396
|
-
|
|
503
|
+
export const PreviewOrganizationUserSetupRequest = /* @__PURE__ */ defineSchema(() =>
|
|
504
|
+
z.object({ token: z.string().min(32).max(2048) }).strict(),
|
|
505
|
+
);
|
|
397
506
|
export type PreviewOrganizationUserSetupRequest = z.infer<
|
|
398
507
|
typeof PreviewOrganizationUserSetupRequest
|
|
399
508
|
>;
|
|
400
509
|
|
|
401
|
-
export const OrganizationUserSetupPreviewWorkspace =
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
510
|
+
export const OrganizationUserSetupPreviewWorkspace = /* @__PURE__ */ defineSchema(() =>
|
|
511
|
+
z.object({
|
|
512
|
+
workspaceId: z.string().uuid(),
|
|
513
|
+
workspaceName: z.string().min(1).max(255),
|
|
514
|
+
role: AssignableWorkspaceMemberRole,
|
|
515
|
+
}),
|
|
516
|
+
);
|
|
406
517
|
export type OrganizationUserSetupPreviewWorkspace = z.infer<
|
|
407
518
|
typeof OrganizationUserSetupPreviewWorkspace
|
|
408
519
|
>;
|
|
409
520
|
|
|
410
|
-
const OrganizationUserSetupPreviewUnavailable =
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
521
|
+
const OrganizationUserSetupPreviewUnavailable = /* @__PURE__ */ defineSchema(() =>
|
|
522
|
+
z.object({
|
|
523
|
+
state: z.enum(["unavailable", "expired", "revoked", "completed"]),
|
|
524
|
+
}),
|
|
525
|
+
);
|
|
526
|
+
const OrganizationUserSetupPreviewPending = /* @__PURE__ */ defineSchema(() =>
|
|
527
|
+
z.object({
|
|
528
|
+
state: z.literal("pending"),
|
|
529
|
+
organizationId: z.string().uuid(),
|
|
530
|
+
organizationName: z.string().trim().min(1).max(120),
|
|
531
|
+
targetEmail: z.string().email().max(320),
|
|
532
|
+
targetName: z.string().trim().min(1).max(120).nullable(),
|
|
533
|
+
organizationRole: OrganizationMembershipRole,
|
|
534
|
+
sharedWorkspaceAccess: z.array(OrganizationUserSetupPreviewWorkspace).max(100),
|
|
535
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
536
|
+
}),
|
|
537
|
+
);
|
|
538
|
+
export const OrganizationUserSetupPreview = /* @__PURE__ */ defineSchema(() =>
|
|
539
|
+
z.discriminatedUnion("state", [
|
|
540
|
+
OrganizationUserSetupPreviewUnavailable,
|
|
541
|
+
OrganizationUserSetupPreviewPending,
|
|
542
|
+
]),
|
|
543
|
+
);
|
|
427
544
|
export type OrganizationUserSetupPreview = z.infer<typeof OrganizationUserSetupPreview>;
|
|
428
545
|
|
|
429
|
-
export const RetryOrganizationUserSetupDeliveryRequest =
|
|
430
|
-
.object({ operationId: z.string().uuid() })
|
|
431
|
-
|
|
546
|
+
export const RetryOrganizationUserSetupDeliveryRequest = /* @__PURE__ */ defineSchema(() =>
|
|
547
|
+
z.object({ operationId: z.string().uuid() }).strict(),
|
|
548
|
+
);
|
|
432
549
|
export type RetryOrganizationUserSetupDeliveryRequest = z.infer<
|
|
433
550
|
typeof RetryOrganizationUserSetupDeliveryRequest
|
|
434
551
|
>;
|
|
435
552
|
|
|
436
553
|
/** Authenticated organization-name-only setup after ordinary account creation. */
|
|
437
|
-
export const CompleteSelfServiceOrganizationSetupRequest =
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
554
|
+
export const CompleteSelfServiceOrganizationSetupRequest = /* @__PURE__ */ defineSchema(() =>
|
|
555
|
+
z.object({
|
|
556
|
+
organizationName: z.string().trim().min(1).max(120),
|
|
557
|
+
operationId: z.string().uuid(),
|
|
558
|
+
/**
|
|
559
|
+
* The signup answer to "How do you want to use Opengeni?": add AI agents to
|
|
560
|
+
* a product (`embed`) or run agents in the cloud (`cloud`). Stored once per
|
|
561
|
+
* person and organization; the first answer wins.
|
|
562
|
+
*/
|
|
563
|
+
useCase: z.enum(["embed", "cloud"]).optional(),
|
|
564
|
+
}),
|
|
565
|
+
);
|
|
441
566
|
export type CompleteSelfServiceOrganizationSetupRequest = z.infer<
|
|
442
567
|
typeof CompleteSelfServiceOrganizationSetupRequest
|
|
443
568
|
>;
|
|
444
569
|
|
|
445
|
-
export const CompleteSelfServiceOrganizationSetupResponse =
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
570
|
+
export const CompleteSelfServiceOrganizationSetupResponse = /* @__PURE__ */ defineSchema(() =>
|
|
571
|
+
z.object({
|
|
572
|
+
status: z.literal("complete"),
|
|
573
|
+
organizationId: z.string().uuid(),
|
|
574
|
+
personalWorkspaceId: z.string().uuid(),
|
|
575
|
+
}),
|
|
576
|
+
);
|
|
450
577
|
export type CompleteSelfServiceOrganizationSetupResponse = z.infer<
|
|
451
578
|
typeof CompleteSelfServiceOrganizationSetupResponse
|
|
452
579
|
>;
|
|
453
580
|
|
|
454
|
-
export const SelfServiceOrganizationOnboardingStatus =
|
|
455
|
-
|
|
456
|
-
|
|
581
|
+
export const SelfServiceOrganizationOnboardingStatus = /* @__PURE__ */ defineSchema(() =>
|
|
582
|
+
z.object({
|
|
583
|
+
state: z.enum(["required", "invitation_pending", "unavailable", "complete"]),
|
|
584
|
+
}),
|
|
585
|
+
);
|
|
457
586
|
export type SelfServiceOrganizationOnboardingStatus = z.infer<
|
|
458
587
|
typeof SelfServiceOrganizationOnboardingStatus
|
|
459
588
|
>;
|
|
460
589
|
|
|
461
|
-
export const AcceptOrganizationInvitationRequest =
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
590
|
+
export const AcceptOrganizationInvitationRequest = /* @__PURE__ */ defineSchema(() =>
|
|
591
|
+
z.object({
|
|
592
|
+
expectedRevision: z.number().int().positive(),
|
|
593
|
+
operationId: z.string().uuid(),
|
|
594
|
+
}),
|
|
595
|
+
);
|
|
465
596
|
export type AcceptOrganizationInvitationRequest = z.infer<
|
|
466
597
|
typeof AcceptOrganizationInvitationRequest
|
|
467
598
|
>;
|
|
@@ -471,83 +602,98 @@ export type RevokeOrganizationInvitationRequest = z.infer<
|
|
|
471
602
|
typeof RevokeOrganizationInvitationRequest
|
|
472
603
|
>;
|
|
473
604
|
|
|
474
|
-
export const OrganizationMemberTransitionKind =
|
|
475
|
-
"change_role",
|
|
476
|
-
|
|
477
|
-
"reactivate",
|
|
478
|
-
"offboard",
|
|
479
|
-
]);
|
|
605
|
+
export const OrganizationMemberTransitionKind = /* @__PURE__ */ defineSchema(() =>
|
|
606
|
+
z.enum(["change_role", "suspend", "reactivate", "offboard"]),
|
|
607
|
+
);
|
|
480
608
|
export type OrganizationMemberTransitionKind = z.infer<typeof OrganizationMemberTransitionKind>;
|
|
481
609
|
|
|
482
|
-
export const UpdateOrganizationMemberRequest =
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
610
|
+
export const UpdateOrganizationMemberRequest = /* @__PURE__ */ defineSchema(() =>
|
|
611
|
+
z
|
|
612
|
+
.object({
|
|
613
|
+
kind: OrganizationMemberTransitionKind,
|
|
614
|
+
role: OrganizationMembershipRole.optional(),
|
|
615
|
+
expectedAuthorizationRevision: z.number().int().positive(),
|
|
616
|
+
operationId: z.string().uuid(),
|
|
617
|
+
reason: z.string().trim().min(1).max(512).optional(),
|
|
618
|
+
})
|
|
619
|
+
.superRefine((value, context) => {
|
|
620
|
+
if ((value.kind === "change_role") !== (value.role !== undefined)) {
|
|
621
|
+
context.addIssue({
|
|
622
|
+
code: "custom",
|
|
623
|
+
path: ["role"],
|
|
624
|
+
message: "role is required only for change_role",
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
}),
|
|
628
|
+
);
|
|
499
629
|
export type UpdateOrganizationMemberRequest = z.infer<typeof UpdateOrganizationMemberRequest>;
|
|
500
630
|
|
|
501
|
-
export const UpdateOrganizationRetentionPolicyRequest =
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
631
|
+
export const UpdateOrganizationRetentionPolicyRequest = /* @__PURE__ */ defineSchema(() =>
|
|
632
|
+
z
|
|
633
|
+
.object({
|
|
634
|
+
mode: z.enum(["retain", "delete_after"]),
|
|
635
|
+
retentionDays: z.number().int().min(30).max(90).nullable(),
|
|
636
|
+
expectedVersion: z.number().int().positive(),
|
|
637
|
+
operationId: z.string().uuid(),
|
|
638
|
+
})
|
|
639
|
+
.superRefine((value, context) => {
|
|
640
|
+
if ((value.mode === "retain") !== (value.retentionDays === null)) {
|
|
641
|
+
context.addIssue({
|
|
642
|
+
code: "custom",
|
|
643
|
+
path: ["retentionDays"],
|
|
644
|
+
message: "retain requires no duration; delete_after requires a duration",
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
}),
|
|
648
|
+
);
|
|
517
649
|
export type UpdateOrganizationRetentionPolicyRequest = z.infer<
|
|
518
650
|
typeof UpdateOrganizationRetentionPolicyRequest
|
|
519
651
|
>;
|
|
520
652
|
|
|
521
|
-
export const ListOrganizationInvitationsResponse =
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
653
|
+
export const ListOrganizationInvitationsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
654
|
+
z.object({
|
|
655
|
+
invitations: z.array(OrganizationInvitation).max(101),
|
|
656
|
+
}),
|
|
657
|
+
);
|
|
658
|
+
export const ListOrganizationInvitationsPageQuery = /* @__PURE__ */ defineSchema(() =>
|
|
659
|
+
z.object({
|
|
660
|
+
cursor: z.string().uuid().optional(),
|
|
661
|
+
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
662
|
+
}),
|
|
663
|
+
);
|
|
528
664
|
export type ListOrganizationInvitationsPageQuery = z.infer<
|
|
529
665
|
typeof ListOrganizationInvitationsPageQuery
|
|
530
666
|
>;
|
|
531
|
-
export const ListOrganizationInvitationsPageResponse =
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
667
|
+
export const ListOrganizationInvitationsPageResponse = /* @__PURE__ */ defineSchema(() =>
|
|
668
|
+
z.object({
|
|
669
|
+
invitations: z.array(OrganizationInvitation).max(100),
|
|
670
|
+
nextCursor: z.string().uuid().nullable(),
|
|
671
|
+
}),
|
|
672
|
+
);
|
|
535
673
|
export type ListOrganizationInvitationsPageResponse = z.infer<
|
|
536
674
|
typeof ListOrganizationInvitationsPageResponse
|
|
537
675
|
>;
|
|
538
|
-
export const AcceptOrganizationInvitationResponse =
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
676
|
+
export const AcceptOrganizationInvitationResponse = /* @__PURE__ */ defineSchema(() =>
|
|
677
|
+
z.object({
|
|
678
|
+
invitation: OrganizationInvitation,
|
|
679
|
+
membership: OrganizationMember,
|
|
680
|
+
}),
|
|
681
|
+
);
|
|
542
682
|
export type AcceptOrganizationInvitationResponse = z.infer<
|
|
543
683
|
typeof AcceptOrganizationInvitationResponse
|
|
544
684
|
>;
|
|
545
|
-
export const ListOrganizationMembersResponse =
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
})
|
|
685
|
+
export const ListOrganizationMembersResponse = /* @__PURE__ */ defineSchema(() =>
|
|
686
|
+
z.object({
|
|
687
|
+
members: z.array(OrganizationMember),
|
|
688
|
+
}),
|
|
689
|
+
);
|
|
690
|
+
export const ListOrganizationAdministrationMembersResponse = /* @__PURE__ */ defineSchema(() =>
|
|
691
|
+
z.object({
|
|
692
|
+
members: z.array(OrganizationAdministrationMember).max(1000),
|
|
693
|
+
}),
|
|
694
|
+
);
|
|
695
|
+
export const ListSelfOrganizationMembershipsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
696
|
+
z.object({
|
|
697
|
+
memberships: z.array(OrganizationMember),
|
|
698
|
+
}),
|
|
699
|
+
);
|