@keystrokehq/docusign 0.0.11 → 0.0.16-integration-id-canonicalization.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +3 -2
  2. package/dist/credential-sets/index.d.mts +2 -0
  3. package/dist/credential-sets/index.mjs +4 -0
  4. package/dist/docusign-jwt.credential-set-B0sXS-5i.mjs +39 -0
  5. package/dist/docusign-jwt.credential-set-Bz99DTgx.d.mts +90 -0
  6. package/dist/docusign.credential-set-DRhK9ICD.mjs +183 -0
  7. package/dist/index.d.mts +4 -1
  8. package/dist/index.mjs +6 -1
  9. package/dist/operations/index.d.mts +2 -0
  10. package/dist/operations/index.mjs +3 -0
  11. package/dist/void-envelope.operation-Bim49UXq.mjs +8192 -0
  12. package/dist/void-envelope.operation-D-onxqe_.d.mts +18203 -0
  13. package/package.json +9 -225
  14. package/dist/_official/index.d.mts +0 -89
  15. package/dist/_official/index.mjs +0 -3
  16. package/dist/_runtime/index.d.mts +0 -1
  17. package/dist/_runtime/index.mjs +0 -1
  18. package/dist/account-custom-fields.d.mts +0 -65
  19. package/dist/account-custom-fields.mjs +0 -63
  20. package/dist/account-stamps.d.mts +0 -164
  21. package/dist/account-stamps.mjs +0 -144
  22. package/dist/account-tabs.d.mts +0 -90
  23. package/dist/account-tabs.mjs +0 -80
  24. package/dist/account.d.mts +0 -233
  25. package/dist/account.mjs +0 -207
  26. package/dist/admin.d.mts +0 -18
  27. package/dist/admin.mjs +0 -20
  28. package/dist/auth.d.mts +0 -37
  29. package/dist/auth.mjs +0 -53
  30. package/dist/bcc-archive.d.mts +0 -64
  31. package/dist/bcc-archive.mjs +0 -70
  32. package/dist/billing.d.mts +0 -217
  33. package/dist/billing.mjs +0 -208
  34. package/dist/brands.d.mts +0 -192
  35. package/dist/brands.mjs +0 -157
  36. package/dist/bulk-send.d.mts +0 -137
  37. package/dist/bulk-send.mjs +0 -115
  38. package/dist/chunked-uploads.d.mts +0 -78
  39. package/dist/chunked-uploads.mjs +0 -74
  40. package/dist/click.d.mts +0 -18
  41. package/dist/click.mjs +0 -20
  42. package/dist/client.d.mts +0 -47
  43. package/dist/client.mjs +0 -286
  44. package/dist/clm.d.mts +0 -18
  45. package/dist/clm.mjs +0 -20
  46. package/dist/cloud-storage.d.mts +0 -122
  47. package/dist/cloud-storage.mjs +0 -115
  48. package/dist/connect.d.mts +0 -252
  49. package/dist/connect.mjs +0 -217
  50. package/dist/connection.d.mts +0 -2
  51. package/dist/connection.mjs +0 -3
  52. package/dist/contacts.d.mts +0 -80
  53. package/dist/contacts.mjs +0 -79
  54. package/dist/enote.d.mts +0 -44
  55. package/dist/enote.mjs +0 -45
  56. package/dist/envelope-attachments.d.mts +0 -86
  57. package/dist/envelope-attachments.mjs +0 -76
  58. package/dist/envelope-custom-fields.d.mts +0 -166
  59. package/dist/envelope-custom-fields.mjs +0 -92
  60. package/dist/envelope-documents.d.mts +0 -271
  61. package/dist/envelope-documents.mjs +0 -219
  62. package/dist/envelope-email.d.mts +0 -65
  63. package/dist/envelope-email.mjs +0 -60
  64. package/dist/envelope-lock.d.mts +0 -65
  65. package/dist/envelope-lock.mjs +0 -60
  66. package/dist/envelope-logs.d.mts +0 -126
  67. package/dist/envelope-logs.mjs +0 -126
  68. package/dist/envelope-notifications.d.mts +0 -47
  69. package/dist/envelope-notifications.mjs +0 -44
  70. package/dist/envelope-recipients.d.mts +0 -171
  71. package/dist/envelope-recipients.mjs +0 -136
  72. package/dist/envelope-tabs.d.mts +0 -52
  73. package/dist/envelope-tabs.mjs +0 -49
  74. package/dist/envelope-views.d.mts +0 -99
  75. package/dist/envelope-views.mjs +0 -88
  76. package/dist/envelope-workflow.d.mts +0 -208
  77. package/dist/envelope-workflow.mjs +0 -176
  78. package/dist/envelopes.d.mts +0 -430
  79. package/dist/envelopes.mjs +0 -190
  80. package/dist/errors.d.mts +0 -48
  81. package/dist/errors.mjs +0 -76
  82. package/dist/events.d.mts +0 -192
  83. package/dist/events.mjs +0 -146
  84. package/dist/factory-DFejlPDe.mjs +0 -7
  85. package/dist/groups.d.mts +0 -191
  86. package/dist/groups.mjs +0 -146
  87. package/dist/integration-BcEp_dFX.mjs +0 -365
  88. package/dist/integration-CdIRNjCz.d.mts +0 -72
  89. package/dist/messaging.d.mts +0 -1
  90. package/dist/messaging.mjs +0 -1
  91. package/dist/monitor.d.mts +0 -18
  92. package/dist/monitor.mjs +0 -20
  93. package/dist/notary.d.mts +0 -129
  94. package/dist/notary.mjs +0 -122
  95. package/dist/operation-helpers-Bqp7KoLi.mjs +0 -102
  96. package/dist/permission-profiles.d.mts +0 -78
  97. package/dist/permission-profiles.mjs +0 -70
  98. package/dist/power-forms.d.mts +0 -51
  99. package/dist/power-forms.mjs +0 -62
  100. package/dist/rooms.d.mts +0 -18
  101. package/dist/rooms.mjs +0 -28
  102. package/dist/shared-DTUCJayR.mjs +0 -27
  103. package/dist/signing-groups.d.mts +0 -139
  104. package/dist/signing-groups.mjs +0 -117
  105. package/dist/template-custom-fields.d.mts +0 -199
  106. package/dist/template-custom-fields.mjs +0 -107
  107. package/dist/template-documents.d.mts +0 -132
  108. package/dist/template-documents.mjs +0 -109
  109. package/dist/template-lock.d.mts +0 -65
  110. package/dist/template-lock.mjs +0 -60
  111. package/dist/template-sharing.d.mts +0 -129
  112. package/dist/template-sharing.mjs +0 -108
  113. package/dist/template-workflow.d.mts +0 -184
  114. package/dist/template-workflow.mjs +0 -152
  115. package/dist/templates.d.mts +0 -158
  116. package/dist/templates.mjs +0 -110
  117. package/dist/user-authorizations.d.mts +0 -129
  118. package/dist/user-authorizations.mjs +0 -133
  119. package/dist/user-custom-settings.d.mts +0 -81
  120. package/dist/user-custom-settings.mjs +0 -69
  121. package/dist/user-profile.d.mts +0 -109
  122. package/dist/user-profile.mjs +0 -106
  123. package/dist/user-signatures.d.mts +0 -208
  124. package/dist/user-signatures.mjs +0 -180
  125. package/dist/users.d.mts +0 -128
  126. package/dist/users.mjs +0 -98
  127. package/dist/verification.d.mts +0 -19
  128. package/dist/verification.mjs +0 -59
  129. package/dist/workspaces.d.mts +0 -173
  130. package/dist/workspaces.mjs +0 -143
@@ -1,365 +0,0 @@
1
- import { CredentialSet, Operation } from "@keystrokehq/core";
2
- import { z } from "zod";
3
-
4
- //#region ../../packages/integration-authoring/dist/official/runtime.mjs
5
- const REGISTRY_KEY = "__ks_official_integration_metadata_registry";
6
- function getRegistry() {
7
- const globalStore = globalThis;
8
- if (!globalStore[REGISTRY_KEY]) globalStore[REGISTRY_KEY] = /* @__PURE__ */ new WeakMap();
9
- return globalStore[REGISTRY_KEY];
10
- }
11
- function registerOfficialOperation(operation, metadata) {
12
- getRegistry().set(operation, Object.freeze({ ...metadata }));
13
- }
14
-
15
- //#endregion
16
- //#region ../../packages/integration-authoring/dist/official/index.mjs
17
- const OFFICIAL_CREDENTIAL_SET_ID_PREFIX = "keystroke:";
18
- function officialCredentialSetId(id) {
19
- return `${OFFICIAL_CREDENTIAL_SET_ID_PREFIX}${id}`;
20
- }
21
- function stripOfficialCredentialSetIdPrefix(id) {
22
- return id.startsWith(OFFICIAL_CREDENTIAL_SET_ID_PREFIX) ? id.slice(10) : id;
23
- }
24
- /**
25
- * Creates a factory for Keystroke-official integration operations.
26
- *
27
- * It keeps the same flat `run(input, credentials)` ergonomics as the generic
28
- * operation factory, while registering official metadata for builder/runtime
29
- * operation metadata.
30
- */
31
- function createOfficialOperationFactory(credentialSet) {
32
- const integrationId = stripOfficialCredentialSetIdPrefix(credentialSet.id);
33
- return (config) => {
34
- const wrappedRun = async (input, ctx) => {
35
- const creds = ctx.credentials[credentialSet.id];
36
- return config.run(input, creds);
37
- };
38
- const operation = new Operation({
39
- id: config.id,
40
- name: config.name,
41
- description: config.description,
42
- input: config.input,
43
- output: config.output,
44
- credentialSets: [credentialSet],
45
- ...config.tags !== void 0 ? { tags: config.tags } : {},
46
- ...config.needsApproval !== void 0 ? { needsApproval: config.needsApproval } : {},
47
- ...config.requiredOAuthScopes !== void 0 ? { requiredOAuthScopes: config.requiredOAuthScopes } : {},
48
- ...config.retries !== void 0 ? { retries: config.retries } : {},
49
- ...config.timeout !== void 0 ? { timeout: config.timeout } : {},
50
- ...config.maxDurationMs !== void 0 ? { maxDurationMs: config.maxDurationMs } : {},
51
- run: wrappedRun
52
- });
53
- registerOfficialOperation(operation, { integrationId });
54
- return operation;
55
- };
56
- }
57
- /**
58
- * Creates an official integration bundle from a single config object.
59
- *
60
- * - Creates the public `CredentialSet` internally.
61
- * - Accepts optional `internal` fields for Keystroke-owned platform credentials.
62
- */
63
- function defineOfficialIntegration(config) {
64
- const internalCredentialSets = config.internal ?? {};
65
- const allInternalCredentialSets = [
66
- ...internalCredentialSets.providerApp ? [internalCredentialSets.providerApp] : [],
67
- ...internalCredentialSets.providerAppVariants ?? [],
68
- ...internalCredentialSets.webhookVerification ? [internalCredentialSets.webhookVerification] : [],
69
- ...internalCredentialSets.other ?? []
70
- ];
71
- const credentialSet = new CredentialSet({
72
- id: config.id,
73
- name: config.name,
74
- description: config.description,
75
- auth: config.auth,
76
- ...config.connections ? { connections: config.connections } : {},
77
- ...config.proxy ? { proxy: config.proxy } : {},
78
- ...config.needsRawSecret === true ? { needsRawSecret: true } : {}
79
- });
80
- return Object.freeze({
81
- integration: {
82
- id: config.id,
83
- name: config.name,
84
- ...config.description !== void 0 ? { description: config.description } : {},
85
- auth: config.auth,
86
- ...config.proxy ? { proxy: config.proxy } : {},
87
- ...config.needsRawSecret === true ? { needsRawSecret: true } : {},
88
- ...config.connections ? { connections: config.connections } : {}
89
- },
90
- credentialSet,
91
- internalCredentialSets,
92
- allInternalCredentialSets
93
- });
94
- }
95
-
96
- //#endregion
97
- //#region src/_official/provider-app.ts
98
- /**
99
- * Keystroke-owned OAuth client definition for the DocuSign public connection.
100
- *
101
- * Used for: OAuth authorization-code exchange, refresh, and the embedded
102
- * `/oauth/userinfo` lookup that resolves an account's `baseUri`.
103
- */
104
- const docusignAppCredentialSet = new CredentialSet({
105
- id: officialCredentialSetId("docusign-app"),
106
- exposure: "platform-only",
107
- name: "DocuSign App",
108
- auth: z.object({
109
- clientId: z.string().min(1),
110
- clientSecret: z.string().min(1)
111
- })
112
- });
113
- /**
114
- * Keystroke-owned Connect webhook signing secrets.
115
- *
116
- * DocuSign Connect allows up to 10 concurrent HMAC shared secrets for rotation.
117
- * Each outbound webhook is signed with every enabled secret as a separate
118
- * `X-DocuSign-Signature-{N}` header. Verification accepts a delivery if any
119
- * header matches any configured secret under a constant-time compare.
120
- *
121
- * Secrets are parsed from `KEYSTROKE_OFFICIAL_DOCUSIGN_CONNECT_HMAC_SECRETS`,
122
- * a comma-separated list with newest first.
123
- */
124
- const docusignConnectCredentialSet = new CredentialSet({
125
- id: officialCredentialSetId("docusign-connect"),
126
- exposure: "platform-only",
127
- name: "DocuSign Connect",
128
- auth: z.object({ hmacSecrets: z.array(z.string().min(1)).min(1) })
129
- });
130
- /**
131
- * Keystroke-owned JWT Grant integrator key + RSA private key.
132
- *
133
- * Declared for forward compatibility: runtime paths that require JWT Grant
134
- * (historical envelope replay, backend impersonation) will consume this
135
- * credential set in a follow-up without a registry change. Not wired to any
136
- * runtime path in v1 — any operation that would need JWT throws
137
- * `DocusignApiError.notImplemented({ kind: 'plan_gated' })` until then.
138
- */
139
- const docusignJwtCredentialSet = new CredentialSet({
140
- id: officialCredentialSetId("docusign-jwt"),
141
- exposure: "platform-only",
142
- name: "DocuSign JWT",
143
- auth: z.object({
144
- integratorKey: z.string().min(1),
145
- impersonatedUserId: z.uuid(),
146
- privateKeyPem: z.string().min(1),
147
- oauthHost: z.enum(["account.docusign.com", "account-d.docusign.com"])
148
- })
149
- });
150
- /**
151
- * Parse the comma-separated `KEYSTROKE_OFFICIAL_DOCUSIGN_CONNECT_HMAC_SECRETS`
152
- * env value into the array shape the internal credential set expects. Empty
153
- * input resolves to `[]`, which fails the `.min(1)` parse so Connect triggers
154
- * reject deliveries until the env is populated.
155
- */
156
- function parseHmacSecrets(raw) {
157
- if (!raw) return [];
158
- return raw.split(",").map((secret) => secret.trim()).filter((secret) => secret.length > 0);
159
- }
160
- const docusignOfficialProviderSeed = {
161
- provider: "docusign",
162
- appRef: "docusign-platform",
163
- displayName: "DocuSign Platform",
164
- credentialSetName: "Keystroke DocuSign Platform App",
165
- envShape: {
166
- KEYSTROKE_OFFICIAL_DOCUSIGN_CLIENT_ID: z.string().optional(),
167
- KEYSTROKE_OFFICIAL_DOCUSIGN_CLIENT_SECRET: z.string().optional()
168
- },
169
- requiredEnvKeys: ["KEYSTROKE_OFFICIAL_DOCUSIGN_CLIENT_ID", "KEYSTROKE_OFFICIAL_DOCUSIGN_CLIENT_SECRET"],
170
- externalAppIdEnvKey: "KEYSTROKE_OFFICIAL_DOCUSIGN_CLIENT_ID",
171
- buildCredentials: (env) => ({
172
- clientId: env.KEYSTROKE_OFFICIAL_DOCUSIGN_CLIENT_ID,
173
- clientSecret: env.KEYSTROKE_OFFICIAL_DOCUSIGN_CLIENT_SECRET
174
- })
175
- };
176
-
177
- //#endregion
178
- //#region ../../packages/credential-connection/dist/defaults-YE9AvLIc.mjs
179
- /**
180
- * Shared OAuth 2.0 token-response plumbing.
181
- *
182
- * `parseOAuthTokenResponse` handles the two common wire formats (JSON and
183
- * form-urlencoded, the latter used by GitHub unless you explicitly ask for
184
- * JSON). `normalizeOAuthTokens` pulls the standard fields out of the parsed
185
- * body in both the flat form and Slack's nested `authed_user.access_token`
186
- * form. These helpers are exposed so integration authors overriding
187
- * `exchangeCode` / `refreshToken` do not have to re-implement them.
188
- */
189
- var TokenExchangeError = class extends Error {
190
- httpStatus;
191
- constructor(httpStatus) {
192
- super(`Token exchange failed: HTTP ${httpStatus}`);
193
- this.name = "TokenExchangeError";
194
- this.httpStatus = httpStatus;
195
- }
196
- };
197
- async function parseOAuthTokenResponse(response) {
198
- const contentType = response.headers.get("content-type")?.toLowerCase() ?? "";
199
- if (contentType.includes("application/json")) return await response.json();
200
- const text = await response.text();
201
- if (!text.trim()) return {};
202
- if (contentType.includes("application/x-www-form-urlencoded") || text.includes("=")) {
203
- const params = new URLSearchParams(text);
204
- return Object.fromEntries(params.entries());
205
- }
206
- throw new Error(`Unsupported OAuth token response content type: ${contentType || "unknown"}`);
207
- }
208
- function normalizeOAuthTokens(tokenData) {
209
- const authedUser = tokenData.authed_user;
210
- const rawAccessToken = tokenData.access_token ?? authedUser?.access_token;
211
- const rawRefreshToken = tokenData.refresh_token;
212
- const rawExpiresIn = tokenData.expires_in;
213
- const rawInstanceUrl = tokenData.instance_url;
214
- return {
215
- accessToken: typeof rawAccessToken === "string" ? rawAccessToken : void 0,
216
- refreshToken: typeof rawRefreshToken === "string" ? rawRefreshToken : void 0,
217
- expiresIn: typeof rawExpiresIn === "number" ? rawExpiresIn : typeof rawExpiresIn === "string" ? Number(rawExpiresIn) || void 0 : void 0,
218
- instanceUrl: typeof rawInstanceUrl === "string" ? rawInstanceUrl : void 0
219
- };
220
- }
221
-
222
- //#endregion
223
- //#region src/oauth-connection.ts
224
- const DOCUSIGN_OAUTH_HOST = "account.docusign.com";
225
- const DOCUSIGN_AUTH_URL = `https://${DOCUSIGN_OAUTH_HOST}/oauth/auth`;
226
- const DOCUSIGN_TOKEN_URL = `https://${DOCUSIGN_OAUTH_HOST}/oauth/token`;
227
- const DOCUSIGN_REVOKE_URL = `https://${DOCUSIGN_OAUTH_HOST}/oauth/revoke`;
228
- const DOCUSIGN_USERINFO_URL = `https://${DOCUSIGN_OAUTH_HOST}/oauth/userinfo`;
229
- const DOCUSIGN_OAUTH_SCOPES = ["signature", "extended"];
230
- function basicAuthHeader(clientId, clientSecret) {
231
- return `Basic ${Buffer.from(`${clientId}:${clientSecret}`, "utf8").toString("base64")}`;
232
- }
233
- async function postDocusignToken(body, authHeader) {
234
- const response = await fetch(DOCUSIGN_TOKEN_URL, {
235
- method: "POST",
236
- headers: {
237
- Accept: "application/json",
238
- "Content-Type": "application/x-www-form-urlencoded",
239
- Authorization: authHeader
240
- },
241
- body
242
- });
243
- if (!response.ok) throw new TokenExchangeError(response.status);
244
- const raw = await parseOAuthTokenResponse(response);
245
- const { accessToken, refreshToken, expiresIn } = normalizeOAuthTokens(raw);
246
- if (!accessToken) throw new Error("No access token in DocuSign response");
247
- return {
248
- accessToken,
249
- refreshToken,
250
- expiresIn,
251
- raw
252
- };
253
- }
254
- async function fetchDocusignUserinfo(accessToken) {
255
- const response = await fetch(DOCUSIGN_USERINFO_URL, { headers: {
256
- Accept: "application/json",
257
- Authorization: `Bearer ${accessToken}`
258
- } });
259
- if (!response.ok) throw new Error(`DocuSign userinfo lookup failed with status ${response.status} while resolving base URI.`);
260
- return await response.json();
261
- }
262
- function pickDefaultAccount(userinfo) {
263
- const accounts = userinfo.accounts ?? [];
264
- if (accounts.length === 0) return void 0;
265
- const explicitDefault = accounts.find((account) => account.is_default === true && typeof account.account_id === "string" && typeof account.base_uri === "string");
266
- if (explicitDefault) return {
267
- accountId: explicitDefault.account_id,
268
- baseUri: explicitDefault.base_uri
269
- };
270
- const firstWithBoth = accounts.find((account) => typeof account.account_id === "string" && typeof account.base_uri === "string");
271
- if (firstWithBoth) return {
272
- accountId: firstWithBoth.account_id,
273
- baseUri: firstWithBoth.base_uri
274
- };
275
- }
276
- const docusignOAuthConnection = {
277
- kind: "oauth",
278
- tokenType: "refreshable",
279
- authUrl: DOCUSIGN_AUTH_URL,
280
- tokenUrl: DOCUSIGN_TOKEN_URL,
281
- revokeUrl: DOCUSIGN_REVOKE_URL,
282
- scopes: [...DOCUSIGN_OAUTH_SCOPES],
283
- oauth: { id: "official.docusign.oauth" },
284
- vault: {
285
- accessTokenKey: "DOCUSIGN_ACCESS_TOKEN",
286
- build: (tokenResult) => {
287
- const accountId = typeof tokenResult.raw._docusignAccountId === "string" ? tokenResult.raw._docusignAccountId : void 0;
288
- const baseUri = typeof tokenResult.raw._docusignBaseUri === "string" ? tokenResult.raw._docusignBaseUri : void 0;
289
- return {
290
- DOCUSIGN_ACCESS_TOKEN: tokenResult.accessToken,
291
- ...accountId ? { DOCUSIGN_ACCOUNT_ID: accountId } : {},
292
- ...baseUri ? { DOCUSIGN_BASE_URI: baseUri } : {}
293
- };
294
- }
295
- },
296
- async exchangeCode({ oauthClient, code, redirectUri }) {
297
- if (!code) throw new Error("Missing authorization code");
298
- const tokenResult = await postDocusignToken(new URLSearchParams({
299
- grant_type: "authorization_code",
300
- code,
301
- redirect_uri: redirectUri
302
- }), basicAuthHeader(oauthClient.clientId, oauthClient.clientSecret));
303
- const userinfo = await fetchDocusignUserinfo(tokenResult.accessToken);
304
- const account = pickDefaultAccount(userinfo);
305
- if (!account) throw new Error("DocuSign userinfo response did not include a resolvable account.");
306
- tokenResult.raw._docusignAccountId = account.accountId;
307
- tokenResult.raw._docusignBaseUri = account.baseUri;
308
- tokenResult.raw._docusignUserinfo = userinfo;
309
- return tokenResult;
310
- },
311
- async refreshToken({ oauthClient, refreshToken }) {
312
- const tokenResult = await postDocusignToken(new URLSearchParams({
313
- grant_type: "refresh_token",
314
- refresh_token: refreshToken
315
- }), basicAuthHeader(oauthClient.clientId, oauthClient.clientSecret));
316
- const userinfo = await fetchDocusignUserinfo(tokenResult.accessToken);
317
- const account = pickDefaultAccount(userinfo);
318
- if (!account) throw new Error("DocuSign userinfo response did not include a resolvable account during refresh.");
319
- tokenResult.raw._docusignAccountId = account.accountId;
320
- tokenResult.raw._docusignBaseUri = account.baseUri;
321
- tokenResult.raw._docusignUserinfo = userinfo;
322
- return tokenResult;
323
- },
324
- extractInstallationInfo({ tokenResult }) {
325
- const accountId = typeof tokenResult.raw._docusignAccountId === "string" ? tokenResult.raw._docusignAccountId : void 0;
326
- const baseUri = typeof tokenResult.raw._docusignBaseUri === "string" ? tokenResult.raw._docusignBaseUri : void 0;
327
- return {
328
- externalInstallationId: accountId,
329
- externalWorkspaceId: accountId,
330
- metadata: accountId && baseUri ? {
331
- accountId,
332
- baseUri
333
- } : void 0
334
- };
335
- }
336
- };
337
-
338
- //#endregion
339
- //#region src/integration.ts
340
- const docusignAuthSchema = z.object({
341
- DOCUSIGN_ACCESS_TOKEN: z.string().min(1),
342
- DOCUSIGN_ACCOUNT_ID: z.string().min(1),
343
- DOCUSIGN_BASE_URI: z.url()
344
- });
345
- const docusignOfficialIntegration = {
346
- id: "docusign",
347
- name: "DocuSign",
348
- description: "DocuSign eSignature, templates, bulk-send, Connect webhooks, and account/admin surfaces for Keystroke workflows",
349
- auth: docusignAuthSchema,
350
- connections: [{
351
- id: "oauth",
352
- ...docusignOAuthConnection
353
- }]
354
- };
355
- const docusignBundle = defineOfficialIntegration({
356
- ...docusignOfficialIntegration,
357
- internal: {
358
- providerApp: docusignAppCredentialSet,
359
- other: [docusignConnectCredentialSet, docusignJwtCredentialSet]
360
- }
361
- });
362
- const docusign = docusignBundle.credentialSet;
363
-
364
- //#endregion
365
- export { fetchDocusignUserinfo as a, docusignJwtCredentialSet as c, createOfficialOperationFactory as d, DOCUSIGN_USERINFO_URL as i, docusignOfficialProviderSeed as l, docusignBundle as n, docusignAppCredentialSet as o, docusignOfficialIntegration as r, docusignConnectCredentialSet as s, docusign as t, parseHmacSecrets as u };
@@ -1,72 +0,0 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
- import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
- import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
5
-
6
- //#region src/integration.d.ts
7
- declare const docusignOfficialIntegration: {
8
- id: "docusign";
9
- name: string;
10
- description: string;
11
- auth: z.ZodObject<{
12
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
13
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
14
- DOCUSIGN_BASE_URI: z.ZodURL;
15
- }, z.core.$strip>;
16
- connections: {
17
- kind: "oauth";
18
- tokenType: "refreshable";
19
- authUrl: "https://account.docusign.com/oauth/auth";
20
- tokenUrl: "https://account.docusign.com/oauth/token";
21
- revokeUrl: "https://account.docusign.com/oauth/revoke";
22
- scopes: readonly ["signature", "extended"];
23
- oauth: {
24
- readonly id: "official.docusign.oauth";
25
- };
26
- vault: {
27
- readonly accessTokenKey: "DOCUSIGN_ACCESS_TOKEN";
28
- readonly build: (tokenResult: _keystrokehq_core_credential_set0.TokenResult) => {
29
- DOCUSIGN_BASE_URI?: string | undefined;
30
- DOCUSIGN_ACCOUNT_ID?: string | undefined;
31
- DOCUSIGN_ACCESS_TOKEN: string;
32
- };
33
- };
34
- exchangeCode: ({
35
- oauthClient,
36
- code,
37
- redirectUri
38
- }: _keystrokehq_core_credential_set0.ExchangeCodeContext) => Promise<_keystrokehq_core_credential_set0.TokenResult>;
39
- refreshToken: ({
40
- oauthClient,
41
- refreshToken
42
- }: _keystrokehq_core_credential_set0.RefreshTokenContext) => Promise<_keystrokehq_core_credential_set0.TokenResult>;
43
- extractInstallationInfo: ({
44
- tokenResult
45
- }: _keystrokehq_core_credential_set0.ExtractInstallationContext) => {
46
- externalInstallationId: string | undefined;
47
- externalWorkspaceId: string | undefined;
48
- metadata: {
49
- accountId: string;
50
- baseUri: string;
51
- } | undefined;
52
- };
53
- id: string;
54
- }[];
55
- };
56
- declare const docusignBundle: undefined<"docusign", z.ZodObject<{
57
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
58
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
59
- DOCUSIGN_BASE_URI: z.ZodURL;
60
- }, z.core.$strip>>;
61
- declare const docusign: _keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
62
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
63
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
64
- DOCUSIGN_BASE_URI: z.ZodURL;
65
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
66
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
67
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
68
- DOCUSIGN_BASE_URI: z.ZodURL;
69
- }, z.core.$strip>>[] | undefined>;
70
- type DocusignCredentials = InferCredentialSetAuth<typeof docusign>;
71
- //#endregion
72
- export { docusignOfficialIntegration as i, docusign as n, docusignBundle as r, DocusignCredentials as t };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1,18 +0,0 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
- import { z } from "zod";
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 };
package/dist/monitor.mjs DELETED
@@ -1,20 +0,0 @@
1
- import { docusignGenericObjectSchema } from "./schemas/index.mjs";
2
- import { n as definePlanGatedOperation } from "./operation-helpers-Bqp7KoLi.mjs";
3
- import { z } from "zod";
4
-
5
- //#region src/monitor.ts
6
- /**
7
- * DocuSign Monitor — plan-gated in v1.
8
- */
9
- const monitorNotImplemented = definePlanGatedOperation({
10
- id: "docusign.monitor-not-implemented",
11
- slug: "DOCUSIGN_MONITOR_NOT_IMPLEMENTED",
12
- name: "DocuSign Monitor (not implemented)",
13
- description: "Placeholder for DocuSign Monitor (security event stream).",
14
- input: z.object({}).catchall(z.unknown()),
15
- output: docusignGenericObjectSchema,
16
- reason: "DocuSign Monitor requires a dedicated Monitor license and a separate host (`https://lens.docusign.net`)."
17
- });
18
-
19
- //#endregion
20
- export { monitorNotImplemented };
package/dist/notary.d.mts DELETED
@@ -1,129 +0,0 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
- import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
-
5
- //#region src/notary.d.ts
6
- declare const registerCurrentUserAsNotary: _keystrokehq_core0.Operation<z.ZodObject<{
7
- notary: 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 getNotaryUserSettings: _keystrokehq_core0.Operation<z.ZodObject<{
22
- includeJurisdictions: z.ZodOptional<z.ZodBoolean>;
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 updateUserNotaryInformation: _keystrokehq_core0.Operation<z.ZodObject<{
35
- notary: z.ZodObject<{
36
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
37
- }, z.core.$catchall<z.ZodUnknown>>;
38
- }, z.core.$strip>, z.ZodObject<{
39
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
40
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
41
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
42
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
43
- DOCUSIGN_BASE_URI: z.ZodURL;
44
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
45
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
46
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
47
- DOCUSIGN_BASE_URI: z.ZodURL;
48
- }, z.core.$strip>>[] | undefined>], undefined>;
49
- declare const createNotaryJurisdictionObject: _keystrokehq_core0.Operation<z.ZodObject<{
50
- jurisdiction: z.ZodObject<{
51
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
52
- }, z.core.$catchall<z.ZodUnknown>>;
53
- }, z.core.$strip>, z.ZodObject<{
54
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
55
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
56
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
57
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
58
- DOCUSIGN_BASE_URI: z.ZodURL;
59
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
60
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
61
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
62
- DOCUSIGN_BASE_URI: z.ZodURL;
63
- }, z.core.$strip>>[] | undefined>], undefined>;
64
- declare const getNotaryJurisdictionObject: _keystrokehq_core0.Operation<z.ZodObject<{
65
- jurisdictionId: z.ZodString;
66
- }, z.core.$strip>, z.ZodObject<{
67
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
68
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
69
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
70
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
71
- DOCUSIGN_BASE_URI: z.ZodURL;
72
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
73
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
74
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
75
- DOCUSIGN_BASE_URI: z.ZodURL;
76
- }, z.core.$strip>>[] | undefined>], undefined>;
77
- declare const getNotaryJurisdictionsForUser: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
78
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
79
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
80
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
81
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
82
- DOCUSIGN_BASE_URI: z.ZodURL;
83
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
84
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
85
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
86
- DOCUSIGN_BASE_URI: z.ZodURL;
87
- }, z.core.$strip>>[] | undefined>], undefined>;
88
- declare const updateNotaryJurisdictionInfo: _keystrokehq_core0.Operation<z.ZodObject<{
89
- jurisdictionId: z.ZodString;
90
- jurisdiction: z.ZodObject<{
91
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
92
- }, z.core.$catchall<z.ZodUnknown>>;
93
- }, z.core.$strip>, z.ZodObject<{
94
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
95
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
96
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
97
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
98
- DOCUSIGN_BASE_URI: z.ZodURL;
99
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
100
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
101
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
102
- DOCUSIGN_BASE_URI: z.ZodURL;
103
- }, z.core.$strip>>[] | undefined>], undefined>;
104
- declare const deleteNotaryJurisdiction: _keystrokehq_core0.Operation<z.ZodObject<{
105
- jurisdictionId: z.ZodString;
106
- }, z.core.$strip>, z.ZodObject<{
107
- success: z.ZodBoolean;
108
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
109
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
110
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
111
- DOCUSIGN_BASE_URI: z.ZodURL;
112
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
113
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
114
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
115
- DOCUSIGN_BASE_URI: z.ZodURL;
116
- }, z.core.$strip>>[] | undefined>], undefined>;
117
- declare const listRegisteredNotaryJurisdictions: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
118
- [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
119
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
120
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
121
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
122
- DOCUSIGN_BASE_URI: z.ZodURL;
123
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
124
- DOCUSIGN_ACCESS_TOKEN: z.ZodString;
125
- DOCUSIGN_ACCOUNT_ID: z.ZodString;
126
- DOCUSIGN_BASE_URI: z.ZodURL;
127
- }, z.core.$strip>>[] | undefined>], undefined>;
128
- //#endregion
129
- export { createNotaryJurisdictionObject, deleteNotaryJurisdiction, getNotaryJurisdictionObject, getNotaryJurisdictionsForUser, getNotaryUserSettings, listRegisteredNotaryJurisdictions, registerCurrentUserAsNotary, updateNotaryJurisdictionInfo, updateUserNotaryInformation };