@conduitplatform/grpc-sdk 0.16.0-alpha.20 → 0.16.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/ConduitAuthorizedResource.js +5 -6
- package/dist/classes/ConduitAuthorizedResource.js.map +1 -1
- package/dist/classes/ConduitModule.js +59 -169
- package/dist/classes/ConduitModule.js.map +1 -1
- package/dist/classes/ConduitSchema.js +3 -4
- package/dist/classes/ConduitSchema.js.map +1 -1
- package/dist/classes/Error.js +17 -40
- package/dist/classes/Error.js.map +1 -1
- package/dist/classes/HealthCheck.js +28 -96
- package/dist/classes/HealthCheck.js.map +1 -1
- package/dist/index.js +295 -468
- 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/interfaces/ConduitRouteReturn.js +9 -18
- package/dist/interfaces/ConduitRouteReturn.js.map +1 -1
- package/dist/modules/admin/index.js +13 -31
- package/dist/modules/admin/index.js.map +1 -1
- package/dist/modules/authentication/index.js +30 -50
- package/dist/modules/authentication/index.js.map +1 -1
- package/dist/modules/authorization/index.d.ts +1 -0
- package/dist/modules/authorization/index.js +35 -50
- package/dist/modules/authorization/index.js.map +1 -1
- package/dist/modules/chat/index.js +16 -34
- package/dist/modules/chat/index.js.map +1 -1
- package/dist/modules/config/index.d.ts +10 -1
- package/dist/modules/config/index.js +82 -184
- 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 +139 -179
- package/dist/modules/database/index.js.map +1 -1
- package/dist/modules/email/index.js +15 -33
- package/dist/modules/email/index.js.map +1 -1
- package/dist/modules/pushNotifications/index.js +38 -56
- package/dist/modules/pushNotifications/index.js.map +1 -1
- package/dist/modules/router/index.js +15 -33
- 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 +57 -77
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/protoUtils/authentication.d.ts +1 -1
- package/dist/protoUtils/authentication.js +267 -235
- package/dist/protoUtils/authentication.js.map +1 -1
- package/dist/protoUtils/authorization.d.ts +36 -1
- package/dist/protoUtils/authorization.js +494 -448
- package/dist/protoUtils/authorization.js.map +1 -1
- package/dist/protoUtils/chat.d.ts +1 -1
- package/dist/protoUtils/chat.js +128 -165
- package/dist/protoUtils/chat.js.map +1 -1
- package/dist/protoUtils/core.d.ts +4 -1
- package/dist/protoUtils/core.js +641 -573
- package/dist/protoUtils/core.js.map +1 -1
- package/dist/protoUtils/database.d.ts +1 -1
- package/dist/protoUtils/database.js +766 -766
- package/dist/protoUtils/database.js.map +1 -1
- package/dist/protoUtils/email.d.ts +1 -1
- package/dist/protoUtils/email.js +144 -174
- package/dist/protoUtils/email.js.map +1 -1
- package/dist/protoUtils/google/protobuf/empty.d.ts +1 -1
- package/dist/protoUtils/google/protobuf/empty.js +14 -15
- package/dist/protoUtils/google/protobuf/empty.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/module.d.ts +1 -1
- package/dist/protoUtils/module.js +285 -293
- package/dist/protoUtils/module.js.map +1 -1
- package/dist/protoUtils/push-notifications.d.ts +1 -1
- package/dist/protoUtils/push-notifications.js +226 -244
- package/dist/protoUtils/push-notifications.js.map +1 -1
- package/dist/protoUtils/router.d.ts +1 -1
- package/dist/protoUtils/router.js +312 -320
- package/dist/protoUtils/router.js.map +1 -1
- package/dist/protoUtils/sms.d.ts +1 -1
- package/dist/protoUtils/sms.js +119 -109
- package/dist/protoUtils/sms.js.map +1 -1
- package/dist/protoUtils/storage.d.ts +1 -1
- package/dist/protoUtils/storage.js +338 -259
- package/dist/protoUtils/storage.js.map +1 -1
- package/dist/types/index.js +6 -24
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/EventBus.js +20 -37
- 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/sleep.js +1 -1
- package/dist/utilities/sleep.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,68 +1,58 @@
|
|
|
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.AdminRouterDefinition = exports.ClientRouterDefinition = exports.ConduitModuleDefinition = exports.SocketResponse = exports.SocketRequest = exports.CookieOptions = exports.Cookie = exports.Response = exports.Request = exports.SetConfigResponse = exports.SetConfigRequest = void 0;
|
|
18
7
|
/* eslint-disable */
|
|
19
|
-
|
|
8
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
20
9
|
function createBaseSetConfigRequest() {
|
|
21
10
|
return { newConfig: "" };
|
|
22
11
|
}
|
|
23
12
|
exports.SetConfigRequest = {
|
|
24
|
-
encode
|
|
25
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
13
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
26
14
|
if (message.newConfig !== "") {
|
|
27
15
|
writer.uint32(10).string(message.newConfig);
|
|
28
16
|
}
|
|
29
17
|
return writer;
|
|
30
18
|
},
|
|
31
|
-
decode
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
decode(input, length) {
|
|
20
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
21
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
22
|
+
const message = createBaseSetConfigRequest();
|
|
35
23
|
while (reader.pos < end) {
|
|
36
|
-
|
|
24
|
+
const tag = reader.uint32();
|
|
37
25
|
switch (tag >>> 3) {
|
|
38
26
|
case 1:
|
|
39
|
-
if (tag
|
|
27
|
+
if (tag !== 10) {
|
|
40
28
|
break;
|
|
41
29
|
}
|
|
42
30
|
message.newConfig = reader.string();
|
|
43
31
|
continue;
|
|
44
32
|
}
|
|
45
|
-
if ((tag & 7)
|
|
33
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
46
34
|
break;
|
|
47
35
|
}
|
|
48
36
|
reader.skipType(tag & 7);
|
|
49
37
|
}
|
|
50
38
|
return message;
|
|
51
39
|
},
|
|
52
|
-
fromJSON
|
|
53
|
-
return { newConfig: isSet(object.newConfig) ? String(object.newConfig) : "" };
|
|
40
|
+
fromJSON(object) {
|
|
41
|
+
return { newConfig: isSet(object.newConfig) ? globalThis.String(object.newConfig) : "" };
|
|
54
42
|
},
|
|
55
|
-
toJSON
|
|
56
|
-
|
|
57
|
-
message.newConfig !==
|
|
43
|
+
toJSON(message) {
|
|
44
|
+
const obj = {};
|
|
45
|
+
if (message.newConfig !== "") {
|
|
46
|
+
obj.newConfig = message.newConfig;
|
|
47
|
+
}
|
|
58
48
|
return obj;
|
|
59
49
|
},
|
|
60
|
-
create
|
|
50
|
+
create(base) {
|
|
61
51
|
return exports.SetConfigRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
62
52
|
},
|
|
63
|
-
fromPartial
|
|
53
|
+
fromPartial(object) {
|
|
64
54
|
var _a;
|
|
65
|
-
|
|
55
|
+
const message = createBaseSetConfigRequest();
|
|
66
56
|
message.newConfig = (_a = object.newConfig) !== null && _a !== void 0 ? _a : "";
|
|
67
57
|
return message;
|
|
68
58
|
},
|
|
@@ -71,48 +61,49 @@ function createBaseSetConfigResponse() {
|
|
|
71
61
|
return { updatedConfig: "" };
|
|
72
62
|
}
|
|
73
63
|
exports.SetConfigResponse = {
|
|
74
|
-
encode
|
|
75
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
64
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
76
65
|
if (message.updatedConfig !== "") {
|
|
77
66
|
writer.uint32(10).string(message.updatedConfig);
|
|
78
67
|
}
|
|
79
68
|
return writer;
|
|
80
69
|
},
|
|
81
|
-
decode
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
70
|
+
decode(input, length) {
|
|
71
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
72
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
73
|
+
const message = createBaseSetConfigResponse();
|
|
85
74
|
while (reader.pos < end) {
|
|
86
|
-
|
|
75
|
+
const tag = reader.uint32();
|
|
87
76
|
switch (tag >>> 3) {
|
|
88
77
|
case 1:
|
|
89
|
-
if (tag
|
|
78
|
+
if (tag !== 10) {
|
|
90
79
|
break;
|
|
91
80
|
}
|
|
92
81
|
message.updatedConfig = reader.string();
|
|
93
82
|
continue;
|
|
94
83
|
}
|
|
95
|
-
if ((tag & 7)
|
|
84
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
96
85
|
break;
|
|
97
86
|
}
|
|
98
87
|
reader.skipType(tag & 7);
|
|
99
88
|
}
|
|
100
89
|
return message;
|
|
101
90
|
},
|
|
102
|
-
fromJSON
|
|
103
|
-
return { updatedConfig: isSet(object.updatedConfig) ? String(object.updatedConfig) : "" };
|
|
91
|
+
fromJSON(object) {
|
|
92
|
+
return { updatedConfig: isSet(object.updatedConfig) ? globalThis.String(object.updatedConfig) : "" };
|
|
104
93
|
},
|
|
105
|
-
toJSON
|
|
106
|
-
|
|
107
|
-
message.updatedConfig !==
|
|
94
|
+
toJSON(message) {
|
|
95
|
+
const obj = {};
|
|
96
|
+
if (message.updatedConfig !== "") {
|
|
97
|
+
obj.updatedConfig = message.updatedConfig;
|
|
98
|
+
}
|
|
108
99
|
return obj;
|
|
109
100
|
},
|
|
110
|
-
create
|
|
101
|
+
create(base) {
|
|
111
102
|
return exports.SetConfigResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
112
103
|
},
|
|
113
|
-
fromPartial
|
|
104
|
+
fromPartial(object) {
|
|
114
105
|
var _a;
|
|
115
|
-
|
|
106
|
+
const message = createBaseSetConfigResponse();
|
|
116
107
|
message.updatedConfig = (_a = object.updatedConfig) !== null && _a !== void 0 ? _a : "";
|
|
117
108
|
return message;
|
|
118
109
|
},
|
|
@@ -131,8 +122,7 @@ function createBaseRequest() {
|
|
|
131
122
|
};
|
|
132
123
|
}
|
|
133
124
|
exports.Request = {
|
|
134
|
-
encode
|
|
135
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
125
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
136
126
|
if (message.params !== "") {
|
|
137
127
|
writer.uint32(10).string(message.params);
|
|
138
128
|
}
|
|
@@ -162,107 +152,125 @@ exports.Request = {
|
|
|
162
152
|
}
|
|
163
153
|
return writer;
|
|
164
154
|
},
|
|
165
|
-
decode
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
155
|
+
decode(input, length) {
|
|
156
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
157
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
158
|
+
const message = createBaseRequest();
|
|
169
159
|
while (reader.pos < end) {
|
|
170
|
-
|
|
160
|
+
const tag = reader.uint32();
|
|
171
161
|
switch (tag >>> 3) {
|
|
172
162
|
case 1:
|
|
173
|
-
if (tag
|
|
163
|
+
if (tag !== 10) {
|
|
174
164
|
break;
|
|
175
165
|
}
|
|
176
166
|
message.params = reader.string();
|
|
177
167
|
continue;
|
|
178
168
|
case 2:
|
|
179
|
-
if (tag
|
|
169
|
+
if (tag !== 18) {
|
|
180
170
|
break;
|
|
181
171
|
}
|
|
182
172
|
message.path = reader.string();
|
|
183
173
|
continue;
|
|
184
174
|
case 3:
|
|
185
|
-
if (tag
|
|
175
|
+
if (tag !== 26) {
|
|
186
176
|
break;
|
|
187
177
|
}
|
|
188
178
|
message.headers = reader.string();
|
|
189
179
|
continue;
|
|
190
180
|
case 4:
|
|
191
|
-
if (tag
|
|
181
|
+
if (tag !== 34) {
|
|
192
182
|
break;
|
|
193
183
|
}
|
|
194
184
|
message.context = reader.string();
|
|
195
185
|
continue;
|
|
196
186
|
case 5:
|
|
197
|
-
if (tag
|
|
187
|
+
if (tag !== 42) {
|
|
198
188
|
break;
|
|
199
189
|
}
|
|
200
190
|
message.cookies = reader.string();
|
|
201
191
|
continue;
|
|
202
192
|
case 6:
|
|
203
|
-
if (tag
|
|
193
|
+
if (tag !== 50) {
|
|
204
194
|
break;
|
|
205
195
|
}
|
|
206
196
|
message.bodyParams = reader.string();
|
|
207
197
|
continue;
|
|
208
198
|
case 7:
|
|
209
|
-
if (tag
|
|
199
|
+
if (tag !== 58) {
|
|
210
200
|
break;
|
|
211
201
|
}
|
|
212
202
|
message.urlParams = reader.string();
|
|
213
203
|
continue;
|
|
214
204
|
case 8:
|
|
215
|
-
if (tag
|
|
205
|
+
if (tag !== 66) {
|
|
216
206
|
break;
|
|
217
207
|
}
|
|
218
208
|
message.queryParams = reader.string();
|
|
219
209
|
continue;
|
|
220
210
|
case 9:
|
|
221
|
-
if (tag
|
|
211
|
+
if (tag !== 74) {
|
|
222
212
|
break;
|
|
223
213
|
}
|
|
224
214
|
message.functionName = reader.string();
|
|
225
215
|
continue;
|
|
226
216
|
}
|
|
227
|
-
if ((tag & 7)
|
|
217
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
228
218
|
break;
|
|
229
219
|
}
|
|
230
220
|
reader.skipType(tag & 7);
|
|
231
221
|
}
|
|
232
222
|
return message;
|
|
233
223
|
},
|
|
234
|
-
fromJSON
|
|
224
|
+
fromJSON(object) {
|
|
235
225
|
return {
|
|
236
|
-
params: isSet(object.params) ? String(object.params) : "",
|
|
237
|
-
path: isSet(object.path) ? String(object.path) : "",
|
|
238
|
-
headers: isSet(object.headers) ? String(object.headers) : "",
|
|
239
|
-
context: isSet(object.context) ? String(object.context) : "",
|
|
240
|
-
cookies: isSet(object.cookies) ? String(object.cookies) : "",
|
|
241
|
-
bodyParams: isSet(object.bodyParams) ? String(object.bodyParams) : "",
|
|
242
|
-
urlParams: isSet(object.urlParams) ? String(object.urlParams) : "",
|
|
243
|
-
queryParams: isSet(object.queryParams) ? String(object.queryParams) : "",
|
|
244
|
-
functionName: isSet(object.functionName) ? String(object.functionName) : "",
|
|
226
|
+
params: isSet(object.params) ? globalThis.String(object.params) : "",
|
|
227
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
228
|
+
headers: isSet(object.headers) ? globalThis.String(object.headers) : "",
|
|
229
|
+
context: isSet(object.context) ? globalThis.String(object.context) : "",
|
|
230
|
+
cookies: isSet(object.cookies) ? globalThis.String(object.cookies) : "",
|
|
231
|
+
bodyParams: isSet(object.bodyParams) ? globalThis.String(object.bodyParams) : "",
|
|
232
|
+
urlParams: isSet(object.urlParams) ? globalThis.String(object.urlParams) : "",
|
|
233
|
+
queryParams: isSet(object.queryParams) ? globalThis.String(object.queryParams) : "",
|
|
234
|
+
functionName: isSet(object.functionName) ? globalThis.String(object.functionName) : "",
|
|
245
235
|
};
|
|
246
236
|
},
|
|
247
|
-
toJSON
|
|
248
|
-
|
|
249
|
-
message.params !==
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
message.
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
message.
|
|
256
|
-
|
|
257
|
-
|
|
237
|
+
toJSON(message) {
|
|
238
|
+
const obj = {};
|
|
239
|
+
if (message.params !== "") {
|
|
240
|
+
obj.params = message.params;
|
|
241
|
+
}
|
|
242
|
+
if (message.path !== "") {
|
|
243
|
+
obj.path = message.path;
|
|
244
|
+
}
|
|
245
|
+
if (message.headers !== "") {
|
|
246
|
+
obj.headers = message.headers;
|
|
247
|
+
}
|
|
248
|
+
if (message.context !== "") {
|
|
249
|
+
obj.context = message.context;
|
|
250
|
+
}
|
|
251
|
+
if (message.cookies !== "") {
|
|
252
|
+
obj.cookies = message.cookies;
|
|
253
|
+
}
|
|
254
|
+
if (message.bodyParams !== "") {
|
|
255
|
+
obj.bodyParams = message.bodyParams;
|
|
256
|
+
}
|
|
257
|
+
if (message.urlParams !== "") {
|
|
258
|
+
obj.urlParams = message.urlParams;
|
|
259
|
+
}
|
|
260
|
+
if (message.queryParams !== "") {
|
|
261
|
+
obj.queryParams = message.queryParams;
|
|
262
|
+
}
|
|
263
|
+
if (message.functionName !== "") {
|
|
264
|
+
obj.functionName = message.functionName;
|
|
265
|
+
}
|
|
258
266
|
return obj;
|
|
259
267
|
},
|
|
260
|
-
create
|
|
268
|
+
create(base) {
|
|
261
269
|
return exports.Request.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
262
270
|
},
|
|
263
|
-
fromPartial
|
|
271
|
+
fromPartial(object) {
|
|
264
272
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
265
|
-
|
|
273
|
+
const message = createBaseRequest();
|
|
266
274
|
message.params = (_a = object.params) !== null && _a !== void 0 ? _a : "";
|
|
267
275
|
message.path = (_b = object.path) !== null && _b !== void 0 ? _b : "";
|
|
268
276
|
message.headers = (_c = object.headers) !== null && _c !== void 0 ? _c : "";
|
|
@@ -279,120 +287,99 @@ function createBaseResponse() {
|
|
|
279
287
|
return { result: "", redirect: "", setCookies: [], removeCookies: [] };
|
|
280
288
|
}
|
|
281
289
|
exports.Response = {
|
|
282
|
-
encode
|
|
283
|
-
var e_1, _a, e_2, _b;
|
|
284
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
290
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
285
291
|
if (message.result !== "") {
|
|
286
292
|
writer.uint32(10).string(message.result);
|
|
287
293
|
}
|
|
288
294
|
if (message.redirect !== "") {
|
|
289
295
|
writer.uint32(18).string(message.redirect);
|
|
290
296
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
var v = _d.value;
|
|
294
|
-
exports.Cookie.encode(v, writer.uint32(26).fork()).ldelim();
|
|
295
|
-
}
|
|
297
|
+
for (const v of message.setCookies) {
|
|
298
|
+
exports.Cookie.encode(v, writer.uint32(26).fork()).ldelim();
|
|
296
299
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
try {
|
|
300
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
301
|
-
}
|
|
302
|
-
finally { if (e_1) throw e_1.error; }
|
|
303
|
-
}
|
|
304
|
-
try {
|
|
305
|
-
for (var _e = __values(message.removeCookies), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
306
|
-
var v = _f.value;
|
|
307
|
-
exports.Cookie.encode(v, writer.uint32(34).fork()).ldelim();
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
311
|
-
finally {
|
|
312
|
-
try {
|
|
313
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
314
|
-
}
|
|
315
|
-
finally { if (e_2) throw e_2.error; }
|
|
300
|
+
for (const v of message.removeCookies) {
|
|
301
|
+
exports.Cookie.encode(v, writer.uint32(34).fork()).ldelim();
|
|
316
302
|
}
|
|
317
303
|
return writer;
|
|
318
304
|
},
|
|
319
|
-
decode
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
305
|
+
decode(input, length) {
|
|
306
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
307
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
308
|
+
const message = createBaseResponse();
|
|
323
309
|
while (reader.pos < end) {
|
|
324
|
-
|
|
310
|
+
const tag = reader.uint32();
|
|
325
311
|
switch (tag >>> 3) {
|
|
326
312
|
case 1:
|
|
327
|
-
if (tag
|
|
313
|
+
if (tag !== 10) {
|
|
328
314
|
break;
|
|
329
315
|
}
|
|
330
316
|
message.result = reader.string();
|
|
331
317
|
continue;
|
|
332
318
|
case 2:
|
|
333
|
-
if (tag
|
|
319
|
+
if (tag !== 18) {
|
|
334
320
|
break;
|
|
335
321
|
}
|
|
336
322
|
message.redirect = reader.string();
|
|
337
323
|
continue;
|
|
338
324
|
case 3:
|
|
339
|
-
if (tag
|
|
325
|
+
if (tag !== 26) {
|
|
340
326
|
break;
|
|
341
327
|
}
|
|
342
328
|
message.setCookies.push(exports.Cookie.decode(reader, reader.uint32()));
|
|
343
329
|
continue;
|
|
344
330
|
case 4:
|
|
345
|
-
if (tag
|
|
331
|
+
if (tag !== 34) {
|
|
346
332
|
break;
|
|
347
333
|
}
|
|
348
334
|
message.removeCookies.push(exports.Cookie.decode(reader, reader.uint32()));
|
|
349
335
|
continue;
|
|
350
336
|
}
|
|
351
|
-
if ((tag & 7)
|
|
337
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
352
338
|
break;
|
|
353
339
|
}
|
|
354
340
|
reader.skipType(tag & 7);
|
|
355
341
|
}
|
|
356
342
|
return message;
|
|
357
343
|
},
|
|
358
|
-
fromJSON
|
|
344
|
+
fromJSON(object) {
|
|
359
345
|
return {
|
|
360
|
-
result: isSet(object.result) ? String(object.result) : "",
|
|
361
|
-
redirect: isSet(object.redirect) ? String(object.redirect) : "",
|
|
362
|
-
setCookies: Array.isArray(object === null || object === void 0 ? void 0 : object.setCookies)
|
|
363
|
-
|
|
364
|
-
|
|
346
|
+
result: isSet(object.result) ? globalThis.String(object.result) : "",
|
|
347
|
+
redirect: isSet(object.redirect) ? globalThis.String(object.redirect) : "",
|
|
348
|
+
setCookies: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.setCookies)
|
|
349
|
+
? object.setCookies.map((e) => exports.Cookie.fromJSON(e))
|
|
350
|
+
: [],
|
|
351
|
+
removeCookies: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.removeCookies)
|
|
352
|
+
? object.removeCookies.map((e) => exports.Cookie.fromJSON(e))
|
|
365
353
|
: [],
|
|
366
354
|
};
|
|
367
355
|
},
|
|
368
|
-
toJSON
|
|
369
|
-
var
|
|
370
|
-
|
|
371
|
-
message.
|
|
372
|
-
|
|
373
|
-
obj.setCookies = message.setCookies.map(function (e) { return e ? exports.Cookie.toJSON(e) : undefined; });
|
|
356
|
+
toJSON(message) {
|
|
357
|
+
var _a, _b;
|
|
358
|
+
const obj = {};
|
|
359
|
+
if (message.result !== "") {
|
|
360
|
+
obj.result = message.result;
|
|
374
361
|
}
|
|
375
|
-
|
|
376
|
-
obj.
|
|
362
|
+
if (message.redirect !== "") {
|
|
363
|
+
obj.redirect = message.redirect;
|
|
377
364
|
}
|
|
378
|
-
if (message.
|
|
379
|
-
obj.
|
|
365
|
+
if ((_a = message.setCookies) === null || _a === void 0 ? void 0 : _a.length) {
|
|
366
|
+
obj.setCookies = message.setCookies.map((e) => exports.Cookie.toJSON(e));
|
|
380
367
|
}
|
|
381
|
-
|
|
382
|
-
obj.removeCookies =
|
|
368
|
+
if ((_b = message.removeCookies) === null || _b === void 0 ? void 0 : _b.length) {
|
|
369
|
+
obj.removeCookies = message.removeCookies.map((e) => exports.Cookie.toJSON(e));
|
|
383
370
|
}
|
|
384
371
|
return obj;
|
|
385
372
|
},
|
|
386
|
-
create
|
|
373
|
+
create(base) {
|
|
387
374
|
return exports.Response.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
388
375
|
},
|
|
389
|
-
fromPartial
|
|
376
|
+
fromPartial(object) {
|
|
390
377
|
var _a, _b, _c, _d;
|
|
391
|
-
|
|
378
|
+
const message = createBaseResponse();
|
|
392
379
|
message.result = (_a = object.result) !== null && _a !== void 0 ? _a : "";
|
|
393
380
|
message.redirect = (_b = object.redirect) !== null && _b !== void 0 ? _b : "";
|
|
394
|
-
message.setCookies = ((_c = object.setCookies) === null || _c === void 0 ? void 0 : _c.map(
|
|
395
|
-
message.removeCookies = ((_d = object.removeCookies) === null || _d === void 0 ? void 0 : _d.map(
|
|
381
|
+
message.setCookies = ((_c = object.setCookies) === null || _c === void 0 ? void 0 : _c.map((e) => exports.Cookie.fromPartial(e))) || [];
|
|
382
|
+
message.removeCookies = ((_d = object.removeCookies) === null || _d === void 0 ? void 0 : _d.map((e) => exports.Cookie.fromPartial(e))) || [];
|
|
396
383
|
return message;
|
|
397
384
|
},
|
|
398
385
|
};
|
|
@@ -400,8 +387,7 @@ function createBaseCookie() {
|
|
|
400
387
|
return { name: "", value: undefined, options: undefined };
|
|
401
388
|
}
|
|
402
389
|
exports.Cookie = {
|
|
403
|
-
encode
|
|
404
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
390
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
405
391
|
if (message.name !== "") {
|
|
406
392
|
writer.uint32(10).string(message.name);
|
|
407
393
|
}
|
|
@@ -413,60 +399,65 @@ exports.Cookie = {
|
|
|
413
399
|
}
|
|
414
400
|
return writer;
|
|
415
401
|
},
|
|
416
|
-
decode
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
402
|
+
decode(input, length) {
|
|
403
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
404
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
405
|
+
const message = createBaseCookie();
|
|
420
406
|
while (reader.pos < end) {
|
|
421
|
-
|
|
407
|
+
const tag = reader.uint32();
|
|
422
408
|
switch (tag >>> 3) {
|
|
423
409
|
case 1:
|
|
424
|
-
if (tag
|
|
410
|
+
if (tag !== 10) {
|
|
425
411
|
break;
|
|
426
412
|
}
|
|
427
413
|
message.name = reader.string();
|
|
428
414
|
continue;
|
|
429
415
|
case 2:
|
|
430
|
-
if (tag
|
|
416
|
+
if (tag !== 18) {
|
|
431
417
|
break;
|
|
432
418
|
}
|
|
433
419
|
message.value = reader.string();
|
|
434
420
|
continue;
|
|
435
421
|
case 3:
|
|
436
|
-
if (tag
|
|
422
|
+
if (tag !== 26) {
|
|
437
423
|
break;
|
|
438
424
|
}
|
|
439
425
|
message.options = exports.CookieOptions.decode(reader, reader.uint32());
|
|
440
426
|
continue;
|
|
441
427
|
}
|
|
442
|
-
if ((tag & 7)
|
|
428
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
443
429
|
break;
|
|
444
430
|
}
|
|
445
431
|
reader.skipType(tag & 7);
|
|
446
432
|
}
|
|
447
433
|
return message;
|
|
448
434
|
},
|
|
449
|
-
fromJSON
|
|
435
|
+
fromJSON(object) {
|
|
450
436
|
return {
|
|
451
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
452
|
-
value: isSet(object.value) ? String(object.value) : undefined,
|
|
437
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
438
|
+
value: isSet(object.value) ? globalThis.String(object.value) : undefined,
|
|
453
439
|
options: isSet(object.options) ? exports.CookieOptions.fromJSON(object.options) : undefined,
|
|
454
440
|
};
|
|
455
441
|
},
|
|
456
|
-
toJSON
|
|
457
|
-
|
|
458
|
-
message.name !==
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
442
|
+
toJSON(message) {
|
|
443
|
+
const obj = {};
|
|
444
|
+
if (message.name !== "") {
|
|
445
|
+
obj.name = message.name;
|
|
446
|
+
}
|
|
447
|
+
if (message.value !== undefined) {
|
|
448
|
+
obj.value = message.value;
|
|
449
|
+
}
|
|
450
|
+
if (message.options !== undefined) {
|
|
451
|
+
obj.options = exports.CookieOptions.toJSON(message.options);
|
|
452
|
+
}
|
|
462
453
|
return obj;
|
|
463
454
|
},
|
|
464
|
-
create
|
|
455
|
+
create(base) {
|
|
465
456
|
return exports.Cookie.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
466
457
|
},
|
|
467
|
-
fromPartial
|
|
458
|
+
fromPartial(object) {
|
|
468
459
|
var _a, _b;
|
|
469
|
-
|
|
460
|
+
const message = createBaseCookie();
|
|
470
461
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
471
462
|
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : undefined;
|
|
472
463
|
message.options = (object.options !== undefined && object.options !== null)
|
|
@@ -479,8 +470,7 @@ function createBaseCookieOptions() {
|
|
|
479
470
|
return { httpOnly: false, secure: false, signed: false, maxAge: 0, path: "", domain: "", sameSite: "" };
|
|
480
471
|
}
|
|
481
472
|
exports.CookieOptions = {
|
|
482
|
-
encode
|
|
483
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
473
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
484
474
|
if (message.httpOnly === true) {
|
|
485
475
|
writer.uint32(8).bool(message.httpOnly);
|
|
486
476
|
}
|
|
@@ -504,91 +494,105 @@ exports.CookieOptions = {
|
|
|
504
494
|
}
|
|
505
495
|
return writer;
|
|
506
496
|
},
|
|
507
|
-
decode
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
497
|
+
decode(input, length) {
|
|
498
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
499
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
500
|
+
const message = createBaseCookieOptions();
|
|
511
501
|
while (reader.pos < end) {
|
|
512
|
-
|
|
502
|
+
const tag = reader.uint32();
|
|
513
503
|
switch (tag >>> 3) {
|
|
514
504
|
case 1:
|
|
515
|
-
if (tag
|
|
505
|
+
if (tag !== 8) {
|
|
516
506
|
break;
|
|
517
507
|
}
|
|
518
508
|
message.httpOnly = reader.bool();
|
|
519
509
|
continue;
|
|
520
510
|
case 2:
|
|
521
|
-
if (tag
|
|
511
|
+
if (tag !== 16) {
|
|
522
512
|
break;
|
|
523
513
|
}
|
|
524
514
|
message.secure = reader.bool();
|
|
525
515
|
continue;
|
|
526
516
|
case 3:
|
|
527
|
-
if (tag
|
|
517
|
+
if (tag !== 24) {
|
|
528
518
|
break;
|
|
529
519
|
}
|
|
530
520
|
message.signed = reader.bool();
|
|
531
521
|
continue;
|
|
532
522
|
case 4:
|
|
533
|
-
if (tag
|
|
523
|
+
if (tag !== 32) {
|
|
534
524
|
break;
|
|
535
525
|
}
|
|
536
526
|
message.maxAge = reader.int32();
|
|
537
527
|
continue;
|
|
538
528
|
case 5:
|
|
539
|
-
if (tag
|
|
529
|
+
if (tag !== 42) {
|
|
540
530
|
break;
|
|
541
531
|
}
|
|
542
532
|
message.path = reader.string();
|
|
543
533
|
continue;
|
|
544
534
|
case 6:
|
|
545
|
-
if (tag
|
|
535
|
+
if (tag !== 50) {
|
|
546
536
|
break;
|
|
547
537
|
}
|
|
548
538
|
message.domain = reader.string();
|
|
549
539
|
continue;
|
|
550
540
|
case 7:
|
|
551
|
-
if (tag
|
|
541
|
+
if (tag !== 58) {
|
|
552
542
|
break;
|
|
553
543
|
}
|
|
554
544
|
message.sameSite = reader.string();
|
|
555
545
|
continue;
|
|
556
546
|
}
|
|
557
|
-
if ((tag & 7)
|
|
547
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
558
548
|
break;
|
|
559
549
|
}
|
|
560
550
|
reader.skipType(tag & 7);
|
|
561
551
|
}
|
|
562
552
|
return message;
|
|
563
553
|
},
|
|
564
|
-
fromJSON
|
|
554
|
+
fromJSON(object) {
|
|
565
555
|
return {
|
|
566
|
-
httpOnly: isSet(object.httpOnly) ? Boolean(object.httpOnly) : false,
|
|
567
|
-
secure: isSet(object.secure) ? Boolean(object.secure) : false,
|
|
568
|
-
signed: isSet(object.signed) ? Boolean(object.signed) : false,
|
|
569
|
-
maxAge: isSet(object.maxAge) ? Number(object.maxAge) : 0,
|
|
570
|
-
path: isSet(object.path) ? String(object.path) : "",
|
|
571
|
-
domain: isSet(object.domain) ? String(object.domain) : "",
|
|
572
|
-
sameSite: isSet(object.sameSite) ? String(object.sameSite) : "",
|
|
556
|
+
httpOnly: isSet(object.httpOnly) ? globalThis.Boolean(object.httpOnly) : false,
|
|
557
|
+
secure: isSet(object.secure) ? globalThis.Boolean(object.secure) : false,
|
|
558
|
+
signed: isSet(object.signed) ? globalThis.Boolean(object.signed) : false,
|
|
559
|
+
maxAge: isSet(object.maxAge) ? globalThis.Number(object.maxAge) : 0,
|
|
560
|
+
path: isSet(object.path) ? globalThis.String(object.path) : "",
|
|
561
|
+
domain: isSet(object.domain) ? globalThis.String(object.domain) : "",
|
|
562
|
+
sameSite: isSet(object.sameSite) ? globalThis.String(object.sameSite) : "",
|
|
573
563
|
};
|
|
574
564
|
},
|
|
575
|
-
toJSON
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
565
|
+
toJSON(message) {
|
|
566
|
+
const obj = {};
|
|
567
|
+
if (message.httpOnly === true) {
|
|
568
|
+
obj.httpOnly = message.httpOnly;
|
|
569
|
+
}
|
|
570
|
+
if (message.secure === true) {
|
|
571
|
+
obj.secure = message.secure;
|
|
572
|
+
}
|
|
573
|
+
if (message.signed === true) {
|
|
574
|
+
obj.signed = message.signed;
|
|
575
|
+
}
|
|
576
|
+
if (message.maxAge !== 0) {
|
|
577
|
+
obj.maxAge = Math.round(message.maxAge);
|
|
578
|
+
}
|
|
579
|
+
if (message.path !== "") {
|
|
580
|
+
obj.path = message.path;
|
|
581
|
+
}
|
|
582
|
+
if (message.domain !== "") {
|
|
583
|
+
obj.domain = message.domain;
|
|
584
|
+
}
|
|
585
|
+
if (message.sameSite !== "") {
|
|
586
|
+
obj.sameSite = message.sameSite;
|
|
587
|
+
}
|
|
584
588
|
return obj;
|
|
585
589
|
},
|
|
586
|
-
create
|
|
590
|
+
create(base) {
|
|
587
591
|
return exports.CookieOptions.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
588
592
|
},
|
|
589
|
-
fromPartial
|
|
593
|
+
fromPartial(object) {
|
|
590
594
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
591
|
-
|
|
595
|
+
const message = createBaseCookieOptions();
|
|
592
596
|
message.httpOnly = (_a = object.httpOnly) !== null && _a !== void 0 ? _a : false;
|
|
593
597
|
message.secure = (_b = object.secure) !== null && _b !== void 0 ? _b : false;
|
|
594
598
|
message.signed = (_c = object.signed) !== null && _c !== void 0 ? _c : false;
|
|
@@ -603,8 +607,7 @@ function createBaseSocketRequest() {
|
|
|
603
607
|
return { event: "", socketId: "", params: "", context: "", functionName: "" };
|
|
604
608
|
}
|
|
605
609
|
exports.SocketRequest = {
|
|
606
|
-
encode
|
|
607
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
610
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
608
611
|
if (message.event !== "") {
|
|
609
612
|
writer.uint32(10).string(message.event);
|
|
610
613
|
}
|
|
@@ -622,75 +625,85 @@ exports.SocketRequest = {
|
|
|
622
625
|
}
|
|
623
626
|
return writer;
|
|
624
627
|
},
|
|
625
|
-
decode
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
628
|
+
decode(input, length) {
|
|
629
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
630
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
631
|
+
const message = createBaseSocketRequest();
|
|
629
632
|
while (reader.pos < end) {
|
|
630
|
-
|
|
633
|
+
const tag = reader.uint32();
|
|
631
634
|
switch (tag >>> 3) {
|
|
632
635
|
case 1:
|
|
633
|
-
if (tag
|
|
636
|
+
if (tag !== 10) {
|
|
634
637
|
break;
|
|
635
638
|
}
|
|
636
639
|
message.event = reader.string();
|
|
637
640
|
continue;
|
|
638
641
|
case 2:
|
|
639
|
-
if (tag
|
|
642
|
+
if (tag !== 18) {
|
|
640
643
|
break;
|
|
641
644
|
}
|
|
642
645
|
message.socketId = reader.string();
|
|
643
646
|
continue;
|
|
644
647
|
case 3:
|
|
645
|
-
if (tag
|
|
648
|
+
if (tag !== 26) {
|
|
646
649
|
break;
|
|
647
650
|
}
|
|
648
651
|
message.params = reader.string();
|
|
649
652
|
continue;
|
|
650
653
|
case 4:
|
|
651
|
-
if (tag
|
|
654
|
+
if (tag !== 34) {
|
|
652
655
|
break;
|
|
653
656
|
}
|
|
654
657
|
message.context = reader.string();
|
|
655
658
|
continue;
|
|
656
659
|
case 5:
|
|
657
|
-
if (tag
|
|
660
|
+
if (tag !== 42) {
|
|
658
661
|
break;
|
|
659
662
|
}
|
|
660
663
|
message.functionName = reader.string();
|
|
661
664
|
continue;
|
|
662
665
|
}
|
|
663
|
-
if ((tag & 7)
|
|
666
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
664
667
|
break;
|
|
665
668
|
}
|
|
666
669
|
reader.skipType(tag & 7);
|
|
667
670
|
}
|
|
668
671
|
return message;
|
|
669
672
|
},
|
|
670
|
-
fromJSON
|
|
673
|
+
fromJSON(object) {
|
|
671
674
|
return {
|
|
672
|
-
event: isSet(object.event) ? String(object.event) : "",
|
|
673
|
-
socketId: isSet(object.socketId) ? String(object.socketId) : "",
|
|
674
|
-
params: isSet(object.params) ? String(object.params) : "",
|
|
675
|
-
context: isSet(object.context) ? String(object.context) : "",
|
|
676
|
-
functionName: isSet(object.functionName) ? String(object.functionName) : "",
|
|
675
|
+
event: isSet(object.event) ? globalThis.String(object.event) : "",
|
|
676
|
+
socketId: isSet(object.socketId) ? globalThis.String(object.socketId) : "",
|
|
677
|
+
params: isSet(object.params) ? globalThis.String(object.params) : "",
|
|
678
|
+
context: isSet(object.context) ? globalThis.String(object.context) : "",
|
|
679
|
+
functionName: isSet(object.functionName) ? globalThis.String(object.functionName) : "",
|
|
677
680
|
};
|
|
678
681
|
},
|
|
679
|
-
toJSON
|
|
680
|
-
|
|
681
|
-
message.event !==
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
message.
|
|
685
|
-
|
|
682
|
+
toJSON(message) {
|
|
683
|
+
const obj = {};
|
|
684
|
+
if (message.event !== "") {
|
|
685
|
+
obj.event = message.event;
|
|
686
|
+
}
|
|
687
|
+
if (message.socketId !== "") {
|
|
688
|
+
obj.socketId = message.socketId;
|
|
689
|
+
}
|
|
690
|
+
if (message.params !== "") {
|
|
691
|
+
obj.params = message.params;
|
|
692
|
+
}
|
|
693
|
+
if (message.context !== "") {
|
|
694
|
+
obj.context = message.context;
|
|
695
|
+
}
|
|
696
|
+
if (message.functionName !== "") {
|
|
697
|
+
obj.functionName = message.functionName;
|
|
698
|
+
}
|
|
686
699
|
return obj;
|
|
687
700
|
},
|
|
688
|
-
create
|
|
701
|
+
create(base) {
|
|
689
702
|
return exports.SocketRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
690
703
|
},
|
|
691
|
-
fromPartial
|
|
704
|
+
fromPartial(object) {
|
|
692
705
|
var _a, _b, _c, _d, _e;
|
|
693
|
-
|
|
706
|
+
const message = createBaseSocketRequest();
|
|
694
707
|
message.event = (_a = object.event) !== null && _a !== void 0 ? _a : "";
|
|
695
708
|
message.socketId = (_b = object.socketId) !== null && _b !== void 0 ? _b : "";
|
|
696
709
|
message.params = (_c = object.params) !== null && _c !== void 0 ? _c : "";
|
|
@@ -703,118 +716,97 @@ function createBaseSocketResponse() {
|
|
|
703
716
|
return { event: "", data: "", receivers: [], rooms: [] };
|
|
704
717
|
}
|
|
705
718
|
exports.SocketResponse = {
|
|
706
|
-
encode
|
|
707
|
-
var e_3, _a, e_4, _b;
|
|
708
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
719
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
709
720
|
if (message.event !== "") {
|
|
710
721
|
writer.uint32(10).string(message.event);
|
|
711
722
|
}
|
|
712
723
|
if (message.data !== "") {
|
|
713
724
|
writer.uint32(18).string(message.data);
|
|
714
725
|
}
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
var v = _d.value;
|
|
718
|
-
writer.uint32(26).string(v);
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
722
|
-
finally {
|
|
723
|
-
try {
|
|
724
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
725
|
-
}
|
|
726
|
-
finally { if (e_3) throw e_3.error; }
|
|
726
|
+
for (const v of message.receivers) {
|
|
727
|
+
writer.uint32(26).string(v);
|
|
727
728
|
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
var v = _f.value;
|
|
731
|
-
writer.uint32(34).string(v);
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
735
|
-
finally {
|
|
736
|
-
try {
|
|
737
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
738
|
-
}
|
|
739
|
-
finally { if (e_4) throw e_4.error; }
|
|
729
|
+
for (const v of message.rooms) {
|
|
730
|
+
writer.uint32(34).string(v);
|
|
740
731
|
}
|
|
741
732
|
return writer;
|
|
742
733
|
},
|
|
743
|
-
decode
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
734
|
+
decode(input, length) {
|
|
735
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
736
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
737
|
+
const message = createBaseSocketResponse();
|
|
747
738
|
while (reader.pos < end) {
|
|
748
|
-
|
|
739
|
+
const tag = reader.uint32();
|
|
749
740
|
switch (tag >>> 3) {
|
|
750
741
|
case 1:
|
|
751
|
-
if (tag
|
|
742
|
+
if (tag !== 10) {
|
|
752
743
|
break;
|
|
753
744
|
}
|
|
754
745
|
message.event = reader.string();
|
|
755
746
|
continue;
|
|
756
747
|
case 2:
|
|
757
|
-
if (tag
|
|
748
|
+
if (tag !== 18) {
|
|
758
749
|
break;
|
|
759
750
|
}
|
|
760
751
|
message.data = reader.string();
|
|
761
752
|
continue;
|
|
762
753
|
case 3:
|
|
763
|
-
if (tag
|
|
754
|
+
if (tag !== 26) {
|
|
764
755
|
break;
|
|
765
756
|
}
|
|
766
757
|
message.receivers.push(reader.string());
|
|
767
758
|
continue;
|
|
768
759
|
case 4:
|
|
769
|
-
if (tag
|
|
760
|
+
if (tag !== 34) {
|
|
770
761
|
break;
|
|
771
762
|
}
|
|
772
763
|
message.rooms.push(reader.string());
|
|
773
764
|
continue;
|
|
774
765
|
}
|
|
775
|
-
if ((tag & 7)
|
|
766
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
776
767
|
break;
|
|
777
768
|
}
|
|
778
769
|
reader.skipType(tag & 7);
|
|
779
770
|
}
|
|
780
771
|
return message;
|
|
781
772
|
},
|
|
782
|
-
fromJSON
|
|
773
|
+
fromJSON(object) {
|
|
783
774
|
return {
|
|
784
|
-
event: isSet(object.event) ? String(object.event) : "",
|
|
785
|
-
data: isSet(object.data) ? String(object.data) : "",
|
|
786
|
-
receivers: Array.isArray(object === null || object === void 0 ? void 0 : object.receivers)
|
|
787
|
-
|
|
775
|
+
event: isSet(object.event) ? globalThis.String(object.event) : "",
|
|
776
|
+
data: isSet(object.data) ? globalThis.String(object.data) : "",
|
|
777
|
+
receivers: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.receivers)
|
|
778
|
+
? object.receivers.map((e) => globalThis.String(e))
|
|
779
|
+
: [],
|
|
780
|
+
rooms: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.rooms) ? object.rooms.map((e) => globalThis.String(e)) : [],
|
|
788
781
|
};
|
|
789
782
|
},
|
|
790
|
-
toJSON
|
|
791
|
-
var
|
|
792
|
-
|
|
793
|
-
message.
|
|
794
|
-
|
|
795
|
-
obj.receivers = message.receivers.map(function (e) { return e; });
|
|
783
|
+
toJSON(message) {
|
|
784
|
+
var _a, _b;
|
|
785
|
+
const obj = {};
|
|
786
|
+
if (message.event !== "") {
|
|
787
|
+
obj.event = message.event;
|
|
796
788
|
}
|
|
797
|
-
|
|
798
|
-
obj.
|
|
789
|
+
if (message.data !== "") {
|
|
790
|
+
obj.data = message.data;
|
|
799
791
|
}
|
|
800
|
-
if (message.
|
|
801
|
-
obj.
|
|
792
|
+
if ((_a = message.receivers) === null || _a === void 0 ? void 0 : _a.length) {
|
|
793
|
+
obj.receivers = message.receivers;
|
|
802
794
|
}
|
|
803
|
-
|
|
804
|
-
obj.rooms =
|
|
795
|
+
if ((_b = message.rooms) === null || _b === void 0 ? void 0 : _b.length) {
|
|
796
|
+
obj.rooms = message.rooms;
|
|
805
797
|
}
|
|
806
798
|
return obj;
|
|
807
799
|
},
|
|
808
|
-
create
|
|
800
|
+
create(base) {
|
|
809
801
|
return exports.SocketResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
810
802
|
},
|
|
811
|
-
fromPartial
|
|
803
|
+
fromPartial(object) {
|
|
812
804
|
var _a, _b, _c, _d;
|
|
813
|
-
|
|
805
|
+
const message = createBaseSocketResponse();
|
|
814
806
|
message.event = (_a = object.event) !== null && _a !== void 0 ? _a : "";
|
|
815
807
|
message.data = (_b = object.data) !== null && _b !== void 0 ? _b : "";
|
|
816
|
-
message.receivers = ((_c = object.receivers) === null || _c === void 0 ? void 0 : _c.map(
|
|
817
|
-
message.rooms = ((_d = object.rooms) === null || _d === void 0 ? void 0 : _d.map(
|
|
808
|
+
message.receivers = ((_c = object.receivers) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
|
|
809
|
+
message.rooms = ((_d = object.rooms) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || [];
|
|
818
810
|
return message;
|
|
819
811
|
},
|
|
820
812
|
};
|