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