btrz-api-client 8.30.0 → 8.32.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 (389) hide show
  1. package/.cursor/rules/jsdoc-endpoints.mdc +1 -1
  2. package/lib/client-standalone-min.js +3 -3
  3. package/lib/client.js +3 -0
  4. package/lib/endpoints/accounts/agencies.js +52 -0
  5. package/lib/endpoints/accounts/application-settings.js +23 -17
  6. package/lib/endpoints/accounts/applications.js +8 -7
  7. package/lib/endpoints/accounts/current-shifts.js +6 -1
  8. package/lib/endpoints/accounts/customers.js +31 -21
  9. package/lib/endpoints/accounts/domains.js +16 -12
  10. package/lib/endpoints/accounts/dynamic-forms.js +17 -5
  11. package/lib/endpoints/accounts/email-settings.js +22 -20
  12. package/lib/endpoints/accounts/email-templates.js +18 -6
  13. package/lib/endpoints/accounts/exchange-rates.js +13 -8
  14. package/lib/endpoints/accounts/exchange-receipts.js +10 -6
  15. package/lib/endpoints/accounts/external-customers.js +50 -0
  16. package/lib/endpoints/accounts/goal-settings.js +8 -7
  17. package/lib/endpoints/accounts/images.js +14 -15
  18. package/lib/endpoints/accounts/interline.js +35 -30
  19. package/lib/endpoints/accounts/journey-prices-settings.js +8 -6
  20. package/lib/endpoints/accounts/lexicons.js +48 -19
  21. package/lib/endpoints/accounts/market-pricing-settings.js +7 -6
  22. package/lib/endpoints/accounts/multiproduct-sales-settings.js +7 -6
  23. package/lib/endpoints/accounts/network.js +29 -17
  24. package/lib/endpoints/accounts/operation-settings.js +8 -7
  25. package/lib/endpoints/accounts/people-lookups.js +39 -21
  26. package/lib/endpoints/accounts/point-to-point-settings.js +6 -6
  27. package/lib/endpoints/accounts/print-settings.js +9 -7
  28. package/lib/endpoints/accounts/print-templates.js +71 -24
  29. package/lib/endpoints/accounts/printers.js +10 -5
  30. package/lib/endpoints/accounts/rms-settings.js +19 -11
  31. package/lib/endpoints/accounts/s3buckets.js +3 -3
  32. package/lib/endpoints/accounts/salesforce-settings.js +8 -7
  33. package/lib/endpoints/accounts/shift-settings.js +7 -7
  34. package/lib/endpoints/accounts/shifts.js +54 -15
  35. package/lib/endpoints/accounts/sms-templates.js +56 -18
  36. package/lib/endpoints/accounts/sub-print-templates.js +5 -3
  37. package/lib/endpoints/accounts/ticket-movement-settings.js +8 -5
  38. package/lib/endpoints/accounts/tokens.js +10 -3
  39. package/lib/endpoints/accounts/transport-regulation-settings.js +2 -2
  40. package/lib/endpoints/accounts/travellers.js +36 -17
  41. package/lib/endpoints/accounts/trusted-machines.js +19 -8
  42. package/lib/endpoints/accounts/twilio-settings.js +8 -6
  43. package/lib/endpoints/accounts/users.js +116 -70
  44. package/lib/endpoints/accounts/verified-emails.js +130 -0
  45. package/lib/endpoints/accounts/websales-config.js +15 -6
  46. package/lib/endpoints/btrzpay/cardpointe.js +5 -5
  47. package/lib/endpoints/btrzpay/customerCards.js +4 -4
  48. package/lib/endpoints/btrzpay/customers.js +3 -3
  49. package/lib/endpoints/btrzpay/datalogic.js +8 -9
  50. package/lib/endpoints/btrzpay/oxxo.js +5 -13
  51. package/lib/endpoints/btrzpay/payment-methods.js +25 -11
  52. package/lib/endpoints/btrzpay/payments.js +2 -2
  53. package/lib/endpoints/btrzpay/prismaTerminals.js +14 -21
  54. package/lib/endpoints/btrzpay/reference-numbers.js +1 -1
  55. package/lib/endpoints/btrzpay/referenced-payments.js +11 -1
  56. package/lib/endpoints/btrzpay/square.js +2 -2
  57. package/lib/endpoints/btrzpay/stripe-terminals.js +5 -5
  58. package/lib/endpoints/btrzpay/terminalPayments.js +15 -5
  59. package/lib/endpoints/coltrane/merged-fare-tables.js +1 -1
  60. package/lib/endpoints/coltrane/paths.js +9 -6
  61. package/lib/endpoints/gps/scanner-app-location.js +3 -2
  62. package/lib/endpoints/inventory/amenities.js +10 -7
  63. package/lib/endpoints/inventory/amenity-groups.js +11 -7
  64. package/lib/endpoints/inventory/banks.js +5 -11
  65. package/lib/endpoints/inventory/bare-routes.js +12 -4
  66. package/lib/endpoints/inventory/brands.js +10 -6
  67. package/lib/endpoints/inventory/bundle-fares.js +4 -2
  68. package/lib/endpoints/inventory/bundles.js +5 -2
  69. package/lib/endpoints/inventory/change-requests.js +23 -9
  70. package/lib/endpoints/inventory/companies.js +5 -2
  71. package/lib/endpoints/inventory/control-classes.js +34 -4
  72. package/lib/endpoints/inventory/countries.js +8 -3
  73. package/lib/endpoints/inventory/custom-content.js +8 -6
  74. package/lib/endpoints/inventory/custom-fields.js +9 -7
  75. package/lib/endpoints/inventory/document-types.js +8 -11
  76. package/lib/endpoints/inventory/external-passes.js +13 -4
  77. package/lib/endpoints/inventory/external-wallets.js +5 -6
  78. package/lib/endpoints/inventory/fallback-codes.js +11 -4
  79. package/lib/endpoints/inventory/fare-classes.js +6 -4
  80. package/lib/endpoints/inventory/fares.js +13 -7
  81. package/lib/endpoints/inventory/fees.js +8 -4
  82. package/lib/endpoints/inventory/filtered-trips-v2.js +1 -1
  83. package/lib/endpoints/inventory/filtered-trips.js +14 -2
  84. package/lib/endpoints/inventory/financing-costs.js +15 -8
  85. package/lib/endpoints/inventory/garages.js +7 -5
  86. package/lib/endpoints/inventory/getnet-terminals.js +12 -4
  87. package/lib/endpoints/inventory/gift-certificate-definitions.js +10 -11
  88. package/lib/endpoints/inventory/insurances.js +10 -7
  89. package/lib/endpoints/inventory/insurancesCost.js +8 -5
  90. package/lib/endpoints/inventory/items.js +22 -4
  91. package/lib/endpoints/inventory/journey-prices.js +36 -7
  92. package/lib/endpoints/inventory/labels.js +6 -5
  93. package/lib/endpoints/inventory/marital-status.js +8 -11
  94. package/lib/endpoints/inventory/marketplace-modifiers.js +16 -7
  95. package/lib/endpoints/inventory/mit-terminal-settings.js +5 -11
  96. package/lib/endpoints/inventory/mit-terminals.js +5 -11
  97. package/lib/endpoints/inventory/operating-companies.js +13 -10
  98. package/lib/endpoints/inventory/operation-messages.js +16 -7
  99. package/lib/endpoints/inventory/operation-reasons.js +11 -9
  100. package/lib/endpoints/inventory/parcel-zones.js +6 -5
  101. package/lib/endpoints/inventory/pay-on-accounts.js +9 -3
  102. package/lib/endpoints/inventory/payment-terminals.js +5 -11
  103. package/lib/endpoints/inventory/prisma-terminals.js +10 -6
  104. package/lib/endpoints/inventory/products.js +31 -7
  105. package/lib/endpoints/inventory/promos.js +29 -11
  106. package/lib/endpoints/inventory/routes.js +50 -31
  107. package/lib/endpoints/inventory/schedule-groups.js +7 -7
  108. package/lib/endpoints/inventory/schedules.js +24 -11
  109. package/lib/endpoints/inventory/seatclasses.js +5 -15
  110. package/lib/endpoints/inventory/seatfees.js +9 -6
  111. package/lib/endpoints/inventory/seatmaps.js +37 -10
  112. package/lib/endpoints/inventory/segments-information-tables.js +5 -4
  113. package/lib/endpoints/inventory/segments-information.js +4 -2
  114. package/lib/endpoints/inventory/service-numbers.js +9 -6
  115. package/lib/endpoints/inventory/service-types.js +5 -11
  116. package/lib/endpoints/inventory/ssrs.js +11 -3
  117. package/lib/endpoints/inventory/station-classes.js +12 -6
  118. package/lib/endpoints/inventory/station-groups.js +4 -3
  119. package/lib/endpoints/inventory/stations-provinces.js +1 -7
  120. package/lib/endpoints/inventory/stations-zones.js +3 -2
  121. package/lib/endpoints/inventory/stations.js +23 -5
  122. package/lib/endpoints/inventory/taxes.js +5 -6
  123. package/lib/endpoints/inventory/travel-routes.js +6 -4
  124. package/lib/endpoints/inventory/traveller-card-providers-types.js +1 -7
  125. package/lib/endpoints/inventory/traveller-card-providers.js +3 -9
  126. package/lib/endpoints/inventory/traveller-card-types.js +7 -6
  127. package/lib/endpoints/inventory/trips.js +2 -8
  128. package/lib/endpoints/inventory/vehicle-types.js +0 -1
  129. package/lib/endpoints/inventory/vehicles.js +17 -2
  130. package/lib/endpoints/inventory/zone-price-overages.js +4 -10
  131. package/lib/endpoints/inventory/zone-prices.js +12 -7
  132. package/lib/endpoints/invoices/dlink.js +3 -2
  133. package/lib/endpoints/invoices/emails.js +1 -7
  134. package/lib/endpoints/invoices/gti.js +2 -2
  135. package/lib/endpoints/invoices/infile.js +2 -2
  136. package/lib/endpoints/invoices/infileJson.js +2 -2
  137. package/lib/endpoints/invoices/invoices.js +14 -10
  138. package/lib/endpoints/invoices/pdfs.js +4 -3
  139. package/lib/endpoints/invoices/providers.js +12 -11
  140. package/lib/endpoints/invoices/providersSequences.js +5 -15
  141. package/lib/endpoints/invoices/system.js +2 -2
  142. package/lib/endpoints/invoices/tax-ids.js +1 -1
  143. package/lib/endpoints/notifications/customers.js +25 -5
  144. package/lib/endpoints/notifications/email.js +8 -3
  145. package/lib/endpoints/notifications/manifest-notifications.js +4 -3
  146. package/lib/endpoints/notifications/notify.js +20 -5
  147. package/lib/endpoints/notifications/orders-rules-validations.js +2 -8
  148. package/lib/endpoints/notifications/pdf-data.js +2 -1
  149. package/lib/endpoints/notifications/pdfs.js +2 -1
  150. package/lib/endpoints/notifications/printed-tickets.js +17 -6
  151. package/lib/endpoints/notifications/twilio.js +1 -7
  152. package/lib/endpoints/operations/accounting_items.js +9 -4
  153. package/lib/endpoints/operations/applied_insurance.js +8 -3
  154. package/lib/endpoints/operations/calendar_entries.js +7 -3
  155. package/lib/endpoints/operations/external-bookings.js +2 -8
  156. package/lib/endpoints/operations/flexpasses.js +1 -1
  157. package/lib/endpoints/operations/loans.js +10 -4
  158. package/lib/endpoints/operations/manifest.js +83 -33
  159. package/lib/endpoints/operations/manifest_leg_for_tickets.js +1 -2
  160. package/lib/endpoints/operations/movements.js +1 -7
  161. package/lib/endpoints/operations/outlook-trips.js +13 -3
  162. package/lib/endpoints/operations/parcels.js +20 -6
  163. package/lib/endpoints/operations/parcels_manifests.js +6 -16
  164. package/lib/endpoints/operations/passenger_check_in_info.js +3 -10
  165. package/lib/endpoints/operations/redemption.js +4 -4
  166. package/lib/endpoints/operations/rms.js +33 -6
  167. package/lib/endpoints/operations/scheduled_notifications.js +4 -11
  168. package/lib/endpoints/operations/segments.js +2 -2
  169. package/lib/endpoints/operations/sold-items-fulfillment.js +4 -3
  170. package/lib/endpoints/operations/sold-items.js +13 -4
  171. package/lib/endpoints/operations/tickets.js +4 -4
  172. package/lib/endpoints/operations/transaction.js +1 -1
  173. package/lib/endpoints/operations/transactions.js +6 -14
  174. package/lib/endpoints/operations/transport_regulations.js +1 -1
  175. package/lib/endpoints/operations/trip_change_info.js +13 -1
  176. package/lib/endpoints/operations/vehicle_assignments.js +10 -5
  177. package/lib/endpoints/operations/vouchers.js +2 -9
  178. package/lib/endpoints/operations/waitlists.js +2 -2
  179. package/lib/endpoints/sales/bundles.js +4 -2
  180. package/lib/endpoints/sales/cancellations.js +2 -2
  181. package/lib/endpoints/sales/cart-promo.js +2 -9
  182. package/lib/endpoints/sales/cart.js +30 -17
  183. package/lib/endpoints/sales/check-in-info.js +1 -7
  184. package/lib/endpoints/sales/custom-fields.js +4 -3
  185. package/lib/endpoints/sales/flexpasses.js +1 -7
  186. package/lib/endpoints/sales/gift-certificates.js +4 -2
  187. package/lib/endpoints/sales/order.js +6 -4
  188. package/lib/endpoints/sales/parcel-quotes.js +1 -1
  189. package/lib/endpoints/sales/payment-providers.js +6 -3
  190. package/lib/endpoints/sales/redeemable-items.js +16 -5
  191. package/lib/endpoints/sales/sync-entry.js +1 -1
  192. package/lib/endpoints/sales/voucher.js +1 -1
  193. package/package.json +1 -1
  194. package/src/client.js +3 -0
  195. package/src/endpoints/accounts/agencies.js +40 -0
  196. package/src/endpoints/accounts/application-settings.js +23 -17
  197. package/src/endpoints/accounts/applications.js +8 -7
  198. package/src/endpoints/accounts/current-shifts.js +6 -1
  199. package/src/endpoints/accounts/customers.js +31 -21
  200. package/src/endpoints/accounts/domains.js +16 -12
  201. package/src/endpoints/accounts/dynamic-forms.js +17 -5
  202. package/src/endpoints/accounts/email-settings.js +22 -20
  203. package/src/endpoints/accounts/email-templates.js +18 -6
  204. package/src/endpoints/accounts/exchange-rates.js +13 -8
  205. package/src/endpoints/accounts/exchange-receipts.js +10 -6
  206. package/src/endpoints/accounts/external-customers.js +37 -0
  207. package/src/endpoints/accounts/goal-settings.js +8 -7
  208. package/src/endpoints/accounts/images.js +14 -15
  209. package/src/endpoints/accounts/interline.js +35 -31
  210. package/src/endpoints/accounts/journey-prices-settings.js +8 -6
  211. package/src/endpoints/accounts/lexicons.js +48 -19
  212. package/src/endpoints/accounts/market-pricing-settings.js +7 -6
  213. package/src/endpoints/accounts/multiproduct-sales-settings.js +7 -6
  214. package/src/endpoints/accounts/network.js +29 -18
  215. package/src/endpoints/accounts/operation-settings.js +8 -7
  216. package/src/endpoints/accounts/people-lookups.js +39 -21
  217. package/src/endpoints/accounts/point-to-point-settings.js +6 -6
  218. package/src/endpoints/accounts/print-settings.js +9 -8
  219. package/src/endpoints/accounts/print-templates.js +65 -22
  220. package/src/endpoints/accounts/printers.js +10 -6
  221. package/src/endpoints/accounts/rms-settings.js +19 -11
  222. package/src/endpoints/accounts/s3buckets.js +3 -3
  223. package/src/endpoints/accounts/salesforce-settings.js +8 -7
  224. package/src/endpoints/accounts/shift-settings.js +7 -7
  225. package/src/endpoints/accounts/shifts.js +54 -15
  226. package/src/endpoints/accounts/sms-templates.js +56 -18
  227. package/src/endpoints/accounts/sub-print-templates.js +5 -3
  228. package/src/endpoints/accounts/ticket-movement-settings.js +8 -5
  229. package/src/endpoints/accounts/tokens.js +10 -3
  230. package/src/endpoints/accounts/transport-regulation-settings.js +2 -2
  231. package/src/endpoints/accounts/travellers.js +36 -17
  232. package/src/endpoints/accounts/trusted-machines.js +19 -8
  233. package/src/endpoints/accounts/twilio-settings.js +8 -6
  234. package/src/endpoints/accounts/users.js +53 -12
  235. package/src/endpoints/accounts/verified-emails.js +100 -0
  236. package/src/endpoints/accounts/websales-config.js +15 -6
  237. package/src/endpoints/btrzpay/cardpointe.js +5 -5
  238. package/src/endpoints/btrzpay/customerCards.js +4 -4
  239. package/src/endpoints/btrzpay/customers.js +3 -3
  240. package/src/endpoints/btrzpay/datalogic.js +8 -9
  241. package/src/endpoints/btrzpay/oxxo.js +5 -13
  242. package/src/endpoints/btrzpay/payment-methods.js +25 -11
  243. package/src/endpoints/btrzpay/payments.js +2 -2
  244. package/src/endpoints/btrzpay/prismaTerminals.js +14 -21
  245. package/src/endpoints/btrzpay/reference-numbers.js +1 -1
  246. package/src/endpoints/btrzpay/referenced-payments.js +10 -2
  247. package/src/endpoints/btrzpay/square.js +2 -2
  248. package/src/endpoints/btrzpay/stripe-terminals.js +5 -5
  249. package/src/endpoints/btrzpay/terminalPayments.js +15 -5
  250. package/src/endpoints/coltrane/merged-fare-tables.js +1 -1
  251. package/src/endpoints/coltrane/paths.js +9 -6
  252. package/src/endpoints/gps/scanner-app-location.js +3 -2
  253. package/src/endpoints/inventory/amenities.js +10 -7
  254. package/src/endpoints/inventory/amenity-groups.js +11 -7
  255. package/src/endpoints/inventory/banks.js +5 -11
  256. package/src/endpoints/inventory/bare-routes.js +12 -4
  257. package/src/endpoints/inventory/brands.js +10 -6
  258. package/src/endpoints/inventory/bundle-fares.js +4 -2
  259. package/src/endpoints/inventory/bundles.js +5 -2
  260. package/src/endpoints/inventory/change-requests.js +23 -9
  261. package/src/endpoints/inventory/companies.js +5 -2
  262. package/src/endpoints/inventory/control-classes.js +34 -4
  263. package/src/endpoints/inventory/countries.js +8 -3
  264. package/src/endpoints/inventory/custom-content.js +8 -6
  265. package/src/endpoints/inventory/custom-fields.js +9 -7
  266. package/src/endpoints/inventory/document-types.js +8 -11
  267. package/src/endpoints/inventory/external-passes.js +13 -4
  268. package/src/endpoints/inventory/external-wallets.js +5 -6
  269. package/src/endpoints/inventory/fallback-codes.js +11 -4
  270. package/src/endpoints/inventory/fare-classes.js +6 -4
  271. package/src/endpoints/inventory/fares.js +13 -7
  272. package/src/endpoints/inventory/fees.js +8 -4
  273. package/src/endpoints/inventory/filtered-trips-v2.js +1 -1
  274. package/src/endpoints/inventory/filtered-trips.js +14 -2
  275. package/src/endpoints/inventory/financing-costs.js +15 -8
  276. package/src/endpoints/inventory/garages.js +7 -5
  277. package/src/endpoints/inventory/getnet-terminals.js +12 -4
  278. package/src/endpoints/inventory/gift-certificate-definitions.js +10 -11
  279. package/src/endpoints/inventory/insurances.js +10 -7
  280. package/src/endpoints/inventory/insurancesCost.js +8 -5
  281. package/src/endpoints/inventory/items.js +22 -4
  282. package/src/endpoints/inventory/journey-prices.js +36 -7
  283. package/src/endpoints/inventory/labels.js +6 -5
  284. package/src/endpoints/inventory/marital-status.js +8 -11
  285. package/src/endpoints/inventory/marketplace-modifiers.js +16 -7
  286. package/src/endpoints/inventory/mit-terminal-settings.js +5 -11
  287. package/src/endpoints/inventory/mit-terminals.js +5 -11
  288. package/src/endpoints/inventory/operating-companies.js +13 -10
  289. package/src/endpoints/inventory/operation-messages.js +16 -7
  290. package/src/endpoints/inventory/operation-reasons.js +11 -9
  291. package/src/endpoints/inventory/parcel-zones.js +6 -5
  292. package/src/endpoints/inventory/pay-on-accounts.js +9 -3
  293. package/src/endpoints/inventory/payment-terminals.js +5 -11
  294. package/src/endpoints/inventory/prisma-terminals.js +10 -6
  295. package/src/endpoints/inventory/products.js +31 -7
  296. package/src/endpoints/inventory/promos.js +29 -11
  297. package/src/endpoints/inventory/routes.js +50 -31
  298. package/src/endpoints/inventory/schedule-groups.js +7 -7
  299. package/src/endpoints/inventory/schedules.js +24 -11
  300. package/src/endpoints/inventory/seatclasses.js +5 -15
  301. package/src/endpoints/inventory/seatfees.js +9 -6
  302. package/src/endpoints/inventory/seatmaps.js +37 -10
  303. package/src/endpoints/inventory/segments-information-tables.js +5 -4
  304. package/src/endpoints/inventory/segments-information.js +4 -2
  305. package/src/endpoints/inventory/service-numbers.js +9 -6
  306. package/src/endpoints/inventory/service-types.js +5 -11
  307. package/src/endpoints/inventory/ssrs.js +11 -3
  308. package/src/endpoints/inventory/station-classes.js +12 -6
  309. package/src/endpoints/inventory/station-groups.js +4 -3
  310. package/src/endpoints/inventory/stations-provinces.js +1 -7
  311. package/src/endpoints/inventory/stations-zones.js +3 -2
  312. package/src/endpoints/inventory/stations.js +23 -5
  313. package/src/endpoints/inventory/taxes.js +5 -6
  314. package/src/endpoints/inventory/travel-routes.js +6 -4
  315. package/src/endpoints/inventory/traveller-card-providers-types.js +1 -7
  316. package/src/endpoints/inventory/traveller-card-providers.js +3 -9
  317. package/src/endpoints/inventory/traveller-card-types.js +7 -6
  318. package/src/endpoints/inventory/trips.js +2 -8
  319. package/src/endpoints/inventory/vehicle-types.js +0 -1
  320. package/src/endpoints/inventory/vehicles.js +17 -2
  321. package/src/endpoints/inventory/zone-price-overages.js +4 -10
  322. package/src/endpoints/inventory/zone-prices.js +12 -7
  323. package/src/endpoints/invoices/dlink.js +3 -2
  324. package/src/endpoints/invoices/emails.js +1 -7
  325. package/src/endpoints/invoices/gti.js +2 -2
  326. package/src/endpoints/invoices/infile.js +2 -2
  327. package/src/endpoints/invoices/infileJson.js +2 -2
  328. package/src/endpoints/invoices/invoices.js +14 -10
  329. package/src/endpoints/invoices/pdfs.js +4 -3
  330. package/src/endpoints/invoices/providers.js +12 -11
  331. package/src/endpoints/invoices/providersSequences.js +5 -15
  332. package/src/endpoints/invoices/system.js +2 -2
  333. package/src/endpoints/invoices/tax-ids.js +1 -1
  334. package/src/endpoints/notifications/customers.js +25 -5
  335. package/src/endpoints/notifications/email.js +8 -3
  336. package/src/endpoints/notifications/manifest-notifications.js +4 -3
  337. package/src/endpoints/notifications/notify.js +20 -5
  338. package/src/endpoints/notifications/orders-rules-validations.js +2 -8
  339. package/src/endpoints/notifications/pdf-data.js +2 -1
  340. package/src/endpoints/notifications/pdfs.js +2 -1
  341. package/src/endpoints/notifications/printed-tickets.js +17 -7
  342. package/src/endpoints/notifications/twilio.js +1 -7
  343. package/src/endpoints/operations/accounting_items.js +9 -4
  344. package/src/endpoints/operations/applied_insurance.js +9 -2
  345. package/src/endpoints/operations/calendar_entries.js +7 -3
  346. package/src/endpoints/operations/external-bookings.js +2 -8
  347. package/src/endpoints/operations/flexpasses.js +1 -1
  348. package/src/endpoints/operations/loans.js +10 -4
  349. package/src/endpoints/operations/manifest.js +83 -33
  350. package/src/endpoints/operations/manifest_leg_for_tickets.js +1 -2
  351. package/src/endpoints/operations/movements.js +1 -7
  352. package/src/endpoints/operations/outlook-trips.js +13 -3
  353. package/src/endpoints/operations/parcels.js +20 -6
  354. package/src/endpoints/operations/parcels_manifests.js +6 -16
  355. package/src/endpoints/operations/passenger_check_in_info.js +3 -10
  356. package/src/endpoints/operations/redemption.js +4 -4
  357. package/src/endpoints/operations/rms.js +33 -6
  358. package/src/endpoints/operations/scheduled_notifications.js +4 -11
  359. package/src/endpoints/operations/segments.js +2 -2
  360. package/src/endpoints/operations/sold-items-fulfillment.js +4 -3
  361. package/src/endpoints/operations/sold-items.js +13 -4
  362. package/src/endpoints/operations/tickets.js +4 -4
  363. package/src/endpoints/operations/transaction.js +1 -1
  364. package/src/endpoints/operations/transactions.js +6 -14
  365. package/src/endpoints/operations/transport_regulations.js +1 -1
  366. package/src/endpoints/operations/trip_change_info.js +13 -1
  367. package/src/endpoints/operations/vehicle_assignments.js +10 -5
  368. package/src/endpoints/operations/vouchers.js +2 -9
  369. package/src/endpoints/operations/waitlists.js +2 -2
  370. package/src/endpoints/sales/bundles.js +4 -2
  371. package/src/endpoints/sales/cancellations.js +2 -2
  372. package/src/endpoints/sales/cart-promo.js +2 -9
  373. package/src/endpoints/sales/cart.js +30 -17
  374. package/src/endpoints/sales/check-in-info.js +1 -7
  375. package/src/endpoints/sales/custom-fields.js +4 -3
  376. package/src/endpoints/sales/flexpasses.js +1 -7
  377. package/src/endpoints/sales/gift-certificates.js +4 -2
  378. package/src/endpoints/sales/order.js +6 -4
  379. package/src/endpoints/sales/parcel-quotes.js +1 -1
  380. package/src/endpoints/sales/payment-providers.js +6 -3
  381. package/src/endpoints/sales/redeemable-items.js +16 -5
  382. package/src/endpoints/sales/sync-entry.js +1 -1
  383. package/src/endpoints/sales/voucher.js +1 -1
  384. package/test/endpoints/accounts/agencies.test.js +58 -0
  385. package/test/endpoints/accounts/external-customers.test.js +62 -0
  386. package/test/endpoints/accounts/users.js +10 -0
  387. package/test/endpoints/accounts/verified-emails.test.js +35 -0
  388. package/types/endpoints/accounts/users.d.ts +2 -1
  389. package/types/endpoints/accounts/verified-emails.d.ts +19 -0
@@ -1,5 +1,30 @@
1
1
  const {authorizationHeaders} = require("./../endpoints_helpers.js");
2
2
 
3
+ /**
4
+ * Query params for GET /products (btrz-api-inventory). See get-products getSpec().
5
+ * @typedef {Object} ProductsListQuery
6
+ * @property {string} [providerIds] - Provider IDs to get products for
7
+ * @property {string} [channels] - Filter by channels
8
+ * @property {string} [enabled] - 'true', 'false' or 'any' (default 'true')
9
+ * @property {string} [pricingType] - One of point-to-point, distance, journey, etc.
10
+ * @property {string} [hasRoutes] - 'true' or 'false' (deprecated, use family)
11
+ * @property {string} [hasDates] - 'true' or 'false' (deprecated)
12
+ * @property {string} [hasPassengerInfo] - 'true' or 'false' (deprecated)
13
+ * @property {string} [isParcel] - 'true' or 'false' (deprecated)
14
+ * @property {string} [family] - One of bundle, parcel, paid in, paid out, reservation, flexpass, ticket
15
+ * @property {string} [domain] - Filter by domain
16
+ * @property {string} [parentProductId] - Child products of this parent
17
+ * @property {string} [dynamicFormId] - Filter by dynamic form
18
+ */
19
+
20
+ /**
21
+ * Query params for GET /products/:productId (btrz-api-inventory). See get-products-id getSpec().
22
+ * @typedef {Object} ProductGetQuery
23
+ * @property {string} [providerIds] - Provider IDs to get product for
24
+ * @property {string} [channels] - Filter by channels
25
+ * @property {string} [enabled] - 'true', 'false' or 'any'
26
+ */
27
+
3
28
  /**
4
29
  * Factory for products API (btrz-api-inventory).
5
30
  * @param {Object} deps
@@ -13,7 +38,7 @@ function productsFactory({client, internalAuthTokenProvider}) {
13
38
  * @param {Object} opts
14
39
  * @param {string} [opts.token] - API key
15
40
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
16
- * @param {Object} [opts.query] - Query params
41
+ * @param {ProductsListQuery} [opts.query] - Query params
17
42
  * @param {Object} [opts.headers] - Optional headers
18
43
  * @returns {Promise<import("axios").AxiosResponse>}
19
44
  */
@@ -31,7 +56,7 @@ function productsFactory({client, internalAuthTokenProvider}) {
31
56
  * @param {string} [opts.token] - API key
32
57
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
33
58
  * @param {string} opts.productId - Product id
34
- * @param {Object} [opts.query] - Query params
59
+ * @param {ProductGetQuery} [opts.query] - Query params (providerIds, channels, enabled)
35
60
  * @param {Object} [opts.headers] - Optional headers
36
61
  * @returns {Promise<import("axios").AxiosResponse>}
37
62
  */
@@ -44,7 +69,7 @@ function productsFactory({client, internalAuthTokenProvider}) {
44
69
  }
45
70
 
46
71
  /**
47
- * POST /products - create product.
72
+ * POST /products - create product. API does not accept query params.
48
73
  * @param {Object} opts
49
74
  * @param {string} [opts.token] - API key
50
75
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -62,7 +87,7 @@ function productsFactory({client, internalAuthTokenProvider}) {
62
87
  }
63
88
 
64
89
  /**
65
- * PUT /products/:productId - update product.
90
+ * PUT /products/:productId - update product. API does not accept query params.
66
91
  * @param {Object} opts
67
92
  * @param {string} [opts.token] - API key
68
93
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -83,7 +108,7 @@ function productsFactory({client, internalAuthTokenProvider}) {
83
108
  /** @type {{ remove: function }} */
84
109
  const domains = {
85
110
  /**
86
- * DELETE /products/domains/:domain - remove product domain.
111
+ * DELETE /products/domains/:domain - remove product domain. API does not accept query params.
87
112
  * @param {Object} opts
88
113
  * @param {string} [opts.token] - API key
89
114
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -103,11 +128,10 @@ function productsFactory({client, internalAuthTokenProvider}) {
103
128
  /** @type {{ all: function }} */
104
129
  const families = {
105
130
  /**
106
- * GET /products/families - list product families.
131
+ * GET /products/families - list product families. API does not accept query params.
107
132
  * @param {Object} opts
108
133
  * @param {string} [opts.token] - API key
109
134
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
110
- * @param {Object} [opts.query] - Query params
111
135
  * @param {Object} [opts.headers] - Optional headers
112
136
  * @returns {Promise<import("axios").AxiosResponse>}
113
137
  */
@@ -2,8 +2,27 @@
2
2
  const {authorizationHeaders} = require("./../endpoints_helpers.js");
3
3
 
4
4
  /**
5
- * Query params for promos endpoints (btrz-api-inventory). Forwarded to API as-is.
6
- * @typedef {Object} InventoryPromosQuery
5
+ * Query params for GET /promos (btrz-api-inventory). See get-promos getSpec().
6
+ * @typedef {Object} PromosListQuery
7
+ * @property {string} [providerIds] - Provider IDs to get promos for
8
+ * @property {string} [productId] - Product id
9
+ * @property {string} [productIds] - Comma-separated product IDs (mutually exclusive with productId)
10
+ * @property {string} [promoCode] - Promo internal id
11
+ * @property {string} [name] - Promo name
12
+ * @property {string} [campaign] - Campaign the promo belongs to
13
+ * @property {string} [origin] - Departure station name
14
+ * @property {string} [destination] - Destination station name
15
+ * @property {string} [fareIds] - Comma-separated fare IDs
16
+ * @property {string} [tripType] - 'oneway' or 'roundtrip'
17
+ * @property {string} [channels] - Filter by channels (mandatory if promoCode not given)
18
+ * @property {boolean} [autoApply] - Filter only auto-applied promos
19
+ * @property {string} [includeExpired] - Include expired promos (deprecated)
20
+ * @property {string} [searchOutboundTravelDate] - Outbound travel date for validity
21
+ * @property {string} [searchReturnTravelDate] - Return travel date for validity
22
+ * @property {string} [qty] - Number of tickets
23
+ * @property {number} [page] - Page for pagination
24
+ * @property {string} [orderBy] - Field to order by
25
+ * @property {string} [orderDir] - 'asc' (1) or 'desc' (-1)
7
26
  */
8
27
 
9
28
  /**
@@ -19,7 +38,7 @@ function promosFactory({client, internalAuthTokenProvider}) {
19
38
  * @param {Object} opts
20
39
  * @param {string} [opts.token] - API key
21
40
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
22
- * @param {InventoryPromosQuery} [opts.query] - Optional query params (forwarded to API)
41
+ * @param {PromosListQuery} [opts.query] - Query params
23
42
  * @param {Object} [opts.headers] - Optional headers
24
43
  * @returns {Promise<import("axios").AxiosResponse>}
25
44
  */
@@ -31,12 +50,11 @@ function promosFactory({client, internalAuthTokenProvider}) {
31
50
  }
32
51
 
33
52
  /**
34
- * GET /promos/:promoId - get promo by id.
53
+ * GET /promos/:promoId - get promo by id. API does not accept query params.
35
54
  * @param {Object} opts
36
55
  * @param {string} [opts.token] - API key
37
56
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
38
57
  * @param {string} opts.promoId - Promo id
39
- * @param {InventoryPromosQuery} [opts.query] - Optional query params (forwarded to API)
40
58
  * @param {Object} [opts.headers] - Optional headers
41
59
  * @returns {Promise<import("axios").AxiosResponse>}
42
60
  */
@@ -48,7 +66,7 @@ function promosFactory({client, internalAuthTokenProvider}) {
48
66
  }
49
67
 
50
68
  /**
51
- * POST /promos - create promo.
69
+ * POST /promos - create promo. API does not accept query params.
52
70
  * @param {Object} opts
53
71
  * @param {string} [opts.token] - API key
54
72
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -66,7 +84,7 @@ function promosFactory({client, internalAuthTokenProvider}) {
66
84
  }
67
85
 
68
86
  /**
69
- * DELETE /promos/:promoId - remove promo.
87
+ * DELETE /promos/:promoId - remove promo. API does not accept query params.
70
88
  * @param {Object} opts
71
89
  * @param {string} [opts.token] - API key
72
90
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -83,7 +101,7 @@ function promosFactory({client, internalAuthTokenProvider}) {
83
101
  }
84
102
 
85
103
  /**
86
- * PATCH /promos/:promoId - update promo.
104
+ * PATCH /promos/:promoId - update promo. API does not accept query params.
87
105
  * @param {Object} opts
88
106
  * @param {string} [opts.token] - API key
89
107
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -103,7 +121,7 @@ function promosFactory({client, internalAuthTokenProvider}) {
103
121
  }
104
122
 
105
123
  /**
106
- * PATCH /promo/:promoId - patch promo with operations.
124
+ * PATCH /promo/:promoId - patch promo with operations. API does not accept query params.
107
125
  * @param {Object} opts
108
126
  * @param {string} [opts.token] - API key
109
127
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -122,7 +140,7 @@ function promosFactory({client, internalAuthTokenProvider}) {
122
140
  }
123
141
 
124
142
  /**
125
- * POST /promos/:promoId/rules - add promo rule.
143
+ * POST /promos/:promoId/rules - add promo rule. API does not accept query params.
126
144
  * @param {Object} opts
127
145
  * @param {string} [opts.token] - API key
128
146
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -141,7 +159,7 @@ function promosFactory({client, internalAuthTokenProvider}) {
141
159
  }
142
160
 
143
161
  /**
144
- * PUT /promos/:promoId/rules/:ruleId - update promo rule.
162
+ * PUT /promos/:promoId/rules/:ruleId - update promo rule. API does not accept query params.
145
163
  * @param {Object} opts
146
164
  * @param {string} [opts.token] - API key
147
165
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -1,6 +1,27 @@
1
1
  /* eslint-disable max-len */
2
2
  const {authorizationHeaders} = require("./../endpoints_helpers.js");
3
3
 
4
+ /**
5
+ * Query params for GET /routes (btrz-api-inventory). See get-routes getSpec().
6
+ * @typedef {Object} RoutesListQuery
7
+ * @property {string} [disabled] - Get enabled or disabled routes [true, false]
8
+ * @property {string} [productId] - Filter by product id (object id)
9
+ * @property {string} [routeGTFSID] - Filter by route external ID (GTFS)
10
+ * @property {string} [providerId] - Filter by provider
11
+ * @property {string} [name] - Filter by exact name (case sensitive)
12
+ * @property {string} [partialName] - Filter by partial name (case insensitive)
13
+ * @property {number} [page] - Page for pagination
14
+ * @property {boolean} [minimalPayload] - If true, schedules not included in response
15
+ */
16
+
17
+ /**
18
+ * Query params for GET /routes/proration-tables (btrz-api-inventory). See get-proration-tables getSpec().
19
+ * @typedef {Object} RoutesProrationTablesListQuery
20
+ * @property {string} [routeId] - Route id
21
+ * @property {string} [providerId] - Provider id
22
+ * @property {string} [productId] - Product id (journey pricing)
23
+ */
24
+
4
25
  /**
5
26
  * Factory for routes API (btrz-api-inventory).
6
27
  * @param {Object} deps
@@ -10,12 +31,11 @@ const {authorizationHeaders} = require("./../endpoints_helpers.js");
10
31
  */
11
32
  function routesFactory({client, internalAuthTokenProvider}) {
12
33
  /**
13
- * GET /routes/:routeId - get route by id.
34
+ * GET /routes/:routeId - get route by id. API does not accept query params.
14
35
  * @param {Object} opts
15
36
  * @param {string} [opts.token] - API key
16
37
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
17
38
  * @param {string} opts.routeId - Route id
18
- * @param {Object} [opts.query] - Query params
19
39
  * @param {Object} [opts.headers] - Optional headers
20
40
  * @returns {Promise<import("axios").AxiosResponse>}
21
41
  */
@@ -28,15 +48,15 @@ function routesFactory({client, internalAuthTokenProvider}) {
28
48
  }
29
49
 
30
50
  /**
31
- * GET /routes/prices - get route prices.
51
+ * GET /routes/prices - get route prices. Client merges productId, originId, destinationId, channel into query.
32
52
  * @param {Object} opts
33
53
  * @param {string} [opts.token] - API key
34
54
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
35
- * @param {string} opts.productId - Product id
36
- * @param {string} opts.originId - Origin id
37
- * @param {string} opts.destinationId - Destination id
38
- * @param {string} opts.channel - Channel
39
- * @param {Object} [opts.query] - Query params
55
+ * @param {string} opts.productId - Product id (merged into query)
56
+ * @param {string} opts.originId - Origin id (merged into query)
57
+ * @param {string} opts.destinationId - Destination id (merged into query)
58
+ * @param {string} opts.channel - Channel (merged into query)
59
+ * @param {Object} [opts.query] - Additional query params
40
60
  * @param {Object} [opts.headers] - Optional headers
41
61
  * @returns {Promise<import("axios").AxiosResponse>}
42
62
  */
@@ -55,7 +75,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
55
75
  * @param {Object} opts
56
76
  * @param {string} [opts.token] - API key
57
77
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
58
- * @param {Object} [opts.query] - Query params
78
+ * @param {RoutesListQuery} [opts.query] - Query params
59
79
  * @param {Object} [opts.headers] - Optional headers
60
80
  * @returns {Promise<import("axios").AxiosResponse>}
61
81
  */
@@ -67,7 +87,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
67
87
  }
68
88
 
69
89
  /**
70
- * GET /routes/:routeId/stations - get route stations.
90
+ * GET /routes/:routeId/stations - get route stations. API does not accept query params.
71
91
  * @param {Object} opts
72
92
  * @param {string} [opts.token] - API key
73
93
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -83,7 +103,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
83
103
  }
84
104
 
85
105
  /**
86
- * POST /routes - create route.
106
+ * POST /routes - create route. API does not accept query params.
87
107
  * @param {Object} opts
88
108
  * @param {string} [opts.token] - API key
89
109
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -103,7 +123,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
103
123
  }
104
124
 
105
125
  /**
106
- * PUT /routes/:routeId - update route.
126
+ * PUT /routes/:routeId - update route. API does not accept query params.
107
127
  * @param {Object} opts
108
128
  * @param {string} [opts.token] - API key
109
129
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -124,7 +144,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
124
144
  }
125
145
 
126
146
  /**
127
- * DELETE /routes/:routeId - remove route.
147
+ * DELETE /routes/:routeId - remove route. API does not accept query params.
128
148
  * @param {Object} opts
129
149
  * @param {string} [opts.token] - API key
130
150
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -145,11 +165,10 @@ function routesFactory({client, internalAuthTokenProvider}) {
145
165
  /** @type {{ all: function, create: function, update: function }} */
146
166
  const fareTables = {
147
167
  /**
148
- * GET /routes/fare-tables - list fare tables.
168
+ * GET /routes/fare-tables - list fare tables. API does not accept query params.
149
169
  * @param {Object} opts
150
170
  * @param {string} [opts.token] - API key
151
171
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
152
- * @param {Object} [opts.query] - Query params
153
172
  * @param {Object} [opts.headers] - Optional headers
154
173
  * @returns {Promise<import("axios").AxiosResponse>}
155
174
  */
@@ -165,7 +184,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
165
184
  });
166
185
  },
167
186
  /**
168
- * POST /routes/:routeId/fare-tables - create fare table.
187
+ * POST /routes/:routeId/fare-tables - create fare table. API does not accept query params.
169
188
  * @param {Object} opts
170
189
  * @param {string} [opts.token] - API key
171
190
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -189,7 +208,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
189
208
  });
190
209
  },
191
210
  /**
192
- * PUT /routes/:routeId/fare-tables/:fareTableId - update fare table.
211
+ * PUT /routes/:routeId/fare-tables/:fareTableId - update fare table. API does not accept query params.
193
212
  * @param {Object} opts
194
213
  * @param {string} [opts.token] - API key
195
214
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -217,7 +236,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
217
236
  /** @type {{ create: function }} */
218
237
  const stops = {
219
238
  /**
220
- * POST /routes/:routeId/stops - create stop.
239
+ * POST /routes/:routeId/stops - create stop. API does not accept query params.
221
240
  * @param {Object} opts
222
241
  * @param {string} [opts.token] - API key
223
242
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -241,7 +260,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
241
260
  /** @type {{ get: function, create: function, update: function, remove: function }} */
242
261
  const fareRules = {
243
262
  /**
244
- * GET /routes/:routeId/fare-rules - get fare rules.
263
+ * GET /routes/:routeId/fare-rules - get fare rules. API does not accept query params.
245
264
  * @param {Object} opts
246
265
  * @param {string} [opts.token] - API key
247
266
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -258,7 +277,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
258
277
  });
259
278
  },
260
279
  /**
261
- * POST /routes/:routeId/fare-rules - create fare rule.
280
+ * POST /routes/:routeId/fare-rules - create fare rule. API does not accept query params.
262
281
  * @param {Object} opts
263
282
  * @param {string} [opts.token] - API key
264
283
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -280,7 +299,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
280
299
  });
281
300
  },
282
301
  /**
283
- * PUT /routes/:routeId/fare-rules/:fareRuleId - update fare rule.
302
+ * PUT /routes/:routeId/fare-rules/:fareRuleId - update fare rule. API does not accept query params.
284
303
  * @param {Object} opts
285
304
  * @param {string} [opts.token] - API key
286
305
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -303,7 +322,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
303
322
  });
304
323
  },
305
324
  /**
306
- * DELETE /routes/:routeId/fare-rules/:fareRuleId - remove fare rule.
325
+ * DELETE /routes/:routeId/fare-rules/:fareRuleId - remove fare rule. API does not accept query params.
307
326
  * @param {Object} opts
308
327
  * @param {string} [opts.token] - API key
309
328
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -326,7 +345,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
326
345
  /** @type {{ get: function, create: function, update: function, remove: function }} */
327
346
  const priceBuckets = {
328
347
  /**
329
- * GET /routes/:routeId/price-buckets - get price buckets.
348
+ * GET /routes/:routeId/price-buckets - get price buckets. API does not accept query params.
330
349
  * @param {Object} opts
331
350
  * @param {string} [opts.token] - API key
332
351
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -343,7 +362,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
343
362
  });
344
363
  },
345
364
  /**
346
- * POST /routes/:routeId/price-buckets - create price bucket.
365
+ * POST /routes/:routeId/price-buckets - create price bucket. API does not accept query params.
347
366
  * @param {Object} opts
348
367
  * @param {string} [opts.token] - API key
349
368
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -365,7 +384,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
365
384
  });
366
385
  },
367
386
  /**
368
- * PUT /routes/:routeId/price-buckets/:bucketId - update price bucket.
387
+ * PUT /routes/:routeId/price-buckets/:bucketId - update price bucket. API does not accept query params.
369
388
  * @param {Object} opts
370
389
  * @param {string} [opts.token] - API key
371
390
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -388,7 +407,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
388
407
  });
389
408
  },
390
409
  /**
391
- * DELETE /routes/:routeId/price-buckets/:bucketId - remove price bucket.
410
+ * DELETE /routes/:routeId/price-buckets/:bucketId - remove price bucket. API does not accept query params.
392
411
  * @param {Object} opts
393
412
  * @param {string} [opts.token] - API key
394
413
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -411,7 +430,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
411
430
  /** @type {{ get: function, update: function }} */
412
431
  const crossBorderDistances = {
413
432
  /**
414
- * GET /routes/:routeId/cross-border-distances - get cross border distances.
433
+ * GET /routes/:routeId/cross-border-distances - get cross border distances. API does not accept query params.
415
434
  * @param {Object} opts
416
435
  * @param {string} [opts.token] - API key
417
436
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -428,7 +447,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
428
447
  });
429
448
  },
430
449
  /**
431
- * PUT /routes/:routeId/cross-border-distances - update cross border distances.
450
+ * PUT /routes/:routeId/cross-border-distances - update cross border distances. API does not accept query params.
432
451
  * @param {Object} opts
433
452
  * @param {string} [opts.token] - API key
434
453
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -459,7 +478,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
459
478
  * @param {Object} opts
460
479
  * @param {string} [opts.token] - API key
461
480
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
462
- * @param {Object} [opts.query] - Query params
481
+ * @param {RoutesProrationTablesListQuery} [opts.query] - Query params (routeId, providerId, productId)
463
482
  * @param {Object} [opts.headers] - Optional headers
464
483
  * @returns {Promise<import("axios").AxiosResponse>}
465
484
  */
@@ -478,7 +497,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
478
497
  * @param {string} [opts.token] - API key
479
498
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
480
499
  * @param {string} opts.routeId - Route id
481
- * @param {string} [opts.productId] - Product id (optional query)
500
+ * @param {string} [opts.productId] - Product id (optional query; filters by product)
482
501
  * @param {Object} [opts.headers] - Optional headers
483
502
  * @returns {Promise<import("axios").AxiosResponse>}
484
503
  */
@@ -493,7 +512,7 @@ function routesFactory({client, internalAuthTokenProvider}) {
493
512
  });
494
513
  },
495
514
  /**
496
- * PUT /routes/:routeId/proration-tables - update proration table by route id.
515
+ * PUT /routes/:routeId/proration-tables - update proration table by route id. API does not accept query params.
497
516
  * @param {Object} opts
498
517
  * @param {string} [opts.token] - API key
499
518
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -1,8 +1,9 @@
1
1
  const {authorizationHeaders} = require("./../endpoints_helpers.js");
2
2
 
3
3
  /**
4
- * @typedef {Object} ScheduleGroupsQuery
5
- * @property {string} [providerId] - Provider account ID
4
+ * Query params for GET /schedule-groups (btrz-api-inventory). See get-handler getSpec().
5
+ * @typedef {Object} ScheduleGroupsListQuery
6
+ * @property {number} [page] - Page number to retrieve
6
7
  */
7
8
 
8
9
  /**
@@ -18,7 +19,7 @@ function scheduleGroupsFactory({client, internalAuthTokenProvider}) {
18
19
  * @param {Object} opts
19
20
  * @param {string} [opts.token] - API key
20
21
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
21
- * @param {ScheduleGroupsQuery} [opts.query] - Query params
22
+ * @param {ScheduleGroupsListQuery} [opts.query] - Query params
22
23
  * @param {Object} [opts.headers] - Optional headers
23
24
  * @returns {Promise<import("axios").AxiosResponse>}
24
25
  */
@@ -30,12 +31,11 @@ function scheduleGroupsFactory({client, internalAuthTokenProvider}) {
30
31
  }
31
32
 
32
33
  /**
33
- * GET /schedule-groups/:scheduleGroupId - get schedule group by id.
34
+ * GET /schedule-groups/:scheduleGroupId - get schedule group by id. API does not accept query params.
34
35
  * @param {Object} opts
35
36
  * @param {string} [opts.token] - API key
36
37
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
37
38
  * @param {string} opts.scheduleGroupId - Schedule group id
38
- * @param {ScheduleGroupsQuery} [opts.query] - Query params
39
39
  * @param {Object} [opts.headers] - Optional headers
40
40
  * @returns {Promise<import("axios").AxiosResponse>}
41
41
  */
@@ -47,7 +47,7 @@ function scheduleGroupsFactory({client, internalAuthTokenProvider}) {
47
47
  }
48
48
 
49
49
  /**
50
- * POST /schedule-groups - create schedule group.
50
+ * POST /schedule-groups - create schedule group. API does not accept query params.
51
51
  * @param {Object} opts
52
52
  * @param {string} [opts.token] - API key
53
53
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -65,7 +65,7 @@ function scheduleGroupsFactory({client, internalAuthTokenProvider}) {
65
65
  }
66
66
 
67
67
  /**
68
- * PUT /schedule-groups/:scheduleGroupId - update schedule group.
68
+ * PUT /schedule-groups/:scheduleGroupId - update schedule group. API does not accept query params.
69
69
  * @param {Object} opts
70
70
  * @param {string} [opts.token] - API key
71
71
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -1,6 +1,20 @@
1
1
  /* eslint-disable max-len */
2
2
  const {authorizationHeaders} = require("./../endpoints_helpers.js");
3
3
 
4
+ /**
5
+ * Query params for GET /routes/schedules (btrz-api-inventory). See get-schedules getSpec().
6
+ * @typedef {Object} SchedulesListQuery
7
+ * @property {string} [displayName] - Exact schedule name (case sensitive)
8
+ * @property {string} [stationId] - Schedules that contain this station on legs
9
+ * @property {string} [routeId] - Filter by route id
10
+ * @property {string} [labelId] - Filter by label id
11
+ * @property {string} [onlyActive] - Get active schedules (mutually exclusive with onlyInactive)
12
+ * @property {string} [onlyInactive] - Get inactive schedules (mutually exclusive with onlyActive)
13
+ * @property {string} [date] - Schedules active on this date (MM/DD/YYYY)
14
+ * @property {number} [page] - Page for pagination
15
+ * @property {string} [providerId] - Filter by provider
16
+ */
17
+
4
18
  /**
5
19
  * Factory for schedules API (btrz-api-inventory).
6
20
  * @param {Object} deps
@@ -14,7 +28,7 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
14
28
  * @param {Object} opts
15
29
  * @param {string} [opts.token] - API key
16
30
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
17
- * @param {Object} [opts.query] - Query params
31
+ * @param {SchedulesListQuery} [opts.query] - Query params
18
32
  * @param {Object} [opts.headers] - Optional headers
19
33
  * @returns {Promise<import("axios").AxiosResponse>}
20
34
  */
@@ -26,13 +40,12 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
26
40
  }
27
41
 
28
42
  /**
29
- * GET /routes/:routeId/schedules/:scheduleId - get schedule by id.
43
+ * GET /routes/:routeId/schedules/:scheduleId - get schedule by id. API does not accept query params.
30
44
  * @param {Object} opts
31
45
  * @param {string} [opts.token] - API key
32
46
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
33
47
  * @param {string} opts.routeId - Route id
34
48
  * @param {string} opts.scheduleId - Schedule id
35
- * @param {Object} [opts.query] - Query params
36
49
  * @param {Object} [opts.headers] - Optional headers
37
50
  * @returns {Promise<import("axios").AxiosResponse>}
38
51
  */
@@ -44,7 +57,7 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
44
57
  }
45
58
 
46
59
  /**
47
- * POST /routes/:routeId/schedules - create schedule.
60
+ * POST /routes/:routeId/schedules - create schedule. API does not accept query params.
48
61
  * @param {Object} opts
49
62
  * @param {string} [opts.token] - API key
50
63
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -65,7 +78,7 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
65
78
  }
66
79
 
67
80
  /**
68
- * PUT /routes/:routeId/schedules/:scheduleId - update schedule.
81
+ * PUT /routes/:routeId/schedules/:scheduleId - update schedule. API does not accept query params.
69
82
  * @param {Object} opts
70
83
  * @param {string} [opts.token] - API key
71
84
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -87,7 +100,7 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
87
100
  }
88
101
 
89
102
  /**
90
- * DELETE /routes/:routeId/schedules/:scheduleId - delete schedule.
103
+ * DELETE /routes/:routeId/schedules/:scheduleId - delete schedule. API does not accept query params.
91
104
  * @param {Object} opts
92
105
  * @param {string} [opts.token] - API key
93
106
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -109,7 +122,7 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
109
122
  /** @type {{ create: function, delete: function }} */
110
123
  const autoBouncing = {
111
124
  /**
112
- * POST /routes/schedules/auto-bouncing - create auto bouncing.
125
+ * POST /routes/schedules/auto-bouncing - create auto bouncing. API does not accept query params.
113
126
  * @param {Object} opts
114
127
  * @param {string} [opts.token] - API key
115
128
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -128,7 +141,7 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
128
141
  });
129
142
  },
130
143
  /**
131
- * DELETE /routes/:routeId/schedules/:parentScheduleId/auto-bouncing - delete auto bouncing.
144
+ * DELETE /routes/:routeId/schedules/:parentScheduleId/auto-bouncing - delete auto bouncing. API does not accept query params.
132
145
  * @param {Object} opts
133
146
  * @param {string} [opts.token] - API key
134
147
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -151,7 +164,7 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
151
164
  /** @type {{ create: function, delete: function, update: function }} */
152
165
  const exceptions = {
153
166
  /**
154
- * POST /schedules/:scheduleId/schedule-exceptions - create schedule exception.
167
+ * POST /schedules/:scheduleId/schedule-exceptions - create schedule exception. API does not accept query params.
155
168
  * @param {Object} opts
156
169
  * @param {string} [opts.token] - API key
157
170
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -171,7 +184,7 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
171
184
  });
172
185
  },
173
186
  /**
174
- * DELETE /schedules/:scheduleId/schedule-exceptions/:exceptionId - delete schedule exception.
187
+ * DELETE /schedules/:scheduleId/schedule-exceptions/:exceptionId - delete schedule exception. API does not accept query params.
175
188
  * @param {Object} opts
176
189
  * @param {string} [opts.token] - API key
177
190
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
@@ -190,7 +203,7 @@ function schedulesFactory({client, internalAuthTokenProvider}) {
190
203
  });
191
204
  },
192
205
  /**
193
- * PUT /schedules/:scheduleId/schedule-exceptions/:exceptionId - update schedule exception.
206
+ * PUT /schedules/:scheduleId/schedule-exceptions/:exceptionId - update schedule exception. API does not accept query params.
194
207
  * @param {Object} opts
195
208
  * @param {string} [opts.token] - API key
196
209
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol