btrz-api-client 5.84.0 → 5.86.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 +1 -1
- package/lib/client.js +1 -0
- package/lib/endpoints/invoices/dlink.js +21 -1
- package/lib/endpoints/invoices/gti.js +21 -1
- package/lib/endpoints/invoices/infile.js +21 -1
- package/lib/endpoints/invoices/system.js +21 -1
- package/lib/endpoints/operations/parcels_manifests.js +75 -0
- package/package.json +1 -1
- package/src/client.js +1 -0
- package/src/endpoints/invoices/dlink.js +14 -1
- package/src/endpoints/invoices/gti.js +14 -1
- package/src/endpoints/invoices/infile.js +14 -1
- package/src/endpoints/invoices/system.js +14 -1
- package/src/endpoints/operations/parcels_manifests.js +57 -0
- package/test/endpoints/invoices/dlink.test.js +10 -1
- package/test/endpoints/invoices/gti.test.js +10 -1
- package/test/endpoints/invoices/infile.test.js +9 -0
- package/test/endpoints/invoices/system.test.js +9 -0
- package/test/endpoints/operations/parcel_manifests.test.js +49 -0
- package/types/client.d.ts +43 -0
- package/types/endpoints/invoices/dlink.d.ts +7 -0
- package/types/endpoints/invoices/gti.d.ts +7 -0
- package/types/endpoints/invoices/infile.d.ts +7 -0
- package/types/endpoints/invoices/system.d.ts +7 -0
- package/types/endpoints/operations/parcels_manifests.d.ts +19 -0
- package/types/initializedClient.d.ts +43 -0
package/lib/client.js
CHANGED
|
@@ -269,6 +269,7 @@ function createOperations(_ref6) {
|
|
|
269
269
|
manifestLegForTickets: require("./endpoints/operations/manifest_leg_for_tickets.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
270
270
|
passengerCheckInInfo: require("./endpoints/operations/passenger_check_in_info.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
271
271
|
vouchers: require("./endpoints/operations/vouchers.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
272
|
+
parcelManifests: require("./endpoints/operations/parcels_manifests.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
272
273
|
__test: {
|
|
273
274
|
client: client
|
|
274
275
|
}
|
|
@@ -24,8 +24,28 @@ function dlinkFactory(_ref) {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
function validateCreate(_ref3) {
|
|
28
|
+
var token = _ref3.token,
|
|
29
|
+
jwtToken = _ref3.jwtToken,
|
|
30
|
+
data = _ref3.data,
|
|
31
|
+
_ref3$query = _ref3.query,
|
|
32
|
+
query = _ref3$query === undefined ? {} : _ref3$query,
|
|
33
|
+
headers = _ref3.headers;
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line no-param-reassign
|
|
36
|
+
query.onlyValidateRequest = true;
|
|
37
|
+
return client({
|
|
38
|
+
url: "/dlink",
|
|
39
|
+
method: "post",
|
|
40
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
41
|
+
params: query,
|
|
42
|
+
data: data
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
27
46
|
return {
|
|
28
|
-
create: create
|
|
47
|
+
create: create,
|
|
48
|
+
validateCreate: validateCreate
|
|
29
49
|
};
|
|
30
50
|
}
|
|
31
51
|
|
|
@@ -24,8 +24,28 @@ function gtiFactory(_ref) {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
function validateCreate(_ref3) {
|
|
28
|
+
var token = _ref3.token,
|
|
29
|
+
jwtToken = _ref3.jwtToken,
|
|
30
|
+
data = _ref3.data,
|
|
31
|
+
_ref3$query = _ref3.query,
|
|
32
|
+
query = _ref3$query === undefined ? {} : _ref3$query,
|
|
33
|
+
headers = _ref3.headers;
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line no-param-reassign
|
|
36
|
+
query.onlyValidateRequest = true;
|
|
37
|
+
return client({
|
|
38
|
+
url: "/gti",
|
|
39
|
+
method: "post",
|
|
40
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
41
|
+
params: query,
|
|
42
|
+
data: data
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
27
46
|
return {
|
|
28
|
-
create: create
|
|
47
|
+
create: create,
|
|
48
|
+
validateCreate: validateCreate
|
|
29
49
|
};
|
|
30
50
|
}
|
|
31
51
|
|
|
@@ -24,8 +24,28 @@ function infileFactory(_ref) {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
function validateCreate(_ref3) {
|
|
28
|
+
var token = _ref3.token,
|
|
29
|
+
jwtToken = _ref3.jwtToken,
|
|
30
|
+
data = _ref3.data,
|
|
31
|
+
_ref3$query = _ref3.query,
|
|
32
|
+
query = _ref3$query === undefined ? {} : _ref3$query,
|
|
33
|
+
headers = _ref3.headers;
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line no-param-reassign
|
|
36
|
+
query.onlyValidateRequest = true;
|
|
37
|
+
return client({
|
|
38
|
+
url: "/infile",
|
|
39
|
+
method: "post",
|
|
40
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
41
|
+
params: query,
|
|
42
|
+
data: data
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
27
46
|
return {
|
|
28
|
-
create: create
|
|
47
|
+
create: create,
|
|
48
|
+
validateCreate: validateCreate
|
|
29
49
|
};
|
|
30
50
|
}
|
|
31
51
|
|
|
@@ -24,8 +24,28 @@ function systemFactory(_ref) {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
function validateCreate(_ref3) {
|
|
28
|
+
var token = _ref3.token,
|
|
29
|
+
jwtToken = _ref3.jwtToken,
|
|
30
|
+
data = _ref3.data,
|
|
31
|
+
_ref3$query = _ref3.query,
|
|
32
|
+
query = _ref3$query === undefined ? {} : _ref3$query,
|
|
33
|
+
headers = _ref3.headers;
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line no-param-reassign
|
|
36
|
+
query.onlyValidateRequest = true;
|
|
37
|
+
return client({
|
|
38
|
+
url: "/system",
|
|
39
|
+
method: "post",
|
|
40
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
41
|
+
params: query,
|
|
42
|
+
data: data
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
27
46
|
return {
|
|
28
|
-
create: create
|
|
47
|
+
create: create,
|
|
48
|
+
validateCreate: validateCreate
|
|
29
49
|
};
|
|
30
50
|
}
|
|
31
51
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _require = require("./../endpoints_helpers.js"),
|
|
4
|
+
authorizationHeaders = _require.authorizationHeaders;
|
|
5
|
+
|
|
6
|
+
function parcelsManifestsFactory(_ref) {
|
|
7
|
+
var client = _ref.client,
|
|
8
|
+
internalAuthTokenProvider = _ref.internalAuthTokenProvider;
|
|
9
|
+
|
|
10
|
+
function all(_ref2) {
|
|
11
|
+
var token = _ref2.token,
|
|
12
|
+
jwtToken = _ref2.jwtToken,
|
|
13
|
+
query = _ref2.query,
|
|
14
|
+
headers = _ref2.headers;
|
|
15
|
+
|
|
16
|
+
return client({
|
|
17
|
+
url: "/parcels-manifests",
|
|
18
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
19
|
+
params: query
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// function get({token, jwtToken, id, headers}) {
|
|
24
|
+
// return client({
|
|
25
|
+
// url: `/passenger-check-in-info/${id}`,
|
|
26
|
+
// method: "get",
|
|
27
|
+
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
28
|
+
// });
|
|
29
|
+
// }
|
|
30
|
+
|
|
31
|
+
// function update({token, jwtToken, id, data, headers, query}) {
|
|
32
|
+
// return client({
|
|
33
|
+
// url: `/passenger-check-in-info/${id}`,
|
|
34
|
+
// method: "put",
|
|
35
|
+
// params: query,
|
|
36
|
+
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
37
|
+
// data
|
|
38
|
+
// });
|
|
39
|
+
// }
|
|
40
|
+
|
|
41
|
+
// function remove({token, jwtToken, id, headers}) {
|
|
42
|
+
// return client({
|
|
43
|
+
// url: `/passenger-check-in-info/${id}`,
|
|
44
|
+
// method: "delete",
|
|
45
|
+
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
46
|
+
// });
|
|
47
|
+
// }
|
|
48
|
+
|
|
49
|
+
function create(_ref3) {
|
|
50
|
+
var token = _ref3.token,
|
|
51
|
+
jwtToken = _ref3.jwtToken,
|
|
52
|
+
_ref3$query = _ref3.query,
|
|
53
|
+
query = _ref3$query === undefined ? {} : _ref3$query,
|
|
54
|
+
data = _ref3.data,
|
|
55
|
+
headers = _ref3.headers;
|
|
56
|
+
|
|
57
|
+
return client({
|
|
58
|
+
url: "/parcels-manifests",
|
|
59
|
+
method: "post",
|
|
60
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
61
|
+
params: query,
|
|
62
|
+
data: data
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
all: all,
|
|
68
|
+
// get,
|
|
69
|
+
// update,
|
|
70
|
+
// remove,
|
|
71
|
+
create: create
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
module.exports = parcelsManifestsFactory;
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -221,6 +221,7 @@ function createOperations({baseURL, headers, timeout, overrideFn, internalAuthTo
|
|
|
221
221
|
manifestLegForTickets: require("./endpoints/operations/manifest_leg_for_tickets.js")({client, internalAuthTokenProvider}),
|
|
222
222
|
passengerCheckInInfo: require("./endpoints/operations/passenger_check_in_info.js")({client, internalAuthTokenProvider}),
|
|
223
223
|
vouchers: require("./endpoints/operations/vouchers.js")({client, internalAuthTokenProvider}),
|
|
224
|
+
parcelManifests: require("./endpoints/operations/parcels_manifests.js")({client, internalAuthTokenProvider}),
|
|
224
225
|
__test: {
|
|
225
226
|
client
|
|
226
227
|
}
|
|
@@ -11,8 +11,21 @@ function dlinkFactory({client, internalAuthTokenProvider}) {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
function validateCreate({token, jwtToken, data, query = {}, headers}) {
|
|
15
|
+
// eslint-disable-next-line no-param-reassign
|
|
16
|
+
query.onlyValidateRequest = true;
|
|
17
|
+
return client({
|
|
18
|
+
url: "/dlink",
|
|
19
|
+
method: "post",
|
|
20
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
21
|
+
params: query,
|
|
22
|
+
data
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
return {
|
|
15
|
-
create
|
|
27
|
+
create,
|
|
28
|
+
validateCreate
|
|
16
29
|
};
|
|
17
30
|
}
|
|
18
31
|
|
|
@@ -11,8 +11,21 @@ function gtiFactory({client, internalAuthTokenProvider}) {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
function validateCreate({token, jwtToken, data, query = {}, headers}) {
|
|
15
|
+
// eslint-disable-next-line no-param-reassign
|
|
16
|
+
query.onlyValidateRequest = true;
|
|
17
|
+
return client({
|
|
18
|
+
url: "/gti",
|
|
19
|
+
method: "post",
|
|
20
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
21
|
+
params: query,
|
|
22
|
+
data
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
return {
|
|
15
|
-
create
|
|
27
|
+
create,
|
|
28
|
+
validateCreate
|
|
16
29
|
};
|
|
17
30
|
}
|
|
18
31
|
|
|
@@ -11,8 +11,21 @@ function infileFactory({client, internalAuthTokenProvider}) {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
function validateCreate({token, jwtToken, data, query = {}, headers}) {
|
|
15
|
+
// eslint-disable-next-line no-param-reassign
|
|
16
|
+
query.onlyValidateRequest = true;
|
|
17
|
+
return client({
|
|
18
|
+
url: "/infile",
|
|
19
|
+
method: "post",
|
|
20
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
21
|
+
params: query,
|
|
22
|
+
data
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
return {
|
|
15
|
-
create
|
|
27
|
+
create,
|
|
28
|
+
validateCreate
|
|
16
29
|
};
|
|
17
30
|
}
|
|
18
31
|
|
|
@@ -11,8 +11,21 @@ function systemFactory({client, internalAuthTokenProvider}) {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
function validateCreate({token, jwtToken, data, query = {}, headers}) {
|
|
15
|
+
// eslint-disable-next-line no-param-reassign
|
|
16
|
+
query.onlyValidateRequest = true;
|
|
17
|
+
return client({
|
|
18
|
+
url: "/system",
|
|
19
|
+
method: "post",
|
|
20
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
21
|
+
params: query,
|
|
22
|
+
data
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
return {
|
|
15
|
-
create
|
|
27
|
+
create,
|
|
28
|
+
validateCreate
|
|
16
29
|
};
|
|
17
30
|
}
|
|
18
31
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const {authorizationHeaders} = require("./../endpoints_helpers.js");
|
|
2
|
+
|
|
3
|
+
function parcelsManifestsFactory({client, internalAuthTokenProvider}) {
|
|
4
|
+
function all({token, jwtToken, query, headers}) {
|
|
5
|
+
return client({
|
|
6
|
+
url: "/parcels-manifests",
|
|
7
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
8
|
+
params: query
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// function get({token, jwtToken, id, headers}) {
|
|
13
|
+
// return client({
|
|
14
|
+
// url: `/passenger-check-in-info/${id}`,
|
|
15
|
+
// method: "get",
|
|
16
|
+
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
17
|
+
// });
|
|
18
|
+
// }
|
|
19
|
+
|
|
20
|
+
// function update({token, jwtToken, id, data, headers, query}) {
|
|
21
|
+
// return client({
|
|
22
|
+
// url: `/passenger-check-in-info/${id}`,
|
|
23
|
+
// method: "put",
|
|
24
|
+
// params: query,
|
|
25
|
+
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
26
|
+
// data
|
|
27
|
+
// });
|
|
28
|
+
// }
|
|
29
|
+
|
|
30
|
+
// function remove({token, jwtToken, id, headers}) {
|
|
31
|
+
// return client({
|
|
32
|
+
// url: `/passenger-check-in-info/${id}`,
|
|
33
|
+
// method: "delete",
|
|
34
|
+
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
35
|
+
// });
|
|
36
|
+
// }
|
|
37
|
+
|
|
38
|
+
function create({token, jwtToken, query = {}, data, headers}) {
|
|
39
|
+
return client({
|
|
40
|
+
url: "/parcels-manifests",
|
|
41
|
+
method: "post",
|
|
42
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
43
|
+
params: query,
|
|
44
|
+
data
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
all,
|
|
50
|
+
// get,
|
|
51
|
+
// update,
|
|
52
|
+
// remove,
|
|
53
|
+
create
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
module.exports = parcelsManifestsFactory;
|
|
@@ -9,7 +9,7 @@ describe("invoices/dlink", () => {
|
|
|
9
9
|
axiosMock.restore();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
it("should create
|
|
12
|
+
it("should create a dlink invoice", () => {
|
|
13
13
|
axiosMock.onPost("/dlink").reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
14
14
|
return api.invoices.dlink.create({
|
|
15
15
|
jwtToken,
|
|
@@ -19,4 +19,13 @@ describe("invoices/dlink", () => {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
|
+
|
|
23
|
+
it("should validate the payload for create a dlink invoice", () => {
|
|
24
|
+
axiosMock.onPost("/dlink?onlyValidateRequest=true").reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
25
|
+
return api.invoices.dlink.validateCreate({
|
|
26
|
+
jwtToken,
|
|
27
|
+
token,
|
|
28
|
+
data: {}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
22
31
|
});
|
|
@@ -9,7 +9,7 @@ describe("invoices/gti", () => {
|
|
|
9
9
|
axiosMock.restore();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
it("should create
|
|
12
|
+
it("should create a gti invoice", () => {
|
|
13
13
|
axiosMock.onPost("/gti").reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
14
14
|
return api.invoices.gti.create({
|
|
15
15
|
jwtToken,
|
|
@@ -19,4 +19,13 @@ describe("invoices/gti", () => {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
|
+
|
|
23
|
+
it("should validate the payload for create a gti invoice", () => {
|
|
24
|
+
axiosMock.onPost("/gti?onlyValidateRequest=true").reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
25
|
+
return api.invoices.gti.validateCreate({
|
|
26
|
+
jwtToken,
|
|
27
|
+
token,
|
|
28
|
+
data: {}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
22
31
|
});
|
|
@@ -19,4 +19,13 @@ describe("invoices/infile", () => {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
|
+
|
|
23
|
+
it("should validate the payload for create a infile invoice", () => {
|
|
24
|
+
axiosMock.onPost("/infile?onlyValidateRequest=true").reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
25
|
+
return api.invoices.infile.validateCreate({
|
|
26
|
+
jwtToken,
|
|
27
|
+
token,
|
|
28
|
+
data: {}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
22
31
|
});
|
|
@@ -19,4 +19,13 @@ describe("invoices/system", () => {
|
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
|
+
|
|
23
|
+
it("should validate the payload for create a system invoice", () => {
|
|
24
|
+
axiosMock.onPost("/system?onlyValidateRequest=true").reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
25
|
+
return api.invoices.system.validateCreate({
|
|
26
|
+
jwtToken,
|
|
27
|
+
token,
|
|
28
|
+
data: {}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
22
31
|
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const {axiosMock, expectRequest} = require("./../../test-helpers");
|
|
2
|
+
const api = require("./../../../src/client").createApiClient({baseURL: "http://test.com"});
|
|
3
|
+
|
|
4
|
+
describe("operations/parcels-manifests", () => {
|
|
5
|
+
const token = "I owe you a token";
|
|
6
|
+
const jwtToken = "I owe you a JWT token";
|
|
7
|
+
|
|
8
|
+
afterEach(() => {
|
|
9
|
+
axiosMock.restore();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it("should list providers", () => {
|
|
13
|
+
const query = {externalId: "123123123123"};
|
|
14
|
+
axiosMock.onGet("/parcels-manifests").reply(expectRequest({statusCode: 200, token, jwtToken, query}));
|
|
15
|
+
return api.operations.parcelManifests.all({token, jwtToken, query});
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
// it("should return a single parcels-manifests", () => {
|
|
20
|
+
// const id = "12312312312312";
|
|
21
|
+
// axiosMock.onGet(`/parcels-manifests/${id}`)
|
|
22
|
+
// .reply(expectRequest({
|
|
23
|
+
// statusCode: 200,
|
|
24
|
+
// token,
|
|
25
|
+
// jwtToken
|
|
26
|
+
// }));
|
|
27
|
+
// return api.operations.passengerCheckInInfo.get({token, jwtToken, query: {}, id});
|
|
28
|
+
// });
|
|
29
|
+
|
|
30
|
+
it("should create a parcels-manifests", () => {
|
|
31
|
+
axiosMock.onPost("/parcels-manifests").reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
32
|
+
return api.operations.parcelManifests.create({
|
|
33
|
+
jwtToken,
|
|
34
|
+
token,
|
|
35
|
+
data: {
|
|
36
|
+
externalId: "123123123213"
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// it("should update a parcels-manifests", () => {
|
|
42
|
+
// const passengerCheckInInfoId = "123123123123";
|
|
43
|
+
// const data = {
|
|
44
|
+
// information: {firstName: "name"}
|
|
45
|
+
// };
|
|
46
|
+
// axiosMock.onPut(`/parcels-manifests/${passengerCheckInInfoId}`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
47
|
+
// return api.operations.passengerCheckInInfo.update({jwtToken, token, id: passengerCheckInInfoId, data});
|
|
48
|
+
// });
|
|
49
|
+
});
|
package/types/client.d.ts
CHANGED
|
@@ -2684,6 +2684,21 @@ export function createApiClient(options: {
|
|
|
2684
2684
|
voucher?: {};
|
|
2685
2685
|
}) => any;
|
|
2686
2686
|
};
|
|
2687
|
+
parcelManifests: {
|
|
2688
|
+
all: ({ token, jwtToken, query, headers }: {
|
|
2689
|
+
token: any;
|
|
2690
|
+
jwtToken: any;
|
|
2691
|
+
query: any;
|
|
2692
|
+
headers: any;
|
|
2693
|
+
}) => any;
|
|
2694
|
+
create: ({ token, jwtToken, query, data, headers }: {
|
|
2695
|
+
token: any;
|
|
2696
|
+
jwtToken: any;
|
|
2697
|
+
query?: {};
|
|
2698
|
+
data: any;
|
|
2699
|
+
headers: any;
|
|
2700
|
+
}) => any;
|
|
2701
|
+
};
|
|
2687
2702
|
__test: {
|
|
2688
2703
|
client: axios.AxiosInstance;
|
|
2689
2704
|
};
|
|
@@ -3298,6 +3313,13 @@ export function createApiClient(options: {
|
|
|
3298
3313
|
query?: {};
|
|
3299
3314
|
headers: any;
|
|
3300
3315
|
}) => any;
|
|
3316
|
+
validateCreate: ({ token, jwtToken, data, query, headers }: {
|
|
3317
|
+
token: any;
|
|
3318
|
+
jwtToken: any;
|
|
3319
|
+
data: any;
|
|
3320
|
+
query?: {};
|
|
3321
|
+
headers: any;
|
|
3322
|
+
}) => any;
|
|
3301
3323
|
};
|
|
3302
3324
|
system: {
|
|
3303
3325
|
create: ({ token, jwtToken, data, query, headers }: {
|
|
@@ -3307,6 +3329,13 @@ export function createApiClient(options: {
|
|
|
3307
3329
|
query?: {};
|
|
3308
3330
|
headers: any;
|
|
3309
3331
|
}) => any;
|
|
3332
|
+
validateCreate: ({ token, jwtToken, data, query, headers }: {
|
|
3333
|
+
token: any;
|
|
3334
|
+
jwtToken: any;
|
|
3335
|
+
data: any;
|
|
3336
|
+
query?: {};
|
|
3337
|
+
headers: any;
|
|
3338
|
+
}) => any;
|
|
3310
3339
|
};
|
|
3311
3340
|
dlink: {
|
|
3312
3341
|
create: ({ token, jwtToken, data, query, headers }: {
|
|
@@ -3316,6 +3345,13 @@ export function createApiClient(options: {
|
|
|
3316
3345
|
query?: {};
|
|
3317
3346
|
headers: any;
|
|
3318
3347
|
}) => any;
|
|
3348
|
+
validateCreate: ({ token, jwtToken, data, query, headers }: {
|
|
3349
|
+
token: any;
|
|
3350
|
+
jwtToken: any;
|
|
3351
|
+
data: any;
|
|
3352
|
+
query?: {};
|
|
3353
|
+
headers: any;
|
|
3354
|
+
}) => any;
|
|
3319
3355
|
};
|
|
3320
3356
|
gti: {
|
|
3321
3357
|
create: ({ token, jwtToken, data, query, headers }: {
|
|
@@ -3325,6 +3361,13 @@ export function createApiClient(options: {
|
|
|
3325
3361
|
query?: {};
|
|
3326
3362
|
headers: any;
|
|
3327
3363
|
}) => any;
|
|
3364
|
+
validateCreate: ({ token, jwtToken, data, query, headers }: {
|
|
3365
|
+
token: any;
|
|
3366
|
+
jwtToken: any;
|
|
3367
|
+
data: any;
|
|
3368
|
+
query?: {};
|
|
3369
|
+
headers: any;
|
|
3370
|
+
}) => any;
|
|
3328
3371
|
};
|
|
3329
3372
|
pdfs: {
|
|
3330
3373
|
all: ({ token, jwtToken, query, responseType, headers }: {
|
|
@@ -10,4 +10,11 @@ declare function dlinkFactory({ client, internalAuthTokenProvider }: {
|
|
|
10
10
|
query?: {};
|
|
11
11
|
headers: any;
|
|
12
12
|
}) => any;
|
|
13
|
+
validateCreate: ({ token, jwtToken, data, query, headers }: {
|
|
14
|
+
token: any;
|
|
15
|
+
jwtToken: any;
|
|
16
|
+
data: any;
|
|
17
|
+
query?: {};
|
|
18
|
+
headers: any;
|
|
19
|
+
}) => any;
|
|
13
20
|
};
|
|
@@ -10,4 +10,11 @@ declare function gtiFactory({ client, internalAuthTokenProvider }: {
|
|
|
10
10
|
query?: {};
|
|
11
11
|
headers: any;
|
|
12
12
|
}) => any;
|
|
13
|
+
validateCreate: ({ token, jwtToken, data, query, headers }: {
|
|
14
|
+
token: any;
|
|
15
|
+
jwtToken: any;
|
|
16
|
+
data: any;
|
|
17
|
+
query?: {};
|
|
18
|
+
headers: any;
|
|
19
|
+
}) => any;
|
|
13
20
|
};
|
|
@@ -10,4 +10,11 @@ declare function infileFactory({ client, internalAuthTokenProvider }: {
|
|
|
10
10
|
query?: {};
|
|
11
11
|
headers: any;
|
|
12
12
|
}) => any;
|
|
13
|
+
validateCreate: ({ token, jwtToken, data, query, headers }: {
|
|
14
|
+
token: any;
|
|
15
|
+
jwtToken: any;
|
|
16
|
+
data: any;
|
|
17
|
+
query?: {};
|
|
18
|
+
headers: any;
|
|
19
|
+
}) => any;
|
|
13
20
|
};
|
|
@@ -10,4 +10,11 @@ declare function systemFactory({ client, internalAuthTokenProvider }: {
|
|
|
10
10
|
query?: {};
|
|
11
11
|
headers: any;
|
|
12
12
|
}) => any;
|
|
13
|
+
validateCreate: ({ token, jwtToken, data, query, headers }: {
|
|
14
|
+
token: any;
|
|
15
|
+
jwtToken: any;
|
|
16
|
+
data: any;
|
|
17
|
+
query?: {};
|
|
18
|
+
headers: any;
|
|
19
|
+
}) => any;
|
|
13
20
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export = parcelsManifestsFactory;
|
|
2
|
+
declare function parcelsManifestsFactory({ client, internalAuthTokenProvider }: {
|
|
3
|
+
client: any;
|
|
4
|
+
internalAuthTokenProvider: any;
|
|
5
|
+
}): {
|
|
6
|
+
all: ({ token, jwtToken, query, headers }: {
|
|
7
|
+
token: any;
|
|
8
|
+
jwtToken: any;
|
|
9
|
+
query: any;
|
|
10
|
+
headers: any;
|
|
11
|
+
}) => any;
|
|
12
|
+
create: ({ token, jwtToken, query, data, headers }: {
|
|
13
|
+
token: any;
|
|
14
|
+
jwtToken: any;
|
|
15
|
+
query?: {};
|
|
16
|
+
data: any;
|
|
17
|
+
headers: any;
|
|
18
|
+
}) => any;
|
|
19
|
+
};
|