@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,191 @@
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/groups.d.ts
6
+ declare const createGroupsForAccount: _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
+ resultSetSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
12
+ totalSetSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
13
+ startPosition: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
14
+ endPosition: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
15
+ nextUri: z.ZodOptional<z.ZodString>;
16
+ previousUri: z.ZodOptional<z.ZodString>;
17
+ groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
18
+ groupId: z.ZodOptional<z.ZodString>;
19
+ groupName: z.ZodOptional<z.ZodString>;
20
+ groupType: z.ZodOptional<z.ZodString>;
21
+ permissionProfileId: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$catchall<z.ZodUnknown>>>>;
23
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
24
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
25
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
26
+ DOCUSIGN_BASE_URI: z.ZodURL;
27
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
28
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
29
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
30
+ DOCUSIGN_BASE_URI: z.ZodURL;
31
+ }, z.core.$strip>>[] | undefined>], undefined>;
32
+ declare const getGroupsInformationForAccount: _keystrokehq_core0.Operation<z.ZodObject<{
33
+ startPosition: z.ZodOptional<z.ZodNumber>;
34
+ count: z.ZodOptional<z.ZodNumber>;
35
+ groupType: z.ZodOptional<z.ZodString>;
36
+ searchText: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>, z.ZodObject<{
38
+ resultSetSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
39
+ totalSetSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
40
+ startPosition: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
41
+ endPosition: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
42
+ nextUri: z.ZodOptional<z.ZodString>;
43
+ previousUri: z.ZodOptional<z.ZodString>;
44
+ groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
45
+ groupId: z.ZodOptional<z.ZodString>;
46
+ groupName: z.ZodOptional<z.ZodString>;
47
+ groupType: z.ZodOptional<z.ZodString>;
48
+ permissionProfileId: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$catchall<z.ZodUnknown>>>>;
50
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
51
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
52
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
53
+ DOCUSIGN_BASE_URI: z.ZodURL;
54
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
55
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
56
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
57
+ DOCUSIGN_BASE_URI: z.ZodURL;
58
+ }, z.core.$strip>>[] | undefined>], undefined>;
59
+ declare const updateGroupInformation: _keystrokehq_core0.Operation<z.ZodObject<{
60
+ groups: z.ZodArray<z.ZodObject<{
61
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
62
+ }, z.core.$catchall<z.ZodUnknown>>>;
63
+ }, z.core.$strip>, z.ZodObject<{
64
+ resultSetSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
65
+ totalSetSize: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
66
+ startPosition: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
67
+ endPosition: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
68
+ nextUri: z.ZodOptional<z.ZodString>;
69
+ previousUri: z.ZodOptional<z.ZodString>;
70
+ groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
71
+ groupId: z.ZodOptional<z.ZodString>;
72
+ groupName: z.ZodOptional<z.ZodString>;
73
+ groupType: z.ZodOptional<z.ZodString>;
74
+ permissionProfileId: z.ZodOptional<z.ZodString>;
75
+ }, z.core.$catchall<z.ZodUnknown>>>>;
76
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
77
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
78
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
79
+ DOCUSIGN_BASE_URI: z.ZodURL;
80
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<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>], undefined>;
85
+ declare const deleteUserGroup: _keystrokehq_core0.Operation<z.ZodObject<{
86
+ groups: z.ZodArray<z.ZodObject<{
87
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
88
+ }, z.core.$catchall<z.ZodUnknown>>>;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ success: z.ZodBoolean;
91
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
92
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
93
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
94
+ DOCUSIGN_BASE_URI: z.ZodURL;
95
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
96
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
97
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
98
+ DOCUSIGN_BASE_URI: z.ZodURL;
99
+ }, z.core.$strip>>[] | undefined>], undefined>;
100
+ declare const addUsersToExistingGroup: _keystrokehq_core0.Operation<z.ZodObject<{
101
+ groupId: z.ZodString;
102
+ users: z.ZodArray<z.ZodObject<{
103
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
104
+ }, z.core.$catchall<z.ZodUnknown>>>;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
107
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"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>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
112
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
113
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
114
+ DOCUSIGN_BASE_URI: z.ZodURL;
115
+ }, z.core.$strip>>[] | undefined>], undefined>;
116
+ declare const getUsersInGroup: _keystrokehq_core0.Operation<z.ZodObject<{
117
+ groupId: z.ZodString;
118
+ startPosition: z.ZodOptional<z.ZodNumber>;
119
+ count: z.ZodOptional<z.ZodNumber>;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
122
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
123
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
124
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
125
+ DOCUSIGN_BASE_URI: z.ZodURL;
126
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
127
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
128
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
129
+ DOCUSIGN_BASE_URI: z.ZodURL;
130
+ }, z.core.$strip>>[] | undefined>], undefined>;
131
+ declare const deleteUsersFromGroup: _keystrokehq_core0.Operation<z.ZodObject<{
132
+ groupId: z.ZodString;
133
+ users: z.ZodArray<z.ZodObject<{
134
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
135
+ }, z.core.$catchall<z.ZodUnknown>>>;
136
+ }, z.core.$strip>, z.ZodObject<{
137
+ success: z.ZodBoolean;
138
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
139
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
140
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
141
+ DOCUSIGN_BASE_URI: z.ZodURL;
142
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
143
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
144
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
145
+ DOCUSIGN_BASE_URI: z.ZodURL;
146
+ }, z.core.$strip>>[] | undefined>], undefined>;
147
+ declare const addExistingBrandToGroup: _keystrokehq_core0.Operation<z.ZodObject<{
148
+ groupId: z.ZodString;
149
+ brands: z.ZodArray<z.ZodObject<{
150
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
151
+ }, z.core.$catchall<z.ZodUnknown>>>;
152
+ }, z.core.$strip>, z.ZodObject<{
153
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
154
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
155
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
156
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
157
+ DOCUSIGN_BASE_URI: z.ZodURL;
158
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
159
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
160
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
161
+ DOCUSIGN_BASE_URI: z.ZodURL;
162
+ }, z.core.$strip>>[] | undefined>], undefined>;
163
+ declare const deleteBrandFromGroup: _keystrokehq_core0.Operation<z.ZodObject<{
164
+ groupId: z.ZodString;
165
+ brandId: z.ZodString;
166
+ }, z.core.$strip>, z.ZodObject<{
167
+ success: z.ZodBoolean;
168
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
169
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
170
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
171
+ DOCUSIGN_BASE_URI: z.ZodURL;
172
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
173
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
174
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
175
+ DOCUSIGN_BASE_URI: z.ZodURL;
176
+ }, z.core.$strip>>[] | undefined>], undefined>;
177
+ declare const getBrandsInformationForGroup: _keystrokehq_core0.Operation<z.ZodObject<{
178
+ groupId: z.ZodString;
179
+ }, z.core.$strip>, z.ZodObject<{
180
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
181
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
182
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
183
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
184
+ DOCUSIGN_BASE_URI: z.ZodURL;
185
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
186
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
187
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
188
+ DOCUSIGN_BASE_URI: z.ZodURL;
189
+ }, z.core.$strip>>[] | undefined>], undefined>;
190
+ //#endregion
191
+ export { addExistingBrandToGroup, addUsersToExistingGroup, createGroupsForAccount, deleteBrandFromGroup, deleteUserGroup, deleteUsersFromGroup, getBrandsInformationForGroup, getGroupsInformationForAccount, getUsersInGroup, updateGroupInformation };
@@ -0,0 +1,146 @@
1
+ import { docusignGenericObjectSchema, docusignGroupListSchema, docusignListPaginationInputSchema, 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/groups.ts
6
+ /**
7
+ * Account groups (groups + brands + users). Covers PLAN.md § 6.28.
8
+ */
9
+ const groupId = z.object({ groupId: z.string().min(1) });
10
+ const groupBrand = groupId.extend({ brandId: z.string().min(1) });
11
+ const createGroupsForAccount = defineRestOperation({
12
+ id: "create_groups_for_account",
13
+ slug: "DOCUSIGN_CREATE_GROUPS_FOR_ACCOUNT",
14
+ name: "Create Groups For Account",
15
+ description: "Create new groups on the account.",
16
+ needsApproval: true,
17
+ method: "POST",
18
+ path: "/groups",
19
+ input: z.object({ groups: z.array(docusignLooseObjectSchema()).min(1) }),
20
+ output: docusignGroupListSchema,
21
+ body: (input) => ({ groups: input.groups })
22
+ });
23
+ const getGroupsInformationForAccount = defineRestOperation({
24
+ id: "get_groups_information_for_account",
25
+ slug: "DOCUSIGN_GET_GROUPS_INFORMATION_FOR_ACCOUNT",
26
+ name: "Get Groups For Account",
27
+ description: "List groups on the account.",
28
+ method: "GET",
29
+ path: "/groups",
30
+ input: docusignListPaginationInputSchema.extend({
31
+ groupType: z.string().optional(),
32
+ searchText: z.string().optional()
33
+ }),
34
+ output: docusignGroupListSchema,
35
+ query: (input) => ({
36
+ start_position: input.startPosition,
37
+ count: input.count,
38
+ group_type: input.groupType,
39
+ search_text: input.searchText
40
+ })
41
+ });
42
+ const updateGroupInformation = defineRestOperation({
43
+ id: "update_group_information",
44
+ slug: "DOCUSIGN_UPDATE_GROUP_INFORMATION",
45
+ name: "Update Group Information",
46
+ description: "Update information on a group.",
47
+ needsApproval: true,
48
+ method: "PUT",
49
+ path: "/groups",
50
+ input: z.object({ groups: z.array(docusignLooseObjectSchema()).min(1) }),
51
+ output: docusignGroupListSchema,
52
+ body: (input) => ({ groups: input.groups })
53
+ });
54
+ const deleteUserGroup = defineRestOperation({
55
+ id: "delete_user_group",
56
+ slug: "DOCUSIGN_DELETE_USER_GROUP",
57
+ name: "Delete User Group",
58
+ description: "Delete groups by id.",
59
+ needsApproval: true,
60
+ method: "DELETE",
61
+ path: "/groups",
62
+ input: z.object({ groups: z.array(docusignLooseObjectSchema()).min(1) }),
63
+ output: docusignSuccessSchema,
64
+ body: (input) => ({ groups: input.groups }),
65
+ transformResponse: () => ({ success: true })
66
+ });
67
+ const addUsersToExistingGroup = defineRestOperation({
68
+ id: "add_users_to_existing_group",
69
+ slug: "DOCUSIGN_ADD_USERS_TO_EXISTING_GROUP",
70
+ name: "Add Users To Existing Group",
71
+ description: "Add users to an existing group.",
72
+ needsApproval: true,
73
+ method: "PUT",
74
+ path: (ctx) => `/groups/${ctx.encode(String(ctx.input.groupId))}/users`,
75
+ input: groupId.extend({ users: z.array(docusignLooseObjectSchema()).min(1) }),
76
+ output: docusignGenericObjectSchema,
77
+ body: (input) => ({ users: input.users })
78
+ });
79
+ const getUsersInGroup = defineRestOperation({
80
+ id: "get_users_in_group",
81
+ slug: "DOCUSIGN_GET_USERS_IN_GROUP",
82
+ name: "Get Users In Group",
83
+ description: "List users in a group.",
84
+ method: "GET",
85
+ path: (ctx) => `/groups/${ctx.encode(String(ctx.input.groupId))}/users`,
86
+ input: groupId.extend({
87
+ startPosition: z.number().int().nonnegative().optional(),
88
+ count: z.number().int().positive().optional()
89
+ }),
90
+ output: docusignGenericObjectSchema,
91
+ query: (input) => ({
92
+ start_position: input.startPosition,
93
+ count: input.count
94
+ })
95
+ });
96
+ const deleteUsersFromGroup = defineRestOperation({
97
+ id: "delete_users_from_group",
98
+ slug: "DOCUSIGN_DELETE_USERS_FROM_GROUP",
99
+ name: "Delete Users From Group",
100
+ description: "Remove users from a group.",
101
+ needsApproval: true,
102
+ method: "DELETE",
103
+ path: (ctx) => `/groups/${ctx.encode(String(ctx.input.groupId))}/users`,
104
+ input: groupId.extend({ users: z.array(docusignLooseObjectSchema()).min(1) }),
105
+ output: docusignSuccessSchema,
106
+ body: (input) => ({ users: input.users }),
107
+ transformResponse: () => ({ success: true })
108
+ });
109
+ const addExistingBrandToGroup = defineRestOperation({
110
+ id: "add_existing_brand_to_group",
111
+ slug: "DOCUSIGN_ADD_EXISTING_BRAND_TO_GROUP",
112
+ name: "Add Existing Brand To Group",
113
+ description: "Associate an existing brand with a group.",
114
+ needsApproval: true,
115
+ method: "PUT",
116
+ path: (ctx) => `/groups/${ctx.encode(String(ctx.input.groupId))}/brands`,
117
+ input: groupId.extend({ brands: z.array(docusignLooseObjectSchema()).min(1) }),
118
+ output: docusignGenericObjectSchema,
119
+ body: (input) => ({ brands: input.brands })
120
+ });
121
+ const deleteBrandFromGroup = defineRestOperation({
122
+ id: "delete_brand_from_group",
123
+ slug: "DOCUSIGN_DELETE_BRAND_FROM_GROUP",
124
+ name: "Delete Brand From Group",
125
+ description: "Disassociate a brand from a group.",
126
+ needsApproval: true,
127
+ method: "DELETE",
128
+ path: (ctx) => `/groups/${ctx.encode(String(ctx.input.groupId))}/brands`,
129
+ input: groupBrand,
130
+ output: docusignSuccessSchema,
131
+ body: (input) => ({ brands: [{ brandId: input.brandId }] }),
132
+ transformResponse: () => ({ success: true })
133
+ });
134
+ const getBrandsInformationForGroup = defineRestOperation({
135
+ id: "get_brands_information_for_group",
136
+ slug: "DOCUSIGN_GET_BRANDS_INFORMATION_FOR_GROUP",
137
+ name: "Get Brands For Group",
138
+ description: "List brands associated with a group.",
139
+ method: "GET",
140
+ path: (ctx) => `/groups/${ctx.encode(String(ctx.input.groupId))}/brands`,
141
+ input: groupId,
142
+ output: docusignGenericObjectSchema
143
+ });
144
+
145
+ //#endregion
146
+ export { addExistingBrandToGroup, addUsersToExistingGroup, createGroupsForAccount, deleteBrandFromGroup, deleteUserGroup, deleteUsersFromGroup, getBrandsInformationForGroup, getGroupsInformationForAccount, getUsersInGroup, updateGroupInformation };
@@ -0,0 +1 @@
1
+ export { };
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,229 @@
1
+ import { defineOfficialIntegration } from "@keystrokehq/integration-authoring/official";
2
+ import { z } from "zod";
3
+ import { CredentialSet } from "@keystrokehq/core";
4
+ import { TokenExchangeError, normalizeOAuthTokens, parseOAuthTokenResponse } from "@keystrokehq/credential-connection";
5
+
6
+ //#region src/_official/provider-app.ts
7
+ /**
8
+ * Keystroke-owned OAuth client definition for the DocuSign public connection.
9
+ *
10
+ * Used for: OAuth authorization-code exchange, refresh, and the embedded
11
+ * `/oauth/userinfo` lookup that resolves an account's `baseUri`.
12
+ */
13
+ const docusignAppCredentialSet = new CredentialSet({
14
+ id: "docusign-app",
15
+ exposure: "platform-only",
16
+ name: "DocuSign App",
17
+ auth: z.object({
18
+ clientId: z.string().min(1),
19
+ clientSecret: z.string().min(1)
20
+ })
21
+ });
22
+ /**
23
+ * Keystroke-owned Connect webhook signing secrets.
24
+ *
25
+ * DocuSign Connect allows up to 10 concurrent HMAC shared secrets for rotation.
26
+ * Each outbound webhook is signed with every enabled secret as a separate
27
+ * `X-DocuSign-Signature-{N}` header. Verification accepts a delivery if any
28
+ * header matches any configured secret under a constant-time compare.
29
+ *
30
+ * Secrets are parsed from `KEYSTROKE_PLATFORM_DOCUSIGN_CONNECT_HMAC_SECRETS`,
31
+ * a comma-separated list with newest first.
32
+ */
33
+ const docusignConnectCredentialSet = new CredentialSet({
34
+ id: "docusign-connect",
35
+ exposure: "platform-only",
36
+ name: "DocuSign Connect",
37
+ auth: z.object({ hmacSecrets: z.array(z.string().min(1)).min(1) })
38
+ });
39
+ /**
40
+ * Keystroke-owned JWT Grant integrator key + RSA private key.
41
+ *
42
+ * Declared for forward compatibility: runtime paths that require JWT Grant
43
+ * (historical envelope replay, backend impersonation) will consume this
44
+ * credential set in a follow-up without a registry change. Not wired to any
45
+ * runtime path in v1 — any operation that would need JWT throws
46
+ * `DocusignApiError.notImplemented({ kind: 'plan_gated' })` until then.
47
+ */
48
+ const docusignJwtCredentialSet = new CredentialSet({
49
+ id: "docusign-jwt",
50
+ exposure: "platform-only",
51
+ name: "DocuSign JWT",
52
+ auth: z.object({
53
+ integratorKey: z.string().min(1),
54
+ impersonatedUserId: z.uuid(),
55
+ privateKeyPem: z.string().min(1),
56
+ oauthHost: z.enum(["account.docusign.com", "account-d.docusign.com"])
57
+ })
58
+ });
59
+ /**
60
+ * Parse the comma-separated `KEYSTROKE_PLATFORM_DOCUSIGN_CONNECT_HMAC_SECRETS`
61
+ * env value into the array shape the internal credential set expects. Empty
62
+ * input resolves to `[]`, which fails the `.min(1)` parse so Connect triggers
63
+ * reject deliveries until the env is populated.
64
+ */
65
+ function parseHmacSecrets(raw) {
66
+ if (!raw) return [];
67
+ return raw.split(",").map((secret) => secret.trim()).filter((secret) => secret.length > 0);
68
+ }
69
+ const docusignPlatformProviderSeed = {
70
+ provider: "docusign",
71
+ appRef: "docusign-platform",
72
+ displayName: "DocuSign Platform",
73
+ credentialSetName: "Keystroke DocuSign Platform App",
74
+ envShape: {
75
+ KEYSTROKE_PLATFORM_DOCUSIGN_CLIENT_ID: z.string().optional(),
76
+ KEYSTROKE_PLATFORM_DOCUSIGN_CLIENT_SECRET: z.string().optional()
77
+ },
78
+ requiredEnvKeys: ["KEYSTROKE_PLATFORM_DOCUSIGN_CLIENT_ID", "KEYSTROKE_PLATFORM_DOCUSIGN_CLIENT_SECRET"],
79
+ externalAppIdEnvKey: "KEYSTROKE_PLATFORM_DOCUSIGN_CLIENT_ID",
80
+ buildCredentials: (env) => ({
81
+ clientId: env.KEYSTROKE_PLATFORM_DOCUSIGN_CLIENT_ID,
82
+ clientSecret: env.KEYSTROKE_PLATFORM_DOCUSIGN_CLIENT_SECRET
83
+ })
84
+ };
85
+
86
+ //#endregion
87
+ //#region src/oauth-connection.ts
88
+ const DOCUSIGN_OAUTH_HOST = "account.docusign.com";
89
+ const DOCUSIGN_AUTH_URL = `https://${DOCUSIGN_OAUTH_HOST}/oauth/auth`;
90
+ const DOCUSIGN_TOKEN_URL = `https://${DOCUSIGN_OAUTH_HOST}/oauth/token`;
91
+ const DOCUSIGN_REVOKE_URL = `https://${DOCUSIGN_OAUTH_HOST}/oauth/revoke`;
92
+ const DOCUSIGN_USERINFO_URL = `https://${DOCUSIGN_OAUTH_HOST}/oauth/userinfo`;
93
+ const DOCUSIGN_OAUTH_SCOPES = ["signature", "extended"];
94
+ function basicAuthHeader(clientId, clientSecret) {
95
+ return `Basic ${Buffer.from(`${clientId}:${clientSecret}`, "utf8").toString("base64")}`;
96
+ }
97
+ async function postDocusignToken(body, authHeader) {
98
+ const response = await fetch(DOCUSIGN_TOKEN_URL, {
99
+ method: "POST",
100
+ headers: {
101
+ Accept: "application/json",
102
+ "Content-Type": "application/x-www-form-urlencoded",
103
+ Authorization: authHeader
104
+ },
105
+ body
106
+ });
107
+ if (!response.ok) throw new TokenExchangeError(response.status);
108
+ const raw = await parseOAuthTokenResponse(response);
109
+ const { accessToken, refreshToken, expiresIn } = normalizeOAuthTokens(raw);
110
+ if (!accessToken) throw new Error("No access token in DocuSign response");
111
+ return {
112
+ accessToken,
113
+ refreshToken,
114
+ expiresIn,
115
+ raw
116
+ };
117
+ }
118
+ async function fetchDocusignUserinfo(accessToken) {
119
+ const response = await fetch(DOCUSIGN_USERINFO_URL, { headers: {
120
+ Accept: "application/json",
121
+ Authorization: `Bearer ${accessToken}`
122
+ } });
123
+ if (!response.ok) throw new Error(`DocuSign userinfo lookup failed with status ${response.status} while resolving base URI.`);
124
+ return await response.json();
125
+ }
126
+ function pickDefaultAccount(userinfo) {
127
+ const accounts = userinfo.accounts ?? [];
128
+ if (accounts.length === 0) return void 0;
129
+ const explicitDefault = accounts.find((account) => account.is_default === true && typeof account.account_id === "string" && typeof account.base_uri === "string");
130
+ if (explicitDefault) return {
131
+ accountId: explicitDefault.account_id,
132
+ baseUri: explicitDefault.base_uri
133
+ };
134
+ const firstWithBoth = accounts.find((account) => typeof account.account_id === "string" && typeof account.base_uri === "string");
135
+ if (firstWithBoth) return {
136
+ accountId: firstWithBoth.account_id,
137
+ baseUri: firstWithBoth.base_uri
138
+ };
139
+ }
140
+ const docusignOAuthConnection = {
141
+ kind: "oauth",
142
+ tokenType: "refreshable",
143
+ authUrl: DOCUSIGN_AUTH_URL,
144
+ tokenUrl: DOCUSIGN_TOKEN_URL,
145
+ revokeUrl: DOCUSIGN_REVOKE_URL,
146
+ scopes: [...DOCUSIGN_OAUTH_SCOPES],
147
+ oauth: { id: "official.docusign.oauth" },
148
+ vault: {
149
+ accessTokenKey: "DOCUSIGN_ACCESS_TOKEN",
150
+ build: (tokenResult) => {
151
+ const accountId = typeof tokenResult.raw._docusignAccountId === "string" ? tokenResult.raw._docusignAccountId : void 0;
152
+ const baseUri = typeof tokenResult.raw._docusignBaseUri === "string" ? tokenResult.raw._docusignBaseUri : void 0;
153
+ return {
154
+ DOCUSIGN_ACCESS_TOKEN: tokenResult.accessToken,
155
+ ...accountId ? { DOCUSIGN_ACCOUNT_ID: accountId } : {},
156
+ ...baseUri ? { DOCUSIGN_BASE_URI: baseUri } : {}
157
+ };
158
+ }
159
+ },
160
+ async exchangeCode({ oauthClient, code, redirectUri }) {
161
+ if (!code) throw new Error("Missing authorization code");
162
+ const tokenResult = await postDocusignToken(new URLSearchParams({
163
+ grant_type: "authorization_code",
164
+ code,
165
+ redirect_uri: redirectUri
166
+ }), basicAuthHeader(oauthClient.clientId, oauthClient.clientSecret));
167
+ const userinfo = await fetchDocusignUserinfo(tokenResult.accessToken);
168
+ const account = pickDefaultAccount(userinfo);
169
+ if (!account) throw new Error("DocuSign userinfo response did not include a resolvable account.");
170
+ tokenResult.raw._docusignAccountId = account.accountId;
171
+ tokenResult.raw._docusignBaseUri = account.baseUri;
172
+ tokenResult.raw._docusignUserinfo = userinfo;
173
+ return tokenResult;
174
+ },
175
+ async refreshToken({ oauthClient, refreshToken }) {
176
+ const tokenResult = await postDocusignToken(new URLSearchParams({
177
+ grant_type: "refresh_token",
178
+ refresh_token: refreshToken
179
+ }), basicAuthHeader(oauthClient.clientId, oauthClient.clientSecret));
180
+ const userinfo = await fetchDocusignUserinfo(tokenResult.accessToken);
181
+ const account = pickDefaultAccount(userinfo);
182
+ if (!account) throw new Error("DocuSign userinfo response did not include a resolvable account during refresh.");
183
+ tokenResult.raw._docusignAccountId = account.accountId;
184
+ tokenResult.raw._docusignBaseUri = account.baseUri;
185
+ tokenResult.raw._docusignUserinfo = userinfo;
186
+ return tokenResult;
187
+ },
188
+ extractInstallationInfo({ tokenResult }) {
189
+ const accountId = typeof tokenResult.raw._docusignAccountId === "string" ? tokenResult.raw._docusignAccountId : void 0;
190
+ const baseUri = typeof tokenResult.raw._docusignBaseUri === "string" ? tokenResult.raw._docusignBaseUri : void 0;
191
+ return {
192
+ externalInstallationId: accountId,
193
+ externalWorkspaceId: accountId,
194
+ metadata: accountId && baseUri ? {
195
+ accountId,
196
+ baseUri
197
+ } : void 0
198
+ };
199
+ }
200
+ };
201
+
202
+ //#endregion
203
+ //#region src/integration.ts
204
+ const docusignAuthSchema = z.object({
205
+ DOCUSIGN_ACCESS_TOKEN: z.string().min(1),
206
+ DOCUSIGN_ACCOUNT_ID: z.string().min(1),
207
+ DOCUSIGN_BASE_URI: z.url()
208
+ });
209
+ const docusignOfficialIntegration = {
210
+ id: "docusign",
211
+ name: "DocuSign",
212
+ description: "DocuSign eSignature, templates, bulk-send, Connect webhooks, and account/admin surfaces for Keystroke workflows",
213
+ auth: docusignAuthSchema,
214
+ connections: [{
215
+ id: "oauth",
216
+ ...docusignOAuthConnection
217
+ }]
218
+ };
219
+ const docusignBundle = defineOfficialIntegration({
220
+ ...docusignOfficialIntegration,
221
+ internal: {
222
+ providerApp: docusignAppCredentialSet,
223
+ other: [docusignConnectCredentialSet, docusignJwtCredentialSet]
224
+ }
225
+ });
226
+ const docusign = docusignBundle.credentialSet;
227
+
228
+ //#endregion
229
+ export { fetchDocusignUserinfo as a, docusignJwtCredentialSet as c, DOCUSIGN_USERINFO_URL as i, docusignPlatformProviderSeed as l, docusignBundle as n, docusignAppCredentialSet as o, docusignOfficialIntegration as r, docusignConnectCredentialSet as s, docusign as t, parseHmacSecrets as u };
@@ -0,0 +1,73 @@
1
+ import * as _keystrokehq_integration_authoring_official0 from "@keystrokehq/integration-authoring/official";
2
+ import { z } from "zod";
3
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
+ import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
5
+ import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
6
+
7
+ //#region src/integration.d.ts
8
+ declare const docusignOfficialIntegration: {
9
+ id: "docusign";
10
+ name: string;
11
+ description: string;
12
+ auth: z.ZodObject<{
13
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
14
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
15
+ DOCUSIGN_BASE_URI: z.ZodURL;
16
+ }, z.core.$strip>;
17
+ connections: {
18
+ kind: "oauth";
19
+ tokenType: "refreshable";
20
+ authUrl: "https://account.docusign.com/oauth/auth";
21
+ tokenUrl: "https://account.docusign.com/oauth/token";
22
+ revokeUrl: "https://account.docusign.com/oauth/revoke";
23
+ scopes: readonly ["signature", "extended"];
24
+ oauth: {
25
+ readonly id: "official.docusign.oauth";
26
+ };
27
+ vault: {
28
+ readonly accessTokenKey: "DOCUSIGN_ACCESS_TOKEN";
29
+ readonly build: (tokenResult: _keystrokehq_core_credential_set0.TokenResult) => {
30
+ DOCUSIGN_BASE_URI?: string | undefined;
31
+ DOCUSIGN_ACCOUNT_ID?: string | undefined;
32
+ DOCUSIGN_ACCESS_TOKEN: string;
33
+ };
34
+ };
35
+ exchangeCode: ({
36
+ oauthClient,
37
+ code,
38
+ redirectUri
39
+ }: _keystrokehq_core_credential_set0.ExchangeCodeContext) => Promise<_keystrokehq_core_credential_set0.TokenResult>;
40
+ refreshToken: ({
41
+ oauthClient,
42
+ refreshToken
43
+ }: _keystrokehq_core_credential_set0.RefreshTokenContext) => Promise<_keystrokehq_core_credential_set0.TokenResult>;
44
+ extractInstallationInfo: ({
45
+ tokenResult
46
+ }: _keystrokehq_core_credential_set0.ExtractInstallationContext) => {
47
+ externalInstallationId: string | undefined;
48
+ externalWorkspaceId: string | undefined;
49
+ metadata: {
50
+ accountId: string;
51
+ baseUri: string;
52
+ } | undefined;
53
+ };
54
+ id: string;
55
+ }[];
56
+ };
57
+ declare const docusignBundle: _keystrokehq_integration_authoring_official0.OfficialIntegrationBundle<"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>>;
62
+ declare const docusign: _keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
63
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
64
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
65
+ DOCUSIGN_BASE_URI: z.ZodURL;
66
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
67
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
68
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
69
+ DOCUSIGN_BASE_URI: z.ZodURL;
70
+ }, z.core.$strip>>[] | undefined>;
71
+ type DocusignCredentials = InferCredentialSetAuth<typeof docusign>;
72
+ //#endregion
73
+ export { docusignOfficialIntegration as i, docusign as n, docusignBundle as r, DocusignCredentials as t };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,18 @@
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/monitor.d.ts
6
+ declare const monitorNotImplemented: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, z.ZodObject<{
7
+ [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
8
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
9
+ DOCUSIGN_ACCESS_TOKEN: z.ZodString;
10
+ DOCUSIGN_ACCOUNT_ID: z.ZodString;
11
+ DOCUSIGN_BASE_URI: z.ZodURL;
12
+ }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<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>], undefined>;
17
+ //#endregion
18
+ export { monitorNotImplemented };