@lendi/integrations-transform 1.7.8 → 1.7.9

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.
@@ -2,14 +2,241 @@
2
2
  "definitions": {
3
3
  "Payload": {
4
4
  "type": "object",
5
- "oneOf": [
6
- {
7
- "$ref": "#/definitions/createApplicantDefinition"
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "id": {
8
+ "$ref": "#/definitions/id",
9
+ "description": "uuid of applicant"
10
+ },
11
+ "applicationId": {
12
+ "$ref": "#/definitions/id",
13
+ "description": "uuid of application"
14
+ },
15
+ "cityOfBirth": {
16
+ "$ref": "#/definitions/cityOfBirth"
17
+ },
18
+ "citizenship": {
19
+ "$ref": "#/definitions/countries"
20
+ },
21
+ "countryOfBirth": {
22
+ "$ref": "#/definitions/countries"
23
+ },
24
+ "clonedFromApplicantId": {
25
+ "$ref": "#/definitions/id",
26
+ "description": "uuid of source applicant"
27
+ },
28
+ "customerId": {
29
+ "$ref": "#/definitions/id",
30
+ "description": "uuid of customer"
31
+ },
32
+ "meta": {
33
+ "$ref": "#/definitions/applicantMeta"
34
+ },
35
+ "applicantType": {
36
+ "$ref": "#/definitions/applicantType"
37
+ },
38
+ "creditStatus": {
39
+ "$ref": "#/definitions/creditStatus"
40
+ },
41
+ "entity": {
42
+ "$ref": "#/definitions/entity"
43
+ },
44
+ "employmentType": {
45
+ "$ref": "#/definitions/employmentType"
46
+ },
47
+ "guarantorRelationshipToBorrower": {
48
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerDefinition"
49
+ },
50
+ "isFirstHomeBuyer": {
51
+ "$ref": "#/definitions/isFirstHomeBuyer"
52
+ },
53
+ "isPrimaryApplicant": {
54
+ "$ref": "#/definitions/isPrimaryApplicant"
55
+ },
56
+ "hasSelfEmploymentProof": {
57
+ "$ref": "#/definitions/hasSelfEmploymentProof"
58
+ },
59
+ "totalIncomeEstimate": {
60
+ "$ref": "#/definitions/totalIncomeEstimate"
61
+ },
62
+ "dateOfBirth": {
63
+ "$ref": "#/definitions/dateOfBirth"
64
+ },
65
+ "gender": {
66
+ "$ref": "#/definitions/gender"
67
+ },
68
+ "maritalStatus": {
69
+ "$ref": "#/definitions/maritalStatus"
70
+ },
71
+ "maritalDetails": {
72
+ "$ref": "#/definitions/applicantKeyObject"
73
+ },
74
+ "residencyStatus": {
75
+ "$ref": "#/definitions/residencyStatus"
76
+ },
77
+ "dependants": {
78
+ "$ref": "#/definitions/dependants"
79
+ },
80
+ "firstName": {
81
+ "$ref": "#/definitions/firstName"
82
+ },
83
+ "middleName": {
84
+ "$ref": "#/definitions/middleName"
85
+ },
86
+ "lastName": {
87
+ "$ref": "#/definitions/lastName"
88
+ },
89
+ "mothersMaidenName": {
90
+ "type": "string",
91
+ "description": "Mothers Maiden Name"
92
+ },
93
+ "title": {
94
+ "$ref": "#/definitions/title"
95
+ },
96
+ "contact": {
97
+ "$ref": "#/definitions/contact"
98
+ },
99
+ "invitationStatus": {
100
+ "$ref": "#/definitions/invitationStatus"
101
+ },
102
+ "trustName": {
103
+ "$ref": "#/definitions/name"
104
+ },
105
+ "trustType": {
106
+ "$ref": "#/definitions/trustType"
107
+ },
108
+ "registeredDate": {
109
+ "$ref": "#/definitions/date"
110
+ },
111
+ "registeredCountry": {
112
+ "$ref": "#/definitions/countries"
113
+ },
114
+ "registeredAddress": {
115
+ "$ref": "#/definitions/address"
116
+ },
117
+ "mailingAddress": {
118
+ "$ref": "#/definitions/address"
119
+ },
120
+ "industryCode": {
121
+ "$ref": "#/definitions/industryCode"
122
+ },
123
+ "isPassiveEntity": {
124
+ "$ref": "#/definitions/isPassiveEntity"
125
+ },
126
+ "companyName": {
127
+ "$ref": "#/definitions/name"
128
+ },
129
+ "companyType": {
130
+ "$ref": "#/definitions/companyType"
131
+ },
132
+ "companyStructure": {
133
+ "$ref": "#/definitions/companyStructure"
134
+ },
135
+ "isDiversified": {
136
+ "type": "boolean"
137
+ },
138
+ "legalEntitiesInGroup": {
139
+ "$ref": "#/definitions/legalEntities"
140
+ },
141
+ "isCommercialRelationship": {
142
+ "type": "boolean"
143
+ },
144
+ "abn": {
145
+ "$ref": "#/definitions/abn"
146
+ },
147
+ "acn": {
148
+ "$ref": "#/definitions/acn"
149
+ },
150
+ "registeredState": {
151
+ "$ref": "#/definitions/australianStates"
152
+ },
153
+ "yearsOfTrading": {
154
+ "$ref": "#/definitions/yearsOfTrading"
155
+ },
156
+ "currentLender": {
157
+ "$ref": "#/definitions/name"
158
+ },
159
+ "legalEntitiesWithCurrentLender": {
160
+ "$ref": "#/definitions/legalEntities"
161
+ },
162
+ "monthsWithCurrentLender": {
163
+ "$ref": "#/definitions/numOfMonths"
164
+ },
165
+ "branch": {
166
+ "$ref": "#/definitions/name"
167
+ },
168
+ "hasMoreThan25PercentBusinessWithOneCustomer": {
169
+ "type": "boolean",
170
+ "description": "Company doing more than 25% of business with one customer or supplier"
171
+ },
172
+ "moreThan25PercentBusinessWithOneCustomerDetails": {
173
+ "$ref": "#/definitions/description"
174
+ },
175
+ "hasOutstandingTax": {
176
+ "type": "boolean"
177
+ },
178
+ "outstandingTaxDetails": {
179
+ "$ref": "#/definitions/description"
180
+ },
181
+ "isPrincipalPlaceOfBusinessLeased": {
182
+ "type": "boolean",
183
+ "description": "Is the principal place of business leased"
184
+ },
185
+ "principalPlaceOfBusinessLeasedDetails": {
186
+ "$ref": "#/definitions/description"
8
187
  },
9
- {
10
- "$ref": "#/definitions/updateApplicantDefinition"
188
+ "doesTermLoanNeed100PercentFunding": {
189
+ "type": "boolean",
190
+ "description": "100% funding required for Term Loans"
191
+ },
192
+ "termLoanNeed100PercentFundingDetails": {
193
+ "$ref": "#/definitions/description"
194
+ },
195
+ "isActingAsFranchise": {
196
+ "$ref": "#/definitions/yesNoIntend"
197
+ },
198
+ "actingAsFranchiseDetails": {
199
+ "$ref": "#/definitions/description"
200
+ },
201
+ "isWorkingInImportExport": {
202
+ "$ref": "#/definitions/yesNoIntend"
203
+ },
204
+ "workingInImportExportDetails": {
205
+ "$ref": "#/definitions/description"
206
+ },
207
+ "isInvestingInProperty": {
208
+ "$ref": "#/definitions/yesNoIntend"
209
+ },
210
+ "investingInPropertyDetails": {
211
+ "$ref": "#/definitions/description"
212
+ },
213
+ "hasGoodConduct": {
214
+ "type": "boolean",
215
+ "description": "The applicant has not been over the credit limit, in arrears or in hardship in relation to any existing credit or other fixed expenses"
216
+ },
217
+ "wasBankruptOrInsolvent": {
218
+ "type": "boolean",
219
+ "description": "Have you been: bankrupt or insolvent, petitioned or aware of anyone petitioning you for bankruptcy, advised to seek bankruptcy, or associated with a company that was or threatened to be placed into administration?"
220
+ },
221
+ "hasPastOrCurrentDebts": {
222
+ "type": "boolean",
223
+ "description": "Have you or a company with which you are associated had any past or current debts that were or are in default of the payment arrangement?"
224
+ },
225
+ "hadRepaymentDifficultyOrLegalProceedings": {
226
+ "type": "boolean",
227
+ "description": "Have you had any difficulty in meeting your existing loan repayments, or had any financial judgments or legal proceedings, in the past two years?"
228
+ },
229
+ "isUSCitizenOrResident": {
230
+ "type": "boolean",
231
+ "description": "Is the applicant a US citizen or resident for US tax purposes?"
232
+ },
233
+ "hadLatePaymentsOrArrearsOrAdverseCreditHistory": {
234
+ "type": "boolean",
235
+ "description": "Has the applicant had any late payments, loan arrears or adverse credit history such as current or prior defaults or bankruptcies?"
11
236
  }
12
- ]
237
+ },
238
+ "required": ["id", "applicationId", "meta", "entity", "applicantType"],
239
+ "description": "create applicant payload"
13
240
  },
14
241
  "id": {
15
242
  "type": "string",
@@ -71,34 +298,6 @@
71
298
  "enum": ["EMPLOYEE", "SELF_EMPLOYED", "UNKNOWN"],
72
299
  "description": "applicant's employment type"
73
300
  },
74
- "guarantorRelationshipToBorrowerApplicantId": {
75
- "$ref": "#/definitions/id",
76
- "description": "Applicant Id of borrower that has relationship with guarantor."
77
- },
78
- "guarantorRelationshipToBorrowerType": {
79
- "enum": ["Father", "Mother", "Spouse", "Brother", "Sister", "Son", "Daughter", "Other Relative", "Other"],
80
- "description": "The relationship between borrower and guarantor."
81
- },
82
- "guarantorRelationshipToBorrowerTypeOther": {
83
- "type": "string",
84
- "description": "Description of relationship between borrower and guarantor when other."
85
- },
86
- "guarantorRelationshipToBorrowerDefinition": {
87
- "type": "object",
88
- "additionalProperties": false,
89
- "properties": {
90
- "applicantId": {
91
- "$ref": "#/definitions/guarantorRelationshipToBorrowerApplicantId"
92
- },
93
- "type": {
94
- "$ref": "#/definitions/guarantorRelationshipToBorrowerType"
95
- },
96
- "typeOther": {
97
- "$ref": "#/definitions/guarantorRelationshipToBorrowerTypeOther"
98
- }
99
- },
100
- "required": ["applicantId", "type"]
101
- },
102
301
  "isPrimaryApplicant": {
103
302
  "type": "boolean"
104
303
  },
@@ -129,6 +328,11 @@
129
328
  "$ref": "#/definitions/dependant"
130
329
  }
131
330
  },
331
+ "name": {
332
+ "type": "string",
333
+ "minLength": 1,
334
+ "maxLength": 256
335
+ },
132
336
  "firstName": {
133
337
  "type": "string",
134
338
  "description": "customer's first name"
@@ -406,7 +610,7 @@
406
610
  "type": "string",
407
611
  "example": "Ohio"
408
612
  },
409
- "AustralianStates": {
613
+ "australianStates": {
410
614
  "example": "NSW",
411
615
  "type": "string",
412
616
  "enum": ["QLD", "NSW", "VIC", "WA", "SA", "TAS", "ACT", "NT"]
@@ -416,16 +620,40 @@
416
620
  "format": "date",
417
621
  "example": "2018-07-17"
418
622
  },
419
- "AddressStandard": {
623
+ "addressStandard": {
420
624
  "type": "object",
421
625
  "additionalProperties": false,
422
626
  "properties": {
627
+ "buildingName": {
628
+ "description": "The building name",
629
+ "type": "string",
630
+ "minLength": 1,
631
+ "maxLength": 512
632
+ },
633
+ "deliveryAddress": {
634
+ "description": "Postal address, usually a PO Box or Locked Bag",
635
+ "type": "string",
636
+ "example": "PO Box 1",
637
+ "maxLength": 512
638
+ },
639
+ "lotSection": {
640
+ "description": "The lot number",
641
+ "type": "string",
642
+ "minLength": 1,
643
+ "maxLength": 512
644
+ },
423
645
  "streetName": {
424
646
  "type": "string"
425
647
  },
426
648
  "streetNumber": {
427
649
  "type": "string"
428
650
  },
651
+ "streetSuffix": {
652
+ "description": "The street suffix",
653
+ "type": "string",
654
+ "example": "North",
655
+ "maxLength": 128
656
+ },
429
657
  "streetType": {
430
658
  "type": "string"
431
659
  },
@@ -449,7 +677,7 @@
449
677
  "type": "string",
450
678
  "anyOf": [
451
679
  {
452
- "$ref": "#/definitions/AustralianStates"
680
+ "$ref": "#/definitions/australianStates"
453
681
  },
454
682
  {
455
683
  "$ref": "#/definitions/otherState"
@@ -466,7 +694,7 @@
466
694
  "type": "string"
467
695
  },
468
696
  "standard": {
469
- "$ref": "#/definitions/AddressStandard"
697
+ "$ref": "#/definitions/addressStandard"
470
698
  }
471
699
  }
472
700
  },
@@ -542,186 +770,122 @@
542
770
  "enum": ["ACCEPTED", "PENDING", "CANCELLED", "EXPIRED"],
543
771
  "description": "different invitation statuses an applicant can have"
544
772
  },
545
- "entity": {
546
- "enum": ["PERSON", "COMPANY", "TRUST"],
547
- "description": "applicant's entity. For a person applicant this is 'PERSON'"
548
- },
549
773
  "isFirstHomeBuyer": {
550
774
  "type": "boolean",
551
775
  "description": "Whether it's the applicants first home purchase."
552
776
  },
553
- "cityOfBirth": {
777
+ "guarantorRelationshipToBorrowerApplicantId": {
778
+ "$ref": "#/definitions/id",
779
+ "description": "Applicant Id of borrower that has relationship with guarantor."
780
+ },
781
+ "guarantorRelationshipToBorrowerType": {
782
+ "enum": ["Father", "Mother", "Spouse", "Brother", "Sister", "Son", "Daughter", "Other Relative", "Other"],
783
+ "description": "The relationship between borrower and guarantor."
784
+ },
785
+ "guarantorRelationshipToBorrowerTypeOther": {
554
786
  "type": "string",
555
- "example": "Sydney"
787
+ "description": "Description of relationship between borrower and guarantor when other."
556
788
  },
557
- "createApplicantDefinition": {
789
+ "guarantorRelationshipToBorrowerDefinition": {
558
790
  "type": "object",
559
791
  "additionalProperties": false,
560
792
  "properties": {
561
- "id": {
562
- "$ref": "#/definitions/id",
563
- "description": "uuid of applicant"
564
- },
565
- "applicationId": {
566
- "$ref": "#/definitions/id",
567
- "description": "uuid of application"
568
- },
569
- "cityOfBirth": {
570
- "$ref": "#/definitions/cityOfBirth"
571
- },
572
- "customerId": {
573
- "$ref": "#/definitions/id",
574
- "description": "uuid of customer"
575
- },
576
- "meta": {
577
- "$ref": "#/definitions/applicantMeta"
578
- },
579
- "applicantType": {
580
- "$ref": "#/definitions/applicantType"
581
- },
582
- "creditStatus": {
583
- "$ref": "#/definitions/creditStatus"
584
- },
585
- "entity": {
586
- "$ref": "#/definitions/entity"
587
- },
588
- "employmentType": {
589
- "$ref": "#/definitions/employmentType"
590
- },
591
- "guarantorRelationshipToBorrower": {
592
- "$ref": "#/definitions/guarantorRelationshipToBorrowerDefinition"
593
- },
594
- "isFirstHomeBuyer": {
595
- "$ref": "#/definitions/isFirstHomeBuyer"
596
- },
597
- "isPrimaryApplicant": {
598
- "$ref": "#/definitions/isPrimaryApplicant"
599
- },
600
- "hasSelfEmploymentProof": {
601
- "$ref": "#/definitions/hasSelfEmploymentProof"
602
- },
603
- "totalIncomeEstimate": {
604
- "$ref": "#/definitions/totalIncomeEstimate"
605
- },
606
- "dateOfBirth": {
607
- "$ref": "#/definitions/dateOfBirth"
608
- },
609
- "gender": {
610
- "$ref": "#/definitions/gender"
611
- },
612
- "maritalStatus": {
613
- "$ref": "#/definitions/maritalStatus"
614
- },
615
- "maritalDetails": {
616
- "$ref": "#/definitions/applicantKeyObject"
617
- },
618
- "residencyStatus": {
619
- "$ref": "#/definitions/residencyStatus"
620
- },
621
- "dependants": {
622
- "$ref": "#/definitions/dependants"
623
- },
624
- "firstName": {
625
- "$ref": "#/definitions/firstName"
626
- },
627
- "middleName": {
628
- "$ref": "#/definitions/middleName"
629
- },
630
- "lastName": {
631
- "$ref": "#/definitions/lastName"
632
- },
633
- "title": {
634
- "$ref": "#/definitions/title"
793
+ "applicantId": {
794
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerApplicantId"
635
795
  },
636
- "contact": {
637
- "$ref": "#/definitions/contact"
796
+ "type": {
797
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerType"
638
798
  },
639
- "invitationStatus": {
640
- "$ref": "#/definitions/invitationStatus"
799
+ "typeOther": {
800
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerTypeOther"
641
801
  }
642
802
  },
643
- "required": ["id", "applicationId", "customerId", "isPrimaryApplicant", "meta"],
644
- "description": "create applicant payload"
803
+ "required": ["applicantId", "type"]
645
804
  },
646
- "updateApplicantDefinition": {
647
- "type": "object",
648
- "additionalProperties": false,
649
- "properties": {
650
- "id": {
651
- "$ref": "#/definitions/id",
652
- "description": "uuid of applicant"
653
- },
654
- "applicationId": {
655
- "$ref": "#/definitions/id",
656
- "description": "uuid of application"
657
- },
658
- "customerId": {
659
- "$ref": "#/definitions/id",
660
- "description": "uuid of customer"
661
- },
662
- "meta": {
663
- "$ref": "#/definitions/applicantMeta"
664
- },
665
- "applicantType": {
666
- "$ref": "#/definitions/applicantType"
667
- },
668
- "creditStatus": {
669
- "$ref": "#/definitions/creditStatus"
670
- },
671
- "employmentType": {
672
- "$ref": "#/definitions/employmentType"
673
- },
674
- "guarantorRelationshipToBorrower": {
675
- "$ref": "#/definitions/guarantorRelationshipToBorrowerDefinition"
676
- },
677
- "isPrimaryApplicant": {
678
- "$ref": "#/definitions/isPrimaryApplicant"
679
- },
680
- "hasSelfEmploymentProof": {
681
- "$ref": "#/definitions/hasSelfEmploymentProof"
682
- },
683
- "totalIncomeEstimate": {
684
- "$ref": "#/definitions/totalIncomeEstimate"
685
- },
686
- "dateOfBirth": {
687
- "$ref": "#/definitions/dateOfBirth"
688
- },
689
- "gender": {
690
- "$ref": "#/definitions/gender"
691
- },
692
- "maritalStatus": {
693
- "$ref": "#/definitions/maritalStatus"
694
- },
695
- "maritalDetails": {
696
- "$ref": "#/definitions/applicantKeyObject"
697
- },
698
- "residencyStatus": {
699
- "$ref": "#/definitions/residencyStatus"
700
- },
701
- "dependants": {
702
- "$ref": "#/definitions/dependants"
703
- },
704
- "firstName": {
705
- "$ref": "#/definitions/firstName"
706
- },
707
- "middleName": {
708
- "$ref": "#/definitions/middleName"
709
- },
710
- "lastName": {
711
- "$ref": "#/definitions/lastName"
712
- },
713
- "title": {
714
- "$ref": "#/definitions/title"
715
- },
716
- "contact": {
717
- "$ref": "#/definitions/contact"
718
- },
719
- "invitationStatus": {
720
- "$ref": "#/definitions/invitationStatus"
721
- }
722
- },
723
- "required": ["id", "applicationId", "customerId", "meta"],
724
- "description": "update applicant payload. Entity shouldn't be updated."
805
+ "entity": {
806
+ "enum": ["PERSON", "COMPANY", "TRUST"],
807
+ "description": "applicant's entity. For a person applicant this is 'PERSON'"
808
+ },
809
+ "cityOfBirth": {
810
+ "type": "string",
811
+ "example": "Sydney"
812
+ },
813
+ "industryCode": {
814
+ "type": "string",
815
+ "pattern": "^\\d{4}$",
816
+ "description": "ANZSIC business code lookup "
817
+ },
818
+ "isPassiveEntity": {
819
+ "type": "boolean",
820
+ "description": "If the entity's primary business activity is investing"
821
+ },
822
+ "legalEntities": {
823
+ "type": "integer",
824
+ "minimum": 0,
825
+ "maximum": 1000000
826
+ },
827
+ "description": {
828
+ "type": "string",
829
+ "minLength": 1,
830
+ "maxLength": 1024
831
+ },
832
+ "numOfMonths": {
833
+ "type": "integer",
834
+ "minimum": 1,
835
+ "maximum": 1200
836
+ },
837
+ "yesNoIntend": {
838
+ "type": "string",
839
+ "enum": ["Yes", "No", "Intend"]
840
+ },
841
+ "trustType": {
842
+ "enum": [
843
+ "CASH_MANAGEMENT_TRUST",
844
+ "DISCRETIONARY_TRUST",
845
+ "FIXED",
846
+ "HYBRID",
847
+ "SUPERANNUATION_TRUSTS",
848
+ "UNIT",
849
+ "OTHER"
850
+ ]
851
+ },
852
+ "trustName": {
853
+ "$ref": "#/definitions/name"
854
+ },
855
+ "registeredDate": {
856
+ "$ref": "#/definitions/date"
857
+ },
858
+ "registeredCountry": {
859
+ "$ref": "#/definitions/countries"
860
+ },
861
+ "registeredAddress": {
862
+ "$ref": "#/definitions/address"
863
+ },
864
+ "mailingAddress": {
865
+ "$ref": "#/definitions/address"
866
+ },
867
+ "companyName": {
868
+ "$ref": "#/definitions/name"
869
+ },
870
+ "abn": {
871
+ "type": "string",
872
+ "pattern": "^\\d{11}$",
873
+ "description": "Company ABN Number"
874
+ },
875
+ "acn": {
876
+ "type": "string",
877
+ "pattern": "^\\d{9}$",
878
+ "description": "Australian Company Number"
879
+ },
880
+ "yearsOfTrading": {
881
+ "type": "string",
882
+ "enum": ["1", "2", "3", "4", "5", "5-10", ">10"]
883
+ },
884
+ "companyType": {
885
+ "enum": ["INCORPORATED", "LTD", "NL", "PTY_LTD"]
886
+ },
887
+ "companyStructure": {
888
+ "enum": ["SOLE_TRADER", "PARTNERSHIP", "CORPORATION", "TRUST"]
725
889
  }
726
890
  },
727
891
  "type": "object",
@@ -4,11 +4,13 @@ exports.transformApplicant = exports.booleanMapping = void 0;
4
4
  const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
5
5
  const lixi_internal_request_2 = require("@lendi/integrations-protocol/lib/types/lixi-internal-request");
6
6
  const application_paths_1 = require("@lendi/integrations-protocol/lib/utils/application-paths");
7
+ const application_paths_2 = require("@lendi/integrations-credit-protocol/utils/application-paths");
7
8
  const lodash_1 = require("lodash");
8
9
  const enum_mappings_1 = require("../types/enum-mappings");
9
10
  const applicant_gender_1 = require("../types/enum-mappings/applicant-gender");
10
11
  const applicant_type_1 = require("../types/enum-mappings/applicant-type");
11
12
  const guarantor_relationship_type_1 = require("../types/enum-mappings/guarantor-relationship-type");
13
+ const trust_1 = require("../types/enum-mappings/trust");
12
14
  const public_applicant_1 = require("../types/events/public-applicant");
13
15
  const errors_1 = require("../utils/errors");
14
16
  const normalise_date_1 = require("../utils/normalise-date");
@@ -17,7 +19,7 @@ exports.booleanMapping = booleanMapping;
17
19
  function transformApplicant(applicant) {
18
20
  const partialApplication = {};
19
21
  const applicantId = applicant.id; // This is how SF events cross reference applicant with its entities.
20
- const applicantMapping = {
22
+ let applicantMapping = {
21
23
  applicantType: `${application_paths_1.paths.PersonApplicant}.@ApplicantType`,
22
24
  applicationId: application_paths_1.paths.ApplicationId,
23
25
  citizenship: `${application_paths_1.paths.PersonApplicant}.@Citizenship`,
@@ -38,19 +40,34 @@ function transformApplicant(applicant) {
38
40
  residencyStatus: `${application_paths_1.paths.PersonApplicant}.@ResidencyStatus`,
39
41
  title: `${application_paths_1.paths.PersonName}.@NameTitle`,
40
42
  };
43
+ if (applicant.entity === public_applicant_1.Entity.Trust) {
44
+ applicantMapping = {
45
+ applicantType: `${application_paths_2.paths.TrustApplicant}.@ApplicantType`,
46
+ applicationId: application_paths_1.paths.ApplicationId,
47
+ id: `${application_paths_2.paths.TrustApplicant}.@UniqueID`,
48
+ industryCode: `${application_paths_2.paths.TrustApplicant}.Business.@IndustryCode`,
49
+ registeredAddress: `${application_paths_2.paths.TrustApplicant}.Contact.@x_RegisteredAddress`,
50
+ registeredCountry: `${application_paths_2.paths.TrustApplicant}.@CountryEstablished`,
51
+ registeredDate: `${application_paths_2.paths.TrustApplicant}.@EstablishmentDate`,
52
+ trustName: `${application_paths_2.paths.TrustApplicant}.@TrustName`,
53
+ trustType: `${application_paths_2.paths.TrustApplicant}.@TrustStructure`,
54
+ };
55
+ }
41
56
  // Any applicant event need to have at least dateOfBirth, firstName and lastName.
42
- if (!(applicant.dateOfBirth && applicant.firstName && applicant.lastName)) {
57
+ if (applicant.entity === public_applicant_1.Entity.Person && !(applicant.dateOfBirth && applicant.firstName && applicant.lastName)) {
43
58
  throw new errors_1.InvalidEvent('Applicant needs to have dateOfBirth, firstName and lastName');
44
59
  }
45
60
  // If applicant event comes without an applicantType then default it to ApplicantType.Borrower
46
61
  if (!applicant.applicantType) {
47
62
  applicant.applicantType = public_applicant_1.ApplicantType.Borrower;
48
63
  }
49
- (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonName}.@NameTitle`, lixi_internal_request_1.NameTitleList.Other);
50
- (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonApplicant}.@PrimaryApplicant`, (0, exports.booleanMapping)(applicant.isPrimaryApplicant));
51
- (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonApplicant}.@FirstHomeBuyer`, (0, exports.booleanMapping)(applicant.isFirstHomeBuyer));
52
- (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonApplicant}.@Gender`, applicant_gender_1.applicantGenderMapping[applicant.gender]);
53
- if (applicant.applicantType === public_applicant_1.ApplicantType.Guarantor) {
64
+ if (applicant.entity === public_applicant_1.Entity.Person) {
65
+ (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonName}.@NameTitle`, lixi_internal_request_1.NameTitleList.Other);
66
+ (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonApplicant}.@PrimaryApplicant`, (0, exports.booleanMapping)(applicant.isPrimaryApplicant));
67
+ (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonApplicant}.@FirstHomeBuyer`, (0, exports.booleanMapping)(applicant.isFirstHomeBuyer));
68
+ (0, lodash_1.set)(partialApplication, `${application_paths_1.paths.PersonApplicant}.@Gender`, applicant_gender_1.applicantGenderMapping[applicant.gender]);
69
+ }
70
+ if (applicant.entity === public_applicant_1.Entity.Person && applicant.applicantType === public_applicant_1.ApplicantType.Guarantor) {
54
71
  const mappedGuarantorRelationship = applicant.guarantorRelationshipToBorrower
55
72
  ? guarantor_relationship_type_1.guarantorRelationshipTypeMappings[applicant.guarantorRelationshipToBorrower.type]
56
73
  : lixi_internal_request_1.KinRelationshipList.OtherRelative;
@@ -88,6 +105,15 @@ function transformApplicant(applicant) {
88
105
  case 'title':
89
106
  (0, lodash_1.set)(partialApplication, applicantMapping[key], enum_mappings_1.titleMapping[value]);
90
107
  break;
108
+ case 'trustType':
109
+ (0, lodash_1.set)(partialApplication, applicantMapping[key], trust_1.trustTypeMapping[value]);
110
+ break;
111
+ case 'registeredCountry':
112
+ (0, lodash_1.set)(partialApplication, applicantMapping[key], enum_mappings_1.countryCodeMapping[value]);
113
+ break;
114
+ case 'registeredAddress':
115
+ (0, lodash_1.set)(partialApplication, applicantMapping[key], `${applicant.id}-address`);
116
+ break;
91
117
  case 'maritalDetails':
92
118
  const id = (0, lodash_1.get)(value, 'applicantId');
93
119
  if (id)
@@ -0,0 +1,7 @@
1
+ import { TrustType } from '../events/public-applicant';
2
+ import { TrustStructureList } from '@lendi/integrations-credit-protocol/types/lixi-internal-request';
3
+ type TrustTypeMapping = {
4
+ [key in TrustType]: TrustStructureList;
5
+ };
6
+ export declare const trustTypeMapping: Partial<TrustTypeMapping>;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.trustTypeMapping = void 0;
4
+ const public_applicant_1 = require("../events/public-applicant");
5
+ const lixi_internal_request_1 = require("@lendi/integrations-credit-protocol/types/lixi-internal-request");
6
+ exports.trustTypeMapping = {
7
+ [public_applicant_1.TrustType.CashManagementTrust]: lixi_internal_request_1.TrustStructureList.CashManagement,
8
+ [public_applicant_1.TrustType.DiscretionaryTrust]: lixi_internal_request_1.TrustStructureList.Discretionary,
9
+ [public_applicant_1.TrustType.Fixed]: lixi_internal_request_1.TrustStructureList.Fixed,
10
+ [public_applicant_1.TrustType.Hybrid]: lixi_internal_request_1.TrustStructureList.Hybrid,
11
+ [public_applicant_1.TrustType.SuperannuationTrusts]: lixi_internal_request_1.TrustStructureList.SuperannuationFund,
12
+ [public_applicant_1.TrustType.Unit]: lixi_internal_request_1.TrustStructureList.Unit,
13
+ };
@@ -11,102 +11,134 @@ export interface PublicApplicant {
11
11
  }
12
12
  /**
13
13
  * create applicant payload
14
- *
15
- * update applicant payload. Entity shouldn't be updated.
16
14
  */
17
15
  export interface Payload {
18
- applicantType?: ApplicantType;
16
+ abn?: string;
17
+ acn?: string;
18
+ actingAsFranchiseDetails?: string;
19
+ applicantType: ApplicantType;
19
20
  /**
20
21
  * uuid of application
21
22
  */
22
23
  applicationId: string;
24
+ branch?: string;
25
+ citizenship?: Countries;
23
26
  cityOfBirth?: string;
27
+ /**
28
+ * uuid of source applicant
29
+ */
30
+ clonedFromApplicantId?: string;
31
+ companyName?: string;
32
+ companyStructure?: CompanyStructure;
33
+ companyType?: CompanyType;
24
34
  contact?: Contact;
35
+ countryOfBirth?: Countries;
25
36
  creditStatus?: CreditStatus;
37
+ currentLender?: string;
26
38
  /**
27
39
  * uuid of customer
28
40
  */
29
- customerId: string;
41
+ customerId?: string;
30
42
  dateOfBirth?: string;
31
43
  dependants?: Dependant[];
44
+ /**
45
+ * 100% funding required for Term Loans
46
+ */
47
+ doesTermLoanNeed100PercentFunding?: boolean;
32
48
  employmentType?: EmploymentType;
33
- entity?: Entity;
49
+ entity: Entity;
34
50
  firstName?: string;
35
51
  gender?: Gender;
36
52
  guarantorRelationshipToBorrower?: GuarantorRelationshipToBorrowerDefinition;
53
+ /**
54
+ * Has the applicant had any late payments, loan arrears or adverse credit history such as
55
+ * current or prior defaults or bankruptcies?
56
+ */
57
+ hadLatePaymentsOrArrearsOrAdverseCreditHistory?: boolean;
58
+ /**
59
+ * Have you had any difficulty in meeting your existing loan repayments, or had any
60
+ * financial judgments or legal proceedings, in the past two years?
61
+ */
62
+ hadRepaymentDifficultyOrLegalProceedings?: boolean;
63
+ /**
64
+ * The applicant has not been over the credit limit, in arrears or in hardship in relation
65
+ * to any existing credit or other fixed expenses
66
+ */
67
+ hasGoodConduct?: boolean;
68
+ /**
69
+ * Company doing more than 25% of business with one customer or supplier
70
+ */
71
+ hasMoreThan25PercentBusinessWithOneCustomer?: boolean;
72
+ hasOutstandingTax?: boolean;
73
+ /**
74
+ * Have you or a company with which you are associated had any past or current debts that
75
+ * were or are in default of the payment arrangement?
76
+ */
77
+ hasPastOrCurrentDebts?: boolean;
37
78
  hasSelfEmploymentProof?: boolean;
38
79
  /**
39
80
  * uuid of applicant
40
81
  */
41
82
  id: string;
83
+ industryCode?: string;
84
+ investingInPropertyDetails?: string;
42
85
  invitationStatus?: InvitationStatus;
86
+ isActingAsFranchise?: YesNoIntend;
87
+ isCommercialRelationship?: boolean;
88
+ isDiversified?: boolean;
43
89
  isFirstHomeBuyer?: boolean;
90
+ isInvestingInProperty?: YesNoIntend;
91
+ isPassiveEntity?: boolean;
44
92
  isPrimaryApplicant?: boolean;
93
+ /**
94
+ * Is the principal place of business leased
95
+ */
96
+ isPrincipalPlaceOfBusinessLeased?: boolean;
97
+ /**
98
+ * Is the applicant a US citizen or resident for US tax purposes?
99
+ */
100
+ isUSCitizenOrResident?: boolean;
101
+ isWorkingInImportExport?: YesNoIntend;
45
102
  lastName?: string;
103
+ legalEntitiesInGroup?: number;
104
+ legalEntitiesWithCurrentLender?: number;
105
+ mailingAddress?: Address;
46
106
  maritalDetails?: ApplicantKeyObject;
47
107
  maritalStatus?: MaritalStatus;
48
108
  meta: ApplicantMeta;
49
109
  middleName?: string;
110
+ monthsWithCurrentLender?: number;
111
+ moreThan25PercentBusinessWithOneCustomerDetails?: string;
112
+ /**
113
+ * Mothers Maiden Name
114
+ */
115
+ mothersMaidenName?: string;
116
+ outstandingTaxDetails?: string;
117
+ principalPlaceOfBusinessLeasedDetails?: string;
118
+ registeredAddress?: Address;
119
+ registeredCountry?: Countries;
120
+ registeredDate?: string;
121
+ registeredState?: AustralianStates;
50
122
  residencyStatus?: ResidencyStatus;
123
+ termLoanNeed100PercentFundingDetails?: string;
51
124
  title?: Title;
52
125
  totalIncomeEstimate?: number;
126
+ trustName?: string;
127
+ trustType?: TrustType;
128
+ /**
129
+ * Have you been: bankrupt or insolvent, petitioned or aware of anyone petitioning you for
130
+ * bankruptcy, advised to seek bankruptcy, or associated with a company that was or
131
+ * threatened to be placed into administration?
132
+ */
133
+ wasBankruptOrInsolvent?: boolean;
134
+ workingInImportExportDetails?: string;
135
+ yearsOfTrading?: YearsOfTrading;
53
136
  }
54
137
  export declare enum ApplicantType {
55
138
  Borrower = "BORROWER",
56
139
  BorrowerAndGuarantor = "BORROWER_AND_GUARANTOR",
57
140
  Guarantor = "GUARANTOR"
58
141
  }
59
- export interface Contact {
60
- currentAddress?: CommonAddressProperties;
61
- /**
62
- * The applicant email
63
- */
64
- emailAddress?: string;
65
- /**
66
- * applicant's mailing address being captured as part of funnels 5 (post product select)
67
- */
68
- mailingAddress?: Address;
69
- /**
70
- * applicant's mobile number formatted in +611234567890
71
- */
72
- mobileNumber?: string;
73
- /**
74
- * applicant's post settlement address being captured as part of funnels 5 (post product
75
- * select)
76
- */
77
- postSettlementAddress?: Address;
78
- previousAddresses?: PreviousAddress[];
79
- }
80
- export interface CommonAddressProperties {
81
- externalId?: string;
82
- housingStatus?: HousingStatusList;
83
- residentialAddress?: Address;
84
- startDate?: string;
85
- }
86
- export declare enum HousingStatusList {
87
- Boarding = "Boarding",
88
- Caravan = "Caravan",
89
- Other = "Other",
90
- OwnHome = "Own Home",
91
- OwnHomeMortgage = "Own Home Mortgage",
92
- Renting = "Renting",
93
- SuppliedByEmployer = "Supplied by Employer",
94
- WithParents = "With Parents"
95
- }
96
- /**
97
- * applicant's mailing address being captured as part of funnels 5 (post product select)
98
- *
99
- * applicant's post settlement address being captured as part of funnels 5 (post product
100
- * select)
101
- */
102
- export interface Address {
103
- city?: string;
104
- country?: Countries;
105
- formatted?: string;
106
- postcode?: string;
107
- standard?: AddressStandard;
108
- state?: string;
109
- }
110
142
  export declare enum Countries {
111
143
  Afghanistan = "Afghanistan",
112
144
  Albania = "Albania",
@@ -348,10 +380,89 @@ export declare enum Countries {
348
380
  Zambia = "Zambia",
349
381
  Zimbabwe = "Zimbabwe"
350
382
  }
383
+ export declare enum CompanyStructure {
384
+ Corporation = "CORPORATION",
385
+ Partnership = "PARTNERSHIP",
386
+ SoleTrader = "SOLE_TRADER",
387
+ Trust = "TRUST"
388
+ }
389
+ export declare enum CompanyType {
390
+ Incorporated = "INCORPORATED",
391
+ Ltd = "LTD",
392
+ Nl = "NL",
393
+ PtyLtd = "PTY_LTD"
394
+ }
395
+ export interface Contact {
396
+ currentAddress?: CommonAddressProperties;
397
+ /**
398
+ * The applicant email
399
+ */
400
+ emailAddress?: string;
401
+ /**
402
+ * applicant's mailing address being captured as part of funnels 5 (post product select)
403
+ */
404
+ mailingAddress?: Address;
405
+ /**
406
+ * applicant's mobile number formatted in +611234567890
407
+ */
408
+ mobileNumber?: string;
409
+ /**
410
+ * applicant's post settlement address being captured as part of funnels 5 (post product
411
+ * select)
412
+ */
413
+ postSettlementAddress?: Address;
414
+ previousAddresses?: PreviousAddress[];
415
+ }
416
+ export interface CommonAddressProperties {
417
+ externalId?: string;
418
+ housingStatus?: HousingStatusList;
419
+ residentialAddress?: Address;
420
+ startDate?: string;
421
+ }
422
+ export declare enum HousingStatusList {
423
+ Boarding = "Boarding",
424
+ Caravan = "Caravan",
425
+ Other = "Other",
426
+ OwnHome = "Own Home",
427
+ OwnHomeMortgage = "Own Home Mortgage",
428
+ Renting = "Renting",
429
+ SuppliedByEmployer = "Supplied by Employer",
430
+ WithParents = "With Parents"
431
+ }
432
+ /**
433
+ * applicant's mailing address being captured as part of funnels 5 (post product select)
434
+ *
435
+ * applicant's post settlement address being captured as part of funnels 5 (post product
436
+ * select)
437
+ */
438
+ export interface Address {
439
+ city?: string;
440
+ country?: Countries;
441
+ formatted?: string;
442
+ postcode?: string;
443
+ standard?: AddressStandard;
444
+ state?: string;
445
+ }
351
446
  export interface AddressStandard {
447
+ /**
448
+ * The building name
449
+ */
450
+ buildingName?: string;
451
+ /**
452
+ * Postal address, usually a PO Box or Locked Bag
453
+ */
454
+ deliveryAddress?: string;
352
455
  level?: string;
456
+ /**
457
+ * The lot number
458
+ */
459
+ lotSection?: string;
353
460
  streetName?: string;
354
461
  streetNumber?: string;
462
+ /**
463
+ * The street suffix
464
+ */
465
+ streetSuffix?: string;
355
466
  streetType?: string;
356
467
  unit?: string;
357
468
  }
@@ -436,6 +547,11 @@ export declare enum InvitationStatus {
436
547
  Expired = "EXPIRED",
437
548
  Pending = "PENDING"
438
549
  }
550
+ export declare enum YesNoIntend {
551
+ Intend = "Intend",
552
+ No = "No",
553
+ Yes = "Yes"
554
+ }
439
555
  export declare enum MaritalStatus {
440
556
  DeFacto = "DE_FACTO",
441
557
  Divorced = "DIVORCED",
@@ -463,6 +579,16 @@ export declare enum ActionedByRole {
463
579
  Customer = "customer",
464
580
  Team = "team"
465
581
  }
582
+ export declare enum AustralianStates {
583
+ Act = "ACT",
584
+ NT = "NT",
585
+ Nsw = "NSW",
586
+ Qld = "QLD",
587
+ Sa = "SA",
588
+ Tas = "TAS",
589
+ Vic = "VIC",
590
+ Wa = "WA"
591
+ }
466
592
  export declare enum ResidencyStatus {
467
593
  AustralianCitizen = "AUSTRALIAN_CITIZEN",
468
594
  PermanentResident = "PERMANENT_RESIDENT",
@@ -477,6 +603,24 @@ export declare enum Title {
477
603
  Mrs = "MRS",
478
604
  Unknown = "UNKNOWN"
479
605
  }
606
+ export declare enum TrustType {
607
+ CashManagementTrust = "CASH_MANAGEMENT_TRUST",
608
+ DiscretionaryTrust = "DISCRETIONARY_TRUST",
609
+ Fixed = "FIXED",
610
+ Hybrid = "HYBRID",
611
+ Other = "OTHER",
612
+ SuperannuationTrusts = "SUPERANNUATION_TRUSTS",
613
+ Unit = "UNIT"
614
+ }
615
+ export declare enum YearsOfTrading {
616
+ The1 = "1",
617
+ The10 = ">10",
618
+ The2 = "2",
619
+ The3 = "3",
620
+ The4 = "4",
621
+ The5 = "5",
622
+ The510 = "5-10"
623
+ }
480
624
  export declare enum Type {
481
625
  CreateApplicant = "CreateApplicant",
482
626
  UpdateApplicant = "UpdateApplicant"
@@ -1,23 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Type = exports.Title = exports.ResidencyStatus = exports.ActionedByRole = exports.MaritalStatus = exports.InvitationStatus = exports.GuarantorRelationshipToBorrowerType = exports.Gender = exports.Entity = exports.EmploymentType = exports.CreditStatus = exports.Countries = exports.HousingStatusList = exports.ApplicantType = void 0;
3
+ exports.Type = exports.YearsOfTrading = exports.TrustType = exports.Title = exports.ResidencyStatus = exports.AustralianStates = exports.ActionedByRole = exports.MaritalStatus = exports.YesNoIntend = exports.InvitationStatus = exports.GuarantorRelationshipToBorrowerType = exports.Gender = exports.Entity = exports.EmploymentType = exports.CreditStatus = exports.HousingStatusList = exports.CompanyType = exports.CompanyStructure = exports.Countries = exports.ApplicantType = void 0;
4
4
  var ApplicantType;
5
5
  (function (ApplicantType) {
6
6
  ApplicantType["Borrower"] = "BORROWER";
7
7
  ApplicantType["BorrowerAndGuarantor"] = "BORROWER_AND_GUARANTOR";
8
8
  ApplicantType["Guarantor"] = "GUARANTOR";
9
9
  })(ApplicantType = exports.ApplicantType || (exports.ApplicantType = {}));
10
- var HousingStatusList;
11
- (function (HousingStatusList) {
12
- HousingStatusList["Boarding"] = "Boarding";
13
- HousingStatusList["Caravan"] = "Caravan";
14
- HousingStatusList["Other"] = "Other";
15
- HousingStatusList["OwnHome"] = "Own Home";
16
- HousingStatusList["OwnHomeMortgage"] = "Own Home Mortgage";
17
- HousingStatusList["Renting"] = "Renting";
18
- HousingStatusList["SuppliedByEmployer"] = "Supplied by Employer";
19
- HousingStatusList["WithParents"] = "With Parents";
20
- })(HousingStatusList = exports.HousingStatusList || (exports.HousingStatusList = {}));
21
10
  var Countries;
22
11
  (function (Countries) {
23
12
  Countries["Afghanistan"] = "Afghanistan";
@@ -260,6 +249,31 @@ var Countries;
260
249
  Countries["Zambia"] = "Zambia";
261
250
  Countries["Zimbabwe"] = "Zimbabwe";
262
251
  })(Countries = exports.Countries || (exports.Countries = {}));
252
+ var CompanyStructure;
253
+ (function (CompanyStructure) {
254
+ CompanyStructure["Corporation"] = "CORPORATION";
255
+ CompanyStructure["Partnership"] = "PARTNERSHIP";
256
+ CompanyStructure["SoleTrader"] = "SOLE_TRADER";
257
+ CompanyStructure["Trust"] = "TRUST";
258
+ })(CompanyStructure = exports.CompanyStructure || (exports.CompanyStructure = {}));
259
+ var CompanyType;
260
+ (function (CompanyType) {
261
+ CompanyType["Incorporated"] = "INCORPORATED";
262
+ CompanyType["Ltd"] = "LTD";
263
+ CompanyType["Nl"] = "NL";
264
+ CompanyType["PtyLtd"] = "PTY_LTD";
265
+ })(CompanyType = exports.CompanyType || (exports.CompanyType = {}));
266
+ var HousingStatusList;
267
+ (function (HousingStatusList) {
268
+ HousingStatusList["Boarding"] = "Boarding";
269
+ HousingStatusList["Caravan"] = "Caravan";
270
+ HousingStatusList["Other"] = "Other";
271
+ HousingStatusList["OwnHome"] = "Own Home";
272
+ HousingStatusList["OwnHomeMortgage"] = "Own Home Mortgage";
273
+ HousingStatusList["Renting"] = "Renting";
274
+ HousingStatusList["SuppliedByEmployer"] = "Supplied by Employer";
275
+ HousingStatusList["WithParents"] = "With Parents";
276
+ })(HousingStatusList = exports.HousingStatusList || (exports.HousingStatusList = {}));
263
277
  /**
264
278
  * current credit status of the applicant (Customer declared value)
265
279
  */
@@ -320,6 +334,12 @@ var InvitationStatus;
320
334
  InvitationStatus["Expired"] = "EXPIRED";
321
335
  InvitationStatus["Pending"] = "PENDING";
322
336
  })(InvitationStatus = exports.InvitationStatus || (exports.InvitationStatus = {}));
337
+ var YesNoIntend;
338
+ (function (YesNoIntend) {
339
+ YesNoIntend["Intend"] = "Intend";
340
+ YesNoIntend["No"] = "No";
341
+ YesNoIntend["Yes"] = "Yes";
342
+ })(YesNoIntend = exports.YesNoIntend || (exports.YesNoIntend = {}));
323
343
  var MaritalStatus;
324
344
  (function (MaritalStatus) {
325
345
  MaritalStatus["DeFacto"] = "DE_FACTO";
@@ -336,6 +356,17 @@ var ActionedByRole;
336
356
  ActionedByRole["Customer"] = "customer";
337
357
  ActionedByRole["Team"] = "team";
338
358
  })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
359
+ var AustralianStates;
360
+ (function (AustralianStates) {
361
+ AustralianStates["Act"] = "ACT";
362
+ AustralianStates["NT"] = "NT";
363
+ AustralianStates["Nsw"] = "NSW";
364
+ AustralianStates["Qld"] = "QLD";
365
+ AustralianStates["Sa"] = "SA";
366
+ AustralianStates["Tas"] = "TAS";
367
+ AustralianStates["Vic"] = "VIC";
368
+ AustralianStates["Wa"] = "WA";
369
+ })(AustralianStates = exports.AustralianStates || (exports.AustralianStates = {}));
339
370
  var ResidencyStatus;
340
371
  (function (ResidencyStatus) {
341
372
  ResidencyStatus["AustralianCitizen"] = "AUSTRALIAN_CITIZEN";
@@ -352,6 +383,26 @@ var Title;
352
383
  Title["Mrs"] = "MRS";
353
384
  Title["Unknown"] = "UNKNOWN";
354
385
  })(Title = exports.Title || (exports.Title = {}));
386
+ var TrustType;
387
+ (function (TrustType) {
388
+ TrustType["CashManagementTrust"] = "CASH_MANAGEMENT_TRUST";
389
+ TrustType["DiscretionaryTrust"] = "DISCRETIONARY_TRUST";
390
+ TrustType["Fixed"] = "FIXED";
391
+ TrustType["Hybrid"] = "HYBRID";
392
+ TrustType["Other"] = "OTHER";
393
+ TrustType["SuperannuationTrusts"] = "SUPERANNUATION_TRUSTS";
394
+ TrustType["Unit"] = "UNIT";
395
+ })(TrustType = exports.TrustType || (exports.TrustType = {}));
396
+ var YearsOfTrading;
397
+ (function (YearsOfTrading) {
398
+ YearsOfTrading["The1"] = "1";
399
+ YearsOfTrading["The10"] = ">10";
400
+ YearsOfTrading["The2"] = "2";
401
+ YearsOfTrading["The3"] = "3";
402
+ YearsOfTrading["The4"] = "4";
403
+ YearsOfTrading["The5"] = "5";
404
+ YearsOfTrading["The510"] = "5-10";
405
+ })(YearsOfTrading = exports.YearsOfTrading || (exports.YearsOfTrading = {}));
355
406
  var Type;
356
407
  (function (Type) {
357
408
  Type["CreateApplicant"] = "CreateApplicant";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "description": "Library for kafka event data transforming",
5
5
  "author": "Integrations <integrations@lendi.com.au>",
6
6
  "homepage": "https://bitbucket.org/lendi-dev/integrations-shared-packages#readme",
@@ -21,7 +21,7 @@
21
21
  "url": "git+ssh://git@bitbucket.org/lendi-dev/integrations-shared-packages.git"
22
22
  },
23
23
  "dependencies": {
24
- "@lendi/integrations-credit-protocol": "1.18.1",
24
+ "@lendi/integrations-credit-protocol": "1.18.5",
25
25
  "@lendi/integrations-protocol": "2.7.0",
26
26
  "@lendi/logging": "^1.0.0",
27
27
  "clean-deep": "^3.4.0",