Skip to content

feat(integrations): add support for avanan#5553

Open
hassan254-prog wants to merge 4 commits intomasterfrom
wari/add-support-for-avanan
Open

feat(integrations): add support for avanan#5553
hassan254-prog wants to merge 4 commits intomasterfrom
wari/add-support-for-avanan

Conversation

@hassan254-prog
Copy link
Contributor

@hassan254-prog hassan254-prog commented Mar 3, 2026

Describe the problem and your solution

  • add support for avanan

Add avanan integration with enhanced interpolation and proxy header handling

This PR introduces a new avanan integration using TWO_STEP auth, including provider configuration, token/proxy headers, connection and credential schemas, documentation pages, snippets, and a logo asset. It also expands interpolation utilities to support sha256Hex, formatted now, stable per-request random/now, and `` replacements, with proxy header construction updated to use stable values for TWO_STEP flows.

Additional changes include new formatDate helper logic, expanded unit test coverage for interpolation and proxy utilities, and a guard in credentials refresh to ensure newCredentials.raw is an object before extracting tokens.

Key Changes

• Added avanan provider configuration in packages/providers/providers.yaml with TWO_STEP auth, token headers, proxy headers, and connection/credential schema
• Implemented interpolation enhancements in packages/shared/lib/utils/utils.ts, including sha256Hex, formatted now, stable random/now, `` replacement, and formatDate
• Updated proxy header interpolation for `TWO_STEP` in `packages/shared/lib/services/proxy/utils.ts` to reuse stable `random`/`now` per request
• Expanded test coverage in `packages/shared/lib/utils/utils.unit.test.ts` and `packages/shared/lib/services/proxy/utils.unit.test.ts`
• Added Avanan docs and snippets in `docs/api-integrations/avanan.mdx`, `docs/api-integrations/avanan/connect.mdx`, `docs/snippets/generated/avanan/PreBuiltTooling.mdx`, and `docs/snippets/generated/avanan/PreBuiltUseCases.mdx`, plus navigation updates in `docs/docs.json`
• Added `newCredentials.raw` object guard in `packages/shared/lib/services/connections/credentials/refresh.ts`

Possible Issues

token_request_method: GET with custom headers may require provider validation for header acceptance
• Formatted now uses UTC formatting; confirm Avanan expects this exact format (no timezone suffix)
• Interpolation order for sha256Hex and nested ${...} placeholders should match Avanan signature requirements


This summary was automatically generated by @propel-code-bot

propel-code-bot[bot]

This comment was marked as outdated.

Copy link
Contributor

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review found no issues; changes look solid and aligned with requirements.

Status: No Issues Found | Risk: Low

Review Details

📁 14 files reviewed | 💬 0 comments

Instruction Files
├── .claude/
│   ├── agents/
│   │   └── nango-docs-migrator.md
│   └── skills/
│       ├── agent-builder-skill/
│       │   ├── EXAMPLES.md
│       │   └── SKILL.md
│       ├── creating-integration-docs/
│       │   └── SKILL.md
│       └── creating-skills-skill/
│           └── SKILL.md
├── AGENTS.md
└── GEMINI.md

x-av-app-id: ${credentials.appId}
x-av-token: ${accessToken}
x-av-req-id: ${random}
x-av-date: '${now | date: "%Y-%m-%dT%H:%M:%S"}'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will allow for specific date format interpolation, avanan doesn’t accept dates in zulu format.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that confirmed. the docs I found only have example with zulu format

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is confirmed and tested, if you use a zulu format date, this is the error you get.
Screenshot 2026-03-05 at 23 36 12


// Custom headers handling
if ('proxy' in config.provider && 'headers' in config.provider.proxy) {
const headerValues = Object.values(config.provider.proxy.headers).filter((v): v is string => typeof v === 'string');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will ensure that the dates and random numbers we generate remain consistent across all headers.

@hassan254-prog hassan254-prog requested a review from a team March 3, 2026 23:22
x-av-app-id: ${credentials.appId}
x-av-token: ${accessToken}
x-av-req-id: ${random}
x-av-date: '${now | date: "%Y-%m-%dT%H:%M:%S"}'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that confirmed. the docs I found only have example with zulu format

@linear
Copy link

linear bot commented Mar 5, 2026

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