@conduitplatform/grpc-sdk 0.15.18 → 0.15.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/ConduitActiveSchema.js +25 -43
- package/dist/classes/ConduitActiveSchema.js.map +1 -1
- package/dist/classes/ConduitAuthorizedResource.js +5 -6
- package/dist/classes/ConduitAuthorizedResource.js.map +1 -1
- package/dist/classes/ConduitModule.js +44 -138
- package/dist/classes/ConduitModule.js.map +1 -1
- package/dist/classes/ConduitSchema.js +3 -4
- package/dist/classes/ConduitSchema.js.map +1 -1
- package/dist/classes/ConduitServiceModule.js +39 -98
- package/dist/classes/ConduitServiceModule.js.map +1 -1
- package/dist/classes/ConfigController.js +10 -17
- package/dist/classes/ConfigController.js.map +1 -1
- package/dist/classes/Error.js +17 -40
- package/dist/classes/Error.js.map +1 -1
- package/dist/classes/GrpcServer.js +88 -172
- package/dist/classes/GrpcServer.js.map +1 -1
- package/dist/classes/HealthCheck.js +26 -72
- package/dist/classes/HealthCheck.js.map +1 -1
- package/dist/classes/ManagedModule.js +93 -245
- package/dist/classes/ManagedModule.js.map +1 -1
- package/dist/classes/ModuleManager.js +51 -149
- package/dist/classes/ModuleManager.js.map +1 -1
- package/dist/helpers/GrpcHelper.js +11 -11
- package/dist/helpers/GrpcHelper.js.map +1 -1
- package/dist/helpers/TypeHelpers.js +57 -119
- package/dist/helpers/TypeHelpers.js.map +1 -1
- package/dist/helpers/wrapGrpcFunctions.js +14 -15
- package/dist/helpers/wrapGrpcFunctions.js.map +1 -1
- package/dist/index.js +299 -467
- package/dist/index.js.map +1 -1
- package/dist/interceptors/grpcSignedToken.js +7 -79
- package/dist/interceptors/grpcSignedToken.js.map +1 -1
- package/dist/interceptors/moduleName.js +7 -79
- package/dist/interceptors/moduleName.js.map +1 -1
- package/dist/metrics/MetricsServer.js +25 -70
- package/dist/metrics/MetricsServer.js.map +1 -1
- package/dist/metrics/clientMiddleware.js +76 -217
- package/dist/metrics/clientMiddleware.js.map +1 -1
- package/dist/metrics/config/defaults.js +1 -1
- package/dist/metrics/config/defaults.js.map +1 -1
- package/dist/metrics/index.js +53 -89
- package/dist/metrics/index.js.map +1 -1
- package/dist/modules/admin/index.js +16 -34
- package/dist/modules/admin/index.js.map +1 -1
- package/dist/modules/authentication/index.js +20 -39
- package/dist/modules/authentication/index.js.map +1 -1
- package/dist/modules/authorization/index.js +29 -47
- package/dist/modules/authorization/index.js.map +1 -1
- package/dist/modules/chat/index.js +16 -34
- package/dist/modules/chat/index.js.map +1 -1
- package/dist/modules/config/index.js +70 -175
- package/dist/modules/config/index.js.map +1 -1
- package/dist/modules/core/index.js +8 -26
- package/dist/modules/core/index.js.map +1 -1
- package/dist/modules/database/index.js +80 -122
- package/dist/modules/database/index.js.map +1 -1
- package/dist/modules/email/index.js +15 -33
- package/dist/modules/email/index.js.map +1 -1
- package/dist/modules/forms/index.js +8 -26
- package/dist/modules/forms/index.js.map +1 -1
- package/dist/modules/functions/index.js +8 -26
- package/dist/modules/functions/index.js.map +1 -1
- package/dist/modules/pushNotifications/index.js +38 -56
- package/dist/modules/pushNotifications/index.js.map +1 -1
- package/dist/modules/router/index.js +18 -36
- package/dist/modules/router/index.js.map +1 -1
- package/dist/modules/sms/index.js +17 -35
- package/dist/modules/sms/index.js.map +1 -1
- package/dist/modules/storage/index.js +17 -36
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/protoUtils/authentication.d.ts +1 -1
- package/dist/protoUtils/authentication.js +165 -146
- package/dist/protoUtils/authentication.js.map +1 -1
- package/dist/protoUtils/authorization.d.ts +1 -1
- package/dist/protoUtils/authorization.js +292 -351
- package/dist/protoUtils/authorization.js.map +1 -1
- package/dist/protoUtils/chat.d.ts +1 -1
- package/dist/protoUtils/chat.js +156 -192
- package/dist/protoUtils/chat.js.map +1 -1
- package/dist/protoUtils/core.d.ts +1 -1
- package/dist/protoUtils/core.js +555 -517
- package/dist/protoUtils/core.js.map +1 -1
- package/dist/protoUtils/database.d.ts +1 -1
- package/dist/protoUtils/database.js +485 -476
- package/dist/protoUtils/database.js.map +1 -1
- package/dist/protoUtils/email.d.ts +1 -1
- package/dist/protoUtils/email.js +157 -185
- package/dist/protoUtils/email.js.map +1 -1
- package/dist/protoUtils/forms.d.ts +1 -1
- package/dist/protoUtils/forms.js +33 -31
- package/dist/protoUtils/forms.js.map +1 -1
- package/dist/protoUtils/functions.d.ts +1 -1
- package/dist/protoUtils/functions.js +33 -31
- package/dist/protoUtils/functions.js.map +1 -1
- package/dist/protoUtils/grpc_health_check.d.ts +1 -1
- package/dist/protoUtils/grpc_health_check.js +32 -30
- package/dist/protoUtils/grpc_health_check.js.map +1 -1
- package/dist/protoUtils/push-notifications.d.ts +1 -1
- package/dist/protoUtils/push-notifications.js +220 -240
- package/dist/protoUtils/push-notifications.js.map +1 -1
- package/dist/protoUtils/router.d.ts +1 -1
- package/dist/protoUtils/router.js +326 -332
- package/dist/protoUtils/router.js.map +1 -1
- package/dist/protoUtils/sms.d.ts +1 -1
- package/dist/protoUtils/sms.js +137 -125
- package/dist/protoUtils/sms.js.map +1 -1
- package/dist/protoUtils/storage.d.ts +1 -1
- package/dist/protoUtils/storage.js +165 -139
- package/dist/protoUtils/storage.js.map +1 -1
- package/dist/routing/ConduitRouteReturn.js +9 -18
- package/dist/routing/ConduitRouteReturn.js.map +1 -1
- package/dist/routing/ProxyRouteBuilder.js +21 -24
- package/dist/routing/ProxyRouteBuilder.js.map +1 -1
- package/dist/routing/RouteBuilder.js +31 -34
- package/dist/routing/RouteBuilder.js.map +1 -1
- package/dist/routing/RoutingManager.js +65 -115
- package/dist/routing/RoutingManager.js.map +1 -1
- package/dist/routing/RoutingUtilities.js +3 -3
- package/dist/routing/RoutingUtilities.js.map +1 -1
- package/dist/routing/wrapRouterFunctions.js +25 -34
- package/dist/routing/wrapRouterFunctions.js.map +1 -1
- package/dist/types/index.js +6 -24
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/EventBus.js +16 -17
- package/dist/utilities/EventBus.js.map +1 -1
- package/dist/utilities/Logger.js +80 -180
- package/dist/utilities/Logger.js.map +1 -1
- package/dist/utilities/RedisManager.js +11 -21
- package/dist/utilities/RedisManager.js.map +1 -1
- package/dist/utilities/StateManager.js +13 -14
- package/dist/utilities/StateManager.js.map +1 -1
- package/dist/utilities/linearBackoffTimeout.js +28 -92
- package/dist/utilities/linearBackoffTimeout.js.map +1 -1
- package/dist/utilities/merge.js +2 -2
- package/dist/utilities/merge.js.map +1 -1
- package/dist/utilities/sleep.js +1 -1
- package/dist/utilities/sleep.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,77 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.PushNotifications = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.initializeClient(push_notifications_1.PushNotificationsDefinition);
|
|
27
|
-
return _this;
|
|
4
|
+
const ConduitModule_1 = require("../../classes/ConduitModule");
|
|
5
|
+
const push_notifications_1 = require("../../protoUtils/push-notifications");
|
|
6
|
+
class PushNotifications extends ConduitModule_1.ConduitModule {
|
|
7
|
+
constructor(moduleName, url, grpcToken) {
|
|
8
|
+
super(moduleName, 'push-notifications', url, grpcToken);
|
|
9
|
+
this.moduleName = moduleName;
|
|
10
|
+
this.initializeClient(push_notifications_1.PushNotificationsDefinition);
|
|
28
11
|
}
|
|
29
|
-
|
|
12
|
+
sendNotificationToken(token, platform, userId) {
|
|
30
13
|
return this.client.setNotificationToken({
|
|
31
|
-
token
|
|
32
|
-
platform
|
|
33
|
-
userId
|
|
34
|
-
}).then(
|
|
14
|
+
token,
|
|
15
|
+
platform,
|
|
16
|
+
userId,
|
|
17
|
+
}).then(res => {
|
|
35
18
|
return JSON.parse(res.newTokenDocument);
|
|
36
19
|
});
|
|
37
|
-
}
|
|
38
|
-
|
|
20
|
+
}
|
|
21
|
+
getNotificationTokens(userId) {
|
|
39
22
|
return this.client.getNotificationTokens({
|
|
40
|
-
userId
|
|
41
|
-
}).then(
|
|
23
|
+
userId,
|
|
24
|
+
}).then(res => {
|
|
42
25
|
return res.tokenDocuments;
|
|
43
26
|
});
|
|
44
|
-
}
|
|
45
|
-
|
|
27
|
+
}
|
|
28
|
+
sendNotification(sendTo, title, body, data, platform) {
|
|
46
29
|
return this.client.sendNotification({
|
|
47
|
-
sendTo
|
|
48
|
-
title
|
|
49
|
-
body
|
|
50
|
-
data
|
|
51
|
-
platform
|
|
52
|
-
}).then(
|
|
30
|
+
sendTo,
|
|
31
|
+
title,
|
|
32
|
+
body,
|
|
33
|
+
data,
|
|
34
|
+
platform,
|
|
35
|
+
}).then(res => {
|
|
53
36
|
return JSON.parse(res.message);
|
|
54
37
|
});
|
|
55
|
-
}
|
|
56
|
-
|
|
38
|
+
}
|
|
39
|
+
sendManyNotifications(notifications) {
|
|
57
40
|
return this.client.sendManyNotifications({
|
|
58
|
-
notifications
|
|
59
|
-
}).then(
|
|
41
|
+
notifications,
|
|
42
|
+
}).then(res => {
|
|
60
43
|
return JSON.parse(res.message);
|
|
61
44
|
});
|
|
62
|
-
}
|
|
63
|
-
|
|
45
|
+
}
|
|
46
|
+
sendNotificationToManyDevices(sendTo, title, body, data, platform) {
|
|
64
47
|
return this.client.sendNotificationToManyDevices({
|
|
65
|
-
sendTo
|
|
66
|
-
title
|
|
67
|
-
body
|
|
68
|
-
data
|
|
69
|
-
platform
|
|
70
|
-
}).then(
|
|
48
|
+
sendTo,
|
|
49
|
+
title,
|
|
50
|
+
body,
|
|
51
|
+
data,
|
|
52
|
+
platform,
|
|
53
|
+
}).then(res => {
|
|
71
54
|
return JSON.parse(res.message);
|
|
72
55
|
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
}(ConduitModule_1.ConduitModule));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
76
58
|
exports.PushNotifications = PushNotifications;
|
|
77
59
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/pushNotifications/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/pushNotifications/index.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,4EAAkF;AAElF,MAAa,iBAAkB,SAAQ,6BAAiD;IACtF,YAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAC9E,KAAK,CAAC,UAAU,EAAE,oBAAoB,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAD7B,eAAU,GAAV,UAAU,CAAQ;QAE7C,IAAI,CAAC,gBAAgB,CAAC,gDAA2B,CAAC,CAAC;IACrD,CAAC;IAED,qBAAqB,CAAC,KAAa,EAAE,QAAgB,EAAE,MAAc;QACnE,OAAO,IAAI,CAAC,MAAO,CAAC,oBAAoB,CAAC;YACvC,KAAK;YACL,QAAQ;YACR,MAAM;SACP,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACZ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,qBAAqB,CAAC,MAAc;QAClC,OAAO,IAAI,CAAC,MAAO,CAAC,qBAAqB,CAAC;YACxC,MAAM;SACP,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACZ,OAAO,GAAG,CAAC,cAAc,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB,CACd,MAAc,EACd,KAAa,EACb,IAAa,EACb,IAAa,EACb,QAAiB;QAEjB,OAAO,IAAI,CAAC,MAAO,CAAC,gBAAgB,CAAC;YACnC,MAAM;YACN,KAAK;YACL,IAAI;YACJ,IAAI;YACJ,QAAQ;SACT,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACZ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,qBAAqB,CACnB,aAEC;QAED,OAAO,IAAI,CAAC,MAAO,CAAC,qBAAqB,CAAC;YACxC,aAAa;SACd,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACZ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,6BAA6B,CAC3B,MAAgB,EAChB,KAAa,EACb,IAAa,EACb,IAAa,EACb,QAAiB;QAEjB,OAAO,IAAI,CAAC,MAAO,CAAC,6BAA6B,CAAC;YAChD,MAAM;YACN,KAAK;YACL,IAAI;YACJ,IAAI;YACJ,QAAQ;SACT,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACZ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAvED,8CAuEC"}
|
|
@@ -1,50 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.Router = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.initializeClient(router_1.RouterDefinition);
|
|
27
|
-
return _this;
|
|
4
|
+
const ConduitModule_1 = require("../../classes/ConduitModule");
|
|
5
|
+
const router_1 = require("../../protoUtils/router");
|
|
6
|
+
class Router extends ConduitModule_1.ConduitModule {
|
|
7
|
+
constructor(moduleName, url, grpcToken) {
|
|
8
|
+
super(moduleName, 'router', url, grpcToken);
|
|
9
|
+
this.moduleName = moduleName;
|
|
10
|
+
this.initializeClient(router_1.RouterDefinition);
|
|
28
11
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
moduleName
|
|
32
|
-
routes: routes.map(
|
|
12
|
+
generateProtoFile(moduleName, routes) {
|
|
13
|
+
const request = {
|
|
14
|
+
moduleName,
|
|
15
|
+
routes: routes.map(r => JSON.stringify(r)),
|
|
33
16
|
};
|
|
34
17
|
return this.client.generateProto(request);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
}
|
|
19
|
+
register(paths, protoFile, url) {
|
|
20
|
+
const request = {
|
|
38
21
|
routes: paths,
|
|
39
22
|
protoFile: protoFile,
|
|
40
23
|
routerUrl: url,
|
|
41
24
|
};
|
|
42
25
|
return this.client.registerConduitRoute(request);
|
|
43
|
-
}
|
|
44
|
-
|
|
26
|
+
}
|
|
27
|
+
socketPush(data) {
|
|
45
28
|
return this.client.socketPush(data);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
}(ConduitModule_1.ConduitModule));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
49
31
|
exports.Router = Router;
|
|
50
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/router/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/router/index.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,oDAMiC;AAOjC,MAAa,MAAO,SAAQ,6BAAsC;IAChE,YAAqB,UAAkB,EAAE,GAAW,EAAE,SAAkB;QACtE,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QADzB,eAAU,GAAV,UAAU,CAAQ;QAErC,IAAI,CAAC,gBAAgB,CAAC,yBAAgB,CAAC,CAAC;IAC1C,CAAC;IAED,iBAAiB,CACf,UAAkB,EAClB,MAA4E;QAE5E,MAAM,OAAO,GAAyB;YACpC,UAAU;YACV,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;SAC3C,CAAC;QACF,OAAO,IAAI,CAAC,MAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED,QAAQ,CACN,KAAmD,EACnD,SAAiB,EACjB,GAAY;QAEZ,MAAM,OAAO,GAAgC;YAC3C,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,GAAG;SACf,CAAC;QACF,OAAO,IAAI,CAAC,MAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED,UAAU,CAAC,IAAgB;QACzB,OAAO,IAAI,CAAC,MAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACF;AAjCD,wBAiCC"}
|
|
@@ -1,41 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.SMS = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.initializeClient(sms_1.SmsDefinition);
|
|
27
|
-
return _this;
|
|
4
|
+
const ConduitModule_1 = require("../../classes/ConduitModule");
|
|
5
|
+
const sms_1 = require("../../protoUtils/sms");
|
|
6
|
+
class SMS extends ConduitModule_1.ConduitModule {
|
|
7
|
+
constructor(moduleName, url, grpcToken) {
|
|
8
|
+
super(moduleName, 'sms', url, grpcToken);
|
|
9
|
+
this.moduleName = moduleName;
|
|
10
|
+
this.initializeClient(sms_1.SmsDefinition);
|
|
28
11
|
}
|
|
29
|
-
|
|
30
|
-
return this.client.sendSms({ to
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return this.client.sendVerificationCode({ to
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return this.client.verify({ verificationSid
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
}(ConduitModule_1.ConduitModule));
|
|
12
|
+
sendSms(to, message) {
|
|
13
|
+
return this.client.sendSms({ to, message });
|
|
14
|
+
}
|
|
15
|
+
sendVerificationCode(to) {
|
|
16
|
+
return this.client.sendVerificationCode({ to });
|
|
17
|
+
}
|
|
18
|
+
verify(verificationSid, code) {
|
|
19
|
+
return this.client.verify({ verificationSid, code });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
40
22
|
exports.SMS = SMS;
|
|
41
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/sms/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/sms/index.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,8CAK8B;AAE9B,MAAa,GAAI,SAAQ,6BAAmC;IAC1D,YAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAC9E,KAAK,CAAC,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QADd,eAAU,GAAV,UAAU,CAAQ;QAE7C,IAAI,CAAC,gBAAgB,CAAC,mBAAa,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,CAAC,EAAU,EAAE,OAAe;QACjC,OAAO,IAAI,CAAC,MAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,oBAAoB,CAAC,EAAU;QAC7B,OAAO,IAAI,CAAC,MAAO,CAAC,oBAAoB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,CAAC,eAAuB,EAAE,IAAY;QAC1C,OAAO,IAAI,CAAC,MAAO,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;CACF;AAjBD,kBAiBC"}
|
|
@@ -1,42 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.Storage = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.initializeClient(storage_1.StorageDefinition);
|
|
27
|
-
return _this;
|
|
4
|
+
const ConduitModule_1 = require("../../classes/ConduitModule");
|
|
5
|
+
const storage_1 = require("../../protoUtils/storage");
|
|
6
|
+
class Storage extends ConduitModule_1.ConduitModule {
|
|
7
|
+
constructor(moduleName, url, grpcToken) {
|
|
8
|
+
super(moduleName, 'storage', url, grpcToken);
|
|
9
|
+
this.moduleName = moduleName;
|
|
10
|
+
this.initializeClient(storage_1.StorageDefinition);
|
|
28
11
|
}
|
|
29
|
-
|
|
30
|
-
return this.client.getFile({ id
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return this.client.getFileData({ id
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return Storage;
|
|
40
|
-
}(ConduitModule_1.ConduitModule));
|
|
12
|
+
getFile(id) {
|
|
13
|
+
return this.client.getFile({ id });
|
|
14
|
+
}
|
|
15
|
+
getFileData(id) {
|
|
16
|
+
return this.client.getFileData({ id });
|
|
17
|
+
}
|
|
18
|
+
createFile(name, mimeType, data, folder, isPublic = false) {
|
|
19
|
+
return this.client.createFile({ name, mimeType, data, folder, isPublic });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
41
22
|
exports.Storage = Storage;
|
|
42
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/storage/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/storage/index.ts"],"names":[],"mappings":";;;AAAA,+DAA4D;AAC5D,sDAIkC;AAElC,MAAa,OAAQ,SAAQ,6BAAuC;IAClE,YAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAC9E,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QADlB,eAAU,GAAV,UAAU,CAAQ;QAE7C,IAAI,CAAC,gBAAgB,CAAC,2BAAiB,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,CAAC,EAAU;QAChB,OAAO,IAAI,CAAC,MAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,WAAW,CAAC,EAAU;QACpB,OAAO,IAAI,CAAC,MAAO,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,UAAU,CACR,IAAY,EACZ,QAAgB,EAChB,IAAY,EACZ,MAAc,EACd,WAAoB,KAAK;QAEzB,OAAO,IAAI,CAAC,MAAO,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAvBD,0BAuBC"}
|
|
@@ -222,7 +222,7 @@ export declare const AuthenticationDefinition: {
|
|
|
222
222
|
};
|
|
223
223
|
};
|
|
224
224
|
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
225
|
-
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
225
|
+
export declare type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
226
226
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
227
227
|
} : Partial<T>;
|
|
228
228
|
export {};
|