btrz-api-client 8.65.0 → 8.68.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/.eslint-report.json +1 -0
  2. package/.eslintignore +2 -0
  3. package/fetch-test.js +5 -6
  4. package/index.js +2 -2
  5. package/lib/client-standalone-min.js +3 -3
  6. package/lib/client.js +51 -38
  7. package/lib/endpoints/accounts/agencies.js +34 -7
  8. package/lib/endpoints/accounts/journey-prices-settings.js +2 -2
  9. package/lib/endpoints/accounts/market-pricing-settings.js +3 -3
  10. package/lib/endpoints/accounts/multiproduct-sales-settings.js +6 -2
  11. package/lib/endpoints/accounts/operation-settings.js +3 -1
  12. package/lib/endpoints/btrzpay/referenced-payments.js +6 -2
  13. package/lib/endpoints/btrzpay/square.js +12 -3
  14. package/lib/endpoints/btrzpay/stripe-terminals.js +9 -3
  15. package/lib/endpoints/btrzpay/terminalPayments.js +14 -4
  16. package/lib/endpoints/inventory/document-types.js +2 -1
  17. package/lib/endpoints/inventory/fare-type-modifiers.js +167 -0
  18. package/lib/endpoints/inventory/products.js +1 -0
  19. package/lib/endpoints/notifications/notify.js +55 -19
  20. package/lib/endpoints/operations/movements.js +7 -2
  21. package/lib/endpoints/operations/pago-express.js +9 -3
  22. package/lib/endpoints/operations/parcels.js +3 -1
  23. package/lib/endpoints/sales/cancellations.js +31 -8
  24. package/package.json +6 -8
  25. package/src/client.js +1 -1
  26. package/src/endpoints/accounts/agencies.js +23 -1
  27. package/src/endpoints/accounts/journey-prices-settings.js +2 -2
  28. package/src/endpoints/accounts/market-pricing-settings.js +3 -3
  29. package/src/endpoints/accounts/multiproduct-sales-settings.js +6 -2
  30. package/src/endpoints/accounts/operation-settings.js +3 -1
  31. package/src/endpoints/btrzpay/referenced-payments.js +6 -2
  32. package/src/endpoints/btrzpay/square.js +12 -3
  33. package/src/endpoints/btrzpay/stripe-terminals.js +9 -3
  34. package/src/endpoints/btrzpay/terminalPayments.js +14 -4
  35. package/src/endpoints/inventory/document-types.js +2 -1
  36. package/src/endpoints/inventory/fare-type-modifiers.js +140 -0
  37. package/src/endpoints/inventory/products.js +1 -0
  38. package/src/endpoints/notifications/notify.js +28 -1
  39. package/src/endpoints/operations/movements.js +7 -2
  40. package/src/endpoints/operations/pago-express.js +9 -3
  41. package/src/endpoints/operations/parcels.js +3 -1
  42. package/src/endpoints/sales/cancellations.js +31 -8
  43. package/test/all.test.js +219 -0
  44. package/test/client.test.js +58 -44
  45. package/test/endpoints/accounts/agencies.test.js +28 -0
  46. package/test/endpoints/accounts/application-settings.test.js +2 -2
  47. package/test/endpoints/accounts/applications.test.js +2 -2
  48. package/test/endpoints/accounts/current-shifts.test.js +2 -2
  49. package/test/endpoints/accounts/customers.js +17 -17
  50. package/test/endpoints/accounts/domains.test.js +6 -8
  51. package/test/endpoints/accounts/exchange-rates.test.js +3 -3
  52. package/test/endpoints/accounts/exchange-receipts.test.js +3 -3
  53. package/test/endpoints/accounts/images.test.js +2 -2
  54. package/test/endpoints/accounts/interline.test.js +10 -12
  55. package/test/endpoints/accounts/network.test.js +3 -5
  56. package/test/endpoints/accounts/people-lookups.test.js +13 -13
  57. package/test/endpoints/accounts/print-templates.test.js +3 -3
  58. package/test/endpoints/accounts/printers.test.js +2 -2
  59. package/test/endpoints/accounts/tokens.js +2 -2
  60. package/test/endpoints/accounts/trusted-machines.test.js +2 -2
  61. package/test/endpoints/accounts/websales-config.test.js +47 -50
  62. package/test/endpoints/btrzpay/carpointe.tests.js +2 -2
  63. package/test/endpoints/btrzpay/datalogicPayments.tests.js +2 -2
  64. package/test/endpoints/btrzpay/datalogicReferenceNumber.tests.js +2 -2
  65. package/test/endpoints/btrzpay/oxxoPayments.tests.js +2 -2
  66. package/test/endpoints/btrzpay/oxxoToken.tests.js +2 -2
  67. package/test/endpoints/btrzpay/payment-methods.test.js +3 -3
  68. package/test/endpoints/btrzpay/payments.tests.js +6 -6
  69. package/test/endpoints/btrzpay/reference-numbers.test.js +5 -5
  70. package/test/endpoints/btrzpay/referenced-payments.test.js +2 -2
  71. package/test/endpoints/btrzpay/square.tests.js +2 -2
  72. package/test/endpoints/btrzpay/terminalPayments.tests.js +2 -2
  73. package/test/endpoints/endpoints_helpers.test.js +28 -24
  74. package/test/endpoints/inventory/amenities.test.js +20 -20
  75. package/test/endpoints/inventory/amenity-groups.test.js +15 -15
  76. package/test/endpoints/inventory/bare-routes.test.js +2 -2
  77. package/test/endpoints/inventory/brands.test.js +9 -9
  78. package/test/endpoints/inventory/bundle-fares.test.js +10 -11
  79. package/test/endpoints/inventory/bundles.test.js +9 -9
  80. package/test/endpoints/inventory/companies.test.js +6 -6
  81. package/test/endpoints/inventory/custom-content.test.js +4 -4
  82. package/test/endpoints/inventory/custom-fields.test.js +2 -2
  83. package/test/endpoints/inventory/document-types.test.js +2 -2
  84. package/test/endpoints/inventory/fare-classes.test.js +10 -10
  85. package/test/endpoints/inventory/fare-type-modifiers.test.js +76 -0
  86. package/test/endpoints/inventory/fares.test.js +14 -16
  87. package/test/endpoints/inventory/fees.test.js +14 -15
  88. package/test/endpoints/inventory/filtered-trips-v2.test.js +5 -5
  89. package/test/endpoints/inventory/insurances.test.js +2 -2
  90. package/test/endpoints/inventory/insurancesCost.test.js +2 -2
  91. package/test/endpoints/inventory/journey-prices.test.js +13 -15
  92. package/test/endpoints/inventory/labels.test.js +2 -2
  93. package/test/endpoints/inventory/marital-status.test.js +2 -2
  94. package/test/endpoints/inventory/mit-terminal-settings.test.js +2 -2
  95. package/test/endpoints/inventory/mit-terminals.test.js +7 -7
  96. package/test/endpoints/inventory/operating-companies.test.js +14 -14
  97. package/test/endpoints/inventory/operation-messages.test.js +10 -10
  98. package/test/endpoints/inventory/parcel-zones.test.js +12 -13
  99. package/test/endpoints/inventory/payment-terminals.test.js +7 -7
  100. package/test/endpoints/inventory/prisma-terminals.test.js +2 -2
  101. package/test/endpoints/inventory/products.test.js +25 -20
  102. package/test/endpoints/inventory/promos.test.js +50 -50
  103. package/test/endpoints/inventory/seatclasses.test.js +2 -2
  104. package/test/endpoints/inventory/seatfees.test.js +6 -6
  105. package/test/endpoints/inventory/seatmaps.test.js +7 -7
  106. package/test/endpoints/inventory/segments-information.test.js +2 -2
  107. package/test/endpoints/inventory/service-numbers.test.js +6 -6
  108. package/test/endpoints/inventory/service-types.test.js +7 -7
  109. package/test/endpoints/inventory/shift-settings.test.js +2 -2
  110. package/test/endpoints/inventory/ssrs.test.js +10 -11
  111. package/test/endpoints/inventory/stations-zones.test.js +8 -9
  112. package/test/endpoints/inventory/stations.test.js +2 -2
  113. package/test/endpoints/inventory/travel-routes.test.js +2 -2
  114. package/test/endpoints/inventory/traveller-car-types.test.js +8 -8
  115. package/test/endpoints/inventory/traveller-card-providers-types.test.js +2 -2
  116. package/test/endpoints/inventory/traveller-card-providers.test.js +7 -7
  117. package/test/endpoints/inventory/vehicles.test.js +2 -2
  118. package/test/endpoints/inventory/zone-price-overages.test.js +2 -2
  119. package/test/endpoints/inventory/zone-prices.test.js +2 -2
  120. package/test/endpoints/invoices/dlink.test.js +2 -2
  121. package/test/endpoints/invoices/gti.test.js +2 -2
  122. package/test/endpoints/invoices/infile.test.js +2 -2
  123. package/test/endpoints/invoices/infileJson.test.js +2 -2
  124. package/test/endpoints/invoices/providers.test.js +4 -4
  125. package/test/endpoints/invoices/providersSequences.test.js +2 -2
  126. package/test/endpoints/invoices/system.test.js +2 -2
  127. package/test/endpoints/loyalty/movements.test.js +11 -11
  128. package/test/endpoints/loyalty/programs.test.js +21 -21
  129. package/test/endpoints/notifications/customers.test.js +6 -6
  130. package/test/endpoints/notifications/external-customers.test.js +10 -10
  131. package/test/endpoints/notifications/manifet-notifications.test.js +3 -3
  132. package/test/endpoints/notifications/notify.test.js +23 -5
  133. package/test/endpoints/notifications/orders-rules-validations.test.js +5 -6
  134. package/test/endpoints/notifications/pdfs.test.js +4 -4
  135. package/test/endpoints/notifications/printed-tickets.test.js +17 -18
  136. package/test/endpoints/notifications/short-urls.test.js +9 -9
  137. package/test/endpoints/operations/applied_insurance.test.js +10 -14
  138. package/test/endpoints/operations/calendar_entries.test.js +8 -9
  139. package/test/endpoints/operations/cancellation_settings.test.js +2 -2
  140. package/test/endpoints/operations/loans.test.js +2 -2
  141. package/test/endpoints/operations/manifest.test.js +11 -9
  142. package/test/endpoints/operations/operations.test.js +42 -25
  143. package/test/endpoints/operations/parcel_manifests.test.js +3 -3
  144. package/test/endpoints/operations/parcels.test.js +27 -22
  145. package/test/endpoints/operations/passenger_check_in_info.test.js +2 -2
  146. package/test/endpoints/operations/redemption.test.js +2 -2
  147. package/test/endpoints/operations/sold-items-fulfillment.test.js +2 -2
  148. package/test/endpoints/operations/sold_items.test.js +3 -3
  149. package/test/endpoints/operations/tickets.test.js +4 -4
  150. package/test/endpoints/operations/transaction.test.js +12 -15
  151. package/test/endpoints/operations/transactions.test.js +11 -11
  152. package/test/endpoints/operations/transport_regulations.js +2 -4
  153. package/test/endpoints/operations/trip_change_info.test.js +9 -10
  154. package/test/endpoints/operations/vehicle-assignments.test.js +5 -7
  155. package/test/endpoints/operations/waitlists.test.js +3 -3
  156. package/test/endpoints/ratality/auth.test.js +5 -5
  157. package/test/endpoints/ratality/client.test.js +4 -4
  158. package/test/endpoints/ratality/integrations.test.js +15 -9
  159. package/test/endpoints/reports/custom-reports.test.js +12 -12
  160. package/test/endpoints/reports/email.test.js +3 -3
  161. package/test/endpoints/reports/report-types.test.js +6 -6
  162. package/test/endpoints/reports/trip-manifests.test.js +5 -6
  163. package/test/endpoints/sales/bundles.test.js +9 -10
  164. package/test/endpoints/sales/cart-promo.test.js +15 -16
  165. package/test/endpoints/sales/cart.test.js +7 -7
  166. package/test/endpoints/sales/check-in-info.test.js +3 -3
  167. package/test/endpoints/sales/custom-fields.test.js +10 -13
  168. package/test/endpoints/sales/flexpasses.test.js +2 -2
  169. package/test/endpoints/sales/git-certificates.test.js +10 -13
  170. package/test/endpoints/sales/order.test.js +19 -21
  171. package/test/endpoints/sales/payment-providers.test.js +14 -15
  172. package/test/endpoints/sales/redeemable-items.test.js +14 -15
  173. package/test/endpoints/sales/sync-entry.test.js +9 -11
  174. package/test/endpoints/sales/voucher.test.js +19 -17
  175. package/test/endpoints/seatmaps/access-ticket.test.js +6 -6
  176. package/test/endpoints/seatmaps/seat.test.js +6 -6
  177. package/test/endpoints/uploads/files.test.js +8 -7
  178. package/test/endpoints/uploads/images.test.js +8 -7
  179. package/test/endpoints/webhooks/subscriptions.test.js +27 -27
  180. package/test/endpoints/webhooks/undelivered.test.js +22 -22
  181. package/test/endpoints/webhooks/webhooks.test.js +7 -7
  182. package/test/node-test-globals.js +19 -0
  183. package/test/test-helpers.js +4 -4
  184. package/test-integration/all.test.js +63 -0
  185. package/test-integration/endpoints/accounts/current-shifts.test.js +4 -4
  186. package/test-integration/endpoints/accounts/docs.test.js +6 -6
  187. package/test-integration/endpoints/accounts/lexicons.test.js +42 -37
  188. package/test-integration/endpoints/accounts/shifts.test.js +5 -8
  189. package/test-integration/endpoints/accounts/users.test.js +4 -4
  190. package/test-integration/endpoints/btrzpay/customerCards.test.js +24 -48
  191. package/test-integration/endpoints/btrzpay/customers.test.js +20 -34
  192. package/test-integration/endpoints/btrzpay/payment-methods.test.js +34 -34
  193. package/test-integration/endpoints/btrzpay/payments.test.js +21 -21
  194. package/test-integration/endpoints/btrzpay/reference-numbers.test.js +15 -15
  195. package/test-integration/endpoints/btrzpay/referenced-payments.test.js +5 -5
  196. package/test-integration/endpoints/client.test.js +6 -10
  197. package/test-integration/endpoints/inventory/amenities.test.js +34 -34
  198. package/test-integration/endpoints/inventory/amenity-groups.test.js +30 -31
  199. package/test-integration/endpoints/inventory/bundle-fares.test.js +10 -12
  200. package/test-integration/endpoints/inventory/companies.test.js +7 -8
  201. package/test-integration/endpoints/inventory/countries.test.js +10 -12
  202. package/test-integration/endpoints/inventory/custom-fields.test.js +2 -2
  203. package/test-integration/endpoints/inventory/docs.test.js +5 -7
  204. package/test-integration/endpoints/inventory/fare-classes.test.js +12 -13
  205. package/test-integration/endpoints/inventory/fares.test.js +7 -9
  206. package/test-integration/endpoints/inventory/fees.test.js +8 -10
  207. package/test-integration/endpoints/inventory/filtered-trips.test.js +15 -12
  208. package/test-integration/endpoints/inventory/gift-certificate-definitions.test.js +5 -5
  209. package/test-integration/endpoints/inventory/insurances.test.js +36 -34
  210. package/test-integration/endpoints/inventory/items.js +10 -12
  211. package/test-integration/endpoints/inventory/journey-prices.test.js +11 -11
  212. package/test-integration/endpoints/inventory/parcel-zones.test.js +15 -18
  213. package/test-integration/endpoints/inventory/products.test.js +12 -14
  214. package/test-integration/endpoints/inventory/promos.test.js +46 -42
  215. package/test-integration/endpoints/inventory/routes.test.js +13 -15
  216. package/test-integration/endpoints/inventory/schedule-groups.test.js +23 -23
  217. package/test-integration/endpoints/inventory/ssrs.test.js +16 -11
  218. package/test-integration/endpoints/inventory/stations-zones.test.js +5 -6
  219. package/test-integration/endpoints/inventory/stations.test.js +17 -20
  220. package/test-integration/endpoints/inventory/trips.test.js +30 -16
  221. package/test-integration/endpoints/notifications/printed-tickets.test.js +2 -2
  222. package/test-integration/endpoints/operations/applied_insurance.test.js +9 -11
  223. package/test-integration/endpoints/operations/manifest.test.js +32 -34
  224. package/test-integration/endpoints/operations/parcel.test.js +36 -38
  225. package/test-integration/endpoints/operations/redemption.test.js +9 -12
  226. package/test-integration/endpoints/operations/segments.js +8 -10
  227. package/test-integration/endpoints/operations/tickets.test.js +11 -11
  228. package/test-integration/endpoints/operations/transaction.test.js +1 -1
  229. package/test-integration/endpoints/operations/transactions.test.js +2 -2
  230. package/test-integration/endpoints/operations/trip_change_info.test.js +11 -13
  231. package/test-integration/endpoints/reports/custom-reports.test.js +21 -21
  232. package/test-integration/endpoints/reports/report-types.test.js +22 -22
  233. package/test-integration/endpoints/sales/bundles.test.js +5 -5
  234. package/test-integration/endpoints/sales/cart-promo.test.js +17 -32
  235. package/test-integration/endpoints/sales/cart.test.js +45 -51
  236. package/test-integration/endpoints/sales/check-in-info.test.js +2 -2
  237. package/test-integration/endpoints/sales/custom-fields.test.js +8 -10
  238. package/test-integration/endpoints/sales/flexpasses.test.js +2 -2
  239. package/test-integration/endpoints/sales/gift-certificates.test.js +14 -18
  240. package/test-integration/endpoints/sales/order.test.js +42 -50
  241. package/test-integration/endpoints/sales/payment-providers.test.js +7 -9
  242. package/test-integration/endpoints/sales/redeemable-items.test.js +17 -19
  243. package/test-integration/endpoints/sales/voucher.test.js +12 -14
  244. package/test-integration/endpoints/seatmaps/access-ticket.test.js +7 -9
  245. package/test-integration/endpoints/seatmaps/seat.test.js +7 -9
  246. package/test-integration/endpoints/uploads/files.test.js +14 -14
  247. package/test-integration/endpoints/uploads/images.test.js +3 -5
  248. package/test-integration/ports.js +4 -4
  249. package/test-integration/test-integration-helpers.js +13 -9
package/lib/client.js CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
4
4
 
5
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
-
7
5
  var axios = require("axios");
8
6
  var productionOptions = require("./productionDefaults.js");
9
7
 
@@ -89,6 +87,7 @@ function createInventory(_ref) {
89
87
  documentTypes: require("./endpoints/inventory/document-types.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
90
88
  externalPasses: require("./endpoints/inventory/external-passes.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
91
89
  externalWallets: require("./endpoints/inventory/external-wallets.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
90
+ fareTypeModifiers: require("./endpoints/inventory/fare-type-modifiers.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
92
91
  fallbackCodes: require("./endpoints/inventory/fallback-codes.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
93
92
  fareClasses: require("./endpoints/inventory/fare-classes.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
94
93
  fares: require("./endpoints/inventory/fares.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
@@ -542,8 +541,6 @@ function createSeatmaps(_ref12) {
542
541
  * @returns {Object} Object with btrzpay endpoint namespaces and __test.client
543
542
  */
544
543
  function createBtrzPay(_ref13) {
545
- var _ref14;
546
-
547
544
  var baseURL = _ref13.baseURL,
548
545
  headers = _ref13.headers,
549
546
  timeout = _ref13.timeout,
@@ -552,13 +549,29 @@ function createBtrzPay(_ref13) {
552
549
  agents = _ref13.agents;
553
550
 
554
551
  var client = clientFactory({ baseURL: baseURL, headers: headers, timeout: timeout, overrideFn: overrideFn, agents: agents });
555
- return _ref14 = {
552
+ return {
556
553
  adyen: require("./endpoints/btrzpay/adyen.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
557
554
  cybersource3ds: require("./endpoints/btrzpay/cybersource3ds.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
558
- docs: require("./endpoints/btrzpay/docs.js")({ client: client })
559
- }, _defineProperty(_ref14, "adyen", require("./endpoints/btrzpay/adyen.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "cardpointeTerminals", require("./endpoints/btrzpay/cardpointe.js").cardpointeTerminalsFactory({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "paymentMethods", require("./endpoints/btrzpay/payment-methods.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "referenceNumbers", require("./endpoints/btrzpay/reference-numbers.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "payments", require("./endpoints/btrzpay/payments.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "referencedPayments", require("./endpoints/btrzpay/referenced-payments.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "customers", require("./endpoints/btrzpay/customers.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "customerCards", require("./endpoints/btrzpay/customerCards.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "squareTerminals", require("./endpoints/btrzpay/square.js").squareTerminalsFactory({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "squareWebhooks", require("./endpoints/btrzpay/square.js").squareWebhooksFactory({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "oxxo", require("./endpoints/btrzpay/oxxo.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "datalogic", require("./endpoints/btrzpay/datalogic.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "prismaTerminals", require("./endpoints/btrzpay/prismaTerminals.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "terminalPayments", require("./endpoints/btrzpay/terminalPayments.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "stripeTerminals", require("./endpoints/btrzpay/stripe-terminals.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "stripe3ds", require("./endpoints/btrzpay/stripe3ds.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider })), _defineProperty(_ref14, "__test", {
560
- client: client
561
- }), _ref14;
555
+ docs: require("./endpoints/btrzpay/docs.js")({ client: client }),
556
+ cardpointeTerminals: require("./endpoints/btrzpay/cardpointe.js").cardpointeTerminalsFactory({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
557
+ paymentMethods: require("./endpoints/btrzpay/payment-methods.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
558
+ referenceNumbers: require("./endpoints/btrzpay/reference-numbers.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
559
+ payments: require("./endpoints/btrzpay/payments.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
560
+ referencedPayments: require("./endpoints/btrzpay/referenced-payments.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
561
+ customers: require("./endpoints/btrzpay/customers.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
562
+ customerCards: require("./endpoints/btrzpay/customerCards.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
563
+ squareTerminals: require("./endpoints/btrzpay/square.js").squareTerminalsFactory({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
564
+ squareWebhooks: require("./endpoints/btrzpay/square.js").squareWebhooksFactory({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
565
+ oxxo: require("./endpoints/btrzpay/oxxo.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
566
+ datalogic: require("./endpoints/btrzpay/datalogic.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
567
+ prismaTerminals: require("./endpoints/btrzpay/prismaTerminals.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
568
+ terminalPayments: require("./endpoints/btrzpay/terminalPayments.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
569
+ stripeTerminals: require("./endpoints/btrzpay/stripe-terminals.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
570
+ stripe3ds: require("./endpoints/btrzpay/stripe3ds.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
571
+ __test: {
572
+ client: client
573
+ }
574
+ };
562
575
  }
563
576
 
564
577
  /**
@@ -566,13 +579,13 @@ function createBtrzPay(_ref13) {
566
579
  * @param {CreateModuleOptions} opts - Client options
567
580
  * @returns {Object} Object with invoices endpoint namespaces and __test.client
568
581
  */
569
- function createInvoices(_ref15) {
570
- var baseURL = _ref15.baseURL,
571
- headers = _ref15.headers,
572
- timeout = _ref15.timeout,
573
- overrideFn = _ref15.overrideFn,
574
- internalAuthTokenProvider = _ref15.internalAuthTokenProvider,
575
- agents = _ref15.agents;
582
+ function createInvoices(_ref14) {
583
+ var baseURL = _ref14.baseURL,
584
+ headers = _ref14.headers,
585
+ timeout = _ref14.timeout,
586
+ overrideFn = _ref14.overrideFn,
587
+ internalAuthTokenProvider = _ref14.internalAuthTokenProvider,
588
+ agents = _ref14.agents;
576
589
 
577
590
  var client = clientFactory({ baseURL: baseURL, headers: headers, timeout: timeout, overrideFn: overrideFn, agents: agents });
578
591
 
@@ -600,13 +613,13 @@ function createInvoices(_ref15) {
600
613
  * @param {CreateModuleOptions} opts - Client options
601
614
  * @returns {Object} Object with gps endpoint namespaces and __test.client
602
615
  */
603
- function createGPS(_ref16) {
604
- var baseURL = _ref16.baseURL,
605
- headers = _ref16.headers,
606
- timeout = _ref16.timeout,
607
- overrideFn = _ref16.overrideFn,
608
- internalAuthTokenProvider = _ref16.internalAuthTokenProvider,
609
- agents = _ref16.agents;
616
+ function createGPS(_ref15) {
617
+ var baseURL = _ref15.baseURL,
618
+ headers = _ref15.headers,
619
+ timeout = _ref15.timeout,
620
+ overrideFn = _ref15.overrideFn,
621
+ internalAuthTokenProvider = _ref15.internalAuthTokenProvider,
622
+ agents = _ref15.agents;
610
623
 
611
624
  var client = clientFactory({ baseURL: baseURL, headers: headers, timeout: timeout, overrideFn: overrideFn, agents: agents });
612
625
 
@@ -623,12 +636,12 @@ function createGPS(_ref16) {
623
636
  * @param {Omit<CreateModuleOptions, "internalAuthTokenProvider">} opts - Client options (no internalAuthTokenProvider)
624
637
  * @returns {Object} Object with ratality endpoint namespaces and __test.client
625
638
  */
626
- function createRatality(_ref17) {
627
- var baseURL = _ref17.baseURL,
628
- headers = _ref17.headers,
629
- timeout = _ref17.timeout,
630
- overrideFn = _ref17.overrideFn,
631
- agents = _ref17.agents;
639
+ function createRatality(_ref16) {
640
+ var baseURL = _ref16.baseURL,
641
+ headers = _ref16.headers,
642
+ timeout = _ref16.timeout,
643
+ overrideFn = _ref16.overrideFn,
644
+ agents = _ref16.agents;
632
645
 
633
646
  var client = clientFactory({ baseURL: baseURL, headers: headers, timeout: timeout, overrideFn: overrideFn, agents: agents });
634
647
  var version = "v2";
@@ -657,15 +670,15 @@ function createRatality(_ref17) {
657
670
  * @param {{httpAgent: import("http").Agent, httpsAgent: import("https").Agent}} options.agents - An object containg one or both http agents
658
671
  */
659
672
  function createApiClient(options) {
660
- var _ref18 = options || productionOptions,
661
- baseURL = _ref18.baseURL,
662
- _ref18$baseURLOverrid = _ref18.baseURLOverride,
663
- baseURLOverride = _ref18$baseURLOverrid === undefined ? {} : _ref18$baseURLOverrid,
664
- headers = _ref18.headers,
665
- _ref18$timeout = _ref18.timeout,
666
- timeout = _ref18$timeout === undefined ? 0 : _ref18$timeout,
667
- internalAuthTokenProvider = _ref18.internalAuthTokenProvider,
668
- agents = _ref18.agents;
673
+ var _ref17 = options || productionOptions,
674
+ baseURL = _ref17.baseURL,
675
+ _ref17$baseURLOverrid = _ref17.baseURLOverride,
676
+ baseURLOverride = _ref17$baseURLOverrid === undefined ? {} : _ref17$baseURLOverrid,
677
+ headers = _ref17.headers,
678
+ _ref17$timeout = _ref17.timeout,
679
+ timeout = _ref17$timeout === undefined ? 0 : _ref17$timeout,
680
+ internalAuthTokenProvider = _ref17.internalAuthTokenProvider,
681
+ agents = _ref17.agents;
669
682
 
670
683
  return {
671
684
  constants: require("./constants.js"),
@@ -9,7 +9,7 @@ var _require = require("../endpoints_helpers.js"),
9
9
  * @param {Object} deps
10
10
  * @param {import("axios").AxiosInstance} deps.client
11
11
  * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
12
- * @returns {{ putCreditLimit: function }}
12
+ * @returns {{ create: function, putCreditLimit: function }}
13
13
  */
14
14
 
15
15
 
@@ -17,6 +17,32 @@ function agenciesFactory(_ref) {
17
17
  var client = _ref.client,
18
18
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
19
19
 
20
+ /**
21
+ * POST /agencies - create an agency (seller account) and link it to the provider network.
22
+ * Requires X-API-KEY and Authorization (JWT).
23
+ * @param {Object} opts
24
+ * @param {string} opts.token - API key
25
+ * @param {string} opts.jwtToken - JWT
26
+ * @param {Object} opts.agency - agencyData payload ({ seller, network })
27
+ * @param {Object} [opts.headers] - Optional headers
28
+ * @returns {Promise<import("axios").AxiosResponse>}
29
+ */
30
+ function create(_ref2) {
31
+ var token = _ref2.token,
32
+ jwtToken = _ref2.jwtToken,
33
+ agency = _ref2.agency,
34
+ headers = _ref2.headers;
35
+
36
+ return client({
37
+ url: "/agencies",
38
+ method: "post",
39
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
40
+ data: {
41
+ agency: agency
42
+ }
43
+ });
44
+ }
45
+
20
46
  /**
21
47
  * PUT /agencies/:agencyId/credit-limit - update credit limit for an agency (seller) in the provider's network.
22
48
  * Requires BETTEREZ_APP audience. Request body can be { limitAmount, unlimited } or { creditLimit: { limitAmount, unlimited } }.
@@ -29,12 +55,12 @@ function agenciesFactory(_ref) {
29
55
  * @param {Object} [opts.headers] - Optional headers
30
56
  * @returns {Promise<import("axios").AxiosResponse<{ creditLimit: { _id: string, sellerId: string, providerId: string, unlimited: boolean, overrideLimit: number, currentLimit: number } }>>}
31
57
  */
32
- function putCreditLimit(_ref2) {
33
- var token = _ref2.token,
34
- jwtToken = _ref2.jwtToken,
35
- agencyId = _ref2.agencyId,
36
- data = _ref2.data,
37
- headers = _ref2.headers;
58
+ function putCreditLimit(_ref3) {
59
+ var token = _ref3.token,
60
+ jwtToken = _ref3.jwtToken,
61
+ agencyId = _ref3.agencyId,
62
+ data = _ref3.data,
63
+ headers = _ref3.headers;
38
64
 
39
65
  return client({
40
66
  url: "/agencies/" + agencyId + "/credit-limit",
@@ -45,6 +71,7 @@ function agenciesFactory(_ref) {
45
71
  }
46
72
 
47
73
  return {
74
+ create: create,
48
75
  putCreditLimit: putCreditLimit
49
76
  };
50
77
  }
@@ -38,11 +38,11 @@ function journeyPricesSettingsFactory(_ref) {
38
38
 
39
39
  /**
40
40
  * PUT /journey-prices-settings – Update journey prices settings. Body: JourneyPricesSettings at root.
41
- * Required: recordProtectionRules. Optional: pricingParameters, allowEachTripSegmentToBePricedIndividually.
41
+ * Required: recordProtectionRules. Optional: pricingParameters, allowEachTripSegmentToBePricedIndividually, displayExpiredSchedulesInUI.
42
42
  * @param {Object} opts
43
43
  * @param {string} [opts.token] - API key
44
44
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
45
- * @param {Object} opts.journeyPricesSettings - { recordProtectionRules, pricingParameters?, allowEachTripSegmentToBePricedIndividually? }
45
+ * @param {Object} opts.journeyPricesSettings - { recordProtectionRules, pricingParameters?, allowEachTripSegmentToBePricedIndividually?, displayExpiredSchedulesInUI? }
46
46
  * @param {Object} [opts.headers] - Optional headers
47
47
  * @returns {Promise<import("axios").AxiosResponse<{ journeyPricesSettings: object }>>}
48
48
  */
@@ -23,7 +23,7 @@ function marketPricingSettingsFactory(_ref) {
23
23
  * @param {string} [opts.token] - API key
24
24
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
25
25
  * @param {Object} [opts.headers] - Optional headers
26
- * @returns {Promise<import("axios").AxiosResponse<{ marketPricingSettings: { useOnlySpecificFareTable: boolean } }>>}
26
+ * @returns {Promise<import("axios").AxiosResponse<{ marketPricingSettings: { useOnlySpecificFareTable: boolean, displayExpiredSchedulesInUI: boolean } }>>}
27
27
  */
28
28
  function get(_ref2) {
29
29
  var token = _ref2.token,
@@ -37,11 +37,11 @@ function marketPricingSettingsFactory(_ref) {
37
37
  }
38
38
 
39
39
  /**
40
- * PUT /market-pricing-settings – Update market pricing settings. Body: MarketPricingSettings at root (useOnlySpecificFareTable required).
40
+ * PUT /market-pricing-settings – Update market pricing settings. Body: MarketPricingSettings at root (useOnlySpecificFareTable and displayExpiredSchedulesInUI required).
41
41
  * @param {Object} opts
42
42
  * @param {string} [opts.token] - API key
43
43
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
44
- * @param {Object} opts.marketPricingSettings - { useOnlySpecificFareTable: boolean }
44
+ * @param {Object} opts.marketPricingSettings - { useOnlySpecificFareTable: boolean, displayExpiredSchedulesInUI: boolean }
45
45
  * @param {Object} [opts.headers] - Optional headers
46
46
  * @returns {Promise<import("axios").AxiosResponse<{ marketPricingSettings: object }>>}
47
47
  */
@@ -37,11 +37,15 @@ function multiproductSalesSettingsFactory(_ref) {
37
37
  }
38
38
 
39
39
  /**
40
- * PUT /multiproduct-sales-settings – Create or update multi-product sales settings (upsert). Body: MultiProductSettingsPayload (productsMapping, stationsMapping, faresMapping, fareClassesMapping). Emits networks.created or networks.updated.
40
+ * PUT /multiproduct-sales-settings – Create or update multi-product sales settings
41
+ * (upsert). Body: MultiProductSettingsPayload (productsMapping, stationsMapping,
42
+ * faresMapping, fareClassesMapping). Emits networks.created or networks.updated.
41
43
  * @param {Object} opts
42
44
  * @param {string} [opts.token] - API key
43
45
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
44
- * @param {Object} opts.data - multiProductSettings payload (productsMapping, stationsMapping, faresMapping, fareClassesMapping; each key ObjectId, each value array of ObjectIds)
46
+ * @param {Object} opts.data - multiProductSettings payload. Includes
47
+ * productsMapping, stationsMapping, faresMapping, and fareClassesMapping; each
48
+ * key is an ObjectId and each value is an array of ObjectIds.
45
49
  * @param {Object} [opts.headers] - Optional headers
46
50
  * @returns {Promise<import("axios").AxiosResponse<{ multiProductSettings: object }>>}
47
51
  */
@@ -40,7 +40,9 @@ function operationSettingsFactory(_ref) {
40
40
  }
41
41
 
42
42
  /**
43
- * PUT /operation-settings – Update operation settings. Body: { operationSettings } (OperationSettingsPutData). Emits operationsettings.updated.
43
+ * PUT /operation-settings – Update operation settings. Body:
44
+ * { operationSettings } (OperationSettingsPutData). Emits
45
+ * operationsettings.updated.
44
46
  * @param {Object} opts
45
47
  * @param {string} [opts.token] - API key
46
48
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -23,14 +23,18 @@ function referencedPaymentsFactory(_ref) {
23
23
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
24
24
 
25
25
  /**
26
- * GET /referenced-payments/:transactionId/:referenceNumber/status - get referenced payment status. Requires backoffice auth. Response body: { paymentResult: { status, result } | null }.
26
+ * GET /referenced-payments/:transactionId/:referenceNumber/status - get
27
+ * referenced payment status. Requires backoffice auth. Response body:
28
+ * { paymentResult: { status, result } | null }.
27
29
  * @param {Object} opts
28
30
  * @param {string} [opts.token] - API key
29
31
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
30
32
  * @param {string} opts.transactionId - Transaction ID
31
33
  * @param {string} opts.referenceNumber - Reference number of the payment
32
34
  * @param {Object} [opts.headers] - Optional headers
33
- * @returns {Promise<import("axios").AxiosResponse<{ paymentResult: { status: "error"|"pending"|"success"|"review", result: object } | null }>>}
35
+ * @returns {Promise<import("axios").AxiosResponse<{
36
+ * paymentResult: { status: "error"|"pending"|"success"|"review", result: object } | null
37
+ * }>>}
34
38
  */
35
39
  function getStatus(_ref2) {
36
40
  var token = _ref2.token,
@@ -17,7 +17,9 @@ function squareWebhooksFactory(_ref) {
17
17
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
18
18
 
19
19
  /**
20
- * POST /square-webhooks/:providerId - send Square webhook payload to the Payments API. API verifies x-square-signature when present. Body must include type and data (Square webhook format).
20
+ * POST /square-webhooks/:providerId - send Square webhook payload to the
21
+ * Payments API. API verifies x-square-signature when present. Body must
22
+ * include type and data (Square webhook format).
21
23
  * @param {Object} opts
22
24
  * @param {string} [opts.token] - API key
23
25
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -58,12 +60,19 @@ function squareTerminalsFactory(_ref3) {
58
60
  internalAuthTokenProvider = _ref3.internalAuthTokenProvider;
59
61
 
60
62
  /**
61
- * GET /square-terminals - list Square terminals for the account. Requires JWT (BETTEREZ_APP or MOBILE_SCANNER). Response body: { terminals } with terminal objects (id, name, code, deviceId, productType, locationId, status, pairBy, createdAt, statusChangedAt).
63
+ * GET /square-terminals - list Square terminals for the account. Requires
64
+ * JWT (BETTEREZ_APP or MOBILE_SCANNER). Response body: { terminals } with
65
+ * terminal objects (id, name, code, deviceId, productType, locationId,
66
+ * status, pairBy, createdAt, statusChangedAt).
62
67
  * @param {Object} opts
63
68
  * @param {string} [opts.token] - API key
64
69
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
65
70
  * @param {Object} [opts.headers] - Optional headers
66
- * @returns {Promise<import("axios").AxiosResponse<{ terminals: Array<{ id: string, name: string, code: string, deviceId?: string, productType?: string, locationId: string, status?: string, pairBy?: string, createdAt?: string, statusChangedAt?: string }> }>>}
71
+ * @returns {Promise<import("axios").AxiosResponse<{ terminals: Array<{
72
+ * id: string, name: string, code: string, deviceId?: string, productType?: string,
73
+ * locationId: string, status?: string, pairBy?: string,
74
+ * createdAt?: string, statusChangedAt?: string
75
+ * }> }>>}
67
76
  */
68
77
  function get(_ref4) {
69
78
  var token = _ref4.token,
@@ -6,7 +6,8 @@ var _require = require("./../endpoints_helpers.js"),
6
6
  /**
7
7
  * Query params for GET /stripe-terminals (btrz-api-payments). See get-handler getSpec().
8
8
  * @typedef {Object} StripeTerminalsListQuery
9
- * @property {string} [providerId] - Account provider (operator) ID; used by agencies/sellers; when omitted, authenticated account ID is used
9
+ * @property {string} [providerId] - Account provider (operator) ID used by
10
+ * agencies/sellers; when omitted, authenticated account ID is used
10
11
  */
11
12
 
12
13
  /**
@@ -37,7 +38,9 @@ function stripeTerminalsFactory(_ref) {
37
38
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
38
39
  * @param {StripeTerminalsListQuery} [opts.query] - Optional providerId
39
40
  * @param {Object} [opts.headers] - Optional headers
40
- * @returns {Promise<import("axios").AxiosResponse<GetStripeTerminalsResponse>>} Rejects with 400 (STRIPE_SECRET_KEY_INVALID), 401, 404 (PAYMENT_METHOD_NOT_FOUND), 500.
41
+ * @returns {Promise<import("axios").AxiosResponse<GetStripeTerminalsResponse>>}
42
+ * Rejects with 400 (STRIPE_SECRET_KEY_INVALID), 401,
43
+ * 404 (PAYMENT_METHOD_NOT_FOUND), 500.
41
44
  */
42
45
  function all(_ref2) {
43
46
  var token = _ref2.token,
@@ -62,7 +65,10 @@ function stripeTerminalsFactory(_ref) {
62
65
  * @param {string} opts.id - Terminal ID (Stripe reader id, e.g. tmr_xxx)
63
66
  * @param {{ ccNumber: string }} opts.stripePayment - Payment to simulate; ccNumber required
64
67
  * @param {Object} [opts.headers] - Optional headers
65
- * @returns {Promise<import("axios").AxiosResponse<{ stripeTerminalPayment: Object }>>} Rejects with 400 (WRONG_DATA), 401, 404 (PAYMENT_METHOD_NOT_FOUND, TRANSACTION_NOT_FOUND), 409 (errorCode/errorMessage), 500.
68
+ * @returns {Promise<import("axios").AxiosResponse<{ stripeTerminalPayment: Object }>>}
69
+ * Rejects with 400 (WRONG_DATA), 401,
70
+ * 404 (PAYMENT_METHOD_NOT_FOUND, TRANSACTION_NOT_FOUND),
71
+ * 409 (errorCode/errorMessage), 500.
66
72
  */
67
73
  function simulate(_ref3) {
68
74
  var token = _ref3.token,
@@ -38,10 +38,14 @@ function terminalPaymentsFactory(_ref) {
38
38
  * @param {string} [opts.token] - API key
39
39
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
40
40
  * @param {string} opts.id - Terminal payment ID (UUID)
41
- * @param {{ result?: Object, paymentRequest: Object, orderId: string }} opts.terminalPayment - Terminal payment data (result, paymentRequest, orderId)
41
+ * @param {{ result?: Object, paymentRequest: Object, orderId: string }} opts.terminalPayment
42
+ * - Terminal payment data (result, paymentRequest, orderId)
42
43
  * @param {TerminalPaymentsMitPutQuery} [opts.query] - Optional providerId
43
44
  * @param {Object} [opts.headers] - Optional headers
44
- * @returns {Promise<import("axios").AxiosResponse<{ terminalPayment: Object }>>} Rejects with 400 (WRONG_DATA, INVALID_TERMINALPAYMENT_ID, INVALID_RESULT_OBJECT, MIT_*), 401, 404 (TERMINALPAYMENT_NOT_FOUND, MIT_PAYMENT_NOT_FOUND), 409 (CANT_UPDATE_ORDER), 500.
45
+ * @returns {Promise<import("axios").AxiosResponse<{ terminalPayment: Object }>>}
46
+ * Rejects with 400 (WRONG_DATA, INVALID_TERMINALPAYMENT_ID,
47
+ * INVALID_RESULT_OBJECT, MIT_*), 401, 404 (TERMINALPAYMENT_NOT_FOUND,
48
+ * MIT_PAYMENT_NOT_FOUND), 409 (CANT_UPDATE_ORDER), 500.
45
49
  */
46
50
  update: function update(_ref2) {
47
51
  var token = _ref2.token,
@@ -69,7 +73,10 @@ function terminalPaymentsFactory(_ref) {
69
73
  * @param {string} opts.id - Terminal payment ID (UUID)
70
74
  * @param {TerminalPaymentsMitGetQuery} opts.query - branchId, companyId, date (required); optional providerId
71
75
  * @param {Object} [opts.headers] - Optional headers
72
- * @returns {Promise<import("axios").AxiosResponse<{ terminalPayment: Object }>>} Rejects with 400 (WRONG_DATA, INVALID_TERMINALPAYMENT_ID, INVALID_DATE, MIT_*), 401, 404 (TERMINALPAYMENT_NOT_FOUND, MIT_PAYMENT_NOT_FOUND), 500.
76
+ * @returns {Promise<import("axios").AxiosResponse<{ terminalPayment: Object }>>}
77
+ * Rejects with 400 (WRONG_DATA, INVALID_TERMINALPAYMENT_ID,
78
+ * INVALID_DATE, MIT_*), 401, 404 (TERMINALPAYMENT_NOT_FOUND,
79
+ * MIT_PAYMENT_NOT_FOUND), 500.
73
80
  */
74
81
  get: function get(_ref3) {
75
82
  var token = _ref3.token,
@@ -95,7 +102,10 @@ function terminalPaymentsFactory(_ref) {
95
102
  * @param {Object} [opts.headers] - Optional headers
96
103
  * @param {string} [opts.token] - API key (optional when no userId in payload)
97
104
  * @param {string} [opts.jwtToken] - JWT or internal auth (required when userId is in payload)
98
- * @returns {Promise<import("axios").AxiosResponse<{ status: string }>>} Rejects with 400 (INVALID_WEBHOOK_PAYLOAD), 401 (when userId present but not authenticated), 404 (PAYMENT_NOT_FOUND_FOR_WEBHOOK_EVENT, PAYMENT_METHOD_NOT_FOUND, USER_NOT_FOUND), 409 (CANT_UPDATE_ORDER), 500.
105
+ * @returns {Promise<import("axios").AxiosResponse<{ status: string }>>}
106
+ * Rejects with 400 (INVALID_WEBHOOK_PAYLOAD), 401 (when userId present but
107
+ * not authenticated), 404 (PAYMENT_NOT_FOUND_FOR_WEBHOOK_EVENT,
108
+ * PAYMENT_METHOD_NOT_FOUND, USER_NOT_FOUND), 409 (CANT_UPDATE_ORDER), 500.
99
109
  */
100
110
  getnet: function getnet(_ref4) {
101
111
  var data = _ref4.data,
@@ -62,7 +62,8 @@ function documentTypesFactory(_ref) {
62
62
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
63
63
  * @param {string} opts.id - Document type id (24 hex characters)
64
64
  * @param {DocumentTypeGetByIdQuery} [opts.query] - Optional query params (merged with providerId when opts.providerId is set)
65
- * @param {string} [opts.providerId] - Provider id (ObjectId); merged into query for provider context (same as peopleLookups.getById / dynamicForms.get)
65
+ * @param {string} [opts.providerId] - Provider id (ObjectId); merged into
66
+ * query for provider context (same as peopleLookups.getById / dynamicForms.get)
66
67
  * @param {Object} [opts.headers] - Optional headers
67
68
  * @returns {Promise<import("axios").AxiosResponse<{ documenttype: Object }>>}
68
69
  * @throws When response is 4xx/5xx (400, 401, 404 DOCUMENTTYPE_NOT_FOUND, 500)
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+
3
+ var _require = require("../endpoints_helpers.js"),
4
+ authorizationHeaders = _require.authorizationHeaders;
5
+
6
+ /**
7
+ * Query params for GET /fare-type-modifiers (btrz-api-inventory). See get-handler getSpec().
8
+ * @typedef {Object} FareTypeModifiersListQuery
9
+ */
10
+
11
+ /**
12
+ * Factory for fare-type-modifiers API (btrz-api-inventory).
13
+ * @param {Object} deps
14
+ * @param {import("axios").AxiosInstance} deps.client
15
+ * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
16
+ * @returns {{ all: function, get: function, create: function, update: function, remove: function }}
17
+ */
18
+
19
+
20
+ function fareTypeModifierFactory(_ref) {
21
+ var client = _ref.client,
22
+ internalAuthTokenProvider = _ref.internalAuthTokenProvider;
23
+
24
+ /**
25
+ * GET /fare-type-modifiers - list fare-type modifiers (paginated).
26
+ * @param {Object} opts
27
+ * @param {string} [opts.token] - API key
28
+ * @param {FareTypeModifiersListQuery} [opts.query] - Query params
29
+ * @param {Object} [opts.headers] - Optional headers
30
+ * @returns {Promise<import("axios").AxiosResponse<{ fareTypeModifiers: Object[], next?: string, previous?: string, count: number }>>}
31
+ * @throws
32
+ * - 401 Unauthorized
33
+ * - 500 Internal server error
34
+ */
35
+ function all(_ref2) {
36
+ var token = _ref2.token,
37
+ _ref2$query = _ref2.query,
38
+ query = _ref2$query === undefined ? {} : _ref2$query,
39
+ headers = _ref2.headers;
40
+
41
+ return client.get("/fare-type-modifiers", {
42
+ params: query,
43
+ headers: authorizationHeaders({ token: token, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
44
+ });
45
+ }
46
+
47
+ /**
48
+ * GET /fare-type-modifiers/:fareTypeModifierId - get fare-type modifier by id. API does not accept query params.
49
+ * @param {Object} opts
50
+ * @param {string} opts.fareTypeModifierId - Fare-type modifier id (24 hex characters)
51
+ * @param {string} [opts.token] - API key
52
+ * @param {Object} [opts.headers] - Optional headers
53
+ * @returns {Promise<import("axios").AxiosResponse<{ fareTypeModifier: Object }>>}
54
+ * @throws
55
+ * - 400 WRONG_DATA, WRONG_FARE_TYPE_MODIFIER_ID
56
+ * - 401 Unauthorized
57
+ * - 404 FARE_TYPE_MODIFIER_NOT_FOUND
58
+ * - 500 Internal server error
59
+ */
60
+ function get(_ref3) {
61
+ var fareTypeModifierId = _ref3.fareTypeModifierId,
62
+ token = _ref3.token,
63
+ headers = _ref3.headers;
64
+
65
+ return client.get("/fare-type-modifiers/" + fareTypeModifierId, {
66
+ headers: authorizationHeaders({ token: token, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
67
+ });
68
+ }
69
+
70
+ /**
71
+ * POST /fare-type-modifiers - create fare-type modifier. API does not accept query params.
72
+ * @param {Object} opts
73
+ * @param {string} [opts.jwtToken] - JWT or internal auth symbol
74
+ * @param {string} [opts.token] - API key
75
+ * @param {Object} opts.fareTypeModifier - Fare-type modifier payload (FareTypeModifierPostData)
76
+ * @param {Object} [opts.headers] - Optional headers
77
+ * @returns {Promise<import("axios").AxiosResponse<{ fareTypeModifier: Object }>>}
78
+ * @throws
79
+ * - 400 WRONG_DATA, *_NOT_FOUND, INVALID_*, DUPLICATE_*
80
+ * - 401 Unauthorized
81
+ * - 500 Internal server error
82
+ */
83
+ function create(_ref4) {
84
+ var jwtToken = _ref4.jwtToken,
85
+ token = _ref4.token,
86
+ fareTypeModifier = _ref4.fareTypeModifier,
87
+ headers = _ref4.headers;
88
+
89
+ return client({
90
+ url: "/fare-type-modifiers",
91
+ method: "post",
92
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
93
+ data: {
94
+ fareTypeModifier: fareTypeModifier
95
+ }
96
+ });
97
+ }
98
+
99
+ /**
100
+ * DELETE /fare-type-modifiers/:fareTypeModifierId - remove fare-type modifier. API does not accept query params.
101
+ * @param {Object} opts
102
+ * @param {string} [opts.jwtToken] - JWT or internal auth symbol
103
+ * @param {string} opts.fareTypeModifierId - Fare-type modifier id (24 hex characters)
104
+ * @param {string} [opts.token] - API key
105
+ * @param {Object} [opts.headers] - Optional headers
106
+ * @returns {Promise<import("axios").AxiosResponse<{ fareTypeModifierId: string }>>}
107
+ * @throws
108
+ * - 400 WRONG_FARE_TYPE_MODIFIER_ID
109
+ * - 401 Unauthorized
110
+ * - 404 FARE_TYPE_MODIFIER_NOT_FOUND
111
+ * - 500 Internal server error
112
+ */
113
+ function remove(_ref5) {
114
+ var jwtToken = _ref5.jwtToken,
115
+ fareTypeModifierId = _ref5.fareTypeModifierId,
116
+ token = _ref5.token,
117
+ headers = _ref5.headers;
118
+
119
+ return client({
120
+ url: "/fare-type-modifiers/" + fareTypeModifierId,
121
+ method: "delete",
122
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
123
+ });
124
+ }
125
+
126
+ /**
127
+ * PUT /fare-type-modifiers/:fareTypeModifierId - update fare-type modifier. API does not accept query params.
128
+ * @param {Object} opts
129
+ * @param {string} [opts.jwtToken] - JWT or internal auth symbol
130
+ * @param {string} [opts.token] - API key
131
+ * @param {string} opts.fareTypeModifierId - Fare-type modifier id (24 hex characters)
132
+ * @param {Object} opts.fareTypeModifier - Fare-type modifier payload (FareTypeModifierPutData)
133
+ * @param {Object} [opts.headers] - Optional headers
134
+ * @returns {Promise<import("axios").AxiosResponse<{ fareTypeModifier: Object }>>}
135
+ * @throws
136
+ * - 400 WRONG_DATA, *_NOT_FOUND, INVALID_*, DUPLICATE_*
137
+ * - 401 Unauthorized
138
+ * - 404 FARE_TYPE_MODIFIER_NOT_FOUND
139
+ * - 500 Internal server error
140
+ */
141
+ function update(_ref6) {
142
+ var jwtToken = _ref6.jwtToken,
143
+ token = _ref6.token,
144
+ fareTypeModifierId = _ref6.fareTypeModifierId,
145
+ fareTypeModifier = _ref6.fareTypeModifier,
146
+ headers = _ref6.headers;
147
+
148
+ return client({
149
+ url: "/fare-type-modifiers/" + fareTypeModifierId,
150
+ method: "put",
151
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
152
+ data: {
153
+ fareTypeModifier: fareTypeModifier
154
+ }
155
+ });
156
+ }
157
+
158
+ return {
159
+ all: all,
160
+ get: get,
161
+ create: create,
162
+ update: update,
163
+ remove: remove
164
+ };
165
+ }
166
+
167
+ module.exports = fareTypeModifierFactory;
@@ -18,6 +18,7 @@ var _require = require("./../endpoints_helpers.js"),
18
18
  * @property {string} [domain] - Filter by domain
19
19
  * @property {string} [parentProductId] - Child products of this parent
20
20
  * @property {string} [dynamicFormId] - Filter by dynamic form
21
+ * @property {string} [type] - Filter by product type
21
22
  */
22
23
 
23
24
  /**