@platfformx/proto-contracts 1.1.4 → 1.1.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.
@@ -0,0 +1,94 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "users_service.v1";
3
+ /** Get account */
4
+ export interface GetProfileRequest {
5
+ userId: string;
6
+ }
7
+ export interface GetProfileResponse {
8
+ id: string;
9
+ firstName?: string | undefined;
10
+ lastName?: string | undefined;
11
+ picture?: string | undefined;
12
+ }
13
+ /** init + change email */
14
+ export interface InitEmailChangeRequest {
15
+ userId: string;
16
+ email: string;
17
+ }
18
+ export interface InitEmailChangeResponse {
19
+ verificationId: string;
20
+ }
21
+ export interface ConfirmEmailChangeRequest {
22
+ userId: string;
23
+ email: string;
24
+ verificationId: string;
25
+ code: string;
26
+ }
27
+ export interface ConfirmEmailChangeResponse {
28
+ ok: boolean;
29
+ }
30
+ /** init + change phone */
31
+ export interface InitPhoneChangeRequest {
32
+ userId: string;
33
+ phone: string;
34
+ }
35
+ export interface InitPhoneChangeResponse {
36
+ verificationId: string;
37
+ }
38
+ export interface ConfirmPhoneChangeRequest {
39
+ userId: string;
40
+ phone: string;
41
+ verificationId: string;
42
+ code: string;
43
+ }
44
+ export interface ConfirmPhoneChangeResponse {
45
+ ok: boolean;
46
+ }
47
+ /** update profile */
48
+ export interface UpdateProfileRequest {
49
+ userId: string;
50
+ username?: string | undefined;
51
+ displayName?: string | undefined;
52
+ }
53
+ export interface UpdateProfileResponse {
54
+ userId: string;
55
+ username?: string | undefined;
56
+ displayName?: string | undefined;
57
+ }
58
+ /** change password */
59
+ export interface ChangePasswordRequest {
60
+ userId: string;
61
+ oldPassword: string;
62
+ newPasword: string;
63
+ }
64
+ export interface ChangePasswordResponse {
65
+ ok: boolean;
66
+ }
67
+ /** link oauth */
68
+ export interface LinkOAuthRequest {
69
+ userId: string;
70
+ oauthToken: string;
71
+ }
72
+ export interface LinkOAuthResponse {
73
+ }
74
+ export declare const USERS_SERVICE_V1_PACKAGE_NAME = "users_service.v1";
75
+ export interface AccountServiceClient {
76
+ getProfile(request: GetProfileRequest): Observable<GetProfileResponse>;
77
+ updateProfile(request: UpdateProfileRequest): Observable<UpdateProfileRequest>;
78
+ initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
79
+ initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
80
+ confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
81
+ confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
82
+ linkOAuth(request: LinkOAuthRequest): Observable<LinkOAuthResponse>;
83
+ }
84
+ export interface AccountServiceController {
85
+ getProfile(request: GetProfileRequest): Promise<GetProfileResponse> | Observable<GetProfileResponse> | GetProfileResponse;
86
+ updateProfile(request: UpdateProfileRequest): Promise<UpdateProfileRequest> | Observable<UpdateProfileRequest> | UpdateProfileRequest;
87
+ initEmailChange(request: InitEmailChangeRequest): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
88
+ initPhoneChange(request: InitPhoneChangeRequest): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
89
+ confirmEmailChange(request: ConfirmEmailChangeRequest): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
90
+ confirmPhoneChange(request: ConfirmPhoneChangeRequest): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
91
+ linkOAuth(request: LinkOAuthRequest): Promise<LinkOAuthResponse> | Observable<LinkOAuthResponse> | LinkOAuthResponse;
92
+ }
93
+ export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
94
+ export declare const ACCOUNT_SERVICE_NAME = "AccountService";
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.11.8
5
+ // protoc v7.34.0
6
+ // source: users-service/account.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ACCOUNT_SERVICE_NAME = exports.USERS_SERVICE_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.AccountServiceControllerMethods = AccountServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "users_service.v1";
13
+ exports.USERS_SERVICE_V1_PACKAGE_NAME = "users_service.v1";
14
+ function AccountServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = [
17
+ "getProfile",
18
+ "updateProfile",
19
+ "initEmailChange",
20
+ "initPhoneChange",
21
+ "confirmEmailChange",
22
+ "confirmPhoneChange",
23
+ "linkOAuth",
24
+ ];
25
+ for (const method of grpcMethods) {
26
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
27
+ (0, microservices_1.GrpcMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
28
+ }
29
+ const grpcStreamMethods = [];
30
+ for (const method of grpcStreamMethods) {
31
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
32
+ (0, microservices_1.GrpcStreamMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
33
+ }
34
+ };
35
+ }
36
+ exports.ACCOUNT_SERVICE_NAME = "AccountService";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './paths/index';
2
2
  export * from './paths/proto-paths';
3
3
  export * as Auth from './gen/ts/auth-service/auth';
4
- export * as Account from './gen/ts/auth-service/account';
4
+ export * as Account from './gen/ts/users-service/account';
5
5
  export { OAuthProvider } from './gen/ts/auth-service/auth';
package/dist/index.js CHANGED
@@ -40,6 +40,6 @@ exports.OAuthProvider = exports.Account = exports.Auth = void 0;
40
40
  __exportStar(require("./paths/index"), exports);
41
41
  __exportStar(require("./paths/proto-paths"), exports);
42
42
  exports.Auth = __importStar(require("./gen/ts/auth-service/auth"));
43
- exports.Account = __importStar(require("./gen/ts/auth-service/account"));
43
+ exports.Account = __importStar(require("./gen/ts/users-service/account"));
44
44
  var auth_1 = require("./gen/ts/auth-service/auth");
45
45
  Object.defineProperty(exports, "OAuthProvider", { enumerable: true, get: function () { return auth_1.OAuthProvider; } });
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROTO_PATHS = void 0;
4
4
  const path_1 = require("path");
5
5
  exports.PROTO_PATHS = {
6
- ACCOUNT: (0, path_1.join)(__dirname, '../../proto/auth-service/account.proto'),
6
+ ACCOUNT: (0, path_1.join)(__dirname, '../../proto/users-service/account.proto'),
7
7
  AUTH: (0, path_1.join)(__dirname, '../../proto/auth-service/auth.proto'),
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platfformx/proto-contracts",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  syntax = "proto3";
2
2
 
3
- package auth_service.v1;
3
+ package users_service.v1;
4
4
 
5
5
  service AccountService {
6
6
  rpc GetProfile (GetProfileRequest) returns (GetProfileResponse);