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