clivly 0.20.0 → 0.21.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 (135) hide show
  1. package/{adapter-BXykDFyG.d.mts → adapter-B4v4dwgD.d.mts} +1 -1
  2. package/{adapter-BiUN_I3u.d.cts → adapter-BK3gsby5.d.cts} +1 -1
  3. package/{auth-adapter-BNvri2gX.d.mts → auth-adapter-BIa-ZyVV.d.mts} +1 -1
  4. package/{auth-adapter-D2MUT1Hk.d.cts → auth-adapter-DwtMJb7D.d.cts} +1 -1
  5. package/auth-better-auth.d.cts +1 -1
  6. package/auth-better-auth.d.mts +1 -1
  7. package/auth-clerk.d.cts +1 -1
  8. package/auth-clerk.d.mts +1 -1
  9. package/auth-workos.d.cts +1 -1
  10. package/auth-workos.d.mts +1 -1
  11. package/core-adapter.d.cts +2 -1
  12. package/core-adapter.d.mts +2 -1
  13. package/core-auth-adapter.d.cts +2 -1
  14. package/core-auth-adapter.d.mts +2 -1
  15. package/core-drizzle.d.cts +1 -1
  16. package/core-drizzle.d.mts +1 -1
  17. package/core-entity-config.cjs +1 -1
  18. package/core-entity-config.d.cts +2 -1
  19. package/core-entity-config.d.mts +2 -1
  20. package/core-entity-config.mjs +1 -1
  21. package/core-entity-heuristics.cjs +1 -1
  22. package/core-entity-heuristics.d.cts +1 -1
  23. package/core-entity-heuristics.d.mts +1 -1
  24. package/core-entity-heuristics.mjs +1 -1
  25. package/core-mapping-form.d.cts +2 -1
  26. package/core-mapping-form.d.mts +2 -1
  27. package/core-mappings-config.cjs +1 -1
  28. package/core-mappings-config.d.cts +2 -1
  29. package/core-mappings-config.d.mts +2 -1
  30. package/core-mappings-config.mjs +1 -1
  31. package/core-sync-engine.cjs +1 -1
  32. package/core-sync-engine.d.cts +2 -1
  33. package/core-sync-engine.d.mts +2 -1
  34. package/core-sync-engine.mjs +1 -1
  35. package/core-types.d.cts +2 -1
  36. package/core-types.d.mts +2 -1
  37. package/core-view-compiler.cjs +1 -1
  38. package/core-view-compiler.d.cts +2 -1
  39. package/core-view-compiler.d.mts +2 -1
  40. package/core-view-compiler.mjs +1 -1
  41. package/core.cjs +7 -7
  42. package/core.d.cts +10 -10
  43. package/core.d.mts +10 -10
  44. package/core.mjs +7 -7
  45. package/{drizzle-B9cjBavj.d.cts → drizzle-BNHGQXiY.d.cts} +1 -1
  46. package/{drizzle-L5FOGe_-.d.mts → drizzle-DFe7ILmd.d.mts} +1 -1
  47. package/drizzle.cjs +2 -2
  48. package/drizzle.d.cts +4 -3
  49. package/drizzle.d.mts +4 -3
  50. package/drizzle.mjs +2 -2
  51. package/{entity-config-DiCJ6mhI.cjs → entity-config-BP8Cc_nC.cjs} +54 -53
  52. package/{entity-config-g_oMPXlN.mjs → entity-config-CI5CGfaN.mjs} +54 -53
  53. package/{entity-config-X-KlnYXX.d.mts → entity-config-CXpGowQa.d.cts} +339 -339
  54. package/{entity-config-dNclLyBM.d.cts → entity-config-CXpGowQa.d.mts} +339 -339
  55. package/{entity-heuristics-DE5ujoHw.mjs → entity-heuristics-DAxqagJA.mjs} +1 -1
  56. package/{entity-heuristics-CIParuQe.cjs → entity-heuristics-DNmrcd0b.cjs} +1 -1
  57. package/index-Bh7o2J7K.d.mts +308 -0
  58. package/index-DRRTE5IJ.d.cts +308 -0
  59. package/index.cjs +3 -3
  60. package/index.mjs +3 -3
  61. package/{internal-COALpgov.d.cts → internal-C8TGcv_X.d.mts} +2 -131
  62. package/{internal-9oDwwbNg.mjs → internal-DWpLw0t5.mjs} +5 -5
  63. package/{internal-BKYt5j0l.cjs → internal-G5tXjqwl.cjs} +5 -5
  64. package/{internal-D3q4FPcA.d.mts → internal-Nrhf76Jn.d.cts} +2 -131
  65. package/internal-adapter.d.cts +1 -1
  66. package/internal-adapter.d.mts +1 -1
  67. package/internal-auth-adapter.d.cts +1 -1
  68. package/internal-auth-adapter.d.mts +1 -1
  69. package/internal-drizzle.d.cts +1 -1
  70. package/internal-drizzle.d.mts +1 -1
  71. package/internal-entity-config.cjs +1 -1
  72. package/internal-entity-config.d.cts +1 -1
  73. package/internal-entity-config.d.mts +1 -1
  74. package/internal-entity-config.mjs +1 -1
  75. package/internal-entity-heuristics.cjs +1 -1
  76. package/internal-entity-heuristics.d.cts +1 -1
  77. package/internal-entity-heuristics.d.mts +1 -1
  78. package/internal-entity-heuristics.mjs +1 -1
  79. package/internal-mapping-form.d.cts +1 -1
  80. package/internal-mapping-form.d.mts +1 -1
  81. package/internal-mappings-config.cjs +1 -1
  82. package/internal-mappings-config.d.cts +1 -1
  83. package/internal-mappings-config.d.mts +1 -1
  84. package/internal-mappings-config.mjs +1 -1
  85. package/internal-sync-engine.cjs +1 -1
  86. package/internal-sync-engine.d.cts +1 -1
  87. package/internal-sync-engine.d.mts +1 -1
  88. package/internal-sync-engine.mjs +1 -1
  89. package/internal-types.d.cts +1 -1
  90. package/internal-types.d.mts +1 -1
  91. package/internal-view-compiler.cjs +1 -1
  92. package/internal-view-compiler.d.cts +1 -1
  93. package/internal-view-compiler.d.mts +1 -1
  94. package/internal-view-compiler.mjs +1 -1
  95. package/internal.cjs +7 -7
  96. package/internal.d.cts +10 -10
  97. package/internal.d.mts +10 -10
  98. package/internal.mjs +7 -7
  99. package/{mapping-form-Bpvgf5b8.d.mts → mapping-form-Bg_hgNoL.d.cts} +1 -1
  100. package/{mapping-form-CV7y6qox.d.cts → mapping-form-KHUlnC7A.d.mts} +1 -1
  101. package/{mappings-config-CNxBrbt9.cjs → mappings-config-CC-vltWb.cjs} +1 -1
  102. package/{mappings-config-BBppW9fp.d.cts → mappings-config-DNo_Cum_.d.cts} +1 -1
  103. package/{mappings-config-D_g20PyS.mjs → mappings-config-Opw7ZM6Y.mjs} +1 -1
  104. package/{mappings-config-Dmm0H6p_.d.mts → mappings-config-wAe-p1rG.d.mts} +1 -1
  105. package/{namespace-probe-C1tm5rGh.d.cts → namespace-probe-Dh6LFwfo.d.cts} +9 -2
  106. package/{namespace-probe-ah2awcHO.d.mts → namespace-probe-xESu83KG.d.mts} +9 -2
  107. package/package.json +6 -4
  108. package/projection-CzBI2NL8.mjs +95 -0
  109. package/{projection-sql-CHz7KzNS.cjs → projection-sql-BkrHR2ea.cjs} +1 -1
  110. package/{projection-sql-C3gZE3GS.mjs → projection-sql-DQQdjw9I.mjs} +1 -1
  111. package/projection-w4Z6vSL2.cjs +118 -0
  112. package/{sdk-ChyrSl32.mjs → sdk-DfdHv-S9.mjs} +154 -13
  113. package/{sdk-BEHVvB18.cjs → sdk-oUjl5HNU.cjs} +154 -13
  114. package/sdk.cjs +2 -2
  115. package/sdk.d.cts +2 -2
  116. package/sdk.d.mts +2 -2
  117. package/sdk.mjs +2 -2
  118. package/{sync-engine-C7W0Gkq0.d.cts → sync-engine-DCjTr2XQ.d.cts} +2 -2
  119. package/{sync-engine-Di-vF26b.cjs → sync-engine-DNSoZeo0.cjs} +1 -1
  120. package/{sync-engine-C9Q2FkR9.d.mts → sync-engine-UNORma7f.d.mts} +2 -2
  121. package/{sync-engine-CwdLkmch.mjs → sync-engine-yFLEyId3.mjs} +1 -1
  122. package/{types-C08UluBS.d.cts → types-BBfwsDxe.d.cts} +13 -7
  123. package/{types-CZsSYbeC.d.mts → types-BBfwsDxe.d.mts} +13 -7
  124. package/{view-compiler-M23WiVGG.d.mts → view-compiler-BDD93Luw.d.cts} +1 -1
  125. package/{view-compiler-CLTi1VL-.mjs → view-compiler-CSHSqZl7.mjs} +2 -2
  126. package/{view-compiler-cXqt4X-c.d.cts → view-compiler-CSNhmCY2.d.mts} +1 -1
  127. package/{view-compiler-DaOz5QVl.cjs → view-compiler-NqiortOA.cjs} +2 -2
  128. package/vite.d.cts +1 -1
  129. package/vite.d.mts +1 -1
  130. package/integration-state-xK4PLm5T.d.cts +0 -171
  131. package/integration-state-xK4PLm5T.d.mts +0 -171
  132. package/projection-BkYXvjTr.mjs +0 -5587
  133. package/projection-By63gMC-.cjs +0 -5670
  134. package/schemas-BSuo_eZQ.d.cts +0 -2160
  135. package/schemas-BSuo_eZQ.d.mts +0 -2160
@@ -1,4 +1,4 @@
1
- import { a as ZodNumber, c as ZodRecord, d as output, f as $strict, i as ZodLiteral, l as ZodString, n as ZodBoolean, o as ZodObject, r as ZodEnum, s as ZodOptional, t as ZodArray, u as ZodUnion } from "./schemas-BSuo_eZQ.mjs";
1
+ import { z } from "zod";
2
2
  /**
3
3
  * Projection-backed custom mappings — one custom object derived from a base
4
4
  * table plus explicit joins.
@@ -32,103 +32,103 @@ declare const BASE_REF = "base";
32
32
  * and so is a join's `key` when it is emitted as an alias.
33
33
  */
34
34
  declare const PROJECTION_KEY_PATTERN: RegExp;
35
- declare const projectionRefSchema: ZodObject<{
36
- table: ZodString;
37
- column: ZodString;
38
- }, $strict>;
39
- type ProjectionRef = output<typeof projectionRefSchema>;
40
- declare const projectionJoinSchema: ZodObject<{
41
- key: ZodString;
42
- table: ZodString;
43
- type: ZodEnum<{
35
+ declare const projectionRefSchema: z.ZodObject<{
36
+ table: z.ZodString;
37
+ column: z.ZodString;
38
+ }, z.core.$strict>;
39
+ type ProjectionRef = z.infer<typeof projectionRefSchema>;
40
+ declare const projectionJoinSchema: z.ZodObject<{
41
+ key: z.ZodString;
42
+ table: z.ZodString;
43
+ type: z.ZodEnum<{
44
44
  inner: "inner";
45
45
  left: "left";
46
46
  }>;
47
- on: ZodArray<ZodObject<{
48
- left: ZodObject<{
49
- table: ZodString;
50
- column: ZodString;
51
- }, $strict>;
52
- op: ZodLiteral<"eq">;
53
- right: ZodObject<{
54
- table: ZodString;
55
- column: ZodString;
56
- }, $strict>;
57
- }, $strict>>;
58
- }, $strict>;
59
- type ProjectionJoin = output<typeof projectionJoinSchema>;
60
- declare const projectionFieldBindingSchema: ZodObject<{
61
- from: ZodObject<{
62
- table: ZodString;
63
- column: ZodString;
64
- }, $strict>;
65
- }, $strict>;
66
- type ProjectionFieldBinding = output<typeof projectionFieldBindingSchema>;
67
- declare const projectionIdentitySchema: ZodUnion<readonly [ZodObject<{
68
- kind: ZodLiteral<"base_pk">;
69
- column: ZodOptional<ZodString>;
70
- }, $strict>, ZodObject<{
71
- kind: ZodLiteral<"column">;
72
- from: ZodObject<{
73
- table: ZodString;
74
- column: ZodString;
75
- }, $strict>;
76
- }, $strict>, ZodObject<{
77
- kind: ZodLiteral<"composite">;
78
- parts: ZodArray<ZodObject<{
79
- table: ZodString;
80
- column: ZodString;
81
- }, $strict>>;
82
- }, $strict>]>;
83
- type ProjectionIdentity = output<typeof projectionIdentitySchema>;
84
- declare const projectionSchema: ZodObject<{
85
- version: ZodLiteral<1>;
86
- kind: ZodLiteral<"projection">;
87
- entityKey: ZodString;
88
- baseTable: ZodString;
89
- joins: ZodArray<ZodObject<{
90
- key: ZodString;
91
- table: ZodString;
92
- type: ZodEnum<{
47
+ on: z.ZodArray<z.ZodObject<{
48
+ left: z.ZodObject<{
49
+ table: z.ZodString;
50
+ column: z.ZodString;
51
+ }, z.core.$strict>;
52
+ op: z.ZodLiteral<"eq">;
53
+ right: z.ZodObject<{
54
+ table: z.ZodString;
55
+ column: z.ZodString;
56
+ }, z.core.$strict>;
57
+ }, z.core.$strict>>;
58
+ }, z.core.$strict>;
59
+ type ProjectionJoin = z.infer<typeof projectionJoinSchema>;
60
+ declare const projectionFieldBindingSchema: z.ZodObject<{
61
+ from: z.ZodObject<{
62
+ table: z.ZodString;
63
+ column: z.ZodString;
64
+ }, z.core.$strict>;
65
+ }, z.core.$strict>;
66
+ type ProjectionFieldBinding = z.infer<typeof projectionFieldBindingSchema>;
67
+ declare const projectionIdentitySchema: z.ZodUnion<readonly [z.ZodObject<{
68
+ kind: z.ZodLiteral<"base_pk">;
69
+ column: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strict>, z.ZodObject<{
71
+ kind: z.ZodLiteral<"column">;
72
+ from: z.ZodObject<{
73
+ table: z.ZodString;
74
+ column: z.ZodString;
75
+ }, z.core.$strict>;
76
+ }, z.core.$strict>, z.ZodObject<{
77
+ kind: z.ZodLiteral<"composite">;
78
+ parts: z.ZodArray<z.ZodObject<{
79
+ table: z.ZodString;
80
+ column: z.ZodString;
81
+ }, z.core.$strict>>;
82
+ }, z.core.$strict>]>;
83
+ type ProjectionIdentity = z.infer<typeof projectionIdentitySchema>;
84
+ declare const projectionSchema: z.ZodObject<{
85
+ version: z.ZodLiteral<1>;
86
+ kind: z.ZodLiteral<"projection">;
87
+ entityKey: z.ZodString;
88
+ baseTable: z.ZodString;
89
+ joins: z.ZodArray<z.ZodObject<{
90
+ key: z.ZodString;
91
+ table: z.ZodString;
92
+ type: z.ZodEnum<{
93
93
  inner: "inner";
94
94
  left: "left";
95
95
  }>;
96
- on: ZodArray<ZodObject<{
97
- left: ZodObject<{
98
- table: ZodString;
99
- column: ZodString;
100
- }, $strict>;
101
- op: ZodLiteral<"eq">;
102
- right: ZodObject<{
103
- table: ZodString;
104
- column: ZodString;
105
- }, $strict>;
106
- }, $strict>>;
107
- }, $strict>>;
108
- fieldBindings: ZodRecord<ZodString, ZodObject<{
109
- from: ZodObject<{
110
- table: ZodString;
111
- column: ZodString;
112
- }, $strict>;
113
- }, $strict>>;
114
- identity: ZodUnion<readonly [ZodObject<{
115
- kind: ZodLiteral<"base_pk">;
116
- column: ZodOptional<ZodString>;
117
- }, $strict>, ZodObject<{
118
- kind: ZodLiteral<"column">;
119
- from: ZodObject<{
120
- table: ZodString;
121
- column: ZodString;
122
- }, $strict>;
123
- }, $strict>, ZodObject<{
124
- kind: ZodLiteral<"composite">;
125
- parts: ZodArray<ZodObject<{
126
- table: ZodString;
127
- column: ZodString;
128
- }, $strict>>;
129
- }, $strict>]>;
130
- }, $strict>;
131
- type ProjectionMapping = output<typeof projectionSchema>;
96
+ on: z.ZodArray<z.ZodObject<{
97
+ left: z.ZodObject<{
98
+ table: z.ZodString;
99
+ column: z.ZodString;
100
+ }, z.core.$strict>;
101
+ op: z.ZodLiteral<"eq">;
102
+ right: z.ZodObject<{
103
+ table: z.ZodString;
104
+ column: z.ZodString;
105
+ }, z.core.$strict>;
106
+ }, z.core.$strict>>;
107
+ }, z.core.$strict>>;
108
+ fieldBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
109
+ from: z.ZodObject<{
110
+ table: z.ZodString;
111
+ column: z.ZodString;
112
+ }, z.core.$strict>;
113
+ }, z.core.$strict>>;
114
+ identity: z.ZodUnion<readonly [z.ZodObject<{
115
+ kind: z.ZodLiteral<"base_pk">;
116
+ column: z.ZodOptional<z.ZodString>;
117
+ }, z.core.$strict>, z.ZodObject<{
118
+ kind: z.ZodLiteral<"column">;
119
+ from: z.ZodObject<{
120
+ table: z.ZodString;
121
+ column: z.ZodString;
122
+ }, z.core.$strict>;
123
+ }, z.core.$strict>, z.ZodObject<{
124
+ kind: z.ZodLiteral<"composite">;
125
+ parts: z.ZodArray<z.ZodObject<{
126
+ table: z.ZodString;
127
+ column: z.ZodString;
128
+ }, z.core.$strict>>;
129
+ }, z.core.$strict>]>;
130
+ }, z.core.$strict>;
131
+ type ProjectionMapping = z.infer<typeof projectionSchema>;
132
132
  /**
133
133
  * Every column ref an identity depends on. `basePkColumn` is the base table's
134
134
  * discovered PK, used only when a `base_pk` identity omits an explicit column.
@@ -218,38 +218,38 @@ type MaterializingConcept = (typeof MATERIALIZING_CONCEPTS)[number];
218
218
  * canonical-concept invariants (and their drift test) stay intact.
219
219
  */
220
220
  declare const CUSTOM_CONCEPT: "custom";
221
- declare const filterValueSchema: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodUnion<readonly [ZodObject<{
222
- eq: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>;
223
- }, $strict>, ZodObject<{
224
- ne: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>;
225
- }, $strict>, ZodObject<{
226
- in: ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
227
- }, $strict>, ZodObject<{
228
- notIn: ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
229
- }, $strict>, ZodObject<{
230
- isNull: ZodLiteral<true>;
231
- }, $strict>, ZodObject<{
232
- isNotNull: ZodLiteral<true>;
233
- }, $strict>]>]>;
221
+ declare const filterValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodUnion<readonly [z.ZodObject<{
222
+ eq: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
223
+ }, z.core.$strict>, z.ZodObject<{
224
+ ne: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
225
+ }, z.core.$strict>, z.ZodObject<{
226
+ in: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
227
+ }, z.core.$strict>, z.ZodObject<{
228
+ notIn: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
229
+ }, z.core.$strict>, z.ZodObject<{
230
+ isNull: z.ZodLiteral<true>;
231
+ }, z.core.$strict>, z.ZodObject<{
232
+ isNotNull: z.ZodLiteral<true>;
233
+ }, z.core.$strict>]>]>;
234
234
  /** `$raw` is a reserved key; a column literally named `$raw` is not addressable. */
235
- declare const filterSchema: ZodUnion<readonly [ZodObject<{
236
- $raw: ZodString;
237
- }, $strict>, ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodUnion<readonly [ZodObject<{
238
- eq: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>;
239
- }, $strict>, ZodObject<{
240
- ne: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>;
241
- }, $strict>, ZodObject<{
242
- in: ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
243
- }, $strict>, ZodObject<{
244
- notIn: ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
245
- }, $strict>, ZodObject<{
246
- isNull: ZodLiteral<true>;
247
- }, $strict>, ZodObject<{
248
- isNotNull: ZodLiteral<true>;
249
- }, $strict>]>]>>]>;
250
- type FilterExpr = output<typeof filterSchema>;
235
+ declare const filterSchema: z.ZodUnion<readonly [z.ZodObject<{
236
+ $raw: z.ZodString;
237
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodUnion<readonly [z.ZodObject<{
238
+ eq: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
239
+ }, z.core.$strict>, z.ZodObject<{
240
+ ne: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
241
+ }, z.core.$strict>, z.ZodObject<{
242
+ in: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
243
+ }, z.core.$strict>, z.ZodObject<{
244
+ notIn: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
245
+ }, z.core.$strict>, z.ZodObject<{
246
+ isNull: z.ZodLiteral<true>;
247
+ }, z.core.$strict>, z.ZodObject<{
248
+ isNotNull: z.ZodLiteral<true>;
249
+ }, z.core.$strict>]>]>>]>;
250
+ type FilterExpr = z.infer<typeof filterSchema>;
251
251
  /** A single column predicate value (scalar shorthand or operator object). */
252
- type FilterValue = output<typeof filterValueSchema>;
252
+ type FilterValue = z.infer<typeof filterValueSchema>;
253
253
  /**
254
254
  * How the link between two entities is expressed in the host schema:
255
255
  * - `fkOn: "company"` — FK lives on the company table (e.g. organizations.owner_id)
@@ -259,257 +259,257 @@ type FilterValue = output<typeof filterValueSchema>;
259
259
  *
260
260
  * `column` and the join-table keys are `table.column` or bare `column` strings.
261
261
  */
262
- declare const relationshipViaSchema: ZodUnion<readonly [ZodObject<{
263
- fkOn: ZodEnum<{
262
+ declare const relationshipViaSchema: z.ZodUnion<readonly [z.ZodObject<{
263
+ fkOn: z.ZodEnum<{
264
264
  contact: "contact";
265
265
  company: "company";
266
266
  }>;
267
- column: ZodString;
268
- }, $strict>, ZodObject<{
269
- through: ZodString;
270
- localKey: ZodString;
271
- foreignKey: ZodString;
272
- }, $strict>, ZodObject<{
273
- $raw: ZodString;
274
- }, $strict>]>;
275
- type RelationshipVia = output<typeof relationshipViaSchema>;
276
- declare const relationshipSchema: ZodObject<{
277
- entity: ZodString;
278
- via: ZodUnion<readonly [ZodObject<{
279
- fkOn: ZodEnum<{
267
+ column: z.ZodString;
268
+ }, z.core.$strict>, z.ZodObject<{
269
+ through: z.ZodString;
270
+ localKey: z.ZodString;
271
+ foreignKey: z.ZodString;
272
+ }, z.core.$strict>, z.ZodObject<{
273
+ $raw: z.ZodString;
274
+ }, z.core.$strict>]>;
275
+ type RelationshipVia = z.infer<typeof relationshipViaSchema>;
276
+ declare const relationshipSchema: z.ZodObject<{
277
+ entity: z.ZodString;
278
+ via: z.ZodUnion<readonly [z.ZodObject<{
279
+ fkOn: z.ZodEnum<{
280
280
  contact: "contact";
281
281
  company: "company";
282
282
  }>;
283
- column: ZodString;
284
- }, $strict>, ZodObject<{
285
- through: ZodString;
286
- localKey: ZodString;
287
- foreignKey: ZodString;
288
- }, $strict>, ZodObject<{
289
- $raw: ZodString;
290
- }, $strict>]>;
291
- }, $strict>;
292
- type RelationshipSpec = output<typeof relationshipSchema>;
283
+ column: z.ZodString;
284
+ }, z.core.$strict>, z.ZodObject<{
285
+ through: z.ZodString;
286
+ localKey: z.ZodString;
287
+ foreignKey: z.ZodString;
288
+ }, z.core.$strict>, z.ZodObject<{
289
+ $raw: z.ZodString;
290
+ }, z.core.$strict>]>;
291
+ }, z.core.$strict>;
292
+ type RelationshipSpec = z.infer<typeof relationshipSchema>;
293
293
  /** A named map of relationships, as stored on an entity / in the mappings row. */
294
- declare const relationshipsSchema: ZodRecord<ZodString, ZodObject<{
295
- entity: ZodString;
296
- via: ZodUnion<readonly [ZodObject<{
297
- fkOn: ZodEnum<{
294
+ declare const relationshipsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
295
+ entity: z.ZodString;
296
+ via: z.ZodUnion<readonly [z.ZodObject<{
297
+ fkOn: z.ZodEnum<{
298
298
  contact: "contact";
299
299
  company: "company";
300
300
  }>;
301
- column: ZodString;
302
- }, $strict>, ZodObject<{
303
- through: ZodString;
304
- localKey: ZodString;
305
- foreignKey: ZodString;
306
- }, $strict>, ZodObject<{
307
- $raw: ZodString;
308
- }, $strict>]>;
309
- }, $strict>>;
310
- type RelationshipsMap = output<typeof relationshipsSchema>;
311
- declare const entitySchema: ZodObject<{
312
- concept: ZodUnion<readonly [ZodEnum<{
301
+ column: z.ZodString;
302
+ }, z.core.$strict>, z.ZodObject<{
303
+ through: z.ZodString;
304
+ localKey: z.ZodString;
305
+ foreignKey: z.ZodString;
306
+ }, z.core.$strict>, z.ZodObject<{
307
+ $raw: z.ZodString;
308
+ }, z.core.$strict>]>;
309
+ }, z.core.$strict>>;
310
+ type RelationshipsMap = z.infer<typeof relationshipsSchema>;
311
+ declare const entitySchema: z.ZodObject<{
312
+ concept: z.ZodUnion<readonly [z.ZodEnum<{
313
313
  contact: "contact";
314
314
  company: "company";
315
315
  deal: "deal";
316
316
  activity: "activity";
317
317
  conversation: "conversation";
318
318
  note: "note";
319
- }>, ZodLiteral<"custom">]>;
320
- source: ZodString;
321
- role: ZodOptional<ZodString>;
322
- filter: ZodOptional<ZodUnion<readonly [ZodObject<{
323
- $raw: ZodString;
324
- }, $strict>, ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodUnion<readonly [ZodObject<{
325
- eq: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>;
326
- }, $strict>, ZodObject<{
327
- ne: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>;
328
- }, $strict>, ZodObject<{
329
- in: ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
330
- }, $strict>, ZodObject<{
331
- notIn: ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
332
- }, $strict>, ZodObject<{
333
- isNull: ZodLiteral<true>;
334
- }, $strict>, ZodObject<{
335
- isNotNull: ZodLiteral<true>;
336
- }, $strict>]>]>>]>>;
337
- fields: ZodRecord<ZodString, ZodString>;
338
- readOnly: ZodOptional<ZodArray<ZodString>>;
339
- relationships: ZodOptional<ZodRecord<ZodString, ZodObject<{
340
- entity: ZodString;
341
- via: ZodUnion<readonly [ZodObject<{
342
- fkOn: ZodEnum<{
319
+ }>, z.ZodLiteral<"custom">]>;
320
+ source: z.ZodString;
321
+ role: z.ZodOptional<z.ZodString>;
322
+ filter: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
323
+ $raw: z.ZodString;
324
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodUnion<readonly [z.ZodObject<{
325
+ eq: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
326
+ }, z.core.$strict>, z.ZodObject<{
327
+ ne: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
328
+ }, z.core.$strict>, z.ZodObject<{
329
+ in: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
330
+ }, z.core.$strict>, z.ZodObject<{
331
+ notIn: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
332
+ }, z.core.$strict>, z.ZodObject<{
333
+ isNull: z.ZodLiteral<true>;
334
+ }, z.core.$strict>, z.ZodObject<{
335
+ isNotNull: z.ZodLiteral<true>;
336
+ }, z.core.$strict>]>]>>]>>;
337
+ fields: z.ZodRecord<z.ZodString, z.ZodString>;
338
+ readOnly: z.ZodOptional<z.ZodArray<z.ZodString>>;
339
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
340
+ entity: z.ZodString;
341
+ via: z.ZodUnion<readonly [z.ZodObject<{
342
+ fkOn: z.ZodEnum<{
343
343
  contact: "contact";
344
344
  company: "company";
345
345
  }>;
346
- column: ZodString;
347
- }, $strict>, ZodObject<{
348
- through: ZodString;
349
- localKey: ZodString;
350
- foreignKey: ZodString;
351
- }, $strict>, ZodObject<{
352
- $raw: ZodString;
353
- }, $strict>]>;
354
- }, $strict>>>;
355
- isPrimaryContact: ZodOptional<ZodBoolean>;
356
- targetObjectTypeId: ZodOptional<ZodString>;
357
- objectType: ZodOptional<ZodObject<{
358
- name: ZodString;
359
- pluralName: ZodOptional<ZodString>;
360
- iconKey: ZodOptional<ZodString>;
361
- }, $strict>>;
362
- projection: ZodOptional<ZodObject<{
363
- version: ZodLiteral<1>;
364
- kind: ZodLiteral<"projection">;
365
- entityKey: ZodString;
366
- baseTable: ZodString;
367
- joins: ZodArray<ZodObject<{
368
- key: ZodString;
369
- table: ZodString;
370
- type: ZodEnum<{
346
+ column: z.ZodString;
347
+ }, z.core.$strict>, z.ZodObject<{
348
+ through: z.ZodString;
349
+ localKey: z.ZodString;
350
+ foreignKey: z.ZodString;
351
+ }, z.core.$strict>, z.ZodObject<{
352
+ $raw: z.ZodString;
353
+ }, z.core.$strict>]>;
354
+ }, z.core.$strict>>>;
355
+ isPrimaryContact: z.ZodOptional<z.ZodBoolean>;
356
+ targetObjectTypeId: z.ZodOptional<z.ZodString>;
357
+ objectType: z.ZodOptional<z.ZodObject<{
358
+ name: z.ZodString;
359
+ pluralName: z.ZodOptional<z.ZodString>;
360
+ iconKey: z.ZodOptional<z.ZodString>;
361
+ }, z.core.$strict>>;
362
+ projection: z.ZodOptional<z.ZodObject<{
363
+ version: z.ZodLiteral<1>;
364
+ kind: z.ZodLiteral<"projection">;
365
+ entityKey: z.ZodString;
366
+ baseTable: z.ZodString;
367
+ joins: z.ZodArray<z.ZodObject<{
368
+ key: z.ZodString;
369
+ table: z.ZodString;
370
+ type: z.ZodEnum<{
371
371
  inner: "inner";
372
372
  left: "left";
373
373
  }>;
374
- on: ZodArray<ZodObject<{
375
- left: ZodObject<{
376
- table: ZodString;
377
- column: ZodString;
378
- }, $strict>;
379
- op: ZodLiteral<"eq">;
380
- right: ZodObject<{
381
- table: ZodString;
382
- column: ZodString;
383
- }, $strict>;
384
- }, $strict>>;
385
- }, $strict>>;
386
- fieldBindings: ZodRecord<ZodString, ZodObject<{
387
- from: ZodObject<{
388
- table: ZodString;
389
- column: ZodString;
390
- }, $strict>;
391
- }, $strict>>;
392
- identity: ZodUnion<readonly [ZodObject<{
393
- kind: ZodLiteral<"base_pk">;
394
- column: ZodOptional<ZodString>;
395
- }, $strict>, ZodObject<{
396
- kind: ZodLiteral<"column">;
397
- from: ZodObject<{
398
- table: ZodString;
399
- column: ZodString;
400
- }, $strict>;
401
- }, $strict>, ZodObject<{
402
- kind: ZodLiteral<"composite">;
403
- parts: ZodArray<ZodObject<{
404
- table: ZodString;
405
- column: ZodString;
406
- }, $strict>>;
407
- }, $strict>]>;
408
- }, $strict>>;
409
- }, $strict>;
410
- type ClivlyEntityConfig = output<typeof entitySchema>;
411
- declare const entitiesConfigSchema: ZodObject<{
412
- entities: ZodRecord<ZodString, ZodObject<{
413
- concept: ZodUnion<readonly [ZodEnum<{
374
+ on: z.ZodArray<z.ZodObject<{
375
+ left: z.ZodObject<{
376
+ table: z.ZodString;
377
+ column: z.ZodString;
378
+ }, z.core.$strict>;
379
+ op: z.ZodLiteral<"eq">;
380
+ right: z.ZodObject<{
381
+ table: z.ZodString;
382
+ column: z.ZodString;
383
+ }, z.core.$strict>;
384
+ }, z.core.$strict>>;
385
+ }, z.core.$strict>>;
386
+ fieldBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
387
+ from: z.ZodObject<{
388
+ table: z.ZodString;
389
+ column: z.ZodString;
390
+ }, z.core.$strict>;
391
+ }, z.core.$strict>>;
392
+ identity: z.ZodUnion<readonly [z.ZodObject<{
393
+ kind: z.ZodLiteral<"base_pk">;
394
+ column: z.ZodOptional<z.ZodString>;
395
+ }, z.core.$strict>, z.ZodObject<{
396
+ kind: z.ZodLiteral<"column">;
397
+ from: z.ZodObject<{
398
+ table: z.ZodString;
399
+ column: z.ZodString;
400
+ }, z.core.$strict>;
401
+ }, z.core.$strict>, z.ZodObject<{
402
+ kind: z.ZodLiteral<"composite">;
403
+ parts: z.ZodArray<z.ZodObject<{
404
+ table: z.ZodString;
405
+ column: z.ZodString;
406
+ }, z.core.$strict>>;
407
+ }, z.core.$strict>]>;
408
+ }, z.core.$strict>>;
409
+ }, z.core.$strict>;
410
+ type ClivlyEntityConfig = z.infer<typeof entitySchema>;
411
+ declare const entitiesConfigSchema: z.ZodObject<{
412
+ entities: z.ZodRecord<z.ZodString, z.ZodObject<{
413
+ concept: z.ZodUnion<readonly [z.ZodEnum<{
414
414
  contact: "contact";
415
415
  company: "company";
416
416
  deal: "deal";
417
417
  activity: "activity";
418
418
  conversation: "conversation";
419
419
  note: "note";
420
- }>, ZodLiteral<"custom">]>;
421
- source: ZodString;
422
- role: ZodOptional<ZodString>;
423
- filter: ZodOptional<ZodUnion<readonly [ZodObject<{
424
- $raw: ZodString;
425
- }, $strict>, ZodRecord<ZodString, ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodUnion<readonly [ZodObject<{
426
- eq: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>;
427
- }, $strict>, ZodObject<{
428
- ne: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>;
429
- }, $strict>, ZodObject<{
430
- in: ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
431
- }, $strict>, ZodObject<{
432
- notIn: ZodArray<ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean]>>;
433
- }, $strict>, ZodObject<{
434
- isNull: ZodLiteral<true>;
435
- }, $strict>, ZodObject<{
436
- isNotNull: ZodLiteral<true>;
437
- }, $strict>]>]>>]>>;
438
- fields: ZodRecord<ZodString, ZodString>;
439
- readOnly: ZodOptional<ZodArray<ZodString>>;
440
- relationships: ZodOptional<ZodRecord<ZodString, ZodObject<{
441
- entity: ZodString;
442
- via: ZodUnion<readonly [ZodObject<{
443
- fkOn: ZodEnum<{
420
+ }>, z.ZodLiteral<"custom">]>;
421
+ source: z.ZodString;
422
+ role: z.ZodOptional<z.ZodString>;
423
+ filter: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
424
+ $raw: z.ZodString;
425
+ }, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodUnion<readonly [z.ZodObject<{
426
+ eq: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
427
+ }, z.core.$strict>, z.ZodObject<{
428
+ ne: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
429
+ }, z.core.$strict>, z.ZodObject<{
430
+ in: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
431
+ }, z.core.$strict>, z.ZodObject<{
432
+ notIn: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
433
+ }, z.core.$strict>, z.ZodObject<{
434
+ isNull: z.ZodLiteral<true>;
435
+ }, z.core.$strict>, z.ZodObject<{
436
+ isNotNull: z.ZodLiteral<true>;
437
+ }, z.core.$strict>]>]>>]>>;
438
+ fields: z.ZodRecord<z.ZodString, z.ZodString>;
439
+ readOnly: z.ZodOptional<z.ZodArray<z.ZodString>>;
440
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
441
+ entity: z.ZodString;
442
+ via: z.ZodUnion<readonly [z.ZodObject<{
443
+ fkOn: z.ZodEnum<{
444
444
  contact: "contact";
445
445
  company: "company";
446
446
  }>;
447
- column: ZodString;
448
- }, $strict>, ZodObject<{
449
- through: ZodString;
450
- localKey: ZodString;
451
- foreignKey: ZodString;
452
- }, $strict>, ZodObject<{
453
- $raw: ZodString;
454
- }, $strict>]>;
455
- }, $strict>>>;
456
- isPrimaryContact: ZodOptional<ZodBoolean>;
457
- targetObjectTypeId: ZodOptional<ZodString>;
458
- objectType: ZodOptional<ZodObject<{
459
- name: ZodString;
460
- pluralName: ZodOptional<ZodString>;
461
- iconKey: ZodOptional<ZodString>;
462
- }, $strict>>;
463
- projection: ZodOptional<ZodObject<{
464
- version: ZodLiteral<1>;
465
- kind: ZodLiteral<"projection">;
466
- entityKey: ZodString;
467
- baseTable: ZodString;
468
- joins: ZodArray<ZodObject<{
469
- key: ZodString;
470
- table: ZodString;
471
- type: ZodEnum<{
447
+ column: z.ZodString;
448
+ }, z.core.$strict>, z.ZodObject<{
449
+ through: z.ZodString;
450
+ localKey: z.ZodString;
451
+ foreignKey: z.ZodString;
452
+ }, z.core.$strict>, z.ZodObject<{
453
+ $raw: z.ZodString;
454
+ }, z.core.$strict>]>;
455
+ }, z.core.$strict>>>;
456
+ isPrimaryContact: z.ZodOptional<z.ZodBoolean>;
457
+ targetObjectTypeId: z.ZodOptional<z.ZodString>;
458
+ objectType: z.ZodOptional<z.ZodObject<{
459
+ name: z.ZodString;
460
+ pluralName: z.ZodOptional<z.ZodString>;
461
+ iconKey: z.ZodOptional<z.ZodString>;
462
+ }, z.core.$strict>>;
463
+ projection: z.ZodOptional<z.ZodObject<{
464
+ version: z.ZodLiteral<1>;
465
+ kind: z.ZodLiteral<"projection">;
466
+ entityKey: z.ZodString;
467
+ baseTable: z.ZodString;
468
+ joins: z.ZodArray<z.ZodObject<{
469
+ key: z.ZodString;
470
+ table: z.ZodString;
471
+ type: z.ZodEnum<{
472
472
  inner: "inner";
473
473
  left: "left";
474
474
  }>;
475
- on: ZodArray<ZodObject<{
476
- left: ZodObject<{
477
- table: ZodString;
478
- column: ZodString;
479
- }, $strict>;
480
- op: ZodLiteral<"eq">;
481
- right: ZodObject<{
482
- table: ZodString;
483
- column: ZodString;
484
- }, $strict>;
485
- }, $strict>>;
486
- }, $strict>>;
487
- fieldBindings: ZodRecord<ZodString, ZodObject<{
488
- from: ZodObject<{
489
- table: ZodString;
490
- column: ZodString;
491
- }, $strict>;
492
- }, $strict>>;
493
- identity: ZodUnion<readonly [ZodObject<{
494
- kind: ZodLiteral<"base_pk">;
495
- column: ZodOptional<ZodString>;
496
- }, $strict>, ZodObject<{
497
- kind: ZodLiteral<"column">;
498
- from: ZodObject<{
499
- table: ZodString;
500
- column: ZodString;
501
- }, $strict>;
502
- }, $strict>, ZodObject<{
503
- kind: ZodLiteral<"composite">;
504
- parts: ZodArray<ZodObject<{
505
- table: ZodString;
506
- column: ZodString;
507
- }, $strict>>;
508
- }, $strict>]>;
509
- }, $strict>>;
510
- }, $strict>>;
511
- }, $strict>;
512
- type ClivlyEntitiesConfig = output<typeof entitiesConfigSchema>;
475
+ on: z.ZodArray<z.ZodObject<{
476
+ left: z.ZodObject<{
477
+ table: z.ZodString;
478
+ column: z.ZodString;
479
+ }, z.core.$strict>;
480
+ op: z.ZodLiteral<"eq">;
481
+ right: z.ZodObject<{
482
+ table: z.ZodString;
483
+ column: z.ZodString;
484
+ }, z.core.$strict>;
485
+ }, z.core.$strict>>;
486
+ }, z.core.$strict>>;
487
+ fieldBindings: z.ZodRecord<z.ZodString, z.ZodObject<{
488
+ from: z.ZodObject<{
489
+ table: z.ZodString;
490
+ column: z.ZodString;
491
+ }, z.core.$strict>;
492
+ }, z.core.$strict>>;
493
+ identity: z.ZodUnion<readonly [z.ZodObject<{
494
+ kind: z.ZodLiteral<"base_pk">;
495
+ column: z.ZodOptional<z.ZodString>;
496
+ }, z.core.$strict>, z.ZodObject<{
497
+ kind: z.ZodLiteral<"column">;
498
+ from: z.ZodObject<{
499
+ table: z.ZodString;
500
+ column: z.ZodString;
501
+ }, z.core.$strict>;
502
+ }, z.core.$strict>, z.ZodObject<{
503
+ kind: z.ZodLiteral<"composite">;
504
+ parts: z.ZodArray<z.ZodObject<{
505
+ table: z.ZodString;
506
+ column: z.ZodString;
507
+ }, z.core.$strict>>;
508
+ }, z.core.$strict>]>;
509
+ }, z.core.$strict>>;
510
+ }, z.core.$strict>>;
511
+ }, z.core.$strict>;
512
+ type ClivlyEntitiesConfig = z.infer<typeof entitiesConfigSchema>;
513
513
  /**
514
514
  * What an author may hand to `defineClivlyConfig`. Identical to
515
515
  * `ClivlyEntityConfig` except that a projection entity may omit `fields` —