cleanstrategytypes 1.1.35 → 1.1.37
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 +1 -0
- package/package.json +1 -1
- package/src/index.ts +3 -2
package/dist/bundle.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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 spaceId: string;\n createdAt: Date;\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}\n\nexport interface IRound {\n id: string;\n order: number;\n spaceId: string;\n endDate: Date;\n status?: \"finished\" | \"active\";\n}\n\nexport interface IStats extends Record<string, Record<string, number>> {}\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};\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[]
|
|
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 spaceId: string;\n createdAt: Date;\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}\n\nexport interface IRound {\n id: string;\n order: number;\n spaceId: string;\n endDate: Date;\n status?: \"finished\" | \"active\";\n}\n\nexport interface IStats extends Record<string, Record<string, number>> { }\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};\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[]; // These are actually players (IUser type for compatibility)\n currentPeriod: IRound;\n stats: IStats;\n categories?: any[]; // Optional categories\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":"IA6CY,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
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface IRound {
|
|
|
41
41
|
status?: "finished" | "active";
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
export interface IStats extends Record<string, Record<string, number>> {}
|
|
44
|
+
export interface IStats extends Record<string, Record<string, number>> { }
|
|
45
45
|
|
|
46
46
|
export enum SpaceEventTypes {
|
|
47
47
|
CONNECT = "CONNECT",
|
|
@@ -84,9 +84,10 @@ export type StartRoundResponseMessage = ResponseMessageBase & {
|
|
|
84
84
|
export type ConnectMessageResponse = ResponseMessageBase & {
|
|
85
85
|
votes: IVote[];
|
|
86
86
|
tasks: ITask[];
|
|
87
|
-
users: IUser[];
|
|
87
|
+
users: IUser[]; // These are actually players (IUser type for compatibility)
|
|
88
88
|
currentPeriod: IRound;
|
|
89
89
|
stats: IStats;
|
|
90
|
+
categories?: any[]; // Optional categories
|
|
90
91
|
};
|
|
91
92
|
|
|
92
93
|
export type ResetVotesMessageResponse = ResponseMessageBase & {
|