btrz-api-client 5.160.0 → 5.162.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.
- package/lib/client-standalone-min.js +3 -3
- package/lib/endpoints/accounts/twilio-settings.js +1 -1
- package/lib/endpoints/inventory/routes.js +20 -1
- package/package.json +1 -1
- package/src/endpoints/accounts/twilio-settings.js +1 -1
- package/src/endpoints/inventory/routes.js +14 -1
- package/test/endpoints/inventory/routes.test.js +11 -0
- package/types/client.d.ts +11 -2
- package/types/endpoints/inventory/routes.d.ts +9 -0
- package/types/initializedClient.d.ts +10 -1
|
@@ -16,7 +16,7 @@ function twilioSettingsFactory(_ref) {
|
|
|
16
16
|
return client({
|
|
17
17
|
url: "/twilio-settings",
|
|
18
18
|
params: query,
|
|
19
|
-
headers: authorizationHeaders({ token: token, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
19
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -131,6 +131,24 @@ function routesFactory(_ref) {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
+
var stops = {
|
|
135
|
+
create: function create(_ref10) {
|
|
136
|
+
var token = _ref10.token,
|
|
137
|
+
jwtToken = _ref10.jwtToken,
|
|
138
|
+
routeId = _ref10.routeId,
|
|
139
|
+
stop = _ref10.stop,
|
|
140
|
+
headers = _ref10.headers;
|
|
141
|
+
|
|
142
|
+
return client({
|
|
143
|
+
url: "/routes/" + routeId + "/stops",
|
|
144
|
+
method: "post",
|
|
145
|
+
headers: authorizationHeaders({
|
|
146
|
+
token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
|
|
147
|
+
}),
|
|
148
|
+
data: stop
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
};
|
|
134
152
|
|
|
135
153
|
return {
|
|
136
154
|
get: get,
|
|
@@ -138,7 +156,8 @@ function routesFactory(_ref) {
|
|
|
138
156
|
all: all,
|
|
139
157
|
stations: stations,
|
|
140
158
|
create: create,
|
|
141
|
-
fareTables: fareTables
|
|
159
|
+
fareTables: fareTables,
|
|
160
|
+
stops: stops
|
|
142
161
|
};
|
|
143
162
|
}
|
|
144
163
|
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ function twilioSettingsFactory({client, internalAuthTokenProvider}) {
|
|
|
7
7
|
return client({
|
|
8
8
|
url: "/twilio-settings",
|
|
9
9
|
params: query,
|
|
10
|
-
headers: authorizationHeaders({token, internalAuthTokenProvider, headers})
|
|
10
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -86,6 +86,18 @@ function routesFactory({ client, internalAuthTokenProvider }) {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
+
const stops = {
|
|
90
|
+
create({token, jwtToken, routeId, stop, headers}) {
|
|
91
|
+
return client({
|
|
92
|
+
url: `/routes/${routeId}/stops`,
|
|
93
|
+
method: "post",
|
|
94
|
+
headers: authorizationHeaders({
|
|
95
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
96
|
+
}),
|
|
97
|
+
data: stop
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
89
101
|
|
|
90
102
|
return {
|
|
91
103
|
get,
|
|
@@ -93,7 +105,8 @@ function routesFactory({ client, internalAuthTokenProvider }) {
|
|
|
93
105
|
all,
|
|
94
106
|
stations,
|
|
95
107
|
create,
|
|
96
|
-
fareTables
|
|
108
|
+
fareTables,
|
|
109
|
+
stops
|
|
97
110
|
};
|
|
98
111
|
}
|
|
99
112
|
|
|
@@ -72,4 +72,15 @@ describe("inventory/route", () => {
|
|
|
72
72
|
jwtToken, token, routeId, fareTableId, fareTable
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
|
+
|
|
76
|
+
it("should create a stop", () => {
|
|
77
|
+
const routeId = "11";
|
|
78
|
+
const stop = {stopId: "22"};
|
|
79
|
+
axiosMock.onPost(`/routes/${routeId}/stops`).reply(expectRequest({
|
|
80
|
+
statusCode: 200, token, jwtToken
|
|
81
|
+
}));
|
|
82
|
+
return api.inventory.routes.stops.create({
|
|
83
|
+
token, jwtToken, routeId, stop
|
|
84
|
+
});
|
|
85
|
+
});
|
|
75
86
|
});
|
package/types/client.d.ts
CHANGED
|
@@ -965,6 +965,15 @@ export function createApiClient(options: {
|
|
|
965
965
|
headers: any;
|
|
966
966
|
}): any;
|
|
967
967
|
};
|
|
968
|
+
stops: {
|
|
969
|
+
create({ token, jwtToken, routeId, stop, headers }: {
|
|
970
|
+
token: any;
|
|
971
|
+
jwtToken: any;
|
|
972
|
+
routeId: any;
|
|
973
|
+
stop: any;
|
|
974
|
+
headers: any;
|
|
975
|
+
}): any;
|
|
976
|
+
};
|
|
968
977
|
};
|
|
969
978
|
bareRoutes: {
|
|
970
979
|
all: ({ token, query, headers }: {
|
|
@@ -2649,7 +2658,7 @@ export function createApiClient(options: {
|
|
|
2649
2658
|
create: ({ token, jwtToken, cancelData, headers }: {
|
|
2650
2659
|
token: string;
|
|
2651
2660
|
jwtToken: string;
|
|
2652
|
-
cancelData:
|
|
2661
|
+
cancelData: CancelSetData;
|
|
2653
2662
|
headers: any;
|
|
2654
2663
|
}) => Promise<any>;
|
|
2655
2664
|
};
|
|
@@ -3240,7 +3249,7 @@ export function createApiClient(options: {
|
|
|
3240
3249
|
token: any;
|
|
3241
3250
|
jwtToken: any;
|
|
3242
3251
|
headers: any;
|
|
3243
|
-
}): any;
|
|
3252
|
+
}): any;
|
|
3244
3253
|
update({ vehicleAssignmentId, data, token, jwtToken, headers }: {
|
|
3245
3254
|
vehicleAssignmentId: any;
|
|
3246
3255
|
data: any;
|
|
@@ -56,4 +56,13 @@ declare function routesFactory({ client, internalAuthTokenProvider }: {
|
|
|
56
56
|
headers: any;
|
|
57
57
|
}): any;
|
|
58
58
|
};
|
|
59
|
+
stops: {
|
|
60
|
+
create({ token, jwtToken, routeId, stop, headers }: {
|
|
61
|
+
token: any;
|
|
62
|
+
jwtToken: any;
|
|
63
|
+
routeId: any;
|
|
64
|
+
stop: any;
|
|
65
|
+
headers: any;
|
|
66
|
+
}): any;
|
|
67
|
+
};
|
|
59
68
|
};
|
|
@@ -919,6 +919,15 @@ declare const _exports: {
|
|
|
919
919
|
headers: any;
|
|
920
920
|
}): any;
|
|
921
921
|
};
|
|
922
|
+
stops: {
|
|
923
|
+
create({ token, jwtToken, routeId, stop, headers }: {
|
|
924
|
+
token: any;
|
|
925
|
+
jwtToken: any;
|
|
926
|
+
routeId: any;
|
|
927
|
+
stop: any;
|
|
928
|
+
headers: any;
|
|
929
|
+
}): any;
|
|
930
|
+
};
|
|
922
931
|
};
|
|
923
932
|
bareRoutes: {
|
|
924
933
|
all: ({ token, query, headers }: {
|
|
@@ -2603,7 +2612,7 @@ declare const _exports: {
|
|
|
2603
2612
|
create: ({ token, jwtToken, cancelData, headers }: {
|
|
2604
2613
|
token: string;
|
|
2605
2614
|
jwtToken: string;
|
|
2606
|
-
cancelData:
|
|
2615
|
+
cancelData: CancelSetData;
|
|
2607
2616
|
headers: any;
|
|
2608
2617
|
}) => Promise<any>;
|
|
2609
2618
|
};
|