@ssoeasy-dev/proto 1.1.1-beta.1 → 1.1.1-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.
Potentially problematic release.
This version of @ssoeasy-dev/proto might be problematic. Click here for more details.
- package/gen/ts/auth/v1/auth.ts +648 -233
- package/gen/ts/auth/v1/common.ts +120 -0
- package/gen/ts/{companies/v1/models/employee_company.ts → auth/v1/permission.ts} +63 -35
- package/gen/ts/auth/v1/user_policy.ts +454 -0
- package/gen/ts/auth/v1/verification.ts +389 -102
- 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 +4 -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 +2 -5
- package/package.json +1 -1
- package/proto/auth/v1/auth.proto +47 -19
- package/proto/auth/v1/common.proto +8 -0
- package/proto/auth/v1/permission.proto +15 -0
- package/proto/auth/v1/user_policy.proto +30 -0
- package/proto/auth/v1/verification.proto +32 -9
- 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
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: auth/v1/common.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
|
|
10
|
+
export interface Tokens {
|
|
11
|
+
$type: "auth.v1.Tokens";
|
|
12
|
+
access: string;
|
|
13
|
+
refresh: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function createBaseTokens(): Tokens {
|
|
17
|
+
return { $type: "auth.v1.Tokens", access: "", refresh: "" };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const Tokens: MessageFns<Tokens, "auth.v1.Tokens"> = {
|
|
21
|
+
$type: "auth.v1.Tokens" as const,
|
|
22
|
+
|
|
23
|
+
encode(message: Tokens, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
24
|
+
if (message.access !== "") {
|
|
25
|
+
writer.uint32(10).string(message.access);
|
|
26
|
+
}
|
|
27
|
+
if (message.refresh !== "") {
|
|
28
|
+
writer.uint32(18).string(message.refresh);
|
|
29
|
+
}
|
|
30
|
+
return writer;
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Tokens {
|
|
34
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
35
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
36
|
+
const message = createBaseTokens();
|
|
37
|
+
while (reader.pos < end) {
|
|
38
|
+
const tag = reader.uint32();
|
|
39
|
+
switch (tag >>> 3) {
|
|
40
|
+
case 1: {
|
|
41
|
+
if (tag !== 10) {
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message.access = reader.string();
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
if (tag !== 18) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message.refresh = reader.string();
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
reader.skip(tag & 7);
|
|
61
|
+
}
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
fromJSON(object: any): Tokens {
|
|
66
|
+
return {
|
|
67
|
+
$type: Tokens.$type,
|
|
68
|
+
access: isSet(object.access) ? globalThis.String(object.access) : "",
|
|
69
|
+
refresh: isSet(object.refresh) ? globalThis.String(object.refresh) : "",
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
toJSON(message: Tokens): unknown {
|
|
74
|
+
const obj: any = {};
|
|
75
|
+
if (message.access !== "") {
|
|
76
|
+
obj.access = message.access;
|
|
77
|
+
}
|
|
78
|
+
if (message.refresh !== "") {
|
|
79
|
+
obj.refresh = message.refresh;
|
|
80
|
+
}
|
|
81
|
+
return obj;
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
create<I extends Exact<DeepPartial<Tokens>, I>>(base?: I): Tokens {
|
|
85
|
+
return Tokens.fromPartial(base ?? ({} as any));
|
|
86
|
+
},
|
|
87
|
+
fromPartial<I extends Exact<DeepPartial<Tokens>, I>>(object: I): Tokens {
|
|
88
|
+
const message = createBaseTokens();
|
|
89
|
+
message.access = object.access ?? "";
|
|
90
|
+
message.refresh = object.refresh ?? "";
|
|
91
|
+
return message;
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
96
|
+
|
|
97
|
+
type DeepPartial<T> = T extends Builtin ? T
|
|
98
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
99
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
100
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
101
|
+
: T extends {} ? { [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]> }
|
|
102
|
+
: Partial<T>;
|
|
103
|
+
|
|
104
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
105
|
+
type Exact<P, I extends P> = P extends Builtin ? P
|
|
106
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never };
|
|
107
|
+
|
|
108
|
+
function isSet(value: any): boolean {
|
|
109
|
+
return value !== null && value !== undefined;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
interface MessageFns<T, V extends string> {
|
|
113
|
+
readonly $type: V;
|
|
114
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
115
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
116
|
+
fromJSON(object: any): T;
|
|
117
|
+
toJSON(message: T): unknown;
|
|
118
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
119
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
120
|
+
}
|
|
@@ -1,43 +1,45 @@
|
|
|
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
|
-
// source:
|
|
5
|
+
// source: auth/v1/permission.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
10
|
+
import { StatusResponse } from "../../common/v1/types";
|
|
9
11
|
|
|
10
|
-
export interface
|
|
11
|
-
$type: "
|
|
12
|
+
export interface CheckPermissionRequest {
|
|
13
|
+
$type: "auth.v1.CheckPermissionRequest";
|
|
12
14
|
id: string;
|
|
13
|
-
|
|
14
|
-
companyId
|
|
15
|
+
token: string;
|
|
16
|
+
companyId?: string | undefined;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
function
|
|
18
|
-
return { $type: "
|
|
19
|
+
function createBaseCheckPermissionRequest(): CheckPermissionRequest {
|
|
20
|
+
return { $type: "auth.v1.CheckPermissionRequest", id: "", token: "", companyId: undefined };
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
export const
|
|
22
|
-
$type: "
|
|
23
|
+
export const CheckPermissionRequest: MessageFns<CheckPermissionRequest, "auth.v1.CheckPermissionRequest"> = {
|
|
24
|
+
$type: "auth.v1.CheckPermissionRequest" as const,
|
|
23
25
|
|
|
24
|
-
encode(message:
|
|
26
|
+
encode(message: CheckPermissionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
25
27
|
if (message.id !== "") {
|
|
26
28
|
writer.uint32(10).string(message.id);
|
|
27
29
|
}
|
|
28
|
-
if (message.
|
|
29
|
-
writer.uint32(18).string(message.
|
|
30
|
+
if (message.token !== "") {
|
|
31
|
+
writer.uint32(18).string(message.token);
|
|
30
32
|
}
|
|
31
|
-
if (message.companyId !==
|
|
33
|
+
if (message.companyId !== undefined) {
|
|
32
34
|
writer.uint32(26).string(message.companyId);
|
|
33
35
|
}
|
|
34
36
|
return writer;
|
|
35
37
|
},
|
|
36
38
|
|
|
37
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
39
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CheckPermissionRequest {
|
|
38
40
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
39
41
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
40
|
-
const message =
|
|
42
|
+
const message = createBaseCheckPermissionRequest();
|
|
41
43
|
while (reader.pos < end) {
|
|
42
44
|
const tag = reader.uint32();
|
|
43
45
|
switch (tag >>> 3) {
|
|
@@ -54,7 +56,7 @@ export const EmployeeCompany: MessageFns<EmployeeCompany, "companies.v1.models.E
|
|
|
54
56
|
break;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
message.
|
|
59
|
+
message.token = reader.string();
|
|
58
60
|
continue;
|
|
59
61
|
}
|
|
60
62
|
case 3: {
|
|
@@ -74,49 +76,75 @@ export const EmployeeCompany: MessageFns<EmployeeCompany, "companies.v1.models.E
|
|
|
74
76
|
return message;
|
|
75
77
|
},
|
|
76
78
|
|
|
77
|
-
fromJSON(object: any):
|
|
79
|
+
fromJSON(object: any): CheckPermissionRequest {
|
|
78
80
|
return {
|
|
79
|
-
$type:
|
|
81
|
+
$type: CheckPermissionRequest.$type,
|
|
80
82
|
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
81
|
-
|
|
82
|
-
? globalThis.String(object.employeeId)
|
|
83
|
-
: isSet(object.employee_id)
|
|
84
|
-
? globalThis.String(object.employee_id)
|
|
85
|
-
: "",
|
|
83
|
+
token: isSet(object.token) ? globalThis.String(object.token) : "",
|
|
86
84
|
companyId: isSet(object.companyId)
|
|
87
85
|
? globalThis.String(object.companyId)
|
|
88
86
|
: isSet(object.company_id)
|
|
89
87
|
? globalThis.String(object.company_id)
|
|
90
|
-
:
|
|
88
|
+
: undefined,
|
|
91
89
|
};
|
|
92
90
|
},
|
|
93
91
|
|
|
94
|
-
toJSON(message:
|
|
92
|
+
toJSON(message: CheckPermissionRequest): unknown {
|
|
95
93
|
const obj: any = {};
|
|
96
94
|
if (message.id !== "") {
|
|
97
95
|
obj.id = message.id;
|
|
98
96
|
}
|
|
99
|
-
if (message.
|
|
100
|
-
obj.
|
|
97
|
+
if (message.token !== "") {
|
|
98
|
+
obj.token = message.token;
|
|
101
99
|
}
|
|
102
|
-
if (message.companyId !==
|
|
100
|
+
if (message.companyId !== undefined) {
|
|
103
101
|
obj.companyId = message.companyId;
|
|
104
102
|
}
|
|
105
103
|
return obj;
|
|
106
104
|
},
|
|
107
105
|
|
|
108
|
-
create<I extends Exact<DeepPartial<
|
|
109
|
-
return
|
|
106
|
+
create<I extends Exact<DeepPartial<CheckPermissionRequest>, I>>(base?: I): CheckPermissionRequest {
|
|
107
|
+
return CheckPermissionRequest.fromPartial(base ?? ({} as any));
|
|
110
108
|
},
|
|
111
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
112
|
-
const message =
|
|
109
|
+
fromPartial<I extends Exact<DeepPartial<CheckPermissionRequest>, I>>(object: I): CheckPermissionRequest {
|
|
110
|
+
const message = createBaseCheckPermissionRequest();
|
|
113
111
|
message.id = object.id ?? "";
|
|
114
|
-
message.
|
|
115
|
-
message.companyId = object.companyId ??
|
|
112
|
+
message.token = object.token ?? "";
|
|
113
|
+
message.companyId = object.companyId ?? undefined;
|
|
116
114
|
return message;
|
|
117
115
|
},
|
|
118
116
|
};
|
|
119
117
|
|
|
118
|
+
export type PermissionServiceDefinition = typeof PermissionServiceDefinition;
|
|
119
|
+
export const PermissionServiceDefinition = {
|
|
120
|
+
name: "PermissionService",
|
|
121
|
+
fullName: "auth.v1.PermissionService",
|
|
122
|
+
methods: {
|
|
123
|
+
checkPermission: {
|
|
124
|
+
name: "CheckPermission",
|
|
125
|
+
requestType: CheckPermissionRequest,
|
|
126
|
+
requestStream: false,
|
|
127
|
+
responseType: StatusResponse,
|
|
128
|
+
responseStream: false,
|
|
129
|
+
options: {},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
} as const;
|
|
133
|
+
|
|
134
|
+
export interface PermissionServiceImplementation<CallContextExt = {}> {
|
|
135
|
+
checkPermission(
|
|
136
|
+
request: CheckPermissionRequest,
|
|
137
|
+
context: CallContext & CallContextExt,
|
|
138
|
+
): Promise<DeepPartial<StatusResponse>>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface PermissionServiceClient<CallOptionsExt = {}> {
|
|
142
|
+
checkPermission(
|
|
143
|
+
request: DeepPartial<CheckPermissionRequest>,
|
|
144
|
+
options?: CallOptions & CallOptionsExt,
|
|
145
|
+
): Promise<StatusResponse>;
|
|
146
|
+
}
|
|
147
|
+
|
|
120
148
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
121
149
|
|
|
122
150
|
type DeepPartial<T> = T extends Builtin ? T
|