@tudopz/model 2.22.4 → 2.23.2

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/README.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Changelogs
4
4
 
5
+ ### v2.23.1
6
+
7
+ - Add `PHONE` to `LEAD_FORM_FIELD_VALIDATION`
8
+
9
+ ### v2.23.0
10
+
11
+ - Add `LeadAssignment` and `PupLead`
12
+
5
13
  ### v2.22.4
6
14
 
7
15
  - Update `LEAD_FORM_FIELD_VALIDATION`
@@ -7,4 +7,10 @@ exports.LEAD_FORM_FIELD_TYPE_VALUES = [
7
7
  'Checkboxes',
8
8
  'Dropdown list',
9
9
  ];
10
- exports.LEAD_FORM_FIELD_VALIDATION_VALUES = ['Alphanumerical', 'Numerical', 'Email', 'None'];
10
+ exports.LEAD_FORM_FIELD_VALIDATION_VALUES = [
11
+ 'Alphanumerical',
12
+ 'Numerical',
13
+ 'Phone number',
14
+ 'Email',
15
+ 'None',
16
+ ];
package/lib/index.d.ts CHANGED
@@ -18,11 +18,14 @@ import { HighSchoolRecord } from './model/high-school-record';
18
18
  import { JourneyStage } from './model/journey-stage';
19
19
  import { JourneyToStudent } from './model/journey-to-student';
20
20
  import { Journey } from './model/journey';
21
+ import { LeadAssignment } from './model/lead-assignment';
21
22
  import { LeadFormField, LEAD_FORM_FIELD_TYPE, LEAD_FORM_FIELD_VALIDATION } from './model/lead-form-field';
22
23
  import { LeadForm, LEAD_FORM_ASSIGNMENT } from './model/lead-form';
24
+ import { LeadQueue } from './model/lead-queue';
23
25
  import { Lead } from './model/lead';
24
26
  import { PartTimeAssignment } from './model/part-time-assignment';
25
27
  import { Profile, GENDER, NATIONALITY, COUNTRY } from './model/profile';
28
+ import { PupLead } from './model/pup-lead';
26
29
  import { SaleSplit } from './model/sale-split';
27
30
  import { Sale, SALE_PAYMENT_MODE, SALE_PAYMENT_TYPE, SALE_TYPE, SALE_SUB_TYPE } from './model/sale';
28
31
  import { School, SCHOOL_LEVEL } from './model/school';
@@ -65,4 +68,4 @@ import { UNI_PREF_SIZES, UNI_PREF_SETTINGS, UNI_PREF_LOCATIONS } from './constan
65
68
  import { USER_STATUS_VALUES } from './constant/user';
66
69
  export { CONVERSION_TABLE_TYPE, DIMENSION_TYPE, DIMENSION_CATEGORY, LOG_TYPE, LOG_ACTION, GENDER, NATIONALITY, COUNTRY, SALE_PAYMENT_TYPE, SALE_PAYMENT_MODE, SALE_TYPE, SALE_SUB_TYPE, STUDENT_SERVICE, TEST_ATTEMPT_STATUS, TEST_QUESTION_TYPE, GUARDIAN_RELATIONSHIP, USER_ROLE, USER_STATUS, SCHOOL_LEVEL, EVENT_CATEGORY, EVENT_VISIBILITY, EVENT_STATUS, OFFICE, MEMBERSHIP_LOG_TYPE, STUDENT_NOTE_VISIBILITY, STAFF_HOUR_LOG_TYPE, EXTRACURRICULAR_ACTIVITY_CATEGORY, LEAD_FORM_FIELD_VALIDATION, LEAD_FORM_FIELD_TYPE, LEAD_FORM_ASSIGNMENT, };
67
70
  export { CONVERSION_TABLE_TYPE_VALUES, COUNTRY_VALUES, DIMENSION_TYPE_VALUES, DIMENSION_CATEGORY_VALUES, GUARDIAN_RELATIONSHIP_VALUES, NATIONALITY_VALUES, SALE_PAYMENT_TYPE_VALUES, SALE_PAYMENT_MODE_VALUES, SALE_TYPE_VALUES, SALE_SUB_TYPE_VALUES, STUDENT_SERVICE_VALUES, UNDERGRAD_TEST_SERVICES, UNDERGRAD_ADMISSIONS_SERVICES, POSTGRAD_TEST_SERVICES, POSTGRAD_ADMISSIONS_SERVICES, SCHOOL_CURRICULUM_SERVICES, ENGLISH_PROFICIENCY_SERVICES, ENRICHMENT_SERVICES, NO_TARGETS, TEST_PREP_TARGETS, ADMISSIONS_TARGETS, UNDERGRAD_ALL_SERVICES, POSTGRAD_ALL_SERVICES, EDUCATION_SYSTEM_VALUES, SCHOOL_VALUES, ROOMS, OFFICE_VALUES, EVENT_CATEGORY_VALUES, EVENT_VISIBILITY_VALUES, EVENT_STATUS_VALUES, USER_STATUS_VALUES, COURSES, COURSE_SUBJECTS, AREA_OF_STUDIES, UNI_PREF_SIZES, UNI_PREF_SETTINGS, UNI_PREF_LOCATIONS, EXTRACURRICULAR_ACTIVITY_CATEGORY_VALUES, LEAD_FORM_FIELD_VALIDATION_VALUES, LEAD_FORM_FIELD_TYPE_VALUES, LEAD_FORM_ASSIGNMENT_VALUES, };
68
- export { AccessToken, AnswerKey, ConversionTable, CourseTemplateEvent, CourseTemplate, Dimension, EducationSystem, EventLog, EventToUser, Event, ExtracurricularActivity, FileAccess, FileCategory, File, Guardian, HighSchoolRecord, JourneyStage, JourneyToStudent, Journey, LeadFormField, LeadForm, Lead, Log, PartTimeAssignment, Profile, SaleSplit, Sale, School, StaffHour, StaffHourLog, StudentAnswer, StudentExtra, StudentGoal, StudentNoteChecklistItem, StudentNote, StudentServiceMembershipLog, StudentServiceMembership, StudentService, StudentTarget, TestAttempt, TestCategory, TestQuestion, BaseReport, Report, SATReport, ACTReport, GMATReport, UCATReport, LSATReport, MCATReport, ISATReport, BMATReport, TestScore, TestSection, Test, UniversityPreference, UserPreference, UserToGuardian, User, ZoomInfo, };
71
+ export { AccessToken, AnswerKey, ConversionTable, CourseTemplateEvent, CourseTemplate, Dimension, EducationSystem, EventLog, EventToUser, Event, ExtracurricularActivity, FileAccess, FileCategory, File, Guardian, HighSchoolRecord, JourneyStage, JourneyToStudent, Journey, LeadAssignment, LeadFormField, LeadForm, LeadQueue, Lead, Log, PartTimeAssignment, Profile, PupLead, SaleSplit, Sale, School, StaffHour, StaffHourLog, StudentAnswer, StudentExtra, StudentGoal, StudentNoteChecklistItem, StudentNote, StudentServiceMembershipLog, StudentServiceMembership, StudentService, StudentTarget, TestAttempt, TestCategory, TestQuestion, BaseReport, Report, SATReport, ACTReport, GMATReport, UCATReport, LSATReport, MCATReport, ISATReport, BMATReport, TestScore, TestSection, Test, UniversityPreference, UserPreference, UserToGuardian, User, ZoomInfo, };
package/lib/index.js CHANGED
@@ -50,6 +50,8 @@ const journey_to_student_1 = require("./model/journey-to-student");
50
50
  exports.JourneyToStudent = journey_to_student_1.JourneyToStudent;
51
51
  const journey_1 = require("./model/journey");
52
52
  exports.Journey = journey_1.Journey;
53
+ const lead_assignment_1 = require("./model/lead-assignment");
54
+ exports.LeadAssignment = lead_assignment_1.LeadAssignment;
53
55
  const lead_form_field_1 = require("./model/lead-form-field");
54
56
  exports.LeadFormField = lead_form_field_1.LeadFormField;
55
57
  exports.LEAD_FORM_FIELD_TYPE = lead_form_field_1.LEAD_FORM_FIELD_TYPE;
@@ -57,6 +59,8 @@ exports.LEAD_FORM_FIELD_VALIDATION = lead_form_field_1.LEAD_FORM_FIELD_VALIDATIO
57
59
  const lead_form_1 = require("./model/lead-form");
58
60
  exports.LeadForm = lead_form_1.LeadForm;
59
61
  exports.LEAD_FORM_ASSIGNMENT = lead_form_1.LEAD_FORM_ASSIGNMENT;
62
+ const lead_queue_1 = require("./model/lead-queue");
63
+ exports.LeadQueue = lead_queue_1.LeadQueue;
60
64
  const lead_1 = require("./model/lead");
61
65
  exports.Lead = lead_1.Lead;
62
66
  const part_time_assignment_1 = require("./model/part-time-assignment");
@@ -66,6 +70,8 @@ exports.Profile = profile_1.Profile;
66
70
  exports.GENDER = profile_1.GENDER;
67
71
  exports.NATIONALITY = profile_1.NATIONALITY;
68
72
  exports.COUNTRY = profile_1.COUNTRY;
73
+ const pup_lead_1 = require("./model/pup-lead");
74
+ exports.PupLead = pup_lead_1.PupLead;
69
75
  const sale_split_1 = require("./model/sale-split");
70
76
  exports.SaleSplit = sale_split_1.SaleSplit;
71
77
  const sale_1 = require("./model/sale");
@@ -0,0 +1,7 @@
1
+ import { User } from './user';
2
+ export declare class LeadAssignment {
3
+ service: number;
4
+ userId: number;
5
+ createdAt: Date;
6
+ user: User;
7
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const typeorm_1 = require("typeorm");
5
+ const user_1 = require("./user");
6
+ let LeadAssignment = class LeadAssignment {
7
+ };
8
+ tslib_1.__decorate([
9
+ typeorm_1.PrimaryColumn(),
10
+ tslib_1.__metadata("design:type", Number)
11
+ ], LeadAssignment.prototype, "service", void 0);
12
+ tslib_1.__decorate([
13
+ typeorm_1.PrimaryColumn(),
14
+ tslib_1.__metadata("design:type", Number)
15
+ ], LeadAssignment.prototype, "userId", void 0);
16
+ tslib_1.__decorate([
17
+ typeorm_1.CreateDateColumn(),
18
+ tslib_1.__metadata("design:type", Date)
19
+ ], LeadAssignment.prototype, "createdAt", void 0);
20
+ tslib_1.__decorate([
21
+ typeorm_1.ManyToOne(_ => user_1.User),
22
+ tslib_1.__metadata("design:type", user_1.User)
23
+ ], LeadAssignment.prototype, "user", void 0);
24
+ LeadAssignment = tslib_1.__decorate([
25
+ typeorm_1.Entity({ name: 'lead_assignments' })
26
+ ], LeadAssignment);
27
+ exports.LeadAssignment = LeadAssignment;
@@ -8,8 +8,9 @@ export declare enum LEAD_FORM_FIELD_TYPE {
8
8
  export declare enum LEAD_FORM_FIELD_VALIDATION {
9
9
  ALPHANUMERICAL = 1,
10
10
  NUMERICAL = 2,
11
- EMAIL = 3,
12
- NONE = 4
11
+ PHONE = 3,
12
+ EMAIL = 4,
13
+ NONE = 5
13
14
  }
14
15
  export declare class LeadFormField {
15
16
  id: number;
@@ -14,8 +14,9 @@ var LEAD_FORM_FIELD_VALIDATION;
14
14
  (function (LEAD_FORM_FIELD_VALIDATION) {
15
15
  LEAD_FORM_FIELD_VALIDATION[LEAD_FORM_FIELD_VALIDATION["ALPHANUMERICAL"] = 1] = "ALPHANUMERICAL";
16
16
  LEAD_FORM_FIELD_VALIDATION[LEAD_FORM_FIELD_VALIDATION["NUMERICAL"] = 2] = "NUMERICAL";
17
- LEAD_FORM_FIELD_VALIDATION[LEAD_FORM_FIELD_VALIDATION["EMAIL"] = 3] = "EMAIL";
18
- LEAD_FORM_FIELD_VALIDATION[LEAD_FORM_FIELD_VALIDATION["NONE"] = 4] = "NONE";
17
+ LEAD_FORM_FIELD_VALIDATION[LEAD_FORM_FIELD_VALIDATION["PHONE"] = 3] = "PHONE";
18
+ LEAD_FORM_FIELD_VALIDATION[LEAD_FORM_FIELD_VALIDATION["EMAIL"] = 4] = "EMAIL";
19
+ LEAD_FORM_FIELD_VALIDATION[LEAD_FORM_FIELD_VALIDATION["NONE"] = 5] = "NONE";
19
20
  })(LEAD_FORM_FIELD_VALIDATION = exports.LEAD_FORM_FIELD_VALIDATION || (exports.LEAD_FORM_FIELD_VALIDATION = {}));
20
21
  let LeadFormField = class LeadFormField {
21
22
  };
@@ -0,0 +1,5 @@
1
+ export declare class LeadQueue {
2
+ service: number;
3
+ lastUserId?: number | null;
4
+ updatedAt: Date;
5
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const typeorm_1 = require("typeorm");
5
+ let LeadQueue = class LeadQueue {
6
+ };
7
+ tslib_1.__decorate([
8
+ typeorm_1.PrimaryColumn(),
9
+ tslib_1.__metadata("design:type", Number)
10
+ ], LeadQueue.prototype, "service", void 0);
11
+ tslib_1.__decorate([
12
+ typeorm_1.Column({ type: 'int', nullable: true }),
13
+ tslib_1.__metadata("design:type", Number)
14
+ ], LeadQueue.prototype, "lastUserId", void 0);
15
+ tslib_1.__decorate([
16
+ typeorm_1.UpdateDateColumn(),
17
+ tslib_1.__metadata("design:type", Date)
18
+ ], LeadQueue.prototype, "updatedAt", void 0);
19
+ LeadQueue = tslib_1.__decorate([
20
+ typeorm_1.Entity({ name: 'lead_queues' })
21
+ ], LeadQueue);
22
+ exports.LeadQueue = LeadQueue;
@@ -0,0 +1,18 @@
1
+ import { STUDENT_SERVICE } from './student-service';
2
+ import { User } from './user';
3
+ import { LeadForm } from './lead-form';
4
+ export declare class PupLead {
5
+ id: number;
6
+ createdAt: Date;
7
+ date: string;
8
+ time: string;
9
+ fullName: string;
10
+ email: string;
11
+ phoneNumber: string;
12
+ extras?: string;
13
+ service: STUDENT_SERVICE;
14
+ formId: number;
15
+ assigneeId: number;
16
+ form: LeadForm;
17
+ assignee?: User;
18
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const typeorm_1 = require("typeorm");
5
+ const student_service_1 = require("./student-service");
6
+ const user_1 = require("./user");
7
+ const lead_form_1 = require("./lead-form");
8
+ let PupLead = class PupLead {
9
+ };
10
+ tslib_1.__decorate([
11
+ typeorm_1.PrimaryGeneratedColumn(),
12
+ tslib_1.__metadata("design:type", Number)
13
+ ], PupLead.prototype, "id", void 0);
14
+ tslib_1.__decorate([
15
+ typeorm_1.CreateDateColumn(),
16
+ tslib_1.__metadata("design:type", Date)
17
+ ], PupLead.prototype, "createdAt", void 0);
18
+ tslib_1.__decorate([
19
+ typeorm_1.Column({ type: 'varchar', length: 100 }),
20
+ tslib_1.__metadata("design:type", String)
21
+ ], PupLead.prototype, "date", void 0);
22
+ tslib_1.__decorate([
23
+ typeorm_1.Column({ type: 'varchar', length: 100 }),
24
+ tslib_1.__metadata("design:type", String)
25
+ ], PupLead.prototype, "time", void 0);
26
+ tslib_1.__decorate([
27
+ typeorm_1.Column({ type: 'varchar', length: 200 }),
28
+ tslib_1.__metadata("design:type", String)
29
+ ], PupLead.prototype, "fullName", void 0);
30
+ tslib_1.__decorate([
31
+ typeorm_1.Column({ type: 'varchar', length: 200 }),
32
+ tslib_1.__metadata("design:type", String)
33
+ ], PupLead.prototype, "email", void 0);
34
+ tslib_1.__decorate([
35
+ typeorm_1.Column({ type: 'varchar', length: 200 }),
36
+ tslib_1.__metadata("design:type", String)
37
+ ], PupLead.prototype, "phoneNumber", void 0);
38
+ tslib_1.__decorate([
39
+ typeorm_1.Column({ type: 'text', nullable: true }),
40
+ tslib_1.__metadata("design:type", String)
41
+ ], PupLead.prototype, "extras", void 0);
42
+ tslib_1.__decorate([
43
+ typeorm_1.Column({ type: 'int' }),
44
+ tslib_1.__metadata("design:type", Number)
45
+ ], PupLead.prototype, "service", void 0);
46
+ tslib_1.__decorate([
47
+ typeorm_1.Column({ type: 'int' }),
48
+ tslib_1.__metadata("design:type", Number)
49
+ ], PupLead.prototype, "formId", void 0);
50
+ tslib_1.__decorate([
51
+ typeorm_1.Column({ type: 'int' }),
52
+ tslib_1.__metadata("design:type", Number)
53
+ ], PupLead.prototype, "assigneeId", void 0);
54
+ tslib_1.__decorate([
55
+ typeorm_1.ManyToOne(type => lead_form_1.LeadForm, form => form.fields),
56
+ typeorm_1.JoinColumn(),
57
+ tslib_1.__metadata("design:type", lead_form_1.LeadForm)
58
+ ], PupLead.prototype, "form", void 0);
59
+ tslib_1.__decorate([
60
+ typeorm_1.ManyToOne(type => user_1.User),
61
+ typeorm_1.JoinColumn(),
62
+ tslib_1.__metadata("design:type", user_1.User)
63
+ ], PupLead.prototype, "assignee", void 0);
64
+ PupLead = tslib_1.__decorate([
65
+ typeorm_1.Entity({ name: 'pup_leads' })
66
+ ], PupLead);
67
+ exports.PupLead = PupLead;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tudopz/model",
3
- "version": "2.22.4",
3
+ "version": "2.23.2",
4
4
  "description": "PZ Models",
5
5
  "author": "Tu Do <angelwing1001@gmail.com>",
6
6
  "homepage": "",