@nomalism-com/types 0.45.11 → 0.45.13
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.
|
@@ -6,6 +6,7 @@ export interface IFindByIdRequest {
|
|
|
6
6
|
}
|
|
7
7
|
export interface IRepository {
|
|
8
8
|
create(multipartFormData: any, headers?: any): Promise<Entity>;
|
|
9
|
+
update(id: string, multipartFormData: any, headers?: any): Promise<void>;
|
|
9
10
|
findById(multimedia_id: string): Promise<Entity | null>;
|
|
10
11
|
}
|
|
11
12
|
export interface IController extends Omit<IRepository, 'findById'> {
|
|
@@ -40,17 +40,17 @@ export type ChatSocketEvent = {
|
|
|
40
40
|
} | {
|
|
41
41
|
type: 'pong';
|
|
42
42
|
};
|
|
43
|
-
export interface
|
|
43
|
+
export interface SocketOptions<T> {
|
|
44
44
|
token: string;
|
|
45
|
-
onEvent: (evt:
|
|
45
|
+
onEvent: (evt: T) => void;
|
|
46
46
|
onOpen?: () => void;
|
|
47
47
|
onReconnect?: () => void;
|
|
48
48
|
onClose?: () => void;
|
|
49
49
|
onAuthUnverified?: () => void;
|
|
50
50
|
}
|
|
51
|
-
export interface
|
|
51
|
+
export interface SocketHandle {
|
|
52
52
|
close: () => void;
|
|
53
53
|
}
|
|
54
|
-
export interface IClient {
|
|
55
|
-
|
|
54
|
+
export interface IClient<T> {
|
|
55
|
+
openSocket(data: SocketOptions<T>): SocketHandle;
|
|
56
56
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.45.
|
|
4
|
+
"version": "0.45.13",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|