@conduitplatform/grpc-sdk 0.16.0-alpha.7 → 0.16.0-alpha.9
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/interfaces/ConduitRouteReturn.d.ts +3 -3
- package/dist/interfaces/ConduitRouteReturn.js.map +1 -1
- package/dist/interfaces/Model.d.ts +62 -12
- package/dist/interfaces/Model.js.map +1 -1
- package/dist/interfaces/Route.d.ts +28 -20
- package/dist/interfaces/Route.js +1 -10
- package/dist/interfaces/Route.js.map +1 -1
- package/dist/modules/admin/index.d.ts +2 -1
- package/dist/modules/admin/index.js +7 -0
- package/dist/modules/admin/index.js.map +1 -1
- package/dist/modules/router/index.d.ts +2 -1
- package/dist/modules/router/index.js +7 -0
- package/dist/modules/router/index.js.map +1 -1
- package/dist/protoUtils/authentication.d.ts +1 -16
- package/dist/protoUtils/authentication.js +110 -148
- package/dist/protoUtils/authentication.js.map +1 -1
- package/dist/protoUtils/authorization.d.ts +2 -33
- package/dist/protoUtils/authorization.js +188 -283
- package/dist/protoUtils/authorization.js.map +1 -1
- package/dist/protoUtils/chat.d.ts +2 -13
- package/dist/protoUtils/chat.js +103 -123
- package/dist/protoUtils/chat.js.map +1 -1
- package/dist/protoUtils/core.d.ts +34 -48
- package/dist/protoUtils/core.js +491 -603
- package/dist/protoUtils/core.js.map +1 -1
- package/dist/protoUtils/database.d.ts +13 -69
- package/dist/protoUtils/database.js +396 -604
- package/dist/protoUtils/database.js.map +1 -1
- package/dist/protoUtils/email.d.ts +1 -10
- package/dist/protoUtils/email.js +130 -149
- package/dist/protoUtils/email.js.map +1 -1
- package/dist/protoUtils/google/protobuf/empty.d.ts +1 -2
- package/dist/protoUtils/google/protobuf/empty.js +28 -12
- package/dist/protoUtils/google/protobuf/empty.js.map +1 -1
- package/dist/protoUtils/grpc_health_check.d.ts +1 -7
- package/dist/protoUtils/grpc_health_check.js +62 -49
- package/dist/protoUtils/grpc_health_check.js.map +1 -1
- package/dist/protoUtils/module.d.ts +1 -5
- package/dist/protoUtils/module.js +50 -40
- package/dist/protoUtils/module.js.map +1 -1
- package/dist/protoUtils/push-notifications.d.ts +1 -19
- package/dist/protoUtils/push-notifications.js +159 -201
- package/dist/protoUtils/push-notifications.js.map +1 -1
- package/dist/protoUtils/router.d.ts +34 -16
- package/dist/protoUtils/router.js +309 -323
- package/dist/protoUtils/router.js.map +1 -1
- package/dist/protoUtils/sms.d.ts +1 -13
- package/dist/protoUtils/sms.js +109 -123
- package/dist/protoUtils/sms.js.map +1 -1
- package/dist/protoUtils/storage.d.ts +3 -24
- package/dist/protoUtils/storage.js +203 -313
- package/dist/protoUtils/storage.js.map +1 -1
- package/package.json +3 -3
|
@@ -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,68 +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
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
|
|
39
|
+
var _m0 = __importStar(require("protobufjs/minimal"));
|
|
20
40
|
function createBaseSetNotificationTokenRequest() {
|
|
21
|
-
return { token:
|
|
41
|
+
return { token: '', platform: '', userId: '' };
|
|
22
42
|
}
|
|
23
43
|
exports.SetNotificationTokenRequest = {
|
|
24
44
|
encode: function (message, writer) {
|
|
25
|
-
if (writer === void 0) { writer =
|
|
26
|
-
if (message.token !==
|
|
45
|
+
if (writer === void 0) { writer = _m0.Writer.create(); }
|
|
46
|
+
if (message.token !== '') {
|
|
27
47
|
writer.uint32(10).string(message.token);
|
|
28
48
|
}
|
|
29
|
-
if (message.platform !==
|
|
49
|
+
if (message.platform !== '') {
|
|
30
50
|
writer.uint32(18).string(message.platform);
|
|
31
51
|
}
|
|
32
|
-
if (message.userId !==
|
|
52
|
+
if (message.userId !== '') {
|
|
33
53
|
writer.uint32(26).string(message.userId);
|
|
34
54
|
}
|
|
35
55
|
return writer;
|
|
36
56
|
},
|
|
37
57
|
decode: function (input, length) {
|
|
38
|
-
var reader = input instanceof
|
|
58
|
+
var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
39
59
|
var end = length === undefined ? reader.len : reader.pos + length;
|
|
40
60
|
var message = createBaseSetNotificationTokenRequest();
|
|
41
61
|
while (reader.pos < end) {
|
|
42
62
|
var tag = reader.uint32();
|
|
43
63
|
switch (tag >>> 3) {
|
|
44
64
|
case 1:
|
|
45
|
-
if (tag != 10) {
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
65
|
message.token = reader.string();
|
|
49
|
-
|
|
66
|
+
break;
|
|
50
67
|
case 2:
|
|
51
|
-
if (tag != 18) {
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
68
|
message.platform = reader.string();
|
|
55
|
-
|
|
69
|
+
break;
|
|
56
70
|
case 3:
|
|
57
|
-
if (tag != 26) {
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
71
|
message.userId = reader.string();
|
|
61
|
-
|
|
72
|
+
break;
|
|
73
|
+
default:
|
|
74
|
+
reader.skipType(tag & 7);
|
|
75
|
+
break;
|
|
62
76
|
}
|
|
63
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
reader.skipType(tag & 7);
|
|
67
77
|
}
|
|
68
78
|
return message;
|
|
69
79
|
},
|
|
70
80
|
fromJSON: function (object) {
|
|
71
81
|
return {
|
|
72
|
-
token: isSet(object.token) ? String(object.token) :
|
|
73
|
-
platform: isSet(object.platform) ? String(object.platform) :
|
|
74
|
-
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) : '',
|
|
75
85
|
};
|
|
76
86
|
},
|
|
77
87
|
toJSON: function (message) {
|
|
@@ -81,115 +91,105 @@ exports.SetNotificationTokenRequest = {
|
|
|
81
91
|
message.userId !== undefined && (obj.userId = message.userId);
|
|
82
92
|
return obj;
|
|
83
93
|
},
|
|
84
|
-
create: function (base) {
|
|
85
|
-
return exports.SetNotificationTokenRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
86
|
-
},
|
|
87
94
|
fromPartial: function (object) {
|
|
88
95
|
var _a, _b, _c;
|
|
89
96
|
var message = createBaseSetNotificationTokenRequest();
|
|
90
|
-
message.token = (_a = object.token) !== null && _a !== void 0 ? _a :
|
|
91
|
-
message.platform = (_b = object.platform) !== null && _b !== void 0 ? _b :
|
|
92
|
-
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 : '';
|
|
93
100
|
return message;
|
|
94
101
|
},
|
|
95
102
|
};
|
|
96
103
|
function createBaseSetNotificationTokenResponse() {
|
|
97
|
-
return { newTokenDocument:
|
|
104
|
+
return { newTokenDocument: '' };
|
|
98
105
|
}
|
|
99
106
|
exports.SetNotificationTokenResponse = {
|
|
100
107
|
encode: function (message, writer) {
|
|
101
|
-
if (writer === void 0) { writer =
|
|
102
|
-
if (message.newTokenDocument !==
|
|
108
|
+
if (writer === void 0) { writer = _m0.Writer.create(); }
|
|
109
|
+
if (message.newTokenDocument !== '') {
|
|
103
110
|
writer.uint32(10).string(message.newTokenDocument);
|
|
104
111
|
}
|
|
105
112
|
return writer;
|
|
106
113
|
},
|
|
107
114
|
decode: function (input, length) {
|
|
108
|
-
var reader = input instanceof
|
|
115
|
+
var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
109
116
|
var end = length === undefined ? reader.len : reader.pos + length;
|
|
110
117
|
var message = createBaseSetNotificationTokenResponse();
|
|
111
118
|
while (reader.pos < end) {
|
|
112
119
|
var tag = reader.uint32();
|
|
113
120
|
switch (tag >>> 3) {
|
|
114
121
|
case 1:
|
|
115
|
-
if (tag != 10) {
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
122
|
message.newTokenDocument = reader.string();
|
|
119
|
-
|
|
123
|
+
break;
|
|
124
|
+
default:
|
|
125
|
+
reader.skipType(tag & 7);
|
|
126
|
+
break;
|
|
120
127
|
}
|
|
121
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
reader.skipType(tag & 7);
|
|
125
128
|
}
|
|
126
129
|
return message;
|
|
127
130
|
},
|
|
128
131
|
fromJSON: function (object) {
|
|
129
|
-
return {
|
|
132
|
+
return {
|
|
133
|
+
newTokenDocument: isSet(object.newTokenDocument)
|
|
134
|
+
? String(object.newTokenDocument)
|
|
135
|
+
: '',
|
|
136
|
+
};
|
|
130
137
|
},
|
|
131
138
|
toJSON: function (message) {
|
|
132
139
|
var obj = {};
|
|
133
|
-
message.newTokenDocument !== undefined &&
|
|
140
|
+
message.newTokenDocument !== undefined &&
|
|
141
|
+
(obj.newTokenDocument = message.newTokenDocument);
|
|
134
142
|
return obj;
|
|
135
143
|
},
|
|
136
|
-
create: function (base) {
|
|
137
|
-
return exports.SetNotificationTokenResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
138
|
-
},
|
|
139
144
|
fromPartial: function (object) {
|
|
140
145
|
var _a;
|
|
141
146
|
var message = createBaseSetNotificationTokenResponse();
|
|
142
|
-
message.newTokenDocument = (_a = object.newTokenDocument) !== null && _a !== void 0 ? _a :
|
|
147
|
+
message.newTokenDocument = (_a = object.newTokenDocument) !== null && _a !== void 0 ? _a : '';
|
|
143
148
|
return message;
|
|
144
149
|
},
|
|
145
150
|
};
|
|
146
151
|
function createBaseGetNotificationTokensRequest() {
|
|
147
|
-
return { userId:
|
|
152
|
+
return { userId: '' };
|
|
148
153
|
}
|
|
149
154
|
exports.GetNotificationTokensRequest = {
|
|
150
155
|
encode: function (message, writer) {
|
|
151
|
-
if (writer === void 0) { writer =
|
|
152
|
-
if (message.userId !==
|
|
156
|
+
if (writer === void 0) { writer = _m0.Writer.create(); }
|
|
157
|
+
if (message.userId !== '') {
|
|
153
158
|
writer.uint32(10).string(message.userId);
|
|
154
159
|
}
|
|
155
160
|
return writer;
|
|
156
161
|
},
|
|
157
162
|
decode: function (input, length) {
|
|
158
|
-
var reader = input instanceof
|
|
163
|
+
var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
159
164
|
var end = length === undefined ? reader.len : reader.pos + length;
|
|
160
165
|
var message = createBaseGetNotificationTokensRequest();
|
|
161
166
|
while (reader.pos < end) {
|
|
162
167
|
var tag = reader.uint32();
|
|
163
168
|
switch (tag >>> 3) {
|
|
164
169
|
case 1:
|
|
165
|
-
if (tag != 10) {
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
170
|
message.userId = reader.string();
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
break;
|
|
172
|
+
default:
|
|
173
|
+
reader.skipType(tag & 7);
|
|
174
|
+
break;
|
|
173
175
|
}
|
|
174
|
-
reader.skipType(tag & 7);
|
|
175
176
|
}
|
|
176
177
|
return message;
|
|
177
178
|
},
|
|
178
179
|
fromJSON: function (object) {
|
|
179
|
-
return {
|
|
180
|
+
return {
|
|
181
|
+
userId: isSet(object.userId) ? String(object.userId) : '',
|
|
182
|
+
};
|
|
180
183
|
},
|
|
181
184
|
toJSON: function (message) {
|
|
182
185
|
var obj = {};
|
|
183
186
|
message.userId !== undefined && (obj.userId = message.userId);
|
|
184
187
|
return obj;
|
|
185
188
|
},
|
|
186
|
-
create: function (base) {
|
|
187
|
-
return exports.GetNotificationTokensRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
188
|
-
},
|
|
189
189
|
fromPartial: function (object) {
|
|
190
190
|
var _a;
|
|
191
191
|
var message = createBaseGetNotificationTokensRequest();
|
|
192
|
-
message.userId = (_a = object.userId) !== null && _a !== void 0 ? _a :
|
|
192
|
+
message.userId = (_a = object.userId) !== null && _a !== void 0 ? _a : '';
|
|
193
193
|
return message;
|
|
194
194
|
},
|
|
195
195
|
};
|
|
@@ -199,7 +199,7 @@ function createBaseGetNotificationTokensResponse() {
|
|
|
199
199
|
exports.GetNotificationTokensResponse = {
|
|
200
200
|
encode: function (message, writer) {
|
|
201
201
|
var e_1, _a;
|
|
202
|
-
if (writer === void 0) { writer =
|
|
202
|
+
if (writer === void 0) { writer = _m0.Writer.create(); }
|
|
203
203
|
try {
|
|
204
204
|
for (var _b = __values(message.tokenDocuments), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
205
205
|
var v = _c.value;
|
|
@@ -216,29 +216,27 @@ exports.GetNotificationTokensResponse = {
|
|
|
216
216
|
return writer;
|
|
217
217
|
},
|
|
218
218
|
decode: function (input, length) {
|
|
219
|
-
var reader = input instanceof
|
|
219
|
+
var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
220
220
|
var end = length === undefined ? reader.len : reader.pos + length;
|
|
221
221
|
var message = createBaseGetNotificationTokensResponse();
|
|
222
222
|
while (reader.pos < end) {
|
|
223
223
|
var tag = reader.uint32();
|
|
224
224
|
switch (tag >>> 3) {
|
|
225
225
|
case 1:
|
|
226
|
-
if (tag != 10) {
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
226
|
message.tokenDocuments.push(reader.string());
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
227
|
+
break;
|
|
228
|
+
default:
|
|
229
|
+
reader.skipType(tag & 7);
|
|
230
|
+
break;
|
|
234
231
|
}
|
|
235
|
-
reader.skipType(tag & 7);
|
|
236
232
|
}
|
|
237
233
|
return message;
|
|
238
234
|
},
|
|
239
235
|
fromJSON: function (object) {
|
|
240
236
|
return {
|
|
241
|
-
tokenDocuments: Array.isArray(object === null || object === void 0 ? void 0 : object.tokenDocuments)
|
|
237
|
+
tokenDocuments: Array.isArray(object === null || object === void 0 ? void 0 : object.tokenDocuments)
|
|
238
|
+
? object.tokenDocuments.map(function (e) { return String(e); })
|
|
239
|
+
: [],
|
|
242
240
|
};
|
|
243
241
|
},
|
|
244
242
|
toJSON: function (message) {
|
|
@@ -251,9 +249,6 @@ exports.GetNotificationTokensResponse = {
|
|
|
251
249
|
}
|
|
252
250
|
return obj;
|
|
253
251
|
},
|
|
254
|
-
create: function (base) {
|
|
255
|
-
return exports.GetNotificationTokensResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
256
|
-
},
|
|
257
252
|
fromPartial: function (object) {
|
|
258
253
|
var _a;
|
|
259
254
|
var message = createBaseGetNotificationTokensResponse();
|
|
@@ -262,15 +257,22 @@ exports.GetNotificationTokensResponse = {
|
|
|
262
257
|
},
|
|
263
258
|
};
|
|
264
259
|
function createBaseSendNotificationRequest() {
|
|
265
|
-
return {
|
|
260
|
+
return {
|
|
261
|
+
sendTo: '',
|
|
262
|
+
title: '',
|
|
263
|
+
platform: undefined,
|
|
264
|
+
body: undefined,
|
|
265
|
+
data: undefined,
|
|
266
|
+
doNotStore: undefined,
|
|
267
|
+
};
|
|
266
268
|
}
|
|
267
269
|
exports.SendNotificationRequest = {
|
|
268
270
|
encode: function (message, writer) {
|
|
269
|
-
if (writer === void 0) { writer =
|
|
270
|
-
if (message.sendTo !==
|
|
271
|
+
if (writer === void 0) { writer = _m0.Writer.create(); }
|
|
272
|
+
if (message.sendTo !== '') {
|
|
271
273
|
writer.uint32(10).string(message.sendTo);
|
|
272
274
|
}
|
|
273
|
-
if (message.title !==
|
|
275
|
+
if (message.title !== '') {
|
|
274
276
|
writer.uint32(18).string(message.title);
|
|
275
277
|
}
|
|
276
278
|
if (message.platform !== undefined) {
|
|
@@ -288,60 +290,41 @@ exports.SendNotificationRequest = {
|
|
|
288
290
|
return writer;
|
|
289
291
|
},
|
|
290
292
|
decode: function (input, length) {
|
|
291
|
-
var reader = input instanceof
|
|
293
|
+
var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
292
294
|
var end = length === undefined ? reader.len : reader.pos + length;
|
|
293
295
|
var message = createBaseSendNotificationRequest();
|
|
294
296
|
while (reader.pos < end) {
|
|
295
297
|
var tag = reader.uint32();
|
|
296
298
|
switch (tag >>> 3) {
|
|
297
299
|
case 1:
|
|
298
|
-
if (tag != 10) {
|
|
299
|
-
break;
|
|
300
|
-
}
|
|
301
300
|
message.sendTo = reader.string();
|
|
302
|
-
|
|
301
|
+
break;
|
|
303
302
|
case 2:
|
|
304
|
-
if (tag != 18) {
|
|
305
|
-
break;
|
|
306
|
-
}
|
|
307
303
|
message.title = reader.string();
|
|
308
|
-
|
|
304
|
+
break;
|
|
309
305
|
case 3:
|
|
310
|
-
if (tag != 26) {
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
306
|
message.platform = reader.string();
|
|
314
|
-
|
|
307
|
+
break;
|
|
315
308
|
case 4:
|
|
316
|
-
if (tag != 34) {
|
|
317
|
-
break;
|
|
318
|
-
}
|
|
319
309
|
message.body = reader.string();
|
|
320
|
-
|
|
310
|
+
break;
|
|
321
311
|
case 5:
|
|
322
|
-
if (tag != 42) {
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
312
|
message.data = reader.string();
|
|
326
|
-
|
|
313
|
+
break;
|
|
327
314
|
case 6:
|
|
328
|
-
if (tag != 48) {
|
|
329
|
-
break;
|
|
330
|
-
}
|
|
331
315
|
message.doNotStore = reader.bool();
|
|
332
|
-
|
|
316
|
+
break;
|
|
317
|
+
default:
|
|
318
|
+
reader.skipType(tag & 7);
|
|
319
|
+
break;
|
|
333
320
|
}
|
|
334
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
335
|
-
break;
|
|
336
|
-
}
|
|
337
|
-
reader.skipType(tag & 7);
|
|
338
321
|
}
|
|
339
322
|
return message;
|
|
340
323
|
},
|
|
341
324
|
fromJSON: function (object) {
|
|
342
325
|
return {
|
|
343
|
-
sendTo: isSet(object.sendTo) ? String(object.sendTo) :
|
|
344
|
-
title: isSet(object.title) ? String(object.title) :
|
|
326
|
+
sendTo: isSet(object.sendTo) ? String(object.sendTo) : '',
|
|
327
|
+
title: isSet(object.title) ? String(object.title) : '',
|
|
345
328
|
platform: isSet(object.platform) ? String(object.platform) : undefined,
|
|
346
329
|
body: isSet(object.body) ? String(object.body) : undefined,
|
|
347
330
|
data: isSet(object.data) ? String(object.data) : undefined,
|
|
@@ -358,14 +341,11 @@ exports.SendNotificationRequest = {
|
|
|
358
341
|
message.doNotStore !== undefined && (obj.doNotStore = message.doNotStore);
|
|
359
342
|
return obj;
|
|
360
343
|
},
|
|
361
|
-
create: function (base) {
|
|
362
|
-
return exports.SendNotificationRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
363
|
-
},
|
|
364
344
|
fromPartial: function (object) {
|
|
365
345
|
var _a, _b, _c, _d, _e, _f;
|
|
366
346
|
var message = createBaseSendNotificationRequest();
|
|
367
|
-
message.sendTo = (_a = object.sendTo) !== null && _a !== void 0 ? _a :
|
|
368
|
-
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 : '';
|
|
369
349
|
message.platform = (_c = object.platform) !== null && _c !== void 0 ? _c : undefined;
|
|
370
350
|
message.body = (_d = object.body) !== null && _d !== void 0 ? _d : undefined;
|
|
371
351
|
message.data = (_e = object.data) !== null && _e !== void 0 ? _e : undefined;
|
|
@@ -374,12 +354,19 @@ exports.SendNotificationRequest = {
|
|
|
374
354
|
},
|
|
375
355
|
};
|
|
376
356
|
function createBaseSendNotificationToManyDevicesRequest() {
|
|
377
|
-
return {
|
|
357
|
+
return {
|
|
358
|
+
sendTo: [],
|
|
359
|
+
title: '',
|
|
360
|
+
body: undefined,
|
|
361
|
+
data: undefined,
|
|
362
|
+
platform: undefined,
|
|
363
|
+
doNotStore: undefined,
|
|
364
|
+
};
|
|
378
365
|
}
|
|
379
366
|
exports.SendNotificationToManyDevicesRequest = {
|
|
380
367
|
encode: function (message, writer) {
|
|
381
368
|
var e_2, _a;
|
|
382
|
-
if (writer === void 0) { writer =
|
|
369
|
+
if (writer === void 0) { writer = _m0.Writer.create(); }
|
|
383
370
|
try {
|
|
384
371
|
for (var _b = __values(message.sendTo), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
385
372
|
var v = _c.value;
|
|
@@ -393,7 +380,7 @@ exports.SendNotificationToManyDevicesRequest = {
|
|
|
393
380
|
}
|
|
394
381
|
finally { if (e_2) throw e_2.error; }
|
|
395
382
|
}
|
|
396
|
-
if (message.title !==
|
|
383
|
+
if (message.title !== '') {
|
|
397
384
|
writer.uint32(18).string(message.title);
|
|
398
385
|
}
|
|
399
386
|
if (message.body !== undefined) {
|
|
@@ -411,60 +398,43 @@ exports.SendNotificationToManyDevicesRequest = {
|
|
|
411
398
|
return writer;
|
|
412
399
|
},
|
|
413
400
|
decode: function (input, length) {
|
|
414
|
-
var reader = input instanceof
|
|
401
|
+
var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
415
402
|
var end = length === undefined ? reader.len : reader.pos + length;
|
|
416
403
|
var message = createBaseSendNotificationToManyDevicesRequest();
|
|
417
404
|
while (reader.pos < end) {
|
|
418
405
|
var tag = reader.uint32();
|
|
419
406
|
switch (tag >>> 3) {
|
|
420
407
|
case 1:
|
|
421
|
-
if (tag != 10) {
|
|
422
|
-
break;
|
|
423
|
-
}
|
|
424
408
|
message.sendTo.push(reader.string());
|
|
425
|
-
|
|
409
|
+
break;
|
|
426
410
|
case 2:
|
|
427
|
-
if (tag != 18) {
|
|
428
|
-
break;
|
|
429
|
-
}
|
|
430
411
|
message.title = reader.string();
|
|
431
|
-
|
|
412
|
+
break;
|
|
432
413
|
case 3:
|
|
433
|
-
if (tag != 26) {
|
|
434
|
-
break;
|
|
435
|
-
}
|
|
436
414
|
message.body = reader.string();
|
|
437
|
-
|
|
415
|
+
break;
|
|
438
416
|
case 4:
|
|
439
|
-
if (tag != 34) {
|
|
440
|
-
break;
|
|
441
|
-
}
|
|
442
417
|
message.data = reader.string();
|
|
443
|
-
|
|
418
|
+
break;
|
|
444
419
|
case 5:
|
|
445
|
-
if (tag != 42) {
|
|
446
|
-
break;
|
|
447
|
-
}
|
|
448
420
|
message.platform = reader.string();
|
|
449
|
-
|
|
421
|
+
break;
|
|
450
422
|
case 6:
|
|
451
|
-
if (tag != 48) {
|
|
452
|
-
break;
|
|
453
|
-
}
|
|
454
423
|
message.doNotStore = reader.bool();
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
424
|
+
break;
|
|
425
|
+
default:
|
|
426
|
+
reader.skipType(tag & 7);
|
|
427
|
+
break;
|
|
459
428
|
}
|
|
460
|
-
reader.skipType(tag & 7);
|
|
461
429
|
}
|
|
462
430
|
return message;
|
|
463
431
|
},
|
|
464
432
|
fromJSON: function (object) {
|
|
465
433
|
return {
|
|
466
|
-
sendTo: Array.isArray(object === null || object === void 0 ? void 0 : object.sendTo)
|
|
467
|
-
|
|
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) : '',
|
|
468
438
|
body: isSet(object.body) ? String(object.body) : undefined,
|
|
469
439
|
data: isSet(object.data) ? String(object.data) : undefined,
|
|
470
440
|
platform: isSet(object.platform) ? String(object.platform) : undefined,
|
|
@@ -486,14 +456,11 @@ exports.SendNotificationToManyDevicesRequest = {
|
|
|
486
456
|
message.doNotStore !== undefined && (obj.doNotStore = message.doNotStore);
|
|
487
457
|
return obj;
|
|
488
458
|
},
|
|
489
|
-
create: function (base) {
|
|
490
|
-
return exports.SendNotificationToManyDevicesRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
491
|
-
},
|
|
492
459
|
fromPartial: function (object) {
|
|
493
460
|
var _a, _b, _c, _d, _e, _f;
|
|
494
461
|
var message = createBaseSendNotificationToManyDevicesRequest();
|
|
495
462
|
message.sendTo = ((_a = object.sendTo) === null || _a === void 0 ? void 0 : _a.map(function (e) { return e; })) || [];
|
|
496
|
-
message.title = (_b = object.title) !== null && _b !== void 0 ? _b :
|
|
463
|
+
message.title = (_b = object.title) !== null && _b !== void 0 ? _b : '';
|
|
497
464
|
message.body = (_c = object.body) !== null && _c !== void 0 ? _c : undefined;
|
|
498
465
|
message.data = (_d = object.data) !== null && _d !== void 0 ? _d : undefined;
|
|
499
466
|
message.platform = (_e = object.platform) !== null && _e !== void 0 ? _e : undefined;
|
|
@@ -507,7 +474,7 @@ function createBaseSendManyNotificationsRequest() {
|
|
|
507
474
|
exports.SendManyNotificationsRequest = {
|
|
508
475
|
encode: function (message, writer) {
|
|
509
476
|
var e_3, _a;
|
|
510
|
-
if (writer === void 0) { writer =
|
|
477
|
+
if (writer === void 0) { writer = _m0.Writer.create(); }
|
|
511
478
|
try {
|
|
512
479
|
for (var _b = __values(message.notifications), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
513
480
|
var v = _c.value;
|
|
@@ -524,23 +491,19 @@ exports.SendManyNotificationsRequest = {
|
|
|
524
491
|
return writer;
|
|
525
492
|
},
|
|
526
493
|
decode: function (input, length) {
|
|
527
|
-
var reader = input instanceof
|
|
494
|
+
var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
528
495
|
var end = length === undefined ? reader.len : reader.pos + length;
|
|
529
496
|
var message = createBaseSendManyNotificationsRequest();
|
|
530
497
|
while (reader.pos < end) {
|
|
531
498
|
var tag = reader.uint32();
|
|
532
499
|
switch (tag >>> 3) {
|
|
533
500
|
case 1:
|
|
534
|
-
if (tag != 10) {
|
|
535
|
-
break;
|
|
536
|
-
}
|
|
537
501
|
message.notifications.push(exports.SendNotificationRequest.decode(reader, reader.uint32()));
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
502
|
+
break;
|
|
503
|
+
default:
|
|
504
|
+
reader.skipType(tag & 7);
|
|
505
|
+
break;
|
|
542
506
|
}
|
|
543
|
-
reader.skipType(tag & 7);
|
|
544
507
|
}
|
|
545
508
|
return message;
|
|
546
509
|
},
|
|
@@ -554,79 +517,74 @@ exports.SendManyNotificationsRequest = {
|
|
|
554
517
|
toJSON: function (message) {
|
|
555
518
|
var obj = {};
|
|
556
519
|
if (message.notifications) {
|
|
557
|
-
obj.notifications = message.notifications.map(function (e) {
|
|
520
|
+
obj.notifications = message.notifications.map(function (e) {
|
|
521
|
+
return e ? exports.SendNotificationRequest.toJSON(e) : undefined;
|
|
522
|
+
});
|
|
558
523
|
}
|
|
559
524
|
else {
|
|
560
525
|
obj.notifications = [];
|
|
561
526
|
}
|
|
562
527
|
return obj;
|
|
563
528
|
},
|
|
564
|
-
create: function (base) {
|
|
565
|
-
return exports.SendManyNotificationsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
566
|
-
},
|
|
567
529
|
fromPartial: function (object) {
|
|
568
530
|
var _a;
|
|
569
531
|
var message = createBaseSendManyNotificationsRequest();
|
|
570
|
-
message.notifications =
|
|
532
|
+
message.notifications =
|
|
533
|
+
((_a = object.notifications) === null || _a === void 0 ? void 0 : _a.map(function (e) { return exports.SendNotificationRequest.fromPartial(e); })) || [];
|
|
571
534
|
return message;
|
|
572
535
|
},
|
|
573
536
|
};
|
|
574
537
|
function createBaseSendNotificationResponse() {
|
|
575
|
-
return { message:
|
|
538
|
+
return { message: '' };
|
|
576
539
|
}
|
|
577
540
|
exports.SendNotificationResponse = {
|
|
578
541
|
encode: function (message, writer) {
|
|
579
|
-
if (writer === void 0) { writer =
|
|
580
|
-
if (message.message !==
|
|
542
|
+
if (writer === void 0) { writer = _m0.Writer.create(); }
|
|
543
|
+
if (message.message !== '') {
|
|
581
544
|
writer.uint32(10).string(message.message);
|
|
582
545
|
}
|
|
583
546
|
return writer;
|
|
584
547
|
},
|
|
585
548
|
decode: function (input, length) {
|
|
586
|
-
var reader = input instanceof
|
|
549
|
+
var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
587
550
|
var end = length === undefined ? reader.len : reader.pos + length;
|
|
588
551
|
var message = createBaseSendNotificationResponse();
|
|
589
552
|
while (reader.pos < end) {
|
|
590
553
|
var tag = reader.uint32();
|
|
591
554
|
switch (tag >>> 3) {
|
|
592
555
|
case 1:
|
|
593
|
-
if (tag != 10) {
|
|
594
|
-
break;
|
|
595
|
-
}
|
|
596
556
|
message.message = reader.string();
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
557
|
+
break;
|
|
558
|
+
default:
|
|
559
|
+
reader.skipType(tag & 7);
|
|
560
|
+
break;
|
|
601
561
|
}
|
|
602
|
-
reader.skipType(tag & 7);
|
|
603
562
|
}
|
|
604
563
|
return message;
|
|
605
564
|
},
|
|
606
565
|
fromJSON: function (object) {
|
|
607
|
-
return {
|
|
566
|
+
return {
|
|
567
|
+
message: isSet(object.message) ? String(object.message) : '',
|
|
568
|
+
};
|
|
608
569
|
},
|
|
609
570
|
toJSON: function (message) {
|
|
610
571
|
var obj = {};
|
|
611
572
|
message.message !== undefined && (obj.message = message.message);
|
|
612
573
|
return obj;
|
|
613
574
|
},
|
|
614
|
-
create: function (base) {
|
|
615
|
-
return exports.SendNotificationResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
616
|
-
},
|
|
617
575
|
fromPartial: function (object) {
|
|
618
576
|
var _a;
|
|
619
577
|
var message = createBaseSendNotificationResponse();
|
|
620
|
-
message.message = (_a = object.message) !== null && _a !== void 0 ? _a :
|
|
578
|
+
message.message = (_a = object.message) !== null && _a !== void 0 ? _a : '';
|
|
621
579
|
return message;
|
|
622
580
|
},
|
|
623
581
|
};
|
|
624
582
|
exports.PushNotificationsDefinition = {
|
|
625
|
-
name:
|
|
626
|
-
fullName:
|
|
583
|
+
name: 'PushNotifications',
|
|
584
|
+
fullName: 'pushnotifications.PushNotifications',
|
|
627
585
|
methods: {
|
|
628
586
|
setNotificationToken: {
|
|
629
|
-
name:
|
|
587
|
+
name: 'SetNotificationToken',
|
|
630
588
|
requestType: exports.SetNotificationTokenRequest,
|
|
631
589
|
requestStream: false,
|
|
632
590
|
responseType: exports.SetNotificationTokenResponse,
|
|
@@ -634,7 +592,7 @@ exports.PushNotificationsDefinition = {
|
|
|
634
592
|
options: {},
|
|
635
593
|
},
|
|
636
594
|
getNotificationTokens: {
|
|
637
|
-
name:
|
|
595
|
+
name: 'GetNotificationTokens',
|
|
638
596
|
requestType: exports.GetNotificationTokensRequest,
|
|
639
597
|
requestStream: false,
|
|
640
598
|
responseType: exports.GetNotificationTokensResponse,
|
|
@@ -642,7 +600,7 @@ exports.PushNotificationsDefinition = {
|
|
|
642
600
|
options: {},
|
|
643
601
|
},
|
|
644
602
|
sendNotification: {
|
|
645
|
-
name:
|
|
603
|
+
name: 'SendNotification',
|
|
646
604
|
requestType: exports.SendNotificationRequest,
|
|
647
605
|
requestStream: false,
|
|
648
606
|
responseType: exports.SendNotificationResponse,
|
|
@@ -650,7 +608,7 @@ exports.PushNotificationsDefinition = {
|
|
|
650
608
|
options: {},
|
|
651
609
|
},
|
|
652
610
|
sendNotificationToManyDevices: {
|
|
653
|
-
name:
|
|
611
|
+
name: 'SendNotificationToManyDevices',
|
|
654
612
|
requestType: exports.SendNotificationToManyDevicesRequest,
|
|
655
613
|
requestStream: false,
|
|
656
614
|
responseType: exports.SendNotificationResponse,
|
|
@@ -658,7 +616,7 @@ exports.PushNotificationsDefinition = {
|
|
|
658
616
|
options: {},
|
|
659
617
|
},
|
|
660
618
|
sendManyNotifications: {
|
|
661
|
-
name:
|
|
619
|
+
name: 'SendManyNotifications',
|
|
662
620
|
requestType: exports.SendManyNotificationsRequest,
|
|
663
621
|
requestStream: false,
|
|
664
622
|
responseType: exports.SendNotificationResponse,
|