wellcrafted 0.29.1 → 0.31.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.
@@ -0,0 +1,371 @@
1
+ //#region src/standard-schema/types.d.ts
2
+ /**
3
+ * Standard Schema type definitions.
4
+ *
5
+ * These interfaces are copied from the Standard Schema specification
6
+ * (https://standardschema.dev) to avoid external dependencies.
7
+ *
8
+ * @see https://github.com/standard-schema/standard-schema
9
+ */
10
+ /**
11
+ * The Standard Typed interface. This is a base type extended by other specs.
12
+ */
13
+ type StandardTypedV1<Input = unknown, Output = Input> = {
14
+ /** The Standard properties. */
15
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
16
+ };
17
+ declare namespace StandardTypedV1 {
18
+ /** The Standard Typed properties interface. */
19
+ type Props<Input = unknown, Output = Input> = {
20
+ /** The version number of the standard. */
21
+ readonly version: 1;
22
+ /** The vendor name of the schema library. */
23
+ readonly vendor: string;
24
+ /** Inferred types associated with the schema. */
25
+ readonly types?: Types<Input, Output> | undefined;
26
+ };
27
+ /** The Standard Typed types interface. */
28
+ type Types<Input = unknown, Output = Input> = {
29
+ /** The input type of the schema. */
30
+ readonly input: Input;
31
+ /** The output type of the schema. */
32
+ readonly output: Output;
33
+ };
34
+ /** Infers the input type of a Standard Typed. */
35
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
36
+ /** Infers the output type of a Standard Typed. */
37
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
38
+ }
39
+ /**
40
+ * The Standard Schema interface.
41
+ *
42
+ * Extends StandardTypedV1 with a validate function for runtime validation.
43
+ */
44
+ type StandardSchemaV1<Input = unknown, Output = Input> = {
45
+ /** The Standard Schema properties. */
46
+ readonly "~standard": StandardSchemaV1.Props<Input, Output>;
47
+ };
48
+ declare namespace StandardSchemaV1 {
49
+ /** The Standard Schema properties interface. */
50
+ type Props<Input = unknown, Output = Input> = StandardTypedV1.Props<Input, Output> & {
51
+ /** Validates unknown input values. */
52
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
53
+ };
54
+ /** The result interface of the validate function. */
55
+ type Result<Output> = SuccessResult<Output> | FailureResult;
56
+ /** The result interface if validation succeeds. */
57
+ type SuccessResult<Output> = {
58
+ /** The typed output value. */
59
+ readonly value: Output;
60
+ /** A falsy value for `issues` indicates success. */
61
+ readonly issues?: undefined;
62
+ };
63
+ /** Options for the validate function. */
64
+ type Options = {
65
+ /** Explicit support for additional vendor-specific parameters, if needed. */
66
+ readonly libraryOptions?: Record<string, unknown> | undefined;
67
+ };
68
+ /** The result interface if validation fails. */
69
+ type FailureResult = {
70
+ /** The issues of failed validation. */
71
+ readonly issues: ReadonlyArray<Issue>;
72
+ };
73
+ /** The issue interface of the failure output. */
74
+ type Issue = {
75
+ /** The error message of the issue. */
76
+ readonly message: string;
77
+ /** The path of the issue, if any. */
78
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
79
+ };
80
+ /** The path segment interface of the issue. */
81
+ type PathSegment = {
82
+ /** The key representing a path segment. */
83
+ readonly key: PropertyKey;
84
+ };
85
+ /** Infers the input type of a Standard Schema. */
86
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
87
+ /** Infers the output type of a Standard Schema. */
88
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
89
+ }
90
+ /**
91
+ * The Standard JSON Schema interface.
92
+ *
93
+ * Extends StandardTypedV1 with methods for generating JSON Schema.
94
+ */
95
+ type StandardJSONSchemaV1<Input = unknown, Output = Input> = {
96
+ /** The Standard JSON Schema properties. */
97
+ readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
98
+ };
99
+ declare namespace StandardJSONSchemaV1 {
100
+ /** The Standard JSON Schema properties interface. */
101
+ type Props<Input = unknown, Output = Input> = StandardTypedV1.Props<Input, Output> & {
102
+ /** Methods for generating the input/output JSON Schema. */
103
+ readonly jsonSchema: StandardJSONSchemaV1.Converter;
104
+ };
105
+ /** The Standard JSON Schema converter interface. */
106
+ type Converter = {
107
+ /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
108
+ readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
109
+ /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
110
+ readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
111
+ };
112
+ /**
113
+ * The target version of the generated JSON Schema.
114
+ *
115
+ * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`,
116
+ * as they are both in wide use. All other targets can be implemented on a best-effort basis.
117
+ * Libraries should throw if they don't support a specified target.
118
+ *
119
+ * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0
120
+ * which is a superset of JSON Schema `"draft-04"`.
121
+ */
122
+ type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | (string & {});
123
+ /** The options for the input/output methods. */
124
+ type Options = {
125
+ /** Specifies the target version of the generated JSON Schema. */
126
+ readonly target: Target;
127
+ /** Explicit support for additional vendor-specific parameters, if needed. */
128
+ readonly libraryOptions?: Record<string, unknown> | undefined;
129
+ };
130
+ /** Infers the input type of a Standard JSON Schema. */
131
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
132
+ /** Infers the output type of a Standard JSON Schema. */
133
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
134
+ }
135
+ /**
136
+ * A schema that implements both StandardSchemaV1 and StandardJSONSchemaV1.
137
+ */
138
+ type StandardFullSchemaV1<Input = unknown, Output = Input> = {
139
+ readonly "~standard": StandardSchemaV1.Props<Input, Output> & StandardJSONSchemaV1.Props<Input, Output>;
140
+ };
141
+ /**
142
+ * Checks if a schema has validation capability.
143
+ */
144
+ declare function hasValidate<T extends StandardTypedV1>(schema: T): schema is T & StandardSchemaV1;
145
+ /**
146
+ * Checks if a schema has JSON Schema generation capability.
147
+ */
148
+ declare function hasJsonSchema<T extends StandardTypedV1>(schema: T): schema is T & StandardJSONSchemaV1;
149
+ //# sourceMappingURL=types.d.ts.map
150
+ //#endregion
151
+ //#region src/standard-schema/err.d.ts
152
+ /**
153
+ * Output type for ErrSchema - wraps inner schema's types with Err structure.
154
+ *
155
+ * Preserves the capabilities of the input schema:
156
+ * - If input has validate, output has validate
157
+ * - If input has jsonSchema, output has jsonSchema
158
+ */
159
+ type Err<TSchema extends StandardTypedV1> = {
160
+ readonly "~standard": {
161
+ readonly version: 1;
162
+ readonly vendor: "wellcrafted";
163
+ readonly types: {
164
+ readonly input: {
165
+ data: null;
166
+ error: StandardTypedV1.InferInput<TSchema>;
167
+ };
168
+ readonly output: {
169
+ data: null;
170
+ error: StandardTypedV1.InferOutput<TSchema>;
171
+ };
172
+ };
173
+ } & (TSchema extends StandardSchemaV1 ? {
174
+ readonly validate: StandardSchemaV1.Props<{
175
+ data: null;
176
+ error: StandardTypedV1.InferInput<TSchema>;
177
+ }, {
178
+ data: null;
179
+ error: StandardTypedV1.InferOutput<TSchema>;
180
+ }>["validate"];
181
+ } : Record<string, never>) & (TSchema extends StandardJSONSchemaV1 ? {
182
+ readonly jsonSchema: StandardJSONSchemaV1.Converter;
183
+ } : Record<string, never>);
184
+ };
185
+ /**
186
+ * Wraps a Standard Schema into an Err variant schema.
187
+ *
188
+ * Takes a schema for type E and returns a schema for `{ data: null, error: E }`.
189
+ * Preserves the capabilities of the input schema (validate, jsonSchema, or both).
190
+ *
191
+ * @example
192
+ * ```typescript
193
+ * import { z } from "zod";
194
+ * import { ErrSchema } from "wellcrafted/standard-schema";
195
+ *
196
+ * const errorSchema = z.object({ code: z.string(), message: z.string() });
197
+ * const errResultSchema = ErrSchema(errorSchema);
198
+ *
199
+ * // Validates: { data: null, error: { code: "NOT_FOUND", message: "User not found" } }
200
+ * const result = errResultSchema["~standard"].validate({
201
+ * data: null,
202
+ * error: { code: "NOT_FOUND", message: "User not found" },
203
+ * });
204
+ * ```
205
+ */
206
+ declare function ErrSchema<TSchema extends StandardTypedV1>(innerSchema: TSchema): Err<TSchema>;
207
+ //# sourceMappingURL=err.d.ts.map
208
+ //#endregion
209
+ //#region src/standard-schema/failures.d.ts
210
+ declare const FAILURES: {
211
+ readonly EXPECTED_OBJECT: {
212
+ readonly issues: readonly [{
213
+ readonly message: "Expected object";
214
+ }];
215
+ };
216
+ readonly EXPECTED_DATA_ERROR_PROPS: {
217
+ readonly issues: readonly [{
218
+ readonly message: "Expected object with 'data' and 'error' properties";
219
+ }];
220
+ };
221
+ readonly EXPECTED_ERROR_NULL: {
222
+ readonly issues: readonly [{
223
+ readonly message: "Expected 'error' to be null for Ok variant";
224
+ readonly path: readonly ["error"];
225
+ }];
226
+ };
227
+ readonly EXPECTED_ERROR_NOT_NULL: {
228
+ readonly issues: readonly [{
229
+ readonly message: "Expected 'error' to be non-null for Err variant";
230
+ readonly path: readonly ["error"];
231
+ }];
232
+ };
233
+ };
234
+ //# sourceMappingURL=failures.d.ts.map
235
+ //#endregion
236
+ //#region src/standard-schema/ok.d.ts
237
+ /**
238
+ * Output type for OkSchema - wraps inner schema's types with Ok structure.
239
+ *
240
+ * Preserves the capabilities of the input schema:
241
+ * - If input has validate, output has validate
242
+ * - If input has jsonSchema, output has jsonSchema
243
+ */
244
+ type Ok<TSchema extends StandardTypedV1> = {
245
+ readonly "~standard": {
246
+ readonly version: 1;
247
+ readonly vendor: "wellcrafted";
248
+ readonly types: {
249
+ readonly input: {
250
+ data: StandardTypedV1.InferInput<TSchema>;
251
+ error: null;
252
+ };
253
+ readonly output: {
254
+ data: StandardTypedV1.InferOutput<TSchema>;
255
+ error: null;
256
+ };
257
+ };
258
+ } & (TSchema extends StandardSchemaV1 ? {
259
+ readonly validate: StandardSchemaV1.Props<{
260
+ data: StandardTypedV1.InferInput<TSchema>;
261
+ error: null;
262
+ }, {
263
+ data: StandardTypedV1.InferOutput<TSchema>;
264
+ error: null;
265
+ }>["validate"];
266
+ } : Record<string, never>) & (TSchema extends StandardJSONSchemaV1 ? {
267
+ readonly jsonSchema: StandardJSONSchemaV1.Converter;
268
+ } : Record<string, never>);
269
+ };
270
+ /**
271
+ * Wraps a Standard Schema into an Ok variant schema.
272
+ *
273
+ * Takes a schema for type T and returns a schema for `{ data: T, error: null }`.
274
+ * Preserves the capabilities of the input schema (validate, jsonSchema, or both).
275
+ *
276
+ * @example
277
+ * ```typescript
278
+ * import { z } from "zod";
279
+ * import { OkSchema } from "wellcrafted/standard-schema";
280
+ *
281
+ * const userSchema = z.object({ name: z.string() });
282
+ * const okUserSchema = OkSchema(userSchema);
283
+ *
284
+ * // Validates: { data: { name: "Alice" }, error: null }
285
+ * const result = okUserSchema["~standard"].validate({
286
+ * data: { name: "Alice" },
287
+ * error: null,
288
+ * });
289
+ * ```
290
+ */
291
+ declare function OkSchema<TSchema extends StandardTypedV1>(innerSchema: TSchema): Ok<TSchema>;
292
+ //# sourceMappingURL=ok.d.ts.map
293
+ //#endregion
294
+ //#region src/standard-schema/result.d.ts
295
+ /**
296
+ * Output type for ResultSchema - creates a discriminated union of Ok and Err.
297
+ *
298
+ * Preserves the capabilities of the input schemas:
299
+ * - If both inputs have validate, output has validate
300
+ * - If both inputs have jsonSchema, output has jsonSchema
301
+ */
302
+ type Result$1<TDataSchema extends StandardTypedV1, TErrorSchema extends StandardTypedV1> = {
303
+ readonly "~standard": {
304
+ readonly version: 1;
305
+ readonly vendor: "wellcrafted";
306
+ readonly types: {
307
+ readonly input: {
308
+ data: StandardTypedV1.InferInput<TDataSchema>;
309
+ error: null;
310
+ } | {
311
+ data: null;
312
+ error: StandardTypedV1.InferInput<TErrorSchema>;
313
+ };
314
+ readonly output: {
315
+ data: StandardTypedV1.InferOutput<TDataSchema>;
316
+ error: null;
317
+ } | {
318
+ data: null;
319
+ error: StandardTypedV1.InferOutput<TErrorSchema>;
320
+ };
321
+ };
322
+ } & (TDataSchema extends StandardSchemaV1 ? TErrorSchema extends StandardSchemaV1 ? {
323
+ readonly validate: StandardSchemaV1.Props<{
324
+ data: StandardTypedV1.InferInput<TDataSchema>;
325
+ error: null;
326
+ } | {
327
+ data: null;
328
+ error: StandardTypedV1.InferInput<TErrorSchema>;
329
+ }, {
330
+ data: StandardTypedV1.InferOutput<TDataSchema>;
331
+ error: null;
332
+ } | {
333
+ data: null;
334
+ error: StandardTypedV1.InferOutput<TErrorSchema>;
335
+ }>["validate"];
336
+ } : Record<string, never> : Record<string, never>) & (TDataSchema extends StandardJSONSchemaV1 ? TErrorSchema extends StandardJSONSchemaV1 ? {
337
+ readonly jsonSchema: StandardJSONSchemaV1.Converter;
338
+ } : Record<string, never> : Record<string, never>);
339
+ };
340
+ /**
341
+ * Combines two Standard Schemas into a Result discriminated union schema.
342
+ *
343
+ * Takes a data schema for type T and an error schema for type E, returning a schema
344
+ * for `{ data: T, error: null } | { data: null, error: E }`.
345
+ *
346
+ * Preserves the capabilities of the input schemas - if both have validate, output
347
+ * has validate; if both have jsonSchema, output has jsonSchema.
348
+ *
349
+ * @example
350
+ * ```typescript
351
+ * import { z } from "zod";
352
+ * import { ResultSchema } from "wellcrafted/standard-schema";
353
+ *
354
+ * const userSchema = z.object({ id: z.string(), name: z.string() });
355
+ * const errorSchema = z.object({ code: z.string(), message: z.string() });
356
+ * const resultSchema = ResultSchema(userSchema, errorSchema);
357
+ *
358
+ * // Validates Ok variant: { data: { id: "1", name: "Alice" }, error: null }
359
+ * // Validates Err variant: { data: null, error: { code: "NOT_FOUND", message: "..." } }
360
+ * const result = resultSchema["~standard"].validate({
361
+ * data: { id: "1", name: "Alice" },
362
+ * error: null,
363
+ * });
364
+ * ```
365
+ */
366
+ declare function ResultSchema<TDataSchema extends StandardTypedV1, TErrorSchema extends StandardTypedV1>(dataSchema: TDataSchema, errorSchema: TErrorSchema): Result$1<TDataSchema, TErrorSchema>;
367
+ //# sourceMappingURL=result.d.ts.map
368
+
369
+ //#endregion
370
+ export { Err, ErrSchema, FAILURES, Ok, OkSchema, Result$1 as Result, ResultSchema, StandardFullSchemaV1, StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1, hasJsonSchema, hasValidate };
371
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/standard-schema/types.ts","../../src/standard-schema/err.ts","../../src/standard-schema/failures.ts","../../src/standard-schema/ok.ts","../../src/standard-schema/result.ts"],"sourcesContent":[],"mappings":";;AAgBA;;;;;;AAE4C;AAG5C;;;AAQyB,KAbb,eAaa,CAAA,QAAA,OAAA,EAAA,SAb6B,KAa7B,CAAA,GAAA;EAAK;EAAQ,SAAnB,WAAA,EAXI,eAAA,CAAgB,KAWpB,CAX0B,KAW1B,EAXiC,MAWjC,CAAA;CAAK;AAMN,kBAdO,eAAA,CAcP;EAAK;EAEE,KAIO,KAAA,CAAA,QAAA,OAAA,EAAA,SAlBM,KAkBN,CAAA,GAAA;IAC9B;IADiD,SAAA,OAAA,EAAA,CAAA;IAKlB;IAC/B,SAAA,MAAA,EAAA,MAAA;IADkD;IAAW,SAAA,KAAA,CAAA,EAjB5C,KAiB4C,CAjBtC,KAiBsC,EAjB/B,MAiB+B,CAAA,GAAA,SAAA;EAcnD,CAAA;EAAgB;EAAA,KAA2B,KAAA,CAAA,QAAA,OAAA,EAAA,SA3BjB,KA2BiB,CAAA,GAAA;IAET;IAAO,SAAA,KAAA,EA3BnC,KA2BmC;IAA9B;IAAsB,SAAA,MAAA,EAzB1B,MAyB0B;EAGpB,CAAA;EAAgB;EAAA,KAEH,UAAA,CAAA,eA1BN,eA0BM,CAAA,GA1Ba,WA0Bb,CAzBpC,MAyBoC,CAAA,WAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,OAAA,CAAA;EAAK;EACpC,KACL,WAAA,CAAA,eAvB+B,eAuB/B,CAAA,GAvBkD,WAuBlD,CAtBA,MAsBA,CAAA,WAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,QAA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