geniebox-shared-lib 2.5.4 → 2.5.6
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/auth.interface.d.ts +22 -0
- package/dist/auth.interface.js +112 -1
- package/dist/event.interface.d.ts +42 -1
- package/dist/event.interface.js +169 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -5
- package/dist/user.interface.d.ts +46 -0
- package/dist/user.interface.js +220 -1
- package/package.json +1 -1
package/dist/auth.interface.d.ts
CHANGED
|
@@ -68,6 +68,15 @@ export interface VerifyResetCodeRequest {
|
|
|
68
68
|
email: string;
|
|
69
69
|
code: string;
|
|
70
70
|
}
|
|
71
|
+
export interface LoginWithOAuthRequest {
|
|
72
|
+
provider: string;
|
|
73
|
+
providerUserId: string;
|
|
74
|
+
email: string;
|
|
75
|
+
emailVerified: boolean;
|
|
76
|
+
firstName: string;
|
|
77
|
+
lastName: string;
|
|
78
|
+
photoUrl: string;
|
|
79
|
+
}
|
|
71
80
|
export interface AuthResponse {
|
|
72
81
|
userId: string;
|
|
73
82
|
sessionId: string;
|
|
@@ -100,6 +109,7 @@ export declare const CheckEmailVerifiedRequest: MessageFns<CheckEmailVerifiedReq
|
|
|
100
109
|
export declare const GetByIdRequest: MessageFns<GetByIdRequest>;
|
|
101
110
|
export declare const ResendConfirmationCodeRequest: MessageFns<ResendConfirmationCodeRequest>;
|
|
102
111
|
export declare const VerifyResetCodeRequest: MessageFns<VerifyResetCodeRequest>;
|
|
112
|
+
export declare const LoginWithOAuthRequest: MessageFns<LoginWithOAuthRequest>;
|
|
103
113
|
export declare const AuthResponse: MessageFns<AuthResponse>;
|
|
104
114
|
export declare const RefreshTokenResponse: MessageFns<RefreshTokenResponse>;
|
|
105
115
|
export declare const ConfirmEmailResponse: MessageFns<ConfirmEmailResponse>;
|
|
@@ -107,6 +117,7 @@ export declare const CheckEmailVerifiedResponse: MessageFns<CheckEmailVerifiedRe
|
|
|
107
117
|
export interface AuthServiceClient {
|
|
108
118
|
profile(request: GetByIdRequest, metadata?: Metadata): Observable<UserResponse>;
|
|
109
119
|
login(request: LoginCredentials, metadata?: Metadata): Observable<AuthResponse>;
|
|
120
|
+
loginWithOAuth(request: LoginWithOAuthRequest, metadata?: Metadata): Observable<AuthResponse>;
|
|
110
121
|
register(request: RegisterCredentials, metadata?: Metadata): Observable<AuthResponse>;
|
|
111
122
|
refresh(request: RefreshRequest, metadata?: Metadata): Observable<AuthResponse>;
|
|
112
123
|
logout(request: LogoutRequest, metadata?: Metadata): Observable<Empty>;
|
|
@@ -121,6 +132,7 @@ export interface AuthServiceClient {
|
|
|
121
132
|
export interface AuthServiceController {
|
|
122
133
|
profile(request: GetByIdRequest, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
|
|
123
134
|
login(request: LoginCredentials, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
|
|
135
|
+
loginWithOAuth(request: LoginWithOAuthRequest, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
|
|
124
136
|
register(request: RegisterCredentials, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
|
|
125
137
|
refresh(request: RefreshRequest, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
|
|
126
138
|
logout(request: LogoutRequest, metadata?: Metadata): void;
|
|
@@ -154,6 +166,15 @@ export declare const AuthServiceService: {
|
|
|
154
166
|
readonly responseSerialize: (value: AuthResponse) => Buffer;
|
|
155
167
|
readonly responseDeserialize: (value: Buffer) => AuthResponse;
|
|
156
168
|
};
|
|
169
|
+
readonly loginWithOAuth: {
|
|
170
|
+
readonly path: "/auth.AuthService/loginWithOAuth";
|
|
171
|
+
readonly requestStream: false;
|
|
172
|
+
readonly responseStream: false;
|
|
173
|
+
readonly requestSerialize: (value: LoginWithOAuthRequest) => Buffer;
|
|
174
|
+
readonly requestDeserialize: (value: Buffer) => LoginWithOAuthRequest;
|
|
175
|
+
readonly responseSerialize: (value: AuthResponse) => Buffer;
|
|
176
|
+
readonly responseDeserialize: (value: Buffer) => AuthResponse;
|
|
177
|
+
};
|
|
157
178
|
readonly register: {
|
|
158
179
|
readonly path: "/auth.AuthService/register";
|
|
159
180
|
readonly requestStream: false;
|
|
@@ -248,6 +269,7 @@ export declare const AuthServiceService: {
|
|
|
248
269
|
export interface AuthServiceServer extends UntypedServiceImplementation {
|
|
249
270
|
profile: handleUnaryCall<GetByIdRequest, UserResponse>;
|
|
250
271
|
login: handleUnaryCall<LoginCredentials, AuthResponse>;
|
|
272
|
+
loginWithOAuth: handleUnaryCall<LoginWithOAuthRequest, AuthResponse>;
|
|
251
273
|
register: handleUnaryCall<RegisterCredentials, AuthResponse>;
|
|
252
274
|
refresh: handleUnaryCall<RefreshRequest, AuthResponse>;
|
|
253
275
|
logout: handleUnaryCall<LogoutRequest, Empty>;
|
package/dist/auth.interface.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: auth.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.CheckEmailVerifiedResponse = exports.ConfirmEmailResponse = exports.RefreshTokenResponse = exports.AuthResponse = exports.VerifyResetCodeRequest = exports.ResendConfirmationCodeRequest = exports.GetByIdRequest = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.RefreshRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.LogoutRequest = exports.LoginCredentials = exports.RegisterCredentials = exports.UserResponse = exports.Tokens = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.CheckEmailVerifiedResponse = exports.ConfirmEmailResponse = exports.RefreshTokenResponse = exports.AuthResponse = exports.LoginWithOAuthRequest = exports.VerifyResetCodeRequest = exports.ResendConfirmationCodeRequest = exports.GetByIdRequest = exports.CheckEmailVerifiedRequest = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.RefreshRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.LogoutRequest = exports.LoginCredentials = exports.RegisterCredentials = exports.UserResponse = exports.Tokens = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
@@ -705,6 +705,107 @@ exports.VerifyResetCodeRequest = {
|
|
|
705
705
|
return message;
|
|
706
706
|
},
|
|
707
707
|
};
|
|
708
|
+
function createBaseLoginWithOAuthRequest() {
|
|
709
|
+
return {
|
|
710
|
+
provider: "",
|
|
711
|
+
providerUserId: "",
|
|
712
|
+
email: "",
|
|
713
|
+
emailVerified: false,
|
|
714
|
+
firstName: "",
|
|
715
|
+
lastName: "",
|
|
716
|
+
photoUrl: "",
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
exports.LoginWithOAuthRequest = {
|
|
720
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
721
|
+
if (message.provider !== "") {
|
|
722
|
+
writer.uint32(10).string(message.provider);
|
|
723
|
+
}
|
|
724
|
+
if (message.providerUserId !== "") {
|
|
725
|
+
writer.uint32(18).string(message.providerUserId);
|
|
726
|
+
}
|
|
727
|
+
if (message.email !== "") {
|
|
728
|
+
writer.uint32(26).string(message.email);
|
|
729
|
+
}
|
|
730
|
+
if (message.emailVerified !== false) {
|
|
731
|
+
writer.uint32(32).bool(message.emailVerified);
|
|
732
|
+
}
|
|
733
|
+
if (message.firstName !== "") {
|
|
734
|
+
writer.uint32(42).string(message.firstName);
|
|
735
|
+
}
|
|
736
|
+
if (message.lastName !== "") {
|
|
737
|
+
writer.uint32(50).string(message.lastName);
|
|
738
|
+
}
|
|
739
|
+
if (message.photoUrl !== "") {
|
|
740
|
+
writer.uint32(58).string(message.photoUrl);
|
|
741
|
+
}
|
|
742
|
+
return writer;
|
|
743
|
+
},
|
|
744
|
+
decode(input, length) {
|
|
745
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
746
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
747
|
+
const message = createBaseLoginWithOAuthRequest();
|
|
748
|
+
while (reader.pos < end) {
|
|
749
|
+
const tag = reader.uint32();
|
|
750
|
+
switch (tag >>> 3) {
|
|
751
|
+
case 1: {
|
|
752
|
+
if (tag !== 10) {
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
message.provider = reader.string();
|
|
756
|
+
continue;
|
|
757
|
+
}
|
|
758
|
+
case 2: {
|
|
759
|
+
if (tag !== 18) {
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
762
|
+
message.providerUserId = reader.string();
|
|
763
|
+
continue;
|
|
764
|
+
}
|
|
765
|
+
case 3: {
|
|
766
|
+
if (tag !== 26) {
|
|
767
|
+
break;
|
|
768
|
+
}
|
|
769
|
+
message.email = reader.string();
|
|
770
|
+
continue;
|
|
771
|
+
}
|
|
772
|
+
case 4: {
|
|
773
|
+
if (tag !== 32) {
|
|
774
|
+
break;
|
|
775
|
+
}
|
|
776
|
+
message.emailVerified = reader.bool();
|
|
777
|
+
continue;
|
|
778
|
+
}
|
|
779
|
+
case 5: {
|
|
780
|
+
if (tag !== 42) {
|
|
781
|
+
break;
|
|
782
|
+
}
|
|
783
|
+
message.firstName = reader.string();
|
|
784
|
+
continue;
|
|
785
|
+
}
|
|
786
|
+
case 6: {
|
|
787
|
+
if (tag !== 50) {
|
|
788
|
+
break;
|
|
789
|
+
}
|
|
790
|
+
message.lastName = reader.string();
|
|
791
|
+
continue;
|
|
792
|
+
}
|
|
793
|
+
case 7: {
|
|
794
|
+
if (tag !== 58) {
|
|
795
|
+
break;
|
|
796
|
+
}
|
|
797
|
+
message.photoUrl = reader.string();
|
|
798
|
+
continue;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
802
|
+
break;
|
|
803
|
+
}
|
|
804
|
+
reader.skip(tag & 7);
|
|
805
|
+
}
|
|
806
|
+
return message;
|
|
807
|
+
},
|
|
808
|
+
};
|
|
708
809
|
function createBaseAuthResponse() {
|
|
709
810
|
return { userId: "", sessionId: "" };
|
|
710
811
|
}
|
|
@@ -892,6 +993,7 @@ function AuthServiceControllerMethods() {
|
|
|
892
993
|
const grpcMethods = [
|
|
893
994
|
"profile",
|
|
894
995
|
"login",
|
|
996
|
+
"loginWithOAuth",
|
|
895
997
|
"register",
|
|
896
998
|
"refresh",
|
|
897
999
|
"logout",
|
|
@@ -934,6 +1036,15 @@ exports.AuthServiceService = {
|
|
|
934
1036
|
responseSerialize: (value) => Buffer.from(exports.AuthResponse.encode(value).finish()),
|
|
935
1037
|
responseDeserialize: (value) => exports.AuthResponse.decode(value),
|
|
936
1038
|
},
|
|
1039
|
+
loginWithOAuth: {
|
|
1040
|
+
path: "/auth.AuthService/loginWithOAuth",
|
|
1041
|
+
requestStream: false,
|
|
1042
|
+
responseStream: false,
|
|
1043
|
+
requestSerialize: (value) => Buffer.from(exports.LoginWithOAuthRequest.encode(value).finish()),
|
|
1044
|
+
requestDeserialize: (value) => exports.LoginWithOAuthRequest.decode(value),
|
|
1045
|
+
responseSerialize: (value) => Buffer.from(exports.AuthResponse.encode(value).finish()),
|
|
1046
|
+
responseDeserialize: (value) => exports.AuthResponse.decode(value),
|
|
1047
|
+
},
|
|
937
1048
|
register: {
|
|
938
1049
|
path: "/auth.AuthService/register",
|
|
939
1050
|
requestStream: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
import type { handleServerStreamingCall, Metadata, UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
2
|
+
import type { handleServerStreamingCall, handleUnaryCall, Metadata, UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
3
|
import { Observable } from "rxjs";
|
|
4
4
|
export declare const protobufPackage = "event";
|
|
5
5
|
export interface SubscribeRequest {
|
|
@@ -10,14 +10,35 @@ export interface EventMessage {
|
|
|
10
10
|
data: string;
|
|
11
11
|
requestId: string;
|
|
12
12
|
}
|
|
13
|
+
export interface EmitToUserRequest {
|
|
14
|
+
userId: string;
|
|
15
|
+
channel: string;
|
|
16
|
+
data: string;
|
|
17
|
+
requestId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface BroadcastRequest {
|
|
20
|
+
channel: string;
|
|
21
|
+
data: string;
|
|
22
|
+
requestId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface EmitResponse {
|
|
25
|
+
success: boolean;
|
|
26
|
+
}
|
|
13
27
|
export declare const EVENT_PACKAGE_NAME = "event";
|
|
14
28
|
export declare const SubscribeRequest: MessageFns<SubscribeRequest>;
|
|
15
29
|
export declare const EventMessage: MessageFns<EventMessage>;
|
|
30
|
+
export declare const EmitToUserRequest: MessageFns<EmitToUserRequest>;
|
|
31
|
+
export declare const BroadcastRequest: MessageFns<BroadcastRequest>;
|
|
32
|
+
export declare const EmitResponse: MessageFns<EmitResponse>;
|
|
16
33
|
export interface EventServiceClient {
|
|
17
34
|
subscribe(request: SubscribeRequest, metadata?: Metadata): Observable<EventMessage>;
|
|
35
|
+
emitToUser(request: EmitToUserRequest, metadata?: Metadata): Observable<EmitResponse>;
|
|
36
|
+
broadcast(request: BroadcastRequest, metadata?: Metadata): Observable<EmitResponse>;
|
|
18
37
|
}
|
|
19
38
|
export interface EventServiceController {
|
|
20
39
|
subscribe(request: SubscribeRequest, metadata?: Metadata): Observable<EventMessage>;
|
|
40
|
+
emitToUser(request: EmitToUserRequest, metadata?: Metadata): Promise<EmitResponse> | Observable<EmitResponse> | EmitResponse;
|
|
41
|
+
broadcast(request: BroadcastRequest, metadata?: Metadata): Promise<EmitResponse> | Observable<EmitResponse> | EmitResponse;
|
|
21
42
|
}
|
|
22
43
|
export declare function EventServiceControllerMethods(): (constructor: Function) => void;
|
|
23
44
|
export declare const EVENT_SERVICE_NAME = "EventService";
|
|
@@ -32,9 +53,29 @@ export declare const EventServiceService: {
|
|
|
32
53
|
readonly responseSerialize: (value: EventMessage) => Buffer;
|
|
33
54
|
readonly responseDeserialize: (value: Buffer) => EventMessage;
|
|
34
55
|
};
|
|
56
|
+
readonly emitToUser: {
|
|
57
|
+
readonly path: "/event.EventService/emitToUser";
|
|
58
|
+
readonly requestStream: false;
|
|
59
|
+
readonly responseStream: false;
|
|
60
|
+
readonly requestSerialize: (value: EmitToUserRequest) => Buffer;
|
|
61
|
+
readonly requestDeserialize: (value: Buffer) => EmitToUserRequest;
|
|
62
|
+
readonly responseSerialize: (value: EmitResponse) => Buffer;
|
|
63
|
+
readonly responseDeserialize: (value: Buffer) => EmitResponse;
|
|
64
|
+
};
|
|
65
|
+
readonly broadcast: {
|
|
66
|
+
readonly path: "/event.EventService/broadcast";
|
|
67
|
+
readonly requestStream: false;
|
|
68
|
+
readonly responseStream: false;
|
|
69
|
+
readonly requestSerialize: (value: BroadcastRequest) => Buffer;
|
|
70
|
+
readonly requestDeserialize: (value: Buffer) => BroadcastRequest;
|
|
71
|
+
readonly responseSerialize: (value: EmitResponse) => Buffer;
|
|
72
|
+
readonly responseDeserialize: (value: Buffer) => EmitResponse;
|
|
73
|
+
};
|
|
35
74
|
};
|
|
36
75
|
export interface EventServiceServer extends UntypedServiceImplementation {
|
|
37
76
|
subscribe: handleServerStreamingCall<SubscribeRequest, EventMessage>;
|
|
77
|
+
emitToUser: handleUnaryCall<EmitToUserRequest, EmitResponse>;
|
|
78
|
+
broadcast: handleUnaryCall<BroadcastRequest, EmitResponse>;
|
|
38
79
|
}
|
|
39
80
|
export interface MessageFns<T> {
|
|
40
81
|
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
package/dist/event.interface.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: event.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.EventServiceService = exports.EVENT_SERVICE_NAME = exports.EventMessage = exports.SubscribeRequest = exports.EVENT_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.EventServiceService = exports.EVENT_SERVICE_NAME = exports.EmitResponse = exports.BroadcastRequest = exports.EmitToUserRequest = exports.EventMessage = exports.SubscribeRequest = exports.EVENT_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.EventServiceControllerMethods = EventServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
@@ -98,9 +98,158 @@ exports.EventMessage = {
|
|
|
98
98
|
return message;
|
|
99
99
|
},
|
|
100
100
|
};
|
|
101
|
+
function createBaseEmitToUserRequest() {
|
|
102
|
+
return { userId: "", channel: "", data: "", requestId: "" };
|
|
103
|
+
}
|
|
104
|
+
exports.EmitToUserRequest = {
|
|
105
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
106
|
+
if (message.userId !== "") {
|
|
107
|
+
writer.uint32(10).string(message.userId);
|
|
108
|
+
}
|
|
109
|
+
if (message.channel !== "") {
|
|
110
|
+
writer.uint32(18).string(message.channel);
|
|
111
|
+
}
|
|
112
|
+
if (message.data !== "") {
|
|
113
|
+
writer.uint32(26).string(message.data);
|
|
114
|
+
}
|
|
115
|
+
if (message.requestId !== "") {
|
|
116
|
+
writer.uint32(34).string(message.requestId);
|
|
117
|
+
}
|
|
118
|
+
return writer;
|
|
119
|
+
},
|
|
120
|
+
decode(input, length) {
|
|
121
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
122
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
123
|
+
const message = createBaseEmitToUserRequest();
|
|
124
|
+
while (reader.pos < end) {
|
|
125
|
+
const tag = reader.uint32();
|
|
126
|
+
switch (tag >>> 3) {
|
|
127
|
+
case 1: {
|
|
128
|
+
if (tag !== 10) {
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
message.userId = reader.string();
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
case 2: {
|
|
135
|
+
if (tag !== 18) {
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
message.channel = reader.string();
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
case 3: {
|
|
142
|
+
if (tag !== 26) {
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
message.data = reader.string();
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
case 4: {
|
|
149
|
+
if (tag !== 34) {
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
message.requestId = reader.string();
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
reader.skip(tag & 7);
|
|
160
|
+
}
|
|
161
|
+
return message;
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
function createBaseBroadcastRequest() {
|
|
165
|
+
return { channel: "", data: "", requestId: "" };
|
|
166
|
+
}
|
|
167
|
+
exports.BroadcastRequest = {
|
|
168
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
169
|
+
if (message.channel !== "") {
|
|
170
|
+
writer.uint32(10).string(message.channel);
|
|
171
|
+
}
|
|
172
|
+
if (message.data !== "") {
|
|
173
|
+
writer.uint32(18).string(message.data);
|
|
174
|
+
}
|
|
175
|
+
if (message.requestId !== "") {
|
|
176
|
+
writer.uint32(26).string(message.requestId);
|
|
177
|
+
}
|
|
178
|
+
return writer;
|
|
179
|
+
},
|
|
180
|
+
decode(input, length) {
|
|
181
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
182
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
183
|
+
const message = createBaseBroadcastRequest();
|
|
184
|
+
while (reader.pos < end) {
|
|
185
|
+
const tag = reader.uint32();
|
|
186
|
+
switch (tag >>> 3) {
|
|
187
|
+
case 1: {
|
|
188
|
+
if (tag !== 10) {
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
message.channel = reader.string();
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
case 2: {
|
|
195
|
+
if (tag !== 18) {
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
message.data = reader.string();
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
case 3: {
|
|
202
|
+
if (tag !== 26) {
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
message.requestId = reader.string();
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
reader.skip(tag & 7);
|
|
213
|
+
}
|
|
214
|
+
return message;
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
function createBaseEmitResponse() {
|
|
218
|
+
return { success: false };
|
|
219
|
+
}
|
|
220
|
+
exports.EmitResponse = {
|
|
221
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
222
|
+
if (message.success !== false) {
|
|
223
|
+
writer.uint32(8).bool(message.success);
|
|
224
|
+
}
|
|
225
|
+
return writer;
|
|
226
|
+
},
|
|
227
|
+
decode(input, length) {
|
|
228
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
229
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
230
|
+
const message = createBaseEmitResponse();
|
|
231
|
+
while (reader.pos < end) {
|
|
232
|
+
const tag = reader.uint32();
|
|
233
|
+
switch (tag >>> 3) {
|
|
234
|
+
case 1: {
|
|
235
|
+
if (tag !== 8) {
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
message.success = reader.bool();
|
|
239
|
+
continue;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
reader.skip(tag & 7);
|
|
246
|
+
}
|
|
247
|
+
return message;
|
|
248
|
+
},
|
|
249
|
+
};
|
|
101
250
|
function EventServiceControllerMethods() {
|
|
102
251
|
return function (constructor) {
|
|
103
|
-
const grpcMethods = ["subscribe"];
|
|
252
|
+
const grpcMethods = ["subscribe", "emitToUser", "broadcast"];
|
|
104
253
|
for (const method of grpcMethods) {
|
|
105
254
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
106
255
|
(0, microservices_1.GrpcMethod)("EventService", method)(constructor.prototype[method], method, descriptor);
|
|
@@ -123,4 +272,22 @@ exports.EventServiceService = {
|
|
|
123
272
|
responseSerialize: (value) => Buffer.from(exports.EventMessage.encode(value).finish()),
|
|
124
273
|
responseDeserialize: (value) => exports.EventMessage.decode(value),
|
|
125
274
|
},
|
|
275
|
+
emitToUser: {
|
|
276
|
+
path: "/event.EventService/emitToUser",
|
|
277
|
+
requestStream: false,
|
|
278
|
+
responseStream: false,
|
|
279
|
+
requestSerialize: (value) => Buffer.from(exports.EmitToUserRequest.encode(value).finish()),
|
|
280
|
+
requestDeserialize: (value) => exports.EmitToUserRequest.decode(value),
|
|
281
|
+
responseSerialize: (value) => Buffer.from(exports.EmitResponse.encode(value).finish()),
|
|
282
|
+
responseDeserialize: (value) => exports.EmitResponse.decode(value),
|
|
283
|
+
},
|
|
284
|
+
broadcast: {
|
|
285
|
+
path: "/event.EventService/broadcast",
|
|
286
|
+
requestStream: false,
|
|
287
|
+
responseStream: false,
|
|
288
|
+
requestSerialize: (value) => Buffer.from(exports.BroadcastRequest.encode(value).finish()),
|
|
289
|
+
requestDeserialize: (value) => exports.BroadcastRequest.decode(value),
|
|
290
|
+
responseSerialize: (value) => Buffer.from(exports.EmitResponse.encode(value).finish()),
|
|
291
|
+
responseDeserialize: (value) => exports.EmitResponse.decode(value),
|
|
292
|
+
},
|
|
126
293
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -15,12 +15,12 @@ export { WorkflowClient } from "./workflow.client";
|
|
|
15
15
|
export { LibraryClient } from "./library.client";
|
|
16
16
|
export { ChatClient } from "./chat.client";
|
|
17
17
|
export { GenerationClient } from "./generation.client";
|
|
18
|
-
export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, CreateUserRequest, CreateUserPersonal, UpdateUserRequest, FindOneRequest, UserResponse, UsersResponse, FindByEmailRequest, FindByPhoneRequest, UpdateUserPersonal, UpdatePasswordRequest, UpdateEmailVerificationRequest, ResetPasswordData, GetEmailVerificationStatusRequest, EmailVerificationStatusResponse, UserServiceService as UserService, } from "./user.interface";
|
|
19
|
-
export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailByCodeRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, ResendConfirmationCodeRequest, VerifyResetCodeRequest, } from "./auth.interface";
|
|
18
|
+
export { MessageFns as UserMessageFns, protobufPackage as UserProtobufPackage, User, CreateUserRequest, CreateUserPersonal, UpdateUserRequest, FindOneRequest, UserResponse, UsersResponse, FindByEmailRequest, FindByPhoneRequest, UpdateUserPersonal, UpdatePasswordRequest, UpdateEmailVerificationRequest, ResetPasswordData, GetEmailVerificationStatusRequest, EmailVerificationStatusResponse, UserOAuthIdentity, FindOAuthIdentityRequest, CreateOAuthIdentityRequest, UserServiceService as UserService, } from "./user.interface";
|
|
19
|
+
export { MessageFns as AuthMessageFns, protobufPackage as AuthProtobufPackage, LoginCredentials, RegisterCredentials, LogoutRequest, RefreshRequest, AuthResponse, RefreshTokenResponse, RecoverRequest, ResetPasswordRequest, ConfirmEmailRequest, ConfirmEmailByCodeRequest, ConfirmEmailResponse, CheckEmailVerifiedRequest, CheckEmailVerifiedResponse, ResendConfirmationCodeRequest, VerifyResetCodeRequest, LoginWithOAuthRequest, } from "./auth.interface";
|
|
20
20
|
export { MessageFns as EndpointMessageFns, protobufPackage as EndpointProtobufPackage, ENDPOINT_PACKAGE_NAME, ENDPOINT_SERVICE_NAME, Provider as EndpointProvider, Model as EndpointModel, Pricing as EndpointPricing, EndpointConfig, EndpointRequest, ProvidersRequest, ProvidersResponse, ModelsRequest, ModelsResponse, PricingRequest, PricingResponse, ValidateEndpointRequest, ValidateEndpointResponse, CreateEndpointRequest, UpdateEndpointRequest, GetEndpointByIdRequest, ListEndpointsRequest, DeleteEndpointRequest, CreateEndpointResponse, UpdateEndpointResponse, GetEndpointByIdResponse, ListEndpointsResponse, DeleteEndpointResponse, EndpointServiceClient, EndpointServiceController, EndpointServiceService as EndpointService, } from "./endpoint.interface";
|
|
21
21
|
export { MessageFns as OpenAIMessageFns, protobufPackage as OpenAIProtobufPackage, CreateRequest as OpenAICreateRequest, CreateResponse as OpenAICreateResponse, OpenAIServiceService as OpenAIService, } from "./openai.interface";
|
|
22
22
|
export { UploadRequest, UploadResponse, DownloadRequest, DownloadResponse, DeleteRequest, DeleteResponse, StorageServiceService as StorageService, protobufPackage as FileProtobufPackage, } from "./storage.interface";
|
|
23
|
-
export { MessageFns as EventMessageFns, protobufPackage as EventProtobufPackage, SubscribeRequest, EventMessage, EventServiceService as EventService, } from "./event.interface";
|
|
23
|
+
export { MessageFns as EventMessageFns, protobufPackage as EventProtobufPackage, SubscribeRequest, EventMessage, EmitToUserRequest, BroadcastRequest, EmitResponse, EventServiceService as EventService, } from "./event.interface";
|
|
24
24
|
export { MessageFns as KeysMessageFns, protobufPackage as KeysProtobufPackage, Key, CreateKeyRequest, UpdateKeyRequest, RemoveKeyRequest, GetKeyByIdRequest, KeyResponse, KeysResponse, GetKeysByUserRequest, ValidateKeyRequest, ValidateKeyResponse, GetSystemKeyRequest, KeyServiceService as KeyService, } from "./key.interface";
|
|
25
25
|
export { MessageFns as RequestMessageFns, protobufPackage as RequestProtobufPackage, CreateRequestRequest, CreateRequestResponse, GetRequestStatusRequest, RequestStatusResponse, GetRequestResultRequest, RequestResultResponse, CancelRequestRequest, CancelRequestResponse, StreamRequestRequest, RequestLog, StreamChunk, RequestServiceService as RequestService, } from "./request.interface";
|
|
26
26
|
export { MessageFns as ResponseMessageFns, protobufPackage as ResponseProtobufPackage, ProcessResponseRequest, ProcessResponseResponse, StreamUpdatesRequest, StreamUpdate, ResponseServiceService as ResponseService, } from "./response.interface";
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.GenerationService = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GenerationProtobufPackage = exports.ChatService = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.UpdateChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.ChatProtobufPackage = exports.LibraryService = exports.ArchiveItemsResponse = exports.ListArchiveItemsRequest = exports.ArchivesResponse = exports.BookmarksResponse = exports.RemoveItemFromArchiveRequest = exports.AddItemToArchiveRequest = exports.ListArchivesRequest = exports.DeleteArchiveRequest = exports.UpdateArchiveRequest = exports.CreateArchiveRequest = exports.ListBookmarksRequest = exports.DeleteBookmarkRequest = exports.CreateBookmarkRequest = exports.ArchiveItem = exports.Archive = exports.Bookmark = exports.LibraryProtobufPackage = exports.McpService = exports.McpServersResponse = exports.McpToolCustomizationsResponse = exports.McpServerCustomizationsResponse = void 0;
|
|
3
|
+
exports.CheckEmailVerifiedRequest = exports.ConfirmEmailResponse = exports.ConfirmEmailByCodeRequest = exports.ConfirmEmailRequest = exports.ResetPasswordRequest = exports.RecoverRequest = exports.RefreshTokenResponse = exports.AuthResponse = exports.RefreshRequest = exports.LogoutRequest = exports.RegisterCredentials = exports.LoginCredentials = exports.AuthProtobufPackage = exports.UserService = exports.CreateOAuthIdentityRequest = exports.FindOAuthIdentityRequest = exports.UserOAuthIdentity = exports.EmailVerificationStatusResponse = exports.GetEmailVerificationStatusRequest = exports.ResetPasswordData = exports.UpdateEmailVerificationRequest = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.UsersResponse = exports.UserResponse = exports.FindOneRequest = exports.UpdateUserRequest = exports.CreateUserPersonal = exports.CreateUserRequest = exports.User = exports.UserProtobufPackage = exports.GenerationClient = exports.ChatClient = exports.LibraryClient = exports.WorkflowClient = exports.MCPClient = exports.AgentClient = exports.BillingClient = exports.ResponseClient = exports.RequestClient = exports.KeyClient = exports.EventClient = exports.StorageClient = exports.OpenAIClient = exports.EndpointClient = exports.AuthClient = exports.UsersClient = exports.SharedModule = void 0;
|
|
4
|
+
exports.EventService = exports.EmitResponse = exports.BroadcastRequest = exports.EmitToUserRequest = exports.EventMessage = exports.SubscribeRequest = exports.EventProtobufPackage = exports.FileProtobufPackage = exports.StorageService = exports.DeleteResponse = exports.DeleteRequest = exports.DownloadResponse = exports.DownloadRequest = exports.UploadResponse = exports.UploadRequest = exports.OpenAIService = exports.OpenAICreateResponse = exports.OpenAICreateRequest = exports.OpenAIProtobufPackage = exports.EndpointService = exports.DeleteEndpointResponse = exports.ListEndpointsResponse = exports.GetEndpointByIdResponse = exports.UpdateEndpointResponse = exports.CreateEndpointResponse = exports.DeleteEndpointRequest = exports.ListEndpointsRequest = exports.GetEndpointByIdRequest = exports.UpdateEndpointRequest = exports.CreateEndpointRequest = exports.ValidateEndpointResponse = exports.ValidateEndpointRequest = exports.PricingResponse = exports.PricingRequest = exports.ModelsResponse = exports.ModelsRequest = exports.ProvidersResponse = exports.ProvidersRequest = exports.EndpointRequest = exports.EndpointConfig = exports.EndpointPricing = exports.EndpointModel = exports.EndpointProvider = exports.ENDPOINT_SERVICE_NAME = exports.ENDPOINT_PACKAGE_NAME = exports.EndpointProtobufPackage = exports.LoginWithOAuthRequest = exports.VerifyResetCodeRequest = exports.ResendConfirmationCodeRequest = exports.CheckEmailVerifiedResponse = void 0;
|
|
5
|
+
exports.GetTransactionResponse = exports.GetTransactionRequest = exports.GetTransactionsResponse = exports.GetTransactionsRequest = exports.CreateTransactionResponse = exports.CreateTransactionRequest = exports.DepositResponse = exports.DepositRequest = exports.ChargeResponse = exports.ChargeRequest = exports.GetBalanceResponse = exports.GetBalanceRequest = exports.Payment = exports.UsageStats = exports.Usage = exports.Transaction = exports.Balance = exports.BillingProtobufPackage = exports.ResponseService = exports.StreamUpdate = exports.StreamUpdatesRequest = exports.ProcessResponseResponse = exports.ProcessResponseRequest = exports.ResponseProtobufPackage = exports.RequestService = exports.StreamChunk = exports.RequestLog = exports.StreamRequestRequest = exports.CancelRequestResponse = exports.CancelRequestRequest = exports.RequestResultResponse = exports.GetRequestResultRequest = exports.RequestStatusResponse = exports.GetRequestStatusRequest = exports.CreateRequestResponse = exports.CreateRequestRequest = exports.RequestProtobufPackage = exports.KeyService = exports.GetSystemKeyRequest = exports.ValidateKeyResponse = exports.ValidateKeyRequest = exports.GetKeysByUserRequest = exports.KeysResponse = exports.KeyResponse = exports.GetKeyByIdRequest = exports.RemoveKeyRequest = exports.UpdateKeyRequest = exports.CreateKeyRequest = exports.Key = exports.KeysProtobufPackage = void 0;
|
|
6
|
+
exports.UpdateMcpServerRequest = exports.CreateMcpServerRequest = exports.McpOAuthSession = exports.McpToolCustomization = exports.McpServerCustomization = exports.McpServer = exports.McpProtobufPackage = exports.WorkflowService = exports.WorkflowsResponse = exports.DeleteEdgeRequest = exports.CreateEdgeRequest = exports.DeleteNodeRequest = exports.UpdateNodeRequest = exports.CreateNodeRequest = exports.DeleteWorkflowRequest = exports.ListWorkflowsRequest = exports.GetWorkflowRequest = exports.UpdateWorkflowRequest = exports.CreateWorkflowRequest = exports.FullWorkflow = exports.WorkflowEdge = exports.WorkflowNode = exports.Workflow = exports.WorkflowProtobufPackage = exports.AgentService = exports.AgentsResponse = exports.DeleteAgentRequest = exports.ListAgentsRequest = exports.GetAgentRequest = exports.UpdateAgentRequest = exports.CreateAgentRequest = exports.Agent = exports.AgentProtobufPackage = exports.BillingService = exports.ProcessWebhookResponse = exports.ProcessWebhookRequest = exports.GetPaymentsByUserResponse = exports.GetPaymentsByUserRequest = exports.GetPaymentResponse = exports.GetPaymentRequest = exports.CreatePaymentResponse = exports.CreatePaymentRequest = exports.GetUsageByUserResponse = exports.GetUsageByUserRequest = exports.GetUsageByKeyResponse = exports.GetUsageByKeyRequest = exports.GetUsageStatsResponse = exports.GetUsageStatsRequest = exports.RecordUsageResponse = exports.RecordUsageRequest = void 0;
|
|
7
|
+
exports.GenerationService = exports.CancelRunRequest = exports.SubmitToolResultRequest = exports.StartChatRunResponse = exports.StartChatRunRequest = exports.GenerationProtobufPackage = exports.ChatService = exports.MessagesResponse = exports.ChatsResponse = exports.GetMessagesRequest = exports.AddMessageRequest = exports.DeleteChatRequest = exports.ListChatsRequest = exports.GetChatRequest = exports.UpdateChatRequest = exports.CreateChatRequest = exports.ChatMessage = exports.Chat = exports.ChatProtobufPackage = exports.LibraryService = exports.ArchiveItemsResponse = exports.ListArchiveItemsRequest = exports.ArchivesResponse = exports.BookmarksResponse = exports.RemoveItemFromArchiveRequest = exports.AddItemToArchiveRequest = exports.ListArchivesRequest = exports.DeleteArchiveRequest = exports.UpdateArchiveRequest = exports.CreateArchiveRequest = exports.ListBookmarksRequest = exports.DeleteBookmarkRequest = exports.CreateBookmarkRequest = exports.ArchiveItem = exports.Archive = exports.Bookmark = exports.LibraryProtobufPackage = exports.McpService = exports.McpServersResponse = exports.McpToolCustomizationsResponse = exports.McpServerCustomizationsResponse = exports.ListToolCustomizationsRequest = exports.ListServerCustomizationsRequest = exports.SetToolCustomizationRequest = exports.SetServerCustomizationRequest = exports.DeleteMcpServerRequest = exports.ListMcpServersRequest = exports.GetMcpServerRequest = void 0;
|
|
8
8
|
var shared_module_1 = require("./shared.module");
|
|
9
9
|
Object.defineProperty(exports, "SharedModule", { enumerable: true, get: function () { return shared_module_1.SharedModule; } });
|
|
10
10
|
var user_client_1 = require("./user.client");
|
|
@@ -59,6 +59,9 @@ Object.defineProperty(exports, "UpdateEmailVerificationRequest", { enumerable: t
|
|
|
59
59
|
Object.defineProperty(exports, "ResetPasswordData", { enumerable: true, get: function () { return user_interface_1.ResetPasswordData; } });
|
|
60
60
|
Object.defineProperty(exports, "GetEmailVerificationStatusRequest", { enumerable: true, get: function () { return user_interface_1.GetEmailVerificationStatusRequest; } });
|
|
61
61
|
Object.defineProperty(exports, "EmailVerificationStatusResponse", { enumerable: true, get: function () { return user_interface_1.EmailVerificationStatusResponse; } });
|
|
62
|
+
Object.defineProperty(exports, "UserOAuthIdentity", { enumerable: true, get: function () { return user_interface_1.UserOAuthIdentity; } });
|
|
63
|
+
Object.defineProperty(exports, "FindOAuthIdentityRequest", { enumerable: true, get: function () { return user_interface_1.FindOAuthIdentityRequest; } });
|
|
64
|
+
Object.defineProperty(exports, "CreateOAuthIdentityRequest", { enumerable: true, get: function () { return user_interface_1.CreateOAuthIdentityRequest; } });
|
|
62
65
|
Object.defineProperty(exports, "UserService", { enumerable: true, get: function () { return user_interface_1.UserServiceService; } });
|
|
63
66
|
// ============================
|
|
64
67
|
// Auth exports
|
|
@@ -80,6 +83,7 @@ Object.defineProperty(exports, "CheckEmailVerifiedRequest", { enumerable: true,
|
|
|
80
83
|
Object.defineProperty(exports, "CheckEmailVerifiedResponse", { enumerable: true, get: function () { return auth_interface_1.CheckEmailVerifiedResponse; } });
|
|
81
84
|
Object.defineProperty(exports, "ResendConfirmationCodeRequest", { enumerable: true, get: function () { return auth_interface_1.ResendConfirmationCodeRequest; } });
|
|
82
85
|
Object.defineProperty(exports, "VerifyResetCodeRequest", { enumerable: true, get: function () { return auth_interface_1.VerifyResetCodeRequest; } });
|
|
86
|
+
Object.defineProperty(exports, "LoginWithOAuthRequest", { enumerable: true, get: function () { return auth_interface_1.LoginWithOAuthRequest; } });
|
|
83
87
|
// ============================
|
|
84
88
|
// Endpoint exports
|
|
85
89
|
// ============================
|
|
@@ -139,6 +143,9 @@ var event_interface_1 = require("./event.interface");
|
|
|
139
143
|
Object.defineProperty(exports, "EventProtobufPackage", { enumerable: true, get: function () { return event_interface_1.protobufPackage; } });
|
|
140
144
|
Object.defineProperty(exports, "SubscribeRequest", { enumerable: true, get: function () { return event_interface_1.SubscribeRequest; } });
|
|
141
145
|
Object.defineProperty(exports, "EventMessage", { enumerable: true, get: function () { return event_interface_1.EventMessage; } });
|
|
146
|
+
Object.defineProperty(exports, "EmitToUserRequest", { enumerable: true, get: function () { return event_interface_1.EmitToUserRequest; } });
|
|
147
|
+
Object.defineProperty(exports, "BroadcastRequest", { enumerable: true, get: function () { return event_interface_1.BroadcastRequest; } });
|
|
148
|
+
Object.defineProperty(exports, "EmitResponse", { enumerable: true, get: function () { return event_interface_1.EmitResponse; } });
|
|
142
149
|
Object.defineProperty(exports, "EventService", { enumerable: true, get: function () { return event_interface_1.EventServiceService; } });
|
|
143
150
|
// ============================
|
|
144
151
|
// Key exports
|
package/dist/user.interface.d.ts
CHANGED
|
@@ -180,6 +180,25 @@ export interface EmailVerificationStatusResponse {
|
|
|
180
180
|
userId: string;
|
|
181
181
|
emailVerified: boolean;
|
|
182
182
|
}
|
|
183
|
+
export interface UserOAuthIdentity {
|
|
184
|
+
uuid: string;
|
|
185
|
+
userId: string;
|
|
186
|
+
provider: string;
|
|
187
|
+
providerUserId: string;
|
|
188
|
+
email: string;
|
|
189
|
+
createdAt: string;
|
|
190
|
+
updatedAt: string;
|
|
191
|
+
}
|
|
192
|
+
export interface FindOAuthIdentityRequest {
|
|
193
|
+
provider: string;
|
|
194
|
+
providerUserId: string;
|
|
195
|
+
}
|
|
196
|
+
export interface CreateOAuthIdentityRequest {
|
|
197
|
+
userId: string;
|
|
198
|
+
provider: string;
|
|
199
|
+
providerUserId: string;
|
|
200
|
+
email: string;
|
|
201
|
+
}
|
|
183
202
|
/** Settings responses */
|
|
184
203
|
export interface UserSettingsResponse {
|
|
185
204
|
uuid: string;
|
|
@@ -222,12 +241,17 @@ export declare const CreateUserSettingsRequest: MessageFns<CreateUserSettingsReq
|
|
|
222
241
|
export declare const UserResponse: MessageFns<UserResponse>;
|
|
223
242
|
export declare const UsersResponse: MessageFns<UsersResponse>;
|
|
224
243
|
export declare const EmailVerificationStatusResponse: MessageFns<EmailVerificationStatusResponse>;
|
|
244
|
+
export declare const UserOAuthIdentity: MessageFns<UserOAuthIdentity>;
|
|
245
|
+
export declare const FindOAuthIdentityRequest: MessageFns<FindOAuthIdentityRequest>;
|
|
246
|
+
export declare const CreateOAuthIdentityRequest: MessageFns<CreateOAuthIdentityRequest>;
|
|
225
247
|
export declare const UserSettingsResponse: MessageFns<UserSettingsResponse>;
|
|
226
248
|
export interface UserServiceClient {
|
|
227
249
|
create(request: CreateUserRequest, metadata?: Metadata): Observable<UserResponse>;
|
|
228
250
|
findOne(request: FindOneRequest, metadata?: Metadata): Observable<UserResponse>;
|
|
229
251
|
findByEmail(request: FindByEmailRequest, metadata?: Metadata): Observable<User>;
|
|
230
252
|
findByPhone(request: FindByPhoneRequest, metadata?: Metadata): Observable<User>;
|
|
253
|
+
findOAuthIdentity(request: FindOAuthIdentityRequest, metadata?: Metadata): Observable<UserOAuthIdentity>;
|
|
254
|
+
createOAuthIdentity(request: CreateOAuthIdentityRequest, metadata?: Metadata): Observable<UserOAuthIdentity>;
|
|
231
255
|
findAll(request: Empty, metadata?: Metadata): Observable<UsersResponse>;
|
|
232
256
|
update(request: UpdateUserRequest, metadata?: Metadata): Observable<UserResponse>;
|
|
233
257
|
updatePersonal(request: UpdateUserPersonal, metadata?: Metadata): Observable<UserResponse>;
|
|
@@ -246,6 +270,8 @@ export interface UserServiceController {
|
|
|
246
270
|
findOne(request: FindOneRequest, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
|
|
247
271
|
findByEmail(request: FindByEmailRequest, metadata?: Metadata): Promise<User> | Observable<User> | User;
|
|
248
272
|
findByPhone(request: FindByPhoneRequest, metadata?: Metadata): Promise<User> | Observable<User> | User;
|
|
273
|
+
findOAuthIdentity(request: FindOAuthIdentityRequest, metadata?: Metadata): Promise<UserOAuthIdentity> | Observable<UserOAuthIdentity> | UserOAuthIdentity;
|
|
274
|
+
createOAuthIdentity(request: CreateOAuthIdentityRequest, metadata?: Metadata): Promise<UserOAuthIdentity> | Observable<UserOAuthIdentity> | UserOAuthIdentity;
|
|
249
275
|
findAll(request: Empty, metadata?: Metadata): Promise<UsersResponse> | Observable<UsersResponse> | UsersResponse;
|
|
250
276
|
update(request: UpdateUserRequest, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
|
|
251
277
|
updatePersonal(request: UpdateUserPersonal, metadata?: Metadata): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
|
|
@@ -299,6 +325,24 @@ export declare const UserServiceService: {
|
|
|
299
325
|
readonly responseSerialize: (value: User) => Buffer;
|
|
300
326
|
readonly responseDeserialize: (value: Buffer) => User;
|
|
301
327
|
};
|
|
328
|
+
readonly findOAuthIdentity: {
|
|
329
|
+
readonly path: "/user.UserService/findOAuthIdentity";
|
|
330
|
+
readonly requestStream: false;
|
|
331
|
+
readonly responseStream: false;
|
|
332
|
+
readonly requestSerialize: (value: FindOAuthIdentityRequest) => Buffer;
|
|
333
|
+
readonly requestDeserialize: (value: Buffer) => FindOAuthIdentityRequest;
|
|
334
|
+
readonly responseSerialize: (value: UserOAuthIdentity) => Buffer;
|
|
335
|
+
readonly responseDeserialize: (value: Buffer) => UserOAuthIdentity;
|
|
336
|
+
};
|
|
337
|
+
readonly createOAuthIdentity: {
|
|
338
|
+
readonly path: "/user.UserService/createOAuthIdentity";
|
|
339
|
+
readonly requestStream: false;
|
|
340
|
+
readonly responseStream: false;
|
|
341
|
+
readonly requestSerialize: (value: CreateOAuthIdentityRequest) => Buffer;
|
|
342
|
+
readonly requestDeserialize: (value: Buffer) => CreateOAuthIdentityRequest;
|
|
343
|
+
readonly responseSerialize: (value: UserOAuthIdentity) => Buffer;
|
|
344
|
+
readonly responseDeserialize: (value: Buffer) => UserOAuthIdentity;
|
|
345
|
+
};
|
|
302
346
|
readonly findAll: {
|
|
303
347
|
readonly path: "/user.UserService/findAll";
|
|
304
348
|
readonly requestStream: false;
|
|
@@ -405,6 +449,8 @@ export interface UserServiceServer extends UntypedServiceImplementation {
|
|
|
405
449
|
findOne: handleUnaryCall<FindOneRequest, UserResponse>;
|
|
406
450
|
findByEmail: handleUnaryCall<FindByEmailRequest, User>;
|
|
407
451
|
findByPhone: handleUnaryCall<FindByPhoneRequest, User>;
|
|
452
|
+
findOAuthIdentity: handleUnaryCall<FindOAuthIdentityRequest, UserOAuthIdentity>;
|
|
453
|
+
createOAuthIdentity: handleUnaryCall<CreateOAuthIdentityRequest, UserOAuthIdentity>;
|
|
408
454
|
findAll: handleUnaryCall<Empty, UsersResponse>;
|
|
409
455
|
update: handleUnaryCall<UpdateUserRequest, UserResponse>;
|
|
410
456
|
updatePersonal: handleUnaryCall<UpdateUserPersonal, UserResponse>;
|
package/dist/user.interface.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v5.28.2
|
|
6
6
|
// source: user.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.UserServiceService = exports.USER_SERVICE_NAME = exports.UserSettingsResponse = exports.EmailVerificationStatusResponse = exports.UsersResponse = exports.UserResponse = exports.CreateUserSettingsRequest = exports.UpdateUserSettingsRequest = exports.GetUserSettingsRequest = exports.GetEmailVerificationStatusRequest = exports.UpdateEmailVerificationRequest = exports.RemoveUserRequest = exports.ResetPasswordData = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.UpdateUserRequest = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.FindOneRequest = exports.CreateUserRequest = exports.CreateUserAuthentication = exports.CreateUserPersonal = exports.User = exports.UserAuthentication = exports.UserAppearanceSettings = exports.UserPrivacySettings = exports.UserInAppNotifications = exports.UserPushNotifications = exports.UserEmailNotifications = exports.UserNotificationSettings = exports.UserSettings = exports.UserPersonal = exports.USER_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.UserServiceService = exports.USER_SERVICE_NAME = exports.UserSettingsResponse = exports.CreateOAuthIdentityRequest = exports.FindOAuthIdentityRequest = exports.UserOAuthIdentity = exports.EmailVerificationStatusResponse = exports.UsersResponse = exports.UserResponse = exports.CreateUserSettingsRequest = exports.UpdateUserSettingsRequest = exports.GetUserSettingsRequest = exports.GetEmailVerificationStatusRequest = exports.UpdateEmailVerificationRequest = exports.RemoveUserRequest = exports.ResetPasswordData = exports.UpdatePasswordRequest = exports.UpdateUserPersonal = exports.UpdateUserRequest = exports.FindByPhoneRequest = exports.FindByEmailRequest = exports.FindOneRequest = exports.CreateUserRequest = exports.CreateUserAuthentication = exports.CreateUserPersonal = exports.User = exports.UserAuthentication = exports.UserAppearanceSettings = exports.UserPrivacySettings = exports.UserInAppNotifications = exports.UserPushNotifications = exports.UserEmailNotifications = exports.UserNotificationSettings = exports.UserSettings = exports.UserPersonal = exports.USER_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
9
|
exports.UserServiceControllerMethods = UserServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
@@ -1804,6 +1804,205 @@ exports.EmailVerificationStatusResponse = {
|
|
|
1804
1804
|
return message;
|
|
1805
1805
|
},
|
|
1806
1806
|
};
|
|
1807
|
+
function createBaseUserOAuthIdentity() {
|
|
1808
|
+
return { uuid: "", userId: "", provider: "", providerUserId: "", email: "", createdAt: "", updatedAt: "" };
|
|
1809
|
+
}
|
|
1810
|
+
exports.UserOAuthIdentity = {
|
|
1811
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1812
|
+
if (message.uuid !== "") {
|
|
1813
|
+
writer.uint32(10).string(message.uuid);
|
|
1814
|
+
}
|
|
1815
|
+
if (message.userId !== "") {
|
|
1816
|
+
writer.uint32(18).string(message.userId);
|
|
1817
|
+
}
|
|
1818
|
+
if (message.provider !== "") {
|
|
1819
|
+
writer.uint32(26).string(message.provider);
|
|
1820
|
+
}
|
|
1821
|
+
if (message.providerUserId !== "") {
|
|
1822
|
+
writer.uint32(34).string(message.providerUserId);
|
|
1823
|
+
}
|
|
1824
|
+
if (message.email !== "") {
|
|
1825
|
+
writer.uint32(42).string(message.email);
|
|
1826
|
+
}
|
|
1827
|
+
if (message.createdAt !== "") {
|
|
1828
|
+
writer.uint32(50).string(message.createdAt);
|
|
1829
|
+
}
|
|
1830
|
+
if (message.updatedAt !== "") {
|
|
1831
|
+
writer.uint32(58).string(message.updatedAt);
|
|
1832
|
+
}
|
|
1833
|
+
return writer;
|
|
1834
|
+
},
|
|
1835
|
+
decode(input, length) {
|
|
1836
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1837
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1838
|
+
const message = createBaseUserOAuthIdentity();
|
|
1839
|
+
while (reader.pos < end) {
|
|
1840
|
+
const tag = reader.uint32();
|
|
1841
|
+
switch (tag >>> 3) {
|
|
1842
|
+
case 1: {
|
|
1843
|
+
if (tag !== 10) {
|
|
1844
|
+
break;
|
|
1845
|
+
}
|
|
1846
|
+
message.uuid = reader.string();
|
|
1847
|
+
continue;
|
|
1848
|
+
}
|
|
1849
|
+
case 2: {
|
|
1850
|
+
if (tag !== 18) {
|
|
1851
|
+
break;
|
|
1852
|
+
}
|
|
1853
|
+
message.userId = reader.string();
|
|
1854
|
+
continue;
|
|
1855
|
+
}
|
|
1856
|
+
case 3: {
|
|
1857
|
+
if (tag !== 26) {
|
|
1858
|
+
break;
|
|
1859
|
+
}
|
|
1860
|
+
message.provider = reader.string();
|
|
1861
|
+
continue;
|
|
1862
|
+
}
|
|
1863
|
+
case 4: {
|
|
1864
|
+
if (tag !== 34) {
|
|
1865
|
+
break;
|
|
1866
|
+
}
|
|
1867
|
+
message.providerUserId = reader.string();
|
|
1868
|
+
continue;
|
|
1869
|
+
}
|
|
1870
|
+
case 5: {
|
|
1871
|
+
if (tag !== 42) {
|
|
1872
|
+
break;
|
|
1873
|
+
}
|
|
1874
|
+
message.email = reader.string();
|
|
1875
|
+
continue;
|
|
1876
|
+
}
|
|
1877
|
+
case 6: {
|
|
1878
|
+
if (tag !== 50) {
|
|
1879
|
+
break;
|
|
1880
|
+
}
|
|
1881
|
+
message.createdAt = reader.string();
|
|
1882
|
+
continue;
|
|
1883
|
+
}
|
|
1884
|
+
case 7: {
|
|
1885
|
+
if (tag !== 58) {
|
|
1886
|
+
break;
|
|
1887
|
+
}
|
|
1888
|
+
message.updatedAt = reader.string();
|
|
1889
|
+
continue;
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1893
|
+
break;
|
|
1894
|
+
}
|
|
1895
|
+
reader.skip(tag & 7);
|
|
1896
|
+
}
|
|
1897
|
+
return message;
|
|
1898
|
+
},
|
|
1899
|
+
};
|
|
1900
|
+
function createBaseFindOAuthIdentityRequest() {
|
|
1901
|
+
return { provider: "", providerUserId: "" };
|
|
1902
|
+
}
|
|
1903
|
+
exports.FindOAuthIdentityRequest = {
|
|
1904
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1905
|
+
if (message.provider !== "") {
|
|
1906
|
+
writer.uint32(10).string(message.provider);
|
|
1907
|
+
}
|
|
1908
|
+
if (message.providerUserId !== "") {
|
|
1909
|
+
writer.uint32(18).string(message.providerUserId);
|
|
1910
|
+
}
|
|
1911
|
+
return writer;
|
|
1912
|
+
},
|
|
1913
|
+
decode(input, length) {
|
|
1914
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1915
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1916
|
+
const message = createBaseFindOAuthIdentityRequest();
|
|
1917
|
+
while (reader.pos < end) {
|
|
1918
|
+
const tag = reader.uint32();
|
|
1919
|
+
switch (tag >>> 3) {
|
|
1920
|
+
case 1: {
|
|
1921
|
+
if (tag !== 10) {
|
|
1922
|
+
break;
|
|
1923
|
+
}
|
|
1924
|
+
message.provider = reader.string();
|
|
1925
|
+
continue;
|
|
1926
|
+
}
|
|
1927
|
+
case 2: {
|
|
1928
|
+
if (tag !== 18) {
|
|
1929
|
+
break;
|
|
1930
|
+
}
|
|
1931
|
+
message.providerUserId = reader.string();
|
|
1932
|
+
continue;
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1936
|
+
break;
|
|
1937
|
+
}
|
|
1938
|
+
reader.skip(tag & 7);
|
|
1939
|
+
}
|
|
1940
|
+
return message;
|
|
1941
|
+
},
|
|
1942
|
+
};
|
|
1943
|
+
function createBaseCreateOAuthIdentityRequest() {
|
|
1944
|
+
return { userId: "", provider: "", providerUserId: "", email: "" };
|
|
1945
|
+
}
|
|
1946
|
+
exports.CreateOAuthIdentityRequest = {
|
|
1947
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1948
|
+
if (message.userId !== "") {
|
|
1949
|
+
writer.uint32(10).string(message.userId);
|
|
1950
|
+
}
|
|
1951
|
+
if (message.provider !== "") {
|
|
1952
|
+
writer.uint32(18).string(message.provider);
|
|
1953
|
+
}
|
|
1954
|
+
if (message.providerUserId !== "") {
|
|
1955
|
+
writer.uint32(26).string(message.providerUserId);
|
|
1956
|
+
}
|
|
1957
|
+
if (message.email !== "") {
|
|
1958
|
+
writer.uint32(34).string(message.email);
|
|
1959
|
+
}
|
|
1960
|
+
return writer;
|
|
1961
|
+
},
|
|
1962
|
+
decode(input, length) {
|
|
1963
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1964
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1965
|
+
const message = createBaseCreateOAuthIdentityRequest();
|
|
1966
|
+
while (reader.pos < end) {
|
|
1967
|
+
const tag = reader.uint32();
|
|
1968
|
+
switch (tag >>> 3) {
|
|
1969
|
+
case 1: {
|
|
1970
|
+
if (tag !== 10) {
|
|
1971
|
+
break;
|
|
1972
|
+
}
|
|
1973
|
+
message.userId = reader.string();
|
|
1974
|
+
continue;
|
|
1975
|
+
}
|
|
1976
|
+
case 2: {
|
|
1977
|
+
if (tag !== 18) {
|
|
1978
|
+
break;
|
|
1979
|
+
}
|
|
1980
|
+
message.provider = reader.string();
|
|
1981
|
+
continue;
|
|
1982
|
+
}
|
|
1983
|
+
case 3: {
|
|
1984
|
+
if (tag !== 26) {
|
|
1985
|
+
break;
|
|
1986
|
+
}
|
|
1987
|
+
message.providerUserId = reader.string();
|
|
1988
|
+
continue;
|
|
1989
|
+
}
|
|
1990
|
+
case 4: {
|
|
1991
|
+
if (tag !== 34) {
|
|
1992
|
+
break;
|
|
1993
|
+
}
|
|
1994
|
+
message.email = reader.string();
|
|
1995
|
+
continue;
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1999
|
+
break;
|
|
2000
|
+
}
|
|
2001
|
+
reader.skip(tag & 7);
|
|
2002
|
+
}
|
|
2003
|
+
return message;
|
|
2004
|
+
},
|
|
2005
|
+
};
|
|
1807
2006
|
function createBaseUserSettingsResponse() {
|
|
1808
2007
|
return { uuid: "", userId: "", theme: "", language: "", createdAt: "", updatedAt: "" };
|
|
1809
2008
|
}
|
|
@@ -1924,6 +2123,8 @@ function UserServiceControllerMethods() {
|
|
|
1924
2123
|
"findOne",
|
|
1925
2124
|
"findByEmail",
|
|
1926
2125
|
"findByPhone",
|
|
2126
|
+
"findOAuthIdentity",
|
|
2127
|
+
"createOAuthIdentity",
|
|
1927
2128
|
"findAll",
|
|
1928
2129
|
"update",
|
|
1929
2130
|
"updatePersonal",
|
|
@@ -1985,6 +2186,24 @@ exports.UserServiceService = {
|
|
|
1985
2186
|
responseSerialize: (value) => Buffer.from(exports.User.encode(value).finish()),
|
|
1986
2187
|
responseDeserialize: (value) => exports.User.decode(value),
|
|
1987
2188
|
},
|
|
2189
|
+
findOAuthIdentity: {
|
|
2190
|
+
path: "/user.UserService/findOAuthIdentity",
|
|
2191
|
+
requestStream: false,
|
|
2192
|
+
responseStream: false,
|
|
2193
|
+
requestSerialize: (value) => Buffer.from(exports.FindOAuthIdentityRequest.encode(value).finish()),
|
|
2194
|
+
requestDeserialize: (value) => exports.FindOAuthIdentityRequest.decode(value),
|
|
2195
|
+
responseSerialize: (value) => Buffer.from(exports.UserOAuthIdentity.encode(value).finish()),
|
|
2196
|
+
responseDeserialize: (value) => exports.UserOAuthIdentity.decode(value),
|
|
2197
|
+
},
|
|
2198
|
+
createOAuthIdentity: {
|
|
2199
|
+
path: "/user.UserService/createOAuthIdentity",
|
|
2200
|
+
requestStream: false,
|
|
2201
|
+
responseStream: false,
|
|
2202
|
+
requestSerialize: (value) => Buffer.from(exports.CreateOAuthIdentityRequest.encode(value).finish()),
|
|
2203
|
+
requestDeserialize: (value) => exports.CreateOAuthIdentityRequest.decode(value),
|
|
2204
|
+
responseSerialize: (value) => Buffer.from(exports.UserOAuthIdentity.encode(value).finish()),
|
|
2205
|
+
responseDeserialize: (value) => exports.UserOAuthIdentity.decode(value),
|
|
2206
|
+
},
|
|
1988
2207
|
findAll: {
|
|
1989
2208
|
path: "/user.UserService/findAll",
|
|
1990
2209
|
requestStream: false,
|