@felloh-org/lambda-wrapper 1.0.2 → 1.0.6

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.
Files changed (53) hide show
  1. package/cli/seed/create-schema.js +1 -1
  2. package/dist/entity/agent-data/booking/index.js +101 -4
  3. package/dist/entity/agent-data/index.js +5 -5
  4. package/dist/entity/agent-data/{customer → supplier}/index.js +4 -4
  5. package/dist/entity/agent-data/{organisation-supplier → supplier-type}/index.js +4 -4
  6. package/dist/entity/bank/account/index.js +87 -0
  7. package/dist/entity/{payout → bank}/beneficiary-organisation/index.js +8 -8
  8. package/dist/entity/{payout/beneficiary → bank/beneficiary-provider}/index.js +20 -44
  9. package/dist/entity/{payout → bank}/disbursal/index.js +1 -1
  10. package/dist/entity/{payout → bank}/index.js +2 -2
  11. package/dist/entity/index.js +2 -2
  12. package/dist/entity/{payout/beneficiary-provider → nuapay/account}/index.js +29 -24
  13. package/dist/entity/nuapay/balance/index.js +15 -16
  14. package/dist/entity/nuapay/beneficiary/index.js +60 -0
  15. package/dist/entity/nuapay/index.js +7 -1
  16. package/dist/entity/nuapay/transaction/index.js +120 -0
  17. package/dist/entity/payment/index.js +7 -1
  18. package/dist/entity/payment/payment-link/index.js +126 -4
  19. package/dist/entity/payment/transaction/index.js +115 -4
  20. package/dist/entity/payment/transaction-event/index.js +37 -5
  21. package/dist/entity/{agent-data/organisation-supplier-type → payment/transaction-event-type}/index.js +5 -5
  22. package/dist/entity/payment/transaction-metadata/index.js +140 -0
  23. package/dist/entity/payment/transaction-method/index.js +1 -1
  24. package/dist/entity/payment/transaction-status/index.js +1 -1
  25. package/dist/entity/payment/transaction-type/index.js +39 -0
  26. package/dist/entity/user/user/index.js +8 -1
  27. package/dist/index.js +86 -40
  28. package/dist/migration/agent-data/1642121041760-inital.js +0 -2
  29. package/dist/migration/agent-data/1642121610577-organisation-suppliers.js +2 -2
  30. package/dist/migration/agent-data/1642121681610-organisation-suppliers-type.js +2 -2
  31. package/dist/migration/agent-data/1642505882721-booking-fields.js +29 -0
  32. package/dist/migration/agent-data/1642508385880-booking-id.js +19 -0
  33. package/dist/migration/bank/1642313073694-bank-initial.js +25 -0
  34. package/dist/migration/nuapay/1642282666475-add-nuapay-account.js +13 -0
  35. package/dist/migration/nuapay/1642283420696-fix-iban-length.js +15 -0
  36. package/dist/migration/nuapay/1642283781684-account-relation.js +15 -0
  37. package/dist/migration/nuapay/1642286393959-beneficiary.js +13 -0
  38. package/dist/migration/nuapay/1642316424390-account-ibans.js +21 -0
  39. package/dist/migration/nuapay/1642318117667-cleanup-beneficaries.js +23 -0
  40. package/dist/migration/nuapay/1642365244026-nullable-bic.js +13 -0
  41. package/dist/migration/nuapay/1642366232568-remove-bic.js +13 -0
  42. package/dist/migration/nuapay/1642370449589-transaction.js +17 -0
  43. package/dist/migration/payment/1642514728358-payment-link-updates.js +39 -0
  44. package/dist/migration/payment/1642516017835-payment-link-add-booking.js +15 -0
  45. package/dist/migration/payment/1642519453365-transaction.js +63 -0
  46. package/dist/migration/payment/1642520774562-transaction-payment-link.js +15 -0
  47. package/dist/migration/payment/1642533711013-transaction-metadata.js +15 -0
  48. package/dist/migration/payment/1642540883807-transaction-event.js +27 -0
  49. package/dist/migration/user/1642207858247-fix-user-constraint.js +19 -0
  50. package/package.json +5 -4
  51. package/dist/migration/payout/1642141038609-initial.js +0 -15
  52. package/dist/migration/payout/1642196506002-beneficiary.js +0 -31
  53. package/dist/migration/payout/1642199881916-breakout-beneficaries.js +0 -25
@@ -15,7 +15,7 @@ const run = async () => {
15
15
  await queryRunner.createSchema("nuapay", true);
16
16
  await queryRunner.createSchema("agent_data", true);
17
17
  await queryRunner.createSchema("payment", true);
18
- await queryRunner.createSchema("payout", true);
18
+ await queryRunner.createSchema("bank", true);
19
19
  await queryRunner.createSchema("user", true);
20
20
  };
21
21
 
@@ -7,7 +7,15 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
10
+ var _user = _interopRequireDefault(require("../../user/user"));
11
+
12
+ var _organisation = _interopRequireDefault(require("../../user/organisation"));
13
+
14
+ var _transaction = _interopRequireDefault(require("../../payment/transaction"));
15
+
16
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
19
 
12
20
  function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
13
21
 
@@ -18,19 +26,108 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
18
26
  let Booking = (_dec = (0, _typeorm.Entity)({
19
27
  name: 'booking',
20
28
  schema: 'agent_data'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Booking {
29
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
30
+ type: "varchar",
31
+ length: "150"
32
+ }), _dec4 = (0, _typeorm.ManyToOne)(() => _user.default), _dec5 = (0, _typeorm.JoinColumn)({
33
+ name: 'user_id',
34
+ referencedColumnName: 'id'
35
+ }), _dec6 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.booking), _dec7 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec8 = (0, _typeorm.JoinColumn)({
36
+ name: 'organisation_id',
37
+ referencedColumnName: 'id'
38
+ }), _dec9 = (0, _typeorm.Column)({
39
+ type: "varchar",
40
+ length: "150"
41
+ }), _dec10 = (0, _typeorm.Column)({
42
+ type: "varchar",
43
+ length: "150"
44
+ }), _dec11 = (0, _typeorm.Column)({
45
+ type: "date",
46
+ nullable: true
47
+ }), _dec12 = (0, _typeorm.Column)({
48
+ type: "date",
49
+ nullable: true
50
+ }), _dec13 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Booking {
22
51
  constructor() {
23
52
  _initializerDefineProperty(this, "id", _descriptor, this);
24
53
 
25
- _initializerDefineProperty(this, "created_at", _descriptor2, this);
54
+ _initializerDefineProperty(this, "email", _descriptor2, this);
55
+
56
+ _initializerDefineProperty(this, "user", _descriptor3, this);
57
+
58
+ _initializerDefineProperty(this, "transactions", _descriptor4, this);
59
+
60
+ _initializerDefineProperty(this, "organisation", _descriptor5, this);
61
+
62
+ _initializerDefineProperty(this, "customer_name", _descriptor6, this);
63
+
64
+ _initializerDefineProperty(this, "booking_reference", _descriptor7, this);
65
+
66
+ _initializerDefineProperty(this, "departure_date", _descriptor8, this);
67
+
68
+ _initializerDefineProperty(this, "return_date", _descriptor9, this);
69
+
70
+ _initializerDefineProperty(this, "created_at", _descriptor10, this);
26
71
  }
27
72
 
28
73
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
74
+ configurable: true,
75
+ enumerable: true,
76
+ writable: true,
77
+ initializer: function () {
78
+ return undefined;
79
+ }
80
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec3], {
81
+ configurable: true,
82
+ enumerable: true,
83
+ writable: true,
84
+ initializer: function () {
85
+ return "";
86
+ }
87
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec4, _dec5], {
88
+ configurable: true,
89
+ enumerable: true,
90
+ writable: true,
91
+ initializer: function () {
92
+ return _user.default;
93
+ }
94
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "transactions", [_dec6], {
95
+ configurable: true,
96
+ enumerable: true,
97
+ writable: true,
98
+ initializer: null
99
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec7, _dec8], {
100
+ configurable: true,
101
+ enumerable: true,
102
+ writable: true,
103
+ initializer: function () {
104
+ return _organisation.default;
105
+ }
106
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec9], {
107
+ configurable: true,
108
+ enumerable: true,
109
+ writable: true,
110
+ initializer: function () {
111
+ return "";
112
+ }
113
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "booking_reference", [_dec10], {
114
+ configurable: true,
115
+ enumerable: true,
116
+ writable: true,
117
+ initializer: function () {
118
+ return "";
119
+ }
120
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "departure_date", [_dec11], {
121
+ configurable: true,
122
+ enumerable: true,
123
+ writable: true,
124
+ initializer: null
125
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "return_date", [_dec12], {
29
126
  configurable: true,
30
127
  enumerable: true,
31
128
  writable: true,
32
129
  initializer: null
33
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
130
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec13], {
34
131
  configurable: true,
35
132
  enumerable: true,
36
133
  writable: true,
@@ -7,18 +7,18 @@ exports.default = void 0;
7
7
 
8
8
  var _booking = _interopRequireDefault(require("./booking"));
9
9
 
10
- var _customer = _interopRequireDefault(require("./customer"));
11
-
12
10
  var _bookingComponent = _interopRequireDefault(require("./booking-component"));
13
11
 
14
12
  var _bookingComponentType = _interopRequireDefault(require("./booking-component-type"));
15
13
 
16
- var _organisationSupplier = _interopRequireDefault(require("./organisation-supplier"));
14
+ var _supplier = _interopRequireDefault(require("./supplier"));
15
+
16
+ var _supplierType = _interopRequireDefault(require("./supplier-type"));
17
17
 
18
- var _organisationSupplierType = _interopRequireDefault(require("./organisation-supplier-type"));
18
+ var _transactionEvent = _interopRequireDefault(require("../payment/transaction-event"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- const ENTITIES = [_booking.default, _customer.default, _bookingComponent.default, _bookingComponentType.default, _organisationSupplier.default, _organisationSupplierType.default];
22
+ const ENTITIES = [_booking.default, _bookingComponent.default, _bookingComponentType.default, _supplier.default, _supplierType.default, _transactionEvent.default];
23
23
  var _default = ENTITIES;
24
24
  exports.default = _default;
@@ -15,10 +15,10 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
15
15
 
16
16
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
17
17
 
18
- let Customer = (_dec = (0, _typeorm.Entity)({
19
- name: 'customer',
18
+ let Supplier = (_dec = (0, _typeorm.Entity)({
19
+ name: 'supplier',
20
20
  schema: 'agent_data'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Customer {
21
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Supplier {
22
22
  constructor() {
23
23
  _initializerDefineProperty(this, "id", _descriptor, this);
24
24
 
@@ -36,4 +36,4 @@ let Customer = (_dec = (0, _typeorm.Entity)({
36
36
  writable: true,
37
37
  initializer: null
38
38
  })), _class2)) || _class);
39
- exports.default = Customer;
39
+ exports.default = Supplier;
@@ -15,10 +15,10 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
15
15
 
16
16
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
17
17
 
18
- let OrganisationSupplier = (_dec = (0, _typeorm.Entity)({
19
- name: 'organisation_supplier',
18
+ let SupplierType = (_dec = (0, _typeorm.Entity)({
19
+ name: 'supplier_type',
20
20
  schema: 'agent_data'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class OrganisationSupplier {
21
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class SupplierType {
22
22
  constructor() {
23
23
  _initializerDefineProperty(this, "id", _descriptor, this);
24
24
 
@@ -36,4 +36,4 @@ let OrganisationSupplier = (_dec = (0, _typeorm.Entity)({
36
36
  writable: true,
37
37
  initializer: null
38
38
  })), _class2)) || _class);
39
- exports.default = OrganisationSupplier;
39
+ exports.default = SupplierType;
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _typeorm = require("typeorm");
9
+
10
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
11
+
12
+ function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
13
+
14
+ function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
15
+
16
+ function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
17
+
18
+ let Account = (_dec = (0, _typeorm.Entity)({
19
+ name: 'account',
20
+ schema: 'bank'
21
+ }), _dec2 = (0, _typeorm.PrimaryColumn)({
22
+ type: "varchar",
23
+ length: "22"
24
+ }), _dec3 = (0, _typeorm.Column)({
25
+ type: "varchar",
26
+ length: "15"
27
+ }), _dec4 = (0, _typeorm.Column)({
28
+ type: "varchar",
29
+ length: "10"
30
+ }), _dec5 = (0, _typeorm.Column)({
31
+ type: "varchar",
32
+ length: "250"
33
+ }), _dec6 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Account {
34
+ constructor() {
35
+ _initializerDefineProperty(this, "iban", _descriptor, this);
36
+
37
+ _initializerDefineProperty(this, "account_number", _descriptor2, this);
38
+
39
+ _initializerDefineProperty(this, "sort_code", _descriptor3, this);
40
+
41
+ _initializerDefineProperty(this, "name", _descriptor4, this);
42
+
43
+ _initializerDefineProperty(this, "created_at", _descriptor5, this);
44
+ }
45
+
46
+ propogate(iban, accountNumber, sortCode, name) {
47
+ this.iban = iban;
48
+ this.account_number = accountNumber;
49
+ this.sort_code = sortCode;
50
+ this.name = name;
51
+ }
52
+
53
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "iban", [_dec2], {
54
+ configurable: true,
55
+ enumerable: true,
56
+ writable: true,
57
+ initializer: function () {
58
+ return "";
59
+ }
60
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "account_number", [_dec3], {
61
+ configurable: true,
62
+ enumerable: true,
63
+ writable: true,
64
+ initializer: function () {
65
+ return "";
66
+ }
67
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "sort_code", [_dec4], {
68
+ configurable: true,
69
+ enumerable: true,
70
+ writable: true,
71
+ initializer: function () {
72
+ return "";
73
+ }
74
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec5], {
75
+ configurable: true,
76
+ enumerable: true,
77
+ writable: true,
78
+ initializer: function () {
79
+ return "";
80
+ }
81
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec6], {
82
+ configurable: true,
83
+ enumerable: true,
84
+ writable: true,
85
+ initializer: null
86
+ })), _class2)) || _class);
87
+ exports.default = Account;
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _beneficiary = _interopRequireDefault(require("../beneficiary"));
10
+ var _account = _interopRequireDefault(require("../account"));
11
11
 
12
12
  var _organisation = _interopRequireDefault(require("../../user/organisation"));
13
13
 
@@ -23,20 +23,20 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
23
23
 
24
24
  let BeneficiaryOrganisation = (_dec = (0, _typeorm.Entity)({
25
25
  name: 'beneficiary_organisation',
26
- schema: 'payout'
26
+ schema: 'bank'
27
27
  }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
28
28
  name: 'organisation_id',
29
29
  referencedColumnName: 'id'
30
- }), _dec5 = (0, _typeorm.ManyToOne)(() => _beneficiary.default), _dec6 = (0, _typeorm.JoinColumn)({
31
- name: 'beneficiary_id',
32
- referencedColumnName: 'id'
30
+ }), _dec5 = (0, _typeorm.ManyToOne)(() => _account.default), _dec6 = (0, _typeorm.JoinColumn)({
31
+ name: 'account_iban',
32
+ referencedColumnName: 'iban'
33
33
  }), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BeneficiaryOrganisation {
34
34
  constructor() {
35
35
  _initializerDefineProperty(this, "id", _descriptor, this);
36
36
 
37
37
  _initializerDefineProperty(this, "organisation", _descriptor2, this);
38
38
 
39
- _initializerDefineProperty(this, "beneficiary", _descriptor3, this);
39
+ _initializerDefineProperty(this, "account", _descriptor3, this);
40
40
 
41
41
  _initializerDefineProperty(this, "created_at", _descriptor4, this);
42
42
  }
@@ -53,12 +53,12 @@ let BeneficiaryOrganisation = (_dec = (0, _typeorm.Entity)({
53
53
  initializer: function () {
54
54
  return _organisation.default;
55
55
  }
56
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "beneficiary", [_dec5, _dec6], {
56
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "account", [_dec5, _dec6], {
57
57
  configurable: true,
58
58
  enumerable: true,
59
59
  writable: true,
60
60
  initializer: function () {
61
- return _beneficiary.default;
61
+ return _account.default;
62
62
  }
63
63
  }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
64
64
  configurable: true,
@@ -7,9 +7,9 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _organisation = _interopRequireDefault(require("../../user/organisation"));
10
+ var _account = _interopRequireDefault(require("../account"));
11
11
 
12
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
12
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
@@ -19,39 +19,29 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
19
19
 
20
20
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
21
21
 
22
- let Beneficiary = (_dec = (0, _typeorm.Entity)({
23
- name: 'beneficiary',
24
- schema: 'payout'
22
+ let BeneficiaryProvider = (_dec = (0, _typeorm.Entity)({
23
+ name: 'beneficiary_provider',
24
+ schema: 'bank'
25
25
  }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
26
26
  type: "varchar",
27
27
  length: "15"
28
28
  }), _dec4 = (0, _typeorm.Column)({
29
29
  type: "varchar",
30
- length: "15"
31
- }), _dec5 = (0, _typeorm.Column)({
32
- type: "varchar",
33
- length: "15"
34
- }), _dec6 = (0, _typeorm.Column)({
35
- type: "varchar",
36
- length: "10"
37
- }), _dec7 = (0, _typeorm.Column)({
38
- type: "varchar",
39
- length: "250"
40
- }), _dec8 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Beneficiary {
30
+ length: "50"
31
+ }), _dec5 = (0, _typeorm.ManyToOne)(() => _account.default), _dec6 = (0, _typeorm.JoinColumn)({
32
+ name: 'account_iban',
33
+ referencedColumnName: 'iban'
34
+ }), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BeneficiaryProvider {
41
35
  constructor() {
42
36
  _initializerDefineProperty(this, "id", _descriptor, this);
43
37
 
44
- _initializerDefineProperty(this, "iban", _descriptor2, this);
38
+ _initializerDefineProperty(this, "provider", _descriptor2, this);
45
39
 
46
- _initializerDefineProperty(this, "bic", _descriptor3, this);
40
+ _initializerDefineProperty(this, "provider_reference", _descriptor3, this);
47
41
 
48
- _initializerDefineProperty(this, "account_number", _descriptor4, this);
42
+ _initializerDefineProperty(this, "account", _descriptor4, this);
49
43
 
50
- _initializerDefineProperty(this, "sort_code", _descriptor5, this);
51
-
52
- _initializerDefineProperty(this, "bank_name", _descriptor6, this);
53
-
54
- _initializerDefineProperty(this, "created_at", _descriptor7, this);
44
+ _initializerDefineProperty(this, "created_at", _descriptor5, this);
55
45
  }
56
46
 
57
47
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -59,45 +49,31 @@ let Beneficiary = (_dec = (0, _typeorm.Entity)({
59
49
  enumerable: true,
60
50
  writable: true,
61
51
  initializer: null
62
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "iban", [_dec3], {
63
- configurable: true,
64
- enumerable: true,
65
- writable: true,
66
- initializer: function () {
67
- return "";
68
- }
69
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "bic", [_dec4], {
70
- configurable: true,
71
- enumerable: true,
72
- writable: true,
73
- initializer: function () {
74
- return "";
75
- }
76
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "account_number", [_dec5], {
52
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "provider", [_dec3], {
77
53
  configurable: true,
78
54
  enumerable: true,
79
55
  writable: true,
80
56
  initializer: function () {
81
57
  return "";
82
58
  }
83
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "sort_code", [_dec6], {
59
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec4], {
84
60
  configurable: true,
85
61
  enumerable: true,
86
62
  writable: true,
87
63
  initializer: function () {
88
64
  return "";
89
65
  }
90
- }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "bank_name", [_dec7], {
66
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "account", [_dec5, _dec6], {
91
67
  configurable: true,
92
68
  enumerable: true,
93
69
  writable: true,
94
70
  initializer: function () {
95
- return "";
71
+ return _account.default;
96
72
  }
97
- }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
73
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
98
74
  configurable: true,
99
75
  enumerable: true,
100
76
  writable: true,
101
77
  initializer: null
102
78
  })), _class2)) || _class);
103
- exports.default = Beneficiary;
79
+ exports.default = BeneficiaryProvider;
@@ -17,7 +17,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
17
17
 
18
18
  let Payout = (_dec = (0, _typeorm.Entity)({
19
19
  name: 'disbursal',
20
- schema: 'payout'
20
+ schema: 'bank'
21
21
  }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Payout {
22
22
  constructor() {
23
23
  _initializerDefineProperty(this, "id", _descriptor, this);
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _beneficiary = _interopRequireDefault(require("./beneficiary"));
8
+ var _account = _interopRequireDefault(require("./account"));
9
9
 
10
10
  var _disbursal = _interopRequireDefault(require("./disbursal"));
11
11
 
@@ -15,6 +15,6 @@ var _beneficiaryOrganisation = _interopRequireDefault(require("./beneficiary-org
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- const ENTITIES = [_beneficiary.default, _disbursal.default, _beneficiaryProvider.default, _beneficiaryOrganisation.default];
18
+ const ENTITIES = [_account.default, _disbursal.default, _beneficiaryProvider.default, _beneficiaryOrganisation.default];
19
19
  var _default = ENTITIES;
20
20
  exports.default = _default;
@@ -11,12 +11,12 @@ var _nuapay = _interopRequireDefault(require("./nuapay"));
11
11
 
12
12
  var _payment = _interopRequireDefault(require("./payment"));
13
13
 
14
- var _payout = _interopRequireDefault(require("./payout"));
14
+ var _bank = _interopRequireDefault(require("./bank"));
15
15
 
16
16
  var _user = _interopRequireDefault(require("./user"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- const ENTITIES = [..._agentData.default, ..._nuapay.default, ..._payment.default, ..._payout.default, ..._user.default];
20
+ const ENTITIES = [..._agentData.default, ..._nuapay.default, ..._payment.default, ..._bank.default, ..._user.default];
21
21
  var _default = ENTITIES;
22
22
  exports.default = _default;
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _beneficiary = _interopRequireDefault(require("../beneficiary"));
10
+ var _account = _interopRequireDefault(require("../../bank/account"));
11
11
 
12
12
  var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
13
13
 
@@ -19,32 +19,35 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
19
19
 
20
20
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
21
21
 
22
- let BeneficiaryProvider = (_dec = (0, _typeorm.Entity)({
23
- name: 'beneficiary_provider',
24
- schema: 'payout'
25
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
22
+ let NuapayAccount = (_dec = (0, _typeorm.Entity)({
23
+ name: 'account',
24
+ schema: 'nuapay'
25
+ }), _dec2 = (0, _typeorm.PrimaryColumn)({
26
26
  type: "varchar",
27
- length: "15"
27
+ length: "50"
28
+ }), _dec3 = (0, _typeorm.Column)({
29
+ type: "varchar",
30
+ length: "100"
28
31
  }), _dec4 = (0, _typeorm.Column)({
29
32
  type: "varchar",
30
33
  length: "50"
31
- }), _dec5 = (0, _typeorm.ManyToOne)(() => _beneficiary.default), _dec6 = (0, _typeorm.JoinColumn)({
32
- name: 'beneficiary_id',
33
- referencedColumnName: 'id'
34
- }), _dec7 = (0, _typeorm.Column)({
34
+ }), _dec5 = (0, _typeorm.Column)({
35
35
  type: "varchar",
36
- length: "150"
37
- }), _dec8 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class BeneficiaryProvider {
36
+ length: "50"
37
+ }), _dec6 = (0, _typeorm.ManyToOne)(() => _account.default), _dec7 = (0, _typeorm.JoinColumn)({
38
+ name: 'iban',
39
+ referencedColumnName: 'iban'
40
+ }), _dec8 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class NuapayAccount {
38
41
  constructor() {
39
42
  _initializerDefineProperty(this, "id", _descriptor, this);
40
43
 
41
- _initializerDefineProperty(this, "provider", _descriptor2, this);
44
+ _initializerDefineProperty(this, "account_name", _descriptor2, this);
42
45
 
43
- _initializerDefineProperty(this, "provider_reference", _descriptor3, this);
46
+ _initializerDefineProperty(this, "account_type", _descriptor3, this);
44
47
 
45
- _initializerDefineProperty(this, "beneficiary", _descriptor4, this);
48
+ _initializerDefineProperty(this, "status", _descriptor4, this);
46
49
 
47
- _initializerDefineProperty(this, "account_name", _descriptor5, this);
50
+ _initializerDefineProperty(this, "bank_account", _descriptor5, this);
48
51
 
49
52
  _initializerDefineProperty(this, "created_at", _descriptor6, this);
50
53
  }
@@ -53,34 +56,36 @@ let BeneficiaryProvider = (_dec = (0, _typeorm.Entity)({
53
56
  configurable: true,
54
57
  enumerable: true,
55
58
  writable: true,
56
- initializer: null
57
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "provider", [_dec3], {
59
+ initializer: function () {
60
+ return undefined;
61
+ }
62
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "account_name", [_dec3], {
58
63
  configurable: true,
59
64
  enumerable: true,
60
65
  writable: true,
61
66
  initializer: function () {
62
67
  return "";
63
68
  }
64
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec4], {
69
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "account_type", [_dec4], {
65
70
  configurable: true,
66
71
  enumerable: true,
67
72
  writable: true,
68
73
  initializer: function () {
69
74
  return "";
70
75
  }
71
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "beneficiary", [_dec5, _dec6], {
76
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec5], {
72
77
  configurable: true,
73
78
  enumerable: true,
74
79
  writable: true,
75
80
  initializer: function () {
76
- return _beneficiary.default;
81
+ return "";
77
82
  }
78
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "account_name", [_dec7], {
83
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "bank_account", [_dec6, _dec7], {
79
84
  configurable: true,
80
85
  enumerable: true,
81
86
  writable: true,
82
87
  initializer: function () {
83
- return "";
88
+ return _account.default;
84
89
  }
85
90
  }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
86
91
  configurable: true,
@@ -88,4 +93,4 @@ let BeneficiaryProvider = (_dec = (0, _typeorm.Entity)({
88
93
  writable: true,
89
94
  initializer: null
90
95
  })), _class2)) || _class);
91
- exports.default = BeneficiaryProvider;
96
+ exports.default = NuapayAccount;