@lssm/example.analytics-dashboard 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102

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 (95) hide show
  1. package/dist/dashboard/dashboard.contracts.d.ts +131 -131
  2. package/dist/dashboard/dashboard.contracts.js +5 -5
  3. package/dist/dashboard/dashboard.enum.d.ts +4 -4
  4. package/dist/dashboard/dashboard.enum.js +4 -4
  5. package/dist/dashboard/dashboard.schema.d.ts +79 -79
  6. package/dist/dashboard/dashboard.schema.js +43 -43
  7. package/dist/docs/analytics-dashboard.docblock.js +2 -2
  8. package/dist/events.d.ts +40 -40
  9. package/dist/events.js +25 -25
  10. package/dist/libs/contracts/dist/capabilities/openbanking.js +53 -49
  11. package/dist/libs/contracts/dist/client/index.js +1 -1
  12. package/dist/libs/contracts/dist/client/react/index.js +1 -1
  13. package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
  14. package/dist/libs/contracts/dist/contract-registry/schemas.js +52 -49
  15. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +11 -86
  16. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +11 -360
  17. package/dist/libs/contracts/dist/docs/index.js +2 -2
  18. package/dist/libs/contracts/dist/docs/presentations.js +48 -44
  19. package/dist/libs/contracts/dist/docs/registry.js +27 -25
  20. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +11 -393
  21. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +11 -78
  22. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +11 -150
  23. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +11 -96
  24. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +10 -10
  25. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +15 -15
  26. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +12 -12
  27. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +11 -223
  28. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +44 -44
  29. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +30 -14
  30. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +10 -10
  31. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +13 -274
  32. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +41 -15
  33. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +15 -15
  34. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +14 -14
  35. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +16 -28
  36. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +60 -15
  37. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +13 -13
  38. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +31 -48
  39. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +40 -15
  40. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +14 -14
  41. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +22 -22
  42. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +12 -12
  43. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +22 -22
  44. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +11 -11
  45. package/dist/libs/contracts/dist/events.js +4 -3
  46. package/dist/libs/contracts/dist/index.js +14 -14
  47. package/dist/libs/contracts/dist/integrations/contracts.js +205 -199
  48. package/dist/libs/contracts/dist/integrations/index.js +5 -5
  49. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +133 -130
  50. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +95 -93
  51. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -3
  52. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +120 -118
  53. package/dist/libs/contracts/dist/integrations/openbanking/models.js +122 -120
  54. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +9 -20
  55. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +25 -25
  56. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +36 -36
  57. package/dist/libs/contracts/dist/integrations/providers/gmail.js +40 -40
  58. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +31 -31
  59. package/dist/libs/contracts/dist/integrations/providers/mistral.js +31 -31
  60. package/dist/libs/contracts/dist/integrations/providers/postmark.js +31 -31
  61. package/dist/libs/contracts/dist/integrations/providers/powens.js +51 -51
  62. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +31 -31
  63. package/dist/libs/contracts/dist/integrations/providers/stripe.js +35 -35
  64. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +28 -28
  65. package/dist/libs/contracts/dist/jsonschema.js +1 -1
  66. package/dist/libs/contracts/dist/knowledge/contracts.js +170 -163
  67. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +17 -17
  68. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +17 -17
  69. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +19 -19
  70. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +17 -17
  71. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +17 -17
  72. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +17 -17
  73. package/dist/libs/contracts/dist/llm/exporters.js +13 -12
  74. package/dist/libs/contracts/dist/onboarding-base.js +116 -99
  75. package/dist/libs/contracts/dist/ownership.js +18 -33
  76. package/dist/libs/contracts/dist/presentations.js +1 -1
  77. package/dist/libs/contracts/dist/presentations.v2.js +6 -2
  78. package/dist/libs/contracts/dist/regenerator/service.js +5 -0
  79. package/dist/libs/contracts/dist/registry.js +1 -1
  80. package/dist/libs/contracts/dist/schema/dist/FieldType.js +24 -14
  81. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +180 -166
  82. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +20 -9
  83. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
  84. package/dist/libs/contracts/dist/spec.js +22 -13
  85. package/dist/libs/schema/dist/EnumType.js +25 -9
  86. package/dist/libs/schema/dist/FieldType.js +24 -14
  87. package/dist/libs/schema/dist/ScalarTypeEnum.js +180 -166
  88. package/dist/libs/schema/dist/SchemaModel.js +25 -10
  89. package/dist/libs/schema/dist/index.js +4 -4
  90. package/dist/query/query.contracts.js +3 -3
  91. package/dist/query/query.enum.d.ts +2 -2
  92. package/dist/query/query.enum.js +2 -2
  93. package/dist/query/query.schema.d.ts +34 -34
  94. package/dist/query/query.schema.js +33 -33
  95. package/package.json +10 -10
@@ -1,222 +1,236 @@
1
- import { t } from "./FieldType.js";
2
- import * as t$1 from "zod";
1
+ import { FieldType } from "./FieldType.js";
2
+ import * as z$1 from "zod";
3
3
  import { Kind } from "graphql";
4
4
 
5
5
  //#region ../../libs/schema/dist/ScalarTypeEnum.js
6
- const r = /^[A-Za-z]{2}(?:-[A-Za-z0-9]{2,8})*$/, i = /^(?:UTC|[A-Za-z_]+\/[A-Za-z_]+)$/, a = /^[+]?\d[\d\s().-]{3,}$/, o = /^[A-Z]{3}$/, s = /^[A-Z]{2}$/, c = -180, l = {
7
- String_unsecure: () => new t({
8
- name: `String_unsecure`,
9
- description: `Unvalidated string scalar`,
10
- zod: t$1.string(),
11
- parseValue: (e$1) => t$1.string().parse(e$1),
12
- serialize: (e$1) => String(e$1),
13
- parseLiteral: (e$1) => {
14
- if (e$1.kind !== Kind.STRING) throw TypeError(`Invalid literal`);
15
- return e$1.value;
6
+ const localeRegex = /^[A-Za-z]{2}(?:-[A-Za-z0-9]{2,8})*$/;
7
+ const timezoneRegex = /^(?:UTC|[A-Za-z_]+\/[A-Za-z_]+)$/;
8
+ const phoneRegex = /^[+]?\d[\d\s().-]{3,}$/;
9
+ const currencyRegex = /^[A-Z]{3}$/;
10
+ const countryRegex = /^[A-Z]{2}$/;
11
+ const latMin = -90;
12
+ const latMax = 90;
13
+ const lonMin = -180;
14
+ const lonMax = 180;
15
+ /**
16
+ * Factory functions for common scalar FieldTypes with zod/GraphQL/JSON Schema.
17
+ */
18
+ const ScalarTypeEnum = {
19
+ String_unsecure: () => new FieldType({
20
+ name: "String_unsecure",
21
+ description: "Unvalidated string scalar",
22
+ zod: z$1.string(),
23
+ parseValue: (v) => z$1.string().parse(v),
24
+ serialize: (v) => String(v),
25
+ parseLiteral: (ast) => {
26
+ if (ast.kind !== Kind.STRING) throw new TypeError("Invalid literal");
27
+ return ast.value;
16
28
  },
17
- jsonSchema: { type: `string` }
18
- }),
19
- Int_unsecure: () => new t({
20
- name: `Int_unsecure`,
21
- description: `Unvalidated integer scalar`,
22
- zod: t$1.number().int(),
23
- parseValue: (e$1) => {
24
- let n = typeof e$1 == `number` ? e$1 : Number(e$1);
25
- return t$1.number().int().parse(n);
29
+ jsonSchema: { type: "string" }
30
+ }),
31
+ Int_unsecure: () => new FieldType({
32
+ name: "Int_unsecure",
33
+ description: "Unvalidated integer scalar",
34
+ zod: z$1.number().int(),
35
+ parseValue: (v) => {
36
+ const num = typeof v === "number" ? v : Number(v);
37
+ return z$1.number().int().parse(num);
26
38
  },
27
- serialize: (e$1) => Math.trunc(typeof e$1 == `number` ? e$1 : Number(e$1)),
28
- parseLiteral: (e$1) => {
29
- if (e$1.kind !== Kind.INT) throw TypeError(`Invalid literal`);
30
- return Number(e$1.value);
39
+ serialize: (v) => Math.trunc(typeof v === "number" ? v : Number(v)),
40
+ parseLiteral: (ast) => {
41
+ if (ast.kind !== Kind.INT) throw new TypeError("Invalid literal");
42
+ return Number(ast.value);
31
43
  },
32
- jsonSchema: { type: `integer` }
33
- }),
34
- Float_unsecure: () => new t({
35
- name: `Float_unsecure`,
36
- description: `Unvalidated float scalar`,
37
- zod: t$1.number(),
38
- parseValue: (e$1) => {
39
- let n = typeof e$1 == `number` ? e$1 : Number(e$1);
40
- return t$1.number().parse(n);
44
+ jsonSchema: { type: "integer" }
45
+ }),
46
+ Float_unsecure: () => new FieldType({
47
+ name: "Float_unsecure",
48
+ description: "Unvalidated float scalar",
49
+ zod: z$1.number(),
50
+ parseValue: (v) => {
51
+ const num = typeof v === "number" ? v : Number(v);
52
+ return z$1.number().parse(num);
41
53
  },
42
- serialize: (e$1) => Number(e$1),
43
- parseLiteral: (e$1) => {
44
- if (e$1.kind !== Kind.FLOAT && e$1.kind !== Kind.INT) throw TypeError(`Invalid literal`);
45
- return Number(e$1.value);
54
+ serialize: (v) => Number(v),
55
+ parseLiteral: (ast) => {
56
+ if (ast.kind !== Kind.FLOAT && ast.kind !== Kind.INT) throw new TypeError("Invalid literal");
57
+ return Number(ast.value);
46
58
  },
47
- jsonSchema: { type: `number` }
48
- }),
49
- Boolean: () => new t({
50
- name: `Boolean`,
51
- description: `Unvalidated boolean scalar`,
52
- zod: t$1.boolean(),
53
- parseValue: (e$1) => t$1.coerce.boolean().parse(e$1),
54
- serialize: (e$1) => !!e$1,
55
- parseLiteral: (e$1) => {
56
- if (e$1.kind !== Kind.BOOLEAN) throw TypeError(`Invalid literal`);
57
- return e$1.value;
59
+ jsonSchema: { type: "number" }
60
+ }),
61
+ Boolean: () => new FieldType({
62
+ name: "Boolean",
63
+ description: "Unvalidated boolean scalar",
64
+ zod: z$1.boolean(),
65
+ parseValue: (v) => z$1.coerce.boolean().parse(v),
66
+ serialize: (v) => Boolean(v),
67
+ parseLiteral: (ast) => {
68
+ if (ast.kind !== Kind.BOOLEAN) throw new TypeError("Invalid literal");
69
+ return ast.value;
58
70
  },
59
- jsonSchema: { type: `boolean` }
60
- }),
61
- ID: () => new t({
62
- name: `ID`,
63
- description: `Unvalidated id scalar`,
64
- zod: t$1.string(),
65
- parseValue: (e$1) => t$1.string().parse(e$1),
66
- serialize: (e$1) => String(e$1),
67
- parseLiteral: (e$1) => {
68
- if (e$1.kind !== Kind.STRING) throw TypeError(`Invalid literal`);
69
- return e$1.value;
71
+ jsonSchema: { type: "boolean" }
72
+ }),
73
+ ID: () => new FieldType({
74
+ name: "ID",
75
+ description: "Unvalidated id scalar",
76
+ zod: z$1.string(),
77
+ parseValue: (v) => z$1.string().parse(v),
78
+ serialize: (v) => String(v),
79
+ parseLiteral: (ast) => {
80
+ if (ast.kind !== Kind.STRING) throw new TypeError("Invalid literal");
81
+ return ast.value;
70
82
  },
71
- jsonSchema: { type: `string` }
83
+ jsonSchema: { type: "string" }
72
84
  }),
73
- JSON: () => new t({
74
- name: `JSON`,
75
- zod: t$1.any(),
76
- parseValue: (e$1) => e$1,
77
- serialize: (e$1) => e$1,
85
+ JSON: () => new FieldType({
86
+ name: "JSON",
87
+ zod: z$1.any(),
88
+ parseValue: (v) => v,
89
+ serialize: (v) => v,
78
90
  jsonSchema: {}
79
91
  }),
80
- JSONObject: () => new t({
81
- name: `JSONObject`,
82
- zod: t$1.record(t$1.string(), t$1.any()),
83
- parseValue: (e$1) => t$1.record(t$1.string(), t$1.any()).parse(e$1),
84
- serialize: (e$1) => e$1 ?? {},
85
- jsonSchema: { type: `object` }
86
- }),
87
- Date: () => new t({
88
- name: `Date`,
89
- zod: t$1.date(),
90
- parseValue: (e$1) => e$1 instanceof Date ? e$1 : new Date(String(e$1)),
91
- serialize: (e$1) => e$1 instanceof Date ? e$1.toISOString().split(`T`)[0] : String(e$1),
92
+ JSONObject: () => new FieldType({
93
+ name: "JSONObject",
94
+ zod: z$1.record(z$1.string(), z$1.any()),
95
+ parseValue: (v) => z$1.record(z$1.string(), z$1.any()).parse(v),
96
+ serialize: (v) => v ?? {},
97
+ jsonSchema: { type: "object" }
98
+ }),
99
+ Date: () => new FieldType({
100
+ name: "Date",
101
+ zod: z$1.date(),
102
+ parseValue: (v) => v instanceof Date ? v : new Date(String(v)),
103
+ serialize: (v) => v instanceof Date ? v.toISOString().split("T")[0] : String(v),
92
104
  jsonSchema: {
93
- type: `string`,
94
- format: `date`
105
+ type: "string",
106
+ format: "date"
95
107
  }
96
108
  }),
97
- DateTime: () => new t({
98
- name: `DateTime`,
99
- zod: t$1.date(),
100
- parseValue: (e$1) => e$1 instanceof Date ? e$1 : new Date(String(e$1)),
101
- serialize: (e$1) => e$1 instanceof Date ? e$1.toISOString() : String(e$1),
109
+ DateTime: () => new FieldType({
110
+ name: "DateTime",
111
+ zod: z$1.date(),
112
+ parseValue: (v) => v instanceof Date ? v : new Date(String(v)),
113
+ serialize: (v) => {
114
+ return v instanceof Date ? v.toISOString() : String(v);
115
+ },
102
116
  jsonSchema: {
103
- type: `string`,
104
- format: `date-time`
117
+ type: "string",
118
+ format: "date-time"
105
119
  }
106
120
  }),
107
- Time: () => new t({
108
- name: `Time`,
109
- zod: t$1.string().regex(/^\d{2}:\d{2}(:\d{2})?$/),
110
- parseValue: (e$1) => t$1.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(e$1),
111
- serialize: (e$1) => String(e$1),
121
+ Time: () => new FieldType({
122
+ name: "Time",
123
+ zod: z$1.string().regex(/^\d{2}:\d{2}(:\d{2})?$/),
124
+ parseValue: (v) => z$1.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(v),
125
+ serialize: (v) => String(v),
112
126
  jsonSchema: {
113
- type: `string`,
114
- pattern: `^\\d{2}:\\d{2}(:\\d{2})?$`
127
+ type: "string",
128
+ pattern: "^\\d{2}:\\d{2}(:\\d{2})?$"
115
129
  }
116
130
  }),
117
- EmailAddress: () => new t({
118
- name: `EmailAddress`,
119
- zod: t$1.string().email(),
120
- parseValue: (e$1) => t$1.string().email().parse(e$1),
121
- serialize: (e$1) => String(e$1),
131
+ EmailAddress: () => new FieldType({
132
+ name: "EmailAddress",
133
+ zod: z$1.string().email(),
134
+ parseValue: (v) => z$1.string().email().parse(v),
135
+ serialize: (v) => String(v),
122
136
  jsonSchema: {
123
- type: `string`,
124
- format: `email`
137
+ type: "string",
138
+ format: "email"
125
139
  }
126
140
  }),
127
- URL: () => new t({
128
- name: `URL`,
129
- zod: t$1.string().url(),
130
- parseValue: (e$1) => t$1.string().url().parse(e$1),
131
- serialize: (e$1) => String(e$1),
141
+ URL: () => new FieldType({
142
+ name: "URL",
143
+ zod: z$1.string().url(),
144
+ parseValue: (v) => z$1.string().url().parse(v),
145
+ serialize: (v) => String(v),
132
146
  jsonSchema: {
133
- type: `string`,
134
- format: `uri`
147
+ type: "string",
148
+ format: "uri"
135
149
  }
136
150
  }),
137
- PhoneNumber: () => new t({
138
- name: `PhoneNumber`,
139
- zod: t$1.string().regex(a),
140
- parseValue: (e$1) => t$1.string().regex(a).parse(e$1),
141
- serialize: (e$1) => String(e$1),
151
+ PhoneNumber: () => new FieldType({
152
+ name: "PhoneNumber",
153
+ zod: z$1.string().regex(phoneRegex),
154
+ parseValue: (v) => z$1.string().regex(phoneRegex).parse(v),
155
+ serialize: (v) => String(v),
142
156
  jsonSchema: {
143
- type: `string`,
144
- pattern: a.source
157
+ type: "string",
158
+ pattern: phoneRegex.source
145
159
  }
146
160
  }),
147
- NonEmptyString: () => new t({
148
- name: `NonEmptyString`,
149
- zod: t$1.string().min(1),
150
- parseValue: (e$1) => t$1.string().min(1).parse(e$1),
151
- serialize: (e$1) => String(e$1),
161
+ NonEmptyString: () => new FieldType({
162
+ name: "NonEmptyString",
163
+ zod: z$1.string().min(1),
164
+ parseValue: (v) => z$1.string().min(1).parse(v),
165
+ serialize: (v) => String(v),
152
166
  jsonSchema: {
153
- type: `string`,
167
+ type: "string",
154
168
  minLength: 1
155
169
  }
156
170
  }),
157
- Locale: () => new t({
158
- name: `Locale`,
159
- zod: t$1.string().regex(r),
160
- parseValue: (e$1) => t$1.string().regex(r).parse(e$1),
161
- serialize: (e$1) => String(e$1),
171
+ Locale: () => new FieldType({
172
+ name: "Locale",
173
+ zod: z$1.string().regex(localeRegex),
174
+ parseValue: (v) => z$1.string().regex(localeRegex).parse(v),
175
+ serialize: (v) => String(v),
162
176
  jsonSchema: {
163
- type: `string`,
164
- pattern: r.source
177
+ type: "string",
178
+ pattern: localeRegex.source
165
179
  }
166
180
  }),
167
- TimeZone: () => new t({
168
- name: `TimeZone`,
169
- zod: t$1.string().regex(i),
170
- parseValue: (e$1) => t$1.string().regex(i).parse(e$1),
171
- serialize: (e$1) => String(e$1),
181
+ TimeZone: () => new FieldType({
182
+ name: "TimeZone",
183
+ zod: z$1.string().regex(timezoneRegex),
184
+ parseValue: (v) => z$1.string().regex(timezoneRegex).parse(v),
185
+ serialize: (v) => String(v),
172
186
  jsonSchema: {
173
- type: `string`,
174
- pattern: i.source
187
+ type: "string",
188
+ pattern: timezoneRegex.source
175
189
  }
176
190
  }),
177
- Latitude: () => new t({
178
- name: `Latitude`,
179
- zod: t$1.number().min(-90).max(90),
180
- parseValue: (e$1) => t$1.coerce.number().min(-90).max(90).parse(e$1),
181
- serialize: (e$1) => Number(e$1),
191
+ Latitude: () => new FieldType({
192
+ name: "Latitude",
193
+ zod: z$1.number().min(latMin).max(latMax),
194
+ parseValue: (v) => z$1.coerce.number().min(latMin).max(latMax).parse(v),
195
+ serialize: (v) => Number(v),
182
196
  jsonSchema: {
183
- type: `number`,
184
- minimum: -90,
185
- maximum: 90
197
+ type: "number",
198
+ minimum: latMin,
199
+ maximum: latMax
186
200
  }
187
201
  }),
188
- Longitude: () => new t({
189
- name: `Longitude`,
190
- zod: t$1.number().min(c).max(180),
191
- parseValue: (e$1) => t$1.coerce.number().min(c).max(180).parse(e$1),
192
- serialize: (e$1) => Number(e$1),
202
+ Longitude: () => new FieldType({
203
+ name: "Longitude",
204
+ zod: z$1.number().min(lonMin).max(lonMax),
205
+ parseValue: (v) => z$1.coerce.number().min(lonMin).max(lonMax).parse(v),
206
+ serialize: (v) => Number(v),
193
207
  jsonSchema: {
194
- type: `number`,
195
- minimum: c,
196
- maximum: 180
208
+ type: "number",
209
+ minimum: lonMin,
210
+ maximum: lonMax
197
211
  }
198
212
  }),
199
- Currency: () => new t({
200
- name: `Currency`,
201
- zod: t$1.string().regex(o),
202
- parseValue: (e$1) => t$1.string().regex(o).parse(e$1),
203
- serialize: (e$1) => String(e$1),
213
+ Currency: () => new FieldType({
214
+ name: "Currency",
215
+ zod: z$1.string().regex(currencyRegex),
216
+ parseValue: (v) => z$1.string().regex(currencyRegex).parse(v),
217
+ serialize: (v) => String(v),
204
218
  jsonSchema: {
205
- type: `string`,
206
- pattern: o.source
219
+ type: "string",
220
+ pattern: currencyRegex.source
207
221
  }
208
222
  }),
209
- CountryCode: () => new t({
210
- name: `CountryCode`,
211
- zod: t$1.string().regex(s),
212
- parseValue: (e$1) => t$1.string().regex(s).parse(e$1),
213
- serialize: (e$1) => String(e$1),
223
+ CountryCode: () => new FieldType({
224
+ name: "CountryCode",
225
+ zod: z$1.string().regex(countryRegex),
226
+ parseValue: (v) => z$1.string().regex(countryRegex).parse(v),
227
+ serialize: (v) => String(v),
214
228
  jsonSchema: {
215
- type: `string`,
216
- pattern: s.source
229
+ type: "string",
230
+ pattern: countryRegex.source
217
231
  }
218
232
  })
219
233
  };
220
234
 
221
235
  //#endregion
222
- export { l };
236
+ export { ScalarTypeEnum };
@@ -1,24 +1,39 @@
1
1
  import "./EnumType.js";
2
2
  import "./FieldType.js";
3
- import * as e$1 from "zod";
3
+ import * as z$1 from "zod";
4
4
 
5
5
  //#region ../../libs/schema/dist/SchemaModel.js
6
- var t = class {
7
- constructor(e$2) {
8
- this.config = e$2;
6
+ /**
7
+ * Named object model built from FieldType/EnumType/SchemaModel fields.
8
+ * Provides zod and GraphQL input helpers, and supports arrays/optional fields.
9
+ */
10
+ var SchemaModel = class {
11
+ constructor(config) {
12
+ this.config = config;
9
13
  }
14
+ /**
15
+ * Build a typed ZodObject from the model fields, preserving each field's
16
+ * Zod schema and optionality at the type level when possible.
17
+ */
10
18
  getZod() {
11
- let t$1 = Object.entries(this.config.fields).reduce((t$2, [n$1, r]) => {
12
- let i = r.type.getZod(), a = r.isArray ? e$1.array(i) : i;
13
- return t$2[n$1] = r.isOptional ? a.optional() : a, t$2;
19
+ const shape = Object.entries(this.config.fields).reduce((acc, [key, def]) => {
20
+ const base = def.type.getZod();
21
+ const withArray = def.isArray ? z$1.array(base) : base;
22
+ acc[key] = def.isOptional ? withArray.optional() : withArray;
23
+ return acc;
14
24
  }, {});
15
- return e$1.object(t$1);
25
+ return z$1.object(shape);
16
26
  }
27
+ /** Input object name for GraphQL builder adapters. */
17
28
  getPothosInput() {
18
29
  return this.config.name;
19
30
  }
20
31
  };
21
- const n = (e$2) => new t(e$2);
32
+ /**
33
+ * Helper to define a SchemaModel with type inference.
34
+ * Equivalent to `new SchemaModel(config)` but with better ergonomics.
35
+ */
36
+ const defineSchemaModel = (config) => new SchemaModel(config);
22
37
 
23
38
  //#endregion
24
- export { n, t };
39
+ export { SchemaModel, defineSchemaModel };
@@ -1,6 +1,6 @@
1
- import { n, r } from "./EnumType.js";
2
- import { t as t$1 } from "./FieldType.js";
3
- import { l } from "./ScalarTypeEnum.js";
4
- import { n as n$1, t } from "./SchemaModel.js";
1
+ import { EnumType, defineEnum } from "./EnumType.js";
2
+ import { FieldType } from "./FieldType.js";
3
+ import { ScalarTypeEnum } from "./ScalarTypeEnum.js";
4
+ import { SchemaModel, defineSchemaModel } from "./SchemaModel.js";
5
5
  import "./entity/defineEntity.js";
6
6
  import "./entity/index.js";
@@ -1,4 +1,4 @@
1
- import { n, t } from "../libs/contracts/dist/spec.js";
1
+ import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
2
2
  import { CreateQueryInputModel, ExecuteQueryInputModel, QueryModel, QueryResultModel } from "./query.schema.js";
3
3
 
4
4
  //#region src/query/query.contracts.ts
@@ -6,7 +6,7 @@ const OWNERS = ["@example.analytics-dashboard"];
6
6
  /**
7
7
  * Create a data query.
8
8
  */
9
- const CreateQueryContract = t({
9
+ const CreateQueryContract = defineCommand({
10
10
  meta: {
11
11
  name: "analytics.query.create",
12
12
  version: 1,
@@ -39,7 +39,7 @@ const CreateQueryContract = t({
39
39
  /**
40
40
  * Execute a data query.
41
41
  */
42
- const ExecuteQueryContract = n({
42
+ const ExecuteQueryContract = defineQuery({
43
43
  meta: {
44
44
  name: "analytics.query.execute",
45
45
  version: 1,
@@ -1,9 +1,9 @@
1
- import * as _lssm_lib_schema290 from "@lssm/lib.schema";
1
+ import * as _lssm_lib_schema212 from "@lssm/lib.schema";
2
2
 
3
3
  //#region src/query/query.enum.d.ts
4
4
  /**
5
5
  * Query type enum.
6
6
  */
7
- declare const QueryTypeEnum: _lssm_lib_schema290.EnumType<[string, string, string, string]>;
7
+ declare const QueryTypeEnum: _lssm_lib_schema212.EnumType<[string, string, string, string]>;
8
8
  //#endregion
9
9
  export { QueryTypeEnum };
@@ -1,11 +1,11 @@
1
- import { r } from "../libs/schema/dist/EnumType.js";
1
+ import { defineEnum } from "../libs/schema/dist/EnumType.js";
2
2
  import "../libs/schema/dist/index.js";
3
3
 
4
4
  //#region src/query/query.enum.ts
5
5
  /**
6
6
  * Query type enum.
7
7
  */
8
- const QueryTypeEnum = r("QueryType", [
8
+ const QueryTypeEnum = defineEnum("QueryType", [
9
9
  "SQL",
10
10
  "METRIC",
11
11
  "AGGREGATION",