cleanstrategytypes 1.0.7 → 1.0.9
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/bundle.esm.js.map +1 -1
- package/dist/index.d.ts +14 -7
- package/package.json +1 -1
- package/src/index.ts +19 -8
package/dist/bundle.esm.js.map
CHANGED
|
@@ -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 interface ICurrentUser {\r\n id: string;\r\n displayName: string;\r\n email: string;\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 IPeriod {\r\n id: string;\r\n order: number;\r\n spaceId: string;\r\n startDate: string;\r\n endDate: string;\r\n}\r\n\r\nexport enum SpaceEventTypes {\r\n CONNECT = \"CONNECT\",\r\n DISCONNECT = \"DISCONNECT\",\r\n START_PERIOD = \"START_PERIOD\",\r\n END_PERIOD = \"END_PERIOD\",\r\n VOTE = \"VOTE\",\r\n DELETE_VOTE = \"DELETE_VOTE\",\r\n}\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
|
|
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 interface ICurrentUser {\r\n id: string;\r\n displayName: string;\r\n email: string;\r\n tenants: string[];\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 IPeriod {\r\n id: string;\r\n order: number;\r\n spaceId: string;\r\n startDate: string;\r\n endDate: string;\r\n}\r\n\r\nexport enum SpaceEventTypes {\r\n CONNECT = \"CONNECT\",\r\n DISCONNECT = \"DISCONNECT\",\r\n START_PERIOD = \"START_PERIOD\",\r\n END_PERIOD = \"END_PERIOD\",\r\n VOTE = \"VOTE\",\r\n DELETE_VOTE = \"DELETE_VOTE\",\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\n\r\nexport type VoteMessageResponse = {\r\n vote: IVote;\r\n};\r\nexport type VoteDeleteMessageResponse = {\r\n voteId: string;\r\n};\r\nexport type ConnectMessageResponse = {\r\n votes: IVote[];\r\n tasks: ITask[];\r\n users: IUser[];\r\n currentPeriod: IPeriod;\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.END_PERIOD]: (message: any) => void;\r\n [SpaceEventTypes.START_PERIOD]: (message: any) => void;\r\n [SpaceEventTypes.VOTE]: (message: VoteMessageResponse) => void;\r\n [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageResponse) => void;\r\n}\r\n\r\nexport interface GameClientToServerEvents {\r\n [SpaceEventTypes.CONNECT]: (message: any) => void;\r\n [SpaceEventTypes.START_PERIOD]: (message: any) => void;\r\n [SpaceEventTypes.VOTE]: (message: VoteMessageBody) => void;\r\n [SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageBody) => void;\r\n [SpaceEventTypes.END_PERIOD]: (message: any) => void;\r\n [SpaceEventTypes.START_PERIOD]: (message: any) => void;\r\n}\r\n"],"names":[],"mappings":"IAmCY,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,cAAA,CAAA,GAAA,cAA6B,CAAA;AAC7B,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;AAC7B,CAAC,EAPW,eAAe,KAAf,eAAe,GAO1B,EAAA,CAAA,CAAA;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface ICurrentUser {
|
|
|
14
14
|
id: string;
|
|
15
15
|
displayName: string;
|
|
16
16
|
email: string;
|
|
17
|
+
tenants: string[];
|
|
17
18
|
}
|
|
18
19
|
export interface IUser {
|
|
19
20
|
id: string;
|
|
@@ -40,22 +41,28 @@ export type VoteMessageBody = {
|
|
|
40
41
|
taskId: string;
|
|
41
42
|
currentUserId: string;
|
|
42
43
|
};
|
|
43
|
-
export type
|
|
44
|
+
export type VoteDeleteMessageBody = {
|
|
45
|
+
voteId: string;
|
|
46
|
+
};
|
|
47
|
+
export type VoteMessageResponse = {
|
|
48
|
+
vote: IVote;
|
|
49
|
+
};
|
|
50
|
+
export type VoteDeleteMessageResponse = {
|
|
51
|
+
voteId: string;
|
|
52
|
+
};
|
|
53
|
+
export type ConnectMessageResponse = {
|
|
44
54
|
votes: IVote[];
|
|
45
55
|
tasks: ITask[];
|
|
46
56
|
users: IUser[];
|
|
47
57
|
currentPeriod: IPeriod;
|
|
48
58
|
};
|
|
49
|
-
export type VoteDeleteMessageBody = {
|
|
50
|
-
voteId: string;
|
|
51
|
-
};
|
|
52
59
|
export interface GameServerToClientEvents {
|
|
53
|
-
[SpaceEventTypes.CONNECT]: (message:
|
|
60
|
+
[SpaceEventTypes.CONNECT]: (message: ConnectMessageResponse) => void;
|
|
54
61
|
[SpaceEventTypes.DISCONNECT]: (message: any) => void;
|
|
55
62
|
[SpaceEventTypes.END_PERIOD]: (message: any) => void;
|
|
56
63
|
[SpaceEventTypes.START_PERIOD]: (message: any) => void;
|
|
57
|
-
[SpaceEventTypes.VOTE]: (message:
|
|
58
|
-
[SpaceEventTypes.DELETE_VOTE]: (message:
|
|
64
|
+
[SpaceEventTypes.VOTE]: (message: VoteMessageResponse) => void;
|
|
65
|
+
[SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageResponse) => void;
|
|
59
66
|
}
|
|
60
67
|
export interface GameClientToServerEvents {
|
|
61
68
|
[SpaceEventTypes.CONNECT]: (message: any) => void;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface ICurrentUser {
|
|
|
16
16
|
id: string;
|
|
17
17
|
displayName: string;
|
|
18
18
|
email: string;
|
|
19
|
+
tenants: string[];
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export interface IUser {
|
|
@@ -41,30 +42,40 @@ export enum SpaceEventTypes {
|
|
|
41
42
|
DELETE_VOTE = "DELETE_VOTE",
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
// RequestMessage
|
|
46
|
+
|
|
44
47
|
export type VoteMessageBody = {
|
|
45
48
|
type: "minus" | "plus";
|
|
46
49
|
taskId: string;
|
|
47
50
|
currentUserId: string;
|
|
48
51
|
};
|
|
49
52
|
|
|
50
|
-
export type
|
|
53
|
+
export type VoteDeleteMessageBody = {
|
|
54
|
+
voteId: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// ResponseMessage
|
|
58
|
+
|
|
59
|
+
export type VoteMessageResponse = {
|
|
60
|
+
vote: IVote;
|
|
61
|
+
};
|
|
62
|
+
export type VoteDeleteMessageResponse = {
|
|
63
|
+
voteId: string;
|
|
64
|
+
};
|
|
65
|
+
export type ConnectMessageResponse = {
|
|
51
66
|
votes: IVote[];
|
|
52
67
|
tasks: ITask[];
|
|
53
68
|
users: IUser[];
|
|
54
69
|
currentPeriod: IPeriod;
|
|
55
70
|
};
|
|
56
71
|
|
|
57
|
-
export type VoteDeleteMessageBody = {
|
|
58
|
-
voteId: string;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
72
|
export interface GameServerToClientEvents {
|
|
62
|
-
[SpaceEventTypes.CONNECT]: (message:
|
|
73
|
+
[SpaceEventTypes.CONNECT]: (message: ConnectMessageResponse) => void;
|
|
63
74
|
[SpaceEventTypes.DISCONNECT]: (message: any) => void;
|
|
64
75
|
[SpaceEventTypes.END_PERIOD]: (message: any) => void;
|
|
65
76
|
[SpaceEventTypes.START_PERIOD]: (message: any) => void;
|
|
66
|
-
[SpaceEventTypes.VOTE]: (message:
|
|
67
|
-
[SpaceEventTypes.DELETE_VOTE]: (message:
|
|
77
|
+
[SpaceEventTypes.VOTE]: (message: VoteMessageResponse) => void;
|
|
78
|
+
[SpaceEventTypes.DELETE_VOTE]: (message: VoteDeleteMessageResponse) => void;
|
|
68
79
|
}
|
|
69
80
|
|
|
70
81
|
export interface GameClientToServerEvents {
|