btrz-api-client 8.75.1 → 9.1.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.
Files changed (252) hide show
  1. package/.babelrc +2 -1
  2. package/eslint.config.mjs +48 -0
  3. package/lib/client-standalone-min.js +19 -5
  4. package/lib/client.js +1363 -473
  5. package/lib/constants.js +1 -4
  6. package/lib/endpoints/accounts/accounts.js +36 -33
  7. package/lib/endpoints/accounts/agencies.js +53 -43
  8. package/lib/endpoints/accounts/agency-types.js +78 -59
  9. package/lib/endpoints/accounts/application-settings.js +84 -61
  10. package/lib/endpoints/accounts/application.js +19 -19
  11. package/lib/endpoints/accounts/applications.js +35 -30
  12. package/lib/endpoints/accounts/control-classes-settings.js +30 -27
  13. package/lib/endpoints/accounts/current-shifts.js +20 -22
  14. package/lib/endpoints/accounts/customers.js +119 -90
  15. package/lib/endpoints/accounts/docs.js +4 -8
  16. package/lib/endpoints/accounts/domains.js +46 -38
  17. package/lib/endpoints/accounts/dynamic-forms.js +176 -130
  18. package/lib/endpoints/accounts/email-settings.js +79 -61
  19. package/lib/endpoints/accounts/email-templates.js +126 -92
  20. package/lib/endpoints/accounts/exchange-rates.js +36 -32
  21. package/lib/endpoints/accounts/exchange-receipts.js +33 -28
  22. package/lib/endpoints/accounts/external-customers.js +61 -47
  23. package/lib/endpoints/accounts/goal-settings.js +32 -29
  24. package/lib/endpoints/accounts/images.js +59 -50
  25. package/lib/endpoints/accounts/interline.js +131 -102
  26. package/lib/endpoints/accounts/journey-prices-settings.js +30 -27
  27. package/lib/endpoints/accounts/lexicons.js +160 -124
  28. package/lib/endpoints/accounts/market-pricing-settings.js +30 -27
  29. package/lib/endpoints/accounts/multiproduct-sales-settings.js +33 -28
  30. package/lib/endpoints/accounts/network.js +97 -80
  31. package/lib/endpoints/accounts/operation-settings.js +32 -29
  32. package/lib/endpoints/accounts/people-lookups.js +94 -72
  33. package/lib/endpoints/accounts/point-to-point-settings.js +30 -27
  34. package/lib/endpoints/accounts/print-settings.js +32 -29
  35. package/lib/endpoints/accounts/print-templates.js +89 -75
  36. package/lib/endpoints/accounts/printers.js +20 -20
  37. package/lib/endpoints/accounts/rms-settings.js +30 -27
  38. package/lib/endpoints/accounts/s3buckets.js +49 -39
  39. package/lib/endpoints/accounts/salesforce-settings.js +32 -29
  40. package/lib/endpoints/accounts/shift-settings.js +32 -29
  41. package/lib/endpoints/accounts/shifts.js +431 -317
  42. package/lib/endpoints/accounts/sms-templates.js +126 -92
  43. package/lib/endpoints/accounts/sub-print-templates.js +19 -20
  44. package/lib/endpoints/accounts/system-model-settings.js +51 -45
  45. package/lib/endpoints/accounts/ticket-movement-settings.js +30 -27
  46. package/lib/endpoints/accounts/tokens.js +34 -29
  47. package/lib/endpoints/accounts/transport-regulation-settings.js +30 -27
  48. package/lib/endpoints/accounts/travellers.js +82 -66
  49. package/lib/endpoints/accounts/trusted-machines.js +48 -39
  50. package/lib/endpoints/accounts/twilio-settings.js +32 -29
  51. package/lib/endpoints/accounts/users.js +262 -184
  52. package/lib/endpoints/accounts/verified-emails.js +64 -50
  53. package/lib/endpoints/accounts/websales-config.js +35 -31
  54. package/lib/endpoints/bpes/configuration.js +51 -37
  55. package/lib/endpoints/btrzpay/adyen.js +34 -31
  56. package/lib/endpoints/btrzpay/cardpointe.js +84 -62
  57. package/lib/endpoints/btrzpay/customerCards.js +73 -56
  58. package/lib/endpoints/btrzpay/customers.js +55 -43
  59. package/lib/endpoints/btrzpay/cybersource3ds.js +59 -44
  60. package/lib/endpoints/btrzpay/datalogic.js +84 -69
  61. package/lib/endpoints/btrzpay/docs.js +4 -8
  62. package/lib/endpoints/btrzpay/oxxo.js +66 -59
  63. package/lib/endpoints/btrzpay/payment-methods.js +141 -96
  64. package/lib/endpoints/btrzpay/payments.js +37 -30
  65. package/lib/endpoints/btrzpay/prismaTerminals.js +203 -160
  66. package/lib/endpoints/btrzpay/reference-numbers.js +23 -21
  67. package/lib/endpoints/btrzpay/referenced-payments.js +41 -36
  68. package/lib/endpoints/btrzpay/square.js +39 -36
  69. package/lib/endpoints/btrzpay/stripe-terminals.js +36 -31
  70. package/lib/endpoints/btrzpay/stripe3ds.js +25 -22
  71. package/lib/endpoints/btrzpay/terminalPayments.js +58 -52
  72. package/lib/endpoints/coltrane/docs.js +4 -8
  73. package/lib/endpoints/coltrane/healthcheck.js +7 -12
  74. package/lib/endpoints/coltrane/info.js +7 -12
  75. package/lib/endpoints/coltrane/merged-fare-tables.js +22 -22
  76. package/lib/endpoints/coltrane/paths.js +18 -20
  77. package/lib/endpoints/endpoints_helpers.js +14 -30
  78. package/lib/endpoints/gps/scanner-app-location.js +16 -19
  79. package/lib/endpoints/inventory/amenities.js +65 -50
  80. package/lib/endpoints/inventory/amenity-groups.js +65 -50
  81. package/lib/endpoints/inventory/banks.js +78 -59
  82. package/lib/endpoints/inventory/bare-routes.js +31 -30
  83. package/lib/endpoints/inventory/brands.js +68 -50
  84. package/lib/endpoints/inventory/bundle-fares.js +21 -23
  85. package/lib/endpoints/inventory/bundles.js +34 -30
  86. package/lib/endpoints/inventory/change-requests.js +109 -86
  87. package/lib/endpoints/inventory/companies.js +20 -21
  88. package/lib/endpoints/inventory/control-classes.js +112 -85
  89. package/lib/endpoints/inventory/countries.js +35 -32
  90. package/lib/endpoints/inventory/custom-content.js +76 -58
  91. package/lib/endpoints/inventory/custom-fields.js +82 -60
  92. package/lib/endpoints/inventory/docs.js +4 -8
  93. package/lib/endpoints/inventory/document-types.js +96 -69
  94. package/lib/endpoints/inventory/external-passes.js +34 -30
  95. package/lib/endpoints/inventory/external-wallets.js +133 -90
  96. package/lib/endpoints/inventory/fallback-codes.js +66 -49
  97. package/lib/endpoints/inventory/fare-classes.js +54 -41
  98. package/lib/endpoints/inventory/fare-type-modifiers.js +78 -59
  99. package/lib/endpoints/inventory/fares.js +95 -72
  100. package/lib/endpoints/inventory/fees.js +68 -50
  101. package/lib/endpoints/inventory/filtered-trips-v2.js +23 -21
  102. package/lib/endpoints/inventory/filtered-trips.js +50 -39
  103. package/lib/endpoints/inventory/financing-costs.js +78 -61
  104. package/lib/endpoints/inventory/garages.js +72 -59
  105. package/lib/endpoints/inventory/getnet-terminals.js +78 -60
  106. package/lib/endpoints/inventory/gift-certificate-definitions.js +84 -66
  107. package/lib/endpoints/inventory/healthcheck.js +4 -8
  108. package/lib/endpoints/inventory/holidays.js +83 -61
  109. package/lib/endpoints/inventory/insurances.js +68 -57
  110. package/lib/endpoints/inventory/insurancesCost.js +24 -24
  111. package/lib/endpoints/inventory/items.js +86 -64
  112. package/lib/endpoints/inventory/journey-prices.js +83 -61
  113. package/lib/endpoints/inventory/labels.js +83 -61
  114. package/lib/endpoints/inventory/marital-status.js +82 -67
  115. package/lib/endpoints/inventory/marketplace-modifiers.js +74 -57
  116. package/lib/endpoints/inventory/mit-terminal-settings.js +78 -59
  117. package/lib/endpoints/inventory/mit-terminals.js +74 -57
  118. package/lib/endpoints/inventory/operating-companies.js +126 -91
  119. package/lib/endpoints/inventory/operation-messages.js +85 -63
  120. package/lib/endpoints/inventory/operation-reasons.js +86 -67
  121. package/lib/endpoints/inventory/parcel-zones.js +52 -40
  122. package/lib/endpoints/inventory/pay-on-accounts.js +22 -24
  123. package/lib/endpoints/inventory/payment-terminals.js +74 -57
  124. package/lib/endpoints/inventory/prisma-terminals.js +78 -59
  125. package/lib/endpoints/inventory/products.js +90 -70
  126. package/lib/endpoints/inventory/promos.js +138 -95
  127. package/lib/endpoints/inventory/regions.js +78 -59
  128. package/lib/endpoints/inventory/routes.js +323 -262
  129. package/lib/endpoints/inventory/schedule-groups.js +69 -52
  130. package/lib/endpoints/inventory/schedules.js +171 -143
  131. package/lib/endpoints/inventory/seatclasses.js +82 -67
  132. package/lib/endpoints/inventory/seatfees.js +60 -48
  133. package/lib/endpoints/inventory/seatmaps.js +108 -84
  134. package/lib/endpoints/inventory/segments-information-tables.js +22 -23
  135. package/lib/endpoints/inventory/segments-information.js +78 -59
  136. package/lib/endpoints/inventory/service-numbers.js +64 -50
  137. package/lib/endpoints/inventory/service-types.js +74 -57
  138. package/lib/endpoints/inventory/ssrs.js +18 -20
  139. package/lib/endpoints/inventory/station-classes.js +79 -61
  140. package/lib/endpoints/inventory/station-groups.js +18 -20
  141. package/lib/endpoints/inventory/stations-provinces.js +18 -20
  142. package/lib/endpoints/inventory/stations-zones.js +18 -20
  143. package/lib/endpoints/inventory/stations.js +61 -47
  144. package/lib/endpoints/inventory/taxes.js +137 -98
  145. package/lib/endpoints/inventory/travel-routes.js +64 -50
  146. package/lib/endpoints/inventory/traveller-card-providers-types.js +19 -19
  147. package/lib/endpoints/inventory/traveller-card-providers.js +68 -50
  148. package/lib/endpoints/inventory/traveller-card-types.js +82 -59
  149. package/lib/endpoints/inventory/trip-ids.js +21 -21
  150. package/lib/endpoints/inventory/trips.js +48 -41
  151. package/lib/endpoints/inventory/vehicle-types.js +19 -19
  152. package/lib/endpoints/inventory/vehicles.js +111 -83
  153. package/lib/endpoints/inventory/zone-price-overages.js +74 -57
  154. package/lib/endpoints/inventory/zone-prices.js +74 -57
  155. package/lib/endpoints/invoices/dlink.js +37 -34
  156. package/lib/endpoints/invoices/docs.js +4 -8
  157. package/lib/endpoints/invoices/emails.js +22 -23
  158. package/lib/endpoints/invoices/gti.js +37 -34
  159. package/lib/endpoints/invoices/infile.js +37 -34
  160. package/lib/endpoints/invoices/infileJson.js +37 -34
  161. package/lib/endpoints/invoices/invoices.js +78 -63
  162. package/lib/endpoints/invoices/pdfs.js +22 -24
  163. package/lib/endpoints/invoices/providers.js +82 -67
  164. package/lib/endpoints/invoices/providersSequences.js +89 -74
  165. package/lib/endpoints/invoices/system.js +37 -34
  166. package/lib/endpoints/invoices/tax-ids.js +20 -21
  167. package/lib/endpoints/loyalty/movements.js +55 -49
  168. package/lib/endpoints/loyalty/programs.js +50 -41
  169. package/lib/endpoints/notifications/customers.js +33 -31
  170. package/lib/endpoints/notifications/email.js +20 -21
  171. package/lib/endpoints/notifications/external-customers.js +35 -30
  172. package/lib/endpoints/notifications/manifest-notifications.js +31 -33
  173. package/lib/endpoints/notifications/notify.js +112 -81
  174. package/lib/endpoints/notifications/orders-rules-validations.js +22 -22
  175. package/lib/endpoints/notifications/pdf-data.js +56 -64
  176. package/lib/endpoints/notifications/pdfs.js +48 -55
  177. package/lib/endpoints/notifications/printed-tickets.js +31 -27
  178. package/lib/endpoints/notifications/salesforce.js +19 -19
  179. package/lib/endpoints/notifications/short-urls.js +38 -33
  180. package/lib/endpoints/notifications/twilio.js +57 -46
  181. package/lib/endpoints/operations/accounting_items.js +30 -36
  182. package/lib/endpoints/operations/applied_insurance.js +25 -20
  183. package/lib/endpoints/operations/calendar_entries.js +18 -20
  184. package/lib/endpoints/operations/cancellation_settings.js +33 -28
  185. package/lib/endpoints/operations/docs.js +5 -9
  186. package/lib/endpoints/operations/external-bookings.js +35 -31
  187. package/lib/endpoints/operations/flexpasses.js +22 -22
  188. package/lib/endpoints/operations/gift-certificates.js +25 -23
  189. package/lib/endpoints/operations/loans.js +30 -36
  190. package/lib/endpoints/operations/manifest.js +469 -372
  191. package/lib/endpoints/operations/manifest_leg_for_tickets.js +23 -23
  192. package/lib/endpoints/operations/movements.js +21 -22
  193. package/lib/endpoints/operations/outlook-trips.js +20 -21
  194. package/lib/endpoints/operations/pago-express.js +55 -39
  195. package/lib/endpoints/operations/parcels.js +96 -67
  196. package/lib/endpoints/operations/parcels_manifests.js +102 -81
  197. package/lib/endpoints/operations/passenger_check_in_info.js +66 -52
  198. package/lib/endpoints/operations/redemption.js +52 -40
  199. package/lib/endpoints/operations/rms.js +35 -33
  200. package/lib/endpoints/operations/scheduled_notifications.js +80 -61
  201. package/lib/endpoints/operations/segments.js +24 -24
  202. package/lib/endpoints/operations/sold-items-fulfillment.js +20 -21
  203. package/lib/endpoints/operations/sold-items.js +35 -30
  204. package/lib/endpoints/operations/tickets.js +109 -78
  205. package/lib/endpoints/operations/transaction.js +22 -22
  206. package/lib/endpoints/operations/transactions.js +178 -135
  207. package/lib/endpoints/operations/transport_regulations.js +22 -22
  208. package/lib/endpoints/operations/trip_change_info.js +23 -23
  209. package/lib/endpoints/operations/vehicle_assignments.js +60 -48
  210. package/lib/endpoints/operations/vouchers.js +32 -35
  211. package/lib/endpoints/operations/waitlists.js +62 -47
  212. package/lib/endpoints/ratality/auth.js +10 -14
  213. package/lib/endpoints/ratality/clients.js +30 -28
  214. package/lib/endpoints/ratality/integrations.js +43 -36
  215. package/lib/endpoints/reports/custom-reports.js +50 -39
  216. package/lib/endpoints/reports/email.js +20 -19
  217. package/lib/endpoints/reports/report-types.js +35 -30
  218. package/lib/endpoints/reports/trip-manifests.js +20 -21
  219. package/lib/endpoints/sales/bundles.js +18 -20
  220. package/lib/endpoints/sales/cancellations.js +48 -34
  221. package/lib/endpoints/sales/cart-promo.js +37 -34
  222. package/lib/endpoints/sales/cart.js +258 -166
  223. package/lib/endpoints/sales/check-in-info.js +22 -23
  224. package/lib/endpoints/sales/custom-fields.js +18 -20
  225. package/lib/endpoints/sales/docs.js +4 -8
  226. package/lib/endpoints/sales/flexpasses.js +21 -21
  227. package/lib/endpoints/sales/gift-certificates.js +20 -22
  228. package/lib/endpoints/sales/order.js +66 -53
  229. package/lib/endpoints/sales/parcel-quotes.js +20 -20
  230. package/lib/endpoints/sales/payment-providers.js +20 -21
  231. package/lib/endpoints/sales/redeemable-items.js +32 -31
  232. package/lib/endpoints/sales/sync-entry.js +21 -21
  233. package/lib/endpoints/sales/voucher.js +19 -20
  234. package/lib/endpoints/seatmaps/access-ticket.js +19 -19
  235. package/lib/endpoints/seatmaps/seat.js +21 -21
  236. package/lib/endpoints/uploads/files.js +26 -24
  237. package/lib/endpoints/uploads/images.js +26 -24
  238. package/lib/endpoints/webhooks/events.js +24 -24
  239. package/lib/endpoints/webhooks/subscriptions.js +80 -60
  240. package/lib/endpoints/webhooks/undelivered.js +103 -73
  241. package/lib/endpoints/webhooks/webhooks.js +20 -20
  242. package/lib/initializedClient.js +3 -5
  243. package/lib/productionDefaults.js +6 -8
  244. package/package.json +18 -18
  245. package/src/client.js +1 -1
  246. package/src/endpoints/operations/transactions.js +1 -1
  247. package/src/endpoints/sales/cart.js +31 -1
  248. package/test/endpoints/sales/cart.test.js +6 -0
  249. package/tools/build-standalone.mjs +15 -0
  250. package/.eslint-report.json +0 -1
  251. package/.eslintignore +0 -2
  252. package/.eslintrc.js +0 -3
@@ -1,8 +1,7 @@
1
- "use strict";
2
-
3
1
  /* eslint-disable max-len */
4
- var _require = require("./../endpoints_helpers.js"),
5
- authorizationHeaders = _require.authorizationHeaders;
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
- function shiftsFactory(_ref) {
53
- var client = _ref.client,
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(_ref2) {
67
- var jwtToken = _ref2.jwtToken,
68
- token = _ref2.token,
69
- query = _ref2.query,
70
- headers = _ref2.headers;
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: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
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(_ref3) {
89
- var token = _ref3.token,
90
- userId = _ref3.userId,
91
- headers = _ref3.headers;
92
-
93
- return client.get("/shift/user/" + userId, {
94
- headers: authorizationHeaders({ token: token, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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(_ref4) {
109
- var jwtToken = _ref4.jwtToken,
110
- token = _ref4.token,
111
- shiftData = _ref4.shiftData,
112
- headers = _ref4.headers;
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: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
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(_ref5) {
137
- var jwtToken = _ref5.jwtToken,
138
- token = _ref5.token,
139
- shiftId = _ref5.shiftId,
140
- operations = _ref5.operations,
141
- headers = _ref5.headers,
142
- query = _ref5.query;
143
-
143
+ function update({
144
+ jwtToken,
145
+ token,
146
+ shiftId,
147
+ operations,
148
+ headers,
149
+ query
150
+ }) {
144
151
  return client({
145
- url: "/shifts/" + shiftId,
152
+ url: `/shifts/${shiftId}`,
146
153
  method: "patch",
147
154
  headers: authorizationHeaders({
148
- token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
155
+ token,
156
+ jwtToken,
157
+ internalAuthTokenProvider,
158
+ headers
149
159
  }),
150
160
  data: {
151
- operations: 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: function create(_ref6) {
169
- var jwtToken = _ref6.jwtToken,
170
- token = _ref6.token,
171
- locationClosureId = _ref6.locationClosureId,
172
- locationClosureComment = _ref6.locationClosureComment,
173
- headers = _ref6.headers;
174
-
177
+ create({
178
+ jwtToken,
179
+ token,
180
+ locationClosureId,
181
+ locationClosureComment,
182
+ headers
183
+ }) {
175
184
  return client({
176
- url: "/shifts/location-closures/" + locationClosureId + "/comments",
185
+ url: `/shifts/location-closures/${locationClosureId}/comments`,
177
186
  method: "post",
178
187
  headers: authorizationHeaders({
179
- token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
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: function update(_ref7) {
198
- var jwtToken = _ref7.jwtToken,
199
- token = _ref7.token,
200
- locationClosureId = _ref7.locationClosureId,
201
- locationClosureStatusChange = _ref7.locationClosureStatusChange,
202
- headers = _ref7.headers;
203
-
208
+ update({
209
+ jwtToken,
210
+ token,
211
+ locationClosureId,
212
+ locationClosureStatusChange,
213
+ headers
214
+ }) {
204
215
  return client({
205
- url: "/shifts/location-closures/" + locationClosureId + "/status",
216
+ url: `/shifts/location-closures/${locationClosureId}/status`,
206
217
  method: "put",
207
218
  headers: authorizationHeaders({
208
- token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
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: function create(_ref8) {
226
- var jwtToken = _ref8.jwtToken,
227
- token = _ref8.token,
228
- locationClosure = _ref8.locationClosure,
229
- headers = _ref8.headers;
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: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
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: function all(_ref9) {
251
- var jwtToken = _ref9.jwtToken,
252
- token = _ref9.token,
253
- query = _ref9.query,
254
- headers = _ref9.headers;
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: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
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: function get(_ref10) {
274
- var token = _ref10.token,
275
- jwtToken = _ref10.jwtToken,
276
- locationClosureId = _ref10.locationClosureId,
277
- headers = _ref10.headers;
278
-
279
- return client.get("/shifts/location-closures/" + locationClosureId, {
280
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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: function get(_ref11) {
299
- var token = _ref11.token,
300
- jwtToken = _ref11.jwtToken,
301
- shiftId = _ref11.shiftId,
302
- headers = _ref11.headers;
303
-
304
- return client.get("/shifts/" + shiftId + "/payments", {
305
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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: function get(_ref12) {
321
- var token = _ref12.token,
322
- jwtToken = _ref12.jwtToken,
323
- shiftId = _ref12.shiftId,
324
- headers = _ref12.headers;
325
-
326
- return client.get("/shifts/" + shiftId + "/vouchers", {
327
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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: function get(_ref13) {
343
- var token = _ref13.token,
344
- jwtToken = _ref13.jwtToken,
345
- shiftId = _ref13.shiftId,
346
- headers = _ref13.headers;
347
-
348
- return client.get("/shifts/" + shiftId + "/transactions", {
349
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var tickets = {
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: function get(_ref14) {
364
- var token = _ref14.token,
365
- jwtToken = _ref14.jwtToken,
366
- shiftId = _ref14.shiftId,
367
- headers = _ref14.headers;
368
-
369
- return client.get("/shifts/" + shiftId + "/tickets", {
370
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var fees = {
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: function get(_ref15) {
385
- var token = _ref15.token,
386
- jwtToken = _ref15.jwtToken,
387
- shiftId = _ref15.shiftId,
388
- headers = _ref15.headers;
389
-
390
- return client.get("/shifts/" + shiftId + "/fees", {
391
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var refunds = {
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: function get(_ref16) {
406
- var token = _ref16.token,
407
- jwtToken = _ref16.jwtToken,
408
- shiftId = _ref16.shiftId,
409
- headers = _ref16.headers;
410
-
411
- return client.get("/shifts/" + shiftId + "/refunds", {
412
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var items = {
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: function get(_ref17) {
427
- var token = _ref17.token,
428
- jwtToken = _ref17.jwtToken,
429
- shiftId = _ref17.shiftId,
430
- headers = _ref17.headers;
431
-
432
- return client.get("/shifts/" + shiftId + "/items", {
433
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var redeemableItems = {
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: function get(_ref18) {
448
- var token = _ref18.token,
449
- jwtToken = _ref18.jwtToken,
450
- shiftId = _ref18.shiftId,
451
- headers = _ref18.headers;
452
-
453
- return client.get("/shifts/" + shiftId + "/redeemable-items", {
454
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var giftCertificates = {
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: function get(_ref19) {
469
- var token = _ref19.token,
470
- jwtToken = _ref19.jwtToken,
471
- shiftId = _ref19.shiftId,
472
- headers = _ref19.headers;
473
-
474
- return client.get("/shifts/" + shiftId + "/gift-certificates", {
475
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var parcels = {
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: function get(_ref20) {
490
- var token = _ref20.token,
491
- jwtToken = _ref20.jwtToken,
492
- shiftId = _ref20.shiftId,
493
- headers = _ref20.headers;
494
-
495
- return client.get("/shifts/" + shiftId + "/parcels", {
496
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var insurances = {
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: function get(_ref21) {
511
- var token = _ref21.token,
512
- jwtToken = _ref21.jwtToken,
513
- shiftId = _ref21.shiftId,
514
- headers = _ref21.headers;
515
-
516
- return client.get("/shifts/" + shiftId + "/insurances", {
517
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var invoices = {
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: function get(_ref22) {
532
- var token = _ref22.token,
533
- jwtToken = _ref22.jwtToken,
534
- shiftId = _ref22.shiftId,
535
- headers = _ref22.headers;
536
-
537
- return client.get("/shifts/" + shiftId + "/invoices", {
538
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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
- var deposits = {
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: function get(_ref23) {
553
- var token = _ref23.token,
554
- jwtToken = _ref23.jwtToken,
555
- shiftId = _ref23.shiftId,
556
- headers = _ref23.headers;
557
-
558
- return client.get("/shifts/" + shiftId + "/deposits", {
559
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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: function create(_ref24) {
574
- var jwtToken = _ref24.jwtToken,
575
- token = _ref24.token,
576
- shiftId = _ref24.shiftId,
577
- deposit = _ref24.deposit,
578
- headers = _ref24.headers;
579
-
655
+ create({
656
+ jwtToken,
657
+ token,
658
+ shiftId,
659
+ deposit,
660
+ headers
661
+ }) {
580
662
  return client({
581
- url: "/shifts/" + shiftId + "/deposits",
663
+ url: `/shifts/${shiftId}/deposits`,
582
664
  method: "post",
583
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
665
+ headers: authorizationHeaders({
666
+ token,
667
+ jwtToken,
668
+ internalAuthTokenProvider,
669
+ headers
670
+ }),
584
671
  data: deposit
585
672
  });
586
673
  }
587
674
  };
588
- var manualTickets = {
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: function get(_ref25) {
599
- var token = _ref25.token,
600
- jwtToken = _ref25.jwtToken,
601
- shiftId = _ref25.shiftId,
602
- headers = _ref25.headers;
603
-
604
- return client.get("/shifts/" + shiftId + "/manual-tickets", {
605
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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: function create(_ref26) {
620
- var jwtToken = _ref26.jwtToken,
621
- token = _ref26.token,
622
- shiftId = _ref26.shiftId,
623
- manualTicket = _ref26.manualTicket,
624
- headers = _ref26.headers;
625
-
710
+ create({
711
+ jwtToken,
712
+ token,
713
+ shiftId,
714
+ manualTicket,
715
+ headers
716
+ }) {
626
717
  return client({
627
- url: "/shifts/" + shiftId + "/manual-tickets",
718
+ url: `/shifts/${shiftId}/manual-tickets`,
628
719
  method: "post",
629
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
720
+ headers: authorizationHeaders({
721
+ token,
722
+ jwtToken,
723
+ internalAuthTokenProvider,
724
+ headers
725
+ }),
630
726
  data: manualTicket
631
727
  });
632
728
  }
633
729
  };
634
- var startingBalances = {
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: function create(_ref27) {
646
- var jwtToken = _ref27.jwtToken,
647
- token = _ref27.token,
648
- shiftId = _ref27.shiftId,
649
- startingBalance = _ref27.startingBalance,
650
- headers = _ref27.headers;
651
-
741
+ create({
742
+ jwtToken,
743
+ token,
744
+ shiftId,
745
+ startingBalance,
746
+ headers
747
+ }) {
652
748
  return client({
653
- url: "/shifts/" + shiftId + "/starting-balance",
749
+ url: `/shifts/${shiftId}/starting-balance`,
654
750
  method: "post",
655
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
751
+ headers: authorizationHeaders({
752
+ token,
753
+ jwtToken,
754
+ internalAuthTokenProvider,
755
+ headers
756
+ }),
656
757
  data: startingBalance
657
758
  });
658
759
  }
659
760
  };
660
- var purchaseLimitPayments = {
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: function get(_ref28) {
672
- var token = _ref28.token,
673
- jwtToken = _ref28.jwtToken,
674
- locationId = _ref28.locationId,
675
- query = _ref28.query,
676
- headers = _ref28.headers;
677
-
678
- return client.get("/shifts/" + locationId + "/purchase-limit-payments", {
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: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
781
+ token,
782
+ jwtToken,
783
+ internalAuthTokenProvider,
784
+ headers
681
785
  }),
682
786
  params: query
683
787
  });
684
788
  }
685
789
  };
686
- var salesSummary = {
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: function get(_ref29) {
698
- var token = _ref29.token,
699
- jwtToken = _ref29.jwtToken,
700
- shiftId = _ref29.shiftId,
701
- query = _ref29.query,
702
- headers = _ref29.headers;
703
-
704
- return client.get("/shifts/" + shiftId + "/sales-summary", {
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: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
810
+ token,
811
+ jwtToken,
812
+ internalAuthTokenProvider,
813
+ headers
707
814
  }),
708
815
  params: query
709
816
  });
710
817
  }
711
818
  };
712
- var commissions = {
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: function get(_ref30) {
723
- var token = _ref30.token,
724
- jwtToken = _ref30.jwtToken,
725
- shiftId = _ref30.shiftId,
726
- headers = _ref30.headers;
727
-
728
- return client.get("/shifts/" + shiftId + "/commissions", {
729
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
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: function put(_ref31) {
746
- var token = _ref31.token,
747
- jwtToken = _ref31.jwtToken,
748
- shiftId = _ref31.shiftId,
749
- headers = _ref31.headers,
750
- shiftData = _ref31.shiftData;
751
-
856
+ put({
857
+ token,
858
+ jwtToken,
859
+ shiftId,
860
+ headers,
861
+ shiftData
862
+ }) {
752
863
  return client({
753
- url: "/shifts/" + shiftId + "/requires-agency-shift-closure",
864
+ url: `/shifts/${shiftId}/requires-agency-shift-closure`,
754
865
  method: "put",
755
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
866
+ headers: authorizationHeaders({
867
+ token,
868
+ jwtToken,
869
+ internalAuthTokenProvider,
870
+ headers
871
+ }),
756
872
  data: {
757
- shiftData: shiftData
873
+ shiftData
758
874
  }
759
875
  });
760
876
  }
761
877
  };
762
-
763
878
  return {
764
- all: all,
765
- get: get,
766
- create: create,
767
- update: update,
768
- requiresAgencyShiftClosure: requiresAgencyShiftClosure,
769
- payments: payments,
770
- vouchers: vouchers,
771
- transactions: transactions,
772
- tickets: tickets,
773
- fees: fees,
774
- refunds: refunds,
775
- items: items,
776
- redeemableItems: redeemableItems,
777
- giftCertificates: giftCertificates,
778
- parcels: parcels,
779
- insurances: insurances,
780
- invoices: invoices,
781
- deposits: deposits,
782
- manualTickets: manualTickets,
783
- locationClosures: locationClosures,
784
- startingBalances: startingBalances,
785
- purchaseLimitPayments: purchaseLimitPayments,
786
- salesSummary: salesSummary,
787
- commissions: 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;