@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.

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