@conduitplatform/grpc-sdk 0.13.0-rc.1
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.md +20 -0
- package/dist/classes/ConduitActiveSchema.d.ts +19 -0
- package/dist/classes/ConduitActiveSchema.js +57 -0
- package/dist/classes/ConduitActiveSchema.js.map +1 -0
- package/dist/classes/ConduitMiddleware.d.ts +8 -0
- package/dist/classes/ConduitMiddleware.js +26 -0
- package/dist/classes/ConduitMiddleware.js.map +1 -0
- package/dist/classes/ConduitModule.d.ts +26 -0
- package/dist/classes/ConduitModule.js +170 -0
- package/dist/classes/ConduitModule.js.map +1 -0
- package/dist/classes/ConduitParser.d.ts +20 -0
- package/dist/classes/ConduitParser.js +84 -0
- package/dist/classes/ConduitParser.js.map +1 -0
- package/dist/classes/ConduitRoute.d.ts +12 -0
- package/dist/classes/ConduitRoute.js +44 -0
- package/dist/classes/ConduitRoute.js.map +1 -0
- package/dist/classes/ConduitRouteReturn.d.ts +48 -0
- package/dist/classes/ConduitRouteReturn.js +66 -0
- package/dist/classes/ConduitRouteReturn.js.map +1 -0
- package/dist/classes/ConduitSchema.d.ts +10 -0
- package/dist/classes/ConduitSchema.js +22 -0
- package/dist/classes/ConduitSchema.js.map +1 -0
- package/dist/classes/ConduitSchemaExtension.d.ts +7 -0
- package/dist/classes/ConduitSchemaExtension.js +19 -0
- package/dist/classes/ConduitSchemaExtension.js.map +1 -0
- package/dist/classes/ConduitServiceModule.d.ts +25 -0
- package/dist/classes/ConduitServiceModule.js +139 -0
- package/dist/classes/ConduitServiceModule.js.map +1 -0
- package/dist/classes/ConduitSocket.d.ts +9 -0
- package/dist/classes/ConduitSocket.js +27 -0
- package/dist/classes/ConduitSocket.js.map +1 -0
- package/dist/classes/ConfigController.d.ts +7 -0
- package/dist/classes/ConfigController.js +27 -0
- package/dist/classes/ConfigController.js.map +1 -0
- package/dist/classes/Error.d.ts +11 -0
- package/dist/classes/Error.js +51 -0
- package/dist/classes/Error.js.map +1 -0
- package/dist/classes/GrpcServer.d.ts +19 -0
- package/dist/classes/GrpcServer.js +185 -0
- package/dist/classes/GrpcServer.js.map +1 -0
- package/dist/classes/ManagedModule.d.ts +20 -0
- package/dist/classes/ManagedModule.js +212 -0
- package/dist/classes/ManagedModule.js.map +1 -0
- package/dist/classes/ModuleManager.d.ts +11 -0
- package/dist/classes/ModuleManager.js +191 -0
- package/dist/classes/ModuleManager.js.map +1 -0
- package/dist/classes/Routing/RouteBuilder.d.ts +28 -0
- package/dist/classes/Routing/RouteBuilder.js +107 -0
- package/dist/classes/Routing/RouteBuilder.js.map +1 -0
- package/dist/classes/Routing/RoutingManager.d.ts +25 -0
- package/dist/classes/Routing/RoutingManager.js +193 -0
- package/dist/classes/Routing/RoutingManager.js.map +1 -0
- package/dist/classes/index.d.ts +16 -0
- package/dist/classes/index.js +29 -0
- package/dist/classes/index.js.map +1 -0
- package/dist/constants/enums/PlatformTypesEnum.d.ts +9 -0
- package/dist/constants/enums/PlatformTypesEnum.js +14 -0
- package/dist/constants/enums/PlatformTypesEnum.js.map +1 -0
- package/dist/constants/enums/index.d.ts +1 -0
- package/dist/constants/enums/index.js +14 -0
- package/dist/constants/enums/index.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +14 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/helpers/GrpcHelper.d.ts +8 -0
- package/dist/helpers/GrpcHelper.js +44 -0
- package/dist/helpers/GrpcHelper.js.map +1 -0
- package/dist/helpers/RoutingJsonConstructor.d.ts +9 -0
- package/dist/helpers/RoutingJsonConstructor.js +89 -0
- package/dist/helpers/RoutingJsonConstructor.js.map +1 -0
- package/dist/helpers/RoutingUtilities.d.ts +13 -0
- package/dist/helpers/RoutingUtilities.js +69 -0
- package/dist/helpers/RoutingUtilities.js.map +1 -0
- package/dist/helpers/TypeHelpers.d.ts +44 -0
- package/dist/helpers/TypeHelpers.js +144 -0
- package/dist/helpers/TypeHelpers.js.map +1 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/index.js +18 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/wrapGrpcFunctions.d.ts +5 -0
- package/dist/helpers/wrapGrpcFunctions.js +37 -0
- package/dist/helpers/wrapGrpcFunctions.js.map +1 -0
- package/dist/helpers/wrapRouterFunctions.d.ts +7 -0
- package/dist/helpers/wrapRouterFunctions.js +111 -0
- package/dist/helpers/wrapRouterFunctions.js.map +1 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +481 -0
- package/dist/index.js.map +1 -0
- package/dist/interceptors/grpcSignedToken.d.ts +2 -0
- package/dist/interceptors/grpcSignedToken.js +88 -0
- package/dist/interceptors/grpcSignedToken.js.map +1 -0
- package/dist/interceptors/index.d.ts +2 -0
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/moduleName.d.ts +2 -0
- package/dist/interceptors/moduleName.js +88 -0
- package/dist/interceptors/moduleName.js.map +1 -0
- package/dist/interfaces/ConduitService.d.ts +8 -0
- package/dist/interfaces/ConduitService.js +3 -0
- package/dist/interfaces/ConduitService.js.map +1 -0
- package/dist/interfaces/GrpcCallback.d.ts +4 -0
- package/dist/interfaces/GrpcCallback.js +3 -0
- package/dist/interfaces/GrpcCallback.js.map +1 -0
- package/dist/interfaces/Indexable.d.ts +9 -0
- package/dist/interfaces/Indexable.js +3 -0
- package/dist/interfaces/Indexable.js.map +1 -0
- package/dist/interfaces/Middleware.d.ts +7 -0
- package/dist/interfaces/Middleware.js +3 -0
- package/dist/interfaces/Middleware.js.map +1 -0
- package/dist/interfaces/Model.d.ts +37 -0
- package/dist/interfaces/Model.js +19 -0
- package/dist/interfaces/Model.js.map +1 -0
- package/dist/interfaces/Route.d.ts +54 -0
- package/dist/interfaces/Route.js +21 -0
- package/dist/interfaces/Route.js.map +1 -0
- package/dist/interfaces/Socket.d.ts +34 -0
- package/dist/interfaces/Socket.js +9 -0
- package/dist/interfaces/Socket.js.map +1 -0
- package/dist/interfaces/index.d.ts +7 -0
- package/dist/interfaces/index.js +20 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/modules/admin/index.d.ts +13 -0
- package/dist/modules/admin/index.js +131 -0
- package/dist/modules/admin/index.js.map +1 -0
- package/dist/modules/authentication/index.d.ts +11 -0
- package/dist/modules/authentication/index.js +50 -0
- package/dist/modules/authentication/index.js.map +1 -0
- package/dist/modules/chat/index.d.ts +10 -0
- package/dist/modules/chat/index.js +46 -0
- package/dist/modules/chat/index.js.map +1 -0
- package/dist/modules/config/index.d.ts +25 -0
- package/dist/modules/config/index.js +234 -0
- package/dist/modules/config/index.js.map +1 -0
- package/dist/modules/core/index.d.ts +6 -0
- package/dist/modules/core/index.js +32 -0
- package/dist/modules/core/index.js.map +1 -0
- package/dist/modules/database/index.d.ts +30 -0
- package/dist/modules/database/index.js +201 -0
- package/dist/modules/database/index.js.map +1 -0
- package/dist/modules/email/index.d.ts +21 -0
- package/dist/modules/email/index.js +63 -0
- package/dist/modules/email/index.js.map +1 -0
- package/dist/modules/forms/index.d.ts +7 -0
- package/dist/modules/forms/index.js +37 -0
- package/dist/modules/forms/index.js.map +1 -0
- package/dist/modules/index.d.ts +11 -0
- package/dist/modules/index.js +24 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/pushNotifications/index.d.ts +10 -0
- package/dist/modules/pushNotifications/index.js +63 -0
- package/dist/modules/pushNotifications/index.js.map +1 -0
- package/dist/modules/router/index.d.ts +8 -0
- package/dist/modules/router/index.js +43 -0
- package/dist/modules/router/index.js.map +1 -0
- package/dist/modules/sms/index.d.ts +10 -0
- package/dist/modules/sms/index.js +46 -0
- package/dist/modules/sms/index.js.map +1 -0
- package/dist/modules/storage/index.d.ts +10 -0
- package/dist/modules/storage/index.js +47 -0
- package/dist/modules/storage/index.js.map +1 -0
- package/dist/protoUtils/authentication.d.ts +209 -0
- package/dist/protoUtils/authentication.js +533 -0
- package/dist/protoUtils/authentication.js.map +1 -0
- package/dist/protoUtils/chat.d.ts +178 -0
- package/dist/protoUtils/chat.js +534 -0
- package/dist/protoUtils/chat.js.map +1 -0
- package/dist/protoUtils/core.d.ts +607 -0
- package/dist/protoUtils/core.js +1883 -0
- package/dist/protoUtils/core.js.map +1 -0
- package/dist/protoUtils/database.d.ts +496 -0
- package/dist/protoUtils/database.js +1275 -0
- package/dist/protoUtils/database.js.map +1 -0
- package/dist/protoUtils/email.d.ts +153 -0
- package/dist/protoUtils/email.js +543 -0
- package/dist/protoUtils/email.js.map +1 -0
- package/dist/protoUtils/forms.d.ts +54 -0
- package/dist/protoUtils/forms.js +141 -0
- package/dist/protoUtils/forms.js.map +1 -0
- package/dist/protoUtils/grpc_health_check.d.ts +83 -0
- package/dist/protoUtils/grpc_health_check.js +197 -0
- package/dist/protoUtils/grpc_health_check.js.map +1 -0
- package/dist/protoUtils/push-notifications.d.ts +179 -0
- package/dist/protoUtils/push-notifications.js +512 -0
- package/dist/protoUtils/push-notifications.js.map +1 -0
- package/dist/protoUtils/sms.d.ts +176 -0
- package/dist/protoUtils/sms.js +459 -0
- package/dist/protoUtils/sms.js.map +1 -0
- package/dist/protoUtils/storage.d.ts +203 -0
- package/dist/protoUtils/storage.js +522 -0
- package/dist/protoUtils/storage.js.map +1 -0
- package/dist/types/index.d.ts +55 -0
- package/dist/types/index.js +37 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utilities/EventBus.d.ts +10 -0
- package/dist/utilities/EventBus.js +52 -0
- package/dist/utilities/EventBus.js.map +1 -0
- package/dist/utilities/RedisManager.d.ts +6 -0
- package/dist/utilities/RedisManager.js +32 -0
- package/dist/utilities/RedisManager.js.map +1 -0
- package/dist/utilities/StateManager.d.ts +10 -0
- package/dist/utilities/StateManager.js +31 -0
- package/dist/utilities/StateManager.js.map +1 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.js +10 -0
- package/dist/utilities/index.js.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.Email = void 0;
|
|
19
|
+
var ConduitModule_1 = require("../../classes/ConduitModule");
|
|
20
|
+
var email_1 = require("../../protoUtils/email");
|
|
21
|
+
var Email = /** @class */ (function (_super) {
|
|
22
|
+
__extends(Email, _super);
|
|
23
|
+
function Email(moduleName, url, grpcToken) {
|
|
24
|
+
var _this = _super.call(this, moduleName, 'email', url, grpcToken) || this;
|
|
25
|
+
_this.moduleName = moduleName;
|
|
26
|
+
_this.initializeClient(email_1.EmailDefinition);
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
Email.prototype.setConfig = function (newConfig) {
|
|
30
|
+
return this.client.setConfig({ newConfig: JSON.stringify(newConfig) }).then(function (res) {
|
|
31
|
+
return JSON.parse(res.updatedConfig);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Email.prototype.registerTemplate = function (template) {
|
|
35
|
+
return this.client.registerTemplate({
|
|
36
|
+
name: template.name,
|
|
37
|
+
subject: template.subject,
|
|
38
|
+
body: template.body,
|
|
39
|
+
variables: template.variables,
|
|
40
|
+
}).then(function (res) {
|
|
41
|
+
return JSON.parse(res.template);
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Email.prototype.sendEmail = function (templateName, params) {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
return this.client.sendEmail({
|
|
47
|
+
templateName: templateName,
|
|
48
|
+
params: {
|
|
49
|
+
email: params.email,
|
|
50
|
+
variables: JSON.stringify(params.variables),
|
|
51
|
+
sender: params.sender,
|
|
52
|
+
replyTo: params.replyTo,
|
|
53
|
+
cc: (_a = params.cc) !== null && _a !== void 0 ? _a : [],
|
|
54
|
+
attachments: (_b = params.attachments) !== null && _b !== void 0 ? _b : [],
|
|
55
|
+
},
|
|
56
|
+
}).then(function (res) {
|
|
57
|
+
return res.sentMessageInfo;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
return Email;
|
|
61
|
+
}(ConduitModule_1.ConduitModule));
|
|
62
|
+
exports.Email = Email;
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/email/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,gDAAyD;AAEzD;IAA2B,yBAAqC;IAC9D,eAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAhF,YACE,kBAAM,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,SAE3C;QAH4B,gBAAU,GAAV,UAAU,CAAQ;QAE7C,KAAI,CAAC,gBAAgB,CAAC,uBAAe,CAAC,CAAC;;IACzC,CAAC;IAED,yBAAS,GAAT,UAAU,SAAc;QACtB,OAAO,IAAI,CAAC,MAAO,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YAC9E,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gCAAgB,GAAhB,UAAiB,QAKhB;QACC,OAAO,IAAI,CAAC,MAAO,CAAC,gBAAgB,CAAC;YACnC,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,SAAS,EAAE,QAAQ,CAAC,SAAS;SAC9B,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YACT,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,yBAAS,GAAT,UACE,YAAoB,EACpB,MAOC;;QAED,OAAO,IAAI,CAAC,MAAO,CAAC,SAAS,CAAC;YAC5B,YAAY,cAAA;YACZ,MAAM,EAAE;gBACN,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC;gBAC3C,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,EAAE,EAAE,MAAA,MAAM,CAAC,EAAE,mCAAI,EAAE;gBACnB,WAAW,EAAE,MAAA,MAAM,CAAC,WAAW,mCAAI,EAAE;aACtC;SACF,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YACT,OAAO,GAAG,CAAC,eAAe,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC;IACH,YAAC;AAAD,CAAC,AArDD,CAA2B,6BAAa,GAqDvC;AArDY,sBAAK"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConduitModule } from '../../classes/ConduitModule';
|
|
2
|
+
import { FormsDefinition } from '../../protoUtils/forms';
|
|
3
|
+
export declare class Forms extends ConduitModule<typeof FormsDefinition> {
|
|
4
|
+
private readonly moduleName;
|
|
5
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
6
|
+
setConfig(newConfig: any): Promise<any>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.Forms = void 0;
|
|
19
|
+
var ConduitModule_1 = require("../../classes/ConduitModule");
|
|
20
|
+
var forms_1 = require("../../protoUtils/forms");
|
|
21
|
+
var Forms = /** @class */ (function (_super) {
|
|
22
|
+
__extends(Forms, _super);
|
|
23
|
+
function Forms(moduleName, url, grpcToken) {
|
|
24
|
+
var _this = _super.call(this, moduleName, 'forms', url, grpcToken) || this;
|
|
25
|
+
_this.moduleName = moduleName;
|
|
26
|
+
_this.initializeClient(forms_1.FormsDefinition);
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
Forms.prototype.setConfig = function (newConfig) {
|
|
30
|
+
return this.client.setConfig({ newConfig: JSON.stringify(newConfig) }).then(function (res) {
|
|
31
|
+
return JSON.parse(res.updatedConfig);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
return Forms;
|
|
35
|
+
}(ConduitModule_1.ConduitModule));
|
|
36
|
+
exports.Forms = Forms;
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/forms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,gDAAyD;AAEzD;IAA2B,yBAAqC;IAC9D,eAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAhF,YACE,kBAAM,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,SAE3C;QAH4B,gBAAU,GAAV,UAAU,CAAQ;QAE7C,KAAI,CAAC,gBAAgB,CAAC,uBAAe,CAAC,CAAC;;IACzC,CAAC;IAED,yBAAS,GAAT,UAAU,SAAc;QACtB,OAAO,IAAI,CAAC,MAAO,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YAC9E,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;IACH,YAAC;AAAD,CAAC,AAXD,CAA2B,6BAAa,GAWvC;AAXY,sBAAK"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './storage';
|
|
2
|
+
export * from './router';
|
|
3
|
+
export * from './email';
|
|
4
|
+
export * from './database';
|
|
5
|
+
export * from './config';
|
|
6
|
+
export * from './core';
|
|
7
|
+
export * from './admin';
|
|
8
|
+
export * from './pushNotifications';
|
|
9
|
+
export * from './sms';
|
|
10
|
+
export * from './chat';
|
|
11
|
+
export * from './forms';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./storage"), exports);
|
|
14
|
+
__exportStar(require("./router"), exports);
|
|
15
|
+
__exportStar(require("./email"), exports);
|
|
16
|
+
__exportStar(require("./database"), exports);
|
|
17
|
+
__exportStar(require("./config"), exports);
|
|
18
|
+
__exportStar(require("./core"), exports);
|
|
19
|
+
__exportStar(require("./admin"), exports);
|
|
20
|
+
__exportStar(require("./pushNotifications"), exports);
|
|
21
|
+
__exportStar(require("./sms"), exports);
|
|
22
|
+
__exportStar(require("./chat"), exports);
|
|
23
|
+
__exportStar(require("./forms"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,0CAAwB;AACxB,sDAAoC;AACpC,wCAAsB;AACtB,yCAAuB;AACvB,0CAAwB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConduitModule } from '../../classes/ConduitModule';
|
|
2
|
+
import { PushNotificationsDefinition } from '../../protoUtils/push-notifications';
|
|
3
|
+
export declare class PushNotifications extends ConduitModule<typeof PushNotificationsDefinition> {
|
|
4
|
+
private readonly moduleName;
|
|
5
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
6
|
+
setConfig(newConfig: any): Promise<any>;
|
|
7
|
+
sendNotificationToken(token: string, platform: string, userId: string): Promise<any>;
|
|
8
|
+
getNotificationTokens(userId: string): Promise<string[]>;
|
|
9
|
+
sendNotification(sendTo: string, title: string, body?: string, data?: string): Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PushNotifications = void 0;
|
|
19
|
+
var ConduitModule_1 = require("../../classes/ConduitModule");
|
|
20
|
+
var push_notifications_1 = require("../../protoUtils/push-notifications");
|
|
21
|
+
var PushNotifications = /** @class */ (function (_super) {
|
|
22
|
+
__extends(PushNotifications, _super);
|
|
23
|
+
function PushNotifications(moduleName, url, grpcToken) {
|
|
24
|
+
var _this = _super.call(this, moduleName, 'push-notifications', url, grpcToken) || this;
|
|
25
|
+
_this.moduleName = moduleName;
|
|
26
|
+
_this.initializeClient(push_notifications_1.PushNotificationsDefinition);
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
PushNotifications.prototype.setConfig = function (newConfig) {
|
|
30
|
+
return this.client.setConfig({ newConfig: JSON.stringify(newConfig) }).then(function (res) {
|
|
31
|
+
return JSON.parse(res.updatedConfig);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
PushNotifications.prototype.sendNotificationToken = function (token, platform, userId) {
|
|
35
|
+
return this.client.setNotificationToken({
|
|
36
|
+
token: token,
|
|
37
|
+
platform: platform,
|
|
38
|
+
userId: userId,
|
|
39
|
+
}).then(function (res) {
|
|
40
|
+
return JSON.parse(res.newTokenDocument);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
PushNotifications.prototype.getNotificationTokens = function (userId) {
|
|
44
|
+
return this.client.getNotificationTokens({
|
|
45
|
+
userId: userId,
|
|
46
|
+
}).then(function (res) {
|
|
47
|
+
return res.tokenDocuments;
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
PushNotifications.prototype.sendNotification = function (sendTo, title, body, data) {
|
|
51
|
+
return this.client.sendNotification({
|
|
52
|
+
sendTo: sendTo,
|
|
53
|
+
title: title,
|
|
54
|
+
body: body,
|
|
55
|
+
data: data,
|
|
56
|
+
}).then(function (res) {
|
|
57
|
+
return JSON.parse(res.message);
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
return PushNotifications;
|
|
61
|
+
}(ConduitModule_1.ConduitModule));
|
|
62
|
+
exports.PushNotifications = PushNotifications;
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/pushNotifications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,0EAAkF;AAElF;IAAuC,qCAAiD;IACtF,2BAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAhF,YACE,kBAAM,UAAU,EAAE,oBAAoB,EAAE,GAAG,EAAE,SAAS,CAAC,SAExD;QAH4B,gBAAU,GAAV,UAAU,CAAQ;QAE7C,KAAI,CAAC,gBAAgB,CAAC,gDAA2B,CAAC,CAAC;;IACrD,CAAC;IAED,qCAAS,GAAT,UAAU,SAAc;QACtB,OAAO,IAAI,CAAC,MAAO,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YAC9E,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iDAAqB,GAArB,UAAsB,KAAa,EAAE,QAAgB,EAAE,MAAc;QACnE,OAAO,IAAI,CAAC,MAAO,CAAC,oBAAoB,CAAC;YACvC,KAAK,OAAA;YACL,QAAQ,UAAA;YACR,MAAM,QAAA;SACP,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YACT,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iDAAqB,GAArB,UAAsB,MAAc;QAClC,OAAO,IAAI,CAAC,MAAO,CAAC,qBAAqB,CAAC;YACxC,MAAM,QAAA;SACP,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YACT,OAAO,GAAG,CAAC,cAAc,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC;IAED,4CAAgB,GAAhB,UAAiB,MAAc,EAAE,KAAa,EAAE,IAAa,EAAE,IAAa;QAC1E,OAAO,IAAI,CAAC,MAAO,CAAC,gBAAgB,CAAC;YACnC,MAAM,QAAA;YACN,KAAK,OAAA;YACL,IAAI,MAAA;YACJ,IAAI,MAAA;SACL,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YACT,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IACH,wBAAC;AAAD,CAAC,AAxCD,CAAuC,6BAAa,GAwCnD;AAxCY,8CAAiB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConduitModule } from '../../classes/ConduitModule';
|
|
2
|
+
import { RouterDefinition, SocketData } from '../../protoUtils/core';
|
|
3
|
+
export declare class Router extends ConduitModule<typeof RouterDefinition> {
|
|
4
|
+
readonly moduleName: string;
|
|
5
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
6
|
+
register(paths: any[], protoFile: string, url?: string): Promise<any>;
|
|
7
|
+
socketPush(data: SocketData): Promise<import("../../protoUtils/core").Empty>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.Router = void 0;
|
|
19
|
+
var ConduitModule_1 = require("../../classes/ConduitModule");
|
|
20
|
+
var core_1 = require("../../protoUtils/core");
|
|
21
|
+
var Router = /** @class */ (function (_super) {
|
|
22
|
+
__extends(Router, _super);
|
|
23
|
+
function Router(moduleName, url, grpcToken) {
|
|
24
|
+
var _this = _super.call(this, moduleName, 'router', url, grpcToken) || this;
|
|
25
|
+
_this.moduleName = moduleName;
|
|
26
|
+
_this.initializeClient(core_1.RouterDefinition);
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
Router.prototype.register = function (paths, protoFile, url) {
|
|
30
|
+
var request = {
|
|
31
|
+
routes: paths,
|
|
32
|
+
protoFile: protoFile,
|
|
33
|
+
routerUrl: url,
|
|
34
|
+
};
|
|
35
|
+
return this.client.registerConduitRoute(request);
|
|
36
|
+
};
|
|
37
|
+
Router.prototype.socketPush = function (data) {
|
|
38
|
+
return this.client.socketPush(data);
|
|
39
|
+
};
|
|
40
|
+
return Router;
|
|
41
|
+
}(ConduitModule_1.ConduitModule));
|
|
42
|
+
exports.Router = Router;
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/router/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,8CAAqE;AAErE;IAA4B,0BAAsC;IAChE,gBAAqB,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAxE,YACE,kBAAM,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,CAAC,SAE5C;QAHoB,gBAAU,GAAV,UAAU,CAAQ;QAErC,KAAI,CAAC,gBAAgB,CAAC,uBAAgB,CAAC,CAAC;;IAC1C,CAAC;IAED,yBAAQ,GAAR,UAAS,KAAY,EAAE,SAAiB,EAAE,GAAY;QACpD,IAAM,OAAO,GAAG;YACd,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,2BAAU,GAAV,UAAW,IAAgB;QACzB,OAAO,IAAI,CAAC,MAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IACH,aAAC;AAAD,CAAC,AAlBD,CAA4B,6BAAa,GAkBxC;AAlBY,wBAAM"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConduitModule } from '../../classes/ConduitModule';
|
|
2
|
+
import { SendSmsResponse, SendVerificationCodeResponse, SmsDefinition, VerifyResponse } from '../../protoUtils/sms';
|
|
3
|
+
export declare class SMS extends ConduitModule<typeof SmsDefinition> {
|
|
4
|
+
private readonly moduleName;
|
|
5
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
6
|
+
setConfig(newConfig: any): Promise<any>;
|
|
7
|
+
sendSms(to: string, message: string): Promise<SendSmsResponse>;
|
|
8
|
+
sendVerificationCode(to: string): Promise<SendVerificationCodeResponse>;
|
|
9
|
+
verify(verificationSid: string, code: string): Promise<VerifyResponse>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SMS = void 0;
|
|
19
|
+
var ConduitModule_1 = require("../../classes/ConduitModule");
|
|
20
|
+
var sms_1 = require("../../protoUtils/sms");
|
|
21
|
+
var SMS = /** @class */ (function (_super) {
|
|
22
|
+
__extends(SMS, _super);
|
|
23
|
+
function SMS(moduleName, url, grpcToken) {
|
|
24
|
+
var _this = _super.call(this, moduleName, 'sms', url, grpcToken) || this;
|
|
25
|
+
_this.moduleName = moduleName;
|
|
26
|
+
_this.initializeClient(sms_1.SmsDefinition);
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
SMS.prototype.setConfig = function (newConfig) {
|
|
30
|
+
return this.client.setConfig({ newConfig: JSON.stringify(newConfig) }).then(function (res) {
|
|
31
|
+
return JSON.parse(res.updatedConfig);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
SMS.prototype.sendSms = function (to, message) {
|
|
35
|
+
return this.client.sendSms({ to: to, message: message });
|
|
36
|
+
};
|
|
37
|
+
SMS.prototype.sendVerificationCode = function (to) {
|
|
38
|
+
return this.client.sendVerificationCode({ to: to });
|
|
39
|
+
};
|
|
40
|
+
SMS.prototype.verify = function (verificationSid, code) {
|
|
41
|
+
return this.client.verify({ verificationSid: verificationSid, code: code });
|
|
42
|
+
};
|
|
43
|
+
return SMS;
|
|
44
|
+
}(ConduitModule_1.ConduitModule));
|
|
45
|
+
exports.SMS = SMS;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/sms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,4CAK8B;AAE9B;IAAyB,uBAAmC;IAC1D,aAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAhF,YACE,kBAAM,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,CAAC,SAEzC;QAH4B,gBAAU,GAAV,UAAU,CAAQ;QAE7C,KAAI,CAAC,gBAAgB,CAAC,mBAAa,CAAC,CAAC;;IACvC,CAAC;IAED,uBAAS,GAAT,UAAU,SAAc;QACtB,OAAO,IAAI,CAAC,MAAO,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YAC9E,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,qBAAO,GAAP,UAAQ,EAAU,EAAE,OAAe;QACjC,OAAO,IAAI,CAAC,MAAO,CAAC,OAAO,CAAC,EAAE,EAAE,IAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,kCAAoB,GAApB,UAAqB,EAAU;QAC7B,OAAO,IAAI,CAAC,MAAO,CAAC,oBAAoB,CAAC,EAAE,EAAE,IAAA,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,oBAAM,GAAN,UAAO,eAAuB,EAAE,IAAY;QAC1C,OAAO,IAAI,CAAC,MAAO,CAAC,MAAM,CAAC,EAAE,eAAe,iBAAA,EAAE,IAAI,MAAA,EAAE,CAAC,CAAC;IACxD,CAAC;IACH,UAAC;AAAD,CAAC,AAvBD,CAAyB,6BAAa,GAuBrC;AAvBY,kBAAG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConduitModule } from '../../classes/ConduitModule';
|
|
2
|
+
import { FileResponse, GetFileDataResponse, SetConfigResponse, StorageDefinition } from '../../protoUtils/storage';
|
|
3
|
+
export declare class Storage extends ConduitModule<typeof StorageDefinition> {
|
|
4
|
+
private readonly moduleName;
|
|
5
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
6
|
+
setConfig(newConfig: any): Promise<SetConfigResponse>;
|
|
7
|
+
getFile(id: string): Promise<FileResponse>;
|
|
8
|
+
getFileData(id: string): Promise<GetFileDataResponse>;
|
|
9
|
+
createFile(name: string, mimeType: string, data: string, folder: string, isPublic?: boolean): Promise<FileResponse>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.Storage = void 0;
|
|
19
|
+
var ConduitModule_1 = require("../../classes/ConduitModule");
|
|
20
|
+
var storage_1 = require("../../protoUtils/storage");
|
|
21
|
+
var Storage = /** @class */ (function (_super) {
|
|
22
|
+
__extends(Storage, _super);
|
|
23
|
+
function Storage(moduleName, url, grpcToken) {
|
|
24
|
+
var _this = _super.call(this, moduleName, 'storage', url, grpcToken) || this;
|
|
25
|
+
_this.moduleName = moduleName;
|
|
26
|
+
_this.initializeClient(storage_1.StorageDefinition);
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
Storage.prototype.setConfig = function (newConfig) {
|
|
30
|
+
return this.client.setConfig({ newConfig: JSON.stringify(newConfig) }).then(function (res) {
|
|
31
|
+
return JSON.parse(res.updatedConfig);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Storage.prototype.getFile = function (id) {
|
|
35
|
+
return this.client.getFile({ id: id });
|
|
36
|
+
};
|
|
37
|
+
Storage.prototype.getFileData = function (id) {
|
|
38
|
+
return this.client.getFileData({ id: id });
|
|
39
|
+
};
|
|
40
|
+
Storage.prototype.createFile = function (name, mimeType, data, folder, isPublic) {
|
|
41
|
+
if (isPublic === void 0) { isPublic = false; }
|
|
42
|
+
return this.client.createFile({ name: name, mimeType: mimeType, data: data, folder: folder, isPublic: isPublic });
|
|
43
|
+
};
|
|
44
|
+
return Storage;
|
|
45
|
+
}(ConduitModule_1.ConduitModule));
|
|
46
|
+
exports.Storage = Storage;
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/storage/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,oDAKkC;AAElC;IAA6B,2BAAuC;IAClE,iBAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAhF,YACE,kBAAM,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,CAAC,SAE7C;QAH4B,gBAAU,GAAV,UAAU,CAAQ;QAE7C,KAAI,CAAC,gBAAgB,CAAC,2BAAiB,CAAC,CAAC;;IAC3C,CAAC;IAED,2BAAS,GAAT,UAAU,SAAc;QACtB,OAAO,IAAI,CAAC,MAAO,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAA,GAAG;YAC9E,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,yBAAO,GAAP,UAAQ,EAAU;QAChB,OAAO,IAAI,CAAC,MAAO,CAAC,OAAO,CAAC,EAAE,EAAE,IAAA,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,6BAAW,GAAX,UAAY,EAAU;QACpB,OAAO,IAAI,CAAC,MAAO,CAAC,WAAW,CAAC,EAAE,EAAE,IAAA,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,4BAAU,GAAV,UACE,IAAY,EACZ,QAAgB,EAChB,IAAY,EACZ,MAAc,EACd,QAAyB;QAAzB,yBAAA,EAAA,gBAAyB;QAEzB,OAAO,IAAI,CAAC,MAAO,CAAC,UAAU,CAAC,EAAE,IAAI,MAAA,EAAE,QAAQ,UAAA,EAAE,IAAI,MAAA,EAAE,MAAM,QAAA,EAAE,QAAQ,UAAA,EAAE,CAAC,CAAC;IAC7E,CAAC;IACH,cAAC;AAAD,CAAC,AA7BD,CAA6B,6BAAa,GA6BzC;AA7BY,0BAAO"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import * as _m0 from 'protobufjs/minimal';
|
|
2
|
+
export declare const protobufPackage = "authentication";
|
|
3
|
+
export interface SetConfigRequest {
|
|
4
|
+
newConfig: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UserLoginRequest {
|
|
7
|
+
userId: string;
|
|
8
|
+
clientId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UserCreateRequest {
|
|
11
|
+
email: string;
|
|
12
|
+
password?: string | undefined;
|
|
13
|
+
verify: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface UserChangePass {
|
|
16
|
+
email: string;
|
|
17
|
+
password?: string | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface UserDeleteRequest {
|
|
20
|
+
userId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SetConfigResponse {
|
|
23
|
+
updatedConfig: string;
|
|
24
|
+
}
|
|
25
|
+
export interface UserLoginResponse {
|
|
26
|
+
accessToken: string;
|
|
27
|
+
refreshToken: string;
|
|
28
|
+
}
|
|
29
|
+
export interface UserDeleteResponse {
|
|
30
|
+
message: string;
|
|
31
|
+
}
|
|
32
|
+
export interface UserCreateResponse {
|
|
33
|
+
password?: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
export declare const SetConfigRequest: {
|
|
36
|
+
encode(message: SetConfigRequest, writer?: _m0.Writer): _m0.Writer;
|
|
37
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SetConfigRequest;
|
|
38
|
+
fromJSON(object: any): SetConfigRequest;
|
|
39
|
+
toJSON(message: SetConfigRequest): unknown;
|
|
40
|
+
fromPartial(object: DeepPartial<SetConfigRequest>): SetConfigRequest;
|
|
41
|
+
};
|
|
42
|
+
export declare const UserLoginRequest: {
|
|
43
|
+
encode(message: UserLoginRequest, writer?: _m0.Writer): _m0.Writer;
|
|
44
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserLoginRequest;
|
|
45
|
+
fromJSON(object: any): UserLoginRequest;
|
|
46
|
+
toJSON(message: UserLoginRequest): unknown;
|
|
47
|
+
fromPartial(object: DeepPartial<UserLoginRequest>): UserLoginRequest;
|
|
48
|
+
};
|
|
49
|
+
export declare const UserCreateRequest: {
|
|
50
|
+
encode(message: UserCreateRequest, writer?: _m0.Writer): _m0.Writer;
|
|
51
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserCreateRequest;
|
|
52
|
+
fromJSON(object: any): UserCreateRequest;
|
|
53
|
+
toJSON(message: UserCreateRequest): unknown;
|
|
54
|
+
fromPartial(object: DeepPartial<UserCreateRequest>): UserCreateRequest;
|
|
55
|
+
};
|
|
56
|
+
export declare const UserChangePass: {
|
|
57
|
+
encode(message: UserChangePass, writer?: _m0.Writer): _m0.Writer;
|
|
58
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserChangePass;
|
|
59
|
+
fromJSON(object: any): UserChangePass;
|
|
60
|
+
toJSON(message: UserChangePass): unknown;
|
|
61
|
+
fromPartial(object: DeepPartial<UserChangePass>): UserChangePass;
|
|
62
|
+
};
|
|
63
|
+
export declare const UserDeleteRequest: {
|
|
64
|
+
encode(message: UserDeleteRequest, writer?: _m0.Writer): _m0.Writer;
|
|
65
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserDeleteRequest;
|
|
66
|
+
fromJSON(object: any): UserDeleteRequest;
|
|
67
|
+
toJSON(message: UserDeleteRequest): unknown;
|
|
68
|
+
fromPartial(object: DeepPartial<UserDeleteRequest>): UserDeleteRequest;
|
|
69
|
+
};
|
|
70
|
+
export declare const SetConfigResponse: {
|
|
71
|
+
encode(message: SetConfigResponse, writer?: _m0.Writer): _m0.Writer;
|
|
72
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SetConfigResponse;
|
|
73
|
+
fromJSON(object: any): SetConfigResponse;
|
|
74
|
+
toJSON(message: SetConfigResponse): unknown;
|
|
75
|
+
fromPartial(object: DeepPartial<SetConfigResponse>): SetConfigResponse;
|
|
76
|
+
};
|
|
77
|
+
export declare const UserLoginResponse: {
|
|
78
|
+
encode(message: UserLoginResponse, writer?: _m0.Writer): _m0.Writer;
|
|
79
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserLoginResponse;
|
|
80
|
+
fromJSON(object: any): UserLoginResponse;
|
|
81
|
+
toJSON(message: UserLoginResponse): unknown;
|
|
82
|
+
fromPartial(object: DeepPartial<UserLoginResponse>): UserLoginResponse;
|
|
83
|
+
};
|
|
84
|
+
export declare const UserDeleteResponse: {
|
|
85
|
+
encode(message: UserDeleteResponse, writer?: _m0.Writer): _m0.Writer;
|
|
86
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserDeleteResponse;
|
|
87
|
+
fromJSON(object: any): UserDeleteResponse;
|
|
88
|
+
toJSON(message: UserDeleteResponse): unknown;
|
|
89
|
+
fromPartial(object: DeepPartial<UserDeleteResponse>): UserDeleteResponse;
|
|
90
|
+
};
|
|
91
|
+
export declare const UserCreateResponse: {
|
|
92
|
+
encode(message: UserCreateResponse, writer?: _m0.Writer): _m0.Writer;
|
|
93
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserCreateResponse;
|
|
94
|
+
fromJSON(object: any): UserCreateResponse;
|
|
95
|
+
toJSON(message: UserCreateResponse): unknown;
|
|
96
|
+
fromPartial(object: DeepPartial<UserCreateResponse>): UserCreateResponse;
|
|
97
|
+
};
|
|
98
|
+
export declare type AuthenticationDefinition = typeof AuthenticationDefinition;
|
|
99
|
+
export declare const AuthenticationDefinition: {
|
|
100
|
+
readonly name: "Authentication";
|
|
101
|
+
readonly fullName: "authentication.Authentication";
|
|
102
|
+
readonly methods: {
|
|
103
|
+
readonly setConfig: {
|
|
104
|
+
readonly name: "SetConfig";
|
|
105
|
+
readonly requestType: {
|
|
106
|
+
encode(message: SetConfigRequest, writer?: _m0.Writer): _m0.Writer;
|
|
107
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SetConfigRequest;
|
|
108
|
+
fromJSON(object: any): SetConfigRequest;
|
|
109
|
+
toJSON(message: SetConfigRequest): unknown;
|
|
110
|
+
fromPartial(object: DeepPartial<SetConfigRequest>): SetConfigRequest;
|
|
111
|
+
};
|
|
112
|
+
readonly requestStream: false;
|
|
113
|
+
readonly responseType: {
|
|
114
|
+
encode(message: SetConfigResponse, writer?: _m0.Writer): _m0.Writer;
|
|
115
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SetConfigResponse;
|
|
116
|
+
fromJSON(object: any): SetConfigResponse;
|
|
117
|
+
toJSON(message: SetConfigResponse): unknown;
|
|
118
|
+
fromPartial(object: DeepPartial<SetConfigResponse>): SetConfigResponse;
|
|
119
|
+
};
|
|
120
|
+
readonly responseStream: false;
|
|
121
|
+
readonly options: {};
|
|
122
|
+
};
|
|
123
|
+
readonly userLogin: {
|
|
124
|
+
readonly name: "UserLogin";
|
|
125
|
+
readonly requestType: {
|
|
126
|
+
encode(message: UserLoginRequest, writer?: _m0.Writer): _m0.Writer;
|
|
127
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserLoginRequest;
|
|
128
|
+
fromJSON(object: any): UserLoginRequest;
|
|
129
|
+
toJSON(message: UserLoginRequest): unknown;
|
|
130
|
+
fromPartial(object: DeepPartial<UserLoginRequest>): UserLoginRequest;
|
|
131
|
+
};
|
|
132
|
+
readonly requestStream: false;
|
|
133
|
+
readonly responseType: {
|
|
134
|
+
encode(message: UserLoginResponse, writer?: _m0.Writer): _m0.Writer;
|
|
135
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserLoginResponse;
|
|
136
|
+
fromJSON(object: any): UserLoginResponse;
|
|
137
|
+
toJSON(message: UserLoginResponse): unknown;
|
|
138
|
+
fromPartial(object: DeepPartial<UserLoginResponse>): UserLoginResponse;
|
|
139
|
+
};
|
|
140
|
+
readonly responseStream: false;
|
|
141
|
+
readonly options: {};
|
|
142
|
+
};
|
|
143
|
+
readonly userCreate: {
|
|
144
|
+
readonly name: "UserCreate";
|
|
145
|
+
readonly requestType: {
|
|
146
|
+
encode(message: UserCreateRequest, writer?: _m0.Writer): _m0.Writer;
|
|
147
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserCreateRequest;
|
|
148
|
+
fromJSON(object: any): UserCreateRequest;
|
|
149
|
+
toJSON(message: UserCreateRequest): unknown;
|
|
150
|
+
fromPartial(object: DeepPartial<UserCreateRequest>): UserCreateRequest;
|
|
151
|
+
};
|
|
152
|
+
readonly requestStream: false;
|
|
153
|
+
readonly responseType: {
|
|
154
|
+
encode(message: UserCreateResponse, writer?: _m0.Writer): _m0.Writer;
|
|
155
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserCreateResponse;
|
|
156
|
+
fromJSON(object: any): UserCreateResponse;
|
|
157
|
+
toJSON(message: UserCreateResponse): unknown;
|
|
158
|
+
fromPartial(object: DeepPartial<UserCreateResponse>): UserCreateResponse;
|
|
159
|
+
};
|
|
160
|
+
readonly responseStream: false;
|
|
161
|
+
readonly options: {};
|
|
162
|
+
};
|
|
163
|
+
readonly changePass: {
|
|
164
|
+
readonly name: "ChangePass";
|
|
165
|
+
readonly requestType: {
|
|
166
|
+
encode(message: UserChangePass, writer?: _m0.Writer): _m0.Writer;
|
|
167
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserChangePass;
|
|
168
|
+
fromJSON(object: any): UserChangePass;
|
|
169
|
+
toJSON(message: UserChangePass): unknown;
|
|
170
|
+
fromPartial(object: DeepPartial<UserChangePass>): UserChangePass;
|
|
171
|
+
};
|
|
172
|
+
readonly requestStream: false;
|
|
173
|
+
readonly responseType: {
|
|
174
|
+
encode(message: UserCreateResponse, writer?: _m0.Writer): _m0.Writer;
|
|
175
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserCreateResponse;
|
|
176
|
+
fromJSON(object: any): UserCreateResponse;
|
|
177
|
+
toJSON(message: UserCreateResponse): unknown;
|
|
178
|
+
fromPartial(object: DeepPartial<UserCreateResponse>): UserCreateResponse;
|
|
179
|
+
};
|
|
180
|
+
readonly responseStream: false;
|
|
181
|
+
readonly options: {};
|
|
182
|
+
};
|
|
183
|
+
readonly userDelete: {
|
|
184
|
+
readonly name: "UserDelete";
|
|
185
|
+
readonly requestType: {
|
|
186
|
+
encode(message: UserDeleteRequest, writer?: _m0.Writer): _m0.Writer;
|
|
187
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserDeleteRequest;
|
|
188
|
+
fromJSON(object: any): UserDeleteRequest;
|
|
189
|
+
toJSON(message: UserDeleteRequest): unknown;
|
|
190
|
+
fromPartial(object: DeepPartial<UserDeleteRequest>): UserDeleteRequest;
|
|
191
|
+
};
|
|
192
|
+
readonly requestStream: false;
|
|
193
|
+
readonly responseType: {
|
|
194
|
+
encode(message: UserDeleteResponse, writer?: _m0.Writer): _m0.Writer;
|
|
195
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): UserDeleteResponse;
|
|
196
|
+
fromJSON(object: any): UserDeleteResponse;
|
|
197
|
+
toJSON(message: UserDeleteResponse): unknown;
|
|
198
|
+
fromPartial(object: DeepPartial<UserDeleteResponse>): UserDeleteResponse;
|
|
199
|
+
};
|
|
200
|
+
readonly responseStream: false;
|
|
201
|
+
readonly options: {};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
206
|
+
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 {} ? {
|
|
207
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
208
|
+
} : Partial<T>;
|
|
209
|
+
export {};
|