Skip to content

Commit 958622d

Browse files
committed
Add documentation for shipment-related functions
1 parent f7c4787 commit 958622d

28 files changed

Lines changed: 225 additions & 75 deletions

actions/gls-action/scripts/generateDocs.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,11 @@ ${JSON.stringify(generateDefinition, null, 4)}
362362
}
363363

364364
run().then(async (sdk) => {
365-
// writeFileSync(
366-
// "../../docs/Actions/GLS/types.mdx",
367-
// generateDatatypes(),
368-
// "utf8"
369-
// )
365+
writeFileSync(
366+
"../../docs/Actions/GLS/types.mdx",
367+
generateDatatypes(),
368+
"utf8"
369+
)
370370

371371
writeFileSync(
372372
"../../docs/Actions/GLS/functions.mdx",

actions/gls-action/src/functions/cancelShipment.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ export default (sdk: ActionSdk) => {
77
{
88
definition: {
99
runtimeName: "cancelShipment",
10+
documentation: [
11+
{
12+
code: "en-US",
13+
content: "Cancels an existing shipment by its Track ID. Only possible if the parcel has not yet been scanned."
14+
}
15+
],
1016
displayMessage: [
1117
{
1218
code: "en-US",
@@ -22,7 +28,7 @@ export default (sdk: ActionSdk) => {
2228
description: [
2329
{
2430
code: "en-US",
25-
content: "Cancels a GLS shipment.",
31+
content: "Cancels an existing shipment by its Track ID. Only possible if the parcel has not yet been scanned.",
2632
}
2733
],
2834
signature: "(data: GLS_CANCEL_SHIPMENT_REQUEST_DATA): GLS_CANCEL_SHIPMENT_RESPONSE_DATA",

actions/gls-action/src/functions/getAllowedServices.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ export default (sdk: ActionSdk) => {
1212
{
1313
definition: {
1414
runtimeName: "getAllowedServices",
15+
documentation: [
16+
{
17+
code: "en-US",
18+
content: "Returns the GLS services available for a given origin/destination country and ZIP code combination."
19+
}
20+
],
1521
displayMessage: [
1622
{
1723
code: "en-US",
@@ -27,7 +33,7 @@ export default (sdk: ActionSdk) => {
2733
description: [
2834
{
2935
code: "en-US",
30-
content: "Returns the allowed GLS services for a given set of parameters.",
36+
content: "Returns the GLS services available for a given origin/destination country and ZIP code combination.",
3137
}
3238
],
3339
signature: "(data: GLS_ALLOWED_SERVICES_REQUEST_DATA): GLS_ALLOWED_SERVICES_RESPONSE_DATA",

actions/gls-action/src/functions/getEndOfDayReport.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ export default (sdk: ActionSdk) => {
88
{
99
definition: {
1010
runtimeName: "getEndOfDayReport",
11+
documentation: [
12+
{
13+
code: "en-US",
14+
content: "Retrieves all shipments dispatched on a given date. Useful for reconciliation and end-of-day processing."
15+
}
16+
],
1117
displayMessage: [
1218
{
1319
code: "en-US",
@@ -23,7 +29,7 @@ export default (sdk: ActionSdk) => {
2329
description: [
2430
{
2531
code: "en-US",
26-
content: "Returns the GLS end of day report.",
32+
content: "Retrieves all shipments dispatched on a given date. Useful for reconciliation and end-of-day processing.",
2733
}
2834
],
2935
signature: "(data: GLS_END_OF_DAY_REQUEST_DATA): GLS_END_OF_DAY_RESPONSE_DATA",

actions/gls-action/src/functions/reprintParcel.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ export default (sdk: ActionSdk) => {
1212
{
1313
definition: {
1414
runtimeName: "reprintParcel",
15+
documentation: [
16+
{
17+
code: "en-US",
18+
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."
19+
}
20+
],
1521
displayMessage: [
1622
{
1723
code: "en-US",
@@ -27,7 +33,7 @@ export default (sdk: ActionSdk) => {
2733
description: [
2834
{
2935
code: "en-US",
30-
content: "Reprints the labels for a GLS parcel.",
36+
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.",
3137
}
3238
],
3339
signature: "(data: GLS_REPRINT_PARCEL_REQUEST_DATA): GLS_REPRINT_PARCEL_RESPONSE_DATA",

actions/gls-action/src/functions/services/createAddresseeOnlyShipment.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ export default (sdk: ActionSdk) => {
1515
{
1616
definition: {
1717
runtimeName: "createAddresseeOnlyShipment",
18+
documentation: [
19+
{
20+
code: "en-US",
21+
content: "Creates a shipment that can only be delivered to the named addressee (no neighbor delivery)."
22+
}
23+
],
1824
displayMessage: [
1925
{
2026
code: "en-US",
@@ -30,7 +36,7 @@ export default (sdk: ActionSdk) => {
3036
description: [
3137
{
3238
code: "en-US",
33-
content: "Creates a GLS addressee only shipment.",
39+
content: "Creates a shipment that can only be delivered to the named addressee (no neighbor delivery).",
3440
}
3541
],
3642
signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`,

actions/gls-action/src/functions/services/createDeliveryAtWorkShipment.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ export default (sdk: ActionSdk) => {
1515
{
1616
definition: {
1717
runtimeName: "createDeliveryAtWorkShipment",
18+
documentation: [
19+
{
20+
code: "en-US",
21+
content: "Delivers a parcel to a specific location within a workplace (building, floor, room)."
22+
}
23+
],
1824
displayMessage: [
1925
{
2026
code: "en-US",
@@ -30,7 +36,7 @@ export default (sdk: ActionSdk) => {
3036
description: [
3137
{
3238
code: "en-US",
33-
content: "Creates a GLS delivery at work shipment.",
39+
content: "Delivers a parcel to a specific location within a workplace (building, floor, room).",
3440
}
3541
],
3642
signature: `(recipientName: string, building: string, floor: number, ${DEFAULT_SIGNATURE_FOR_SERVICES}, alternateRecipientName?: string, room?: number, phonenumber?: string): GLS_CREATE_PARCELS_RESPONSE`,

actions/gls-action/src/functions/services/createDeliveryNextWorkingDayShipment.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ export default (sdk: ActionSdk) => {
1515
{
1616
definition: {
1717
runtimeName: "createDeliveryNextWorkingDayShipment",
18+
documentation: [
19+
{
20+
code: "en-US",
21+
content: "Creates an EXPRESS shipment for delivery on the next working day (EOB service)."
22+
}
23+
],
1824
displayMessage: [
1925
{
2026
code: "en-US",
@@ -30,7 +36,7 @@ export default (sdk: ActionSdk) => {
3036
description: [
3137
{
3238
code: "en-US",
33-
content: "Creates a GLS delivery next working day shipment.",
39+
content: "Creates an EXPRESS shipment for delivery on the next working day (EOB service).",
3440
}
3541
],
3642
signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`,

actions/gls-action/src/functions/services/createDeliverySaturdayShipment.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ export default (sdk: ActionSdk) => {
1616
{
1717
definition: {
1818
runtimeName: "createDeliverySaturdayShipment",
19+
documentation: [
20+
{
21+
code: "en-US",
22+
content: "Creates an EXPRESS shipment for Saturday delivery."
23+
}
24+
],
1925
displayMessage: [
2026
{
2127
code: "en-US",
@@ -31,7 +37,7 @@ export default (sdk: ActionSdk) => {
3137
description: [
3238
{
3339
code: "en-US",
34-
content: "Creates a GLS delivery Saturday shipment.",
40+
content: "Creates an EXPRESS shipment for Saturday delivery.",
3541
}
3642
],
3743
signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`,

actions/gls-action/src/functions/services/createDepositShipment.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ export default (sdk: ActionSdk) => {
1616
{
1717
definition: {
1818
runtimeName: "createDepositShipment",
19+
documentation: [
20+
{
21+
code: "en-US",
22+
content: "Delivers a parcel to a designated deposit location (e.g. a garage or shed) without requiring a signature."
23+
}
24+
],
1925
displayMessage: [
2026
{
2127
code: "en-US",
@@ -31,7 +37,7 @@ export default (sdk: ActionSdk) => {
3137
description: [
3238
{
3339
code: "en-US",
34-
content: "Creates a GLS deposit shipment.",
40+
content: "Delivers a parcel to a designated deposit location (e.g. a garage or shed) without requiring a signature.",
3541
}
3642
],
3743
signature: `(placeOfDeposit: string, ${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`,

0 commit comments

Comments
 (0)