@platform-modules/civil-aviation-authority 2.3.315 → 2.3.317
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/models/ChatbotDocumentsModel.d.ts +4 -0
- package/dist/models/ChatbotDocumentsModel.js +20 -0
- package/package.json +1 -1
- package/sql/add_chatbot_documents_arabic_columns.sql +6 -0
- package/sql/add_event_support_reminder_type.sql +22 -0
- package/sql/add_follow_up_report_closed_status.sql +42 -0
- package/sql/alter_event_support_reminder_type_nullable.sql +9 -0
- package/sql/create_chatbot_documents.sql +4 -0
- package/src/index.ts +1 -1
- package/src/models/ChatbotDocumentsModel.ts +16 -0
- package/src/models/EventSupportRequestModel.ts +19 -0
- package/src/models/FollowUpReportApprovalModel.ts +1 -0
- package/src/models/FollowUpReportRequestModel.ts +1 -0
|
@@ -6,5 +6,9 @@ export declare class ChatbotDocuments extends BaseModel {
|
|
|
6
6
|
file_name: string;
|
|
7
7
|
file_type: string;
|
|
8
8
|
file_size: number;
|
|
9
|
+
file_url_arabic?: string | null;
|
|
10
|
+
file_name_arabic?: string | null;
|
|
11
|
+
file_type_arabic?: string | null;
|
|
12
|
+
file_size_arabic?: number | null;
|
|
9
13
|
constructor();
|
|
10
14
|
}
|
|
@@ -15,6 +15,10 @@ const BaseModel_1 = require("./BaseModel");
|
|
|
15
15
|
let ChatbotDocuments = class ChatbotDocuments extends BaseModel_1.BaseModel {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
|
+
this.file_url_arabic = null;
|
|
19
|
+
this.file_name_arabic = null;
|
|
20
|
+
this.file_type_arabic = null;
|
|
21
|
+
this.file_size_arabic = null;
|
|
18
22
|
}
|
|
19
23
|
};
|
|
20
24
|
exports.ChatbotDocuments = ChatbotDocuments;
|
|
@@ -42,6 +46,22 @@ __decorate([
|
|
|
42
46
|
(0, typeorm_1.Column)({ type: "int", nullable: false }),
|
|
43
47
|
__metadata("design:type", Number)
|
|
44
48
|
], ChatbotDocuments.prototype, "file_size", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], ChatbotDocuments.prototype, "file_url_arabic", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], ChatbotDocuments.prototype, "file_name_arabic", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: "varchar", nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], ChatbotDocuments.prototype, "file_type_arabic", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: "int", nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], ChatbotDocuments.prototype, "file_size_arabic", void 0);
|
|
45
65
|
exports.ChatbotDocuments = ChatbotDocuments = __decorate([
|
|
46
66
|
(0, typeorm_1.Entity)({ name: "chatbot_documents" }),
|
|
47
67
|
__metadata("design:paramtypes", [])
|
package/package.json
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- Add Arabic file columns to chatbot_documents (CAA)
|
|
2
|
+
ALTER TABLE chatbot_documents
|
|
3
|
+
ADD COLUMN IF NOT EXISTS file_url_arabic VARCHAR NULL,
|
|
4
|
+
ADD COLUMN IF NOT EXISTS file_name_arabic VARCHAR NULL,
|
|
5
|
+
ADD COLUMN IF NOT EXISTS file_type_arabic VARCHAR NULL,
|
|
6
|
+
ADD COLUMN IF NOT EXISTS file_size_arabic INTEGER NULL;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
-- Event support request reminder preference (scheduler uses approved requests only)
|
|
2
|
+
DO $$
|
|
3
|
+
BEGIN
|
|
4
|
+
CREATE TYPE event_support_reminder_type_enum AS ENUM (
|
|
5
|
+
'1 week before',
|
|
6
|
+
'6 days before',
|
|
7
|
+
'5 days before',
|
|
8
|
+
'4 days before',
|
|
9
|
+
'3 days before',
|
|
10
|
+
'2 days before',
|
|
11
|
+
'1 day before',
|
|
12
|
+
'At time of event'
|
|
13
|
+
);
|
|
14
|
+
EXCEPTION
|
|
15
|
+
WHEN duplicate_object THEN NULL;
|
|
16
|
+
END $$;
|
|
17
|
+
|
|
18
|
+
ALTER TABLE event_support_requests
|
|
19
|
+
ADD COLUMN IF NOT EXISTS reminder_type event_support_reminder_type_enum NULL DEFAULT NULL;
|
|
20
|
+
|
|
21
|
+
COMMENT ON COLUMN event_support_requests.reminder_type IS
|
|
22
|
+
'When to start sending event reminder notifications (daily until event day, or event day only).';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
-- Add Closed status for Follow Up Report requester approval step (CAA)
|
|
2
|
+
-- Run on PostgreSQL before deploying updated shared_models + services.
|
|
3
|
+
|
|
4
|
+
DO $$
|
|
5
|
+
BEGIN
|
|
6
|
+
IF EXISTS (
|
|
7
|
+
SELECT 1
|
|
8
|
+
FROM pg_type t
|
|
9
|
+
JOIN pg_enum e ON t.oid = e.enumtypid
|
|
10
|
+
WHERE t.typname = 'followup_report_approvals_approval_status_enum'
|
|
11
|
+
) THEN
|
|
12
|
+
IF NOT EXISTS (
|
|
13
|
+
SELECT 1
|
|
14
|
+
FROM pg_type t
|
|
15
|
+
JOIN pg_enum e ON t.oid = e.enumtypid
|
|
16
|
+
WHERE t.typname = 'followup_report_approvals_approval_status_enum'
|
|
17
|
+
AND e.enumlabel = 'Closed'
|
|
18
|
+
) THEN
|
|
19
|
+
ALTER TYPE followup_report_approvals_approval_status_enum ADD VALUE 'Closed';
|
|
20
|
+
END IF;
|
|
21
|
+
END IF;
|
|
22
|
+
END $$;
|
|
23
|
+
|
|
24
|
+
DO $$
|
|
25
|
+
BEGIN
|
|
26
|
+
IF EXISTS (
|
|
27
|
+
SELECT 1
|
|
28
|
+
FROM pg_type t
|
|
29
|
+
JOIN pg_enum e ON t.oid = e.enumtypid
|
|
30
|
+
WHERE t.typname = 'followup_report_requests_status_enum'
|
|
31
|
+
) THEN
|
|
32
|
+
IF NOT EXISTS (
|
|
33
|
+
SELECT 1
|
|
34
|
+
FROM pg_type t
|
|
35
|
+
JOIN pg_enum e ON t.oid = e.enumtypid
|
|
36
|
+
WHERE t.typname = 'followup_report_requests_status_enum'
|
|
37
|
+
AND e.enumlabel = 'Closed'
|
|
38
|
+
) THEN
|
|
39
|
+
ALTER TYPE followup_report_requests_status_enum ADD VALUE 'Closed';
|
|
40
|
+
END IF;
|
|
41
|
+
END IF;
|
|
42
|
+
END $$;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- If reminder_type was added with NOT NULL + default, align with nullable column (no DB default).
|
|
2
|
+
ALTER TABLE event_support_requests
|
|
3
|
+
ALTER COLUMN reminder_type DROP DEFAULT;
|
|
4
|
+
|
|
5
|
+
ALTER TABLE event_support_requests
|
|
6
|
+
ALTER COLUMN reminder_type DROP NOT NULL;
|
|
7
|
+
|
|
8
|
+
ALTER TABLE event_support_requests
|
|
9
|
+
ALTER COLUMN reminder_type SET DEFAULT NULL;
|
|
@@ -9,6 +9,10 @@ CREATE TABLE IF NOT EXISTS chatbot_documents (
|
|
|
9
9
|
file_name VARCHAR NOT NULL,
|
|
10
10
|
file_type VARCHAR NOT NULL,
|
|
11
11
|
file_size INTEGER NOT NULL,
|
|
12
|
+
file_url_arabic VARCHAR NULL,
|
|
13
|
+
file_name_arabic VARCHAR NULL,
|
|
14
|
+
file_type_arabic VARCHAR NULL,
|
|
15
|
+
file_size_arabic INTEGER NULL,
|
|
12
16
|
created_by INTEGER NULL,
|
|
13
17
|
created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
|
|
14
18
|
updated_by INTEGER NULL,
|
package/src/index.ts
CHANGED
|
@@ -149,7 +149,7 @@ export * from './models/FoodChatModel';
|
|
|
149
149
|
export * from './models/FoodAttachmentModel';
|
|
150
150
|
export * from './models/FoodHistoryModel';
|
|
151
151
|
export { CancellationRequestStatus } from './models/CancellationRequestModel';
|
|
152
|
-
export { EventSupportRequestStatus } from './models/EventSupportRequestModel';
|
|
152
|
+
export { EventSupportRequestStatus, EventSupportReminderType } from './models/EventSupportRequestModel';
|
|
153
153
|
export { EventSupportApprovalStatus } from './models/EventSupportApprovalModel';
|
|
154
154
|
export { EventSupportWorkFlowStatus } from './models/EventSupportWorkflowModel';
|
|
155
155
|
export { EventSupportRequestAttachment } from './models/EventSupportAttachmentModel';
|
|
@@ -21,7 +21,23 @@ export class ChatbotDocuments extends BaseModel {
|
|
|
21
21
|
@Column({ type: "int", nullable: false })
|
|
22
22
|
file_size: number;
|
|
23
23
|
|
|
24
|
+
@Column({ type: "varchar", nullable: true })
|
|
25
|
+
file_url_arabic?: string | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: "varchar", nullable: true })
|
|
28
|
+
file_name_arabic?: string | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: "varchar", nullable: true })
|
|
31
|
+
file_type_arabic?: string | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: "int", nullable: true })
|
|
34
|
+
file_size_arabic?: number | null;
|
|
35
|
+
|
|
24
36
|
constructor() {
|
|
25
37
|
super();
|
|
38
|
+
this.file_url_arabic = null;
|
|
39
|
+
this.file_name_arabic = null;
|
|
40
|
+
this.file_type_arabic = null;
|
|
41
|
+
this.file_size_arabic = null;
|
|
26
42
|
}
|
|
27
43
|
}
|
|
@@ -10,6 +10,17 @@ export enum EventSupportRequestStatus {
|
|
|
10
10
|
CANCELLED = "Cancelled",
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
export enum EventSupportReminderType {
|
|
14
|
+
ONE_WEEK_BEFORE = "1 week before",
|
|
15
|
+
SIX_DAYS_BEFORE = "6 days before",
|
|
16
|
+
FIVE_DAYS_BEFORE = "5 days before",
|
|
17
|
+
FOUR_DAYS_BEFORE = "4 days before",
|
|
18
|
+
THREE_DAYS_BEFORE = "3 days before",
|
|
19
|
+
TWO_DAYS_BEFORE = "2 days before",
|
|
20
|
+
ONE_DAY_BEFORE = "1 day before",
|
|
21
|
+
AT_TIME_OF_EVENT = "At time of event",
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
@Entity({ name: "event_support_requests" })
|
|
14
25
|
export class EventSupportRequests extends BaseModel {
|
|
15
26
|
@Column({ type: "integer", nullable: true })
|
|
@@ -57,4 +68,12 @@ export class EventSupportRequests extends BaseModel {
|
|
|
57
68
|
|
|
58
69
|
@Column({ type: "text", nullable: false })
|
|
59
70
|
reason_for_request: string;
|
|
71
|
+
|
|
72
|
+
@Column({
|
|
73
|
+
type: "enum",
|
|
74
|
+
enum: EventSupportReminderType,
|
|
75
|
+
nullable: true,
|
|
76
|
+
default: null,
|
|
77
|
+
})
|
|
78
|
+
reminder_type: EventSupportReminderType | null;
|
|
60
79
|
}
|