[PR #1274] [MERGED] fix: support dynamic external ids for direct templates #1525

Closed
opened 2026-02-26 19:33:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1274
Author: @Mythie
Created: 8/9/2024
Status: Merged
Merged: 8/9/2024
Merged by: @Mythie

Base: mainHead: feat/dynamic-external-id-for-direct-templates


📝 Commits (1)

  • 7fc0c01 fix: support dynamic external ids for direct templates

📊 Changes

4 files changed (+15 additions, -1 deletions)

View changed files

📝 apps/web/src/app/(recipient)/d/[token]/direct-template.tsx (+9 -1)
📝 packages/lib/server-only/template/create-document-from-direct-template.ts (+3 -0)
📝 packages/trpc/server/template-router/router.ts (+2 -0)
📝 packages/trpc/server/template-router/schema.ts (+1 -0)

📄 Description

Description

Adds support for an externalId query param to be passed when linking a user to a direct template. This external id will then be stored on the document upon signing completion.

N/A

Changes Made

  • Checks the direct template page for an externalId query param and passes it to the createDocumentFromDirectTemplate endpoint
  • Adds support for an External ID to be added to the createDocumentFromDirectTemplate endpoint

Testing Performed

Created a direct template and passed the externalId query param and verified it was stored on the resulting document.

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

Additional Notes

N/A

Summary by CodeRabbit

  • New Features

    • Enhanced functionality for the document creation process by introducing the ability to include an external ID for direct templates.
    • Improved URL parameter handling in the Direct Template Page, allowing retrieval of the externalId for better document management.
  • Bug Fixes

    • Resolved issues related to the document creation logic by updating control flows to accommodate new parameters.
  • Documentation

    • Updated schemas and types to reflect the addition of the directTemplateExternalId, improving clarity on available options for users.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/1274 **Author:** [@Mythie](https://github.com/Mythie) **Created:** 8/9/2024 **Status:** ✅ Merged **Merged:** 8/9/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/dynamic-external-id-for-direct-templates` --- ### 📝 Commits (1) - [`7fc0c01`](https://github.com/documenso/documenso/commit/7fc0c013905a0574839562e2ade807bc4304b7b7) fix: support dynamic external ids for direct templates ### 📊 Changes **4 files changed** (+15 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(recipient)/d/[token]/direct-template.tsx` (+9 -1) 📝 `packages/lib/server-only/template/create-document-from-direct-template.ts` (+3 -0) 📝 `packages/trpc/server/template-router/router.ts` (+2 -0) 📝 `packages/trpc/server/template-router/schema.ts` (+1 -0) </details> ### 📄 Description ## Description Adds support for an `externalId` query param to be passed when linking a user to a direct template. This external id will then be stored on the document upon signing completion. ## Related Issue N/A ## Changes Made - Checks the direct template page for an `externalId` query param and passes it to the `createDocumentFromDirectTemplate` endpoint - Adds support for an External ID to be added to the `createDocumentFromDirectTemplate` endpoint ## Testing Performed Created a direct template and passed the externalId query param and verified it was stored on the resulting document. ## Checklist - [x] I have tested these changes locally and they work as expected. - [x] I have added/updated tests that prove the effectiveness of these changes. - [x] I have updated the documentation to reflect these changes, if applicable. - [x] I have followed the project's coding style guidelines. - [x] I have addressed the code review feedback from the previous submission, if applicable. ## Additional Notes N/A <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced functionality for the document creation process by introducing the ability to include an external ID for direct templates. - Improved URL parameter handling in the Direct Template Page, allowing retrieval of the `externalId` for better document management. - **Bug Fixes** - Resolved issues related to the document creation logic by updating control flows to accommodate new parameters. - **Documentation** - Updated schemas and types to reflect the addition of the `directTemplateExternalId`, improving clarity on available options for users. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:33:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1525
No description provided.