@superpanel-sdk/runtime 0.0.1-internal.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 +35 -0
- package/bin/superpanel-sdk-runtime.mjs +22 -0
- package/dist/builder/codegen/emit.d.ts +17 -0
- package/dist/builder/codegen/emit.js +143 -0
- package/dist/builder/codegen/generate.d.ts +21 -0
- package/dist/builder/codegen/generate.js +90 -0
- package/dist/builder/compile/compile-agenda.d.ts +15 -0
- package/dist/builder/compile/compile-agenda.js +59 -0
- package/dist/builder/compile/compile-sequence.d.ts +24 -0
- package/dist/builder/compile/compile-sequence.js +121 -0
- package/dist/builder/compile/function-code.d.ts +6 -0
- package/dist/builder/compile/function-code.js +30 -0
- package/dist/builder/compile/registry.d.ts +13 -0
- package/dist/builder/compile/registry.js +42 -0
- package/dist/builder/load.d.ts +22 -0
- package/dist/builder/load.js +169 -0
- package/dist/builder/merge.d.ts +4 -0
- package/dist/builder/merge.js +19 -0
- package/dist/builder/paths.d.ts +10 -0
- package/dist/builder/paths.js +22 -0
- package/dist/builder/types.d.ts +31 -0
- package/dist/builder/types.js +2 -0
- package/dist/cli/compile/index.d.ts +4 -0
- package/dist/cli/compile/index.js +11 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +64 -0
- package/dist/cli/serve/index.d.ts +9 -0
- package/dist/cli/serve/index.js +340 -0
- package/dist/cli/type-gen/index.d.ts +5 -0
- package/dist/cli/type-gen/index.js +90 -0
- package/dist/compute-host/compute-host.d.ts +38 -0
- package/dist/compute-host/compute-host.js +45 -0
- package/dist/compute-host/index.d.ts +5 -0
- package/dist/compute-host/index.js +3 -0
- package/dist/compute-host/source-compute-host.d.ts +29 -0
- package/dist/compute-host/source-compute-host.js +72 -0
- package/dist/core/context/account-fields.d.ts +12 -0
- package/dist/core/context/account-fields.js +2 -0
- package/dist/core/context/contact.d.ts +60 -0
- package/dist/core/context/contact.js +34 -0
- package/dist/core/context/db.d.ts +69 -0
- package/dist/core/context/db.js +44 -0
- package/dist/core/context/docusign.d.ts +134 -0
- package/dist/core/context/docusign.js +108 -0
- package/dist/core/context/env.d.ts +9 -0
- package/dist/core/context/env.js +19 -0
- package/dist/core/context/filevine.d.ts +323 -0
- package/dist/core/context/filevine.js +254 -0
- package/dist/core/context/http.d.ts +9 -0
- package/dist/core/context/http.js +4 -0
- package/dist/core/context/hubspot.d.ts +250 -0
- package/dist/core/context/hubspot.js +191 -0
- package/dist/core/context/platform-registry.d.ts +67 -0
- package/dist/core/context/platform-registry.js +11 -0
- package/dist/core/context/platform.d.ts +33 -0
- package/dist/core/context/platform.js +2 -0
- package/dist/core/context/twilio.d.ts +50 -0
- package/dist/core/context/twilio.js +42 -0
- package/dist/core/context/types.d.ts +87 -0
- package/dist/core/context/types.js +9 -0
- package/dist/core/functions/define/case-context.d.ts +14 -0
- package/dist/core/functions/define/case-context.js +15 -0
- package/dist/core/functions/define/compute.d.ts +7 -0
- package/dist/core/functions/define/compute.js +17 -0
- package/dist/core/functions/define/custom.d.ts +4 -0
- package/dist/core/functions/define/custom.js +8 -0
- package/dist/core/functions/define/system.d.ts +7 -0
- package/dist/core/functions/define/system.js +12 -0
- package/dist/core/functions/func-ref.d.ts +16 -0
- package/dist/core/functions/func-ref.js +20 -0
- package/dist/core/functions/types.d.ts +78 -0
- package/dist/core/functions/types.js +5 -0
- package/dist/core/slot/compile-schema.d.ts +24 -0
- package/dist/core/slot/compile-schema.js +336 -0
- package/dist/core/slot/deps.d.ts +15 -0
- package/dist/core/slot/deps.js +88 -0
- package/dist/core/slot/derived.d.ts +32 -0
- package/dist/core/slot/derived.js +115 -0
- package/dist/core/slot/field.d.ts +36 -0
- package/dist/core/slot/field.js +97 -0
- package/dist/core/slot/id-ref.d.ts +4 -0
- package/dist/core/slot/id-ref.js +15 -0
- package/dist/core/slot/index.d.ts +15 -0
- package/dist/core/slot/index.js +14 -0
- package/dist/core/slot/path.d.ts +18 -0
- package/dist/core/slot/path.js +22 -0
- package/dist/core/slot/row.d.ts +22 -0
- package/dist/core/slot/row.js +54 -0
- package/dist/core/slot/schema.d.ts +102 -0
- package/dist/core/slot/schema.js +17 -0
- package/dist/core/slot/sf-schema.d.ts +23 -0
- package/dist/core/slot/sf-schema.js +125 -0
- package/dist/core/slot/sf-validate.d.ts +14 -0
- package/dist/core/slot/sf-validate.js +132 -0
- package/dist/core/slot/snapshot.d.ts +18 -0
- package/dist/core/slot/snapshot.js +138 -0
- package/dist/core/slot/types.d.ts +144 -0
- package/dist/core/slot/types.js +2 -0
- package/dist/core/slot/value.d.ts +9 -0
- package/dist/core/slot/value.js +97 -0
- package/dist/core/slot/write.d.ts +41 -0
- package/dist/core/slot/write.js +319 -0
- package/dist/core/stage/builders.d.ts +36 -0
- package/dist/core/stage/builders.js +28 -0
- package/dist/core/stage/condition.d.ts +17 -0
- package/dist/core/stage/condition.js +198 -0
- package/dist/core/stage/drive.d.ts +43 -0
- package/dist/core/stage/drive.js +77 -0
- package/dist/core/stage/finish-when.d.ts +20 -0
- package/dist/core/stage/finish-when.js +82 -0
- package/dist/core/stage/flatten.d.ts +27 -0
- package/dist/core/stage/flatten.js +464 -0
- package/dist/core/stage/index.d.ts +11 -0
- package/dist/core/stage/index.js +10 -0
- package/dist/core/stage/simulate.d.ts +24 -0
- package/dist/core/stage/simulate.js +33 -0
- package/dist/core/stage/transfer-fields.d.ts +14 -0
- package/dist/core/stage/transfer-fields.js +88 -0
- package/dist/core/stage/types.d.ts +177 -0
- package/dist/core/stage/types.js +2 -0
- package/dist/core/stage/validate.d.ts +11 -0
- package/dist/core/stage/validate.js +226 -0
- package/dist/core/stage/walk.d.ts +34 -0
- package/dist/core/stage/walk.js +96 -0
- package/dist/dev-overlay/protocol.d.ts +53 -0
- package/dist/dev-overlay/protocol.js +21 -0
- package/dist/fn-context/build-context.d.ts +11 -0
- package/dist/fn-context/build-context.js +21 -0
- package/dist/fn-context/fake/empty-api.d.ts +9 -0
- package/dist/fn-context/fake/empty-api.js +50 -0
- package/dist/fn-context/fake/index.d.ts +12 -0
- package/dist/fn-context/fake/index.js +22 -0
- package/dist/fn-context/index.d.ts +9 -0
- package/dist/fn-context/index.js +8 -0
- package/dist/fn-context/log.d.ts +8 -0
- package/dist/fn-context/log.js +29 -0
- package/dist/fn-context/make-ctx.d.ts +9 -0
- package/dist/fn-context/make-ctx.js +51 -0
- package/dist/fn-context/rpc/errors.d.ts +25 -0
- package/dist/fn-context/rpc/errors.js +23 -0
- package/dist/fn-context/rpc/index.d.ts +10 -0
- package/dist/fn-context/rpc/index.js +9 -0
- package/dist/fn-context/rpc/integration/index.d.ts +51 -0
- package/dist/fn-context/rpc/integration/index.js +19 -0
- package/dist/fn-context/rpc/integration/list-bindings.d.ts +21 -0
- package/dist/fn-context/rpc/integration/list-bindings.js +18 -0
- package/dist/fn-context/rpc/log.d.ts +36 -0
- package/dist/fn-context/rpc/log.js +16 -0
- package/dist/fn-context/rpc/platform.d.ts +28 -0
- package/dist/fn-context/rpc/platform.js +15 -0
- package/dist/fn-context/rpc/request-id.d.ts +5 -0
- package/dist/fn-context/rpc/request-id.js +13 -0
- package/dist/fn-context/rpc/trpc-client.d.ts +7 -0
- package/dist/fn-context/rpc/trpc-client.js +109 -0
- package/dist/fn-context/rpc/trpc-init.d.ts +17 -0
- package/dist/fn-context/rpc/trpc-init.js +17 -0
- package/dist/fn-context/rpc/trpc-router-factory.d.ts +84 -0
- package/dist/fn-context/rpc/trpc-router-factory.js +9 -0
- package/dist/fn-context/types.d.ts +17 -0
- package/dist/fn-context/types.js +2 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +34 -0
- package/dist/voice-service/actions.d.ts +20 -0
- package/dist/voice-service/actions.js +2 -0
- package/dist/voice-service/index.d.ts +3 -0
- package/dist/voice-service/index.js +3 -0
- package/dist/voice-service/types.d.ts +1010 -0
- package/dist/voice-service/types.js +16 -0
- package/package.json +55 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CONTACT_PAGE_LIMIT_MAX = 100;
|
|
3
|
+
export declare const contactSummary: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
kind: z.ZodString;
|
|
6
|
+
externalIdentifier: z.ZodNullable<z.ZodString>;
|
|
7
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
8
|
+
createdAt: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type ContactSummary = z.infer<typeof contactSummary>;
|
|
11
|
+
export declare const contactListInput: z.ZodObject<{
|
|
12
|
+
offset: z.ZodNumber;
|
|
13
|
+
limit: z.ZodNumber;
|
|
14
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
15
|
+
email: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type ContactListParams = z.infer<typeof contactListInput>;
|
|
18
|
+
export declare const contactListOutput: z.ZodObject<{
|
|
19
|
+
contacts: z.ZodArray<z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
kind: z.ZodString;
|
|
22
|
+
externalIdentifier: z.ZodNullable<z.ZodString>;
|
|
23
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
24
|
+
createdAt: z.ZodString;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
offset: z.ZodNumber;
|
|
27
|
+
limit: z.ZodNumber;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type ContactListResult = z.infer<typeof contactListOutput>;
|
|
30
|
+
/** Platform contact capability, reached from scripts as `ctx.api.contact`. */
|
|
31
|
+
export type ContactApi = {
|
|
32
|
+
list(input: ContactListParams): Promise<ContactListResult>;
|
|
33
|
+
};
|
|
34
|
+
/** Stand-in surface for fake contexts and local runs; never touches the database. */
|
|
35
|
+
export declare const contactMockService: ContactApi;
|
|
36
|
+
export declare const contactSurface: {
|
|
37
|
+
methods: {
|
|
38
|
+
list: {
|
|
39
|
+
input: z.ZodObject<{
|
|
40
|
+
offset: z.ZodNumber;
|
|
41
|
+
limit: z.ZodNumber;
|
|
42
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
43
|
+
email: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
output: z.ZodObject<{
|
|
46
|
+
contacts: z.ZodArray<z.ZodObject<{
|
|
47
|
+
id: z.ZodString;
|
|
48
|
+
kind: z.ZodString;
|
|
49
|
+
externalIdentifier: z.ZodNullable<z.ZodString>;
|
|
50
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
51
|
+
createdAt: z.ZodString;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
offset: z.ZodNumber;
|
|
54
|
+
limit: z.ZodNumber;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
mock: ContactApi;
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=contact.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const CONTACT_PAGE_LIMIT_MAX = 100;
|
|
3
|
+
export const contactSummary = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
kind: z.string(),
|
|
6
|
+
externalIdentifier: z.string().nullable(),
|
|
7
|
+
phone: z.string().nullable(),
|
|
8
|
+
createdAt: z.string(),
|
|
9
|
+
});
|
|
10
|
+
// Paging is required so a caller can never fetch an unbounded page by omission.
|
|
11
|
+
export const contactListInput = z.object({
|
|
12
|
+
offset: z.number().int().min(0),
|
|
13
|
+
limit: z.number().int().min(1).max(CONTACT_PAGE_LIMIT_MAX),
|
|
14
|
+
phone: z.string().optional(),
|
|
15
|
+
email: z.string().optional(),
|
|
16
|
+
});
|
|
17
|
+
export const contactListOutput = z.object({
|
|
18
|
+
contacts: z.array(contactSummary),
|
|
19
|
+
offset: z.number().int(),
|
|
20
|
+
limit: z.number().int(),
|
|
21
|
+
});
|
|
22
|
+
/** Stand-in surface for fake contexts and local runs; never touches the database. */
|
|
23
|
+
export const contactMockService = {
|
|
24
|
+
async list(input) {
|
|
25
|
+
return { contacts: [], offset: input.offset, limit: input.limit };
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export const contactSurface = {
|
|
29
|
+
methods: {
|
|
30
|
+
list: { input: contactListInput, output: contactListOutput },
|
|
31
|
+
},
|
|
32
|
+
mock: contactMockService,
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=contact.js.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const KV_KEY_MAX = 512;
|
|
3
|
+
export declare const KV_VALUE_MAX = 65536;
|
|
4
|
+
export declare const KV_TTL_SECONDS_MAX: number;
|
|
5
|
+
export declare const dbGetInput: z.ZodObject<{
|
|
6
|
+
key: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type DbGetInput = z.infer<typeof dbGetInput>;
|
|
9
|
+
export declare const dbGetOutput: z.ZodObject<{
|
|
10
|
+
value: z.ZodNullable<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type DbGetOutput = z.infer<typeof dbGetOutput>;
|
|
13
|
+
export declare const dbSetInput: z.ZodObject<{
|
|
14
|
+
key: z.ZodString;
|
|
15
|
+
value: z.ZodString;
|
|
16
|
+
ttlSeconds: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type DbSetInput = z.infer<typeof dbSetInput>;
|
|
19
|
+
export declare const dbSetOutput: z.ZodObject<{
|
|
20
|
+
ok: z.ZodLiteral<true>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type DbSetOutput = z.infer<typeof dbSetOutput>;
|
|
23
|
+
export declare const dbDelInput: z.ZodObject<{
|
|
24
|
+
key: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type DbDelInput = z.infer<typeof dbDelInput>;
|
|
27
|
+
export declare const dbDelOutput: z.ZodObject<{
|
|
28
|
+
deleted: z.ZodBoolean;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type DbDelOutput = z.infer<typeof dbDelOutput>;
|
|
31
|
+
/** Platform KV, reached from scripts as `ctx.api.db`. */
|
|
32
|
+
export type DbApi = {
|
|
33
|
+
get(input: DbGetInput): Promise<DbGetOutput>;
|
|
34
|
+
set(input: DbSetInput): Promise<DbSetOutput>;
|
|
35
|
+
del(input: DbDelInput): Promise<DbDelOutput>;
|
|
36
|
+
};
|
|
37
|
+
export declare const dbMockService: DbApi;
|
|
38
|
+
export declare const dbSurface: {
|
|
39
|
+
methods: {
|
|
40
|
+
get: {
|
|
41
|
+
input: z.ZodObject<{
|
|
42
|
+
key: z.ZodString;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
output: z.ZodObject<{
|
|
45
|
+
value: z.ZodNullable<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
};
|
|
48
|
+
set: {
|
|
49
|
+
input: z.ZodObject<{
|
|
50
|
+
key: z.ZodString;
|
|
51
|
+
value: z.ZodString;
|
|
52
|
+
ttlSeconds: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
output: z.ZodObject<{
|
|
55
|
+
ok: z.ZodLiteral<true>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
};
|
|
58
|
+
del: {
|
|
59
|
+
input: z.ZodObject<{
|
|
60
|
+
key: z.ZodString;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
output: z.ZodObject<{
|
|
63
|
+
deleted: z.ZodBoolean;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
mock: DbApi;
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=db.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const KV_KEY_MAX = 512;
|
|
3
|
+
export const KV_VALUE_MAX = 65_536;
|
|
4
|
+
export const KV_TTL_SECONDS_MAX = 60 * 60 * 24 * 365 * 5;
|
|
5
|
+
export const dbGetInput = z.object({
|
|
6
|
+
key: z.string().min(1).max(KV_KEY_MAX),
|
|
7
|
+
});
|
|
8
|
+
export const dbGetOutput = z.object({
|
|
9
|
+
value: z.string().nullable(),
|
|
10
|
+
});
|
|
11
|
+
export const dbSetInput = z.object({
|
|
12
|
+
key: z.string().min(1).max(KV_KEY_MAX),
|
|
13
|
+
value: z.string().max(KV_VALUE_MAX),
|
|
14
|
+
ttlSeconds: z.number().int().min(1).max(KV_TTL_SECONDS_MAX).optional(),
|
|
15
|
+
});
|
|
16
|
+
export const dbSetOutput = z.object({
|
|
17
|
+
ok: z.literal(true),
|
|
18
|
+
});
|
|
19
|
+
export const dbDelInput = z.object({
|
|
20
|
+
key: z.string().min(1).max(KV_KEY_MAX),
|
|
21
|
+
});
|
|
22
|
+
export const dbDelOutput = z.object({
|
|
23
|
+
deleted: z.boolean(),
|
|
24
|
+
});
|
|
25
|
+
export const dbMockService = {
|
|
26
|
+
async get() {
|
|
27
|
+
return { value: null };
|
|
28
|
+
},
|
|
29
|
+
async set() {
|
|
30
|
+
return { ok: true };
|
|
31
|
+
},
|
|
32
|
+
async del() {
|
|
33
|
+
return { deleted: false };
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
export const dbSurface = {
|
|
37
|
+
methods: {
|
|
38
|
+
get: { input: dbGetInput, output: dbGetOutput },
|
|
39
|
+
set: { input: dbSetInput, output: dbSetOutput },
|
|
40
|
+
del: { input: dbDelInput, output: dbDelOutput },
|
|
41
|
+
},
|
|
42
|
+
mock: dbMockService,
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=db.js.map
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { IntegrationAccountFields } from './account-fields.js';
|
|
3
|
+
export declare const docusignListTemplatesOutput: z.ZodArray<z.ZodObject<{
|
|
4
|
+
templateId: z.ZodString;
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>>;
|
|
8
|
+
export type DocusignListTemplatesOutput = z.infer<typeof docusignListTemplatesOutput>;
|
|
9
|
+
export declare const docusignCreateEnvelopeFromTemplateInput: z.ZodObject<{
|
|
10
|
+
templateId: z.ZodString;
|
|
11
|
+
signerEmail: z.ZodString;
|
|
12
|
+
signerName: z.ZodString;
|
|
13
|
+
roleName: z.ZodOptional<z.ZodString>;
|
|
14
|
+
clientUserId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
16
|
+
emailSubject: z.ZodOptional<z.ZodString>;
|
|
17
|
+
emailBlurb: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type DocusignCreateEnvelopeFromTemplateInput = z.infer<typeof docusignCreateEnvelopeFromTemplateInput>;
|
|
20
|
+
export declare const docusignCreateEnvelopeFromTemplateOutput: z.ZodObject<{
|
|
21
|
+
envelopeId: z.ZodString;
|
|
22
|
+
status: z.ZodOptional<z.ZodString>;
|
|
23
|
+
statusDateTime: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type DocusignCreateEnvelopeFromTemplateOutput = z.infer<typeof docusignCreateEnvelopeFromTemplateOutput>;
|
|
26
|
+
export declare const docusignCreateRecipientViewFromTemplateInput: z.ZodObject<{
|
|
27
|
+
templateId: z.ZodString;
|
|
28
|
+
signerEmail: z.ZodString;
|
|
29
|
+
signerName: z.ZodString;
|
|
30
|
+
returnUrl: z.ZodString;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type DocusignCreateRecipientViewFromTemplateInput = z.infer<typeof docusignCreateRecipientViewFromTemplateInput>;
|
|
33
|
+
export declare const docusignCreateRecipientViewFromTemplateOutput: z.ZodObject<{
|
|
34
|
+
envelopeId: z.ZodString;
|
|
35
|
+
url: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type DocusignCreateRecipientViewFromTemplateOutput = z.infer<typeof docusignCreateRecipientViewFromTemplateOutput>;
|
|
38
|
+
export declare const docusignEnvelopeIdInput: z.ZodObject<{
|
|
39
|
+
envelopeId: z.ZodString;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type DocusignEnvelopeIdInput = z.infer<typeof docusignEnvelopeIdInput>;
|
|
42
|
+
export declare const docusignGetEnvelopeStatusOutput: z.ZodObject<{
|
|
43
|
+
envelopeId: z.ZodString;
|
|
44
|
+
status: z.ZodOptional<z.ZodString>;
|
|
45
|
+
statusDateTime: z.ZodOptional<z.ZodString>;
|
|
46
|
+
emailSubject: z.ZodOptional<z.ZodString>;
|
|
47
|
+
sentDateTime: z.ZodOptional<z.ZodString>;
|
|
48
|
+
completedDateTime: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export type DocusignGetEnvelopeStatusOutput = z.infer<typeof docusignGetEnvelopeStatusOutput>;
|
|
51
|
+
export declare const docusignGetEnvelopeSigningStatusOutput: z.ZodObject<{
|
|
52
|
+
envelopeId: z.ZodString;
|
|
53
|
+
status: z.ZodOptional<z.ZodString>;
|
|
54
|
+
signed: z.ZodBoolean;
|
|
55
|
+
completedDateTime: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type DocusignGetEnvelopeSigningStatusOutput = z.infer<typeof docusignGetEnvelopeSigningStatusOutput>;
|
|
58
|
+
export declare const docusignRecipient: z.ZodObject<{
|
|
59
|
+
recipientId: z.ZodOptional<z.ZodString>;
|
|
60
|
+
email: z.ZodOptional<z.ZodString>;
|
|
61
|
+
name: z.ZodOptional<z.ZodString>;
|
|
62
|
+
status: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export type DocusignRecipient = z.infer<typeof docusignRecipient>;
|
|
65
|
+
export declare const docusignGetEnvelopeRecipientsOutput: z.ZodObject<{
|
|
66
|
+
signers: z.ZodArray<z.ZodObject<{
|
|
67
|
+
recipientId: z.ZodOptional<z.ZodString>;
|
|
68
|
+
email: z.ZodOptional<z.ZodString>;
|
|
69
|
+
name: z.ZodOptional<z.ZodString>;
|
|
70
|
+
status: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export type DocusignGetEnvelopeRecipientsOutput = z.infer<typeof docusignGetEnvelopeRecipientsOutput>;
|
|
74
|
+
export declare const docusignListRecentEnvelopesInput: z.ZodObject<{
|
|
75
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export type DocusignListRecentEnvelopesInput = z.infer<typeof docusignListRecentEnvelopesInput>;
|
|
78
|
+
export declare const docusignRecentEnvelope: z.ZodObject<{
|
|
79
|
+
envelopeId: z.ZodString;
|
|
80
|
+
status: z.ZodOptional<z.ZodString>;
|
|
81
|
+
statusDateTime: z.ZodOptional<z.ZodString>;
|
|
82
|
+
sentDateTime: z.ZodOptional<z.ZodString>;
|
|
83
|
+
completedDateTime: z.ZodOptional<z.ZodString>;
|
|
84
|
+
emailSubject: z.ZodOptional<z.ZodString>;
|
|
85
|
+
recipients: z.ZodArray<z.ZodObject<{
|
|
86
|
+
email: z.ZodOptional<z.ZodString>;
|
|
87
|
+
name: z.ZodOptional<z.ZodString>;
|
|
88
|
+
status: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export type DocusignRecentEnvelope = z.infer<typeof docusignRecentEnvelope>;
|
|
92
|
+
export declare const docusignListRecentEnvelopesOutput: z.ZodArray<z.ZodObject<{
|
|
93
|
+
envelopeId: z.ZodString;
|
|
94
|
+
status: z.ZodOptional<z.ZodString>;
|
|
95
|
+
statusDateTime: z.ZodOptional<z.ZodString>;
|
|
96
|
+
sentDateTime: z.ZodOptional<z.ZodString>;
|
|
97
|
+
completedDateTime: z.ZodOptional<z.ZodString>;
|
|
98
|
+
emailSubject: z.ZodOptional<z.ZodString>;
|
|
99
|
+
recipients: z.ZodArray<z.ZodObject<{
|
|
100
|
+
email: z.ZodOptional<z.ZodString>;
|
|
101
|
+
name: z.ZodOptional<z.ZodString>;
|
|
102
|
+
status: z.ZodOptional<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
export type DocusignListRecentEnvelopesOutput = z.infer<typeof docusignListRecentEnvelopesOutput>;
|
|
106
|
+
export declare const docusignSearchEnvelopesByEmailInput: z.ZodObject<{
|
|
107
|
+
email: z.ZodString;
|
|
108
|
+
fromDate: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type DocusignSearchEnvelopesByEmailInput = z.infer<typeof docusignSearchEnvelopesByEmailInput>;
|
|
111
|
+
export declare const docusignSearchEnvelopesByEmailOutput: z.ZodObject<{
|
|
112
|
+
envelopes: z.ZodArray<z.ZodObject<{
|
|
113
|
+
envelopeId: z.ZodString;
|
|
114
|
+
status: z.ZodOptional<z.ZodString>;
|
|
115
|
+
statusDateTime: z.ZodOptional<z.ZodString>;
|
|
116
|
+
emailSubject: z.ZodOptional<z.ZodString>;
|
|
117
|
+
sentDateTime: z.ZodOptional<z.ZodString>;
|
|
118
|
+
completedDateTime: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
export type DocusignSearchEnvelopesByEmailOutput = z.infer<typeof docusignSearchEnvelopesByEmailOutput>;
|
|
122
|
+
export type DocusignService = {
|
|
123
|
+
listTemplates(): Promise<DocusignListTemplatesOutput>;
|
|
124
|
+
createEnvelopeFromTemplate(input: DocusignCreateEnvelopeFromTemplateInput): Promise<DocusignCreateEnvelopeFromTemplateOutput>;
|
|
125
|
+
createRecipientViewFromTemplate(input: DocusignCreateRecipientViewFromTemplateInput): Promise<DocusignCreateRecipientViewFromTemplateOutput>;
|
|
126
|
+
getEnvelopeStatus(input: DocusignEnvelopeIdInput): Promise<DocusignGetEnvelopeStatusOutput>;
|
|
127
|
+
getEnvelopeSigningStatus(input: DocusignEnvelopeIdInput): Promise<DocusignGetEnvelopeSigningStatusOutput>;
|
|
128
|
+
getEnvelopeRecipients(input: DocusignEnvelopeIdInput): Promise<DocusignGetEnvelopeRecipientsOutput>;
|
|
129
|
+
listRecentEnvelopes(input: DocusignListRecentEnvelopesInput): Promise<DocusignListRecentEnvelopesOutput>;
|
|
130
|
+
searchEnvelopesByEmail(input: DocusignSearchEnvelopesByEmailInput): Promise<DocusignSearchEnvelopesByEmailOutput>;
|
|
131
|
+
};
|
|
132
|
+
export declare const docusignMockService: DocusignService;
|
|
133
|
+
export type DocusignApi = IntegrationAccountFields & DocusignService;
|
|
134
|
+
//# sourceMappingURL=docusign.d.ts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const docusignListTemplatesOutput = z.array(z.object({
|
|
3
|
+
templateId: z.string(),
|
|
4
|
+
name: z.string().optional(),
|
|
5
|
+
description: z.string().optional(),
|
|
6
|
+
}));
|
|
7
|
+
export const docusignCreateEnvelopeFromTemplateInput = z.object({
|
|
8
|
+
templateId: z.string(),
|
|
9
|
+
signerEmail: z.string(),
|
|
10
|
+
signerName: z.string(),
|
|
11
|
+
roleName: z.string().optional(),
|
|
12
|
+
clientUserId: z.string().optional(),
|
|
13
|
+
additionalFields: z.record(z.string(), z.string()).optional(),
|
|
14
|
+
emailSubject: z.string().optional(),
|
|
15
|
+
emailBlurb: z.string().optional(),
|
|
16
|
+
});
|
|
17
|
+
export const docusignCreateEnvelopeFromTemplateOutput = z.object({
|
|
18
|
+
envelopeId: z.string(),
|
|
19
|
+
status: z.string().optional(),
|
|
20
|
+
statusDateTime: z.string().optional(),
|
|
21
|
+
});
|
|
22
|
+
export const docusignCreateRecipientViewFromTemplateInput = z.object({
|
|
23
|
+
templateId: z.string(),
|
|
24
|
+
signerEmail: z.string(),
|
|
25
|
+
signerName: z.string(),
|
|
26
|
+
returnUrl: z.string(),
|
|
27
|
+
});
|
|
28
|
+
export const docusignCreateRecipientViewFromTemplateOutput = z.object({
|
|
29
|
+
envelopeId: z.string(),
|
|
30
|
+
url: z.string(),
|
|
31
|
+
});
|
|
32
|
+
export const docusignEnvelopeIdInput = z.object({
|
|
33
|
+
envelopeId: z.string(),
|
|
34
|
+
});
|
|
35
|
+
export const docusignGetEnvelopeStatusOutput = z.object({
|
|
36
|
+
envelopeId: z.string(),
|
|
37
|
+
status: z.string().optional(),
|
|
38
|
+
statusDateTime: z.string().optional(),
|
|
39
|
+
emailSubject: z.string().optional(),
|
|
40
|
+
sentDateTime: z.string().optional(),
|
|
41
|
+
completedDateTime: z.string().optional(),
|
|
42
|
+
});
|
|
43
|
+
export const docusignGetEnvelopeSigningStatusOutput = z.object({
|
|
44
|
+
envelopeId: z.string(),
|
|
45
|
+
status: z.string().optional(),
|
|
46
|
+
signed: z.boolean(),
|
|
47
|
+
completedDateTime: z.string().optional(),
|
|
48
|
+
});
|
|
49
|
+
export const docusignRecipient = z.object({
|
|
50
|
+
recipientId: z.string().optional(),
|
|
51
|
+
email: z.string().optional(),
|
|
52
|
+
name: z.string().optional(),
|
|
53
|
+
status: z.string().optional(),
|
|
54
|
+
});
|
|
55
|
+
export const docusignGetEnvelopeRecipientsOutput = z.object({
|
|
56
|
+
signers: z.array(docusignRecipient),
|
|
57
|
+
});
|
|
58
|
+
export const docusignListRecentEnvelopesInput = z.object({
|
|
59
|
+
limit: z.number().optional(),
|
|
60
|
+
});
|
|
61
|
+
export const docusignRecentEnvelope = z.object({
|
|
62
|
+
envelopeId: z.string(),
|
|
63
|
+
status: z.string().optional(),
|
|
64
|
+
statusDateTime: z.string().optional(),
|
|
65
|
+
sentDateTime: z.string().optional(),
|
|
66
|
+
completedDateTime: z.string().optional(),
|
|
67
|
+
emailSubject: z.string().optional(),
|
|
68
|
+
recipients: z.array(z.object({
|
|
69
|
+
email: z.string().optional(),
|
|
70
|
+
name: z.string().optional(),
|
|
71
|
+
status: z.string().optional(),
|
|
72
|
+
})),
|
|
73
|
+
});
|
|
74
|
+
export const docusignListRecentEnvelopesOutput = z.array(docusignRecentEnvelope);
|
|
75
|
+
export const docusignSearchEnvelopesByEmailInput = z.object({
|
|
76
|
+
email: z.string(),
|
|
77
|
+
fromDate: z.string().optional(),
|
|
78
|
+
});
|
|
79
|
+
export const docusignSearchEnvelopesByEmailOutput = z.object({
|
|
80
|
+
envelopes: z.array(docusignGetEnvelopeStatusOutput),
|
|
81
|
+
});
|
|
82
|
+
export const docusignMockService = {
|
|
83
|
+
async listTemplates() {
|
|
84
|
+
return [];
|
|
85
|
+
},
|
|
86
|
+
async createEnvelopeFromTemplate() {
|
|
87
|
+
return { envelopeId: 'mock-ds-envelope', status: 'sent' };
|
|
88
|
+
},
|
|
89
|
+
async createRecipientViewFromTemplate() {
|
|
90
|
+
return { envelopeId: 'mock-ds-envelope', url: 'https://demo.docusign.net/signing/mock' };
|
|
91
|
+
},
|
|
92
|
+
async getEnvelopeStatus() {
|
|
93
|
+
return { envelopeId: 'mock-ds-envelope', status: 'sent' };
|
|
94
|
+
},
|
|
95
|
+
async getEnvelopeSigningStatus() {
|
|
96
|
+
return { envelopeId: 'mock-ds-envelope', status: 'sent', signed: false };
|
|
97
|
+
},
|
|
98
|
+
async getEnvelopeRecipients() {
|
|
99
|
+
return { signers: [] };
|
|
100
|
+
},
|
|
101
|
+
async listRecentEnvelopes() {
|
|
102
|
+
return [];
|
|
103
|
+
},
|
|
104
|
+
async searchEnvelopesByEmail() {
|
|
105
|
+
return { envelopes: [] };
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=docusign.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IntegrationAccountFields } from './account-fields.js';
|
|
2
|
+
export declare function readEnvGet(credentials: Record<string, unknown>, key: string): unknown;
|
|
3
|
+
export type EnvService = {
|
|
4
|
+
get<T = unknown>(key: string): T | null;
|
|
5
|
+
};
|
|
6
|
+
export declare function bindEnvService<T extends IntegrationAccountFields>(account: T): T & EnvService;
|
|
7
|
+
export declare const envMockService: EnvService;
|
|
8
|
+
export type EnvApi = IntegrationAccountFields & EnvService;
|
|
9
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function readEnvGet(credentials, key) {
|
|
2
|
+
if (!Object.hasOwn(credentials, key))
|
|
3
|
+
return null;
|
|
4
|
+
const value = credentials[key];
|
|
5
|
+
return value === undefined ? null : value;
|
|
6
|
+
}
|
|
7
|
+
export function bindEnvService(account) {
|
|
8
|
+
return Object.assign(account, {
|
|
9
|
+
get(key) {
|
|
10
|
+
return readEnvGet(account.credentials, key);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export const envMockService = {
|
|
15
|
+
get(key) {
|
|
16
|
+
return readEnvGet(this.credentials, key);
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=env.js.map
|