@carlonicora/nestjs-neo4jsonapi 1.61.0 → 1.62.0
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/config/enums/queue.id.d.ts +1 -0
- package/dist/config/enums/queue.id.d.ts.map +1 -1
- package/dist/config/enums/queue.id.js +1 -0
- package/dist/config/enums/queue.id.js.map +1 -1
- package/dist/core/queue/queue.module.d.ts.map +1 -1
- package/dist/core/queue/queue.module.js +2 -1
- package/dist/core/queue/queue.module.js.map +1 -1
- package/dist/foundations/foundations.modules.d.ts.map +1 -1
- package/dist/foundations/foundations.modules.js +2 -0
- package/dist/foundations/foundations.modules.js.map +1 -1
- package/dist/foundations/how-to/controllers/how-to.controller.d.ts +20 -0
- package/dist/foundations/how-to/controllers/how-to.controller.d.ts.map +1 -0
- package/dist/foundations/how-to/controllers/how-to.controller.js +122 -0
- package/dist/foundations/how-to/controllers/how-to.controller.js.map +1 -0
- package/dist/foundations/how-to/dtos/how-to.dto.d.ts +11 -0
- package/dist/foundations/how-to/dtos/how-to.dto.d.ts.map +1 -0
- package/dist/foundations/how-to/dtos/how-to.dto.js +45 -0
- package/dist/foundations/how-to/dtos/how-to.dto.js.map +1 -0
- package/dist/foundations/how-to/dtos/how-to.post.dto.d.ts +14 -0
- package/dist/foundations/how-to/dtos/how-to.post.dto.d.ts.map +1 -0
- package/dist/foundations/how-to/dtos/how-to.post.dto.js +62 -0
- package/dist/foundations/how-to/dtos/how-to.post.dto.js.map +1 -0
- package/dist/foundations/how-to/dtos/how-to.put.dto.d.ts +14 -0
- package/dist/foundations/how-to/dtos/how-to.put.dto.d.ts.map +1 -0
- package/dist/foundations/how-to/dtos/how-to.put.dto.js +62 -0
- package/dist/foundations/how-to/dtos/how-to.put.dto.js.map +1 -0
- package/dist/foundations/how-to/entities/how-to.d.ts +22 -0
- package/dist/foundations/how-to/entities/how-to.d.ts.map +1 -0
- package/dist/foundations/how-to/entities/how-to.js +37 -0
- package/dist/foundations/how-to/entities/how-to.js.map +1 -0
- package/dist/foundations/how-to/entities/how-to.meta.d.ts +3 -0
- package/dist/foundations/how-to/entities/how-to.meta.d.ts.map +1 -0
- package/dist/foundations/how-to/entities/how-to.meta.js +10 -0
- package/dist/foundations/how-to/entities/how-to.meta.js.map +1 -0
- package/dist/foundations/how-to/how-to.module.d.ts +5 -0
- package/dist/foundations/how-to/how-to.module.d.ts.map +1 -0
- package/dist/foundations/how-to/how-to.module.js +37 -0
- package/dist/foundations/how-to/how-to.module.js.map +1 -0
- package/dist/foundations/how-to/index.d.ts +9 -0
- package/dist/foundations/how-to/index.d.ts.map +1 -0
- package/dist/foundations/how-to/index.js +25 -0
- package/dist/foundations/how-to/index.js.map +1 -0
- package/dist/foundations/how-to/processors/how-to.processor.d.ts +22 -0
- package/dist/foundations/how-to/processors/how-to.processor.d.ts.map +1 -0
- package/dist/foundations/how-to/processors/how-to.processor.js +101 -0
- package/dist/foundations/how-to/processors/how-to.processor.js.map +1 -0
- package/dist/foundations/how-to/repositories/how-to.repository.d.ts +18 -0
- package/dist/foundations/how-to/repositories/how-to.repository.d.ts.map +1 -0
- package/dist/foundations/how-to/repositories/how-to.repository.js +47 -0
- package/dist/foundations/how-to/repositories/how-to.repository.js.map +1 -0
- package/dist/foundations/how-to/services/how-to.service.d.ts +42 -0
- package/dist/foundations/how-to/services/how-to.service.d.ts.map +1 -0
- package/dist/foundations/how-to/services/how-to.service.js +127 -0
- package/dist/foundations/how-to/services/how-to.service.js.map +1 -0
- package/dist/foundations/index.d.ts +1 -0
- package/dist/foundations/index.d.ts.map +1 -1
- package/dist/foundations/index.js +1 -0
- package/dist/foundations/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.id.d.ts","sourceRoot":"","sources":["../../../src/config/enums/queue.id.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,OAAO;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,eAAe,oBAAoB;IACnC,KAAK,UAAU;IACf,KAAK,UAAU;CAChB"}
|
|
1
|
+
{"version":3,"file":"queue.id.d.ts","sourceRoot":"","sources":["../../../src/config/enums/queue.id.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,OAAO;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,eAAe,oBAAoB;IACnC,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;CAChB"}
|
|
@@ -13,6 +13,7 @@ var QueueId;
|
|
|
13
13
|
QueueId["COMMUNITY_SUMMARISER"] = "community-summariser";
|
|
14
14
|
QueueId["BILLING_WEBHOOK"] = "billing-webhook";
|
|
15
15
|
QueueId["EMAIL"] = "email";
|
|
16
|
+
QueueId["HOWTO"] = "howto";
|
|
16
17
|
QueueId["TRIAL"] = "trial";
|
|
17
18
|
})(QueueId || (exports.QueueId = QueueId = {}));
|
|
18
19
|
//# sourceMappingURL=queue.id.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.id.js","sourceRoot":"","sources":["../../../src/config/enums/queue.id.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"queue.id.js","sourceRoot":"","sources":["../../../src/config/enums/queue.id.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,OASX;AATD,WAAY,OAAO;IACjB,0BAAe,CAAA;IACf,8BAAmB,CAAA;IACnB,gDAAqC,CAAA;IACrC,wDAA6C,CAAA;IAC7C,8CAAmC,CAAA;IACnC,0BAAe,CAAA;IACf,0BAAe,CAAA;IACf,0BAAe,CAAA;AACjB,CAAC,EATW,OAAO,uBAAP,OAAO,QASlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.module.d.ts","sourceRoot":"","sources":["../../../src/core/queue/queue.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAK/D;;;;;;;;GAQG;AACH,qBAEa,WAAW;IACtB,MAAM,CAAC,OAAO,IAAI,aAAa;
|
|
1
|
+
{"version":3,"file":"queue.module.d.ts","sourceRoot":"","sources":["../../../src/core/queue/queue.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAkB,MAAM,gBAAgB,CAAC;AAK/D;;;;;;;;GAQG;AACH,qBAEa,WAAW;IACtB,MAAM,CAAC,OAAO,IAAI,aAAa;IAuD/B;;;OAGG;IACH,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,aAAa;CAiC5D"}
|
|
@@ -51,6 +51,7 @@ let QueueModule = QueueModule_1 = class QueueModule {
|
|
|
51
51
|
// Always register the library's core queues
|
|
52
52
|
bullmq_1.BullModule.registerQueue({ name: queue_id_1.QueueId.CHUNK }),
|
|
53
53
|
bullmq_1.BullModule.registerQueue({ name: queue_id_1.QueueId.COMPANY }),
|
|
54
|
+
bullmq_1.BullModule.registerQueue({ name: queue_id_1.QueueId.HOWTO }),
|
|
54
55
|
bullmq_1.BullModule.registerQueue({ name: queue_id_1.QueueId.TRIAL }),
|
|
55
56
|
],
|
|
56
57
|
providers: [
|
|
@@ -78,7 +79,7 @@ let QueueModule = QueueModule_1 = class QueueModule {
|
|
|
78
79
|
* Use this when you need to explicitly specify which queues to register.
|
|
79
80
|
*/
|
|
80
81
|
static forRootWithQueues(queueIds) {
|
|
81
|
-
const allQueueIds = new Set([queue_id_1.QueueId.CHUNK, queue_id_1.QueueId.COMPANY, queue_id_1.QueueId.TRIAL, ...queueIds]);
|
|
82
|
+
const allQueueIds = new Set([queue_id_1.QueueId.CHUNK, queue_id_1.QueueId.COMPANY, queue_id_1.QueueId.HOWTO, queue_id_1.QueueId.TRIAL, ...queueIds]);
|
|
82
83
|
return {
|
|
83
84
|
module: QueueModule_1,
|
|
84
85
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.module.js","sourceRoot":"","sources":["../../../src/core/queue/queue.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+D;AAC/D,2CAA6D;AAC7D,0DAAsD;AAGtD;;;;;;;;GAQG;AAGI,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACtB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,aAAW;YACnB,OAAO,EAAE;gBACP,qBAAY;gBACZ,4CAA4C;gBAC5C,mBAAU,CAAC,YAAY,CAAC;oBACtB,OAAO,EAAE,CAAC,qBAAY,CAAC;oBACvB,MAAM,EAAE,CAAC,sBAAa,CAAC;oBACvB,UAAU,EAAE,CAAC,aAAiD,EAAE,EAAE;wBAChE,MAAM,KAAK,GAAG,aAAa,CAAC,GAAG,CAAuB,OAAO,CAAC,CAAC;wBAC/D,OAAO;4BACL,UAAU,EAAE;gCACV,IAAI,EAAE,KAAK,EAAE,IAAI;gCACjB,IAAI,EAAE,KAAK,EAAE,IAAI;gCACjB,QAAQ,EAAE,KAAK,EAAE,QAAQ;gCACzB,QAAQ,EAAE,KAAK,EAAE,QAAQ;6BAC1B;4BACD,MAAM,EAAE,KAAK,EAAE,KAAK;4BACpB,iBAAiB,EAAE;gCACjB,gBAAgB,EAAE,IAAI;gCACtB,YAAY,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;6BACzC;yBACF,CAAC;oBACJ,CAAC;iBACF,CAAC;gBACF,4CAA4C;gBAC5C,mBAAU,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,kBAAO,CAAC,KAAK,EAAE,CAAC;gBACjD,mBAAU,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,kBAAO,CAAC,OAAO,EAAE,CAAC;gBACnD,mBAAU,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,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F,CAAC;oBACJ,CAAC;iBACF,CAAC;gBACF,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAU,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;aAC7E;YACD,OAAO,EAAE,CAAC,mBAAU,CAAC;YACrB,MAAM,EAAE,IAAI;SACb,CAAC;IACJ,CAAC;CACF,CAAA;AA7FY,kCAAW;sBAAX,WAAW;IAFvB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,WAAW,CA6FvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundations.modules.d.ts","sourceRoot":"","sources":["../../src/foundations/foundations.modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAQvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAE1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"foundations.modules.d.ts","sourceRoot":"","sources":["../../src/foundations/foundations.modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAQvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAE1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AA0BvF;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAuCD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBACa,iBAAiB;IAC5B;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,uBAAuB,GAAG,aAAa;CAWhE"}
|
|
@@ -19,6 +19,7 @@ const content_module_1 = require("./content/content.module");
|
|
|
19
19
|
const referral_module_1 = require("./referral/referral.module");
|
|
20
20
|
const discord_user_module_1 = require("./discord-user/discord-user.module");
|
|
21
21
|
const feature_module_1 = require("./feature/feature.module");
|
|
22
|
+
const how_to_module_1 = require("./how-to/how-to.module");
|
|
22
23
|
const keyconcept_module_1 = require("./keyconcept/keyconcept.module");
|
|
23
24
|
const module_module_1 = require("./module/module.module");
|
|
24
25
|
const notification_module_1 = require("./notification/notification.module");
|
|
@@ -53,6 +54,7 @@ const STATIC_FOUNDATION_MODULES = [
|
|
|
53
54
|
company_module_1.CompanyModule,
|
|
54
55
|
discord_user_module_1.DiscordUserModule,
|
|
55
56
|
feature_module_1.FeatureModule,
|
|
57
|
+
how_to_module_1.HowToModule,
|
|
56
58
|
keyconcept_module_1.KeyConceptModule,
|
|
57
59
|
module_module_1.ModuleModule,
|
|
58
60
|
notification_module_1.NotificationModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundations.modules.js","sourceRoot":"","sources":["../../src/foundations/foundations.modules.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,sEAAkE;AAClE,uDAAmD;AACnD,oDAAgD;AAChD,uDAAmD;AACnD,6DAAyD;AACzD,6DAAyD;AACzD,6DAAyD;AAEzD,gEAA4D;AAE5D,4EAAuE;AACvE,6DAAyD;AACzD,sEAAkE;AAClE,0DAAsD;AACtD,4EAAwE;AACxE,uDAAmD;AACnD,oDAAgD;AAChD,mEAA+D;AAC/D,oDAAgD;AAChD,8CAA0C;AAC1C,kFAA6E;AAC7E,iDAAmD;AACnD,qDAAuD;AACvD,mEAAoE;AACpE,+DAAiE;AACjE,4EAAuE;AACvE,kFAA6E;AAC7E,0DAAsD;AACtD,4EAAuE;AACvE,sEAAkE;AAClE,sEAAiE;AACjE,oDAAgD;AAChD,gEAA4D;AAY5D;;;GAGG;AACH,MAAM,yBAAyB,GAAG;IAChC,oCAAgB;IAChB,0BAAW;IACX,wBAAU;IACV,0BAAW;IACX,8BAAa;IACb,8BAAa;IACb,uCAAiB;IACjB,8BAAa;IACb,oCAAgB;IAChB,4BAAY;IACZ,wCAAkB;IAClB,0BAAW;IACX,wBAAU;IACV,kCAAe;IACf,wBAAU;IACV,oBAAQ;IACR,oCAAgB;IAChB,mCAAe;IACf,wBAAU;IACV,gCAAc;IACd,4BAAY;IACZ,iDAAyB;IACzB,8CAAwB;IACxB,gCAAiB;IACjB,oCAAmB;IACnB,2CAAmB;IACnB,uCAAiB;IACjB,2CAAmB;IACnB,uCAAiB;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEI,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAC5B;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,MAAgC;QAC7C,OAAO;YACL,MAAM,EAAE,mBAAiB;YACzB,OAAO,EAAE;gBACP,GAAG,yBAAyB;gBAC5B,8BAAa,CAAC,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC;gBAC/C,gCAAc,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC;aACzC;YACD,OAAO,EAAE,CAAC,GAAG,yBAAyB,EAAE,8BAAa,EAAE,gCAAc,CAAC;SACvE,CAAC;IACJ,CAAC;CACF,CAAA;AAlBY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,iBAAiB,CAkB7B"}
|
|
1
|
+
{"version":3,"file":"foundations.modules.js","sourceRoot":"","sources":["../../src/foundations/foundations.modules.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,sEAAkE;AAClE,uDAAmD;AACnD,oDAAgD;AAChD,uDAAmD;AACnD,6DAAyD;AACzD,6DAAyD;AACzD,6DAAyD;AAEzD,gEAA4D;AAE5D,4EAAuE;AACvE,6DAAyD;AACzD,0DAAqD;AACrD,sEAAkE;AAClE,0D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,EAAC,EAAE,CAAC;GACE,iBAAiB,CAkB7B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FastifyReply } from "fastify";
|
|
2
|
+
import { CacheService } from "../../../core/cache/services/cache.service";
|
|
3
|
+
import { AuditService } from "../../audit/services/audit.service";
|
|
4
|
+
import { HowToPostDTO } from "../dtos/how-to.post.dto";
|
|
5
|
+
import { HowToPutDTO } from "../dtos/how-to.put.dto";
|
|
6
|
+
import { HowToService } from "../services/how-to.service";
|
|
7
|
+
export declare class HowToController {
|
|
8
|
+
private readonly howToService;
|
|
9
|
+
private readonly cacheService;
|
|
10
|
+
private readonly auditService;
|
|
11
|
+
private readonly crud;
|
|
12
|
+
private readonly relationships;
|
|
13
|
+
constructor(howToService: HowToService, cacheService: CacheService, auditService: AuditService);
|
|
14
|
+
findAll(reply: FastifyReply, query: any, search?: string, fetchAll?: boolean, orderBy?: string): Promise<void>;
|
|
15
|
+
findById(reply: FastifyReply, howToId: string): Promise<void>;
|
|
16
|
+
create(reply: FastifyReply, body: HowToPostDTO): Promise<void>;
|
|
17
|
+
update(reply: FastifyReply, body: HowToPutDTO): Promise<void>;
|
|
18
|
+
delete(reply: FastifyReply, howToId: string): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=how-to.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.controller.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/controllers/how-to.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,qBAEa,eAAe;IAKxB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAN/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+C;IACpE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAuD;gBAGlE,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY;IAIvC,OAAO,CACJ,KAAK,EAAE,YAAY,EACjB,KAAK,EAAE,GAAG,EACF,MAAM,CAAC,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,OAAO,EACnB,OAAO,CAAC,EAAE,MAAM;IAO9B,QAAQ,CAAQ,KAAK,EAAE,YAAY,EAAoB,OAAO,EAAE,MAAM;IAMtE,MAAM,CAAQ,KAAK,EAAE,YAAY,EAAU,IAAI,EAAE,YAAY;IAe7D,MAAM,CAAQ,KAAK,EAAE,YAAY,EAAU,IAAI,EAAE,WAAW;IAe5D,MAAM,CAAQ,KAAK,EAAE,YAAY,EAAoB,OAAO,EAAE,MAAM;CAG3E"}
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.HowToController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const audit_decorator_1 = require("../../../common/decorators/audit.decorator");
|
|
18
|
+
const cache_invalidate_decorator_1 = require("../../../common/decorators/cache-invalidate.decorator");
|
|
19
|
+
const validate_id_decorator_1 = require("../../../common/decorators/validate-id.decorator");
|
|
20
|
+
const jwt_auth_guard_1 = require("../../../common/guards/jwt.auth.guard");
|
|
21
|
+
const crud_handlers_1 = require("../../../common/handlers/crud.handlers");
|
|
22
|
+
const relationship_handlers_1 = require("../../../common/handlers/relationship.handlers");
|
|
23
|
+
const cache_service_1 = require("../../../core/cache/services/cache.service");
|
|
24
|
+
const audit_service_1 = require("../../audit/services/audit.service");
|
|
25
|
+
const how_to_post_dto_1 = require("../dtos/how-to.post.dto");
|
|
26
|
+
const how_to_put_dto_1 = require("../dtos/how-to.put.dto");
|
|
27
|
+
const how_to_meta_1 = require("../entities/how-to.meta");
|
|
28
|
+
const how_to_service_1 = require("../services/how-to.service");
|
|
29
|
+
let HowToController = class HowToController {
|
|
30
|
+
constructor(howToService, cacheService, auditService) {
|
|
31
|
+
this.howToService = howToService;
|
|
32
|
+
this.cacheService = cacheService;
|
|
33
|
+
this.auditService = auditService;
|
|
34
|
+
this.crud = (0, crud_handlers_1.createCrudHandlers)(() => this.howToService);
|
|
35
|
+
this.relationships = (0, relationship_handlers_1.createRelationshipHandlers)(() => this.howToService);
|
|
36
|
+
}
|
|
37
|
+
async findAll(reply, query, search, fetchAll, orderBy) {
|
|
38
|
+
return this.crud.findAll(reply, { query, search, fetchAll, orderBy });
|
|
39
|
+
}
|
|
40
|
+
async findById(reply, howToId) {
|
|
41
|
+
return this.crud.findById(reply, howToId);
|
|
42
|
+
}
|
|
43
|
+
async create(reply, body) {
|
|
44
|
+
const response = await this.crud.create(reply, body);
|
|
45
|
+
// Queue for AI processing after creation
|
|
46
|
+
await this.howToService.queueHowToForProcessing({
|
|
47
|
+
howToId: body.data.id,
|
|
48
|
+
description: body.data.attributes.description,
|
|
49
|
+
});
|
|
50
|
+
return response;
|
|
51
|
+
}
|
|
52
|
+
async update(reply, body) {
|
|
53
|
+
const response = await this.crud.update(reply, body);
|
|
54
|
+
// Re-queue for AI processing after update
|
|
55
|
+
await this.howToService.queueHowToForProcessing({
|
|
56
|
+
howToId: body.data.id,
|
|
57
|
+
description: body.data.attributes.description,
|
|
58
|
+
});
|
|
59
|
+
return response;
|
|
60
|
+
}
|
|
61
|
+
async delete(reply, howToId) {
|
|
62
|
+
return this.crud.delete(reply, howToId);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
exports.HowToController = HowToController;
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, common_1.Get)(how_to_meta_1.howToMeta.endpoint),
|
|
68
|
+
__param(0, (0, common_1.Res)()),
|
|
69
|
+
__param(1, (0, common_1.Query)()),
|
|
70
|
+
__param(2, (0, common_1.Query)("search")),
|
|
71
|
+
__param(3, (0, common_1.Query)("fetchAll")),
|
|
72
|
+
__param(4, (0, common_1.Query)("orderBy")),
|
|
73
|
+
__metadata("design:type", Function),
|
|
74
|
+
__metadata("design:paramtypes", [Object, Object, String, Boolean, String]),
|
|
75
|
+
__metadata("design:returntype", Promise)
|
|
76
|
+
], HowToController.prototype, "findAll", null);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, common_1.Get)(`${how_to_meta_1.howToMeta.endpoint}/:howToId`),
|
|
79
|
+
(0, audit_decorator_1.Audit)(how_to_meta_1.howToMeta, "howToId"),
|
|
80
|
+
__param(0, (0, common_1.Res)()),
|
|
81
|
+
__param(1, (0, common_1.Param)("howToId")),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], HowToController.prototype, "findById", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, common_1.Post)(how_to_meta_1.howToMeta.endpoint),
|
|
88
|
+
(0, cache_invalidate_decorator_1.CacheInvalidate)(how_to_meta_1.howToMeta),
|
|
89
|
+
__param(0, (0, common_1.Res)()),
|
|
90
|
+
__param(1, (0, common_1.Body)()),
|
|
91
|
+
__metadata("design:type", Function),
|
|
92
|
+
__metadata("design:paramtypes", [Object, how_to_post_dto_1.HowToPostDTO]),
|
|
93
|
+
__metadata("design:returntype", Promise)
|
|
94
|
+
], HowToController.prototype, "create", null);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, common_1.Put)(`${how_to_meta_1.howToMeta.endpoint}/:howToId`),
|
|
97
|
+
(0, validate_id_decorator_1.ValidateId)("howToId"),
|
|
98
|
+
(0, cache_invalidate_decorator_1.CacheInvalidate)(how_to_meta_1.howToMeta, "howToId"),
|
|
99
|
+
__param(0, (0, common_1.Res)()),
|
|
100
|
+
__param(1, (0, common_1.Body)()),
|
|
101
|
+
__metadata("design:type", Function),
|
|
102
|
+
__metadata("design:paramtypes", [Object, how_to_put_dto_1.HowToPutDTO]),
|
|
103
|
+
__metadata("design:returntype", Promise)
|
|
104
|
+
], HowToController.prototype, "update", null);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, common_1.Delete)(`${how_to_meta_1.howToMeta.endpoint}/:howToId`),
|
|
107
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
108
|
+
(0, cache_invalidate_decorator_1.CacheInvalidate)(how_to_meta_1.howToMeta, "howToId"),
|
|
109
|
+
__param(0, (0, common_1.Res)()),
|
|
110
|
+
__param(1, (0, common_1.Param)("howToId")),
|
|
111
|
+
__metadata("design:type", Function),
|
|
112
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
113
|
+
__metadata("design:returntype", Promise)
|
|
114
|
+
], HowToController.prototype, "delete", null);
|
|
115
|
+
exports.HowToController = HowToController = __decorate([
|
|
116
|
+
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
117
|
+
(0, common_1.Controller)(),
|
|
118
|
+
__metadata("design:paramtypes", [how_to_service_1.HowToService,
|
|
119
|
+
cache_service_1.CacheService,
|
|
120
|
+
audit_service_1.AuditService])
|
|
121
|
+
], HowToController);
|
|
122
|
+
//# sourceMappingURL=how-to.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.controller.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/controllers/how-to.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAawB;AAExB,gFAAmE;AACnE,sGAAwF;AACxF,4FAA8E;AAC9E,0EAAqE;AACrE,0EAA4E;AAC5E,0FAA4F;AAC5F,8EAA0E;AAC1E,sEAAkE;AAClE,6DAAuD;AACvD,2DAAqD;AACrD,yDAAoD;AACpD,+DAA0D;AAInD,IAAM,eAAe,GAArB,MAAM,eAAe;IAI1B,YACmB,YAA0B,EAC1B,YAA0B,EAC1B,YAA0B;QAF1B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QAC1B,iBAAY,GAAZ,YAAY,CAAc;QAN5B,SAAI,GAAG,IAAA,kCAAkB,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnD,kBAAa,GAAG,IAAA,kDAA0B,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAMlF,CAAC;IAGE,AAAN,KAAK,CAAC,OAAO,CACJ,KAAmB,EACjB,KAAU,EACF,MAAe,EACb,QAAkB,EACnB,OAAgB;QAElC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;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CA8D3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/dtos/how-to.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,QAAQ;IAEnB,IAAI,EAAE,MAAM,CAAC;IAGb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,qBAAa,YAAY;IAIvB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,qBAAa,gBAAgB;IAI3B,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.HowToDataListDTO = exports.HowToDataDTO = exports.HowToDTO = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const how_to_meta_1 = require("../entities/how-to.meta");
|
|
16
|
+
class HowToDTO {
|
|
17
|
+
}
|
|
18
|
+
exports.HowToDTO = HowToDTO;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.Equals)(how_to_meta_1.howToMeta.endpoint),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], HowToDTO.prototype, "type", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsUUID)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], HowToDTO.prototype, "id", void 0);
|
|
27
|
+
class HowToDataDTO {
|
|
28
|
+
}
|
|
29
|
+
exports.HowToDataDTO = HowToDataDTO;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.ValidateNested)(),
|
|
32
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
33
|
+
(0, class_transformer_1.Type)(() => HowToDTO),
|
|
34
|
+
__metadata("design:type", HowToDTO)
|
|
35
|
+
], HowToDataDTO.prototype, "data", void 0);
|
|
36
|
+
class HowToDataListDTO {
|
|
37
|
+
}
|
|
38
|
+
exports.HowToDataListDTO = HowToDataListDTO;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
41
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
42
|
+
(0, class_transformer_1.Type)(() => HowToDTO),
|
|
43
|
+
__metadata("design:type", Array)
|
|
44
|
+
], HowToDataListDTO.prototype, "data", void 0);
|
|
45
|
+
//# sourceMappingURL=how-to.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.dto.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/dtos/how-to.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAA6E;AAC7E,yDAAoD;AAEpD,MAAa,QAAQ;CAMpB;AAND,4BAMC;AAJC;IADC,IAAA,wBAAM,EAAC,uBAAS,CAAC,QAAQ,CAAC;;sCACd;AAGb;IADC,IAAA,wBAAM,GAAE;;oCACE;AAGb,MAAa,YAAY;CAKxB;AALD,oCAKC;AADC;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;8BACf,QAAQ;0CAAC;AAGjB,MAAa,gBAAgB;CAK5B;AALD,4CAKC;AADC;IAHC,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,QAAQ,CAAC;;8CACJ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class HowToPostAttributesDTO {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
pages?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class HowToPostDataDTO {
|
|
7
|
+
type: string;
|
|
8
|
+
id: string;
|
|
9
|
+
attributes: HowToPostAttributesDTO;
|
|
10
|
+
}
|
|
11
|
+
export declare class HowToPostDTO {
|
|
12
|
+
data: HowToPostDataDTO;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=how-to.post.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.post.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/dtos/how-to.post.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,sBAAsB;IAIjC,IAAI,EAAE,MAAM,CAAC;IAKb,WAAW,EAAE,MAAM,CAAC;IAIpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,gBAAgB;IAE3B,IAAI,EAAE,MAAM,CAAC;IAGb,EAAE,EAAE,MAAM,CAAC;IAKX,UAAU,EAAE,sBAAsB,CAAC;CACpC;AAED,qBAAa,YAAY;IAIvB,IAAI,EAAE,gBAAgB,CAAC;CACxB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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.HowToPostDTO = exports.HowToPostDataDTO = exports.HowToPostAttributesDTO = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const how_to_meta_1 = require("../entities/how-to.meta");
|
|
16
|
+
class HowToPostAttributesDTO {
|
|
17
|
+
}
|
|
18
|
+
exports.HowToPostAttributesDTO = HowToPostAttributesDTO;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsDefined)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], HowToPostAttributesDTO.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsDefined)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], HowToPostAttributesDTO.prototype, "description", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], HowToPostAttributesDTO.prototype, "pages", void 0);
|
|
36
|
+
class HowToPostDataDTO {
|
|
37
|
+
}
|
|
38
|
+
exports.HowToPostDataDTO = HowToPostDataDTO;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.Equals)(how_to_meta_1.howToMeta.endpoint),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], HowToPostDataDTO.prototype, "type", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsUUID)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], HowToPostDataDTO.prototype, "id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.ValidateNested)(),
|
|
49
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
50
|
+
(0, class_transformer_1.Type)(() => HowToPostAttributesDTO),
|
|
51
|
+
__metadata("design:type", HowToPostAttributesDTO)
|
|
52
|
+
], HowToPostDataDTO.prototype, "attributes", void 0);
|
|
53
|
+
class HowToPostDTO {
|
|
54
|
+
}
|
|
55
|
+
exports.HowToPostDTO = HowToPostDTO;
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.ValidateNested)(),
|
|
58
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
59
|
+
(0, class_transformer_1.Type)(() => HowToPostDataDTO),
|
|
60
|
+
__metadata("design:type", HowToPostDataDTO)
|
|
61
|
+
], HowToPostDTO.prototype, "data", void 0);
|
|
62
|
+
//# sourceMappingURL=how-to.post.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.post.dto.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/dtos/how-to.post.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAA8G;AAC9G,yDAAoD;AAEpD,MAAa,sBAAsB;CAclC;AAdD,wDAcC;AAVC;IAHC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACE;AAKb;IAHC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;2DACS;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;qDACI;AAGjB,MAAa,gBAAgB;CAW5B;AAXD,4CAWC;AATC;IADC,IAAA,wBAAM,EAAC,uBAAS,CAAC,QAAQ,CAAC;;8CACd;AAGb;IADC,IAAA,wBAAM,GAAE;;4CACE;AAKX;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACvB,sBAAsB;oDAAC;AAGrC,MAAa,YAAY;CAKxB;AALD,oCAKC;AADC;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC;8BACvB,gBAAgB;0CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class HowToPutAttributesDTO {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
pages?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class HowToPutDataDTO {
|
|
7
|
+
type: string;
|
|
8
|
+
id: string;
|
|
9
|
+
attributes: HowToPutAttributesDTO;
|
|
10
|
+
}
|
|
11
|
+
export declare class HowToPutDTO {
|
|
12
|
+
data: HowToPutDataDTO;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=how-to.put.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.put.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/dtos/how-to.put.dto.ts"],"names":[],"mappings":"AAIA,qBAAa,qBAAqB;IAIhC,IAAI,EAAE,MAAM,CAAC;IAKb,WAAW,EAAE,MAAM,CAAC;IAIpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,eAAe;IAE1B,IAAI,EAAE,MAAM,CAAC;IAGb,EAAE,EAAE,MAAM,CAAC;IAKX,UAAU,EAAE,qBAAqB,CAAC;CACnC;AAED,qBAAa,WAAW;IAItB,IAAI,EAAE,eAAe,CAAC;CACvB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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.HowToPutDTO = exports.HowToPutDataDTO = exports.HowToPutAttributesDTO = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const how_to_meta_1 = require("../entities/how-to.meta");
|
|
16
|
+
class HowToPutAttributesDTO {
|
|
17
|
+
}
|
|
18
|
+
exports.HowToPutAttributesDTO = HowToPutAttributesDTO;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsDefined)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], HowToPutAttributesDTO.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsDefined)(),
|
|
27
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], HowToPutAttributesDTO.prototype, "description", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], HowToPutAttributesDTO.prototype, "pages", void 0);
|
|
36
|
+
class HowToPutDataDTO {
|
|
37
|
+
}
|
|
38
|
+
exports.HowToPutDataDTO = HowToPutDataDTO;
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.Equals)(how_to_meta_1.howToMeta.endpoint),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], HowToPutDataDTO.prototype, "type", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsUUID)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], HowToPutDataDTO.prototype, "id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.ValidateNested)(),
|
|
49
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
50
|
+
(0, class_transformer_1.Type)(() => HowToPutAttributesDTO),
|
|
51
|
+
__metadata("design:type", HowToPutAttributesDTO)
|
|
52
|
+
], HowToPutDataDTO.prototype, "attributes", void 0);
|
|
53
|
+
class HowToPutDTO {
|
|
54
|
+
}
|
|
55
|
+
exports.HowToPutDTO = HowToPutDTO;
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.ValidateNested)(),
|
|
58
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
59
|
+
(0, class_transformer_1.Type)(() => HowToPutDataDTO),
|
|
60
|
+
__metadata("design:type", HowToPutDataDTO)
|
|
61
|
+
], HowToPutDTO.prototype, "data", void 0);
|
|
62
|
+
//# sourceMappingURL=how-to.put.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.put.dto.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/dtos/how-to.put.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAA8G;AAC9G,yDAAoD;AAEpD,MAAa,qBAAqB;CAcjC;AAdD,sDAcC;AAVC;IAHC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;mDACE;AAKb;IAHC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACS;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oDACI;AAGjB,MAAa,eAAe;CAW3B;AAXD,0CAWC;AATC;IADC,IAAA,wBAAM,EAAC,uBAAS,CAAC,QAAQ,CAAC;;6CACd;AAGb;IADC,IAAA,wBAAM,GAAE;;2CACE;AAKX;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC;8BACtB,qBAAqB;mDAAC;AAGpC,MAAa,WAAW;CAKvB;AALD,kCAKC;AADC;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,eAAe,CAAC;8BACtB,eAAe;yCAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Entity } from "../../../common";
|
|
2
|
+
/**
|
|
3
|
+
* HowTo Entity Type
|
|
4
|
+
*/
|
|
5
|
+
export type HowTo = Entity & {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
pages?: string;
|
|
9
|
+
abstract?: string;
|
|
10
|
+
tldr?: string;
|
|
11
|
+
aiStatus?: string;
|
|
12
|
+
relevance?: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* HowTo Entity Descriptor
|
|
16
|
+
*
|
|
17
|
+
* Single source of truth for the HowTo entity configuration.
|
|
18
|
+
* Auto-generates mapper, serialiser, constraints, and indexes.
|
|
19
|
+
*/
|
|
20
|
+
export declare const HowToDescriptor: import("../../../common").EntityDescriptor<HowTo, {}>;
|
|
21
|
+
export type HowToDescriptorType = typeof HowToDescriptor;
|
|
22
|
+
//# sourceMappingURL=how-to.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/entities/how-to.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGvD;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,uDA0B1B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,OAAO,eAAe,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HowToDescriptor = void 0;
|
|
4
|
+
const common_1 = require("../../../common");
|
|
5
|
+
const how_to_meta_1 = require("./how-to.meta");
|
|
6
|
+
/**
|
|
7
|
+
* HowTo Entity Descriptor
|
|
8
|
+
*
|
|
9
|
+
* Single source of truth for the HowTo entity configuration.
|
|
10
|
+
* Auto-generates mapper, serialiser, constraints, and indexes.
|
|
11
|
+
*/
|
|
12
|
+
exports.HowToDescriptor = (0, common_1.defineEntity)()({
|
|
13
|
+
...how_to_meta_1.howToMeta,
|
|
14
|
+
isCompanyScoped: false,
|
|
15
|
+
fields: {
|
|
16
|
+
name: { type: "string", required: true },
|
|
17
|
+
description: { type: "string", required: true },
|
|
18
|
+
pages: { type: "string" },
|
|
19
|
+
abstract: { type: "string" },
|
|
20
|
+
tldr: { type: "string" },
|
|
21
|
+
aiStatus: { type: "string" },
|
|
22
|
+
},
|
|
23
|
+
computed: {
|
|
24
|
+
relevance: {
|
|
25
|
+
compute: (params) => {
|
|
26
|
+
if (!params.record.has("score"))
|
|
27
|
+
return undefined;
|
|
28
|
+
const score = params.record.get("score");
|
|
29
|
+
if (score?.toNumber)
|
|
30
|
+
return score.toNumber();
|
|
31
|
+
return Number(score) || undefined;
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
relationships: {},
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=how-to.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/entities/how-to.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AACvD,+CAA0C;AAgB1C;;;;;GAKG;AACU,QAAA,eAAe,GAAG,IAAA,qBAAY,GAAS,CAAC;IACnD,GAAG,uBAAS;IAEZ,eAAe,EAAE,KAAK;IAEtB,MAAM,EAAE;QACN,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/C,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACxB,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC7B;IAED,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE;gBAClB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;oBAAE,OAAO,SAAS,CAAC;gBAClD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE,QAAQ;oBAAE,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;gBAC7C,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;YACpC,CAAC;SACF;KACF;IAED,aAAa,EAAE,EAAE;CAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.meta.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/entities/how-to.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,SAAS,EAAE,QAKvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.howToMeta = void 0;
|
|
4
|
+
exports.howToMeta = {
|
|
5
|
+
type: "howtos",
|
|
6
|
+
endpoint: "howtos",
|
|
7
|
+
nodeName: "howTo",
|
|
8
|
+
labelName: "HowTo",
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=how-to.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.meta.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/entities/how-to.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,SAAS,GAAa;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,OAAO;CACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/how-to/how-to.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;AActD,qBAMa,WAAY,YAAW,YAAY;IAC9C,YAAY;CAGb"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.HowToModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const conditional_service_decorator_1 = require("../../common/decorators/conditional-service.decorator");
|
|
12
|
+
const registry_1 = require("../../common/registries/registry");
|
|
13
|
+
const blocknote_module_1 = require("../../core/blocknote/blocknote.module");
|
|
14
|
+
const audit_module_1 = require("../audit/audit.module");
|
|
15
|
+
const chunk_module_1 = require("../chunk/chunk.module");
|
|
16
|
+
const chunker_module_1 = require("../chunker/chunker.module");
|
|
17
|
+
const tokenusage_module_1 = require("../tokenusage/tokenusage.module");
|
|
18
|
+
const how_to_controller_1 = require("./controllers/how-to.controller");
|
|
19
|
+
const how_to_1 = require("./entities/how-to");
|
|
20
|
+
const how_to_processor_1 = require("./processors/how-to.processor");
|
|
21
|
+
const how_to_repository_1 = require("./repositories/how-to.repository");
|
|
22
|
+
const how_to_service_1 = require("./services/how-to.service");
|
|
23
|
+
let HowToModule = class HowToModule {
|
|
24
|
+
onModuleInit() {
|
|
25
|
+
registry_1.modelRegistry.register(how_to_1.HowToDescriptor.model);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.HowToModule = HowToModule;
|
|
29
|
+
exports.HowToModule = HowToModule = __decorate([
|
|
30
|
+
(0, common_1.Module)({
|
|
31
|
+
controllers: [how_to_controller_1.HowToController],
|
|
32
|
+
providers: [how_to_1.HowToDescriptor.model.serialiser, how_to_repository_1.HowToRepository, how_to_service_1.HowToService, (0, conditional_service_decorator_1.createWorkerProvider)(how_to_processor_1.HowToProcessor)],
|
|
33
|
+
exports: [how_to_repository_1.HowToRepository, how_to_service_1.HowToService],
|
|
34
|
+
imports: [audit_module_1.AuditModule, blocknote_module_1.BlockNoteModule, chunk_module_1.ChunkModule, chunker_module_1.ChunkerModule, tokenusage_module_1.TokenUsageModule],
|
|
35
|
+
})
|
|
36
|
+
], HowToModule);
|
|
37
|
+
//# sourceMappingURL=how-to.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.module.js","sourceRoot":"","sources":["../../../src/foundations/how-to/how-to.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsD;AACtD,yGAA6F;AAC7F,+DAAiE;AACjE,4EAAwE;AACxE,wDAAoD;AACpD,wDAAoD;AACpD,8DAA0D;AAC1D,uEAAmE;AACnE,uEAAkE;AAClE,8CAAoD;AACpD,oEAA+D;AAC/D,wEAAmE;AACnE,8DAAyD;AAQlD,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YAAY;QACV,wBAAa,CAAC,QAAQ,CAAC,wBAAe,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;CACF,CAAA;AAJY,kCAAW;sBAAX,WAAW;IANvB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,mCAAe,CAAC;QAC9B,SAAS,EAAE,CAAC,wBAAe,CAAC,KAAK,CAAC,UAAU,EAAE,mCAAe,EAAE,6BAAY,EAAE,IAAA,oDAAoB,EAAC,iCAAc,CAAC,CAAC;QAClH,OAAO,EAAE,CAAC,mCAAe,EAAE,6BAAY,CAAC;QACxC,OAAO,EAAE,CAAC,0BAAW,EAAE,kCAAe,EAAE,0BAAW,EAAE,8BAAa,EAAE,oCAAgB,CAAC;KACtF,CAAC;GACW,WAAW,CAIvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./how-to.module";
|
|
2
|
+
export * from "./entities/how-to";
|
|
3
|
+
export * from "./entities/how-to.meta";
|
|
4
|
+
export * from "./dtos/how-to.dto";
|
|
5
|
+
export * from "./dtos/how-to.post.dto";
|
|
6
|
+
export * from "./dtos/how-to.put.dto";
|
|
7
|
+
export * from "./repositories/how-to.repository";
|
|
8
|
+
export * from "./services/how-to.service";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundations/how-to/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./how-to.module"), exports);
|
|
18
|
+
__exportStar(require("./entities/how-to"), exports);
|
|
19
|
+
__exportStar(require("./entities/how-to.meta"), exports);
|
|
20
|
+
__exportStar(require("./dtos/how-to.dto"), exports);
|
|
21
|
+
__exportStar(require("./dtos/how-to.post.dto"), exports);
|
|
22
|
+
__exportStar(require("./dtos/how-to.put.dto"), exports);
|
|
23
|
+
__exportStar(require("./repositories/how-to.repository"), exports);
|
|
24
|
+
__exportStar(require("./services/how-to.service"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/foundations/how-to/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,oDAAkC;AAClC,yDAAuC;AACvC,oDAAkC;AAClC,yDAAuC;AACvC,wDAAsC;AACtC,mEAAiD;AACjD,4DAA0C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { WorkerHost } from "@nestjs/bullmq";
|
|
2
|
+
import { ConfigService } from "@nestjs/config";
|
|
3
|
+
import { Job } from "bullmq";
|
|
4
|
+
import { ClsService } from "nestjs-cls";
|
|
5
|
+
import { BaseConfigInterface } from "../../../config/interfaces/base.config.interface";
|
|
6
|
+
import { AppLoggingService } from "../../../core/logging/services/logging.service";
|
|
7
|
+
import { ChunkRepository } from "../../chunk/repositories/chunk.repository";
|
|
8
|
+
import { HowToService } from "../services/how-to.service";
|
|
9
|
+
export declare class HowToProcessor extends WorkerHost {
|
|
10
|
+
private readonly logger;
|
|
11
|
+
private readonly howToService;
|
|
12
|
+
private readonly chunkRepository;
|
|
13
|
+
private readonly cls;
|
|
14
|
+
private readonly howToJobName;
|
|
15
|
+
constructor(logger: AppLoggingService, howToService: HowToService, chunkRepository: ChunkRepository, cls: ClsService, configService: ConfigService<BaseConfigInterface>);
|
|
16
|
+
onActive(job: Job): void;
|
|
17
|
+
onError(job: Job): void;
|
|
18
|
+
onCompleted(job: Job): void;
|
|
19
|
+
process(job: Job): Promise<void>;
|
|
20
|
+
private _processHowTo;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=how-to.processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.processor.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/processors/how-to.processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,qBACa,cAAe,SAAQ,UAAU;IAI1C,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,GAAG;IANtB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;gBAGnB,MAAM,EAAE,iBAAiB,EACzB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,EAChC,GAAG,EAAE,UAAU,EAChC,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAOnD,QAAQ,CAAC,GAAG,EAAE,GAAG;IAKjB,OAAO,CAAC,GAAG,EAAE,GAAG;IAKhB,WAAW,CAAC,GAAG,EAAE,GAAG;IAId,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;YAmBxB,aAAa;CAmB5B"}
|
|
@@ -0,0 +1,101 @@
|
|
|
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.HowToProcessor = void 0;
|
|
13
|
+
const bullmq_1 = require("@nestjs/bullmq");
|
|
14
|
+
const config_1 = require("@nestjs/config");
|
|
15
|
+
const bullmq_2 = require("bullmq");
|
|
16
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
17
|
+
const ai_status_1 = require("../../../common/enums/ai.status");
|
|
18
|
+
const queue_id_1 = require("../../../config/enums/queue.id");
|
|
19
|
+
const logging_service_1 = require("../../../core/logging/services/logging.service");
|
|
20
|
+
const chunk_repository_1 = require("../../chunk/repositories/chunk.repository");
|
|
21
|
+
const how_to_meta_1 = require("../entities/how-to.meta");
|
|
22
|
+
const how_to_service_1 = require("../services/how-to.service");
|
|
23
|
+
let HowToProcessor = class HowToProcessor extends bullmq_1.WorkerHost {
|
|
24
|
+
constructor(logger, howToService, chunkRepository, cls, configService) {
|
|
25
|
+
super();
|
|
26
|
+
this.logger = logger;
|
|
27
|
+
this.howToService = howToService;
|
|
28
|
+
this.chunkRepository = chunkRepository;
|
|
29
|
+
this.cls = cls;
|
|
30
|
+
this.howToJobName = configService.get("jobNames", { infer: true })?.process?.HowTo ?? "process_howto";
|
|
31
|
+
}
|
|
32
|
+
onActive(job) {
|
|
33
|
+
this.logger.debug(`Processing ${job.name} job`);
|
|
34
|
+
}
|
|
35
|
+
onError(job) {
|
|
36
|
+
this.logger.error(`Error processing ${job.name} job (ID: ${job.id}). Reason: ${job.failedReason}`);
|
|
37
|
+
}
|
|
38
|
+
onCompleted(job) {
|
|
39
|
+
this.logger.debug(`Completed ${job.name} job (ID: ${job.id})`);
|
|
40
|
+
}
|
|
41
|
+
async process(job) {
|
|
42
|
+
if (job.name !== this.howToJobName) {
|
|
43
|
+
throw new Error(`Job ${job.name} not handled by HowToProcessor`);
|
|
44
|
+
}
|
|
45
|
+
await this.cls.run(async () => {
|
|
46
|
+
this.cls.set("userId", job.data.userId);
|
|
47
|
+
this.cls.set("isAutomatedJob", true);
|
|
48
|
+
if (job.data.companyId) {
|
|
49
|
+
this.cls.set("companyId", job.data.companyId);
|
|
50
|
+
}
|
|
51
|
+
await this._processHowTo({
|
|
52
|
+
howToId: job.data.id,
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
async _processHowTo(params) {
|
|
57
|
+
const pendingChunks = await this.chunkRepository.getChunksInProgress({
|
|
58
|
+
id: params.howToId,
|
|
59
|
+
nodeType: how_to_meta_1.howToMeta.labelName,
|
|
60
|
+
});
|
|
61
|
+
await this.howToService.updateAiStatus({
|
|
62
|
+
id: params.howToId,
|
|
63
|
+
aiStatus: ai_status_1.AiStatus.InProgress,
|
|
64
|
+
});
|
|
65
|
+
// Mark completed when all chunks are done
|
|
66
|
+
if (pendingChunks.length === 0) {
|
|
67
|
+
await this.howToService.updateAiStatus({
|
|
68
|
+
id: params.howToId,
|
|
69
|
+
aiStatus: ai_status_1.AiStatus.Completed,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
exports.HowToProcessor = HowToProcessor;
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, bullmq_1.OnWorkerEvent)("active"),
|
|
77
|
+
__metadata("design:type", Function),
|
|
78
|
+
__metadata("design:paramtypes", [bullmq_2.Job]),
|
|
79
|
+
__metadata("design:returntype", void 0)
|
|
80
|
+
], HowToProcessor.prototype, "onActive", null);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, bullmq_1.OnWorkerEvent)("failed"),
|
|
83
|
+
__metadata("design:type", Function),
|
|
84
|
+
__metadata("design:paramtypes", [bullmq_2.Job]),
|
|
85
|
+
__metadata("design:returntype", void 0)
|
|
86
|
+
], HowToProcessor.prototype, "onError", null);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, bullmq_1.OnWorkerEvent)("completed"),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", [bullmq_2.Job]),
|
|
91
|
+
__metadata("design:returntype", void 0)
|
|
92
|
+
], HowToProcessor.prototype, "onCompleted", null);
|
|
93
|
+
exports.HowToProcessor = HowToProcessor = __decorate([
|
|
94
|
+
(0, bullmq_1.Processor)(queue_id_1.QueueId.HOWTO, { concurrency: 10, lockDuration: 1000 * 60 }),
|
|
95
|
+
__metadata("design:paramtypes", [logging_service_1.AppLoggingService,
|
|
96
|
+
how_to_service_1.HowToService,
|
|
97
|
+
chunk_repository_1.ChunkRepository,
|
|
98
|
+
nestjs_cls_1.ClsService,
|
|
99
|
+
config_1.ConfigService])
|
|
100
|
+
], HowToProcessor);
|
|
101
|
+
//# sourceMappingURL=how-to.processor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.processor.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/processors/how-to.processor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAsE;AACtE,2CAA+C;AAC/C,mCAA6B;AAC7B,2CAAwC;AACxC,+DAA2D;AAC3D,6DAAyD;AAEzD,oFAAmF;AACnF,gFAA4E;AAC5E,yDAAoD;AACpD,+DAA0D;AAGnD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,mBAAU;IAG5C,YACmB,MAAyB,EACzB,YAA0B,EAC1B,eAAgC,EAChC,GAAe,EAChC,aAAiD;QAEjD,KAAK,EAAE,CAAC;QANS,WAAM,GAAN,MAAM,CAAmB;QACzB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,oBAAe,GAAf,eAAe,CAAiB;QAChC,QAAG,GAAH,GAAG,CAAY;QAIhC,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,IAAI,eAAe,CAAC;IACxG,CAAC;IAGD,QAAQ,CAAC,GAAQ;QACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC;IAClD,CAAC;IAGD,OAAO,CAAC,GAAQ;QACd,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,GAAG,CAAC,IAAI,aAAa,GAAG,CAAC,EAAE,cAAc,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;IACrG,CAAC;IAGD,WAAW,CAAC,GAAQ;QAClB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,GAAG,CAAC,IAAI,aAAa,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IACjE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAQ;QACpB,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CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAnEY,wCAAc;AAezB;IADC,IAAA,sBAAa,EAAC,QAAQ,CAAC;;qCACV,YAAG;;8CAEhB;AAGD;IADC,IAAA,sBAAa,EAAC,QAAQ,CAAC;;qCACX,YAAG;;6CAEf;AAGD;IADC,IAAA,sBAAa,EAAC,WAAW,CAAC;;qCACV,YAAG;;iDAEnB;yBA3BU,cAAc;IAD1B,IAAA,kBAAS,EAAC,kBAAO,CAAC,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;qCAK1C,mCAAiB;QACX,6BAAY;QACT,kCAAe;QAC3B,uBAAU;QACjB,sBAAa;GARnB,cAAc,CAmE1B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ClsService } from "nestjs-cls";
|
|
2
|
+
import { AiStatus } from "../../../common/enums/ai.status";
|
|
3
|
+
import { AbstractRepository } from "../../../core/neo4j/abstracts/abstract.repository";
|
|
4
|
+
import { Neo4jService } from "../../../core/neo4j/services/neo4j.service";
|
|
5
|
+
import { SecurityService } from "../../../core/security/services/security.service";
|
|
6
|
+
import { HowTo, HowToDescriptor } from "../entities/how-to";
|
|
7
|
+
export declare class HowToRepository extends AbstractRepository<HowTo, typeof HowToDescriptor.relationships> {
|
|
8
|
+
protected readonly descriptor: import("../../..").EntityDescriptor<HowTo, {}>;
|
|
9
|
+
constructor(neo4j: Neo4jService, securityService: SecurityService, clsService: ClsService);
|
|
10
|
+
/**
|
|
11
|
+
* Update the AI processing status of a HowTo
|
|
12
|
+
*/
|
|
13
|
+
updateStatus(params: {
|
|
14
|
+
id: string;
|
|
15
|
+
aiStatus: AiStatus;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=how-to.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/repositories/how-to.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG5D,qBACa,eAAgB,SAAQ,kBAAkB,CAAC,KAAK,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC;IAClG,SAAS,CAAC,QAAQ,CAAC,UAAU,iDAAmB;gBAEpC,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU;IAIzF;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAgB9E"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.HowToRepository = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
15
|
+
const abstract_repository_1 = require("../../../core/neo4j/abstracts/abstract.repository");
|
|
16
|
+
const neo4j_service_1 = require("../../../core/neo4j/services/neo4j.service");
|
|
17
|
+
const security_service_1 = require("../../../core/security/services/security.service");
|
|
18
|
+
const how_to_1 = require("../entities/how-to");
|
|
19
|
+
const how_to_meta_1 = require("../entities/how-to.meta");
|
|
20
|
+
let HowToRepository = class HowToRepository extends abstract_repository_1.AbstractRepository {
|
|
21
|
+
constructor(neo4j, securityService, clsService) {
|
|
22
|
+
super(neo4j, securityService, clsService);
|
|
23
|
+
this.descriptor = how_to_1.HowToDescriptor;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Update the AI processing status of a HowTo
|
|
27
|
+
*/
|
|
28
|
+
async updateStatus(params) {
|
|
29
|
+
const query = this.neo4j.initQuery();
|
|
30
|
+
query.queryParams = {
|
|
31
|
+
...query.queryParams,
|
|
32
|
+
id: params.id,
|
|
33
|
+
aiStatus: params.aiStatus,
|
|
34
|
+
};
|
|
35
|
+
query.query = `
|
|
36
|
+
MATCH (${how_to_meta_1.howToMeta.nodeName}:${how_to_meta_1.howToMeta.labelName} {id: $id})
|
|
37
|
+
SET ${how_to_meta_1.howToMeta.nodeName}.aiStatus = $aiStatus, ${how_to_meta_1.howToMeta.nodeName}.updatedAt = datetime()
|
|
38
|
+
`;
|
|
39
|
+
await this.neo4j.writeOne(query);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
exports.HowToRepository = HowToRepository;
|
|
43
|
+
exports.HowToRepository = HowToRepository = __decorate([
|
|
44
|
+
(0, common_1.Injectable)(),
|
|
45
|
+
__metadata("design:paramtypes", [neo4j_service_1.Neo4jService, security_service_1.SecurityService, nestjs_cls_1.ClsService])
|
|
46
|
+
], HowToRepository);
|
|
47
|
+
//# sourceMappingURL=how-to.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.repository.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/repositories/how-to.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAAwC;AAExC,2FAAuF;AACvF,8EAA0E;AAC1E,uFAAmF;AACnF,+CAA4D;AAC5D,yDAAoD;AAG7C,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,wCAA+D;IAGlG,YAAY,KAAmB,EAAE,eAAgC,EAAE,UAAsB;QACvF,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;QAHzB,eAAU,GAAG,wBAAe,CAAC;IAIhD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,MAA0C;QAC3D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QAErC,KAAK,CAAC,WAAW,GAAG;YAClB,GAAG,KAAK,CAAC,WAAW;YACpB,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B,CAAC;QAEF,KAAK,CAAC,KAAK,GAAG;eACH,uBAAS,CAAC,QAAQ,IAAI,uBAAS,CAAC,SAAS;YAC5C,uBAAS,CAAC,QAAQ,0BAA0B,uBAAS,CAAC,QAAQ;KACrE,CAAC;QAEF,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AA1BY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAIQ,4BAAY,EAAmB,kCAAe,EAAc,uBAAU;GAH9E,eAAe,CA0B3B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ConfigService } from "@nestjs/config";
|
|
2
|
+
import { Queue } from "bullmq";
|
|
3
|
+
import { ClsService } from "nestjs-cls";
|
|
4
|
+
import { AiStatus } from "../../../common/enums/ai.status";
|
|
5
|
+
import { BaseConfigInterface } from "../../../config/interfaces/base.config.interface";
|
|
6
|
+
import { BlockNoteService } from "../../../core/blocknote/services/blocknote.service";
|
|
7
|
+
import { JsonApiService } from "../../../core/jsonapi/services/jsonapi.service";
|
|
8
|
+
import { AbstractService } from "../../../core/neo4j/abstracts/abstract.service";
|
|
9
|
+
import { WebSocketService } from "../../../core/websocket/services/websocket.service";
|
|
10
|
+
import { ChunkRepository } from "../../chunk/repositories/chunk.repository";
|
|
11
|
+
import { ChunkService } from "../../chunk/services/chunk.service";
|
|
12
|
+
import { ChunkerService } from "../../chunker/services/chunker.service";
|
|
13
|
+
import { HowTo, HowToDescriptor } from "../entities/how-to";
|
|
14
|
+
import { HowToRepository } from "../repositories/how-to.repository";
|
|
15
|
+
export declare class HowToService extends AbstractService<HowTo, typeof HowToDescriptor.relationships> {
|
|
16
|
+
private readonly howToRepository;
|
|
17
|
+
private readonly chunkService;
|
|
18
|
+
private readonly chunkerService;
|
|
19
|
+
private readonly blockNoteService;
|
|
20
|
+
private readonly webSocketService;
|
|
21
|
+
private readonly chunkRepository;
|
|
22
|
+
private readonly chunkQueue;
|
|
23
|
+
protected readonly descriptor: import("../../..").EntityDescriptor<HowTo, {}>;
|
|
24
|
+
private readonly jobNames;
|
|
25
|
+
constructor(jsonApiService: JsonApiService, howToRepository: HowToRepository, clsService: ClsService, chunkService: ChunkService, chunkerService: ChunkerService, blockNoteService: BlockNoteService, webSocketService: WebSocketService, chunkRepository: ChunkRepository, chunkQueue: Queue, configService: ConfigService<BaseConfigInterface>);
|
|
26
|
+
/**
|
|
27
|
+
* Queue a HowTo for AI processing.
|
|
28
|
+
* Converts BlockNote JSON to Markdown, chunks it, and queues each chunk.
|
|
29
|
+
*/
|
|
30
|
+
queueHowToForProcessing(params: {
|
|
31
|
+
howToId: string;
|
|
32
|
+
description: string;
|
|
33
|
+
}): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Update AI status and broadcast progress via WebSocket.
|
|
36
|
+
*/
|
|
37
|
+
updateAiStatus(params: {
|
|
38
|
+
id: string;
|
|
39
|
+
aiStatus: AiStatus;
|
|
40
|
+
}): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=how-to.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/how-to/services/how-to.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAGvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,qBACa,YAAa,SAAQ,eAAe,CAAC,KAAK,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC;IAM1F,OAAO,CAAC,QAAQ,CAAC,eAAe;IAEhC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe;IACJ,OAAO,CAAC,QAAQ,CAAC,UAAU;IAZzD,SAAS,CAAC,QAAQ,CAAC,UAAU,iDAAmB;IAChD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;gBAGjD,cAAc,EAAE,cAAc,EACb,eAAe,EAAE,eAAe,EACjD,UAAU,EAAE,UAAU,EACL,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,EACJ,UAAU,EAAE,KAAK,EAC9D,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAMnD;;;OAGG;IACG,uBAAuB,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAuC9F;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA2BhF"}
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.HowToService = void 0;
|
|
16
|
+
const bullmq_1 = require("@nestjs/bullmq");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const config_1 = require("@nestjs/config");
|
|
19
|
+
const bullmq_2 = require("bullmq");
|
|
20
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
21
|
+
const ai_status_1 = require("../../../common/enums/ai.status");
|
|
22
|
+
const queue_id_1 = require("../../../config/enums/queue.id");
|
|
23
|
+
const blocknote_service_1 = require("../../../core/blocknote/services/blocknote.service");
|
|
24
|
+
const jsonapi_service_1 = require("../../../core/jsonapi/services/jsonapi.service");
|
|
25
|
+
const abstract_service_1 = require("../../../core/neo4j/abstracts/abstract.service");
|
|
26
|
+
const websocket_service_1 = require("../../../core/websocket/services/websocket.service");
|
|
27
|
+
const chunk_repository_1 = require("../../chunk/repositories/chunk.repository");
|
|
28
|
+
const chunk_service_1 = require("../../chunk/services/chunk.service");
|
|
29
|
+
const chunker_service_1 = require("../../chunker/services/chunker.service");
|
|
30
|
+
const how_to_1 = require("../entities/how-to");
|
|
31
|
+
const how_to_meta_1 = require("../entities/how-to.meta");
|
|
32
|
+
const how_to_repository_1 = require("../repositories/how-to.repository");
|
|
33
|
+
let HowToService = class HowToService extends abstract_service_1.AbstractService {
|
|
34
|
+
constructor(jsonApiService, howToRepository, clsService, chunkService, chunkerService, blockNoteService, webSocketService, chunkRepository, chunkQueue, configService) {
|
|
35
|
+
super(jsonApiService, howToRepository, clsService, how_to_1.HowToDescriptor.model);
|
|
36
|
+
this.howToRepository = howToRepository;
|
|
37
|
+
this.chunkService = chunkService;
|
|
38
|
+
this.chunkerService = chunkerService;
|
|
39
|
+
this.blockNoteService = blockNoteService;
|
|
40
|
+
this.webSocketService = webSocketService;
|
|
41
|
+
this.chunkRepository = chunkRepository;
|
|
42
|
+
this.chunkQueue = chunkQueue;
|
|
43
|
+
this.descriptor = how_to_1.HowToDescriptor;
|
|
44
|
+
this.jobNames = configService.get("jobNames", { infer: true }) ?? { process: {}, notifications: {} };
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Queue a HowTo for AI processing.
|
|
48
|
+
* Converts BlockNote JSON to Markdown, chunks it, and queues each chunk.
|
|
49
|
+
*/
|
|
50
|
+
async queueHowToForProcessing(params) {
|
|
51
|
+
await this.updateAiStatus({
|
|
52
|
+
id: params.howToId,
|
|
53
|
+
aiStatus: ai_status_1.AiStatus.InProgress,
|
|
54
|
+
});
|
|
55
|
+
await this.chunkService.deleteChunks({
|
|
56
|
+
id: params.howToId,
|
|
57
|
+
nodeType: how_to_meta_1.howToMeta.labelName,
|
|
58
|
+
});
|
|
59
|
+
const data = await this.chunkerService.generateContentStructureFromMarkdown({
|
|
60
|
+
content: this.blockNoteService.convertToMarkdown({ nodes: JSON.parse(params.description) }),
|
|
61
|
+
});
|
|
62
|
+
const chunks = await this.chunkService.createChunks({
|
|
63
|
+
id: params.howToId,
|
|
64
|
+
nodeType: how_to_meta_1.howToMeta.labelName,
|
|
65
|
+
data: data,
|
|
66
|
+
});
|
|
67
|
+
await this.updateAiStatus({
|
|
68
|
+
id: params.howToId,
|
|
69
|
+
aiStatus: ai_status_1.AiStatus.InProgress,
|
|
70
|
+
});
|
|
71
|
+
const chunkJobName = this.jobNames.process?.chunk ?? "process_chunk";
|
|
72
|
+
for (const chunk of chunks) {
|
|
73
|
+
await this.chunkQueue.add(chunkJobName, {
|
|
74
|
+
companyId: this.clsService.get("companyId") || undefined,
|
|
75
|
+
userId: this.clsService.get("userId"),
|
|
76
|
+
chunkId: chunk.id,
|
|
77
|
+
contentId: params.howToId,
|
|
78
|
+
contentType: how_to_meta_1.howToMeta.labelName,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Update AI status and broadcast progress via WebSocket.
|
|
84
|
+
*/
|
|
85
|
+
async updateAiStatus(params) {
|
|
86
|
+
await this.howToRepository.updateStatus({
|
|
87
|
+
id: params.id,
|
|
88
|
+
aiStatus: params.aiStatus,
|
|
89
|
+
});
|
|
90
|
+
if (params.aiStatus === ai_status_1.AiStatus.InProgress) {
|
|
91
|
+
const chunks = await this.chunkRepository.findChunkByContentIdAndType({
|
|
92
|
+
id: params.id,
|
|
93
|
+
type: how_to_meta_1.howToMeta.labelName,
|
|
94
|
+
});
|
|
95
|
+
await this.webSocketService.sendMessageToUser(this.clsService.get("userId"), "graph_creation", {
|
|
96
|
+
id: params.id,
|
|
97
|
+
aiStatus: params.aiStatus,
|
|
98
|
+
completed: chunks.filter((chunk) => chunk.aiStatus === ai_status_1.AiStatus.Completed).length,
|
|
99
|
+
total: chunks.length,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
await this.webSocketService.sendMessageToUser(this.clsService.get("userId"), "graph_creation", {
|
|
104
|
+
id: params.id,
|
|
105
|
+
aiStatus: params.aiStatus,
|
|
106
|
+
completed: 0,
|
|
107
|
+
total: 0,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
exports.HowToService = HowToService;
|
|
113
|
+
exports.HowToService = HowToService = __decorate([
|
|
114
|
+
(0, common_1.Injectable)(),
|
|
115
|
+
__param(8, (0, bullmq_1.InjectQueue)(queue_id_1.QueueId.CHUNK)),
|
|
116
|
+
__metadata("design:paramtypes", [jsonapi_service_1.JsonApiService,
|
|
117
|
+
how_to_repository_1.HowToRepository,
|
|
118
|
+
nestjs_cls_1.ClsService,
|
|
119
|
+
chunk_service_1.ChunkService,
|
|
120
|
+
chunker_service_1.ChunkerService,
|
|
121
|
+
blocknote_service_1.BlockNoteService,
|
|
122
|
+
websocket_service_1.WebSocketService,
|
|
123
|
+
chunk_repository_1.ChunkRepository,
|
|
124
|
+
bullmq_2.Queue,
|
|
125
|
+
config_1.ConfigService])
|
|
126
|
+
], HowToService);
|
|
127
|
+
//# sourceMappingURL=how-to.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"how-to.service.js","sourceRoot":"","sources":["../../../../src/foundations/how-to/services/how-to.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA6C;AAC7C,2CAA4C;AAC5C,2CAA+C;AAC/C,mCAA+B;AAC/B,2CAAwC;AACxC,+DAA2D;AAG3D,6DAAyD;AACzD,0FAAsF;AACtF,oFAAgF;AAChF,qFAAiF;AACjF,0FAAsF;AAEtF,gFAA4E;AAC5E,sEAAkE;AAClE,4EAAwE;AACxE,+CAA4D;AAC5D,yDAAoD;AACpD,yEAAoE;AAG7D,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,kCAA4D;IAI5F,YACE,cAA8B,EACb,eAAgC,EACjD,UAAsB,EACL,YAA0B,EAC1B,cAA8B,EAC9B,gBAAkC,EAClC,gBAAkC,EAClC,eAAgC,EACrB,UAAkC,EAC9D,aAAiD;QAEjD,KAAK,CAAC,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,wBAAe,CAAC,KAAK,CAAC,CAAC;QAVzD,oBAAe,GAAf,eAAe,CAAiB;QAEhC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,mBAAc,GAAd,cAAc,CAAgB;QAC9B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,oBAAe,GAAf,eAAe,CAAiB;QACJ,eAAU,GAAV,UAAU,CAAO;QAZ7C,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CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uBAAuB,CAAC;AAGtC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
@@ -30,6 +30,7 @@ __exportStar(require("./content"), exports);
|
|
|
30
30
|
__exportStar(require("./discord"), exports);
|
|
31
31
|
__exportStar(require("./discord-user"), exports);
|
|
32
32
|
__exportStar(require("./feature"), exports);
|
|
33
|
+
__exportStar(require("./how-to"), exports);
|
|
33
34
|
__exportStar(require("./keyconcept"), exports);
|
|
34
35
|
__exportStar(require("./module"), exports);
|
|
35
36
|
__exportStar(require("./notification"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,sFAAsF;AACtF,wDAAsC;AAEtC,iFAAiF;AACjF,+CAA6B;AAC7B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,uCAAqB;AACrB,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,sFAAsF;AACtF,wDAAsC;AAEtC,iFAAiF;AACjF,+CAA6B;AAC7B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,uCAAqB;AACrB,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB"}
|
package/package.json
CHANGED