@platform-modules/foreign-ministry 1.0.54 → 1.0.55

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.
@@ -41,6 +41,7 @@ const PostReactionsModel_1 = require("./models/PostReactionsModel");
41
41
  const HelpContentModel_1 = require("./models/HelpContentModel");
42
42
  const HelpContentCategoryModel_1 = require("./models/HelpContentCategoryModel");
43
43
  const HelpContentAttachmentModel_1 = require("./models/HelpContentAttachmentModel");
44
+ const contactInfoModel_1 = require("./models/contactInfoModel");
44
45
  exports.AppDataSource = new typeorm_1.DataSource({
45
46
  type: 'postgres',
46
47
  host: process.env.DB_HOST || 'localhost',
@@ -86,6 +87,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
86
87
  PostReactionsModel_1.PostReactions,
87
88
  HelpContentModel_1.HelpContent,
88
89
  HelpContentCategoryModel_1.HelpContentCategories,
89
- HelpContentAttachmentModel_1.HelpContentAttachments
90
+ HelpContentAttachmentModel_1.HelpContentAttachments,
91
+ contactInfoModel_1.ContactInfo
90
92
  ],
91
93
  });
package/dist/index.d.ts CHANGED
@@ -34,3 +34,4 @@ export * from './models/PostReactionsModel';
34
34
  export * from './models/HelpContentModel';
35
35
  export * from './models/HelpContentCategoryModel';
36
36
  export * from './models/HelpContentAttachmentModel';
37
+ export * from './models/contactInfoModel';
package/dist/index.js CHANGED
@@ -50,3 +50,4 @@ __exportStar(require("./models/PostReactionsModel"), exports);
50
50
  __exportStar(require("./models/HelpContentModel"), exports);
51
51
  __exportStar(require("./models/HelpContentCategoryModel"), exports);
52
52
  __exportStar(require("./models/HelpContentAttachmentModel"), exports);
53
+ __exportStar(require("./models/contactInfoModel"), exports);
@@ -0,0 +1,17 @@
1
+ export declare class ContactInfo {
2
+ category: "FM" | "Embassy";
3
+ name: string;
4
+ business_email: string;
5
+ business_phone: string;
6
+ extension_number: string;
7
+ fax_number: string;
8
+ location: string;
9
+ website: string;
10
+ blog: string;
11
+ street: string;
12
+ city: string;
13
+ state: string;
14
+ zip_code: string;
15
+ country: string;
16
+ photo_url: string;
17
+ }
@@ -0,0 +1,79 @@
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.ContactInfo = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ let ContactInfo = class ContactInfo {
15
+ };
16
+ exports.ContactInfo = ContactInfo;
17
+ __decorate([
18
+ (0, typeorm_1.Column)({ type: "enum", enum: ["FM", "Embassy"], nullable: false }),
19
+ __metadata("design:type", String)
20
+ ], ContactInfo.prototype, "category", void 0);
21
+ __decorate([
22
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
23
+ __metadata("design:type", String)
24
+ ], ContactInfo.prototype, "name", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
27
+ __metadata("design:type", String)
28
+ ], ContactInfo.prototype, "business_email", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: false }),
31
+ __metadata("design:type", String)
32
+ ], ContactInfo.prototype, "business_phone", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: "varchar", length: 10, nullable: true }),
35
+ __metadata("design:type", String)
36
+ ], ContactInfo.prototype, "extension_number", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
39
+ __metadata("design:type", String)
40
+ ], ContactInfo.prototype, "fax_number", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
43
+ __metadata("design:type", String)
44
+ ], ContactInfo.prototype, "location", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
47
+ __metadata("design:type", String)
48
+ ], ContactInfo.prototype, "website", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], ContactInfo.prototype, "blog", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
55
+ __metadata("design:type", String)
56
+ ], ContactInfo.prototype, "street", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
59
+ __metadata("design:type", String)
60
+ ], ContactInfo.prototype, "city", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], ContactInfo.prototype, "state", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
67
+ __metadata("design:type", String)
68
+ ], ContactInfo.prototype, "zip_code", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
71
+ __metadata("design:type", String)
72
+ ], ContactInfo.prototype, "country", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
75
+ __metadata("design:type", String)
76
+ ], ContactInfo.prototype, "photo_url", void 0);
77
+ exports.ContactInfo = ContactInfo = __decorate([
78
+ (0, typeorm_1.Entity)({ name: "contact_info" })
79
+ ], ContactInfo);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -42,6 +42,7 @@ import { PostReactions } from './models/PostReactionsModel';
42
42
  import { HelpContent } from './models/HelpContentModel';
43
43
  import { HelpContentCategories } from './models/HelpContentCategoryModel';
44
44
  import { HelpContentAttachments } from './models/HelpContentAttachmentModel';
45
+ import { ContactInfo } from './models/contactInfoModel';
45
46
 
46
47
 
47
48
  export const AppDataSource = new DataSource({
@@ -89,6 +90,7 @@ export const AppDataSource = new DataSource({
89
90
  PostReactions,
90
91
  HelpContent,
91
92
  HelpContentCategories,
92
- HelpContentAttachments
93
+ HelpContentAttachments,
94
+ ContactInfo
93
95
  ],
94
96
  });
package/src/index.ts CHANGED
@@ -34,3 +34,4 @@ export * from './models/PostReactionsModel';
34
34
  export * from './models/HelpContentModel';
35
35
  export * from './models/HelpContentCategoryModel';
36
36
  export * from './models/HelpContentAttachmentModel';
37
+ export * from './models/contactInfoModel';
@@ -0,0 +1,54 @@
1
+ import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
2
+
3
+ @Entity({ name: "contact_info" })
4
+ export class ContactInfo {
5
+
6
+ // General Information
7
+ @Column({ type: "enum", enum: ["FM", "Embassy"], nullable: false })
8
+ category: "FM" | "Embassy"; // Mandatory
9
+
10
+ @Column({ type: "varchar", length: 255, nullable: false })
11
+ name: string;
12
+
13
+ // Email & Contact Information
14
+ @Column({ type: "varchar", length: 255, nullable: false })
15
+ business_email: string; // Mandatory
16
+
17
+ @Column({ type: "varchar", length: 20, nullable: false })
18
+ business_phone: string; // Mandatory
19
+
20
+ @Column({ type: "varchar", length: 10, nullable: true })
21
+ extension_number: string; // Conditional
22
+
23
+ @Column({ type: "varchar", length: 20, nullable: true })
24
+ fax_number: string; // Optional
25
+
26
+ @Column({ type: "varchar", length: 255, nullable: true })
27
+ location: string; // Optional
28
+
29
+ @Column({ type: "varchar", length: 255, nullable: true })
30
+ website: string; // Optional
31
+
32
+ @Column({ type: "varchar", length: 255, nullable: true })
33
+ blog: string; // Optional
34
+
35
+ // Business Postal Address Information
36
+ @Column({ type: "varchar", length: 255, nullable: true })
37
+ street: string;
38
+
39
+ @Column({ type: "varchar", length: 100, nullable: true })
40
+ city: string;
41
+
42
+ @Column({ type: "varchar", length: 100, nullable: true })
43
+ state: string;
44
+
45
+ @Column({ type: "varchar", length: 20, nullable: true })
46
+ zip_code: string;
47
+
48
+ @Column({ type: "varchar", length: 100, nullable: true })
49
+ country: string;
50
+
51
+ // Photo
52
+ @Column({ type: "varchar", length: 500, nullable: true })
53
+ photo_url: string;
54
+ }