@littlebigbrain/client 0.11.1 → 0.13.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/README.md +15 -11
- package/dist/client.d.ts +18 -21
- package/dist/client.js +63 -59
- package/dist/namespaces.d.ts +10 -1
- package/dist/namespaces.js +12 -0
- package/dist/schema.d.ts +472 -316
- package/dist/types.d.ts +13 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,19 +68,19 @@ const accepted = await lbb.submitImport(records(), {
|
|
|
68
68
|
});
|
|
69
69
|
const completed = await lbb.waitForImportJob(accepted.job_id);
|
|
70
70
|
console.log(completed.state, completed.committed_commit_seq);
|
|
71
|
-
if (completed.committed_commit_seq != null) {
|
|
72
|
-
await lbb.waitForIndexLineage(completed.committed_commit_seq);
|
|
73
|
-
}
|
|
74
71
|
```
|
|
75
72
|
|
|
76
73
|
`records()` may be an iterable or async iterable. Success means every grouped
|
|
77
|
-
commit is durable and
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
`index_caught_up=false` metadata until its own deadline, including on an
|
|
81
|
-
RDF-only deployment. An empty iterable is rejected locally before an import
|
|
74
|
+
commit is durable and immediately queryable by a strong SPARQL read. The same
|
|
75
|
+
commits advance the graph's coalesced RDF reconciliation fence; waiting for base
|
|
76
|
+
compaction is optional. An empty iterable is rejected locally before an import
|
|
82
77
|
POST is sent.
|
|
83
78
|
|
|
79
|
+
For several RDF documents, `facts.importRdfMany(...)` automatically defers
|
|
80
|
+
intermediate reconciliation and triggers it on the last document. Call
|
|
81
|
+
`graph.waitForPublished(result.finalSequence)` only when the caller needs the
|
|
82
|
+
immutable base itself to cover the import; strong reads need no waiter.
|
|
83
|
+
|
|
84
84
|
**Time-travel read.** Pin a SPARQL read to a past instant — results reflect the graph as it was then:
|
|
85
85
|
|
|
86
86
|
```ts
|
|
@@ -101,8 +101,10 @@ const { rows } = await lbb.sparqlRows({
|
|
|
101
101
|
## Errors & retries
|
|
102
102
|
|
|
103
103
|
Methods return parsed JSON and throw `LbbError` (with `status`, `code`, `message`, `param`, `requestId`, `docUrl`) on any non-2xx response. Safe reads and idempotency-keyed writes retry `429`/`5xx` and network failures with full-jitter backoff, bounded by a retry budget (`retryBudgetMs`, default 60s) rather than a fixed count, and honor `Retry-After` — a terminal error the server marks non-retryable surfaces immediately. Use `rawRequest()` for response headers, request id, and retry/timing metadata.
|
|
104
|
-
`
|
|
105
|
-
|
|
104
|
+
`waitForPublished(...)` is an optional, deadline-bounded maintenance poller for
|
|
105
|
+
workflows that want the immutable RDF base itself to cover a commit. Strong
|
|
106
|
+
SPARQL does not need it: acknowledged commits are queryable immediately from
|
|
107
|
+
the branch head's base-plus-delta lineage.
|
|
106
108
|
|
|
107
109
|
## More
|
|
108
110
|
|
|
@@ -111,7 +113,9 @@ The `graph(...)` scope exposes `facts`, `entities`, `ontology`, `query`,
|
|
|
111
113
|
the one query language on the API; `schema`
|
|
112
114
|
reads or atomically publishes the active ontology/shapes bundle. Writes enqueue
|
|
113
115
|
published-generation maintenance automatically. Every generated shape is
|
|
114
|
-
available as `Schemas["TypeName"]`.
|
|
116
|
+
available as `Schemas["TypeName"]`. Retired request-time JSON SHACL DTOs are
|
|
117
|
+
intentionally absent: publish RDF shapes with `schema.publish`, then read
|
|
118
|
+
`ontology.conformance`.
|
|
115
119
|
|
|
116
120
|
Full reference and guides: [docs.littlebigbrain.com/sdks/typescript](https://docs.littlebigbrain.com/sdks/typescript/).
|
|
117
121
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import type { DurableImportSource, ImportLine, LbbClientOptions, ListResponse, RawLbbResponse, ReadConsistencyOptions, RdfImportOptions, Schemas, SearchConsistency, SparqlResults } from "./types.js";
|
|
1
|
+
import type { DurableImportSource, ImportLine, LbbClientOptions, ListResponse, RawLbbResponse, ReadConsistencyOptions, RdfImportDocument, RdfImportManyResult, RdfImportOptions, Schemas, SearchConsistency, SparqlResults } from "./types.js";
|
|
2
2
|
import { type CallOptions, type RequestOptions } from "./transport.js";
|
|
3
3
|
import { EntityNamespace, GraphNamespace, OntologyNamespace, QueryNamespace, SchemaNamespace, SearchNamespace } from "./namespaces.js";
|
|
4
4
|
export { parseSparqlResults } from "./types.js";
|
|
5
|
-
export type { AttributeFilter, AttributeFilterOp, AttributeFilterValue, EntityAttributeFilterOptions, EntityPropertiesLine, DurableImportLine, DurableImportSource, FetchLike, FlatProperties, ImportLine, LbbClientOptions, LbbRequestEvent, LbbResponseEvent, LbbRetryEvent, LbbErrorPayload, ListResponse, RawLbbResponse, ReadConsistencyOptions, RdfImportOptions, Schemas, SearchConsistency, SparqlResults, SparqlResultsJson, SparqlTerm, CommitRequest, CommitResponse, Entity, EntitySelector, GraphMetadata, GraphSummary, SchemaView, Snapshot, } from "./types.js";
|
|
5
|
+
export type { AttributeFilter, AttributeFilterOp, AttributeFilterValue, EntityAttributeFilterOptions, EntityPropertiesLine, DurableImportLine, DurableImportSource, FetchLike, FlatProperties, ImportLine, LbbClientOptions, LbbRequestEvent, LbbResponseEvent, LbbRetryEvent, LbbErrorPayload, ListResponse, RawLbbResponse, ReadConsistencyOptions, RdfImportDocument, RdfImportManyResult, RdfImportOptions, Schemas, SearchConsistency, SparqlResults, SparqlResultsJson, SparqlTerm, CommitRequest, CommitResponse, Entity, EntitySelector, GraphMetadata, GraphSummary, SchemaView, Snapshot, } from "./types.js";
|
|
6
6
|
export { LbbCapabilityError, LbbError } from "./transport.js";
|
|
7
7
|
export type { CallOptions, Query, QueryValue, RequestOptions, } from "./transport.js";
|
|
8
8
|
export { EntityNamespace, FactsNamespace, GraphNamespace, OntologyNamespace, QueryNamespace, SchemaNamespace, SearchNamespace, } from "./namespaces.js";
|
|
9
|
-
export interface IndexLineageObservation {
|
|
10
|
-
metadata: Schemas["GraphMetadataResponse"];
|
|
11
|
-
lineage: Schemas["IndexLineage"];
|
|
12
|
-
buildCommit?: string;
|
|
13
|
-
replica?: string;
|
|
14
|
-
requestId?: string;
|
|
15
|
-
attempts: number;
|
|
16
|
-
elapsedMs: number;
|
|
17
|
-
}
|
|
18
9
|
/**
|
|
19
10
|
* A typed HTTP client for a little big brain graph server. One instance is scoped to a
|
|
20
11
|
* single graph/branch; construct another for a different scope. All methods
|
|
@@ -137,6 +128,8 @@ export declare class LbbClient {
|
|
|
137
128
|
* properties on the subject Resource.
|
|
138
129
|
*/
|
|
139
130
|
importRdf(rdf: string, opts?: RdfImportOptions): Promise<Schemas["GraphRdfImportResponse"]>;
|
|
131
|
+
/** Import several RDF documents as truth-only chunks, then advance one final publication fence. */
|
|
132
|
+
importRdfMany(documents: readonly RdfImportDocument[], opts?: RdfImportOptions): Promise<RdfImportManyResult>;
|
|
140
133
|
/**
|
|
141
134
|
* Retract specific edges and/or every edge touching given entities. Appends
|
|
142
135
|
* superseding retract events rather than deleting — history stays visible in an
|
|
@@ -405,7 +398,7 @@ export declare class LbbClient {
|
|
|
405
398
|
* `groups[].keys`.
|
|
406
399
|
*/
|
|
407
400
|
sparql(body: Schemas["SparqlSelectRequest"], opts?: ReadConsistencyOptions): Promise<Schemas["SparqlSelectResponse"]>;
|
|
408
|
-
/** SPARQL 1.1 query from text (SELECT/ASK) over the live graph; `results` is SPARQL 1.1 Query Results JSON. The text dialect carries `consistency`/`min_indexed_seq` on the URL. */
|
|
401
|
+
/** SPARQL 1.1 query from text (SELECT/ASK) over the live graph; `results` is SPARQL 1.1 Query Results JSON. The text dialect carries `consistency`/`min_indexed_seq` on the URL; a floor with no explicit consistency implies a strong base-plus-delta read. */
|
|
409
402
|
sparqlText(body: Schemas["SparqlTextRequest"], opts?: ReadConsistencyOptions): Promise<Schemas["SparqlTextResponse"]>;
|
|
410
403
|
/**
|
|
411
404
|
* Run a SPARQL 1.1 text query and return parsed results — the ergonomic
|
|
@@ -468,21 +461,25 @@ export declare class LbbClient {
|
|
|
468
461
|
metadata(opts?: {
|
|
469
462
|
includeIndexes?: boolean;
|
|
470
463
|
}): Promise<Schemas["GraphMetadataResponse"]>;
|
|
471
|
-
/**
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
* deployment; `metadata.index_caught_up` is the generation-level readiness
|
|
476
|
-
* signal used by bulk loaders.
|
|
477
|
-
*/
|
|
478
|
-
waitForIndexLineage(targetSeq: number, opts?: {
|
|
464
|
+
/** Automatic publication lifecycle, available before the first generation exists. */
|
|
465
|
+
publicationStatus(): Promise<Schemas["PublicationStatusResponse"]>;
|
|
466
|
+
/** Wait until background reconciliation folds `targetSeq` into the RDF base. */
|
|
467
|
+
waitForPublished(targetSeq: number, opts?: {
|
|
479
468
|
timeoutMs?: number;
|
|
480
469
|
pollIntervalMs?: number;
|
|
481
|
-
}): Promise<
|
|
470
|
+
}): Promise<Schemas["PublicationStatusResponse"]>;
|
|
482
471
|
/** Graph counts and type/relation buckets. Carries `consistency`/`min_indexed_seq` on the URL. */
|
|
483
472
|
summary(opts?: ReadConsistencyOptions): Promise<Schemas["GraphSummaryResponse"]>;
|
|
484
473
|
/** Pinned published read root and its query/conformance lag against one coherent head. */
|
|
485
474
|
readSnapshot(): Promise<Schemas["PublishedReadStatusResponse"]>;
|
|
475
|
+
/**
|
|
476
|
+
* Compact observed RDF schema attached to the immutable published base:
|
|
477
|
+
* class populations, resource- and literal-valued predicate counts, and
|
|
478
|
+
* bounded OWL/RDFS statements. `literal_predicate_counts` is `null` when
|
|
479
|
+
* the stored summary artifact predates the field; the next full summary
|
|
480
|
+
* rebuild fills it.
|
|
481
|
+
*/
|
|
482
|
+
schemaSummary(): Promise<Schemas["RdfSchemaSummaryResponse"]>;
|
|
486
483
|
/** List the graphs (and branches) under the scoped tenant. */
|
|
487
484
|
listGraphs(): Promise<Schemas["GraphListResponse"]>;
|
|
488
485
|
}
|
package/dist/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseSparqlResults } from "./types.js";
|
|
2
2
|
import { bodyMarksTerminal, errorCodeFromBody, fullJitterBackoffMs, parseLbbError, parseResponseJson, retryAllowed, retryableStatus, retryDelayMs, sleep, } from "./transport.js";
|
|
3
|
-
import { LbbCapabilityError
|
|
3
|
+
import { LbbCapabilityError } from "./transport.js";
|
|
4
4
|
import { EntityNamespace, GraphNamespace, OntologyNamespace, QueryNamespace, SchemaNamespace, SearchNamespace, } from "./namespaces.js";
|
|
5
5
|
export { parseSparqlResults } from "./types.js";
|
|
6
6
|
export { LbbCapabilityError, LbbError } from "./transport.js";
|
|
@@ -563,6 +563,30 @@ export class LbbClient {
|
|
|
563
563
|
idempotencyKey: opts.idempotencyKey ?? this.idempotencyKey("import-rdf"),
|
|
564
564
|
});
|
|
565
565
|
}
|
|
566
|
+
/** Import several RDF documents as truth-only chunks, then advance one final publication fence. */
|
|
567
|
+
async importRdfMany(documents, opts = {}) {
|
|
568
|
+
if (documents.length === 0) {
|
|
569
|
+
throw new RangeError("importRdfMany requires at least one document");
|
|
570
|
+
}
|
|
571
|
+
const imports = [];
|
|
572
|
+
for (const [index, document] of documents.entries()) {
|
|
573
|
+
const merged = { ...opts, ...document.options };
|
|
574
|
+
const idempotencyKey = merged.idempotencyKey
|
|
575
|
+
? `${merged.idempotencyKey}:${index + 1}`
|
|
576
|
+
: undefined;
|
|
577
|
+
imports.push(await this.importRdf(document.rdf, {
|
|
578
|
+
...merged,
|
|
579
|
+
idempotencyKey,
|
|
580
|
+
build: index === documents.length - 1,
|
|
581
|
+
}));
|
|
582
|
+
}
|
|
583
|
+
const final = imports[imports.length - 1];
|
|
584
|
+
return {
|
|
585
|
+
imports,
|
|
586
|
+
finalSequence: final?.committed_commit_seq ?? undefined,
|
|
587
|
+
publication: final?.published_generation,
|
|
588
|
+
};
|
|
589
|
+
}
|
|
566
590
|
/**
|
|
567
591
|
* Retract specific edges and/or every edge touching given entities. Appends
|
|
568
592
|
* superseding retract events rather than deleting — history stays visible in an
|
|
@@ -940,7 +964,7 @@ export class LbbClient {
|
|
|
940
964
|
body: this.mergeReadConsistency(body, opts),
|
|
941
965
|
});
|
|
942
966
|
}
|
|
943
|
-
/** SPARQL 1.1 query from text (SELECT/ASK) over the live graph; `results` is SPARQL 1.1 Query Results JSON. The text dialect carries `consistency`/`min_indexed_seq` on the URL. */
|
|
967
|
+
/** SPARQL 1.1 query from text (SELECT/ASK) over the live graph; `results` is SPARQL 1.1 Query Results JSON. The text dialect carries `consistency`/`min_indexed_seq` on the URL; a floor with no explicit consistency implies a strong base-plus-delta read. */
|
|
944
968
|
sparqlText(body, opts) {
|
|
945
969
|
return this.request("POST", "/v1/query/sparql-text", {
|
|
946
970
|
body,
|
|
@@ -1038,68 +1062,38 @@ export class LbbClient {
|
|
|
1038
1062
|
},
|
|
1039
1063
|
});
|
|
1040
1064
|
}
|
|
1041
|
-
/**
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1065
|
+
/** Automatic publication lifecycle, available before the first generation exists. */
|
|
1066
|
+
publicationStatus() {
|
|
1067
|
+
return this.request("GET", "/v1/graph/publication-status");
|
|
1068
|
+
}
|
|
1069
|
+
/** Wait until background reconciliation folds `targetSeq` into the RDF base. */
|
|
1070
|
+
async waitForPublished(targetSeq, opts = {}) {
|
|
1071
|
+
if (!Number.isSafeInteger(targetSeq) || targetSeq < 0) {
|
|
1072
|
+
throw new RangeError("targetSeq must be a non-negative safe integer");
|
|
1073
|
+
}
|
|
1074
|
+
const timeoutMs = opts.timeoutMs ?? 30_000;
|
|
1075
|
+
const pollIntervalMs = opts.pollIntervalMs ?? 250;
|
|
1076
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs < 0) {
|
|
1077
|
+
throw new RangeError("timeoutMs must be a non-negative number");
|
|
1078
|
+
}
|
|
1079
|
+
if (!Number.isFinite(pollIntervalMs) || pollIntervalMs < 0) {
|
|
1080
|
+
throw new RangeError("pollIntervalMs must be a non-negative number");
|
|
1081
|
+
}
|
|
1082
|
+
const deadline = Date.now() + timeoutMs;
|
|
1050
1083
|
let last;
|
|
1051
1084
|
while (true) {
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
// legitimately take longer than that secondary cap.
|
|
1056
|
-
last = await this.rawRequest("GET", "/v1/graph/metadata", {
|
|
1057
|
-
maxRetries: 0,
|
|
1058
|
-
});
|
|
1085
|
+
last = await this.publicationStatus();
|
|
1086
|
+
if (last.state === "blocked") {
|
|
1087
|
+
throw new Error(`publication blocked at ${last.current_stage ?? "unknown stage"}: ${last.retry.message}`);
|
|
1059
1088
|
}
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
retryableStatus(error.status) &&
|
|
1063
|
-
error.retryable !== false;
|
|
1064
|
-
const retryableTransportError = error instanceof Error && !(error instanceof LbbError);
|
|
1065
|
-
if (!retryableHttpError && !retryableTransportError)
|
|
1066
|
-
throw error;
|
|
1067
|
-
const now = Date.now();
|
|
1068
|
-
if (now >= deadline) {
|
|
1069
|
-
throw new Error(`index lineage did not reach ${targetSeq} before timeout (last_error=${error.message})`, { cause: error });
|
|
1070
|
-
}
|
|
1071
|
-
const retryAfterMs = error instanceof LbbError
|
|
1072
|
-
? (error.retryAfterSeconds ?? 0) * 1_000
|
|
1073
|
-
: 0;
|
|
1074
|
-
await sleep(Math.min(Math.max(opts.pollIntervalMs ?? 250, retryAfterMs), deadline - now));
|
|
1075
|
-
continue;
|
|
1076
|
-
}
|
|
1077
|
-
const lineage = last.data.index_lineage;
|
|
1078
|
-
const servedAt = last.data.snapshot.served_at_seq;
|
|
1079
|
-
if (lineage != null &&
|
|
1080
|
-
servedAt != null &&
|
|
1081
|
-
servedAt >= targetSeq &&
|
|
1082
|
-
(last.data.index_caught_up === true ||
|
|
1083
|
-
(lineage.bm25_indexed_commit_seq != null &&
|
|
1084
|
-
lineage.bm25_indexed_commit_seq >= targetSeq &&
|
|
1085
|
-
lineage.ann_indexed_commit_seq != null &&
|
|
1086
|
-
lineage.ann_indexed_commit_seq >= targetSeq))) {
|
|
1087
|
-
return {
|
|
1088
|
-
metadata: last.data,
|
|
1089
|
-
lineage,
|
|
1090
|
-
buildCommit: last.headers?.get("lbb-build-commit") ?? undefined,
|
|
1091
|
-
replica: last.headers?.get("lbb-replica") ?? undefined,
|
|
1092
|
-
requestId: last.requestId,
|
|
1093
|
-
attempts: last.attempts,
|
|
1094
|
-
elapsedMs: last.elapsedMs,
|
|
1095
|
-
};
|
|
1089
|
+
if (last.state === "current" && last.published_seq >= targetSeq) {
|
|
1090
|
+
return last;
|
|
1096
1091
|
}
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
throw new Error(`index lineage did not reach ${targetSeq} before timeout (build=${build}, replica=${replica}, last=${JSON.stringify(last.data.index_lineage)})`);
|
|
1092
|
+
const now = Date.now();
|
|
1093
|
+
if (now >= deadline) {
|
|
1094
|
+
throw new Error(`publication did not reach ${targetSeq} before timeout (state=${last.state}, head=${last.head_seq}, target=${last.target_seq}, published=${last.published_seq}, stage=${last.current_stage ?? "unknown"})`);
|
|
1101
1095
|
}
|
|
1102
|
-
await sleep(
|
|
1096
|
+
await sleep(Math.min(Math.max(pollIntervalMs, last.retry.retry_after_ms), deadline - now));
|
|
1103
1097
|
}
|
|
1104
1098
|
}
|
|
1105
1099
|
/** Graph counts and type/relation buckets. Carries `consistency`/`min_indexed_seq` on the URL. */
|
|
@@ -1112,6 +1106,16 @@ export class LbbClient {
|
|
|
1112
1106
|
readSnapshot() {
|
|
1113
1107
|
return this.request("GET", "/v1/graph/read-snapshot");
|
|
1114
1108
|
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Compact observed RDF schema attached to the immutable published base:
|
|
1111
|
+
* class populations, resource- and literal-valued predicate counts, and
|
|
1112
|
+
* bounded OWL/RDFS statements. `literal_predicate_counts` is `null` when
|
|
1113
|
+
* the stored summary artifact predates the field; the next full summary
|
|
1114
|
+
* rebuild fills it.
|
|
1115
|
+
*/
|
|
1116
|
+
schemaSummary() {
|
|
1117
|
+
return this.request("GET", "/v1/graph/schema-summary");
|
|
1118
|
+
}
|
|
1115
1119
|
/** List the graphs (and branches) under the scoped tenant. */
|
|
1116
1120
|
listGraphs() {
|
|
1117
1121
|
return this.request("GET", "/v1/graphs");
|
package/dist/namespaces.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LbbClient } from "./client.js";
|
|
2
2
|
import type { CallOptions } from "./transport.js";
|
|
3
|
-
import { type EntityAttributeFilterOptions, type ImportLine, type ReadConsistencyOptions, type RdfImportOptions, type Schemas } from "./types.js";
|
|
3
|
+
import { type EntityAttributeFilterOptions, type ImportLine, type ReadConsistencyOptions, type RdfImportDocument, type RdfImportManyResult, type RdfImportOptions, type Schemas } from "./types.js";
|
|
4
4
|
export declare class GraphNamespace {
|
|
5
5
|
private readonly client;
|
|
6
6
|
readonly facts: FactsNamespace;
|
|
@@ -11,6 +11,13 @@ export declare class GraphNamespace {
|
|
|
11
11
|
readonly search: SearchNamespace;
|
|
12
12
|
constructor(client: LbbClient);
|
|
13
13
|
branch(name: string): GraphNamespace;
|
|
14
|
+
/** Publication lifecycle for this graph/branch, including pre-first-publish state. */
|
|
15
|
+
publicationStatus(): Promise<Schemas["PublicationStatusResponse"]>;
|
|
16
|
+
/** Wait until this graph/branch has an exact generation covering `targetSeq`. */
|
|
17
|
+
waitForPublished(targetSeq: number, opts?: {
|
|
18
|
+
timeoutMs?: number;
|
|
19
|
+
pollIntervalMs?: number;
|
|
20
|
+
}): Promise<Schemas["PublicationStatusResponse"]>;
|
|
14
21
|
create(opts?: CallOptions): Promise<Schemas["CreateGraphResponse"]>;
|
|
15
22
|
delete(opts: {
|
|
16
23
|
confirm: string;
|
|
@@ -39,6 +46,8 @@ export declare class FactsNamespace {
|
|
|
39
46
|
* predicates and literal term details are preserved as edge metadata.
|
|
40
47
|
*/
|
|
41
48
|
importRdf(rdf: string, opts?: CallOptions & RdfImportOptions): Promise<Schemas["GraphRdfImportResponse"]>;
|
|
49
|
+
/** Import several RDF documents and enqueue publication only for the final commit. */
|
|
50
|
+
importRdfMany(documents: readonly RdfImportDocument[], opts?: RdfImportOptions): Promise<RdfImportManyResult>;
|
|
42
51
|
}
|
|
43
52
|
/**
|
|
44
53
|
* Relevance-label storage. The query surfaces this namespace once fronted were
|
package/dist/namespaces.js
CHANGED
|
@@ -35,6 +35,14 @@ export class GraphNamespace {
|
|
|
35
35
|
branch(name) {
|
|
36
36
|
return new GraphNamespace(this.client.withScope({ branch: name }));
|
|
37
37
|
}
|
|
38
|
+
/** Publication lifecycle for this graph/branch, including pre-first-publish state. */
|
|
39
|
+
publicationStatus() {
|
|
40
|
+
return this.client.publicationStatus();
|
|
41
|
+
}
|
|
42
|
+
/** Wait until this graph/branch has an exact generation covering `targetSeq`. */
|
|
43
|
+
waitForPublished(targetSeq, opts = {}) {
|
|
44
|
+
return this.client.waitForPublished(targetSeq, opts);
|
|
45
|
+
}
|
|
38
46
|
create(opts = {}) {
|
|
39
47
|
return this.client.request("POST", "/v1/graph/create", opts);
|
|
40
48
|
}
|
|
@@ -120,6 +128,10 @@ export class FactsNamespace {
|
|
|
120
128
|
},
|
|
121
129
|
});
|
|
122
130
|
}
|
|
131
|
+
/** Import several RDF documents and enqueue publication only for the final commit. */
|
|
132
|
+
importRdfMany(documents, opts = {}) {
|
|
133
|
+
return this.client.importRdfMany(documents, opts);
|
|
134
|
+
}
|
|
123
135
|
}
|
|
124
136
|
/**
|
|
125
137
|
* Relevance-label storage. The query surfaces this namespace once fronted were
|