@lssm/example.analytics-dashboard 0.0.0-canary-20251217083314 → 1.41.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 (148) hide show
  1. package/dist/dashboard/dashboard.contracts.js +1 -1
  2. package/dist/dashboard/dashboard.enum.js +1 -2
  3. package/dist/dashboard/dashboard.schema.js +1 -3
  4. package/dist/docs/analytics-dashboard.docblock.js +1 -2
  5. package/dist/events.js +2 -5
  6. package/dist/query/query.contracts.js +1 -1
  7. package/dist/query/query.enum.js +1 -2
  8. package/dist/query/query.schema.js +1 -3
  9. package/dist/tsconfig.tsbuildinfo +1 -0
  10. package/package.json +27 -28
  11. package/dist/dashboard/dashboard.contracts.d.ts +0 -530
  12. package/dist/dashboard/dashboard.enum.d.ts +0 -17
  13. package/dist/dashboard/dashboard.presentation.d.ts +0 -8
  14. package/dist/dashboard/dashboard.schema.d.ts +0 -332
  15. package/dist/dashboard/index.d.ts +0 -4
  16. package/dist/dashboard.feature.d.ts +0 -7
  17. package/dist/docs/analytics-dashboard.docblock.d.ts +0 -1
  18. package/dist/docs/index.d.ts +0 -1
  19. package/dist/events.d.ts +0 -148
  20. package/dist/example.d.ts +0 -39
  21. package/dist/index.d.ts +0 -6
  22. package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -88
  23. package/dist/libs/contracts/dist/client/index.js +0 -5
  24. package/dist/libs/contracts/dist/client/react/feature-render.js +0 -2
  25. package/dist/libs/contracts/dist/client/react/form-render.js +0 -4
  26. package/dist/libs/contracts/dist/client/react/index.js +0 -4
  27. package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
  28. package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -60
  29. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +0 -16
  30. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -16
  31. package/dist/libs/contracts/dist/docs/index.js +0 -29
  32. package/dist/libs/contracts/dist/docs/presentations.js +0 -71
  33. package/dist/libs/contracts/dist/docs/registry.js +0 -44
  34. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +0 -16
  35. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +0 -16
  36. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +0 -16
  37. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +0 -16
  38. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +0 -16
  39. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -80
  40. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -57
  41. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -16
  42. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -357
  43. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -37
  44. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -16
  45. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -20
  46. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -48
  47. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -79
  48. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -84
  49. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -45
  50. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -67
  51. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -40
  52. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -69
  53. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -47
  54. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -62
  55. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -155
  56. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -20
  57. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -101
  58. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -20
  59. package/dist/libs/contracts/dist/events.js +0 -10
  60. package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
  61. package/dist/libs/contracts/dist/index.js +0 -71
  62. package/dist/libs/contracts/dist/install.js +0 -2
  63. package/dist/libs/contracts/dist/integrations/contracts.js +0 -377
  64. package/dist/libs/contracts/dist/integrations/index.js +0 -18
  65. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
  66. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
  67. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
  68. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
  69. package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -242
  70. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -13
  71. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -52
  72. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -75
  73. package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -87
  74. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -66
  75. package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
  76. package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -68
  77. package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -68
  78. package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -116
  79. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -73
  80. package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
  81. package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -83
  82. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -61
  83. package/dist/libs/contracts/dist/jsonschema.js +0 -1
  84. package/dist/libs/contracts/dist/knowledge/contracts.js +0 -306
  85. package/dist/libs/contracts/dist/knowledge/index.js +0 -7
  86. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -34
  87. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -34
  88. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -38
  89. package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -6
  90. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -34
  91. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -37
  92. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -34
  93. package/dist/libs/contracts/dist/llm/exporters.js +0 -19
  94. package/dist/libs/contracts/dist/llm/index.js +0 -2
  95. package/dist/libs/contracts/dist/llm/prompts.js +0 -1
  96. package/dist/libs/contracts/dist/onboarding-base.js +0 -196
  97. package/dist/libs/contracts/dist/openapi.js +0 -1
  98. package/dist/libs/contracts/dist/ownership.js +0 -21
  99. package/dist/libs/contracts/dist/presentations.js +0 -1
  100. package/dist/libs/contracts/dist/presentations.v2.js +0 -11
  101. package/dist/libs/contracts/dist/prompt.js +0 -1
  102. package/dist/libs/contracts/dist/promptRegistry.js +0 -1
  103. package/dist/libs/contracts/dist/regenerator/index.js +0 -1
  104. package/dist/libs/contracts/dist/regenerator/service.js +0 -6
  105. package/dist/libs/contracts/dist/registry.js +0 -2
  106. package/dist/libs/contracts/dist/resources.js +0 -1
  107. package/dist/libs/contracts/dist/schema/dist/EnumType.js +0 -2
  108. package/dist/libs/contracts/dist/schema/dist/FieldType.js +0 -49
  109. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +0 -236
  110. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +0 -34
  111. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +0 -1
  112. package/dist/libs/contracts/dist/schema/dist/entity/index.js +0 -2
  113. package/dist/libs/contracts/dist/schema/dist/entity/types.js +0 -1
  114. package/dist/libs/contracts/dist/schema/dist/index.js +0 -6
  115. package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -6
  116. package/dist/libs/contracts/dist/server/index.js +0 -8
  117. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -4
  118. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -2
  119. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
  120. package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -2
  121. package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
  122. package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
  123. package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
  124. package/dist/libs/contracts/dist/server/rest-express.js +0 -1
  125. package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
  126. package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
  127. package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
  128. package/dist/libs/contracts/dist/spec.js +0 -34
  129. package/dist/libs/contracts/dist/telemetry/index.js +0 -1
  130. package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
  131. package/dist/libs/contracts/dist/tests/index.js +0 -1
  132. package/dist/libs/contracts/dist/tests/runner.js +0 -2
  133. package/dist/libs/contracts/dist/workflow/index.js +0 -1
  134. package/dist/libs/contracts/dist/workflow/runner.js +0 -1
  135. package/dist/libs/schema/dist/EnumType.js +0 -56
  136. package/dist/libs/schema/dist/FieldType.js +0 -49
  137. package/dist/libs/schema/dist/ScalarTypeEnum.js +0 -236
  138. package/dist/libs/schema/dist/SchemaModel.js +0 -39
  139. package/dist/libs/schema/dist/entity/defineEntity.js +0 -1
  140. package/dist/libs/schema/dist/entity/index.js +0 -2
  141. package/dist/libs/schema/dist/entity/types.js +0 -1
  142. package/dist/libs/schema/dist/index.js +0 -6
  143. package/dist/query/index.d.ts +0 -4
  144. package/dist/query/query.contracts.d.ts +0 -177
  145. package/dist/query/query.enum.d.ts +0 -9
  146. package/dist/query/query.presentation.d.ts +0 -7
  147. package/dist/query/query.schema.d.ts +0 -142
  148. package/dist/query-engine/index.d.ts +0 -105
@@ -1,34 +0,0 @@
1
- //#region ../../libs/contracts/dist/spec.js
2
- /**
3
- * Helper to define a Command (write operation).
4
- * Sets `kind: 'command'` and defaults `idempotent: false`.
5
- */
6
- const defineCommand = (spec) => ({
7
- ...spec,
8
- meta: {
9
- ...spec.meta,
10
- kind: "command"
11
- },
12
- policy: {
13
- ...spec.policy,
14
- idempotent: spec.policy?.["policy"]?.idempotent ?? false
15
- }
16
- });
17
- /**
18
- * Helper to define a Query (read-only operation).
19
- * Sets `kind: 'query'` and forces `idempotent: true`.
20
- */
21
- const defineQuery = (spec) => ({
22
- ...spec,
23
- meta: {
24
- ...spec.meta,
25
- kind: "query"
26
- },
27
- policy: {
28
- ...spec.policy,
29
- idempotent: true
30
- }
31
- });
32
-
33
- //#endregion
34
- export { defineCommand, defineQuery };
@@ -1 +0,0 @@
1
- import "./tracker.js";
@@ -1 +0,0 @@
1
- import "crypto";
@@ -1 +0,0 @@
1
- import "./runner.js";
@@ -1,2 +0,0 @@
1
- import "../index.js";
2
- import "node:assert";
@@ -1 +0,0 @@
1
- import "./runner.js";
@@ -1 +0,0 @@
1
- import "node:crypto";
@@ -1,56 +0,0 @@
1
- import * as z$1 from "zod";
2
- import { GraphQLEnumType } from "graphql";
3
-
4
- //#region ../../libs/schema/dist/EnumType.js
5
- /**
6
- * Strongly-typed string enum wrapper with one source of truth for zod, GraphQL, and JSON Schema.
7
- */
8
- var EnumType = class {
9
- name;
10
- values;
11
- gqlEnum;
12
- constructor(name, values) {
13
- this.name = name;
14
- this.values = values;
15
- this.gqlEnum = new GraphQLEnumType({
16
- name: this.name,
17
- values: Object.fromEntries(values.map((v) => [v, { value: v }]))
18
- });
19
- }
20
- /** Enum type name (used by GraphQL and JSON Schema). */
21
- getName() {
22
- return this.name;
23
- }
24
- /** Returns the literal tuple of allowed values. */
25
- getEnumValues() {
26
- return this.values;
27
- }
28
- /** GraphQL enum instance suitable for Pothos or vanilla GraphQL schemas. */
29
- getPothos() {
30
- return this.gqlEnum;
31
- }
32
- /** zod schema representing this enum. */
33
- getZod() {
34
- return z$1.enum(this.values);
35
- }
36
- /** Minimal JSON representation (alias of getJsonSchema). */
37
- getJson() {
38
- return {
39
- type: "string",
40
- enum: this.values
41
- };
42
- }
43
- /** JSON Schema for this enum. */
44
- getJsonSchema() {
45
- return this.getJson();
46
- }
47
- };
48
- /**
49
- * Helper to define an EnumType.
50
- * @param name Display/type name used across GraphQL and JSON Schema
51
- * @param values Literal tuple of allowed string values (at least one)
52
- */
53
- const defineEnum = (name, values) => new EnumType(name, values);
54
-
55
- //#endregion
56
- export { EnumType, defineEnum };
@@ -1,49 +0,0 @@
1
- import "zod";
2
- import { GraphQLScalarType } from "graphql";
3
-
4
- //#region ../../libs/schema/dist/FieldType.js
5
- /**
6
- * GraphQL scalar wrapper that carries zod and JSON Schema metadata.
7
- *
8
- * TInternal is the runtime representation; TExternal is the GraphQL output.
9
- */
10
- var FieldType = class extends GraphQLScalarType {
11
- zodSchema;
12
- jsonSchemaDef;
13
- constructor(config) {
14
- super(config);
15
- this.zodSchema = config.zod;
16
- this.jsonSchemaDef = config.jsonSchema;
17
- }
18
- /** Return the attached zod schema for validation. */
19
- getZod() {
20
- return this.zodSchema;
21
- }
22
- /** GraphQL scalar instance usable by Pothos or vanilla GraphQL. */
23
- getPothos() {
24
- return this;
25
- }
26
- /** Return the JSON Schema (evaluates factory if provided). */
27
- getJson() {
28
- return typeof this.jsonSchemaDef === "function" ? this.jsonSchemaDef() : this.jsonSchemaDef;
29
- }
30
- getJsonSchemaDef() {
31
- return this.jsonSchemaDef;
32
- }
33
- getJsonSchema() {
34
- const deepResolve = (v) => {
35
- const value = typeof v === "function" ? v() : v;
36
- if (Array.isArray(value)) return value.map((item) => deepResolve(item));
37
- if (value && typeof value === "object") {
38
- const obj = {};
39
- for (const [k, val] of Object.entries(value)) obj[k] = deepResolve(val);
40
- return obj;
41
- }
42
- return value;
43
- };
44
- return deepResolve(this.getJson());
45
- }
46
- };
47
-
48
- //#endregion
49
- export { FieldType };
@@ -1,236 +0,0 @@
1
- import { FieldType } from "./FieldType.js";
2
- import * as z$1 from "zod";
3
- import { Kind } from "graphql";
4
-
5
- //#region ../../libs/schema/dist/ScalarTypeEnum.js
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;
28
- },
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);
38
- },
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);
43
- },
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);
53
- },
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);
58
- },
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;
70
- },
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;
82
- },
83
- jsonSchema: { type: "string" }
84
- }),
85
- JSON: () => new FieldType({
86
- name: "JSON",
87
- zod: z$1.any(),
88
- parseValue: (v) => v,
89
- serialize: (v) => v,
90
- jsonSchema: {}
91
- }),
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),
104
- jsonSchema: {
105
- type: "string",
106
- format: "date"
107
- }
108
- }),
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
- },
116
- jsonSchema: {
117
- type: "string",
118
- format: "date-time"
119
- }
120
- }),
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),
126
- jsonSchema: {
127
- type: "string",
128
- pattern: "^\\d{2}:\\d{2}(:\\d{2})?$"
129
- }
130
- }),
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),
136
- jsonSchema: {
137
- type: "string",
138
- format: "email"
139
- }
140
- }),
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),
146
- jsonSchema: {
147
- type: "string",
148
- format: "uri"
149
- }
150
- }),
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),
156
- jsonSchema: {
157
- type: "string",
158
- pattern: phoneRegex.source
159
- }
160
- }),
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),
166
- jsonSchema: {
167
- type: "string",
168
- minLength: 1
169
- }
170
- }),
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),
176
- jsonSchema: {
177
- type: "string",
178
- pattern: localeRegex.source
179
- }
180
- }),
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),
186
- jsonSchema: {
187
- type: "string",
188
- pattern: timezoneRegex.source
189
- }
190
- }),
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),
196
- jsonSchema: {
197
- type: "number",
198
- minimum: latMin,
199
- maximum: latMax
200
- }
201
- }),
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),
207
- jsonSchema: {
208
- type: "number",
209
- minimum: lonMin,
210
- maximum: lonMax
211
- }
212
- }),
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),
218
- jsonSchema: {
219
- type: "string",
220
- pattern: currencyRegex.source
221
- }
222
- }),
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),
228
- jsonSchema: {
229
- type: "string",
230
- pattern: countryRegex.source
231
- }
232
- })
233
- };
234
-
235
- //#endregion
236
- export { ScalarTypeEnum };
@@ -1,39 +0,0 @@
1
- import "./EnumType.js";
2
- import "./FieldType.js";
3
- import * as z$1 from "zod";
4
-
5
- //#region ../../libs/schema/dist/SchemaModel.js
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;
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
- */
18
- getZod() {
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;
24
- }, {});
25
- return z$1.object(shape);
26
- }
27
- /** Input object name for GraphQL builder adapters. */
28
- getPothosInput() {
29
- return this.config.name;
30
- }
31
- };
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);
37
-
38
- //#endregion
39
- export { SchemaModel, defineSchemaModel };
@@ -1 +0,0 @@
1
- import "zod";
@@ -1,2 +0,0 @@
1
- import "./defineEntity.js";
2
- import "./types.js";
@@ -1 +0,0 @@
1
- import "zod";
@@ -1,6 +0,0 @@
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
- import "./entity/defineEntity.js";
6
- import "./entity/index.js";
@@ -1,4 +0,0 @@
1
- import { QueryTypeEnum } from "./query.enum.js";
2
- import { CreateQueryInputModel, ExecuteQueryInputModel, QueryModel, QueryResultModel } from "./query.schema.js";
3
- import { CreateQueryContract, ExecuteQueryContract } from "./query.contracts.js";
4
- export { CreateQueryContract, CreateQueryInputModel, ExecuteQueryContract, ExecuteQueryInputModel, QueryModel, QueryResultModel, QueryTypeEnum };
@@ -1,177 +0,0 @@
1
- import * as _lssm_lib_contracts9 from "@lssm/lib.contracts";
2
- import * as _lssm_lib_schema281 from "@lssm/lib.schema";
3
-
4
- //#region src/query/query.contracts.d.ts
5
- /**
6
- * Create a data query.
7
- */
8
- declare const CreateQueryContract: _lssm_lib_contracts9.ContractSpec<_lssm_lib_schema281.SchemaModel<{
9
- name: {
10
- type: _lssm_lib_schema281.FieldType<string, string>;
11
- isOptional: false;
12
- };
13
- description: {
14
- type: _lssm_lib_schema281.FieldType<string, string>;
15
- isOptional: true;
16
- };
17
- type: {
18
- type: _lssm_lib_schema281.EnumType<[string, string, string, string]>;
19
- isOptional: false;
20
- };
21
- definition: {
22
- type: _lssm_lib_schema281.FieldType<unknown, unknown>;
23
- isOptional: false;
24
- };
25
- sql: {
26
- type: _lssm_lib_schema281.FieldType<string, string>;
27
- isOptional: true;
28
- };
29
- metricIds: {
30
- type: _lssm_lib_schema281.FieldType<string, string>;
31
- isArray: true;
32
- isOptional: true;
33
- };
34
- cacheTtlSeconds: {
35
- type: _lssm_lib_schema281.FieldType<number, number>;
36
- isOptional: true;
37
- };
38
- isShared: {
39
- type: _lssm_lib_schema281.FieldType<boolean, boolean>;
40
- isOptional: true;
41
- };
42
- }>, _lssm_lib_schema281.SchemaModel<{
43
- id: {
44
- type: _lssm_lib_schema281.FieldType<string, string>;
45
- isOptional: false;
46
- };
47
- name: {
48
- type: _lssm_lib_schema281.FieldType<string, string>;
49
- isOptional: false;
50
- };
51
- description: {
52
- type: _lssm_lib_schema281.FieldType<string, string>;
53
- isOptional: true;
54
- };
55
- type: {
56
- type: _lssm_lib_schema281.EnumType<[string, string, string, string]>;
57
- isOptional: false;
58
- };
59
- definition: {
60
- type: _lssm_lib_schema281.FieldType<unknown, unknown>;
61
- isOptional: false;
62
- };
63
- sql: {
64
- type: _lssm_lib_schema281.FieldType<string, string>;
65
- isOptional: true;
66
- };
67
- cacheTtlSeconds: {
68
- type: _lssm_lib_schema281.FieldType<number, number>;
69
- isOptional: false;
70
- };
71
- isShared: {
72
- type: _lssm_lib_schema281.FieldType<boolean, boolean>;
73
- isOptional: false;
74
- };
75
- createdAt: {
76
- type: _lssm_lib_schema281.FieldType<Date, string>;
77
- isOptional: false;
78
- };
79
- }>, {
80
- name: string;
81
- version: number;
82
- when: string;
83
- payload: _lssm_lib_schema281.SchemaModel<{
84
- id: {
85
- type: _lssm_lib_schema281.FieldType<string, string>;
86
- isOptional: false;
87
- };
88
- name: {
89
- type: _lssm_lib_schema281.FieldType<string, string>;
90
- isOptional: false;
91
- };
92
- description: {
93
- type: _lssm_lib_schema281.FieldType<string, string>;
94
- isOptional: true;
95
- };
96
- type: {
97
- type: _lssm_lib_schema281.EnumType<[string, string, string, string]>;
98
- isOptional: false;
99
- };
100
- definition: {
101
- type: _lssm_lib_schema281.FieldType<unknown, unknown>;
102
- isOptional: false;
103
- };
104
- sql: {
105
- type: _lssm_lib_schema281.FieldType<string, string>;
106
- isOptional: true;
107
- };
108
- cacheTtlSeconds: {
109
- type: _lssm_lib_schema281.FieldType<number, number>;
110
- isOptional: false;
111
- };
112
- isShared: {
113
- type: _lssm_lib_schema281.FieldType<boolean, boolean>;
114
- isOptional: false;
115
- };
116
- createdAt: {
117
- type: _lssm_lib_schema281.FieldType<Date, string>;
118
- isOptional: false;
119
- };
120
- }>;
121
- }[]>;
122
- /**
123
- * Execute a data query.
124
- */
125
- declare const ExecuteQueryContract: _lssm_lib_contracts9.ContractSpec<_lssm_lib_schema281.SchemaModel<{
126
- queryId: {
127
- type: _lssm_lib_schema281.FieldType<string, string>;
128
- isOptional: false;
129
- };
130
- parameters: {
131
- type: _lssm_lib_schema281.FieldType<unknown, unknown>;
132
- isOptional: true;
133
- };
134
- dateRange: {
135
- type: _lssm_lib_schema281.FieldType<unknown, unknown>;
136
- isOptional: true;
137
- };
138
- filters: {
139
- type: _lssm_lib_schema281.FieldType<unknown, unknown>;
140
- isOptional: true;
141
- };
142
- forceRefresh: {
143
- type: _lssm_lib_schema281.FieldType<boolean, boolean>;
144
- isOptional: true;
145
- };
146
- }>, _lssm_lib_schema281.SchemaModel<{
147
- queryId: {
148
- type: _lssm_lib_schema281.FieldType<string, string>;
149
- isOptional: false;
150
- };
151
- data: {
152
- type: _lssm_lib_schema281.FieldType<unknown, unknown>;
153
- isOptional: false;
154
- };
155
- columns: {
156
- type: _lssm_lib_schema281.FieldType<unknown, unknown>;
157
- isOptional: false;
158
- };
159
- rowCount: {
160
- type: _lssm_lib_schema281.FieldType<number, number>;
161
- isOptional: false;
162
- };
163
- executionTimeMs: {
164
- type: _lssm_lib_schema281.FieldType<number, number>;
165
- isOptional: false;
166
- };
167
- cachedAt: {
168
- type: _lssm_lib_schema281.FieldType<Date, string>;
169
- isOptional: true;
170
- };
171
- error: {
172
- type: _lssm_lib_schema281.FieldType<string, string>;
173
- isOptional: true;
174
- };
175
- }>, undefined>;
176
- //#endregion
177
- export { CreateQueryContract, ExecuteQueryContract };
@@ -1,9 +0,0 @@
1
- import * as _lssm_lib_schema280 from "@lssm/lib.schema";
2
-
3
- //#region src/query/query.enum.d.ts
4
- /**
5
- * Query type enum.
6
- */
7
- declare const QueryTypeEnum: _lssm_lib_schema280.EnumType<[string, string, string, string]>;
8
- //#endregion
9
- export { QueryTypeEnum };
@@ -1,7 +0,0 @@
1
- import { PresentationDescriptorV2 } from "@lssm/lib.contracts";
2
-
3
- //#region src/query/query.presentation.d.ts
4
- declare const QueriesListPresentation: PresentationDescriptorV2;
5
- declare const QueryBuilderPresentation: PresentationDescriptorV2;
6
- //#endregion
7
- export { QueriesListPresentation, QueryBuilderPresentation };