@proposit/shared 0.1.0 → 0.2.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 (64) hide show
  1. package/dist/api-client/argument/batch.d.ts +10 -9
  2. package/dist/api-client/argument/batch.d.ts.map +1 -1
  3. package/dist/api-client/argument/batch.js +10 -6
  4. package/dist/api-client/argument/batch.js.map +1 -1
  5. package/dist/api-client/argument/claims.d.ts +6 -5
  6. package/dist/api-client/argument/claims.d.ts.map +1 -1
  7. package/dist/api-client/argument/claims.js +16 -10
  8. package/dist/api-client/argument/claims.js.map +1 -1
  9. package/dist/api-client/argument/index.d.ts +57 -56
  10. package/dist/api-client/argument/index.d.ts.map +1 -1
  11. package/dist/api-client/argument/index.js +45 -30
  12. package/dist/api-client/argument/index.js.map +1 -1
  13. package/dist/api-client/argument/logic/index.d.ts +25 -24
  14. package/dist/api-client/argument/logic/index.d.ts.map +1 -1
  15. package/dist/api-client/argument/logic/index.js +56 -38
  16. package/dist/api-client/argument/logic/index.js.map +1 -1
  17. package/dist/api-client/argument/logic/repair.d.ts +5 -4
  18. package/dist/api-client/argument/logic/repair.d.ts.map +1 -1
  19. package/dist/api-client/argument/logic/repair.js +6 -4
  20. package/dist/api-client/argument/logic/repair.js.map +1 -1
  21. package/dist/api-client/argument/reactions.d.ts +3 -2
  22. package/dist/api-client/argument/reactions.d.ts.map +1 -1
  23. package/dist/api-client/argument/reactions.js +7 -4
  24. package/dist/api-client/argument/reactions.js.map +1 -1
  25. package/dist/api-client/argument/reviews.d.ts +7 -6
  26. package/dist/api-client/argument/reviews.d.ts.map +1 -1
  27. package/dist/api-client/argument/reviews.js +19 -12
  28. package/dist/api-client/argument/reviews.js.map +1 -1
  29. package/dist/api-client/config.d.ts +22 -0
  30. package/dist/api-client/config.d.ts.map +1 -0
  31. package/dist/api-client/config.js +2 -0
  32. package/dist/api-client/config.js.map +1 -0
  33. package/dist/api-client/factory.d.ts +80 -0
  34. package/dist/api-client/factory.d.ts.map +1 -0
  35. package/dist/api-client/factory.js +85 -0
  36. package/dist/api-client/factory.js.map +1 -0
  37. package/dist/api-client/index.d.ts +4 -0
  38. package/dist/api-client/index.d.ts.map +1 -0
  39. package/dist/api-client/index.js +2 -0
  40. package/dist/api-client/index.js.map +1 -0
  41. package/dist/api-client/internal.d.ts +7 -0
  42. package/dist/api-client/internal.d.ts.map +1 -0
  43. package/dist/api-client/internal.js +10 -0
  44. package/dist/api-client/internal.js.map +1 -0
  45. package/dist/api-client/search.d.ts +4 -3
  46. package/dist/api-client/search.d.ts.map +1 -1
  47. package/dist/api-client/search.js +10 -6
  48. package/dist/api-client/search.js.map +1 -1
  49. package/dist/api-client/user/claims.d.ts +2 -1
  50. package/dist/api-client/user/claims.d.ts.map +1 -1
  51. package/dist/api-client/user/claims.js +5 -3
  52. package/dist/api-client/user/claims.js.map +1 -1
  53. package/dist/api-client/user/sources.d.ts +2 -1
  54. package/dist/api-client/user/sources.d.ts.map +1 -1
  55. package/dist/api-client/user/sources.js +5 -3
  56. package/dist/api-client/user/sources.js.map +1 -1
  57. package/dist/schemas/api/argument/batch/change-edge-operator.d.ts +3 -3
  58. package/dist/schemas/api/argument/batch/create-expression-with-operator.d.ts +3 -3
  59. package/dist/schemas/api/argument/index.d.ts +24 -24
  60. package/dist/schemas/api/argument/repair.d.ts +3 -3
  61. package/dist/schemas/integrations/index.d.ts +3 -3
  62. package/dist/schemas/model/arguments.d.ts +6 -6
  63. package/dist/schemas/snapshot.d.ts +3 -3
  64. package/package.json +4 -12
@@ -1,4 +1,5 @@
1
- export declare function getUserSources(fetchFn?: typeof fetch, urlPrefix?: string): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
1
+ import type { TApiClientConfig } from "../config.js";
2
+ export declare function getUserSourcesImpl(config: TApiClientConfig): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
2
3
  errorID: import("typebox").TNumber;
3
4
  errorMessage: import("typebox").TString;
4
5
  statusCode: import("typebox").TNumber;
@@ -1 +1 @@
1
- {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../src/api-client/user/sources.ts"],"names":[],"mappings":"AAGA,wBAAsB,cAAc,CAChC,OAAO,GAAE,OAAO,KAAa,EAC7B,SAAS,SAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQjB"}
1
+ {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../src/api-client/user/sources.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGpD,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQhE"}
@@ -1,7 +1,9 @@
1
1
  import { UserSourcesResponseSchema } from "../../schemas/api/sources.js";
2
2
  import { parseResponse } from "../../utils/utils.js";
3
- export async function getUserSources(fetchFn = fetch, urlPrefix = "") {
4
- const url = new URL(`${urlPrefix}/api/v1/user/sources`, "http://localhost");
5
- return await parseResponse(await fetchFn(url.pathname + url.search, { method: "GET" }), UserSourcesResponseSchema);
3
+ import { resolveBaseUrl } from "../internal.js";
4
+ export async function getUserSourcesImpl(config) {
5
+ const baseUrl = resolveBaseUrl(config);
6
+ const url = new URL(`${baseUrl}/api/v1/user/sources`, "http://localhost");
7
+ return await parseResponse(await config.fetchImpl(url.pathname + url.search, { method: "GET" }), UserSourcesResponseSchema);
6
8
  }
7
9
  //# sourceMappingURL=sources.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sources.js","sourceRoot":"","sources":["../../../src/api-client/user/sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,MAAM,CAAC,KAAK,UAAU,cAAc,CAChC,UAAwB,KAAK,EAC7B,SAAS,GAAG,EAAE;IAEd,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,SAAS,sBAAsB,EAAE,kBAAkB,CAAC,CAAA;IAE3E,OAAO,MAAM,aAAa,CACtB,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAC3D,yBAAyB,CAC5B,CAAA;AACL,CAAC"}
1
+ {"version":3,"file":"sources.js","sourceRoot":"","sources":["../../../src/api-client/user/sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAAwB;IAC7D,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,OAAO,sBAAsB,EAAE,kBAAkB,CAAC,CAAA;IAEzE,OAAO,MAAM,aAAa,CACtB,MAAM,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EACpE,yBAAyB,CAC5B,CAAA;AACL,CAAC"}
@@ -25,9 +25,6 @@ export declare const ChangeEdgeOperatorResponseSchema: Type.TObject<{
25
25
  popularity: Type.TNumber;
26
26
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
27
27
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
28
- argumentTitle: Type.TString;
29
- textContent: Type.TNull;
30
- }>, Type.TObject<{
31
28
  argumentTitle: Type.TOptional<Type.TString>;
32
29
  textContent: Type.TString;
33
30
  postUrl: Type.TString;
@@ -54,6 +51,9 @@ export declare const ChangeEdgeOperatorResponseSchema: Type.TObject<{
54
51
  }>, Type.TObject<{
55
52
  argumentTitle: Type.TOptional<Type.TString>;
56
53
  textContent: Type.TString;
54
+ }>, Type.TObject<{
55
+ argumentTitle: Type.TString;
56
+ textContent: Type.TNull;
57
57
  }>]>, Type.TNull]>;
58
58
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
59
59
  }>, Type.TObject<{
@@ -25,9 +25,6 @@ export declare const CreateExpressionWithOperatorResponseSchema: Type.TObject<{
25
25
  popularity: Type.TNumber;
26
26
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
27
27
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
28
- argumentTitle: Type.TString;
29
- textContent: Type.TNull;
30
- }>, Type.TObject<{
31
28
  argumentTitle: Type.TOptional<Type.TString>;
32
29
  textContent: Type.TString;
33
30
  postUrl: Type.TString;
@@ -54,6 +51,9 @@ export declare const CreateExpressionWithOperatorResponseSchema: Type.TObject<{
54
51
  }>, Type.TObject<{
55
52
  argumentTitle: Type.TOptional<Type.TString>;
56
53
  textContent: Type.TString;
54
+ }>, Type.TObject<{
55
+ argumentTitle: Type.TString;
56
+ textContent: Type.TNull;
57
57
  }>]>, Type.TNull]>;
58
58
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
59
59
  }>, Type.TObject<{
@@ -19,9 +19,6 @@ export declare const FullArgumentSchema: Type.TObject<{
19
19
  popularity: Type.TNumber;
20
20
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
21
21
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
22
- argumentTitle: Type.TString;
23
- textContent: Type.TNull;
24
- }>, Type.TObject<{
25
22
  argumentTitle: Type.TOptional<Type.TString>;
26
23
  textContent: Type.TString;
27
24
  postUrl: Type.TString;
@@ -48,6 +45,9 @@ export declare const FullArgumentSchema: Type.TObject<{
48
45
  }>, Type.TObject<{
49
46
  argumentTitle: Type.TOptional<Type.TString>;
50
47
  textContent: Type.TString;
48
+ }>, Type.TObject<{
49
+ argumentTitle: Type.TString;
50
+ textContent: Type.TNull;
51
51
  }>]>, Type.TNull]>;
52
52
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
53
53
  titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
@@ -83,9 +83,6 @@ export declare const FullArgumentSchema: Type.TObject<{
83
83
  popularity: Type.TNumber;
84
84
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
85
85
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
86
- argumentTitle: Type.TString;
87
- textContent: Type.TNull;
88
- }>, Type.TObject<{
89
86
  argumentTitle: Type.TOptional<Type.TString>;
90
87
  textContent: Type.TString;
91
88
  postUrl: Type.TString;
@@ -112,6 +109,9 @@ export declare const FullArgumentSchema: Type.TObject<{
112
109
  }>, Type.TObject<{
113
110
  argumentTitle: Type.TOptional<Type.TString>;
114
111
  textContent: Type.TString;
112
+ }>, Type.TObject<{
113
+ argumentTitle: Type.TString;
114
+ textContent: Type.TNull;
115
115
  }>]>, Type.TNull]>;
116
116
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
117
117
  }>, Type.TObject<{
@@ -261,9 +261,6 @@ export declare const FullArgumentSchema: Type.TObject<{
261
261
  popularity: Type.TNumber;
262
262
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
263
263
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
264
- argumentTitle: Type.TString;
265
- textContent: Type.TNull;
266
- }>, Type.TObject<{
267
264
  argumentTitle: Type.TOptional<Type.TString>;
268
265
  textContent: Type.TString;
269
266
  postUrl: Type.TString;
@@ -290,6 +287,9 @@ export declare const FullArgumentSchema: Type.TObject<{
290
287
  }>, Type.TObject<{
291
288
  argumentTitle: Type.TOptional<Type.TString>;
292
289
  textContent: Type.TString;
290
+ }>, Type.TObject<{
291
+ argumentTitle: Type.TString;
292
+ textContent: Type.TNull;
293
293
  }>]>, Type.TNull]>;
294
294
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
295
295
  titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
@@ -312,9 +312,6 @@ export declare const FullArgumentSchema: Type.TObject<{
312
312
  popularity: Type.TNumber;
313
313
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
314
314
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
315
- argumentTitle: Type.TString;
316
- textContent: Type.TNull;
317
- }>, Type.TObject<{
318
315
  argumentTitle: Type.TOptional<Type.TString>;
319
316
  textContent: Type.TString;
320
317
  postUrl: Type.TString;
@@ -341,6 +338,9 @@ export declare const FullArgumentSchema: Type.TObject<{
341
338
  }>, Type.TObject<{
342
339
  argumentTitle: Type.TOptional<Type.TString>;
343
340
  textContent: Type.TString;
341
+ }>, Type.TObject<{
342
+ argumentTitle: Type.TString;
343
+ textContent: Type.TNull;
344
344
  }>]>, Type.TNull]>;
345
345
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
346
346
  titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
@@ -501,9 +501,6 @@ export declare const GetForksOfArgumentResponseSchema: Type.TObject<{
501
501
  popularity: Type.TNumber;
502
502
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
503
503
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
504
- argumentTitle: Type.TString;
505
- textContent: Type.TNull;
506
- }>, Type.TObject<{
507
504
  argumentTitle: Type.TOptional<Type.TString>;
508
505
  textContent: Type.TString;
509
506
  postUrl: Type.TString;
@@ -530,6 +527,9 @@ export declare const GetForksOfArgumentResponseSchema: Type.TObject<{
530
527
  }>, Type.TObject<{
531
528
  argumentTitle: Type.TOptional<Type.TString>;
532
529
  textContent: Type.TString;
530
+ }>, Type.TObject<{
531
+ argumentTitle: Type.TString;
532
+ textContent: Type.TNull;
533
533
  }>]>, Type.TNull]>;
534
534
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
535
535
  titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
@@ -542,9 +542,6 @@ export type TGetForksOfArgumentResponse = Static<typeof GetForksOfArgumentRespon
542
542
  export declare const CreateArgumentSchema: Type.TObject<{
543
543
  origin: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
544
544
  data: Type.TUnion<[Type.TObject<{
545
- argumentTitle: Type.TString;
546
- textContent: Type.TNull;
547
- }>, Type.TObject<{
548
545
  argumentTitle: Type.TOptional<Type.TString>;
549
546
  textContent: Type.TString;
550
547
  postUrl: Type.TString;
@@ -571,6 +568,9 @@ export declare const CreateArgumentSchema: Type.TObject<{
571
568
  }>, Type.TObject<{
572
569
  argumentTitle: Type.TOptional<Type.TString>;
573
570
  textContent: Type.TString;
571
+ }>, Type.TObject<{
572
+ argumentTitle: Type.TString;
573
+ textContent: Type.TNull;
574
574
  }>]>;
575
575
  }>;
576
576
  export type TCreateArgument = Static<typeof CreateArgumentSchema>;
@@ -592,9 +592,6 @@ export declare const PublishResponseSchema: Type.TObject<{
592
592
  popularity: Type.TNumber;
593
593
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
594
594
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
595
- argumentTitle: Type.TString;
596
- textContent: Type.TNull;
597
- }>, Type.TObject<{
598
595
  argumentTitle: Type.TOptional<Type.TString>;
599
596
  textContent: Type.TString;
600
597
  postUrl: Type.TString;
@@ -621,6 +618,9 @@ export declare const PublishResponseSchema: Type.TObject<{
621
618
  }>, Type.TObject<{
622
619
  argumentTitle: Type.TOptional<Type.TString>;
623
620
  textContent: Type.TString;
621
+ }>, Type.TObject<{
622
+ argumentTitle: Type.TString;
623
+ textContent: Type.TNull;
624
624
  }>]>, Type.TNull]>;
625
625
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
626
626
  titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
@@ -643,9 +643,6 @@ export declare const PublishResponseSchema: Type.TObject<{
643
643
  popularity: Type.TNumber;
644
644
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
645
645
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
646
- argumentTitle: Type.TString;
647
- textContent: Type.TNull;
648
- }>, Type.TObject<{
649
646
  argumentTitle: Type.TOptional<Type.TString>;
650
647
  textContent: Type.TString;
651
648
  postUrl: Type.TString;
@@ -672,6 +669,9 @@ export declare const PublishResponseSchema: Type.TObject<{
672
669
  }>, Type.TObject<{
673
670
  argumentTitle: Type.TOptional<Type.TString>;
674
671
  textContent: Type.TString;
672
+ }>, Type.TObject<{
673
+ argumentTitle: Type.TString;
674
+ textContent: Type.TNull;
675
675
  }>]>, Type.TNull]>;
676
676
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
677
677
  titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
@@ -32,9 +32,6 @@ export declare const RepairResponseSchema: Type.TObject<{
32
32
  popularity: Type.TNumber;
33
33
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
34
34
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
35
- argumentTitle: Type.TString;
36
- textContent: Type.TNull;
37
- }>, Type.TObject<{
38
35
  argumentTitle: Type.TOptional<Type.TString>;
39
36
  textContent: Type.TString;
40
37
  postUrl: Type.TString;
@@ -61,6 +58,9 @@ export declare const RepairResponseSchema: Type.TObject<{
61
58
  }>, Type.TObject<{
62
59
  argumentTitle: Type.TOptional<Type.TString>;
63
60
  textContent: Type.TString;
61
+ }>, Type.TObject<{
62
+ argumentTitle: Type.TString;
63
+ textContent: Type.TNull;
64
64
  }>]>, Type.TNull]>;
65
65
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
66
66
  }>, Type.TObject<{
@@ -93,9 +93,6 @@ export declare const ArgumentPlatformDataMap: Type.TObject<{
93
93
  }>;
94
94
  export type TArgumentPlatformDataMap = Static<typeof ArgumentPlatformDataMap>;
95
95
  export declare const ArgumentPlatformData: Type.TUnion<[Type.TObject<{
96
- argumentTitle: Type.TString;
97
- textContent: Type.TNull;
98
- }>, Type.TObject<{
99
96
  argumentTitle: Type.TOptional<Type.TString>;
100
97
  textContent: Type.TString;
101
98
  postUrl: Type.TString;
@@ -122,6 +119,9 @@ export declare const ArgumentPlatformData: Type.TUnion<[Type.TObject<{
122
119
  }>, Type.TObject<{
123
120
  argumentTitle: Type.TOptional<Type.TString>;
124
121
  textContent: Type.TString;
122
+ }>, Type.TObject<{
123
+ argumentTitle: Type.TString;
124
+ textContent: Type.TNull;
125
125
  }>]>;
126
126
  export type TArgumentPlatformData = Static<typeof ArgumentPlatformData>;
127
127
  export declare const CreateArgumentFromImportSchema: Type.TObject<{
@@ -21,9 +21,6 @@ export declare const ArgumentSchema: Type.TIntersect<[Type.TObject<{
21
21
  popularity: Type.TNumber;
22
22
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
23
23
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
24
- argumentTitle: Type.TString;
25
- textContent: Type.TNull;
26
- }>, Type.TObject<{
27
24
  argumentTitle: Type.TOptional<Type.TString>;
28
25
  textContent: Type.TString;
29
26
  postUrl: Type.TString;
@@ -50,6 +47,9 @@ export declare const ArgumentSchema: Type.TIntersect<[Type.TObject<{
50
47
  }>, Type.TObject<{
51
48
  argumentTitle: Type.TOptional<Type.TString>;
52
49
  textContent: Type.TString;
50
+ }>, Type.TObject<{
51
+ argumentTitle: Type.TString;
52
+ textContent: Type.TNull;
53
53
  }>]>, Type.TNull]>;
54
54
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
55
55
  titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
@@ -73,9 +73,6 @@ export declare const ArgumentWithMetadataSchema: Type.TIntersect<[Type.TIntersec
73
73
  popularity: Type.TNumber;
74
74
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
75
75
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
76
- argumentTitle: Type.TString;
77
- textContent: Type.TNull;
78
- }>, Type.TObject<{
79
76
  argumentTitle: Type.TOptional<Type.TString>;
80
77
  textContent: Type.TString;
81
78
  postUrl: Type.TString;
@@ -102,6 +99,9 @@ export declare const ArgumentWithMetadataSchema: Type.TIntersect<[Type.TIntersec
102
99
  }>, Type.TObject<{
103
100
  argumentTitle: Type.TOptional<Type.TString>;
104
101
  textContent: Type.TString;
102
+ }>, Type.TObject<{
103
+ argumentTitle: Type.TString;
104
+ textContent: Type.TNull;
105
105
  }>]>, Type.TNull]>;
106
106
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
107
107
  titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
@@ -15,9 +15,6 @@ export declare const ArgumentEngineSnapshotSchema: Type.TObject<{
15
15
  popularity: Type.TNumber;
16
16
  platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
17
17
  platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
18
- argumentTitle: Type.TString;
19
- textContent: Type.TNull;
20
- }>, Type.TObject<{
21
18
  argumentTitle: Type.TOptional<Type.TString>;
22
19
  textContent: Type.TString;
23
20
  postUrl: Type.TString;
@@ -44,6 +41,9 @@ export declare const ArgumentEngineSnapshotSchema: Type.TObject<{
44
41
  }>, Type.TObject<{
45
42
  argumentTitle: Type.TOptional<Type.TString>;
46
43
  textContent: Type.TString;
44
+ }>, Type.TObject<{
45
+ argumentTitle: Type.TString;
46
+ textContent: Type.TNull;
47
47
  }>]>, Type.TNull]>;
48
48
  platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
49
49
  }>, Type.TObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proposit/shared",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Runtime-agnostic TypeScript shared between proposit-server and proposit-mobile. Schemas, engine, api-client, and utilities.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/Proposit-App/proposit-shared",
@@ -13,17 +13,9 @@
13
13
  "node": ">=22.3.0"
14
14
  },
15
15
  "exports": {
16
- "./api-client/argument": {
17
- "types": "./dist/api-client/argument/index.d.ts",
18
- "import": "./dist/api-client/argument/index.js"
19
- },
20
- "./api-client/argument/logic": {
21
- "types": "./dist/api-client/argument/logic/index.d.ts",
22
- "import": "./dist/api-client/argument/logic/index.js"
23
- },
24
- "./api-client/*": {
25
- "types": "./dist/api-client/*.d.ts",
26
- "import": "./dist/api-client/*.js"
16
+ "./api-client": {
17
+ "types": "./dist/api-client/index.d.ts",
18
+ "import": "./dist/api-client/index.js"
27
19
  },
28
20
  "./schemas": {
29
21
  "types": "./dist/schemas/index.d.ts",