@superpanel-sdk/runtime 0.2.3 → 0.5.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.
- package/README.md +28 -8
- package/dist/builder/codegen/emit.d.ts +29 -11
- package/dist/builder/codegen/emit.js +328 -61
- package/dist/builder/codegen/generate.d.ts +21 -0
- package/dist/builder/codegen/generate.js +152 -20
- package/dist/builder/company-import-graph.d.ts +2 -0
- package/dist/builder/company-import-graph.js +40 -8
- package/dist/builder/company-imports.d.ts +24 -0
- package/dist/builder/company-imports.js +114 -0
- package/dist/builder/compile/compile-sequence.d.ts +59 -8
- package/dist/builder/compile/compile-sequence.js +279 -77
- package/dist/builder/compile/function-code.d.ts +12 -2
- package/dist/builder/compile/function-code.js +87 -39
- package/dist/builder/compile/registry.d.ts +7 -3
- package/dist/builder/compile/registry.js +24 -23
- package/dist/builder/load.d.ts +70 -10
- package/dist/builder/load.js +250 -61
- package/dist/builder/paths.d.ts +3 -0
- package/dist/builder/paths.js +16 -0
- package/dist/builder/schedules.d.ts +23 -0
- package/dist/builder/schedules.js +102 -0
- package/dist/builder/slot-schema-validation.d.ts +4 -0
- package/dist/builder/slot-schema-validation.js +10 -0
- package/dist/builder/typecheck.d.ts +8 -0
- package/dist/builder/typecheck.js +105 -0
- package/dist/builder/types.d.ts +91 -19
- package/dist/builder/types.js +2 -1
- package/dist/cli/auth/auth.d.ts +37 -0
- package/dist/cli/auth/auth.js +211 -0
- package/dist/cli/auth/backend-url.d.ts +5 -0
- package/dist/cli/auth/backend-url.js +25 -0
- package/dist/cli/auth/clipboard.d.ts +9 -0
- package/dist/cli/auth/clipboard.js +38 -0
- package/dist/cli/auth/http.d.ts +20 -0
- package/dist/cli/auth/http.js +27 -0
- package/dist/cli/auth/index.d.ts +10 -0
- package/dist/cli/auth/index.js +27 -0
- package/dist/cli/auth/progress.d.ts +12 -0
- package/dist/cli/auth/progress.js +15 -0
- package/dist/cli/auth/serve-login.d.ts +8 -0
- package/dist/cli/auth/serve-login.js +24 -0
- package/dist/cli/compile/index.js +3 -0
- package/dist/cli/config.d.ts +10 -0
- package/dist/cli/config.js +52 -0
- package/dist/cli/index.js +28 -8
- package/dist/cli/serve/index.d.ts +73 -3
- package/dist/cli/serve/index.js +365 -116
- package/dist/cli/type-gen/index.js +9 -8
- package/dist/compiler.d.ts +7 -0
- package/dist/compiler.js +7 -0
- package/dist/compute-host/compute-host.d.ts +15 -23
- package/dist/compute-host/compute-host.js +25 -28
- package/dist/compute-host/index.d.ts +2 -4
- package/dist/compute-host/index.js +1 -2
- package/dist/compute-host/source-compute-host.d.ts +11 -9
- package/dist/compute-host/source-compute-host.js +46 -32
- package/dist/core/case-orchestrator/contact-hours.d.ts +50 -0
- package/dist/core/case-orchestrator/contact-hours.js +108 -0
- package/dist/core/case-orchestrator/follow-ups.d.ts +31 -0
- package/dist/core/case-orchestrator/follow-ups.js +103 -0
- package/dist/core/case-orchestrator/index.d.ts +6 -0
- package/dist/core/case-orchestrator/index.js +6 -0
- package/dist/core/case-orchestrator/render.d.ts +75 -0
- package/dist/core/case-orchestrator/render.js +239 -0
- package/dist/core/case-orchestrator/time.d.ts +11 -0
- package/dist/core/case-orchestrator/time.js +29 -0
- package/dist/core/case-orchestrator/tools.d.ts +29 -0
- package/dist/core/case-orchestrator/tools.js +31 -0
- package/dist/core/case-orchestrator/types.d.ts +753 -0
- package/dist/core/case-orchestrator/types.js +46 -0
- package/dist/core/case-orchestrator/validate.d.ts +11 -0
- package/dist/core/case-orchestrator/validate.js +63 -0
- package/dist/core/context/call.d.ts +291 -0
- package/dist/core/context/call.js +94 -0
- package/dist/core/context/channels.d.ts +60 -0
- package/dist/core/context/channels.js +35 -0
- package/dist/core/context/contact.d.ts +96 -6
- package/dist/core/context/contact.js +48 -2
- package/dist/core/context/email-message.d.ts +159 -0
- package/dist/core/context/email-message.js +59 -0
- package/dist/core/context/email.d.ts +97 -0
- package/dist/core/context/email.js +91 -0
- package/dist/core/context/exchanges.d.ts +142 -0
- package/dist/core/context/exchanges.js +63 -0
- package/dist/core/context/instances.d.ts +278 -0
- package/dist/core/context/instances.js +123 -0
- package/dist/core/context/kv.d.ts +113 -0
- package/dist/core/context/kv.js +60 -0
- package/dist/core/context/platform-registry.d.ts +509 -4
- package/dist/core/context/platform-registry.js +14 -2
- package/dist/core/context/platform.d.ts +2 -1
- package/dist/core/context/sms.d.ts +147 -0
- package/dist/core/context/sms.js +57 -0
- package/dist/core/context/types.d.ts +51 -48
- package/dist/core/context/types.js +1 -7
- package/dist/core/conversation/index.d.ts +31 -0
- package/dist/core/conversation/index.js +14 -0
- package/dist/core/functions/define/bind.d.ts +25 -0
- package/dist/core/functions/define/bind.js +14 -0
- package/dist/core/functions/define/case.d.ts +9 -0
- package/dist/core/functions/define/case.js +13 -0
- package/dist/core/functions/define/events.d.ts +20 -0
- package/dist/core/functions/define/events.js +21 -0
- package/dist/core/functions/define/no-case.d.ts +4 -0
- package/dist/core/functions/define/no-case.js +9 -0
- package/dist/core/functions/events.d.ts +247 -0
- package/dist/core/functions/events.js +32 -0
- package/dist/core/functions/func-ref.d.ts +11 -2
- package/dist/core/functions/schedules.d.ts +51 -0
- package/dist/core/functions/schedules.js +20 -0
- package/dist/core/functions/types.d.ts +62 -51
- package/dist/core/functions/types.js +6 -1
- package/dist/core/office-hours/index.d.ts +39 -0
- package/dist/core/office-hours/index.js +187 -0
- package/dist/core/page/define.d.ts +834 -0
- package/dist/core/page/define.js +477 -0
- package/dist/core/page/ops.d.ts +58 -0
- package/dist/core/page/ops.js +220 -0
- package/dist/core/page/render.d.ts +253 -0
- package/dist/core/page/render.js +840 -0
- package/dist/core/page/time-format.d.ts +19 -0
- package/dist/core/page/time-format.js +41 -0
- package/dist/core/page/timeline.d.ts +40 -0
- package/dist/core/page/timeline.js +2 -0
- package/dist/core/page/typed.d.ts +642 -0
- package/dist/core/page/typed.js +2 -0
- package/dist/core/page/workspace.d.ts +33 -0
- package/dist/core/page/workspace.js +231 -0
- package/dist/core/party/index.d.ts +3 -0
- package/dist/core/party/index.js +3 -0
- package/dist/core/party/schema.d.ts +137 -0
- package/dist/core/party/schema.js +80 -0
- package/dist/core/party/types.d.ts +40 -0
- package/dist/core/party/types.js +15 -0
- package/dist/core/sequence/define.d.ts +57 -0
- package/dist/core/sequence/define.js +10 -0
- package/dist/core/sequence/index.d.ts +63 -0
- package/dist/core/sequence/index.js +231 -0
- package/dist/core/slot/binding.d.ts +40 -0
- package/dist/core/slot/binding.js +2 -0
- package/dist/core/slot/company-metadata.d.ts +113 -0
- package/dist/core/slot/company-metadata.js +563 -0
- package/dist/core/slot/compile-schema.d.ts +19 -13
- package/dist/core/slot/compile-schema.js +51 -248
- package/dist/core/slot/contact-timezone.d.ts +110 -0
- package/dist/core/slot/contact-timezone.js +186 -0
- package/dist/core/slot/field.d.ts +2 -24
- package/dist/core/slot/field.js +0 -69
- package/dist/core/slot/id-ref.d.ts +17 -2
- package/dist/core/slot/id-ref.js +16 -8
- package/dist/core/slot/index.d.ts +12 -13
- package/dist/core/slot/index.js +11 -12
- package/dist/core/slot/naming.d.ts +15 -0
- package/dist/core/slot/naming.js +96 -0
- package/dist/core/slot/platform-fields.d.ts +119 -0
- package/dist/core/slot/platform-fields.js +121 -0
- package/dist/core/slot/ref.d.ts +16 -0
- package/dist/core/slot/ref.js +14 -0
- package/dist/core/slot/row.d.ts +2 -9
- package/dist/core/slot/row.js +13 -23
- package/dist/core/slot/schema-compat.d.ts +16 -0
- package/dist/core/slot/schema-compat.js +112 -0
- package/dist/core/slot/schema.d.ts +409 -76
- package/dist/core/slot/schema.js +178 -10
- package/dist/core/slot/types.d.ts +27 -94
- package/dist/core/slot/value.d.ts +26 -3
- package/dist/core/slot/value.js +89 -57
- package/dist/dev-overlay/protocol.d.ts +41 -8
- package/dist/fn-context/build-context.d.ts +3 -1
- package/dist/fn-context/build-context.js +20 -10
- package/dist/fn-context/fake/empty-api.js +9 -28
- package/dist/fn-context/fake/index.d.ts +11 -4
- package/dist/fn-context/fake/index.js +27 -2
- package/dist/fn-context/fn-params.d.ts +6 -0
- package/dist/fn-context/fn-params.js +13 -0
- package/dist/fn-context/index.d.ts +5 -5
- package/dist/fn-context/index.js +4 -4
- package/dist/fn-context/log.js +2 -2
- package/dist/fn-context/make-ctx.d.ts +11 -0
- package/dist/fn-context/make-ctx.js +18 -8
- package/dist/fn-context/rpc/case-orchestrator-tools.d.ts +24 -0
- package/dist/fn-context/rpc/case-orchestrator-tools.js +13 -0
- package/dist/fn-context/rpc/index.d.ts +3 -1
- package/dist/fn-context/rpc/index.js +3 -1
- package/dist/fn-context/rpc/integration/index.d.ts +4 -4
- package/dist/fn-context/rpc/integration/index.js +1 -1
- package/dist/fn-context/rpc/integration/list-surfaces.d.ts +21 -0
- package/dist/fn-context/rpc/integration/{list-bindings.js → list-surfaces.js} +4 -4
- package/dist/fn-context/rpc/platform.d.ts +2 -2
- package/dist/fn-context/rpc/platform.js +1 -1
- package/dist/fn-context/rpc/records.d.ts +78 -0
- package/dist/fn-context/rpc/records.js +26 -0
- package/dist/fn-context/rpc/trpc-client.d.ts +2 -2
- package/dist/fn-context/rpc/trpc-client.js +88 -7
- package/dist/fn-context/rpc/trpc-init.d.ts +2 -2
- package/dist/fn-context/rpc/trpc-router-factory.d.ts +49 -3
- package/dist/fn-context/rpc/trpc-router-factory.js +2 -0
- package/dist/fn-context/run-scope.d.ts +4 -0
- package/dist/fn-context/run-scope.js +9 -0
- package/dist/fn-context/types.d.ts +36 -3
- package/dist/index.d.ts +37 -46
- package/dist/index.js +33 -33
- package/dist/logger.d.ts +7 -0
- package/dist/logger.js +41 -0
- package/dist/platform.d.ts +76 -0
- package/dist/platform.js +56 -0
- package/dist/voice-service/actions.d.ts +71 -4
- package/dist/voice-service/types.d.ts +42 -5
- package/dist/worker.d.ts +10 -0
- package/dist/worker.js +10 -0
- package/package.json +38 -19
- package/dist/builder/compile/compile-agenda.d.ts +0 -15
- package/dist/builder/compile/compile-agenda.js +0 -64
- package/dist/builder/merge.d.ts +0 -4
- package/dist/builder/merge.js +0 -19
- package/dist/compute-host/read-only-cache.d.ts +0 -20
- package/dist/compute-host/read-only-cache.js +0 -61
- package/dist/core/context/db.d.ts +0 -69
- package/dist/core/context/db.js +0 -44
- package/dist/core/context/docusign.d.ts +0 -134
- package/dist/core/context/docusign.js +0 -108
- package/dist/core/context/filevine.d.ts +0 -323
- package/dist/core/context/filevine.js +0 -254
- package/dist/core/context/http.d.ts +0 -9
- package/dist/core/context/http.js +0 -4
- package/dist/core/context/hubspot.d.ts +0 -250
- package/dist/core/context/hubspot.js +0 -191
- package/dist/core/context/twilio.d.ts +0 -50
- package/dist/core/context/twilio.js +0 -42
- package/dist/core/functions/define/case-context.d.ts +0 -14
- package/dist/core/functions/define/case-context.js +0 -15
- package/dist/core/functions/define/compute.d.ts +0 -7
- package/dist/core/functions/define/compute.js +0 -17
- package/dist/core/functions/define/custom.d.ts +0 -4
- package/dist/core/functions/define/custom.js +0 -8
- package/dist/core/functions/define/system.d.ts +0 -7
- package/dist/core/functions/define/system.js +0 -12
- package/dist/core/slot/deps.d.ts +0 -15
- package/dist/core/slot/deps.js +0 -88
- package/dist/core/slot/derived.d.ts +0 -32
- package/dist/core/slot/derived.js +0 -115
- package/dist/core/slot/platform-session-fields.d.ts +0 -38
- package/dist/core/slot/platform-session-fields.js +0 -48
- package/dist/core/slot/sf-schema.d.ts +0 -23
- package/dist/core/slot/sf-schema.js +0 -125
- package/dist/core/slot/sf-validate.d.ts +0 -14
- package/dist/core/slot/sf-validate.js +0 -132
- package/dist/core/slot/snapshot.d.ts +0 -18
- package/dist/core/slot/snapshot.js +0 -138
- package/dist/core/slot/write.d.ts +0 -48
- package/dist/core/slot/write.js +0 -426
- package/dist/core/stage/builders.d.ts +0 -54
- package/dist/core/stage/builders.js +0 -31
- package/dist/core/stage/condition.d.ts +0 -17
- package/dist/core/stage/condition.js +0 -198
- package/dist/core/stage/drive.d.ts +0 -43
- package/dist/core/stage/drive.js +0 -78
- package/dist/core/stage/finish-when.d.ts +0 -20
- package/dist/core/stage/finish-when.js +0 -82
- package/dist/core/stage/flatten.d.ts +0 -27
- package/dist/core/stage/flatten.js +0 -466
- package/dist/core/stage/index.d.ts +0 -15
- package/dist/core/stage/index.js +0 -13
- package/dist/core/stage/interrupts.d.ts +0 -28
- package/dist/core/stage/interrupts.js +0 -120
- package/dist/core/stage/ivr-fields.d.ts +0 -9
- package/dist/core/stage/ivr-fields.js +0 -75
- package/dist/core/stage/simulate.d.ts +0 -24
- package/dist/core/stage/simulate.js +0 -33
- package/dist/core/stage/transfer-fields.d.ts +0 -19
- package/dist/core/stage/transfer-fields.js +0 -129
- package/dist/core/stage/transfer-spec.d.ts +0 -48
- package/dist/core/stage/transfer-spec.js +0 -113
- package/dist/core/stage/types.d.ts +0 -208
- package/dist/core/stage/types.js +0 -2
- package/dist/core/stage/validate.d.ts +0 -11
- package/dist/core/stage/validate.js +0 -330
- package/dist/core/stage/walk.d.ts +0 -39
- package/dist/core/stage/walk.js +0 -119
- package/dist/fn-context/rpc/integration/list-bindings.d.ts +0 -21
- package/dist/fn-context/system-args.d.ts +0 -6
- package/dist/fn-context/system-args.js +0 -14
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
const READ_ONLY_KINDS = new Set(['compute', 'boolCompute', 'caseContextView']);
|
|
2
|
-
/** Names safe to cache: `caseContextView` plus every compute / boolCompute. */
|
|
3
|
-
export function readOnlyComputeNames(functions) {
|
|
4
|
-
const names = new Set(['caseContextView']);
|
|
5
|
-
if (!functions)
|
|
6
|
-
return names;
|
|
7
|
-
for (const [name, entry] of Object.entries(functions)) {
|
|
8
|
-
if (READ_ONLY_KINDS.has(entry.kind))
|
|
9
|
-
names.add(name);
|
|
10
|
-
}
|
|
11
|
-
return names;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Cache read-only `execute` results by function name + the single input object.
|
|
15
|
-
* Calls with extra args bypass the cache so a shared snapshot cannot alias
|
|
16
|
-
* two different argument lists.
|
|
17
|
-
*
|
|
18
|
-
* Do not wrap a host used by derived recompute: that path mutates one snapshot
|
|
19
|
-
* in place between `compute` calls. Stage walk / when-eval is safe (new snapshot
|
|
20
|
-
* after writes).
|
|
21
|
-
*/
|
|
22
|
-
export function withReadOnlyComputeCache(host, options) {
|
|
23
|
-
const allow = resolveAllow(options?.readOnly);
|
|
24
|
-
const cache = new WeakMap();
|
|
25
|
-
return {
|
|
26
|
-
async execute(name, args = []) {
|
|
27
|
-
const input = args[0];
|
|
28
|
-
if (!allow(name) || args.length !== 1 || input == null || typeof input !== 'object') {
|
|
29
|
-
return host.execute(name, args);
|
|
30
|
-
}
|
|
31
|
-
let byName = cache.get(input);
|
|
32
|
-
if (!byName) {
|
|
33
|
-
byName = new Map();
|
|
34
|
-
cache.set(input, byName);
|
|
35
|
-
}
|
|
36
|
-
const hit = byName.get(name);
|
|
37
|
-
if (hit)
|
|
38
|
-
return hit;
|
|
39
|
-
const pending = host.execute(name, args);
|
|
40
|
-
byName.set(name, pending);
|
|
41
|
-
try {
|
|
42
|
-
return await pending;
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
if (byName.get(name) === pending)
|
|
46
|
-
byName.delete(name);
|
|
47
|
-
throw error;
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
dispose() {
|
|
51
|
-
host.dispose();
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function resolveAllow(readOnly) {
|
|
56
|
-
if (typeof readOnly === 'function')
|
|
57
|
-
return readOnly;
|
|
58
|
-
const names = new Set(readOnly ?? ['caseContextView']);
|
|
59
|
-
return (name) => names.has(name);
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=read-only-cache.js.map
|
|
@@ -1,69 +0,0 @@
|
|
|
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
|
package/dist/core/context/db.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
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
|
|
@@ -1,134 +0,0 @@
|
|
|
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
|
|
@@ -1,108 +0,0 @@
|
|
|
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
|