@felloh-org/lambda-wrapper 1.11.68 → 1.11.70

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.
@@ -7,7 +7,11 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
10
+ var _customer = _interopRequireDefault(require("../../payment/customer"));
11
+
12
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
15
 
12
16
  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
17
 
@@ -25,29 +29,48 @@ let Token = exports.default = (_dec = (0, _typeorm.Entity)({
25
29
  type: "varchar",
26
30
  length: "250",
27
31
  nullable: true
28
- }), _dec4 = (0, _typeorm.Column)({
32
+ }), _dec4 = (0, _typeorm.ManyToOne)(() => _customer.default, {
33
+ nullable: true
34
+ }), _dec5 = (0, _typeorm.JoinColumn)({
35
+ name: 'customer_id',
36
+ referencedColumnName: 'id'
37
+ }), _dec6 = (0, _typeorm.Column)({
29
38
  type: "boolean",
30
39
  default: false
31
- }), _dec5 = (0, _typeorm.CreateDateColumn)({
40
+ }), _dec7 = (0, _typeorm.Column)({
41
+ type: "varchar",
42
+ length: "10",
43
+ nullable: true
44
+ }), _dec8 = (0, _typeorm.Column)({
45
+ type: "varchar",
46
+ length: "20",
47
+ nullable: true
48
+ }), _dec9 = (0, _typeorm.CreateDateColumn)({
32
49
  type: 'timestamp with time zone'
33
- }), _dec6 = (0, _typeorm.UpdateDateColumn)({
50
+ }), _dec10 = (0, _typeorm.UpdateDateColumn)({
34
51
  type: 'timestamp with time zone'
35
- }), _dec7 = (0, _typeorm.DeleteDateColumn)({
52
+ }), _dec11 = (0, _typeorm.DeleteDateColumn)({
36
53
  type: 'timestamp with time zone',
37
54
  nullable: true
38
55
  }), _dec(_class = (_class2 = class Token {
39
56
  constructor() {
40
57
  _initializerDefineProperty(this, "id", _descriptor, this);
41
58
 
42
- _initializerDefineProperty(this, "customer_name", _descriptor2, this);
59
+ _initializerDefineProperty(this, "cardholder_name", _descriptor2, this);
43
60
 
44
- _initializerDefineProperty(this, "store_token", _descriptor3, this);
61
+ _initializerDefineProperty(this, "customer", _descriptor3, this);
45
62
 
46
- _initializerDefineProperty(this, "created_at", _descriptor4, this);
63
+ _initializerDefineProperty(this, "store_token", _descriptor4, this);
47
64
 
48
- _initializerDefineProperty(this, "updated_at", _descriptor5, this);
65
+ _initializerDefineProperty(this, "bin", _descriptor5, this);
49
66
 
50
- _initializerDefineProperty(this, "deleted_at", _descriptor6, this);
67
+ _initializerDefineProperty(this, "card_brand", _descriptor6, this);
68
+
69
+ _initializerDefineProperty(this, "created_at", _descriptor7, this);
70
+
71
+ _initializerDefineProperty(this, "updated_at", _descriptor8, this);
72
+
73
+ _initializerDefineProperty(this, "deleted_at", _descriptor9, this);
51
74
  }
52
75
 
53
76
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -57,31 +80,52 @@ let Token = exports.default = (_dec = (0, _typeorm.Entity)({
57
80
  initializer: function () {
58
81
  return undefined;
59
82
  }
60
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec3], {
83
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "cardholder_name", [_dec3], {
61
84
  configurable: true,
62
85
  enumerable: true,
63
86
  writable: true,
64
87
  initializer: function () {
65
88
  return "";
66
89
  }
67
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "store_token", [_dec4], {
90
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "customer", [_dec4, _dec5], {
91
+ configurable: true,
92
+ enumerable: true,
93
+ writable: true,
94
+ initializer: function () {
95
+ return _customer.default;
96
+ }
97
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "store_token", [_dec6], {
68
98
  configurable: true,
69
99
  enumerable: true,
70
100
  writable: true,
71
101
  initializer: function () {
72
102
  return false;
73
103
  }
74
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec5], {
104
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "bin", [_dec7], {
105
+ configurable: true,
106
+ enumerable: true,
107
+ writable: true,
108
+ initializer: function () {
109
+ return "";
110
+ }
111
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "card_brand", [_dec8], {
112
+ configurable: true,
113
+ enumerable: true,
114
+ writable: true,
115
+ initializer: function () {
116
+ return "";
117
+ }
118
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec9], {
75
119
  configurable: true,
76
120
  enumerable: true,
77
121
  writable: true,
78
122
  initializer: null
79
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec6], {
123
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec10], {
80
124
  configurable: true,
81
125
  enumerable: true,
82
126
  writable: true,
83
127
  initializer: null
84
- }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec7], {
128
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec11], {
85
129
  configurable: true,
86
130
  enumerable: true,
87
131
  writable: true,
@@ -0,0 +1,19 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class basisTheoryTokenCustomer1705327854669 {
4
+ name = 'basisTheoryTokenCustomer1705327854669'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" DROP COLUMN "customer_name"`);
8
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" ADD "cardholder_name" character varying(250)`);
9
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" ADD "customer_id" character varying`);
10
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" ADD CONSTRAINT "FK_c19a5f00c0589a7eccbf83de5ae" FOREIGN KEY ("customer_id") REFERENCES "payment"."customer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
11
+ }
12
+
13
+ async down(queryRunner) {
14
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" DROP CONSTRAINT "FK_c19a5f00c0589a7eccbf83de5ae"`);
15
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" DROP COLUMN "customer_id"`);
16
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" DROP COLUMN "cardholder_name"`);
17
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" ADD "customer_name" character varying(250)`);
18
+ }
19
+ }
@@ -0,0 +1,15 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class basisTheoryTokenBinBrand1705330136016 {
4
+ name = 'basisTheoryTokenBinBrand1705330136016'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" ADD "bin" character varying(10)`);
8
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" ADD "card_brand" character varying(20)`);
9
+ }
10
+
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" DROP COLUMN "card_brand"`);
13
+ await queryRunner.query(`ALTER TABLE "basis_theory"."token" DROP COLUMN "bin"`);
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.11.68",
3
+ "version": "1.11.70",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {