btrz-api-client 8.68.2 → 8.68.4
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.
|
@@ -25,6 +25,7 @@ function fareTypeModifierFactory(_ref) {
|
|
|
25
25
|
* GET /fare-type-modifiers - list fare-type modifiers (paginated).
|
|
26
26
|
* @param {Object} opts
|
|
27
27
|
* @param {string} [opts.token] - API key
|
|
28
|
+
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
28
29
|
* @param {FareTypeModifiersListQuery} [opts.query] - Query params
|
|
29
30
|
* @param {Object} [opts.headers] - Optional headers
|
|
30
31
|
* @returns {Promise<import("axios").AxiosResponse<{ fareTypeModifiers: Object[], next?: string, previous?: string, count: number }>>}
|
|
@@ -34,13 +35,14 @@ function fareTypeModifierFactory(_ref) {
|
|
|
34
35
|
*/
|
|
35
36
|
function all(_ref2) {
|
|
36
37
|
var token = _ref2.token,
|
|
38
|
+
jwtToken = _ref2.jwtToken,
|
|
37
39
|
_ref2$query = _ref2.query,
|
|
38
40
|
query = _ref2$query === undefined ? {} : _ref2$query,
|
|
39
41
|
headers = _ref2.headers;
|
|
40
42
|
|
|
41
43
|
return client.get("/fare-type-modifiers", {
|
|
42
44
|
params: query,
|
|
43
|
-
headers: authorizationHeaders({ token: token, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
45
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
44
46
|
});
|
|
45
47
|
}
|
|
46
48
|
|
|
@@ -49,6 +51,7 @@ function fareTypeModifierFactory(_ref) {
|
|
|
49
51
|
* @param {Object} opts
|
|
50
52
|
* @param {string} opts.fareTypeModifierId - Fare-type modifier id (24 hex characters)
|
|
51
53
|
* @param {string} [opts.token] - API key
|
|
54
|
+
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
52
55
|
* @param {Object} [opts.headers] - Optional headers
|
|
53
56
|
* @returns {Promise<import("axios").AxiosResponse<{ fareTypeModifier: Object }>>}
|
|
54
57
|
* @throws
|
|
@@ -60,10 +63,11 @@ function fareTypeModifierFactory(_ref) {
|
|
|
60
63
|
function get(_ref3) {
|
|
61
64
|
var fareTypeModifierId = _ref3.fareTypeModifierId,
|
|
62
65
|
token = _ref3.token,
|
|
66
|
+
jwtToken = _ref3.jwtToken,
|
|
63
67
|
headers = _ref3.headers;
|
|
64
68
|
|
|
65
69
|
return client.get("/fare-type-modifiers/" + fareTypeModifierId, {
|
|
66
|
-
headers: authorizationHeaders({ token: token, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
70
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
67
71
|
});
|
|
68
72
|
}
|
|
69
73
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "btrz-api-client",
|
|
3
|
-
"version": "8.68.
|
|
3
|
+
"version": "8.68.4",
|
|
4
4
|
"description": "Api client for Betterez endpoints",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
"test:only": "node --require ./test/node-test-globals.js --test test/all.test.js --test-only",
|
|
10
10
|
"test:integration": "node --require ./test/node-test-globals.js --require ./test-integration/ports.js --test test-integration/all.test.js",
|
|
11
11
|
"browserify": "browserify lib/client.js --standalone BtrzApiClient -p tinyify -o lib/client-standalone-min.js",
|
|
12
|
-
"prepare": "npm run browserify",
|
|
13
12
|
"commit-transpile": "git add lib/ && (git diff-index --quiet HEAD || git commit -m \"transpiled src\")",
|
|
14
13
|
"pretranspile": "rm -rf lib/",
|
|
15
14
|
"transpile": "babel --presets es2015 -d lib/ src/",
|
|
@@ -19,6 +19,7 @@ function fareTypeModifierFactory({client, internalAuthTokenProvider}) {
|
|
|
19
19
|
* GET /fare-type-modifiers - list fare-type modifiers (paginated).
|
|
20
20
|
* @param {Object} opts
|
|
21
21
|
* @param {string} [opts.token] - API key
|
|
22
|
+
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
22
23
|
* @param {FareTypeModifiersListQuery} [opts.query] - Query params
|
|
23
24
|
* @param {Object} [opts.headers] - Optional headers
|
|
24
25
|
* @returns {Promise<import("axios").AxiosResponse<{ fareTypeModifiers: Object[], next?: string, previous?: string, count: number }>>}
|
|
@@ -28,12 +29,13 @@ function fareTypeModifierFactory({client, internalAuthTokenProvider}) {
|
|
|
28
29
|
*/
|
|
29
30
|
function all({
|
|
30
31
|
token,
|
|
32
|
+
jwtToken,
|
|
31
33
|
query = {},
|
|
32
34
|
headers
|
|
33
35
|
}) {
|
|
34
36
|
return client.get("/fare-type-modifiers", {
|
|
35
37
|
params: query,
|
|
36
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
38
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
37
39
|
});
|
|
38
40
|
}
|
|
39
41
|
|
|
@@ -42,6 +44,7 @@ function fareTypeModifierFactory({client, internalAuthTokenProvider}) {
|
|
|
42
44
|
* @param {Object} opts
|
|
43
45
|
* @param {string} opts.fareTypeModifierId - Fare-type modifier id (24 hex characters)
|
|
44
46
|
* @param {string} [opts.token] - API key
|
|
47
|
+
* @param {string} [opts.jwtToken] - JWT or internal auth symbol
|
|
45
48
|
* @param {Object} [opts.headers] - Optional headers
|
|
46
49
|
* @returns {Promise<import("axios").AxiosResponse<{ fareTypeModifier: Object }>>}
|
|
47
50
|
* @throws
|
|
@@ -50,9 +53,9 @@ function fareTypeModifierFactory({client, internalAuthTokenProvider}) {
|
|
|
50
53
|
* - 404 FARE_TYPE_MODIFIER_NOT_FOUND
|
|
51
54
|
* - 500 Internal server error
|
|
52
55
|
*/
|
|
53
|
-
function get({fareTypeModifierId, token, headers}) {
|
|
56
|
+
function get({fareTypeModifierId, token, jwtToken, headers}) {
|
|
54
57
|
return client.get(`/fare-type-modifiers/${fareTypeModifierId}`, {
|
|
55
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
58
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
56
59
|
});
|
|
57
60
|
}
|
|
58
61
|
|