@nu-art/live-docs-shared 0.400.7

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/api.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { ApiDefResolver, BodyApi, QueryApi } from '@nu-art/thunderstorm-shared';
2
+ import { DB_Document, LiveDocHistoryReqParams, LiveDocReqParams, Request_UpdateDocument } from './types.js';
3
+ export type ApiStruct_LiveDoc = {
4
+ v1: {
5
+ get: QueryApi<DB_Document, LiveDocReqParams>;
6
+ upsert: BodyApi<DB_Document, Request_UpdateDocument>;
7
+ history: QueryApi<DB_Document, LiveDocHistoryReqParams>;
8
+ };
9
+ };
10
+ export declare const ApiDef_LiveDoc: ApiDefResolver<ApiStruct_LiveDoc>;
package/api.js ADDED
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Live-Docs will allow you to add and edit tool-tips from within your app...
3
+ *
4
+ * Copyright (C) 2020 Adam van der Kruk aka TacB0sS
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ import { HttpMethod } from '@nu-art/thunderstorm-shared';
19
+ export const ApiDef_LiveDoc = {
20
+ v1: {
21
+ get: { method: HttpMethod.GET, path: 'v1/live-docs/unique' },
22
+ upsert: { method: HttpMethod.POST, path: 'v1/live-docs/upsert' },
23
+ history: { method: HttpMethod.GET, path: 'v1/live-docs/change-history' }
24
+ }
25
+ };
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./types.js";
2
+ export * from "./api.js";
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./types.js";
2
+ export * from "./api.js";
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@nu-art/live-docs-shared",
3
+ "version": "0.400.7",
4
+ "description": "Live docs Shared",
5
+ "keywords": [
6
+ "TacB0sS",
7
+ "express",
8
+ "infra",
9
+ "live-docs",
10
+ "nu-art",
11
+ "thunderstorm",
12
+ "typescript"
13
+ ],
14
+ "homepage": "https://github.com/nu-art-js/thunderstorm",
15
+ "bugs": {
16
+ "url": "https://github.com/nu-art-js/thunderstorm/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+ssh://git@github.com:nu-art-js/live-docs.git"
21
+ },
22
+ "publishConfig": {
23
+ "directory": "dist",
24
+ "linkDirectory": true
25
+ },
26
+ "license": "Apache-2.0",
27
+ "author": "TacB0sS",
28
+ "scripts": {
29
+ "build": "tsc"
30
+ },
31
+ "contributors": [
32
+ {
33
+ "name": "TacB0sS"
34
+ },
35
+ {
36
+ "name": "Cipher",
37
+ "url": "https://www.linkedin.com/in/itay-leybovich-470b87229/"
38
+ }
39
+ ],
40
+ "dependencies": {
41
+ "@nu-art/ts-common": "0.400.7",
42
+ "@nu-art/firebase-shared": "0.400.7",
43
+ "@nu-art/thunderstorm-shared": "0.400.7",
44
+ "firebase": "^11.9.0",
45
+ "firebase-admin": "13.4.0",
46
+ "firebase-functions": "6.3.2",
47
+ "react": "^18.0.0",
48
+ "react-dom": "^18.0.0",
49
+ "react-router-dom": "^6.9.0",
50
+ "moment": "^2.29.4",
51
+ "express": "^4.18.2",
52
+ "request": "^2.88.0"
53
+ },
54
+ "devDependencies": {
55
+ "@types/react": "^18.0.0",
56
+ "@types/express": "^4.17.17",
57
+ "@types/history": "^4.7.2",
58
+ "@types/request": "^2.48.1"
59
+ },
60
+ "unitConfig": {
61
+ "type": "typescript-lib"
62
+ },
63
+ "type": "module",
64
+ "exports": {
65
+ ".": {
66
+ "types": "./index.d.ts",
67
+ "import": "./index.js"
68
+ },
69
+ "./*": {
70
+ "types": "./*.d.ts",
71
+ "import": "./*.js"
72
+ }
73
+ }
74
+ }
package/types.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { Auditable } from "@nu-art/ts-common";
2
+ export type LiveDocReqParams = {
3
+ key: string;
4
+ };
5
+ export type LiveDocHistoryReqParams = LiveDocReqParams & {
6
+ change: "undo" | "redo";
7
+ };
8
+ type Document = {
9
+ document: string;
10
+ };
11
+ export type DB_DocumentHistory = Auditable & {
12
+ docs: DB_Document[];
13
+ key: string;
14
+ index: number;
15
+ };
16
+ export type DB_Document = Auditable & Document & {};
17
+ export type Request_UpdateDocument = Document & {
18
+ key: string;
19
+ };
20
+ export {};
package/types.js ADDED
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Permissions management system, define access level for each of
3
+ * your server apis, and restrict users by giving them access levels
4
+ *
5
+ * Copyright (C) 2020 Adam van der Kruk aka TacB0sS
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ export {};