btrz-api-client 3.34.0 → 3.41.0
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/lib/client-standalone-min.js +1 -1
- package/lib/client.js +8 -5
- package/lib/endpoints/accounts/accounts.js +3 -2
- package/lib/endpoints/accounts/application-settings.js +15 -10
- package/lib/endpoints/accounts/application.js +3 -2
- package/lib/endpoints/accounts/applications.js +6 -4
- package/lib/endpoints/accounts/current-shifts.js +3 -2
- package/lib/endpoints/accounts/customers.js +15 -10
- package/lib/endpoints/accounts/domains.js +57 -0
- package/lib/endpoints/accounts/email-settings.js +15 -10
- package/lib/endpoints/accounts/exchange-rates.js +6 -4
- package/lib/endpoints/accounts/interline.js +27 -18
- package/lib/endpoints/accounts/lexicons.js +12 -8
- package/lib/endpoints/accounts/print-settings.js +12 -8
- package/lib/endpoints/accounts/printers.js +3 -2
- package/lib/endpoints/accounts/shifts.js +3 -2
- package/lib/endpoints/accounts/travellers.js +15 -10
- package/lib/endpoints/accounts/trusted-machines.js +3 -2
- package/lib/endpoints/accounts/users.js +6 -4
- package/lib/endpoints/btrzpay/customerCards.js +12 -8
- package/lib/endpoints/btrzpay/customers.js +9 -7
- package/lib/endpoints/btrzpay/payment-methods.js +18 -12
- package/lib/endpoints/btrzpay/payments.js +6 -4
- package/lib/endpoints/btrzpay/reference-numbers.js +3 -2
- package/lib/endpoints/btrzpay/referenced-payments.js +6 -4
- package/lib/endpoints/btrzpay/square.js +6 -4
- package/lib/endpoints/coltrane/paths.js +3 -2
- package/lib/endpoints/endpoints_helpers.js +28 -6
- package/lib/endpoints/gps/scanner-app-location.js +3 -2
- package/lib/endpoints/inventory/amenities.js +12 -8
- package/lib/endpoints/inventory/amenity-groups.js +12 -8
- package/lib/endpoints/inventory/bare-routes.js +6 -4
- package/lib/endpoints/inventory/brands.js +12 -8
- package/lib/endpoints/inventory/bundle-fares.js +3 -2
- package/lib/endpoints/inventory/bundles.js +6 -4
- package/lib/endpoints/inventory/companies.js +3 -2
- package/lib/endpoints/inventory/countries.js +3 -2
- package/lib/endpoints/inventory/custom-content.js +15 -10
- package/lib/endpoints/inventory/fare-classes.js +9 -6
- package/lib/endpoints/inventory/fares.js +6 -4
- package/lib/endpoints/inventory/fees.js +3 -2
- package/lib/endpoints/inventory/filtered-trips-v2.js +3 -2
- package/lib/endpoints/inventory/filtered-trips.js +3 -2
- package/lib/endpoints/inventory/gift-certificate-definitions.js +3 -2
- package/lib/endpoints/inventory/healthcheck.js +22 -0
- package/lib/endpoints/inventory/insurances.js +15 -10
- package/lib/endpoints/inventory/insurancesCost.js +3 -2
- package/lib/endpoints/inventory/items.js +3 -2
- package/lib/endpoints/inventory/journey-prices.js +9 -6
- package/lib/endpoints/inventory/marketplace-modifiers.js +15 -10
- package/lib/endpoints/inventory/operating-companies.js +12 -8
- package/lib/endpoints/inventory/operation-messages.js +18 -12
- package/lib/endpoints/inventory/parcel-zones.js +9 -6
- package/lib/endpoints/inventory/payment-terminals.js +15 -10
- package/lib/endpoints/inventory/products.js +6 -4
- package/lib/endpoints/inventory/promos.js +21 -14
- package/lib/endpoints/inventory/routes.js +21 -14
- package/lib/endpoints/inventory/schedules.js +3 -2
- package/lib/endpoints/inventory/seatfees.js +12 -8
- package/lib/endpoints/inventory/seatmaps.js +3 -2
- package/lib/endpoints/inventory/service-numbers.js +12 -8
- package/lib/endpoints/inventory/service-types.js +15 -10
- package/lib/endpoints/inventory/ssrs.js +3 -2
- package/lib/endpoints/inventory/station-groups.js +3 -2
- package/lib/endpoints/inventory/stations-zones.js +3 -2
- package/lib/endpoints/inventory/stations.js +6 -4
- package/lib/endpoints/inventory/taxes.js +12 -8
- package/lib/endpoints/inventory/traveller-card-providers-types.js +3 -2
- package/lib/endpoints/inventory/traveller-card-providers.js +12 -8
- package/lib/endpoints/inventory/traveller-card-types.js +15 -10
- package/lib/endpoints/inventory/trips.js +6 -4
- package/lib/endpoints/inventory/zone-price-overages.js +15 -10
- package/lib/endpoints/inventory/zone-prices.js +15 -10
- package/lib/endpoints/invoices/emails.js +3 -2
- package/lib/endpoints/invoices/infile.js +3 -2
- package/lib/endpoints/invoices/pdfs.js +3 -2
- package/lib/endpoints/invoices/providers.js +15 -10
- package/lib/endpoints/invoices/tax-ids.js +30 -0
- package/lib/endpoints/loyalty/movements.js +9 -6
- package/lib/endpoints/loyalty/programs.js +9 -6
- package/lib/endpoints/notifications/customers.js +3 -2
- package/lib/endpoints/notifications/email.js +3 -2
- package/lib/endpoints/notifications/manifest-notifications.js +7 -4
- package/lib/endpoints/notifications/printed-tickets.js +3 -2
- package/lib/endpoints/operations/accounting_items.js +8 -4
- package/lib/endpoints/operations/applied_insurance.js +3 -2
- package/lib/endpoints/operations/calendar_entries.js +3 -2
- package/lib/endpoints/operations/flexpasses.js +3 -2
- package/lib/endpoints/operations/loans.js +8 -4
- package/lib/endpoints/operations/manifest.js +58 -20
- package/lib/endpoints/operations/movements.js +3 -2
- package/lib/endpoints/operations/outlook-trips.js +3 -2
- package/lib/endpoints/operations/parcels.js +9 -6
- package/lib/endpoints/operations/redemption.js +6 -4
- package/lib/endpoints/operations/scheduled_notifications.js +15 -10
- package/lib/endpoints/operations/segments.js +3 -2
- package/lib/endpoints/operations/tickets.js +9 -6
- package/lib/endpoints/operations/transaction.js +3 -2
- package/lib/endpoints/operations/transactions.js +21 -14
- package/lib/endpoints/operations/trip_change_info.js +3 -2
- package/lib/endpoints/operations/waitlists.js +12 -9
- package/lib/endpoints/reports/custom-reports.js +9 -6
- package/lib/endpoints/reports/report-types.js +6 -4
- package/lib/endpoints/sales/bundles.js +3 -2
- package/lib/endpoints/sales/cart-promo.js +6 -4
- package/lib/endpoints/sales/cart.js +18 -12
- package/lib/endpoints/sales/custom-fields.js +3 -2
- package/lib/endpoints/sales/flexpasses.js +3 -2
- package/lib/endpoints/sales/gift-certificates.js +3 -2
- package/lib/endpoints/sales/order.js +6 -4
- package/lib/endpoints/sales/payment-providers.js +3 -2
- package/lib/endpoints/sales/redeemable-items.js +6 -4
- package/lib/endpoints/sales/sync-entry.js +3 -2
- package/lib/endpoints/sales/voucher.js +3 -2
- package/lib/endpoints/seatmaps/access-ticket.js +3 -2
- package/lib/endpoints/seatmaps/seat.js +3 -2
- package/lib/endpoints/uploads/files.js +3 -2
- package/lib/endpoints/uploads/images.js +3 -2
- package/lib/endpoints/webhooks/events.js +3 -2
- package/lib/endpoints/webhooks/subscriptions.js +15 -10
- package/lib/endpoints/webhooks/undelivered.js +15 -10
- package/lib/endpoints/webhooks/webhooks.js +3 -2
- package/package.json +1 -1
- package/src/client.js +8 -5
- package/src/endpoints/accounts/accounts.js +2 -2
- package/src/endpoints/accounts/application-settings.js +10 -10
- package/src/endpoints/accounts/application.js +2 -2
- package/src/endpoints/accounts/applications.js +4 -4
- package/src/endpoints/accounts/current-shifts.js +2 -2
- package/src/endpoints/accounts/customers.js +10 -10
- package/src/endpoints/accounts/domains.js +38 -0
- package/src/endpoints/accounts/email-settings.js +10 -10
- package/src/endpoints/accounts/exchange-rates.js +4 -4
- package/src/endpoints/accounts/interline.js +18 -18
- package/src/endpoints/accounts/lexicons.js +12 -8
- package/src/endpoints/accounts/print-settings.js +8 -8
- package/src/endpoints/accounts/printers.js +2 -2
- package/src/endpoints/accounts/shifts.js +2 -2
- package/src/endpoints/accounts/travellers.js +10 -10
- package/src/endpoints/accounts/trusted-machines.js +2 -2
- package/src/endpoints/accounts/users.js +4 -4
- package/src/endpoints/btrzpay/customerCards.js +8 -8
- package/src/endpoints/btrzpay/customers.js +6 -7
- package/src/endpoints/btrzpay/payment-methods.js +12 -12
- package/src/endpoints/btrzpay/payments.js +4 -4
- package/src/endpoints/btrzpay/reference-numbers.js +2 -2
- package/src/endpoints/btrzpay/referenced-payments.js +4 -4
- package/src/endpoints/btrzpay/square.js +4 -4
- package/src/endpoints/coltrane/paths.js +2 -2
- package/src/endpoints/endpoints_helpers.js +25 -6
- package/src/endpoints/gps/scanner-app-location.js +2 -2
- package/src/endpoints/inventory/amenities.js +8 -8
- package/src/endpoints/inventory/amenity-groups.js +8 -8
- package/src/endpoints/inventory/bare-routes.js +4 -4
- package/src/endpoints/inventory/brands.js +8 -8
- package/src/endpoints/inventory/bundle-fares.js +2 -2
- package/src/endpoints/inventory/bundles.js +4 -4
- package/src/endpoints/inventory/companies.js +2 -2
- package/src/endpoints/inventory/countries.js +2 -2
- package/src/endpoints/inventory/custom-content.js +11 -10
- package/src/endpoints/inventory/fare-classes.js +6 -6
- package/src/endpoints/inventory/fares.js +4 -4
- package/src/endpoints/inventory/fees.js +2 -2
- package/src/endpoints/inventory/filtered-trips-v2.js +2 -2
- package/src/endpoints/inventory/filtered-trips.js +2 -2
- package/src/endpoints/inventory/gift-certificate-definitions.js +2 -2
- package/src/endpoints/inventory/healthcheck.js +16 -0
- package/src/endpoints/inventory/insurances.js +10 -10
- package/src/endpoints/inventory/insurancesCost.js +2 -2
- package/src/endpoints/inventory/items.js +2 -2
- package/src/endpoints/inventory/journey-prices.js +6 -6
- package/src/endpoints/inventory/marketplace-modifiers.js +11 -10
- package/src/endpoints/inventory/operating-companies.js +8 -8
- package/src/endpoints/inventory/operation-messages.js +12 -12
- package/src/endpoints/inventory/parcel-zones.js +6 -6
- package/src/endpoints/inventory/payment-terminals.js +11 -10
- package/src/endpoints/inventory/products.js +4 -4
- package/src/endpoints/inventory/promos.js +14 -14
- package/src/endpoints/inventory/routes.js +14 -14
- package/src/endpoints/inventory/schedules.js +2 -2
- package/src/endpoints/inventory/seatfees.js +9 -8
- package/src/endpoints/inventory/seatmaps.js +2 -2
- package/src/endpoints/inventory/service-numbers.js +8 -8
- package/src/endpoints/inventory/service-types.js +11 -10
- package/src/endpoints/inventory/ssrs.js +2 -2
- package/src/endpoints/inventory/station-groups.js +2 -2
- package/src/endpoints/inventory/stations-zones.js +2 -2
- package/src/endpoints/inventory/stations.js +4 -4
- package/src/endpoints/inventory/taxes.js +8 -8
- package/src/endpoints/inventory/traveller-card-providers-types.js +2 -2
- package/src/endpoints/inventory/traveller-card-providers.js +8 -8
- package/src/endpoints/inventory/traveller-card-types.js +10 -10
- package/src/endpoints/inventory/trips.js +4 -4
- package/src/endpoints/inventory/zone-price-overages.js +11 -10
- package/src/endpoints/inventory/zone-prices.js +11 -10
- package/src/endpoints/invoices/emails.js +2 -2
- package/src/endpoints/invoices/infile.js +2 -2
- package/src/endpoints/invoices/pdfs.js +2 -2
- package/src/endpoints/invoices/providers.js +10 -10
- package/src/endpoints/invoices/tax-ids.js +18 -0
- package/src/endpoints/loyalty/movements.js +6 -6
- package/src/endpoints/loyalty/programs.js +6 -6
- package/src/endpoints/notifications/customers.js +2 -2
- package/src/endpoints/notifications/email.js +2 -2
- package/src/endpoints/notifications/manifest-notifications.js +6 -4
- package/src/endpoints/notifications/printed-tickets.js +2 -2
- package/src/endpoints/operations/accounting_items.js +7 -4
- package/src/endpoints/operations/applied_insurance.js +2 -2
- package/src/endpoints/operations/calendar_entries.js +2 -2
- package/src/endpoints/operations/flexpasses.js +2 -2
- package/src/endpoints/operations/loans.js +7 -4
- package/src/endpoints/operations/manifest.js +62 -22
- package/src/endpoints/operations/movements.js +2 -2
- package/src/endpoints/operations/outlook-trips.js +2 -2
- package/src/endpoints/operations/parcels.js +6 -6
- package/src/endpoints/operations/redemption.js +4 -4
- package/src/endpoints/operations/scheduled_notifications.js +10 -10
- package/src/endpoints/operations/segments.js +2 -2
- package/src/endpoints/operations/tickets.js +6 -6
- package/src/endpoints/operations/transaction.js +2 -2
- package/src/endpoints/operations/transactions.js +14 -14
- package/src/endpoints/operations/trip_change_info.js +2 -2
- package/src/endpoints/operations/waitlists.js +8 -9
- package/src/endpoints/reports/custom-reports.js +6 -6
- package/src/endpoints/reports/report-types.js +4 -4
- package/src/endpoints/sales/bundles.js +2 -2
- package/src/endpoints/sales/cart-promo.js +4 -4
- package/src/endpoints/sales/cart.js +12 -12
- package/src/endpoints/sales/custom-fields.js +2 -2
- package/src/endpoints/sales/flexpasses.js +2 -2
- package/src/endpoints/sales/gift-certificates.js +2 -2
- package/src/endpoints/sales/order.js +4 -4
- package/src/endpoints/sales/payment-providers.js +2 -2
- package/src/endpoints/sales/redeemable-items.js +4 -4
- package/src/endpoints/sales/sync-entry.js +2 -2
- package/src/endpoints/sales/voucher.js +2 -2
- package/src/endpoints/seatmaps/access-ticket.js +2 -2
- package/src/endpoints/seatmaps/seat.js +2 -2
- package/src/endpoints/uploads/files.js +2 -2
- package/src/endpoints/uploads/images.js +2 -2
- package/src/endpoints/webhooks/events.js +2 -2
- package/src/endpoints/webhooks/subscriptions.js +10 -10
- package/src/endpoints/webhooks/undelivered.js +10 -10
- package/src/endpoints/webhooks/webhooks.js +2 -2
- package/test/endpoints/accounts/domains.test.js +61 -0
- package/test/endpoints/endpoints_helpers.test.js +54 -0
- package/test/endpoints/operations/manifest.test.js +66 -17
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function scheduledNotificationsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function all({token, jwtToken, query}) {
|
|
4
|
+
function all({token, jwtToken, query, headers}) {
|
|
5
5
|
return client({
|
|
6
6
|
url: "/scheduled-notifications",
|
|
7
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
7
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
8
8
|
params: query
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function get({token, jwtToken, id}) {
|
|
12
|
+
function get({token, jwtToken, id, headers}) {
|
|
13
13
|
return client({
|
|
14
14
|
url: `/scheduled-notifications/${id}`,
|
|
15
15
|
method: "get",
|
|
16
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
16
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function update({ token, jwtToken, id, data }) {
|
|
20
|
+
function update({ token, jwtToken, id, data, headers }) {
|
|
21
21
|
return client({
|
|
22
22
|
url: `/scheduled-notifications/${id}`,
|
|
23
23
|
method: "put",
|
|
24
24
|
params: data,
|
|
25
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
25
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
26
26
|
data
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
function remove({ token, jwtToken, id }) {
|
|
30
|
+
function remove({ token, jwtToken, id, headers }) {
|
|
31
31
|
return client({
|
|
32
32
|
url: `/scheduled-notifications/${id}`,
|
|
33
33
|
method: "delete",
|
|
34
|
-
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider })
|
|
34
|
+
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider, headers })
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function create({ token, jwtToken, query = {}, data }) {
|
|
38
|
+
function create({ token, jwtToken, query = {}, data, headers }) {
|
|
39
39
|
return client({
|
|
40
40
|
url: "/scheduled-notifications",
|
|
41
41
|
method: "post",
|
|
42
|
-
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider }),
|
|
42
|
+
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider, headers }),
|
|
43
43
|
params: query,
|
|
44
44
|
data
|
|
45
45
|
});
|
|
@@ -2,10 +2,10 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function segmentsFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, jwtToken, productId, ticketId, providerId}) {
|
|
5
|
+
function all({ token, jwtToken, productId, ticketId, providerId, headers}) {
|
|
6
6
|
return client({
|
|
7
7
|
url: `/products/${productId}/segments/${ticketId}`,
|
|
8
|
-
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider }),
|
|
8
|
+
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider, headers }),
|
|
9
9
|
params: {
|
|
10
10
|
providerId
|
|
11
11
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function ticketsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function get({token, jwtToken, id}) {
|
|
4
|
+
function get({token, jwtToken, id, headers}) {
|
|
5
5
|
return client({
|
|
6
6
|
url: `/tickets/${id}`,
|
|
7
7
|
method: "get",
|
|
8
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function patch({token, jwtToken, id, operations, warningsEnabled}) {
|
|
12
|
+
function patch({token, jwtToken, id, operations, warningsEnabled, headers}) {
|
|
13
13
|
return client({
|
|
14
14
|
url: `/tickets/${id}`,
|
|
15
15
|
method: "patch",
|
|
16
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
16
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
17
17
|
data: {operations, warningsEnabled}
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function companionTickets({token, jwtToken, ticketId}) {
|
|
21
|
+
function companionTickets({token, jwtToken, ticketId, headers}) {
|
|
22
22
|
return client({
|
|
23
23
|
url: `/tickets/${ticketId}/companion-tickets`,
|
|
24
|
-
headers: authorizationHeaders({token, jwtToken})
|
|
24
|
+
headers: authorizationHeaders({token, jwtToken, headers})
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -2,10 +2,10 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function transactionFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function get({ token, jwtToken, id, providerId }) {
|
|
5
|
+
function get({ token, jwtToken, id, providerId, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: `/transaction/${id}?providerId=${providerId}`,
|
|
8
|
-
headers: authorizationHeaders({ token , jwtToken, internalAuthTokenProvider })
|
|
8
|
+
headers: authorizationHeaders({ token , jwtToken, internalAuthTokenProvider, headers })
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function transactionsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function get({token, jwtToken, trxId, query}) {
|
|
4
|
+
function get({token, jwtToken, trxId, query, headers}) {
|
|
5
5
|
return client({
|
|
6
6
|
url: `/transactions/${trxId}`,
|
|
7
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
7
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
8
8
|
params: query
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function all({token, jwtToken, query}) {
|
|
12
|
+
function all({token, jwtToken, query, headers}) {
|
|
13
13
|
return client({
|
|
14
14
|
url: "/transactions",
|
|
15
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
15
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
16
16
|
params: query
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function getTickets({token, jwtToken, trxId}) {
|
|
20
|
+
function getTickets({token, jwtToken, trxId, headers}) {
|
|
21
21
|
return client({
|
|
22
22
|
url: `/transactions/${trxId}/tickets`,
|
|
23
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
23
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function appliedInsurance({token, jwtToken, trxId}) {
|
|
27
|
+
function appliedInsurance({token, jwtToken, trxId, headers}) {
|
|
28
28
|
return client({
|
|
29
29
|
url: `/transactions/${trxId}/applied-insurance`,
|
|
30
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
30
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
function companionTickets({token, jwtToken, transactionId, ticketIds}) {
|
|
34
|
+
function companionTickets({token, jwtToken, transactionId, ticketIds, headers}) {
|
|
35
35
|
return client({
|
|
36
36
|
url: `/transactions/${transactionId}/companion-tickets`,
|
|
37
37
|
params: {
|
|
38
38
|
ticketIds: ticketIds.join(",")
|
|
39
39
|
},
|
|
40
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
40
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function expireAll({internalAuthTokenProvider, jwtToken, transactionId, avoidEmail, token}) {
|
|
44
|
+
function expireAll({internalAuthTokenProvider, jwtToken, transactionId, avoidEmail, token, headers}) {
|
|
45
45
|
return client({
|
|
46
46
|
url: "/transactions/status",
|
|
47
47
|
method: "patch",
|
|
48
48
|
params: {},
|
|
49
|
-
headers: authorizationHeaders({internalAuthTokenProvider, jwtToken, token}),
|
|
49
|
+
headers: authorizationHeaders({internalAuthTokenProvider, jwtToken, token, headers}),
|
|
50
50
|
data: {
|
|
51
51
|
operation: {
|
|
52
52
|
name: "expire_payment",
|
|
@@ -58,12 +58,12 @@ function transactionsFactory({client, internalAuthTokenProvider}) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const payments = {
|
|
61
|
-
update({token, jwtToken, trxId, paymentResult}) {
|
|
61
|
+
update({token, jwtToken, trxId, paymentResult, headers}) {
|
|
62
62
|
return client({
|
|
63
63
|
url: `/transactions/${trxId}/payments`,
|
|
64
64
|
method: "put",
|
|
65
65
|
headers: authorizationHeaders({
|
|
66
|
-
token, jwtToken, internalAuthTokenProvider
|
|
66
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
67
67
|
}),
|
|
68
68
|
data: {
|
|
69
69
|
paymentResult
|
|
@@ -2,10 +2,10 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function tripChangeInfoFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function get({ token, jwtToken, productId, params}) {
|
|
5
|
+
function get({ token, jwtToken, productId, params, headers}) {
|
|
6
6
|
return client({
|
|
7
7
|
url: `/trip-change-info/${productId}`,
|
|
8
|
-
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider }),
|
|
8
|
+
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider, headers }),
|
|
9
9
|
params
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function waitlistsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function all({token, jwtToken, query}) {
|
|
4
|
+
function all({token, jwtToken, query, headers}) {
|
|
5
5
|
return client({
|
|
6
6
|
url: "/waitlists",
|
|
7
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
7
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
8
8
|
params: query
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function get({token, jwtToken, waitlistId}) {
|
|
13
|
-
console.log(`/waitlists/${waitlistId}`);
|
|
12
|
+
function get({token, jwtToken, waitlistId, headers}) {
|
|
14
13
|
return client({
|
|
15
14
|
url: `/waitlists/${waitlistId}`,
|
|
16
15
|
method: "get",
|
|
17
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
16
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
18
17
|
});
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
function remove({ token, jwtToken, waitlistId }) {
|
|
20
|
+
function remove({ token, jwtToken, waitlistId, headers }) {
|
|
22
21
|
return client({
|
|
23
22
|
url: `/waitlists/${waitlistId}`,
|
|
24
23
|
method: "delete",
|
|
25
|
-
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider })
|
|
24
|
+
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider, headers })
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
function create({ token, jwtToken, data }) {
|
|
28
|
+
function create({ token, jwtToken, data, headers }) {
|
|
30
29
|
return client({
|
|
31
30
|
url: "/waitlists",
|
|
32
31
|
method: "post",
|
|
33
|
-
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider }),
|
|
32
|
+
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider, headers }),
|
|
34
33
|
data
|
|
35
34
|
});
|
|
36
35
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function customReportsFactory({ client, internalAuthTokenProvider }) {
|
|
4
|
-
function create({token, customReport, jwtToken }) {
|
|
4
|
+
function create({token, customReport, jwtToken, headers }) {
|
|
5
5
|
return client({
|
|
6
6
|
url: "/custom-reports",
|
|
7
7
|
method: "post",
|
|
8
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
8
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
9
9
|
data: { customReport }
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function all({token, jwtToken, query = {} }) {
|
|
13
|
+
function all({token, jwtToken, query = {}, headers }) {
|
|
14
14
|
return client({
|
|
15
15
|
url: "/custom-reports",
|
|
16
16
|
params: query,
|
|
17
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
17
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function remove({token, jwtToken, customReportId}) {
|
|
21
|
+
function remove({token, jwtToken, customReportId, headers}) {
|
|
22
22
|
return client({
|
|
23
23
|
url: `/custom-reports/${customReportId}`,
|
|
24
24
|
method: "delete",
|
|
25
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
25
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -2,17 +2,17 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function reportTypesFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function get({ token, jwtToken, id }) {
|
|
5
|
+
function get({ token, jwtToken, id, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: `/types/${id}`,
|
|
8
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function getByName({ token, jwtToken, name }) { //deprecated
|
|
12
|
+
function getByName({ token, jwtToken, name, headers }) { //deprecated
|
|
13
13
|
return client({
|
|
14
14
|
url: `/types?name=${name}`,
|
|
15
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
15
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -2,10 +2,10 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function bundlesFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, query = {} }) {
|
|
5
|
+
function all({ token, query = {}, headers }) {
|
|
6
6
|
return client.get(`/bundles`, {
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -2,20 +2,20 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function cartPromoFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function create({ token, jwtToken, cartId, query = {} }) {
|
|
5
|
+
function create({ token, jwtToken, cartId, query = {}, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: `/cart/${cartId}/promos`,
|
|
8
8
|
method: "post",
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
10
10
|
params: query
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function remove({ token, jwtToken, cartId, query = {} }) {
|
|
14
|
+
function remove({ token, jwtToken, cartId, query = {}, headers }) {
|
|
15
15
|
return client({
|
|
16
16
|
url: `/cart/${cartId}`,
|
|
17
17
|
method: "delete",
|
|
18
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
18
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
19
19
|
params: query
|
|
20
20
|
});
|
|
21
21
|
}
|
|
@@ -2,7 +2,7 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function cartFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function get({ token, id, providerId }) {
|
|
5
|
+
function get({ token, id, providerId, headers }) {
|
|
6
6
|
let url = `/cart/${id}`;
|
|
7
7
|
|
|
8
8
|
if(providerId) {
|
|
@@ -11,53 +11,53 @@ function cartFactory({ client, internalAuthTokenProvider }) {
|
|
|
11
11
|
|
|
12
12
|
return client({
|
|
13
13
|
url,
|
|
14
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
14
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
function create({ token, cart, jwtToken }) {
|
|
18
|
+
function create({ token, cart, jwtToken, headers }) {
|
|
19
19
|
return client({
|
|
20
20
|
url: "/cart",
|
|
21
21
|
method: "post",
|
|
22
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
22
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
23
23
|
data: cart
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function add({ token, cartId, cart, jwtToken }) {
|
|
27
|
+
function add({ token, cartId, cart, jwtToken, headers }) {
|
|
28
28
|
return client({
|
|
29
29
|
url: `/cart/${cartId}/items`,
|
|
30
30
|
method: "post",
|
|
31
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
31
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
32
32
|
data: cart
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function deleteItems({ token, cartId, params, jwtToken }) {
|
|
36
|
+
function deleteItems({ token, cartId, params, jwtToken, headers }) {
|
|
37
37
|
return client({
|
|
38
38
|
url: `/cart/${cartId}/items`,
|
|
39
39
|
method: "delete",
|
|
40
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
40
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
41
41
|
params
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const loyaltyPointsAmount = {
|
|
46
|
-
get({ token, jwtToken, cartId, query = {} }) {
|
|
46
|
+
get({ token, jwtToken, cartId, query = {}, headers }) {
|
|
47
47
|
return client({
|
|
48
48
|
url: `/carts/${cartId}/loyalty-points-amount`,
|
|
49
49
|
params: query,
|
|
50
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
50
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
function patch({ token, jwtToken, cartId, data }) {
|
|
56
|
+
function patch({ token, jwtToken, cartId, data, headers }) {
|
|
57
57
|
return client({
|
|
58
58
|
url: `/cart/${cartId}`,
|
|
59
59
|
method: "patch",
|
|
60
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
60
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
61
61
|
data
|
|
62
62
|
});
|
|
63
63
|
}
|
|
@@ -2,10 +2,10 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function customFieldsFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, query = {} }) {
|
|
5
|
+
function all({ token, query = {}, headers }) {
|
|
6
6
|
return client.get("/custom-fields", {
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function flexpassesEndpointsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function get({token, jwtToken, flexpassId, query = {}}) {
|
|
4
|
+
function get({token, jwtToken, flexpassId, query = {}, headers}) {
|
|
5
5
|
return client({
|
|
6
6
|
url: `/flexpasses/${flexpassId}`,
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -5,11 +5,11 @@ const {
|
|
|
5
5
|
function giftCertificatesFactory({
|
|
6
6
|
client, internalAuthTokenProvider
|
|
7
7
|
}) {
|
|
8
|
-
function get({token, GCNumber, query = {}}) {
|
|
8
|
+
function get({token, GCNumber, query = {}, headers}) {
|
|
9
9
|
return client({
|
|
10
10
|
url: `/gift-certificates/${GCNumber}`,
|
|
11
11
|
params: query,
|
|
12
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
12
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function orderFactory({ client, internalAuthTokenProvider }) {
|
|
4
|
-
function create({ token, order, jwtToken }) {
|
|
4
|
+
function create({ token, order, jwtToken, headers }) {
|
|
5
5
|
return client({
|
|
6
6
|
url: "/order",
|
|
7
7
|
method: "post",
|
|
8
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
8
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
9
9
|
data: order
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function get({ token, orderId, query = {} }) {
|
|
13
|
+
function get({ token, orderId, query = {}, headers }) {
|
|
14
14
|
return client({
|
|
15
15
|
url: `/order/${orderId}`,
|
|
16
16
|
params: query,
|
|
17
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
17
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -2,10 +2,10 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function paymentProvidersFactory({client, internalAuthTokenProvider}) {
|
|
4
4
|
|
|
5
|
-
function all({ token, jwtToken, query = {} }) {
|
|
5
|
+
function all({ token, jwtToken, query = {}, headers }) {
|
|
6
6
|
return client.get("/payment-providers", {
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -2,19 +2,19 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function redeemableItemsFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function get({ token, redeemableItemId, query = {} }) {
|
|
5
|
+
function get({ token, redeemableItemId, query = {}, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: `/redeemable-items/${redeemableItemId}`,
|
|
8
8
|
params: query,
|
|
9
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
9
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function getValid({token, jwtToken, query = {}}) {
|
|
13
|
+
function getValid({token, jwtToken, query = {}, headers}) {
|
|
14
14
|
return client({
|
|
15
15
|
url: "/redeemable-items",
|
|
16
16
|
params: query,
|
|
17
|
-
headers: authorizationHeaders({token, jwtToken})
|
|
17
|
+
headers: authorizationHeaders({token, jwtToken, headers})
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -2,11 +2,11 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function syncEntryFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function patch({ token, data, jwtToken }) {
|
|
5
|
+
function patch({ token, data, jwtToken, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/sync-entry",
|
|
8
8
|
method: "patch",
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
10
10
|
data
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -6,12 +6,12 @@ function voucherFactory({
|
|
|
6
6
|
client, internalAuthTokenProvider
|
|
7
7
|
}) {
|
|
8
8
|
function get({
|
|
9
|
-
token, voucher
|
|
9
|
+
token, voucher, headers
|
|
10
10
|
}) {
|
|
11
11
|
return client({
|
|
12
12
|
// eslint-disable-next-line max-len
|
|
13
13
|
url: `/vouchers/${voucher.number}?cartId=${voucher.cartId}&firstName=${voucher.firstName}&lastName=${voucher.lastName}&displayCurrencyCode=${voucher.displayCurrencyCode || ""}`,
|
|
14
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
14
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -2,11 +2,11 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function accessTicketFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function create({ token, jwtToken}) {
|
|
5
|
+
function create({ token, jwtToken, headers}) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/access-ticket",
|
|
8
8
|
method: "post",
|
|
9
|
-
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider })
|
|
9
|
+
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider, headers })
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -2,11 +2,11 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function seatFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function update({ token, jwtToken, params}) {
|
|
5
|
+
function update({ token, jwtToken, params, headers}) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/seat",
|
|
8
8
|
method: "post",
|
|
9
|
-
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider }),
|
|
9
|
+
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider, headers }),
|
|
10
10
|
params
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -2,7 +2,7 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function filesFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function upload({ token, formData }) {
|
|
5
|
+
function upload({ token, formData, headers }) {
|
|
6
6
|
// Only required to support integration tests
|
|
7
7
|
const formHeaders = typeof formData.getHeaders === "function" ? formData.getHeaders() : {};
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ function filesFactory({ client, internalAuthTokenProvider }) {
|
|
|
10
10
|
url: "/files",
|
|
11
11
|
method: "post",
|
|
12
12
|
headers: {
|
|
13
|
-
...authorizationHeaders({token, internalAuthTokenProvider}),
|
|
13
|
+
...authorizationHeaders({token, internalAuthTokenProvider, headers}),
|
|
14
14
|
...formHeaders
|
|
15
15
|
},
|
|
16
16
|
data: formData
|
|
@@ -4,7 +4,7 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
4
4
|
|
|
5
5
|
function imagesFactory({ client, internalAuthTokenProvider }) {
|
|
6
6
|
|
|
7
|
-
function create({ token, formData }) {
|
|
7
|
+
function create({ token, formData, headers }) {
|
|
8
8
|
// Only required to support integration tests
|
|
9
9
|
const formHeaders = typeof formData.getHeaders === "function" ? formData.getHeaders() : {};
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ function imagesFactory({ client, internalAuthTokenProvider }) {
|
|
|
12
12
|
url: "/images",
|
|
13
13
|
method: "post",
|
|
14
14
|
headers: {
|
|
15
|
-
...authorizationHeaders({token, internalAuthTokenProvider}),
|
|
15
|
+
...authorizationHeaders({token, internalAuthTokenProvider, headers}),
|
|
16
16
|
...formHeaders
|
|
17
17
|
},
|
|
18
18
|
data: formData
|
|
@@ -2,13 +2,13 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function eventsFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, jwtToken, context, query = {} }) {
|
|
5
|
+
function all({ token, jwtToken, context, query = {}, headers }) {
|
|
6
6
|
const queryObj = Object.assign({}, query, { context });
|
|
7
7
|
|
|
8
8
|
return client({
|
|
9
9
|
url: "/events",
|
|
10
10
|
params: queryObj,
|
|
11
|
-
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider })
|
|
11
|
+
headers: authorizationHeaders({ token, jwtToken, internalAuthTokenProvider, headers })
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
|