tansy 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +142 -2
- package/app/account/account-client.d.ts +16 -0
- package/app/account/account-client.js +138 -0
- package/app/account/layout.d.ts +4 -0
- package/app/account/layout.js +22 -0
- package/app/account/page.d.ts +6 -0
- package/app/account/page.js +15 -0
- package/app/api/account/api-keys/[id]/route.d.ts +1 -0
- package/app/api/account/api-keys/[id]/route.js +8 -0
- package/app/api/account/api-keys/route.d.ts +2 -0
- package/app/api/account/api-keys/route.js +52 -0
- package/app/api/account/fields/route.d.ts +1 -0
- package/app/api/account/fields/route.js +13 -0
- package/app/api/account/locale/route.d.ts +2 -0
- package/app/api/account/locale/route.js +22 -0
- package/app/api/audit/route.d.ts +1 -0
- package/app/api/audit/route.js +11 -0
- package/app/api/auth/[...all]/route.d.ts +2 -0
- package/app/api/auth/[...all]/route.js +3 -0
- package/app/api/auth-config/route.d.ts +1 -0
- package/app/api/auth-config/route.js +4 -0
- package/app/api/background/route.d.ts +2 -0
- package/app/api/background/route.js +4 -0
- package/app/api/batch/route.d.ts +1 -0
- package/app/api/batch/route.js +26 -0
- package/app/api/block-layouts/[id]/route.d.ts +1 -0
- package/app/api/block-layouts/[id]/route.js +8 -0
- package/app/api/block-layouts/route.d.ts +2 -0
- package/app/api/block-layouts/route.js +14 -0
- package/app/api/block-types/[id]/route.d.ts +3 -0
- package/app/api/block-types/[id]/route.js +27 -0
- package/app/api/block-types/route.d.ts +2 -0
- package/app/api/block-types/route.js +23 -0
- package/app/api/collections/[id]/content/[contentId]/draft/publish/route.d.ts +1 -0
- package/app/api/collections/[id]/content/[contentId]/draft/publish/route.js +9 -0
- package/app/api/collections/[id]/content/[contentId]/draft/route.d.ts +3 -0
- package/app/api/collections/[id]/content/[contentId]/draft/route.js +27 -0
- package/app/api/collections/[id]/content/[contentId]/preview-token/route.d.ts +5 -0
- package/app/api/collections/[id]/content/[contentId]/preview-token/route.js +13 -0
- package/app/api/collections/[id]/content/[contentId]/review/approve/route.d.ts +2 -0
- package/app/api/collections/[id]/content/[contentId]/review/approve/route.js +20 -0
- package/app/api/collections/[id]/content/[contentId]/review/changes/route.d.ts +2 -0
- package/app/api/collections/[id]/content/[contentId]/review/changes/route.js +11 -0
- package/app/api/collections/[id]/content/[contentId]/review/route.d.ts +4 -0
- package/app/api/collections/[id]/content/[contentId]/review/route.js +21 -0
- package/app/api/collections/[id]/content/[contentId]/revisions/[revisionId]/diff/route.d.ts +1 -0
- package/app/api/collections/[id]/content/[contentId]/revisions/[revisionId]/diff/route.js +8 -0
- package/app/api/collections/[id]/content/[contentId]/revisions/[revisionId]/restore/route.d.ts +1 -0
- package/app/api/collections/[id]/content/[contentId]/revisions/[revisionId]/restore/route.js +10 -0
- package/app/api/collections/[id]/content/[contentId]/revisions/[revisionId]/route.d.ts +1 -0
- package/app/api/collections/[id]/content/[contentId]/revisions/[revisionId]/route.js +6 -0
- package/app/api/collections/[id]/content/[contentId]/revisions/route.d.ts +1 -0
- package/app/api/collections/[id]/content/[contentId]/revisions/route.js +12 -0
- package/app/api/collections/[id]/content/[contentId]/route.d.ts +7 -0
- package/app/api/collections/[id]/content/[contentId]/route.js +47 -0
- package/app/api/collections/[id]/content/[contentId]/schedule/route.d.ts +2 -0
- package/app/api/collections/[id]/content/[contentId]/schedule/route.js +19 -0
- package/app/api/collections/[id]/content/[contentId]/translate/route.d.ts +6 -0
- package/app/api/collections/[id]/content/[contentId]/translate/route.js +27 -0
- package/app/api/collections/[id]/content/[contentId]/translations/[locale]/route.d.ts +2 -0
- package/app/api/collections/[id]/content/[contentId]/translations/[locale]/route.js +17 -0
- package/app/api/collections/[id]/content/route.d.ts +2 -0
- package/app/api/collections/[id]/content/route.js +45 -0
- package/app/api/collections/[id]/fields/route.d.ts +1 -0
- package/app/api/collections/[id]/fields/route.js +23 -0
- package/app/api/collections/[id]/import/route.d.ts +9 -0
- package/app/api/collections/[id]/import/route.js +42 -0
- package/app/api/collections/[id]/localization/route.d.ts +4 -0
- package/app/api/collections/[id]/localization/route.js +25 -0
- package/app/api/collections/[id]/records/[recordId]/route.d.ts +3 -0
- package/app/api/collections/[id]/records/[recordId]/route.js +39 -0
- package/app/api/collections/[id]/records/route.d.ts +2 -0
- package/app/api/collections/[id]/records/route.js +31 -0
- package/app/api/collections/[id]/route.d.ts +3 -0
- package/app/api/collections/[id]/route.js +17 -0
- package/app/api/collections/[id]/rules/route.d.ts +1 -0
- package/app/api/collections/[id]/rules/route.js +10 -0
- package/app/api/collections/[id]/scope/route.d.ts +6 -0
- package/app/api/collections/[id]/scope/route.js +15 -0
- package/app/api/collections/[id]/translations/xliff/route.d.ts +4 -0
- package/app/api/collections/[id]/translations/xliff/route.js +41 -0
- package/app/api/collections/[id]/trash/[trashId]/restore/route.d.ts +5 -0
- package/app/api/collections/[id]/trash/[trashId]/restore/route.js +14 -0
- package/app/api/collections/[id]/trash/[trashId]/route.d.ts +2 -0
- package/app/api/collections/[id]/trash/[trashId]/route.js +9 -0
- package/app/api/collections/[id]/view/route.d.ts +1 -0
- package/app/api/collections/[id]/view/route.js +8 -0
- package/app/api/collections/route.d.ts +3 -0
- package/app/api/collections/route.js +31 -0
- package/app/api/collections/views/route.d.ts +1 -0
- package/app/api/collections/views/route.js +16 -0
- package/app/api/ext/[...path]/route.d.ts +5 -0
- package/app/api/ext/[...path]/route.js +10 -0
- package/app/api/extensions/[name]/settings/route.d.ts +2 -0
- package/app/api/extensions/[name]/settings/route.js +25 -0
- package/app/api/extensions/hook-deliveries/[id]/retry/route.d.ts +2 -0
- package/app/api/extensions/hook-deliveries/[id]/retry/route.js +9 -0
- package/app/api/field-presets/[id]/route.d.ts +2 -0
- package/app/api/field-presets/[id]/route.js +18 -0
- package/app/api/field-presets/route.d.ts +2 -0
- package/app/api/field-presets/route.js +14 -0
- package/app/api/field-types/route.d.ts +1 -0
- package/app/api/field-types/route.js +3 -0
- package/app/api/files/[id]/bytes/route.d.ts +9 -0
- package/app/api/files/[id]/bytes/route.js +20 -0
- package/app/api/files/[id]/focus/route.d.ts +1 -0
- package/app/api/files/[id]/focus/route.js +22 -0
- package/app/api/files/[id]/info/route.d.ts +2 -0
- package/app/api/files/[id]/info/route.js +16 -0
- package/app/api/files/[id]/route.d.ts +2 -0
- package/app/api/files/[id]/route.js +25 -0
- package/app/api/files/[id]/text/route.d.ts +2 -0
- package/app/api/files/[id]/text/route.js +49 -0
- package/app/api/files/[id]/token/route.d.ts +2 -0
- package/app/api/files/[id]/token/route.js +15 -0
- package/app/api/files/route.d.ts +1 -0
- package/app/api/files/route.js +12 -0
- package/app/api/files/upload/route.d.ts +2 -0
- package/app/api/files/upload/route.js +14 -0
- package/app/api/health/route.d.ts +9 -0
- package/app/api/health/route.js +11 -0
- package/app/api/locales/route.d.ts +2 -0
- package/app/api/locales/route.js +14 -0
- package/app/api/mcp/route.d.ts +1 -0
- package/app/api/mcp/route.js +6 -0
- package/app/api/me/route.d.ts +1 -0
- package/app/api/me/route.js +8 -0
- package/app/api/metrics/route.d.ts +8 -0
- package/app/api/metrics/route.js +13 -0
- package/app/api/preview/enter/route.d.ts +2 -0
- package/app/api/preview/enter/route.js +20 -0
- package/app/api/preview/exit/route.d.ts +1 -0
- package/app/api/preview/exit/route.js +7 -0
- package/app/api/preview/route.d.ts +2 -0
- package/app/api/preview/route.js +13 -0
- package/app/api/ready/route.d.ts +7 -0
- package/app/api/ready/route.js +15 -0
- package/app/api/realtime/route.d.ts +2 -0
- package/app/api/realtime/route.js +17 -0
- package/app/api/redirects/[id]/route.d.ts +2 -0
- package/app/api/redirects/[id]/route.js +19 -0
- package/app/api/redirects/route.d.ts +2 -0
- package/app/api/redirects/route.js +19 -0
- package/app/api/resolve/route.d.ts +2 -0
- package/app/api/resolve/route.js +17 -0
- package/app/api/reviews/route.d.ts +2 -0
- package/app/api/reviews/route.js +7 -0
- package/app/api/roles/[name]/route.d.ts +2 -0
- package/app/api/roles/[name]/route.js +18 -0
- package/app/api/roles/route.d.ts +2 -0
- package/app/api/roles/route.js +41 -0
- package/app/api/schema/export/route.d.ts +1 -0
- package/app/api/schema/export/route.js +3 -0
- package/app/api/schema/import/route.d.ts +1 -0
- package/app/api/schema/import/route.js +21 -0
- package/app/api/schema/openapi/route.d.ts +1 -0
- package/app/api/schema/openapi/route.js +4 -0
- package/app/api/schema/types/route.d.ts +1 -0
- package/app/api/schema/types/route.js +5 -0
- package/app/api/settings/auth/route.d.ts +2 -0
- package/app/api/settings/auth/route.js +19 -0
- package/app/api/settings/auth/test-email/route.d.ts +1 -0
- package/app/api/settings/auth/test-email/route.js +15 -0
- package/app/api/settings/locales/[code]/route.d.ts +2 -0
- package/app/api/settings/locales/[code]/route.js +15 -0
- package/app/api/settings/locales/route.d.ts +2 -0
- package/app/api/settings/locales/route.js +11 -0
- package/app/api/settings/localization/route.d.ts +1 -0
- package/app/api/settings/localization/route.js +25 -0
- package/app/api/settings/site/route.d.ts +2 -0
- package/app/api/settings/site/route.js +28 -0
- package/app/api/setup/route.d.ts +1 -0
- package/app/api/setup/route.js +10 -0
- package/app/api/translators/route.d.ts +2 -0
- package/app/api/translators/route.js +4 -0
- package/app/api/trash/route.d.ts +6 -0
- package/app/api/trash/route.js +14 -0
- package/app/api/user-fields/route.d.ts +2 -0
- package/app/api/user-fields/route.js +19 -0
- package/app/api/users/[id]/ban/route.d.ts +2 -0
- package/app/api/users/[id]/ban/route.js +25 -0
- package/app/api/users/[id]/fields/route.d.ts +2 -0
- package/app/api/users/[id]/fields/route.js +15 -0
- package/app/api/users/[id]/impersonate/route.d.ts +1 -0
- package/app/api/users/[id]/impersonate/route.js +22 -0
- package/app/api/users/[id]/password/route.d.ts +1 -0
- package/app/api/users/[id]/password/route.js +14 -0
- package/app/api/users/[id]/role/route.d.ts +1 -0
- package/app/api/users/[id]/role/route.js +18 -0
- package/app/api/users/[id]/route.d.ts +3 -0
- package/app/api/users/[id]/route.js +32 -0
- package/app/api/users/[id]/sessions/route.d.ts +2 -0
- package/app/api/users/[id]/sessions/route.js +16 -0
- package/app/api/users/route.d.ts +2 -0
- package/app/api/users/route.js +40 -0
- package/app/api/webhooks/[id]/deliveries/route.d.ts +1 -0
- package/app/api/webhooks/[id]/deliveries/route.js +4 -0
- package/app/api/webhooks/[id]/route.d.ts +2 -0
- package/app/api/webhooks/[id]/route.js +13 -0
- package/app/api/webhooks/route.d.ts +2 -0
- package/app/api/webhooks/route.js +10 -0
- package/app/auth/forgot-password/page.d.ts +1 -0
- package/app/auth/forgot-password/page.js +27 -0
- package/app/auth/reset-password/page.d.ts +6 -0
- package/app/auth/reset-password/page.js +6 -0
- package/app/auth/reset-password/reset-form.d.ts +3 -0
- package/app/auth/reset-password/reset-form.js +22 -0
- package/app/auth/setup/page.d.ts +5 -0
- package/app/auth/setup/page.js +6 -0
- package/app/auth/setup/setup-form.d.ts +3 -0
- package/app/auth/setup/setup-form.js +27 -0
- package/app/auth/signin/page.d.ts +7 -0
- package/app/auth/signin/page.js +6 -0
- package/app/auth/signin/signin-form.d.ts +7 -0
- package/app/auth/signin/signin-form.js +97 -0
- package/app/auth/signup/page.d.ts +1 -0
- package/app/auth/signup/page.js +35 -0
- package/app/auth/two-factor/page.d.ts +5 -0
- package/app/auth/two-factor/page.js +6 -0
- package/app/auth/two-factor/two-factor-form.d.ts +3 -0
- package/app/auth/two-factor/two-factor-form.js +24 -0
- package/app/dashboard/audit/page.client.d.ts +3 -0
- package/app/dashboard/audit/page.client.js +37 -0
- package/app/dashboard/audit/page.d.ts +1 -0
- package/app/dashboard/audit/page.js +8 -0
- package/app/dashboard/blocks/[id]/page.d.ts +5 -0
- package/app/dashboard/blocks/[id]/page.js +18 -0
- package/app/dashboard/blocks/new/page.d.ts +1 -0
- package/app/dashboard/blocks/new/page.js +12 -0
- package/app/dashboard/blocks/page.client.d.ts +10 -0
- package/app/dashboard/blocks/page.client.js +53 -0
- package/app/dashboard/blocks/page.d.ts +1 -0
- package/app/dashboard/blocks/page.js +11 -0
- package/app/dashboard/collections/[id]/content/[contentId]/history/page.client.d.ts +9 -0
- package/app/dashboard/collections/[id]/content/[contentId]/history/page.client.js +80 -0
- package/app/dashboard/collections/[id]/content/[contentId]/history/page.d.ts +6 -0
- package/app/dashboard/collections/[id]/content/[contentId]/history/page.js +12 -0
- package/app/dashboard/collections/[id]/content/[contentId]/page.d.ts +6 -0
- package/app/dashboard/collections/[id]/content/[contentId]/page.js +12 -0
- package/app/dashboard/collections/[id]/content/new/page.d.ts +5 -0
- package/app/dashboard/collections/[id]/content/new/page.js +12 -0
- package/app/dashboard/collections/[id]/import/page.client.d.ts +5 -0
- package/app/dashboard/collections/[id]/import/page.client.js +97 -0
- package/app/dashboard/collections/[id]/import/page.d.ts +6 -0
- package/app/dashboard/collections/[id]/import/page.js +13 -0
- package/app/dashboard/collections/[id]/load.d.ts +7 -0
- package/app/dashboard/collections/[id]/load.js +20 -0
- package/app/dashboard/collections/[id]/page.client.d.ts +22 -0
- package/app/dashboard/collections/[id]/page.client.js +207 -0
- package/app/dashboard/collections/[id]/page.d.ts +5 -0
- package/app/dashboard/collections/[id]/page.js +28 -0
- package/app/dashboard/collections/[id]/rules/page.client.d.ts +3 -0
- package/app/dashboard/collections/[id]/rules/page.client.js +32 -0
- package/app/dashboard/collections/[id]/rules/page.d.ts +5 -0
- package/app/dashboard/collections/[id]/rules/page.js +8 -0
- package/app/dashboard/collections/[id]/schema/page.client.d.ts +5 -0
- package/app/dashboard/collections/[id]/schema/page.client.js +129 -0
- package/app/dashboard/collections/[id]/schema/page.d.ts +5 -0
- package/app/dashboard/collections/[id]/schema/page.js +13 -0
- package/app/dashboard/collections/[id]/view/page.d.ts +5 -0
- package/app/dashboard/collections/[id]/view/page.js +13 -0
- package/app/dashboard/collections/create/page.client.d.ts +3 -0
- package/app/dashboard/collections/create/page.client.js +47 -0
- package/app/dashboard/collections/create/page.d.ts +1 -0
- package/app/dashboard/collections/create/page.js +8 -0
- package/app/dashboard/collections/create-view/page.d.ts +1 -0
- package/app/dashboard/collections/create-view/page.js +8 -0
- package/app/dashboard/collections/page.client.d.ts +13 -0
- package/app/dashboard/collections/page.client.js +84 -0
- package/app/dashboard/collections/page.d.ts +1 -0
- package/app/dashboard/collections/page.js +10 -0
- package/app/dashboard/ext/[...path]/page.client.d.ts +5 -0
- package/app/dashboard/ext/[...path]/page.client.js +6 -0
- package/app/dashboard/ext/[...path]/page.d.ts +5 -0
- package/app/dashboard/ext/[...path]/page.js +23 -0
- package/app/dashboard/extensions/[name]/settings/page.client.d.ts +16 -0
- package/app/dashboard/extensions/[name]/settings/page.client.js +179 -0
- package/app/dashboard/extensions/[name]/settings/page.d.ts +5 -0
- package/app/dashboard/extensions/[name]/settings/page.js +30 -0
- package/app/dashboard/extensions/directory/page.d.ts +1 -0
- package/app/dashboard/extensions/directory/page.js +14 -0
- package/app/dashboard/extensions/page.client.d.ts +4 -0
- package/app/dashboard/extensions/page.client.js +29 -0
- package/app/dashboard/extensions/page.d.ts +1 -0
- package/app/dashboard/extensions/page.js +59 -0
- package/app/dashboard/field-presets/page.client.d.ts +15 -0
- package/app/dashboard/field-presets/page.client.js +54 -0
- package/app/dashboard/field-presets/page.d.ts +1 -0
- package/app/dashboard/field-presets/page.js +13 -0
- package/app/dashboard/files/page.client.d.ts +10 -0
- package/app/dashboard/files/page.client.js +74 -0
- package/app/dashboard/files/page.d.ts +1 -0
- package/app/dashboard/files/page.js +13 -0
- package/app/dashboard/languages/page.client.d.ts +4 -0
- package/app/dashboard/languages/page.client.js +132 -0
- package/app/dashboard/languages/page.d.ts +1 -0
- package/app/dashboard/languages/page.js +8 -0
- package/app/dashboard/layout.d.ts +4 -0
- package/app/dashboard/layout.js +47 -0
- package/app/dashboard/page.client.d.ts +5 -0
- package/app/dashboard/page.client.js +6 -0
- package/app/dashboard/page.d.ts +1 -0
- package/app/dashboard/page.js +65 -0
- package/app/dashboard/redirects/page.client.d.ts +3 -0
- package/app/dashboard/redirects/page.client.js +62 -0
- package/app/dashboard/redirects/page.d.ts +1 -0
- package/app/dashboard/redirects/page.js +8 -0
- package/app/dashboard/reviews/page.client.d.ts +2 -0
- package/app/dashboard/reviews/page.client.js +27 -0
- package/app/dashboard/reviews/page.d.ts +1 -0
- package/app/dashboard/reviews/page.js +8 -0
- package/app/dashboard/roles/page.client.d.ts +5 -0
- package/app/dashboard/roles/page.client.js +122 -0
- package/app/dashboard/roles/page.d.ts +1 -0
- package/app/dashboard/roles/page.js +12 -0
- package/app/dashboard/schema/page.client.d.ts +3 -0
- package/app/dashboard/schema/page.client.js +43 -0
- package/app/dashboard/schema/page.d.ts +1 -0
- package/app/dashboard/schema/page.js +8 -0
- package/app/dashboard/settings/page.client.d.ts +3 -0
- package/app/dashboard/settings/page.client.js +110 -0
- package/app/dashboard/settings/page.d.ts +1 -0
- package/app/dashboard/settings/page.js +8 -0
- package/app/dashboard/site/page.client.d.ts +14 -0
- package/app/dashboard/site/page.client.js +35 -0
- package/app/dashboard/site/page.d.ts +2 -0
- package/app/dashboard/site/page.js +24 -0
- package/app/dashboard/trash/page.client.d.ts +1 -0
- package/app/dashboard/trash/page.client.js +59 -0
- package/app/dashboard/trash/page.d.ts +2 -0
- package/app/dashboard/trash/page.js +9 -0
- package/app/dashboard/users/[id]/page.client.d.ts +5 -0
- package/app/dashboard/users/[id]/page.client.js +47 -0
- package/app/dashboard/users/[id]/page.d.ts +5 -0
- package/app/dashboard/users/[id]/page.js +9 -0
- package/app/dashboard/users/fields/page.client.d.ts +12 -0
- package/app/dashboard/users/fields/page.client.js +50 -0
- package/app/dashboard/users/fields/page.d.ts +1 -0
- package/app/dashboard/users/fields/page.js +10 -0
- package/app/dashboard/users/page.client.d.ts +58 -0
- package/app/dashboard/users/page.client.js +41 -0
- package/app/dashboard/users/page.d.ts +1 -0
- package/app/dashboard/users/page.js +8 -0
- package/app/dashboard/webhooks/page.client.d.ts +12 -0
- package/app/dashboard/webhooks/page.client.js +75 -0
- package/app/dashboard/webhooks/page.d.ts +1 -0
- package/app/dashboard/webhooks/page.js +10 -0
- package/app/fonts/GeistMonoVF.woff +0 -0
- package/app/fonts/GeistVF.woff +0 -0
- package/app/landing.d.ts +1 -0
- package/app/landing.js +5 -0
- package/app/layout.d.ts +6 -0
- package/app/layout.js +30 -0
- package/components/LabelsInput.d.ts +13 -0
- package/components/LabelsInput.js +19 -0
- package/components/PluginBoundary.d.ts +18 -0
- package/components/PluginBoundary.js +37 -0
- package/components/admin-client.d.ts +65 -0
- package/components/admin-client.js +101 -0
- package/components/auth/AuthCard.d.ts +13 -0
- package/components/auth/AuthCard.js +18 -0
- package/components/auth/AuthConfig.d.ts +29 -0
- package/components/auth/AuthConfig.js +14 -0
- package/components/auth/useAuthWidgets.d.ts +17 -0
- package/components/auth/useAuthWidgets.js +21 -0
- package/components/blocks/BlockTypeForm.d.ts +11 -0
- package/components/blocks/BlockTypeForm.js +50 -0
- package/components/blocks/block-icons.d.ts +6 -0
- package/components/blocks/block-icons.js +22 -0
- package/components/captcha/CaptchaWidget.d.ts +14 -0
- package/components/captcha/CaptchaWidget.js +67 -0
- package/components/collections/CollectionGrid.d.ts +20 -0
- package/components/collections/CollectionGrid.js +24 -0
- package/components/collections/FilterBuilder.d.ts +32 -0
- package/components/collections/FilterBuilder.js +150 -0
- package/components/collections/LanguagePanel.d.ts +33 -0
- package/components/collections/LanguagePanel.js +56 -0
- package/components/collections/RecordForm.d.ts +17 -0
- package/components/collections/RecordForm.js +490 -0
- package/components/collections/ReviewCard.d.ts +6 -0
- package/components/collections/ReviewCard.js +32 -0
- package/components/collections/ReviewPanel.d.ts +21 -0
- package/components/collections/ReviewPanel.js +45 -0
- package/components/collections/TranslationExchange.d.ts +16 -0
- package/components/collections/TranslationExchange.js +43 -0
- package/components/collections/ViewForm.d.ts +11 -0
- package/components/collections/ViewForm.js +38 -0
- package/components/fields/DescribeFile.d.ts +23 -0
- package/components/fields/DescribeFile.js +106 -0
- package/components/fields/FieldConfigEditor.d.ts +24 -0
- package/components/fields/FieldConfigEditor.js +113 -0
- package/components/fields/FieldListEditor.d.ts +20 -0
- package/components/fields/FieldListEditor.js +33 -0
- package/components/fields/FieldValueInput.d.ts +23 -0
- package/components/fields/FieldValueInput.js +101 -0
- package/components/fields/FileValueInput.d.ts +9 -0
- package/components/fields/FileValueInput.js +78 -0
- package/components/fields/FocusPicker.d.ts +15 -0
- package/components/fields/FocusPicker.js +24 -0
- package/components/fields/ReferencePicker.d.ts +12 -0
- package/components/fields/ReferencePicker.js +59 -0
- package/components/fields/RichTextEditor.d.ts +13 -0
- package/components/fields/RichTextEditor.js +116 -0
- package/components/fields/icons.d.ts +3 -0
- package/components/fields/icons.js +21 -0
- package/components/fields/show-if.d.ts +2 -0
- package/components/fields/show-if.js +10 -0
- package/components/fields/types.d.ts +102 -0
- package/components/fields/types.js +15 -0
- package/components/i18n.d.ts +98 -0
- package/components/i18n.js +109 -0
- package/components/shell/AppShell.d.ts +28 -0
- package/components/shell/AppShell.js +109 -0
- package/components/shell/DashboardLoading.d.ts +8 -0
- package/components/shell/DashboardLoading.js +25 -0
- package/components/shell/TopBarSwitcher.d.ts +9 -0
- package/components/shell/TopBarSwitcher.js +53 -0
- package/components/site/AdminBar.d.ts +5 -0
- package/components/site/AdminBar.js +14 -0
- package/components/site/Pager.d.ts +18 -0
- package/components/site/Pager.js +18 -0
- package/components/site/ThemedPage.d.ts +16 -0
- package/components/site/ThemedPage.js +28 -0
- package/components/stream/Inserter.d.ts +14 -0
- package/components/stream/Inserter.js +115 -0
- package/components/stream/Menu.d.ts +10 -0
- package/components/stream/Menu.js +15 -0
- package/components/stream/Outline.d.ts +12 -0
- package/components/stream/Outline.js +26 -0
- package/components/stream/SaveLayout.d.ts +7 -0
- package/components/stream/SaveLayout.js +34 -0
- package/components/stream/StreamEditor.d.ts +16 -0
- package/components/stream/StreamEditor.js +389 -0
- package/components/stream/StreamField.d.ts +93 -0
- package/components/stream/StreamField.js +119 -0
- package/components/stream/editor-context.d.ts +24 -0
- package/components/stream/editor-context.js +66 -0
- package/components/stream/embed.d.ts +8 -0
- package/components/stream/embed.js +45 -0
- package/components/stream/site-canvas.d.ts +46 -0
- package/components/stream/site-canvas.js +76 -0
- package/components/stream/stream-ops.d.ts +47 -0
- package/components/stream/stream-ops.js +111 -0
- package/components/ui/Switch.d.ts +8 -0
- package/components/ui/Switch.js +6 -0
- package/components/ui/kit.d.ts +231 -0
- package/components/ui/kit.js +168 -0
- package/components/ui/row-link.d.ts +7 -0
- package/components/ui/row-link.js +24 -0
- package/components/users/UserFieldsForm.d.ts +20 -0
- package/components/users/UserFieldsForm.js +43 -0
- package/core/audit/fold.d.ts +18 -0
- package/core/audit/fold.js +33 -0
- package/core/audit/index.d.ts +26 -0
- package/core/audit/index.js +79 -0
- package/core/audit/query.d.ts +28 -0
- package/core/audit/query.js +21 -0
- package/core/auth/access.d.ts +33 -0
- package/core/auth/access.js +35 -0
- package/core/auth/branding.d.ts +17 -0
- package/core/auth/branding.js +30 -0
- package/core/auth/extension-hooks.d.ts +26 -0
- package/core/auth/extension-hooks.js +78 -0
- package/core/auth/extensions.d.ts +138 -0
- package/core/auth/extensions.js +1 -0
- package/core/auth/instance.d.ts +4188 -0
- package/core/auth/instance.js +387 -0
- package/core/auth/lockout.d.ts +10 -0
- package/core/auth/lockout.js +34 -0
- package/core/auth/maintenance.d.ts +2 -0
- package/core/auth/maintenance.js +16 -0
- package/core/auth/plugin-adapter.d.ts +59 -0
- package/core/auth/plugin-adapter.js +469 -0
- package/core/auth/plugin-models.d.ts +57 -0
- package/core/auth/plugin-models.js +124 -0
- package/core/auth/public-config.d.ts +36 -0
- package/core/auth/public-config.js +30 -0
- package/core/auth/secrets.d.ts +3 -0
- package/core/auth/secrets.js +23 -0
- package/core/auth/server-only-paths.d.ts +11 -0
- package/core/auth/server-only-paths.js +16 -0
- package/core/auth/settings-schema.d.ts +116 -0
- package/core/auth/settings-schema.js +135 -0
- package/core/auth/settings.d.ts +21 -0
- package/core/auth/settings.js +98 -0
- package/core/auth/setup.d.ts +30 -0
- package/core/auth/setup.js +73 -0
- package/core/auth/shared-accounts.d.ts +18 -0
- package/core/auth/shared-accounts.js +38 -0
- package/core/auth/user-fields.d.ts +96 -0
- package/core/auth/user-fields.js +217 -0
- package/core/auth/users.d.ts +25 -0
- package/core/auth/users.js +46 -0
- package/core/authz/guard.d.ts +96 -0
- package/core/authz/guard.js +247 -0
- package/core/authz/page.d.ts +23 -0
- package/core/authz/page.js +87 -0
- package/core/authz/permissions.d.ts +81 -0
- package/core/authz/permissions.js +145 -0
- package/core/authz/principal.d.ts +70 -0
- package/core/authz/principal.js +87 -0
- package/core/authz/records.d.ts +67 -0
- package/core/authz/records.js +186 -0
- package/core/authz/role-admin.d.ts +61 -0
- package/core/authz/role-admin.js +194 -0
- package/core/authz/roles.d.ts +23 -0
- package/core/authz/roles.js +93 -0
- package/core/authz/rules/evaluate.d.ts +89 -0
- package/core/authz/rules/evaluate.js +350 -0
- package/core/authz/rules/parser.d.ts +28 -0
- package/core/authz/rules/parser.js +144 -0
- package/core/authz/rules/postgres.d.ts +18 -0
- package/core/authz/rules/postgres.js +143 -0
- package/core/authz/rules/sql.d.ts +55 -0
- package/core/authz/rules/sql.js +153 -0
- package/core/background/after-response.d.ts +11 -0
- package/core/background/after-response.js +26 -0
- package/core/background/endpoint.d.ts +8 -0
- package/core/background/endpoint.js +28 -0
- package/core/background/mode.d.ts +15 -0
- package/core/background/mode.js +16 -0
- package/core/background/runner.d.ts +38 -0
- package/core/background/runner.js +126 -0
- package/core/backup/archive.d.ts +22 -0
- package/core/backup/archive.js +163 -0
- package/core/backup/cli.d.ts +30 -0
- package/core/backup/cli.js +198 -0
- package/core/backup/config.d.ts +28 -0
- package/core/backup/config.js +30 -0
- package/core/backup/crypto.d.ts +26 -0
- package/core/backup/crypto.js +158 -0
- package/core/backup/database.d.ts +57 -0
- package/core/backup/database.js +253 -0
- package/core/backup/job.d.ts +16 -0
- package/core/backup/job.js +60 -0
- package/core/backup/service.d.ts +137 -0
- package/core/backup/service.js +386 -0
- package/core/blocks/layouts.d.ts +22 -0
- package/core/blocks/layouts.js +27 -0
- package/core/blocks/limits.d.ts +8 -0
- package/core/blocks/limits.js +2 -0
- package/core/blocks/service.d.ts +115 -0
- package/core/blocks/service.js +231 -0
- package/core/blocks/stream.d.ts +59 -0
- package/core/blocks/stream.js +220 -0
- package/core/captcha/index.d.ts +30 -0
- package/core/captcha/index.js +110 -0
- package/core/captcha/types.d.ts +46 -0
- package/core/captcha/types.js +1 -0
- package/core/config/index.d.ts +20 -0
- package/core/config/index.js +30 -0
- package/core/content/access.d.ts +99 -0
- package/core/content/access.js +24 -0
- package/core/content/batch.d.ts +19 -0
- package/core/content/batch.js +132 -0
- package/core/content/chunks.d.ts +2 -0
- package/core/content/chunks.js +8 -0
- package/core/content/collections.d.ts +199 -0
- package/core/content/collections.js +52 -0
- package/core/content/content-service.d.ts +152 -0
- package/core/content/content-service.js +1077 -0
- package/core/content/csv.d.ts +24 -0
- package/core/content/csv.js +132 -0
- package/core/content/db.d.ts +10 -0
- package/core/content/db.js +74 -0
- package/core/content/diff.d.ts +40 -0
- package/core/content/diff.js +65 -0
- package/core/content/flat.d.ts +20 -0
- package/core/content/flat.js +37 -0
- package/core/content/ids.d.ts +1 -0
- package/core/content/ids.js +7 -0
- package/core/content/import.d.ts +108 -0
- package/core/content/import.js +263 -0
- package/core/content/locks.d.ts +39 -0
- package/core/content/locks.js +66 -0
- package/core/content/overview.d.ts +54 -0
- package/core/content/overview.js +136 -0
- package/core/content/public-records.d.ts +51 -0
- package/core/content/public-records.js +364 -0
- package/core/content/query.d.ts +61 -0
- package/core/content/query.js +103 -0
- package/core/content/records.d.ts +69 -0
- package/core/content/records.js +62 -0
- package/core/content/relations.d.ts +56 -0
- package/core/content/relations.js +177 -0
- package/core/content/reviews.d.ts +70 -0
- package/core/content/reviews.js +141 -0
- package/core/content/revision-store.d.ts +16 -0
- package/core/content/revision-store.js +27 -0
- package/core/content/revisions.d.ts +155 -0
- package/core/content/revisions.js +194 -0
- package/core/content/rule-lookup.d.ts +9 -0
- package/core/content/rule-lookup.js +48 -0
- package/core/content/scheduler.d.ts +3 -0
- package/core/content/scheduler.js +73 -0
- package/core/content/trash.d.ts +159 -0
- package/core/content/trash.js +144 -0
- package/core/content/workflow.d.ts +25 -0
- package/core/content/workflow.js +22 -0
- package/core/extend/admin-nav.d.ts +51 -0
- package/core/extend/admin-nav.js +109 -0
- package/core/extend/admin-paths.d.ts +8 -0
- package/core/extend/admin-paths.js +35 -0
- package/core/extend/admin.d.ts +404 -0
- package/core/extend/admin.js +3 -0
- package/core/extend/auth-call.d.ts +5 -0
- package/core/extend/auth-call.js +73 -0
- package/core/extend/cron.d.ts +27 -0
- package/core/extend/cron.js +56 -0
- package/core/extend/csp.d.ts +19 -0
- package/core/extend/csp.js +27 -0
- package/core/extend/define.d.ts +936 -0
- package/core/extend/define.js +13 -0
- package/core/extend/directory.d.ts +18 -0
- package/core/extend/directory.js +44 -0
- package/core/extend/events.d.ts +7 -0
- package/core/extend/events.js +22 -0
- package/core/extend/hook-deliveries.d.ts +38 -0
- package/core/extend/hook-deliveries.js +117 -0
- package/core/extend/hooks.d.ts +32 -0
- package/core/extend/hooks.js +89 -0
- package/core/extend/jobs.d.ts +30 -0
- package/core/extend/jobs.js +131 -0
- package/core/extend/lifecycle.d.ts +14 -0
- package/core/extend/lifecycle.js +116 -0
- package/core/extend/loader.d.ts +11 -0
- package/core/extend/loader.js +85 -0
- package/core/extend/mail.d.ts +9 -0
- package/core/extend/mail.js +94 -0
- package/core/extend/manifest.d.ts +14 -0
- package/core/extend/manifest.js +177 -0
- package/core/extend/mcp.d.ts +25 -0
- package/core/extend/mcp.js +51 -0
- package/core/extend/records.d.ts +9 -0
- package/core/extend/records.js +125 -0
- package/core/extend/registry.d.ts +51 -0
- package/core/extend/registry.js +132 -0
- package/core/extend/requests.d.ts +4 -0
- package/core/extend/requests.js +27 -0
- package/core/extend/routes.d.ts +3 -0
- package/core/extend/routes.js +55 -0
- package/core/extend/routing.d.ts +12 -0
- package/core/extend/routing.js +33 -0
- package/core/extend/safe-http.d.ts +17 -0
- package/core/extend/safe-http.js +72 -0
- package/core/extend/schema.d.ts +10 -0
- package/core/extend/schema.js +40 -0
- package/core/extend/semver.d.ts +5 -0
- package/core/extend/semver.js +46 -0
- package/core/extend/settings-schema.d.ts +10 -0
- package/core/extend/settings-schema.js +73 -0
- package/core/extend/settings.d.ts +29 -0
- package/core/extend/settings.js +149 -0
- package/core/extend/start.d.ts +3 -0
- package/core/extend/start.js +86 -0
- package/core/extend/store.d.ts +10 -0
- package/core/extend/store.js +79 -0
- package/core/extend/system-collections.d.ts +7 -0
- package/core/extend/system-collections.js +18 -0
- package/core/extend/tools.d.ts +24 -0
- package/core/extend/tools.js +295 -0
- package/core/extend/users.d.ts +10 -0
- package/core/extend/users.js +44 -0
- package/core/extend/webhook-input.d.ts +12 -0
- package/core/extend/webhook-input.js +8 -0
- package/core/extend/webhooks.d.ts +65 -0
- package/core/extend/webhooks.js +134 -0
- package/core/fields/builtin.d.ts +9 -0
- package/core/fields/builtin.js +335 -0
- package/core/fields/define.d.ts +111 -0
- package/core/fields/define.js +79 -0
- package/core/fields/markdown.d.ts +9 -0
- package/core/fields/markdown.js +127 -0
- package/core/fields/presets.d.ts +47 -0
- package/core/fields/presets.js +34 -0
- package/core/fields/registry.d.ts +74 -0
- package/core/fields/registry.js +172 -0
- package/core/fields/rich-text.d.ts +20 -0
- package/core/fields/rich-text.js +83 -0
- package/core/fields/safe-pattern.d.ts +8 -0
- package/core/fields/safe-pattern.js +80 -0
- package/core/fields/test-kit.d.ts +24 -0
- package/core/fields/test-kit.js +79 -0
- package/core/fields/upgrades.d.ts +5 -0
- package/core/fields/upgrades.js +99 -0
- package/core/fields/validate.d.ts +14 -0
- package/core/fields/validate.js +65 -0
- package/core/files/cleanup.d.ts +3 -0
- package/core/files/cleanup.js +39 -0
- package/core/files/focus.d.ts +42 -0
- package/core/files/focus.js +42 -0
- package/core/files/http.d.ts +7 -0
- package/core/files/http.js +29 -0
- package/core/files/refs.d.ts +19 -0
- package/core/files/refs.js +129 -0
- package/core/files/service.d.ts +197 -0
- package/core/files/service.js +446 -0
- package/core/files/sniff.d.ts +12 -0
- package/core/files/sniff.js +98 -0
- package/core/files/text.d.ts +45 -0
- package/core/files/text.js +94 -0
- package/core/files/tokens.d.ts +7 -0
- package/core/files/tokens.js +24 -0
- package/core/http/cors.d.ts +17 -0
- package/core/http/cors.js +59 -0
- package/core/http/errors.d.ts +21 -0
- package/core/http/errors.js +29 -0
- package/core/http/plain.d.ts +2 -0
- package/core/http/plain.js +2 -0
- package/core/http/plugin-origins.d.ts +7 -0
- package/core/http/plugin-origins.js +62 -0
- package/core/http/rate-limit.d.ts +3 -0
- package/core/http/rate-limit.js +23 -0
- package/core/http/read-limit.d.ts +6 -0
- package/core/http/read-limit.js +25 -0
- package/core/http/request.d.ts +13 -0
- package/core/http/request.js +47 -0
- package/core/i18n/admin.d.ts +60 -0
- package/core/i18n/admin.js +100 -0
- package/core/i18n/catalogs/ar.d.ts +3 -0
- package/core/i18n/catalogs/ar.js +1473 -0
- package/core/i18n/catalogs/en.d.ts +1631 -0
- package/core/i18n/catalogs/en.js +1476 -0
- package/core/i18n/catalogs/index.d.ts +7 -0
- package/core/i18n/catalogs/index.js +8 -0
- package/core/i18n/codes.d.ts +27 -0
- package/core/i18n/codes.js +121 -0
- package/core/i18n/context.d.ts +77 -0
- package/core/i18n/context.js +16 -0
- package/core/i18n/editor.d.ts +12 -0
- package/core/i18n/editor.js +44 -0
- package/core/i18n/exchange.d.ts +35 -0
- package/core/i18n/exchange.js +132 -0
- package/core/i18n/labels-schema.d.ts +3 -0
- package/core/i18n/labels-schema.js +4 -0
- package/core/i18n/labels.d.ts +14 -0
- package/core/i18n/labels.js +15 -0
- package/core/i18n/locales.d.ts +97 -0
- package/core/i18n/locales.js +222 -0
- package/core/i18n/messages.d.ts +41 -0
- package/core/i18n/messages.js +109 -0
- package/core/i18n/outdated.d.ts +14 -0
- package/core/i18n/outdated.js +33 -0
- package/core/i18n/permissions.d.ts +17 -0
- package/core/i18n/permissions.js +34 -0
- package/core/i18n/request.d.ts +47 -0
- package/core/i18n/request.js +67 -0
- package/core/i18n/routing.d.ts +27 -0
- package/core/i18n/routing.js +37 -0
- package/core/i18n/segments.d.ts +44 -0
- package/core/i18n/segments.js +88 -0
- package/core/i18n/startup.d.ts +9 -0
- package/core/i18n/startup.js +36 -0
- package/core/i18n/storage.d.ts +92 -0
- package/core/i18n/storage.js +186 -0
- package/core/i18n/synced.d.ts +19 -0
- package/core/i18n/synced.js +39 -0
- package/core/i18n/translate.d.ts +22 -0
- package/core/i18n/translate.js +51 -0
- package/core/i18n/xliff.d.ts +32 -0
- package/core/i18n/xliff.js +77 -0
- package/core/mail/index.d.ts +95 -0
- package/core/mail/index.js +162 -0
- package/core/mail/rich.d.ts +6 -0
- package/core/mail/rich.js +105 -0
- package/core/ops/health.d.ts +28 -0
- package/core/ops/health.js +45 -0
- package/core/ops/metrics.d.ts +9 -0
- package/core/ops/metrics.js +108 -0
- package/core/realtime/clients.d.ts +8 -0
- package/core/realtime/clients.js +254 -0
- package/core/realtime/hub.d.ts +26 -0
- package/core/realtime/hub.js +22 -0
- package/core/schema/ddl.d.ts +68 -0
- package/core/schema/ddl.js +237 -0
- package/core/schema/describe.d.ts +52 -0
- package/core/schema/describe.js +175 -0
- package/core/schema/diff.d.ts +51 -0
- package/core/schema/diff.js +108 -0
- package/core/schema/names.d.ts +7 -0
- package/core/schema/names.js +21 -0
- package/core/schema/portable.d.ts +129 -0
- package/core/schema/portable.js +428 -0
- package/core/schema/service.d.ts +268 -0
- package/core/schema/service.js +608 -0
- package/core/schema/views-postgres.d.ts +18 -0
- package/core/schema/views-postgres.js +134 -0
- package/core/schema/views.d.ts +19 -0
- package/core/schema/views.js +70 -0
- package/core/scope/context.d.ts +75 -0
- package/core/scope/context.js +79 -0
- package/core/scope/data.d.ts +43 -0
- package/core/scope/data.js +468 -0
- package/core/scope/label.d.ts +7 -0
- package/core/scope/label.js +11 -0
- package/core/scope/limits.d.ts +23 -0
- package/core/scope/limits.js +72 -0
- package/core/scope/plugin.d.ts +28 -0
- package/core/scope/plugin.js +156 -0
- package/core/scope/provider.d.ts +111 -0
- package/core/scope/provider.js +188 -0
- package/core/scope/registry.d.ts +12 -0
- package/core/scope/registry.js +26 -0
- package/core/scope/request.d.ts +19 -0
- package/core/scope/request.js +62 -0
- package/core/scope/site.d.ts +19 -0
- package/core/scope/site.js +32 -0
- package/core/search/engine.d.ts +45 -0
- package/core/search/engine.js +97 -0
- package/core/search/extract.d.ts +20 -0
- package/core/search/extract.js +34 -0
- package/core/search/index.d.ts +35 -0
- package/core/search/index.js +202 -0
- package/core/search/sync.d.ts +17 -0
- package/core/search/sync.js +145 -0
- package/core/search/types.d.ts +49 -0
- package/core/search/types.js +1 -0
- package/core/settings/scoped.d.ts +13 -0
- package/core/settings/scoped.js +35 -0
- package/core/site/admin-bar.d.ts +22 -0
- package/core/site/admin-bar.js +34 -0
- package/core/site/cache.d.ts +20 -0
- package/core/site/cache.js +103 -0
- package/core/site/filter.d.ts +10 -0
- package/core/site/filter.js +93 -0
- package/core/site/identity.d.ts +45 -0
- package/core/site/identity.js +86 -0
- package/core/site/page.d.ts +148 -0
- package/core/site/page.js +215 -0
- package/core/site/preview.d.ts +32 -0
- package/core/site/preview.js +83 -0
- package/core/site/reader.d.ts +16 -0
- package/core/site/reader.js +142 -0
- package/core/site/words.d.ts +60 -0
- package/core/site/words.js +86 -0
- package/core/storage/index.d.ts +10 -0
- package/core/storage/index.js +50 -0
- package/core/storage/local.d.ts +9 -0
- package/core/storage/local.js +78 -0
- package/core/storage/remote.d.ts +23 -0
- package/core/storage/remote.js +58 -0
- package/core/storage/s3.d.ts +21 -0
- package/core/storage/s3.js +108 -0
- package/core/storage/types.d.ts +82 -0
- package/core/storage/types.js +1 -0
- package/core/theme/define.d.ts +209 -0
- package/core/theme/define.js +84 -0
- package/core/theme/installed.d.ts +18 -0
- package/core/theme/installed.js +32 -0
- package/core/theme/schema.d.ts +11 -0
- package/core/theme/schema.js +25 -0
- package/core/theme/tokens.d.ts +23 -0
- package/core/theme/tokens.js +68 -0
- package/core/ui/preferences.d.ts +3 -0
- package/core/ui/preferences.js +7 -0
- package/core/urls/base-path.d.ts +28 -0
- package/core/urls/base-path.js +54 -0
- package/core/urls/path.d.ts +12 -0
- package/core/urls/path.js +47 -0
- package/core/urls/pattern.d.ts +23 -0
- package/core/urls/pattern.js +124 -0
- package/core/urls/redirects.d.ts +50 -0
- package/core/urls/redirects.js +85 -0
- package/core/urls/resolve.d.ts +33 -0
- package/core/urls/resolve.js +133 -0
- package/core/urls/site-href.d.ts +13 -0
- package/core/urls/site-href.js +13 -0
- package/core/version.d.ts +2 -0
- package/core/version.js +2 -0
- package/entry/admin.d.ts +6 -0
- package/entry/admin.js +5 -0
- package/entry/config.d.ts +3 -0
- package/entry/config.js +3 -0
- package/entry/fields.d.ts +2 -0
- package/entry/fields.js +2 -0
- package/entry/headless.d.ts +20 -0
- package/entry/headless.js +27 -0
- package/entry/next.d.mts +5 -0
- package/entry/next.mjs +84 -0
- package/entry/plugin.d.ts +26 -0
- package/entry/plugin.js +11 -0
- package/entry/react.d.ts +9 -0
- package/entry/react.js +8 -0
- package/entry/search.d.ts +3 -0
- package/entry/search.js +1 -0
- package/entry/server.d.ts +6 -0
- package/entry/server.js +5 -0
- package/entry/storage.d.ts +6 -0
- package/entry/storage.js +3 -0
- package/entry/testing.d.ts +1 -0
- package/entry/testing.js +1 -0
- package/entry/theme.d.ts +3 -0
- package/entry/theme.js +2 -0
- package/generated/client-postgres/client.d.ts +1 -0
- package/generated/client-postgres/client.js +5 -0
- package/generated/client-postgres/default.d.ts +1 -0
- package/generated/client-postgres/default.js +5 -0
- package/generated/client-postgres/edge.d.ts +1 -0
- package/generated/client-postgres/edge.js +644 -0
- package/generated/client-postgres/index-browser.js +670 -0
- package/generated/client-postgres/index.d.ts +61076 -0
- package/generated/client-postgres/index.js +644 -0
- package/generated/client-postgres/package.json +139 -0
- package/generated/client-postgres/query_compiler_fast_bg.js +2 -0
- package/generated/client-postgres/query_compiler_fast_bg.wasm +0 -0
- package/generated/client-postgres/query_compiler_fast_bg.wasm-base64.js +2 -0
- package/generated/client-postgres/runtime/client.d.ts +3490 -0
- package/generated/client-postgres/runtime/client.js +105 -0
- package/generated/client-postgres/runtime/index-browser.d.ts +90 -0
- package/generated/client-postgres/runtime/index-browser.js +6 -0
- package/generated/client-postgres/runtime/wasm-compiler-edge.js +100 -0
- package/generated/client-postgres/schema.prisma +661 -0
- package/generated/client-postgres/wasm-edge-light-loader.mjs +5 -0
- package/generated/client-postgres/wasm-worker-loader.mjs +5 -0
- package/generated/client-sqlite/client.d.ts +1 -0
- package/generated/client-sqlite/client.js +5 -0
- package/generated/client-sqlite/default.d.ts +1 -0
- package/generated/client-sqlite/default.js +5 -0
- package/generated/client-sqlite/edge.d.ts +1 -0
- package/generated/client-sqlite/edge.js +641 -0
- package/generated/client-sqlite/index-browser.js +667 -0
- package/generated/client-sqlite/index.d.ts +60911 -0
- package/generated/client-sqlite/index.js +641 -0
- package/generated/client-sqlite/package.json +139 -0
- package/generated/client-sqlite/query_compiler_fast_bg.js +2 -0
- package/generated/client-sqlite/query_compiler_fast_bg.wasm +0 -0
- package/generated/client-sqlite/query_compiler_fast_bg.wasm-base64.js +2 -0
- package/generated/client-sqlite/runtime/client.d.ts +3490 -0
- package/generated/client-sqlite/runtime/client.js +105 -0
- package/generated/client-sqlite/runtime/index-browser.d.ts +90 -0
- package/generated/client-sqlite/runtime/index-browser.js +6 -0
- package/generated/client-sqlite/runtime/wasm-compiler-edge.js +100 -0
- package/generated/client-sqlite/schema.prisma +661 -0
- package/generated/client-sqlite/wasm-edge-light-loader.mjs +5 -0
- package/generated/client-sqlite/wasm-worker-loader.mjs +5 -0
- package/generated/schema-postgres/collection.prisma +316 -0
- package/generated/schema-postgres/extend.prisma +101 -0
- package/generated/schema-postgres/schema.prisma +8 -0
- package/generated/schema-postgres/security.prisma +64 -0
- package/generated/schema-postgres/user.prisma +168 -0
- package/lib/argon2/index.d.ts +2 -0
- package/lib/argon2/index.js +5 -0
- package/lib/auth-client.d.ts +1788 -0
- package/lib/auth-client.js +26 -0
- package/lib/client/api.d.ts +58 -0
- package/lib/client/api.js +106 -0
- package/lib/client/realtime.d.ts +2 -0
- package/lib/client/realtime.js +20 -0
- package/lib/paths.d.ts +8 -0
- package/lib/paths.js +17 -0
- package/lib/preferences.d.ts +2 -0
- package/lib/preferences.js +2 -0
- package/lib/prisma/index.d.ts +5 -0
- package/lib/prisma/index.js +19 -0
- package/lib/prisma/kind.d.ts +4 -0
- package/lib/prisma/kind.js +3 -0
- package/lib/slugify/index.d.ts +2 -0
- package/lib/slugify/index.js +3 -0
- package/lib/time.d.ts +2 -0
- package/lib/time.js +28 -0
- package/lib/utils.d.ts +1 -0
- package/lib/utils.js +1 -0
- package/package.json +153 -4
- package/prisma/migrations/20261109000000_baseline/migration.sql +275 -0
- package/prisma/migrations/20261109024631_add_block_types/migration.sql +37 -0
- package/prisma/migrations/20261109032318_add_files/migration.sql +37 -0
- package/prisma/migrations/20261109034155_add_revisions/migration.sql +36 -0
- package/prisma/migrations/20261109035535_add_view_collections/migration.sql +3 -0
- package/prisma/migrations/20261109041354_add_user_fields/migration.sql +21 -0
- package/prisma/migrations/20261109044425_add_extensibility/migration.sql +44 -0
- package/prisma/migrations/20261109055558_add_request_logs/migration.sql +18 -0
- package/prisma/migrations/20261109143022_add_file_temporary/migration.sql +22 -0
- package/prisma/migrations/20261109172829_add_extension_ownership/migration.sql +5 -0
- package/prisma/migrations/20261109211834_plugin_state/migration.sql +17 -0
- package/prisma/migrations/20261109222046_field_presets_layouts_upgrades/migration.sql +34 -0
- package/prisma/migrations/20261109224638_site_content_model/migration.sql +16 -0
- package/prisma/migrations/20261113004025_durable_hooks/migration.sql +20 -0
- package/prisma/migrations/20261114015159_localization/migration.sql +93 -0
- package/prisma/migrations/20261115005518_schema_labels/migration.sql +5 -0
- package/prisma/migrations/20261116120000_review_workflow/migration.sql +24 -0
- package/prisma/migrations/20261116130000_drop_request_log/migration.sql +5 -0
- package/prisma/migrations/20261116170000_row_scopes/migration.sql +5 -0
- package/prisma/migrations/20261116191352_redirect_scope/migration.sql +19 -0
- package/prisma/migrations/20261116200034_stored_file_scope/migration.sql +24 -0
- package/prisma/migrations/20261116211311_audit_webhook_scope/migration.sql +43 -0
- package/prisma/migrations/20261117152203_trash_records/migration.sql +42 -0
- package/prisma/migrations/20261117154617_file_text/migration.sql +28 -0
- package/prisma/migrations/20261117200538_image_focus/migration.sql +3 -0
- package/prisma/migrations/migration_lock.toml +3 -0
- package/prisma/migrations-postgres/20261109045000_baseline/migration.sql +542 -0
- package/prisma/migrations-postgres/20261109055558_add_request_logs/migration.sql +20 -0
- package/prisma/migrations-postgres/20261109143022_add_file_temporary/migration.sql +2 -0
- package/prisma/migrations-postgres/20261109172829_add_extension_ownership/migration.sql +5 -0
- package/prisma/migrations-postgres/20261109211834_plugin_state/migration.sql +19 -0
- package/prisma/migrations-postgres/20261109222046_field_presets_layouts_upgrades/migration.sql +40 -0
- package/prisma/migrations-postgres/20261109224638_site_content_model/migration.sql +18 -0
- package/prisma/migrations-postgres/20261113004025_durable_hooks/migration.sql +22 -0
- package/prisma/migrations-postgres/20261114015159_localization/migration.sql +43 -0
- package/prisma/migrations-postgres/20261115005518_schema_labels/migration.sql +5 -0
- package/prisma/migrations-postgres/20261116120000_review_workflow/migration.sql +28 -0
- package/prisma/migrations-postgres/20261116130000_drop_request_log/migration.sql +3 -0
- package/prisma/migrations-postgres/20261116170000_row_scopes/migration.sql +5 -0
- package/prisma/migrations-postgres/20261116191352_redirect_scope/migration.sql +8 -0
- package/prisma/migrations-postgres/20261116200034_stored_file_scope/migration.sql +5 -0
- package/prisma/migrations-postgres/20261116211311_audit_webhook_scope/migration.sql +8 -0
- package/prisma/migrations-postgres/20261117152203_trash_records/migration.sql +52 -0
- package/prisma/migrations-postgres/20261117154617_file_text/migration.sql +5 -0
- package/prisma/migrations-postgres/20261117200538_image_focus/migration.sql +3 -0
- package/prisma/migrations-postgres/migration_lock.toml +3 -0
- package/prisma/schema/collection.prisma +316 -0
- package/prisma/schema/extend.prisma +101 -0
- package/prisma/schema/schema.prisma +8 -0
- package/prisma/schema/security.prisma +64 -0
- package/prisma/schema/user.prisma +168 -0
- package/prisma.config.ts +29 -0
- package/routes/api-table.generated.d.ts +4 -0
- package/routes/api-table.generated.js +100 -0
- package/routes/api.d.ts +12 -0
- package/routes/api.js +45 -0
- package/routes/client-page.d.ts +11 -0
- package/routes/client-page.js +13 -0
- package/routes/client-pages.generated.d.ts +5 -0
- package/routes/client-pages.generated.js +40 -0
- package/routes/match.d.ts +8 -0
- package/routes/match.js +60 -0
- package/routes/pages-table.generated.d.ts +12 -0
- package/routes/pages-table.generated.js +45 -0
- package/routes/pages.d.ts +16 -0
- package/routes/pages.js +44 -0
- package/routes/proxy.d.ts +16 -0
- package/routes/proxy.js +89 -0
- package/routes/public-pages.d.ts +24 -0
- package/routes/public-pages.js +47 -0
- package/routes/root-layout.d.ts +8 -0
- package/routes/root-layout.js +12 -0
- package/routes/site.d.ts +32 -0
- package/routes/site.js +131 -0
- package/routes/start.d.ts +7 -0
- package/routes/start.js +37 -0
- package/scripts/commands.mjs +84 -0
- package/scripts/doctor.mjs +165 -0
- package/scripts/empty.mjs +2 -0
- package/scripts/init.mjs +253 -0
- package/scripts/scaffold.mjs +293 -0
- package/scripts/sync.mjs +262 -0
- package/scripts/tansy.mjs +383 -0
- package/sdk/index.d.ts +276 -0
- package/sdk/index.js +296 -0
- package/styles/admin.css +15 -0
- package/styles/base.css +13 -0
- package/styles/components.css +500 -0
- package/styles/editor.css +234 -0
- package/styles/reset.css +34 -0
- package/styles/rich-text.css +14 -0
- package/styles/tokens-dark.css +65 -0
- package/styles/tokens.css +141 -0
- package/styles/utilities.css +129 -0
- package/types/content.d.ts +54 -0
- package/types/content.js +1 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { validateRecordValues } from "../blocks/service";
|
|
3
|
+
import { fieldStorage } from "../fields/registry";
|
|
4
|
+
import { withDefaults } from "../fields/validate";
|
|
5
|
+
import { badRequest, HttpError } from "../http/errors";
|
|
6
|
+
import { createContent, requireContent, updateContent } from "./content-service";
|
|
7
|
+
import { parseCsv } from "./csv";
|
|
8
|
+
import { recordsDb } from "./db";
|
|
9
|
+
import { readSource } from "../i18n/storage";
|
|
10
|
+
/**
|
|
11
|
+
* Bringing records in from a CSV file or a list of rows. Each row goes through the same
|
|
12
|
+
* validation, hooks, history, search and review as a save in the dashboard, one row per
|
|
13
|
+
* transaction, so a large file can't hold the write lock. Nothing here uploads files: a
|
|
14
|
+
* file or reference column names ids that already exist.
|
|
15
|
+
*
|
|
16
|
+
* The import needs the record permissions (`record:create`, and `record:update` to match
|
|
17
|
+
* existing records). API rules don't open it, as they don't open a schema import.
|
|
18
|
+
*/
|
|
19
|
+
/** Per request, so one import stays bounded. A larger file is sent in several requests. */
|
|
20
|
+
export const MAX_IMPORT_ROWS = 2_000;
|
|
21
|
+
/** How many row results come back, so a failing file doesn't answer with megabytes. */
|
|
22
|
+
const MAX_REPORTED = 500;
|
|
23
|
+
/** Rows shown in a preview, so a mapping can be judged against real values. */
|
|
24
|
+
const SAMPLE_ROWS = 5;
|
|
25
|
+
const multipleOf = (field) => fieldStorage(field).sql === "json" && Boolean(fieldStorage(field).references ?? fieldStorage(field).files);
|
|
26
|
+
/** Splits a cell holding several values, as a spreadsheet writes them: "1,2" or "a, b". */
|
|
27
|
+
const split = (text) => text.split(",").map((part) => part.trim()).filter((part) => part !== "");
|
|
28
|
+
const cellProblem = (field, message) => new HttpError(400, "VALIDATION_FAILED", message, [{ path: field.name, message }]);
|
|
29
|
+
/**
|
|
30
|
+
* A cell as the field's own kind of value. Text comes from a CSV file, where everything is a
|
|
31
|
+
* string; a value that isn't text, as JSON rows carry, is passed through for the field to
|
|
32
|
+
* validate. An empty cell is no value, so a column left blank doesn't overwrite a default.
|
|
33
|
+
*/
|
|
34
|
+
export function coerceImported(field, raw) {
|
|
35
|
+
if (raw === null || raw === undefined)
|
|
36
|
+
return null;
|
|
37
|
+
if (typeof raw !== "string")
|
|
38
|
+
return raw;
|
|
39
|
+
const text = raw.trim();
|
|
40
|
+
if (text === "")
|
|
41
|
+
return null;
|
|
42
|
+
const storage = fieldStorage(field);
|
|
43
|
+
if (storage.references) {
|
|
44
|
+
const ids = split(text).map((part) => {
|
|
45
|
+
const id = Number(part);
|
|
46
|
+
if (!Number.isInteger(id) || id <= 0)
|
|
47
|
+
throw cellProblem(field, `"${part}" isn't a record id.`);
|
|
48
|
+
return id;
|
|
49
|
+
});
|
|
50
|
+
return multipleOf(field) ? ids : ids[0] ?? null;
|
|
51
|
+
}
|
|
52
|
+
if (storage.files)
|
|
53
|
+
return multipleOf(field) ? split(text) : text;
|
|
54
|
+
switch (storage.sql) {
|
|
55
|
+
case "integer":
|
|
56
|
+
case "real": {
|
|
57
|
+
const value = Number(text);
|
|
58
|
+
if (!Number.isFinite(value))
|
|
59
|
+
throw cellProblem(field, `"${text}" isn't a number.`);
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
case "boolean": {
|
|
63
|
+
const yes = ["true", "1", "yes", "y", "on"];
|
|
64
|
+
const no = ["false", "0", "no", "n", "off"];
|
|
65
|
+
const value = text.toLowerCase();
|
|
66
|
+
if (yes.includes(value))
|
|
67
|
+
return true;
|
|
68
|
+
if (no.includes(value))
|
|
69
|
+
return false;
|
|
70
|
+
throw cellProblem(field, `"${text}" isn't true or false.`);
|
|
71
|
+
}
|
|
72
|
+
case "datetime": {
|
|
73
|
+
const date = new Date(text);
|
|
74
|
+
if (Number.isNaN(date.getTime()))
|
|
75
|
+
throw cellProblem(field, `"${text}" isn't a date.`);
|
|
76
|
+
return date.toISOString();
|
|
77
|
+
}
|
|
78
|
+
case "json": {
|
|
79
|
+
try {
|
|
80
|
+
return JSON.parse(text);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
throw cellProblem(field, "This column holds JSON, and this cell isn't valid JSON.");
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
default:
|
|
87
|
+
return raw;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/** Which field each column goes to. A column naming no field is refused up front, so a typo isn't silently dropped. */
|
|
91
|
+
function resolveColumns(collection, columns, mapping = {}) {
|
|
92
|
+
const byName = new Map(collection.fields.map((field) => [field.name, field]));
|
|
93
|
+
const resolved = new Map();
|
|
94
|
+
const unknown = [];
|
|
95
|
+
for (const column of columns) {
|
|
96
|
+
const target = mapping[column] ?? column;
|
|
97
|
+
// An empty mapping means "leave this column out".
|
|
98
|
+
if (target === "")
|
|
99
|
+
continue;
|
|
100
|
+
const field = byName.get(target);
|
|
101
|
+
if (!field)
|
|
102
|
+
unknown.push(column);
|
|
103
|
+
else
|
|
104
|
+
resolved.set(column, field);
|
|
105
|
+
}
|
|
106
|
+
if (unknown.length)
|
|
107
|
+
throw badRequest(`This collection has no field for ${unknown.slice(0, 5).map((name) => `"${name.slice(0, 60)}"`).join(", ")}. Map or leave out these columns.`);
|
|
108
|
+
return resolved;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The record this row updates, found by the key field, or null to create one. Read through the
|
|
112
|
+
* same source a request in this language uses, so a localized collection's key field can live in
|
|
113
|
+
* its translation. The scope plugin keeps the lookup inside the caller's own scope value.
|
|
114
|
+
*/
|
|
115
|
+
async function findByKey(collection, field, value) {
|
|
116
|
+
if (value === null || value === undefined)
|
|
117
|
+
throw cellProblem(field, "The column matching existing records can't be empty.");
|
|
118
|
+
const rows = await recordsDb.selectFrom(await readSource(collection)).select("id").where(field.name, "=", value).limit(2).execute();
|
|
119
|
+
if (rows.length > 1)
|
|
120
|
+
throw cellProblem(field, "More than one record already has this value.");
|
|
121
|
+
return rows.length ? rows[0].id : null;
|
|
122
|
+
}
|
|
123
|
+
function keyFieldOf(collection, name) {
|
|
124
|
+
if (!name)
|
|
125
|
+
return null;
|
|
126
|
+
const field = collection.fields.find((candidate) => candidate.name === name);
|
|
127
|
+
if (!field)
|
|
128
|
+
throw badRequest(`This collection has no field called "${name.slice(0, 60)}".`);
|
|
129
|
+
if (!field.config?.unique)
|
|
130
|
+
throw badRequest(`"${field.name}" isn't unique, so it can't be used to match existing records.`);
|
|
131
|
+
if (multipleOf(field) || fieldStorage(field).sql === "json")
|
|
132
|
+
throw badRequest(`"${field.name}" can't be used to match existing records.`);
|
|
133
|
+
return field;
|
|
134
|
+
}
|
|
135
|
+
const message = (error) => (error instanceof HttpError ? error.message : "Something went wrong.");
|
|
136
|
+
const fieldOf = (error) => {
|
|
137
|
+
const details = error instanceof HttpError ? error.details : undefined;
|
|
138
|
+
return details?.[0]?.path || undefined;
|
|
139
|
+
};
|
|
140
|
+
/** The file as columns and rows, whichever way it came, with its own problems refused. */
|
|
141
|
+
function parseTable(input) {
|
|
142
|
+
if ((input.csv === undefined) === (input.rows === undefined))
|
|
143
|
+
throw badRequest("Send either csv or rows.");
|
|
144
|
+
const table = input.csv !== undefined
|
|
145
|
+
? parseCsv(input.csv)
|
|
146
|
+
: { columns: [...new Set(input.rows.flatMap((row) => Object.keys(row)))], rows: input.rows, problems: [] };
|
|
147
|
+
const fatal = table.problems.find((problem) => /empty|never closed|no name|more than one column/.test(problem.message));
|
|
148
|
+
if (fatal)
|
|
149
|
+
throw new HttpError(400, "VALIDATION_FAILED", fatal.message, table.problems.map((problem) => ({ path: `line ${problem.line}`, message: problem.message })));
|
|
150
|
+
if (table.rows.length > MAX_IMPORT_ROWS)
|
|
151
|
+
throw badRequest(`An import takes at most ${MAX_IMPORT_ROWS} rows at a time. This file has ${table.rows.length}.`);
|
|
152
|
+
if (!table.rows.length)
|
|
153
|
+
throw badRequest("This file has a header but no rows.");
|
|
154
|
+
return table;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* What the file holds, before anything is written: its columns, the field each one would go to
|
|
158
|
+
* where the name already matches, and its first few rows, so the dashboard can show a mapping.
|
|
159
|
+
*/
|
|
160
|
+
export function previewImport(collection, input) {
|
|
161
|
+
const table = parseTable(input);
|
|
162
|
+
const names = new Set(collection.fields.map((field) => field.name));
|
|
163
|
+
return {
|
|
164
|
+
columns: table.columns,
|
|
165
|
+
total: table.rows.length,
|
|
166
|
+
/** Column name to field name, empty where no field has that name and a choice is needed. */
|
|
167
|
+
mapping: Object.fromEntries(table.columns.map((column) => [column, names.has(column) ? column : ""])),
|
|
168
|
+
sample: table.rows.slice(0, SAMPLE_ROWS),
|
|
169
|
+
...(table.problems.length ? { problems: table.problems } : {}),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Reads the input into rows of values by field name. Separate from writing them, so a dry run
|
|
174
|
+
* and the real import see exactly the same rows.
|
|
175
|
+
*/
|
|
176
|
+
export function readImport(collection, input) {
|
|
177
|
+
const table = parseTable(input);
|
|
178
|
+
const columns = resolveColumns(collection, table.columns, input.mapping);
|
|
179
|
+
if (!columns.size)
|
|
180
|
+
throw badRequest("No column maps to a field.");
|
|
181
|
+
return { table, columns };
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Imports the rows. Each row is validated and written on its own, so the result says what
|
|
185
|
+
* happened to each one; `dryRun` validates everything and writes nothing. The first row of
|
|
186
|
+
* the file is line 2, after the header.
|
|
187
|
+
*/
|
|
188
|
+
export async function importRecords(collection, input, createdById, actor, canUpdate) {
|
|
189
|
+
const { table, columns } = readImport(collection, input);
|
|
190
|
+
const key = keyFieldOf(collection, input.keyField);
|
|
191
|
+
const keyColumn = key ? [...columns].find(([, field]) => field.id === key.id)?.[0] : undefined;
|
|
192
|
+
if (key && !keyColumn)
|
|
193
|
+
throw badRequest(`No column maps to "${key.name}", so existing records can't be matched.`);
|
|
194
|
+
const dryRun = input.dryRun === true;
|
|
195
|
+
const stopOnError = input.onError !== "skip";
|
|
196
|
+
const results = [];
|
|
197
|
+
let created = 0;
|
|
198
|
+
let updated = 0;
|
|
199
|
+
let failed = 0;
|
|
200
|
+
let index = 0;
|
|
201
|
+
for (; index < table.rows.length; index++) {
|
|
202
|
+
const line = index + 2;
|
|
203
|
+
const raw = table.rows[index];
|
|
204
|
+
try {
|
|
205
|
+
const values = {};
|
|
206
|
+
for (const [column, field] of columns) {
|
|
207
|
+
if (!Object.hasOwn(raw, column))
|
|
208
|
+
continue;
|
|
209
|
+
values[field.name] = coerceImported(field, raw[column]);
|
|
210
|
+
}
|
|
211
|
+
const existingId = key && keyColumn ? await findByKey(collection, key, values[key.name]) : null;
|
|
212
|
+
if (existingId !== null && !canUpdate)
|
|
213
|
+
throw new HttpError(403, "FORBIDDEN", "This row matches an existing record, and you may not update records here.");
|
|
214
|
+
if (existingId === null) {
|
|
215
|
+
const candidate = withDefaults(collection.fields, values);
|
|
216
|
+
const clean = await validateRecordValues(collection.fields, candidate);
|
|
217
|
+
if (!dryRun) {
|
|
218
|
+
const row = await createContent(collection, input.status, clean, createdById, actor);
|
|
219
|
+
results.push({ row: line, action: "created", id: row.id });
|
|
220
|
+
}
|
|
221
|
+
else
|
|
222
|
+
results.push({ row: line, action: "created" });
|
|
223
|
+
created++;
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
const item = await requireContent(collection, existingId);
|
|
227
|
+
const clean = await validateRecordValues(collection.fields, values, item);
|
|
228
|
+
if (!dryRun)
|
|
229
|
+
await updateContent(collection, item, input.status, clean, actor, "Imported");
|
|
230
|
+
results.push({ row: line, action: "updated", id: existingId });
|
|
231
|
+
updated++;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
catch (error) {
|
|
235
|
+
failed++;
|
|
236
|
+
results.push({ row: line, action: "failed", error: message(error), field: fieldOf(error) });
|
|
237
|
+
if (stopOnError) {
|
|
238
|
+
index++;
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return {
|
|
244
|
+
dryRun,
|
|
245
|
+
total: table.rows.length,
|
|
246
|
+
created,
|
|
247
|
+
updated,
|
|
248
|
+
failed,
|
|
249
|
+
remaining: table.rows.length - index,
|
|
250
|
+
rows: results.slice(0, MAX_REPORTED),
|
|
251
|
+
...(table.problems.length ? { problems: table.problems } : {}),
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
/** The columns a collection can be imported into, for the dashboard's mapping. */
|
|
255
|
+
export const importableFields = (collection) => collection.fields.map((field) => ({
|
|
256
|
+
name: field.name,
|
|
257
|
+
type: field.type,
|
|
258
|
+
multiple: multipleOf(field),
|
|
259
|
+
required: field.config?.required === true,
|
|
260
|
+
unique: field.config?.unique === true,
|
|
261
|
+
/** A stream field's blocks have to come in as JSON, so a spreadsheet can't fill one. */
|
|
262
|
+
json: fieldStorage(field).sql === "json" && !multipleOf(field),
|
|
263
|
+
}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { Prisma } from "../../generated/client-sqlite";
|
|
3
|
+
import { type Transaction } from "kysely";
|
|
4
|
+
type Trx = Transaction<Record<string, Record<string, unknown>>>;
|
|
5
|
+
/**
|
|
6
|
+
* Makes later reads in this transaction safe from other writers holding the same
|
|
7
|
+
* key. SQLite has one writer, so any write takes the lock for everything. Postgres
|
|
8
|
+
* runs writers side by side, so it needs a named lock, released at commit.
|
|
9
|
+
*/
|
|
10
|
+
export declare function serializeRecordWrites(trx: Trx, key: string): Promise<void>;
|
|
11
|
+
export declare function serializeWrites(tx: Prisma.TransactionClient, key: string): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Runs `work` while no other server runs it, for setup that every server repeats at startup
|
|
14
|
+
* but that must happen once: several cold starts at the same moment would each create the same
|
|
15
|
+
* collections and blocks. Held in a transaction on a connection of its own, because a pooler in
|
|
16
|
+
* transaction mode (Neon, PgBouncer) can't keep a session-level lock. The work itself uses other
|
|
17
|
+
* connections. SQLite has one writer and, in practice, one server, so there it only queues behind
|
|
18
|
+
* the same work in this process.
|
|
19
|
+
*/
|
|
20
|
+
export declare function onlyOneServer<T>(key: string, work: () => Promise<T>): Promise<T>;
|
|
21
|
+
export declare const LOCK: {
|
|
22
|
+
/** Startup's one-time setup: blocks, field upgrades, plugin migrations and theme seeds. */
|
|
23
|
+
readonly startup: "cms:startup";
|
|
24
|
+
/** Every change to collections, fields and views. Rules and views can depend on other collections, so one lock covers them all. */
|
|
25
|
+
readonly schema: "cms:schema";
|
|
26
|
+
/** User field definitions and everyone's values, which removing a field rewrites. */
|
|
27
|
+
readonly userFields: "cms:user-fields";
|
|
28
|
+
/** All redirects, because a loop can run through any of them. */
|
|
29
|
+
readonly redirects: "cms:redirects";
|
|
30
|
+
};
|
|
31
|
+
/** The row can't be changed or deleted until commit. No-op on SQLite, where the write lock already covers it. */
|
|
32
|
+
export declare const forUpdate: <Q extends {
|
|
33
|
+
forUpdate(): Q;
|
|
34
|
+
}>(query: Q) => Q;
|
|
35
|
+
/** The row can't be deleted until commit, though it can still be edited. */
|
|
36
|
+
export declare const forKeyShare: <Q extends {
|
|
37
|
+
forKeyShare(): Q;
|
|
38
|
+
}>(query: Q) => Q;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { sql } from "kysely";
|
|
3
|
+
import { isPostgres } from "../../lib/prisma/kind";
|
|
4
|
+
/**
|
|
5
|
+
* Makes later reads in this transaction safe from other writers holding the same
|
|
6
|
+
* key. SQLite has one writer, so any write takes the lock for everything. Postgres
|
|
7
|
+
* runs writers side by side, so it needs a named lock, released at commit.
|
|
8
|
+
*/
|
|
9
|
+
export async function serializeRecordWrites(trx, key) {
|
|
10
|
+
if (isPostgres())
|
|
11
|
+
await sql `SELECT pg_advisory_xact_lock(hashtextextended(${key}, 0))`.execute(trx);
|
|
12
|
+
else
|
|
13
|
+
await sql `UPDATE "Collection" SET "updatedAt" = "updatedAt" WHERE FALSE`.execute(trx);
|
|
14
|
+
}
|
|
15
|
+
export async function serializeWrites(tx, key) {
|
|
16
|
+
if (isPostgres())
|
|
17
|
+
await tx.$executeRaw `SELECT pg_advisory_xact_lock(hashtextextended(${key}, 0))`;
|
|
18
|
+
else
|
|
19
|
+
await tx.$executeRaw `UPDATE "Collection" SET "updatedAt" = "updatedAt" WHERE FALSE`;
|
|
20
|
+
}
|
|
21
|
+
const queued = new Map();
|
|
22
|
+
/**
|
|
23
|
+
* Runs `work` while no other server runs it, for setup that every server repeats at startup
|
|
24
|
+
* but that must happen once: several cold starts at the same moment would each create the same
|
|
25
|
+
* collections and blocks. Held in a transaction on a connection of its own, because a pooler in
|
|
26
|
+
* transaction mode (Neon, PgBouncer) can't keep a session-level lock. The work itself uses other
|
|
27
|
+
* connections. SQLite has one writer and, in practice, one server, so there it only queues behind
|
|
28
|
+
* the same work in this process.
|
|
29
|
+
*/
|
|
30
|
+
export async function onlyOneServer(key, work) {
|
|
31
|
+
if (!isPostgres()) {
|
|
32
|
+
const before = queued.get(key) ?? Promise.resolve();
|
|
33
|
+
const run = before.then(work, work);
|
|
34
|
+
queued.set(key, run.catch(() => undefined));
|
|
35
|
+
return run;
|
|
36
|
+
}
|
|
37
|
+
const { postgresPool } = await import("./db");
|
|
38
|
+
const client = await postgresPool().connect();
|
|
39
|
+
try {
|
|
40
|
+
await client.query("BEGIN");
|
|
41
|
+
await client.query("SELECT pg_advisory_xact_lock(hashtextextended($1, 0))", [key]);
|
|
42
|
+
try {
|
|
43
|
+
return await work();
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
await client.query("COMMIT").catch(() => undefined);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
client.release();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export const LOCK = {
|
|
54
|
+
/** Startup's one-time setup: blocks, field upgrades, plugin migrations and theme seeds. */
|
|
55
|
+
startup: "cms:startup",
|
|
56
|
+
/** Every change to collections, fields and views. Rules and views can depend on other collections, so one lock covers them all. */
|
|
57
|
+
schema: "cms:schema",
|
|
58
|
+
/** User field definitions and everyone's values, which removing a field rewrites. */
|
|
59
|
+
userFields: "cms:user-fields",
|
|
60
|
+
/** All redirects, because a loop can run through any of them. */
|
|
61
|
+
redirects: "cms:redirects",
|
|
62
|
+
};
|
|
63
|
+
/** The row can't be changed or deleted until commit. No-op on SQLite, where the write lock already covers it. */
|
|
64
|
+
export const forUpdate = (query) => (isPostgres() ? query.forUpdate() : query);
|
|
65
|
+
/** The row can't be deleted until commit, though it can still be edited. */
|
|
66
|
+
export const forKeyShare = (query) => (isPostgres() ? query.forKeyShare() : query);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import type { Principal } from "../authz/principal";
|
|
3
|
+
import { type CollectionWithFields } from "./access";
|
|
4
|
+
import { type RecordRow } from "./records";
|
|
5
|
+
export interface OverviewRecord {
|
|
6
|
+
collectionId: number;
|
|
7
|
+
collection: string;
|
|
8
|
+
id: number;
|
|
9
|
+
title: string;
|
|
10
|
+
status: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
}
|
|
13
|
+
export interface OverviewData {
|
|
14
|
+
/** Null when the caller can't read records, so the page leaves the record sections out. */
|
|
15
|
+
content: {
|
|
16
|
+
collections: Array<{
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
type: string;
|
|
20
|
+
total: number;
|
|
21
|
+
singletonId: number | null;
|
|
22
|
+
canCreate: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
recent: OverviewRecord[];
|
|
25
|
+
drafts: Array<OverviewRecord & {
|
|
26
|
+
savedAt: string;
|
|
27
|
+
}>;
|
|
28
|
+
scheduled: Array<OverviewRecord & {
|
|
29
|
+
action: string;
|
|
30
|
+
at: string;
|
|
31
|
+
error: string | null;
|
|
32
|
+
}>;
|
|
33
|
+
counts: {
|
|
34
|
+
drafts: number;
|
|
35
|
+
scheduled: number;
|
|
36
|
+
failed: number;
|
|
37
|
+
};
|
|
38
|
+
} | null;
|
|
39
|
+
activity: Array<{
|
|
40
|
+
id: string;
|
|
41
|
+
action: string;
|
|
42
|
+
outcome: string;
|
|
43
|
+
actor: string | null;
|
|
44
|
+
at: string;
|
|
45
|
+
}> | null;
|
|
46
|
+
}
|
|
47
|
+
/** The first readable field with a one-line summary, as the record grid shows it. */
|
|
48
|
+
export declare function titleOf(collection: CollectionWithFields, row: RecordRow, principal: Principal): string;
|
|
49
|
+
/**
|
|
50
|
+
* What the dashboard home shows. Records come from the same list filter and view
|
|
51
|
+
* check as the API, and drafts and schedules need record:read as their routes do.
|
|
52
|
+
*/
|
|
53
|
+
/** `locale` is the interface language, for collection names. */
|
|
54
|
+
export declare function loadOverview(principal: Principal, headers: Headers, locale: string): Promise<OverviewData>;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { labelIn } from "../i18n/labels";
|
|
3
|
+
import { listAudit } from "../audit/query";
|
|
4
|
+
import { decideRecord, listRuleWhere, loadRuleLookups } from "../authz/records";
|
|
5
|
+
import { holdsRecordPermission, holdsRecordPermissionAnywhere, holdsRecordPermissionForSome } from "../authz/permissions";
|
|
6
|
+
import { valueSummary } from "../fields/registry";
|
|
7
|
+
import prisma from "../../lib/prisma";
|
|
8
|
+
import { allCollections } from "./access";
|
|
9
|
+
import { findRecordsById, listContentPage, ownedRecordIds, recordColumns } from "./content-service";
|
|
10
|
+
import { flattenRecord, readableFields } from "./records";
|
|
11
|
+
import { scopedCollectionIds } from "../scope/registry";
|
|
12
|
+
import { withScope } from "../scope/context";
|
|
13
|
+
const RECENT = 8;
|
|
14
|
+
const QUEUE = 5;
|
|
15
|
+
const ACTIVITY = 6;
|
|
16
|
+
/** Where only an own grant applies, drafts and schedules are counted over this many of the person's latest records. */
|
|
17
|
+
const OWNED = 5_000;
|
|
18
|
+
/** The first readable field with a one-line summary, as the record grid shows it. */
|
|
19
|
+
export function titleOf(collection, row, principal) {
|
|
20
|
+
for (const field of readableFields(collection, principal)) {
|
|
21
|
+
const value = row[field.name];
|
|
22
|
+
// Plain text has no summary of its own, and is usually what names a record.
|
|
23
|
+
const text = (valueSummary(field, value) ?? (field.type === "text" && typeof value === "string" ? value.slice(0, 120) : undefined))?.trim();
|
|
24
|
+
if (text)
|
|
25
|
+
return text;
|
|
26
|
+
}
|
|
27
|
+
// The dashboard words an untitled record in the reader's language.
|
|
28
|
+
return "";
|
|
29
|
+
}
|
|
30
|
+
const asRecord = (collection, row, principal, locale) => ({
|
|
31
|
+
collectionId: collection.id,
|
|
32
|
+
collection: labelIn(collection, collection.name, locale),
|
|
33
|
+
id: row.id,
|
|
34
|
+
title: titleOf(collection, row, principal),
|
|
35
|
+
status: row.status,
|
|
36
|
+
updatedAt: row.updatedAt,
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* What the dashboard home shows. Records come from the same list filter and view
|
|
40
|
+
* check as the API, and drafts and schedules need record:read as their routes do.
|
|
41
|
+
*/
|
|
42
|
+
/** `locale` is the interface language, for collection names. */
|
|
43
|
+
export async function loadOverview(principal, headers, locale) {
|
|
44
|
+
// Collections where record:read is held only for some are narrowed in loadContent.
|
|
45
|
+
const canRecords = principal.permissions.has("collection:read") && holdsRecordPermissionAnywhere(principal.permissions, "record:read");
|
|
46
|
+
const [content, activity] = await Promise.all([
|
|
47
|
+
// In the scope value the page resolved. With none, scoped collections are left out, since they have no records to show.
|
|
48
|
+
canRecords ? withScope(principal.scope ?? null, () => loadContent(principal, headers, locale)) : null,
|
|
49
|
+
principal.permissions.has("audit:read") ? loadActivity() : null,
|
|
50
|
+
]);
|
|
51
|
+
return { content, activity };
|
|
52
|
+
}
|
|
53
|
+
async function loadActivity() {
|
|
54
|
+
const { items } = await listAudit({ page: 1, perPage: ACTIVITY });
|
|
55
|
+
return items.map((item) => ({ id: item.id, action: item.action, outcome: item.outcome, actor: item.actorEmail, at: item.at.toISOString() }));
|
|
56
|
+
}
|
|
57
|
+
async function loadContent(principal, headers, locale) {
|
|
58
|
+
// Views have no edits or drafts of their own. Drafts and schedules need record:read, for the collection or as an own grant.
|
|
59
|
+
const outside = principal.scope ? new Set() : scopedCollectionIds();
|
|
60
|
+
const collections = (await allCollections()).filter((collection) => collection.type !== "view" && !outside.has(collection.id) && holdsRecordPermissionForSome(principal.permissions, "record:read", collection.id)).sort((a, b) => a.name.localeCompare(b.name));
|
|
61
|
+
const lookups = await loadRuleLookups(collections);
|
|
62
|
+
const request = { method: "GET", headers, query: {}, body: {}, lookups };
|
|
63
|
+
const visible = (collection, row) => decideRecord(principal, collection, "view", flattenRecord(row), request) === "allow";
|
|
64
|
+
const listed = await Promise.all(collections.map(async (collection) => {
|
|
65
|
+
if (decideRecord(principal, collection, "list", {}, request) === "locked")
|
|
66
|
+
return { collection, total: 0, rows: [] };
|
|
67
|
+
const page = await listContentPage(collection, listRuleWhere(principal, collection, request, recordColumns(collection)), { page: 1, perPage: RECENT });
|
|
68
|
+
return { collection, total: page.totalItems, rows: page.items.filter((row) => visible(collection, row)) };
|
|
69
|
+
}));
|
|
70
|
+
const recent = listed
|
|
71
|
+
.flatMap(({ collection, rows }) => rows.map((row) => asRecord(collection, row, principal, locale)))
|
|
72
|
+
.sort((a, b) => b.updatedAt.localeCompare(a.updatedAt))
|
|
73
|
+
.slice(0, RECENT);
|
|
74
|
+
const byId = new Map(collections.map((collection) => [collection.id, collection]));
|
|
75
|
+
// With only an own grant, drafts and schedules of other people's records aren't counted, or the totals would describe them.
|
|
76
|
+
const full = collections.filter((collection) => holdsRecordPermission(principal.permissions, "record:read", collection.id));
|
|
77
|
+
const userId = principal.kind === "anonymous" ? null : principal.user.id;
|
|
78
|
+
const ownOnly = userId ? collections.filter((collection) => !full.includes(collection)) : [];
|
|
79
|
+
const owned = await Promise.all(ownOnly.map(async (collection) => ({ collectionId: collection.id, recordId: { in: await ownedRecordIds(collection, userId, OWNED) } })));
|
|
80
|
+
// Drafts and schedules of scoped collections carry no scope of their own, so they're counted by whether their record is in this one.
|
|
81
|
+
const scoped = scopedCollectionIds();
|
|
82
|
+
const split = (ids) => ({ plain: ids.filter((id) => !scoped.has(id)), scoped: ids.filter((id) => scoped.has(id)) });
|
|
83
|
+
const fullIds = split(full.map((collection) => collection.id));
|
|
84
|
+
const plainOwned = owned.filter((entry) => !scoped.has(entry.collectionId));
|
|
85
|
+
const scopedOwned = owned.filter((entry) => scoped.has(entry.collectionId));
|
|
86
|
+
const inScope = { OR: [{ collectionId: { in: full.map((collection) => collection.id) } }, ...owned] };
|
|
87
|
+
const plain = { OR: [{ collectionId: { in: fullIds.plain } }, ...plainOwned] };
|
|
88
|
+
const scopedWhere = { OR: [{ collectionId: { in: fullIds.scoped } }, ...scopedOwned] };
|
|
89
|
+
const [draftRows, scheduleRows, plainDrafts, plainScheduled, plainFailed, scopedDrafts, scopedSchedules] = await Promise.all([
|
|
90
|
+
prisma.revision.findMany({ where: { kind: "draft", ...inScope }, orderBy: { createdAt: "desc" }, take: QUEUE * 4 }),
|
|
91
|
+
prisma.scheduledAction.findMany({ where: inScope, orderBy: [{ failedAt: { sort: "desc", nulls: "last" } }, { at: "asc" }], take: QUEUE * 4 }),
|
|
92
|
+
prisma.revision.count({ where: { kind: "draft", ...plain } }),
|
|
93
|
+
prisma.scheduledAction.count({ where: { failedAt: null, ...plain } }),
|
|
94
|
+
prisma.scheduledAction.count({ where: { failedAt: { not: null }, ...plain } }),
|
|
95
|
+
fullIds.scoped.length || scopedOwned.length ? prisma.revision.findMany({ where: { kind: "draft", ...scopedWhere }, select: { collectionId: true, recordId: true } }) : [],
|
|
96
|
+
fullIds.scoped.length || scopedOwned.length ? prisma.scheduledAction.findMany({ where: scopedWhere, select: { collectionId: true, recordId: true, failedAt: true } }) : [],
|
|
97
|
+
]);
|
|
98
|
+
const inThisScope = await rowsFor([...scopedDrafts, ...scopedSchedules], byId);
|
|
99
|
+
const here = (entry) => inThisScope.has(`${entry.collectionId}:${entry.recordId}`);
|
|
100
|
+
const drafts = plainDrafts + scopedDrafts.filter(here).length;
|
|
101
|
+
const scheduled = plainScheduled + scopedSchedules.filter((entry) => !entry.failedAt && here(entry)).length;
|
|
102
|
+
const failed = plainFailed + scopedSchedules.filter((entry) => entry.failedAt && here(entry)).length;
|
|
103
|
+
const records = await rowsFor([...draftRows, ...scheduleRows], byId);
|
|
104
|
+
const recordOf = (collectionId, recordId) => {
|
|
105
|
+
const collection = byId.get(collectionId);
|
|
106
|
+
const row = records.get(`${collectionId}:${recordId}`);
|
|
107
|
+
return collection && row && visible(collection, row) ? asRecord(collection, row, principal, locale) : null;
|
|
108
|
+
};
|
|
109
|
+
return {
|
|
110
|
+
collections: listed.map(({ collection, total, rows }) => ({ id: collection.id, name: labelIn(collection, collection.name, locale), type: collection.type, total, singletonId: collection.type === "singleton" ? (rows[0]?.id ?? null) : null, canCreate: holdsRecordPermission(principal.permissions, "record:create", collection.id) })),
|
|
111
|
+
recent,
|
|
112
|
+
drafts: draftRows.flatMap((draft) => {
|
|
113
|
+
const record = recordOf(draft.collectionId, draft.recordId);
|
|
114
|
+
return record ? [{ ...record, savedAt: draft.createdAt.toISOString() }] : [];
|
|
115
|
+
}).slice(0, QUEUE),
|
|
116
|
+
scheduled: scheduleRows.flatMap((entry) => {
|
|
117
|
+
const record = recordOf(entry.collectionId, entry.recordId);
|
|
118
|
+
return record ? [{ ...record, action: entry.action, at: entry.at.toISOString(), error: entry.failedAt ? entry.error ?? "Failed." : null }] : [];
|
|
119
|
+
}).slice(0, QUEUE),
|
|
120
|
+
counts: { drafts, scheduled, failed },
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
async function rowsFor(entries, byId) {
|
|
124
|
+
const wanted = new Map();
|
|
125
|
+
for (const { collectionId, recordId } of entries)
|
|
126
|
+
wanted.set(collectionId, (wanted.get(collectionId) ?? new Set()).add(recordId));
|
|
127
|
+
const found = new Map();
|
|
128
|
+
await Promise.all([...wanted].map(async ([collectionId, ids]) => {
|
|
129
|
+
const collection = byId.get(collectionId);
|
|
130
|
+
if (!collection)
|
|
131
|
+
return;
|
|
132
|
+
for (const row of await findRecordsById(collection, [...ids]))
|
|
133
|
+
found.set(`${collectionId}:${row.id}`, row);
|
|
134
|
+
}));
|
|
135
|
+
return found;
|
|
136
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "server-only";
|
|
2
|
+
import { type RuleRequest } from "../authz/records";
|
|
3
|
+
import type { Principal } from "../authz/principal";
|
|
4
|
+
import { type CollectionWithFields } from "./access";
|
|
5
|
+
import { type RecordListQuery, type RecordViewQuery } from "./query";
|
|
6
|
+
import { type RecordRow } from "./records";
|
|
7
|
+
import { type FileText } from "../files/text";
|
|
8
|
+
import { type FileFocus } from "../files/focus";
|
|
9
|
+
/**
|
|
10
|
+
* Why a caller's filter can't run: a column they can't read, an operator its field type
|
|
11
|
+
* doesn't offer, or a relation it may not follow. `relations` names the relations this
|
|
12
|
+
* filter may follow, from relationCatalog; without it, paths that leave the record are
|
|
13
|
+
* refused, because only a resolved relation condition can answer one.
|
|
14
|
+
*/
|
|
15
|
+
export declare function callerFilterProblem(collection: CollectionWithFields, principal: Principal, filter: string, relations?: ReadonlyMap<string, ReadonlySet<string>>): string | null;
|
|
16
|
+
/** The caller is already known not to be locked out; the list rule and any filter narrow the rows. */
|
|
17
|
+
export declare function listRecords(collection: CollectionWithFields, query: RecordListQuery, principal: Principal, request: RuleRequest): Promise<{
|
|
18
|
+
page: number;
|
|
19
|
+
perPage: number;
|
|
20
|
+
totalItems: number;
|
|
21
|
+
totalPages: number;
|
|
22
|
+
items: {
|
|
23
|
+
files?: Record<string, FileText & {
|
|
24
|
+
focus?: FileFocus;
|
|
25
|
+
}> | undefined;
|
|
26
|
+
translations?: {
|
|
27
|
+
locale: string;
|
|
28
|
+
status: string;
|
|
29
|
+
outdated: boolean;
|
|
30
|
+
}[] | undefined;
|
|
31
|
+
recordPath?: string | null | undefined;
|
|
32
|
+
summaries?: {
|
|
33
|
+
[k: string]: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
}[];
|
|
36
|
+
}>;
|
|
37
|
+
/** The caller must have passed authorizeRecord for this row. */
|
|
38
|
+
export declare function viewRecord(collection: CollectionWithFields, row: RecordRow, query: RecordViewQuery, principal: Principal, request: RuleRequest): Promise<{
|
|
39
|
+
files?: Record<string, FileText & {
|
|
40
|
+
focus?: FileFocus;
|
|
41
|
+
}> | undefined;
|
|
42
|
+
translations?: {
|
|
43
|
+
locale: string;
|
|
44
|
+
status: string;
|
|
45
|
+
outdated: boolean;
|
|
46
|
+
}[] | undefined;
|
|
47
|
+
recordPath?: string | null | undefined;
|
|
48
|
+
summaries?: {
|
|
49
|
+
[k: string]: string;
|
|
50
|
+
} | undefined;
|
|
51
|
+
}>;
|