geniebox-shared-lib 1.0.28 → 1.0.30
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.
|
@@ -51,6 +51,9 @@ export interface ResetPasswordRequest {
|
|
|
51
51
|
code: string;
|
|
52
52
|
newPassword: string;
|
|
53
53
|
}
|
|
54
|
+
export interface RefreshRequest {
|
|
55
|
+
refreshToken: string;
|
|
56
|
+
}
|
|
54
57
|
export interface RefreshTokenRequest {
|
|
55
58
|
userId: string;
|
|
56
59
|
sessionId: string;
|
|
@@ -68,16 +71,19 @@ export declare const UserResponse: MessageFns<UserResponse>;
|
|
|
68
71
|
export declare const LogoutRequest: MessageFns<LogoutRequest>;
|
|
69
72
|
export declare const ForgotPasswordRequest: MessageFns<ForgotPasswordRequest>;
|
|
70
73
|
export declare const ResetPasswordRequest: MessageFns<ResetPasswordRequest>;
|
|
74
|
+
export declare const RefreshRequest: MessageFns<RefreshRequest>;
|
|
71
75
|
export declare const RefreshTokenRequest: MessageFns<RefreshTokenRequest>;
|
|
72
76
|
export declare const RefreshTokenResponse: MessageFns<RefreshTokenResponse>;
|
|
73
77
|
export interface AuthServiceClient {
|
|
74
78
|
login(request: LoginCredentials, metadata?: Metadata): Observable<AuthResponse>;
|
|
75
79
|
register(request: RegisterCredentials, metadata?: Metadata): Observable<AuthResponse>;
|
|
80
|
+
refresh(request: RefreshRequest, metadata?: Metadata): Observable<RefreshTokenResponse>;
|
|
76
81
|
logout(request: LogoutRequest, metadata?: Metadata): Observable<Empty>;
|
|
77
82
|
}
|
|
78
83
|
export interface AuthServiceController {
|
|
79
84
|
login(request: LoginCredentials, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
|
|
80
85
|
register(request: RegisterCredentials, metadata?: Metadata): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
|
|
86
|
+
refresh(request: RefreshRequest, metadata?: Metadata): Promise<RefreshTokenResponse> | Observable<RefreshTokenResponse> | RefreshTokenResponse;
|
|
81
87
|
logout(request: LogoutRequest, metadata?: Metadata): void;
|
|
82
88
|
}
|
|
83
89
|
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
@@ -102,6 +108,15 @@ export declare const AuthServiceService: {
|
|
|
102
108
|
readonly responseSerialize: (value: AuthResponse) => Buffer;
|
|
103
109
|
readonly responseDeserialize: (value: Buffer) => AuthResponse;
|
|
104
110
|
};
|
|
111
|
+
readonly refresh: {
|
|
112
|
+
readonly path: "/auth.AuthService/refresh";
|
|
113
|
+
readonly requestStream: false;
|
|
114
|
+
readonly responseStream: false;
|
|
115
|
+
readonly requestSerialize: (value: RefreshRequest) => Buffer;
|
|
116
|
+
readonly requestDeserialize: (value: Buffer) => RefreshRequest;
|
|
117
|
+
readonly responseSerialize: (value: RefreshTokenResponse) => Buffer;
|
|
118
|
+
readonly responseDeserialize: (value: Buffer) => RefreshTokenResponse;
|
|
119
|
+
};
|
|
105
120
|
readonly logout: {
|
|
106
121
|
readonly path: "/auth.AuthService/logout";
|
|
107
122
|
readonly requestStream: false;
|
|
@@ -115,6 +130,7 @@ export declare const AuthServiceService: {
|
|
|
115
130
|
export interface AuthServiceServer extends UntypedServiceImplementation {
|
|
116
131
|
login: handleUnaryCall<LoginCredentials, AuthResponse>;
|
|
117
132
|
register: handleUnaryCall<RegisterCredentials, AuthResponse>;
|
|
133
|
+
refresh: handleUnaryCall<RefreshRequest, RefreshTokenResponse>;
|
|
118
134
|
logout: handleUnaryCall<LogoutRequest, Empty>;
|
|
119
135
|
}
|
|
120
136
|
export interface MessageFns<T> {
|
|
@@ -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.RefreshTokenResponse = exports.RefreshTokenRequest = exports.ResetPasswordRequest = exports.ForgotPasswordRequest = exports.LogoutRequest = exports.UserResponse = exports.AuthResponse = exports.Tokens = exports.LoginCredentials = exports.RegisterCredentials = exports.AUTH_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.AuthServiceService = exports.AUTH_SERVICE_NAME = exports.RefreshTokenResponse = exports.RefreshTokenRequest = exports.RefreshRequest = exports.ResetPasswordRequest = exports.ForgotPasswordRequest = exports.LogoutRequest = exports.UserResponse = exports.AuthResponse = exports.Tokens = exports.LoginCredentials = exports.RegisterCredentials = 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");
|
|
@@ -517,6 +517,39 @@ exports.ResetPasswordRequest = {
|
|
|
517
517
|
return message;
|
|
518
518
|
},
|
|
519
519
|
};
|
|
520
|
+
function createBaseRefreshRequest() {
|
|
521
|
+
return { refreshToken: "" };
|
|
522
|
+
}
|
|
523
|
+
exports.RefreshRequest = {
|
|
524
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
525
|
+
if (message.refreshToken !== "") {
|
|
526
|
+
writer.uint32(10).string(message.refreshToken);
|
|
527
|
+
}
|
|
528
|
+
return writer;
|
|
529
|
+
},
|
|
530
|
+
decode(input, length) {
|
|
531
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
532
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
533
|
+
const message = createBaseRefreshRequest();
|
|
534
|
+
while (reader.pos < end) {
|
|
535
|
+
const tag = reader.uint32();
|
|
536
|
+
switch (tag >>> 3) {
|
|
537
|
+
case 1: {
|
|
538
|
+
if (tag !== 10) {
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
message.refreshToken = reader.string();
|
|
542
|
+
continue;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
546
|
+
break;
|
|
547
|
+
}
|
|
548
|
+
reader.skip(tag & 7);
|
|
549
|
+
}
|
|
550
|
+
return message;
|
|
551
|
+
},
|
|
552
|
+
};
|
|
520
553
|
function createBaseRefreshTokenRequest() {
|
|
521
554
|
return { userId: "", sessionId: "", refreshToken: "" };
|
|
522
555
|
}
|
|
@@ -605,7 +638,7 @@ exports.RefreshTokenResponse = {
|
|
|
605
638
|
};
|
|
606
639
|
function AuthServiceControllerMethods() {
|
|
607
640
|
return function (constructor) {
|
|
608
|
-
const grpcMethods = ["login", "register", "logout"];
|
|
641
|
+
const grpcMethods = ["login", "register", "refresh", "logout"];
|
|
609
642
|
for (const method of grpcMethods) {
|
|
610
643
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
611
644
|
(0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
|
|
@@ -637,6 +670,15 @@ exports.AuthServiceService = {
|
|
|
637
670
|
responseSerialize: (value) => Buffer.from(exports.AuthResponse.encode(value).finish()),
|
|
638
671
|
responseDeserialize: (value) => exports.AuthResponse.decode(value),
|
|
639
672
|
},
|
|
673
|
+
refresh: {
|
|
674
|
+
path: "/auth.AuthService/refresh",
|
|
675
|
+
requestStream: false,
|
|
676
|
+
responseStream: false,
|
|
677
|
+
requestSerialize: (value) => Buffer.from(exports.RefreshRequest.encode(value).finish()),
|
|
678
|
+
requestDeserialize: (value) => exports.RefreshRequest.decode(value),
|
|
679
|
+
responseSerialize: (value) => Buffer.from(exports.RefreshTokenResponse.encode(value).finish()),
|
|
680
|
+
responseDeserialize: (value) => exports.RefreshTokenResponse.decode(value),
|
|
681
|
+
},
|
|
640
682
|
logout: {
|
|
641
683
|
path: "/auth.AuthService/logout",
|
|
642
684
|
requestStream: false,
|