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,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askRouteAuthValidationDecode
|
|
3
|
+
description: Decode and validate a route's incoming auth token against its route auth settings, returning the decoded access token.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askRouteAuthValidationDecode
|
|
7
|
+
|
|
8
|
+
Decodes and validates the **auth token on an incoming HTTP request** against a route's auth settings, and returns the decoded access token (or `null` when there is no valid token). This is the action the webserver runs to authenticate a route before its handler story executes; the decoding is driven by the service's auth system (see `defineAuthSystem`).
|
|
9
|
+
|
|
10
|
+
- **Action type:** `RouteAuthValidationActionType.Decode`
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { askRouteAuthValidationDecode } from 'quidproquo-webserver';
|
|
14
|
+
|
|
15
|
+
export function* askAuthenticateRequest(event, routeAuthSettings) {
|
|
16
|
+
const decoded = yield* askRouteAuthValidationDecode(event, routeAuthSettings, false);
|
|
17
|
+
|
|
18
|
+
if (!decoded || !decoded.wasValid) {
|
|
19
|
+
// no token, or token failed validation
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return decoded; // { userId, username, roles, ... }
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Signature
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
function* askRouteAuthValidationDecode(
|
|
31
|
+
event: HTTPEvent,
|
|
32
|
+
routeAuthSettings: RouteAuthSettings,
|
|
33
|
+
ignoreExpiration: boolean,
|
|
34
|
+
): AskResponse<DecodedAccessToken | null>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Parameters
|
|
38
|
+
|
|
39
|
+
| Parameter | Type | Description |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `event` | `HTTPEvent` | The incoming HTTP request event carrying the auth token (typically a bearer token in the headers). |
|
|
42
|
+
| `routeAuthSettings` | `RouteAuthSettings` | The route's auth settings — `userDirectoryName`, `scopes`, `apiKeys` — used to decide which user directory the token is validated against. See [defineRoute](../../../config/webserver/route.md). |
|
|
43
|
+
| `ignoreExpiration` | `boolean` | When `true`, an expired token is still decoded (its `wasValid` reflects other checks). When `false`, expiration is enforced. |
|
|
44
|
+
|
|
45
|
+
## Returns
|
|
46
|
+
|
|
47
|
+
`DecodedAccessToken | null` — `null` when there is no token to decode. Otherwise the decoded token:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
interface DecodedAccessToken {
|
|
51
|
+
userId: string;
|
|
52
|
+
username: string;
|
|
53
|
+
exp: number; // expiry, Unix timestamp in seconds
|
|
54
|
+
roles?: string[];
|
|
55
|
+
userDirectory: string;
|
|
56
|
+
wasValid: boolean; // whether the token passed validation
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Always check `wasValid` — a token can be decoded but still have failed validation.
|
|
61
|
+
|
|
62
|
+
## Related
|
|
63
|
+
|
|
64
|
+
- [defineRoute](../../../config/webserver/route.md) — declares the `routeAuthSettings` this action validates against.
|
|
65
|
+
- [askUserDirectoryDecodeAccessToken](../../core/user-directory/ask-user-directory-decode-access-token.md) — the underlying user-directory token decode.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "label": "Service", "link": { "type": "generated-index", "description": "Send RPC-style requests to another qpq service." } }
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askServiceRequest
|
|
3
|
+
description: Send an RPC-style request to another qpq service, identified by a method name, and receive its typed response.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askServiceRequest
|
|
7
|
+
|
|
8
|
+
Sends an **RPC-style request to another qpq service**, identified by a service name and a method name, with a typed payload, and returns the service's typed response. It is the low-level action behind the `createServiceRequester` helper, which binds a service + method into a reusable, typed requester.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `ServiceActionType.Request`
|
|
11
|
+
- The request is dispatched as a `qpq/serviceRequest/<serviceName>/<method>` message and its correlated response is awaited. In a browser (quidproquo-web-react) client this travels over the app's WebSocket queue connection; the response is returned when the correlated reply arrives.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askServiceRequest } from 'quidproquo-webserver';
|
|
15
|
+
|
|
16
|
+
interface GetQuoteRequest { symbol: string; }
|
|
17
|
+
interface GetQuoteResponse { symbol: string; price: number; }
|
|
18
|
+
|
|
19
|
+
export function* askGetQuote(symbol: string) {
|
|
20
|
+
const quote = yield* askServiceRequest<GetQuoteRequest, GetQuoteResponse>(
|
|
21
|
+
'market', // service name
|
|
22
|
+
'getQuote', // method
|
|
23
|
+
{ symbol },
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
return quote.price;
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Prefer `createServiceRequester` for a typed, reusable wrapper:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { createServiceRequester } from 'quidproquo-webserver';
|
|
34
|
+
|
|
35
|
+
// Bind the service + method once, with request/response types
|
|
36
|
+
const askGetQuote = createServiceRequester<GetQuoteRequest, GetQuoteResponse>('market', 'getQuote');
|
|
37
|
+
|
|
38
|
+
export function* askQuotePrice(symbol: string) {
|
|
39
|
+
const quote = yield* askGetQuote({ symbol });
|
|
40
|
+
return quote.price;
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Signature
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
function* askServiceRequest<TPayload, TResponse>(
|
|
48
|
+
serviceName: string,
|
|
49
|
+
method: string,
|
|
50
|
+
payload: TPayload,
|
|
51
|
+
): AskResponse<TResponse>;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Parameters
|
|
55
|
+
|
|
56
|
+
| Parameter | Type | Description |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| `serviceName` | `string` | Name of the target service. |
|
|
59
|
+
| `method` | `string` | The service method to invoke — combined with `serviceName` into the request event type. |
|
|
60
|
+
| `payload` | `TPayload` | The typed request payload. |
|
|
61
|
+
|
|
62
|
+
## Returns
|
|
63
|
+
|
|
64
|
+
`TResponse` — the typed response returned by the target service's handler for that method.
|
|
65
|
+
|
|
66
|
+
## Related
|
|
67
|
+
|
|
68
|
+
- [askServiceFunctionExecute](../service-function/ask-service-function-execute.md) — direct Lambda-invoke of a named service function.
|
|
69
|
+
- [askCatch](../../core/system/ask-catch.md) — catch errors returned by the service handler.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "label": "Service Function", "link": { "type": "generated-index", "description": "Invoke callable service functions (RPC-style stories) from within a story." } }
|
package/template/docusaurus/docs/actions/webserver/service-function/ask-service-function-execute.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askServiceFunctionExecute
|
|
3
|
+
description: Invoke a service function (an RPC-style story) by name and receive its typed result.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askServiceFunctionExecute
|
|
7
|
+
|
|
8
|
+
Invokes a [service function](../../../config/webserver/service-function.md) — a story deployed for direct, RPC-style invocation — by name, passing a typed payload and receiving the function's typed result. Use it to call another service's (or your own service's) business logic directly, without going through an HTTP route.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `ServiceFunctionActionType.Execute`
|
|
11
|
+
- **On AWS:** invokes the target function's dedicated Lambda (`<functionName>-sfunc`) directly by name. When `isAsync` is `false` (the default) the call is synchronous and returns the function's result; when `true` it is a fire-and-forget async invocation that resolves without a result.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askServiceFunctionExecute } from 'quidproquo-webserver';
|
|
15
|
+
|
|
16
|
+
interface ResizeRequest { drive: string; filepath: string; width: number; }
|
|
17
|
+
interface ResizeResult { thumbnailPath: string; }
|
|
18
|
+
|
|
19
|
+
export function* askMakeThumbnail(filepath: string) {
|
|
20
|
+
const result = yield* askServiceFunctionExecute<ResizeResult, ResizeRequest>(
|
|
21
|
+
'media', // service name
|
|
22
|
+
'resizeImage', // function name
|
|
23
|
+
{ drive: 'uploads', filepath, width: 256 },
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
return result.thumbnailPath;
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Signature
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
function* askServiceFunctionExecute<R, T>(
|
|
34
|
+
service: string,
|
|
35
|
+
functionName: string,
|
|
36
|
+
payload: T,
|
|
37
|
+
isAsync?: boolean,
|
|
38
|
+
): AskResponse<R>;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Parameters
|
|
42
|
+
|
|
43
|
+
| Parameter | Type | Default | Description |
|
|
44
|
+
| --- | --- | --- | --- |
|
|
45
|
+
| `service` | `string` | – | Name of the service that owns the target function. |
|
|
46
|
+
| `functionName` | `string` | – | Name of the [service function](../../../config/webserver/service-function.md) to invoke (its `functionName`, which defaults to the story name). |
|
|
47
|
+
| `payload` | `T` | – | The typed payload passed to the function's story. |
|
|
48
|
+
| `isAsync` | `boolean` | `false` | When `false`, wait for and return the result. When `true`, invoke fire-and-forget and resolve without a result. |
|
|
49
|
+
|
|
50
|
+
## Returns
|
|
51
|
+
|
|
52
|
+
`R` — the value returned by the invoked function's story. When `isAsync` is `true` there is no meaningful result (the async invocation resolves without waiting for the function to finish).
|
|
53
|
+
|
|
54
|
+
## Related
|
|
55
|
+
|
|
56
|
+
- [defineServiceFunction](../../../config/webserver/service-function.md) — declares the function this action invokes.
|
|
57
|
+
- [askServiceRequest](../service/ask-service-request.md) — a related request to another service, dispatched by method name.
|
|
58
|
+
- [askCatch](../../core/system/ask-catch.md) — catch errors thrown by the invoked function.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "label": "Web Entry", "link": { "type": "generated-index", "description": "Action requesters for hosted web apps (SPAs / static sites) served through a CDN." } }
|
package/template/docusaurus/docs/actions/webserver/web-entry/ask-web-entry-invalidate-cache.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askWebEntryInvalidateCache
|
|
3
|
+
description: Invalidate the CDN cache for a hosted web entry so viewers pick up freshly deployed assets.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askWebEntryInvalidateCache
|
|
7
|
+
|
|
8
|
+
Invalidates the CDN cache for a [web entry](../../../config/webserver/web-entry.md) so that cached copies of the given paths are dropped and the next request re-fetches them from origin. Use this after uploading a new build to a web entry's storage drive, so viewers see the new assets without waiting for the [cache](../../../config/webserver/cache.md) TTL to expire.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `WebEntryActionType.InvalidateCache`
|
|
11
|
+
- **On AWS:** looks up the CloudFront distribution deployed for the named web entry (via its CloudFormation export) and issues a CloudFront `CreateInvalidation` for the supplied paths. The caller reference is derived from a hash of the paths plus the current timestamp, so repeated invalidations of the same paths are always accepted as distinct requests.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askWebEntryInvalidateCache } from 'quidproquo-webserver';
|
|
15
|
+
|
|
16
|
+
export function* askPublishSite() {
|
|
17
|
+
// Drop the SPA shell and manifest so a new deploy is served immediately
|
|
18
|
+
yield* askWebEntryInvalidateCache('website', '/index.html', '/mf-manifest.json');
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Passing no paths issues an invalidation with an empty path set (nothing is invalidated); pass `'/*'` to invalidate everything the distribution has cached.
|
|
23
|
+
|
|
24
|
+
## Signature
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
function* askWebEntryInvalidateCache(
|
|
28
|
+
webEntryName: string,
|
|
29
|
+
...paths: string[]
|
|
30
|
+
): AskResponse<void>;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Parameters
|
|
34
|
+
|
|
35
|
+
| Parameter | Type | Description |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `webEntryName` | `string` | Name of the web entry to invalidate — must match the `name` passed to [defineWebEntry](../../../config/webserver/web-entry.md). This resolves to that web entry's CDN distribution. |
|
|
38
|
+
| `...paths` | `string[]` | One or more path patterns to invalidate, each a leading-slash absolute path (e.g. `'/index.html'`, `'/assets/*'`, `'/*'`). Collected from the rest arguments into an array. |
|
|
39
|
+
|
|
40
|
+
## Returns
|
|
41
|
+
|
|
42
|
+
`void` — the story resumes once the invalidation request has been accepted by the CDN. Note this returns as soon as the invalidation is *submitted*; propagation across CDN edge locations completes asynchronously.
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- The deploy grants each service role permission to create invalidations only on that service's own web-entry distributions, so this action can be called from within the same service that owns the web entry.
|
|
47
|
+
- CDN providers meter invalidations (CloudFront gives a monthly free allowance and charges beyond it), so prefer invalidating specific paths over `'/*'` where practical, or lean on the [cache](../../../config/webserver/cache.md) TTLs and `ignoreCache` patterns instead.
|
|
48
|
+
|
|
49
|
+
## Related
|
|
50
|
+
|
|
51
|
+
- [defineWebEntry](../../../config/webserver/web-entry.md) — declares the hosted web app whose cache this invalidates.
|
|
52
|
+
- [defineCache](../../../config/webserver/cache.md) — the CDN cache policy (TTLs) an invalidation forces past.
|
|
53
|
+
- [defineSeo](../../../config/webserver/seo.md) — server-side (edge) rendering attached to a web entry's paths.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "label": "WebSocket", "link": { "type": "generated-index", "description": "Actions for sending messages to connected WebSocket clients." } }
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askWebsocketSendMessage
|
|
3
|
+
description: Send a message to a single connected WebSocket client by connection id.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askWebsocketSendMessage
|
|
7
|
+
|
|
8
|
+
Sends a payload to one connected WebSocket client, addressed by its `connectionId`. Use it from any story to push data out over a [WebSocket API](../../../config/webserver/websocket.md) — for example replying to a client's message or broadcasting an update to a connection you recorded earlier.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `WebsocketActionType.SendMessage`
|
|
11
|
+
- **On AWS:** the payload is `JSON.stringify`'d and delivered through the **API Gateway Management API** `PostToConnection` call against the resolved WebSocket API endpoint. A throttling response from the service surfaces as `Throttled`; sending to a connection that has already closed surfaces as `Disconnected`.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askWebsocketSendMessage } from 'quidproquo-webserver';
|
|
15
|
+
|
|
16
|
+
export function* askNotifyClient(connectionId: string) {
|
|
17
|
+
yield* askWebsocketSendMessage('api', connectionId, {
|
|
18
|
+
type: 'notification',
|
|
19
|
+
text: 'Your export is ready',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Signature
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
function* askWebsocketSendMessage<T>(
|
|
28
|
+
websocketApiName: string,
|
|
29
|
+
connectionId: string,
|
|
30
|
+
payload: T,
|
|
31
|
+
): AskResponse<void>;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Parameters
|
|
35
|
+
|
|
36
|
+
| Parameter | Type | Description |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `websocketApiName` | `string` | The `apiName` of the target [WebSocket API](../../../config/webserver/websocket.md) (the `apiName` option of [defineWebsocket](../../../config/webserver/websocket.md), or the `apiName` argument to [defineWebSocketQueue](../../../config/webserver/web-socket-queue.md)). Identifies which deployed API the connection belongs to. |
|
|
39
|
+
| `connectionId` | `string` | Identifier of the client connection to send to. You receive this on the `WebsocketEvent` in your connect/message handlers; persist it (e.g. keyed by user) if you need to send outside the request that created it. |
|
|
40
|
+
| `payload` | `T` | The message to send. Serialized to JSON before transmission, so any JSON-serializable value works. |
|
|
41
|
+
|
|
42
|
+
## Returns
|
|
43
|
+
|
|
44
|
+
`void` — the story resumes once the message has been handed to the platform for delivery.
|
|
45
|
+
|
|
46
|
+
## Errors
|
|
47
|
+
|
|
48
|
+
| Error | Meaning |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `WebsocketSendMessageErrorTypeEnum.Throttled` | The platform rate-limited the send (AWS `ThrottlingException`, "Rate exceeded"). |
|
|
51
|
+
| `WebsocketSendMessageErrorTypeEnum.Disconnected` | The target connection no longer exists — the client has disconnected (AWS `GoneException`). |
|
|
52
|
+
|
|
53
|
+
Wrap the call in [askCatch](../../../actions/core/system/ask-catch.md) to handle these without unwinding the story:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { askCatch } from 'quidproquo-core';
|
|
57
|
+
import { askWebsocketSendMessage, WebsocketSendMessageErrorTypeEnum } from 'quidproquo-webserver';
|
|
58
|
+
|
|
59
|
+
export function* askTrySend(connectionId: string, payload: unknown) {
|
|
60
|
+
const outcome = yield* askCatch(askWebsocketSendMessage('api', connectionId, payload));
|
|
61
|
+
if (!outcome.success && outcome.error.errorType === WebsocketSendMessageErrorTypeEnum.Disconnected) {
|
|
62
|
+
// client is gone — drop the stored connection id
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- [defineWebsocket](../../../config/webserver/websocket.md) — declares the WebSocket API and its connect/disconnect/message handlers.
|
|
70
|
+
- [defineWebSocketQueue](../../../config/webserver/web-socket-queue.md) — managed messaging layer that tracks connections for you.
|
|
71
|
+
- [askCatch](../../../actions/core/system/ask-catch.md) — catch the throttled/disconnected errors above.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "label": "quidproquo-xstate", "position": 3, "link": { "type": "generated-index", "description": "Action requesters for driving XState state machines from a story." } }
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askStateMachineCreate
|
|
3
|
+
description: Create and start a persistent instance of a defined state machine, seeded with your data.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askStateMachineCreate
|
|
7
|
+
|
|
8
|
+
Creates a new instance of a [state machine](../../config/xstate/state-machine.md), starts it at its initial state, and persists it under a given `id`. Use this to begin a durable workflow — an order, a subscription, an onboarding flow — that later stories will advance with [askStateMachineSendEvent](./ask-state-machine-send-event.md).
|
|
9
|
+
|
|
10
|
+
- **Action type:** `StateMachineActionType.Create`
|
|
11
|
+
- **On the runtime:** the processor builds the XState machine from your [defineStateMachine](../../config/xstate/state-machine.md) config, starts an actor, captures its **initial persisted snapshot**, merges `id` and that snapshot (under the machine's `stateField`, default `__machineState`) into your `item`, and upserts the whole record into the machine's backing key-value store. Any entry actions that fire on start run their mapped stories.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askStateMachineCreate } from 'quidproquo-xstate';
|
|
15
|
+
|
|
16
|
+
export function* startOrder(orderId: string, customerId: string) {
|
|
17
|
+
const order = yield* askStateMachineCreate('order', orderId, {
|
|
18
|
+
customerId,
|
|
19
|
+
total: 4200,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// order now includes id, your fields, and the initial machine snapshot
|
|
23
|
+
return order;
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Signature
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
function* askStateMachineCreate<T>(
|
|
31
|
+
stateMachineName: string,
|
|
32
|
+
id: string,
|
|
33
|
+
item: T,
|
|
34
|
+
): AskResponse<T>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Parameters
|
|
38
|
+
|
|
39
|
+
| Parameter | Type | Description |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `stateMachineName` | `string` | Name of the machine to instantiate — must match a machine declared with [defineStateMachine](../../config/xstate/state-machine.md). |
|
|
42
|
+
| `id` | `string` | The unique id for this instance. It becomes the partition key of the row in the backing key-value store and the id you pass to every later state-machine action for this instance. |
|
|
43
|
+
| `item` | `T` | Your own instance data. It is stored alongside the machine snapshot; `id` and the snapshot field are added to it automatically. |
|
|
44
|
+
|
|
45
|
+
## Returns
|
|
46
|
+
|
|
47
|
+
`T` — the persisted entity: your `item`, plus an `id` property and the initial persisted XState snapshot under the machine's `stateField` (default `__machineState`). Read the human-readable current state with [askStateMachineGetState](./ask-state-machine-get-state.md) rather than parsing the snapshot yourself.
|
|
48
|
+
|
|
49
|
+
## Notes
|
|
50
|
+
|
|
51
|
+
- The instance starts at the machine's `initial` state. Entry actions declared on that state fire immediately, running their mapped stories with the new entity as the argument.
|
|
52
|
+
- Persistence rides on the machine's key-value store, so creating an instance is durable — it can be fetched and advanced by any later invocation.
|
|
53
|
+
- If no machine with `stateMachineName` exists in the deployed config, the action fails with `ErrorTypeEnum.NotFound`. Wrap the call in [askCatch](../core/system/ask-catch.md) if you want to handle that in-story.
|
|
54
|
+
|
|
55
|
+
## Related
|
|
56
|
+
|
|
57
|
+
- [defineStateMachine](../../config/xstate/state-machine.md) — declares the machine this instance is created from.
|
|
58
|
+
- [askStateMachineSendEvent](./ask-state-machine-send-event.md) — advance the instance by sending it an event.
|
|
59
|
+
- [askStateMachineGetState](./ask-state-machine-get-state.md) — read the instance's current state.
|
|
60
|
+
- [askStateMachineGet](./ask-state-machine-get.md) — fetch the full instance entity.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askStateMachineGetState
|
|
3
|
+
description: Read the current state value of a state-machine instance and whether it has reached a final state.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askStateMachineGetState
|
|
7
|
+
|
|
8
|
+
Reads the current state of a [state-machine](../../config/xstate/state-machine.md) instance — the state name and whether the machine has finished. This is the lightweight way to ask "what state is this instance in?" without pulling the raw snapshot.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `StateMachineActionType.GetState`
|
|
11
|
+
- **On the runtime:** the processor loads the instance from the machine's backing key-value store, rehydrates an XState actor from the persisted snapshot (under the machine's `stateField`), reads the actor's current snapshot, and returns its state value and status. String state values are returned as-is; nested/parallel state values are JSON-stringified.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askStateMachineGetState } from 'quidproquo-xstate';
|
|
15
|
+
|
|
16
|
+
export function* isOrderShipped(orderId: string) {
|
|
17
|
+
const state = yield* askStateMachineGetState('order', orderId);
|
|
18
|
+
|
|
19
|
+
if (state.done) {
|
|
20
|
+
return `Order finished in state: ${state.value}`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return `Order is currently: ${state.value}`;
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Signature
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
function* askStateMachineGetState(
|
|
31
|
+
stateMachineName: string,
|
|
32
|
+
id: string,
|
|
33
|
+
): AskResponse<StateMachineStateInfo>;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Parameters
|
|
37
|
+
|
|
38
|
+
| Parameter | Type | Description |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| `stateMachineName` | `string` | Name of the machine — must match a machine declared with [defineStateMachine](../../config/xstate/state-machine.md). |
|
|
41
|
+
| `id` | `string` | The id of the instance to read. |
|
|
42
|
+
|
|
43
|
+
## Returns
|
|
44
|
+
|
|
45
|
+
`StateMachineStateInfo` — the current state of the instance.
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
interface StateMachineStateInfo {
|
|
49
|
+
value: string; // the current state name (nested/parallel values are JSON-stringified)
|
|
50
|
+
done: boolean; // true once the machine has reached a final state
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Notes
|
|
55
|
+
|
|
56
|
+
- `done` is `true` when the XState actor's status is `'done'` — i.e. the machine has reached a `type: 'final'` state.
|
|
57
|
+
- Unlike [askStateMachineGet](./ask-state-machine-get.md), this action rehydrates the machine, so it reflects the actual computed state rather than the raw stored snapshot.
|
|
58
|
+
- Fails with `ErrorTypeEnum.NotFound` if the machine name is unknown, the instance does not exist, or the instance has no persisted snapshot on its `stateField`.
|
|
59
|
+
|
|
60
|
+
## Related
|
|
61
|
+
|
|
62
|
+
- [defineStateMachine](../../config/xstate/state-machine.md) — declares the machine and its states.
|
|
63
|
+
- [askStateMachineSendEvent](./ask-state-machine-send-event.md) — drive a transition that changes this state.
|
|
64
|
+
- [askStateMachineGet](./ask-state-machine-get.md) — fetch the full entity instead of just the state.
|
|
65
|
+
- [askStateMachineCreate](./ask-state-machine-create.md) — create the instance.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askStateMachineGet
|
|
3
|
+
description: Fetch the full persisted entity of a state-machine instance by id.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askStateMachineGet
|
|
7
|
+
|
|
8
|
+
Fetches a [state-machine](../../config/xstate/state-machine.md) instance by its `id` and returns the whole persisted entity — your own data plus the stored machine snapshot. Use this when you need the instance's data fields; to read just the current state name, prefer [askStateMachineGetState](./ask-state-machine-get-state.md).
|
|
9
|
+
|
|
10
|
+
- **Action type:** `StateMachineActionType.Get`
|
|
11
|
+
- **On the runtime:** the processor reads the row keyed by `id` from the machine's backing key-value store and returns it verbatim. It does not rehydrate the XState actor, so the machine's `stateField` still holds the raw persisted snapshot.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askStateMachineGet } from 'quidproquo-xstate';
|
|
15
|
+
|
|
16
|
+
interface Order {
|
|
17
|
+
id: string;
|
|
18
|
+
customerId: string;
|
|
19
|
+
total: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function* loadOrder(orderId: string) {
|
|
23
|
+
const order = yield* askStateMachineGet<Order>('order', orderId);
|
|
24
|
+
return order;
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Signature
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
function* askStateMachineGet<T>(
|
|
32
|
+
stateMachineName: string,
|
|
33
|
+
id: string,
|
|
34
|
+
): AskResponse<T>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Parameters
|
|
38
|
+
|
|
39
|
+
| Parameter | Type | Description |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `stateMachineName` | `string` | Name of the machine — must match a machine declared with [defineStateMachine](../../config/xstate/state-machine.md). |
|
|
42
|
+
| `id` | `string` | The id of the instance to fetch. |
|
|
43
|
+
|
|
44
|
+
## Returns
|
|
45
|
+
|
|
46
|
+
`T` — the persisted entity: the `item` you created it with, plus its `id` and the persisted XState snapshot under the machine's `stateField` (default `__machineState`). To interpret the snapshot as a state name, call [askStateMachineGetState](./ask-state-machine-get-state.md).
|
|
47
|
+
|
|
48
|
+
## Notes
|
|
49
|
+
|
|
50
|
+
- Fails with `ErrorTypeEnum.NotFound` if the machine name is unknown, or if no instance with that `id` exists. Use [askCatch](../core/system/ask-catch.md) to handle a missing instance in-story.
|
|
51
|
+
|
|
52
|
+
## Related
|
|
53
|
+
|
|
54
|
+
- [defineStateMachine](../../config/xstate/state-machine.md) — declares the machine and its backing store.
|
|
55
|
+
- [askStateMachineGetState](./ask-state-machine-get-state.md) — read the current state name/done flag instead of the raw entity.
|
|
56
|
+
- [askStateMachineCreate](./ask-state-machine-create.md) — create the instance in the first place.
|
|
57
|
+
- [askStateMachineSendEvent](./ask-state-machine-send-event.md) — advance the instance.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: askStateMachineSendEvent
|
|
3
|
+
description: Send an event to a state-machine instance to drive a transition, run its guards and actions, and persist the new state.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# askStateMachineSendEvent
|
|
7
|
+
|
|
8
|
+
Sends an event to a [state-machine](../../config/xstate/state-machine.md) instance, driving a transition. The runtime rehydrates the instance, evaluates its guards, applies the event, runs any side-effect actions, and persists the new state. This is how a durable workflow moves forward over time.
|
|
9
|
+
|
|
10
|
+
- **Action type:** `StateMachineActionType.SendEvent`
|
|
11
|
+
- **On the runtime:** the processor loads the instance from the backing key-value store, runs **every** configured guard story with `(entity, event)` to resolve each guard to a boolean, rehydrates the XState actor from the persisted snapshot, sends the event, and captures the new snapshot. If the event did not change state (and the machine is not done), it fails; otherwise it persists the new snapshot and runs the stories mapped to any actions that fired during the transition, passing `(entity, event)`.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { askStateMachineSendEvent } from 'quidproquo-xstate';
|
|
15
|
+
|
|
16
|
+
export function* payOrder(orderId: string, paymentRef: string) {
|
|
17
|
+
const order = yield* askStateMachineSendEvent('order', orderId, {
|
|
18
|
+
type: 'PAY',
|
|
19
|
+
paymentRef,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return order; // the updated, re-persisted entity
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Signature
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
function* askStateMachineSendEvent<T>(
|
|
30
|
+
stateMachineName: string,
|
|
31
|
+
id: string,
|
|
32
|
+
event: StateMachineEvent,
|
|
33
|
+
): AskResponse<T>;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Parameters
|
|
37
|
+
|
|
38
|
+
| Parameter | Type | Description |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| `stateMachineName` | `string` | Name of the machine — must match a machine declared with [defineStateMachine](../../config/xstate/state-machine.md). |
|
|
41
|
+
| `id` | `string` | The id of the instance to advance. |
|
|
42
|
+
| `event` | `StateMachineEvent` | The event to send. Its `type` selects the transition; any extra fields are payload passed through to guard and action stories. |
|
|
43
|
+
|
|
44
|
+
### `StateMachineEvent`
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
interface StateMachineEvent {
|
|
48
|
+
type: string; // the XState event name (e.g. 'PAY', 'CANCEL')
|
|
49
|
+
[key: string]: any; // optional payload available to guards and actions
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Returns
|
|
54
|
+
|
|
55
|
+
`T` — the updated, re-persisted entity, with the new machine snapshot stored under the machine's `stateField`. Read the resulting state name with [askStateMachineGetState](./ask-state-machine-get-state.md).
|
|
56
|
+
|
|
57
|
+
## Notes
|
|
58
|
+
|
|
59
|
+
- **Guards run first, and all of them.** Before the event is applied, every guard story configured on the machine is executed with `(entity, event)` and reduced to a boolean, then fed to XState. Keep guard stories side-effect-light.
|
|
60
|
+
- **Actions run after the transition is persisted.** Each XState action that fires during the transition runs its mapped story with `(entity, event)`; a story error aborts the action with that error.
|
|
61
|
+
- **Invalid events fail.** If the event produces no state change and the machine is not in a final state, the action fails with `ErrorTypeEnum.BadRequest` (`Event '<type>' is not valid for current state '<state>'`).
|
|
62
|
+
- Fails with `ErrorTypeEnum.NotFound` if the machine name is unknown or the instance does not exist. Guard/action story errors and the persistence upsert error propagate with their own error types. Use [askCatch](../core/system/ask-catch.md) to handle these in-story.
|
|
63
|
+
|
|
64
|
+
## Related
|
|
65
|
+
|
|
66
|
+
- [defineStateMachine](../../config/xstate/state-machine.md) — declares the machine, its transitions, guards, and actions.
|
|
67
|
+
- [askStateMachineGetState](./ask-state-machine-get-state.md) — read the state the event moved the instance into.
|
|
68
|
+
- [askStateMachineCreate](./ask-state-machine-create.md) — create the instance before sending events.
|
|
69
|
+
- [askStateMachineGet](./ask-state-machine-get.md) — fetch the full instance entity.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# API Reference
|
|
6
|
+
|
|
7
|
+
Complete API documentation for the quidproquo framework, split into two sections:
|
|
8
|
+
|
|
9
|
+
## Config
|
|
10
|
+
|
|
11
|
+
The `defineXYZ(...)` functions you compose into your service's QPQ config. Each one declares a piece of infrastructure or configuration — storage drives, queues, event buses, routes — that the deploy layer turns into real resources.
|
|
12
|
+
|
|
13
|
+
## Action Requesters
|
|
14
|
+
|
|
15
|
+
The `askXYZ(...)` generator functions your stories use to actually do things — read files, send messages, query users. Each page documents the function's parameters, return type, errors, and the config that controls it.
|
|
16
|
+
|
|
17
|
+
Both sections are organised by package (`quidproquo-core`, `quidproquo-webserver`, ...), and within Action Requesters by action domain (File, Queue, EventBus, ...).
|