@proposit/shared 0.24.0 → 0.26.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 +15 -6
- package/dist/api-client/argument/batch.d.ts.map +1 -1
- package/dist/api-client/argument/claims.d.ts +52 -25
- package/dist/api-client/argument/claims.d.ts.map +1 -1
- package/dist/api-client/argument/index.d.ts +51 -24
- package/dist/api-client/argument/index.d.ts.map +1 -1
- package/dist/api-client/argument/logic/index.d.ts +6 -0
- package/dist/api-client/argument/logic/index.d.ts.map +1 -1
- package/dist/api-client/argument/logic/repair.d.ts +1 -0
- package/dist/api-client/argument/logic/repair.d.ts.map +1 -1
- package/dist/api-client/argument/versioning.d.ts +573 -0
- package/dist/api-client/argument/versioning.d.ts.map +1 -0
- package/dist/api-client/argument/versioning.js +45 -0
- package/dist/api-client/argument/versioning.js.map +1 -0
- package/dist/api-client/factory.d.ts +4 -0
- package/dist/api-client/factory.d.ts.map +1 -1
- package/dist/api-client/factory.js +4 -0
- package/dist/api-client/factory.js.map +1 -1
- package/dist/api-client/user/citations.d.ts +24 -12
- package/dist/api-client/user/citations.d.ts.map +1 -1
- package/dist/api-client/user/claims.d.ts +13 -6
- package/dist/api-client/user/claims.d.ts.map +1 -1
- package/dist/engine/engine.d.ts +58 -1
- package/dist/engine/engine.d.ts.map +1 -1
- package/dist/engine/engine.js +148 -2
- package/dist/engine/engine.js.map +1 -1
- package/dist/engine/mutations/premises.d.ts +1 -0
- package/dist/engine/mutations/premises.d.ts.map +1 -1
- package/dist/engine/mutations/premises.js +8 -0
- package/dist/engine/mutations/premises.js.map +1 -1
- package/dist/schemas/api/argument/batch/change-edge-operator.d.ts +1 -0
- package/dist/schemas/api/argument/batch/change-edge-operator.d.ts.map +1 -1
- package/dist/schemas/api/argument/batch/create-expression-with-operator.d.ts +1 -0
- package/dist/schemas/api/argument/batch/create-expression-with-operator.d.ts.map +1 -1
- package/dist/schemas/api/argument/batch/provision.d.ts +13 -6
- package/dist/schemas/api/argument/batch/provision.d.ts.map +1 -1
- package/dist/schemas/api/argument/claims.d.ts +40 -19
- package/dist/schemas/api/argument/claims.d.ts.map +1 -1
- package/dist/schemas/api/argument/index.d.ts +14 -6
- package/dist/schemas/api/argument/index.d.ts.map +1 -1
- package/dist/schemas/api/argument/index.js +1 -0
- package/dist/schemas/api/argument/index.js.map +1 -1
- package/dist/schemas/api/argument/logic.d.ts +1 -0
- package/dist/schemas/api/argument/logic.d.ts.map +1 -1
- package/dist/schemas/api/argument/repair.d.ts +1 -0
- package/dist/schemas/api/argument/repair.d.ts.map +1 -1
- package/dist/schemas/api/argument/versioning.d.ts +44 -0
- package/dist/schemas/api/argument/versioning.d.ts.map +1 -0
- package/dist/schemas/api/argument/versioning.js +44 -0
- package/dist/schemas/api/argument/versioning.js.map +1 -0
- package/dist/schemas/api/citations.d.ts +60 -30
- package/dist/schemas/api/citations.d.ts.map +1 -1
- package/dist/schemas/api/claims.d.ts +26 -12
- package/dist/schemas/api/claims.d.ts.map +1 -1
- package/dist/schemas/logic.d.ts +1 -0
- package/dist/schemas/logic.d.ts.map +1 -1
- package/dist/schemas/logic.js +7 -0
- package/dist/schemas/logic.js.map +1 -1
- package/dist/schemas/model/arguments.d.ts +38 -18
- package/dist/schemas/model/arguments.d.ts.map +1 -1
- package/dist/schemas/model/claims.d.ts +31 -14
- package/dist/schemas/model/claims.d.ts.map +1 -1
- package/dist/schemas/model/claims.js +31 -9
- package/dist/schemas/model/claims.js.map +1 -1
- package/dist/schemas/model/forks.d.ts +1 -1
- package/dist/schemas/model/forks.d.ts.map +1 -1
- package/dist/schemas/model/forks.js +9 -1
- package/dist/schemas/model/forks.js.map +1 -1
- package/dist/schemas/snapshot.d.ts +1 -0
- package/dist/schemas/snapshot.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioning.d.ts","sourceRoot":"","sources":["../../../src/api-client/argument/vers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ResponseSchema, } from "../../schemas/api/argument/versioning.js";
|
|
2
|
+
import { ClaimSchema } from "../../schemas/model/claims.js";
|
|
3
|
+
import { strictFetch } from "../../utils/utils.js";
|
|
4
|
+
import { resolveBaseUrl } from "../internal.js";
|
|
5
|
+
/**
|
|
6
|
+
* `GET /api/v1/claim/[claimId]/latest`
|
|
7
|
+
*
|
|
8
|
+
* Returns the full claim object at its highest published version. The response
|
|
9
|
+
* IS a claim, so it is validated against `ClaimSchema` on the way out.
|
|
10
|
+
*/
|
|
11
|
+
export async function getLatestClaimImpl(config, claimId) {
|
|
12
|
+
const baseUrl = resolveBaseUrl(config);
|
|
13
|
+
return await strictFetch(`${baseUrl}/api/v1/claim/${claimId}/latest`, { method: "GET" }, undefined, undefined, ClaimSchema, config.fetchImpl);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* `GET /api/v1/claim/[claimId]/latest-version?pinned=<number>`
|
|
17
|
+
*
|
|
18
|
+
* Reports the claim trunk's latest published version and whether it is newer
|
|
19
|
+
* than the `pinned` version the caller currently references. Omit `pinned` to
|
|
20
|
+
* just learn the latest published head (`hasNewer` is then `false`).
|
|
21
|
+
*/
|
|
22
|
+
export async function getLatestClaimVersionImpl(config, claimId, pinned) {
|
|
23
|
+
const baseUrl = resolveBaseUrl(config);
|
|
24
|
+
let uri = `${baseUrl}/api/v1/claim/${claimId}/latest-version`;
|
|
25
|
+
if (pinned !== undefined) {
|
|
26
|
+
const params = new URLSearchParams({ pinned: String(pinned) });
|
|
27
|
+
uri = `${uri}?${params.toString()}`;
|
|
28
|
+
}
|
|
29
|
+
return await strictFetch(uri, { method: "GET" }, undefined, undefined, ClaimLatestVersionResponseSchema, config.fetchImpl);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `POST /api/v1/argument/[argumentId]/[version]/claim/[claimId]/advance`
|
|
33
|
+
*
|
|
34
|
+
* Repins the draft argument's variable(s) referencing the claim to a newer
|
|
35
|
+
* published version. Omit `toVersion` to advance to the claim's latest
|
|
36
|
+
* published head; supply it to repin to an explicit target version.
|
|
37
|
+
*/
|
|
38
|
+
export async function advanceClaimReferenceImpl(config, argumentId, version, claimId, toVersion) {
|
|
39
|
+
const baseUrl = resolveBaseUrl(config);
|
|
40
|
+
const payload = {};
|
|
41
|
+
if (toVersion !== undefined)
|
|
42
|
+
payload.toVersion = toVersion;
|
|
43
|
+
return await strictFetch(`${baseUrl}/api/v1/argument/${argumentId}/${version}/claim/${claimId}/advance`, { method: "POST" }, payload, AdvanceClaimReferenceRequestSchema, AdvanceClaimReferenceResponseSchema, config.fetchImpl);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=versioning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioning.js","sourceRoot":"","sources":["../../../src/api-client/argument/versioning.ts"],"names":[],"mappings":"AACA,OAAO,EACH,gCAAgC,EAChC,kCAAkC,EAClC,mCAAmC,GACtC,MAAM,0CAA0C,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACpC,MAAwB,EACxB,OAAe;IAEf,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,OAAO,MAAM,WAAW,CACpB,GAAG,OAAO,iBAAiB,OAAO,SAAS,EAC3C,EAAE,MAAM,EAAE,KAAK,EAAE,EACjB,SAAS,EACT,SAAS,EACT,WAAW,EACX,MAAM,CAAC,SAAS,CACnB,CAAA;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC3C,MAAwB,EACxB,OAAe,EACf,MAAe;IAEf,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,IAAI,GAAG,GAAG,GAAG,OAAO,iBAAiB,OAAO,iBAAiB,CAAA;IAC7D,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QAC9D,GAAG,GAAG,GAAG,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAA;IACvC,CAAC;IACD,OAAO,MAAM,WAAW,CACpB,GAAG,EACH,EAAE,MAAM,EAAE,KAAK,EAAE,EACjB,SAAS,EACT,SAAS,EACT,gCAAgC,EAChC,MAAM,CAAC,SAAS,CACnB,CAAA;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC3C,MAAwB,EACxB,UAAkB,EAClB,OAAe,EACf,OAAe,EACf,SAAkB;IAElB,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAA;IACtC,MAAM,OAAO,GAAe,EAAE,CAAA;IAC9B,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,CAAC,SAAS,GAAG,SAAS,CAAA;IAC1D,OAAO,MAAM,WAAW,CACpB,GAAG,OAAO,oBAAoB,UAAU,IAAI,OAAO,UAAU,OAAO,UAAU,EAC9E,EAAE,MAAM,EAAE,MAAM,EAAE,EAClB,OAAO,EACP,kCAAkC,EAClC,mCAAmC,EACnC,MAAM,CAAC,SAAS,CACnB,CAAA;AACL,CAAC"}
|
|
@@ -2,6 +2,7 @@ import type { TApiClientConfig } from "./config.js";
|
|
|
2
2
|
import { getArgumentImpl, publishArgumentImpl, resetArgumentImpl, forkArgumentImpl, getArgumentDiffImpl, getArgumentForksImpl, claimUnownedArgumentImpl, getAllArgumentsImpl, createArgumentImpl, getLatestArgumentImpl, updateArgumentImpl, archiveArgumentImpl, deleteArgumentImpl, getEntireArgumentImpl } from "./argument/index.js";
|
|
3
3
|
import { provisionArgumentImpl, createExpressionWithOperatorImpl, changeEdgeOperatorImpl } from "./argument/batch.js";
|
|
4
4
|
import { createClaimImpl, deleteClaimImpl, updateClaimImpl, createClaimCitationImpl, deleteClaimCitationImpl, createClaimAxiomImpl } from "./argument/claims.js";
|
|
5
|
+
import { getLatestClaimImpl, getLatestClaimVersionImpl, advanceClaimReferenceImpl } from "./argument/versioning.js";
|
|
5
6
|
import { createReactionImpl, deleteReactionImpl } from "./argument/reactions.js";
|
|
6
7
|
import { getMyReviewImpl, createReviewRemoteImpl, getReviewByIdRemoteImpl, patchReviewRemoteImpl, deleteReviewRemoteImpl, setReviewVisibilityImpl } from "./argument/reviews.js";
|
|
7
8
|
import { getLogicDataImpl, getPremisesImpl, createPremiseImpl, updatePremiseImpl, deletePremiseImpl, getPremiseImpl, getExpressionsImpl, createExpressionImpl, updateExpressionImpl, deleteExpressionImpl, getExpressionImpl, toggleNegationImpl, getVariablesImpl, createVariableImpl, updateVariableImpl, deleteVariableImpl, getVariableImpl } from "./argument/logic/index.js";
|
|
@@ -42,6 +43,9 @@ declare const impls: {
|
|
|
42
43
|
readonly createClaimCitation: typeof createClaimCitationImpl;
|
|
43
44
|
readonly deleteClaimCitation: typeof deleteClaimCitationImpl;
|
|
44
45
|
readonly createClaimAxiom: typeof createClaimAxiomImpl;
|
|
46
|
+
readonly getLatestClaim: typeof getLatestClaimImpl;
|
|
47
|
+
readonly getLatestClaimVersion: typeof getLatestClaimVersionImpl;
|
|
48
|
+
readonly advanceClaimReference: typeof advanceClaimReferenceImpl;
|
|
45
49
|
readonly createReaction: typeof createReactionImpl;
|
|
46
50
|
readonly deleteReaction: typeof deleteReactionImpl;
|
|
47
51
|
readonly getMyReview: typeof getMyReviewImpl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/api-client/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,OAAO,EACH,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AA;AACnC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD;;;GAGG;AACH,QAAA,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/api-client/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACxB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACH,qBAAqB,EACrB,gCAAgC,EAChC,sBAAsB,EACzB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACH,eAAe,EACf,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EAC5B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAChF,OAAO,EACH,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EAC1B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,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forkArgumentImpl, getArgumentDiffImpl, getArgumentForksImpl, claimUnownedArgumentImpl, getAllArgumentsImpl, createArgumentImpl, getLatestArgumentImpl, updateArgumentImpl, archiveArgumentImpl, deleteArgumentImpl, getEntireArgumentImpl, } from "./argument/index.js";
|
|
2
2
|
import { provisionArgumentImpl, createExpressionWithOperatorImpl, changeEdgeOperatorImpl, } from "./argument/batch.js";
|
|
3
3
|
import { createClaimImpl, deleteClaimImpl, updateClaimImpl, createClaimCitationImpl, deleteClaimCitationImpl, createClaimAxiomImpl, } from "./argument/claims.js";
|
|
4
|
+
import { getLatestClaimImpl, getLatestClaimVersionImpl, advanceClaimReferenceImpl, } from "./argument/versioning.js";
|
|
4
5
|
import { createReactionImpl, deleteReactionImpl } from "./argument/reactions.js";
|
|
5
6
|
import { getMyReviewImpl, createReviewRemoteImpl, getReviewByIdRemoteImpl, patchReviewRemoteImpl, deleteReviewRemoteImpl, setReviewVisibilityImpl, } from "./argument/reviews.js";
|
|
6
7
|
import { getLogicDataImpl, getPremisesImpl, createPremiseImpl, updatePremiseImpl, deletePremiseImpl, getPremiseImpl, getExpressionsImpl, createExpressionImpl, updateExpressionImpl, deleteExpressionImpl, getExpressionImpl, toggleNegationImpl, getVariablesImpl, createVariableImpl, updateVariableImpl, deleteVariableImpl, getVariableImpl, } from "./argument/logic/index.js";
|
|
@@ -41,6 +42,9 @@ const impls = {
|
|
|
41
42
|
createClaimCitation: createClaimCitationImpl,
|
|
42
43
|
deleteClaimCitation: deleteClaimCitationImpl,
|
|
43
44
|
createClaimAxiom: createClaimAxiomImpl,
|
|
45
|
+
getLatestClaim: getLatestClaimImpl,
|
|
46
|
+
getLatestClaimVersion: getLatestClaimVersionImpl,
|
|
47
|
+
advanceClaimReference: advanceClaimReferenceImpl,
|
|
44
48
|
createReaction: createReactionImpl,
|
|
45
49
|
deleteReaction: deleteReactionImpl,
|
|
46
50
|
getMyReview: getMyReviewImpl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/api-client/factory.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,GACxB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACH,qBAAqB,EACrB,gCAAgC,EAChC,sBAAsB,GACzB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACH,eAAe,EACf,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,GACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAChF,OAAO,EACH,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GAC1B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,GAClB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EACH,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,GACzB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBA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O,MAAoB,CAAA;AAC/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/api-client/factory.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,GACxB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACH,qBAAqB,EACrB,gCAAgC,EAChC,sBAAsB,GACzB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACH,eAAe,EACf,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,GACvB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,GAC5B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAChF,OAAO,EACH,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GAC1B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,GAClB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EACH,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,GACzB,MAAM,aAAa,CAAA;AACpB,OAAO,E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EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAe,EAAW,EAAE,CAC1C,IAAqC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,CAAA;IACpE,CAAC;IACD,OAAO,MAAoB,CAAA;AAC/B,CAAC"}
|
|
@@ -21,8 +21,10 @@ export declare function getUserCitationsImpl(config: TApiClientConfig): Promise<
|
|
|
21
21
|
citation: import("typebox").TUnion<[import("typebox").TObject<{
|
|
22
22
|
digest: import("typebox").TString;
|
|
23
23
|
id: import("typebox").TString;
|
|
24
|
-
|
|
24
|
+
originArgumentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
25
25
|
version: import("typebox").TNumber;
|
|
26
|
+
published: import("typebox").TBoolean;
|
|
27
|
+
publishedOn: import("typebox").TUnion<[import("../../schemas/common.js").TDateType, import("typebox").TNull]>;
|
|
26
28
|
claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
27
29
|
creatorId: import("typebox").TString;
|
|
28
30
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
@@ -39,8 +41,10 @@ export declare function getUserCitationsImpl(config: TApiClientConfig): Promise<
|
|
|
39
41
|
}>, import("typebox").TObject<{
|
|
40
42
|
digest: import("typebox").TString;
|
|
41
43
|
id: import("typebox").TString;
|
|
42
|
-
|
|
44
|
+
originArgumentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
43
45
|
version: import("typebox").TNumber;
|
|
46
|
+
published: import("typebox").TBoolean;
|
|
47
|
+
publishedOn: import("typebox").TUnion<[import("../../schemas/common.js").TDateType, import("typebox").TNull]>;
|
|
44
48
|
claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
45
49
|
creatorId: import("typebox").TString;
|
|
46
50
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
@@ -50,8 +54,8 @@ export declare function getUserCitationsImpl(config: TApiClientConfig): Promise<
|
|
|
50
54
|
title: import("typebox").TNull;
|
|
51
55
|
body: import("typebox").TNull;
|
|
52
56
|
titleContentHash: import("typebox").TNull;
|
|
53
|
-
url: import("typebox").TString
|
|
54
|
-
citation: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").
|
|
57
|
+
url: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
58
|
+
citation: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TIntersect<[import("typebox").TObject<{
|
|
55
59
|
type: import("typebox").TUnion<[import("typebox").TLiteral<"Book">, import("typebox").TLiteral<"Website">, import("typebox").TLiteral<"BookChapter">, import("typebox").TLiteral<"Handbook">, import("typebox").TLiteral<"TechnicalReport">, import("typebox").TLiteral<"Standard">, import("typebox").TLiteral<"Thesis">, import("typebox").TLiteral<"Patent">, import("typebox").TLiteral<"Dictionary">, import("typebox").TLiteral<"Encyclopedia">, import("typebox").TLiteral<"JournalArticle">, import("typebox").TLiteral<"MagazineArticle">, import("typebox").TLiteral<"NewspaperArticle">, import("typebox").TLiteral<"ConferencePaper">, import("typebox").TLiteral<"ConferenceProceedings">, import("typebox").TLiteral<"Dataset">, import("typebox").TLiteral<"Software">, import("typebox").TLiteral<"OnlineDocument">, import("typebox").TLiteral<"Blog">, import("typebox").TLiteral<"SocialMedia">, import("typebox").TLiteral<"Preprint">, import("typebox").TLiteral<"Video">, import("typebox").TLiteral<"Podcast">, import("typebox").TLiteral<"Course">, import("typebox").TLiteral<"Presentation">, import("typebox").TLiteral<"Interview">, import("typebox").TLiteral<"PersonalCommunication">, import("typebox").TLiteral<"Email">, import("typebox").TLiteral<"Law">, import("typebox").TLiteral<"CourtCase">, import("typebox").TLiteral<"GovernmentPublication">, import("typebox").TLiteral<"Datasheet">, import("typebox").TLiteral<"ProductManual">]>;
|
|
56
60
|
}>, import("typebox").TObject<{
|
|
57
61
|
type: import("typebox").TLiteral<"Book">;
|
|
@@ -478,14 +482,16 @@ export declare function getUserCitationsImpl(config: TApiClientConfig): Promise<
|
|
|
478
482
|
text: import("typebox").TString;
|
|
479
483
|
citationTypeGuess: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TLiteral<"Book">, import("typebox").TLiteral<"Website">, import("typebox").TLiteral<"BookChapter">, import("typebox").TLiteral<"Handbook">, import("typebox").TLiteral<"TechnicalReport">, import("typebox").TLiteral<"Standard">, import("typebox").TLiteral<"Thesis">, import("typebox").TLiteral<"Patent">, import("typebox").TLiteral<"Dictionary">, import("typebox").TLiteral<"Encyclopedia">, import("typebox").TLiteral<"JournalArticle">, import("typebox").TLiteral<"MagazineArticle">, import("typebox").TLiteral<"NewspaperArticle">, import("typebox").TLiteral<"ConferencePaper">, import("typebox").TLiteral<"ConferenceProceedings">, import("typebox").TLiteral<"Dataset">, import("typebox").TLiteral<"Software">, import("typebox").TLiteral<"OnlineDocument">, import("typebox").TLiteral<"Blog">, import("typebox").TLiteral<"SocialMedia">, import("typebox").TLiteral<"Preprint">, import("typebox").TLiteral<"Video">, import("typebox").TLiteral<"Podcast">, import("typebox").TLiteral<"Course">, import("typebox").TLiteral<"Presentation">, import("typebox").TLiteral<"Interview">, import("typebox").TLiteral<"PersonalCommunication">, import("typebox").TLiteral<"Email">, import("typebox").TLiteral<"Law">, import("typebox").TLiteral<"CourtCase">, import("typebox").TLiteral<"GovernmentPublication">, import("typebox").TLiteral<"Datasheet">, import("typebox").TLiteral<"ProductManual">]>, import("typebox").TLiteral<"unknown">]>;
|
|
480
484
|
url: import("typebox").TOptional<import("typebox").TString>;
|
|
481
|
-
}>]
|
|
485
|
+
}>]>;
|
|
482
486
|
citationContentHash: import("typebox").TString;
|
|
483
487
|
axiom: import("typebox").TNull;
|
|
484
488
|
}>, import("typebox").TObject<{
|
|
485
489
|
digest: import("typebox").TString;
|
|
486
490
|
id: import("typebox").TString;
|
|
487
|
-
|
|
491
|
+
originArgumentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
488
492
|
version: import("typebox").TNumber;
|
|
493
|
+
published: import("typebox").TBoolean;
|
|
494
|
+
publishedOn: import("typebox").TUnion<[import("../../schemas/common.js").TDateType, import("typebox").TNull]>;
|
|
489
495
|
claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
490
496
|
creatorId: import("typebox").TString;
|
|
491
497
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
@@ -510,8 +516,10 @@ export declare function getUserCitationsImpl(config: TApiClientConfig): Promise<
|
|
|
510
516
|
claim: import("typebox").TUnion<[import("typebox").TObject<{
|
|
511
517
|
digest: import("typebox").TString;
|
|
512
518
|
id: import("typebox").TString;
|
|
513
|
-
|
|
519
|
+
originArgumentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
514
520
|
version: import("typebox").TNumber;
|
|
521
|
+
published: import("typebox").TBoolean;
|
|
522
|
+
publishedOn: import("typebox").TUnion<[import("../../schemas/common.js").TDateType, import("typebox").TNull]>;
|
|
515
523
|
claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
516
524
|
creatorId: import("typebox").TString;
|
|
517
525
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
@@ -528,8 +536,10 @@ export declare function getUserCitationsImpl(config: TApiClientConfig): Promise<
|
|
|
528
536
|
}>, import("typebox").TObject<{
|
|
529
537
|
digest: import("typebox").TString;
|
|
530
538
|
id: import("typebox").TString;
|
|
531
|
-
|
|
539
|
+
originArgumentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
532
540
|
version: import("typebox").TNumber;
|
|
541
|
+
published: import("typebox").TBoolean;
|
|
542
|
+
publishedOn: import("typebox").TUnion<[import("../../schemas/common.js").TDateType, import("typebox").TNull]>;
|
|
533
543
|
claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
534
544
|
creatorId: import("typebox").TString;
|
|
535
545
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
@@ -539,8 +549,8 @@ export declare function getUserCitationsImpl(config: TApiClientConfig): Promise<
|
|
|
539
549
|
title: import("typebox").TNull;
|
|
540
550
|
body: import("typebox").TNull;
|
|
541
551
|
titleContentHash: import("typebox").TNull;
|
|
542
|
-
url: import("typebox").TString
|
|
543
|
-
citation: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").
|
|
552
|
+
url: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
553
|
+
citation: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TIntersect<[import("typebox").TObject<{
|
|
544
554
|
type: import("typebox").TUnion<[import("typebox").TLiteral<"Book">, import("typebox").TLiteral<"Website">, import("typebox").TLiteral<"BookChapter">, import("typebox").TLiteral<"Handbook">, import("typebox").TLiteral<"TechnicalReport">, import("typebox").TLiteral<"Standard">, import("typebox").TLiteral<"Thesis">, import("typebox").TLiteral<"Patent">, import("typebox").TLiteral<"Dictionary">, import("typebox").TLiteral<"Encyclopedia">, import("typebox").TLiteral<"JournalArticle">, import("typebox").TLiteral<"MagazineArticle">, import("typebox").TLiteral<"NewspaperArticle">, import("typebox").TLiteral<"ConferencePaper">, import("typebox").TLiteral<"ConferenceProceedings">, import("typebox").TLiteral<"Dataset">, import("typebox").TLiteral<"Software">, import("typebox").TLiteral<"OnlineDocument">, import("typebox").TLiteral<"Blog">, import("typebox").TLiteral<"SocialMedia">, import("typebox").TLiteral<"Preprint">, import("typebox").TLiteral<"Video">, import("typebox").TLiteral<"Podcast">, import("typebox").TLiteral<"Course">, import("typebox").TLiteral<"Presentation">, import("typebox").TLiteral<"Interview">, import("typebox").TLiteral<"PersonalCommunication">, import("typebox").TLiteral<"Email">, import("typebox").TLiteral<"Law">, import("typebox").TLiteral<"CourtCase">, import("typebox").TLiteral<"GovernmentPublication">, import("typebox").TLiteral<"Datasheet">, import("typebox").TLiteral<"ProductManual">]>;
|
|
545
555
|
}>, import("typebox").TObject<{
|
|
546
556
|
type: import("typebox").TLiteral<"Book">;
|
|
@@ -967,14 +977,16 @@ export declare function getUserCitationsImpl(config: TApiClientConfig): Promise<
|
|
|
967
977
|
text: import("typebox").TString;
|
|
968
978
|
citationTypeGuess: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TLiteral<"Book">, import("typebox").TLiteral<"Website">, import("typebox").TLiteral<"BookChapter">, import("typebox").TLiteral<"Handbook">, import("typebox").TLiteral<"TechnicalReport">, import("typebox").TLiteral<"Standard">, import("typebox").TLiteral<"Thesis">, import("typebox").TLiteral<"Patent">, import("typebox").TLiteral<"Dictionary">, import("typebox").TLiteral<"Encyclopedia">, import("typebox").TLiteral<"JournalArticle">, import("typebox").TLiteral<"MagazineArticle">, import("typebox").TLiteral<"NewspaperArticle">, import("typebox").TLiteral<"ConferencePaper">, import("typebox").TLiteral<"ConferenceProceedings">, import("typebox").TLiteral<"Dataset">, import("typebox").TLiteral<"Software">, import("typebox").TLiteral<"OnlineDocument">, import("typebox").TLiteral<"Blog">, import("typebox").TLiteral<"SocialMedia">, import("typebox").TLiteral<"Preprint">, import("typebox").TLiteral<"Video">, import("typebox").TLiteral<"Podcast">, import("typebox").TLiteral<"Course">, import("typebox").TLiteral<"Presentation">, import("typebox").TLiteral<"Interview">, import("typebox").TLiteral<"PersonalCommunication">, import("typebox").TLiteral<"Email">, import("typebox").TLiteral<"Law">, import("typebox").TLiteral<"CourtCase">, import("typebox").TLiteral<"GovernmentPublication">, import("typebox").TLiteral<"Datasheet">, import("typebox").TLiteral<"ProductManual">]>, import("typebox").TLiteral<"unknown">]>;
|
|
969
979
|
url: import("typebox").TOptional<import("typebox").TString>;
|
|
970
|
-
}>]
|
|
980
|
+
}>]>;
|
|
971
981
|
citationContentHash: import("typebox").TString;
|
|
972
982
|
axiom: import("typebox").TNull;
|
|
973
983
|
}>, import("typebox").TObject<{
|
|
974
984
|
digest: import("typebox").TString;
|
|
975
985
|
id: import("typebox").TString;
|
|
976
|
-
|
|
986
|
+
originArgumentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
977
987
|
version: import("typebox").TNumber;
|
|
988
|
+
published: import("typebox").TBoolean;
|
|
989
|
+
publishedOn: import("typebox").TUnion<[import("../../schemas/common.js").TDateType, import("typebox").TNull]>;
|
|
978
990
|
claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
979
991
|
creatorId: import("typebox").TString;
|
|
980
992
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQlE"}
|
|
@@ -21,8 +21,10 @@ export declare function getUserClaimsImpl(config: TApiClientConfig, argumentId?:
|
|
|
21
21
|
claim: import("typebox").TUnion<[import("typebox").TObject<{
|
|
22
22
|
digest: import("typebox").TString;
|
|
23
23
|
id: import("typebox").TString;
|
|
24
|
-
|
|
24
|
+
originArgumentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
25
25
|
version: import("typebox").TNumber;
|
|
26
|
+
published: import("typebox").TBoolean;
|
|
27
|
+
publishedOn: import("typebox").TUnion<[import("../../schemas/common.js").TDateType, import("typebox").TNull]>;
|
|
26
28
|
claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
27
29
|
creatorId: import("typebox").TString;
|
|
28
30
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
@@ -39,8 +41,10 @@ export declare function getUserClaimsImpl(config: TApiClientConfig, argumentId?:
|
|
|
39
41
|
}>, import("typebox").TObject<{
|
|
40
42
|
digest: import("typebox").TString;
|
|
41
43
|
id: import("typebox").TString;
|
|
42
|
-
|
|
44
|
+
originArgumentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
43
45
|
version: import("typebox").TNumber;
|
|
46
|
+
published: import("typebox").TBoolean;
|
|
47
|
+
publishedOn: import("typebox").TUnion<[import("../../schemas/common.js").TDateType, import("typebox").TNull]>;
|
|
44
48
|
claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
45
49
|
creatorId: import("typebox").TString;
|
|
46
50
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
@@ -50,8 +54,8 @@ export declare function getUserClaimsImpl(config: TApiClientConfig, argumentId?:
|
|
|
50
54
|
title: import("typebox").TNull;
|
|
51
55
|
body: import("typebox").TNull;
|
|
52
56
|
titleContentHash: import("typebox").TNull;
|
|
53
|
-
url: import("typebox").TString
|
|
54
|
-
citation: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").
|
|
57
|
+
url: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
58
|
+
citation: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TIntersect<[import("typebox").TObject<{
|
|
55
59
|
type: import("typebox").TUnion<[import("typebox").TLiteral<"Book">, import("typebox").TLiteral<"Website">, import("typebox").TLiteral<"BookChapter">, import("typebox").TLiteral<"Handbook">, import("typebox").TLiteral<"TechnicalReport">, import("typebox").TLiteral<"Standard">, import("typebox").TLiteral<"Thesis">, import("typebox").TLiteral<"Patent">, import("typebox").TLiteral<"Dictionary">, import("typebox").TLiteral<"Encyclopedia">, import("typebox").TLiteral<"JournalArticle">, import("typebox").TLiteral<"MagazineArticle">, import("typebox").TLiteral<"NewspaperArticle">, import("typebox").TLiteral<"ConferencePaper">, import("typebox").TLiteral<"ConferenceProceedings">, import("typebox").TLiteral<"Dataset">, import("typebox").TLiteral<"Software">, import("typebox").TLiteral<"OnlineDocument">, import("typebox").TLiteral<"Blog">, import("typebox").TLiteral<"SocialMedia">, import("typebox").TLiteral<"Preprint">, import("typebox").TLiteral<"Video">, import("typebox").TLiteral<"Podcast">, import("typebox").TLiteral<"Course">, import("typebox").TLiteral<"Presentation">, import("typebox").TLiteral<"Interview">, import("typebox").TLiteral<"PersonalCommunication">, import("typebox").TLiteral<"Email">, import("typebox").TLiteral<"Law">, import("typebox").TLiteral<"CourtCase">, import("typebox").TLiteral<"GovernmentPublication">, import("typebox").TLiteral<"Datasheet">, import("typebox").TLiteral<"ProductManual">]>;
|
|
56
60
|
}>, import("typebox").TObject<{
|
|
57
61
|
type: import("typebox").TLiteral<"Book">;
|
|
@@ -478,14 +482,16 @@ export declare function getUserClaimsImpl(config: TApiClientConfig, argumentId?:
|
|
|
478
482
|
text: import("typebox").TString;
|
|
479
483
|
citationTypeGuess: import("typebox").TUnion<[import("typebox").TUnion<[import("typebox").TLiteral<"Book">, import("typebox").TLiteral<"Website">, import("typebox").TLiteral<"BookChapter">, import("typebox").TLiteral<"Handbook">, import("typebox").TLiteral<"TechnicalReport">, import("typebox").TLiteral<"Standard">, import("typebox").TLiteral<"Thesis">, import("typebox").TLiteral<"Patent">, import("typebox").TLiteral<"Dictionary">, import("typebox").TLiteral<"Encyclopedia">, import("typebox").TLiteral<"JournalArticle">, import("typebox").TLiteral<"MagazineArticle">, import("typebox").TLiteral<"NewspaperArticle">, import("typebox").TLiteral<"ConferencePaper">, import("typebox").TLiteral<"ConferenceProceedings">, import("typebox").TLiteral<"Dataset">, import("typebox").TLiteral<"Software">, import("typebox").TLiteral<"OnlineDocument">, import("typebox").TLiteral<"Blog">, import("typebox").TLiteral<"SocialMedia">, import("typebox").TLiteral<"Preprint">, import("typebox").TLiteral<"Video">, import("typebox").TLiteral<"Podcast">, import("typebox").TLiteral<"Course">, import("typebox").TLiteral<"Presentation">, import("typebox").TLiteral<"Interview">, import("typebox").TLiteral<"PersonalCommunication">, import("typebox").TLiteral<"Email">, import("typebox").TLiteral<"Law">, import("typebox").TLiteral<"CourtCase">, import("typebox").TLiteral<"GovernmentPublication">, import("typebox").TLiteral<"Datasheet">, import("typebox").TLiteral<"ProductManual">]>, import("typebox").TLiteral<"unknown">]>;
|
|
480
484
|
url: import("typebox").TOptional<import("typebox").TString>;
|
|
481
|
-
}>]
|
|
485
|
+
}>]>;
|
|
482
486
|
citationContentHash: import("typebox").TString;
|
|
483
487
|
axiom: import("typebox").TNull;
|
|
484
488
|
}>, import("typebox").TObject<{
|
|
485
489
|
digest: import("typebox").TString;
|
|
486
490
|
id: import("typebox").TString;
|
|
487
|
-
|
|
491
|
+
originArgumentId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
488
492
|
version: import("typebox").TNumber;
|
|
493
|
+
published: import("typebox").TBoolean;
|
|
494
|
+
publishedOn: import("typebox").TUnion<[import("../../schemas/common.js").TDateType, import("typebox").TNull]>;
|
|
489
495
|
claimForkId: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
490
496
|
creatorId: import("typebox").TString;
|
|
491
497
|
createdOn: import("../../schemas/common.js").TDateType;
|
|
@@ -608,6 +614,7 @@ export declare function getUserClaimsImpl(config: TApiClientConfig, argumentId?:
|
|
|
608
614
|
role: import("typebox").TUnion<[import("typebox").TLiteral<"conclusion">, import("typebox").TLiteral<"supporting">]>;
|
|
609
615
|
createdOn: import("typebox").TOptional<import("../../schemas/common.js").TDateType>;
|
|
610
616
|
creatorId: import("typebox").TOptional<import("typebox").TString>;
|
|
617
|
+
derivedClaimVersion: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TNumber, import("typebox").TNull]>>;
|
|
611
618
|
}>]>>>;
|
|
612
619
|
}>>>>;
|
|
613
620
|
//# sourceMappingURL=claims.d.ts.map
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYtB"}
|
package/dist/engine/engine.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArgumentEngine, type TArgumentEngineSnapshot, type TCoreValidationIssue, type TReactiveSnapshot } from "@proposit/proposit-core";
|
|
1
|
+
import { ArgumentEngine, type TArgumentEngineSnapshot, type TCoreValidationIssue, type TInvariantValidationResult, type TReactiveSnapshot } from "@proposit/proposit-core";
|
|
2
2
|
import type { TArgument } from "../schemas/model/arguments.js";
|
|
3
3
|
import type { TPropositionalExpressionCombined, TPropositionalPremise, TPropositionalVariable } from "../schemas/logic.js";
|
|
4
4
|
import type { TClaim } from "../schemas/model/claims.js";
|
|
@@ -67,6 +67,63 @@ export declare class PropositArgumentEngine extends ArgumentEngine<TArgument, TP
|
|
|
67
67
|
* Overrides the base class default which returns true unconditionally.
|
|
68
68
|
*/
|
|
69
69
|
canFork(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Resolves the claim type a variable references, or `undefined` when the
|
|
72
|
+
* variable is not claim-bound (premise-bound variables reference no claim).
|
|
73
|
+
* Reads the engine's claim library (`getClaim`) rather than the per-engine
|
|
74
|
+
* `claimsMap`, because the library is populated for the whole load/mutation
|
|
75
|
+
* lifecycle while `claimsMap` is filled only after a snapshot restore — so
|
|
76
|
+
* the library is the reliable source during the load-validation sweep.
|
|
77
|
+
*/
|
|
78
|
+
private resolveVariableClaimType;
|
|
79
|
+
/**
|
|
80
|
+
* Collects a violation for every freeform premise that references a
|
|
81
|
+
* derivation-only claim type (`citation` / `axiomatic`) through one of its
|
|
82
|
+
* member variables. Walks each premise's expressions, resolves the claim
|
|
83
|
+
* type behind each variable expression, and flags the premise when any
|
|
84
|
+
* referenced claim is derivation-only.
|
|
85
|
+
*/
|
|
86
|
+
private collectTypedClaimsInFreeformViolations;
|
|
87
|
+
/**
|
|
88
|
+
* Runs the freeform-premise typed-claim check, gated on `assistive`
|
|
89
|
+
* behavior. Returns an `ok: false` result when a freeform premise
|
|
90
|
+
* references a derivation-only claim. The gate keeps the
|
|
91
|
+
* derivation-population helpers — which flip to `permissive` mid-build and
|
|
92
|
+
* may momentarily hold a transient intermediate tree — from being tripped
|
|
93
|
+
* while they construct a valid final shape.
|
|
94
|
+
*/
|
|
95
|
+
private assertNoTypedClaimsInFreeform;
|
|
96
|
+
/**
|
|
97
|
+
* Folds the freeform-premise typed-claim invariant into core's invariant
|
|
98
|
+
* sweep. Because core's mutation wrapper (`withValidation`) and the
|
|
99
|
+
* snapshot-load paths (`fromSnapshot` / `fromData` / `rollback`) all run
|
|
100
|
+
* this method, overriding it enforces the invariant on both mutation and
|
|
101
|
+
* load: an argument-level mutation that would leave a citation/axiomatic
|
|
102
|
+
* claim in a freeform premise is rolled back and throws, and a snapshot
|
|
103
|
+
* carrying that placement fails to load. Premise-level expression
|
|
104
|
+
* mutations validate through a separate per-premise callback, re-wired in
|
|
105
|
+
* {@link installFreeformTypedClaimGuards} to enforce the same invariant.
|
|
106
|
+
*/
|
|
107
|
+
validateInvariants(): TInvariantValidationResult;
|
|
108
|
+
/**
|
|
109
|
+
* Wraps core's universal mutation wrapper. Core re-points every premise's
|
|
110
|
+
* after-mutation validation callback to its own default at the end of each
|
|
111
|
+
* argument-level mutation, so the typed-claim guards must be re-installed
|
|
112
|
+
* afterwards to stay in effect for the next premise-level expression
|
|
113
|
+
* mutation. The mutation itself is enforced by the overridden
|
|
114
|
+
* {@link validateInvariants} that core's wrapper invokes.
|
|
115
|
+
*/
|
|
116
|
+
protected withValidation<T>(fn: () => T): T;
|
|
117
|
+
/**
|
|
118
|
+
* Re-wires every premise's after-mutation validation callback so that
|
|
119
|
+
* premise-level expression mutations also enforce the freeform-premise
|
|
120
|
+
* typed-claim invariant. Core's default callback runs only its lighter
|
|
121
|
+
* after-premise-mutation sweep, which never reaches the typed-claim check;
|
|
122
|
+
* this callback runs the typed-claim check first and, when clean, the full
|
|
123
|
+
* invariant sweep ({@link validateInvariants}) so a violating placement is
|
|
124
|
+
* rolled back and throws at the moment the expression is added.
|
|
125
|
+
*/
|
|
126
|
+
private installFreeformTypedClaimGuards;
|
|
70
127
|
protected buildReactiveSnapshot(): TProjectReactiveSnapshot;
|
|
71
128
|
/**
|
|
72
129
|
* Creates a PropositArgumentEngine from server-provided data: an engine
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/engine/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/engine/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EAGd,KAAK,uBAAuB,EAK5B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAE/B,KAAK,iBAAiB,EACzB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,KAAK,EACR,gCAAgC,EAChC,qBAAqB,EACrB,sBAAsB,EACzB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AA2BnE,0FAA0F;AAC1F,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,CAClD,SAAS,EACT,qBAAqB,EACrB,gCAAgC,EAChC,sBAAsB,CACzB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CACpD,SAAS,EACT,qBAAqB,EACrB,gCAAgC,EAChC,sBAAsB,CACzB,GAAG;IACA,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAA;IAC3C,gBAAgB,EAAE,oBAAoB,EAAE,CAAA;CAC3C,CAAA;AAED;;;;;;;;GAQG;AACH,qBAAa,sBAAuB,SAAQ,cAAc,CACtD,SAAS,EACT,qBAAqB,EACrB,gCAAgC,EAChC,sBAAsB,CACzB;IAGG,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,YAAY,CAA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ACH,OAAO,CAAC,6BAA6B;IAUrC;;;;;;;;;;OAUG;IACa,kBAAkB,IAAI,0BAA0B;IAUhE;;;;;;;OAOG;cACgB,cAAc,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAQpD;;;;;;;;OAQG;IACH,OAAO,CAAC,+BAA+B;cAYpB,qBAAqB,IAAI,wBAAwB;IAiEpE;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,CACjB,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,cAAc,EAAE,GAC5B,sBAAsB;CAgE5B"}
|
package/dist/engine/engine.js
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import { ArgumentEngine, InvariantViolationError, } from "@proposit/proposit-core";
|
|
1
|
+
import { ArgumentEngine, InvariantViolationError, isClaimBound, } from "@proposit/proposit-core";
|
|
2
2
|
import { CHECKSUM_CONFIG } from "../checksum.js";
|
|
3
3
|
import { createClaimLookup } from "./library-adapters.js";
|
|
4
|
+
// A non-derivation (freeform) premise must never reference a claim of type
|
|
5
|
+
// `citation` or `axiomatic`: those claim types belong only in derivation
|
|
6
|
+
// premises, where the citation/axiom is the antecedent supporting a derived
|
|
7
|
+
// claim. Placing one in a freeform premise produces a domain-invalid argument
|
|
8
|
+
// (e.g. a citation sitting as a bare antecedent renders as a visually empty
|
|
9
|
+
// node). This rule is enforced here in the project engine; core leaves the
|
|
10
|
+
// equivalent grammar tier informational.
|
|
11
|
+
const PREMISE_TYPED_CLAIM_IN_FREEFORM = "PREMISE_TYPED_CLAIM_IN_FREEFORM";
|
|
12
|
+
// Claim types that may only appear in derivation premises.
|
|
13
|
+
const DERIVATION_ONLY_CLAIM_TYPES = new Set([
|
|
14
|
+
"citation",
|
|
15
|
+
"axiomatic",
|
|
16
|
+
]);
|
|
4
17
|
/**
|
|
5
18
|
* Project-specific extension of ArgumentEngine that manages domain data
|
|
6
19
|
* (claims and citation edges) alongside the core
|
|
@@ -103,6 +116,10 @@ export class PropositArgumentEngine extends ArgumentEngine {
|
|
|
103
116
|
}
|
|
104
117
|
finally {
|
|
105
118
|
this.claimContext.permissiveForRestore = false;
|
|
119
|
+
// rollback rebuilds the premise map and re-points each premise's
|
|
120
|
+
// validation callback to core's default; re-install the typed-claim
|
|
121
|
+
// guards so premise-level expression mutations stay enforced.
|
|
122
|
+
this.installFreeformTypedClaimGuards();
|
|
106
123
|
}
|
|
107
124
|
}
|
|
108
125
|
// Dirty tracking for structural sharing
|
|
@@ -203,6 +220,128 @@ export class PropositArgumentEngine extends ArgumentEngine {
|
|
|
203
220
|
const arg = this.getArgument();
|
|
204
221
|
return arg?.published === true;
|
|
205
222
|
}
|
|
223
|
+
// ──── Freeform-premise typed-claim invariant ────
|
|
224
|
+
/**
|
|
225
|
+
* Resolves the claim type a variable references, or `undefined` when the
|
|
226
|
+
* variable is not claim-bound (premise-bound variables reference no claim).
|
|
227
|
+
* Reads the engine's claim library (`getClaim`) rather than the per-engine
|
|
228
|
+
* `claimsMap`, because the library is populated for the whole load/mutation
|
|
229
|
+
* lifecycle while `claimsMap` is filled only after a snapshot restore — so
|
|
230
|
+
* the library is the reliable source during the load-validation sweep.
|
|
231
|
+
*/
|
|
232
|
+
resolveVariableClaimType(variableId) {
|
|
233
|
+
const variable = this.getVariable(variableId);
|
|
234
|
+
if (!variable || !isClaimBound(variable))
|
|
235
|
+
return undefined;
|
|
236
|
+
const bound = variable;
|
|
237
|
+
return this.getClaim(bound.claimId, bound.claimVersion)?.type;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Collects a violation for every freeform premise that references a
|
|
241
|
+
* derivation-only claim type (`citation` / `axiomatic`) through one of its
|
|
242
|
+
* member variables. Walks each premise's expressions, resolves the claim
|
|
243
|
+
* type behind each variable expression, and flags the premise when any
|
|
244
|
+
* referenced claim is derivation-only.
|
|
245
|
+
*/
|
|
246
|
+
collectTypedClaimsInFreeformViolations() {
|
|
247
|
+
const violations = [];
|
|
248
|
+
for (const pe of this.listPremises()) {
|
|
249
|
+
if (pe.toPremiseData().type !== "freeform")
|
|
250
|
+
continue;
|
|
251
|
+
const premiseId = pe.getId();
|
|
252
|
+
for (const expr of pe.getExpressions()) {
|
|
253
|
+
if (expr.type !== "variable")
|
|
254
|
+
continue;
|
|
255
|
+
const claimType = this.resolveVariableClaimType(expr.variableId);
|
|
256
|
+
if (claimType === undefined)
|
|
257
|
+
continue;
|
|
258
|
+
if (!DERIVATION_ONLY_CLAIM_TYPES.has(claimType))
|
|
259
|
+
continue;
|
|
260
|
+
violations.push({
|
|
261
|
+
code: PREMISE_TYPED_CLAIM_IN_FREEFORM,
|
|
262
|
+
message: `Freeform premise ${premiseId} references a ${claimType} claim; ${claimType} claims may only appear in derivation premises.`,
|
|
263
|
+
entityType: "premise",
|
|
264
|
+
entityId: premiseId,
|
|
265
|
+
premiseId,
|
|
266
|
+
});
|
|
267
|
+
// One violation per premise is enough to flag/repair it.
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return violations;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Runs the freeform-premise typed-claim check, gated on `assistive`
|
|
275
|
+
* behavior. Returns an `ok: false` result when a freeform premise
|
|
276
|
+
* references a derivation-only claim. The gate keeps the
|
|
277
|
+
* derivation-population helpers — which flip to `permissive` mid-build and
|
|
278
|
+
* may momentarily hold a transient intermediate tree — from being tripped
|
|
279
|
+
* while they construct a valid final shape.
|
|
280
|
+
*/
|
|
281
|
+
assertNoTypedClaimsInFreeform() {
|
|
282
|
+
if (this.behavior !== "assistive") {
|
|
283
|
+
return { ok: true, violations: [] };
|
|
284
|
+
}
|
|
285
|
+
const violations = this.collectTypedClaimsInFreeformViolations();
|
|
286
|
+
return { ok: violations.length === 0, violations };
|
|
287
|
+
}
|
|
288
|
+
// ──── Mutation + load enforcement overrides ────
|
|
289
|
+
/**
|
|
290
|
+
* Folds the freeform-premise typed-claim invariant into core's invariant
|
|
291
|
+
* sweep. Because core's mutation wrapper (`withValidation`) and the
|
|
292
|
+
* snapshot-load paths (`fromSnapshot` / `fromData` / `rollback`) all run
|
|
293
|
+
* this method, overriding it enforces the invariant on both mutation and
|
|
294
|
+
* load: an argument-level mutation that would leave a citation/axiomatic
|
|
295
|
+
* claim in a freeform premise is rolled back and throws, and a snapshot
|
|
296
|
+
* carrying that placement fails to load. Premise-level expression
|
|
297
|
+
* mutations validate through a separate per-premise callback, re-wired in
|
|
298
|
+
* {@link installFreeformTypedClaimGuards} to enforce the same invariant.
|
|
299
|
+
*/
|
|
300
|
+
validateInvariants() {
|
|
301
|
+
const base = super.validateInvariants();
|
|
302
|
+
const typedClaims = this.assertNoTypedClaimsInFreeform();
|
|
303
|
+
if (typedClaims.ok)
|
|
304
|
+
return base;
|
|
305
|
+
return {
|
|
306
|
+
ok: false,
|
|
307
|
+
violations: [...base.violations, ...typedClaims.violations],
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Wraps core's universal mutation wrapper. Core re-points every premise's
|
|
312
|
+
* after-mutation validation callback to its own default at the end of each
|
|
313
|
+
* argument-level mutation, so the typed-claim guards must be re-installed
|
|
314
|
+
* afterwards to stay in effect for the next premise-level expression
|
|
315
|
+
* mutation. The mutation itself is enforced by the overridden
|
|
316
|
+
* {@link validateInvariants} that core's wrapper invokes.
|
|
317
|
+
*/
|
|
318
|
+
withValidation(fn) {
|
|
319
|
+
try {
|
|
320
|
+
return super.withValidation(fn);
|
|
321
|
+
}
|
|
322
|
+
finally {
|
|
323
|
+
this.installFreeformTypedClaimGuards();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Re-wires every premise's after-mutation validation callback so that
|
|
328
|
+
* premise-level expression mutations also enforce the freeform-premise
|
|
329
|
+
* typed-claim invariant. Core's default callback runs only its lighter
|
|
330
|
+
* after-premise-mutation sweep, which never reaches the typed-claim check;
|
|
331
|
+
* this callback runs the typed-claim check first and, when clean, the full
|
|
332
|
+
* invariant sweep ({@link validateInvariants}) so a violating placement is
|
|
333
|
+
* rolled back and throws at the moment the expression is added.
|
|
334
|
+
*/
|
|
335
|
+
installFreeformTypedClaimGuards() {
|
|
336
|
+
for (const pe of this.listPremises()) {
|
|
337
|
+
pe.setArgumentValidateCallback(() => {
|
|
338
|
+
const typedClaims = this.assertNoTypedClaimsInFreeform();
|
|
339
|
+
if (!typedClaims.ok)
|
|
340
|
+
return typedClaims;
|
|
341
|
+
return this.validateInvariants();
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
206
345
|
// ──── Reactive snapshot override ────
|
|
207
346
|
buildReactiveSnapshot() {
|
|
208
347
|
const base = super.buildReactiveSnapshot();
|
|
@@ -224,7 +363,14 @@ export class PropositArgumentEngine extends ArgumentEngine {
|
|
|
224
363
|
? []
|
|
225
364
|
: invariants.violations.map((v) => ({
|
|
226
365
|
code: v.code,
|
|
227
|
-
|
|
366
|
+
// The freeform-premise typed-claim violation is a
|
|
367
|
+
// repairable placement issue (move the claim into a
|
|
368
|
+
// derivation premise), so surface it as a warning
|
|
369
|
+
// rather than a blocking error in the reactive view.
|
|
370
|
+
// Mutation/load paths still throw on it.
|
|
371
|
+
severity: v.code === PREMISE_TYPED_CLAIM_IN_FREEFORM
|
|
372
|
+
? "warning"
|
|
373
|
+
: "error",
|
|
228
374
|
message: v.message,
|
|
229
375
|
premiseId: v.premiseId,
|
|
230
376
|
}));
|