Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/skills/yemot-integration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ description: Use when working on Yemot (Israeli IVR phone) call flows in any NRA
Shared code lives in `server/shared/utils/yemot/` (`nra-server`); each project subclasses it.

- **v2 (current) β€” subclass `BaseYemotHandlerService`.** Each project defines `server/src/yemot-handler.service.ts` extending it and overriding `processCall()`. Inside, `this.call`, `this.user`, `this.logger` are available; branch on `hasPermission(this.user, '<key>')` to route to the right flow. See `react-admin-nestjs/server/src/yemot-handler.service.ts`.
- The shared router/service (`v2/yemot-router.service.ts`, `yemot.service.ts`) owns call lifecycle: active-call map, step saving, hangup handling, `getUserByDidPhone()`.
- The shared router (`v2/yemot-router.service.ts`) and call tracker (`v2/yemot-call-tracking.service.ts`) own call lifecycle: active-call map, step saving, hangup handling, `getUserByDidPhone()`.
- **v1 (old chain-based `YemotModule`/`YemotService`/`Chain`) β€” removed from `nra-server`, do not reintroduce.** `yemot.interface.ts` now holds only `FormatString`. All phone code goes through v2.
- **Permissions:** phone flows are gated by permission keys (e.g. `seminarAttendanceYemot`, `yemotSimulator`). Adding/gating a flow β†’ also use `manage-permissions`.

## Common tasks
Expand All @@ -23,7 +24,7 @@ Shared code lives in `server/shared/utils/yemot/` (`nra-server`); each project s

**Menu texts** live in DB (`YemotCall`/yemot-texts) and are updated via migrations β€” see the `UpdateYemotTexts*` migrations in `react-admin-nestjs/server/src/migrations/`. Use `generate-migration` for schema/text changes.

**File upload/download to Yemot:** paths must carry the `ivr2:` scheme prefix (a past bug shipped without it). `deleteFile`/`downloadFile` live in the shared yemot util β€” reuse them, mind the auth and path prefix.
**File upload/download to Yemot:** paths must carry the `ivr2:` scheme prefix (a past bug shipped without it). `uploadFile`/`downloadFile`/`deleteFile` live in `utils/phone/yemot-api.service.ts` β€” reuse them, mind the auth and path prefix.

## Test with the scenario harness (no live phone)

Expand Down
Loading