solid-logic 1.3.16 → 1.3.17-1aa535b3
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/.babelrc +0 -0
- package/.eslintrc.js +0 -0
- package/.github/workflows/ci.yml +0 -0
- package/.github/workflows/release.yml +0 -0
- package/.nvmrc +0 -0
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/jest.config.js +0 -0
- package/lib/acl/aclLogic.d.ts +12 -30
- package/lib/acl/aclLogic.d.ts.map +1 -1
- package/lib/acl/aclLogic.js +151 -116
- package/lib/acl/aclLogic.js.map +1 -1
- package/lib/authSession/authSession.d.ts +0 -0
- package/lib/authSession/authSession.d.ts.map +0 -0
- package/lib/authSession/authSession.js +0 -0
- package/lib/authSession/authSession.js.map +0 -0
- package/lib/authn/SolidAuthnLogic.d.ts +0 -0
- package/lib/authn/SolidAuthnLogic.d.ts.map +1 -1
- package/lib/authn/SolidAuthnLogic.js +3 -3
- package/lib/authn/SolidAuthnLogic.js.map +1 -1
- package/lib/authn/authUtil.d.ts +0 -0
- package/lib/authn/authUtil.d.ts.map +0 -0
- package/lib/authn/authUtil.js +1 -1
- package/lib/authn/authUtil.js.map +1 -1
- package/lib/chat/chatLogic.d.ts +16 -0
- package/lib/chat/chatLogic.d.ts.map +1 -0
- package/lib/chat/{ChatLogic.js → chatLogic.js} +82 -87
- package/lib/chat/chatLogic.js.map +1 -0
- package/lib/discovery/discoveryLogic.d.ts +31 -7
- package/lib/discovery/discoveryLogic.d.ts.map +1 -1
- package/lib/discovery/discoveryLogic.js +378 -81
- package/lib/discovery/discoveryLogic.js.map +1 -1
- package/lib/inbox/inboxLogic.d.ts +7 -0
- package/lib/inbox/inboxLogic.d.ts.map +1 -0
- package/lib/inbox/{InboxLogic.js → inboxLogic.js} +58 -64
- package/lib/inbox/inboxLogic.js.map +1 -0
- package/lib/index.d.ts +10 -13
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +76 -32
- package/lib/index.js.map +1 -1
- package/lib/issuer/issuerLogic.d.ts +0 -0
- package/lib/issuer/issuerLogic.d.ts.map +0 -0
- package/lib/issuer/issuerLogic.js +0 -0
- package/lib/issuer/issuerLogic.js.map +0 -0
- package/lib/logic/CustomError.d.ts +4 -0
- package/lib/logic/CustomError.d.ts.map +1 -1
- package/lib/logic/CustomError.js +17 -1
- package/lib/logic/CustomError.js.map +1 -1
- package/lib/logic/solidLogicSingleton.d.ts +35 -3
- package/lib/logic/solidLogicSingleton.d.ts.map +1 -1
- package/lib/logic/solidLogicSingleton.js +88 -9
- package/lib/logic/solidLogicSingleton.js.map +1 -1
- package/lib/profile/profileLogic.d.ts +13 -0
- package/lib/profile/profileLogic.d.ts.map +1 -0
- package/lib/profile/profileLogic.js +268 -0
- package/lib/profile/profileLogic.js.map +1 -0
- package/lib/typeIndex/typeIndexLogic.d.ts +31 -21
- package/lib/typeIndex/typeIndexLogic.d.ts.map +1 -1
- package/lib/typeIndex/typeIndexLogic.js +650 -295
- package/lib/typeIndex/typeIndexLogic.js.map +1 -1
- package/lib/types.d.ts +17 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +0 -0
- package/lib/types.js.map +0 -0
- package/lib/util/containerLogic.d.ts +11 -0
- package/lib/util/containerLogic.d.ts.map +1 -0
- package/lib/{profile/ProfileLogic.js → util/containerLogic.js} +53 -44
- package/lib/util/containerLogic.js.map +1 -0
- package/lib/util/debug.d.ts +0 -0
- package/lib/util/debug.d.ts.map +0 -0
- package/lib/util/debug.js +0 -0
- package/lib/util/debug.js.map +0 -0
- package/lib/util/utilityLogic.d.ts +15 -0
- package/lib/util/utilityLogic.d.ts.map +1 -0
- package/lib/util/utilityLogic.js +272 -0
- package/lib/util/utilityLogic.js.map +1 -0
- package/lib/util/utils.d.ts +8 -0
- package/lib/util/utils.d.ts.map +1 -0
- package/lib/util/utils.js +48 -0
- package/lib/util/utils.js.map +1 -0
- package/package.json +10 -8
- package/src/acl/aclLogic.ts +135 -119
- package/src/authSession/authSession.ts +0 -0
- package/src/authn/SolidAuthnLogic.ts +8 -7
- package/src/authn/authUtil.ts +1 -1
- package/src/chat/chatLogic.ts +225 -0
- package/src/discovery/discoveryLogic.ts +225 -48
- package/src/inbox/inboxLogic.ts +57 -0
- package/src/index.ts +74 -21
- package/src/issuer/issuerLogic.ts +0 -0
- package/src/logic/CustomError.ts +5 -1
- package/src/logic/solidLogicSingleton.ts +161 -8
- package/src/profile/profileLogic.ts +134 -0
- package/src/typeIndex/typeIndexLogic.ts +417 -153
- package/src/types.ts +7 -3
- package/src/util/containerLogic.ts +54 -0
- package/src/util/debug.ts +0 -0
- package/src/util/ns.js +5 -0
- package/src/util/utilityLogic.ts +155 -0
- package/src/util/utils.ts +52 -0
- package/test/aclLogic.test.ts +13 -4
- package/test/authUtil.test.ts +0 -0
- package/test/chatLogic.test.ts +70 -71
- package/test/container.test.ts +56 -0
- package/test/discoveryLogic.test.ts +712 -0
- package/test/helpers/dataSetup.ts +134 -0
- package/test/helpers/setup.ts +4 -0
- package/test/inboxLogic.test.ts +39 -38
- package/test/logic.test.ts +11 -9
- package/test/profileLogic.test.ts +246 -0
- package/test/solidAuthLogic.test.ts +0 -0
- package/test/typeIndexLogic.test.ts +48 -20
- package/test/typeIndexLogicPart2.test.ts +485 -0
- package/test/utilityLogic.test.ts +172 -126
- package/test/utils.test.ts +32 -0
- package/tsconfig.json +0 -0
- package/lib/chat/ChatLogic.d.ts +0 -26
- package/lib/chat/ChatLogic.d.ts.map +0 -1
- package/lib/chat/ChatLogic.js.map +0 -1
- package/lib/chat/determineChatContainer.d.ts +0 -3
- package/lib/chat/determineChatContainer.d.ts.map +0 -1
- package/lib/chat/determineChatContainer.js +0 -12
- package/lib/chat/determineChatContainer.js.map +0 -1
- package/lib/inbox/InboxLogic.d.ts +0 -18
- package/lib/inbox/InboxLogic.d.ts.map +0 -1
- package/lib/inbox/InboxLogic.js.map +0 -1
- package/lib/logic/SolidLogic.d.ts +0 -48
- package/lib/logic/SolidLogic.d.ts.map +0 -1
- package/lib/logic/SolidLogic.js +0 -321
- package/lib/logic/SolidLogic.js.map +0 -1
- package/lib/profile/ProfileLogic.d.ts +0 -13
- package/lib/profile/ProfileLogic.d.ts.map +0 -1
- package/lib/profile/ProfileLogic.js.map +0 -1
- package/lib/util/UtilityLogic.d.ts +0 -33
- package/lib/util/UtilityLogic.d.ts.map +0 -1
- package/lib/util/UtilityLogic.js +0 -240
- package/lib/util/UtilityLogic.js.map +0 -1
- package/lib/util/uri.d.ts +0 -3
- package/lib/util/uri.d.ts.map +0 -1
- package/lib/util/uri.js +0 -9
- package/lib/util/uri.js.map +0 -1
- package/src/chat/ChatLogic.ts +0 -244
- package/src/chat/determineChatContainer.ts +0 -14
- package/src/inbox/InboxLogic.ts +0 -66
- package/src/logic/SolidLogic.ts +0 -262
- package/src/profile/ProfileLogic.ts +0 -44
- package/src/util/UtilityLogic.ts +0 -161
- package/src/util/uri.ts +0 -5
|
@@ -36,59 +36,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var InboxLogic = /** @class */ (function () {
|
|
44
|
-
function InboxLogic(store, ns, profile, util) {
|
|
45
|
-
this.store = store;
|
|
46
|
-
this.ns = ns;
|
|
47
|
-
this.profile = profile;
|
|
48
|
-
this.util = util;
|
|
49
|
-
}
|
|
50
|
-
InboxLogic.prototype.getNewMessages = function (user) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
var inbox, urls;
|
|
53
|
-
var _this = this;
|
|
54
|
-
return __generator(this, function (_a) {
|
|
55
|
-
switch (_a.label) {
|
|
56
|
-
case 0:
|
|
57
|
-
if (!!user) return [3 /*break*/, 2];
|
|
58
|
-
return [4 /*yield*/, this.profile.loadMe()];
|
|
59
|
-
case 1:
|
|
60
|
-
user = _a.sent();
|
|
61
|
-
_a.label = 2;
|
|
62
|
-
case 2: return [4 /*yield*/, this.profile.getMainInbox(user)];
|
|
63
|
-
case 3:
|
|
64
|
-
inbox = _a.sent();
|
|
65
|
-
return [4 /*yield*/, this.util.getContainerMembers(inbox.value)];
|
|
66
|
-
case 4:
|
|
67
|
-
urls = _a.sent();
|
|
68
|
-
return [2 /*return*/, urls.filter(function (url) { return !_this.util.isContainer(url); })];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
InboxLogic.prototype.createInboxFor = function (peerWebId, nick) {
|
|
39
|
+
exports.createInboxLogic = void 0;
|
|
40
|
+
var utils_1 = require("../util/utils");
|
|
41
|
+
function createInboxLogic(store, profileLogic, utilityLogic, containerLogic, aclLogic) {
|
|
42
|
+
function createInboxFor(peerWebId, nick) {
|
|
74
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
75
44
|
var myWebId, podRoot, ourInbox, aclDocUrl;
|
|
76
45
|
return __generator(this, function (_a) {
|
|
77
46
|
switch (_a.label) {
|
|
78
|
-
case 0: return [4 /*yield*/,
|
|
47
|
+
case 0: return [4 /*yield*/, profileLogic.loadMe()];
|
|
79
48
|
case 1:
|
|
80
|
-
myWebId =
|
|
81
|
-
return [4 /*yield*/,
|
|
49
|
+
myWebId = _a.sent();
|
|
50
|
+
return [4 /*yield*/, profileLogic.getPodRoot(myWebId)];
|
|
82
51
|
case 2:
|
|
83
52
|
podRoot = _a.sent();
|
|
84
53
|
ourInbox = "".concat(podRoot.value, "p2p-inboxes/").concat(encodeURIComponent(nick), "/");
|
|
85
|
-
return [4 /*yield*/,
|
|
54
|
+
return [4 /*yield*/, containerLogic.createContainer(ourInbox)];
|
|
86
55
|
case 3:
|
|
87
56
|
_a.sent();
|
|
88
|
-
return [4 /*yield*/,
|
|
57
|
+
return [4 /*yield*/, aclLogic.findAclDocUrl(ourInbox)];
|
|
89
58
|
case 4:
|
|
90
59
|
aclDocUrl = _a.sent();
|
|
91
|
-
return [4 /*yield*/,
|
|
60
|
+
return [4 /*yield*/, utilityLogic.setSinglePeerAccess({
|
|
92
61
|
ownerWebId: myWebId.value,
|
|
93
62
|
peerWebId: peerWebId,
|
|
94
63
|
accessToModes: 'acl:Append',
|
|
@@ -100,47 +69,72 @@ var InboxLogic = /** @class */ (function () {
|
|
|
100
69
|
}
|
|
101
70
|
});
|
|
102
71
|
});
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
72
|
+
}
|
|
73
|
+
function getNewMessages(user) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
75
|
+
var inbox, urls;
|
|
76
|
+
return __generator(this, function (_a) {
|
|
77
|
+
switch (_a.label) {
|
|
78
|
+
case 0:
|
|
79
|
+
if (!!user) return [3 /*break*/, 2];
|
|
80
|
+
return [4 /*yield*/, profileLogic.loadMe()];
|
|
81
|
+
case 1:
|
|
82
|
+
user = _a.sent();
|
|
83
|
+
_a.label = 2;
|
|
84
|
+
case 2: return [4 /*yield*/, profileLogic.getMainInbox(user)];
|
|
85
|
+
case 3:
|
|
86
|
+
inbox = _a.sent();
|
|
87
|
+
return [4 /*yield*/, containerLogic.getContainerMembers(inbox.value)];
|
|
88
|
+
case 4:
|
|
89
|
+
urls = _a.sent();
|
|
90
|
+
return [2 /*return*/, urls.filter(function (url) { return !containerLogic.isContainer(url); })];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function markAsRead(url, date) {
|
|
106
96
|
return __awaiter(this, void 0, void 0, function () {
|
|
107
97
|
var downloaded, archiveUrl, options, uploaded;
|
|
108
|
-
var
|
|
109
|
-
return __generator(this, function (
|
|
110
|
-
switch (
|
|
111
|
-
case 0: return [4 /*yield*/,
|
|
98
|
+
var _a;
|
|
99
|
+
return __generator(this, function (_b) {
|
|
100
|
+
switch (_b.label) {
|
|
101
|
+
case 0: return [4 /*yield*/, store.fetcher._fetch(url)];
|
|
112
102
|
case 1:
|
|
113
|
-
downloaded =
|
|
103
|
+
downloaded = _b.sent();
|
|
114
104
|
if (downloaded.status !== 200) {
|
|
115
105
|
throw new Error("Not OK! ".concat(url));
|
|
116
106
|
}
|
|
117
|
-
archiveUrl =
|
|
118
|
-
|
|
107
|
+
archiveUrl = (0, utils_1.getArchiveUrl)(url, date);
|
|
108
|
+
_a = {
|
|
119
109
|
method: 'PUT'
|
|
120
110
|
};
|
|
121
111
|
return [4 /*yield*/, downloaded.text()];
|
|
122
112
|
case 2:
|
|
123
|
-
options = (
|
|
124
|
-
|
|
113
|
+
options = (_a.body = _b.sent(),
|
|
114
|
+
_a.headers = [
|
|
125
115
|
['Content-Type', downloaded.headers.get('Content-Type') || 'application/octet-stream']
|
|
126
116
|
],
|
|
127
|
-
|
|
128
|
-
return [4 /*yield*/,
|
|
117
|
+
_a);
|
|
118
|
+
return [4 /*yield*/, store.fetcher._fetch(archiveUrl, options)];
|
|
129
119
|
case 3:
|
|
130
|
-
uploaded =
|
|
120
|
+
uploaded = _b.sent();
|
|
131
121
|
if (!(uploaded.status.toString()[0] === '2')) return [3 /*break*/, 5];
|
|
132
|
-
return [4 /*yield*/,
|
|
122
|
+
return [4 /*yield*/, store.fetcher._fetch(url, {
|
|
133
123
|
method: 'DELETE'
|
|
134
|
-
})
|
|
124
|
+
})];
|
|
135
125
|
case 4:
|
|
136
|
-
|
|
137
|
-
|
|
126
|
+
_b.sent();
|
|
127
|
+
_b.label = 5;
|
|
138
128
|
case 5: return [2 /*return*/];
|
|
139
129
|
}
|
|
140
130
|
});
|
|
141
131
|
});
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
createInboxFor: createInboxFor,
|
|
135
|
+
getNewMessages: getNewMessages,
|
|
136
|
+
markAsRead: markAsRead
|
|
142
137
|
};
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
//# sourceMappingURL=InboxLogic.js.map
|
|
138
|
+
}
|
|
139
|
+
exports.createInboxLogic = createInboxLogic;
|
|
140
|
+
//# sourceMappingURL=inboxLogic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inboxLogic.js","sourceRoot":"","sources":["../../src/inbox/inboxLogic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAA8C;AAE9C,SAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ;IAExF,SAAe,cAAc,CAAC,SAAiB,EAAE,IAAY;;;;;4BAChC,qBAAM,YAAY,CAAC,MAAM,EAAE,EAAA;;wBAAhD,OAAO,GAAc,SAA2B;wBAC3B,qBAAM,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,EAAA;;wBAA3D,OAAO,GAAc,SAAsC;wBAC3D,QAAQ,GAAG,UAAG,OAAO,CAAC,KAAK,yBAAe,kBAAkB,CAAC,IAAI,CAAC,MAAG,CAAC;wBAC5E,qBAAM,cAAc,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAA;;wBAA9C,SAA8C,CAAC;wBAC7B,qBAAM,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAA;;wBAAlD,SAAS,GAAG,SAAsC;wBACxD,qBAAM,YAAY,CAAC,mBAAmB,CAAC;gCACrC,UAAU,EAAE,OAAO,CAAC,KAAK;gCACzB,SAAS,WAAA;gCACT,aAAa,EAAE,YAAY;gCAC3B,MAAM,EAAE,QAAQ;6BACjB,CAAC,EAAA;;wBALF,SAKE,CAAC;wBACH,sBAAO,QAAQ,EAAC;;;;KACnB;IAED,SAAe,cAAc,CACzB,IAAgB;;;;;;6BAEZ,CAAC,IAAI,EAAL,wBAAK;wBACA,qBAAM,YAAY,CAAC,MAAM,EAAE,EAAA;;wBAAlC,IAAI,GAAG,SAA2B,CAAC;;4BAEvB,qBAAM,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,EAAA;;wBAA7C,KAAK,GA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,UAAU,YAAA;KACX,CAAA;AACH,CAAC;AArDD,4CAqDC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const profile: import("./profile/ProfileLogic").ProfileLogic;
|
|
6
|
-
export { setACLUserPublic, genACLText } from './acl/aclLogic';
|
|
7
|
-
export { ensureTypeIndexes, loadTypeIndexes, registerInTypeIndex, loadIndex } from './typeIndex/typeIndexLogic';
|
|
8
|
-
export { loadProfile, loadPreferences, loadTypeIndexesFor, loadCommunityTypeIndexes, loadAllTypeIndexes } from './discovery/discoveryLogic';
|
|
9
|
-
export { SolidLogic } from './logic/SolidLogic';
|
|
1
|
+
export { ACL_LINK } from './acl/aclLogic';
|
|
2
|
+
export { findAclDocUrl, setACLUserPublic, genACLText, } from './logic/solidLogicSingleton';
|
|
3
|
+
export { ensureTypeIndexes, loadTypeIndexes, registerInTypeIndex, loadIndex, ensureOneTypeIndex, putIndex, makeIndexIfNecessary, loadIndexes, getTypeIndex, getRegistrations, loadTypeIndexesFor, loadCommunityTypeIndexes, loadAllTypeIndexes, getScopedAppInstances, getAppInstances, suggestPublicTypeIndex, suggestPrivateTypeIndex, registerInstanceInTypeIndex, deleteTypeIndexRegistration, getScopedAppsFromIndex } from './logic/solidLogicSingleton';
|
|
4
|
+
export { setAcl, addToPrivateTypeIndex, findChat, createChatThing, getChat, sendInvite, mintNew } from './logic/solidLogicSingleton';
|
|
10
5
|
export { offlineTestID, appContext } from './authn/authUtil';
|
|
11
|
-
export {
|
|
6
|
+
export { createInboxFor, getNewMessages, markAsRead } from './logic/solidLogicSingleton';
|
|
7
|
+
export { recursiveDelete, setSinglePeerAccess, createEmptyRdfDoc, followOrCreateLink, loadOrCreateIfNotExists, } from './logic/solidLogicSingleton';
|
|
8
|
+
export { ensureLoadedPreferences, loadMe, getPodRoot, getMainInbox, findStorage, loadPreferences, loadProfile, silencedLoadPreferences } from './logic/solidLogicSingleton';
|
|
12
9
|
export { getSuggestedIssuers } from './issuer/issuerLogic';
|
|
10
|
+
export { isContainer, createContainer, getContainerElements, getContainerMembers } from './logic/solidLogicSingleton';
|
|
11
|
+
export { authn, authSession, store } from './logic/solidLogicSingleton';
|
|
13
12
|
export { AppDetails, SolidNamespace, AuthenticationContext } from './types';
|
|
14
|
-
export {
|
|
15
|
-
export { UnauthorizedError, CrossOriginForbiddenError, SameOriginForbiddenError, NotFoundError, FetchError } from './logic/CustomError';
|
|
16
|
-
export { authn, authSession, store, chat, profile };
|
|
13
|
+
export { UnauthorizedError, CrossOriginForbiddenError, SameOriginForbiddenError, NotFoundError, FetchError, NotEditableError, WebOperationError } from './logic/CustomError';
|
|
17
14
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EACT,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,UAAU,GACX,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,SAAS,EACT,kBAAkB,EAClB,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,gBAAgB,EAEhB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,QAAQ,EACR,eAAe,EACf,OAAO,EACP,UAAU,EACV,OAAO,EACR,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AACxF,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EAEjB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACL,uBAAuB,EACvB,MAAM,EACN,UAAU,EACV,YAAY,EACZ,WAAW,EAEX,eAAe,EACf,WAAW,EAEX,uBAAuB,EACxB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE1D,OAAO,EACH,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACtB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAA;AAGvE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAG3E,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/lib/index.js
CHANGED
|
@@ -1,49 +1,93 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.profile = exports.chat = exports.store = exports.authSession = exports.authn = exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.solidLogicSingleton = exports.getSuggestedIssuers = exports.ACL_LINK = exports.appContext = exports.offlineTestID = exports.SolidLogic = exports.loadAllTypeIndexes = exports.loadCommunityTypeIndexes = exports.loadTypeIndexesFor = exports.loadPreferences = exports.loadProfile = exports.loadIndex = exports.registerInTypeIndex = exports.loadTypeIndexes = exports.ensureTypeIndexes = exports.genACLText = exports.setACLUserPublic = void 0;
|
|
4
2
|
// Make these variables directly accessible as it is what you need most of the time
|
|
5
3
|
// This also makes these variable globaly accesible in mashlib
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports
|
|
11
|
-
|
|
12
|
-
exports.store =
|
|
13
|
-
var chat = solidLogicSingleton_1.solidLogicSingleton.chat;
|
|
14
|
-
exports.chat = chat;
|
|
15
|
-
var profile = solidLogicSingleton_1.solidLogicSingleton.profile;
|
|
16
|
-
exports.profile = profile;
|
|
4
|
+
//import { solidLogicSingleton } from './logic/solidLogicSingleton'
|
|
5
|
+
//const authn = solidLogicSingleton.authn
|
|
6
|
+
//const authSession = solidLogicSingleton.authn.authSession
|
|
7
|
+
//const store = solidLogicSingleton.store
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getSuggestedIssuers = exports.silencedLoadPreferences = exports.loadProfile = exports.loadPreferences = exports.findStorage = exports.getMainInbox = exports.getPodRoot = exports.loadMe = exports.ensureLoadedPreferences = exports.loadOrCreateIfNotExists = exports.followOrCreateLink = exports.createEmptyRdfDoc = exports.setSinglePeerAccess = exports.recursiveDelete = exports.markAsRead = exports.getNewMessages = exports.createInboxFor = exports.appContext = exports.offlineTestID = exports.mintNew = exports.sendInvite = exports.getChat = exports.createChatThing = exports.findChat = exports.addToPrivateTypeIndex = exports.setAcl = exports.getScopedAppsFromIndex = exports.deleteTypeIndexRegistration = exports.registerInstanceInTypeIndex = exports.suggestPrivateTypeIndex = exports.suggestPublicTypeIndex = exports.getAppInstances = exports.getScopedAppInstances = exports.loadAllTypeIndexes = exports.loadCommunityTypeIndexes = exports.loadTypeIndexesFor = exports.getRegistrations = exports.getTypeIndex = exports.loadIndexes = exports.makeIndexIfNecessary = exports.putIndex = exports.ensureOneTypeIndex = exports.loadIndex = exports.registerInTypeIndex = exports.loadTypeIndexes = exports.ensureTypeIndexes = exports.genACLText = exports.setACLUserPublic = exports.findAclDocUrl = exports.ACL_LINK = void 0;
|
|
10
|
+
exports.WebOperationError = exports.NotEditableError = exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.store = exports.authSession = exports.authn = exports.getContainerMembers = exports.getContainerElements = exports.createContainer = exports.isContainer = void 0;
|
|
17
11
|
var aclLogic_1 = require("./acl/aclLogic");
|
|
18
|
-
Object.defineProperty(exports, "
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Object.defineProperty(exports, "
|
|
22
|
-
Object.defineProperty(exports, "
|
|
23
|
-
|
|
24
|
-
Object.defineProperty(exports, "
|
|
25
|
-
|
|
26
|
-
Object.defineProperty(exports, "
|
|
27
|
-
Object.defineProperty(exports, "
|
|
28
|
-
Object.defineProperty(exports, "
|
|
29
|
-
Object.defineProperty(exports, "
|
|
30
|
-
Object.defineProperty(exports, "
|
|
31
|
-
|
|
32
|
-
Object.defineProperty(exports, "
|
|
12
|
+
Object.defineProperty(exports, "ACL_LINK", { enumerable: true, get: function () { return aclLogic_1.ACL_LINK; } });
|
|
13
|
+
var solidLogicSingleton_1 = require("./logic/solidLogicSingleton");
|
|
14
|
+
Object.defineProperty(exports, "findAclDocUrl", { enumerable: true, get: function () { return solidLogicSingleton_1.findAclDocUrl; } });
|
|
15
|
+
Object.defineProperty(exports, "setACLUserPublic", { enumerable: true, get: function () { return solidLogicSingleton_1.setACLUserPublic; } });
|
|
16
|
+
Object.defineProperty(exports, "genACLText", { enumerable: true, get: function () { return solidLogicSingleton_1.genACLText; } });
|
|
17
|
+
var solidLogicSingleton_2 = require("./logic/solidLogicSingleton");
|
|
18
|
+
Object.defineProperty(exports, "ensureTypeIndexes", { enumerable: true, get: function () { return solidLogicSingleton_2.ensureTypeIndexes; } });
|
|
19
|
+
Object.defineProperty(exports, "loadTypeIndexes", { enumerable: true, get: function () { return solidLogicSingleton_2.loadTypeIndexes; } });
|
|
20
|
+
Object.defineProperty(exports, "registerInTypeIndex", { enumerable: true, get: function () { return solidLogicSingleton_2.registerInTypeIndex; } });
|
|
21
|
+
Object.defineProperty(exports, "loadIndex", { enumerable: true, get: function () { return solidLogicSingleton_2.loadIndex; } });
|
|
22
|
+
Object.defineProperty(exports, "ensureOneTypeIndex", { enumerable: true, get: function () { return solidLogicSingleton_2.ensureOneTypeIndex; } });
|
|
23
|
+
Object.defineProperty(exports, "putIndex", { enumerable: true, get: function () { return solidLogicSingleton_2.putIndex; } });
|
|
24
|
+
Object.defineProperty(exports, "makeIndexIfNecessary", { enumerable: true, get: function () { return solidLogicSingleton_2.makeIndexIfNecessary; } });
|
|
25
|
+
Object.defineProperty(exports, "loadIndexes", { enumerable: true, get: function () { return solidLogicSingleton_2.loadIndexes; } });
|
|
26
|
+
Object.defineProperty(exports, "getTypeIndex", { enumerable: true, get: function () { return solidLogicSingleton_2.getTypeIndex; } });
|
|
27
|
+
Object.defineProperty(exports, "getRegistrations", { enumerable: true, get: function () { return solidLogicSingleton_2.getRegistrations; } });
|
|
28
|
+
//NEW function for discovery
|
|
29
|
+
Object.defineProperty(exports, "loadTypeIndexesFor", { enumerable: true, get: function () { return solidLogicSingleton_2.loadTypeIndexesFor; } });
|
|
30
|
+
Object.defineProperty(exports, "loadCommunityTypeIndexes", { enumerable: true, get: function () { return solidLogicSingleton_2.loadCommunityTypeIndexes; } });
|
|
31
|
+
Object.defineProperty(exports, "loadAllTypeIndexes", { enumerable: true, get: function () { return solidLogicSingleton_2.loadAllTypeIndexes; } });
|
|
32
|
+
Object.defineProperty(exports, "getScopedAppInstances", { enumerable: true, get: function () { return solidLogicSingleton_2.getScopedAppInstances; } });
|
|
33
|
+
Object.defineProperty(exports, "getAppInstances", { enumerable: true, get: function () { return solidLogicSingleton_2.getAppInstances; } });
|
|
34
|
+
Object.defineProperty(exports, "suggestPublicTypeIndex", { enumerable: true, get: function () { return solidLogicSingleton_2.suggestPublicTypeIndex; } });
|
|
35
|
+
Object.defineProperty(exports, "suggestPrivateTypeIndex", { enumerable: true, get: function () { return solidLogicSingleton_2.suggestPrivateTypeIndex; } });
|
|
36
|
+
Object.defineProperty(exports, "registerInstanceInTypeIndex", { enumerable: true, get: function () { return solidLogicSingleton_2.registerInstanceInTypeIndex; } });
|
|
37
|
+
Object.defineProperty(exports, "deleteTypeIndexRegistration", { enumerable: true, get: function () { return solidLogicSingleton_2.deleteTypeIndexRegistration; } });
|
|
38
|
+
Object.defineProperty(exports, "getScopedAppsFromIndex", { enumerable: true, get: function () { return solidLogicSingleton_2.getScopedAppsFromIndex; } });
|
|
39
|
+
var solidLogicSingleton_3 = require("./logic/solidLogicSingleton");
|
|
40
|
+
Object.defineProperty(exports, "setAcl", { enumerable: true, get: function () { return solidLogicSingleton_3.setAcl; } });
|
|
41
|
+
Object.defineProperty(exports, "addToPrivateTypeIndex", { enumerable: true, get: function () { return solidLogicSingleton_3.addToPrivateTypeIndex; } });
|
|
42
|
+
Object.defineProperty(exports, "findChat", { enumerable: true, get: function () { return solidLogicSingleton_3.findChat; } });
|
|
43
|
+
Object.defineProperty(exports, "createChatThing", { enumerable: true, get: function () { return solidLogicSingleton_3.createChatThing; } });
|
|
44
|
+
Object.defineProperty(exports, "getChat", { enumerable: true, get: function () { return solidLogicSingleton_3.getChat; } });
|
|
45
|
+
Object.defineProperty(exports, "sendInvite", { enumerable: true, get: function () { return solidLogicSingleton_3.sendInvite; } });
|
|
46
|
+
Object.defineProperty(exports, "mintNew", { enumerable: true, get: function () { return solidLogicSingleton_3.mintNew; } });
|
|
33
47
|
var authUtil_1 = require("./authn/authUtil");
|
|
34
48
|
Object.defineProperty(exports, "offlineTestID", { enumerable: true, get: function () { return authUtil_1.offlineTestID; } });
|
|
35
49
|
Object.defineProperty(exports, "appContext", { enumerable: true, get: function () { return authUtil_1.appContext; } });
|
|
36
|
-
var
|
|
37
|
-
Object.defineProperty(exports, "
|
|
50
|
+
var solidLogicSingleton_4 = require("./logic/solidLogicSingleton");
|
|
51
|
+
Object.defineProperty(exports, "createInboxFor", { enumerable: true, get: function () { return solidLogicSingleton_4.createInboxFor; } });
|
|
52
|
+
Object.defineProperty(exports, "getNewMessages", { enumerable: true, get: function () { return solidLogicSingleton_4.getNewMessages; } });
|
|
53
|
+
Object.defineProperty(exports, "markAsRead", { enumerable: true, get: function () { return solidLogicSingleton_4.markAsRead; } });
|
|
54
|
+
var solidLogicSingleton_5 = require("./logic/solidLogicSingleton");
|
|
55
|
+
Object.defineProperty(exports, "recursiveDelete", { enumerable: true, get: function () { return solidLogicSingleton_5.recursiveDelete; } });
|
|
56
|
+
Object.defineProperty(exports, "setSinglePeerAccess", { enumerable: true, get: function () { return solidLogicSingleton_5.setSinglePeerAccess; } });
|
|
57
|
+
Object.defineProperty(exports, "createEmptyRdfDoc", { enumerable: true, get: function () { return solidLogicSingleton_5.createEmptyRdfDoc; } });
|
|
58
|
+
//NEW function for discovery
|
|
59
|
+
Object.defineProperty(exports, "followOrCreateLink", { enumerable: true, get: function () { return solidLogicSingleton_5.followOrCreateLink; } });
|
|
60
|
+
Object.defineProperty(exports, "loadOrCreateIfNotExists", { enumerable: true, get: function () { return solidLogicSingleton_5.loadOrCreateIfNotExists; } });
|
|
61
|
+
var solidLogicSingleton_6 = require("./logic/solidLogicSingleton");
|
|
62
|
+
Object.defineProperty(exports, "ensureLoadedPreferences", { enumerable: true, get: function () { return solidLogicSingleton_6.ensureLoadedPreferences; } });
|
|
63
|
+
Object.defineProperty(exports, "loadMe", { enumerable: true, get: function () { return solidLogicSingleton_6.loadMe; } });
|
|
64
|
+
Object.defineProperty(exports, "getPodRoot", { enumerable: true, get: function () { return solidLogicSingleton_6.getPodRoot; } });
|
|
65
|
+
Object.defineProperty(exports, "getMainInbox", { enumerable: true, get: function () { return solidLogicSingleton_6.getMainInbox; } });
|
|
66
|
+
Object.defineProperty(exports, "findStorage", { enumerable: true, get: function () { return solidLogicSingleton_6.findStorage; } });
|
|
67
|
+
//NEW content from discovery
|
|
68
|
+
Object.defineProperty(exports, "loadPreferences", { enumerable: true, get: function () { return solidLogicSingleton_6.loadPreferences; } });
|
|
69
|
+
Object.defineProperty(exports, "loadProfile", { enumerable: true, get: function () { return solidLogicSingleton_6.loadProfile; } });
|
|
70
|
+
//NEW function for discovery
|
|
71
|
+
Object.defineProperty(exports, "silencedLoadPreferences", { enumerable: true, get: function () { return solidLogicSingleton_6.silencedLoadPreferences; } });
|
|
38
72
|
var issuerLogic_1 = require("./issuer/issuerLogic");
|
|
39
73
|
Object.defineProperty(exports, "getSuggestedIssuers", { enumerable: true, get: function () { return issuerLogic_1.getSuggestedIssuers; } });
|
|
74
|
+
var solidLogicSingleton_7 = require("./logic/solidLogicSingleton");
|
|
75
|
+
Object.defineProperty(exports, "isContainer", { enumerable: true, get: function () { return solidLogicSingleton_7.isContainer; } });
|
|
76
|
+
Object.defineProperty(exports, "createContainer", { enumerable: true, get: function () { return solidLogicSingleton_7.createContainer; } });
|
|
77
|
+
Object.defineProperty(exports, "getContainerElements", { enumerable: true, get: function () { return solidLogicSingleton_7.getContainerElements; } });
|
|
78
|
+
Object.defineProperty(exports, "getContainerMembers", { enumerable: true, get: function () { return solidLogicSingleton_7.getContainerMembers; } });
|
|
79
|
+
var solidLogicSingleton_8 = require("./logic/solidLogicSingleton");
|
|
80
|
+
Object.defineProperty(exports, "authn", { enumerable: true, get: function () { return solidLogicSingleton_8.authn; } });
|
|
81
|
+
Object.defineProperty(exports, "authSession", { enumerable: true, get: function () { return solidLogicSingleton_8.authSession; } });
|
|
82
|
+
Object.defineProperty(exports, "store", { enumerable: true, get: function () { return solidLogicSingleton_8.store; } });
|
|
40
83
|
// solidLogicSingleton is exported entirely because it is used in solid-panes
|
|
41
|
-
|
|
42
|
-
Object.defineProperty(exports, "solidLogicSingleton", { enumerable: true, get: function () { return solidLogicSingleton_2.solidLogicSingleton; } });
|
|
84
|
+
//export { solidLogicSingleton } from './logic/solidLogicSingleton'
|
|
43
85
|
var CustomError_1 = require("./logic/CustomError");
|
|
44
86
|
Object.defineProperty(exports, "UnauthorizedError", { enumerable: true, get: function () { return CustomError_1.UnauthorizedError; } });
|
|
45
87
|
Object.defineProperty(exports, "CrossOriginForbiddenError", { enumerable: true, get: function () { return CustomError_1.CrossOriginForbiddenError; } });
|
|
46
88
|
Object.defineProperty(exports, "SameOriginForbiddenError", { enumerable: true, get: function () { return CustomError_1.SameOriginForbiddenError; } });
|
|
47
89
|
Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return CustomError_1.NotFoundError; } });
|
|
48
90
|
Object.defineProperty(exports, "FetchError", { enumerable: true, get: function () { return CustomError_1.FetchError; } });
|
|
91
|
+
Object.defineProperty(exports, "NotEditableError", { enumerable: true, get: function () { return CustomError_1.NotEditableError; } });
|
|
92
|
+
Object.defineProperty(exports, "WebOperationError", { enumerable: true, get: function () { return CustomError_1.WebOperationError; } });
|
|
49
93
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,mFAAmF;AACnF,8DAA8D;AAC9D,mEAAmE;AACnE,yCAAyC;AACzC,2DAA2D;AAC3D,yCAAyC;;;;AAEzC,2CAEuB;AADrB,oGAAA,QAAQ,OAAA;AAGV,mEAIoC;AAHlC,oHAAA,aAAa,OAAA;AACb,uHAAA,gBAAgB,OAAA;AAChB,iHAAA,UAAU,OAAA;AAGZ,mEAsBoC;AArBlC,wHAAA,iBAAiB,OAAA;AACjB,sHAAA,eAAe,OAAA;AACf,0HAAA,mBAAmB,OAAA;AACnB,gHAAA,SAAS,OAAA;AACT,yHAAA,kBAAkB,OAAA;AAClB,+GAAA,QAAQ,OAAA;AACR,2HAAA,oBAAoB,OAAA;AACpB,kHAAA,WAAW,OAAA;AACX,mHAAA,YAAY,OAAA;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mBAAmB,OAAA;AAGvB,mEAAuE;AAA9D,4GAAA,KAAK,OAAA;AAAE,kHAAA,WAAW,OAAA;AAAE,4GAAA,KAAK,OAAA;AAIlC,6EAA6E;AAC7E,mEAAmE;AACnE,mDAA4K;AAAnK,gHAAA,iBAAiB,OAAA;AAAE,wHAAA,yBAAyB,OAAA;AAAE,uHAAA,wBAAwB,OAAA;AAAE,4GAAA,aAAa,OAAA;AAAE,yGAAA,UAAU,OAAA;AAAE,+GAAA,gBAAgB,OAAA;AAAE,gHAAA,iBAAiB,OAAA"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -9,6 +9,10 @@ export declare class SameOriginForbiddenError extends CustomError {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class NotFoundError extends CustomError {
|
|
11
11
|
}
|
|
12
|
+
export declare class NotEditableError extends CustomError {
|
|
13
|
+
}
|
|
14
|
+
export declare class WebOperationError extends CustomError {
|
|
15
|
+
}
|
|
12
16
|
export declare class FetchError extends CustomError {
|
|
13
17
|
status: number;
|
|
14
18
|
constructor(status: number, message?: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomError.d.ts","sourceRoot":"","sources":["../../src/logic/CustomError.ts"],"names":[],"mappings":"AAAA,cAAM,WAAY,SAAQ,KAAK;gBACf,OAAO,CAAC,EAAE,MAAM;CAM/B;AAED,qBAAa,iBAAkB,SAAQ,WAAW;CAAG;AAErD,qBAAa,yBAA0B,SAAQ,WAAW;CAAG;AAE7D,qBAAa,wBAAyB,SAAQ,WAAW;CAAG;AAE5D,qBAAa,aAAc,SAAQ,WAAW;CAAG;AAEjD,qBAAa,UAAW,SAAQ,WAAW;IACvC,MAAM,EAAE,MAAM,CAAC;gBAEH,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAI/C"}
|
|
1
|
+
{"version":3,"file":"CustomError.d.ts","sourceRoot":"","sources":["../../src/logic/CustomError.ts"],"names":[],"mappings":"AAAA,cAAM,WAAY,SAAQ,KAAK;gBACf,OAAO,CAAC,EAAE,MAAM;CAM/B;AAED,qBAAa,iBAAkB,SAAQ,WAAW;CAAG;AAErD,qBAAa,yBAA0B,SAAQ,WAAW;CAAG;AAE7D,qBAAa,wBAAyB,SAAQ,WAAW;CAAG;AAE5D,qBAAa,aAAc,SAAQ,WAAW;CAAG;AAEjD,qBAAa,gBAAiB,SAAQ,WAAW;CAAI;AAErD,qBAAa,iBAAkB,SAAQ,WAAW;CAAG;AAErD,qBAAa,UAAW,SAAQ,WAAW;IACvC,MAAM,EAAE,MAAM,CAAC;gBAEH,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAI/C"}
|
package/lib/logic/CustomError.js
CHANGED
|
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = void 0;
|
|
18
|
+
exports.FetchError = exports.WebOperationError = exports.NotEditableError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = void 0;
|
|
19
19
|
var CustomError = /** @class */ (function (_super) {
|
|
20
20
|
__extends(CustomError, _super);
|
|
21
21
|
function CustomError(message) {
|
|
@@ -60,6 +60,22 @@ var NotFoundError = /** @class */ (function (_super) {
|
|
|
60
60
|
return NotFoundError;
|
|
61
61
|
}(CustomError));
|
|
62
62
|
exports.NotFoundError = NotFoundError;
|
|
63
|
+
var NotEditableError = /** @class */ (function (_super) {
|
|
64
|
+
__extends(NotEditableError, _super);
|
|
65
|
+
function NotEditableError() {
|
|
66
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
}
|
|
68
|
+
return NotEditableError;
|
|
69
|
+
}(CustomError));
|
|
70
|
+
exports.NotEditableError = NotEditableError;
|
|
71
|
+
var WebOperationError = /** @class */ (function (_super) {
|
|
72
|
+
__extends(WebOperationError, _super);
|
|
73
|
+
function WebOperationError() {
|
|
74
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
75
|
+
}
|
|
76
|
+
return WebOperationError;
|
|
77
|
+
}(CustomError));
|
|
78
|
+
exports.WebOperationError = WebOperationError;
|
|
63
79
|
var FetchError = /** @class */ (function (_super) {
|
|
64
80
|
__extends(FetchError, _super);
|
|
65
81
|
function FetchError(status, message) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomError.js","sourceRoot":"","sources":["../../src/logic/CustomError.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;IAA0B,+BAAK;IAC3B,qBAAY,OAAgB;;QAA5B,YACI,kBAAM,OAAO,CAAC,SAIjB;QAHG,0EAA0E;QAC1E,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,WAAW,SAAS,CAAC,CAAC,CAAC,0BAA0B;QAC7E,KAAI,CAAC,IAAI,GAAG,WAAW,IAAI,CAAC,CAAC,qCAAqC;;IACtE,CAAC;IACL,kBAAC;AAAD,CAAC,AAPD,CAA0B,KAAK,GAO9B;AAED;IAAuC,qCAAW;IAAlD;;IAAoD,CAAC;IAAD,wBAAC;AAAD,CAAC,AAArD,CAAuC,WAAW,GAAG;AAAxC,8CAAiB;AAE9B;IAA+C,6CAAW;IAA1D;;IAA4D,CAAC;IAAD,gCAAC;AAAD,CAAC,AAA7D,CAA+C,WAAW,GAAG;AAAhD,8DAAyB;AAEtC;IAA8C,4CAAW;IAAzD;;IAA2D,CAAC;IAAD,+BAAC;AAAD,CAAC,AAA5D,CAA8C,WAAW,GAAG;AAA/C,4DAAwB;AAErC;IAAmC,iCAAW;IAA9C;;IAAgD,CAAC;IAAD,oBAAC;AAAD,CAAC,AAAjD,CAAmC,WAAW,GAAG;AAApC,sCAAa;AAE1B;IAAgC,8BAAW;IAGvC,oBAAY,MAAc,EAAE,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B;IAAgC,8BAAW;IAGvC,oBAAY,MAAc,EAAE,OAAgB;QAA5C,YACI,kBAAM,OAAO,CAAC,SAEjB;QADG,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACzB,CAAC;IACL,iBAAC;AAAD,CAAC,AAPD,CAAgC,WAAW,GAO1C;AAPY,gCAAU"}
|
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as rdf from "rdflib";
|
|
2
|
+
import { SolidAuthnLogic } from "../authn/SolidAuthnLogic";
|
|
3
|
+
import { authSession } from "../authSession/authSession";
|
|
4
|
+
declare const store: rdf.LiveStore;
|
|
5
|
+
declare const authn: SolidAuthnLogic;
|
|
6
|
+
declare const findAclDocUrl: (url: string) => Promise<any>, setACLUserPublic: (docURI: string, me: rdf.NamedNode, options: {
|
|
7
|
+
defaultForNew?: boolean | undefined;
|
|
8
|
+
public?: [] | undefined;
|
|
9
|
+
}) => Promise<rdf.NamedNode>, genACLText: (docURI: string, me: rdf.NamedNode, aclURI: string, options?: {
|
|
10
|
+
defaultForNew?: boolean | undefined;
|
|
11
|
+
public?: [] | undefined;
|
|
12
|
+
}) => string | undefined;
|
|
13
|
+
declare const isContainer: (url: string) => boolean, createContainer: (url: string) => Promise<void>, getContainerElements: (containerNode: rdf.NamedNode) => rdf.NamedNode[], getContainerMembers: (containerUrl: string) => Promise<string[]>;
|
|
14
|
+
declare const recursiveDelete: (url: string) => Promise<any>, setSinglePeerAccess: (options: {
|
|
15
|
+
ownerWebId: string;
|
|
16
|
+
peerWebId: string;
|
|
17
|
+
accessToModes?: string | undefined;
|
|
18
|
+
defaultModes?: string | undefined;
|
|
19
|
+
target: string;
|
|
20
|
+
}) => Promise<any>, createEmptyRdfDoc: (doc: rdf.NamedNode, comment: string) => Promise<void>, followOrCreateLink: (subject: rdf.NamedNode, predicate: rdf.NamedNode, object: rdf.NamedNode, doc: rdf.NamedNode) => Promise<rdf.NamedNode | null>, loadOrCreateIfNotExists: (doc: rdf.NamedNode) => Promise<any>;
|
|
21
|
+
declare const ensureLoadedPreferences: (context: import("..").AuthenticationContext) => Promise<import("..").AuthenticationContext>, loadMe: () => Promise<rdf.NamedNode>, getPodRoot: (user: rdf.NamedNode) => rdf.NamedNode, getMainInbox: (user: rdf.NamedNode) => Promise<rdf.NamedNode>, findStorage: (me: rdf.NamedNode) => any, loadPreferences: (user: rdf.NamedNode) => Promise<rdf.NamedNode>, loadProfile: (user: rdf.NamedNode) => Promise<rdf.NamedNode>, silencedLoadPreferences: (user: rdf.NamedNode) => Promise<rdf.NamedNode | undefined>;
|
|
22
|
+
declare const setAcl: (chatContainer: rdf.NamedNode, me: rdf.NamedNode, invitee: rdf.NamedNode) => Promise<void>, addToPrivateTypeIndex: (chatThing: any, me: any) => Promise<void>, findChat: (invitee: rdf.NamedNode) => Promise<{
|
|
23
|
+
me: any;
|
|
24
|
+
chatContainer: rdf.NamedNode;
|
|
25
|
+
exists: boolean;
|
|
26
|
+
}>, createChatThing: (chatContainer: rdf.NamedNode, me: rdf.NamedNode) => Promise<rdf.NamedNode>, getChat: (invitee: rdf.NamedNode, createIfMissing?: boolean) => Promise<rdf.NamedNode | null>, sendInvite: (invitee: rdf.NamedNode, chatThing: rdf.NamedNode) => Promise<void>, mintNew: (newPaneOptions: import("../types").NewPaneOptions) => Promise<import("../types").CreatedPaneOptions>;
|
|
27
|
+
declare const createInboxFor: (peerWebId: string, nick: string) => Promise<string>, getNewMessages: (user?: rdf.NamedNode | undefined) => Promise<string[]>, markAsRead: (url: string, date: Date) => Promise<void>;
|
|
28
|
+
declare const ensureTypeIndexes: (context: import("..").AuthenticationContext, agent?: rdf.NamedNode | undefined) => Promise<import("..").AuthenticationContext>, loadTypeIndexes: (context: import("..").AuthenticationContext) => Promise<import("..").AuthenticationContext | undefined>, registerInTypeIndex: (context: import("..").AuthenticationContext, instance: rdf.NamedNode, theClass: rdf.NamedNode, isPublic: boolean, agent?: rdf.NamedNode | undefined) => Promise<import("..").AuthenticationContext>, loadIndex: (context: import("..").AuthenticationContext, isPublic: boolean) => Promise<import("..").AuthenticationContext>, ensureOneTypeIndex: (context: import("..").AuthenticationContext, isPublic: boolean, agent?: rdf.NamedNode | undefined) => Promise<void | import("..").AuthenticationContext>, putIndex: (newIndex: any, context: any) => Promise<any>, makeIndexIfNecessary: (context: any, isPublic: any, store: any, ns: any) => Promise<any>, loadIndexes: (me: string | rdf.NamedNode, publicProfile: string | rdf.NamedNode | null, preferencesFile: string | rdf.NamedNode | null, onWarning?: (_err: Error) => Promise<undefined>) => Promise<{
|
|
29
|
+
private: any;
|
|
30
|
+
public: any;
|
|
31
|
+
}>, getTypeIndex: (me: string | rdf.NamedNode, preferencesFile: string | rdf.NamedNode, isPublic: boolean) => rdf.NamedNode[], getRegistrations: (instance: any, theClass: any) => any, loadTypeIndexesFor: (user: rdf.NamedNode) => Promise<import("../types").TypeIndexScope[]>, loadCommunityTypeIndexes: (user: rdf.NamedNode) => Promise<import("../types").TypeIndexScope[][]>, loadAllTypeIndexes: (user: rdf.NamedNode) => Promise<import("../types").TypeIndexScope[]>, getScopedAppInstances: (klass: rdf.NamedNode, user: rdf.NamedNode) => Promise<import("../types").ScopedApp[]>, getAppInstances: (klass: rdf.NamedNode) => Promise<rdf.NamedNode[]>, suggestPublicTypeIndex: (me: rdf.NamedNode) => rdf.NamedNode, suggestPrivateTypeIndex: (preferencesFile: rdf.NamedNode) => rdf.NamedNode, registerInstanceInTypeIndex: (instance: rdf.NamedNode, index: rdf.NamedNode, theClass: rdf.NamedNode) => Promise<rdf.NamedNode | null>, deleteTypeIndexRegistration: (item: any) => Promise<void>, getScopedAppsFromIndex: (scope: any, theClass: rdf.NamedNode | null) => Promise<{
|
|
32
|
+
instance: rdf.NamedNode;
|
|
33
|
+
scope: any;
|
|
34
|
+
}[]>;
|
|
35
|
+
export { store, authn, authSession, recursiveDelete, setSinglePeerAccess, createEmptyRdfDoc, followOrCreateLink, loadOrCreateIfNotExists, isContainer, createContainer, getContainerElements, getContainerMembers, ensureTypeIndexes, loadTypeIndexes, registerInTypeIndex, loadIndex, ensureOneTypeIndex, putIndex, makeIndexIfNecessary, loadIndexes, getTypeIndex, getRegistrations, loadTypeIndexesFor, loadCommunityTypeIndexes, loadAllTypeIndexes, getScopedAppInstances, getAppInstances, suggestPublicTypeIndex, suggestPrivateTypeIndex, registerInstanceInTypeIndex, deleteTypeIndexRegistration, getScopedAppsFromIndex, ensureLoadedPreferences, loadMe, getPodRoot, getMainInbox, findStorage, loadPreferences, loadProfile, silencedLoadPreferences, createInboxFor, getNewMessages, markAsRead, setAcl, addToPrivateTypeIndex, findChat, createChatThing, getChat, sendInvite, mintNew, findAclDocUrl, setACLUserPublic, genACLText };
|
|
4
36
|
//# sourceMappingURL=solidLogicSingleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solidLogicSingleton.d.ts","sourceRoot":"","sources":["../../src/logic/solidLogicSingleton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"solidLogicSingleton.d.ts","sourceRoot":"","sources":["../../src/logic/solidLogicSingleton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAsBxD,QAAA,MAAM,KAAK,eAA+B,CAAC;AAM3C,QAAA,MAAM,KAAK,iBAAmC,CAAA;AAG9C,QAAA,MACI,aAAa,iCACb,gBAAgB;;;8BAChB,UAAU;;;wBACF,CAAA;AAGZ,QAAA,MACI,WAAW,4BACX,eAAe,kCACf,oBAAoB,qDACpB,mBAAmB,6CACL,CAAA;AAGlB,QAAA,MACI,eAAe,iCACf,mBAAmB;;;;;;oBACnB,iBAAiB,0DACjB,kBAAkB,kIAClB,uBAAuB,sCACX,CAAA;AAGhB,QAAA,MACI,uBAAuB,gGACvB,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