|
1 | 1 | import { |
2 | | - Description, DisplayIcon, |
| 2 | + Description, |
| 3 | + DisplayIcon, |
3 | 4 | DisplayMessage, |
4 | 5 | Documentation, |
5 | 6 | Identifier, |
6 | 7 | Name, |
7 | 8 | Parameter, |
8 | 9 | Signature, |
9 | 10 | } from "@code0-tech/hercules"; |
10 | | -import { Address } from "../../data_types/glsAddress.js"; |
| 11 | +import {Address} from "../../data_types/glsAddress.js"; |
11 | 12 |
|
12 | 13 | @Identifier("createAddress") |
13 | 14 | @Signature("(Name1: string, CountryCode: string, City: string, Street: string, ZIPCode: string, Name2?: string, Name3?: string, Province?: string, StreetNumber?: string, ContactPerson?: string, FixedLinePhonenumber?: string, MobilePhoneNumber?: string, Email?: string): GLS_ADDRESS") |
14 | | -@Name({ code: "en-US", content: "Create address" }) |
15 | | -@DisplayIcon("tabler:truck-delivery") |
16 | | -@DisplayMessage({ code: "en-US", content: "Create address for ${Name1}" }) |
| 15 | +@Name({code: "en-US", content: "Create GLS address object"}) |
| 16 | +@DisplayIcon("codezero:gls") |
| 17 | +@DisplayMessage({code: "en-US", content: "Create GLS address object for ${Name1}"}) |
17 | 18 | @Documentation({ |
18 | 19 | code: "en-US", |
19 | 20 | content: "Creates a GLS address object (`GLS_ADDRESS`) for use in shipments as consignee, shipper, or return address.", |
20 | 21 | }) |
21 | | -@Description({ code: "en-US", content: "Creates a GLS address object which can be used for shipments." }) |
| 22 | +@Description({code: "en-US", content: "Creates a GLS address object which can be used for shipments."}) |
22 | 23 | @Parameter({ |
23 | 24 | runtimeName: "Name1", |
24 | | - name: [{ code: "en-US", content: "Name 1" }], |
25 | | - description: [{ code: "en-US", content: "The name of the recipient or company. Max length is 40 characters." }], |
| 25 | + name: [{code: "en-US", content: "Name 1"}], |
| 26 | + description: [{code: "en-US", content: "The name of the recipient or company. Max length is 40 characters."}], |
26 | 27 | }) |
27 | 28 | @Parameter({ |
28 | 29 | runtimeName: "CountryCode", |
29 | | - name: [{ code: "en-US", content: "Country code" }], |
30 | | - description: [{ code: "en-US", content: "The ISO alpha-2 country code. For example, DE for Germany or FR for France." }], |
| 30 | + name: [{code: "en-US", content: "Country code"}], |
| 31 | + description: [{ |
| 32 | + code: "en-US", |
| 33 | + content: "The ISO alpha-2 country code. For example, DE for Germany or FR for France." |
| 34 | + }], |
31 | 35 | }) |
32 | 36 | @Parameter({ |
33 | 37 | runtimeName: "City", |
34 | | - name: [{ code: "en-US", content: "City" }], |
35 | | - description: [{ code: "en-US", content: "The city of the address. Max length is 40 characters." }], |
| 38 | + name: [{code: "en-US", content: "City"}], |
| 39 | + description: [{code: "en-US", content: "The city of the address. Max length is 40 characters."}], |
36 | 40 | }) |
37 | 41 | @Parameter({ |
38 | 42 | runtimeName: "Street", |
39 | | - name: [{ code: "en-US", content: "Street" }], |
40 | | - description: [{ code: "en-US", content: "The street name of the address. Min length is 4 characters." }], |
| 43 | + name: [{code: "en-US", content: "Street"}], |
| 44 | + description: [{code: "en-US", content: "The street name of the address. Min length is 4 characters."}], |
41 | 45 | }) |
42 | 46 | @Parameter({ |
43 | 47 | runtimeName: "ZIPCode", |
44 | | - name: [{ code: "en-US", content: "ZIP code" }], |
45 | | - description: [{ code: "en-US", content: "The ZIP code of the address. Max length is 10 characters." }], |
| 48 | + name: [{code: "en-US", content: "ZIP code"}], |
| 49 | + description: [{code: "en-US", content: "The ZIP code of the address. Max length is 10 characters."}], |
46 | 50 | }) |
47 | 51 | @Parameter({ |
48 | 52 | runtimeName: "Name2", |
49 | | - name: [{ code: "en-US", content: "Name 2" }], |
50 | | - description: [{ code: "en-US", content: "Additional name information. Max length is 40 characters." }], |
| 53 | + name: [{code: "en-US", content: "Name 2"}], |
| 54 | + description: [{code: "en-US", content: "Additional name information. Max length is 40 characters."}], |
51 | 55 | }) |
52 | 56 | @Parameter({ |
53 | 57 | runtimeName: "Name3", |
54 | | - name: [{ code: "en-US", content: "Name 3" }], |
55 | | - description: [{ code: "en-US", content: "Additional name information. Max length is 40 characters." }], |
| 58 | + name: [{code: "en-US", content: "Name 3"}], |
| 59 | + description: [{code: "en-US", content: "Additional name information. Max length is 40 characters."}], |
56 | 60 | }) |
57 | 61 | @Parameter({ |
58 | 62 | runtimeName: "Province", |
59 | | - name: [{ code: "en-US", content: "Province/State" }], |
60 | | - description: [{ code: "en-US", content: "The province or state of the address. Max length is 40 characters." }], |
| 63 | + name: [{code: "en-US", content: "Province/State"}], |
| 64 | + description: [{code: "en-US", content: "The province or state of the address. Max length is 40 characters."}], |
61 | 65 | }) |
62 | 66 | @Parameter({ |
63 | 67 | runtimeName: "StreetNumber", |
64 | | - name: [{ code: "en-US", content: "Street number" }], |
65 | | - description: [{ code: "en-US", content: "The street number of the address. Max length is 40 characters." }], |
| 68 | + name: [{code: "en-US", content: "Street number"}], |
| 69 | + description: [{code: "en-US", content: "The street number of the address. Max length is 40 characters."}], |
66 | 70 | }) |
67 | 71 | @Parameter({ |
68 | 72 | runtimeName: "ContactPerson", |
69 | | - name: [{ code: "en-US", content: "Contact person" }], |
70 | | - description: [{ code: "en-US", content: "The contact person for the address. Max length is 40 characters." }], |
| 73 | + name: [{code: "en-US", content: "Contact person"}], |
| 74 | + description: [{code: "en-US", content: "The contact person for the address. Max length is 40 characters."}], |
71 | 75 | }) |
72 | 76 | @Parameter({ |
73 | 77 | runtimeName: "FixedLinePhonenumber", |
74 | | - name: [{ code: "en-US", content: "Fixed line phone number" }], |
75 | | - description: [{ code: "en-US", content: "The fixed line phone number for the address. Max length is 35 characters." }], |
| 78 | + name: [{code: "en-US", content: "Fixed line phone number"}], |
| 79 | + description: [{ |
| 80 | + code: "en-US", |
| 81 | + content: "The fixed line phone number for the address. Max length is 35 characters." |
| 82 | + }], |
76 | 83 | }) |
77 | 84 | @Parameter({ |
78 | 85 | runtimeName: "MobilePhoneNumber", |
79 | | - name: [{ code: "en-US", content: "Mobile phone number" }], |
80 | | - description: [{ code: "en-US", content: "The mobile phone number for the address. Max length is 35 characters." }], |
| 86 | + name: [{code: "en-US", content: "Mobile phone number"}], |
| 87 | + description: [{code: "en-US", content: "The mobile phone number for the address. Max length is 35 characters."}], |
81 | 88 | }) |
82 | 89 | @Parameter({ |
83 | 90 | runtimeName: "Email", |
84 | | - name: [{ code: "en-US", content: "Email" }], |
85 | | - description: [{ code: "en-US", content: "The email address for the address. Max length is 80 characters." }], |
| 91 | + name: [{code: "en-US", content: "Email"}], |
| 92 | + description: [{code: "en-US", content: "The email address for the address. Max length is 80 characters."}], |
86 | 93 | }) |
87 | 94 | export class CreateAddressFunction { |
88 | 95 | run( |
|
0 commit comments