Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions actions/gls-action/scripts/generateDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function createGlsDocsConfig(): StandardActionDocsConfig {
title: "Datatypes",
description: "All data types registered by the GLS Action.",
heading: "GLS Action Types",
intro: `The GLS Action registers the following data types with the Hercules platform. These types are used as inputs and outputs of the GLS functions and can be referenced in your flows.`,
intro: `The GLS Action registers the following data types with the Hercules platform.\nThese types are used as inputs and outputs of the GLS functions and can be referenced in your flows.`,
},
functionsCopy: {
title: "Functions",
Expand All @@ -33,7 +33,8 @@ export function createGlsDocsConfig(): StandardActionDocsConfig {
},
{
heading: "Shipment functions",
intro: `All shipment functions accept a common set of parameters in addition to their type-specific parameters. They call the GLS ShipIT API (\`POST /rs/shipments\`) and return a \`GLS_CREATE_PARCELS_RESPONSE\`.
intro: `All shipment functions accept a common set of parameters in addition to their type-specific parameters.
They call the GLS ShipIT API (\`POST /rs/shipments\`) and return a \`GLS_CREATE_PARCELS_RESPONSE\`.

**Common parameters for all shipment functions:**

Expand Down
4 changes: 2 additions & 2 deletions actions/gls-action/src/functions/reprintParcel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default (sdk: ActionSdk) => {
documentation: [
{
code: "en-US",
content: "Reprints the label for an existing parcel. Use this if the original label is damaged, lost, or needs to be printed in a different format."
content: "Reprints the label for an existing parcel.\nUse this if the original label is damaged, lost, or needs to be printed in a different format."
}
],
displayMessage: [
Expand All @@ -33,7 +33,7 @@ export default (sdk: ActionSdk) => {
description: [
{
code: "en-US",
content: "Reprints the label for an existing parcel. Use this if the original label is damaged, lost, or needs to be printed in a different format.",
content: "Reprints the label for an existing parcel.\nUse this if the original label is damaged, lost, or needs to be printed in a different format.",
}
],
signature: "(data: GLS_REPRINT_PARCEL_REQUEST_DATA): GLS_REPRINT_PARCEL_RESPONSE_DATA",
Expand Down
4 changes: 2 additions & 2 deletions actions/gls-action/src/functions/validateShipment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default (sdk: ActionSdk) => {
documentation: [
{
code: "en-US",
content: "Validates a shipment against the GLS API without creating it. Use this before `createShipment` functions to catch errors early."
content: "Validates a shipment against the GLS API without creating it.\nUse this before `createShipment` functions to catch errors early."
}
],
displayMessage: [
Expand All @@ -33,7 +33,7 @@ export default (sdk: ActionSdk) => {
description: [
{
code: "en-US",
content: "Validates a shipment against the GLS API without creating it. Use this before `createShipment` functions to catch errors early.",
content: "Validates a shipment against the GLS API without creating it.\nUse this before `createShipment` functions to catch errors early.",
}
],
signature: "(data: GLS_VALIDATE_SHIPMENT_REQUEST_DATA): GLS_VALIDATE_SHIPMENT_RESPONSE_DATA",
Expand Down
25 changes: 15 additions & 10 deletions docs/Actions/GLS/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ title: Configuration
description: All configuration options for the GLS Action, including how to obtain credentials from the GLS Developer Portal.
---

# GLS Action Configuration

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).
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).

---

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

> **`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.
> **`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.

---

## How to obtain your credentials

### Step 1 — Create a GLS Developer account

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

Expand All @@ -50,13 +50,15 @@ The GLS action requires a few credentials to authenticate with the GLS ShipIT AP

### Step 4 — Get your Contact ID (optional)

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.
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.

---

## API endpoints

GLS provides different API endpoints depending on your region and environment. The defaults point to the global production API:
GLS provides different API endpoints depending on your region and environment.
The defaults point to the global production API:

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

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

```
```text
GLS Action
├── POST {auth_url}
Expand All @@ -85,13 +87,16 @@ GLS Action
Authorization: Bearer <access_token>
```

Tokens are **cached** and automatically refreshed 60 seconds before they expire. You do not need to manage token lifecycle manually.
Tokens are **cached** and automatically refreshed 60 seconds before they expire.
You do not need to manage token lifecycle manually.

---

## Default shipper

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.
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.

The value must be a valid `GLS_SHIPPER` object:

Expand Down
11 changes: 7 additions & 4 deletions docs/Actions/GLS/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ title: Trigger
description: Events emitted by the GLS Action — what they are, how they trigger flows in Aquila, and what future events are planned.
---

# GLS Action Events
## GLS Action Events

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.
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.

---

## Current status

> **The GLS Action does not currently emit any events.**
>
> 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**.
> 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**.

---
---
Loading