@keystrokehq/docusign 0.0.15 → 0.0.16-integration-id-canonicalization.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +3 -2
  2. package/dist/credential-sets/index.d.mts +2 -0
  3. package/dist/credential-sets/index.mjs +4 -0
  4. package/dist/docusign-jwt.credential-set-B0sXS-5i.mjs +39 -0
  5. package/dist/docusign-jwt.credential-set-BrMnF4Ok.d.mts +63 -0
  6. package/dist/docusign.credential-set-BloJ2PrK.mjs +51 -0
  7. package/dist/index.d.mts +4 -1
  8. package/dist/index.mjs +6 -1
  9. package/dist/operations/index.d.mts +2 -0
  10. package/dist/operations/index.mjs +3 -0
  11. package/dist/void-envelope.operation-B0nzxjWT.d.mts +8752 -0
  12. package/dist/void-envelope.operation-CfaS-zI7.mjs +8192 -0
  13. package/package.json +11 -227
  14. package/dist/_official/index.d.mts +0 -75
  15. package/dist/_official/index.mjs +0 -3
  16. package/dist/_runtime/index.d.mts +0 -1
  17. package/dist/_runtime/index.mjs +0 -1
  18. package/dist/account-custom-fields.d.mts +0 -48
  19. package/dist/account-custom-fields.mjs +0 -63
  20. package/dist/account-stamps.d.mts +0 -119
  21. package/dist/account-stamps.mjs +0 -144
  22. package/dist/account-tabs.d.mts +0 -65
  23. package/dist/account-tabs.mjs +0 -80
  24. package/dist/account.d.mts +0 -160
  25. package/dist/account.mjs +0 -207
  26. package/dist/admin.d.mts +0 -13
  27. package/dist/admin.mjs +0 -20
  28. package/dist/auth.d.mts +0 -28
  29. package/dist/auth.mjs +0 -64
  30. package/dist/bcc-archive.d.mts +0 -47
  31. package/dist/bcc-archive.mjs +0 -70
  32. package/dist/billing.d.mts +0 -152
  33. package/dist/billing.mjs +0 -208
  34. package/dist/brands.d.mts +0 -147
  35. package/dist/brands.mjs +0 -157
  36. package/dist/bulk-send.d.mts +0 -104
  37. package/dist/bulk-send.mjs +0 -115
  38. package/dist/chunked-uploads.d.mts +0 -57
  39. package/dist/chunked-uploads.mjs +0 -74
  40. package/dist/click.d.mts +0 -13
  41. package/dist/click.mjs +0 -20
  42. package/dist/client.d.mts +0 -47
  43. package/dist/client.mjs +0 -286
  44. package/dist/clm.d.mts +0 -13
  45. package/dist/clm.mjs +0 -20
  46. package/dist/cloud-storage.d.mts +0 -93
  47. package/dist/cloud-storage.mjs +0 -115
  48. package/dist/connect.d.mts +0 -183
  49. package/dist/connect.mjs +0 -217
  50. package/dist/connection.d.mts +0 -2
  51. package/dist/connection.mjs +0 -3
  52. package/dist/contacts.d.mts +0 -59
  53. package/dist/contacts.mjs +0 -79
  54. package/dist/enote.d.mts +0 -31
  55. package/dist/enote.mjs +0 -45
  56. package/dist/envelope-attachments.d.mts +0 -65
  57. package/dist/envelope-attachments.mjs +0 -76
  58. package/dist/envelope-custom-fields.d.mts +0 -137
  59. package/dist/envelope-custom-fields.mjs +0 -92
  60. package/dist/envelope-documents.d.mts +0 -206
  61. package/dist/envelope-documents.mjs +0 -219
  62. package/dist/envelope-email.d.mts +0 -48
  63. package/dist/envelope-email.mjs +0 -60
  64. package/dist/envelope-lock.d.mts +0 -48
  65. package/dist/envelope-lock.mjs +0 -60
  66. package/dist/envelope-logs.d.mts +0 -89
  67. package/dist/envelope-logs.mjs +0 -126
  68. package/dist/envelope-notifications.d.mts +0 -34
  69. package/dist/envelope-notifications.mjs +0 -44
  70. package/dist/envelope-recipients.d.mts +0 -126
  71. package/dist/envelope-recipients.mjs +0 -136
  72. package/dist/envelope-tabs.d.mts +0 -39
  73. package/dist/envelope-tabs.mjs +0 -49
  74. package/dist/envelope-views.d.mts +0 -74
  75. package/dist/envelope-views.mjs +0 -88
  76. package/dist/envelope-workflow.d.mts +0 -151
  77. package/dist/envelope-workflow.mjs +0 -176
  78. package/dist/envelopes.d.mts +0 -377
  79. package/dist/envelopes.mjs +0 -190
  80. package/dist/errors.d.mts +0 -48
  81. package/dist/errors.mjs +0 -76
  82. package/dist/events.d.mts +0 -192
  83. package/dist/events.mjs +0 -146
  84. package/dist/factory-5kY-Jnda.mjs +0 -8
  85. package/dist/groups.d.mts +0 -150
  86. package/dist/groups.mjs +0 -146
  87. package/dist/integration-H05G5JY8.mjs +0 -112
  88. package/dist/integration-Mk1ScWT6.d.mts +0 -30
  89. package/dist/messaging.d.mts +0 -1
  90. package/dist/messaging.mjs +0 -1
  91. package/dist/monitor.d.mts +0 -13
  92. package/dist/monitor.mjs +0 -20
  93. package/dist/notary.d.mts +0 -92
  94. package/dist/notary.mjs +0 -122
  95. package/dist/operation-helpers-D25WHTo1.mjs +0 -102
  96. package/dist/permission-profiles.d.mts +0 -57
  97. package/dist/permission-profiles.mjs +0 -70
  98. package/dist/power-forms.d.mts +0 -38
  99. package/dist/power-forms.mjs +0 -62
  100. package/dist/rooms.d.mts +0 -13
  101. package/dist/rooms.mjs +0 -28
  102. package/dist/shared-DTUCJayR.mjs +0 -27
  103. package/dist/signing-groups.d.mts +0 -102
  104. package/dist/signing-groups.mjs +0 -117
  105. package/dist/template-custom-fields.d.mts +0 -166
  106. package/dist/template-custom-fields.mjs +0 -107
  107. package/dist/template-documents.d.mts +0 -99
  108. package/dist/template-documents.mjs +0 -109
  109. package/dist/template-lock.d.mts +0 -48
  110. package/dist/template-lock.mjs +0 -60
  111. package/dist/template-sharing.d.mts +0 -96
  112. package/dist/template-sharing.mjs +0 -108
  113. package/dist/template-workflow.d.mts +0 -135
  114. package/dist/template-workflow.mjs +0 -152
  115. package/dist/templates.d.mts +0 -129
  116. package/dist/templates.mjs +0 -110
  117. package/dist/user-authorizations.d.mts +0 -96
  118. package/dist/user-authorizations.mjs +0 -133
  119. package/dist/user-custom-settings.d.mts +0 -60
  120. package/dist/user-custom-settings.mjs +0 -69
  121. package/dist/user-profile.d.mts +0 -80
  122. package/dist/user-profile.mjs +0 -106
  123. package/dist/user-signatures.d.mts +0 -155
  124. package/dist/user-signatures.mjs +0 -180
  125. package/dist/users.d.mts +0 -103
  126. package/dist/users.mjs +0 -98
  127. package/dist/verification.d.mts +0 -19
  128. package/dist/verification.mjs +0 -59
  129. package/dist/workspaces.d.mts +0 -128
  130. package/dist/workspaces.mjs +0 -143
@@ -1,155 +0,0 @@
1
- import { z } from "zod";
2
- import * as _keystrokehq_core0 from "@keystrokehq/core";
3
-
4
- //#region src/user-signatures.d.ts
5
- declare const addOrUpdateUserSignature: _keystrokehq_core0.Operation<z.ZodObject<{
6
- userId: z.ZodString;
7
- userSignatures: z.ZodArray<z.ZodObject<{
8
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
9
- }, z.core.$catchall<z.ZodUnknown>>>;
10
- }, z.core.$strip>, z.ZodObject<{
11
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
12
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
13
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
14
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
15
- DOCUSIGN_BASE_URI: z.ZodURL;
16
- }, z.core.$strip>>], undefined>;
17
- declare const addUserSignatureAndInitialsImages: _keystrokehq_core0.Operation<z.ZodObject<{
18
- userId: z.ZodString;
19
- userSignatures: z.ZodArray<z.ZodObject<{
20
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
21
- }, z.core.$catchall<z.ZodUnknown>>>;
22
- }, z.core.$strip>, z.ZodObject<{
23
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
24
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
25
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
26
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
27
- DOCUSIGN_BASE_URI: z.ZodURL;
28
- }, z.core.$strip>>], undefined>;
29
- declare const retrieveUserSignatureDefinitions: _keystrokehq_core0.Operation<z.ZodObject<{
30
- userId: z.ZodString;
31
- }, z.core.$strip>, z.ZodObject<{
32
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
33
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
34
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
35
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
36
- DOCUSIGN_BASE_URI: z.ZodURL;
37
- }, z.core.$strip>>], undefined>;
38
- declare const retrieveUserSignatureInformation: _keystrokehq_core0.Operation<z.ZodObject<{
39
- userId: z.ZodString;
40
- signatureId: z.ZodString;
41
- }, z.core.$strip>, z.ZodObject<{
42
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
43
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
44
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
45
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
46
- DOCUSIGN_BASE_URI: z.ZodURL;
47
- }, z.core.$strip>>], undefined>;
48
- declare const retrieveUserSignatureImage: _keystrokehq_core0.Operation<z.ZodObject<{
49
- userId: z.ZodString;
50
- signatureId: z.ZodString;
51
- }, z.core.$strip>, z.ZodObject<{
52
- contentType: z.ZodOptional<z.ZodString>;
53
- contentDisposition: z.ZodOptional<z.ZodString>;
54
- status: z.ZodNumber;
55
- body: z.ZodString;
56
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
57
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
58
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
59
- DOCUSIGN_BASE_URI: z.ZodURL;
60
- }, z.core.$strip>>], undefined>;
61
- declare const setUserSignatureImage: _keystrokehq_core0.Operation<z.ZodObject<{
62
- userId: z.ZodString;
63
- signatureId: z.ZodString;
64
- image: z.ZodString;
65
- }, z.core.$strip>, z.ZodObject<{
66
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
67
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
68
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
69
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
70
- DOCUSIGN_BASE_URI: z.ZodURL;
71
- }, z.core.$strip>>], undefined>;
72
- declare const updateUserSignatureById: _keystrokehq_core0.Operation<z.ZodObject<{
73
- userId: z.ZodString;
74
- signatureId: z.ZodString;
75
- signature: z.ZodObject<{
76
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
77
- }, z.core.$catchall<z.ZodUnknown>>;
78
- }, z.core.$strip>, z.ZodObject<{
79
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
80
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
81
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
82
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
83
- DOCUSIGN_BASE_URI: z.ZodURL;
84
- }, z.core.$strip>>], undefined>;
85
- declare const retrieveUserInitialsImageForEnvelopes: _keystrokehq_core0.Operation<z.ZodObject<{
86
- userId: z.ZodString;
87
- signatureId: z.ZodString;
88
- }, z.core.$strip>, z.ZodObject<{
89
- contentType: z.ZodOptional<z.ZodString>;
90
- contentDisposition: z.ZodOptional<z.ZodString>;
91
- status: z.ZodNumber;
92
- body: z.ZodString;
93
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
94
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
95
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
96
- DOCUSIGN_BASE_URI: z.ZodURL;
97
- }, z.core.$strip>>], undefined>;
98
- declare const deleteUserInitialsOrSignatureImage: _keystrokehq_core0.Operation<z.ZodObject<{
99
- userId: z.ZodString;
100
- signatureId: z.ZodString;
101
- imageType: z.ZodOptional<z.ZodEnum<{
102
- signature_image: "signature_image";
103
- initials_image: "initials_image";
104
- }>>;
105
- }, z.core.$strip>, z.ZodObject<{
106
- success: z.ZodBoolean;
107
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
108
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
109
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
110
- DOCUSIGN_BASE_URI: z.ZodURL;
111
- }, z.core.$strip>>], undefined>;
112
- declare const removeUserSignatureInformation: _keystrokehq_core0.Operation<z.ZodObject<{
113
- userId: z.ZodString;
114
- signatureId: z.ZodString;
115
- }, z.core.$strip>, z.ZodObject<{
116
- success: z.ZodBoolean;
117
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
118
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
119
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
120
- DOCUSIGN_BASE_URI: z.ZodURL;
121
- }, z.core.$strip>>], undefined>;
122
- declare const setInitialsImageForAccountlessSigner: _keystrokehq_core0.Operation<z.ZodObject<{
123
- envelopeId: z.ZodString;
124
- recipientId: z.ZodString;
125
- image: z.ZodString;
126
- }, z.core.$strip>, z.ZodObject<{
127
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
128
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
129
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
130
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
131
- DOCUSIGN_BASE_URI: z.ZodURL;
132
- }, z.core.$strip>>], undefined>;
133
- declare const setSignatureImageForNoAccountSigner: _keystrokehq_core0.Operation<z.ZodObject<{
134
- envelopeId: z.ZodString;
135
- recipientId: z.ZodString;
136
- image: z.ZodString;
137
- }, z.core.$strip>, z.ZodObject<{
138
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
139
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
140
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
141
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
142
- DOCUSIGN_BASE_URI: z.ZodURL;
143
- }, z.core.$strip>>], undefined>;
144
- declare const deleteSignatureForCaptiveRecipients: _keystrokehq_core0.Operation<z.ZodObject<{
145
- envelopeId: z.ZodString;
146
- recipientId: z.ZodString;
147
- }, z.core.$strip>, z.ZodObject<{
148
- success: z.ZodBoolean;
149
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
150
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
151
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
152
- DOCUSIGN_BASE_URI: z.ZodURL;
153
- }, z.core.$strip>>], undefined>;
154
- //#endregion
155
- export { addOrUpdateUserSignature, addUserSignatureAndInitialsImages, deleteSignatureForCaptiveRecipients, deleteUserInitialsOrSignatureImage, removeUserSignatureInformation, retrieveUserInitialsImageForEnvelopes, retrieveUserSignatureDefinitions, retrieveUserSignatureImage, retrieveUserSignatureInformation, setInitialsImageForAccountlessSigner, setSignatureImageForNoAccountSigner, setUserSignatureImage, updateUserSignatureById };
@@ -1,180 +0,0 @@
1
- import { docusignGenericObjectSchema, docusignLooseObjectSchema, docusignSuccessSchema } from "./schemas/index.mjs";
2
- import { r as defineRestOperation, t as defineBinaryOperation } from "./operation-helpers-D25WHTo1.mjs";
3
- import { z } from "zod";
4
-
5
- //#region src/user-signatures.ts
6
- /**
7
- * User signatures and initials. Covers PLAN.md § 6.23.
8
- */
9
- const userId = z.object({ userId: z.string().min(1) });
10
- const userSignature = userId.extend({ signatureId: z.string().min(1) });
11
- const binaryResponseSchema = docusignLooseObjectSchema({
12
- contentType: z.string().optional(),
13
- contentDisposition: z.string().optional(),
14
- status: z.number(),
15
- body: z.string()
16
- });
17
- const addOrUpdateUserSignature = defineRestOperation({
18
- id: "docusign.add-or-update-user-signature",
19
- slug: "DOCUSIGN_ADD_OR_UPDATE_USER_SIGNATURE",
20
- name: "Add Or Update User Signature",
21
- description: "Add or update user signature definitions.",
22
- needsApproval: true,
23
- method: "POST",
24
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures`,
25
- input: userId.extend({ userSignatures: z.array(docusignLooseObjectSchema()).min(1) }),
26
- output: docusignGenericObjectSchema,
27
- body: (input) => ({ userSignatures: input.userSignatures })
28
- });
29
- const addUserSignatureAndInitialsImages = defineRestOperation({
30
- id: "docusign.add-user-signature-and-initials-images",
31
- slug: "DOCUSIGN_ADD_USER_SIGNATURE_AND_INITIALS_IMAGES",
32
- name: "Add User Signature And Initials Images",
33
- description: "Add signature and initials images for a user.",
34
- needsApproval: true,
35
- method: "PUT",
36
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures`,
37
- input: userId.extend({ userSignatures: z.array(docusignLooseObjectSchema()).min(1) }),
38
- output: docusignGenericObjectSchema,
39
- body: (input) => ({ userSignatures: input.userSignatures })
40
- });
41
- const retrieveUserSignatureDefinitions = defineRestOperation({
42
- id: "docusign.retrieve-user-signature-definitions",
43
- slug: "DOCUSIGN_RETRIEVE_USER_SIGNATURE_DEFINITIONS",
44
- name: "Retrieve User Signature Definitions",
45
- description: "List signature definitions on a user.",
46
- method: "GET",
47
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures`,
48
- input: userId,
49
- output: docusignGenericObjectSchema
50
- });
51
- const retrieveUserSignatureInformation = defineRestOperation({
52
- id: "docusign.retrieve-user-signature-information",
53
- slug: "DOCUSIGN_RETRIEVE_USER_SIGNATURE_INFORMATION",
54
- name: "Retrieve User Signature Information",
55
- description: "Retrieve information about a specific signature on a user.",
56
- method: "GET",
57
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures/${ctx.encode(String(ctx.input.signatureId))}`,
58
- input: userSignature,
59
- output: docusignGenericObjectSchema
60
- });
61
- const retrieveUserSignatureImage = defineBinaryOperation({
62
- id: "docusign.retrieve-user-signature-image",
63
- slug: "DOCUSIGN_RETRIEVE_USER_SIGNATURE_IMAGE",
64
- name: "Retrieve User Signature Image",
65
- description: "Download the signature image for a user.",
66
- method: "GET",
67
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures/${ctx.encode(String(ctx.input.signatureId))}/signature_image`,
68
- input: userSignature,
69
- accept: "image/png",
70
- output: binaryResponseSchema
71
- });
72
- const setUserSignatureImage = defineRestOperation({
73
- id: "docusign.set-user-signature-image",
74
- slug: "DOCUSIGN_SET_USER_SIGNATURE_IMAGE",
75
- name: "Set User Signature Image",
76
- description: "Upload a new signature image for a user.",
77
- needsApproval: true,
78
- method: "PUT",
79
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures/${ctx.encode(String(ctx.input.signatureId))}/signature_image`,
80
- input: userSignature.extend({ image: z.string().min(1) }),
81
- output: docusignGenericObjectSchema,
82
- body: (input) => ({ image: input.image })
83
- });
84
- const updateUserSignatureById = defineRestOperation({
85
- id: "docusign.update-user-signature-by-id",
86
- slug: "DOCUSIGN_UPDATE_USER_SIGNATURE_BY_ID",
87
- name: "Update User Signature By Id",
88
- description: "Update a single signature definition on a user.",
89
- needsApproval: true,
90
- method: "PUT",
91
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures/${ctx.encode(String(ctx.input.signatureId))}`,
92
- input: userSignature.extend({ signature: docusignLooseObjectSchema() }),
93
- output: docusignGenericObjectSchema,
94
- body: (input) => input.signature
95
- });
96
- const retrieveUserInitialsImageForEnvelopes = defineBinaryOperation({
97
- id: "docusign.retrieve-user-initials-image-for-envelopes",
98
- slug: "DOCUSIGN_RETRIEVE_USER_INITIALS_IMAGE_FOR_ENVELOPES",
99
- name: "Retrieve User Initials Image",
100
- description: "Download the initials image for a user.",
101
- method: "GET",
102
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures/${ctx.encode(String(ctx.input.signatureId))}/initials_image`,
103
- input: userSignature,
104
- accept: "image/png",
105
- output: binaryResponseSchema
106
- });
107
- const deleteUserInitialsOrSignatureImage = defineRestOperation({
108
- id: "docusign.delete-user-initials-or-signature-image",
109
- slug: "DOCUSIGN_DELETE_USER_INITIALS_OR_SIGNATURE_IMAGE",
110
- name: "Delete User Initials Or Signature Image",
111
- description: "Delete a user signature or initials image.",
112
- needsApproval: true,
113
- method: "DELETE",
114
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures/${ctx.encode(String(ctx.input.signatureId))}/${ctx.encode(String(ctx.input.imageType ?? "signature_image"))}`,
115
- input: userSignature.extend({ imageType: z.enum(["signature_image", "initials_image"]).optional() }),
116
- output: docusignSuccessSchema,
117
- transformResponse: () => ({ success: true })
118
- });
119
- const removeUserSignatureInformation = defineRestOperation({
120
- id: "docusign.remove-user-signature-information",
121
- slug: "DOCUSIGN_REMOVE_USER_SIGNATURE_INFORMATION",
122
- name: "Remove User Signature Information",
123
- description: "Remove all signature information for a user.",
124
- needsApproval: true,
125
- method: "DELETE",
126
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}/signatures/${ctx.encode(String(ctx.input.signatureId))}`,
127
- input: userSignature,
128
- output: docusignSuccessSchema,
129
- transformResponse: () => ({ success: true })
130
- });
131
- const setInitialsImageForAccountlessSigner = defineRestOperation({
132
- id: "docusign.set-initials-image-for-accountless-signer",
133
- slug: "DOCUSIGN_SET_INITIALS_IMAGE_FOR_ACCOUNTLESS_SIGNER",
134
- name: "Set Initials For Accountless Signer",
135
- description: "Set initials image for an accountless signer (captive recipient).",
136
- needsApproval: true,
137
- method: "PUT",
138
- path: (ctx) => `/envelopes/${ctx.encode(String(ctx.input.envelopeId))}/recipients/${ctx.encode(String(ctx.input.recipientId))}/initials_image`,
139
- input: z.object({
140
- envelopeId: z.string().min(1),
141
- recipientId: z.string().min(1),
142
- image: z.string().min(1)
143
- }),
144
- output: docusignGenericObjectSchema,
145
- body: (input) => ({ image: input.image })
146
- });
147
- const setSignatureImageForNoAccountSigner = defineRestOperation({
148
- id: "docusign.set-signature-image-for-no-account-signer",
149
- slug: "DOCUSIGN_SET_SIGNATURE_IMAGE_FOR_NO_ACCOUNT_SIGNER",
150
- name: "Set Signature For No-Account Signer",
151
- description: "Set signature image for a captive recipient.",
152
- needsApproval: true,
153
- method: "PUT",
154
- path: (ctx) => `/envelopes/${ctx.encode(String(ctx.input.envelopeId))}/recipients/${ctx.encode(String(ctx.input.recipientId))}/signature_image`,
155
- input: z.object({
156
- envelopeId: z.string().min(1),
157
- recipientId: z.string().min(1),
158
- image: z.string().min(1)
159
- }),
160
- output: docusignGenericObjectSchema,
161
- body: (input) => ({ image: input.image })
162
- });
163
- const deleteSignatureForCaptiveRecipients = defineRestOperation({
164
- id: "docusign.delete-signature-for-captive-recipients",
165
- slug: "DOCUSIGN_DELETE_SIGNATURE_FOR_CAPTIVE_RECIPIENTS",
166
- name: "Delete Signature For Captive Recipients",
167
- description: "Delete signature images for captive recipients on an envelope.",
168
- needsApproval: true,
169
- method: "DELETE",
170
- path: (ctx) => `/envelopes/${ctx.encode(String(ctx.input.envelopeId))}/recipients/${ctx.encode(String(ctx.input.recipientId))}/signature_image`,
171
- input: z.object({
172
- envelopeId: z.string().min(1),
173
- recipientId: z.string().min(1)
174
- }),
175
- output: docusignSuccessSchema,
176
- transformResponse: () => ({ success: true })
177
- });
178
-
179
- //#endregion
180
- export { addOrUpdateUserSignature, addUserSignatureAndInitialsImages, deleteSignatureForCaptiveRecipients, deleteUserInitialsOrSignatureImage, removeUserSignatureInformation, retrieveUserInitialsImageForEnvelopes, retrieveUserSignatureDefinitions, retrieveUserSignatureImage, retrieveUserSignatureInformation, setInitialsImageForAccountlessSigner, setSignatureImageForNoAccountSigner, setUserSignatureImage, updateUserSignatureById };
package/dist/users.d.mts DELETED
@@ -1,103 +0,0 @@
1
- import { z } from "zod";
2
- import * as _keystrokehq_core0 from "@keystrokehq/core";
3
-
4
- //#region src/users.d.ts
5
- declare const listUsersForAccount: _keystrokehq_core0.Operation<z.ZodObject<{
6
- startPosition: z.ZodOptional<z.ZodNumber>;
7
- count: z.ZodOptional<z.ZodNumber>;
8
- additionalInfo: z.ZodOptional<z.ZodBoolean>;
9
- email: z.ZodOptional<z.ZodString>;
10
- emailSubstring: z.ZodOptional<z.ZodString>;
11
- groupId: z.ZodOptional<z.ZodString>;
12
- status: z.ZodOptional<z.ZodString>;
13
- userNameSubstring: z.ZodOptional<z.ZodString>;
14
- }, z.core.$strip>, z.ZodObject<{
15
- resultSetSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
16
- totalSetSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
17
- startPosition: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
18
- endPosition: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
19
- nextUri: z.ZodOptional<z.ZodString>;
20
- previousUri: z.ZodOptional<z.ZodString>;
21
- users: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
- userId: z.ZodOptional<z.ZodString>;
23
- userName: z.ZodOptional<z.ZodString>;
24
- email: z.ZodOptional<z.ZodString>;
25
- userStatus: z.ZodOptional<z.ZodString>;
26
- userType: z.ZodOptional<z.ZodString>;
27
- firstName: z.ZodOptional<z.ZodString>;
28
- lastName: z.ZodOptional<z.ZodString>;
29
- }, z.core.$catchall<z.ZodUnknown>>>>;
30
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
31
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
32
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
33
- DOCUSIGN_BASE_URI: z.ZodURL;
34
- }, z.core.$strip>>], undefined>;
35
- declare const addNewUsersToASpecifiedAccount: _keystrokehq_core0.Operation<z.ZodObject<{
36
- newUsers: z.ZodArray<z.ZodObject<{
37
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
38
- }, z.core.$catchall<z.ZodUnknown>>>;
39
- }, z.core.$strip>, z.ZodObject<{
40
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
41
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
42
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
43
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
44
- DOCUSIGN_BASE_URI: z.ZodURL;
45
- }, z.core.$strip>>], undefined>;
46
- declare const getUserInformationById: _keystrokehq_core0.Operation<z.ZodObject<{
47
- userId: z.ZodString;
48
- additionalInfo: z.ZodOptional<z.ZodBoolean>;
49
- }, z.core.$strip>, z.ZodObject<{
50
- userId: z.ZodOptional<z.ZodString>;
51
- userName: z.ZodOptional<z.ZodString>;
52
- email: z.ZodOptional<z.ZodString>;
53
- userStatus: z.ZodOptional<z.ZodString>;
54
- userType: z.ZodOptional<z.ZodString>;
55
- firstName: z.ZodOptional<z.ZodString>;
56
- lastName: z.ZodOptional<z.ZodString>;
57
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
58
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
59
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
60
- DOCUSIGN_BASE_URI: z.ZodURL;
61
- }, z.core.$strip>>], undefined>;
62
- declare const updateUserInformationForSpecifiedUser: _keystrokehq_core0.Operation<z.ZodObject<{
63
- userId: z.ZodString;
64
- user: z.ZodObject<{
65
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
66
- }, z.core.$catchall<z.ZodUnknown>>;
67
- }, z.core.$strip>, z.ZodObject<{
68
- userId: z.ZodOptional<z.ZodString>;
69
- userName: z.ZodOptional<z.ZodString>;
70
- email: z.ZodOptional<z.ZodString>;
71
- userStatus: z.ZodOptional<z.ZodString>;
72
- userType: z.ZodOptional<z.ZodString>;
73
- firstName: z.ZodOptional<z.ZodString>;
74
- lastName: z.ZodOptional<z.ZodString>;
75
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
76
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
77
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
78
- DOCUSIGN_BASE_URI: z.ZodURL;
79
- }, z.core.$strip>>], undefined>;
80
- declare const changeUsersInAccount: _keystrokehq_core0.Operation<z.ZodObject<{
81
- users: z.ZodArray<z.ZodObject<{
82
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
83
- }, z.core.$catchall<z.ZodUnknown>>>;
84
- }, z.core.$strip>, z.ZodObject<{
85
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
86
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
87
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
88
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
89
- DOCUSIGN_BASE_URI: z.ZodURL;
90
- }, z.core.$strip>>], undefined>;
91
- declare const closeUsersInAccount: _keystrokehq_core0.Operation<z.ZodObject<{
92
- users: z.ZodArray<z.ZodObject<{
93
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
94
- }, z.core.$catchall<z.ZodUnknown>>>;
95
- }, z.core.$strip>, z.ZodObject<{
96
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
97
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:docusign", z.ZodObject<{
98
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
99
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
100
- DOCUSIGN_BASE_URI: z.ZodURL;
101
- }, z.core.$strip>>], undefined>;
102
- //#endregion
103
- export { addNewUsersToASpecifiedAccount, changeUsersInAccount, closeUsersInAccount, getUserInformationById, listUsersForAccount, updateUserInformationForSpecifiedUser };
package/dist/users.mjs DELETED
@@ -1,98 +0,0 @@
1
- import { docusignGenericObjectSchema, docusignListPaginationInputSchema, docusignLooseObjectSchema, docusignUserListSchema, docusignUserSchema } from "./schemas/index.mjs";
2
- import { r as defineRestOperation } from "./operation-helpers-D25WHTo1.mjs";
3
- import { z } from "zod";
4
-
5
- //#region src/users.ts
6
- /**
7
- * Account users. Covers PLAN.md § 6.22.
8
- */
9
- const userId = z.object({ userId: z.string().min(1) });
10
- const listUsersForAccount = defineRestOperation({
11
- id: "docusign.list-users-for-account",
12
- slug: "DOCUSIGN_LIST_USERS_FOR_ACCOUNT",
13
- name: "List Users For Account",
14
- description: "List users on the DocuSign account.",
15
- method: "GET",
16
- path: "/users",
17
- input: docusignListPaginationInputSchema.extend({
18
- additionalInfo: z.boolean().optional(),
19
- email: z.string().optional(),
20
- emailSubstring: z.string().optional(),
21
- groupId: z.string().optional(),
22
- status: z.string().optional(),
23
- userNameSubstring: z.string().optional()
24
- }),
25
- output: docusignUserListSchema,
26
- query: (input) => ({
27
- start_position: input.startPosition,
28
- count: input.count,
29
- additional_info: input.additionalInfo,
30
- email: input.email,
31
- email_substring: input.emailSubstring,
32
- group_id: input.groupId,
33
- status: input.status,
34
- user_name_substring: input.userNameSubstring
35
- })
36
- });
37
- const addNewUsersToASpecifiedAccount = defineRestOperation({
38
- id: "docusign.add-new-users-to-a-specified-account",
39
- slug: "DOCUSIGN_ADD_NEW_USERS_TO_A_SPECIFIED_ACCOUNT",
40
- name: "Add New Users",
41
- description: "Invite new users to the account.",
42
- needsApproval: true,
43
- method: "POST",
44
- path: "/users",
45
- input: z.object({ newUsers: z.array(docusignLooseObjectSchema()).min(1) }),
46
- output: docusignGenericObjectSchema,
47
- body: (input) => ({ newUsers: input.newUsers })
48
- });
49
- const getUserInformationById = defineRestOperation({
50
- id: "docusign.get-user-information-by-id",
51
- slug: "DOCUSIGN_GET_USER_INFORMATION_BY_ID",
52
- name: "Get User Information By Id",
53
- description: "Retrieve a single user on the account.",
54
- method: "GET",
55
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}`,
56
- input: userId.extend({ additionalInfo: z.boolean().optional() }),
57
- output: docusignUserSchema,
58
- query: (input) => ({ additional_info: input.additionalInfo })
59
- });
60
- const updateUserInformationForSpecifiedUser = defineRestOperation({
61
- id: "docusign.update-user-information-for-specified-user",
62
- slug: "DOCUSIGN_UPDATE_USER_INFORMATION_FOR_SPECIFIED_USER",
63
- name: "Update User Information",
64
- description: "Update a single user on the account.",
65
- needsApproval: true,
66
- method: "PUT",
67
- path: (ctx) => `/users/${ctx.encode(String(ctx.input.userId))}`,
68
- input: userId.extend({ user: docusignLooseObjectSchema() }),
69
- output: docusignUserSchema,
70
- body: (input) => input.user
71
- });
72
- const changeUsersInAccount = defineRestOperation({
73
- id: "docusign.change-users-in-account",
74
- slug: "DOCUSIGN_CHANGE_USERS_IN_ACCOUNT",
75
- name: "Change Users In Account",
76
- description: "Batch update users on the account.",
77
- needsApproval: true,
78
- method: "PUT",
79
- path: "/users",
80
- input: z.object({ users: z.array(docusignLooseObjectSchema()).min(1) }),
81
- output: docusignGenericObjectSchema,
82
- body: (input) => ({ users: input.users })
83
- });
84
- const closeUsersInAccount = defineRestOperation({
85
- id: "docusign.close-users-in-account",
86
- slug: "DOCUSIGN_CLOSE_USERS_IN_ACCOUNT",
87
- name: "Close Users In Account",
88
- description: "Close (deactivate) users on the account.",
89
- needsApproval: true,
90
- method: "DELETE",
91
- path: "/users",
92
- input: z.object({ users: z.array(docusignLooseObjectSchema()).min(1) }),
93
- output: docusignGenericObjectSchema,
94
- body: (input) => ({ users: input.users })
95
- });
96
-
97
- //#endregion
98
- export { addNewUsersToASpecifiedAccount, changeUsersInAccount, closeUsersInAccount, getUserInformationById, listUsersForAccount, updateUserInformationForSpecifiedUser };
@@ -1,19 +0,0 @@
1
- import { WebhookRequest } from "@keystrokehq/core";
2
-
3
- //#region src/verification.d.ts
4
- interface VerifyDocusignConnectRequestInput {
5
- readonly headers: Readonly<Record<string, string | undefined>>;
6
- readonly rawBody: string;
7
- readonly secrets: readonly string[];
8
- }
9
- declare function computeDocusignConnectSignature(secret: string, rawBody: string): string;
10
- declare function verifyDocusignConnectRequest(input: VerifyDocusignConnectRequestInput): boolean;
11
- /**
12
- * Parse a JSON-format Connect envelope-publish payload. Throws on invalid
13
- * JSON; callers should have already verified the HMAC signature.
14
- */
15
- declare function parseDocusignConnectEvent(rawBody: string): unknown;
16
- /** Narrow a `WebhookRequest` into the shape this module needs. */
17
- declare function verifyDocusignConnectWebhookRequest(request: Pick<WebhookRequest, 'headers' | 'rawBody'>, secrets: readonly string[]): boolean;
18
- //#endregion
19
- export { VerifyDocusignConnectRequestInput, computeDocusignConnectSignature, parseDocusignConnectEvent, verifyDocusignConnectRequest, verifyDocusignConnectWebhookRequest };
@@ -1,59 +0,0 @@
1
- import { createHmac, timingSafeEqual } from "node:crypto";
2
-
3
- //#region src/verification.ts
4
- /**
5
- * DocuSign Connect HMAC webhook verification.
6
- *
7
- * DocuSign Connect signs each outbound webhook with HMAC-SHA256 over the raw
8
- * request body for every account-configured shared secret, attaching the
9
- * result as one `X-DocuSign-Signature-{N}` header per secret (N starts at 1
10
- * and rolls up to 10). Verification accepts a delivery if any signature
11
- * header matches any currently-configured secret under constant-time compare.
12
- *
13
- * See: https://developers.docusign.com/platform/webhooks/connect/hmac/
14
- */
15
- function computeDocusignConnectSignature(secret, rawBody) {
16
- return createHmac("sha256", secret).update(rawBody, "utf8").digest("base64");
17
- }
18
- function normalizeHeader(value) {
19
- return value.trim();
20
- }
21
- function collectSignatureHeaders(headers) {
22
- const collected = [];
23
- for (const [key, value] of Object.entries(headers)) if (key.toLowerCase().startsWith("x-docusign-signature-") && typeof value === "string" && value.length > 0) collected.push(normalizeHeader(value));
24
- return collected;
25
- }
26
- function safeEqual(a, b) {
27
- const aBuf = Buffer.from(a, "utf8");
28
- const bBuf = Buffer.from(b, "utf8");
29
- if (aBuf.length !== bBuf.length) return false;
30
- return timingSafeEqual(aBuf, bBuf);
31
- }
32
- function verifyDocusignConnectRequest(input) {
33
- if (input.secrets.length === 0) return false;
34
- const provided = collectSignatureHeaders(input.headers);
35
- if (provided.length === 0) return false;
36
- for (const secret of input.secrets) {
37
- const expected = computeDocusignConnectSignature(secret, input.rawBody);
38
- for (const header of provided) if (safeEqual(header, expected)) return true;
39
- }
40
- return false;
41
- }
42
- /**
43
- * Parse a JSON-format Connect envelope-publish payload. Throws on invalid
44
- * JSON; callers should have already verified the HMAC signature.
45
- */
46
- function parseDocusignConnectEvent(rawBody) {
47
- return JSON.parse(rawBody);
48
- }
49
- /** Narrow a `WebhookRequest` into the shape this module needs. */
50
- function verifyDocusignConnectWebhookRequest(request, secrets) {
51
- return verifyDocusignConnectRequest({
52
- headers: request.headers,
53
- rawBody: request.rawBody,
54
- secrets
55
- });
56
- }
57
-
58
- //#endregion
59
- export { computeDocusignConnectSignature, parseDocusignConnectEvent, verifyDocusignConnectRequest, verifyDocusignConnectWebhookRequest };