@conduitplatform/grpc-sdk 0.15.18 → 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 +165 -146
- package/dist/protoUtils/authentication.js.map +1 -1
- package/dist/protoUtils/authorization.d.ts +1 -1
- package/dist/protoUtils/authorization.js +292 -351
- package/dist/protoUtils/authorization.js.map +1 -1
- package/dist/protoUtils/chat.d.ts +1 -1
- package/dist/protoUtils/chat.js +156 -192
- package/dist/protoUtils/chat.js.map +1 -1
- package/dist/protoUtils/core.d.ts +1 -1
- package/dist/protoUtils/core.js +555 -517
- package/dist/protoUtils/core.js.map +1 -1
- package/dist/protoUtils/database.d.ts +1 -1
- package/dist/protoUtils/database.js +485 -476
- package/dist/protoUtils/database.js.map +1 -1
- package/dist/protoUtils/email.d.ts +1 -1
- package/dist/protoUtils/email.js +157 -185
- package/dist/protoUtils/email.js.map +1 -1
- package/dist/protoUtils/forms.d.ts +1 -1
- package/dist/protoUtils/forms.js +33 -31
- package/dist/protoUtils/forms.js.map +1 -1
- package/dist/protoUtils/functions.d.ts +1 -1
- package/dist/protoUtils/functions.js +33 -31
- 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 +32 -30
- 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 +220 -240
- package/dist/protoUtils/push-notifications.js.map +1 -1
- package/dist/protoUtils/router.d.ts +1 -1
- package/dist/protoUtils/router.js +326 -332
- package/dist/protoUtils/router.js.map +1 -1
- package/dist/protoUtils/sms.d.ts +1 -1
- package/dist/protoUtils/sms.js +137 -125
- package/dist/protoUtils/sms.js.map +1 -1
- package/dist/protoUtils/storage.d.ts +1 -1
- package/dist/protoUtils/storage.js +165 -139
- package/dist/protoUtils/storage.js.map +1 -1
- package/dist/routing/ConduitRouteReturn.js +9 -18
- package/dist/routing/ConduitRouteReturn.js.map +1 -1
- package/dist/routing/ProxyRouteBuilder.js +21 -24
- package/dist/routing/ProxyRouteBuilder.js.map +1 -1
- package/dist/routing/RouteBuilder.js +31 -34
- package/dist/routing/RouteBuilder.js.map +1 -1
- package/dist/routing/RoutingManager.js +65 -115
- package/dist/routing/RoutingManager.js.map +1 -1
- package/dist/routing/RoutingUtilities.js +3 -3
- package/dist/routing/RoutingUtilities.js.map +1 -1
- package/dist/routing/wrapRouterFunctions.js +25 -34
- package/dist/routing/wrapRouterFunctions.js.map +1 -1
- package/dist/types/index.js +6 -24
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/EventBus.js +16 -17
- package/dist/utilities/EventBus.js.map +1 -1
- package/dist/utilities/Logger.js +80 -180
- package/dist/utilities/Logger.js.map +1 -1
- package/dist/utilities/RedisManager.js +11 -21
- package/dist/utilities/RedisManager.js.map +1 -1
- package/dist/utilities/StateManager.js +13 -14
- package/dist/utilities/StateManager.js.map +1 -1
- package/dist/utilities/linearBackoffTimeout.js +28 -92
- package/dist/utilities/linearBackoffTimeout.js.map +1 -1
- package/dist/utilities/merge.js +2 -2
- package/dist/utilities/merge.js.map +1 -1
- package/dist/utilities/sleep.js +1 -1
- package/dist/utilities/sleep.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,40 +1,28 @@
|
|
|
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.PushNotificationsDefinition = exports.SendNotificationResponse = exports.SendManyNotificationsRequest = exports.SendNotificationToManyDevicesRequest = exports.SendNotificationRequest = exports.GetNotificationTokensResponse = exports.GetNotificationTokensRequest = exports.SetNotificationTokenResponse = exports.SetNotificationTokenRequest = 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 = "pushnotifications";
|
|
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
28
|
if (tag !== 10) {
|
|
@@ -50,20 +38,22 @@ exports.SetConfigRequest = {
|
|
|
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,19 +62,18 @@ 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
79
|
if (tag !== 10) {
|
|
@@ -100,20 +89,22 @@ exports.SetConfigResponse = {
|
|
|
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,8 +113,7 @@ function createBaseSetNotificationTokenRequest() {
|
|
|
122
113
|
return { token: "", platform: "", userId: "" };
|
|
123
114
|
}
|
|
124
115
|
exports.SetNotificationTokenRequest = {
|
|
125
|
-
encode
|
|
126
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
116
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
127
117
|
if (message.token !== "") {
|
|
128
118
|
writer.uint32(10).string(message.token);
|
|
129
119
|
}
|
|
@@ -135,12 +125,12 @@ exports.SetNotificationTokenRequest = {
|
|
|
135
125
|
}
|
|
136
126
|
return writer;
|
|
137
127
|
},
|
|
138
|
-
decode
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
decode(input, length) {
|
|
129
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
130
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
131
|
+
const message = createBaseSetNotificationTokenRequest();
|
|
142
132
|
while (reader.pos < end) {
|
|
143
|
-
|
|
133
|
+
const tag = reader.uint32();
|
|
144
134
|
switch (tag >>> 3) {
|
|
145
135
|
case 1:
|
|
146
136
|
if (tag !== 10) {
|
|
@@ -168,26 +158,32 @@ exports.SetNotificationTokenRequest = {
|
|
|
168
158
|
}
|
|
169
159
|
return message;
|
|
170
160
|
},
|
|
171
|
-
fromJSON
|
|
161
|
+
fromJSON(object) {
|
|
172
162
|
return {
|
|
173
|
-
token: isSet(object.token) ? String(object.token) : "",
|
|
174
|
-
platform: isSet(object.platform) ? String(object.platform) : "",
|
|
175
|
-
userId: isSet(object.userId) ? String(object.userId) : "",
|
|
163
|
+
token: isSet(object.token) ? globalThis.String(object.token) : "",
|
|
164
|
+
platform: isSet(object.platform) ? globalThis.String(object.platform) : "",
|
|
165
|
+
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
|
|
176
166
|
};
|
|
177
167
|
},
|
|
178
|
-
toJSON
|
|
179
|
-
|
|
180
|
-
message.token !==
|
|
181
|
-
|
|
182
|
-
|
|
168
|
+
toJSON(message) {
|
|
169
|
+
const obj = {};
|
|
170
|
+
if (message.token !== "") {
|
|
171
|
+
obj.token = message.token;
|
|
172
|
+
}
|
|
173
|
+
if (message.platform !== "") {
|
|
174
|
+
obj.platform = message.platform;
|
|
175
|
+
}
|
|
176
|
+
if (message.userId !== "") {
|
|
177
|
+
obj.userId = message.userId;
|
|
178
|
+
}
|
|
183
179
|
return obj;
|
|
184
180
|
},
|
|
185
|
-
create
|
|
181
|
+
create(base) {
|
|
186
182
|
return exports.SetNotificationTokenRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
187
183
|
},
|
|
188
|
-
fromPartial
|
|
184
|
+
fromPartial(object) {
|
|
189
185
|
var _a, _b, _c;
|
|
190
|
-
|
|
186
|
+
const message = createBaseSetNotificationTokenRequest();
|
|
191
187
|
message.token = (_a = object.token) !== null && _a !== void 0 ? _a : "";
|
|
192
188
|
message.platform = (_b = object.platform) !== null && _b !== void 0 ? _b : "";
|
|
193
189
|
message.userId = (_c = object.userId) !== null && _c !== void 0 ? _c : "";
|
|
@@ -198,19 +194,18 @@ function createBaseSetNotificationTokenResponse() {
|
|
|
198
194
|
return { newTokenDocument: "" };
|
|
199
195
|
}
|
|
200
196
|
exports.SetNotificationTokenResponse = {
|
|
201
|
-
encode
|
|
202
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
197
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
203
198
|
if (message.newTokenDocument !== "") {
|
|
204
199
|
writer.uint32(10).string(message.newTokenDocument);
|
|
205
200
|
}
|
|
206
201
|
return writer;
|
|
207
202
|
},
|
|
208
|
-
decode
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
203
|
+
decode(input, length) {
|
|
204
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
205
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
206
|
+
const message = createBaseSetNotificationTokenResponse();
|
|
212
207
|
while (reader.pos < end) {
|
|
213
|
-
|
|
208
|
+
const tag = reader.uint32();
|
|
214
209
|
switch (tag >>> 3) {
|
|
215
210
|
case 1:
|
|
216
211
|
if (tag !== 10) {
|
|
@@ -226,20 +221,22 @@ exports.SetNotificationTokenResponse = {
|
|
|
226
221
|
}
|
|
227
222
|
return message;
|
|
228
223
|
},
|
|
229
|
-
fromJSON
|
|
230
|
-
return { newTokenDocument: isSet(object.newTokenDocument) ? String(object.newTokenDocument) : "" };
|
|
224
|
+
fromJSON(object) {
|
|
225
|
+
return { newTokenDocument: isSet(object.newTokenDocument) ? globalThis.String(object.newTokenDocument) : "" };
|
|
231
226
|
},
|
|
232
|
-
toJSON
|
|
233
|
-
|
|
234
|
-
message.newTokenDocument !==
|
|
227
|
+
toJSON(message) {
|
|
228
|
+
const obj = {};
|
|
229
|
+
if (message.newTokenDocument !== "") {
|
|
230
|
+
obj.newTokenDocument = message.newTokenDocument;
|
|
231
|
+
}
|
|
235
232
|
return obj;
|
|
236
233
|
},
|
|
237
|
-
create
|
|
234
|
+
create(base) {
|
|
238
235
|
return exports.SetNotificationTokenResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
239
236
|
},
|
|
240
|
-
fromPartial
|
|
237
|
+
fromPartial(object) {
|
|
241
238
|
var _a;
|
|
242
|
-
|
|
239
|
+
const message = createBaseSetNotificationTokenResponse();
|
|
243
240
|
message.newTokenDocument = (_a = object.newTokenDocument) !== null && _a !== void 0 ? _a : "";
|
|
244
241
|
return message;
|
|
245
242
|
},
|
|
@@ -248,19 +245,18 @@ function createBaseGetNotificationTokensRequest() {
|
|
|
248
245
|
return { userId: "" };
|
|
249
246
|
}
|
|
250
247
|
exports.GetNotificationTokensRequest = {
|
|
251
|
-
encode
|
|
252
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
248
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
253
249
|
if (message.userId !== "") {
|
|
254
250
|
writer.uint32(10).string(message.userId);
|
|
255
251
|
}
|
|
256
252
|
return writer;
|
|
257
253
|
},
|
|
258
|
-
decode
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
254
|
+
decode(input, length) {
|
|
255
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
256
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
257
|
+
const message = createBaseGetNotificationTokensRequest();
|
|
262
258
|
while (reader.pos < end) {
|
|
263
|
-
|
|
259
|
+
const tag = reader.uint32();
|
|
264
260
|
switch (tag >>> 3) {
|
|
265
261
|
case 1:
|
|
266
262
|
if (tag !== 10) {
|
|
@@ -276,20 +272,22 @@ exports.GetNotificationTokensRequest = {
|
|
|
276
272
|
}
|
|
277
273
|
return message;
|
|
278
274
|
},
|
|
279
|
-
fromJSON
|
|
280
|
-
return { userId: isSet(object.userId) ? String(object.userId) : "" };
|
|
275
|
+
fromJSON(object) {
|
|
276
|
+
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
|
|
281
277
|
},
|
|
282
|
-
toJSON
|
|
283
|
-
|
|
284
|
-
message.userId !==
|
|
278
|
+
toJSON(message) {
|
|
279
|
+
const obj = {};
|
|
280
|
+
if (message.userId !== "") {
|
|
281
|
+
obj.userId = message.userId;
|
|
282
|
+
}
|
|
285
283
|
return obj;
|
|
286
284
|
},
|
|
287
|
-
create
|
|
285
|
+
create(base) {
|
|
288
286
|
return exports.GetNotificationTokensRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
289
287
|
},
|
|
290
|
-
fromPartial
|
|
288
|
+
fromPartial(object) {
|
|
291
289
|
var _a;
|
|
292
|
-
|
|
290
|
+
const message = createBaseGetNotificationTokensRequest();
|
|
293
291
|
message.userId = (_a = object.userId) !== null && _a !== void 0 ? _a : "";
|
|
294
292
|
return message;
|
|
295
293
|
},
|
|
@@ -298,30 +296,18 @@ function createBaseGetNotificationTokensResponse() {
|
|
|
298
296
|
return { tokenDocuments: [] };
|
|
299
297
|
}
|
|
300
298
|
exports.GetNotificationTokensResponse = {
|
|
301
|
-
encode
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
try {
|
|
305
|
-
for (var _b = __values(message.tokenDocuments), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
306
|
-
var v = _c.value;
|
|
307
|
-
writer.uint32(10).string(v);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
311
|
-
finally {
|
|
312
|
-
try {
|
|
313
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
314
|
-
}
|
|
315
|
-
finally { if (e_1) throw e_1.error; }
|
|
299
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
300
|
+
for (const v of message.tokenDocuments) {
|
|
301
|
+
writer.uint32(10).string(v);
|
|
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 = createBaseGetNotificationTokensResponse();
|
|
323
309
|
while (reader.pos < end) {
|
|
324
|
-
|
|
310
|
+
const tag = reader.uint32();
|
|
325
311
|
switch (tag >>> 3) {
|
|
326
312
|
case 1:
|
|
327
313
|
if (tag !== 10) {
|
|
@@ -337,28 +323,28 @@ exports.GetNotificationTokensResponse = {
|
|
|
337
323
|
}
|
|
338
324
|
return message;
|
|
339
325
|
},
|
|
340
|
-
fromJSON
|
|
326
|
+
fromJSON(object) {
|
|
341
327
|
return {
|
|
342
|
-
tokenDocuments: Array.isArray(object === null || object === void 0 ? void 0 : object.tokenDocuments)
|
|
328
|
+
tokenDocuments: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.tokenDocuments)
|
|
329
|
+
? object.tokenDocuments.map((e) => globalThis.String(e))
|
|
330
|
+
: [],
|
|
343
331
|
};
|
|
344
332
|
},
|
|
345
|
-
toJSON
|
|
346
|
-
var
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
else {
|
|
351
|
-
obj.tokenDocuments = [];
|
|
333
|
+
toJSON(message) {
|
|
334
|
+
var _a;
|
|
335
|
+
const obj = {};
|
|
336
|
+
if ((_a = message.tokenDocuments) === null || _a === void 0 ? void 0 : _a.length) {
|
|
337
|
+
obj.tokenDocuments = message.tokenDocuments;
|
|
352
338
|
}
|
|
353
339
|
return obj;
|
|
354
340
|
},
|
|
355
|
-
create
|
|
341
|
+
create(base) {
|
|
356
342
|
return exports.GetNotificationTokensResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
357
343
|
},
|
|
358
|
-
fromPartial
|
|
344
|
+
fromPartial(object) {
|
|
359
345
|
var _a;
|
|
360
|
-
|
|
361
|
-
message.tokenDocuments = ((_a = object.tokenDocuments) === null || _a === void 0 ? void 0 : _a.map(
|
|
346
|
+
const message = createBaseGetNotificationTokensResponse();
|
|
347
|
+
message.tokenDocuments = ((_a = object.tokenDocuments) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
362
348
|
return message;
|
|
363
349
|
},
|
|
364
350
|
};
|
|
@@ -366,8 +352,7 @@ function createBaseSendNotificationRequest() {
|
|
|
366
352
|
return { sendTo: "", title: "", platform: undefined, body: undefined, data: undefined, doNotStore: undefined };
|
|
367
353
|
}
|
|
368
354
|
exports.SendNotificationRequest = {
|
|
369
|
-
encode
|
|
370
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
355
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
371
356
|
if (message.sendTo !== "") {
|
|
372
357
|
writer.uint32(10).string(message.sendTo);
|
|
373
358
|
}
|
|
@@ -388,12 +373,12 @@ exports.SendNotificationRequest = {
|
|
|
388
373
|
}
|
|
389
374
|
return writer;
|
|
390
375
|
},
|
|
391
|
-
decode
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
376
|
+
decode(input, length) {
|
|
377
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
378
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
379
|
+
const message = createBaseSendNotificationRequest();
|
|
395
380
|
while (reader.pos < end) {
|
|
396
|
-
|
|
381
|
+
const tag = reader.uint32();
|
|
397
382
|
switch (tag >>> 3) {
|
|
398
383
|
case 1:
|
|
399
384
|
if (tag !== 10) {
|
|
@@ -439,32 +424,44 @@ exports.SendNotificationRequest = {
|
|
|
439
424
|
}
|
|
440
425
|
return message;
|
|
441
426
|
},
|
|
442
|
-
fromJSON
|
|
427
|
+
fromJSON(object) {
|
|
443
428
|
return {
|
|
444
|
-
sendTo: isSet(object.sendTo) ? String(object.sendTo) : "",
|
|
445
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
446
|
-
platform: isSet(object.platform) ? String(object.platform) : undefined,
|
|
447
|
-
body: isSet(object.body) ? String(object.body) : undefined,
|
|
448
|
-
data: isSet(object.data) ? String(object.data) : undefined,
|
|
449
|
-
doNotStore: isSet(object.doNotStore) ? Boolean(object.doNotStore) : undefined,
|
|
429
|
+
sendTo: isSet(object.sendTo) ? globalThis.String(object.sendTo) : "",
|
|
430
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
431
|
+
platform: isSet(object.platform) ? globalThis.String(object.platform) : undefined,
|
|
432
|
+
body: isSet(object.body) ? globalThis.String(object.body) : undefined,
|
|
433
|
+
data: isSet(object.data) ? globalThis.String(object.data) : undefined,
|
|
434
|
+
doNotStore: isSet(object.doNotStore) ? globalThis.Boolean(object.doNotStore) : undefined,
|
|
450
435
|
};
|
|
451
436
|
},
|
|
452
|
-
toJSON
|
|
453
|
-
|
|
454
|
-
message.sendTo !==
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
message.
|
|
458
|
-
|
|
459
|
-
|
|
437
|
+
toJSON(message) {
|
|
438
|
+
const obj = {};
|
|
439
|
+
if (message.sendTo !== "") {
|
|
440
|
+
obj.sendTo = message.sendTo;
|
|
441
|
+
}
|
|
442
|
+
if (message.title !== "") {
|
|
443
|
+
obj.title = message.title;
|
|
444
|
+
}
|
|
445
|
+
if (message.platform !== undefined) {
|
|
446
|
+
obj.platform = message.platform;
|
|
447
|
+
}
|
|
448
|
+
if (message.body !== undefined) {
|
|
449
|
+
obj.body = message.body;
|
|
450
|
+
}
|
|
451
|
+
if (message.data !== undefined) {
|
|
452
|
+
obj.data = message.data;
|
|
453
|
+
}
|
|
454
|
+
if (message.doNotStore !== undefined) {
|
|
455
|
+
obj.doNotStore = message.doNotStore;
|
|
456
|
+
}
|
|
460
457
|
return obj;
|
|
461
458
|
},
|
|
462
|
-
create
|
|
459
|
+
create(base) {
|
|
463
460
|
return exports.SendNotificationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
464
461
|
},
|
|
465
|
-
fromPartial
|
|
462
|
+
fromPartial(object) {
|
|
466
463
|
var _a, _b, _c, _d, _e, _f;
|
|
467
|
-
|
|
464
|
+
const message = createBaseSendNotificationRequest();
|
|
468
465
|
message.sendTo = (_a = object.sendTo) !== null && _a !== void 0 ? _a : "";
|
|
469
466
|
message.title = (_b = object.title) !== null && _b !== void 0 ? _b : "";
|
|
470
467
|
message.platform = (_c = object.platform) !== null && _c !== void 0 ? _c : undefined;
|
|
@@ -478,21 +475,9 @@ function createBaseSendNotificationToManyDevicesRequest() {
|
|
|
478
475
|
return { sendTo: [], title: "", body: undefined, data: undefined, platform: undefined, doNotStore: undefined };
|
|
479
476
|
}
|
|
480
477
|
exports.SendNotificationToManyDevicesRequest = {
|
|
481
|
-
encode
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
try {
|
|
485
|
-
for (var _b = __values(message.sendTo), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
486
|
-
var v = _c.value;
|
|
487
|
-
writer.uint32(10).string(v);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
491
|
-
finally {
|
|
492
|
-
try {
|
|
493
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
494
|
-
}
|
|
495
|
-
finally { if (e_2) throw e_2.error; }
|
|
478
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
479
|
+
for (const v of message.sendTo) {
|
|
480
|
+
writer.uint32(10).string(v);
|
|
496
481
|
}
|
|
497
482
|
if (message.title !== "") {
|
|
498
483
|
writer.uint32(18).string(message.title);
|
|
@@ -511,12 +496,12 @@ exports.SendNotificationToManyDevicesRequest = {
|
|
|
511
496
|
}
|
|
512
497
|
return writer;
|
|
513
498
|
},
|
|
514
|
-
decode
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
499
|
+
decode(input, length) {
|
|
500
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
501
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
502
|
+
const message = createBaseSendNotificationToManyDevicesRequest();
|
|
518
503
|
while (reader.pos < end) {
|
|
519
|
-
|
|
504
|
+
const tag = reader.uint32();
|
|
520
505
|
switch (tag >>> 3) {
|
|
521
506
|
case 1:
|
|
522
507
|
if (tag !== 10) {
|
|
@@ -562,38 +547,46 @@ exports.SendNotificationToManyDevicesRequest = {
|
|
|
562
547
|
}
|
|
563
548
|
return message;
|
|
564
549
|
},
|
|
565
|
-
fromJSON
|
|
550
|
+
fromJSON(object) {
|
|
566
551
|
return {
|
|
567
|
-
sendTo: Array.isArray(object === null || object === void 0 ? void 0 : object.sendTo) ? object.sendTo.map(
|
|
568
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
569
|
-
body: isSet(object.body) ? String(object.body) : undefined,
|
|
570
|
-
data: isSet(object.data) ? String(object.data) : undefined,
|
|
571
|
-
platform: isSet(object.platform) ? String(object.platform) : undefined,
|
|
572
|
-
doNotStore: isSet(object.doNotStore) ? Boolean(object.doNotStore) : undefined,
|
|
552
|
+
sendTo: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sendTo) ? object.sendTo.map((e) => globalThis.String(e)) : [],
|
|
553
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
554
|
+
body: isSet(object.body) ? globalThis.String(object.body) : undefined,
|
|
555
|
+
data: isSet(object.data) ? globalThis.String(object.data) : undefined,
|
|
556
|
+
platform: isSet(object.platform) ? globalThis.String(object.platform) : undefined,
|
|
557
|
+
doNotStore: isSet(object.doNotStore) ? globalThis.Boolean(object.doNotStore) : undefined,
|
|
573
558
|
};
|
|
574
559
|
},
|
|
575
|
-
toJSON
|
|
576
|
-
var
|
|
577
|
-
|
|
578
|
-
|
|
560
|
+
toJSON(message) {
|
|
561
|
+
var _a;
|
|
562
|
+
const obj = {};
|
|
563
|
+
if ((_a = message.sendTo) === null || _a === void 0 ? void 0 : _a.length) {
|
|
564
|
+
obj.sendTo = message.sendTo;
|
|
565
|
+
}
|
|
566
|
+
if (message.title !== "") {
|
|
567
|
+
obj.title = message.title;
|
|
568
|
+
}
|
|
569
|
+
if (message.body !== undefined) {
|
|
570
|
+
obj.body = message.body;
|
|
571
|
+
}
|
|
572
|
+
if (message.data !== undefined) {
|
|
573
|
+
obj.data = message.data;
|
|
579
574
|
}
|
|
580
|
-
|
|
581
|
-
obj.
|
|
575
|
+
if (message.platform !== undefined) {
|
|
576
|
+
obj.platform = message.platform;
|
|
577
|
+
}
|
|
578
|
+
if (message.doNotStore !== undefined) {
|
|
579
|
+
obj.doNotStore = message.doNotStore;
|
|
582
580
|
}
|
|
583
|
-
message.title !== undefined && (obj.title = message.title);
|
|
584
|
-
message.body !== undefined && (obj.body = message.body);
|
|
585
|
-
message.data !== undefined && (obj.data = message.data);
|
|
586
|
-
message.platform !== undefined && (obj.platform = message.platform);
|
|
587
|
-
message.doNotStore !== undefined && (obj.doNotStore = message.doNotStore);
|
|
588
581
|
return obj;
|
|
589
582
|
},
|
|
590
|
-
create
|
|
583
|
+
create(base) {
|
|
591
584
|
return exports.SendNotificationToManyDevicesRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
592
585
|
},
|
|
593
|
-
fromPartial
|
|
586
|
+
fromPartial(object) {
|
|
594
587
|
var _a, _b, _c, _d, _e, _f;
|
|
595
|
-
|
|
596
|
-
message.sendTo = ((_a = object.sendTo) === null || _a === void 0 ? void 0 : _a.map(
|
|
588
|
+
const message = createBaseSendNotificationToManyDevicesRequest();
|
|
589
|
+
message.sendTo = ((_a = object.sendTo) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
597
590
|
message.title = (_b = object.title) !== null && _b !== void 0 ? _b : "";
|
|
598
591
|
message.body = (_c = object.body) !== null && _c !== void 0 ? _c : undefined;
|
|
599
592
|
message.data = (_d = object.data) !== null && _d !== void 0 ? _d : undefined;
|
|
@@ -606,30 +599,18 @@ function createBaseSendManyNotificationsRequest() {
|
|
|
606
599
|
return { notifications: [] };
|
|
607
600
|
}
|
|
608
601
|
exports.SendManyNotificationsRequest = {
|
|
609
|
-
encode
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
try {
|
|
613
|
-
for (var _b = __values(message.notifications), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
614
|
-
var v = _c.value;
|
|
615
|
-
exports.SendNotificationRequest.encode(v, writer.uint32(10).fork()).ldelim();
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
619
|
-
finally {
|
|
620
|
-
try {
|
|
621
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
622
|
-
}
|
|
623
|
-
finally { if (e_3) throw e_3.error; }
|
|
602
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
603
|
+
for (const v of message.notifications) {
|
|
604
|
+
exports.SendNotificationRequest.encode(v, writer.uint32(10).fork()).ldelim();
|
|
624
605
|
}
|
|
625
606
|
return writer;
|
|
626
607
|
},
|
|
627
|
-
decode
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
608
|
+
decode(input, length) {
|
|
609
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
610
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
611
|
+
const message = createBaseSendManyNotificationsRequest();
|
|
631
612
|
while (reader.pos < end) {
|
|
632
|
-
|
|
613
|
+
const tag = reader.uint32();
|
|
633
614
|
switch (tag >>> 3) {
|
|
634
615
|
case 1:
|
|
635
616
|
if (tag !== 10) {
|
|
@@ -645,30 +626,28 @@ exports.SendManyNotificationsRequest = {
|
|
|
645
626
|
}
|
|
646
627
|
return message;
|
|
647
628
|
},
|
|
648
|
-
fromJSON
|
|
629
|
+
fromJSON(object) {
|
|
649
630
|
return {
|
|
650
|
-
notifications: Array.isArray(object === null || object === void 0 ? void 0 : object.notifications)
|
|
651
|
-
? object.notifications.map(
|
|
631
|
+
notifications: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.notifications)
|
|
632
|
+
? object.notifications.map((e) => exports.SendNotificationRequest.fromJSON(e))
|
|
652
633
|
: [],
|
|
653
634
|
};
|
|
654
635
|
},
|
|
655
|
-
toJSON
|
|
656
|
-
var
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
else {
|
|
661
|
-
obj.notifications = [];
|
|
636
|
+
toJSON(message) {
|
|
637
|
+
var _a;
|
|
638
|
+
const obj = {};
|
|
639
|
+
if ((_a = message.notifications) === null || _a === void 0 ? void 0 : _a.length) {
|
|
640
|
+
obj.notifications = message.notifications.map((e) => exports.SendNotificationRequest.toJSON(e));
|
|
662
641
|
}
|
|
663
642
|
return obj;
|
|
664
643
|
},
|
|
665
|
-
create
|
|
644
|
+
create(base) {
|
|
666
645
|
return exports.SendManyNotificationsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
667
646
|
},
|
|
668
|
-
fromPartial
|
|
647
|
+
fromPartial(object) {
|
|
669
648
|
var _a;
|
|
670
|
-
|
|
671
|
-
message.notifications = ((_a = object.notifications) === null || _a === void 0 ? void 0 : _a.map(
|
|
649
|
+
const message = createBaseSendManyNotificationsRequest();
|
|
650
|
+
message.notifications = ((_a = object.notifications) === null || _a === void 0 ? void 0 : _a.map((e) => exports.SendNotificationRequest.fromPartial(e))) || [];
|
|
672
651
|
return message;
|
|
673
652
|
},
|
|
674
653
|
};
|
|
@@ -676,19 +655,18 @@ function createBaseSendNotificationResponse() {
|
|
|
676
655
|
return { message: "" };
|
|
677
656
|
}
|
|
678
657
|
exports.SendNotificationResponse = {
|
|
679
|
-
encode
|
|
680
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
658
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
681
659
|
if (message.message !== "") {
|
|
682
660
|
writer.uint32(10).string(message.message);
|
|
683
661
|
}
|
|
684
662
|
return writer;
|
|
685
663
|
},
|
|
686
|
-
decode
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
664
|
+
decode(input, length) {
|
|
665
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
666
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
667
|
+
const message = createBaseSendNotificationResponse();
|
|
690
668
|
while (reader.pos < end) {
|
|
691
|
-
|
|
669
|
+
const tag = reader.uint32();
|
|
692
670
|
switch (tag >>> 3) {
|
|
693
671
|
case 1:
|
|
694
672
|
if (tag !== 10) {
|
|
@@ -704,20 +682,22 @@ exports.SendNotificationResponse = {
|
|
|
704
682
|
}
|
|
705
683
|
return message;
|
|
706
684
|
},
|
|
707
|
-
fromJSON
|
|
708
|
-
return { message: isSet(object.message) ? String(object.message) : "" };
|
|
685
|
+
fromJSON(object) {
|
|
686
|
+
return { message: isSet(object.message) ? globalThis.String(object.message) : "" };
|
|
709
687
|
},
|
|
710
|
-
toJSON
|
|
711
|
-
|
|
712
|
-
message.message !==
|
|
688
|
+
toJSON(message) {
|
|
689
|
+
const obj = {};
|
|
690
|
+
if (message.message !== "") {
|
|
691
|
+
obj.message = message.message;
|
|
692
|
+
}
|
|
713
693
|
return obj;
|
|
714
694
|
},
|
|
715
|
-
create
|
|
695
|
+
create(base) {
|
|
716
696
|
return exports.SendNotificationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
717
697
|
},
|
|
718
|
-
fromPartial
|
|
698
|
+
fromPartial(object) {
|
|
719
699
|
var _a;
|
|
720
|
-
|
|
700
|
+
const message = createBaseSendNotificationResponse();
|
|
721
701
|
message.message = (_a = object.message) !== null && _a !== void 0 ? _a : "";
|
|
722
702
|
return message;
|
|
723
703
|
},
|