@lyxa.ai/core 1.4.121 → 1.4.122
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/libraries/cloud-storage/CloudStorageFactory.d.ts +7 -0
- package/dist/libraries/cloud-storage/CloudStorageFactory.js +18 -0
- package/dist/libraries/cloud-storage/CloudStorageFactory.js.map +1 -0
- package/dist/libraries/cloud-storage/index.d.ts +1 -0
- package/dist/libraries/cloud-storage/index.js +1 -0
- package/dist/libraries/cloud-storage/index.js.map +1 -1
- package/dist/libraries/index.d.ts +3 -3
- package/dist/libraries/index.js +4 -4
- package/dist/libraries/index.js.map +1 -1
- package/dist/libraries/mongo/models/user-action.model.d.ts +1 -0
- package/dist/libraries/mongo/models/user-action.model.js +5 -0
- package/dist/libraries/mongo/models/user-action.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloudStorageFactory = exports.StorageProvider = void 0;
|
|
4
|
+
const GcsStorageService_1 = require("./providers/GcsStorageService");
|
|
5
|
+
var StorageProvider;
|
|
6
|
+
(function (StorageProvider) {
|
|
7
|
+
StorageProvider["GCS"] = "gcs";
|
|
8
|
+
})(StorageProvider || (exports.StorageProvider = StorageProvider = {}));
|
|
9
|
+
class CloudStorageFactory {
|
|
10
|
+
static create(bucketName, provider = StorageProvider.GCS) {
|
|
11
|
+
switch (provider) {
|
|
12
|
+
case StorageProvider.GCS:
|
|
13
|
+
return new GcsStorageService_1.GcsStorageService(bucketName);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.CloudStorageFactory = CloudStorageFactory;
|
|
18
|
+
//# sourceMappingURL=CloudStorageFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudStorageFactory.js","sourceRoot":"/","sources":["libraries/cloud-storage/CloudStorageFactory.ts"],"names":[],"mappings":";;;AACA,qEAAkE;AAElE,IAAY,eAEX;AAFD,WAAY,eAAe;IAC1B,8BAAW,CAAA;AACZ,CAAC,EAFW,eAAe,+BAAf,eAAe,QAE1B;AAED,MAAa,mBAAmB;IAC/B,MAAM,CAAC,MAAM,CAAC,UAAmB,EAAE,WAA4B,eAAe,CAAC,GAAG;QACjF,QAAQ,QAAQ,EAAE,CAAC;YAClB,KAAK,eAAe,CAAC,GAAG;gBACvB,OAAO,IAAI,qCAAiB,CAAC,UAAU,CAAC,CAAC;QAC3C,CAAC;IACF,CAAC;CACD;AAPD,kDAOC","sourcesContent":["import { ICloudStorage } from './interfaces/ICloudStorage';\nimport { GcsStorageService } from './providers/GcsStorageService';\n\nexport enum StorageProvider {\n\tGCS = 'gcs',\n}\n\nexport class CloudStorageFactory {\n\tstatic create(bucketName?: string, provider: StorageProvider = StorageProvider.GCS): ICloudStorage {\n\t\tswitch (provider) {\n\t\t\tcase StorageProvider.GCS:\n\t\t\t\treturn new GcsStorageService(bucketName);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./interfaces/ICloudStorage"), exports);
|
|
18
18
|
__exportStar(require("./providers/GcsStorageService"), exports);
|
|
19
19
|
__exportStar(require("./types/FileUploadResult"), exports);
|
|
20
|
+
__exportStar(require("./CloudStorageFactory"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/cloud-storage/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,gEAA8C;AAC9C,2DAAyC","sourcesContent":["export * from './interfaces/ICloudStorage';\nexport * from './providers/GcsStorageService';\nexport * from './types/FileUploadResult';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/cloud-storage/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,gEAA8C;AAC9C,2DAAyC;AACzC,wDAAsC","sourcesContent":["export * from './interfaces/ICloudStorage';\nexport * from './providers/GcsStorageService';\nexport * from './types/FileUploadResult';\nexport * from './CloudStorageFactory';\n"]}
|
|
@@ -13,7 +13,7 @@ import { FCMService } from './firebase/fcmService';
|
|
|
13
13
|
import { BullMQService } from './bullmq/bull-mq-service';
|
|
14
14
|
import { BOBService, CashSettlementService } from './cash-settlement';
|
|
15
15
|
import { LyxaLoggerKit } from './logger-kit';
|
|
16
|
-
import {
|
|
16
|
+
import { ICloudStorage, StorageProvider } from './cloud-storage';
|
|
17
17
|
export declare class LibraryManager {
|
|
18
18
|
getLogger(): LyxaLogger;
|
|
19
19
|
getLoggerKit(): LyxaLoggerKit;
|
|
@@ -26,8 +26,8 @@ export declare class LibraryManager {
|
|
|
26
26
|
getAuthTokenRepository(): TokenRepository;
|
|
27
27
|
getGlobalUploadService(): UploadService;
|
|
28
28
|
getTenetUploadService(): UploadService;
|
|
29
|
-
getGlobalStorageService():
|
|
30
|
-
getTenetStorageService():
|
|
29
|
+
getGlobalStorageService(provider?: StorageProvider): ICloudStorage;
|
|
30
|
+
getTenetStorageService(provider?: StorageProvider): ICloudStorage;
|
|
31
31
|
getMapService(): MapService;
|
|
32
32
|
getCachedSettingsService(): CachedSettingsService;
|
|
33
33
|
getFCMService(): FCMService;
|
package/dist/libraries/index.js
CHANGED
|
@@ -58,11 +58,11 @@ let LibraryManager = class LibraryManager {
|
|
|
58
58
|
getTenetUploadService() {
|
|
59
59
|
return new upload_1.UploadService('lyxa-' + this.getConfigurationService().options.tenet);
|
|
60
60
|
}
|
|
61
|
-
getGlobalStorageService() {
|
|
62
|
-
return
|
|
61
|
+
getGlobalStorageService(provider) {
|
|
62
|
+
return cloud_storage_1.CloudStorageFactory.create(undefined, provider);
|
|
63
63
|
}
|
|
64
|
-
getTenetStorageService() {
|
|
65
|
-
return
|
|
64
|
+
getTenetStorageService(provider) {
|
|
65
|
+
return cloud_storage_1.CloudStorageFactory.create('lyxa-' + this.getConfigurationService().options.tenet, provider);
|
|
66
66
|
}
|
|
67
67
|
getMapService() {
|
|
68
68
|
return typedi_1.Container.get(map_1.MapService);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mCAA4C;AAC5C,qCAAyC;AACzC,qCAAsC;AACtC,6CAAsD;AACtD,uCAAiD;AACjD,mCAAuC;AACvC,mDAAuD;AACvD,qCAAyC;AACzC,yCAA6C;AAC7C,kDAAoD;AACpD,+BAAmC;AACnC,+CAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mCAA4C;AAC5C,qCAAyC;AACzC,qCAAsC;AACtC,6CAAsD;AACtD,uCAAiD;AACjD,mCAAuC;AACvC,mDAAuD;AACvD,qCAAyC;AACzC,yCAA6C;AAC7C,kDAAoD;AACpD,+BAAmC;AACnC,+CAAyD;AACzD,sDAM+B;AAC/B,8DAAyD;AACzD,uDAAsE;AACtE,6CAA6C;AAC7C,mDAAsF;AAG/E,IAAM,cAAc,GAApB,MAAM,cAAc;IACnB,SAAS;QACf,OAAO,kBAAS,CAAC,GAAG,CAAC,mBAAU,CAAC,CAAC;IAClC,CAAC;IACM,YAAY;QAClB,OAAO,kBAAS,CAAC,GAAG,CAAC,0BAAa,CAAC,CAAC;IACrC,CAAC;IACM,yBAAyB;QAC/B,OAAO,kBAAS,CAAC,GAAG,CAAC,mCAAsB,CAAC,CAAC;IAC9C,CAAC;IACM,gBAAgB;QACtB,OAAO,kBAAS,CAAC,GAAG,CAAC,sBAAa,CAAC,CAAC;IACrC,CAAC;IACM,iBAAiB;QACvB,OAAO,kBAAS,CA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+BAAkB,CAAC,CAAC;IAC1C,CAAC;IACM,oBAAoB;QAC1B,OAAO,kBAAS,CAAC,GAAG,CAAC,8BAAiB,CAAC,CAAC;IACzC,CAAC;IACM,mBAAmB;QACzB,OAAO,kBAAS,CAAC,GAAG,CAAC,gCAAmB,CAAC,CAAC;IAC3C,CAAC;IACM,gBAAgB;QACtB,OAAO,kBAAS,CAAC,GAAG,CAAC,+BAAa,CAAC,CAAC;IACrC,CAAC;IACM,wBAAwB;QAC9B,OAAO,kBAAS,CAAC,GAAG,CAAC,uCAAqB,CAAC,CAAC;IAC7C,CAAC;IACM,aAAa;QACnB,OAAO,kBAAS,CAAC,GAAG,CAAC,4BAAU,CAAC,CAAC;IAClC,CAAC;CACD,CAAA;AAxEY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,gBAAO,GAAE;GACG,cAAc,CAwE1B","sourcesContent":["import { Container, Service } from 'typedi';\nimport { TwilioService } from './twilio';\nimport { LyxaLogger } from './logger';\nimport { MicroServiceDispatcher } from './dispatcher';\nimport { SecretManagerService } from './secrets';\nimport { RedisService } from './redis';\nimport { ConfigurationService } from './configuration';\nimport { UploadService } from './upload';\nimport { FirebaseService } from './firebase';\nimport { TokenRepository } from './auth/repository';\nimport { MapService } from './map';\nimport { CachedSettingsService } from './cache/settings';\nimport {\n\tFCMService,\n\tFCMServiceForCpanel,\n\tFCMServiceForRider,\n\tFCMServiceForShop,\n\tFCMServiceForUser,\n} from './firebase/fcmService';\nimport { BullMQService } from './bullmq/bull-mq-service';\nimport { BOBService, CashSettlementService } from './cash-settlement';\nimport { LyxaLoggerKit } from './logger-kit';\nimport { CloudStorageFactory, ICloudStorage, StorageProvider } from './cloud-storage';\n\n@Service()\nexport class LibraryManager {\n\tpublic getLogger(): LyxaLogger {\n\t\treturn Container.get(LyxaLogger);\n\t}\n\tpublic getLoggerKit(): LyxaLoggerKit {\n\t\treturn Container.get(LyxaLoggerKit);\n\t}\n\tpublic getMicroServiceDispatcher(): MicroServiceDispatcher {\n\t\treturn Container.get(MicroServiceDispatcher);\n\t}\n\tpublic getTwilioService(): TwilioService {\n\t\treturn Container.get(TwilioService);\n\t}\n\tpublic getSecretsService(): SecretManagerService {\n\t\treturn Container.get(SecretManagerService);\n\t}\n\tpublic getRedisService(): RedisService {\n\t\treturn Container.get(RedisService);\n\t}\n\tpublic getConfigurationService(): ConfigurationService {\n\t\treturn Container.get(ConfigurationService);\n\t}\n\tpublic getFirebaseService(): FirebaseService {\n\t\treturn Container.get(FirebaseService);\n\t}\n\tpublic getAuthTokenRepository(): TokenRepository {\n\t\treturn Container.get(TokenRepository);\n\t}\n\tpublic getGlobalUploadService(): UploadService {\n\t\treturn new UploadService();\n\t}\n\tpublic getTenetUploadService(): UploadService {\n\t\treturn new UploadService('lyxa-' + this.getConfigurationService().options.tenet);\n\t}\n\n\tpublic getGlobalStorageService(provider?: StorageProvider): ICloudStorage {\n\t\treturn CloudStorageFactory.create(undefined, provider);\n\t}\n\n\tpublic getTenetStorageService(provider?: StorageProvider): ICloudStorage {\n\t\treturn CloudStorageFactory.create('lyxa-' + this.getConfigurationService().options.tenet, provider);\n\t}\n\tpublic getMapService(): MapService {\n\t\treturn Container.get(MapService);\n\t}\n\tpublic getCachedSettingsService(): CachedSettingsService {\n\t\treturn Container.get(CachedSettingsService);\n\t}\n\tpublic getFCMService(): FCMService {\n\t\treturn Container.get(FCMService);\n\t}\n\tpublic getFCMServiceForUser(): FCMService {\n\t\treturn Container.get(FCMServiceForUser);\n\t}\n\tpublic getFCMServiceForRider(): FCMService {\n\t\treturn Container.get(FCMServiceForRider);\n\t}\n\tpublic getFCMServiceForShop(): FCMService {\n\t\treturn Container.get(FCMServiceForShop);\n\t}\n\tpublic FCMServiceForCpanel(): FCMService {\n\t\treturn Container.get(FCMServiceForCpanel);\n\t}\n\tpublic getBullMQService(): BullMQService {\n\t\treturn Container.get(BullMQService);\n\t}\n\tpublic getCashSettlementService(): CashSettlementService {\n\t\treturn Container.get(CashSettlementService);\n\t}\n\tpublic getBOBService(): BOBService {\n\t\treturn Container.get(BOBService);\n\t}\n}\n"]}
|
|
@@ -21,6 +21,7 @@ class UserAction extends defaultClasses_1.TimeStamps {
|
|
|
21
21
|
orderId;
|
|
22
22
|
actionType;
|
|
23
23
|
actionReason;
|
|
24
|
+
isResolved;
|
|
24
25
|
}
|
|
25
26
|
exports.UserAction = UserAction;
|
|
26
27
|
__decorate([
|
|
@@ -43,4 +44,8 @@ __decorate([
|
|
|
43
44
|
(0, typegoose_1.prop)({ required: true, type: enum_1.UserActionReason }),
|
|
44
45
|
__metadata("design:type", String)
|
|
45
46
|
], UserAction.prototype, "actionReason", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typegoose_1.prop)({ required: true, type: Boolean, default: false }),
|
|
49
|
+
__metadata("design:type", Boolean)
|
|
50
|
+
], UserAction.prototype, "isResolved", void 0);
|
|
46
51
|
//# sourceMappingURL=user-action.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-action.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user-action.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,4EAAqE;AACrE,6CAAoC;AACpC,kDAA2E;AAC3E,+CAAsC;AAEtC,MAAa,UAAW,SAAQ,2BAAU;IAElC,IAAI,CAAY;IAGhB,KAAK,CAAa;IAGlB,OAAO,CAAS;IAGhB,UAAU,CAAiB;IAG3B,YAAY,CAAmB;
|
|
1
|
+
{"version":3,"file":"user-action.model.js","sourceRoot":"/","sources":["libraries/mongo/models/user-action.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,4EAAqE;AACrE,6CAAoC;AACpC,kDAA2E;AAC3E,+CAAsC;AAEtC,MAAa,UAAW,SAAQ,2BAAU;IAElC,IAAI,CAAY;IAGhB,KAAK,CAAa;IAGlB,OAAO,CAAS;IAGhB,UAAU,CAAiB;IAG3B,YAAY,CAAmB;IAG/B,UAAU,CAAU;CAC3B;AAlBD,gCAkBC;AAhBO;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCAChC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC/B;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CAChB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,qBAAc,EAAE,CAAC;;8CACb;AAG3B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC;;gDACX;AAG/B;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8CAC7B","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { UserActionReason, UserActionType } from '../../../utilities/enum';\nimport { Order } from './order.model';\n\nexport class UserAction extends TimeStamps {\n\t@prop({ ref: () => User, index: true, required: true })\n\tpublic user: Ref<User>;\n\n\t@prop({ ref: () => Order, index: true, required: true })\n\tpublic order: Ref<Order>;\n\n\t@prop({ required: true, type: String })\n\tpublic orderId: string;\n\n\t@prop({ required: true, type: UserActionType })\n\tpublic actionType: UserActionType;\n\n\t@prop({ required: true, type: UserActionReason })\n\tpublic actionReason: UserActionReason;\n\n\t@prop({ required: true, type: Boolean, default: false })\n\tpublic isResolved: boolean;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED