btrz-api-client 5.210.0 → 5.211.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.
|
@@ -78,12 +78,29 @@ function routesFactory(_ref) {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
function update(_ref7) {
|
|
82
|
+
var token = _ref7.token,
|
|
83
|
+
jwtToken = _ref7.jwtToken,
|
|
84
|
+
data = _ref7.data,
|
|
85
|
+
routeId = _ref7.routeId,
|
|
86
|
+
headers = _ref7.headers;
|
|
87
|
+
|
|
88
|
+
return client({
|
|
89
|
+
url: "/routes/" + routeId,
|
|
90
|
+
method: "put",
|
|
91
|
+
headers: authorizationHeaders({
|
|
92
|
+
token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
|
|
93
|
+
}),
|
|
94
|
+
data: data
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
81
98
|
var fareTables = {
|
|
82
|
-
all: function all(
|
|
83
|
-
var token =
|
|
84
|
-
|
|
85
|
-
query =
|
|
86
|
-
headers =
|
|
99
|
+
all: function all(_ref8) {
|
|
100
|
+
var token = _ref8.token,
|
|
101
|
+
_ref8$query = _ref8.query,
|
|
102
|
+
query = _ref8$query === undefined ? {} : _ref8$query,
|
|
103
|
+
headers = _ref8.headers;
|
|
87
104
|
|
|
88
105
|
return client({
|
|
89
106
|
url: "/routes/fare-tables",
|
|
@@ -93,12 +110,12 @@ function routesFactory(_ref) {
|
|
|
93
110
|
})
|
|
94
111
|
});
|
|
95
112
|
},
|
|
96
|
-
create: function create(
|
|
97
|
-
var token =
|
|
98
|
-
jwtToken =
|
|
99
|
-
routeId =
|
|
100
|
-
fareTable =
|
|
101
|
-
headers =
|
|
113
|
+
create: function create(_ref9) {
|
|
114
|
+
var token = _ref9.token,
|
|
115
|
+
jwtToken = _ref9.jwtToken,
|
|
116
|
+
routeId = _ref9.routeId,
|
|
117
|
+
fareTable = _ref9.fareTable,
|
|
118
|
+
headers = _ref9.headers;
|
|
102
119
|
|
|
103
120
|
return client({
|
|
104
121
|
url: "/routes/" + routeId + "/fare-tables",
|
|
@@ -111,13 +128,13 @@ function routesFactory(_ref) {
|
|
|
111
128
|
}
|
|
112
129
|
});
|
|
113
130
|
},
|
|
114
|
-
update: function update(
|
|
115
|
-
var token =
|
|
116
|
-
jwtToken =
|
|
117
|
-
routeId =
|
|
118
|
-
fareTableId =
|
|
119
|
-
fareTable =
|
|
120
|
-
headers =
|
|
131
|
+
update: function update(_ref10) {
|
|
132
|
+
var token = _ref10.token,
|
|
133
|
+
jwtToken = _ref10.jwtToken,
|
|
134
|
+
routeId = _ref10.routeId,
|
|
135
|
+
fareTableId = _ref10.fareTableId,
|
|
136
|
+
fareTable = _ref10.fareTable,
|
|
137
|
+
headers = _ref10.headers;
|
|
121
138
|
|
|
122
139
|
return client({
|
|
123
140
|
url: "/routes/" + routeId + "/fare-tables/" + fareTableId,
|
|
@@ -132,12 +149,12 @@ function routesFactory(_ref) {
|
|
|
132
149
|
}
|
|
133
150
|
};
|
|
134
151
|
var stops = {
|
|
135
|
-
create: function create(
|
|
136
|
-
var token =
|
|
137
|
-
jwtToken =
|
|
138
|
-
routeId =
|
|
139
|
-
stop =
|
|
140
|
-
headers =
|
|
152
|
+
create: function create(_ref11) {
|
|
153
|
+
var token = _ref11.token,
|
|
154
|
+
jwtToken = _ref11.jwtToken,
|
|
155
|
+
routeId = _ref11.routeId,
|
|
156
|
+
stop = _ref11.stop,
|
|
157
|
+
headers = _ref11.headers;
|
|
141
158
|
|
|
142
159
|
return client({
|
|
143
160
|
url: "/routes/" + routeId + "/stops",
|
|
@@ -156,6 +173,7 @@ function routesFactory(_ref) {
|
|
|
156
173
|
all: all,
|
|
157
174
|
stations: stations,
|
|
158
175
|
create: create,
|
|
176
|
+
update: update,
|
|
159
177
|
fareTables: fareTables,
|
|
160
178
|
stops: stops
|
|
161
179
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const {authorizationHeaders} = require("./../endpoints_helpers");
|
|
2
2
|
|
|
3
|
-
function routesFactory({
|
|
4
|
-
function get({
|
|
3
|
+
function routesFactory({client, internalAuthTokenProvider}) {
|
|
4
|
+
function get({routeId, token, query = {}, headers}) {
|
|
5
5
|
return client({
|
|
6
6
|
url: `/route/${routeId}`,
|
|
7
7
|
params: query,
|
|
@@ -9,7 +9,7 @@ function routesFactory({ client, internalAuthTokenProvider }) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
function prices({
|
|
12
|
+
function prices({token, productId, originId, destinationId, channel, query, headers}) {
|
|
13
13
|
const params = Object.assign({}, query, {productId, originId, destinationId, channel});
|
|
14
14
|
|
|
15
15
|
return client({
|
|
@@ -44,6 +44,17 @@ function routesFactory({ client, internalAuthTokenProvider }) {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
function update({token, jwtToken, data, routeId, headers}) {
|
|
48
|
+
return client({
|
|
49
|
+
url: `/routes/${routeId}`,
|
|
50
|
+
method: "put",
|
|
51
|
+
headers: authorizationHeaders({
|
|
52
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
53
|
+
}),
|
|
54
|
+
data
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
47
58
|
|
|
48
59
|
const fareTables = {
|
|
49
60
|
all({
|
|
@@ -105,6 +116,7 @@ function routesFactory({ client, internalAuthTokenProvider }) {
|
|
|
105
116
|
all,
|
|
106
117
|
stations,
|
|
107
118
|
create,
|
|
119
|
+
update,
|
|
108
120
|
fareTables,
|
|
109
121
|
stops
|
|
110
122
|
};
|
package/types/client.d.ts
CHANGED
|
@@ -964,6 +964,13 @@ export function createApiClient(options: {
|
|
|
964
964
|
data: any;
|
|
965
965
|
headers: any;
|
|
966
966
|
}) => any;
|
|
967
|
+
update: ({ token, jwtToken, data, routeId, headers }: {
|
|
968
|
+
token: any;
|
|
969
|
+
jwtToken: any;
|
|
970
|
+
data: any;
|
|
971
|
+
routeId: any;
|
|
972
|
+
headers: any;
|
|
973
|
+
}) => any;
|
|
967
974
|
fareTables: {
|
|
968
975
|
all({ token, query, headers }: {
|
|
969
976
|
token: any;
|
|
@@ -34,6 +34,13 @@ declare function routesFactory({ client, internalAuthTokenProvider }: {
|
|
|
34
34
|
data: any;
|
|
35
35
|
headers: any;
|
|
36
36
|
}) => any;
|
|
37
|
+
update: ({ token, jwtToken, data, routeId, headers }: {
|
|
38
|
+
token: any;
|
|
39
|
+
jwtToken: any;
|
|
40
|
+
data: any;
|
|
41
|
+
routeId: any;
|
|
42
|
+
headers: any;
|
|
43
|
+
}) => any;
|
|
37
44
|
fareTables: {
|
|
38
45
|
all({ token, query, headers }: {
|
|
39
46
|
token: any;
|
|
@@ -918,6 +918,13 @@ declare const _exports: {
|
|
|
918
918
|
data: any;
|
|
919
919
|
headers: any;
|
|
920
920
|
}) => any;
|
|
921
|
+
update: ({ token, jwtToken, data, routeId, headers }: {
|
|
922
|
+
token: any;
|
|
923
|
+
jwtToken: any;
|
|
924
|
+
data: any;
|
|
925
|
+
routeId: any;
|
|
926
|
+
headers: any;
|
|
927
|
+
}) => any;
|
|
921
928
|
fareTables: {
|
|
922
929
|
all({ token, query, headers }: {
|
|
923
930
|
token: any;
|