@conduitplatform/grpc-sdk 0.16.0-alpha.6 → 0.16.0-alpha.8

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.
Files changed (74) hide show
  1. package/dist/classes/ConduitModule.d.ts +4 -1
  2. package/dist/classes/ConduitModule.js +9 -0
  3. package/dist/classes/ConduitModule.js.map +1 -1
  4. package/dist/index.d.ts +4 -4
  5. package/dist/index.js +14 -32
  6. package/dist/index.js.map +1 -1
  7. package/dist/module.proto +14 -0
  8. package/dist/modules/admin/index.d.ts +2 -2
  9. package/dist/modules/admin/index.js +3 -3
  10. package/dist/modules/admin/index.js.map +1 -1
  11. package/dist/modules/authorization/index.d.ts +3 -2
  12. package/dist/modules/authorization/index.js +4 -4
  13. package/dist/modules/authorization/index.js.map +1 -1
  14. package/dist/modules/config/index.d.ts +2 -2
  15. package/dist/modules/database/index.d.ts +1 -1
  16. package/dist/modules/index.d.ts +0 -2
  17. package/dist/modules/index.js +0 -2
  18. package/dist/modules/index.js.map +1 -1
  19. package/dist/modules/router/index.d.ts +1 -1
  20. package/dist/protoUtils/authentication.d.ts +2 -62
  21. package/dist/protoUtils/authentication.js +111 -258
  22. package/dist/protoUtils/authentication.js.map +1 -1
  23. package/dist/protoUtils/authorization.d.ts +19 -104
  24. package/dist/protoUtils/authorization.js +198 -439
  25. package/dist/protoUtils/authorization.js.map +1 -1
  26. package/dist/protoUtils/chat.d.ts +5 -70
  27. package/dist/protoUtils/chat.js +106 -272
  28. package/dist/protoUtils/chat.js.map +1 -1
  29. package/dist/protoUtils/core.d.ts +65 -121
  30. package/dist/protoUtils/core.js +427 -666
  31. package/dist/protoUtils/core.js.map +1 -1
  32. package/dist/protoUtils/database.d.ts +16 -82
  33. package/dist/protoUtils/database.js +399 -645
  34. package/dist/protoUtils/database.js.map +1 -1
  35. package/dist/protoUtils/email.d.ts +2 -56
  36. package/dist/protoUtils/email.js +131 -259
  37. package/dist/protoUtils/email.js.map +1 -1
  38. package/dist/protoUtils/google/protobuf/empty.d.ts +24 -0
  39. package/dist/protoUtils/google/protobuf/empty.js +63 -0
  40. package/dist/protoUtils/google/protobuf/empty.js.map +1 -0
  41. package/dist/protoUtils/grpc_health_check.d.ts +2 -9
  42. package/dist/protoUtils/grpc_health_check.js +63 -51
  43. package/dist/protoUtils/grpc_health_check.js.map +1 -1
  44. package/dist/protoUtils/index.d.ts +12 -0
  45. package/dist/protoUtils/index.js +29 -0
  46. package/dist/protoUtils/index.js.map +1 -0
  47. package/dist/protoUtils/{forms.d.ts → module.d.ts} +6 -11
  48. package/dist/protoUtils/{forms.js → module.js} +53 -44
  49. package/dist/protoUtils/module.js.map +1 -0
  50. package/dist/protoUtils/push-notifications.d.ts +2 -65
  51. package/dist/protoUtils/push-notifications.js +160 -311
  52. package/dist/protoUtils/push-notifications.js.map +1 -1
  53. package/dist/protoUtils/router.d.ts +7 -75
  54. package/dist/protoUtils/router.js +217 -466
  55. package/dist/protoUtils/router.js.map +1 -1
  56. package/dist/protoUtils/sms.d.ts +2 -59
  57. package/dist/protoUtils/sms.js +110 -233
  58. package/dist/protoUtils/sms.js.map +1 -1
  59. package/dist/protoUtils/storage.d.ts +2 -80
  60. package/dist/protoUtils/storage.js +211 -443
  61. package/dist/protoUtils/storage.js.map +1 -1
  62. package/dist/types/index.d.ts +0 -6
  63. package/dist/types/index.js.map +1 -1
  64. package/package.json +4 -3
  65. package/dist/modules/forms/index.d.ts +0 -6
  66. package/dist/modules/forms/index.js +0 -32
  67. package/dist/modules/forms/index.js.map +0 -1
  68. package/dist/modules/functions/index.d.ts +0 -6
  69. package/dist/modules/functions/index.js +0 -32
  70. package/dist/modules/functions/index.js.map +0 -1
  71. package/dist/protoUtils/forms.js.map +0 -1
  72. package/dist/protoUtils/functions.d.ts +0 -58
  73. package/dist/protoUtils/functions.js +0 -127
  74. package/dist/protoUtils/functions.js.map +0 -1
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __values = (this && this.__values) || function(o) {
3
26
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4
27
  if (m) return m.call(o);
@@ -10,169 +33,55 @@ var __values = (this && this.__values) || function(o) {
10
33
  };
11
34
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
12
35
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
36
  Object.defineProperty(exports, "__esModule", { value: true });
17
- 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;
37
+ exports.PushNotificationsDefinition = exports.SendNotificationResponse = exports.SendManyNotificationsRequest = exports.SendNotificationToManyDevicesRequest = exports.SendNotificationRequest = exports.GetNotificationTokensResponse = exports.GetNotificationTokensRequest = exports.SetNotificationTokenResponse = exports.SetNotificationTokenRequest = void 0;
18
38
  /* eslint-disable */
19
- var minimal_1 = __importDefault(require("protobufjs/minimal"));
20
- exports.protobufPackage = "pushnotifications";
21
- function createBaseSetConfigRequest() {
22
- return { newConfig: "" };
23
- }
24
- exports.SetConfigRequest = {
25
- encode: function (message, writer) {
26
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
27
- if (message.newConfig !== "") {
28
- writer.uint32(10).string(message.newConfig);
29
- }
30
- return writer;
31
- },
32
- decode: function (input, length) {
33
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
34
- var end = length === undefined ? reader.len : reader.pos + length;
35
- var message = createBaseSetConfigRequest();
36
- while (reader.pos < end) {
37
- var tag = reader.uint32();
38
- switch (tag >>> 3) {
39
- case 1:
40
- if (tag != 10) {
41
- break;
42
- }
43
- message.newConfig = reader.string();
44
- continue;
45
- }
46
- if ((tag & 7) == 4 || tag == 0) {
47
- break;
48
- }
49
- reader.skipType(tag & 7);
50
- }
51
- return message;
52
- },
53
- fromJSON: function (object) {
54
- return { newConfig: isSet(object.newConfig) ? String(object.newConfig) : "" };
55
- },
56
- toJSON: function (message) {
57
- var obj = {};
58
- message.newConfig !== undefined && (obj.newConfig = message.newConfig);
59
- return obj;
60
- },
61
- create: function (base) {
62
- return exports.SetConfigRequest.fromPartial(base !== null && base !== void 0 ? base : {});
63
- },
64
- fromPartial: function (object) {
65
- var _a;
66
- var message = createBaseSetConfigRequest();
67
- message.newConfig = (_a = object.newConfig) !== null && _a !== void 0 ? _a : "";
68
- return message;
69
- },
70
- };
71
- function createBaseSetConfigResponse() {
72
- return { updatedConfig: "" };
73
- }
74
- exports.SetConfigResponse = {
75
- encode: function (message, writer) {
76
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
77
- if (message.updatedConfig !== "") {
78
- writer.uint32(10).string(message.updatedConfig);
79
- }
80
- return writer;
81
- },
82
- decode: function (input, length) {
83
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
84
- var end = length === undefined ? reader.len : reader.pos + length;
85
- var message = createBaseSetConfigResponse();
86
- while (reader.pos < end) {
87
- var tag = reader.uint32();
88
- switch (tag >>> 3) {
89
- case 1:
90
- if (tag != 10) {
91
- break;
92
- }
93
- message.updatedConfig = reader.string();
94
- continue;
95
- }
96
- if ((tag & 7) == 4 || tag == 0) {
97
- break;
98
- }
99
- reader.skipType(tag & 7);
100
- }
101
- return message;
102
- },
103
- fromJSON: function (object) {
104
- return { updatedConfig: isSet(object.updatedConfig) ? String(object.updatedConfig) : "" };
105
- },
106
- toJSON: function (message) {
107
- var obj = {};
108
- message.updatedConfig !== undefined && (obj.updatedConfig = message.updatedConfig);
109
- return obj;
110
- },
111
- create: function (base) {
112
- return exports.SetConfigResponse.fromPartial(base !== null && base !== void 0 ? base : {});
113
- },
114
- fromPartial: function (object) {
115
- var _a;
116
- var message = createBaseSetConfigResponse();
117
- message.updatedConfig = (_a = object.updatedConfig) !== null && _a !== void 0 ? _a : "";
118
- return message;
119
- },
120
- };
39
+ var _m0 = __importStar(require("protobufjs/minimal"));
121
40
  function createBaseSetNotificationTokenRequest() {
122
- return { token: "", platform: "", userId: "" };
41
+ return { token: '', platform: '', userId: '' };
123
42
  }
124
43
  exports.SetNotificationTokenRequest = {
125
44
  encode: function (message, writer) {
126
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
127
- if (message.token !== "") {
45
+ if (writer === void 0) { writer = _m0.Writer.create(); }
46
+ if (message.token !== '') {
128
47
  writer.uint32(10).string(message.token);
129
48
  }
130
- if (message.platform !== "") {
49
+ if (message.platform !== '') {
131
50
  writer.uint32(18).string(message.platform);
132
51
  }
133
- if (message.userId !== "") {
52
+ if (message.userId !== '') {
134
53
  writer.uint32(26).string(message.userId);
135
54
  }
136
55
  return writer;
137
56
  },
138
57
  decode: function (input, length) {
139
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
58
+ var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
140
59
  var end = length === undefined ? reader.len : reader.pos + length;
141
60
  var message = createBaseSetNotificationTokenRequest();
142
61
  while (reader.pos < end) {
143
62
  var tag = reader.uint32();
144
63
  switch (tag >>> 3) {
145
64
  case 1:
146
- if (tag != 10) {
147
- break;
148
- }
149
65
  message.token = reader.string();
150
- continue;
66
+ break;
151
67
  case 2:
152
- if (tag != 18) {
153
- break;
154
- }
155
68
  message.platform = reader.string();
156
- continue;
69
+ break;
157
70
  case 3:
158
- if (tag != 26) {
159
- break;
160
- }
161
71
  message.userId = reader.string();
162
- continue;
72
+ break;
73
+ default:
74
+ reader.skipType(tag & 7);
75
+ break;
163
76
  }
164
- if ((tag & 7) == 4 || tag == 0) {
165
- break;
166
- }
167
- reader.skipType(tag & 7);
168
77
  }
169
78
  return message;
170
79
  },
171
80
  fromJSON: function (object) {
172
81
  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) : "",
82
+ token: isSet(object.token) ? String(object.token) : '',
83
+ platform: isSet(object.platform) ? String(object.platform) : '',
84
+ userId: isSet(object.userId) ? String(object.userId) : '',
176
85
  };
177
86
  },
178
87
  toJSON: function (message) {
@@ -182,115 +91,105 @@ exports.SetNotificationTokenRequest = {
182
91
  message.userId !== undefined && (obj.userId = message.userId);
183
92
  return obj;
184
93
  },
185
- create: function (base) {
186
- return exports.SetNotificationTokenRequest.fromPartial(base !== null && base !== void 0 ? base : {});
187
- },
188
94
  fromPartial: function (object) {
189
95
  var _a, _b, _c;
190
96
  var message = createBaseSetNotificationTokenRequest();
191
- message.token = (_a = object.token) !== null && _a !== void 0 ? _a : "";
192
- message.platform = (_b = object.platform) !== null && _b !== void 0 ? _b : "";
193
- message.userId = (_c = object.userId) !== null && _c !== void 0 ? _c : "";
97
+ message.token = (_a = object.token) !== null && _a !== void 0 ? _a : '';
98
+ message.platform = (_b = object.platform) !== null && _b !== void 0 ? _b : '';
99
+ message.userId = (_c = object.userId) !== null && _c !== void 0 ? _c : '';
194
100
  return message;
195
101
  },
196
102
  };
197
103
  function createBaseSetNotificationTokenResponse() {
198
- return { newTokenDocument: "" };
104
+ return { newTokenDocument: '' };
199
105
  }
200
106
  exports.SetNotificationTokenResponse = {
201
107
  encode: function (message, writer) {
202
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
203
- if (message.newTokenDocument !== "") {
108
+ if (writer === void 0) { writer = _m0.Writer.create(); }
109
+ if (message.newTokenDocument !== '') {
204
110
  writer.uint32(10).string(message.newTokenDocument);
205
111
  }
206
112
  return writer;
207
113
  },
208
114
  decode: function (input, length) {
209
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
115
+ var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
210
116
  var end = length === undefined ? reader.len : reader.pos + length;
211
117
  var message = createBaseSetNotificationTokenResponse();
212
118
  while (reader.pos < end) {
213
119
  var tag = reader.uint32();
214
120
  switch (tag >>> 3) {
215
121
  case 1:
216
- if (tag != 10) {
217
- break;
218
- }
219
122
  message.newTokenDocument = reader.string();
220
- continue;
221
- }
222
- if ((tag & 7) == 4 || tag == 0) {
223
- break;
123
+ break;
124
+ default:
125
+ reader.skipType(tag & 7);
126
+ break;
224
127
  }
225
- reader.skipType(tag & 7);
226
128
  }
227
129
  return message;
228
130
  },
229
131
  fromJSON: function (object) {
230
- return { newTokenDocument: isSet(object.newTokenDocument) ? String(object.newTokenDocument) : "" };
132
+ return {
133
+ newTokenDocument: isSet(object.newTokenDocument)
134
+ ? String(object.newTokenDocument)
135
+ : '',
136
+ };
231
137
  },
232
138
  toJSON: function (message) {
233
139
  var obj = {};
234
- message.newTokenDocument !== undefined && (obj.newTokenDocument = message.newTokenDocument);
140
+ message.newTokenDocument !== undefined &&
141
+ (obj.newTokenDocument = message.newTokenDocument);
235
142
  return obj;
236
143
  },
237
- create: function (base) {
238
- return exports.SetNotificationTokenResponse.fromPartial(base !== null && base !== void 0 ? base : {});
239
- },
240
144
  fromPartial: function (object) {
241
145
  var _a;
242
146
  var message = createBaseSetNotificationTokenResponse();
243
- message.newTokenDocument = (_a = object.newTokenDocument) !== null && _a !== void 0 ? _a : "";
147
+ message.newTokenDocument = (_a = object.newTokenDocument) !== null && _a !== void 0 ? _a : '';
244
148
  return message;
245
149
  },
246
150
  };
247
151
  function createBaseGetNotificationTokensRequest() {
248
- return { userId: "" };
152
+ return { userId: '' };
249
153
  }
250
154
  exports.GetNotificationTokensRequest = {
251
155
  encode: function (message, writer) {
252
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
253
- if (message.userId !== "") {
156
+ if (writer === void 0) { writer = _m0.Writer.create(); }
157
+ if (message.userId !== '') {
254
158
  writer.uint32(10).string(message.userId);
255
159
  }
256
160
  return writer;
257
161
  },
258
162
  decode: function (input, length) {
259
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
163
+ var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
260
164
  var end = length === undefined ? reader.len : reader.pos + length;
261
165
  var message = createBaseGetNotificationTokensRequest();
262
166
  while (reader.pos < end) {
263
167
  var tag = reader.uint32();
264
168
  switch (tag >>> 3) {
265
169
  case 1:
266
- if (tag != 10) {
267
- break;
268
- }
269
170
  message.userId = reader.string();
270
- continue;
171
+ break;
172
+ default:
173
+ reader.skipType(tag & 7);
174
+ break;
271
175
  }
272
- if ((tag & 7) == 4 || tag == 0) {
273
- break;
274
- }
275
- reader.skipType(tag & 7);
276
176
  }
277
177
  return message;
278
178
  },
279
179
  fromJSON: function (object) {
280
- return { userId: isSet(object.userId) ? String(object.userId) : "" };
180
+ return {
181
+ userId: isSet(object.userId) ? String(object.userId) : '',
182
+ };
281
183
  },
282
184
  toJSON: function (message) {
283
185
  var obj = {};
284
186
  message.userId !== undefined && (obj.userId = message.userId);
285
187
  return obj;
286
188
  },
287
- create: function (base) {
288
- return exports.GetNotificationTokensRequest.fromPartial(base !== null && base !== void 0 ? base : {});
289
- },
290
189
  fromPartial: function (object) {
291
190
  var _a;
292
191
  var message = createBaseGetNotificationTokensRequest();
293
- message.userId = (_a = object.userId) !== null && _a !== void 0 ? _a : "";
192
+ message.userId = (_a = object.userId) !== null && _a !== void 0 ? _a : '';
294
193
  return message;
295
194
  },
296
195
  };
@@ -300,7 +199,7 @@ function createBaseGetNotificationTokensResponse() {
300
199
  exports.GetNotificationTokensResponse = {
301
200
  encode: function (message, writer) {
302
201
  var e_1, _a;
303
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
202
+ if (writer === void 0) { writer = _m0.Writer.create(); }
304
203
  try {
305
204
  for (var _b = __values(message.tokenDocuments), _c = _b.next(); !_c.done; _c = _b.next()) {
306
205
  var v = _c.value;
@@ -317,29 +216,27 @@ exports.GetNotificationTokensResponse = {
317
216
  return writer;
318
217
  },
319
218
  decode: function (input, length) {
320
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
219
+ var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
321
220
  var end = length === undefined ? reader.len : reader.pos + length;
322
221
  var message = createBaseGetNotificationTokensResponse();
323
222
  while (reader.pos < end) {
324
223
  var tag = reader.uint32();
325
224
  switch (tag >>> 3) {
326
225
  case 1:
327
- if (tag != 10) {
328
- break;
329
- }
330
226
  message.tokenDocuments.push(reader.string());
331
- continue;
332
- }
333
- if ((tag & 7) == 4 || tag == 0) {
334
- break;
227
+ break;
228
+ default:
229
+ reader.skipType(tag & 7);
230
+ break;
335
231
  }
336
- reader.skipType(tag & 7);
337
232
  }
338
233
  return message;
339
234
  },
340
235
  fromJSON: function (object) {
341
236
  return {
342
- tokenDocuments: Array.isArray(object === null || object === void 0 ? void 0 : object.tokenDocuments) ? object.tokenDocuments.map(function (e) { return String(e); }) : [],
237
+ tokenDocuments: Array.isArray(object === null || object === void 0 ? void 0 : object.tokenDocuments)
238
+ ? object.tokenDocuments.map(function (e) { return String(e); })
239
+ : [],
343
240
  };
344
241
  },
345
242
  toJSON: function (message) {
@@ -352,9 +249,6 @@ exports.GetNotificationTokensResponse = {
352
249
  }
353
250
  return obj;
354
251
  },
355
- create: function (base) {
356
- return exports.GetNotificationTokensResponse.fromPartial(base !== null && base !== void 0 ? base : {});
357
- },
358
252
  fromPartial: function (object) {
359
253
  var _a;
360
254
  var message = createBaseGetNotificationTokensResponse();
@@ -363,15 +257,22 @@ exports.GetNotificationTokensResponse = {
363
257
  },
364
258
  };
365
259
  function createBaseSendNotificationRequest() {
366
- return { sendTo: "", title: "", platform: undefined, body: undefined, data: undefined, doNotStore: undefined };
260
+ return {
261
+ sendTo: '',
262
+ title: '',
263
+ platform: undefined,
264
+ body: undefined,
265
+ data: undefined,
266
+ doNotStore: undefined,
267
+ };
367
268
  }
368
269
  exports.SendNotificationRequest = {
369
270
  encode: function (message, writer) {
370
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
371
- if (message.sendTo !== "") {
271
+ if (writer === void 0) { writer = _m0.Writer.create(); }
272
+ if (message.sendTo !== '') {
372
273
  writer.uint32(10).string(message.sendTo);
373
274
  }
374
- if (message.title !== "") {
275
+ if (message.title !== '') {
375
276
  writer.uint32(18).string(message.title);
376
277
  }
377
278
  if (message.platform !== undefined) {
@@ -389,60 +290,41 @@ exports.SendNotificationRequest = {
389
290
  return writer;
390
291
  },
391
292
  decode: function (input, length) {
392
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
293
+ var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
393
294
  var end = length === undefined ? reader.len : reader.pos + length;
394
295
  var message = createBaseSendNotificationRequest();
395
296
  while (reader.pos < end) {
396
297
  var tag = reader.uint32();
397
298
  switch (tag >>> 3) {
398
299
  case 1:
399
- if (tag != 10) {
400
- break;
401
- }
402
300
  message.sendTo = reader.string();
403
- continue;
301
+ break;
404
302
  case 2:
405
- if (tag != 18) {
406
- break;
407
- }
408
303
  message.title = reader.string();
409
- continue;
304
+ break;
410
305
  case 3:
411
- if (tag != 26) {
412
- break;
413
- }
414
306
  message.platform = reader.string();
415
- continue;
307
+ break;
416
308
  case 4:
417
- if (tag != 34) {
418
- break;
419
- }
420
309
  message.body = reader.string();
421
- continue;
310
+ break;
422
311
  case 5:
423
- if (tag != 42) {
424
- break;
425
- }
426
312
  message.data = reader.string();
427
- continue;
313
+ break;
428
314
  case 6:
429
- if (tag != 48) {
430
- break;
431
- }
432
315
  message.doNotStore = reader.bool();
433
- continue;
316
+ break;
317
+ default:
318
+ reader.skipType(tag & 7);
319
+ break;
434
320
  }
435
- if ((tag & 7) == 4 || tag == 0) {
436
- break;
437
- }
438
- reader.skipType(tag & 7);
439
321
  }
440
322
  return message;
441
323
  },
442
324
  fromJSON: function (object) {
443
325
  return {
444
- sendTo: isSet(object.sendTo) ? String(object.sendTo) : "",
445
- title: isSet(object.title) ? String(object.title) : "",
326
+ sendTo: isSet(object.sendTo) ? String(object.sendTo) : '',
327
+ title: isSet(object.title) ? String(object.title) : '',
446
328
  platform: isSet(object.platform) ? String(object.platform) : undefined,
447
329
  body: isSet(object.body) ? String(object.body) : undefined,
448
330
  data: isSet(object.data) ? String(object.data) : undefined,
@@ -459,14 +341,11 @@ exports.SendNotificationRequest = {
459
341
  message.doNotStore !== undefined && (obj.doNotStore = message.doNotStore);
460
342
  return obj;
461
343
  },
462
- create: function (base) {
463
- return exports.SendNotificationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
464
- },
465
344
  fromPartial: function (object) {
466
345
  var _a, _b, _c, _d, _e, _f;
467
346
  var message = createBaseSendNotificationRequest();
468
- message.sendTo = (_a = object.sendTo) !== null && _a !== void 0 ? _a : "";
469
- message.title = (_b = object.title) !== null && _b !== void 0 ? _b : "";
347
+ message.sendTo = (_a = object.sendTo) !== null && _a !== void 0 ? _a : '';
348
+ message.title = (_b = object.title) !== null && _b !== void 0 ? _b : '';
470
349
  message.platform = (_c = object.platform) !== null && _c !== void 0 ? _c : undefined;
471
350
  message.body = (_d = object.body) !== null && _d !== void 0 ? _d : undefined;
472
351
  message.data = (_e = object.data) !== null && _e !== void 0 ? _e : undefined;
@@ -475,12 +354,19 @@ exports.SendNotificationRequest = {
475
354
  },
476
355
  };
477
356
  function createBaseSendNotificationToManyDevicesRequest() {
478
- return { sendTo: [], title: "", body: undefined, data: undefined, platform: undefined, doNotStore: undefined };
357
+ return {
358
+ sendTo: [],
359
+ title: '',
360
+ body: undefined,
361
+ data: undefined,
362
+ platform: undefined,
363
+ doNotStore: undefined,
364
+ };
479
365
  }
480
366
  exports.SendNotificationToManyDevicesRequest = {
481
367
  encode: function (message, writer) {
482
368
  var e_2, _a;
483
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
369
+ if (writer === void 0) { writer = _m0.Writer.create(); }
484
370
  try {
485
371
  for (var _b = __values(message.sendTo), _c = _b.next(); !_c.done; _c = _b.next()) {
486
372
  var v = _c.value;
@@ -494,7 +380,7 @@ exports.SendNotificationToManyDevicesRequest = {
494
380
  }
495
381
  finally { if (e_2) throw e_2.error; }
496
382
  }
497
- if (message.title !== "") {
383
+ if (message.title !== '') {
498
384
  writer.uint32(18).string(message.title);
499
385
  }
500
386
  if (message.body !== undefined) {
@@ -512,60 +398,43 @@ exports.SendNotificationToManyDevicesRequest = {
512
398
  return writer;
513
399
  },
514
400
  decode: function (input, length) {
515
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
401
+ var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
516
402
  var end = length === undefined ? reader.len : reader.pos + length;
517
403
  var message = createBaseSendNotificationToManyDevicesRequest();
518
404
  while (reader.pos < end) {
519
405
  var tag = reader.uint32();
520
406
  switch (tag >>> 3) {
521
407
  case 1:
522
- if (tag != 10) {
523
- break;
524
- }
525
408
  message.sendTo.push(reader.string());
526
- continue;
409
+ break;
527
410
  case 2:
528
- if (tag != 18) {
529
- break;
530
- }
531
411
  message.title = reader.string();
532
- continue;
412
+ break;
533
413
  case 3:
534
- if (tag != 26) {
535
- break;
536
- }
537
414
  message.body = reader.string();
538
- continue;
415
+ break;
539
416
  case 4:
540
- if (tag != 34) {
541
- break;
542
- }
543
417
  message.data = reader.string();
544
- continue;
418
+ break;
545
419
  case 5:
546
- if (tag != 42) {
547
- break;
548
- }
549
420
  message.platform = reader.string();
550
- continue;
421
+ break;
551
422
  case 6:
552
- if (tag != 48) {
553
- break;
554
- }
555
423
  message.doNotStore = reader.bool();
556
- continue;
424
+ break;
425
+ default:
426
+ reader.skipType(tag & 7);
427
+ break;
557
428
  }
558
- if ((tag & 7) == 4 || tag == 0) {
559
- break;
560
- }
561
- reader.skipType(tag & 7);
562
429
  }
563
430
  return message;
564
431
  },
565
432
  fromJSON: function (object) {
566
433
  return {
567
- sendTo: Array.isArray(object === null || object === void 0 ? void 0 : object.sendTo) ? object.sendTo.map(function (e) { return String(e); }) : [],
568
- title: isSet(object.title) ? String(object.title) : "",
434
+ sendTo: Array.isArray(object === null || object === void 0 ? void 0 : object.sendTo)
435
+ ? object.sendTo.map(function (e) { return String(e); })
436
+ : [],
437
+ title: isSet(object.title) ? String(object.title) : '',
569
438
  body: isSet(object.body) ? String(object.body) : undefined,
570
439
  data: isSet(object.data) ? String(object.data) : undefined,
571
440
  platform: isSet(object.platform) ? String(object.platform) : undefined,
@@ -587,14 +456,11 @@ exports.SendNotificationToManyDevicesRequest = {
587
456
  message.doNotStore !== undefined && (obj.doNotStore = message.doNotStore);
588
457
  return obj;
589
458
  },
590
- create: function (base) {
591
- return exports.SendNotificationToManyDevicesRequest.fromPartial(base !== null && base !== void 0 ? base : {});
592
- },
593
459
  fromPartial: function (object) {
594
460
  var _a, _b, _c, _d, _e, _f;
595
461
  var message = createBaseSendNotificationToManyDevicesRequest();
596
462
  message.sendTo = ((_a = object.sendTo) === null || _a === void 0 ? void 0 : _a.map(function (e) { return e; })) || [];
597
- message.title = (_b = object.title) !== null && _b !== void 0 ? _b : "";
463
+ message.title = (_b = object.title) !== null && _b !== void 0 ? _b : '';
598
464
  message.body = (_c = object.body) !== null && _c !== void 0 ? _c : undefined;
599
465
  message.data = (_d = object.data) !== null && _d !== void 0 ? _d : undefined;
600
466
  message.platform = (_e = object.platform) !== null && _e !== void 0 ? _e : undefined;
@@ -608,7 +474,7 @@ function createBaseSendManyNotificationsRequest() {
608
474
  exports.SendManyNotificationsRequest = {
609
475
  encode: function (message, writer) {
610
476
  var e_3, _a;
611
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
477
+ if (writer === void 0) { writer = _m0.Writer.create(); }
612
478
  try {
613
479
  for (var _b = __values(message.notifications), _c = _b.next(); !_c.done; _c = _b.next()) {
614
480
  var v = _c.value;
@@ -625,23 +491,19 @@ exports.SendManyNotificationsRequest = {
625
491
  return writer;
626
492
  },
627
493
  decode: function (input, length) {
628
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
494
+ var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
629
495
  var end = length === undefined ? reader.len : reader.pos + length;
630
496
  var message = createBaseSendManyNotificationsRequest();
631
497
  while (reader.pos < end) {
632
498
  var tag = reader.uint32();
633
499
  switch (tag >>> 3) {
634
500
  case 1:
635
- if (tag != 10) {
636
- break;
637
- }
638
501
  message.notifications.push(exports.SendNotificationRequest.decode(reader, reader.uint32()));
639
- continue;
640
- }
641
- if ((tag & 7) == 4 || tag == 0) {
642
- break;
502
+ break;
503
+ default:
504
+ reader.skipType(tag & 7);
505
+ break;
643
506
  }
644
- reader.skipType(tag & 7);
645
507
  }
646
508
  return message;
647
509
  },
@@ -655,87 +517,74 @@ exports.SendManyNotificationsRequest = {
655
517
  toJSON: function (message) {
656
518
  var obj = {};
657
519
  if (message.notifications) {
658
- obj.notifications = message.notifications.map(function (e) { return e ? exports.SendNotificationRequest.toJSON(e) : undefined; });
520
+ obj.notifications = message.notifications.map(function (e) {
521
+ return e ? exports.SendNotificationRequest.toJSON(e) : undefined;
522
+ });
659
523
  }
660
524
  else {
661
525
  obj.notifications = [];
662
526
  }
663
527
  return obj;
664
528
  },
665
- create: function (base) {
666
- return exports.SendManyNotificationsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
667
- },
668
529
  fromPartial: function (object) {
669
530
  var _a;
670
531
  var message = createBaseSendManyNotificationsRequest();
671
- message.notifications = ((_a = object.notifications) === null || _a === void 0 ? void 0 : _a.map(function (e) { return exports.SendNotificationRequest.fromPartial(e); })) || [];
532
+ message.notifications =
533
+ ((_a = object.notifications) === null || _a === void 0 ? void 0 : _a.map(function (e) { return exports.SendNotificationRequest.fromPartial(e); })) || [];
672
534
  return message;
673
535
  },
674
536
  };
675
537
  function createBaseSendNotificationResponse() {
676
- return { message: "" };
538
+ return { message: '' };
677
539
  }
678
540
  exports.SendNotificationResponse = {
679
541
  encode: function (message, writer) {
680
- if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
681
- if (message.message !== "") {
542
+ if (writer === void 0) { writer = _m0.Writer.create(); }
543
+ if (message.message !== '') {
682
544
  writer.uint32(10).string(message.message);
683
545
  }
684
546
  return writer;
685
547
  },
686
548
  decode: function (input, length) {
687
- var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
549
+ var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
688
550
  var end = length === undefined ? reader.len : reader.pos + length;
689
551
  var message = createBaseSendNotificationResponse();
690
552
  while (reader.pos < end) {
691
553
  var tag = reader.uint32();
692
554
  switch (tag >>> 3) {
693
555
  case 1:
694
- if (tag != 10) {
695
- break;
696
- }
697
556
  message.message = reader.string();
698
- continue;
557
+ break;
558
+ default:
559
+ reader.skipType(tag & 7);
560
+ break;
699
561
  }
700
- if ((tag & 7) == 4 || tag == 0) {
701
- break;
702
- }
703
- reader.skipType(tag & 7);
704
562
  }
705
563
  return message;
706
564
  },
707
565
  fromJSON: function (object) {
708
- return { message: isSet(object.message) ? String(object.message) : "" };
566
+ return {
567
+ message: isSet(object.message) ? String(object.message) : '',
568
+ };
709
569
  },
710
570
  toJSON: function (message) {
711
571
  var obj = {};
712
572
  message.message !== undefined && (obj.message = message.message);
713
573
  return obj;
714
574
  },
715
- create: function (base) {
716
- return exports.SendNotificationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
717
- },
718
575
  fromPartial: function (object) {
719
576
  var _a;
720
577
  var message = createBaseSendNotificationResponse();
721
- message.message = (_a = object.message) !== null && _a !== void 0 ? _a : "";
578
+ message.message = (_a = object.message) !== null && _a !== void 0 ? _a : '';
722
579
  return message;
723
580
  },
724
581
  };
725
582
  exports.PushNotificationsDefinition = {
726
- name: "PushNotifications",
727
- fullName: "pushnotifications.PushNotifications",
583
+ name: 'PushNotifications',
584
+ fullName: 'pushnotifications.PushNotifications',
728
585
  methods: {
729
- setConfig: {
730
- name: "SetConfig",
731
- requestType: exports.SetConfigRequest,
732
- requestStream: false,
733
- responseType: exports.SetConfigResponse,
734
- responseStream: false,
735
- options: {},
736
- },
737
586
  setNotificationToken: {
738
- name: "SetNotificationToken",
587
+ name: 'SetNotificationToken',
739
588
  requestType: exports.SetNotificationTokenRequest,
740
589
  requestStream: false,
741
590
  responseType: exports.SetNotificationTokenResponse,
@@ -743,7 +592,7 @@ exports.PushNotificationsDefinition = {
743
592
  options: {},
744
593
  },
745
594
  getNotificationTokens: {
746
- name: "GetNotificationTokens",
595
+ name: 'GetNotificationTokens',
747
596
  requestType: exports.GetNotificationTokensRequest,
748
597
  requestStream: false,
749
598
  responseType: exports.GetNotificationTokensResponse,
@@ -751,7 +600,7 @@ exports.PushNotificationsDefinition = {
751
600
  options: {},
752
601
  },
753
602
  sendNotification: {
754
- name: "SendNotification",
603
+ name: 'SendNotification',
755
604
  requestType: exports.SendNotificationRequest,
756
605
  requestStream: false,
757
606
  responseType: exports.SendNotificationResponse,
@@ -759,7 +608,7 @@ exports.PushNotificationsDefinition = {
759
608
  options: {},
760
609
  },
761
610
  sendNotificationToManyDevices: {
762
- name: "SendNotificationToManyDevices",
611
+ name: 'SendNotificationToManyDevices',
763
612
  requestType: exports.SendNotificationToManyDevicesRequest,
764
613
  requestStream: false,
765
614
  responseType: exports.SendNotificationResponse,
@@ -767,7 +616,7 @@ exports.PushNotificationsDefinition = {
767
616
  options: {},
768
617
  },
769
618
  sendManyNotifications: {
770
- name: "SendManyNotifications",
619
+ name: 'SendManyNotifications',
771
620
  requestType: exports.SendManyNotificationsRequest,
772
621
  requestStream: false,
773
622
  responseType: exports.SendNotificationResponse,