@ssoeasy-dev/proto 1.1.1-beta.3 → 1.1.1-beta.7

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.
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
  // source: auth/v1/auth.proto
6
6
 
@@ -18,6 +18,17 @@ import {
18
18
  verificationTypeToNumber,
19
19
  } from "./verification";
20
20
 
21
+ export interface GetMeRequest {
22
+ $type: "auth.v1.GetMeRequest";
23
+ token: string;
24
+ }
25
+
26
+ export interface GetMeResponse {
27
+ $type: "auth.v1.GetMeResponse";
28
+ userId: string;
29
+ login: string;
30
+ }
31
+
21
32
  export interface AuthCode {
22
33
  $type: "auth.v1.AuthCode";
23
34
  id: string;
@@ -77,6 +88,149 @@ export interface AuthorizeRequest {
77
88
  code?: CodeVerifier | undefined;
78
89
  }
79
90
 
91
+ function createBaseGetMeRequest(): GetMeRequest {
92
+ return { $type: "auth.v1.GetMeRequest", token: "" };
93
+ }
94
+
95
+ export const GetMeRequest: MessageFns<GetMeRequest, "auth.v1.GetMeRequest"> = {
96
+ $type: "auth.v1.GetMeRequest" as const,
97
+
98
+ encode(message: GetMeRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
99
+ if (message.token !== "") {
100
+ writer.uint32(10).string(message.token);
101
+ }
102
+ return writer;
103
+ },
104
+
105
+ decode(input: BinaryReader | Uint8Array, length?: number): GetMeRequest {
106
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
107
+ const end = length === undefined ? reader.len : reader.pos + length;
108
+ const message = createBaseGetMeRequest();
109
+ while (reader.pos < end) {
110
+ const tag = reader.uint32();
111
+ switch (tag >>> 3) {
112
+ case 1: {
113
+ if (tag !== 10) {
114
+ break;
115
+ }
116
+
117
+ message.token = reader.string();
118
+ continue;
119
+ }
120
+ }
121
+ if ((tag & 7) === 4 || tag === 0) {
122
+ break;
123
+ }
124
+ reader.skip(tag & 7);
125
+ }
126
+ return message;
127
+ },
128
+
129
+ fromJSON(object: any): GetMeRequest {
130
+ return { $type: GetMeRequest.$type, token: isSet(object.token) ? globalThis.String(object.token) : "" };
131
+ },
132
+
133
+ toJSON(message: GetMeRequest): unknown {
134
+ const obj: any = {};
135
+ if (message.token !== "") {
136
+ obj.token = message.token;
137
+ }
138
+ return obj;
139
+ },
140
+
141
+ create<I extends Exact<DeepPartial<GetMeRequest>, I>>(base?: I): GetMeRequest {
142
+ return GetMeRequest.fromPartial(base ?? ({} as any));
143
+ },
144
+ fromPartial<I extends Exact<DeepPartial<GetMeRequest>, I>>(object: I): GetMeRequest {
145
+ const message = createBaseGetMeRequest();
146
+ message.token = object.token ?? "";
147
+ return message;
148
+ },
149
+ };
150
+
151
+ function createBaseGetMeResponse(): GetMeResponse {
152
+ return { $type: "auth.v1.GetMeResponse", userId: "", login: "" };
153
+ }
154
+
155
+ export const GetMeResponse: MessageFns<GetMeResponse, "auth.v1.GetMeResponse"> = {
156
+ $type: "auth.v1.GetMeResponse" as const,
157
+
158
+ encode(message: GetMeResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
159
+ if (message.userId !== "") {
160
+ writer.uint32(10).string(message.userId);
161
+ }
162
+ if (message.login !== "") {
163
+ writer.uint32(18).string(message.login);
164
+ }
165
+ return writer;
166
+ },
167
+
168
+ decode(input: BinaryReader | Uint8Array, length?: number): GetMeResponse {
169
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
170
+ const end = length === undefined ? reader.len : reader.pos + length;
171
+ const message = createBaseGetMeResponse();
172
+ while (reader.pos < end) {
173
+ const tag = reader.uint32();
174
+ switch (tag >>> 3) {
175
+ case 1: {
176
+ if (tag !== 10) {
177
+ break;
178
+ }
179
+
180
+ message.userId = reader.string();
181
+ continue;
182
+ }
183
+ case 2: {
184
+ if (tag !== 18) {
185
+ break;
186
+ }
187
+
188
+ message.login = reader.string();
189
+ continue;
190
+ }
191
+ }
192
+ if ((tag & 7) === 4 || tag === 0) {
193
+ break;
194
+ }
195
+ reader.skip(tag & 7);
196
+ }
197
+ return message;
198
+ },
199
+
200
+ fromJSON(object: any): GetMeResponse {
201
+ return {
202
+ $type: GetMeResponse.$type,
203
+ userId: isSet(object.userId)
204
+ ? globalThis.String(object.userId)
205
+ : isSet(object.user_id)
206
+ ? globalThis.String(object.user_id)
207
+ : "",
208
+ login: isSet(object.login) ? globalThis.String(object.login) : "",
209
+ };
210
+ },
211
+
212
+ toJSON(message: GetMeResponse): unknown {
213
+ const obj: any = {};
214
+ if (message.userId !== "") {
215
+ obj.userId = message.userId;
216
+ }
217
+ if (message.login !== "") {
218
+ obj.login = message.login;
219
+ }
220
+ return obj;
221
+ },
222
+
223
+ create<I extends Exact<DeepPartial<GetMeResponse>, I>>(base?: I): GetMeResponse {
224
+ return GetMeResponse.fromPartial(base ?? ({} as any));
225
+ },
226
+ fromPartial<I extends Exact<DeepPartial<GetMeResponse>, I>>(object: I): GetMeResponse {
227
+ const message = createBaseGetMeResponse();
228
+ message.userId = object.userId ?? "";
229
+ message.login = object.login ?? "";
230
+ return message;
231
+ },
232
+ };
233
+
80
234
  function createBaseAuthCode(): AuthCode {
81
235
  return { $type: "auth.v1.AuthCode", id: "", value: "", expiresAt: 0 };
82
236
  }
@@ -970,41 +1124,49 @@ export const AuthServiceDefinition = {
970
1124
  methods: {
971
1125
  registration: {
972
1126
  name: "Registration",
973
- requestType: RegistrationRequest,
1127
+ requestType: RegistrationRequest as typeof RegistrationRequest,
974
1128
  requestStream: false,
975
- responseType: RegistrationResponse,
1129
+ responseType: RegistrationResponse as typeof RegistrationResponse,
976
1130
  responseStream: false,
977
1131
  options: {},
978
1132
  },
979
1133
  registrationCompensate: {
980
1134
  name: "RegistrationCompensate",
981
- requestType: RegistrationCompensateRequest,
1135
+ requestType: RegistrationCompensateRequest as typeof RegistrationCompensateRequest,
982
1136
  requestStream: false,
983
- responseType: StatusResponse,
1137
+ responseType: StatusResponse as typeof StatusResponse,
984
1138
  responseStream: false,
985
1139
  options: {},
986
1140
  },
987
1141
  login: {
988
1142
  name: "Login",
989
- requestType: LoginRequest,
1143
+ requestType: LoginRequest as typeof LoginRequest,
990
1144
  requestStream: false,
991
- responseType: LoginResponse,
1145
+ responseType: LoginResponse as typeof LoginResponse,
992
1146
  responseStream: false,
993
1147
  options: {},
994
1148
  },
995
1149
  authorize: {
996
1150
  name: "Authorize",
997
- requestType: AuthorizeRequest,
1151
+ requestType: AuthorizeRequest as typeof AuthorizeRequest,
998
1152
  requestStream: false,
999
- responseType: Tokens,
1153
+ responseType: Tokens as typeof Tokens,
1000
1154
  responseStream: false,
1001
1155
  options: {},
1002
1156
  },
1003
1157
  logout: {
1004
1158
  name: "Logout",
1005
- requestType: Tokens,
1159
+ requestType: Tokens as typeof Tokens,
1160
+ requestStream: false,
1161
+ responseType: StatusResponse as typeof StatusResponse,
1162
+ responseStream: false,
1163
+ options: {},
1164
+ },
1165
+ getMe: {
1166
+ name: "GetMe",
1167
+ requestType: GetMeRequest as typeof GetMeRequest,
1006
1168
  requestStream: false,
1007
- responseType: StatusResponse,
1169
+ responseType: GetMeResponse as typeof GetMeResponse,
1008
1170
  responseStream: false,
1009
1171
  options: {},
1010
1172
  },
@@ -1023,6 +1185,7 @@ export interface AuthServiceImplementation<CallContextExt = {}> {
1023
1185
  login(request: LoginRequest, context: CallContext & CallContextExt): Promise<DeepPartial<LoginResponse>>;
1024
1186
  authorize(request: AuthorizeRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Tokens>>;
1025
1187
  logout(request: Tokens, context: CallContext & CallContextExt): Promise<DeepPartial<StatusResponse>>;
1188
+ getMe(request: GetMeRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetMeResponse>>;
1026
1189
  }
1027
1190
 
1028
1191
  export interface AuthServiceClient<CallOptionsExt = {}> {
@@ -1037,6 +1200,7 @@ export interface AuthServiceClient<CallOptionsExt = {}> {
1037
1200
  login(request: DeepPartial<LoginRequest>, options?: CallOptions & CallOptionsExt): Promise<LoginResponse>;
1038
1201
  authorize(request: DeepPartial<AuthorizeRequest>, options?: CallOptions & CallOptionsExt): Promise<Tokens>;
1039
1202
  logout(request: DeepPartial<Tokens>, options?: CallOptions & CallOptionsExt): Promise<StatusResponse>;
1203
+ getMe(request: DeepPartial<GetMeRequest>, options?: CallOptions & CallOptionsExt): Promise<GetMeResponse>;
1040
1204
  }
1041
1205
 
1042
1206
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
  // source: auth/v1/common.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
  // source: auth/v1/permission.proto
6
6
 
@@ -122,9 +122,9 @@ export const PermissionServiceDefinition = {
122
122
  methods: {
123
123
  checkPermission: {
124
124
  name: "CheckPermission",
125
- requestType: CheckPermissionRequest,
125
+ requestType: CheckPermissionRequest as typeof CheckPermissionRequest,
126
126
  requestStream: false,
127
- responseType: StatusResponse,
127
+ responseType: StatusResponse as typeof StatusResponse,
128
128
  responseStream: false,
129
129
  options: {},
130
130
  },
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
  // source: auth/v1/user_policy.proto
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
  // source: auth/v1/verification.proto
6
6
 
@@ -545,25 +545,25 @@ export const VerificationServiceDefinition = {
545
545
  methods: {
546
546
  verificate: {
547
547
  name: "Verificate",
548
- requestType: VerificateRequest,
548
+ requestType: VerificateRequest as typeof VerificateRequest,
549
549
  requestStream: false,
550
- responseType: StatusResponse,
550
+ responseType: StatusResponse as typeof StatusResponse,
551
551
  responseStream: false,
552
552
  options: {},
553
553
  },
554
554
  refresh: {
555
555
  name: "Refresh",
556
- requestType: RefreshRequest,
556
+ requestType: RefreshRequest as typeof RefreshRequest,
557
557
  requestStream: false,
558
- responseType: Verification,
558
+ responseType: Verification as typeof Verification,
559
559
  responseStream: false,
560
560
  options: {},
561
561
  },
562
562
  checkStatus: {
563
563
  name: "CheckStatus",
564
- requestType: CheckStatusRequest,
564
+ requestType: CheckStatusRequest as typeof CheckStatusRequest,
565
565
  requestStream: false,
566
- responseType: CheckStatusResponse,
566
+ responseType: CheckStatusResponse as typeof CheckStatusResponse,
567
567
  responseStream: false,
568
568
  options: {},
569
569
  },
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
  // source: common/v1/types.proto
6
6
 
@@ -0,0 +1,327 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.5
4
+ // protoc unknown
5
+ // source: companies/v1/employee.proto
6
+
7
+ /* eslint-disable */
8
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
+ import type { CallContext, CallOptions } from "nice-grpc-common";
10
+
11
+ export interface GetByUserIdRequest {
12
+ $type: "companies.v1.GetByUserIdRequest";
13
+ userId: string;
14
+ }
15
+
16
+ export interface EmployeeCompany {
17
+ $type: "companies.v1.EmployeeCompany";
18
+ id: string;
19
+ name: string;
20
+ }
21
+
22
+ export interface GetByUserIdResponse {
23
+ $type: "companies.v1.GetByUserIdResponse";
24
+ firstname: string;
25
+ lastname: string;
26
+ companies: EmployeeCompany[];
27
+ }
28
+
29
+ function createBaseGetByUserIdRequest(): GetByUserIdRequest {
30
+ return { $type: "companies.v1.GetByUserIdRequest", userId: "" };
31
+ }
32
+
33
+ export const GetByUserIdRequest: MessageFns<GetByUserIdRequest, "companies.v1.GetByUserIdRequest"> = {
34
+ $type: "companies.v1.GetByUserIdRequest" as const,
35
+
36
+ encode(message: GetByUserIdRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
37
+ if (message.userId !== "") {
38
+ writer.uint32(10).string(message.userId);
39
+ }
40
+ return writer;
41
+ },
42
+
43
+ decode(input: BinaryReader | Uint8Array, length?: number): GetByUserIdRequest {
44
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
45
+ const end = length === undefined ? reader.len : reader.pos + length;
46
+ const message = createBaseGetByUserIdRequest();
47
+ while (reader.pos < end) {
48
+ const tag = reader.uint32();
49
+ switch (tag >>> 3) {
50
+ case 1: {
51
+ if (tag !== 10) {
52
+ break;
53
+ }
54
+
55
+ message.userId = reader.string();
56
+ continue;
57
+ }
58
+ }
59
+ if ((tag & 7) === 4 || tag === 0) {
60
+ break;
61
+ }
62
+ reader.skip(tag & 7);
63
+ }
64
+ return message;
65
+ },
66
+
67
+ fromJSON(object: any): GetByUserIdRequest {
68
+ return {
69
+ $type: GetByUserIdRequest.$type,
70
+ userId: isSet(object.userId)
71
+ ? globalThis.String(object.userId)
72
+ : isSet(object.user_id)
73
+ ? globalThis.String(object.user_id)
74
+ : "",
75
+ };
76
+ },
77
+
78
+ toJSON(message: GetByUserIdRequest): unknown {
79
+ const obj: any = {};
80
+ if (message.userId !== "") {
81
+ obj.userId = message.userId;
82
+ }
83
+ return obj;
84
+ },
85
+
86
+ create<I extends Exact<DeepPartial<GetByUserIdRequest>, I>>(base?: I): GetByUserIdRequest {
87
+ return GetByUserIdRequest.fromPartial(base ?? ({} as any));
88
+ },
89
+ fromPartial<I extends Exact<DeepPartial<GetByUserIdRequest>, I>>(object: I): GetByUserIdRequest {
90
+ const message = createBaseGetByUserIdRequest();
91
+ message.userId = object.userId ?? "";
92
+ return message;
93
+ },
94
+ };
95
+
96
+ function createBaseEmployeeCompany(): EmployeeCompany {
97
+ return { $type: "companies.v1.EmployeeCompany", id: "", name: "" };
98
+ }
99
+
100
+ export const EmployeeCompany: MessageFns<EmployeeCompany, "companies.v1.EmployeeCompany"> = {
101
+ $type: "companies.v1.EmployeeCompany" as const,
102
+
103
+ encode(message: EmployeeCompany, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
104
+ if (message.id !== "") {
105
+ writer.uint32(10).string(message.id);
106
+ }
107
+ if (message.name !== "") {
108
+ writer.uint32(18).string(message.name);
109
+ }
110
+ return writer;
111
+ },
112
+
113
+ decode(input: BinaryReader | Uint8Array, length?: number): EmployeeCompany {
114
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
115
+ const end = length === undefined ? reader.len : reader.pos + length;
116
+ const message = createBaseEmployeeCompany();
117
+ while (reader.pos < end) {
118
+ const tag = reader.uint32();
119
+ switch (tag >>> 3) {
120
+ case 1: {
121
+ if (tag !== 10) {
122
+ break;
123
+ }
124
+
125
+ message.id = reader.string();
126
+ continue;
127
+ }
128
+ case 2: {
129
+ if (tag !== 18) {
130
+ break;
131
+ }
132
+
133
+ message.name = reader.string();
134
+ continue;
135
+ }
136
+ }
137
+ if ((tag & 7) === 4 || tag === 0) {
138
+ break;
139
+ }
140
+ reader.skip(tag & 7);
141
+ }
142
+ return message;
143
+ },
144
+
145
+ fromJSON(object: any): EmployeeCompany {
146
+ return {
147
+ $type: EmployeeCompany.$type,
148
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
149
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
150
+ };
151
+ },
152
+
153
+ toJSON(message: EmployeeCompany): unknown {
154
+ const obj: any = {};
155
+ if (message.id !== "") {
156
+ obj.id = message.id;
157
+ }
158
+ if (message.name !== "") {
159
+ obj.name = message.name;
160
+ }
161
+ return obj;
162
+ },
163
+
164
+ create<I extends Exact<DeepPartial<EmployeeCompany>, I>>(base?: I): EmployeeCompany {
165
+ return EmployeeCompany.fromPartial(base ?? ({} as any));
166
+ },
167
+ fromPartial<I extends Exact<DeepPartial<EmployeeCompany>, I>>(object: I): EmployeeCompany {
168
+ const message = createBaseEmployeeCompany();
169
+ message.id = object.id ?? "";
170
+ message.name = object.name ?? "";
171
+ return message;
172
+ },
173
+ };
174
+
175
+ function createBaseGetByUserIdResponse(): GetByUserIdResponse {
176
+ return { $type: "companies.v1.GetByUserIdResponse", firstname: "", lastname: "", companies: [] };
177
+ }
178
+
179
+ export const GetByUserIdResponse: MessageFns<GetByUserIdResponse, "companies.v1.GetByUserIdResponse"> = {
180
+ $type: "companies.v1.GetByUserIdResponse" as const,
181
+
182
+ encode(message: GetByUserIdResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
183
+ if (message.firstname !== "") {
184
+ writer.uint32(10).string(message.firstname);
185
+ }
186
+ if (message.lastname !== "") {
187
+ writer.uint32(18).string(message.lastname);
188
+ }
189
+ for (const v of message.companies) {
190
+ EmployeeCompany.encode(v!, writer.uint32(26).fork()).join();
191
+ }
192
+ return writer;
193
+ },
194
+
195
+ decode(input: BinaryReader | Uint8Array, length?: number): GetByUserIdResponse {
196
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
197
+ const end = length === undefined ? reader.len : reader.pos + length;
198
+ const message = createBaseGetByUserIdResponse();
199
+ while (reader.pos < end) {
200
+ const tag = reader.uint32();
201
+ switch (tag >>> 3) {
202
+ case 1: {
203
+ if (tag !== 10) {
204
+ break;
205
+ }
206
+
207
+ message.firstname = reader.string();
208
+ continue;
209
+ }
210
+ case 2: {
211
+ if (tag !== 18) {
212
+ break;
213
+ }
214
+
215
+ message.lastname = reader.string();
216
+ continue;
217
+ }
218
+ case 3: {
219
+ if (tag !== 26) {
220
+ break;
221
+ }
222
+
223
+ message.companies.push(EmployeeCompany.decode(reader, reader.uint32()));
224
+ continue;
225
+ }
226
+ }
227
+ if ((tag & 7) === 4 || tag === 0) {
228
+ break;
229
+ }
230
+ reader.skip(tag & 7);
231
+ }
232
+ return message;
233
+ },
234
+
235
+ fromJSON(object: any): GetByUserIdResponse {
236
+ return {
237
+ $type: GetByUserIdResponse.$type,
238
+ firstname: isSet(object.firstname) ? globalThis.String(object.firstname) : "",
239
+ lastname: isSet(object.lastname) ? globalThis.String(object.lastname) : "",
240
+ companies: globalThis.Array.isArray(object?.companies)
241
+ ? object.companies.map((e: any) => EmployeeCompany.fromJSON(e))
242
+ : [],
243
+ };
244
+ },
245
+
246
+ toJSON(message: GetByUserIdResponse): unknown {
247
+ const obj: any = {};
248
+ if (message.firstname !== "") {
249
+ obj.firstname = message.firstname;
250
+ }
251
+ if (message.lastname !== "") {
252
+ obj.lastname = message.lastname;
253
+ }
254
+ if (message.companies?.length) {
255
+ obj.companies = message.companies.map((e) => EmployeeCompany.toJSON(e));
256
+ }
257
+ return obj;
258
+ },
259
+
260
+ create<I extends Exact<DeepPartial<GetByUserIdResponse>, I>>(base?: I): GetByUserIdResponse {
261
+ return GetByUserIdResponse.fromPartial(base ?? ({} as any));
262
+ },
263
+ fromPartial<I extends Exact<DeepPartial<GetByUserIdResponse>, I>>(object: I): GetByUserIdResponse {
264
+ const message = createBaseGetByUserIdResponse();
265
+ message.firstname = object.firstname ?? "";
266
+ message.lastname = object.lastname ?? "";
267
+ message.companies = object.companies?.map((e) => EmployeeCompany.fromPartial(e)) || [];
268
+ return message;
269
+ },
270
+ };
271
+
272
+ export type EmployeeServiceDefinition = typeof EmployeeServiceDefinition;
273
+ export const EmployeeServiceDefinition = {
274
+ name: "EmployeeService",
275
+ fullName: "companies.v1.EmployeeService",
276
+ methods: {
277
+ getByUserId: {
278
+ name: "GetByUserId",
279
+ requestType: GetByUserIdRequest as typeof GetByUserIdRequest,
280
+ requestStream: false,
281
+ responseType: GetByUserIdResponse as typeof GetByUserIdResponse,
282
+ responseStream: false,
283
+ options: {},
284
+ },
285
+ },
286
+ } as const;
287
+
288
+ export interface EmployeeServiceImplementation<CallContextExt = {}> {
289
+ getByUserId(
290
+ request: GetByUserIdRequest,
291
+ context: CallContext & CallContextExt,
292
+ ): Promise<DeepPartial<GetByUserIdResponse>>;
293
+ }
294
+
295
+ export interface EmployeeServiceClient<CallOptionsExt = {}> {
296
+ getByUserId(
297
+ request: DeepPartial<GetByUserIdRequest>,
298
+ options?: CallOptions & CallOptionsExt,
299
+ ): Promise<GetByUserIdResponse>;
300
+ }
301
+
302
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
303
+
304
+ type DeepPartial<T> = T extends Builtin ? T
305
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
306
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
307
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
308
+ : T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
309
+ : Partial<T>;
310
+
311
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
312
+ type Exact<P, I extends P> = P extends Builtin ? P
313
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
314
+
315
+ function isSet(value: any): boolean {
316
+ return value !== null && value !== undefined;
317
+ }
318
+
319
+ interface MessageFns<T, V extends string> {
320
+ readonly $type: V;
321
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
322
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
323
+ fromJSON(object: any): T;
324
+ toJSON(message: T): unknown;
325
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
326
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
327
+ }
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
  // source: companies/v1/owner.proto
6
6
 
@@ -259,17 +259,17 @@ export const OwnerServiceDefinition = {
259
259
  methods: {
260
260
  registerOwner: {
261
261
  name: "RegisterOwner",
262
- requestType: RegisterOwnerRequest,
262
+ requestType: RegisterOwnerRequest as typeof RegisterOwnerRequest,
263
263
  requestStream: false,
264
- responseType: RegisterOwnerResponse,
264
+ responseType: RegisterOwnerResponse as typeof RegisterOwnerResponse,
265
265
  responseStream: false,
266
266
  options: {},
267
267
  },
268
268
  registerOwnerCompensate: {
269
269
  name: "RegisterOwnerCompensate",
270
- requestType: RegisterOwnerResponse,
270
+ requestType: RegisterOwnerResponse as typeof RegisterOwnerResponse,
271
271
  requestStream: false,
272
- responseType: StatusResponse,
272
+ responseType: StatusResponse as typeof StatusResponse,
273
273
  responseStream: false,
274
274
  options: {},
275
275
  },
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
  // source: companies/v1/service.proto
6
6
 
@@ -105,9 +105,9 @@ export const ServiceServiceDefinition = {
105
105
  methods: {
106
106
  checkUri: {
107
107
  name: "CheckUri",
108
- requestType: CheckUriRequest,
108
+ requestType: CheckUriRequest as typeof CheckUriRequest,
109
109
  requestStream: false,
110
- responseType: StatusResponse,
110
+ responseType: StatusResponse as typeof StatusResponse,
111
111
  responseStream: false,
112
112
  options: {},
113
113
  },
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
 
6
6
  /* eslint-disable */
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
 
6
6
  /* eslint-disable */
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
 
6
6
  /* eslint-disable */
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
 
6
6
  /* eslint-disable */
@@ -1,6 +1,6 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
 
6
6
  /* eslint-disable */
@@ -1,9 +1,10 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
 
6
6
  /* eslint-disable */
7
7
 
8
+ export * from "./companies/v1/employee";
8
9
  export * from "./companies/v1/owner";
9
10
  export * from "./companies/v1/service";
package/gen/ts/index.ts CHANGED
@@ -1,10 +1,8 @@
1
1
  // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
2
  // versions:
3
- // protoc-gen-ts_proto v2.11.4
3
+ // protoc-gen-ts_proto v2.11.5
4
4
  // protoc unknown
5
5
 
6
6
  /* eslint-disable */
7
7
 
8
8
  export * as common from "./index.common";
9
- export * as auth from "./index.auth";
10
- export * as companies from "./index.companies";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssoeasy-dev/proto",
3
- "version": "1.1.1-beta.3",
3
+ "version": "1.1.1-beta.7",
4
4
  "description": "gRPC proto contracts and generated TypeScript clients for SSOEasy",
5
5
  "main": "gen/ts/index.ts",
6
6
  "types": "gen/ts/index.ts",
@@ -13,6 +13,16 @@ service AuthService {
13
13
  rpc Login(LoginRequest) returns (LoginResponse);
14
14
  rpc Authorize(AuthorizeRequest) returns (auth.v1.Tokens);
15
15
  rpc Logout(Tokens) returns (common.v1.StatusResponse);
16
+ rpc GetMe(GetMeRequest) returns (GetMeResponse);
17
+ }
18
+
19
+ message GetMeRequest {
20
+ string token = 1;
21
+ }
22
+
23
+ message GetMeResponse {
24
+ string user_id = 1;
25
+ string login = 2;
16
26
  }
17
27
 
18
28
  message AuthCode {
@@ -0,0 +1,22 @@
1
+ syntax = "proto3";
2
+
3
+ package companies.v1;
4
+
5
+ service EmployeeService {
6
+ rpc GetByUserId(GetByUserIdRequest) returns (GetByUserIdResponse);
7
+ }
8
+
9
+ message GetByUserIdRequest {
10
+ string user_id = 1;
11
+ }
12
+
13
+ message EmployeeCompany {
14
+ string id = 1;
15
+ string name = 2;
16
+ }
17
+
18
+ message GetByUserIdResponse {
19
+ string firstname = 1;
20
+ string lastname = 2;
21
+ repeated EmployeeCompany companies = 3;
22
+ }