@conduitplatform/grpc-sdk 0.16.0-alpha.20 → 0.16.0-alpha.22
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/dist/classes/ConduitAuthorizedResource.js +5 -6
- package/dist/classes/ConduitAuthorizedResource.js.map +1 -1
- package/dist/classes/ConduitModule.js +59 -169
- package/dist/classes/ConduitModule.js.map +1 -1
- package/dist/classes/ConduitSchema.js +3 -4
- package/dist/classes/ConduitSchema.js.map +1 -1
- package/dist/classes/Error.js +17 -40
- package/dist/classes/Error.js.map +1 -1
- package/dist/classes/HealthCheck.js +28 -96
- package/dist/classes/HealthCheck.js.map +1 -1
- package/dist/index.js +295 -468
- package/dist/index.js.map +1 -1
- package/dist/interceptors/grpcSignedToken.js +7 -79
- package/dist/interceptors/grpcSignedToken.js.map +1 -1
- package/dist/interceptors/moduleName.js +7 -79
- package/dist/interceptors/moduleName.js.map +1 -1
- package/dist/interfaces/ConduitRouteReturn.js +9 -18
- package/dist/interfaces/ConduitRouteReturn.js.map +1 -1
- package/dist/modules/admin/index.js +13 -31
- package/dist/modules/admin/index.js.map +1 -1
- package/dist/modules/authentication/index.js +30 -50
- package/dist/modules/authentication/index.js.map +1 -1
- package/dist/modules/authorization/index.d.ts +1 -0
- package/dist/modules/authorization/index.js +35 -50
- package/dist/modules/authorization/index.js.map +1 -1
- package/dist/modules/chat/index.js +16 -34
- package/dist/modules/chat/index.js.map +1 -1
- package/dist/modules/config/index.d.ts +10 -1
- package/dist/modules/config/index.js +82 -184
- package/dist/modules/config/index.js.map +1 -1
- package/dist/modules/core/index.js +8 -26
- package/dist/modules/core/index.js.map +1 -1
- package/dist/modules/database/index.js +139 -179
- package/dist/modules/database/index.js.map +1 -1
- package/dist/modules/email/index.js +15 -33
- package/dist/modules/email/index.js.map +1 -1
- package/dist/modules/pushNotifications/index.js +38 -56
- package/dist/modules/pushNotifications/index.js.map +1 -1
- package/dist/modules/router/index.js +15 -33
- package/dist/modules/router/index.js.map +1 -1
- package/dist/modules/sms/index.js +17 -35
- package/dist/modules/sms/index.js.map +1 -1
- package/dist/modules/storage/index.js +57 -77
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/protoUtils/authentication.d.ts +1 -1
- package/dist/protoUtils/authentication.js +267 -235
- package/dist/protoUtils/authentication.js.map +1 -1
- package/dist/protoUtils/authorization.d.ts +36 -1
- package/dist/protoUtils/authorization.js +494 -448
- package/dist/protoUtils/authorization.js.map +1 -1
- package/dist/protoUtils/chat.d.ts +1 -1
- package/dist/protoUtils/chat.js +128 -165
- package/dist/protoUtils/chat.js.map +1 -1
- package/dist/protoUtils/core.d.ts +4 -1
- package/dist/protoUtils/core.js +641 -573
- package/dist/protoUtils/core.js.map +1 -1
- package/dist/protoUtils/database.d.ts +1 -1
- package/dist/protoUtils/database.js +766 -766
- package/dist/protoUtils/database.js.map +1 -1
- package/dist/protoUtils/email.d.ts +1 -1
- package/dist/protoUtils/email.js +144 -174
- package/dist/protoUtils/email.js.map +1 -1
- package/dist/protoUtils/google/protobuf/empty.d.ts +1 -1
- package/dist/protoUtils/google/protobuf/empty.js +14 -15
- package/dist/protoUtils/google/protobuf/empty.js.map +1 -1
- package/dist/protoUtils/grpc_health_check.d.ts +1 -1
- package/dist/protoUtils/grpc_health_check.js +36 -34
- package/dist/protoUtils/grpc_health_check.js.map +1 -1
- package/dist/protoUtils/module.d.ts +1 -1
- package/dist/protoUtils/module.js +285 -293
- package/dist/protoUtils/module.js.map +1 -1
- package/dist/protoUtils/push-notifications.d.ts +1 -1
- package/dist/protoUtils/push-notifications.js +226 -244
- package/dist/protoUtils/push-notifications.js.map +1 -1
- package/dist/protoUtils/router.d.ts +1 -1
- package/dist/protoUtils/router.js +312 -320
- package/dist/protoUtils/router.js.map +1 -1
- package/dist/protoUtils/sms.d.ts +1 -1
- package/dist/protoUtils/sms.js +119 -109
- package/dist/protoUtils/sms.js.map +1 -1
- package/dist/protoUtils/storage.d.ts +1 -1
- package/dist/protoUtils/storage.js +338 -259
- package/dist/protoUtils/storage.js.map +1 -1
- package/dist/types/index.js +6 -24
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/EventBus.js +20 -37
- package/dist/utilities/EventBus.js.map +1 -1
- package/dist/utilities/RedisManager.js +11 -21
- package/dist/utilities/RedisManager.js.map +1 -1
- package/dist/utilities/StateManager.js +13 -14
- package/dist/utilities/StateManager.js.map +1 -1
- package/dist/utilities/env.js +4 -4
- package/dist/utilities/env.js.map +1 -1
- package/dist/utilities/sleep.js +1 -1
- package/dist/utilities/sleep.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,131 +1,95 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __values = (this && this.__values) || function(o) {
|
|
3
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4
|
-
if (m) return m.call(o);
|
|
5
|
-
if (o && typeof o.length === "number") return {
|
|
6
|
-
next: function () {
|
|
7
|
-
if (o && i >= o.length) o = void 0;
|
|
8
|
-
return { value: o && o[i++], done: !o };
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12
|
-
};
|
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.AuthorizationDefinition = exports.Decision = exports.PermissionRequest = exports.PermissionCheck = exports.ResourceAccessListRequest = exports.AllowedResourcesResponse = exports.AllowedResourcesRequest = exports.FindRelationResponse = exports.FindRelationRequest = exports.DeleteResourceRequest = exports.DeleteAllRelationsRequest = exports.Relation = exports.Resource_Permission = exports.Resource_Relation = exports.Resource = void 0;
|
|
6
|
+
exports.AuthorizationDefinition = exports.Decision = exports.PermissionRequest = exports.PermissionCheck = exports.ResourceAccessListRequest = exports.AllowedResourcesResponse = exports.AllowedResourcesRequest = exports.FindRelationResponse = exports.FindRelationRequest = exports.DeleteResourceRequest = exports.DeleteAllRelationsRequest = exports.CreateRelationsRequest = exports.Relation = exports.Resource_Permission = exports.Resource_Relation = exports.Resource = void 0;
|
|
18
7
|
/* eslint-disable */
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
+
const empty_1 = require("./google/protobuf/empty");
|
|
21
10
|
function createBaseResource() {
|
|
22
11
|
return { name: "", relations: [], permissions: [] };
|
|
23
12
|
}
|
|
24
13
|
exports.Resource = {
|
|
25
|
-
encode
|
|
26
|
-
var e_1, _a, e_2, _b;
|
|
27
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
14
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
28
15
|
if (message.name !== "") {
|
|
29
16
|
writer.uint32(10).string(message.name);
|
|
30
17
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var v = _d.value;
|
|
34
|
-
exports.Resource_Relation.encode(v, writer.uint32(18).fork()).ldelim();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
38
|
-
finally {
|
|
39
|
-
try {
|
|
40
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
41
|
-
}
|
|
42
|
-
finally { if (e_1) throw e_1.error; }
|
|
18
|
+
for (const v of message.relations) {
|
|
19
|
+
exports.Resource_Relation.encode(v, writer.uint32(18).fork()).ldelim();
|
|
43
20
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var v = _f.value;
|
|
47
|
-
exports.Resource_Permission.encode(v, writer.uint32(26).fork()).ldelim();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
51
|
-
finally {
|
|
52
|
-
try {
|
|
53
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
54
|
-
}
|
|
55
|
-
finally { if (e_2) throw e_2.error; }
|
|
21
|
+
for (const v of message.permissions) {
|
|
22
|
+
exports.Resource_Permission.encode(v, writer.uint32(26).fork()).ldelim();
|
|
56
23
|
}
|
|
57
24
|
return writer;
|
|
58
25
|
},
|
|
59
|
-
decode
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
26
|
+
decode(input, length) {
|
|
27
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
28
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
29
|
+
const message = createBaseResource();
|
|
63
30
|
while (reader.pos < end) {
|
|
64
|
-
|
|
31
|
+
const tag = reader.uint32();
|
|
65
32
|
switch (tag >>> 3) {
|
|
66
33
|
case 1:
|
|
67
|
-
if (tag
|
|
34
|
+
if (tag !== 10) {
|
|
68
35
|
break;
|
|
69
36
|
}
|
|
70
37
|
message.name = reader.string();
|
|
71
38
|
continue;
|
|
72
39
|
case 2:
|
|
73
|
-
if (tag
|
|
40
|
+
if (tag !== 18) {
|
|
74
41
|
break;
|
|
75
42
|
}
|
|
76
43
|
message.relations.push(exports.Resource_Relation.decode(reader, reader.uint32()));
|
|
77
44
|
continue;
|
|
78
45
|
case 3:
|
|
79
|
-
if (tag
|
|
46
|
+
if (tag !== 26) {
|
|
80
47
|
break;
|
|
81
48
|
}
|
|
82
49
|
message.permissions.push(exports.Resource_Permission.decode(reader, reader.uint32()));
|
|
83
50
|
continue;
|
|
84
51
|
}
|
|
85
|
-
if ((tag & 7)
|
|
52
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
86
53
|
break;
|
|
87
54
|
}
|
|
88
55
|
reader.skipType(tag & 7);
|
|
89
56
|
}
|
|
90
57
|
return message;
|
|
91
58
|
},
|
|
92
|
-
fromJSON
|
|
59
|
+
fromJSON(object) {
|
|
93
60
|
return {
|
|
94
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
95
|
-
relations: Array.isArray(object === null || object === void 0 ? void 0 : object.relations)
|
|
96
|
-
? object.relations.map(
|
|
61
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
62
|
+
relations: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.relations)
|
|
63
|
+
? object.relations.map((e) => exports.Resource_Relation.fromJSON(e))
|
|
97
64
|
: [],
|
|
98
|
-
permissions: Array.isArray(object === null || object === void 0 ? void 0 : object.permissions)
|
|
99
|
-
? object.permissions.map(
|
|
65
|
+
permissions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.permissions)
|
|
66
|
+
? object.permissions.map((e) => exports.Resource_Permission.fromJSON(e))
|
|
100
67
|
: [],
|
|
101
68
|
};
|
|
102
69
|
},
|
|
103
|
-
toJSON
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
if (message.
|
|
107
|
-
obj.
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
obj.relations = [];
|
|
70
|
+
toJSON(message) {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
const obj = {};
|
|
73
|
+
if (message.name !== "") {
|
|
74
|
+
obj.name = message.name;
|
|
111
75
|
}
|
|
112
|
-
if (message.
|
|
113
|
-
obj.
|
|
76
|
+
if ((_a = message.relations) === null || _a === void 0 ? void 0 : _a.length) {
|
|
77
|
+
obj.relations = message.relations.map((e) => exports.Resource_Relation.toJSON(e));
|
|
114
78
|
}
|
|
115
|
-
|
|
116
|
-
obj.permissions =
|
|
79
|
+
if ((_b = message.permissions) === null || _b === void 0 ? void 0 : _b.length) {
|
|
80
|
+
obj.permissions = message.permissions.map((e) => exports.Resource_Permission.toJSON(e));
|
|
117
81
|
}
|
|
118
82
|
return obj;
|
|
119
83
|
},
|
|
120
|
-
create
|
|
84
|
+
create(base) {
|
|
121
85
|
return exports.Resource.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
122
86
|
},
|
|
123
|
-
fromPartial
|
|
87
|
+
fromPartial(object) {
|
|
124
88
|
var _a, _b, _c;
|
|
125
|
-
|
|
89
|
+
const message = createBaseResource();
|
|
126
90
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
127
|
-
message.relations = ((_b = object.relations) === null || _b === void 0 ? void 0 : _b.map(
|
|
128
|
-
message.permissions = ((_c = object.permissions) === null || _c === void 0 ? void 0 : _c.map(
|
|
91
|
+
message.relations = ((_b = object.relations) === null || _b === void 0 ? void 0 : _b.map((e) => exports.Resource_Relation.fromPartial(e))) || [];
|
|
92
|
+
message.permissions = ((_c = object.permissions) === null || _c === void 0 ? void 0 : _c.map((e) => exports.Resource_Permission.fromPartial(e))) || [];
|
|
129
93
|
return message;
|
|
130
94
|
},
|
|
131
95
|
};
|
|
@@ -133,79 +97,69 @@ function createBaseResource_Relation() {
|
|
|
133
97
|
return { name: "", resourceType: [] };
|
|
134
98
|
}
|
|
135
99
|
exports.Resource_Relation = {
|
|
136
|
-
encode
|
|
137
|
-
var e_3, _a;
|
|
138
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
100
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
139
101
|
if (message.name !== "") {
|
|
140
102
|
writer.uint32(10).string(message.name);
|
|
141
103
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
var v = _c.value;
|
|
145
|
-
writer.uint32(18).string(v);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
149
|
-
finally {
|
|
150
|
-
try {
|
|
151
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
152
|
-
}
|
|
153
|
-
finally { if (e_3) throw e_3.error; }
|
|
104
|
+
for (const v of message.resourceType) {
|
|
105
|
+
writer.uint32(18).string(v);
|
|
154
106
|
}
|
|
155
107
|
return writer;
|
|
156
108
|
},
|
|
157
|
-
decode
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
109
|
+
decode(input, length) {
|
|
110
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
111
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
112
|
+
const message = createBaseResource_Relation();
|
|
161
113
|
while (reader.pos < end) {
|
|
162
|
-
|
|
114
|
+
const tag = reader.uint32();
|
|
163
115
|
switch (tag >>> 3) {
|
|
164
116
|
case 1:
|
|
165
|
-
if (tag
|
|
117
|
+
if (tag !== 10) {
|
|
166
118
|
break;
|
|
167
119
|
}
|
|
168
120
|
message.name = reader.string();
|
|
169
121
|
continue;
|
|
170
122
|
case 2:
|
|
171
|
-
if (tag
|
|
123
|
+
if (tag !== 18) {
|
|
172
124
|
break;
|
|
173
125
|
}
|
|
174
126
|
message.resourceType.push(reader.string());
|
|
175
127
|
continue;
|
|
176
128
|
}
|
|
177
|
-
if ((tag & 7)
|
|
129
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
178
130
|
break;
|
|
179
131
|
}
|
|
180
132
|
reader.skipType(tag & 7);
|
|
181
133
|
}
|
|
182
134
|
return message;
|
|
183
135
|
},
|
|
184
|
-
fromJSON
|
|
136
|
+
fromJSON(object) {
|
|
185
137
|
return {
|
|
186
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
187
|
-
resourceType: Array.isArray(object === null || object === void 0 ? void 0 : object.resourceType)
|
|
138
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
139
|
+
resourceType: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.resourceType)
|
|
140
|
+
? object.resourceType.map((e) => globalThis.String(e))
|
|
141
|
+
: [],
|
|
188
142
|
};
|
|
189
143
|
},
|
|
190
|
-
toJSON
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
if (message.
|
|
194
|
-
obj.
|
|
144
|
+
toJSON(message) {
|
|
145
|
+
var _a;
|
|
146
|
+
const obj = {};
|
|
147
|
+
if (message.name !== "") {
|
|
148
|
+
obj.name = message.name;
|
|
195
149
|
}
|
|
196
|
-
|
|
197
|
-
obj.resourceType =
|
|
150
|
+
if ((_a = message.resourceType) === null || _a === void 0 ? void 0 : _a.length) {
|
|
151
|
+
obj.resourceType = message.resourceType;
|
|
198
152
|
}
|
|
199
153
|
return obj;
|
|
200
154
|
},
|
|
201
|
-
create
|
|
155
|
+
create(base) {
|
|
202
156
|
return exports.Resource_Relation.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
203
157
|
},
|
|
204
|
-
fromPartial
|
|
158
|
+
fromPartial(object) {
|
|
205
159
|
var _a, _b;
|
|
206
|
-
|
|
160
|
+
const message = createBaseResource_Relation();
|
|
207
161
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
208
|
-
message.resourceType = ((_b = object.resourceType) === null || _b === void 0 ? void 0 : _b.map(
|
|
162
|
+
message.resourceType = ((_b = object.resourceType) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
209
163
|
return message;
|
|
210
164
|
},
|
|
211
165
|
};
|
|
@@ -213,79 +167,67 @@ function createBaseResource_Permission() {
|
|
|
213
167
|
return { name: "", roles: [] };
|
|
214
168
|
}
|
|
215
169
|
exports.Resource_Permission = {
|
|
216
|
-
encode
|
|
217
|
-
var e_4, _a;
|
|
218
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
170
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
219
171
|
if (message.name !== "") {
|
|
220
172
|
writer.uint32(10).string(message.name);
|
|
221
173
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
var v = _c.value;
|
|
225
|
-
writer.uint32(18).string(v);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
229
|
-
finally {
|
|
230
|
-
try {
|
|
231
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
232
|
-
}
|
|
233
|
-
finally { if (e_4) throw e_4.error; }
|
|
174
|
+
for (const v of message.roles) {
|
|
175
|
+
writer.uint32(18).string(v);
|
|
234
176
|
}
|
|
235
177
|
return writer;
|
|
236
178
|
},
|
|
237
|
-
decode
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
179
|
+
decode(input, length) {
|
|
180
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
181
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
182
|
+
const message = createBaseResource_Permission();
|
|
241
183
|
while (reader.pos < end) {
|
|
242
|
-
|
|
184
|
+
const tag = reader.uint32();
|
|
243
185
|
switch (tag >>> 3) {
|
|
244
186
|
case 1:
|
|
245
|
-
if (tag
|
|
187
|
+
if (tag !== 10) {
|
|
246
188
|
break;
|
|
247
189
|
}
|
|
248
190
|
message.name = reader.string();
|
|
249
191
|
continue;
|
|
250
192
|
case 2:
|
|
251
|
-
if (tag
|
|
193
|
+
if (tag !== 18) {
|
|
252
194
|
break;
|
|
253
195
|
}
|
|
254
196
|
message.roles.push(reader.string());
|
|
255
197
|
continue;
|
|
256
198
|
}
|
|
257
|
-
if ((tag & 7)
|
|
199
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
258
200
|
break;
|
|
259
201
|
}
|
|
260
202
|
reader.skipType(tag & 7);
|
|
261
203
|
}
|
|
262
204
|
return message;
|
|
263
205
|
},
|
|
264
|
-
fromJSON
|
|
206
|
+
fromJSON(object) {
|
|
265
207
|
return {
|
|
266
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
267
|
-
roles: Array.isArray(object === null || object === void 0 ? void 0 : object.roles) ? object.roles.map(
|
|
208
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
209
|
+
roles: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.roles) ? object.roles.map((e) => globalThis.String(e)) : [],
|
|
268
210
|
};
|
|
269
211
|
},
|
|
270
|
-
toJSON
|
|
271
|
-
var
|
|
272
|
-
|
|
273
|
-
if (message.
|
|
274
|
-
obj.
|
|
212
|
+
toJSON(message) {
|
|
213
|
+
var _a;
|
|
214
|
+
const obj = {};
|
|
215
|
+
if (message.name !== "") {
|
|
216
|
+
obj.name = message.name;
|
|
275
217
|
}
|
|
276
|
-
|
|
277
|
-
obj.roles =
|
|
218
|
+
if ((_a = message.roles) === null || _a === void 0 ? void 0 : _a.length) {
|
|
219
|
+
obj.roles = message.roles;
|
|
278
220
|
}
|
|
279
221
|
return obj;
|
|
280
222
|
},
|
|
281
|
-
create
|
|
223
|
+
create(base) {
|
|
282
224
|
return exports.Resource_Permission.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
283
225
|
},
|
|
284
|
-
fromPartial
|
|
226
|
+
fromPartial(object) {
|
|
285
227
|
var _a, _b;
|
|
286
|
-
|
|
228
|
+
const message = createBaseResource_Permission();
|
|
287
229
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
288
|
-
message.roles = ((_b = object.roles) === null || _b === void 0 ? void 0 : _b.map(
|
|
230
|
+
message.roles = ((_b = object.roles) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
289
231
|
return message;
|
|
290
232
|
},
|
|
291
233
|
};
|
|
@@ -293,8 +235,7 @@ function createBaseRelation() {
|
|
|
293
235
|
return { subject: "", relation: "", resource: "" };
|
|
294
236
|
}
|
|
295
237
|
exports.Relation = {
|
|
296
|
-
encode
|
|
297
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
238
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
298
239
|
if (message.subject !== "") {
|
|
299
240
|
writer.uint32(10).string(message.subject);
|
|
300
241
|
}
|
|
@@ -306,71 +247,160 @@ exports.Relation = {
|
|
|
306
247
|
}
|
|
307
248
|
return writer;
|
|
308
249
|
},
|
|
309
|
-
decode
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
250
|
+
decode(input, length) {
|
|
251
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
252
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
253
|
+
const message = createBaseRelation();
|
|
313
254
|
while (reader.pos < end) {
|
|
314
|
-
|
|
255
|
+
const tag = reader.uint32();
|
|
315
256
|
switch (tag >>> 3) {
|
|
316
257
|
case 1:
|
|
317
|
-
if (tag
|
|
258
|
+
if (tag !== 10) {
|
|
318
259
|
break;
|
|
319
260
|
}
|
|
320
261
|
message.subject = reader.string();
|
|
321
262
|
continue;
|
|
322
263
|
case 2:
|
|
323
|
-
if (tag
|
|
264
|
+
if (tag !== 18) {
|
|
324
265
|
break;
|
|
325
266
|
}
|
|
326
267
|
message.relation = reader.string();
|
|
327
268
|
continue;
|
|
328
269
|
case 3:
|
|
329
|
-
if (tag
|
|
270
|
+
if (tag !== 26) {
|
|
330
271
|
break;
|
|
331
272
|
}
|
|
332
273
|
message.resource = reader.string();
|
|
333
274
|
continue;
|
|
334
275
|
}
|
|
335
|
-
if ((tag & 7)
|
|
276
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
336
277
|
break;
|
|
337
278
|
}
|
|
338
279
|
reader.skipType(tag & 7);
|
|
339
280
|
}
|
|
340
281
|
return message;
|
|
341
282
|
},
|
|
342
|
-
fromJSON
|
|
283
|
+
fromJSON(object) {
|
|
343
284
|
return {
|
|
344
|
-
subject: isSet(object.subject) ? String(object.subject) : "",
|
|
345
|
-
relation: isSet(object.relation) ? String(object.relation) : "",
|
|
346
|
-
resource: isSet(object.resource) ? String(object.resource) : "",
|
|
285
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
286
|
+
relation: isSet(object.relation) ? globalThis.String(object.relation) : "",
|
|
287
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
|
|
347
288
|
};
|
|
348
289
|
},
|
|
349
|
-
toJSON
|
|
350
|
-
|
|
351
|
-
message.subject !==
|
|
352
|
-
|
|
353
|
-
|
|
290
|
+
toJSON(message) {
|
|
291
|
+
const obj = {};
|
|
292
|
+
if (message.subject !== "") {
|
|
293
|
+
obj.subject = message.subject;
|
|
294
|
+
}
|
|
295
|
+
if (message.relation !== "") {
|
|
296
|
+
obj.relation = message.relation;
|
|
297
|
+
}
|
|
298
|
+
if (message.resource !== "") {
|
|
299
|
+
obj.resource = message.resource;
|
|
300
|
+
}
|
|
354
301
|
return obj;
|
|
355
302
|
},
|
|
356
|
-
create
|
|
303
|
+
create(base) {
|
|
357
304
|
return exports.Relation.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
358
305
|
},
|
|
359
|
-
fromPartial
|
|
306
|
+
fromPartial(object) {
|
|
360
307
|
var _a, _b, _c;
|
|
361
|
-
|
|
308
|
+
const message = createBaseRelation();
|
|
362
309
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
|
|
363
310
|
message.relation = (_b = object.relation) !== null && _b !== void 0 ? _b : "";
|
|
364
311
|
message.resource = (_c = object.resource) !== null && _c !== void 0 ? _c : "";
|
|
365
312
|
return message;
|
|
366
313
|
},
|
|
367
314
|
};
|
|
315
|
+
function createBaseCreateRelationsRequest() {
|
|
316
|
+
return { subject: "", relation: "", resources: [] };
|
|
317
|
+
}
|
|
318
|
+
exports.CreateRelationsRequest = {
|
|
319
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
320
|
+
if (message.subject !== "") {
|
|
321
|
+
writer.uint32(10).string(message.subject);
|
|
322
|
+
}
|
|
323
|
+
if (message.relation !== "") {
|
|
324
|
+
writer.uint32(18).string(message.relation);
|
|
325
|
+
}
|
|
326
|
+
for (const v of message.resources) {
|
|
327
|
+
writer.uint32(26).string(v);
|
|
328
|
+
}
|
|
329
|
+
return writer;
|
|
330
|
+
},
|
|
331
|
+
decode(input, length) {
|
|
332
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
333
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
334
|
+
const message = createBaseCreateRelationsRequest();
|
|
335
|
+
while (reader.pos < end) {
|
|
336
|
+
const tag = reader.uint32();
|
|
337
|
+
switch (tag >>> 3) {
|
|
338
|
+
case 1:
|
|
339
|
+
if (tag !== 10) {
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
message.subject = reader.string();
|
|
343
|
+
continue;
|
|
344
|
+
case 2:
|
|
345
|
+
if (tag !== 18) {
|
|
346
|
+
break;
|
|
347
|
+
}
|
|
348
|
+
message.relation = reader.string();
|
|
349
|
+
continue;
|
|
350
|
+
case 3:
|
|
351
|
+
if (tag !== 26) {
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
message.resources.push(reader.string());
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
357
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
reader.skipType(tag & 7);
|
|
361
|
+
}
|
|
362
|
+
return message;
|
|
363
|
+
},
|
|
364
|
+
fromJSON(object) {
|
|
365
|
+
return {
|
|
366
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
367
|
+
relation: isSet(object.relation) ? globalThis.String(object.relation) : "",
|
|
368
|
+
resources: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.resources)
|
|
369
|
+
? object.resources.map((e) => globalThis.String(e))
|
|
370
|
+
: [],
|
|
371
|
+
};
|
|
372
|
+
},
|
|
373
|
+
toJSON(message) {
|
|
374
|
+
var _a;
|
|
375
|
+
const obj = {};
|
|
376
|
+
if (message.subject !== "") {
|
|
377
|
+
obj.subject = message.subject;
|
|
378
|
+
}
|
|
379
|
+
if (message.relation !== "") {
|
|
380
|
+
obj.relation = message.relation;
|
|
381
|
+
}
|
|
382
|
+
if ((_a = message.resources) === null || _a === void 0 ? void 0 : _a.length) {
|
|
383
|
+
obj.resources = message.resources;
|
|
384
|
+
}
|
|
385
|
+
return obj;
|
|
386
|
+
},
|
|
387
|
+
create(base) {
|
|
388
|
+
return exports.CreateRelationsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
389
|
+
},
|
|
390
|
+
fromPartial(object) {
|
|
391
|
+
var _a, _b, _c;
|
|
392
|
+
const message = createBaseCreateRelationsRequest();
|
|
393
|
+
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
|
|
394
|
+
message.relation = (_b = object.relation) !== null && _b !== void 0 ? _b : "";
|
|
395
|
+
message.resources = ((_c = object.resources) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
396
|
+
return message;
|
|
397
|
+
},
|
|
398
|
+
};
|
|
368
399
|
function createBaseDeleteAllRelationsRequest() {
|
|
369
400
|
return { subject: undefined, resource: undefined };
|
|
370
401
|
}
|
|
371
402
|
exports.DeleteAllRelationsRequest = {
|
|
372
|
-
encode
|
|
373
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
403
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
374
404
|
if (message.subject !== undefined) {
|
|
375
405
|
writer.uint32(10).string(message.subject);
|
|
376
406
|
}
|
|
@@ -379,51 +409,55 @@ exports.DeleteAllRelationsRequest = {
|
|
|
379
409
|
}
|
|
380
410
|
return writer;
|
|
381
411
|
},
|
|
382
|
-
decode
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
412
|
+
decode(input, length) {
|
|
413
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
414
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
415
|
+
const message = createBaseDeleteAllRelationsRequest();
|
|
386
416
|
while (reader.pos < end) {
|
|
387
|
-
|
|
417
|
+
const tag = reader.uint32();
|
|
388
418
|
switch (tag >>> 3) {
|
|
389
419
|
case 1:
|
|
390
|
-
if (tag
|
|
420
|
+
if (tag !== 10) {
|
|
391
421
|
break;
|
|
392
422
|
}
|
|
393
423
|
message.subject = reader.string();
|
|
394
424
|
continue;
|
|
395
425
|
case 2:
|
|
396
|
-
if (tag
|
|
426
|
+
if (tag !== 18) {
|
|
397
427
|
break;
|
|
398
428
|
}
|
|
399
429
|
message.resource = reader.string();
|
|
400
430
|
continue;
|
|
401
431
|
}
|
|
402
|
-
if ((tag & 7)
|
|
432
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
403
433
|
break;
|
|
404
434
|
}
|
|
405
435
|
reader.skipType(tag & 7);
|
|
406
436
|
}
|
|
407
437
|
return message;
|
|
408
438
|
},
|
|
409
|
-
fromJSON
|
|
439
|
+
fromJSON(object) {
|
|
410
440
|
return {
|
|
411
|
-
subject: isSet(object.subject) ? String(object.subject) : undefined,
|
|
412
|
-
resource: isSet(object.resource) ? String(object.resource) : undefined,
|
|
441
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : undefined,
|
|
442
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : undefined,
|
|
413
443
|
};
|
|
414
444
|
},
|
|
415
|
-
toJSON
|
|
416
|
-
|
|
417
|
-
message.subject !== undefined
|
|
418
|
-
|
|
445
|
+
toJSON(message) {
|
|
446
|
+
const obj = {};
|
|
447
|
+
if (message.subject !== undefined) {
|
|
448
|
+
obj.subject = message.subject;
|
|
449
|
+
}
|
|
450
|
+
if (message.resource !== undefined) {
|
|
451
|
+
obj.resource = message.resource;
|
|
452
|
+
}
|
|
419
453
|
return obj;
|
|
420
454
|
},
|
|
421
|
-
create
|
|
455
|
+
create(base) {
|
|
422
456
|
return exports.DeleteAllRelationsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
423
457
|
},
|
|
424
|
-
fromPartial
|
|
458
|
+
fromPartial(object) {
|
|
425
459
|
var _a, _b;
|
|
426
|
-
|
|
460
|
+
const message = createBaseDeleteAllRelationsRequest();
|
|
427
461
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : undefined;
|
|
428
462
|
message.resource = (_b = object.resource) !== null && _b !== void 0 ? _b : undefined;
|
|
429
463
|
return message;
|
|
@@ -433,48 +467,49 @@ function createBaseDeleteResourceRequest() {
|
|
|
433
467
|
return { name: "" };
|
|
434
468
|
}
|
|
435
469
|
exports.DeleteResourceRequest = {
|
|
436
|
-
encode
|
|
437
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
470
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
438
471
|
if (message.name !== "") {
|
|
439
472
|
writer.uint32(10).string(message.name);
|
|
440
473
|
}
|
|
441
474
|
return writer;
|
|
442
475
|
},
|
|
443
|
-
decode
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
476
|
+
decode(input, length) {
|
|
477
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
478
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
479
|
+
const message = createBaseDeleteResourceRequest();
|
|
447
480
|
while (reader.pos < end) {
|
|
448
|
-
|
|
481
|
+
const tag = reader.uint32();
|
|
449
482
|
switch (tag >>> 3) {
|
|
450
483
|
case 1:
|
|
451
|
-
if (tag
|
|
484
|
+
if (tag !== 10) {
|
|
452
485
|
break;
|
|
453
486
|
}
|
|
454
487
|
message.name = reader.string();
|
|
455
488
|
continue;
|
|
456
489
|
}
|
|
457
|
-
if ((tag & 7)
|
|
490
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
458
491
|
break;
|
|
459
492
|
}
|
|
460
493
|
reader.skipType(tag & 7);
|
|
461
494
|
}
|
|
462
495
|
return message;
|
|
463
496
|
},
|
|
464
|
-
fromJSON
|
|
465
|
-
return { name: isSet(object.name) ? String(object.name) : "" };
|
|
497
|
+
fromJSON(object) {
|
|
498
|
+
return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
|
|
466
499
|
},
|
|
467
|
-
toJSON
|
|
468
|
-
|
|
469
|
-
message.name !==
|
|
500
|
+
toJSON(message) {
|
|
501
|
+
const obj = {};
|
|
502
|
+
if (message.name !== "") {
|
|
503
|
+
obj.name = message.name;
|
|
504
|
+
}
|
|
470
505
|
return obj;
|
|
471
506
|
},
|
|
472
|
-
create
|
|
507
|
+
create(base) {
|
|
473
508
|
return exports.DeleteResourceRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
474
509
|
},
|
|
475
|
-
fromPartial
|
|
510
|
+
fromPartial(object) {
|
|
476
511
|
var _a;
|
|
477
|
-
|
|
512
|
+
const message = createBaseDeleteResourceRequest();
|
|
478
513
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
479
514
|
return message;
|
|
480
515
|
},
|
|
@@ -491,8 +526,7 @@ function createBaseFindRelationRequest() {
|
|
|
491
526
|
};
|
|
492
527
|
}
|
|
493
528
|
exports.FindRelationRequest = {
|
|
494
|
-
encode
|
|
495
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
529
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
496
530
|
if (message.subject !== undefined) {
|
|
497
531
|
writer.uint32(10).string(message.subject);
|
|
498
532
|
}
|
|
@@ -516,91 +550,105 @@ exports.FindRelationRequest = {
|
|
|
516
550
|
}
|
|
517
551
|
return writer;
|
|
518
552
|
},
|
|
519
|
-
decode
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
553
|
+
decode(input, length) {
|
|
554
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
555
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
556
|
+
const message = createBaseFindRelationRequest();
|
|
523
557
|
while (reader.pos < end) {
|
|
524
|
-
|
|
558
|
+
const tag = reader.uint32();
|
|
525
559
|
switch (tag >>> 3) {
|
|
526
560
|
case 1:
|
|
527
|
-
if (tag
|
|
561
|
+
if (tag !== 10) {
|
|
528
562
|
break;
|
|
529
563
|
}
|
|
530
564
|
message.subject = reader.string();
|
|
531
565
|
continue;
|
|
532
566
|
case 2:
|
|
533
|
-
if (tag
|
|
567
|
+
if (tag !== 18) {
|
|
534
568
|
break;
|
|
535
569
|
}
|
|
536
570
|
message.relation = reader.string();
|
|
537
571
|
continue;
|
|
538
572
|
case 3:
|
|
539
|
-
if (tag
|
|
573
|
+
if (tag !== 26) {
|
|
540
574
|
break;
|
|
541
575
|
}
|
|
542
576
|
message.resource = reader.string();
|
|
543
577
|
continue;
|
|
544
578
|
case 4:
|
|
545
|
-
if (tag
|
|
579
|
+
if (tag !== 34) {
|
|
546
580
|
break;
|
|
547
581
|
}
|
|
548
582
|
message.subjectType = reader.string();
|
|
549
583
|
continue;
|
|
550
584
|
case 5:
|
|
551
|
-
if (tag
|
|
585
|
+
if (tag !== 42) {
|
|
552
586
|
break;
|
|
553
587
|
}
|
|
554
588
|
message.resourceType = reader.string();
|
|
555
589
|
continue;
|
|
556
590
|
case 6:
|
|
557
|
-
if (tag
|
|
591
|
+
if (tag !== 48) {
|
|
558
592
|
break;
|
|
559
593
|
}
|
|
560
594
|
message.skip = reader.int32();
|
|
561
595
|
continue;
|
|
562
596
|
case 7:
|
|
563
|
-
if (tag
|
|
597
|
+
if (tag !== 56) {
|
|
564
598
|
break;
|
|
565
599
|
}
|
|
566
600
|
message.limit = reader.int32();
|
|
567
601
|
continue;
|
|
568
602
|
}
|
|
569
|
-
if ((tag & 7)
|
|
603
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
570
604
|
break;
|
|
571
605
|
}
|
|
572
606
|
reader.skipType(tag & 7);
|
|
573
607
|
}
|
|
574
608
|
return message;
|
|
575
609
|
},
|
|
576
|
-
fromJSON
|
|
610
|
+
fromJSON(object) {
|
|
577
611
|
return {
|
|
578
|
-
subject: isSet(object.subject) ? String(object.subject) : undefined,
|
|
579
|
-
relation: isSet(object.relation) ? String(object.relation) : undefined,
|
|
580
|
-
resource: isSet(object.resource) ? String(object.resource) : undefined,
|
|
581
|
-
subjectType: isSet(object.subjectType) ? String(object.subjectType) : undefined,
|
|
582
|
-
resourceType: isSet(object.resourceType) ? String(object.resourceType) : undefined,
|
|
583
|
-
skip: isSet(object.skip) ? Number(object.skip) : undefined,
|
|
584
|
-
limit: isSet(object.limit) ? Number(object.limit) : undefined,
|
|
612
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : undefined,
|
|
613
|
+
relation: isSet(object.relation) ? globalThis.String(object.relation) : undefined,
|
|
614
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : undefined,
|
|
615
|
+
subjectType: isSet(object.subjectType) ? globalThis.String(object.subjectType) : undefined,
|
|
616
|
+
resourceType: isSet(object.resourceType) ? globalThis.String(object.resourceType) : undefined,
|
|
617
|
+
skip: isSet(object.skip) ? globalThis.Number(object.skip) : undefined,
|
|
618
|
+
limit: isSet(object.limit) ? globalThis.Number(object.limit) : undefined,
|
|
585
619
|
};
|
|
586
620
|
},
|
|
587
|
-
toJSON
|
|
588
|
-
|
|
589
|
-
message.subject !== undefined
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
message.
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
message.
|
|
621
|
+
toJSON(message) {
|
|
622
|
+
const obj = {};
|
|
623
|
+
if (message.subject !== undefined) {
|
|
624
|
+
obj.subject = message.subject;
|
|
625
|
+
}
|
|
626
|
+
if (message.relation !== undefined) {
|
|
627
|
+
obj.relation = message.relation;
|
|
628
|
+
}
|
|
629
|
+
if (message.resource !== undefined) {
|
|
630
|
+
obj.resource = message.resource;
|
|
631
|
+
}
|
|
632
|
+
if (message.subjectType !== undefined) {
|
|
633
|
+
obj.subjectType = message.subjectType;
|
|
634
|
+
}
|
|
635
|
+
if (message.resourceType !== undefined) {
|
|
636
|
+
obj.resourceType = message.resourceType;
|
|
637
|
+
}
|
|
638
|
+
if (message.skip !== undefined) {
|
|
639
|
+
obj.skip = Math.round(message.skip);
|
|
640
|
+
}
|
|
641
|
+
if (message.limit !== undefined) {
|
|
642
|
+
obj.limit = Math.round(message.limit);
|
|
643
|
+
}
|
|
596
644
|
return obj;
|
|
597
645
|
},
|
|
598
|
-
create
|
|
646
|
+
create(base) {
|
|
599
647
|
return exports.FindRelationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
600
648
|
},
|
|
601
|
-
fromPartial
|
|
649
|
+
fromPartial(object) {
|
|
602
650
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
603
|
-
|
|
651
|
+
const message = createBaseFindRelationRequest();
|
|
604
652
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : undefined;
|
|
605
653
|
message.relation = (_b = object.relation) !== null && _b !== void 0 ? _b : undefined;
|
|
606
654
|
message.resource = (_c = object.resource) !== null && _c !== void 0 ? _c : undefined;
|
|
@@ -615,78 +663,68 @@ function createBaseFindRelationResponse() {
|
|
|
615
663
|
return { relations: [], count: 0 };
|
|
616
664
|
}
|
|
617
665
|
exports.FindRelationResponse = {
|
|
618
|
-
encode
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
try {
|
|
622
|
-
for (var _b = __values(message.relations), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
623
|
-
var v = _c.value;
|
|
624
|
-
exports.Relation.encode(v, writer.uint32(10).fork()).ldelim();
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
628
|
-
finally {
|
|
629
|
-
try {
|
|
630
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
631
|
-
}
|
|
632
|
-
finally { if (e_5) throw e_5.error; }
|
|
666
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
667
|
+
for (const v of message.relations) {
|
|
668
|
+
exports.Relation.encode(v, writer.uint32(10).fork()).ldelim();
|
|
633
669
|
}
|
|
634
670
|
if (message.count !== 0) {
|
|
635
671
|
writer.uint32(16).int32(message.count);
|
|
636
672
|
}
|
|
637
673
|
return writer;
|
|
638
674
|
},
|
|
639
|
-
decode
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
675
|
+
decode(input, length) {
|
|
676
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
677
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
678
|
+
const message = createBaseFindRelationResponse();
|
|
643
679
|
while (reader.pos < end) {
|
|
644
|
-
|
|
680
|
+
const tag = reader.uint32();
|
|
645
681
|
switch (tag >>> 3) {
|
|
646
682
|
case 1:
|
|
647
|
-
if (tag
|
|
683
|
+
if (tag !== 10) {
|
|
648
684
|
break;
|
|
649
685
|
}
|
|
650
686
|
message.relations.push(exports.Relation.decode(reader, reader.uint32()));
|
|
651
687
|
continue;
|
|
652
688
|
case 2:
|
|
653
|
-
if (tag
|
|
689
|
+
if (tag !== 16) {
|
|
654
690
|
break;
|
|
655
691
|
}
|
|
656
692
|
message.count = reader.int32();
|
|
657
693
|
continue;
|
|
658
694
|
}
|
|
659
|
-
if ((tag & 7)
|
|
695
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
660
696
|
break;
|
|
661
697
|
}
|
|
662
698
|
reader.skipType(tag & 7);
|
|
663
699
|
}
|
|
664
700
|
return message;
|
|
665
701
|
},
|
|
666
|
-
fromJSON
|
|
702
|
+
fromJSON(object) {
|
|
667
703
|
return {
|
|
668
|
-
relations: Array.isArray(object === null || object === void 0 ? void 0 : object.relations)
|
|
669
|
-
|
|
704
|
+
relations: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.relations)
|
|
705
|
+
? object.relations.map((e) => exports.Relation.fromJSON(e))
|
|
706
|
+
: [],
|
|
707
|
+
count: isSet(object.count) ? globalThis.Number(object.count) : 0,
|
|
670
708
|
};
|
|
671
709
|
},
|
|
672
|
-
toJSON
|
|
673
|
-
var
|
|
674
|
-
|
|
675
|
-
|
|
710
|
+
toJSON(message) {
|
|
711
|
+
var _a;
|
|
712
|
+
const obj = {};
|
|
713
|
+
if ((_a = message.relations) === null || _a === void 0 ? void 0 : _a.length) {
|
|
714
|
+
obj.relations = message.relations.map((e) => exports.Relation.toJSON(e));
|
|
676
715
|
}
|
|
677
|
-
|
|
678
|
-
obj.
|
|
716
|
+
if (message.count !== 0) {
|
|
717
|
+
obj.count = Math.round(message.count);
|
|
679
718
|
}
|
|
680
|
-
message.count !== undefined && (obj.count = Math.round(message.count));
|
|
681
719
|
return obj;
|
|
682
720
|
},
|
|
683
|
-
create
|
|
721
|
+
create(base) {
|
|
684
722
|
return exports.FindRelationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
685
723
|
},
|
|
686
|
-
fromPartial
|
|
724
|
+
fromPartial(object) {
|
|
687
725
|
var _a, _b;
|
|
688
|
-
|
|
689
|
-
message.relations = ((_a = object.relations) === null || _a === void 0 ? void 0 : _a.map(
|
|
726
|
+
const message = createBaseFindRelationResponse();
|
|
727
|
+
message.relations = ((_a = object.relations) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Relation.fromPartial(e))) || [];
|
|
690
728
|
message.count = (_b = object.count) !== null && _b !== void 0 ? _b : 0;
|
|
691
729
|
return message;
|
|
692
730
|
},
|
|
@@ -695,8 +733,7 @@ function createBaseAllowedResourcesRequest() {
|
|
|
695
733
|
return { subject: "", action: "", resourceType: "", skip: 0, limit: 0 };
|
|
696
734
|
}
|
|
697
735
|
exports.AllowedResourcesRequest = {
|
|
698
|
-
encode
|
|
699
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
736
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
700
737
|
if (message.subject !== "") {
|
|
701
738
|
writer.uint32(10).string(message.subject);
|
|
702
739
|
}
|
|
@@ -714,75 +751,85 @@ exports.AllowedResourcesRequest = {
|
|
|
714
751
|
}
|
|
715
752
|
return writer;
|
|
716
753
|
},
|
|
717
|
-
decode
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
754
|
+
decode(input, length) {
|
|
755
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
756
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
757
|
+
const message = createBaseAllowedResourcesRequest();
|
|
721
758
|
while (reader.pos < end) {
|
|
722
|
-
|
|
759
|
+
const tag = reader.uint32();
|
|
723
760
|
switch (tag >>> 3) {
|
|
724
761
|
case 1:
|
|
725
|
-
if (tag
|
|
762
|
+
if (tag !== 10) {
|
|
726
763
|
break;
|
|
727
764
|
}
|
|
728
765
|
message.subject = reader.string();
|
|
729
766
|
continue;
|
|
730
767
|
case 2:
|
|
731
|
-
if (tag
|
|
768
|
+
if (tag !== 18) {
|
|
732
769
|
break;
|
|
733
770
|
}
|
|
734
771
|
message.action = reader.string();
|
|
735
772
|
continue;
|
|
736
773
|
case 5:
|
|
737
|
-
if (tag
|
|
774
|
+
if (tag !== 42) {
|
|
738
775
|
break;
|
|
739
776
|
}
|
|
740
777
|
message.resourceType = reader.string();
|
|
741
778
|
continue;
|
|
742
779
|
case 6:
|
|
743
|
-
if (tag
|
|
780
|
+
if (tag !== 48) {
|
|
744
781
|
break;
|
|
745
782
|
}
|
|
746
783
|
message.skip = reader.int32();
|
|
747
784
|
continue;
|
|
748
785
|
case 7:
|
|
749
|
-
if (tag
|
|
786
|
+
if (tag !== 56) {
|
|
750
787
|
break;
|
|
751
788
|
}
|
|
752
789
|
message.limit = reader.int32();
|
|
753
790
|
continue;
|
|
754
791
|
}
|
|
755
|
-
if ((tag & 7)
|
|
792
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
756
793
|
break;
|
|
757
794
|
}
|
|
758
795
|
reader.skipType(tag & 7);
|
|
759
796
|
}
|
|
760
797
|
return message;
|
|
761
798
|
},
|
|
762
|
-
fromJSON
|
|
799
|
+
fromJSON(object) {
|
|
763
800
|
return {
|
|
764
|
-
subject: isSet(object.subject) ? String(object.subject) : "",
|
|
765
|
-
action: isSet(object.action) ? String(object.action) : "",
|
|
766
|
-
resourceType: isSet(object.resourceType) ? String(object.resourceType) : "",
|
|
767
|
-
skip: isSet(object.skip) ? Number(object.skip) : 0,
|
|
768
|
-
limit: isSet(object.limit) ? Number(object.limit) : 0,
|
|
801
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
802
|
+
action: isSet(object.action) ? globalThis.String(object.action) : "",
|
|
803
|
+
resourceType: isSet(object.resourceType) ? globalThis.String(object.resourceType) : "",
|
|
804
|
+
skip: isSet(object.skip) ? globalThis.Number(object.skip) : 0,
|
|
805
|
+
limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
|
|
769
806
|
};
|
|
770
807
|
},
|
|
771
|
-
toJSON
|
|
772
|
-
|
|
773
|
-
message.subject !==
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
message.
|
|
777
|
-
|
|
808
|
+
toJSON(message) {
|
|
809
|
+
const obj = {};
|
|
810
|
+
if (message.subject !== "") {
|
|
811
|
+
obj.subject = message.subject;
|
|
812
|
+
}
|
|
813
|
+
if (message.action !== "") {
|
|
814
|
+
obj.action = message.action;
|
|
815
|
+
}
|
|
816
|
+
if (message.resourceType !== "") {
|
|
817
|
+
obj.resourceType = message.resourceType;
|
|
818
|
+
}
|
|
819
|
+
if (message.skip !== 0) {
|
|
820
|
+
obj.skip = Math.round(message.skip);
|
|
821
|
+
}
|
|
822
|
+
if (message.limit !== 0) {
|
|
823
|
+
obj.limit = Math.round(message.limit);
|
|
824
|
+
}
|
|
778
825
|
return obj;
|
|
779
826
|
},
|
|
780
|
-
create
|
|
827
|
+
create(base) {
|
|
781
828
|
return exports.AllowedResourcesRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
782
829
|
},
|
|
783
|
-
fromPartial
|
|
830
|
+
fromPartial(object) {
|
|
784
831
|
var _a, _b, _c, _d, _e;
|
|
785
|
-
|
|
832
|
+
const message = createBaseAllowedResourcesRequest();
|
|
786
833
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
|
|
787
834
|
message.action = (_b = object.action) !== null && _b !== void 0 ? _b : "";
|
|
788
835
|
message.resourceType = (_c = object.resourceType) !== null && _c !== void 0 ? _c : "";
|
|
@@ -795,78 +842,68 @@ function createBaseAllowedResourcesResponse() {
|
|
|
795
842
|
return { resources: [], count: 0 };
|
|
796
843
|
}
|
|
797
844
|
exports.AllowedResourcesResponse = {
|
|
798
|
-
encode
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
try {
|
|
802
|
-
for (var _b = __values(message.resources), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
803
|
-
var v = _c.value;
|
|
804
|
-
writer.uint32(10).string(v);
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
808
|
-
finally {
|
|
809
|
-
try {
|
|
810
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
811
|
-
}
|
|
812
|
-
finally { if (e_6) throw e_6.error; }
|
|
845
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
846
|
+
for (const v of message.resources) {
|
|
847
|
+
writer.uint32(10).string(v);
|
|
813
848
|
}
|
|
814
849
|
if (message.count !== 0) {
|
|
815
850
|
writer.uint32(16).int32(message.count);
|
|
816
851
|
}
|
|
817
852
|
return writer;
|
|
818
853
|
},
|
|
819
|
-
decode
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
854
|
+
decode(input, length) {
|
|
855
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
856
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
857
|
+
const message = createBaseAllowedResourcesResponse();
|
|
823
858
|
while (reader.pos < end) {
|
|
824
|
-
|
|
859
|
+
const tag = reader.uint32();
|
|
825
860
|
switch (tag >>> 3) {
|
|
826
861
|
case 1:
|
|
827
|
-
if (tag
|
|
862
|
+
if (tag !== 10) {
|
|
828
863
|
break;
|
|
829
864
|
}
|
|
830
865
|
message.resources.push(reader.string());
|
|
831
866
|
continue;
|
|
832
867
|
case 2:
|
|
833
|
-
if (tag
|
|
868
|
+
if (tag !== 16) {
|
|
834
869
|
break;
|
|
835
870
|
}
|
|
836
871
|
message.count = reader.int32();
|
|
837
872
|
continue;
|
|
838
873
|
}
|
|
839
|
-
if ((tag & 7)
|
|
874
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
840
875
|
break;
|
|
841
876
|
}
|
|
842
877
|
reader.skipType(tag & 7);
|
|
843
878
|
}
|
|
844
879
|
return message;
|
|
845
880
|
},
|
|
846
|
-
fromJSON
|
|
881
|
+
fromJSON(object) {
|
|
847
882
|
return {
|
|
848
|
-
resources: Array.isArray(object === null || object === void 0 ? void 0 : object.resources)
|
|
849
|
-
|
|
883
|
+
resources: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.resources)
|
|
884
|
+
? object.resources.map((e) => globalThis.String(e))
|
|
885
|
+
: [],
|
|
886
|
+
count: isSet(object.count) ? globalThis.Number(object.count) : 0,
|
|
850
887
|
};
|
|
851
888
|
},
|
|
852
|
-
toJSON
|
|
853
|
-
var
|
|
854
|
-
|
|
855
|
-
|
|
889
|
+
toJSON(message) {
|
|
890
|
+
var _a;
|
|
891
|
+
const obj = {};
|
|
892
|
+
if ((_a = message.resources) === null || _a === void 0 ? void 0 : _a.length) {
|
|
893
|
+
obj.resources = message.resources;
|
|
856
894
|
}
|
|
857
|
-
|
|
858
|
-
obj.
|
|
895
|
+
if (message.count !== 0) {
|
|
896
|
+
obj.count = Math.round(message.count);
|
|
859
897
|
}
|
|
860
|
-
message.count !== undefined && (obj.count = Math.round(message.count));
|
|
861
898
|
return obj;
|
|
862
899
|
},
|
|
863
|
-
create
|
|
900
|
+
create(base) {
|
|
864
901
|
return exports.AllowedResourcesResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
865
902
|
},
|
|
866
|
-
fromPartial
|
|
903
|
+
fromPartial(object) {
|
|
867
904
|
var _a, _b;
|
|
868
|
-
|
|
869
|
-
message.resources = ((_a = object.resources) === null || _a === void 0 ? void 0 : _a.map(
|
|
905
|
+
const message = createBaseAllowedResourcesResponse();
|
|
906
|
+
message.resources = ((_a = object.resources) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
870
907
|
message.count = (_b = object.count) !== null && _b !== void 0 ? _b : 0;
|
|
871
908
|
return message;
|
|
872
909
|
},
|
|
@@ -875,8 +912,7 @@ function createBaseResourceAccessListRequest() {
|
|
|
875
912
|
return { subject: "", action: "", resourceType: "" };
|
|
876
913
|
}
|
|
877
914
|
exports.ResourceAccessListRequest = {
|
|
878
|
-
encode
|
|
879
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
915
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
880
916
|
if (message.subject !== "") {
|
|
881
917
|
writer.uint32(10).string(message.subject);
|
|
882
918
|
}
|
|
@@ -888,59 +924,65 @@ exports.ResourceAccessListRequest = {
|
|
|
888
924
|
}
|
|
889
925
|
return writer;
|
|
890
926
|
},
|
|
891
|
-
decode
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
927
|
+
decode(input, length) {
|
|
928
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
929
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
930
|
+
const message = createBaseResourceAccessListRequest();
|
|
895
931
|
while (reader.pos < end) {
|
|
896
|
-
|
|
932
|
+
const tag = reader.uint32();
|
|
897
933
|
switch (tag >>> 3) {
|
|
898
934
|
case 1:
|
|
899
|
-
if (tag
|
|
935
|
+
if (tag !== 10) {
|
|
900
936
|
break;
|
|
901
937
|
}
|
|
902
938
|
message.subject = reader.string();
|
|
903
939
|
continue;
|
|
904
940
|
case 2:
|
|
905
|
-
if (tag
|
|
941
|
+
if (tag !== 18) {
|
|
906
942
|
break;
|
|
907
943
|
}
|
|
908
944
|
message.action = reader.string();
|
|
909
945
|
continue;
|
|
910
946
|
case 5:
|
|
911
|
-
if (tag
|
|
947
|
+
if (tag !== 42) {
|
|
912
948
|
break;
|
|
913
949
|
}
|
|
914
950
|
message.resourceType = reader.string();
|
|
915
951
|
continue;
|
|
916
952
|
}
|
|
917
|
-
if ((tag & 7)
|
|
953
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
918
954
|
break;
|
|
919
955
|
}
|
|
920
956
|
reader.skipType(tag & 7);
|
|
921
957
|
}
|
|
922
958
|
return message;
|
|
923
959
|
},
|
|
924
|
-
fromJSON
|
|
960
|
+
fromJSON(object) {
|
|
925
961
|
return {
|
|
926
|
-
subject: isSet(object.subject) ? String(object.subject) : "",
|
|
927
|
-
action: isSet(object.action) ? String(object.action) : "",
|
|
928
|
-
resourceType: isSet(object.resourceType) ? String(object.resourceType) : "",
|
|
962
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
963
|
+
action: isSet(object.action) ? globalThis.String(object.action) : "",
|
|
964
|
+
resourceType: isSet(object.resourceType) ? globalThis.String(object.resourceType) : "",
|
|
929
965
|
};
|
|
930
966
|
},
|
|
931
|
-
toJSON
|
|
932
|
-
|
|
933
|
-
message.subject !==
|
|
934
|
-
|
|
935
|
-
|
|
967
|
+
toJSON(message) {
|
|
968
|
+
const obj = {};
|
|
969
|
+
if (message.subject !== "") {
|
|
970
|
+
obj.subject = message.subject;
|
|
971
|
+
}
|
|
972
|
+
if (message.action !== "") {
|
|
973
|
+
obj.action = message.action;
|
|
974
|
+
}
|
|
975
|
+
if (message.resourceType !== "") {
|
|
976
|
+
obj.resourceType = message.resourceType;
|
|
977
|
+
}
|
|
936
978
|
return obj;
|
|
937
979
|
},
|
|
938
|
-
create
|
|
980
|
+
create(base) {
|
|
939
981
|
return exports.ResourceAccessListRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
940
982
|
},
|
|
941
|
-
fromPartial
|
|
983
|
+
fromPartial(object) {
|
|
942
984
|
var _a, _b, _c;
|
|
943
|
-
|
|
985
|
+
const message = createBaseResourceAccessListRequest();
|
|
944
986
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
|
|
945
987
|
message.action = (_b = object.action) !== null && _b !== void 0 ? _b : "";
|
|
946
988
|
message.resourceType = (_c = object.resourceType) !== null && _c !== void 0 ? _c : "";
|
|
@@ -951,90 +993,80 @@ function createBasePermissionCheck() {
|
|
|
951
993
|
return { subject: "", actions: [], resource: "" };
|
|
952
994
|
}
|
|
953
995
|
exports.PermissionCheck = {
|
|
954
|
-
encode
|
|
955
|
-
var e_7, _a;
|
|
956
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
996
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
957
997
|
if (message.subject !== "") {
|
|
958
998
|
writer.uint32(10).string(message.subject);
|
|
959
999
|
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
var v = _c.value;
|
|
963
|
-
writer.uint32(18).string(v);
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
967
|
-
finally {
|
|
968
|
-
try {
|
|
969
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
970
|
-
}
|
|
971
|
-
finally { if (e_7) throw e_7.error; }
|
|
1000
|
+
for (const v of message.actions) {
|
|
1001
|
+
writer.uint32(18).string(v);
|
|
972
1002
|
}
|
|
973
1003
|
if (message.resource !== "") {
|
|
974
1004
|
writer.uint32(26).string(message.resource);
|
|
975
1005
|
}
|
|
976
1006
|
return writer;
|
|
977
1007
|
},
|
|
978
|
-
decode
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
1008
|
+
decode(input, length) {
|
|
1009
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1010
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1011
|
+
const message = createBasePermissionCheck();
|
|
982
1012
|
while (reader.pos < end) {
|
|
983
|
-
|
|
1013
|
+
const tag = reader.uint32();
|
|
984
1014
|
switch (tag >>> 3) {
|
|
985
1015
|
case 1:
|
|
986
|
-
if (tag
|
|
1016
|
+
if (tag !== 10) {
|
|
987
1017
|
break;
|
|
988
1018
|
}
|
|
989
1019
|
message.subject = reader.string();
|
|
990
1020
|
continue;
|
|
991
1021
|
case 2:
|
|
992
|
-
if (tag
|
|
1022
|
+
if (tag !== 18) {
|
|
993
1023
|
break;
|
|
994
1024
|
}
|
|
995
1025
|
message.actions.push(reader.string());
|
|
996
1026
|
continue;
|
|
997
1027
|
case 3:
|
|
998
|
-
if (tag
|
|
1028
|
+
if (tag !== 26) {
|
|
999
1029
|
break;
|
|
1000
1030
|
}
|
|
1001
1031
|
message.resource = reader.string();
|
|
1002
1032
|
continue;
|
|
1003
1033
|
}
|
|
1004
|
-
if ((tag & 7)
|
|
1034
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1005
1035
|
break;
|
|
1006
1036
|
}
|
|
1007
1037
|
reader.skipType(tag & 7);
|
|
1008
1038
|
}
|
|
1009
1039
|
return message;
|
|
1010
1040
|
},
|
|
1011
|
-
fromJSON
|
|
1041
|
+
fromJSON(object) {
|
|
1012
1042
|
return {
|
|
1013
|
-
subject: isSet(object.subject) ? String(object.subject) : "",
|
|
1014
|
-
actions: Array.isArray(object === null || object === void 0 ? void 0 : object.actions) ? object.actions.map(
|
|
1015
|
-
resource: isSet(object.resource) ? String(object.resource) : "",
|
|
1043
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
1044
|
+
actions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.actions) ? object.actions.map((e) => globalThis.String(e)) : [],
|
|
1045
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
|
|
1016
1046
|
};
|
|
1017
1047
|
},
|
|
1018
|
-
toJSON
|
|
1019
|
-
var
|
|
1020
|
-
|
|
1021
|
-
if (message.
|
|
1022
|
-
obj.
|
|
1048
|
+
toJSON(message) {
|
|
1049
|
+
var _a;
|
|
1050
|
+
const obj = {};
|
|
1051
|
+
if (message.subject !== "") {
|
|
1052
|
+
obj.subject = message.subject;
|
|
1023
1053
|
}
|
|
1024
|
-
|
|
1025
|
-
obj.actions =
|
|
1054
|
+
if ((_a = message.actions) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1055
|
+
obj.actions = message.actions;
|
|
1056
|
+
}
|
|
1057
|
+
if (message.resource !== "") {
|
|
1058
|
+
obj.resource = message.resource;
|
|
1026
1059
|
}
|
|
1027
|
-
message.resource !== undefined && (obj.resource = message.resource);
|
|
1028
1060
|
return obj;
|
|
1029
1061
|
},
|
|
1030
|
-
create
|
|
1062
|
+
create(base) {
|
|
1031
1063
|
return exports.PermissionCheck.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1032
1064
|
},
|
|
1033
|
-
fromPartial
|
|
1065
|
+
fromPartial(object) {
|
|
1034
1066
|
var _a, _b, _c;
|
|
1035
|
-
|
|
1067
|
+
const message = createBasePermissionCheck();
|
|
1036
1068
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
|
|
1037
|
-
message.actions = ((_b = object.actions) === null || _b === void 0 ? void 0 : _b.map(
|
|
1069
|
+
message.actions = ((_b = object.actions) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
1038
1070
|
message.resource = (_c = object.resource) !== null && _c !== void 0 ? _c : "";
|
|
1039
1071
|
return message;
|
|
1040
1072
|
},
|
|
@@ -1043,8 +1075,7 @@ function createBasePermissionRequest() {
|
|
|
1043
1075
|
return { subject: "", action: "", resource: "" };
|
|
1044
1076
|
}
|
|
1045
1077
|
exports.PermissionRequest = {
|
|
1046
|
-
encode
|
|
1047
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
1078
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1048
1079
|
if (message.subject !== "") {
|
|
1049
1080
|
writer.uint32(10).string(message.subject);
|
|
1050
1081
|
}
|
|
@@ -1056,59 +1087,65 @@ exports.PermissionRequest = {
|
|
|
1056
1087
|
}
|
|
1057
1088
|
return writer;
|
|
1058
1089
|
},
|
|
1059
|
-
decode
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1090
|
+
decode(input, length) {
|
|
1091
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1092
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1093
|
+
const message = createBasePermissionRequest();
|
|
1063
1094
|
while (reader.pos < end) {
|
|
1064
|
-
|
|
1095
|
+
const tag = reader.uint32();
|
|
1065
1096
|
switch (tag >>> 3) {
|
|
1066
1097
|
case 1:
|
|
1067
|
-
if (tag
|
|
1098
|
+
if (tag !== 10) {
|
|
1068
1099
|
break;
|
|
1069
1100
|
}
|
|
1070
1101
|
message.subject = reader.string();
|
|
1071
1102
|
continue;
|
|
1072
1103
|
case 2:
|
|
1073
|
-
if (tag
|
|
1104
|
+
if (tag !== 18) {
|
|
1074
1105
|
break;
|
|
1075
1106
|
}
|
|
1076
1107
|
message.action = reader.string();
|
|
1077
1108
|
continue;
|
|
1078
1109
|
case 3:
|
|
1079
|
-
if (tag
|
|
1110
|
+
if (tag !== 26) {
|
|
1080
1111
|
break;
|
|
1081
1112
|
}
|
|
1082
1113
|
message.resource = reader.string();
|
|
1083
1114
|
continue;
|
|
1084
1115
|
}
|
|
1085
|
-
if ((tag & 7)
|
|
1116
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1086
1117
|
break;
|
|
1087
1118
|
}
|
|
1088
1119
|
reader.skipType(tag & 7);
|
|
1089
1120
|
}
|
|
1090
1121
|
return message;
|
|
1091
1122
|
},
|
|
1092
|
-
fromJSON
|
|
1123
|
+
fromJSON(object) {
|
|
1093
1124
|
return {
|
|
1094
|
-
subject: isSet(object.subject) ? String(object.subject) : "",
|
|
1095
|
-
action: isSet(object.action) ? String(object.action) : "",
|
|
1096
|
-
resource: isSet(object.resource) ? String(object.resource) : "",
|
|
1125
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
1126
|
+
action: isSet(object.action) ? globalThis.String(object.action) : "",
|
|
1127
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
|
|
1097
1128
|
};
|
|
1098
1129
|
},
|
|
1099
|
-
toJSON
|
|
1100
|
-
|
|
1101
|
-
message.subject !==
|
|
1102
|
-
|
|
1103
|
-
|
|
1130
|
+
toJSON(message) {
|
|
1131
|
+
const obj = {};
|
|
1132
|
+
if (message.subject !== "") {
|
|
1133
|
+
obj.subject = message.subject;
|
|
1134
|
+
}
|
|
1135
|
+
if (message.action !== "") {
|
|
1136
|
+
obj.action = message.action;
|
|
1137
|
+
}
|
|
1138
|
+
if (message.resource !== "") {
|
|
1139
|
+
obj.resource = message.resource;
|
|
1140
|
+
}
|
|
1104
1141
|
return obj;
|
|
1105
1142
|
},
|
|
1106
|
-
create
|
|
1143
|
+
create(base) {
|
|
1107
1144
|
return exports.PermissionRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1108
1145
|
},
|
|
1109
|
-
fromPartial
|
|
1146
|
+
fromPartial(object) {
|
|
1110
1147
|
var _a, _b, _c;
|
|
1111
|
-
|
|
1148
|
+
const message = createBasePermissionRequest();
|
|
1112
1149
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
|
|
1113
1150
|
message.action = (_b = object.action) !== null && _b !== void 0 ? _b : "";
|
|
1114
1151
|
message.resource = (_c = object.resource) !== null && _c !== void 0 ? _c : "";
|
|
@@ -1119,48 +1156,49 @@ function createBaseDecision() {
|
|
|
1119
1156
|
return { allow: false };
|
|
1120
1157
|
}
|
|
1121
1158
|
exports.Decision = {
|
|
1122
|
-
encode
|
|
1123
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
1159
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1124
1160
|
if (message.allow === true) {
|
|
1125
1161
|
writer.uint32(8).bool(message.allow);
|
|
1126
1162
|
}
|
|
1127
1163
|
return writer;
|
|
1128
1164
|
},
|
|
1129
|
-
decode
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1165
|
+
decode(input, length) {
|
|
1166
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
1167
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1168
|
+
const message = createBaseDecision();
|
|
1133
1169
|
while (reader.pos < end) {
|
|
1134
|
-
|
|
1170
|
+
const tag = reader.uint32();
|
|
1135
1171
|
switch (tag >>> 3) {
|
|
1136
1172
|
case 1:
|
|
1137
|
-
if (tag
|
|
1173
|
+
if (tag !== 8) {
|
|
1138
1174
|
break;
|
|
1139
1175
|
}
|
|
1140
1176
|
message.allow = reader.bool();
|
|
1141
1177
|
continue;
|
|
1142
1178
|
}
|
|
1143
|
-
if ((tag & 7)
|
|
1179
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1144
1180
|
break;
|
|
1145
1181
|
}
|
|
1146
1182
|
reader.skipType(tag & 7);
|
|
1147
1183
|
}
|
|
1148
1184
|
return message;
|
|
1149
1185
|
},
|
|
1150
|
-
fromJSON
|
|
1151
|
-
return { allow: isSet(object.allow) ? Boolean(object.allow) : false };
|
|
1186
|
+
fromJSON(object) {
|
|
1187
|
+
return { allow: isSet(object.allow) ? globalThis.Boolean(object.allow) : false };
|
|
1152
1188
|
},
|
|
1153
|
-
toJSON
|
|
1154
|
-
|
|
1155
|
-
|
|
1189
|
+
toJSON(message) {
|
|
1190
|
+
const obj = {};
|
|
1191
|
+
if (message.allow === true) {
|
|
1192
|
+
obj.allow = message.allow;
|
|
1193
|
+
}
|
|
1156
1194
|
return obj;
|
|
1157
1195
|
},
|
|
1158
|
-
create
|
|
1196
|
+
create(base) {
|
|
1159
1197
|
return exports.Decision.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1160
1198
|
},
|
|
1161
|
-
fromPartial
|
|
1199
|
+
fromPartial(object) {
|
|
1162
1200
|
var _a;
|
|
1163
|
-
|
|
1201
|
+
const message = createBaseDecision();
|
|
1164
1202
|
message.allow = (_a = object.allow) !== null && _a !== void 0 ? _a : false;
|
|
1165
1203
|
return message;
|
|
1166
1204
|
},
|
|
@@ -1201,6 +1239,14 @@ exports.AuthorizationDefinition = {
|
|
|
1201
1239
|
responseStream: false,
|
|
1202
1240
|
options: {},
|
|
1203
1241
|
},
|
|
1242
|
+
createRelations: {
|
|
1243
|
+
name: "CreateRelations",
|
|
1244
|
+
requestType: exports.CreateRelationsRequest,
|
|
1245
|
+
requestStream: false,
|
|
1246
|
+
responseType: empty_1.Empty,
|
|
1247
|
+
responseStream: false,
|
|
1248
|
+
options: {},
|
|
1249
|
+
},
|
|
1204
1250
|
deleteRelation: {
|
|
1205
1251
|
name: "DeleteRelation",
|
|
1206
1252
|
requestType: exports.Relation,
|