create-qpq-app 0.1.5
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 +33 -0
- package/lib/commonjs/bin/createQpqApp.d.ts +2 -0
- package/lib/commonjs/bin/createQpqApp.js +9 -0
- package/lib/commonjs/bin/createQpqApp.js.map +1 -0
- package/lib/commonjs/cli/runCreateQpqApp.d.ts +1 -0
- package/lib/commonjs/cli/runCreateQpqApp.js +75 -0
- package/lib/commonjs/cli/runCreateQpqApp.js.map +1 -0
- package/lib/commonjs/index.d.ts +3 -0
- package/lib/commonjs/index.js +20 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lib/args.d.ts +2 -0
- package/lib/commonjs/lib/args.js +21 -0
- package/lib/commonjs/lib/args.js.map +1 -0
- package/lib/commonjs/lib/files.d.ts +5 -0
- package/lib/commonjs/lib/files.js +65 -0
- package/lib/commonjs/lib/files.js.map +1 -0
- package/lib/commonjs/lib/packageRoot.d.ts +2 -0
- package/lib/commonjs/lib/packageRoot.js +26 -0
- package/lib/commonjs/lib/packageRoot.js.map +1 -0
- package/lib/commonjs/lib/prompts.d.ts +1 -0
- package/lib/commonjs/lib/prompts.js +53 -0
- package/lib/commonjs/lib/prompts.js.map +1 -0
- package/lib/commonjs/lib/runCommand.d.ts +4 -0
- package/lib/commonjs/lib/runCommand.js +24 -0
- package/lib/commonjs/lib/runCommand.js.map +1 -0
- package/lib/commonjs/steps/001_preflight.d.ts +2 -0
- package/lib/commonjs/steps/001_preflight.js +36 -0
- package/lib/commonjs/steps/001_preflight.js.map +1 -0
- package/lib/commonjs/steps/002_copyTemplate.d.ts +2 -0
- package/lib/commonjs/steps/002_copyTemplate.js +29 -0
- package/lib/commonjs/steps/002_copyTemplate.js.map +1 -0
- package/lib/commonjs/steps/003_deleteDocusaurus.d.ts +2 -0
- package/lib/commonjs/steps/003_deleteDocusaurus.js +32 -0
- package/lib/commonjs/steps/003_deleteDocusaurus.js.map +1 -0
- package/lib/commonjs/steps/004_deleteQpqjsApp.d.ts +2 -0
- package/lib/commonjs/steps/004_deleteQpqjsApp.js +26 -0
- package/lib/commonjs/steps/004_deleteQpqjsApp.js.map +1 -0
- package/lib/commonjs/steps/005_applyAppIdentity.d.ts +2 -0
- package/lib/commonjs/steps/005_applyAppIdentity.js +51 -0
- package/lib/commonjs/steps/005_applyAppIdentity.js.map +1 -0
- package/lib/commonjs/steps/006_applyDomain.d.ts +2 -0
- package/lib/commonjs/steps/006_applyDomain.js +31 -0
- package/lib/commonjs/steps/006_applyDomain.js.map +1 -0
- package/lib/commonjs/steps/007_pinRegistryVersions.d.ts +2 -0
- package/lib/commonjs/steps/007_pinRegistryVersions.js +37 -0
- package/lib/commonjs/steps/007_pinRegistryVersions.js.map +1 -0
- package/lib/commonjs/steps/008_transpileToJavaScript.d.ts +2 -0
- package/lib/commonjs/steps/008_transpileToJavaScript.js +24 -0
- package/lib/commonjs/steps/008_transpileToJavaScript.js.map +1 -0
- package/lib/commonjs/steps/009_restoreGitignore.d.ts +2 -0
- package/lib/commonjs/steps/009_restoreGitignore.js +31 -0
- package/lib/commonjs/steps/009_restoreGitignore.js.map +1 -0
- package/lib/commonjs/steps/010_gitInit.d.ts +2 -0
- package/lib/commonjs/steps/010_gitInit.js +30 -0
- package/lib/commonjs/steps/010_gitInit.js.map +1 -0
- package/lib/commonjs/steps/011_npmInstall.d.ts +2 -0
- package/lib/commonjs/steps/011_npmInstall.js +21 -0
- package/lib/commonjs/steps/011_npmInstall.js.map +1 -0
- package/lib/commonjs/steps/012_buildWorkspaces.d.ts +2 -0
- package/lib/commonjs/steps/012_buildWorkspaces.js +24 -0
- package/lib/commonjs/steps/012_buildWorkspaces.js.map +1 -0
- package/lib/commonjs/steps/013_printNextSteps.d.ts +2 -0
- package/lib/commonjs/steps/013_printNextSteps.js +33 -0
- package/lib/commonjs/steps/013_printNextSteps.js.map +1 -0
- package/lib/commonjs/steps/index.d.ts +16 -0
- package/lib/commonjs/steps/index.js +48 -0
- package/lib/commonjs/steps/index.js.map +1 -0
- package/lib/commonjs/types.d.ts +22 -0
- package/lib/commonjs/types.js +9 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/esm/bin/createQpqApp.d.ts +2 -0
- package/lib/esm/bin/createQpqApp.js +7 -0
- package/lib/esm/bin/createQpqApp.js.map +1 -0
- package/lib/esm/cli/runCreateQpqApp.d.ts +1 -0
- package/lib/esm/cli/runCreateQpqApp.js +57 -0
- package/lib/esm/cli/runCreateQpqApp.js.map +1 -0
- package/lib/esm/index.d.ts +3 -0
- package/lib/esm/index.js +4 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/lib/args.d.ts +2 -0
- package/lib/esm/lib/args.js +16 -0
- package/lib/esm/lib/args.js.map +1 -0
- package/lib/esm/lib/files.d.ts +5 -0
- package/lib/esm/lib/files.js +54 -0
- package/lib/esm/lib/files.js.map +1 -0
- package/lib/esm/lib/packageRoot.d.ts +2 -0
- package/lib/esm/lib/packageRoot.js +18 -0
- package/lib/esm/lib/packageRoot.js.map +1 -0
- package/lib/esm/lib/prompts.d.ts +1 -0
- package/lib/esm/lib/prompts.js +7 -0
- package/lib/esm/lib/prompts.js.map +1 -0
- package/lib/esm/lib/runCommand.d.ts +4 -0
- package/lib/esm/lib/runCommand.js +19 -0
- package/lib/esm/lib/runCommand.js.map +1 -0
- package/lib/esm/steps/001_preflight.d.ts +2 -0
- package/lib/esm/steps/001_preflight.js +21 -0
- package/lib/esm/steps/001_preflight.js.map +1 -0
- package/lib/esm/steps/002_copyTemplate.d.ts +2 -0
- package/lib/esm/steps/002_copyTemplate.js +14 -0
- package/lib/esm/steps/002_copyTemplate.js.map +1 -0
- package/lib/esm/steps/003_deleteDocusaurus.d.ts +2 -0
- package/lib/esm/steps/003_deleteDocusaurus.js +16 -0
- package/lib/esm/steps/003_deleteDocusaurus.js.map +1 -0
- package/lib/esm/steps/004_deleteQpqjsApp.d.ts +2 -0
- package/lib/esm/steps/004_deleteQpqjsApp.js +11 -0
- package/lib/esm/steps/004_deleteQpqjsApp.js.map +1 -0
- package/lib/esm/steps/005_applyAppIdentity.d.ts +2 -0
- package/lib/esm/steps/005_applyAppIdentity.js +36 -0
- package/lib/esm/steps/005_applyAppIdentity.js.map +1 -0
- package/lib/esm/steps/006_applyDomain.d.ts +2 -0
- package/lib/esm/steps/006_applyDomain.js +16 -0
- package/lib/esm/steps/006_applyDomain.js.map +1 -0
- package/lib/esm/steps/007_pinRegistryVersions.d.ts +2 -0
- package/lib/esm/steps/007_pinRegistryVersions.js +22 -0
- package/lib/esm/steps/007_pinRegistryVersions.js.map +1 -0
- package/lib/esm/steps/008_transpileToJavaScript.d.ts +2 -0
- package/lib/esm/steps/008_transpileToJavaScript.js +12 -0
- package/lib/esm/steps/008_transpileToJavaScript.js.map +1 -0
- package/lib/esm/steps/009_restoreGitignore.d.ts +2 -0
- package/lib/esm/steps/009_restoreGitignore.js +16 -0
- package/lib/esm/steps/009_restoreGitignore.js.map +1 -0
- package/lib/esm/steps/010_gitInit.d.ts +2 -0
- package/lib/esm/steps/010_gitInit.js +18 -0
- package/lib/esm/steps/010_gitInit.js.map +1 -0
- package/lib/esm/steps/011_npmInstall.d.ts +2 -0
- package/lib/esm/steps/011_npmInstall.js +9 -0
- package/lib/esm/steps/011_npmInstall.js.map +1 -0
- package/lib/esm/steps/012_buildWorkspaces.d.ts +2 -0
- package/lib/esm/steps/012_buildWorkspaces.js +12 -0
- package/lib/esm/steps/012_buildWorkspaces.js.map +1 -0
- package/lib/esm/steps/013_printNextSteps.d.ts +2 -0
- package/lib/esm/steps/013_printNextSteps.js +21 -0
- package/lib/esm/steps/013_printNextSteps.js.map +1 -0
- package/lib/esm/steps/index.d.ts +16 -0
- package/lib/esm/steps/index.js +33 -0
- package/lib/esm/steps/index.js.map +1 -0
- package/lib/esm/types.d.ts +22 -0
- package/lib/esm/types.js +6 -0
- package/lib/esm/types.js.map +1 -0
- package/package.json +57 -0
- package/template/.nvmrc +1 -0
- package/template/.prettierignore +4 -0
- package/template/.prettierrc +4 -0
- package/template/.vscode/extensions.json +3 -0
- package/template/.vscode/settings.json +14 -0
- package/template/README.md +150 -0
- package/template/apps/qpqjs/account.qpq.ts +39 -0
- package/template/apps/qpqjs/bootstrap.qpq.ts +36 -0
- package/template/apps/qpqjs/deploy.config.json +24 -0
- package/template/apps/qpqjs/packages/config/package.json +22 -0
- package/template/apps/qpqjs/packages/config/src/index.ts +2 -0
- package/template/apps/qpqjs/packages/config/tsconfig.json +18 -0
- package/template/apps/qpqjs/packages/config/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/packages/constants/package.json +22 -0
- package/template/apps/qpqjs/packages/constants/src/QpqjsServiceEnum.ts +11 -0
- package/template/apps/qpqjs/packages/constants/src/domain.ts +1 -0
- package/template/apps/qpqjs/packages/constants/src/index.ts +3 -0
- package/template/apps/qpqjs/packages/constants/src/userDirectory.ts +3 -0
- package/template/apps/qpqjs/packages/constants/tsconfig.json +18 -0
- package/template/apps/qpqjs/packages/constants/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/packages/service-utils/package.json +24 -0
- package/template/apps/qpqjs/packages/service-utils/src/defineQpqjsService.ts +148 -0
- package/template/apps/qpqjs/packages/service-utils/src/index.ts +1 -0
- package/template/apps/qpqjs/packages/service-utils/tsconfig.json +18 -0
- package/template/apps/qpqjs/packages/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/config/package.json +22 -0
- package/template/apps/qpqjs/services/admin/config/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/config/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/config/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/models/package.json +22 -0
- package/template/apps/qpqjs/services/admin/models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/service/package.json +9 -0
- package/template/apps/qpqjs/services/admin/service/src/infrastructure.ts +15 -0
- package/template/apps/qpqjs/services/admin/service/tsconfig.app.json +17 -0
- package/template/apps/qpqjs/services/admin/service/tsconfig.json +8 -0
- package/template/apps/qpqjs/services/admin/service-utils/package.json +22 -0
- package/template/apps/qpqjs/services/admin/service-utils/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/service-utils/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/shared-logic/package.json +22 -0
- package/template/apps/qpqjs/services/admin/shared-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/shared-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/views/package.json +8 -0
- package/template/apps/qpqjs/services/admin/views/src/app/app.tsx +39 -0
- package/template/apps/qpqjs/services/admin/views/src/assets/.gitkeep +0 -0
- package/template/apps/qpqjs/services/admin/views/src/bootstrap.tsx +14 -0
- package/template/apps/qpqjs/services/admin/views/src/components/AdminGrid/AdminGrid.tsx +80 -0
- package/template/apps/qpqjs/services/admin/views/src/components/AdminGrid/index.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/src/components/AdminGrid/styles.ts +41 -0
- package/template/apps/qpqjs/services/admin/views/src/components/AdminGrid/types/AdminGridProps.ts +6 -0
- package/template/apps/qpqjs/services/admin/views/src/components/index.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/src/favicon.ico +0 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/index.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/useAdminNetworkRequest/index.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/useAdminNetworkRequest/logic/getBaseUrlFromAdminWebHost.ts +7 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/useAdminNetworkRequest/types/AdminNetworkRequestPayload.ts +10 -0
- package/template/apps/qpqjs/services/admin/views/src/hooks/useAdminNetworkRequest/useAdminNetworkRequest.ts +18 -0
- package/template/apps/qpqjs/services/admin/views/src/index.html +23 -0
- package/template/apps/qpqjs/services/admin/views/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/views/src/main.ts +1 -0
- package/template/apps/qpqjs/services/admin/views/tsconfig.app.json +20 -0
- package/template/apps/qpqjs/services/admin/views/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/x-logic/package.json +22 -0
- package/template/apps/qpqjs/services/admin/x-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/x-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/admin/x-models/package.json +22 -0
- package/template/apps/qpqjs/services/admin/x-models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/admin/x-models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/admin/x-models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/config/package.json +22 -0
- package/template/apps/qpqjs/services/design/config/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/config/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/config/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/models/package.json +22 -0
- package/template/apps/qpqjs/services/design/models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/service/package.json +9 -0
- package/template/apps/qpqjs/services/design/service/src/infrastructure.ts +15 -0
- package/template/apps/qpqjs/services/design/service/tsconfig.app.json +17 -0
- package/template/apps/qpqjs/services/design/service/tsconfig.json +8 -0
- package/template/apps/qpqjs/services/design/service-utils/package.json +22 -0
- package/template/apps/qpqjs/services/design/service-utils/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/service-utils/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/shared-logic/package.json +22 -0
- package/template/apps/qpqjs/services/design/shared-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/shared-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/views/package.json +8 -0
- package/template/apps/qpqjs/services/design/views/src/app.tsx +7 -0
- package/template/apps/qpqjs/services/design/views/src/bootstrap.tsx +14 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/LandingPage.tsx +20 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/CodeWindow.tsx +77 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Features.tsx +83 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Footer.tsx +45 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Hero.tsx +60 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/InstallChip.tsx +27 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/NavBar.tsx +72 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Packages.tsx +63 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/Pipeline.tsx +58 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/TronGrid.tsx +587 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/components/YieldLoop.tsx +361 -0
- package/template/apps/qpqjs/services/design/views/src/components/LandingPage/landing.css +1170 -0
- package/template/apps/qpqjs/services/design/views/src/components/WelcomeScreen/WelcomeScreen.tsx +85 -0
- package/template/apps/qpqjs/services/design/views/src/index.html +12 -0
- package/template/apps/qpqjs/services/design/views/src/index.ts +1 -0
- package/template/apps/qpqjs/services/design/views/src/main.ts +1 -0
- package/template/apps/qpqjs/services/design/views/tsconfig.app.json +20 -0
- package/template/apps/qpqjs/services/design/views/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/x-logic/package.json +22 -0
- package/template/apps/qpqjs/services/design/x-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/x-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/design/x-models/package.json +22 -0
- package/template/apps/qpqjs/services/design/x-models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/design/x-models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/design/x-models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/config/package.json +22 -0
- package/template/apps/qpqjs/services/shell/config/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/config/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/config/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/models/package.json +22 -0
- package/template/apps/qpqjs/services/shell/models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/service/package.json +9 -0
- package/template/apps/qpqjs/services/shell/service/src/entry/controller/health/health.ts +21 -0
- package/template/apps/qpqjs/services/shell/service/src/entry/controller/health/index.ts +1 -0
- package/template/apps/qpqjs/services/shell/service/src/entry/controller/index.ts +1 -0
- package/template/apps/qpqjs/services/shell/service/src/infrastructure.ts +91 -0
- package/template/apps/qpqjs/services/shell/service/tsconfig.app.json +17 -0
- package/template/apps/qpqjs/services/shell/service/tsconfig.json +8 -0
- package/template/apps/qpqjs/services/shell/service-utils/package.json +22 -0
- package/template/apps/qpqjs/services/shell/service-utils/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/service-utils/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/shared-logic/package.json +22 -0
- package/template/apps/qpqjs/services/shell/shared-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/shared-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/views/package.json +8 -0
- package/template/apps/qpqjs/services/shell/views/src/app.tsx +6 -0
- package/template/apps/qpqjs/services/shell/views/src/bootstrap.tsx +14 -0
- package/template/apps/qpqjs/services/shell/views/src/index.html +25 -0
- package/template/apps/qpqjs/services/shell/views/src/index.ts +1 -0
- package/template/apps/qpqjs/services/shell/views/src/main.ts +1 -0
- package/template/apps/qpqjs/services/shell/views/tsconfig.app.json +20 -0
- package/template/apps/qpqjs/services/shell/views/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/x-logic/package.json +22 -0
- package/template/apps/qpqjs/services/shell/x-logic/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/x-logic/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/services/shell/x-models/package.json +22 -0
- package/template/apps/qpqjs/services/shell/x-models/src/index.ts +2 -0
- package/template/apps/qpqjs/services/shell/x-models/tsconfig.json +18 -0
- package/template/apps/qpqjs/services/shell/x-models/tsconfig.lib.json +19 -0
- package/template/apps/qpqjs/tsconfig.federated.json +13 -0
- package/template/apps/todo/deploy.config.json +12 -0
- package/template/apps/todo/packages/config/package.json +22 -0
- package/template/apps/todo/packages/config/src/index.ts +2 -0
- package/template/apps/todo/packages/config/tsconfig.json +18 -0
- package/template/apps/todo/packages/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/packages/constants/package.json +22 -0
- package/template/apps/todo/packages/constants/src/TodoServiceEnum.ts +12 -0
- package/template/apps/todo/packages/constants/src/domain.ts +1 -0
- package/template/apps/todo/packages/constants/src/index.ts +3 -0
- package/template/apps/todo/packages/constants/src/userDirectory.ts +3 -0
- package/template/apps/todo/packages/constants/tsconfig.json +18 -0
- package/template/apps/todo/packages/constants/tsconfig.lib.json +19 -0
- package/template/apps/todo/packages/service-utils/package.json +24 -0
- package/template/apps/todo/packages/service-utils/src/defineTodoService.ts +128 -0
- package/template/apps/todo/packages/service-utils/src/index.ts +1 -0
- package/template/apps/todo/packages/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/packages/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/config/package.json +22 -0
- package/template/apps/todo/services/admin/config/src/index.ts +2 -0
- package/template/apps/todo/services/admin/config/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/models/package.json +22 -0
- package/template/apps/todo/services/admin/models/src/index.ts +2 -0
- package/template/apps/todo/services/admin/models/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/service/package.json +9 -0
- package/template/apps/todo/services/admin/service/src/infrastructure.ts +15 -0
- package/template/apps/todo/services/admin/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/admin/service/tsconfig.json +8 -0
- package/template/apps/todo/services/admin/service-utils/package.json +22 -0
- package/template/apps/todo/services/admin/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/admin/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/shared-logic/package.json +22 -0
- package/template/apps/todo/services/admin/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/admin/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/views/package.json +8 -0
- package/template/apps/todo/services/admin/views/src/app/app.tsx +39 -0
- package/template/apps/todo/services/admin/views/src/assets/.gitkeep +0 -0
- package/template/apps/todo/services/admin/views/src/bootstrap.tsx +14 -0
- package/template/apps/todo/services/admin/views/src/components/AdminGrid/AdminGrid.tsx +80 -0
- package/template/apps/todo/services/admin/views/src/components/AdminGrid/index.ts +1 -0
- package/template/apps/todo/services/admin/views/src/components/AdminGrid/styles.ts +41 -0
- package/template/apps/todo/services/admin/views/src/components/AdminGrid/types/AdminGridProps.ts +6 -0
- package/template/apps/todo/services/admin/views/src/components/index.ts +1 -0
- package/template/apps/todo/services/admin/views/src/favicon.ico +0 -0
- package/template/apps/todo/services/admin/views/src/hooks/index.ts +1 -0
- package/template/apps/todo/services/admin/views/src/hooks/useAdminNetworkRequest/index.ts +1 -0
- package/template/apps/todo/services/admin/views/src/hooks/useAdminNetworkRequest/logic/getBaseUrlFromAdminWebHost.ts +7 -0
- package/template/apps/todo/services/admin/views/src/hooks/useAdminNetworkRequest/types/AdminNetworkRequestPayload.ts +10 -0
- package/template/apps/todo/services/admin/views/src/hooks/useAdminNetworkRequest/useAdminNetworkRequest.ts +18 -0
- package/template/apps/todo/services/admin/views/src/index.html +23 -0
- package/template/apps/todo/services/admin/views/src/index.ts +2 -0
- package/template/apps/todo/services/admin/views/src/main.ts +1 -0
- package/template/apps/todo/services/admin/views/tsconfig.app.json +20 -0
- package/template/apps/todo/services/admin/views/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/x-logic/package.json +22 -0
- package/template/apps/todo/services/admin/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/admin/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/admin/x-models/package.json +22 -0
- package/template/apps/todo/services/admin/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/admin/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/admin/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/config/package.json +22 -0
- package/template/apps/todo/services/auth/config/src/index.ts +2 -0
- package/template/apps/todo/services/auth/config/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/models/package.json +22 -0
- package/template/apps/todo/services/auth/models/src/index.ts +2 -0
- package/template/apps/todo/services/auth/models/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/service/package.json +9 -0
- package/template/apps/todo/services/auth/service/src/infrastructure.ts +15 -0
- package/template/apps/todo/services/auth/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/auth/service/tsconfig.json +8 -0
- package/template/apps/todo/services/auth/service-utils/package.json +22 -0
- package/template/apps/todo/services/auth/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/auth/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/shared-logic/package.json +22 -0
- package/template/apps/todo/services/auth/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/auth/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/x-logic/package.json +22 -0
- package/template/apps/todo/services/auth/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/auth/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/auth/x-models/package.json +22 -0
- package/template/apps/todo/services/auth/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/auth/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/auth/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/config/package.json +22 -0
- package/template/apps/todo/services/design/config/src/index.ts +2 -0
- package/template/apps/todo/services/design/config/tsconfig.json +18 -0
- package/template/apps/todo/services/design/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/models/package.json +22 -0
- package/template/apps/todo/services/design/models/src/index.ts +2 -0
- package/template/apps/todo/services/design/models/tsconfig.json +18 -0
- package/template/apps/todo/services/design/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/service/package.json +9 -0
- package/template/apps/todo/services/design/service/src/infrastructure.ts +15 -0
- package/template/apps/todo/services/design/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/design/service/tsconfig.json +8 -0
- package/template/apps/todo/services/design/service-utils/package.json +22 -0
- package/template/apps/todo/services/design/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/design/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/design/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/shared-logic/package.json +22 -0
- package/template/apps/todo/services/design/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/design/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/design/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/views/package.json +8 -0
- package/template/apps/todo/services/design/views/src/app.tsx +7 -0
- package/template/apps/todo/services/design/views/src/bootstrap.tsx +14 -0
- package/template/apps/todo/services/design/views/src/components/WelcomeScreen/WelcomeScreen.tsx +85 -0
- package/template/apps/todo/services/design/views/src/index.html +12 -0
- package/template/apps/todo/services/design/views/src/index.ts +1 -0
- package/template/apps/todo/services/design/views/src/main.ts +1 -0
- package/template/apps/todo/services/design/views/tsconfig.app.json +20 -0
- package/template/apps/todo/services/design/views/tsconfig.json +18 -0
- package/template/apps/todo/services/design/x-logic/package.json +22 -0
- package/template/apps/todo/services/design/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/design/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/design/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/design/x-models/package.json +22 -0
- package/template/apps/todo/services/design/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/design/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/design/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/config/package.json +22 -0
- package/template/apps/todo/services/shell/config/src/index.ts +2 -0
- package/template/apps/todo/services/shell/config/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/models/package.json +22 -0
- package/template/apps/todo/services/shell/models/src/index.ts +2 -0
- package/template/apps/todo/services/shell/models/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/service/package.json +9 -0
- package/template/apps/todo/services/shell/service/src/entry/controller/health/health.ts +21 -0
- package/template/apps/todo/services/shell/service/src/entry/controller/health/index.ts +1 -0
- package/template/apps/todo/services/shell/service/src/entry/controller/index.ts +1 -0
- package/template/apps/todo/services/shell/service/src/infrastructure.ts +75 -0
- package/template/apps/todo/services/shell/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/shell/service/tsconfig.json +8 -0
- package/template/apps/todo/services/shell/service-utils/package.json +22 -0
- package/template/apps/todo/services/shell/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/shell/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/shared-logic/package.json +22 -0
- package/template/apps/todo/services/shell/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/shell/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/views/package.json +8 -0
- package/template/apps/todo/services/shell/views/src/app.tsx +6 -0
- package/template/apps/todo/services/shell/views/src/bootstrap.tsx +14 -0
- package/template/apps/todo/services/shell/views/src/index.html +19 -0
- package/template/apps/todo/services/shell/views/src/index.ts +1 -0
- package/template/apps/todo/services/shell/views/src/main.ts +1 -0
- package/template/apps/todo/services/shell/views/tsconfig.app.json +20 -0
- package/template/apps/todo/services/shell/views/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/x-logic/package.json +22 -0
- package/template/apps/todo/services/shell/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/shell/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/shell/x-models/package.json +22 -0
- package/template/apps/todo/services/shell/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/shell/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/shell/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/config/package.json +22 -0
- package/template/apps/todo/services/todo/config/src/index.ts +2 -0
- package/template/apps/todo/services/todo/config/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/config/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/models/package.json +22 -0
- package/template/apps/todo/services/todo/models/src/index.ts +2 -0
- package/template/apps/todo/services/todo/models/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/models/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/service/package.json +9 -0
- package/template/apps/todo/services/todo/service/src/infrastructure.ts +15 -0
- package/template/apps/todo/services/todo/service/tsconfig.app.json +17 -0
- package/template/apps/todo/services/todo/service/tsconfig.json +8 -0
- package/template/apps/todo/services/todo/service-utils/package.json +22 -0
- package/template/apps/todo/services/todo/service-utils/src/index.ts +2 -0
- package/template/apps/todo/services/todo/service-utils/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/service-utils/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/shared-logic/package.json +22 -0
- package/template/apps/todo/services/todo/shared-logic/src/index.ts +2 -0
- package/template/apps/todo/services/todo/shared-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/shared-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/views/package.json +8 -0
- package/template/apps/todo/services/todo/views/src/app.tsx +7 -0
- package/template/apps/todo/services/todo/views/src/bootstrap.tsx +14 -0
- package/template/apps/todo/services/todo/views/src/components/TodoList/TodoList.tsx +132 -0
- package/template/apps/todo/services/todo/views/src/index.html +11 -0
- package/template/apps/todo/services/todo/views/src/index.ts +1 -0
- package/template/apps/todo/services/todo/views/src/main.ts +1 -0
- package/template/apps/todo/services/todo/views/tsconfig.app.json +20 -0
- package/template/apps/todo/services/todo/views/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/x-logic/package.json +22 -0
- package/template/apps/todo/services/todo/x-logic/src/index.ts +2 -0
- package/template/apps/todo/services/todo/x-logic/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/x-logic/tsconfig.lib.json +19 -0
- package/template/apps/todo/services/todo/x-models/package.json +22 -0
- package/template/apps/todo/services/todo/x-models/src/index.ts +2 -0
- package/template/apps/todo/services/todo/x-models/tsconfig.json +18 -0
- package/template/apps/todo/services/todo/x-models/tsconfig.lib.json +19 -0
- package/template/apps/todo/tsconfig.federated.json +13 -0
- package/template/docusaurus/DOCUMENTATION_CHECKLIST.md +499 -0
- package/template/docusaurus/README.md +41 -0
- package/template/docusaurus/blog/2019-05-28-first-blog-post.md +12 -0
- package/template/docusaurus/blog/2019-05-29-long-blog-post.md +44 -0
- package/template/docusaurus/blog/2021-08-01-mdx-blog-post.mdx +24 -0
- package/template/docusaurus/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
- package/template/docusaurus/blog/2021-08-26-welcome/index.md +29 -0
- package/template/docusaurus/blog/authors.yml +25 -0
- package/template/docusaurus/blog/tags.yml +19 -0
- package/template/docusaurus/docs/actions/core/_category_.json +8 -0
- package/template/docusaurus/docs/actions/core/ai/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/ai/ask-ai-prompt-stream.md +96 -0
- package/template/docusaurus/docs/actions/core/ai/ask-ai-prompt.md +121 -0
- package/template/docusaurus/docs/actions/core/array/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/array/ask-array-some.md +54 -0
- package/template/docusaurus/docs/actions/core/array/ask-filter.md +54 -0
- package/template/docusaurus/docs/actions/core/array/ask-flat-map-parallel-batch.md +68 -0
- package/template/docusaurus/docs/actions/core/array/ask-flat-map.md +56 -0
- package/template/docusaurus/docs/actions/core/array/ask-map-parallel-batch.md +67 -0
- package/template/docusaurus/docs/actions/core/array/ask-map-parallel.md +57 -0
- package/template/docusaurus/docs/actions/core/array/ask-map.md +58 -0
- package/template/docusaurus/docs/actions/core/array/ask-reduce.md +57 -0
- package/template/docusaurus/docs/actions/core/binary-data/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/binary-data/ask-create-text-qpq-binary-data.md +86 -0
- package/template/docusaurus/docs/actions/core/claude-ai/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/claude-ai/ask-claude-ai-messages-api.md +70 -0
- package/template/docusaurus/docs/actions/core/config/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-application-info.md +42 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-global.md +52 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-parameter.md +52 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-parameters.md +49 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-get-secret.md +54 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-list-parameters.md +46 -0
- package/template/docusaurus/docs/actions/core/config/ask-config-set-parameter.md +51 -0
- package/template/docusaurus/docs/actions/core/config/ask-get-application-version.md +39 -0
- package/template/docusaurus/docs/actions/core/context/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/context/ask-context-provide-value.md +78 -0
- package/template/docusaurus/docs/actions/core/context/ask-context-read.md +96 -0
- package/template/docusaurus/docs/actions/core/date/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/date/ask-date-now.md +50 -0
- package/template/docusaurus/docs/actions/core/date/ask-get-current-epoch-ms.md +45 -0
- package/template/docusaurus/docs/actions/core/date/ask-get-current-epoch.md +45 -0
- package/template/docusaurus/docs/actions/core/date/ask-get-epoch-start-time.md +40 -0
- package/template/docusaurus/docs/actions/core/date/ask-seconds-elapsed-from.md +52 -0
- package/template/docusaurus/docs/actions/core/date/date-time-math.md +112 -0
- package/template/docusaurus/docs/actions/core/error/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/error/ask-throw-error.md +115 -0
- package/template/docusaurus/docs/actions/core/event/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/event/ask-process-event.md +77 -0
- package/template/docusaurus/docs/actions/core/event-bus/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/event-bus/ask-event-bus-send-messages.md +104 -0
- package/template/docusaurus/docs/actions/core/file/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-delete.md +69 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-exists.md +68 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-generate-temporary-secure-url.md +75 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-generate-temporary-upload-secure-url.md +91 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-is-cold-storage.md +72 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-list-directory.md +97 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-read-binary-contents.md +78 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-read-object-json.md +72 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-read-text-contents.md +69 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-stream-open.md +102 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-write-binary-contents.md +98 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-write-object-json.md +83 -0
- package/template/docusaurus/docs/actions/core/file/ask-file-write-text-contents.md +69 -0
- package/template/docusaurus/docs/actions/core/graph-database/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/graph-database/ask-graph-database-execute-open-cypher-query.md +164 -0
- package/template/docusaurus/docs/actions/core/graph-database/ask-graph-database-internal-field-names.md +64 -0
- package/template/docusaurus/docs/actions/core/guid/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/guid/ask-new-guid.md +45 -0
- package/template/docusaurus/docs/actions/core/guid/ask-new-sortable-guid.md +49 -0
- package/template/docusaurus/docs/actions/core/inline-function/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/inline-function/ask-inline-function-execute.md +66 -0
- package/template/docusaurus/docs/actions/core/json/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/json/ask-decode-json.md +76 -0
- package/template/docusaurus/docs/actions/core/key-value-store/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-delete.md +57 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-get-all.md +60 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-get.md +73 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-query-all.md +58 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-query-single.md +62 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-query.md +129 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-scan-all.md +56 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-scan.md +71 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-update-partial-properties.md +75 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-update.md +106 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-upsert-with-retry.md +65 -0
- package/template/docusaurus/docs/actions/core/key-value-store/ask-key-value-store-upsert.md +71 -0
- package/template/docusaurus/docs/actions/core/log/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/log/ask-log-create.md +64 -0
- package/template/docusaurus/docs/actions/core/log/ask-log-disable-event-history.md +53 -0
- package/template/docusaurus/docs/actions/core/log/ask-log-template-literal.md +55 -0
- package/template/docusaurus/docs/actions/core/math/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/math/ask-random-number.md +46 -0
- package/template/docusaurus/docs/actions/core/metric/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/metric/ask-metric-put.md +67 -0
- package/template/docusaurus/docs/actions/core/network/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/network/ask-network-request.md +95 -0
- package/template/docusaurus/docs/actions/core/platform/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/platform/ask-delay.md +48 -0
- package/template/docusaurus/docs/actions/core/queue/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/queue/ask-queue-send-messages.md +89 -0
- package/template/docusaurus/docs/actions/core/state/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/state/ask-reduce-state.md +160 -0
- package/template/docusaurus/docs/actions/core/state/ask-state-dispatch.md +87 -0
- package/template/docusaurus/docs/actions/core/state/ask-state-read.md +45 -0
- package/template/docusaurus/docs/actions/core/stream/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/stream/ask-stream-close.md +56 -0
- package/template/docusaurus/docs/actions/core/stream/ask-stream-map.md +73 -0
- package/template/docusaurus/docs/actions/core/stream/ask-stream-process.md +57 -0
- package/template/docusaurus/docs/actions/core/stream/ask-stream-read.md +140 -0
- package/template/docusaurus/docs/actions/core/system/_category_.json +7 -0
- package/template/docusaurus/docs/actions/core/system/ask-batch.md +55 -0
- package/template/docusaurus/docs/actions/core/system/ask-catch.md +85 -0
- package/template/docusaurus/docs/actions/core/system/ask-execute-if.md +51 -0
- package/template/docusaurus/docs/actions/core/system/ask-execute-story.md +56 -0
- package/template/docusaurus/docs/actions/core/system/ask-get-runtime-correlation.md +46 -0
- package/template/docusaurus/docs/actions/core/system/ask-override-actions.md +76 -0
- package/template/docusaurus/docs/actions/core/system/ask-parallel-deprecated.md +55 -0
- package/template/docusaurus/docs/actions/core/system/ask-retry.md +72 -0
- package/template/docusaurus/docs/actions/core/system/ask-run-parallel.md +62 -0
- package/template/docusaurus/docs/actions/core/user-directory/_category_.json +1 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-associate-software-token.md +73 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-authenticate-user.md +124 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-change-password.md +55 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-confirm-email-verification.md +52 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-confirm-forgot-password.md +58 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-create-user.md +72 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-decode-access-token.md +73 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-forgot-password.md +66 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-get-user-attributes-by-user-id.md +53 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-get-user-attributes.md +78 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-get-users-by-attribute.md +59 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-get-users.md +71 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-read-access-token.md +52 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-refresh-token.md +53 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-request-email-verification.md +53 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-respond-to-auth-challenge.md +124 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-set-access-token.md +52 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-set-password.md +55 -0
- package/template/docusaurus/docs/actions/core/user-directory/ask-user-directory-set-user-attributes.md +60 -0
- package/template/docusaurus/docs/actions/features/_category_.json +1 -0
- package/template/docusaurus/docs/actions/features/event-doc/_category_.json +1 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-append-server-event.md +65 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-create.md +112 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-event-append.md +97 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-event-list.md +116 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-event-write.md +50 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-generate-asset-upload-url.md +127 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-get-by-code.md +97 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-get-by-id.md +121 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-get-draft.md +109 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-list.md +53 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-provide-store.md +160 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-resolve-actor.md +107 -0
- package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-soft-delete.md +69 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/_category_.json +1 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/active-chat-state.md +153 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-attachments-validate.md +63 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-chat-history-load.md +95 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-chat-list.md +91 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-chat-requests.md +93 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-context-read.md +84 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-load-chats.md +37 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-new-chat.md +43 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-process-send.md +70 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-select-chat.md +42 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-send-message.md +52 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/ask-event-doc-ai-service-request.md +53 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/chat-list-state.md +179 -0
- package/template/docusaurus/docs/actions/features/event-doc-ai/streaming-and-status-state.md +168 -0
- package/template/docusaurus/docs/actions/features/validation/_category_.json +1 -0
- package/template/docusaurus/docs/actions/features/validation/ask-validate-model-or-throw-error.md +73 -0
- package/template/docusaurus/docs/actions/webserver/_category_.json +8 -0
- package/template/docusaurus/docs/actions/webserver/admin/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/admin/ask-admin-get-log-metadata-children.md +62 -0
- package/template/docusaurus/docs/actions/webserver/admin/ask-admin-get-log-metadata.md +67 -0
- package/template/docusaurus/docs/actions/webserver/admin/ask-admin-get-log.md +84 -0
- package/template/docusaurus/docs/actions/webserver/admin/ask-admin-get-logs.md +96 -0
- package/template/docusaurus/docs/actions/webserver/api-key-validation/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/api-key-validation/ask-api-key-validation-validate.md +63 -0
- package/template/docusaurus/docs/actions/webserver/dns/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/dns/ask-dns-list.md +37 -0
- package/template/docusaurus/docs/actions/webserver/generic-data-resource/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/generic-data-resource/ask-put-generic-data-resource.md +48 -0
- package/template/docusaurus/docs/actions/webserver/generic-data-resource/ask-scan-generic-data-resource.md +49 -0
- package/template/docusaurus/docs/actions/webserver/open-api-spec/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/open-api-spec/ask-get-open-api-spec.md +43 -0
- package/template/docusaurus/docs/actions/webserver/route-auth-validation/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/route-auth-validation/ask-route-auth-validation-decode.md +65 -0
- package/template/docusaurus/docs/actions/webserver/service/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/service/ask-service-request.md +69 -0
- package/template/docusaurus/docs/actions/webserver/service-function/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/service-function/ask-service-function-execute.md +58 -0
- package/template/docusaurus/docs/actions/webserver/web-entry/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/web-entry/ask-web-entry-invalidate-cache.md +53 -0
- package/template/docusaurus/docs/actions/webserver/websocket/_category_.json +1 -0
- package/template/docusaurus/docs/actions/webserver/websocket/ask-websocket-send-message.md +71 -0
- package/template/docusaurus/docs/actions/xstate/_category_.json +1 -0
- package/template/docusaurus/docs/actions/xstate/ask-state-machine-create.md +60 -0
- package/template/docusaurus/docs/actions/xstate/ask-state-machine-get-state.md +65 -0
- package/template/docusaurus/docs/actions/xstate/ask-state-machine-get.md +57 -0
- package/template/docusaurus/docs/actions/xstate/ask-state-machine-send-event.md +69 -0
- package/template/docusaurus/docs/api/index.md +17 -0
- package/template/docusaurus/docs/architecture-overview.md +690 -0
- package/template/docusaurus/docs/config/config-aws/_category_.json +1 -0
- package/template/docusaurus/docs/config/config-aws/account-budget.md +117 -0
- package/template/docusaurus/docs/config/config-aws/account-cloud-trail.md +75 -0
- package/template/docusaurus/docs/config/config-aws/account-security-services.md +91 -0
- package/template/docusaurus/docs/config/config-aws/aws-alarm.md +142 -0
- package/template/docusaurus/docs/config/config-aws/aws-data-store-removal-policy.md +68 -0
- package/template/docusaurus/docs/config/config-aws/aws-dyanmo-override-for-kvs.md +70 -0
- package/template/docusaurus/docs/config/config-aws/aws-kms-key.md +100 -0
- package/template/docusaurus/docs/config/config-aws/aws-service-account-info.md +114 -0
- package/template/docusaurus/docs/config/config-aws/aws-service-dashboard.md +61 -0
- package/template/docusaurus/docs/config/config-aws/aws-virtual-network-settings.md +88 -0
- package/template/docusaurus/docs/config/config-aws/bootstrap-aws-organization.md +80 -0
- package/template/docusaurus/docs/config/config-aws/bootstrap-waf.md +106 -0
- package/template/docusaurus/docs/config/config-aws/domain-certificate.md +69 -0
- package/template/docusaurus/docs/config/config-aws/event-bus-quick-subscription.md +84 -0
- package/template/docusaurus/docs/config/config-aws/waf-protection.md +45 -0
- package/template/docusaurus/docs/config/core/_category_.json +8 -0
- package/template/docusaurus/docs/config/core/action-processors.md +65 -0
- package/template/docusaurus/docs/config/core/ai.md +80 -0
- package/template/docusaurus/docs/config/core/api-build-path.md +40 -0
- package/template/docusaurus/docs/config/core/application-module.md +58 -0
- package/template/docusaurus/docs/config/core/application-name.md +66 -0
- package/template/docusaurus/docs/config/core/application-version.md +58 -0
- package/template/docusaurus/docs/config/core/claude-ai.md +52 -0
- package/template/docusaurus/docs/config/core/config-value.md +38 -0
- package/template/docusaurus/docs/config/core/deploy-event.md +94 -0
- package/template/docusaurus/docs/config/core/environment-settings.md +67 -0
- package/template/docusaurus/docs/config/core/event-bus.md +88 -0
- package/template/docusaurus/docs/config/core/federated-module-store.md +61 -0
- package/template/docusaurus/docs/config/core/global.md +43 -0
- package/template/docusaurus/docs/config/core/graph-database.md +72 -0
- package/template/docusaurus/docs/config/core/inline-function.md +61 -0
- package/template/docusaurus/docs/config/core/javascript-runtime.md +79 -0
- package/template/docusaurus/docs/config/core/key-value-store.md +135 -0
- package/template/docusaurus/docs/config/core/module-name.md +46 -0
- package/template/docusaurus/docs/config/core/notify-error.md +97 -0
- package/template/docusaurus/docs/config/core/parameter.md +53 -0
- package/template/docusaurus/docs/config/core/promise-mode.md +39 -0
- package/template/docusaurus/docs/config/core/queue.md +112 -0
- package/template/docusaurus/docs/config/core/recurring-schedule.md +117 -0
- package/template/docusaurus/docs/config/core/secret.md +51 -0
- package/template/docusaurus/docs/config/core/service-settings.md +49 -0
- package/template/docusaurus/docs/config/core/storage-drive.md +142 -0
- package/template/docusaurus/docs/config/core/user-directory.md +189 -0
- package/template/docusaurus/docs/config/core/virtual-network.md +60 -0
- package/template/docusaurus/docs/config/features/_category_.json +1 -0
- package/template/docusaurus/docs/config/features/admin-session-event-doc.md +47 -0
- package/template/docusaurus/docs/config/features/admin-settings.md +106 -0
- package/template/docusaurus/docs/config/features/admin-user-directory.md +57 -0
- package/template/docusaurus/docs/config/features/event-doc-ai.md +104 -0
- package/template/docusaurus/docs/config/features/event-doc-routes.md +100 -0
- package/template/docusaurus/docs/config/features/event-doc-summary.md +59 -0
- package/template/docusaurus/docs/config/features/event-doc.md +75 -0
- package/template/docusaurus/docs/config/features/versioned-route.md +85 -0
- package/template/docusaurus/docs/config/neo4j/_category_.json +1 -0
- package/template/docusaurus/docs/config/neo4j/graph-database-neo4j.md +122 -0
- package/template/docusaurus/docs/config/webserver/_category_.json +8 -0
- package/template/docusaurus/docs/config/webserver/api-key.md +87 -0
- package/template/docusaurus/docs/config/webserver/api.md +75 -0
- package/template/docusaurus/docs/config/webserver/auth-system.md +110 -0
- package/template/docusaurus/docs/config/webserver/cache.md +94 -0
- package/template/docusaurus/docs/config/webserver/certificate.md +64 -0
- package/template/docusaurus/docs/config/webserver/default-route-options.md +77 -0
- package/template/docusaurus/docs/config/webserver/dns.md +57 -0
- package/template/docusaurus/docs/config/webserver/domain-proxy.md +109 -0
- package/template/docusaurus/docs/config/webserver/file-upload-settings.md +63 -0
- package/template/docusaurus/docs/config/webserver/migration.md +83 -0
- package/template/docusaurus/docs/config/webserver/open-api.md +36 -0
- package/template/docusaurus/docs/config/webserver/route.md +109 -0
- package/template/docusaurus/docs/config/webserver/seed.md +61 -0
- package/template/docusaurus/docs/config/webserver/seo.md +72 -0
- package/template/docusaurus/docs/config/webserver/service-function.md +69 -0
- package/template/docusaurus/docs/config/webserver/state-dispatch-over-websockets.md +42 -0
- package/template/docusaurus/docs/config/webserver/storage-drive-cors-settings.md +73 -0
- package/template/docusaurus/docs/config/webserver/subdomain-redirect.md +80 -0
- package/template/docusaurus/docs/config/webserver/web-entry.md +150 -0
- package/template/docusaurus/docs/config/webserver/web-socket-queue.md +88 -0
- package/template/docusaurus/docs/config/webserver/websocket.md +110 -0
- package/template/docusaurus/docs/config/xstate/_category_.json +1 -0
- package/template/docusaurus/docs/config/xstate/state-machine.md +201 -0
- package/template/docusaurus/docs/core-concepts.md +23 -0
- package/template/docusaurus/docs/getting-started.md +806 -0
- package/template/docusaurus/docs/index.md +211 -0
- package/template/docusaurus/docs/intro.md +47 -0
- package/template/docusaurus/docs/tutorial-basics/_category_.json +8 -0
- package/template/docusaurus/docs/tutorial-basics/congratulations.md +23 -0
- package/template/docusaurus/docs/tutorial-basics/create-a-blog-post.md +34 -0
- package/template/docusaurus/docs/tutorial-basics/create-a-document.md +57 -0
- package/template/docusaurus/docs/tutorial-basics/create-a-page.md +43 -0
- package/template/docusaurus/docs/tutorial-basics/deploy-your-site.md +31 -0
- package/template/docusaurus/docs/tutorial-basics/markdown-features.mdx +152 -0
- package/template/docusaurus/docs/tutorial-extras/_category_.json +7 -0
- package/template/docusaurus/docs/tutorial-extras/img/docsVersionDropdown.png +0 -0
- package/template/docusaurus/docs/tutorial-extras/img/localeDropdown.png +0 -0
- package/template/docusaurus/docs/tutorial-extras/manage-docs-versions.md +55 -0
- package/template/docusaurus/docs/tutorial-extras/translate-your-site.md +88 -0
- package/template/docusaurus/docs/use-cases.md +455 -0
- package/template/docusaurus/docusaurus.config.ts +181 -0
- package/template/docusaurus/gitignore +20 -0
- package/template/docusaurus/package.json +49 -0
- package/template/docusaurus/sidebars.ts +27 -0
- package/template/docusaurus/src/components/HomepageFeatures/index.tsx +72 -0
- package/template/docusaurus/src/components/HomepageFeatures/styles.module.css +11 -0
- package/template/docusaurus/src/css/custom.css +423 -0
- package/template/docusaurus/src/pages/index.module.css +23 -0
- package/template/docusaurus/static/.nojekyll +0 -0
- package/template/docusaurus/static/img/docusaurus-social-card.jpg +0 -0
- package/template/docusaurus/static/img/docusaurus.png +0 -0
- package/template/docusaurus/static/img/favicon.ico +0 -0
- package/template/docusaurus/static/img/favicon.svg +4 -0
- package/template/docusaurus/static/img/logo.svg +1 -0
- package/template/docusaurus/static/img/qpq-logo.svg +4 -0
- package/template/docusaurus/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/template/docusaurus/static/img/undraw_docusaurus_react.svg +170 -0
- package/template/docusaurus/static/img/undraw_docusaurus_tree.svg +40 -0
- package/template/docusaurus/tsconfig.json +8 -0
- package/template/eslint.config.mjs +3 -0
- package/template/gitignore +116 -0
- package/template/package.json +126 -0
- package/template/tsconfig.base.json +23 -0
- package/template/tsconfig.json +16 -0
- package/template/types/assets.d.ts +3 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askUserDirectorySetUserAttributes
|
|
3
|
+
description: Update a user's profile attributes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askUserDirectorySetUserAttributes
|
|
7
|
+
|
|
8
|
+
Updates a user's profile attributes in a [user directory](../../../config/core/user-directory.md). Only the attributes you pass are written; omitted attributes are left unchanged.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `UserDirectoryActionType.SetUserAttributes`
|
|
11
|
+
- **On AWS:** issues Cognito `AdminUpdateUserAttributes`.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askUserDirectorySetUserAttributes } from 'quidproquo-core';
|
|
15
|
+
|
|
16
|
+
export function* askUpdateProfile(username: string) {
|
|
17
|
+
yield* askUserDirectorySetUserAttributes('app-users', username, {
|
|
18
|
+
givenName: 'Ada',
|
|
19
|
+
familyName: 'Lovelace',
|
|
20
|
+
locale: 'en-GB',
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Signature
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
function* askUserDirectorySetUserAttributes(
|
|
29
|
+
userDirectoryName: string,
|
|
30
|
+
username: string,
|
|
31
|
+
userAttributes: UserAttributes,
|
|
32
|
+
): AskResponse<void>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `userDirectoryName` | `string` | Name of the directory — must match a directory declared with [defineUserDirectory](../../../config/core/user-directory.md). |
|
|
40
|
+
| `username` | `string` | The user (email) to update. |
|
|
41
|
+
| `userAttributes` | `UserAttributes` | The attributes to set. See [UserAttributes](./ask-user-directory-get-user-attributes.md#userattributes). All properties are optional; only those provided are written. |
|
|
42
|
+
|
|
43
|
+
## Returns
|
|
44
|
+
|
|
45
|
+
`void` — the story resumes once the attributes have been updated.
|
|
46
|
+
|
|
47
|
+
## Errors
|
|
48
|
+
|
|
49
|
+
| Error | Meaning |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `UserDirectorySetUserAttributesErrorTypeEnum.UserNotFound` | No user matches the supplied username. |
|
|
52
|
+
| `UserDirectorySetUserAttributesErrorTypeEnum.InvalidAttributes` | One or more supplied attribute names/values are invalid. |
|
|
53
|
+
| `UserDirectorySetUserAttributesErrorTypeEnum.AliasExists` | An email/phone attribute value is already in use by another account. |
|
|
54
|
+
| `UserDirectorySetUserAttributesErrorTypeEnum.LimitExceeded` | Too many attempts; back off and retry later. |
|
|
55
|
+
|
|
56
|
+
## Related
|
|
57
|
+
|
|
58
|
+
- [askUserDirectoryGetUserAttributes](./ask-user-directory-get-user-attributes.md) — read the attributes you are updating.
|
|
59
|
+
- [askUserDirectoryCreateUser](./ask-user-directory-create-user.md) — set initial attributes at creation time.
|
|
60
|
+
- [defineUserDirectory](../../../config/core/user-directory.md) — declares the directory.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "label": "quidproquo-features", "position": 4, "link": { "type": "generated-index", "description": "Action requesters from quidproquo-features — event-document, AI-chat, admin, and validation stories." } }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "label": "Event documents", "link": { "type": "generated-index", "description": "Action requesters for event-sourced documents — create, read, delete, and resolve draft/published versions of a document derived by folding its event log." } }
|
package/template/docusaurus/docs/actions/features/event-doc/ask-event-doc-append-server-event.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askEventDocAppendServerEvent
|
|
3
|
+
description: Append a server-authored event to a document's log, building the event envelope from a type, typed data, and version.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askEventDocAppendServerEvent
|
|
7
|
+
|
|
8
|
+
Appends a **server-authored** event to a document's log. It is the backend analog of the editor's client-side action creators: callers pass the effect `type`, the typed `data`, and the schema `version`, and it builds the `EventDocEventInput` envelope (minting a fresh `clientMessageId` for dedup) before delegating to [askEventDocEventAppend](./ask-event-doc-event-append.md). Use it for the rarer case where the server itself authors an event — for example recording a generated secret or a rendered artifact — rather than a client POSTing one.
|
|
9
|
+
|
|
10
|
+
- **Built from:** `askNewGuid` + [askEventDocEventAppend](./ask-event-doc-event-append.md). Not a single action.
|
|
11
|
+
- **Requires the store context** — provide it via [askEventDocProvideStore](./ask-event-doc-provide-store.md) or [askEventDocProvideStoreFromGlobals](./ask-event-doc-provide-store.md#askeventdocprovidestorefromglobals).
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askEventDocAppendServerEvent } from 'quidproquo-features';
|
|
15
|
+
|
|
16
|
+
export function* recordGeneratedSecret(docId: string, secretRef: string) {
|
|
17
|
+
const actor = yield* askEventDocResolveActor();
|
|
18
|
+
|
|
19
|
+
return yield* askEventDocAppendServerEvent(
|
|
20
|
+
docId,
|
|
21
|
+
'SET_SECRET_REF',
|
|
22
|
+
{ secretRef },
|
|
23
|
+
1, // schema version
|
|
24
|
+
actor,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Signature
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
function* askEventDocAppendServerEvent<T>(
|
|
33
|
+
modelId: string,
|
|
34
|
+
type: string,
|
|
35
|
+
data: T,
|
|
36
|
+
version: number,
|
|
37
|
+
actor: EventDocEventActor,
|
|
38
|
+
): AskResponse<EventDocEvent>;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Parameters
|
|
42
|
+
|
|
43
|
+
| Parameter | Type | Description |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| `modelId` | `string` | The document id whose log the event is appended to. |
|
|
46
|
+
| `type` | `string` | The effect/event type discriminant to record. |
|
|
47
|
+
| `data` | `T` | The typed domain data for the event. |
|
|
48
|
+
| `version` | `number` | The schema version this event is authored against (see [askEventDocEventAppend](./ask-event-doc-event-append.md) for version rules). |
|
|
49
|
+
| `actor` | `EventDocEventActor` | Who the event is stamped as authored by — `{ userId, userDisplayName }`. Typically from [askEventDocResolveActor](./ask-event-doc-resolve-actor.md). |
|
|
50
|
+
|
|
51
|
+
## Returns
|
|
52
|
+
|
|
53
|
+
`AskResponse<EventDocEvent>` — the appended event with its server-stamped metadata (`index`, `createdAt`, `createdBy`, and the generated `clientMessageId`).
|
|
54
|
+
|
|
55
|
+
## Notes
|
|
56
|
+
|
|
57
|
+
- All of [askEventDocEventAppend](./ask-event-doc-event-append.md)'s invariants apply — version monotonicity, lifecycle/payload validation, and optimistic-concurrency retry — since this is a thin envelope-building wrapper over it. It can therefore throw the same `ErrorTypeEnum.NotFound` / `ErrorTypeEnum.Conflict`.
|
|
58
|
+
- A fresh `clientMessageId` is generated on every call, so this path does not participate in client retry dedup — each call is a distinct intended event.
|
|
59
|
+
|
|
60
|
+
## Related
|
|
61
|
+
|
|
62
|
+
- [askEventDocEventAppend](./ask-event-doc-event-append.md) — the underlying append this wraps.
|
|
63
|
+
- [askEventDocWriteAsset](./ask-event-doc-generate-asset-upload-url.md#askeventdocwriteasset) — the server-side twin for writing asset bytes (often recorded by a server event).
|
|
64
|
+
- [askEventDocResolveActor](./ask-event-doc-resolve-actor.md) — resolves the `actor` argument.
|
|
65
|
+
- [askEventDocProvideStore](./ask-event-doc-provide-store.md) — provides the required store context.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askEventDocCreate
|
|
3
|
+
description: Create an event-sourced document — seed its INIT_STATE event and derive the summary record.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askEventDocCreate
|
|
7
|
+
|
|
8
|
+
Creates a new event document. It seeds the document's log with an `INIT_STATE` event carrying the document's identity (`id`, `code`, `name`), then derives the queryable **summary record** from that event and writes it — the same fold-and-upsert path every later append uses, so create and append can never drift. Returns the new [`EventDocSummary`](./ask-event-doc-get-by-id.md#the-summary-record).
|
|
9
|
+
|
|
10
|
+
- **Built from:** [askEventDocSeedInitState](#askeventdocseedinitstate) (writes the `INIT_STATE` event) then the summary reducer + [askEventDocUpsert](#askeventdocupsert) (persists the derived record). Requires the store context — call it inside `askEventDocProvideStore({ storeName, type }, ...)`, or from a built-in route where the context is already provided.
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { askEventDocCreate } from 'quidproquo-features';
|
|
14
|
+
|
|
15
|
+
export function* createArticle(name: string, code: string) {
|
|
16
|
+
const summary = yield* askEventDocCreate(name, code, {
|
|
17
|
+
userId: 'user-123',
|
|
18
|
+
userDisplayName: 'Ada Lovelace',
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return summary; // EventDocSummary — id, code, name, versions: [...]
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Signature
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
function* askEventDocCreate(
|
|
29
|
+
name: string,
|
|
30
|
+
code: string,
|
|
31
|
+
actor: EventDocEventActor,
|
|
32
|
+
): AskResponse<EventDocSummary>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `name` | `string` | Human-readable name for the document. Stored on the summary and editable later via a `SET_NAME` event. |
|
|
40
|
+
| `code` | `string` | The document's stable business **code** — a caller-chosen key (e.g. a slug or reference) that stays constant across versions, expected unique within the collection (and any owner scope). Editable later via a `SET_CODE` event. |
|
|
41
|
+
| `actor` | `EventDocEventActor` | Who is creating the document — recorded on the `INIT_STATE` event and as the record's `createdBy`/`updatedBy`. |
|
|
42
|
+
|
|
43
|
+
### `EventDocEventActor`
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
type EventDocEventActor = {
|
|
47
|
+
userId: string; // stable, authoritative user key
|
|
48
|
+
userDisplayName: string; // display-only snapshot, as it was at event time
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
A point-in-time snapshot of who produced an event, captured server-side at append time. Denormalised so history renders without a user lookup.
|
|
53
|
+
|
|
54
|
+
## Returns
|
|
55
|
+
|
|
56
|
+
`EventDocSummary` — the freshly derived summary record. Its `versions` array holds the first (draft) version pointer; `status` is `Draft`; `createdAt`/`updatedAt` are the `INIT_STATE` time.
|
|
57
|
+
|
|
58
|
+
## Notes
|
|
59
|
+
|
|
60
|
+
- The record is validated against `eventDocSummarySchema` before it is written; a schema violation throws (`ErrorTypeEnum` from quidproquo-core).
|
|
61
|
+
- Not concurrency-safe against duplicate codes on its own. If two callers may create the same `code` at once, prefer [askEventDocGetByCodeOrCreate](./ask-event-doc-get-by-code.md#askeventdocgetbycodeorcreate) and serialise, or add a conditional create.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## askEventDocSeedInitState
|
|
66
|
+
|
|
67
|
+
Seeds a new document's log with its `INIT_STATE` event at index `0`, carrying the identity (`id`/`code`/`name`). This is the create-only primitive `askEventDocCreate` composes; clients never send `INIT_STATE` themselves. It writes the event and returns it.
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
function* askEventDocSeedInitState(
|
|
71
|
+
modelId: string,
|
|
72
|
+
code: string,
|
|
73
|
+
name: string,
|
|
74
|
+
actor: EventDocEventActor,
|
|
75
|
+
): AskResponse<EventDocEvent>;
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
| Parameter | Type | Description |
|
|
79
|
+
| --- | --- | --- |
|
|
80
|
+
| `modelId` | `string` | The new document's id (the log's partition). Usually a fresh GUID. |
|
|
81
|
+
| `code` | `string` | The document's business code (see above). |
|
|
82
|
+
| `name` | `string` | The document's name. |
|
|
83
|
+
| `actor` | `EventDocEventActor` | Who is creating the document. |
|
|
84
|
+
|
|
85
|
+
**Returns** `EventDocEvent` — the written `INIT_STATE` event, with `payload.metadata.index === 0` and `version === 1`.
|
|
86
|
+
|
|
87
|
+
Use `askEventDocCreate` unless you are building a custom create flow that needs the raw event; `askEventDocSeedInitState` alone writes the log but does **not** derive or persist the summary record.
|
|
88
|
+
|
|
89
|
+
## askEventDocUpsert
|
|
90
|
+
|
|
91
|
+
The bare storage write for a summary record — a thin wrapper over the key-value store upsert (with retry). Business rules and validation live in the logic layer (e.g. `askEventDocCreate`, [askEventDocSoftDelete](./ask-event-doc-soft-delete.md)); this just persists whatever record you hand it.
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
function* askEventDocUpsert(model: EventDocSummary): AskResponse<void>;
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
| Parameter | Type | Description |
|
|
98
|
+
| --- | --- | --- |
|
|
99
|
+
| `model` | `EventDocSummary` | The full summary record to write (create or overwrite). |
|
|
100
|
+
|
|
101
|
+
**Returns** `void`.
|
|
102
|
+
|
|
103
|
+
Prefer the higher-level lifecycle actions over calling `askEventDocUpsert` directly — writing an un-derived record can put the summary out of sync with the event log.
|
|
104
|
+
|
|
105
|
+
## Related
|
|
106
|
+
|
|
107
|
+
- [askEventDocGetByCodeOrCreate](./ask-event-doc-get-by-code.md#askeventdocgetbycodeorcreate) — create-on-first-use built on top of this.
|
|
108
|
+
- [askEventDocGetById / askEventDocGetByIdOrThrow](./ask-event-doc-get-by-id.md) — read the record back.
|
|
109
|
+
- [askEventDocSoftDelete](./ask-event-doc-soft-delete.md) — retire a document.
|
|
110
|
+
- **Appending events after create:** `askEventDocEventAppend` (quidproquo-features) applies each later event through the same reducer.
|
|
111
|
+
- [defineEventDocSummary](../../../config/features/event-doc-summary.md) — declares the store this writes to.
|
|
112
|
+
- [askNewGuid](../../core/guid/ask-new-guid.md) / [askDateNow](../../core/date/ask-date-now.md) — the core actions the create path uses for id and timestamps.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askEventDocEventAppend
|
|
3
|
+
description: Append a client-authored event to a document's log with dedup, version and lifecycle validation, and optimistic-concurrency retry.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askEventDocEventAppend
|
|
7
|
+
|
|
8
|
+
Appends a single client-authored event to a document's ordered event stream — the write half of the event-sourcing core. This is where the append-time safety invariants live: idempotent dedup, version monotonicity, lifecycle/payload validation, and optimistic-concurrency retry. After the event is written it also re-derives the queryable summary record so the document's status, version, name, and timestamps stay in sync with the log.
|
|
9
|
+
|
|
10
|
+
- **Built from:** a story composing `askRetry`, `askEventDocEventLast`, `askEventDocEventListAll`, `askEventDocEventWrite`, `askEventDocGetByIdOrThrow`, and (when the collection configures one) an `askInlineFunctionExecute` validator. Not a single action.
|
|
11
|
+
- **Requires the store context** — wrap the call in [askEventDocProvideStore](./ask-event-doc-provide-store.md) (custom routes) or [askEventDocProvideStoreFromGlobals](./ask-event-doc-provide-store.md#askeventdocprovidestorefromglobals) (built-in routes).
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askEventDocEventAppend } from 'quidproquo-features';
|
|
15
|
+
|
|
16
|
+
export function* appendTitleChange(docId: string) {
|
|
17
|
+
const actor = yield* askEventDocResolveActor();
|
|
18
|
+
|
|
19
|
+
const event = yield* askEventDocEventAppend(
|
|
20
|
+
docId,
|
|
21
|
+
{
|
|
22
|
+
type: 'SET_NAME',
|
|
23
|
+
payload: {
|
|
24
|
+
data: { name: 'Q3 Report' },
|
|
25
|
+
metadata: { version: 3, clientMessageId: yield* askNewGuid() },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
actor,
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
return event.payload.metadata.index;
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Signature
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
function* askEventDocEventAppend(
|
|
39
|
+
modelId: string,
|
|
40
|
+
input: EventDocEventInput,
|
|
41
|
+
actor: EventDocEventActor,
|
|
42
|
+
): AskResponse<EventDocEvent>;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Parameters
|
|
46
|
+
|
|
47
|
+
| Parameter | Type | Description |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| `modelId` | `string` | The document id whose log the event is appended to. The document must already have an `INIT_STATE` event (created via `askEventDocCreate`), or the append throws `NotFound`. |
|
|
50
|
+
| `input` | `EventDocEventInput` | The client-authored event envelope — see below. |
|
|
51
|
+
| `actor` | `EventDocEventActor` | Who authored the event; stamped onto the event as `createdBy`. Usually obtained from [askEventDocResolveActor](./ask-event-doc-resolve-actor.md). |
|
|
52
|
+
|
|
53
|
+
### `EventDocEventInput`
|
|
54
|
+
|
|
55
|
+
What the client POSTs to append an event. `modelId` and the server-stamped provenance (`index`, `createdAt`, `createdBy`) are NOT part of it.
|
|
56
|
+
|
|
57
|
+
| Property | Type | Description |
|
|
58
|
+
| --- | --- | --- |
|
|
59
|
+
| `type` | `string` | The effect/event type discriminant (e.g. `SET_NAME`). The reducer folds it by this. |
|
|
60
|
+
| `payload.data` | `T` | The typed domain data for the event. |
|
|
61
|
+
| `payload.metadata.version` | `number` | The schema version the client authored against. Must be `>=` the last event's version — an older version throws `Conflict`. |
|
|
62
|
+
| `payload.metadata.clientMessageId` | `string` | A client-generated id used for dedup: if the latest event already carries it, the append is a no-op and returns that event unchanged. |
|
|
63
|
+
|
|
64
|
+
### `EventDocEventActor`
|
|
65
|
+
|
|
66
|
+
| Property | Type | Description |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| `userId` | `string` | The stable, authoritative user key. |
|
|
69
|
+
| `userDisplayName` | `string` | The display name captured at append time (denormalised so history renders without a user lookup). |
|
|
70
|
+
|
|
71
|
+
## Returns
|
|
72
|
+
|
|
73
|
+
`AskResponse<EventDocEvent>` — the event that now lives in the log, with server-stamped metadata (`index`, `createdAt`, `createdBy`) filled in. On a deduped retry, the pre-existing event is returned unchanged.
|
|
74
|
+
|
|
75
|
+
### `EventDocEvent`
|
|
76
|
+
|
|
77
|
+
| Property | Type | Description |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| `type` | `string` | The event type discriminant. |
|
|
80
|
+
| `payload.data` | `T` | The typed domain data. |
|
|
81
|
+
| `payload.metadata` | `EventDocEventMetadata` | Full provenance: `version`, `clientMessageId`, `createdBy`, `createdAt`, and `index` (mirrors the storage sort key). |
|
|
82
|
+
|
|
83
|
+
## Notes
|
|
84
|
+
|
|
85
|
+
- **Dedup** is best-effort against the latest event only (until a GSI exists): a retry that re-sends the same `clientMessageId` returns the existing tail event without writing.
|
|
86
|
+
- **Validation** always runs against the log folded from prior events. If the collection configured an `eventValidator` inline function it runs that (a complete validator that already composes the reserved lifecycle guard); otherwise it runs `defaultEventDocEventValidator` — the same guard with no domain rules. Exactly one validator runs. A rejected event throws `Conflict` with the validator's reason.
|
|
87
|
+
- **Concurrency:** the underlying write ([askEventDocEventWrite](./ask-event-doc-event-write.md)) claims the `(modelId, index)` slot conditionally. A losing concurrent writer gets a key-value-store upsert conflict — the only error the internal `askRetry` re-laps on — re-reads the tail, and re-runs dedup/validation against fresh state, so concurrent appends serialize onto consecutive indexes. After `MAX_APPEND_ATTEMPTS` (8) lost races it throws `ErrorTypeEnum.Conflict`.
|
|
88
|
+
- **Thrown `ErrorTypeEnum` values:** `NotFound` (no `INIT_STATE`), `Conflict` (stale version, failed validation, or exhausted concurrency retries). These are thrown via `askThrowError`, not a per-action error enum.
|
|
89
|
+
- After writing, it re-derives and upserts the document's summary record (via `applyEventDocSummaryEvent`) so the queryable view stays consistent with the log.
|
|
90
|
+
|
|
91
|
+
## Related
|
|
92
|
+
|
|
93
|
+
- [askEventDocAppendServerEvent](./ask-event-doc-append-server-event.md) — the server-authored wrapper that builds the input envelope for you.
|
|
94
|
+
- [askEventDocEventWrite](./ask-event-doc-event-write.md) — the low-level conditional write this composes.
|
|
95
|
+
- [askEventDocEventList / EventListAll / EventLast](./ask-event-doc-event-list.md) — reading the log this appends to.
|
|
96
|
+
- [askEventDocProvideStore](./ask-event-doc-provide-store.md) — provides the store context this requires.
|
|
97
|
+
- [askEventDocResolveActor](./ask-event-doc-resolve-actor.md) — resolves the `actor` argument from the access token.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askEventDocEventList
|
|
3
|
+
description: Read a document's event log — a page of events, the whole log flattened, or just the latest event.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Reading the event log
|
|
7
|
+
|
|
8
|
+
Three read helpers over a document's event stream. All three resolve the collection's events store from the store context and query it by `pk = modelId`, ascending by log index (except `askEventDocEventLast`, which reads the tail). They are the read side of the event-sourcing core, feeding the fold that reconstructs a document from its events.
|
|
9
|
+
|
|
10
|
+
- **Requires the store context** — provide it via [askEventDocProvideStore](./ask-event-doc-provide-store.md) / [askEventDocProvideStoreFromGlobals](./ask-event-doc-provide-store.md#askeventdocprovidestorefromglobals).
|
|
11
|
+
- **Built from:** [askKeyValueStoreQuery](../../core/key-value-store/ask-key-value-store-query.md) against the events store, plus [askEventDocResolveStore](./ask-event-doc-provide-store.md#askeventdocresolvestore). Not single actions.
|
|
12
|
+
|
|
13
|
+
## askEventDocEventList
|
|
14
|
+
|
|
15
|
+
Returns one page of events for a document, oldest first. Supports paging and, via `afterIndex`, fetching only the tail since a known index — an incremental refresh.
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { askEventDocEventList } from 'quidproquo-features';
|
|
19
|
+
|
|
20
|
+
export function* refreshSince(docId: string, lastSeenIndex: number) {
|
|
21
|
+
const page = yield* askEventDocEventList(docId, { afterIndex: lastSeenIndex });
|
|
22
|
+
return page.items; // events with index > lastSeenIndex
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Signature
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
function* askEventDocEventList(
|
|
30
|
+
modelId: string,
|
|
31
|
+
options?: EventDocEventListOptions,
|
|
32
|
+
): AskResponse<QpqPagedData<EventDocEvent>>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `modelId` | `string` | The document id to read events for. |
|
|
40
|
+
| `options` | `EventDocEventListOptions` | Optional paging / range options — see below. |
|
|
41
|
+
|
|
42
|
+
#### `EventDocEventListOptions`
|
|
43
|
+
|
|
44
|
+
| Property | Type | Default | Description |
|
|
45
|
+
| --- | --- | --- | --- |
|
|
46
|
+
| `limit` | `number` | (store default) | Max number of events to return in the page. |
|
|
47
|
+
| `nextPageKey` | `string` | — | Continuation token from a previous page's `nextPageKey`. |
|
|
48
|
+
| `afterIndex` | `number` | — | Return only events whose log index is greater than this (exclusive). A sort-key range condition on the events store's primary key — no GSI involved. |
|
|
49
|
+
|
|
50
|
+
### Returns
|
|
51
|
+
|
|
52
|
+
`AskResponse<QpqPagedData<EventDocEvent>>` — `{ items: EventDocEvent[]; nextPageKey?: string }`. Events are ordered ascending by index; `nextPageKey` is present when more events remain.
|
|
53
|
+
|
|
54
|
+
## askEventDocEventListAll
|
|
55
|
+
|
|
56
|
+
Pages through the **whole** log (ascending) and returns it as a flat array — the complete history a from-scratch fold needs. The append-time validator uses this; until state snapshots exist it re-reads the full log per validated append, so treat it as O(log length).
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { askEventDocEventListAll } from 'quidproquo-features';
|
|
60
|
+
|
|
61
|
+
export function* fullHistory(docId: string) {
|
|
62
|
+
return yield* askEventDocEventListAll(docId); // EventDocEvent[]
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Signature
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
function* askEventDocEventListAll(modelId: string): AskResponse<EventDocEvent[]>;
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Parameters
|
|
73
|
+
|
|
74
|
+
| Parameter | Type | Description |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| `modelId` | `string` | The document id to read the full log for. |
|
|
77
|
+
|
|
78
|
+
### Returns
|
|
79
|
+
|
|
80
|
+
`AskResponse<EventDocEvent[]>` — every event for the document, ordered ascending by index. Internally loops [askEventDocEventList](#askeventdoceventlist) until there is no `nextPageKey`.
|
|
81
|
+
|
|
82
|
+
## askEventDocEventLast
|
|
83
|
+
|
|
84
|
+
Returns the newest event in the log, or `null` if the document has no events. Used to assign the next index, dedup, and validate during an append. Relies on numeric sort-key ordering (the dev server sorts numeric sort keys numerically, matching DynamoDB), so it returns the true latest.
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
import { askEventDocEventLast } from 'quidproquo-features';
|
|
88
|
+
|
|
89
|
+
export function* currentVersion(docId: string) {
|
|
90
|
+
const last = yield* askEventDocEventLast(docId);
|
|
91
|
+
return last ? last.payload.metadata.version : 0;
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Signature
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
function* askEventDocEventLast(modelId: string): AskResponse<Nullable<EventDocEvent>>;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Parameters
|
|
102
|
+
|
|
103
|
+
| Parameter | Type | Description |
|
|
104
|
+
| --- | --- | --- |
|
|
105
|
+
| `modelId` | `string` | The document id to read the tail of. |
|
|
106
|
+
|
|
107
|
+
### Returns
|
|
108
|
+
|
|
109
|
+
`AskResponse<Nullable<EventDocEvent>>` — the latest [EventDocEvent](./ask-event-doc-event-append.md#eventdocevent), or `null` when the log is empty.
|
|
110
|
+
|
|
111
|
+
## Related
|
|
112
|
+
|
|
113
|
+
- [askEventDocEventAppend](./ask-event-doc-event-append.md) — the write side; uses `EventLast` and `EventListAll` internally.
|
|
114
|
+
- [askEventDocEventWrite](./ask-event-doc-event-write.md) — the low-level conditional write.
|
|
115
|
+
- [askEventDocProvideStore](./ask-event-doc-provide-store.md) — provides the store context these require.
|
|
116
|
+
- [askKeyValueStoreQuery](../../core/key-value-store/ask-key-value-store-query.md) — the underlying query action.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askEventDocEventWrite
|
|
3
|
+
description: Low-level conditional write of a single event to a document's events store, claiming its (modelId, index) slot atomically.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askEventDocEventWrite
|
|
7
|
+
|
|
8
|
+
The low-level write primitive behind the event log. It persists one already-built [EventDocEvent](./ask-event-doc-event-append.md#eventdocevent) into the collection's events store, keyed by `pk = modelId` / `sk = index`. The write is **conditional** (`ifNotExists`): the `(modelId, index)` slot is claimed atomically, so a concurrent writer that computed the same index gets a conflict instead of silently overwriting the event.
|
|
9
|
+
|
|
10
|
+
Ordering, index assignment, dedup, validation, and the conflict-retry loop all live one layer up in [askEventDocEventAppend](./ask-event-doc-event-append.md) — you almost always want that instead. Call this directly only when you are implementing your own append semantics.
|
|
11
|
+
|
|
12
|
+
- **Built from:** [askKeyValueStoreUpsertWithRetry](../../core/key-value-store/ask-key-value-store-upsert-with-retry.md) with `{ ifNotExists: true }`, plus [askEventDocResolveStore](./ask-event-doc-provide-store.md#askeventdocresolvestore) to find the events store name. Not a single action.
|
|
13
|
+
- **Requires the store context** — provide it via [askEventDocProvideStore](./ask-event-doc-provide-store.md) / [askEventDocProvideStoreFromGlobals](./ask-event-doc-provide-store.md#askeventdocprovidestorefromglobals).
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { askEventDocEventWrite } from 'quidproquo-features';
|
|
17
|
+
|
|
18
|
+
export function* persistPrebuiltEvent(docId: string, event: EventDocEvent) {
|
|
19
|
+
yield* askEventDocEventWrite(docId, event);
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Signature
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
function* askEventDocEventWrite(modelId: string, event: EventDocEvent): AskResponse<void>;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Parameters
|
|
30
|
+
|
|
31
|
+
| Parameter | Type | Description |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `modelId` | `string` | The document id — becomes the partition key (`pk`) of the stored event. |
|
|
34
|
+
| `event` | `EventDocEvent` | A fully-formed event, including `payload.metadata.index` — the index becomes the sort key (`sk`) and the slot that is claimed conditionally. |
|
|
35
|
+
|
|
36
|
+
## Returns
|
|
37
|
+
|
|
38
|
+
`AskResponse<void>` — the story resumes once the event is written.
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
|
|
42
|
+
- The stored shape is `{ pk: modelId, sk: index, data: event }`; the `EventDocStoredEvent` mapping is the only place that knows the key layout, keeping the domain event free of storage concerns.
|
|
43
|
+
- Because the write is conditional, a losing concurrent writer surfaces `KeyValueStoreUpsertErrorTypeEnum.Conflict`. [askEventDocEventAppend](./ask-event-doc-event-append.md) is the layer that catches and re-laps on exactly that error.
|
|
44
|
+
|
|
45
|
+
## Related
|
|
46
|
+
|
|
47
|
+
- [askEventDocEventAppend](./ask-event-doc-event-append.md) — the high-level append that computes the index, validates, and retries around this write.
|
|
48
|
+
- [askEventDocEventList / EventListAll / EventLast](./ask-event-doc-event-list.md) — reading events back.
|
|
49
|
+
- [askKeyValueStoreUpsertWithRetry](../../core/key-value-store/ask-key-value-store-upsert-with-retry.md) — the underlying conditional upsert.
|
|
50
|
+
- [askEventDocProvideStore](./ask-event-doc-provide-store.md) — provides the required store context.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askEventDocGenerateAssetUploadUrl
|
|
3
|
+
description: Manage a document's immutable assets — mint presigned upload/download URLs, or write server-generated bytes directly.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Document assets
|
|
7
|
+
|
|
8
|
+
A document can point at binary **assets** — images, fonts, rendered artifacts — without embedding the bytes. Each asset is stored immutably on the collection's storage drive under `<docId>/assets/<guid>`, and the document records only a reference (the guid) inside a domain event. Because every upload gets a fresh guid, a re-upload is a new blob and prior references stay addressable for history and rollback.
|
|
9
|
+
|
|
10
|
+
These three helpers cover the two flows: presigned URLs for a browser to upload/download bytes directly, and a server-side write for when the backend already holds the bytes.
|
|
11
|
+
|
|
12
|
+
- **Requires the store context** — provide it via [askEventDocProvideStore](./ask-event-doc-provide-store.md) / [askEventDocProvideStoreFromGlobals](./ask-event-doc-provide-store.md#askeventdocprovidestorefromglobals). The drive name is resolved from that context.
|
|
13
|
+
- **Built from:** the core file secure-URL / binary-write actions on the collection's storage drive, plus [askEventDocResolveStore](./ask-event-doc-provide-store.md#askeventdocresolvestore). Not single actions.
|
|
14
|
+
|
|
15
|
+
## askEventDocGenerateAssetUploadUrl
|
|
16
|
+
|
|
17
|
+
Mints a guid and a short-lived presigned `PUT` URL the client uploads the bytes to. Returns the guid (as `assetId`) so the caller can record it in a domain event. This is one complete storage operation — no bytes pass through your service.
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { askEventDocGenerateAssetUploadUrl } from 'quidproquo-features';
|
|
21
|
+
|
|
22
|
+
export function* startImageUpload(docId: string) {
|
|
23
|
+
const { uploadUrl, assetId } = yield* askEventDocGenerateAssetUploadUrl(docId, 'image/png');
|
|
24
|
+
// client PUTs bytes to uploadUrl, then appends an event recording assetId
|
|
25
|
+
return { uploadUrl, assetId };
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Signature
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
function* askEventDocGenerateAssetUploadUrl(
|
|
33
|
+
docId: string,
|
|
34
|
+
contentType: string,
|
|
35
|
+
): AskResponse<EventDocAssetUploadUrl>;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Parameters
|
|
39
|
+
|
|
40
|
+
| Parameter | Type | Description |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `docId` | `string` | The document the asset belongs to — determines the `<docId>/assets/<guid>` blob key. |
|
|
43
|
+
| `contentType` | `string` | The MIME type the client will upload; pinned into the presigned `PUT` URL. |
|
|
44
|
+
|
|
45
|
+
### Returns
|
|
46
|
+
|
|
47
|
+
`AskResponse<EventDocAssetUploadUrl>` — `{ uploadUrl: string; assetId: string }`. The URL is valid for 5 minutes; `assetId` is the guid that names the blob, to be recorded in a domain event.
|
|
48
|
+
|
|
49
|
+
## askEventDocGenerateAssetDownloadUrl
|
|
50
|
+
|
|
51
|
+
Returns a short-lived presigned `GET` URL the client loads an asset's bytes from — e.g. as an `<img src>` or to build a data URL. Read-only, no mutation.
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { askEventDocGenerateAssetDownloadUrl } from 'quidproquo-features';
|
|
55
|
+
|
|
56
|
+
export function* imageSrc(docId: string, assetId: string) {
|
|
57
|
+
const { url } = yield* askEventDocGenerateAssetDownloadUrl(docId, assetId);
|
|
58
|
+
return url;
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Signature
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
function* askEventDocGenerateAssetDownloadUrl(
|
|
66
|
+
docId: string,
|
|
67
|
+
assetId: string,
|
|
68
|
+
): AskResponse<EventDocAssetDownloadUrl>;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Parameters
|
|
72
|
+
|
|
73
|
+
| Parameter | Type | Description |
|
|
74
|
+
| --- | --- | --- |
|
|
75
|
+
| `docId` | `string` | The document the asset belongs to. |
|
|
76
|
+
| `assetId` | `string` | The guid recorded when the asset was uploaded. |
|
|
77
|
+
|
|
78
|
+
### Returns
|
|
79
|
+
|
|
80
|
+
`AskResponse<EventDocAssetDownloadUrl>` — `{ url: string }`, a presigned `GET` URL valid for about 15 minutes. Re-request when it expires.
|
|
81
|
+
|
|
82
|
+
## askEventDocWriteAsset
|
|
83
|
+
|
|
84
|
+
Writes a server-generated binary as an immutable asset directly on the collection's storage drive (under the same `<docId>/assets/<guid>` scheme) and returns a reference to it. This is the server-side twin of the presigned-upload flow — for when the backend itself holds the bytes (e.g. a rendered PDF) and no client round-trip is needed. The download route can serve it back via the same key.
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
import { askEventDocWriteAsset } from 'quidproquo-features';
|
|
88
|
+
|
|
89
|
+
export function* storeRenderedPdf(docId: string, pdf: QPQBinaryData) {
|
|
90
|
+
const ref = yield* askEventDocWriteAsset(docId, pdf);
|
|
91
|
+
// record ref.guid in a domain event, e.g. via askEventDocAppendServerEvent
|
|
92
|
+
return ref;
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Signature
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
function* askEventDocWriteAsset(
|
|
100
|
+
docId: string,
|
|
101
|
+
binary: QPQBinaryData,
|
|
102
|
+
): AskResponse<EventDocAssetRef>;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Parameters
|
|
106
|
+
|
|
107
|
+
| Parameter | Type | Description |
|
|
108
|
+
| --- | --- | --- |
|
|
109
|
+
| `docId` | `string` | The document the asset belongs to. |
|
|
110
|
+
| `binary` | `QPQBinaryData` | The bytes to write — `{ base64Data, filename, mimetype?, contentDisposition? }`. A missing `mimetype` falls back to `application/octet-stream`. |
|
|
111
|
+
|
|
112
|
+
### Returns
|
|
113
|
+
|
|
114
|
+
`AskResponse<EventDocAssetRef>` — `{ guid, filename, mimetype }`, a first-class reference to record in a domain event so the document points at the bytes without embedding them.
|
|
115
|
+
|
|
116
|
+
## Notes
|
|
117
|
+
|
|
118
|
+
- All three resolve the drive from the store context, so a missing context throws (see [askEventDocResolveStore](./ask-event-doc-provide-store.md#askeventdocresolvestore)).
|
|
119
|
+
- Assets are immutable: guid-named so a re-upload is always a fresh blob; the old one stays addressable for history/rollback. Assets live under `<docId>/assets/<guid>`; derived, disposable artifacts use a sibling `<docId>/runtime/<...>` prefix written elsewhere.
|
|
120
|
+
|
|
121
|
+
## Related
|
|
122
|
+
|
|
123
|
+
- [askFileGenerateTemporaryUploadSecureUrl](../../core/file/ask-file-generate-temporary-upload-secure-url.md) — the core action behind the upload URL.
|
|
124
|
+
- [askFileGenerateTemporarySecureUrl](../../core/file/ask-file-generate-temporary-secure-url.md) — the core action behind the download URL.
|
|
125
|
+
- [askFileWriteBinaryContents](../../core/file/ask-file-write-binary-contents.md) — the core action behind the server-side write.
|
|
126
|
+
- [askEventDocAppendServerEvent](./ask-event-doc-append-server-event.md) — record an asset reference in the log from server code.
|
|
127
|
+
- [askEventDocProvideStore](./ask-event-doc-provide-store.md) — provides the store context (and drive) these require.
|