@fluid-topics/public-api 1.0.114 → 1.0.117
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/cjs/index.js +25 -2
- package/dist/cjs/models.js +18 -0
- package/dist/cjs/roles/roles.js +1 -1
- package/dist/cjs/types/ft-common/public.js +71 -81
- package/dist/cjs/types/ft-server/public.js +125 -11
- package/dist/fluidtopics.min.js +1 -1
- package/dist/mjs/index.d.ts +18 -6
- package/dist/mjs/index.js +25 -2
- package/dist/mjs/models.d.ts +2 -0
- package/dist/mjs/models.js +2 -0
- package/dist/mjs/roles/roles.js +1 -1
- package/dist/mjs/types/ft-common/public.d.ts +53 -36
- package/dist/mjs/types/ft-common/public.js +33 -45
- package/dist/mjs/types/ft-server/public.d.ts +118 -11
- package/dist/mjs/types/ft-server/public.js +109 -6
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -54,8 +54,7 @@ exports.FluidTopicsApi = exports.HttpErrorEvent = exports.HttpError = void 0;
|
|
|
54
54
|
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
55
55
|
const AIChunkReader_js_1 = require("./helpers/AIChunkReader.js");
|
|
56
56
|
const wnd = (typeof window === "undefined" ? globalThis : window);
|
|
57
|
-
__exportStar(require("./
|
|
58
|
-
__exportStar(require("./types/ft-server/public.js"), exports);
|
|
57
|
+
__exportStar(require("./models.js"), exports);
|
|
59
58
|
__exportStar(require("./roles/roles.js"), exports);
|
|
60
59
|
__exportStar(require("./preferences/unauthenticated-preferences.js"), exports);
|
|
61
60
|
__exportStar(require("./helpers/AIChunkReader.js"), exports);
|
|
@@ -123,12 +122,14 @@ class FluidTopicsApi {
|
|
|
123
122
|
attachments: {
|
|
124
123
|
list: `api/khub/maps/${mapId}/attachments`,
|
|
125
124
|
attachmentId: (attachmentId) => ({
|
|
125
|
+
info: `api/khub/maps/${mapId}/attachments/${attachmentId}`,
|
|
126
126
|
content: `api/khub/maps/${mapId}/attachments/${attachmentId}/content`,
|
|
127
127
|
})
|
|
128
128
|
},
|
|
129
129
|
resources: {
|
|
130
130
|
list: `api/khub/maps/${mapId}/resources`,
|
|
131
131
|
resourceId: (resourceId) => ({
|
|
132
|
+
info: `api/khub/maps/${mapId}/resources/${resourceId}`,
|
|
132
133
|
content: `api/khub/maps/${mapId}/resources/${resourceId}/content`,
|
|
133
134
|
})
|
|
134
135
|
},
|
|
@@ -152,6 +153,13 @@ class FluidTopicsApi {
|
|
|
152
153
|
text: `api/khub/documents/${documentId}/content/text`,
|
|
153
154
|
feedback: `api/khub/documents/${documentId}/feedback`,
|
|
154
155
|
rating: `api/khub/documents/${documentId}/rating`,
|
|
156
|
+
attachments: {
|
|
157
|
+
list: `api/khub/documents/${documentId}/attachments`,
|
|
158
|
+
attachmentId: (attachmentId) => ({
|
|
159
|
+
info: `api/khub/documents/${documentId}/attachments/${attachmentId}`,
|
|
160
|
+
content: `api/khub/documents/${documentId}/attachments/${attachmentId}/content`,
|
|
161
|
+
})
|
|
162
|
+
},
|
|
155
163
|
})
|
|
156
164
|
},
|
|
157
165
|
semantic: {
|
|
@@ -310,12 +318,27 @@ class FluidTopicsApi {
|
|
|
310
318
|
getMapAttachments(mapId, v) {
|
|
311
319
|
return this.get(this.endpoints.khub.maps.mapId(mapId).attachments.list, v);
|
|
312
320
|
}
|
|
321
|
+
getMapAttachment(mapId, attachmentId, v) {
|
|
322
|
+
return this.get(this.endpoints.khub.maps.mapId(mapId).attachments.attachmentId(attachmentId).info, v);
|
|
323
|
+
}
|
|
313
324
|
getMapAttachmentContent(mapId, attachmentId, v) {
|
|
314
325
|
return this.fetchRawData(this.endpoints.khub.maps.mapId(mapId).attachments.attachmentId(attachmentId).content, v);
|
|
315
326
|
}
|
|
327
|
+
getUdAttachments(mapId, v) {
|
|
328
|
+
return this.get(this.endpoints.khub.documents.documentId(mapId).attachments.list, v);
|
|
329
|
+
}
|
|
330
|
+
getUdAttachment(mapId, attachmentId, v) {
|
|
331
|
+
return this.get(this.endpoints.khub.documents.documentId(mapId).attachments.attachmentId(attachmentId).info, v);
|
|
332
|
+
}
|
|
333
|
+
getUdAttachmentContent(mapId, attachmentId, v) {
|
|
334
|
+
return this.fetchRawData(this.endpoints.khub.documents.documentId(mapId).attachments.attachmentId(attachmentId).content, v);
|
|
335
|
+
}
|
|
316
336
|
getMapResources(mapId, v) {
|
|
317
337
|
return this.get(this.endpoints.khub.maps.mapId(mapId).resources.list, v);
|
|
318
338
|
}
|
|
339
|
+
getMapResource(mapId, resourceId, v) {
|
|
340
|
+
return this.get(this.endpoints.khub.maps.mapId(mapId).resources.resourceId(resourceId).info, v);
|
|
341
|
+
}
|
|
319
342
|
getMapResourceContent(mapId, resourceId, v) {
|
|
320
343
|
return this.fetchRawData(this.endpoints.khub.maps.mapId(mapId).resources.resourceId(resourceId).content, v);
|
|
321
344
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types/ft-common/public.js"), exports);
|
|
18
|
+
__exportStar(require("./types/ft-server/public.js"), exports);
|
package/dist/cjs/roles/roles.js
CHANGED
|
@@ -7,7 +7,7 @@ const rolesInheritance = {
|
|
|
7
7
|
[public_js_1.FtUserRole.HTML_EXPORT_USER]: [public_js_1.FtUserRole.PERSONAL_BOOK_USER],
|
|
8
8
|
[public_js_1.FtUserRole.PDF_EXPORT_USER]: [public_js_1.FtUserRole.PERSONAL_BOOK_USER],
|
|
9
9
|
[public_js_1.FtUserRole.KHUB_ADMIN]: [public_js_1.FtUserRole.CONTENT_PUBLISHER],
|
|
10
|
-
[public_js_1.FtUserRole.ADMIN]: [public_js_1.FtUserRole.KHUB_ADMIN, public_js_1.FtUserRole.USERS_ADMIN, public_js_1.FtUserRole.PORTAL_ADMIN],
|
|
10
|
+
[public_js_1.FtUserRole.ADMIN]: [public_js_1.FtUserRole.KHUB_ADMIN, public_js_1.FtUserRole.USERS_ADMIN, public_js_1.FtUserRole.PORTAL_ADMIN, public_js_1.FtUserRole.BEHAVIOR_DATA_USER],
|
|
11
11
|
[public_js_1.FtUserRole.GENERATIVE_AI_EXPORT_USER]: [public_js_1.FtUserRole.GENERATIVE_AI_USER],
|
|
12
12
|
};
|
|
13
13
|
function roleMatches(actual, expected) {
|