btrz-api-client 8.31.0 → 8.33.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 (93) 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 +5 -0
  4. package/lib/endpoints/accounts/agencies.js +52 -0
  5. package/lib/endpoints/accounts/application-settings.js +19 -18
  6. package/lib/endpoints/accounts/applications.js +8 -7
  7. package/lib/endpoints/accounts/customers.js +27 -24
  8. package/lib/endpoints/accounts/domains.js +16 -11
  9. package/lib/endpoints/accounts/email-settings.js +22 -18
  10. package/lib/endpoints/accounts/email-templates.js +8 -4
  11. package/lib/endpoints/accounts/exchange-rates.js +12 -7
  12. package/lib/endpoints/accounts/exchange-receipts.js +10 -6
  13. package/lib/endpoints/accounts/external-customers.js +50 -0
  14. package/lib/endpoints/accounts/goal-settings.js +8 -6
  15. package/lib/endpoints/accounts/images.js +14 -13
  16. package/lib/endpoints/accounts/interline.js +35 -27
  17. package/lib/endpoints/accounts/journey-prices-settings.js +8 -6
  18. package/lib/endpoints/accounts/lexicons.js +13 -13
  19. package/lib/endpoints/accounts/market-pricing-settings.js +7 -6
  20. package/lib/endpoints/accounts/multiproduct-sales-settings.js +7 -6
  21. package/lib/endpoints/accounts/network.js +28 -13
  22. package/lib/endpoints/accounts/operation-settings.js +8 -6
  23. package/lib/endpoints/accounts/people-lookups.js +17 -17
  24. package/lib/endpoints/accounts/point-to-point-settings.js +6 -6
  25. package/lib/endpoints/accounts/print-settings.js +9 -6
  26. package/lib/endpoints/accounts/print-templates.js +37 -21
  27. package/lib/endpoints/accounts/printers.js +10 -4
  28. package/lib/endpoints/accounts/rms-settings.js +19 -11
  29. package/lib/endpoints/accounts/salesforce-settings.js +8 -6
  30. package/lib/endpoints/accounts/shift-settings.js +7 -6
  31. package/lib/endpoints/accounts/shifts.js +13 -9
  32. package/lib/endpoints/accounts/sms-templates.js +28 -19
  33. package/lib/endpoints/accounts/sub-print-templates.js +5 -3
  34. package/lib/endpoints/accounts/ticket-movement-settings.js +8 -5
  35. package/lib/endpoints/accounts/travellers.js +18 -12
  36. package/lib/endpoints/accounts/trusted-machines.js +11 -8
  37. package/lib/endpoints/accounts/twilio-settings.js +8 -5
  38. package/lib/endpoints/accounts/users.js +105 -63
  39. package/lib/endpoints/accounts/verified-emails.js +130 -0
  40. package/lib/endpoints/accounts/websales-config.js +7 -5
  41. package/lib/endpoints/coltrane/healthcheck.js +35 -0
  42. package/lib/endpoints/coltrane/info.js +35 -0
  43. package/lib/endpoints/coltrane/paths.js +17 -13
  44. package/package.json +1 -1
  45. package/src/client.js +5 -0
  46. package/src/endpoints/accounts/agencies.js +40 -0
  47. package/src/endpoints/accounts/application-settings.js +19 -18
  48. package/src/endpoints/accounts/applications.js +8 -7
  49. package/src/endpoints/accounts/customers.js +27 -24
  50. package/src/endpoints/accounts/domains.js +16 -11
  51. package/src/endpoints/accounts/email-settings.js +22 -18
  52. package/src/endpoints/accounts/email-templates.js +8 -4
  53. package/src/endpoints/accounts/exchange-rates.js +12 -7
  54. package/src/endpoints/accounts/exchange-receipts.js +10 -6
  55. package/src/endpoints/accounts/external-customers.js +37 -0
  56. package/src/endpoints/accounts/goal-settings.js +8 -6
  57. package/src/endpoints/accounts/images.js +14 -13
  58. package/src/endpoints/accounts/interline.js +35 -28
  59. package/src/endpoints/accounts/journey-prices-settings.js +8 -6
  60. package/src/endpoints/accounts/lexicons.js +13 -13
  61. package/src/endpoints/accounts/market-pricing-settings.js +7 -6
  62. package/src/endpoints/accounts/multiproduct-sales-settings.js +7 -6
  63. package/src/endpoints/accounts/network.js +28 -14
  64. package/src/endpoints/accounts/operation-settings.js +8 -6
  65. package/src/endpoints/accounts/people-lookups.js +17 -17
  66. package/src/endpoints/accounts/point-to-point-settings.js +6 -6
  67. package/src/endpoints/accounts/print-settings.js +9 -7
  68. package/src/endpoints/accounts/print-templates.js +31 -19
  69. package/src/endpoints/accounts/printers.js +10 -5
  70. package/src/endpoints/accounts/rms-settings.js +19 -11
  71. package/src/endpoints/accounts/salesforce-settings.js +8 -6
  72. package/src/endpoints/accounts/shift-settings.js +7 -6
  73. package/src/endpoints/accounts/shifts.js +13 -9
  74. package/src/endpoints/accounts/sms-templates.js +28 -19
  75. package/src/endpoints/accounts/sub-print-templates.js +5 -3
  76. package/src/endpoints/accounts/ticket-movement-settings.js +8 -5
  77. package/src/endpoints/accounts/travellers.js +18 -12
  78. package/src/endpoints/accounts/trusted-machines.js +11 -8
  79. package/src/endpoints/accounts/twilio-settings.js +8 -5
  80. package/src/endpoints/accounts/users.js +42 -5
  81. package/src/endpoints/accounts/verified-emails.js +100 -0
  82. package/src/endpoints/accounts/websales-config.js +7 -5
  83. package/src/endpoints/coltrane/healthcheck.js +28 -0
  84. package/src/endpoints/coltrane/info.js +28 -0
  85. package/src/endpoints/coltrane/paths.js +17 -13
  86. package/test/endpoints/accounts/agencies.test.js +58 -0
  87. package/test/endpoints/accounts/external-customers.test.js +62 -0
  88. package/test/endpoints/accounts/users.js +10 -0
  89. package/test/endpoints/accounts/verified-emails.test.js +35 -0
  90. package/test/endpoints/coltrane/healthcheck.test.js +13 -0
  91. package/test/endpoints/coltrane/info.test.js +13 -0
  92. package/types/endpoints/accounts/users.d.ts +2 -1
  93. package/types/endpoints/accounts/verified-emails.d.ts +19 -0
@@ -6,6 +6,7 @@ var _require = require("../endpoints_helpers"),
6
6
 
7
7
  /**
8
8
  * Factory for exchange-receipt-settings API (btrz-api-accounts).
9
+ * Get or update account exchange receipt settings (CNBV-related fields). Requires BETTEREZ_APP audience.
9
10
  * @param {Object} deps
10
11
  * @param {import("axios").AxiosInstance} deps.client
11
12
  * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
@@ -18,13 +19,15 @@ function exchangeReceiptsFactory(_ref) {
18
19
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
19
20
 
20
21
  /**
21
- * PUT /exchange-receipt-settings - update exchange receipt settings. API does not accept query params.
22
+ * PUT /exchange-receipt-settings Update exchange receipt settings. Requires BETTEREZ_APP JWT.
23
+ * Body: { exchangeReceipt } or ExchangeReceipt fields at root. All fields must be strings.
24
+ * Emits exchangeReceipt.updated.
22
25
  * @param {Object} opts
23
26
  * @param {string} [opts.token] - API key
24
- * @param {string} [opts.jwtToken] - JWT or internal auth symbol
25
- * @param {Object} opts.data - Settings payload
27
+ * @param {string} [opts.jwtToken] - JWT (BETTEREZ_APP audience)
28
+ * @param {Object} opts.data - Body: { exchangeReceipt } or required ExchangeReceipt fields
26
29
  * @param {Object} [opts.headers] - Optional headers
27
- * @returns {Promise<import("axios").AxiosResponse>}
30
+ * @returns {Promise<import("axios").AxiosResponse<{ exchangeReceipt: object }>>}
28
31
  */
29
32
  function update(_ref2) {
30
33
  var data = _ref2.data,
@@ -41,12 +44,13 @@ function exchangeReceiptsFactory(_ref) {
41
44
  }
42
45
 
43
46
  /**
44
- * GET /exchange-receipt-settings - get exchange receipt settings. API does not accept query params.
47
+ * GET /exchange-receipt-settings Get exchange receipt settings. Requires BETTEREZ_APP JWT.
48
+ * Returns empty object if not set.
45
49
  * @param {Object} opts
46
50
  * @param {string} [opts.token] - API key
47
51
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
48
52
  * @param {Object} [opts.headers] - Optional headers
49
- * @returns {Promise<import("axios").AxiosResponse>}
53
+ * @returns {Promise<import("axios").AxiosResponse<{ exchangeReceipt: object }>>}
50
54
  */
51
55
  function get(_ref3) {
52
56
  var token = _ref3.token,
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ /* eslint-disable import/extensions */
4
+ var _require = require("../endpoints_helpers"),
5
+ authorizationHeaders = _require.authorizationHeaders;
6
+
7
+ /**
8
+ * Factory for external-customers API (btrz-api-accounts). Saldo Max (ADO) registration proxy.
9
+ * @param {Object} deps
10
+ * @param {import("axios").AxiosInstance} deps.client
11
+ * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
12
+ * @returns {{ registerSaldoMax: function }}
13
+ */
14
+
15
+
16
+ function externalCustomersFactory(_ref) {
17
+ var client = _ref.client,
18
+ internalAuthTokenProvider = _ref.internalAuthTokenProvider;
19
+
20
+ /**
21
+ * POST /external-customers/ado – Register a user with Saldo Max (ADO). Requires BETTEREZ_APP JWT.
22
+ * Body: SaldoMaxRegistrationRequest at root or { body: SaldoMaxRegistrationRequest }.
23
+ * Required: firstName, lastName, email, password (Base64), verificationCode, isoCode (2-letter).
24
+ * @param {Object} opts
25
+ * @param {string} [opts.token] - API key
26
+ * @param {string} [opts.jwtToken] - JWT (BETTEREZ_APP audience)
27
+ * @param {Object} opts.data - Request body (or { body: SaldoMaxRegistrationRequest })
28
+ * @param {Object} [opts.headers] - Optional headers
29
+ * @returns {Promise<import("axios").AxiosResponse<{ code: string }>>}
30
+ */
31
+ function registerSaldoMax(_ref2) {
32
+ var data = _ref2.data,
33
+ token = _ref2.token,
34
+ jwtToken = _ref2.jwtToken,
35
+ headers = _ref2.headers;
36
+
37
+ return client({
38
+ url: "/external-customers/ado",
39
+ method: "post",
40
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
41
+ data: data
42
+ });
43
+ }
44
+
45
+ return {
46
+ registerSaldoMax: registerSaldoMax
47
+ };
48
+ }
49
+
50
+ module.exports = externalCustomersFactory;
@@ -4,7 +4,7 @@ var _require = require("./../endpoints_helpers.js"),
4
4
  authorizationHeaders = _require.authorizationHeaders;
5
5
 
6
6
  /**
7
- * Factory for goal-settings API (btrz-api-accounts).
7
+ * Factory for goal-settings API (btrz-api-accounts). Goal API integration settings.
8
8
  * @param {Object} deps
9
9
  * @param {import("axios").AxiosInstance} deps.client
10
10
  * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
@@ -17,12 +17,13 @@ function goalSettingsFactory(_ref) {
17
17
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
18
18
 
19
19
  /**
20
- * GET /goal-settings - get goal settings. API does not accept query params.
20
+ * GET /goal-settings Get goal settings for the account. Requires BETTEREZ_APP JWT.
21
+ * If user lacks read permission for /admin/integrations/goal, returns 200 with empty goalSettings.
21
22
  * @param {Object} opts
22
23
  * @param {string} [opts.token] - API key
23
24
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
24
25
  * @param {Object} [opts.headers] - Optional headers
25
- * @returns {Promise<import("axios").AxiosResponse>}
26
+ * @returns {Promise<import("axios").AxiosResponse<{ goalSettings: object }>>}
26
27
  */
27
28
  function get(_ref2) {
28
29
  var token = _ref2.token,
@@ -38,13 +39,14 @@ function goalSettingsFactory(_ref) {
38
39
  }
39
40
 
40
41
  /**
41
- * PUT /goal-settings - update goal settings. API does not accept query params.
42
+ * PUT /goal-settings Update goal settings. Requires BETTEREZ_APP and update permission for
43
+ * /admin/integrations/goal. Emits goalsettings.updated. Body: { goalSettings }.
42
44
  * @param {Object} opts
43
45
  * @param {string} [opts.token] - API key
44
46
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
45
- * @param {Object} opts.goalSettings - Settings payload
47
+ * @param {Object} opts.goalSettings - Required: baseUrl, clientId, clientSecret, pushOnManifestStatus
46
48
  * @param {Object} [opts.headers] - Optional headers
47
- * @returns {Promise<import("axios").AxiosResponse>}
49
+ * @returns {Promise<import("axios").AxiosResponse<{ goalSettings: object }>>}
48
50
  */
49
51
  function update(_ref3) {
50
52
  var jwtToken = _ref3.jwtToken,
@@ -5,7 +5,7 @@ var _require = require("./../endpoints_helpers"),
5
5
  authorizationHeaders = _require.authorizationHeaders;
6
6
 
7
7
  /**
8
- * Factory for images API (btrz-api-accounts).
8
+ * Factory for images API (btrz-api-accounts). Account images (url-based). POST/DELETE require BETTEREZ_APP.
9
9
  * @param {Object} deps
10
10
  * @param {import("axios").AxiosInstance} deps.client
11
11
  * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
@@ -18,12 +18,13 @@ function ImagesFactory(_ref) {
18
18
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
19
19
 
20
20
  /**
21
- * GET /images - list images. API getSpec() does not define query params.
21
+ * GET /images List images for the account (paginated). Query: page.
22
22
  * @param {Object} opts
23
23
  * @param {string} [opts.token] - API key
24
24
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
25
+ * @param {Object} [opts.query] - Optional query (e.g. page for pagination)
25
26
  * @param {Object} [opts.headers] - Optional headers
26
- * @returns {Promise<import("axios").AxiosResponse>}
27
+ * @returns {Promise<import("axios").AxiosResponse<{ images: object[], totalRecords: number, ... }>>}
27
28
  */
28
29
  function all(_ref2) {
29
30
  var token = _ref2.token,
@@ -40,13 +41,13 @@ function ImagesFactory(_ref) {
40
41
  }
41
42
 
42
43
  /**
43
- * GET /images/:imageId - get an image. API does not accept query params.
44
+ * GET /images/:imageId Get a single image by id (24 hex ObjectId).
44
45
  * @param {Object} opts
45
46
  * @param {string} [opts.token] - API key
46
47
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
47
- * @param {string} opts.imageId - Image id (ObjectId)
48
+ * @param {string} opts.imageId - Image id (24 hex characters)
48
49
  * @param {Object} [opts.headers] - Optional headers
49
- * @returns {Promise<import("axios").AxiosResponse>}
50
+ * @returns {Promise<import("axios").AxiosResponse<{ image: object }>>}
50
51
  */
51
52
  function get(_ref3) {
52
53
  var token = _ref3.token,
@@ -64,13 +65,13 @@ function ImagesFactory(_ref) {
64
65
  }
65
66
 
66
67
  /**
67
- * POST /images - create an image.
68
+ * POST /images Create an image. Requires BETTEREZ_APP JWT. Body: { image } with url required. Emits images.created.
68
69
  * @param {Object} opts
69
70
  * @param {string} [opts.token] - API key
70
- * @param {string} [opts.jwtToken] - JWT or internal auth symbol
71
- * @param {Object} opts.image - Image payload
71
+ * @param {string} [opts.jwtToken] - JWT (BETTEREZ_APP audience)
72
+ * @param {Object} opts.image - { url } (required)
72
73
  * @param {Object} [opts.headers] - Optional headers
73
- * @returns {Promise<import("axios").AxiosResponse>}
74
+ * @returns {Promise<import("axios").AxiosResponse<{ image: object }>>}
74
75
  */
75
76
  function create(_ref4) {
76
77
  var jwtToken = _ref4.jwtToken,
@@ -91,13 +92,13 @@ function ImagesFactory(_ref) {
91
92
  }
92
93
 
93
94
  /**
94
- * DELETE /images/:imageId - remove an image.
95
+ * DELETE /images/:imageId Delete an image. Requires BETTEREZ_APP JWT. Emits images.deleted (data: { imageId }).
95
96
  * @param {Object} opts
96
97
  * @param {string} [opts.token] - API key
97
98
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
98
- * @param {string} opts.imageId - Image id (ObjectId)
99
+ * @param {string} opts.imageId - Image id (24 hex ObjectId)
99
100
  * @param {Object} [opts.headers] - Optional headers
100
- * @returns {Promise<import("axios").AxiosResponse>}
101
+ * @returns {Promise<import("axios").AxiosResponse<{ imageId: string }>>}
101
102
  */
102
103
  function remove(_ref5) {
103
104
  var imageId = _ref5.imageId,
@@ -4,7 +4,8 @@ var _require = require("../endpoints_helpers.js"),
4
4
  authorizationHeaders = _require.authorizationHeaders;
5
5
 
6
6
  /**
7
- * Factory for interline API (btrz-api-accounts).
7
+ * Factory for interline API (btrz-api-accounts). Interline invitations, consumers, providers, network.
8
+ * POST/PUT/DELETE require BETTEREZ_APP.
8
9
  * @param {Object} deps
9
10
  * @param {import("axios").AxiosInstance} deps.client
10
11
  * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
@@ -18,12 +19,13 @@ function interlineFactory(_ref) {
18
19
 
19
20
  var invitations = {
20
21
  /**
21
- * GET /interline/invitations - list interline invitations. API does not accept query params.
22
+ * GET /interline/invitations List interline invitations (paginated). Query: page.
22
23
  * @param {Object} opts
23
24
  * @param {string} [opts.token] - API key
24
25
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
26
+ * @param {Object} [opts.query] - Optional query (e.g. page)
25
27
  * @param {Object} [opts.headers] - Optional headers
26
- * @returns {Promise<import("axios").AxiosResponse>}
28
+ * @returns {Promise<import("axios").AxiosResponse<{ invitations: object[], totalRecords: number, ... }>>}
27
29
  */
28
30
  all: function all(_ref2) {
29
31
  var token = _ref2.token,
@@ -40,12 +42,12 @@ function interlineFactory(_ref) {
40
42
  },
41
43
 
42
44
  /**
43
- * GET /interline/invitations/:invitationId - get an invitation. API does not accept query params.
45
+ * GET /interline/invitations/:invitationId Get a single invitation by id (24 hex ObjectId).
44
46
  * @param {Object} opts
45
47
  * @param {string} [opts.token] - API key
46
- * @param {string} opts.invitationId - Invitation id (ObjectId)
48
+ * @param {string} opts.invitationId - Invitation id (24 hex characters)
47
49
  * @param {Object} [opts.headers] - Optional headers
48
- * @returns {Promise<import("axios").AxiosResponse>}
50
+ * @returns {Promise<import("axios").AxiosResponse<{ invitation: object }>>}
49
51
  */
50
52
  get: function get(_ref3) {
51
53
  var token = _ref3.token,
@@ -58,13 +60,14 @@ function interlineFactory(_ref) {
58
60
  },
59
61
 
60
62
  /**
61
- * POST /interline/invitations - create an invitation.
63
+ * POST /interline/invitations Create an invitation. Requires BETTEREZ_APP JWT. Emits interlineinvitation.created.
64
+ * Body: { interline } or InterlineInvitationPost at root.
62
65
  * @param {Object} opts
63
66
  * @param {string} [opts.token] - API key
64
- * @param {string} [opts.jwtToken] - JWT or internal auth symbol
67
+ * @param {string} [opts.jwtToken] - JWT (BETTEREZ_APP audience)
65
68
  * @param {Object} opts.data - Invitation payload
66
69
  * @param {Object} [opts.headers] - Optional headers
67
- * @returns {Promise<import("axios").AxiosResponse>}
70
+ * @returns {Promise<import("axios").AxiosResponse<{ invitation: object }>>}
68
71
  */
69
72
  create: function create(_ref4) {
70
73
  var data = _ref4.data,
@@ -81,14 +84,15 @@ function interlineFactory(_ref) {
81
84
  },
82
85
 
83
86
  /**
84
- * PUT /interline/invitations/:invitationId - update an invitation.
87
+ * PUT /interline/invitations/:invitationId Update invitation (e.g. accept/reject). Requires BETTEREZ_APP.
88
+ * Emits interlineinvitation.updated.
85
89
  * @param {Object} opts
86
90
  * @param {string} [opts.token] - API key
87
91
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
88
- * @param {string} opts.invitationId - Invitation id (ObjectId)
89
- * @param {Object} opts.data - Invitation payload
92
+ * @param {string} opts.invitationId - Invitation id (24 hex ObjectId)
93
+ * @param {Object} opts.data - Body (InterlineInvitePutData)
90
94
  * @param {Object} [opts.headers] - Optional headers
91
- * @returns {Promise<import("axios").AxiosResponse>}
95
+ * @returns {Promise<import("axios").AxiosResponse<{ invitation: object }>>}
92
96
  */
93
97
  update: function update(_ref5) {
94
98
  var invitationId = _ref5.invitationId,
@@ -108,12 +112,13 @@ function interlineFactory(_ref) {
108
112
 
109
113
  var consumers = {
110
114
  /**
111
- * GET /interline/consumers - list interline consumers. API does not accept query params.
115
+ * GET /interline/consumers List interline consumers (paginated). Query: page.
112
116
  * @param {Object} opts
113
117
  * @param {string} [opts.token] - API key
114
118
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
119
+ * @param {Object} [opts.query] - Optional query (e.g. page)
115
120
  * @param {Object} [opts.headers] - Optional headers
116
- * @returns {Promise<import("axios").AxiosResponse>}
121
+ * @returns {Promise<import("axios").AxiosResponse<{ consumers: object[], totalRecords: number, ... }>>}
117
122
  */
118
123
  all: function all(_ref6) {
119
124
  var token = _ref6.token,
@@ -132,12 +137,13 @@ function interlineFactory(_ref) {
132
137
 
133
138
  var providers = {
134
139
  /**
135
- * GET /interline/providers - list interline providers. API does not accept query params.
140
+ * GET /interline/providers List interline providers (paginated). Query: page.
136
141
  * @param {Object} opts
137
142
  * @param {string} [opts.token] - API key
138
143
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
144
+ * @param {Object} [opts.query] - Optional query (e.g. page)
139
145
  * @param {Object} [opts.headers] - Optional headers
140
- * @returns {Promise<import("axios").AxiosResponse>}
146
+ * @returns {Promise<import("axios").AxiosResponse<{ providers: object[], totalRecords: number, ... }>>}
141
147
  */
142
148
  all: function all(_ref7) {
143
149
  var token = _ref7.token,
@@ -156,32 +162,34 @@ function interlineFactory(_ref) {
156
162
 
157
163
  var network = {
158
164
  /**
159
- * GET /interline/:interlineId/network - get interline network. API does not accept query params.
165
+ * GET /interline/:interlineId/network Get interline network by interline id (24 hex ObjectId).
160
166
  * @param {Object} opts
161
167
  * @param {string} [opts.token] - API key
162
- * @param {string} opts.interlineId - Interline id (ObjectId)
168
+ * @param {string} [opts.jwtToken] - JWT or internal auth symbol
169
+ * @param {string} opts.interlineId - Interline id (24 hex ObjectId)
163
170
  * @param {Object} [opts.headers] - Optional headers
164
- * @returns {Promise<import("axios").AxiosResponse>}
171
+ * @returns {Promise<import("axios").AxiosResponse<{ network: object }>>}
165
172
  */
166
173
  get: function get(_ref8) {
167
174
  var token = _ref8.token,
175
+ jwtToken = _ref8.jwtToken,
168
176
  interlineId = _ref8.interlineId,
169
177
  headers = _ref8.headers;
170
178
 
171
179
  return client.get("/interline/" + interlineId + "/network", {
172
- headers: authorizationHeaders({ token: token, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
180
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
173
181
  });
174
182
  },
175
183
 
176
184
  /**
177
- * PUT /interline/:interlineId/network - update interline network.
185
+ * PUT /interline/:interlineId/network Update interline network. Requires BETTEREZ_APP. Emits interlinenetwork.updated.
178
186
  * @param {Object} opts
179
187
  * @param {string} [opts.token] - API key
180
188
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
181
- * @param {string} opts.interlineId - Interline id (ObjectId)
182
- * @param {Object} opts.data - Network payload
189
+ * @param {string} opts.interlineId - Interline id (24 hex ObjectId)
190
+ * @param {Object} opts.data - Network payload (InterlinePutData)
183
191
  * @param {Object} [opts.headers] - Optional headers
184
- * @returns {Promise<import("axios").AxiosResponse>}
192
+ * @returns {Promise<import("axios").AxiosResponse<{ network: object }>>}
185
193
  */
186
194
  update: function update(_ref9) {
187
195
  var interlineId = _ref9.interlineId,
@@ -205,11 +213,11 @@ function interlineFactory(_ref) {
205
213
  providers: providers,
206
214
  network: network,
207
215
  /**
208
- * DELETE /interline/:interlineId - remove an interline.
216
+ * DELETE /interline/:interlineId Remove an interline. Requires BETTEREZ_APP. Emits interlinenetwork.deleted.
209
217
  * @param {Object} opts
210
218
  * @param {string} [opts.token] - API key
211
219
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
212
- * @param {string} opts.interlineId - Interline id (ObjectId)
220
+ * @param {string} opts.interlineId - Interline id (24 hex ObjectId)
213
221
  * @param {Object} [opts.headers] - Optional headers
214
222
  * @returns {Promise<import("axios").AxiosResponse>}
215
223
  */
@@ -4,7 +4,8 @@ var _require = require("../endpoints_helpers.js"),
4
4
  authorizationHeaders = _require.authorizationHeaders;
5
5
 
6
6
  /**
7
- * Factory for journey-prices-settings API (btrz-api-accounts).
7
+ * Factory for journey-prices-settings API (btrz-api-accounts). Journey pricing settings (record protection rules, pricing parameters).
8
+ * Requires user logged in to backoffice app.
8
9
  * @param {Object} deps
9
10
  * @param {import("axios").AxiosInstance} deps.client
10
11
  * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
@@ -17,12 +18,12 @@ function journeyPricesSettingsFactory(_ref) {
17
18
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
18
19
 
19
20
  /**
20
- * GET /journey-prices-settings - get journey prices settings. API does not accept query params.
21
+ * GET /journey-prices-settings Get journey prices settings for the account.
21
22
  * @param {Object} opts
22
23
  * @param {string} [opts.token] - API key
23
24
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
24
25
  * @param {Object} [opts.headers] - Optional headers
25
- * @returns {Promise<import("axios").AxiosResponse>}
26
+ * @returns {Promise<import("axios").AxiosResponse<{ journeyPricesSettings: object }>>}
26
27
  */
27
28
  function get(_ref2) {
28
29
  var token = _ref2.token,
@@ -36,13 +37,14 @@ function journeyPricesSettingsFactory(_ref) {
36
37
  }
37
38
 
38
39
  /**
39
- * PUT /journey-prices-settings - update journey prices settings. API does not accept query params.
40
+ * PUT /journey-prices-settings Update journey prices settings. Body: JourneyPricesSettings at root.
41
+ * Required: recordProtectionRules. Optional: pricingParameters, allowEachTripSegmentToBePricedIndividually.
40
42
  * @param {Object} opts
41
43
  * @param {string} [opts.token] - API key
42
44
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
43
- * @param {Object} opts.journeyPricesSettings - Settings payload
45
+ * @param {Object} opts.journeyPricesSettings - { recordProtectionRules, pricingParameters?, allowEachTripSegmentToBePricedIndividually? }
44
46
  * @param {Object} [opts.headers] - Optional headers
45
- * @returns {Promise<import("axios").AxiosResponse>}
47
+ * @returns {Promise<import("axios").AxiosResponse<{ journeyPricesSettings: object }>>}
46
48
  */
47
49
  function update(_ref3) {
48
50
  var token = _ref3.token,
@@ -47,13 +47,13 @@ function lexiconsFactory(_ref) {
47
47
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
48
48
 
49
49
  /**
50
- * GET /lexicons/buscompany - list lexicons (collection buscompany). Query params from get-lexicons getSpec().
50
+ * GET /lexicons/buscompany list account translations from buscompany collection. Query params from get-lexicons getSpec().
51
51
  * @param {Object} opts
52
52
  * @param {string} [opts.token] - API key
53
53
  * @param {string} [opts.context] - Context of the lexicons to search (merged into query)
54
54
  * @param {LexiconsListQuery} [opts.query] - Query params: providerIds, context, accountOnly, key, keys, lang, langs
55
55
  * @param {Object} [opts.headers] - Optional headers
56
- * @returns {Promise<import("axios").AxiosResponse>}
56
+ * @returns {Promise<import("axios").AxiosResponse<{ lexicons: Array }>>}
57
57
  */
58
58
  function all(_ref2) {
59
59
  var token = _ref2.token,
@@ -72,13 +72,13 @@ function lexiconsFactory(_ref) {
72
72
  }
73
73
 
74
74
  /**
75
- * POST /lexicons - create lexicon entries.
75
+ * POST /lexicons create lexicon entries. Body: { entries }. Requires BETTEREZ_APP audience.
76
76
  * @param {Object} opts
77
77
  * @param {string} [opts.token] - API key
78
78
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
79
- * @param {Array} opts.lexiconEntries - Entries to create
79
+ * @param {Array} opts.lexiconEntries - Entries to create (accountId, name, values, context per item)
80
80
  * @param {Object} [opts.headers] - Optional headers
81
- * @returns {Promise<import("axios").AxiosResponse>}
81
+ * @returns {Promise<import("axios").AxiosResponse<{ successes: Array, failures: Array }>>}
82
82
  */
83
83
  function create(_ref3) {
84
84
  var token = _ref3.token,
@@ -97,13 +97,13 @@ function lexiconsFactory(_ref) {
97
97
  }
98
98
 
99
99
  /**
100
- * PUT /lexicons - create or update many lexicon entries.
100
+ * PUT /lexicons create or update many lexicon entries. Body: { entries }. Emits webhook lexicons.updated. Requires BETTEREZ_APP audience.
101
101
  * @param {Object} opts
102
102
  * @param {string} [opts.token] - API key
103
103
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
104
- * @param {Array} opts.entries - Entries to create or update
104
+ * @param {Array} opts.entries - Entries to create or update (key, values per item)
105
105
  * @param {Object} [opts.headers] - Optional headers
106
- * @returns {Promise<import("axios").AxiosResponse>}
106
+ * @returns {Promise<import("axios").AxiosResponse<{ status: string, entries: Array }>>}
107
107
  */
108
108
  function createOrUpdateMany(_ref4) {
109
109
  var token = _ref4.token,
@@ -124,13 +124,13 @@ function lexiconsFactory(_ref) {
124
124
  }
125
125
 
126
126
  /**
127
- * PATCH /lexicons - update many lexicon entries.
127
+ * PATCH /lexicons update many lexicon entries. Body: { updates } (key, accountId, values and/or context). Requires BETTEREZ_APP audience.
128
128
  * @param {Object} opts
129
129
  * @param {string} [opts.token] - API key
130
130
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
131
- * @param {Array} opts.updates - Updates to apply
131
+ * @param {Array} opts.updates - Updates to apply (key, accountId, values?, context?)
132
132
  * @param {Object} [opts.headers] - Optional headers
133
- * @returns {Promise<import("axios").AxiosResponse>}
133
+ * @returns {Promise<import("axios").AxiosResponse<{ entries: Array }>>}
134
134
  */
135
135
  function updateMany(_ref5) {
136
136
  var token = _ref5.token,
@@ -149,14 +149,14 @@ function lexiconsFactory(_ref) {
149
149
  }
150
150
 
151
151
  /**
152
- * Search global lexicons (no account) by partial match on the translation value for the given language.
152
+ * GET /lexicons/:lang/content – search global lexicons (no account) by partial match on translation value. Requires BETTEREZ_APP audience.
153
153
  * @param {Object} opts
154
154
  * @param {string} opts.lang - Language code (e.g. en-us, pt-br). Must be a supported language.
155
155
  * @param {string} opts.txt - Text to search for (partial, case-insensitive). Required.
156
156
  * @param {string} [opts.token] - API key
157
157
  * @param {string} [opts.jwtToken] - JWT
158
158
  * @param {Object} [opts.headers] - Optional request headers
159
- * @returns {Promise<{data: { lexiconTextContentItems: Array }}>}
159
+ * @returns {Promise<import("axios").AxiosResponse<{ lexiconTextContentItems: Array }>>}
160
160
  */
161
161
  function getByText(_ref6) {
162
162
  var token = _ref6.token,
@@ -4,7 +4,8 @@ var _require = require("../endpoints_helpers.js"),
4
4
  authorizationHeaders = _require.authorizationHeaders;
5
5
 
6
6
  /**
7
- * Factory for market-pricing-settings API (btrz-api-accounts).
7
+ * Factory for market-pricing-settings API (btrz-api-accounts). Market pricing configuration (e.g. useOnlySpecificFareTable).
8
+ * Requires user logged in to backoffice app.
8
9
  * @param {Object} deps
9
10
  * @param {import("axios").AxiosInstance} deps.client
10
11
  * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
@@ -17,12 +18,12 @@ function marketPricingSettingsFactory(_ref) {
17
18
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
18
19
 
19
20
  /**
20
- * GET /market-pricing-settings - get market pricing settings. API does not accept query params.
21
+ * GET /market-pricing-settings Get market pricing settings for the account.
21
22
  * @param {Object} opts
22
23
  * @param {string} [opts.token] - API key
23
24
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
24
25
  * @param {Object} [opts.headers] - Optional headers
25
- * @returns {Promise<import("axios").AxiosResponse>}
26
+ * @returns {Promise<import("axios").AxiosResponse<{ marketPricingSettings: { useOnlySpecificFareTable: boolean } }>>}
26
27
  */
27
28
  function get(_ref2) {
28
29
  var token = _ref2.token,
@@ -36,13 +37,13 @@ function marketPricingSettingsFactory(_ref) {
36
37
  }
37
38
 
38
39
  /**
39
- * PUT /market-pricing-settings - update market pricing settings. API does not accept query params.
40
+ * PUT /market-pricing-settings Update market pricing settings. Body: MarketPricingSettings at root (useOnlySpecificFareTable required).
40
41
  * @param {Object} opts
41
42
  * @param {string} [opts.token] - API key
42
43
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
43
- * @param {Object} opts.marketPricingSettings - Settings payload
44
+ * @param {Object} opts.marketPricingSettings - { useOnlySpecificFareTable: boolean }
44
45
  * @param {Object} [opts.headers] - Optional headers
45
- * @returns {Promise<import("axios").AxiosResponse>}
46
+ * @returns {Promise<import("axios").AxiosResponse<{ marketPricingSettings: object }>>}
46
47
  */
47
48
  function update(_ref3) {
48
49
  var token = _ref3.token,
@@ -4,7 +4,8 @@ var _require = require("../endpoints_helpers.js"),
4
4
  authorizationHeaders = _require.authorizationHeaders;
5
5
 
6
6
  /**
7
- * Factory for multiproduct-sales-settings API (btrz-api-accounts).
7
+ * Factory for multiproduct-sales-settings API (btrz-api-accounts). Multi-product sales settings (product/station/fare/fareClass mappings).
8
+ * Requires BETTEREZ_APP audience. PUT emits webhooks networks.created or networks.updated.
8
9
  * @param {Object} deps
9
10
  * @param {import("axios").AxiosInstance} deps.client
10
11
  * @param {{ getToken: function(): string }} [deps.internalAuthTokenProvider]
@@ -17,12 +18,12 @@ function multiproductSalesSettingsFactory(_ref) {
17
18
  internalAuthTokenProvider = _ref.internalAuthTokenProvider;
18
19
 
19
20
  /**
20
- * GET /multiproduct-sales-settings - get multiproduct sales settings. API does not accept query params.
21
+ * GET /multiproduct-sales-settings Get multi-product sales settings for the account.
21
22
  * @param {Object} opts
22
23
  * @param {string} [opts.token] - API key
23
24
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
24
25
  * @param {Object} [opts.headers] - Optional headers
25
- * @returns {Promise<import("axios").AxiosResponse>}
26
+ * @returns {Promise<import("axios").AxiosResponse<{ multiProductSettings: object }>>}
26
27
  */
27
28
  function get(_ref2) {
28
29
  var token = _ref2.token,
@@ -36,13 +37,13 @@ function multiproductSalesSettingsFactory(_ref) {
36
37
  }
37
38
 
38
39
  /**
39
- * PUT /multiproduct-sales-settings - update multiproduct sales settings. API does not accept query params.
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
41
  * @param {Object} opts
41
42
  * @param {string} [opts.token] - API key
42
43
  * @param {string} [opts.jwtToken] - JWT or internal auth symbol
43
- * @param {Object} opts.data - Settings payload
44
+ * @param {Object} opts.data - multiProductSettings payload (productsMapping, stationsMapping, faresMapping, fareClassesMapping; each key ObjectId, each value array of ObjectIds)
44
45
  * @param {Object} [opts.headers] - Optional headers
45
- * @returns {Promise<import("axios").AxiosResponse>}
46
+ * @returns {Promise<import("axios").AxiosResponse<{ multiProductSettings: object }>>}
46
47
  */
47
48
  function update(_ref3) {
48
49
  var token = _ref3.token,