btrz-api-client 8.75.1 → 9.0.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/.babelrc +2 -1
- package/eslint.config.mjs +48 -0
- package/lib/client-standalone-min.js +19 -5
- package/lib/client.js +1363 -473
- package/lib/constants.js +1 -4
- package/lib/endpoints/accounts/accounts.js +36 -33
- package/lib/endpoints/accounts/agencies.js +53 -43
- package/lib/endpoints/accounts/agency-types.js +78 -59
- package/lib/endpoints/accounts/application-settings.js +84 -61
- package/lib/endpoints/accounts/application.js +19 -19
- package/lib/endpoints/accounts/applications.js +35 -30
- package/lib/endpoints/accounts/control-classes-settings.js +30 -27
- package/lib/endpoints/accounts/current-shifts.js +20 -22
- package/lib/endpoints/accounts/customers.js +119 -90
- package/lib/endpoints/accounts/docs.js +4 -8
- package/lib/endpoints/accounts/domains.js +46 -38
- package/lib/endpoints/accounts/dynamic-forms.js +176 -130
- package/lib/endpoints/accounts/email-settings.js +79 -61
- package/lib/endpoints/accounts/email-templates.js +126 -92
- package/lib/endpoints/accounts/exchange-rates.js +36 -32
- package/lib/endpoints/accounts/exchange-receipts.js +33 -28
- package/lib/endpoints/accounts/external-customers.js +61 -47
- package/lib/endpoints/accounts/goal-settings.js +32 -29
- package/lib/endpoints/accounts/images.js +59 -50
- package/lib/endpoints/accounts/interline.js +131 -102
- package/lib/endpoints/accounts/journey-prices-settings.js +30 -27
- package/lib/endpoints/accounts/lexicons.js +160 -124
- package/lib/endpoints/accounts/market-pricing-settings.js +30 -27
- package/lib/endpoints/accounts/multiproduct-sales-settings.js +33 -28
- package/lib/endpoints/accounts/network.js +97 -80
- package/lib/endpoints/accounts/operation-settings.js +32 -29
- package/lib/endpoints/accounts/people-lookups.js +94 -72
- package/lib/endpoints/accounts/point-to-point-settings.js +30 -27
- package/lib/endpoints/accounts/print-settings.js +32 -29
- package/lib/endpoints/accounts/print-templates.js +89 -75
- package/lib/endpoints/accounts/printers.js +20 -20
- package/lib/endpoints/accounts/rms-settings.js +30 -27
- package/lib/endpoints/accounts/s3buckets.js +49 -39
- package/lib/endpoints/accounts/salesforce-settings.js +32 -29
- package/lib/endpoints/accounts/shift-settings.js +32 -29
- package/lib/endpoints/accounts/shifts.js +431 -317
- package/lib/endpoints/accounts/sms-templates.js +126 -92
- package/lib/endpoints/accounts/sub-print-templates.js +19 -20
- package/lib/endpoints/accounts/system-model-settings.js +51 -45
- package/lib/endpoints/accounts/ticket-movement-settings.js +30 -27
- package/lib/endpoints/accounts/tokens.js +34 -29
- package/lib/endpoints/accounts/transport-regulation-settings.js +30 -27
- package/lib/endpoints/accounts/travellers.js +82 -66
- package/lib/endpoints/accounts/trusted-machines.js +48 -39
- package/lib/endpoints/accounts/twilio-settings.js +32 -29
- package/lib/endpoints/accounts/users.js +262 -184
- package/lib/endpoints/accounts/verified-emails.js +64 -50
- package/lib/endpoints/accounts/websales-config.js +35 -31
- package/lib/endpoints/bpes/configuration.js +51 -37
- package/lib/endpoints/btrzpay/adyen.js +34 -31
- package/lib/endpoints/btrzpay/cardpointe.js +84 -62
- package/lib/endpoints/btrzpay/customerCards.js +73 -56
- package/lib/endpoints/btrzpay/customers.js +55 -43
- package/lib/endpoints/btrzpay/cybersource3ds.js +59 -44
- package/lib/endpoints/btrzpay/datalogic.js +84 -69
- package/lib/endpoints/btrzpay/docs.js +4 -8
- package/lib/endpoints/btrzpay/oxxo.js +66 -59
- package/lib/endpoints/btrzpay/payment-methods.js +141 -96
- package/lib/endpoints/btrzpay/payments.js +37 -30
- package/lib/endpoints/btrzpay/prismaTerminals.js +203 -160
- package/lib/endpoints/btrzpay/reference-numbers.js +23 -21
- package/lib/endpoints/btrzpay/referenced-payments.js +41 -36
- package/lib/endpoints/btrzpay/square.js +39 -36
- package/lib/endpoints/btrzpay/stripe-terminals.js +36 -31
- package/lib/endpoints/btrzpay/stripe3ds.js +25 -22
- package/lib/endpoints/btrzpay/terminalPayments.js +58 -52
- package/lib/endpoints/coltrane/docs.js +4 -8
- package/lib/endpoints/coltrane/healthcheck.js +7 -12
- package/lib/endpoints/coltrane/info.js +7 -12
- package/lib/endpoints/coltrane/merged-fare-tables.js +22 -22
- package/lib/endpoints/coltrane/paths.js +18 -20
- package/lib/endpoints/endpoints_helpers.js +14 -30
- package/lib/endpoints/gps/scanner-app-location.js +16 -19
- package/lib/endpoints/inventory/amenities.js +65 -50
- package/lib/endpoints/inventory/amenity-groups.js +65 -50
- package/lib/endpoints/inventory/banks.js +78 -59
- package/lib/endpoints/inventory/bare-routes.js +31 -30
- package/lib/endpoints/inventory/brands.js +68 -50
- package/lib/endpoints/inventory/bundle-fares.js +21 -23
- package/lib/endpoints/inventory/bundles.js +34 -30
- package/lib/endpoints/inventory/change-requests.js +109 -86
- package/lib/endpoints/inventory/companies.js +20 -21
- package/lib/endpoints/inventory/control-classes.js +112 -85
- package/lib/endpoints/inventory/countries.js +35 -32
- package/lib/endpoints/inventory/custom-content.js +76 -58
- package/lib/endpoints/inventory/custom-fields.js +82 -60
- package/lib/endpoints/inventory/docs.js +4 -8
- package/lib/endpoints/inventory/document-types.js +96 -69
- package/lib/endpoints/inventory/external-passes.js +34 -30
- package/lib/endpoints/inventory/external-wallets.js +133 -90
- package/lib/endpoints/inventory/fallback-codes.js +66 -49
- package/lib/endpoints/inventory/fare-classes.js +54 -41
- package/lib/endpoints/inventory/fare-type-modifiers.js +78 -59
- package/lib/endpoints/inventory/fares.js +95 -72
- package/lib/endpoints/inventory/fees.js +68 -50
- package/lib/endpoints/inventory/filtered-trips-v2.js +23 -21
- package/lib/endpoints/inventory/filtered-trips.js +50 -39
- package/lib/endpoints/inventory/financing-costs.js +78 -61
- package/lib/endpoints/inventory/garages.js +72 -59
- package/lib/endpoints/inventory/getnet-terminals.js +78 -60
- package/lib/endpoints/inventory/gift-certificate-definitions.js +84 -66
- package/lib/endpoints/inventory/healthcheck.js +4 -8
- package/lib/endpoints/inventory/holidays.js +83 -61
- package/lib/endpoints/inventory/insurances.js +68 -57
- package/lib/endpoints/inventory/insurancesCost.js +24 -24
- package/lib/endpoints/inventory/items.js +86 -64
- package/lib/endpoints/inventory/journey-prices.js +83 -61
- package/lib/endpoints/inventory/labels.js +83 -61
- package/lib/endpoints/inventory/marital-status.js +82 -67
- package/lib/endpoints/inventory/marketplace-modifiers.js +74 -57
- package/lib/endpoints/inventory/mit-terminal-settings.js +78 -59
- package/lib/endpoints/inventory/mit-terminals.js +74 -57
- package/lib/endpoints/inventory/operating-companies.js +126 -91
- package/lib/endpoints/inventory/operation-messages.js +85 -63
- package/lib/endpoints/inventory/operation-reasons.js +86 -67
- package/lib/endpoints/inventory/parcel-zones.js +52 -40
- package/lib/endpoints/inventory/pay-on-accounts.js +22 -24
- package/lib/endpoints/inventory/payment-terminals.js +74 -57
- package/lib/endpoints/inventory/prisma-terminals.js +78 -59
- package/lib/endpoints/inventory/products.js +90 -70
- package/lib/endpoints/inventory/promos.js +138 -95
- package/lib/endpoints/inventory/regions.js +78 -59
- package/lib/endpoints/inventory/routes.js +323 -262
- package/lib/endpoints/inventory/schedule-groups.js +69 -52
- package/lib/endpoints/inventory/schedules.js +171 -143
- package/lib/endpoints/inventory/seatclasses.js +82 -67
- package/lib/endpoints/inventory/seatfees.js +60 -48
- package/lib/endpoints/inventory/seatmaps.js +108 -84
- package/lib/endpoints/inventory/segments-information-tables.js +22 -23
- package/lib/endpoints/inventory/segments-information.js +78 -59
- package/lib/endpoints/inventory/service-numbers.js +64 -50
- package/lib/endpoints/inventory/service-types.js +74 -57
- package/lib/endpoints/inventory/ssrs.js +18 -20
- package/lib/endpoints/inventory/station-classes.js +79 -61
- package/lib/endpoints/inventory/station-groups.js +18 -20
- package/lib/endpoints/inventory/stations-provinces.js +18 -20
- package/lib/endpoints/inventory/stations-zones.js +18 -20
- package/lib/endpoints/inventory/stations.js +61 -47
- package/lib/endpoints/inventory/taxes.js +137 -98
- package/lib/endpoints/inventory/travel-routes.js +64 -50
- package/lib/endpoints/inventory/traveller-card-providers-types.js +19 -19
- package/lib/endpoints/inventory/traveller-card-providers.js +68 -50
- package/lib/endpoints/inventory/traveller-card-types.js +82 -59
- package/lib/endpoints/inventory/trip-ids.js +21 -21
- package/lib/endpoints/inventory/trips.js +48 -41
- package/lib/endpoints/inventory/vehicle-types.js +19 -19
- package/lib/endpoints/inventory/vehicles.js +111 -83
- package/lib/endpoints/inventory/zone-price-overages.js +74 -57
- package/lib/endpoints/inventory/zone-prices.js +74 -57
- package/lib/endpoints/invoices/dlink.js +37 -34
- package/lib/endpoints/invoices/docs.js +4 -8
- package/lib/endpoints/invoices/emails.js +22 -23
- package/lib/endpoints/invoices/gti.js +37 -34
- package/lib/endpoints/invoices/infile.js +37 -34
- package/lib/endpoints/invoices/infileJson.js +37 -34
- package/lib/endpoints/invoices/invoices.js +78 -63
- package/lib/endpoints/invoices/pdfs.js +22 -24
- package/lib/endpoints/invoices/providers.js +82 -67
- package/lib/endpoints/invoices/providersSequences.js +89 -74
- package/lib/endpoints/invoices/system.js +37 -34
- package/lib/endpoints/invoices/tax-ids.js +20 -21
- package/lib/endpoints/loyalty/movements.js +55 -49
- package/lib/endpoints/loyalty/programs.js +50 -41
- package/lib/endpoints/notifications/customers.js +33 -31
- package/lib/endpoints/notifications/email.js +20 -21
- package/lib/endpoints/notifications/external-customers.js +35 -30
- package/lib/endpoints/notifications/manifest-notifications.js +31 -33
- package/lib/endpoints/notifications/notify.js +112 -81
- package/lib/endpoints/notifications/orders-rules-validations.js +22 -22
- package/lib/endpoints/notifications/pdf-data.js +56 -64
- package/lib/endpoints/notifications/pdfs.js +48 -55
- package/lib/endpoints/notifications/printed-tickets.js +31 -27
- package/lib/endpoints/notifications/salesforce.js +19 -19
- package/lib/endpoints/notifications/short-urls.js +38 -33
- package/lib/endpoints/notifications/twilio.js +57 -46
- package/lib/endpoints/operations/accounting_items.js +30 -36
- package/lib/endpoints/operations/applied_insurance.js +25 -20
- package/lib/endpoints/operations/calendar_entries.js +18 -20
- package/lib/endpoints/operations/cancellation_settings.js +33 -28
- package/lib/endpoints/operations/docs.js +5 -9
- package/lib/endpoints/operations/external-bookings.js +35 -31
- package/lib/endpoints/operations/flexpasses.js +22 -22
- package/lib/endpoints/operations/gift-certificates.js +25 -23
- package/lib/endpoints/operations/loans.js +30 -36
- package/lib/endpoints/operations/manifest.js +469 -372
- package/lib/endpoints/operations/manifest_leg_for_tickets.js +23 -23
- package/lib/endpoints/operations/movements.js +21 -22
- package/lib/endpoints/operations/outlook-trips.js +20 -21
- package/lib/endpoints/operations/pago-express.js +55 -39
- package/lib/endpoints/operations/parcels.js +96 -67
- package/lib/endpoints/operations/parcels_manifests.js +102 -81
- package/lib/endpoints/operations/passenger_check_in_info.js +66 -52
- package/lib/endpoints/operations/redemption.js +52 -40
- package/lib/endpoints/operations/rms.js +35 -33
- package/lib/endpoints/operations/scheduled_notifications.js +80 -61
- package/lib/endpoints/operations/segments.js +24 -24
- package/lib/endpoints/operations/sold-items-fulfillment.js +20 -21
- package/lib/endpoints/operations/sold-items.js +35 -30
- package/lib/endpoints/operations/tickets.js +109 -78
- package/lib/endpoints/operations/transaction.js +22 -22
- package/lib/endpoints/operations/transactions.js +178 -135
- package/lib/endpoints/operations/transport_regulations.js +22 -22
- package/lib/endpoints/operations/trip_change_info.js +23 -23
- package/lib/endpoints/operations/vehicle_assignments.js +60 -48
- package/lib/endpoints/operations/vouchers.js +32 -35
- package/lib/endpoints/operations/waitlists.js +62 -47
- package/lib/endpoints/ratality/auth.js +10 -14
- package/lib/endpoints/ratality/clients.js +30 -28
- package/lib/endpoints/ratality/integrations.js +43 -36
- package/lib/endpoints/reports/custom-reports.js +50 -39
- package/lib/endpoints/reports/email.js +20 -19
- package/lib/endpoints/reports/report-types.js +35 -30
- package/lib/endpoints/reports/trip-manifests.js +20 -21
- package/lib/endpoints/sales/bundles.js +18 -20
- package/lib/endpoints/sales/cancellations.js +48 -34
- package/lib/endpoints/sales/cart-promo.js +37 -34
- package/lib/endpoints/sales/cart.js +218 -166
- package/lib/endpoints/sales/check-in-info.js +22 -23
- package/lib/endpoints/sales/custom-fields.js +18 -20
- package/lib/endpoints/sales/docs.js +4 -8
- package/lib/endpoints/sales/flexpasses.js +21 -21
- package/lib/endpoints/sales/gift-certificates.js +20 -22
- package/lib/endpoints/sales/order.js +66 -53
- package/lib/endpoints/sales/parcel-quotes.js +20 -20
- package/lib/endpoints/sales/payment-providers.js +20 -21
- package/lib/endpoints/sales/redeemable-items.js +32 -31
- package/lib/endpoints/sales/sync-entry.js +21 -21
- package/lib/endpoints/sales/voucher.js +19 -20
- package/lib/endpoints/seatmaps/access-ticket.js +19 -19
- package/lib/endpoints/seatmaps/seat.js +21 -21
- package/lib/endpoints/uploads/files.js +26 -24
- package/lib/endpoints/uploads/images.js +26 -24
- package/lib/endpoints/webhooks/events.js +24 -24
- package/lib/endpoints/webhooks/subscriptions.js +80 -60
- package/lib/endpoints/webhooks/undelivered.js +103 -73
- package/lib/endpoints/webhooks/webhooks.js +20 -20
- package/lib/initializedClient.js +3 -5
- package/lib/productionDefaults.js +6 -8
- package/package.json +18 -18
- package/src/client.js +1 -1
- package/src/endpoints/operations/transactions.js +1 -1
- package/tools/build-standalone.mjs +15 -0
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -3
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
/* eslint-disable max-len */
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
const {
|
|
3
|
+
authorizationHeaders
|
|
4
|
+
} = require("./../endpoints_helpers.js");
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Query params for GET /shifts (btrz-api-accounts). See get-shifts handler getSpec().
|
|
@@ -47,12 +46,10 @@ var _require = require("./../endpoints_helpers.js"),
|
|
|
47
46
|
* @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
|
|
48
47
|
* @returns {{ all: function, get: function, create: function, update: function, requiresAgencyShiftClosure: object, payments: object, transactions: object, tickets: object, fees: object, refunds: object, items: object, redeemableItems: object, giftCertificates: object, parcels: object, insurances: object, invoices: object, deposits: object, manualTickets: object, locationClosures: object, startingBalances: object, purchaseLimitPayments: object, salesSummary: object, commissions: object }}
|
|
49
48
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
internalAuthTokenProvider = _ref.internalAuthTokenProvider;
|
|
55
|
-
|
|
49
|
+
function shiftsFactory({
|
|
50
|
+
client,
|
|
51
|
+
internalAuthTokenProvider
|
|
52
|
+
}) {
|
|
56
53
|
/**
|
|
57
54
|
* GET /shifts - list shifts for the account. Returns shifts filtered by query params.
|
|
58
55
|
* See get-shifts handler getSpec() in btrz-api-accounts for full API details.
|
|
@@ -63,15 +60,18 @@ function shiftsFactory(_ref) {
|
|
|
63
60
|
* @param {Object} [opts.headers] - Optional headers
|
|
64
61
|
* @returns {Promise<import("axios").AxiosResponse<{ shifts: Array }>>} Response body: { shifts }. Errors: 400 (validation), 401, 500
|
|
65
62
|
*/
|
|
66
|
-
function all(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
function all({
|
|
64
|
+
jwtToken,
|
|
65
|
+
token,
|
|
66
|
+
query,
|
|
67
|
+
headers
|
|
68
|
+
}) {
|
|
72
69
|
return client.get("/shifts", {
|
|
73
70
|
headers: authorizationHeaders({
|
|
74
|
-
token
|
|
71
|
+
token,
|
|
72
|
+
jwtToken,
|
|
73
|
+
internalAuthTokenProvider,
|
|
74
|
+
headers
|
|
75
75
|
}),
|
|
76
76
|
params: query
|
|
77
77
|
});
|
|
@@ -85,13 +85,17 @@ function shiftsFactory(_ref) {
|
|
|
85
85
|
* @param {Object} [opts.headers] - Optional headers
|
|
86
86
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
87
87
|
*/
|
|
88
|
-
function get(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return client.get(
|
|
94
|
-
headers: authorizationHeaders({
|
|
88
|
+
function get({
|
|
89
|
+
token,
|
|
90
|
+
userId,
|
|
91
|
+
headers
|
|
92
|
+
}) {
|
|
93
|
+
return client.get(`/shift/user/${userId}`, {
|
|
94
|
+
headers: authorizationHeaders({
|
|
95
|
+
token,
|
|
96
|
+
internalAuthTokenProvider,
|
|
97
|
+
headers
|
|
98
|
+
})
|
|
95
99
|
});
|
|
96
100
|
}
|
|
97
101
|
|
|
@@ -105,17 +109,20 @@ function shiftsFactory(_ref) {
|
|
|
105
109
|
* @param {Object} [opts.headers] - Optional headers
|
|
106
110
|
* @returns {Promise<import("axios").AxiosResponse<{ shift: Object }>>} Response body: { shift }. Errors: 400, 401, 404 (USER_NOT_FOUND, STATION_NOT_FOUND), 409 (SHIFT_ALREADY_OPEN_FOR_USER, USER_WITHOUT_SHIFT_ENABLED), 500
|
|
107
111
|
*/
|
|
108
|
-
function create(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
function create({
|
|
113
|
+
jwtToken,
|
|
114
|
+
token,
|
|
115
|
+
shiftData,
|
|
116
|
+
headers
|
|
117
|
+
}) {
|
|
114
118
|
return client({
|
|
115
119
|
url: "/shifts",
|
|
116
120
|
method: "post",
|
|
117
121
|
headers: authorizationHeaders({
|
|
118
|
-
token
|
|
122
|
+
token,
|
|
123
|
+
jwtToken,
|
|
124
|
+
internalAuthTokenProvider,
|
|
125
|
+
headers
|
|
119
126
|
}),
|
|
120
127
|
data: shiftData
|
|
121
128
|
});
|
|
@@ -133,28 +140,30 @@ function shiftsFactory(_ref) {
|
|
|
133
140
|
* @param {Object} [opts.query] - Optional query params
|
|
134
141
|
* @returns {Promise<import("axios").AxiosResponse<{ shift: Object }>>} Response body: { shift }. Errors: 401, 404 (SHIFT_NOT_FOUND, USER_NOT_FOUND), 409 (SHIFT_ALREADY_CLOSED, COMMENT_IS_MANDATORY_WHEN_VARIANCE_EXISTS, TOTAL_CHANGED), 500
|
|
135
142
|
*/
|
|
136
|
-
function update(
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
function update({
|
|
144
|
+
jwtToken,
|
|
145
|
+
token,
|
|
146
|
+
shiftId,
|
|
147
|
+
operations,
|
|
148
|
+
headers,
|
|
149
|
+
query
|
|
150
|
+
}) {
|
|
144
151
|
return client({
|
|
145
|
-
url:
|
|
152
|
+
url: `/shifts/${shiftId}`,
|
|
146
153
|
method: "patch",
|
|
147
154
|
headers: authorizationHeaders({
|
|
148
|
-
token
|
|
155
|
+
token,
|
|
156
|
+
jwtToken,
|
|
157
|
+
internalAuthTokenProvider,
|
|
158
|
+
headers
|
|
149
159
|
}),
|
|
150
160
|
data: {
|
|
151
|
-
operations
|
|
161
|
+
operations
|
|
152
162
|
},
|
|
153
163
|
params: query
|
|
154
164
|
});
|
|
155
165
|
}
|
|
156
|
-
|
|
157
|
-
var locationClosureComments = {
|
|
166
|
+
const locationClosureComments = {
|
|
158
167
|
/**
|
|
159
168
|
* POST /shifts/location-closures/:locationClosureId/comments - add comment to location closure.
|
|
160
169
|
* @param {Object} opts
|
|
@@ -165,25 +174,27 @@ function shiftsFactory(_ref) {
|
|
|
165
174
|
* @param {Object} [opts.headers] - Optional headers
|
|
166
175
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
167
176
|
*/
|
|
168
|
-
create
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
create({
|
|
178
|
+
jwtToken,
|
|
179
|
+
token,
|
|
180
|
+
locationClosureId,
|
|
181
|
+
locationClosureComment,
|
|
182
|
+
headers
|
|
183
|
+
}) {
|
|
175
184
|
return client({
|
|
176
|
-
url:
|
|
185
|
+
url: `/shifts/location-closures/${locationClosureId}/comments`,
|
|
177
186
|
method: "post",
|
|
178
187
|
headers: authorizationHeaders({
|
|
179
|
-
token
|
|
188
|
+
token,
|
|
189
|
+
jwtToken,
|
|
190
|
+
internalAuthTokenProvider,
|
|
191
|
+
headers
|
|
180
192
|
}),
|
|
181
193
|
data: locationClosureComment
|
|
182
194
|
});
|
|
183
195
|
}
|
|
184
196
|
};
|
|
185
|
-
|
|
186
|
-
var locationClosureStatus = {
|
|
197
|
+
const locationClosureStatus = {
|
|
187
198
|
/**
|
|
188
199
|
* PUT /shifts/location-closures/:locationClosureId/status - update location closure status.
|
|
189
200
|
* @param {Object} opts
|
|
@@ -194,25 +205,27 @@ function shiftsFactory(_ref) {
|
|
|
194
205
|
* @param {Object} [opts.headers] - Optional headers
|
|
195
206
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
196
207
|
*/
|
|
197
|
-
update
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
208
|
+
update({
|
|
209
|
+
jwtToken,
|
|
210
|
+
token,
|
|
211
|
+
locationClosureId,
|
|
212
|
+
locationClosureStatusChange,
|
|
213
|
+
headers
|
|
214
|
+
}) {
|
|
204
215
|
return client({
|
|
205
|
-
url:
|
|
216
|
+
url: `/shifts/location-closures/${locationClosureId}/status`,
|
|
206
217
|
method: "put",
|
|
207
218
|
headers: authorizationHeaders({
|
|
208
|
-
token
|
|
219
|
+
token,
|
|
220
|
+
jwtToken,
|
|
221
|
+
internalAuthTokenProvider,
|
|
222
|
+
headers
|
|
209
223
|
}),
|
|
210
224
|
data: locationClosureStatusChange
|
|
211
225
|
});
|
|
212
226
|
}
|
|
213
227
|
};
|
|
214
|
-
|
|
215
|
-
var locationClosures = {
|
|
228
|
+
const locationClosures = {
|
|
216
229
|
/**
|
|
217
230
|
* POST /shifts/location-closures - create a location closure.
|
|
218
231
|
* @param {Object} opts
|
|
@@ -222,22 +235,24 @@ function shiftsFactory(_ref) {
|
|
|
222
235
|
* @param {Object} [opts.headers] - Optional headers
|
|
223
236
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
224
237
|
*/
|
|
225
|
-
create
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
238
|
+
create({
|
|
239
|
+
jwtToken,
|
|
240
|
+
token,
|
|
241
|
+
locationClosure,
|
|
242
|
+
headers
|
|
243
|
+
}) {
|
|
231
244
|
return client({
|
|
232
245
|
url: "/shifts/location-closures",
|
|
233
246
|
method: "post",
|
|
234
247
|
headers: authorizationHeaders({
|
|
235
|
-
token
|
|
248
|
+
token,
|
|
249
|
+
jwtToken,
|
|
250
|
+
internalAuthTokenProvider,
|
|
251
|
+
headers
|
|
236
252
|
}),
|
|
237
253
|
data: locationClosure
|
|
238
254
|
});
|
|
239
255
|
},
|
|
240
|
-
|
|
241
256
|
/**
|
|
242
257
|
* GET /shifts/location-closures - list location closures.
|
|
243
258
|
* @param {Object} opts
|
|
@@ -247,20 +262,22 @@ function shiftsFactory(_ref) {
|
|
|
247
262
|
* @param {Object} [opts.headers] - Optional headers
|
|
248
263
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
249
264
|
*/
|
|
250
|
-
all
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
265
|
+
all({
|
|
266
|
+
jwtToken,
|
|
267
|
+
token,
|
|
268
|
+
query,
|
|
269
|
+
headers
|
|
270
|
+
}) {
|
|
256
271
|
return client.get("/shifts/location-closures", {
|
|
257
272
|
headers: authorizationHeaders({
|
|
258
|
-
token
|
|
273
|
+
token,
|
|
274
|
+
jwtToken,
|
|
275
|
+
internalAuthTokenProvider,
|
|
276
|
+
headers
|
|
259
277
|
}),
|
|
260
278
|
params: query
|
|
261
279
|
});
|
|
262
280
|
},
|
|
263
|
-
|
|
264
281
|
/**
|
|
265
282
|
* GET /shifts/location-closures/:locationClosureId - get a location closure. API does not accept query params.
|
|
266
283
|
* @param {Object} opts
|
|
@@ -270,22 +287,25 @@ function shiftsFactory(_ref) {
|
|
|
270
287
|
* @param {Object} [opts.headers] - Optional headers
|
|
271
288
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
272
289
|
*/
|
|
273
|
-
get
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
return client.get(
|
|
280
|
-
headers: authorizationHeaders({
|
|
290
|
+
get({
|
|
291
|
+
token,
|
|
292
|
+
jwtToken,
|
|
293
|
+
locationClosureId,
|
|
294
|
+
headers
|
|
295
|
+
}) {
|
|
296
|
+
return client.get(`/shifts/location-closures/${locationClosureId}`, {
|
|
297
|
+
headers: authorizationHeaders({
|
|
298
|
+
token,
|
|
299
|
+
jwtToken,
|
|
300
|
+
internalAuthTokenProvider,
|
|
301
|
+
headers
|
|
302
|
+
})
|
|
281
303
|
});
|
|
282
304
|
},
|
|
283
|
-
|
|
284
305
|
comments: locationClosureComments,
|
|
285
306
|
status: locationClosureStatus
|
|
286
307
|
};
|
|
287
|
-
|
|
288
|
-
var payments = {
|
|
308
|
+
const payments = {
|
|
289
309
|
/**
|
|
290
310
|
* GET /shifts/:shiftId/payments - get payments for shift.
|
|
291
311
|
* @param {Object} opts
|
|
@@ -295,19 +315,23 @@ function shiftsFactory(_ref) {
|
|
|
295
315
|
* @param {Object} [opts.headers] - Optional headers
|
|
296
316
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
297
317
|
*/
|
|
298
|
-
get
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
return client.get(
|
|
305
|
-
headers: authorizationHeaders({
|
|
318
|
+
get({
|
|
319
|
+
token,
|
|
320
|
+
jwtToken,
|
|
321
|
+
shiftId,
|
|
322
|
+
headers
|
|
323
|
+
}) {
|
|
324
|
+
return client.get(`/shifts/${shiftId}/payments`, {
|
|
325
|
+
headers: authorizationHeaders({
|
|
326
|
+
token,
|
|
327
|
+
jwtToken,
|
|
328
|
+
internalAuthTokenProvider,
|
|
329
|
+
headers
|
|
330
|
+
})
|
|
306
331
|
});
|
|
307
332
|
}
|
|
308
333
|
};
|
|
309
|
-
|
|
310
|
-
var vouchers = {
|
|
334
|
+
const vouchers = {
|
|
311
335
|
/**
|
|
312
336
|
* GET /shifts/:shiftId/vouchers - get vouchers for shift.
|
|
313
337
|
* @param {Object} opts
|
|
@@ -317,19 +341,23 @@ function shiftsFactory(_ref) {
|
|
|
317
341
|
* @param {Object} [opts.headers] - Optional headers
|
|
318
342
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
319
343
|
*/
|
|
320
|
-
get
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
return client.get(
|
|
327
|
-
headers: authorizationHeaders({
|
|
344
|
+
get({
|
|
345
|
+
token,
|
|
346
|
+
jwtToken,
|
|
347
|
+
shiftId,
|
|
348
|
+
headers
|
|
349
|
+
}) {
|
|
350
|
+
return client.get(`/shifts/${shiftId}/vouchers`, {
|
|
351
|
+
headers: authorizationHeaders({
|
|
352
|
+
token,
|
|
353
|
+
jwtToken,
|
|
354
|
+
internalAuthTokenProvider,
|
|
355
|
+
headers
|
|
356
|
+
})
|
|
328
357
|
});
|
|
329
358
|
}
|
|
330
359
|
};
|
|
331
|
-
|
|
332
|
-
var transactions = {
|
|
360
|
+
const transactions = {
|
|
333
361
|
/**
|
|
334
362
|
* GET /shifts/:shiftId/transactions - get transactions for shift.
|
|
335
363
|
* @param {Object} opts
|
|
@@ -339,18 +367,23 @@ function shiftsFactory(_ref) {
|
|
|
339
367
|
* @param {Object} [opts.headers] - Optional headers
|
|
340
368
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
341
369
|
*/
|
|
342
|
-
get
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
return client.get(
|
|
349
|
-
headers: authorizationHeaders({
|
|
370
|
+
get({
|
|
371
|
+
token,
|
|
372
|
+
jwtToken,
|
|
373
|
+
shiftId,
|
|
374
|
+
headers
|
|
375
|
+
}) {
|
|
376
|
+
return client.get(`/shifts/${shiftId}/transactions`, {
|
|
377
|
+
headers: authorizationHeaders({
|
|
378
|
+
token,
|
|
379
|
+
jwtToken,
|
|
380
|
+
internalAuthTokenProvider,
|
|
381
|
+
headers
|
|
382
|
+
})
|
|
350
383
|
});
|
|
351
384
|
}
|
|
352
385
|
};
|
|
353
|
-
|
|
386
|
+
const tickets = {
|
|
354
387
|
/**
|
|
355
388
|
* GET /shifts/:shiftId/tickets - get tickets for shift.
|
|
356
389
|
* @param {Object} opts
|
|
@@ -360,18 +393,23 @@ function shiftsFactory(_ref) {
|
|
|
360
393
|
* @param {Object} [opts.headers] - Optional headers
|
|
361
394
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
362
395
|
*/
|
|
363
|
-
get
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
return client.get(
|
|
370
|
-
headers: authorizationHeaders({
|
|
396
|
+
get({
|
|
397
|
+
token,
|
|
398
|
+
jwtToken,
|
|
399
|
+
shiftId,
|
|
400
|
+
headers
|
|
401
|
+
}) {
|
|
402
|
+
return client.get(`/shifts/${shiftId}/tickets`, {
|
|
403
|
+
headers: authorizationHeaders({
|
|
404
|
+
token,
|
|
405
|
+
jwtToken,
|
|
406
|
+
internalAuthTokenProvider,
|
|
407
|
+
headers
|
|
408
|
+
})
|
|
371
409
|
});
|
|
372
410
|
}
|
|
373
411
|
};
|
|
374
|
-
|
|
412
|
+
const fees = {
|
|
375
413
|
/**
|
|
376
414
|
* GET /shifts/:shiftId/fees - get fees for shift.
|
|
377
415
|
* @param {Object} opts
|
|
@@ -381,18 +419,23 @@ function shiftsFactory(_ref) {
|
|
|
381
419
|
* @param {Object} [opts.headers] - Optional headers
|
|
382
420
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
383
421
|
*/
|
|
384
|
-
get
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
return client.get(
|
|
391
|
-
headers: authorizationHeaders({
|
|
422
|
+
get({
|
|
423
|
+
token,
|
|
424
|
+
jwtToken,
|
|
425
|
+
shiftId,
|
|
426
|
+
headers
|
|
427
|
+
}) {
|
|
428
|
+
return client.get(`/shifts/${shiftId}/fees`, {
|
|
429
|
+
headers: authorizationHeaders({
|
|
430
|
+
token,
|
|
431
|
+
jwtToken,
|
|
432
|
+
internalAuthTokenProvider,
|
|
433
|
+
headers
|
|
434
|
+
})
|
|
392
435
|
});
|
|
393
436
|
}
|
|
394
437
|
};
|
|
395
|
-
|
|
438
|
+
const refunds = {
|
|
396
439
|
/**
|
|
397
440
|
* GET /shifts/:shiftId/refunds - get refunds for shift.
|
|
398
441
|
* @param {Object} opts
|
|
@@ -402,18 +445,23 @@ function shiftsFactory(_ref) {
|
|
|
402
445
|
* @param {Object} [opts.headers] - Optional headers
|
|
403
446
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
404
447
|
*/
|
|
405
|
-
get
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
return client.get(
|
|
412
|
-
headers: authorizationHeaders({
|
|
448
|
+
get({
|
|
449
|
+
token,
|
|
450
|
+
jwtToken,
|
|
451
|
+
shiftId,
|
|
452
|
+
headers
|
|
453
|
+
}) {
|
|
454
|
+
return client.get(`/shifts/${shiftId}/refunds`, {
|
|
455
|
+
headers: authorizationHeaders({
|
|
456
|
+
token,
|
|
457
|
+
jwtToken,
|
|
458
|
+
internalAuthTokenProvider,
|
|
459
|
+
headers
|
|
460
|
+
})
|
|
413
461
|
});
|
|
414
462
|
}
|
|
415
463
|
};
|
|
416
|
-
|
|
464
|
+
const items = {
|
|
417
465
|
/**
|
|
418
466
|
* GET /shifts/:shiftId/items - get items for shift.
|
|
419
467
|
* @param {Object} opts
|
|
@@ -423,18 +471,23 @@ function shiftsFactory(_ref) {
|
|
|
423
471
|
* @param {Object} [opts.headers] - Optional headers
|
|
424
472
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
425
473
|
*/
|
|
426
|
-
get
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
return client.get(
|
|
433
|
-
headers: authorizationHeaders({
|
|
474
|
+
get({
|
|
475
|
+
token,
|
|
476
|
+
jwtToken,
|
|
477
|
+
shiftId,
|
|
478
|
+
headers
|
|
479
|
+
}) {
|
|
480
|
+
return client.get(`/shifts/${shiftId}/items`, {
|
|
481
|
+
headers: authorizationHeaders({
|
|
482
|
+
token,
|
|
483
|
+
jwtToken,
|
|
484
|
+
internalAuthTokenProvider,
|
|
485
|
+
headers
|
|
486
|
+
})
|
|
434
487
|
});
|
|
435
488
|
}
|
|
436
489
|
};
|
|
437
|
-
|
|
490
|
+
const redeemableItems = {
|
|
438
491
|
/**
|
|
439
492
|
* GET /shifts/:shiftId/redeemable-items - get redeemable items for shift.
|
|
440
493
|
* @param {Object} opts
|
|
@@ -444,18 +497,23 @@ function shiftsFactory(_ref) {
|
|
|
444
497
|
* @param {Object} [opts.headers] - Optional headers
|
|
445
498
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
446
499
|
*/
|
|
447
|
-
get
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
return client.get(
|
|
454
|
-
headers: authorizationHeaders({
|
|
500
|
+
get({
|
|
501
|
+
token,
|
|
502
|
+
jwtToken,
|
|
503
|
+
shiftId,
|
|
504
|
+
headers
|
|
505
|
+
}) {
|
|
506
|
+
return client.get(`/shifts/${shiftId}/redeemable-items`, {
|
|
507
|
+
headers: authorizationHeaders({
|
|
508
|
+
token,
|
|
509
|
+
jwtToken,
|
|
510
|
+
internalAuthTokenProvider,
|
|
511
|
+
headers
|
|
512
|
+
})
|
|
455
513
|
});
|
|
456
514
|
}
|
|
457
515
|
};
|
|
458
|
-
|
|
516
|
+
const giftCertificates = {
|
|
459
517
|
/**
|
|
460
518
|
* GET /shifts/:shiftId/gift-certificates - get gift certificates for shift.
|
|
461
519
|
* @param {Object} opts
|
|
@@ -465,18 +523,23 @@ function shiftsFactory(_ref) {
|
|
|
465
523
|
* @param {Object} [opts.headers] - Optional headers
|
|
466
524
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
467
525
|
*/
|
|
468
|
-
get
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
return client.get(
|
|
475
|
-
headers: authorizationHeaders({
|
|
526
|
+
get({
|
|
527
|
+
token,
|
|
528
|
+
jwtToken,
|
|
529
|
+
shiftId,
|
|
530
|
+
headers
|
|
531
|
+
}) {
|
|
532
|
+
return client.get(`/shifts/${shiftId}/gift-certificates`, {
|
|
533
|
+
headers: authorizationHeaders({
|
|
534
|
+
token,
|
|
535
|
+
jwtToken,
|
|
536
|
+
internalAuthTokenProvider,
|
|
537
|
+
headers
|
|
538
|
+
})
|
|
476
539
|
});
|
|
477
540
|
}
|
|
478
541
|
};
|
|
479
|
-
|
|
542
|
+
const parcels = {
|
|
480
543
|
/**
|
|
481
544
|
* GET /shifts/:shiftId/parcels - get parcels for shift.
|
|
482
545
|
* @param {Object} opts
|
|
@@ -486,18 +549,23 @@ function shiftsFactory(_ref) {
|
|
|
486
549
|
* @param {Object} [opts.headers] - Optional headers
|
|
487
550
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
488
551
|
*/
|
|
489
|
-
get
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
return client.get(
|
|
496
|
-
headers: authorizationHeaders({
|
|
552
|
+
get({
|
|
553
|
+
token,
|
|
554
|
+
jwtToken,
|
|
555
|
+
shiftId,
|
|
556
|
+
headers
|
|
557
|
+
}) {
|
|
558
|
+
return client.get(`/shifts/${shiftId}/parcels`, {
|
|
559
|
+
headers: authorizationHeaders({
|
|
560
|
+
token,
|
|
561
|
+
jwtToken,
|
|
562
|
+
internalAuthTokenProvider,
|
|
563
|
+
headers
|
|
564
|
+
})
|
|
497
565
|
});
|
|
498
566
|
}
|
|
499
567
|
};
|
|
500
|
-
|
|
568
|
+
const insurances = {
|
|
501
569
|
/**
|
|
502
570
|
* GET /shifts/:shiftId/insurances - get insurances for shift.
|
|
503
571
|
* @param {Object} opts
|
|
@@ -507,18 +575,23 @@ function shiftsFactory(_ref) {
|
|
|
507
575
|
* @param {Object} [opts.headers] - Optional headers
|
|
508
576
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
509
577
|
*/
|
|
510
|
-
get
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
return client.get(
|
|
517
|
-
headers: authorizationHeaders({
|
|
578
|
+
get({
|
|
579
|
+
token,
|
|
580
|
+
jwtToken,
|
|
581
|
+
shiftId,
|
|
582
|
+
headers
|
|
583
|
+
}) {
|
|
584
|
+
return client.get(`/shifts/${shiftId}/insurances`, {
|
|
585
|
+
headers: authorizationHeaders({
|
|
586
|
+
token,
|
|
587
|
+
jwtToken,
|
|
588
|
+
internalAuthTokenProvider,
|
|
589
|
+
headers
|
|
590
|
+
})
|
|
518
591
|
});
|
|
519
592
|
}
|
|
520
593
|
};
|
|
521
|
-
|
|
594
|
+
const invoices = {
|
|
522
595
|
/**
|
|
523
596
|
* GET /shifts/:shiftId/invoices - get invoices for shift.
|
|
524
597
|
* @param {Object} opts
|
|
@@ -528,18 +601,23 @@ function shiftsFactory(_ref) {
|
|
|
528
601
|
* @param {Object} [opts.headers] - Optional headers
|
|
529
602
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
530
603
|
*/
|
|
531
|
-
get
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
return client.get(
|
|
538
|
-
headers: authorizationHeaders({
|
|
604
|
+
get({
|
|
605
|
+
token,
|
|
606
|
+
jwtToken,
|
|
607
|
+
shiftId,
|
|
608
|
+
headers
|
|
609
|
+
}) {
|
|
610
|
+
return client.get(`/shifts/${shiftId}/invoices`, {
|
|
611
|
+
headers: authorizationHeaders({
|
|
612
|
+
token,
|
|
613
|
+
jwtToken,
|
|
614
|
+
internalAuthTokenProvider,
|
|
615
|
+
headers
|
|
616
|
+
})
|
|
539
617
|
});
|
|
540
618
|
}
|
|
541
619
|
};
|
|
542
|
-
|
|
620
|
+
const deposits = {
|
|
543
621
|
/**
|
|
544
622
|
* GET /shifts/:shiftId/deposits - get deposits for shift.
|
|
545
623
|
* @param {Object} opts
|
|
@@ -549,17 +627,21 @@ function shiftsFactory(_ref) {
|
|
|
549
627
|
* @param {Object} [opts.headers] - Optional headers
|
|
550
628
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
551
629
|
*/
|
|
552
|
-
get
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
return client.get(
|
|
559
|
-
headers: authorizationHeaders({
|
|
630
|
+
get({
|
|
631
|
+
token,
|
|
632
|
+
jwtToken,
|
|
633
|
+
shiftId,
|
|
634
|
+
headers
|
|
635
|
+
}) {
|
|
636
|
+
return client.get(`/shifts/${shiftId}/deposits`, {
|
|
637
|
+
headers: authorizationHeaders({
|
|
638
|
+
token,
|
|
639
|
+
jwtToken,
|
|
640
|
+
internalAuthTokenProvider,
|
|
641
|
+
headers
|
|
642
|
+
})
|
|
560
643
|
});
|
|
561
644
|
},
|
|
562
|
-
|
|
563
645
|
/**
|
|
564
646
|
* POST /shifts/:shiftId/deposits - create a deposit for shift.
|
|
565
647
|
* @param {Object} opts
|
|
@@ -570,22 +652,27 @@ function shiftsFactory(_ref) {
|
|
|
570
652
|
* @param {Object} [opts.headers] - Optional headers
|
|
571
653
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
572
654
|
*/
|
|
573
|
-
create
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
655
|
+
create({
|
|
656
|
+
jwtToken,
|
|
657
|
+
token,
|
|
658
|
+
shiftId,
|
|
659
|
+
deposit,
|
|
660
|
+
headers
|
|
661
|
+
}) {
|
|
580
662
|
return client({
|
|
581
|
-
url:
|
|
663
|
+
url: `/shifts/${shiftId}/deposits`,
|
|
582
664
|
method: "post",
|
|
583
|
-
headers: authorizationHeaders({
|
|
665
|
+
headers: authorizationHeaders({
|
|
666
|
+
token,
|
|
667
|
+
jwtToken,
|
|
668
|
+
internalAuthTokenProvider,
|
|
669
|
+
headers
|
|
670
|
+
}),
|
|
584
671
|
data: deposit
|
|
585
672
|
});
|
|
586
673
|
}
|
|
587
674
|
};
|
|
588
|
-
|
|
675
|
+
const manualTickets = {
|
|
589
676
|
/**
|
|
590
677
|
* GET /shifts/:shiftId/manual-tickets - get manual tickets for shift.
|
|
591
678
|
* @param {Object} opts
|
|
@@ -595,17 +682,21 @@ function shiftsFactory(_ref) {
|
|
|
595
682
|
* @param {Object} [opts.headers] - Optional headers
|
|
596
683
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
597
684
|
*/
|
|
598
|
-
get
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
return client.get(
|
|
605
|
-
headers: authorizationHeaders({
|
|
685
|
+
get({
|
|
686
|
+
token,
|
|
687
|
+
jwtToken,
|
|
688
|
+
shiftId,
|
|
689
|
+
headers
|
|
690
|
+
}) {
|
|
691
|
+
return client.get(`/shifts/${shiftId}/manual-tickets`, {
|
|
692
|
+
headers: authorizationHeaders({
|
|
693
|
+
token,
|
|
694
|
+
jwtToken,
|
|
695
|
+
internalAuthTokenProvider,
|
|
696
|
+
headers
|
|
697
|
+
})
|
|
606
698
|
});
|
|
607
699
|
},
|
|
608
|
-
|
|
609
700
|
/**
|
|
610
701
|
* POST /shifts/:shiftId/manual-tickets - create a manual ticket for shift.
|
|
611
702
|
* @param {Object} opts
|
|
@@ -616,22 +707,27 @@ function shiftsFactory(_ref) {
|
|
|
616
707
|
* @param {Object} [opts.headers] - Optional headers
|
|
617
708
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
618
709
|
*/
|
|
619
|
-
create
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
710
|
+
create({
|
|
711
|
+
jwtToken,
|
|
712
|
+
token,
|
|
713
|
+
shiftId,
|
|
714
|
+
manualTicket,
|
|
715
|
+
headers
|
|
716
|
+
}) {
|
|
626
717
|
return client({
|
|
627
|
-
url:
|
|
718
|
+
url: `/shifts/${shiftId}/manual-tickets`,
|
|
628
719
|
method: "post",
|
|
629
|
-
headers: authorizationHeaders({
|
|
720
|
+
headers: authorizationHeaders({
|
|
721
|
+
token,
|
|
722
|
+
jwtToken,
|
|
723
|
+
internalAuthTokenProvider,
|
|
724
|
+
headers
|
|
725
|
+
}),
|
|
630
726
|
data: manualTicket
|
|
631
727
|
});
|
|
632
728
|
}
|
|
633
729
|
};
|
|
634
|
-
|
|
730
|
+
const startingBalances = {
|
|
635
731
|
/**
|
|
636
732
|
* POST /shifts/:shiftId/starting-balance - create starting balance for shift.
|
|
637
733
|
* @param {Object} opts
|
|
@@ -642,22 +738,27 @@ function shiftsFactory(_ref) {
|
|
|
642
738
|
* @param {Object} [opts.headers] - Optional headers
|
|
643
739
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
644
740
|
*/
|
|
645
|
-
create
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
741
|
+
create({
|
|
742
|
+
jwtToken,
|
|
743
|
+
token,
|
|
744
|
+
shiftId,
|
|
745
|
+
startingBalance,
|
|
746
|
+
headers
|
|
747
|
+
}) {
|
|
652
748
|
return client({
|
|
653
|
-
url:
|
|
749
|
+
url: `/shifts/${shiftId}/starting-balance`,
|
|
654
750
|
method: "post",
|
|
655
|
-
headers: authorizationHeaders({
|
|
751
|
+
headers: authorizationHeaders({
|
|
752
|
+
token,
|
|
753
|
+
jwtToken,
|
|
754
|
+
internalAuthTokenProvider,
|
|
755
|
+
headers
|
|
756
|
+
}),
|
|
656
757
|
data: startingBalance
|
|
657
758
|
});
|
|
658
759
|
}
|
|
659
760
|
};
|
|
660
|
-
|
|
761
|
+
const purchaseLimitPayments = {
|
|
661
762
|
/**
|
|
662
763
|
* GET /shifts/:locationId/purchase-limit-payments - get purchase limit payments for location.
|
|
663
764
|
* @param {Object} opts
|
|
@@ -668,22 +769,25 @@ function shiftsFactory(_ref) {
|
|
|
668
769
|
* @param {Object} [opts.headers] - Optional headers
|
|
669
770
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
670
771
|
*/
|
|
671
|
-
get
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
return client.get(
|
|
772
|
+
get({
|
|
773
|
+
token,
|
|
774
|
+
jwtToken,
|
|
775
|
+
locationId,
|
|
776
|
+
query,
|
|
777
|
+
headers
|
|
778
|
+
}) {
|
|
779
|
+
return client.get(`/shifts/${locationId}/purchase-limit-payments`, {
|
|
679
780
|
headers: authorizationHeaders({
|
|
680
|
-
token
|
|
781
|
+
token,
|
|
782
|
+
jwtToken,
|
|
783
|
+
internalAuthTokenProvider,
|
|
784
|
+
headers
|
|
681
785
|
}),
|
|
682
786
|
params: query
|
|
683
787
|
});
|
|
684
788
|
}
|
|
685
789
|
};
|
|
686
|
-
|
|
790
|
+
const salesSummary = {
|
|
687
791
|
/**
|
|
688
792
|
* GET /shifts/:shiftId/sales-summary - get sales summary for shift.
|
|
689
793
|
* @param {Object} opts
|
|
@@ -694,22 +798,25 @@ function shiftsFactory(_ref) {
|
|
|
694
798
|
* @param {Object} [opts.headers] - Optional headers
|
|
695
799
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
696
800
|
*/
|
|
697
|
-
get
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
return client.get(
|
|
801
|
+
get({
|
|
802
|
+
token,
|
|
803
|
+
jwtToken,
|
|
804
|
+
shiftId,
|
|
805
|
+
query,
|
|
806
|
+
headers
|
|
807
|
+
}) {
|
|
808
|
+
return client.get(`/shifts/${shiftId}/sales-summary`, {
|
|
705
809
|
headers: authorizationHeaders({
|
|
706
|
-
token
|
|
810
|
+
token,
|
|
811
|
+
jwtToken,
|
|
812
|
+
internalAuthTokenProvider,
|
|
813
|
+
headers
|
|
707
814
|
}),
|
|
708
815
|
params: query
|
|
709
816
|
});
|
|
710
817
|
}
|
|
711
818
|
};
|
|
712
|
-
|
|
819
|
+
const commissions = {
|
|
713
820
|
/**
|
|
714
821
|
* GET /shifts/:shiftId/commissions - get commissions for shift.
|
|
715
822
|
* @param {Object} opts
|
|
@@ -719,19 +826,23 @@ function shiftsFactory(_ref) {
|
|
|
719
826
|
* @param {Object} [opts.headers] - Optional headers
|
|
720
827
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
721
828
|
*/
|
|
722
|
-
get
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
return client.get(
|
|
729
|
-
headers: authorizationHeaders({
|
|
829
|
+
get({
|
|
830
|
+
token,
|
|
831
|
+
jwtToken,
|
|
832
|
+
shiftId,
|
|
833
|
+
headers
|
|
834
|
+
}) {
|
|
835
|
+
return client.get(`/shifts/${shiftId}/commissions`, {
|
|
836
|
+
headers: authorizationHeaders({
|
|
837
|
+
token,
|
|
838
|
+
jwtToken,
|
|
839
|
+
internalAuthTokenProvider,
|
|
840
|
+
headers
|
|
841
|
+
})
|
|
730
842
|
});
|
|
731
843
|
}
|
|
732
844
|
};
|
|
733
|
-
|
|
734
|
-
var requiresAgencyShiftClosure = {
|
|
845
|
+
const requiresAgencyShiftClosure = {
|
|
735
846
|
/**
|
|
736
847
|
* PUT /shifts/:shiftId/requires-agency-shift-closure - set requires agency shift closure.
|
|
737
848
|
* @param {Object} opts
|
|
@@ -742,50 +853,53 @@ function shiftsFactory(_ref) {
|
|
|
742
853
|
* @param {Object} [opts.headers] - Optional headers
|
|
743
854
|
* @returns {Promise<import("axios").AxiosResponse>}
|
|
744
855
|
*/
|
|
745
|
-
put
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
856
|
+
put({
|
|
857
|
+
token,
|
|
858
|
+
jwtToken,
|
|
859
|
+
shiftId,
|
|
860
|
+
headers,
|
|
861
|
+
shiftData
|
|
862
|
+
}) {
|
|
752
863
|
return client({
|
|
753
|
-
url:
|
|
864
|
+
url: `/shifts/${shiftId}/requires-agency-shift-closure`,
|
|
754
865
|
method: "put",
|
|
755
|
-
headers: authorizationHeaders({
|
|
866
|
+
headers: authorizationHeaders({
|
|
867
|
+
token,
|
|
868
|
+
jwtToken,
|
|
869
|
+
internalAuthTokenProvider,
|
|
870
|
+
headers
|
|
871
|
+
}),
|
|
756
872
|
data: {
|
|
757
|
-
shiftData
|
|
873
|
+
shiftData
|
|
758
874
|
}
|
|
759
875
|
});
|
|
760
876
|
}
|
|
761
877
|
};
|
|
762
|
-
|
|
763
878
|
return {
|
|
764
|
-
all
|
|
765
|
-
get
|
|
766
|
-
create
|
|
767
|
-
update
|
|
768
|
-
requiresAgencyShiftClosure
|
|
769
|
-
payments
|
|
770
|
-
vouchers
|
|
771
|
-
transactions
|
|
772
|
-
tickets
|
|
773
|
-
fees
|
|
774
|
-
refunds
|
|
775
|
-
items
|
|
776
|
-
redeemableItems
|
|
777
|
-
giftCertificates
|
|
778
|
-
parcels
|
|
779
|
-
insurances
|
|
780
|
-
invoices
|
|
781
|
-
deposits
|
|
782
|
-
manualTickets
|
|
783
|
-
locationClosures
|
|
784
|
-
startingBalances
|
|
785
|
-
purchaseLimitPayments
|
|
786
|
-
salesSummary
|
|
787
|
-
commissions
|
|
879
|
+
all,
|
|
880
|
+
get,
|
|
881
|
+
create,
|
|
882
|
+
update,
|
|
883
|
+
requiresAgencyShiftClosure,
|
|
884
|
+
payments,
|
|
885
|
+
vouchers,
|
|
886
|
+
transactions,
|
|
887
|
+
tickets,
|
|
888
|
+
fees,
|
|
889
|
+
refunds,
|
|
890
|
+
items,
|
|
891
|
+
redeemableItems,
|
|
892
|
+
giftCertificates,
|
|
893
|
+
parcels,
|
|
894
|
+
insurances,
|
|
895
|
+
invoices,
|
|
896
|
+
deposits,
|
|
897
|
+
manualTickets,
|
|
898
|
+
locationClosures,
|
|
899
|
+
startingBalances,
|
|
900
|
+
purchaseLimitPayments,
|
|
901
|
+
salesSummary,
|
|
902
|
+
commissions
|
|
788
903
|
};
|
|
789
904
|
}
|
|
790
|
-
|
|
791
905
|
module.exports = shiftsFactory;
|