polen 0.11.0-next.24 → 0.11.0-next.25

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 (188) hide show
  1. package/build/api/config/input.d.ts +76 -77
  2. package/build/api/config/input.d.ts.map +1 -1
  3. package/build/api/config/normalized.d.ts +136 -143
  4. package/build/api/config/normalized.d.ts.map +1 -1
  5. package/build/api/config-template/template.d.ts +110 -121
  6. package/build/api/config-template/template.d.ts.map +1 -1
  7. package/build/api/examples/diagnostic/diagnostic.d.ts +0 -23
  8. package/build/api/examples/diagnostic/diagnostic.d.ts.map +1 -1
  9. package/build/api/examples/diagnostic/diagnostic.js +1 -3
  10. package/build/api/examples/diagnostic/diagnostic.js.map +1 -1
  11. package/build/api/examples/scanner.d.ts +27 -1
  12. package/build/api/examples/scanner.d.ts.map +1 -1
  13. package/build/api/examples/scanner.js +19 -17
  14. package/build/api/examples/scanner.js.map +1 -1
  15. package/build/api/examples/schemas/catalog.d.ts +20 -12
  16. package/build/api/examples/schemas/catalog.d.ts.map +1 -1
  17. package/build/api/examples/schemas/example/example.d.ts +17 -11
  18. package/build/api/examples/schemas/example/example.d.ts.map +1 -1
  19. package/build/api/schema/augmentations/$$.d.ts +7 -0
  20. package/build/api/schema/augmentations/$$.d.ts.map +1 -0
  21. package/build/api/schema/augmentations/$$.js +7 -0
  22. package/build/api/schema/augmentations/$$.js.map +1 -0
  23. package/build/api/schema/augmentations/$.d.ts +1 -1
  24. package/build/api/schema/augmentations/$.d.ts.map +1 -1
  25. package/build/api/schema/augmentations/$.js +1 -1
  26. package/build/api/schema/augmentations/$.js.map +1 -1
  27. package/build/api/schema/augmentations/apply.d.ts +29 -0
  28. package/build/api/schema/augmentations/apply.d.ts.map +1 -0
  29. package/build/api/schema/augmentations/apply.js +181 -0
  30. package/build/api/schema/augmentations/apply.js.map +1 -0
  31. package/build/api/schema/augmentations/augmentation.d.ts +31 -0
  32. package/build/api/schema/augmentations/augmentation.d.ts.map +1 -0
  33. package/build/api/schema/augmentations/augmentation.js +22 -0
  34. package/build/api/schema/augmentations/augmentation.js.map +1 -0
  35. package/build/api/schema/augmentations/config.d.ts +24 -0
  36. package/build/api/schema/augmentations/config.d.ts.map +1 -0
  37. package/build/api/schema/augmentations/config.js +9 -0
  38. package/build/api/schema/augmentations/config.js.map +1 -0
  39. package/build/api/schema/augmentations/diagnostics/diagnostic.d.ts +67 -0
  40. package/build/api/schema/augmentations/diagnostics/diagnostic.d.ts.map +1 -0
  41. package/build/api/schema/augmentations/diagnostics/diagnostic.js +13 -0
  42. package/build/api/schema/augmentations/diagnostics/diagnostic.js.map +1 -0
  43. package/build/api/schema/augmentations/diagnostics/duplicate-version.d.ts +45 -0
  44. package/build/api/schema/augmentations/diagnostics/duplicate-version.d.ts.map +1 -0
  45. package/build/api/schema/augmentations/diagnostics/duplicate-version.js +17 -0
  46. package/build/api/schema/augmentations/diagnostics/duplicate-version.js.map +1 -0
  47. package/build/api/schema/augmentations/diagnostics/invalid-path.d.ts +46 -0
  48. package/build/api/schema/augmentations/diagnostics/invalid-path.d.ts.map +1 -0
  49. package/build/api/schema/augmentations/diagnostics/invalid-path.js +18 -0
  50. package/build/api/schema/augmentations/diagnostics/invalid-path.js.map +1 -0
  51. package/build/api/schema/augmentations/diagnostics/version-mismatch.d.ts +46 -0
  52. package/build/api/schema/augmentations/diagnostics/version-mismatch.d.ts.map +1 -0
  53. package/build/api/schema/augmentations/diagnostics/version-mismatch.js +18 -0
  54. package/build/api/schema/augmentations/diagnostics/version-mismatch.js.map +1 -0
  55. package/build/api/schema/augmentations/input.d.ts +145 -0
  56. package/build/api/schema/augmentations/input.d.ts.map +1 -0
  57. package/build/api/schema/augmentations/input.js +191 -0
  58. package/build/api/schema/augmentations/input.js.map +1 -0
  59. package/build/api/schema/augmentations/placement.d.ts +8 -0
  60. package/build/api/schema/augmentations/placement.d.ts.map +1 -0
  61. package/build/api/schema/augmentations/placement.js +7 -0
  62. package/build/api/schema/augmentations/placement.js.map +1 -0
  63. package/build/api/schema/config-schema.d.ts +66 -66
  64. package/build/api/schema/config-schema.d.ts.map +1 -1
  65. package/build/api/schema/config-schema.js +2 -2
  66. package/build/api/schema/config-schema.js.map +1 -1
  67. package/build/api/schema/input-source/load.d.ts +2 -0
  68. package/build/api/schema/input-source/load.d.ts.map +1 -1
  69. package/build/api/schema/input-source/load.js.map +1 -1
  70. package/build/api/schema/input-sources/directory.d.ts +39 -39
  71. package/build/api/schema/input-sources/file.d.ts +39 -39
  72. package/build/api/schema/input-sources/introspection-file.d.ts +39 -39
  73. package/build/api/schema/input-sources/introspection.d.ts +39 -39
  74. package/build/api/schema/input-sources/memory.d.ts +39 -39
  75. package/build/api/schema/input-sources/versioned-directory.d.ts +79 -79
  76. package/build/api/schema/load.d.ts.map +1 -1
  77. package/build/api/schema/load.js +9 -2
  78. package/build/api/schema/load.js.map +1 -1
  79. package/build/lib/catalog/catalog.d.ts +1181 -1181
  80. package/build/lib/catalog/unversioned.d.ts +312 -312
  81. package/build/lib/catalog/versioned.d.ts +634 -634
  82. package/build/lib/change/change.d.ts +238 -238
  83. package/build/lib/document/document.d.ts +14 -8
  84. package/build/lib/document/document.d.ts.map +1 -1
  85. package/build/lib/document/versioned.d.ts +17 -10
  86. package/build/lib/document/versioned.d.ts.map +1 -1
  87. package/build/lib/grafaid/schema/KindMap/_.d.ts +1 -1
  88. package/build/lib/graphql-path/$$.d.ts +7 -13
  89. package/build/lib/graphql-path/$$.d.ts.map +1 -1
  90. package/build/lib/graphql-path/$$.js +7 -13
  91. package/build/lib/graphql-path/$$.js.map +1 -1
  92. package/build/lib/graphql-path/definition.d.ts +104 -94
  93. package/build/lib/graphql-path/definition.d.ts.map +1 -1
  94. package/build/lib/graphql-path/definition.js +126 -125
  95. package/build/lib/graphql-path/definition.js.map +1 -1
  96. package/build/lib/graphql-path/query.d.ts +25 -57
  97. package/build/lib/graphql-path/query.d.ts.map +1 -1
  98. package/build/lib/graphql-path/query.js +15 -93
  99. package/build/lib/graphql-path/query.js.map +1 -1
  100. package/build/lib/graphql-path/schema.d.ts +49 -0
  101. package/build/lib/graphql-path/schema.d.ts.map +1 -0
  102. package/build/lib/graphql-path/schema.js +89 -0
  103. package/build/lib/graphql-path/schema.js.map +1 -0
  104. package/build/lib/graphql-path/types.d.ts +76 -28
  105. package/build/lib/graphql-path/types.d.ts.map +1 -1
  106. package/build/lib/graphql-path/types.js +101 -2
  107. package/build/lib/graphql-path/types.js.map +1 -1
  108. package/build/lib/revision/revision.d.ts +1170 -1170
  109. package/build/lib/schema/schema.d.ts +708 -708
  110. package/build/lib/schema/unversioned.d.ts +1092 -1092
  111. package/build/lib/schema/versioned.d.ts +634 -634
  112. package/build/lib/semver/official-release.d.ts +10 -10
  113. package/build/lib/semver/pre-release.d.ts +10 -10
  114. package/build/lib/semver/semver.d.ts +50 -50
  115. package/build/lib/version-coverage/version-coverage.d.ts +43 -11
  116. package/build/lib/version-coverage/version-coverage.d.ts.map +1 -1
  117. package/build/lib/version-coverage/version-coverage.js +40 -6
  118. package/build/lib/version-coverage/version-coverage.js.map +1 -1
  119. package/build/template/hooks/use-examples.d.ts +1 -1
  120. package/build/template/routes/changelog/ChangelogSidebar.d.ts +2 -2
  121. package/build/template/routes/changelog/ChangelogSidebar.d.ts.map +1 -1
  122. package/build/template/routes/changelog/ChangelogSidebar.js +4 -4
  123. package/build/template/routes/changelog/ChangelogSidebar.js.map +1 -1
  124. package/build/template/routes/examples/_.d.ts +3 -3
  125. package/build/template/routes/examples/_index.d.ts +2 -2
  126. package/build/template/routes/examples/name.d.ts +3 -3
  127. package/build/template/stores/changelog.d.ts +39 -39
  128. package/build/vite/plugins/examples.d.ts.map +1 -1
  129. package/build/vite/plugins/examples.js +0 -2
  130. package/build/vite/plugins/examples.js.map +1 -1
  131. package/build/vite/plugins/schemas.d.ts.map +1 -1
  132. package/build/vite/plugins/schemas.js +38 -2
  133. package/build/vite/plugins/schemas.js.map +1 -1
  134. package/package.json +1 -1
  135. package/src/api/examples/diagnostic/diagnostic.ts +0 -3
  136. package/src/api/examples/scanner.test.ts +83 -0
  137. package/src/api/examples/scanner.ts +17 -21
  138. package/src/api/schema/augmentations/$$.ts +6 -0
  139. package/src/api/schema/augmentations/$.ts +1 -1
  140. package/src/api/schema/augmentations/apply.test.ts +89 -0
  141. package/src/api/schema/augmentations/apply.ts +277 -0
  142. package/src/api/schema/augmentations/augmentation.ts +24 -0
  143. package/src/api/schema/augmentations/config.ts +11 -0
  144. package/src/api/schema/augmentations/diagnostics/diagnostic.ts +20 -0
  145. package/src/api/schema/augmentations/diagnostics/duplicate-version.ts +20 -0
  146. package/src/api/schema/augmentations/diagnostics/invalid-path.ts +21 -0
  147. package/src/api/schema/augmentations/diagnostics/version-mismatch.ts +21 -0
  148. package/src/api/schema/augmentations/input.test.ts +144 -0
  149. package/src/api/schema/augmentations/input.ts +215 -0
  150. package/src/api/schema/augmentations/placement.ts +11 -0
  151. package/src/api/schema/config-schema.ts +2 -2
  152. package/src/api/schema/input-source/load.ts +2 -0
  153. package/src/api/schema/load.ts +19 -2
  154. package/src/lib/graphql-path/$$.ts +7 -13
  155. package/src/lib/graphql-path/$.test.ts +175 -0
  156. package/src/lib/graphql-path/definition.ts +162 -162
  157. package/src/lib/graphql-path/query.ts +15 -98
  158. package/src/lib/graphql-path/schema.ts +136 -0
  159. package/src/lib/graphql-path/types.ts +108 -28
  160. package/src/lib/version-coverage/version-coverage.ts +48 -6
  161. package/src/template/routes/changelog/ChangelogSidebar.tsx +4 -4
  162. package/src/vite/plugins/examples.ts +0 -2
  163. package/src/vite/plugins/schemas.ts +51 -2
  164. package/build/api/examples/diagnostic/unused-default.d.ts +0 -49
  165. package/build/api/examples/diagnostic/unused-default.d.ts.map +0 -1
  166. package/build/api/examples/diagnostic/unused-default.js +0 -19
  167. package/build/api/examples/diagnostic/unused-default.js.map +0 -1
  168. package/build/api/schema/augmentations/augmentations/description.d.ts +0 -26
  169. package/build/api/schema/augmentations/augmentations/description.d.ts.map +0 -1
  170. package/build/api/schema/augmentations/augmentations/description.js +0 -55
  171. package/build/api/schema/augmentations/augmentations/description.js.map +0 -1
  172. package/build/api/schema/augmentations/schema-augmentation.d.ts +0 -20
  173. package/build/api/schema/augmentations/schema-augmentation.d.ts.map +0 -1
  174. package/build/api/schema/augmentations/schema-augmentation.js +0 -22
  175. package/build/api/schema/augmentations/schema-augmentation.js.map +0 -1
  176. package/build/api/schema/augmentations/target.d.ts +0 -25
  177. package/build/api/schema/augmentations/target.d.ts.map +0 -1
  178. package/build/api/schema/augmentations/target.js +0 -39
  179. package/build/api/schema/augmentations/target.js.map +0 -1
  180. package/build/lib/graphql-path/constructors.d.ts +0 -57
  181. package/build/lib/graphql-path/constructors.d.ts.map +0 -1
  182. package/build/lib/graphql-path/constructors.js +0 -73
  183. package/build/lib/graphql-path/constructors.js.map +0 -1
  184. package/src/api/examples/diagnostic/unused-default.ts +0 -22
  185. package/src/api/schema/augmentations/augmentations/description.ts +0 -69
  186. package/src/api/schema/augmentations/schema-augmentation.ts +0 -32
  187. package/src/api/schema/augmentations/target.ts +0 -61
  188. package/src/lib/graphql-path/constructors.ts +0 -81
@@ -33,7 +33,7 @@ export declare class VersionNotFoundInDocumentError extends VersionNotFoundInDoc
33
33
  export declare const Document: S.Union<[S.TaggedStruct<"DocumentUnversioned", {
34
34
  document: typeof S.String;
35
35
  }>, S.TaggedStruct<"DocumentVersioned", {
36
- versionDocuments: S.HashMap<S.Union<[S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>, S.HashSet<S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>>]>, typeof S.String>;
36
+ versionDocuments: S.HashMap<S.Union<[typeof VersionCoverage.VersionCoverageUnversioned, S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>, S.HashSet<S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>>]>, typeof S.String>;
37
37
  }>]>;
38
38
  export type Document = typeof Document.Type;
39
39
  export declare const is: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions | number) => u is {
@@ -41,46 +41,52 @@ export declare const is: (u: unknown, overrideOptions?: import("effect/SchemaAST
41
41
  readonly document: string;
42
42
  } | {
43
43
  readonly _tag: "DocumentVersioned";
44
- readonly versionDocuments: import("effect/HashMap").HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
44
+ readonly versionDocuments: import("effect/HashMap").HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
45
45
  };
46
46
  export declare const decode: (i: {
47
47
  readonly _tag: "DocumentUnversioned";
48
48
  readonly document: string;
49
49
  } | {
50
50
  readonly _tag: "DocumentVersioned";
51
- readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[], string])[];
51
+ readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[] | {
52
+ readonly _tag: "VersionCoverageUnversioned";
53
+ }, string])[];
52
54
  }, overrideOptions?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
53
55
  readonly _tag: "DocumentUnversioned";
54
56
  readonly document: string;
55
57
  } | {
56
58
  readonly _tag: "DocumentVersioned";
57
- readonly versionDocuments: import("effect/HashMap").HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
59
+ readonly versionDocuments: import("effect/HashMap").HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
58
60
  }, import("effect/ParseResult").ParseError, never>;
59
61
  export declare const decodeSync: (i: {
60
62
  readonly _tag: "DocumentUnversioned";
61
63
  readonly document: string;
62
64
  } | {
63
65
  readonly _tag: "DocumentVersioned";
64
- readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[], string])[];
66
+ readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[] | {
67
+ readonly _tag: "VersionCoverageUnversioned";
68
+ }, string])[];
65
69
  }, overrideOptions?: import("effect/SchemaAST").ParseOptions) => {
66
70
  readonly _tag: "DocumentUnversioned";
67
71
  readonly document: string;
68
72
  } | {
69
73
  readonly _tag: "DocumentVersioned";
70
- readonly versionDocuments: import("effect/HashMap").HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
74
+ readonly versionDocuments: import("effect/HashMap").HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
71
75
  };
72
76
  export declare const encode: (a: {
73
77
  readonly _tag: "DocumentUnversioned";
74
78
  readonly document: string;
75
79
  } | {
76
80
  readonly _tag: "DocumentVersioned";
77
- readonly versionDocuments: import("effect/HashMap").HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
81
+ readonly versionDocuments: import("effect/HashMap").HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
78
82
  }, overrideOptions?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
79
83
  readonly _tag: "DocumentUnversioned";
80
84
  readonly document: string;
81
85
  } | {
82
86
  readonly _tag: "DocumentVersioned";
83
- readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[], string])[];
87
+ readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[] | {
88
+ readonly _tag: "VersionCoverageUnversioned";
89
+ }, string])[];
84
90
  }, import("effect/ParseResult").ParseError, never>;
85
91
  /**
86
92
  * Resolve document content for a given version coverage.
@@ -1 +1 @@
1
- {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/lib/document/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;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AM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAA;CAAE,EACzC,4BAA4B,GAC5B,8BAA8B,GAC9B,OAAO,CAAC,6BAA6B,GACrC,OAAO,CAAC,iBAAiB,CAiD5B,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import { S } from '#lib/kit-temp/effect';
2
+ import { VersionCoverage } from '#lib/version-coverage';
2
3
  import { Version } from '#lib/version/$';
3
4
  import { HashMap, Option } from 'effect';
4
5
  export declare const DocumentVersioned: S.TaggedStruct<"DocumentVersioned", {
@@ -8,40 +9,46 @@ export declare const DocumentVersioned: S.TaggedStruct<"DocumentVersioned", {
8
9
  * - Single version → document (e.g., v1 → "query for v1")
9
10
  * - Version set → document (e.g., {v2,v3} → "shared query")
10
11
  */
11
- versionDocuments: S.HashMap<S.Union<[S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>, S.HashSet<S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>>]>, typeof S.String>;
12
+ versionDocuments: S.HashMap<S.Union<[typeof VersionCoverage.VersionCoverageUnversioned, S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>, S.HashSet<S.transformOrFail<S.Union<[typeof S.String, typeof S.Number]>, S.Union<[typeof Version.IntegerVersion.Integer, typeof Version.SemverVersion.Semver, typeof Version.DateVersion.Date, typeof Version.CustomVersion.Custom]>, never>>]>, typeof S.String>;
12
13
  }>;
13
14
  export type DocumentVersioned = typeof DocumentVersioned.Type;
14
15
  export declare const make: (props: {
15
16
  readonly _tag?: "DocumentVersioned";
16
- readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
17
+ readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
17
18
  }, options?: S.MakeOptions) => {
18
19
  readonly _tag: "DocumentVersioned";
19
- readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
20
+ readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
20
21
  };
21
22
  export declare const is: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions | number) => u is {
22
23
  readonly _tag: "DocumentVersioned";
23
- readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
24
+ readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
24
25
  };
25
26
  export declare const decode: (i: {
26
27
  readonly _tag: "DocumentVersioned";
27
- readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[], string])[];
28
+ readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[] | {
29
+ readonly _tag: "VersionCoverageUnversioned";
30
+ }, string])[];
28
31
  }, overrideOptions?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
29
32
  readonly _tag: "DocumentVersioned";
30
- readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
33
+ readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
31
34
  }, import("effect/ParseResult").ParseError, never>;
32
35
  export declare const decodeSync: (i: {
33
36
  readonly _tag: "DocumentVersioned";
34
- readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[], string])[];
37
+ readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[] | {
38
+ readonly _tag: "VersionCoverageUnversioned";
39
+ }, string])[];
35
40
  }, overrideOptions?: import("effect/SchemaAST").ParseOptions) => {
36
41
  readonly _tag: "DocumentVersioned";
37
- readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
42
+ readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
38
43
  };
39
44
  export declare const encode: (a: {
40
45
  readonly _tag: "DocumentVersioned";
41
- readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
46
+ readonly versionDocuments: HashMap.HashMap<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver | VersionCoverage.VersionCoverageUnversioned | import("effect/HashSet").HashSet<Version.CustomVersion.Custom | Version.DateVersion.Date | Version.IntegerVersion.Integer | Version.SemverVersion.Semver>, string>;
42
47
  }, overrideOptions?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{
43
48
  readonly _tag: "DocumentVersioned";
44
- readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[], string])[];
49
+ readonly versionDocuments: readonly (readonly [string | number | readonly (string | number)[] | {
50
+ readonly _tag: "VersionCoverageUnversioned";
51
+ }, string])[];
45
52
  }, import("effect/ParseResult").ParseError, never>;
46
53
  /**
47
54
  * Get document for a specific version
@@ -1 +1 @@
1
- {"version":3,"file":"versioned.d.ts","sourceRoot":"","sources":["../../../src/lib/document/versioned.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,sBAAsB,CAAA;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAA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AAM,UAAU;;;;;;;;CAAkC,CAAA;AACzD,eAAO,MAAM,MAAM;;;;;;;;kDAA8B,CAAA;AAMjD;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,KAAK,iBAAiB,EACtB,SAAS,OAAO,CAAC,OAAO,KACvB,MAAM,CAAC,MAAM,CAAC,MAAM,CAetB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,KAAK,iBAAiB,KAAG,OAAO,CAAC,OAAO,EAQtE,CAAA;AACD;;GAEG;AACH,eAAO,MAAM,iCAAiC,GAAI,KAAK,iBAAiB,KAAG,MAe1E,CAAA"}
@@ -15,5 +15,5 @@ export declare const Name: {
15
15
  export type KindName = keyof KindMap[`list`];
16
16
  export declare const getKindMap: (schema: Schema) => KindMap;
17
17
  export declare const hasCustomScalars: (typeMapByKind: KindMap) => boolean;
18
- export declare const getInterfaceImplementors: (typeMap: KindMap, interfaceTypeSearch: GraphQLInterfaceType) => (GraphQLInterfaceType | Type.Object<any, any>)[];
18
+ export declare const getInterfaceImplementors: (typeMap: KindMap, interfaceTypeSearch: GraphQLInterfaceType) => (Type.Object<any, any> | GraphQLInterfaceType)[];
19
19
  //# sourceMappingURL=_.d.ts.map
@@ -22,21 +22,15 @@
22
22
  * const encoded = GraphQLPath.Definition.encode(userNameFieldPath) // "User.name"
23
23
  * const decoded = GraphQLPath.Definition.decode("User.name") // field definition path
24
24
  *
25
- * // Create a query path
26
- * const queryPath = GraphQLPath.Query.builder()
27
- * .type('User')
28
- * .field('posts')
29
- * .type('Post')
30
- * .field('author')
31
- * .type('User')
32
- * .field('name')
33
- * .build()
34
- *
35
- * // Encode/decode query paths
36
- * const encodedQuery = GraphQLPath.Query.encode(queryPath) // "User.posts.Post.author.User.name"
37
- * const decodedQuery = GraphQLPath.Query.decode("User.posts.Post.author") // query path
25
+ * // Decode a query path from a string
26
+ * const queryPath = GraphQLPath.Query.decode("User.posts.Post.author.User.name")
27
+ * // Returns array of segments: [TypeSegment, FieldSegment, TypeSegment, FieldSegment, ...]
28
+ *
29
+ * // Encode query path segments to a string
30
+ * const encoded = GraphQLPath.Query.encode(queryPath) // "User.posts.Post.author.User.name"
38
31
  * ```
39
32
  */
40
33
  export * as Definition from './definition.js';
41
34
  export * as Query from './query.js';
35
+ export * as Schema from './schema.js';
42
36
  //# sourceMappingURL=$$.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-path/$$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-path/$$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA"}
@@ -22,21 +22,15 @@
22
22
  * const encoded = GraphQLPath.Definition.encode(userNameFieldPath) // "User.name"
23
23
  * const decoded = GraphQLPath.Definition.decode("User.name") // field definition path
24
24
  *
25
- * // Create a query path
26
- * const queryPath = GraphQLPath.Query.builder()
27
- * .type('User')
28
- * .field('posts')
29
- * .type('Post')
30
- * .field('author')
31
- * .type('User')
32
- * .field('name')
33
- * .build()
34
- *
35
- * // Encode/decode query paths
36
- * const encodedQuery = GraphQLPath.Query.encode(queryPath) // "User.posts.Post.author.User.name"
37
- * const decodedQuery = GraphQLPath.Query.decode("User.posts.Post.author") // query path
25
+ * // Decode a query path from a string
26
+ * const queryPath = GraphQLPath.Query.decode("User.posts.Post.author.User.name")
27
+ * // Returns array of segments: [TypeSegment, FieldSegment, TypeSegment, FieldSegment, ...]
28
+ *
29
+ * // Encode query path segments to a string
30
+ * const encoded = GraphQLPath.Query.encode(queryPath) // "User.posts.Post.author.User.name"
38
31
  * ```
39
32
  */
40
33
  export * as Definition from './definition.js';
41
34
  export * as Query from './query.js';
35
+ export * as Schema from './schema.js';
42
36
  //# sourceMappingURL=$$.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"$$.js","sourceRoot":"","sources":["../../../src/lib/graphql-path/$$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"$$.js","sourceRoot":"","sources":["../../../src/lib/graphql-path/$$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA"}
@@ -1,152 +1,162 @@
1
1
  /**
2
- * Definition path operations
3
- */
4
- import type { ArgumentSegment, FieldSegment, TypeSegment } from '#lib/graphql-path/types';
5
- /**
6
- * Encode a definition path to a human-readable expression string
7
- *
8
- * @param path - The definition path to encode
9
- * @returns A string expression representation
10
- * @example
11
- * encode(field('User', 'name')) // 'User.name'
12
- * encode(argument('User', 'posts', 'limit')) // 'User.posts(limit)'
13
- */
14
- export declare const encode: (path: DefinitionPath) => string;
2
+ * Definition path operations using Effect Schema transforms
3
+ */
4
+ import { S } from '#lib/kit-temp/effect';
5
+ /**
6
+ * Type definition path codec
7
+ * Encoded: "User"
8
+ * Decoded: [{ _tag: 'TypeSegment', type: 'User' }]
9
+ */
10
+ export declare const TypeDefinitionPath: S.transformOrFail<typeof S.String, S.Tuple<[S.TaggedStruct<"TypeSegment", {
11
+ type: typeof S.String;
12
+ }>]>, never>;
13
+ /**
14
+ * Field definition path codec
15
+ * Encoded: "User.name"
16
+ * Decoded: [{ _tag: 'TypeSegment', type: 'User' }, { _tag: 'FieldSegment', field: 'name' }]
17
+ */
18
+ export declare const FieldDefinitionPath: S.transformOrFail<typeof S.String, S.Tuple2<S.TaggedStruct<"TypeSegment", {
19
+ type: typeof S.String;
20
+ }>, S.TaggedStruct<"FieldSegment", {
21
+ field: typeof S.String;
22
+ }>>, never>;
23
+ /**
24
+ * Argument definition path codec
25
+ * Encoded: "User.posts(limit)"
26
+ * Decoded: [{ _tag: 'TypeSegment', type: 'User' }, { _tag: 'FieldSegment', field: 'posts' }, { _tag: 'ArgumentSegment', argument: 'limit' }]
27
+ */
28
+ export declare const ArgumentDefinitionPath: S.transformOrFail<typeof S.String, S.Tuple<[S.TaggedStruct<"TypeSegment", {
29
+ type: typeof S.String;
30
+ }>, S.TaggedStruct<"FieldSegment", {
31
+ field: typeof S.String;
32
+ }>, S.TaggedStruct<"ArgumentSegment", {
33
+ argument: typeof S.String;
34
+ }>]>, never>;
35
+ /**
36
+ * Union of all definition paths
37
+ * Automatically determines the correct path type from the string format
38
+ */
39
+ export declare const DefinitionPath: S.Union<[S.transformOrFail<typeof S.String, S.Tuple<[S.TaggedStruct<"TypeSegment", {
40
+ type: typeof S.String;
41
+ }>, S.TaggedStruct<"FieldSegment", {
42
+ field: typeof S.String;
43
+ }>, S.TaggedStruct<"ArgumentSegment", {
44
+ argument: typeof S.String;
45
+ }>]>, never>, S.transformOrFail<typeof S.String, S.Tuple2<S.TaggedStruct<"TypeSegment", {
46
+ type: typeof S.String;
47
+ }>, S.TaggedStruct<"FieldSegment", {
48
+ field: typeof S.String;
49
+ }>>, never>, S.transformOrFail<typeof S.String, S.Tuple<[S.TaggedStruct<"TypeSegment", {
50
+ type: typeof S.String;
51
+ }>]>, never>]>;
52
+ export type TypeDefinitionPath = S.Schema.Type<typeof TypeDefinitionPath>;
53
+ export type FieldDefinitionPath = S.Schema.Type<typeof FieldDefinitionPath>;
54
+ export type ArgumentDefinitionPath = S.Schema.Type<typeof ArgumentDefinitionPath>;
55
+ export type DefinitionPath = S.Schema.Type<typeof DefinitionPath>;
15
56
  /**
16
57
  * Decode a string expression into a definition path
17
- *
18
58
  * @param expression - The string expression to decode
19
- * @returns The decoded definition path or null if invalid
59
+ * @returns The decoded definition path
20
60
  * @example
21
61
  * decode('User') // type definition path
22
62
  * decode('User.name') // field definition path
23
63
  * decode('User.posts(limit)') // argument definition path
24
64
  */
25
- export declare const decode: (expression: string) => DefinitionPath | null;
65
+ export declare const decodeSync: (u: unknown, overrideOptions?: import("effect/SchemaAST").ParseOptions) => readonly [{
66
+ readonly _tag: "TypeSegment";
67
+ readonly type: string;
68
+ }] | readonly [{
69
+ readonly _tag: "TypeSegment";
70
+ readonly type: string;
71
+ }, {
72
+ readonly _tag: "FieldSegment";
73
+ readonly field: string;
74
+ }] | readonly [{
75
+ readonly _tag: "TypeSegment";
76
+ readonly type: string;
77
+ }, {
78
+ readonly _tag: "FieldSegment";
79
+ readonly field: string;
80
+ }, {
81
+ readonly _tag: "ArgumentSegment";
82
+ readonly argument: string;
83
+ }];
84
+ /**
85
+ * Encode a definition path to a string expression
86
+ * @param path - The definition path to encode
87
+ * @returns A string expression representation
88
+ * @example
89
+ * encode([{ _tag: 'TypeSegment', type: 'User' }]) // 'User'
90
+ * encode([{ _tag: 'TypeSegment', type: 'User' }, { _tag: 'FieldSegment', field: 'name' }]) // 'User.name'
91
+ */
92
+ export declare const encodeSync: (a: readonly [{
93
+ readonly _tag: "TypeSegment";
94
+ readonly type: string;
95
+ }] | readonly [{
96
+ readonly _tag: "TypeSegment";
97
+ readonly type: string;
98
+ }, {
99
+ readonly _tag: "FieldSegment";
100
+ readonly field: string;
101
+ }] | readonly [{
102
+ readonly _tag: "TypeSegment";
103
+ readonly type: string;
104
+ }, {
105
+ readonly _tag: "FieldSegment";
106
+ readonly field: string;
107
+ }, {
108
+ readonly _tag: "ArgumentSegment";
109
+ readonly argument: string;
110
+ }], overrideOptions?: import("effect/SchemaAST").ParseOptions) => string;
26
111
  /**
27
112
  * Extract the type name from any definition path
28
- *
29
113
  * @param path - The definition path
30
114
  * @returns The type name
31
- * @example getType([{ kind: 'type', type: 'User' }]) // 'User'
32
115
  */
33
116
  export declare const getType: (path: DefinitionPath) => string;
34
117
  /**
35
118
  * Extract the field name from a field or argument definition path
36
- *
37
119
  * @param path - The field or argument definition path
38
120
  * @returns The field name
39
- * @example getField([{ kind: 'type', type: 'User' }, { kind: 'field', field: 'name' }]) // 'name'
40
121
  */
41
122
  export declare const getField: (path: FieldDefinitionPath | ArgumentDefinitionPath) => string;
42
123
  /**
43
124
  * Extract the argument name from an argument definition path
44
- *
45
125
  * @param path - The argument definition path
46
126
  * @returns The argument name
47
- * @example getArgument([{ kind: 'type', type: 'User' }, { kind: 'field', field: 'posts' }, { kind: 'argument', argument: 'limit' }]) // 'limit'
48
127
  */
49
128
  export declare const getArgument: (path: ArgumentDefinitionPath) => string;
50
- /**
51
- * Parse field path like "User.email" into type and field names
52
- */
53
- export declare const parseFieldPath: (path?: string) => {
54
- typeName: string | null;
55
- fieldName: string | null;
56
- };
57
- /**
58
- * Definition paths - direct paths to schema definition elements
59
- * These represent the "address" of a specific schema element
60
- */
61
- export type DefinitionPath = TypeDefinitionPath | FieldDefinitionPath | ArgumentDefinitionPath;
62
- /**
63
- * Path to a type definition
64
- * @example [{ kind: 'type', type: 'User' }]
65
- */
66
- export type TypeDefinitionPath = [TypeSegment];
67
- /**
68
- * Path to a field definition (type + field)
69
- * @example [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'name' }]
70
- */
71
- export type FieldDefinitionPath = [TypeSegment, FieldSegment];
72
- /**
73
- * Path to an argument definition (type + field + argument)
74
- * @example [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'posts' }, { kind: 'argument', argument: 'limit' }]
75
- */
76
- export type ArgumentDefinitionPath = [TypeSegment, FieldSegment, ArgumentSegment];
77
129
  /**
78
130
  * Type guard to check if a path is a type definition path
79
- *
80
- * @param path - The path to check
81
- * @returns True if the path is a type definition path
82
131
  */
83
132
  export declare const isTypeDefinitionPath: (path: DefinitionPath) => path is TypeDefinitionPath;
84
133
  /**
85
134
  * Type guard to check if a path is a field definition path
86
- *
87
- * @param path - The path to check
88
- * @returns True if the path is a field definition path
89
135
  */
90
136
  export declare const isFieldDefinitionPath: (path: DefinitionPath) => path is FieldDefinitionPath;
91
137
  /**
92
138
  * Type guard to check if a path is an argument definition path
93
- *
94
- * @param path - The path to check
95
- * @returns True if the path is an argument definition path
96
139
  */
97
140
  export declare const isArgumentDefinitionPath: (path: DefinitionPath) => path is ArgumentDefinitionPath;
98
- /**
99
- * Create a path to a type definition
100
- *
101
- * @param type - The type name
102
- * @returns A type definition path
103
- * @example createTypeDefinitionPath('User') // [{ kind: 'type', type: 'User' }]
104
- */
105
- export declare const createTypeDefinitionPath: (type: string) => TypeDefinitionPath;
106
- /**
107
- * Create a path to a field definition
108
- *
109
- * @param type - The type name
110
- * @param field - The field name
111
- * @returns A field definition path
112
- * @example createFieldDefinitionPath('User', 'name') // [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'name' }]
113
- */
114
- export declare const createFieldDefinitionPath: (type: string, field: string) => FieldDefinitionPath;
115
- /**
116
- * Create a path to an argument definition
117
- *
118
- * @param type - The type name
119
- * @param field - The field name
120
- * @param argument - The argument name
121
- * @returns An argument definition path
122
- * @example createArgumentDefinitionPath('User', 'posts', 'limit') // [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'posts' }, { kind: 'argument', argument: 'limit' }]
123
- */
124
- export declare const createArgumentDefinitionPath: (type: string, field: string, argument: string) => ArgumentDefinitionPath;
125
141
  /**
126
142
  * Create a type definition path
127
- *
128
143
  * @param type - The type name
129
144
  * @returns A type definition path
130
- * @example type('User') // [{ kind: 'type', type: 'User' }]
131
145
  */
132
- export declare const type: (type: string) => TypeDefinitionPath;
146
+ export declare const type: (typeName: string) => TypeDefinitionPath;
133
147
  /**
134
148
  * Create a field definition path
135
- *
136
149
  * @param type - The type name
137
150
  * @param field - The field name
138
151
  * @returns A field definition path
139
- * @example field('User', 'name') // [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'name' }]
140
152
  */
141
- export declare const field: (type: string, field: string) => FieldDefinitionPath;
153
+ export declare const field: (typeName: string, fieldName: string) => FieldDefinitionPath;
142
154
  /**
143
155
  * Create an argument definition path
144
- *
145
156
  * @param type - The type name
146
157
  * @param field - The field name
147
158
  * @param argument - The argument name
148
159
  * @returns An argument definition path
149
- * @example argument('User', 'posts', 'limit') // [{ kind: 'type', type: 'User' }, { kind: 'field', field: 'posts' }, { kind: 'argument', argument: 'limit' }]
150
160
  */
151
- export declare const argument: (type: string, field: string, argument: string) => ArgumentDefinitionPath;
161
+ export declare const argument: (typeName: string, fieldName: string, argumentName: string) => ArgumentDefinitionPath;
152
162
  //# sourceMappingURL=definition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../src/lib/graphql-path/definition.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEzF;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,GAAI,MAAM,cAAc,KAAG,MAS7C,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,GAAI,YAAY,MAAM,KAAG,cAAc,GAAG,IAwB5D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAAI,MAAM,cAAc,KAAG,MAE9C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAM,mBAAmB,GAAG,sBAAsB,KAAG,MAE7E,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,sBAAsB,KAAG,MAE1D,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,GA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