@lendi/integrations-transform 1.6.7-beta.3 → 1.6.7-beta.4

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.
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "definitions": {
3
- "payload": {
3
+ "Payload": {
4
4
  "type": "object",
5
5
  "oneOf": [
6
6
  {
7
- "$ref": "#/definitions/applicantDefinition"
7
+ "$ref": "#/definitions/createApplicantDefinition"
8
8
  },
9
9
  {
10
- "$ref": "#/definitions/deleteApplicantDefinition"
10
+ "$ref": "#/definitions/updateApplicantDefinition"
11
11
  }
12
12
  ]
13
13
  },
@@ -29,7 +29,7 @@
29
29
  "description": "The metadata of the applicant",
30
30
  "properties": {
31
31
  "actionedBy": {
32
- "description": "uuid of user who made the action (create/update/delete)",
32
+ "description": "uuid of user who made the action (create/update)",
33
33
  "type": "string"
34
34
  },
35
35
  "actionedByRole": {
@@ -49,8 +49,7 @@
49
49
  },
50
50
  "age": {
51
51
  "type": "number",
52
- "minimum": 0,
53
- "maximum": 100
52
+ "minimum": 0
54
53
  },
55
54
  "isAddedOnThisApplicant": {
56
55
  "type": "boolean",
@@ -70,7 +69,35 @@
70
69
  },
71
70
  "employmentType": {
72
71
  "enum": ["EMPLOYEE", "SELF_EMPLOYED", "UNKNOWN"],
73
- "description": "LEGACY. DO NOT USE. Historic events only - applicant's employment type. Use the employment events instead!"
72
+ "description": "applicant's employment type"
73
+ },
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"]
74
101
  },
75
102
  "isPrimaryApplicant": {
76
103
  "type": "boolean"
@@ -102,21 +129,16 @@
102
129
  "$ref": "#/definitions/dependant"
103
130
  }
104
131
  },
105
- "name": {
106
- "type": "string",
107
- "minLength": 1,
108
- "maxLength": 256
109
- },
110
132
  "firstName": {
111
- "$ref": "#/definitions/name",
133
+ "type": "string",
112
134
  "description": "customer's first name"
113
135
  },
114
136
  "middleName": {
115
- "$ref": "#/definitions/name",
137
+ "type": "string",
116
138
  "description": "customer's middle name"
117
139
  },
118
140
  "lastName": {
119
- "$ref": "#/definitions/name",
141
+ "type": "string",
120
142
  "description": "customer's last name"
121
143
  },
122
144
  "title": {
@@ -385,7 +407,7 @@
385
407
  "type": "string",
386
408
  "example": "Ohio"
387
409
  },
388
- "australianStates": {
410
+ "AustralianStates": {
389
411
  "example": "NSW",
390
412
  "type": "string",
391
413
  "enum": ["QLD", "NSW", "VIC", "WA", "SA", "TAS", "ACT", "NT"]
@@ -395,40 +417,16 @@
395
417
  "format": "date",
396
418
  "example": "2018-07-17"
397
419
  },
398
- "addressStandard": {
420
+ "AddressStandard": {
399
421
  "type": "object",
400
422
  "additionalProperties": false,
401
423
  "properties": {
402
- "buildingName": {
403
- "description": "The building name",
404
- "type": "string",
405
- "minLength": 1,
406
- "maxLength": 512
407
- },
408
- "deliveryAddress": {
409
- "description": "Postal address, usually a PO Box or Locked Bag",
410
- "type": "string",
411
- "example": "PO Box 1",
412
- "maxLength": 512
413
- },
414
- "lotSection": {
415
- "description": "The lot number",
416
- "type": "string",
417
- "minLength": 1,
418
- "maxLength": 512
419
- },
420
424
  "streetName": {
421
425
  "type": "string"
422
426
  },
423
427
  "streetNumber": {
424
428
  "type": "string"
425
429
  },
426
- "streetSuffix": {
427
- "description": "The street suffix",
428
- "type": "string",
429
- "example": "North",
430
- "maxLength": 128
431
- },
432
430
  "streetType": {
433
431
  "type": "string"
434
432
  },
@@ -445,15 +443,14 @@
445
443
  "additionalProperties": false,
446
444
  "properties": {
447
445
  "postcode": {
448
- "type": "string",
449
- "maxLength": 32
446
+ "type": "string"
450
447
  },
451
448
  "state": {
452
449
  "example": "NSW",
453
450
  "type": "string",
454
451
  "anyOf": [
455
452
  {
456
- "$ref": "#/definitions/australianStates"
453
+ "$ref": "#/definitions/AustralianStates"
457
454
  },
458
455
  {
459
456
  "$ref": "#/definitions/otherState"
@@ -470,7 +467,7 @@
470
467
  "type": "string"
471
468
  },
472
469
  "standard": {
473
- "$ref": "#/definitions/addressStandard"
470
+ "$ref": "#/definitions/AddressStandard"
474
471
  }
475
472
  }
476
473
  },
@@ -529,13 +526,13 @@
529
526
  "type": "string",
530
527
  "description": "applicant's mobile number formatted in +611234567890"
531
528
  },
529
+ "previousAddresses": {
530
+ "$ref": "#/definitions/previousAddresses"
531
+ },
532
532
  "postSettlementAddress": {
533
533
  "$ref": "#/definitions/address",
534
534
  "description": "applicant's post settlement address being captured as part of funnels 5 (post product select)"
535
535
  },
536
- "previousAddresses": {
537
- "$ref": "#/definitions/previousAddresses"
538
- },
539
536
  "emailAddress": {
540
537
  "type": "string",
541
538
  "description": "The applicant email"
@@ -546,72 +543,19 @@
546
543
  "enum": ["ACCEPTED", "PENDING", "CANCELLED", "EXPIRED"],
547
544
  "description": "different invitation statuses an applicant can have"
548
545
  },
546
+ "entity": {
547
+ "enum": ["PERSON", "COMPANY", "TRUST"],
548
+ "description": "applicant's entity. For a person applicant this is 'PERSON'"
549
+ },
549
550
  "isFirstHomeBuyer": {
550
551
  "type": "boolean",
551
552
  "description": "Whether it's the applicants first home purchase."
552
553
  },
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
554
  "cityOfBirth": {
582
555
  "type": "string",
583
556
  "example": "Sydney"
584
557
  },
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": {
558
+ "createApplicantDefinition": {
615
559
  "type": "object",
616
560
  "additionalProperties": false,
617
561
  "properties": {
@@ -623,30 +567,34 @@
623
567
  "$ref": "#/definitions/id",
624
568
  "description": "uuid of application"
625
569
  },
570
+ "cityOfBirth": {
571
+ "$ref": "#/definitions/cityOfBirth"
572
+ },
626
573
  "customerId": {
627
574
  "$ref": "#/definitions/id",
628
575
  "description": "uuid of customer"
629
576
  },
630
- "clonedFromApplicantId": {
631
- "$ref": "#/definitions/id",
632
- "description": "uuid of source applicant"
633
- },
634
577
  "meta": {
635
578
  "$ref": "#/definitions/applicantMeta"
636
579
  },
637
- "entity": {
638
- "enum": ["PERSON"],
639
- "description": "applicant's entity. For a person applicant this is 'PERSON'"
640
- },
641
580
  "applicantType": {
642
581
  "$ref": "#/definitions/applicantType"
643
582
  },
644
583
  "creditStatus": {
645
584
  "$ref": "#/definitions/creditStatus"
646
585
  },
586
+ "entity": {
587
+ "$ref": "#/definitions/entity"
588
+ },
647
589
  "employmentType": {
648
590
  "$ref": "#/definitions/employmentType"
649
591
  },
592
+ "guarantorRelationshipToBorrower": {
593
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerDefinition"
594
+ },
595
+ "isFirstHomeBuyer": {
596
+ "$ref": "#/definitions/isFirstHomeBuyer"
597
+ },
650
598
  "isPrimaryApplicant": {
651
599
  "$ref": "#/definitions/isPrimaryApplicant"
652
600
  },
@@ -691,112 +639,12 @@
691
639
  },
692
640
  "invitationStatus": {
693
641
  "$ref": "#/definitions/invitationStatus"
694
- },
695
- "countryOfBirth": {
696
- "$ref": "#/definitions/countries"
697
- },
698
- "cityOfBirth": {
699
- "$ref": "#/definitions/cityOfBirth"
700
- },
701
- "citizenship": {
702
- "$ref": "#/definitions/countries"
703
- },
704
- "mothersMaidenName": {
705
- "type": "string",
706
- "description": "Mothers Maiden Name"
707
- },
708
- "isFirstHomeBuyer": {
709
- "$ref": "#/definitions/isFirstHomeBuyer"
710
- },
711
- "guarantorRelationshipToBorrower": {
712
- "$ref": "#/definitions/guarantorRelationshipToBorrowerDefinition"
713
642
  }
714
643
  },
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
- ]
644
+ "required": ["id", "applicationId", "customerId", "isPrimaryApplicant", "meta"],
645
+ "description": "create applicant payload"
729
646
  },
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"
773
- }
774
- },
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": {
647
+ "updateApplicantDefinition": {
800
648
  "type": "object",
801
649
  "additionalProperties": false,
802
650
  "properties": {
@@ -808,222 +656,91 @@
808
656
  "$ref": "#/definitions/id",
809
657
  "description": "uuid of application"
810
658
  },
659
+ "customerId": {
660
+ "$ref": "#/definitions/id",
661
+ "description": "uuid of customer"
662
+ },
811
663
  "meta": {
812
664
  "$ref": "#/definitions/applicantMeta"
813
665
  },
814
666
  "applicantType": {
815
667
  "$ref": "#/definitions/applicantType"
816
668
  },
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"
669
+ "creditStatus": {
670
+ "$ref": "#/definitions/creditStatus"
895
671
  },
896
- "termLoanNeed100PercentFundingDetails": {
897
- "$ref": "#/definitions/description"
672
+ "employmentType": {
673
+ "$ref": "#/definitions/employmentType"
898
674
  },
899
- "isActingAsFranchise": {
900
- "$ref": "#/definitions/yesNoIntend"
675
+ "guarantorRelationshipToBorrower": {
676
+ "$ref": "#/definitions/guarantorRelationshipToBorrowerDefinition"
901
677
  },
902
- "actingAsFranchiseDetails": {
903
- "$ref": "#/definitions/description"
678
+ "isPrimaryApplicant": {
679
+ "$ref": "#/definitions/isPrimaryApplicant"
904
680
  },
905
- "isWorkingInImportExport": {
906
- "$ref": "#/definitions/yesNoIntend"
681
+ "hasSelfEmploymentProof": {
682
+ "$ref": "#/definitions/hasSelfEmploymentProof"
907
683
  },
908
- "workingInImportExportDetails": {
909
- "$ref": "#/definitions/description"
684
+ "totalIncomeEstimate": {
685
+ "$ref": "#/definitions/totalIncomeEstimate"
910
686
  },
911
- "isInvestingInProperty": {
912
- "$ref": "#/definitions/yesNoIntend"
687
+ "dateOfBirth": {
688
+ "$ref": "#/definitions/dateOfBirth"
913
689
  },
914
- "investingInPropertyDetails": {
915
- "$ref": "#/definitions/description"
690
+ "gender": {
691
+ "$ref": "#/definitions/gender"
916
692
  },
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"
693
+ "maritalStatus": {
694
+ "$ref": "#/definitions/maritalStatus"
920
695
  },
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?"
696
+ "maritalDetails": {
697
+ "$ref": "#/definitions/applicantKeyObject"
924
698
  },
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?"
699
+ "residencyStatus": {
700
+ "$ref": "#/definitions/residencyStatus"
928
701
  },
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?"
702
+ "dependants": {
703
+ "$ref": "#/definitions/dependants"
932
704
  },
933
- "isUSCitizenOrResident": {
934
- "type": "boolean",
935
- "description": "Is the applicant a US citizen or resident for US tax purposes?"
705
+ "firstName": {
706
+ "$ref": "#/definitions/firstName"
936
707
  },
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"
708
+ "middleName": {
709
+ "$ref": "#/definitions/middleName"
951
710
  },
952
- {
953
- "$ref": "#/definitions/companyApplicantDefinition"
711
+ "lastName": {
712
+ "$ref": "#/definitions/lastName"
954
713
  },
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"
714
+ "title": {
715
+ "$ref": "#/definitions/title"
971
716
  },
972
- "applicationId": {
973
- "$ref": "#/definitions/id",
974
- "description": "uuid of application"
717
+ "contact": {
718
+ "$ref": "#/definitions/contact"
975
719
  },
976
- "meta": {
977
- "$ref": "#/definitions/applicantMeta"
720
+ "invitationStatus": {
721
+ "$ref": "#/definitions/invitationStatus"
978
722
  }
979
723
  },
980
- "required": ["id", "applicationId", "meta"]
724
+ "required": ["id", "applicationId", "customerId", "meta"],
725
+ "description": "update applicant payload. Entity shouldn't be updated."
981
726
  }
982
727
  },
983
728
  "type": "object",
984
- "title": "The applicant-person/company/trust event schema",
985
- "description": "Create, update or delete. UpdatePrimaryApplicant is DEPRECATED",
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"]
1003
- },
1004
- {
1005
- "if": {
1006
- "properties": { "type": { "const": "DeleteApplicant" } }
1007
- },
1008
- "then": {
1009
- "properties": { "payload": { "$ref": "#/definitions/deleteApplicantDefinition" } }
1010
- }
729
+ "title": "The applicant event schema",
730
+ "description": "Create or update.",
731
+ "additionalProperties": false,
732
+ "properties": {
733
+ "version": {
734
+ "type": "string",
735
+ "description": "schema version"
1011
736
  },
1012
- {
1013
- "if": {
1014
- "properties": { "type": { "const": "UpdateApplicant" } }
1015
- },
1016
- "then": {
1017
- "properties": { "payload": { "$ref": "#/definitions/applicantDefinition" } }
1018
- }
737
+ "type": {
738
+ "type": "string",
739
+ "enum": ["UpdateApplicant", "CreateApplicant"]
1019
740
  },
1020
- {
1021
- "if": {
1022
- "properties": { "type": { "const": "CreateApplicant" } }
1023
- },
1024
- "then": {
1025
- "properties": { "payload": { "$ref": "#/definitions/applicantDefinition" } }
1026
- }
741
+ "payload": {
742
+ "$ref": "#/definitions/Payload"
1027
743
  }
1028
- ]
744
+ },
745
+ "required": ["version", "payload", "type"]
1029
746
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Create, update or delete. UpdatePrimaryApplicant is DEPRECATED
2
+ * Create or update.
3
3
  */
4
4
  export interface PublicApplicant {
5
5
  payload: Payload;
@@ -10,146 +10,103 @@ export interface PublicApplicant {
10
10
  version: string;
11
11
  }
12
12
  /**
13
- * trust payload.
13
+ * create applicant payload
14
14
  *
15
- * company payload.
16
- *
17
- * applicant payload.
15
+ * update applicant payload. Entity shouldn't be updated.
18
16
  */
19
17
  export interface Payload {
20
- abn?: string;
21
- acn?: string;
22
- actingAsFranchiseDetails?: string;
23
18
  applicantType?: ApplicantType;
24
19
  /**
25
20
  * uuid of application
26
21
  */
27
22
  applicationId: string;
28
- branch?: string;
29
- citizenship?: Countries;
30
23
  cityOfBirth?: string;
31
- /**
32
- * uuid of source applicant
33
- */
34
- clonedFromApplicantId?: string;
35
- companyName?: string;
36
- companyStructure?: CompanyStructure;
37
- companyType?: CompanyType;
38
24
  contact?: Contact;
39
- countryOfBirth?: Countries;
40
25
  creditStatus?: CreditStatus;
41
- currentLender?: string;
42
26
  /**
43
27
  * uuid of customer
44
28
  */
45
- customerId?: string;
29
+ customerId: string;
46
30
  dateOfBirth?: string;
47
31
  dependants?: Dependant[];
48
- /**
49
- * 100% funding required for Term Loans
50
- */
51
- doesTermLoanNeed100PercentFunding?: boolean;
52
32
  employmentType?: EmploymentType;
53
- /**
54
- * applicant's entity. For a trust applicant this is 'TRUST'
55
- *
56
- * applicant's entity. For a company applicant this is 'COMPANY'
57
- *
58
- * applicant's entity. For a person applicant this is 'PERSON'
59
- */
60
33
  entity?: Entity;
61
34
  firstName?: string;
62
35
  gender?: Gender;
63
36
  guarantorRelationshipToBorrower?: GuarantorRelationshipToBorrowerDefinition;
64
- /**
65
- * Has the applicant had any late payments, loan arrears or adverse credit history such as
66
- * current or prior defaults or bankruptcies?
67
- */
68
- hadLatePaymentsOrArrearsOrAdverseCreditHistory?: boolean;
69
- /**
70
- * Have you had any difficulty in meeting your existing loan repayments, or had any
71
- * financial judgments or legal proceedings, in the past two years?
72
- */
73
- hadRepaymentDifficultyOrLegalProceedings?: boolean;
74
- /**
75
- * The applicant has not been over the credit limit, in arrears or in hardship in relation
76
- * to any existing credit or other fixed expenses
77
- */
78
- hasGoodConduct?: boolean;
79
- /**
80
- * Company doing more than 25% of business with one customer or supplier
81
- */
82
- hasMoreThan25PercentBusinessWithOneCustomer?: boolean;
83
- hasOutstandingTax?: boolean;
84
- /**
85
- * Have you or a company with which you are associated had any past or current debts that
86
- * were or are in default of the payment arrangement?
87
- */
88
- hasPastOrCurrentDebts?: boolean;
89
37
  hasSelfEmploymentProof?: boolean;
90
38
  /**
91
39
  * uuid of applicant
92
40
  */
93
41
  id: string;
94
- industryCode?: string;
95
- investingInPropertyDetails?: string;
96
42
  invitationStatus?: InvitationStatus;
97
- isActingAsFranchise?: YesNoIntend;
98
- isCommercialRelationship?: boolean;
99
- isDiversified?: boolean;
100
43
  isFirstHomeBuyer?: boolean;
101
- isInvestingInProperty?: YesNoIntend;
102
- isPassiveEntity?: boolean;
103
44
  isPrimaryApplicant?: boolean;
104
- /**
105
- * Is the principal place of business leased
106
- */
107
- isPrincipalPlaceOfBusinessLeased?: boolean;
108
- /**
109
- * Is the applicant a US citizen or resident for US tax purposes?
110
- */
111
- isUSCitizenOrResident?: boolean;
112
- isWorkingInImportExport?: YesNoIntend;
113
45
  lastName?: string;
114
- legalEntitiesInGroup?: number;
115
- legalEntitiesWithCurrentLender?: number;
116
- mailingAddress?: Address;
117
46
  maritalDetails?: ApplicantKeyObject;
118
47
  maritalStatus?: MaritalStatus;
119
48
  meta: ApplicantMeta;
120
49
  middleName?: string;
121
- monthsWithCurrentLender?: number;
122
- moreThan25PercentBusinessWithOneCustomerDetails?: string;
123
- /**
124
- * Mothers Maiden Name
125
- */
126
- mothersMaidenName?: string;
127
- outstandingTaxDetails?: string;
128
- principalPlaceOfBusinessLeasedDetails?: string;
129
- registeredAddress?: Address;
130
- registeredCountry?: Countries;
131
- registeredDate?: string;
132
- registeredState?: AustralianStates;
133
50
  residencyStatus?: ResidencyStatus;
134
- termLoanNeed100PercentFundingDetails?: string;
135
51
  title?: Title;
136
52
  totalIncomeEstimate?: number;
137
- trustName?: string;
138
- trustType?: TrustType;
139
- /**
140
- * Have you been: bankrupt or insolvent, petitioned or aware of anyone petitioning you for
141
- * bankruptcy, advised to seek bankruptcy, or associated with a company that was or
142
- * threatened to be placed into administration?
143
- */
144
- wasBankruptOrInsolvent?: boolean;
145
- workingInImportExportDetails?: string;
146
- yearsOfTrading?: YearsOfTrading;
147
53
  }
148
54
  export declare enum ApplicantType {
149
55
  Borrower = "BORROWER",
150
56
  BorrowerAndGuarantor = "BORROWER_AND_GUARANTOR",
151
57
  Guarantor = "GUARANTOR"
152
58
  }
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
+ }
153
110
  export declare enum Countries {
154
111
  Afghanistan = "Afghanistan",
155
112
  Albania = "Albania",
@@ -391,89 +348,10 @@ export declare enum Countries {
391
348
  Zambia = "Zambia",
392
349
  Zimbabwe = "Zimbabwe"
393
350
  }
394
- export declare enum CompanyStructure {
395
- Corporation = "CORPORATION",
396
- Partnership = "PARTNERSHIP",
397
- SoleTrader = "SOLE_TRADER",
398
- Trust = "TRUST"
399
- }
400
- export declare enum CompanyType {
401
- Incorporated = "INCORPORATED",
402
- Ltd = "LTD",
403
- Nl = "NL",
404
- PtyLtd = "PTY_LTD"
405
- }
406
- export interface Contact {
407
- currentAddress?: CommonAddressProperties;
408
- /**
409
- * The applicant email
410
- */
411
- emailAddress?: string;
412
- /**
413
- * applicant's mailing address being captured as part of funnels 5 (post product select)
414
- */
415
- mailingAddress?: Address;
416
- /**
417
- * applicant's mobile number formatted in +611234567890
418
- */
419
- mobileNumber?: string;
420
- /**
421
- * applicant's post settlement address being captured as part of funnels 5 (post product
422
- * select)
423
- */
424
- postSettlementAddress?: Address;
425
- previousAddresses?: PreviousAddress[];
426
- }
427
- export interface CommonAddressProperties {
428
- externalId?: string;
429
- housingStatus?: HousingStatusList;
430
- residentialAddress?: Address;
431
- startDate?: string;
432
- }
433
- export declare enum HousingStatusList {
434
- Boarding = "Boarding",
435
- Caravan = "Caravan",
436
- Other = "Other",
437
- OwnHome = "Own Home",
438
- OwnHomeMortgage = "Own Home Mortgage",
439
- Renting = "Renting",
440
- SuppliedByEmployer = "Supplied by Employer",
441
- WithParents = "With Parents"
442
- }
443
- /**
444
- * applicant's mailing address being captured as part of funnels 5 (post product select)
445
- *
446
- * applicant's post settlement address being captured as part of funnels 5 (post product
447
- * select)
448
- */
449
- export interface Address {
450
- city?: string;
451
- country?: Countries;
452
- formatted?: string;
453
- postcode?: string;
454
- standard?: AddressStandard;
455
- state?: string;
456
- }
457
351
  export interface AddressStandard {
458
- /**
459
- * The building name
460
- */
461
- buildingName?: string;
462
- /**
463
- * Postal address, usually a PO Box or Locked Bag
464
- */
465
- deliveryAddress?: string;
466
352
  level?: string;
467
- /**
468
- * The lot number
469
- */
470
- lotSection?: string;
471
353
  streetName?: string;
472
354
  streetNumber?: string;
473
- /**
474
- * The street suffix
475
- */
476
- streetSuffix?: string;
477
355
  streetType?: string;
478
356
  unit?: string;
479
357
  }
@@ -509,8 +387,7 @@ export interface ApplicantKeyObject {
509
387
  applicantId?: string;
510
388
  }
511
389
  /**
512
- * LEGACY. DO NOT USE. Historic events only - applicant's employment type. Use the
513
- * employment events instead!
390
+ * applicant's employment type
514
391
  */
515
392
  export declare enum EmploymentType {
516
393
  Employee = "EMPLOYEE",
@@ -518,10 +395,6 @@ export declare enum EmploymentType {
518
395
  Unknown = "UNKNOWN"
519
396
  }
520
397
  /**
521
- * applicant's entity. For a trust applicant this is 'TRUST'
522
- *
523
- * applicant's entity. For a company applicant this is 'COMPANY'
524
- *
525
398
  * applicant's entity. For a person applicant this is 'PERSON'
526
399
  */
527
400
  export declare enum Entity {
@@ -563,11 +436,6 @@ export declare enum InvitationStatus {
563
436
  Expired = "EXPIRED",
564
437
  Pending = "PENDING"
565
438
  }
566
- export declare enum YesNoIntend {
567
- Intend = "Intend",
568
- No = "No",
569
- Yes = "Yes"
570
- }
571
439
  export declare enum MaritalStatus {
572
440
  DeFacto = "DE_FACTO",
573
441
  Divorced = "DIVORCED",
@@ -580,7 +448,7 @@ export declare enum MaritalStatus {
580
448
  */
581
449
  export interface ApplicantMeta {
582
450
  /**
583
- * uuid of user who made the action (create/update/delete)
451
+ * uuid of user who made the action (create/update)
584
452
  */
585
453
  actionedBy: string;
586
454
  /**
@@ -595,16 +463,6 @@ export declare enum ActionedByRole {
595
463
  Customer = "customer",
596
464
  Team = "team"
597
465
  }
598
- export declare enum AustralianStates {
599
- Act = "ACT",
600
- NT = "NT",
601
- Nsw = "NSW",
602
- Qld = "QLD",
603
- Sa = "SA",
604
- Tas = "TAS",
605
- Vic = "VIC",
606
- Wa = "WA"
607
- }
608
466
  export declare enum ResidencyStatus {
609
467
  AustralianCitizen = "AUSTRALIAN_CITIZEN",
610
468
  PermanentResident = "PERMANENT_RESIDENT",
@@ -619,26 +477,7 @@ export declare enum Title {
619
477
  Mrs = "MRS",
620
478
  Unknown = "UNKNOWN"
621
479
  }
622
- export declare enum TrustType {
623
- CashManagementTrust = "CASH_MANAGEMENT_TRUST",
624
- DiscretionaryTrust = "DISCRETIONARY_TRUST",
625
- Fixed = "FIXED",
626
- Hybrid = "HYBRID",
627
- Other = "OTHER",
628
- SuperannuationTrusts = "SUPERANNUATION_TRUSTS",
629
- Unit = "UNIT"
630
- }
631
- export declare enum YearsOfTrading {
632
- The1 = "1",
633
- The10 = ">10",
634
- The2 = "2",
635
- The3 = "3",
636
- The4 = "4",
637
- The5 = "5",
638
- The510 = "5-10"
639
- }
640
480
  export declare enum Type {
641
481
  CreateApplicant = "CreateApplicant",
642
- DeleteApplicant = "DeleteApplicant",
643
482
  UpdateApplicant = "UpdateApplicant"
644
483
  }
@@ -1,12 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
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;
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;
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 = {}));
10
21
  var Countries;
11
22
  (function (Countries) {
12
23
  Countries["Afghanistan"] = "Afghanistan";
@@ -249,31 +260,6 @@ var Countries;
249
260
  Countries["Zambia"] = "Zambia";
250
261
  Countries["Zimbabwe"] = "Zimbabwe";
251
262
  })(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 = {}));
277
263
  /**
278
264
  * current credit status of the applicant (Customer declared value)
279
265
  */
@@ -285,8 +271,7 @@ var CreditStatus;
285
271
  CreditStatus["Unknown"] = "UNKNOWN";
286
272
  })(CreditStatus = exports.CreditStatus || (exports.CreditStatus = {}));
287
273
  /**
288
- * LEGACY. DO NOT USE. Historic events only - applicant's employment type. Use the
289
- * employment events instead!
274
+ * applicant's employment type
290
275
  */
291
276
  var EmploymentType;
292
277
  (function (EmploymentType) {
@@ -295,10 +280,6 @@ var EmploymentType;
295
280
  EmploymentType["Unknown"] = "UNKNOWN";
296
281
  })(EmploymentType = exports.EmploymentType || (exports.EmploymentType = {}));
297
282
  /**
298
- * applicant's entity. For a trust applicant this is 'TRUST'
299
- *
300
- * applicant's entity. For a company applicant this is 'COMPANY'
301
- *
302
283
  * applicant's entity. For a person applicant this is 'PERSON'
303
284
  */
304
285
  var Entity;
@@ -339,12 +320,6 @@ var InvitationStatus;
339
320
  InvitationStatus["Expired"] = "EXPIRED";
340
321
  InvitationStatus["Pending"] = "PENDING";
341
322
  })(InvitationStatus = exports.InvitationStatus || (exports.InvitationStatus = {}));
342
- var YesNoIntend;
343
- (function (YesNoIntend) {
344
- YesNoIntend["Intend"] = "Intend";
345
- YesNoIntend["No"] = "No";
346
- YesNoIntend["Yes"] = "Yes";
347
- })(YesNoIntend = exports.YesNoIntend || (exports.YesNoIntend = {}));
348
323
  var MaritalStatus;
349
324
  (function (MaritalStatus) {
350
325
  MaritalStatus["DeFacto"] = "DE_FACTO";
@@ -361,17 +336,6 @@ var ActionedByRole;
361
336
  ActionedByRole["Customer"] = "customer";
362
337
  ActionedByRole["Team"] = "team";
363
338
  })(ActionedByRole = exports.ActionedByRole || (exports.ActionedByRole = {}));
364
- var AustralianStates;
365
- (function (AustralianStates) {
366
- AustralianStates["Act"] = "ACT";
367
- AustralianStates["NT"] = "NT";
368
- AustralianStates["Nsw"] = "NSW";
369
- AustralianStates["Qld"] = "QLD";
370
- AustralianStates["Sa"] = "SA";
371
- AustralianStates["Tas"] = "TAS";
372
- AustralianStates["Vic"] = "VIC";
373
- AustralianStates["Wa"] = "WA";
374
- })(AustralianStates = exports.AustralianStates || (exports.AustralianStates = {}));
375
339
  var ResidencyStatus;
376
340
  (function (ResidencyStatus) {
377
341
  ResidencyStatus["AustralianCitizen"] = "AUSTRALIAN_CITIZEN";
@@ -388,29 +352,8 @@ var Title;
388
352
  Title["Mrs"] = "MRS";
389
353
  Title["Unknown"] = "UNKNOWN";
390
354
  })(Title = exports.Title || (exports.Title = {}));
391
- var TrustType;
392
- (function (TrustType) {
393
- TrustType["CashManagementTrust"] = "CASH_MANAGEMENT_TRUST";
394
- TrustType["DiscretionaryTrust"] = "DISCRETIONARY_TRUST";
395
- TrustType["Fixed"] = "FIXED";
396
- TrustType["Hybrid"] = "HYBRID";
397
- TrustType["Other"] = "OTHER";
398
- TrustType["SuperannuationTrusts"] = "SUPERANNUATION_TRUSTS";
399
- TrustType["Unit"] = "UNIT";
400
- })(TrustType = exports.TrustType || (exports.TrustType = {}));
401
- var YearsOfTrading;
402
- (function (YearsOfTrading) {
403
- YearsOfTrading["The1"] = "1";
404
- YearsOfTrading["The10"] = ">10";
405
- YearsOfTrading["The2"] = "2";
406
- YearsOfTrading["The3"] = "3";
407
- YearsOfTrading["The4"] = "4";
408
- YearsOfTrading["The5"] = "5";
409
- YearsOfTrading["The510"] = "5-10";
410
- })(YearsOfTrading = exports.YearsOfTrading || (exports.YearsOfTrading = {}));
411
355
  var Type;
412
356
  (function (Type) {
413
357
  Type["CreateApplicant"] = "CreateApplicant";
414
- Type["DeleteApplicant"] = "DeleteApplicant";
415
358
  Type["UpdateApplicant"] = "UpdateApplicant";
416
359
  })(Type = exports.Type || (exports.Type = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lendi/integrations-transform",
3
- "version": "1.6.7-beta.3",
3
+ "version": "1.6.7-beta.4",
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",