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