@pod-os/core 0.34.0-rc.2a1133e.0 → 0.34.0-rc.33e2c4f.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/index.js +22 -24
- package/lib/index.js +22 -24
- package/package.json +1 -1
- package/types/Store.d.ts +1 -1
- package/types/index.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -31116,30 +31116,28 @@ var Store = class {
|
|
|
31116
31116
|
return docUrl;
|
|
31117
31117
|
}
|
|
31118
31118
|
async addNewThing(uri6, name9, type5) {
|
|
31119
|
-
|
|
31120
|
-
|
|
31121
|
-
|
|
31122
|
-
|
|
31123
|
-
|
|
31124
|
-
|
|
31125
|
-
|
|
31126
|
-
|
|
31127
|
-
|
|
31128
|
-
|
|
31129
|
-
|
|
31130
|
-
|
|
31131
|
-
|
|
31132
|
-
|
|
31133
|
-
)
|
|
31134
|
-
|
|
31135
|
-
|
|
31136
|
-
|
|
31137
|
-
|
|
31138
|
-
|
|
31139
|
-
|
|
31140
|
-
|
|
31141
|
-
}
|
|
31142
|
-
);
|
|
31119
|
+
const typeInsertion = type5 ? [
|
|
31120
|
+
st(
|
|
31121
|
+
namedNode2(uri6),
|
|
31122
|
+
namedNode2("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
|
|
31123
|
+
namedNode2(type5),
|
|
31124
|
+
namedNode2(uri6).doc()
|
|
31125
|
+
)
|
|
31126
|
+
] : [];
|
|
31127
|
+
const insertions = [
|
|
31128
|
+
...typeInsertion,
|
|
31129
|
+
st(
|
|
31130
|
+
namedNode2(uri6),
|
|
31131
|
+
namedNode2("http://www.w3.org/2000/01/rdf-schema#label"),
|
|
31132
|
+
lit(name9),
|
|
31133
|
+
namedNode2(uri6).doc()
|
|
31134
|
+
)
|
|
31135
|
+
];
|
|
31136
|
+
await this.updater.update([], insertions, void 0, false, {
|
|
31137
|
+
// explicitly omit credentials due to
|
|
31138
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
31139
|
+
credentials: "omit"
|
|
31140
|
+
});
|
|
31143
31141
|
}
|
|
31144
31142
|
async executeUpdate(operation3) {
|
|
31145
31143
|
await executeUpdate(this.fetcher, this.updater, operation3);
|
package/lib/index.js
CHANGED
|
@@ -39558,30 +39558,28 @@ _:patch
|
|
|
39558
39558
|
return docUrl;
|
|
39559
39559
|
}
|
|
39560
39560
|
async addNewThing(uri6, name9, type5) {
|
|
39561
|
-
|
|
39562
|
-
|
|
39563
|
-
|
|
39564
|
-
|
|
39565
|
-
|
|
39566
|
-
|
|
39567
|
-
|
|
39568
|
-
|
|
39569
|
-
|
|
39570
|
-
|
|
39571
|
-
|
|
39572
|
-
|
|
39573
|
-
|
|
39574
|
-
|
|
39575
|
-
)
|
|
39576
|
-
|
|
39577
|
-
|
|
39578
|
-
|
|
39579
|
-
|
|
39580
|
-
|
|
39581
|
-
|
|
39582
|
-
|
|
39583
|
-
}
|
|
39584
|
-
);
|
|
39561
|
+
const typeInsertion = type5 ? [
|
|
39562
|
+
st(
|
|
39563
|
+
namedNode2(uri6),
|
|
39564
|
+
namedNode2("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
|
|
39565
|
+
namedNode2(type5),
|
|
39566
|
+
namedNode2(uri6).doc()
|
|
39567
|
+
)
|
|
39568
|
+
] : [];
|
|
39569
|
+
const insertions = [
|
|
39570
|
+
...typeInsertion,
|
|
39571
|
+
st(
|
|
39572
|
+
namedNode2(uri6),
|
|
39573
|
+
namedNode2("http://www.w3.org/2000/01/rdf-schema#label"),
|
|
39574
|
+
lit(name9),
|
|
39575
|
+
namedNode2(uri6).doc()
|
|
39576
|
+
)
|
|
39577
|
+
];
|
|
39578
|
+
await this.updater.update([], insertions, void 0, false, {
|
|
39579
|
+
// explicitly omit credentials due to
|
|
39580
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
39581
|
+
credentials: "omit"
|
|
39582
|
+
});
|
|
39585
39583
|
}
|
|
39586
39584
|
async executeUpdate(operation3) {
|
|
39587
39585
|
await executeUpdate(this.fetcher, this.updater, operation3);
|
package/package.json
CHANGED
package/types/Store.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export declare class Store {
|
|
|
59
59
|
*/
|
|
60
60
|
addRelation(thing: Thing, property: string, uri: string): Promise<void>;
|
|
61
61
|
private determineDocumentToUpdate;
|
|
62
|
-
addNewThing(uri: string, name: string, type
|
|
62
|
+
addNewThing(uri: string, name: string, type?: string): Promise<void>;
|
|
63
63
|
executeUpdate(operation: UpdateOperation): Promise<void>;
|
|
64
64
|
flagAuthorizationMetadata(): void;
|
|
65
65
|
loadModule<T>(module: PodOsModule<T>): T;
|
package/types/index.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export declare class PodOS {
|
|
|
84
84
|
*/
|
|
85
85
|
addRelation(thing: Thing, property: string, value: string): Promise<void>;
|
|
86
86
|
listKnownTerms(): Term[];
|
|
87
|
-
addNewThing(uri: string, name: string, type
|
|
87
|
+
addNewThing(uri: string, name: string, type?: string): Promise<void>;
|
|
88
88
|
proposeUriForNewThing(referenceUri: string, name: string): string;
|
|
89
89
|
/**
|
|
90
90
|
* returns a behavior subject that can be used to observe changes in the session state
|