Skip to content

Conversation

@kushalshit27
Copy link
Contributor

@kushalshit27 kushalshit27 commented Dec 5, 2025

🔧 Changes

  • Add phone template support in the Auth0 Deploy CLI
  • Document the new resource with YAML and directory examples and seed sample configs in examples/.

Examples

YAML format

phoneTemplates:
  - type: "otp_verify"
    disabled: false
    content:
      from: "+12341234567"
      body:
        text: "Your verification code is {{ code }}"
        voice: "Your verification code is {{ code }}"

JSON format

{
  "type": "otp_verify",
  "disabled": false,
  "content": {
    "from": "+12341234567",
    "body": {
      "text": "Your verification code is {{ code }}",
      "voice": "Your verification code is {{ code }}"
    }
  }
}

📚 References

🔬 Testing

  • Unit test added
  • E2E - TODO

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

- src/context/defaults.ts: add phoneTemplatesDefaults function to strip read-only fields
- src/context/directory/handlers/index.ts: import phoneTemplates handler
- src/context/yaml/handlers/index.ts: import phoneTemplates handler
- src/tools/auth0/handlers/index.ts: import phoneTemplates handler
- src/tools/constants.ts: add PHONE_TEMPLATES_DIRECTORY constant
- src/types.ts: add PhoneTemplate type and update Assets type
- src/context/directory/handlers/phoneTemplates.ts: implement phoneTemplatesHandler for directory context
- src/context/yaml/handlers/phoneTemplates.ts: implement phoneTemplatesHandler for YAML context
- src/tools/auth0/handlers/phoneTemplates.ts: implement PhoneTemplatesHandler class for managing phone templates
- .gitignore: ignore .github/agents directory
- docs/resource-specific-documentation.md: Added documentation for phone templates.
- examples/yaml/tenant.yaml: Included phone templates configuration example.
- src/context/directory/handlers/phoneTemplates.ts: Updated to return null for missing templates.
- src/context/yaml/handlers/phoneTemplates.ts: Updated to return null for missing templates.
- test/context/yaml/context.test.js: Added tests for phone templates processing.
- test/utils.js: Mocked phone templates management functions.
- examples/directory/phone-templates/otp_enroll.json: Created OTP enrollment template.
- examples/directory/phone-templates/otp_verify.json: Created OTP verification template.
- test/context/directory/phoneTemplates.test.ts: Added tests for directory context phone templates.
- test/context/yaml/phoneTemplates.test.ts: Added tests for YAML context phone templates.
- test/tools/auth0/handlers/phoneTemplates.test.ts: Added tests for phone templates handler.
- src/context/directory/handlers/phoneTemplates.ts: remove comment on read-only fields
- test/context/directory/phoneTemplates.test.ts: update verification and enrollment code texts to use keyword markers
- test/context/yaml/phoneTemplates.test.ts: update verification and enrollment code texts to use keyword markers
- test/tools/auth0/handlers/phoneTemplates.test.ts: update verification and enrollment code texts to use keyword markers
@kushalshit27 kushalshit27 marked this pull request as ready for review December 5, 2025 08:21
@kushalshit27 kushalshit27 requested a review from a team as a code owner December 5, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants