@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.
Files changed (282) hide show
  1. package/README.md +28 -8
  2. package/dist/builder/codegen/emit.d.ts +29 -11
  3. package/dist/builder/codegen/emit.js +328 -61
  4. package/dist/builder/codegen/generate.d.ts +21 -0
  5. package/dist/builder/codegen/generate.js +152 -20
  6. package/dist/builder/company-import-graph.d.ts +2 -0
  7. package/dist/builder/company-import-graph.js +40 -8
  8. package/dist/builder/company-imports.d.ts +24 -0
  9. package/dist/builder/company-imports.js +114 -0
  10. package/dist/builder/compile/compile-sequence.d.ts +59 -8
  11. package/dist/builder/compile/compile-sequence.js +279 -77
  12. package/dist/builder/compile/function-code.d.ts +12 -2
  13. package/dist/builder/compile/function-code.js +87 -39
  14. package/dist/builder/compile/registry.d.ts +7 -3
  15. package/dist/builder/compile/registry.js +24 -23
  16. package/dist/builder/load.d.ts +70 -10
  17. package/dist/builder/load.js +250 -61
  18. package/dist/builder/paths.d.ts +3 -0
  19. package/dist/builder/paths.js +16 -0
  20. package/dist/builder/schedules.d.ts +23 -0
  21. package/dist/builder/schedules.js +102 -0
  22. package/dist/builder/slot-schema-validation.d.ts +4 -0
  23. package/dist/builder/slot-schema-validation.js +10 -0
  24. package/dist/builder/typecheck.d.ts +8 -0
  25. package/dist/builder/typecheck.js +105 -0
  26. package/dist/builder/types.d.ts +91 -19
  27. package/dist/builder/types.js +2 -1
  28. package/dist/cli/auth/auth.d.ts +37 -0
  29. package/dist/cli/auth/auth.js +211 -0
  30. package/dist/cli/auth/backend-url.d.ts +5 -0
  31. package/dist/cli/auth/backend-url.js +25 -0
  32. package/dist/cli/auth/clipboard.d.ts +9 -0
  33. package/dist/cli/auth/clipboard.js +38 -0
  34. package/dist/cli/auth/http.d.ts +20 -0
  35. package/dist/cli/auth/http.js +27 -0
  36. package/dist/cli/auth/index.d.ts +10 -0
  37. package/dist/cli/auth/index.js +27 -0
  38. package/dist/cli/auth/progress.d.ts +12 -0
  39. package/dist/cli/auth/progress.js +15 -0
  40. package/dist/cli/auth/serve-login.d.ts +8 -0
  41. package/dist/cli/auth/serve-login.js +24 -0
  42. package/dist/cli/compile/index.js +3 -0
  43. package/dist/cli/config.d.ts +10 -0
  44. package/dist/cli/config.js +52 -0
  45. package/dist/cli/index.js +28 -8
  46. package/dist/cli/serve/index.d.ts +73 -3
  47. package/dist/cli/serve/index.js +365 -116
  48. package/dist/cli/type-gen/index.js +9 -8
  49. package/dist/compiler.d.ts +7 -0
  50. package/dist/compiler.js +7 -0
  51. package/dist/compute-host/compute-host.d.ts +15 -23
  52. package/dist/compute-host/compute-host.js +25 -28
  53. package/dist/compute-host/index.d.ts +2 -4
  54. package/dist/compute-host/index.js +1 -2
  55. package/dist/compute-host/source-compute-host.d.ts +11 -9
  56. package/dist/compute-host/source-compute-host.js +46 -32
  57. package/dist/core/case-orchestrator/contact-hours.d.ts +50 -0
  58. package/dist/core/case-orchestrator/contact-hours.js +108 -0
  59. package/dist/core/case-orchestrator/follow-ups.d.ts +31 -0
  60. package/dist/core/case-orchestrator/follow-ups.js +103 -0
  61. package/dist/core/case-orchestrator/index.d.ts +6 -0
  62. package/dist/core/case-orchestrator/index.js +6 -0
  63. package/dist/core/case-orchestrator/render.d.ts +75 -0
  64. package/dist/core/case-orchestrator/render.js +239 -0
  65. package/dist/core/case-orchestrator/time.d.ts +11 -0
  66. package/dist/core/case-orchestrator/time.js +29 -0
  67. package/dist/core/case-orchestrator/tools.d.ts +29 -0
  68. package/dist/core/case-orchestrator/tools.js +31 -0
  69. package/dist/core/case-orchestrator/types.d.ts +753 -0
  70. package/dist/core/case-orchestrator/types.js +46 -0
  71. package/dist/core/case-orchestrator/validate.d.ts +11 -0
  72. package/dist/core/case-orchestrator/validate.js +63 -0
  73. package/dist/core/context/call.d.ts +291 -0
  74. package/dist/core/context/call.js +94 -0
  75. package/dist/core/context/channels.d.ts +60 -0
  76. package/dist/core/context/channels.js +35 -0
  77. package/dist/core/context/contact.d.ts +96 -6
  78. package/dist/core/context/contact.js +48 -2
  79. package/dist/core/context/email-message.d.ts +159 -0
  80. package/dist/core/context/email-message.js +59 -0
  81. package/dist/core/context/email.d.ts +97 -0
  82. package/dist/core/context/email.js +91 -0
  83. package/dist/core/context/exchanges.d.ts +142 -0
  84. package/dist/core/context/exchanges.js +63 -0
  85. package/dist/core/context/instances.d.ts +278 -0
  86. package/dist/core/context/instances.js +123 -0
  87. package/dist/core/context/kv.d.ts +113 -0
  88. package/dist/core/context/kv.js +60 -0
  89. package/dist/core/context/platform-registry.d.ts +509 -4
  90. package/dist/core/context/platform-registry.js +14 -2
  91. package/dist/core/context/platform.d.ts +2 -1
  92. package/dist/core/context/sms.d.ts +147 -0
  93. package/dist/core/context/sms.js +57 -0
  94. package/dist/core/context/types.d.ts +51 -48
  95. package/dist/core/context/types.js +1 -7
  96. package/dist/core/conversation/index.d.ts +31 -0
  97. package/dist/core/conversation/index.js +14 -0
  98. package/dist/core/functions/define/bind.d.ts +25 -0
  99. package/dist/core/functions/define/bind.js +14 -0
  100. package/dist/core/functions/define/case.d.ts +9 -0
  101. package/dist/core/functions/define/case.js +13 -0
  102. package/dist/core/functions/define/events.d.ts +20 -0
  103. package/dist/core/functions/define/events.js +21 -0
  104. package/dist/core/functions/define/no-case.d.ts +4 -0
  105. package/dist/core/functions/define/no-case.js +9 -0
  106. package/dist/core/functions/events.d.ts +247 -0
  107. package/dist/core/functions/events.js +32 -0
  108. package/dist/core/functions/func-ref.d.ts +11 -2
  109. package/dist/core/functions/schedules.d.ts +51 -0
  110. package/dist/core/functions/schedules.js +20 -0
  111. package/dist/core/functions/types.d.ts +62 -51
  112. package/dist/core/functions/types.js +6 -1
  113. package/dist/core/office-hours/index.d.ts +39 -0
  114. package/dist/core/office-hours/index.js +187 -0
  115. package/dist/core/page/define.d.ts +834 -0
  116. package/dist/core/page/define.js +477 -0
  117. package/dist/core/page/ops.d.ts +58 -0
  118. package/dist/core/page/ops.js +220 -0
  119. package/dist/core/page/render.d.ts +253 -0
  120. package/dist/core/page/render.js +840 -0
  121. package/dist/core/page/time-format.d.ts +19 -0
  122. package/dist/core/page/time-format.js +41 -0
  123. package/dist/core/page/timeline.d.ts +40 -0
  124. package/dist/core/page/timeline.js +2 -0
  125. package/dist/core/page/typed.d.ts +642 -0
  126. package/dist/core/page/typed.js +2 -0
  127. package/dist/core/page/workspace.d.ts +33 -0
  128. package/dist/core/page/workspace.js +231 -0
  129. package/dist/core/party/index.d.ts +3 -0
  130. package/dist/core/party/index.js +3 -0
  131. package/dist/core/party/schema.d.ts +137 -0
  132. package/dist/core/party/schema.js +80 -0
  133. package/dist/core/party/types.d.ts +40 -0
  134. package/dist/core/party/types.js +15 -0
  135. package/dist/core/sequence/define.d.ts +57 -0
  136. package/dist/core/sequence/define.js +10 -0
  137. package/dist/core/sequence/index.d.ts +63 -0
  138. package/dist/core/sequence/index.js +231 -0
  139. package/dist/core/slot/binding.d.ts +40 -0
  140. package/dist/core/slot/binding.js +2 -0
  141. package/dist/core/slot/company-metadata.d.ts +113 -0
  142. package/dist/core/slot/company-metadata.js +563 -0
  143. package/dist/core/slot/compile-schema.d.ts +19 -13
  144. package/dist/core/slot/compile-schema.js +51 -248
  145. package/dist/core/slot/contact-timezone.d.ts +110 -0
  146. package/dist/core/slot/contact-timezone.js +186 -0
  147. package/dist/core/slot/field.d.ts +2 -24
  148. package/dist/core/slot/field.js +0 -69
  149. package/dist/core/slot/id-ref.d.ts +17 -2
  150. package/dist/core/slot/id-ref.js +16 -8
  151. package/dist/core/slot/index.d.ts +12 -13
  152. package/dist/core/slot/index.js +11 -12
  153. package/dist/core/slot/naming.d.ts +15 -0
  154. package/dist/core/slot/naming.js +96 -0
  155. package/dist/core/slot/platform-fields.d.ts +119 -0
  156. package/dist/core/slot/platform-fields.js +121 -0
  157. package/dist/core/slot/ref.d.ts +16 -0
  158. package/dist/core/slot/ref.js +14 -0
  159. package/dist/core/slot/row.d.ts +2 -9
  160. package/dist/core/slot/row.js +13 -23
  161. package/dist/core/slot/schema-compat.d.ts +16 -0
  162. package/dist/core/slot/schema-compat.js +112 -0
  163. package/dist/core/slot/schema.d.ts +409 -76
  164. package/dist/core/slot/schema.js +178 -10
  165. package/dist/core/slot/types.d.ts +27 -94
  166. package/dist/core/slot/value.d.ts +26 -3
  167. package/dist/core/slot/value.js +89 -57
  168. package/dist/dev-overlay/protocol.d.ts +41 -8
  169. package/dist/fn-context/build-context.d.ts +3 -1
  170. package/dist/fn-context/build-context.js +20 -10
  171. package/dist/fn-context/fake/empty-api.js +9 -28
  172. package/dist/fn-context/fake/index.d.ts +11 -4
  173. package/dist/fn-context/fake/index.js +27 -2
  174. package/dist/fn-context/fn-params.d.ts +6 -0
  175. package/dist/fn-context/fn-params.js +13 -0
  176. package/dist/fn-context/index.d.ts +5 -5
  177. package/dist/fn-context/index.js +4 -4
  178. package/dist/fn-context/log.js +2 -2
  179. package/dist/fn-context/make-ctx.d.ts +11 -0
  180. package/dist/fn-context/make-ctx.js +18 -8
  181. package/dist/fn-context/rpc/case-orchestrator-tools.d.ts +24 -0
  182. package/dist/fn-context/rpc/case-orchestrator-tools.js +13 -0
  183. package/dist/fn-context/rpc/index.d.ts +3 -1
  184. package/dist/fn-context/rpc/index.js +3 -1
  185. package/dist/fn-context/rpc/integration/index.d.ts +4 -4
  186. package/dist/fn-context/rpc/integration/index.js +1 -1
  187. package/dist/fn-context/rpc/integration/list-surfaces.d.ts +21 -0
  188. package/dist/fn-context/rpc/integration/{list-bindings.js → list-surfaces.js} +4 -4
  189. package/dist/fn-context/rpc/platform.d.ts +2 -2
  190. package/dist/fn-context/rpc/platform.js +1 -1
  191. package/dist/fn-context/rpc/records.d.ts +78 -0
  192. package/dist/fn-context/rpc/records.js +26 -0
  193. package/dist/fn-context/rpc/trpc-client.d.ts +2 -2
  194. package/dist/fn-context/rpc/trpc-client.js +88 -7
  195. package/dist/fn-context/rpc/trpc-init.d.ts +2 -2
  196. package/dist/fn-context/rpc/trpc-router-factory.d.ts +49 -3
  197. package/dist/fn-context/rpc/trpc-router-factory.js +2 -0
  198. package/dist/fn-context/run-scope.d.ts +4 -0
  199. package/dist/fn-context/run-scope.js +9 -0
  200. package/dist/fn-context/types.d.ts +36 -3
  201. package/dist/index.d.ts +37 -46
  202. package/dist/index.js +33 -33
  203. package/dist/logger.d.ts +7 -0
  204. package/dist/logger.js +41 -0
  205. package/dist/platform.d.ts +76 -0
  206. package/dist/platform.js +56 -0
  207. package/dist/voice-service/actions.d.ts +71 -4
  208. package/dist/voice-service/types.d.ts +42 -5
  209. package/dist/worker.d.ts +10 -0
  210. package/dist/worker.js +10 -0
  211. package/package.json +38 -19
  212. package/dist/builder/compile/compile-agenda.d.ts +0 -15
  213. package/dist/builder/compile/compile-agenda.js +0 -64
  214. package/dist/builder/merge.d.ts +0 -4
  215. package/dist/builder/merge.js +0 -19
  216. package/dist/compute-host/read-only-cache.d.ts +0 -20
  217. package/dist/compute-host/read-only-cache.js +0 -61
  218. package/dist/core/context/db.d.ts +0 -69
  219. package/dist/core/context/db.js +0 -44
  220. package/dist/core/context/docusign.d.ts +0 -134
  221. package/dist/core/context/docusign.js +0 -108
  222. package/dist/core/context/filevine.d.ts +0 -323
  223. package/dist/core/context/filevine.js +0 -254
  224. package/dist/core/context/http.d.ts +0 -9
  225. package/dist/core/context/http.js +0 -4
  226. package/dist/core/context/hubspot.d.ts +0 -250
  227. package/dist/core/context/hubspot.js +0 -191
  228. package/dist/core/context/twilio.d.ts +0 -50
  229. package/dist/core/context/twilio.js +0 -42
  230. package/dist/core/functions/define/case-context.d.ts +0 -14
  231. package/dist/core/functions/define/case-context.js +0 -15
  232. package/dist/core/functions/define/compute.d.ts +0 -7
  233. package/dist/core/functions/define/compute.js +0 -17
  234. package/dist/core/functions/define/custom.d.ts +0 -4
  235. package/dist/core/functions/define/custom.js +0 -8
  236. package/dist/core/functions/define/system.d.ts +0 -7
  237. package/dist/core/functions/define/system.js +0 -12
  238. package/dist/core/slot/deps.d.ts +0 -15
  239. package/dist/core/slot/deps.js +0 -88
  240. package/dist/core/slot/derived.d.ts +0 -32
  241. package/dist/core/slot/derived.js +0 -115
  242. package/dist/core/slot/platform-session-fields.d.ts +0 -38
  243. package/dist/core/slot/platform-session-fields.js +0 -48
  244. package/dist/core/slot/sf-schema.d.ts +0 -23
  245. package/dist/core/slot/sf-schema.js +0 -125
  246. package/dist/core/slot/sf-validate.d.ts +0 -14
  247. package/dist/core/slot/sf-validate.js +0 -132
  248. package/dist/core/slot/snapshot.d.ts +0 -18
  249. package/dist/core/slot/snapshot.js +0 -138
  250. package/dist/core/slot/write.d.ts +0 -48
  251. package/dist/core/slot/write.js +0 -426
  252. package/dist/core/stage/builders.d.ts +0 -54
  253. package/dist/core/stage/builders.js +0 -31
  254. package/dist/core/stage/condition.d.ts +0 -17
  255. package/dist/core/stage/condition.js +0 -198
  256. package/dist/core/stage/drive.d.ts +0 -43
  257. package/dist/core/stage/drive.js +0 -78
  258. package/dist/core/stage/finish-when.d.ts +0 -20
  259. package/dist/core/stage/finish-when.js +0 -82
  260. package/dist/core/stage/flatten.d.ts +0 -27
  261. package/dist/core/stage/flatten.js +0 -466
  262. package/dist/core/stage/index.d.ts +0 -15
  263. package/dist/core/stage/index.js +0 -13
  264. package/dist/core/stage/interrupts.d.ts +0 -28
  265. package/dist/core/stage/interrupts.js +0 -120
  266. package/dist/core/stage/ivr-fields.d.ts +0 -9
  267. package/dist/core/stage/ivr-fields.js +0 -75
  268. package/dist/core/stage/simulate.d.ts +0 -24
  269. package/dist/core/stage/simulate.js +0 -33
  270. package/dist/core/stage/transfer-fields.d.ts +0 -19
  271. package/dist/core/stage/transfer-fields.js +0 -129
  272. package/dist/core/stage/transfer-spec.d.ts +0 -48
  273. package/dist/core/stage/transfer-spec.js +0 -113
  274. package/dist/core/stage/types.d.ts +0 -208
  275. package/dist/core/stage/types.js +0 -2
  276. package/dist/core/stage/validate.d.ts +0 -11
  277. package/dist/core/stage/validate.js +0 -330
  278. package/dist/core/stage/walk.d.ts +0 -39
  279. package/dist/core/stage/walk.js +0 -119
  280. package/dist/fn-context/rpc/integration/list-bindings.d.ts +0 -21
  281. package/dist/fn-context/system-args.d.ts +0 -6
  282. package/dist/fn-context/system-args.js +0 -14
@@ -1,250 +0,0 @@
1
- import { z } from 'zod';
2
- import type { IntegrationAccountFields } from './account-fields.js';
3
- export declare const hubspotPropertyValue: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
4
- export declare const hubspotPropertiesInput: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
5
- export declare const hubspotPropertiesOutput: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
6
- export declare const hubspotRecord: z.ZodObject<{
7
- id: z.ZodString;
8
- properties: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
9
- }, z.core.$strip>;
10
- export type HubspotRecord = z.infer<typeof hubspotRecord>;
11
- export declare const hubspotCreateContactInput: z.ZodObject<{
12
- properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
13
- }, z.core.$strip>;
14
- export type HubspotCreateContactInput = z.infer<typeof hubspotCreateContactInput>;
15
- export declare const hubspotCreateContactOutput: z.ZodObject<{
16
- id: z.ZodString;
17
- properties: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
18
- }, z.core.$strip>;
19
- export type HubspotCreateContactOutput = HubspotRecord;
20
- export declare const hubspotUpdateContactInput: z.ZodObject<{
21
- id: z.ZodString;
22
- properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
23
- }, z.core.$strip>;
24
- export type HubspotUpdateContactInput = z.infer<typeof hubspotUpdateContactInput>;
25
- export declare const hubspotUpdateContactOutput: z.ZodObject<{
26
- id: z.ZodString;
27
- properties: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
28
- }, z.core.$strip>;
29
- export type HubspotUpdateContactOutput = HubspotRecord;
30
- export declare const hubspotGetContactInput: z.ZodObject<{
31
- id: z.ZodString;
32
- properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
- }, z.core.$strip>;
34
- export type HubspotGetContactInput = z.infer<typeof hubspotGetContactInput>;
35
- export declare const hubspotGetContactOutput: z.ZodObject<{
36
- id: z.ZodString;
37
- properties: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
38
- }, z.core.$strip>;
39
- export type HubspotGetContactOutput = HubspotRecord;
40
- export declare const hubspotSearchContactsInput: z.ZodObject<{
41
- query: z.ZodString;
42
- properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
- after: z.ZodOptional<z.ZodString>;
44
- }, z.core.$strip>;
45
- export type HubspotSearchContactsInput = z.infer<typeof hubspotSearchContactsInput>;
46
- export declare const hubspotSearchContactsOutput: z.ZodObject<{
47
- total: z.ZodNumber;
48
- results: z.ZodArray<z.ZodObject<{
49
- id: z.ZodString;
50
- properties: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
51
- }, z.core.$strip>>;
52
- after: z.ZodOptional<z.ZodString>;
53
- }, z.core.$strip>;
54
- export type HubspotSearchContactsOutput = z.infer<typeof hubspotSearchContactsOutput>;
55
- export declare const hubspotUpsertContactInput: z.ZodObject<{
56
- email: z.ZodString;
57
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
58
- }, z.core.$strip>;
59
- export type HubspotUpsertContactInput = z.infer<typeof hubspotUpsertContactInput>;
60
- export declare const hubspotUpsertContactOutput: z.ZodObject<{
61
- ok: z.ZodLiteral<true>;
62
- id: z.ZodString;
63
- created: z.ZodBoolean;
64
- }, z.core.$strip>;
65
- export type HubspotUpsertContactOutput = z.infer<typeof hubspotUpsertContactOutput>;
66
- export declare const hubspotCreateDealInput: z.ZodObject<{
67
- properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
68
- contactId: z.ZodOptional<z.ZodString>;
69
- }, z.core.$strip>;
70
- export type HubspotCreateDealInput = z.infer<typeof hubspotCreateDealInput>;
71
- export declare const hubspotCreateDealOutput: z.ZodObject<{
72
- id: z.ZodString;
73
- properties: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
74
- }, z.core.$strip>;
75
- export type HubspotCreateDealOutput = HubspotRecord;
76
- export declare const hubspotUpdateDealInput: z.ZodObject<{
77
- id: z.ZodString;
78
- properties: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
79
- }, z.core.$strip>;
80
- export type HubspotUpdateDealInput = z.infer<typeof hubspotUpdateDealInput>;
81
- export declare const hubspotUpdateDealOutput: z.ZodObject<{
82
- id: z.ZodString;
83
- properties: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
84
- }, z.core.$strip>;
85
- export type HubspotUpdateDealOutput = HubspotRecord;
86
- export declare const hubspotGetDealInput: z.ZodObject<{
87
- id: z.ZodString;
88
- properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
- }, z.core.$strip>;
90
- export type HubspotGetDealInput = z.infer<typeof hubspotGetDealInput>;
91
- export declare const hubspotGetDealOutput: z.ZodObject<{
92
- id: z.ZodString;
93
- properties: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
94
- }, z.core.$strip>;
95
- export type HubspotGetDealOutput = HubspotRecord;
96
- export declare const hubspotGetAssociatedDealsInput: z.ZodObject<{
97
- contactId: z.ZodString;
98
- }, z.core.$strip>;
99
- export type HubspotGetAssociatedDealsInput = z.infer<typeof hubspotGetAssociatedDealsInput>;
100
- export declare const hubspotAssociationListOutput: z.ZodObject<{
101
- results: z.ZodArray<z.ZodObject<{
102
- id: z.ZodString;
103
- }, z.core.$strip>>;
104
- }, z.core.$strip>;
105
- export type HubspotAssociationListOutput = z.infer<typeof hubspotAssociationListOutput>;
106
- export declare const hubspotGetAssociatedContactsInput: z.ZodObject<{
107
- dealId: z.ZodString;
108
- }, z.core.$strip>;
109
- export type HubspotGetAssociatedContactsInput = z.infer<typeof hubspotGetAssociatedContactsInput>;
110
- export declare const hubspotGetOwnerInput: z.ZodObject<{
111
- id: z.ZodString;
112
- }, z.core.$strip>;
113
- export type HubspotGetOwnerInput = z.infer<typeof hubspotGetOwnerInput>;
114
- export declare const hubspotGetOwnerOutput: z.ZodObject<{
115
- id: z.ZodString;
116
- email: z.ZodNullable<z.ZodString>;
117
- firstName: z.ZodNullable<z.ZodString>;
118
- lastName: z.ZodNullable<z.ZodString>;
119
- }, z.core.$strip>;
120
- export type HubspotGetOwnerOutput = z.infer<typeof hubspotGetOwnerOutput>;
121
- export declare const hubspotCreateNoteInput: z.ZodObject<{
122
- contactId: z.ZodString;
123
- body: z.ZodString;
124
- }, z.core.$strip>;
125
- export type HubspotCreateNoteInput = z.infer<typeof hubspotCreateNoteInput>;
126
- export declare const hubspotEngagementOutput: z.ZodObject<{
127
- id: z.ZodString;
128
- }, z.core.$strip>;
129
- export type HubspotEngagementOutput = z.infer<typeof hubspotEngagementOutput>;
130
- export declare const hubspotLogCallInput: z.ZodObject<{
131
- to: z.ZodObject<{
132
- kind: z.ZodEnum<{
133
- contact: "contact";
134
- deal: "deal";
135
- }>;
136
- id: z.ZodString;
137
- }, z.core.$strip>;
138
- direction: z.ZodEnum<{
139
- INBOUND: "INBOUND";
140
- OUTBOUND: "OUTBOUND";
141
- }>;
142
- timestamp: z.ZodNumber;
143
- title: z.ZodOptional<z.ZodString>;
144
- body: z.ZodOptional<z.ZodString>;
145
- recordingUrl: z.ZodOptional<z.ZodString>;
146
- status: z.ZodOptional<z.ZodEnum<{
147
- BUSY: "BUSY";
148
- CALLING_CRM_USER: "CALLING_CRM_USER";
149
- CANCELED: "CANCELED";
150
- COMPLETED: "COMPLETED";
151
- CONNECTING: "CONNECTING";
152
- FAILED: "FAILED";
153
- IN_PROGRESS: "IN_PROGRESS";
154
- NO_ANSWER: "NO_ANSWER";
155
- QUEUED: "QUEUED";
156
- RINGING: "RINGING";
157
- }>>;
158
- }, z.core.$strip>;
159
- export type HubspotLogCallInput = z.infer<typeof hubspotLogCallInput>;
160
- export declare const hubspotLogEmailInput: z.ZodObject<{
161
- to: z.ZodObject<{
162
- kind: z.ZodEnum<{
163
- contact: "contact";
164
- deal: "deal";
165
- }>;
166
- id: z.ZodString;
167
- }, z.core.$strip>;
168
- direction: z.ZodEnum<{
169
- EMAIL: "EMAIL";
170
- FORWARDED_EMAIL: "FORWARDED_EMAIL";
171
- INCOMING_EMAIL: "INCOMING_EMAIL";
172
- }>;
173
- subject: z.ZodString;
174
- body: z.ZodString;
175
- timestamp: z.ZodNumber;
176
- }, z.core.$strip>;
177
- export type HubspotLogEmailInput = z.infer<typeof hubspotLogEmailInput>;
178
- export declare const hubspotLogSmsInput: z.ZodObject<{
179
- to: z.ZodObject<{
180
- kind: z.ZodEnum<{
181
- contact: "contact";
182
- deal: "deal";
183
- }>;
184
- id: z.ZodString;
185
- }, z.core.$strip>;
186
- message: z.ZodString;
187
- timestamp: z.ZodNumber;
188
- prefix: z.ZodOptional<z.ZodString>;
189
- }, z.core.$strip>;
190
- export type HubspotLogSmsInput = z.infer<typeof hubspotLogSmsInput>;
191
- export declare const hubspotCreateTaskInput: z.ZodObject<{
192
- to: z.ZodObject<{
193
- kind: z.ZodEnum<{
194
- contact: "contact";
195
- deal: "deal";
196
- }>;
197
- id: z.ZodString;
198
- }, z.core.$strip>;
199
- title: z.ZodString;
200
- description: z.ZodString;
201
- dueAt: z.ZodNumber;
202
- ownerId: z.ZodString;
203
- priority: z.ZodEnum<{
204
- HIGH: "HIGH";
205
- LOW: "LOW";
206
- MEDIUM: "MEDIUM";
207
- }>;
208
- status: z.ZodEnum<{
209
- COMPLETED: "COMPLETED";
210
- DEFERRED: "DEFERRED";
211
- IN_PROGRESS: "IN_PROGRESS";
212
- NOT_STARTED: "NOT_STARTED";
213
- WAITING: "WAITING";
214
- }>;
215
- }, z.core.$strip>;
216
- export type HubspotCreateTaskInput = z.infer<typeof hubspotCreateTaskInput>;
217
- export declare const hubspotGetCrmUrlInput: z.ZodObject<{
218
- type: z.ZodEnum<{
219
- call: "call";
220
- contact: "contact";
221
- }>;
222
- id: z.ZodString;
223
- }, z.core.$strip>;
224
- export type HubspotGetCrmUrlInput = z.infer<typeof hubspotGetCrmUrlInput>;
225
- export declare const hubspotGetCrmUrlOutput: z.ZodObject<{
226
- url: z.ZodString;
227
- }, z.core.$strip>;
228
- export type HubspotGetCrmUrlOutput = z.infer<typeof hubspotGetCrmUrlOutput>;
229
- export type HubspotService = {
230
- createContact(input: HubspotCreateContactInput): Promise<HubspotCreateContactOutput>;
231
- updateContact(input: HubspotUpdateContactInput): Promise<HubspotUpdateContactOutput>;
232
- getContact(input: HubspotGetContactInput): Promise<HubspotGetContactOutput>;
233
- searchContacts(input: HubspotSearchContactsInput): Promise<HubspotSearchContactsOutput>;
234
- upsertContact(input: HubspotUpsertContactInput): Promise<HubspotUpsertContactOutput>;
235
- createDeal(input: HubspotCreateDealInput): Promise<HubspotCreateDealOutput>;
236
- updateDeal(input: HubspotUpdateDealInput): Promise<HubspotUpdateDealOutput>;
237
- getDeal(input: HubspotGetDealInput): Promise<HubspotGetDealOutput>;
238
- getAssociatedDeals(input: HubspotGetAssociatedDealsInput): Promise<HubspotAssociationListOutput>;
239
- getAssociatedContacts(input: HubspotGetAssociatedContactsInput): Promise<HubspotAssociationListOutput>;
240
- getOwner(input: HubspotGetOwnerInput): Promise<HubspotGetOwnerOutput>;
241
- createNote(input: HubspotCreateNoteInput): Promise<HubspotEngagementOutput>;
242
- logCall(input: HubspotLogCallInput): Promise<HubspotEngagementOutput>;
243
- logEmail(input: HubspotLogEmailInput): Promise<HubspotEngagementOutput>;
244
- logSms(input: HubspotLogSmsInput): Promise<HubspotEngagementOutput>;
245
- createTask(input: HubspotCreateTaskInput): Promise<HubspotEngagementOutput>;
246
- getCrmUrl(input: HubspotGetCrmUrlInput): Promise<HubspotGetCrmUrlOutput>;
247
- };
248
- export declare const hubspotMockService: HubspotService;
249
- export type HubspotApi = IntegrationAccountFields & HubspotService;
250
- //# sourceMappingURL=hubspot.d.ts.map
@@ -1,191 +0,0 @@
1
- import { z } from 'zod';
2
- export const hubspotPropertyValue = z.union([z.string(), z.number(), z.boolean()]);
3
- export const hubspotPropertiesInput = z.record(z.string(), hubspotPropertyValue);
4
- export const hubspotPropertiesOutput = z.record(z.string(), z.string().nullable());
5
- export const hubspotRecord = z.object({
6
- id: z.string(),
7
- properties: hubspotPropertiesOutput,
8
- });
9
- export const hubspotCreateContactInput = z.object({
10
- properties: hubspotPropertiesInput,
11
- });
12
- export const hubspotCreateContactOutput = hubspotRecord;
13
- export const hubspotUpdateContactInput = z.object({
14
- id: z.string(),
15
- properties: hubspotPropertiesInput,
16
- });
17
- export const hubspotUpdateContactOutput = hubspotRecord;
18
- export const hubspotGetContactInput = z.object({
19
- id: z.string(),
20
- properties: z.array(z.string()).optional(),
21
- });
22
- export const hubspotGetContactOutput = hubspotRecord;
23
- export const hubspotSearchContactsInput = z.object({
24
- query: z.string(),
25
- properties: z.array(z.string()).optional(),
26
- after: z.string().optional(),
27
- });
28
- export const hubspotSearchContactsOutput = z.object({
29
- total: z.number(),
30
- results: z.array(hubspotRecord),
31
- after: z.string().optional(),
32
- });
33
- export const hubspotUpsertContactInput = z.object({
34
- email: z.string(),
35
- properties: hubspotPropertiesInput.optional(),
36
- });
37
- export const hubspotUpsertContactOutput = z.object({
38
- ok: z.literal(true),
39
- id: z.string(),
40
- created: z.boolean(),
41
- });
42
- export const hubspotCreateDealInput = z.object({
43
- properties: hubspotPropertiesInput,
44
- contactId: z.string().optional(),
45
- });
46
- export const hubspotCreateDealOutput = hubspotRecord;
47
- export const hubspotUpdateDealInput = z.object({
48
- id: z.string(),
49
- properties: hubspotPropertiesInput,
50
- });
51
- export const hubspotUpdateDealOutput = hubspotRecord;
52
- export const hubspotGetDealInput = z.object({
53
- id: z.string(),
54
- properties: z.array(z.string()).optional(),
55
- });
56
- export const hubspotGetDealOutput = hubspotRecord;
57
- export const hubspotGetAssociatedDealsInput = z.object({
58
- contactId: z.string(),
59
- });
60
- export const hubspotAssociationListOutput = z.object({
61
- results: z.array(z.object({ id: z.string() })),
62
- });
63
- export const hubspotGetAssociatedContactsInput = z.object({
64
- dealId: z.string(),
65
- });
66
- export const hubspotGetOwnerInput = z.object({
67
- id: z.string(),
68
- });
69
- export const hubspotGetOwnerOutput = z.object({
70
- id: z.string(),
71
- email: z.string().nullable(),
72
- firstName: z.string().nullable(),
73
- lastName: z.string().nullable(),
74
- });
75
- export const hubspotCreateNoteInput = z.object({
76
- contactId: z.string(),
77
- body: z.string(),
78
- });
79
- export const hubspotEngagementOutput = z.object({
80
- id: z.string(),
81
- });
82
- const hubspotAssociateTo = z.object({
83
- kind: z.enum(['contact', 'deal']),
84
- id: z.string(),
85
- });
86
- export const hubspotLogCallInput = z.object({
87
- to: hubspotAssociateTo,
88
- direction: z.enum(['INBOUND', 'OUTBOUND']),
89
- timestamp: z.number(),
90
- title: z.string().optional(),
91
- body: z.string().optional(),
92
- recordingUrl: z.string().optional(),
93
- status: z
94
- .enum([
95
- 'BUSY',
96
- 'CALLING_CRM_USER',
97
- 'CANCELED',
98
- 'COMPLETED',
99
- 'CONNECTING',
100
- 'FAILED',
101
- 'IN_PROGRESS',
102
- 'NO_ANSWER',
103
- 'QUEUED',
104
- 'RINGING',
105
- ])
106
- .optional(),
107
- });
108
- export const hubspotLogEmailInput = z.object({
109
- to: hubspotAssociateTo,
110
- direction: z.enum(['EMAIL', 'INCOMING_EMAIL', 'FORWARDED_EMAIL']),
111
- subject: z.string(),
112
- body: z.string(),
113
- timestamp: z.number(),
114
- });
115
- export const hubspotLogSmsInput = z.object({
116
- to: hubspotAssociateTo,
117
- message: z.string(),
118
- timestamp: z.number(),
119
- prefix: z.string().optional(),
120
- });
121
- export const hubspotCreateTaskInput = z.object({
122
- to: hubspotAssociateTo,
123
- title: z.string(),
124
- description: z.string(),
125
- dueAt: z.number(),
126
- ownerId: z.string(),
127
- priority: z.enum(['HIGH', 'MEDIUM', 'LOW']),
128
- status: z.enum(['NOT_STARTED', 'IN_PROGRESS', 'WAITING', 'COMPLETED', 'DEFERRED']),
129
- });
130
- export const hubspotGetCrmUrlInput = z.object({
131
- type: z.enum(['contact', 'call']),
132
- id: z.string(),
133
- });
134
- export const hubspotGetCrmUrlOutput = z.object({
135
- url: z.string(),
136
- });
137
- const mockRecord = { id: 'mock-hs-1', properties: {} };
138
- export const hubspotMockService = {
139
- async createContact() {
140
- return mockRecord;
141
- },
142
- async updateContact() {
143
- return mockRecord;
144
- },
145
- async getContact() {
146
- return mockRecord;
147
- },
148
- async searchContacts() {
149
- return { total: 0, results: [] };
150
- },
151
- async upsertContact() {
152
- return { ok: true, id: 'mock-hs-1', created: true };
153
- },
154
- async createDeal() {
155
- return mockRecord;
156
- },
157
- async updateDeal() {
158
- return mockRecord;
159
- },
160
- async getDeal() {
161
- return mockRecord;
162
- },
163
- async getAssociatedDeals() {
164
- return { results: [] };
165
- },
166
- async getAssociatedContacts() {
167
- return { results: [] };
168
- },
169
- async getOwner() {
170
- return { id: 'mock-owner', email: null, firstName: null, lastName: null };
171
- },
172
- async createNote() {
173
- return { id: 'mock-note' };
174
- },
175
- async logCall() {
176
- return { id: 'mock-call' };
177
- },
178
- async logEmail() {
179
- return { id: 'mock-email' };
180
- },
181
- async logSms() {
182
- return { id: 'mock-sms' };
183
- },
184
- async createTask() {
185
- return { id: 'mock-task' };
186
- },
187
- async getCrmUrl() {
188
- return { url: 'https://app.hubspot.com/contacts/0/record/0-1/mock-hs-1' };
189
- },
190
- };
191
- //# sourceMappingURL=hubspot.js.map
@@ -1,50 +0,0 @@
1
- import { z } from 'zod';
2
- import type { IntegrationAccountFields } from './account-fields.js';
3
- export declare const twilioSendSmsInput: z.ZodObject<{
4
- to: z.ZodString;
5
- body: z.ZodString;
6
- from: z.ZodOptional<z.ZodString>;
7
- }, z.core.$strip>;
8
- export type TwilioSendSmsInput = z.infer<typeof twilioSendSmsInput>;
9
- export declare const twilioSendSmsOutput: z.ZodObject<{
10
- ok: z.ZodLiteral<true>;
11
- sid: z.ZodString;
12
- status: z.ZodNullable<z.ZodString>;
13
- }, z.core.$strip>;
14
- export type TwilioSendSmsOutput = z.infer<typeof twilioSendSmsOutput>;
15
- export declare const twilioCreateCallInput: z.ZodObject<{
16
- to: z.ZodString;
17
- from: z.ZodString;
18
- url: z.ZodOptional<z.ZodString>;
19
- twiml: z.ZodOptional<z.ZodString>;
20
- }, z.core.$strip>;
21
- export type TwilioCreateCallInput = z.infer<typeof twilioCreateCallInput>;
22
- export declare const twilioCreateCallOutput: z.ZodObject<{
23
- ok: z.ZodLiteral<true>;
24
- sid: z.ZodString;
25
- status: z.ZodNullable<z.ZodString>;
26
- }, z.core.$strip>;
27
- export type TwilioCreateCallOutput = z.infer<typeof twilioCreateCallOutput>;
28
- export declare const twilioIncomingNumber: z.ZodObject<{
29
- sid: z.ZodString;
30
- phoneNumber: z.ZodString;
31
- friendlyName: z.ZodString;
32
- status: z.ZodString;
33
- }, z.core.$strip>;
34
- export type TwilioIncomingNumber = z.infer<typeof twilioIncomingNumber>;
35
- export declare const twilioListIncomingNumbersOutput: z.ZodArray<z.ZodObject<{
36
- sid: z.ZodString;
37
- phoneNumber: z.ZodString;
38
- friendlyName: z.ZodString;
39
- status: z.ZodString;
40
- }, z.core.$strip>>;
41
- export type TwilioListIncomingNumbersOutput = z.infer<typeof twilioListIncomingNumbersOutput>;
42
- export type TwilioService = {
43
- sendSms(input: TwilioSendSmsInput): Promise<TwilioSendSmsOutput>;
44
- createCall(input: TwilioCreateCallInput): Promise<TwilioCreateCallOutput>;
45
- listIncomingNumbers(): Promise<TwilioListIncomingNumbersOutput>;
46
- };
47
- /** Stand-in surface for fake contexts and local runs; never reaches Twilio. */
48
- export declare const twilioMockService: TwilioService;
49
- export type TwilioApi = IntegrationAccountFields & TwilioService;
50
- //# sourceMappingURL=twilio.d.ts.map
@@ -1,42 +0,0 @@
1
- import { z } from 'zod';
2
- export const twilioSendSmsInput = z.object({
3
- to: z.string(),
4
- body: z.string(),
5
- from: z.string().optional(),
6
- });
7
- export const twilioSendSmsOutput = z.object({
8
- ok: z.literal(true),
9
- sid: z.string(),
10
- status: z.string().nullable(),
11
- });
12
- export const twilioCreateCallInput = z.object({
13
- to: z.string(),
14
- from: z.string(),
15
- url: z.string().optional(),
16
- twiml: z.string().optional(),
17
- });
18
- export const twilioCreateCallOutput = z.object({
19
- ok: z.literal(true),
20
- sid: z.string(),
21
- status: z.string().nullable(),
22
- });
23
- export const twilioIncomingNumber = z.object({
24
- sid: z.string(),
25
- phoneNumber: z.string(),
26
- friendlyName: z.string(),
27
- status: z.string(),
28
- });
29
- export const twilioListIncomingNumbersOutput = z.array(twilioIncomingNumber);
30
- /** Stand-in surface for fake contexts and local runs; never reaches Twilio. */
31
- export const twilioMockService = {
32
- async sendSms() {
33
- return { ok: true, sid: 'SM-mock', status: 'queued' };
34
- },
35
- async createCall() {
36
- return { ok: true, sid: 'CA-mock', status: 'queued' };
37
- },
38
- async listIncomingNumbers() {
39
- return [];
40
- },
41
- };
42
- //# sourceMappingURL=twilio.js.map
@@ -1,14 +0,0 @@
1
- /** `(slots) => CaseContext` — pure projection; not persisted. */
2
- export type CaseContextViewFn<S = unknown, C = unknown> = (slots: S) => C;
3
- /** Tagged by {@link defineCaseContext} so compile can find it. */
4
- export type DefinedCaseContextView<S = unknown, C = unknown> = CaseContextViewFn<S, C> & {
5
- kind: 'caseContextView';
6
- main: CaseContextViewFn<S, C>;
7
- };
8
- /** Mark a projector for sequence `view.ts`. */
9
- export declare function defineCaseContext<S, C>(main: CaseContextViewFn<S, C>): DefinedCaseContextView<S, C>;
10
- /** `export type CaseContext = CaseContextOf<typeof caseContextView>` */
11
- export type CaseContextOf<T> = T extends (...args: never) => infer C ? C : never;
12
- /** Unwrap for compile / host (prefers `.main` when tagged). */
13
- export declare function resolveCaseContextViewFn(value: unknown): CaseContextViewFn | undefined;
14
- //# sourceMappingURL=case-context.d.ts.map
@@ -1,15 +0,0 @@
1
- /** Mark a projector for sequence `view.ts`. */
2
- export function defineCaseContext(main) {
3
- return Object.assign(main, { kind: 'caseContextView', main });
4
- }
5
- /** Unwrap for compile / host (prefers `.main` when tagged). */
6
- export function resolveCaseContextViewFn(value) {
7
- if (typeof value !== 'function')
8
- return undefined;
9
- const tagged = value;
10
- if (tagged.kind === 'caseContextView' && typeof tagged.main === 'function') {
11
- return tagged.main;
12
- }
13
- return value;
14
- }
15
- //# sourceMappingURL=case-context.js.map
@@ -1,7 +0,0 @@
1
- import type { ComputeFn, DefinedFunc, FuncOptions } from '../types.js';
2
- import type { CaseContext } from '../../context/types.js';
3
- /** Pure compute / derived field fn. No I/O; no SystemContext. Name = functions-map key. */
4
- export declare function defineComputeFunc<S = CaseContext, R = unknown>(main: ComputeFn<S, R>, options?: FuncOptions): DefinedFunc;
5
- /** Boolean compute (finishWhen / applyWhen helpers). */
6
- export declare function defineBoolComputeFunc<S = CaseContext>(main: ComputeFn<S, boolean>, options?: FuncOptions): DefinedFunc;
7
- //# sourceMappingURL=compute.d.ts.map
@@ -1,17 +0,0 @@
1
- /** Pure compute / derived field fn. No I/O; no SystemContext. Name = functions-map key. */
2
- export function defineComputeFunc(main, options) {
3
- return {
4
- kind: 'compute',
5
- main: main,
6
- ...options,
7
- };
8
- }
9
- /** Boolean compute (finishWhen / applyWhen helpers). */
10
- export function defineBoolComputeFunc(main, options) {
11
- return {
12
- kind: 'boolCompute',
13
- main: main,
14
- ...options,
15
- };
16
- }
17
- //# sourceMappingURL=compute.js.map
@@ -1,4 +0,0 @@
1
- import type { CustomFn, DefinedFunc, FuncOptions } from '../types.js';
2
- import type { CaseContext } from '../../context/types.js';
3
- export declare function defineCustomFunc<S = CaseContext, P extends object = object>(main: CustomFn<S, P>, options?: FuncOptions): DefinedFunc;
4
- //# sourceMappingURL=custom.d.ts.map
@@ -1,8 +0,0 @@
1
- export function defineCustomFunc(main, options) {
2
- return {
3
- kind: 'custom',
4
- main: main,
5
- ...options,
6
- };
7
- }
8
- //# sourceMappingURL=custom.js.map
@@ -1,7 +0,0 @@
1
- import type { DefinedFunc, FuncOptions, FunctionCall, WebHookFunctionParams } from '../types.js';
2
- /**
3
- * Platform lifecycle / webhook entry. Register under the matching key
4
- * (e.g. `webhook: defineSystemFunc(...)`, `getFirstMessage: defineSystemFunc(...)`).
5
- */
6
- export declare function defineSystemFunc<P extends object = WebHookFunctionParams, R = void>(main: FunctionCall<P, R>, options?: FuncOptions): DefinedFunc;
7
- //# sourceMappingURL=system.d.ts.map
@@ -1,12 +0,0 @@
1
- /**
2
- * Platform lifecycle / webhook entry. Register under the matching key
3
- * (e.g. `webhook: defineSystemFunc(...)`, `getFirstMessage: defineSystemFunc(...)`).
4
- */
5
- export function defineSystemFunc(main, options) {
6
- return {
7
- kind: 'system',
8
- main: main,
9
- ...options,
10
- };
11
- }
12
- //# sourceMappingURL=system.js.map
@@ -1,15 +0,0 @@
1
- import type { FieldPath } from './path.js';
2
- import type { RuntimeTableDef, ValidationIssue } from './types.js';
3
- export type DependencyGraphResult = {
4
- derivedOrder: FieldPath[];
5
- reverseDeps: Record<FieldPath, FieldPath[]>;
6
- issues: ValidationIssue[];
7
- };
8
- /**
9
- * Build topological order of derived fields and reverse dependency index.
10
- * Reports cycles instead of throwing.
11
- */
12
- export declare function buildDependencyGraph(tables: Record<string, RuntimeTableDef>): DependencyGraphResult;
13
- /** Collect derived fields affected by changed columns, in topo order. */
14
- export declare function affectedDerivedFields(changed: Iterable<FieldPath>, reverseDeps: Record<FieldPath, FieldPath[]>, derivedOrder: FieldPath[]): FieldPath[];
15
- //# sourceMappingURL=deps.d.ts.map