Skip to content

Commit 1565b66

Browse files
committed
feat: add DisplayIcon decorator to GLS functions for improved UI consistency
1 parent 1653843 commit 1565b66

6 files changed

Lines changed: 14 additions & 7 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//TODO: Why is the request data here wrapped within a object and isn't a direct parameter
22

33
import {
4-
Description,
4+
Description, DisplayIcon,
55
DisplayMessage,
66
Documentation,
77
FunctionContext,
@@ -18,6 +18,7 @@ import {
1818
} from "../data_types/glsCancelShipment.js";
1919

2020
@Identifier("cancelShipment")
21+
@DisplayIcon("codezero:gls")
2122
@Signature("(data: GLS_CANCEL_SHIPMENT_REQUEST_DATA): GLS_CANCEL_SHIPMENT_RESPONSE_DATA")
2223
@Name({ code: "en-US", content: "Cancel shipment" })
2324
@DisplayMessage({ code: "en-US", content: "Cancel shipment" })

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import axios from "axios";
44
import {
5-
Description,
5+
Description, DisplayIcon,
66
DisplayMessage,
77
Documentation,
88
FunctionContext,
@@ -20,6 +20,7 @@ import {
2020
} from "../data_types/glsAllowedServices.js";
2121

2222
@Identifier("getAllowedServices")
23+
@DisplayIcon("codezero:gls")
2324
@Signature("(data: GLS_ALLOWED_SERVICES_REQUEST_DATA): GLS_ALLOWED_SERVICES_RESPONSE_DATA")
2425
@Name({ code: "en-US", content: "Get allowed services" })
2526
@DisplayMessage({ code: "en-US", content: "Get allowed services" })
@@ -49,7 +50,8 @@ export class GetAllowedServicesFunction {
4950
return AllowedServicesResponseDataSchema.parse(result.data);
5051
} catch (error) {
5152
if (typeof error === "string") {
52-
throw new RuntimeError("ERROR_CREATING_GLS_SHIPMENT", error);
53+
throw new RuntimeError("" +
54+
"ERROR_CREATING_GLS_SHIPMENT", error);
5355
}
5456
throw new RuntimeError("ERROR_CREATING_GLS_SHIPMENT", "An error occurred while fetching the allowed GLS services.");
5557
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import axios from "axios";
44
import {
5-
Description,
5+
Description, DisplayIcon,
66
DisplayMessage,
77
Documentation,
88
FunctionContext,
@@ -20,6 +20,7 @@ import {
2020
} from "../data_types/glsEndOfDay.js";
2121

2222
@Identifier("getEndOfDayReport")
23+
@DisplayIcon("codezero:gls")
2324
@Signature("(data: GLS_END_OF_DAY_REQUEST_DATA): GLS_END_OF_DAY_RESPONSE_DATA")
2425
@Name({ code: "en-US", content: "Get end of day report" })
2526
@DisplayMessage({ code: "en-US", content: "Get end of day report" })

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import axios from "axios";
44
import {
5-
Description,
5+
Description, DisplayIcon,
66
DisplayMessage,
77
Documentation,
88
FunctionContext,
@@ -20,6 +20,7 @@ import {
2020
} from "../data_types/glsReprintParcel.js";
2121

2222
@Identifier("reprintParcel")
23+
@DisplayIcon("codezero:gls")
2324
@Signature("(data: GLS_REPRINT_PARCEL_REQUEST_DATA): GLS_REPRINT_PARCEL_RESPONSE_DATA")
2425
@Name({ code: "en-US", content: "Reprint parcel" })
2526
@DisplayMessage({ code: "en-US", content: "Reprint parcel" })

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import axios from "axios";
44
import {
5-
Description,
5+
Description, DisplayIcon,
66
DisplayMessage,
77
Documentation,
88
FunctionContext,
@@ -20,6 +20,7 @@ import {
2020
} from "../data_types/glsUpdateParcelWeight.js";
2121

2222
@Identifier("updateParcelWeight")
23+
@DisplayIcon("codezero:gls")
2324
@Signature("(data: GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA): GLS_UPDATE_PARCEL_WEIGHT_RESPONSE_DATA")
2425
@Name({ code: "en-US", content: "Update parcel weight" })
2526
@DisplayMessage({ code: "en-US", content: "Update parcel weight" })

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import axios from "axios";
22
import {
3-
Description,
3+
Description, DisplayIcon,
44
DisplayMessage,
55
Documentation,
66
FunctionContext,
@@ -18,6 +18,7 @@ import {
1818
} from "../data_types/glsValidateShipment.js";
1919

2020
@Identifier("validateShipment")
21+
@DisplayIcon("codezero:gls")
2122
@Signature("(data: GLS_VALIDATE_SHIPMENT_REQUEST_DATA): GLS_VALIDATE_SHIPMENT_RESPONSE_DATA")
2223
@Name({ code: "en-US", content: "Validate shipment" })
2324
@DisplayMessage({ code: "en-US", content: "Validate shipment" })

0 commit comments

Comments
 (0)