@lansweeper/multitenant-api-grpc 0.2.2 → 0.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lansweeper/multitenant-api-grpc",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Multitenant grpc",
5
5
  "main": "gen-proto/index.js",
6
6
  "types": "gen-proto/index.d.ts",
@@ -12,5 +12,5 @@
12
12
  "devDependencies": {
13
13
  "@types/google-protobuf": "^3.15.5"
14
14
  },
15
- "gitHead": "df62a92fabbb28d96e0323320f4fd82e978f8eea"
15
+ "gitHead": "37e728e6d02465713106797578e06295b3b2f242"
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,53 +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;
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;
69
74
  }
70
75
 
71
76
  message CheckAccessToSiteByAccountIdResponse {
72
- bool access = 1;
77
+ bool access = 1;
73
78
  }
74
79
 
75
80
  enum InstallStateValue {
76
- INSTALL_STATE_VALUE_UNESPECIFIED = 0;
77
- INSTALL_STATE_VALUE_SYNC = 1;
78
- INSTALL_STATE_VALUE_UNSYNC = 2;
81
+ INSTALL_STATE_VALUE_UNESPECIFIED = 0;
82
+ INSTALL_STATE_VALUE_SYNC = 1;
83
+ INSTALL_STATE_VALUE_UNSYNC = 2;
79
84
  }
80
85
 
81
86
  message Install {
@@ -101,143 +106,168 @@ message InstallCredentials {
101
106
  }
102
107
 
103
108
  message GetInstallsCountBySiteRequest {
104
- string site_id = 1;
109
+ string site_id = 1;
105
110
  }
106
111
 
107
112
  message GetInstallsCountResponse {
108
- int64 count = 1;
113
+ int64 count = 1;
109
114
  }
110
115
 
111
116
  message GetInstallsBySiteRequest {
112
- string site_id = 1;
113
- message Filter {
114
- InstallStateValue state = 1;
115
- }
116
- Filter filter = 2;
117
+ string site_id = 1;
118
+ message Filter {
119
+ InstallStateValue state = 1;
120
+ }
121
+ Filter filter = 2;
117
122
  }
118
123
 
119
124
  message GetInstallsBySiteResponse {
120
- repeated Install install = 1;
125
+ repeated Install install = 1;
121
126
  }
122
127
 
123
128
  message GetInstallbyClientIdRequest {
124
- string client_id = 1;
129
+ string client_id = 1;
125
130
  }
126
131
 
127
132
  message GetInstallbyClientIdResponse {
128
- Install install = 1;
133
+ Install install = 1;
129
134
  }
130
135
 
131
136
  message CreateInstallRequest{
132
- string site_id = 1;
133
- string global_id = 9;
134
- string display_name = 3;
135
- string description = 4;
136
- string status = 5;
137
- string fqdn = 6;
138
- 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;
139
144
 
140
- bool create_sqs_queue = 8;
145
+ bool create_sqs_queue = 8;
141
146
  }
142
147
 
143
148
  message CreateInstallResponse{
144
- Install install = 1;
145
- InstallCredentials credentials = 2;
149
+ Install install = 1;
150
+ InstallCredentials credentials = 2;
146
151
  }
147
152
 
148
153
  message UpdateInstallByClientIdRequest{
149
- string client_id = 1;
150
- string display_name = 2;
151
- string description = 3;
152
- string status = 4;
153
- string fqdn = 5;
154
-
155
- message SyncerSettings {
156
- string send_changed_data_timeout = 1;
157
- string send_fast_changing_data_timeout = 2;
158
- string send_non_changed_data_timeout = 3;
159
- string sync_interval_in_seconds = 4;
160
- }
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
+ }
161
166
 
162
- SyncerSettings syncer_settings = 6;
167
+ SyncerSettings syncer_settings = 6;
163
168
  }
164
169
 
165
170
  message UpdateInstallByClientIdResponse{
166
- Install install = 1;
171
+ Install install = 1;
167
172
  }
168
173
 
169
174
  message RotateInstallByClientIdRequest{
170
- string client_id = 1;
171
- string track_id = 2;
172
- }
175
+ string client_id = 1;
176
+ string track_id = 2;
177
+ }
173
178
 
174
179
  message RotateInstallByClientIdResponse {
175
- bool success = 1;
176
- string site_id = 2;
177
- string old_install_id = 3;
178
- 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;
179
184
  }
180
185
 
181
186
  message UnlinkInstallByClientIdRequest {
182
- string client_id = 1;
183
- string track_id = 2;
184
- bool remove_data = 3;
185
- bool from_onprem = 4;
187
+ string client_id = 1;
188
+ string track_id = 2;
189
+ bool remove_data = 3;
190
+ bool from_onprem = 4;
186
191
  }
187
192
 
188
193
  message UnlinkInstallByClientIdResponse {
189
- bool success = 1;
194
+ bool success = 1;
190
195
  }
191
196
 
192
197
  message RemoveInstallDataBySiteIdRequest {
193
- string site_id = 1;
194
- repeated string install_ids = 2;
195
- string user_id = 3;
198
+ string site_id = 1;
199
+ repeated string install_ids = 2;
200
+ string user_id = 3;
196
201
  }
197
202
 
198
203
  message RemoveInstallDataBySiteIdResponse {
199
- message Result {
200
- string install_id = 1;
201
- bool queued = 2;
202
- }
203
- repeated Result result = 1;
204
+ message Result {
205
+ string install_id = 1;
206
+ bool queued = 2;
207
+ }
208
+ repeated Result result = 1;
204
209
  }
205
210
 
206
211
  message GetDuplicatedInstallsByGlobalIdRequest {
207
- string site_id = 1;
208
- string global_id = 2;
212
+ string site_id = 1;
213
+ string global_id = 2;
209
214
  }
210
215
 
211
216
  message GetDuplicatedInstallsByGlobalIdResponse {
212
- repeated Install install = 1;
217
+ repeated Install install = 1;
218
+ }
219
+
220
+ message GetUserPermissionsRequest {
221
+ string site_id = 1;
222
+ string account_id = 2;
213
223
  }
214
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
+ }
215
244
 
216
245
  service Multitenant {
217
- rpc CheckAccessToSiteByAccountId(CheckAccessToSiteByAccountIdRequest) returns (CheckAccessToSiteByAccountIdResponse) {}
246
+ rpc CheckAccessToSiteByAccountId(CheckAccessToSiteByAccountIdRequest) returns (CheckAccessToSiteByAccountIdResponse) {}
218
247
 
219
- rpc GetPreviewAccountById(GetPreviewAccountByIdRequest) returns (GetPreviewAccountByIdResponse) {}
248
+ rpc GetPreviewAccountById(GetPreviewAccountByIdRequest) returns (GetPreviewAccountByIdResponse) {}
220
249
 
221
- rpc ListProfilesByAccountId(ListProfilesByAccountIdRequest) returns (ListProfilesByAccountIdResponse) {}
250
+ rpc ListProfilesByAccountId(ListProfilesByAccountIdRequest) returns (ListProfilesByAccountIdResponse) {}
222
251
 
223
- rpc PatchSiteMode(PatchSiteModeRequest) returns (PatchSiteModeResponse) {}
252
+ rpc PatchSiteMode(PatchSiteModeRequest) returns (PatchSiteModeResponse) {}
224
253
 
225
- rpc CreateInstall(CreateInstallRequest) returns (CreateInstallResponse) {}
254
+ rpc CreateInstall(CreateInstallRequest) returns (CreateInstallResponse) {}
226
255
 
227
- rpc GetInstallsBySite(GetInstallsBySiteRequest) returns (GetInstallsBySiteResponse) {}
256
+ rpc GetInstallsBySite(GetInstallsBySiteRequest) returns (GetInstallsBySiteResponse) {}
228
257
 
229
- rpc GetInstallsCountBySite(GetInstallsCountBySiteRequest) returns (GetInstallsCountResponse) {}
258
+ rpc GetInstallsCountBySite(GetInstallsCountBySiteRequest) returns (GetInstallsCountResponse) {}
230
259
 
231
- rpc GetInstallbyClientId(GetInstallbyClientIdRequest) returns (GetInstallbyClientIdResponse) {}
260
+ rpc GetInstallbyClientId(GetInstallbyClientIdRequest) returns (GetInstallbyClientIdResponse) {}
232
261
 
233
- rpc UpdateInstallByClientId(UpdateInstallByClientIdRequest) returns (UpdateInstallByClientIdResponse) {}
262
+ rpc UpdateInstallByClientId(UpdateInstallByClientIdRequest) returns (UpdateInstallByClientIdResponse) {}
234
263
 
235
- rpc RotateInstallByClientId(RotateInstallByClientIdRequest) returns (RotateInstallByClientIdResponse) {}
264
+ rpc RotateInstallByClientId(RotateInstallByClientIdRequest) returns (RotateInstallByClientIdResponse) {}
236
265
 
237
- rpc UnlinkInstallByClientId(UnlinkInstallByClientIdRequest) returns (UnlinkInstallByClientIdResponse) {}
266
+ rpc UnlinkInstallByClientId(UnlinkInstallByClientIdRequest) returns (UnlinkInstallByClientIdResponse) {}
238
267
 
239
- rpc RemoveInstallDataBySiteId(RemoveInstallDataBySiteIdRequest) returns (RemoveInstallDataBySiteIdResponse) {}
268
+ rpc RemoveInstallDataBySiteId(RemoveInstallDataBySiteIdRequest) returns (RemoveInstallDataBySiteIdResponse) {}
240
269
 
241
- rpc GetDuplicatedInstallsByGlobalId(GetDuplicatedInstallsByGlobalIdRequest) returns (GetDuplicatedInstallsByGlobalIdResponse) {}
270
+ rpc GetDuplicatedInstallsByGlobalId(GetDuplicatedInstallsByGlobalIdRequest) returns (GetDuplicatedInstallsByGlobalIdResponse) {}
242
271
 
272
+ rpc GetUserPermissions(GetUserPermissionsRequest) returns (GetUserPermissionsResponse) {}
243
273
  }