@rtsee/live-storage 0.0.38 → 0.0.39
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/live-storage/src/presentation/interfaces/PresentationStorageProcessor.d.ts +21 -1
- package/dist/live-storage/src/presentation/interfaces/PresentationStorageProcessor.d.ts.map +1 -1
- package/dist/live-storage/src/presentation/models/PresentationStorage.d.ts +21 -1
- package/dist/live-storage/src/presentation/models/PresentationStorage.d.ts.map +1 -1
- package/dist/live-storage/src/presentation/models/PresentationStorage.js +61 -1
- package/dist/live-storage/src/presentation/models/PresentationStorage.js.map +1 -1
- package/dist/live-storage/src/presentation/models/index.d.ts +3 -0
- package/dist/live-storage/src/presentation/models/index.d.ts.map +1 -1
- package/dist/live-storage/src/presentation/models/index.js +3 -0
- package/dist/live-storage/src/presentation/models/index.js.map +1 -1
- package/dist/live-storage/src/presentation/models/local-storage/PresentationLocalStorage.d.ts +25 -5
- package/dist/live-storage/src/presentation/models/local-storage/PresentationLocalStorage.d.ts.map +1 -1
- package/dist/live-storage/src/presentation/models/local-storage/PresentationLocalStorage.js +95 -10
- package/dist/live-storage/src/presentation/models/local-storage/PresentationLocalStorage.js.map +1 -1
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationRoomsStorage.d.ts.map +1 -1
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationRoomsStorage.js.map +1 -1
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationSlidesStorage.d.ts +11 -0
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationSlidesStorage.d.ts.map +1 -0
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationSlidesStorage.js +59 -0
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationSlidesStorage.js.map +1 -0
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationStoriesStorage.d.ts +47 -0
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationStoriesStorage.d.ts.map +1 -0
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationStoriesStorage.js +264 -0
- package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationStoriesStorage.js.map +1 -0
- package/dist/live-storage/src/presentation/models/local-storage/mocks.d.ts +14 -0
- package/dist/live-storage/src/presentation/models/local-storage/mocks.d.ts.map +1 -0
- package/dist/live-storage/src/presentation/models/local-storage/mocks.js +224 -0
- package/dist/live-storage/src/presentation/models/local-storage/mocks.js.map +1 -0
- package/dist/live-storage/src/presentation/models/remote-storage/PresentationRemoteStorage.d.ts +21 -1
- package/dist/live-storage/src/presentation/models/remote-storage/PresentationRemoteStorage.d.ts.map +1 -1
- package/dist/live-storage/src/presentation/models/remote-storage/PresentationRemoteStorage.js +60 -0
- package/dist/live-storage/src/presentation/models/remote-storage/PresentationRemoteStorage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPresentationRoom } from "@rtsee/common";
|
|
1
|
+
import { IPresentationRoom, IRTSeeStory, IRTSeeStoryCategory, IRTSeeStoryLabel, IRTSeeStoryLabelRequestOptions, IRTSeeStorySlide, IStoriesQuery, IStoriesQueryResponse, IStorySlidesQuery, IStorySlidesQueryResponse } from "@rtsee/common";
|
|
2
2
|
export interface IRTSeePresentationStorageProcessor {
|
|
3
3
|
createRoom(clientId: string, options: IPresentationRoom): Promise<IPresentationRoom | null>;
|
|
4
4
|
deleteRoom(clientId: string, roomId: string): Promise<IPresentationRoom | null>;
|
|
@@ -6,5 +6,25 @@ export interface IRTSeePresentationStorageProcessor {
|
|
|
6
6
|
onRoomJoined(clientId: string, roomId: string): Promise<void>;
|
|
7
7
|
onRoomLeft(clientId: string, roomId: string): Promise<void>;
|
|
8
8
|
getRoomsForPeer(peerId: string): Promise<IPresentationRoom[]>;
|
|
9
|
+
getStories(peerId: string, options: IStoriesQuery): Promise<IStoriesQueryResponse>;
|
|
10
|
+
createStory(peerId: string, options: Omit<IRTSeeStory, 'id'>): Promise<IRTSeeStory>;
|
|
11
|
+
editStory(peerId: string, options: IRTSeeStory): Promise<IRTSeeStory>;
|
|
12
|
+
deleteStory(peerId: string, storyId: string): Promise<IRTSeeStory>;
|
|
13
|
+
publishStory(peerId: string, storyId: string): Promise<IRTSeeStory>;
|
|
14
|
+
getCategories(peerId: string, populate?: boolean): Promise<IRTSeeStoryCategory[]>;
|
|
15
|
+
createCategory(peerId: string, category: Omit<IRTSeeStoryCategory, 'id'>): Promise<IRTSeeStoryCategory>;
|
|
16
|
+
deleteCategory(peerId: string, categoryId: string): Promise<IRTSeeStoryCategory | null>;
|
|
17
|
+
updateCategory(peerId: string, category: IRTSeeStoryCategory): Promise<IRTSeeStoryCategory | null>;
|
|
18
|
+
addStoryToCategory(peerId: string, storyId: string, categoryId: string): Promise<IRTSeeStory | null>;
|
|
19
|
+
removeStoryFromCategory(peerId: string, storyId: string, categoryId: string): Promise<IRTSeeStory | null>;
|
|
20
|
+
getLabels(peerId: string, populate?: boolean): Promise<IRTSeeStoryLabel[]>;
|
|
21
|
+
getLabel(peerId: string, options: IRTSeeStoryLabelRequestOptions): Promise<IRTSeeStoryLabel>;
|
|
22
|
+
createLabel(peerId: string, label: Omit<IRTSeeStoryLabel, 'id' | 'stories'>): Promise<IRTSeeStoryLabel>;
|
|
23
|
+
editLabel(peerId: string, label: IRTSeeStoryLabel): Promise<IRTSeeStoryLabel>;
|
|
24
|
+
deleteLabel(peerId: string, labelId: string): Promise<IRTSeeStoryLabel>;
|
|
25
|
+
getSlides(peerId: string, options: IStorySlidesQuery): Promise<IStorySlidesQueryResponse>;
|
|
26
|
+
createSlide(peerId: string, options: Omit<IRTSeeStorySlide, 'id'>): Promise<IRTSeeStorySlide>;
|
|
27
|
+
editSlide(peerId: string, options: IRTSeeStorySlide): Promise<IRTSeeStorySlide>;
|
|
28
|
+
deleteSlide(peerId: string, slideId: string): Promise<IRTSeeStorySlide>;
|
|
9
29
|
}
|
|
10
30
|
//# sourceMappingURL=PresentationStorageProcessor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationStorageProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/interfaces/PresentationStorageProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"PresentationStorageProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/interfaces/PresentationStorageProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,8BAA8B,EAC9B,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,kCAAkC;IAEjD,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrC,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrC,iBAAiB,CACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrC,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7D,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAG9D,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACnF,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,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,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7F,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACxG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC9E,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAGxE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC1F,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC9F,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChF,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACzE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPresentationRoom, IPresentationStorageHandlers } from "@rtsee/common";
|
|
1
|
+
import { IPresentationRoom, IPresentationStorageHandlers, IRTSeeStory, IRTSeeStoryCategory, IRTSeeStoryLabel, IRTSeeStoryLabelRequestOptions, IRTSeeStorySlide, IStoriesQuery, IStoriesQueryResponse, IStorySlidesQuery, IStorySlidesQueryResponse } from "@rtsee/common";
|
|
2
2
|
import { IRTSeePresentationStorageOptions, IRTSeePresentationStorageProcessor } from "@rtsee/live-storage";
|
|
3
3
|
export declare class RTSeePresentationStorage implements IRTSeePresentationStorageProcessor {
|
|
4
4
|
handlers: IPresentationStorageHandlers;
|
|
@@ -10,5 +10,25 @@ export declare class RTSeePresentationStorage implements IRTSeePresentationStora
|
|
|
10
10
|
onRoomJoined(clientId: string, roomId: string): Promise<void>;
|
|
11
11
|
onRoomLeft(clientId: string, roomId: string): Promise<void>;
|
|
12
12
|
getRoomsForPeer(peerId: string): Promise<IPresentationRoom[]>;
|
|
13
|
+
getStories(peerId: string, options: IStoriesQuery): Promise<IStoriesQueryResponse>;
|
|
14
|
+
createStory(clientId: string, options: Omit<IRTSeeStory, 'id'>): Promise<IRTSeeStory>;
|
|
15
|
+
editStory(peerId: string, options: IRTSeeStory): Promise<IRTSeeStory>;
|
|
16
|
+
deleteStory(peerId: string, storyId: string): Promise<IRTSeeStory>;
|
|
17
|
+
publishStory(peerId: string, storyId: string): Promise<IRTSeeStory>;
|
|
18
|
+
getCategories(peerId: string, populate?: boolean): Promise<IRTSeeStoryCategory[]>;
|
|
19
|
+
createCategory(peerId: string, category: Omit<IRTSeeStoryCategory, 'id'>): Promise<IRTSeeStoryCategory>;
|
|
20
|
+
updateCategory(peerId: string, category: IRTSeeStoryCategory): Promise<IRTSeeStoryCategory | null>;
|
|
21
|
+
deleteCategory(peerId: string, categoryId: string): Promise<IRTSeeStoryCategory | null>;
|
|
22
|
+
addStoryToCategory(peerId: string, storyId: string, categoryId: string): Promise<IRTSeeStory | null>;
|
|
23
|
+
removeStoryFromCategory(peerId: string, storyId: string, categoryId: string): Promise<IRTSeeStory | null>;
|
|
24
|
+
getLabels(peerId: string, populate?: boolean): Promise<IRTSeeStoryLabel[]>;
|
|
25
|
+
getLabel(peerId: string, options: IRTSeeStoryLabelRequestOptions): Promise<IRTSeeStoryLabel>;
|
|
26
|
+
createLabel(peerId: string, label: Omit<IRTSeeStoryLabel, 'id' | 'stories'>): Promise<IRTSeeStoryLabel>;
|
|
27
|
+
editLabel(peerId: string, label: IRTSeeStoryLabel): Promise<IRTSeeStoryLabel>;
|
|
28
|
+
deleteLabel(peerId: string, labelId: string): Promise<IRTSeeStoryLabel>;
|
|
29
|
+
getSlides(peerId: string, options: IStorySlidesQuery): Promise<IStorySlidesQueryResponse>;
|
|
30
|
+
createSlide(peerId: string, options: Omit<IRTSeeStorySlide, "id">): Promise<IRTSeeStorySlide>;
|
|
31
|
+
editSlide(peerId: string, options: IRTSeeStorySlide): Promise<IRTSeeStorySlide>;
|
|
32
|
+
deleteSlide(peerId: string, slideId: string): Promise<IRTSeeStorySlide>;
|
|
13
33
|
}
|
|
14
34
|
//# sourceMappingURL=PresentationStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationStorage.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/models/PresentationStorage.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"PresentationStorage.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/models/PresentationStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,4BAA4B,EAC5B,WAAW,EACX,mBAAmB,EAAE,gBAAgB,EAAE,8BAA8B,EACrE,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EAAE,iBAAiB,EAAE,yBAAyB,EACpE,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAGnC,MAAM,qBAAqB,CAAC;AAE7B,qBAAa,wBAAyB,YAAW,kCAAkC;IACjF,QAAQ,EAAE,4BAA4B,CAAC;IACvC,SAAS,EAAE,kCAAkC,CAAC;gBAElC,OAAO,EAAE,gCAAgC;IASrD,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAI3F,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,C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gB,CAAC;CAG7B"}
|
|
@@ -9,7 +9,7 @@ class RTSeePresentationStorage {
|
|
|
9
9
|
this.processor = new live_storage_1.RTSeePresentationRemoteStorage({ handlers: this.handlers });
|
|
10
10
|
}
|
|
11
11
|
else {
|
|
12
|
-
this.processor = new live_storage_1.RTSeePresentationLocalStorage(
|
|
12
|
+
this.processor = new live_storage_1.RTSeePresentationLocalStorage();
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
createRoom(clientId, options) {
|
|
@@ -30,6 +30,66 @@ class RTSeePresentationStorage {
|
|
|
30
30
|
getRoomsForPeer(peerId) {
|
|
31
31
|
return this.processor.getRoomsForPeer(peerId);
|
|
32
32
|
}
|
|
33
|
+
getStories(peerId, options) {
|
|
34
|
+
return this.processor.getStories(peerId, options);
|
|
35
|
+
}
|
|
36
|
+
createStory(clientId, options) {
|
|
37
|
+
return this.processor.createStory(clientId, options);
|
|
38
|
+
}
|
|
39
|
+
editStory(peerId, options) {
|
|
40
|
+
return this.processor.editStory(peerId, options);
|
|
41
|
+
}
|
|
42
|
+
deleteStory(peerId, storyId) {
|
|
43
|
+
return this.processor.deleteStory(peerId, storyId);
|
|
44
|
+
}
|
|
45
|
+
publishStory(peerId, storyId) {
|
|
46
|
+
return this.processor.publishStory(peerId, storyId);
|
|
47
|
+
}
|
|
48
|
+
getCategories(peerId, populate) {
|
|
49
|
+
return this.processor.getCategories(peerId, populate);
|
|
50
|
+
}
|
|
51
|
+
createCategory(peerId, category) {
|
|
52
|
+
return this.processor.createCategory(peerId, category);
|
|
53
|
+
}
|
|
54
|
+
updateCategory(peerId, category) {
|
|
55
|
+
return this.processor.updateCategory(peerId, category);
|
|
56
|
+
}
|
|
57
|
+
deleteCategory(peerId, categoryId) {
|
|
58
|
+
return this.processor.deleteCategory(peerId, categoryId);
|
|
59
|
+
}
|
|
60
|
+
addStoryToCategory(peerId, storyId, categoryId) {
|
|
61
|
+
return this.processor.addStoryToCategory(peerId, storyId, categoryId);
|
|
62
|
+
}
|
|
63
|
+
removeStoryFromCategory(peerId, storyId, categoryId) {
|
|
64
|
+
return this.processor.removeStoryFromCategory(peerId, storyId, categoryId);
|
|
65
|
+
}
|
|
66
|
+
getLabels(peerId, populate) {
|
|
67
|
+
return this.processor.getLabels(peerId, populate);
|
|
68
|
+
}
|
|
69
|
+
getLabel(peerId, options) {
|
|
70
|
+
return this.processor.getLabel(peerId, options);
|
|
71
|
+
}
|
|
72
|
+
createLabel(peerId, label) {
|
|
73
|
+
return this.processor.createLabel(peerId, label);
|
|
74
|
+
}
|
|
75
|
+
editLabel(peerId, label) {
|
|
76
|
+
return this.processor.editLabel(peerId, label);
|
|
77
|
+
}
|
|
78
|
+
deleteLabel(peerId, labelId) {
|
|
79
|
+
return this.processor.deleteLabel(peerId, labelId);
|
|
80
|
+
}
|
|
81
|
+
getSlides(peerId, options) {
|
|
82
|
+
return this.processor.getSlides(peerId, options);
|
|
83
|
+
}
|
|
84
|
+
createSlide(peerId, options) {
|
|
85
|
+
return this.processor.createSlide(peerId, options);
|
|
86
|
+
}
|
|
87
|
+
editSlide(peerId, options) {
|
|
88
|
+
return this.processor.editSlide(peerId, options);
|
|
89
|
+
}
|
|
90
|
+
deleteSlide(peerId, slideId) {
|
|
91
|
+
return this.processor.deleteSlide(peerId, slideId);
|
|
92
|
+
}
|
|
33
93
|
}
|
|
34
94
|
exports.RTSeePresentationStorage = RTSeePresentationStorage;
|
|
35
95
|
//# sourceMappingURL=PresentationStorage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationStorage.js","sourceRoot":"","sources":["../../../../../src/presentation/models/PresentationStorage.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PresentationStorage.js","sourceRoot":"","sources":["../../../../../src/presentation/models/PresentationStorage.ts"],"names":[],"mappings":";;;AASA,sDAK6B;AAE7B,MAAa,wBAAwB;IAInC,YAAY,OAAyC;QACnD,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,E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age/PresentationLocalStorage';
|
|
3
|
+
export * from './local-storage/RTSeePresentationRoomsStorage';
|
|
4
|
+
export * from './local-storage/RTSeePresentationStoriesStorage';
|
|
5
|
+
export * from './local-storage/RTSeePresentationSlidesStorage';
|
|
3
6
|
export * from './remote-storage/PresentationRemoteStorage';
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4CAA4C,CAAC"}
|
|
@@ -16,5 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./PresentationStorage"), exports);
|
|
18
18
|
__exportStar(require("./local-storage/PresentationLocalStorage"), exports);
|
|
19
|
+
__exportStar(require("./local-storage/RTSeePresentationRoomsStorage"), exports);
|
|
20
|
+
__exportStar(require("./local-storage/RTSeePresentationStoriesStorage"), exports);
|
|
21
|
+
__exportStar(require("./local-storage/RTSeePresentationSlidesStorage"), exports);
|
|
19
22
|
__exportStar(require("./remote-storage/PresentationRemoteStorage"), exports);
|
|
20
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/presentation/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,2EAAyD;AACzD,6EAA2D"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/presentation/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,2EAAyD;AACzD,gFAA8D;AAC9D,kFAAgE;AAChE,iFAA+D;AAC/D,6EAA2D"}
|
package/dist/live-storage/src/presentation/models/local-storage/PresentationLocalStorage.d.ts
CHANGED
|
@@ -1,14 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IPresentationRoom } from "@rtsee/common";
|
|
3
|
-
import { RTSeePresentationRoomsStorage } from "./RTSeePresentationRoomsStorage";
|
|
1
|
+
import { IRTSeePresentationStorageProcessor, RTSeePresentationRoomsStorage, RTSeeStoriesStorage } from "@rtsee/live-storage";
|
|
2
|
+
import { IPresentationRoom, IRTSeeStory, IRTSeeStoryCategory, IRTSeeStoryLabel, IRTSeeStoryLabelRequestOptions, IRTSeeStorySlide, IStoriesQuery, IStoriesQueryResponse, IStorySlidesQuery, IStorySlidesQueryResponse } from "@rtsee/common";
|
|
4
3
|
export declare class RTSeePresentationLocalStorage implements IRTSeePresentationStorageProcessor {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
roomsStorage: RTSeePresentationRoomsStorage;
|
|
5
|
+
storiesStorage: RTSeeStoriesStorage;
|
|
6
|
+
constructor();
|
|
7
|
+
getStories(peerId: string, options: IStoriesQuery): Promise<IStoriesQueryResponse>;
|
|
8
|
+
createStory(peerId: string, options: Omit<IRTSeeStory, 'id'>): Promise<IRTSeeStory>;
|
|
9
|
+
editStory(peerId: string, options: IRTSeeStory): Promise<IRTSeeStory>;
|
|
7
10
|
createRoom(clientId: string, options: IPresentationRoom): Promise<IPresentationRoom | null>;
|
|
8
11
|
deleteRoom(clientId: string, roomId: string): Promise<IPresentationRoom | null>;
|
|
9
12
|
onJoinRoomRequest(clientId: string, roomId: string): Promise<IPresentationRoom | null>;
|
|
10
13
|
onRoomJoined(clientId: string, roomId: string): Promise<void>;
|
|
11
14
|
onRoomLeft(clientId: string, roomId: string): Promise<void>;
|
|
12
15
|
getRoomsForPeer(peerId: string): Promise<IPresentationRoom[]>;
|
|
16
|
+
deleteStory(peerId: string, storyId: string): Promise<IRTSeeStory>;
|
|
17
|
+
publishStory(peerId: string, storyId: string): Promise<IRTSeeStory>;
|
|
18
|
+
getCategories(peerId: string, populate?: boolean): Promise<IRTSeeStoryCategory[]>;
|
|
19
|
+
createCategory(peerId: string, category: Omit<IRTSeeStoryCategory, "id">): Promise<IRTSeeStoryCategory>;
|
|
20
|
+
updateCategory(peerId: string, category: IRTSeeStoryCategory): Promise<IRTSeeStoryCategory | null>;
|
|
21
|
+
deleteCategory(peerId: string, categoryId: string): Promise<IRTSeeStoryCategory | null>;
|
|
22
|
+
addStoryToCategory(peerId: string, storyId: string, categoryId: string): Promise<IRTSeeStory | null>;
|
|
23
|
+
removeStoryFromCategory(peerId: string, storyId: string, categoryId: string): Promise<IRTSeeStory | null>;
|
|
24
|
+
getLabels(peerId: string, populate?: boolean): Promise<IRTSeeStoryLabel[]>;
|
|
25
|
+
getLabel(peerId: string, options: IRTSeeStoryLabelRequestOptions): Promise<IRTSeeStoryLabel>;
|
|
26
|
+
createLabel(peerId: string, label: Omit<IRTSeeStoryLabel, 'id' | 'stories'>): Promise<IRTSeeStoryLabel>;
|
|
27
|
+
editLabel(peerId: string, label: IRTSeeStoryLabel): Promise<IRTSeeStoryLabel>;
|
|
28
|
+
deleteLabel(peerId: string, labelId: string): Promise<IRTSeeStoryLabel>;
|
|
29
|
+
getSlides(peerId: string, options: IStorySlidesQuery): Promise<IStorySlidesQueryResponse>;
|
|
30
|
+
createSlide(peerId: string, slideInfo: Omit<IRTSeeStorySlide, 'id'>): Promise<IRTSeeStorySlide>;
|
|
31
|
+
editSlide(peerId: string, options: IRTSeeStorySlide): Promise<IRTSeeStorySlide>;
|
|
32
|
+
deleteSlide(peerId: string, slideId: string): Promise<IRTSeeStorySlide>;
|
|
13
33
|
}
|
|
14
34
|
//# sourceMappingURL=PresentationLocalStorage.d.ts.map
|
package/dist/live-storage/src/presentation/models/local-storage/PresentationLocalStorage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationLocalStorage.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/PresentationLocalStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"PresentationLocalStorage.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/PresentationLocalStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,6BAA6B,EAC7B,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,8BAA8B,EAC9B,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,eAAe,CAAC;AAEvB,qBAAa,6BAA8B,YAAW,kCAAkC;IACtF,YAAY,EAAE,6BAA6B,CAAC;IAC5C,cAAc,EAAE,mBAAmB,CAAC;;IAOpC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIlF,WAAW,CACT,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAC/B,OAAO,CAAC,WAAW,CAAC;IAKvB,SAAS,CACP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,WAAW,CAAC;IAMvB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAI3F,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC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jB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAI9B,SAAS,CACP,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,OAAO,GACjB,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAI9B,QAAQ,CACN,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIrE,WAAW,CACT,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,GAAG,SAAS,CAAC,GAC9C,OAAO,CAAC,gBAAgB,CAAC;IAI5B,SAAS,CACP,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,gBAAgB,CAAC;IAI5B,WAAW,CACT,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC;IAI5B,SAAS,CACP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,yBAAyB,CAAC;IAIrC,WAAW,CACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GACtC,OAAO,CAAC,gBAAgB,CAAC;IAK5B,SAAS,CACP,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,gBAAgB,CAAC;IAM5B,WAAW,CACT,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC;CAK7B"}
|
|
@@ -1,33 +1,118 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RTSeePresentationLocalStorage = void 0;
|
|
4
|
-
const
|
|
4
|
+
const live_storage_1 = require("@rtsee/live-storage");
|
|
5
5
|
class RTSeePresentationLocalStorage {
|
|
6
|
-
constructor(
|
|
7
|
-
|
|
8
|
-
this.
|
|
6
|
+
constructor() {
|
|
7
|
+
this.roomsStorage = new live_storage_1.RTSeePresentationRoomsStorage();
|
|
8
|
+
this.storiesStorage = new live_storage_1.RTSeeStoriesStorage();
|
|
9
|
+
}
|
|
10
|
+
getStories(peerId, options) {
|
|
11
|
+
return Promise.resolve(this.storiesStorage.getStoriesPaginated(options));
|
|
12
|
+
}
|
|
13
|
+
createStory(peerId, options) {
|
|
14
|
+
const story = this.storiesStorage.add(peerId, options);
|
|
15
|
+
return Promise.resolve(story);
|
|
16
|
+
}
|
|
17
|
+
editStory(peerId, options) {
|
|
18
|
+
const story = this.storiesStorage.update(peerId, options);
|
|
19
|
+
if (!story) {
|
|
20
|
+
throw new Error('Story not found');
|
|
21
|
+
}
|
|
22
|
+
return Promise.resolve(story);
|
|
9
23
|
}
|
|
10
24
|
createRoom(clientId, options) {
|
|
11
|
-
return Promise.resolve(this.
|
|
25
|
+
return Promise.resolve(this.roomsStorage.add(options));
|
|
12
26
|
}
|
|
13
27
|
deleteRoom(clientId, roomId) {
|
|
14
|
-
return Promise.resolve(this.
|
|
28
|
+
return Promise.resolve(this.roomsStorage.delete(roomId));
|
|
15
29
|
}
|
|
16
30
|
onJoinRoomRequest(clientId, roomId) {
|
|
17
31
|
// previously message was already sent via Messenger, so clientID is already a member
|
|
18
|
-
const room = this.
|
|
32
|
+
const room = this.roomsStorage.getById(roomId);
|
|
19
33
|
return Promise.resolve(room);
|
|
20
34
|
}
|
|
21
35
|
onRoomJoined(clientId, roomId) {
|
|
22
|
-
this.
|
|
36
|
+
this.roomsStorage.onRoomJoined(roomId, clientId);
|
|
23
37
|
return Promise.resolve();
|
|
24
38
|
}
|
|
25
39
|
onRoomLeft(clientId, roomId) {
|
|
26
|
-
this.
|
|
40
|
+
this.roomsStorage.onRoomLeft(clientId, roomId);
|
|
27
41
|
return Promise.resolve();
|
|
28
42
|
}
|
|
29
43
|
getRoomsForPeer(peerId) {
|
|
30
|
-
return Promise.resolve(this.
|
|
44
|
+
return Promise.resolve(this.roomsStorage.getRoomsForPeer(peerId));
|
|
45
|
+
}
|
|
46
|
+
deleteStory(peerId, storyId) {
|
|
47
|
+
const story = this.storiesStorage.delete(peerId, storyId);
|
|
48
|
+
if (!story) {
|
|
49
|
+
throw new Error('Story not found');
|
|
50
|
+
}
|
|
51
|
+
return Promise.resolve(story);
|
|
52
|
+
}
|
|
53
|
+
publishStory(peerId, storyId) {
|
|
54
|
+
const story = this.storiesStorage.publish(peerId, storyId);
|
|
55
|
+
if (!story) {
|
|
56
|
+
throw new Error('Story not found');
|
|
57
|
+
}
|
|
58
|
+
return Promise.resolve(story);
|
|
59
|
+
}
|
|
60
|
+
getCategories(peerId, populate = false) {
|
|
61
|
+
console.log(`getCategories for peerId ${peerId}`);
|
|
62
|
+
const categories = this.storiesStorage.getCategories(populate);
|
|
63
|
+
return Promise.resolve(categories);
|
|
64
|
+
}
|
|
65
|
+
createCategory(peerId, category) {
|
|
66
|
+
const newCategory = this.storiesStorage.addCategory(peerId, category);
|
|
67
|
+
return Promise.resolve(newCategory);
|
|
68
|
+
}
|
|
69
|
+
updateCategory(peerId, category) {
|
|
70
|
+
return Promise.resolve(this.storiesStorage.updateCategory(category));
|
|
71
|
+
}
|
|
72
|
+
deleteCategory(peerId, categoryId) {
|
|
73
|
+
return Promise.resolve(this.storiesStorage.deleteCategory(categoryId));
|
|
74
|
+
}
|
|
75
|
+
addStoryToCategory(peerId, storyId, categoryId) {
|
|
76
|
+
return Promise.resolve(this.storiesStorage.addStoryToCategory(categoryId, storyId));
|
|
77
|
+
}
|
|
78
|
+
removeStoryFromCategory(peerId, storyId, categoryId) {
|
|
79
|
+
return Promise.resolve(this.storiesStorage.removeStoryFromCategory(categoryId, storyId));
|
|
80
|
+
}
|
|
81
|
+
getLabels(peerId, populate) {
|
|
82
|
+
return Promise.resolve(this.storiesStorage.getLabels(populate));
|
|
83
|
+
}
|
|
84
|
+
getLabel(peerId, options) {
|
|
85
|
+
return Promise.resolve(this.storiesStorage.getLabel(options));
|
|
86
|
+
}
|
|
87
|
+
createLabel(peerId, label) {
|
|
88
|
+
return Promise.resolve(this.storiesStorage.createLabel(label));
|
|
89
|
+
}
|
|
90
|
+
editLabel(peerId, label) {
|
|
91
|
+
return Promise.resolve(this.storiesStorage.editLabel(label));
|
|
92
|
+
}
|
|
93
|
+
deleteLabel(peerId, labelId) {
|
|
94
|
+
return Promise.resolve(this.storiesStorage.deleteLabel(labelId));
|
|
95
|
+
}
|
|
96
|
+
getSlides(peerId, options) {
|
|
97
|
+
return Promise.resolve(this.storiesStorage.getSlides(options));
|
|
98
|
+
}
|
|
99
|
+
createSlide(peerId, slideInfo) {
|
|
100
|
+
const storySlide = this.storiesStorage.addSlide(slideInfo);
|
|
101
|
+
return Promise.resolve(storySlide);
|
|
102
|
+
}
|
|
103
|
+
editSlide(peerId, options) {
|
|
104
|
+
const slide = this.storiesStorage.updateSlide(peerId, options);
|
|
105
|
+
if (!slide) {
|
|
106
|
+
throw new Error('Slide not found');
|
|
107
|
+
}
|
|
108
|
+
return Promise.resolve(slide);
|
|
109
|
+
}
|
|
110
|
+
deleteSlide(peerId, slideId) {
|
|
111
|
+
const slide = this.storiesStorage.deleteSlide(peerId, slideId);
|
|
112
|
+
if (!slide) {
|
|
113
|
+
throw new Error('Slide not found');
|
|
114
|
+
}
|
|
115
|
+
return Promise.resolve(slide);
|
|
31
116
|
}
|
|
32
117
|
}
|
|
33
118
|
exports.RTSeePresentationLocalStorage = RTSeePresentationLocalStorage;
|
package/dist/live-storage/src/presentation/models/local-storage/PresentationLocalStorage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationLocalStorage.js","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/PresentationLocalStorage.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PresentationLocalStorage.js","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/PresentationLocalStorage.ts"],"names":[],"mappings":";;;AAAA,sDAI6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AC,iBAAiB,CAAC,CAAC;QAAC,CAAC;QACnD,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACF;AAvLD,sEAuLC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RTSeePresentationRoomsStorage.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/RTSeePresentationRoomsStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEhD,qBAAa,6BAA6B;IACxC,IAAI,EAAE,iBAAiB,EAAE,CAAM;IAE/B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI;IAI7C,GAAG,CAAC,QAAQ,EAAE,iBAAiB,GAAG,iBAAiB;IAKnD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI;IAOhD,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,EAAE;IAIhD,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIpD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"RTSeePresentationRoomsStorage.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/RTSeePresentationRoomsStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEhD,qBAAa,6BAA6B;IACxC,IAAI,EAAE,iBAAiB,EAAE,CAAM;IAE/B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI;IAI7C,GAAG,CAAC,QAAQ,EAAE,iBAAiB,GAAG,iBAAiB;IAKnD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI;IAOhD,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,EAAE;IAIhD,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIpD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;CAGnD"}
|
package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationRoomsStorage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RTSeePresentationRoomsStorage.js","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/RTSeePresentationRoomsStorage.ts"],"names":[],"mappings":";;;AAEA,MAAa,6BAA6B;IAA1C;QACE,SAAI,GAAwB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"RTSeePresentationRoomsStorage.js","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/RTSeePresentationRoomsStorage.ts"],"names":[],"mappings":";;;AAEA,MAAa,6BAA6B;IAA1C;QACE,SAAI,GAAwB,EAAE,CAAC;IA6BjC,CAAC;IA3BC,OAAO,CAAC,EAAU;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC;IACpD,CAAC;IAED,GAAG,CAAC,QAA2B;QAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,MAAc;QACnB,MAAM,IAAI,GAA6B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,eAAe,CAAC,EAAU;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,YAAY,CAAC,MAAc,EAAE,QAAgB;QAC3C,OAAO,CAAC,GAAG,CAAC,0BAA0B,QAAQ,YAAY,MAAM,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,UAAU,CAAC,MAAc,EAAE,QAAgB;QACzC,OAAO,CAAC,GAAG,CAAC,yBAAyB,QAAQ,YAAY,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AA9BD,sEA8BC"}
|
package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationSlidesStorage.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IRTSeeStorySlide, IStorySlidesQuery, IStorySlidesQueryResponse } from "@rtsee/common";
|
|
2
|
+
export declare class RTSeeSlidesStorage {
|
|
3
|
+
slides: IRTSeeStorySlide[];
|
|
4
|
+
constructor();
|
|
5
|
+
getSlides(options: IStorySlidesQuery): IStorySlidesQueryResponse;
|
|
6
|
+
add(slideData: Omit<IRTSeeStorySlide, 'id'>): IRTSeeStorySlide;
|
|
7
|
+
edit(slideData: IRTSeeStorySlide): IRTSeeStorySlide | null;
|
|
8
|
+
remove(slideId: string): IRTSeeStorySlide | null;
|
|
9
|
+
private getById;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=RTSeePresentationSlidesStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RTSeePresentationSlidesStorage.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/RTSeePresentationSlidesStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAE,yBAAyB,EAAC,MAAM,eAAe,CAAC;AAI7F,qBAAa,kBAAkB;IAC7B,MAAM,EAAE,gBAAgB,EAAE,CAExB;;IAIF,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,yBAAyB;IAwBhE,GAAG,CACD,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,GACtC,gBAAgB;IAWnB,IAAI,CACF,SAAS,EAAE,gBAAgB,GAC1B,gBAAgB,GAAG,IAAI;IAS1B,MAAM,CACJ,OAAO,EAAE,MAAM,GACd,gBAAgB,GAAG,IAAI;IAO1B,OAAO,CAAC,OAAO;CAKhB"}
|
package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationSlidesStorage.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RTSeeSlidesStorage = void 0;
|
|
4
|
+
const core_1 = require("@rtsee/core");
|
|
5
|
+
const mocks_1 = require("./mocks");
|
|
6
|
+
class RTSeeSlidesStorage {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.slides = [
|
|
9
|
+
...mocks_1.storiesSlides
|
|
10
|
+
];
|
|
11
|
+
}
|
|
12
|
+
getSlides(options) {
|
|
13
|
+
const slidesList = this.slides
|
|
14
|
+
.filter((s) => s.storyId === options.storyId)
|
|
15
|
+
.sort((a, b) => a.slideNumber - b.slideNumber);
|
|
16
|
+
const cutStartIndex = options.slideNumber - 1;
|
|
17
|
+
let cutEndIndex = options.direction === "front"
|
|
18
|
+
? cutStartIndex + options.limit
|
|
19
|
+
: cutStartIndex - options.limit;
|
|
20
|
+
if (cutEndIndex < 1) {
|
|
21
|
+
cutEndIndex = 1;
|
|
22
|
+
}
|
|
23
|
+
else if (cutEndIndex > slidesList.length) {
|
|
24
|
+
cutEndIndex = slidesList.length;
|
|
25
|
+
}
|
|
26
|
+
console.log('Cutting: ', cutStartIndex, cutEndIndex);
|
|
27
|
+
return {
|
|
28
|
+
slides: slidesList.slice(cutStartIndex, cutEndIndex),
|
|
29
|
+
total: slidesList.length
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
add(slideData) {
|
|
33
|
+
const slide = Object.assign(Object.assign({}, slideData), { id: core_1.RTSeeCore.uuidv4() });
|
|
34
|
+
this.slides.push(slide);
|
|
35
|
+
return slide;
|
|
36
|
+
}
|
|
37
|
+
edit(slideData) {
|
|
38
|
+
const slide = this.getById(slideData.id);
|
|
39
|
+
if (!slide) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
slide.text = slideData.text;
|
|
43
|
+
slide.imageUrl = slideData.imageUrl;
|
|
44
|
+
slide.widget = slideData.widget;
|
|
45
|
+
}
|
|
46
|
+
remove(slideId) {
|
|
47
|
+
const slide = this.getById(slideId);
|
|
48
|
+
if (!slide) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
this.slides.splice(this.slides.indexOf(slide), 1);
|
|
52
|
+
return slide;
|
|
53
|
+
}
|
|
54
|
+
getById(id) {
|
|
55
|
+
return this.slides.find((s) => s.id === id) || null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.RTSeeSlidesStorage = RTSeeSlidesStorage;
|
|
59
|
+
//# sourceMappingURL=RTSeePresentationSlidesStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RTSeePresentationSlidesStorage.js","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/RTSeePresentationSlidesStorage.ts"],"names":[],"mappings":";;;AACA,sCAAsC;AACtC,mCAAsC;AAEtC,MAAa,kBAAkB;IAK7B;QAJA,WAAM,GAAuB;YAC3B,GAAG,qBAAa;SACjB,CAAC;IAEa,CAAC;IAEhB,SAAS,CAAC,OAA0B;QAClC,MAAM,UAAU,GAAuB,IAAI,CAAC,MAAM;aAC/C,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC;aAC5C,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC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ED,MAAM,CACJ,OAAe;QAEf,MAAM,KAAK,GAAqB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,EAAE,CAAC;YAAC,OAAO,IAAI,CAAC;QAAC,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QAClD,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,OAAO,CACb,EAAU;QAEV,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC;IACtD,CAAC;CACF;AArED,gDAqEC"}
|
package/dist/live-storage/src/presentation/models/local-storage/RTSeePresentationStoriesStorage.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IRTSeeStory, IRTSeeStoryCategory, IRTSeeStoryLabel, IRTSeeStoryLabelRequestOptions, IRTSeeStorySlide, IStoriesQuery, IStoriesQueryResponse, IStorySlidesQuery, IStorySlidesQueryResponse } from "@rtsee/common";
|
|
2
|
+
import { RTSeeSlidesStorage } from "@rtsee/live-storage";
|
|
3
|
+
export declare class RTSeeStoriesStorage {
|
|
4
|
+
stories: IRTSeeStory[];
|
|
5
|
+
slidesStorage: RTSeeSlidesStorage;
|
|
6
|
+
categories: IRTSeeStoryCategory[];
|
|
7
|
+
storiesCategories: {
|
|
8
|
+
storyId: string;
|
|
9
|
+
categoryId: string;
|
|
10
|
+
}[];
|
|
11
|
+
labels: IRTSeeStoryLabel[];
|
|
12
|
+
storiesLabels: {
|
|
13
|
+
storyId: string;
|
|
14
|
+
labelId: string;
|
|
15
|
+
}[];
|
|
16
|
+
getStoriesPaginated(options: IStoriesQuery): IStoriesQueryResponse;
|
|
17
|
+
getById(id: string): IRTSeeStory | null;
|
|
18
|
+
add(peerId: string, storyInfo: Omit<IRTSeeStory, 'id'>): IRTSeeStory | null;
|
|
19
|
+
update(peerId: string, storyData: IRTSeeStory): IRTSeeStory | null;
|
|
20
|
+
delete(peerId: string, storyId: string): IRTSeeStory | null;
|
|
21
|
+
publish(peerId: string, storyId: string): IRTSeeStory | null;
|
|
22
|
+
getSlides(options: IStorySlidesQuery): IStorySlidesQueryResponse;
|
|
23
|
+
addSlide(slideInfo: Omit<IRTSeeStorySlide, 'id'>): IRTSeeStorySlide | null;
|
|
24
|
+
updateSlide(peerId: string, slideInfo: IRTSeeStorySlide): IRTSeeStorySlide | null;
|
|
25
|
+
deleteSlide(peerId: string, slideId: string): IRTSeeStorySlide | null;
|
|
26
|
+
addCategory(peerId: string, categoryInfo: Omit<IRTSeeStoryCategory, 'id'>): IRTSeeStoryCategory;
|
|
27
|
+
getCategories(populate?: boolean): IRTSeeStoryCategory[];
|
|
28
|
+
getCategoryById(categoryId: string, populate?: boolean): IRTSeeStoryCategory | null;
|
|
29
|
+
updateCategory(categoryInfo: IRTSeeStoryCategory): IRTSeeStoryCategory | null;
|
|
30
|
+
deleteCategory(id: string): IRTSeeStoryCategory | null;
|
|
31
|
+
addStoryToCategory(storyId: string, categoryId: string): IRTSeeStory | null;
|
|
32
|
+
removeStoryFromCategory(storyId: string, categoryId: string): IRTSeeStory | null;
|
|
33
|
+
getCategoryStories(categoryId: string): IRTSeeStory[];
|
|
34
|
+
getLabels(populate?: boolean): IRTSeeStoryLabel[];
|
|
35
|
+
getLabel(options: IRTSeeStoryLabelRequestOptions): IRTSeeStoryLabel | null;
|
|
36
|
+
createLabel(labelInfo: Omit<IRTSeeStoryLabel, 'id' | 'stories'>): IRTSeeStoryLabel;
|
|
37
|
+
editLabel(labelInfo: IRTSeeStoryLabel): IRTSeeStoryLabel;
|
|
38
|
+
deleteLabel(labelId: string): IRTSeeStoryLabel;
|
|
39
|
+
private populateStory;
|
|
40
|
+
private getStoryCategoriesIds;
|
|
41
|
+
private getStoryLabelsIds;
|
|
42
|
+
private getStoryCategories;
|
|
43
|
+
private getStoryLabels;
|
|
44
|
+
private updateStoryCategories;
|
|
45
|
+
private updateStoryLabels;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=RTSeePresentationStoriesStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RTSeePresentationStoriesStorage.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/models/local-storage/RTSeePresentationStoriesStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,8BAA8B,EAC9B,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EAAE,iBAAiB,EAAE,yBAAyB,EACpE,MAAM,eAAe,CAAC;AASvB,OAAO,EAAC,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AAEvD,qBAAa,mBAAmB;IAC9B,OAAO,EAAE,WAAW,EAAE,CAEpB;IACF,aAAa,EAAE,kBAAkB,CAA4B;IAC7D,UAAU,EAAE,mBAAmB,EAAE,CAE/B;IACF,iBAAiB,EAAE;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;KAAC,EAAE,CAEzD;IACF,MAAM,EAAE,gBAAgB,EAAE,CAExB;IACF,aAAa,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAEnD;IAEF,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,qBAAqB;IAyBlE,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;IAIvC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,WAAW,GAAG,IAAI;IAmB3E,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,WAAW,GACrB,WAAW,GAAG,IAAI;IAqBrB,MAAM,CACJ,MA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