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
|
@@ -2,28 +2,28 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function fareClassesFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, jwtToken, query = {} }) {
|
|
5
|
+
function all({ token, jwtToken, query = {}, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/fare-classes",
|
|
8
8
|
params: query,
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function create({ token, jwtToken, fareClass }) {
|
|
13
|
+
function create({ token, jwtToken, fareClass, headers }) {
|
|
14
14
|
return client({
|
|
15
15
|
url: "/fare-classes",
|
|
16
16
|
method: "post",
|
|
17
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
17
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
18
18
|
data: { fareClass }
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
function update({ token, jwtToken, fareClassId, update }) {
|
|
22
|
+
function update({ token, jwtToken, fareClassId, update, headers }) {
|
|
23
23
|
return client({
|
|
24
24
|
url: `/fare-classes/${fareClassId}`,
|
|
25
25
|
method: "patch",
|
|
26
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
26
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
27
27
|
data: { update }
|
|
28
28
|
});
|
|
29
29
|
}
|
|
@@ -2,16 +2,16 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function faresFactory({client, internalAuthTokenProvider}) {
|
|
4
4
|
|
|
5
|
-
function all({ token, query = {} }) {
|
|
5
|
+
function all({ token, query = {}, headers }) {
|
|
6
6
|
return client.get("/fares", {
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function get({ token, id }) {
|
|
12
|
+
function get({ token, id, headers }) {
|
|
13
13
|
return client.get(`/fare/${id}`, {
|
|
14
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
14
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -2,10 +2,10 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function feesFactory({client, internalAuthTokenProvider}) {
|
|
4
4
|
|
|
5
|
-
function all({ token, query = {} }) {
|
|
5
|
+
function all({ token, query = {}, headers }) {
|
|
6
6
|
return client.get("/fees", {
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -2,11 +2,11 @@ const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function filteredTripsV2Factory({client, internalAuthTokenProvider}) {
|
|
4
4
|
|
|
5
|
-
function create({token, jwtToken, filteredTrip}) {
|
|
5
|
+
function create({token, jwtToken, filteredTrip, headers}) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/v2/filtered-trips",
|
|
8
8
|
method: "post",
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
10
10
|
data: {filteredTrip}
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -2,11 +2,11 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function filteredTripsFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function create({ token, jwtToken, tripSegmentsId }) {
|
|
5
|
+
function create({ token, jwtToken, tripSegmentsId, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/filtered-trips",
|
|
8
8
|
method: "post",
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
10
10
|
data: { tripSegmentsId }
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -2,10 +2,10 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function giftCertificateDefinitionsFactory({client, internalAuthTokenProvider}) {
|
|
4
4
|
|
|
5
|
-
function all({ token, query = {} }) {
|
|
5
|
+
function all({ token, query = {}, headers }) {
|
|
6
6
|
return client.get("/gift-certificate-definitions", {
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
2
|
+
|
|
3
|
+
function healthCheckFactory({client, internalAuthTokenProvider}) {
|
|
4
|
+
function get() {
|
|
5
|
+
return client({
|
|
6
|
+
url: "/healthcheck",
|
|
7
|
+
method: "get"
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
get
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = healthCheckFactory;
|
|
@@ -6,33 +6,33 @@ function insurancesFactory({
|
|
|
6
6
|
client, internalAuthTokenProvider
|
|
7
7
|
}) {
|
|
8
8
|
function all({
|
|
9
|
-
token, query = {}
|
|
9
|
+
token, query = {}, headers
|
|
10
10
|
}) {
|
|
11
11
|
return client.get("/insurances", {
|
|
12
12
|
params: query,
|
|
13
13
|
headers: authorizationHeaders({
|
|
14
|
-
token, internalAuthTokenProvider
|
|
14
|
+
token, internalAuthTokenProvider, headers
|
|
15
15
|
})
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function get({
|
|
20
|
-
token, insuranceId
|
|
20
|
+
token, insuranceId, headers
|
|
21
21
|
}) {
|
|
22
22
|
return client.get(`/insurances/${insuranceId}`, {
|
|
23
23
|
headers: authorizationHeaders({
|
|
24
|
-
token, internalAuthTokenProvider
|
|
24
|
+
token, internalAuthTokenProvider, headers
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function create({
|
|
30
|
-
token, insurance, jwtToken
|
|
30
|
+
token, insurance, jwtToken, headers
|
|
31
31
|
}) {
|
|
32
32
|
return client({
|
|
33
33
|
url: "/insurances",
|
|
34
34
|
method: "post",
|
|
35
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
35
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
36
36
|
data: {
|
|
37
37
|
insurance
|
|
38
38
|
}
|
|
@@ -40,12 +40,12 @@ function insurancesFactory({
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
function update({
|
|
43
|
-
token, insurance, jwtToken, insuranceId
|
|
43
|
+
token, insurance, jwtToken, insuranceId, headers
|
|
44
44
|
}) {
|
|
45
45
|
return client({
|
|
46
46
|
url: `/insurances/${insuranceId}`,
|
|
47
47
|
method: "put",
|
|
48
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
48
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
49
49
|
data: {
|
|
50
50
|
insurance
|
|
51
51
|
}
|
|
@@ -53,13 +53,13 @@ function insurancesFactory({
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
function remove({
|
|
56
|
-
token, jwtToken, insuranceId
|
|
56
|
+
token, jwtToken, insuranceId, headers
|
|
57
57
|
}) {
|
|
58
58
|
return client({
|
|
59
59
|
url: `/insurances/${insuranceId}`,
|
|
60
60
|
method: "delete",
|
|
61
61
|
headers: authorizationHeaders({
|
|
62
|
-
token, jwtToken, internalAuthTokenProvider
|
|
62
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
63
63
|
})
|
|
64
64
|
});
|
|
65
65
|
}
|
|
@@ -6,11 +6,11 @@ function insurancesCostFactory({
|
|
|
6
6
|
client, internalAuthTokenProvider
|
|
7
7
|
}) {
|
|
8
8
|
function get({
|
|
9
|
-
token, productId, declaredValue, query = {}
|
|
9
|
+
token, productId, declaredValue, query = {}, headers
|
|
10
10
|
}) {
|
|
11
11
|
return client.get(`/insurances/${productId}/cost`, {
|
|
12
12
|
params: Object.assign(query, {declaredValue}),
|
|
13
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
13
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -2,11 +2,11 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function itemsFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, query = {} }) {
|
|
5
|
+
function all({ token, query = {}, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/items",
|
|
8
8
|
params: query,
|
|
9
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
9
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -2,28 +2,28 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function journeyPricesFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, jwtToken, query = {} }) {
|
|
5
|
+
function all({ token, jwtToken, query = {}, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/journey-prices",
|
|
8
8
|
params: query,
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function get({id, token, jwtToken, query = {}}) {
|
|
13
|
+
function get({id, token, jwtToken, query = {}, headers}) {
|
|
14
14
|
return client({
|
|
15
15
|
url: `/journey-prices/${id}`,
|
|
16
16
|
params: query,
|
|
17
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
17
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
function deleteById({ token, jwtToken, id }) {
|
|
22
|
+
function deleteById({ token, jwtToken, id, headers }) {
|
|
23
23
|
return client({
|
|
24
24
|
url: `/journey-prices/${id}`,
|
|
25
25
|
method: "delete",
|
|
26
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
26
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -6,44 +6,45 @@ function marketplaceModifierFactory({client, internalAuthTokenProvider}) {
|
|
|
6
6
|
|
|
7
7
|
function all({
|
|
8
8
|
token,
|
|
9
|
-
query = {}
|
|
9
|
+
query = {},
|
|
10
|
+
headers
|
|
10
11
|
}) {
|
|
11
12
|
return client.get("/marketplace-modifiers", {
|
|
12
13
|
params: query,
|
|
13
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
14
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
function get({marketplaceModifierId, token}) {
|
|
18
|
+
function get({marketplaceModifierId, token, headers}) {
|
|
18
19
|
return client.get(`/marketplace-modifiers/${marketplaceModifierId}`, {
|
|
19
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
20
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
function create({jwtToken, token, marketplaceModifier}) {
|
|
24
|
+
function create({jwtToken, token, marketplaceModifier, headers}) {
|
|
24
25
|
return client({
|
|
25
26
|
url: "/marketplace-modifiers",
|
|
26
27
|
method: "post",
|
|
27
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
28
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
28
29
|
data: {
|
|
29
30
|
marketplaceModifier
|
|
30
31
|
}
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
function remove({jwtToken, marketplaceModifierId, token}) {
|
|
35
|
+
function remove({jwtToken, marketplaceModifierId, token, headers}) {
|
|
35
36
|
return client({
|
|
36
37
|
url: `/marketplace-modifiers/${marketplaceModifierId}`,
|
|
37
38
|
method: "delete",
|
|
38
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
39
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
function update({jwtToken, token, marketplaceModifierId, marketplaceModifier}) {
|
|
43
|
+
function update({jwtToken, token, marketplaceModifierId, marketplaceModifier, headers}) {
|
|
43
44
|
return client({
|
|
44
45
|
url: `/marketplace-modifiers/${marketplaceModifierId}`,
|
|
45
46
|
method: "put",
|
|
46
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
47
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
47
48
|
data: {
|
|
48
49
|
marketplaceModifier
|
|
49
50
|
}
|
|
@@ -2,37 +2,37 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function operatingCompaniesFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, jwtToken, query = {} }) {
|
|
5
|
+
function all({ token, jwtToken, query = {}, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/operating-companies",
|
|
8
8
|
params: query,
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function create({ token, jwtToken, operatingCompany }) {
|
|
13
|
+
function create({ token, jwtToken, operatingCompany, headers }) {
|
|
14
14
|
return client({
|
|
15
15
|
url: "/operating-companies",
|
|
16
16
|
method: "post",
|
|
17
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
17
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
18
18
|
data: { operatingCompany }
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
function update({ jwtToken, token, operatingCompanyId, operatingCompany }) {
|
|
22
|
+
function update({ jwtToken, token, operatingCompanyId, operatingCompany, headers }) {
|
|
23
23
|
return client({
|
|
24
24
|
url: `/operating-companies/${operatingCompanyId}`,
|
|
25
25
|
method: "put",
|
|
26
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
26
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
27
27
|
data: { operatingCompany }
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
function get({token, operatingCompanyId, jwtToken}) {
|
|
31
|
+
function get({token, operatingCompanyId, jwtToken, headers}) {
|
|
32
32
|
return client({
|
|
33
33
|
url: `/operating-companies/${operatingCompanyId}`,
|
|
34
34
|
method: "get",
|
|
35
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider, jwtToken}),
|
|
35
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, jwtToken, headers}),
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -2,55 +2,55 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function operationMessagesFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, query = {} }) {
|
|
5
|
+
function all({ token, query = {}, headers }) {
|
|
6
6
|
return client({
|
|
7
7
|
url: "/operation-messages",
|
|
8
8
|
method: "get",
|
|
9
9
|
params: query,
|
|
10
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider}),
|
|
10
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers}),
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function create({ token, jwtToken, opMsgData }) {
|
|
14
|
+
function create({ token, jwtToken, opMsgData, headers }) {
|
|
15
15
|
return client({
|
|
16
16
|
url: "/operation-messages",
|
|
17
17
|
method: "post",
|
|
18
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
18
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
19
19
|
data: opMsgData
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
function update({ token, jwtToken, operationMessageId, opMsgData }) {
|
|
23
|
+
function update({ token, jwtToken, operationMessageId, opMsgData, headers }) {
|
|
24
24
|
return client({
|
|
25
25
|
url: `/operation-messages/${operationMessageId}`,
|
|
26
26
|
method: "put",
|
|
27
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
27
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
28
28
|
data: opMsgData
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function get({token, operationMessageId}) {
|
|
32
|
+
function get({token, operationMessageId, headers}) {
|
|
33
33
|
return client({
|
|
34
34
|
url: `/operation-messages/${operationMessageId}`,
|
|
35
35
|
method: "get",
|
|
36
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider}),
|
|
36
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers}),
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function remove({ jwtToken, operationMessageId, token }) {
|
|
40
|
+
function remove({ jwtToken, operationMessageId, token, headers }) {
|
|
41
41
|
return client({
|
|
42
42
|
url: `/operation-messages/${operationMessageId}`,
|
|
43
43
|
method: "delete",
|
|
44
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
44
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
// it's being used post to get the ability to use a complex json payload
|
|
49
|
-
function getByStation({token, jwtToken, opMsgData}) {
|
|
49
|
+
function getByStation({token, jwtToken, opMsgData, headers}) {
|
|
50
50
|
return client({
|
|
51
51
|
url: "/operation-messages-stations",
|
|
52
52
|
method: "post",
|
|
53
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
53
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
54
54
|
data: opMsgData
|
|
55
55
|
});
|
|
56
56
|
}
|
|
@@ -2,27 +2,27 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function parcelZonesFactory({ client, internalAuthTokenProvider }) {
|
|
4
4
|
|
|
5
|
-
function all({ token, query = {} }) {
|
|
5
|
+
function all({ token, query = {}, headers }) {
|
|
6
6
|
return client("/parcel-zones", {
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function create({ token, parcelZone, jwtToken }) {
|
|
12
|
+
function create({ token, parcelZone, jwtToken, headers }) {
|
|
13
13
|
return client({
|
|
14
14
|
url: "/parcel-zones",
|
|
15
15
|
method: "post",
|
|
16
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
16
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
17
17
|
data: { parcelZone }
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function update({ jwtToken, token, parcelZoneId, parcelZone }) {
|
|
21
|
+
function update({ jwtToken, token, parcelZoneId, parcelZone, headers }) {
|
|
22
22
|
return client({
|
|
23
23
|
url: `/parcel-zone/${parcelZoneId}`,
|
|
24
24
|
method: "put",
|
|
25
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
25
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
26
26
|
data: { parcelZone }
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -6,44 +6,45 @@ function paymentTerminalFactory({client, internalAuthTokenProvider}) {
|
|
|
6
6
|
|
|
7
7
|
function all({
|
|
8
8
|
token,
|
|
9
|
-
query = {}
|
|
9
|
+
query = {},
|
|
10
|
+
headers
|
|
10
11
|
}) {
|
|
11
12
|
return client.get("/payment-terminals", {
|
|
12
13
|
params: query,
|
|
13
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
14
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
function get({paymentTerminalId, token}) {
|
|
18
|
+
function get({paymentTerminalId, token, headers}) {
|
|
18
19
|
return client.get(`/payment-terminals/${paymentTerminalId}`, {
|
|
19
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
20
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
function create({ jwtToken, token, paymentTerminal }) {
|
|
24
|
+
function create({ jwtToken, token, paymentTerminal, headers }) {
|
|
24
25
|
return client({
|
|
25
26
|
url: "/payment-terminals",
|
|
26
27
|
method: "post",
|
|
27
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
28
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
28
29
|
data: {
|
|
29
30
|
paymentTerminal
|
|
30
31
|
}
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
function remove({ jwtToken, paymentTerminalId, token }) {
|
|
35
|
+
function remove({ jwtToken, paymentTerminalId, token, headers }) {
|
|
35
36
|
return client({
|
|
36
37
|
url: `/payment-terminals/${paymentTerminalId}`,
|
|
37
38
|
method: "delete",
|
|
38
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
39
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
function update({jwtToken, token, paymentTerminalId, paymentTerminal}) {
|
|
43
|
+
function update({jwtToken, token, paymentTerminalId, paymentTerminal, headers}) {
|
|
43
44
|
return client({
|
|
44
45
|
url: `/payment-terminals/${paymentTerminalId}`,
|
|
45
46
|
method: "put",
|
|
46
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
47
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
47
48
|
data: {
|
|
48
49
|
paymentTerminal
|
|
49
50
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function productsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function all({token, query = {}}) {
|
|
4
|
+
function all({token, query = {}, headers}) {
|
|
5
5
|
return client({
|
|
6
6
|
url: "/products",
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function get({productId, token, jwtToken, query = {}}) {
|
|
12
|
+
function get({productId, token, jwtToken, query = {}, headers}) {
|
|
13
13
|
return client({
|
|
14
14
|
url: `/products/${productId}`,
|
|
15
15
|
params: query,
|
|
16
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider, jwtToken})
|
|
16
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, jwtToken, headers})
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -2,60 +2,60 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function promosFactory({client, internalAuthTokenProvider}) {
|
|
4
4
|
|
|
5
|
-
function all({ token, query = {} }) {
|
|
5
|
+
function all({ token, query = {}, headers }) {
|
|
6
6
|
return client.get("/promos", {
|
|
7
7
|
params: query,
|
|
8
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
8
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function get({ promoId, token, query = {} }) {
|
|
12
|
+
function get({ promoId, token, query = {}, headers }) {
|
|
13
13
|
return client.get(`/promos/${promoId}`, {
|
|
14
14
|
params: query,
|
|
15
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
15
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
function create({ jwtToken, promo, token }) {
|
|
19
|
+
function create({ jwtToken, promo, token, headers }) {
|
|
20
20
|
return client({
|
|
21
21
|
url: "/promos",
|
|
22
22
|
method: "post",
|
|
23
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
23
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
24
24
|
data: { promo }
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
function remove({ jwtToken, promoId, token }) {
|
|
28
|
+
function remove({ jwtToken, promoId, token, headers }) {
|
|
29
29
|
return client({
|
|
30
30
|
url: `/promos/${promoId}`,
|
|
31
31
|
method: "delete",
|
|
32
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
32
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function update({ jwtToken, token, promoId, update }) {
|
|
36
|
+
function update({ jwtToken, token, promoId, update, headers }) {
|
|
37
37
|
return client({
|
|
38
38
|
url: `/promos/${promoId}`,
|
|
39
39
|
method: "patch",
|
|
40
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
40
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
41
41
|
data: { update }
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
function addRule({ jwtToken, token, promoId, rule }) {
|
|
45
|
+
function addRule({ jwtToken, token, promoId, rule, headers }) {
|
|
46
46
|
return client({
|
|
47
47
|
url: `/promos/${promoId}/rules`,
|
|
48
48
|
method: "post",
|
|
49
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
49
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
50
50
|
data: { rule }
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
function updateRule({ jwtToken, token, promoId, ruleId, rule }) {
|
|
54
|
+
function updateRule({ jwtToken, token, promoId, ruleId, rule, headers }) {
|
|
55
55
|
return client({
|
|
56
56
|
url: `/promos/${promoId}/rules/${ruleId}`,
|
|
57
57
|
method: "put",
|
|
58
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
58
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
59
59
|
data: { rule }
|
|
60
60
|
});
|
|
61
61
|
}
|