@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.
- package/README.md +248 -0
- package/dist/_official/index.d.mts +3 -0
- package/dist/_official/index.mjs +3 -0
- package/dist/_runtime/index.d.mts +1 -0
- package/dist/_runtime/index.mjs +1 -0
- package/dist/account-custom-fields.d.mts +65 -0
- package/dist/account-custom-fields.mjs +63 -0
- package/dist/account-stamps.d.mts +164 -0
- package/dist/account-stamps.mjs +144 -0
- package/dist/account-tabs.d.mts +90 -0
- package/dist/account-tabs.mjs +80 -0
- package/dist/account.d.mts +233 -0
- package/dist/account.mjs +207 -0
- package/dist/admin.d.mts +18 -0
- package/dist/admin.mjs +20 -0
- package/dist/auth.d.mts +37 -0
- package/dist/auth.mjs +53 -0
- package/dist/bcc-archive.d.mts +64 -0
- package/dist/bcc-archive.mjs +70 -0
- package/dist/billing.d.mts +217 -0
- package/dist/billing.mjs +208 -0
- package/dist/brands.d.mts +192 -0
- package/dist/brands.mjs +157 -0
- package/dist/bulk-send.d.mts +137 -0
- package/dist/bulk-send.mjs +115 -0
- package/dist/chunked-uploads.d.mts +78 -0
- package/dist/chunked-uploads.mjs +74 -0
- package/dist/click.d.mts +18 -0
- package/dist/click.mjs +20 -0
- package/dist/client.d.mts +47 -0
- package/dist/client.mjs +286 -0
- package/dist/clm.d.mts +18 -0
- package/dist/clm.mjs +20 -0
- package/dist/cloud-storage.d.mts +122 -0
- package/dist/cloud-storage.mjs +115 -0
- package/dist/connect.d.mts +252 -0
- package/dist/connect.mjs +217 -0
- package/dist/connection.d.mts +2 -0
- package/dist/connection.mjs +3 -0
- package/dist/contacts.d.mts +80 -0
- package/dist/contacts.mjs +79 -0
- package/dist/enote.d.mts +44 -0
- package/dist/enote.mjs +45 -0
- package/dist/envelope-attachments.d.mts +86 -0
- package/dist/envelope-attachments.mjs +76 -0
- package/dist/envelope-custom-fields.d.mts +166 -0
- package/dist/envelope-custom-fields.mjs +92 -0
- package/dist/envelope-documents.d.mts +271 -0
- package/dist/envelope-documents.mjs +219 -0
- package/dist/envelope-email.d.mts +65 -0
- package/dist/envelope-email.mjs +60 -0
- package/dist/envelope-lock.d.mts +65 -0
- package/dist/envelope-lock.mjs +60 -0
- package/dist/envelope-logs.d.mts +126 -0
- package/dist/envelope-logs.mjs +126 -0
- package/dist/envelope-notifications.d.mts +47 -0
- package/dist/envelope-notifications.mjs +44 -0
- package/dist/envelope-recipients.d.mts +171 -0
- package/dist/envelope-recipients.mjs +136 -0
- package/dist/envelope-tabs.d.mts +52 -0
- package/dist/envelope-tabs.mjs +49 -0
- package/dist/envelope-views.d.mts +99 -0
- package/dist/envelope-views.mjs +88 -0
- package/dist/envelope-workflow.d.mts +208 -0
- package/dist/envelope-workflow.mjs +176 -0
- package/dist/envelopes.d.mts +430 -0
- package/dist/envelopes.mjs +190 -0
- package/dist/errors.d.mts +48 -0
- package/dist/errors.mjs +76 -0
- package/dist/events.d.mts +192 -0
- package/dist/events.mjs +146 -0
- package/dist/factory-wViQTjgN.mjs +8 -0
- package/dist/groups.d.mts +191 -0
- package/dist/groups.mjs +146 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -0
- package/dist/integration-CmRztL9R.mjs +229 -0
- package/dist/integration-DqwHRkRh.d.mts +73 -0
- package/dist/messaging.d.mts +1 -0
- package/dist/messaging.mjs +1 -0
- package/dist/monitor.d.mts +18 -0
- package/dist/monitor.mjs +20 -0
- package/dist/notary.d.mts +129 -0
- package/dist/notary.mjs +122 -0
- package/dist/operation-helpers-BMTArRh9.mjs +102 -0
- package/dist/permission-profiles.d.mts +78 -0
- package/dist/permission-profiles.mjs +70 -0
- package/dist/power-forms.d.mts +51 -0
- package/dist/power-forms.mjs +62 -0
- package/dist/provider-app-CWp1SuI4.d.mts +88 -0
- package/dist/rooms.d.mts +18 -0
- package/dist/rooms.mjs +28 -0
- package/dist/schemas/index.d.mts +581 -0
- package/dist/schemas/index.mjs +309 -0
- package/dist/shared-DTUCJayR.mjs +27 -0
- package/dist/signing-groups.d.mts +139 -0
- package/dist/signing-groups.mjs +117 -0
- package/dist/template-custom-fields.d.mts +199 -0
- package/dist/template-custom-fields.mjs +107 -0
- package/dist/template-documents.d.mts +132 -0
- package/dist/template-documents.mjs +109 -0
- package/dist/template-lock.d.mts +65 -0
- package/dist/template-lock.mjs +60 -0
- package/dist/template-sharing.d.mts +129 -0
- package/dist/template-sharing.mjs +108 -0
- package/dist/template-workflow.d.mts +184 -0
- package/dist/template-workflow.mjs +152 -0
- package/dist/templates.d.mts +158 -0
- package/dist/templates.mjs +110 -0
- package/dist/triggers.d.mts +43 -0
- package/dist/triggers.mjs +91 -0
- package/dist/user-authorizations.d.mts +129 -0
- package/dist/user-authorizations.mjs +133 -0
- package/dist/user-custom-settings.d.mts +81 -0
- package/dist/user-custom-settings.mjs +69 -0
- package/dist/user-profile.d.mts +109 -0
- package/dist/user-profile.mjs +106 -0
- package/dist/user-signatures.d.mts +208 -0
- package/dist/user-signatures.mjs +180 -0
- package/dist/users.d.mts +128 -0
- package/dist/users.mjs +98 -0
- package/dist/verification.d.mts +19 -0
- package/dist/verification.mjs +59 -0
- package/dist/workspaces.d.mts +173 -0
- package/dist/workspaces.mjs +143 -0
- package/package.json +291 -0
package/dist/account.mjs
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { docusignAccountSchema, 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/account.ts
|
|
6
|
+
/**
|
|
7
|
+
* Account core (settings, password rules, seal, envelope purge, admin misc).
|
|
8
|
+
* Covers PLAN.md § 6.31.
|
|
9
|
+
*/
|
|
10
|
+
const retrieveAccountInformationForSpecifiedAccount = defineRestOperation({
|
|
11
|
+
id: "retrieve_account_information_for_specified_account",
|
|
12
|
+
slug: "DOCUSIGN_RETRIEVE_ACCOUNT_INFORMATION_FOR_SPECIFIED_ACCOUNT",
|
|
13
|
+
name: "Retrieve Account Information",
|
|
14
|
+
description: "Retrieve information about the connected DocuSign account.",
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: "",
|
|
17
|
+
input: z.object({ includeAccountSettings: z.boolean().optional() }),
|
|
18
|
+
output: docusignAccountSchema,
|
|
19
|
+
query: (input) => ({ include_account_settings: input.includeAccountSettings })
|
|
20
|
+
});
|
|
21
|
+
const deleteSpecifiedAccount = defineRestOperation({
|
|
22
|
+
id: "delete_specified_account",
|
|
23
|
+
slug: "DOCUSIGN_DELETE_SPECIFIED_ACCOUNT",
|
|
24
|
+
name: "Delete Account",
|
|
25
|
+
description: "Close the connected DocuSign account (admin only).",
|
|
26
|
+
needsApproval: true,
|
|
27
|
+
method: "DELETE",
|
|
28
|
+
path: "",
|
|
29
|
+
input: z.object({ redactUserData: z.boolean().optional() }),
|
|
30
|
+
output: docusignSuccessSchema,
|
|
31
|
+
query: (input) => ({ redact_user_data: input.redactUserData }),
|
|
32
|
+
transformResponse: () => ({ success: true })
|
|
33
|
+
});
|
|
34
|
+
const retrieveAccountSettingsInformation = defineRestOperation({
|
|
35
|
+
id: "retrieve_account_settings_information",
|
|
36
|
+
slug: "DOCUSIGN_RETRIEVE_ACCOUNT_SETTINGS_INFORMATION",
|
|
37
|
+
name: "Retrieve Account Settings",
|
|
38
|
+
description: "Retrieve account settings.",
|
|
39
|
+
method: "GET",
|
|
40
|
+
path: "/settings",
|
|
41
|
+
input: z.object({}),
|
|
42
|
+
output: docusignGenericObjectSchema
|
|
43
|
+
});
|
|
44
|
+
const updateAccountSettings = defineRestOperation({
|
|
45
|
+
id: "update_account_settings",
|
|
46
|
+
slug: "DOCUSIGN_UPDATE_ACCOUNT_SETTINGS",
|
|
47
|
+
name: "Update Account Settings",
|
|
48
|
+
description: "Update account settings.",
|
|
49
|
+
needsApproval: true,
|
|
50
|
+
method: "PUT",
|
|
51
|
+
path: "/settings",
|
|
52
|
+
input: z.object({ accountSettings: docusignLooseObjectSchema() }),
|
|
53
|
+
output: docusignGenericObjectSchema,
|
|
54
|
+
body: (input) => input.accountSettings
|
|
55
|
+
});
|
|
56
|
+
const getAccountPasswordRules = defineRestOperation({
|
|
57
|
+
id: "get_account_password_rules",
|
|
58
|
+
slug: "DOCUSIGN_GET_ACCOUNT_PASSWORD_RULES",
|
|
59
|
+
name: "Get Account Password Rules",
|
|
60
|
+
description: "Retrieve password rules on the account.",
|
|
61
|
+
method: "GET",
|
|
62
|
+
path: "/settings/password_rules",
|
|
63
|
+
input: z.object({}),
|
|
64
|
+
output: docusignGenericObjectSchema
|
|
65
|
+
});
|
|
66
|
+
const retrieveAccountPasswordRules = defineRestOperation({
|
|
67
|
+
id: "retrieve_account_password_rules",
|
|
68
|
+
slug: "DOCUSIGN_RETRIEVE_ACCOUNT_PASSWORD_RULES",
|
|
69
|
+
name: "Retrieve Account Password Rules",
|
|
70
|
+
description: "Alias: retrieve password rules on the account.",
|
|
71
|
+
method: "GET",
|
|
72
|
+
path: "/settings/password_rules",
|
|
73
|
+
input: z.object({}),
|
|
74
|
+
output: docusignGenericObjectSchema
|
|
75
|
+
});
|
|
76
|
+
const updateAccountPasswordRules = defineRestOperation({
|
|
77
|
+
id: "update_account_password_rules",
|
|
78
|
+
slug: "DOCUSIGN_UPDATE_ACCOUNT_PASSWORD_RULES",
|
|
79
|
+
name: "Update Account Password Rules",
|
|
80
|
+
description: "Update password rules on the account.",
|
|
81
|
+
needsApproval: true,
|
|
82
|
+
method: "PUT",
|
|
83
|
+
path: "/settings/password_rules",
|
|
84
|
+
input: z.object({ passwordRules: docusignLooseObjectSchema() }),
|
|
85
|
+
output: docusignGenericObjectSchema,
|
|
86
|
+
body: (input) => input.passwordRules
|
|
87
|
+
});
|
|
88
|
+
const retrieveAccountProvisioningInfo = defineRestOperation({
|
|
89
|
+
id: "retrieve_account_provisioning_info",
|
|
90
|
+
slug: "DOCUSIGN_RETRIEVE_ACCOUNT_PROVISIONING_INFO",
|
|
91
|
+
name: "Retrieve Account Provisioning Info",
|
|
92
|
+
description: "Retrieve provisioning info for the account.",
|
|
93
|
+
method: "GET",
|
|
94
|
+
path: "/provisioning",
|
|
95
|
+
input: z.object({}),
|
|
96
|
+
output: docusignGenericObjectSchema,
|
|
97
|
+
accountScoped: false
|
|
98
|
+
});
|
|
99
|
+
const retrieveAccountSealProviders = defineRestOperation({
|
|
100
|
+
id: "retrieve_account_seal_providers",
|
|
101
|
+
slug: "DOCUSIGN_RETRIEVE_ACCOUNT_SEAL_PROVIDERS",
|
|
102
|
+
name: "Retrieve Account Seal Providers",
|
|
103
|
+
description: "Retrieve seal providers configured on the account.",
|
|
104
|
+
method: "GET",
|
|
105
|
+
path: "/seals",
|
|
106
|
+
input: z.object({}),
|
|
107
|
+
output: docusignGenericObjectSchema
|
|
108
|
+
});
|
|
109
|
+
const retrieveAccountEnvelopePurgeConfig = defineRestOperation({
|
|
110
|
+
id: "retrieve_account_envelope_purge_config",
|
|
111
|
+
slug: "DOCUSIGN_RETRIEVE_ACCOUNT_ENVELOPE_PURGE_CONFIG",
|
|
112
|
+
name: "Retrieve Envelope Purge Config",
|
|
113
|
+
description: "Retrieve the envelope-purge configuration.",
|
|
114
|
+
method: "GET",
|
|
115
|
+
path: "/settings/envelope_purge_configuration",
|
|
116
|
+
input: z.object({}),
|
|
117
|
+
output: docusignGenericObjectSchema
|
|
118
|
+
});
|
|
119
|
+
const setEnvelopePurgeConfigForAccount = defineRestOperation({
|
|
120
|
+
id: "set_envelope_purge_config_for_account",
|
|
121
|
+
slug: "DOCUSIGN_SET_ENVELOPE_PURGE_CONFIG_FOR_ACCOUNT",
|
|
122
|
+
name: "Set Envelope Purge Config",
|
|
123
|
+
description: "Update the envelope-purge configuration.",
|
|
124
|
+
needsApproval: true,
|
|
125
|
+
method: "PUT",
|
|
126
|
+
path: "/settings/envelope_purge_configuration",
|
|
127
|
+
input: z.object({ config: docusignLooseObjectSchema() }),
|
|
128
|
+
output: docusignGenericObjectSchema,
|
|
129
|
+
body: (input) => input.config
|
|
130
|
+
});
|
|
131
|
+
const retrieveAccountVerificationWorkflows = defineRestOperation({
|
|
132
|
+
id: "retrieve_account_verification_workflows",
|
|
133
|
+
slug: "DOCUSIGN_RETRIEVE_ACCOUNT_VERIFICATION_WORKFLOWS",
|
|
134
|
+
name: "Retrieve Account Verification Workflows",
|
|
135
|
+
description: "Retrieve verification workflows (identity) on the account.",
|
|
136
|
+
method: "GET",
|
|
137
|
+
path: "/identity_verification",
|
|
138
|
+
input: z.object({}),
|
|
139
|
+
output: docusignGenericObjectSchema
|
|
140
|
+
});
|
|
141
|
+
const listSignatureProvidersForAccount = defineRestOperation({
|
|
142
|
+
id: "list_signature_providers_for_account",
|
|
143
|
+
slug: "DOCUSIGN_LIST_SIGNATURE_PROVIDERS_FOR_ACCOUNT",
|
|
144
|
+
name: "List Signature Providers",
|
|
145
|
+
description: "List signature providers available to the account.",
|
|
146
|
+
method: "GET",
|
|
147
|
+
path: "/signatureProviders",
|
|
148
|
+
input: z.object({}),
|
|
149
|
+
output: docusignGenericObjectSchema
|
|
150
|
+
});
|
|
151
|
+
const getSupportedLanguagesForRecipients = defineRestOperation({
|
|
152
|
+
id: "get_supported_languages_for_recipients",
|
|
153
|
+
slug: "DOCUSIGN_GET_SUPPORTED_LANGUAGES_FOR_RECIPIENTS",
|
|
154
|
+
name: "Get Supported Languages",
|
|
155
|
+
description: "Return the list of supported recipient languages.",
|
|
156
|
+
method: "GET",
|
|
157
|
+
path: "/supported_languages",
|
|
158
|
+
input: z.object({}),
|
|
159
|
+
output: docusignGenericObjectSchema
|
|
160
|
+
});
|
|
161
|
+
const getUnsupportedFileTypesList = defineRestOperation({
|
|
162
|
+
id: "get_unsupported_file_types_list",
|
|
163
|
+
slug: "DOCUSIGN_GET_UNSUPPORTED_FILE_TYPES_LIST",
|
|
164
|
+
name: "Get Unsupported File Types",
|
|
165
|
+
description: "Return the list of unsupported file types for envelope documents.",
|
|
166
|
+
method: "GET",
|
|
167
|
+
path: "/unsupported_file_types",
|
|
168
|
+
input: z.object({}),
|
|
169
|
+
output: docusignGenericObjectSchema
|
|
170
|
+
});
|
|
171
|
+
const modifyAccountNotificationSettings = defineRestOperation({
|
|
172
|
+
id: "modify_account_notification_settings",
|
|
173
|
+
slug: "DOCUSIGN_MODIFY_ACCOUNT_NOTIFICATION_SETTINGS",
|
|
174
|
+
name: "Modify Account Notification Settings",
|
|
175
|
+
description: "Modify account-level notification defaults.",
|
|
176
|
+
needsApproval: true,
|
|
177
|
+
method: "PUT",
|
|
178
|
+
path: "/settings/notification_defaults",
|
|
179
|
+
input: z.object({ notifications: docusignLooseObjectSchema() }),
|
|
180
|
+
output: docusignGenericObjectSchema,
|
|
181
|
+
body: (input) => input.notifications
|
|
182
|
+
});
|
|
183
|
+
const listResourcesForRestVersionSpecified = defineRestOperation({
|
|
184
|
+
id: "list_resources_for_rest_version_specified",
|
|
185
|
+
slug: "DOCUSIGN_LIST_RESOURCES_FOR_RESTVERSION_SPECIFIED",
|
|
186
|
+
name: "List REST Resources",
|
|
187
|
+
description: "List resources available for a REST version.",
|
|
188
|
+
method: "GET",
|
|
189
|
+
path: "",
|
|
190
|
+
input: z.object({ version: z.string().optional() }),
|
|
191
|
+
output: docusignGenericObjectSchema,
|
|
192
|
+
accountScoped: false
|
|
193
|
+
});
|
|
194
|
+
const retrieveRestApiVersions = defineRestOperation({
|
|
195
|
+
id: "retrieve_rest_api_versions",
|
|
196
|
+
slug: "DOCUSIGN_RETRIEVE_REST_API_VERSIONS",
|
|
197
|
+
name: "Retrieve REST API Versions",
|
|
198
|
+
description: "List available REST API versions.",
|
|
199
|
+
method: "GET",
|
|
200
|
+
path: "/service_information",
|
|
201
|
+
input: z.object({}),
|
|
202
|
+
output: docusignGenericObjectSchema,
|
|
203
|
+
accountScoped: false
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
//#endregion
|
|
207
|
+
export { deleteSpecifiedAccount, getAccountPasswordRules, getSupportedLanguagesForRecipients, getUnsupportedFileTypesList, listResourcesForRestVersionSpecified, listSignatureProvidersForAccount, modifyAccountNotificationSettings, retrieveAccountEnvelopePurgeConfig, retrieveAccountInformationForSpecifiedAccount, retrieveAccountPasswordRules, retrieveAccountProvisioningInfo, retrieveAccountSealProviders, retrieveAccountSettingsInformation, retrieveAccountVerificationWorkflows, retrieveRestApiVersions, setEnvelopePurgeConfigForAccount, updateAccountPasswordRules, updateAccountSettings };
|
package/dist/admin.d.mts
ADDED
|
@@ -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/admin.d.ts
|
|
6
|
+
declare const adminNotImplemented: _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 { adminNotImplemented };
|
package/dist/admin.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { docusignGenericObjectSchema } from "./schemas/index.mjs";
|
|
2
|
+
import { n as definePlanGatedOperation } from "./operation-helpers-BMTArRh9.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/admin.ts
|
|
6
|
+
/**
|
|
7
|
+
* DocuSign Admin API — plan-gated in v1.
|
|
8
|
+
*/
|
|
9
|
+
const adminNotImplemented = definePlanGatedOperation({
|
|
10
|
+
id: "admin_not_implemented",
|
|
11
|
+
slug: "DOCUSIGN_ADMIN_NOT_IMPLEMENTED",
|
|
12
|
+
name: "DocuSign Admin (not implemented)",
|
|
13
|
+
description: "Placeholder for DocuSign Admin API (cross-account SSO, domains, permissions).",
|
|
14
|
+
input: z.object({}).catchall(z.unknown()),
|
|
15
|
+
output: docusignGenericObjectSchema,
|
|
16
|
+
reason: "DocuSign Admin API requires `organization_read`, `permission_read`, etc. scopes that are not enabled on this connection."
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { adminNotImplemented };
|
package/dist/auth.d.mts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
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/auth.d.ts
|
|
6
|
+
declare const retrieveDocusignUserinfo: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
7
|
+
sub: z.ZodOptional<z.ZodString>;
|
|
8
|
+
email: z.ZodOptional<z.ZodString>;
|
|
9
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
10
|
+
account_id: z.ZodOptional<z.ZodString>;
|
|
11
|
+
account_name: z.ZodOptional<z.ZodString>;
|
|
12
|
+
base_uri: z.ZodOptional<z.ZodString>;
|
|
13
|
+
is_default: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
15
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
16
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
17
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
18
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
19
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
20
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
21
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
22
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
23
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
24
|
+
declare const resolveCurrentAccount: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
accountId: z.ZodString;
|
|
26
|
+
baseUri: z.ZodString;
|
|
27
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
28
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
29
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
30
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
31
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
32
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
33
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
34
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
35
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { resolveCurrentAccount, retrieveDocusignUserinfo };
|
package/dist/auth.mjs
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { a as fetchDocusignUserinfo, i as DOCUSIGN_USERINFO_URL } from "./integration-CmRztL9R.mjs";
|
|
2
|
+
import { createDocusignClient } from "./client.mjs";
|
|
3
|
+
import { docusignLooseObjectSchema } from "./schemas/index.mjs";
|
|
4
|
+
import { t as docusignOperation } from "./factory-wViQTjgN.mjs";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
//#region src/auth.ts
|
|
8
|
+
/**
|
|
9
|
+
* Auth helpers — exposed as operations so users can call DocuSign userinfo /
|
|
10
|
+
* account resolution directly from the workflow surface if needed.
|
|
11
|
+
*
|
|
12
|
+
* These back the `auth` subpath and exist in addition to the OAuth hooks that
|
|
13
|
+
* fire automatically during connect/refresh (see `./oauth-connection.ts`).
|
|
14
|
+
*/
|
|
15
|
+
const retrieveDocusignUserinfo = docusignOperation({
|
|
16
|
+
id: "retrieve_docusign_userinfo",
|
|
17
|
+
name: "Retrieve DocuSign Userinfo",
|
|
18
|
+
description: `Call ${DOCUSIGN_USERINFO_URL} with the stored access token to re-resolve the connected user's accounts, names, and base URIs.`,
|
|
19
|
+
input: z.object({}),
|
|
20
|
+
output: docusignLooseObjectSchema({
|
|
21
|
+
sub: z.string().optional(),
|
|
22
|
+
email: z.string().optional(),
|
|
23
|
+
accounts: z.array(docusignLooseObjectSchema({
|
|
24
|
+
account_id: z.string().optional(),
|
|
25
|
+
account_name: z.string().optional(),
|
|
26
|
+
base_uri: z.string().optional(),
|
|
27
|
+
is_default: z.boolean().optional()
|
|
28
|
+
})).optional()
|
|
29
|
+
}),
|
|
30
|
+
run: async (_input, credentials) => {
|
|
31
|
+
return { ...await fetchDocusignUserinfo(credentials.DOCUSIGN_ACCESS_TOKEN) };
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const resolveCurrentAccount = docusignOperation({
|
|
35
|
+
id: "resolve_current_account",
|
|
36
|
+
name: "Resolve Current Account",
|
|
37
|
+
description: "Return the active `accountId` + `baseUri` pair stored on the connection. Useful for downstream operations that need to construct account-scoped URLs themselves.",
|
|
38
|
+
input: z.object({}),
|
|
39
|
+
output: docusignLooseObjectSchema({
|
|
40
|
+
accountId: z.string(),
|
|
41
|
+
baseUri: z.string()
|
|
42
|
+
}),
|
|
43
|
+
run: async (_input, credentials) => {
|
|
44
|
+
const client = createDocusignClient(credentials);
|
|
45
|
+
return {
|
|
46
|
+
accountId: client.accountId,
|
|
47
|
+
baseUri: client.baseUri
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { resolveCurrentAccount, retrieveDocusignUserinfo };
|
|
@@ -0,0 +1,64 @@
|
|
|
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/bcc-archive.d.ts
|
|
6
|
+
declare const createBccEmailArchiveConfiguration: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
bccEmailArchive: 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 getBccEmailArchiveConfigurations: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
22
|
+
startPosition: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
26
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
27
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
28
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
29
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
30
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<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>], undefined>;
|
|
35
|
+
declare const getBccEmailArchiveHistory: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
36
|
+
bccEmailArchiveId: z.ZodString;
|
|
37
|
+
startPosition: z.ZodOptional<z.ZodNumber>;
|
|
38
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
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<"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>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
46
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
47
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
48
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
49
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
50
|
+
declare const deleteBccEmailArchiveConfiguration: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
51
|
+
bccEmailArchiveId: z.ZodString;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
success: z.ZodBoolean;
|
|
54
|
+
}, z.core.$strip>, 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
|
+
//#endregion
|
|
64
|
+
export { createBccEmailArchiveConfiguration, deleteBccEmailArchiveConfiguration, getBccEmailArchiveConfigurations, getBccEmailArchiveHistory };
|
|
@@ -0,0 +1,70 @@
|
|
|
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/bcc-archive.ts
|
|
6
|
+
/**
|
|
7
|
+
* BCC email archive. Covers PLAN.md § 6.40.
|
|
8
|
+
*/
|
|
9
|
+
const bccId = z.object({ bccEmailArchiveId: z.string().min(1) });
|
|
10
|
+
const createBccEmailArchiveConfiguration = defineRestOperation({
|
|
11
|
+
id: "create_bcc_email_archive_configuration",
|
|
12
|
+
slug: "DOCUSIGN_CREATE_BCC_EMAIL_ARCHIVE_CONFIGURATION",
|
|
13
|
+
name: "Create BCC Email Archive Configuration",
|
|
14
|
+
description: "Configure a BCC email archive address for the account.",
|
|
15
|
+
needsApproval: true,
|
|
16
|
+
method: "POST",
|
|
17
|
+
path: "/settings/bcc_email_archives",
|
|
18
|
+
input: z.object({ bccEmailArchive: docusignLooseObjectSchema() }),
|
|
19
|
+
output: docusignGenericObjectSchema,
|
|
20
|
+
body: (input) => input.bccEmailArchive
|
|
21
|
+
});
|
|
22
|
+
const getBccEmailArchiveConfigurations = defineRestOperation({
|
|
23
|
+
id: "get_bcc_email_archive_configurations",
|
|
24
|
+
slug: "DOCUSIGN_GET_BCC_EMAIL_ARCHIVE_CONFIGURATIONS",
|
|
25
|
+
name: "Get BCC Email Archive Configurations",
|
|
26
|
+
description: "List BCC email archive configurations.",
|
|
27
|
+
method: "GET",
|
|
28
|
+
path: "/settings/bcc_email_archives",
|
|
29
|
+
input: z.object({
|
|
30
|
+
startPosition: z.number().int().nonnegative().optional(),
|
|
31
|
+
count: z.number().int().positive().optional()
|
|
32
|
+
}),
|
|
33
|
+
output: docusignGenericObjectSchema,
|
|
34
|
+
query: (input) => ({
|
|
35
|
+
start_position: input.startPosition,
|
|
36
|
+
count: input.count
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
const getBccEmailArchiveHistory = defineRestOperation({
|
|
40
|
+
id: "get_bcc_email_archive_history",
|
|
41
|
+
slug: "DOCUSIGN_GET_BCCEMAIL_ARCHIVE_HISTORY",
|
|
42
|
+
name: "Get BCC Email Archive History",
|
|
43
|
+
description: "Retrieve history for a BCC email archive configuration.",
|
|
44
|
+
method: "GET",
|
|
45
|
+
path: (ctx) => `/settings/bcc_email_archives/${ctx.encode(String(ctx.input.bccEmailArchiveId))}`,
|
|
46
|
+
input: bccId.extend({
|
|
47
|
+
startPosition: z.number().int().nonnegative().optional(),
|
|
48
|
+
count: z.number().int().positive().optional()
|
|
49
|
+
}),
|
|
50
|
+
output: docusignGenericObjectSchema,
|
|
51
|
+
query: (input) => ({
|
|
52
|
+
start_position: input.startPosition,
|
|
53
|
+
count: input.count
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
const deleteBccEmailArchiveConfiguration = defineRestOperation({
|
|
57
|
+
id: "delete_bcc_email_archive_configuration",
|
|
58
|
+
slug: "DOCUSIGN_DELETE_BCC_EMAIL_ARCHIVE_CONFIGURATION",
|
|
59
|
+
name: "Delete BCC Email Archive Configuration",
|
|
60
|
+
description: "Delete a BCC email archive configuration.",
|
|
61
|
+
needsApproval: true,
|
|
62
|
+
method: "DELETE",
|
|
63
|
+
path: (ctx) => `/settings/bcc_email_archives/${ctx.encode(String(ctx.input.bccEmailArchiveId))}`,
|
|
64
|
+
input: bccId,
|
|
65
|
+
output: docusignSuccessSchema,
|
|
66
|
+
transformResponse: () => ({ success: true })
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
//#endregion
|
|
70
|
+
export { createBccEmailArchiveConfiguration, deleteBccEmailArchiveConfiguration, getBccEmailArchiveConfigurations, getBccEmailArchiveHistory };
|