[PR #1227] [MERGED] feat: add external id to documents and templates #1492

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1227
Author: @Mythie
Created: 7/12/2024
Status: Merged
Merged: 7/13/2024
Merged by: @Mythie

Base: mainHead: feat/add-external-id


📝 Commits (1)

  • 795f0bd feat: add external id to documents and templates

📊 Changes

19 files changed (+142 additions, -0 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/documents/[id]/edit-document.tsx (+1 -0)
📝 apps/web/src/app/(dashboard)/templates/[id]/edit-template.tsx (+1 -0)
📝 apps/web/src/components/document/document-history-sheet.tsx (+17 -0)
📝 packages/api/v1/implementation.ts (+3 -0)
📝 packages/api/v1/schema.ts (+8 -0)
📝 packages/lib/server-only/document/create-document.ts (+3 -0)
📝 packages/lib/server-only/document/update-document-settings.ts (+18 -0)
📝 packages/lib/server-only/template/create-document-from-template.ts (+3 -0)
📝 packages/lib/server-only/template/update-template-settings.ts (+2 -0)
📝 packages/lib/types/document-audit-logs.ts (+13 -0)
📝 packages/lib/utils/document-audit-logs.ts (+4 -0)
packages/prisma/migrations/20240712031001_add_external_id_column/migration.sql (+5 -0)
📝 packages/prisma/schema.prisma (+2 -0)
📝 packages/trpc/server/document-router/schema.ts (+1 -0)
📝 packages/trpc/server/template-router/schema.ts (+1 -0)
📝 packages/ui/primitives/document-flow/add-settings.tsx (+29 -0)
📝 packages/ui/primitives/document-flow/add-settings.types.ts (+1 -0)
📝 packages/ui/primitives/template-flow/add-template-settings.tsx (+29 -0)
📝 packages/ui/primitives/template-flow/add-template-settings.types.tsx (+1 -0)

📄 Description

Description

Adds the external ID column to documents and templates with an option to configure it in the API or UI.

External ID's can be used to link a document or template to an external system and identify them via webhooks, etc.

Summary by CodeRabbit

  • New Features

    • Introduced externalId field to document and template settings forms, allowing users to specify an external identifier.
    • Added support for tracking changes to the externalId in document audit logs.
  • Enhancements

    • Updated various schema definitions and APIs to include externalId as an optional field.
    • Enabled handling of externalId in document creation and update processes.
  • Database

    • Added externalId column to Document and Template tables via new migration script.

🔄 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/1227 **Author:** [@Mythie](https://github.com/Mythie) **Created:** 7/12/2024 **Status:** ✅ Merged **Merged:** 7/13/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/add-external-id` --- ### 📝 Commits (1) - [`795f0bd`](https://github.com/documenso/documenso/commit/795f0bd1df5fbfe23c9ca91fe58a887e4204e811) feat: add external id to documents and templates ### 📊 Changes **19 files changed** (+142 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/documents/[id]/edit-document.tsx` (+1 -0) 📝 `apps/web/src/app/(dashboard)/templates/[id]/edit-template.tsx` (+1 -0) 📝 `apps/web/src/components/document/document-history-sheet.tsx` (+17 -0) 📝 `packages/api/v1/implementation.ts` (+3 -0) 📝 `packages/api/v1/schema.ts` (+8 -0) 📝 `packages/lib/server-only/document/create-document.ts` (+3 -0) 📝 `packages/lib/server-only/document/update-document-settings.ts` (+18 -0) 📝 `packages/lib/server-only/template/create-document-from-template.ts` (+3 -0) 📝 `packages/lib/server-only/template/update-template-settings.ts` (+2 -0) 📝 `packages/lib/types/document-audit-logs.ts` (+13 -0) 📝 `packages/lib/utils/document-audit-logs.ts` (+4 -0) ➕ `packages/prisma/migrations/20240712031001_add_external_id_column/migration.sql` (+5 -0) 📝 `packages/prisma/schema.prisma` (+2 -0) 📝 `packages/trpc/server/document-router/schema.ts` (+1 -0) 📝 `packages/trpc/server/template-router/schema.ts` (+1 -0) 📝 `packages/ui/primitives/document-flow/add-settings.tsx` (+29 -0) 📝 `packages/ui/primitives/document-flow/add-settings.types.ts` (+1 -0) 📝 `packages/ui/primitives/template-flow/add-template-settings.tsx` (+29 -0) 📝 `packages/ui/primitives/template-flow/add-template-settings.types.tsx` (+1 -0) </details> ### 📄 Description ## Description Adds the external ID column to documents and templates with an option to configure it in the API or UI. External ID's can be used to link a document or template to an external system and identify them via webhooks, etc. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced `externalId` field to document and template settings forms, allowing users to specify an external identifier. - Added support for tracking changes to the `externalId` in document audit logs. - **Enhancements** - Updated various schema definitions and APIs to include `externalId` as an optional field. - Enabled handling of `externalId` in document creation and update processes. - **Database** - Added `externalId` column to `Document` and `Template` tables via new migration script. <!-- 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:29 +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#1492
No description provided.