@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
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ssoeasy-dev/proto",
|
|
3
|
+
"version": "1.1.0-beta.2",
|
|
4
|
+
"description": "gRPC proto contracts and generated TypeScript clients for SSOEasy",
|
|
5
|
+
"main": "gen/ts/index.ts",
|
|
6
|
+
"types": "gen/ts/index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./gen/ts/index.ts",
|
|
10
|
+
"default": "./gen/ts/index.ts"
|
|
11
|
+
},
|
|
12
|
+
"./auth": {
|
|
13
|
+
"types": "./gen/ts/index.auth.ts",
|
|
14
|
+
"default": "./gen/ts/index.auth.ts"
|
|
15
|
+
},
|
|
16
|
+
"./companies": {
|
|
17
|
+
"types": "./gen/ts/index.companies.ts",
|
|
18
|
+
"default": "./gen/ts/index.companies.ts"
|
|
19
|
+
},
|
|
20
|
+
"./services": {
|
|
21
|
+
"types": "./gen/ts/index.services.ts",
|
|
22
|
+
"default": "./gen/ts/index.services.ts"
|
|
23
|
+
},
|
|
24
|
+
"./abac": {
|
|
25
|
+
"types": "./gen/ts/index.abac.ts",
|
|
26
|
+
"default": "./gen/ts/index.abac.ts"
|
|
27
|
+
},
|
|
28
|
+
"./common": {
|
|
29
|
+
"types": "./gen/ts/index.common.ts",
|
|
30
|
+
"default": "./gen/ts/index.common.ts"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"gen/ts/**/*",
|
|
35
|
+
"proto/**/*.proto",
|
|
36
|
+
"README.md",
|
|
37
|
+
"LICENSE"
|
|
38
|
+
],
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@bufbuild/protobuf": "^2.0.0",
|
|
41
|
+
"long": "^5.2.3",
|
|
42
|
+
"nice-grpc": "^2.1.10",
|
|
43
|
+
"nice-grpc-common": "^2.0.2",
|
|
44
|
+
"rxjs": "7.8.2"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@grpc/grpc-js": "^1.9.0"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public",
|
|
51
|
+
"registry": "https://registry.npmjs.org/"
|
|
52
|
+
},
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "https://github.com/ssoeasy-dev/proto.git"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"grpc",
|
|
59
|
+
"proto",
|
|
60
|
+
"typescript",
|
|
61
|
+
"sso",
|
|
62
|
+
"ssoeasy"
|
|
63
|
+
],
|
|
64
|
+
"license": "MIT",
|
|
65
|
+
"scripts": {
|
|
66
|
+
"generate": "buf generate --template buf.gen.ts.yaml",
|
|
67
|
+
"clean": "rm -rf gen/ts"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package auth.v1;
|
|
4
|
+
|
|
5
|
+
import "auth/v1/verification.proto";
|
|
6
|
+
|
|
7
|
+
service AuthService {
|
|
8
|
+
rpc Registration(RegistrationRequest) returns (RegistrationResponse);
|
|
9
|
+
rpc RegistrationCompensate(RegistrationCompensateRequest) returns (StatusResponse);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message RegistrationRequest {
|
|
13
|
+
string user_id = 1;
|
|
14
|
+
string service_id = 2;
|
|
15
|
+
string company_id = 3;
|
|
16
|
+
string attribute_name = 4;
|
|
17
|
+
string attribute_value = 5;
|
|
18
|
+
string contact = 6;
|
|
19
|
+
auth.v1.VerificationType verification_type = 7;
|
|
20
|
+
string password = 8;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message RegistrationResponse {
|
|
24
|
+
string credential_id = 1;
|
|
25
|
+
string attribute_id = 2;
|
|
26
|
+
string verification_id = 3;
|
|
27
|
+
string value = 4;
|
|
28
|
+
int64 expires_at = 5;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message RegistrationCompensateRequest {
|
|
32
|
+
string credential_id = 1;
|
|
33
|
+
string verification_id = 2;
|
|
34
|
+
string user_attribute_id = 3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message StatusResponse {
|
|
38
|
+
bool success = 1;
|
|
39
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package auth.v1;
|
|
4
|
+
|
|
5
|
+
service VerificationService {
|
|
6
|
+
rpc Verificate(VerificateRequest) returns (VerificateResponse);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
enum VerificationType {
|
|
10
|
+
email_code = 0;
|
|
11
|
+
email_link = 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message VerificateRequest {
|
|
15
|
+
string id = 1;
|
|
16
|
+
string value = 2;
|
|
17
|
+
string type = 3;
|
|
18
|
+
string company_id = 4;
|
|
19
|
+
string service_id = 5;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message VerificateResponse {
|
|
23
|
+
string access = 1;
|
|
24
|
+
string refresh = 2;
|
|
25
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package companies.v1;
|
|
4
|
+
|
|
5
|
+
import "companies/v1/models/company.proto";
|
|
6
|
+
import "companies/v1/models/employee.proto";
|
|
7
|
+
import "companies/v1/models/employee_company.proto";
|
|
8
|
+
import "companies/v1/models/subscription.proto";
|
|
9
|
+
|
|
10
|
+
service OwnerService {
|
|
11
|
+
rpc RegisterOwner(RegisterOwnerRequest) returns (RegisterOwnerResponse);
|
|
12
|
+
rpc RegisterOwnerCompinsate(RegisterOwnerCompinsateRequest) returns (RegisterOwnerCompinsateResponse);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message RegisterOwnerRequest {
|
|
16
|
+
string email = 1;
|
|
17
|
+
string first_name = 2;
|
|
18
|
+
string last_name = 3;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
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
|
+
string company_id = 1;
|
|
30
|
+
string employee_id = 2;
|
|
31
|
+
string subscription_id = 3;
|
|
32
|
+
string employee_company_id = 4;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message RegisterOwnerCompinsateResponse {
|
|
36
|
+
bool success = 1;
|
|
37
|
+
string message = 2;
|
|
38
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
}
|