@prisma-next/sql-contract 0.1.0-pr.64.2 → 0.1.0-pr.65.1

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,56 @@
1
+ import { TypesImportSpec, OperationManifest } from '@prisma-next/contract/types';
2
+
3
+ /**
4
+ * Storage type metadata for pack refs.
5
+ */
6
+ interface StorageTypeMetadata {
7
+ readonly typeId: string;
8
+ readonly familyId: string;
9
+ readonly targetId: string;
10
+ readonly nativeType?: string;
11
+ }
12
+ /**
13
+ * Declarative fields that pack refs carry.
14
+ * These fields are owned directly by pack refs (not nested under a manifest).
15
+ */
16
+ interface PackRefDeclarativeFields {
17
+ readonly version: string;
18
+ readonly targets?: Record<string, {
19
+ readonly minVersion?: string;
20
+ }>;
21
+ readonly capabilities?: Record<string, unknown>;
22
+ readonly types?: {
23
+ readonly codecTypes?: {
24
+ readonly import: TypesImportSpec;
25
+ };
26
+ readonly operationTypes?: {
27
+ readonly import: TypesImportSpec;
28
+ };
29
+ readonly storage?: ReadonlyArray<StorageTypeMetadata>;
30
+ };
31
+ readonly operations?: ReadonlyArray<OperationManifest>;
32
+ }
33
+ /**
34
+ * Base shape for any pack reference.
35
+ * Pack refs are pure JSON-friendly objects safe to import in authoring flows.
36
+ */
37
+ interface PackRefBase<Kind extends string, TFamilyId extends string> extends PackRefDeclarativeFields {
38
+ readonly kind: Kind;
39
+ readonly id: string;
40
+ readonly familyId: TFamilyId;
41
+ readonly targetId?: string;
42
+ }
43
+ type TargetPackRef<TFamilyId extends string = string, TTargetId extends string = string> = PackRefBase<'target', TFamilyId> & {
44
+ readonly targetId: TTargetId;
45
+ };
46
+ type AdapterPackRef<TFamilyId extends string = string, TTargetId extends string = string> = PackRefBase<'adapter', TFamilyId> & {
47
+ readonly targetId: TTargetId;
48
+ };
49
+ type ExtensionPackRef<TFamilyId extends string = string, TTargetId extends string = string> = PackRefBase<'extension', TFamilyId> & {
50
+ readonly targetId: TTargetId;
51
+ };
52
+ type DriverPackRef<TFamilyId extends string = string, TTargetId extends string = string> = PackRefBase<'driver', TFamilyId> & {
53
+ readonly targetId: TTargetId;
54
+ };
55
+
56
+ export type { AdapterPackRef, DriverPackRef, ExtensionPackRef, PackRefBase, PackRefDeclarativeFields, StorageTypeMetadata, TargetPackRef };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=pack-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@prisma-next/sql-contract",
3
- "version": "0.1.0-pr.64.2",
3
+ "version": "0.1.0-pr.65.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "SQL contract types, validators, and IR factories for Prisma Next",
7
7
  "dependencies": {
8
8
  "arktype": "^2.1.25",
9
- "@prisma-next/contract": "0.1.0-pr.64.2"
9
+ "@prisma-next/contract": "0.1.0-pr.65.1"
10
10
  },
11
11
  "devDependencies": {
12
- "@vitest/coverage-v8": "^4.0.0",
12
+ "@vitest/coverage-v8": "^2.1.1",
13
13
  "tsup": "^8.3.0",
14
14
  "typescript": "^5.9.3",
15
15
  "vitest": "^4.0.16",
@@ -30,6 +30,10 @@
30
30
  "./factories": {
31
31
  "types": "./dist/exports/factories.d.ts",
32
32
  "import": "./dist/exports/factories.js"
33
+ },
34
+ "./pack-types": {
35
+ "types": "./dist/exports/pack-types.d.ts",
36
+ "import": "./dist/exports/pack-types.js"
33
37
  }
34
38
  },
35
39
  "scripts": {