@conduitplatform/grpc-sdk 0.15.17 → 0.15.19
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/ConduitActiveSchema.js +25 -43
- package/dist/classes/ConduitActiveSchema.js.map +1 -1
- package/dist/classes/ConduitAuthorizedResource.js +5 -6
- package/dist/classes/ConduitAuthorizedResource.js.map +1 -1
- package/dist/classes/ConduitModule.js +44 -138
- 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/ConduitServiceModule.js +39 -98
- package/dist/classes/ConduitServiceModule.js.map +1 -1
- package/dist/classes/ConfigController.js +10 -17
- package/dist/classes/ConfigController.js.map +1 -1
- package/dist/classes/Error.js +17 -40
- package/dist/classes/Error.js.map +1 -1
- package/dist/classes/GrpcServer.js +88 -172
- package/dist/classes/GrpcServer.js.map +1 -1
- package/dist/classes/HealthCheck.js +26 -72
- package/dist/classes/HealthCheck.js.map +1 -1
- package/dist/classes/ManagedModule.js +93 -245
- package/dist/classes/ManagedModule.js.map +1 -1
- package/dist/classes/ModuleManager.js +51 -149
- package/dist/classes/ModuleManager.js.map +1 -1
- package/dist/helpers/GrpcHelper.js +11 -11
- package/dist/helpers/GrpcHelper.js.map +1 -1
- package/dist/helpers/TypeHelpers.js +57 -119
- package/dist/helpers/TypeHelpers.js.map +1 -1
- package/dist/helpers/wrapGrpcFunctions.js +14 -15
- package/dist/helpers/wrapGrpcFunctions.js.map +1 -1
- package/dist/index.js +299 -467
- package/dist/index.js.map +1 -1
- package/dist/interceptors/grpcSignedToken.js +7 -79
- package/dist/interceptors/grpcSignedToken.js.map +1 -1
- package/dist/interceptors/moduleName.js +7 -79
- package/dist/interceptors/moduleName.js.map +1 -1
- package/dist/metrics/MetricsServer.js +25 -70
- package/dist/metrics/MetricsServer.js.map +1 -1
- package/dist/metrics/clientMiddleware.js +76 -217
- package/dist/metrics/clientMiddleware.js.map +1 -1
- package/dist/metrics/config/defaults.js +1 -1
- package/dist/metrics/config/defaults.js.map +1 -1
- package/dist/metrics/index.js +53 -89
- package/dist/metrics/index.js.map +1 -1
- package/dist/modules/admin/index.js +16 -34
- package/dist/modules/admin/index.js.map +1 -1
- package/dist/modules/authentication/index.js +20 -39
- package/dist/modules/authentication/index.js.map +1 -1
- package/dist/modules/authorization/index.js +29 -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.js +70 -175
- package/dist/modules/config/index.js.map +1 -1
- package/dist/modules/core/index.js +8 -26
- package/dist/modules/core/index.js.map +1 -1
- package/dist/modules/database/index.js +80 -122
- 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/forms/index.js +8 -26
- package/dist/modules/forms/index.js.map +1 -1
- package/dist/modules/functions/index.js +8 -26
- package/dist/modules/functions/index.js.map +1 -1
- package/dist/modules/pushNotifications/index.js +38 -56
- package/dist/modules/pushNotifications/index.js.map +1 -1
- package/dist/modules/router/index.js +18 -36
- package/dist/modules/router/index.js.map +1 -1
- package/dist/modules/sms/index.js +17 -35
- package/dist/modules/sms/index.js.map +1 -1
- package/dist/modules/storage/index.js +17 -36
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/protoUtils/authentication.d.ts +1 -1
- package/dist/protoUtils/authentication.js +188 -169
- package/dist/protoUtils/authentication.js.map +1 -1
- package/dist/protoUtils/authorization.d.ts +1 -1
- package/dist/protoUtils/authorization.js +332 -391
- package/dist/protoUtils/authorization.js.map +1 -1
- package/dist/protoUtils/chat.d.ts +1 -1
- package/dist/protoUtils/chat.js +176 -212
- package/dist/protoUtils/chat.js.map +1 -1
- package/dist/protoUtils/core.d.ts +1 -1
- package/dist/protoUtils/core.js +643 -605
- package/dist/protoUtils/core.js.map +1 -1
- package/dist/protoUtils/database.d.ts +1 -1
- package/dist/protoUtils/database.js +563 -554
- package/dist/protoUtils/database.js.map +1 -1
- package/dist/protoUtils/email.d.ts +1 -1
- package/dist/protoUtils/email.js +180 -208
- package/dist/protoUtils/email.js.map +1 -1
- package/dist/protoUtils/forms.d.ts +1 -1
- package/dist/protoUtils/forms.js +37 -35
- package/dist/protoUtils/forms.js.map +1 -1
- package/dist/protoUtils/functions.d.ts +1 -1
- package/dist/protoUtils/functions.js +37 -35
- package/dist/protoUtils/functions.js.map +1 -1
- package/dist/protoUtils/grpc_health_check.d.ts +1 -1
- package/dist/protoUtils/grpc_health_check.js +36 -34
- package/dist/protoUtils/grpc_health_check.js.map +1 -1
- package/dist/protoUtils/push-notifications.d.ts +1 -1
- package/dist/protoUtils/push-notifications.js +252 -272
- package/dist/protoUtils/push-notifications.js.map +1 -1
- package/dist/protoUtils/router.d.ts +1 -1
- package/dist/protoUtils/router.js +381 -387
- package/dist/protoUtils/router.js.map +1 -1
- package/dist/protoUtils/sms.d.ts +1 -1
- package/dist/protoUtils/sms.js +155 -143
- package/dist/protoUtils/sms.js.map +1 -1
- package/dist/protoUtils/storage.d.ts +1 -1
- package/dist/protoUtils/storage.js +190 -164
- package/dist/protoUtils/storage.js.map +1 -1
- package/dist/routing/ConduitRouteReturn.js +9 -18
- package/dist/routing/ConduitRouteReturn.js.map +1 -1
- package/dist/routing/ProxyRouteBuilder.js +21 -24
- package/dist/routing/ProxyRouteBuilder.js.map +1 -1
- package/dist/routing/RouteBuilder.js +31 -34
- package/dist/routing/RouteBuilder.js.map +1 -1
- package/dist/routing/RoutingManager.js +65 -115
- package/dist/routing/RoutingManager.js.map +1 -1
- package/dist/routing/RoutingUtilities.js +3 -3
- package/dist/routing/RoutingUtilities.js.map +1 -1
- package/dist/routing/wrapRouterFunctions.js +25 -34
- package/dist/routing/wrapRouterFunctions.js.map +1 -1
- package/dist/types/index.js +6 -24
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/EventBus.js +16 -17
- package/dist/utilities/EventBus.js.map +1 -1
- package/dist/utilities/Logger.js +80 -180
- package/dist/utilities/Logger.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/linearBackoffTimeout.js +28 -92
- package/dist/utilities/linearBackoffTimeout.js.map +1 -1
- package/dist/utilities/merge.js +2 -2
- package/dist/utilities/merge.js.map +1 -1
- package/dist/utilities/sleep.js +1 -1
- package/dist/utilities/sleep.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,58 +1,46 @@
|
|
|
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
6
|
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 = exports.SetConfigResponse = exports.SetConfigRequest = exports.Empty = exports.protobufPackage = void 0;
|
|
18
7
|
/* eslint-disable */
|
|
19
|
-
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
20
9
|
exports.protobufPackage = "authorization";
|
|
21
10
|
function createBaseEmpty() {
|
|
22
11
|
return {};
|
|
23
12
|
}
|
|
24
13
|
exports.Empty = {
|
|
25
|
-
encode
|
|
26
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
14
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
27
15
|
return writer;
|
|
28
16
|
},
|
|
29
|
-
decode
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
decode(input, length) {
|
|
18
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
19
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
20
|
+
const message = createBaseEmpty();
|
|
33
21
|
while (reader.pos < end) {
|
|
34
|
-
|
|
22
|
+
const tag = reader.uint32();
|
|
35
23
|
switch (tag >>> 3) {
|
|
36
24
|
}
|
|
37
|
-
if ((tag & 7)
|
|
25
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
38
26
|
break;
|
|
39
27
|
}
|
|
40
28
|
reader.skipType(tag & 7);
|
|
41
29
|
}
|
|
42
30
|
return message;
|
|
43
31
|
},
|
|
44
|
-
fromJSON
|
|
32
|
+
fromJSON(_) {
|
|
45
33
|
return {};
|
|
46
34
|
},
|
|
47
|
-
toJSON
|
|
48
|
-
|
|
35
|
+
toJSON(_) {
|
|
36
|
+
const obj = {};
|
|
49
37
|
return obj;
|
|
50
38
|
},
|
|
51
|
-
create
|
|
39
|
+
create(base) {
|
|
52
40
|
return exports.Empty.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
53
41
|
},
|
|
54
|
-
fromPartial
|
|
55
|
-
|
|
42
|
+
fromPartial(_) {
|
|
43
|
+
const message = createBaseEmpty();
|
|
56
44
|
return message;
|
|
57
45
|
},
|
|
58
46
|
};
|
|
@@ -60,48 +48,49 @@ function createBaseSetConfigRequest() {
|
|
|
60
48
|
return { newConfig: "" };
|
|
61
49
|
}
|
|
62
50
|
exports.SetConfigRequest = {
|
|
63
|
-
encode
|
|
64
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
51
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
65
52
|
if (message.newConfig !== "") {
|
|
66
53
|
writer.uint32(10).string(message.newConfig);
|
|
67
54
|
}
|
|
68
55
|
return writer;
|
|
69
56
|
},
|
|
70
|
-
decode
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
57
|
+
decode(input, length) {
|
|
58
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
59
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
60
|
+
const message = createBaseSetConfigRequest();
|
|
74
61
|
while (reader.pos < end) {
|
|
75
|
-
|
|
62
|
+
const tag = reader.uint32();
|
|
76
63
|
switch (tag >>> 3) {
|
|
77
64
|
case 1:
|
|
78
|
-
if (tag
|
|
65
|
+
if (tag !== 10) {
|
|
79
66
|
break;
|
|
80
67
|
}
|
|
81
68
|
message.newConfig = reader.string();
|
|
82
69
|
continue;
|
|
83
70
|
}
|
|
84
|
-
if ((tag & 7)
|
|
71
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
85
72
|
break;
|
|
86
73
|
}
|
|
87
74
|
reader.skipType(tag & 7);
|
|
88
75
|
}
|
|
89
76
|
return message;
|
|
90
77
|
},
|
|
91
|
-
fromJSON
|
|
92
|
-
return { newConfig: isSet(object.newConfig) ? String(object.newConfig) : "" };
|
|
78
|
+
fromJSON(object) {
|
|
79
|
+
return { newConfig: isSet(object.newConfig) ? globalThis.String(object.newConfig) : "" };
|
|
93
80
|
},
|
|
94
|
-
toJSON
|
|
95
|
-
|
|
96
|
-
message.newConfig !==
|
|
81
|
+
toJSON(message) {
|
|
82
|
+
const obj = {};
|
|
83
|
+
if (message.newConfig !== "") {
|
|
84
|
+
obj.newConfig = message.newConfig;
|
|
85
|
+
}
|
|
97
86
|
return obj;
|
|
98
87
|
},
|
|
99
|
-
create
|
|
88
|
+
create(base) {
|
|
100
89
|
return exports.SetConfigRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
101
90
|
},
|
|
102
|
-
fromPartial
|
|
91
|
+
fromPartial(object) {
|
|
103
92
|
var _a;
|
|
104
|
-
|
|
93
|
+
const message = createBaseSetConfigRequest();
|
|
105
94
|
message.newConfig = (_a = object.newConfig) !== null && _a !== void 0 ? _a : "";
|
|
106
95
|
return message;
|
|
107
96
|
},
|
|
@@ -110,48 +99,49 @@ function createBaseSetConfigResponse() {
|
|
|
110
99
|
return { updatedConfig: "" };
|
|
111
100
|
}
|
|
112
101
|
exports.SetConfigResponse = {
|
|
113
|
-
encode
|
|
114
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
102
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
115
103
|
if (message.updatedConfig !== "") {
|
|
116
104
|
writer.uint32(10).string(message.updatedConfig);
|
|
117
105
|
}
|
|
118
106
|
return writer;
|
|
119
107
|
},
|
|
120
|
-
decode
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
108
|
+
decode(input, length) {
|
|
109
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
110
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
111
|
+
const message = createBaseSetConfigResponse();
|
|
124
112
|
while (reader.pos < end) {
|
|
125
|
-
|
|
113
|
+
const tag = reader.uint32();
|
|
126
114
|
switch (tag >>> 3) {
|
|
127
115
|
case 1:
|
|
128
|
-
if (tag
|
|
116
|
+
if (tag !== 10) {
|
|
129
117
|
break;
|
|
130
118
|
}
|
|
131
119
|
message.updatedConfig = reader.string();
|
|
132
120
|
continue;
|
|
133
121
|
}
|
|
134
|
-
if ((tag & 7)
|
|
122
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
135
123
|
break;
|
|
136
124
|
}
|
|
137
125
|
reader.skipType(tag & 7);
|
|
138
126
|
}
|
|
139
127
|
return message;
|
|
140
128
|
},
|
|
141
|
-
fromJSON
|
|
142
|
-
return { updatedConfig: isSet(object.updatedConfig) ? String(object.updatedConfig) : "" };
|
|
129
|
+
fromJSON(object) {
|
|
130
|
+
return { updatedConfig: isSet(object.updatedConfig) ? globalThis.String(object.updatedConfig) : "" };
|
|
143
131
|
},
|
|
144
|
-
toJSON
|
|
145
|
-
|
|
146
|
-
message.updatedConfig !==
|
|
132
|
+
toJSON(message) {
|
|
133
|
+
const obj = {};
|
|
134
|
+
if (message.updatedConfig !== "") {
|
|
135
|
+
obj.updatedConfig = message.updatedConfig;
|
|
136
|
+
}
|
|
147
137
|
return obj;
|
|
148
138
|
},
|
|
149
|
-
create
|
|
139
|
+
create(base) {
|
|
150
140
|
return exports.SetConfigResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
151
141
|
},
|
|
152
|
-
fromPartial
|
|
142
|
+
fromPartial(object) {
|
|
153
143
|
var _a;
|
|
154
|
-
|
|
144
|
+
const message = createBaseSetConfigResponse();
|
|
155
145
|
message.updatedConfig = (_a = object.updatedConfig) !== null && _a !== void 0 ? _a : "";
|
|
156
146
|
return message;
|
|
157
147
|
},
|
|
@@ -160,110 +150,85 @@ function createBaseResource() {
|
|
|
160
150
|
return { name: "", relations: [], permissions: [] };
|
|
161
151
|
}
|
|
162
152
|
exports.Resource = {
|
|
163
|
-
encode
|
|
164
|
-
var e_1, _a, e_2, _b;
|
|
165
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
153
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
166
154
|
if (message.name !== "") {
|
|
167
155
|
writer.uint32(10).string(message.name);
|
|
168
156
|
}
|
|
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
|
-
}
|
|
157
|
+
for (const v of message.relations) {
|
|
158
|
+
exports.Resource_Relation.encode(v, writer.uint32(18).fork()).ldelim();
|
|
187
159
|
}
|
|
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; }
|
|
160
|
+
for (const v of message.permissions) {
|
|
161
|
+
exports.Resource_Permission.encode(v, writer.uint32(26).fork()).ldelim();
|
|
194
162
|
}
|
|
195
163
|
return writer;
|
|
196
164
|
},
|
|
197
|
-
decode
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
165
|
+
decode(input, length) {
|
|
166
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
167
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
168
|
+
const message = createBaseResource();
|
|
201
169
|
while (reader.pos < end) {
|
|
202
|
-
|
|
170
|
+
const tag = reader.uint32();
|
|
203
171
|
switch (tag >>> 3) {
|
|
204
172
|
case 1:
|
|
205
|
-
if (tag
|
|
173
|
+
if (tag !== 10) {
|
|
206
174
|
break;
|
|
207
175
|
}
|
|
208
176
|
message.name = reader.string();
|
|
209
177
|
continue;
|
|
210
178
|
case 2:
|
|
211
|
-
if (tag
|
|
179
|
+
if (tag !== 18) {
|
|
212
180
|
break;
|
|
213
181
|
}
|
|
214
182
|
message.relations.push(exports.Resource_Relation.decode(reader, reader.uint32()));
|
|
215
183
|
continue;
|
|
216
184
|
case 3:
|
|
217
|
-
if (tag
|
|
185
|
+
if (tag !== 26) {
|
|
218
186
|
break;
|
|
219
187
|
}
|
|
220
188
|
message.permissions.push(exports.Resource_Permission.decode(reader, reader.uint32()));
|
|
221
189
|
continue;
|
|
222
190
|
}
|
|
223
|
-
if ((tag & 7)
|
|
191
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
224
192
|
break;
|
|
225
193
|
}
|
|
226
194
|
reader.skipType(tag & 7);
|
|
227
195
|
}
|
|
228
196
|
return message;
|
|
229
197
|
},
|
|
230
|
-
fromJSON
|
|
198
|
+
fromJSON(object) {
|
|
231
199
|
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(
|
|
200
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
201
|
+
relations: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.relations)
|
|
202
|
+
? object.relations.map((e) => exports.Resource_Relation.fromJSON(e))
|
|
235
203
|
: [],
|
|
236
|
-
permissions: Array.isArray(object === null || object === void 0 ? void 0 : object.permissions)
|
|
237
|
-
? object.permissions.map(
|
|
204
|
+
permissions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.permissions)
|
|
205
|
+
? object.permissions.map((e) => exports.Resource_Permission.fromJSON(e))
|
|
238
206
|
: [],
|
|
239
207
|
};
|
|
240
208
|
},
|
|
241
|
-
toJSON
|
|
242
|
-
var
|
|
243
|
-
|
|
244
|
-
if (message.
|
|
245
|
-
obj.
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
obj.relations = [];
|
|
209
|
+
toJSON(message) {
|
|
210
|
+
var _a, _b;
|
|
211
|
+
const obj = {};
|
|
212
|
+
if (message.name !== "") {
|
|
213
|
+
obj.name = message.name;
|
|
249
214
|
}
|
|
250
|
-
if (message.
|
|
251
|
-
obj.
|
|
215
|
+
if ((_a = message.relations) === null || _a === void 0 ? void 0 : _a.length) {
|
|
216
|
+
obj.relations = message.relations.map((e) => exports.Resource_Relation.toJSON(e));
|
|
252
217
|
}
|
|
253
|
-
|
|
254
|
-
obj.permissions =
|
|
218
|
+
if ((_b = message.permissions) === null || _b === void 0 ? void 0 : _b.length) {
|
|
219
|
+
obj.permissions = message.permissions.map((e) => exports.Resource_Permission.toJSON(e));
|
|
255
220
|
}
|
|
256
221
|
return obj;
|
|
257
222
|
},
|
|
258
|
-
create
|
|
223
|
+
create(base) {
|
|
259
224
|
return exports.Resource.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
260
225
|
},
|
|
261
|
-
fromPartial
|
|
226
|
+
fromPartial(object) {
|
|
262
227
|
var _a, _b, _c;
|
|
263
|
-
|
|
228
|
+
const message = createBaseResource();
|
|
264
229
|
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(
|
|
230
|
+
message.relations = ((_b = object.relations) === null || _b === void 0 ? void 0 : _b.map((e) => exports.Resource_Relation.fromPartial(e))) || [];
|
|
231
|
+
message.permissions = ((_c = object.permissions) === null || _c === void 0 ? void 0 : _c.map((e) => exports.Resource_Permission.fromPartial(e))) || [];
|
|
267
232
|
return message;
|
|
268
233
|
},
|
|
269
234
|
};
|
|
@@ -271,79 +236,69 @@ function createBaseResource_Relation() {
|
|
|
271
236
|
return { name: "", resourceType: [] };
|
|
272
237
|
}
|
|
273
238
|
exports.Resource_Relation = {
|
|
274
|
-
encode
|
|
275
|
-
var e_3, _a;
|
|
276
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
239
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
277
240
|
if (message.name !== "") {
|
|
278
241
|
writer.uint32(10).string(message.name);
|
|
279
242
|
}
|
|
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; }
|
|
243
|
+
for (const v of message.resourceType) {
|
|
244
|
+
writer.uint32(18).string(v);
|
|
292
245
|
}
|
|
293
246
|
return writer;
|
|
294
247
|
},
|
|
295
|
-
decode
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
248
|
+
decode(input, length) {
|
|
249
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
250
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
251
|
+
const message = createBaseResource_Relation();
|
|
299
252
|
while (reader.pos < end) {
|
|
300
|
-
|
|
253
|
+
const tag = reader.uint32();
|
|
301
254
|
switch (tag >>> 3) {
|
|
302
255
|
case 1:
|
|
303
|
-
if (tag
|
|
256
|
+
if (tag !== 10) {
|
|
304
257
|
break;
|
|
305
258
|
}
|
|
306
259
|
message.name = reader.string();
|
|
307
260
|
continue;
|
|
308
261
|
case 2:
|
|
309
|
-
if (tag
|
|
262
|
+
if (tag !== 18) {
|
|
310
263
|
break;
|
|
311
264
|
}
|
|
312
265
|
message.resourceType.push(reader.string());
|
|
313
266
|
continue;
|
|
314
267
|
}
|
|
315
|
-
if ((tag & 7)
|
|
268
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
316
269
|
break;
|
|
317
270
|
}
|
|
318
271
|
reader.skipType(tag & 7);
|
|
319
272
|
}
|
|
320
273
|
return message;
|
|
321
274
|
},
|
|
322
|
-
fromJSON
|
|
275
|
+
fromJSON(object) {
|
|
323
276
|
return {
|
|
324
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
325
|
-
resourceType: Array.isArray(object === null || object === void 0 ? void 0 : object.resourceType)
|
|
277
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
278
|
+
resourceType: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.resourceType)
|
|
279
|
+
? object.resourceType.map((e) => globalThis.String(e))
|
|
280
|
+
: [],
|
|
326
281
|
};
|
|
327
282
|
},
|
|
328
|
-
toJSON
|
|
329
|
-
var
|
|
330
|
-
|
|
331
|
-
if (message.
|
|
332
|
-
obj.
|
|
283
|
+
toJSON(message) {
|
|
284
|
+
var _a;
|
|
285
|
+
const obj = {};
|
|
286
|
+
if (message.name !== "") {
|
|
287
|
+
obj.name = message.name;
|
|
333
288
|
}
|
|
334
|
-
|
|
335
|
-
obj.resourceType =
|
|
289
|
+
if ((_a = message.resourceType) === null || _a === void 0 ? void 0 : _a.length) {
|
|
290
|
+
obj.resourceType = message.resourceType;
|
|
336
291
|
}
|
|
337
292
|
return obj;
|
|
338
293
|
},
|
|
339
|
-
create
|
|
294
|
+
create(base) {
|
|
340
295
|
return exports.Resource_Relation.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
341
296
|
},
|
|
342
|
-
fromPartial
|
|
297
|
+
fromPartial(object) {
|
|
343
298
|
var _a, _b;
|
|
344
|
-
|
|
299
|
+
const message = createBaseResource_Relation();
|
|
345
300
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
346
|
-
message.resourceType = ((_b = object.resourceType) === null || _b === void 0 ? void 0 : _b.map(
|
|
301
|
+
message.resourceType = ((_b = object.resourceType) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
347
302
|
return message;
|
|
348
303
|
},
|
|
349
304
|
};
|
|
@@ -351,79 +306,67 @@ function createBaseResource_Permission() {
|
|
|
351
306
|
return { name: "", roles: [] };
|
|
352
307
|
}
|
|
353
308
|
exports.Resource_Permission = {
|
|
354
|
-
encode
|
|
355
|
-
var e_4, _a;
|
|
356
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
309
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
357
310
|
if (message.name !== "") {
|
|
358
311
|
writer.uint32(10).string(message.name);
|
|
359
312
|
}
|
|
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; }
|
|
313
|
+
for (const v of message.roles) {
|
|
314
|
+
writer.uint32(18).string(v);
|
|
372
315
|
}
|
|
373
316
|
return writer;
|
|
374
317
|
},
|
|
375
|
-
decode
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
318
|
+
decode(input, length) {
|
|
319
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
320
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
321
|
+
const message = createBaseResource_Permission();
|
|
379
322
|
while (reader.pos < end) {
|
|
380
|
-
|
|
323
|
+
const tag = reader.uint32();
|
|
381
324
|
switch (tag >>> 3) {
|
|
382
325
|
case 1:
|
|
383
|
-
if (tag
|
|
326
|
+
if (tag !== 10) {
|
|
384
327
|
break;
|
|
385
328
|
}
|
|
386
329
|
message.name = reader.string();
|
|
387
330
|
continue;
|
|
388
331
|
case 2:
|
|
389
|
-
if (tag
|
|
332
|
+
if (tag !== 18) {
|
|
390
333
|
break;
|
|
391
334
|
}
|
|
392
335
|
message.roles.push(reader.string());
|
|
393
336
|
continue;
|
|
394
337
|
}
|
|
395
|
-
if ((tag & 7)
|
|
338
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
396
339
|
break;
|
|
397
340
|
}
|
|
398
341
|
reader.skipType(tag & 7);
|
|
399
342
|
}
|
|
400
343
|
return message;
|
|
401
344
|
},
|
|
402
|
-
fromJSON
|
|
345
|
+
fromJSON(object) {
|
|
403
346
|
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(
|
|
347
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
348
|
+
roles: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.roles) ? object.roles.map((e) => globalThis.String(e)) : [],
|
|
406
349
|
};
|
|
407
350
|
},
|
|
408
|
-
toJSON
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
if (message.
|
|
412
|
-
obj.
|
|
351
|
+
toJSON(message) {
|
|
352
|
+
var _a;
|
|
353
|
+
const obj = {};
|
|
354
|
+
if (message.name !== "") {
|
|
355
|
+
obj.name = message.name;
|
|
413
356
|
}
|
|
414
|
-
|
|
415
|
-
obj.roles =
|
|
357
|
+
if ((_a = message.roles) === null || _a === void 0 ? void 0 : _a.length) {
|
|
358
|
+
obj.roles = message.roles;
|
|
416
359
|
}
|
|
417
360
|
return obj;
|
|
418
361
|
},
|
|
419
|
-
create
|
|
362
|
+
create(base) {
|
|
420
363
|
return exports.Resource_Permission.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
421
364
|
},
|
|
422
|
-
fromPartial
|
|
365
|
+
fromPartial(object) {
|
|
423
366
|
var _a, _b;
|
|
424
|
-
|
|
367
|
+
const message = createBaseResource_Permission();
|
|
425
368
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
426
|
-
message.roles = ((_b = object.roles) === null || _b === void 0 ? void 0 : _b.map(
|
|
369
|
+
message.roles = ((_b = object.roles) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
427
370
|
return message;
|
|
428
371
|
},
|
|
429
372
|
};
|
|
@@ -431,8 +374,7 @@ function createBaseRelation() {
|
|
|
431
374
|
return { subject: "", relation: "", resource: "" };
|
|
432
375
|
}
|
|
433
376
|
exports.Relation = {
|
|
434
|
-
encode
|
|
435
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
377
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
436
378
|
if (message.subject !== "") {
|
|
437
379
|
writer.uint32(10).string(message.subject);
|
|
438
380
|
}
|
|
@@ -444,59 +386,65 @@ exports.Relation = {
|
|
|
444
386
|
}
|
|
445
387
|
return writer;
|
|
446
388
|
},
|
|
447
|
-
decode
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
389
|
+
decode(input, length) {
|
|
390
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
391
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
392
|
+
const message = createBaseRelation();
|
|
451
393
|
while (reader.pos < end) {
|
|
452
|
-
|
|
394
|
+
const tag = reader.uint32();
|
|
453
395
|
switch (tag >>> 3) {
|
|
454
396
|
case 1:
|
|
455
|
-
if (tag
|
|
397
|
+
if (tag !== 10) {
|
|
456
398
|
break;
|
|
457
399
|
}
|
|
458
400
|
message.subject = reader.string();
|
|
459
401
|
continue;
|
|
460
402
|
case 2:
|
|
461
|
-
if (tag
|
|
403
|
+
if (tag !== 18) {
|
|
462
404
|
break;
|
|
463
405
|
}
|
|
464
406
|
message.relation = reader.string();
|
|
465
407
|
continue;
|
|
466
408
|
case 3:
|
|
467
|
-
if (tag
|
|
409
|
+
if (tag !== 26) {
|
|
468
410
|
break;
|
|
469
411
|
}
|
|
470
412
|
message.resource = reader.string();
|
|
471
413
|
continue;
|
|
472
414
|
}
|
|
473
|
-
if ((tag & 7)
|
|
415
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
474
416
|
break;
|
|
475
417
|
}
|
|
476
418
|
reader.skipType(tag & 7);
|
|
477
419
|
}
|
|
478
420
|
return message;
|
|
479
421
|
},
|
|
480
|
-
fromJSON
|
|
422
|
+
fromJSON(object) {
|
|
481
423
|
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) : "",
|
|
424
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
425
|
+
relation: isSet(object.relation) ? globalThis.String(object.relation) : "",
|
|
426
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
|
|
485
427
|
};
|
|
486
428
|
},
|
|
487
|
-
toJSON
|
|
488
|
-
|
|
489
|
-
message.subject !==
|
|
490
|
-
|
|
491
|
-
|
|
429
|
+
toJSON(message) {
|
|
430
|
+
const obj = {};
|
|
431
|
+
if (message.subject !== "") {
|
|
432
|
+
obj.subject = message.subject;
|
|
433
|
+
}
|
|
434
|
+
if (message.relation !== "") {
|
|
435
|
+
obj.relation = message.relation;
|
|
436
|
+
}
|
|
437
|
+
if (message.resource !== "") {
|
|
438
|
+
obj.resource = message.resource;
|
|
439
|
+
}
|
|
492
440
|
return obj;
|
|
493
441
|
},
|
|
494
|
-
create
|
|
442
|
+
create(base) {
|
|
495
443
|
return exports.Relation.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
496
444
|
},
|
|
497
|
-
fromPartial
|
|
445
|
+
fromPartial(object) {
|
|
498
446
|
var _a, _b, _c;
|
|
499
|
-
|
|
447
|
+
const message = createBaseRelation();
|
|
500
448
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
|
|
501
449
|
message.relation = (_b = object.relation) !== null && _b !== void 0 ? _b : "";
|
|
502
450
|
message.resource = (_c = object.resource) !== null && _c !== void 0 ? _c : "";
|
|
@@ -507,8 +455,7 @@ function createBaseDeleteAllRelationsRequest() {
|
|
|
507
455
|
return { subject: undefined, resource: undefined };
|
|
508
456
|
}
|
|
509
457
|
exports.DeleteAllRelationsRequest = {
|
|
510
|
-
encode
|
|
511
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
458
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
512
459
|
if (message.subject !== undefined) {
|
|
513
460
|
writer.uint32(10).string(message.subject);
|
|
514
461
|
}
|
|
@@ -517,51 +464,55 @@ exports.DeleteAllRelationsRequest = {
|
|
|
517
464
|
}
|
|
518
465
|
return writer;
|
|
519
466
|
},
|
|
520
|
-
decode
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
467
|
+
decode(input, length) {
|
|
468
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
469
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
470
|
+
const message = createBaseDeleteAllRelationsRequest();
|
|
524
471
|
while (reader.pos < end) {
|
|
525
|
-
|
|
472
|
+
const tag = reader.uint32();
|
|
526
473
|
switch (tag >>> 3) {
|
|
527
474
|
case 1:
|
|
528
|
-
if (tag
|
|
475
|
+
if (tag !== 10) {
|
|
529
476
|
break;
|
|
530
477
|
}
|
|
531
478
|
message.subject = reader.string();
|
|
532
479
|
continue;
|
|
533
480
|
case 2:
|
|
534
|
-
if (tag
|
|
481
|
+
if (tag !== 18) {
|
|
535
482
|
break;
|
|
536
483
|
}
|
|
537
484
|
message.resource = reader.string();
|
|
538
485
|
continue;
|
|
539
486
|
}
|
|
540
|
-
if ((tag & 7)
|
|
487
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
541
488
|
break;
|
|
542
489
|
}
|
|
543
490
|
reader.skipType(tag & 7);
|
|
544
491
|
}
|
|
545
492
|
return message;
|
|
546
493
|
},
|
|
547
|
-
fromJSON
|
|
494
|
+
fromJSON(object) {
|
|
548
495
|
return {
|
|
549
|
-
subject: isSet(object.subject) ? String(object.subject) : undefined,
|
|
550
|
-
resource: isSet(object.resource) ? String(object.resource) : undefined,
|
|
496
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : undefined,
|
|
497
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : undefined,
|
|
551
498
|
};
|
|
552
499
|
},
|
|
553
|
-
toJSON
|
|
554
|
-
|
|
555
|
-
message.subject !== undefined
|
|
556
|
-
|
|
500
|
+
toJSON(message) {
|
|
501
|
+
const obj = {};
|
|
502
|
+
if (message.subject !== undefined) {
|
|
503
|
+
obj.subject = message.subject;
|
|
504
|
+
}
|
|
505
|
+
if (message.resource !== undefined) {
|
|
506
|
+
obj.resource = message.resource;
|
|
507
|
+
}
|
|
557
508
|
return obj;
|
|
558
509
|
},
|
|
559
|
-
create
|
|
510
|
+
create(base) {
|
|
560
511
|
return exports.DeleteAllRelationsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
561
512
|
},
|
|
562
|
-
fromPartial
|
|
513
|
+
fromPartial(object) {
|
|
563
514
|
var _a, _b;
|
|
564
|
-
|
|
515
|
+
const message = createBaseDeleteAllRelationsRequest();
|
|
565
516
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : undefined;
|
|
566
517
|
message.resource = (_b = object.resource) !== null && _b !== void 0 ? _b : undefined;
|
|
567
518
|
return message;
|
|
@@ -571,48 +522,49 @@ function createBaseDeleteResourceRequest() {
|
|
|
571
522
|
return { name: "" };
|
|
572
523
|
}
|
|
573
524
|
exports.DeleteResourceRequest = {
|
|
574
|
-
encode
|
|
575
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
525
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
576
526
|
if (message.name !== "") {
|
|
577
527
|
writer.uint32(10).string(message.name);
|
|
578
528
|
}
|
|
579
529
|
return writer;
|
|
580
530
|
},
|
|
581
|
-
decode
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
531
|
+
decode(input, length) {
|
|
532
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
533
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
534
|
+
const message = createBaseDeleteResourceRequest();
|
|
585
535
|
while (reader.pos < end) {
|
|
586
|
-
|
|
536
|
+
const tag = reader.uint32();
|
|
587
537
|
switch (tag >>> 3) {
|
|
588
538
|
case 1:
|
|
589
|
-
if (tag
|
|
539
|
+
if (tag !== 10) {
|
|
590
540
|
break;
|
|
591
541
|
}
|
|
592
542
|
message.name = reader.string();
|
|
593
543
|
continue;
|
|
594
544
|
}
|
|
595
|
-
if ((tag & 7)
|
|
545
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
596
546
|
break;
|
|
597
547
|
}
|
|
598
548
|
reader.skipType(tag & 7);
|
|
599
549
|
}
|
|
600
550
|
return message;
|
|
601
551
|
},
|
|
602
|
-
fromJSON
|
|
603
|
-
return { name: isSet(object.name) ? String(object.name) : "" };
|
|
552
|
+
fromJSON(object) {
|
|
553
|
+
return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
|
|
604
554
|
},
|
|
605
|
-
toJSON
|
|
606
|
-
|
|
607
|
-
message.name !==
|
|
555
|
+
toJSON(message) {
|
|
556
|
+
const obj = {};
|
|
557
|
+
if (message.name !== "") {
|
|
558
|
+
obj.name = message.name;
|
|
559
|
+
}
|
|
608
560
|
return obj;
|
|
609
561
|
},
|
|
610
|
-
create
|
|
562
|
+
create(base) {
|
|
611
563
|
return exports.DeleteResourceRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
612
564
|
},
|
|
613
|
-
fromPartial
|
|
565
|
+
fromPartial(object) {
|
|
614
566
|
var _a;
|
|
615
|
-
|
|
567
|
+
const message = createBaseDeleteResourceRequest();
|
|
616
568
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
617
569
|
return message;
|
|
618
570
|
},
|
|
@@ -621,8 +573,7 @@ function createBaseFindRelationRequest() {
|
|
|
621
573
|
return { subject: undefined, relation: undefined, resource: undefined };
|
|
622
574
|
}
|
|
623
575
|
exports.FindRelationRequest = {
|
|
624
|
-
encode
|
|
625
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
576
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
626
577
|
if (message.subject !== undefined) {
|
|
627
578
|
writer.uint32(10).string(message.subject);
|
|
628
579
|
}
|
|
@@ -634,59 +585,65 @@ exports.FindRelationRequest = {
|
|
|
634
585
|
}
|
|
635
586
|
return writer;
|
|
636
587
|
},
|
|
637
|
-
decode
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
588
|
+
decode(input, length) {
|
|
589
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
590
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
591
|
+
const message = createBaseFindRelationRequest();
|
|
641
592
|
while (reader.pos < end) {
|
|
642
|
-
|
|
593
|
+
const tag = reader.uint32();
|
|
643
594
|
switch (tag >>> 3) {
|
|
644
595
|
case 1:
|
|
645
|
-
if (tag
|
|
596
|
+
if (tag !== 10) {
|
|
646
597
|
break;
|
|
647
598
|
}
|
|
648
599
|
message.subject = reader.string();
|
|
649
600
|
continue;
|
|
650
601
|
case 2:
|
|
651
|
-
if (tag
|
|
602
|
+
if (tag !== 18) {
|
|
652
603
|
break;
|
|
653
604
|
}
|
|
654
605
|
message.relation = reader.string();
|
|
655
606
|
continue;
|
|
656
607
|
case 3:
|
|
657
|
-
if (tag
|
|
608
|
+
if (tag !== 26) {
|
|
658
609
|
break;
|
|
659
610
|
}
|
|
660
611
|
message.resource = reader.string();
|
|
661
612
|
continue;
|
|
662
613
|
}
|
|
663
|
-
if ((tag & 7)
|
|
614
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
664
615
|
break;
|
|
665
616
|
}
|
|
666
617
|
reader.skipType(tag & 7);
|
|
667
618
|
}
|
|
668
619
|
return message;
|
|
669
620
|
},
|
|
670
|
-
fromJSON
|
|
621
|
+
fromJSON(object) {
|
|
671
622
|
return {
|
|
672
|
-
subject: isSet(object.subject) ? String(object.subject) : undefined,
|
|
673
|
-
relation: isSet(object.relation) ? String(object.relation) : undefined,
|
|
674
|
-
resource: isSet(object.resource) ? String(object.resource) : undefined,
|
|
623
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : undefined,
|
|
624
|
+
relation: isSet(object.relation) ? globalThis.String(object.relation) : undefined,
|
|
625
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : undefined,
|
|
675
626
|
};
|
|
676
627
|
},
|
|
677
|
-
toJSON
|
|
678
|
-
|
|
679
|
-
message.subject !== undefined
|
|
680
|
-
|
|
681
|
-
|
|
628
|
+
toJSON(message) {
|
|
629
|
+
const obj = {};
|
|
630
|
+
if (message.subject !== undefined) {
|
|
631
|
+
obj.subject = message.subject;
|
|
632
|
+
}
|
|
633
|
+
if (message.relation !== undefined) {
|
|
634
|
+
obj.relation = message.relation;
|
|
635
|
+
}
|
|
636
|
+
if (message.resource !== undefined) {
|
|
637
|
+
obj.resource = message.resource;
|
|
638
|
+
}
|
|
682
639
|
return obj;
|
|
683
640
|
},
|
|
684
|
-
create
|
|
641
|
+
create(base) {
|
|
685
642
|
return exports.FindRelationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
686
643
|
},
|
|
687
|
-
fromPartial
|
|
644
|
+
fromPartial(object) {
|
|
688
645
|
var _a, _b, _c;
|
|
689
|
-
|
|
646
|
+
const message = createBaseFindRelationRequest();
|
|
690
647
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : undefined;
|
|
691
648
|
message.relation = (_b = object.relation) !== null && _b !== void 0 ? _b : undefined;
|
|
692
649
|
message.resource = (_c = object.resource) !== null && _c !== void 0 ? _c : undefined;
|
|
@@ -697,67 +654,55 @@ function createBaseFindRelationResponse() {
|
|
|
697
654
|
return { relations: [] };
|
|
698
655
|
}
|
|
699
656
|
exports.FindRelationResponse = {
|
|
700
|
-
encode
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
try {
|
|
704
|
-
for (var _b = __values(message.relations), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
705
|
-
var v = _c.value;
|
|
706
|
-
exports.Relation.encode(v, writer.uint32(10).fork()).ldelim();
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
710
|
-
finally {
|
|
711
|
-
try {
|
|
712
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
713
|
-
}
|
|
714
|
-
finally { if (e_5) throw e_5.error; }
|
|
657
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
658
|
+
for (const v of message.relations) {
|
|
659
|
+
exports.Relation.encode(v, writer.uint32(10).fork()).ldelim();
|
|
715
660
|
}
|
|
716
661
|
return writer;
|
|
717
662
|
},
|
|
718
|
-
decode
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
663
|
+
decode(input, length) {
|
|
664
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
665
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
666
|
+
const message = createBaseFindRelationResponse();
|
|
722
667
|
while (reader.pos < end) {
|
|
723
|
-
|
|
668
|
+
const tag = reader.uint32();
|
|
724
669
|
switch (tag >>> 3) {
|
|
725
670
|
case 1:
|
|
726
|
-
if (tag
|
|
671
|
+
if (tag !== 10) {
|
|
727
672
|
break;
|
|
728
673
|
}
|
|
729
674
|
message.relations.push(exports.Relation.decode(reader, reader.uint32()));
|
|
730
675
|
continue;
|
|
731
676
|
}
|
|
732
|
-
if ((tag & 7)
|
|
677
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
733
678
|
break;
|
|
734
679
|
}
|
|
735
680
|
reader.skipType(tag & 7);
|
|
736
681
|
}
|
|
737
682
|
return message;
|
|
738
683
|
},
|
|
739
|
-
fromJSON
|
|
684
|
+
fromJSON(object) {
|
|
740
685
|
return {
|
|
741
|
-
relations: Array.isArray(object === null || object === void 0 ? void 0 : object.relations)
|
|
686
|
+
relations: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.relations)
|
|
687
|
+
? object.relations.map((e) => exports.Relation.fromJSON(e))
|
|
688
|
+
: [],
|
|
742
689
|
};
|
|
743
690
|
},
|
|
744
|
-
toJSON
|
|
745
|
-
var
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
else {
|
|
750
|
-
obj.relations = [];
|
|
691
|
+
toJSON(message) {
|
|
692
|
+
var _a;
|
|
693
|
+
const obj = {};
|
|
694
|
+
if ((_a = message.relations) === null || _a === void 0 ? void 0 : _a.length) {
|
|
695
|
+
obj.relations = message.relations.map((e) => exports.Relation.toJSON(e));
|
|
751
696
|
}
|
|
752
697
|
return obj;
|
|
753
698
|
},
|
|
754
|
-
create
|
|
699
|
+
create(base) {
|
|
755
700
|
return exports.FindRelationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
756
701
|
},
|
|
757
|
-
fromPartial
|
|
702
|
+
fromPartial(object) {
|
|
758
703
|
var _a;
|
|
759
|
-
|
|
760
|
-
message.relations = ((_a = object.relations) === null || _a === void 0 ? void 0 : _a.map(
|
|
704
|
+
const message = createBaseFindRelationResponse();
|
|
705
|
+
message.relations = ((_a = object.relations) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Relation.fromPartial(e))) || [];
|
|
761
706
|
return message;
|
|
762
707
|
},
|
|
763
708
|
};
|
|
@@ -765,90 +710,80 @@ function createBasePermissionCheck() {
|
|
|
765
710
|
return { subject: "", actions: [], resource: "" };
|
|
766
711
|
}
|
|
767
712
|
exports.PermissionCheck = {
|
|
768
|
-
encode
|
|
769
|
-
var e_6, _a;
|
|
770
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
713
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
771
714
|
if (message.subject !== "") {
|
|
772
715
|
writer.uint32(10).string(message.subject);
|
|
773
716
|
}
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
var v = _c.value;
|
|
777
|
-
writer.uint32(18).string(v);
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
781
|
-
finally {
|
|
782
|
-
try {
|
|
783
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
784
|
-
}
|
|
785
|
-
finally { if (e_6) throw e_6.error; }
|
|
717
|
+
for (const v of message.actions) {
|
|
718
|
+
writer.uint32(18).string(v);
|
|
786
719
|
}
|
|
787
720
|
if (message.resource !== "") {
|
|
788
721
|
writer.uint32(26).string(message.resource);
|
|
789
722
|
}
|
|
790
723
|
return writer;
|
|
791
724
|
},
|
|
792
|
-
decode
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
725
|
+
decode(input, length) {
|
|
726
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
727
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
728
|
+
const message = createBasePermissionCheck();
|
|
796
729
|
while (reader.pos < end) {
|
|
797
|
-
|
|
730
|
+
const tag = reader.uint32();
|
|
798
731
|
switch (tag >>> 3) {
|
|
799
732
|
case 1:
|
|
800
|
-
if (tag
|
|
733
|
+
if (tag !== 10) {
|
|
801
734
|
break;
|
|
802
735
|
}
|
|
803
736
|
message.subject = reader.string();
|
|
804
737
|
continue;
|
|
805
738
|
case 2:
|
|
806
|
-
if (tag
|
|
739
|
+
if (tag !== 18) {
|
|
807
740
|
break;
|
|
808
741
|
}
|
|
809
742
|
message.actions.push(reader.string());
|
|
810
743
|
continue;
|
|
811
744
|
case 3:
|
|
812
|
-
if (tag
|
|
745
|
+
if (tag !== 26) {
|
|
813
746
|
break;
|
|
814
747
|
}
|
|
815
748
|
message.resource = reader.string();
|
|
816
749
|
continue;
|
|
817
750
|
}
|
|
818
|
-
if ((tag & 7)
|
|
751
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
819
752
|
break;
|
|
820
753
|
}
|
|
821
754
|
reader.skipType(tag & 7);
|
|
822
755
|
}
|
|
823
756
|
return message;
|
|
824
757
|
},
|
|
825
|
-
fromJSON
|
|
758
|
+
fromJSON(object) {
|
|
826
759
|
return {
|
|
827
|
-
subject: isSet(object.subject) ? String(object.subject) : "",
|
|
828
|
-
actions: Array.isArray(object === null || object === void 0 ? void 0 : object.actions) ? object.actions.map(
|
|
829
|
-
resource: isSet(object.resource) ? String(object.resource) : "",
|
|
760
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
761
|
+
actions: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.actions) ? object.actions.map((e) => globalThis.String(e)) : [],
|
|
762
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
|
|
830
763
|
};
|
|
831
764
|
},
|
|
832
|
-
toJSON
|
|
833
|
-
var
|
|
834
|
-
|
|
835
|
-
if (message.
|
|
836
|
-
obj.
|
|
765
|
+
toJSON(message) {
|
|
766
|
+
var _a;
|
|
767
|
+
const obj = {};
|
|
768
|
+
if (message.subject !== "") {
|
|
769
|
+
obj.subject = message.subject;
|
|
837
770
|
}
|
|
838
|
-
|
|
839
|
-
obj.actions =
|
|
771
|
+
if ((_a = message.actions) === null || _a === void 0 ? void 0 : _a.length) {
|
|
772
|
+
obj.actions = message.actions;
|
|
773
|
+
}
|
|
774
|
+
if (message.resource !== "") {
|
|
775
|
+
obj.resource = message.resource;
|
|
840
776
|
}
|
|
841
|
-
message.resource !== undefined && (obj.resource = message.resource);
|
|
842
777
|
return obj;
|
|
843
778
|
},
|
|
844
|
-
create
|
|
779
|
+
create(base) {
|
|
845
780
|
return exports.PermissionCheck.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
846
781
|
},
|
|
847
|
-
fromPartial
|
|
782
|
+
fromPartial(object) {
|
|
848
783
|
var _a, _b, _c;
|
|
849
|
-
|
|
784
|
+
const message = createBasePermissionCheck();
|
|
850
785
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
|
|
851
|
-
message.actions = ((_b = object.actions) === null || _b === void 0 ? void 0 : _b.map(
|
|
786
|
+
message.actions = ((_b = object.actions) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
852
787
|
message.resource = (_c = object.resource) !== null && _c !== void 0 ? _c : "";
|
|
853
788
|
return message;
|
|
854
789
|
},
|
|
@@ -857,8 +792,7 @@ function createBasePermissionRequest() {
|
|
|
857
792
|
return { subject: "", action: "", resource: "" };
|
|
858
793
|
}
|
|
859
794
|
exports.PermissionRequest = {
|
|
860
|
-
encode
|
|
861
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
795
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
862
796
|
if (message.subject !== "") {
|
|
863
797
|
writer.uint32(10).string(message.subject);
|
|
864
798
|
}
|
|
@@ -870,59 +804,65 @@ exports.PermissionRequest = {
|
|
|
870
804
|
}
|
|
871
805
|
return writer;
|
|
872
806
|
},
|
|
873
|
-
decode
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
807
|
+
decode(input, length) {
|
|
808
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
809
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
810
|
+
const message = createBasePermissionRequest();
|
|
877
811
|
while (reader.pos < end) {
|
|
878
|
-
|
|
812
|
+
const tag = reader.uint32();
|
|
879
813
|
switch (tag >>> 3) {
|
|
880
814
|
case 1:
|
|
881
|
-
if (tag
|
|
815
|
+
if (tag !== 10) {
|
|
882
816
|
break;
|
|
883
817
|
}
|
|
884
818
|
message.subject = reader.string();
|
|
885
819
|
continue;
|
|
886
820
|
case 2:
|
|
887
|
-
if (tag
|
|
821
|
+
if (tag !== 18) {
|
|
888
822
|
break;
|
|
889
823
|
}
|
|
890
824
|
message.action = reader.string();
|
|
891
825
|
continue;
|
|
892
826
|
case 3:
|
|
893
|
-
if (tag
|
|
827
|
+
if (tag !== 26) {
|
|
894
828
|
break;
|
|
895
829
|
}
|
|
896
830
|
message.resource = reader.string();
|
|
897
831
|
continue;
|
|
898
832
|
}
|
|
899
|
-
if ((tag & 7)
|
|
833
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
900
834
|
break;
|
|
901
835
|
}
|
|
902
836
|
reader.skipType(tag & 7);
|
|
903
837
|
}
|
|
904
838
|
return message;
|
|
905
839
|
},
|
|
906
|
-
fromJSON
|
|
840
|
+
fromJSON(object) {
|
|
907
841
|
return {
|
|
908
|
-
subject: isSet(object.subject) ? String(object.subject) : "",
|
|
909
|
-
action: isSet(object.action) ? String(object.action) : "",
|
|
910
|
-
resource: isSet(object.resource) ? String(object.resource) : "",
|
|
842
|
+
subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
|
|
843
|
+
action: isSet(object.action) ? globalThis.String(object.action) : "",
|
|
844
|
+
resource: isSet(object.resource) ? globalThis.String(object.resource) : "",
|
|
911
845
|
};
|
|
912
846
|
},
|
|
913
|
-
toJSON
|
|
914
|
-
|
|
915
|
-
message.subject !==
|
|
916
|
-
|
|
917
|
-
|
|
847
|
+
toJSON(message) {
|
|
848
|
+
const obj = {};
|
|
849
|
+
if (message.subject !== "") {
|
|
850
|
+
obj.subject = message.subject;
|
|
851
|
+
}
|
|
852
|
+
if (message.action !== "") {
|
|
853
|
+
obj.action = message.action;
|
|
854
|
+
}
|
|
855
|
+
if (message.resource !== "") {
|
|
856
|
+
obj.resource = message.resource;
|
|
857
|
+
}
|
|
918
858
|
return obj;
|
|
919
859
|
},
|
|
920
|
-
create
|
|
860
|
+
create(base) {
|
|
921
861
|
return exports.PermissionRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
922
862
|
},
|
|
923
|
-
fromPartial
|
|
863
|
+
fromPartial(object) {
|
|
924
864
|
var _a, _b, _c;
|
|
925
|
-
|
|
865
|
+
const message = createBasePermissionRequest();
|
|
926
866
|
message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
|
|
927
867
|
message.action = (_b = object.action) !== null && _b !== void 0 ? _b : "";
|
|
928
868
|
message.resource = (_c = object.resource) !== null && _c !== void 0 ? _c : "";
|
|
@@ -933,48 +873,49 @@ function createBaseDecision() {
|
|
|
933
873
|
return { allow: false };
|
|
934
874
|
}
|
|
935
875
|
exports.Decision = {
|
|
936
|
-
encode
|
|
937
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
876
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
938
877
|
if (message.allow === true) {
|
|
939
878
|
writer.uint32(8).bool(message.allow);
|
|
940
879
|
}
|
|
941
880
|
return writer;
|
|
942
881
|
},
|
|
943
|
-
decode
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
882
|
+
decode(input, length) {
|
|
883
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
884
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
885
|
+
const message = createBaseDecision();
|
|
947
886
|
while (reader.pos < end) {
|
|
948
|
-
|
|
887
|
+
const tag = reader.uint32();
|
|
949
888
|
switch (tag >>> 3) {
|
|
950
889
|
case 1:
|
|
951
|
-
if (tag
|
|
890
|
+
if (tag !== 8) {
|
|
952
891
|
break;
|
|
953
892
|
}
|
|
954
893
|
message.allow = reader.bool();
|
|
955
894
|
continue;
|
|
956
895
|
}
|
|
957
|
-
if ((tag & 7)
|
|
896
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
958
897
|
break;
|
|
959
898
|
}
|
|
960
899
|
reader.skipType(tag & 7);
|
|
961
900
|
}
|
|
962
901
|
return message;
|
|
963
902
|
},
|
|
964
|
-
fromJSON
|
|
965
|
-
return { allow: isSet(object.allow) ? Boolean(object.allow) : false };
|
|
903
|
+
fromJSON(object) {
|
|
904
|
+
return { allow: isSet(object.allow) ? globalThis.Boolean(object.allow) : false };
|
|
966
905
|
},
|
|
967
|
-
toJSON
|
|
968
|
-
|
|
969
|
-
|
|
906
|
+
toJSON(message) {
|
|
907
|
+
const obj = {};
|
|
908
|
+
if (message.allow === true) {
|
|
909
|
+
obj.allow = message.allow;
|
|
910
|
+
}
|
|
970
911
|
return obj;
|
|
971
912
|
},
|
|
972
|
-
create
|
|
913
|
+
create(base) {
|
|
973
914
|
return exports.Decision.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
974
915
|
},
|
|
975
|
-
fromPartial
|
|
916
|
+
fromPartial(object) {
|
|
976
917
|
var _a;
|
|
977
|
-
|
|
918
|
+
const message = createBaseDecision();
|
|
978
919
|
message.allow = (_a = object.allow) !== null && _a !== void 0 ? _a : false;
|
|
979
920
|
return message;
|
|
980
921
|
},
|