@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.
- package/dist/api-client/argument/batch.d.ts +10 -9
- package/dist/api-client/argument/batch.d.ts.map +1 -1
- package/dist/api-client/argument/batch.js +10 -6
- package/dist/api-client/argument/batch.js.map +1 -1
- package/dist/api-client/argument/claims.d.ts +6 -5
- package/dist/api-client/argument/claims.d.ts.map +1 -1
- package/dist/api-client/argument/claims.js +16 -10
- package/dist/api-client/argument/claims.js.map +1 -1
- package/dist/api-client/argument/index.d.ts +57 -56
- package/dist/api-client/argument/index.d.ts.map +1 -1
- package/dist/api-client/argument/index.js +45 -30
- package/dist/api-client/argument/index.js.map +1 -1
- package/dist/api-client/argument/logic/index.d.ts +25 -24
- package/dist/api-client/argument/logic/index.d.ts.map +1 -1
- package/dist/api-client/argument/logic/index.js +56 -38
- package/dist/api-client/argument/logic/index.js.map +1 -1
- package/dist/api-client/argument/logic/repair.d.ts +5 -4
- package/dist/api-client/argument/logic/repair.d.ts.map +1 -1
- package/dist/api-client/argument/logic/repair.js +6 -4
- package/dist/api-client/argument/logic/repair.js.map +1 -1
- package/dist/api-client/argument/reactions.d.ts +3 -2
- package/dist/api-client/argument/reactions.d.ts.map +1 -1
- package/dist/api-client/argument/reactions.js +7 -4
- package/dist/api-client/argument/reactions.js.map +1 -1
- package/dist/api-client/argument/reviews.d.ts +7 -6
- package/dist/api-client/argument/reviews.d.ts.map +1 -1
- package/dist/api-client/argument/reviews.js +19 -12
- package/dist/api-client/argument/reviews.js.map +1 -1
- package/dist/api-client/config.d.ts +22 -0
- package/dist/api-client/config.d.ts.map +1 -0
- package/dist/api-client/config.js +2 -0
- package/dist/api-client/config.js.map +1 -0
- package/dist/api-client/factory.d.ts +80 -0
- package/dist/api-client/factory.d.ts.map +1 -0
- package/dist/api-client/factory.js +85 -0
- package/dist/api-client/factory.js.map +1 -0
- package/dist/api-client/index.d.ts +4 -0
- package/dist/api-client/index.d.ts.map +1 -0
- package/dist/api-client/index.js +2 -0
- package/dist/api-client/index.js.map +1 -0
- package/dist/api-client/internal.d.ts +7 -0
- package/dist/api-client/internal.d.ts.map +1 -0
- package/dist/api-client/internal.js +10 -0
- package/dist/api-client/internal.js.map +1 -0
- package/dist/api-client/search.d.ts +4 -3
- package/dist/api-client/search.d.ts.map +1 -1
- package/dist/api-client/search.js +10 -6
- package/dist/api-client/search.js.map +1 -1
- package/dist/api-client/user/claims.d.ts +2 -1
- package/dist/api-client/user/claims.d.ts.map +1 -1
- package/dist/api-client/user/claims.js +5 -3
- package/dist/api-client/user/claims.js.map +1 -1
- package/dist/api-client/user/sources.d.ts +2 -1
- package/dist/api-client/user/sources.d.ts.map +1 -1
- package/dist/api-client/user/sources.js +5 -3
- package/dist/api-client/user/sources.js.map +1 -1
- package/dist/schemas/api/argument/batch/change-edge-operator.d.ts +3 -3
- package/dist/schemas/api/argument/batch/create-expression-with-operator.d.ts +3 -3
- package/dist/schemas/api/argument/index.d.ts +24 -24
- package/dist/schemas/api/argument/repair.d.ts +3 -3
- package/dist/schemas/integrations/index.d.ts +3 -3
- package/dist/schemas/model/arguments.d.ts +6 -6
- package/dist/schemas/snapshot.d.ts +3 -3
- package/package.json +4 -12
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type TChangeEdgeOperatorRequest } from "../../schemas/api/argument/batch/change-edge-operator.js";
|
|
2
2
|
import { type TCreateExpressionWithOperatorRequest } from "../../schemas/api/argument/batch/create-expression-with-operator.js";
|
|
3
|
-
|
|
3
|
+
import type { TApiClientConfig } from "../config.js";
|
|
4
|
+
export declare function provisionArgumentImpl(config: TApiClientConfig, argumentId: string, argumentVersion: number): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
|
|
4
5
|
errorID: import("typebox").TNumber;
|
|
5
6
|
errorMessage: import("typebox").TString;
|
|
6
7
|
statusCode: import("typebox").TNumber;
|
|
@@ -113,7 +114,7 @@ export declare function provisionArgument(argumentId: string, argumentVersion: n
|
|
|
113
114
|
operator: import("typebox").TNull;
|
|
114
115
|
}>]>]>;
|
|
115
116
|
}>>>;
|
|
116
|
-
export declare function
|
|
117
|
+
export declare function createExpressionWithOperatorImpl(config: TApiClientConfig, argumentId: string, argumentVersion: number, data: TCreateExpressionWithOperatorRequest): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
|
|
117
118
|
errorID: import("typebox").TNumber;
|
|
118
119
|
errorMessage: import("typebox").TString;
|
|
119
120
|
statusCode: import("typebox").TNumber;
|
|
@@ -134,9 +135,6 @@ export declare function createExpressionWithOperator(argumentId: string, argumen
|
|
|
134
135
|
popularity: import("typebox").TNumber;
|
|
135
136
|
platform: import("typebox").TUnion<[import("typebox").TLiteral<"twitter">, import("typebox").TLiteral<"reddit">, import("typebox").TLiteral<"raw_text">, import("typebox").TLiteral<"manual">]>;
|
|
136
137
|
platformData: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TObject<{
|
|
137
|
-
argumentTitle: import("typebox").TString;
|
|
138
|
-
textContent: import("typebox").TNull;
|
|
139
|
-
}>, import("typebox").TObject<{
|
|
140
138
|
argumentTitle: import("typebox").TOptional<import("typebox").TString>;
|
|
141
139
|
textContent: import("typebox").TString;
|
|
142
140
|
postUrl: import("typebox").TString;
|
|
@@ -163,6 +161,9 @@ export declare function createExpressionWithOperator(argumentId: string, argumen
|
|
|
163
161
|
}>, import("typebox").TObject<{
|
|
164
162
|
argumentTitle: import("typebox").TOptional<import("typebox").TString>;
|
|
165
163
|
textContent: import("typebox").TString;
|
|
164
|
+
}>, import("typebox").TObject<{
|
|
165
|
+
argumentTitle: import("typebox").TString;
|
|
166
|
+
textContent: import("typebox").TNull;
|
|
166
167
|
}>]>, import("typebox").TNull]>;
|
|
167
168
|
platformUsername: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
168
169
|
}>, import("typebox").TObject<{
|
|
@@ -385,7 +386,7 @@ export declare function createExpressionWithOperator(argumentId: string, argumen
|
|
|
385
386
|
operator: import("typebox").TNull;
|
|
386
387
|
}>]>]>>;
|
|
387
388
|
}>>>;
|
|
388
|
-
export declare function
|
|
389
|
+
export declare function changeEdgeOperatorImpl(config: TApiClientConfig, argumentId: string, argumentVersion: number, data: TChangeEdgeOperatorRequest): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
|
|
389
390
|
errorID: import("typebox").TNumber;
|
|
390
391
|
errorMessage: import("typebox").TString;
|
|
391
392
|
statusCode: import("typebox").TNumber;
|
|
@@ -406,9 +407,6 @@ export declare function changeEdgeOperator(argumentId: string, argumentVersion:
|
|
|
406
407
|
popularity: import("typebox").TNumber;
|
|
407
408
|
platform: import("typebox").TUnion<[import("typebox").TLiteral<"twitter">, import("typebox").TLiteral<"reddit">, import("typebox").TLiteral<"raw_text">, import("typebox").TLiteral<"manual">]>;
|
|
408
409
|
platformData: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TObject<{
|
|
409
|
-
argumentTitle: import("typebox").TString;
|
|
410
|
-
textContent: import("typebox").TNull;
|
|
411
|
-
}>, import("typebox").TObject<{
|
|
412
410
|
argumentTitle: import("typebox").TOptional<import("typebox").TString>;
|
|
413
411
|
textContent: import("typebox").TString;
|
|
414
412
|
postUrl: import("typebox").TString;
|
|
@@ -435,6 +433,9 @@ export declare function changeEdgeOperator(argumentId: string, argumentVersion:
|
|
|
435
433
|
}>, import("typebox").TObject<{
|
|
436
434
|
argumentTitle: import("typebox").TOptional<import("typebox").TString>;
|
|
437
435
|
textContent: import("typebox").TString;
|
|
436
|
+
}>, import("typebox").TObject<{
|
|
437
|
+
argumentTitle: import("typebox").TString;
|
|
438
|
+
textContent: import("typebox").TNull;
|
|
438
439
|
}>]>, import("typebox").TNull]>;
|
|
439
440
|
platformUsername: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
440
441
|
}>, import("typebox").TObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../src/api-client/argument/batch.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,KAAK,0BAA0B,EAClC,MAAM,0DAA0D,CAAA;AACjE,OAAO,EAGH,KAAK,oCAAoC,EAC5C,MAAM,qEAAqE,CAAA;
|
|
1
|
+
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../src/api-client/argument/batch.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,KAAK,0BAA0B,EAClC,MAAM,0DAA0D,CAAA;AACjE,OAAO,EAGH,KAAK,oCAAoC,EAC5C,MAAM,qEAAqE,CAAA;AAE5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGpD,wBAAsB,qBAAqB,CACvC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW1B;AAED,wBAAsB,gCAAgC,CAClD,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAW7C;AAED,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAWnC"}
|
|
@@ -2,13 +2,17 @@ import { ProvisionResponseSchema } from "../../schemas/api/argument/batch/provis
|
|
|
2
2
|
import { ChangeEdgeOperatorRequestSchema, ChangeEdgeOperatorResponseSchema, } from "../../schemas/api/argument/batch/change-edge-operator.js";
|
|
3
3
|
import { CreateExpressionWithOperatorRequestSchema, CreateExpressionWithOperatorResponseSchema, } from "../../schemas/api/argument/batch/create-expression-with-operator.js";
|
|
4
4
|
import { strictFetch } from "../../utils/utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { resolveBaseUrl } from "../internal.js";
|
|
6
|
+
export async function provisionArgumentImpl(config, argumentId, argumentVersion) {
|
|
7
|
+
const baseUrl = resolveBaseUrl(config);
|
|
8
|
+
return await strictFetch(`${baseUrl}/api/v1/argument/${argumentId}/${argumentVersion}/batch/provision`, { method: "POST" }, undefined, undefined, ProvisionResponseSchema, config.fetchImpl);
|
|
7
9
|
}
|
|
8
|
-
export async function
|
|
9
|
-
|
|
10
|
+
export async function createExpressionWithOperatorImpl(config, argumentId, argumentVersion, data) {
|
|
11
|
+
const baseUrl = resolveBaseUrl(config);
|
|
12
|
+
return await strictFetch(`${baseUrl}/api/v1/argument/${argumentId}/${argumentVersion}/logic/batch/create-expression-with-operator`, { method: "POST" }, data, CreateExpressionWithOperatorRequestSchema, CreateExpressionWithOperatorResponseSchema, config.fetchImpl);
|
|
10
13
|
}
|
|
11
|
-
export async function
|
|
12
|
-
|
|
14
|
+
export async function changeEdgeOperatorImpl(config, argumentId, argumentVersion, data) {
|
|
15
|
+
const baseUrl = resolveBaseUrl(config);
|
|
16
|
+
return await strictFetch(`${baseUrl}/api/v1/argument/${argumentId}/${argumentVersion}/logic/batch/change-edge-operator`, { method: "POST" }, data, ChangeEdgeOperatorRequestSchema, ChangeEdgeOperatorResponseSchema, config.fetchImpl);
|
|
13
17
|
}
|
|
14
18
|
//# sourceMappingURL=batch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../../src/api-client/argument/batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAA;AACvF,OAAO,EACH,+BAA+B,EAC/B,gCAAgC,GAEnC,MAAM,0DAA0D,CAAA;AACjE,OAAO,EACH,yCAAyC,EACzC,0CAA0C,GAE7C,MAAM,qEAAqE,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,MAAM,CAAC,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../../src/api-client/argument/batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAA;AACvF,OAAO,EACH,+BAA+B,EAC/B,gCAAgC,GAEnC,MAAM,0DAA0D,CAAA;AACjE,OAAO,EACH,yCAAyC,EACzC,0CAA0C,GAE7C,MAAM,qEAAqE,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACvC,MAAwB,EACxB,UAAkB,EAClB,eAAuB;IAEvB,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,OAAO,MAAM,WAAW,CACpB,GAAG,OAAO,oBAAoB,UAAU,IAAI,eAAe,kBAAkB,EAC7E,EAAE,MAAM,EAAE,MAAM,EAAE,EAClB,SAAS,EACT,SAAS,EACT,uBAAuB,EACvB,MAAM,CAAC,SAAS,CACnB,CAAA;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAClD,MAAwB,EACxB,UAAkB,EAClB,eAAuB,EACvB,IAA0C;IAE1C,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,OAAO,MAAM,WAAW,CACpB,GAAG,OAAO,oBAAoB,UAAU,IAAI,eAAe,8CAA8C,EACzG,EAAE,MAAM,EAAE,MAAM,EAAE,EAClB,IAAI,EACJ,yCAAyC,EACzC,0CAA0C,EAC1C,MAAM,CAAC,SAAS,CACnB,CAAA;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CACxC,MAAwB,EACxB,UAAkB,EAClB,eAAuB,EACvB,IAAgC;IAEhC,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,OAAO,MAAM,WAAW,CACpB,GAAG,OAAO,oBAAoB,UAAU,IAAI,eAAe,mCAAmC,EAC9F,EAAE,MAAM,EAAE,MAAM,EAAE,EAClB,IAAI,EACJ,+BAA+B,EAC/B,gCAAgC,EAChC,MAAM,CAAC,SAAS,CACnB,CAAA;AACL,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TMutableClaimFields, TClaimUpdateFields } from "../../schemas/model/claims.js";
|
|
2
2
|
import { type TIEEEReference } from "../../schemas/model/references.js";
|
|
3
|
-
|
|
3
|
+
import type { TApiClientConfig } from "../config.js";
|
|
4
|
+
export declare function createClaimImpl(config: TApiClientConfig, argumentId: string, version: number, claimData: TMutableClaimFields): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
|
|
4
5
|
errorID: import("typebox").TNumber;
|
|
5
6
|
errorMessage: import("typebox").TString;
|
|
6
7
|
statusCode: import("typebox").TNumber;
|
|
@@ -100,7 +101,7 @@ export declare function createClaim(argumentId: string, version: number, claimDa
|
|
|
100
101
|
operator: import("typebox").TNull;
|
|
101
102
|
}>]>]>>;
|
|
102
103
|
}>>>;
|
|
103
|
-
export declare function
|
|
104
|
+
export declare function deleteClaimImpl(config: TApiClientConfig, argumentId: string, version: number, claimId: string): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
|
|
104
105
|
errorID: import("typebox").TNumber;
|
|
105
106
|
errorMessage: import("typebox").TString;
|
|
106
107
|
statusCode: import("typebox").TNumber;
|
|
@@ -120,7 +121,7 @@ export declare function deleteClaim(argumentId: string, version: number, claimId
|
|
|
120
121
|
titleContentHash: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>>;
|
|
121
122
|
}>>;
|
|
122
123
|
}>>>;
|
|
123
|
-
export declare function
|
|
124
|
+
export declare function updateClaimImpl(config: TApiClientConfig, argumentId: string, version: number, claimId: string, data: TClaimUpdateFields): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
|
|
124
125
|
errorID: import("typebox").TNumber;
|
|
125
126
|
errorMessage: import("typebox").TString;
|
|
126
127
|
statusCode: import("typebox").TNumber;
|
|
@@ -138,7 +139,7 @@ export declare function updateClaim(argumentId: string, version: number, claimId
|
|
|
138
139
|
parentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
139
140
|
titleContentHash: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>>;
|
|
140
141
|
}>>>;
|
|
141
|
-
export declare function
|
|
142
|
+
export declare function createClaimSourceImpl(config: TApiClientConfig, argumentId: string, version: number, claimId: string, citation: TIEEEReference): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
|
|
142
143
|
errorID: import("typebox").TNumber;
|
|
143
144
|
errorMessage: import("typebox").TString;
|
|
144
145
|
statusCode: import("typebox").TNumber;
|
|
@@ -159,7 +160,7 @@ export declare function createClaimSource(argumentId: string, version: number, c
|
|
|
159
160
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
160
161
|
}>;
|
|
161
162
|
}>>>;
|
|
162
|
-
export declare function
|
|
163
|
+
export declare function deleteClaimSourceImpl(config: TApiClientConfig, argumentId: string, version: number, claimId: string, sourceId: string): Promise<import("../../schemas/common.js").ParsedError<import("typebox").TObject<{
|
|
163
164
|
errorID: import("typebox").TNumber;
|
|
164
165
|
errorMessage: import("typebox").TString;
|
|
165
166
|
statusCode: import("typebox").TNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../src/api-client/argument/claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,mBAAmB,EACnB,kBAAkB,EACrB,MAAM,+BAA+B,CAAA;AAStC,OAAO,EAEH,KAAK,cAAc,EACtB,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"claims.d.ts","sourceRoot":"","sources":["../../../src/api-client/argument/claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,mBAAmB,EACnB,kBAAkB,EACrB,MAAM,+BAA+B,CAAA;AAStC,OAAO,EAEH,KAAK,cAAc,EACtB,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,EACf,SAAS,EAAE,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAWjC;AAED,wBAAsB,eAAe,CACjC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;KAUlB;AAED,wBAAsB,eAAe,CACjC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,kBAAkB;;;;;;;;;;;;;;;;;KAW3B;AAED,wBAAsB,qBAAqB,CACvC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;KAW3B;AAED,wBAAsB,qBAAqB,CACvC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM;;;;;;;;;;;;KAUnB"}
|
|
@@ -2,19 +2,25 @@ import { ClaimSchema, ClaimUpdateRequestSchema } from "../../schemas/model.js";
|
|
|
2
2
|
import { ClaimCreationRequestSchema, ClaimCreationResponseSchema, ClaimDeletionResponseSchema, ClaimSourceDeleteResponseSchema, SourceCreationSchema, } from "../../schemas/api/argument/claims.js";
|
|
3
3
|
import { IEEEReferenceSchemaMap, } from "../../schemas/model/references.js";
|
|
4
4
|
import { parseResponse, strictFetch } from "../../utils/utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { resolveBaseUrl } from "../internal.js";
|
|
6
|
+
export async function createClaimImpl(config, argumentId, version, claimData) {
|
|
7
|
+
const baseUrl = resolveBaseUrl(config);
|
|
8
|
+
return await strictFetch(`${baseUrl}/api/v1/argument/${argumentId}/${version}/claims`, { method: "POST" }, { claimData }, ClaimCreationRequestSchema, ClaimCreationResponseSchema, config.fetchImpl);
|
|
7
9
|
}
|
|
8
|
-
export async function
|
|
9
|
-
|
|
10
|
+
export async function deleteClaimImpl(config, argumentId, version, claimId) {
|
|
11
|
+
const baseUrl = resolveBaseUrl(config);
|
|
12
|
+
return await parseResponse(await config.fetchImpl(`${baseUrl}/api/v1/argument/${argumentId}/${version}/claims/${claimId}`, { method: "DELETE" }), ClaimDeletionResponseSchema);
|
|
10
13
|
}
|
|
11
|
-
export async function
|
|
12
|
-
|
|
14
|
+
export async function updateClaimImpl(config, argumentId, version, claimId, data) {
|
|
15
|
+
const baseUrl = resolveBaseUrl(config);
|
|
16
|
+
return await strictFetch(`${baseUrl}/api/v1/argument/${argumentId}/${version}/claims/${claimId}`, { method: "PUT" }, { ...data }, ClaimUpdateRequestSchema, ClaimSchema, config.fetchImpl);
|
|
13
17
|
}
|
|
14
|
-
export async function
|
|
15
|
-
|
|
18
|
+
export async function createClaimSourceImpl(config, argumentId, version, claimId, citation) {
|
|
19
|
+
const baseUrl = resolveBaseUrl(config);
|
|
20
|
+
return await strictFetch(`${baseUrl}/api/v1/argument/${argumentId}/${version}/claims/${claimId}/source`, { method: "POST" }, citation, IEEEReferenceSchemaMap[citation.type], SourceCreationSchema, config.fetchImpl);
|
|
16
21
|
}
|
|
17
|
-
export async function
|
|
18
|
-
|
|
22
|
+
export async function deleteClaimSourceImpl(config, argumentId, version, claimId, sourceId) {
|
|
23
|
+
const baseUrl = resolveBaseUrl(config);
|
|
24
|
+
return await parseResponse(await config.fetchImpl(`${baseUrl}/api/v1/argument/${argumentId}/${version}/claims/${claimId}/source/${sourceId}`, { method: "DELETE" }), ClaimSourceDeleteResponseSchema);
|
|
19
25
|
}
|
|
20
26
|
//# sourceMappingURL=claims.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claims.js","sourceRoot":"","sources":["../../../src/api-client/argument/claims.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAC9E,OAAO,EACH,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,+BAA+B,EAC/B,oBAAoB,GACvB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACH,sBAAsB,GAEzB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEjE,MAAM,CAAC,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"claims.js","sourceRoot":"","sources":["../../../src/api-client/argument/claims.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AAC9E,OAAO,EACH,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,+BAA+B,EAC/B,oBAAoB,GACvB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EACH,sBAAsB,GAEzB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,MAAwB,EACxB,UAAkB,EAClB,OAAe,EACf,SAA8B;IAE9B,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,OAAO,MAAM,WAAW,CACpB,GAAG,OAAO,oBAAoB,UAAU,IAAI,OAAO,SAAS,EAC5D,EAAE,MAAM,EAAE,MAAM,EAAE,EAClB,EAAE,SAAS,EAAE,EACb,0BAA0B,EAC1B,2BAA2B,EAC3B,MAAM,CAAC,SAAS,CACnB,CAAA;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,MAAwB,EACxB,UAAkB,EAClB,OAAe,EACf,OAAe;IAEf,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,OAAO,MAAM,aAAa,CACtB,MAAM,MAAM,CAAC,SAAS,CAClB,GAAG,OAAO,oBAAoB,UAAU,IAAI,OAAO,WAAW,OAAO,EAAE,EACvE,EAAE,MAAM,EAAE,QAAQ,EAAE,CACvB,EACD,2BAA2B,CAC9B,CAAA;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,MAAwB,EACxB,UAAkB,EAClB,OAAe,EACf,OAAe,EACf,IAAwB;IAExB,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,OAAO,MAAM,WAAW,CACpB,GAAG,OAAO,oBAAoB,UAAU,IAAI,OAAO,WAAW,OAAO,EAAE,EACvE,EAAE,MAAM,EAAE,KAAK,EAAE,EACjB,EAAE,GAAG,IAAI,EAAE,EACX,wBAAwB,EACxB,WAAW,EACX,MAAM,CAAC,SAAS,CACnB,CAAA;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACvC,MAAwB,EACxB,UAAkB,EAClB,OAAe,EACf,OAAe,EACf,QAAwB;IAExB,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,OAAO,MAAM,WAAW,CACpB,GAAG,OAAO,oBAAoB,UAAU,IAAI,OAAO,WAAW,OAAO,SAAS,EAC9E,EAAE,MAAM,EAAE,MAAM,EAAE,EAClB,QAAQ,EACR,sBAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,EACrC,oBAAoB,EACpB,MAAM,CAAC,SAAS,CACnB,CAAA;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACvC,MAAwB,EACxB,UAAkB,EAClB,OAAe,EACf,OAAe,EACf,QAAgB;IAEhB,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,OAAO,MAAM,aAAa,CACtB,MAAM,MAAM,CAAC,SAAS,CAClB,GAAG,OAAO,oBAAoB,UAAU,IAAI,OAAO,WAAW,OAAO,WAAW,QAAQ,EAAE,EAC1F,EAAE,MAAM,EAAE,QAAQ,EAAE,CACvB,EACD,+BAA+B,CAClC,CAAA;AACL,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type TUpdateArgumentRequest, type TCreateArgument } from "../../schemas/api/argument/index.js";
|
|
2
2
|
import { Type } from "typebox";
|
|
3
|
-
|
|
3
|
+
import type { TApiClientConfig } from "../config.js";
|
|
4
|
+
export declare function getArgumentImpl(config: TApiClientConfig, argumentId: string, version: number): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
4
5
|
errorID: Type.TNumber;
|
|
5
6
|
errorMessage: Type.TString;
|
|
6
7
|
statusCode: Type.TNumber;
|
|
@@ -21,9 +22,6 @@ export declare function getArgument(argumentId: string, version: number, fetchFn
|
|
|
21
22
|
popularity: Type.TNumber;
|
|
22
23
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
23
24
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
24
|
-
argumentTitle: Type.TString;
|
|
25
|
-
textContent: Type.TNull;
|
|
26
|
-
}>, Type.TObject<{
|
|
27
25
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
28
26
|
textContent: Type.TString;
|
|
29
27
|
postUrl: Type.TString;
|
|
@@ -50,12 +48,15 @@ export declare function getArgument(argumentId: string, version: number, fetchFn
|
|
|
50
48
|
}>, Type.TObject<{
|
|
51
49
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
52
50
|
textContent: Type.TString;
|
|
51
|
+
}>, Type.TObject<{
|
|
52
|
+
argumentTitle: Type.TString;
|
|
53
|
+
textContent: Type.TNull;
|
|
53
54
|
}>]>, Type.TNull]>;
|
|
54
55
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
55
56
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
56
57
|
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
57
58
|
}>]>>>;
|
|
58
|
-
export declare function
|
|
59
|
+
export declare function publishArgumentImpl(config: TApiClientConfig, argumentId: string, version: number): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
59
60
|
errorID: Type.TNumber;
|
|
60
61
|
errorMessage: Type.TString;
|
|
61
62
|
statusCode: Type.TNumber;
|
|
@@ -77,9 +78,6 @@ export declare function publishArgument(argumentId: string, version: number, fet
|
|
|
77
78
|
popularity: Type.TNumber;
|
|
78
79
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
79
80
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
80
|
-
argumentTitle: Type.TString;
|
|
81
|
-
textContent: Type.TNull;
|
|
82
|
-
}>, Type.TObject<{
|
|
83
81
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
84
82
|
textContent: Type.TString;
|
|
85
83
|
postUrl: Type.TString;
|
|
@@ -106,6 +104,9 @@ export declare function publishArgument(argumentId: string, version: number, fet
|
|
|
106
104
|
}>, Type.TObject<{
|
|
107
105
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
108
106
|
textContent: Type.TString;
|
|
107
|
+
}>, Type.TObject<{
|
|
108
|
+
argumentTitle: Type.TString;
|
|
109
|
+
textContent: Type.TNull;
|
|
109
110
|
}>]>, Type.TNull]>;
|
|
110
111
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
111
112
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
@@ -128,9 +129,6 @@ export declare function publishArgument(argumentId: string, version: number, fet
|
|
|
128
129
|
popularity: Type.TNumber;
|
|
129
130
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
130
131
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
131
|
-
argumentTitle: Type.TString;
|
|
132
|
-
textContent: Type.TNull;
|
|
133
|
-
}>, Type.TObject<{
|
|
134
132
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
135
133
|
textContent: Type.TString;
|
|
136
134
|
postUrl: Type.TString;
|
|
@@ -157,13 +155,16 @@ export declare function publishArgument(argumentId: string, version: number, fet
|
|
|
157
155
|
}>, Type.TObject<{
|
|
158
156
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
159
157
|
textContent: Type.TString;
|
|
158
|
+
}>, Type.TObject<{
|
|
159
|
+
argumentTitle: Type.TString;
|
|
160
|
+
textContent: Type.TNull;
|
|
160
161
|
}>]>, Type.TNull]>;
|
|
161
162
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
162
163
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
163
164
|
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
164
165
|
}>]>;
|
|
165
166
|
}>>>;
|
|
166
|
-
export declare function
|
|
167
|
+
export declare function resetArgumentImpl(config: TApiClientConfig, argumentId: string, version: number): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
167
168
|
errorID: Type.TNumber;
|
|
168
169
|
errorMessage: Type.TString;
|
|
169
170
|
statusCode: Type.TNumber;
|
|
@@ -184,9 +185,6 @@ export declare function resetArgument(argumentId: string, version: number, fetch
|
|
|
184
185
|
popularity: Type.TNumber;
|
|
185
186
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
186
187
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
187
|
-
argumentTitle: Type.TString;
|
|
188
|
-
textContent: Type.TNull;
|
|
189
|
-
}>, Type.TObject<{
|
|
190
188
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
191
189
|
textContent: Type.TString;
|
|
192
190
|
postUrl: Type.TString;
|
|
@@ -213,12 +211,15 @@ export declare function resetArgument(argumentId: string, version: number, fetch
|
|
|
213
211
|
}>, Type.TObject<{
|
|
214
212
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
215
213
|
textContent: Type.TString;
|
|
214
|
+
}>, Type.TObject<{
|
|
215
|
+
argumentTitle: Type.TString;
|
|
216
|
+
textContent: Type.TNull;
|
|
216
217
|
}>]>, Type.TNull]>;
|
|
217
218
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
218
219
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
219
220
|
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
220
221
|
}>]>>>;
|
|
221
|
-
export declare function
|
|
222
|
+
export declare function forkArgumentImpl(config: TApiClientConfig, argumentId: string, version: number): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
222
223
|
errorID: Type.TNumber;
|
|
223
224
|
errorMessage: Type.TString;
|
|
224
225
|
statusCode: Type.TNumber;
|
|
@@ -239,9 +240,6 @@ export declare function forkArgument(argumentId: string, version: number, fetchF
|
|
|
239
240
|
popularity: Type.TNumber;
|
|
240
241
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
241
242
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
242
|
-
argumentTitle: Type.TString;
|
|
243
|
-
textContent: Type.TNull;
|
|
244
|
-
}>, Type.TObject<{
|
|
245
243
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
246
244
|
textContent: Type.TString;
|
|
247
245
|
postUrl: Type.TString;
|
|
@@ -268,12 +266,15 @@ export declare function forkArgument(argumentId: string, version: number, fetchF
|
|
|
268
266
|
}>, Type.TObject<{
|
|
269
267
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
270
268
|
textContent: Type.TString;
|
|
269
|
+
}>, Type.TObject<{
|
|
270
|
+
argumentTitle: Type.TString;
|
|
271
|
+
textContent: Type.TNull;
|
|
271
272
|
}>]>, Type.TNull]>;
|
|
272
273
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
273
274
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
274
275
|
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
275
276
|
}>]>>>;
|
|
276
|
-
export declare function
|
|
277
|
+
export declare function getArgumentDiffImpl(config: TApiClientConfig, argumentId: string, version: number, otherArgId: string, otherArgVersion: number): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
277
278
|
errorID: Type.TNumber;
|
|
278
279
|
errorMessage: Type.TString;
|
|
279
280
|
statusCode: Type.TNumber;
|
|
@@ -579,7 +580,7 @@ export declare function getArgumentDiff(argumentId: string, version: number, oth
|
|
|
579
580
|
}>>;
|
|
580
581
|
}>;
|
|
581
582
|
}>>>;
|
|
582
|
-
export declare function
|
|
583
|
+
export declare function getArgumentForksImpl(config: TApiClientConfig, argumentId: string, version: number): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
583
584
|
errorID: Type.TNumber;
|
|
584
585
|
errorMessage: Type.TString;
|
|
585
586
|
statusCode: Type.TNumber;
|
|
@@ -601,9 +602,6 @@ export declare function getArgumentForks(argumentId: string, version: number, fe
|
|
|
601
602
|
popularity: Type.TNumber;
|
|
602
603
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
603
604
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
604
|
-
argumentTitle: Type.TString;
|
|
605
|
-
textContent: Type.TNull;
|
|
606
|
-
}>, Type.TObject<{
|
|
607
605
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
608
606
|
textContent: Type.TString;
|
|
609
607
|
postUrl: Type.TString;
|
|
@@ -630,6 +628,9 @@ export declare function getArgumentForks(argumentId: string, version: number, fe
|
|
|
630
628
|
}>, Type.TObject<{
|
|
631
629
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
632
630
|
textContent: Type.TString;
|
|
631
|
+
}>, Type.TObject<{
|
|
632
|
+
argumentTitle: Type.TString;
|
|
633
|
+
textContent: Type.TNull;
|
|
633
634
|
}>]>, Type.TNull]>;
|
|
634
635
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
635
636
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
@@ -638,7 +639,7 @@ export declare function getArgumentForks(argumentId: string, version: number, fe
|
|
|
638
639
|
forkId: Type.TString;
|
|
639
640
|
}>]>>;
|
|
640
641
|
}>>>;
|
|
641
|
-
export declare function
|
|
642
|
+
export declare function claimUnownedArgumentImpl(config: TApiClientConfig, argumentId: string, version: number): Promise<void>;
|
|
642
643
|
export type GetAllArgumentsParams = {
|
|
643
644
|
owned?: boolean;
|
|
644
645
|
limit?: number;
|
|
@@ -646,7 +647,7 @@ export type GetAllArgumentsParams = {
|
|
|
646
647
|
titlePattern?: string;
|
|
647
648
|
orderByPopularity?: boolean;
|
|
648
649
|
};
|
|
649
|
-
export declare function
|
|
650
|
+
export declare function getAllArgumentsImpl(config: TApiClientConfig, params?: GetAllArgumentsParams): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
650
651
|
errorID: Type.TNumber;
|
|
651
652
|
errorMessage: Type.TString;
|
|
652
653
|
statusCode: Type.TNumber;
|
|
@@ -667,9 +668,6 @@ export declare function getAllArguments(params?: GetAllArgumentsParams, fetchFn?
|
|
|
667
668
|
popularity: Type.TNumber;
|
|
668
669
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
669
670
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
670
|
-
argumentTitle: Type.TString;
|
|
671
|
-
textContent: Type.TNull;
|
|
672
|
-
}>, Type.TObject<{
|
|
673
671
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
674
672
|
textContent: Type.TString;
|
|
675
673
|
postUrl: Type.TString;
|
|
@@ -696,6 +694,9 @@ export declare function getAllArguments(params?: GetAllArgumentsParams, fetchFn?
|
|
|
696
694
|
}>, Type.TObject<{
|
|
697
695
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
698
696
|
textContent: Type.TString;
|
|
697
|
+
}>, Type.TObject<{
|
|
698
|
+
argumentTitle: Type.TString;
|
|
699
|
+
textContent: Type.TNull;
|
|
699
700
|
}>]>, Type.TNull]>;
|
|
700
701
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
701
702
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
@@ -704,7 +705,7 @@ export declare function getAllArguments(params?: GetAllArgumentsParams, fetchFn?
|
|
|
704
705
|
upvotes: Type.TNumber;
|
|
705
706
|
downvotes: Type.TNumber;
|
|
706
707
|
}>]>>>>;
|
|
707
|
-
export declare function
|
|
708
|
+
export declare function createArgumentImpl(config: TApiClientConfig, data: TCreateArgument): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
708
709
|
errorID: Type.TNumber;
|
|
709
710
|
errorMessage: Type.TString;
|
|
710
711
|
statusCode: Type.TNumber;
|
|
@@ -725,9 +726,6 @@ export declare function createArgument(data: TCreateArgument, fetchFn?: typeof f
|
|
|
725
726
|
popularity: Type.TNumber;
|
|
726
727
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
727
728
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
728
|
-
argumentTitle: Type.TString;
|
|
729
|
-
textContent: Type.TNull;
|
|
730
|
-
}>, Type.TObject<{
|
|
731
729
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
732
730
|
textContent: Type.TString;
|
|
733
731
|
postUrl: Type.TString;
|
|
@@ -754,12 +752,15 @@ export declare function createArgument(data: TCreateArgument, fetchFn?: typeof f
|
|
|
754
752
|
}>, Type.TObject<{
|
|
755
753
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
756
754
|
textContent: Type.TString;
|
|
755
|
+
}>, Type.TObject<{
|
|
756
|
+
argumentTitle: Type.TString;
|
|
757
|
+
textContent: Type.TNull;
|
|
757
758
|
}>]>, Type.TNull]>;
|
|
758
759
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
759
760
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
760
761
|
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
761
762
|
}>]>>>;
|
|
762
|
-
export declare function
|
|
763
|
+
export declare function getLatestArgumentImpl(config: TApiClientConfig, argumentId: string): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
763
764
|
errorID: Type.TNumber;
|
|
764
765
|
errorMessage: Type.TString;
|
|
765
766
|
statusCode: Type.TNumber;
|
|
@@ -780,9 +781,6 @@ export declare function getLatestArgument(argumentId: string, fetchFn?: typeof f
|
|
|
780
781
|
popularity: Type.TNumber;
|
|
781
782
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
782
783
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
783
|
-
argumentTitle: Type.TString;
|
|
784
|
-
textContent: Type.TNull;
|
|
785
|
-
}>, Type.TObject<{
|
|
786
784
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
787
785
|
textContent: Type.TString;
|
|
788
786
|
postUrl: Type.TString;
|
|
@@ -809,12 +807,15 @@ export declare function getLatestArgument(argumentId: string, fetchFn?: typeof f
|
|
|
809
807
|
}>, Type.TObject<{
|
|
810
808
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
811
809
|
textContent: Type.TString;
|
|
810
|
+
}>, Type.TObject<{
|
|
811
|
+
argumentTitle: Type.TString;
|
|
812
|
+
textContent: Type.TNull;
|
|
812
813
|
}>]>, Type.TNull]>;
|
|
813
814
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
814
815
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
815
816
|
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
816
817
|
}>]>>>;
|
|
817
|
-
export declare function
|
|
818
|
+
export declare function updateArgumentImpl(config: TApiClientConfig, argumentId: string, version: number, data: TUpdateArgumentRequest): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
818
819
|
errorID: Type.TNumber;
|
|
819
820
|
errorMessage: Type.TString;
|
|
820
821
|
statusCode: Type.TNumber;
|
|
@@ -835,9 +836,6 @@ export declare function updateArgument(argumentId: string, version: number, data
|
|
|
835
836
|
popularity: Type.TNumber;
|
|
836
837
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
837
838
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
838
|
-
argumentTitle: Type.TString;
|
|
839
|
-
textContent: Type.TNull;
|
|
840
|
-
}>, Type.TObject<{
|
|
841
839
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
842
840
|
textContent: Type.TString;
|
|
843
841
|
postUrl: Type.TString;
|
|
@@ -864,22 +862,25 @@ export declare function updateArgument(argumentId: string, version: number, data
|
|
|
864
862
|
}>, Type.TObject<{
|
|
865
863
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
866
864
|
textContent: Type.TString;
|
|
865
|
+
}>, Type.TObject<{
|
|
866
|
+
argumentTitle: Type.TString;
|
|
867
|
+
textContent: Type.TNull;
|
|
867
868
|
}>]>, Type.TNull]>;
|
|
868
869
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
869
870
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
870
871
|
description: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
871
872
|
}>]>>>;
|
|
872
|
-
export declare function
|
|
873
|
+
export declare function archiveArgumentImpl(config: TApiClientConfig, argumentId: string, version: number): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
873
874
|
errorID: Type.TNumber;
|
|
874
875
|
errorMessage: Type.TString;
|
|
875
876
|
statusCode: Type.TNumber;
|
|
876
877
|
}>> | import("../../schemas/common.js").ParsedSuccess<Type.TBoolean>>;
|
|
877
|
-
export declare function
|
|
878
|
+
export declare function deleteArgumentImpl(config: TApiClientConfig, argumentId: string, version: number): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
878
879
|
errorID: Type.TNumber;
|
|
879
880
|
errorMessage: Type.TString;
|
|
880
881
|
statusCode: Type.TNumber;
|
|
881
882
|
}>> | import("../../schemas/common.js").ParsedSuccess<Type.TBoolean>>;
|
|
882
|
-
export declare function
|
|
883
|
+
export declare function getEntireArgumentImpl(config: TApiClientConfig, argumentId: string, version: number): Promise<import("../../schemas/common.js").ParsedError<Type.TObject<{
|
|
883
884
|
errorID: Type.TNumber;
|
|
884
885
|
errorMessage: Type.TString;
|
|
885
886
|
statusCode: Type.TNumber;
|
|
@@ -901,9 +902,6 @@ export declare function getEntireArgument(argumentId: string, version: number, f
|
|
|
901
902
|
popularity: Type.TNumber;
|
|
902
903
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
903
904
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
904
|
-
argumentTitle: Type.TString;
|
|
905
|
-
textContent: Type.TNull;
|
|
906
|
-
}>, Type.TObject<{
|
|
907
905
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
908
906
|
textContent: Type.TString;
|
|
909
907
|
postUrl: Type.TString;
|
|
@@ -930,6 +928,9 @@ export declare function getEntireArgument(argumentId: string, version: number, f
|
|
|
930
928
|
}>, Type.TObject<{
|
|
931
929
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
932
930
|
textContent: Type.TString;
|
|
931
|
+
}>, Type.TObject<{
|
|
932
|
+
argumentTitle: Type.TString;
|
|
933
|
+
textContent: Type.TNull;
|
|
933
934
|
}>]>, Type.TNull]>;
|
|
934
935
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
935
936
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
@@ -965,9 +966,6 @@ export declare function getEntireArgument(argumentId: string, version: number, f
|
|
|
965
966
|
popularity: Type.TNumber;
|
|
966
967
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
967
968
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
968
|
-
argumentTitle: Type.TString;
|
|
969
|
-
textContent: Type.TNull;
|
|
970
|
-
}>, Type.TObject<{
|
|
971
969
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
972
970
|
textContent: Type.TString;
|
|
973
971
|
postUrl: Type.TString;
|
|
@@ -994,6 +992,9 @@ export declare function getEntireArgument(argumentId: string, version: number, f
|
|
|
994
992
|
}>, Type.TObject<{
|
|
995
993
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
996
994
|
textContent: Type.TString;
|
|
995
|
+
}>, Type.TObject<{
|
|
996
|
+
argumentTitle: Type.TString;
|
|
997
|
+
textContent: Type.TNull;
|
|
997
998
|
}>]>, Type.TNull]>;
|
|
998
999
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
999
1000
|
}>, Type.TObject<{
|
|
@@ -1143,9 +1144,6 @@ export declare function getEntireArgument(argumentId: string, version: number, f
|
|
|
1143
1144
|
popularity: Type.TNumber;
|
|
1144
1145
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
1145
1146
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
1146
|
-
argumentTitle: Type.TString;
|
|
1147
|
-
textContent: Type.TNull;
|
|
1148
|
-
}>, Type.TObject<{
|
|
1149
1147
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
1150
1148
|
textContent: Type.TString;
|
|
1151
1149
|
postUrl: Type.TString;
|
|
@@ -1172,6 +1170,9 @@ export declare function getEntireArgument(argumentId: string, version: number, f
|
|
|
1172
1170
|
}>, Type.TObject<{
|
|
1173
1171
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
1174
1172
|
textContent: Type.TString;
|
|
1173
|
+
}>, Type.TObject<{
|
|
1174
|
+
argumentTitle: Type.TString;
|
|
1175
|
+
textContent: Type.TNull;
|
|
1175
1176
|
}>]>, Type.TNull]>;
|
|
1176
1177
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
1177
1178
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
@@ -1194,9 +1195,6 @@ export declare function getEntireArgument(argumentId: string, version: number, f
|
|
|
1194
1195
|
popularity: Type.TNumber;
|
|
1195
1196
|
platform: Type.TUnion<[Type.TLiteral<"twitter">, Type.TLiteral<"reddit">, Type.TLiteral<"raw_text">, Type.TLiteral<"manual">]>;
|
|
1196
1197
|
platformData: Type.TUnion<[Type.TUnion<[Type.TObject<{
|
|
1197
|
-
argumentTitle: Type.TString;
|
|
1198
|
-
textContent: Type.TNull;
|
|
1199
|
-
}>, Type.TObject<{
|
|
1200
1198
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
1201
1199
|
textContent: Type.TString;
|
|
1202
1200
|
postUrl: Type.TString;
|
|
@@ -1223,6 +1221,9 @@ export declare function getEntireArgument(argumentId: string, version: number, f
|
|
|
1223
1221
|
}>, Type.TObject<{
|
|
1224
1222
|
argumentTitle: Type.TOptional<Type.TString>;
|
|
1225
1223
|
textContent: Type.TString;
|
|
1224
|
+
}>, Type.TObject<{
|
|
1225
|
+
argumentTitle: Type.TString;
|
|
1226
|
+
textContent: Type.TNull;
|
|
1226
1227
|
}>]>, Type.TNull]>;
|
|
1227
1228
|
platformUsername: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
1228
1229
|
titleContentHash: Type.TUnion<[Type.TString, Type.TNull]>;
|