Skip to content

Commit 52faf42

Browse files
committed
Some refactoring
1 parent 28c8fcb commit 52faf42

80 files changed

Lines changed: 3582 additions & 3054 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ jobs:
1515
registry-url: 'https://registry.npmjs.org'
1616
- run: npm ci
1717
- run: npm run build
18+
- run: npm run lint
1819
- run: npm run test
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import {sdk} from "../../index";
2+
3+
export function register() {
4+
return sdk.registerConfigDefinitions(
5+
{
6+
identifier: "auth_url",
7+
type: "STRING",
8+
defaultValue: "https://api.gls-group.net/oauth2/v2/token",
9+
name: [
10+
{
11+
code: "en-US",
12+
content: "The Auth API url"
13+
}
14+
],
15+
description: [
16+
{
17+
code: "en-US",
18+
content: "The url of the Auth api ending in /token."
19+
}
20+
],
21+
linkedDataTypes: ["STRING"],
22+
},
23+
)
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {sdk} from "../../index";
2+
3+
export function register() {
4+
return sdk.registerConfigDefinitions(
5+
{
6+
identifier: "client_id",
7+
type: "STRING",
8+
name: [
9+
{
10+
code: "en-US",
11+
content: "Client ID"
12+
}
13+
],
14+
description: [
15+
{
16+
code: "en-US",
17+
content: "The client id to authenticate with the GLS API"
18+
}
19+
],
20+
linkedDataTypes: ["STRING"],
21+
},
22+
)
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {sdk} from "../../index";
2+
3+
export function register() {
4+
return sdk.registerConfigDefinitions(
5+
{
6+
identifier: "client_secret",
7+
type: "STRING",
8+
name: [
9+
{
10+
code: "en-US",
11+
content: "Client secret"
12+
}
13+
],
14+
description: [
15+
{
16+
code: "en-US",
17+
content: "The client secret to authenticate with the GLS API"
18+
}
19+
],
20+
linkedDataTypes: ["STRING"],
21+
},
22+
)
23+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import {sdk} from "../../index";
2+
3+
export function register() {
4+
return sdk.registerConfigDefinitions(
5+
{
6+
identifier: "contact_id",
7+
type: "STRING",
8+
name: [
9+
{
10+
code: "en-US",
11+
content: "Contact ID"
12+
}
13+
],
14+
description: [
15+
{
16+
code: "en-US",
17+
content: "The contact id identifying the GLS account to use for the API requests. This contact must be linked to a GLS contract with API access."
18+
}
19+
],
20+
defaultValue: "",
21+
linkedDataTypes: ["STRING"],
22+
},
23+
)
24+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {sdk} from "../../index";
2+
3+
export function register() {
4+
return sdk.registerConfigDefinitions(
5+
{
6+
identifier: "default_shipper",
7+
type: "GLS_SHIPPER",
8+
name: [
9+
{
10+
code: "en-US",
11+
content: "Shipper"
12+
}
13+
],
14+
description: [
15+
{
16+
code: "en-US",
17+
content: "The shipper information to use for the shipments. This will be used if the shipper information is not provided in the shipment data."
18+
}
19+
],
20+
linkedDataTypes: ["GLS_SHIPPER"]
21+
}
22+
)
23+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import {sdk} from "../../index";
2+
3+
export function register() {
4+
return sdk.registerConfigDefinitions(
5+
{
6+
identifier: "ship_it_api_url",
7+
type: "STRING",
8+
defaultValue: " https://api.gls-group.net/shipit-farm/v1/backend/rs",
9+
name: [
10+
{
11+
code: "en-US",
12+
content: "The ShipIt API url"
13+
}
14+
],
15+
description: [
16+
{
17+
code: "en-US",
18+
content: "The url of the GLS ShipIt API."
19+
}
20+
],
21+
linkedDataTypes: ["STRING"],
22+
},
23+
)
24+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import {sdk, types} from "../../index";
2+
3+
export function register() {
4+
return sdk.registerDataTypes(
5+
{
6+
identifier: "GLS_ADDRESS",
7+
type: types.get("GLS_ADDRESS")!,
8+
name: [
9+
{
10+
code: "en-US",
11+
content: "Address"
12+
}
13+
],
14+
displayMessage: [
15+
{
16+
code: "en-US",
17+
content: "Address"
18+
}
19+
]
20+
},
21+
)
22+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import {sdk, types} from "../../index";
2+
3+
export function register() {
4+
return sdk.registerDataTypes(
5+
{
6+
identifier: "GLS_ALLOWED_SERVICES_REQUEST_DATA",
7+
type: types.get("GLS_ALLOWED_SERVICES_REQUEST_DATA")!,
8+
name: [
9+
{
10+
code: "en-US",
11+
content: "Allowed services request data"
12+
}
13+
],
14+
displayMessage: [
15+
{
16+
code: "en-US",
17+
content: "Allowed services request data"
18+
}
19+
]
20+
},
21+
{
22+
identifier: "GLS_ALLOWED_SERVICES_RESPONSE_DATA",
23+
type: types.get("GLS_ALLOWED_SERVICES_RESPONSE_DATA")!,
24+
name: [
25+
{
26+
code: "en-US",
27+
content: "Allowed services response data"
28+
}
29+
],
30+
displayMessage: [
31+
{
32+
code: "en-US",
33+
content: "Allowed services response data"
34+
}
35+
]
36+
},
37+
38+
)
39+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import {sdk, types} from "../../index";
2+
3+
export function register() {
4+
return sdk.registerDataTypes(
5+
{
6+
identifier: "GLS_CANCEL_SHIPMENT_REQUEST_DATA",
7+
type: types.get("GLS_CANCEL_SHIPMENT_REQUEST_DATA")!,
8+
name: [
9+
{
10+
code: "en-US",
11+
content: "Cancel shipment request data"
12+
}
13+
],
14+
displayMessage: [
15+
{
16+
code: "en-US",
17+
content: "Cancel shipment request data"
18+
}
19+
]
20+
},
21+
{
22+
identifier: "GLS_CANCEL_SHIPMENT_RESPONSE_DATA",
23+
type: types.get("GLS_CANCEL_SHIPMENT_RESPONSE_DATA")!,
24+
name: [
25+
{
26+
code: "en-US",
27+
content: "Cancel shipment response data"
28+
}
29+
],
30+
displayMessage: [
31+
{
32+
code: "en-US",
33+
content: "Cancel shipment response data"
34+
}
35+
]
36+
}
37+
)
38+
}

0 commit comments

Comments
 (0)