@prisma-next/sql-contract 0.3.0-dev.8 → 0.3.0-dev.80

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 (60) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +84 -10
  3. package/dist/factories.d.mts +48 -0
  4. package/dist/factories.d.mts.map +1 -0
  5. package/dist/factories.mjs +84 -0
  6. package/dist/factories.mjs.map +1 -0
  7. package/dist/pack-types.d.mts +13 -0
  8. package/dist/pack-types.d.mts.map +1 -0
  9. package/dist/pack-types.mjs +1 -0
  10. package/dist/types-CcCSXOlR.d.mts +166 -0
  11. package/dist/types-CcCSXOlR.d.mts.map +1 -0
  12. package/dist/types-DRR5stkj.mjs +13 -0
  13. package/dist/types-DRR5stkj.mjs.map +1 -0
  14. package/dist/types.d.mts +2 -0
  15. package/dist/types.mjs +3 -0
  16. package/dist/validate.d.mts +11 -0
  17. package/dist/validate.d.mts.map +1 -0
  18. package/dist/validate.mjs +244 -0
  19. package/dist/validate.mjs.map +1 -0
  20. package/dist/validators-CQXvLZa7.mjs +216 -0
  21. package/dist/validators-CQXvLZa7.mjs.map +1 -0
  22. package/dist/validators.d.mts +71 -0
  23. package/dist/validators.d.mts.map +1 -0
  24. package/dist/validators.mjs +3 -0
  25. package/package.json +24 -28
  26. package/src/construct.ts +178 -0
  27. package/src/exports/types.ts +13 -0
  28. package/src/exports/validate.ts +6 -0
  29. package/src/exports/validators.ts +1 -1
  30. package/src/factories.ts +41 -8
  31. package/src/index.ts +1 -0
  32. package/src/types.ts +137 -8
  33. package/src/validate.ts +272 -0
  34. package/src/validators.ts +164 -12
  35. package/dist/exports/factories.d.ts +0 -2
  36. package/dist/exports/factories.d.ts.map +0 -1
  37. package/dist/exports/factories.js +0 -83
  38. package/dist/exports/factories.js.map +0 -1
  39. package/dist/exports/pack-types.d.ts +0 -2
  40. package/dist/exports/pack-types.d.ts.map +0 -1
  41. package/dist/exports/pack-types.js +0 -1
  42. package/dist/exports/pack-types.js.map +0 -1
  43. package/dist/exports/types.d.ts +0 -2
  44. package/dist/exports/types.d.ts.map +0 -1
  45. package/dist/exports/types.js +0 -1
  46. package/dist/exports/types.js.map +0 -1
  47. package/dist/exports/validators.d.ts +0 -2
  48. package/dist/exports/validators.d.ts.map +0 -1
  49. package/dist/exports/validators.js +0 -96
  50. package/dist/exports/validators.js.map +0 -1
  51. package/dist/factories.d.ts +0 -38
  52. package/dist/factories.d.ts.map +0 -1
  53. package/dist/index.d.ts +0 -4
  54. package/dist/index.d.ts.map +0 -1
  55. package/dist/pack-types.d.ts +0 -10
  56. package/dist/pack-types.d.ts.map +0 -1
  57. package/dist/types.d.ts +0 -68
  58. package/dist/types.d.ts.map +0 -1
  59. package/dist/validators.d.ts +0 -35
  60. package/dist/validators.d.ts.map +0 -1
@@ -1,35 +0,0 @@
1
- import type { ModelDefinition, SqlContract, SqlStorage } from './types';
2
- /**
3
- * Validates the structural shape of SqlStorage using Arktype.
4
- *
5
- * @param value - The storage value to validate
6
- * @returns The validated storage if structure is valid
7
- * @throws Error if the storage structure is invalid
8
- */
9
- export declare function validateStorage(value: unknown): SqlStorage;
10
- /**
11
- * Validates the structural shape of ModelDefinition using Arktype.
12
- *
13
- * @param value - The model value to validate
14
- * @returns The validated model if structure is valid
15
- * @throws Error if the model structure is invalid
16
- */
17
- export declare function validateModel(value: unknown): ModelDefinition;
18
- /**
19
- * Validates the structural shape of a SqlContract using Arktype.
20
- *
21
- * **Responsibility: Validation Only**
22
- * This function validates that the contract has the correct structure and types.
23
- * It does NOT normalize the contract - normalization must happen in the contract builder.
24
- *
25
- * The contract passed to this function must already be normalized (all required fields present).
26
- * If normalization is needed, it should be done by the contract builder before calling this function.
27
- *
28
- * This ensures all required fields are present and have the correct types.
29
- *
30
- * @param value - The contract value to validate (typically from a JSON import)
31
- * @returns The validated contract if structure is valid
32
- * @throws Error if the contract structure is invalid
33
- */
34
- export declare function validateSqlContract<T extends SqlContract<SqlStorage>>(value: unknown): T;
35
- //# sourceMappingURL=validators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../src/validators.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,eAAe,EAIf,WAAW,EACX,UAAU,EAIX,MAAM,SAAS,CAAC;AA0EjB;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAO1D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAO7D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,WAAW,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAkBxF"}