Demonstrates how to use setup hooks to prepare data and configuration before API execution.
| API | Description |
|---|---|
demo-hook |
Demonstrates how setup hook data is passed to and used within an API handler |
npm install
# or
yarnIf the intuned CLI is not installed, install it globally:
npm install -g @intuned/cliAfter installing dependencies, intuned command should be available in your environment.
intuned dev run api demo-hook .parameters/api/demo-hook/default.jsonintuned dev provisionintuned dev deploy/
├── api/
│ └── demo-hook.ts # Demo API showing hook data usage
├── hooks/
│ └── setupContext.ts # Main setup hook executed before API runs
├── utils/
│ └── typesAndSchemas.ts # Zod schemas and TypeScript types
├── intuned-resources/
│ └── jobs/
│ └── demo-hook.job.jsonc # Job definition for demo-hook API
├── .parameters/api/ # Test parameters
├── Intuned.jsonc # Project config
├── package.json # Node.js dependencies
└── README.md