@keystrokehq/docusign 0.0.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 (126) hide show
  1. package/README.md +248 -0
  2. package/dist/_official/index.d.mts +3 -0
  3. package/dist/_official/index.mjs +3 -0
  4. package/dist/_runtime/index.d.mts +1 -0
  5. package/dist/_runtime/index.mjs +1 -0
  6. package/dist/account-custom-fields.d.mts +65 -0
  7. package/dist/account-custom-fields.mjs +63 -0
  8. package/dist/account-stamps.d.mts +164 -0
  9. package/dist/account-stamps.mjs +144 -0
  10. package/dist/account-tabs.d.mts +90 -0
  11. package/dist/account-tabs.mjs +80 -0
  12. package/dist/account.d.mts +233 -0
  13. package/dist/account.mjs +207 -0
  14. package/dist/admin.d.mts +18 -0
  15. package/dist/admin.mjs +20 -0
  16. package/dist/auth.d.mts +37 -0
  17. package/dist/auth.mjs +53 -0
  18. package/dist/bcc-archive.d.mts +64 -0
  19. package/dist/bcc-archive.mjs +70 -0
  20. package/dist/billing.d.mts +217 -0
  21. package/dist/billing.mjs +208 -0
  22. package/dist/brands.d.mts +192 -0
  23. package/dist/brands.mjs +157 -0
  24. package/dist/bulk-send.d.mts +137 -0
  25. package/dist/bulk-send.mjs +115 -0
  26. package/dist/chunked-uploads.d.mts +78 -0
  27. package/dist/chunked-uploads.mjs +74 -0
  28. package/dist/click.d.mts +18 -0
  29. package/dist/click.mjs +20 -0
  30. package/dist/client.d.mts +47 -0
  31. package/dist/client.mjs +286 -0
  32. package/dist/clm.d.mts +18 -0
  33. package/dist/clm.mjs +20 -0
  34. package/dist/cloud-storage.d.mts +122 -0
  35. package/dist/cloud-storage.mjs +115 -0
  36. package/dist/connect.d.mts +252 -0
  37. package/dist/connect.mjs +217 -0
  38. package/dist/connection.d.mts +2 -0
  39. package/dist/connection.mjs +3 -0
  40. package/dist/contacts.d.mts +80 -0
  41. package/dist/contacts.mjs +79 -0
  42. package/dist/enote.d.mts +44 -0
  43. package/dist/enote.mjs +45 -0
  44. package/dist/envelope-attachments.d.mts +86 -0
  45. package/dist/envelope-attachments.mjs +76 -0
  46. package/dist/envelope-custom-fields.d.mts +166 -0
  47. package/dist/envelope-custom-fields.mjs +92 -0
  48. package/dist/envelope-documents.d.mts +271 -0
  49. package/dist/envelope-documents.mjs +219 -0
  50. package/dist/envelope-email.d.mts +65 -0
  51. package/dist/envelope-email.mjs +60 -0
  52. package/dist/envelope-lock.d.mts +65 -0
  53. package/dist/envelope-lock.mjs +60 -0
  54. package/dist/envelope-logs.d.mts +126 -0
  55. package/dist/envelope-logs.mjs +126 -0
  56. package/dist/envelope-notifications.d.mts +47 -0
  57. package/dist/envelope-notifications.mjs +44 -0
  58. package/dist/envelope-recipients.d.mts +171 -0
  59. package/dist/envelope-recipients.mjs +136 -0
  60. package/dist/envelope-tabs.d.mts +52 -0
  61. package/dist/envelope-tabs.mjs +49 -0
  62. package/dist/envelope-views.d.mts +99 -0
  63. package/dist/envelope-views.mjs +88 -0
  64. package/dist/envelope-workflow.d.mts +208 -0
  65. package/dist/envelope-workflow.mjs +176 -0
  66. package/dist/envelopes.d.mts +430 -0
  67. package/dist/envelopes.mjs +190 -0
  68. package/dist/errors.d.mts +48 -0
  69. package/dist/errors.mjs +76 -0
  70. package/dist/events.d.mts +192 -0
  71. package/dist/events.mjs +146 -0
  72. package/dist/factory-wViQTjgN.mjs +8 -0
  73. package/dist/groups.d.mts +191 -0
  74. package/dist/groups.mjs +146 -0
  75. package/dist/index.d.mts +1 -0
  76. package/dist/index.mjs +1 -0
  77. package/dist/integration-CmRztL9R.mjs +229 -0
  78. package/dist/integration-DqwHRkRh.d.mts +73 -0
  79. package/dist/messaging.d.mts +1 -0
  80. package/dist/messaging.mjs +1 -0
  81. package/dist/monitor.d.mts +18 -0
  82. package/dist/monitor.mjs +20 -0
  83. package/dist/notary.d.mts +129 -0
  84. package/dist/notary.mjs +122 -0
  85. package/dist/operation-helpers-BMTArRh9.mjs +102 -0
  86. package/dist/permission-profiles.d.mts +78 -0
  87. package/dist/permission-profiles.mjs +70 -0
  88. package/dist/power-forms.d.mts +51 -0
  89. package/dist/power-forms.mjs +62 -0
  90. package/dist/provider-app-CWp1SuI4.d.mts +88 -0
  91. package/dist/rooms.d.mts +18 -0
  92. package/dist/rooms.mjs +28 -0
  93. package/dist/schemas/index.d.mts +581 -0
  94. package/dist/schemas/index.mjs +309 -0
  95. package/dist/shared-DTUCJayR.mjs +27 -0
  96. package/dist/signing-groups.d.mts +139 -0
  97. package/dist/signing-groups.mjs +117 -0
  98. package/dist/template-custom-fields.d.mts +199 -0
  99. package/dist/template-custom-fields.mjs +107 -0
  100. package/dist/template-documents.d.mts +132 -0
  101. package/dist/template-documents.mjs +109 -0
  102. package/dist/template-lock.d.mts +65 -0
  103. package/dist/template-lock.mjs +60 -0
  104. package/dist/template-sharing.d.mts +129 -0
  105. package/dist/template-sharing.mjs +108 -0
  106. package/dist/template-workflow.d.mts +184 -0
  107. package/dist/template-workflow.mjs +152 -0
  108. package/dist/templates.d.mts +158 -0
  109. package/dist/templates.mjs +110 -0
  110. package/dist/triggers.d.mts +43 -0
  111. package/dist/triggers.mjs +91 -0
  112. package/dist/user-authorizations.d.mts +129 -0
  113. package/dist/user-authorizations.mjs +133 -0
  114. package/dist/user-custom-settings.d.mts +81 -0
  115. package/dist/user-custom-settings.mjs +69 -0
  116. package/dist/user-profile.d.mts +109 -0
  117. package/dist/user-profile.mjs +106 -0
  118. package/dist/user-signatures.d.mts +208 -0
  119. package/dist/user-signatures.mjs +180 -0
  120. package/dist/users.d.mts +128 -0
  121. package/dist/users.mjs +98 -0
  122. package/dist/verification.d.mts +19 -0
  123. package/dist/verification.mjs +59 -0
  124. package/dist/workspaces.d.mts +173 -0
  125. package/dist/workspaces.mjs +143 -0
  126. package/package.json +291 -0
@@ -0,0 +1,309 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/schemas/index.ts
4
+ /**
5
+ * Reusable Zod schemas for the DocuSign eSignature REST API.
6
+ *
7
+ * These are deliberately loose (`catchall(z.unknown())`) in places where
8
+ * DocuSign returns polymorphic shapes that depend on query-param `include`
9
+ * lists. Operations that need a tighter shape should build schemas inline.
10
+ *
11
+ * Enums here track the documented string literals. When DocuSign adds a new
12
+ * value, operations will throw a Zod validation error rather than silently
13
+ * coerce — a signal that the library needs an update, not a runtime bug.
14
+ */
15
+ const docusignIdSchema = z.string().min(1);
16
+ const docusignDateTimeSchema = z.union([z.iso.datetime(), z.string().min(1)]);
17
+ const docusignEmailSchema = z.email();
18
+ const docusignUrlSchema = z.union([z.url(), z.string().min(1)]);
19
+ const docusignEnvelopeIdSchema = z.string().min(1);
20
+ const docusignTemplateIdSchema = z.string().min(1);
21
+ const docusignRecipientIdSchema = z.string().min(1);
22
+ const docusignDocumentIdSchema = z.string().min(1);
23
+ function docusignLooseObjectSchema(shape = {}) {
24
+ return z.object(shape).catchall(z.unknown());
25
+ }
26
+ const docusignListPaginationInputSchema = z.object({
27
+ startPosition: z.number().int().nonnegative().optional(),
28
+ count: z.number().int().positive().max(1e3).optional()
29
+ });
30
+ const docusignListPaginationSchema = docusignLooseObjectSchema({
31
+ resultSetSize: z.union([z.number().int().nonnegative(), z.string()]).optional(),
32
+ totalSetSize: z.union([z.number().int().nonnegative(), z.string()]).optional(),
33
+ startPosition: z.union([z.number().int().nonnegative(), z.string()]).optional(),
34
+ endPosition: z.union([z.number().int().nonnegative(), z.string()]).optional(),
35
+ nextUri: z.string().optional(),
36
+ previousUri: z.string().optional()
37
+ });
38
+ const docusignEnvelopeStatusSchema = z.enum([
39
+ "any",
40
+ "created",
41
+ "sent",
42
+ "delivered",
43
+ "signed",
44
+ "completed",
45
+ "declined",
46
+ "voided",
47
+ "timedout",
48
+ "processing",
49
+ "template",
50
+ "correct",
51
+ "deleted",
52
+ "waiting-for-others",
53
+ "transfer",
54
+ "transfer-completed"
55
+ ]);
56
+ const docusignRecipientTypeSchema = z.enum([
57
+ "signers",
58
+ "carbonCopies",
59
+ "certifiedDeliveries",
60
+ "inPersonSigners",
61
+ "intermediaries",
62
+ "agents",
63
+ "editors",
64
+ "witnesses",
65
+ "notaries",
66
+ "seals"
67
+ ]);
68
+ const docusignTabTypeSchema = z.enum([
69
+ "signHereTabs",
70
+ "initialHereTabs",
71
+ "dateSignedTabs",
72
+ "dateTabs",
73
+ "checkboxTabs",
74
+ "listTabs",
75
+ "radioGroupTabs",
76
+ "textTabs",
77
+ "emailTabs",
78
+ "formulaTabs",
79
+ "titleTabs",
80
+ "companyTabs",
81
+ "noteTabs",
82
+ "numberTabs",
83
+ "fullNameTabs",
84
+ "firstNameTabs",
85
+ "lastNameTabs",
86
+ "ssnTabs",
87
+ "zipTabs",
88
+ "phoneTabs",
89
+ "envelopeIdTabs",
90
+ "approveTabs",
91
+ "declineTabs",
92
+ "viewTabs",
93
+ "drawTabs",
94
+ "smartSectionTabs",
95
+ "stampTabs",
96
+ "polyLineOverlayTabs",
97
+ "commentThreadTabs"
98
+ ]);
99
+ const docusignIncludeSchema = z.array(z.enum([
100
+ "recipients",
101
+ "tabs",
102
+ "custom_fields",
103
+ "documents",
104
+ "attachments",
105
+ "extensions",
106
+ "powerform",
107
+ "payment_tabs",
108
+ "workflow"
109
+ ]));
110
+ const docusignSignerInputSchema = docusignLooseObjectSchema({
111
+ email: docusignEmailSchema,
112
+ name: z.string().min(1),
113
+ recipientId: docusignRecipientIdSchema.optional(),
114
+ routingOrder: z.union([z.string(), z.number().int().nonnegative()]).optional(),
115
+ clientUserId: z.string().min(1).optional(),
116
+ roleName: z.string().min(1).optional(),
117
+ tabs: docusignLooseObjectSchema().optional()
118
+ });
119
+ const docusignCarbonCopyInputSchema = docusignLooseObjectSchema({
120
+ email: docusignEmailSchema,
121
+ name: z.string().min(1),
122
+ recipientId: docusignRecipientIdSchema.optional(),
123
+ routingOrder: z.union([z.string(), z.number().int().nonnegative()]).optional(),
124
+ roleName: z.string().min(1).optional()
125
+ });
126
+ const docusignRecipientsInputSchema = docusignLooseObjectSchema({
127
+ signers: z.array(docusignSignerInputSchema).optional(),
128
+ carbonCopies: z.array(docusignCarbonCopyInputSchema).optional(),
129
+ certifiedDeliveries: z.array(docusignLooseObjectSchema()).optional(),
130
+ inPersonSigners: z.array(docusignLooseObjectSchema()).optional(),
131
+ intermediaries: z.array(docusignLooseObjectSchema()).optional(),
132
+ agents: z.array(docusignLooseObjectSchema()).optional(),
133
+ editors: z.array(docusignLooseObjectSchema()).optional(),
134
+ witnesses: z.array(docusignLooseObjectSchema()).optional(),
135
+ notaries: z.array(docusignLooseObjectSchema()).optional(),
136
+ seals: z.array(docusignLooseObjectSchema()).optional()
137
+ });
138
+ const docusignRecipientSchema = docusignLooseObjectSchema({
139
+ recipientId: docusignRecipientIdSchema.optional(),
140
+ email: z.string().optional(),
141
+ name: z.string().optional(),
142
+ status: z.string().optional(),
143
+ routingOrder: z.string().optional(),
144
+ clientUserId: z.string().optional()
145
+ });
146
+ const docusignRecipientsResponseSchema = docusignLooseObjectSchema({
147
+ signers: z.array(docusignRecipientSchema).optional(),
148
+ carbonCopies: z.array(docusignRecipientSchema).optional(),
149
+ recipientCount: z.union([z.string(), z.number()]).optional()
150
+ });
151
+ const docusignDocumentInputSchema = docusignLooseObjectSchema({
152
+ documentId: docusignDocumentIdSchema,
153
+ name: z.string().min(1),
154
+ fileExtension: z.string().min(1).optional(),
155
+ documentBase64: z.string().min(1).optional(),
156
+ order: z.union([z.string(), z.number()]).optional(),
157
+ transformPdfFields: z.boolean().optional()
158
+ });
159
+ const docusignDocumentSchema = docusignLooseObjectSchema({
160
+ documentId: docusignDocumentIdSchema,
161
+ name: z.string().optional(),
162
+ type: z.string().optional(),
163
+ uri: z.string().optional(),
164
+ order: z.string().optional()
165
+ });
166
+ const docusignDocumentListSchema = docusignLooseObjectSchema({
167
+ envelopeDocuments: z.array(docusignDocumentSchema).optional(),
168
+ envelopeId: docusignEnvelopeIdSchema.optional()
169
+ });
170
+ const docusignCustomFieldInputSchema = docusignLooseObjectSchema({
171
+ name: z.string().min(1),
172
+ value: z.string(),
173
+ required: z.boolean().optional(),
174
+ show: z.boolean().optional()
175
+ });
176
+ const docusignCustomFieldsInputSchema = docusignLooseObjectSchema({
177
+ textCustomFields: z.array(docusignCustomFieldInputSchema).optional(),
178
+ listCustomFields: z.array(docusignCustomFieldInputSchema.extend({ listItems: z.array(z.string()).optional() })).optional()
179
+ });
180
+ const docusignCustomFieldsResponseSchema = docusignLooseObjectSchema({
181
+ textCustomFields: z.array(docusignLooseObjectSchema()).optional(),
182
+ listCustomFields: z.array(docusignLooseObjectSchema()).optional()
183
+ });
184
+ const docusignEnvelopeSchema = docusignLooseObjectSchema({
185
+ envelopeId: docusignEnvelopeIdSchema.optional(),
186
+ status: z.string().optional(),
187
+ statusDateTime: z.string().optional(),
188
+ createdDateTime: z.string().optional(),
189
+ sentDateTime: z.string().optional(),
190
+ completedDateTime: z.string().optional(),
191
+ emailSubject: z.string().optional(),
192
+ emailBlurb: z.string().optional(),
193
+ recipients: docusignRecipientsResponseSchema.optional(),
194
+ customFields: docusignCustomFieldsResponseSchema.optional()
195
+ });
196
+ const docusignEnvelopeListSchema = docusignLooseObjectSchema({
197
+ envelopes: z.array(docusignEnvelopeSchema).optional(),
198
+ ...docusignListPaginationSchema.shape
199
+ });
200
+ const docusignEnvelopeCreateInputSchema = docusignLooseObjectSchema({
201
+ emailSubject: z.string().min(1).optional(),
202
+ emailBlurb: z.string().optional(),
203
+ status: z.enum(["created", "sent"]).optional(),
204
+ templateId: docusignTemplateIdSchema.optional(),
205
+ templateRoles: z.array(docusignLooseObjectSchema()).optional(),
206
+ documents: z.array(docusignDocumentInputSchema).optional(),
207
+ recipients: docusignRecipientsInputSchema.optional(),
208
+ customFields: docusignCustomFieldsInputSchema.optional(),
209
+ brandId: z.string().optional(),
210
+ notification: docusignLooseObjectSchema().optional()
211
+ });
212
+ const docusignEnvelopeSummarySchema = docusignLooseObjectSchema({
213
+ envelopeId: docusignEnvelopeIdSchema,
214
+ status: z.string().optional(),
215
+ statusDateTime: z.string().optional(),
216
+ uri: z.string().optional()
217
+ });
218
+ const docusignTemplateSummarySchema = docusignLooseObjectSchema({
219
+ templateId: docusignTemplateIdSchema,
220
+ name: z.string().optional(),
221
+ description: z.string().optional(),
222
+ shared: z.string().optional(),
223
+ created: z.string().optional(),
224
+ lastModified: z.string().optional()
225
+ });
226
+ const docusignTemplateListSchema = docusignLooseObjectSchema({
227
+ envelopeTemplates: z.array(docusignTemplateSummarySchema).optional(),
228
+ ...docusignListPaginationSchema.shape
229
+ });
230
+ const docusignTemplateSchema = docusignLooseObjectSchema({
231
+ templateId: docusignTemplateIdSchema,
232
+ name: z.string().optional(),
233
+ description: z.string().optional(),
234
+ shared: z.string().optional(),
235
+ documents: z.array(docusignDocumentSchema).optional(),
236
+ recipients: docusignRecipientsResponseSchema.optional()
237
+ });
238
+ const docusignBulkSendListSchema = docusignLooseObjectSchema({
239
+ bulkSendListId: z.string().optional(),
240
+ name: z.string().optional(),
241
+ bulkRecipients: z.array(docusignLooseObjectSchema()).optional()
242
+ });
243
+ const docusignBulkSendBatchSchema = docusignLooseObjectSchema({
244
+ batchId: z.string().optional(),
245
+ batchName: z.string().optional(),
246
+ status: z.string().optional(),
247
+ totalCount: z.union([z.number(), z.string()]).optional()
248
+ });
249
+ const docusignUserSchema = docusignLooseObjectSchema({
250
+ userId: z.string().optional(),
251
+ userName: z.string().optional(),
252
+ email: z.string().optional(),
253
+ userStatus: z.string().optional(),
254
+ userType: z.string().optional(),
255
+ firstName: z.string().optional(),
256
+ lastName: z.string().optional()
257
+ });
258
+ const docusignUserListSchema = docusignLooseObjectSchema({
259
+ users: z.array(docusignUserSchema).optional(),
260
+ ...docusignListPaginationSchema.shape
261
+ });
262
+ const docusignGroupSchema = docusignLooseObjectSchema({
263
+ groupId: z.string().optional(),
264
+ groupName: z.string().optional(),
265
+ groupType: z.string().optional(),
266
+ permissionProfileId: z.string().optional()
267
+ });
268
+ const docusignGroupListSchema = docusignLooseObjectSchema({
269
+ groups: z.array(docusignGroupSchema).optional(),
270
+ ...docusignListPaginationSchema.shape
271
+ });
272
+ const docusignBrandSchema = docusignLooseObjectSchema({
273
+ brandId: z.string().optional(),
274
+ brandName: z.string().optional(),
275
+ brandCompany: z.string().optional(),
276
+ isOverridingCompanyName: z.boolean().optional(),
277
+ defaultBrandLanguage: z.string().optional()
278
+ });
279
+ const docusignBrandListSchema = docusignLooseObjectSchema({ brands: z.array(docusignBrandSchema).optional() });
280
+ const docusignAccountSchema = docusignLooseObjectSchema({
281
+ accountIdGuid: z.string().optional(),
282
+ accountName: z.string().optional(),
283
+ billingPeriodEndDate: z.string().optional(),
284
+ billingPeriodEnvelopesAllowed: z.string().optional(),
285
+ billingPeriodEnvelopesSent: z.string().optional(),
286
+ planClassification: z.string().optional(),
287
+ planName: z.string().optional()
288
+ });
289
+ const docusignConnectConfigurationSchema = docusignLooseObjectSchema({
290
+ connectId: z.string().optional(),
291
+ urlToPublishTo: z.string().optional(),
292
+ name: z.string().optional(),
293
+ configurationType: z.string().optional(),
294
+ allowEnvelopePublish: z.string().optional(),
295
+ enableLog: z.string().optional(),
296
+ envelopeEvents: z.array(z.string()).optional(),
297
+ recipientEvents: z.array(z.string()).optional()
298
+ });
299
+ const docusignConnectLogSchema = docusignLooseObjectSchema({
300
+ logId: z.string().optional(),
301
+ status: z.string().optional(),
302
+ statusDescription: z.string().optional(),
303
+ created: z.string().optional()
304
+ });
305
+ const docusignGenericObjectSchema = docusignLooseObjectSchema();
306
+ const docusignSuccessSchema = z.object({ success: z.boolean() });
307
+
308
+ //#endregion
309
+ export { docusignAccountSchema, docusignBrandListSchema, docusignBrandSchema, docusignBulkSendBatchSchema, docusignBulkSendListSchema, docusignCarbonCopyInputSchema, docusignConnectConfigurationSchema, docusignConnectLogSchema, docusignCustomFieldInputSchema, docusignCustomFieldsInputSchema, docusignCustomFieldsResponseSchema, docusignDateTimeSchema, docusignDocumentIdSchema, docusignDocumentInputSchema, docusignDocumentListSchema, docusignDocumentSchema, docusignEmailSchema, docusignEnvelopeCreateInputSchema, docusignEnvelopeIdSchema, docusignEnvelopeListSchema, docusignEnvelopeSchema, docusignEnvelopeStatusSchema, docusignEnvelopeSummarySchema, docusignGenericObjectSchema, docusignGroupListSchema, docusignGroupSchema, docusignIdSchema, docusignIncludeSchema, docusignListPaginationInputSchema, docusignListPaginationSchema, docusignLooseObjectSchema, docusignRecipientIdSchema, docusignRecipientSchema, docusignRecipientTypeSchema, docusignRecipientsInputSchema, docusignRecipientsResponseSchema, docusignSignerInputSchema, docusignSuccessSchema, docusignTabTypeSchema, docusignTemplateIdSchema, docusignTemplateListSchema, docusignTemplateSchema, docusignTemplateSummarySchema, docusignUrlSchema, docusignUserListSchema, docusignUserSchema };
@@ -0,0 +1,27 @@
1
+ //#region src/shared.ts
2
+ function omitUndefined(value) {
3
+ return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== void 0));
4
+ }
5
+ /**
6
+ * DocuSign envelope and document ids are occasionally base64 with slashes.
7
+ * Double-encode to survive path routing layers that collapse `/` segments.
8
+ */
9
+ function encodeDocusignPathSegment(segment) {
10
+ const encoded = encodeURIComponent(segment);
11
+ if (segment.includes("/")) return encodeURIComponent(encoded);
12
+ return encoded;
13
+ }
14
+ function toQueryValue(value) {
15
+ if (value === void 0 || value === null) return void 0;
16
+ if (typeof value === "boolean") return value ? "true" : "false";
17
+ if (typeof value === "number") return Number.isFinite(value) ? String(value) : void 0;
18
+ if (typeof value === "string") return value;
19
+ if (Array.isArray(value)) {
20
+ const items = value.filter((item) => typeof item === "string" || typeof item === "number" || typeof item === "boolean");
21
+ if (items.length === 0) return void 0;
22
+ return items.map(String).join(",");
23
+ }
24
+ }
25
+
26
+ //#endregion
27
+ export { omitUndefined as n, toQueryValue as r, encodeDocusignPathSegment as t };
@@ -0,0 +1,139 @@
1
+ import { z } from "zod";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
3
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
+
5
+ //#region src/signing-groups.d.ts
6
+ declare const createSigningGroup: _keystrokehq_core0.Operation<z.ZodObject<{
7
+ groups: 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<"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>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
17
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
18
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
19
+ DOCUSIGN_BASE_URI: z.ZodURL;
20
+ }, z.core.$strip>>[] | undefined>], undefined>;
21
+ declare const retrieveAccountSigningGroups: _keystrokehq_core0.Operation<z.ZodObject<{
22
+ groupType: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>, z.ZodObject<{
24
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
25
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
26
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
27
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
28
+ DOCUSIGN_BASE_URI: z.ZodURL;
29
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
30
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
31
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
32
+ DOCUSIGN_BASE_URI: z.ZodURL;
33
+ }, z.core.$strip>>[] | undefined>], undefined>;
34
+ declare const getSigningGroupInformation: _keystrokehq_core0.Operation<z.ZodObject<{
35
+ signingGroupId: z.ZodString;
36
+ }, z.core.$strip>, z.ZodObject<{
37
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
38
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
39
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
40
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
41
+ DOCUSIGN_BASE_URI: z.ZodURL;
42
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
43
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
44
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
45
+ DOCUSIGN_BASE_URI: z.ZodURL;
46
+ }, z.core.$strip>>[] | undefined>], undefined>;
47
+ declare const updateSigningGroupDetails: _keystrokehq_core0.Operation<z.ZodObject<{
48
+ signingGroupId: z.ZodString;
49
+ group: z.ZodObject<{
50
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
51
+ }, z.core.$catchall<z.ZodUnknown>>;
52
+ }, z.core.$strip>, z.ZodObject<{
53
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
54
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
55
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
56
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
57
+ DOCUSIGN_BASE_URI: z.ZodURL;
58
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
59
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
60
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
61
+ DOCUSIGN_BASE_URI: z.ZodURL;
62
+ }, z.core.$strip>>[] | undefined>], undefined>;
63
+ declare const updateSigningGroupNames: _keystrokehq_core0.Operation<z.ZodObject<{
64
+ groups: z.ZodArray<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
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
69
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
70
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
71
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
72
+ DOCUSIGN_BASE_URI: z.ZodURL;
73
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
74
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
75
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
76
+ DOCUSIGN_BASE_URI: z.ZodURL;
77
+ }, z.core.$strip>>[] | undefined>], undefined>;
78
+ declare const addMembersToSigningGroup: _keystrokehq_core0.Operation<z.ZodObject<{
79
+ signingGroupId: z.ZodString;
80
+ users: z.ZodArray<z.ZodObject<{
81
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
82
+ }, z.core.$catchall<z.ZodUnknown>>>;
83
+ }, z.core.$strip>, z.ZodObject<{
84
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
85
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
86
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
87
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
88
+ DOCUSIGN_BASE_URI: z.ZodURL;
89
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
90
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
91
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
92
+ DOCUSIGN_BASE_URI: z.ZodURL;
93
+ }, z.core.$strip>>[] | undefined>], undefined>;
94
+ declare const getMembersOfASigningGroup: _keystrokehq_core0.Operation<z.ZodObject<{
95
+ signingGroupId: z.ZodString;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
98
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
99
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
100
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
101
+ DOCUSIGN_BASE_URI: z.ZodURL;
102
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
103
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
104
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
105
+ DOCUSIGN_BASE_URI: z.ZodURL;
106
+ }, z.core.$strip>>[] | undefined>], undefined>;
107
+ declare const deleteMembersFromSigningGroup: _keystrokehq_core0.Operation<z.ZodObject<{
108
+ signingGroupId: z.ZodString;
109
+ users: z.ZodArray<z.ZodObject<{
110
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
111
+ }, z.core.$catchall<z.ZodUnknown>>>;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ success: z.ZodBoolean;
114
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
115
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
116
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
117
+ DOCUSIGN_BASE_URI: z.ZodURL;
118
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
119
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
120
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
121
+ DOCUSIGN_BASE_URI: z.ZodURL;
122
+ }, z.core.$strip>>[] | undefined>], undefined>;
123
+ declare const deleteOneOrMoreSigningGroups: _keystrokehq_core0.Operation<z.ZodObject<{
124
+ groups: z.ZodArray<z.ZodObject<{
125
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
126
+ }, z.core.$catchall<z.ZodUnknown>>>;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ success: z.ZodBoolean;
129
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
130
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
131
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
132
+ DOCUSIGN_BASE_URI: z.ZodURL;
133
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
134
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
135
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
136
+ DOCUSIGN_BASE_URI: z.ZodURL;
137
+ }, z.core.$strip>>[] | undefined>], undefined>;
138
+ //#endregion
139
+ export { addMembersToSigningGroup, createSigningGroup, deleteMembersFromSigningGroup, deleteOneOrMoreSigningGroups, getMembersOfASigningGroup, getSigningGroupInformation, retrieveAccountSigningGroups, updateSigningGroupDetails, updateSigningGroupNames };
@@ -0,0 +1,117 @@
1
+ import { docusignGenericObjectSchema, docusignLooseObjectSchema, docusignSuccessSchema } from "./schemas/index.mjs";
2
+ import { r as defineRestOperation } from "./operation-helpers-BMTArRh9.mjs";
3
+ import { z } from "zod";
4
+
5
+ //#region src/signing-groups.ts
6
+ /**
7
+ * Signing groups + membership. Covers PLAN.md § 6.20.
8
+ */
9
+ const groupId = z.object({ signingGroupId: z.string().min(1) });
10
+ const createSigningGroup = defineRestOperation({
11
+ id: "create_signing_group",
12
+ slug: "DOCUSIGN_CREATE_SIGNING_GROUP",
13
+ name: "Create Signing Group",
14
+ description: "Create a new signing group on the account.",
15
+ needsApproval: true,
16
+ method: "POST",
17
+ path: "/signing_groups",
18
+ input: z.object({ groups: z.array(docusignLooseObjectSchema()).min(1) }),
19
+ output: docusignGenericObjectSchema,
20
+ body: (input) => ({ groups: input.groups })
21
+ });
22
+ const retrieveAccountSigningGroups = defineRestOperation({
23
+ id: "retrieve_account_signing_groups",
24
+ slug: "DOCUSIGN_RETRIEVE_ACCOUNT_SIGNING_GROUPS",
25
+ name: "Retrieve Account Signing Groups",
26
+ description: "List signing groups on the account.",
27
+ method: "GET",
28
+ path: "/signing_groups",
29
+ input: z.object({ groupType: z.string().optional() }),
30
+ output: docusignGenericObjectSchema,
31
+ query: (input) => ({ group_type: input.groupType })
32
+ });
33
+ const getSigningGroupInformation = defineRestOperation({
34
+ id: "get_signing_group_information",
35
+ slug: "DOCUSIGN_GET_SIGNING_GROUP_INFORMATION",
36
+ name: "Get Signing Group Information",
37
+ description: "Retrieve a specific signing group.",
38
+ method: "GET",
39
+ path: (ctx) => `/signing_groups/${ctx.encode(String(ctx.input.signingGroupId))}`,
40
+ input: groupId,
41
+ output: docusignGenericObjectSchema
42
+ });
43
+ const updateSigningGroupDetails = defineRestOperation({
44
+ id: "update_signing_group_details",
45
+ slug: "DOCUSIGN_UPDATE_SIGNING_GROUP_DETAILS",
46
+ name: "Update Signing Group Details",
47
+ description: "Update details of a signing group.",
48
+ needsApproval: true,
49
+ method: "PUT",
50
+ path: (ctx) => `/signing_groups/${ctx.encode(String(ctx.input.signingGroupId))}`,
51
+ input: groupId.extend({ group: docusignLooseObjectSchema() }),
52
+ output: docusignGenericObjectSchema,
53
+ body: (input) => input.group
54
+ });
55
+ const updateSigningGroupNames = defineRestOperation({
56
+ id: "update_signing_group_names",
57
+ slug: "DOCUSIGN_UPDATE_SIGNING_GROUP_NAMES",
58
+ name: "Update Signing Group Names",
59
+ description: "Update signing group names in bulk.",
60
+ needsApproval: true,
61
+ method: "PUT",
62
+ path: "/signing_groups",
63
+ input: z.object({ groups: z.array(docusignLooseObjectSchema()).min(1) }),
64
+ output: docusignGenericObjectSchema,
65
+ body: (input) => ({ groups: input.groups })
66
+ });
67
+ const addMembersToSigningGroup = defineRestOperation({
68
+ id: "add_members_to_signing_group",
69
+ slug: "DOCUSIGN_ADD_MEMBERS_TO_SIGNING_GROUP",
70
+ name: "Add Members To Signing Group",
71
+ description: "Add users to a signing group.",
72
+ needsApproval: true,
73
+ method: "PUT",
74
+ path: (ctx) => `/signing_groups/${ctx.encode(String(ctx.input.signingGroupId))}/users`,
75
+ input: groupId.extend({ users: z.array(docusignLooseObjectSchema()).min(1) }),
76
+ output: docusignGenericObjectSchema,
77
+ body: (input) => ({ users: input.users })
78
+ });
79
+ const getMembersOfASigningGroup = defineRestOperation({
80
+ id: "get_members_of_a_signing_group",
81
+ slug: "DOCUSIGN_GET_MEMBERS_OF_A_SIGNING_GROUP",
82
+ name: "Get Signing Group Members",
83
+ description: "List members of a signing group.",
84
+ method: "GET",
85
+ path: (ctx) => `/signing_groups/${ctx.encode(String(ctx.input.signingGroupId))}/users`,
86
+ input: groupId,
87
+ output: docusignGenericObjectSchema
88
+ });
89
+ const deleteMembersFromSigningGroup = defineRestOperation({
90
+ id: "delete_members_from_signing_group",
91
+ slug: "DOCUSIGN_DELETE_MEMBERS_FROM_SIGNING_GROUP",
92
+ name: "Delete Signing Group Members",
93
+ description: "Remove users from a signing group.",
94
+ needsApproval: true,
95
+ method: "DELETE",
96
+ path: (ctx) => `/signing_groups/${ctx.encode(String(ctx.input.signingGroupId))}/users`,
97
+ input: groupId.extend({ users: z.array(docusignLooseObjectSchema()).min(1) }),
98
+ output: docusignSuccessSchema,
99
+ body: (input) => ({ users: input.users }),
100
+ transformResponse: () => ({ success: true })
101
+ });
102
+ const deleteOneOrMoreSigningGroups = defineRestOperation({
103
+ id: "delete_one_or_more_signing_groups",
104
+ slug: "DOCUSIGN_DELETE_ONE_OR_MORE_SIGNING_GROUPS",
105
+ name: "Delete One Or More Signing Groups",
106
+ description: "Delete one or more signing groups by id.",
107
+ needsApproval: true,
108
+ method: "DELETE",
109
+ path: "/signing_groups",
110
+ input: z.object({ groups: z.array(docusignLooseObjectSchema()).min(1) }),
111
+ output: docusignSuccessSchema,
112
+ body: (input) => ({ groups: input.groups }),
113
+ transformResponse: () => ({ success: true })
114
+ });
115
+
116
+ //#endregion
117
+ export { addMembersToSigningGroup, createSigningGroup, deleteMembersFromSigningGroup, deleteOneOrMoreSigningGroups, getMembersOfASigningGroup, getSigningGroupInformation, retrieveAccountSigningGroups, updateSigningGroupDetails, updateSigningGroupNames };