@conduitplatform/grpc-sdk 0.16.15 → 0.16.17
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 +140 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +140 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/interfaces/Route.d.ts +2 -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 +1 -0
- package/dist/protoUtils/router.d.ts +16 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { allowedTypes, ConduitModel, TYPE } from './Model.js';
|
|
2
2
|
import { Indexable } from './Indexable.js';
|
|
3
|
+
import { ModuleErrorDefinition } from '@conduitplatform/module-tools';
|
|
3
4
|
export interface ConduitRouteParameters {
|
|
4
5
|
params?: Indexable;
|
|
5
6
|
path?: string;
|
|
@@ -52,6 +53,7 @@ export interface ConduitRouteOptions {
|
|
|
52
53
|
description?: string;
|
|
53
54
|
middlewares?: string[];
|
|
54
55
|
cacheControl?: string;
|
|
56
|
+
errors?: ModuleErrorDefinition[];
|
|
55
57
|
}
|
|
56
58
|
export interface ConduitRouteObject {
|
|
57
59
|
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,11 +1,12 @@
|
|
|
1
1
|
import { ConduitModule } from '../../classes/index.js';
|
|
2
2
|
import { AuthenticationDefinition, TeamDeleteResponse, UserCreateResponse, UserDeleteResponse, UserLoginResponse, Team, ValidateAccessTokenResponse, UserModifyStatusResponse, InvitationDeleteResponse } from '../../protoUtils/index.js';
|
|
3
|
+
import { Indexable } from '../../interfaces';
|
|
3
4
|
export declare class Authentication extends ConduitModule<typeof AuthenticationDefinition> {
|
|
4
5
|
private readonly moduleName;
|
|
5
6
|
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
6
7
|
userLogin(userId: string, clientId: string): Promise<UserLoginResponse>;
|
|
7
8
|
userDelete(userId: string): Promise<UserDeleteResponse>;
|
|
8
|
-
userCreate(email: string, verify?: boolean, password?: string, anonymousId?: string): Promise<UserCreateResponse>;
|
|
9
|
+
userCreate(email: string, verify?: boolean, password?: string, anonymousId?: string, userData?: Indexable): Promise<UserCreateResponse>;
|
|
9
10
|
userCreateByUsername(username: string, password?: string, anonymousId?: string): Promise<UserCreateResponse>;
|
|
10
11
|
anonymousUserCreate(clientId: string): Promise<UserLoginResponse>;
|
|
11
12
|
changePass(email: string, password?: string): Promise<UserCreateResponse>;
|
|
@@ -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;
|