primitive-admin 1.2.0-alpha.9 → 1.3.0-alpha.0
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/README.md +258 -186
- package/assets/skill/skills/primitive-platform/SKILL.md +93 -27
- package/dist/bin/primitive.js +15 -89
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/admins.js +80 -17
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/agent-sessions.d.ts +129 -0
- package/dist/src/commands/agent-sessions.js +532 -20
- package/dist/src/commands/agent-sessions.js.map +1 -1
- package/dist/src/commands/analytics.js +207 -155
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps-children.js +3 -0
- package/dist/src/commands/apps-children.js.map +1 -1
- package/dist/src/commands/apps-transitions.d.ts +39 -0
- package/dist/src/commands/apps-transitions.js +198 -0
- package/dist/src/commands/apps-transitions.js.map +1 -0
- package/dist/src/commands/apps.d.ts +17 -0
- package/dist/src/commands/apps.js +108 -3
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth-sessions.js +2 -0
- package/dist/src/commands/auth-sessions.js.map +1 -1
- package/dist/src/commands/auth.js +138 -44
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/blob-buckets.js +2 -0
- package/dist/src/commands/blob-buckets.js.map +1 -1
- package/dist/src/commands/collections.js +318 -256
- package/dist/src/commands/collections.js.map +1 -1
- package/dist/src/commands/comparisons.js +2 -0
- package/dist/src/commands/comparisons.js.map +1 -1
- package/dist/src/commands/config.d.ts +2 -2
- package/dist/src/commands/config.js +59 -33
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/connections.js +2 -0
- package/dist/src/commands/connections.js.map +1 -1
- package/dist/src/commands/database-type-configs.js +5 -3
- package/dist/src/commands/database-type-configs.js.map +1 -1
- package/dist/src/commands/databases.js +6 -4
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/db3-types.d.ts +15 -0
- package/dist/src/commands/db3-types.js +159 -0
- package/dist/src/commands/db3-types.js.map +1 -0
- package/dist/src/commands/db3.d.ts +24 -0
- package/dist/src/commands/db3.js +1444 -0
- package/dist/src/commands/db3.js.map +1 -0
- package/dist/src/commands/documents.d.ts +110 -10
- package/dist/src/commands/documents.js +1012 -748
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.js +74 -0
- package/dist/src/commands/email-templates.js.map +1 -1
- package/dist/src/commands/env.js +8 -4
- package/dist/src/commands/env.js.map +1 -1
- package/dist/src/commands/function-trigger-commands.d.ts +28 -0
- package/dist/src/commands/function-trigger-commands.js +341 -0
- package/dist/src/commands/function-trigger-commands.js.map +1 -0
- package/dist/src/commands/functions.js +376 -30
- package/dist/src/commands/functions.js.map +1 -1
- package/dist/src/commands/groups.js +168 -50
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/guides.js +7 -5
- package/dist/src/commands/guides.js.map +1 -1
- package/dist/src/commands/hosting.d.ts +8 -0
- package/dist/src/commands/hosting.js +346 -0
- package/dist/src/commands/hosting.js.map +1 -0
- package/dist/src/commands/init.js +129 -38
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.js +82 -53
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/locks.d.ts +5 -3
- package/dist/src/commands/locks.js +19 -61
- package/dist/src/commands/locks.js.map +1 -1
- package/dist/src/commands/metadata-category-configs.d.ts +2 -2
- package/dist/src/commands/metadata-category-configs.js +4 -2
- package/dist/src/commands/metadata-category-configs.js.map +1 -1
- package/dist/src/commands/metadata.js +41 -0
- package/dist/src/commands/metadata.js.map +1 -1
- package/dist/src/commands/prompts.js +75 -52
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rate-counters.d.ts +19 -0
- package/dist/src/commands/rate-counters.js +104 -0
- package/dist/src/commands/rate-counters.js.map +1 -0
- package/dist/src/commands/rule-sets.d.ts +1 -1
- package/dist/src/commands/rule-sets.js +2 -1
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/schemas.d.ts +15 -0
- package/dist/src/commands/schemas.js +122 -0
- package/dist/src/commands/schemas.js.map +1 -0
- package/dist/src/commands/scripts.d.ts +9 -17
- package/dist/src/commands/scripts.js +24 -479
- package/dist/src/commands/scripts.js.map +1 -1
- package/dist/src/commands/secrets.js +47 -3
- package/dist/src/commands/secrets.js.map +1 -1
- package/dist/src/commands/sessions.js +2 -0
- package/dist/src/commands/sessions.js.map +1 -1
- package/dist/src/commands/skill.js +2 -0
- package/dist/src/commands/skill.js.map +1 -1
- package/dist/src/commands/sync-schemas.d.ts +202 -0
- package/dist/src/commands/sync-schemas.js +629 -0
- package/dist/src/commands/sync-schemas.js.map +1 -0
- package/dist/src/commands/sync-user-properties.d.ts +118 -0
- package/dist/src/commands/sync-user-properties.js +276 -0
- package/dist/src/commands/sync-user-properties.js.map +1 -0
- package/dist/src/commands/sync.d.ts +518 -546
- package/dist/src/commands/sync.js +3010 -4877
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.js +5 -3
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/commands/transitions.d.ts +54 -0
- package/dist/src/commands/transitions.js +418 -0
- package/dist/src/commands/transitions.js.map +1 -0
- package/dist/src/commands/usage.d.ts +18 -0
- package/dist/src/commands/usage.js +343 -0
- package/dist/src/commands/usage.js.map +1 -0
- package/dist/src/commands/user-properties.d.ts +14 -0
- package/dist/src/commands/user-properties.js +79 -0
- package/dist/src/commands/user-properties.js.map +1 -0
- package/dist/src/commands/users.js +911 -18
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/vars.js +2 -0
- package/dist/src/commands/vars.js.map +1 -1
- package/dist/src/commands/waitlist.js +39 -4
- package/dist/src/commands/waitlist.js.map +1 -1
- package/dist/src/commands/workflows.d.ts +5 -83
- package/dist/src/commands/workflows.js +57 -2282
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/analytics-query.d.ts +58 -0
- package/dist/src/lib/analytics-query.js +134 -0
- package/dist/src/lib/analytics-query.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +1818 -438
- package/dist/src/lib/api-client.js +965 -544
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-settings-descriptor.d.ts +1 -1
- package/dist/src/lib/app-settings-descriptor.js +6 -0
- package/dist/src/lib/app-settings-descriptor.js.map +1 -1
- package/dist/src/lib/auth-fixtures.d.ts +44 -0
- package/dist/src/lib/auth-fixtures.js +61 -0
- package/dist/src/lib/auth-fixtures.js.map +1 -0
- package/dist/src/lib/auth-flow.d.ts +34 -1
- package/dist/src/lib/auth-flow.js +429 -13
- package/dist/src/lib/auth-flow.js.map +1 -1
- package/dist/src/lib/block-layout.d.ts +12 -23
- package/dist/src/lib/block-layout.js +26 -92
- package/dist/src/lib/block-layout.js.map +1 -1
- package/dist/src/lib/block-selector.d.ts +8 -14
- package/dist/src/lib/block-selector.js +8 -19
- package/dist/src/lib/block-selector.js.map +1 -1
- package/dist/src/lib/child-apps-local.d.ts +3 -1
- package/dist/src/lib/child-apps-local.js +9 -1
- package/dist/src/lib/child-apps-local.js.map +1 -1
- package/dist/src/lib/cli-manifest.d.ts +9 -0
- package/dist/src/lib/cli-manifest.js +10 -1
- package/dist/src/lib/cli-manifest.js.map +1 -1
- package/dist/src/lib/cli-version.d.ts +14 -0
- package/dist/src/lib/cli-version.js +38 -0
- package/dist/src/lib/cli-version.js.map +1 -0
- package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
- package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
- package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
- package/dist/src/lib/collection-export.d.ts +76 -15
- package/dist/src/lib/collection-export.js +116 -23
- package/dist/src/lib/collection-export.js.map +1 -1
- package/dist/src/lib/collection-principal.d.ts +22 -0
- package/dist/src/lib/collection-principal.js +35 -0
- package/dist/src/lib/collection-principal.js.map +1 -0
- package/dist/src/lib/command-groups.d.ts +30 -0
- package/dist/src/lib/command-groups.js +109 -0
- package/dist/src/lib/command-groups.js.map +1 -0
- package/dist/src/lib/command-status.d.ts +147 -0
- package/dist/src/lib/command-status.js +266 -0
- package/dist/src/lib/command-status.js.map +1 -0
- package/dist/src/lib/config-object-descriptor.d.ts +9 -22
- package/dist/src/lib/config-object-descriptor.js +107 -276
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config-surface.d.ts +3 -7
- package/dist/src/lib/config-surface.js +9 -13
- package/dist/src/lib/config-surface.js.map +1 -1
- package/dist/src/lib/config-toml.d.ts +11 -2
- package/dist/src/lib/config-toml.js +25 -2
- package/dist/src/lib/config-toml.js.map +1 -1
- package/dist/src/lib/credentials-home.d.ts +7 -0
- package/dist/src/lib/credentials-home.js +45 -10
- package/dist/src/lib/credentials-home.js.map +1 -1
- package/dist/src/lib/credentials-lock.d.ts +14 -6
- package/dist/src/lib/credentials-lock.js +90 -10
- package/dist/src/lib/credentials-lock.js.map +1 -1
- package/dist/src/lib/credentials-store.d.ts +123 -70
- package/dist/src/lib/credentials-store.js +358 -113
- package/dist/src/lib/credentials-store.js.map +1 -1
- package/dist/src/lib/custodian.d.ts +8 -0
- package/dist/src/lib/custodian.js +18 -0
- package/dist/src/lib/custodian.js.map +1 -0
- package/dist/src/lib/data-input.d.ts +1 -1
- package/dist/src/lib/data-input.js +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
- package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +38 -1
- package/dist/src/lib/db-codegen/dbTypeIR.js +29 -7
- package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
- package/dist/src/lib/db-type-records.d.ts +106 -0
- package/dist/src/lib/db-type-records.js +224 -0
- package/dist/src/lib/db-type-records.js.map +1 -0
- package/dist/src/lib/db3-export.d.ts +287 -0
- package/dist/src/lib/db3-export.js +647 -0
- package/dist/src/lib/db3-export.js.map +1 -0
- package/dist/src/lib/db3-index-output.d.ts +116 -0
- package/dist/src/lib/db3-index-output.js +223 -0
- package/dist/src/lib/db3-index-output.js.map +1 -0
- package/dist/src/lib/db3-type-models.d.ts +134 -0
- package/dist/src/lib/db3-type-models.js +452 -0
- package/dist/src/lib/db3-type-models.js.map +1 -0
- package/dist/src/lib/deprecation.d.ts +2 -2
- package/dist/src/lib/deprecation.js +2 -2
- package/dist/src/lib/document-ingest-artifact.d.ts +13 -0
- package/dist/src/lib/document-ingest-artifact.js +36 -6
- package/dist/src/lib/document-ingest-artifact.js.map +1 -1
- package/dist/src/lib/document-ingest-format2.d.ts +36 -0
- package/dist/src/lib/document-ingest-format2.js +78 -0
- package/dist/src/lib/document-ingest-format2.js.map +1 -0
- package/dist/src/lib/document-ingest-input.d.ts +9 -0
- package/dist/src/lib/document-ingest-input.js +28 -1
- package/dist/src/lib/document-ingest-input.js.map +1 -1
- package/dist/src/lib/document-ingest.d.ts +11 -1
- package/dist/src/lib/document-ingest.js +16 -0
- package/dist/src/lib/document-ingest.js.map +1 -1
- package/dist/src/lib/document-schema-rows.d.ts +42 -0
- package/dist/src/lib/document-schema-rows.js +53 -0
- package/dist/src/lib/document-schema-rows.js.map +1 -0
- package/dist/src/lib/experimental-apis.d.ts +36 -0
- package/dist/src/lib/experimental-apis.js +46 -0
- package/dist/src/lib/experimental-apis.js.map +1 -0
- package/dist/src/lib/file-attachment.d.ts +24 -0
- package/dist/src/lib/file-attachment.js +31 -0
- package/dist/src/lib/file-attachment.js.map +1 -0
- package/dist/src/lib/function-authorize-check.d.ts +142 -0
- package/dist/src/lib/function-authorize-check.js +311 -0
- package/dist/src/lib/function-authorize-check.js.map +1 -0
- package/dist/src/lib/function-authorize-view.d.ts +27 -0
- package/dist/src/lib/function-authorize-view.js +88 -0
- package/dist/src/lib/function-authorize-view.js.map +1 -0
- package/dist/src/lib/function-bundle.d.ts +27 -5
- package/dist/src/lib/function-bundle.js +142 -7
- package/dist/src/lib/function-bundle.js.map +1 -1
- package/dist/src/lib/function-collect.d.ts +90 -12
- package/dist/src/lib/function-collect.js +482 -12
- package/dist/src/lib/function-collect.js.map +1 -1
- package/dist/src/lib/function-db-types.d.ts +65 -11
- package/dist/src/lib/function-db-types.js +297 -157
- package/dist/src/lib/function-db-types.js.map +1 -1
- package/dist/src/lib/function-document-types.d.ts +19 -7
- package/dist/src/lib/function-document-types.js +24 -12
- package/dist/src/lib/function-document-types.js.map +1 -1
- package/dist/src/lib/function-lint.d.ts +57 -0
- package/dist/src/lib/function-lint.js +234 -0
- package/dist/src/lib/function-lint.js.map +1 -0
- package/dist/src/lib/function-log-row.js +21 -2
- package/dist/src/lib/function-log-row.js.map +1 -1
- package/dist/src/lib/function-run.d.ts +13 -21
- package/dist/src/lib/function-run.js +14 -27
- package/dist/src/lib/function-run.js.map +1 -1
- package/dist/src/lib/function-schema-codegen.d.ts +86 -22
- package/dist/src/lib/function-schema-codegen.js +194 -88
- package/dist/src/lib/function-schema-codegen.js.map +1 -1
- package/dist/src/lib/function-schema-refs.d.ts +98 -0
- package/dist/src/lib/function-schema-refs.js +177 -0
- package/dist/src/lib/function-schema-refs.js.map +1 -0
- package/dist/src/lib/function-sync.d.ts +109 -6
- package/dist/src/lib/function-sync.js +179 -26
- package/dist/src/lib/function-sync.js.map +1 -1
- package/dist/src/lib/function-trigger-listing.d.ts +11 -6
- package/dist/src/lib/function-trigger-listing.js +32 -11
- package/dist/src/lib/function-trigger-listing.js.map +1 -1
- package/dist/src/lib/function-typecheck.d.ts +52 -0
- package/dist/src/lib/function-typecheck.js +174 -54
- package/dist/src/lib/function-typecheck.js.map +1 -1
- package/dist/src/lib/function-versions.d.ts +2 -0
- package/dist/src/lib/function-versions.js +1 -0
- package/dist/src/lib/function-versions.js.map +1 -1
- package/dist/src/lib/generated-build-flags.d.ts +13 -0
- package/dist/src/lib/generated-build-flags.js +14 -0
- package/dist/src/lib/generated-build-flags.js.map +1 -0
- package/dist/src/lib/generated-command-status.d.ts +6 -0
- package/dist/src/lib/generated-command-status.js +469 -0
- package/dist/src/lib/generated-command-status.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +538 -141
- package/dist/src/lib/generated-config-surfaces.js +1772 -1854
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/hosting-build.d.ts +97 -0
- package/dist/src/lib/hosting-build.js +204 -0
- package/dist/src/lib/hosting-build.js.map +1 -0
- package/dist/src/lib/hosting-client.d.ts +167 -0
- package/dist/src/lib/hosting-client.js +340 -0
- package/dist/src/lib/hosting-client.js.map +1 -0
- package/dist/src/lib/hosting-environments.d.ts +32 -0
- package/dist/src/lib/hosting-environments.js +74 -0
- package/dist/src/lib/hosting-environments.js.map +1 -0
- package/dist/src/lib/hosting-errors.d.ts +30 -0
- package/dist/src/lib/hosting-errors.js +43 -0
- package/dist/src/lib/hosting-errors.js.map +1 -0
- package/dist/src/lib/hosting-token.d.ts +46 -0
- package/dist/src/lib/hosting-token.js +60 -0
- package/dist/src/lib/hosting-token.js.map +1 -0
- package/dist/src/lib/hosting-wait.d.ts +42 -0
- package/dist/src/lib/hosting-wait.js +84 -0
- package/dist/src/lib/hosting-wait.js.map +1 -0
- package/dist/src/lib/hosting-wfp-upload.d.ts +86 -0
- package/dist/src/lib/hosting-wfp-upload.js +149 -0
- package/dist/src/lib/hosting-wfp-upload.js.map +1 -0
- package/dist/src/lib/init-assets.d.ts +2 -6
- package/dist/src/lib/init-assets.js +11 -27
- package/dist/src/lib/init-assets.js.map +1 -1
- package/dist/src/lib/init-ios-links.d.ts +11 -7
- package/dist/src/lib/init-ios-links.js +28 -22
- package/dist/src/lib/init-ios-links.js.map +1 -1
- package/dist/src/lib/init-login-note.d.ts +13 -0
- package/dist/src/lib/init-login-note.js +22 -0
- package/dist/src/lib/init-login-note.js.map +1 -0
- package/dist/src/lib/init-schema.d.ts +15 -0
- package/dist/src/lib/init-schema.js +54 -0
- package/dist/src/lib/init-schema.js.map +1 -1
- package/dist/src/lib/integration-test-request.d.ts +54 -0
- package/dist/src/lib/integration-test-request.js +207 -0
- package/dist/src/lib/integration-test-request.js.map +1 -0
- package/dist/src/lib/invoker-shared-enums.d.ts +35 -0
- package/dist/src/lib/invoker-shared-enums.js +98 -0
- package/dist/src/lib/invoker-shared-enums.js.map +1 -0
- package/dist/src/lib/json-value.d.ts +6 -0
- package/dist/src/lib/json-value.js +13 -0
- package/dist/src/lib/json-value.js.map +1 -0
- package/dist/src/lib/load-routes.d.ts +33 -0
- package/dist/src/lib/load-routes.js +35 -0
- package/dist/src/lib/load-routes.js.map +1 -0
- package/dist/src/lib/log-inspection.d.ts +23 -4
- package/dist/src/lib/log-inspection.js +14 -5
- package/dist/src/lib/log-inspection.js.map +1 -1
- package/dist/src/lib/login-exchange-check.d.ts +18 -0
- package/dist/src/lib/login-exchange-check.js +27 -0
- package/dist/src/lib/login-exchange-check.js.map +1 -0
- package/dist/src/lib/login-scope-lines.d.ts +17 -7
- package/dist/src/lib/login-scope-lines.js +33 -10
- package/dist/src/lib/login-scope-lines.js.map +1 -1
- package/dist/src/lib/metadata-report.d.ts +85 -0
- package/dist/src/lib/metadata-report.js +81 -0
- package/dist/src/lib/metadata-report.js.map +1 -0
- package/dist/src/lib/object-status-filter.d.ts +9 -1
- package/dist/src/lib/object-status-filter.js +9 -1
- package/dist/src/lib/object-status-filter.js.map +1 -1
- package/dist/src/lib/output.d.ts +1 -1
- package/dist/src/lib/output.js +3 -1
- package/dist/src/lib/output.js.map +1 -1
- package/dist/src/lib/pin-refusal-hint.d.ts +12 -0
- package/dist/src/lib/pin-refusal-hint.js +35 -0
- package/dist/src/lib/pin-refusal-hint.js.map +1 -0
- package/dist/src/lib/platform-owned.js +5 -0
- package/dist/src/lib/platform-owned.js.map +1 -1
- package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
- package/dist/src/lib/primitive-declaration-names.js +22 -0
- package/dist/src/lib/primitive-declaration-names.js.map +1 -0
- package/dist/src/lib/primitive-declaration.d.ts +174 -0
- package/dist/src/lib/primitive-declaration.js +792 -0
- package/dist/src/lib/primitive-declaration.js.map +1 -0
- package/dist/src/lib/primitive-env-plugin.d.ts +99 -0
- package/dist/src/lib/primitive-env-plugin.js +408 -0
- package/dist/src/lib/primitive-env-plugin.js.map +1 -0
- package/dist/src/lib/project-login-apps.d.ts +8 -0
- package/dist/src/lib/project-login-apps.js +27 -0
- package/dist/src/lib/project-login-apps.js.map +1 -0
- package/dist/src/lib/prompt-schema-codegen.d.ts +36 -12
- package/dist/src/lib/prompt-schema-codegen.js +96 -100
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/prompt-schema-document.d.ts +35 -0
- package/dist/src/lib/prompt-schema-document.js +92 -0
- package/dist/src/lib/prompt-schema-document.js.map +1 -0
- package/dist/src/lib/prompt-schema-refs.d.ts +173 -0
- package/dist/src/lib/prompt-schema-refs.js +478 -0
- package/dist/src/lib/prompt-schema-refs.js.map +1 -0
- package/dist/src/lib/records-verbs.d.ts +79 -0
- package/dist/src/lib/records-verbs.js +45 -0
- package/dist/src/lib/records-verbs.js.map +1 -0
- package/dist/src/lib/register-commands.d.ts +36 -0
- package/dist/src/lib/register-commands.js +37 -0
- package/dist/src/lib/register-commands.js.map +1 -0
- package/dist/src/lib/retired-imports.d.ts +53 -0
- package/dist/src/lib/retired-imports.js +120 -0
- package/dist/src/lib/retired-imports.js.map +1 -0
- package/dist/src/lib/run-status.d.ts +1 -1
- package/dist/src/lib/run-status.generated.d.ts +2 -2
- package/dist/src/lib/run-status.generated.js +3 -1
- package/dist/src/lib/run-status.generated.js.map +1 -1
- package/dist/src/lib/run-status.js +1 -1
- package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js +227 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +218 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js +397 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +258 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +422 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.d.ts +27 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js +126 -0
- package/dist/src/lib/schema-codegen/generated-schema-shape.js.map +1 -0
- package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
- package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
- package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
- package/dist/src/lib/schema-codegen/naming.d.ts +35 -0
- package/dist/src/lib/schema-codegen/naming.js +83 -0
- package/dist/src/lib/schema-codegen/naming.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
- package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
- package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaToTs.d.ts +109 -0
- package/dist/src/lib/schema-codegen/schemaToTs.js +269 -0
- package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -0
- package/dist/src/lib/schema-codegen/valuesLists.d.ts +48 -0
- package/dist/src/lib/schema-codegen/valuesLists.js +144 -0
- package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
- package/dist/src/lib/schema-family-index.d.ts +228 -0
- package/dist/src/lib/schema-family-index.js +813 -0
- package/dist/src/lib/schema-family-index.js.map +1 -0
- package/dist/src/lib/schema-pins.d.ts +82 -0
- package/dist/src/lib/schema-pins.js +198 -0
- package/dist/src/lib/schema-pins.js.map +1 -0
- package/dist/src/lib/schema-preview.d.ts +244 -0
- package/dist/src/lib/schema-preview.js +498 -0
- package/dist/src/lib/schema-preview.js.map +1 -0
- package/dist/src/lib/scope-request.d.ts +23 -11
- package/dist/src/lib/scope-request.js +69 -31
- package/dist/src/lib/scope-request.js.map +1 -1
- package/dist/src/lib/session-scope.d.ts +26 -0
- package/dist/src/lib/session-scope.js +58 -0
- package/dist/src/lib/session-scope.js.map +1 -0
- package/dist/src/lib/skill-installer.d.ts +2 -2
- package/dist/src/lib/skill-installer.js +2 -21
- package/dist/src/lib/skill-installer.js.map +1 -1
- package/dist/src/lib/step-run-table.d.ts +1 -2
- package/dist/src/lib/step-run-table.js +1 -2
- package/dist/src/lib/step-run-table.js.map +1 -1
- package/dist/src/lib/swift-codegen/agentGenerator.d.ts +2 -1
- package/dist/src/lib/swift-codegen/agentGenerator.js +25 -23
- package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
- package/dist/src/lib/swift-codegen/banners.js +12 -0
- package/dist/src/lib/swift-codegen/banners.js.map +1 -1
- package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
- package/dist/src/lib/swift-codegen/functionGenerator.js +169 -51
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +33 -9
- package/dist/src/lib/swift-codegen/schemaToSwift.js +215 -179
- package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
- package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +45 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js +165 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/swiftKeys.d.ts +19 -0
- package/dist/src/lib/swift-codegen/swiftKeys.js +31 -0
- package/dist/src/lib/swift-codegen/swiftKeys.js.map +1 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
- package/dist/src/lib/sync-resource-types.d.ts +117 -31
- package/dist/src/lib/sync-resource-types.js +197 -189
- package/dist/src/lib/sync-resource-types.js.map +1 -1
- package/dist/src/lib/sync-selectors.d.ts +7 -0
- package/dist/src/lib/sync-selectors.js +22 -2
- package/dist/src/lib/sync-selectors.js.map +1 -1
- package/dist/src/lib/template.d.ts +39 -3
- package/dist/src/lib/template.js +103 -14
- package/dist/src/lib/template.js.map +1 -1
- package/dist/src/lib/test-case-file-names.d.ts +3 -5
- package/dist/src/lib/test-case-file-names.js +3 -5
- package/dist/src/lib/test-case-file-names.js.map +1 -1
- package/dist/src/lib/test-runs.d.ts +45 -0
- package/dist/src/lib/test-runs.js +150 -0
- package/dist/src/lib/test-runs.js.map +1 -0
- package/dist/src/lib/test-users.d.ts +25 -0
- package/dist/src/lib/test-users.js +36 -0
- package/dist/src/lib/test-users.js.map +1 -0
- package/dist/src/lib/toml-database-config.d.ts +4 -2
- package/dist/src/lib/toml-database-config.js +11 -6
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/toml-scalar-edit.js +6 -4
- package/dist/src/lib/toml-scalar-edit.js.map +1 -1
- package/dist/src/lib/transition-warnings.d.ts +21 -0
- package/dist/src/lib/transition-warnings.js +49 -0
- package/dist/src/lib/transition-warnings.js.map +1 -0
- package/dist/src/lib/user-index.d.ts +80 -0
- package/dist/src/lib/user-index.js +166 -0
- package/dist/src/lib/user-index.js.map +1 -0
- package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
- package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
- package/dist/src/lib/user-walk.d.ts +31 -0
- package/dist/src/lib/user-walk.js +102 -0
- package/dist/src/lib/user-walk.js.map +1 -0
- package/dist/src/lib/webhook-capture.d.ts +43 -0
- package/dist/src/lib/webhook-capture.js +91 -0
- package/dist/src/lib/webhook-capture.js.map +1 -0
- package/dist/src/lib/webhook-deliver.d.ts +18 -20
- package/dist/src/lib/webhook-deliver.js +34 -89
- package/dist/src/lib/webhook-deliver.js.map +1 -1
- package/dist/src/lib/webhook-test-run.d.ts +32 -0
- package/dist/src/lib/webhook-test-run.js +108 -0
- package/dist/src/lib/webhook-test-run.js.map +1 -0
- package/dist/src/lib/worker-perf-format.d.ts +22 -0
- package/dist/src/lib/worker-perf-format.js +27 -0
- package/dist/src/lib/worker-perf-format.js.map +1 -0
- package/dist/src/types/index.d.ts +20 -65
- package/dist/src/validators.d.ts +7 -55
- package/dist/src/validators.js +7 -53
- package/dist/src/validators.js.map +1 -1
- package/dist/src/vite.d.ts +17 -0
- package/dist/src/vite.js +18 -0
- package/dist/src/vite.js.map +1 -0
- package/package.json +20 -9
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ListEnvelope } from "./paginate.js";
|
|
2
|
-
import { type GlobalAppRef, type WorkflowUsageReport } from "./workflow-usage.js";
|
|
3
2
|
/**
|
|
4
3
|
* #4262 — an agent prompt's test case: its `[test.agent]` block on the wire.
|
|
5
4
|
* `agentHistory` is JSON text; context and the expected call are parsed.
|
|
@@ -29,6 +28,61 @@ export interface BlobInfo {
|
|
|
29
28
|
uploaded?: string | null;
|
|
30
29
|
etag?: string | null;
|
|
31
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* The `authorize` and `input` fields of one function version as the admin API
|
|
33
|
+
* answers it (a configs-list item, a version get, a push answer). `input` is
|
|
34
|
+
* the list of top-level input keys the version's `authorize` callable declared,
|
|
35
|
+
* recorded by the server at push; `null` for a version without `authorize` and
|
|
36
|
+
* for one that declared no list. Annotate a version read with it to type the
|
|
37
|
+
* two fields.
|
|
38
|
+
*/
|
|
39
|
+
export interface FunctionVersionInputFields {
|
|
40
|
+
authorize?: boolean;
|
|
41
|
+
input?: string[] | null;
|
|
42
|
+
/** #5840 — whether this version opens to signed-out callers. */
|
|
43
|
+
signedOut?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The live version's `authorize` flag and `input` list as the function get
|
|
47
|
+
* and each functions-list item answer them. Both are `null` when no version is
|
|
48
|
+
* active; `activeConfigInput` is also `null` when the live version recorded no
|
|
49
|
+
* list.
|
|
50
|
+
*/
|
|
51
|
+
export interface FunctionActiveInputFields {
|
|
52
|
+
activeConfigAuthorize?: boolean | null;
|
|
53
|
+
activeConfigInput?: string[] | null;
|
|
54
|
+
/**
|
|
55
|
+
* #5840 — whether the live version opens to signed-out callers while the
|
|
56
|
+
* app's `signedOutAccess` is on; `null` when no version is active.
|
|
57
|
+
*/
|
|
58
|
+
activeConfigSignedOut?: boolean | null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* An app as `GET /admin/api/apps/{appId}` serializes it. Dates are ISO-8601
|
|
62
|
+
* strings. The lineage fields are null on an app with no parent, and
|
|
63
|
+
* `ownerAdminId`, `branch`, `idleDays` and `expiresAt` appear only on a child.
|
|
64
|
+
*/
|
|
65
|
+
export interface AdminApp {
|
|
66
|
+
appId: string;
|
|
67
|
+
name: string;
|
|
68
|
+
mode: string;
|
|
69
|
+
baseUrl: string | null;
|
|
70
|
+
createdBy: string | null;
|
|
71
|
+
/** The format new root documents are minted in, or null when the app never chose. */
|
|
72
|
+
rootDocumentFormat: string | null;
|
|
73
|
+
protection: string;
|
|
74
|
+
parentAppId: string | null;
|
|
75
|
+
childSlug: string | null;
|
|
76
|
+
lastActivityAt: string | null;
|
|
77
|
+
ownerAdminId?: string | null;
|
|
78
|
+
branch?: string | null;
|
|
79
|
+
idleDays?: number | null;
|
|
80
|
+
expiresAt?: string | null;
|
|
81
|
+
createdAt: string;
|
|
82
|
+
modifiedAt: string;
|
|
83
|
+
/** The app's remaining settings (auth, CORS, passkeys, invitations, …). */
|
|
84
|
+
[setting: string]: unknown;
|
|
85
|
+
}
|
|
32
86
|
/**
|
|
33
87
|
* One child app as `GET /admin/api/apps/{appId}/children` lists it. Dates
|
|
34
88
|
* are ISO-8601 strings.
|
|
@@ -61,6 +115,319 @@ export interface ChildPreviewOrigins {
|
|
|
61
115
|
childSlug: string;
|
|
62
116
|
previewOrigins: string[];
|
|
63
117
|
}
|
|
118
|
+
/** One row of a db3's index registry, as `db3/:id/indexes` answers it. */
|
|
119
|
+
/** What a db3 index is (#5220). */
|
|
120
|
+
export type Db3IndexKind = "scalar" | "members" | "text" | "vector";
|
|
121
|
+
/** Where a db3 index lives (#5220). */
|
|
122
|
+
export type Db3IndexPlacement = "server" | "device" | "both";
|
|
123
|
+
/** A `vector` index's options on its registration (#5225): how devices search the field. */
|
|
124
|
+
export interface Db3VectorIndexOptions {
|
|
125
|
+
distance?: "cos" | "l2";
|
|
126
|
+
index?: "exact" | {
|
|
127
|
+
mode: "ann";
|
|
128
|
+
nbucket?: number;
|
|
129
|
+
codesize?: number;
|
|
130
|
+
quantizer?: "pq" | "opq" | "bq";
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export interface Db3IndexRow {
|
|
134
|
+
name: string;
|
|
135
|
+
model: string;
|
|
136
|
+
fields: string[];
|
|
137
|
+
unique: boolean;
|
|
138
|
+
/** `true` for a string-set field's member index; absent on any other. */
|
|
139
|
+
members?: boolean;
|
|
140
|
+
origins: Array<{
|
|
141
|
+
kind: "declaration" | "named";
|
|
142
|
+
unique: boolean;
|
|
143
|
+
}>;
|
|
144
|
+
/** What the index is; a server from before #5220 lists none. */
|
|
145
|
+
kind?: Db3IndexKind;
|
|
146
|
+
/** Where the index lives; a server from before #5220 lists none. */
|
|
147
|
+
on?: Db3IndexPlacement;
|
|
148
|
+
/** A text index's options, every one filled in (#5222); absent on any other kind. */
|
|
149
|
+
text?: Db3TextIndexOptions;
|
|
150
|
+
/** A vector index's options filled in, with its field's `dims` and `element` (#5229); absent on any other kind. */
|
|
151
|
+
vector?: Db3VectorIndexOptions & {
|
|
152
|
+
dims?: number;
|
|
153
|
+
element?: "f32" | "f16" | "i8";
|
|
154
|
+
};
|
|
155
|
+
/** A vector index's generation: new at every registration (#5229). */
|
|
156
|
+
generation?: number;
|
|
157
|
+
/** A vector index's model revision: moved on when its model is deleted (#5229). */
|
|
158
|
+
revision?: number;
|
|
159
|
+
/** An `ann` vector index's shared model, once a device uploaded one (#5229). */
|
|
160
|
+
annModel?: Db3IndexAnnModel;
|
|
161
|
+
}
|
|
162
|
+
/** An `ann` vector index's shared model as `GET db3/:id/indexes` lists it (#5229). */
|
|
163
|
+
export interface Db3IndexAnnModel {
|
|
164
|
+
revision: number;
|
|
165
|
+
trainedAt: string;
|
|
166
|
+
rows: number;
|
|
167
|
+
bytes: number;
|
|
168
|
+
format: string;
|
|
169
|
+
}
|
|
170
|
+
/** What `db3/:id/records/:model/explain` takes (#5240): the read, as its records route takes it, and an optional force. */
|
|
171
|
+
export interface Db3ExplainRequest {
|
|
172
|
+
op: "query" | "count" | "aggregate";
|
|
173
|
+
filter?: Record<string, any>;
|
|
174
|
+
options?: {
|
|
175
|
+
sort?: unknown;
|
|
176
|
+
limit?: number | string;
|
|
177
|
+
cursor?: string;
|
|
178
|
+
include?: unknown;
|
|
179
|
+
};
|
|
180
|
+
aggregate?: Record<string, unknown>;
|
|
181
|
+
/** An index of the model to force the read onto, or `"none"`. */
|
|
182
|
+
index?: string;
|
|
183
|
+
}
|
|
184
|
+
/** One statement an explained read ran (#5240). */
|
|
185
|
+
export interface Db3ExplainedStatement {
|
|
186
|
+
model: string;
|
|
187
|
+
sql: string;
|
|
188
|
+
runs: number;
|
|
189
|
+
plan: string[] | null;
|
|
190
|
+
planError?: string;
|
|
191
|
+
indexes: string[];
|
|
192
|
+
scan: boolean;
|
|
193
|
+
}
|
|
194
|
+
/** What `db3/:id/records/:model/explain` answers (#5240). */
|
|
195
|
+
export interface Db3ExplainAnswer {
|
|
196
|
+
op: "query" | "count" | "aggregate";
|
|
197
|
+
model: string;
|
|
198
|
+
index: string | null;
|
|
199
|
+
indexes: string[];
|
|
200
|
+
scanned: string[];
|
|
201
|
+
statements: Db3ExplainedStatement[];
|
|
202
|
+
answered: number;
|
|
203
|
+
cost: {
|
|
204
|
+
rowsRead: number | null;
|
|
205
|
+
rowsWritten: number | null;
|
|
206
|
+
};
|
|
207
|
+
stats: boolean;
|
|
208
|
+
sqlite: string;
|
|
209
|
+
}
|
|
210
|
+
/** A text index's tokenizer (#5222). */
|
|
211
|
+
export type Db3TextTokenizer = "unicode61" | "porter";
|
|
212
|
+
/** A text index's options (#5222): as `list` answers them every one is filled in; a registration gives any. */
|
|
213
|
+
export interface Db3TextIndexOptions {
|
|
214
|
+
tokenizer: Db3TextTokenizer;
|
|
215
|
+
prefix: number[];
|
|
216
|
+
weights: Record<string, number>;
|
|
217
|
+
}
|
|
218
|
+
/** `GET`/`PATCH users/index/limits`: the shard limit overrides and effective limits, and the property caps. */
|
|
219
|
+
export interface UserIndexLimitsAnswer {
|
|
220
|
+
overrides: Record<string, number | null> | null;
|
|
221
|
+
effective: Record<string, unknown>;
|
|
222
|
+
caps?: {
|
|
223
|
+
effective: Record<string, number>;
|
|
224
|
+
overrides: Record<string, number | null> | null;
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
/** One revalidation slice of an app's user index: when it ran, what started it, and its counts. */
|
|
228
|
+
export type UserIndexSlice = {
|
|
229
|
+
at: string;
|
|
230
|
+
startedAt: string;
|
|
231
|
+
durationMs: number;
|
|
232
|
+
trigger: "alarm" | "demand";
|
|
233
|
+
intervalMs: number;
|
|
234
|
+
nextAt: string;
|
|
235
|
+
batches: number;
|
|
236
|
+
continuations: number;
|
|
237
|
+
behind: boolean;
|
|
238
|
+
hinted: number;
|
|
239
|
+
verified: number;
|
|
240
|
+
stamped: number;
|
|
241
|
+
reprojected: number;
|
|
242
|
+
deleted: number;
|
|
243
|
+
applied: number;
|
|
244
|
+
misplaced: number;
|
|
245
|
+
failed: number;
|
|
246
|
+
sourcePages: number;
|
|
247
|
+
swept: number;
|
|
248
|
+
invitationClaims: number;
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* `POST users/index/reconcile`: 202 once one slice ran, or 200 with no slice
|
|
252
|
+
* while the app is being deleted.
|
|
253
|
+
*/
|
|
254
|
+
export type UserIndexReconcileAnswer = {
|
|
255
|
+
ok: boolean;
|
|
256
|
+
started: true;
|
|
257
|
+
mode: "slice";
|
|
258
|
+
slice: UserIndexSlice;
|
|
259
|
+
reason?: undefined;
|
|
260
|
+
} | {
|
|
261
|
+
ok: boolean;
|
|
262
|
+
started: false;
|
|
263
|
+
reason: "closed";
|
|
264
|
+
};
|
|
265
|
+
/** The body of `POST users/walks` (#5393): the batch function, the walk's key, which users in what batches. */
|
|
266
|
+
export interface UserWalkStartBody {
|
|
267
|
+
function: string;
|
|
268
|
+
key: string;
|
|
269
|
+
filter?: Record<string, unknown>;
|
|
270
|
+
sort?: Record<string, 1 | -1>;
|
|
271
|
+
input?: unknown;
|
|
272
|
+
batchSize?: number;
|
|
273
|
+
concurrency?: number;
|
|
274
|
+
snapshot?: boolean;
|
|
275
|
+
}
|
|
276
|
+
/** A started (or found) users walk. */
|
|
277
|
+
export interface UserWalkStartAnswer {
|
|
278
|
+
runId: string;
|
|
279
|
+
walkId: string;
|
|
280
|
+
key: string;
|
|
281
|
+
status: string;
|
|
282
|
+
existing: boolean;
|
|
283
|
+
}
|
|
284
|
+
/** A users walk read: the coordinator's view (null when it holds no state) and the walk's run row. */
|
|
285
|
+
export interface UserWalkAnswer {
|
|
286
|
+
status: {
|
|
287
|
+
status: string;
|
|
288
|
+
walk: Record<string, any> | null;
|
|
289
|
+
};
|
|
290
|
+
run: Record<string, any>;
|
|
291
|
+
/** On a terminate only: whether this call ended the walk. */
|
|
292
|
+
terminated?: boolean;
|
|
293
|
+
}
|
|
294
|
+
/** One window length of a rate counter, as `GET rate-counters/:key` answers it. */
|
|
295
|
+
export interface RateCounterWindow {
|
|
296
|
+
windowSeconds: number;
|
|
297
|
+
/** The limit of the latest lease request. */
|
|
298
|
+
limit: number;
|
|
299
|
+
windowStart: string;
|
|
300
|
+
windowEnd: string;
|
|
301
|
+
granted: number;
|
|
302
|
+
returned: number;
|
|
303
|
+
held: number;
|
|
304
|
+
remaining: number;
|
|
305
|
+
/** Lease requests answered with no slots in the window. */
|
|
306
|
+
emptyGrants: number;
|
|
307
|
+
/** Isolates holding leases in the window; `leases` lists at most 50. */
|
|
308
|
+
leaseCount: number;
|
|
309
|
+
leases: Array<{
|
|
310
|
+
isolateId: string;
|
|
311
|
+
granted: number;
|
|
312
|
+
returned: number;
|
|
313
|
+
lastLeaseAt: string;
|
|
314
|
+
}>;
|
|
315
|
+
previous: {
|
|
316
|
+
windowStart: string;
|
|
317
|
+
granted: number;
|
|
318
|
+
returned: number;
|
|
319
|
+
emptyGrants: number;
|
|
320
|
+
} | null;
|
|
321
|
+
}
|
|
322
|
+
/** `GET /admin/api/apps/:appId/rate-counters/:key`: `counters` is empty for a key nothing counted. */
|
|
323
|
+
export interface RateCounterState {
|
|
324
|
+
appId: string;
|
|
325
|
+
key: string;
|
|
326
|
+
counters: RateCounterWindow[];
|
|
327
|
+
}
|
|
328
|
+
/** The active user properties schema, as `GET users/properties` answers it. */
|
|
329
|
+
export interface UserPropertiesActive {
|
|
330
|
+
version: number;
|
|
331
|
+
hash: string;
|
|
332
|
+
fields: Record<string, any>;
|
|
333
|
+
uniqueConstraints: Array<{
|
|
334
|
+
name: string;
|
|
335
|
+
fields: string[];
|
|
336
|
+
}>;
|
|
337
|
+
modifiedAt: string | null;
|
|
338
|
+
}
|
|
339
|
+
/** `GET users/properties`. */
|
|
340
|
+
export interface UserPropertiesState {
|
|
341
|
+
appId: string;
|
|
342
|
+
active: UserPropertiesActive | null;
|
|
343
|
+
/** Always null: a push publishes or is refused at once. */
|
|
344
|
+
staged: null;
|
|
345
|
+
removedFields: Record<string, {
|
|
346
|
+
type: string;
|
|
347
|
+
removedAt: string;
|
|
348
|
+
}>;
|
|
349
|
+
caps: {
|
|
350
|
+
effective: Record<string, number>;
|
|
351
|
+
overrides: Record<string, number | null> | null;
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
/** One member with their properties, as `GET users/{userId}`, `POST users/get-by` and a property write answer it (#5386). */
|
|
355
|
+
export interface AppUserWithProperties {
|
|
356
|
+
userId: string;
|
|
357
|
+
email: string | null;
|
|
358
|
+
name: string | null;
|
|
359
|
+
avatarUrl: string | null;
|
|
360
|
+
role: string | null;
|
|
361
|
+
status: string;
|
|
362
|
+
disabledAt?: string;
|
|
363
|
+
addedAt: string | null;
|
|
364
|
+
testUser: boolean;
|
|
365
|
+
properties: Record<string, unknown>;
|
|
366
|
+
}
|
|
367
|
+
/** A property write's body (#5386): a merge-patch (null clears), set additions and removals, and a condition checked inside the write. */
|
|
368
|
+
export interface AppUserPropertiesWrite {
|
|
369
|
+
patch?: Record<string, unknown>;
|
|
370
|
+
addToSet?: Record<string, string[]>;
|
|
371
|
+
removeFromSet?: Record<string, string[]>;
|
|
372
|
+
condition?: Record<string, unknown>;
|
|
373
|
+
}
|
|
374
|
+
/** `PUT users/properties`. */
|
|
375
|
+
export interface UserPropertiesPushAnswer {
|
|
376
|
+
outcome: "published" | "unchanged" | "would-publish";
|
|
377
|
+
active?: UserPropertiesActive | null;
|
|
378
|
+
removedFields?: Record<string, {
|
|
379
|
+
type: string;
|
|
380
|
+
removedAt: string;
|
|
381
|
+
}>;
|
|
382
|
+
checks?: Array<Record<string, unknown>>;
|
|
383
|
+
}
|
|
384
|
+
/** One version of a `schemas/` file, as `GET …/schemas` lists it (#5532). */
|
|
385
|
+
export interface SchemaFileMeta {
|
|
386
|
+
file: string;
|
|
387
|
+
version: number;
|
|
388
|
+
tombstone: boolean;
|
|
389
|
+
/** sha256 hex of the source; null on a tombstone. */
|
|
390
|
+
sourceHash: string | null;
|
|
391
|
+
/** The file's def names, in file order; empty on a tombstone. */
|
|
392
|
+
defs: string[];
|
|
393
|
+
createdAt: string;
|
|
394
|
+
}
|
|
395
|
+
/** One version of a `schemas/` file with its source and compiled defs (`GET …/schemas/:file`). */
|
|
396
|
+
export interface SchemaFileVersion extends SchemaFileMeta {
|
|
397
|
+
/** Whether this is the file's current version. */
|
|
398
|
+
current: boolean;
|
|
399
|
+
createdBy: string;
|
|
400
|
+
source: string | null;
|
|
401
|
+
/**
|
|
402
|
+
* The compiled defs and, for a version stored since #5533, each def's
|
|
403
|
+
* provenance: where it inlined refs and the hash of each def it inlined.
|
|
404
|
+
*/
|
|
405
|
+
compiled: {
|
|
406
|
+
defs: Record<string, unknown>;
|
|
407
|
+
provenance?: Record<string, SchemaFileProvenance>;
|
|
408
|
+
} | null;
|
|
409
|
+
}
|
|
410
|
+
/** One def's provenance: inlined pointer → the chain of refs inlined there, each with its def's hash (#5533). */
|
|
411
|
+
export type SchemaFileProvenance = Record<string, {
|
|
412
|
+
chain: Array<{
|
|
413
|
+
ref: string;
|
|
414
|
+
hash: string;
|
|
415
|
+
}>;
|
|
416
|
+
}>;
|
|
417
|
+
/** What a `schemas/` push answers (`PUT …/schemas/:file`). */
|
|
418
|
+
export interface SchemaPushAnswer extends SchemaFileMeta {
|
|
419
|
+
outcome: "created" | "unchanged" | "tombstoned";
|
|
420
|
+
warnings: string[];
|
|
421
|
+
}
|
|
422
|
+
/** One live file's source, as `POST …/schemas/pull` answers it. */
|
|
423
|
+
export interface SchemaPullItem {
|
|
424
|
+
file: string;
|
|
425
|
+
version: number;
|
|
426
|
+
sourceHash: string;
|
|
427
|
+
defs: string[];
|
|
428
|
+
createdAt: string;
|
|
429
|
+
source: string;
|
|
430
|
+
}
|
|
64
431
|
export declare class ApiError extends Error {
|
|
65
432
|
statusCode: number;
|
|
66
433
|
code?: string;
|
|
@@ -172,6 +539,14 @@ interface EmailTemplateDetail {
|
|
|
172
539
|
description: string;
|
|
173
540
|
}[];
|
|
174
541
|
}
|
|
542
|
+
/** The server's rendering of an email template, from the preview route. */
|
|
543
|
+
export interface EmailTemplatePreview {
|
|
544
|
+
renderedSubject: string;
|
|
545
|
+
renderedHtml: string;
|
|
546
|
+
renderedText: string;
|
|
547
|
+
/** The variable values that were rendered: the type's samples, overridden by the caller's. */
|
|
548
|
+
sampleVariables: Record<string, string>;
|
|
549
|
+
}
|
|
175
550
|
interface EmailTemplateUpsertResult {
|
|
176
551
|
emailType: string;
|
|
177
552
|
templateId: string;
|
|
@@ -182,6 +557,32 @@ interface EmailTemplateUpsertResult {
|
|
|
182
557
|
modifiedAt: string;
|
|
183
558
|
warnings: string[];
|
|
184
559
|
}
|
|
560
|
+
/**
|
|
561
|
+
* #5105 — which `+primitivetest` test users an analytics read counted:
|
|
562
|
+
* `exclude` real users only, `include` everyone, `only` test users alone.
|
|
563
|
+
*/
|
|
564
|
+
type AnalyticsTestUsersMode = "include" | "exclude" | "only";
|
|
565
|
+
/** The `testUsers` query parameter an analytics read accepts (#5105). */
|
|
566
|
+
interface AnalyticsTestUsersParam {
|
|
567
|
+
testUsers?: AnalyticsTestUsersMode;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* #5251 — `_bust=1`: the analytics read recomputes instead of answering from
|
|
571
|
+
* the server's cache.
|
|
572
|
+
*/
|
|
573
|
+
interface AnalyticsFreshParam {
|
|
574
|
+
_bust?: "1";
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* #5251 — one `filter[<field>][<operator>]` entry of an events or errors
|
|
578
|
+
* query, with the server's operator name (`is`, `is not`, `contains`,
|
|
579
|
+
* `starts with`).
|
|
580
|
+
*/
|
|
581
|
+
export interface AnalyticsFilterParam {
|
|
582
|
+
field: string;
|
|
583
|
+
operator: string;
|
|
584
|
+
value: string;
|
|
585
|
+
}
|
|
185
586
|
interface AnalyticsTiming {
|
|
186
587
|
total_ms: number;
|
|
187
588
|
wae_queries: number[];
|
|
@@ -190,6 +591,8 @@ interface AnalyticsMetricResponse {
|
|
|
190
591
|
value: number;
|
|
191
592
|
previous: number;
|
|
192
593
|
deltaPct: number;
|
|
594
|
+
/** #5105 — the mode the server applied. */
|
|
595
|
+
testUsers: AnalyticsTestUsersMode;
|
|
193
596
|
_timing: AnalyticsTiming;
|
|
194
597
|
}
|
|
195
598
|
interface AnalyticsGrowthResponse {
|
|
@@ -201,6 +604,8 @@ interface AnalyticsGrowthResponse {
|
|
|
201
604
|
current_active: number;
|
|
202
605
|
previous_active: number;
|
|
203
606
|
deltaPct: number;
|
|
607
|
+
/** #5105 — the mode the server applied. */
|
|
608
|
+
testUsers: AnalyticsTestUsersMode;
|
|
204
609
|
_timing: AnalyticsTiming;
|
|
205
610
|
}
|
|
206
611
|
interface AnalyticsDailyActivePoint {
|
|
@@ -211,6 +616,8 @@ interface AnalyticsDailyActivePoint {
|
|
|
211
616
|
interface AnalyticsDailyActiveResponse {
|
|
212
617
|
window_days: number;
|
|
213
618
|
rows: AnalyticsDailyActivePoint[];
|
|
619
|
+
/** #5105 — the mode the server applied. */
|
|
620
|
+
testUsers: AnalyticsTestUsersMode;
|
|
214
621
|
_timing: AnalyticsTiming;
|
|
215
622
|
}
|
|
216
623
|
interface AnalyticsCohortRow {
|
|
@@ -223,6 +630,8 @@ interface AnalyticsCohortResponse {
|
|
|
223
630
|
weeks: number[];
|
|
224
631
|
rows: AnalyticsCohortRow[];
|
|
225
632
|
averages: (number | null)[];
|
|
633
|
+
/** #5105 — the mode the server applied. */
|
|
634
|
+
testUsers: AnalyticsTestUsersMode;
|
|
226
635
|
_timing: AnalyticsTiming;
|
|
227
636
|
}
|
|
228
637
|
interface AnalyticsUserSummary {
|
|
@@ -249,10 +658,445 @@ interface AnalyticsUserSummary {
|
|
|
249
658
|
interface AnalyticsTopUserRow extends AnalyticsUserSummary {
|
|
250
659
|
firstSeenInWindow: string;
|
|
251
660
|
}
|
|
661
|
+
/** One meter of a usage month (`GET apps/{appId}/usage`). */
|
|
662
|
+
export interface UsageMonthMeter {
|
|
663
|
+
meter: string;
|
|
664
|
+
kind: "usage" | "storage";
|
|
665
|
+
unit: string;
|
|
666
|
+
quantity: number;
|
|
667
|
+
/** Estimated cost in millionths of a dollar, unrounded. */
|
|
668
|
+
estCostMicros: number;
|
|
669
|
+
bytes: number;
|
|
670
|
+
points: number;
|
|
671
|
+
}
|
|
672
|
+
/** One meter of one day of a usage month. */
|
|
673
|
+
export interface UsageDayMeter {
|
|
674
|
+
meter: string;
|
|
675
|
+
kind: "usage" | "storage";
|
|
676
|
+
quantity: number;
|
|
677
|
+
estCostMicros: number;
|
|
678
|
+
bytes: number;
|
|
679
|
+
points: number;
|
|
680
|
+
source: "live" | "closed";
|
|
681
|
+
frozen: boolean;
|
|
682
|
+
}
|
|
683
|
+
/** A stored transition override: the value, when it was set (epoch ms) and by whom (#5821). */
|
|
684
|
+
export interface AppTransitionOverride {
|
|
685
|
+
v: string;
|
|
686
|
+
at: number;
|
|
687
|
+
by: string;
|
|
688
|
+
}
|
|
689
|
+
/** One platform transition's state for an app, with its registry entry (#5821). */
|
|
690
|
+
export interface AppTransitionState {
|
|
691
|
+
transition: string;
|
|
692
|
+
value: string;
|
|
693
|
+
source: "override" | "parent" | "newAppsFrom" | "default";
|
|
694
|
+
override: AppTransitionOverride | null;
|
|
695
|
+
values: string[];
|
|
696
|
+
v1: string;
|
|
697
|
+
v2: string;
|
|
698
|
+
existingAppsDefault: string;
|
|
699
|
+
newAppsFrom: string;
|
|
700
|
+
owner: string;
|
|
701
|
+
removeBy: string;
|
|
702
|
+
autoMove: "off" | "non-production" | "all";
|
|
703
|
+
migration: TransitionMigrationRecord | null;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* An app's record of a transition's data migration (#5823): every field but
|
|
707
|
+
* `name` is null when the app has no record yet.
|
|
708
|
+
*/
|
|
709
|
+
export interface TransitionMigrationRecord {
|
|
710
|
+
name: string;
|
|
711
|
+
status: "queued" | "running" | "blocked" | "complete" | null;
|
|
712
|
+
/** The handler's position. */
|
|
713
|
+
cursor: string | null;
|
|
714
|
+
counts: {
|
|
715
|
+
scanned: number;
|
|
716
|
+
migrated: number;
|
|
717
|
+
skipped: number;
|
|
718
|
+
} | null;
|
|
719
|
+
/** The app-side step a blocked migration waits for. */
|
|
720
|
+
waitingOn: string | null;
|
|
721
|
+
finishedAt: string | null;
|
|
722
|
+
/** While a rerun is in progress, the earlier completion's finish time. */
|
|
723
|
+
previousFinishedAt: string | null;
|
|
724
|
+
startedAt: string | null;
|
|
725
|
+
lastRunAt: string | null;
|
|
726
|
+
lastError: {
|
|
727
|
+
at: string;
|
|
728
|
+
message: string;
|
|
729
|
+
} | null;
|
|
730
|
+
}
|
|
731
|
+
/** `GET apps/{appId}/transitions`: every registered transition's state for the app (#5821). */
|
|
732
|
+
export interface AppTransitionsResponse {
|
|
733
|
+
appId: string;
|
|
734
|
+
parentAppId: string | null;
|
|
735
|
+
transitions: AppTransitionState[];
|
|
736
|
+
}
|
|
737
|
+
/** A committed transition set, or `unchanged: true` for one equal to the app's override (#5821). */
|
|
738
|
+
export type AppTransitionSetResponse = {
|
|
739
|
+
appId: string;
|
|
740
|
+
transition: string;
|
|
741
|
+
from: string;
|
|
742
|
+
to: string;
|
|
743
|
+
changeId: string;
|
|
744
|
+
at: number;
|
|
745
|
+
by: string;
|
|
746
|
+
} | {
|
|
747
|
+
appId: string;
|
|
748
|
+
transition: string;
|
|
749
|
+
value: string;
|
|
750
|
+
unchanged: true;
|
|
751
|
+
};
|
|
752
|
+
/** One row of an app's transition history (#5821). */
|
|
753
|
+
export interface AppTransitionChange {
|
|
754
|
+
changeId: string;
|
|
755
|
+
transition: string;
|
|
756
|
+
from: string | null;
|
|
757
|
+
to: string | null;
|
|
758
|
+
/** Epoch ms. */
|
|
759
|
+
at: number | null;
|
|
760
|
+
by: string | null;
|
|
761
|
+
reason: string | null;
|
|
762
|
+
children: string[] | null;
|
|
763
|
+
reading: Record<string, unknown> | null;
|
|
764
|
+
}
|
|
765
|
+
/** One registered transition's facts, as `GET transitions` lists them (#5822). */
|
|
766
|
+
export interface TransitionListEntry {
|
|
767
|
+
transition: string;
|
|
768
|
+
values: string[];
|
|
769
|
+
v1: string;
|
|
770
|
+
v2: string;
|
|
771
|
+
existingAppsDefault: string;
|
|
772
|
+
newAppsFrom: string;
|
|
773
|
+
counter: string;
|
|
774
|
+
window: {
|
|
775
|
+
moveDays: number;
|
|
776
|
+
contractDays: number;
|
|
777
|
+
};
|
|
778
|
+
owner: string;
|
|
779
|
+
removeBy: string;
|
|
780
|
+
autoMove: "off" | "non-production" | "all";
|
|
781
|
+
migration: string | null;
|
|
782
|
+
firstReadAt: string | null;
|
|
783
|
+
/** This environment's contract-ready record, or null (#5824). */
|
|
784
|
+
contractReady: TransitionContractReady | null;
|
|
785
|
+
}
|
|
786
|
+
/** A transition's contract-ready record in one environment (#5824). */
|
|
787
|
+
export interface TransitionContractReady {
|
|
788
|
+
ready: boolean;
|
|
789
|
+
/** ISO instant of the sweep that wrote it. */
|
|
790
|
+
at: string;
|
|
791
|
+
/** Apps the sweep counted. */
|
|
792
|
+
apps: number;
|
|
793
|
+
/** The environment-wide count over `contractDays`. */
|
|
794
|
+
count: number;
|
|
795
|
+
}
|
|
796
|
+
/** `GET transitions`: the registry, and apps per value from one budgeted walk (#5822). */
|
|
797
|
+
export interface TransitionListResponse {
|
|
798
|
+
environment: string;
|
|
799
|
+
transitions: TransitionListEntry[];
|
|
800
|
+
apps: {
|
|
801
|
+
counted: number;
|
|
802
|
+
complete: boolean;
|
|
803
|
+
coveredThrough: string | null;
|
|
804
|
+
byValue: Record<string, Record<string, number>>;
|
|
805
|
+
} | null;
|
|
806
|
+
}
|
|
807
|
+
/** One app's line of a transition report (#5822). */
|
|
808
|
+
export interface TransitionReportItem {
|
|
809
|
+
appId: string;
|
|
810
|
+
name: string | null;
|
|
811
|
+
parentAppId: string | null;
|
|
812
|
+
deleted: boolean;
|
|
813
|
+
value: string | null;
|
|
814
|
+
source: "override" | "parent" | "newAppsFrom" | "default" | null;
|
|
815
|
+
override: AppTransitionOverride | null;
|
|
816
|
+
counts: Array<{
|
|
817
|
+
callSite: string;
|
|
818
|
+
count: number;
|
|
819
|
+
}>;
|
|
820
|
+
countsTruncated: boolean;
|
|
821
|
+
total: number;
|
|
822
|
+
lastUseAt: string | null;
|
|
823
|
+
droppedPoints: number;
|
|
824
|
+
movesWith: string | null;
|
|
825
|
+
migration: TransitionMigrationRecord | null;
|
|
826
|
+
eligibleAt: string | null;
|
|
827
|
+
eligibleOn: string | null;
|
|
828
|
+
eligibility: "moved" | "eligible" | "waiting" | "no-first-read" | "with-parent" | "incomplete" | null;
|
|
829
|
+
}
|
|
830
|
+
/** `GET transitions/{transition}/report`: one page of apps (#5822). */
|
|
831
|
+
export interface TransitionReportResponse {
|
|
832
|
+
transition: string;
|
|
833
|
+
environment: string;
|
|
834
|
+
source: "wae" | "sink";
|
|
835
|
+
window: {
|
|
836
|
+
since: string;
|
|
837
|
+
until: string;
|
|
838
|
+
days: number;
|
|
839
|
+
};
|
|
840
|
+
firstReadAt: string | null;
|
|
841
|
+
/** The transition's migration and where its nightly walk stands, or null when it declares none (#5823). */
|
|
842
|
+
migration: {
|
|
843
|
+
name: string;
|
|
844
|
+
walk: {
|
|
845
|
+
pass: number;
|
|
846
|
+
after: string | null;
|
|
847
|
+
appsCovered: number;
|
|
848
|
+
finished: boolean;
|
|
849
|
+
lastRunAt: string | null;
|
|
850
|
+
} | null;
|
|
851
|
+
} | null;
|
|
852
|
+
items: TransitionReportItem[];
|
|
853
|
+
truncated: boolean;
|
|
854
|
+
hasMore: boolean;
|
|
855
|
+
nextCursor: string | null;
|
|
856
|
+
}
|
|
857
|
+
/** One row of the deprecated-calls report: one app, operation, source and client kind (#5916). */
|
|
858
|
+
export interface DeprecatedCall {
|
|
859
|
+
appId: string;
|
|
860
|
+
/** Recorded on an admin surface for no app of its own: `appId` is the admin partition. */
|
|
861
|
+
platform: boolean;
|
|
862
|
+
/** `<surface>:<METHOD> /<pattern>` for HTTP, `ws:<type>` for a WebSocket message. */
|
|
863
|
+
operation: string;
|
|
864
|
+
/** `api`, `fn` or `ws`. */
|
|
865
|
+
source: string;
|
|
866
|
+
/** `js`, `swift`, `cli`, `fn` or `unknown`. */
|
|
867
|
+
client: string;
|
|
868
|
+
/** Calls in the window; sampling-weighted on Analytics Engine, so an estimate there. */
|
|
869
|
+
count: number;
|
|
870
|
+
lastUseAt: string | null;
|
|
871
|
+
}
|
|
872
|
+
/** `GET transitions/deprecated-calls`: recent calls to deprecated operations (#5916). */
|
|
873
|
+
export interface DeprecatedCallsResponse {
|
|
874
|
+
environment: string;
|
|
875
|
+
source: "wae" | "sink";
|
|
876
|
+
window: {
|
|
877
|
+
since: string;
|
|
878
|
+
until: string;
|
|
879
|
+
days: number;
|
|
880
|
+
};
|
|
881
|
+
/** Most calls first. */
|
|
882
|
+
calls: DeprecatedCall[];
|
|
883
|
+
/** The rows reached the limit: narrow with an app or an operation. */
|
|
884
|
+
truncated: boolean;
|
|
885
|
+
}
|
|
886
|
+
/** The reading the move step decides a unit on (#5824). */
|
|
887
|
+
export interface TransitionReading {
|
|
888
|
+
count: number;
|
|
889
|
+
droppedPoints: number;
|
|
890
|
+
environment: string;
|
|
891
|
+
source: string;
|
|
892
|
+
windowStart: string;
|
|
893
|
+
windowEnd: string;
|
|
894
|
+
observedAt: string;
|
|
895
|
+
firstReadAt: string | null;
|
|
896
|
+
}
|
|
897
|
+
/** One unit not on V2 in a transition's move plan (#5824). */
|
|
898
|
+
export interface TransitionMovePlanItem {
|
|
899
|
+
appId: string;
|
|
900
|
+
name: string | null;
|
|
901
|
+
parentAppId: string | null;
|
|
902
|
+
/** What the next run does when it reaches the unit. */
|
|
903
|
+
action: "move" | "move-if-migrated" | "hold";
|
|
904
|
+
reason: string | null;
|
|
905
|
+
/** The member a `migration` hold names. */
|
|
906
|
+
member: string | null;
|
|
907
|
+
/** `behind`: the nightly walk has passed the unit in this pass, so it waits for the next. */
|
|
908
|
+
walk: "ahead" | "behind";
|
|
909
|
+
children: string[];
|
|
910
|
+
reading: TransitionReading;
|
|
911
|
+
total: number;
|
|
912
|
+
droppedPoints: number;
|
|
913
|
+
lastUseAt: string | null;
|
|
914
|
+
eligibleAt: string | null;
|
|
915
|
+
migration: Array<{
|
|
916
|
+
appId: string;
|
|
917
|
+
status: string | null;
|
|
918
|
+
}> | null;
|
|
919
|
+
}
|
|
920
|
+
/** `GET transitions/{transition}/move-plan`: one page of what the next move run would do (#5824). */
|
|
921
|
+
export interface TransitionMovePlanResponse {
|
|
922
|
+
transition: string;
|
|
923
|
+
environment: string;
|
|
924
|
+
source: "wae" | "sink";
|
|
925
|
+
autoMove: "off" | "non-production" | "all";
|
|
926
|
+
allowed: boolean;
|
|
927
|
+
firstReadAt: string | null;
|
|
928
|
+
window: {
|
|
929
|
+
since: string;
|
|
930
|
+
until: string;
|
|
931
|
+
days: number;
|
|
932
|
+
};
|
|
933
|
+
walk: {
|
|
934
|
+
after: string | null;
|
|
935
|
+
pass: number;
|
|
936
|
+
finished: boolean;
|
|
937
|
+
retry: {
|
|
938
|
+
appId: string;
|
|
939
|
+
} | null;
|
|
940
|
+
skip: string[];
|
|
941
|
+
sweepDue: boolean;
|
|
942
|
+
} | null;
|
|
943
|
+
contractReady: TransitionContractReady | null;
|
|
944
|
+
items: TransitionMovePlanItem[];
|
|
945
|
+
hasMore: boolean;
|
|
946
|
+
nextCursor: string | null;
|
|
947
|
+
}
|
|
948
|
+
/** An app's usage and estimated cost for a month, by meter and by day. */
|
|
949
|
+
export interface AppUsageMonthResponse {
|
|
950
|
+
appId: string;
|
|
951
|
+
month: string;
|
|
952
|
+
current: boolean;
|
|
953
|
+
source: "wae" | "sink" | null;
|
|
954
|
+
app: {
|
|
955
|
+
name: string | null;
|
|
956
|
+
parentAppId: string | null;
|
|
957
|
+
createdByAdminId: string | null;
|
|
958
|
+
deleted: boolean;
|
|
959
|
+
};
|
|
960
|
+
meters: UsageMonthMeter[];
|
|
961
|
+
days: Array<{
|
|
962
|
+
day: string;
|
|
963
|
+
estCostMicros: number;
|
|
964
|
+
meters: UsageDayMeter[];
|
|
965
|
+
}>;
|
|
966
|
+
storage: {
|
|
967
|
+
current: Array<{
|
|
968
|
+
meter: string;
|
|
969
|
+
bytes: number;
|
|
970
|
+
}>;
|
|
971
|
+
};
|
|
972
|
+
/** A parent app's children, one line each. */
|
|
973
|
+
children?: Array<{
|
|
974
|
+
appId: string;
|
|
975
|
+
name: string | null;
|
|
976
|
+
deleted: boolean;
|
|
977
|
+
estCostMicros: number;
|
|
978
|
+
meters: Array<{
|
|
979
|
+
meter: string;
|
|
980
|
+
kind: "usage" | "storage";
|
|
981
|
+
quantity: number;
|
|
982
|
+
estCostMicros: number;
|
|
983
|
+
}>;
|
|
984
|
+
}>;
|
|
985
|
+
total: {
|
|
986
|
+
estCostMicros: number;
|
|
987
|
+
app: number;
|
|
988
|
+
children: number;
|
|
989
|
+
};
|
|
990
|
+
truncated: boolean;
|
|
991
|
+
}
|
|
992
|
+
/** A live usage window: ISO 8601 bounds, UTC, half-open. */
|
|
993
|
+
export interface UsageWindowParams {
|
|
994
|
+
since?: string;
|
|
995
|
+
until?: string;
|
|
996
|
+
}
|
|
997
|
+
/** An app's top users over a window. */
|
|
998
|
+
export interface AppUsageTopUsersResponse {
|
|
999
|
+
appId: string;
|
|
1000
|
+
since: string;
|
|
1001
|
+
until: string;
|
|
1002
|
+
by: "quantity" | "cost";
|
|
1003
|
+
meter: string | null;
|
|
1004
|
+
rows: Array<{
|
|
1005
|
+
billedTo: string;
|
|
1006
|
+
quantity: number | null;
|
|
1007
|
+
estCostMicros: number;
|
|
1008
|
+
points: number;
|
|
1009
|
+
}>;
|
|
1010
|
+
}
|
|
1011
|
+
/** One user's usage over a window and the bytes they own. */
|
|
1012
|
+
export interface AppUsageUserResponse {
|
|
1013
|
+
appId: string;
|
|
1014
|
+
billedTo: string;
|
|
1015
|
+
since: string;
|
|
1016
|
+
until: string;
|
|
1017
|
+
meters: Array<{
|
|
1018
|
+
meter: string;
|
|
1019
|
+
unit: string;
|
|
1020
|
+
quantity: number;
|
|
1021
|
+
estCostMicros: number;
|
|
1022
|
+
bytes: number;
|
|
1023
|
+
points: number;
|
|
1024
|
+
}>;
|
|
1025
|
+
storage: Array<{
|
|
1026
|
+
meter: string;
|
|
1027
|
+
bytes: number;
|
|
1028
|
+
}>;
|
|
1029
|
+
}
|
|
1030
|
+
/** An app's system usage by origin, source, resource and meter. */
|
|
1031
|
+
export interface AppUsageSystemResponse {
|
|
1032
|
+
appId: string;
|
|
1033
|
+
since: string;
|
|
1034
|
+
until: string;
|
|
1035
|
+
meter: string | null;
|
|
1036
|
+
rows: Array<{
|
|
1037
|
+
origin: string;
|
|
1038
|
+
source: string;
|
|
1039
|
+
resourceId: string;
|
|
1040
|
+
meter: string;
|
|
1041
|
+
quantity: number;
|
|
1042
|
+
estCostMicros: number;
|
|
1043
|
+
points: number;
|
|
1044
|
+
}>;
|
|
1045
|
+
truncated: boolean;
|
|
1046
|
+
}
|
|
1047
|
+
/** What the super-admin month-to-date rankings share. */
|
|
1048
|
+
export interface UsageMonthToDate {
|
|
1049
|
+
month: string;
|
|
1050
|
+
basis: "usage+storage";
|
|
1051
|
+
source: "wae" | "sink" | null;
|
|
1052
|
+
/** False when a walk stopped at its page budget. */
|
|
1053
|
+
complete: boolean;
|
|
1054
|
+
/** When incomplete, the last app id the walk reached. */
|
|
1055
|
+
coveredThrough: string | null;
|
|
1056
|
+
}
|
|
1057
|
+
/** The cost fields of a ranking row, in millionths of a dollar. */
|
|
1058
|
+
export interface UsageCostFields {
|
|
1059
|
+
usageEstCostMicros: number;
|
|
1060
|
+
storageEstCostMicros: number;
|
|
1061
|
+
estCostMicros: number;
|
|
1062
|
+
points: number;
|
|
1063
|
+
}
|
|
1064
|
+
/** The top apps by estimated cost, month to date. */
|
|
1065
|
+
export interface UsageTopAppsResponse extends UsageMonthToDate {
|
|
1066
|
+
rows: Array<UsageCostFields & {
|
|
1067
|
+
appId: string;
|
|
1068
|
+
name: string | null;
|
|
1069
|
+
deleted: boolean;
|
|
1070
|
+
parentAppId: string | null;
|
|
1071
|
+
createdByAdminId: string | null;
|
|
1072
|
+
}>;
|
|
1073
|
+
}
|
|
1074
|
+
/** The top developers by estimated cost, month to date. */
|
|
1075
|
+
export interface UsageTopDevelopersResponse extends UsageMonthToDate {
|
|
1076
|
+
rows: Array<UsageCostFields & {
|
|
1077
|
+
adminId: string | null;
|
|
1078
|
+
email: string | null;
|
|
1079
|
+
name: string | null;
|
|
1080
|
+
}>;
|
|
1081
|
+
}
|
|
1082
|
+
/** One usage job's state. */
|
|
1083
|
+
export interface UsageJobView {
|
|
1084
|
+
startedAt: string | null;
|
|
1085
|
+
lastRunAt: string | null;
|
|
1086
|
+
cursor: unknown;
|
|
1087
|
+
appsCovered: number | null;
|
|
1088
|
+
finished: boolean | null;
|
|
1089
|
+
}
|
|
1090
|
+
/** Every usage job's state, null for a job that never ran. */
|
|
1091
|
+
export interface UsageJobsResponse {
|
|
1092
|
+
jobs: Record<string, UsageJobView | null>;
|
|
1093
|
+
}
|
|
252
1094
|
interface AnalyticsTopUsersResponse {
|
|
253
1095
|
windowDays: number;
|
|
254
1096
|
limit: number;
|
|
255
1097
|
results: AnalyticsTopUserRow[];
|
|
1098
|
+
/** #5105 — the mode the server applied. */
|
|
1099
|
+
testUsers: AnalyticsTestUsersMode;
|
|
256
1100
|
_timing: AnalyticsTiming;
|
|
257
1101
|
}
|
|
258
1102
|
interface AnalyticsUserSearchResponse {
|
|
@@ -266,6 +1110,8 @@ interface AnalyticsUserSearchResponse {
|
|
|
266
1110
|
offset?: number;
|
|
267
1111
|
/** True when more rows match than this page returned; page with `offset`. */
|
|
268
1112
|
truncated?: boolean;
|
|
1113
|
+
/** #5105 — the mode the server applied. */
|
|
1114
|
+
testUsers: AnalyticsTestUsersMode;
|
|
269
1115
|
}
|
|
270
1116
|
interface AnalyticsUserDetailResponse {
|
|
271
1117
|
user: {
|
|
@@ -314,6 +1160,8 @@ interface AnalyticsEventsResponse {
|
|
|
314
1160
|
page_size: number;
|
|
315
1161
|
total_rows: number;
|
|
316
1162
|
rows: AnalyticsEventRow[];
|
|
1163
|
+
/** #5105 — the mode the server applied. */
|
|
1164
|
+
testUsers: AnalyticsTestUsersMode;
|
|
317
1165
|
_timing: AnalyticsTiming;
|
|
318
1166
|
}
|
|
319
1167
|
interface AnalyticsGroupedRow {
|
|
@@ -325,6 +1173,8 @@ interface AnalyticsGroupedRow {
|
|
|
325
1173
|
interface AnalyticsEventsGroupedResponse {
|
|
326
1174
|
group_by: string;
|
|
327
1175
|
rows: AnalyticsGroupedRow[];
|
|
1176
|
+
/** #5105 — the mode the server applied. */
|
|
1177
|
+
testUsers: AnalyticsTestUsersMode;
|
|
328
1178
|
_timing: AnalyticsTiming;
|
|
329
1179
|
}
|
|
330
1180
|
interface AnalyticsErrorGroupExemplar {
|
|
@@ -357,6 +1207,54 @@ interface AnalyticsErrorsGroupsResponse {
|
|
|
357
1207
|
rows: AnalyticsErrorGroupRow[];
|
|
358
1208
|
_timing: AnalyticsTiming;
|
|
359
1209
|
}
|
|
1210
|
+
/** One db3 query shape's cost over the window, per endpoint and function (#5244). */
|
|
1211
|
+
interface AnalyticsDb3QueryRow {
|
|
1212
|
+
shape_id: string;
|
|
1213
|
+
type: string;
|
|
1214
|
+
model: string;
|
|
1215
|
+
op: string;
|
|
1216
|
+
filter: string;
|
|
1217
|
+
sort: string;
|
|
1218
|
+
include: string;
|
|
1219
|
+
endpoint: string;
|
|
1220
|
+
function_id: string | null;
|
|
1221
|
+
function_key: string | null;
|
|
1222
|
+
calls: number;
|
|
1223
|
+
rows_read: number;
|
|
1224
|
+
rows_returned: number;
|
|
1225
|
+
rows_read_per_call: number;
|
|
1226
|
+
/** `null` when the calls returned nothing. */
|
|
1227
|
+
rows_read_per_returned: number | null;
|
|
1228
|
+
scanned_calls: number;
|
|
1229
|
+
counters_known_calls: number;
|
|
1230
|
+
}
|
|
1231
|
+
/** What `GET analytics/db3/queries` answers (#5244). */
|
|
1232
|
+
interface AnalyticsDb3QueriesResponse {
|
|
1233
|
+
window_days: number;
|
|
1234
|
+
order_by: "rowsRead" | "rowsPerReturned";
|
|
1235
|
+
rows: AnalyticsDb3QueryRow[];
|
|
1236
|
+
_timing: AnalyticsTiming;
|
|
1237
|
+
}
|
|
1238
|
+
/** One endpoint's (and function's) requests over the window (#5244). */
|
|
1239
|
+
interface AnalyticsRequestRow {
|
|
1240
|
+
method: string;
|
|
1241
|
+
path: string;
|
|
1242
|
+
function_id: string | null;
|
|
1243
|
+
function_key: string | null;
|
|
1244
|
+
requests: number;
|
|
1245
|
+
wall_ms_avg: number;
|
|
1246
|
+
wall_ms_p50: number;
|
|
1247
|
+
wall_ms_p95: number;
|
|
1248
|
+
dynamo_calls_per_request: number;
|
|
1249
|
+
dynamo_ms_per_request: number;
|
|
1250
|
+
cold_starts: number;
|
|
1251
|
+
}
|
|
1252
|
+
/** What `GET analytics/requests` answers (#5244). */
|
|
1253
|
+
interface AnalyticsRequestsResponse {
|
|
1254
|
+
window_days: number;
|
|
1255
|
+
rows: AnalyticsRequestRow[];
|
|
1256
|
+
_timing: AnalyticsTiming;
|
|
1257
|
+
}
|
|
360
1258
|
/**
|
|
361
1259
|
* What a `DELETE` on a status-carrying object answers (#2887, #2907).
|
|
362
1260
|
*
|
|
@@ -374,13 +1272,7 @@ export interface ArchiveEnvelope {
|
|
|
374
1272
|
archived?: boolean;
|
|
375
1273
|
[key: string]: unknown;
|
|
376
1274
|
}
|
|
377
|
-
/**
|
|
378
|
-
* Body accepted by integration create and update (#2631).
|
|
379
|
-
*
|
|
380
|
-
* `accessRule` is the CEL expression gating who may invoke the integration
|
|
381
|
-
* through the proxy. The server REQUIRES it on create; on update, `null` or
|
|
382
|
-
* `""` clears it, and a cleared rule denies every non-admin call.
|
|
383
|
-
*/
|
|
1275
|
+
/** Body accepted by integration create and update (#2631). */
|
|
384
1276
|
export interface IntegrationWritePayload {
|
|
385
1277
|
integrationKey?: string;
|
|
386
1278
|
displayName?: string;
|
|
@@ -388,11 +1280,38 @@ export interface IntegrationWritePayload {
|
|
|
388
1280
|
requestConfig?: any;
|
|
389
1281
|
timeoutMs?: number;
|
|
390
1282
|
status?: string;
|
|
391
|
-
|
|
1283
|
+
}
|
|
1284
|
+
/** A multipart part sent with an integration test request. */
|
|
1285
|
+
export interface IntegrationTestMultipartField {
|
|
1286
|
+
fieldName: string;
|
|
1287
|
+
/** `value` sends `value` as a text part; `attachment` sends the attachment at `attachmentIndex`. */
|
|
1288
|
+
type: "value" | "attachment";
|
|
1289
|
+
value?: string;
|
|
1290
|
+
attachmentIndex?: number;
|
|
1291
|
+
}
|
|
1292
|
+
/** Body accepted by `POST …/integrations/{id}/test`: the request under test. */
|
|
1293
|
+
export interface IntegrationTestPayload {
|
|
1294
|
+
method?: string;
|
|
1295
|
+
path?: string;
|
|
1296
|
+
query?: unknown;
|
|
1297
|
+
/** A JSON body. */
|
|
1298
|
+
body?: unknown;
|
|
1299
|
+
headers?: Record<string, string>;
|
|
1300
|
+
/** A url-encoded body; a name with an array value is sent as a repeated key. */
|
|
1301
|
+
form?: Record<string, string | string[]>;
|
|
1302
|
+
/** How the body is built; absent means JSON (or `form` when given). */
|
|
1303
|
+
bodyMode?: "raw" | "multipart";
|
|
1304
|
+
/** Files, each `{ name, type, data }` with `data` in base64. */
|
|
1305
|
+
attachments?: Array<{
|
|
1306
|
+
name: string;
|
|
1307
|
+
type: string;
|
|
1308
|
+
data: string;
|
|
1309
|
+
}>;
|
|
1310
|
+
multipartFields?: IntegrationTestMultipartField[];
|
|
392
1311
|
}
|
|
393
1312
|
/**
|
|
394
|
-
* Integration detail response. `
|
|
395
|
-
* summary does not carry it
|
|
1313
|
+
* Integration detail response. `requestConfig` is only on the detail — the
|
|
1314
|
+
* list summary does not carry it.
|
|
396
1315
|
*/
|
|
397
1316
|
export interface IntegrationDetail {
|
|
398
1317
|
integrationId: string;
|
|
@@ -402,7 +1321,6 @@ export interface IntegrationDetail {
|
|
|
402
1321
|
status?: string;
|
|
403
1322
|
timeoutMs?: number;
|
|
404
1323
|
requestConfig?: any;
|
|
405
|
-
accessRule?: string | null;
|
|
406
1324
|
modifiedAt?: string;
|
|
407
1325
|
[key: string]: any;
|
|
408
1326
|
}
|
|
@@ -418,20 +1336,6 @@ interface AnalyticsIntegrationMetricsResponse {
|
|
|
418
1336
|
integrations: AnalyticsIntegrationMetric[];
|
|
419
1337
|
_timing: AnalyticsTiming;
|
|
420
1338
|
}
|
|
421
|
-
interface WorkflowAnalyticsSummary {
|
|
422
|
-
workflowKey: string;
|
|
423
|
-
runs: number;
|
|
424
|
-
successRate: number;
|
|
425
|
-
medianDurationMs: number;
|
|
426
|
-
p95: number;
|
|
427
|
-
totalTokens: number;
|
|
428
|
-
}
|
|
429
|
-
interface TopWorkflowsResponse {
|
|
430
|
-
windowDays: number;
|
|
431
|
-
limit: number;
|
|
432
|
-
workflows: WorkflowAnalyticsSummary[];
|
|
433
|
-
_timing: AnalyticsTiming;
|
|
434
|
-
}
|
|
435
1339
|
interface PromptAnalyticsSummary {
|
|
436
1340
|
promptKey: string;
|
|
437
1341
|
executions: number;
|
|
@@ -533,6 +1437,29 @@ export declare class ApiClient {
|
|
|
533
1437
|
scope: string[];
|
|
534
1438
|
apps: string[];
|
|
535
1439
|
}>;
|
|
1440
|
+
/**
|
|
1441
|
+
* #5787 — what `primitive hosting` may send for the current credentials:
|
|
1442
|
+
* a CI token as it is (it cannot derive), or else nothing until a token is
|
|
1443
|
+
* derived; and whether an unexpired step-up that may reach `appId` is
|
|
1444
|
+
* stored. Throws the usual not-logged-in refusal.
|
|
1445
|
+
*/
|
|
1446
|
+
hostingCredentials(appId: string): Promise<{
|
|
1447
|
+
ciToken: string | null;
|
|
1448
|
+
stepUp: boolean;
|
|
1449
|
+
}>;
|
|
1450
|
+
/**
|
|
1451
|
+
* #5787 — `POST /admin/api/auth/token` for hosting: a `write`-only token of
|
|
1452
|
+
* 15 minutes derived from the login, or from the stored step-up on a
|
|
1453
|
+
* protected app, pinned to `appId` when that bearer is pinned and unpinned
|
|
1454
|
+
* otherwise. Sent with exactly that bearer and never retried with another.
|
|
1455
|
+
*/
|
|
1456
|
+
deriveHostingToken(input: {
|
|
1457
|
+
appId: string;
|
|
1458
|
+
from: "login" | "step-up";
|
|
1459
|
+
}): Promise<{
|
|
1460
|
+
accessToken: string;
|
|
1461
|
+
expiresAt: string;
|
|
1462
|
+
}>;
|
|
536
1463
|
get<T = any>(path: string, params?: Record<string, any>): Promise<T>;
|
|
537
1464
|
post<T = any>(path: string, body?: any): Promise<T>;
|
|
538
1465
|
put<T = any>(path: string, body?: any): Promise<T>;
|
|
@@ -576,22 +1503,6 @@ export declare class ApiClient {
|
|
|
576
1503
|
role?: string;
|
|
577
1504
|
}>;
|
|
578
1505
|
}>;
|
|
579
|
-
/**
|
|
580
|
-
* Every app on the server, not just the caller's own.
|
|
581
|
-
*
|
|
582
|
-
* Deliberately separate from `listApps()`, whose contract is "apps assigned
|
|
583
|
-
* to me" (`GET /admin/api/admins/me/apps`, backed by `admin.queryApps()`) —
|
|
584
|
-
* the contract every other command depends on. `analytics workflow-usage
|
|
585
|
-
* --all-apps` has to reach apps nobody is assigned to, which is the global
|
|
586
|
-
* route `GET /admin/api/apps` (`App.iterateAll()`), and that route
|
|
587
|
-
* identifies an app as `appId` rather than `id` (D3130-001).
|
|
588
|
-
*
|
|
589
|
-
* One drain of that route is lossy — its cursor re-scans `App.iterateAll()`
|
|
590
|
-
* from the start of each page, so a list that changes under it both repeats
|
|
591
|
-
* and drops rows — so the walk is the union of repeated drains
|
|
592
|
-
* (`drainAppsUntilConverged`, which carries the measurement).
|
|
593
|
-
*/
|
|
594
|
-
listAllAppsGlobal(): Promise<GlobalAppRef[]>;
|
|
595
1506
|
/**
|
|
596
1507
|
* Create an app. An ordinary app takes `name` (and, for a super-admin,
|
|
597
1508
|
* `initialAdminEmail`). A child app takes `parentAppId` and `childSlug`
|
|
@@ -631,10 +1542,7 @@ export declare class ApiClient {
|
|
|
631
1542
|
*/
|
|
632
1543
|
removeChildPreviewOrigin(parentAppId: string, slug: string, origin: string): Promise<ChildPreviewOrigins>;
|
|
633
1544
|
private childPreviewOriginsPath;
|
|
634
|
-
getApp(appId: string): Promise<
|
|
635
|
-
id: string;
|
|
636
|
-
name: string;
|
|
637
|
-
}>;
|
|
1545
|
+
getApp(appId: string): Promise<AdminApp>;
|
|
638
1546
|
deleteApp(appId: string): Promise<void>;
|
|
639
1547
|
getAppSettings(appId: string): Promise<any>;
|
|
640
1548
|
updateAppSettings(appId: string, settings: any): Promise<any>;
|
|
@@ -643,6 +1551,22 @@ export declare class ApiClient {
|
|
|
643
1551
|
role?: string;
|
|
644
1552
|
name?: string;
|
|
645
1553
|
avatarUrl?: string | null;
|
|
1554
|
+
initialProperties?: Record<string, unknown>;
|
|
1555
|
+
}): Promise<any>;
|
|
1556
|
+
/**
|
|
1557
|
+
* Invite an email to the app as a console admin
|
|
1558
|
+
* (`POST /admin/api/apps/:appId/users/invite`): the invitation, with its
|
|
1559
|
+
* `inviteToken` and the `initialProperties` it gives the invitee at
|
|
1560
|
+
* acceptance (filling only what they have not set).
|
|
1561
|
+
*/
|
|
1562
|
+
inviteUser(appId: string, data: {
|
|
1563
|
+
email: string;
|
|
1564
|
+
role?: "admin" | "member";
|
|
1565
|
+
expiresAt?: string;
|
|
1566
|
+
sendEmail?: boolean;
|
|
1567
|
+
note?: string;
|
|
1568
|
+
source?: string;
|
|
1569
|
+
initialProperties?: Record<string, unknown>;
|
|
646
1570
|
}): Promise<any>;
|
|
647
1571
|
/**
|
|
648
1572
|
* Set a member's display name and/or avatar URL
|
|
@@ -662,16 +1586,207 @@ export declare class ApiClient {
|
|
|
662
1586
|
rebuildUserSearchText(appId: string): Promise<{
|
|
663
1587
|
count: number;
|
|
664
1588
|
}>;
|
|
1589
|
+
/**
|
|
1590
|
+
* One page of an app's users from the user index
|
|
1591
|
+
* (`POST /admin/api/apps/:appId/users/query`): the records-query filter and
|
|
1592
|
+
* sort over base fields and `properties.<name>`, at most 1,000 per page.
|
|
1593
|
+
*/
|
|
1594
|
+
queryUsers(appId: string, body: {
|
|
1595
|
+
filter?: Record<string, unknown>;
|
|
1596
|
+
sort?: unknown;
|
|
1597
|
+
limit?: number;
|
|
1598
|
+
cursor?: string;
|
|
1599
|
+
}): Promise<{
|
|
1600
|
+
items: any[];
|
|
1601
|
+
hasMore: boolean;
|
|
1602
|
+
nextCursor?: string;
|
|
1603
|
+
prevCursor?: string;
|
|
1604
|
+
meta: any;
|
|
1605
|
+
}>;
|
|
1606
|
+
/** How many of an app's users match (`POST /admin/api/apps/:appId/users/count`). */
|
|
1607
|
+
countUsers(appId: string, body: {
|
|
1608
|
+
filter?: Record<string, unknown>;
|
|
1609
|
+
}): Promise<{
|
|
1610
|
+
count: number;
|
|
1611
|
+
meta: any;
|
|
1612
|
+
}>;
|
|
1613
|
+
/**
|
|
1614
|
+
* The state of an app's user index (`GET /admin/api/apps/:appId/users/index`):
|
|
1615
|
+
* the generation, each shard with its bound and counts, superseded
|
|
1616
|
+
* generations, a rebuild in progress, queued applies, the last apply and
|
|
1617
|
+
* reconciliation, the limits and whether the shard ceiling is reached.
|
|
1618
|
+
*/
|
|
1619
|
+
getUserIndexStatus(appId: string): Promise<any>;
|
|
1620
|
+
/**
|
|
1621
|
+
* Start a report of which user metadata categories still hold rows on the
|
|
1622
|
+
* app's current members (`POST /admin/api/apps/:appId/users/metadata-report`).
|
|
1623
|
+
*/
|
|
1624
|
+
startUserMetadataReport(appId: string): Promise<{
|
|
1625
|
+
ok: boolean;
|
|
1626
|
+
runId: string;
|
|
1627
|
+
resourceType: string;
|
|
1628
|
+
status: string;
|
|
1629
|
+
statusUrl: string;
|
|
1630
|
+
}>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Read a user metadata report run, or the app's newest when `runId` is
|
|
1633
|
+
* absent (`GET /admin/api/apps/:appId/users/metadata-report`).
|
|
1634
|
+
*/
|
|
1635
|
+
getUserMetadataReport(appId: string, runId?: string): Promise<any>;
|
|
1636
|
+
/** Start building the next generation of an app's user index (`POST /admin/api/apps/:appId/users/index/rebuild`). */
|
|
1637
|
+
rebuildUserIndex(appId: string): Promise<{
|
|
1638
|
+
ok: boolean;
|
|
1639
|
+
generation: number;
|
|
1640
|
+
build: any;
|
|
1641
|
+
}>;
|
|
1642
|
+
/**
|
|
1643
|
+
* Run one revalidation slice of an app's user index now
|
|
1644
|
+
* (`POST /admin/api/apps/:appId/users/index/reconcile`), answered when it is
|
|
1645
|
+
* done; `started: false` while the app is being deleted.
|
|
1646
|
+
*/
|
|
1647
|
+
reconcileUserIndex(appId: string): Promise<UserIndexReconcileAnswer>;
|
|
1648
|
+
/**
|
|
1649
|
+
* Start (or find) a walk over an app's users with the admin as its starter
|
|
1650
|
+
* (`POST /admin/api/apps/:appId/users/walks`); `existing` says the key named
|
|
1651
|
+
* a walk that already existed.
|
|
1652
|
+
*/
|
|
1653
|
+
startUserWalk(appId: string, body: UserWalkStartBody): Promise<UserWalkStartAnswer>;
|
|
1654
|
+
/** A users walk by its run id (`GET /admin/api/apps/:appId/users/walks/:runId`). */
|
|
1655
|
+
getUserWalk(appId: string, runId: string): Promise<UserWalkAnswer>;
|
|
1656
|
+
/** A rate counter's state by key (`GET /admin/api/apps/:appId/rate-counters/:key`). */
|
|
1657
|
+
getRateCounter(appId: string, key: string): Promise<RateCounterState>;
|
|
1658
|
+
/** Stop a users walk (`POST /admin/api/apps/:appId/users/walks/:runId/terminate`); batches in flight finish. */
|
|
1659
|
+
terminateUserWalk(appId: string, runId: string): Promise<UserWalkAnswer & {
|
|
1660
|
+
terminated: boolean;
|
|
1661
|
+
}>;
|
|
1662
|
+
/**
|
|
1663
|
+
* An app's user index limit overrides and the limits in effect, with the
|
|
1664
|
+
* property caps beside them (`GET /admin/api/apps/:appId/users/index/limits`).
|
|
1665
|
+
*/
|
|
1666
|
+
getUserIndexLimits(appId: string): Promise<UserIndexLimitsAnswer>;
|
|
1667
|
+
/**
|
|
1668
|
+
* Set (a positive integer) or clear (`null`) an app's user index limit
|
|
1669
|
+
* overrides (`PATCH /admin/api/apps/:appId/users/index/limits`).
|
|
1670
|
+
*/
|
|
1671
|
+
patchUserIndexLimits(appId: string, body: {
|
|
1672
|
+
shardThreshold?: number | null;
|
|
1673
|
+
shardBytes?: number | null;
|
|
1674
|
+
shardCeiling?: number | null;
|
|
1675
|
+
maxFields?: number | null;
|
|
1676
|
+
maxUnique?: number | null;
|
|
1677
|
+
maxIndexed?: number | null;
|
|
1678
|
+
maxBytes?: number | null;
|
|
1679
|
+
}): Promise<UserIndexLimitsAnswer>;
|
|
1680
|
+
/**
|
|
1681
|
+
* An app's user properties schema (`GET /admin/api/apps/:appId/users/properties`):
|
|
1682
|
+
* the active version, a push being validated, the removed fields and the caps.
|
|
1683
|
+
* While a push validates, this read also resumes its walk.
|
|
1684
|
+
*/
|
|
1685
|
+
getUserProperties(appId: string): Promise<UserPropertiesState>;
|
|
1686
|
+
/**
|
|
1687
|
+
* Push the text of `user-properties.toml` (`PUT /admin/api/apps/:appId/users/properties`):
|
|
1688
|
+
* 200 `published` or `unchanged`, 400 when refused; `dryRun` judges it and
|
|
1689
|
+
* writes nothing.
|
|
1690
|
+
*/
|
|
1691
|
+
pushUserProperties(appId: string, body: {
|
|
1692
|
+
schema: string;
|
|
1693
|
+
expectedModifiedAt?: string | null;
|
|
1694
|
+
}, options?: {
|
|
1695
|
+
dryRun?: boolean;
|
|
1696
|
+
}): Promise<UserPropertiesPushAnswer>;
|
|
1697
|
+
/**
|
|
1698
|
+
* The current version of each of an app's `schemas/` files
|
|
1699
|
+
* (`GET /admin/api/apps/:appId/schemas`); a tombstoned file only with
|
|
1700
|
+
* `includeTombstoned`.
|
|
1701
|
+
*/
|
|
1702
|
+
listSchemaFiles(appId: string, options?: {
|
|
1703
|
+
includeTombstoned?: boolean;
|
|
1704
|
+
}): Promise<{
|
|
1705
|
+
items: SchemaFileMeta[];
|
|
1706
|
+
hasMore: boolean;
|
|
1707
|
+
}>;
|
|
1708
|
+
/**
|
|
1709
|
+
* One version of a `schemas/` file, the current one unless `version` names
|
|
1710
|
+
* another (`GET /admin/api/apps/:appId/schemas/:file`); 404
|
|
1711
|
+
* `SCHEMA_FILE_NOT_FOUND` or `SCHEMA_VERSION_NOT_FOUND`.
|
|
1712
|
+
*/
|
|
1713
|
+
getSchemaFile(appId: string, file: string, options?: {
|
|
1714
|
+
version?: number;
|
|
1715
|
+
}): Promise<SchemaFileVersion>;
|
|
1716
|
+
/**
|
|
1717
|
+
* Push the text of `schemas/<file>.toml` with its compiled defs
|
|
1718
|
+
* (`PUT /admin/api/apps/:appId/schemas/:file`): `created` or `unchanged`;
|
|
1719
|
+
* 409 `CONFLICT` when the current version is not `expectedVersion`.
|
|
1720
|
+
*/
|
|
1721
|
+
pushSchemaFile(appId: string, file: string, body: {
|
|
1722
|
+
source: string;
|
|
1723
|
+
compiled?: {
|
|
1724
|
+
defs: Record<string, unknown>;
|
|
1725
|
+
provenance?: Record<string, SchemaFileProvenance>;
|
|
1726
|
+
};
|
|
1727
|
+
expectedVersion?: number;
|
|
1728
|
+
}): Promise<SchemaPushAnswer>;
|
|
1729
|
+
/**
|
|
1730
|
+
* Write a tombstone version of a `schemas/` file (`PUT
|
|
1731
|
+
* /admin/api/apps/:appId/schemas/:file` with `{ tombstone: true }`), pinned
|
|
1732
|
+
* to `expectedVersion` when given.
|
|
1733
|
+
*/
|
|
1734
|
+
tombstoneSchemaFile(appId: string, file: string, expectedVersion?: number): Promise<SchemaPushAnswer>;
|
|
1735
|
+
/**
|
|
1736
|
+
* The source of every live `schemas/` file, or of `files` only
|
|
1737
|
+
* (`POST /admin/api/apps/:appId/schemas/pull`); a named file with no live
|
|
1738
|
+
* version is listed under `missing`.
|
|
1739
|
+
*/
|
|
1740
|
+
pullSchemaFiles(appId: string, files?: string[]): Promise<{
|
|
1741
|
+
items: SchemaPullItem[];
|
|
1742
|
+
missing: string[];
|
|
1743
|
+
}>;
|
|
1744
|
+
/** One member with their properties (`GET /admin/api/apps/:appId/users/:userId`); 404 `USER_NOT_FOUND` for a user who is no member. */
|
|
1745
|
+
getAppUser(appId: string, userId: string): Promise<AppUserWithProperties>;
|
|
1746
|
+
/**
|
|
1747
|
+
* The member who holds a unique property value or a unique constraint's
|
|
1748
|
+
* values (`POST /admin/api/apps/:appId/users/get-by`): `{ user }`, null when
|
|
1749
|
+
* no member holds it.
|
|
1750
|
+
*/
|
|
1751
|
+
getAppUserBy(appId: string, selector: {
|
|
1752
|
+
field: string;
|
|
1753
|
+
value: unknown;
|
|
1754
|
+
} | {
|
|
1755
|
+
constraint: string;
|
|
1756
|
+
values: unknown[];
|
|
1757
|
+
}): Promise<{
|
|
1758
|
+
user: AppUserWithProperties | null;
|
|
1759
|
+
}>;
|
|
1760
|
+
/** Apply a property write to one member (`PATCH /admin/api/apps/:appId/users/:userId/properties`); answers the member after it. */
|
|
1761
|
+
setAppUserProperties(appId: string, userId: string, body: AppUserPropertiesWrite): Promise<AppUserWithProperties>;
|
|
1762
|
+
/** An aggregate over an app's users (`POST /admin/api/apps/:appId/users/aggregate`). */
|
|
1763
|
+
aggregateUsers(appId: string, body: {
|
|
1764
|
+
options: {
|
|
1765
|
+
operations: Array<{
|
|
1766
|
+
type: string;
|
|
1767
|
+
field?: string;
|
|
1768
|
+
}>;
|
|
1769
|
+
groupBy?: unknown[];
|
|
1770
|
+
filter?: Record<string, unknown>;
|
|
1771
|
+
sort?: unknown;
|
|
1772
|
+
limit?: number;
|
|
1773
|
+
};
|
|
1774
|
+
}): Promise<{
|
|
1775
|
+
result: any[];
|
|
1776
|
+
meta: any;
|
|
1777
|
+
}>;
|
|
665
1778
|
listUsers(appId: string, params?: {
|
|
666
1779
|
name?: string;
|
|
667
1780
|
email?: string;
|
|
668
1781
|
userId?: string;
|
|
669
1782
|
limit?: number;
|
|
670
1783
|
cursor?: string;
|
|
1784
|
+
testUsers?: "include" | "exclude" | "only";
|
|
671
1785
|
}): Promise<{
|
|
672
1786
|
items: any[];
|
|
673
1787
|
hasMore?: boolean;
|
|
674
1788
|
nextCursor?: string | null;
|
|
1789
|
+
scanned?: number;
|
|
675
1790
|
}>;
|
|
676
1791
|
/**
|
|
677
1792
|
* @deprecated Use {@link setUserAvailability} with `"disable"`
|
|
@@ -685,21 +1800,13 @@ export declare class ApiClient {
|
|
|
685
1800
|
* routes already existed; nothing on the CLI reached them.
|
|
686
1801
|
*/
|
|
687
1802
|
setUserAvailability(appId: string, userId: string, action: "enable" | "disable"): Promise<void>;
|
|
1803
|
+
updateUserRole(appId: string, userId: string, role: "admin" | "member"): Promise<any>;
|
|
688
1804
|
/**
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
* the
|
|
692
|
-
|
|
693
|
-
listFeatureFlags(): Promise<any>;
|
|
694
|
-
/**
|
|
695
|
-
* The flag itself, not the `{ flag }` envelope the route answers with —
|
|
696
|
-
* `feature-flags get` prints the key, the enabled state and the per-app
|
|
697
|
-
* overrides, and reading them off the envelope printed a blank row.
|
|
1805
|
+
* Make the app user with `newOwnerEmail` the app's owner; the previous
|
|
1806
|
+
* owner becomes an admin. The email resolves to a userId through
|
|
1807
|
+
* {@link lookupUserByEmail}, and an email no user of the app has rejects
|
|
1808
|
+
* with a message naming it.
|
|
698
1809
|
*/
|
|
699
|
-
getFeatureFlag(flagKey: string): Promise<any>;
|
|
700
|
-
/** Same envelope, same unwrap: `enable`/`disable` print the updated flag. */
|
|
701
|
-
setFeatureFlagEnabled(flagKey: string, enabled: boolean): Promise<any>;
|
|
702
|
-
updateUserRole(appId: string, userId: string, role: "admin" | "member"): Promise<any>;
|
|
703
1810
|
transferOwnership(appId: string, newOwnerEmail: string): Promise<void>;
|
|
704
1811
|
transferAdminOwnership(appId: string, adminId: string): Promise<any>;
|
|
705
1812
|
listAppAdmins(appId: string): Promise<any[]>;
|
|
@@ -721,6 +1828,19 @@ export declare class ApiClient {
|
|
|
721
1828
|
nextCursor?: string;
|
|
722
1829
|
hasMore?: boolean;
|
|
723
1830
|
}>;
|
|
1831
|
+
/**
|
|
1832
|
+
* `GET /app/{appId}/api/invitations/{invitationId}` — one invitation with
|
|
1833
|
+
* its `inviteToken` (the bearer credential an accept link carries) and its
|
|
1834
|
+
* `status`. Readable by an app admin/owner or the inviter.
|
|
1835
|
+
*/
|
|
1836
|
+
getInvitation(appId: string, invitationId: string): Promise<{
|
|
1837
|
+
invitationId: string;
|
|
1838
|
+
email: string;
|
|
1839
|
+
role: string;
|
|
1840
|
+
inviteToken: string | null;
|
|
1841
|
+
status: "pending" | "expired" | "accepted";
|
|
1842
|
+
[key: string]: any;
|
|
1843
|
+
}>;
|
|
724
1844
|
createInvitation(appId: string, data: {
|
|
725
1845
|
email: string;
|
|
726
1846
|
role: "admin" | "member";
|
|
@@ -761,12 +1881,12 @@ export declare class ApiClient {
|
|
|
761
1881
|
hasMore?: boolean;
|
|
762
1882
|
nextCursor?: string | null;
|
|
763
1883
|
}>;
|
|
764
|
-
/** Integration detail (
|
|
1884
|
+
/** Integration detail (`requestConfig` is on the detail, not the list summary). */
|
|
765
1885
|
getIntegration(appId: string, integrationId: string): Promise<IntegrationDetail>;
|
|
766
1886
|
/**
|
|
767
1887
|
* An integration's named configs. Test cases pin a config by NAME so the
|
|
768
1888
|
* sidecar is portable across apps (#2769); this is the map pull and push
|
|
769
|
-
* resolve that name through, the same way prompts
|
|
1889
|
+
* resolve that name through, the same way prompts do.
|
|
770
1890
|
*/
|
|
771
1891
|
listIntegrationConfigs(appId: string, integrationId: string): Promise<{
|
|
772
1892
|
items: any[];
|
|
@@ -782,7 +1902,7 @@ export declare class ApiClient {
|
|
|
782
1902
|
deleteIntegration(appId: string, integrationId: string, hard?: boolean | {
|
|
783
1903
|
hard?: boolean;
|
|
784
1904
|
}): Promise<ArchiveEnvelope>;
|
|
785
|
-
testIntegration(appId: string, integrationId: string, payload:
|
|
1905
|
+
testIntegration(appId: string, integrationId: string, payload: IntegrationTestPayload): Promise<any>;
|
|
786
1906
|
listIntegrationLogs(appId: string, integrationId: string, params?: {
|
|
787
1907
|
limit?: number;
|
|
788
1908
|
status?: string;
|
|
@@ -794,9 +1914,6 @@ export declare class ApiClient {
|
|
|
794
1914
|
/** #3781 — only the calls this step made: a workflow step id or a function step name. */
|
|
795
1915
|
stepId?: string;
|
|
796
1916
|
}): Promise<any[]>;
|
|
797
|
-
listWorkflowRunIntegrationLogs(appId: string, runId: string, params?: {
|
|
798
|
-
limit?: number;
|
|
799
|
-
}): Promise<any[]>;
|
|
800
1917
|
listAppSecrets(appId: string): Promise<any[]>;
|
|
801
1918
|
createAppSecret(appId: string, payload: {
|
|
802
1919
|
key: string;
|
|
@@ -805,7 +1922,7 @@ export declare class ApiClient {
|
|
|
805
1922
|
}): Promise<any>;
|
|
806
1923
|
updateAppSecret(appId: string, secretId: string, payload: {
|
|
807
1924
|
value?: string;
|
|
808
|
-
summary?: string;
|
|
1925
|
+
summary?: string | null;
|
|
809
1926
|
}): Promise<any>;
|
|
810
1927
|
upsertAppSecret(appId: string, key: string, payload: {
|
|
811
1928
|
value: string;
|
|
@@ -820,36 +1937,11 @@ export declare class ApiClient {
|
|
|
820
1937
|
expectNotExists?: boolean;
|
|
821
1938
|
}): Promise<any>;
|
|
822
1939
|
deleteAppConfigVar(appId: string, key: string, expectedModifiedAt?: string): Promise<any>;
|
|
823
|
-
|
|
824
|
-
status?: string;
|
|
825
|
-
cursor?: string;
|
|
826
|
-
limit?: number;
|
|
827
|
-
}): Promise<{
|
|
828
|
-
items: any[];
|
|
829
|
-
hasMore?: boolean;
|
|
830
|
-
nextCursor?: string | null;
|
|
831
|
-
}>;
|
|
832
|
-
getWebhook(appId: string, webhookId: string): Promise<any>;
|
|
833
|
-
createWebhook(appId: string, payload: any): Promise<any>;
|
|
834
|
-
updateWebhook(appId: string, webhookId: string, payload: any, expectedModifiedAt?: string): Promise<any>;
|
|
835
|
-
/**
|
|
836
|
-
* Delete a webhook. Archives it by default; `hard` hard-deletes the row
|
|
837
|
-
* instead (#2232), which is what frees a slot under the per-app webhook cap
|
|
838
|
-
* and releases the webhook key for reuse. Same `?hard=true` verb the admin
|
|
839
|
-
* integrations delete uses.
|
|
840
|
-
*/
|
|
841
|
-
deleteWebhook(appId: string, webhookId: string, options?: {
|
|
842
|
-
hard?: boolean;
|
|
843
|
-
}): Promise<ArchiveEnvelope>;
|
|
844
|
-
/**
|
|
845
|
-
* #2803 — the operational verb pair for a webhook. It posts to the
|
|
846
|
-
* enable/disable route rather than PATCHing `status`, which is server-owned
|
|
847
|
-
* and refused on every configuration write path.
|
|
848
|
-
*/
|
|
849
|
-
setWebhookAvailability(appId: string, webhookId: string, action: "enable" | "disable"): Promise<any>;
|
|
1940
|
+
/** Every function of the app; each item carries {@link FunctionActiveInputFields}. */
|
|
850
1941
|
listFunctions(appId: string): Promise<{
|
|
851
1942
|
items: any[];
|
|
852
1943
|
}>;
|
|
1944
|
+
/** One function; the answer carries {@link FunctionActiveInputFields}. */
|
|
853
1945
|
getFunction(appId: string, functionId: string): Promise<any>;
|
|
854
1946
|
createFunction(appId: string, payload: any): Promise<any>;
|
|
855
1947
|
updateFunction(appId: string, functionId: string, payload: any): Promise<any>;
|
|
@@ -878,6 +1970,30 @@ export declare class ApiClient {
|
|
|
878
1970
|
items: any[];
|
|
879
1971
|
nextCursor?: string | null;
|
|
880
1972
|
}>;
|
|
1973
|
+
private functionTriggersPath;
|
|
1974
|
+
/** The function's webhook delivery log, newest first. */
|
|
1975
|
+
listFunctionWebhookEvents(appId: string, functionId: string, params?: {
|
|
1976
|
+
limit?: number;
|
|
1977
|
+
cursor?: string;
|
|
1978
|
+
}): Promise<{
|
|
1979
|
+
items: any[];
|
|
1980
|
+
hasMore?: boolean;
|
|
1981
|
+
nextCursor?: string | null;
|
|
1982
|
+
}>;
|
|
1983
|
+
/** Sign a preview delivery for the function's webhook trigger. */
|
|
1984
|
+
testFunctionWebhook(appId: string, functionId: string, payload?: any): Promise<any>;
|
|
1985
|
+
/** Check captured headers and a captured body against the trigger's verifier. */
|
|
1986
|
+
verifyFunctionWebhook(appId: string, functionId: string, payload: {
|
|
1987
|
+
headers: Array<[string, string]>;
|
|
1988
|
+
rawBody?: string;
|
|
1989
|
+
bodyBase64?: string;
|
|
1990
|
+
}): Promise<any>;
|
|
1991
|
+
/** Point the trigger's `signingSecret` at a new `{{secrets.KEY}}` reference. */
|
|
1992
|
+
rotateFunctionWebhookSecret(appId: string, functionId: string, payload: {
|
|
1993
|
+
signingSecret: string;
|
|
1994
|
+
}): Promise<any>;
|
|
1995
|
+
/** One cron entry verb: `fire`, `fire-scheduled`, `enable` or `disable`. */
|
|
1996
|
+
functionCronEntryAction(appId: string, functionId: string, name: string, action: "fire" | "fire-scheduled" | "enable" | "disable"): Promise<any>;
|
|
881
1997
|
/**
|
|
882
1998
|
* A function run's step trace — #3348.
|
|
883
1999
|
*
|
|
@@ -890,6 +2006,17 @@ export declare class ApiClient {
|
|
|
890
2006
|
getFunctionStepRuns(appId: string, functionId: string, runId: string): Promise<{
|
|
891
2007
|
items: any[];
|
|
892
2008
|
}>;
|
|
2009
|
+
/**
|
|
2010
|
+
* The integration calls one function run made — #3190.
|
|
2011
|
+
*
|
|
2012
|
+
* The run → integration-logs pivot, addressed by the function that owns the
|
|
2013
|
+
* run (it was `workflows/runs/{runId}/integration-logs`).
|
|
2014
|
+
*/
|
|
2015
|
+
listFunctionRunIntegrationLogs(appId: string, functionId: string, runId: string, options?: {
|
|
2016
|
+
limit?: number;
|
|
2017
|
+
}): Promise<{
|
|
2018
|
+
items: any[];
|
|
2019
|
+
}>;
|
|
893
2020
|
/**
|
|
894
2021
|
* End a function run that will not settle — #3348.
|
|
895
2022
|
*
|
|
@@ -977,9 +2104,8 @@ export declare class ApiClient {
|
|
|
977
2104
|
/**
|
|
978
2105
|
* Which runtime this call means — #3482. The ROUTE is the selector:
|
|
979
2106
|
* `POST functions/{key}` runs the function inside the request and
|
|
980
|
-
* `POST functions/{key}/start` runs it as a task
|
|
981
|
-
* door
|
|
982
|
-
* in the body (F-3482-007); phase 7's rename may fold it.
|
|
2107
|
+
* `POST functions/{key}/start` runs it as a task; the admin-only system
|
|
2108
|
+
* door has `invoke-as-system` and `start-as-system` (#3190).
|
|
983
2109
|
*/
|
|
984
2110
|
runtime?: "request" | "task";
|
|
985
2111
|
}): Promise<{
|
|
@@ -987,13 +2113,26 @@ export declare class ApiClient {
|
|
|
987
2113
|
retryAfterSeconds: number | null;
|
|
988
2114
|
body: any;
|
|
989
2115
|
}>;
|
|
2116
|
+
/**
|
|
2117
|
+
* Run only a function's `authorize` and hand back the ANSWER, whatever its
|
|
2118
|
+
* HTTP status — #4732. Like `invokeFunction`, it returns a refusal rather
|
|
2119
|
+
* than throwing it, so `functions authorize` renders the server's own
|
|
2120
|
+
* answer (and a case run records it as a failed row); it throws only when
|
|
2121
|
+
* the request did not complete. The CLI's own credentials, with the
|
|
2122
|
+
* step-up retry a protected app's refusal asks for.
|
|
2123
|
+
*/
|
|
2124
|
+
authorizeFunction(appId: string, functionId: string, body: Record<string, unknown>): Promise<{
|
|
2125
|
+
httpStatus: number;
|
|
2126
|
+
body: any;
|
|
2127
|
+
}>;
|
|
990
2128
|
/**
|
|
991
2129
|
* A function's versions, newest first (#3462).
|
|
992
2130
|
*
|
|
993
2131
|
* Paging is opt-in on the server: with no `limit` and no `cursor` every
|
|
994
2132
|
* version comes back, which is what this method did before paging existed and
|
|
995
2133
|
* what an already-installed CLI still asks for. A caller that passes either
|
|
996
|
-
* gets the shared `{ items, hasMore, nextCursor }` page.
|
|
2134
|
+
* gets the shared `{ items, hasMore, nextCursor }` page. Each item carries
|
|
2135
|
+
* {@link FunctionVersionInputFields}.
|
|
997
2136
|
*/
|
|
998
2137
|
listFunctionConfigs(appId: string, functionId: string, options?: {
|
|
999
2138
|
limit?: number;
|
|
@@ -1009,6 +2148,7 @@ export declare class ApiClient {
|
|
|
1009
2148
|
* from the next call.
|
|
1010
2149
|
*/
|
|
1011
2150
|
activateFunctionConfig(appId: string, functionId: string, configId: string): Promise<any>;
|
|
2151
|
+
/** One version; the answer carries {@link FunctionVersionInputFields}. */
|
|
1012
2152
|
getFunctionConfig(appId: string, functionId: string, configId: string): Promise<any>;
|
|
1013
2153
|
/**
|
|
1014
2154
|
* The stored envelope: the authored TOML bytes, every source file and the
|
|
@@ -1021,17 +2161,6 @@ export declare class ApiClient {
|
|
|
1021
2161
|
setPromptAvailability(appId: string, promptId: string, action: "enable" | "disable"): Promise<any>;
|
|
1022
2162
|
/** #2803 — the operational verb pair for an integration (admin API). */
|
|
1023
2163
|
setIntegrationAvailability(appId: string, integrationId: string, action: "enable" | "disable"): Promise<any>;
|
|
1024
|
-
rotateWebhookSecret(appId: string, webhookId: string, payload: {
|
|
1025
|
-
signingSecret: string;
|
|
1026
|
-
}): Promise<any>;
|
|
1027
|
-
listWebhookEvents(appId: string, webhookId: string, params?: {
|
|
1028
|
-
limit?: number;
|
|
1029
|
-
cursor?: string;
|
|
1030
|
-
}): Promise<{
|
|
1031
|
-
items: any[];
|
|
1032
|
-
hasMore?: boolean;
|
|
1033
|
-
nextCursor?: string | null;
|
|
1034
|
-
}>;
|
|
1035
2164
|
/**
|
|
1036
2165
|
* List the live connections the server believes exist for exactly one of a
|
|
1037
2166
|
* document or user. Read-only inspection over admin-api. Rows are
|
|
@@ -1097,53 +2226,18 @@ export declare class ApiClient {
|
|
|
1097
2226
|
sessionId: string;
|
|
1098
2227
|
revokedAt: string;
|
|
1099
2228
|
}>;
|
|
1100
|
-
testWebhook(appId: string, webhookId: string, payload?: any): Promise<any>;
|
|
1101
|
-
/**
|
|
1102
|
-
* Run a webhook's configured verifier over headers and a body captured from
|
|
1103
|
-
* a real delivery, and report whether that signature checks out (#2445).
|
|
1104
|
-
*
|
|
1105
|
-
* `headers` is sent as ordered `[name, value]` pairs so a capture carrying a
|
|
1106
|
-
* field name on more than one line survives the round trip. Nothing is
|
|
1107
|
-
* delivered: no delivery record, no workflow run.
|
|
1108
|
-
*/
|
|
1109
|
-
verifyWebhook(appId: string, webhookId: string, payload: {
|
|
1110
|
-
headers: Array<[string, string]>;
|
|
1111
|
-
rawBody?: string;
|
|
1112
|
-
bodyBase64?: string;
|
|
1113
|
-
}): Promise<any>;
|
|
1114
2229
|
listLocks(appId: string): Promise<{
|
|
1115
2230
|
locks: any[];
|
|
1116
2231
|
}>;
|
|
1117
2232
|
getLockStatus(appId: string, key: string): Promise<any>;
|
|
1118
2233
|
/**
|
|
1119
|
-
* #
|
|
1120
|
-
*
|
|
2234
|
+
* #4959 — free a key whose lease is live, with no handle (admin). Acquire,
|
|
2235
|
+
* renew and release are server-function-only, so the CLI has no door to them.
|
|
1121
2236
|
*/
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
items: any[];
|
|
1126
|
-
}>;
|
|
1127
|
-
getCronTrigger(appId: string, triggerId: string): Promise<any>;
|
|
1128
|
-
createCronTrigger(appId: string, payload: any): Promise<any>;
|
|
1129
|
-
updateCronTrigger(appId: string, triggerId: string, payload: any): Promise<any>;
|
|
1130
|
-
/**
|
|
1131
|
-
* Retire a cron trigger. The default soft-deletes (writes the `archived`
|
|
1132
|
-
* tombstone); `{ hard: true }` destroys the row, which is what
|
|
1133
|
-
* `config push --prune` passes (#2803) so a pruned trigger stops consuming
|
|
1134
|
-
* the per-app cap and holding its key.
|
|
1135
|
-
*/
|
|
1136
|
-
deleteCronTrigger(appId: string, triggerId: string, options?: {
|
|
1137
|
-
hard?: boolean;
|
|
1138
|
-
}): Promise<ArchiveEnvelope>;
|
|
1139
|
-
disableCronTrigger(appId: string, triggerId: string): Promise<any>;
|
|
1140
|
-
enableCronTrigger(appId: string, triggerId: string): Promise<any>;
|
|
1141
|
-
testCronTrigger(appId: string, triggerId: string): Promise<any>;
|
|
1142
|
-
listIterations(appId: string): Promise<{
|
|
1143
|
-
items: any[];
|
|
2237
|
+
forceReleaseLock(appId: string, key: string): Promise<{
|
|
2238
|
+
released: boolean;
|
|
2239
|
+
reason?: string;
|
|
1144
2240
|
}>;
|
|
1145
|
-
getIteration(appId: string, iterationName: string): Promise<any>;
|
|
1146
|
-
resetIteration(appId: string, iterationName: string): Promise<any>;
|
|
1147
2241
|
readResourceMetadata(appId: string, resourceType: string, resourceId: string, category: string): Promise<any>;
|
|
1148
2242
|
writeResourceMetadata(appId: string, resourceType: string, resourceId: string, category: string, data: Record<string, any>): Promise<any>;
|
|
1149
2243
|
batchReadResourceMetadata(appId: string, requests: Array<{
|
|
@@ -1227,53 +2321,6 @@ export declare class ApiClient {
|
|
|
1227
2321
|
configName?: string;
|
|
1228
2322
|
description?: string;
|
|
1229
2323
|
}): Promise<any>;
|
|
1230
|
-
listScripts(appId: string): Promise<{
|
|
1231
|
-
items: any[];
|
|
1232
|
-
}>;
|
|
1233
|
-
getScript(appId: string, scriptId: string): Promise<any>;
|
|
1234
|
-
/**
|
|
1235
|
-
* List a script's versioned configs (the `ScriptConfig` rows). Each config
|
|
1236
|
-
* is a distinct block version: `configId` is the stable version selector,
|
|
1237
|
-
* `contentHash` is its content identity, and `status` reports whether it is
|
|
1238
|
-
* `active`/`draft`/`archived`. The script header's `activeConfigId` names
|
|
1239
|
-
* the live version. Used by `scripts configs list` and by the script test
|
|
1240
|
-
* commands to run against a specific pinned version.
|
|
1241
|
-
*/
|
|
1242
|
-
listScriptConfigs(appId: string, scriptId: string): Promise<{
|
|
1243
|
-
items: any[];
|
|
1244
|
-
}>;
|
|
1245
|
-
createScript(appId: string, payload: {
|
|
1246
|
-
name: string;
|
|
1247
|
-
body: string;
|
|
1248
|
-
description?: string;
|
|
1249
|
-
}): Promise<any>;
|
|
1250
|
-
/**
|
|
1251
|
-
* Push a new body for an existing script by creating a new `ScriptConfig`
|
|
1252
|
-
* and activating it (the prompt-model "edit → activate" flow). Referencing
|
|
1253
|
-
* workflows pick up the new body on their next run with no fan-out. The
|
|
1254
|
-
* config name is unique per script, so we mint a timestamped name.
|
|
1255
|
-
*/
|
|
1256
|
-
pushScriptBody(appId: string, scriptId: string, body: string,
|
|
1257
|
-
/**
|
|
1258
|
-
* The active state the caller believes holds right now (#2731 B10).
|
|
1259
|
-
* Creating an inactive config races nothing, so the guard sits on the
|
|
1260
|
-
* ACTIVATION step: if the active config has moved since the caller read it,
|
|
1261
|
-
* the server rejects with a 409 instead of overwriting a concurrent script
|
|
1262
|
-
* change. It takes BOTH halves of "what is active", because a config's body
|
|
1263
|
-
* can be edited in place without the active id changing — the id alone
|
|
1264
|
-
* would let such an edit through. Omitted (e.g. `--force`) means activate
|
|
1265
|
-
* unconditionally.
|
|
1266
|
-
*/
|
|
1267
|
-
expectedActive?: {
|
|
1268
|
-
configId?: string;
|
|
1269
|
-
modifiedAt?: string;
|
|
1270
|
-
}): Promise<any>;
|
|
1271
|
-
/**
|
|
1272
|
-
* Delete a script header (cascades its configs). `force` overrides the
|
|
1273
|
-
* server's guard against deleting a script that an active workflow still
|
|
1274
|
-
* references by name — without it the server answers 409.
|
|
1275
|
-
*/
|
|
1276
|
-
deleteScript(appId: string, scriptId: string, force?: boolean): Promise<void>;
|
|
1277
2324
|
getPromptSchema(appId: string, promptId: string): Promise<{
|
|
1278
2325
|
promptId: string;
|
|
1279
2326
|
promptKey: string;
|
|
@@ -1289,7 +2336,7 @@ export declare class ApiClient {
|
|
|
1289
2336
|
* 100) and reports `nextCursor`; callers that reconcile the sync tree must
|
|
1290
2337
|
* drain every page before deleting or classifying anything (#2769).
|
|
1291
2338
|
*/
|
|
1292
|
-
listTestCases(appId: string, blockType: "prompt" | "integration"
|
|
2339
|
+
listTestCases(appId: string, blockType: "prompt" | "integration", blockId: string, params?: {
|
|
1293
2340
|
limit?: number;
|
|
1294
2341
|
cursor?: string;
|
|
1295
2342
|
}): Promise<{
|
|
@@ -1297,8 +2344,8 @@ export declare class ApiClient {
|
|
|
1297
2344
|
hasMore?: boolean;
|
|
1298
2345
|
nextCursor?: string;
|
|
1299
2346
|
}>;
|
|
1300
|
-
getTestCase(appId: string, blockType: "prompt" | "integration"
|
|
1301
|
-
createTestCase(appId: string, blockType: "prompt" | "integration"
|
|
2347
|
+
getTestCase(appId: string, blockType: "prompt" | "integration", blockId: string, testCaseId: string): Promise<any>;
|
|
2348
|
+
createTestCase(appId: string, blockType: "prompt" | "integration", blockId: string, payload: {
|
|
1302
2349
|
name: string;
|
|
1303
2350
|
description?: string | null;
|
|
1304
2351
|
inputVariables: Record<string, any>;
|
|
@@ -1311,7 +2358,7 @@ export declare class ApiClient {
|
|
|
1311
2358
|
/** The sidecar's file name — the case's identity (#2896). */
|
|
1312
2359
|
key?: string;
|
|
1313
2360
|
} & AgentTestCaseWireFields): Promise<any>;
|
|
1314
|
-
updateTestCase(appId: string, blockType: "prompt" | "integration"
|
|
2361
|
+
updateTestCase(appId: string, blockType: "prompt" | "integration", blockId: string, testCaseId: string, payload: {
|
|
1315
2362
|
name?: string;
|
|
1316
2363
|
description?: string | null;
|
|
1317
2364
|
inputVariables?: Record<string, any>;
|
|
@@ -1324,8 +2371,8 @@ export declare class ApiClient {
|
|
|
1324
2371
|
/** The sidecar's file name, on a create-or-rename backfill (#2896). */
|
|
1325
2372
|
key?: string;
|
|
1326
2373
|
} & AgentTestCaseWireFields): Promise<any>;
|
|
1327
|
-
deleteTestCase(appId: string, blockType: "prompt" | "integration"
|
|
1328
|
-
listTestCaseAttachments(appId: string, blockType: "prompt" | "integration"
|
|
2374
|
+
deleteTestCase(appId: string, blockType: "prompt" | "integration", blockId: string, testCaseId: string): Promise<void>;
|
|
2375
|
+
listTestCaseAttachments(appId: string, blockType: "prompt" | "integration", blockId: string, testCaseId: string): Promise<{
|
|
1329
2376
|
attachments: Array<{
|
|
1330
2377
|
filename: string;
|
|
1331
2378
|
contentType: string;
|
|
@@ -1333,7 +2380,7 @@ export declare class ApiClient {
|
|
|
1333
2380
|
r2Key: string;
|
|
1334
2381
|
}>;
|
|
1335
2382
|
}>;
|
|
1336
|
-
uploadTestCaseAttachment(appId: string, blockType: "prompt" | "integration"
|
|
2383
|
+
uploadTestCaseAttachment(appId: string, blockType: "prompt" | "integration", blockId: string, testCaseId: string, filename: string, data: Buffer, contentType: string): Promise<{
|
|
1337
2384
|
success: boolean;
|
|
1338
2385
|
attachment: {
|
|
1339
2386
|
filename: string;
|
|
@@ -1342,176 +2389,63 @@ export declare class ApiClient {
|
|
|
1342
2389
|
r2Key: string;
|
|
1343
2390
|
};
|
|
1344
2391
|
}>;
|
|
1345
|
-
downloadTestCaseAttachment(appId: string, blockType: "prompt" | "integration"
|
|
2392
|
+
downloadTestCaseAttachment(appId: string, blockType: "prompt" | "integration", blockId: string, testCaseId: string, filename: string): Promise<{
|
|
1346
2393
|
data: Buffer;
|
|
1347
2394
|
contentType: string;
|
|
1348
2395
|
}>;
|
|
1349
|
-
deleteTestCaseAttachment(appId: string, blockType: "prompt" | "integration"
|
|
2396
|
+
deleteTestCaseAttachment(appId: string, blockType: "prompt" | "integration", blockId: string, testCaseId: string, filename: string): Promise<{
|
|
1350
2397
|
success: boolean;
|
|
1351
2398
|
deleted: boolean;
|
|
1352
2399
|
}>;
|
|
1353
|
-
executeBlockTest(appId: string, blockType: "prompt" | "integration"
|
|
1354
|
-
variables?: Record<string, any>;
|
|
1355
|
-
testCaseId?: string;
|
|
1356
|
-
configId?: string;
|
|
1357
|
-
comparisonGroup?: string;
|
|
1358
|
-
}): Promise<any>;
|
|
1359
|
-
runAllTestCases(appId: string, blockType: "prompt" | "integration"
|
|
1360
|
-
overrideConfigId?: string;
|
|
1361
|
-
comparisonGroup?: string;
|
|
1362
|
-
testCaseIds?: string[];
|
|
1363
|
-
}): Promise<any>;
|
|
1364
|
-
listTestRuns(appId: string, blockType: "prompt" | "integration" | "workflow" | "script", blockId: string, params?: {
|
|
1365
|
-
limit?: number;
|
|
1366
|
-
comparisonGroup?: string;
|
|
1367
|
-
}): Promise<{
|
|
1368
|
-
items: any[];
|
|
1369
|
-
}>;
|
|
1370
|
-
listWorkflows(appId: string, params?: {
|
|
1371
|
-
status?: string;
|
|
1372
|
-
limit?: number;
|
|
1373
|
-
cursor?: string;
|
|
1374
|
-
}): Promise<{
|
|
1375
|
-
items: any[];
|
|
1376
|
-
hasMore?: boolean;
|
|
1377
|
-
nextCursor?: string | null;
|
|
1378
|
-
}>;
|
|
1379
|
-
getWorkflow(appId: string, workflowId: string): Promise<any>;
|
|
1380
|
-
/**
|
|
1381
|
-
* One app's workflow step usage report (#3132).
|
|
1382
|
-
*
|
|
1383
|
-
* `windowDays` is omitted from the query when the caller did not ask for a
|
|
1384
|
-
* window, so the server applies its own default rather than the CLI
|
|
1385
|
-
* restating it on the wire.
|
|
1386
|
-
*/
|
|
1387
|
-
getWorkflowUsage(appId: string, params?: {
|
|
1388
|
-
windowDays?: number;
|
|
1389
|
-
}): Promise<WorkflowUsageReport>;
|
|
1390
|
-
createWorkflow(appId: string, payload: any): Promise<any>;
|
|
1391
|
-
updateWorkflow(appId: string, workflowId: string, payload: any, expectedModifiedAt?: string): Promise<any>;
|
|
1392
|
-
/**
|
|
1393
|
-
* Retire a workflow, or destroy it (#2887).
|
|
1394
|
-
*
|
|
1395
|
-
* The plain call ARCHIVES: the definition row stays, so its runs, revisions
|
|
1396
|
-
* and test cases keep resolving. `{ hard: true }` performs the full cascade
|
|
1397
|
-
* and is what releases the `workflowKey` — the flag `config push --prune`
|
|
1398
|
-
* sends, for the same reason it sends it for webhooks and integrations.
|
|
1399
|
-
*/
|
|
1400
|
-
deleteWorkflow(appId: string, workflowId: string, options?: {
|
|
1401
|
-
hard?: boolean;
|
|
1402
|
-
}): Promise<ArchiveEnvelope>;
|
|
1403
|
-
/**
|
|
1404
|
-
* #2645 criterion 9 — the operational toggle. Deliberately NOT the config
|
|
1405
|
-
* PATCH: `config push` owns every configuration field, and taking a workflow
|
|
1406
|
-
* out of service must not touch one, or an operator's action would show up as
|
|
1407
|
-
* drift against the repo. Same route shape as `cron-triggers pause|resume`.
|
|
1408
|
-
*/
|
|
1409
|
-
disableWorkflow(appId: string, workflowId: string): Promise<any>;
|
|
1410
|
-
enableWorkflow(appId: string, workflowId: string): Promise<any>;
|
|
1411
|
-
updateWorkflowDraft(appId: string, workflowId: string, payload: any): Promise<any>;
|
|
1412
|
-
previewWorkflow(appId: string, workflowId: string, payload: {
|
|
1413
|
-
rootInput?: object;
|
|
1414
|
-
meta?: object;
|
|
1415
|
-
configId?: string;
|
|
1416
|
-
useDraft?: boolean;
|
|
1417
|
-
preferActive?: boolean;
|
|
1418
|
-
}): Promise<{
|
|
1419
|
-
instanceId: string;
|
|
1420
|
-
usingDraft?: boolean;
|
|
1421
|
-
source?: "config" | "active" | "draft" | null;
|
|
1422
|
-
configName?: string | null;
|
|
1423
|
-
configId?: string | null;
|
|
1424
|
-
warning?: string;
|
|
1425
|
-
}>;
|
|
1426
|
-
getPreviewStatus(appId: string, workflowId: string, instanceId: string): Promise<any>;
|
|
1427
|
-
listWorkflowRuns(appId: string, workflowId: string, params?: {
|
|
1428
|
-
status?: string;
|
|
1429
|
-
limit?: number;
|
|
1430
|
-
cursor?: string;
|
|
1431
|
-
forward?: boolean;
|
|
1432
|
-
follow?: boolean;
|
|
1433
|
-
after?: string;
|
|
1434
|
-
}): Promise<{
|
|
1435
|
-
items: any[];
|
|
1436
|
-
hasMore?: boolean;
|
|
1437
|
-
nextCursor?: string | null;
|
|
1438
|
-
/** #1969 — opaque follow checkpoint; present on `follow=true` responses. */
|
|
1439
|
-
resumeAfter?: string;
|
|
1440
|
-
/**
|
|
1441
|
-
* #2237 — index rows the server examined for this request. Filtered reads
|
|
1442
|
-
* only, and only on a server new enough to report it; `undefined`
|
|
1443
|
-
* otherwise, which callers must treat as "unknown", not zero.
|
|
1444
|
-
*/
|
|
1445
|
-
scanned?: number;
|
|
1446
|
-
}>;
|
|
2400
|
+
executeBlockTest(appId: string, blockType: "prompt" | "integration", blockId: string, payload: {
|
|
2401
|
+
variables?: Record<string, any>;
|
|
2402
|
+
testCaseId?: string;
|
|
2403
|
+
configId?: string;
|
|
2404
|
+
comparisonGroup?: string;
|
|
2405
|
+
}): Promise<any>;
|
|
2406
|
+
runAllTestCases(appId: string, blockType: "prompt" | "integration", blockId: string, payload?: {
|
|
2407
|
+
overrideConfigId?: string;
|
|
2408
|
+
comparisonGroup?: string;
|
|
2409
|
+
testCaseIds?: string[];
|
|
2410
|
+
}): Promise<any>;
|
|
1447
2411
|
/**
|
|
1448
|
-
*
|
|
1449
|
-
*
|
|
1450
|
-
* which resolves the app user before querying the `runsByUser` index.
|
|
2412
|
+
* One page of a block's test runs, newest first. The endpoint paginates
|
|
2413
|
+
* (default 50, cap 100) and reports `nextCursor`.
|
|
1451
2414
|
*/
|
|
1452
|
-
|
|
1453
|
-
status?: string;
|
|
2415
|
+
listTestRuns(appId: string, blockType: "prompt" | "integration", blockId: string, params?: {
|
|
1454
2416
|
limit?: number;
|
|
1455
2417
|
cursor?: string;
|
|
1456
|
-
forward?: boolean;
|
|
1457
|
-
workflowId?: string;
|
|
1458
2418
|
}): Promise<{
|
|
1459
2419
|
items: any[];
|
|
1460
2420
|
hasMore?: boolean;
|
|
1461
|
-
nextCursor?: string
|
|
1462
|
-
/** #2237 — index rows examined; filtered reads only, `undefined` if unknown. */
|
|
1463
|
-
scanned?: number;
|
|
1464
|
-
}>;
|
|
1465
|
-
getWorkflowRunStatus(appId: string, workflowId: string, runId: string): Promise<any>;
|
|
1466
|
-
getWorkflowStepRuns(appId: string, workflowId: string, runId: string): Promise<{
|
|
1467
|
-
items: any[];
|
|
1468
|
-
}>;
|
|
1469
|
-
listWorkflowConfigs(appId: string, workflowId: string): Promise<{
|
|
1470
|
-
items: any[];
|
|
2421
|
+
nextCursor?: string;
|
|
1471
2422
|
}>;
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
cel?: Record<string, string>;
|
|
1479
|
-
};
|
|
1480
|
-
}): Promise<any>;
|
|
1481
|
-
updateWorkflowConfig(appId: string, workflowId: string, configId: string, payload: {
|
|
1482
|
-
configName?: string;
|
|
1483
|
-
description?: string;
|
|
1484
|
-
steps?: any[];
|
|
1485
|
-
status?: string;
|
|
1486
|
-
expressions?: {
|
|
1487
|
-
cel?: Record<string, string>;
|
|
1488
|
-
};
|
|
1489
|
-
}): Promise<any>;
|
|
1490
|
-
archiveWorkflowConfig(appId: string, workflowId: string, configId: string): Promise<any>;
|
|
1491
|
-
activateWorkflowConfig(appId: string, workflowId: string, configId: string): Promise<any>;
|
|
1492
|
-
duplicateWorkflowConfig(appId: string, workflowId: string, configId: string, payload?: {
|
|
1493
|
-
configName?: string;
|
|
1494
|
-
}): Promise<any>;
|
|
2423
|
+
/**
|
|
2424
|
+
* One of a block's test runs: the object `listTestRuns` lists for it. The
|
|
2425
|
+
* run id travels as one path segment, so a `/`, `?` or `#` in it can never
|
|
2426
|
+
* reach the listing or the query.
|
|
2427
|
+
*/
|
|
2428
|
+
getTestRun(appId: string, blockType: "prompt" | "integration", blockId: string, runId: string): Promise<any>;
|
|
1495
2429
|
getAnalyticsTopUsers(appId: string, params?: {
|
|
1496
2430
|
windowDays?: number;
|
|
1497
2431
|
limit?: number;
|
|
1498
|
-
}): Promise<AnalyticsTopUsersResponse>;
|
|
2432
|
+
} & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsTopUsersResponse>;
|
|
1499
2433
|
getAnalyticsIntegrationMetrics(appId: string, params?: {
|
|
1500
2434
|
windowDays?: number;
|
|
1501
|
-
}): Promise<AnalyticsIntegrationMetricsResponse>;
|
|
1502
|
-
getAnalyticsOverviewDau(appId: string): Promise<AnalyticsMetricResponse>;
|
|
1503
|
-
getAnalyticsOverviewWau(appId: string): Promise<AnalyticsMetricResponse>;
|
|
1504
|
-
getAnalyticsOverviewMau(appId: string): Promise<AnalyticsMetricResponse>;
|
|
2435
|
+
} & AnalyticsFreshParam): Promise<AnalyticsIntegrationMetricsResponse>;
|
|
2436
|
+
getAnalyticsOverviewDau(appId: string, params?: AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsMetricResponse>;
|
|
2437
|
+
getAnalyticsOverviewWau(appId: string, params?: AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsMetricResponse>;
|
|
2438
|
+
getAnalyticsOverviewMau(appId: string, params?: AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsMetricResponse>;
|
|
1505
2439
|
getAnalyticsOverviewGrowth(appId: string, params?: {
|
|
1506
2440
|
windowDays?: number;
|
|
1507
|
-
}): Promise<AnalyticsGrowthResponse>;
|
|
2441
|
+
} & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsGrowthResponse>;
|
|
1508
2442
|
getAnalyticsDailyActive(appId: string, params?: {
|
|
1509
2443
|
windowDays?: number;
|
|
1510
|
-
}): Promise<AnalyticsDailyActiveResponse>;
|
|
2444
|
+
} & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsDailyActiveResponse>;
|
|
1511
2445
|
getAnalyticsRollingActive(appId: string, params?: {
|
|
1512
2446
|
windowDays?: number;
|
|
1513
|
-
}): Promise<AnalyticsDailyActiveResponse>;
|
|
1514
|
-
getAnalyticsCohortRetention(appId: string): Promise<AnalyticsCohortResponse>;
|
|
2447
|
+
} & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsDailyActiveResponse>;
|
|
2448
|
+
getAnalyticsCohortRetention(appId: string, params?: AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsCohortResponse>;
|
|
1515
2449
|
getAnalyticsUserSearch(appId: string, params: {
|
|
1516
2450
|
q?: string;
|
|
1517
2451
|
limit?: number;
|
|
@@ -1522,32 +2456,113 @@ export declare class ApiClient {
|
|
|
1522
2456
|
signupEndDay?: string;
|
|
1523
2457
|
/** #3127 — row offset, accepted only with a signup filter. */
|
|
1524
2458
|
offset?: number;
|
|
1525
|
-
}): Promise<AnalyticsUserSearchResponse>;
|
|
1526
|
-
getAnalyticsUserDetail(appId: string, userUlid: string): Promise<AnalyticsUserDetailResponse>;
|
|
1527
|
-
getAnalyticsUserSnapshot(appId: string, userUlid: string): Promise<AnalyticsUserSnapshotResponse>;
|
|
2459
|
+
} & AnalyticsTestUsersParam & AnalyticsFreshParam): Promise<AnalyticsUserSearchResponse>;
|
|
2460
|
+
getAnalyticsUserDetail(appId: string, userUlid: string, params?: AnalyticsFreshParam): Promise<AnalyticsUserDetailResponse>;
|
|
2461
|
+
getAnalyticsUserSnapshot(appId: string, userUlid: string, params?: AnalyticsFreshParam): Promise<AnalyticsUserSnapshotResponse>;
|
|
2462
|
+
/**
|
|
2463
|
+
* #5251 — `path` with `params` set as `get` sets them, then one appended
|
|
2464
|
+
* `filter[<field>][<operator>]` entry per filter, in order. `get`'s record
|
|
2465
|
+
* cannot hold two entries under one key; the server ANDs them all.
|
|
2466
|
+
*/
|
|
2467
|
+
private analyticsFilteredGet;
|
|
1528
2468
|
getAnalyticsEvents(appId: string, params?: {
|
|
1529
2469
|
windowDays?: number;
|
|
1530
2470
|
page?: number;
|
|
1531
2471
|
[key: string]: any;
|
|
1532
|
-
}): Promise<AnalyticsEventsResponse>;
|
|
2472
|
+
} & AnalyticsTestUsersParam & AnalyticsFreshParam, filters?: AnalyticsFilterParam[]): Promise<AnalyticsEventsResponse>;
|
|
1533
2473
|
getAnalyticsEventsGrouped(appId: string, params?: {
|
|
1534
2474
|
groupBy?: string;
|
|
1535
2475
|
windowDays?: number;
|
|
1536
2476
|
[key: string]: any;
|
|
1537
|
-
}): Promise<AnalyticsEventsGroupedResponse>;
|
|
2477
|
+
} & AnalyticsTestUsersParam & AnalyticsFreshParam, filters?: AnalyticsFilterParam[]): Promise<AnalyticsEventsGroupedResponse>;
|
|
1538
2478
|
getAnalyticsErrorsGroups(appId: string, params?: {
|
|
1539
2479
|
windowDays?: number;
|
|
1540
2480
|
limit?: number;
|
|
1541
2481
|
[key: string]: any;
|
|
1542
|
-
}): Promise<AnalyticsErrorsGroupsResponse>;
|
|
1543
|
-
|
|
2482
|
+
} & AnalyticsFreshParam, filters?: AnalyticsFilterParam[]): Promise<AnalyticsErrorsGroupsResponse>;
|
|
2483
|
+
/** The app's db3 query shapes that read the most rows (#5244). */
|
|
2484
|
+
getAnalyticsDb3Queries(appId: string, params?: {
|
|
2485
|
+
windowDays?: number;
|
|
2486
|
+
limit?: number;
|
|
2487
|
+
orderBy?: "rowsRead" | "rowsPerReturned";
|
|
2488
|
+
} & AnalyticsFreshParam): Promise<AnalyticsDb3QueriesResponse>;
|
|
2489
|
+
/** The app's request wall time and DynamoDB round trips per endpoint and function (#5244). */
|
|
2490
|
+
getAnalyticsRequests(appId: string, params?: {
|
|
1544
2491
|
windowDays?: number;
|
|
1545
2492
|
limit?: number;
|
|
1546
|
-
}): Promise<
|
|
2493
|
+
} & AnalyticsFreshParam): Promise<AnalyticsRequestsResponse>;
|
|
1547
2494
|
getAnalyticsTopPrompts(appId: string, params?: {
|
|
1548
2495
|
windowDays?: number;
|
|
1549
2496
|
limit?: number;
|
|
1550
|
-
}): Promise<TopPromptsResponse>;
|
|
2497
|
+
} & AnalyticsFreshParam): Promise<TopPromptsResponse>;
|
|
2498
|
+
/** An app's platform transitions: each one's value and where it came from. */
|
|
2499
|
+
getAppTransitions(appId: string): Promise<AppTransitionsResponse>;
|
|
2500
|
+
/** Set one platform transition on one app, with a reason (super-admin). */
|
|
2501
|
+
setAppTransition(appId: string, transition: string, body: {
|
|
2502
|
+
value: string;
|
|
2503
|
+
reason: string;
|
|
2504
|
+
}): Promise<AppTransitionSetResponse>;
|
|
2505
|
+
/** One page of an app's transition changes, newest first (super-admin). */
|
|
2506
|
+
listAppTransitionChanges(appId: string, params?: {
|
|
2507
|
+
transition?: string;
|
|
2508
|
+
limit?: number;
|
|
2509
|
+
cursor?: string;
|
|
2510
|
+
}): Promise<{
|
|
2511
|
+
items: AppTransitionChange[];
|
|
2512
|
+
hasMore: boolean;
|
|
2513
|
+
nextCursor?: string;
|
|
2514
|
+
}>;
|
|
2515
|
+
/** The registered transitions, with apps per value from one budgeted walk (super-admin). */
|
|
2516
|
+
listTransitions(params?: {
|
|
2517
|
+
after?: string;
|
|
2518
|
+
counts?: boolean;
|
|
2519
|
+
}): Promise<TransitionListResponse>;
|
|
2520
|
+
/** One page of a transition's report: each app's state, use by call site and eligible date (super-admin). */
|
|
2521
|
+
getTransitionReport(transition: string, params?: {
|
|
2522
|
+
only?: "all" | "in-use";
|
|
2523
|
+
limit?: number;
|
|
2524
|
+
cursor?: string;
|
|
2525
|
+
}): Promise<TransitionReportResponse>;
|
|
2526
|
+
/** One page of a transition's move plan: what the daily move step would do with each unit (super-admin, #5824). */
|
|
2527
|
+
getTransitionMovePlan(transition: string, params?: {
|
|
2528
|
+
limit?: number;
|
|
2529
|
+
cursor?: string;
|
|
2530
|
+
}): Promise<TransitionMovePlanResponse>;
|
|
2531
|
+
/** Recent calls to deprecated operations, by app, operation, source and client (super-admin). */
|
|
2532
|
+
getDeprecatedCalls(params?: {
|
|
2533
|
+
days?: number;
|
|
2534
|
+
appId?: string;
|
|
2535
|
+
operation?: string;
|
|
2536
|
+
limit?: number;
|
|
2537
|
+
}): Promise<DeprecatedCallsResponse>;
|
|
2538
|
+
/** An app's usage and estimated cost for `month` (`YYYY-MM`, default the current month). */
|
|
2539
|
+
getAppUsage(appId: string, params?: {
|
|
2540
|
+
month?: string;
|
|
2541
|
+
}): Promise<AppUsageMonthResponse>;
|
|
2542
|
+
/** An app's top users over a window, by a meter's quantity or by cost. */
|
|
2543
|
+
getAppUsageTopUsers(appId: string, params?: {
|
|
2544
|
+
meter?: string;
|
|
2545
|
+
by?: "cost";
|
|
2546
|
+
} & UsageWindowParams & {
|
|
2547
|
+
limit?: number;
|
|
2548
|
+
}): Promise<AppUsageTopUsersResponse>;
|
|
2549
|
+
/** One user's usage over a window and the bytes they own. */
|
|
2550
|
+
getAppUsageUser(appId: string, userId: string, params?: UsageWindowParams): Promise<AppUsageUserResponse>;
|
|
2551
|
+
/** An app's system usage over a window, by origin, source, resource and meter. */
|
|
2552
|
+
getAppUsageSystem(appId: string, params?: UsageWindowParams & {
|
|
2553
|
+
meter?: string;
|
|
2554
|
+
limit?: number;
|
|
2555
|
+
}): Promise<AppUsageSystemResponse>;
|
|
2556
|
+
/** The top apps by estimated cost, month to date (super-admin). */
|
|
2557
|
+
listUsageTopApps(params?: {
|
|
2558
|
+
limit?: number;
|
|
2559
|
+
}): Promise<UsageTopAppsResponse>;
|
|
2560
|
+
/** The top developers by estimated cost, month to date (super-admin). */
|
|
2561
|
+
listUsageTopDevelopers(params?: {
|
|
2562
|
+
limit?: number;
|
|
2563
|
+
}): Promise<UsageTopDevelopersResponse>;
|
|
2564
|
+
/** The usage jobs' state (super-admin). */
|
|
2565
|
+
getUsageJobs(): Promise<UsageJobsResponse>;
|
|
1551
2566
|
/**
|
|
1552
2567
|
* The signed-in admin's own profile, `role` included.
|
|
1553
2568
|
*
|
|
@@ -1578,32 +2593,21 @@ export declare class ApiClient {
|
|
|
1578
2593
|
role?: "admin" | "super-admin";
|
|
1579
2594
|
}): Promise<any>;
|
|
1580
2595
|
reindexAdmin(adminId: string): Promise<void>;
|
|
1581
|
-
|
|
2596
|
+
/** `reindexAdmin` with the route's answer, for callers that print it. */
|
|
2597
|
+
reindexAdminWithResult(adminId: string): Promise<{
|
|
2598
|
+
success: boolean;
|
|
2599
|
+
adminId: string;
|
|
2600
|
+
reindexedAt: string;
|
|
2601
|
+
}>;
|
|
2602
|
+
/** One address's pending admin invitations; the route requires the address. */
|
|
2603
|
+
listAllAdminInvitations(email: string): Promise<any[]>;
|
|
1582
2604
|
createGlobalAdminInvitation(data: {
|
|
1583
2605
|
email: string;
|
|
1584
2606
|
appCreationLimit?: number;
|
|
1585
2607
|
expiresInDays?: number;
|
|
1586
2608
|
}): Promise<any>;
|
|
1587
2609
|
deleteGlobalAdminInvitation(invitationId: string): Promise<void>;
|
|
1588
|
-
|
|
1589
|
-
status?: string;
|
|
1590
|
-
limit?: number;
|
|
1591
|
-
cursor?: string;
|
|
1592
|
-
}): Promise<any>;
|
|
1593
|
-
getPromptCatalogItem(catalogId: string): Promise<any>;
|
|
1594
|
-
createPromptCatalogItem(payload: any): Promise<any>;
|
|
1595
|
-
updatePromptCatalogItem(catalogId: string, payload: any): Promise<any>;
|
|
1596
|
-
deletePromptCatalogItem(catalogId: string): Promise<void>;
|
|
1597
|
-
listIntegrationCatalog(params?: {
|
|
1598
|
-
status?: string;
|
|
1599
|
-
limit?: number;
|
|
1600
|
-
cursor?: string;
|
|
1601
|
-
}): Promise<any>;
|
|
1602
|
-
getIntegrationCatalogItem(catalogId: string): Promise<any>;
|
|
1603
|
-
createIntegrationCatalogItem(payload: any): Promise<any>;
|
|
1604
|
-
updateIntegrationCatalogItem(catalogId: string, payload: any): Promise<any>;
|
|
1605
|
-
deleteIntegrationCatalogItem(catalogId: string): Promise<void>;
|
|
1606
|
-
startBatchTests(appId: string, blockType: "prompt" | "integration" | "workflow" | "script", blockId: string, payload?: {
|
|
2610
|
+
startBatchTests(appId: string, blockType: "prompt" | "integration", blockId: string, payload?: {
|
|
1607
2611
|
comparisonGroup?: string;
|
|
1608
2612
|
overrideConfigId?: string;
|
|
1609
2613
|
testCaseIds?: string[];
|
|
@@ -1613,7 +2617,7 @@ export declare class ApiClient {
|
|
|
1613
2617
|
instanceIds: string[];
|
|
1614
2618
|
errors?: any[];
|
|
1615
2619
|
}>;
|
|
1616
|
-
getBatchTestStatus(appId: string, blockType: "prompt" | "integration"
|
|
2620
|
+
getBatchTestStatus(appId: string, blockType: "prompt" | "integration", blockId: string, batchId: string): Promise<{
|
|
1617
2621
|
status: string;
|
|
1618
2622
|
batchId: string;
|
|
1619
2623
|
completed: number;
|
|
@@ -1630,7 +2634,7 @@ export declare class ApiClient {
|
|
|
1630
2634
|
endedAt?: string;
|
|
1631
2635
|
}>;
|
|
1632
2636
|
}>;
|
|
1633
|
-
cancelBatchTests(appId: string, blockType: "prompt" | "integration"
|
|
2637
|
+
cancelBatchTests(appId: string, blockType: "prompt" | "integration", blockId: string, batchId: string, instanceIds: string[]): Promise<{
|
|
1634
2638
|
batchId: string;
|
|
1635
2639
|
terminated: string[];
|
|
1636
2640
|
errors?: any[];
|
|
@@ -1669,6 +2673,15 @@ export declare class ApiClient {
|
|
|
1669
2673
|
sentTo: string;
|
|
1670
2674
|
error?: string;
|
|
1671
2675
|
}>;
|
|
2676
|
+
/**
|
|
2677
|
+
* Render the saved template (or the built-in default) for an email type
|
|
2678
|
+
* without sending it. `variables` override the type's sample values. The
|
|
2679
|
+
* app id and the type are each encoded as one path segment, so no value of
|
|
2680
|
+
* either can select another route.
|
|
2681
|
+
*/
|
|
2682
|
+
previewEmailTemplate(appId: string, emailType: string, payload?: {
|
|
2683
|
+
variables?: Record<string, string | number | boolean | null>;
|
|
2684
|
+
}): Promise<EmailTemplatePreview>;
|
|
1672
2685
|
createToken(appId: string, data: {
|
|
1673
2686
|
name: string;
|
|
1674
2687
|
ttl?: string;
|
|
@@ -1846,6 +2859,7 @@ export declare class ApiClient {
|
|
|
1846
2859
|
}, expectedModifiedAt?: string, options?: {
|
|
1847
2860
|
dryRun?: boolean;
|
|
1848
2861
|
acceptWarnings?: boolean;
|
|
2862
|
+
allowFieldRemoval?: boolean;
|
|
1849
2863
|
}): Promise<any>;
|
|
1850
2864
|
deleteDatabaseTypeConfig(appId: string, databaseType: string, options?: {
|
|
1851
2865
|
force?: boolean;
|
|
@@ -1859,7 +2873,6 @@ export declare class ApiClient {
|
|
|
1859
2873
|
schema: string;
|
|
1860
2874
|
}>;
|
|
1861
2875
|
listGroups(appId: string, params?: {
|
|
1862
|
-
type?: string;
|
|
1863
2876
|
limit?: number;
|
|
1864
2877
|
cursor?: string;
|
|
1865
2878
|
}): Promise<{
|
|
@@ -1867,28 +2880,56 @@ export declare class ApiClient {
|
|
|
1867
2880
|
nextCursor?: string;
|
|
1868
2881
|
hasMore?: boolean;
|
|
1869
2882
|
}>;
|
|
2883
|
+
/** One page of one custodian's groups (`app` or `user:<userId>`), through the admin API. */
|
|
2884
|
+
listGroupsByCustodian(appId: string, custodian: string, params?: {
|
|
2885
|
+
limit?: number;
|
|
2886
|
+
cursor?: string;
|
|
2887
|
+
}): Promise<{
|
|
2888
|
+
items: any[];
|
|
2889
|
+
nextCursor?: string;
|
|
2890
|
+
hasMore?: boolean;
|
|
2891
|
+
}>;
|
|
2892
|
+
/** Transfer a group to `to` (`app` or `user:<userId>`) through the admin API. */
|
|
2893
|
+
transferGroup(appId: string, groupId: string, to: string): Promise<any>;
|
|
2894
|
+
/**
|
|
2895
|
+
* Create a group through the admin API; `custodian` is `app` or
|
|
2896
|
+
* `user:<userId>`. The server mints the group's id and answers it as
|
|
2897
|
+
* `groupId`.
|
|
2898
|
+
*/
|
|
1870
2899
|
createGroup(appId: string, data: {
|
|
1871
|
-
groupType: string;
|
|
1872
|
-
groupId?: string;
|
|
1873
2900
|
name: string;
|
|
1874
2901
|
description?: string;
|
|
2902
|
+
custodian: string;
|
|
2903
|
+
settings?: {
|
|
2904
|
+
memberList?: "members" | "managers";
|
|
2905
|
+
};
|
|
1875
2906
|
initialMetadata?: Record<string, Record<string, unknown>>;
|
|
1876
2907
|
}): Promise<any>;
|
|
1877
|
-
|
|
1878
|
-
|
|
2908
|
+
/**
|
|
2909
|
+
* A group by id. `groupType` looks a group written before groups were
|
|
2910
|
+
* addressed by id up by its type first (the routes' deprecated
|
|
2911
|
+
* `?groupType=`), as an exported collection's grants still name them.
|
|
2912
|
+
*/
|
|
2913
|
+
getGroup(appId: string, groupId: string, options?: {
|
|
2914
|
+
groupType?: string;
|
|
2915
|
+
}): Promise<any>;
|
|
2916
|
+
updateGroup(appId: string, groupId: string, data: {
|
|
1879
2917
|
name?: string;
|
|
1880
2918
|
description?: string;
|
|
2919
|
+
settings?: {
|
|
2920
|
+
memberList?: "members" | "managers";
|
|
2921
|
+
};
|
|
1881
2922
|
}): Promise<any>;
|
|
1882
|
-
deleteGroup(appId: string,
|
|
2923
|
+
deleteGroup(appId: string, groupId: string): Promise<any>;
|
|
1883
2924
|
/**
|
|
1884
|
-
* One page of a group's members.
|
|
2925
|
+
* One page of a group's members, with their roles.
|
|
1885
2926
|
*
|
|
1886
2927
|
* The route paginates cursor-style (no default limit, cap 200) and reports
|
|
1887
2928
|
* the boundary, so `groups members list` carries `--limit`/`--cursor` and
|
|
1888
2929
|
* forwards them (#3646) rather than printing a first page that claims to be
|
|
1889
2930
|
* the whole membership.
|
|
1890
2931
|
*/
|
|
1891
|
-
listGroupMembers(appId: string,
|
|
2932
|
+
listGroupMembers(appId: string, groupId: string, options?: {
|
|
1892
2933
|
include?: "profiles";
|
|
1893
2934
|
limit?: number;
|
|
1894
2935
|
cursor?: string;
|
|
@@ -1897,11 +2938,16 @@ export declare class ApiClient {
|
|
|
1897
2938
|
nextCursor?: string;
|
|
1898
2939
|
hasMore?: boolean;
|
|
1899
2940
|
}>;
|
|
1900
|
-
|
|
2941
|
+
/** Add a member through the admin API; `role: "owner"` restores the custodian's owner row. */
|
|
2942
|
+
addGroupMember(appId: string, groupId: string, data: {
|
|
1901
2943
|
userId: string;
|
|
2944
|
+
role?: string;
|
|
1902
2945
|
}): Promise<any>;
|
|
1903
|
-
|
|
1904
|
-
|
|
2946
|
+
/** Change a member's role through the admin API, the owner row's included. */
|
|
2947
|
+
setGroupMemberRole(appId: string, groupId: string, userId: string, role: string): Promise<any>;
|
|
2948
|
+
/** Remove a member through the admin API, the owner row included. */
|
|
2949
|
+
removeGroupMember(appId: string, groupId: string, userId: string): Promise<any>;
|
|
2950
|
+
listGroupDocuments(appId: string, groupId: string): Promise<any[]>;
|
|
1905
2951
|
listUserMemberships(appId: string, userId: string): Promise<any[]>;
|
|
1906
2952
|
listDocumentGroupPermissions(appId: string, documentId: string): Promise<any[]>;
|
|
1907
2953
|
grantDocumentGroupPermission(appId: string, documentId: string, data: {
|
|
@@ -1935,12 +2981,40 @@ export declare class ApiClient {
|
|
|
1935
2981
|
*/
|
|
1936
2982
|
collectionType?: string;
|
|
1937
2983
|
initialMetadata?: Record<string, Record<string, unknown>>;
|
|
2984
|
+
}): Promise<any>;
|
|
2985
|
+
/** One page of one custodian's collections (`app` or `user:<userId>`), through the admin API. */
|
|
2986
|
+
listCollectionsByCustodian(appId: string, custodian: string, params?: {
|
|
2987
|
+
limit?: number;
|
|
2988
|
+
cursor?: string;
|
|
2989
|
+
}): Promise<{
|
|
2990
|
+
items: any[];
|
|
2991
|
+
nextCursor?: string;
|
|
2992
|
+
hasMore?: boolean;
|
|
2993
|
+
}>;
|
|
2994
|
+
/** Transfer a collection to `to` (`app` or `user:<userId>`) through the admin API. */
|
|
2995
|
+
transferCollection(appId: string, collectionId: string, to: string): Promise<any>;
|
|
2996
|
+
/**
|
|
2997
|
+
* Create a collection through the admin API, for `custodian` (`app` or
|
|
2998
|
+
* `user:<userId>`; a user custodian holds the owner row). Spends no
|
|
2999
|
+
* create budget.
|
|
3000
|
+
*/
|
|
3001
|
+
createCollectionAsAdmin(appId: string, data: {
|
|
3002
|
+
name: string;
|
|
3003
|
+
description?: string;
|
|
1938
3004
|
/**
|
|
1939
|
-
*
|
|
1940
|
-
*
|
|
1941
|
-
* itself, exactly as `createDocument`'s does.
|
|
3005
|
+
* Deprecated: the server still records it while enforcement reads rule
|
|
3006
|
+
* sets, so a migration carries it across.
|
|
1942
3007
|
*/
|
|
1943
|
-
|
|
3008
|
+
collectionType?: string;
|
|
3009
|
+
custodian: string;
|
|
3010
|
+
settings?: {
|
|
3011
|
+
memberList?: "members" | "managers";
|
|
3012
|
+
} | Record<string, unknown>;
|
|
3013
|
+
initialMembers?: Array<{
|
|
3014
|
+
userId: string;
|
|
3015
|
+
role: string;
|
|
3016
|
+
}>;
|
|
3017
|
+
initialMetadata?: Record<string, Record<string, unknown>>;
|
|
1944
3018
|
}): Promise<any>;
|
|
1945
3019
|
getCollection(appId: string, collectionId: string): Promise<any>;
|
|
1946
3020
|
updateCollection(appId: string, collectionId: string, data: {
|
|
@@ -1967,30 +3041,30 @@ export declare class ApiClient {
|
|
|
1967
3041
|
items: any[];
|
|
1968
3042
|
nextCursor?: string | null;
|
|
1969
3043
|
}>;
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
3044
|
+
/**
|
|
3045
|
+
* Every member of a collection, users and groups as principals with their
|
|
3046
|
+
* roles, in one answer.
|
|
3047
|
+
*/
|
|
3048
|
+
listCollectionMembers(appId: string, collectionId: string): Promise<{
|
|
3049
|
+
items: any[];
|
|
3050
|
+
hasMore: boolean;
|
|
3051
|
+
}>;
|
|
3052
|
+
/**
|
|
3053
|
+
* Add a user or a group to a collection through the admin API, with a role;
|
|
3054
|
+
* `role: "owner"` restores the custodian's owner row.
|
|
3055
|
+
*/
|
|
3056
|
+
addCollectionMember(appId: string, collectionId: string, data: ({
|
|
1978
3057
|
userId: string;
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
createCollectionTypeConfig(appId: string, data: {
|
|
1985
|
-
collectionType: string;
|
|
1986
|
-
ruleSetId?: string;
|
|
1987
|
-
metadataManifest?: any;
|
|
3058
|
+
} | {
|
|
3059
|
+
groupId: string;
|
|
3060
|
+
groupType?: string;
|
|
3061
|
+
}) & {
|
|
3062
|
+
role: string;
|
|
1988
3063
|
}): Promise<any>;
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
deleteCollectionTypeConfig(appId: string, collectionType: string): Promise<any>;
|
|
3064
|
+
/** Change a member's role through the admin API, the owner row's included. */
|
|
3065
|
+
setCollectionMemberRole(appId: string, collectionId: string, principal: string, role: string): Promise<any>;
|
|
3066
|
+
/** Remove a user or `group:<groupId>` through the admin API, the owner row included. */
|
|
3067
|
+
removeCollectionMember(appId: string, collectionId: string, principal: string): Promise<any>;
|
|
1994
3068
|
/**
|
|
1995
3069
|
* List all metadata category configs for an app. The route returns
|
|
1996
3070
|
* `{ configs: [...] }`; unwrap to a bare array to match the other
|
|
@@ -2048,20 +3122,6 @@ export declare class ApiClient {
|
|
|
2048
3122
|
}>;
|
|
2049
3123
|
testRuleSet(appId: string, ruleSetId: string, data: any): Promise<any>;
|
|
2050
3124
|
debugRuleSet(appId: string, data: any): Promise<any>;
|
|
2051
|
-
listGroupTypeConfigs(appId: string): Promise<any[]>;
|
|
2052
|
-
getGroupTypeConfig(appId: string, groupType: string): Promise<any>;
|
|
2053
|
-
createGroupTypeConfig(appId: string, data: {
|
|
2054
|
-
groupType: string;
|
|
2055
|
-
ruleSetId?: string;
|
|
2056
|
-
autoAddCreator?: boolean;
|
|
2057
|
-
metadataManifest?: any;
|
|
2058
|
-
}): Promise<any>;
|
|
2059
|
-
updateGroupTypeConfig(appId: string, groupType: string, data: {
|
|
2060
|
-
ruleSetId?: string | null;
|
|
2061
|
-
autoAddCreator?: boolean;
|
|
2062
|
-
metadataManifest?: any;
|
|
2063
|
-
}, expectedModifiedAt?: string): Promise<any>;
|
|
2064
|
-
deleteGroupTypeConfig(appId: string, groupType: string): Promise<any>;
|
|
2065
3125
|
exportDocumentState(appId: string, documentId: string): Promise<{
|
|
2066
3126
|
state: string;
|
|
2067
3127
|
byteLength: number;
|
|
@@ -2126,6 +3186,8 @@ export declare class ApiClient {
|
|
|
2126
3186
|
cursor?: string;
|
|
2127
3187
|
/** #3764 — the format the caller believes this document has. */
|
|
2128
3188
|
documentFormat?: 1 | 3;
|
|
3189
|
+
/** #4692 — include specs, answered on a db3 as `_related`; the route validates them. */
|
|
3190
|
+
include?: unknown;
|
|
2129
3191
|
}): Promise<ListEnvelope>;
|
|
2130
3192
|
/**
|
|
2131
3193
|
* Count records in a document model (issue #1964 Phase 3). Returns `{ count }`.
|
|
@@ -2139,24 +3201,36 @@ export declare class ApiClient {
|
|
|
2139
3201
|
/**
|
|
2140
3202
|
* Aggregate records in a document model (issue #2437) — the documents twin
|
|
2141
3203
|
* of {@link aggregateDatabaseRecords}. `POST documents/:id/records/:model/aggregate`
|
|
2142
|
-
* with `{ options: { operations, groupBy?, filter? } }`,
|
|
2143
|
-
* in the same shape as the database endpoint.
|
|
3204
|
+
* with `{ options: { operations, groupBy?, filter?, sort?, limit? } }`,
|
|
3205
|
+
* answering `{ result }` in the same shape as the database endpoint.
|
|
2144
3206
|
*
|
|
2145
3207
|
* `groupBy` takes plain field names and period levels `{ field, period }`
|
|
2146
|
-
* (keyed `<field>_<period>` in a row's `group`)
|
|
2147
|
-
*
|
|
2148
|
-
*
|
|
3208
|
+
* (keyed `<field>_<period>` in a row's `group`). On a db3 (a format-3
|
|
3209
|
+
* document) a StringSet field name is a facet, `{ field, contains }` a
|
|
3210
|
+
* membership, and `sort` and `limit` order and bound the groups; a format-1
|
|
3211
|
+
* document refuses those four with a 400.
|
|
2149
3212
|
*/
|
|
2150
3213
|
aggregateDocumentRecords(appId: string, documentId: string, modelName: string, options: {
|
|
2151
3214
|
operations: {
|
|
2152
3215
|
type: string;
|
|
2153
3216
|
field?: string;
|
|
2154
3217
|
}[];
|
|
3218
|
+
/** On a db3, a StringSet field name is a facet and `{ field, contains }` a membership. */
|
|
2155
3219
|
groupBy?: Array<string | {
|
|
2156
3220
|
field: string;
|
|
2157
3221
|
period: "month" | "quarter" | "year";
|
|
3222
|
+
} | {
|
|
3223
|
+
field: string;
|
|
3224
|
+
contains: string;
|
|
2158
3225
|
}>;
|
|
2159
3226
|
filter?: Record<string, any>;
|
|
3227
|
+
/** The groups' order; a db3 only. */
|
|
3228
|
+
sort?: {
|
|
3229
|
+
field: string;
|
|
3230
|
+
direction: 1 | -1;
|
|
3231
|
+
};
|
|
3232
|
+
/** The most groups answered, 1 to 10,000; a db3 only. */
|
|
3233
|
+
limit?: number;
|
|
2160
3234
|
}, extra?: {
|
|
2161
3235
|
documentFormat?: 1 | 3;
|
|
2162
3236
|
}): Promise<{
|
|
@@ -2236,6 +3310,8 @@ export declare class ApiClient {
|
|
|
2236
3310
|
lastId: string;
|
|
2237
3311
|
body: Buffer;
|
|
2238
3312
|
}): Promise<any>;
|
|
3313
|
+
/** A chunk upload to `<base>/ingest/<session>/chunks`: the documents route or its db3 mount. */
|
|
3314
|
+
private uploadIngestChunkAt;
|
|
2239
3315
|
/** Freeze a session's manifest and hand it to the pipeline (#3435). */
|
|
2240
3316
|
commitDocumentIngest(appId: string, documentId: string, sessionId: string): Promise<any>;
|
|
2241
3317
|
/** Give a session up; allowed until the swap (#3435). */
|
|
@@ -2291,11 +3367,12 @@ export declare class ApiClient {
|
|
|
2291
3367
|
}>;
|
|
2292
3368
|
/**
|
|
2293
3369
|
* Apply an ordered multi-model create/patch/delete blob atomically (issue
|
|
2294
|
-
* #1964 Phase 4, wrapping the #1517 `bulkUpdate` facade)
|
|
2295
|
-
*
|
|
2296
|
-
* `{ applied, added,
|
|
3370
|
+
* #1964 Phase 4, wrapping the #1517 `bulkUpdate` facade): `POST
|
|
3371
|
+
* records/batch`, at most 100 operations. All-or-nothing: a validation
|
|
3372
|
+
* failure commits nothing. Returns the facade's `{ applied, added,
|
|
3373
|
+
* updated, deleted }`, and on a db3 `reads` when the batch carried reads.
|
|
2297
3374
|
*/
|
|
2298
|
-
|
|
3375
|
+
batchDocumentRecords(appId: string, documentId: string, operations: Array<Record<string, unknown>>, extra?: {
|
|
2299
3376
|
documentFormat?: 1 | 3;
|
|
2300
3377
|
}): Promise<{
|
|
2301
3378
|
applied: number;
|
|
@@ -2314,7 +3391,306 @@ export declare class ApiClient {
|
|
|
2314
3391
|
id: string;
|
|
2315
3392
|
created: boolean;
|
|
2316
3393
|
}>;
|
|
3394
|
+
reads?: Array<Record<string, any>>;
|
|
3395
|
+
}>;
|
|
3396
|
+
/** `/app/<app>/api/db3/<id>`, the id encoded: every `db3.*` route's prefix. */
|
|
3397
|
+
private db3Path;
|
|
3398
|
+
/** `GET db3/:id/indexes` → `{ indexes }`, sorted by name. */
|
|
3399
|
+
listDb3Indexes(appId: string, db3Id: string): Promise<{
|
|
3400
|
+
indexes: Db3IndexRow[];
|
|
2317
3401
|
}>;
|
|
3402
|
+
/**
|
|
3403
|
+
* `POST db3/:id/indexes` with `{ model, field | fields, unique?, name? }`,
|
|
3404
|
+
* `{ model, field, members: true }` for a member index, or `{ model, field
|
|
3405
|
+
* | fields, kind: "text", on, text? }` for a text index → `{ index }`. The
|
|
3406
|
+
* route applies the registration rules.
|
|
3407
|
+
*/
|
|
3408
|
+
registerDb3Index(appId: string, db3Id: string, body: {
|
|
3409
|
+
model: string;
|
|
3410
|
+
field?: string;
|
|
3411
|
+
fields?: string[];
|
|
3412
|
+
unique?: boolean;
|
|
3413
|
+
name?: string;
|
|
3414
|
+
members?: boolean;
|
|
3415
|
+
kind?: Db3IndexKind;
|
|
3416
|
+
on?: Db3IndexPlacement;
|
|
3417
|
+
text?: Partial<Db3TextIndexOptions>;
|
|
3418
|
+
/** A `vector` index's options (#5225). */
|
|
3419
|
+
vector?: Db3VectorIndexOptions;
|
|
3420
|
+
}): Promise<{
|
|
3421
|
+
index: Db3IndexRow;
|
|
3422
|
+
}>;
|
|
3423
|
+
/** `DELETE db3/:id/indexes/:name` → `{ ok, name }`. */
|
|
3424
|
+
dropDb3Index(appId: string, db3Id: string, name: string): Promise<{
|
|
3425
|
+
ok: boolean;
|
|
3426
|
+
name: string;
|
|
3427
|
+
}>;
|
|
3428
|
+
/**
|
|
3429
|
+
* `GET db3/:id/indexes/:name/model` (#5229): a vector index's shared model,
|
|
3430
|
+
* its bytes as uploaded and the `X-Index-Model-*` headers it was uploaded
|
|
3431
|
+
* with.
|
|
3432
|
+
*/
|
|
3433
|
+
fetchDb3IndexModel(appId: string, db3Id: string, name: string): Promise<{
|
|
3434
|
+
data: Buffer;
|
|
3435
|
+
generation: number;
|
|
3436
|
+
revision: number;
|
|
3437
|
+
rows: number;
|
|
3438
|
+
trainedAt: string;
|
|
3439
|
+
format: string;
|
|
3440
|
+
}>;
|
|
3441
|
+
/**
|
|
3442
|
+
* `DELETE db3/:id/indexes/:name/model` (#5229) → `{ ok, name, revision }`:
|
|
3443
|
+
* the model (or an upload under way) gone, `revision` the index's new one.
|
|
3444
|
+
*/
|
|
3445
|
+
deleteDb3IndexModel(appId: string, db3Id: string, name: string): Promise<{
|
|
3446
|
+
ok: boolean;
|
|
3447
|
+
name: string;
|
|
3448
|
+
revision: number;
|
|
3449
|
+
}>;
|
|
3450
|
+
/** The db3 mount of {@link queryDocumentRecords}: `GET db3/:id/records/:model`. */
|
|
3451
|
+
queryDb3Records(appId: string, db3Id: string, modelName: string, queryOptions?: {
|
|
3452
|
+
filter?: Record<string, any>;
|
|
3453
|
+
sort?: unknown;
|
|
3454
|
+
limit?: number | string;
|
|
3455
|
+
cursor?: string;
|
|
3456
|
+
include?: unknown;
|
|
3457
|
+
}): Promise<ListEnvelope>;
|
|
3458
|
+
/** The db3 mount of {@link countDocumentRecords}: `GET db3/:id/records/:model/count`. */
|
|
3459
|
+
countDb3Records(appId: string, db3Id: string, modelName: string, queryOptions?: {
|
|
3460
|
+
filter?: Record<string, any>;
|
|
3461
|
+
}): Promise<{
|
|
3462
|
+
count: number;
|
|
3463
|
+
}>;
|
|
3464
|
+
/** The db3 mount of {@link aggregateDocumentRecords}: `POST db3/:id/records/:model/aggregate`. */
|
|
3465
|
+
aggregateDb3Records(appId: string, db3Id: string, modelName: string, options: Parameters<ApiClient["aggregateDocumentRecords"]>[3]): Promise<{
|
|
3466
|
+
result: unknown;
|
|
3467
|
+
}>;
|
|
3468
|
+
/**
|
|
3469
|
+
* `POST db3/:id/records/:model/explain` (#5240): run a query, count or
|
|
3470
|
+
* aggregate on the server, forced onto `index` (or off indexes, `"none"`)
|
|
3471
|
+
* when given, and answer how it read.
|
|
3472
|
+
*/
|
|
3473
|
+
explainDb3Read(appId: string, db3Id: string, modelName: string, body: Db3ExplainRequest): Promise<Db3ExplainAnswer>;
|
|
3474
|
+
/** The db3 mount of {@link saveDocumentRecord}: `POST db3/:id/records/:model`. */
|
|
3475
|
+
saveDb3Record(appId: string, db3Id: string, modelName: string, body: {
|
|
3476
|
+
id: string;
|
|
3477
|
+
data: Record<string, unknown>;
|
|
3478
|
+
options?: Record<string, unknown>;
|
|
3479
|
+
}): Promise<{
|
|
3480
|
+
record: unknown;
|
|
3481
|
+
}>;
|
|
3482
|
+
/** The db3 mount of {@link patchDocumentRecord}: `PATCH db3/:id/records/:model/:recordId`. */
|
|
3483
|
+
patchDb3Record(appId: string, db3Id: string, modelName: string, recordId: string, body: {
|
|
3484
|
+
data: Record<string, unknown>;
|
|
3485
|
+
options?: Record<string, unknown>;
|
|
3486
|
+
}): Promise<{
|
|
3487
|
+
record: unknown;
|
|
3488
|
+
}>;
|
|
3489
|
+
/** The db3 mount of {@link deleteDocumentRecord}: `DELETE db3/:id/records/:model/:recordId`. */
|
|
3490
|
+
deleteDb3Record(appId: string, db3Id: string, modelName: string, recordId: string): Promise<{
|
|
3491
|
+
deleted: boolean;
|
|
3492
|
+
}>;
|
|
3493
|
+
/** The db3 mount of {@link batchDocumentRecords}: `POST db3/:id/records/batch`. */
|
|
3494
|
+
batchDb3Records(appId: string, db3Id: string, operations: Array<Record<string, unknown>>): ReturnType<ApiClient["batchDocumentRecords"]>;
|
|
3495
|
+
/**
|
|
3496
|
+
* Several reads of a db3 in one request (#5243): `POST db3/:id/records/batch-read`,
|
|
3497
|
+
* each answered at its index from one state of the db3. `atomic: false`
|
|
3498
|
+
* answers a refused read in its place rather than refusing the request.
|
|
3499
|
+
*/
|
|
3500
|
+
batchReadDb3Records(appId: string, db3Id: string, operations: Array<Record<string, unknown>>, options?: {
|
|
3501
|
+
atomic?: boolean;
|
|
3502
|
+
}): Promise<{
|
|
3503
|
+
results: Array<Record<string, any>>;
|
|
3504
|
+
cost?: Record<string, unknown>;
|
|
3505
|
+
}>;
|
|
3506
|
+
/** The db3 mount of {@link getDocumentSchema}: `GET db3/:id/schema`. */
|
|
3507
|
+
getDb3Schema(appId: string, db3Id: string): Promise<any>;
|
|
3508
|
+
/** `?limit=&cursor=` for a listing. */
|
|
3509
|
+
private pageQuery;
|
|
3510
|
+
/** `GET db3/:id/ingest` (#4889): a db3's bulk-load sessions, newest first. */
|
|
3511
|
+
listDb3Ingests(appId: string, db3Id: string, options?: {
|
|
3512
|
+
limit?: number;
|
|
3513
|
+
cursor?: string;
|
|
3514
|
+
}): Promise<{
|
|
3515
|
+
items: any[];
|
|
3516
|
+
hasMore: boolean;
|
|
3517
|
+
nextCursor?: string;
|
|
3518
|
+
}>;
|
|
3519
|
+
/** `GET db3/:id/ingest/:sessionId` (#4889). */
|
|
3520
|
+
getDb3Ingest(appId: string, db3Id: string, sessionId: string): Promise<any>;
|
|
3521
|
+
/** `POST db3/:id/ingest` (#4889): open a bulk-load session; `{}` keeps the defaults. */
|
|
3522
|
+
createDb3Ingest(appId: string, db3Id: string, options?: {
|
|
3523
|
+
reserveEpoch?: "open" | "commit";
|
|
3524
|
+
mode?: "merge" | "refresh";
|
|
3525
|
+
models?: string[];
|
|
3526
|
+
}): Promise<any>;
|
|
3527
|
+
/** `POST db3/:id/ingest/:sessionId/chunks` (#4889): one chunk, multipart, as the documents upload sends it. */
|
|
3528
|
+
uploadDb3IngestChunk(appId: string, db3Id: string, sessionId: string, chunk: Parameters<ApiClient["uploadDocumentIngestChunk"]>[3]): Promise<any>;
|
|
3529
|
+
/** `POST db3/:id/ingest/:sessionId/commit` (#4889). */
|
|
3530
|
+
commitDb3Ingest(appId: string, db3Id: string, sessionId: string): Promise<any>;
|
|
3531
|
+
/** `POST db3/:id/ingest/:sessionId/abort` (#4889). */
|
|
3532
|
+
abortDb3Ingest(appId: string, db3Id: string, sessionId: string): Promise<any>;
|
|
3533
|
+
/** `GET db3/:id/snapshots` (#4889): a db3's segment exports, newest first. */
|
|
3534
|
+
listDb3Snapshots(appId: string, db3Id: string, options?: {
|
|
3535
|
+
limit?: number;
|
|
3536
|
+
cursor?: string;
|
|
3537
|
+
}): Promise<{
|
|
3538
|
+
items: any[];
|
|
3539
|
+
hasMore: boolean;
|
|
3540
|
+
nextCursor?: string;
|
|
3541
|
+
}>;
|
|
3542
|
+
/** `GET db3/:id/snapshots/:segmentId` (#4889). */
|
|
3543
|
+
getDb3Snapshot(appId: string, db3Id: string, segmentId: string): Promise<any>;
|
|
3544
|
+
/** `POST db3/:id/snapshots` (#4889): start a segment export. */
|
|
3545
|
+
requestDb3Snapshot(appId: string, db3Id: string): Promise<any>;
|
|
3546
|
+
/** `GET db3/:id/export/chain` (#4889): the current segment, signed for download. */
|
|
3547
|
+
exportDb3Chain(appId: string, db3Id: string): Promise<any>;
|
|
3548
|
+
/** `GET db3/:id/blobs` (#4889): one page of a db3's blobs. */
|
|
3549
|
+
listDb3Blobs(appId: string, db3Id: string, params?: {
|
|
3550
|
+
cursor?: string;
|
|
3551
|
+
limit?: number;
|
|
3552
|
+
}): Promise<any>;
|
|
3553
|
+
/** `GET db3/:id/blobs/:blobId/download` (#4889): a blob's bytes. */
|
|
3554
|
+
downloadDb3Blob(appId: string, db3Id: string, blobId: string): Promise<Buffer>;
|
|
3555
|
+
/** `PUT db3/:id/blobs/:blobId` (#4889): a blob under its own id, as the documents upload sends it. */
|
|
3556
|
+
uploadDb3Blob(appId: string, db3Id: string, blobId: string, data: Buffer, meta: {
|
|
3557
|
+
filename: string;
|
|
3558
|
+
contentType: string;
|
|
3559
|
+
sha256: string;
|
|
3560
|
+
}): Promise<any>;
|
|
3561
|
+
/** The db3 mount of {@link getDocumentRoom}: `GET db3/:id/room`. App admins only. */
|
|
3562
|
+
getDb3Room(appId: string, db3Id: string, query?: {
|
|
3563
|
+
refused?: string;
|
|
3564
|
+
limit?: number;
|
|
3565
|
+
cursor?: string;
|
|
3566
|
+
}): Promise<any>;
|
|
3567
|
+
/**
|
|
3568
|
+
* `POST db3` (#4804): create a db3 and answer it, `{ id, title, createdBy,
|
|
3569
|
+
* createdAt, modifiedAt, custodian, sync, type, tags }`. Without `custodian`
|
|
3570
|
+
* an admin token's create is held by the app. `id` keeps a caller-chosen id
|
|
3571
|
+
* (#4921), refused `DB3_ID_EXISTS` when the app holds it.
|
|
3572
|
+
*/
|
|
3573
|
+
createDb3(appId: string, body: {
|
|
3574
|
+
title: string;
|
|
3575
|
+
type?: string;
|
|
3576
|
+
sync?: boolean;
|
|
3577
|
+
custodian?: string;
|
|
3578
|
+
tags?: string[];
|
|
3579
|
+
id?: string;
|
|
3580
|
+
}): Promise<any>;
|
|
3581
|
+
/** `GET db3/:id` (#4804): the db3, with the caller's grant when it reads it through one. */
|
|
3582
|
+
getDb3(appId: string, db3Id: string): Promise<any>;
|
|
3583
|
+
/**
|
|
3584
|
+
* `PUT db3/:id` (#5890): rename a db3, answered as `getDb3` answers it with
|
|
3585
|
+
* the new title.
|
|
3586
|
+
*/
|
|
3587
|
+
updateDb3(appId: string, db3Id: string, body: {
|
|
3588
|
+
title: string;
|
|
3589
|
+
}): Promise<any>;
|
|
3590
|
+
/** `DELETE db3/:id` (#4804): the documents delete for a db3. */
|
|
3591
|
+
deleteDb3(appId: string, db3Id: string): Promise<any>;
|
|
3592
|
+
/** The db3 mount of {@link getDocumentStats}: `GET db3/:id/stats`. */
|
|
3593
|
+
getDb3Stats(appId: string, db3Id: string): Promise<any>;
|
|
3594
|
+
/**
|
|
3595
|
+
* `POST db3/:id/records/:model/:recordId/increment` (#4797): add each of
|
|
3596
|
+
* `fields` to the record's field, answering `{ record, values }`.
|
|
3597
|
+
*/
|
|
3598
|
+
incrementDb3Record(appId: string, db3Id: string, modelName: string, recordId: string, body: {
|
|
3599
|
+
fields: Record<string, number>;
|
|
3600
|
+
}): Promise<{
|
|
3601
|
+
record: unknown;
|
|
3602
|
+
values: Record<string, number>;
|
|
3603
|
+
}>;
|
|
3604
|
+
/** `GET db3/:id/sync` (#4799): `{ id, sync }`. */
|
|
3605
|
+
getDb3Sync(appId: string, db3Id: string): Promise<{
|
|
3606
|
+
id: string;
|
|
3607
|
+
sync: boolean;
|
|
3608
|
+
}>;
|
|
3609
|
+
/** `PUT db3/:id/sync` (#4799): `{ id, sync, changed }`. */
|
|
3610
|
+
setDb3Sync(appId: string, db3Id: string, sync: boolean): Promise<{
|
|
3611
|
+
id: string;
|
|
3612
|
+
sync: boolean;
|
|
3613
|
+
changed: boolean;
|
|
3614
|
+
}>;
|
|
3615
|
+
/** `GET db3/:id/app-access` (#4801): `{ id, level }`, the level every user of the app holds, or null. */
|
|
3616
|
+
getDb3AppAccess(appId: string, db3Id: string): Promise<{
|
|
3617
|
+
id: string;
|
|
3618
|
+
level: string | null;
|
|
3619
|
+
}>;
|
|
3620
|
+
/** `PUT db3/:id/app-access` (#4801): grant the db3 to every user of the app, or remove the grant with null. */
|
|
3621
|
+
setDb3AppAccess(appId: string, db3Id: string, level: "reader" | "read-write" | null): Promise<{
|
|
3622
|
+
id: string;
|
|
3623
|
+
level: string | null;
|
|
3624
|
+
changed: boolean;
|
|
3625
|
+
}>;
|
|
3626
|
+
/** One custodian's db3s through the admin API (#4800): `custodian` is `app` or `user:<userId>`. */
|
|
3627
|
+
listDb3ByCustodian(appId: string, custodian: string, params?: {
|
|
3628
|
+
limit?: number;
|
|
3629
|
+
cursor?: string;
|
|
3630
|
+
}): Promise<{
|
|
3631
|
+
items: any[];
|
|
3632
|
+
nextCursor?: string;
|
|
3633
|
+
hasMore?: boolean;
|
|
3634
|
+
}>;
|
|
3635
|
+
/**
|
|
3636
|
+
* Every db3 a member reaches through the admin API (#5253): held, shared
|
|
3637
|
+
* with them, then app access, each row with its `via`; `via` narrows to
|
|
3638
|
+
* some of the three ways.
|
|
3639
|
+
*/
|
|
3640
|
+
listDb3ForUser(appId: string, userId: string, params?: {
|
|
3641
|
+
via?: string[];
|
|
3642
|
+
limit?: number;
|
|
3643
|
+
cursor?: string;
|
|
3644
|
+
}): Promise<{
|
|
3645
|
+
items: any[];
|
|
3646
|
+
nextCursor?: string;
|
|
3647
|
+
hasMore?: boolean;
|
|
3648
|
+
}>;
|
|
3649
|
+
/** Transfer a db3 to `to` (`app` or `user:<userId>`) through the admin API (#4804). */
|
|
3650
|
+
transferDb3(appId: string, db3Id: string, to: string): Promise<any>;
|
|
3651
|
+
/** Remove or restore a db3's owner row through the admin API (#4804): `{ id, custodian, ownerRow, changed }`. */
|
|
3652
|
+
setDb3OwnerRow(appId: string, db3Id: string, present: boolean): Promise<{
|
|
3653
|
+
id: string;
|
|
3654
|
+
custodian: string;
|
|
3655
|
+
ownerRow: boolean;
|
|
3656
|
+
changed: boolean;
|
|
3657
|
+
}>;
|
|
3658
|
+
/** `GET db3/:id/type` (#4802): the type the db3's row names, its revision, and what its room holds. */
|
|
3659
|
+
getDb3Type(appId: string, db3Id: string): Promise<any>;
|
|
3660
|
+
/** `PUT db3/:id/type` (#4802): attach a type, installing its current revision whole or refusing it whole. */
|
|
3661
|
+
attachDb3Type(appId: string, db3Id: string, type: string): Promise<any>;
|
|
3662
|
+
/** `/app/<app>/api/db3-types/<name>`, the name encoded (#4802). */
|
|
3663
|
+
private db3TypePath;
|
|
3664
|
+
/** `GET db3-types` (#4802): the app's db3 types, each with its revision. */
|
|
3665
|
+
listDb3Types(appId: string): Promise<{
|
|
3666
|
+
types: any[];
|
|
3667
|
+
}>;
|
|
3668
|
+
/** `GET db3-types/:name` (#4802). */
|
|
3669
|
+
getDb3TypeConfig(appId: string, name: string): Promise<any>;
|
|
3670
|
+
/**
|
|
3671
|
+
* `PUT db3-types/:name` (#4802): create or update the type, and push its new
|
|
3672
|
+
* revision to every db3 of it. `dryRun` judges the body and persists nothing;
|
|
3673
|
+
* `allowFieldRemoval` asks for the append-only override (#6019), which the
|
|
3674
|
+
* server takes only on an app whose stored settings enable it.
|
|
3675
|
+
*/
|
|
3676
|
+
pushDb3Type(appId: string, name: string, data: {
|
|
3677
|
+
ruleSetId?: string | null;
|
|
3678
|
+
triggers?: Record<string, any> | null;
|
|
3679
|
+
autoPopulatedFields?: Record<string, any> | null;
|
|
3680
|
+
timestamps?: Record<string, any> | null;
|
|
3681
|
+
schema?: string | null;
|
|
3682
|
+
metadataManifest?: any;
|
|
3683
|
+
expectedModifiedAt?: string;
|
|
3684
|
+
}, options?: {
|
|
3685
|
+
dryRun?: boolean;
|
|
3686
|
+
allowFieldRemoval?: boolean;
|
|
3687
|
+
}): Promise<any>;
|
|
3688
|
+
/** `DELETE db3-types/:name` (#4802): refused while a db3 is of the type. */
|
|
3689
|
+
deleteDb3Type(appId: string, name: string): Promise<any>;
|
|
3690
|
+
/** `GET db3-types/:name/push-status` (#4802): a push's outcome per db3; the latest without `runId`. */
|
|
3691
|
+
getDb3TypePushStatus(appId: string, name: string, runId?: string): Promise<any>;
|
|
3692
|
+
/** `POST db3-types/:name/push?runId=` (#4802): push the current revision again to a run's refused and failed db3s. */
|
|
3693
|
+
retryDb3TypePush(appId: string, name: string, runId: string): Promise<any>;
|
|
2318
3694
|
createDocument(appId: string, data: {
|
|
2319
3695
|
title: string;
|
|
2320
3696
|
documentId?: string;
|
|
@@ -2368,11 +3744,15 @@ export declare class ApiClient {
|
|
|
2368
3744
|
limit?: number;
|
|
2369
3745
|
}): Promise<any>;
|
|
2370
3746
|
downloadBlob(appId: string, documentId: string, blobId: string): Promise<Buffer>;
|
|
3747
|
+
/** A blob's bytes from `<base>/blobs/<id>/download`: the documents route or its db3 mount. */
|
|
3748
|
+
private downloadBlobAt;
|
|
2371
3749
|
uploadBlob(appId: string, documentId: string, blobId: string, data: Buffer, meta: {
|
|
2372
3750
|
filename: string;
|
|
2373
3751
|
contentType: string;
|
|
2374
3752
|
sha256: string;
|
|
2375
3753
|
}): Promise<any>;
|
|
3754
|
+
/** A blob PUT to `<base>/blobs/<id>`: the documents route or its db3 mount. */
|
|
3755
|
+
private uploadBlobAt;
|
|
2376
3756
|
/**
|
|
2377
3757
|
* Upload a file to an agent session by `sessionId` (#4585): the document
|
|
2378
3758
|
* blob upload's headers and body, on the session's attachment route.
|