@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
|
@@ -3,6 +3,135 @@
|
|
|
3
3
|
* routable over RPC, and present in fake contexts — there is no second place to update.
|
|
4
4
|
*/
|
|
5
5
|
export declare const platformSurfaces: {
|
|
6
|
+
call: {
|
|
7
|
+
methods: {
|
|
8
|
+
list: {
|
|
9
|
+
input: import("zod").ZodObject<{
|
|
10
|
+
offset: import("zod").ZodNumber;
|
|
11
|
+
limit: import("zod").ZodNumber;
|
|
12
|
+
instanceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
contactId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
direction: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
15
|
+
inbound: "inbound";
|
|
16
|
+
outbound: "outbound";
|
|
17
|
+
}>>;
|
|
18
|
+
status: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
|
+
}, import("zod/v4/core").$strip>;
|
|
20
|
+
output: import("zod").ZodObject<{
|
|
21
|
+
calls: import("zod").ZodArray<import("zod").ZodObject<{
|
|
22
|
+
id: import("zod").ZodString;
|
|
23
|
+
sessionId: import("zod").ZodNullable<import("zod").ZodType<import("../page/typed.js").Id<"session">, unknown, import("zod/v4/core").$ZodTypeInternals<import("../page/typed.js").Id<"session">, unknown>>>;
|
|
24
|
+
instanceId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
25
|
+
instanceIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
26
|
+
contactIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
27
|
+
participants: import("zod").ZodArray<import("zod").ZodObject<{
|
|
28
|
+
id: import("zod").ZodString;
|
|
29
|
+
kind: import("zod").ZodEnum<{
|
|
30
|
+
ai: "ai";
|
|
31
|
+
party: "party";
|
|
32
|
+
}>;
|
|
33
|
+
address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
34
|
+
contactId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
35
|
+
identifiedReason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
36
|
+
isNewContact: import("zod").ZodBoolean;
|
|
37
|
+
joinedAt: import("zod").ZodString;
|
|
38
|
+
leftAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
39
|
+
}, import("zod/v4/core").$strip>>;
|
|
40
|
+
externalId: import("zod").ZodString;
|
|
41
|
+
direction: import("zod").ZodEnum<{
|
|
42
|
+
inbound: "inbound";
|
|
43
|
+
outbound: "outbound";
|
|
44
|
+
}>;
|
|
45
|
+
from: import("zod").ZodString;
|
|
46
|
+
to: import("zod").ZodString;
|
|
47
|
+
status: import("zod").ZodString;
|
|
48
|
+
outcome: import("zod").ZodNullable<import("zod").ZodString>;
|
|
49
|
+
startedAt: import("zod").ZodString;
|
|
50
|
+
endedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
51
|
+
durationSec: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
52
|
+
recordingUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
53
|
+
}, import("zod/v4/core").$strip>>;
|
|
54
|
+
offset: import("zod").ZodNumber;
|
|
55
|
+
limit: import("zod").ZodNumber;
|
|
56
|
+
}, import("zod/v4/core").$strip>;
|
|
57
|
+
};
|
|
58
|
+
get: {
|
|
59
|
+
input: import("zod").ZodString;
|
|
60
|
+
output: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
61
|
+
id: import("zod").ZodString;
|
|
62
|
+
sessionId: import("zod").ZodNullable<import("zod").ZodType<import("../page/typed.js").Id<"session">, unknown, import("zod/v4/core").$ZodTypeInternals<import("../page/typed.js").Id<"session">, unknown>>>;
|
|
63
|
+
instanceId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
64
|
+
instanceIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
65
|
+
contactIds: import("zod").ZodArray<import("zod").ZodString>;
|
|
66
|
+
participants: import("zod").ZodArray<import("zod").ZodObject<{
|
|
67
|
+
id: import("zod").ZodString;
|
|
68
|
+
kind: import("zod").ZodEnum<{
|
|
69
|
+
ai: "ai";
|
|
70
|
+
party: "party";
|
|
71
|
+
}>;
|
|
72
|
+
address: import("zod").ZodNullable<import("zod").ZodString>;
|
|
73
|
+
contactId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
74
|
+
identifiedReason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
75
|
+
isNewContact: import("zod").ZodBoolean;
|
|
76
|
+
joinedAt: import("zod").ZodString;
|
|
77
|
+
leftAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
78
|
+
}, import("zod/v4/core").$strip>>;
|
|
79
|
+
externalId: import("zod").ZodString;
|
|
80
|
+
direction: import("zod").ZodEnum<{
|
|
81
|
+
inbound: "inbound";
|
|
82
|
+
outbound: "outbound";
|
|
83
|
+
}>;
|
|
84
|
+
from: import("zod").ZodString;
|
|
85
|
+
to: import("zod").ZodString;
|
|
86
|
+
status: import("zod").ZodString;
|
|
87
|
+
outcome: import("zod").ZodNullable<import("zod").ZodString>;
|
|
88
|
+
startedAt: import("zod").ZodString;
|
|
89
|
+
endedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
90
|
+
durationSec: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
91
|
+
recordingUrl: import("zod").ZodNullable<import("zod").ZodString>;
|
|
92
|
+
}, import("zod/v4/core").$strip>>;
|
|
93
|
+
};
|
|
94
|
+
transcript: {
|
|
95
|
+
input: import("zod").ZodString;
|
|
96
|
+
output: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
97
|
+
callId: import("zod").ZodString;
|
|
98
|
+
lines: import("zod").ZodArray<import("zod").ZodObject<{
|
|
99
|
+
at: import("zod").ZodString;
|
|
100
|
+
speaker: import("zod").ZodEnum<{
|
|
101
|
+
ai: "ai";
|
|
102
|
+
party: "party";
|
|
103
|
+
}>;
|
|
104
|
+
participantId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
105
|
+
contactId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
106
|
+
instanceId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
107
|
+
text: import("zod").ZodString;
|
|
108
|
+
interrupted: import("zod").ZodBoolean;
|
|
109
|
+
}, import("zod/v4/core").$strip>>;
|
|
110
|
+
}, import("zod/v4/core").$strip>>;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
mock: import("./call.js").CallApi;
|
|
114
|
+
};
|
|
115
|
+
channels: {
|
|
116
|
+
methods: {
|
|
117
|
+
list: {
|
|
118
|
+
input: import("zod").ZodObject<{}, import("zod/v4/core").$strict>;
|
|
119
|
+
output: import("zod").ZodObject<{
|
|
120
|
+
phoneNumbers: import("zod").ZodArray<import("zod").ZodObject<{
|
|
121
|
+
number: import("zod").ZodString;
|
|
122
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
123
|
+
locality: import("zod").ZodNullable<import("zod").ZodString>;
|
|
124
|
+
region: import("zod").ZodNullable<import("zod").ZodString>;
|
|
125
|
+
}, import("zod/v4/core").$strip>>;
|
|
126
|
+
mailboxes: import("zod").ZodArray<import("zod").ZodObject<{
|
|
127
|
+
address: import("zod").ZodString;
|
|
128
|
+
name: import("zod").ZodNullable<import("zod").ZodString>;
|
|
129
|
+
}, import("zod/v4/core").$strip>>;
|
|
130
|
+
}, import("zod/v4/core").$strip>;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
mock: import("./channels.js").ChannelsApi;
|
|
134
|
+
};
|
|
6
135
|
contact: {
|
|
7
136
|
methods: {
|
|
8
137
|
list: {
|
|
@@ -14,23 +143,332 @@ export declare const platformSurfaces: {
|
|
|
14
143
|
}, import("zod/v4/core").$strip>;
|
|
15
144
|
output: import("zod").ZodObject<{
|
|
16
145
|
contacts: import("zod").ZodArray<import("zod").ZodObject<{
|
|
17
|
-
id: import("zod").
|
|
146
|
+
id: import("zod").ZodCustom<import("../page/typed.js").Id<"contact">, import("../page/typed.js").Id<"contact">>;
|
|
18
147
|
kind: import("zod").ZodString;
|
|
19
|
-
externalIdentifier: import("zod").ZodNullable<import("zod").ZodString>;
|
|
20
148
|
phone: import("zod").ZodNullable<import("zod").ZodString>;
|
|
149
|
+
email: import("zod").ZodNullable<import("zod").ZodString>;
|
|
21
150
|
createdAt: import("zod").ZodString;
|
|
151
|
+
fields: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodArray<import("zod").ZodString>, import("zod").ZodNull]>>;
|
|
22
152
|
}, import("zod/v4/core").$strip>>;
|
|
23
153
|
offset: import("zod").ZodNumber;
|
|
24
154
|
limit: import("zod").ZodNumber;
|
|
25
155
|
}, import("zod/v4/core").$strip>;
|
|
26
156
|
};
|
|
157
|
+
find: {
|
|
158
|
+
input: import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
159
|
+
id: import("zod").ZodString;
|
|
160
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
161
|
+
phone: import("zod").ZodString;
|
|
162
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
163
|
+
email: import("zod").ZodString;
|
|
164
|
+
}, import("zod/v4/core").$strict>]>;
|
|
165
|
+
output: import("zod").ZodObject<{
|
|
166
|
+
contacts: import("zod").ZodArray<import("zod").ZodObject<{
|
|
167
|
+
id: import("zod").ZodCustom<import("../page/typed.js").Id<"contact">, import("../page/typed.js").Id<"contact">>;
|
|
168
|
+
kind: import("zod").ZodString;
|
|
169
|
+
phone: import("zod").ZodNullable<import("zod").ZodString>;
|
|
170
|
+
email: import("zod").ZodNullable<import("zod").ZodString>;
|
|
171
|
+
createdAt: import("zod").ZodString;
|
|
172
|
+
fields: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodArray<import("zod").ZodString>, import("zod").ZodNull]>>;
|
|
173
|
+
}, import("zod/v4/core").$strip>>;
|
|
174
|
+
}, import("zod/v4/core").$strip>;
|
|
175
|
+
};
|
|
176
|
+
create: {
|
|
177
|
+
input: import("zod").ZodObject<{
|
|
178
|
+
fields: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodArray<import("zod").ZodString>, import("zod").ZodNull]>>;
|
|
179
|
+
}, import("zod/v4/core").$strict>;
|
|
180
|
+
output: import("zod").ZodObject<{
|
|
181
|
+
id: import("zod").ZodCustom<import("../page/typed.js").Id<"contact">, import("../page/typed.js").Id<"contact">>;
|
|
182
|
+
kind: import("zod").ZodString;
|
|
183
|
+
phone: import("zod").ZodNullable<import("zod").ZodString>;
|
|
184
|
+
email: import("zod").ZodNullable<import("zod").ZodString>;
|
|
185
|
+
createdAt: import("zod").ZodString;
|
|
186
|
+
fields: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodArray<import("zod").ZodString>, import("zod").ZodNull]>>;
|
|
187
|
+
}, import("zod/v4/core").$strip>;
|
|
188
|
+
};
|
|
189
|
+
clearContactMethods: {
|
|
190
|
+
input: import("zod").ZodObject<{
|
|
191
|
+
contactId: import("zod").ZodString;
|
|
192
|
+
}, import("zod/v4/core").$strict>;
|
|
193
|
+
output: import("zod").ZodObject<{
|
|
194
|
+
id: import("zod").ZodCustom<import("../page/typed.js").Id<"contact">, import("../page/typed.js").Id<"contact">>;
|
|
195
|
+
kind: import("zod").ZodString;
|
|
196
|
+
phone: import("zod").ZodNullable<import("zod").ZodString>;
|
|
197
|
+
email: import("zod").ZodNullable<import("zod").ZodString>;
|
|
198
|
+
createdAt: import("zod").ZodString;
|
|
199
|
+
fields: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodArray<import("zod").ZodString>, import("zod").ZodNull]>>;
|
|
200
|
+
}, import("zod/v4/core").$strip>;
|
|
201
|
+
};
|
|
27
202
|
};
|
|
28
203
|
mock: import("./contact.js").ContactApi;
|
|
29
204
|
};
|
|
30
|
-
|
|
205
|
+
email: {
|
|
31
206
|
methods: {
|
|
207
|
+
list: {
|
|
208
|
+
input: import("zod").ZodObject<{
|
|
209
|
+
offset: import("zod").ZodNumber;
|
|
210
|
+
limit: import("zod").ZodNumber;
|
|
211
|
+
instanceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
212
|
+
contactId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
213
|
+
emailThreadId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
214
|
+
direction: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
215
|
+
inbound: "inbound";
|
|
216
|
+
outbound: "outbound";
|
|
217
|
+
}>>;
|
|
218
|
+
}, import("zod/v4/core").$strip>;
|
|
219
|
+
output: import("zod").ZodObject<{
|
|
220
|
+
emails: import("zod").ZodArray<import("zod").ZodObject<{
|
|
221
|
+
id: import("zod").ZodString;
|
|
222
|
+
emailThreadId: import("zod").ZodString;
|
|
223
|
+
threadId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
224
|
+
instanceId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
225
|
+
contactId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
226
|
+
runId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
227
|
+
direction: import("zod").ZodEnum<{
|
|
228
|
+
inbound: "inbound";
|
|
229
|
+
outbound: "outbound";
|
|
230
|
+
}>;
|
|
231
|
+
from: import("zod").ZodArray<import("zod").ZodString>;
|
|
232
|
+
to: import("zod").ZodArray<import("zod").ZodString>;
|
|
233
|
+
cc: import("zod").ZodArray<import("zod").ZodString>;
|
|
234
|
+
subject: import("zod").ZodNullable<import("zod").ZodString>;
|
|
235
|
+
body: import("zod").ZodNullable<import("zod").ZodString>;
|
|
236
|
+
processing: import("zod").ZodNullable<import("zod").ZodString>;
|
|
237
|
+
delivery: import("zod").ZodNullable<import("zod").ZodString>;
|
|
238
|
+
occurredAt: import("zod").ZodString;
|
|
239
|
+
}, import("zod/v4/core").$strip>>;
|
|
240
|
+
offset: import("zod").ZodNumber;
|
|
241
|
+
limit: import("zod").ZodNumber;
|
|
242
|
+
}, import("zod/v4/core").$strip>;
|
|
243
|
+
};
|
|
32
244
|
get: {
|
|
245
|
+
input: import("zod").ZodString;
|
|
246
|
+
output: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
247
|
+
id: import("zod").ZodString;
|
|
248
|
+
emailThreadId: import("zod").ZodString;
|
|
249
|
+
threadId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
250
|
+
instanceId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
251
|
+
contactId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
252
|
+
runId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
253
|
+
direction: import("zod").ZodEnum<{
|
|
254
|
+
inbound: "inbound";
|
|
255
|
+
outbound: "outbound";
|
|
256
|
+
}>;
|
|
257
|
+
from: import("zod").ZodArray<import("zod").ZodString>;
|
|
258
|
+
to: import("zod").ZodArray<import("zod").ZodString>;
|
|
259
|
+
cc: import("zod").ZodArray<import("zod").ZodString>;
|
|
260
|
+
subject: import("zod").ZodNullable<import("zod").ZodString>;
|
|
261
|
+
body: import("zod").ZodNullable<import("zod").ZodString>;
|
|
262
|
+
processing: import("zod").ZodNullable<import("zod").ZodString>;
|
|
263
|
+
delivery: import("zod").ZodNullable<import("zod").ZodString>;
|
|
264
|
+
occurredAt: import("zod").ZodString;
|
|
265
|
+
}, import("zod/v4/core").$strip>>;
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
mock: import("./email-message.js").EmailHistoryApi;
|
|
269
|
+
};
|
|
270
|
+
exchanges: {
|
|
271
|
+
methods: {
|
|
272
|
+
last: {
|
|
33
273
|
input: import("zod").ZodObject<{
|
|
274
|
+
ours: import("zod").ZodObject<{
|
|
275
|
+
kind: import("zod").ZodEnum<{
|
|
276
|
+
email: "email";
|
|
277
|
+
phone: "phone";
|
|
278
|
+
}>;
|
|
279
|
+
value: import("zod").ZodString;
|
|
280
|
+
}, import("zod/v4/core").$strip>;
|
|
281
|
+
theirs: import("zod").ZodObject<{
|
|
282
|
+
kind: import("zod").ZodEnum<{
|
|
283
|
+
email: "email";
|
|
284
|
+
phone: "phone";
|
|
285
|
+
sip: "sip";
|
|
286
|
+
}>;
|
|
287
|
+
value: import("zod").ZodString;
|
|
288
|
+
}, import("zod/v4/core").$strip>;
|
|
289
|
+
}, import("zod/v4/core").$strict>;
|
|
290
|
+
output: import("zod").ZodObject<{
|
|
291
|
+
exchange: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
292
|
+
instanceId: import("zod").ZodString;
|
|
293
|
+
sequence: import("zod").ZodString;
|
|
294
|
+
at: import("zod").ZodString;
|
|
295
|
+
sessionActive: import("zod").ZodBoolean;
|
|
296
|
+
instanceActive: import("zod").ZodBoolean;
|
|
297
|
+
contactId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
298
|
+
}, import("zod/v4/core").$strip>>;
|
|
299
|
+
}, import("zod/v4/core").$strip>;
|
|
300
|
+
};
|
|
301
|
+
emailThread: {
|
|
302
|
+
input: import("zod").ZodObject<{
|
|
303
|
+
ours: import("zod").ZodObject<{
|
|
304
|
+
kind: import("zod").ZodEnum<{
|
|
305
|
+
email: "email";
|
|
306
|
+
phone: "phone";
|
|
307
|
+
}>;
|
|
308
|
+
value: import("zod").ZodString;
|
|
309
|
+
}, import("zod/v4/core").$strip>;
|
|
310
|
+
threadId: import("zod").ZodString;
|
|
311
|
+
}, import("zod/v4/core").$strict>;
|
|
312
|
+
output: import("zod").ZodObject<{
|
|
313
|
+
thread: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
314
|
+
instanceId: import("zod").ZodString;
|
|
315
|
+
sequence: import("zod").ZodString;
|
|
316
|
+
instanceActive: import("zod").ZodBoolean;
|
|
317
|
+
}, import("zod/v4/core").$strip>>;
|
|
318
|
+
}, import("zod/v4/core").$strip>;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
mock: import("./exchanges.js").ExchangesApi;
|
|
322
|
+
};
|
|
323
|
+
instances: {
|
|
324
|
+
methods: {
|
|
325
|
+
start: {
|
|
326
|
+
input: import("zod").ZodObject<{
|
|
327
|
+
sequence: import("zod").ZodString;
|
|
328
|
+
subjectRecordId: import("zod").ZodString;
|
|
329
|
+
variables: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
330
|
+
origin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
331
|
+
}, import("zod/v4/core").$strict>;
|
|
332
|
+
output: import("zod").ZodObject<{
|
|
333
|
+
instance: import("zod").ZodObject<{
|
|
334
|
+
id: import("zod").ZodString;
|
|
335
|
+
sequenceId: import("zod").ZodString;
|
|
336
|
+
sequence: import("zod").ZodString;
|
|
337
|
+
subjectRecordId: import("zod").ZodString;
|
|
338
|
+
status: import("zod").ZodEnum<{
|
|
339
|
+
active: "active";
|
|
340
|
+
closed: "closed";
|
|
341
|
+
}>;
|
|
342
|
+
closeReason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
343
|
+
origin: import("zod").ZodString;
|
|
344
|
+
variables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
345
|
+
experiments: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
346
|
+
createdAt: import("zod").ZodString;
|
|
347
|
+
lastActivityAt: import("zod").ZodString;
|
|
348
|
+
closedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
349
|
+
}, import("zod/v4/core").$strip>;
|
|
350
|
+
created: import("zod").ZodBoolean;
|
|
351
|
+
}, import("zod/v4/core").$strip>;
|
|
352
|
+
};
|
|
353
|
+
get: {
|
|
354
|
+
input: import("zod").ZodObject<{
|
|
355
|
+
instanceId: import("zod").ZodString;
|
|
356
|
+
}, import("zod/v4/core").$strict>;
|
|
357
|
+
output: import("zod").ZodObject<{
|
|
358
|
+
id: import("zod").ZodString;
|
|
359
|
+
sequenceId: import("zod").ZodString;
|
|
360
|
+
sequence: import("zod").ZodString;
|
|
361
|
+
subjectRecordId: import("zod").ZodString;
|
|
362
|
+
status: import("zod").ZodEnum<{
|
|
363
|
+
active: "active";
|
|
364
|
+
closed: "closed";
|
|
365
|
+
}>;
|
|
366
|
+
closeReason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
367
|
+
origin: import("zod").ZodString;
|
|
368
|
+
variables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
369
|
+
experiments: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
370
|
+
createdAt: import("zod").ZodString;
|
|
371
|
+
lastActivityAt: import("zod").ZodString;
|
|
372
|
+
closedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
373
|
+
}, import("zod/v4/core").$strip>;
|
|
374
|
+
};
|
|
375
|
+
close: {
|
|
376
|
+
input: import("zod").ZodObject<{
|
|
377
|
+
instanceId: import("zod").ZodString;
|
|
378
|
+
reason: import("zod").ZodString;
|
|
379
|
+
}, import("zod/v4/core").$strict>;
|
|
380
|
+
output: import("zod").ZodObject<{
|
|
381
|
+
id: import("zod").ZodString;
|
|
382
|
+
sequenceId: import("zod").ZodString;
|
|
383
|
+
sequence: import("zod").ZodString;
|
|
384
|
+
subjectRecordId: import("zod").ZodString;
|
|
385
|
+
status: import("zod").ZodEnum<{
|
|
386
|
+
active: "active";
|
|
387
|
+
closed: "closed";
|
|
388
|
+
}>;
|
|
389
|
+
closeReason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
390
|
+
origin: import("zod").ZodString;
|
|
391
|
+
variables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
392
|
+
experiments: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
393
|
+
createdAt: import("zod").ZodString;
|
|
394
|
+
lastActivityAt: import("zod").ZodString;
|
|
395
|
+
closedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
396
|
+
}, import("zod/v4/core").$strip>;
|
|
397
|
+
};
|
|
398
|
+
setVariables: {
|
|
399
|
+
input: import("zod").ZodObject<{
|
|
400
|
+
instanceId: import("zod").ZodString;
|
|
401
|
+
values: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
402
|
+
}, import("zod/v4/core").$strict>;
|
|
403
|
+
output: import("zod").ZodObject<{
|
|
404
|
+
id: import("zod").ZodString;
|
|
405
|
+
sequenceId: import("zod").ZodString;
|
|
406
|
+
sequence: import("zod").ZodString;
|
|
407
|
+
subjectRecordId: import("zod").ZodString;
|
|
408
|
+
status: import("zod").ZodEnum<{
|
|
409
|
+
active: "active";
|
|
410
|
+
closed: "closed";
|
|
411
|
+
}>;
|
|
412
|
+
closeReason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
413
|
+
origin: import("zod").ZodString;
|
|
414
|
+
variables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
415
|
+
experiments: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
416
|
+
createdAt: import("zod").ZodString;
|
|
417
|
+
lastActivityAt: import("zod").ZodString;
|
|
418
|
+
closedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
419
|
+
}, import("zod/v4/core").$strip>;
|
|
420
|
+
};
|
|
421
|
+
findForContact: {
|
|
422
|
+
input: import("zod").ZodObject<{
|
|
423
|
+
contactId: import("zod").ZodString;
|
|
424
|
+
activeOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
425
|
+
}, import("zod/v4/core").$strict>;
|
|
426
|
+
output: import("zod").ZodObject<{
|
|
427
|
+
instances: import("zod").ZodArray<import("zod").ZodObject<{
|
|
428
|
+
id: import("zod").ZodString;
|
|
429
|
+
sequenceId: import("zod").ZodString;
|
|
430
|
+
sequence: import("zod").ZodString;
|
|
431
|
+
subjectRecordId: import("zod").ZodString;
|
|
432
|
+
status: import("zod").ZodEnum<{
|
|
433
|
+
active: "active";
|
|
434
|
+
closed: "closed";
|
|
435
|
+
}>;
|
|
436
|
+
closeReason: import("zod").ZodNullable<import("zod").ZodString>;
|
|
437
|
+
origin: import("zod").ZodString;
|
|
438
|
+
variables: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>;
|
|
439
|
+
experiments: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>;
|
|
440
|
+
createdAt: import("zod").ZodString;
|
|
441
|
+
lastActivityAt: import("zod").ZodString;
|
|
442
|
+
closedAt: import("zod").ZodNullable<import("zod").ZodString>;
|
|
443
|
+
}, import("zod/v4/core").$strip>>;
|
|
444
|
+
}, import("zod/v4/core").$strip>;
|
|
445
|
+
};
|
|
446
|
+
notify: {
|
|
447
|
+
input: import("zod").ZodObject<{
|
|
448
|
+
instanceId: import("zod").ZodString;
|
|
449
|
+
reason: import("zod").ZodString;
|
|
450
|
+
key: import("zod").ZodOptional<import("zod").ZodString>;
|
|
451
|
+
}, import("zod/v4/core").$strict>;
|
|
452
|
+
output: import("zod").ZodObject<{
|
|
453
|
+
outcome: import("zod").ZodEnum<{
|
|
454
|
+
duplicate: "duplicate";
|
|
455
|
+
instance_closed: "instance_closed";
|
|
456
|
+
no_orchestrator: "no_orchestrator";
|
|
457
|
+
recorded: "recorded";
|
|
458
|
+
}>;
|
|
459
|
+
}, import("zod/v4/core").$strip>;
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
mock: import("./instances.js").InstancesApi;
|
|
463
|
+
};
|
|
464
|
+
kv: {
|
|
465
|
+
methods: {
|
|
466
|
+
get: {
|
|
467
|
+
input: import("zod").ZodObject<{
|
|
468
|
+
scope: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
469
|
+
company: "company";
|
|
470
|
+
environment: "environment";
|
|
471
|
+
}>>;
|
|
34
472
|
key: import("zod").ZodString;
|
|
35
473
|
}, import("zod/v4/core").$strip>;
|
|
36
474
|
output: import("zod").ZodObject<{
|
|
@@ -39,6 +477,10 @@ export declare const platformSurfaces: {
|
|
|
39
477
|
};
|
|
40
478
|
set: {
|
|
41
479
|
input: import("zod").ZodObject<{
|
|
480
|
+
scope: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
481
|
+
company: "company";
|
|
482
|
+
environment: "environment";
|
|
483
|
+
}>>;
|
|
42
484
|
key: import("zod").ZodString;
|
|
43
485
|
value: import("zod").ZodString;
|
|
44
486
|
ttlSeconds: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -49,6 +491,10 @@ export declare const platformSurfaces: {
|
|
|
49
491
|
};
|
|
50
492
|
del: {
|
|
51
493
|
input: import("zod").ZodObject<{
|
|
494
|
+
scope: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
495
|
+
company: "company";
|
|
496
|
+
environment: "environment";
|
|
497
|
+
}>>;
|
|
52
498
|
key: import("zod").ZodString;
|
|
53
499
|
}, import("zod/v4/core").$strip>;
|
|
54
500
|
output: import("zod").ZodObject<{
|
|
@@ -56,7 +502,66 @@ export declare const platformSurfaces: {
|
|
|
56
502
|
}, import("zod/v4/core").$strip>;
|
|
57
503
|
};
|
|
58
504
|
};
|
|
59
|
-
mock: import("./
|
|
505
|
+
mock: import("./kv.js").KvApi;
|
|
506
|
+
};
|
|
507
|
+
sms: {
|
|
508
|
+
methods: {
|
|
509
|
+
list: {
|
|
510
|
+
input: import("zod").ZodObject<{
|
|
511
|
+
offset: import("zod").ZodNumber;
|
|
512
|
+
limit: import("zod").ZodNumber;
|
|
513
|
+
instanceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
514
|
+
contactId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
515
|
+
counterpart: import("zod").ZodOptional<import("zod").ZodString>;
|
|
516
|
+
direction: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
517
|
+
inbound: "inbound";
|
|
518
|
+
outbound: "outbound";
|
|
519
|
+
}>>;
|
|
520
|
+
}, import("zod/v4/core").$strip>;
|
|
521
|
+
output: import("zod").ZodObject<{
|
|
522
|
+
sms: import("zod").ZodArray<import("zod").ZodObject<{
|
|
523
|
+
id: import("zod").ZodString;
|
|
524
|
+
instanceId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
525
|
+
contactId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
526
|
+
runId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
527
|
+
direction: import("zod").ZodEnum<{
|
|
528
|
+
inbound: "inbound";
|
|
529
|
+
outbound: "outbound";
|
|
530
|
+
}>;
|
|
531
|
+
from: import("zod").ZodString;
|
|
532
|
+
to: import("zod").ZodString;
|
|
533
|
+
body: import("zod").ZodNullable<import("zod").ZodString>;
|
|
534
|
+
processing: import("zod").ZodNullable<import("zod").ZodString>;
|
|
535
|
+
delivery: import("zod").ZodNullable<import("zod").ZodString>;
|
|
536
|
+
errorCode: import("zod").ZodNullable<import("zod").ZodString>;
|
|
537
|
+
occurredAt: import("zod").ZodString;
|
|
538
|
+
}, import("zod/v4/core").$strip>>;
|
|
539
|
+
offset: import("zod").ZodNumber;
|
|
540
|
+
limit: import("zod").ZodNumber;
|
|
541
|
+
}, import("zod/v4/core").$strip>;
|
|
542
|
+
};
|
|
543
|
+
get: {
|
|
544
|
+
input: import("zod").ZodString;
|
|
545
|
+
output: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
546
|
+
id: import("zod").ZodString;
|
|
547
|
+
instanceId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
548
|
+
contactId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
549
|
+
runId: import("zod").ZodNullable<import("zod").ZodString>;
|
|
550
|
+
direction: import("zod").ZodEnum<{
|
|
551
|
+
inbound: "inbound";
|
|
552
|
+
outbound: "outbound";
|
|
553
|
+
}>;
|
|
554
|
+
from: import("zod").ZodString;
|
|
555
|
+
to: import("zod").ZodString;
|
|
556
|
+
body: import("zod").ZodNullable<import("zod").ZodString>;
|
|
557
|
+
processing: import("zod").ZodNullable<import("zod").ZodString>;
|
|
558
|
+
delivery: import("zod").ZodNullable<import("zod").ZodString>;
|
|
559
|
+
errorCode: import("zod").ZodNullable<import("zod").ZodString>;
|
|
560
|
+
occurredAt: import("zod").ZodString;
|
|
561
|
+
}, import("zod/v4/core").$strip>>;
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
mock: import("./sms.js").SmsApi;
|
|
60
565
|
};
|
|
61
566
|
};
|
|
62
567
|
export type PlatformSurfaceKey = keyof typeof platformSurfaces;
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
+
import { callSurface } from './call.js';
|
|
2
|
+
import { channelsSurface } from './channels.js';
|
|
1
3
|
import { contactSurface } from './contact.js';
|
|
2
|
-
import {
|
|
4
|
+
import { emailHistorySurface } from './email-message.js';
|
|
5
|
+
import { exchangesSurface } from './exchanges.js';
|
|
6
|
+
import { instancesSurface } from './instances.js';
|
|
7
|
+
import { kvSurface } from './kv.js';
|
|
8
|
+
import { smsSurface } from './sms.js';
|
|
3
9
|
/**
|
|
4
10
|
* Every platform API surface. Registering one here is what makes it appear on `ctx.api`,
|
|
5
11
|
* routable over RPC, and present in fake contexts — there is no second place to update.
|
|
6
12
|
*/
|
|
7
13
|
export const platformSurfaces = {
|
|
14
|
+
call: callSurface,
|
|
15
|
+
channels: channelsSurface,
|
|
8
16
|
contact: contactSurface,
|
|
9
|
-
|
|
17
|
+
email: emailHistorySurface,
|
|
18
|
+
exchanges: exchangesSurface,
|
|
19
|
+
instances: instancesSurface,
|
|
20
|
+
kv: kvSurface,
|
|
21
|
+
sms: smsSurface,
|
|
10
22
|
};
|
|
11
23
|
//# sourceMappingURL=platform-registry.js.map
|
|
@@ -5,7 +5,8 @@ import { z } from 'zod';
|
|
|
5
5
|
* That makes them describable by a compile-time table, which drives RPC dispatch, server-side
|
|
6
6
|
* validation, the client stub and the fake context — so a new method is declared exactly once.
|
|
7
7
|
*
|
|
8
|
-
* Methods take
|
|
8
|
+
* Methods take one schema-validated JSON input. Most methods use a params object; direct lookups
|
|
9
|
+
* may use a scalar id (for example `ctx.api.sms.get(id)`). Use `z.object({})` for no-input methods.
|
|
9
10
|
*/
|
|
10
11
|
export type PlatformApiShape = Record<string, (input: never) => Promise<unknown>>;
|
|
11
12
|
export type PlatformSurface<TApi extends PlatformApiShape> = {
|