@platform-modules/civil-aviation-authority 2.3.314 → 2.3.315

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.
@@ -257,6 +257,7 @@ const SlaApprovalsViewModel_1 = require("./models/SlaApprovalsViewModel");
257
257
  const ServiceSlaApprovalModel_1 = require("./models/ServiceSlaApprovalModel");
258
258
  const SlaConfigModel_1 = require("./models/SlaConfigModel");
259
259
  const ChatbotQnsAnsMappingModel_1 = require("./models/ChatbotQnsAnsMappingModel");
260
+ const ChatbotDocumentsModel_1 = require("./models/ChatbotDocumentsModel");
260
261
  const IconsModel_1 = require("./models/IconsModel");
261
262
  const CSRMBusinessImpactRatingMasterModel_1 = require("./models/CSRMBusinessImpactRatingMasterModel");
262
263
  const CSRMLikelihoodMasterModel_1 = require("./models/CSRMLikelihoodMasterModel");
@@ -582,6 +583,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
582
583
  ServiceSlaApprovalModel_1.ServiceSlaApproval,
583
584
  SlaConfigModel_1.SlaConfig,
584
585
  ChatbotQnsAnsMappingModel_1.ChatbotQnsAnsMapping,
586
+ ChatbotDocumentsModel_1.ChatbotDocuments,
585
587
  IconsModel_1.Icons,
586
588
  CSRMBusinessImpactRatingMasterModel_1.CSRMBusinessImpactRatingMaster,
587
589
  CSRMLikelihoodMasterModel_1.CSRMLikelihoodMaster,
package/dist/index.d.ts CHANGED
@@ -415,6 +415,7 @@ export * from './models/ContractServiceRequestModel';
415
415
  export * from './models/ContractServiceRequestDocumentModel';
416
416
  export * from './models/SlaConfigModel';
417
417
  export * from './models/ChatbotQnsAnsMappingModel';
418
+ export * from './models/ChatbotDocumentsModel';
418
419
  export * from './models/IconsModel';
419
420
  export * from './models/SlaRequestModel';
420
421
  export * from './models/SlaMyRequestsViewModel';
package/dist/index.js CHANGED
@@ -604,6 +604,7 @@ __exportStar(require("./models/ContractServiceRequestModel"), exports);
604
604
  __exportStar(require("./models/ContractServiceRequestDocumentModel"), exports);
605
605
  __exportStar(require("./models/SlaConfigModel"), exports);
606
606
  __exportStar(require("./models/ChatbotQnsAnsMappingModel"), exports);
607
+ __exportStar(require("./models/ChatbotDocumentsModel"), exports);
607
608
  __exportStar(require("./models/IconsModel"), exports);
608
609
  __exportStar(require("./models/SlaRequestModel"), exports);
609
610
  __exportStar(require("./models/SlaMyRequestsViewModel"), exports);
@@ -0,0 +1,10 @@
1
+ import { BaseModel } from "./BaseModel";
2
+ export declare class ChatbotDocuments extends BaseModel {
3
+ service_id: number;
4
+ sub_service_id: number;
5
+ file_url: string;
6
+ file_name: string;
7
+ file_type: string;
8
+ file_size: number;
9
+ constructor();
10
+ }
@@ -0,0 +1,48 @@
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.ChatbotDocuments = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let ChatbotDocuments = class ChatbotDocuments extends BaseModel_1.BaseModel {
16
+ constructor() {
17
+ super();
18
+ }
19
+ };
20
+ exports.ChatbotDocuments = ChatbotDocuments;
21
+ __decorate([
22
+ (0, typeorm_1.Column)({ type: "int", nullable: false }),
23
+ __metadata("design:type", Number)
24
+ ], ChatbotDocuments.prototype, "service_id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: "int", nullable: false }),
27
+ __metadata("design:type", Number)
28
+ ], ChatbotDocuments.prototype, "sub_service_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: "varchar", nullable: false }),
31
+ __metadata("design:type", String)
32
+ ], ChatbotDocuments.prototype, "file_url", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: "varchar", nullable: false }),
35
+ __metadata("design:type", String)
36
+ ], ChatbotDocuments.prototype, "file_name", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: "varchar", nullable: false }),
39
+ __metadata("design:type", String)
40
+ ], ChatbotDocuments.prototype, "file_type", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: "int", nullable: false }),
43
+ __metadata("design:type", Number)
44
+ ], ChatbotDocuments.prototype, "file_size", void 0);
45
+ exports.ChatbotDocuments = ChatbotDocuments = __decorate([
46
+ (0, typeorm_1.Entity)({ name: "chatbot_documents" }),
47
+ __metadata("design:paramtypes", [])
48
+ ], ChatbotDocuments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/civil-aviation-authority",
3
- "version": "2.3.314",
3
+ "version": "2.3.315",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -0,0 +1,25 @@
1
+ -- Chatbot Documents master table (CAA User Service)
2
+ -- PostgreSQL
3
+
4
+ CREATE TABLE IF NOT EXISTS chatbot_documents (
5
+ id SERIAL PRIMARY KEY,
6
+ service_id INTEGER NOT NULL,
7
+ sub_service_id INTEGER NOT NULL,
8
+ file_url VARCHAR NOT NULL,
9
+ file_name VARCHAR NOT NULL,
10
+ file_type VARCHAR NOT NULL,
11
+ file_size INTEGER NOT NULL,
12
+ created_by INTEGER NULL,
13
+ created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
14
+ updated_by INTEGER NULL,
15
+ updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
16
+ is_deleted BOOLEAN DEFAULT FALSE
17
+ );
18
+
19
+ CREATE INDEX IF NOT EXISTS idx_chatbot_documents_service_sub_service
20
+ ON chatbot_documents (service_id, sub_service_id)
21
+ WHERE is_deleted = FALSE;
22
+
23
+ CREATE UNIQUE INDEX IF NOT EXISTS uq_chatbot_documents_svc_sub
24
+ ON chatbot_documents (service_id, sub_service_id)
25
+ WHERE is_deleted = FALSE;
@@ -255,6 +255,7 @@ import { SlaApprovalsView } from './models/SlaApprovalsViewModel';
255
255
  import { ServiceSlaApproval } from './models/ServiceSlaApprovalModel';
256
256
  import { SlaConfig } from './models/SlaConfigModel';
257
257
  import { ChatbotQnsAnsMapping } from './models/ChatbotQnsAnsMappingModel';
258
+ import { ChatbotDocuments } from './models/ChatbotDocumentsModel';
258
259
  import { Icons } from './models/IconsModel';
259
260
  import { CSRMBusinessImpactRatingMaster } from './models/CSRMBusinessImpactRatingMasterModel';
260
261
  import { CSRMLikelihoodMaster } from './models/CSRMLikelihoodMasterModel';
@@ -582,6 +583,7 @@ export const AppDataSource = new DataSource({
582
583
  ServiceSlaApproval,
583
584
  SlaConfig,
584
585
  ChatbotQnsAnsMapping,
586
+ ChatbotDocuments,
585
587
  Icons,
586
588
  CSRMBusinessImpactRatingMaster,
587
589
  CSRMLikelihoodMaster,
package/src/index.ts CHANGED
@@ -505,6 +505,7 @@ export * from './models/ContractServiceRequestModel';
505
505
  export * from './models/ContractServiceRequestDocumentModel';
506
506
  export * from './models/SlaConfigModel';
507
507
  export * from './models/ChatbotQnsAnsMappingModel';
508
+ export * from './models/ChatbotDocumentsModel';
508
509
  export * from './models/IconsModel';
509
510
  export * from './models/SlaRequestModel';
510
511
  export * from './models/SlaMyRequestsViewModel';
@@ -0,0 +1,27 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ @Entity({ name: "chatbot_documents" })
5
+ export class ChatbotDocuments extends BaseModel {
6
+ @Column({ type: "int", nullable: false })
7
+ service_id: number;
8
+
9
+ @Column({ type: "int", nullable: false })
10
+ sub_service_id: number;
11
+
12
+ @Column({ type: "varchar", nullable: false })
13
+ file_url: string;
14
+
15
+ @Column({ type: "varchar", nullable: false })
16
+ file_name: string;
17
+
18
+ @Column({ type: "varchar", nullable: false })
19
+ file_type: string;
20
+
21
+ @Column({ type: "int", nullable: false })
22
+ file_size: number;
23
+
24
+ constructor() {
25
+ super();
26
+ }
27
+ }