@skyiro/sky-client 0.1.2 → 0.1.4
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/package.json +2 -2
- package/proto/accounts.proto +80 -0
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyiro/sky-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Skyiro internal gRPC clients: Notifier + URL shortener, with typed product and event keys",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": ["dist", "proto"],
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "tsc -p tsconfig.json",
|
|
10
|
-
"example:publish-event": "tsx
|
|
10
|
+
"example:publish-event": "tsx example/send-login-otp-email.ts"
|
|
11
11
|
},
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"url": "https://registry.npmjs.org/",
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package account.v1;
|
|
4
|
+
|
|
5
|
+
service AccountsGrpcService {
|
|
6
|
+
rpc createUser (userRequest) returns (UserCreateResponse) ;
|
|
7
|
+
rpc updateUser(UserUpdateRequest) returns(UserUpdateResponse)
|
|
8
|
+
rpc updateOrganization(UpdateOrganizationRequest)returns(UpdateOrganizationResponse)
|
|
9
|
+
rpc licenseCheck(LicenseCheckRequest) returns(LicenseCheckResponse)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
enum OrganizationRole {
|
|
14
|
+
user = 1 ;
|
|
15
|
+
Admin = 2 ;
|
|
16
|
+
Owner = 3 ;
|
|
17
|
+
Guest = 4 ;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
enum ProductKey {
|
|
21
|
+
SkyPeople = 1;
|
|
22
|
+
SkyPaper = 2 ;
|
|
23
|
+
SkyBill = 3 ;
|
|
24
|
+
SkyShort = 4 ;
|
|
25
|
+
SkyAccount = 5 ;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message UserCreateRequest {
|
|
29
|
+
ProductKey productKey = 1;
|
|
30
|
+
string organizationId= 2;
|
|
31
|
+
string firstName = 3;
|
|
32
|
+
string password = 4;
|
|
33
|
+
OrganizationRole orgRole = 5 ;
|
|
34
|
+
optional string lastName = 6;
|
|
35
|
+
optional string middleName = 7;
|
|
36
|
+
optional string countryCode = 8;
|
|
37
|
+
optional string email = 9;
|
|
38
|
+
optional string phone = 10;
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
message UserUpdateRequest {
|
|
42
|
+
ProductKey productKey = 1;
|
|
43
|
+
string organizationId= 2;
|
|
44
|
+
string id = 3;
|
|
45
|
+
optional OrganizationRole orgRole = 4 ;
|
|
46
|
+
optional string firstName = 5;
|
|
47
|
+
optional string lastName = 6;
|
|
48
|
+
optional string middleName = 7;
|
|
49
|
+
optional string password = 8 ;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message UserCreateResponse {
|
|
53
|
+
string id = 1 ;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message UserUpdateResponse {
|
|
57
|
+
string id = 1 ;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message UpdateOrganizationRequest {
|
|
61
|
+
optional name = 1 ;
|
|
62
|
+
optional ownerId = 2 ;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message UpdateOrganizationResponse {
|
|
66
|
+
bool updated = 1
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
message LicenseCheckRequest {
|
|
71
|
+
string organizationId = 1 ;
|
|
72
|
+
string key = 2 ;
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message LicenseCheckResponse {
|
|
77
|
+
string organizationId = 1 ;
|
|
78
|
+
string key = 2 ;
|
|
79
|
+
|
|
80
|
+
}
|