The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
docs(trpc): add openapi descriptions to envelope cancel, delete and update routes (#3134)
Ephraim Duncan914e32548656
diff --git a/packages/trpc/server/envelope-router/cancel-envelope.types.ts b/packages/trpc/server/envelope-router/cancel-envelope.types.tsindex 06a6637fb..59ab827c1 100644--- a/packages/trpc/server/envelope-router/cancel-envelope.types.ts+++ b/packages/trpc/server/envelope-router/cancel-envelope.types.ts@@ -8,13 +8,14 @@ export const cancelEnvelopeMeta: TrpcRouteMeta = {method: 'POST',path: '/envelope/cancel',summary: 'Cancel envelope',+ description: 'Cancel a pending envelope',tags: ['Envelope'],},};export const ZCancelEnvelopeRequestSchema = z.object({- envelopeId: z.string(),- reason: z.string().optional(),+ envelopeId: z.string().describe('The ID of the envelope to cancel.'),+ reason: z.string().describe('The reason for cancelling the envelope.').optional(),});export const ZCancelEnvelopeResponseSchema = ZSuccessResponseSchema;diff --git a/packages/trpc/server/envelope-router/delete-envelope.types.ts b/packages/trpc/server/envelope-router/delete-envelope.types.tsindex 654d24c6d..8eaf7db9e 100644--- a/packages/trpc/server/envelope-router/delete-envelope.types.ts+++ b/packages/trpc/server/envelope-router/delete-envelope.types.ts@@ -8,12 +8,13 @@ export const deleteEnvelopeMeta: TrpcRouteMeta = {method: 'POST',path: '/envelope/delete',summary: 'Delete envelope',+ description: 'Delete an envelope',tags: ['Envelope'],},};export const ZDeleteEnvelopeRequestSchema = z.object({- envelopeId: z.string(),+ envelopeId: z.string().describe('The ID of the envelope to delete.'),});export const ZDeleteEnvelopeResponseSchema = ZSuccessResponseSchema;diff --git a/packages/trpc/server/envelope-router/update-envelope.types.ts b/packages/trpc/server/envelope-router/update-envelope.types.tsindex c08da086f..a4a89f9ea 100644--- a/packages/trpc/server/envelope-router/update-envelope.types.ts+++ b/packages/trpc/server/envelope-router/update-envelope.types.ts@@ -12,24 +12,32 @@ export const updateEnvelopeMeta: TrpcRouteMeta = {method: 'POST',path: '/envelope/update',summary: 'Update envelope',+ description: 'Update envelope properties and settings',tags: ['Envelope'],},};export const ZUpdateEnvelopeRequestSchema = z.object({- envelopeId: z.string(),+ envelopeId: z.string().describe('The ID of the envelope to update.'),data: z.object({title: ZDocumentTitleSchema.optional(),externalId: ZDocumentExternalIdSchema.nullish(),visibility: ZDocumentVisibilitySchema.optional(),- globalAccessAuth: z.array(ZDocumentAccessAuthTypesSchema).optional(),- globalActionAuth: z.array(ZDocumentActionAuthTypesSchema).optional(),- folderId: z.string().nullish(),- templateType: z.nativeEnum(TemplateType).optional(),+ globalAccessAuth: z+ .array(ZDocumentAccessAuthTypesSchema)+ .describe('The authentication methods required to access the envelope.')+ .optional(),+ globalActionAuth: z+ .array(ZDocumentActionAuthTypesSchema)+ .describe('The authentication methods required to sign the envelope.')+ .optional(),+ folderId: z.string().describe('The ID of the folder containing the envelope.').nullish(),+ templateType: z.nativeEnum(TemplateType).describe('The template type.').optional(),})+ .describe('The envelope properties to update.').optional(),- meta: ZDocumentMetaUpdateSchema.optional(),+ meta: ZDocumentMetaUpdateSchema.describe('The email and signing settings to update.').optional(),});export const ZUpdateEnvelopeResponseSchema = ZEnvelopeLiteSchema;