ti2-tourplan 1.0.63 → 1.0.65
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/__snapshots__/index.test.js.snap +2 -0
- package/index.js +12 -1
- package/package.json +2 -2
- package/resolvers/itinerary.js +1 -0
- package/resolvers/product.js +1 -0
|
@@ -3309,6 +3309,7 @@ Object {
|
|
|
3309
3309
|
"bookingId": "316559",
|
|
3310
3310
|
"bookingStatus": "Quotation",
|
|
3311
3311
|
"canEdit": true,
|
|
3312
|
+
"currency": "GBP",
|
|
3312
3313
|
"enteredDate": "2024-09-12",
|
|
3313
3314
|
"name": "2356674/1 Sean Conta",
|
|
3314
3315
|
"ref": "ALFI393706",
|
|
@@ -3368,6 +3369,7 @@ Object {
|
|
|
3368
3369
|
"description": null,
|
|
3369
3370
|
"options": Array [
|
|
3370
3371
|
Object {
|
|
3372
|
+
"comment": "FIT- V- Class (1-5 Pax)",
|
|
3371
3373
|
"extras": Array [],
|
|
3372
3374
|
"lastUpdateTimestamp": 1700750093,
|
|
3373
3375
|
"optionId": "LONTRDAVIDSHDWBVC",
|
package/index.js
CHANGED
|
@@ -424,7 +424,15 @@ class BuyerPlugin {
|
|
|
424
424
|
hostConnectAgentPassword,
|
|
425
425
|
configuration,
|
|
426
426
|
},
|
|
427
|
-
payload: {
|
|
427
|
+
payload: {
|
|
428
|
+
// single optionId or array of optionIds
|
|
429
|
+
optionId,
|
|
430
|
+
forceRefresh,
|
|
431
|
+
searchInput,
|
|
432
|
+
// lastUpdatedFrom is used to get options that were updated after a certain date in Tourplan
|
|
433
|
+
// example: lastUpdatedFrom: '2024-04-22 05:17:57.427Z'
|
|
434
|
+
lastUpdatedFrom,
|
|
435
|
+
},
|
|
428
436
|
}) {
|
|
429
437
|
const model = {
|
|
430
438
|
OptionInfoRequest: {
|
|
@@ -432,6 +440,9 @@ class BuyerPlugin {
|
|
|
432
440
|
Info: 'G',
|
|
433
441
|
AgentID: hostConnectAgentID,
|
|
434
442
|
Password: hostConnectAgentPassword,
|
|
443
|
+
...(lastUpdatedFrom ? {
|
|
444
|
+
LastUpdateFrom: lastUpdatedFrom,
|
|
445
|
+
} : {}),
|
|
435
446
|
},
|
|
436
447
|
};
|
|
437
448
|
const payload = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ti2-tourplan",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "Tourplan's TI2 Plugin",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"jsonwebtoken": "^8.5.1",
|
|
37
37
|
"moment": "^2.29.1",
|
|
38
38
|
"ramda": "^0.27.1",
|
|
39
|
-
"ti2": "^1.0.
|
|
39
|
+
"ti2": "^1.0.85",
|
|
40
40
|
"underscore": "^1.13.4",
|
|
41
41
|
"xml-js": "^1.6.11",
|
|
42
42
|
"xml2js": "^0.4.23"
|
package/resolvers/itinerary.js
CHANGED
|
@@ -12,6 +12,7 @@ const resolvers = {
|
|
|
12
12
|
ref: R.path(['Ref']),
|
|
13
13
|
agentRef: R.path(['AgentRef']),
|
|
14
14
|
totalPrice: R.path(['TotalPrice']),
|
|
15
|
+
currency: R.path(['Currency']),
|
|
15
16
|
travelDate: R.path(['TravelDate']),
|
|
16
17
|
enteredDate: R.path(['EnteredDate']),
|
|
17
18
|
canEdit: root => root.ReadOnly === 'N' && root.CanAddServices === 'Y',
|
package/resolvers/product.js
CHANGED
|
@@ -20,6 +20,7 @@ const resolvers = {
|
|
|
20
20
|
comment ? `-${comment}` : ''
|
|
21
21
|
}`;
|
|
22
22
|
},
|
|
23
|
+
comment: option => R.path(['OptGeneral', 'Comment'], option),
|
|
23
24
|
lastUpdateTimestamp: option => {
|
|
24
25
|
const lastUpdateISO = R.path(['OptGeneral', 'LastUpdate'], option);
|
|
25
26
|
return lastUpdateISO ? new Date(lastUpdateISO).getTime() / 1000 : null;
|