Skip to content

Commit f97f4a2

Browse files
committed
Update docs to comply with the linter
1 parent 797eae1 commit f97f4a2

8 files changed

Lines changed: 141 additions & 134 deletions

File tree

docs/Actions/GLS/configs.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ title: Configuration
33
description: All configuration options for the GLS Action, including how to obtain credentials from the GLS Developer Portal.
44
---
55

6-
# GLS Action Configuration
7-
8-
The GLS action requires a few credentials to authenticate with the GLS ShipIT API. These are set as **configuration values** in the Hercules admin panel (not as environment variables).
6+
The GLS action requires a few credentials to authenticate with the GLS ShipIT API.
7+
These are set as **configuration values** in the Hercules admin panel (not as environment variables).
98

109
---
1110

@@ -20,15 +19,16 @@ The GLS action requires a few credentials to authenticate with the GLS ShipIT AP
2019
| `auth_url` | string | No | `https://api.gls-group.net/oauth2/v2/token` | GLS OAuth2 token endpoint — must end in `/token` |
2120
| `shipper` | GLS_SHIPPER | No || Default shipper address used when no shipper is provided in the shipment data |
2221

23-
> **`contact_id`:** This identifier is required for certain shipment operations (e.g. end-of-day reports and some services). It is issued by GLS support — contact them directly to request it.
22+
> **`contact_id`:** This identifier is required for certain shipment operations (e.g. end-of-day reports and some services).
23+
> It is issued by GLS support — contact them directly to request it.
2424
2525
---
2626

2727
## How to obtain your credentials
2828

2929
### Step 1 — Create a GLS Developer account
3030

31-
1. Go to [https://dev-portal.gls-group.net/get-started](https://dev-portal.gls-group.net/get-started)
31+
1. Go to <https://dev-portal.gls-group.net/get-started>
3232
2. Click **Sign In** and register a new account, or log in with an existing GLS account
3333
3. Complete the registration and verify your email address
3434

@@ -50,13 +50,15 @@ The GLS action requires a few credentials to authenticate with the GLS ShipIT AP
5050
5151
### Step 4 — Get your Contact ID (optional)
5252

53-
The `contact_id` is not available in the developer portal. You must contact **GLS support** directly and ask them to provide you with a Contact ID linked to your GLS contract.
53+
The `contact_id` is not available in the developer portal.
54+
You must contact **GLS support** directly and ask them to provide you with a Contact ID linked to your GLS contract.
5455

5556
---
5657

5758
## API endpoints
5859

59-
GLS provides different API endpoints depending on your region and environment. The defaults point to the global production API:
60+
GLS provides different API endpoints depending on your region and environment.
61+
The defaults point to the global production API:
6062

6163
| Setting | Default URL |
6264
|---------|-------------|
@@ -71,7 +73,7 @@ If you are using a regional or sandbox endpoint, update these values accordingly
7173

7274
The GLS Action authenticates using **OAuth2 client credentials**:
7375

74-
```
76+
```text
7577
GLS Action
7678
7779
├── POST {auth_url}
@@ -85,13 +87,16 @@ GLS Action
8587
Authorization: Bearer <access_token>
8688
```
8789

88-
Tokens are **cached** and automatically refreshed 60 seconds before they expire. You do not need to manage token lifecycle manually.
90+
Tokens are **cached** and automatically refreshed 60 seconds before they expire.
91+
You do not need to manage token lifecycle manually.
8992

9093
---
9194

9295
## Default shipper
9396

94-
The optional `shipper` config allows you to set a **default sender address** that is applied to all shipments when no shipper is explicitly provided in the shipment data. This is useful when all your shipments originate from the same address.
97+
The optional `shipper` config allows you to set a **default sender address** that is applied to all shipments when
98+
no shipper is explicitly provided in the shipment data.
99+
This is useful when all your shipments originate from the same address.
95100

96101
The value must be a valid `GLS_SHIPPER` object:
97102

docs/Actions/GLS/events.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@ title: Trigger
33
description: Events emitted by the GLS Action — what they are, how they trigger flows in Aquila, and what future events are planned.
44
---
55

6-
# GLS Action Events
6+
## GLS Action Events
77

8-
In the Hercules platform, **events** are notifications emitted **by an action** that trigger flows in Aquila. They are the opposite of functions: instead of a flow calling the action, the action pushes data to Aquila, which starts any flows that are listening for that event type.
8+
In the Hercules platform, **events** are notifications emitted **by an action** that trigger flows in Aquila.
9+
They are the opposite of functions: instead of a flow calling the action, the action pushes data to Aquila, which starts
10+
any flows that are listening for that event type.
911

1012
---
1113

1214
## Current status
1315

1416
> **The GLS Action does not currently emit any events.**
1517
>
16-
> The GLS action presently only exposes **functions** (called by flows) and registers **data types** and **configuration**. Event support — where the action proactively notifies Aquila of changes — is **planned for a future release**.
18+
> The GLS action presently only exposes **functions** (called by flows) and registers **data types** and **configuration**.
19+
> Event support — where the action proactively notifies Aquila of changes — is **planned for a future release**.
1720
18-
---
21+
---

docs/Actions/GLS/overview.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ description: Overview of the GLS ShipIT action — what it does, what you need t
44
icon: IconHome
55
---
66

7-
# GLS Action
8-
9-
The **GLS Action** integrates the [GLS ShipIT API](https://dev-portal.gls-group.net/docs/shipit-farm/1/overview) as an action. It lets you create, validate, cancel, and manage GLS parcel shipments directly from your flows — no manual API calls required.
7+
The **GLS Action** integrates the [GLS ShipIT API](https://dev-portal.gls-group.net/docs/shipit-farm/1/overview) as an action.
8+
It lets you create, validate, cancel, and manage GLS parcel shipments directly from your
9+
flows — no manual API calls required.
1010

1111
---
1212

@@ -37,19 +37,20 @@ Before using the GLS Action you will need:
3737

3838
### GLS Developer Portal
3939

40-
| Requirement | How to obtain |
41-
|---------------------------|-----------------------------------------------------------------------------------------------------------------------------|
42-
| `client_id` | Create an application at [https://dev-portal.gls-group.net](https://dev-portal.gls-group.net) and find it under **My Apps** |
43-
| `client_secret` | Found alongside the `client_id` in **My Apps** on the GLS developer portal |
44-
| `contact_id` *(optional)* | Issued by GLS support — contact them directly to request it |
40+
| Requirement | How to obtain |
41+
|---------------------------|-------------------------------------------------------------------------------------------|
42+
| `client_id` | Create an application at <https://dev-portal.gls-group.net> and find it under **My Apps** |
43+
| `client_secret` | Found alongside the `client_id` in **My Apps** on the GLS developer portal |
44+
| `contact_id` *(optional)* | Issued by GLS support — contact them directly to request it |
4545

46-
> **Note:** The `contact_id` is required for some shipment operations. If you are unsure whether you need it, contact GLS support.
46+
> **Note:** The `contact_id` is required for some shipment operations.
47+
> If you are unsure whether you need it, contact GLS support.
4748
4849
---
4950

5051
## Architecture overview
5152

52-
```
53+
```text
5354
Your Flow
5455
5556
@@ -62,13 +63,14 @@ Your Flow
6263
└── GLS ShipIT API (/shipit-farm/v1/backend/rs/...)
6364
```
6465

65-
The action handles OAuth2 token management automatically, including caching and refresh before expiry. You only need to provide the `client_id` and `client_secret` in the action configuration.
66+
The action handles OAuth2 token management automatically, including caching and refresh before expiry.
67+
You only need to provide the `client_id` and `client_secret` in the action configuration.
6668

6769
---
6870

6971
## Data flow
7072

71-
```
73+
```text
7274
Flow Input
7375
7476

docs/Actions/GLS/quick-start.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ title: Quick Start
33
description: Create your first GLS shipment in a few steps.
44
---
55

6-
# Quick Start
7-
8-
This guide walks you through creating your first GLS shipment using the GLS Action. By the end, you will have a working flow that creates a parcel and retrieves a shipping label.
6+
This guide walks you through creating your first GLS shipment using the GLS Action.
7+
By the end, you will have a working flow that creates a parcel and retrieves a shipping label.
98

109
---
1110

1211
## Step 1: Install and configure the action
1312

14-
Follow the [Installation Guide](../../installation.md) to deploy the GLS Action, then set the following configuration values in your Hercules admin panel (or `.env` file):
13+
Follow the [Installation Guide](../../installation.md) to deploy the GLS Action, then set the following configuration values in
14+
your Hercules admin panel (or `.env` file):
1515

1616
| Config | Value |
1717
|-------------------|--------------------------------------------------------------------------------------|
@@ -28,7 +28,7 @@ See [Configuration](configs.md) for the full list of options and how to obtain c
2828

2929
A basic "create a GLS parcel" flow looks like this:
3030

31-
```
31+
```text
3232
[createAddress] → GLS_ADDRESS (recipient)
3333
[createAddress] → GLS_ADDRESS (shipper)
3434
[createShipmentUnit] → GLS_SHIPMENT_UNIT
@@ -38,7 +38,7 @@ A basic "create a GLS parcel" flow looks like this:
3838

3939
### Flow diagram
4040

41-
```
41+
```text
4242
START
4343
4444
├─ createAddress (recipient)

docs/Actions/GLS/troubleshooting.md

Lines changed: 39 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,19 @@ title: Troubleshooting
33
description: Frequently asked questions, troubleshooting tips, and community resources for the GLS Action.
44
---
55

6-
# Troubleshooting & Community Support
7-
8-
---
9-
106
## FAQ
117

128
### General
139

14-
**Q: What is the GLS Action?**
10+
#### What is the GLS Action?
1511

16-
A: The GLS Action is an integration for the Hercules automation platform that connects to the [GLS ShipIT API](https://api.gls-group.net). It lets you create and manage GLS shipments from within your flows without writing any API code.
12+
The GLS Action is an integration for the Hercules automation platform that connects to the [GLS ShipIT API](https://api.gls-group.net).
13+
It lets you create and manage GLS shipments from within your flows without writing any API code.
1714

18-
---
15+
#### What GLS services does this action support?
1916

20-
**Q: What GLS services does this action support?**
17+
The action supports all major GLS shipment types and services, including:
2118

22-
A: The action supports all major GLS shipment types and services, including:
2319
- Standard parcel delivery
2420
- Shop delivery and shop returns
2521
- Exchange shipments
@@ -32,82 +28,71 @@ A: The action supports all major GLS shipment types and services, including:
3228

3329
See [Functions](functions.mdx) for the complete list.
3430

35-
---
36-
37-
**Q: Do I need a paid GLS account?**
38-
39-
A: Yes. You need a GLS business account and API access. Register on the [GLS Developer Portal](https://dev-portal.gls-group.net) and create an application to obtain `client_id` and `client_secret`.
40-
41-
---
42-
43-
**Q: What is the `contact_id` and do I need it?**
31+
#### Do I need a paid GLS account?
4432

45-
A: The `contact_id` is a GLS-assigned identifier linked to your contract. It is required for some advanced operations (e.g. retrieving end-of-day reports with your account data). Contact GLS support to request it. It is **optional** for basic shipment creation.
33+
Yes. You need a GLS business account and API access.
34+
Register on the [GLS Developer Portal](https://dev-portal.gls-group.net) and create an application to obtain `client_id` and `client_secret`.
4635

47-
---
36+
#### What is the `contact_id` and do I need it?
4837

49-
**Q: Can I test the action without a real GLS account?**
38+
The `contact_id` is a GLS-assigned identifier linked to your contract.
39+
It is required for some advanced operations (e.g. retrieving end-of-day reports with your account data).
40+
Contact GLS support to request it. It is **optional** for basic shipment creation.
5041

51-
A: GLS provides sandbox/test environments for some regions. Check the [GLS Developer Portal](https://dev-portal.gls-group.net) for sandbox API endpoint URLs and test credentials. Update `ship_it_api_url` and `auth_url` in your configuration to point to the sandbox endpoints.
42+
#### Can I test the action without a real GLS account?
5243

53-
---
44+
GLS provides sandbox/test environments for some regions.
45+
Check the [GLS Developer Portal](https://dev-portal.gls-group.net) for sandbox API endpoint URLs and test credentials.
46+
Update `ship_it_api_url` and `auth_url` in your configuration to point to the sandbox endpoints.
5447

5548
### Installation & configuration
5649

57-
**Q: The action starts but immediately disconnects. What's wrong?**
50+
#### The action starts but immediately disconnects. What's wrong?
51+
52+
Check the following:
5853

59-
A: Check the following:
6054
1. `HERCULES_AUTH_TOKEN` — is it valid and not expired?
6155
2. `HERCULES_AQUILA_URL` — is the Aquila server reachable from the Docker container?
6256
3. Docker logs: `docker compose logs -f` — look for specific error messages
6357

64-
---
65-
6658
### Authentication & API errors
6759

68-
**Q: I get an `INVALID_PRODUCT` error when creating a Saturday delivery shipment.**
69-
70-
A: Saturday delivery (and next-working-day delivery) requires the shipment's `Product` to be set to `"EXPRESS"`. Change `Product: "PARCEL"` to `Product: "EXPRESS"` in your shipment data.
71-
72-
---
73-
74-
**Q: I get `ERROR_CREATING_GLS_SHIPMENT` — how do I find out what went wrong?**
60+
#### I get an `INVALID_PRODUCT` error when creating a Saturday delivery shipment
7561

76-
A: Use `validateShipment` first to check your shipment data before creating it. The validation response includes specific `Issues` with `Rule` and `Location` fields pointing to the problematic field. See [Use Cases — Validate before creating](../GLS/use-cases.md#use-case-2-validate-before-creating).
62+
Saturday delivery (and next-working-day delivery) requires the shipment's `Product` to be set to `"EXPRESS"`.
63+
Change `Product: "PARCEL"` to `Product: "EXPRESS"` in your shipment data.
7764

78-
---
65+
#### I get `ERROR_CREATING_GLS_SHIPMENT` — how do I find out what went wrong?
7966

80-
**Q: Can I cancel a shipment after it has been picked up by GLS?**
67+
Use `validateShipment` first to check your shipment data before creating it.
68+
The validation response includes specific `Issues` with `Rule` and `Location` fields pointing to the problematic field.
69+
See [Use Cases — Validate before creating](../GLS/use-cases.md#use-case-2-validate-before-creating).
8170

82-
A: No. Once GLS has scanned the parcel at a depot or delivery vehicle, cancellation is no longer possible. The `cancelShipment` function will return `result: "SCANNED"` in that case.
83-
84-
---
71+
#### Can I cancel a shipment after it has been picked up by GLS?
8572

73+
No. Once GLS has scanned the parcel at a depot or delivery vehicle, cancellation is no longer possible.
74+
The `cancelShipment` function will return `result: "SCANNED"` in that case.
8675

8776
### Labels & printing
8877

89-
**Q: What label formats are supported?**
78+
#### What label formats are supported?
9079

91-
A: The action supports: `PDF`, `ZEBRA`, `INTERMEC`, `DATAMAX`, `TOSHIBA`, `PNG`. For reprint, additionally `PNG_200`.
80+
The action supports: `PDF`, `ZEBRA`, `INTERMEC`, `DATAMAX`, `TOSHIBA`, `PNG`. For reprint, additionally `PNG_200`.
9281

9382
Choose the format that matches your label printer.
9483

95-
---
84+
#### The label data returned is base64-encoded. How do I print it?
9685

97-
**Q: The label data returned is base64-encoded. How do I print it?**
86+
Decode `CreatedShipment.PrintData[0].Data` from base64, then:
9887

99-
A: Decode `CreatedShipment.PrintData[0].Data` from base64, then:
10088
- **PDF:** Save as a `.pdf` file and send to a PDF-capable printer
10189
- **ZPL (ZEBRA):** Send the raw ZPL string directly to a Zebra label printer
10290
- **PNG:** Save as a `.png` file and print as an image
10391

104-
---
105-
106-
**Q: Can I reprint a label after the parcel has been dispatched?**
92+
#### Can I reprint a label after the parcel has been dispatched?
10793

108-
A: Yes, use the `reprintParcel` function with the `TrackID` and the original `CreationDate`. Note that available template sets for reprinting are limited to `NONE`, `ZPL_200`, and `ZPL_300`.
109-
110-
---
94+
Yes, use the `reprintParcel` function with the `TrackID` and the original `CreationDate`.
95+
Note that available template sets for reprinting are limited to `NONE`, `ZPL_200`, and `ZPL_300`.
11196

11297
## Common error codes
11398

@@ -116,8 +101,6 @@ A: Yes, use the `reprintParcel` function with the `TrackID` and the original `Cr
116101
| `ERROR_CREATING_GLS_SHIPMENT` | API returned an error during shipment creation or management | Check `validateShipment` output for details |
117102
| `INVALID_PRODUCT` | Used `"PARCEL"` product with a service that requires `"EXPRESS"` | Set `Product: "EXPRESS"` in the shipment |
118103

119-
---
120-
121104
## Still stuck?
122105

123106
If you cannot resolve your issue with the FAQ above:
@@ -126,21 +109,18 @@ If you cannot resolve your issue with the FAQ above:
126109
2. **Check the GLS API status:** Visit the [GLS Developer Portal](https://dev-portal.gls-group.net) for service announcements
127110
3. **Open an issue** on GitHub (see below)
128111

129-
---
130-
131112
## GitHub
132113

133114
The source code for the GLS Action and all other Centaurus actions is available on GitHub:
134115

135-
🔗 **[https://github.com/code0-tech/centaurus](https://github.com/code0-tech/centaurus)**
116+
🔗 **<https://github.com/code0-tech/centaurus>**
136117

137118
Use the GitHub repository to:
119+
138120
- **Report bugs:** Open an [issue](https://github.com/code0-tech/centaurus/issues)
139121
- **Request features:** Open a [discussion](https://github.com/code0-tech/centaurus/discussions) or issue with the `enhancement` label
140122
- **Ask questions:** Use [GitHub Discussions](https://github.com/code0-tech/centaurus/discussions)
141123

142-
---
143-
144124
## Contributing
145125

146126
Contributions to Centaurus are welcome! Here is how to get started:
@@ -173,6 +153,7 @@ This creates a new directory at `actions/my-new-action/` with the standard struc
173153
### 4. Submit a pull request
174154

175155
Open a pull request against the `main` branch of [code0-tech/centaurus](https://github.com/code0-tech/centaurus). Include:
156+
176157
- A clear description of what you changed and why
177158
- Test results showing your changes pass
178159

@@ -185,4 +166,3 @@ Open a pull request against the `main` branch of [code0-tech/centaurus](https://
185166
| `npm run test:watch` | Run tests in watch mode |
186167
| `npm run lint` | Run ESLint |
187168
| `npm run create-action -- <name>` | Scaffold a new action |
188-

0 commit comments

Comments
 (0)