@ssoeasy-dev/proto 1.1.0-beta.2
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/LICENSE +22 -0
- package/README.md +228 -0
- package/gen/ts/abac/v1/employee_attribute.ts +501 -0
- package/gen/ts/abac/v1/models/employee_attribute.ts +190 -0
- package/gen/ts/auth/v1/auth.ts +663 -0
- package/gen/ts/auth/v1/verification.ts +340 -0
- package/gen/ts/common/v1/types.ts +142 -0
- package/gen/ts/companies/v1/models/company.ts +204 -0
- package/gen/ts/companies/v1/models/employee.ts +175 -0
- package/gen/ts/companies/v1/models/employee_company.ts +145 -0
- package/gen/ts/companies/v1/models/subscription.ts +166 -0
- package/gen/ts/companies/v1/owner.ts +569 -0
- package/gen/ts/google/protobuf/timestamp.ts +233 -0
- package/gen/ts/index.abac.ts +8 -0
- package/gen/ts/index.abac.v1.models.ts +8 -0
- package/gen/ts/index.abac.v1.ts +9 -0
- package/gen/ts/index.auth.ts +8 -0
- package/gen/ts/index.auth.v1.ts +9 -0
- package/gen/ts/index.common.ts +8 -0
- package/gen/ts/index.common.v1.ts +8 -0
- package/gen/ts/index.companies.ts +8 -0
- package/gen/ts/index.companies.v1.models.ts +11 -0
- package/gen/ts/index.companies.v1.ts +9 -0
- package/gen/ts/index.google.protobuf.ts +8 -0
- package/gen/ts/index.google.ts +8 -0
- package/gen/ts/index.services.ts +8 -0
- package/gen/ts/index.services.v1.ts +8 -0
- package/gen/ts/index.ts +13 -0
- package/gen/ts/services/v1/services.ts +293 -0
- package/package.json +69 -0
- package/proto/abac/v1/employee_attribute.proto +31 -0
- package/proto/abac/v1/models/employee_attribute.proto +11 -0
- package/proto/auth/v1/auth.proto +39 -0
- package/proto/auth/v1/verification.proto +25 -0
- package/proto/common/v1/types.proto +10 -0
- package/proto/companies/v1/models/company.proto +12 -0
- package/proto/companies/v1/models/employee.proto +11 -0
- package/proto/companies/v1/models/employee_company.proto +9 -0
- package/proto/companies/v1/models/subscription.proto +10 -0
- package/proto/companies/v1/owner.proto +38 -0
- package/proto/services/v1/services.proto +19 -0
|
@@ -0,0 +1,175 @@
|
|
|
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: companies/v1/models/employee.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
|
|
10
|
+
export interface Employee {
|
|
11
|
+
$type: "companies.v1.models.Employee";
|
|
12
|
+
id: string;
|
|
13
|
+
email: string;
|
|
14
|
+
firstname: string;
|
|
15
|
+
lastname: string;
|
|
16
|
+
isActive: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function createBaseEmployee(): Employee {
|
|
20
|
+
return { $type: "companies.v1.models.Employee", id: "", email: "", firstname: "", lastname: "", isActive: false };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const Employee: MessageFns<Employee, "companies.v1.models.Employee"> = {
|
|
24
|
+
$type: "companies.v1.models.Employee" as const,
|
|
25
|
+
|
|
26
|
+
encode(message: Employee, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
27
|
+
if (message.id !== "") {
|
|
28
|
+
writer.uint32(10).string(message.id);
|
|
29
|
+
}
|
|
30
|
+
if (message.email !== "") {
|
|
31
|
+
writer.uint32(18).string(message.email);
|
|
32
|
+
}
|
|
33
|
+
if (message.firstname !== "") {
|
|
34
|
+
writer.uint32(26).string(message.firstname);
|
|
35
|
+
}
|
|
36
|
+
if (message.lastname !== "") {
|
|
37
|
+
writer.uint32(34).string(message.lastname);
|
|
38
|
+
}
|
|
39
|
+
if (message.isActive !== false) {
|
|
40
|
+
writer.uint32(40).bool(message.isActive);
|
|
41
|
+
}
|
|
42
|
+
return writer;
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Employee {
|
|
46
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
47
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
48
|
+
const message = createBaseEmployee();
|
|
49
|
+
while (reader.pos < end) {
|
|
50
|
+
const tag = reader.uint32();
|
|
51
|
+
switch (tag >>> 3) {
|
|
52
|
+
case 1: {
|
|
53
|
+
if (tag !== 10) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message.id = reader.string();
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
case 2: {
|
|
61
|
+
if (tag !== 18) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message.email = reader.string();
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
case 3: {
|
|
69
|
+
if (tag !== 26) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message.firstname = reader.string();
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
case 4: {
|
|
77
|
+
if (tag !== 34) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
message.lastname = reader.string();
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
case 5: {
|
|
85
|
+
if (tag !== 40) {
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
message.isActive = reader.bool();
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
reader.skip(tag & 7);
|
|
97
|
+
}
|
|
98
|
+
return message;
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
fromJSON(object: any): Employee {
|
|
102
|
+
return {
|
|
103
|
+
$type: Employee.$type,
|
|
104
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
105
|
+
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
106
|
+
firstname: isSet(object.firstname) ? globalThis.String(object.firstname) : "",
|
|
107
|
+
lastname: isSet(object.lastname) ? globalThis.String(object.lastname) : "",
|
|
108
|
+
isActive: isSet(object.isActive)
|
|
109
|
+
? globalThis.Boolean(object.isActive)
|
|
110
|
+
: isSet(object.is_active)
|
|
111
|
+
? globalThis.Boolean(object.is_active)
|
|
112
|
+
: false,
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
toJSON(message: Employee): unknown {
|
|
117
|
+
const obj: any = {};
|
|
118
|
+
if (message.id !== "") {
|
|
119
|
+
obj.id = message.id;
|
|
120
|
+
}
|
|
121
|
+
if (message.email !== "") {
|
|
122
|
+
obj.email = message.email;
|
|
123
|
+
}
|
|
124
|
+
if (message.firstname !== "") {
|
|
125
|
+
obj.firstname = message.firstname;
|
|
126
|
+
}
|
|
127
|
+
if (message.lastname !== "") {
|
|
128
|
+
obj.lastname = message.lastname;
|
|
129
|
+
}
|
|
130
|
+
if (message.isActive !== false) {
|
|
131
|
+
obj.isActive = message.isActive;
|
|
132
|
+
}
|
|
133
|
+
return obj;
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
create<I extends Exact<DeepPartial<Employee>, I>>(base?: I): Employee {
|
|
137
|
+
return Employee.fromPartial(base ?? ({} as any));
|
|
138
|
+
},
|
|
139
|
+
fromPartial<I extends Exact<DeepPartial<Employee>, I>>(object: I): Employee {
|
|
140
|
+
const message = createBaseEmployee();
|
|
141
|
+
message.id = object.id ?? "";
|
|
142
|
+
message.email = object.email ?? "";
|
|
143
|
+
message.firstname = object.firstname ?? "";
|
|
144
|
+
message.lastname = object.lastname ?? "";
|
|
145
|
+
message.isActive = object.isActive ?? false;
|
|
146
|
+
return message;
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
151
|
+
|
|
152
|
+
type DeepPartial<T> = T extends Builtin ? T
|
|
153
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
154
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
155
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
156
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
157
|
+
: Partial<T>;
|
|
158
|
+
|
|
159
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
160
|
+
type Exact<P, I extends P> = P extends Builtin ? P
|
|
161
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
162
|
+
|
|
163
|
+
function isSet(value: any): boolean {
|
|
164
|
+
return value !== null && value !== undefined;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
interface MessageFns<T, V extends string> {
|
|
168
|
+
readonly $type: V;
|
|
169
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
170
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
171
|
+
fromJSON(object: any): T;
|
|
172
|
+
toJSON(message: T): unknown;
|
|
173
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
174
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
175
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
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: companies/v1/models/employee_company.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
|
|
10
|
+
export interface EmployeeCompany {
|
|
11
|
+
$type: "companies.v1.models.EmployeeCompany";
|
|
12
|
+
id: string;
|
|
13
|
+
employeeId: string;
|
|
14
|
+
companyId: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function createBaseEmployeeCompany(): EmployeeCompany {
|
|
18
|
+
return { $type: "companies.v1.models.EmployeeCompany", id: "", employeeId: "", companyId: "" };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const EmployeeCompany: MessageFns<EmployeeCompany, "companies.v1.models.EmployeeCompany"> = {
|
|
22
|
+
$type: "companies.v1.models.EmployeeCompany" as const,
|
|
23
|
+
|
|
24
|
+
encode(message: EmployeeCompany, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
25
|
+
if (message.id !== "") {
|
|
26
|
+
writer.uint32(10).string(message.id);
|
|
27
|
+
}
|
|
28
|
+
if (message.employeeId !== "") {
|
|
29
|
+
writer.uint32(18).string(message.employeeId);
|
|
30
|
+
}
|
|
31
|
+
if (message.companyId !== "") {
|
|
32
|
+
writer.uint32(26).string(message.companyId);
|
|
33
|
+
}
|
|
34
|
+
return writer;
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EmployeeCompany {
|
|
38
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
39
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
40
|
+
const message = createBaseEmployeeCompany();
|
|
41
|
+
while (reader.pos < end) {
|
|
42
|
+
const tag = reader.uint32();
|
|
43
|
+
switch (tag >>> 3) {
|
|
44
|
+
case 1: {
|
|
45
|
+
if (tag !== 10) {
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message.id = reader.string();
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
case 2: {
|
|
53
|
+
if (tag !== 18) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message.employeeId = reader.string();
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
case 3: {
|
|
61
|
+
if (tag !== 26) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message.companyId = reader.string();
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
reader.skip(tag & 7);
|
|
73
|
+
}
|
|
74
|
+
return message;
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
fromJSON(object: any): EmployeeCompany {
|
|
78
|
+
return {
|
|
79
|
+
$type: EmployeeCompany.$type,
|
|
80
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
81
|
+
employeeId: isSet(object.employeeId)
|
|
82
|
+
? globalThis.String(object.employeeId)
|
|
83
|
+
: isSet(object.employee_id)
|
|
84
|
+
? globalThis.String(object.employee_id)
|
|
85
|
+
: "",
|
|
86
|
+
companyId: isSet(object.companyId)
|
|
87
|
+
? globalThis.String(object.companyId)
|
|
88
|
+
: isSet(object.company_id)
|
|
89
|
+
? globalThis.String(object.company_id)
|
|
90
|
+
: "",
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
toJSON(message: EmployeeCompany): unknown {
|
|
95
|
+
const obj: any = {};
|
|
96
|
+
if (message.id !== "") {
|
|
97
|
+
obj.id = message.id;
|
|
98
|
+
}
|
|
99
|
+
if (message.employeeId !== "") {
|
|
100
|
+
obj.employeeId = message.employeeId;
|
|
101
|
+
}
|
|
102
|
+
if (message.companyId !== "") {
|
|
103
|
+
obj.companyId = message.companyId;
|
|
104
|
+
}
|
|
105
|
+
return obj;
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
create<I extends Exact<DeepPartial<EmployeeCompany>, I>>(base?: I): EmployeeCompany {
|
|
109
|
+
return EmployeeCompany.fromPartial(base ?? ({} as any));
|
|
110
|
+
},
|
|
111
|
+
fromPartial<I extends Exact<DeepPartial<EmployeeCompany>, I>>(object: I): EmployeeCompany {
|
|
112
|
+
const message = createBaseEmployeeCompany();
|
|
113
|
+
message.id = object.id ?? "";
|
|
114
|
+
message.employeeId = object.employeeId ?? "";
|
|
115
|
+
message.companyId = object.companyId ?? "";
|
|
116
|
+
return message;
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
121
|
+
|
|
122
|
+
type DeepPartial<T> = T extends Builtin ? T
|
|
123
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
124
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
125
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
126
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
127
|
+
: Partial<T>;
|
|
128
|
+
|
|
129
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
130
|
+
type Exact<P, I extends P> = P extends Builtin ? P
|
|
131
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
132
|
+
|
|
133
|
+
function isSet(value: any): boolean {
|
|
134
|
+
return value !== null && value !== undefined;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface MessageFns<T, V extends string> {
|
|
138
|
+
readonly $type: V;
|
|
139
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
140
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
141
|
+
fromJSON(object: any): T;
|
|
142
|
+
toJSON(message: T): unknown;
|
|
143
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
144
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
145
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
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: companies/v1/models/subscription.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
|
|
10
|
+
export interface Subscription {
|
|
11
|
+
$type: "companies.v1.models.Subscription";
|
|
12
|
+
id: string;
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
serviceId: string;
|
|
15
|
+
companyId: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function createBaseSubscription(): Subscription {
|
|
19
|
+
return { $type: "companies.v1.models.Subscription", id: "", isActive: false, serviceId: "", companyId: "" };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const Subscription: MessageFns<Subscription, "companies.v1.models.Subscription"> = {
|
|
23
|
+
$type: "companies.v1.models.Subscription" as const,
|
|
24
|
+
|
|
25
|
+
encode(message: Subscription, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
26
|
+
if (message.id !== "") {
|
|
27
|
+
writer.uint32(10).string(message.id);
|
|
28
|
+
}
|
|
29
|
+
if (message.isActive !== false) {
|
|
30
|
+
writer.uint32(16).bool(message.isActive);
|
|
31
|
+
}
|
|
32
|
+
if (message.serviceId !== "") {
|
|
33
|
+
writer.uint32(26).string(message.serviceId);
|
|
34
|
+
}
|
|
35
|
+
if (message.companyId !== "") {
|
|
36
|
+
writer.uint32(34).string(message.companyId);
|
|
37
|
+
}
|
|
38
|
+
return writer;
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Subscription {
|
|
42
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
43
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
44
|
+
const message = createBaseSubscription();
|
|
45
|
+
while (reader.pos < end) {
|
|
46
|
+
const tag = reader.uint32();
|
|
47
|
+
switch (tag >>> 3) {
|
|
48
|
+
case 1: {
|
|
49
|
+
if (tag !== 10) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message.id = reader.string();
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
case 2: {
|
|
57
|
+
if (tag !== 16) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message.isActive = reader.bool();
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
case 3: {
|
|
65
|
+
if (tag !== 26) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message.serviceId = reader.string();
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
case 4: {
|
|
73
|
+
if (tag !== 34) {
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
message.companyId = reader.string();
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
reader.skip(tag & 7);
|
|
85
|
+
}
|
|
86
|
+
return message;
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
fromJSON(object: any): Subscription {
|
|
90
|
+
return {
|
|
91
|
+
$type: Subscription.$type,
|
|
92
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
93
|
+
isActive: isSet(object.isActive)
|
|
94
|
+
? globalThis.Boolean(object.isActive)
|
|
95
|
+
: isSet(object.is_active)
|
|
96
|
+
? globalThis.Boolean(object.is_active)
|
|
97
|
+
: false,
|
|
98
|
+
serviceId: isSet(object.serviceId)
|
|
99
|
+
? globalThis.String(object.serviceId)
|
|
100
|
+
: isSet(object.service_id)
|
|
101
|
+
? globalThis.String(object.service_id)
|
|
102
|
+
: "",
|
|
103
|
+
companyId: isSet(object.companyId)
|
|
104
|
+
? globalThis.String(object.companyId)
|
|
105
|
+
: isSet(object.company_id)
|
|
106
|
+
? globalThis.String(object.company_id)
|
|
107
|
+
: "",
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
toJSON(message: Subscription): unknown {
|
|
112
|
+
const obj: any = {};
|
|
113
|
+
if (message.id !== "") {
|
|
114
|
+
obj.id = message.id;
|
|
115
|
+
}
|
|
116
|
+
if (message.isActive !== false) {
|
|
117
|
+
obj.isActive = message.isActive;
|
|
118
|
+
}
|
|
119
|
+
if (message.serviceId !== "") {
|
|
120
|
+
obj.serviceId = message.serviceId;
|
|
121
|
+
}
|
|
122
|
+
if (message.companyId !== "") {
|
|
123
|
+
obj.companyId = message.companyId;
|
|
124
|
+
}
|
|
125
|
+
return obj;
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
create<I extends Exact<DeepPartial<Subscription>, I>>(base?: I): Subscription {
|
|
129
|
+
return Subscription.fromPartial(base ?? ({} as any));
|
|
130
|
+
},
|
|
131
|
+
fromPartial<I extends Exact<DeepPartial<Subscription>, I>>(object: I): Subscription {
|
|
132
|
+
const message = createBaseSubscription();
|
|
133
|
+
message.id = object.id ?? "";
|
|
134
|
+
message.isActive = object.isActive ?? false;
|
|
135
|
+
message.serviceId = object.serviceId ?? "";
|
|
136
|
+
message.companyId = object.companyId ?? "";
|
|
137
|
+
return message;
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
142
|
+
|
|
143
|
+
type DeepPartial<T> = T extends Builtin ? T
|
|
144
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
145
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
146
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
147
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
148
|
+
: Partial<T>;
|
|
149
|
+
|
|
150
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
151
|
+
type Exact<P, I extends P> = P extends Builtin ? P
|
|
152
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
153
|
+
|
|
154
|
+
function isSet(value: any): boolean {
|
|
155
|
+
return value !== null && value !== undefined;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
interface MessageFns<T, V extends string> {
|
|
159
|
+
readonly $type: V;
|
|
160
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
161
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
162
|
+
fromJSON(object: any): T;
|
|
163
|
+
toJSON(message: T): unknown;
|
|
164
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
165
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
166
|
+
}
|