@conduitplatform/grpc-sdk 0.16.16 → 0.16.18
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/index.cjs +347 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +345 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/interfaces/Route.d.ts +7 -0
- package/dist/interfaces/Socket.d.ts +0 -6
- package/dist/interfaces/types.d.ts +2 -1
- package/dist/modules/authentication/index.d.ts +2 -1
- package/dist/protoUtils/authentication.d.ts +49 -0
- package/dist/protoUtils/email.d.ts +1 -0
- package/dist/protoUtils/google/protobuf/empty.d.ts +0 -2
- package/dist/protoUtils/router.d.ts +16 -1
- package/dist/protoUtils/storage.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { allowedTypes, ConduitModel, TYPE } from './Model.js';
|
|
2
2
|
import { Indexable } from './Indexable.js';
|
|
3
|
+
export interface ModuleErrorDefinition {
|
|
4
|
+
grpcCode: number;
|
|
5
|
+
conduitCode: string;
|
|
6
|
+
message: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
3
9
|
export interface ConduitRouteParameters {
|
|
4
10
|
params?: Indexable;
|
|
5
11
|
path?: string;
|
|
@@ -52,6 +58,7 @@ export interface ConduitRouteOptions {
|
|
|
52
58
|
description?: string;
|
|
53
59
|
middlewares?: string[];
|
|
54
60
|
cacheControl?: string;
|
|
61
|
+
errors?: ModuleErrorDefinition[];
|
|
55
62
|
}
|
|
56
63
|
export interface ConduitRouteObject {
|
|
57
64
|
options: ConduitRouteOptions;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ConduitRouteReturnDefinition } from './ConduitRouteReturn.js';
|
|
2
1
|
import { TYPE } from './Model.js';
|
|
3
2
|
export type ConduitSocketParamTypes = (TYPE | ConduitSocketParamTypes)[];
|
|
4
3
|
export interface ConduitSocketOptions {
|
|
@@ -7,11 +6,6 @@ export interface ConduitSocketOptions {
|
|
|
7
6
|
description?: string;
|
|
8
7
|
middlewares?: string[];
|
|
9
8
|
}
|
|
10
|
-
export interface ConduitSocketEventHandler {
|
|
11
|
-
params?: ConduitSocketParamTypes;
|
|
12
|
-
returnType?: ConduitRouteReturnDefinition;
|
|
13
|
-
handler: any;
|
|
14
|
-
}
|
|
15
9
|
export interface EventsProtoDescription {
|
|
16
10
|
[name: string]: {
|
|
17
11
|
grpcFunction: string;
|
|
@@ -21,7 +21,7 @@ export type UnparsedRouterResponse = {
|
|
|
21
21
|
export type ParsedSocketRequest = GrpcRequest<{
|
|
22
22
|
event: string;
|
|
23
23
|
socketId: string;
|
|
24
|
-
params: string[];
|
|
24
|
+
params: (string | Indexable)[];
|
|
25
25
|
context: Context;
|
|
26
26
|
cookies: Cookies;
|
|
27
27
|
}>;
|
|
@@ -29,6 +29,7 @@ type EventResponse = {
|
|
|
29
29
|
event: string;
|
|
30
30
|
data: Indexable;
|
|
31
31
|
receivers?: string[];
|
|
32
|
+
rooms?: string[];
|
|
32
33
|
};
|
|
33
34
|
export type UnparsedSocketResponse = EventResponse | JoinRoomResponse;
|
|
34
35
|
type JoinRoomResponse = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
-
import { AuthenticationDefinition, TeamDeleteResponse, UserCreateResponse, UserDeleteResponse, UserLoginResponse, Team, ValidateAccessTokenResponse, UserModifyStatusResponse, InvitationDeleteResponse } from '../../protoUtils/index.js';
|
|
2
|
+
import { AuthenticationDefinition, TeamDeleteResponse, UserCreateResponse, UserDeleteResponse, UserLoginResponse, Team, ValidateAccessTokenResponse, UserModifyStatusResponse, InvitationDeleteResponse, InviteUserToTeamResponse } from '../../protoUtils/index.js';
|
|
3
3
|
import { Indexable } from '../../interfaces';
|
|
4
4
|
export declare class Authentication extends ConduitModule<typeof AuthenticationDefinition> {
|
|
5
5
|
private readonly moduleName;
|
|
@@ -18,4 +18,5 @@ export declare class Authentication extends ConduitModule<typeof AuthenticationD
|
|
|
18
18
|
validateAccessToken(accessToken: string, path?: string): Promise<ValidateAccessTokenResponse>;
|
|
19
19
|
userModifyStatus(userId: string, active: boolean): Promise<UserModifyStatusResponse>;
|
|
20
20
|
invitationDelete(teamId: string, email: string): Promise<InvitationDeleteResponse>;
|
|
21
|
+
inviteUserToTeam(teamId: string, email: string, role: string, inviterUserId: string, redirectUri?: string, userData?: Indexable): Promise<InviteUserToTeamResponse>;
|
|
21
22
|
}
|
|
@@ -91,6 +91,17 @@ export interface InvitationDeleteRequest {
|
|
|
91
91
|
export interface InvitationDeleteResponse {
|
|
92
92
|
message: string;
|
|
93
93
|
}
|
|
94
|
+
export interface InviteUserToTeamRequest {
|
|
95
|
+
teamId: string;
|
|
96
|
+
email: string;
|
|
97
|
+
role: string;
|
|
98
|
+
inviterUserId: string;
|
|
99
|
+
redirectUri?: string | undefined;
|
|
100
|
+
userData?: string | undefined;
|
|
101
|
+
}
|
|
102
|
+
export interface InviteUserToTeamResponse {
|
|
103
|
+
invitationToken: string;
|
|
104
|
+
}
|
|
94
105
|
export declare const UserLoginRequest: {
|
|
95
106
|
encode(message: UserLoginRequest, writer?: _m0.Writer): _m0.Writer;
|
|
96
107
|
decode(input: _m0.Reader | Uint8Array, length?: number): UserLoginRequest;
|
|
@@ -259,6 +270,22 @@ export declare const InvitationDeleteResponse: {
|
|
|
259
270
|
create(base?: DeepPartial<InvitationDeleteResponse>): InvitationDeleteResponse;
|
|
260
271
|
fromPartial(object: DeepPartial<InvitationDeleteResponse>): InvitationDeleteResponse;
|
|
261
272
|
};
|
|
273
|
+
export declare const InviteUserToTeamRequest: {
|
|
274
|
+
encode(message: InviteUserToTeamRequest, writer?: _m0.Writer): _m0.Writer;
|
|
275
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): InviteUserToTeamRequest;
|
|
276
|
+
fromJSON(object: any): InviteUserToTeamRequest;
|
|
277
|
+
toJSON(message: InviteUserToTeamRequest): unknown;
|
|
278
|
+
create(base?: DeepPartial<InviteUserToTeamRequest>): InviteUserToTeamRequest;
|
|
279
|
+
fromPartial(object: DeepPartial<InviteUserToTeamRequest>): InviteUserToTeamRequest;
|
|
280
|
+
};
|
|
281
|
+
export declare const InviteUserToTeamResponse: {
|
|
282
|
+
encode(message: InviteUserToTeamResponse, writer?: _m0.Writer): _m0.Writer;
|
|
283
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): InviteUserToTeamResponse;
|
|
284
|
+
fromJSON(object: any): InviteUserToTeamResponse;
|
|
285
|
+
toJSON(message: InviteUserToTeamResponse): unknown;
|
|
286
|
+
create(base?: DeepPartial<InviteUserToTeamResponse>): InviteUserToTeamResponse;
|
|
287
|
+
fromPartial(object: DeepPartial<InviteUserToTeamResponse>): InviteUserToTeamResponse;
|
|
288
|
+
};
|
|
262
289
|
export type AuthenticationDefinition = typeof AuthenticationDefinition;
|
|
263
290
|
export declare const AuthenticationDefinition: {
|
|
264
291
|
readonly name: "Authentication";
|
|
@@ -572,6 +599,28 @@ export declare const AuthenticationDefinition: {
|
|
|
572
599
|
readonly responseStream: false;
|
|
573
600
|
readonly options: {};
|
|
574
601
|
};
|
|
602
|
+
readonly inviteUserToTeam: {
|
|
603
|
+
readonly name: "InviteUserToTeam";
|
|
604
|
+
readonly requestType: {
|
|
605
|
+
encode(message: InviteUserToTeamRequest, writer?: _m0.Writer): _m0.Writer;
|
|
606
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): InviteUserToTeamRequest;
|
|
607
|
+
fromJSON(object: any): InviteUserToTeamRequest;
|
|
608
|
+
toJSON(message: InviteUserToTeamRequest): unknown;
|
|
609
|
+
create(base?: DeepPartial<InviteUserToTeamRequest>): InviteUserToTeamRequest;
|
|
610
|
+
fromPartial(object: DeepPartial<InviteUserToTeamRequest>): InviteUserToTeamRequest;
|
|
611
|
+
};
|
|
612
|
+
readonly requestStream: false;
|
|
613
|
+
readonly responseType: {
|
|
614
|
+
encode(message: InviteUserToTeamResponse, writer?: _m0.Writer): _m0.Writer;
|
|
615
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): InviteUserToTeamResponse;
|
|
616
|
+
fromJSON(object: any): InviteUserToTeamResponse;
|
|
617
|
+
toJSON(message: InviteUserToTeamResponse): unknown;
|
|
618
|
+
create(base?: DeepPartial<InviteUserToTeamResponse>): InviteUserToTeamResponse;
|
|
619
|
+
fromPartial(object: DeepPartial<InviteUserToTeamResponse>): InviteUserToTeamResponse;
|
|
620
|
+
};
|
|
621
|
+
readonly responseStream: false;
|
|
622
|
+
readonly options: {};
|
|
623
|
+
};
|
|
575
624
|
};
|
|
576
625
|
};
|
|
577
626
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -2,7 +2,7 @@ import _m0 from "protobufjs/minimal.js";
|
|
|
2
2
|
import { Empty } from "./google/protobuf/empty.js";
|
|
3
3
|
export interface SocketData {
|
|
4
4
|
event: string;
|
|
5
|
-
data
|
|
5
|
+
data?: string | undefined;
|
|
6
6
|
receivers: string[];
|
|
7
7
|
rooms: string[];
|
|
8
8
|
}
|
|
@@ -23,6 +23,12 @@ export interface RegisterConduitRouteRequest_PathDefinition {
|
|
|
23
23
|
events?: string | undefined;
|
|
24
24
|
proxy?: RegisterConduitRouteRequest_ProxyRouteOptions | undefined;
|
|
25
25
|
}
|
|
26
|
+
export interface RegisterConduitRouteRequest_ErrorDefinition {
|
|
27
|
+
conduitCode: string;
|
|
28
|
+
grpcCode: number;
|
|
29
|
+
message: string;
|
|
30
|
+
description: string;
|
|
31
|
+
}
|
|
26
32
|
export interface RegisterConduitRouteRequest_ConduitRouteOptions {
|
|
27
33
|
queryParams?: string | undefined;
|
|
28
34
|
bodyParams?: string | undefined;
|
|
@@ -33,6 +39,7 @@ export interface RegisterConduitRouteRequest_ConduitRouteOptions {
|
|
|
33
39
|
description?: string | undefined;
|
|
34
40
|
middlewares: string[];
|
|
35
41
|
cacheControl?: string | undefined;
|
|
42
|
+
errors: RegisterConduitRouteRequest_ErrorDefinition[];
|
|
36
43
|
}
|
|
37
44
|
export interface RegisterConduitRouteRequest_ProxyRouteOptions {
|
|
38
45
|
target?: string | undefined;
|
|
@@ -86,6 +93,14 @@ export declare const RegisterConduitRouteRequest_PathDefinition: {
|
|
|
86
93
|
create(base?: DeepPartial<RegisterConduitRouteRequest_PathDefinition>): RegisterConduitRouteRequest_PathDefinition;
|
|
87
94
|
fromPartial(object: DeepPartial<RegisterConduitRouteRequest_PathDefinition>): RegisterConduitRouteRequest_PathDefinition;
|
|
88
95
|
};
|
|
96
|
+
export declare const RegisterConduitRouteRequest_ErrorDefinition: {
|
|
97
|
+
encode(message: RegisterConduitRouteRequest_ErrorDefinition, writer?: _m0.Writer): _m0.Writer;
|
|
98
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RegisterConduitRouteRequest_ErrorDefinition;
|
|
99
|
+
fromJSON(object: any): RegisterConduitRouteRequest_ErrorDefinition;
|
|
100
|
+
toJSON(message: RegisterConduitRouteRequest_ErrorDefinition): unknown;
|
|
101
|
+
create(base?: DeepPartial<RegisterConduitRouteRequest_ErrorDefinition>): RegisterConduitRouteRequest_ErrorDefinition;
|
|
102
|
+
fromPartial(object: DeepPartial<RegisterConduitRouteRequest_ErrorDefinition>): RegisterConduitRouteRequest_ErrorDefinition;
|
|
103
|
+
};
|
|
89
104
|
export declare const RegisterConduitRouteRequest_ConduitRouteOptions: {
|
|
90
105
|
encode(message: RegisterConduitRouteRequest_ConduitRouteOptions, writer?: _m0.Writer): _m0.Writer;
|
|
91
106
|
decode(input: _m0.Reader | Uint8Array, length?: number): RegisterConduitRouteRequest_ConduitRouteOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduitplatform/grpc-sdk",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.18",
|
|
4
4
|
"main": "dist/index.cjs",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"abort-controller-x": "^0.4.3",
|
|
37
37
|
"convict": "^6.2.4",
|
|
38
38
|
"express": "^4.21.1",
|
|
39
|
-
"fast-jwt": "^
|
|
39
|
+
"fast-jwt": "^6.0.2",
|
|
40
40
|
"fs-extra": "^11.2.0",
|
|
41
41
|
"ioredis": "^5.3.2",
|
|
42
42
|
"lodash": "^4.17.21",
|