@acequants/aegis-contracts 0.1.3 → 0.1.5

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.
@@ -3,19 +3,19 @@ import _m0 from "protobufjs/minimal";
3
3
  import { Observable } from "rxjs";
4
4
  export declare const protobufPackage = "aegis.auth.v1";
5
5
  export interface AuthContext {
6
- userId: string;
6
+ sessionPublicId: string;
7
+ userPublicId: string;
7
8
  email: string;
8
- sessionId: string;
9
- displayName: string;
9
+ displayName?: string | undefined;
10
10
  }
11
11
  export interface ValidateAccessRequest {
12
- ip: string;
13
- userAgent: string;
14
12
  accessToken: string;
13
+ userAgent: string;
14
+ ip: string;
15
15
  }
16
16
  export interface ValidateAccessResponse {
17
- valid: boolean;
18
- reason: string;
17
+ valid?: boolean | undefined;
18
+ reason?: string | undefined;
19
19
  context?: AuthContext | undefined;
20
20
  }
21
21
  export interface AuthorizeRequest {
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../src/gen/auth/v1/auth.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAC;AAEnF,OAAO,GAAG,MAAM,oBAAoB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,O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NAME = "aegis.auth.v1";
10
10
  function createBaseAuthContext() {
11
- return { userId: "", email: "", sessionId: "", displayName: "" };
11
+ return { sessionPublicId: "", userPublicId: "", email: "" };
12
12
  }
13
13
  export const AuthContext = {
14
14
  encode(message, writer = _m0.Writer.create()) {
15
- if (message.userId !== "") {
16
- writer.uint32(10).string(message.userId);
15
+ if (message.sessionPublicId !== "") {
16
+ writer.uint32(10).string(message.sessionPublicId);
17
17
  }
18
- if (message.email !== "") {
19
- writer.uint32(18).string(message.email);
18
+ if (message.userPublicId !== "") {
19
+ writer.uint32(18).string(message.userPublicId);
20
20
  }
21
- if (message.sessionId !== "") {
22
- writer.uint32(26).string(message.sessionId);
21
+ if (message.email !== "") {
22
+ writer.uint32(26).string(message.email);
23
23
  }
24
- if (message.displayName !== "") {
24
+ if (message.displayName !== undefined) {
25
25
  writer.uint32(34).string(message.displayName);
26
26
  }
27
27
  return writer;
@@ -37,19 +37,19 @@ export const AuthContext = {
37
37
  if (tag !== 10) {
38
38
  break;
39
39
  }
40
- message.userId = reader.string();
40
+ message.sessionPublicId = reader.string();
41
41
  continue;
42
42
  case 2:
43
43
  if (tag !== 18) {
44
44
  break;
45
45
  }
46
- message.email = reader.string();
46
+ message.userPublicId = reader.string();
47
47
  continue;
48
48
  case 3:
49
49
  if (tag !== 26) {
50
50
  break;
51
51
  }
52
- message.sessionId = reader.string();
52
+ message.email = reader.string();
53
53
  continue;
54
54
  case 4:
55
55
  if (tag !== 34) {
@@ -67,18 +67,18 @@ export const AuthContext = {
67
67
  },
68
68
  };
69
69
  function createBaseValidateAccessRequest() {
70
- return { ip: "", userAgent: "", accessToken: "" };
70
+ return { accessToken: "", userAgent: "", ip: "" };
71
71
  }
72
72
  export const ValidateAccessRequest = {
73
73
  encode(message, writer = _m0.Writer.create()) {
74
- if (message.ip !== "") {
75
- writer.uint32(10).string(message.ip);
74
+ if (message.accessToken !== "") {
75
+ writer.uint32(10).string(message.accessToken);
76
76
  }
77
77
  if (message.userAgent !== "") {
78
78
  writer.uint32(18).string(message.userAgent);
79
79
  }
80
- if (message.accessToken !== "") {
81
- writer.uint32(26).string(message.accessToken);
80
+ if (message.ip !== "") {
81
+ writer.uint32(26).string(message.ip);
82
82
  }
83
83
  return writer;
84
84
  },
@@ -93,7 +93,7 @@ export const ValidateAccessRequest = {
93
93
  if (tag !== 10) {
94
94
  break;
95
95
  }
96
- message.ip = reader.string();
96
+ message.accessToken = reader.string();
97
97
  continue;
98
98
  case 2:
99
99
  if (tag !== 18) {
@@ -105,7 +105,7 @@ export const ValidateAccessRequest = {
105
105
  if (tag !== 26) {
106
106
  break;
107
107
  }
108
- message.accessToken = reader.string();
108
+ message.ip = reader.string();
109
109
  continue;
110
110
  }
111
111
  if ((tag & 7) === 4 || tag === 0) {
@@ -117,14 +117,14 @@ export const ValidateAccessRequest = {
117
117
  },
118
118
  };
119
119
  function createBaseValidateAccessResponse() {
120
- return { valid: false, reason: "" };
120
+ return {};
121
121
  }
122
122
  export const ValidateAccessResponse = {
123
123
  encode(message, writer = _m0.Writer.create()) {
124
- if (message.valid !== false) {
124
+ if (message.valid !== undefined) {
125
125
  writer.uint32(8).bool(message.valid);
126
126
  }
127
- if (message.reason !== "") {
127
+ if (message.reason !== undefined) {
128
128
  writer.uint32(18).string(message.reason);
129
129
  }
130
130
  if (message.context !== undefined) {
@@ -3,24 +3,23 @@ import _m0 from "protobufjs/minimal";
3
3
  import { Observable } from "rxjs";
4
4
  import { Timestamp } from "../../google/protobuf/timestamp";
5
5
  export declare const protobufPackage = "aegis.user.v1";
6
- /** ---- Request Message ---- */
7
- export interface InputRegisterUser {
8
- email: string;
9
- phone: string;
10
- displayName: string;
11
- password: string;
12
- }
13
6
  export interface InputGetUsers {
14
7
  page: number;
15
8
  pageSize: number;
16
- search: string;
17
- sortBy: string;
18
- sortOrder: string;
9
+ search?: string | undefined;
10
+ sortBy?: string | undefined;
11
+ sortOrder?: string | undefined;
19
12
  }
20
13
  export interface InputGetUser {
21
- publicId: string;
14
+ publicId?: string | undefined;
15
+ email?: string | undefined;
16
+ phone?: string | undefined;
17
+ }
18
+ export interface InputRegisterUser {
22
19
  email: string;
23
20
  phone: string;
21
+ displayName: string;
22
+ password: string;
24
23
  }
25
24
  /** ---- Response Message ---- */
26
25
  export interface DtoPaginationMeta {
@@ -37,18 +36,13 @@ export interface DtoUser {
37
36
  isEmailVerified: boolean;
38
37
  createdAt?: Timestamp | undefined;
39
38
  updatedAt?: Timestamp | undefined;
40
- /** google.protobuf.Date (For date only) */
41
39
  deletedAt?: Timestamp | undefined;
42
40
  }
43
41
  export interface DtoUsers {
44
- users: DtoUser[];
42
+ items: DtoUser[];
45
43
  meta?: DtoPaginationMeta | undefined;
46
44
  }
47
45
  export declare const AEGIS_USER_V1_PACKAGE_NAME = "aegis.user.v1";
48
- export declare const InputRegisterUser: {
49
- encode(message: InputRegisterUser, writer?: _m0.Writer): _m0.Writer;
50
- decode(input: _m0.Reader | Uint8Array, length?: number): InputRegisterUser;
51
- };
52
46
  export declare const InputGetUsers: {
53
47
  encode(message: InputGetUsers, writer?: _m0.Writer): _m0.Writer;
54
48
  decode(input: _m0.Reader | Uint8Array, length?: number): InputGetUsers;
@@ -57,6 +51,10 @@ export declare const InputGetUser: {
57
51
  encode(message: InputGetUser, writer?: _m0.Writer): _m0.Writer;
58
52
  decode(input: _m0.Reader | Uint8Array, length?: number): InputGetUser;
59
53
  };
54
+ export declare const InputRegisterUser: {
55
+ encode(message: InputRegisterUser, writer?: _m0.Writer): _m0.Writer;
56
+ decode(input: _m0.Reader | Uint8Array, length?: number): InputRegisterUser;
57
+ };
60
58
  export declare const DtoPaginationMeta: {
61
59
  encode(message: DtoPaginationMeta, writer?: _m0.Writer): _m0.Writer;
62
60
  decode(input: _m0.Reader | Uint8Array, length?: number): DtoPaginationMeta;
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../../src/gen/user/v1/user.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,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AAe,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;CACvD"}
@@ -8,55 +8,64 @@ import _m0 from "protobufjs/minimal";
8
8
  import { Timestamp } from "../../google/protobuf/timestamp";
9
9
  export const protobufPackage = "aegis.user.v1";
10
10
  export const AEGIS_USER_V1_PACKAGE_NAME = "aegis.user.v1";
11
- function createBaseInputRegisterUser() {
12
- return { email: "", phone: "", displayName: "", password: "" };
11
+ function createBaseInputGetUsers() {
12
+ return { page: 0, pageSize: 0 };
13
13
  }
14
- export const InputRegisterUser = {
14
+ export const InputGetUsers = {
15
15
  encode(message, writer = _m0.Writer.create()) {
16
- if (message.email !== "") {
17
- writer.uint32(10).string(message.email);
16
+ if (message.page !== 0) {
17
+ writer.uint32(8).int32(message.page);
18
18
  }
19
- if (message.phone !== "") {
20
- writer.uint32(18).string(message.phone);
19
+ if (message.pageSize !== 0) {
20
+ writer.uint32(16).int32(message.pageSize);
21
21
  }
22
- if (message.displayName !== "") {
23
- writer.uint32(26).string(message.displayName);
22
+ if (message.search !== undefined) {
23
+ writer.uint32(26).string(message.search);
24
24
  }
25
- if (message.password !== "") {
26
- writer.uint32(34).string(message.password);
25
+ if (message.sortBy !== undefined) {
26
+ writer.uint32(34).string(message.sortBy);
27
+ }
28
+ if (message.sortOrder !== undefined) {
29
+ writer.uint32(42).string(message.sortOrder);
27
30
  }
28
31
  return writer;
29
32
  },
30
33
  decode(input, length) {
31
34
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
32
35
  let end = length === undefined ? reader.len : reader.pos + length;
33
- const message = createBaseInputRegisterUser();
36
+ const message = createBaseInputGetUsers();
34
37
  while (reader.pos < end) {
35
38
  const tag = reader.uint32();
36
39
  switch (tag >>> 3) {
37
40
  case 1:
38
- if (tag !== 10) {
41
+ if (tag !== 8) {
39
42
  break;
40
43
  }
41
- message.email = reader.string();
44
+ message.page = reader.int32();
42
45
  continue;
43
46
  case 2:
44
- if (tag !== 18) {
47
+ if (tag !== 16) {
45
48
  break;
46
49
  }
47
- message.phone = reader.string();
50
+ message.pageSize = reader.int32();
48
51
  continue;
49
52
  case 3:
50
53
  if (tag !== 26) {
51
54
  break;
52
55
  }
53
- message.displayName = reader.string();
56
+ message.search = reader.string();
54
57
  continue;
55
58
  case 4:
56
59
  if (tag !== 34) {
57
60
  break;
58
61
  }
59
- message.password = reader.string();
62
+ message.sortBy = reader.string();
63
+ continue;
64
+ case 5:
65
+ if (tag !== 42) {
66
+ break;
67
+ }
68
+ message.sortOrder = reader.string();
60
69
  continue;
61
70
  }
62
71
  if ((tag & 7) === 4 || tag === 0) {
@@ -67,64 +76,46 @@ export const InputRegisterUser = {
67
76
  return message;
68
77
  },
69
78
  };
70
- function createBaseInputGetUsers() {
71
- return { page: 0, pageSize: 0, search: "", sortBy: "", sortOrder: "" };
79
+ function createBaseInputGetUser() {
80
+ return {};
72
81
  }
73
- export const InputGetUsers = {
82
+ export const InputGetUser = {
74
83
  encode(message, writer = _m0.Writer.create()) {
75
- if (message.page !== 0) {
76
- writer.uint32(8).int32(message.page);
77
- }
78
- if (message.pageSize !== 0) {
79
- writer.uint32(16).int32(message.pageSize);
80
- }
81
- if (message.search !== "") {
82
- writer.uint32(26).string(message.search);
84
+ if (message.publicId !== undefined) {
85
+ writer.uint32(10).string(message.publicId);
83
86
  }
84
- if (message.sortBy !== "") {
85
- writer.uint32(34).string(message.sortBy);
87
+ if (message.email !== undefined) {
88
+ writer.uint32(18).string(message.email);
86
89
  }
87
- if (message.sortOrder !== "") {
88
- writer.uint32(42).string(message.sortOrder);
90
+ if (message.phone !== undefined) {
91
+ writer.uint32(26).string(message.phone);
89
92
  }
90
93
  return writer;
91
94
  },
92
95
  decode(input, length) {
93
96
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
94
97
  let end = length === undefined ? reader.len : reader.pos + length;
95
- const message = createBaseInputGetUsers();
98
+ const message = createBaseInputGetUser();
96
99
  while (reader.pos < end) {
97
100
  const tag = reader.uint32();
98
101
  switch (tag >>> 3) {
99
102
  case 1:
100
- if (tag !== 8) {
103
+ if (tag !== 10) {
101
104
  break;
102
105
  }
103
- message.page = reader.int32();
106
+ message.publicId = reader.string();
104
107
  continue;
105
108
  case 2:
106
- if (tag !== 16) {
109
+ if (tag !== 18) {
107
110
  break;
108
111
  }
109
- message.pageSize = reader.int32();
112
+ message.email = reader.string();
110
113
  continue;
111
114
  case 3:
112
115
  if (tag !== 26) {
113
116
  break;
114
117
  }
115
- message.search = reader.string();
116
- continue;
117
- case 4:
118
- if (tag !== 34) {
119
- break;
120
- }
121
- message.sortBy = reader.string();
122
- continue;
123
- case 5:
124
- if (tag !== 42) {
125
- break;
126
- }
127
- message.sortOrder = reader.string();
118
+ message.phone = reader.string();
128
119
  continue;
129
120
  }
130
121
  if ((tag & 7) === 4 || tag === 0) {
@@ -135,26 +126,29 @@ export const InputGetUsers = {
135
126
  return message;
136
127
  },
137
128
  };
138
- function createBaseInputGetUser() {
139
- return { publicId: "", email: "", phone: "" };
129
+ function createBaseInputRegisterUser() {
130
+ return { email: "", phone: "", displayName: "", password: "" };
140
131
  }
141
- export const InputGetUser = {
132
+ export const InputRegisterUser = {
142
133
  encode(message, writer = _m0.Writer.create()) {
143
- if (message.publicId !== "") {
144
- writer.uint32(10).string(message.publicId);
145
- }
146
134
  if (message.email !== "") {
147
- writer.uint32(18).string(message.email);
135
+ writer.uint32(10).string(message.email);
148
136
  }
149
137
  if (message.phone !== "") {
150
- writer.uint32(26).string(message.phone);
138
+ writer.uint32(18).string(message.phone);
139
+ }
140
+ if (message.displayName !== "") {
141
+ writer.uint32(26).string(message.displayName);
142
+ }
143
+ if (message.password !== "") {
144
+ writer.uint32(34).string(message.password);
151
145
  }
152
146
  return writer;
153
147
  },
154
148
  decode(input, length) {
155
149
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
156
150
  let end = length === undefined ? reader.len : reader.pos + length;
157
- const message = createBaseInputGetUser();
151
+ const message = createBaseInputRegisterUser();
158
152
  while (reader.pos < end) {
159
153
  const tag = reader.uint32();
160
154
  switch (tag >>> 3) {
@@ -162,19 +156,25 @@ export const InputGetUser = {
162
156
  if (tag !== 10) {
163
157
  break;
164
158
  }
165
- message.publicId = reader.string();
159
+ message.email = reader.string();
166
160
  continue;
167
161
  case 2:
168
162
  if (tag !== 18) {
169
163
  break;
170
164
  }
171
- message.email = reader.string();
165
+ message.phone = reader.string();
172
166
  continue;
173
167
  case 3:
174
168
  if (tag !== 26) {
175
169
  break;
176
170
  }
177
- message.phone = reader.string();
171
+ message.displayName = reader.string();
172
+ continue;
173
+ case 4:
174
+ if (tag !== 34) {
175
+ break;
176
+ }
177
+ message.password = reader.string();
178
178
  continue;
179
179
  }
180
180
  if ((tag & 7) === 4 || tag === 0) {
@@ -340,11 +340,11 @@ export const DtoUser = {
340
340
  },
341
341
  };
342
342
  function createBaseDtoUsers() {
343
- return { users: [] };
343
+ return { items: [] };
344
344
  }
345
345
  export const DtoUsers = {
346
346
  encode(message, writer = _m0.Writer.create()) {
347
- for (const v of message.users) {
347
+ for (const v of message.items) {
348
348
  DtoUser.encode(v, writer.uint32(10).fork()).ldelim();
349
349
  }
350
350
  if (message.meta !== undefined) {
@@ -363,7 +363,7 @@ export const DtoUsers = {
363
363
  if (tag !== 10) {
364
364
  break;
365
365
  }
366
- message.users.push(DtoUser.decode(reader, reader.uint32()));
366
+ message.items.push(DtoUser.decode(reader, reader.uint32()));
367
367
  continue;
368
368
  case 2:
369
369
  if (tag !== 18) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acequants/aegis-contracts",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -10,22 +10,22 @@ service AuthService {
10
10
  }
11
11
 
12
12
  message AuthContext {
13
- string user_id = 1;
14
- string email = 2;
15
- string session_id = 3;
16
- string display_name = 4;
13
+ string session_public_id = 1;
14
+ string user_public_id = 2;
15
+ string email = 3;
16
+ optional string display_name = 4;
17
17
  }
18
18
 
19
19
  message ValidateAccessRequest {
20
- string ip = 1;
20
+ string access_token = 1;
21
21
  string user_agent = 2;
22
- string access_token = 3;
22
+ string ip = 3;
23
23
  }
24
24
 
25
25
  message ValidateAccessResponse {
26
- bool valid = 1;
27
- string reason = 2;
28
- AuthContext context = 3;
26
+ optional bool valid = 1;
27
+ optional string reason = 2;
28
+ optional AuthContext context = 3;
29
29
  }
30
30
 
31
31
  message AuthorizeRequest {
@@ -5,27 +5,29 @@ package aegis.user.v1;
5
5
  option java_multiple_files = true;
6
6
 
7
7
  import "google/protobuf/timestamp.proto";
8
+ // import "google/protobuf/empty.proto";
8
9
 
9
10
  // ---- Request Message ----
10
- message InputRegisterUser {
11
- string email = 1;
12
- string phone = 2;
13
- string display_name = 3;
14
- string password = 4;
15
- }
16
11
 
17
12
  message InputGetUsers {
18
13
  int32 page = 1;
19
14
  int32 page_size = 2;
20
- string search = 3;
21
- string sort_by = 4;
22
- string sort_order = 5;
15
+ optional string search = 3;
16
+ optional string sort_by = 4;
17
+ optional string sort_order = 5;
23
18
  }
24
19
 
25
20
  message InputGetUser {
26
- string public_id = 1;
27
- string email = 2;
28
- string phone = 3;
21
+ optional string public_id = 1;
22
+ optional string email = 2;
23
+ optional string phone = 3;
24
+ }
25
+
26
+ message InputRegisterUser {
27
+ string email = 1;
28
+ string phone = 2;
29
+ string display_name = 3;
30
+ string password = 4;
29
31
  }
30
32
 
31
33
  // ---- Response Message ----
@@ -44,11 +46,11 @@ message DtoUser {
44
46
  bool is_email_verified = 5;
45
47
  google.protobuf.Timestamp created_at = 6;
46
48
  google.protobuf.Timestamp updated_at = 7;
47
- google.protobuf.Timestamp deleted_at = 8; // google.protobuf.Date (For date only)
49
+ google.protobuf.Timestamp deleted_at = 8;
48
50
  }
49
51
 
50
52
  message DtoUsers {
51
- repeated DtoUser users = 1;
53
+ repeated DtoUser items = 1;
52
54
  DtoPaginationMeta meta = 2;
53
55
  }
54
56
 
@@ -58,3 +60,11 @@ service UserService {
58
60
  rpc GetUser (InputGetUser) returns (DtoUser);
59
61
  rpc Register (InputRegisterUser) returns (DtoUser);
60
62
  }
63
+
64
+ // - google.protobuf.Timestamp represents a point in time independent of time zones.
65
+ // - It stores time as:
66
+ // 1. seconds (since Unix epoch: 1970-01-01T00:00:00Z).
67
+ // 2. nanos (nanosecond fractions of a second).
68
+ // - Use google.protobuf.Timestamp when you want a full datetime.
69
+ // - If you only need date (without time), use google.type.Date.
70
+ // - If you only need time of day (without date), use google.type.TimeOfDay.