btrz-api-client 3.33.0 → 3.40.1
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 +9 -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 +24 -16
- package/lib/endpoints/operations/movements.js +3 -2
- package/lib/endpoints/operations/outlook-trips.js +27 -0
- 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 +9 -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 +16 -16
- package/src/endpoints/operations/movements.js +2 -2
- package/src/endpoints/operations/outlook-trips.js +17 -0
- 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/client.test.js +0 -6
- package/test/endpoints/accounts/domains.test.js +61 -0
- package/test/endpoints/endpoints_helpers.test.js +54 -0
- package/test/endpoints/operations/outlook-trips.js +28 -0
package/src/client.js
CHANGED
|
@@ -83,6 +83,7 @@ function createInventory({baseURL, headers, timeout, overrideFn, internalAuthTok
|
|
|
83
83
|
travellerCardProvidersTypes: require("./endpoints/inventory/traveller-card-providers-types.js")({client, internalAuthTokenProvider}),
|
|
84
84
|
travellerCardTypes: require("./endpoints/inventory/traveller-card-types.js")({client, internalAuthTokenProvider}),
|
|
85
85
|
marketplaceModifiers: require("./endpoints/inventory/marketplace-modifiers.js")({client, internalAuthTokenProvider}),
|
|
86
|
+
healthCheck: require("./endpoints/inventory/healthcheck.js")({client, internalAuthTokenProvider}),
|
|
86
87
|
__test: {
|
|
87
88
|
client
|
|
88
89
|
}
|
|
@@ -125,11 +126,12 @@ function createAccounts({baseURL, headers, timeout, overrideFn, internalAuthToke
|
|
|
125
126
|
docs: require("./endpoints/accounts/docs.js")({
|
|
126
127
|
client
|
|
127
128
|
}),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
domains: require("./endpoints/accounts/domains")({client, internalAuthTokenProvider}),
|
|
130
|
+
emailSettings: require("./endpoints/accounts/email-settings")({client, internalAuthTokenProvider}),
|
|
131
|
+
exchangeRates: require("./endpoints/accounts/exchange-rates")({client, internalAuthTokenProvider}),
|
|
132
|
+
interline: require("./endpoints/accounts/interline")({client, internalAuthTokenProvider}),
|
|
133
|
+
lexicons: require("./endpoints/accounts/lexicons")({client, internalAuthTokenProvider}),
|
|
134
|
+
printers: require("./endpoints/accounts/printers")({
|
|
133
135
|
client, internalAuthTokenProvider
|
|
134
136
|
}),
|
|
135
137
|
printSettings: require("./endpoints/accounts/print-settings.js")({
|
|
@@ -190,6 +192,7 @@ function createOperations({baseURL, headers, timeout, overrideFn, internalAuthTo
|
|
|
190
192
|
scheduledNotifications: require("./endpoints/operations/scheduled_notifications.js")({client, internalAuthTokenProvider}),
|
|
191
193
|
waitlists: require("./endpoints/operations/waitlists.js")({client, internalAuthTokenProvider}),
|
|
192
194
|
accountingItems: require("./endpoints/operations/accounting_items.js")({client, internalAuthTokenProvider}),
|
|
195
|
+
outlookTrips: require("./endpoints/operations/outlook-trips.js")({client, internalAuthTokenProvider}),
|
|
193
196
|
__test: {
|
|
194
197
|
client
|
|
195
198
|
}
|
|
@@ -300,6 +303,7 @@ function createInvoices({baseURL, headers, timeout, overrideFn, internalAuthToke
|
|
|
300
303
|
infile: require("./endpoints/invoices/infile.js")({client, internalAuthTokenProvider}),
|
|
301
304
|
pdfs: require("./endpoints/invoices/pdfs.js")({client, internalAuthTokenProvider}),
|
|
302
305
|
emails: require("./endpoints/invoices/emails.js")({client, internalAuthTokenProvider}),
|
|
306
|
+
taxIds: require("./endpoints/invoices/tax-ids.js")({client, internalAuthTokenProvider}),
|
|
303
307
|
__test: {
|
|
304
308
|
client
|
|
305
309
|
}
|
|
@@ -3,10 +3,10 @@ const {
|
|
|
3
3
|
} = require("./../endpoints_helpers");
|
|
4
4
|
|
|
5
5
|
function accountsFactory({client, internalAuthTokenProvider}) {
|
|
6
|
-
function get({jwtToken, accountId}) {
|
|
6
|
+
function get({jwtToken, accountId, headers}) {
|
|
7
7
|
return client({
|
|
8
8
|
url: `/accounts/${accountId}`,
|
|
9
|
-
headers: authorizationHeaders({jwtToken, internalAuthTokenProvider})
|
|
9
|
+
headers: authorizationHeaders({jwtToken, internalAuthTokenProvider, headers})
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function applicationSettingsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function get({token, providerId, jwtToken, query = {}}) {
|
|
4
|
+
function get({token, providerId, jwtToken, query = {}, headers}) {
|
|
5
5
|
return client.get(`/application-settings/${providerId}`, {
|
|
6
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
6
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
7
7
|
params: query
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
function update({jwtToken, token, id, application}) {
|
|
11
|
+
function update({jwtToken, token, id, application, headers}) {
|
|
12
12
|
return client({
|
|
13
13
|
url: `/application-settings/${id}`,
|
|
14
14
|
method: "put",
|
|
15
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
15
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
16
16
|
data: {application}
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function remove({jwtToken, token, id}) {
|
|
20
|
+
function remove({jwtToken, token, id, headers}) {
|
|
21
21
|
return client({
|
|
22
22
|
url: `/application-settings/${id}`,
|
|
23
23
|
method: "delete",
|
|
24
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
24
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
function regenerateKeys({jwtToken, token, id}) {
|
|
28
|
+
function regenerateKeys({jwtToken, token, id, headers}) {
|
|
29
29
|
return client({
|
|
30
30
|
url: `/application-settings/${id}/keys`,
|
|
31
31
|
method: "post",
|
|
32
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
32
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
function create({jwtToken, token, application}) {
|
|
36
|
+
function create({jwtToken, token, application, headers}) {
|
|
37
37
|
return client({
|
|
38
38
|
url: "/application-settings",
|
|
39
39
|
method: "post",
|
|
40
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
40
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
41
41
|
data: {application}
|
|
42
42
|
});
|
|
43
43
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function applicationsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function get({token, jwtToken}) {
|
|
4
|
+
function get({token, jwtToken, headers}) {
|
|
5
5
|
return client.get("/application", {
|
|
6
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
6
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function applicationsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function get({token, id, jwtToken}) {
|
|
4
|
+
function get({token, id, jwtToken, headers}) {
|
|
5
5
|
return client.get(`/applications/${id}`, {
|
|
6
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
6
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
|
-
function getByName({token, appName, jwtToken}) {
|
|
9
|
+
function getByName({token, appName, jwtToken, headers}) {
|
|
10
10
|
return client.get(`/applications/name/${appName}`, {
|
|
11
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
11
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -2,9 +2,9 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function currentShiftsFactory({client, internalAuthTokenProvider}) {
|
|
4
4
|
|
|
5
|
-
function get({token, userId, query = {}}) {
|
|
5
|
+
function get({token, userId, query = {}, headers}) {
|
|
6
6
|
return client.get(`/users/${userId}/current-shift`, {
|
|
7
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider}),
|
|
7
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers}),
|
|
8
8
|
params: query
|
|
9
9
|
});
|
|
10
10
|
}
|
|
@@ -4,28 +4,28 @@ const {
|
|
|
4
4
|
} = require("./../endpoints_helpers");
|
|
5
5
|
|
|
6
6
|
function customersFactory({client, internalAuthTokenProvider}) {
|
|
7
|
-
function put({customerId, customer, token, jwtToken}) {
|
|
7
|
+
function put({customerId, customer, token, jwtToken, headers}) {
|
|
8
8
|
return client({
|
|
9
9
|
url: `/customers/${customerId}`,
|
|
10
10
|
method: "put",
|
|
11
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
11
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
12
12
|
data: customer
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
function all({token, jwtToken, query = {}}) {
|
|
16
|
+
function all({token, jwtToken, query = {}, headers}) {
|
|
17
17
|
return client({
|
|
18
18
|
url: "/customers",
|
|
19
19
|
params: query,
|
|
20
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
20
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
function create({customer, token, jwtToken, query}) {
|
|
24
|
+
function create({customer, token, jwtToken, query, headers}) {
|
|
25
25
|
return client({
|
|
26
26
|
url: "/customer",
|
|
27
27
|
method: "post",
|
|
28
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
28
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
29
29
|
data: {customer},
|
|
30
30
|
params: query,
|
|
31
31
|
});
|
|
@@ -47,11 +47,11 @@ function customersFactory({client, internalAuthTokenProvider}) {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
function signInCas({service, ticket, token}) {
|
|
50
|
+
function signInCas({service, ticket, token, headers}) {
|
|
51
51
|
return client({
|
|
52
52
|
url: "/customers/cas",
|
|
53
53
|
headers: authorizationHeaders({
|
|
54
|
-
token, internalAuthTokenProvider
|
|
54
|
+
token, internalAuthTokenProvider, headers
|
|
55
55
|
}),
|
|
56
56
|
method: "post",
|
|
57
57
|
data: {
|
|
@@ -61,12 +61,12 @@ function customersFactory({client, internalAuthTokenProvider}) {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
function update({customerId, token, jwtToken, data, query}) {
|
|
64
|
+
function update({customerId, token, jwtToken, data, query, headers}) {
|
|
65
65
|
return client({
|
|
66
66
|
url: `/customers/${customerId}`,
|
|
67
67
|
method: "patch",
|
|
68
68
|
params: query,
|
|
69
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
69
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
70
70
|
data
|
|
71
71
|
});
|
|
72
72
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const {
|
|
2
|
+
authorizationHeaders
|
|
3
|
+
} = require("../endpoints_helpers");
|
|
4
|
+
|
|
5
|
+
function domainsFactory({client, internalAuthTokenProvider}) {
|
|
6
|
+
function all({token, query = {}, headers}) {
|
|
7
|
+
return client({
|
|
8
|
+
params: query,
|
|
9
|
+
url: "/domains",
|
|
10
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function create({data, token, jwtToken, headers}) {
|
|
15
|
+
return client({
|
|
16
|
+
url: "/domains",
|
|
17
|
+
method: "post",
|
|
18
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
19
|
+
data
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function remove({domain, token, jwtToken, headers}) {
|
|
24
|
+
return client({
|
|
25
|
+
url: `/domains/${domain}`,
|
|
26
|
+
method: "delete",
|
|
27
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
all,
|
|
33
|
+
create,
|
|
34
|
+
remove
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
module.exports = domainsFactory;
|
|
@@ -2,44 +2,44 @@
|
|
|
2
2
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
3
3
|
|
|
4
4
|
function emailSettingsFactory({client, internalAuthTokenProvider}) {
|
|
5
|
-
function all({token, jwtToken, query = {}}) {
|
|
5
|
+
function all({token, jwtToken, query = {}, headers}) {
|
|
6
6
|
return client({
|
|
7
7
|
params: query,
|
|
8
8
|
url: "/email-settings",
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
function getByEmail({token, jwtToken, email, query = {}}) {
|
|
12
|
+
function getByEmail({token, jwtToken, email, query = {}, headers}) {
|
|
13
13
|
return client({
|
|
14
14
|
params: query,
|
|
15
15
|
url: `/email-settings/${email}`,
|
|
16
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
16
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function create({data, token, jwtToken}) {
|
|
20
|
+
function create({data, token, jwtToken, headers}) {
|
|
21
21
|
return client({
|
|
22
22
|
url: "/email-settings",
|
|
23
23
|
method: "post",
|
|
24
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
24
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
25
25
|
data
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function update({token, jwtToken, email, data}) {
|
|
29
|
+
function update({token, jwtToken, email, data, headers}) {
|
|
30
30
|
return client({
|
|
31
31
|
url: `/email-settings/${email}`,
|
|
32
32
|
method: "put",
|
|
33
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
33
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
34
34
|
data
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function remove({email, token, jwtToken}) {
|
|
38
|
+
function remove({email, token, jwtToken, headers}) {
|
|
39
39
|
return client({
|
|
40
40
|
url: `/email-settings/${email}`,
|
|
41
41
|
method: "delete",
|
|
42
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
42
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
3
3
|
|
|
4
4
|
function exchangeRatesFactory({client, internalAuthTokenProvider}) {
|
|
5
|
-
function allByIsoCode({token, jwtToken, isoCode, query = {}}) {
|
|
5
|
+
function allByIsoCode({token, jwtToken, isoCode, query = {}, headers}) {
|
|
6
6
|
return client({
|
|
7
7
|
params: query,
|
|
8
8
|
url: `/exchange-rates/${isoCode}`,
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function create({data, token, jwtToken}) {
|
|
13
|
+
function create({data, token, jwtToken, headers}) {
|
|
14
14
|
return client({
|
|
15
15
|
url: "/exchange-rates",
|
|
16
16
|
method: "post",
|
|
17
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
17
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
18
18
|
data
|
|
19
19
|
});
|
|
20
20
|
}
|
|
@@ -4,75 +4,75 @@ const {
|
|
|
4
4
|
|
|
5
5
|
function interlineFactory({client, internalAuthTokenProvider}) {
|
|
6
6
|
const invitations = {
|
|
7
|
-
all({token, jwtToken, query = {}}) {
|
|
7
|
+
all({token, jwtToken, query = {}, headers}) {
|
|
8
8
|
return client({
|
|
9
9
|
url: "/interline/invitations",
|
|
10
10
|
params: query,
|
|
11
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
11
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
12
12
|
});
|
|
13
13
|
},
|
|
14
|
-
get({token, invitationId}) {
|
|
14
|
+
get({token, invitationId, headers}) {
|
|
15
15
|
return client.get(`/interline/invitations/${invitationId}`, {
|
|
16
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
16
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
17
17
|
});
|
|
18
18
|
},
|
|
19
|
-
create({data, token, jwtToken}) {
|
|
19
|
+
create({data, token, jwtToken, headers}) {
|
|
20
20
|
return client({
|
|
21
21
|
url: "/interline/invitations",
|
|
22
22
|
method: "post",
|
|
23
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
23
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
24
24
|
data
|
|
25
25
|
});
|
|
26
26
|
},
|
|
27
|
-
update({invitationId, data, token, jwtToken}) {
|
|
27
|
+
update({invitationId, data, token, jwtToken, headers}) {
|
|
28
28
|
return client({
|
|
29
29
|
url: `/interline/invitations/${invitationId}`,
|
|
30
30
|
method: "put",
|
|
31
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
31
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
32
32
|
data
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
const consumers = {
|
|
38
|
-
all({token, jwtToken, query = {}}) {
|
|
38
|
+
all({token, jwtToken, query = {}, headers}) {
|
|
39
39
|
return client({
|
|
40
40
|
url: "/interline/consumers",
|
|
41
41
|
params: query,
|
|
42
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
42
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
const providers = {
|
|
48
|
-
all({token, jwtToken, query = {}}) {
|
|
48
|
+
all({token, jwtToken, query = {}, headers}) {
|
|
49
49
|
return client({
|
|
50
50
|
url: "/interline/providers",
|
|
51
51
|
params: query,
|
|
52
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
52
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
const network = {
|
|
58
|
-
get({token, networkId}) {
|
|
58
|
+
get({token, networkId, headers}) {
|
|
59
59
|
return client.get(`/interline/${networkId}`, {
|
|
60
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
60
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
61
61
|
});
|
|
62
62
|
},
|
|
63
|
-
update({networkId, data, token, jwtToken}) {
|
|
63
|
+
update({networkId, data, token, jwtToken, headers}) {
|
|
64
64
|
return client({
|
|
65
65
|
url: `/interline/${networkId}`,
|
|
66
66
|
method: "put",
|
|
67
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
67
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
68
68
|
data
|
|
69
69
|
});
|
|
70
70
|
},
|
|
71
|
-
remove({networkId, token, jwtToken}) {
|
|
71
|
+
remove({networkId, token, jwtToken, headers}) {
|
|
72
72
|
return client({
|
|
73
73
|
url: `/interline/${networkId}`,
|
|
74
74
|
method: "delete",
|
|
75
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
75
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
};
|
|
@@ -8,26 +8,28 @@ function lexiconsFactory({
|
|
|
8
8
|
function all({
|
|
9
9
|
token,
|
|
10
10
|
context,
|
|
11
|
-
query = {}
|
|
11
|
+
query = {},
|
|
12
|
+
headers
|
|
12
13
|
}) {
|
|
13
14
|
const queryObj = Object.assign({}, query, {context});
|
|
14
15
|
|
|
15
16
|
return client({
|
|
16
17
|
url: "lexicons/buscompany",
|
|
17
18
|
params: queryObj,
|
|
18
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
19
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
function create({
|
|
23
24
|
token,
|
|
24
25
|
jwtToken,
|
|
25
|
-
lexiconEntries
|
|
26
|
+
lexiconEntries,
|
|
27
|
+
headers
|
|
26
28
|
}) {
|
|
27
29
|
return client({
|
|
28
30
|
url: "/lexicons",
|
|
29
31
|
method: "post",
|
|
30
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
32
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
31
33
|
data: {
|
|
32
34
|
entries: lexiconEntries
|
|
33
35
|
}
|
|
@@ -37,13 +39,14 @@ function lexiconsFactory({
|
|
|
37
39
|
function createOrUpdateMany({
|
|
38
40
|
token,
|
|
39
41
|
jwtToken,
|
|
40
|
-
entries
|
|
42
|
+
entries,
|
|
43
|
+
headers
|
|
41
44
|
}) {
|
|
42
45
|
return client({
|
|
43
46
|
url: "/lexicons",
|
|
44
47
|
method: "put",
|
|
45
48
|
headers: authorizationHeaders({
|
|
46
|
-
token, jwtToken, internalAuthTokenProvider
|
|
49
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
47
50
|
}),
|
|
48
51
|
data: {
|
|
49
52
|
entries
|
|
@@ -54,12 +57,13 @@ function lexiconsFactory({
|
|
|
54
57
|
function updateMany({
|
|
55
58
|
token,
|
|
56
59
|
jwtToken,
|
|
57
|
-
updates
|
|
60
|
+
updates,
|
|
61
|
+
headers
|
|
58
62
|
}) {
|
|
59
63
|
return client({
|
|
60
64
|
url: "/lexicons",
|
|
61
65
|
method: "patch",
|
|
62
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
66
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
63
67
|
data: {
|
|
64
68
|
updates
|
|
65
69
|
}
|
|
@@ -3,20 +3,20 @@ const {
|
|
|
3
3
|
} = require("./../endpoints_helpers");
|
|
4
4
|
|
|
5
5
|
function printSettingsFactory({client, internalAuthTokenProvider}) {
|
|
6
|
-
function all({token, query}) {
|
|
6
|
+
function all({token, query, headers}) {
|
|
7
7
|
return client({
|
|
8
8
|
url: "/print-settings",
|
|
9
9
|
params: query,
|
|
10
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
10
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function update({jwtToken, token, printSettings}) {
|
|
14
|
+
function update({jwtToken, token, printSettings, headers}) {
|
|
15
15
|
return client({
|
|
16
16
|
url: "/print-settings",
|
|
17
17
|
method: "put",
|
|
18
18
|
headers: authorizationHeaders({
|
|
19
|
-
token, jwtToken, internalAuthTokenProvider
|
|
19
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
20
20
|
}),
|
|
21
21
|
data: {
|
|
22
22
|
printSettings
|
|
@@ -24,24 +24,24 @@ function printSettingsFactory({client, internalAuthTokenProvider}) {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
const productTemplates = {
|
|
27
|
-
create({jwtToken, token, productTemplate}) {
|
|
27
|
+
create({jwtToken, token, productTemplate, headers}) {
|
|
28
28
|
return client({
|
|
29
29
|
url: "/print-settings/product-templates",
|
|
30
30
|
method: "post",
|
|
31
31
|
headers: authorizationHeaders({
|
|
32
|
-
token, jwtToken, internalAuthTokenProvider
|
|
32
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
33
33
|
}),
|
|
34
34
|
data: {
|
|
35
35
|
productTemplate
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
},
|
|
39
|
-
remove({productTemplateId, token, jwtToken}) {
|
|
39
|
+
remove({productTemplateId, token, jwtToken, headers}) {
|
|
40
40
|
return client({
|
|
41
41
|
url: `/print-settings/product-templates/${productTemplateId}`,
|
|
42
42
|
method: "delete",
|
|
43
43
|
headers: authorizationHeaders({
|
|
44
|
-
token, jwtToken, internalAuthTokenProvider
|
|
44
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
45
45
|
})
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -3,11 +3,11 @@ const {
|
|
|
3
3
|
} = require("./../endpoints_helpers");
|
|
4
4
|
|
|
5
5
|
function printersFactory({client, internalAuthTokenProvider}) {
|
|
6
|
-
function all({token, query}) {
|
|
6
|
+
function all({token, query, headers}) {
|
|
7
7
|
return client({
|
|
8
8
|
url: "/printers",
|
|
9
9
|
params: query,
|
|
10
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
10
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -2,9 +2,9 @@ const { authorizationHeaders } = require("./../endpoints_helpers");
|
|
|
2
2
|
|
|
3
3
|
function shiftsFactory({client, internalAuthTokenProvider}) {
|
|
4
4
|
|
|
5
|
-
function get({
|
|
5
|
+
function get({token, userId, headers}) {
|
|
6
6
|
return client.get(`/shift/user/${userId}`, {
|
|
7
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider})
|
|
7
|
+
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function travellersFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function all({token, jwtToken, query}) {
|
|
4
|
+
function all({token, jwtToken, query, headers}) {
|
|
5
5
|
return client({
|
|
6
6
|
url: "/travellers",
|
|
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, query = {}}) {
|
|
12
|
+
function get({token, jwtToken, id, query = {}, headers}) {
|
|
13
13
|
return client({
|
|
14
14
|
url: `/travellers/${id}`,
|
|
15
15
|
method: "get",
|
|
16
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
16
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
17
17
|
params: query
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function update({token, jwtToken, id, data, query = {}}) {
|
|
21
|
+
function update({token, jwtToken, id, data, query = {}, headers}) {
|
|
22
22
|
return client({
|
|
23
23
|
url: `/travellers/${id}`,
|
|
24
24
|
method: "put",
|
|
25
25
|
params: query,
|
|
26
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
26
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
27
27
|
data
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
function remove({token, jwtToken, id, query = {}}) {
|
|
31
|
+
function remove({token, jwtToken, id, query = {}, headers}) {
|
|
32
32
|
return client({
|
|
33
33
|
url: `/travellers/${id}`,
|
|
34
34
|
method: "delete",
|
|
35
35
|
params: query,
|
|
36
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider})
|
|
36
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function create({token, jwtToken, query = {}, data}) {
|
|
40
|
+
function create({token, jwtToken, query = {}, data, headers}) {
|
|
41
41
|
return client({
|
|
42
42
|
url: "/travellers",
|
|
43
43
|
method: "post",
|
|
44
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
44
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
45
45
|
params: query,
|
|
46
46
|
data
|
|
47
47
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
3
|
function trustedMachinesFactory({client, internalAuthTokenProvider}) {
|
|
4
|
-
function create({token, jwtToken, data}) {
|
|
4
|
+
function create({token, jwtToken, data, headers}) {
|
|
5
5
|
return client({
|
|
6
6
|
url: "/trusted-machines",
|
|
7
7
|
method: "post",
|
|
8
8
|
withCredentials: true,
|
|
9
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider}),
|
|
9
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
10
10
|
data
|
|
11
11
|
});
|
|
12
12
|
}
|