remove: delete register methods and change version
All checks were successful
Publish / Publish Job (push) Successful in 1m15s
All checks were successful
Publish / Publish Job (push) Successful in 1m15s
This commit is contained in:
16
gen/google/protobuf/any.ts
Normal file
16
gen/google/protobuf/any.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-ts_proto v2.11.6
|
||||||
|
// protoc v7.34.1
|
||||||
|
// source: google/protobuf/any.proto
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
export const protobufPackage = "google.protobuf";
|
||||||
|
|
||||||
|
export interface Any {
|
||||||
|
typeUrl: string;
|
||||||
|
value: Uint8Array;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
||||||
18
gen/google/rpc/status.ts
Normal file
18
gen/google/rpc/status.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-ts_proto v2.11.6
|
||||||
|
// protoc v7.34.1
|
||||||
|
// source: google/rpc/status.proto
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
|
import { Any } from "../protobuf/any";
|
||||||
|
|
||||||
|
export const protobufPackage = "google.rpc";
|
||||||
|
|
||||||
|
export interface Status {
|
||||||
|
code: number;
|
||||||
|
message: string;
|
||||||
|
details: Any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const GOOGLE_RPC_PACKAGE_NAME = "google.rpc";
|
||||||
276
gen/identity.ts
Normal file
276
gen/identity.ts
Normal file
@@ -0,0 +1,276 @@
|
|||||||
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-ts_proto v2.11.6
|
||||||
|
// protoc v7.34.1
|
||||||
|
// source: identity.proto
|
||||||
|
|
||||||
|
/* eslint-disable */
|
||||||
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
||||||
|
import { Observable } from "rxjs";
|
||||||
|
import { Status } from "./google/rpc/status";
|
||||||
|
|
||||||
|
export const protobufPackage = "identity";
|
||||||
|
|
||||||
|
export interface LoginRequest {
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LoginResponse {
|
||||||
|
accessToken: string;
|
||||||
|
refreshToken: string;
|
||||||
|
status: string;
|
||||||
|
need2fa: boolean;
|
||||||
|
tempToken?: string | undefined;
|
||||||
|
message?: string | undefined;
|
||||||
|
errorCode?: string | undefined;
|
||||||
|
error?: Status | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface RefreshRequest {
|
||||||
|
refreshToken: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface RefreshResponse {
|
||||||
|
accessToken: string;
|
||||||
|
refreshToken: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LogoutRequest {
|
||||||
|
accessToken: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LogoutResponse {
|
||||||
|
success: boolean;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UnlockPinRequest {
|
||||||
|
accessToken: string;
|
||||||
|
pinCode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UnlockPinResponse {
|
||||||
|
success: boolean;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Verify2FaRequest {
|
||||||
|
tempToken: string;
|
||||||
|
totpCode?: string | undefined;
|
||||||
|
telegramCode?: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Verify2FaResponse {
|
||||||
|
accessToken: string;
|
||||||
|
refreshToken: string;
|
||||||
|
status: string;
|
||||||
|
message: string;
|
||||||
|
reserveCodes: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AuthenticatedAccessRequest {
|
||||||
|
accessToken: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetTwoFaStatusRequest {
|
||||||
|
accessToken: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GetTwoFaStatusResponse {
|
||||||
|
totpEnabled: boolean;
|
||||||
|
telegramEnabled: boolean;
|
||||||
|
totpEnrollmentPending: boolean;
|
||||||
|
telegramEnrollmentPending: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface StartTotpEnrollmentResponse {
|
||||||
|
secretBase32: string;
|
||||||
|
otpauthUri: string;
|
||||||
|
issuer: string;
|
||||||
|
accountLabel: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ConfirmTotpEnrollmentRequest {
|
||||||
|
accessToken: string;
|
||||||
|
totpCode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ConfirmTotpEnrollmentResponse {
|
||||||
|
status: string;
|
||||||
|
message: string;
|
||||||
|
reserveCodes: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CancelTotpEnrollmentResponse {
|
||||||
|
status: string;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DisableTotpRequest {
|
||||||
|
accessToken: string;
|
||||||
|
password: string;
|
||||||
|
totpCode?: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DisableTotpResponse {
|
||||||
|
status: string;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface StartTelegramEnrollmentResponse {
|
||||||
|
enrollmentToken: string;
|
||||||
|
deepLink: string;
|
||||||
|
botUsername: string;
|
||||||
|
expiresAtIso: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ConfirmTelegramEnrollmentRequest {
|
||||||
|
accessToken: string;
|
||||||
|
enrollmentToken: string;
|
||||||
|
otpCode: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ConfirmTelegramEnrollmentResponse {
|
||||||
|
status: string;
|
||||||
|
message: string;
|
||||||
|
reserveCodes: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DisableTelegramRequest {
|
||||||
|
accessToken: string;
|
||||||
|
password: string;
|
||||||
|
telegramOtpCode?: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DisableTelegramResponse {
|
||||||
|
status: string;
|
||||||
|
message: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const IDENTITY_PACKAGE_NAME = "identity";
|
||||||
|
|
||||||
|
export interface AuthServiceClient {
|
||||||
|
login(request: LoginRequest): Observable<LoginResponse>;
|
||||||
|
|
||||||
|
refresh(request: RefreshRequest): Observable<RefreshResponse>;
|
||||||
|
|
||||||
|
logout(request: LogoutRequest): Observable<LogoutResponse>;
|
||||||
|
|
||||||
|
unlockPin(request: UnlockPinRequest): Observable<UnlockPinResponse>;
|
||||||
|
|
||||||
|
verify2Fa(request: Verify2FaRequest): Observable<Verify2FaResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AuthServiceController {
|
||||||
|
login(request: LoginRequest): Promise<LoginResponse> | Observable<LoginResponse> | LoginResponse;
|
||||||
|
|
||||||
|
refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
|
||||||
|
|
||||||
|
logout(request: LogoutRequest): Promise<LogoutResponse> | Observable<LogoutResponse> | LogoutResponse;
|
||||||
|
|
||||||
|
unlockPin(request: UnlockPinRequest): Promise<UnlockPinResponse> | Observable<UnlockPinResponse> | UnlockPinResponse;
|
||||||
|
|
||||||
|
verify2Fa(request: Verify2FaRequest): Promise<Verify2FaResponse> | Observable<Verify2FaResponse> | Verify2FaResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function AuthServiceControllerMethods() {
|
||||||
|
return function (constructor: Function) {
|
||||||
|
const grpcMethods: string[] = ["login", "refresh", "logout", "unlockPin", "verify2Fa"];
|
||||||
|
for (const method of grpcMethods) {
|
||||||
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
||||||
|
}
|
||||||
|
const grpcStreamMethods: string[] = [];
|
||||||
|
for (const method of grpcStreamMethods) {
|
||||||
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const AUTH_SERVICE_NAME = "AuthService";
|
||||||
|
|
||||||
|
export interface TwoFaServiceClient {
|
||||||
|
getTwoFaStatus(request: GetTwoFaStatusRequest): Observable<GetTwoFaStatusResponse>;
|
||||||
|
|
||||||
|
startTotpEnrollment(request: AuthenticatedAccessRequest): Observable<StartTotpEnrollmentResponse>;
|
||||||
|
|
||||||
|
confirmTotpErollment(request: ConfirmTotpEnrollmentRequest): Observable<ConfirmTotpEnrollmentResponse>;
|
||||||
|
|
||||||
|
cancelTotpEnrollment(request: AuthenticatedAccessRequest): Observable<CancelTotpEnrollmentResponse>;
|
||||||
|
|
||||||
|
disableTotp(request: DisableTotpRequest): Observable<DisableTotpResponse>;
|
||||||
|
|
||||||
|
startTelegramEnrollment(request: AuthenticatedAccessRequest): Observable<StartTelegramEnrollmentResponse>;
|
||||||
|
|
||||||
|
confirmTelegramEnrollment(request: ConfirmTelegramEnrollmentRequest): Observable<ConfirmTelegramEnrollmentResponse>;
|
||||||
|
|
||||||
|
disableTelegram(request: DisableTelegramRequest): Observable<DisableTelegramResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TwoFaServiceController {
|
||||||
|
getTwoFaStatus(
|
||||||
|
request: GetTwoFaStatusRequest,
|
||||||
|
): Promise<GetTwoFaStatusResponse> | Observable<GetTwoFaStatusResponse> | GetTwoFaStatusResponse;
|
||||||
|
|
||||||
|
startTotpEnrollment(
|
||||||
|
request: AuthenticatedAccessRequest,
|
||||||
|
): Promise<StartTotpEnrollmentResponse> | Observable<StartTotpEnrollmentResponse> | StartTotpEnrollmentResponse;
|
||||||
|
|
||||||
|
confirmTotpErollment(
|
||||||
|
request: ConfirmTotpEnrollmentRequest,
|
||||||
|
): Promise<ConfirmTotpEnrollmentResponse> | Observable<ConfirmTotpEnrollmentResponse> | ConfirmTotpEnrollmentResponse;
|
||||||
|
|
||||||
|
cancelTotpEnrollment(
|
||||||
|
request: AuthenticatedAccessRequest,
|
||||||
|
): Promise<CancelTotpEnrollmentResponse> | Observable<CancelTotpEnrollmentResponse> | CancelTotpEnrollmentResponse;
|
||||||
|
|
||||||
|
disableTotp(
|
||||||
|
request: DisableTotpRequest,
|
||||||
|
): Promise<DisableTotpResponse> | Observable<DisableTotpResponse> | DisableTotpResponse;
|
||||||
|
|
||||||
|
startTelegramEnrollment(
|
||||||
|
request: AuthenticatedAccessRequest,
|
||||||
|
):
|
||||||
|
| Promise<StartTelegramEnrollmentResponse>
|
||||||
|
| Observable<StartTelegramEnrollmentResponse>
|
||||||
|
| StartTelegramEnrollmentResponse;
|
||||||
|
|
||||||
|
confirmTelegramEnrollment(
|
||||||
|
request: ConfirmTelegramEnrollmentRequest,
|
||||||
|
):
|
||||||
|
| Promise<ConfirmTelegramEnrollmentResponse>
|
||||||
|
| Observable<ConfirmTelegramEnrollmentResponse>
|
||||||
|
| ConfirmTelegramEnrollmentResponse;
|
||||||
|
|
||||||
|
disableTelegram(
|
||||||
|
request: DisableTelegramRequest,
|
||||||
|
): Promise<DisableTelegramResponse> | Observable<DisableTelegramResponse> | DisableTelegramResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function TwoFaServiceControllerMethods() {
|
||||||
|
return function (constructor: Function) {
|
||||||
|
const grpcMethods: string[] = [
|
||||||
|
"getTwoFaStatus",
|
||||||
|
"startTotpEnrollment",
|
||||||
|
"confirmTotpErollment",
|
||||||
|
"cancelTotpEnrollment",
|
||||||
|
"disableTotp",
|
||||||
|
"startTelegramEnrollment",
|
||||||
|
"confirmTelegramEnrollment",
|
||||||
|
"disableTelegram",
|
||||||
|
];
|
||||||
|
for (const method of grpcMethods) {
|
||||||
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
GrpcMethod("TwoFaService", method)(constructor.prototype[method], method, descriptor);
|
||||||
|
}
|
||||||
|
const grpcStreamMethods: string[] = [];
|
||||||
|
for (const method of grpcStreamMethods) {
|
||||||
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||||
|
GrpcStreamMethod("TwoFaService", method)(constructor.prototype[method], method, descriptor);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export const TWO_FA_SERVICE_NAME = "TwoFaService";
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lendry-erp/contracts",
|
"name": "@lendry-erp/contracts",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"description": "Protobuf definitions and generated TypeScript types",
|
"description": "Protobuf definitions and generated TypeScript types",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user