@lansweeper/multitenant-api-grpc 0.2.3 → 0.2.5

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 CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@lansweeper/multitenant-api-grpc",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Multitenant grpc",
5
5
  "main": "gen-proto/index.js",
6
6
  "types": "gen-proto/index.d.ts",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "@grpc/grpc-js": "^1.3.2",
9
+ "@grpc/grpc-js": "^1.4.4",
10
10
  "google-protobuf": "^3.17.0"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/google-protobuf": "^3.15.5"
14
14
  },
15
- "gitHead": "690d3becbd54e6c31c5bde1dc3b76dd98f9be741"
15
+ "gitHead": "48445937a8dd83daa68e7eb5b19e85c053f72b3b"
16
16
  }
@@ -3,20 +3,20 @@ syntax = "proto3";
3
3
  package lansweeper.multitenant.v1;
4
4
 
5
5
  message PreviewAccount {
6
- string id = 1;
7
- string username = 2;
8
- string name = 3;
9
- string surname = 4;
10
- string email = 5;
11
- string image_url = 6;
6
+ string id = 1;
7
+ string username = 2;
8
+ string name = 3;
9
+ string surname = 4;
10
+ string email = 5;
11
+ string image_url = 6;
12
12
  }
13
13
 
14
- message GetPreviewAccountByIdRequest {
15
- string id = 1;
14
+ message GetPreviewAccountByIdRequest {
15
+ string id = 1;
16
16
  }
17
17
 
18
- message GetPreviewAccountByIdResponse {
19
- PreviewAccount account = 1;
18
+ message GetPreviewAccountByIdResponse {
19
+ PreviewAccount account = 1;
20
20
  }
21
21
 
22
22
 
@@ -29,58 +29,58 @@ enum SiteMode {
29
29
  }
30
30
 
31
31
  message PreviewSite {
32
- string id = 1;
33
- string name = 2;
34
- string company_name = 3;
35
- string logo_url = 4;
36
- SiteMode mode = 5;
32
+ string id = 1;
33
+ string name = 2;
34
+ string company_name = 3;
35
+ string logo_url = 4;
36
+ SiteMode mode = 5;
37
37
  }
38
38
 
39
39
 
40
40
  message PatchSiteModeRequest {
41
- string id = 1;
42
- SiteMode mode = 2;
41
+ string id = 1;
42
+ SiteMode mode = 2;
43
43
  }
44
44
 
45
45
  message PatchSiteModeResponse {
46
- bool success = 1;
46
+ bool success = 1;
47
47
  }
48
48
 
49
49
  message Profile {
50
- string id = 1;
51
- string site_id = 2;
52
- PreviewSite site = 3;
53
- bool is_owner = 4;
50
+ string id = 1;
51
+ string site_id = 2;
52
+ PreviewSite site = 3;
53
+ bool is_owner = 4;
54
54
  }
55
55
 
56
56
  message ListProfilesByAccountIdRequest{
57
- string account_id = 1;
58
- bool include_blocks = 2;
57
+ string account_id = 1;
58
+ bool include_blocks = 2;
59
59
  }
60
60
 
61
61
  message ListProfilesByAccountIdResponse {
62
- repeated Profile profile = 1;
62
+ repeated Profile profile = 1;
63
63
  }
64
64
 
65
65
  message CheckAccessToSiteByAccountIdRequest {
66
- string account_id = 1;
67
- string site_id = 2;
68
- bool only_owner = 3;
69
- message UserInfo {
70
- bool has_mfa = 1;
71
- bool is_sso_login = 2;
72
- }
73
- UserInfo user_info = 4;
66
+ string account_id = 1;
67
+ string site_id = 2;
68
+ bool only_owner = 3;
69
+ message UserInfo {
70
+ bool has_mfa = 1;
71
+ bool is_sso_login = 2;
72
+ }
73
+ UserInfo user_info = 4;
74
74
  }
75
75
 
76
76
  message CheckAccessToSiteByAccountIdResponse {
77
- bool access = 1;
77
+ bool access = 1;
78
78
  }
79
79
 
80
80
  enum InstallStateValue {
81
- INSTALL_STATE_VALUE_UNESPECIFIED = 0;
82
- INSTALL_STATE_VALUE_SYNC = 1;
83
- INSTALL_STATE_VALUE_UNSYNC = 2;
81
+ INSTALL_STATE_VALUE_UNESPECIFIED = 0;
82
+ INSTALL_STATE_VALUE_SYNC = 1;
83
+ INSTALL_STATE_VALUE_UNSYNC = 2;
84
84
  }
85
85
 
86
86
  message Install {
@@ -106,143 +106,168 @@ message InstallCredentials {
106
106
  }
107
107
 
108
108
  message GetInstallsCountBySiteRequest {
109
- string site_id = 1;
109
+ string site_id = 1;
110
110
  }
111
111
 
112
112
  message GetInstallsCountResponse {
113
- int64 count = 1;
113
+ int64 count = 1;
114
114
  }
115
115
 
116
116
  message GetInstallsBySiteRequest {
117
- string site_id = 1;
118
- message Filter {
119
- InstallStateValue state = 1;
120
- }
121
- Filter filter = 2;
117
+ string site_id = 1;
118
+ message Filter {
119
+ InstallStateValue state = 1;
120
+ }
121
+ Filter filter = 2;
122
122
  }
123
123
 
124
124
  message GetInstallsBySiteResponse {
125
- repeated Install install = 1;
125
+ repeated Install install = 1;
126
126
  }
127
127
 
128
128
  message GetInstallbyClientIdRequest {
129
- string client_id = 1;
129
+ string client_id = 1;
130
130
  }
131
131
 
132
132
  message GetInstallbyClientIdResponse {
133
- Install install = 1;
133
+ Install install = 1;
134
134
  }
135
135
 
136
136
  message CreateInstallRequest{
137
- string site_id = 1;
138
- string global_id = 9;
139
- string display_name = 3;
140
- string description = 4;
141
- string status = 5;
142
- string fqdn = 6;
143
- string created_by_id = 7;
137
+ string site_id = 1;
138
+ string global_id = 9;
139
+ string display_name = 3;
140
+ string description = 4;
141
+ string status = 5;
142
+ string fqdn = 6;
143
+ string created_by_id = 7;
144
144
 
145
- bool create_sqs_queue = 8;
145
+ bool create_sqs_queue = 8;
146
146
  }
147
147
 
148
148
  message CreateInstallResponse{
149
- Install install = 1;
150
- InstallCredentials credentials = 2;
149
+ Install install = 1;
150
+ InstallCredentials credentials = 2;
151
151
  }
152
152
 
153
153
  message UpdateInstallByClientIdRequest{
154
- string client_id = 1;
155
- string display_name = 2;
156
- string description = 3;
157
- string status = 4;
158
- string fqdn = 5;
159
-
160
- message SyncerSettings {
161
- string send_changed_data_timeout = 1;
162
- string send_fast_changing_data_timeout = 2;
163
- string send_non_changed_data_timeout = 3;
164
- string sync_interval_in_seconds = 4;
165
- }
154
+ string client_id = 1;
155
+ string display_name = 2;
156
+ string description = 3;
157
+ string status = 4;
158
+ string fqdn = 5;
159
+
160
+ message SyncerSettings {
161
+ string send_changed_data_timeout = 1;
162
+ string send_fast_changing_data_timeout = 2;
163
+ string send_non_changed_data_timeout = 3;
164
+ string sync_interval_in_seconds = 4;
165
+ }
166
166
 
167
- SyncerSettings syncer_settings = 6;
167
+ SyncerSettings syncer_settings = 6;
168
168
  }
169
169
 
170
170
  message UpdateInstallByClientIdResponse{
171
- Install install = 1;
171
+ Install install = 1;
172
172
  }
173
173
 
174
174
  message RotateInstallByClientIdRequest{
175
- string client_id = 1;
176
- string track_id = 2;
177
- }
175
+ string client_id = 1;
176
+ string track_id = 2;
177
+ }
178
178
 
179
179
  message RotateInstallByClientIdResponse {
180
- bool success = 1;
181
- string site_id = 2;
182
- string old_install_id = 3;
183
- string new_install_id = 4;
180
+ bool success = 1;
181
+ string site_id = 2;
182
+ string old_install_id = 3;
183
+ string new_install_id = 4;
184
184
  }
185
185
 
186
186
  message UnlinkInstallByClientIdRequest {
187
- string client_id = 1;
188
- string track_id = 2;
189
- bool remove_data = 3;
190
- bool from_onprem = 4;
187
+ string client_id = 1;
188
+ string track_id = 2;
189
+ bool remove_data = 3;
190
+ bool from_onprem = 4;
191
191
  }
192
192
 
193
193
  message UnlinkInstallByClientIdResponse {
194
- bool success = 1;
194
+ bool success = 1;
195
195
  }
196
196
 
197
197
  message RemoveInstallDataBySiteIdRequest {
198
- string site_id = 1;
199
- repeated string install_ids = 2;
200
- string user_id = 3;
198
+ string site_id = 1;
199
+ repeated string install_ids = 2;
200
+ string user_id = 3;
201
201
  }
202
202
 
203
203
  message RemoveInstallDataBySiteIdResponse {
204
- message Result {
205
- string install_id = 1;
206
- bool queued = 2;
207
- }
208
- repeated Result result = 1;
204
+ message Result {
205
+ string install_id = 1;
206
+ bool queued = 2;
207
+ }
208
+ repeated Result result = 1;
209
209
  }
210
210
 
211
211
  message GetDuplicatedInstallsByGlobalIdRequest {
212
- string site_id = 1;
213
- string global_id = 2;
212
+ string site_id = 1;
213
+ string global_id = 2;
214
214
  }
215
215
 
216
216
  message GetDuplicatedInstallsByGlobalIdResponse {
217
- repeated Install install = 1;
217
+ repeated Install install = 1;
218
+ }
219
+
220
+ message GetUserPermissionsRequest {
221
+ string site_id = 1;
222
+ string account_id = 2;
218
223
  }
219
224
 
225
+ message GetUserPermissionsResponse {
226
+ message AuthorizationAction {
227
+ string key = 1;
228
+ bytes derived_permissions = 2;
229
+ }
230
+
231
+ message Scope {
232
+ string id = 1;
233
+ }
234
+
235
+ message Role {
236
+ string id = 1;
237
+ repeated AuthorizationAction actions = 2;
238
+ repeated Install installations = 3;
239
+ repeated Scope scopes = 4;
240
+ }
241
+
242
+ repeated Role roles = 1;
243
+ }
220
244
 
221
245
  service Multitenant {
222
- rpc CheckAccessToSiteByAccountId(CheckAccessToSiteByAccountIdRequest) returns (CheckAccessToSiteByAccountIdResponse) {}
246
+ rpc CheckAccessToSiteByAccountId(CheckAccessToSiteByAccountIdRequest) returns (CheckAccessToSiteByAccountIdResponse) {}
223
247
 
224
- rpc GetPreviewAccountById(GetPreviewAccountByIdRequest) returns (GetPreviewAccountByIdResponse) {}
248
+ rpc GetPreviewAccountById(GetPreviewAccountByIdRequest) returns (GetPreviewAccountByIdResponse) {}
225
249
 
226
- rpc ListProfilesByAccountId(ListProfilesByAccountIdRequest) returns (ListProfilesByAccountIdResponse) {}
250
+ rpc ListProfilesByAccountId(ListProfilesByAccountIdRequest) returns (ListProfilesByAccountIdResponse) {}
227
251
 
228
- rpc PatchSiteMode(PatchSiteModeRequest) returns (PatchSiteModeResponse) {}
252
+ rpc PatchSiteMode(PatchSiteModeRequest) returns (PatchSiteModeResponse) {}
229
253
 
230
- rpc CreateInstall(CreateInstallRequest) returns (CreateInstallResponse) {}
254
+ rpc CreateInstall(CreateInstallRequest) returns (CreateInstallResponse) {}
231
255
 
232
- rpc GetInstallsBySite(GetInstallsBySiteRequest) returns (GetInstallsBySiteResponse) {}
256
+ rpc GetInstallsBySite(GetInstallsBySiteRequest) returns (GetInstallsBySiteResponse) {}
233
257
 
234
- rpc GetInstallsCountBySite(GetInstallsCountBySiteRequest) returns (GetInstallsCountResponse) {}
258
+ rpc GetInstallsCountBySite(GetInstallsCountBySiteRequest) returns (GetInstallsCountResponse) {}
235
259
 
236
- rpc GetInstallbyClientId(GetInstallbyClientIdRequest) returns (GetInstallbyClientIdResponse) {}
260
+ rpc GetInstallbyClientId(GetInstallbyClientIdRequest) returns (GetInstallbyClientIdResponse) {}
237
261
 
238
- rpc UpdateInstallByClientId(UpdateInstallByClientIdRequest) returns (UpdateInstallByClientIdResponse) {}
262
+ rpc UpdateInstallByClientId(UpdateInstallByClientIdRequest) returns (UpdateInstallByClientIdResponse) {}
239
263
 
240
- rpc RotateInstallByClientId(RotateInstallByClientIdRequest) returns (RotateInstallByClientIdResponse) {}
264
+ rpc RotateInstallByClientId(RotateInstallByClientIdRequest) returns (RotateInstallByClientIdResponse) {}
241
265
 
242
- rpc UnlinkInstallByClientId(UnlinkInstallByClientIdRequest) returns (UnlinkInstallByClientIdResponse) {}
266
+ rpc UnlinkInstallByClientId(UnlinkInstallByClientIdRequest) returns (UnlinkInstallByClientIdResponse) {}
243
267
 
244
- rpc RemoveInstallDataBySiteId(RemoveInstallDataBySiteIdRequest) returns (RemoveInstallDataBySiteIdResponse) {}
268
+ rpc RemoveInstallDataBySiteId(RemoveInstallDataBySiteIdRequest) returns (RemoveInstallDataBySiteIdResponse) {}
245
269
 
246
- rpc GetDuplicatedInstallsByGlobalId(GetDuplicatedInstallsByGlobalIdRequest) returns (GetDuplicatedInstallsByGlobalIdResponse) {}
270
+ rpc GetDuplicatedInstallsByGlobalId(GetDuplicatedInstallsByGlobalIdRequest) returns (GetDuplicatedInstallsByGlobalIdResponse) {}
247
271
 
272
+ rpc GetUserPermissions(GetUserPermissionsRequest) returns (GetUserPermissionsResponse) {}
248
273
  }