@lendi/integrations-transform 1.6.6 → 1.6.7-beta.0
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/lib/schemas/public-applicant-event.json +416 -70
- package/lib/schemas/public-application-event.json +1 -1
- package/lib/transform-events/transform-applicant.d.ts +2 -32
- package/lib/transform-events/transform-applicant.js +84 -132
- package/lib/transform-events/transform-application.d.ts +6 -0
- package/lib/transform-events/transform-application.js +6 -0
- package/lib/types/enum-mappings/applicant-gender.d.ts +6 -0
- package/lib/types/enum-mappings/applicant-gender.js +11 -0
- package/lib/types/enum-mappings/applicant-type.d.ts +6 -0
- package/lib/types/enum-mappings/applicant-type.js +10 -0
- package/lib/types/events/public-applicant.d.ts +144 -5
- package/lib/types/events/public-applicant.js +60 -2
- package/lib/types/events/public-application.d.ts +1 -0
- package/lib/types/events/public-application.js +1 -0
- package/lib/types/partial-application.d.ts +1 -1
- package/lib/update-application/remove-ids-not-required.d.ts +1 -11
- package/lib/update-application/remove-ids-not-required.js +18 -9
- package/lib/utils/errors.d.ts +28 -0
- package/lib/utils/errors.js +43 -0
- package/package.json +3 -3
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"definitions": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"payload": {
|
|
4
|
+
"type": "object",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"$ref": "#/definitions/applicantDefinition"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"$ref": "#/definitions/deleteApplicantDefinition"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
5
13
|
},
|
|
6
14
|
"id": {
|
|
7
15
|
"type": "string",
|
|
@@ -41,7 +49,8 @@
|
|
|
41
49
|
},
|
|
42
50
|
"age": {
|
|
43
51
|
"type": "number",
|
|
44
|
-
"minimum": 0
|
|
52
|
+
"minimum": 0,
|
|
53
|
+
"maximum": 100
|
|
45
54
|
},
|
|
46
55
|
"isAddedOnThisApplicant": {
|
|
47
56
|
"type": "boolean",
|
|
@@ -61,35 +70,7 @@
|
|
|
61
70
|
},
|
|
62
71
|
"employmentType": {
|
|
63
72
|
"enum": ["EMPLOYEE", "SELF_EMPLOYED", "UNKNOWN"],
|
|
64
|
-
"description": "applicant's employment type"
|
|
65
|
-
},
|
|
66
|
-
"guarantorRelationshipToBorrowerApplicantId": {
|
|
67
|
-
"$ref": "#/definitions/id",
|
|
68
|
-
"description": "Applicant Id of borrower that has relationship with guarantor."
|
|
69
|
-
},
|
|
70
|
-
"guarantorRelationshipToBorrowerType": {
|
|
71
|
-
"enum": ["Father", "Mother", "Spouse", "Brother", "Sister", "Son", "Daughter", "Other Relative", "Other"],
|
|
72
|
-
"description": "The relationship between borrower and guarantor."
|
|
73
|
-
},
|
|
74
|
-
"guarantorRelationshipToBorrowerTypeOther": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"description": "Description of relationship between borrower and guarantor when other."
|
|
77
|
-
},
|
|
78
|
-
"guarantorRelationshipToBorrowerDefinition": {
|
|
79
|
-
"type": "object",
|
|
80
|
-
"additionalProperties": false,
|
|
81
|
-
"properties": {
|
|
82
|
-
"applicantId": {
|
|
83
|
-
"$ref": "#/definitions/guarantorRelationshipToBorrowerApplicantId"
|
|
84
|
-
},
|
|
85
|
-
"type": {
|
|
86
|
-
"$ref": "#/definitions/guarantorRelationshipToBorrowerType"
|
|
87
|
-
},
|
|
88
|
-
"typeOther": {
|
|
89
|
-
"$ref": "#/definitions/guarantorRelationshipToBorrowerTypeOther"
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
"required": ["applicantId", "type"]
|
|
73
|
+
"description": "LEGACY. DO NOT USE. Historic events only - applicant's employment type. Use the employment events instead!"
|
|
93
74
|
},
|
|
94
75
|
"isPrimaryApplicant": {
|
|
95
76
|
"type": "boolean"
|
|
@@ -121,16 +102,21 @@
|
|
|
121
102
|
"$ref": "#/definitions/dependant"
|
|
122
103
|
}
|
|
123
104
|
},
|
|
124
|
-
"
|
|
105
|
+
"name": {
|
|
125
106
|
"type": "string",
|
|
107
|
+
"minLength": 1,
|
|
108
|
+
"maxLength": 256
|
|
109
|
+
},
|
|
110
|
+
"firstName": {
|
|
111
|
+
"$ref": "#/definitions/name",
|
|
126
112
|
"description": "customer's first name"
|
|
127
113
|
},
|
|
128
114
|
"middleName": {
|
|
129
|
-
"
|
|
115
|
+
"$ref": "#/definitions/name",
|
|
130
116
|
"description": "customer's middle name"
|
|
131
117
|
},
|
|
132
118
|
"lastName": {
|
|
133
|
-
"
|
|
119
|
+
"$ref": "#/definitions/name",
|
|
134
120
|
"description": "customer's last name"
|
|
135
121
|
},
|
|
136
122
|
"title": {
|
|
@@ -399,7 +385,7 @@
|
|
|
399
385
|
"type": "string",
|
|
400
386
|
"example": "Ohio"
|
|
401
387
|
},
|
|
402
|
-
"
|
|
388
|
+
"australianStates": {
|
|
403
389
|
"example": "NSW",
|
|
404
390
|
"type": "string",
|
|
405
391
|
"enum": ["QLD", "NSW", "VIC", "WA", "SA", "TAS", "ACT", "NT"]
|
|
@@ -409,22 +395,27 @@
|
|
|
409
395
|
"format": "date",
|
|
410
396
|
"example": "2018-07-17"
|
|
411
397
|
},
|
|
412
|
-
"
|
|
398
|
+
"addressStandard": {
|
|
413
399
|
"type": "object",
|
|
414
400
|
"additionalProperties": false,
|
|
415
401
|
"properties": {
|
|
416
402
|
"buildingName": {
|
|
417
403
|
"description": "The building name",
|
|
418
|
-
"type": "string"
|
|
404
|
+
"type": "string",
|
|
405
|
+
"minLength": 1,
|
|
406
|
+
"maxLength": 512
|
|
419
407
|
},
|
|
420
408
|
"deliveryAddress": {
|
|
421
409
|
"description": "Postal address, usually a PO Box or Locked Bag",
|
|
422
410
|
"type": "string",
|
|
423
|
-
"example": "PO Box 1"
|
|
411
|
+
"example": "PO Box 1",
|
|
412
|
+
"maxLength": 512
|
|
424
413
|
},
|
|
425
414
|
"lotSection": {
|
|
426
415
|
"description": "The lot number",
|
|
427
|
-
"type": "string"
|
|
416
|
+
"type": "string",
|
|
417
|
+
"minLength": 1,
|
|
418
|
+
"maxLength": 512
|
|
428
419
|
},
|
|
429
420
|
"streetName": {
|
|
430
421
|
"type": "string"
|
|
@@ -435,7 +426,8 @@
|
|
|
435
426
|
"streetSuffix": {
|
|
436
427
|
"description": "The street suffix",
|
|
437
428
|
"type": "string",
|
|
438
|
-
"example": "North"
|
|
429
|
+
"example": "North",
|
|
430
|
+
"maxLength": 128
|
|
439
431
|
},
|
|
440
432
|
"streetType": {
|
|
441
433
|
"type": "string"
|
|
@@ -453,14 +445,15 @@
|
|
|
453
445
|
"additionalProperties": false,
|
|
454
446
|
"properties": {
|
|
455
447
|
"postcode": {
|
|
456
|
-
"type": "string"
|
|
448
|
+
"type": "string",
|
|
449
|
+
"maxLength": 32
|
|
457
450
|
},
|
|
458
451
|
"state": {
|
|
459
452
|
"example": "NSW",
|
|
460
453
|
"type": "string",
|
|
461
454
|
"anyOf": [
|
|
462
455
|
{
|
|
463
|
-
"$ref": "#/definitions/
|
|
456
|
+
"$ref": "#/definitions/australianStates"
|
|
464
457
|
},
|
|
465
458
|
{
|
|
466
459
|
"$ref": "#/definitions/otherState"
|
|
@@ -477,7 +470,7 @@
|
|
|
477
470
|
"type": "string"
|
|
478
471
|
},
|
|
479
472
|
"standard": {
|
|
480
|
-
"$ref": "#/definitions/
|
|
473
|
+
"$ref": "#/definitions/addressStandard"
|
|
481
474
|
}
|
|
482
475
|
}
|
|
483
476
|
},
|
|
@@ -553,15 +546,72 @@
|
|
|
553
546
|
"enum": ["ACCEPTED", "PENDING", "CANCELLED", "EXPIRED"],
|
|
554
547
|
"description": "different invitation statuses an applicant can have"
|
|
555
548
|
},
|
|
556
|
-
"entity": {
|
|
557
|
-
"enum": ["PERSON", "COMPANY"],
|
|
558
|
-
"description": "applicant's entity. For a person applicant this is 'PERSON'"
|
|
559
|
-
},
|
|
560
549
|
"isFirstHomeBuyer": {
|
|
561
550
|
"type": "boolean",
|
|
562
551
|
"description": "Whether it's the applicants first home purchase."
|
|
563
552
|
},
|
|
564
|
-
"
|
|
553
|
+
"guarantorRelationshipToBorrowerApplicantId": {
|
|
554
|
+
"$ref": "#/definitions/id",
|
|
555
|
+
"description": "Applicant Id of borrower that has relationship with guarantor."
|
|
556
|
+
},
|
|
557
|
+
"guarantorRelationshipToBorrowerType": {
|
|
558
|
+
"enum": ["Father", "Mother", "Spouse", "Brother", "Sister", "Son", "Daughter", "Other Relative", "Other"],
|
|
559
|
+
"description": "The relationship between borrower and guarantor."
|
|
560
|
+
},
|
|
561
|
+
"guarantorRelationshipToBorrowerTypeOther": {
|
|
562
|
+
"type": "string",
|
|
563
|
+
"description": "Description of relationship between borrower and guarantor when other."
|
|
564
|
+
},
|
|
565
|
+
"guarantorRelationshipToBorrowerDefinition": {
|
|
566
|
+
"type": "object",
|
|
567
|
+
"additionalProperties": false,
|
|
568
|
+
"properties": {
|
|
569
|
+
"applicantId": {
|
|
570
|
+
"$ref": "#/definitions/guarantorRelationshipToBorrowerApplicantId"
|
|
571
|
+
},
|
|
572
|
+
"type": {
|
|
573
|
+
"$ref": "#/definitions/guarantorRelationshipToBorrowerType"
|
|
574
|
+
},
|
|
575
|
+
"typeOther": {
|
|
576
|
+
"$ref": "#/definitions/guarantorRelationshipToBorrowerTypeOther"
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"required": ["applicantId", "type"]
|
|
580
|
+
},
|
|
581
|
+
"cityOfBirth": {
|
|
582
|
+
"type": "string",
|
|
583
|
+
"example": "Sydney"
|
|
584
|
+
},
|
|
585
|
+
"industryCode": {
|
|
586
|
+
"type": "string",
|
|
587
|
+
"pattern": "^\\d{4}$",
|
|
588
|
+
"description": "ANZSIC business code lookup "
|
|
589
|
+
},
|
|
590
|
+
"isPassiveEntity": {
|
|
591
|
+
"type": "boolean",
|
|
592
|
+
"description": "If the entity's primary business activity is investing"
|
|
593
|
+
},
|
|
594
|
+
"legalEntities": {
|
|
595
|
+
"type": "integer",
|
|
596
|
+
"minimum": 0,
|
|
597
|
+
"maximum": 1000000
|
|
598
|
+
},
|
|
599
|
+
"description": {
|
|
600
|
+
"type": "string",
|
|
601
|
+
"minLength": 1,
|
|
602
|
+
"maxLength": 1024
|
|
603
|
+
},
|
|
604
|
+
"numOfMonths": {
|
|
605
|
+
"type": "integer",
|
|
606
|
+
"minimum": 1,
|
|
607
|
+
"maximum": 1200
|
|
608
|
+
},
|
|
609
|
+
"yesNoIntend": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"enum": ["Yes", "No", "Intend"]
|
|
612
|
+
},
|
|
613
|
+
|
|
614
|
+
"personApplicantDefinition": {
|
|
565
615
|
"type": "object",
|
|
566
616
|
"additionalProperties": false,
|
|
567
617
|
"properties": {
|
|
@@ -584,21 +634,19 @@
|
|
|
584
634
|
"meta": {
|
|
585
635
|
"$ref": "#/definitions/applicantMeta"
|
|
586
636
|
},
|
|
637
|
+
"entity": {
|
|
638
|
+
"enum": ["PERSON"],
|
|
639
|
+
"description": "applicant's entity. For a person applicant this is 'PERSON'"
|
|
640
|
+
},
|
|
587
641
|
"applicantType": {
|
|
588
642
|
"$ref": "#/definitions/applicantType"
|
|
589
643
|
},
|
|
590
644
|
"creditStatus": {
|
|
591
645
|
"$ref": "#/definitions/creditStatus"
|
|
592
646
|
},
|
|
593
|
-
"entity": {
|
|
594
|
-
"$ref": "#/definitions/entity"
|
|
595
|
-
},
|
|
596
647
|
"employmentType": {
|
|
597
648
|
"$ref": "#/definitions/employmentType"
|
|
598
649
|
},
|
|
599
|
-
"guarantorRelationshipToBorrower": {
|
|
600
|
-
"$ref": "#/definitions/guarantorRelationshipToBorrowerDefinition"
|
|
601
|
-
},
|
|
602
650
|
"isPrimaryApplicant": {
|
|
603
651
|
"$ref": "#/definitions/isPrimaryApplicant"
|
|
604
652
|
},
|
|
@@ -647,6 +695,9 @@
|
|
|
647
695
|
"countryOfBirth": {
|
|
648
696
|
"$ref": "#/definitions/countries"
|
|
649
697
|
},
|
|
698
|
+
"cityOfBirth": {
|
|
699
|
+
"$ref": "#/definitions/cityOfBirth"
|
|
700
|
+
},
|
|
650
701
|
"citizenship": {
|
|
651
702
|
"$ref": "#/definitions/countries"
|
|
652
703
|
},
|
|
@@ -656,28 +707,323 @@
|
|
|
656
707
|
},
|
|
657
708
|
"isFirstHomeBuyer": {
|
|
658
709
|
"$ref": "#/definitions/isFirstHomeBuyer"
|
|
710
|
+
},
|
|
711
|
+
"guarantorRelationshipToBorrower": {
|
|
712
|
+
"$ref": "#/definitions/guarantorRelationshipToBorrowerDefinition"
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"required": ["id", "applicationId", "customerId", "meta", "entity", "applicantType"],
|
|
716
|
+
"description": "applicant payload."
|
|
717
|
+
},
|
|
718
|
+
|
|
719
|
+
"trustType": {
|
|
720
|
+
"enum": [
|
|
721
|
+
"CASH_MANAGEMENT_TRUST",
|
|
722
|
+
"DISCRETIONARY_TRUST",
|
|
723
|
+
"FIXED",
|
|
724
|
+
"HYBRID",
|
|
725
|
+
"SUPERANNUATION_TRUSTS",
|
|
726
|
+
"UNIT",
|
|
727
|
+
"OTHER"
|
|
728
|
+
]
|
|
729
|
+
},
|
|
730
|
+
"trustApplicantDefinition": {
|
|
731
|
+
"type": "object",
|
|
732
|
+
"additionalProperties": false,
|
|
733
|
+
"properties": {
|
|
734
|
+
"id": {
|
|
735
|
+
"$ref": "#/definitions/id"
|
|
736
|
+
},
|
|
737
|
+
"applicationId": {
|
|
738
|
+
"$ref": "#/definitions/id"
|
|
739
|
+
},
|
|
740
|
+
"meta": {
|
|
741
|
+
"$ref": "#/definitions/applicantMeta"
|
|
742
|
+
},
|
|
743
|
+
"applicantType": {
|
|
744
|
+
"$ref": "#/definitions/applicantType"
|
|
745
|
+
},
|
|
746
|
+
"entity": {
|
|
747
|
+
"enum": ["TRUST"],
|
|
748
|
+
"description": "applicant's entity. For a trust applicant this is 'TRUST'"
|
|
749
|
+
},
|
|
750
|
+
"trustName": {
|
|
751
|
+
"$ref": "#/definitions/name"
|
|
752
|
+
},
|
|
753
|
+
"trustType": {
|
|
754
|
+
"$ref": "#/definitions/trustType"
|
|
755
|
+
},
|
|
756
|
+
"registeredDate": {
|
|
757
|
+
"$ref": "#/definitions/date"
|
|
758
|
+
},
|
|
759
|
+
"registeredCountry": {
|
|
760
|
+
"$ref": "#/definitions/countries"
|
|
761
|
+
},
|
|
762
|
+
"registeredAddress": {
|
|
763
|
+
"$ref": "#/definitions/address"
|
|
764
|
+
},
|
|
765
|
+
"mailingAddress": {
|
|
766
|
+
"$ref": "#/definitions/address"
|
|
767
|
+
},
|
|
768
|
+
"industryCode": {
|
|
769
|
+
"$ref": "#/definitions/industryCode"
|
|
770
|
+
},
|
|
771
|
+
"isPassiveEntity": {
|
|
772
|
+
"$ref": "#/definitions/isPassiveEntity"
|
|
659
773
|
}
|
|
660
774
|
},
|
|
661
|
-
"required": ["id", "applicationId", "
|
|
662
|
-
"description": "
|
|
775
|
+
"required": ["id", "applicationId", "meta", "entity", "applicantType"],
|
|
776
|
+
"description": "trust payload."
|
|
777
|
+
},
|
|
778
|
+
|
|
779
|
+
"abn": {
|
|
780
|
+
"type": "string",
|
|
781
|
+
"pattern": "^\\d{11}$",
|
|
782
|
+
"description": "Company ABN Number"
|
|
783
|
+
},
|
|
784
|
+
"acn": {
|
|
785
|
+
"type": "string",
|
|
786
|
+
"pattern": "^\\d{9}$",
|
|
787
|
+
"description": "Australian Company Number"
|
|
788
|
+
},
|
|
789
|
+
"yearsOfTrading": {
|
|
790
|
+
"type": "string",
|
|
791
|
+
"enum": ["1", "2", "3", "4", "5", "5-10", ">10"]
|
|
792
|
+
},
|
|
793
|
+
"companyType": {
|
|
794
|
+
"enum": ["INCORPORATED", "LTD", "NL", "PTY_LTD"]
|
|
795
|
+
},
|
|
796
|
+
"companyStructure": {
|
|
797
|
+
"enum": ["SOLE_TRADER", "PARTNERSHIP", "CORPORATION", "TRUST"]
|
|
798
|
+
},
|
|
799
|
+
"companyApplicantDefinition": {
|
|
800
|
+
"type": "object",
|
|
801
|
+
"additionalProperties": false,
|
|
802
|
+
"properties": {
|
|
803
|
+
"id": {
|
|
804
|
+
"$ref": "#/definitions/id",
|
|
805
|
+
"description": "uuid of applicant"
|
|
806
|
+
},
|
|
807
|
+
"applicationId": {
|
|
808
|
+
"$ref": "#/definitions/id",
|
|
809
|
+
"description": "uuid of application"
|
|
810
|
+
},
|
|
811
|
+
"meta": {
|
|
812
|
+
"$ref": "#/definitions/applicantMeta"
|
|
813
|
+
},
|
|
814
|
+
"applicantType": {
|
|
815
|
+
"$ref": "#/definitions/applicantType"
|
|
816
|
+
},
|
|
817
|
+
"entity": {
|
|
818
|
+
"enum": ["COMPANY"],
|
|
819
|
+
"description": "applicant's entity. For a company applicant this is 'COMPANY'"
|
|
820
|
+
},
|
|
821
|
+
"companyName": {
|
|
822
|
+
"$ref": "#/definitions/name"
|
|
823
|
+
},
|
|
824
|
+
"companyType": {
|
|
825
|
+
"$ref": "#/definitions/companyType"
|
|
826
|
+
},
|
|
827
|
+
"companyStructure": {
|
|
828
|
+
"$ref": "#/definitions/companyStructure"
|
|
829
|
+
},
|
|
830
|
+
"industryCode": {
|
|
831
|
+
"$ref": "#/definitions/industryCode"
|
|
832
|
+
},
|
|
833
|
+
"isDiversified": {
|
|
834
|
+
"type": "boolean"
|
|
835
|
+
},
|
|
836
|
+
"legalEntitiesInGroup": {
|
|
837
|
+
"$ref": "#/definitions/legalEntities"
|
|
838
|
+
},
|
|
839
|
+
"isPassiveEntity": {
|
|
840
|
+
"$ref": "#/definitions/isPassiveEntity"
|
|
841
|
+
},
|
|
842
|
+
"isCommercialRelationship": {
|
|
843
|
+
"type": "boolean"
|
|
844
|
+
},
|
|
845
|
+
"abn": {
|
|
846
|
+
"$ref": "#/definitions/abn"
|
|
847
|
+
},
|
|
848
|
+
"acn": {
|
|
849
|
+
"$ref": "#/definitions/acn"
|
|
850
|
+
},
|
|
851
|
+
"registeredState": {
|
|
852
|
+
"$ref": "#/definitions/australianStates"
|
|
853
|
+
},
|
|
854
|
+
"registeredDate": {
|
|
855
|
+
"$ref": "#/definitions/date"
|
|
856
|
+
},
|
|
857
|
+
"yearsOfTrading": {
|
|
858
|
+
"$ref": "#/definitions/yearsOfTrading"
|
|
859
|
+
},
|
|
860
|
+
"currentLender": {
|
|
861
|
+
"$ref": "#/definitions/name"
|
|
862
|
+
},
|
|
863
|
+
"legalEntitiesWithCurrentLender": {
|
|
864
|
+
"$ref": "#/definitions/legalEntities"
|
|
865
|
+
},
|
|
866
|
+
"monthsWithCurrentLender": {
|
|
867
|
+
"$ref": "#/definitions/numOfMonths"
|
|
868
|
+
},
|
|
869
|
+
"branch": {
|
|
870
|
+
"$ref": "#/definitions/name"
|
|
871
|
+
},
|
|
872
|
+
"hasMoreThan25PercentBusinessWithOneCustomer": {
|
|
873
|
+
"type": "boolean",
|
|
874
|
+
"description": "Company doing more than 25% of business with one customer or supplier"
|
|
875
|
+
},
|
|
876
|
+
"moreThan25PercentBusinessWithOneCustomerDetails": {
|
|
877
|
+
"$ref": "#/definitions/description"
|
|
878
|
+
},
|
|
879
|
+
"hasOutstandingTax": {
|
|
880
|
+
"type": "boolean"
|
|
881
|
+
},
|
|
882
|
+
"outstandingTaxDetails": {
|
|
883
|
+
"$ref": "#/definitions/description"
|
|
884
|
+
},
|
|
885
|
+
"isPrincipalPlaceOfBusinessLeased": {
|
|
886
|
+
"type": "boolean",
|
|
887
|
+
"description": "Is the principal place of business leased"
|
|
888
|
+
},
|
|
889
|
+
"principalPlaceOfBusinessLeasedDetails": {
|
|
890
|
+
"$ref": "#/definitions/description"
|
|
891
|
+
},
|
|
892
|
+
"doesTermLoanNeed100PercentFunding": {
|
|
893
|
+
"type": "boolean",
|
|
894
|
+
"description": "100% funding required for Term Loans"
|
|
895
|
+
},
|
|
896
|
+
"termLoanNeed100PercentFundingDetails": {
|
|
897
|
+
"$ref": "#/definitions/description"
|
|
898
|
+
},
|
|
899
|
+
"isActingAsFranchise": {
|
|
900
|
+
"$ref": "#/definitions/yesNoIntend"
|
|
901
|
+
},
|
|
902
|
+
"actingAsFranchiseDetails": {
|
|
903
|
+
"$ref": "#/definitions/description"
|
|
904
|
+
},
|
|
905
|
+
"isWorkingInImportExport": {
|
|
906
|
+
"$ref": "#/definitions/yesNoIntend"
|
|
907
|
+
},
|
|
908
|
+
"workingInImportExportDetails": {
|
|
909
|
+
"$ref": "#/definitions/description"
|
|
910
|
+
},
|
|
911
|
+
"isInvestingInProperty": {
|
|
912
|
+
"$ref": "#/definitions/yesNoIntend"
|
|
913
|
+
},
|
|
914
|
+
"investingInPropertyDetails": {
|
|
915
|
+
"$ref": "#/definitions/description"
|
|
916
|
+
},
|
|
917
|
+
"hasGoodConduct": {
|
|
918
|
+
"type": "boolean",
|
|
919
|
+
"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"
|
|
920
|
+
},
|
|
921
|
+
"wasBankruptOrInsolvent": {
|
|
922
|
+
"type": "boolean",
|
|
923
|
+
"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?"
|
|
924
|
+
},
|
|
925
|
+
"hasPastOrCurrentDebts": {
|
|
926
|
+
"type": "boolean",
|
|
927
|
+
"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?"
|
|
928
|
+
},
|
|
929
|
+
"hadRepaymentDifficultyOrLegalProceedings": {
|
|
930
|
+
"type": "boolean",
|
|
931
|
+
"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?"
|
|
932
|
+
},
|
|
933
|
+
"isUSCitizenOrResident": {
|
|
934
|
+
"type": "boolean",
|
|
935
|
+
"description": "Is the applicant a US citizen or resident for US tax purposes?"
|
|
936
|
+
},
|
|
937
|
+
"hadLatePaymentsOrArrearsOrAdverseCreditHistory": {
|
|
938
|
+
"type": "boolean",
|
|
939
|
+
"description": "Has the applicant had any late payments, loan arrears or adverse credit history such as current or prior defaults or bankruptcies?"
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
"required": ["id", "applicationId", "meta", "entity", "applicantType"],
|
|
943
|
+
"description": "company payload."
|
|
944
|
+
},
|
|
945
|
+
|
|
946
|
+
"applicantDefinition": {
|
|
947
|
+
"type": "object",
|
|
948
|
+
"oneOf": [
|
|
949
|
+
{
|
|
950
|
+
"$ref": "#/definitions/trustApplicantDefinition"
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
"$ref": "#/definitions/companyApplicantDefinition"
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"$ref": "#/definitions/personApplicantDefinition"
|
|
957
|
+
}
|
|
958
|
+
],
|
|
959
|
+
"discriminator": {
|
|
960
|
+
"propertyName": "entity"
|
|
961
|
+
}
|
|
962
|
+
},
|
|
963
|
+
|
|
964
|
+
"deleteApplicantDefinition": {
|
|
965
|
+
"type": "object",
|
|
966
|
+
"additionalProperties": false,
|
|
967
|
+
"properties": {
|
|
968
|
+
"id": {
|
|
969
|
+
"type": "string",
|
|
970
|
+
"format": "uuid"
|
|
971
|
+
},
|
|
972
|
+
"applicationId": {
|
|
973
|
+
"$ref": "#/definitions/id",
|
|
974
|
+
"description": "uuid of application"
|
|
975
|
+
},
|
|
976
|
+
"meta": {
|
|
977
|
+
"$ref": "#/definitions/applicantMeta"
|
|
978
|
+
}
|
|
979
|
+
},
|
|
980
|
+
"required": ["id", "applicationId", "meta"]
|
|
663
981
|
}
|
|
664
982
|
},
|
|
665
983
|
"type": "object",
|
|
666
|
-
"title": "The applicant event schema",
|
|
984
|
+
"title": "The applicant-person/company/trust event schema",
|
|
667
985
|
"description": "Create, update or delete. UpdatePrimaryApplicant is DEPRECATED",
|
|
668
|
-
"
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
"
|
|
672
|
-
|
|
986
|
+
"allOf": [
|
|
987
|
+
{
|
|
988
|
+
"additionalProperties": false,
|
|
989
|
+
"properties": {
|
|
990
|
+
"version": {
|
|
991
|
+
"type": "string",
|
|
992
|
+
"description": "schema version"
|
|
993
|
+
},
|
|
994
|
+
"type": {
|
|
995
|
+
"type": "string",
|
|
996
|
+
"enum": ["DeleteApplicant", "UpdateApplicant", "CreateApplicant"]
|
|
997
|
+
},
|
|
998
|
+
"payload": {
|
|
999
|
+
"$ref": "#/definitions/payload"
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
"required": ["version", "payload", "type"]
|
|
673
1003
|
},
|
|
674
|
-
|
|
675
|
-
"
|
|
676
|
-
|
|
1004
|
+
{
|
|
1005
|
+
"if": {
|
|
1006
|
+
"properties": { "type": { "const": "DeleteApplicant" } }
|
|
1007
|
+
},
|
|
1008
|
+
"then": {
|
|
1009
|
+
"properties": { "payload": { "$ref": "#/definitions/deleteApplicantDefinition" } }
|
|
1010
|
+
}
|
|
677
1011
|
},
|
|
678
|
-
|
|
679
|
-
"
|
|
1012
|
+
{
|
|
1013
|
+
"if": {
|
|
1014
|
+
"properties": { "type": { "const": "UpdateApplicant" } }
|
|
1015
|
+
},
|
|
1016
|
+
"then": {
|
|
1017
|
+
"properties": { "payload": { "$ref": "#/definitions/applicantDefinition" } }
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"if": {
|
|
1022
|
+
"properties": { "type": { "const": "CreateApplicant" } }
|
|
1023
|
+
},
|
|
1024
|
+
"then": {
|
|
1025
|
+
"properties": { "payload": { "$ref": "#/definitions/applicantDefinition" } }
|
|
1026
|
+
}
|
|
680
1027
|
}
|
|
681
|
-
|
|
682
|
-
"required": ["version", "payload", "type"]
|
|
1028
|
+
]
|
|
683
1029
|
}
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"$ref": "#/definitions/hidden"
|
|
153
153
|
},
|
|
154
154
|
"brand": {
|
|
155
|
-
"enum": ["lendi", "domain", "domain variation", "lendi variation"]
|
|
155
|
+
"enum": ["lendi", "domain", "domain variation", "lendi variation", "aussie"]
|
|
156
156
|
},
|
|
157
157
|
"hasOptedInRateLock": {
|
|
158
158
|
"$ref": "#/definitions/hasOptedInRateLock"
|
|
@@ -1,34 +1,4 @@
|
|
|
1
1
|
import { YesNoList } from '@lendi/integrations-protocol/lib/types/lixi-internal-request';
|
|
2
|
-
import {
|
|
2
|
+
import { Payload as ApplicantPayload } from '../types/events/public-applicant';
|
|
3
3
|
export declare const booleanMapping: (input?: boolean) => YesNoList;
|
|
4
|
-
|
|
5
|
-
* Transforms a partial Applicant event to a partial LIXI application.
|
|
6
|
-
*
|
|
7
|
-
* @param applicant: A partial applicant.
|
|
8
|
-
* @param applicant
|
|
9
|
-
* @returns partialApplication an incomplete application.
|
|
10
|
-
*/
|
|
11
|
-
export declare function transformApplicant(applicant: ApplicantPayload): {};
|
|
12
|
-
/**
|
|
13
|
-
* Generates a LIXI contact from given contact.
|
|
14
|
-
*
|
|
15
|
-
* @param contact
|
|
16
|
-
* @param id
|
|
17
|
-
*/
|
|
18
|
-
export declare function generateContact(contact: Contact, id: string): {
|
|
19
|
-
lixiContact: {};
|
|
20
|
-
lixiAddresses: any[];
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Generate dependants
|
|
24
|
-
*
|
|
25
|
-
* @param dependants
|
|
26
|
-
* @param id
|
|
27
|
-
*/
|
|
28
|
-
export declare function generateDependants(dependants: Dependant[], id: string): {
|
|
29
|
-
'@Age': number;
|
|
30
|
-
'@UniqueID': string;
|
|
31
|
-
FinancialProvider: {
|
|
32
|
-
'@x_Party': string;
|
|
33
|
-
}[];
|
|
34
|
-
}[];
|
|
4
|
+
export declare function transformApplicant(applicant: ApplicantPayload): import("../types/recursive-partial").RecursivePartial<import("@lendi/integrations-credit-protocol/types/lixi-internal-request").InternalRequest>;
|