@webiny/api-websockets 5.40.5 → 5.41.0-dbt.0
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/context/abstractions/IWebsocketsContext.d.ts +2 -2
- package/graphql/utils.d.ts +1 -1
- package/package.json +20 -20
- package/plugins/abstrations/IWebsocketsActionPlugin.d.ts +1 -1
- package/registry/entity.d.ts +5 -5
- package/transport/abstractions/IWebsocketsTransport.d.ts +2 -2
- package/validator/abstractions/IWebsocketsEventValidator.d.ts +1 -1
|
@@ -2,7 +2,7 @@ import { IWebsocketsConnectionRegistry, IWebsocketsConnectionRegistryData } from
|
|
|
2
2
|
import { IWebsocketsTransportSendConnection, IWebsocketsTransportSendData } from "../../transport";
|
|
3
3
|
import { SecurityIdentity } from "@webiny/api-security/types";
|
|
4
4
|
import { GenericRecord } from "@webiny/api/types";
|
|
5
|
-
export
|
|
5
|
+
export type IWebsocketsIdentity = Pick<SecurityIdentity, "id" | "displayName" | "type">;
|
|
6
6
|
export interface IWebsocketsContextListConnectionsParamsWhere {
|
|
7
7
|
identityId?: string;
|
|
8
8
|
tenant?: string;
|
|
@@ -12,7 +12,7 @@ export interface IWebsocketsContextListConnectionsParamsWhere {
|
|
|
12
12
|
export interface IWebsocketsContextListConnectionsParams {
|
|
13
13
|
where?: IWebsocketsContextListConnectionsParamsWhere;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type IWebsocketsContextDisconnectConnectionsParams = IWebsocketsContextListConnectionsParams;
|
|
16
16
|
export interface IWebsocketsContextObject {
|
|
17
17
|
readonly registry: IWebsocketsConnectionRegistry;
|
|
18
18
|
send<T extends GenericRecord = GenericRecord>(identity: Pick<IWebsocketsIdentity, "id">, data: IWebsocketsTransportSendData<T>): Promise<void>;
|
package/graphql/utils.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export declare const emptyResolver: () => {};
|
|
|
3
3
|
interface ResolveCallable<T = any> {
|
|
4
4
|
(): Promise<T>;
|
|
5
5
|
}
|
|
6
|
-
export declare const resolve: <T = any>(fn: ResolveCallable<T>) => Promise<Response<T
|
|
6
|
+
export declare const resolve: <T = any>(fn: ResolveCallable<T>) => Promise<ErrorResponse | Response<T>>;
|
|
7
7
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-websockets",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.41.0-dbt.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@babel/runtime": "7.24.1",
|
|
16
|
-
"@webiny/api": "5.
|
|
17
|
-
"@webiny/api-i18n": "5.
|
|
18
|
-
"@webiny/api-security": "5.
|
|
19
|
-
"@webiny/api-tenancy": "5.
|
|
20
|
-
"@webiny/aws-sdk": "5.
|
|
21
|
-
"@webiny/db-dynamodb": "5.
|
|
22
|
-
"@webiny/error": "5.
|
|
23
|
-
"@webiny/handler": "5.
|
|
24
|
-
"@webiny/handler-aws": "5.
|
|
25
|
-
"@webiny/plugins": "5.
|
|
26
|
-
"@webiny/utils": "5.
|
|
16
|
+
"@webiny/api": "5.41.0-dbt.0",
|
|
17
|
+
"@webiny/api-i18n": "5.41.0-dbt.0",
|
|
18
|
+
"@webiny/api-security": "5.41.0-dbt.0",
|
|
19
|
+
"@webiny/api-tenancy": "5.41.0-dbt.0",
|
|
20
|
+
"@webiny/aws-sdk": "5.41.0-dbt.0",
|
|
21
|
+
"@webiny/db-dynamodb": "5.41.0-dbt.0",
|
|
22
|
+
"@webiny/error": "5.41.0-dbt.0",
|
|
23
|
+
"@webiny/handler": "5.41.0-dbt.0",
|
|
24
|
+
"@webiny/handler-aws": "5.41.0-dbt.0",
|
|
25
|
+
"@webiny/plugins": "5.41.0-dbt.0",
|
|
26
|
+
"@webiny/utils": "5.41.0-dbt.0",
|
|
27
27
|
"type-fest": "2.19.0",
|
|
28
28
|
"zod": "3.22.4"
|
|
29
29
|
},
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"@babel/preset-env": "7.24.3",
|
|
34
34
|
"@babel/preset-typescript": "7.24.1",
|
|
35
35
|
"@types/aws-lambda": "8.10.136",
|
|
36
|
-
"@webiny/api-headless-cms": "5.
|
|
37
|
-
"@webiny/api-wcp": "5.
|
|
38
|
-
"@webiny/cli": "5.
|
|
39
|
-
"@webiny/handler-db": "5.
|
|
40
|
-
"@webiny/handler-graphql": "5.
|
|
41
|
-
"@webiny/project-utils": "5.
|
|
36
|
+
"@webiny/api-headless-cms": "5.41.0-dbt.0",
|
|
37
|
+
"@webiny/api-wcp": "5.41.0-dbt.0",
|
|
38
|
+
"@webiny/cli": "5.41.0-dbt.0",
|
|
39
|
+
"@webiny/handler-db": "5.41.0-dbt.0",
|
|
40
|
+
"@webiny/handler-graphql": "5.41.0-dbt.0",
|
|
41
|
+
"@webiny/project-utils": "5.41.0-dbt.0",
|
|
42
42
|
"aws-lambda": "1.0.7",
|
|
43
43
|
"graphql": "15.8.0",
|
|
44
44
|
"rimraf": "5.0.5",
|
|
45
45
|
"ttypescript": "1.5.15",
|
|
46
|
-
"typescript": "4.
|
|
46
|
+
"typescript": "4.9.5"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"build": "yarn webiny run build",
|
|
54
54
|
"watch": "yarn webiny run watch"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "bbaec4dd1685579548c08bbde386aee5d96b80f8"
|
|
57
57
|
}
|
|
@@ -29,7 +29,7 @@ export interface IWebsocketsActionPluginCallableParams<C extends Context = Conte
|
|
|
29
29
|
send: IWebsocketsActionPluginCallableParamsSend;
|
|
30
30
|
respond: IWebsocketsActionPluginCallableParamsRespond;
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type WebsocketsActionPluginCallableResponse<T extends GenericRecord = GenericRecord> = IWebsocketsActionPluginCallableParamsRespondOkResponse<T> | IWebsocketsActionPluginCallableParamsRespondErrorResponse<T>;
|
|
33
33
|
export interface IWebsocketsActionPluginCallable<T extends GenericRecord = GenericRecord> {
|
|
34
34
|
(params: IWebsocketsActionPluginCallableParams): Promise<WebsocketsActionPluginCallableResponse<T>>;
|
|
35
35
|
}
|
package/registry/entity.d.ts
CHANGED
|
@@ -78,18 +78,18 @@ export declare const createEntity: (documentClient: DynamoDBDocument) => Entity<
|
|
|
78
78
|
data: {
|
|
79
79
|
type: "map";
|
|
80
80
|
};
|
|
81
|
-
}, true, "created", "modified", "entity", false, "created" | "modified" | "entity", "
|
|
81
|
+
}, true, "created", "modified", "entity", false, "created" | "modified" | "entity", "created" | "modified" | "entity" | "TYPE", "PK", never, never, "SK", never, never, "PK" | "SK", "modified", "created" | "entity", "data" | "created" | "modified" | "entity" | "PK" | "SK" | "GSI1_PK" | "GSI1_SK" | "GSI2_PK" | "GSI2_SK" | "TYPE", never>, {
|
|
82
82
|
data?: any;
|
|
83
83
|
GSI1_PK?: string | undefined;
|
|
84
84
|
GSI1_SK?: string | undefined;
|
|
85
85
|
GSI2_PK?: string | undefined;
|
|
86
86
|
GSI2_SK?: string | undefined;
|
|
87
87
|
TYPE?: string | undefined;
|
|
88
|
-
PK: any;
|
|
89
|
-
SK: any;
|
|
90
88
|
created: string;
|
|
91
89
|
modified: string;
|
|
92
90
|
entity: string;
|
|
91
|
+
PK: any;
|
|
92
|
+
SK: any;
|
|
93
93
|
}, {
|
|
94
94
|
data?: any;
|
|
95
95
|
GSI1_PK?: string | undefined;
|
|
@@ -97,11 +97,11 @@ export declare const createEntity: (documentClient: DynamoDBDocument) => Entity<
|
|
|
97
97
|
GSI2_PK?: string | undefined;
|
|
98
98
|
GSI2_SK?: string | undefined;
|
|
99
99
|
TYPE?: string | undefined;
|
|
100
|
-
PK: any;
|
|
101
|
-
SK: any;
|
|
102
100
|
created: string;
|
|
103
101
|
modified: string;
|
|
104
102
|
entity: string;
|
|
103
|
+
PK: any;
|
|
104
|
+
SK: any;
|
|
105
105
|
}, {
|
|
106
106
|
PK: any;
|
|
107
107
|
SK: any;
|
|
@@ -12,8 +12,8 @@ export interface IWebsocketsTransportSendData<T extends GenericRecord> {
|
|
|
12
12
|
data?: T;
|
|
13
13
|
error?: IWebsocketsTransportSendDataError;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
export
|
|
15
|
+
export type IWebsocketsTransportSendConnection = Pick<IWebsocketsConnectionRegistryData, "connectionId" | "domainName" | "stage">;
|
|
16
|
+
export type IWebsocketsTransportDisconnectConnection = Pick<IWebsocketsConnectionRegistryData, "connectionId" | "domainName" | "stage">;
|
|
17
17
|
export interface IWebsocketsTransport {
|
|
18
18
|
send<T extends GenericRecord = GenericRecord>(connections: IWebsocketsTransportSendConnection[], data: IWebsocketsTransportSendData<T>): Promise<void>;
|
|
19
19
|
disconnect(connections: IWebsocketsTransportDisconnectConnection[]): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWebsocketsEvent, IWebsocketsEventData, IWebsocketsIncomingEvent } from "../../handler/types";
|
|
2
|
-
export
|
|
2
|
+
export type IWebsocketsEventValidatorValidateParams = IWebsocketsIncomingEvent;
|
|
3
3
|
export interface IWebsocketsEventValidator {
|
|
4
4
|
/**
|
|
5
5
|
* @throws {Error}
|