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