@ssoeasy-dev/proto 1.1.0-dev-feat-auth.5 → 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 +1 -1
- package/gen/ts/auth/v1/verification.ts +8 -8
- 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/verification.proto +3 -2
- 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
package/gen/ts/index.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
4
|
// protoc unknown
|
|
5
5
|
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
|
|
8
|
-
export * as abac from "./index.abac";
|
|
9
8
|
export * as auth from "./index.auth";
|
|
10
|
-
export * as google from "./index.google";
|
|
11
9
|
export * as common from "./index.common";
|
|
12
10
|
export * as companies from "./index.companies";
|
|
13
|
-
export * as services from "./index.services";
|
package/package.json
CHANGED
package/proto/auth/v1/auth.proto
CHANGED
|
@@ -5,13 +5,14 @@ package auth.v1;
|
|
|
5
5
|
import "auth/v1/verification.proto";
|
|
6
6
|
import "auth/v1/user_policy.proto";
|
|
7
7
|
import "auth/v1/common.proto";
|
|
8
|
+
import "common/v1/types.proto";
|
|
8
9
|
|
|
9
10
|
service AuthService {
|
|
10
11
|
rpc Registration(RegistrationRequest) returns (RegistrationResponse);
|
|
11
|
-
rpc RegistrationCompensate(RegistrationCompensateRequest) returns (
|
|
12
|
+
rpc RegistrationCompensate(RegistrationCompensateRequest) returns (common.v1.StatusResponse);
|
|
12
13
|
rpc Login(LoginRequest) returns (LoginResponse);
|
|
13
14
|
rpc Authorize(AuthorizeRequest) returns (auth.v1.Tokens);
|
|
14
|
-
rpc Logout(Tokens) returns (
|
|
15
|
+
rpc Logout(Tokens) returns (common.v1.StatusResponse);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
message AuthCode {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package auth.v1;
|
|
4
|
+
|
|
5
|
+
import "auth/v1/common.proto";
|
|
6
|
+
import "common/v1/types.proto";
|
|
7
|
+
|
|
8
|
+
service PermissionService {
|
|
9
|
+
rpc CheckPermission(CheckPermissionRequest) returns (common.v1.StatusResponse);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message CheckPermissionRequest {
|
|
13
|
+
string id = 1;
|
|
14
|
+
string token = 2;
|
|
15
|
+
optional string company_id = 3;
|
|
16
|
+
}
|
|
@@ -3,16 +3,17 @@ syntax = "proto3";
|
|
|
3
3
|
package auth.v1;
|
|
4
4
|
|
|
5
5
|
import "auth/v1/common.proto";
|
|
6
|
+
import "common/v1/types.proto";
|
|
6
7
|
|
|
7
8
|
service VerificationService {
|
|
8
|
-
rpc Verificate(VerificateRequest) returns (
|
|
9
|
+
rpc Verificate(VerificateRequest) returns (common.v1.StatusResponse);
|
|
9
10
|
rpc Refresh(RefreshRequest) returns (Verification);
|
|
10
11
|
rpc CheckStatus(CheckStatusRequest) returns (CheckStatusResponse);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
enum VerificationType {
|
|
14
15
|
VERIFICATION_TYPE_UNSPECIFIED = 0;
|
|
15
|
-
|
|
16
|
+
VERIFICATION_TYPE_EMAIL_CODE = 1;
|
|
16
17
|
VERIFICATION_TYPE_EMAIL_LINK = 2;
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -2,37 +2,22 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package companies.v1;
|
|
4
4
|
|
|
5
|
-
import "
|
|
6
|
-
import "companies/v1/models/employee.proto";
|
|
7
|
-
import "companies/v1/models/employee_company.proto";
|
|
8
|
-
import "companies/v1/models/subscription.proto";
|
|
5
|
+
import "common/v1/types.proto";
|
|
9
6
|
|
|
10
7
|
service OwnerService {
|
|
11
8
|
rpc RegisterOwner(RegisterOwnerRequest) returns (RegisterOwnerResponse);
|
|
12
|
-
rpc
|
|
9
|
+
rpc RegisterOwnerCompensate(RegisterOwnerResponse) returns (common.v1.StatusResponse);
|
|
13
10
|
}
|
|
14
11
|
|
|
15
12
|
message RegisterOwnerRequest {
|
|
16
13
|
string email = 1;
|
|
17
|
-
string
|
|
18
|
-
string
|
|
14
|
+
string firstname = 2;
|
|
15
|
+
string lastname = 3;
|
|
19
16
|
}
|
|
20
17
|
|
|
21
18
|
message RegisterOwnerResponse {
|
|
22
|
-
companies.v1.models.Company company = 1;
|
|
23
|
-
companies.v1.models.Employee employee = 2;
|
|
24
|
-
companies.v1.models.Subscription subscription = 3;
|
|
25
|
-
companies.v1.models.EmployeeCompany employee_company = 4;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
message RegisterOwnerCompinsateRequest {
|
|
29
19
|
string company_id = 1;
|
|
30
20
|
string employee_id = 2;
|
|
31
21
|
string subscription_id = 3;
|
|
32
22
|
string employee_company_id = 4;
|
|
33
23
|
}
|
|
34
|
-
|
|
35
|
-
message RegisterOwnerCompinsateResponse {
|
|
36
|
-
bool success = 1;
|
|
37
|
-
string message = 2;
|
|
38
|
-
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package companies.v1;
|
|
4
|
+
|
|
5
|
+
import "common/v1/types.proto";
|
|
6
|
+
|
|
7
|
+
service ServiceService {
|
|
8
|
+
rpc CheckUri(CheckUriRequest) returns (common.v1.StatusResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message CheckUriRequest {
|
|
12
|
+
string uri = 1;
|
|
13
|
+
string service_id = 2;
|
|
14
|
+
}
|
|
@@ -1,501 +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: abac/v1/employee_attribute.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
-
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
10
|
-
import { EmployeeAttribute } from "./models/employee_attribute";
|
|
11
|
-
|
|
12
|
-
export interface CreateEmployeeAttributeRequest {
|
|
13
|
-
$type: "abac.v1.CreateEmployeeAttributeRequest";
|
|
14
|
-
employeeId: string;
|
|
15
|
-
companyId: string;
|
|
16
|
-
serviceId: string;
|
|
17
|
-
attributeName: string;
|
|
18
|
-
attributeValue: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface CreateEmployeeAttributeResponse {
|
|
22
|
-
$type: "abac.v1.CreateEmployeeAttributeResponse";
|
|
23
|
-
employeeAttribute?: EmployeeAttribute | undefined;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface CreateEmployeeAttributeCompinsateRequest {
|
|
27
|
-
$type: "abac.v1.CreateEmployeeAttributeCompinsateRequest";
|
|
28
|
-
employeeAttributeId: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface CreateEmployeeAttributeCompinsateResponse {
|
|
32
|
-
$type: "abac.v1.CreateEmployeeAttributeCompinsateResponse";
|
|
33
|
-
success: boolean;
|
|
34
|
-
message: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function createBaseCreateEmployeeAttributeRequest(): CreateEmployeeAttributeRequest {
|
|
38
|
-
return {
|
|
39
|
-
$type: "abac.v1.CreateEmployeeAttributeRequest",
|
|
40
|
-
employeeId: "",
|
|
41
|
-
companyId: "",
|
|
42
|
-
serviceId: "",
|
|
43
|
-
attributeName: "",
|
|
44
|
-
attributeValue: "",
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export const CreateEmployeeAttributeRequest: MessageFns<
|
|
49
|
-
CreateEmployeeAttributeRequest,
|
|
50
|
-
"abac.v1.CreateEmployeeAttributeRequest"
|
|
51
|
-
> = {
|
|
52
|
-
$type: "abac.v1.CreateEmployeeAttributeRequest" as const,
|
|
53
|
-
|
|
54
|
-
encode(message: CreateEmployeeAttributeRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
55
|
-
if (message.employeeId !== "") {
|
|
56
|
-
writer.uint32(10).string(message.employeeId);
|
|
57
|
-
}
|
|
58
|
-
if (message.companyId !== "") {
|
|
59
|
-
writer.uint32(18).string(message.companyId);
|
|
60
|
-
}
|
|
61
|
-
if (message.serviceId !== "") {
|
|
62
|
-
writer.uint32(26).string(message.serviceId);
|
|
63
|
-
}
|
|
64
|
-
if (message.attributeName !== "") {
|
|
65
|
-
writer.uint32(34).string(message.attributeName);
|
|
66
|
-
}
|
|
67
|
-
if (message.attributeValue !== "") {
|
|
68
|
-
writer.uint32(42).string(message.attributeValue);
|
|
69
|
-
}
|
|
70
|
-
return writer;
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
decode(input: BinaryReader | Uint8Array, length?: number): CreateEmployeeAttributeRequest {
|
|
74
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
75
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
76
|
-
const message = createBaseCreateEmployeeAttributeRequest();
|
|
77
|
-
while (reader.pos < end) {
|
|
78
|
-
const tag = reader.uint32();
|
|
79
|
-
switch (tag >>> 3) {
|
|
80
|
-
case 1: {
|
|
81
|
-
if (tag !== 10) {
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
message.employeeId = reader.string();
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
case 2: {
|
|
89
|
-
if (tag !== 18) {
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
message.companyId = reader.string();
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
case 3: {
|
|
97
|
-
if (tag !== 26) {
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
message.serviceId = reader.string();
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
case 4: {
|
|
105
|
-
if (tag !== 34) {
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
message.attributeName = reader.string();
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
case 5: {
|
|
113
|
-
if (tag !== 42) {
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
message.attributeValue = 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): CreateEmployeeAttributeRequest {
|
|
130
|
-
return {
|
|
131
|
-
$type: CreateEmployeeAttributeRequest.$type,
|
|
132
|
-
employeeId: isSet(object.employeeId)
|
|
133
|
-
? globalThis.String(object.employeeId)
|
|
134
|
-
: isSet(object.employee_id)
|
|
135
|
-
? globalThis.String(object.employee_id)
|
|
136
|
-
: "",
|
|
137
|
-
companyId: isSet(object.companyId)
|
|
138
|
-
? globalThis.String(object.companyId)
|
|
139
|
-
: isSet(object.company_id)
|
|
140
|
-
? globalThis.String(object.company_id)
|
|
141
|
-
: "",
|
|
142
|
-
serviceId: isSet(object.serviceId)
|
|
143
|
-
? globalThis.String(object.serviceId)
|
|
144
|
-
: isSet(object.service_id)
|
|
145
|
-
? globalThis.String(object.service_id)
|
|
146
|
-
: "",
|
|
147
|
-
attributeName: isSet(object.attributeName)
|
|
148
|
-
? globalThis.String(object.attributeName)
|
|
149
|
-
: isSet(object.attribute_name)
|
|
150
|
-
? globalThis.String(object.attribute_name)
|
|
151
|
-
: "",
|
|
152
|
-
attributeValue: isSet(object.attributeValue)
|
|
153
|
-
? globalThis.String(object.attributeValue)
|
|
154
|
-
: isSet(object.attribute_value)
|
|
155
|
-
? globalThis.String(object.attribute_value)
|
|
156
|
-
: "",
|
|
157
|
-
};
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
toJSON(message: CreateEmployeeAttributeRequest): unknown {
|
|
161
|
-
const obj: any = {};
|
|
162
|
-
if (message.employeeId !== "") {
|
|
163
|
-
obj.employeeId = message.employeeId;
|
|
164
|
-
}
|
|
165
|
-
if (message.companyId !== "") {
|
|
166
|
-
obj.companyId = message.companyId;
|
|
167
|
-
}
|
|
168
|
-
if (message.serviceId !== "") {
|
|
169
|
-
obj.serviceId = message.serviceId;
|
|
170
|
-
}
|
|
171
|
-
if (message.attributeName !== "") {
|
|
172
|
-
obj.attributeName = message.attributeName;
|
|
173
|
-
}
|
|
174
|
-
if (message.attributeValue !== "") {
|
|
175
|
-
obj.attributeValue = message.attributeValue;
|
|
176
|
-
}
|
|
177
|
-
return obj;
|
|
178
|
-
},
|
|
179
|
-
|
|
180
|
-
create<I extends Exact<DeepPartial<CreateEmployeeAttributeRequest>, I>>(base?: I): CreateEmployeeAttributeRequest {
|
|
181
|
-
return CreateEmployeeAttributeRequest.fromPartial(base ?? ({} as any));
|
|
182
|
-
},
|
|
183
|
-
fromPartial<I extends Exact<DeepPartial<CreateEmployeeAttributeRequest>, I>>(
|
|
184
|
-
object: I,
|
|
185
|
-
): CreateEmployeeAttributeRequest {
|
|
186
|
-
const message = createBaseCreateEmployeeAttributeRequest();
|
|
187
|
-
message.employeeId = object.employeeId ?? "";
|
|
188
|
-
message.companyId = object.companyId ?? "";
|
|
189
|
-
message.serviceId = object.serviceId ?? "";
|
|
190
|
-
message.attributeName = object.attributeName ?? "";
|
|
191
|
-
message.attributeValue = object.attributeValue ?? "";
|
|
192
|
-
return message;
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
function createBaseCreateEmployeeAttributeResponse(): CreateEmployeeAttributeResponse {
|
|
197
|
-
return { $type: "abac.v1.CreateEmployeeAttributeResponse", employeeAttribute: undefined };
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export const CreateEmployeeAttributeResponse: MessageFns<
|
|
201
|
-
CreateEmployeeAttributeResponse,
|
|
202
|
-
"abac.v1.CreateEmployeeAttributeResponse"
|
|
203
|
-
> = {
|
|
204
|
-
$type: "abac.v1.CreateEmployeeAttributeResponse" as const,
|
|
205
|
-
|
|
206
|
-
encode(message: CreateEmployeeAttributeResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
207
|
-
if (message.employeeAttribute !== undefined) {
|
|
208
|
-
EmployeeAttribute.encode(message.employeeAttribute, writer.uint32(10).fork()).join();
|
|
209
|
-
}
|
|
210
|
-
return writer;
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
decode(input: BinaryReader | Uint8Array, length?: number): CreateEmployeeAttributeResponse {
|
|
214
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
215
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
216
|
-
const message = createBaseCreateEmployeeAttributeResponse();
|
|
217
|
-
while (reader.pos < end) {
|
|
218
|
-
const tag = reader.uint32();
|
|
219
|
-
switch (tag >>> 3) {
|
|
220
|
-
case 1: {
|
|
221
|
-
if (tag !== 10) {
|
|
222
|
-
break;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
message.employeeAttribute = EmployeeAttribute.decode(reader, reader.uint32());
|
|
226
|
-
continue;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
230
|
-
break;
|
|
231
|
-
}
|
|
232
|
-
reader.skip(tag & 7);
|
|
233
|
-
}
|
|
234
|
-
return message;
|
|
235
|
-
},
|
|
236
|
-
|
|
237
|
-
fromJSON(object: any): CreateEmployeeAttributeResponse {
|
|
238
|
-
return {
|
|
239
|
-
$type: CreateEmployeeAttributeResponse.$type,
|
|
240
|
-
employeeAttribute: isSet(object.employeeAttribute)
|
|
241
|
-
? EmployeeAttribute.fromJSON(object.employeeAttribute)
|
|
242
|
-
: isSet(object.employee_attribute)
|
|
243
|
-
? EmployeeAttribute.fromJSON(object.employee_attribute)
|
|
244
|
-
: undefined,
|
|
245
|
-
};
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
toJSON(message: CreateEmployeeAttributeResponse): unknown {
|
|
249
|
-
const obj: any = {};
|
|
250
|
-
if (message.employeeAttribute !== undefined) {
|
|
251
|
-
obj.employeeAttribute = EmployeeAttribute.toJSON(message.employeeAttribute);
|
|
252
|
-
}
|
|
253
|
-
return obj;
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
create<I extends Exact<DeepPartial<CreateEmployeeAttributeResponse>, I>>(base?: I): CreateEmployeeAttributeResponse {
|
|
257
|
-
return CreateEmployeeAttributeResponse.fromPartial(base ?? ({} as any));
|
|
258
|
-
},
|
|
259
|
-
fromPartial<I extends Exact<DeepPartial<CreateEmployeeAttributeResponse>, I>>(
|
|
260
|
-
object: I,
|
|
261
|
-
): CreateEmployeeAttributeResponse {
|
|
262
|
-
const message = createBaseCreateEmployeeAttributeResponse();
|
|
263
|
-
message.employeeAttribute = (object.employeeAttribute !== undefined && object.employeeAttribute !== null)
|
|
264
|
-
? EmployeeAttribute.fromPartial(object.employeeAttribute)
|
|
265
|
-
: undefined;
|
|
266
|
-
return message;
|
|
267
|
-
},
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
function createBaseCreateEmployeeAttributeCompinsateRequest(): CreateEmployeeAttributeCompinsateRequest {
|
|
271
|
-
return { $type: "abac.v1.CreateEmployeeAttributeCompinsateRequest", employeeAttributeId: "" };
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export const CreateEmployeeAttributeCompinsateRequest: MessageFns<
|
|
275
|
-
CreateEmployeeAttributeCompinsateRequest,
|
|
276
|
-
"abac.v1.CreateEmployeeAttributeCompinsateRequest"
|
|
277
|
-
> = {
|
|
278
|
-
$type: "abac.v1.CreateEmployeeAttributeCompinsateRequest" as const,
|
|
279
|
-
|
|
280
|
-
encode(message: CreateEmployeeAttributeCompinsateRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
281
|
-
if (message.employeeAttributeId !== "") {
|
|
282
|
-
writer.uint32(10).string(message.employeeAttributeId);
|
|
283
|
-
}
|
|
284
|
-
return writer;
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
decode(input: BinaryReader | Uint8Array, length?: number): CreateEmployeeAttributeCompinsateRequest {
|
|
288
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
289
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
290
|
-
const message = createBaseCreateEmployeeAttributeCompinsateRequest();
|
|
291
|
-
while (reader.pos < end) {
|
|
292
|
-
const tag = reader.uint32();
|
|
293
|
-
switch (tag >>> 3) {
|
|
294
|
-
case 1: {
|
|
295
|
-
if (tag !== 10) {
|
|
296
|
-
break;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
message.employeeAttributeId = reader.string();
|
|
300
|
-
continue;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
304
|
-
break;
|
|
305
|
-
}
|
|
306
|
-
reader.skip(tag & 7);
|
|
307
|
-
}
|
|
308
|
-
return message;
|
|
309
|
-
},
|
|
310
|
-
|
|
311
|
-
fromJSON(object: any): CreateEmployeeAttributeCompinsateRequest {
|
|
312
|
-
return {
|
|
313
|
-
$type: CreateEmployeeAttributeCompinsateRequest.$type,
|
|
314
|
-
employeeAttributeId: isSet(object.employeeAttributeId)
|
|
315
|
-
? globalThis.String(object.employeeAttributeId)
|
|
316
|
-
: isSet(object.employee_attribute_id)
|
|
317
|
-
? globalThis.String(object.employee_attribute_id)
|
|
318
|
-
: "",
|
|
319
|
-
};
|
|
320
|
-
},
|
|
321
|
-
|
|
322
|
-
toJSON(message: CreateEmployeeAttributeCompinsateRequest): unknown {
|
|
323
|
-
const obj: any = {};
|
|
324
|
-
if (message.employeeAttributeId !== "") {
|
|
325
|
-
obj.employeeAttributeId = message.employeeAttributeId;
|
|
326
|
-
}
|
|
327
|
-
return obj;
|
|
328
|
-
},
|
|
329
|
-
|
|
330
|
-
create<I extends Exact<DeepPartial<CreateEmployeeAttributeCompinsateRequest>, I>>(
|
|
331
|
-
base?: I,
|
|
332
|
-
): CreateEmployeeAttributeCompinsateRequest {
|
|
333
|
-
return CreateEmployeeAttributeCompinsateRequest.fromPartial(base ?? ({} as any));
|
|
334
|
-
},
|
|
335
|
-
fromPartial<I extends Exact<DeepPartial<CreateEmployeeAttributeCompinsateRequest>, I>>(
|
|
336
|
-
object: I,
|
|
337
|
-
): CreateEmployeeAttributeCompinsateRequest {
|
|
338
|
-
const message = createBaseCreateEmployeeAttributeCompinsateRequest();
|
|
339
|
-
message.employeeAttributeId = object.employeeAttributeId ?? "";
|
|
340
|
-
return message;
|
|
341
|
-
},
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
function createBaseCreateEmployeeAttributeCompinsateResponse(): CreateEmployeeAttributeCompinsateResponse {
|
|
345
|
-
return { $type: "abac.v1.CreateEmployeeAttributeCompinsateResponse", success: false, message: "" };
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
export const CreateEmployeeAttributeCompinsateResponse: MessageFns<
|
|
349
|
-
CreateEmployeeAttributeCompinsateResponse,
|
|
350
|
-
"abac.v1.CreateEmployeeAttributeCompinsateResponse"
|
|
351
|
-
> = {
|
|
352
|
-
$type: "abac.v1.CreateEmployeeAttributeCompinsateResponse" as const,
|
|
353
|
-
|
|
354
|
-
encode(message: CreateEmployeeAttributeCompinsateResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
355
|
-
if (message.success !== false) {
|
|
356
|
-
writer.uint32(8).bool(message.success);
|
|
357
|
-
}
|
|
358
|
-
if (message.message !== "") {
|
|
359
|
-
writer.uint32(18).string(message.message);
|
|
360
|
-
}
|
|
361
|
-
return writer;
|
|
362
|
-
},
|
|
363
|
-
|
|
364
|
-
decode(input: BinaryReader | Uint8Array, length?: number): CreateEmployeeAttributeCompinsateResponse {
|
|
365
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
366
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
367
|
-
const message = createBaseCreateEmployeeAttributeCompinsateResponse();
|
|
368
|
-
while (reader.pos < end) {
|
|
369
|
-
const tag = reader.uint32();
|
|
370
|
-
switch (tag >>> 3) {
|
|
371
|
-
case 1: {
|
|
372
|
-
if (tag !== 8) {
|
|
373
|
-
break;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
message.success = reader.bool();
|
|
377
|
-
continue;
|
|
378
|
-
}
|
|
379
|
-
case 2: {
|
|
380
|
-
if (tag !== 18) {
|
|
381
|
-
break;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
message.message = reader.string();
|
|
385
|
-
continue;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
389
|
-
break;
|
|
390
|
-
}
|
|
391
|
-
reader.skip(tag & 7);
|
|
392
|
-
}
|
|
393
|
-
return message;
|
|
394
|
-
},
|
|
395
|
-
|
|
396
|
-
fromJSON(object: any): CreateEmployeeAttributeCompinsateResponse {
|
|
397
|
-
return {
|
|
398
|
-
$type: CreateEmployeeAttributeCompinsateResponse.$type,
|
|
399
|
-
success: isSet(object.success) ? globalThis.Boolean(object.success) : false,
|
|
400
|
-
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
401
|
-
};
|
|
402
|
-
},
|
|
403
|
-
|
|
404
|
-
toJSON(message: CreateEmployeeAttributeCompinsateResponse): unknown {
|
|
405
|
-
const obj: any = {};
|
|
406
|
-
if (message.success !== false) {
|
|
407
|
-
obj.success = message.success;
|
|
408
|
-
}
|
|
409
|
-
if (message.message !== "") {
|
|
410
|
-
obj.message = message.message;
|
|
411
|
-
}
|
|
412
|
-
return obj;
|
|
413
|
-
},
|
|
414
|
-
|
|
415
|
-
create<I extends Exact<DeepPartial<CreateEmployeeAttributeCompinsateResponse>, I>>(
|
|
416
|
-
base?: I,
|
|
417
|
-
): CreateEmployeeAttributeCompinsateResponse {
|
|
418
|
-
return CreateEmployeeAttributeCompinsateResponse.fromPartial(base ?? ({} as any));
|
|
419
|
-
},
|
|
420
|
-
fromPartial<I extends Exact<DeepPartial<CreateEmployeeAttributeCompinsateResponse>, I>>(
|
|
421
|
-
object: I,
|
|
422
|
-
): CreateEmployeeAttributeCompinsateResponse {
|
|
423
|
-
const message = createBaseCreateEmployeeAttributeCompinsateResponse();
|
|
424
|
-
message.success = object.success ?? false;
|
|
425
|
-
message.message = object.message ?? "";
|
|
426
|
-
return message;
|
|
427
|
-
},
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
export type EmployeeAttributeServiceDefinition = typeof EmployeeAttributeServiceDefinition;
|
|
431
|
-
export const EmployeeAttributeServiceDefinition = {
|
|
432
|
-
name: "EmployeeAttributeService",
|
|
433
|
-
fullName: "abac.v1.EmployeeAttributeService",
|
|
434
|
-
methods: {
|
|
435
|
-
createEmployeeAttribute: {
|
|
436
|
-
name: "CreateEmployeeAttribute",
|
|
437
|
-
requestType: CreateEmployeeAttributeRequest,
|
|
438
|
-
requestStream: false,
|
|
439
|
-
responseType: CreateEmployeeAttributeResponse,
|
|
440
|
-
responseStream: false,
|
|
441
|
-
options: {},
|
|
442
|
-
},
|
|
443
|
-
createEmployeeAttributeCompinsate: {
|
|
444
|
-
name: "CreateEmployeeAttributeCompinsate",
|
|
445
|
-
requestType: CreateEmployeeAttributeCompinsateRequest,
|
|
446
|
-
requestStream: false,
|
|
447
|
-
responseType: CreateEmployeeAttributeCompinsateResponse,
|
|
448
|
-
responseStream: false,
|
|
449
|
-
options: {},
|
|
450
|
-
},
|
|
451
|
-
},
|
|
452
|
-
} as const;
|
|
453
|
-
|
|
454
|
-
export interface EmployeeAttributeServiceImplementation<CallContextExt = {}> {
|
|
455
|
-
createEmployeeAttribute(
|
|
456
|
-
request: CreateEmployeeAttributeRequest,
|
|
457
|
-
context: CallContext & CallContextExt,
|
|
458
|
-
): Promise<DeepPartial<CreateEmployeeAttributeResponse>>;
|
|
459
|
-
createEmployeeAttributeCompinsate(
|
|
460
|
-
request: CreateEmployeeAttributeCompinsateRequest,
|
|
461
|
-
context: CallContext & CallContextExt,
|
|
462
|
-
): Promise<DeepPartial<CreateEmployeeAttributeCompinsateResponse>>;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
export interface EmployeeAttributeServiceClient<CallOptionsExt = {}> {
|
|
466
|
-
createEmployeeAttribute(
|
|
467
|
-
request: DeepPartial<CreateEmployeeAttributeRequest>,
|
|
468
|
-
options?: CallOptions & CallOptionsExt,
|
|
469
|
-
): Promise<CreateEmployeeAttributeResponse>;
|
|
470
|
-
createEmployeeAttributeCompinsate(
|
|
471
|
-
request: DeepPartial<CreateEmployeeAttributeCompinsateRequest>,
|
|
472
|
-
options?: CallOptions & CallOptionsExt,
|
|
473
|
-
): Promise<CreateEmployeeAttributeCompinsateResponse>;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
477
|
-
|
|
478
|
-
type DeepPartial<T> = T extends Builtin ? T
|
|
479
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
480
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
481
|
-
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
482
|
-
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
483
|
-
: Partial<T>;
|
|
484
|
-
|
|
485
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
486
|
-
type Exact<P, I extends P> = P extends Builtin ? P
|
|
487
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
488
|
-
|
|
489
|
-
function isSet(value: any): boolean {
|
|
490
|
-
return value !== null && value !== undefined;
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
interface MessageFns<T, V extends string> {
|
|
494
|
-
readonly $type: V;
|
|
495
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
496
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
497
|
-
fromJSON(object: any): T;
|
|
498
|
-
toJSON(message: T): unknown;
|
|
499
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
500
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
501
|
-
}
|