@lucern/sdk 0.2.0-alpha.6 → 0.2.0-alpha.8
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/CHANGELOG.md +13 -0
- package/dist/{lib/platform/sdk/adminClient.d.ts → adminClient.d.ts} +56 -51
- package/dist/adminClient.js +755 -0
- package/dist/adminClient.js.map +1 -0
- package/dist/answersClient.d.ts +23 -0
- package/dist/answersClient.js +333 -0
- package/dist/answersClient.js.map +1 -0
- package/dist/{lib/platform/sdk/audiencesClient.d.ts → audiencesClient.d.ts} +24 -18
- package/dist/audiencesClient.js +472 -0
- package/dist/audiencesClient.js.map +1 -0
- package/dist/auditClient.d.ts +29 -0
- package/dist/auditClient.js +386 -0
- package/dist/auditClient.js.map +1 -0
- package/dist/{lib/platform/sdk/beliefsClient.d.ts → beliefsClient.d.ts} +32 -27
- package/dist/beliefsClient.js +477 -0
- package/dist/beliefsClient.js.map +1 -0
- package/dist/{lib/platform/sdk/client.d.ts → client.d.ts} +404 -395
- package/dist/client.js +6134 -0
- package/dist/client.js.map +1 -0
- package/dist/{lib/platform/sdk/contextClient.d.ts → contextClient.d.ts} +13 -7
- package/dist/contextClient.js +396 -0
- package/dist/contextClient.js.map +1 -0
- package/dist/contextFacade.d.ts +2 -0
- package/dist/contextFacade.js +73 -0
- package/dist/contextFacade.js.map +1 -0
- package/dist/{lib/platform/sdk/contextPackCompiler.d.ts → contextPackCompiler.d.ts} +11 -9
- package/dist/contextPackCompiler.js +1091 -0
- package/dist/contextPackCompiler.js.map +1 -0
- package/dist/contextPackPolicy.d.ts +84 -0
- package/dist/contextPackPolicy.js +347 -0
- package/dist/contextPackPolicy.js.map +1 -0
- package/dist/contextPackSchema.d.ts +7 -0
- package/dist/contextPackSchema.js +203 -0
- package/dist/contextPackSchema.js.map +1 -0
- package/dist/{lib/platform/sdk/contextTypes.d.ts → contextTypes.d.ts} +15 -13
- package/dist/contextTypes.js +3 -0
- package/dist/contextTypes.js.map +1 -0
- package/dist/contracts/api-enums.contract.d.ts +81 -0
- package/dist/contracts/api-enums.contract.js +92 -0
- package/dist/contracts/api-enums.contract.js.map +1 -0
- package/dist/contracts/auth-session.contract.d.ts +55 -0
- package/dist/contracts/auth-session.contract.js +48 -0
- package/dist/contracts/auth-session.contract.js.map +1 -0
- package/dist/{lucern/contracts/src → contracts}/context-pack.contract.d.ts +56 -58
- package/dist/contracts/context-pack.contract.js +98 -0
- package/dist/contracts/context-pack.contract.js.map +1 -0
- package/dist/contracts/contextPack.d.ts +1 -0
- package/dist/contracts/contextPack.js +98 -0
- package/dist/contracts/contextPack.js.map +1 -0
- package/dist/contracts/index.d.ts +9 -0
- package/dist/contracts/index.js +4892 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/{lucern/contracts/src → contracts}/lens-filter.contract.d.ts +10 -8
- package/dist/contracts/lens-filter.contract.js +71 -0
- package/dist/contracts/lens-filter.contract.js.map +1 -0
- package/dist/contracts/lens-workflow.contract.d.ts +87 -0
- package/dist/contracts/lens-workflow.contract.js +123 -0
- package/dist/contracts/lens-workflow.contract.js.map +1 -0
- package/dist/contracts/lensFilter.d.ts +1 -0
- package/dist/contracts/lensFilter.js +71 -0
- package/dist/contracts/lensFilter.js.map +1 -0
- package/dist/contracts/lensWorkflow.d.ts +2 -0
- package/dist/contracts/lensWorkflow.js +123 -0
- package/dist/contracts/lensWorkflow.js.map +1 -0
- package/dist/contracts/mcp-tools.contract.d.ts +1 -0
- package/dist/contracts/mcp-tools.contract.js +2986 -0
- package/dist/contracts/mcp-tools.contract.js.map +1 -0
- package/dist/contracts/mcpTools.d.ts +1 -0
- package/dist/contracts/mcpTools.js +2986 -0
- package/dist/contracts/mcpTools.js.map +1 -0
- package/dist/{lucern/contracts/src → contracts}/prompt.contract.d.ts +5 -3
- package/dist/contracts/prompt.contract.js +12 -0
- package/dist/contracts/prompt.contract.js.map +1 -0
- package/dist/contracts/prompt.d.ts +1 -0
- package/dist/contracts/prompt.js +12 -0
- package/dist/contracts/prompt.js.map +1 -0
- package/dist/contracts/sdk-tools.contract.d.ts +2 -0
- package/dist/contracts/sdk-tools.contract.js +4134 -0
- package/dist/contracts/sdk-tools.contract.js.map +1 -0
- package/dist/contracts/sdkTools.d.ts +2 -0
- package/dist/contracts/sdkTools.js +4134 -0
- package/dist/contracts/sdkTools.js.map +1 -0
- package/dist/contracts/workflow-runtime.contract.d.ts +163 -0
- package/dist/contracts/workflow-runtime.contract.js +245 -0
- package/dist/contracts/workflow-runtime.contract.js.map +1 -0
- package/dist/contracts/workflowRuntime.d.ts +1 -0
- package/dist/contracts/workflowRuntime.js +245 -0
- package/dist/contracts/workflowRuntime.js.map +1 -0
- package/dist/{lib/platform/sdk/controlObjectOwnership.d.ts → controlObjectOwnership.d.ts} +20 -18
- package/dist/controlObjectOwnership.js +215 -0
- package/dist/controlObjectOwnership.js.map +1 -0
- package/dist/{lib/platform/sdk/coreClient.d.ts → coreClient.d.ts} +19 -14
- package/dist/coreClient.js +339 -0
- package/dist/coreClient.js.map +1 -0
- package/dist/{lib/platform/sdk/customTools.d.ts → customTools.d.ts} +21 -16
- package/dist/customTools.js +248 -0
- package/dist/customTools.js.map +1 -0
- package/dist/{lib/platform/sdk/decisionsClient.d.ts → decisionsClient.d.ts} +29 -24
- package/dist/decisionsClient.js +522 -0
- package/dist/decisionsClient.js.map +1 -0
- package/dist/domainContext.d.ts +1 -0
- package/dist/domainContext.js +3 -0
- package/dist/domainContext.js.map +1 -0
- package/dist/events.d.ts +178 -0
- package/dist/events.js +249 -0
- package/dist/events.js.map +1 -0
- package/dist/eventsCore.d.ts +49 -0
- package/dist/eventsCore.js +429 -0
- package/dist/eventsCore.js.map +1 -0
- package/dist/facade/context.d.ts +18 -0
- package/dist/facade/context.js +73 -0
- package/dist/facade/context.js.map +1 -0
- package/dist/{lib/platform/sdk/gatewayFacades.d.ts → gatewayFacades.d.ts} +31 -26
- package/dist/gatewayFacades.js +1953 -0
- package/dist/gatewayFacades.js.map +1 -0
- package/dist/{lib/platform/sdk/graphClient.d.ts → graphClient.d.ts} +57 -52
- package/dist/graphClient.js +698 -0
- package/dist/graphClient.js.map +1 -0
- package/dist/{lib/platform/sdk/harnessClient.d.ts → harnessClient.d.ts} +44 -39
- package/dist/harnessClient.js +607 -0
- package/dist/harnessClient.js.map +1 -0
- package/dist/{lib/platform/sdk/identityClient.d.ts → identityClient.d.ts} +17 -11
- package/dist/identityClient.js +497 -0
- package/dist/identityClient.js.map +1 -0
- package/dist/index.d.ts +42 -3
- package/dist/index.js +11381 -3
- package/dist/index.js.map +1 -0
- package/dist/{lib/platform/sdk/learningClient.d.ts → learningClient.d.ts} +13 -7
- package/dist/learningClient.js +409 -0
- package/dist/learningClient.js.map +1 -0
- package/dist/{lib/platform/sdk/mcpParityClient.d.ts → mcpParityClient.d.ts} +10 -5
- package/dist/mcpParityClient.js +516 -0
- package/dist/mcpParityClient.js.map +1 -0
- package/dist/mcpParitySurface.d.ts +12 -0
- package/dist/mcpParitySurface.js +65 -0
- package/dist/mcpParitySurface.js.map +1 -0
- package/dist/mcpTools-DPZxowDX.d.ts +254 -0
- package/dist/{lib/platform/sdk/ontologyClient.d.ts → ontologyClient.d.ts} +28 -22
- package/dist/ontologyClient.js +513 -0
- package/dist/ontologyClient.js.map +1 -0
- package/dist/packRuntime.d.ts +2 -0
- package/dist/packRuntime.js +3 -0
- package/dist/packRuntime.js.map +1 -0
- package/dist/{lib/platform/sdk/packsClient.d.ts → packsClient.d.ts} +34 -29
- package/dist/packsClient.js +525 -0
- package/dist/packsClient.js.map +1 -0
- package/dist/{lib/platform/sdk/policyClient.d.ts → policyClient.d.ts} +26 -20
- package/dist/policyClient.js +625 -0
- package/dist/policyClient.js.map +1 -0
- package/dist/realtime/index.d.ts +29 -0
- package/dist/realtime/index.js +23 -0
- package/dist/realtime/index.js.map +1 -0
- package/dist/realtime/refs.d.ts +17 -0
- package/dist/realtime/refs.js +9 -0
- package/dist/realtime/refs.js.map +1 -0
- package/dist/reportsClient.d.ts +41 -0
- package/dist/reportsClient.js +418 -0
- package/dist/reportsClient.js.map +1 -0
- package/dist/{lib/platform/sdk/schemaClient.d.ts → schemaClient.d.ts} +20 -15
- package/dist/schemaClient.js +434 -0
- package/dist/schemaClient.js.map +1 -0
- package/dist/sdkSurface.d.ts +61 -0
- package/dist/sdkSurface.js +112 -0
- package/dist/sdkSurface.js.map +1 -0
- package/dist/sdkTools-CwXJDACb.d.ts +150 -0
- package/dist/{lib/platform/sdk/topicsClient.d.ts → topicsClient.d.ts} +24 -18
- package/dist/topicsClient.js +492 -0
- package/dist/topicsClient.js.map +1 -0
- package/dist/{lib/platform/sdk/types.d.ts → types.d.ts} +84 -80
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/dist/{lib/platform/sdk/workflowClient.d.ts → workflowClient.d.ts} +60 -57
- package/dist/workflowClient.js +830 -0
- package/dist/workflowClient.js.map +1 -0
- package/package.json +25 -43
- package/dist/.generated +0 -2
- package/dist/lib/platform/auth/credentials.d.ts +0 -5
- package/dist/lib/platform/auth/credentials.js +0 -40
- package/dist/lib/platform/sdk/adminClient.js +0 -384
- package/dist/lib/platform/sdk/answersClient.d.ts +0 -16
- package/dist/lib/platform/sdk/answersClient.js +0 -21
- package/dist/lib/platform/sdk/audiencesClient.js +0 -111
- package/dist/lib/platform/sdk/auditClient.d.ts +0 -24
- package/dist/lib/platform/sdk/auditClient.js +0 -21
- package/dist/lib/platform/sdk/beliefsClient.js +0 -124
- package/dist/lib/platform/sdk/client.js +0 -1831
- package/dist/lib/platform/sdk/contextClient.js +0 -86
- package/dist/lib/platform/sdk/contextFacade.d.ts +0 -10
- package/dist/lib/platform/sdk/contextFacade.js +0 -10
- package/dist/lib/platform/sdk/contextPackCompiler.js +0 -534
- package/dist/lib/platform/sdk/contextTypes.js +0 -1
- package/dist/lib/platform/sdk/controlObjectOwnership.js +0 -220
- package/dist/lib/platform/sdk/coreClient.js +0 -366
- package/dist/lib/platform/sdk/customTools.js +0 -247
- package/dist/lib/platform/sdk/decisionsClient.js +0 -129
- package/dist/lib/platform/sdk/domainContext.d.ts +0 -1
- package/dist/lib/platform/sdk/domainContext.js +0 -1
- package/dist/lib/platform/sdk/events.d.ts +0 -176
- package/dist/lib/platform/sdk/events.js +0 -261
- package/dist/lib/platform/sdk/eventsCore.d.ts +0 -13
- package/dist/lib/platform/sdk/eventsCore.js +0 -13
- package/dist/lib/platform/sdk/gatewayFacades.js +0 -845
- package/dist/lib/platform/sdk/graphClient.js +0 -235
- package/dist/lib/platform/sdk/harnessClient.js +0 -219
- package/dist/lib/platform/sdk/identityClient.js +0 -131
- package/dist/lib/platform/sdk/index.d.ts +0 -49
- package/dist/lib/platform/sdk/index.js +0 -49
- package/dist/lib/platform/sdk/learningClient.js +0 -53
- package/dist/lib/platform/sdk/mcpParityClient.js +0 -196
- package/dist/lib/platform/sdk/mcpParitySurface.d.ts +0 -10
- package/dist/lib/platform/sdk/mcpParitySurface.js +0 -57
- package/dist/lib/platform/sdk/ontologyClient.js +0 -161
- package/dist/lib/platform/sdk/packRuntime.d.ts +0 -1
- package/dist/lib/platform/sdk/packRuntime.js +0 -1
- package/dist/lib/platform/sdk/packsClient.js +0 -157
- package/dist/lib/platform/sdk/policyClient.js +0 -277
- package/dist/lib/platform/sdk/promptCatalog.d.ts +0 -1
- package/dist/lib/platform/sdk/promptCatalog.js +0 -1
- package/dist/lib/platform/sdk/reportsClient.d.ts +0 -34
- package/dist/lib/platform/sdk/reportsClient.js +0 -64
- package/dist/lib/platform/sdk/schemaClient.js +0 -71
- package/dist/lib/platform/sdk/sdkSurface.d.ts +0 -56
- package/dist/lib/platform/sdk/sdkSurface.js +0 -140
- package/dist/lib/platform/sdk/topicsClient.js +0 -118
- package/dist/lib/platform/sdk/types.js +0 -1
- package/dist/lib/platform/sdk/version.d.ts +0 -2
- package/dist/lib/platform/sdk/version.js +0 -2
- package/dist/lib/platform/sdk/workflowClient.js +0 -366
- package/dist/lucern/contracts/src/api-enums.contract.d.ts +0 -58
- package/dist/lucern/contracts/src/api-enums.contract.js +0 -147
- package/dist/lucern/contracts/src/auth-context.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/auth-context.contract.js +0 -8
- package/dist/lucern/contracts/src/auth-session.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/auth-session.contract.js +0 -8
- package/dist/lucern/contracts/src/auth.contract.d.ts +0 -88
- package/dist/lucern/contracts/src/auth.contract.js +0 -57
- package/dist/lucern/contracts/src/context-pack.contract.js +0 -169
- package/dist/lucern/contracts/src/convex-admin.contract.d.ts +0 -5
- package/dist/lucern/contracts/src/convex-admin.contract.js +0 -1
- package/dist/lucern/contracts/src/events-types.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/events-types.contract.js +0 -8
- package/dist/lucern/contracts/src/events.contract.d.ts +0 -176
- package/dist/lucern/contracts/src/events.contract.js +0 -159
- package/dist/lucern/contracts/src/gateway.contract.d.ts +0 -74
- package/dist/lucern/contracts/src/gateway.contract.js +0 -19
- package/dist/lucern/contracts/src/ids.contract.d.ts +0 -7
- package/dist/lucern/contracts/src/ids.contract.js +0 -24
- package/dist/lucern/contracts/src/index.d.ts +0 -29
- package/dist/lucern/contracts/src/index.js +0 -29
- package/dist/lucern/contracts/src/lens-filter.contract.js +0 -95
- package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +0 -84
- package/dist/lucern/contracts/src/lens-workflow.contract.js +0 -54
- package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +0 -151
- package/dist/lucern/contracts/src/mcp-tools.contract.js +0 -3281
- package/dist/lucern/contracts/src/ontology-matching.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/ontology-matching.contract.js +0 -8
- package/dist/lucern/contracts/src/prompt.contract.js +0 -24
- package/dist/lucern/contracts/src/sdk-methods.contract.d.ts +0 -358
- package/dist/lucern/contracts/src/sdk-methods.contract.js +0 -19
- package/dist/lucern/contracts/src/sdk-tools.contract.d.ts +0 -92
- package/dist/lucern/contracts/src/sdk-tools.contract.js +0 -1398
- package/dist/lucern/contracts/src/text-matching.contract.d.ts +0 -53
- package/dist/lucern/contracts/src/text-matching.contract.js +0 -277
- package/dist/lucern/contracts/src/topic-scope.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/topic-scope.contract.js +0 -8
- package/dist/lucern/contracts/src/workflow-runtime.contract.d.ts +0 -161
- package/dist/lucern/contracts/src/workflow-runtime.contract.js +0 -257
- package/dist/realtime-refs.d.ts +0 -1
- package/dist/realtime-refs.js +0 -1
- package/dist/realtime.d.ts +0 -1
- package/dist/realtime.js +0 -1
|
@@ -1,845 +0,0 @@
|
|
|
1
|
-
import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
|
-
import { createOntologyClient, } from "./ontologyClient.js";
|
|
3
|
-
import { createGraphClient } from "./graphClient.js";
|
|
4
|
-
import { createIdentityClient } from "./identityClient.js";
|
|
5
|
-
import { createTopicsClient, } from "./topicsClient.js";
|
|
6
|
-
function serializeTypes(types) {
|
|
7
|
-
return Array.isArray(types) && types.length > 0 ? types.join(",") : undefined;
|
|
8
|
-
}
|
|
9
|
-
export function createBeliefsFacade(config = {}) {
|
|
10
|
-
const gateway = createGatewayRequestClient(config);
|
|
11
|
-
return {
|
|
12
|
-
async create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
13
|
-
return gateway.request({
|
|
14
|
-
path: "/api/platform/v1/beliefs",
|
|
15
|
-
method: "POST",
|
|
16
|
-
body: input,
|
|
17
|
-
idempotencyKey,
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
async get(id) {
|
|
21
|
-
return gateway.request({
|
|
22
|
-
path: `/api/platform/v1/beliefs/${encodeURIComponent(id)}`,
|
|
23
|
-
});
|
|
24
|
-
},
|
|
25
|
-
async list(query) {
|
|
26
|
-
return gateway.request({
|
|
27
|
-
path: `/api/platform/v1/beliefs${toQueryString({
|
|
28
|
-
topicId: query.topicId,
|
|
29
|
-
status: query.status,
|
|
30
|
-
worktreeId: query.worktreeId,
|
|
31
|
-
minConfidence: query.minConfidence,
|
|
32
|
-
limit: query.limit,
|
|
33
|
-
cursor: query.cursor,
|
|
34
|
-
})}`,
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
async refine(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
38
|
-
return gateway.request({
|
|
39
|
-
path: `/api/platform/v1/beliefs/${encodeURIComponent(id)}`,
|
|
40
|
-
method: "PATCH",
|
|
41
|
-
body: input,
|
|
42
|
-
idempotencyKey,
|
|
43
|
-
});
|
|
44
|
-
},
|
|
45
|
-
async fork(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
46
|
-
return gateway.request({
|
|
47
|
-
path: `/api/platform/v1/beliefs/${encodeURIComponent(id)}/fork`,
|
|
48
|
-
method: "POST",
|
|
49
|
-
body: input,
|
|
50
|
-
idempotencyKey,
|
|
51
|
-
});
|
|
52
|
-
},
|
|
53
|
-
async updateConfidence(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
54
|
-
return gateway.request({
|
|
55
|
-
path: `/api/platform/v1/beliefs/${encodeURIComponent(id)}/confidence`,
|
|
56
|
-
method: "POST",
|
|
57
|
-
body: input,
|
|
58
|
-
idempotencyKey,
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
async updateStatus(input, idempotencyKey = randomIdempotencyKey()) {
|
|
62
|
-
return gateway.request({
|
|
63
|
-
path: "/api/platform/v1/beliefs/update-status",
|
|
64
|
-
method: "POST",
|
|
65
|
-
body: input,
|
|
66
|
-
idempotencyKey,
|
|
67
|
-
});
|
|
68
|
-
},
|
|
69
|
-
async updateRationale(input, idempotencyKey = randomIdempotencyKey()) {
|
|
70
|
-
return gateway.request({
|
|
71
|
-
path: "/api/platform/v1/beliefs/update-rationale",
|
|
72
|
-
method: "POST",
|
|
73
|
-
body: input,
|
|
74
|
-
idempotencyKey,
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
async linkBeliefs(input, idempotencyKey = randomIdempotencyKey()) {
|
|
78
|
-
return gateway.request({
|
|
79
|
-
path: "/api/platform/v1/beliefs/link",
|
|
80
|
-
method: "POST",
|
|
81
|
-
body: input,
|
|
82
|
-
idempotencyKey,
|
|
83
|
-
});
|
|
84
|
-
},
|
|
85
|
-
async unlinkEvidence(input, idempotencyKey = randomIdempotencyKey()) {
|
|
86
|
-
return gateway.request({
|
|
87
|
-
path: "/api/platform/v1/beliefs/unlink-evidence",
|
|
88
|
-
method: "POST",
|
|
89
|
-
body: input,
|
|
90
|
-
idempotencyKey,
|
|
91
|
-
});
|
|
92
|
-
},
|
|
93
|
-
async updateCriticality(input, idempotencyKey = randomIdempotencyKey()) {
|
|
94
|
-
return gateway.request({
|
|
95
|
-
path: "/api/platform/v1/beliefs/update-criticality",
|
|
96
|
-
method: "POST",
|
|
97
|
-
body: input,
|
|
98
|
-
idempotencyKey,
|
|
99
|
-
});
|
|
100
|
-
},
|
|
101
|
-
async batchUpdateCriticality(input, idempotencyKey = randomIdempotencyKey()) {
|
|
102
|
-
return gateway.request({
|
|
103
|
-
path: "/api/platform/v1/beliefs/batch-update-criticality",
|
|
104
|
-
method: "POST",
|
|
105
|
-
body: input,
|
|
106
|
-
idempotencyKey,
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
async reassignTopic(input, idempotencyKey = randomIdempotencyKey()) {
|
|
110
|
-
return gateway.request({
|
|
111
|
-
path: "/api/platform/v1/beliefs/reassign-topic",
|
|
112
|
-
method: "POST",
|
|
113
|
-
body: input,
|
|
114
|
-
idempotencyKey,
|
|
115
|
-
});
|
|
116
|
-
},
|
|
117
|
-
async archive(id, input = {}, idempotencyKey = randomIdempotencyKey()) {
|
|
118
|
-
return gateway.request({
|
|
119
|
-
path: `/api/platform/v1/beliefs/${encodeURIComponent(id)}`,
|
|
120
|
-
method: "DELETE",
|
|
121
|
-
body: input,
|
|
122
|
-
idempotencyKey,
|
|
123
|
-
});
|
|
124
|
-
},
|
|
125
|
-
async lineage(id) {
|
|
126
|
-
return gateway.request({
|
|
127
|
-
path: `/api/platform/v1/beliefs/${encodeURIComponent(id)}/lineage`,
|
|
128
|
-
});
|
|
129
|
-
},
|
|
130
|
-
async confidenceHistory(id) {
|
|
131
|
-
return gateway.request({
|
|
132
|
-
path: `/api/platform/v1/beliefs/${encodeURIComponent(id)}/confidence-history`,
|
|
133
|
-
});
|
|
134
|
-
},
|
|
135
|
-
async createContract(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
136
|
-
return gateway.request({
|
|
137
|
-
path: `/api/platform/v1/beliefs/${encodeURIComponent(id)}/contracts`,
|
|
138
|
-
method: "POST",
|
|
139
|
-
body: input,
|
|
140
|
-
idempotencyKey,
|
|
141
|
-
});
|
|
142
|
-
},
|
|
143
|
-
async bisect(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
144
|
-
return gateway.request({
|
|
145
|
-
path: `/api/platform/v1/beliefs/${encodeURIComponent(id)}/bisect`,
|
|
146
|
-
method: "POST",
|
|
147
|
-
body: input,
|
|
148
|
-
idempotencyKey,
|
|
149
|
-
});
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
export function createContradictionsFacade(config = {}) {
|
|
154
|
-
const gateway = createGatewayRequestClient(config);
|
|
155
|
-
return {
|
|
156
|
-
async flag(input, idempotencyKey = randomIdempotencyKey()) {
|
|
157
|
-
return gateway.request({
|
|
158
|
-
path: "/api/platform/v1/contradictions",
|
|
159
|
-
method: "POST",
|
|
160
|
-
body: input,
|
|
161
|
-
idempotencyKey,
|
|
162
|
-
});
|
|
163
|
-
},
|
|
164
|
-
async list(query) {
|
|
165
|
-
return gateway.request({
|
|
166
|
-
path: `/api/platform/v1/contradictions${toQueryString({
|
|
167
|
-
topicId: query.topicId,
|
|
168
|
-
status: query.status,
|
|
169
|
-
limit: query.limit,
|
|
170
|
-
cursor: query.cursor,
|
|
171
|
-
})}`,
|
|
172
|
-
});
|
|
173
|
-
},
|
|
174
|
-
async get(id) {
|
|
175
|
-
return gateway.request({
|
|
176
|
-
path: `/api/platform/v1/contradictions/${encodeURIComponent(id)}`,
|
|
177
|
-
});
|
|
178
|
-
},
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
export function createEdgesFacade(config = {}) {
|
|
182
|
-
const gateway = createGatewayRequestClient(config);
|
|
183
|
-
return {
|
|
184
|
-
async create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
185
|
-
return gateway.request({
|
|
186
|
-
path: "/api/platform/v1/edges",
|
|
187
|
-
method: "POST",
|
|
188
|
-
body: input,
|
|
189
|
-
idempotencyKey,
|
|
190
|
-
});
|
|
191
|
-
},
|
|
192
|
-
async list(query) {
|
|
193
|
-
return gateway.request({
|
|
194
|
-
path: `/api/platform/v1/edges${toQueryString({
|
|
195
|
-
sourceId: query.sourceId,
|
|
196
|
-
edgeType: query.edgeType,
|
|
197
|
-
limit: query.limit,
|
|
198
|
-
cursor: query.cursor,
|
|
199
|
-
})}`,
|
|
200
|
-
});
|
|
201
|
-
},
|
|
202
|
-
async traverse(input, idempotencyKey = randomIdempotencyKey()) {
|
|
203
|
-
return gateway.request({
|
|
204
|
-
path: "/api/platform/v1/edges/traverse",
|
|
205
|
-
method: "POST",
|
|
206
|
-
body: input,
|
|
207
|
-
idempotencyKey,
|
|
208
|
-
});
|
|
209
|
-
},
|
|
210
|
-
async update(input, idempotencyKey = randomIdempotencyKey()) {
|
|
211
|
-
return gateway.request({
|
|
212
|
-
path: "/api/platform/v1/edges/update",
|
|
213
|
-
method: "POST",
|
|
214
|
-
body: input,
|
|
215
|
-
idempotencyKey,
|
|
216
|
-
});
|
|
217
|
-
},
|
|
218
|
-
async remove(input, idempotencyKey = randomIdempotencyKey()) {
|
|
219
|
-
return gateway.request({
|
|
220
|
-
path: "/api/platform/v1/edges/remove",
|
|
221
|
-
method: "POST",
|
|
222
|
-
body: input,
|
|
223
|
-
idempotencyKey,
|
|
224
|
-
});
|
|
225
|
-
},
|
|
226
|
-
async removeBetween(input, idempotencyKey = randomIdempotencyKey()) {
|
|
227
|
-
return gateway.request({
|
|
228
|
-
path: "/api/platform/v1/edges/remove-between",
|
|
229
|
-
method: "POST",
|
|
230
|
-
body: input,
|
|
231
|
-
idempotencyKey,
|
|
232
|
-
});
|
|
233
|
-
},
|
|
234
|
-
async batchCreate(input, idempotencyKey = randomIdempotencyKey()) {
|
|
235
|
-
return gateway.request({
|
|
236
|
-
path: "/api/platform/v1/edges/batch",
|
|
237
|
-
method: "POST",
|
|
238
|
-
body: input,
|
|
239
|
-
idempotencyKey,
|
|
240
|
-
});
|
|
241
|
-
},
|
|
242
|
-
async delete(input, idempotencyKey = randomIdempotencyKey()) {
|
|
243
|
-
return gateway.request({
|
|
244
|
-
path: "/api/platform/v1/edges/delete",
|
|
245
|
-
method: "POST",
|
|
246
|
-
body: input,
|
|
247
|
-
idempotencyKey,
|
|
248
|
-
});
|
|
249
|
-
},
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
export function createEvidenceFacade(config = {}) {
|
|
253
|
-
const gateway = createGatewayRequestClient(config);
|
|
254
|
-
return {
|
|
255
|
-
async create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
256
|
-
return gateway.request({
|
|
257
|
-
path: "/api/platform/v1/evidence",
|
|
258
|
-
method: "POST",
|
|
259
|
-
body: input,
|
|
260
|
-
idempotencyKey,
|
|
261
|
-
});
|
|
262
|
-
},
|
|
263
|
-
async get(id) {
|
|
264
|
-
return gateway.request({
|
|
265
|
-
path: `/api/platform/v1/evidence/${encodeURIComponent(id)}`,
|
|
266
|
-
});
|
|
267
|
-
},
|
|
268
|
-
async list(query) {
|
|
269
|
-
return gateway.request({
|
|
270
|
-
path: `/api/platform/v1/evidence${toQueryString({
|
|
271
|
-
topicId: query.topicId,
|
|
272
|
-
targetId: query.targetId,
|
|
273
|
-
limit: query.limit,
|
|
274
|
-
cursor: query.cursor,
|
|
275
|
-
})}`,
|
|
276
|
-
});
|
|
277
|
-
},
|
|
278
|
-
async link(input, idempotencyKey = randomIdempotencyKey()) {
|
|
279
|
-
return gateway.request({
|
|
280
|
-
path: `/api/platform/v1/evidence/${encodeURIComponent(input.evidenceId)}/link`,
|
|
281
|
-
method: "POST",
|
|
282
|
-
body: {
|
|
283
|
-
targetId: input.targetId,
|
|
284
|
-
targetType: input.targetType,
|
|
285
|
-
weight: input.weight,
|
|
286
|
-
rationale: input.rationale,
|
|
287
|
-
},
|
|
288
|
-
idempotencyKey,
|
|
289
|
-
});
|
|
290
|
-
},
|
|
291
|
-
async search(query, idempotencyKey = randomIdempotencyKey()) {
|
|
292
|
-
return gateway.request({
|
|
293
|
-
path: "/api/platform/v1/evidence/search",
|
|
294
|
-
method: "POST",
|
|
295
|
-
body: query,
|
|
296
|
-
idempotencyKey,
|
|
297
|
-
});
|
|
298
|
-
},
|
|
299
|
-
async updateStatus(input, idempotencyKey = randomIdempotencyKey()) {
|
|
300
|
-
return gateway.request({
|
|
301
|
-
path: "/api/platform/v1/evidence/update-status",
|
|
302
|
-
method: "POST",
|
|
303
|
-
body: input,
|
|
304
|
-
idempotencyKey,
|
|
305
|
-
});
|
|
306
|
-
},
|
|
307
|
-
async update(input, idempotencyKey = randomIdempotencyKey()) {
|
|
308
|
-
return gateway.request({
|
|
309
|
-
path: "/api/platform/v1/evidence/update",
|
|
310
|
-
method: "POST",
|
|
311
|
-
body: input,
|
|
312
|
-
idempotencyKey,
|
|
313
|
-
});
|
|
314
|
-
},
|
|
315
|
-
async flagIncorrect(input, idempotencyKey = randomIdempotencyKey()) {
|
|
316
|
-
return gateway.request({
|
|
317
|
-
path: "/api/platform/v1/evidence/flag-incorrect",
|
|
318
|
-
method: "POST",
|
|
319
|
-
body: input,
|
|
320
|
-
idempotencyKey,
|
|
321
|
-
});
|
|
322
|
-
},
|
|
323
|
-
async remove(input, idempotencyKey = randomIdempotencyKey()) {
|
|
324
|
-
return gateway.request({
|
|
325
|
-
path: "/api/platform/v1/evidence/remove",
|
|
326
|
-
method: "POST",
|
|
327
|
-
body: input,
|
|
328
|
-
idempotencyKey,
|
|
329
|
-
});
|
|
330
|
-
},
|
|
331
|
-
async updateVerificationStatus(input, idempotencyKey = randomIdempotencyKey()) {
|
|
332
|
-
return gateway.request({
|
|
333
|
-
path: "/api/platform/v1/evidence/update-verification-status",
|
|
334
|
-
method: "POST",
|
|
335
|
-
body: input,
|
|
336
|
-
idempotencyKey,
|
|
337
|
-
});
|
|
338
|
-
},
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
export function createEventsFacade(config = {}) {
|
|
342
|
-
const gateway = createGatewayRequestClient(config);
|
|
343
|
-
return {
|
|
344
|
-
async list(query = {}) {
|
|
345
|
-
return gateway.request({
|
|
346
|
-
path: `/api/platform/v1/events${toQueryString({
|
|
347
|
-
topicId: query.topicId,
|
|
348
|
-
after: query.after,
|
|
349
|
-
types: serializeTypes(query.types),
|
|
350
|
-
startTime: query.startTime,
|
|
351
|
-
endTime: query.endTime,
|
|
352
|
-
limit: query.limit,
|
|
353
|
-
})}`,
|
|
354
|
-
});
|
|
355
|
-
},
|
|
356
|
-
async replay(input, idempotencyKey = randomIdempotencyKey()) {
|
|
357
|
-
return gateway.request({
|
|
358
|
-
path: "/api/platform/v1/events/replay",
|
|
359
|
-
method: "POST",
|
|
360
|
-
body: input,
|
|
361
|
-
idempotencyKey,
|
|
362
|
-
});
|
|
363
|
-
},
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
export function createGraphFacade(config = {}) {
|
|
367
|
-
const graphClient = createGraphClient(config);
|
|
368
|
-
const gateway = createGatewayRequestClient(config);
|
|
369
|
-
return {
|
|
370
|
-
async neighborhood(input) {
|
|
371
|
-
return graphClient.neighborhood({
|
|
372
|
-
globalId: input.globalId,
|
|
373
|
-
globalIds: Array.isArray(input.globalIds)
|
|
374
|
-
? input.globalIds.join(",")
|
|
375
|
-
: input.globalIds,
|
|
376
|
-
maxDepth: input.maxDepth,
|
|
377
|
-
});
|
|
378
|
-
},
|
|
379
|
-
async traverse(input) {
|
|
380
|
-
return graphClient.traverse(input);
|
|
381
|
-
},
|
|
382
|
-
async analyze(input = {}) {
|
|
383
|
-
return graphClient.analyze(input);
|
|
384
|
-
},
|
|
385
|
-
async bias(input = {}) {
|
|
386
|
-
return graphClient.bias(input);
|
|
387
|
-
},
|
|
388
|
-
async gaps(input) {
|
|
389
|
-
return graphClient.gaps(input);
|
|
390
|
-
},
|
|
391
|
-
async falsify(input, idempotencyKey = randomIdempotencyKey()) {
|
|
392
|
-
return gateway.request({
|
|
393
|
-
path: "/api/platform/v1/graph/falsify",
|
|
394
|
-
method: "POST",
|
|
395
|
-
body: input,
|
|
396
|
-
idempotencyKey,
|
|
397
|
-
});
|
|
398
|
-
},
|
|
399
|
-
};
|
|
400
|
-
}
|
|
401
|
-
export function createIdentityFacade(config = {}) {
|
|
402
|
-
const identityClient = createIdentityClient(config);
|
|
403
|
-
return {
|
|
404
|
-
async whoami() {
|
|
405
|
-
const response = await identityClient.whoami();
|
|
406
|
-
return Object.assign({}, response, response.data);
|
|
407
|
-
},
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
export function createOntologiesFacade(config = {}) {
|
|
411
|
-
const ontologyClient = createOntologyClient(config);
|
|
412
|
-
const gateway = createGatewayRequestClient(config);
|
|
413
|
-
return {
|
|
414
|
-
async get(id) {
|
|
415
|
-
return gateway.request({
|
|
416
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(id)}`,
|
|
417
|
-
});
|
|
418
|
-
},
|
|
419
|
-
async list(query = {}) {
|
|
420
|
-
return ontologyClient.list(query);
|
|
421
|
-
},
|
|
422
|
-
async bind(input, idempotencyKey) {
|
|
423
|
-
return gateway.request({
|
|
424
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(input.ontologyId)}/bind`,
|
|
425
|
-
method: "POST",
|
|
426
|
-
body: {
|
|
427
|
-
topicId: input.topicId,
|
|
428
|
-
},
|
|
429
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
430
|
-
});
|
|
431
|
-
},
|
|
432
|
-
async match(input, idempotencyKey) {
|
|
433
|
-
return gateway.request({
|
|
434
|
-
path: "/api/platform/v1/ontologies/match",
|
|
435
|
-
method: "POST",
|
|
436
|
-
body: input,
|
|
437
|
-
idempotencyKey,
|
|
438
|
-
});
|
|
439
|
-
},
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
export function createQuestionsFacade(config = {}) {
|
|
443
|
-
const gateway = createGatewayRequestClient(config);
|
|
444
|
-
return {
|
|
445
|
-
async create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
446
|
-
return gateway.request({
|
|
447
|
-
path: "/api/platform/v1/questions",
|
|
448
|
-
method: "POST",
|
|
449
|
-
body: input,
|
|
450
|
-
idempotencyKey,
|
|
451
|
-
});
|
|
452
|
-
},
|
|
453
|
-
async get(id) {
|
|
454
|
-
return gateway.request({
|
|
455
|
-
path: `/api/platform/v1/questions/${encodeURIComponent(id)}`,
|
|
456
|
-
});
|
|
457
|
-
},
|
|
458
|
-
async list(query) {
|
|
459
|
-
return gateway.request({
|
|
460
|
-
path: `/api/platform/v1/questions${toQueryString({
|
|
461
|
-
topicId: query.topicId,
|
|
462
|
-
status: query.status,
|
|
463
|
-
priority: query.priority,
|
|
464
|
-
worktreeId: query.worktreeId,
|
|
465
|
-
limit: query.limit,
|
|
466
|
-
cursor: query.cursor,
|
|
467
|
-
})}`,
|
|
468
|
-
});
|
|
469
|
-
},
|
|
470
|
-
async answer(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
471
|
-
return gateway.request({
|
|
472
|
-
path: `/api/platform/v1/questions/${encodeURIComponent(id)}/answer`,
|
|
473
|
-
method: "POST",
|
|
474
|
-
body: input,
|
|
475
|
-
idempotencyKey,
|
|
476
|
-
});
|
|
477
|
-
},
|
|
478
|
-
async refine(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
479
|
-
return gateway.request({
|
|
480
|
-
path: `/api/platform/v1/questions/${encodeURIComponent(id)}/refine`,
|
|
481
|
-
method: "POST",
|
|
482
|
-
body: input,
|
|
483
|
-
idempotencyKey,
|
|
484
|
-
});
|
|
485
|
-
},
|
|
486
|
-
async archive(id, input = {}, idempotencyKey = randomIdempotencyKey()) {
|
|
487
|
-
return gateway.request({
|
|
488
|
-
path: `/api/platform/v1/questions/${encodeURIComponent(id)}`,
|
|
489
|
-
method: "DELETE",
|
|
490
|
-
body: input,
|
|
491
|
-
idempotencyKey,
|
|
492
|
-
});
|
|
493
|
-
},
|
|
494
|
-
async updateStatus(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
495
|
-
return gateway.request({
|
|
496
|
-
path: `/api/platform/v1/questions/${encodeURIComponent(id)}/status`,
|
|
497
|
-
method: "PATCH",
|
|
498
|
-
body: input,
|
|
499
|
-
idempotencyKey,
|
|
500
|
-
});
|
|
501
|
-
},
|
|
502
|
-
async batchCreate(input, idempotencyKey = randomIdempotencyKey()) {
|
|
503
|
-
return gateway.request({
|
|
504
|
-
path: "/api/platform/v1/questions/batch",
|
|
505
|
-
method: "POST",
|
|
506
|
-
body: input,
|
|
507
|
-
idempotencyKey,
|
|
508
|
-
});
|
|
509
|
-
},
|
|
510
|
-
async add(input, idempotencyKey = randomIdempotencyKey()) {
|
|
511
|
-
return gateway.request({
|
|
512
|
-
path: "/api/platform/v1/questions/add",
|
|
513
|
-
method: "POST",
|
|
514
|
-
body: input,
|
|
515
|
-
idempotencyKey,
|
|
516
|
-
});
|
|
517
|
-
},
|
|
518
|
-
async updatePriority(input, idempotencyKey = randomIdempotencyKey()) {
|
|
519
|
-
return gateway.request({
|
|
520
|
-
path: "/api/platform/v1/questions/update-priority",
|
|
521
|
-
method: "POST",
|
|
522
|
-
body: input,
|
|
523
|
-
idempotencyKey,
|
|
524
|
-
});
|
|
525
|
-
},
|
|
526
|
-
async advanceToConviction(input, idempotencyKey = randomIdempotencyKey()) {
|
|
527
|
-
return gateway.request({
|
|
528
|
-
path: "/api/platform/v1/questions/advance-to-conviction",
|
|
529
|
-
method: "POST",
|
|
530
|
-
body: input,
|
|
531
|
-
idempotencyKey,
|
|
532
|
-
});
|
|
533
|
-
},
|
|
534
|
-
async updateConviction(input, idempotencyKey = randomIdempotencyKey()) {
|
|
535
|
-
return gateway.request({
|
|
536
|
-
path: "/api/platform/v1/questions/update-conviction",
|
|
537
|
-
method: "POST",
|
|
538
|
-
body: input,
|
|
539
|
-
idempotencyKey,
|
|
540
|
-
});
|
|
541
|
-
},
|
|
542
|
-
async finalizeConviction(input, idempotencyKey = randomIdempotencyKey()) {
|
|
543
|
-
return gateway.request({
|
|
544
|
-
path: "/api/platform/v1/questions/finalize-conviction",
|
|
545
|
-
method: "POST",
|
|
546
|
-
body: input,
|
|
547
|
-
idempotencyKey,
|
|
548
|
-
});
|
|
549
|
-
},
|
|
550
|
-
async update(input, idempotencyKey = randomIdempotencyKey()) {
|
|
551
|
-
return gateway.request({
|
|
552
|
-
path: "/api/platform/v1/questions/update",
|
|
553
|
-
method: "POST",
|
|
554
|
-
body: input,
|
|
555
|
-
idempotencyKey,
|
|
556
|
-
});
|
|
557
|
-
},
|
|
558
|
-
async delete(input, idempotencyKey = randomIdempotencyKey()) {
|
|
559
|
-
return gateway.request({
|
|
560
|
-
path: "/api/platform/v1/questions/delete",
|
|
561
|
-
method: "POST",
|
|
562
|
-
body: input,
|
|
563
|
-
idempotencyKey,
|
|
564
|
-
});
|
|
565
|
-
},
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
export function createSearchFacade(config = {}) {
|
|
569
|
-
const gateway = createGatewayRequestClient(config);
|
|
570
|
-
return {
|
|
571
|
-
async query(input) {
|
|
572
|
-
return gateway.request({
|
|
573
|
-
path: "/api/platform/v1/search",
|
|
574
|
-
method: "POST",
|
|
575
|
-
body: input,
|
|
576
|
-
});
|
|
577
|
-
},
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
export function createTasksFacade(config = {}) {
|
|
581
|
-
const gateway = createGatewayRequestClient(config);
|
|
582
|
-
return {
|
|
583
|
-
async create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
584
|
-
return gateway.request({
|
|
585
|
-
path: "/api/platform/v1/tasks",
|
|
586
|
-
method: "POST",
|
|
587
|
-
body: input,
|
|
588
|
-
idempotencyKey,
|
|
589
|
-
});
|
|
590
|
-
},
|
|
591
|
-
async update(input, idempotencyKey = randomIdempotencyKey()) {
|
|
592
|
-
return gateway.request({
|
|
593
|
-
path: `/api/platform/v1/tasks/${encodeURIComponent(input.id)}`,
|
|
594
|
-
method: "PATCH",
|
|
595
|
-
body: {
|
|
596
|
-
title: input.title,
|
|
597
|
-
description: input.description,
|
|
598
|
-
priority: input.priority,
|
|
599
|
-
status: input.status,
|
|
600
|
-
linkedBeliefId: input.linkedBeliefId,
|
|
601
|
-
linkedQuestionId: input.linkedQuestionId,
|
|
602
|
-
linkedWorktreeId: input.linkedWorktreeId,
|
|
603
|
-
metadata: input.metadata,
|
|
604
|
-
},
|
|
605
|
-
idempotencyKey,
|
|
606
|
-
});
|
|
607
|
-
},
|
|
608
|
-
async complete(input, idempotencyKey = randomIdempotencyKey()) {
|
|
609
|
-
return gateway.request({
|
|
610
|
-
path: `/api/platform/v1/tasks/${encodeURIComponent(input.id)}/complete`,
|
|
611
|
-
method: "POST",
|
|
612
|
-
body: {
|
|
613
|
-
outputSummary: input.outputSummary,
|
|
614
|
-
},
|
|
615
|
-
idempotencyKey,
|
|
616
|
-
});
|
|
617
|
-
},
|
|
618
|
-
async list(query) {
|
|
619
|
-
return gateway.request({
|
|
620
|
-
path: `/api/platform/v1/tasks${toQueryString({
|
|
621
|
-
topicId: query.topicId,
|
|
622
|
-
worktreeId: query.worktreeId,
|
|
623
|
-
status: query.status,
|
|
624
|
-
limit: query.limit,
|
|
625
|
-
})}`,
|
|
626
|
-
});
|
|
627
|
-
},
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
export function createTopicsFacade(config = {}) {
|
|
631
|
-
const topicsClient = createTopicsClient(config);
|
|
632
|
-
return {
|
|
633
|
-
async create(input, idempotencyKey) {
|
|
634
|
-
return topicsClient.create(input, idempotencyKey);
|
|
635
|
-
},
|
|
636
|
-
async get(id) {
|
|
637
|
-
return topicsClient.get(id);
|
|
638
|
-
},
|
|
639
|
-
async list(query = {}) {
|
|
640
|
-
return topicsClient.list(query);
|
|
641
|
-
},
|
|
642
|
-
async update(input, idempotencyKey) {
|
|
643
|
-
const { id, ...rest } = input;
|
|
644
|
-
return topicsClient.update(id, rest, idempotencyKey);
|
|
645
|
-
},
|
|
646
|
-
async tree(input) {
|
|
647
|
-
return topicsClient.getTree(input.id, {
|
|
648
|
-
maxDepth: input.maxDepth,
|
|
649
|
-
});
|
|
650
|
-
},
|
|
651
|
-
async coverage(input) {
|
|
652
|
-
return topicsClient.getCoverage(input.id, {
|
|
653
|
-
includeDescendants: input.includeDescendants,
|
|
654
|
-
maxDepth: input.maxDepth,
|
|
655
|
-
});
|
|
656
|
-
},
|
|
657
|
-
async remove(id, idempotencyKey = randomIdempotencyKey()) {
|
|
658
|
-
return topicsClient.remove(id, idempotencyKey);
|
|
659
|
-
},
|
|
660
|
-
async bulkCreate(input, idempotencyKey = randomIdempotencyKey()) {
|
|
661
|
-
return topicsClient.bulkCreate(input, idempotencyKey);
|
|
662
|
-
},
|
|
663
|
-
};
|
|
664
|
-
}
|
|
665
|
-
export function createWebhooksFacade(config = {}) {
|
|
666
|
-
const gateway = createGatewayRequestClient(config);
|
|
667
|
-
return {
|
|
668
|
-
async create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
669
|
-
return gateway.request({
|
|
670
|
-
path: "/api/platform/v1/webhooks",
|
|
671
|
-
method: "POST",
|
|
672
|
-
body: input,
|
|
673
|
-
idempotencyKey,
|
|
674
|
-
});
|
|
675
|
-
},
|
|
676
|
-
async list(query = {}) {
|
|
677
|
-
return gateway.request({
|
|
678
|
-
path: `/api/platform/v1/webhooks${toQueryString({
|
|
679
|
-
topicId: query.topicId,
|
|
680
|
-
})}`,
|
|
681
|
-
});
|
|
682
|
-
},
|
|
683
|
-
async get(id) {
|
|
684
|
-
return gateway.request({
|
|
685
|
-
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}`,
|
|
686
|
-
});
|
|
687
|
-
},
|
|
688
|
-
async update(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
689
|
-
return gateway.request({
|
|
690
|
-
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}`,
|
|
691
|
-
method: "PATCH",
|
|
692
|
-
body: input,
|
|
693
|
-
idempotencyKey,
|
|
694
|
-
});
|
|
695
|
-
},
|
|
696
|
-
async delete(id, idempotencyKey = randomIdempotencyKey()) {
|
|
697
|
-
return gateway.request({
|
|
698
|
-
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}`,
|
|
699
|
-
method: "DELETE",
|
|
700
|
-
idempotencyKey,
|
|
701
|
-
});
|
|
702
|
-
},
|
|
703
|
-
async test(id, input = {}, idempotencyKey = randomIdempotencyKey()) {
|
|
704
|
-
return gateway.request({
|
|
705
|
-
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}/test`,
|
|
706
|
-
method: "POST",
|
|
707
|
-
body: input,
|
|
708
|
-
idempotencyKey,
|
|
709
|
-
});
|
|
710
|
-
},
|
|
711
|
-
async deliveries(id, query = {}) {
|
|
712
|
-
return gateway.request({
|
|
713
|
-
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}/deliveries${toQueryString({
|
|
714
|
-
limit: query.limit,
|
|
715
|
-
})}`,
|
|
716
|
-
});
|
|
717
|
-
},
|
|
718
|
-
async health(id) {
|
|
719
|
-
return gateway.request({
|
|
720
|
-
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}/health`,
|
|
721
|
-
});
|
|
722
|
-
},
|
|
723
|
-
};
|
|
724
|
-
}
|
|
725
|
-
export function createWorktreesFacade(config = {}) {
|
|
726
|
-
const gateway = createGatewayRequestClient(config);
|
|
727
|
-
return {
|
|
728
|
-
async create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
729
|
-
return gateway.request({
|
|
730
|
-
path: "/api/platform/v1/worktrees",
|
|
731
|
-
method: "POST",
|
|
732
|
-
body: input,
|
|
733
|
-
idempotencyKey,
|
|
734
|
-
});
|
|
735
|
-
},
|
|
736
|
-
async list(query) {
|
|
737
|
-
return gateway.request({
|
|
738
|
-
path: `/api/platform/v1/worktrees${toQueryString({
|
|
739
|
-
topicId: query.topicId,
|
|
740
|
-
status: query.status,
|
|
741
|
-
limit: query.limit,
|
|
742
|
-
})}`,
|
|
743
|
-
});
|
|
744
|
-
},
|
|
745
|
-
async activate(input, idempotencyKey = randomIdempotencyKey()) {
|
|
746
|
-
return gateway.request({
|
|
747
|
-
path: `/api/platform/v1/worktrees/${encodeURIComponent(input.id)}/activate`,
|
|
748
|
-
method: "POST",
|
|
749
|
-
body: {},
|
|
750
|
-
idempotencyKey,
|
|
751
|
-
});
|
|
752
|
-
},
|
|
753
|
-
async update(input, idempotencyKey = randomIdempotencyKey()) {
|
|
754
|
-
return gateway.request({
|
|
755
|
-
path: `/api/platform/v1/worktrees/${encodeURIComponent(input.id)}`,
|
|
756
|
-
method: "PATCH",
|
|
757
|
-
body: {
|
|
758
|
-
objective: input.objective,
|
|
759
|
-
hypothesis: input.hypothesis,
|
|
760
|
-
rationale: input.rationale,
|
|
761
|
-
track: input.track,
|
|
762
|
-
trackPosition: input.trackPosition,
|
|
763
|
-
executionBand: input.executionBand,
|
|
764
|
-
executionOrder: input.executionOrder,
|
|
765
|
-
dependsOn: input.dependsOn,
|
|
766
|
-
blocks: input.blocks,
|
|
767
|
-
gate: input.gate,
|
|
768
|
-
status: input.status,
|
|
769
|
-
topicId: input.topicId,
|
|
770
|
-
additionalTopicIds: input.additionalTopicIds,
|
|
771
|
-
proofArtifacts: input.proofArtifacts,
|
|
772
|
-
staffingHint: input.staffingHint,
|
|
773
|
-
lastReconciledAt: input.lastReconciledAt,
|
|
774
|
-
autoFixPolicy: input.autoFixPolicy,
|
|
775
|
-
lensId: input.lensId,
|
|
776
|
-
},
|
|
777
|
-
idempotencyKey,
|
|
778
|
-
});
|
|
779
|
-
},
|
|
780
|
-
async merge(input, idempotencyKey = randomIdempotencyKey()) {
|
|
781
|
-
return gateway.request({
|
|
782
|
-
path: `/api/platform/v1/worktrees/${encodeURIComponent(input.id)}/merge`,
|
|
783
|
-
method: "POST",
|
|
784
|
-
body: {
|
|
785
|
-
summary: input.summary,
|
|
786
|
-
outcomes: input.outcomes,
|
|
787
|
-
},
|
|
788
|
-
idempotencyKey,
|
|
789
|
-
});
|
|
790
|
-
},
|
|
791
|
-
async updateTargets(input, idempotencyKey = randomIdempotencyKey()) {
|
|
792
|
-
return gateway.request({
|
|
793
|
-
path: `/api/platform/v1/worktrees/${encodeURIComponent(input.id)}/targets`,
|
|
794
|
-
method: "POST",
|
|
795
|
-
body: {
|
|
796
|
-
addBeliefIds: input.addBeliefIds,
|
|
797
|
-
addQuestionIds: input.addQuestionIds,
|
|
798
|
-
removeBeliefIds: input.removeBeliefIds,
|
|
799
|
-
removeQuestionIds: input.removeQuestionIds,
|
|
800
|
-
},
|
|
801
|
-
idempotencyKey,
|
|
802
|
-
});
|
|
803
|
-
},
|
|
804
|
-
async complete(input, idempotencyKey = randomIdempotencyKey()) {
|
|
805
|
-
return gateway.request({
|
|
806
|
-
path: "/api/platform/v1/worktrees/complete",
|
|
807
|
-
method: "POST",
|
|
808
|
-
body: input,
|
|
809
|
-
idempotencyKey,
|
|
810
|
-
});
|
|
811
|
-
},
|
|
812
|
-
async advancePhase(input, idempotencyKey = randomIdempotencyKey()) {
|
|
813
|
-
return gateway.request({
|
|
814
|
-
path: "/api/platform/v1/worktrees/advance-phase",
|
|
815
|
-
method: "POST",
|
|
816
|
-
body: input,
|
|
817
|
-
idempotencyKey,
|
|
818
|
-
});
|
|
819
|
-
},
|
|
820
|
-
async setPhase(input, idempotencyKey = randomIdempotencyKey()) {
|
|
821
|
-
return gateway.request({
|
|
822
|
-
path: "/api/platform/v1/worktrees/set-phase",
|
|
823
|
-
method: "POST",
|
|
824
|
-
body: input,
|
|
825
|
-
idempotencyKey,
|
|
826
|
-
});
|
|
827
|
-
},
|
|
828
|
-
async patchState(input, idempotencyKey = randomIdempotencyKey()) {
|
|
829
|
-
return gateway.request({
|
|
830
|
-
path: "/api/platform/v1/worktrees/patch-state",
|
|
831
|
-
method: "POST",
|
|
832
|
-
body: input,
|
|
833
|
-
idempotencyKey,
|
|
834
|
-
});
|
|
835
|
-
},
|
|
836
|
-
async bulkCreate(input, idempotencyKey = randomIdempotencyKey()) {
|
|
837
|
-
return gateway.request({
|
|
838
|
-
path: "/api/platform/v1/worktrees/bulk",
|
|
839
|
-
method: "POST",
|
|
840
|
-
body: input,
|
|
841
|
-
idempotencyKey,
|
|
842
|
-
});
|
|
843
|
-
},
|
|
844
|
-
};
|
|
845
|
-
}
|