@felloh-org/lambda-wrapper 1.1.39 → 1.1.42

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.
@@ -167,3 +167,43 @@ jobs:
167
167
  params:
168
168
  alert_type: 'failed'
169
169
  message: Migrations deployment failed
170
+
171
+ - name: 'migrations.pr'
172
+ serial: true
173
+ plan:
174
+ - in_parallel:
175
+ - get: lambda-wrapper
176
+ passed: ['migrations.staging']
177
+ trigger: true
178
+ - get: concourse-scripts
179
+ - task: 'schema.create'
180
+ file: concourse-scripts/scripts/pulumi_npm_run/npm_run.yml
181
+ input_mapping:
182
+ repository: lambda-wrapper
183
+ params:
184
+ NPM_COMMAND: 'orm:schema:create'
185
+ AWS_ACCESS_KEY_ID: ((aws.keys.access))
186
+ AWS_SECRET_ACCESS_KEY: ((aws.keys.secret))
187
+ AWS_REGION: ((aws.region.primary))
188
+ WAREHOUSE_ARN: ((aws.rds.warehouse_arn.pr))
189
+ WAREHOUSE_SECRET_ARN: ((aws.secret_manager.warehouse_secret_arn.pr))
190
+ WAREHOUSE_DATABASE: 'felloh'
191
+ WAREHOUSE_SCHEMA: 'user'
192
+ - task: 'migrations.run'
193
+ file: concourse-scripts/scripts/pulumi_npm_run/npm_run.yml
194
+ input_mapping:
195
+ repository: lambda-wrapper
196
+ params:
197
+ NPM_COMMAND: 'orm:migration:run'
198
+ AWS_ACCESS_KEY_ID: ((aws.keys.access))
199
+ AWS_SECRET_ACCESS_KEY: ((aws.keys.secret))
200
+ AWS_REGION: ((aws.region.primary))
201
+ WAREHOUSE_ARN: ((aws.rds.warehouse_arn.pr))
202
+ WAREHOUSE_SECRET_ARN: ((aws.secret_manager.warehouse_secret_arn.pr))
203
+ WAREHOUSE_DATABASE: 'felloh'
204
+ WAREHOUSE_SCHEMA: 'user'
205
+ on_failure:
206
+ put: slack-alert-deploy
207
+ params:
208
+ alert_type: 'failed'
209
+ message: Migrations deployment failed
@@ -5,22 +5,29 @@ import Warehouse from '@/src/service/warehouse';
5
5
  DotEnv.config();
6
6
 
7
7
  const run = async () => {
8
- const warehouse = new Warehouse();
9
-
10
- const connection = await warehouse.connect();
11
-
12
- const queryRunner = await connection.createQueryRunner();
13
- await queryRunner.createDatabase('felloh', true);
14
-
15
- await queryRunner.createSchema('trust_payments', true);
16
- await queryRunner.createSchema('nuapay', true);
17
- await queryRunner.createSchema('agent_data', true);
18
- await queryRunner.createSchema('payment', true);
19
- await queryRunner.createSchema('bank', true);
20
- await queryRunner.createSchema('user', true);
21
- await queryRunner.createSchema('total_processing', true);
22
- await queryRunner.createSchema('token', true);
23
- await queryRunner.createSchema('scratch', true);
8
+ try {
9
+ const warehouse = new Warehouse();
10
+
11
+ const connection = await warehouse.connect();
12
+
13
+ const queryRunner = await connection.createQueryRunner();
14
+ await queryRunner.createDatabase('felloh', true);
15
+
16
+ await queryRunner.createSchema('trust_payments', true);
17
+ await queryRunner.createSchema('nuapay', true);
18
+ await queryRunner.createSchema('agent_data', true);
19
+ await queryRunner.createSchema('payment', true);
20
+ await queryRunner.createSchema('bank', true);
21
+ await queryRunner.createSchema('user', true);
22
+ await queryRunner.createSchema('total_processing', true);
23
+ await queryRunner.createSchema('token', true);
24
+ await queryRunner.createSchema('scratch', true);
25
+ await queryRunner.createSchema('nuvei', true);
26
+ } catch (error) {
27
+ console.log(error);
28
+
29
+ process.exit(1);
30
+ }
24
31
  };
25
32
 
26
33
  run();
@@ -23,8 +23,10 @@ var _token = _interopRequireDefault(require("./token"));
23
23
 
24
24
  var _scratch = _interopRequireDefault(require("./scratch"));
25
25
 
26
+ var _nuvei = _interopRequireDefault(require("./nuvei"));
27
+
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
29
 
28
- const ENTITIES = [..._scratch.default, ..._agentData.default, ..._bank.default, ..._nuapay.default, ..._payment.default, ..._token.default, ..._totalProcessing.default, ..._trustPayments.default, ..._user.default];
30
+ const ENTITIES = [..._scratch.default, ..._agentData.default, ..._bank.default, ..._nuapay.default, ..._payment.default, ..._token.default, ..._totalProcessing.default, ..._trustPayments.default, ..._user.default, ..._nuvei.default];
29
31
  var _default = ENTITIES;
30
32
  exports.default = _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _transaction = _interopRequireDefault(require("./transaction"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const ENTITIES = [_transaction.default];
13
+ var _default = ENTITIES;
14
+ exports.default = _default;
@@ -0,0 +1,216 @@
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, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19;
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 Transaction = (_dec = (0, _typeorm.Entity)({
19
+ name: 'transaction',
20
+ schema: 'nuvei'
21
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
22
+ type: "varchar",
23
+ length: 18
24
+ }), _dec4 = (0, _typeorm.Column)({
25
+ type: "varchar",
26
+ length: 20
27
+ }), _dec5 = (0, _typeorm.Column)({
28
+ type: "varchar",
29
+ length: 20
30
+ }), _dec6 = (0, _typeorm.Column)({
31
+ type: "varchar",
32
+ length: 20
33
+ }), _dec7 = (0, _typeorm.Column)({
34
+ type: "int"
35
+ }), _dec8 = (0, _typeorm.Column)({
36
+ type: "varchar",
37
+ length: 5
38
+ }), _dec9 = (0, _typeorm.Column)({
39
+ type: "varchar",
40
+ length: 28,
41
+ nullable: true
42
+ }), _dec10 = (0, _typeorm.Column)({
43
+ type: "varchar",
44
+ length: 1,
45
+ nullable: true
46
+ }), _dec11 = (0, _typeorm.Column)({
47
+ type: "varchar",
48
+ length: 36
49
+ }), _dec12 = (0, _typeorm.Column)({
50
+ type: "varchar",
51
+ length: 36
52
+ }), _dec13 = (0, _typeorm.Column)({
53
+ type: "varchar",
54
+ length: 6
55
+ }), _dec14 = (0, _typeorm.Column)({
56
+ type: "varchar",
57
+ length: 6
58
+ }), _dec15 = (0, _typeorm.Column)({
59
+ type: "int"
60
+ }), _dec16 = (0, _typeorm.Column)({
61
+ type: "varchar",
62
+ length: 100
63
+ }), _dec17 = (0, _typeorm.Column)({
64
+ type: "varchar",
65
+ length: 50,
66
+ nullable: true
67
+ }), _dec18 = (0, _typeorm.Column)({
68
+ type: "timestamp without time zone"
69
+ }), _dec19 = (0, _typeorm.Column)({
70
+ type: "varchar",
71
+ length: 50
72
+ }), _dec20 = (0, _typeorm.Column)({
73
+ type: "varchar",
74
+ length: 1500
75
+ }), _dec(_class = (_class2 = class Transaction {
76
+ constructor() {
77
+ _initializerDefineProperty(this, "order_id", _descriptor, this);
78
+
79
+ _initializerDefineProperty(this, "transaction_id", _descriptor2, this);
80
+
81
+ _initializerDefineProperty(this, "transaction_type", _descriptor3, this);
82
+
83
+ _initializerDefineProperty(this, "transaction_status", _descriptor4, this);
84
+
85
+ _initializerDefineProperty(this, "status", _descriptor5, this);
86
+
87
+ _initializerDefineProperty(this, "amount", _descriptor6, this);
88
+
89
+ _initializerDefineProperty(this, "currency", _descriptor7, this);
90
+
91
+ _initializerDefineProperty(this, "unique_cc", _descriptor8, this);
92
+
93
+ _initializerDefineProperty(this, "threeds_is_liability_on_issuer", _descriptor9, this);
94
+
95
+ _initializerDefineProperty(this, "session_token", _descriptor10, this);
96
+
97
+ _initializerDefineProperty(this, "client_unique_id", _descriptor11, this);
98
+
99
+ _initializerDefineProperty(this, "auth_code", _descriptor12, this);
100
+
101
+ _initializerDefineProperty(this, "merchant_site_id", _descriptor13, this);
102
+
103
+ _initializerDefineProperty(this, "err_code", _descriptor14, this);
104
+
105
+ _initializerDefineProperty(this, "reason", _descriptor15, this);
106
+
107
+ _initializerDefineProperty(this, "entity_id", _descriptor16, this);
108
+
109
+ _initializerDefineProperty(this, "processing_time", _descriptor17, this);
110
+
111
+ _initializerDefineProperty(this, "merchant_account_id", _descriptor18, this);
112
+
113
+ _initializerDefineProperty(this, "merchant_name", _descriptor19, this);
114
+ }
115
+
116
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "order_id", [_dec2], {
117
+ configurable: true,
118
+ enumerable: true,
119
+ writable: true,
120
+ initializer: function () {
121
+ return undefined;
122
+ }
123
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "transaction_id", [_dec3], {
124
+ configurable: true,
125
+ enumerable: true,
126
+ writable: true,
127
+ initializer: null
128
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "transaction_type", [_dec4], {
129
+ configurable: true,
130
+ enumerable: true,
131
+ writable: true,
132
+ initializer: null
133
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "transaction_status", [_dec5], {
134
+ configurable: true,
135
+ enumerable: true,
136
+ writable: true,
137
+ initializer: null
138
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec6], {
139
+ configurable: true,
140
+ enumerable: true,
141
+ writable: true,
142
+ initializer: null
143
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec7], {
144
+ configurable: true,
145
+ enumerable: true,
146
+ writable: true,
147
+ initializer: null
148
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec8], {
149
+ configurable: true,
150
+ enumerable: true,
151
+ writable: true,
152
+ initializer: null
153
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "unique_cc", [_dec9], {
154
+ configurable: true,
155
+ enumerable: true,
156
+ writable: true,
157
+ initializer: null
158
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "threeds_is_liability_on_issuer", [_dec10], {
159
+ configurable: true,
160
+ enumerable: true,
161
+ writable: true,
162
+ initializer: null
163
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "session_token", [_dec11], {
164
+ configurable: true,
165
+ enumerable: true,
166
+ writable: true,
167
+ initializer: null
168
+ }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "client_unique_id", [_dec12], {
169
+ configurable: true,
170
+ enumerable: true,
171
+ writable: true,
172
+ initializer: null
173
+ }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "auth_code", [_dec13], {
174
+ configurable: true,
175
+ enumerable: true,
176
+ writable: true,
177
+ initializer: null
178
+ }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "merchant_site_id", [_dec14], {
179
+ configurable: true,
180
+ enumerable: true,
181
+ writable: true,
182
+ initializer: null
183
+ }), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "err_code", [_dec15], {
184
+ configurable: true,
185
+ enumerable: true,
186
+ writable: true,
187
+ initializer: null
188
+ }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "reason", [_dec16], {
189
+ configurable: true,
190
+ enumerable: true,
191
+ writable: true,
192
+ initializer: null
193
+ }), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "entity_id", [_dec17], {
194
+ configurable: true,
195
+ enumerable: true,
196
+ writable: true,
197
+ initializer: null
198
+ }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "processing_time", [_dec18], {
199
+ configurable: true,
200
+ enumerable: true,
201
+ writable: true,
202
+ initializer: function () {
203
+ return null;
204
+ }
205
+ }), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "merchant_account_id", [_dec19], {
206
+ configurable: true,
207
+ enumerable: true,
208
+ writable: true,
209
+ initializer: null
210
+ }), _descriptor19 = _applyDecoratedDescriptor(_class2.prototype, "merchant_name", [_dec20], {
211
+ configurable: true,
212
+ enumerable: true,
213
+ writable: true,
214
+ initializer: null
215
+ })), _class2)) || _class);
216
+ exports.default = Transaction;
@@ -15,7 +15,7 @@ var _paymentProvider = _interopRequireDefault(require("../payment-provider"));
15
15
 
16
16
  var _transactionMethod = _interopRequireDefault(require("../transaction-method"));
17
17
 
18
- 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;
18
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
@@ -59,7 +59,12 @@ let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
59
59
  }), _dec12 = (0, _typeorm.Column)({
60
60
  type: "varchar",
61
61
  length: "4"
62
- }), _dec13 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class OrganisationPaymentProvider {
62
+ }), _dec13 = (0, _typeorm.Column)({
63
+ type: "boolean",
64
+ default: false
65
+ }), _dec14 = (0, _typeorm.Column)({
66
+ type: "int"
67
+ }), _dec15 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class OrganisationPaymentProvider {
63
68
  constructor() {
64
69
  _initializerDefineProperty(this, "id", _descriptor, this);
65
70
 
@@ -77,7 +82,11 @@ let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
77
82
 
78
83
  _initializerDefineProperty(this, "secret_key_last_four", _descriptor8, this);
79
84
 
80
- _initializerDefineProperty(this, "created_at", _descriptor9, this);
85
+ _initializerDefineProperty(this, "is_active", _descriptor9, this);
86
+
87
+ _initializerDefineProperty(this, "weight", _descriptor10, this);
88
+
89
+ _initializerDefineProperty(this, "created_at", _descriptor11, this);
81
90
  }
82
91
 
83
92
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -132,7 +141,19 @@ let OrganisationPaymentProvider = (_dec = (0, _typeorm.Entity)({
132
141
  initializer: function () {
133
142
  return "";
134
143
  }
135
- }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec13], {
144
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "is_active", [_dec13], {
145
+ configurable: true,
146
+ enumerable: true,
147
+ writable: true,
148
+ initializer: function () {
149
+ return false;
150
+ }
151
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "weight", [_dec14], {
152
+ configurable: true,
153
+ enumerable: true,
154
+ writable: true,
155
+ initializer: null
156
+ }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec15], {
136
157
  configurable: true,
137
158
  enumerable: true,
138
159
  writable: true,
@@ -9,7 +9,7 @@ var _typeorm = require("typeorm");
9
9
 
10
10
  var _uuid = require("uuid");
11
11
 
12
- var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
12
+ var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
13
13
 
14
14
  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 }); }
15
15
 
@@ -24,13 +24,18 @@ let PaymentProvider = (_dec = (0, _typeorm.Entity)({
24
24
  type: "varchar",
25
25
  length: "150",
26
26
  nullable: true
27
- }), _dec4 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentProvider {
27
+ }), _dec4 = (0, _typeorm.Column)({
28
+ type: "boolean",
29
+ default: false
30
+ }), _dec5 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentProvider {
28
31
  constructor() {
29
32
  _initializerDefineProperty(this, "id", _descriptor, this);
30
33
 
31
34
  _initializerDefineProperty(this, "name", _descriptor2, this);
32
35
 
33
- _initializerDefineProperty(this, "created_at", _descriptor3, this);
36
+ _initializerDefineProperty(this, "is_active", _descriptor3, this);
37
+
38
+ _initializerDefineProperty(this, "created_at", _descriptor4, this);
34
39
  }
35
40
 
36
41
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -47,7 +52,14 @@ let PaymentProvider = (_dec = (0, _typeorm.Entity)({
47
52
  initializer: function () {
48
53
  return "";
49
54
  }
50
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec4], {
55
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "is_active", [_dec4], {
56
+ configurable: true,
57
+ enumerable: true,
58
+ writable: true,
59
+ initializer: function () {
60
+ return false;
61
+ }
62
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec5], {
51
63
  configurable: true,
52
64
  enumerable: true,
53
65
  writable: true,
package/dist/index.js CHANGED
@@ -159,6 +159,12 @@ Object.defineProperty(exports, "NuapayTransactionEntity", {
159
159
  return _transaction.default;
160
160
  }
161
161
  });
162
+ Object.defineProperty(exports, "NuveiTransactionEntity", {
163
+ enumerable: true,
164
+ get: function () {
165
+ return _transaction5.default;
166
+ }
167
+ });
162
168
  Object.defineProperty(exports, "OrganisationEntity", {
163
169
  enumerable: true,
164
170
  get: function () {
@@ -520,6 +526,8 @@ var _organisationFeature = _interopRequireDefault(require("./entity/user/organis
520
526
 
521
527
  var _loginLink = _interopRequireDefault(require("./entity/user/login-link"));
522
528
 
529
+ var _transaction5 = _interopRequireDefault(require("./entity/nuvei/transaction"));
530
+
523
531
  var _registration = _interopRequireDefault(require("./event/user/registration"));
524
532
 
525
533
  var _changed = _interopRequireDefault(require("./event/user/password/changed"));
@@ -0,0 +1,13 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class nuveiTransactionSchema1658229415800 {
4
+ name = 'nuveiTransactionSchema1658229415800'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`CREATE TABLE "nuvei"."transaction" ("order_id" character varying NOT NULL, "transaction_id" character varying(18) NOT NULL, "transaction_type" character varying(20) NOT NULL, "transaction_status" character varying(20) NOT NULL, "status" character varying(20) NOT NULL, "amount" integer NOT NULL, "currency" character varying(5) NOT NULL, "unique_cc" character varying(28), "threeds_is_liability_on_issuer" character varying(1), "session_token" character varying(36) NOT NULL, "client_unique_id" character varying(36) NOT NULL, "auth_code" character varying(6) NOT NULL, "merchant_site_id" character varying(6) NOT NULL, "err_code" integer NOT NULL, "reason" character varying(100) NOT NULL, "entity_id" character varying(50), "processing_time" TIMESTAMP NOT NULL, "merchant_account_id" character varying(50) NOT NULL, "merchant_name" character varying(1500) NOT NULL, CONSTRAINT "PK_9011283056620f5eaa7ad74cef6" PRIMARY KEY ("order_id"))`);
8
+ }
9
+
10
+ async down(queryRunner) {
11
+ await queryRunner.query(`DROP TABLE "nuvei"."transaction"`);
12
+ }
13
+ }
@@ -0,0 +1,19 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class paymentProviderActiveWeighting1658478874188 {
4
+ name = 'paymentProviderActiveWeighting1658478874188'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "payment"."payment_provider" ADD "is_active" boolean NOT NULL DEFAULT false`);
8
+ await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "is_active" boolean NOT NULL DEFAULT false`);
9
+ await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "weight" integer NOT NULL`);
10
+ await queryRunner.query(`UPDATE "payment"."payment_provider" SET "is_active" = true`);
11
+ await queryRunner.query(`UPDATE "payment"."organisation_payment_provider" SET "is_active" = true, "weight" = 100`);
12
+ }
13
+
14
+ async down(queryRunner) {
15
+ await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "weight"`);
16
+ await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "is_active"`);
17
+ await queryRunner.query(`ALTER TABLE "payment"."payment_provider" DROP COLUMN "is_active"`);
18
+ }
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.1.39",
3
+ "version": "1.1.42",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {