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