@ssoeasy-dev/proto 1.1.0-dev-feat-auth.4 → 1.1.0-dev-feat-auth.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.
Potentially problematic release.
This version of @ssoeasy-dev/proto might be problematic. Click here for more details.
- package/gen/ts/auth/v1/auth.ts +3 -2
- package/gen/ts/auth/v1/common.ts +1 -66
- package/gen/ts/{companies/v1/models/employee_company.ts → auth/v1/permission.ts} +63 -35
- package/gen/ts/auth/v1/user_policy.ts +14 -6
- package/gen/ts/auth/v1/verification.ts +40 -24
- package/gen/ts/common/v1/types.ts +25 -67
- package/gen/ts/companies/v1/owner.ts +41 -284
- package/gen/ts/companies/v1/service.ts +150 -0
- package/gen/ts/index.auth.ts +1 -1
- package/gen/ts/index.auth.v1.ts +2 -1
- package/gen/ts/index.common.ts +1 -1
- package/gen/ts/index.common.v1.ts +1 -1
- package/gen/ts/index.companies.ts +1 -1
- package/gen/ts/index.companies.v1.ts +2 -2
- package/gen/ts/index.ts +1 -4
- package/package.json +1 -1
- package/proto/auth/v1/auth.proto +3 -2
- package/proto/auth/v1/common.proto +0 -4
- package/proto/auth/v1/permission.proto +16 -0
- package/proto/auth/v1/user_policy.proto +4 -3
- package/proto/auth/v1/verification.proto +9 -6
- package/proto/common/v1/types.proto +2 -5
- package/proto/companies/v1/owner.proto +4 -19
- package/proto/companies/v1/service.proto +14 -0
- package/gen/ts/abac/v1/employee_attribute.ts +0 -501
- package/gen/ts/abac/v1/models/employee_attribute.ts +0 -190
- package/gen/ts/companies/v1/models/company.ts +0 -204
- package/gen/ts/companies/v1/models/employee.ts +0 -175
- package/gen/ts/companies/v1/models/subscription.ts +0 -166
- package/gen/ts/google/protobuf/timestamp.ts +0 -233
- package/gen/ts/index.abac.ts +0 -8
- package/gen/ts/index.abac.v1.models.ts +0 -8
- package/gen/ts/index.abac.v1.ts +0 -9
- package/gen/ts/index.companies.v1.models.ts +0 -11
- package/gen/ts/index.google.protobuf.ts +0 -8
- package/gen/ts/index.google.ts +0 -8
- package/gen/ts/index.services.ts +0 -8
- package/gen/ts/index.services.v1.ts +0 -8
- package/gen/ts/services/v1/services.ts +0 -293
- package/proto/abac/v1/employee_attribute.proto +0 -31
- package/proto/abac/v1/models/employee_attribute.proto +0 -11
- package/proto/companies/v1/models/company.proto +0 -12
- package/proto/companies/v1/models/employee.proto +0 -11
- package/proto/companies/v1/models/employee_company.proto +0 -9
- package/proto/companies/v1/models/subscription.proto +0 -10
- package/proto/services/v1/services.proto +0 -19
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.2
|
|
4
|
-
// protoc unknown
|
|
5
|
-
// source: services/v1/services.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 GetServiceByIdRequest {
|
|
12
|
-
$type: "services.v1.GetServiceByIdRequest";
|
|
13
|
-
id: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface ServiceResponse {
|
|
17
|
-
$type: "services.v1.ServiceResponse";
|
|
18
|
-
id: string;
|
|
19
|
-
name: string;
|
|
20
|
-
description?: string | undefined;
|
|
21
|
-
ownerCompanyId: string;
|
|
22
|
-
createdAt: number;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function createBaseGetServiceByIdRequest(): GetServiceByIdRequest {
|
|
26
|
-
return { $type: "services.v1.GetServiceByIdRequest", id: "" };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const GetServiceByIdRequest: MessageFns<GetServiceByIdRequest, "services.v1.GetServiceByIdRequest"> = {
|
|
30
|
-
$type: "services.v1.GetServiceByIdRequest" as const,
|
|
31
|
-
|
|
32
|
-
encode(message: GetServiceByIdRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
33
|
-
if (message.id !== "") {
|
|
34
|
-
writer.uint32(10).string(message.id);
|
|
35
|
-
}
|
|
36
|
-
return writer;
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
decode(input: BinaryReader | Uint8Array, length?: number): GetServiceByIdRequest {
|
|
40
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
41
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
42
|
-
const message = createBaseGetServiceByIdRequest();
|
|
43
|
-
while (reader.pos < end) {
|
|
44
|
-
const tag = reader.uint32();
|
|
45
|
-
switch (tag >>> 3) {
|
|
46
|
-
case 1: {
|
|
47
|
-
if (tag !== 10) {
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
message.id = reader.string();
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
reader.skip(tag & 7);
|
|
59
|
-
}
|
|
60
|
-
return message;
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
fromJSON(object: any): GetServiceByIdRequest {
|
|
64
|
-
return { $type: GetServiceByIdRequest.$type, id: isSet(object.id) ? globalThis.String(object.id) : "" };
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
toJSON(message: GetServiceByIdRequest): unknown {
|
|
68
|
-
const obj: any = {};
|
|
69
|
-
if (message.id !== "") {
|
|
70
|
-
obj.id = message.id;
|
|
71
|
-
}
|
|
72
|
-
return obj;
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
create<I extends Exact<DeepPartial<GetServiceByIdRequest>, I>>(base?: I): GetServiceByIdRequest {
|
|
76
|
-
return GetServiceByIdRequest.fromPartial(base ?? ({} as any));
|
|
77
|
-
},
|
|
78
|
-
fromPartial<I extends Exact<DeepPartial<GetServiceByIdRequest>, I>>(object: I): GetServiceByIdRequest {
|
|
79
|
-
const message = createBaseGetServiceByIdRequest();
|
|
80
|
-
message.id = object.id ?? "";
|
|
81
|
-
return message;
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
function createBaseServiceResponse(): ServiceResponse {
|
|
86
|
-
return {
|
|
87
|
-
$type: "services.v1.ServiceResponse",
|
|
88
|
-
id: "",
|
|
89
|
-
name: "",
|
|
90
|
-
description: undefined,
|
|
91
|
-
ownerCompanyId: "",
|
|
92
|
-
createdAt: 0,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export const ServiceResponse: MessageFns<ServiceResponse, "services.v1.ServiceResponse"> = {
|
|
97
|
-
$type: "services.v1.ServiceResponse" as const,
|
|
98
|
-
|
|
99
|
-
encode(message: ServiceResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
100
|
-
if (message.id !== "") {
|
|
101
|
-
writer.uint32(10).string(message.id);
|
|
102
|
-
}
|
|
103
|
-
if (message.name !== "") {
|
|
104
|
-
writer.uint32(18).string(message.name);
|
|
105
|
-
}
|
|
106
|
-
if (message.description !== undefined) {
|
|
107
|
-
writer.uint32(26).string(message.description);
|
|
108
|
-
}
|
|
109
|
-
if (message.ownerCompanyId !== "") {
|
|
110
|
-
writer.uint32(34).string(message.ownerCompanyId);
|
|
111
|
-
}
|
|
112
|
-
if (message.createdAt !== 0) {
|
|
113
|
-
writer.uint32(40).int64(message.createdAt);
|
|
114
|
-
}
|
|
115
|
-
return writer;
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ServiceResponse {
|
|
119
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
120
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
121
|
-
const message = createBaseServiceResponse();
|
|
122
|
-
while (reader.pos < end) {
|
|
123
|
-
const tag = reader.uint32();
|
|
124
|
-
switch (tag >>> 3) {
|
|
125
|
-
case 1: {
|
|
126
|
-
if (tag !== 10) {
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
message.id = reader.string();
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
case 2: {
|
|
134
|
-
if (tag !== 18) {
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
message.name = reader.string();
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
case 3: {
|
|
142
|
-
if (tag !== 26) {
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
message.description = reader.string();
|
|
147
|
-
continue;
|
|
148
|
-
}
|
|
149
|
-
case 4: {
|
|
150
|
-
if (tag !== 34) {
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
message.ownerCompanyId = reader.string();
|
|
155
|
-
continue;
|
|
156
|
-
}
|
|
157
|
-
case 5: {
|
|
158
|
-
if (tag !== 40) {
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
message.createdAt = longToNumber(reader.int64());
|
|
163
|
-
continue;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
reader.skip(tag & 7);
|
|
170
|
-
}
|
|
171
|
-
return message;
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
fromJSON(object: any): ServiceResponse {
|
|
175
|
-
return {
|
|
176
|
-
$type: ServiceResponse.$type,
|
|
177
|
-
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
178
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
179
|
-
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
180
|
-
ownerCompanyId: isSet(object.ownerCompanyId)
|
|
181
|
-
? globalThis.String(object.ownerCompanyId)
|
|
182
|
-
: isSet(object.owner_company_id)
|
|
183
|
-
? globalThis.String(object.owner_company_id)
|
|
184
|
-
: "",
|
|
185
|
-
createdAt: isSet(object.createdAt)
|
|
186
|
-
? globalThis.Number(object.createdAt)
|
|
187
|
-
: isSet(object.created_at)
|
|
188
|
-
? globalThis.Number(object.created_at)
|
|
189
|
-
: 0,
|
|
190
|
-
};
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
toJSON(message: ServiceResponse): unknown {
|
|
194
|
-
const obj: any = {};
|
|
195
|
-
if (message.id !== "") {
|
|
196
|
-
obj.id = message.id;
|
|
197
|
-
}
|
|
198
|
-
if (message.name !== "") {
|
|
199
|
-
obj.name = message.name;
|
|
200
|
-
}
|
|
201
|
-
if (message.description !== undefined) {
|
|
202
|
-
obj.description = message.description;
|
|
203
|
-
}
|
|
204
|
-
if (message.ownerCompanyId !== "") {
|
|
205
|
-
obj.ownerCompanyId = message.ownerCompanyId;
|
|
206
|
-
}
|
|
207
|
-
if (message.createdAt !== 0) {
|
|
208
|
-
obj.createdAt = Math.round(message.createdAt);
|
|
209
|
-
}
|
|
210
|
-
return obj;
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
create<I extends Exact<DeepPartial<ServiceResponse>, I>>(base?: I): ServiceResponse {
|
|
214
|
-
return ServiceResponse.fromPartial(base ?? ({} as any));
|
|
215
|
-
},
|
|
216
|
-
fromPartial<I extends Exact<DeepPartial<ServiceResponse>, I>>(object: I): ServiceResponse {
|
|
217
|
-
const message = createBaseServiceResponse();
|
|
218
|
-
message.id = object.id ?? "";
|
|
219
|
-
message.name = object.name ?? "";
|
|
220
|
-
message.description = object.description ?? undefined;
|
|
221
|
-
message.ownerCompanyId = object.ownerCompanyId ?? "";
|
|
222
|
-
message.createdAt = object.createdAt ?? 0;
|
|
223
|
-
return message;
|
|
224
|
-
},
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
export type ServicesServiceDefinition = typeof ServicesServiceDefinition;
|
|
228
|
-
export const ServicesServiceDefinition = {
|
|
229
|
-
name: "ServicesService",
|
|
230
|
-
fullName: "services.v1.ServicesService",
|
|
231
|
-
methods: {
|
|
232
|
-
getServiceById: {
|
|
233
|
-
name: "GetServiceById",
|
|
234
|
-
requestType: GetServiceByIdRequest,
|
|
235
|
-
requestStream: false,
|
|
236
|
-
responseType: ServiceResponse,
|
|
237
|
-
responseStream: false,
|
|
238
|
-
options: {},
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
} as const;
|
|
242
|
-
|
|
243
|
-
export interface ServicesServiceImplementation<CallContextExt = {}> {
|
|
244
|
-
getServiceById(
|
|
245
|
-
request: GetServiceByIdRequest,
|
|
246
|
-
context: CallContext & CallContextExt,
|
|
247
|
-
): Promise<DeepPartial<ServiceResponse>>;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export interface ServicesServiceClient<CallOptionsExt = {}> {
|
|
251
|
-
getServiceById(
|
|
252
|
-
request: DeepPartial<GetServiceByIdRequest>,
|
|
253
|
-
options?: CallOptions & CallOptionsExt,
|
|
254
|
-
): Promise<ServiceResponse>;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
258
|
-
|
|
259
|
-
type DeepPartial<T> = T extends Builtin ? T
|
|
260
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
261
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
262
|
-
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
263
|
-
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
264
|
-
: Partial<T>;
|
|
265
|
-
|
|
266
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
267
|
-
type Exact<P, I extends P> = P extends Builtin ? P
|
|
268
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
269
|
-
|
|
270
|
-
function longToNumber(int64: { toString(): string }): number {
|
|
271
|
-
const num = globalThis.Number(int64.toString());
|
|
272
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
273
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
274
|
-
}
|
|
275
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
276
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
277
|
-
}
|
|
278
|
-
return num;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
function isSet(value: any): boolean {
|
|
282
|
-
return value !== null && value !== undefined;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
interface MessageFns<T, V extends string> {
|
|
286
|
-
readonly $type: V;
|
|
287
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
288
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
289
|
-
fromJSON(object: any): T;
|
|
290
|
-
toJSON(message: T): unknown;
|
|
291
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
292
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
293
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package abac.v1;
|
|
4
|
-
|
|
5
|
-
import "abac/v1/models/employee_attribute.proto";
|
|
6
|
-
|
|
7
|
-
service EmployeeAttributeService {
|
|
8
|
-
rpc CreateEmployeeAttribute(CreateEmployeeAttributeRequest) returns (CreateEmployeeAttributeResponse);
|
|
9
|
-
rpc CreateEmployeeAttributeCompinsate(CreateEmployeeAttributeCompinsateRequest) returns (CreateEmployeeAttributeCompinsateResponse);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
message CreateEmployeeAttributeRequest {
|
|
13
|
-
string employee_id = 1;
|
|
14
|
-
string company_id = 2;
|
|
15
|
-
string service_id = 3;
|
|
16
|
-
string attribute_name = 4;
|
|
17
|
-
string attribute_value = 5;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
message CreateEmployeeAttributeResponse {
|
|
21
|
-
abac.v1.models.EmployeeAttribute employee_attribute = 1;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
message CreateEmployeeAttributeCompinsateRequest {
|
|
25
|
-
string employee_attribute_id = 1;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
message CreateEmployeeAttributeCompinsateResponse {
|
|
29
|
-
bool success = 1;
|
|
30
|
-
string message = 2;
|
|
31
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package services.v1;
|
|
4
|
-
|
|
5
|
-
service ServicesService {
|
|
6
|
-
rpc GetServiceById(GetServiceByIdRequest) returns (ServiceResponse);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
message GetServiceByIdRequest {
|
|
10
|
-
string id = 1;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
message ServiceResponse {
|
|
14
|
-
string id = 1;
|
|
15
|
-
string name = 2;
|
|
16
|
-
optional string description = 3;
|
|
17
|
-
string owner_company_id = 4;
|
|
18
|
-
int64 created_at = 5;
|
|
19
|
-
}
|