@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.
Files changed (169) hide show
  1. package/README.md +35 -0
  2. package/bin/superpanel-sdk-runtime.mjs +22 -0
  3. package/dist/builder/codegen/emit.d.ts +17 -0
  4. package/dist/builder/codegen/emit.js +143 -0
  5. package/dist/builder/codegen/generate.d.ts +21 -0
  6. package/dist/builder/codegen/generate.js +90 -0
  7. package/dist/builder/compile/compile-agenda.d.ts +15 -0
  8. package/dist/builder/compile/compile-agenda.js +59 -0
  9. package/dist/builder/compile/compile-sequence.d.ts +24 -0
  10. package/dist/builder/compile/compile-sequence.js +121 -0
  11. package/dist/builder/compile/function-code.d.ts +6 -0
  12. package/dist/builder/compile/function-code.js +30 -0
  13. package/dist/builder/compile/registry.d.ts +13 -0
  14. package/dist/builder/compile/registry.js +42 -0
  15. package/dist/builder/load.d.ts +22 -0
  16. package/dist/builder/load.js +169 -0
  17. package/dist/builder/merge.d.ts +4 -0
  18. package/dist/builder/merge.js +19 -0
  19. package/dist/builder/paths.d.ts +10 -0
  20. package/dist/builder/paths.js +22 -0
  21. package/dist/builder/types.d.ts +31 -0
  22. package/dist/builder/types.js +2 -0
  23. package/dist/cli/compile/index.d.ts +4 -0
  24. package/dist/cli/compile/index.js +11 -0
  25. package/dist/cli/index.d.ts +3 -0
  26. package/dist/cli/index.js +64 -0
  27. package/dist/cli/serve/index.d.ts +9 -0
  28. package/dist/cli/serve/index.js +340 -0
  29. package/dist/cli/type-gen/index.d.ts +5 -0
  30. package/dist/cli/type-gen/index.js +90 -0
  31. package/dist/compute-host/compute-host.d.ts +38 -0
  32. package/dist/compute-host/compute-host.js +45 -0
  33. package/dist/compute-host/index.d.ts +5 -0
  34. package/dist/compute-host/index.js +3 -0
  35. package/dist/compute-host/source-compute-host.d.ts +29 -0
  36. package/dist/compute-host/source-compute-host.js +72 -0
  37. package/dist/core/context/account-fields.d.ts +12 -0
  38. package/dist/core/context/account-fields.js +2 -0
  39. package/dist/core/context/contact.d.ts +60 -0
  40. package/dist/core/context/contact.js +34 -0
  41. package/dist/core/context/db.d.ts +69 -0
  42. package/dist/core/context/db.js +44 -0
  43. package/dist/core/context/docusign.d.ts +134 -0
  44. package/dist/core/context/docusign.js +108 -0
  45. package/dist/core/context/env.d.ts +9 -0
  46. package/dist/core/context/env.js +19 -0
  47. package/dist/core/context/filevine.d.ts +323 -0
  48. package/dist/core/context/filevine.js +254 -0
  49. package/dist/core/context/http.d.ts +9 -0
  50. package/dist/core/context/http.js +4 -0
  51. package/dist/core/context/hubspot.d.ts +250 -0
  52. package/dist/core/context/hubspot.js +191 -0
  53. package/dist/core/context/platform-registry.d.ts +67 -0
  54. package/dist/core/context/platform-registry.js +11 -0
  55. package/dist/core/context/platform.d.ts +33 -0
  56. package/dist/core/context/platform.js +2 -0
  57. package/dist/core/context/twilio.d.ts +50 -0
  58. package/dist/core/context/twilio.js +42 -0
  59. package/dist/core/context/types.d.ts +87 -0
  60. package/dist/core/context/types.js +9 -0
  61. package/dist/core/functions/define/case-context.d.ts +14 -0
  62. package/dist/core/functions/define/case-context.js +15 -0
  63. package/dist/core/functions/define/compute.d.ts +7 -0
  64. package/dist/core/functions/define/compute.js +17 -0
  65. package/dist/core/functions/define/custom.d.ts +4 -0
  66. package/dist/core/functions/define/custom.js +8 -0
  67. package/dist/core/functions/define/system.d.ts +7 -0
  68. package/dist/core/functions/define/system.js +12 -0
  69. package/dist/core/functions/func-ref.d.ts +16 -0
  70. package/dist/core/functions/func-ref.js +20 -0
  71. package/dist/core/functions/types.d.ts +78 -0
  72. package/dist/core/functions/types.js +5 -0
  73. package/dist/core/slot/compile-schema.d.ts +24 -0
  74. package/dist/core/slot/compile-schema.js +336 -0
  75. package/dist/core/slot/deps.d.ts +15 -0
  76. package/dist/core/slot/deps.js +88 -0
  77. package/dist/core/slot/derived.d.ts +32 -0
  78. package/dist/core/slot/derived.js +115 -0
  79. package/dist/core/slot/field.d.ts +36 -0
  80. package/dist/core/slot/field.js +97 -0
  81. package/dist/core/slot/id-ref.d.ts +4 -0
  82. package/dist/core/slot/id-ref.js +15 -0
  83. package/dist/core/slot/index.d.ts +15 -0
  84. package/dist/core/slot/index.js +14 -0
  85. package/dist/core/slot/path.d.ts +18 -0
  86. package/dist/core/slot/path.js +22 -0
  87. package/dist/core/slot/row.d.ts +22 -0
  88. package/dist/core/slot/row.js +54 -0
  89. package/dist/core/slot/schema.d.ts +102 -0
  90. package/dist/core/slot/schema.js +17 -0
  91. package/dist/core/slot/sf-schema.d.ts +23 -0
  92. package/dist/core/slot/sf-schema.js +125 -0
  93. package/dist/core/slot/sf-validate.d.ts +14 -0
  94. package/dist/core/slot/sf-validate.js +132 -0
  95. package/dist/core/slot/snapshot.d.ts +18 -0
  96. package/dist/core/slot/snapshot.js +138 -0
  97. package/dist/core/slot/types.d.ts +144 -0
  98. package/dist/core/slot/types.js +2 -0
  99. package/dist/core/slot/value.d.ts +9 -0
  100. package/dist/core/slot/value.js +97 -0
  101. package/dist/core/slot/write.d.ts +41 -0
  102. package/dist/core/slot/write.js +319 -0
  103. package/dist/core/stage/builders.d.ts +36 -0
  104. package/dist/core/stage/builders.js +28 -0
  105. package/dist/core/stage/condition.d.ts +17 -0
  106. package/dist/core/stage/condition.js +198 -0
  107. package/dist/core/stage/drive.d.ts +43 -0
  108. package/dist/core/stage/drive.js +77 -0
  109. package/dist/core/stage/finish-when.d.ts +20 -0
  110. package/dist/core/stage/finish-when.js +82 -0
  111. package/dist/core/stage/flatten.d.ts +27 -0
  112. package/dist/core/stage/flatten.js +464 -0
  113. package/dist/core/stage/index.d.ts +11 -0
  114. package/dist/core/stage/index.js +10 -0
  115. package/dist/core/stage/simulate.d.ts +24 -0
  116. package/dist/core/stage/simulate.js +33 -0
  117. package/dist/core/stage/transfer-fields.d.ts +14 -0
  118. package/dist/core/stage/transfer-fields.js +88 -0
  119. package/dist/core/stage/types.d.ts +177 -0
  120. package/dist/core/stage/types.js +2 -0
  121. package/dist/core/stage/validate.d.ts +11 -0
  122. package/dist/core/stage/validate.js +226 -0
  123. package/dist/core/stage/walk.d.ts +34 -0
  124. package/dist/core/stage/walk.js +96 -0
  125. package/dist/dev-overlay/protocol.d.ts +53 -0
  126. package/dist/dev-overlay/protocol.js +21 -0
  127. package/dist/fn-context/build-context.d.ts +11 -0
  128. package/dist/fn-context/build-context.js +21 -0
  129. package/dist/fn-context/fake/empty-api.d.ts +9 -0
  130. package/dist/fn-context/fake/empty-api.js +50 -0
  131. package/dist/fn-context/fake/index.d.ts +12 -0
  132. package/dist/fn-context/fake/index.js +22 -0
  133. package/dist/fn-context/index.d.ts +9 -0
  134. package/dist/fn-context/index.js +8 -0
  135. package/dist/fn-context/log.d.ts +8 -0
  136. package/dist/fn-context/log.js +29 -0
  137. package/dist/fn-context/make-ctx.d.ts +9 -0
  138. package/dist/fn-context/make-ctx.js +51 -0
  139. package/dist/fn-context/rpc/errors.d.ts +25 -0
  140. package/dist/fn-context/rpc/errors.js +23 -0
  141. package/dist/fn-context/rpc/index.d.ts +10 -0
  142. package/dist/fn-context/rpc/index.js +9 -0
  143. package/dist/fn-context/rpc/integration/index.d.ts +51 -0
  144. package/dist/fn-context/rpc/integration/index.js +19 -0
  145. package/dist/fn-context/rpc/integration/list-bindings.d.ts +21 -0
  146. package/dist/fn-context/rpc/integration/list-bindings.js +18 -0
  147. package/dist/fn-context/rpc/log.d.ts +36 -0
  148. package/dist/fn-context/rpc/log.js +16 -0
  149. package/dist/fn-context/rpc/platform.d.ts +28 -0
  150. package/dist/fn-context/rpc/platform.js +15 -0
  151. package/dist/fn-context/rpc/request-id.d.ts +5 -0
  152. package/dist/fn-context/rpc/request-id.js +13 -0
  153. package/dist/fn-context/rpc/trpc-client.d.ts +7 -0
  154. package/dist/fn-context/rpc/trpc-client.js +109 -0
  155. package/dist/fn-context/rpc/trpc-init.d.ts +17 -0
  156. package/dist/fn-context/rpc/trpc-init.js +17 -0
  157. package/dist/fn-context/rpc/trpc-router-factory.d.ts +84 -0
  158. package/dist/fn-context/rpc/trpc-router-factory.js +9 -0
  159. package/dist/fn-context/types.d.ts +17 -0
  160. package/dist/fn-context/types.js +2 -0
  161. package/dist/index.d.ts +47 -0
  162. package/dist/index.js +34 -0
  163. package/dist/voice-service/actions.d.ts +20 -0
  164. package/dist/voice-service/actions.js +2 -0
  165. package/dist/voice-service/index.d.ts +3 -0
  166. package/dist/voice-service/index.js +3 -0
  167. package/dist/voice-service/types.d.ts +1010 -0
  168. package/dist/voice-service/types.js +16 -0
  169. package/package.json +55 -0
@@ -0,0 +1,17 @@
1
+ import { initTRPC, TRPCError } from '@trpc/server';
2
+ import { isRpcCodedError } from './errors.js';
3
+ const t = initTRPC.context().create();
4
+ export const router = t.router;
5
+ /**
6
+ * Applied to every procedure so domain errors reach the caller with the status they declared,
7
+ * without each dispatcher wrapping its own body in try/catch.
8
+ */
9
+ export const publicProcedure = t.procedure.use(async ({ next }) => {
10
+ const result = await next();
11
+ if (!result.ok && isRpcCodedError(result.error.cause)) {
12
+ const cause = result.error.cause;
13
+ throw new TRPCError({ code: cause.rpcCode, message: cause.message, cause });
14
+ }
15
+ return result;
16
+ });
17
+ //# sourceMappingURL=trpc-init.js.map
@@ -0,0 +1,84 @@
1
+ import { createIntegrationRouter } from './integration/index.js';
2
+ import { createLogRouter } from './log.js';
3
+ import { createPlatformRouter } from './platform.js';
4
+ export declare function createAppRouter(modules: {
5
+ integration: ReturnType<typeof createIntegrationRouter>;
6
+ platform: ReturnType<typeof createPlatformRouter>;
7
+ log: ReturnType<typeof createLogRouter>;
8
+ }): import("@trpc/server").TRPCBuiltRouter<{
9
+ ctx: import("./trpc-init.js").RpcContext;
10
+ meta: object;
11
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
12
+ transformer: false;
13
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
14
+ integration: import("@trpc/server").TRPCBuiltRouter<{
15
+ ctx: import("./trpc-init.js").RpcContext;
16
+ meta: object;
17
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
18
+ transformer: false;
19
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
20
+ listBindings: import("@trpc/server").TRPCQueryProcedure<{
21
+ input: void;
22
+ output: {
23
+ surfaceKey: "docusigns" | "envs" | "filevines" | "hubspots" | "twilios";
24
+ target: {
25
+ kind: "account" | "resource";
26
+ id: string;
27
+ };
28
+ name: string;
29
+ methods: string[];
30
+ credentials: Record<string, unknown>;
31
+ config: Record<string, unknown>;
32
+ }[];
33
+ meta: object;
34
+ }>;
35
+ invoke: import("@trpc/server").TRPCMutationProcedure<{
36
+ input: {
37
+ target: {
38
+ kind: "account" | "resource";
39
+ id: string;
40
+ };
41
+ method: string;
42
+ params?: Record<string, unknown> | undefined;
43
+ };
44
+ output: unknown;
45
+ meta: object;
46
+ }>;
47
+ }>>;
48
+ platform: import("@trpc/server").TRPCBuiltRouter<{
49
+ ctx: import("./trpc-init.js").RpcContext;
50
+ meta: object;
51
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
52
+ transformer: false;
53
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
54
+ invoke: import("@trpc/server").TRPCMutationProcedure<{
55
+ input: {
56
+ surface: string;
57
+ method: string;
58
+ params?: Record<string, unknown> | undefined;
59
+ };
60
+ output: unknown;
61
+ meta: object;
62
+ }>;
63
+ }>>;
64
+ log: import("@trpc/server").TRPCBuiltRouter<{
65
+ ctx: import("./trpc-init.js").RpcContext;
66
+ meta: object;
67
+ errorShape: import("@trpc/server").TRPCDefaultErrorShape;
68
+ transformer: false;
69
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
70
+ emit: import("@trpc/server").TRPCMutationProcedure<{
71
+ input: {
72
+ level: "error" | "info" | "warn";
73
+ message: string;
74
+ extra?: Record<string, unknown> | undefined;
75
+ };
76
+ output: {
77
+ ok: true;
78
+ };
79
+ meta: object;
80
+ }>;
81
+ }>>;
82
+ }>>;
83
+ export type AppRouter = ReturnType<typeof createAppRouter>;
84
+ //# sourceMappingURL=trpc-router-factory.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { router } from './trpc-init.js';
2
+ export function createAppRouter(modules) {
3
+ return router({
4
+ integration: modules.integration,
5
+ platform: modules.platform,
6
+ log: modules.log,
7
+ });
8
+ }
9
+ //# sourceMappingURL=trpc-router-factory.js.map
@@ -0,0 +1,17 @@
1
+ import type { SystemContext } from '../core/context/types.js';
2
+ /** Alias for {@link SystemContext} (08 ActionContext shape). */
3
+ export type ActionContext = SystemContext;
4
+ /** JSON-serializable data slice of ActionContext (no `api`). */
5
+ export type ActionDataSlice = Pick<ActionContext, 'time' | 'meta' | 'config'>;
6
+ /** Identity / scope for a single function invocation (ApiHost may key caches on this). */
7
+ export type RunScope = {
8
+ companyId: string;
9
+ environmentId: string;
10
+ sequenceId: string;
11
+ entry: string;
12
+ };
13
+ /** Who fulfills `ctx.api` (Fake local vs Rpc remote). */
14
+ export type ApiHost = {
15
+ buildApi(run: RunScope): Promise<ActionContext['api']>;
16
+ };
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,47 @@
1
+ export type { CompanyDerivedFieldDef, CompanyFieldDef, CompanyNormalFieldDef, CompanySchema, CompanyTableDef, DataType, EffectiveFieldDef, EffectiveSchema, EffectiveTableDef, FieldOverride, SequenceCompanyTableView, SequenceSlots, NormalFieldCore, SessionTableDef, } from './core/slot/schema.js';
2
+ export { ROW_ID_FIELD, idField, idFieldCore } from './core/slot/schema.js';
3
+ export { integrationSurfaceKeys } from './core/context/types.js';
4
+ export { idRef } from './core/slot/id-ref.js';
5
+ export type { HubspotApi, HubspotAssociationListOutput, HubspotCreateContactInput, HubspotCreateContactOutput, HubspotCreateDealInput, HubspotCreateDealOutput, HubspotCreateNoteInput, HubspotCreateTaskInput, HubspotEngagementOutput, HubspotGetAssociatedContactsInput, HubspotGetAssociatedDealsInput, HubspotGetContactInput, HubspotGetContactOutput, HubspotGetCrmUrlInput, HubspotGetCrmUrlOutput, HubspotGetDealInput, HubspotGetDealOutput, HubspotGetOwnerInput, HubspotGetOwnerOutput, HubspotLogCallInput, HubspotLogEmailInput, HubspotLogSmsInput, HubspotRecord, HubspotSearchContactsInput, HubspotSearchContactsOutput, HubspotService, HubspotUpdateContactInput, HubspotUpdateContactOutput, HubspotUpdateDealInput, HubspotUpdateDealOutput, HubspotUpsertContactInput, HubspotUpsertContactOutput, } from './core/context/hubspot.js';
6
+ export type { DocusignApi, DocusignCreateEnvelopeFromTemplateInput, DocusignCreateEnvelopeFromTemplateOutput, DocusignCreateRecipientViewFromTemplateInput, DocusignCreateRecipientViewFromTemplateOutput, DocusignEnvelopeIdInput, DocusignGetEnvelopeRecipientsOutput, DocusignGetEnvelopeSigningStatusOutput, DocusignGetEnvelopeStatusOutput, DocusignListRecentEnvelopesInput, DocusignListRecentEnvelopesOutput, DocusignListTemplatesOutput, DocusignRecentEnvelope, DocusignRecipient, DocusignSearchEnvelopesByEmailInput, DocusignSearchEnvelopesByEmailOutput, DocusignService, } from './core/context/docusign.js';
7
+ export type { FilevineAddHashtagToProjectInput, FilevineAddHashtagToProjectOutput, FilevineApi, FilevineCollectionItemInput, FilevineCommentOutput, FilevineCreateCommentInput, FilevineCreateContactInput, FilevineCreateContactOutput, FilevineCreateNoteInput, FilevineCreateNoteWithCommentInput, FilevineCreateNoteWithCommentOutput, FilevineCreateProjectCollectionItemInput, FilevineCreateProjectCollectionItemOutput, FilevineCreateProjectInput, FilevineCreateProjectOutput, FilevineDeleteProjectCollectionItemInput, FilevineDeleteProjectCollectionItemOutput, FilevineFolder, FilevineGetAssociatedProjectsInput, FilevineGetAssociatedProjectsOutput, FilevineGetContactInput, FilevineGetContactOutput, FilevineGetCrmUrlInput, FilevineGetCrmUrlOutput, FilevineGetProjectCollectionItemInput, FilevineGetProjectCollectionItemOutput, FilevineGetProjectCollectionItemsInput, FilevineGetProjectCollectionItemsOutput, FilevineGetProjectFoldersInput, FilevineGetProjectFoldersOutput, FilevineGetProjectInput, FilevineGetProjectOutput, FilevineLogCallInput, FilevineLogEmailInput, FilevineLogSmsInput, FilevineNoteOutput, FilevineProperties, FilevineRecord, FilevineSearchContactsInput, FilevineSearchContactsOutput, FilevineService, FilevineUpdateContactInput, FilevineUpdateContactOutput, FilevineUpdateProjectCollectionItemInput, FilevineUpdateProjectCollectionItemOutput, FilevineUpdateProjectInput, FilevineUpdateProjectOutput, FilevineUploadDocumentInput, FilevineUploadDocumentOutput, } from './core/context/filevine.js';
8
+ export type { CaseContext, ContactApi, BoundIntegrationMeta, EnvApi, EnvService, FieldState, HttpApi, IntegrationAccountFields, IntegrationApi, IntegrationStub, IntegrationSurfaceKey, IntegrationTarget, TwilioApi, TwilioCreateCallInput, TwilioCreateCallOutput, TwilioIncomingNumber, TwilioListIncomingNumbersOutput, TwilioSendSmsInput, TwilioSendSmsOutput, TwilioService, Logger, MakeCtxOverrides, Slots, SystemContext, Writes, } from './core/context/types.js';
9
+ export { CONTACT_PAGE_LIMIT_MAX, contactListInput, contactListOutput, contactMockService, contactSummary, contactSurface, type ContactListParams, type ContactListResult, type ContactSummary, } from './core/context/contact.js';
10
+ export { dbDelInput, dbDelOutput, dbGetInput, dbGetOutput, dbMockService, dbSetInput, dbSetOutput, dbSurface, KV_KEY_MAX, KV_TTL_SECONDS_MAX, KV_VALUE_MAX, type DbApi, type DbDelInput, type DbDelOutput, type DbGetInput, type DbGetOutput, type DbSetInput, type DbSetOutput, } from './core/context/db.js';
11
+ export { bindEnvService, envMockService, readEnvGet } from './core/context/env.js';
12
+ export type { AnyPlatformSurface, PlatformApiShape, PlatformImpl, PlatformSurface } from './core/context/platform.js';
13
+ export { platformSurfaces, type PlatformApis, type PlatformSurfaceKey } from './core/context/platform-registry.js';
14
+ export { defaultHttpApi } from './core/context/http.js';
15
+ export { hubspotAssociationListOutput, hubspotCreateContactInput, hubspotCreateContactOutput, hubspotCreateDealInput, hubspotCreateDealOutput, hubspotCreateNoteInput, hubspotCreateTaskInput, hubspotEngagementOutput, hubspotGetAssociatedContactsInput, hubspotGetAssociatedDealsInput, hubspotGetContactInput, hubspotGetContactOutput, hubspotGetCrmUrlInput, hubspotGetCrmUrlOutput, hubspotGetDealInput, hubspotGetDealOutput, hubspotGetOwnerInput, hubspotGetOwnerOutput, hubspotLogCallInput, hubspotLogEmailInput, hubspotLogSmsInput, hubspotMockService, hubspotSearchContactsInput, hubspotSearchContactsOutput, hubspotUpdateContactInput, hubspotUpdateContactOutput, hubspotUpdateDealInput, hubspotUpdateDealOutput, hubspotUpsertContactInput, hubspotUpsertContactOutput, } from './core/context/hubspot.js';
16
+ export { docusignCreateEnvelopeFromTemplateInput, docusignCreateEnvelopeFromTemplateOutput, docusignCreateRecipientViewFromTemplateInput, docusignCreateRecipientViewFromTemplateOutput, docusignEnvelopeIdInput, docusignGetEnvelopeRecipientsOutput, docusignGetEnvelopeSigningStatusOutput, docusignGetEnvelopeStatusOutput, docusignListRecentEnvelopesInput, docusignListRecentEnvelopesOutput, docusignListTemplatesOutput, docusignMockService, docusignSearchEnvelopesByEmailInput, docusignSearchEnvelopesByEmailOutput, } from './core/context/docusign.js';
17
+ export { filevineAddHashtagToProjectInput, filevineAddHashtagToProjectOutput, filevineCollectionItemInput, filevineCommentOutput, filevineCreateCommentInput, filevineCreateContactInput, filevineCreateContactOutput, filevineCreateNoteInput, filevineCreateNoteWithCommentInput, filevineCreateNoteWithCommentOutput, filevineCreateProjectCollectionItemInput, filevineCreateProjectCollectionItemOutput, filevineCreateProjectInput, filevineCreateProjectOutput, filevineDeleteProjectCollectionItemInput, filevineDeleteProjectCollectionItemOutput, filevineGetAssociatedProjectsInput, filevineGetAssociatedProjectsOutput, filevineGetContactInput, filevineGetContactOutput, filevineGetCrmUrlInput, filevineGetCrmUrlOutput, filevineGetProjectCollectionItemInput, filevineGetProjectCollectionItemOutput, filevineGetProjectCollectionItemsInput, filevineGetProjectCollectionItemsOutput, filevineGetProjectFoldersInput, filevineGetProjectFoldersOutput, filevineGetProjectInput, filevineGetProjectOutput, filevineLogCallInput, filevineLogEmailInput, filevineLogSmsInput, filevineMockService, filevineNoteOutput, filevineSearchContactsInput, filevineSearchContactsOutput, filevineUpdateContactInput, filevineUpdateContactOutput, filevineUpdateProjectCollectionItemInput, filevineUpdateProjectCollectionItemOutput, filevineUpdateProjectInput, filevineUpdateProjectOutput, filevineUploadDocumentInput, filevineUploadDocumentOutput, } from './core/context/filevine.js';
18
+ export { twilioCreateCallInput, twilioCreateCallOutput, twilioIncomingNumber, twilioListIncomingNumbersOutput, twilioMockService, twilioSendSmsInput, twilioSendSmsOutput, } from './core/context/twilio.js';
19
+ export type { ApplyWritesOptions, ApplyWritesResult, CompiledSlotSchema, ExtractedField, FieldHistoryEntry, FieldValue, HistoryAppend, MultiRowProjection, MultiRowRecord, MultiRowTableData, RecomputeResult, RuntimeDerivedFieldDef, RuntimeFieldDef, RuntimeNormalFieldDef, RuntimeSlotsSnapshot, RuntimeTableDef, SingleRowProjection, SingleRowTableData, SlotCurrent, SlotFillingOutput, SlotFillingValidateResult, TableData, UpdatedBy, ValidationIssue, ValidationResult, WriteSource, } from './core/slot/types.js';
20
+ export type { FuncRef } from './core/functions/func-ref.js';
21
+ export { resolveFuncName } from './core/functions/func-ref.js';
22
+ export type { SequenceBuild } from './builder/types.js';
23
+ export type { CaseContextViewRegistryEntry, ComputeFn, CustomFn, DefinedFunc, FuncMap, FuncOptions, FuncRegistration, FunctionCall, FunctionCtx, FunctionRegistry, FunctionRegistryEntry, GetFirstMessageFunction, GetFirstMessageParams, SystemFuncMap, WebHookFunction, WebHookFunctionParams, } from './core/functions/types.js';
24
+ export { toFuncRegistrations } from './core/functions/types.js';
25
+ export { toCaseContextViewRegistry, toFunctionRegistry } from './builder/compile/registry.js';
26
+ export { compileFunctionCode } from './builder/compile/function-code.js';
27
+ export { compileAll, compileSequence, snapshotCompanySchema, type CompileSequenceOptions, type CompileSequenceResult, } from './builder/compile/compile-sequence.js';
28
+ export { compileSequenceAgendas, fatalAgendaIssues } from './builder/compile/compile-agenda.js';
29
+ export { loadSequenceCaseContextView, loadSequenceFunctions } from './builder/load.js';
30
+ export { findTsModule } from './builder/paths.js';
31
+ export type { OverlayClientMessage, OverlayExecuteMessage, OverlayExecuteResultMessage, OverlayAuthErrorMessage, OverlayAuthMessage, OverlayAuthOkMessage, OverlayMessage, OverlayPushMessage, OverlayReplacedMessage, OverlayServerMessage, } from './dev-overlay/protocol.js';
32
+ export { encodeOverlayMessage, OVERLAY_REPLACED_CLOSE_CODE, parseOverlayMessage } from './dev-overlay/protocol.js';
33
+ export { buildActionContext, bindLogMeta, createFakeApiHost, defaultPlatformApis, emptyIntegration, createRpcApiHost, REQUEST_ID_HEADER, readRequestIdHeader, makeCtx, makeCtxAsync, noopLog, type ActionContext, type ActionDataSlice, type ApiHost, type FakeApiHostOptions, type RunScope, } from './fn-context/index.js';
34
+ export { createAppRouter, createIntegrationRouter, createListBindingsProcedure, createLogRouter, createPlatformRouter, isRpcCodedError, parseScriptInput, ScriptInputError, type AppRouter, type RpcCodedError, type RpcErrorCode, type IntegrationInvokeHandler, type LogEmitHandler, type PlatformInvokeHandler, type RpcContext, } from './fn-context/rpc/index.js';
35
+ export * from './compute-host/index.js';
36
+ export { defineBoolComputeFunc, defineComputeFunc } from './core/functions/define/compute.js';
37
+ export { defineCaseContext, resolveCaseContextViewFn, type CaseContextOf, type CaseContextViewFn, type DefinedCaseContextView, } from './core/functions/define/case-context.js';
38
+ export { defineCustomFunc } from './core/functions/define/custom.js';
39
+ export { defineSystemFunc } from './core/functions/define/system.js';
40
+ export { mergeEffectiveSchema } from './builder/merge.js';
41
+ export { emitCaseContextSource, emitSlotsSource } from './builder/codegen/emit.js';
42
+ export { affectedDerivedFields, applyFieldPatch, applyFieldPatchAndRecompute, applySlotFilling, applySlotFillingAndRecompute, applyWrites, applyWritesAndRecompute, buildDependencyGraph, buildFieldCatalog, buildSlotFillingJsonSchema, cloneSnapshot, commitFieldWrite, compiledTableEntries, compileSlotSchema, emptyFieldValue, emptyMultiRow, emptySlotRow, fieldChanged, formatFieldPath, getCompiledTable, getFieldState, getFieldValue, getLastThreeValues, getRowField, getSingleField, getSnapshotTable, isFieldValue, isReservedTableName, isResolved, isRowIdField, mintRowId, SNAPSHOT_CURRENT_KEY, isSnapshotSingleRow, isValidDataTypeValue, listConversationFields, makeFieldValue, markAskedUnknown, parseFieldPath, recomputeDerived, requireFieldPath, rowValueEntries, slotFieldEntries, slotFieldNames, snapshotFrom, toEffectiveSchema, toHistoryEntry, validateBareValue, validateExtractedField, validateFieldRefs, validateSlotFillingOutput, } from './core/slot/index.js';
43
+ export type { ApplySlotFillingOptions, DependencyGraphResult, FieldPatchInput, FieldPath, ParsedFieldPath, RecomputeOptions, SfSchemaOptions, SlotRow, SnapshotSeed, ValidateSlotFillingOptions, } from './core/slot/index.js';
44
+ export type { ActionBlock, ActionNode, AgendaBlock, AgendaConfig, AgendaHeader, AgendaTree, ApplyWhen, AuthoringNode, AuthoringWhen, BranchNode, Channel, CompiledActionBlock, CompiledAgenda, CompiledAgendaBlock, CompiledTopicBlock, CompiledTransferBlock, CompiledWhen, Condition, ConditionEval, FirstMessage, FinishWhen, FinishWhenEval, FlatActionItem, FlatAgendaItem, FlatNodePlacement, FlatTopicItem, FlatTransferItem, FlattenOptions, FlattenResult, Interrupt, SequenceAgendas, JsonRulesCondition, NodePlacement, OnNoProgress, OtherwiseSentinel, Placement, SectionNode, SectionPlacement, SimulateResult, SimulatedItem, SimulatedItemStatus, SwitchOnNode, TopicBlock, TopicNode, TransferBlock, TransferNode, ValidateAgendaOptions, WalkDecision, WalkHitReason, WalkOptions, WalkResult, WalkSkip, WalkSkipReason, When, WhenEval, AdvanceResult, StageDriveHooks, StageDriveResult, StageDriveState, } from './core/stage/index.js';
45
+ export { DEFAULT_MAX_ACTIONS_PER_TURN, LAST_TRANSFER_RESULT_FIELD, action, advanceAgenda, agenda, andCompiledWhen, branch, collectJsonRulesFacts, collectTransferBlocks, compileAuthoringWhen, compileFinishWhen, compileWhen, driveAgenda, evaluateFinishWhen, evaluateJsonRules, evaluateWhen, extractBlocksFromTree, extractTemplateFields, finishWhenFields, flattenAgendaConfig, flattenAgendaPlacements, flattenAgendaTree, isAgendaTree, isSequenceAgendas, isOtherwise, jsonRules, looksLikeJsonRules, normalizeJsonRules, normalizeSequenceAgendas, notAnyWhen, otherwise, parseJsonRules, registerTransferSessionFields, section, simulateAgenda, switchOn, topic, transfer, transferFieldKey, transferResultField, transferWrites, treeToPlacements, unresolvedFinishWhenFields, validateCompiledAgenda, walkAgenda, watchdogHint, whenFields, } from './core/stage/index.js';
46
+ export * from './voice-service/index.js';
47
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,34 @@
1
+ export { ROW_ID_FIELD, idField, idFieldCore } from './core/slot/schema.js';
2
+ export { integrationSurfaceKeys } from './core/context/types.js';
3
+ export { idRef } from './core/slot/id-ref.js';
4
+ export { CONTACT_PAGE_LIMIT_MAX, contactListInput, contactListOutput, contactMockService, contactSummary, contactSurface, } from './core/context/contact.js';
5
+ export { dbDelInput, dbDelOutput, dbGetInput, dbGetOutput, dbMockService, dbSetInput, dbSetOutput, dbSurface, KV_KEY_MAX, KV_TTL_SECONDS_MAX, KV_VALUE_MAX, } from './core/context/db.js';
6
+ export { bindEnvService, envMockService, readEnvGet } from './core/context/env.js';
7
+ export { platformSurfaces } from './core/context/platform-registry.js';
8
+ export { defaultHttpApi } from './core/context/http.js';
9
+ export { hubspotAssociationListOutput, hubspotCreateContactInput, hubspotCreateContactOutput, hubspotCreateDealInput, hubspotCreateDealOutput, hubspotCreateNoteInput, hubspotCreateTaskInput, hubspotEngagementOutput, hubspotGetAssociatedContactsInput, hubspotGetAssociatedDealsInput, hubspotGetContactInput, hubspotGetContactOutput, hubspotGetCrmUrlInput, hubspotGetCrmUrlOutput, hubspotGetDealInput, hubspotGetDealOutput, hubspotGetOwnerInput, hubspotGetOwnerOutput, hubspotLogCallInput, hubspotLogEmailInput, hubspotLogSmsInput, hubspotMockService, hubspotSearchContactsInput, hubspotSearchContactsOutput, hubspotUpdateContactInput, hubspotUpdateContactOutput, hubspotUpdateDealInput, hubspotUpdateDealOutput, hubspotUpsertContactInput, hubspotUpsertContactOutput, } from './core/context/hubspot.js';
10
+ export { docusignCreateEnvelopeFromTemplateInput, docusignCreateEnvelopeFromTemplateOutput, docusignCreateRecipientViewFromTemplateInput, docusignCreateRecipientViewFromTemplateOutput, docusignEnvelopeIdInput, docusignGetEnvelopeRecipientsOutput, docusignGetEnvelopeSigningStatusOutput, docusignGetEnvelopeStatusOutput, docusignListRecentEnvelopesInput, docusignListRecentEnvelopesOutput, docusignListTemplatesOutput, docusignMockService, docusignSearchEnvelopesByEmailInput, docusignSearchEnvelopesByEmailOutput, } from './core/context/docusign.js';
11
+ export { filevineAddHashtagToProjectInput, filevineAddHashtagToProjectOutput, filevineCollectionItemInput, filevineCommentOutput, filevineCreateCommentInput, filevineCreateContactInput, filevineCreateContactOutput, filevineCreateNoteInput, filevineCreateNoteWithCommentInput, filevineCreateNoteWithCommentOutput, filevineCreateProjectCollectionItemInput, filevineCreateProjectCollectionItemOutput, filevineCreateProjectInput, filevineCreateProjectOutput, filevineDeleteProjectCollectionItemInput, filevineDeleteProjectCollectionItemOutput, filevineGetAssociatedProjectsInput, filevineGetAssociatedProjectsOutput, filevineGetContactInput, filevineGetContactOutput, filevineGetCrmUrlInput, filevineGetCrmUrlOutput, filevineGetProjectCollectionItemInput, filevineGetProjectCollectionItemOutput, filevineGetProjectCollectionItemsInput, filevineGetProjectCollectionItemsOutput, filevineGetProjectFoldersInput, filevineGetProjectFoldersOutput, filevineGetProjectInput, filevineGetProjectOutput, filevineLogCallInput, filevineLogEmailInput, filevineLogSmsInput, filevineMockService, filevineNoteOutput, filevineSearchContactsInput, filevineSearchContactsOutput, filevineUpdateContactInput, filevineUpdateContactOutput, filevineUpdateProjectCollectionItemInput, filevineUpdateProjectCollectionItemOutput, filevineUpdateProjectInput, filevineUpdateProjectOutput, filevineUploadDocumentInput, filevineUploadDocumentOutput, } from './core/context/filevine.js';
12
+ export { twilioCreateCallInput, twilioCreateCallOutput, twilioIncomingNumber, twilioListIncomingNumbersOutput, twilioMockService, twilioSendSmsInput, twilioSendSmsOutput, } from './core/context/twilio.js';
13
+ export { resolveFuncName } from './core/functions/func-ref.js';
14
+ export { toFuncRegistrations } from './core/functions/types.js';
15
+ export { toCaseContextViewRegistry, toFunctionRegistry } from './builder/compile/registry.js';
16
+ export { compileFunctionCode } from './builder/compile/function-code.js';
17
+ export { compileAll, compileSequence, snapshotCompanySchema, } from './builder/compile/compile-sequence.js';
18
+ export { compileSequenceAgendas, fatalAgendaIssues } from './builder/compile/compile-agenda.js';
19
+ export { loadSequenceCaseContextView, loadSequenceFunctions } from './builder/load.js';
20
+ export { findTsModule } from './builder/paths.js';
21
+ export { encodeOverlayMessage, OVERLAY_REPLACED_CLOSE_CODE, parseOverlayMessage } from './dev-overlay/protocol.js';
22
+ export { buildActionContext, bindLogMeta, createFakeApiHost, defaultPlatformApis, emptyIntegration, createRpcApiHost, REQUEST_ID_HEADER, readRequestIdHeader, makeCtx, makeCtxAsync, noopLog, } from './fn-context/index.js';
23
+ export { createAppRouter, createIntegrationRouter, createListBindingsProcedure, createLogRouter, createPlatformRouter, isRpcCodedError, parseScriptInput, ScriptInputError, } from './fn-context/rpc/index.js';
24
+ export * from './compute-host/index.js';
25
+ export { defineBoolComputeFunc, defineComputeFunc } from './core/functions/define/compute.js';
26
+ export { defineCaseContext, resolveCaseContextViewFn, } from './core/functions/define/case-context.js';
27
+ export { defineCustomFunc } from './core/functions/define/custom.js';
28
+ export { defineSystemFunc } from './core/functions/define/system.js';
29
+ export { mergeEffectiveSchema } from './builder/merge.js';
30
+ export { emitCaseContextSource, emitSlotsSource } from './builder/codegen/emit.js';
31
+ export { affectedDerivedFields, applyFieldPatch, applyFieldPatchAndRecompute, applySlotFilling, applySlotFillingAndRecompute, applyWrites, applyWritesAndRecompute, buildDependencyGraph, buildFieldCatalog, buildSlotFillingJsonSchema, cloneSnapshot, commitFieldWrite, compiledTableEntries, compileSlotSchema, emptyFieldValue, emptyMultiRow, emptySlotRow, fieldChanged, formatFieldPath, getCompiledTable, getFieldState, getFieldValue, getLastThreeValues, getRowField, getSingleField, getSnapshotTable, isFieldValue, isReservedTableName, isResolved, isRowIdField, mintRowId, SNAPSHOT_CURRENT_KEY, isSnapshotSingleRow, isValidDataTypeValue, listConversationFields, makeFieldValue, markAskedUnknown, parseFieldPath, recomputeDerived, requireFieldPath, rowValueEntries, slotFieldEntries, slotFieldNames, snapshotFrom, toEffectiveSchema, toHistoryEntry, validateBareValue, validateExtractedField, validateFieldRefs, validateSlotFillingOutput, } from './core/slot/index.js';
32
+ export { DEFAULT_MAX_ACTIONS_PER_TURN, LAST_TRANSFER_RESULT_FIELD, action, advanceAgenda, agenda, andCompiledWhen, branch, collectJsonRulesFacts, collectTransferBlocks, compileAuthoringWhen, compileFinishWhen, compileWhen, driveAgenda, evaluateFinishWhen, evaluateJsonRules, evaluateWhen, extractBlocksFromTree, extractTemplateFields, finishWhenFields, flattenAgendaConfig, flattenAgendaPlacements, flattenAgendaTree, isAgendaTree, isSequenceAgendas, isOtherwise, jsonRules, looksLikeJsonRules, normalizeJsonRules, normalizeSequenceAgendas, notAnyWhen, otherwise, parseJsonRules, registerTransferSessionFields, section, simulateAgenda, switchOn, topic, transfer, transferFieldKey, transferResultField, transferWrites, treeToPlacements, unresolvedFinishWhenFields, validateCompiledAgenda, walkAgenda, watchdogHint, whenFields, } from './core/stage/index.js';
33
+ export * from './voice-service/index.js';
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,20 @@
1
+ import type { CallEndEvent, CallRecordedEvent, CallStatusChangeEvent, ChatItemWithCallSid, FieldCollectResponse, IncomingOutgoingCall, TransferEvent } from './types.js';
2
+ /** Superpanel SDK-owned action dispatch types. Do not add to types.ts — that file is overwritten from Mars. */
3
+ export type VoiceServiceActionName = 'fetchTwilioConfig' | 'onInbound' | 'onCallStart' | 'onCallEnd' | 'onCallStatusChanged' | 'onChatItem' | 'onOutbound' | 'onTransferEvents' | 'onFieldCollectCompleted' | 'onCallRecorded';
4
+ export type VoiceServiceActionMap = {
5
+ fetchTwilioConfig: IncomingOutgoingCall;
6
+ onInbound: IncomingOutgoingCall;
7
+ onCallStart: IncomingOutgoingCall;
8
+ onCallEnd: CallEndEvent;
9
+ onCallStatusChanged: CallStatusChangeEvent;
10
+ onChatItem: ChatItemWithCallSid;
11
+ onOutbound: IncomingOutgoingCall;
12
+ onTransferEvents: TransferEvent;
13
+ onFieldCollectCompleted: FieldCollectResponse;
14
+ onCallRecorded: CallRecordedEvent;
15
+ };
16
+ export type VoiceServiceActionRequest<A extends VoiceServiceActionName = VoiceServiceActionName> = {
17
+ action: A;
18
+ params: VoiceServiceActionMap[A];
19
+ };
20
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1,3 @@
1
+ export * from './types.js';
2
+ export * from './actions.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './types.js';
2
+ export * from './actions.js';
3
+ //# sourceMappingURL=index.js.map