@felloh-org/lambda-wrapper 1.0.24 → 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.concourse/pipeline.yml +129 -0
- package/.concourse/private.yml +0 -0
- package/.gitattributes +1 -0
- package/dist/entity/index.js +3 -1
- package/dist/entity/payment/organisation-payment-provider/index.js +1 -1
- package/dist/entity/payment/payment-link/index.js +47 -9
- package/dist/entity/payment/transaction/index.js +43 -10
- package/dist/entity/token/index.js +14 -0
- package/dist/entity/token/token/index.js +26 -5
- package/dist/entity/trust-payments/chargeback/index.js +2 -1
- package/dist/entity/user/user/index.js +13 -1
- package/dist/index.js +8 -0
- package/dist/migration/1648137333608-trust_chargeback_due.js +13 -0
- package/dist/migration/payment/1647251762169-payment_link_methods.js +15 -0
- package/dist/migration/payment/1647271619083-payment_link_moto.js +13 -0
- package/dist/migration/payment/1647292573651-provider_secret_length.js +15 -0
- package/dist/migration/payment/1647294601399-provider_secret_length.js +15 -0
- package/dist/migration/payment/1647428635630-transaction_organisation_payment_provider.js +15 -0
- package/dist/migration/payment/1647437109221-transaction_message.js +13 -0
- package/dist/migration/payment/1647437500834-transaction_updated_at.js +13 -0
- package/dist/migration/token/1645618345963-token_secret_length.js +15 -0
- package/dist/migration/token/1645621420506-token_user.js +17 -0
- package/dist/migration/user/1645621100580-user_is_api_user.js +13 -0
- package/dist/service/warehouse.js +7 -5
- package/dist/wrapper/index.js +7 -19
- package/package.json +5 -2
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# --------------------------------------------------------------------------------------------------
|
|
2
|
+
# Resource Types
|
|
3
|
+
# --------------------------------------------------------------------------------------------------
|
|
4
|
+
resource_types:
|
|
5
|
+
|
|
6
|
+
- name: pull-request
|
|
7
|
+
type: docker-image
|
|
8
|
+
source:
|
|
9
|
+
repository: teliaoss/github-pr-resource
|
|
10
|
+
|
|
11
|
+
- name: slack-notification
|
|
12
|
+
type: docker-image
|
|
13
|
+
source:
|
|
14
|
+
repository: mockersf/concourse-slack-notifier
|
|
15
|
+
tag: latest
|
|
16
|
+
|
|
17
|
+
# --------------------------------------------------------------------------------------------------
|
|
18
|
+
# Resources
|
|
19
|
+
# --------------------------------------------------------------------------------------------------
|
|
20
|
+
resources:
|
|
21
|
+
|
|
22
|
+
- name: concourse-scripts
|
|
23
|
+
type: git
|
|
24
|
+
source:
|
|
25
|
+
uri: git@github.com:felloh-org/concourse-scripts.git
|
|
26
|
+
branch: main
|
|
27
|
+
depth: 0
|
|
28
|
+
private_key: ((git.private_key))
|
|
29
|
+
|
|
30
|
+
- name: lambda-wrapper
|
|
31
|
+
type: git
|
|
32
|
+
source:
|
|
33
|
+
uri: git@github.com:felloh-org/lambda-wrapper.git
|
|
34
|
+
branch: main
|
|
35
|
+
depth: 0
|
|
36
|
+
private_key: ((git.private_key))
|
|
37
|
+
|
|
38
|
+
- name: slack-alert-deploy
|
|
39
|
+
type: slack-notification
|
|
40
|
+
source:
|
|
41
|
+
url: ((slack.channels.engineering-deployments))
|
|
42
|
+
|
|
43
|
+
# --------------------------------------------------------------------------------------------------
|
|
44
|
+
# Jobs
|
|
45
|
+
# --------------------------------------------------------------------------------------------------
|
|
46
|
+
jobs:
|
|
47
|
+
- name: 'migrations.staging'
|
|
48
|
+
serial: true
|
|
49
|
+
plan:
|
|
50
|
+
- in_parallel:
|
|
51
|
+
- get: lambda-wrapper
|
|
52
|
+
trigger: true
|
|
53
|
+
- get: concourse-scripts
|
|
54
|
+
- task: 'schema.create'
|
|
55
|
+
file: concourse-scripts/scripts/pulumi_npm_run/npm_run.yml
|
|
56
|
+
input_mapping:
|
|
57
|
+
repository: lambda-wrapper
|
|
58
|
+
params:
|
|
59
|
+
NPM_COMMAND: 'orm:schema:create'
|
|
60
|
+
AWS_ACCESS_KEY_ID: ((aws.keys.access))
|
|
61
|
+
AWS_SECRET_ACCESS_KEY: ((aws.keys.secret))
|
|
62
|
+
AWS_REGION: ((aws.region.primary))
|
|
63
|
+
WAREHOUSE_ARN: ((aws.rds.warehouse_arn.staging))
|
|
64
|
+
WAREHOUSE_SECRET_ARN: ((aws.secret_manager.warehouse_secret_arn.staging))
|
|
65
|
+
WAREHOUSE_DATABASE: 'felloh'
|
|
66
|
+
WAREHOUSE_SCHEMA: 'user'
|
|
67
|
+
- task: 'migrations.run'
|
|
68
|
+
file: concourse-scripts/scripts/pulumi_npm_run/npm_run.yml
|
|
69
|
+
input_mapping:
|
|
70
|
+
repository: lambda-wrapper
|
|
71
|
+
params:
|
|
72
|
+
NPM_COMMAND: 'orm:migration:run'
|
|
73
|
+
AWS_ACCESS_KEY_ID: ((aws.keys.access))
|
|
74
|
+
AWS_SECRET_ACCESS_KEY: ((aws.keys.secret))
|
|
75
|
+
AWS_REGION: ((aws.region.primary))
|
|
76
|
+
WAREHOUSE_ARN: ((aws.rds.warehouse_arn.staging))
|
|
77
|
+
WAREHOUSE_SECRET_ARN: ((aws.secret_manager.warehouse_secret_arn.staging))
|
|
78
|
+
WAREHOUSE_DATABASE: 'felloh'
|
|
79
|
+
WAREHOUSE_SCHEMA: 'user'
|
|
80
|
+
on_failure:
|
|
81
|
+
put: slack-alert-deploy
|
|
82
|
+
params:
|
|
83
|
+
alert_type: 'failed'
|
|
84
|
+
message: Staging deployment failed
|
|
85
|
+
|
|
86
|
+
- name: 'migrations.production'
|
|
87
|
+
serial: true
|
|
88
|
+
plan:
|
|
89
|
+
- in_parallel:
|
|
90
|
+
- get: lambda-wrapper
|
|
91
|
+
passed: ['migrations.staging']
|
|
92
|
+
trigger: true
|
|
93
|
+
- get: concourse-scripts
|
|
94
|
+
- task: 'schema.create'
|
|
95
|
+
file: concourse-scripts/scripts/pulumi_npm_run/npm_run.yml
|
|
96
|
+
input_mapping:
|
|
97
|
+
repository: lambda-wrapper
|
|
98
|
+
params:
|
|
99
|
+
NPM_COMMAND: 'orm:schema:create'
|
|
100
|
+
AWS_ACCESS_KEY_ID: ((aws.keys.access))
|
|
101
|
+
AWS_SECRET_ACCESS_KEY: ((aws.keys.secret))
|
|
102
|
+
AWS_REGION: ((aws.region.primary))
|
|
103
|
+
WAREHOUSE_ARN: ((aws.rds.warehouse_arn.production))
|
|
104
|
+
WAREHOUSE_SECRET_ARN: ((aws.secret_manager.warehouse_secret_arn.production))
|
|
105
|
+
WAREHOUSE_DATABASE: 'felloh'
|
|
106
|
+
WAREHOUSE_SCHEMA: 'user'
|
|
107
|
+
- task: 'migrations.run'
|
|
108
|
+
file: concourse-scripts/scripts/pulumi_npm_run/npm_run.yml
|
|
109
|
+
input_mapping:
|
|
110
|
+
repository: lambda-wrapper
|
|
111
|
+
params:
|
|
112
|
+
NPM_COMMAND: 'orm:migration:run'
|
|
113
|
+
AWS_ACCESS_KEY_ID: ((aws.keys.access))
|
|
114
|
+
AWS_SECRET_ACCESS_KEY: ((aws.keys.secret))
|
|
115
|
+
AWS_REGION: ((aws.region.primary))
|
|
116
|
+
WAREHOUSE_ARN: ((aws.rds.warehouse_arn.production))
|
|
117
|
+
WAREHOUSE_SECRET_ARN: ((aws.secret_manager.warehouse_secret_arn.production))
|
|
118
|
+
WAREHOUSE_DATABASE: 'felloh'
|
|
119
|
+
WAREHOUSE_SCHEMA: 'user'
|
|
120
|
+
on_success:
|
|
121
|
+
put: slack-alert-deploy
|
|
122
|
+
params:
|
|
123
|
+
alert_type: 'success'
|
|
124
|
+
message: Migrations deployment succeeded
|
|
125
|
+
on_failure:
|
|
126
|
+
put: slack-alert-deploy
|
|
127
|
+
params:
|
|
128
|
+
alert_type: 'failed'
|
|
129
|
+
message: Migrations deployment failed
|
|
Binary file
|
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.concourse/private.yml filter=git-crypt diff=git-crypt
|
package/dist/entity/index.js
CHANGED
|
@@ -19,8 +19,10 @@ var _trustPayments = _interopRequireDefault(require("./trust-payments"));
|
|
|
19
19
|
|
|
20
20
|
var _totalProcessing = _interopRequireDefault(require("./total-processing"));
|
|
21
21
|
|
|
22
|
+
var _token = _interopRequireDefault(require("./token"));
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
|
-
const ENTITIES = [..._agentData.default, ..._bank.default, ..._nuapay.default, ..._payment.default, ..._totalProcessing.default, ..._trustPayments.default, ..._user.default];
|
|
26
|
+
const ENTITIES = [..._agentData.default, ..._bank.default, ..._nuapay.default, ..._payment.default, ..._token.default, ..._totalProcessing.default, ..._trustPayments.default, ..._user.default];
|
|
25
27
|
var _default = ENTITIES;
|
|
26
28
|
exports.default = _default;
|
|
@@ -15,7 +15,7 @@ var _booking = _interopRequireDefault(require("../../agent-data/booking"));
|
|
|
15
15
|
|
|
16
16
|
var _transaction = _interopRequireDefault(require("../transaction"));
|
|
17
17
|
|
|
18
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
|
|
18
|
+
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;
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -58,8 +58,17 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
58
58
|
type: "varchar",
|
|
59
59
|
length: "200"
|
|
60
60
|
}), _dec15 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.payment_link), _dec16 = (0, _typeorm.Column)({
|
|
61
|
+
type: "boolean",
|
|
62
|
+
default: true
|
|
63
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
64
|
+
type: "boolean",
|
|
65
|
+
default: true
|
|
66
|
+
}), _dec18 = (0, _typeorm.Column)({
|
|
67
|
+
type: "boolean",
|
|
68
|
+
default: false
|
|
69
|
+
}), _dec19 = (0, _typeorm.Column)({
|
|
61
70
|
type: "timestamp with time zone"
|
|
62
|
-
}),
|
|
71
|
+
}), _dec20 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentLink {
|
|
63
72
|
constructor() {
|
|
64
73
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
65
74
|
|
|
@@ -83,9 +92,15 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
83
92
|
|
|
84
93
|
_initializerDefineProperty(this, "transactions", _descriptor11, this);
|
|
85
94
|
|
|
86
|
-
_initializerDefineProperty(this, "
|
|
95
|
+
_initializerDefineProperty(this, "open_banking_enabled", _descriptor12, this);
|
|
87
96
|
|
|
88
|
-
_initializerDefineProperty(this, "
|
|
97
|
+
_initializerDefineProperty(this, "card_enabled", _descriptor13, this);
|
|
98
|
+
|
|
99
|
+
_initializerDefineProperty(this, "moto", _descriptor14, this);
|
|
100
|
+
|
|
101
|
+
_initializerDefineProperty(this, "expires_at", _descriptor15, this);
|
|
102
|
+
|
|
103
|
+
_initializerDefineProperty(this, "created_at", _descriptor16, this);
|
|
89
104
|
}
|
|
90
105
|
|
|
91
106
|
generateExpiryDate() {
|
|
@@ -104,7 +119,11 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
104
119
|
cancel_url: this.cancel_url,
|
|
105
120
|
customer_name: this.customer_name,
|
|
106
121
|
expires_at: this.expires_at,
|
|
107
|
-
created_at: this.created_at
|
|
122
|
+
created_at: this.created_at,
|
|
123
|
+
methods: {
|
|
124
|
+
open_banking: this.open_banking_enabled,
|
|
125
|
+
card: this.card_enabled
|
|
126
|
+
}
|
|
108
127
|
};
|
|
109
128
|
|
|
110
129
|
if (this.booking !== null) {
|
|
@@ -128,8 +147,12 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
128
147
|
amount: this.amount,
|
|
129
148
|
description: this.description,
|
|
130
149
|
expires_at: this.expires_at,
|
|
131
|
-
created_at: this.created_at
|
|
132
|
-
|
|
150
|
+
created_at: this.created_at,
|
|
151
|
+
methods: {
|
|
152
|
+
open_banking: this.open_banking_enabled,
|
|
153
|
+
card: this.card_enabled
|
|
154
|
+
}
|
|
155
|
+
};
|
|
133
156
|
}
|
|
134
157
|
|
|
135
158
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -205,14 +228,29 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
|
|
|
205
228
|
enumerable: true,
|
|
206
229
|
writable: true,
|
|
207
230
|
initializer: null
|
|
208
|
-
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
231
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "open_banking_enabled", [_dec16], {
|
|
232
|
+
configurable: true,
|
|
233
|
+
enumerable: true,
|
|
234
|
+
writable: true,
|
|
235
|
+
initializer: null
|
|
236
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "card_enabled", [_dec17], {
|
|
237
|
+
configurable: true,
|
|
238
|
+
enumerable: true,
|
|
239
|
+
writable: true,
|
|
240
|
+
initializer: null
|
|
241
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "moto", [_dec18], {
|
|
242
|
+
configurable: true,
|
|
243
|
+
enumerable: true,
|
|
244
|
+
writable: true,
|
|
245
|
+
initializer: null
|
|
246
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "expires_at", [_dec19], {
|
|
209
247
|
configurable: true,
|
|
210
248
|
enumerable: true,
|
|
211
249
|
writable: true,
|
|
212
250
|
initializer: function () {
|
|
213
251
|
return this.generateExpiryDate();
|
|
214
252
|
}
|
|
215
|
-
}),
|
|
253
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec20], {
|
|
216
254
|
configurable: true,
|
|
217
255
|
enumerable: true,
|
|
218
256
|
writable: true,
|
|
@@ -23,7 +23,9 @@ var _transactionMetadata = _interopRequireDefault(require("../transaction-metada
|
|
|
23
23
|
|
|
24
24
|
var _paymentProvider = _interopRequireDefault(require("../payment-provider"));
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _organisationPaymentProvider = _interopRequireDefault(require("../organisation-payment-provider"));
|
|
27
|
+
|
|
28
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16;
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
31
|
|
|
@@ -63,14 +65,22 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
63
65
|
}), _dec16 = (0, _typeorm.OneToOne)(() => _transactionMetadata.default, transactionMetadata => transactionMetadata.transaction), _dec17 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec18 = (0, _typeorm.JoinColumn)({
|
|
64
66
|
name: 'payment_provider_id',
|
|
65
67
|
referencedColumnName: 'id'
|
|
66
|
-
}), _dec19 = (0, _typeorm.
|
|
68
|
+
}), _dec19 = (0, _typeorm.ManyToOne)(() => _organisationPaymentProvider.default, {
|
|
69
|
+
nullable: true
|
|
70
|
+
}), _dec20 = (0, _typeorm.JoinColumn)({
|
|
71
|
+
name: 'organisation_payment_provider_id',
|
|
72
|
+
referencedColumnName: 'id'
|
|
73
|
+
}), _dec21 = (0, _typeorm.Column)({
|
|
67
74
|
type: "varchar",
|
|
68
75
|
length: "250",
|
|
69
76
|
nullable: true
|
|
70
|
-
}),
|
|
77
|
+
}), _dec22 = (0, _typeorm.Column)({
|
|
71
78
|
type: "timestamp with time zone",
|
|
72
79
|
nullable: true
|
|
73
|
-
}),
|
|
80
|
+
}), _dec23 = (0, _typeorm.CreateDateColumn)(), _dec24 = (0, _typeorm.Column)({
|
|
81
|
+
type: "text",
|
|
82
|
+
nullable: true
|
|
83
|
+
}), _dec25 = (0, _typeorm.UpdateDateColumn)(), _dec(_class = (_class2 = class Transaction {
|
|
74
84
|
constructor() {
|
|
75
85
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
76
86
|
|
|
@@ -92,11 +102,17 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
92
102
|
|
|
93
103
|
_initializerDefineProperty(this, "payment_provider", _descriptor10, this);
|
|
94
104
|
|
|
95
|
-
_initializerDefineProperty(this, "
|
|
105
|
+
_initializerDefineProperty(this, "organisation_payment_provider", _descriptor11, this);
|
|
106
|
+
|
|
107
|
+
_initializerDefineProperty(this, "provider_reference", _descriptor12, this);
|
|
96
108
|
|
|
97
|
-
_initializerDefineProperty(this, "completed_at",
|
|
109
|
+
_initializerDefineProperty(this, "completed_at", _descriptor13, this);
|
|
98
110
|
|
|
99
|
-
_initializerDefineProperty(this, "created_at",
|
|
111
|
+
_initializerDefineProperty(this, "created_at", _descriptor14, this);
|
|
112
|
+
|
|
113
|
+
_initializerDefineProperty(this, "message", _descriptor15, this);
|
|
114
|
+
|
|
115
|
+
_initializerDefineProperty(this, "updated_at", _descriptor16, this);
|
|
100
116
|
}
|
|
101
117
|
|
|
102
118
|
getPublicData() {
|
|
@@ -195,19 +211,36 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
195
211
|
initializer: function () {
|
|
196
212
|
return _paymentProvider.default;
|
|
197
213
|
}
|
|
198
|
-
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
214
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "organisation_payment_provider", [_dec19, _dec20], {
|
|
215
|
+
configurable: true,
|
|
216
|
+
enumerable: true,
|
|
217
|
+
writable: true,
|
|
218
|
+
initializer: function () {
|
|
219
|
+
return _organisationPaymentProvider.default;
|
|
220
|
+
}
|
|
221
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "provider_reference", [_dec21], {
|
|
199
222
|
configurable: true,
|
|
200
223
|
enumerable: true,
|
|
201
224
|
writable: true,
|
|
202
225
|
initializer: function () {
|
|
203
226
|
return "";
|
|
204
227
|
}
|
|
205
|
-
}),
|
|
228
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec22], {
|
|
229
|
+
configurable: true,
|
|
230
|
+
enumerable: true,
|
|
231
|
+
writable: true,
|
|
232
|
+
initializer: null
|
|
233
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec23], {
|
|
234
|
+
configurable: true,
|
|
235
|
+
enumerable: true,
|
|
236
|
+
writable: true,
|
|
237
|
+
initializer: null
|
|
238
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "message", [_dec24], {
|
|
206
239
|
configurable: true,
|
|
207
240
|
enumerable: true,
|
|
208
241
|
writable: true,
|
|
209
242
|
initializer: null
|
|
210
|
-
}),
|
|
243
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec25], {
|
|
211
244
|
configurable: true,
|
|
212
245
|
enumerable: true,
|
|
213
246
|
writable: true,
|
|
@@ -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 _token = _interopRequireDefault(require("./token"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const ENTITIES = [_token.default];
|
|
13
|
+
var _default = ENTITIES;
|
|
14
|
+
exports.default = _default;
|
|
@@ -11,7 +11,9 @@ var _uuid = require("uuid");
|
|
|
11
11
|
|
|
12
12
|
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _user = _interopRequireDefault(require("../../user/user"));
|
|
15
|
+
|
|
16
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
@@ -35,11 +37,14 @@ let Token = (_dec = (0, _typeorm.Entity)({
|
|
|
35
37
|
length: "150"
|
|
36
38
|
}), _dec7 = (0, _typeorm.Column)({
|
|
37
39
|
type: "varchar",
|
|
38
|
-
length: "
|
|
40
|
+
length: "250"
|
|
39
41
|
}), _dec8 = (0, _typeorm.Column)({
|
|
40
42
|
type: "varchar",
|
|
41
43
|
length: "4"
|
|
42
|
-
}), _dec9 = (0, _typeorm.
|
|
44
|
+
}), _dec9 = (0, _typeorm.ManyToOne)(() => _user.default), _dec10 = (0, _typeorm.JoinColumn)({
|
|
45
|
+
name: 'user_id',
|
|
46
|
+
referencedColumnName: 'id'
|
|
47
|
+
}), _dec11 = (0, _typeorm.CreateDateColumn)(), _dec12 = (0, _typeorm.DeleteDateColumn)(), _dec(_class = (_class2 = class Token {
|
|
43
48
|
constructor() {
|
|
44
49
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
45
50
|
|
|
@@ -53,7 +58,11 @@ let Token = (_dec = (0, _typeorm.Entity)({
|
|
|
53
58
|
|
|
54
59
|
_initializerDefineProperty(this, "secret_key_last_four", _descriptor6, this);
|
|
55
60
|
|
|
56
|
-
_initializerDefineProperty(this, "
|
|
61
|
+
_initializerDefineProperty(this, "user", _descriptor7, this);
|
|
62
|
+
|
|
63
|
+
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
64
|
+
|
|
65
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor9, this);
|
|
57
66
|
}
|
|
58
67
|
|
|
59
68
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -98,7 +107,19 @@ let Token = (_dec = (0, _typeorm.Entity)({
|
|
|
98
107
|
initializer: function () {
|
|
99
108
|
return "";
|
|
100
109
|
}
|
|
101
|
-
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
110
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec9, _dec10], {
|
|
111
|
+
configurable: true,
|
|
112
|
+
enumerable: true,
|
|
113
|
+
writable: true,
|
|
114
|
+
initializer: function () {
|
|
115
|
+
return _user.default;
|
|
116
|
+
}
|
|
117
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec11], {
|
|
118
|
+
configurable: true,
|
|
119
|
+
enumerable: true,
|
|
120
|
+
writable: true,
|
|
121
|
+
initializer: null
|
|
122
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec12], {
|
|
102
123
|
configurable: true,
|
|
103
124
|
enumerable: true,
|
|
104
125
|
writable: true,
|
|
@@ -39,7 +39,8 @@ let Chargeback = (_dec = (0, _typeorm.Entity)({
|
|
|
39
39
|
}), _dec8 = (0, _typeorm.Column)({
|
|
40
40
|
type: "int"
|
|
41
41
|
}), _dec9 = (0, _typeorm.Column)({
|
|
42
|
-
type: "date"
|
|
42
|
+
type: "date",
|
|
43
|
+
nullable: true
|
|
43
44
|
}), _dec10 = (0, _typeorm.Column)({
|
|
44
45
|
type: "date"
|
|
45
46
|
}), _dec11 = (0, _typeorm.Column)({
|
|
@@ -9,7 +9,7 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _organisation = _interopRequireDefault(require("../organisation"));
|
|
11
11
|
|
|
12
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
|
|
12
|
+
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, _descriptor12;
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
@@ -60,6 +60,9 @@ let User = (_dec = (0, _typeorm.Entity)({
|
|
|
60
60
|
name: "organisation_id",
|
|
61
61
|
referencedColumnName: "id"
|
|
62
62
|
}
|
|
63
|
+
}), _dec15 = (0, _typeorm.Column)({
|
|
64
|
+
type: "boolean",
|
|
65
|
+
default: false
|
|
63
66
|
}), _dec(_class = (_class2 = class User {
|
|
64
67
|
constructor() {
|
|
65
68
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
@@ -83,6 +86,8 @@ let User = (_dec = (0, _typeorm.Entity)({
|
|
|
83
86
|
_initializerDefineProperty(this, "deleted_at", _descriptor10, this);
|
|
84
87
|
|
|
85
88
|
_initializerDefineProperty(this, "organisations", _descriptor11, this);
|
|
89
|
+
|
|
90
|
+
_initializerDefineProperty(this, "is_api_user", _descriptor12, this);
|
|
86
91
|
}
|
|
87
92
|
|
|
88
93
|
propgate(email, mobile, status, firstName, lastName) {
|
|
@@ -182,5 +187,12 @@ let User = (_dec = (0, _typeorm.Entity)({
|
|
|
182
187
|
enumerable: true,
|
|
183
188
|
writable: true,
|
|
184
189
|
initializer: null
|
|
190
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "is_api_user", [_dec15], {
|
|
191
|
+
configurable: true,
|
|
192
|
+
enumerable: true,
|
|
193
|
+
writable: true,
|
|
194
|
+
initializer: function () {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
185
197
|
})), _class2)) || _class);
|
|
186
198
|
exports.default = User;
|
package/dist/index.js
CHANGED
|
@@ -249,6 +249,12 @@ Object.defineProperty(exports, "TProTransactionMetadataEntity", {
|
|
|
249
249
|
return _transactionMetadata2.default;
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
|
+
Object.defineProperty(exports, "TokenEntity", {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function () {
|
|
255
|
+
return _token.default;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
252
258
|
Object.defineProperty(exports, "TransactionEntity", {
|
|
253
259
|
enumerable: true,
|
|
254
260
|
get: function () {
|
|
@@ -392,6 +398,8 @@ var _transaction3 = _interopRequireDefault(require("./entity/total-processing/tr
|
|
|
392
398
|
|
|
393
399
|
var _transactionMetadata2 = _interopRequireDefault(require("./entity/total-processing/transaction-metadata"));
|
|
394
400
|
|
|
401
|
+
var _token = _interopRequireDefault(require("./entity/token/token"));
|
|
402
|
+
|
|
395
403
|
var _batch = _interopRequireDefault(require("./entity/trust-payments/batch"));
|
|
396
404
|
|
|
397
405
|
var _merchant = _interopRequireDefault(require("./entity/trust-payments/merchant"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class trustChargebackDue1648137333608 {
|
|
4
|
+
name = 'trustChargebackDue1648137333608'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "trust_payments"."chargeback" ALTER COLUMN "due_date" DROP NOT NULL`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "trust_payments"."chargeback" ALTER COLUMN "due_date" SET NOT NULL`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class paymentLinkMethods1647251762169 {
|
|
4
|
+
name = 'paymentLinkMethods1647251762169'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "open_banking_enabled" boolean NOT NULL DEFAULT true`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "card_enabled" boolean NOT NULL DEFAULT true`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "card_enabled"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "open_banking_enabled"`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class paymentLinkMoto1647271619083 {
|
|
4
|
+
name = 'paymentLinkMoto1647271619083'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "moto" boolean NOT NULL DEFAULT false`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "moto"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class providerSecretLength1647292573651 {
|
|
4
|
+
name = 'providerSecretLength1647292573651'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "secret_key"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "secret_key" character varying(512) NOT NULL`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "secret_key"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "secret_key" character varying(150) NOT NULL`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class providerSecretLength1647294601399 {
|
|
4
|
+
name = 'providerSecretLength1647294601399'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "secret_key"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "secret_key" character varying(256) NOT NULL`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" DROP COLUMN "secret_key"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."organisation_payment_provider" ADD "secret_key" character varying(250) NOT NULL`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionOrganisationPaymentProvider1647428635630 {
|
|
4
|
+
name = 'transactionOrganisationPaymentProvider1647428635630'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "organisation_payment_provider_id" character varying`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "FK_750e63e5ad1c7c9a3f742b043dc" FOREIGN KEY ("organisation_payment_provider_id") REFERENCES "payment"."organisation_payment_provider"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "FK_750e63e5ad1c7c9a3f742b043dc"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "organisation_payment_provider_id"`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionMessage1647437109221 {
|
|
4
|
+
name = 'transactionMessage1647437109221'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "message" text`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "message"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionUpdatedAt1647437500834 {
|
|
4
|
+
name = 'transactionUpdatedAt1647437500834'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "updated_at" TIMESTAMP NOT NULL DEFAULT now()`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "updated_at"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class tokenSecretLength1645618345963 {
|
|
4
|
+
name = 'tokenSecretLength1645618345963'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP COLUMN "secret_key"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD "secret_key" character varying(250) NOT NULL`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP COLUMN "secret_key"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD "secret_key" character varying(150) NOT NULL`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class tokenUser1645621420506 {
|
|
4
|
+
name = 'tokenUser1645621420506'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD "deleted_at" TIMESTAMP`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD "user_id" character varying`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD CONSTRAINT "FK_e50ca89d635960fda2ffeb17639" FOREIGN KEY ("user_id") REFERENCES "user"."user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP CONSTRAINT "FK_e50ca89d635960fda2ffeb17639"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP COLUMN "user_id"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP COLUMN "deleted_at"`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class userIsApiUser1645621100580 {
|
|
4
|
+
name = 'userIsApiUser1645621100580'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "user"."user" ADD "is_api_user" boolean NOT NULL DEFAULT false`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "user"."user" DROP COLUMN "is_api_user"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -26,13 +26,15 @@ class Warehouse extends _dependencyAware.default {
|
|
|
26
26
|
this.connection = null;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @
|
|
29
|
+
* Connect to the warehouse
|
|
30
|
+
* @param database
|
|
31
|
+
* @param cache
|
|
32
|
+
* @returns {Promise<null>}
|
|
31
33
|
*/
|
|
32
34
|
|
|
33
35
|
|
|
34
|
-
async connect() {
|
|
35
|
-
if (this.connection) {
|
|
36
|
+
async connect(database = null, cache = true) {
|
|
37
|
+
if (this.connection && cache === true) {
|
|
36
38
|
return this.connection;
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -41,7 +43,7 @@ class Warehouse extends _dependencyAware.default {
|
|
|
41
43
|
} catch (error) {
|
|
42
44
|
this.connection = await (0, _typeorm.createConnection)({
|
|
43
45
|
type: 'aurora-data-api-pg',
|
|
44
|
-
database: process.env.WAREHOUSE_DATABASE,
|
|
46
|
+
database: database !== null ? database : process.env.WAREHOUSE_DATABASE,
|
|
45
47
|
schema: process.env.WAREHOUSE_SCHEMA,
|
|
46
48
|
secretArn: process.env.WAREHOUSE_SECRET_ARN,
|
|
47
49
|
resourceArn: process.env.WAREHOUSE_ARN,
|
package/dist/wrapper/index.js
CHANGED
|
@@ -54,38 +54,26 @@ const handleSuccess = (di, outcome) => {
|
|
|
54
54
|
*
|
|
55
55
|
* @param {DependencyInjection} di
|
|
56
56
|
* @param {Error} error
|
|
57
|
-
* @param {boolean} [throwError=false]
|
|
58
57
|
*/
|
|
59
58
|
|
|
60
59
|
|
|
61
60
|
exports.handleSuccess = handleSuccess;
|
|
62
61
|
|
|
63
|
-
const handleError = (di, error
|
|
62
|
+
const handleError = (di, error) => {
|
|
64
63
|
const logger = di.get(_dependencies.DEFINITIONS.LOGGER);
|
|
65
64
|
logger.metric('lambda.status_code', error.code || 500);
|
|
65
|
+
logger.error(error);
|
|
66
66
|
|
|
67
|
-
if (error
|
|
68
|
-
|
|
67
|
+
if (error instanceof _response.default) {
|
|
68
|
+
return error.generate();
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
if (error instanceof Error) {
|
|
73
|
-
return error;
|
|
74
|
-
} // We want to be absolutely sure
|
|
75
|
-
// that we are returning an error
|
|
76
|
-
// as Lambda sync handlers will only fail
|
|
77
|
-
// if the object is instanceof Error
|
|
71
|
+
const response = new _response.default({}, Number.isInteger(error.code) ? error.code : 500);
|
|
78
72
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (error instanceof _response.default) {
|
|
84
|
-
return error.generate();
|
|
73
|
+
if (typeof error.body !== 'undefined') {
|
|
74
|
+
response.setErrors(error.body || {});
|
|
85
75
|
}
|
|
86
76
|
|
|
87
|
-
const response = new _response.default({}, error.code || 500);
|
|
88
|
-
response.setErrors(error.body || {});
|
|
89
77
|
return response.generate();
|
|
90
78
|
};
|
|
91
79
|
/**
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@felloh-org/lambda-wrapper",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"description": "Lambda wrapper for all Felloh Serverless Projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "./node_modules/.bin/babel src --out-dir dist --copy-files --ignore src/migration",
|
|
8
8
|
"build:orm": "./node_modules/.bin/babel src --out-dir dist --copy-files --ignore src/migration",
|
|
9
|
+
"concourse:deploy": "fly -t felloh-cicd set-pipeline -p lambda-wrapper -c .concourse/pipeline.yml -l .concourse/private.yml",
|
|
10
|
+
"concourse:login": "fly --target felloh-cicd login --insecure --concourse-url https://ci.services.felloh.org --team-name libraries",
|
|
11
|
+
"concourse:sync": "sudo fly -t ci sync",
|
|
9
12
|
"lint": "./node_modules/.bin/eslint ./src",
|
|
10
13
|
"orm:migration:generate": "rm -rf dist && yarn build:orm && ./node_modules/.bin/typeorm migration:generate -o -n",
|
|
11
14
|
"orm:migration:run": "rm -rf dist && yarn build:orm && ./node_modules/.bin/typeorm migration:run",
|
|
@@ -34,7 +37,6 @@
|
|
|
34
37
|
"babel-jest": "^26.3.3",
|
|
35
38
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
36
39
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
37
|
-
"dotenv": "^11.0.0",
|
|
38
40
|
"eslint": "^8.6.0",
|
|
39
41
|
"eslint-plugin-flowtype": "^8.0.3",
|
|
40
42
|
"eslint-plugin-import": "^2.25.3",
|
|
@@ -52,6 +54,7 @@
|
|
|
52
54
|
"alai": "1.0.3",
|
|
53
55
|
"async": "^3.2.0",
|
|
54
56
|
"axios": "^0.21.1",
|
|
57
|
+
"dotenv": "^11.0.0",
|
|
55
58
|
"epsagon": "^1.104.2",
|
|
56
59
|
"typeorm": "^0.2.41",
|
|
57
60
|
"typeorm-aurora-data-api-driver": "^2.3.5",
|