@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
package/dist/protoUtils/chat.js
CHANGED
|
@@ -1,200 +1,79 @@
|
|
|
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.ChatDefinition = exports.
|
|
6
|
+
exports.ChatDefinition = exports.GetRoomResponse = exports.Room = exports.DeleteRoomRequest = exports.SendMessageRequest = exports.CreateRoomRequest = void 0;
|
|
18
7
|
/* eslint-disable */
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function createBaseSetConfigRequest() {
|
|
22
|
-
return { newConfig: "" };
|
|
23
|
-
}
|
|
24
|
-
exports.SetConfigRequest = {
|
|
25
|
-
encode: function (message, writer) {
|
|
26
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
27
|
-
if (message.newConfig !== "") {
|
|
28
|
-
writer.uint32(10).string(message.newConfig);
|
|
29
|
-
}
|
|
30
|
-
return writer;
|
|
31
|
-
},
|
|
32
|
-
decode: function (input, length) {
|
|
33
|
-
var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
34
|
-
var end = length === undefined ? reader.len : reader.pos + length;
|
|
35
|
-
var message = createBaseSetConfigRequest();
|
|
36
|
-
while (reader.pos < end) {
|
|
37
|
-
var tag = reader.uint32();
|
|
38
|
-
switch (tag >>> 3) {
|
|
39
|
-
case 1:
|
|
40
|
-
if (tag != 10) {
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
message.newConfig = reader.string();
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
reader.skipType(tag & 7);
|
|
50
|
-
}
|
|
51
|
-
return message;
|
|
52
|
-
},
|
|
53
|
-
fromJSON: function (object) {
|
|
54
|
-
return { newConfig: isSet(object.newConfig) ? String(object.newConfig) : "" };
|
|
55
|
-
},
|
|
56
|
-
toJSON: function (message) {
|
|
57
|
-
var obj = {};
|
|
58
|
-
message.newConfig !== undefined && (obj.newConfig = message.newConfig);
|
|
59
|
-
return obj;
|
|
60
|
-
},
|
|
61
|
-
create: function (base) {
|
|
62
|
-
return exports.SetConfigRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
63
|
-
},
|
|
64
|
-
fromPartial: function (object) {
|
|
65
|
-
var _a;
|
|
66
|
-
var message = createBaseSetConfigRequest();
|
|
67
|
-
message.newConfig = (_a = object.newConfig) !== null && _a !== void 0 ? _a : "";
|
|
68
|
-
return message;
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
function createBaseSetConfigResponse() {
|
|
72
|
-
return { updatedConfig: "" };
|
|
73
|
-
}
|
|
74
|
-
exports.SetConfigResponse = {
|
|
75
|
-
encode: function (message, writer) {
|
|
76
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
77
|
-
if (message.updatedConfig !== "") {
|
|
78
|
-
writer.uint32(10).string(message.updatedConfig);
|
|
79
|
-
}
|
|
80
|
-
return writer;
|
|
81
|
-
},
|
|
82
|
-
decode: function (input, length) {
|
|
83
|
-
var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
84
|
-
var end = length === undefined ? reader.len : reader.pos + length;
|
|
85
|
-
var message = createBaseSetConfigResponse();
|
|
86
|
-
while (reader.pos < end) {
|
|
87
|
-
var tag = reader.uint32();
|
|
88
|
-
switch (tag >>> 3) {
|
|
89
|
-
case 1:
|
|
90
|
-
if (tag != 10) {
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
message.updatedConfig = reader.string();
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
reader.skipType(tag & 7);
|
|
100
|
-
}
|
|
101
|
-
return message;
|
|
102
|
-
},
|
|
103
|
-
fromJSON: function (object) {
|
|
104
|
-
return { updatedConfig: isSet(object.updatedConfig) ? String(object.updatedConfig) : "" };
|
|
105
|
-
},
|
|
106
|
-
toJSON: function (message) {
|
|
107
|
-
var obj = {};
|
|
108
|
-
message.updatedConfig !== undefined && (obj.updatedConfig = message.updatedConfig);
|
|
109
|
-
return obj;
|
|
110
|
-
},
|
|
111
|
-
create: function (base) {
|
|
112
|
-
return exports.SetConfigResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
113
|
-
},
|
|
114
|
-
fromPartial: function (object) {
|
|
115
|
-
var _a;
|
|
116
|
-
var message = createBaseSetConfigResponse();
|
|
117
|
-
message.updatedConfig = (_a = object.updatedConfig) !== null && _a !== void 0 ? _a : "";
|
|
118
|
-
return message;
|
|
119
|
-
},
|
|
120
|
-
};
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
+
const empty_1 = require("./google/protobuf/empty");
|
|
121
10
|
function createBaseCreateRoomRequest() {
|
|
122
11
|
return { name: "", participants: [] };
|
|
123
12
|
}
|
|
124
13
|
exports.CreateRoomRequest = {
|
|
125
|
-
encode
|
|
126
|
-
var e_1, _a;
|
|
127
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
14
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
128
15
|
if (message.name !== "") {
|
|
129
16
|
writer.uint32(10).string(message.name);
|
|
130
17
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var v = _c.value;
|
|
134
|
-
writer.uint32(18).string(v);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
138
|
-
finally {
|
|
139
|
-
try {
|
|
140
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
141
|
-
}
|
|
142
|
-
finally { if (e_1) throw e_1.error; }
|
|
18
|
+
for (const v of message.participants) {
|
|
19
|
+
writer.uint32(18).string(v);
|
|
143
20
|
}
|
|
144
21
|
return writer;
|
|
145
22
|
},
|
|
146
|
-
decode
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
23
|
+
decode(input, length) {
|
|
24
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
25
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
26
|
+
const message = createBaseCreateRoomRequest();
|
|
150
27
|
while (reader.pos < end) {
|
|
151
|
-
|
|
28
|
+
const tag = reader.uint32();
|
|
152
29
|
switch (tag >>> 3) {
|
|
153
30
|
case 1:
|
|
154
|
-
if (tag
|
|
31
|
+
if (tag !== 10) {
|
|
155
32
|
break;
|
|
156
33
|
}
|
|
157
34
|
message.name = reader.string();
|
|
158
35
|
continue;
|
|
159
36
|
case 2:
|
|
160
|
-
if (tag
|
|
37
|
+
if (tag !== 18) {
|
|
161
38
|
break;
|
|
162
39
|
}
|
|
163
40
|
message.participants.push(reader.string());
|
|
164
41
|
continue;
|
|
165
42
|
}
|
|
166
|
-
if ((tag & 7)
|
|
43
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
167
44
|
break;
|
|
168
45
|
}
|
|
169
46
|
reader.skipType(tag & 7);
|
|
170
47
|
}
|
|
171
48
|
return message;
|
|
172
49
|
},
|
|
173
|
-
fromJSON
|
|
50
|
+
fromJSON(object) {
|
|
174
51
|
return {
|
|
175
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
176
|
-
participants: Array.isArray(object === null || object === void 0 ? void 0 : object.participants)
|
|
52
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
53
|
+
participants: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.participants)
|
|
54
|
+
? object.participants.map((e) => globalThis.String(e))
|
|
55
|
+
: [],
|
|
177
56
|
};
|
|
178
57
|
},
|
|
179
|
-
toJSON
|
|
180
|
-
var
|
|
181
|
-
|
|
182
|
-
if (message.
|
|
183
|
-
obj.
|
|
58
|
+
toJSON(message) {
|
|
59
|
+
var _a;
|
|
60
|
+
const obj = {};
|
|
61
|
+
if (message.name !== "") {
|
|
62
|
+
obj.name = message.name;
|
|
184
63
|
}
|
|
185
|
-
|
|
186
|
-
obj.participants =
|
|
64
|
+
if ((_a = message.participants) === null || _a === void 0 ? void 0 : _a.length) {
|
|
65
|
+
obj.participants = message.participants;
|
|
187
66
|
}
|
|
188
67
|
return obj;
|
|
189
68
|
},
|
|
190
|
-
create
|
|
69
|
+
create(base) {
|
|
191
70
|
return exports.CreateRoomRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
192
71
|
},
|
|
193
|
-
fromPartial
|
|
72
|
+
fromPartial(object) {
|
|
194
73
|
var _a, _b;
|
|
195
|
-
|
|
74
|
+
const message = createBaseCreateRoomRequest();
|
|
196
75
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
197
|
-
message.participants = ((_b = object.participants) === null || _b === void 0 ? void 0 : _b.map(
|
|
76
|
+
message.participants = ((_b = object.participants) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
198
77
|
return message;
|
|
199
78
|
},
|
|
200
79
|
};
|
|
@@ -202,8 +81,7 @@ function createBaseSendMessageRequest() {
|
|
|
202
81
|
return { message: "", userId: "", roomId: "" };
|
|
203
82
|
}
|
|
204
83
|
exports.SendMessageRequest = {
|
|
205
|
-
encode
|
|
206
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
84
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
207
85
|
if (message.message !== "") {
|
|
208
86
|
writer.uint32(10).string(message.message);
|
|
209
87
|
}
|
|
@@ -215,59 +93,65 @@ exports.SendMessageRequest = {
|
|
|
215
93
|
}
|
|
216
94
|
return writer;
|
|
217
95
|
},
|
|
218
|
-
decode
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
96
|
+
decode(input, length) {
|
|
97
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
98
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
99
|
+
const message = createBaseSendMessageRequest();
|
|
222
100
|
while (reader.pos < end) {
|
|
223
|
-
|
|
101
|
+
const tag = reader.uint32();
|
|
224
102
|
switch (tag >>> 3) {
|
|
225
103
|
case 1:
|
|
226
|
-
if (tag
|
|
104
|
+
if (tag !== 10) {
|
|
227
105
|
break;
|
|
228
106
|
}
|
|
229
107
|
message.message = reader.string();
|
|
230
108
|
continue;
|
|
231
109
|
case 2:
|
|
232
|
-
if (tag
|
|
110
|
+
if (tag !== 18) {
|
|
233
111
|
break;
|
|
234
112
|
}
|
|
235
113
|
message.userId = reader.string();
|
|
236
114
|
continue;
|
|
237
115
|
case 3:
|
|
238
|
-
if (tag
|
|
116
|
+
if (tag !== 26) {
|
|
239
117
|
break;
|
|
240
118
|
}
|
|
241
119
|
message.roomId = reader.string();
|
|
242
120
|
continue;
|
|
243
121
|
}
|
|
244
|
-
if ((tag & 7)
|
|
122
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
245
123
|
break;
|
|
246
124
|
}
|
|
247
125
|
reader.skipType(tag & 7);
|
|
248
126
|
}
|
|
249
127
|
return message;
|
|
250
128
|
},
|
|
251
|
-
fromJSON
|
|
129
|
+
fromJSON(object) {
|
|
252
130
|
return {
|
|
253
|
-
message: isSet(object.message) ? String(object.message) : "",
|
|
254
|
-
userId: isSet(object.userId) ? String(object.userId) : "",
|
|
255
|
-
roomId: isSet(object.roomId) ? String(object.roomId) : "",
|
|
131
|
+
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
132
|
+
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
|
|
133
|
+
roomId: isSet(object.roomId) ? globalThis.String(object.roomId) : "",
|
|
256
134
|
};
|
|
257
135
|
},
|
|
258
|
-
toJSON
|
|
259
|
-
|
|
260
|
-
message.message !==
|
|
261
|
-
|
|
262
|
-
|
|
136
|
+
toJSON(message) {
|
|
137
|
+
const obj = {};
|
|
138
|
+
if (message.message !== "") {
|
|
139
|
+
obj.message = message.message;
|
|
140
|
+
}
|
|
141
|
+
if (message.userId !== "") {
|
|
142
|
+
obj.userId = message.userId;
|
|
143
|
+
}
|
|
144
|
+
if (message.roomId !== "") {
|
|
145
|
+
obj.roomId = message.roomId;
|
|
146
|
+
}
|
|
263
147
|
return obj;
|
|
264
148
|
},
|
|
265
|
-
create
|
|
149
|
+
create(base) {
|
|
266
150
|
return exports.SendMessageRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
267
151
|
},
|
|
268
|
-
fromPartial
|
|
152
|
+
fromPartial(object) {
|
|
269
153
|
var _a, _b, _c;
|
|
270
|
-
|
|
154
|
+
const message = createBaseSendMessageRequest();
|
|
271
155
|
message.message = (_a = object.message) !== null && _a !== void 0 ? _a : "";
|
|
272
156
|
message.userId = (_b = object.userId) !== null && _b !== void 0 ? _b : "";
|
|
273
157
|
message.roomId = (_c = object.roomId) !== null && _c !== void 0 ? _c : "";
|
|
@@ -278,48 +162,49 @@ function createBaseDeleteRoomRequest() {
|
|
|
278
162
|
return { id: "" };
|
|
279
163
|
}
|
|
280
164
|
exports.DeleteRoomRequest = {
|
|
281
|
-
encode
|
|
282
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
165
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
283
166
|
if (message.id !== "") {
|
|
284
167
|
writer.uint32(10).string(message.id);
|
|
285
168
|
}
|
|
286
169
|
return writer;
|
|
287
170
|
},
|
|
288
|
-
decode
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
171
|
+
decode(input, length) {
|
|
172
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
173
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
174
|
+
const message = createBaseDeleteRoomRequest();
|
|
292
175
|
while (reader.pos < end) {
|
|
293
|
-
|
|
176
|
+
const tag = reader.uint32();
|
|
294
177
|
switch (tag >>> 3) {
|
|
295
178
|
case 1:
|
|
296
|
-
if (tag
|
|
179
|
+
if (tag !== 10) {
|
|
297
180
|
break;
|
|
298
181
|
}
|
|
299
182
|
message.id = reader.string();
|
|
300
183
|
continue;
|
|
301
184
|
}
|
|
302
|
-
if ((tag & 7)
|
|
185
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
303
186
|
break;
|
|
304
187
|
}
|
|
305
188
|
reader.skipType(tag & 7);
|
|
306
189
|
}
|
|
307
190
|
return message;
|
|
308
191
|
},
|
|
309
|
-
fromJSON
|
|
310
|
-
return { id: isSet(object.id) ? String(object.id) : "" };
|
|
192
|
+
fromJSON(object) {
|
|
193
|
+
return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
|
|
311
194
|
},
|
|
312
|
-
toJSON
|
|
313
|
-
|
|
314
|
-
message.id !==
|
|
195
|
+
toJSON(message) {
|
|
196
|
+
const obj = {};
|
|
197
|
+
if (message.id !== "") {
|
|
198
|
+
obj.id = message.id;
|
|
199
|
+
}
|
|
315
200
|
return obj;
|
|
316
201
|
},
|
|
317
|
-
create
|
|
202
|
+
create(base) {
|
|
318
203
|
return exports.DeleteRoomRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
319
204
|
},
|
|
320
|
-
fromPartial
|
|
205
|
+
fromPartial(object) {
|
|
321
206
|
var _a;
|
|
322
|
-
|
|
207
|
+
const message = createBaseDeleteRoomRequest();
|
|
323
208
|
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
|
|
324
209
|
return message;
|
|
325
210
|
},
|
|
@@ -328,91 +213,83 @@ function createBaseRoom() {
|
|
|
328
213
|
return { Id: "", name: "", participants: [] };
|
|
329
214
|
}
|
|
330
215
|
exports.Room = {
|
|
331
|
-
encode
|
|
332
|
-
var e_2, _a;
|
|
333
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
216
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
334
217
|
if (message.Id !== "") {
|
|
335
218
|
writer.uint32(10).string(message.Id);
|
|
336
219
|
}
|
|
337
220
|
if (message.name !== "") {
|
|
338
221
|
writer.uint32(18).string(message.name);
|
|
339
222
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
var v = _c.value;
|
|
343
|
-
writer.uint32(26).string(v);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
347
|
-
finally {
|
|
348
|
-
try {
|
|
349
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
350
|
-
}
|
|
351
|
-
finally { if (e_2) throw e_2.error; }
|
|
223
|
+
for (const v of message.participants) {
|
|
224
|
+
writer.uint32(26).string(v);
|
|
352
225
|
}
|
|
353
226
|
return writer;
|
|
354
227
|
},
|
|
355
|
-
decode
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
228
|
+
decode(input, length) {
|
|
229
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
230
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
231
|
+
const message = createBaseRoom();
|
|
359
232
|
while (reader.pos < end) {
|
|
360
|
-
|
|
233
|
+
const tag = reader.uint32();
|
|
361
234
|
switch (tag >>> 3) {
|
|
362
235
|
case 1:
|
|
363
|
-
if (tag
|
|
236
|
+
if (tag !== 10) {
|
|
364
237
|
break;
|
|
365
238
|
}
|
|
366
239
|
message.Id = reader.string();
|
|
367
240
|
continue;
|
|
368
241
|
case 2:
|
|
369
|
-
if (tag
|
|
242
|
+
if (tag !== 18) {
|
|
370
243
|
break;
|
|
371
244
|
}
|
|
372
245
|
message.name = reader.string();
|
|
373
246
|
continue;
|
|
374
247
|
case 3:
|
|
375
|
-
if (tag
|
|
248
|
+
if (tag !== 26) {
|
|
376
249
|
break;
|
|
377
250
|
}
|
|
378
251
|
message.participants.push(reader.string());
|
|
379
252
|
continue;
|
|
380
253
|
}
|
|
381
|
-
if ((tag & 7)
|
|
254
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
382
255
|
break;
|
|
383
256
|
}
|
|
384
257
|
reader.skipType(tag & 7);
|
|
385
258
|
}
|
|
386
259
|
return message;
|
|
387
260
|
},
|
|
388
|
-
fromJSON
|
|
261
|
+
fromJSON(object) {
|
|
389
262
|
return {
|
|
390
|
-
Id: isSet(object.Id) ? String(object.Id) : "",
|
|
391
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
392
|
-
participants: Array.isArray(object === null || object === void 0 ? void 0 : object.participants)
|
|
263
|
+
Id: isSet(object.Id) ? globalThis.String(object.Id) : "",
|
|
264
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
265
|
+
participants: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.participants)
|
|
266
|
+
? object.participants.map((e) => globalThis.String(e))
|
|
267
|
+
: [],
|
|
393
268
|
};
|
|
394
269
|
},
|
|
395
|
-
toJSON
|
|
396
|
-
var
|
|
397
|
-
|
|
398
|
-
message.
|
|
399
|
-
|
|
400
|
-
|
|
270
|
+
toJSON(message) {
|
|
271
|
+
var _a;
|
|
272
|
+
const obj = {};
|
|
273
|
+
if (message.Id !== "") {
|
|
274
|
+
obj.Id = message.Id;
|
|
275
|
+
}
|
|
276
|
+
if (message.name !== "") {
|
|
277
|
+
obj.name = message.name;
|
|
401
278
|
}
|
|
402
|
-
|
|
403
|
-
obj.participants =
|
|
279
|
+
if ((_a = message.participants) === null || _a === void 0 ? void 0 : _a.length) {
|
|
280
|
+
obj.participants = message.participants;
|
|
404
281
|
}
|
|
405
282
|
return obj;
|
|
406
283
|
},
|
|
407
|
-
create
|
|
284
|
+
create(base) {
|
|
408
285
|
return exports.Room.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
409
286
|
},
|
|
410
|
-
fromPartial
|
|
287
|
+
fromPartial(object) {
|
|
411
288
|
var _a, _b, _c;
|
|
412
|
-
|
|
289
|
+
const message = createBaseRoom();
|
|
413
290
|
message.Id = (_a = object.Id) !== null && _a !== void 0 ? _a : "";
|
|
414
291
|
message.name = (_b = object.name) !== null && _b !== void 0 ? _b : "";
|
|
415
|
-
message.participants = ((_c = object.participants) === null || _c === void 0 ? void 0 : _c.map(
|
|
292
|
+
message.participants = ((_c = object.participants) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
416
293
|
return message;
|
|
417
294
|
},
|
|
418
295
|
};
|
|
@@ -420,103 +297,51 @@ function createBaseGetRoomResponse() {
|
|
|
420
297
|
return { rooms: [] };
|
|
421
298
|
}
|
|
422
299
|
exports.GetRoomResponse = {
|
|
423
|
-
encode
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
try {
|
|
427
|
-
for (var _b = __values(message.rooms), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
428
|
-
var v = _c.value;
|
|
429
|
-
exports.Room.encode(v, writer.uint32(10).fork()).ldelim();
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
433
|
-
finally {
|
|
434
|
-
try {
|
|
435
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
436
|
-
}
|
|
437
|
-
finally { if (e_3) throw e_3.error; }
|
|
300
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
301
|
+
for (const v of message.rooms) {
|
|
302
|
+
exports.Room.encode(v, writer.uint32(10).fork()).ldelim();
|
|
438
303
|
}
|
|
439
304
|
return writer;
|
|
440
305
|
},
|
|
441
|
-
decode
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
306
|
+
decode(input, length) {
|
|
307
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
308
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
309
|
+
const message = createBaseGetRoomResponse();
|
|
445
310
|
while (reader.pos < end) {
|
|
446
|
-
|
|
311
|
+
const tag = reader.uint32();
|
|
447
312
|
switch (tag >>> 3) {
|
|
448
313
|
case 1:
|
|
449
|
-
if (tag
|
|
314
|
+
if (tag !== 10) {
|
|
450
315
|
break;
|
|
451
316
|
}
|
|
452
317
|
message.rooms.push(exports.Room.decode(reader, reader.uint32()));
|
|
453
318
|
continue;
|
|
454
319
|
}
|
|
455
|
-
if ((tag & 7)
|
|
320
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
456
321
|
break;
|
|
457
322
|
}
|
|
458
323
|
reader.skipType(tag & 7);
|
|
459
324
|
}
|
|
460
325
|
return message;
|
|
461
326
|
},
|
|
462
|
-
fromJSON
|
|
463
|
-
return { rooms: Array.isArray(object === null || object === void 0 ? void 0 : object.rooms) ? object.rooms.map(
|
|
327
|
+
fromJSON(object) {
|
|
328
|
+
return { rooms: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.rooms) ? object.rooms.map((e) => exports.Room.fromJSON(e)) : [] };
|
|
464
329
|
},
|
|
465
|
-
toJSON
|
|
466
|
-
var
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
else {
|
|
471
|
-
obj.rooms = [];
|
|
330
|
+
toJSON(message) {
|
|
331
|
+
var _a;
|
|
332
|
+
const obj = {};
|
|
333
|
+
if ((_a = message.rooms) === null || _a === void 0 ? void 0 : _a.length) {
|
|
334
|
+
obj.rooms = message.rooms.map((e) => exports.Room.toJSON(e));
|
|
472
335
|
}
|
|
473
336
|
return obj;
|
|
474
337
|
},
|
|
475
|
-
create
|
|
338
|
+
create(base) {
|
|
476
339
|
return exports.GetRoomResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
477
340
|
},
|
|
478
|
-
fromPartial
|
|
341
|
+
fromPartial(object) {
|
|
479
342
|
var _a;
|
|
480
|
-
|
|
481
|
-
message.rooms = ((_a = object.rooms) === null || _a === void 0 ? void 0 : _a.map(
|
|
482
|
-
return message;
|
|
483
|
-
},
|
|
484
|
-
};
|
|
485
|
-
function createBaseEmpty() {
|
|
486
|
-
return {};
|
|
487
|
-
}
|
|
488
|
-
exports.Empty = {
|
|
489
|
-
encode: function (_, writer) {
|
|
490
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
491
|
-
return writer;
|
|
492
|
-
},
|
|
493
|
-
decode: function (input, length) {
|
|
494
|
-
var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
495
|
-
var end = length === undefined ? reader.len : reader.pos + length;
|
|
496
|
-
var message = createBaseEmpty();
|
|
497
|
-
while (reader.pos < end) {
|
|
498
|
-
var tag = reader.uint32();
|
|
499
|
-
switch (tag >>> 3) {
|
|
500
|
-
}
|
|
501
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
502
|
-
break;
|
|
503
|
-
}
|
|
504
|
-
reader.skipType(tag & 7);
|
|
505
|
-
}
|
|
506
|
-
return message;
|
|
507
|
-
},
|
|
508
|
-
fromJSON: function (_) {
|
|
509
|
-
return {};
|
|
510
|
-
},
|
|
511
|
-
toJSON: function (_) {
|
|
512
|
-
var obj = {};
|
|
513
|
-
return obj;
|
|
514
|
-
},
|
|
515
|
-
create: function (base) {
|
|
516
|
-
return exports.Empty.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
517
|
-
},
|
|
518
|
-
fromPartial: function (_) {
|
|
519
|
-
var message = createBaseEmpty();
|
|
343
|
+
const message = createBaseGetRoomResponse();
|
|
344
|
+
message.rooms = ((_a = object.rooms) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Room.fromPartial(e))) || [];
|
|
520
345
|
return message;
|
|
521
346
|
},
|
|
522
347
|
};
|
|
@@ -524,14 +349,6 @@ exports.ChatDefinition = {
|
|
|
524
349
|
name: "Chat",
|
|
525
350
|
fullName: "chat.Chat",
|
|
526
351
|
methods: {
|
|
527
|
-
setConfig: {
|
|
528
|
-
name: "SetConfig",
|
|
529
|
-
requestType: exports.SetConfigRequest,
|
|
530
|
-
requestStream: false,
|
|
531
|
-
responseType: exports.SetConfigResponse,
|
|
532
|
-
responseStream: false,
|
|
533
|
-
options: {},
|
|
534
|
-
},
|
|
535
352
|
createRoom: {
|
|
536
353
|
name: "CreateRoom",
|
|
537
354
|
requestType: exports.CreateRoomRequest,
|
|
@@ -552,7 +369,7 @@ exports.ChatDefinition = {
|
|
|
552
369
|
name: "SendMessage",
|
|
553
370
|
requestType: exports.SendMessageRequest,
|
|
554
371
|
requestStream: false,
|
|
555
|
-
responseType:
|
|
372
|
+
responseType: empty_1.Empty,
|
|
556
373
|
responseStream: false,
|
|
557
374
|
options: {},
|
|
558
375
|
},
|