ti2-ventrata 1.0.31 → 1.0.32
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/index.js +12 -3
- package/index.test.js +4 -4
- package/package.json +1 -1
- package/resolvers/availability.js +1 -1
package/index.js
CHANGED
|
@@ -17,13 +17,13 @@ const getHeaders = ({
|
|
|
17
17
|
apiKey,
|
|
18
18
|
acceptLanguage,
|
|
19
19
|
octoEnv,
|
|
20
|
-
resellerId,
|
|
20
|
+
// resellerId,
|
|
21
21
|
}) => ({
|
|
22
22
|
Authorization: `Bearer ${apiKey}`,
|
|
23
23
|
...octoEnv ? { 'Octo-Env': octoEnv } : {},
|
|
24
24
|
...acceptLanguage ? { 'Accept-Language': acceptLanguage } : {},
|
|
25
25
|
'Content-Type': 'application/json',
|
|
26
|
-
...resellerId ? { Referer: resellerId } : {}
|
|
26
|
+
// ...resellerId ? { Referer: resellerId } : {},+
|
|
27
27
|
'Octo-Capabilities': 'octo/pricing,octo/pickups,octo/cart,octo/offers',
|
|
28
28
|
// 'Octo-Capabilities': 'octo/pricing',
|
|
29
29
|
});
|
|
@@ -381,7 +381,7 @@ class Plugin {
|
|
|
381
381
|
},
|
|
382
382
|
notes,
|
|
383
383
|
resellerReference: reference,
|
|
384
|
-
settlementMethod:
|
|
384
|
+
settlementMethod: 'DEFERRED',
|
|
385
385
|
};
|
|
386
386
|
booking = R.path(['data'], await axios({
|
|
387
387
|
method: 'post',
|
|
@@ -578,6 +578,15 @@ class Plugin {
|
|
|
578
578
|
})),
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
|
+
|
|
582
|
+
// eslint-disable-next-line class-methods-use-this
|
|
583
|
+
async getCreateBookingFields() {
|
|
584
|
+
const customFields = [];
|
|
585
|
+
return {
|
|
586
|
+
fields: [],
|
|
587
|
+
customFields,
|
|
588
|
+
};
|
|
589
|
+
}
|
|
581
590
|
}
|
|
582
591
|
|
|
583
592
|
module.exports = Plugin;
|
package/index.test.js
CHANGED
|
@@ -175,12 +175,12 @@ describe('search tests', () => {
|
|
|
175
175
|
endDate: moment().add(6, 'M').add(2, 'd').format(dateFormat),
|
|
176
176
|
dateFormat,
|
|
177
177
|
productIds: [
|
|
178
|
-
'
|
|
178
|
+
'20ef1799-7020-484b-9fb5-905ec5bb5444',
|
|
179
179
|
'3465143f-4902-447a-9c1e-8e5598666663',
|
|
180
180
|
],
|
|
181
181
|
optionIds: ['DEFAULT', 'dbe73645-2dd9-4cde-ade0-4faa95668d01'],
|
|
182
182
|
units: [
|
|
183
|
-
[{ unitId: '
|
|
183
|
+
[{ unitId: 'unit_3e987c7b-b87e-47bf-8638-148cdaf700af', quantity: 2 }],
|
|
184
184
|
[{ unitId: 'unit_d49f8d25-5b37-4365-b67d-daa0594d021e', quantity: 2 }],
|
|
185
185
|
],
|
|
186
186
|
},
|
|
@@ -207,7 +207,7 @@ describe('search tests', () => {
|
|
|
207
207
|
holder: {
|
|
208
208
|
name: fullName[0],
|
|
209
209
|
surname: fullName[1],
|
|
210
|
-
|
|
210
|
+
phone: faker.phone.phoneNumber(),
|
|
211
211
|
emailAddress: `salvador+tests_${faker.lorem.slug()}@tourconnect.com`,
|
|
212
212
|
country: faker.address.countryCode(),
|
|
213
213
|
locales: ['en-US', 'en', 'es'],
|
|
@@ -307,7 +307,7 @@ describe('search tests', () => {
|
|
|
307
307
|
holder: {
|
|
308
308
|
name: fullName[0],
|
|
309
309
|
surname: fullName[1],
|
|
310
|
-
|
|
310
|
+
phone: faker.phone.phoneNumber(),
|
|
311
311
|
emailAddress: `salvador+tests_${faker.lorem.slug()}@tourconnect.com`,
|
|
312
312
|
country: faker.address.countryCode(),
|
|
313
313
|
locales: ['en-US', 'en', 'es'],
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ const resolvers = {
|
|
|
28
28
|
dateTimeEnd: root => R.path(['localDateTimeEnd'], root) || R.path(['localDate'], root),
|
|
29
29
|
allDay: R.path(['allDay']),
|
|
30
30
|
vacancies: R.prop('vacancies'),
|
|
31
|
-
available: root => root.status !== 'SOLD_OUT',
|
|
31
|
+
available: root => root.status !== 'SOLD_OUT' && root.vacancies > 0,
|
|
32
32
|
offers: root => R.pathOr([], ['offers'], root).map(o => ({
|
|
33
33
|
offerId: o.code,
|
|
34
34
|
title: o.title,
|