@lssm/lib.jobs 0.0.0-canary-20251217072406 → 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.
- package/dist/_virtual/rolldown_runtime.js +1 -42
- package/dist/contracts/dist/capabilities/openbanking.js +1 -88
- package/dist/contracts/dist/client/index.js +1 -5
- package/dist/contracts/dist/client/react/feature-render.js +1 -2
- package/dist/contracts/dist/client/react/form-render.js +1 -4
- package/dist/contracts/dist/client/react/index.js +1 -4
- package/dist/contracts/dist/contract-registry/index.js +1 -1
- package/dist/contracts/dist/contract-registry/schemas.js +1 -60
- package/dist/contracts/dist/docs/PUBLISHING.docblock.js +76 -16
- package/dist/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +350 -16
- package/dist/contracts/dist/docs/index.js +1 -29
- package/dist/contracts/dist/docs/presentations.js +1 -71
- package/dist/contracts/dist/docs/registry.js +1 -44
- package/dist/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +383 -16
- package/dist/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +68 -16
- package/dist/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +140 -16
- package/dist/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +86 -16
- package/dist/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +1 -16
- package/dist/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +2 -24
- package/dist/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +2 -21
- package/dist/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +213 -16
- package/dist/contracts/dist/docs/tech/llm/llm-integration.docblock.js +5 -73
- package/dist/contracts/dist/docs/tech/mcp-endpoints.docblock.js +1 -37
- package/dist/contracts/dist/docs/tech/presentation-runtime.docblock.js +1 -16
- package/dist/contracts/dist/docs/tech/schema/README.docblock.js +262 -20
- package/dist/contracts/dist/docs/tech/studio/learning-events.docblock.js +1 -48
- package/dist/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +2 -24
- package/dist/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +2 -23
- package/dist/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +16 -25
- package/dist/contracts/dist/docs/tech/studio/project-routing.docblock.js +1 -67
- package/dist/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +2 -22
- package/dist/contracts/dist/docs/tech/studio/team-invitations.docblock.js +36 -40
- package/dist/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +1 -47
- package/dist/contracts/dist/docs/tech/studio/workspaces.docblock.js +2 -23
- package/dist/contracts/dist/docs/tech/telemetry-ingest.docblock.js +3 -36
- package/dist/contracts/dist/docs/tech/templates/runtime.docblock.js +1 -20
- package/dist/contracts/dist/docs/tech/vscode-extension.docblock.js +3 -36
- package/dist/contracts/dist/docs/tech/workflows/overview.docblock.js +1 -20
- package/dist/contracts/dist/events.js +1 -10
- package/dist/contracts/dist/experiments/evaluator.js +1 -1
- package/dist/contracts/dist/index.js +1 -71
- package/dist/contracts/dist/install.js +1 -2
- package/dist/contracts/dist/integrations/contracts.js +1 -377
- package/dist/contracts/dist/integrations/index.js +1 -18
- package/dist/contracts/dist/integrations/openbanking/contracts/accounts.js +1 -228
- package/dist/contracts/dist/integrations/openbanking/contracts/balances.js +1 -159
- package/dist/contracts/dist/integrations/openbanking/contracts/index.js +1 -3
- package/dist/contracts/dist/integrations/openbanking/contracts/transactions.js +1 -210
- package/dist/contracts/dist/integrations/openbanking/models.js +1 -242
- package/dist/contracts/dist/integrations/openbanking/telemetry.js +1 -13
- package/dist/contracts/dist/integrations/providers/elevenlabs.js +1 -52
- package/dist/contracts/dist/integrations/providers/gcs-storage.js +1 -75
- package/dist/contracts/dist/integrations/providers/gmail.js +1 -87
- package/dist/contracts/dist/integrations/providers/google-calendar.js +1 -66
- package/dist/contracts/dist/integrations/providers/index.js +1 -11
- package/dist/contracts/dist/integrations/providers/mistral.js +1 -68
- package/dist/contracts/dist/integrations/providers/postmark.js +1 -68
- package/dist/contracts/dist/integrations/providers/powens.js +1 -116
- package/dist/contracts/dist/integrations/providers/qdrant.js +1 -73
- package/dist/contracts/dist/integrations/providers/registry.js +1 -10
- package/dist/contracts/dist/integrations/providers/stripe.js +1 -83
- package/dist/contracts/dist/integrations/providers/twilio-sms.js +1 -61
- package/dist/contracts/dist/jobs/queue.js +1 -33
- package/dist/contracts/dist/jsonschema.js +1 -1
- package/dist/contracts/dist/knowledge/contracts.js +1 -306
- package/dist/contracts/dist/knowledge/index.js +1 -7
- package/dist/contracts/dist/knowledge/spaces/email-threads.js +1 -34
- package/dist/contracts/dist/knowledge/spaces/financial-docs.js +1 -34
- package/dist/contracts/dist/knowledge/spaces/financial-overview.js +1 -38
- package/dist/contracts/dist/knowledge/spaces/index.js +1 -6
- package/dist/contracts/dist/knowledge/spaces/product-canon.js +1 -34
- package/dist/contracts/dist/knowledge/spaces/support-faq.js +1 -37
- package/dist/contracts/dist/knowledge/spaces/uploaded-docs.js +1 -34
- package/dist/contracts/dist/llm/exporters.js +1 -19
- package/dist/contracts/dist/llm/index.js +1 -2
- package/dist/contracts/dist/llm/prompts.js +1 -1
- package/dist/contracts/dist/onboarding-base.js +1 -196
- package/dist/contracts/dist/openapi.js +1 -1
- package/dist/contracts/dist/ownership.js +1 -21
- package/dist/contracts/dist/presentations.js +1 -1
- package/dist/contracts/dist/presentations.v2.js +1 -11
- package/dist/contracts/dist/prompt.js +1 -1
- package/dist/contracts/dist/promptRegistry.js +1 -1
- package/dist/contracts/dist/regenerator/index.js +1 -1
- package/dist/contracts/dist/regenerator/service.js +1 -6
- package/dist/contracts/dist/registry.js +1 -2
- package/dist/contracts/dist/resources.js +1 -1
- package/dist/contracts/dist/schema/dist/EnumType.js +1 -2
- package/dist/contracts/dist/schema/dist/FieldType.js +1 -49
- package/dist/contracts/dist/schema/dist/ScalarTypeEnum.js +1 -236
- package/dist/contracts/dist/schema/dist/SchemaModel.js +1 -34
- package/dist/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/contracts/dist/schema/dist/entity/index.js +1 -2
- package/dist/contracts/dist/schema/dist/entity/types.js +1 -1
- package/dist/contracts/dist/schema/dist/index.js +1 -6
- package/dist/contracts/dist/server/graphql-pothos.js +1 -6
- package/dist/contracts/dist/server/index.js +1 -8
- package/dist/contracts/dist/server/mcp/createMcpServer.js +1 -4
- package/dist/contracts/dist/server/mcp/registerPresentations.js +1 -2
- package/dist/contracts/dist/server/mcp/registerPrompts.js +1 -1
- package/dist/contracts/dist/server/mcp/registerResources.js +1 -2
- package/dist/contracts/dist/server/mcp/registerTools.js +1 -1
- package/dist/contracts/dist/server/provider-mcp.js +1 -1
- package/dist/contracts/dist/server/rest-elysia.js +1 -1
- package/dist/contracts/dist/server/rest-express.js +1 -1
- package/dist/contracts/dist/server/rest-generic.js +1 -1
- package/dist/contracts/dist/server/rest-next-app.js +1 -1
- package/dist/contracts/dist/server/rest-next-pages.js +1 -1
- package/dist/contracts/dist/spec.js +1 -34
- package/dist/contracts/dist/telemetry/index.js +1 -1
- package/dist/contracts/dist/telemetry/tracker.js +1 -1
- package/dist/contracts/dist/tests/index.js +1 -1
- package/dist/contracts/dist/tests/runner.js +1 -2
- package/dist/contracts/dist/workflow/index.js +1 -1
- package/dist/contracts/dist/workflow/runner.js +1 -1
- package/dist/contracts/index.d.ts +138 -138
- package/dist/contracts/index.js +1 -484
- package/dist/entities/index.d.ts +116 -116
- package/dist/entities/index.js +1 -198
- package/dist/events.js +1 -303
- package/dist/handlers/gmail-sync-handler.js +1 -9
- package/dist/handlers/index.js +1 -12
- package/dist/handlers/ping-job.d.ts +3 -3
- package/dist/handlers/ping-job.js +1 -13
- package/dist/handlers/storage-document-handler.js +1 -14
- package/dist/index.js +1 -18
- package/dist/jobs.feature.js +1 -101
- package/dist/queue/gcp-cloud-tasks.js +1 -61
- package/dist/queue/gcp-pubsub.js +1 -47
- package/dist/queue/index.js +1 -9
- package/dist/queue/memory-queue.js +1 -140
- package/dist/queue/register-defined-job.js +1 -15
- package/dist/queue/scaleway-sqs-queue.js +1 -175
- package/dist/queue/types.js +1 -3
- package/dist/scheduler/index.js +1 -145
- package/dist/schema/dist/EnumType.js +1 -2
- package/dist/schema/dist/FieldType.js +1 -49
- package/dist/schema/dist/ScalarTypeEnum.js +1 -236
- package/dist/schema/dist/SchemaModel.js +1 -39
- package/dist/schema/dist/entity/defineEntity.js +1 -236
- package/dist/schema/dist/entity/index.js +1 -2
- package/dist/schema/dist/entity/types.js +1 -1
- package/dist/schema/dist/index.js +1 -6
- package/package.json +7 -7
|
@@ -1,236 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as z$1 from "zod";
|
|
3
|
-
import { Kind } from "graphql";
|
|
4
|
-
|
|
5
|
-
//#region ../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
|
+
import{t as e}from"./FieldType.js";import*as t from"zod";import{Kind as n}from"graphql";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={String_unsecure:()=>new e({name:`String_unsecure`,description:`Unvalidated string scalar`,zod:t.string(),parseValue:e=>t.string().parse(e),serialize:e=>String(e),parseLiteral:e=>{if(e.kind!==n.STRING)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`string`}}),Int_unsecure:()=>new e({name:`Int_unsecure`,description:`Unvalidated integer scalar`,zod:t.number().int(),parseValue:e=>{let n=typeof e==`number`?e:Number(e);return t.number().int().parse(n)},serialize:e=>Math.trunc(typeof e==`number`?e:Number(e)),parseLiteral:e=>{if(e.kind!==n.INT)throw TypeError(`Invalid literal`);return Number(e.value)},jsonSchema:{type:`integer`}}),Float_unsecure:()=>new e({name:`Float_unsecure`,description:`Unvalidated float scalar`,zod:t.number(),parseValue:e=>{let n=typeof e==`number`?e:Number(e);return t.number().parse(n)},serialize:e=>Number(e),parseLiteral:e=>{if(e.kind!==n.FLOAT&&e.kind!==n.INT)throw TypeError(`Invalid literal`);return Number(e.value)},jsonSchema:{type:`number`}}),Boolean:()=>new e({name:`Boolean`,description:`Unvalidated boolean scalar`,zod:t.boolean(),parseValue:e=>t.coerce.boolean().parse(e),serialize:e=>!!e,parseLiteral:e=>{if(e.kind!==n.BOOLEAN)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`boolean`}}),ID:()=>new e({name:`ID`,description:`Unvalidated id scalar`,zod:t.string(),parseValue:e=>t.string().parse(e),serialize:e=>String(e),parseLiteral:e=>{if(e.kind!==n.STRING)throw TypeError(`Invalid literal`);return e.value},jsonSchema:{type:`string`}}),JSON:()=>new e({name:`JSON`,zod:t.any(),parseValue:e=>e,serialize:e=>e,jsonSchema:{}}),JSONObject:()=>new e({name:`JSONObject`,zod:t.record(t.string(),t.any()),parseValue:e=>t.record(t.string(),t.any()).parse(e),serialize:e=>e??{},jsonSchema:{type:`object`}}),Date:()=>new e({name:`Date`,zod:t.date(),parseValue:e=>e instanceof Date?e:new Date(String(e)),serialize:e=>e instanceof Date?e.toISOString().split(`T`)[0]:String(e),jsonSchema:{type:`string`,format:`date`}}),DateTime:()=>new e({name:`DateTime`,zod:t.date(),parseValue:e=>e instanceof Date?e:new Date(String(e)),serialize:e=>e instanceof Date?e.toISOString():String(e),jsonSchema:{type:`string`,format:`date-time`}}),Time:()=>new e({name:`Time`,zod:t.string().regex(/^\d{2}:\d{2}(:\d{2})?$/),parseValue:e=>t.string().regex(/^\d{2}:\d{2}(:\d{2})?$/).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:`^\\d{2}:\\d{2}(:\\d{2})?$`}}),EmailAddress:()=>new e({name:`EmailAddress`,zod:t.string().email(),parseValue:e=>t.string().email().parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,format:`email`}}),URL:()=>new e({name:`URL`,zod:t.string().url(),parseValue:e=>t.string().url().parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,format:`uri`}}),PhoneNumber:()=>new e({name:`PhoneNumber`,zod:t.string().regex(a),parseValue:e=>t.string().regex(a).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:a.source}}),NonEmptyString:()=>new e({name:`NonEmptyString`,zod:t.string().min(1),parseValue:e=>t.string().min(1).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,minLength:1}}),Locale:()=>new e({name:`Locale`,zod:t.string().regex(r),parseValue:e=>t.string().regex(r).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:r.source}}),TimeZone:()=>new e({name:`TimeZone`,zod:t.string().regex(i),parseValue:e=>t.string().regex(i).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:i.source}}),Latitude:()=>new e({name:`Latitude`,zod:t.number().min(-90).max(90),parseValue:e=>t.coerce.number().min(-90).max(90).parse(e),serialize:e=>Number(e),jsonSchema:{type:`number`,minimum:-90,maximum:90}}),Longitude:()=>new e({name:`Longitude`,zod:t.number().min(c).max(180),parseValue:e=>t.coerce.number().min(c).max(180).parse(e),serialize:e=>Number(e),jsonSchema:{type:`number`,minimum:c,maximum:180}}),Currency:()=>new e({name:`Currency`,zod:t.string().regex(o),parseValue:e=>t.string().regex(o).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:o.source}}),CountryCode:()=>new e({name:`CountryCode`,zod:t.string().regex(s),parseValue:e=>t.string().regex(s).parse(e),serialize:e=>String(e),jsonSchema:{type:`string`,pattern:s.source}})};export{l};
|
|
@@ -1,39 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./FieldType.js";
|
|
3
|
-
import * as z$1 from "zod";
|
|
4
|
-
|
|
5
|
-
//#region ../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
|
+
import"./EnumType.js";import"./FieldType.js";import*as e from"zod";var t=class{constructor(e){this.config=e}getZod(){let t=Object.entries(this.config.fields).reduce((t,[n,r])=>{let i=r.type.getZod(),a=r.isArray?e.array(i):i;return t[n]=r.isOptional?a.optional():a,t},{});return e.object(t)}getPothosInput(){return this.config.name}};const n=e=>new t(e);export{n,t};
|
|
@@ -1,236 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
//#region ../schema/dist/entity/defineEntity.js
|
|
4
|
-
/**
|
|
5
|
-
* Helper to define a database entity with full type safety.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```typescript
|
|
9
|
-
* const UserEntity = defineEntity({
|
|
10
|
-
* name: 'User',
|
|
11
|
-
* schema: 'lssm_sigil',
|
|
12
|
-
* description: 'A user of the platform.',
|
|
13
|
-
* fields: {
|
|
14
|
-
* id: field.id(),
|
|
15
|
-
* email: field.string({ isUnique: true, zod: z.string().email() }),
|
|
16
|
-
* name: field.string({ isOptional: true }),
|
|
17
|
-
* createdAt: field.createdAt(),
|
|
18
|
-
* updatedAt: field.updatedAt(),
|
|
19
|
-
* memberships: field.hasMany('Member'),
|
|
20
|
-
* },
|
|
21
|
-
* indexes: [{ fields: ['email'], unique: true }],
|
|
22
|
-
* });
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
function defineEntity(spec) {
|
|
26
|
-
return spec;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Helper to define an enum that can be shared across entities.
|
|
30
|
-
*/
|
|
31
|
-
function defineEntityEnum(def) {
|
|
32
|
-
return def;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Field builder helpers for common field patterns.
|
|
36
|
-
*/
|
|
37
|
-
const field = {
|
|
38
|
-
string(opts) {
|
|
39
|
-
return {
|
|
40
|
-
kind: "scalar",
|
|
41
|
-
type: "String",
|
|
42
|
-
...opts
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
int(opts) {
|
|
46
|
-
return {
|
|
47
|
-
kind: "scalar",
|
|
48
|
-
type: "Int",
|
|
49
|
-
...opts
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
float(opts) {
|
|
53
|
-
return {
|
|
54
|
-
kind: "scalar",
|
|
55
|
-
type: "Float",
|
|
56
|
-
...opts
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
boolean(opts) {
|
|
60
|
-
return {
|
|
61
|
-
kind: "scalar",
|
|
62
|
-
type: "Boolean",
|
|
63
|
-
...opts
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
dateTime(opts) {
|
|
67
|
-
return {
|
|
68
|
-
kind: "scalar",
|
|
69
|
-
type: "DateTime",
|
|
70
|
-
...opts
|
|
71
|
-
};
|
|
72
|
-
},
|
|
73
|
-
json(opts) {
|
|
74
|
-
return {
|
|
75
|
-
kind: "scalar",
|
|
76
|
-
type: "Json",
|
|
77
|
-
...opts
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
bigInt(opts) {
|
|
81
|
-
return {
|
|
82
|
-
kind: "scalar",
|
|
83
|
-
type: "BigInt",
|
|
84
|
-
...opts
|
|
85
|
-
};
|
|
86
|
-
},
|
|
87
|
-
decimal(opts) {
|
|
88
|
-
return {
|
|
89
|
-
kind: "scalar",
|
|
90
|
-
type: "Decimal",
|
|
91
|
-
...opts
|
|
92
|
-
};
|
|
93
|
-
},
|
|
94
|
-
bytes(opts) {
|
|
95
|
-
return {
|
|
96
|
-
kind: "scalar",
|
|
97
|
-
type: "Bytes",
|
|
98
|
-
...opts
|
|
99
|
-
};
|
|
100
|
-
},
|
|
101
|
-
id(opts) {
|
|
102
|
-
return {
|
|
103
|
-
kind: "scalar",
|
|
104
|
-
type: "String",
|
|
105
|
-
isId: true,
|
|
106
|
-
default: "cuid()",
|
|
107
|
-
...opts
|
|
108
|
-
};
|
|
109
|
-
},
|
|
110
|
-
uuid(opts) {
|
|
111
|
-
return {
|
|
112
|
-
kind: "scalar",
|
|
113
|
-
type: "String",
|
|
114
|
-
isId: true,
|
|
115
|
-
default: "uuid()",
|
|
116
|
-
...opts
|
|
117
|
-
};
|
|
118
|
-
},
|
|
119
|
-
autoIncrement(opts) {
|
|
120
|
-
return {
|
|
121
|
-
kind: "scalar",
|
|
122
|
-
type: "Int",
|
|
123
|
-
isId: true,
|
|
124
|
-
default: "autoincrement()",
|
|
125
|
-
...opts
|
|
126
|
-
};
|
|
127
|
-
},
|
|
128
|
-
createdAt(opts) {
|
|
129
|
-
return {
|
|
130
|
-
kind: "scalar",
|
|
131
|
-
type: "DateTime",
|
|
132
|
-
default: "now()",
|
|
133
|
-
...opts
|
|
134
|
-
};
|
|
135
|
-
},
|
|
136
|
-
updatedAt(opts) {
|
|
137
|
-
return {
|
|
138
|
-
kind: "scalar",
|
|
139
|
-
type: "DateTime",
|
|
140
|
-
updatedAt: true,
|
|
141
|
-
...opts
|
|
142
|
-
};
|
|
143
|
-
},
|
|
144
|
-
email(opts) {
|
|
145
|
-
return {
|
|
146
|
-
kind: "scalar",
|
|
147
|
-
type: "String",
|
|
148
|
-
zod: z$1.email(),
|
|
149
|
-
...opts
|
|
150
|
-
};
|
|
151
|
-
},
|
|
152
|
-
url(opts) {
|
|
153
|
-
return {
|
|
154
|
-
kind: "scalar",
|
|
155
|
-
type: "String",
|
|
156
|
-
zod: z$1.url(),
|
|
157
|
-
...opts
|
|
158
|
-
};
|
|
159
|
-
},
|
|
160
|
-
enum(enumName, opts) {
|
|
161
|
-
return {
|
|
162
|
-
kind: "enum",
|
|
163
|
-
enumName,
|
|
164
|
-
...opts
|
|
165
|
-
};
|
|
166
|
-
},
|
|
167
|
-
inlineEnum(enumName, values, opts) {
|
|
168
|
-
return {
|
|
169
|
-
kind: "enum",
|
|
170
|
-
enumName,
|
|
171
|
-
values,
|
|
172
|
-
...opts
|
|
173
|
-
};
|
|
174
|
-
},
|
|
175
|
-
hasOne(target, opts) {
|
|
176
|
-
return {
|
|
177
|
-
kind: "relation",
|
|
178
|
-
type: "hasOne",
|
|
179
|
-
target,
|
|
180
|
-
...opts
|
|
181
|
-
};
|
|
182
|
-
},
|
|
183
|
-
hasMany(target, opts) {
|
|
184
|
-
return {
|
|
185
|
-
kind: "relation",
|
|
186
|
-
type: "hasMany",
|
|
187
|
-
target,
|
|
188
|
-
...opts
|
|
189
|
-
};
|
|
190
|
-
},
|
|
191
|
-
belongsTo(target, fields, references, opts) {
|
|
192
|
-
return {
|
|
193
|
-
kind: "relation",
|
|
194
|
-
type: "belongsTo",
|
|
195
|
-
target,
|
|
196
|
-
fields,
|
|
197
|
-
references,
|
|
198
|
-
...opts
|
|
199
|
-
};
|
|
200
|
-
},
|
|
201
|
-
foreignKey(opts) {
|
|
202
|
-
return {
|
|
203
|
-
kind: "scalar",
|
|
204
|
-
type: "String",
|
|
205
|
-
...opts
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
/**
|
|
210
|
-
* Index builder helpers.
|
|
211
|
-
*/
|
|
212
|
-
const index = {
|
|
213
|
-
on(fields, opts) {
|
|
214
|
-
return {
|
|
215
|
-
fields,
|
|
216
|
-
...opts
|
|
217
|
-
};
|
|
218
|
-
},
|
|
219
|
-
unique(fields, opts) {
|
|
220
|
-
return {
|
|
221
|
-
fields,
|
|
222
|
-
unique: true,
|
|
223
|
-
...opts
|
|
224
|
-
};
|
|
225
|
-
},
|
|
226
|
-
compound(fields, sort, opts) {
|
|
227
|
-
return {
|
|
228
|
-
fields,
|
|
229
|
-
sort,
|
|
230
|
-
...opts
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
//#endregion
|
|
236
|
-
export { defineEntity, defineEntityEnum, field, index };
|
|
1
|
+
import*as e from"zod";function t(e){return e}function n(e){return e}const r={string(e){return{kind:`scalar`,type:`String`,...e}},int(e){return{kind:`scalar`,type:`Int`,...e}},float(e){return{kind:`scalar`,type:`Float`,...e}},boolean(e){return{kind:`scalar`,type:`Boolean`,...e}},dateTime(e){return{kind:`scalar`,type:`DateTime`,...e}},json(e){return{kind:`scalar`,type:`Json`,...e}},bigInt(e){return{kind:`scalar`,type:`BigInt`,...e}},decimal(e){return{kind:`scalar`,type:`Decimal`,...e}},bytes(e){return{kind:`scalar`,type:`Bytes`,...e}},id(e){return{kind:`scalar`,type:`String`,isId:!0,default:`cuid()`,...e}},uuid(e){return{kind:`scalar`,type:`String`,isId:!0,default:`uuid()`,...e}},autoIncrement(e){return{kind:`scalar`,type:`Int`,isId:!0,default:`autoincrement()`,...e}},createdAt(e){return{kind:`scalar`,type:`DateTime`,default:`now()`,...e}},updatedAt(e){return{kind:`scalar`,type:`DateTime`,updatedAt:!0,...e}},email(t){return{kind:`scalar`,type:`String`,zod:e.email(),...t}},url(t){return{kind:`scalar`,type:`String`,zod:e.url(),...t}},enum(e,t){return{kind:`enum`,enumName:e,...t}},inlineEnum(e,t,n){return{kind:`enum`,enumName:e,values:t,...n}},hasOne(e,t){return{kind:`relation`,type:`hasOne`,target:e,...t}},hasMany(e,t){return{kind:`relation`,type:`hasMany`,target:e,...t}},belongsTo(e,t,n,r){return{kind:`relation`,type:`belongsTo`,target:e,fields:t,references:n,...r}},foreignKey(e){return{kind:`scalar`,type:`String`,...e}}},i={on(e,t){return{fields:e,...t}},unique(e,t){return{fields:e,unique:!0,...t}},compound(e,t,n){return{fields:e,sort:t,...n}}};export{i,n,r,t};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "./types.js";
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./defineEntity.js";import"./types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"zod";
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FieldType } from "./FieldType.js";
|
|
3
|
-
import { ScalarTypeEnum } from "./ScalarTypeEnum.js";
|
|
4
|
-
import { SchemaModel, defineSchemaModel } from "./SchemaModel.js";
|
|
5
|
-
import { defineEntity, defineEntityEnum, field, index } from "./entity/defineEntity.js";
|
|
6
|
-
import "./entity/index.js";
|
|
1
|
+
import"./EnumType.js";import{t as e}from"./FieldType.js";import{l as t}from"./ScalarTypeEnum.js";import{n,t as r}from"./SchemaModel.js";import{i,n as a,r as o,t as s}from"./entity/defineEntity.js";import"./entity/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/lib.jobs",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251217073102",
|
|
4
4
|
"description": "Background jobs and scheduler module for ContractSpec applications",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"lint:check": "eslint src"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@lssm/lib.schema": "0.0.0-canary-
|
|
22
|
-
"@lssm/lib.contracts": "0.0.0-canary-
|
|
23
|
-
"@lssm/lib.logger": "0.0.0-canary-
|
|
24
|
-
"@lssm/lib.knowledge": "0.0.0-canary-
|
|
21
|
+
"@lssm/lib.schema": "0.0.0-canary-20251217073102",
|
|
22
|
+
"@lssm/lib.contracts": "0.0.0-canary-20251217073102",
|
|
23
|
+
"@lssm/lib.logger": "0.0.0-canary-20251217073102",
|
|
24
|
+
"@lssm/lib.knowledge": "0.0.0-canary-20251217073102",
|
|
25
25
|
"@aws-sdk/client-sqs": "^3.948.0",
|
|
26
26
|
"zod": "^4.1.13",
|
|
27
27
|
"cron-parser": "^5.4.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
31
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
30
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251217073102",
|
|
31
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251217073102",
|
|
32
32
|
"typescript": "^5.9.3"
|
|
33
33
|
},
|
|
34
34
|
"exports": {
|