@arbiwallet/contracts 1.0.105 → 1.0.107

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/gen/content.ts CHANGED
@@ -116,6 +116,8 @@ export interface CreateFilialRequest {
116
116
  address: string;
117
117
  order: number;
118
118
  description?: string | undefined;
119
+ longitude?: number | undefined;
120
+ latitude?: number | undefined;
119
121
  }
120
122
 
121
123
  export interface CreateFilialResponse {
@@ -232,6 +234,8 @@ export interface Filial {
232
234
  address: string;
233
235
  order: number;
234
236
  description?: string | undefined;
237
+ longitude?: number | undefined;
238
+ latitude?: number | undefined;
235
239
  }
236
240
 
237
241
  export interface Partner {
@@ -0,0 +1,131 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.4
4
+ // protoc v7.34.0
5
+ // source: crm_auth.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "crm_auth";
12
+
13
+ export enum CrmManagerStatus {
14
+ CRM_MANAGER_STATUS_UNSPECIFIED = 0,
15
+ CRM_MANAGER_STATUS_ACTIVE = 1,
16
+ CRM_MANAGER_STATUS_DISABLED = 2,
17
+ UNRECOGNIZED = -1,
18
+ }
19
+
20
+ export interface CrmLoginRequest {
21
+ email: string;
22
+ otp: string;
23
+ userAgent: string;
24
+ ipAddress: string;
25
+ }
26
+
27
+ export interface CrmRefreshSessionRequest {
28
+ refreshToken: string;
29
+ userAgent: string;
30
+ ipAddress: string;
31
+ }
32
+
33
+ export interface CrmRevokeSessionRequest {
34
+ refreshToken: string;
35
+ }
36
+
37
+ export interface CrmRevokeSessionResponse {
38
+ success: boolean;
39
+ sessionId: string;
40
+ managerId: string;
41
+ reason: string;
42
+ }
43
+
44
+ export interface CrmValidateAccessRequest {
45
+ authorization: string;
46
+ }
47
+
48
+ export interface CrmValidateAccessResponse {
49
+ allowed: boolean;
50
+ managerId: string;
51
+ reason: string;
52
+ }
53
+
54
+ export interface CrmGetMeRequest {
55
+ accessToken: string;
56
+ }
57
+
58
+ export interface CrmManagerResponse {
59
+ id: string;
60
+ email: string;
61
+ username: string;
62
+ firstName: string;
63
+ lastName: string;
64
+ displayName: string;
65
+ avatarUrl: string;
66
+ status: CrmManagerStatus;
67
+ createdAtUnixMs: number;
68
+ }
69
+
70
+ export interface CrmAuthSessionResponse {
71
+ success: boolean;
72
+ accessToken: string;
73
+ accessExpiresAtUnixMs: number;
74
+ refreshToken: string;
75
+ refreshExpiresAtUnixMs: number;
76
+ sessionId: string;
77
+ managerId: string;
78
+ reason: string;
79
+ manager: CrmManagerResponse | undefined;
80
+ }
81
+
82
+ export const CRM_AUTH_PACKAGE_NAME = "crm_auth";
83
+
84
+ export interface CrmAuthServiceClient {
85
+ login(request: CrmLoginRequest): Observable<CrmAuthSessionResponse>;
86
+
87
+ refreshSession(request: CrmRefreshSessionRequest): Observable<CrmAuthSessionResponse>;
88
+
89
+ revokeSession(request: CrmRevokeSessionRequest): Observable<CrmRevokeSessionResponse>;
90
+
91
+ validateAccess(request: CrmValidateAccessRequest): Observable<CrmValidateAccessResponse>;
92
+
93
+ getMe(request: CrmGetMeRequest): Observable<CrmManagerResponse>;
94
+ }
95
+
96
+ export interface CrmAuthServiceController {
97
+ login(
98
+ request: CrmLoginRequest,
99
+ ): Promise<CrmAuthSessionResponse> | Observable<CrmAuthSessionResponse> | CrmAuthSessionResponse;
100
+
101
+ refreshSession(
102
+ request: CrmRefreshSessionRequest,
103
+ ): Promise<CrmAuthSessionResponse> | Observable<CrmAuthSessionResponse> | CrmAuthSessionResponse;
104
+
105
+ revokeSession(
106
+ request: CrmRevokeSessionRequest,
107
+ ): Promise<CrmRevokeSessionResponse> | Observable<CrmRevokeSessionResponse> | CrmRevokeSessionResponse;
108
+
109
+ validateAccess(
110
+ request: CrmValidateAccessRequest,
111
+ ): Promise<CrmValidateAccessResponse> | Observable<CrmValidateAccessResponse> | CrmValidateAccessResponse;
112
+
113
+ getMe(request: CrmGetMeRequest): Promise<CrmManagerResponse> | Observable<CrmManagerResponse> | CrmManagerResponse;
114
+ }
115
+
116
+ export function CrmAuthServiceControllerMethods() {
117
+ return function (constructor: Function) {
118
+ const grpcMethods: string[] = ["login", "refreshSession", "revokeSession", "validateAccess", "getMe"];
119
+ for (const method of grpcMethods) {
120
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
121
+ GrpcMethod("CrmAuthService", method)(constructor.prototype[method], method, descriptor);
122
+ }
123
+ const grpcStreamMethods: string[] = [];
124
+ for (const method of grpcStreamMethods) {
125
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
126
+ GrpcStreamMethod("CrmAuthService", method)(constructor.prototype[method], method, descriptor);
127
+ }
128
+ };
129
+ }
130
+
131
+ export const CRM_AUTH_SERVICE_NAME = "CrmAuthService";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arbiwallet/contracts",
3
3
  "descriptions": "Generate and manage smart contracts for ArbiWallet",
4
- "version": "1.0.105",
4
+ "version": "1.0.107",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -149,6 +149,8 @@ message CreateFilialRequest {
149
149
  string address = 3;
150
150
  int32 order = 4;
151
151
  optional string description = 5;
152
+ optional double longitude = 6;
153
+ optional double latitude = 7;
152
154
  }
153
155
 
154
156
  message CreateFilialResponse {
@@ -261,6 +263,8 @@ message Filial {
261
263
  string address = 4;
262
264
  int32 order = 5;
263
265
  optional string description = 6;
266
+ optional double longitude = 7;
267
+ optional double latitude = 8;
264
268
  }
265
269
 
266
270
  message Partner {
@@ -0,0 +1,78 @@
1
+ syntax = "proto3";
2
+ package crm_auth;
3
+
4
+ service CrmAuthService {
5
+ rpc Login (CrmLoginRequest) returns (CrmAuthSessionResponse);
6
+ rpc RefreshSession (CrmRefreshSessionRequest) returns (CrmAuthSessionResponse);
7
+ rpc RevokeSession (CrmRevokeSessionRequest) returns (CrmRevokeSessionResponse);
8
+ rpc ValidateAccess (CrmValidateAccessRequest) returns (CrmValidateAccessResponse);
9
+ rpc GetMe (CrmGetMeRequest) returns (CrmManagerResponse);
10
+ }
11
+
12
+ enum CrmManagerStatus {
13
+ CRM_MANAGER_STATUS_UNSPECIFIED = 0;
14
+ CRM_MANAGER_STATUS_ACTIVE = 1;
15
+ CRM_MANAGER_STATUS_DISABLED = 2;
16
+ }
17
+
18
+ message CrmLoginRequest {
19
+ string email = 1;
20
+ string otp = 2;
21
+ string user_agent = 3;
22
+ string ip_address = 4;
23
+ }
24
+
25
+ message CrmRefreshSessionRequest {
26
+ string refresh_token = 1;
27
+ string user_agent = 2;
28
+ string ip_address = 3;
29
+ }
30
+
31
+ message CrmRevokeSessionRequest {
32
+ string refresh_token = 1;
33
+ }
34
+
35
+ message CrmRevokeSessionResponse {
36
+ bool success = 1;
37
+ string session_id = 2;
38
+ string manager_id = 3;
39
+ string reason = 4;
40
+ }
41
+
42
+ message CrmValidateAccessRequest {
43
+ string authorization = 1;
44
+ }
45
+
46
+ message CrmValidateAccessResponse {
47
+ bool allowed = 1;
48
+ string manager_id = 2;
49
+ string reason = 3;
50
+ }
51
+
52
+ message CrmGetMeRequest {
53
+ string access_token = 1;
54
+ }
55
+
56
+ message CrmManagerResponse {
57
+ string id = 1;
58
+ string email = 2;
59
+ string username = 3;
60
+ string first_name = 4;
61
+ string last_name = 5;
62
+ string display_name = 6;
63
+ string avatar_url = 7;
64
+ CrmManagerStatus status = 8;
65
+ int64 created_at_unix_ms = 9;
66
+ }
67
+
68
+ message CrmAuthSessionResponse {
69
+ bool success = 1;
70
+ string access_token = 2;
71
+ int64 access_expires_at_unix_ms = 3;
72
+ string refresh_token = 4;
73
+ int64 refresh_expires_at_unix_ms = 5;
74
+ string session_id = 6;
75
+ string manager_id = 7;
76
+ string reason = 8;
77
+ CrmManagerResponse manager = 9;
78
+ }