@vendit-dev/thirdparty-adapters 0.3.29 → 0.3.31

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.
@@ -114,7 +114,6 @@ var ThemrIoTAdapter = /** @class */ (function () {
114
114
  case 0: return [4 /*yield*/, this.redis.get(ThemrIoTAdapter.indexAccommodation({ accommodationId: accommodationId }))];
115
115
  case 1:
116
116
  existingAuth = _b.sent();
117
- console.log('AUTH 1', existingAuth);
118
117
  if (existingAuth) {
119
118
  if (existingAuth === 'NOT_FOUND') {
120
119
  return [2 /*return*/, false];
@@ -128,12 +127,10 @@ var ThemrIoTAdapter = /** @class */ (function () {
128
127
  return [4 /*yield*/, this.redis.get(ThemrIoTAdapter.indexAccommodation({ accommodationId: accommodationId }))];
129
128
  case 3:
130
129
  existingAuth = _b.sent();
131
- console.log('AUTH 2', existingAuth);
132
130
  _b.label = 4;
133
131
  case 4:
134
132
  _b.trys.push([4, 9, 10, 12]);
135
133
  if (existingAuth) {
136
- console.log('AUTH 3', this.parseJSONSafe(existingAuth));
137
134
  return [2 /*return*/, this.parseJSONSafe(existingAuth)];
138
135
  }
139
136
  return [4 /*yield*/, this.authenticator.getThirdPartyCredential({
@@ -142,16 +139,14 @@ var ThemrIoTAdapter = /** @class */ (function () {
142
139
  })];
143
140
  case 5:
144
141
  newAuth = _b.sent();
145
- console.log('AUTH 4', newAuth);
146
142
  if (!(!newAuth || !(newAuth === null || newAuth === void 0 ? void 0 : newAuth.credential))) return [3 /*break*/, 7];
147
- return [4 /*yield*/, this.redis.set(ThemrIoTAdapter.indexAccommodation({ accommodationId: accommodationId }), 'NOT_FOUND', 'EX', 60 * 10)];
143
+ return [4 /*yield*/, this.redis.set(ThemrIoTAdapter.indexAccommodation({ accommodationId: accommodationId }), 'NOT_FOUND', 'EX', 60 * 5)];
148
144
  case 6:
149
145
  _b.sent();
150
146
  return [2 /*return*/, false];
151
147
  case 7:
152
148
  parsedCredential = this.parseJSONSafe(newAuth.credential);
153
- console.log('AUTH 4', parsedCredential);
154
- return [4 /*yield*/, this.redis.set(ThemrIoTAdapter.indexAccommodation({ accommodationId: accommodationId }), newAuth.credential, 'EX', 60 * 10)];
149
+ return [4 /*yield*/, this.redis.set(ThemrIoTAdapter.indexAccommodation({ accommodationId: accommodationId }), newAuth.credential, 'EX', 60 * 5)];
155
150
  case 8:
156
151
  _b.sent();
157
152
  return [2 /*return*/, parsedCredential];
@@ -168,10 +163,8 @@ var ThemrIoTAdapter = /** @class */ (function () {
168
163
  });
169
164
  });
170
165
  };
171
- this.getDefaultCheckInDate = function () { return moment_1.default().format(_this.timeFormat); };
172
- this.getDefaultCheckOutDate = function () {
173
- return moment_1.default().add(3, 'd').format(_this.timeFormat);
174
- };
166
+ this.getDefaultCheckInDate = function () { return moment_1.default().add(9, 'hours').format(_this.timeFormat); };
167
+ this.getDefaultCheckOutDate = function () { return moment_1.default().add(9, 'hours').add(3, 'd').format(_this.timeFormat); };
175
168
  this.getAccommodationAccessToken = function (accommodationId) { return __awaiter(_this, void 0, void 0, function () {
176
169
  var authInfo;
177
170
  return __generator(this, function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendit-dev/thirdparty-adapters",
3
- "version": "0.3.29",
3
+ "version": "0.3.31",
4
4
  "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {