@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
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { t as encodeDocusignPathSegment } from "./shared-DTUCJayR.mjs";
|
|
2
|
+
import { docusignGenericObjectSchema, docusignLooseObjectSchema, docusignSuccessSchema, docusignTemplateIdSchema } from "./schemas/index.mjs";
|
|
3
|
+
import { r as defineRestOperation } from "./operation-helpers-BMTArRh9.mjs";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
6
|
+
//#region src/template-lock.ts
|
|
7
|
+
/**
|
|
8
|
+
* Template lock lifecycle. Covers PLAN.md § 6.16 (lock half).
|
|
9
|
+
*/
|
|
10
|
+
const tplId = z.object({ templateId: docusignTemplateIdSchema });
|
|
11
|
+
const lockPath = (templateId) => `/templates/${encodeDocusignPathSegment(String(templateId))}/lock`;
|
|
12
|
+
const lockTemplateForEditing = defineRestOperation({
|
|
13
|
+
id: "lock_template_for_editing",
|
|
14
|
+
slug: "DOCUSIGN_LOCK_TEMPLATE_FOR_EDITING",
|
|
15
|
+
name: "Lock Template For Editing",
|
|
16
|
+
description: "Acquire an editing lock on a template.",
|
|
17
|
+
needsApproval: true,
|
|
18
|
+
method: "POST",
|
|
19
|
+
path: (ctx) => lockPath(ctx.input.templateId),
|
|
20
|
+
input: tplId.extend({ lock: docusignLooseObjectSchema().optional() }),
|
|
21
|
+
output: docusignGenericObjectSchema,
|
|
22
|
+
body: (input) => input.lock ?? {}
|
|
23
|
+
});
|
|
24
|
+
const getTemplateLockInformation = defineRestOperation({
|
|
25
|
+
id: "get_template_lock_information",
|
|
26
|
+
slug: "DOCUSIGN_GET_TEMPLATE_LOCK_INFORMATION",
|
|
27
|
+
name: "Get Template Lock Information",
|
|
28
|
+
description: "Return lock metadata for a template.",
|
|
29
|
+
method: "GET",
|
|
30
|
+
path: (ctx) => lockPath(ctx.input.templateId),
|
|
31
|
+
input: tplId,
|
|
32
|
+
output: docusignGenericObjectSchema
|
|
33
|
+
});
|
|
34
|
+
const updateTemplateLockInformation = defineRestOperation({
|
|
35
|
+
id: "update_template_lock_information",
|
|
36
|
+
slug: "DOCUSIGN_UPDATE_TEMPLATE_LOCK_INFORMATION",
|
|
37
|
+
name: "Update Template Lock Information",
|
|
38
|
+
description: "Update the lock on a template.",
|
|
39
|
+
needsApproval: true,
|
|
40
|
+
method: "PUT",
|
|
41
|
+
path: (ctx) => lockPath(ctx.input.templateId),
|
|
42
|
+
input: tplId.extend({ lock: docusignLooseObjectSchema() }),
|
|
43
|
+
output: docusignGenericObjectSchema,
|
|
44
|
+
body: (input) => input.lock
|
|
45
|
+
});
|
|
46
|
+
const deleteTemplateLock = defineRestOperation({
|
|
47
|
+
id: "delete_template_lock",
|
|
48
|
+
slug: "DOCUSIGN_DELETE_TEMPLATE_LOCK",
|
|
49
|
+
name: "Delete Template Lock",
|
|
50
|
+
description: "Release the lock on a template.",
|
|
51
|
+
needsApproval: true,
|
|
52
|
+
method: "DELETE",
|
|
53
|
+
path: (ctx) => lockPath(ctx.input.templateId),
|
|
54
|
+
input: tplId,
|
|
55
|
+
output: docusignSuccessSchema,
|
|
56
|
+
transformResponse: () => ({ success: true })
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { deleteTemplateLock, getTemplateLockInformation, lockTemplateForEditing, updateTemplateLockInformation };
|
|
@@ -0,0 +1,129 @@
|
|
|
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/template-sharing.d.ts
|
|
6
|
+
declare const shareTemplateWithGroup: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
templateId: z.ZodString;
|
|
8
|
+
groupId: z.ZodString;
|
|
9
|
+
templatePart: z.ZodOptional<z.ZodString>;
|
|
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 removeGroupSharingPermissionsForTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
22
|
+
templateId: z.ZodString;
|
|
23
|
+
groupId: z.ZodString;
|
|
24
|
+
templatePart: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
success: z.ZodBoolean;
|
|
27
|
+
}, z.core.$strip>, 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
|
+
declare const getTemplateRecipientDocumentVisibility: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
37
|
+
templateId: z.ZodString;
|
|
38
|
+
recipientId: z.ZodString;
|
|
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 updateTemplateRecipientDocumentVisibility: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
51
|
+
templateId: z.ZodString;
|
|
52
|
+
recipientId: z.ZodString;
|
|
53
|
+
documentVisibility: z.ZodArray<z.ZodObject<{
|
|
54
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
55
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
58
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
59
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
60
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
61
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
62
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
63
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
64
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
65
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
66
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
67
|
+
declare const updateTemplateDocVisibility: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
68
|
+
templateId: z.ZodString;
|
|
69
|
+
documentVisibility: z.ZodArray<z.ZodObject<{
|
|
70
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
71
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
74
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
75
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
76
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
77
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
78
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
79
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
80
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
81
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
82
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
83
|
+
declare const getTemplateNotificationInformation: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
84
|
+
templateId: z.ZodString;
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
87
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
88
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
89
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
90
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
91
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
92
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
93
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
94
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
95
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
96
|
+
declare const updateTemplateNotificationSettings: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
97
|
+
templateId: z.ZodString;
|
|
98
|
+
notification: z.ZodObject<{
|
|
99
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
100
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
103
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
104
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
105
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
106
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
107
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
108
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
109
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
110
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
111
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
112
|
+
declare const createTemplateRecipientPreviewUrl: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
113
|
+
templateId: z.ZodString;
|
|
114
|
+
preview: z.ZodObject<{
|
|
115
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
116
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
117
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
118
|
+
url: z.ZodOptional<z.ZodString>;
|
|
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 { createTemplateRecipientPreviewUrl, getTemplateNotificationInformation, getTemplateRecipientDocumentVisibility, removeGroupSharingPermissionsForTemplate, shareTemplateWithGroup, updateTemplateDocVisibility, updateTemplateNotificationSettings, updateTemplateRecipientDocumentVisibility };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { docusignGenericObjectSchema, docusignLooseObjectSchema, docusignRecipientIdSchema, docusignSuccessSchema, docusignTemplateIdSchema } from "./schemas/index.mjs";
|
|
2
|
+
import { r as defineRestOperation } from "./operation-helpers-BMTArRh9.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/template-sharing.ts
|
|
6
|
+
/**
|
|
7
|
+
* Template sharing + recipient visibility + notification + preview. Covers PLAN.md § 6.16 (rest).
|
|
8
|
+
*/
|
|
9
|
+
const tplId = z.object({ templateId: docusignTemplateIdSchema });
|
|
10
|
+
const tplGroup = tplId.extend({
|
|
11
|
+
groupId: z.string().min(1),
|
|
12
|
+
templatePart: z.string().min(1).optional()
|
|
13
|
+
});
|
|
14
|
+
const tplRecipient = tplId.extend({ recipientId: docusignRecipientIdSchema });
|
|
15
|
+
const shareTemplateWithGroup = defineRestOperation({
|
|
16
|
+
id: "share_template_with_group",
|
|
17
|
+
slug: "DOCUSIGN_SHARE_TEMPLATE_WITH_GROUP",
|
|
18
|
+
name: "Share Template With Group",
|
|
19
|
+
description: "Share a template with a group by granting permissions on a template part.",
|
|
20
|
+
needsApproval: true,
|
|
21
|
+
method: "PUT",
|
|
22
|
+
path: (ctx) => `/templates/${ctx.encode(String(ctx.input.templateId))}/${ctx.encode(String(ctx.input.templatePart ?? "views"))}/${ctx.encode(String(ctx.input.groupId))}`,
|
|
23
|
+
input: tplGroup,
|
|
24
|
+
output: docusignGenericObjectSchema
|
|
25
|
+
});
|
|
26
|
+
const removeGroupSharingPermissionsForTemplate = defineRestOperation({
|
|
27
|
+
id: "remove_group_sharing_permissions_for_template",
|
|
28
|
+
slug: "DOCUSIGN_REMOVE_GROUP_SHARING_PERMISSIONS_FOR_TEMPLATE",
|
|
29
|
+
name: "Remove Group Sharing Permissions For Template",
|
|
30
|
+
description: "Revoke template-sharing permissions for a group.",
|
|
31
|
+
needsApproval: true,
|
|
32
|
+
method: "DELETE",
|
|
33
|
+
path: (ctx) => `/templates/${ctx.encode(String(ctx.input.templateId))}/${ctx.encode(String(ctx.input.templatePart ?? "views"))}/${ctx.encode(String(ctx.input.groupId))}`,
|
|
34
|
+
input: tplGroup,
|
|
35
|
+
output: docusignSuccessSchema,
|
|
36
|
+
transformResponse: () => ({ success: true })
|
|
37
|
+
});
|
|
38
|
+
const getTemplateRecipientDocumentVisibility = defineRestOperation({
|
|
39
|
+
id: "get_template_recipient_document_visibility",
|
|
40
|
+
slug: "DOCUSIGN_GET_TEMPLATE_RECIPIENT_DOCUMENT_VISIBILITY",
|
|
41
|
+
name: "Get Template Recipient Document Visibility",
|
|
42
|
+
description: "Return per-document visibility for a template recipient.",
|
|
43
|
+
method: "GET",
|
|
44
|
+
path: (ctx) => `/templates/${ctx.encode(String(ctx.input.templateId))}/recipients/${ctx.encode(String(ctx.input.recipientId))}/document_visibility`,
|
|
45
|
+
input: tplRecipient,
|
|
46
|
+
output: docusignGenericObjectSchema
|
|
47
|
+
});
|
|
48
|
+
const updateTemplateRecipientDocumentVisibility = defineRestOperation({
|
|
49
|
+
id: "update_template_recipient_document_visibility",
|
|
50
|
+
slug: "DOCUSIGN_UPDATE_TEMPLATE_RECIPIENT_DOCUMENT_VISIBILITY",
|
|
51
|
+
name: "Update Template Recipient Document Visibility",
|
|
52
|
+
description: "Update per-document visibility for a template recipient.",
|
|
53
|
+
needsApproval: true,
|
|
54
|
+
method: "PUT",
|
|
55
|
+
path: (ctx) => `/templates/${ctx.encode(String(ctx.input.templateId))}/recipients/${ctx.encode(String(ctx.input.recipientId))}/document_visibility`,
|
|
56
|
+
input: tplRecipient.extend({ documentVisibility: z.array(docusignLooseObjectSchema()).min(1) }),
|
|
57
|
+
output: docusignGenericObjectSchema,
|
|
58
|
+
body: (input) => ({ documentVisibility: input.documentVisibility })
|
|
59
|
+
});
|
|
60
|
+
const updateTemplateDocVisibility = defineRestOperation({
|
|
61
|
+
id: "update_template_doc_visibility",
|
|
62
|
+
slug: "DOCUSIGN_UPDATE_TEMPLATE_DOC_VISIBILITY",
|
|
63
|
+
name: "Update Template Document Visibility",
|
|
64
|
+
description: "Update per-recipient document visibility on a template.",
|
|
65
|
+
needsApproval: true,
|
|
66
|
+
method: "PUT",
|
|
67
|
+
path: (ctx) => `/templates/${ctx.encode(String(ctx.input.templateId))}/recipients/document_visibility`,
|
|
68
|
+
input: tplId.extend({ documentVisibility: z.array(docusignLooseObjectSchema()).min(1) }),
|
|
69
|
+
output: docusignGenericObjectSchema,
|
|
70
|
+
body: (input) => ({ documentVisibility: input.documentVisibility })
|
|
71
|
+
});
|
|
72
|
+
const getTemplateNotificationInformation = defineRestOperation({
|
|
73
|
+
id: "get_template_notification_information",
|
|
74
|
+
slug: "DOCUSIGN_GET_TEMPLATE_NOTIFICATION_INFORMATION",
|
|
75
|
+
name: "Get Template Notification Information",
|
|
76
|
+
description: "Retrieve the notification settings on a template.",
|
|
77
|
+
method: "GET",
|
|
78
|
+
path: (ctx) => `/templates/${ctx.encode(String(ctx.input.templateId))}/notification`,
|
|
79
|
+
input: tplId,
|
|
80
|
+
output: docusignGenericObjectSchema
|
|
81
|
+
});
|
|
82
|
+
const updateTemplateNotificationSettings = defineRestOperation({
|
|
83
|
+
id: "update_template_notification_settings",
|
|
84
|
+
slug: "DOCUSIGN_UPDATE_TEMPLATE_NOTIFICATION_SETTINGS",
|
|
85
|
+
name: "Update Template Notification Settings",
|
|
86
|
+
description: "Update the notification settings on a template.",
|
|
87
|
+
needsApproval: true,
|
|
88
|
+
method: "PUT",
|
|
89
|
+
path: (ctx) => `/templates/${ctx.encode(String(ctx.input.templateId))}/notification`,
|
|
90
|
+
input: tplId.extend({ notification: docusignLooseObjectSchema() }),
|
|
91
|
+
output: docusignGenericObjectSchema,
|
|
92
|
+
body: (input) => input.notification
|
|
93
|
+
});
|
|
94
|
+
const createTemplateRecipientPreviewUrl = defineRestOperation({
|
|
95
|
+
id: "create_template_recipient_preview_url",
|
|
96
|
+
slug: "DOCUSIGN_CREATE_TEMPLATE_RECIPIENT_PREVIEW_URL",
|
|
97
|
+
name: "Create Template Recipient Preview URL",
|
|
98
|
+
description: "Create a preview URL that simulates a template recipient signing.",
|
|
99
|
+
needsApproval: true,
|
|
100
|
+
method: "POST",
|
|
101
|
+
path: (ctx) => `/templates/${ctx.encode(String(ctx.input.templateId))}/views/recipient_preview`,
|
|
102
|
+
input: tplId.extend({ preview: docusignLooseObjectSchema() }),
|
|
103
|
+
output: docusignLooseObjectSchema({ url: z.string().optional() }),
|
|
104
|
+
body: (input) => input.preview
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
//#endregion
|
|
108
|
+
export { createTemplateRecipientPreviewUrl, getTemplateNotificationInformation, getTemplateRecipientDocumentVisibility, removeGroupSharingPermissionsForTemplate, shareTemplateWithGroup, updateTemplateDocVisibility, updateTemplateNotificationSettings, updateTemplateRecipientDocumentVisibility };
|
|
@@ -0,0 +1,184 @@
|
|
|
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/template-workflow.d.ts
|
|
6
|
+
declare const returnTemplateWorkflowDefinition: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
templateId: z.ZodString;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
10
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
11
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
12
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
13
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
14
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
15
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
16
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
17
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
18
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
19
|
+
declare const updateTemplateWorkflowDefinition: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
20
|
+
templateId: z.ZodString;
|
|
21
|
+
workflow: z.ZodObject<{
|
|
22
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
23
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
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 deleteWorkflowDefinitionForTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
36
|
+
templateId: z.ZodString;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
success: z.ZodBoolean;
|
|
39
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
40
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
41
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
42
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
43
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
44
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
45
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
46
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
47
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
48
|
+
declare const createTemplateWorkflowStep: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
49
|
+
templateId: z.ZodString;
|
|
50
|
+
step: 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 retrieveWorkflowStepForTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
65
|
+
templateId: z.ZodString;
|
|
66
|
+
workflowStepId: z.ZodString;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
69
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
70
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
71
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
72
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
73
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
74
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
75
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
76
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
77
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
78
|
+
declare const updateWorkflowStepForTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
79
|
+
templateId: z.ZodString;
|
|
80
|
+
workflowStepId: z.ZodString;
|
|
81
|
+
step: z.ZodObject<{
|
|
82
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
83
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
84
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
86
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
87
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
88
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
89
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
90
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
91
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
92
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
93
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
94
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
95
|
+
declare const deleteTemplateWorkflowStep: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
96
|
+
templateId: z.ZodString;
|
|
97
|
+
workflowStepId: z.ZodString;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
success: z.ZodBoolean;
|
|
100
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
101
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
102
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
103
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
104
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
105
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
106
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
107
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
108
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
109
|
+
declare const getTemplateDelayedRoutingRules: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
110
|
+
templateId: z.ZodString;
|
|
111
|
+
workflowStepId: z.ZodString;
|
|
112
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
113
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
114
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
115
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
116
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
117
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
118
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
119
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
120
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
121
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
122
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
123
|
+
declare const updateTemplateDelayedRoutingRules: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
124
|
+
templateId: z.ZodString;
|
|
125
|
+
workflowStepId: z.ZodString;
|
|
126
|
+
rules: z.ZodObject<{
|
|
127
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
128
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
129
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
130
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
131
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
132
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
133
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
134
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
135
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
136
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
137
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
138
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
139
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
140
|
+
declare const deleteDelayedRoutingRulesForTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
141
|
+
templateId: z.ZodString;
|
|
142
|
+
workflowStepId: z.ZodString;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
success: z.ZodBoolean;
|
|
145
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
146
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
147
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
148
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
149
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
150
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
151
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
152
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
153
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
154
|
+
declare const getTemplateScheduledSendingSettings: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
155
|
+
templateId: z.ZodString;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
158
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
159
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
160
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
161
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
162
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
163
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
164
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
165
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
166
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
167
|
+
declare const updateTemplateScheduledSendingRules: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
168
|
+
templateId: z.ZodString;
|
|
169
|
+
rules: z.ZodObject<{
|
|
170
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
171
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
173
|
+
[x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
174
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"docusign", z.ZodObject<{
|
|
175
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
176
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
177
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
178
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
179
|
+
DOCUSIGN_ACCESS_TOKEN: z.ZodString;
|
|
180
|
+
DOCUSIGN_ACCOUNT_ID: z.ZodString;
|
|
181
|
+
DOCUSIGN_BASE_URI: z.ZodURL;
|
|
182
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
183
|
+
//#endregion
|
|
184
|
+
export { createTemplateWorkflowStep, deleteDelayedRoutingRulesForTemplate, deleteTemplateWorkflowStep, deleteWorkflowDefinitionForTemplate, getTemplateDelayedRoutingRules, getTemplateScheduledSendingSettings, retrieveWorkflowStepForTemplate, returnTemplateWorkflowDefinition, updateTemplateDelayedRoutingRules, updateTemplateScheduledSendingRules, updateTemplateWorkflowDefinition, updateWorkflowStepForTemplate };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { t as encodeDocusignPathSegment } from "./shared-DTUCJayR.mjs";
|
|
2
|
+
import { docusignGenericObjectSchema, docusignLooseObjectSchema, docusignSuccessSchema, docusignTemplateIdSchema } from "./schemas/index.mjs";
|
|
3
|
+
import { r as defineRestOperation } from "./operation-helpers-BMTArRh9.mjs";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
|
|
6
|
+
//#region src/template-workflow.ts
|
|
7
|
+
/**
|
|
8
|
+
* Template workflow + scheduled sending + delayed routing. Covers PLAN.md § 6.15.
|
|
9
|
+
*/
|
|
10
|
+
const tplId = z.object({ templateId: docusignTemplateIdSchema });
|
|
11
|
+
const tplStep = tplId.extend({ workflowStepId: z.string().min(1) });
|
|
12
|
+
const workflow = (templateId) => `/templates/${encodeDocusignPathSegment(String(templateId))}/workflow`;
|
|
13
|
+
const step = (templateId, stepId) => `${workflow(templateId)}/steps/${encodeDocusignPathSegment(String(stepId))}`;
|
|
14
|
+
const returnTemplateWorkflowDefinition = defineRestOperation({
|
|
15
|
+
id: "return_template_workflow_definition",
|
|
16
|
+
slug: "DOCUSIGN_RETURN_TEMPLATE_WORKFLOW_DEFINITION",
|
|
17
|
+
name: "Return Template Workflow Definition",
|
|
18
|
+
description: "Get the workflow definition attached to a template.",
|
|
19
|
+
method: "GET",
|
|
20
|
+
path: (ctx) => workflow(ctx.input.templateId),
|
|
21
|
+
input: tplId,
|
|
22
|
+
output: docusignGenericObjectSchema
|
|
23
|
+
});
|
|
24
|
+
const updateTemplateWorkflowDefinition = defineRestOperation({
|
|
25
|
+
id: "update_template_workflow_definition",
|
|
26
|
+
slug: "DOCUSIGN_UPDATE_TEMPLATE_WORKFLOW_DEFINITION",
|
|
27
|
+
name: "Update Template Workflow Definition",
|
|
28
|
+
description: "Update the workflow definition attached to a template.",
|
|
29
|
+
needsApproval: true,
|
|
30
|
+
method: "PUT",
|
|
31
|
+
path: (ctx) => workflow(ctx.input.templateId),
|
|
32
|
+
input: tplId.extend({ workflow: docusignLooseObjectSchema() }),
|
|
33
|
+
output: docusignGenericObjectSchema,
|
|
34
|
+
body: (input) => input.workflow
|
|
35
|
+
});
|
|
36
|
+
const deleteWorkflowDefinitionForTemplate = defineRestOperation({
|
|
37
|
+
id: "delete_workflow_definition_for_template",
|
|
38
|
+
slug: "DOCUSIGN_DELETE_WORKFLOW_DEFINITION_FOR_TEMPLATE",
|
|
39
|
+
name: "Delete Workflow Definition For Template",
|
|
40
|
+
description: "Delete the workflow definition attached to a template.",
|
|
41
|
+
needsApproval: true,
|
|
42
|
+
method: "DELETE",
|
|
43
|
+
path: (ctx) => workflow(ctx.input.templateId),
|
|
44
|
+
input: tplId,
|
|
45
|
+
output: docusignSuccessSchema,
|
|
46
|
+
transformResponse: () => ({ success: true })
|
|
47
|
+
});
|
|
48
|
+
const createTemplateWorkflowStep = defineRestOperation({
|
|
49
|
+
id: "create_template_workflow_step",
|
|
50
|
+
slug: "DOCUSIGN_CREATE_TEMPLATE_WORKFLOW_STEP",
|
|
51
|
+
name: "Create Template Workflow Step",
|
|
52
|
+
description: "Add a new workflow step to a template.",
|
|
53
|
+
needsApproval: true,
|
|
54
|
+
method: "POST",
|
|
55
|
+
path: (ctx) => `${workflow(ctx.input.templateId)}/steps`,
|
|
56
|
+
input: tplId.extend({ step: docusignLooseObjectSchema() }),
|
|
57
|
+
output: docusignGenericObjectSchema,
|
|
58
|
+
body: (input) => input.step
|
|
59
|
+
});
|
|
60
|
+
const retrieveWorkflowStepForTemplate = defineRestOperation({
|
|
61
|
+
id: "retrieve_workflow_step_for_template",
|
|
62
|
+
slug: "DOCUSIGN_RETRIEVE_WORKFLOW_STEP_FOR_TEMPLATE",
|
|
63
|
+
name: "Retrieve Workflow Step For Template",
|
|
64
|
+
description: "Get a specific workflow step on a template.",
|
|
65
|
+
method: "GET",
|
|
66
|
+
path: (ctx) => step(ctx.input.templateId, ctx.input.workflowStepId),
|
|
67
|
+
input: tplStep,
|
|
68
|
+
output: docusignGenericObjectSchema
|
|
69
|
+
});
|
|
70
|
+
const updateWorkflowStepForTemplate = defineRestOperation({
|
|
71
|
+
id: "update_workflow_step_for_template",
|
|
72
|
+
slug: "DOCUSIGN_UPDATE_WORKFLOW_STEP_FOR_TEMPLATE",
|
|
73
|
+
name: "Update Workflow Step For Template",
|
|
74
|
+
description: "Update a specific workflow step on a template.",
|
|
75
|
+
needsApproval: true,
|
|
76
|
+
method: "PUT",
|
|
77
|
+
path: (ctx) => step(ctx.input.templateId, ctx.input.workflowStepId),
|
|
78
|
+
input: tplStep.extend({ step: docusignLooseObjectSchema() }),
|
|
79
|
+
output: docusignGenericObjectSchema,
|
|
80
|
+
body: (input) => input.step
|
|
81
|
+
});
|
|
82
|
+
const deleteTemplateWorkflowStep = defineRestOperation({
|
|
83
|
+
id: "delete_template_workflow_step",
|
|
84
|
+
slug: "DOCUSIGN_DELETE_TEMPLATE_WORKFLOW_STEP",
|
|
85
|
+
name: "Delete Template Workflow Step",
|
|
86
|
+
description: "Delete a specific workflow step on a template.",
|
|
87
|
+
needsApproval: true,
|
|
88
|
+
method: "DELETE",
|
|
89
|
+
path: (ctx) => step(ctx.input.templateId, ctx.input.workflowStepId),
|
|
90
|
+
input: tplStep,
|
|
91
|
+
output: docusignSuccessSchema,
|
|
92
|
+
transformResponse: () => ({ success: true })
|
|
93
|
+
});
|
|
94
|
+
const getTemplateDelayedRoutingRules = defineRestOperation({
|
|
95
|
+
id: "get_template_delayed_routing_rules",
|
|
96
|
+
slug: "DOCUSIGN_GET_TEMPLATE_DELAYED_ROUTING_RULES",
|
|
97
|
+
name: "Get Template Delayed Routing Rules",
|
|
98
|
+
description: "Get delayed routing rules for a template workflow step.",
|
|
99
|
+
method: "GET",
|
|
100
|
+
path: (ctx) => `${step(ctx.input.templateId, ctx.input.workflowStepId)}/delayedRouting`,
|
|
101
|
+
input: tplStep,
|
|
102
|
+
output: docusignGenericObjectSchema
|
|
103
|
+
});
|
|
104
|
+
const updateTemplateDelayedRoutingRules = defineRestOperation({
|
|
105
|
+
id: "update_template_delayed_routing_rules",
|
|
106
|
+
slug: "DOCUSIGN_UPDATE_TEMPLATE_DELAYED_ROUTING_RULES",
|
|
107
|
+
name: "Update Template Delayed Routing Rules",
|
|
108
|
+
description: "Update delayed routing rules for a template workflow step.",
|
|
109
|
+
needsApproval: true,
|
|
110
|
+
method: "PUT",
|
|
111
|
+
path: (ctx) => `${step(ctx.input.templateId, ctx.input.workflowStepId)}/delayedRouting`,
|
|
112
|
+
input: tplStep.extend({ rules: docusignLooseObjectSchema() }),
|
|
113
|
+
output: docusignGenericObjectSchema,
|
|
114
|
+
body: (input) => input.rules
|
|
115
|
+
});
|
|
116
|
+
const deleteDelayedRoutingRulesForTemplate = defineRestOperation({
|
|
117
|
+
id: "delete_delayed_routing_rules_for_template",
|
|
118
|
+
slug: "DOCUSIGN_DELETE_DELAYED_ROUTING_RULES_FOR_TEMPLATE",
|
|
119
|
+
name: "Delete Template Delayed Routing Rules",
|
|
120
|
+
description: "Delete delayed routing rules on a template workflow step.",
|
|
121
|
+
needsApproval: true,
|
|
122
|
+
method: "DELETE",
|
|
123
|
+
path: (ctx) => `${step(ctx.input.templateId, ctx.input.workflowStepId)}/delayedRouting`,
|
|
124
|
+
input: tplStep,
|
|
125
|
+
output: docusignSuccessSchema,
|
|
126
|
+
transformResponse: () => ({ success: true })
|
|
127
|
+
});
|
|
128
|
+
const getTemplateScheduledSendingSettings = defineRestOperation({
|
|
129
|
+
id: "get_template_scheduled_sending_settings",
|
|
130
|
+
slug: "DOCUSIGN_GET_TEMPLATE_SCHEDULED_SENDING_SETTINGS",
|
|
131
|
+
name: "Get Template Scheduled Sending Settings",
|
|
132
|
+
description: "Get scheduled sending settings on a template workflow.",
|
|
133
|
+
method: "GET",
|
|
134
|
+
path: (ctx) => `${workflow(ctx.input.templateId)}/scheduledSending`,
|
|
135
|
+
input: tplId,
|
|
136
|
+
output: docusignGenericObjectSchema
|
|
137
|
+
});
|
|
138
|
+
const updateTemplateScheduledSendingRules = defineRestOperation({
|
|
139
|
+
id: "update_template_scheduled_sending_rules",
|
|
140
|
+
slug: "DOCUSIGN_UPDATE_TEMPLATE_SCHEDULED_SENDING_RULES",
|
|
141
|
+
name: "Update Template Scheduled Sending Rules",
|
|
142
|
+
description: "Update scheduled sending rules on a template workflow.",
|
|
143
|
+
needsApproval: true,
|
|
144
|
+
method: "PUT",
|
|
145
|
+
path: (ctx) => `${workflow(ctx.input.templateId)}/scheduledSending`,
|
|
146
|
+
input: tplId.extend({ rules: docusignLooseObjectSchema() }),
|
|
147
|
+
output: docusignGenericObjectSchema,
|
|
148
|
+
body: (input) => input.rules
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
//#endregion
|
|
152
|
+
export { createTemplateWorkflowStep, deleteDelayedRoutingRulesForTemplate, deleteTemplateWorkflowStep, deleteWorkflowDefinitionForTemplate, getTemplateDelayedRoutingRules, getTemplateScheduledSendingSettings, retrieveWorkflowStepForTemplate, returnTemplateWorkflowDefinition, updateTemplateDelayedRoutingRules, updateTemplateScheduledSendingRules, updateTemplateWorkflowDefinition, updateWorkflowStepForTemplate };
|