@proposit/shared 0.9.0 → 0.11.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.
Files changed (43) hide show
  1. package/dist/api-client/argument/batch.d.ts +39 -0
  2. package/dist/api-client/argument/batch.d.ts.map +1 -1
  3. package/dist/api-client/argument/claims.d.ts +65 -0
  4. package/dist/api-client/argument/claims.d.ts.map +1 -1
  5. package/dist/api-client/argument/index.d.ts +169 -0
  6. package/dist/api-client/argument/index.d.ts.map +1 -1
  7. package/dist/api-client/argument/logic/index.d.ts +221 -0
  8. package/dist/api-client/argument/logic/index.d.ts.map +1 -1
  9. package/dist/api-client/argument/logic/repair.d.ts +13 -0
  10. package/dist/api-client/argument/logic/repair.d.ts.map +1 -1
  11. package/dist/api-client/argument/reactions.d.ts +26 -0
  12. package/dist/api-client/argument/reactions.d.ts.map +1 -1
  13. package/dist/api-client/argument/reviews.d.ts +78 -0
  14. package/dist/api-client/argument/reviews.d.ts.map +1 -1
  15. package/dist/api-client/grammar-violations.d.ts +3 -0
  16. package/dist/api-client/grammar-violations.d.ts.map +1 -0
  17. package/dist/api-client/grammar-violations.js +16 -0
  18. package/dist/api-client/grammar-violations.js.map +1 -0
  19. package/dist/api-client/index.d.ts +1 -0
  20. package/dist/api-client/index.d.ts.map +1 -1
  21. package/dist/api-client/index.js +1 -0
  22. package/dist/api-client/index.js.map +1 -1
  23. package/dist/api-client/search.d.ts +39 -0
  24. package/dist/api-client/search.d.ts.map +1 -1
  25. package/dist/api-client/user/citations.d.ts +13 -0
  26. package/dist/api-client/user/citations.d.ts.map +1 -1
  27. package/dist/api-client/user/claims.d.ts +13 -0
  28. package/dist/api-client/user/claims.d.ts.map +1 -1
  29. package/dist/api-client/user/delete-user.d.ts +14 -0
  30. package/dist/api-client/user/delete-user.d.ts.map +1 -1
  31. package/dist/schemas/api/user/index.d.ts +2 -1
  32. package/dist/schemas/api/user/index.d.ts.map +1 -1
  33. package/dist/schemas/api/user/index.js +5 -1
  34. package/dist/schemas/api/user/index.js.map +1 -1
  35. package/dist/schemas/model/users.d.ts +1 -0
  36. package/dist/schemas/model/users.d.ts.map +1 -1
  37. package/dist/schemas/model/users.js +7 -0
  38. package/dist/schemas/model/users.js.map +1 -1
  39. package/dist/utils/utils.d.ts +15 -1
  40. package/dist/utils/utils.d.ts.map +1 -1
  41. package/dist/utils/utils.js +10 -0
  42. package/dist/utils/utils.js.map +1 -1
  43. package/package.json +1 -1
@@ -4,6 +4,19 @@ export declare function getMyReviewImpl(config: TApiClientConfig, argumentId: st
4
4
  errorID: import("typebox").TNumber;
5
5
  errorMessage: import("typebox").TString;
6
6
  statusCode: import("typebox").TNumber;
7
+ }>> | import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
8
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
9
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
10
+ violations: import("typebox").TArray<import("typebox").TObject<{
11
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
12
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
13
+ message: import("typebox").TString;
14
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
15
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
16
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
17
+ variableId: import("typebox").TOptional<import("typebox").TString>;
18
+ claimId: import("typebox").TOptional<import("typebox").TString>;
19
+ }>>;
7
20
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TObject<{
8
21
  review: import("typebox").TObject<{
9
22
  id: import("typebox").TString;
@@ -43,6 +56,19 @@ export declare function createReviewRemoteImpl(config: TApiClientConfig, argumen
43
56
  errorID: import("typebox").TNumber;
44
57
  errorMessage: import("typebox").TString;
45
58
  statusCode: import("typebox").TNumber;
59
+ }>> | import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
60
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
61
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
62
+ violations: import("typebox").TArray<import("typebox").TObject<{
63
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
64
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
65
+ message: import("typebox").TString;
66
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
67
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
68
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
69
+ variableId: import("typebox").TOptional<import("typebox").TString>;
70
+ claimId: import("typebox").TOptional<import("typebox").TString>;
71
+ }>>;
46
72
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TObject<{
47
73
  review: import("typebox").TObject<{
48
74
  id: import("typebox").TString;
@@ -75,6 +101,19 @@ export declare function getReviewByIdRemoteImpl(config: TApiClientConfig, argume
75
101
  errorID: import("typebox").TNumber;
76
102
  errorMessage: import("typebox").TString;
77
103
  statusCode: import("typebox").TNumber;
104
+ }>> | import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
105
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
106
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
107
+ violations: import("typebox").TArray<import("typebox").TObject<{
108
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
109
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
110
+ message: import("typebox").TString;
111
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
112
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
113
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
114
+ variableId: import("typebox").TOptional<import("typebox").TString>;
115
+ claimId: import("typebox").TOptional<import("typebox").TString>;
116
+ }>>;
78
117
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TObject<{
79
118
  review: import("typebox").TObject<{
80
119
  id: import("typebox").TString;
@@ -114,6 +153,19 @@ export declare function patchReviewRemoteImpl(config: TApiClientConfig, argument
114
153
  errorID: import("typebox").TNumber;
115
154
  errorMessage: import("typebox").TString;
116
155
  statusCode: import("typebox").TNumber;
156
+ }>> | import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
157
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
158
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
159
+ violations: import("typebox").TArray<import("typebox").TObject<{
160
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
161
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
162
+ message: import("typebox").TString;
163
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
164
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
165
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
166
+ variableId: import("typebox").TOptional<import("typebox").TString>;
167
+ claimId: import("typebox").TOptional<import("typebox").TString>;
168
+ }>>;
117
169
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TObject<{
118
170
  review: import("typebox").TObject<{
119
171
  id: import("typebox").TString;
@@ -146,6 +198,19 @@ export declare function deleteReviewRemoteImpl(config: TApiClientConfig, argumen
146
198
  errorID: import("typebox").TNumber;
147
199
  errorMessage: import("typebox").TString;
148
200
  statusCode: import("typebox").TNumber;
201
+ }>> | import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
202
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
203
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
204
+ violations: import("typebox").TArray<import("typebox").TObject<{
205
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
206
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
207
+ message: import("typebox").TString;
208
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
209
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
210
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
211
+ variableId: import("typebox").TOptional<import("typebox").TString>;
212
+ claimId: import("typebox").TOptional<import("typebox").TString>;
213
+ }>>;
149
214
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TObject<{
150
215
  success: import("typebox").TLiteral<true>;
151
216
  }>>>;
@@ -153,6 +218,19 @@ export declare function setReviewVisibilityImpl(config: TApiClientConfig, argume
153
218
  errorID: import("typebox").TNumber;
154
219
  errorMessage: import("typebox").TString;
155
220
  statusCode: import("typebox").TNumber;
221
+ }>> | import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
222
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
223
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
224
+ violations: import("typebox").TArray<import("typebox").TObject<{
225
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
226
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
227
+ message: import("typebox").TString;
228
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
229
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
230
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
231
+ variableId: import("typebox").TOptional<import("typebox").TString>;
232
+ claimId: import("typebox").TOptional<import("typebox").TString>;
233
+ }>>;
156
234
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TObject<{
157
235
  review: import("typebox").TObject<{
158
236
  id: import("typebox").TString;
@@ -1 +1 @@
1
- {"version":3,"file":"reviews.d.ts","sourceRoot":"","sources":["../../../src/api-client/argument/reviews.ts"],"names":[],"mappings":"AAAA,OAAO,EASH,KAAK,oBAAoB,EAC5B,MAAM,mCAAmC,CAAA;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGpD,wBAAsB,eAAe,CACjC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAUlB;AAED,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAWlB;AAED,wBAAsB,uBAAuB,CACzC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAUnB;AAED,wBAAsB,qBAAqB,CACvC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW7B;AAED,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;KAUnB;AAED,wBAAsB,uBAAuB,CACzC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAWpB"}
@@ -0,0 +1,3 @@
1
+ import type { TGrammarViolationsResponse } from "../schemas/api/grammar-violations.js";
2
+ export declare function isGrammarViolationsError(err: unknown): err is TGrammarViolationsResponse;
3
+ //# sourceMappingURL=grammar-violations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grammar-violations.d.ts","sourceRoot":"","sources":["../../src/api-client/grammar-violations.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAA;AAEtF,wBAAgB,wBAAwB,CACpC,GAAG,EAAE,OAAO,GACb,GAAG,IAAI,0BAA0B,CAMnC"}
@@ -0,0 +1,16 @@
1
+ // Discriminator helper for the 422 grammar-violations envelope returned by
2
+ // server endpoints that fail a grammar-tier gate (submit/save in assistive,
3
+ // publish in either mode). Lets clients narrow an unknown error value to
4
+ // `TGrammarViolationsResponse` without re-parsing the response shape.
5
+ //
6
+ // Sits next to `parseResponse`'s overload form: when a callsite passes
7
+ // `GrammarViolationsResponseSchema` as the third generic, `result.error` is
8
+ // already typed. Use this guard when the error originates from a wider union
9
+ // (e.g. caught `unknown`, or a `TErrorResponse | TGrammarViolationsResponse`
10
+ // boundary) and a runtime check is needed.
11
+ export function isGrammarViolationsError(err) {
12
+ return (typeof err === "object" &&
13
+ err !== null &&
14
+ err.error === "GRAMMAR_VIOLATIONS");
15
+ }
16
+ //# sourceMappingURL=grammar-violations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grammar-violations.js","sourceRoot":"","sources":["../../src/api-client/grammar-violations.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,4EAA4E;AAC5E,yEAAyE;AACzE,sEAAsE;AACtE,EAAE;AACF,uEAAuE;AACvE,4EAA4E;AAC5E,6EAA6E;AAC7E,6EAA6E;AAC7E,2CAA2C;AAI3C,MAAM,UAAU,wBAAwB,CACpC,GAAY;IAEZ,OAAO,CACH,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACX,GAA2B,CAAC,KAAK,KAAK,oBAAoB,CAC9D,CAAA;AACL,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { createApiClient } from "./factory.js";
2
2
  export type { TApiClient } from "./factory.js";
3
3
  export type { TApiClientConfig } from "./config.js";
4
+ export { isGrammarViolationsError } from "./grammar-violations.js";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,2 +1,3 @@
1
1
  export { createApiClient } from "./factory.js";
2
+ export { isGrammarViolationsError } from "./grammar-violations.js";
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAG9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA"}
@@ -3,6 +3,19 @@ export declare function searchUserClaimsImpl(config: TApiClientConfig, query: st
3
3
  errorID: import("typebox").TNumber;
4
4
  errorMessage: import("typebox").TString;
5
5
  statusCode: import("typebox").TNumber;
6
+ }>> | import("../schemas/common.js").ParsedError<import("typebox").TObject<{
7
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
8
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
9
+ violations: import("typebox").TArray<import("typebox").TObject<{
10
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
11
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
12
+ message: import("typebox").TString;
13
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
14
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
15
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
16
+ variableId: import("typebox").TOptional<import("typebox").TString>;
17
+ claimId: import("typebox").TOptional<import("typebox").TString>;
18
+ }>>;
6
19
  }>> | import("../schemas/common.js").ParsedSuccess<import("typebox").TArray<import("typebox").TObject<{
7
20
  id: import("typebox").TString;
8
21
  argumentId: import("typebox").TString;
@@ -16,6 +29,19 @@ export declare function searchUserCitationsImpl(config: TApiClientConfig, query:
16
29
  errorID: import("typebox").TNumber;
17
30
  errorMessage: import("typebox").TString;
18
31
  statusCode: import("typebox").TNumber;
32
+ }>> | import("../schemas/common.js").ParsedError<import("typebox").TObject<{
33
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
34
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
35
+ violations: import("typebox").TArray<import("typebox").TObject<{
36
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
37
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
38
+ message: import("typebox").TString;
39
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
40
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
41
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
42
+ variableId: import("typebox").TOptional<import("typebox").TString>;
43
+ claimId: import("typebox").TOptional<import("typebox").TString>;
44
+ }>>;
19
45
  }>> | import("../schemas/common.js").ParsedSuccess<import("typebox").TArray<import("typebox").TObject<{
20
46
  id: import("typebox").TString;
21
47
  citation: import("typebox").TAny;
@@ -28,6 +54,19 @@ export declare function searchUserEntitiesImpl(config: TApiClientConfig, query:
28
54
  errorID: import("typebox").TNumber;
29
55
  errorMessage: import("typebox").TString;
30
56
  statusCode: import("typebox").TNumber;
57
+ }>> | import("../schemas/common.js").ParsedError<import("typebox").TObject<{
58
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
59
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
60
+ violations: import("typebox").TArray<import("typebox").TObject<{
61
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
62
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
63
+ message: import("typebox").TString;
64
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
65
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
66
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
67
+ variableId: import("typebox").TOptional<import("typebox").TString>;
68
+ claimId: import("typebox").TOptional<import("typebox").TString>;
69
+ }>>;
31
70
  }>> | import("../schemas/common.js").ParsedSuccess<import("typebox").TObject<{
32
71
  arguments: import("typebox").TArray<import("typebox").TObject<{
33
72
  id: import("typebox").TString;
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/api-client/search.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAGnD,wBAAsB,oBAAoB,CACtC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,EACb,KAAK,SAAK,EACV,UAAU,CAAC,EAAE,MAAM;;;;;;;;;;;;MActB;AAED,wBAAsB,uBAAuB,CACzC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,EACb,KAAK,SAAK;;;;;;;;;;;MAab;AAED,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,KAAK,SAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAcb"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/api-client/search.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAGnD,wBAAsB,oBAAoB,CACtC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,EACb,KAAK,SAAK,EACV,UAAU,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;MActB;AAED,wBAAsB,uBAAuB,CACzC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,EACb,KAAK,SAAK;;;;;;;;;;;;;;;;;;;;;;;;MAab;AAED,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,KAAK,SAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAcb"}
@@ -3,6 +3,19 @@ export declare function getUserCitationsImpl(config: TApiClientConfig): Promise<
3
3
  errorID: import("typebox").TNumber;
4
4
  errorMessage: import("typebox").TString;
5
5
  statusCode: import("typebox").TNumber;
6
+ }>> | import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
7
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
8
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
9
+ violations: import("typebox").TArray<import("typebox").TObject<{
10
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
11
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
12
+ message: import("typebox").TString;
13
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
14
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
15
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
16
+ variableId: import("typebox").TOptional<import("typebox").TString>;
17
+ claimId: import("typebox").TOptional<import("typebox").TString>;
18
+ }>>;
6
19
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TArray<import("typebox").TObject<{
7
20
  citation: import("typebox").TUnion<[import("typebox").TObject<{
8
21
  digest: import("typebox").TString;
@@ -1 +1 @@
1
- {"version":3,"file":"citations.d.ts","sourceRoot":"","sources":["../../../src/api-client/user/citations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGpD,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQlE"}
@@ -3,6 +3,19 @@ export declare function getUserClaimsImpl(config: TApiClientConfig, argumentId?:
3
3
  errorID: import("typebox").TNumber;
4
4
  errorMessage: import("typebox").TString;
5
5
  statusCode: import("typebox").TNumber;
6
+ }>> | import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
7
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
8
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
9
+ violations: import("typebox").TArray<import("typebox").TObject<{
10
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
11
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
12
+ message: import("typebox").TString;
13
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
14
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
15
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
16
+ variableId: import("typebox").TOptional<import("typebox").TString>;
17
+ claimId: import("typebox").TOptional<import("typebox").TString>;
18
+ }>>;
6
19
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TArray<import("typebox").TObject<{
7
20
  claim: import("typebox").TUnion<[import("typebox").TObject<{
8
21
  digest: import("typebox").TString;
@@ -1 +1 @@
1
- {"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../src/api-client/user/claims.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGpD,wBAAsB,iBAAiB,CACnC,MAAM,EAAE,gBAAgB,EACxB,UAAU,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYtB"}
@@ -3,6 +3,19 @@ export declare function deleteUserImpl(config: TApiClientConfig): Promise<import
3
3
  errorID: import("typebox").TNumber;
4
4
  errorMessage: import("typebox").TString;
5
5
  statusCode: import("typebox").TNumber;
6
+ }>> | import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
7
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
8
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
9
+ violations: import("typebox").TArray<import("typebox").TObject<{
10
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
11
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
12
+ message: import("typebox").TString;
13
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
14
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
15
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
16
+ variableId: import("typebox").TOptional<import("typebox").TString>;
17
+ claimId: import("typebox").TOptional<import("typebox").TString>;
18
+ }>>;
6
19
  }>> | import("../../schemas/common.js").ParsedSuccess<import("typebox").TObject<{
7
20
  id: import("typebox").TString;
8
21
  name: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
@@ -16,5 +29,6 @@ export declare function deleteUserImpl(config: TApiClientConfig): Promise<import
16
29
  tokenResetOn: import("../../schemas/common.js").TDateType;
17
30
  deleted: import("typebox").TBoolean;
18
31
  registrationDate: import("../../schemas/common.js").TDateType;
32
+ advancedMode: import("typebox").TBoolean;
19
33
  }>>>;
20
34
  //# sourceMappingURL=delete-user.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-user.d.ts","sourceRoot":"","sources":["../../../src/api-client/user/delete-user.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGpD,wBAAsB,cAAc,CAAC,MAAM,EAAE,gBAAgB;;;;;;;;;;;;;;;;;KAQ5D"}
1
+ {"version":3,"file":"delete-user.d.ts","sourceRoot":"","sources":["../../../src/api-client/user/delete-user.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGpD,wBAAsB,cAAc,CAAC,MAAM,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQ5D"}
@@ -8,7 +8,8 @@ export declare const UsernameSearchResponse: Type.TObject<{
8
8
  imageURI: Type.TUnion<[Type.TString, Type.TNull]>;
9
9
  }>;
10
10
  export declare const UserModifyRequest: Type.TObject<{
11
- username: Type.TString;
11
+ username: Type.TOptional<Type.TString>;
12
+ advancedMode: Type.TOptional<Type.TBoolean>;
12
13
  }>;
13
14
  export type TUserModifyRequest = Static<typeof UserModifyRequest>;
14
15
  export type TUsernameSearchRequest = Static<typeof UsernameSearchRequest>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/api/user/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAE3C,eAAO,MAAM,qBAAqB;;EAEhC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;EAIjC,CAAA;AAEF,eAAO,MAAM,iBAAiB;;EAE5B,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA;AACjE,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACzE,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/api/user/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAE3C,eAAO,MAAM,qBAAqB;;EAEhC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;EAIjC,CAAA;AAKF,eAAO,MAAM,iBAAiB;;;EAG5B,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA;AACjE,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACzE,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
@@ -9,7 +9,11 @@ export const UsernameSearchResponse = Type.Object({
9
9
  username: Type.String(),
10
10
  imageURI: Nullable(Type.String()),
11
11
  });
12
+ // Body for `PUT /api/v1/user/me`. Both fields are optional — the request shape
13
+ // is "any one writable field" rather than always-username. Server validates
14
+ // that at least one writable field was provided (out-of-schema concern).
12
15
  export const UserModifyRequest = Type.Object({
13
- username: Type.String(),
16
+ username: Type.Optional(Type.String()),
17
+ advancedMode: Type.Optional(Type.Boolean()),
14
18
  });
15
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/api/user/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAe,MAAM,SAAS,CAAA;AAE3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;CACpC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schemas/api/user/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAe,MAAM,SAAS,CAAA;AAE3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;IACvB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;CACpC,CAAC,CAAA;AAEF,+EAA+E;AAC/E,4EAA4E;AAC5E,yEAAyE;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACtC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;CAC9C,CAAC,CAAA"}
@@ -34,6 +34,7 @@ export declare const UserSchema: Type.TObject<{
34
34
  tokenResetOn: import("../common.js").TDateType;
35
35
  deleted: Type.TBoolean;
36
36
  registrationDate: import("../common.js").TDateType;
37
+ advancedMode: Type.TBoolean;
37
38
  }>;
38
39
  export type TUser = Static<typeof UserSchema>;
39
40
  export declare const UserPublicFieldsSchema: Type.TObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/schemas/model/users.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AAGhE,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AAA;AACF,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAC9C,OAAO,kCAAkC,CAC5C,CAAA;AAED,eAAO,MAAM,yCAAyC;;;;;;EAMpD,CAAA;AACF,MAAM,MAAM,oCAAoC,GAAG,MAAM,CACrD,OAAO,yCAAyC,CACnD,CAAA"}
@@ -33,6 +33,13 @@ export const UserSchema = Type.Object({
33
33
  tokenResetOn: EncodableDate,
34
34
  deleted: Type.Boolean(),
35
35
  registrationDate: EncodableDate,
36
+ // Per-user grammar-tiers behavior toggle. When `false` (the default), the
37
+ // engine runs in `'assistive'` behavior — server enforces `validate('derivable')`
38
+ // on submit/save. When `true`, the engine runs in `'permissive'` behavior —
39
+ // server skips the derivable gate, and violations surface inline for the
40
+ // user to resolve. See the cross-repo Grammar Tiers spec for the full
41
+ // contract; the DB-side `NOT NULL DEFAULT false` is owned by server.
42
+ advancedMode: Type.Boolean(),
36
43
  });
37
44
  export const UserPublicFieldsSchema = Type.Pick(UserSchema, [
38
45
  "name",
@@ -1 +1 @@
1
- {"version":3,"file":"users.js","sourceRoot":"","sources":["../../../src/schemas/model/users.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAoC,MAAM,SAAS,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE5D,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,UAAU,EAAE,CAAC;IACb,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,UAAU,EAAE,CAAC;IAEb,MAAM,EAAE,GAAG;IACX,WAAW,EAAE,GAAG;IAChB,SAAS,EAAE,GAAG;CACR,CAAA;AACV,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC;IAC9C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;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AAC,CAAA;AAKF,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE;IAClB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,aAAa;IACxB,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE;IACxB,SAAS,EAAE,QAAQ,CAAC,aAAa,CAAC;IAClC,cAAc,EAAE,QAAQ,CAAC,YAAY,CAAC;CACzC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,aAAa;IACxB,4BAA4B;IAC5B,SAAS,EAAE,IAAI;CAClB,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,kCAAkC,GAAG,IAAI,CAAC,MAAM,CAAC;IAC1D,cAAc,EAAE,mBAAmB,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;IAChE,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;CACvD,CAAC,CAAA;AAKF,MAAM,CAAC,MAAM,yCAAyC,GAAG,IAAI,CAAC,MAAM,CAAC;IACjE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE;IAC3B,aAAa,EAAE,IAAI,CAAC,OAAO,EAAE;IAC7B,qBAAqB,EAAE,IAAI,CAAC,OAAO,EAAE;IACrC,2BAA2B,EAAE,IAAI,CAAC,OAAO,EAAE;CAC9C,CAAC,CAAA"}
@@ -1,16 +1,30 @@
1
1
  import { ErrorResponseSchema, type ParsedError, type ParsedSuccess } from "../schemas/common.js";
2
2
  import type { JsonObject } from "../schemas/common.js";
3
+ import { GrammarViolationsResponseSchema } from "../schemas/api/grammar-violations.js";
3
4
  import type { Static, TSchema } from "typebox";
4
5
  export declare function awaitableSleep(timeout: number): Promise<void>;
5
6
  export declare function stringToColor(str: string): string;
6
7
  export declare function parseRequest<T extends TSchema>(request: Request, schema: T): Promise<Static<T>>;
7
- export declare function parseResponse<T extends TSchema>(response: Response, schema: T): Promise<ParsedSuccess<T> | ParsedError<typeof ErrorResponseSchema>>;
8
+ export declare function parseResponse<T extends TSchema>(response: Response, schema: T): Promise<ParsedSuccess<T> | ParsedError<typeof ErrorResponseSchema> | ParsedError<typeof GrammarViolationsResponseSchema>>;
8
9
  export declare function parseResponse<T extends TSchema, E extends TSchema>(response: Response, schema: T, errorSchema: E): Promise<ParsedSuccess<T> | ParsedError<E>>;
9
10
  export declare function createUrlWithParameters<T extends TSchema>(urlString: string, data: Static<T>, schema: T, baseUrl?: string): import("node:url").URL;
10
11
  export declare function strictFetch<T extends TSchema, R extends TSchema>(uri: Parameters<typeof fetch>[0], init: Omit<RequestInit, "body">, payload: JsonObject | undefined, requestSchema: T | undefined, responseSchema: R, fetchFn?: typeof fetch): Promise<ParsedError<import("typebox").TObject<{
11
12
  errorID: import("typebox").TNumber;
12
13
  errorMessage: import("typebox").TString;
13
14
  statusCode: import("typebox").TNumber;
15
+ }>> | ParsedError<import("typebox").TObject<{
16
+ error: import("typebox").TLiteral<"GRAMMAR_VIOLATIONS">;
17
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
18
+ violations: import("typebox").TArray<import("typebox").TObject<{
19
+ tier: import("typebox").TUnion<[import("typebox").TLiteral<"structural">, import("typebox").TLiteral<"evaluable">, import("typebox").TLiteral<"derivable">, import("typebox").TLiteral<"presentable">]>;
20
+ code: import("typebox").TUnion<[import("typebox").TLiteral<"S-1">, import("typebox").TLiteral<"S-2">, import("typebox").TLiteral<"S-3">, import("typebox").TLiteral<"S-4">, import("typebox").TLiteral<"S-5">, import("typebox").TLiteral<"S-6">, import("typebox").TLiteral<"S-7">, import("typebox").TLiteral<"S-8">, import("typebox").TLiteral<"S-9">, import("typebox").TLiteral<"S-10">, import("typebox").TLiteral<"S-11">, import("typebox").TLiteral<"S-12">, import("typebox").TLiteral<"S-13">, import("typebox").TLiteral<"S-14">, import("typebox").TLiteral<"E-1">, import("typebox").TLiteral<"E-3">, import("typebox").TLiteral<"E-4">, import("typebox").TLiteral<"E-5">, import("typebox").TLiteral<"E-6">, import("typebox").TLiteral<"E-7">, import("typebox").TLiteral<"D-1">, import("typebox").TLiteral<"D-2">, import("typebox").TLiteral<"D-3">, import("typebox").TLiteral<"D-4">, import("typebox").TLiteral<"D-5">, import("typebox").TLiteral<"D-6">, import("typebox").TLiteral<"P-1">, import("typebox").TLiteral<"P-2">, import("typebox").TLiteral<"P-3">, import("typebox").TLiteral<"P-4">, import("typebox").TLiteral<"P-5">]>;
21
+ message: import("typebox").TString;
22
+ argumentId: import("typebox").TOptional<import("typebox").TString>;
23
+ premiseId: import("typebox").TOptional<import("typebox").TString>;
24
+ expressionId: import("typebox").TOptional<import("typebox").TString>;
25
+ variableId: import("typebox").TOptional<import("typebox").TString>;
26
+ claimId: import("typebox").TOptional<import("typebox").TString>;
27
+ }>>;
14
28
  }>> | ParsedSuccess<R>>;
15
29
  export declare function getFirstDayOfNextMonth(): Date;
16
30
  type TDefaultValueFactory<K, V> = (key?: K) => V;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,KAAK,WAAW,EAChB,KAAK,aAAa,EACrB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAG9C,wBAAsB,cAAc,CAAC,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AC,EAC1B,KAAK,SAAK;IAYP,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC;IAOd,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;CAS9B"}
@@ -1,4 +1,5 @@
1
1
  import { ErrorResponseSchema, } from "../schemas/common.js";
2
+ import { GrammarViolationsResponseSchema } from "../schemas/api/grammar-violations.js";
2
3
  import { Value } from "typebox/value";
3
4
  export async function awaitableSleep(timeout) {
4
5
  return new Promise((resolve) => {
@@ -30,6 +31,15 @@ export async function parseRequest(request, schema) {
30
31
  export async function parseResponse(response, schema, errorSchema) {
31
32
  const data = (await response.json());
32
33
  if (!response.ok) {
34
+ // Auto-detect the GRAMMAR_VIOLATIONS 422 envelope only when the caller
35
+ // omitted an explicit error schema (default form). Callers that passed
36
+ // their own error schema keep the pre-0.11 single-schema behavior.
37
+ if (errorSchema === undefined &&
38
+ response.status === 422 &&
39
+ Value.Check(GrammarViolationsResponseSchema, data)) {
40
+ const parsedViolations = Value.Parse(GrammarViolationsResponseSchema, data);
41
+ return { error: parsedViolations, ok: false };
42
+ }
33
43
  const errSchema = errorSchema ?? ErrorResponseSchema;
34
44
  const parsedError = Value.Parse(errSchema, data);
35
45
  return { error: parsedError, ok: false };