@servicelabsco/slabs-access-manager 0.1.146 → 0.1.148
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/access/jobs/email.message.job.d.ts +5 -2
- package/dist/access/jobs/email.message.job.js +14 -2
- package/dist/access/jobs/email.message.job.js.map +1 -1
- package/dist/access/services/slack.service.js +1 -1
- package/dist/access/services/slack.service.js.map +1 -1
- package/dist/accessUtility/dtos/index.d.ts +1 -0
- package/dist/accessUtility/dtos/index.js +1 -0
- package/dist/accessUtility/dtos/index.js.map +1 -1
- package/dist/accessUtility/dtos/item.unit.attributes.dto.d.ts +3 -0
- package/dist/accessUtility/dtos/item.unit.attributes.dto.js +8 -0
- package/dist/accessUtility/dtos/item.unit.attributes.dto.js.map +1 -0
- package/dist/accessUtility/entities/index.d.ts +1 -0
- package/dist/accessUtility/entities/index.js +1 -0
- package/dist/accessUtility/entities/index.js.map +1 -1
- package/dist/accessUtility/entities/item.unit.entity.d.ts +7 -0
- package/dist/accessUtility/entities/item.unit.entity.js +34 -0
- package/dist/accessUtility/entities/item.unit.entity.js.map +1 -0
- package/dist/accessUtility/jobs/index.d.ts +1 -0
- package/dist/accessUtility/jobs/index.js +1 -0
- package/dist/accessUtility/jobs/index.js.map +1 -1
- package/dist/accessUtility/jobs/item.unit.job.d.ts +7 -0
- package/dist/accessUtility/jobs/item.unit.job.js +29 -0
- package/dist/accessUtility/jobs/item.unit.job.js.map +1 -0
- package/dist/accessUtility/subscribers/index.d.ts +1 -0
- package/dist/accessUtility/subscribers/index.js +1 -0
- package/dist/accessUtility/subscribers/index.js.map +1 -1
- package/dist/accessUtility/subscribers/item.unit.subscriber.d.ts +10 -0
- package/dist/accessUtility/subscribers/item.unit.subscriber.js +34 -0
- package/dist/accessUtility/subscribers/item.unit.subscriber.js.map +1 -0
- package/dist/migrations/1721982047446-CreateItemUnitTable.d.ts +5 -0
- package/dist/migrations/1721982047446-CreateItemUnitTable.js +19 -0
- package/dist/migrations/1721982047446-CreateItemUnitTable.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { CommonJob, DatabaseEventDto, QueueService } from '@servicelabsco/nestjs-utility-services';
|
|
1
|
+
import { CommonJob, DatabaseEventDto, QueueService, SqlService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { BusinessEmailEntity } from '../entities/business.email.entity';
|
|
2
3
|
import { EmailMessageEntity } from '../entities/email.message.entity';
|
|
3
4
|
export declare class EmailMessageJob extends CommonJob {
|
|
4
5
|
protected readonly queueService: QueueService;
|
|
5
|
-
|
|
6
|
+
private readonly sqlService;
|
|
7
|
+
constructor(queueService: QueueService, sqlService: SqlService);
|
|
6
8
|
handle(evt: DatabaseEventDto<EmailMessageEntity>): Promise<EmailMessageEntity>;
|
|
9
|
+
incrementCount(evt: DatabaseEventDto<EmailMessageEntity>): Promise<BusinessEmailEntity>;
|
|
7
10
|
}
|
|
@@ -12,18 +12,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.EmailMessageJob = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
15
|
+
const business_email_entity_1 = require("../entities/business.email.entity");
|
|
15
16
|
let EmailMessageJob = class EmailMessageJob extends nestjs_utility_services_1.CommonJob {
|
|
16
|
-
constructor(queueService) {
|
|
17
|
+
constructor(queueService, sqlService) {
|
|
17
18
|
super('4051e443959f98165999dd0ad9b5d7aa');
|
|
18
19
|
this.queueService = queueService;
|
|
20
|
+
this.sqlService = sqlService;
|
|
19
21
|
}
|
|
20
22
|
async handle(evt) {
|
|
21
23
|
return evt.entity;
|
|
22
24
|
}
|
|
25
|
+
async incrementCount(evt) {
|
|
26
|
+
if (!this.isNewRecord(evt))
|
|
27
|
+
return;
|
|
28
|
+
const sql = `select count(1) count from bz_email_messages a where a.email_id =${evt.entity.email_id} and a.read=false and a.deleted_at is null`;
|
|
29
|
+
const emailMessages = await this.sqlService.readFirst(sql);
|
|
30
|
+
const email = await business_email_entity_1.BusinessEmailEntity.first(evt.entity.email_id);
|
|
31
|
+
email.attributes = { ...email.attributes, unread_count: emailMessages.count };
|
|
32
|
+
return email.save();
|
|
33
|
+
}
|
|
23
34
|
};
|
|
24
35
|
exports.EmailMessageJob = EmailMessageJob;
|
|
25
36
|
exports.EmailMessageJob = EmailMessageJob = __decorate([
|
|
26
37
|
(0, common_1.Injectable)(),
|
|
27
|
-
__metadata("design:paramtypes", [nestjs_utility_services_1.QueueService
|
|
38
|
+
__metadata("design:paramtypes", [nestjs_utility_services_1.QueueService,
|
|
39
|
+
nestjs_utility_services_1.SqlService])
|
|
28
40
|
], EmailMessageJob);
|
|
29
41
|
//# sourceMappingURL=email.message.job.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.message.job.js","sourceRoot":"","sources":["../../../src/access/jobs/email.message.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"email.message.job.js","sourceRoot":"","sources":["../../../src/access/jobs/email.message.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAA+G;AAC/G,6EAAwE;AAIjE,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,mCAAS;IAC1C,YACuB,YAA0B,EAC5B,UAAsB;QAEvC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAHvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,eAAU,GAAV,UAAU,CAAY;IAG3C,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAAyC;QAClD,OAAO,GAAG,CAAC,MAAM,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,GAAyC;QAC1D,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC;YAAE,OAAO;QAEnC,MAAM,GAAG,GAAG,oEAAoE,GAAG,CAAC,MAAM,CAAC,QAAQ,6CAA6C,CAAC;QACjJ,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAE3D,MAAM,KAAK,GAAG,MAAM,2CAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAEnE,KAAK,CAAC,UAAU,GAAG,EAAE,GAAG,KAAK,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,KAAK,EAAE,CAAC;QAE9E,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;CACJ,CAAA;AAvBY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAG4B,sCAAY;QAChB,oCAAU;GAHlC,eAAe,CAuB3B"}
|
|
@@ -30,7 +30,7 @@ let SlackService = class SlackService {
|
|
|
30
30
|
return;
|
|
31
31
|
const body = { endPoint: `users.lookupByEmail?email=${user.email}`, data: {}, token };
|
|
32
32
|
const userInfo = await this.post(body);
|
|
33
|
-
if (!userInfo?.data)
|
|
33
|
+
if (!userInfo?.data?.user)
|
|
34
34
|
return;
|
|
35
35
|
const integration = await this.getBusinessIntegration(businessId);
|
|
36
36
|
const entity = await slack_user_entity_1.SlackUserEntity.firstOrCreate({ business_id: businessId, user_id: user.id });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack.service.js","sourceRoot":"","sources":["../../../src/access/services/slack.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAwG;AACxG,uCAAoC;AAEpC,mFAA8E;AAC9E,qEAAgE;
|
|
1
|
+
{"version":3,"file":"slack.service.js","sourceRoot":"","sources":["../../../src/access/services/slack.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAwG;AACxG,uCAAoC;AAEpC,mFAA8E;AAC9E,qEAAgE;AAGzD,IAAM,YA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AsB,CAAC,EAAU;QACnC,MAAM,GAAG,GAAG,kBAAkB,EAAE,cAAc,CAAC;QAC/C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAEtB,MAAM,CAAC,GAAG,MAAM,iDAAsB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAEjG,IAAI,CAAC,CAAC;YAAE,OAAO;QAEf,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,IAAA,mBAAQ,EAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAE7D,OAAO,CAAC,CAAC;IACb,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAA+B;QACtC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAE1C,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAE3C,MAAM,IAAI,GAAG;YACT,MAAM,EAAE,MAAM;YACd,GAAG;YACH,OAAO,EAAE;gBACL,aAAa,EAAE,UAAU,KAAK,EAAE;gBAChC,cAAc,EAAE,kBAAkB;aACrC;YACD,IAAI;SACP,CAAC;QAEF,OAAO,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;CACJ,CAAA;AA5FY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAMkC,8CAAoB;QAC1B,sCAAY;GANxC,YAAY,CA4FxB"}
|
|
@@ -13,6 +13,7 @@ export * from './error.handling.dto';
|
|
|
13
13
|
export * from './fcm.notification.attributes.dto';
|
|
14
14
|
export * from './gchat.notification.attributes.dto';
|
|
15
15
|
export * from './inapp.notification.attributes.dto';
|
|
16
|
+
export * from './item.unit.attributes.dto';
|
|
16
17
|
export * from './listing.model.attributes.dto';
|
|
17
18
|
export * from './notification.attributes.dto';
|
|
18
19
|
export * from './notification.recipient.attributes.dto';
|
|
@@ -29,6 +29,7 @@ __exportStar(require("./error.handling.dto"), exports);
|
|
|
29
29
|
__exportStar(require("./fcm.notification.attributes.dto"), exports);
|
|
30
30
|
__exportStar(require("./gchat.notification.attributes.dto"), exports);
|
|
31
31
|
__exportStar(require("./inapp.notification.attributes.dto"), exports);
|
|
32
|
+
__exportStar(require("./item.unit.attributes.dto"), exports);
|
|
32
33
|
__exportStar(require("./listing.model.attributes.dto"), exports);
|
|
33
34
|
__exportStar(require("./notification.attributes.dto"), exports);
|
|
34
35
|
__exportStar(require("./notification.recipient.attributes.dto"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/accessUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AAAA,wEAAsD;AAAA,8EAA4D;AAAA,+DAA6C;AAAA,sEAAoD;AAAA,oEAAkD;AAAA,0DAAwC;AAAA,oEAAkD;AAAA,gEAA8C;AAAA,6DAA2C;AAAA,sEAAoD;AAAA,uDAAqC;AAAA,oEAAkD;AAAA,sEAAoD;AAAA,sEAAoD;AAAA,iEAA+C;AAAA,gEAA8C;AAAA,0EAAwD;AAAA,gEAA8C;AAAA,0DAAwC;AAAA,sEAAoD;AAAA,oEAAkD;AAAA,kEAAgD;AAAA,uEAAqD;AAAA,2DAAyC;AAAA,mEAAiD;AAAA,yEAAsD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/accessUtility/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AAAA,wEAAsD;AAAA,8EAA4D;AAAA,+DAA6C;AAAA,sEAAoD;AAAA,oEAAkD;AAAA,0DAAwC;AAAA,oEAAkD;AAAA,gEAA8C;AAAA,6DAA2C;AAAA,sEAAoD;AAAA,uDAAqC;AAAA,oEAAkD;AAAA,sEAAoD;AAAA,sEAAoD;AAAA,6DAA2C;AAAA,iEAA+C;AAAA,gEAA8C;AAAA,0EAAwD;AAAA,gEAA8C;AAAA,0DAAwC;AAAA,sEAAoD;AAAA,oEAAkD;AAAA,kEAAgD;AAAA,uEAAqD;AAAA,2DAAyC;AAAA,mEAAiD;AAAA,yEAAsD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ItemUnitAttributesDto = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class ItemUnitAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
|
|
6
|
+
}
|
|
7
|
+
exports.ItemUnitAttributesDto = ItemUnitAttributesDto;
|
|
8
|
+
//# sourceMappingURL=item.unit.attributes.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.unit.attributes.dto.js","sourceRoot":"","sources":["../../../src/accessUtility/dtos/item.unit.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,qBAAsB,SAAQ,6CAAmB;CAAG;AAAjE,sDAAiE"}
|
|
@@ -11,6 +11,7 @@ export * from './fcm.notification.entity';
|
|
|
11
11
|
export * from './fcm.template.entity';
|
|
12
12
|
export * from './gchat.notification.entity';
|
|
13
13
|
export * from './inapp.notification.entity';
|
|
14
|
+
export * from './item.unit.entity';
|
|
14
15
|
export * from './listing.model.entity';
|
|
15
16
|
export * from './notification.entity';
|
|
16
17
|
export * from './notification.recipient.entity';
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./fcm.notification.entity"), exports);
|
|
|
27
27
|
__exportStar(require("./fcm.template.entity"), exports);
|
|
28
28
|
__exportStar(require("./gchat.notification.entity"), exports);
|
|
29
29
|
__exportStar(require("./inapp.notification.entity"), exports);
|
|
30
|
+
__exportStar(require("./item.unit.entity"), exports);
|
|
30
31
|
__exportStar(require("./listing.model.entity"), exports);
|
|
31
32
|
__exportStar(require("./notification.entity"), exports);
|
|
32
33
|
__exportStar(require("./notification.recipient.entity"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/accessUtility/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,gEAA8C;AAAA,sEAAoD;AAAA,8DAA4C;AAAA,uDAAqC;AAAA,4DAA0C;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,8DAA4C;AAAA,8DAA4C;AAAA,yDAAuC;AAAA,wDAAsC;AAAA,kEAAgD;AAAA,yDAAuC;AAAA,yDAAuC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,+DAA6C;AAAA,2DAAyC;AAAA,iEAA8C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/accessUtility/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,gEAA8C;AAAA,sEAAoD;AAAA,8DAA4C;AAAA,uDAAqC;AAAA,4DAA0C;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,8DAA4C;AAAA,8DAA4C;AAAA,qDAAmC;AAAA,yDAAuC;AAAA,wDAAsC;AAAA,kEAAgD;AAAA,yDAAuC;AAAA,yDAAuC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,+DAA6C;AAAA,2DAAyC;AAAA,iEAA8C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { ItemUnitAttributesDto } from '../dtos/item.unit.attributes.dto';
|
|
3
|
+
export declare class ItemUnitEntity extends CommonEntity {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
attributes: ItemUnitAttributesDto;
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ItemUnitEntity = void 0;
|
|
13
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const item_unit_attributes_dto_1 = require("../dtos/item.unit.attributes.dto");
|
|
16
|
+
let ItemUnitEntity = class ItemUnitEntity extends nestjs_utility_services_1.CommonEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.ItemUnitEntity = ItemUnitEntity;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.Column)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], ItemUnitEntity.prototype, "name", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ItemUnitEntity.prototype, "description", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)('json'),
|
|
29
|
+
__metadata("design:type", item_unit_attributes_dto_1.ItemUnitAttributesDto)
|
|
30
|
+
], ItemUnitEntity.prototype, "attributes", void 0);
|
|
31
|
+
exports.ItemUnitEntity = ItemUnitEntity = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)('pr_item_units')
|
|
33
|
+
], ItemUnitEntity);
|
|
34
|
+
//# sourceMappingURL=item.unit.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.unit.entity.js","sourceRoot":"","sources":["../../../src/accessUtility/entities/item.unit.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAyC;AACzC,+EAAyE;AASlE,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,sCAAY;CAW/C,CAAA;AAXY,wCAAc;AAEvB;IADC,IAAA,gBAAM,GAAE;;4CACI;AAGb;IADC,IAAA,gBAAM,GAAE;;mDACW;AAGpB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,gDAAqB;kDAAC;yBARzB,cAAc;IAD1B,IAAA,gBAAM,EAAC,eAAe,CAAC;GACX,cAAc,CAW1B"}
|
|
@@ -11,6 +11,7 @@ export * from './data.mapping.job';
|
|
|
11
11
|
export * from './email.notification.job';
|
|
12
12
|
export * from './gchat.notification.job';
|
|
13
13
|
export * from './inapp.notification.job';
|
|
14
|
+
export * from './item.unit.job';
|
|
14
15
|
export * from './listing.model.job';
|
|
15
16
|
export * from './notification.job';
|
|
16
17
|
export * from './notification.recipient.job';
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./data.mapping.job"), exports);
|
|
|
27
27
|
__exportStar(require("./email.notification.job"), exports);
|
|
28
28
|
__exportStar(require("./gchat.notification.job"), exports);
|
|
29
29
|
__exportStar(require("./inapp.notification.job"), exports);
|
|
30
|
+
__exportStar(require("./item.unit.job"), exports);
|
|
30
31
|
__exportStar(require("./listing.model.job"), exports);
|
|
31
32
|
__exportStar(require("./notification.job"), exports);
|
|
32
33
|
__exportStar(require("./notification.recipient.job"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/accessUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,6DAA2C;AAAA,mEAAiD;AAAA,2DAAyC;AAAA,yDAAuC;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,yDAAuC;AAAA,qDAAmC;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,sDAAoC;AAAA,qDAAmC;AAAA,+DAA6C;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,2DAAyC;AAAA,yDAAuC;AAAA,uDAAqC;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,8DAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/accessUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,6DAA2C;AAAA,mEAAiD;AAAA,2DAAyC;AAAA,yDAAuC;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,yDAAuC;AAAA,qDAAmC;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,kDAAgC;AAAA,sDAAoC;AAAA,qDAAmC;AAAA,+DAA6C;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,2DAAyC;AAAA,yDAAuC;AAAA,uDAAqC;AAAA,4DAA0C;AAAA,wDAAsC;AAAA,8DAA2C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommonJob, DatabaseEventDto, QueueService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { ItemUnitEntity } from '../entities/item.unit.entity';
|
|
3
|
+
export declare class ItemUnitJob extends CommonJob {
|
|
4
|
+
protected readonly queueService: QueueService;
|
|
5
|
+
constructor(queueService: QueueService);
|
|
6
|
+
handle(evt: DatabaseEventDto<ItemUnitEntity>): Promise<ItemUnitEntity>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ItemUnitJob = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
15
|
+
let ItemUnitJob = class ItemUnitJob extends nestjs_utility_services_1.CommonJob {
|
|
16
|
+
constructor(queueService) {
|
|
17
|
+
super('6c88854fbb065181602898f5069fbaa1');
|
|
18
|
+
this.queueService = queueService;
|
|
19
|
+
}
|
|
20
|
+
async handle(evt) {
|
|
21
|
+
return evt.entity;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.ItemUnitJob = ItemUnitJob;
|
|
25
|
+
exports.ItemUnitJob = ItemUnitJob = __decorate([
|
|
26
|
+
(0, common_1.Injectable)(),
|
|
27
|
+
__metadata("design:paramtypes", [nestjs_utility_services_1.QueueService])
|
|
28
|
+
], ItemUnitJob);
|
|
29
|
+
//# sourceMappingURL=item.unit.job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.unit.job.js","sourceRoot":"","sources":["../../../src/accessUtility/jobs/item.unit.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oFAAmG;AAI5F,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,mCAAS;IACtC,YAA+B,YAA0B;QACrD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QADf,iBAAY,GAAZ,YAAY,CAAc;IAEzD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,GAAqC;QAC9C,OAAO,GAAG,CAAC,MAAM,CAAC;IACtB,CAAC;CACJ,CAAA;AAPY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;qCAEoC,sCAAY;GADhD,WAAW,CAOvB"}
|
|
@@ -9,6 +9,7 @@ export * from './data.mapping.subscriber';
|
|
|
9
9
|
export * from './email.notification.subscriber';
|
|
10
10
|
export * from './gchat.notification.subscriber';
|
|
11
11
|
export * from './inapp.notification.subscriber';
|
|
12
|
+
export * from './item.unit.subscriber';
|
|
12
13
|
export * from './listing.model.subscriber';
|
|
13
14
|
export * from './notification.recipient.subscriber';
|
|
14
15
|
export * from './notification.subscriber';
|
|
@@ -25,6 +25,7 @@ __exportStar(require("./data.mapping.subscriber"), exports);
|
|
|
25
25
|
__exportStar(require("./email.notification.subscriber"), exports);
|
|
26
26
|
__exportStar(require("./gchat.notification.subscriber"), exports);
|
|
27
27
|
__exportStar(require("./inapp.notification.subscriber"), exports);
|
|
28
|
+
__exportStar(require("./item.unit.subscriber"), exports);
|
|
28
29
|
__exportStar(require("./listing.model.subscriber"), exports);
|
|
29
30
|
__exportStar(require("./notification.recipient.subscriber"), exports);
|
|
30
31
|
__exportStar(require("./notification.subscriber"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/accessUtility/subscribers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAAA,0EAAwD;AAAA,+DAA6C;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,2DAAyC;AAAA,gEAA8C;AAAA,4DAA0C;AAAA,kEAAgD;AAAA,kEAAgD;AAAA,kEAAgD;AAAA,6DAA2C;AAAA,sEAAoD;AAAA,4DAA0C;AAAA,4DAA0C;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,8DAA4C;AAAA,mEAAiD;AAAA,+DAA6C;AAAA,qEAAkD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/accessUtility/subscribers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAAA,0EAAwD;AAAA,+DAA6C;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,2DAAyC;AAAA,gEAA8C;AAAA,4DAA0C;AAAA,kEAAgD;AAAA,kEAAgD;AAAA,kEAAgD;AAAA,yDAAuC;AAAA,6DAA2C;AAAA,sEAAoD;AAAA,4DAA0C;AAAA,4DAA0C;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,8DAA4C;AAAA,mEAAiD;AAAA,+DAA6C;AAAA,qEAAkD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonSubscriber } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { DataSource } from 'typeorm';
|
|
3
|
+
import { ItemUnitEntity } from '../entities/item.unit.entity';
|
|
4
|
+
import { ItemUnitJob } from '../jobs/item.unit.job';
|
|
5
|
+
export declare class ItemUnitSubscriber extends CommonSubscriber<ItemUnitEntity> {
|
|
6
|
+
private readonly dataSource;
|
|
7
|
+
protected readonly entityJob: ItemUnitJob;
|
|
8
|
+
constructor(dataSource: DataSource, entityJob: ItemUnitJob);
|
|
9
|
+
listenTo(): typeof ItemUnitEntity;
|
|
10
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ItemUnitSubscriber = void 0;
|
|
13
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const item_unit_entity_1 = require("../entities/item.unit.entity");
|
|
16
|
+
const item_unit_job_1 = require("../jobs/item.unit.job");
|
|
17
|
+
let ItemUnitSubscriber = class ItemUnitSubscriber extends nestjs_utility_services_1.CommonSubscriber {
|
|
18
|
+
constructor(dataSource, entityJob) {
|
|
19
|
+
super();
|
|
20
|
+
this.dataSource = dataSource;
|
|
21
|
+
this.entityJob = entityJob;
|
|
22
|
+
dataSource.subscribers.push(this);
|
|
23
|
+
}
|
|
24
|
+
listenTo() {
|
|
25
|
+
return item_unit_entity_1.ItemUnitEntity;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.ItemUnitSubscriber = ItemUnitSubscriber;
|
|
29
|
+
exports.ItemUnitSubscriber = ItemUnitSubscriber = __decorate([
|
|
30
|
+
(0, typeorm_1.EventSubscriber)(),
|
|
31
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
|
32
|
+
item_unit_job_1.ItemUnitJob])
|
|
33
|
+
], ItemUnitSubscriber);
|
|
34
|
+
//# sourceMappingURL=item.unit.subscriber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.unit.subscriber.js","sourceRoot":"","sources":["../../../src/accessUtility/subscribers/item.unit.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAA0E;AAC1E,qCAAsD;AACtD,mEAA8D;AAC9D,yDAAoD;AAE7C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,0CAAgC;IACpE,YACqB,UAAsB,EACpB,SAAsB;QAEzC,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACpB,cAAS,GAAT,SAAS,CAAa;QAGzC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,iCAAc,CAAC;IAC1B,CAAC;CACJ,CAAA;AAXY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACT,2BAAW;GAHpC,kBAAkB,CAW9B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateItemUnitTable1721982047446 = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class CreateItemUnitTable1721982047446 extends nestjs_utility_services_1.MigrationUtility {
|
|
6
|
+
constructor() {
|
|
7
|
+
super('pr_item_units');
|
|
8
|
+
this.process();
|
|
9
|
+
}
|
|
10
|
+
process() {
|
|
11
|
+
this.primary();
|
|
12
|
+
this.string('name');
|
|
13
|
+
this.string('description');
|
|
14
|
+
this.json('attributes');
|
|
15
|
+
this.whoColumns();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.CreateItemUnitTable1721982047446 = CreateItemUnitTable1721982047446;
|
|
19
|
+
//# sourceMappingURL=1721982047446-CreateItemUnitTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1721982047446-CreateItemUnitTable.js","sourceRoot":"","sources":["../../src/migrations/1721982047446-CreateItemUnitTable.ts"],"names":[],"mappings":";;;AAAA,oFAA0E;AAE1E,MAAa,gCAAiC,SAAQ,0CAAgB;IAClE;QACI,KAAK,CAAC,eAAe,CAAC,CAAC;QACvB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAE3B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ;AAfD,4EAeC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicelabsco/slabs-access-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.148",
|
|
4
4
|
"description": "Support for application level menus and dashboards",
|
|
5
5
|
"author": "Hemant Kumar Sah <hemantanshu@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@aws-sdk/client-lambda": "^3.624.0",
|
|
41
41
|
"@googleapis/chat": "^25.0.0",
|
|
42
|
-
"@servicelabsco/nestjs-utility-services": "^1.2.
|
|
42
|
+
"@servicelabsco/nestjs-utility-services": "^1.2.95",
|
|
43
43
|
"csv-parser": "^3.0.0",
|
|
44
44
|
"date-fns": "^3.6.0",
|
|
45
45
|
"exceljs": "^4.4.0",
|