cleanstrategytypes 1.1.14 → 1.1.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.esm.js","sources":["../src/index.ts"],"sourcesContent":["export interface IVote {\r\n id: string;\r\n periodId: string;\r\n userId: string;\r\n taskId: string;\r\n count?: number;\r\n}\r\n\r\nexport type ITask = {\r\n id: string;\r\n title: string;\r\n value: number;\r\n};\r\n\r\nexport type ISpace = {\r\n id: string;\r\n name: string;\r\n roles: string[];\r\n};\r\n\r\nexport interface ICurrentUser {\r\n id: string;\r\n displayName: string;\r\n email: string;\r\n tenants: ISpace[];\r\n}\r\n\r\nexport interface IUser {\r\n id: string;\r\n displayName: string;\r\n color: string;\r\n}\r\n\r\nexport interface IRound {\r\n id: string;\r\n order: number;\r\n spaceId: string;\r\n endDate: Date;\r\n status?: \"finished\" | \"active\";\r\n}\r\n\r\nexport enum SpaceEventTypes {\r\n CONNECT = \"CONNECT\",\r\n DISCONNECT = \"DISCONNECT\",\r\n VOTE = \"VOTE\",\r\n DELETE_VOTE = \"DELETE_VOTE\",\r\n RESET_VOTES = \"RESET_VOTES\",\r\n START_ROUND = \"START_ROUND\",\r\n}\r\n\r\n// RequestMessage\r\n\r\nexport type VoteMessageBody = {\r\n type: \"minus\" | \"plus\";\r\n taskId: string;\r\n currentUserId: string;\r\n};\r\n\r\nexport type VoteDeleteMessageBody = {\r\n voteId: string;\r\n};\r\n\r\n// ResponseMessage\r\ntype ResponseMessageBase = {\r\n errorMessages?: { type: string; message: string }[];\r\n};\r\n\r\nexport type VoteMessageResponse = ResponseMessageBase & {\r\n vote: IVote;\r\n};\r\nexport type VoteDeleteMessageResponse = ResponseMessageBase & {\r\n voteId: string;\r\n};\r\n\r\nexport type StartRoundResponseMessage = ResponseMessageBase & {\r\n round: IRound;\r\n};\r\n\r\nexport type ConnectMessageResponse = ResponseMessageBase & {\r\n votes: IVote[];\r\n tasks: ITask[];\r\n users: IUser[];\r\n currentPeriod: IRound;\r\n};\r\n\r\nexport type ResetVotesMessageResponse = ResponseMessageBase & {\r\n votes: IVote[];\r\n};\r\n\r\nexport type StartRoundMessageResponse = ResponseMessageBase & {\r\n round?: IRound;\r\n};\r\n\r\nexport interface GameServerToClientEvents {\r\n [SpaceEventTypes.CONNECT]: (message: ConnectMessageResponse) => void;\r\n [SpaceEventTypes.DISCONNECT]: (message: any) => void;\r\n [SpaceEventTypes.START_ROUND]: (message: StartRoundMessageResponse) => void;\r\n [SpaceEventTypes.VOTE]: (message: VoteMessageResponse) => void;\r\n [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageResponse) => void;\r\n [SpaceEventTypes.RESET_VOTES]: (message: ResetVotesMessageResponse) => void;\r\n}\r\n\r\nexport interface GameClientToServerEvents {\r\n [SpaceEventTypes.CONNECT]: (message: any) => void;\r\n [SpaceEventTypes.START_ROUND]: (message: any) => void;\r\n [SpaceEventTypes.VOTE]: (message: VoteMessageBody) => void;\r\n [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageBody) => void;\r\n [SpaceEventTypes.RESET_VOTES]: (message: any) => void;\r\n}\r\n"],"names":[],"mappings":"IAyCY,gBAOX;AAPD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,eAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,eAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,eAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,eAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC7B,CAAC,EAPW,eAAe,KAAf,eAAe,GAO1B,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"bundle.esm.js","sources":["../src/index.ts"],"sourcesContent":["export interface IVote {\n id: string;\n roundId: string;\n userId: string;\n taskId: string;\n count?: number;\n}\n\nexport type ITask = {\n id: string;\n title: string;\n value: number;\n};\n\nexport type ISpace = {\n id: string;\n name: string;\n roles: string[];\n};\n\nexport interface ICurrentUser {\n id: string;\n displayName: string;\n email: string;\n deviceId: string;\n tenants: ISpace[];\n}\n\nexport interface IUser {\n id: string;\n displayName: string;\n color: string;\n}\n\nexport interface IRound {\n id: string;\n order: number;\n spaceId: string;\n endDate: Date;\n status?: \"finished\" | \"active\";\n}\n\nexport enum SpaceEventTypes {\n CONNECT = \"CONNECT\",\n DISCONNECT = \"DISCONNECT\",\n VOTE = \"VOTE\",\n DELETE_VOTE = \"DELETE_VOTE\",\n RESET_VOTES = \"RESET_VOTES\",\n START_ROUND = \"START_ROUND\",\n}\n\n// RequestMessage\n\nexport type VoteMessageBody = {\n type: \"minus\" | \"plus\";\n taskId: string;\n currentUserId: string;\n};\n\nexport type VoteDeleteMessageBody = {\n voteId: string;\n};\n\n// ResponseMessage\ntype ResponseMessageBase = {\n errorMessages?: { type: string; message: string }[];\n};\n\nexport type VoteMessageResponse = ResponseMessageBase & {\n vote: IVote;\n};\nexport type VoteDeleteMessageResponse = ResponseMessageBase & {\n voteId: string;\n};\n\nexport type StartRoundResponseMessage = ResponseMessageBase & {\n round: IRound;\n};\n\nexport type ConnectMessageResponse = ResponseMessageBase & {\n votes: IVote[];\n tasks: ITask[];\n users: IUser[];\n currentPeriod: IRound;\n};\n\nexport type ResetVotesMessageResponse = ResponseMessageBase & {\n votes: IVote[];\n};\n\nexport type StartRoundMessageResponse = ResponseMessageBase & {\n round?: IRound;\n};\n\nexport interface GameServerToClientEvents {\n [SpaceEventTypes.CONNECT]: (message: ConnectMessageResponse) => void;\n [SpaceEventTypes.DISCONNECT]: (message: any) => void;\n [SpaceEventTypes.START_ROUND]: (message: StartRoundMessageResponse) => void;\n [SpaceEventTypes.VOTE]: (message: VoteMessageResponse) => void;\n [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageResponse) => void;\n [SpaceEventTypes.RESET_VOTES]: (message: ResetVotesMessageResponse) => void;\n}\n\nexport interface GameClientToServerEvents {\n [SpaceEventTypes.CONNECT]: (message: any) => void;\n [SpaceEventTypes.START_ROUND]: (message: any) => void;\n [SpaceEventTypes.VOTE]: (message: VoteMessageBody) => void;\n [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageBody) => void;\n [SpaceEventTypes.RESET_VOTES]: (message: any) => void;\n}\n"],"names":[],"mappings":"IA0CY,gBAOX;AAPD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,eAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,eAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,eAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC3B,IAAA,eAAA,CAAA,aAAA,CAAA,GAAA,aAA2B,CAAA;AAC7B,CAAC,EAPW,eAAe,KAAf,eAAe,GAO1B,EAAA,CAAA,CAAA;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export interface IVote {
2
2
  id: string;
3
- periodId: string;
3
+ roundId: string;
4
4
  userId: string;
5
5
  taskId: string;
6
6
  count?: number;
@@ -19,6 +19,7 @@ export interface ICurrentUser {
19
19
  id: string;
20
20
  displayName: string;
21
21
  email: string;
22
+ deviceId: string;
22
23
  tenants: ISpace[];
23
24
  }
24
25
  export interface IUser {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cleanstrategytypes",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
package/rollup.config.js CHANGED
@@ -1,24 +1,24 @@
1
- import typescript from "@rollup/plugin-typescript";
2
- import { terser } from "rollup-plugin-terser";
3
-
4
- export default {
5
- input: "src/index.ts", // Wejściowy plik TypeScript
6
- output: [
7
- {
8
- file: "dist/index.js",
9
- format: "cjs", // CommonJS
10
- },
11
- {
12
- file: "dist/bundle.esm.js",
13
- format: "esm", // ECMAScript Module
14
- sourcemap: true,
15
- },
16
- {
17
- file: "dist/bundle.min.js",
18
- format: "iife", // IIFE (dla przeglądarek)
19
- name: "MyLibrary",
20
- plugins: [terser()],
21
- },
22
- ],
23
- plugins: [typescript()],
24
- };
1
+ import typescript from "@rollup/plugin-typescript";
2
+ import { terser } from "rollup-plugin-terser";
3
+
4
+ export default {
5
+ input: "src/index.ts", // Wejściowy plik TypeScript
6
+ output: [
7
+ {
8
+ file: "dist/index.js",
9
+ format: "cjs", // CommonJS
10
+ },
11
+ {
12
+ file: "dist/bundle.esm.js",
13
+ format: "esm", // ECMAScript Module
14
+ sourcemap: true,
15
+ },
16
+ {
17
+ file: "dist/bundle.min.js",
18
+ format: "iife", // IIFE (dla przeglądarek)
19
+ name: "MyLibrary",
20
+ plugins: [terser()],
21
+ },
22
+ ],
23
+ plugins: [typescript()],
24
+ };
package/src/index.ts CHANGED
@@ -1,109 +1,110 @@
1
- export interface IVote {
2
- id: string;
3
- periodId: string;
4
- userId: string;
5
- taskId: string;
6
- count?: number;
7
- }
8
-
9
- export type ITask = {
10
- id: string;
11
- title: string;
12
- value: number;
13
- };
14
-
15
- export type ISpace = {
16
- id: string;
17
- name: string;
18
- roles: string[];
19
- };
20
-
21
- export interface ICurrentUser {
22
- id: string;
23
- displayName: string;
24
- email: string;
25
- tenants: ISpace[];
26
- }
27
-
28
- export interface IUser {
29
- id: string;
30
- displayName: string;
31
- color: string;
32
- }
33
-
34
- export interface IRound {
35
- id: string;
36
- order: number;
37
- spaceId: string;
38
- endDate: Date;
39
- status?: "finished" | "active";
40
- }
41
-
42
- export enum SpaceEventTypes {
43
- CONNECT = "CONNECT",
44
- DISCONNECT = "DISCONNECT",
45
- VOTE = "VOTE",
46
- DELETE_VOTE = "DELETE_VOTE",
47
- RESET_VOTES = "RESET_VOTES",
48
- START_ROUND = "START_ROUND",
49
- }
50
-
51
- // RequestMessage
52
-
53
- export type VoteMessageBody = {
54
- type: "minus" | "plus";
55
- taskId: string;
56
- currentUserId: string;
57
- };
58
-
59
- export type VoteDeleteMessageBody = {
60
- voteId: string;
61
- };
62
-
63
- // ResponseMessage
64
- type ResponseMessageBase = {
65
- errorMessages?: { type: string; message: string }[];
66
- };
67
-
68
- export type VoteMessageResponse = ResponseMessageBase & {
69
- vote: IVote;
70
- };
71
- export type VoteDeleteMessageResponse = ResponseMessageBase & {
72
- voteId: string;
73
- };
74
-
75
- export type StartRoundResponseMessage = ResponseMessageBase & {
76
- round: IRound;
77
- };
78
-
79
- export type ConnectMessageResponse = ResponseMessageBase & {
80
- votes: IVote[];
81
- tasks: ITask[];
82
- users: IUser[];
83
- currentPeriod: IRound;
84
- };
85
-
86
- export type ResetVotesMessageResponse = ResponseMessageBase & {
87
- votes: IVote[];
88
- };
89
-
90
- export type StartRoundMessageResponse = ResponseMessageBase & {
91
- round?: IRound;
92
- };
93
-
94
- export interface GameServerToClientEvents {
95
- [SpaceEventTypes.CONNECT]: (message: ConnectMessageResponse) => void;
96
- [SpaceEventTypes.DISCONNECT]: (message: any) => void;
97
- [SpaceEventTypes.START_ROUND]: (message: StartRoundMessageResponse) => void;
98
- [SpaceEventTypes.VOTE]: (message: VoteMessageResponse) => void;
99
- [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageResponse) => void;
100
- [SpaceEventTypes.RESET_VOTES]: (message: ResetVotesMessageResponse) => void;
101
- }
102
-
103
- export interface GameClientToServerEvents {
104
- [SpaceEventTypes.CONNECT]: (message: any) => void;
105
- [SpaceEventTypes.START_ROUND]: (message: any) => void;
106
- [SpaceEventTypes.VOTE]: (message: VoteMessageBody) => void;
107
- [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageBody) => void;
108
- [SpaceEventTypes.RESET_VOTES]: (message: any) => void;
109
- }
1
+ export interface IVote {
2
+ id: string;
3
+ roundId: string;
4
+ userId: string;
5
+ taskId: string;
6
+ count?: number;
7
+ }
8
+
9
+ export type ITask = {
10
+ id: string;
11
+ title: string;
12
+ value: number;
13
+ };
14
+
15
+ export type ISpace = {
16
+ id: string;
17
+ name: string;
18
+ roles: string[];
19
+ };
20
+
21
+ export interface ICurrentUser {
22
+ id: string;
23
+ displayName: string;
24
+ email: string;
25
+ deviceId: string;
26
+ tenants: ISpace[];
27
+ }
28
+
29
+ export interface IUser {
30
+ id: string;
31
+ displayName: string;
32
+ color: string;
33
+ }
34
+
35
+ export interface IRound {
36
+ id: string;
37
+ order: number;
38
+ spaceId: string;
39
+ endDate: Date;
40
+ status?: "finished" | "active";
41
+ }
42
+
43
+ export enum SpaceEventTypes {
44
+ CONNECT = "CONNECT",
45
+ DISCONNECT = "DISCONNECT",
46
+ VOTE = "VOTE",
47
+ DELETE_VOTE = "DELETE_VOTE",
48
+ RESET_VOTES = "RESET_VOTES",
49
+ START_ROUND = "START_ROUND",
50
+ }
51
+
52
+ // RequestMessage
53
+
54
+ export type VoteMessageBody = {
55
+ type: "minus" | "plus";
56
+ taskId: string;
57
+ currentUserId: string;
58
+ };
59
+
60
+ export type VoteDeleteMessageBody = {
61
+ voteId: string;
62
+ };
63
+
64
+ // ResponseMessage
65
+ type ResponseMessageBase = {
66
+ errorMessages?: { type: string; message: string }[];
67
+ };
68
+
69
+ export type VoteMessageResponse = ResponseMessageBase & {
70
+ vote: IVote;
71
+ };
72
+ export type VoteDeleteMessageResponse = ResponseMessageBase & {
73
+ voteId: string;
74
+ };
75
+
76
+ export type StartRoundResponseMessage = ResponseMessageBase & {
77
+ round: IRound;
78
+ };
79
+
80
+ export type ConnectMessageResponse = ResponseMessageBase & {
81
+ votes: IVote[];
82
+ tasks: ITask[];
83
+ users: IUser[];
84
+ currentPeriod: IRound;
85
+ };
86
+
87
+ export type ResetVotesMessageResponse = ResponseMessageBase & {
88
+ votes: IVote[];
89
+ };
90
+
91
+ export type StartRoundMessageResponse = ResponseMessageBase & {
92
+ round?: IRound;
93
+ };
94
+
95
+ export interface GameServerToClientEvents {
96
+ [SpaceEventTypes.CONNECT]: (message: ConnectMessageResponse) => void;
97
+ [SpaceEventTypes.DISCONNECT]: (message: any) => void;
98
+ [SpaceEventTypes.START_ROUND]: (message: StartRoundMessageResponse) => void;
99
+ [SpaceEventTypes.VOTE]: (message: VoteMessageResponse) => void;
100
+ [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageResponse) => void;
101
+ [SpaceEventTypes.RESET_VOTES]: (message: ResetVotesMessageResponse) => void;
102
+ }
103
+
104
+ export interface GameClientToServerEvents {
105
+ [SpaceEventTypes.CONNECT]: (message: any) => void;
106
+ [SpaceEventTypes.START_ROUND]: (message: any) => void;
107
+ [SpaceEventTypes.VOTE]: (message: VoteMessageBody) => void;
108
+ [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageBody) => void;
109
+ [SpaceEventTypes.RESET_VOTES]: (message: any) => void;
110
+ }
package/tsconfig.json CHANGED
@@ -1,10 +1,10 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES6",
4
- "module": "ES6",
5
- "declaration": true,
6
- "outDir": "./dist",
7
- "strict": true
8
- },
9
- "include": ["src/**/*"]
10
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES6",
4
+ "module": "ES6",
5
+ "declaration": true,
6
+ "outDir": "./dist",
7
+ "strict": true
8
+ },
9
+ "include": ["src/**/*"]
10
+ }