diff --git a/.tool-versions b/.tool-versions deleted file mode 100644 index 01de519..0000000 --- a/.tool-versions +++ /dev/null @@ -1,2 +0,0 @@ -nodejs 24.13.1 -npm 11.12.1 diff --git a/actions/gls-action/.example.env b/actions/gls-action/.example.env deleted file mode 100644 index c6c7c80..0000000 --- a/actions/gls-action/.example.env +++ /dev/null @@ -1,4 +0,0 @@ -HERCULES_AUTH_TOKEN=your_hercules_auth_token_here -HERCULES_AQUILA_URL=https://aquila.hercules-ci.com -HERCULES_ACTION_ID=gls-action -HERCULES_SDK_VERSION=0.0.0 \ No newline at end of file diff --git a/actions/gls-action/.gitignore b/actions/gls-action/.gitignore index 2eea525..ddc3c2a 100644 --- a/actions/gls-action/.gitignore +++ b/actions/gls-action/.gitignore @@ -1 +1,3 @@ -.env \ No newline at end of file +.env +node_modules/ +dist/ diff --git a/actions/gls-action/Dockerfile b/actions/gls-action/Dockerfile index 468ccf3..cbca323 100644 --- a/actions/gls-action/Dockerfile +++ b/actions/gls-action/Dockerfile @@ -2,17 +2,12 @@ FROM node:24-alpine WORKDIR /app -COPY code0-tech-* ./ +COPY package.json package-lock.json* ./ -COPY package.json package-lock.json tsconfig.base.json turbo.json ./ +RUN npm install -COPY actions/gls-action ./actions/gls-action - -RUN npm ci - -WORKDIR /app/actions/gls-actions +COPY . . RUN npm run build - -CMD ["npm", "run", "start", "-w", "@code0-tech/gls-action"] \ No newline at end of file +CMD ["npm", "run", "start"] diff --git a/actions/gls-action/package-lock.json b/actions/gls-action/package-lock.json index cb3b065..5f10576 100644 --- a/actions/gls-action/package-lock.json +++ b/actions/gls-action/package-lock.json @@ -1,41 +1,527 @@ { "name": "@code0-tech/gls-action", - "version": "0.0.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@code0-tech/gls-action", - "version": "0.0.0", + "version": "1.0.0", "dependencies": { - "@code0-tech/hercules": "^0.0.1" + "@code0-tech/hercules": "^1.0.0", + "axios": "^1.7.7", + "reflect-metadata": "^0.2.2", + "zod": "^4.4.3" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "tsx": "^4.0.0", + "typescript": "^5.9.3", + "vite": "^8.0.3" + } + }, + "node_modules/@clack/core": { + "version": "1.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.0.0-alpha.4.tgz", + "integrity": "sha512-VCtU+vjyKPMSakVrB9q1bOnXN7QW/w4+YQDQCOF59GrzydW+169i0fVx/qzRRXJgt8KGj/pZZ/JxXroFZIDByg==", + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" + } + }, + "node_modules/@clack/prompts": { + "version": "1.0.0-alpha.4", + "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.0.0-alpha.4.tgz", + "integrity": "sha512-KnmtDF2xQGoI5AlBme9akHtvCRV0RKAARUXHBQO2tMwnY8B08/4zPWigT7uLK25UPrMCEqnyQPkKRjNdhPbf8g==", + "license": "MIT", + "dependencies": { + "@clack/core": "1.0.0-alpha.4", + "picocolors": "^1.0.0", + "sisteransi": "^1.0.5" } }, "node_modules/@code0-tech/hercules": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@code0-tech/hercules/-/hercules-0.0.1.tgz", - "integrity": "sha512-1k0bix2v1PmOZuua8BGDbiHgDAXDOMECuBZ/O4Shsm4mzX7r0ntyhR+IZ6DcbOGGw7ddR8FsoNQtJMhDiawxXQ==", + "version": "1.0.0", "license": "ISC", - "dependencies": { - "@code0-tech/tucana": "0.0.64", + "peerDependencies": { + "@code0-tech/tucana": "0.0.74", "@grpc/grpc-js": "^1.14.3", "@protobuf-ts/grpc-backend": "^2.11.1", "@protobuf-ts/grpc-transport": "^2.11.1", "@protobuf-ts/runtime": "^2.11.1", - "@protobuf-ts/runtime-rpc": "^2.11.1" + "@protobuf-ts/runtime-rpc": "^2.11.1", + "reflect-metadata": "^0.2.2", + "ts-morph": "^28.0.0", + "ts-to-zod": "^5.1.0", + "zod": "^4.4.3", + "zod-to-ts": "^2.1.0" } }, "node_modules/@code0-tech/tucana": { - "version": "0.0.64", - "resolved": "https://registry.npmjs.org/@code0-tech/tucana/-/tucana-0.0.64.tgz", - "integrity": "sha512-HtFIRriZE/yaOwHHMGTB4dwO41L8kFkQCsdQX5MXUrtE90uZDjYwdLPZhxJI/WlgcmM6Xs8LBcazcbAoE7jDTw==", - "license": "Apache-2.0" + "version": "0.0.74", + "license": "MIT", + "peer": true + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz", + "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz", + "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz", + "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz", + "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz", + "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz", + "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz", + "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz", + "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz", + "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz", + "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz", + "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz", + "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz", + "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz", + "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz", + "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz", + "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz", + "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz", + "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz", + "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz", + "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz", + "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz", + "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz", + "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz", + "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz", + "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz", + "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } }, "node_modules/@grpc/grpc-js": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.3.tgz", - "integrity": "sha512-Iq8QQQ/7X3Sac15oB6p0FmUg/klxQvXLeileoqrTRGJYLV+/9tubbr9ipz0GKHjmXVsgFPo/+W+2cA8eNcR+XA==", + "version": "1.14.4", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.4.tgz", + "integrity": "sha512-k9Dj3DV/itK9D06Y8f190Qgop7/Ui+D0njFV3LHMPwPT75DpXLQohE9Wmz0QElrJnzsjB7KPWiKJbOl7IPDArQ==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@grpc/proto-loader": "^0.8.0", "@js-sdsl/ordered-map": "^4.4.2" @@ -45,14 +531,14 @@ } }, "node_modules/@grpc/proto-loader": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz", - "integrity": "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.1.tgz", + "integrity": "sha512-wtF6h+DY6M3YaDBPAmvuuA6jV8Sif9MjtOI5euKFWRgCDl5PeDpPsHR9u2l6St5ceY8AZgoNDww5+HvEsXFsGg==", "license": "Apache-2.0", "dependencies": { "lodash.camelcase": "^4.3.0", "long": "^5.0.0", - "protobufjs": "^7.5.3", + "protobufjs": "^7.5.5", "yargs": "^17.7.2" }, "bin": { @@ -72,11 +558,70 @@ "url": "https://opencollective.com/js-sdsl" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.5.tgz", + "integrity": "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@oclif/core": { + "version": "4.11.11", + "resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.11.11.tgz", + "integrity": "sha512-LoGzrvkH9I8dwhxuLafcf90MAp+fYfAiAhpyixaVAWaclIgs+vXeMMQwBG90/wqjdygIKcFAqNnNJrfl3s3X8Q==", + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.3.2", + "ansis": "^3.17.0", + "clean-stack": "^3.0.1", + "cli-spinners": "^2.9.2", + "debug": "^4.4.3", + "ejs": "^3.1.10", + "get-package-type": "^0.1.0", + "indent-string": "^4.0.0", + "is-wsl": "^2.2.0", + "lilconfig": "^3.1.3", + "minimatch": "^10.2.5", + "semver": "^7.8.1", + "string-width": "^4.2.3", + "supports-color": "^8", + "tinyglobby": "^0.2.17", + "widest-line": "^3.1.0", + "wordwrap": "^1.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.137.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.137.0.tgz", + "integrity": "sha512-WT+Gb24i8hmvo85AIv2oEYouEXkRlKAlT9WaCa3TfLgNCN+GhrJOGZuIlMouAh38Qe4QOx26eUOVsq70qXrywA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, "node_modules/@protobuf-ts/grpc-backend": { "version": "2.11.1", "resolved": "https://registry.npmjs.org/@protobuf-ts/grpc-backend/-/grpc-backend-2.11.1.tgz", "integrity": "sha512-llAkJ03SlR/+p70YBTMOAQqdkXWghsTWwlPuGXC+Hj99hDQq6fa2CoVePPqbcn7A7/aLBcPG/9Ag3yqlltldxw==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@protobuf-ts/runtime": "^2.11.1", "@protobuf-ts/runtime-rpc": "^2.11.1" @@ -90,6 +635,7 @@ "resolved": "https://registry.npmjs.org/@protobuf-ts/grpc-transport/-/grpc-transport-2.11.1.tgz", "integrity": "sha512-l6wrcFffY+tuNnuyrNCkRM8hDIsAZVLA8Mn7PKdVyYxITosYh60qW663p9kL6TWXYuDCL3oxH8ih3vLKTDyhtg==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@protobuf-ts/runtime": "^2.11.1", "@protobuf-ts/runtime-rpc": "^2.11.1" @@ -102,13 +648,15 @@ "version": "2.11.1", "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.11.1.tgz", "integrity": "sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ==", - "license": "(Apache-2.0 AND BSD-3-Clause)" + "license": "(Apache-2.0 AND BSD-3-Clause)", + "peer": true }, "node_modules/@protobuf-ts/runtime-rpc": { "version": "2.11.1", "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.11.1.tgz", "integrity": "sha512-4CqqUmNA+/uMz00+d3CYKgElXO9VrEbucjnBFEjqI4GuDrEQ32MaI3q+9qPBvIGOlL4PmHXrzM32vBPWRhQKWQ==", "license": "Apache-2.0", + "peer": true, "dependencies": { "@protobuf-ts/runtime": "^2.11.1" } @@ -126,25 +674,24 @@ "license": "BSD-3-Clause" }, "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.5.tgz", + "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==", "license": "BSD-3-Clause" }, "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.1.tgz", + "integrity": "sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg==", "license": "BSD-3-Clause" }, "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.1.tgz", + "integrity": "sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw==", "license": "BSD-3-Clause", "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" + "@protobufjs/aspromise": "^1.1.1" } }, "node_modules/@protobufjs/float": { @@ -153,12 +700,6 @@ "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", "license": "BSD-3-Clause" }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", - "license": "BSD-3-Clause" - }, "node_modules/@protobufjs/path": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", @@ -172,150 +713,1882 @@ "license": "BSD-3-Clause" }, "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.1.tgz", + "integrity": "sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg==", "license": "BSD-3-Clause" }, - "node_modules/@types/node": { - "version": "25.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", - "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.2.tgz", + "integrity": "sha512-2cZ+7xRS+DBcuJBJKnfzsbleumJhBqSlJVpuzHC0nTqfd3QQ7Vx2/x5YR/D7cBamKSeWplwo82Fn9lqYUDEMfA==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "undici-types": "~7.18.0" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.2.tgz", + "integrity": "sha512-RkPMJnygxsgOYdkfqgpwY0/Fzm8d0VQe6HGU2/B00Xa9eqdLbrII+DOKAodbJAn3ZL1AJxGHkZRPYazgGY6Ljw==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=8" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.2.tgz", + "integrity": "sha512-Uiczh6vFhwyfd7WNe7Q7mCA4KxAiLdz7jPE/WGizfRpIieoyFuNVMmM8HqZ9HwudTkY6/AeMQwlNJ9NJijguWw==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.2.tgz", + "integrity": "sha512-+TpdtTRgHiJFjCVFbw311SuLk3KfytPOQQn+VlAEv+gBxYPtL7E6JS9e/tk+8CwxhIZvemJKo4rTKgfWNsKkkA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=12" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.2.tgz", + "integrity": "sha512-4lv1/tkmi7ueIVHnyreaOeUpiZP26BH9rRy6hoYfR9310A2B9nUEVRDvBx69vx64Nr3eTPPRkyciqJJs+j9Jmw==", + "cpu": [ + "arm" + ], + "dev": true, "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=7.0.0" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.2.tgz", + "integrity": "sha512-gBSUVO0eaWgw1JMjK3gB8BMlX2Mk148s2lTiVT3e9vjVxbl7UDfMWWY8CfIaaqiXuM9fVTMxIpUz6CAo/B6Vlw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.2.tgz", + "integrity": "sha512-LjQP/iZLBu8o8PjIfk4x3At0/mT6h282pvz8Z5LAyhGbu/kDezyO7ea62rF5uoqmgnIYqbN/MqJ3Si3Aymi7xQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.2.tgz", + "integrity": "sha512-X/7bVLWelEsbyWDUSXt7zVsTniLLPIY2n1rH58qr78l9i7MNbbxBWD8gI2vRfBWf4NUXJCUuQnfZDsp32LqsfQ==", + "cpu": [ + "ppc64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.2.tgz", + "integrity": "sha512-gb6dYKW/1KDorGXyy48glEBJs/sxVSC5pcVrox/pFGV4mvwSFeg2sK5L2tRkVsVlh7kueqOgg4GEcuipJcGuKg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.2.tgz", + "integrity": "sha512-JY4w85pU3iAiJVMh5nuk4/Mh9GjMsupe8MrIN53rwxAZW64GKrWeJBuN6SxQg9QTU5uB1cxyhDzW8jqRn1EABw==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=8" + "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "license": "MIT" + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.2.tgz", + "integrity": "sha512-xvpA7o5KCYLB0Rwscmuylb1/zHHSUx4g4xilm4prC5jP76pEUlzBmMbgpbh7bVDbId4NcfT96gN5i6mE6UDaiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/long": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", - "license": "Apache-2.0" + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.2.tgz", + "integrity": "sha512-p/ts6KBLjuk49Bp21XH77poQGt02iNz7ChgHep7tudPOaLinR/De/RHdxF8w8Yj4r/bF/bqXwH6PZrB2sA+Nvw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/protobufjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", - "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", - "hasInstallScript": true, - "license": "BSD-3-Clause", + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.2.tgz", + "integrity": "sha512-VMu/wmrZ9hJzYlRhbw7jK5PODlugyKZ5mOdX78+lS8OvuFkWNQdz1pFLrI2p3P0pjXOmUZ7B48o5VnMH9QOGtg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, "dependencies": { - "@protobufjs/aspromise": "^1.1.2", + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "^1.1.5" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.2.tgz", + "integrity": "sha512-xtUJqs8qEkuSviS0n1tsohaPuz3a1SPhZywOji4Oo+sgrJs8daEDMZ0QtqL0OS7dx8PoVpg2J/ZZycPY5I2+Zg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.2.tgz", + "integrity": "sha512-85YiLQqjUKgSO/Zjnf9e0XIn5Ymrh1fLDWBeAkZqpuBR/3R8TpfoHXuyblqyQrftSSgWO9qpcHN8mkyKsLraoA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@ts-morph/common": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.29.0.tgz", + "integrity": "sha512-35oUmphHbJvQ/+UTwFNme/t2p3FoKiGJ5auTjjpNTop2dyREspirjMy82PLSC1pnDJ8ah1GU98hwpVt64YXQsg==", + "license": "MIT", + "dependencies": { + "minimatch": "^10.0.1", + "path-browserify": "^1.0.1", + "tinyglobby": "^0.2.14" + } + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/node": { + "version": "22.20.0", + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@typescript/vfs": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.4.tgz", + "integrity": "sha512-PJFXFS4ZJKiJ9Qiuix6Dz/OwEIqHD7Dme1UwZhTK11vR+5dqW2ACbdndWQexBzCx+CPuMe5WBYQWCsFyGlQLlQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.3" + }, + "peerDependencies": { + "typescript": "*" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ansis": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.17.0.tgz", + "integrity": "sha512-0qWUglt9JEqLFr3w1I1pbrChn1grhaiAR2ocX1PP/flRmxgtwTzPFFFnfIlD6aMOLQZgSuCRlidD70lvx8yhzg==", + "license": "ISC", + "engines": { + "node": ">=14" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz", + "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/clean-stack": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", + "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.2.0.tgz", + "integrity": "sha512-xRwvIOMGrfOAnM1JYtqQImuaNtDEv9v6oIYAs4LIHwTiKee8uwvIi363igssOC0O5U04i4AlENs79LQLu9tEMw==", + "license": "MIT", + "dependencies": { + "slice-ansi": "^8.0.0", + "string-width": "^8.2.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.1.tgz", + "integrity": "sha512-IIaP0g3iy9Cyy18w3M9YcaDudujEAVHKt3a3QJg1+sr/oX96TbaGUubG0hJyCjCBThFH+tFpcIyoUHUn1ogaLA==", + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/code-block-writer": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz", + "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==", + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", + "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.1", + "@esbuild/android-arm": "0.28.1", + "@esbuild/android-arm64": "0.28.1", + "@esbuild/android-x64": "0.28.1", + "@esbuild/darwin-arm64": "0.28.1", + "@esbuild/darwin-x64": "0.28.1", + "@esbuild/freebsd-arm64": "0.28.1", + "@esbuild/freebsd-x64": "0.28.1", + "@esbuild/linux-arm": "0.28.1", + "@esbuild/linux-arm64": "0.28.1", + "@esbuild/linux-ia32": "0.28.1", + "@esbuild/linux-loong64": "0.28.1", + "@esbuild/linux-mips64el": "0.28.1", + "@esbuild/linux-ppc64": "0.28.1", + "@esbuild/linux-riscv64": "0.28.1", + "@esbuild/linux-s390x": "0.28.1", + "@esbuild/linux-x64": "0.28.1", + "@esbuild/netbsd-arm64": "0.28.1", + "@esbuild/netbsd-x64": "0.28.1", + "@esbuild/openbsd-arm64": "0.28.1", + "@esbuild/openbsd-x64": "0.28.1", + "@esbuild/openharmony-arm64": "0.28.1", + "@esbuild/sunos-x64": "0.28.1", + "@esbuild/win32-arm64": "0.28.1", + "@esbuild/win32-ia32": "0.28.1", + "@esbuild/win32-x64": "0.28.1" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/filelist": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.6.tgz", + "integrity": "sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA==", + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz", + "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz", + "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==", + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.3.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jake": { + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.6", + "filelist": "^1.0.4", + "picocolors": "^1.1.1" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/listr2": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-9.0.5.tgz", + "integrity": "sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==", + "license": "MIT", + "dependencies": { + "cli-truncate": "^5.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/listr2/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "license": "MIT" + }, + "node_modules/listr2/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" + }, + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "license": "MIT", + "dependencies": { + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-escapes": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.3.0.tgz", + "integrity": "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==", + "license": "MIT", + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "license": "MIT" + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", + "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.5" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.15", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.15.tgz", + "integrity": "sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.15", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/protobufjs": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.4.tgz", + "integrity": "sha512-RJJPTTpvFfHcWLkIa2JFWK4XvtSzS0yEWDmunqHXli1h3JlkbcQZXDZdcWxv+JK3Xsl5/UFDPZ0iGm7DAengYw==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", + "@protobufjs/codegen": "^2.0.5", + "@protobufjs/eventemitter": "^1.1.1", + "@protobufjs/fetch": "^1.1.1", "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", + "@protobufjs/utf8": "^1.1.1", "@types/node": ">=13.7.0", - "long": "^5.0.0" + "long": "^5.3.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/reflect-metadata": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "license": "Apache-2.0", + "peer": true + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "license": "MIT" + }, + "node_modules/rolldown": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.2.tgz", + "integrity": "sha512-x0CrQQqCXWGeI8dTvFfN/Dnv3yMKT9hv5jFjlOreKAx9wqLq9wz7VvLLHyaAXC90/CpggTu9SisSbsJJTPSjNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.137.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" }, "engines": { - "node": ">=12.0.0" + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.1.2", + "@rolldown/binding-darwin-arm64": "1.1.2", + "@rolldown/binding-darwin-x64": "1.1.2", + "@rolldown/binding-freebsd-x64": "1.1.2", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.2", + "@rolldown/binding-linux-arm64-gnu": "1.1.2", + "@rolldown/binding-linux-arm64-musl": "1.1.2", + "@rolldown/binding-linux-ppc64-gnu": "1.1.2", + "@rolldown/binding-linux-s390x-gnu": "1.1.2", + "@rolldown/binding-linux-x64-gnu": "1.1.2", + "@rolldown/binding-linux-x64-musl": "1.1.2", + "@rolldown/binding-openharmony-arm64": "1.1.2", + "@rolldown/binding-wasm32-wasi": "1.1.2", + "@rolldown/binding-win32-arm64-msvc": "1.1.2", + "@rolldown/binding-win32-x64-msvc": "1.1.2" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "license": "MIT" + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/slice-ansi": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-8.0.0.tgz", + "integrity": "sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg==", "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.3", + "is-fullwidth-code-point": "^5.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -334,7 +2607,25 @@ "node": ">=8" } }, - "node_modules/strip-ansi": { + "node_modules/string-width/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -346,10 +2637,448 @@ "node": ">=8" } }, + "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/text-camel-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-camel-case/-/text-camel-case-1.2.11.tgz", + "integrity": "sha512-2ZsM/gOlB1tyza+8lGLvs6gtPuZ9qEYuKPa+gwo38m65wkY4k323SK4hT7ku8r5wIKyspUYIWSk1aB9/Jjxr7A==", + "license": "MIT", + "dependencies": { + "text-pascal-case": "^1.2.11" + } + }, + "node_modules/text-capital-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-capital-case/-/text-capital-case-1.2.11.tgz", + "integrity": "sha512-30A7B7+VUvevEmPE0xWK1Z2z0ncl/JTjSUBLfjpoXrkwuPpmNTVbjHShRTN3cX9GIuZn/P3jvR+TO9JiTZcl8A==", + "license": "MIT", + "dependencies": { + "text-no-case": "^1.2.11", + "text-upper-case-first": "^1.2.11" + } + }, + "node_modules/text-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-case/-/text-case-1.2.11.tgz", + "integrity": "sha512-LbdWNQeuXWbfav+pxBxvaefkziffMYeSA53BHp52cgJa9rjiC0dkjum9AKrH8iQWoQJ4InGPSGexLeerGFaZ1Q==", + "license": "MIT", + "dependencies": { + "text-camel-case": "^1.2.11", + "text-capital-case": "^1.2.11", + "text-constant-case": "^1.2.11", + "text-dot-case": "^1.2.11", + "text-header-case": "^1.2.11", + "text-is-lower-case": "^1.2.11", + "text-is-upper-case": "^1.2.11", + "text-kebab-case": "^1.2.11", + "text-lower-case": "^1.2.11", + "text-lower-case-first": "^1.2.11", + "text-no-case": "^1.2.11", + "text-param-case": "^1.2.11", + "text-pascal-case": "^1.2.11", + "text-path-case": "^1.2.11", + "text-sentence-case": "^1.2.11", + "text-snake-case": "^1.2.11", + "text-swap-case": "^1.2.11", + "text-title-case": "^1.2.11", + "text-upper-case": "^1.2.11", + "text-upper-case-first": "^1.2.11" + } + }, + "node_modules/text-constant-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-constant-case/-/text-constant-case-1.2.11.tgz", + "integrity": "sha512-XnTBILsa7UpMWncUCchqIybZlg15FUcrlyNaWIJ8ybPy54qcoN513EXFswueyizuAgyJFXPCwwSFbSji6kw/Uw==", + "license": "MIT", + "dependencies": { + "text-no-case": "^1.2.11", + "text-upper-case": "^1.2.11" + } + }, + "node_modules/text-dot-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-dot-case/-/text-dot-case-1.2.11.tgz", + "integrity": "sha512-7SLKiT45KZO0qad0+p+GvC0+F+6pZ851HJcTcBJiSF88HsK/e1qErlGLtVBT6hkTHIaAj48WfSyQr4lZRv1xJQ==", + "license": "MIT", + "dependencies": { + "text-no-case": "^1.2.11" + } + }, + "node_modules/text-header-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-header-case/-/text-header-case-1.2.11.tgz", + "integrity": "sha512-7OBHd2g7X+aH6rXMC3cANFh6yvhXjXkyumw2NaRwJRIk343pP2e1SQCTCfowPDmmi8wkZVqz1fdWNq5LwvcBOQ==", + "license": "MIT", + "dependencies": { + "text-capital-case": "^1.2.11" + } + }, + "node_modules/text-is-lower-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-is-lower-case/-/text-is-lower-case-1.2.11.tgz", + "integrity": "sha512-dBqPAkNmX7eTM7ZbS3D/UBCQ5i9EXt5tujF2wIGGbZ1+aN8bY7Qda4mDpxgd6Hbzf/z10uQWRNzupl99wFQ8CQ==", + "license": "MIT" + }, + "node_modules/text-is-upper-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-is-upper-case/-/text-is-upper-case-1.2.11.tgz", + "integrity": "sha512-MZeUIYEYfKZ2FSeg0vnHCH4mHXLgGzes+iz2K+4BYnhnkEa2svKA1nNjQAqTUiVNHOPqPCuzmUr1LsyQZ73uyA==", + "license": "MIT" + }, + "node_modules/text-kebab-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-kebab-case/-/text-kebab-case-1.2.11.tgz", + "integrity": "sha512-RIg9iN6VwH+JrX9dFdm1nd1efPGR9LjNc0CiQz496sQETeKGkDEzxES/ZzxbkerrAL2DFEMGdLXckzDz1OEDBQ==", + "license": "MIT", + "dependencies": { + "text-no-case": "^1.2.11" + } + }, + "node_modules/text-lower-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-lower-case/-/text-lower-case-1.2.11.tgz", + "integrity": "sha512-txTy6y0y8M23Lhf0mk8WcvXTqlf4OQ3AGnDsRB6o3uMNfIa0CJDol2s1PdKNa63rt5B2277zkZCCn6Xeq//big==", + "license": "MIT" + }, + "node_modules/text-lower-case-first": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-lower-case-first/-/text-lower-case-first-1.2.11.tgz", + "integrity": "sha512-QR483XLyuyIpq8tKu1ds3Q1jfsgfaa/p9rtoQKHe6Rv5ah9ic/SUzTGN0MQ7UIS9APADd8SUPn5TTh1Z2/ACyg==", + "license": "MIT" + }, + "node_modules/text-no-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-no-case/-/text-no-case-1.2.11.tgz", + "integrity": "sha512-wazS7FEq0Ct3aJzeE8MEMcSs0eW4+/X/fwdotv/rG66bLS+g1T0pa0gUsbBGjjLFs191AIXVIry+bYE0uaaBBQ==", + "license": "MIT", + "dependencies": { + "text-lower-case": "^1.2.11" + } + }, + "node_modules/text-param-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-param-case/-/text-param-case-1.2.11.tgz", + "integrity": "sha512-3EMMAMLSz/mJXOnATNnrS+dZAvghpq09VhOVYDOkUnbm5zlYc6iU5AZOKVDpiAVVllQ9P1h5IKVZzsEYrdIRGw==", + "license": "MIT", + "dependencies": { + "text-dot-case": "^1.2.11" + } + }, + "node_modules/text-pascal-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-pascal-case/-/text-pascal-case-1.2.11.tgz", + "integrity": "sha512-BNhQ1O/g/Q4dH5gPyLIJLDLDknl2dipBwV629ScsiZCKJaCLGXYhTXp23rp9Htg3O5OSSsiU3mqDKq+pBmwTSw==", + "license": "MIT", + "dependencies": { + "text-no-case": "^1.2.11" + } + }, + "node_modules/text-path-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-path-case/-/text-path-case-1.2.11.tgz", + "integrity": "sha512-FsJU4BmMdtLtmnBK/XRJPqTwLF8yFiTEClHjxlQjSAG5Xt9R4p6D1WNaM1CI2dG5Lr4rsFM4jiVC620m0AsRbw==", + "license": "MIT", + "dependencies": { + "text-dot-case": "^1.2.11" + } + }, + "node_modules/text-sentence-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-sentence-case/-/text-sentence-case-1.2.11.tgz", + "integrity": "sha512-ApiVsvdLy+Wb8x7mZRVuoy8VO12jJ22G2djVM3ZZbUhXVIkqGgHxmiXRwdhRPoWGojK9n53m7jviJgBVNdRn+g==", + "license": "MIT", + "dependencies": { + "text-no-case": "^1.2.11", + "text-upper-case-first": "^1.2.11" + } + }, + "node_modules/text-snake-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-snake-case/-/text-snake-case-1.2.11.tgz", + "integrity": "sha512-NOEQvjyyVABB41SS8dUx423Y6hWS+Z4TrAAJg1xzCkOD3q9y0JtdJjCvCA1FWI8oDu+HiIOp/N446uDM8j54XQ==", + "license": "MIT", + "dependencies": { + "text-dot-case": "^1.2.11" + } + }, + "node_modules/text-swap-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-swap-case/-/text-swap-case-1.2.11.tgz", + "integrity": "sha512-PBmC5xvZdDZ4suikydpeXH0s4JV2XHelMj9/OEXEbA3oLpdV2A+B4BspVDWVw7C2Gi5eCareqk/7EE8I1/WwgQ==", + "license": "MIT" + }, + "node_modules/text-title-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-title-case/-/text-title-case-1.2.11.tgz", + "integrity": "sha512-V1GZy0XlqdkYUQm0tqm1jqtYlXJqFVMreBCTUReOaz8d/JbozTSpZrcakIeV8+1bN7LsvfhPFhA5zREiax6YIA==", + "license": "MIT", + "dependencies": { + "text-no-case": "^1.2.11", + "text-upper-case-first": "^1.2.11" + } + }, + "node_modules/text-upper-case": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-upper-case/-/text-upper-case-1.2.11.tgz", + "integrity": "sha512-BfTL7yB1YIRlVGNdZUvno013hOq2cRs07fDR2ApppOXRDuKrEmsLDEY82xXlDzQHELp0jexqkI+NeyPIl6MtMw==", + "license": "MIT" + }, + "node_modules/text-upper-case-first": { + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/text-upper-case-first/-/text-upper-case-first-1.2.11.tgz", + "integrity": "sha512-vgfbwKo8TEJbRsapR9LWWvIJRnv8u9aXVa6cyYOAQQmurCx54Cnt59x5fKdiq+hFaBJ51AbzCgMpbP3p65/pHQ==", + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/ts-morph": { + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-28.0.0.tgz", + "integrity": "sha512-Wp3tnZ2bzwxyTZMtgWVzXDfm7lB1Drz+y9DmmYH/L702PQhPyVrp3pkou3yIz4qjS14GY9kcpmLiOOMvl8oG1g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@ts-morph/common": "~0.29.0", + "code-block-writer": "^13.0.3" + } + }, + "node_modules/ts-to-zod": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ts-to-zod/-/ts-to-zod-5.1.0.tgz", + "integrity": "sha512-giqqlvRHunlJqG9tBL/KAO3wWIVZGF//mZiWLKm/fdQnKnz4EN2mtiK5cugN9slytBkdMEXQIaLvMzIScbhhFw==", + "license": "MIT", + "peer": true, + "dependencies": { + "@clack/prompts": "1.0.0-alpha.4", + "@oclif/core": "^4.5.4", + "@typescript/vfs": "^1.5.0", + "chokidar": "^4.0.3", + "listr2": "^9.0.4", + "slash": "^5.1.0", + "text-case": "^1.2.4", + "tslib": "^2.3.1", + "tsutils": "^3.21.0", + "typescript": "^5.2.2", + "zod": "^4.1.5" + }, + "bin": { + "ts-to-zod": "bin/run" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" + }, + "node_modules/tsx": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.4.tgz", + "integrity": "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/undici-types": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "version": "6.21.0", + "license": "MIT" + }, + "node_modules/vite": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.0.tgz", + "integrity": "sha512-BuJcQK/56NQTWDGn4ABea3q4SSBdNPWwNZKTkkUpcMPnLoquSYH8llRtSUIgoL1KSCpHt5eghLShn50mH36y7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.4", + "postcss": "^8.5.15", + "rolldown": "~1.1.2", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.3.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "license": "MIT", + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "license": "MIT" }, "node_modules/wrap-ansi": { @@ -369,6 +3098,42 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -379,9 +3144,9 @@ } }, "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", "license": "MIT", "dependencies": { "cliui": "^8.0.1", @@ -404,6 +3169,27 @@ "engines": { "node": ">=12" } + }, + "node_modules/zod": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", + "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-ts": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/zod-to-ts/-/zod-to-ts-2.1.0.tgz", + "integrity": "sha512-jZP1GokTqR99FLmtGU+B9acjD9u/R++b++Vxe1sWpBQDd82/9/j5LyLZZ7/Oy3h2nxcz5NihikgX4D0hhdu3+g==", + "license": "MIT", + "peer": true, + "peerDependencies": { + "typescript": "^5 || ^6", + "zod": "^3.25.0 || ^4.0.0" + } } } } diff --git a/actions/gls-action/package.json b/actions/gls-action/package.json index 1fcf26d..56fa32d 100644 --- a/actions/gls-action/package.json +++ b/actions/gls-action/package.json @@ -1,18 +1,23 @@ { "name": "@code0-tech/gls-action", - "version": "0.0.0", + "version": "1.0.0", "private": true, "type": "module", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "dist/index.js", "scripts": { + "dev": "tsx watch src/index.ts", + "typecheck": "tsc --noEmit", "build": "vite build", - "lint": "eslint .", - "test": "vitest run", - "start": "node dist/main.js", - "generate:docs": "npm run build && node dist/generateDocs.js" + "start": "node dist/index.js" }, "dependencies": { - "ts-morph": "^27.0.2" + "@code0-tech/hercules": "^1.0.0", + "axios": "^1.7.7" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "tsx": "^4.0.0", + "typescript": "^5.9.3", + "vite": "^8.0.3" } } diff --git a/actions/gls-action/scripts/generateDocs.ts b/actions/gls-action/scripts/generateDocs.ts deleted file mode 100644 index d417468..0000000 --- a/actions/gls-action/scripts/generateDocs.ts +++ /dev/null @@ -1,59 +0,0 @@ -import {runStandardActionDocs, StandardActionDocsConfig} from "../../../src/standardActionDocs" -import {loadAllDefinitions} from "../src/helpers"; - -export function createGlsDocsConfig(): StandardActionDocsConfig { - return { - actionName: "GLS", - typePrefix: "GLS_", - typesOutputPath: "../../docs/Actions/GLS/types.mdx", - functionsOutputPath: "../../docs/Actions/GLS/functions.mdx", - loadAllDefinitions, - typeLinkOverrides: { - GLS_SHIPMENT_UNIT_SERVICE: "GLS_SHIPMENT_UNIT$Service", - }, - typesCopy: { - 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.\nThese types are used as inputs and outputs of the GLS functions and can be referenced in your flows.`, - }, - functionsCopy: { - title: "Functions", - description: "All functions registered by the GLS Action.", - intro: `The GLS Action exposes functions grouped into three categories: - -- **Builder functions** — Construct data objects (no API call) -- **Shipment functions** — Create different types of GLS shipments (calls GLS API) -- **API functions** — Query or modify shipments (calls GLS API)`, - }, - functionGroups: [ - { - heading: "Builder functions", - modules: import.meta.glob("../src/functions/utils/*.ts"), - }, - { - 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\`. - -**Common parameters for all shipment functions:** - -| Parameter | Type | Required | Description | -|-------------------|-------------------------------|----------|----------------------------------------------------| -| \`shipment\` | GLS_SHIPMENT_WITHOUT_SERVICES | **Yes** | Shipment data (consignee, shipper, units, product) | -| \`printingOptions\` | GLS_PRINTING_OPTIONS | **Yes** | Label format settings | -| \`returnOptions\` | GLS_RETURN_OPTIONS | No | Whether to return print data and routing info | -| \`customContent\` | GLS_CUSTOM_CONTENT | No | Custom logo and barcode settings | - ----`, - modules: import.meta.glob("../src/functions/services/*.ts"), - }, - { - heading: "API functions", - modules: import.meta.glob("../src/functions/*.ts"), - }, - ], - } -} - -await runStandardActionDocs(createGlsDocsConfig()) diff --git a/actions/gls-action/src/config/authUrl.ts b/actions/gls-action/src/config/authUrl.ts deleted file mode 100644 index 9cef67e..0000000 --- a/actions/gls-action/src/config/authUrl.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; - -export default (sdk: ActionSdk) => { - return sdk.registerConfigDefinitions( - { - identifier: "auth_url", - type: "TEXT", - defaultValue: "https://api.gls-group.net/oauth2/v2/token", - name: [ - { - code: "en-US", - content: "The Auth API url" - } - ], - description: [ - { - code: "en-US", - content: "The url of the Auth api ending in /token." - } - ], - linkedDataTypes: ["STRING"], - }, - ) -} diff --git a/actions/gls-action/src/config/clientId.ts b/actions/gls-action/src/config/clientId.ts deleted file mode 100644 index 15a5729..0000000 --- a/actions/gls-action/src/config/clientId.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; - -export default (sdk: ActionSdk) => { - return sdk.registerConfigDefinitions( - { - identifier: "client_id", - type: "TEXT", - name: [ - { - code: "en-US", - content: "Client ID" - } - ], - description: [ - { - code: "en-US", - content: "The client id to authenticate with the GLS API" - } - ], - linkedDataTypes: ["TEXT"], - }, - ) -} diff --git a/actions/gls-action/src/config/clientSecret.ts b/actions/gls-action/src/config/clientSecret.ts deleted file mode 100644 index e6a0bcd..0000000 --- a/actions/gls-action/src/config/clientSecret.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; - -export default (sdk: ActionSdk) => { - return sdk.registerConfigDefinitions( - { - identifier: "client_secret", - type: "TEXT", - name: [ - { - code: "en-US", - content: "Client secret" - } - ], - description: [ - { - code: "en-US", - content: "The client secret to authenticate with the GLS API" - } - ], - linkedDataTypes: ["TEXT"], - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/config/contactId.ts b/actions/gls-action/src/config/contactId.ts deleted file mode 100644 index c2368df..0000000 --- a/actions/gls-action/src/config/contactId.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; - -export default (sdk: ActionSdk) => { - return sdk.registerConfigDefinitions( - { - identifier: "contact_id", - type: "TEXT", - name: [ - { - code: "en-US", - content: "Contact ID" - } - ], - description: [ - { - code: "en-US", - content: "The contact id identifying the GLS account to use for the API requests. This contact must be linked to a GLS contract with API access." - } - ], - defaultValue: "", - linkedDataTypes: ["TEXT"], - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/config/defaultShipper.ts b/actions/gls-action/src/config/defaultShipper.ts deleted file mode 100644 index 65877ed..0000000 --- a/actions/gls-action/src/config/defaultShipper.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; - -export default (sdk: ActionSdk) => { - return sdk.registerConfigDefinitions( - { - identifier: "default_shipper", - type: "GLS_SHIPPER", - name: [ - { - code: "en-US", - content: "Shipper" - } - ], - description: [ - { - code: "en-US", - content: "The shipper information to use for the shipments. This will be used if the shipper information is not provided in the shipment data." - } - ], - linkedDataTypes: ["GLS_SHIPPER"] - } - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/config/shipItApiUrl.ts b/actions/gls-action/src/config/shipItApiUrl.ts deleted file mode 100644 index 6e325c6..0000000 --- a/actions/gls-action/src/config/shipItApiUrl.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; - -export default (sdk: ActionSdk) => { - return sdk.registerConfigDefinitions( - { - identifier: "ship_it_api_url", - type: "TEXT", - defaultValue: " https://api.gls-group.net/shipit-farm/v1/backend/rs", - name: [ - { - code: "en-US", - content: "The ShipIt API url" - } - ], - description: [ - { - code: "en-US", - content: "The url of the GLS ShipIt API." - } - ], - linkedDataTypes: ["TEXT"], - }, - ) -} diff --git a/actions/gls-action/src/data_types/glsAddress.ts b/actions/gls-action/src/data_types/glsAddress.ts new file mode 100644 index 0000000..b8a95cc --- /dev/null +++ b/actions/gls-action/src/data_types/glsAddress.ts @@ -0,0 +1,25 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const AddressSchema = z.object({ + Name1: z.string().max(40).describe("Primary name line (person or company). Max 40 characters."), + Name2: z.string().max(40).optional().describe("Optional second name line (e.g., department or additional identifier). Max 40 characters."), + Name3: z.string().max(40).optional().describe("Optional third name line for extended address details. Max 40 characters."), + CountryCode: z.string().max(2).describe("Two-letter ISO country code (e.g., DE, US)."), + Province: z.string().max(40).optional().describe("State, province, or region. Optional field. Max 40 characters."), + City: z.string().max(40).describe("City or locality name. Max 40 characters."), + Street: z.string().min(4).describe("Street name. Minimum 4 characters required."), + StreetNumber: z.string().max(40).optional().describe("House or building number. Optional field. Max 40 characters."), + ContactPerson: z.string().max(40).min(6).optional().describe("Full name of a contact person. Optional field. Must be between 6 and 40 characters."), + FixedLinePhonenumber: z.string().max(35).min(4).optional().describe("Landline phone number. Optional field. Must be between 4 and 35 characters."), + MobilePhonenumber: z.string().max(35).min(4).optional().describe("Mobile phone number. Optional field. Must be between 4 and 35 characters."), + eMail: z.string().max(80).optional().describe("Email address. Optional field. Max 80 characters."), + ZIPCode: z.string().max(10).describe("Postal or ZIP code. Max 10 characters."), +}); +export type Address = z.infer; + +@Identifier("GLS_ADDRESS") +@Name({ code: "en-US", content: "Address" }) +@DisplayMessage({ code: "en-US", content: "Address" }) +@Schema(AddressSchema) +export class GlsAddressDataType {} diff --git a/actions/gls-action/src/data_types/glsAllowedServices.ts b/actions/gls-action/src/data_types/glsAllowedServices.ts new file mode 100644 index 0000000..3e97c95 --- /dev/null +++ b/actions/gls-action/src/data_types/glsAllowedServices.ts @@ -0,0 +1,41 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const AllowedServicesRequestDataSchema = z.object({ + Source: z.object({ + CountryCode: z.string().max(2), + ZIPCode: z.string().max(10), + }), + Destination: z.object({ + CountryCode: z.string().max(2), + ZIPCode: z.string().max(10), + }), + ContactID: z.string().optional(), +}); +export type AllowedServicesRequestData = z.infer; + +export const AllowedServicesResponseDataSchema = z.object({ + AllowedServices: z.array( + z.union([ + z.object({ + ServiceName: z.string(), + }).strict(), + z.object({ + ProductName: z.string(), + }).strict(), + ]) + ), +}); +export type AllowedServicesResponseData = z.infer; + +@Identifier("GLS_ALLOWED_SERVICES_REQUEST_DATA") +@Name({ code: "en-US", content: "Allowed services request data" }) +@DisplayMessage({ code: "en-US", content: "Allowed services request data" }) +@Schema(AllowedServicesRequestDataSchema) +export class GlsAllowedServicesRequestDataType {} + +@Identifier("GLS_ALLOWED_SERVICES_RESPONSE_DATA") +@Name({ code: "en-US", content: "Allowed services response data" }) +@DisplayMessage({ code: "en-US", content: "Allowed services response data" }) +@Schema(AllowedServicesResponseDataSchema) +export class GlsAllowedServicesResponseDataType {} diff --git a/actions/gls-action/src/data_types/glsCancelShipment.ts b/actions/gls-action/src/data_types/glsCancelShipment.ts new file mode 100644 index 0000000..7c73474 --- /dev/null +++ b/actions/gls-action/src/data_types/glsCancelShipment.ts @@ -0,0 +1,25 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const CancelShipmentRequestDataSchema = z.object({ + TrackID: z.string(), +}); +export type CancelShipmentRequestData = z.infer; + +export const CancelShipmentResponseDataSchema = z.object({ + TrackID: z.string(), + result: z.enum(["CANCELLED", "CANCELLATION_PENDING", "SCANNED", "ERROR"]), +}); +export type CancelShipmentResponseData = z.infer; + +@Identifier("GLS_CANCEL_SHIPMENT_REQUEST_DATA") +@Name({ code: "en-US", content: "Cancel shipment request data" }) +@DisplayMessage({ code: "en-US", content: "Cancel shipment request data" }) +@Schema(CancelShipmentRequestDataSchema) +export class GlsCancelShipmentRequestDataType {} + +@Identifier("GLS_CANCEL_SHIPMENT_RESPONSE_DATA") +@Name({ code: "en-US", content: "Cancel shipment response data" }) +@DisplayMessage({ code: "en-US", content: "Cancel shipment response data" }) +@Schema(CancelShipmentResponseDataSchema) +export class GlsCancelShipmentResponseDataType {} diff --git a/actions/gls-action/src/data_types/glsConsignee.ts b/actions/gls-action/src/data_types/glsConsignee.ts new file mode 100644 index 0000000..e798e56 --- /dev/null +++ b/actions/gls-action/src/data_types/glsConsignee.ts @@ -0,0 +1,17 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; +import { AddressSchema } from "./glsAddress.js"; + +export const ConsigneeSchema = z.object({ + ConsigneeID: z.string().max(40).optional(), + CostCenter: z.string().max(80).optional(), + Category: z.enum(["BUSINESS", "PRIVATE"]).optional(), + Address: AddressSchema, +}); +export type Consignee = z.infer; + +@Identifier("GLS_CONSIGNEE") +@Name({ code: "en-US", content: "Consignee" }) +@DisplayMessage({ code: "en-US", content: "Consignee" }) +@Schema(ConsigneeSchema) +export class GlsConsigneeDataType {} diff --git a/actions/gls-action/src/data_types/glsCreateParcelsResponse.ts b/actions/gls-action/src/data_types/glsCreateParcelsResponse.ts new file mode 100644 index 0000000..da16554 --- /dev/null +++ b/actions/gls-action/src/data_types/glsCreateParcelsResponse.ts @@ -0,0 +1,43 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const CreateParcelsResponseSchema = z.object({ + CreatedShipment: z.object({ + ShipmentReference: z.array(z.string()), + ParcelData: z.array( + z.object({ + TrackID: z.string().min(8).max(8), + ParcelNumber: z.string(), + Barcodes: z.object({ + Primary2D: z.string(), + Secondary2D: z.string(), + Primary1D: z.string(), + Primary1DPrint: z.boolean(), + }), + RoutingInfo: z.object({ + Tour: z.string(), + InboundSortingFlag: z.string(), + FinalLocationCode: z.string(), + LastRoutingDate: z.iso.date(), + HubLocation: z.string(), + }), + }) + ), + PrintData: z.array( + z.object({ + Data: z.string(), + LabelFormat: z.enum(["PDF", "ZEBRA", "INTERMEC", "DATAMAX", "TOSHIBA", "PNG"]), + }) + ), + CustomerID: z.string(), + PickupLocation: z.string(), + GDPR: z.array(z.string()), + }), +}); +export type CreateParcelsResponse = z.infer; + +@Identifier("GLS_CREATE_PARCELS_RESPONSE") +@Name({ code: "en-US", content: "Create parcels response" }) +@DisplayMessage({ code: "en-US", content: "Create parcels response" }) +@Schema(CreateParcelsResponseSchema) +export class GlsCreateParcelsResponseDataType {} diff --git a/actions/gls-action/src/data_types/glsCustomContent.ts b/actions/gls-action/src/data_types/glsCustomContent.ts new file mode 100644 index 0000000..540ee72 --- /dev/null +++ b/actions/gls-action/src/data_types/glsCustomContent.ts @@ -0,0 +1,17 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const CustomContentSchema = z.object({ + CustomerLogo: z.string(), + BarcodeContentType: z.enum(["TRACK_ID", "GLS_SHIPMENT_REFERENCE"]), + Barcode: z.string().optional(), + BarcodeType: z.enum(["EAN_128", "CODE_39"]).optional(), + HideShipperAddress: z.boolean().optional(), +}); +export type CustomContent = z.infer; + +@Identifier("GLS_CUSTOM_CONTENT") +@Name({ code: "en-US", content: "Custom content" }) +@DisplayMessage({ code: "en-US", content: "Custom content" }) +@Schema(CustomContentSchema) +export class GlsCustomContentDataType {} diff --git a/actions/gls-action/src/data_types/glsEndOfDay.ts b/actions/gls-action/src/data_types/glsEndOfDay.ts new file mode 100644 index 0000000..494f6c3 --- /dev/null +++ b/actions/gls-action/src/data_types/glsEndOfDay.ts @@ -0,0 +1,44 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; +import { AddressSchema } from "./glsAddress.js"; + +export const EndOfDayRequestDataSchema = z.object({ + date: z.iso.date(), +}); +export type EndOfDayRequestData = z.infer; + +export const EndOfDayResponseDataSchema = z.object({ + Shipments: z.array( + z.object({ + ShippingDate: z.iso.date(), + Product: z.enum(["PARCEL", "EXPRESS"]), + Consignee: z.object({ + Address: AddressSchema, + }), + Shipper: z.object({ + ContactID: z.string(), + AlternativeShipperAddress: AddressSchema.optional(), + }), + ShipmentUnit: z.array( + z.object({ + Weight: z.string(), + TrackID: z.string(), + ParcelNumber: z.string(), + }) + ).optional(), + }) + ).optional(), +}); +export type EndOfDayResponseData = z.infer; + +@Identifier("GLS_END_OF_DAY_REQUEST_DATA") +@Name({ code: "en-US", content: "End of day request data" }) +@DisplayMessage({ code: "en-US", content: "End of day request data" }) +@Schema(EndOfDayRequestDataSchema) +export class GlsEndOfDayRequestDataType {} + +@Identifier("GLS_END_OF_DAY_RESPONSE_DATA") +@Name({ code: "en-US", content: "End of day response data" }) +@DisplayMessage({ code: "en-US", content: "End of day response data" }) +@Schema(EndOfDayResponseDataSchema) +export class GlsEndOfDayResponseDataType {} diff --git a/actions/gls-action/src/data_types/glsPrintingOptions.ts b/actions/gls-action/src/data_types/glsPrintingOptions.ts new file mode 100644 index 0000000..9181206 --- /dev/null +++ b/actions/gls-action/src/data_types/glsPrintingOptions.ts @@ -0,0 +1,49 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const ReturnLabelsSchema = z.object({ + TemplateSet: z.enum([ + "NONE", + "D_200", + "PF_4_I", + "PF_4_I_200", + "PF_4_I_300", + "PF_8_D_200", + "T_200_BF", + "T_300_BF", + "ZPL_200", + "ZPL_200_TRACKID_EAN_128", + "ZPL_200_TRACKID_CODE_39", + "ZPL_200_REFNO_EAN_128", + "ZPL_200_REFNO_CODE_39", + "ZPL_300", + "ZPL_300_TRACKID_EAN_128", + "ZPL_300_TRACKID_CODE_39", + "ZPL_300_REFNO_EAN_128", + "ZPL_300_REFNO_CODE_39", + ]), + LabelFormat: z.enum(["PDF", "ZEBRA", "INTERMEC", "DATAMAX", "TOSHIBA", "PNG"]), +}); +export type ReturnLabels = z.infer; + +export const PrintingOptionsSchema = z.object({ + ReturnLabels: ReturnLabelsSchema.optional(), + useDefault: z.string().max(7).optional(), + DefinePrinter: z.object({ + LabelPrinter: z.string().max(255).optional(), + DocumentPrinter: z.string().max(255).optional(), + }).optional(), +}); +export type PrintingOptions = z.infer; + +@Identifier("RETURN_LABELS") +@Name({ code: "en-US", content: "Return Labels" }) +@DisplayMessage({ code: "en-US", content: "Return Labels" }) +@Schema(ReturnLabelsSchema) +export class ReturnLabelsDataType {} + +@Identifier("GLS_PRINTING_OPTIONS") +@Name({ code: "en-US", content: "Printing Options" }) +@DisplayMessage({ code: "en-US", content: "Printing Options" }) +@Schema(PrintingOptionsSchema) +export class GlsPrintingOptionsDataType {} diff --git a/actions/gls-action/src/data_types/glsReprintParcel.ts b/actions/gls-action/src/data_types/glsReprintParcel.ts new file mode 100644 index 0000000..6e98957 --- /dev/null +++ b/actions/gls-action/src/data_types/glsReprintParcel.ts @@ -0,0 +1,65 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const ReprintParcelRequestDataSchema = z.object({ + TrackID: z.string().max(8).optional(), + ParcelNumber: z.number().max(999999999999).optional(), + ShipmentReference: z.string().max(40).optional(), + ShipmentUnitReference: z.string().max(40).optional(), + PartnerParcelNumber: z.string().max(50).optional(), + CreationDate: z.iso.date(), + PrintingOptions: z.object({ + ReturnLabels: z.object({ + TemplateSet: z.enum(["NONE", "ZPL_200", "ZPL_300"]), + LabelFormat: z.enum(["PDF", "ZEBRA", "PNG", "PNG_200"]), + }), + }), +}); +export type ReprintParcelRequestData = z.infer; + +export const ReprintParcelResponseDataSchema = z.object({ + CreatedShipment: z.object({ + ParcelData: z.array( + z.object({ + TrackID: z.string().min(8).max(8), + ShipmentUnitReference: z.array(z.string()).optional(), + ParcelNumber: z.string(), + Barcodes: z.object({ + Primary2D: z.string(), + Secondary2D: z.string(), + Primary1D: z.string(), + Primary1DPrint: z.boolean(), + }), + RoutingInfo: z.object({ + Tour: z.string(), + InboundSortingFlag: z.string(), + FinalLocationCode: z.string(), + LastRoutingDate: z.iso.date(), + HubLocation: z.string(), + }), + }) + ), + PrintData: z.array( + z.object({ + Data: z.string(), + LabelFormat: z.enum(["PDF", "ZEBRA", "PNG", "PNG_200"]), + }) + ), + CustomerID: z.string(), + PickupLocation: z.string(), + GDPR: z.array(z.string()), + }), +}); +export type ReprintParcelResponseData = z.infer; + +@Identifier("GLS_REPRINT_PARCEL_REQUEST_DATA") +@Name({ code: "en-US", content: "Reprint parcel request data" }) +@DisplayMessage({ code: "en-US", content: "Reprint parcel request data" }) +@Schema(ReprintParcelRequestDataSchema) +export class GlsReprintParcelRequestDataType {} + +@Identifier("GLS_REPRINT_PARCEL_RESPONSE_DATA") +@Name({ code: "en-US", content: "Reprint parcel response data" }) +@DisplayMessage({ code: "en-US", content: "Reprint parcel response data" }) +@Schema(ReprintParcelResponseDataSchema) +export class GlsReprintParcelResponseDataType {} diff --git a/actions/gls-action/src/data_types/glsReturnOptions.ts b/actions/gls-action/src/data_types/glsReturnOptions.ts new file mode 100644 index 0000000..bebbdd7 --- /dev/null +++ b/actions/gls-action/src/data_types/glsReturnOptions.ts @@ -0,0 +1,14 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const ReturnOptionsSchema = z.object({ + ReturnPrintData: z.boolean().default(true).optional(), + ReturnRoutingInfo: z.boolean().default(true).optional(), +}); +export type ReturnOptions = z.infer; + +@Identifier("GLS_RETURN_OPTIONS") +@Name({ code: "en-US", content: "Return Options" }) +@DisplayMessage({ code: "en-US", content: "Return Options" }) +@Schema(ReturnOptionsSchema) +export class GlsReturnOptionsDataType {} diff --git a/actions/gls-action/src/data_types/glsShipment.ts b/actions/gls-action/src/data_types/glsShipment.ts new file mode 100644 index 0000000..fb9cae8 --- /dev/null +++ b/actions/gls-action/src/data_types/glsShipment.ts @@ -0,0 +1,47 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; +import { ConsigneeSchema } from "./glsConsignee.js"; +import { AddressSchema } from "./glsAddress.js"; +import { InternalShipmentServiceSchema, ShipmentServiceSchema } from "./glsShipmentService.js"; +import { InternalShipmentUnitSchema, ShipmentUnitSchema } from "./glsShipmentUnit.js"; +import { InternalShipperSchema, ShipperSchema } from "./glsShipper.js"; + +export const ShipmentSchema = z.object({ + ShipmentReference: z.string().max(40).optional(), + ShipmentDate: z.iso.date().optional(), + IncotermCode: z.int().max(99).optional(), + Identifier: z.string().max(40).optional(), + Product: z.enum(["PARCEL", "EXPRESS"]).default("PARCEL"), + ExpressAltDeliveryAllowed: z.boolean().optional(), + Consignee: ConsigneeSchema, + Shipper: ShipperSchema.optional(), + Carrier: z.enum(["ROYALMAIL"]).optional(), + ShipmentUnit: z.lazy(() => ShipmentUnitSchema), + Service: z.lazy(() => ShipmentServiceSchema), + Return: z.object({ + Address: AddressSchema, + }).optional(), +}); +export type Shipment = z.infer; + +export const ShipmentWithoutServicesSchema = ShipmentSchema.omit({ Service: true }); +export type ShipmentWithoutServices = z.infer; + +export const InternalShipmentSchema = ShipmentSchema.extend({ + Middleware: z.string().max(40), + Shipper: InternalShipperSchema, + Service: z.lazy(() => InternalShipmentServiceSchema), + ShipmentUnit: z.lazy(() => InternalShipmentUnitSchema), +}); + +@Identifier("GLS_SHIPMENT") +@Name({ code: "en-US", content: "Shipment" }) +@DisplayMessage({ code: "en-US", content: "Shipment" }) +@Schema(ShipmentSchema) +export class GlsShipmentDataType {} + +@Identifier("GLS_SHIPMENT_WITHOUT_SERVICES") +@Name({ code: "en-US", content: "Shipment without services" }) +@DisplayMessage({ code: "en-US", content: "Shipment without services" }) +@Schema(ShipmentWithoutServicesSchema) +export class GlsShipmentWithoutServicesDataType {} diff --git a/actions/gls-action/src/data_types/glsShipmentService.ts b/actions/gls-action/src/data_types/glsShipmentService.ts new file mode 100644 index 0000000..1ee1e0b --- /dev/null +++ b/actions/gls-action/src/data_types/glsShipmentService.ts @@ -0,0 +1,191 @@ +import { z } from "zod"; +import { AddressSchema } from "./glsAddress.js"; + +export const ShipmentServiceSchema = z.array( + z.object({ + Service: z.object({ + serviceName: z.string(), + }).optional(), + ShopDelivery: z.object({ + ParcelShopID: z.string().max(50), + }).optional(), + ShopReturn: z.object({ + NumberOfLabels: z.number(), + ReturnQR: z.enum(["PDF", "PNG", "ZPL"]).optional(), + }).optional(), + Intercompany: z.object({ + Address: AddressSchema, + NumberOfLabels: z.number().min(1), + ExpectedWeight: z.number().min(1).optional(), + }).optional(), + Exchange: z.object({ + Address: AddressSchema, + ExpectedWeight: z.number().min(1).optional(), + }).optional(), + DeliveryAtWork: z.object({ + RecipientName: z.string().max(40), + AlternateRecipientName: z.string().max(40).optional(), + Building: z.string().max(40), + Floor: z.number(), + Room: z.number().optional(), + Phonenumber: z.string().max(35).optional(), + }).optional(), + Deposit: z.object({ + PlaceOfDeposit: z.string().max(121), + }).optional(), + IdentPin: z.object({ + PIN: z.string().max(4), + Birthdate: z.iso.date().optional(), + }).optional(), + Ident: z.object({ + Birthdate: z.iso.date(), + Firstname: z.string().max(40), + Lastname: z.string().max(40), + Nationality: z.string().max(2), + }).optional(), + PickAndShip: z.object({ + PickupDate: z.iso.date(), + }).optional(), + PickAndReturn: z.object({ + PickupDate: z.iso.date(), + }).optional(), + InboundLogistics: z.object({}).optional(), + DocumentReturnService: z.object({}).optional(), + CompleteDeliveryConsignmentService: z.object({}).optional(), + FlexDeliveryService: z.object({}).optional(), + SignatureService: z.object({}).optional(), + T24Service: z.object({}).optional(), + T48Service: z.object({}).optional(), + Guaranteed24Service: z.object({}).optional(), + AddresseeOnlyService: z.object({}).optional(), + TyreService: z.object({}).optional(), + "0800Service": z.object({}).optional(), + "0900Service": z.object({}).optional(), + "1000Service": z.object({}).optional(), + "1200Service": z.object({}).optional(), + "1300Service": z.object({}).optional(), + EOB: z.object({}).optional(), + Saturday1000Service: z.object({}).optional(), + Saturday1200Service: z.object({}).optional(), + SaturdayService: z.object({}).optional(), + }) +).optional(); +export type ShipmentService = z.infer; + +export const InternalShipmentServiceSchema = z.array( + z.object({ + Service: z.object({ + serviceName: z.string(), + }).optional(), + ShopDelivery: z.object({ + serviceName: z.string().default("service_shopdelivery"), + ParcelShopID: z.string().max(50), + }).optional(), + ShopReturn: z.object({ + serviceName: z.string().default("service_shopreturn"), + NumberOfLabels: z.number(), + ReturnQR: z.enum(["PDF", "PNG", "ZPL"]).optional(), + }).optional(), + Intercompany: z.object({ + serviceName: z.string().default("service_intercompany"), + Address: AddressSchema, + NumberOfLabels: z.number().min(1), + ExpectedWeight: z.number().min(1).optional(), + }).optional(), + Exchange: z.object({ + serviceName: z.string().default("service_exchange"), + Address: AddressSchema, + ExpectedWeight: z.number().min(1).optional(), + }).optional(), + DeliveryAtWork: z.object({ + serviceName: z.string().default("service_deliveryatwork"), + RecipientName: z.string().max(40), + AlternateRecipientName: z.string().max(40).optional(), + Building: z.string().max(40), + Floor: z.number(), + Room: z.number().optional(), + Phonenumber: z.string().max(35).optional(), + }).optional(), + Deposit: z.object({ + serviceName: z.string().default("service_deposit"), + PlaceOfDeposit: z.string().max(121), + }).optional(), + IdentPin: z.object({ + serviceName: z.string().default("service_identpin"), + PIN: z.string().max(4), + Birthdate: z.iso.date().optional(), + }).optional(), + Ident: z.object({ + serviceName: z.string().default("service_ident"), + Birthdate: z.iso.date(), + Firstname: z.string().max(40), + Lastname: z.string().max(40), + Nationality: z.string().max(2), + }).optional(), + PickAndShip: z.object({ + serviceName: z.string().default("service_pickandship"), + PickupDate: z.iso.date(), + }).optional(), + PickAndReturn: z.object({ + serviceName: z.string().default("service_pickandreturn"), + PickupDate: z.iso.date(), + }).optional(), + InboundLogistics: z.object({ + serviceName: z.string().default("service_inbound"), + }).optional(), + DocumentReturnService: z.object({ + serviceName: z.string().default("service_documentreturn"), + }).optional(), + CompleteDeliveryConsignmentService: z.object({ + serviceName: z.string().default("service_completedeliveryconsignment"), + }).optional(), + FlexDeliveryService: z.object({ + serviceName: z.string().default("service_flexdelivery"), + }).optional(), + SignatureService: z.object({ + serviceName: z.string().default("service_signature"), + }).optional(), + T24Service: z.object({ + serviceName: z.string().default("service_t24"), + }).optional(), + T48Service: z.object({ + serviceName: z.string().default("service_t48"), + }).optional(), + Guaranteed24Service: z.object({ + serviceName: z.string().default("service_guaranteed24"), + }).optional(), + AddresseeOnlyService: z.object({ + serviceName: z.string().default("service_addresseeonly"), + }).optional(), + TyreService: z.object({ + serviceName: z.string().default("service_tyre"), + }).optional(), + EOB: z.object({ + serviceName: z.string().default("service_eob"), + }).optional(), + "0800Service": z.object({ + serviceName: z.string().default("service_0800"), + }).optional(), + "0900Service": z.object({ + serviceName: z.string().default("service_0900"), + }).optional(), + "1000Service": z.object({ + serviceName: z.string().default("service_1000"), + }).optional(), + "1200Service": z.object({ + serviceName: z.string().default("service_1200"), + }).optional(), + "1300Service": z.object({ + serviceName: z.string().default("service_1300"), + }).optional(), + Saturday1000Service: z.object({ + serviceName: z.string().default("service_saturday_1000"), + }).optional(), + Saturday1200Service: z.object({ + serviceName: z.string().default("service_saturday_1200"), + }).optional(), + SaturdayService: z.object({ + serviceName: z.string().default("service_Saturday"), + }).optional(), + }) +).optional(); diff --git a/actions/gls-action/src/data_types/glsShipmentUnit.ts b/actions/gls-action/src/data_types/glsShipmentUnit.ts new file mode 100644 index 0000000..da0de0f --- /dev/null +++ b/actions/gls-action/src/data_types/glsShipmentUnit.ts @@ -0,0 +1,28 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; +import { InternalUnitServiceSchema, UnitServiceSchema } from "./glsUnitService.js"; + +export const ShipmentUnitSchema = z.array( + z.object({ + ShipmentUnitReference: z.string().max(40).optional(), + PartnerParcelNumber: z.string().max(50).optional(), + Weight: z.number().min(0.1).max(99), + Note1: z.string().max(50).optional(), + Note2: z.string().max(50).optional(), + Service: UnitServiceSchema, + }) +).min(1); +export type ShipmentUnit = z.infer; + +export const InternalShipmentUnitSchema = ShipmentUnitSchema.element + .extend({ + Service: InternalUnitServiceSchema.optional(), + }) + .array() + .min(1); + +@Identifier("GLS_SHIPMENT_UNIT") +@Name({ code: "en-US", content: "Shipment Unit" }) +@DisplayMessage({ code: "en-US", content: "Shipment Unit" }) +@Schema(ShipmentUnitSchema) +export class GlsShipmentUnitDataType {} diff --git a/actions/gls-action/src/data_types/glsShipper.ts b/actions/gls-action/src/data_types/glsShipper.ts new file mode 100644 index 0000000..cd95505 --- /dev/null +++ b/actions/gls-action/src/data_types/glsShipper.ts @@ -0,0 +1,20 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; +import { AddressSchema } from "./glsAddress.js"; + +export const ShipperSchema = z.object({ + AlternativeShipperAddress: AddressSchema.optional(), + Address: AddressSchema.optional(), +}); +export type ShipperSchemaType = z.infer; + +export const InternalShipperSchema = ShipperSchema.extend({ + ContactID: z.string().optional(), +}); +export type InternalShipper = z.infer; + +@Identifier("GLS_SHIPPER") +@Name({ code: "en-US", content: "Shipper" }) +@DisplayMessage({ code: "en-US", content: "Shipper" }) +@Schema(ShipperSchema) +export class GlsShipperDataType {} diff --git a/actions/gls-action/src/data_types/glsUnitService.ts b/actions/gls-action/src/data_types/glsUnitService.ts new file mode 100644 index 0000000..caed30d --- /dev/null +++ b/actions/gls-action/src/data_types/glsUnitService.ts @@ -0,0 +1,69 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const UnitServiceSchema = z.array( + z.object({ + Cash: z.object({ + Reason: z.string().max(160), + Amount: z.number().min(1), + Currency: z.string().max(3).min(3), + }).optional(), + AddonLiability: z.object({ + Amount: z.number().min(1), + Currency: z.string().max(3).min(3), + ParcelContent: z.string().max(255), + }).optional(), + HazardousGoods: z.object({ + HarzardousGood: z.array( + z.object({ + Weight: z.number().min(1), + GLSHazNo: z.string().max(8), + }) + ), + }).optional(), + ExWorks: z.object({}).optional(), + LimitedQuantities: z.object({ + Weight: z.number().optional(), + }).optional(), + }) +).optional(); +export type UnitService = z.infer; + +export const InternalUnitServiceSchema = z.array( + z.object({ + Cash: z.object({ + serviceName: z.string().default("service_cash"), + Reason: z.string(), + Amount: z.number(), + Currency: z.string(), + }).optional(), + AddonLiability: z.object({ + serviceName: z.string().default("service_addonliability"), + Amount: z.number(), + Currency: z.string(), + ParcelContent: z.string(), + }).optional(), + HazardousGoods: z.object({ + serviceName: z.string().default("service_hazardousgoods"), + HarzardousGood: z.array( + z.object({ + Weight: z.number(), + GLSHazNo: z.string(), + }) + ), + }).optional(), + ExWorks: z.object({ + serviceName: z.string().default("service_exworks"), + }).optional(), + LimitedQuantities: z.object({ + serviceName: z.string().default("service_limitedquantities"), + Weight: z.number().optional(), + }).optional(), + }) +).optional(); + +@Identifier("GLS_UNIT_SERVICE") +@Name({ code: "en-US", content: "GLS unit service" }) +@DisplayMessage({ code: "en-US", content: "GLS unit service" }) +@Schema(UnitServiceSchema) +export class GlsUnitServiceDataType {} diff --git a/actions/gls-action/src/data_types/glsUpdateParcelWeight.ts b/actions/gls-action/src/data_types/glsUpdateParcelWeight.ts new file mode 100644 index 0000000..aaf386b --- /dev/null +++ b/actions/gls-action/src/data_types/glsUpdateParcelWeight.ts @@ -0,0 +1,29 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; + +export const UpdateParcelWeightRequestDataSchema = z.object({ + TrackID: z.string().max(8).optional(), + ParcelNumber: z.number().max(999999999999).optional(), + ShipmentReference: z.string().max(40).optional(), + ShipmentUnitReference: z.string().max(40).optional(), + PartnerParcelNumber: z.string().max(50).optional(), + Weight: z.number().min(0.1), +}); +export type UpdateParcelWeightRequestData = z.infer; + +export const UpdateParcelWeightResponseDataSchema = z.object({ + UpdatedWeight: z.string(), +}); +export type UpdateParcelWeightResponseData = z.infer; + +@Identifier("GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA") +@Name({ code: "en-US", content: "Update parcel weight request data" }) +@DisplayMessage({ code: "en-US", content: "Update parcel weight request data" }) +@Schema(UpdateParcelWeightRequestDataSchema) +export class GlsUpdateParcelWeightRequestDataType {} + +@Identifier("GLS_UPDATE_PARCEL_WEIGHT_RESPONSE_DATA") +@Name({ code: "en-US", content: "Update parcel weight response data" }) +@DisplayMessage({ code: "en-US", content: "Update parcel weight response data" }) +@Schema(UpdateParcelWeightResponseDataSchema) +export class GlsUpdateParcelWeightResponseDataType {} diff --git a/actions/gls-action/src/data_types/glsValidateShipment.ts b/actions/gls-action/src/data_types/glsValidateShipment.ts new file mode 100644 index 0000000..26b51ef --- /dev/null +++ b/actions/gls-action/src/data_types/glsValidateShipment.ts @@ -0,0 +1,39 @@ +import { DisplayMessage, Identifier, Name, Schema } from "@code0-tech/hercules"; +import { z } from "zod"; +import { InternalShipmentSchema, ShipmentSchema } from "./glsShipment.js"; + +export const ValidateShipmentRequestDataSchema = z.object({ + Shipment: ShipmentSchema, +}); +export type ValidateShipmentRequestData = z.infer; + +export const ValidateShipmentResponseDataSchema = z.object({ + success: z.boolean(), + validationResult: z.object({ + Issues: z.array( + z.object({ + Rule: z.string(), + Location: z.string(), + Parameters: z.array(z.string()).optional(), + }) + ), + }), +}); +export type ValidateShipmentResponseData = z.infer; + +export const InternalValidateShipmentRequestDataSchema = z.object({ + Shipment: InternalShipmentSchema, +}); +export type InternalValidateShipmentRequestData = z.infer; + +@Identifier("GLS_VALIDATE_SHIPMENT_REQUEST_DATA") +@Name({ code: "en-US", content: "Validate shipment request data" }) +@DisplayMessage({ code: "en-US", content: "Validate shipment request data" }) +@Schema(ValidateShipmentRequestDataSchema) +export class GlsValidateShipmentRequestDataType {} + +@Identifier("GLS_VALIDATE_SHIPMENT_RESPONSE_DATA") +@Name({ code: "en-US", content: "Validate shipment response data" }) +@DisplayMessage({ code: "en-US", content: "Validate shipment response data" }) +@Schema(ValidateShipmentResponseDataSchema) +export class GlsValidateShipmentResponseDataType {} diff --git a/actions/gls-action/src/types/shipmentRequest.ts b/actions/gls-action/src/data_types/shipmentRequest.ts similarity index 53% rename from actions/gls-action/src/types/shipmentRequest.ts rename to actions/gls-action/src/data_types/shipmentRequest.ts index d2509a8..4ff5a03 100644 --- a/actions/gls-action/src/types/shipmentRequest.ts +++ b/actions/gls-action/src/data_types/shipmentRequest.ts @@ -1,17 +1,18 @@ -import z from "zod" -import {InternalShipmentSchma, ShipmentSchema} from "./glsShipment"; -import {PrintingOptionsSchema} from "./glsPrintingOptions"; -import {ReturnOptionsSchema} from "./glsReturnOptions"; -import {CustomContentSchema} from "./glsCustomContent"; +import { z } from "zod"; +import { InternalShipmentSchema, ShipmentSchema } from "./glsShipment.js"; +import { PrintingOptionsSchema } from "./glsPrintingOptions.js"; +import { ReturnOptionsSchema } from "./glsReturnOptions.js"; +import { CustomContentSchema } from "./glsCustomContent.js"; export const ShipmentRequestDataSchema = z.object({ Shipment: ShipmentSchema, PrintingOptions: PrintingOptionsSchema, ReturnOptions: ReturnOptionsSchema.optional(), CustomContent: CustomContentSchema.optional(), -}) +}); +export type ShipmentRequestData = z.infer; + export const InternalShipmentRequestDataSchema = ShipmentRequestDataSchema.extend({ - Shipment: InternalShipmentSchma, -}) -export type InternalShipmentRequestData = z.infer -export type ShipmentRequestData = z.infer \ No newline at end of file + Shipment: InternalShipmentSchema, +}); +export type InternalShipmentRequestData = z.infer; diff --git a/actions/gls-action/src/functions/cancelShipment.ts b/actions/gls-action/src/functions/cancelShipment.ts deleted file mode 100644 index a032f4a..0000000 --- a/actions/gls-action/src/functions/cancelShipment.ts +++ /dev/null @@ -1,69 +0,0 @@ -import {ActionSdk, HerculesFunctionContext, RuntimeErrorException} from "@code0-tech/hercules"; -import {cancelShipment} from "../helpers"; -import {CancelShipmentRequestData, CancelShipmentResponseData} from "../types/glsCancelShipment"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "cancelShipment", - documentation: [ - { - code: "en-US", - content: "Cancels an existing shipment by its Track ID. Only possible if the parcel has not yet been scanned." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Cancel shipment" - } - ], - name: [ - { - code: "en-US", - content: "Cancel shipment", - } - ], - description: [ - { - code: "en-US", - content: "Cancels an existing shipment by its Track ID. Only possible if the parcel has not yet been scanned.", - } - ], - signature: "(data: GLS_CANCEL_SHIPMENT_REQUEST_DATA): GLS_CANCEL_SHIPMENT_RESPONSE_DATA", - parameters: [ - { - runtimeName: "data", - name: [ - { - code: "en-US", - content: "Data", - } - ], - description: [ - { - code: "en-US", - content: "The cancel shipment request data.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_VALIDATE_SHIPMENT_REQUEST_DATA", - "GLS_VALIDATE_SHIPMENT_RESPONSE_DATA", - ], - }, - handler: async (data: CancelShipmentRequestData, context: HerculesFunctionContext): Promise => { - try { - return await cancelShipment(data, context) - } catch (error) { - if (typeof error === "string") { - throw new RuntimeErrorException("ERROR_CREATING_GLS_SHIPMENT", error) - } - throw new RuntimeErrorException("ERROR_CREATING_GLS_SHIPMENT", "An error occurred while creating the shipment.") - } - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/cancelShipmentFunction.ts b/actions/gls-action/src/functions/cancelShipmentFunction.ts new file mode 100644 index 0000000..cb028ee --- /dev/null +++ b/actions/gls-action/src/functions/cancelShipmentFunction.ts @@ -0,0 +1,46 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + RuntimeError, + Signature, +} from "@code0-tech/hercules"; +import { cancelShipment } from "../helpers.js"; +import { + CancelShipmentRequestData, + CancelShipmentResponseData, +} from "../data_types/glsCancelShipment.js"; + +@Identifier("cancelShipment") +@Signature("(data: GLS_CANCEL_SHIPMENT_REQUEST_DATA): GLS_CANCEL_SHIPMENT_RESPONSE_DATA") +@Name({ code: "en-US", content: "Cancel shipment" }) +@DisplayMessage({ code: "en-US", content: "Cancel shipment" }) +@Documentation({ + code: "en-US", + content: "Cancels an existing shipment by its Track ID. Only possible if the parcel has not yet been scanned.", +}) +@Description({ + code: "en-US", + content: "Cancels an existing shipment by its Track ID. Only possible if the parcel has not yet been scanned.", +}) +@Parameter({ + runtimeName: "data", + name: [{ code: "en-US", content: "Data" }], + description: [{ code: "en-US", content: "The cancel shipment request data." }], +}) +export class CancelShipmentFunction { + async run(context: FunctionContext, data: CancelShipmentRequestData): Promise { + try { + return await cancelShipment(data, context); + } catch (error) { + if (typeof error === "string") { + throw new RuntimeError("ERROR_CREATING_GLS_SHIPMENT", error); + } + throw new RuntimeError("ERROR_CREATING_GLS_SHIPMENT", "An error occurred while creating the shipment."); + } + } +} diff --git a/actions/gls-action/src/functions/getAllowedServices.ts b/actions/gls-action/src/functions/getAllowedServices.ts deleted file mode 100644 index 545242a..0000000 --- a/actions/gls-action/src/functions/getAllowedServices.ts +++ /dev/null @@ -1,81 +0,0 @@ -import {ActionSdk, HerculesFunctionContext, RuntimeErrorException} from "@code0-tech/hercules"; -import {getAuthToken} from "../helpers"; -import axios from "axios"; -import { - AllowedServicesRequestData, - AllowedServicesResponseData, - AllowedServicesResponseDataSchema -} from "../types/glsAllowedServices"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "getAllowedServices", - documentation: [ - { - code: "en-US", - content: "Returns the GLS services available for a given origin/destination country and ZIP code combination." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Get allowed services" - } - ], - name: [ - { - code: "en-US", - content: "Get allowed services", - } - ], - description: [ - { - code: "en-US", - content: "Returns the GLS services available for a given origin/destination country and ZIP code combination.", - } - ], - signature: "(data: GLS_ALLOWED_SERVICES_REQUEST_DATA): GLS_ALLOWED_SERVICES_RESPONSE_DATA", - parameters: [ - { - runtimeName: "data", - name: [ - { - code: "en-US", - content: "Data", - } - ], - description: [ - { - code: "en-US", - content: "The allowed services request data.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_ALLOWED_SERVICES_REQUEST_DATA", - "GLS_ALLOWED_SERVICES_RESPONSE_DATA", - ], - }, - handler: async (data: AllowedServicesRequestData, context: HerculesFunctionContext): Promise => { - try { - const url = context.matchedConfig.findConfig("ship_it_api_url") as string; - const result = await axios.post(`${url}/rs/shipments/allowedservices`, data, { - headers: { - Authorization: `Bearer ${await getAuthToken(context)}`, - "Content-Type": "application/glsVersion1+json" - } - }) - return AllowedServicesResponseDataSchema.parse(result.data) - } catch (error) { - if (typeof error === "string") { - throw new RuntimeErrorException("ERROR_CREATING_GLS_SHIPMENT", error) - } - throw new RuntimeErrorException("ERROR_CREATING_GLS_SHIPMENT", "An error occurred while creating the shipment.") - } - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/getAllowedServicesFunction.ts b/actions/gls-action/src/functions/getAllowedServicesFunction.ts new file mode 100644 index 0000000..ab7e088 --- /dev/null +++ b/actions/gls-action/src/functions/getAllowedServicesFunction.ts @@ -0,0 +1,55 @@ +import axios from "axios"; +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + RuntimeError, + Signature, +} from "@code0-tech/hercules"; +import { getAuthToken } from "../helpers.js"; +import { + AllowedServicesRequestData, + AllowedServicesResponseData, + AllowedServicesResponseDataSchema, +} from "../data_types/glsAllowedServices.js"; + +@Identifier("getAllowedServices") +@Signature("(data: GLS_ALLOWED_SERVICES_REQUEST_DATA): GLS_ALLOWED_SERVICES_RESPONSE_DATA") +@Name({ code: "en-US", content: "Get allowed services" }) +@DisplayMessage({ code: "en-US", content: "Get allowed services" }) +@Documentation({ + code: "en-US", + content: "Returns the GLS services available for a given origin/destination country and ZIP code combination.", +}) +@Description({ + code: "en-US", + content: "Returns the GLS services available for a given origin/destination country and ZIP code combination.", +}) +@Parameter({ + runtimeName: "data", + name: [{ code: "en-US", content: "Data" }], + description: [{ code: "en-US", content: "The allowed services request data." }], +}) +export class GetAllowedServicesFunction { + async run(context: FunctionContext, data: AllowedServicesRequestData): Promise { + try { + const url = context.matchedConfig.findConfig("ship_it_api_url") as string; + const result = await axios.post(`${url}/rs/shipments/allowedservices`, data, { + headers: { + Authorization: `Bearer ${await getAuthToken(context)}`, + "Content-Type": "application/glsVersion1+json", + }, + }); + return AllowedServicesResponseDataSchema.parse(result.data); + } catch (error) { + if (typeof error === "string") { + throw new RuntimeError("ERROR_CREATING_GLS_SHIPMENT", error); + } + throw new RuntimeError("ERROR_CREATING_GLS_SHIPMENT", "An error occurred while creating the shipment."); + } + } +} diff --git a/actions/gls-action/src/functions/getEndOfDayReport.ts b/actions/gls-action/src/functions/getEndOfDayReport.ts deleted file mode 100644 index 9fe77b9..0000000 --- a/actions/gls-action/src/functions/getEndOfDayReport.ts +++ /dev/null @@ -1,76 +0,0 @@ -import {ActionSdk, HerculesFunctionContext, RuntimeErrorException} from "@code0-tech/hercules"; -import {getAuthToken} from "../helpers"; -import axios from "axios"; -import {EndOfDayRequestData, EndOfDayResponseData, EndOfDayResponseDataSchema} from "../types/glsEndOfDayRequest"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "getEndOfDayReport", - documentation: [ - { - code: "en-US", - content: "Retrieves all shipments dispatched on a given date. Useful for reconciliation and end-of-day processing." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Get end of day report" - } - ], - name: [ - { - code: "en-US", - content: "Get end of day report", - } - ], - description: [ - { - code: "en-US", - content: "Retrieves all shipments dispatched on a given date. Useful for reconciliation and end-of-day processing.", - } - ], - signature: "(data: GLS_END_OF_DAY_REQUEST_DATA): GLS_END_OF_DAY_RESPONSE_DATA", - parameters: [ - { - runtimeName: "data", - name: [ - { - code: "en-US", - content: "Data", - } - ], - description: [ - { - code: "en-US", - content: "The end of day report request data.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_END_OF_DAY_REQUEST_DATA", - "GLS_END_OF_DAY_RESPONSE_DATA", - ], - }, - handler: async (data: EndOfDayRequestData, context: HerculesFunctionContext): Promise => { - const url = context.matchedConfig.findConfig("ship_it_api_url") as string; - - try { - const result = await axios.post(`${url}/rs/shipments/endofday?date=${data.date}`, {}, { - headers: { - Authorization: `Bearer ${await getAuthToken(context)}`, - "Content-Type": "application/glsVersion1+json" - } - }) - return EndOfDayResponseDataSchema.parse(result.data) - } catch (error: any) { - throw new RuntimeErrorException("GET_END_OF_DAY_INFO_FAILED", error.toString()) - } - - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/getEndOfDayReportFunction.ts b/actions/gls-action/src/functions/getEndOfDayReportFunction.ts new file mode 100644 index 0000000..cadd83b --- /dev/null +++ b/actions/gls-action/src/functions/getEndOfDayReportFunction.ts @@ -0,0 +1,57 @@ +import axios from "axios"; +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + RuntimeError, + Signature, +} from "@code0-tech/hercules"; +import { getAuthToken } from "../helpers.js"; +import { + EndOfDayRequestData, + EndOfDayResponseData, + EndOfDayResponseDataSchema, +} from "../data_types/glsEndOfDay.js"; + +@Identifier("getEndOfDayReport") +@Signature("(data: GLS_END_OF_DAY_REQUEST_DATA): GLS_END_OF_DAY_RESPONSE_DATA") +@Name({ code: "en-US", content: "Get end of day report" }) +@DisplayMessage({ code: "en-US", content: "Get end of day report" }) +@Documentation({ + code: "en-US", + content: "Retrieves all shipments dispatched on a given date. Useful for reconciliation and end-of-day processing.", +}) +@Description({ + code: "en-US", + content: "Retrieves all shipments dispatched on a given date. Useful for reconciliation and end-of-day processing.", +}) +@Parameter({ + runtimeName: "data", + name: [{ code: "en-US", content: "Data" }], + description: [{ code: "en-US", content: "The end of day report request data." }], +}) +export class GetEndOfDayReportFunction { + async run(context: FunctionContext, data: EndOfDayRequestData): Promise { + const url = context.matchedConfig.findConfig("ship_it_api_url") as string; + + try { + const result = await axios.post( + `${url}/rs/shipments/endofday?date=${data.date}`, + {}, + { + headers: { + Authorization: `Bearer ${await getAuthToken(context)}`, + "Content-Type": "application/glsVersion1+json", + }, + } + ); + return EndOfDayResponseDataSchema.parse(result.data); + } catch (error: any) { + throw new RuntimeError("GET_END_OF_DAY_INFO_FAILED", error.toString()); + } + } +} diff --git a/actions/gls-action/src/functions/reprintParcel.ts b/actions/gls-action/src/functions/reprintParcel.ts deleted file mode 100644 index ebfb56c..0000000 --- a/actions/gls-action/src/functions/reprintParcel.ts +++ /dev/null @@ -1,80 +0,0 @@ -import {ActionSdk, HerculesFunctionContext, RuntimeErrorException} from "@code0-tech/hercules"; -import {getAuthToken} from "../helpers"; -import axios from "axios"; -import { - ReprintParcelRequestData, - ReprintParcelResponseData, - ReprintParcelResponseDataSchema -} from "../types/glsReprintParcel"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "reprintParcel", - documentation: [ - { - code: "en-US", - 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: [ - { - code: "en-US", - content: "Reprint parcel" - } - ], - name: [ - { - code: "en-US", - content: "Reprint parcel", - } - ], - description: [ - { - code: "en-US", - 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", - parameters: [ - { - runtimeName: "data", - name: [ - { - code: "en-US", - content: "Data", - } - ], - description: [ - { - code: "en-US", - content: "The reprint parcel request data.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_REPRINT_PARCEL_REQUEST_DATA", - "GLS_REPRINT_PARCEL_RESPONSE_DATA", - ], - }, - handler: async (data: ReprintParcelRequestData, context: HerculesFunctionContext): Promise => { - const url = context.matchedConfig.findConfig("ship_it_api_url") as string; - - try { - const result = await axios.post(`${url}/rs/shipments/reprintparcel`, data, { - headers: { - Authorization: `Bearer ${await getAuthToken(context)}`, - "Content-Type": "application/glsVersion1+json" - } - }) - return ReprintParcelResponseDataSchema.parse(result.data) - } catch (error: any) { - console.log(error) - throw new RuntimeErrorException("REPRINT_PARCEL_FAILED", error.toString()) - } - } - } - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/reprintParcelFunction.ts b/actions/gls-action/src/functions/reprintParcelFunction.ts new file mode 100644 index 0000000..70c9287 --- /dev/null +++ b/actions/gls-action/src/functions/reprintParcelFunction.ts @@ -0,0 +1,54 @@ +import axios from "axios"; +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + RuntimeError, + Signature, +} from "@code0-tech/hercules"; +import { getAuthToken } from "../helpers.js"; +import { + ReprintParcelRequestData, + ReprintParcelResponseData, + ReprintParcelResponseDataSchema, +} from "../data_types/glsReprintParcel.js"; + +@Identifier("reprintParcel") +@Signature("(data: GLS_REPRINT_PARCEL_REQUEST_DATA): GLS_REPRINT_PARCEL_RESPONSE_DATA") +@Name({ code: "en-US", content: "Reprint parcel" }) +@DisplayMessage({ code: "en-US", content: "Reprint parcel" }) +@Documentation({ + code: "en-US", + 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.", +}) +@Description({ + code: "en-US", + 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.", +}) +@Parameter({ + runtimeName: "data", + name: [{ code: "en-US", content: "Data" }], + description: [{ code: "en-US", content: "The reprint parcel request data." }], +}) +export class ReprintParcelFunction { + async run(context: FunctionContext, data: ReprintParcelRequestData): Promise { + const url = context.matchedConfig.findConfig("ship_it_api_url") as string; + + try { + const result = await axios.post(`${url}/rs/shipments/reprintparcel`, data, { + headers: { + Authorization: `Bearer ${await getAuthToken(context)}`, + "Content-Type": "application/glsVersion1+json", + }, + }); + return ReprintParcelResponseDataSchema.parse(result.data); + } catch (error: any) { + console.log(error); + throw new RuntimeError("REPRINT_PARCEL_FAILED", error.toString()); + } + } +} diff --git a/actions/gls-action/src/functions/services/_shared.ts b/actions/gls-action/src/functions/services/_shared.ts new file mode 100644 index 0000000..6fd2fae --- /dev/null +++ b/actions/gls-action/src/functions/services/_shared.ts @@ -0,0 +1,54 @@ +import { Parameter } from "@code0-tech/hercules"; + +export const SHARED_SERVICE_SIGNATURE = + "shipment: GLS_SHIPMENT_WITHOUT_SERVICES, printingOptions: GLS_PRINTING_OPTIONS, returnOptions?: GLS_RETURN_OPTIONS, customContent?: GLS_CUSTOM_CONTENT"; + +export const SharedShipmentParameter = Parameter({ + runtimeName: "shipment", + name: [{ code: "en-US", content: "Shipment" }], + description: [ + { + code: "en-US", + content: + "The shipment for which to create the parcels. Must include all necessary information and services for the shipment.", + }, + ], +}); + +export const SharedPrintingOptionsParameter = Parameter({ + runtimeName: "printingOptions", + name: [{ code: "en-US", content: "Printing options" }], + description: [ + { + code: "en-US", + content: + "The printing options for the shipment. Specifies options for the labels to be printed for the shipment.", + }, + ], +}); + +export const SharedReturnOptionsParameter = Parameter({ + runtimeName: "returnOptions", + name: [{ code: "en-US", content: "Return options" }], + description: [ + { + code: "en-US", + content: + "The return options for the shipment. Specifies options for return shipments.", + }, + ], + optional: true, +}); + +export const SharedCustomContentParameter = Parameter({ + runtimeName: "customContent", + name: [{ code: "en-US", content: "Custom content" }], + description: [ + { + code: "en-US", + content: + "The custom content for the shipment. Specifies options for custom content to be printed on the labels.", + }, + ], + optional: true, +}); diff --git a/actions/gls-action/src/functions/services/createAddresseeOnlyShipment.ts b/actions/gls-action/src/functions/services/createAddresseeOnlyShipment.ts deleted file mode 100644 index 6b9f5cb..0000000 --- a/actions/gls-action/src/functions/services/createAddresseeOnlyShipment.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createAddresseeOnlyShipment", - documentation: [ - { - code: "en-US", - content: "Creates a shipment that can only be delivered to the named addressee (no neighbor delivery)." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create addressee only shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create addressee only shipment", - } - ], - description: [ - { - code: "en-US", - content: "Creates a shipment that can only be delivered to the named addressee (no neighbor delivery).", - } - ], - signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - ): Promise => { - return postShipmentHelper(context, [{ - AddresseeOnlyService: {} - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} - diff --git a/actions/gls-action/src/functions/services/createAddresseeOnlyShipmentFunction.ts b/actions/gls-action/src/functions/services/createAddresseeOnlyShipmentFunction.ts new file mode 100644 index 0000000..50495c5 --- /dev/null +++ b/actions/gls-action/src/functions/services/createAddresseeOnlyShipmentFunction.ts @@ -0,0 +1,50 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createAddresseeOnlyShipment") +@Signature(`(${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create addressee only shipment" }) +@DisplayMessage({ code: "en-US", content: "Create addressee only shipment" }) +@Documentation({ + code: "en-US", + content: "Creates a shipment that can only be delivered to the named addressee (no neighbor delivery).", +}) +@Description({ + code: "en-US", + content: "Creates a shipment that can only be delivered to the named addressee (no neighbor delivery).", +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateAddresseeOnlyShipmentFunction { + async run( + context: FunctionContext, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + return postShipmentHelper(context, [{ AddresseeOnlyService: {} }], shipment, printingOptions, customContent, returnOptions); + } +} diff --git a/actions/gls-action/src/functions/services/createDeliveryAtWorkShipment.ts b/actions/gls-action/src/functions/services/createDeliveryAtWorkShipment.ts deleted file mode 100644 index 75be85b..0000000 --- a/actions/gls-action/src/functions/services/createDeliveryAtWorkShipment.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createDeliveryAtWorkShipment", - documentation: [ - { - code: "en-US", - content: "Delivers a parcel to a specific location within a workplace (building, floor, room)." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create delivery at work shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create delivery at work shipment", - } - ], - description: [ - { - code: "en-US", - content: "Delivers a parcel to a specific location within a workplace (building, floor, room).", - } - ], - signature: `(recipientName: string, building: string, floor: number, ${DEFAULT_SIGNATURE_FOR_SERVICES}, alternateRecipientName?: string, room?: number, phonenumber?: string): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - { - runtimeName: "recipientName", - name: [ - { - code: "en-US", - content: "Recipient name", - } - ], - description: [ - { - code: "en-US", - content: "The recipient name for the delivery at work shipment.", - } - ] - }, - { - runtimeName: "building", - name: [ - { - code: "en-US", - content: "Building", - } - ], - description: [ - { - code: "en-US", - content: "The building of the delivery at work shipment.", - } - ] - }, - { - runtimeName: "floor", - name: [ - { - code: "en-US", - content: "Floor", - } - ], - description: [ - { - code: "en-US", - content: "The floor of the delivery at work shipment.", - } - ] - }, - ...DEFAULT_PARAMETERS_FOR_SERVICES, - { - runtimeName: "alternateRecipientName", - name: [ - { - code: "en-US", - content: "Alternate recipient name", - } - ], - description: [ - { - code: "en-US", - content: "The alternate recipient name for the delivery at work shipment.", - } - ] - }, - { - runtimeName: "room", - name: [ - { - code: "en-US", - content: "Room", - } - ], - description: [ - { - code: "en-US", - content: "The room of the delivery at work shipment.", - } - ] - }, - { - runtimeName: "phonenumber", - name: [ - { - code: "en-US", - content: "Phone number", - } - ], - description: [ - { - code: "en-US", - content: "The phone number for the delivery at work shipment.", - } - ] - } - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - recipientName: string, building: string, floor: number, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - alternateRecipientName?: string, room?: number, phonenumber?: string): Promise => { - return postShipmentHelper(context, [{ - DeliveryAtWork: { - RecipientName: recipientName, - Building: building, - Floor: floor, - AlternateRecipientName: alternateRecipientName, - Room: room, - Phonenumber: phonenumber, - } - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createDeliveryAtWorkShipmentFunction.ts b/actions/gls-action/src/functions/services/createDeliveryAtWorkShipmentFunction.ts new file mode 100644 index 0000000..e29dde5 --- /dev/null +++ b/actions/gls-action/src/functions/services/createDeliveryAtWorkShipmentFunction.ts @@ -0,0 +1,110 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createDeliveryAtWorkShipment") +@Signature( + `(recipientName: string, building: string, floor: number, ${SHARED_SERVICE_SIGNATURE}, alternateRecipientName?: string, room?: number, phonenumber?: string): GLS_CREATE_PARCELS_RESPONSE` +) +@Name({ code: "en-US", content: "Create delivery at work shipment" }) +@DisplayMessage({ code: "en-US", content: "Create delivery at work shipment" }) +@Documentation({ + code: "en-US", + content: "Delivers a parcel to a specific location within a workplace (building, floor, room).", +}) +@Description({ + code: "en-US", + content: "Delivers a parcel to a specific location within a workplace (building, floor, room).", +}) +@Parameter({ + runtimeName: "recipientName", + name: [{ code: "en-US", content: "Recipient name" }], + description: [{ code: "en-US", content: "The recipient name for the delivery at work shipment." }], +}) +@Parameter({ + runtimeName: "building", + name: [{ code: "en-US", content: "Building" }], + description: [{ code: "en-US", content: "The building of the delivery at work shipment." }], +}) +@Parameter({ + runtimeName: "floor", + name: [{ code: "en-US", content: "Floor" }], + description: [{ code: "en-US", content: "The floor of the delivery at work shipment." }], +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +@Parameter({ + runtimeName: "alternateRecipientName", + name: [{ code: "en-US", content: "Alternate recipient name" }], + description: [{ code: "en-US", content: "The alternate recipient name for the delivery at work shipment." }], + optional: true, +}) +@Parameter({ + runtimeName: "room", + name: [{ code: "en-US", content: "Room" }], + description: [{ code: "en-US", content: "The room of the delivery at work shipment." }], + optional: true, +}) +@Parameter({ + runtimeName: "phonenumber", + name: [{ code: "en-US", content: "Phone number" }], + description: [{ code: "en-US", content: "The phone number for the delivery at work shipment." }], + optional: true, +}) +export class CreateDeliveryAtWorkShipmentFunction { + async run( + context: FunctionContext, + recipientName: string, + building: string, + floor: number, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions, + alternateRecipientName?: string, + room?: number, + phonenumber?: string + ): Promise { + return postShipmentHelper( + context, + [ + { + DeliveryAtWork: { + RecipientName: recipientName, + Building: building, + Floor: floor, + AlternateRecipientName: alternateRecipientName, + Room: room, + Phonenumber: phonenumber, + }, + }, + ], + shipment, + printingOptions, + customContent, + returnOptions + ); + } +} diff --git a/actions/gls-action/src/functions/services/createDeliveryNextWorkingDayShipment.ts b/actions/gls-action/src/functions/services/createDeliveryNextWorkingDayShipment.ts deleted file mode 100644 index 845ddaa..0000000 --- a/actions/gls-action/src/functions/services/createDeliveryNextWorkingDayShipment.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext, RuntimeErrorException} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createDeliveryNextWorkingDayShipment", - documentation: [ - { - code: "en-US", - content: "Creates an EXPRESS shipment for delivery on the next working day (EOB service)." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create delivery next working day shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create delivery next working day shipment", - } - ], - description: [ - { - code: "en-US", - content: "Creates an EXPRESS shipment for delivery on the next working day (EOB service).", - } - ], - signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - ): Promise => { - if (shipment.Product != "EXPRESS") { - throw new RuntimeErrorException("INVALID_PRODUCT", "The product for Delivery Next Working Day service must be EXPRESS.") - } - return postShipmentHelper(context, [{ - EOB: {} - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createDeliveryNextWorkingDayShipmentFunction.ts b/actions/gls-action/src/functions/services/createDeliveryNextWorkingDayShipmentFunction.ts new file mode 100644 index 0000000..98bf87b --- /dev/null +++ b/actions/gls-action/src/functions/services/createDeliveryNextWorkingDayShipmentFunction.ts @@ -0,0 +1,54 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + RuntimeError, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createDeliveryNextWorkingDayShipment") +@Signature(`(${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create delivery next working day shipment" }) +@DisplayMessage({ code: "en-US", content: "Create delivery next working day shipment" }) +@Documentation({ + code: "en-US", + content: "Creates an EXPRESS shipment for delivery on the next working day (EOB service).", +}) +@Description({ + code: "en-US", + content: "Creates an EXPRESS shipment for delivery on the next working day (EOB service).", +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateDeliveryNextWorkingDayShipmentFunction { + async run( + context: FunctionContext, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + if (shipment.Product != "EXPRESS") { + throw new RuntimeError("INVALID_PRODUCT", "The product for Delivery Next Working Day service must be EXPRESS."); + } + return postShipmentHelper(context, [{ EOB: {} }], shipment, printingOptions, customContent, returnOptions); + } +} diff --git a/actions/gls-action/src/functions/services/createDeliverySaturdayShipment.ts b/actions/gls-action/src/functions/services/createDeliverySaturdayShipment.ts deleted file mode 100644 index ba00235..0000000 --- a/actions/gls-action/src/functions/services/createDeliverySaturdayShipment.ts +++ /dev/null @@ -1,63 +0,0 @@ -import {ActionSdk, HerculesFunctionContext, RuntimeErrorException} from "@code0-tech/hercules"; -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createDeliverySaturdayShipment", - documentation: [ - { - code: "en-US", - content: "Creates an EXPRESS shipment for Saturday delivery." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create delivery Saturday shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create delivery Saturday shipment", - } - ], - description: [ - { - code: "en-US", - content: "Creates an EXPRESS shipment for Saturday delivery.", - } - ], - signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - ): Promise => { - if (shipment.Product != "EXPRESS") { - throw new RuntimeErrorException("INVALID_PRODUCT", "The product for Delivery Friday service must be EXPRESS.") - } - return postShipmentHelper(context, [{ - SaturdayService: {} - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createDeliverySaturdayShipmentFunction.ts b/actions/gls-action/src/functions/services/createDeliverySaturdayShipmentFunction.ts new file mode 100644 index 0000000..6d44145 --- /dev/null +++ b/actions/gls-action/src/functions/services/createDeliverySaturdayShipmentFunction.ts @@ -0,0 +1,48 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + RuntimeError, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createDeliverySaturdayShipment") +@Signature(`(${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create delivery Saturday shipment" }) +@DisplayMessage({ code: "en-US", content: "Create delivery Saturday shipment" }) +@Documentation({ code: "en-US", content: "Creates an EXPRESS shipment for Saturday delivery." }) +@Description({ code: "en-US", content: "Creates an EXPRESS shipment for Saturday delivery." }) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateDeliverySaturdayShipmentFunction { + async run( + context: FunctionContext, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + if (shipment.Product != "EXPRESS") { + throw new RuntimeError("INVALID_PRODUCT", "The product for Delivery Saturday service must be EXPRESS."); + } + return postShipmentHelper(context, [{ SaturdayService: {} }], shipment, printingOptions, customContent, returnOptions); + } +} diff --git a/actions/gls-action/src/functions/services/createDepositShipment.ts b/actions/gls-action/src/functions/services/createDepositShipment.ts deleted file mode 100644 index 2307cbf..0000000 --- a/actions/gls-action/src/functions/services/createDepositShipment.ts +++ /dev/null @@ -1,78 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createDepositShipment", - documentation: [ - { - code: "en-US", - content: "Delivers a parcel to a designated deposit location (e.g. a garage or shed) without requiring a signature." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create deposit shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create deposit shipment", - } - ], - description: [ - { - code: "en-US", - content: "Delivers a parcel to a designated deposit location (e.g. a garage or shed) without requiring a signature.", - } - ], - signature: `(placeOfDeposit: string, ${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - { - runtimeName: "placeOfDeposit", - name: [ - { - code: "en-US", - content: "Place of deposit", - } - ], - description: [ - { - code: "en-US", - content: "The place of deposit for the delivery.", - } - ] - }, - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: - async (context: HerculesFunctionContext, - placeOfDeposit: string, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions): Promise => { - return postShipmentHelper(context, [{ - Deposit: { - PlaceOfDeposit: placeOfDeposit - } - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createDepositShipmentFunction.ts b/actions/gls-action/src/functions/services/createDepositShipmentFunction.ts new file mode 100644 index 0000000..c283ae4 --- /dev/null +++ b/actions/gls-action/src/functions/services/createDepositShipmentFunction.ts @@ -0,0 +1,64 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createDepositShipment") +@Signature(`(placeOfDeposit: string, ${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create deposit shipment" }) +@DisplayMessage({ code: "en-US", content: "Create deposit shipment" }) +@Documentation({ + code: "en-US", + content: "Delivers a parcel to a designated deposit location (e.g. a garage or shed) without requiring a signature.", +}) +@Description({ + code: "en-US", + content: "Delivers a parcel to a designated deposit location (e.g. a garage or shed) without requiring a signature.", +}) +@Parameter({ + runtimeName: "placeOfDeposit", + name: [{ code: "en-US", content: "Place of deposit" }], + description: [{ code: "en-US", content: "The place of deposit for the delivery." }], +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateDepositShipmentFunction { + async run( + context: FunctionContext, + placeOfDeposit: string, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + return postShipmentHelper( + context, + [{ Deposit: { PlaceOfDeposit: placeOfDeposit } }], + shipment, + printingOptions, + customContent, + returnOptions + ); + } +} diff --git a/actions/gls-action/src/functions/services/createExchangeShipment.ts b/actions/gls-action/src/functions/services/createExchangeShipment.ts deleted file mode 100644 index e9060e5..0000000 --- a/actions/gls-action/src/functions/services/createExchangeShipment.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import { PrintingOptions } from "../../types/glsPrintingOptions"; -import {AddressSchema} from "../../types/glsAddress"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createExchangeShipment", - documentation: [ - { - code: "en-US", - content: "Delivers a new parcel while simultaneously picking up an existing one (exchange)." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create exchange shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create exchange shipment", - } - ], - description: [ - { - code: "en-US", - content: "Delivers a new parcel while simultaneously picking up an existing one (exchange).", - } - ], - signature: `(address: GLS_ADDRESS, ${DEFAULT_SIGNATURE_FOR_SERVICES}, expectedWeight?: number): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - { - runtimeName: "address", - name: [ - { - code: "en-US", - content: "Address", - } - ], - description: [ - { - code: "en-US", - content: "The address of the exchange shipment.", - } - ] - }, - ...DEFAULT_PARAMETERS_FOR_SERVICES, - { - runtimeName: "expectedWeight", - name: [ - { - code: "en-US", - content: "Expected weight", - } - ], - description: [ - { - code: "en-US", - content: "The expected weight for the exchange shipment.", - } - ] - } - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - "GLS_ADDRESS" - ] - }, - handler: async (context: HerculesFunctionContext, - address: AddressSchema, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - expectedWeight?: number): Promise => { - return postShipmentHelper(context, [{ - Exchange: { - Address: address, - ExpectedWeight: expectedWeight - } - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createExchangeShipmentFunction.ts b/actions/gls-action/src/functions/services/createExchangeShipmentFunction.ts new file mode 100644 index 0000000..1cf3114 --- /dev/null +++ b/actions/gls-action/src/functions/services/createExchangeShipmentFunction.ts @@ -0,0 +1,72 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { Address } from "../../data_types/glsAddress.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createExchangeShipment") +@Signature(`(address: GLS_ADDRESS, ${SHARED_SERVICE_SIGNATURE}, expectedWeight?: number): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create exchange shipment" }) +@DisplayMessage({ code: "en-US", content: "Create exchange shipment" }) +@Documentation({ + code: "en-US", + content: "Delivers a new parcel while simultaneously picking up an existing one (exchange).", +}) +@Description({ + code: "en-US", + content: "Delivers a new parcel while simultaneously picking up an existing one (exchange).", +}) +@Parameter({ + runtimeName: "address", + name: [{ code: "en-US", content: "Address" }], + description: [{ code: "en-US", content: "The address of the exchange shipment." }], +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +@Parameter({ + runtimeName: "expectedWeight", + name: [{ code: "en-US", content: "Expected weight" }], + description: [{ code: "en-US", content: "The expected weight for the exchange shipment." }], + optional: true, +}) +export class CreateExchangeShipmentFunction { + async run( + context: FunctionContext, + address: Address, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions, + expectedWeight?: number + ): Promise { + return postShipmentHelper( + context, + [{ Exchange: { Address: address, ExpectedWeight: expectedWeight } }], + shipment, + printingOptions, + customContent, + returnOptions + ); + } +} diff --git a/actions/gls-action/src/functions/services/createFlexDeliveryShipment.ts b/actions/gls-action/src/functions/services/createFlexDeliveryShipment.ts deleted file mode 100644 index 9be4468..0000000 --- a/actions/gls-action/src/functions/services/createFlexDeliveryShipment.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createFlexDeliveryShipment", - documentation: [ - { - code: "en-US", - content: "Creates a shipment with flexible delivery - the recipient can redirect or reschedule delivery." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create flex delivery shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create flex delivery shipment", - } - ], - description: [ - { - code: "en-US", - content: "Creates a shipment with flexible delivery - the recipient can redirect or reschedule delivery.", - } - ], - signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - ): Promise => { - return postShipmentHelper(context, [{ - FlexDeliveryService: {} - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createFlexDeliveryShipmentFunction.ts b/actions/gls-action/src/functions/services/createFlexDeliveryShipmentFunction.ts new file mode 100644 index 0000000..c130364 --- /dev/null +++ b/actions/gls-action/src/functions/services/createFlexDeliveryShipmentFunction.ts @@ -0,0 +1,50 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createFlexDeliveryShipment") +@Signature(`(${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create flex delivery shipment" }) +@DisplayMessage({ code: "en-US", content: "Create flex delivery shipment" }) +@Documentation({ + code: "en-US", + content: "Creates a shipment with flexible delivery - the recipient can redirect or reschedule delivery.", +}) +@Description({ + code: "en-US", + content: "Creates a shipment with flexible delivery - the recipient can redirect or reschedule delivery.", +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateFlexDeliveryShipmentFunction { + async run( + context: FunctionContext, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + return postShipmentHelper(context, [{ FlexDeliveryService: {} }], shipment, printingOptions, customContent, returnOptions); + } +} diff --git a/actions/gls-action/src/functions/services/createGuaranteed24Shipment.ts b/actions/gls-action/src/functions/services/createGuaranteed24Shipment.ts deleted file mode 100644 index f4ce626..0000000 --- a/actions/gls-action/src/functions/services/createGuaranteed24Shipment.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createGuaranteed24Shipment", - documentation: [ - { - code: "en-US", - content: "Creates a shipment with guaranteed delivery within 24 hours." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create guaranteed 24 shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create guaranteed 24 shipment", - } - ], - description: [ - { - code: "en-US", - content: "Creates a shipment with guaranteed delivery within 24 hours.", - } - ], - signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - ): Promise => { - return postShipmentHelper(context, [{ - Guaranteed24Service: {} - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createGuaranteed24ShipmentFunction.ts b/actions/gls-action/src/functions/services/createGuaranteed24ShipmentFunction.ts new file mode 100644 index 0000000..463478f --- /dev/null +++ b/actions/gls-action/src/functions/services/createGuaranteed24ShipmentFunction.ts @@ -0,0 +1,50 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createGuaranteed24Shipment") +@Signature(`(${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create guaranteed 24 shipment" }) +@DisplayMessage({ code: "en-US", content: "Create guaranteed 24 shipment" }) +@Documentation({ + code: "en-US", + content: "Creates a shipment with guaranteed delivery within 24 hours.", +}) +@Description({ + code: "en-US", + content: "Creates a shipment with guaranteed delivery within 24 hours.", +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateGuaranteed24ShipmentFunction { + async run( + context: FunctionContext, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + return postShipmentHelper(context, [{ Guaranteed24Service: {} }], shipment, printingOptions, customContent, returnOptions); + } +} diff --git a/actions/gls-action/src/functions/services/createIdentPinShipment.ts b/actions/gls-action/src/functions/services/createIdentPinShipment.ts deleted file mode 100644 index 881fe57..0000000 --- a/actions/gls-action/src/functions/services/createIdentPinShipment.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createIdentPinShipment", - documentation: [ - { - code: "en-US", - content: "Delivers a parcel with PIN and optional birthdate verification." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create ident pin shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create ident pin shipment", - } - ], - description: [ - { - code: "en-US", - content: "Delivers a parcel with PIN and optional birthdate verification.", - } - ], - signature: `(pin: string, ${DEFAULT_SIGNATURE_FOR_SERVICES}, birthDate: string): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - { - runtimeName: "pin", - name: [ - { - code: "en-US", - content: "Pin", - } - ], - description: [ - { - code: "en-US", - content: "The pin for the ident pin shipment identification.", - } - ] - }, - ...DEFAULT_PARAMETERS_FOR_SERVICES, - { - runtimeName: "birthDate", - name: [ - { - code: "en-US", - content: "Birth date", - } - ], - description: [ - { - code: "en-US", - content: "The birth date for the ident pin shipment identification.", - } - ] - } - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - pin: string, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - birthDate?: string - ): Promise => { - return postShipmentHelper(context, [{ - IdentPin: { - PIN: pin, - Birthdate: birthDate, - } - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createIdentPinShipmentFunction.ts b/actions/gls-action/src/functions/services/createIdentPinShipmentFunction.ts new file mode 100644 index 0000000..a7f361e --- /dev/null +++ b/actions/gls-action/src/functions/services/createIdentPinShipmentFunction.ts @@ -0,0 +1,71 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createIdentPinShipment") +@Signature(`(pin: string, ${SHARED_SERVICE_SIGNATURE}, birthDate?: string): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create ident pin shipment" }) +@DisplayMessage({ code: "en-US", content: "Create ident pin shipment" }) +@Documentation({ + code: "en-US", + content: "Delivers a parcel with PIN and optional birthdate verification.", +}) +@Description({ + code: "en-US", + content: "Delivers a parcel with PIN and optional birthdate verification.", +}) +@Parameter({ + runtimeName: "pin", + name: [{ code: "en-US", content: "Pin" }], + description: [{ code: "en-US", content: "The pin for the ident pin shipment identification." }], +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +@Parameter({ + runtimeName: "birthDate", + name: [{ code: "en-US", content: "Birth date" }], + description: [{ code: "en-US", content: "The birth date for the ident pin shipment identification." }], + optional: true, +}) +export class CreateIdentPinShipmentFunction { + async run( + context: FunctionContext, + pin: string, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions, + birthDate?: string + ): Promise { + return postShipmentHelper( + context, + [{ IdentPin: { PIN: pin, Birthdate: birthDate } }], + shipment, + printingOptions, + customContent, + returnOptions + ); + } +} diff --git a/actions/gls-action/src/functions/services/createIdentShipment.ts b/actions/gls-action/src/functions/services/createIdentShipment.ts deleted file mode 100644 index f1b99c1..0000000 --- a/actions/gls-action/src/functions/services/createIdentShipment.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createIdentShipment", - documentation: [ - { - code: "en-US", - content: "Delivers a parcel with identity verification - the driver checks the recipient's ID document." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create ident shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create ident shipment", - } - ], - description: [ - { - code: "en-US", - content: "Delivers a parcel with identity verification - the driver checks the recipient's ID document.", - } - ], - signature: `(birthDate: string, firstName: string, lastName: string, nationality: string, ${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - { - runtimeName: "birthDate", - name: [ - { - code: "en-US", - content: "Birth date", - } - ], - description: [ - { - code: "en-US", - content: "The birth date for the ident shipment identification.", - } - ] - }, - { - runtimeName: "firstName", - name: [ - { - code: "en-US", - content: "First name", - } - ], - description: [ - { - code: "en-US", - content: "The first name for the ident shipment identification.", - } - ] - }, - { - runtimeName: "lastName", - name: [ - { - code: "en-US", - content: "Last name", - } - ], - description: [ - { - code: "en-US", - content: "The last name for the ident shipment identification.", - } - ] - }, - { - runtimeName: "nationality", - name: [ - { - code: "en-US", - content: "Nationality", - } - ], - description: [ - { - code: "en-US", - content: "The nationality for the ident shipment identification.", - } - ] - }, - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: - async (context: HerculesFunctionContext, - birthDate: string, firstName: string, lastName: string, nationality: string, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - ): Promise => { - return postShipmentHelper(context, [{ - Ident: { - Birthdate: birthDate, - Firstname: firstName, - Lastname: lastName, - Nationality: nationality - } - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createIdentShipmentFunction.ts b/actions/gls-action/src/functions/services/createIdentShipmentFunction.ts new file mode 100644 index 0000000..40cb13c --- /dev/null +++ b/actions/gls-action/src/functions/services/createIdentShipmentFunction.ts @@ -0,0 +1,93 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createIdentShipment") +@Signature( + `(birthDate: string, firstName: string, lastName: string, nationality: string, ${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE` +) +@Name({ code: "en-US", content: "Create ident shipment" }) +@DisplayMessage({ code: "en-US", content: "Create ident shipment" }) +@Documentation({ + code: "en-US", + content: "Delivers a parcel with identity verification - the driver checks the recipient's ID document.", +}) +@Description({ + code: "en-US", + content: "Delivers a parcel with identity verification - the driver checks the recipient's ID document.", +}) +@Parameter({ + runtimeName: "birthDate", + name: [{ code: "en-US", content: "Birth date" }], + description: [{ code: "en-US", content: "The birth date for the ident shipment identification." }], +}) +@Parameter({ + runtimeName: "firstName", + name: [{ code: "en-US", content: "First name" }], + description: [{ code: "en-US", content: "The first name for the ident shipment identification." }], +}) +@Parameter({ + runtimeName: "lastName", + name: [{ code: "en-US", content: "Last name" }], + description: [{ code: "en-US", content: "The last name for the ident shipment identification." }], +}) +@Parameter({ + runtimeName: "nationality", + name: [{ code: "en-US", content: "Nationality" }], + description: [{ code: "en-US", content: "The nationality for the ident shipment identification." }], +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateIdentShipmentFunction { + async run( + context: FunctionContext, + birthDate: string, + firstName: string, + lastName: string, + nationality: string, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + return postShipmentHelper( + context, + [ + { + Ident: { + Birthdate: birthDate, + Firstname: firstName, + Lastname: lastName, + Nationality: nationality, + }, + }, + ], + shipment, + printingOptions, + customContent, + returnOptions + ); + } +} diff --git a/actions/gls-action/src/functions/services/createPickAndShipShipment.ts b/actions/gls-action/src/functions/services/createPickAndShipShipment.ts deleted file mode 100644 index 0836c80..0000000 --- a/actions/gls-action/src/functions/services/createPickAndShipShipment.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createPickAndShipShipment", - documentation: [ - { - code: "en-US", - content: "Schedules a pickup from the consignee's address on a given date." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create pick and ship shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create pick and ship shipment", - } - ], - description: [ - { - code: "en-US", - content: "Schedules a pickup from the consignee's address on a given date.", - } - ], - signature: `(pickupDate: string, ${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - { - runtimeName: "pickupDate", - name: [ - { - code: "en-US", - content: "Pickup date", - } - ], - description: [ - { - code: "en-US", - content: "The pickup date for the pick and ship shipment.", - } - ] - }, - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - pickupDate: string, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - ): Promise => { - return postShipmentHelper(context, [{ - PickAndShip: { - PickupDate: pickupDate - } - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createPickAndShipShipmentFunction.ts b/actions/gls-action/src/functions/services/createPickAndShipShipmentFunction.ts new file mode 100644 index 0000000..04c4cb8 --- /dev/null +++ b/actions/gls-action/src/functions/services/createPickAndShipShipmentFunction.ts @@ -0,0 +1,64 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createPickAndShipShipment") +@Signature(`(pickupDate: string, ${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create pick and ship shipment" }) +@DisplayMessage({ code: "en-US", content: "Create pick and ship shipment" }) +@Documentation({ + code: "en-US", + content: "Schedules a pickup from the consignee's address on a given date.", +}) +@Description({ + code: "en-US", + content: "Schedules a pickup from the consignee's address on a given date.", +}) +@Parameter({ + runtimeName: "pickupDate", + name: [{ code: "en-US", content: "Pickup date" }], + description: [{ code: "en-US", content: "The pickup date for the pick and ship shipment." }], +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreatePickAndShipShipmentFunction { + async run( + context: FunctionContext, + pickupDate: string, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + return postShipmentHelper( + context, + [{ PickAndShip: { PickupDate: pickupDate } }], + shipment, + printingOptions, + customContent, + returnOptions + ); + } +} diff --git a/actions/gls-action/src/functions/services/createShopDeliveryShipment.ts b/actions/gls-action/src/functions/services/createShopDeliveryShipment.ts deleted file mode 100644 index 5e241e6..0000000 --- a/actions/gls-action/src/functions/services/createShopDeliveryShipment.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper, -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import { CreateParcelsResponse } from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createShopDeliveryShipment", - documentation: [ - { - code: "en-US", - content: "Delivers a parcel to a GLS Parcel Shop where the recipient can collect it." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create shop delivery shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create shop delivery shipment", - } - ], - description: [ - { - code: "en-US", - content: "Delivers a parcel to a GLS Parcel Shop where the recipient can collect it.", - } - ], - signature: `(parcelShopId: string, ${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - { - runtimeName: "parcelShopId", - name: [ - { - code: "en-US", - content: "Parcel shop Id", - } - ], - description: [ - { - code: "en-US", - content: "The ID of the parcel shop where the shipment should be delivered.", - } - ] - }, - ...DEFAULT_PARAMETERS_FOR_SERVICES - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES - ] - }, - handler: async (context: HerculesFunctionContext, parcelShopId: string, shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions): Promise => { - return postShipmentHelper(context, [{ - ShopDelivery: { - ParcelShopID: parcelShopId - } - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} diff --git a/actions/gls-action/src/functions/services/createShopDeliveryShipmentFunction.ts b/actions/gls-action/src/functions/services/createShopDeliveryShipmentFunction.ts new file mode 100644 index 0000000..39bfbbd --- /dev/null +++ b/actions/gls-action/src/functions/services/createShopDeliveryShipmentFunction.ts @@ -0,0 +1,64 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createShopDeliveryShipment") +@Signature(`(parcelShopId: string, ${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create shop delivery shipment" }) +@DisplayMessage({ code: "en-US", content: "Create shop delivery shipment" }) +@Documentation({ + code: "en-US", + content: "Delivers a parcel to a GLS Parcel Shop where the recipient can collect it.", +}) +@Description({ + code: "en-US", + content: "Delivers a parcel to a GLS Parcel Shop where the recipient can collect it.", +}) +@Parameter({ + runtimeName: "parcelShopId", + name: [{ code: "en-US", content: "Parcel shop Id" }], + description: [{ code: "en-US", content: "The ID of the parcel shop where the shipment should be delivered." }], +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateShopDeliveryShipmentFunction { + async run( + context: FunctionContext, + parcelShopId: string, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + return postShipmentHelper( + context, + [{ ShopDelivery: { ParcelShopID: parcelShopId } }], + shipment, + printingOptions, + customContent, + returnOptions + ); + } +} diff --git a/actions/gls-action/src/functions/services/createShopReturnShipment.ts b/actions/gls-action/src/functions/services/createShopReturnShipment.ts deleted file mode 100644 index dd86205..0000000 --- a/actions/gls-action/src/functions/services/createShopReturnShipment.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createShopReturnShipment", - documentation: [ - { - code: "en-US", - content: "Creates a return shipment from a GLS Parcel Shop (customer drops off parcel at a shop)." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create shop return shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create shop return shipment", - } - ], - description: [ - { - code: "en-US", - content: "Creates a return shipment from a GLS Parcel Shop (customer drops off parcel at a shop).", - } - ], - signature: `(numberOfLabels: number, ${DEFAULT_SIGNATURE_FOR_SERVICES}, returnQR: "PDF" | "PNG" | "ZPL"): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - { - runtimeName: "numberOfLabels", - name: [ - { - code: "en-US", - content: "The number of labels", - } - ], - description: [ - { - code: "en-US", - content: "The number of labels to be created for the return shipment.", - } - ] - }, - ...DEFAULT_PARAMETERS_FOR_SERVICES, - { - runtimeName: "returnQR", - name: [ - { - code: "en-US", - content: "Return QR", - } - ], - description: [ - { - code: "en-US", - content: "The return QR of the shipment.", - } - ] - } - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES - ] - }, - handler: async (context: HerculesFunctionContext, numberOfLabels: number, shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, returnQR?: "PDF" | "PNG" | "ZPL"): Promise => { - return postShipmentHelper(context, [{ - ShopReturn: { - NumberOfLabels: numberOfLabels, - ReturnQR: returnQR - } - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} diff --git a/actions/gls-action/src/functions/services/createShopReturnShipmentFunction.ts b/actions/gls-action/src/functions/services/createShopReturnShipmentFunction.ts new file mode 100644 index 0000000..1728e79 --- /dev/null +++ b/actions/gls-action/src/functions/services/createShopReturnShipmentFunction.ts @@ -0,0 +1,73 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createShopReturnShipment") +@Signature( + `(numberOfLabels: number, ${SHARED_SERVICE_SIGNATURE}, returnQR?: "PDF" | "PNG" | "ZPL"): GLS_CREATE_PARCELS_RESPONSE` +) +@Name({ code: "en-US", content: "Create shop return shipment" }) +@DisplayMessage({ code: "en-US", content: "Create shop return shipment" }) +@Documentation({ + code: "en-US", + content: "Creates a return shipment from a GLS Parcel Shop (customer drops off parcel at a shop).", +}) +@Description({ + code: "en-US", + content: "Creates a return shipment from a GLS Parcel Shop (customer drops off parcel at a shop).", +}) +@Parameter({ + runtimeName: "numberOfLabels", + name: [{ code: "en-US", content: "The number of labels" }], + description: [{ code: "en-US", content: "The number of labels to be created for the return shipment." }], +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +@Parameter({ + runtimeName: "returnQR", + name: [{ code: "en-US", content: "Return QR" }], + description: [{ code: "en-US", content: "The return QR of the shipment." }], + optional: true, +}) +export class CreateShopReturnShipmentFunction { + async run( + context: FunctionContext, + numberOfLabels: number, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions, + returnQR?: "PDF" | "PNG" | "ZPL" + ): Promise { + return postShipmentHelper( + context, + [{ ShopReturn: { NumberOfLabels: numberOfLabels, ReturnQR: returnQR } }], + shipment, + printingOptions, + customContent, + returnOptions + ); + } +} diff --git a/actions/gls-action/src/functions/services/createSignatureShipment.ts b/actions/gls-action/src/functions/services/createSignatureShipment.ts deleted file mode 100644 index 396bb9a..0000000 --- a/actions/gls-action/src/functions/services/createSignatureShipment.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createSignatureShipment", - documentation: [ - { - code: "en-US", - content: "Creates a shipment that requires a recipient signature upon delivery." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create signature shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create signature shipment", - } - ], - description: [ - { - code: "en-US", - content: "Creates a shipment that requires a recipient signature upon delivery.", - } - ], - signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - ): Promise => { - return postShipmentHelper(context, [{ - SignatureService: {} - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createSignatureShipmentFunction.ts b/actions/gls-action/src/functions/services/createSignatureShipmentFunction.ts new file mode 100644 index 0000000..f34c9f4 --- /dev/null +++ b/actions/gls-action/src/functions/services/createSignatureShipmentFunction.ts @@ -0,0 +1,50 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createSignatureShipment") +@Signature(`(${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create signature shipment" }) +@DisplayMessage({ code: "en-US", content: "Create signature shipment" }) +@Documentation({ + code: "en-US", + content: "Creates a shipment that requires a recipient signature upon delivery.", +}) +@Description({ + code: "en-US", + content: "Creates a shipment that requires a recipient signature upon delivery.", +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateSignatureShipmentFunction { + async run( + context: FunctionContext, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + return postShipmentHelper(context, [{ SignatureService: {} }], shipment, printingOptions, customContent, returnOptions); + } +} diff --git a/actions/gls-action/src/functions/services/createTyreShipment.ts b/actions/gls-action/src/functions/services/createTyreShipment.ts deleted file mode 100644 index faf6837..0000000 --- a/actions/gls-action/src/functions/services/createTyreShipment.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { - DEFAULT_DATA_TYPES_FOR_SERVICES, - DEFAULT_PARAMETERS_FOR_SERVICES, - DEFAULT_SIGNATURE_FOR_SERVICES, postShipmentHelper -} from "../../helpers"; -import {ActionSdk, HerculesFunctionContext} from "@code0-tech/hercules"; -import {ShipmentWithoutServices} from "../../types/glsShipment"; -import {PrintingOptions} from "../../types/glsPrintingOptions"; -import {CustomContent} from "../../types/glsCustomContent"; -import {ReturnOptions} from "../../types/glsReturnOptions"; -import {CreateParcelsResponse} from "../../types/glsCreateParcelsResponse"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createTyreShipment", - documentation: [ - { - code: "en-US", - content: "Creates a shipment specifically for tyre/wheel delivery (uses the GLS TyreService)." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create tyre shipment" - } - ], - name: [ - { - code: "en-US", - content: "Create tyre shipment", - } - ], - description: [ - { - code: "en-US", - content: "Creates a shipment specifically for tyre/wheel delivery (uses the GLS TyreService).", - } - ], - signature: `(${DEFAULT_SIGNATURE_FOR_SERVICES}): GLS_CREATE_PARCELS_RESPONSE`, - parameters: [ - ...DEFAULT_PARAMETERS_FOR_SERVICES, - ], - linkedDataTypes: [ - ...DEFAULT_DATA_TYPES_FOR_SERVICES, - ] - }, - handler: async (context: HerculesFunctionContext, - shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions, - ): Promise => { - return postShipmentHelper(context, [{ - TyreService: {} - }], shipment, printingOptions, customContent, returnOptions) - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/services/createTyreShipmentFunction.ts b/actions/gls-action/src/functions/services/createTyreShipmentFunction.ts new file mode 100644 index 0000000..03093a4 --- /dev/null +++ b/actions/gls-action/src/functions/services/createTyreShipmentFunction.ts @@ -0,0 +1,50 @@ +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Signature, +} from "@code0-tech/hercules"; +import { postShipmentHelper } from "../../helpers.js"; +import { ShipmentWithoutServices } from "../../data_types/glsShipment.js"; +import { CreateParcelsResponse } from "../../data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "../../data_types/glsPrintingOptions.js"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; +import { ReturnOptions } from "../../data_types/glsReturnOptions.js"; +import { + SHARED_SERVICE_SIGNATURE, + SharedCustomContentParameter, + SharedPrintingOptionsParameter, + SharedReturnOptionsParameter, + SharedShipmentParameter, +} from "./_shared.js"; + +@Identifier("createTyreShipment") +@Signature(`(${SHARED_SERVICE_SIGNATURE}): GLS_CREATE_PARCELS_RESPONSE`) +@Name({ code: "en-US", content: "Create tyre shipment" }) +@DisplayMessage({ code: "en-US", content: "Create tyre shipment" }) +@Documentation({ + code: "en-US", + content: "Creates a shipment specifically for tyre/wheel delivery (uses the GLS TyreService).", +}) +@Description({ + code: "en-US", + content: "Creates a shipment specifically for tyre/wheel delivery (uses the GLS TyreService).", +}) +@SharedShipmentParameter +@SharedPrintingOptionsParameter +@SharedCustomContentParameter +@SharedReturnOptionsParameter +export class CreateTyreShipmentFunction { + async run( + context: FunctionContext, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions + ): Promise { + return postShipmentHelper(context, [{ TyreService: {} }], shipment, printingOptions, customContent, returnOptions); + } +} diff --git a/actions/gls-action/src/functions/updateParcelWeight.ts b/actions/gls-action/src/functions/updateParcelWeight.ts deleted file mode 100644 index f1cb59b..0000000 --- a/actions/gls-action/src/functions/updateParcelWeight.ts +++ /dev/null @@ -1,79 +0,0 @@ -import {ActionSdk, HerculesFunctionContext, RuntimeErrorException} from "@code0-tech/hercules"; -import {getAuthToken} from "../helpers"; -import axios from "axios"; -import { - UpdateParcelWeightRequestData, - UpdateParcelWeightResponseData, - UpdateParcelWeightResponseDataSchema -} from "../types/glsUpdateParcelWeight"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "updateParcelWeight", - documentation: [ - { - code: "en-US", - content: "Updates the weight of an already-created parcel. Useful when the final weight is only known after packaging." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Update parcel weight" - } - ], - name: [ - { - code: "en-US", - content: "Update parcel weight", - } - ], - description: [ - { - code: "en-US", - content: "Updates the weight of an already-created parcel. Useful when the final weight is only known after packaging.", - } - ], - signature: "(data: GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA): GLS_END_OF_DAY_RESPONSE_DATA", - parameters: [ - { - runtimeName: "data", - name: [ - { - code: "en-US", - content: "Data", - } - ], - description: [ - { - code: "en-US", - content: "The update parcel weight request data.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA", - "GLS_UPDATE_PARCEL_WEIGHT_RESPONSE_DATA", - ], - }, - handler: async (data: UpdateParcelWeightRequestData, context: HerculesFunctionContext): Promise => { - const url = context.matchedConfig.findConfig("ship_it_api_url") as string; - - try { - const result = await axios.post(`${url}/rs/shipments/updateparcelweight`, data, { - headers: { - Authorization: `Bearer ${await getAuthToken(context)}`, - "Content-Type": "application/glsVersion1+json" - } - }) - return UpdateParcelWeightResponseDataSchema.parse(result.data) - } catch (error: any) { - throw new RuntimeErrorException("UPDATE_PARCEL_WEIGHT_FAILED", error.toString()) - } - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/updateParcelWeightFunction.ts b/actions/gls-action/src/functions/updateParcelWeightFunction.ts new file mode 100644 index 0000000..1d4006a --- /dev/null +++ b/actions/gls-action/src/functions/updateParcelWeightFunction.ts @@ -0,0 +1,53 @@ +import axios from "axios"; +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + RuntimeError, + Signature, +} from "@code0-tech/hercules"; +import { getAuthToken } from "../helpers.js"; +import { + UpdateParcelWeightRequestData, + UpdateParcelWeightResponseData, + UpdateParcelWeightResponseDataSchema, +} from "../data_types/glsUpdateParcelWeight.js"; + +@Identifier("updateParcelWeight") +@Signature("(data: GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA): GLS_UPDATE_PARCEL_WEIGHT_RESPONSE_DATA") +@Name({ code: "en-US", content: "Update parcel weight" }) +@DisplayMessage({ code: "en-US", content: "Update parcel weight" }) +@Documentation({ + code: "en-US", + content: "Updates the weight of an already-created parcel. Useful when the final weight is only known after packaging.", +}) +@Description({ + code: "en-US", + content: "Updates the weight of an already-created parcel. Useful when the final weight is only known after packaging.", +}) +@Parameter({ + runtimeName: "data", + name: [{ code: "en-US", content: "Data" }], + description: [{ code: "en-US", content: "The update parcel weight request data." }], +}) +export class UpdateParcelWeightFunction { + async run(context: FunctionContext, data: UpdateParcelWeightRequestData): Promise { + const url = context.matchedConfig.findConfig("ship_it_api_url") as string; + + try { + const result = await axios.post(`${url}/rs/shipments/updateparcelweight`, data, { + headers: { + Authorization: `Bearer ${await getAuthToken(context)}`, + "Content-Type": "application/glsVersion1+json", + }, + }); + return UpdateParcelWeightResponseDataSchema.parse(result.data); + } catch (error: any) { + throw new RuntimeError("UPDATE_PARCEL_WEIGHT_FAILED", error.toString()); + } + } +} diff --git a/actions/gls-action/src/functions/utils/createAddress.ts b/actions/gls-action/src/functions/utils/createAddress.ts deleted file mode 100644 index 10d3f7d..0000000 --- a/actions/gls-action/src/functions/utils/createAddress.ts +++ /dev/null @@ -1,268 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {AddressSchema} from "../../types/glsAddress"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createAddress", - documentation: [ - { - code: "en-US", - content: "Creates a GLS address object (`GLS_ADDRESS`) for use in shipments as consignee, shipper, or return address." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create address" - } - ], - 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", - name: [ - { - code: "en-US", - content: "Create address", - } - ], - description: [ - { - code: "en-US", - content: "Creates a GLS address object which can be used for shipments.", - } - ], - parameters: [ - { - runtimeName: "Name1", - name: [ - { - code: "en-US", - content: "Name 1", - } - ], - description: [ - { - code: "en-US", - content: "The name of the recipient or company. Max length is 40 characters.", - } - ] - }, - { - runtimeName: "CountryCode", - name: [ - { - code: "en-US", - content: "Country code", - } - ], - description: [ - { - code: "en-US", - content: "The ISO alpha-2 country code. For example, DE for Germany or FR for France.", - } - ] - }, - { - runtimeName: "City", - name: [ - { - code: "en-US", - content: "City", - } - ], - description: [ - { - code: "en-US", - content: "The city of the address. Max length is 40 characters.", - } - ] - }, - { - runtimeName: "Street", - name: [ - { - code: "en-US", - content: "Street", - } - ], - description: [ - { - code: "en-US", - content: "The street name of the address. Min length is 4 characters.", - } - ] - }, - { - runtimeName: "ZIPCode", - name: [ - { - code: "en-US", - content: "ZIP code", - } - ], - description: [ - { - code: "en-US", - content: "The ZIP code of the address. Max length is 10 characters.", - } - ] - }, - { - runtimeName: "Name2", - name: [ - { - code: "en-US", - content: "Name 2", - } - ], - description: [ - { - code: "en-US", - content: "Additional name information. Max length is 40 characters.", - } - ] - }, - { - runtimeName: "Name3", - name: [ - { - code: "en-US", - content: "Name 3", - } - ], - description: [ - { - code: "en-US", - content: "Additional name information. Max length is 40 characters.", - } - ] - }, - { - runtimeName: "Province", - name: [ - { - code: "en-US", - content: "Province/State", - } - ], - description: [ - { - code: "en-US", - content: "The province or state of the address. Max length is 40 characters.", - } - ] - }, - { - runtimeName: "StreetNumber", - name: [ - { - code: "en-US", - content: "Street number", - } - ], - description: [ - { - code: "en-US", - content: "The street number of the address. Max length is 40 characters.", - } - ] - }, - { - runtimeName: "ContactPerson", - name: [ - { - code: "en-US", - content: "Contact person", - } - ], - description: [ - { - code: "en-US", - content: "The contact person for the address. Max length is 40 characters.", - } - ] - }, - { - runtimeName: "FixedLinePhonenumber", - name: [ - { - code: "en-US", - content: "Fixed line phone number", - } - ], - description: [ - { - code: "en-US", - content: "The fixed line phone number for the address. Max length is 35 characters.", - } - ] - }, - { - runtimeName: "MobilePhonenumber", - name: [ - { - code: "en-US", - content: "Mobile phone number", - }, - ], - description: [ - { - code: "en-US", - content: "The mobile phone number for the address. Max length is 35 characters.", - } - ] - }, - { - runtimeName: "Email", - name: [ - { - code: "en-US", - content: "Email", - } - ], - description: [ - { - code: "en-US", - content: "The email address for the address. Max length is 80 characters.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_ADDRESS", - ] - }, - handler: ( - 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 - ): AddressSchema => { - return { - Name1, - Name2, - Name3, - CountryCode, - Province, - City, - Street, - StreetNumber, - ContactPerson, - FixedLinePhonenumber, - MobilePhonenumber, - eMail: Email, - ZIPCode - } - } - } - ) -} diff --git a/actions/gls-action/src/functions/utils/createAddressFunction.ts b/actions/gls-action/src/functions/utils/createAddressFunction.ts new file mode 100644 index 0000000..13b3537 --- /dev/null +++ b/actions/gls-action/src/functions/utils/createAddressFunction.ts @@ -0,0 +1,119 @@ +import { + Description, + DisplayMessage, + Documentation, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { Address } from "../../data_types/glsAddress.js"; + +@Identifier("createAddress") +@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") +@Name({ code: "en-US", content: "Create address" }) +@DisplayMessage({ code: "en-US", content: "Create address" }) +@Documentation({ + code: "en-US", + content: "Creates a GLS address object (`GLS_ADDRESS`) for use in shipments as consignee, shipper, or return address.", +}) +@Description({ code: "en-US", content: "Creates a GLS address object which can be used for shipments." }) +@Parameter({ + runtimeName: "Name1", + name: [{ code: "en-US", content: "Name 1" }], + description: [{ code: "en-US", content: "The name of the recipient or company. Max length is 40 characters." }], +}) +@Parameter({ + runtimeName: "CountryCode", + name: [{ code: "en-US", content: "Country code" }], + description: [{ code: "en-US", content: "The ISO alpha-2 country code. For example, DE for Germany or FR for France." }], +}) +@Parameter({ + runtimeName: "City", + name: [{ code: "en-US", content: "City" }], + description: [{ code: "en-US", content: "The city of the address. Max length is 40 characters." }], +}) +@Parameter({ + runtimeName: "Street", + name: [{ code: "en-US", content: "Street" }], + description: [{ code: "en-US", content: "The street name of the address. Min length is 4 characters." }], +}) +@Parameter({ + runtimeName: "ZIPCode", + name: [{ code: "en-US", content: "ZIP code" }], + description: [{ code: "en-US", content: "The ZIP code of the address. Max length is 10 characters." }], +}) +@Parameter({ + runtimeName: "Name2", + name: [{ code: "en-US", content: "Name 2" }], + description: [{ code: "en-US", content: "Additional name information. Max length is 40 characters." }], +}) +@Parameter({ + runtimeName: "Name3", + name: [{ code: "en-US", content: "Name 3" }], + description: [{ code: "en-US", content: "Additional name information. Max length is 40 characters." }], +}) +@Parameter({ + runtimeName: "Province", + name: [{ code: "en-US", content: "Province/State" }], + description: [{ code: "en-US", content: "The province or state of the address. Max length is 40 characters." }], +}) +@Parameter({ + runtimeName: "StreetNumber", + name: [{ code: "en-US", content: "Street number" }], + description: [{ code: "en-US", content: "The street number of the address. Max length is 40 characters." }], +}) +@Parameter({ + runtimeName: "ContactPerson", + name: [{ code: "en-US", content: "Contact person" }], + description: [{ code: "en-US", content: "The contact person for the address. Max length is 40 characters." }], +}) +@Parameter({ + runtimeName: "FixedLinePhonenumber", + name: [{ code: "en-US", content: "Fixed line phone number" }], + description: [{ code: "en-US", content: "The fixed line phone number for the address. Max length is 35 characters." }], +}) +@Parameter({ + runtimeName: "MobilePhonenumber", + name: [{ code: "en-US", content: "Mobile phone number" }], + description: [{ code: "en-US", content: "The mobile phone number for the address. Max length is 35 characters." }], +}) +@Parameter({ + runtimeName: "Email", + name: [{ code: "en-US", content: "Email" }], + description: [{ code: "en-US", content: "The email address for the address. Max length is 80 characters." }], +}) +export class CreateAddressFunction { + run( + _context: unknown, + 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 + ): Address { + return { + Name1, + Name2, + Name3, + CountryCode, + Province, + City, + Street, + StreetNumber, + ContactPerson, + FixedLinePhonenumber, + MobilePhonenumber, + eMail: Email, + ZIPCode, + }; + } +} diff --git a/actions/gls-action/src/functions/utils/createConsignee.ts b/actions/gls-action/src/functions/utils/createConsignee.ts deleted file mode 100644 index 6f5f166..0000000 --- a/actions/gls-action/src/functions/utils/createConsignee.ts +++ /dev/null @@ -1,113 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {AddressSchema} from "../../types/glsAddress"; -import {ConsigneeSchema} from "../../types/glsConsignee"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createConsignee", - documentation: [ - { - code: "en-US", - content: "Creates a GLS consignee (recipient) object for use in shipments." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create consignee" - } - ], - name: [ - { - code: "en-US", - content: "Create consignee", - } - ], - description: [ - { - code: "en-US", - content: "Creates a GLS consignee (recipient) object for use in shipments.", - } - ], - signature: "(consigneeId: string, costCenter: string, Address: GLS_ADDRESS, Category: \"BUSINESS\"|\"PRIVATE\"): GLS_CONSIGNEE", - parameters: [ - { - runtimeName: "consigneeId", - name: [ - { - code: "en-US", - content: "Consignee ID", - } - ], - description: [ - { - code: "en-US", - content: "The ID of the consignee. Max length is 40 characters.", - } - ] - }, - { - runtimeName: "costCenter", - name: [ - { - code: "en-US", - content: "Cost center", - } - ], - description: [ - { - code: "en-US", - content: "The cost center for the consignee. Max length is 80 characters.", - } - ] - }, - { - runtimeName: "Address", - name: [ - { - code: "en-US", - content: "Address", - } - ], - description: [ - { - code: "en-US", - content: "The address of the consignee.", - } - ] - - }, - { - runtimeName: "Category", - name: [ - { - code: "en-US", - content: "Category", - } - ], - description: [ - { - code: "en-US", - content: "The category of the consignee. Can be either BUSINESS or PRIVATE.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_CONSIGNEE", - "GLS_ADDRESS" - ] - }, - handler: (consigneeId: string, costCenter: string, Address: AddressSchema, Category: "BUSINESS" | "PRIVATE"): ConsigneeSchema => { - return { - Address, - Category, - ConsigneeID: consigneeId, - CostCenter: costCenter - } - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/utils/createConsigneeFunction.ts b/actions/gls-action/src/functions/utils/createConsigneeFunction.ts new file mode 100644 index 0000000..e494327 --- /dev/null +++ b/actions/gls-action/src/functions/utils/createConsigneeFunction.ts @@ -0,0 +1,60 @@ +import { + Description, + DisplayMessage, + Documentation, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { Address } from "../../data_types/glsAddress.js"; +import { Consignee } from "../../data_types/glsConsignee.js"; + +@Identifier("createConsignee") +@Signature("(consigneeId: string, costCenter: string, Address: GLS_ADDRESS, Category: \"BUSINESS\"|\"PRIVATE\"): GLS_CONSIGNEE") +@Name({ code: "en-US", content: "Create consignee" }) +@DisplayMessage({ code: "en-US", content: "Create consignee" }) +@Documentation({ + code: "en-US", + content: "Creates a GLS consignee (recipient) object for use in shipments.", +}) +@Description({ + code: "en-US", + content: "Creates a GLS consignee (recipient) object for use in shipments.", +}) +@Parameter({ + runtimeName: "consigneeId", + name: [{ code: "en-US", content: "Consignee ID" }], + description: [{ code: "en-US", content: "The ID of the consignee. Max length is 40 characters." }], +}) +@Parameter({ + runtimeName: "costCenter", + name: [{ code: "en-US", content: "Cost center" }], + description: [{ code: "en-US", content: "The cost center for the consignee. Max length is 80 characters." }], +}) +@Parameter({ + runtimeName: "Address", + name: [{ code: "en-US", content: "Address" }], + description: [{ code: "en-US", content: "The address of the consignee." }], +}) +@Parameter({ + runtimeName: "Category", + name: [{ code: "en-US", content: "Category" }], + description: [{ code: "en-US", content: "The category of the consignee. Can be either BUSINESS or PRIVATE." }], +}) +export class CreateConsigneeFunction { + run( + _context: unknown, + consigneeId: string, + costCenter: string, + Address: Address, + Category: "BUSINESS" | "PRIVATE" + ): Consignee { + return { + Address, + Category, + ConsigneeID: consigneeId, + CostCenter: costCenter, + }; + } +} diff --git a/actions/gls-action/src/functions/utils/createCustomContent.ts b/actions/gls-action/src/functions/utils/createCustomContent.ts deleted file mode 100644 index 23d597b..0000000 --- a/actions/gls-action/src/functions/utils/createCustomContent.ts +++ /dev/null @@ -1,99 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {CustomContent} from "../../types/glsCustomContent"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createCustomContent", - documentation: [ - { - code: "en-US", - content: "Creates custom content settings for GLS labels, including logos and barcodes." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create custom content" - } - ], - signature: "(barcodeContentType: \"TRACK_ID\"|\"GLS_SHIPMENT_REFERENCE\", customerLogo: string, hideShipperAddress?: boolean, barcodeType?: \"EAN_128\"|\"CODE_39\", barcode?: string): GLS_CUSTOM_CONTENT", - name: [ - { - code: "en-US", - content: "Create custom content", - } - ], - description: [ - { - code: "en-US", - content: "Creates a GLS custom content object for shipment labels.", - } - ], - parameters: [ - { - runtimeName: "barcodeContentType", - name: [ - {code: "en-US", content: "Barcode content type"} - ], - description: [ - { - code: "en-US", - content: "Type of content encoded in the barcode (TRACK_ID or GLS_SHIPMENT_REFERENCE)." - } - ] - }, - { - runtimeName: "customerLogo", - name: [ - {code: "en-US", content: "Customer logo"} - ], - description: [ - {code: "en-US", content: "Base64-encoded customer logo to print on the label."} - ] - }, - { - runtimeName: "hideShipperAddress", - name: [ - {code: "en-US", content: "Hide shipper address"} - ], - description: [ - {code: "en-US", content: "Whether to hide the shipper address on the label."} - ] - }, - { - runtimeName: "barcodeType", - name: [ - {code: "en-US", content: "Barcode type"} - ], - description: [ - {code: "en-US", content: "Type of barcode to use (EAN_128 or CODE_39)."} - ] - }, - { - runtimeName: "barcode", - name: [ - {code: "en-US", content: "Barcode"} - ], - description: [ - {code: "en-US", content: "Barcode value to print on the label."} - ] - } - ], - linkedDataTypes: [ - "GLS_CUSTOM_CONTENT", - ] - }, - handler: (barcodeContentType: CustomContent["BarcodeContentType"], customerLogo: string, hideShipperAddress?: boolean, barcodeType?: CustomContent["BarcodeType"], barcode?: string): CustomContent => { - return { - Barcode: barcode, - BarcodeContentType: barcodeContentType, - BarcodeType: barcodeType, - CustomerLogo: customerLogo, - HideShipperAddress: hideShipperAddress, - } - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/utils/createCustomContentFunction.ts b/actions/gls-action/src/functions/utils/createCustomContentFunction.ts new file mode 100644 index 0000000..acb4e21 --- /dev/null +++ b/actions/gls-action/src/functions/utils/createCustomContentFunction.ts @@ -0,0 +1,66 @@ +import { + Description, + DisplayMessage, + Documentation, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { CustomContent } from "../../data_types/glsCustomContent.js"; + +@Identifier("createCustomContent") +@Signature("(barcodeContentType: \"TRACK_ID\"|\"GLS_SHIPMENT_REFERENCE\", customerLogo: string, hideShipperAddress?: boolean, barcodeType?: \"EAN_128\"|\"CODE_39\", barcode?: string): GLS_CUSTOM_CONTENT") +@Name({ code: "en-US", content: "Create custom content" }) +@DisplayMessage({ code: "en-US", content: "Create custom content" }) +@Documentation({ + code: "en-US", + content: "Creates custom content settings for GLS labels, including logos and barcodes.", +}) +@Description({ + code: "en-US", + content: "Creates a GLS custom content object for shipment labels.", +}) +@Parameter({ + runtimeName: "barcodeContentType", + name: [{ code: "en-US", content: "Barcode content type" }], + description: [{ code: "en-US", content: "Type of content encoded in the barcode (TRACK_ID or GLS_SHIPMENT_REFERENCE)." }], +}) +@Parameter({ + runtimeName: "customerLogo", + name: [{ code: "en-US", content: "Customer logo" }], + description: [{ code: "en-US", content: "Base64-encoded customer logo to print on the label." }], +}) +@Parameter({ + runtimeName: "hideShipperAddress", + name: [{ code: "en-US", content: "Hide shipper address" }], + description: [{ code: "en-US", content: "Whether to hide the shipper address on the label." }], +}) +@Parameter({ + runtimeName: "barcodeType", + name: [{ code: "en-US", content: "Barcode type" }], + description: [{ code: "en-US", content: "Type of barcode to use (EAN_128 or CODE_39)." }], +}) +@Parameter({ + runtimeName: "barcode", + name: [{ code: "en-US", content: "Barcode" }], + description: [{ code: "en-US", content: "Barcode value to print on the label." }], +}) +export class CreateCustomContentFunction { + run( + _context: unknown, + barcodeContentType: CustomContent["BarcodeContentType"], + customerLogo: string, + hideShipperAddress?: boolean, + barcodeType?: CustomContent["BarcodeType"], + barcode?: string + ): CustomContent { + return { + Barcode: barcode, + BarcodeContentType: barcodeContentType, + BarcodeType: barcodeType, + CustomerLogo: customerLogo, + HideShipperAddress: hideShipperAddress, + }; + } +} diff --git a/actions/gls-action/src/functions/utils/createPrintingOptions.ts b/actions/gls-action/src/functions/utils/createPrintingOptions.ts deleted file mode 100644 index d4a1170..0000000 --- a/actions/gls-action/src/functions/utils/createPrintingOptions.ts +++ /dev/null @@ -1,63 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {PrintingOptions, ReturnLabels} from "../../types/glsPrintingOptions"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createPrintingOptions", - documentation: [ - { - code: "en-US", - content: "Creates GLS printing options that control how labels are generated." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create printing options" - } - ], - signature: "(returnLabels: RETURN_LABELS): GLS_PRINTING_OPTIONS", - name: [ - { - code: "en-US", - content: "Create printing options", - } - ], - description: [ - { - code: "en-US", - content: "Creates a GLS printing options object which can be used when creating shipments.", - } - ], - parameters: [ - { - runtimeName: "returnLabels", - name: [ - { - code: "en-US", - content: "Return labels", - } - ], - description: [ - { - code: "en-US", - content: "The return labels to be included in the shipment.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_PRINTING_OPTIONS", - "RETURN_LABELS" - ] - }, - handler: (returnLabels: ReturnLabels): PrintingOptions => { - return { - ReturnLabels: returnLabels - } - } - }, - ) -} diff --git a/actions/gls-action/src/functions/utils/createPrintingOptionsFunction.ts b/actions/gls-action/src/functions/utils/createPrintingOptionsFunction.ts new file mode 100644 index 0000000..f8a9fae --- /dev/null +++ b/actions/gls-action/src/functions/utils/createPrintingOptionsFunction.ts @@ -0,0 +1,35 @@ +import { + Description, + DisplayMessage, + Documentation, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { PrintingOptions, ReturnLabels } from "../../data_types/glsPrintingOptions.js"; + +@Identifier("createPrintingOptions") +@Signature("(returnLabels: RETURN_LABELS): GLS_PRINTING_OPTIONS") +@Name({ code: "en-US", content: "Create printing options" }) +@DisplayMessage({ code: "en-US", content: "Create printing options" }) +@Documentation({ + code: "en-US", + content: "Creates GLS printing options that control how labels are generated.", +}) +@Description({ + code: "en-US", + content: "Creates a GLS printing options object which can be used when creating shipments.", +}) +@Parameter({ + runtimeName: "returnLabels", + name: [{ code: "en-US", content: "Return labels" }], + description: [{ code: "en-US", content: "The return labels to be included in the shipment." }], +}) +export class CreatePrintingOptionsFunction { + run(_context: unknown, returnLabels: ReturnLabels): PrintingOptions { + return { + ReturnLabels: returnLabels, + }; + } +} diff --git a/actions/gls-action/src/functions/utils/createShipmentUnit.ts b/actions/gls-action/src/functions/utils/createShipmentUnit.ts deleted file mode 100644 index 75c0368..0000000 --- a/actions/gls-action/src/functions/utils/createShipmentUnit.ts +++ /dev/null @@ -1,143 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import { UnitService } from "../../types/glsUnitService"; -import {ShipmentUnit} from "../../types/glsShipmentUnit"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "createShipmentUnit", - documentation: [ - { - code: "en-US", - content: "Creates a GLS shipment unit (an individual parcel within a shipment)." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create shipment unit" - } - ], - signature: "(weight: number, shipmentUnitReference?: string, partnerParcelNumber?: string, note1?: string, note2?: string, shipmentUnitService: GLS_SHIPMENT_UNIT_SERVICE): GLS_SHIPMENT_UNIT", - name: [ - { - code: "en-US", - content: "Create shipment unit", - } - ], - description: [ - { - code: "en-US", - content: "Creates a GLS shipment unit object which can be used for shipments.", - } - ], - parameters: [ - { - runtimeName: "weight", - name: [ - { - code: "en-US", - content: "Weight (kg)", - } - ], - description: [ - { - code: "en-US", - content: "The weight of the shipment unit in kilograms. Must be a positive number and greater than 0.10 and less than 99.", - } - ] - }, - { - runtimeName: "shipmentUnitReference", - name: [ - { - code: "en-US", - content: "Shipment unit reference", - } - ], - description: [ - { - code: "en-US", - content: "The reference for the shipment unit. Max length is 40 characters.", - } - ] - }, - { - runtimeName: "partnerParcelNumber", - name: [ - { - code: "en-US", - content: "Partner parcel number", - } - ], - description: [ - { - code: "en-US", - content: "The partner parcel number for the shipment unit. Max length is 50 characters.", - } - ] - }, - { - runtimeName: "note1", - name: [ - { - code: "en-US", - content: "Note 1", - } - ], - description: [ - { - code: "en-US", - content: "Note 1 for the shipment unit. Max length is 50 characters.", - } - ] - }, - { - runtimeName: "note2", - name: [ - { - code: "en-US", - content: "Note 2", - } - ], - description: [ - { - code: "en-US", - content: "Note 2 for the shipment unit. Max length is 50 characters.", - } - ] - }, - { - runtimeName: "shipmentUnitService", - name: [ - { - code: "en-US", - content: "Shipment unit service", - } - ], - description: [ - { - code: "en-US", - content: "The service associated with the shipment unit.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_SHIPMENT_UNIT", - ] - }, - handler: (weight: number, shipmentUnitReference: string, partnerParcelNumber?: string, note1?: string, note2?: string, shipmentUnitService?: UnitService): ShipmentUnit => { - return { - ShipmentUnitReference: shipmentUnitReference, - Weight: weight, - PartnerParcelNumber: partnerParcelNumber, - Note1: note1, - Note2: note2, - Service: shipmentUnitService - } - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/utils/createShipmentUnitFunction.ts b/actions/gls-action/src/functions/utils/createShipmentUnitFunction.ts new file mode 100644 index 0000000..7bacd89 --- /dev/null +++ b/actions/gls-action/src/functions/utils/createShipmentUnitFunction.ts @@ -0,0 +1,74 @@ +import { + Description, + DisplayMessage, + Documentation, + Identifier, + Name, + Parameter, + Signature, +} from "@code0-tech/hercules"; +import { UnitService } from "../../data_types/glsUnitService.js"; +import { ShipmentUnit } from "../../data_types/glsShipmentUnit.js"; + +@Identifier("createShipmentUnit") +@Signature("(weight: number, shipmentUnitReference?: string, partnerParcelNumber?: string, note1?: string, note2?: string, shipmentUnitService?: GLS_UNIT_SERVICE): GLS_SHIPMENT_UNIT") +@Name({ code: "en-US", content: "Create shipment unit" }) +@DisplayMessage({ code: "en-US", content: "Create shipment unit" }) +@Documentation({ + code: "en-US", + content: "Creates a GLS shipment unit (an individual parcel within a shipment).", +}) +@Description({ + code: "en-US", + content: "Creates a GLS shipment unit object which can be used for shipments.", +}) +@Parameter({ + runtimeName: "weight", + name: [{ code: "en-US", content: "Weight (kg)" }], + description: [{ code: "en-US", content: "The weight of the shipment unit in kilograms. Must be a positive number and greater than 0.10 and less than 99." }], +}) +@Parameter({ + runtimeName: "shipmentUnitReference", + name: [{ code: "en-US", content: "Shipment unit reference" }], + description: [{ code: "en-US", content: "The reference for the shipment unit. Max length is 40 characters." }], +}) +@Parameter({ + runtimeName: "partnerParcelNumber", + name: [{ code: "en-US", content: "Partner parcel number" }], + description: [{ code: "en-US", content: "The partner parcel number for the shipment unit. Max length is 50 characters." }], +}) +@Parameter({ + runtimeName: "note1", + name: [{ code: "en-US", content: "Note 1" }], + description: [{ code: "en-US", content: "Note 1 for the shipment unit. Max length is 50 characters." }], +}) +@Parameter({ + runtimeName: "note2", + name: [{ code: "en-US", content: "Note 2" }], + description: [{ code: "en-US", content: "Note 2 for the shipment unit. Max length is 50 characters." }], +}) +@Parameter({ + runtimeName: "shipmentUnitService", + name: [{ code: "en-US", content: "Shipment unit service" }], + description: [{ code: "en-US", content: "The service associated with the shipment unit." }], +}) +export class CreateShipmentUnitFunction { + run( + _context: unknown, + weight: number, + shipmentUnitReference?: string, + partnerParcelNumber?: string, + note1?: string, + note2?: string, + shipmentUnitService?: UnitService + ): ShipmentUnit { + return { + ShipmentUnitReference: shipmentUnitReference, + Weight: weight, + PartnerParcelNumber: partnerParcelNumber, + Note1: note1, + Note2: note2, + Service: shipmentUnitService, + }; + } +} diff --git a/actions/gls-action/src/functions/validateShipment.ts b/actions/gls-action/src/functions/validateShipment.ts deleted file mode 100644 index a50741c..0000000 --- a/actions/gls-action/src/functions/validateShipment.ts +++ /dev/null @@ -1,80 +0,0 @@ -import {ActionSdk, HerculesFunctionContext, RuntimeErrorException} from "@code0-tech/hercules"; -import {getAuthToken, transformValidateShipmentRequestDataToInternalFormat} from "../helpers"; -import axios from "axios"; -import { - ValidateShipmentRequestData, - ValidateShipmentResponseData, - ValidateShipmentResponseDataSchema -} from "../types/glsValidateShipment"; - -export default (sdk: ActionSdk) => { - return sdk.registerFunctionDefinitions( - { - definition: { - runtimeName: "validateShipment", - documentation: [ - { - code: "en-US", - content: "Validates a shipment against the GLS API without creating it.\nUse this before `createShipment` functions to catch errors early." - } - ], - displayMessage: [ - { - code: "en-US", - content: "Validate shipment" - } - ], - name: [ - { - code: "en-US", - content: "Validate shipment", - } - ], - description: [ - { - code: "en-US", - 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", - parameters: [ - { - runtimeName: "data", - name: [ - { - code: "en-US", - content: "Data", - } - ], - description: [ - { - code: "en-US", - content: "The shipment data to validate.", - } - ] - } - ], - linkedDataTypes: [ - "GLS_VALIDATE_SHIPMENT_REQUEST_DATA", - "GLS_VALIDATE_SHIPMENT_RESPONSE_DATA", - ], - }, - handler: async (data: ValidateShipmentRequestData, context: HerculesFunctionContext): Promise => { - const url = context?.matchedConfig.findConfig("ship_it_api_url") as string; - const contactID = context?.matchedConfig.findConfig("contact_id") as string || "" - - try { - const result = await axios.post(`${url}/rs/shipments/validate`, transformValidateShipmentRequestDataToInternalFormat(data, context, contactID), { - headers: { - Authorization: `Bearer ${await getAuthToken(context)}`, - "Content-Type": "application/glsVersion1+json" - } - }) - return ValidateShipmentResponseDataSchema.parse(result.data) - } catch (error: any) { - throw new RuntimeErrorException("VALIDATE_SHIPMENT_FAILED", error.toString()) - } - } - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/functions/validateShipmentFunction.ts b/actions/gls-action/src/functions/validateShipmentFunction.ts new file mode 100644 index 0000000..a1177d9 --- /dev/null +++ b/actions/gls-action/src/functions/validateShipmentFunction.ts @@ -0,0 +1,58 @@ +import axios from "axios"; +import { + Description, + DisplayMessage, + Documentation, + FunctionContext, + Identifier, + Name, + Parameter, + RuntimeError, + Signature, +} from "@code0-tech/hercules"; +import { getAuthToken, transformValidateShipmentRequestDataToInternalFormat } from "../helpers.js"; +import { + ValidateShipmentRequestData, + ValidateShipmentResponseData, + ValidateShipmentResponseDataSchema, +} from "../data_types/glsValidateShipment.js"; + +@Identifier("validateShipment") +@Signature("(data: GLS_VALIDATE_SHIPMENT_REQUEST_DATA): GLS_VALIDATE_SHIPMENT_RESPONSE_DATA") +@Name({ code: "en-US", content: "Validate shipment" }) +@DisplayMessage({ code: "en-US", content: "Validate shipment" }) +@Documentation({ + code: "en-US", + content: "Validates a shipment against the GLS API without creating it.\nUse this before `createShipment` functions to catch errors early.", +}) +@Description({ + code: "en-US", + content: "Validates a shipment against the GLS API without creating it.\nUse this before `createShipment` functions to catch errors early.", +}) +@Parameter({ + runtimeName: "data", + name: [{ code: "en-US", content: "Data" }], + description: [{ code: "en-US", content: "The shipment data to validate." }], +}) +export class ValidateShipmentFunction { + async run(context: FunctionContext, data: ValidateShipmentRequestData): Promise { + const url = context.matchedConfig.findConfig("ship_it_api_url") as string; + const contactID = (context.matchedConfig.findConfig("contact_id") as string) || ""; + + try { + const result = await axios.post( + `${url}/rs/shipments/validate`, + transformValidateShipmentRequestDataToInternalFormat(data, context, contactID), + { + headers: { + Authorization: `Bearer ${await getAuthToken(context)}`, + "Content-Type": "application/glsVersion1+json", + }, + } + ); + return ValidateShipmentResponseDataSchema.parse(result.data); + } catch (error: any) { + throw new RuntimeError("VALIDATE_SHIPMENT_FAILED", error.toString()); + } + } +} diff --git a/actions/gls-action/src/helpers.ts b/actions/gls-action/src/helpers.ts index b5a3101..dfb1844 100644 --- a/actions/gls-action/src/helpers.ts +++ b/actions/gls-action/src/helpers.ts @@ -1,246 +1,166 @@ -import {ZodError, ZodObject} from "zod"; -import {createAuxiliaryTypeStore, printNode, zodToTs} from "zod-to-ts"; -import ts from "typescript"; +import { FunctionContext, RuntimeError } from "@code0-tech/hercules"; import axios from "axios"; -import { - HerculesRuntimeFunctionDefinition, - HerculesFunctionContext, - RuntimeErrorException, - ActionSdk -} from "@code0-tech/hercules"; -import {InternalShipmentServiceSchema, ShipmentService} from "./types/glsShipmentService"; -import {ShipmentWithoutServices} from "./types/glsShipment"; +import { ZodError, z } from "zod"; +import { InternalShipmentServiceSchema, ShipmentService } from "./data_types/glsShipmentService.js"; +import { ShipmentWithoutServices } from "./data_types/glsShipment.js"; import { CancelShipmentRequestData, CancelShipmentResponseData, - CancelShipmentResponseDataSchema -} from "./types/glsCancelShipment"; + CancelShipmentResponseDataSchema, +} from "./data_types/glsCancelShipment.js"; import { InternalValidateShipmentRequestData, - ValidateShipmentRequestData -} from "./types/glsValidateShipment"; -import {InternalShipmentUnitSchema} from "./types/glsShipmentUnit"; -import {InternalShipper, ShipperSchema} from "./types/glsShipper"; -import {CreateParcelsResponse, CreateParcelsResponseSchema} from "./types/glsCreateParcelsResponse"; -import {PrintingOptions} from "./types/glsPrintingOptions"; -import {CustomContent} from "./types/glsCustomContent"; -import {ReturnOptions} from "./types/glsReturnOptions"; + ValidateShipmentRequestData, +} from "./data_types/glsValidateShipment.js"; +import { InternalShipmentUnitSchema } from "./data_types/glsShipmentUnit.js"; +import { InternalShipper, ShipperSchemaType } from "./data_types/glsShipper.js"; import { - AuthenticationRequestData, - AuthenticationRequestDataSchema, - AuthenticationResponseDataSchema -} from "./types/auth"; + CreateParcelsResponse, + CreateParcelsResponseSchema, +} from "./data_types/glsCreateParcelsResponse.js"; +import { PrintingOptions } from "./data_types/glsPrintingOptions.js"; +import { CustomContent } from "./data_types/glsCustomContent.js"; +import { ReturnOptions } from "./data_types/glsReturnOptions.js"; import { InternalShipmentRequestData, ShipmentRequestData, - ShipmentRequestDataSchema -} from "./types/shipmentRequest"; - - -export const DEFAULT_SIGNATURE_FOR_SERVICES = "shipment: GLS_SHIPMENT, printingOptions: GLS_PRINTING_OPTIONS, returnOptions?: GLS_RETURN_OPTIONS, customContent?: GLS_CUSTOM_CONTENT" -export const DEFAULT_PARAMETERS_FOR_SERVICES: HerculesRuntimeFunctionDefinition["parameters"] = [ - { - runtimeName: "shipment", - name: [ - { - code: "en-US", - content: "Shipment", - } - ], - description: [ - { - code: "en-US", - content: "The shipment for which to create the parcels. Must include all necessary information and services for the shipment.", - } - ] - }, - { - runtimeName: "printingOptions", - name: [ - { - code: "en-US", - content: "Printing options", - } - ], - description: [ - { - code: "en-US", - content: "The printing options for the shipment. Specifies options for the labels to be printed for the shipment.", - } - ] - }, - { - runtimeName: "returnOptions", - name: [ - { - code: "en-US", - content: "Return options", - } - ], - description: [ - { - code: "en-US", - content: "The return options for the shipment. Specifies options for return shipments.", - } - ] - }, - { - runtimeName: "customContent", - name: [ - { - code: "en-US", - content: "Custom content", - } - ], - description: [ - { - code: "en-US", - content: "The custom content for the shipment. Specifies options for custom content to be printed on the labels.", - } - ] - } -] as HerculesRuntimeFunctionDefinition["parameters"] -export const DEFAULT_DATA_TYPES_FOR_SERVICES = [ - "GLS_SHIPMENT", - "GLS_PRINTING_OPTIONS", - "GLS_RETURN_OPTIONS", - "GLS_CUSTOM_CONTENT", - "GLS_CREATE_PARCELS_RESPONSE" -] - -export function singleZodSchemaToTypescriptDef( - typeName: string, - zodSchema: ZodObject -) { - return zodSchemaToTypescriptDefs(typeName, zodSchema).get(typeName)!; -} - -export function zodSchemaToTypescriptDefs( - typeName: string, - zodSchema: ZodObject, - extraSchemas: Record = {} -): Map { - const store = createAuxiliaryTypeStore(); - const result = new Map(); - - for (const [name, schema] of Object.entries(extraSchemas)) { - const {node} = zodToTs(schema, {auxiliaryTypeStore: store}); - - const alias = ts.factory.createTypeAliasDeclaration( - undefined, - ts.factory.createIdentifier(name), - undefined, - node - ); - - store.definitions.set(schema, { - identifier: ts.factory.createIdentifier(name), - node: alias - }); - - result.set(name, printNode(alias).replace(`type ${name} =`, ``)); - } - - const {node} = zodToTs(zodSchema, {auxiliaryTypeStore: store}); - result.set(typeName, printNode(node)); - - return result; -} + ShipmentRequestDataSchema, +} from "./data_types/shipmentRequest.js"; + +export const AuthenticationRequestDataSchema = z.object({ + grant_type: z.string().default("client_credentials"), + client_id: z.string(), + client_secret: z.string(), + scope: z.string().optional(), +}); +export type AuthenticationRequestData = z.infer; + +export const AuthenticationResponseDataSchema = z.object({ + access_token: z.string(), + token_type: z.string(), + expires_in: z.number(), +}); +export type AuthenticationResponseData = z.infer; let cachedToken = { token: "", tokenType: "", expiresAt: 0, -} +}; -export const getAuthToken = async (context: HerculesFunctionContext) => { +export const getAuthToken = async (context: FunctionContext): Promise => { const data: AuthenticationRequestData = { client_id: context.matchedConfig.findConfig("client_id") as string, client_secret: context.matchedConfig.findConfig("client_secret") as string, - grant_type: "client_credentials" - } - const url = context.matchedConfig.findConfig("auth_url") as string + grant_type: "client_credentials", + }; + const url = context.matchedConfig.findConfig("auth_url") as string; if (cachedToken.expiresAt > Date.now()) { - console.log("Using cached access token") - return cachedToken.token + console.log("Using cached access token"); + return cachedToken.token; } - const authValue = await axios.post(url, AuthenticationRequestDataSchema.parse(data), { headers: { - "Content-Type": "application/x-www-form-urlencoded" - } - }) - const result = AuthenticationResponseDataSchema.parse(authValue.data) - console.log("Authentication successful, access token:", result.token_type, result.access_token.substring(0, 10) + "...") + "Content-Type": "application/x-www-form-urlencoded", + }, + }); + const result = AuthenticationResponseDataSchema.parse(authValue.data); + console.log( + "Authentication successful, access token:", + result.token_type, + result.access_token.substring(0, 10) + "..." + ); cachedToken = { token: result.access_token, tokenType: result.token_type, - expiresAt: Date.now() + (result.expires_in - 60) * 1000 - } - return result.access_token -} - -export const cancelShipment = async (data: CancelShipmentRequestData, context: HerculesFunctionContext): Promise => { + expiresAt: Date.now() + (result.expires_in - 60) * 1000, + }; + return result.access_token; +}; + +export const cancelShipment = async ( + data: CancelShipmentRequestData, + context: FunctionContext +): Promise => { const url = context.matchedConfig.findConfig("ship_it_api_url") as string; - try { - const result = await axios.post(`${url}/rs/shipments/cancel/${data.TrackID}`, {}, { - headers: { - Authorization: `Bearer ${await getAuthToken(context)}`, - "Content-Type": "application/glsVersion1+json" + const result = await axios.post( + `${url}/rs/shipments/cancel/${data.TrackID}`, + {}, + { + headers: { + Authorization: `Bearer ${await getAuthToken(context)}`, + "Content-Type": "application/glsVersion1+json", + }, } - }) - return CancelShipmentResponseDataSchema.parse(result.data) + ); + return CancelShipmentResponseDataSchema.parse(result.data); } catch (error: any) { if (error.response?.headers?.args) { const headers = error.response.headers; - console.error("Error sending cancel shipment request to GLS API:", headers.error, headers.args) - throw new RuntimeErrorException("ERROR_CANCELING_GLS_SHIPMENT", `GLS API error: ${headers.error}, args: ${headers.args}`) - } - throw new RuntimeErrorException("ERROR_CANCELING_GLS_SHIPMENT") - } -} - - -export function transformValidateShipmentRequestDataToInternalFormat(data: ValidateShipmentRequestData, context: HerculesFunctionContext | undefined, contactID: string): InternalValidateShipmentRequestData { - return { - ...data, - Shipment: { - ...data.Shipment, - Middleware: "CodeZeroviaGLS", - Shipper: getShipper(context, contactID, data.Shipment.Shipper), - Service: InternalShipmentServiceSchema.parse(data.Shipment.Service), - ShipmentUnit: InternalShipmentUnitSchema.parse(data.Shipment.ShipmentUnit) + console.error("Error sending cancel shipment request to GLS API:", headers.error, headers.args); + throw new RuntimeError( + "ERROR_CANCELING_GLS_SHIPMENT", + `GLS API error: ${headers.error}, args: ${headers.args}` + ); } + throw new RuntimeError("ERROR_CANCELING_GLS_SHIPMENT"); } -} +}; - -export function getShipper(context: HerculesFunctionContext | undefined, contactID: string | undefined, shipper?: ShipperSchema): InternalShipper { - const configShipper = context?.matchedConfig.findConfig("default_shipper") as ShipperSchema || undefined +export function getShipper( + context: FunctionContext | undefined, + contactID: string | undefined, + shipper?: ShipperSchemaType +): InternalShipper { + const configShipper = + (context?.matchedConfig.findConfig("default_shipper") as ShipperSchemaType) || undefined; if (!shipper && !configShipper) { - throw new RuntimeErrorException("MISSING_SHIPPER_INFORMATION", "No shipper information provided in shipment data or configuration.") + throw new RuntimeError( + "MISSING_SHIPPER_INFORMATION", + "No shipper information provided in shipment data or configuration." + ); } if (shipper) { return { ...shipper, - ContactID: contactID - } + ContactID: contactID, + }; } return { ...configShipper, - ContactID: contactID - } + ContactID: contactID, + }; } +export function transformValidateShipmentRequestDataToInternalFormat( + data: ValidateShipmentRequestData, + context: FunctionContext | undefined, + contactID: string +): InternalValidateShipmentRequestData { + return { + ...data, + Shipment: { + ...data.Shipment, + Middleware: "CodeZeroviaGLS", + Shipper: getShipper(context, contactID, data.Shipment.Shipper), + Service: InternalShipmentServiceSchema.parse(data.Shipment.Service), + ShipmentUnit: InternalShipmentUnitSchema.parse(data.Shipment.ShipmentUnit), + }, + }; +} -export function transformShipmentRequestDataToInternalFormat(data: ShipmentRequestData, context: HerculesFunctionContext | undefined, contactID: string | undefined): InternalShipmentRequestData { +export function transformShipmentRequestDataToInternalFormat( + data: ShipmentRequestData, + context: FunctionContext | undefined, + contactID: string | undefined +): InternalShipmentRequestData { return { ...data, Shipment: { @@ -248,73 +168,76 @@ export function transformShipmentRequestDataToInternalFormat(data: ShipmentReque Middleware: "CodeZeroviaGLS", Shipper: getShipper(context, contactID, data.Shipment.Shipper), Service: InternalShipmentServiceSchema.parse(data.Shipment.Service), - ShipmentUnit: InternalShipmentUnitSchema.parse(data.Shipment.ShipmentUnit) - } - } + ShipmentUnit: InternalShipmentUnitSchema.parse(data.Shipment.ShipmentUnit), + }, + }; } -const postShipments = async (data: ShipmentRequestData, context: HerculesFunctionContext): Promise => { +const postShipments = async ( + data: ShipmentRequestData, + context: FunctionContext +): Promise => { const contactID = context.matchedConfig.findConfig("contact_id") as string; const url = context.matchedConfig.findConfig("ship_it_api_url") as string; - const parsedData: InternalShipmentRequestData = transformShipmentRequestDataToInternalFormat(ShipmentRequestDataSchema.parse(data), context, contactID); - + const parsedData: InternalShipmentRequestData = transformShipmentRequestDataToInternalFormat( + ShipmentRequestDataSchema.parse(data), + context, + contactID + ); try { const result = await axios.post(`${url}/rs/shipments`, parsedData, { headers: { Authorization: `Bearer ${await getAuthToken(context)}`, - "Content-Type": "application/glsVersion1+json" - } - }) + "Content-Type": "application/glsVersion1+json", + }, + }); - return CreateParcelsResponseSchema.parse(result.data) as CreateParcelsResponse + return CreateParcelsResponseSchema.parse(result.data) as CreateParcelsResponse; } catch (error: any) { if (error.response?.data) { - console.error("Error response from GLS API:", error.response.data) + console.error("Error response from GLS API:", error.response.data); } else if (error.response?.headers) { - const headers = error?.response.headers; - console.error("Error sending request to GLS API:", headers.error, headers.args) + const headers = error.response.headers; + console.error("Error sending request to GLS API:", headers.error, headers.args); } else if (error instanceof ZodError) { - console.error("Error sending request to GLS API:", error.message) + console.error("Error sending request to GLS API:", error.message); } else { - console.error("Error sending request to GLS API:", error) + console.error("Error sending request to GLS API:", error); } - return Promise.reject(error) + return Promise.reject(error); } -} - -export async function postShipmentHelper(context: HerculesFunctionContext, services: ShipmentService, shipment: ShipmentWithoutServices, printingOptions: PrintingOptions, customContent?: CustomContent, returnOptions?: ReturnOptions): Promise { +}; + +export async function postShipmentHelper( + context: FunctionContext, + services: ShipmentService, + shipment: ShipmentWithoutServices, + printingOptions: PrintingOptions, + customContent?: CustomContent, + returnOptions?: ReturnOptions +): Promise { try { - return await postShipments({ - PrintingOptions: printingOptions, - CustomContent: customContent, - ReturnOptions: returnOptions, - Shipment: { - ...shipment, - Service: services + return await postShipments( + { + PrintingOptions: printingOptions, + CustomContent: customContent, + ReturnOptions: returnOptions, + Shipment: { + ...shipment, + Service: services, + }, }, - }, context) + context + ); } catch (error) { if (typeof error === "string") { - throw new RuntimeErrorException("ERROR_CREATING_GLS_SHIPMENT", error) + throw new RuntimeError("ERROR_CREATING_GLS_SHIPMENT", error); } - throw new RuntimeErrorException("ERROR_CREATING_GLS_SHIPMENT", "An error occurred while creating the shipment.") + throw new RuntimeError( + "ERROR_CREATING_GLS_SHIPMENT", + "An error occurred while creating the shipment." + ); } } - -export async function loadAllDefinitions(sdk: ActionSdk) { - const modules = import.meta.glob('./{types,functions,config}/**/*.ts'); - - for (const path in modules) { - const mod: any = await modules[path](); - - if (typeof mod.default === 'function') { - try { - await mod.default(sdk); - } catch (error) { - console.log(`Error registering functions from ${path}:`, error); - } - } - } -} \ No newline at end of file diff --git a/actions/gls-action/src/index.ts b/actions/gls-action/src/index.ts index ad330bf..31f1461 100644 --- a/actions/gls-action/src/index.ts +++ b/actions/gls-action/src/index.ts @@ -1,42 +1,192 @@ -import {createSdk} from "@code0-tech/hercules" -import { - loadAllDefinitions -} from "./helpers"; - -export const sdk = createSdk({ - authToken: process.env.HERCULES_AUTH_TOKEN || "", - aquilaUrl: process.env.HERCULES_AQUILA_URL || "127.0.0.1:50051", - actionId: process.env.HERCULES_ACTION_ID || "gls-action", - version: process.env.HERCULES_SDK_VERSION || "0.0.0", -}) - -async function main() { - try { - await loadAllDefinitions(sdk) - connectToSdk() - } catch (error) { - console.error(error) - } -} - -main().catch(err => { - console.error(err) - process.exit(1) -}) - - -function connectToSdk() { - sdk.connect().then(() => { - console.log("SDK connected successfully"); - }).catch(() => { - console.error("Error connecting SDK:"); - }) - - sdk.onError((error) => { - console.error("SDK Error occurred:", error.message); - console.log("Attempting to reconnect in 5s..."); - setTimeout(() => { - connectToSdk(); - }, 5000) - }) -} \ No newline at end of file +import "reflect-metadata"; +import { Action, CodeZeroEvent } from "@code0-tech/hercules"; + +import { GlsAddressDataType } from "./data_types/glsAddress.js"; +import { GlsAllowedServicesRequestDataType, GlsAllowedServicesResponseDataType } from "./data_types/glsAllowedServices.js"; +import { GlsCancelShipmentRequestDataType, GlsCancelShipmentResponseDataType } from "./data_types/glsCancelShipment.js"; +import { GlsConsigneeDataType } from "./data_types/glsConsignee.js"; +import { GlsCreateParcelsResponseDataType } from "./data_types/glsCreateParcelsResponse.js"; +import { GlsCustomContentDataType } from "./data_types/glsCustomContent.js"; +import { GlsEndOfDayRequestDataType, GlsEndOfDayResponseDataType } from "./data_types/glsEndOfDay.js"; +import { GlsPrintingOptionsDataType, ReturnLabelsDataType } from "./data_types/glsPrintingOptions.js"; +import { GlsReprintParcelRequestDataType, GlsReprintParcelResponseDataType } from "./data_types/glsReprintParcel.js"; +import { GlsReturnOptionsDataType } from "./data_types/glsReturnOptions.js"; +import { GlsShipmentDataType, GlsShipmentWithoutServicesDataType } from "./data_types/glsShipment.js"; +import { GlsShipmentUnitDataType } from "./data_types/glsShipmentUnit.js"; +import { GlsShipperDataType } from "./data_types/glsShipper.js"; +import { GlsUnitServiceDataType } from "./data_types/glsUnitService.js"; +import { GlsUpdateParcelWeightRequestDataType, GlsUpdateParcelWeightResponseDataType } from "./data_types/glsUpdateParcelWeight.js"; +import { GlsValidateShipmentRequestDataType, GlsValidateShipmentResponseDataType } from "./data_types/glsValidateShipment.js"; + +import { CancelShipmentFunction } from "./functions/cancelShipmentFunction.js"; +import { GetAllowedServicesFunction } from "./functions/getAllowedServicesFunction.js"; +import { GetEndOfDayReportFunction } from "./functions/getEndOfDayReportFunction.js"; +import { ReprintParcelFunction } from "./functions/reprintParcelFunction.js"; +import { UpdateParcelWeightFunction } from "./functions/updateParcelWeightFunction.js"; +import { ValidateShipmentFunction } from "./functions/validateShipmentFunction.js"; + +import { CreateAddresseeOnlyShipmentFunction } from "./functions/services/createAddresseeOnlyShipmentFunction.js"; +import { CreateDeliveryAtWorkShipmentFunction } from "./functions/services/createDeliveryAtWorkShipmentFunction.js"; +import { CreateDeliveryNextWorkingDayShipmentFunction } from "./functions/services/createDeliveryNextWorkingDayShipmentFunction.js"; +import { CreateDeliverySaturdayShipmentFunction } from "./functions/services/createDeliverySaturdayShipmentFunction.js"; +import { CreateDepositShipmentFunction } from "./functions/services/createDepositShipmentFunction.js"; +import { CreateExchangeShipmentFunction } from "./functions/services/createExchangeShipmentFunction.js"; +import { CreateFlexDeliveryShipmentFunction } from "./functions/services/createFlexDeliveryShipmentFunction.js"; +import { CreateGuaranteed24ShipmentFunction } from "./functions/services/createGuaranteed24ShipmentFunction.js"; +import { CreateIdentPinShipmentFunction } from "./functions/services/createIdentPinShipmentFunction.js"; +import { CreateIdentShipmentFunction } from "./functions/services/createIdentShipmentFunction.js"; +import { CreatePickAndShipShipmentFunction } from "./functions/services/createPickAndShipShipmentFunction.js"; +import { CreateShopDeliveryShipmentFunction } from "./functions/services/createShopDeliveryShipmentFunction.js"; +import { CreateShopReturnShipmentFunction } from "./functions/services/createShopReturnShipmentFunction.js"; +import { CreateSignatureShipmentFunction } from "./functions/services/createSignatureShipmentFunction.js"; +import { CreateTyreShipmentFunction } from "./functions/services/createTyreShipmentFunction.js"; + +import { CreateAddressFunction } from "./functions/utils/createAddressFunction.js"; +import { CreateConsigneeFunction } from "./functions/utils/createConsigneeFunction.js"; +import { CreateCustomContentFunction } from "./functions/utils/createCustomContentFunction.js"; +import { CreatePrintingOptionsFunction } from "./functions/utils/createPrintingOptionsFunction.js"; +import { CreateShipmentUnitFunction } from "./functions/utils/createShipmentUnitFunction.js"; + +const action = new Action( + process.env.ACTION_ID ?? "gls-action", + process.env.VERSION ?? "1.0.0", + process.env.AQUILA_URL ?? "127.0.0.1:8081", + "code0-tech", + "tabler:truck-delivery", + "GLS shipping integration: create, validate, cancel, reprint, and report shipments via the GLS ShipIt API.", + [{ code: "en-US", content: "GLS Action" }], + [ + { + identifier: "auth_url", + type: "TEXT", + defaultValue: "https://api.gls-group.net/oauth2/v2/token", + name: [{ code: "en-US", content: "The Auth API url" }], + description: [{ code: "en-US", content: "The url of the Auth api ending in /token." }], + linkedDataTypes: ["TEXT"], + }, + { + identifier: "client_id", + type: "TEXT", + name: [{ code: "en-US", content: "Client ID" }], + description: [{ code: "en-US", content: "The client id to authenticate with the GLS API." }], + linkedDataTypes: ["TEXT"], + }, + { + identifier: "client_secret", + type: "TEXT", + name: [{ code: "en-US", content: "Client secret" }], + description: [{ code: "en-US", content: "The client secret to authenticate with the GLS API." }], + linkedDataTypes: ["TEXT"], + }, + { + identifier: "contact_id", + type: "TEXT", + defaultValue: "", + name: [{ code: "en-US", content: "Contact ID" }], + description: [ + { + code: "en-US", + content: + "The contact id identifying the GLS account to use for the API requests. This contact must be linked to a GLS contract with API access.", + }, + ], + linkedDataTypes: ["TEXT"], + }, + { + identifier: "ship_it_api_url", + type: "TEXT", + defaultValue: "https://api.gls-group.net/shipit-farm/v1/backend/rs", + name: [{ code: "en-US", content: "The ShipIt API url" }], + description: [{ code: "en-US", content: "The url of the GLS ShipIt API." }], + linkedDataTypes: ["TEXT"], + }, + { + identifier: "default_shipper", + type: "GLS_SHIPPER", + name: [{ code: "en-US", content: "Shipper" }], + description: [ + { + code: "en-US", + content: + "The shipper information to use for the shipments. This will be used if the shipper information is not provided in the shipment data.", + }, + ], + linkedDataTypes: ["GLS_SHIPPER"], + }, + ] +); + +action.registerDataTypeClass(GlsAddressDataType); +action.registerDataTypeClass(GlsAllowedServicesRequestDataType); +action.registerDataTypeClass(GlsAllowedServicesResponseDataType); +action.registerDataTypeClass(GlsCancelShipmentRequestDataType); +action.registerDataTypeClass(GlsCancelShipmentResponseDataType); +action.registerDataTypeClass(GlsConsigneeDataType); +action.registerDataTypeClass(GlsCreateParcelsResponseDataType); +action.registerDataTypeClass(GlsCustomContentDataType); +action.registerDataTypeClass(GlsEndOfDayRequestDataType); +action.registerDataTypeClass(GlsEndOfDayResponseDataType); +action.registerDataTypeClass(GlsPrintingOptionsDataType); +action.registerDataTypeClass(ReturnLabelsDataType); +action.registerDataTypeClass(GlsReprintParcelRequestDataType); +action.registerDataTypeClass(GlsReprintParcelResponseDataType); +action.registerDataTypeClass(GlsReturnOptionsDataType); +action.registerDataTypeClass(GlsShipmentDataType); +action.registerDataTypeClass(GlsShipmentWithoutServicesDataType); +action.registerDataTypeClass(GlsShipmentUnitDataType); +action.registerDataTypeClass(GlsShipperDataType); +action.registerDataTypeClass(GlsUnitServiceDataType); +action.registerDataTypeClass(GlsUpdateParcelWeightRequestDataType); +action.registerDataTypeClass(GlsUpdateParcelWeightResponseDataType); +action.registerDataTypeClass(GlsValidateShipmentRequestDataType); +action.registerDataTypeClass(GlsValidateShipmentResponseDataType); + +action.registerRuntimeFunction(CancelShipmentFunction); +action.registerRuntimeFunction(GetAllowedServicesFunction); +action.registerRuntimeFunction(GetEndOfDayReportFunction); +action.registerRuntimeFunction(ReprintParcelFunction); +action.registerRuntimeFunction(UpdateParcelWeightFunction); +action.registerRuntimeFunction(ValidateShipmentFunction); + +action.registerRuntimeFunction(CreateAddresseeOnlyShipmentFunction); +action.registerRuntimeFunction(CreateDeliveryAtWorkShipmentFunction); +action.registerRuntimeFunction(CreateDeliveryNextWorkingDayShipmentFunction); +action.registerRuntimeFunction(CreateDeliverySaturdayShipmentFunction); +action.registerRuntimeFunction(CreateDepositShipmentFunction); +action.registerRuntimeFunction(CreateExchangeShipmentFunction); +action.registerRuntimeFunction(CreateFlexDeliveryShipmentFunction); +action.registerRuntimeFunction(CreateGuaranteed24ShipmentFunction); +action.registerRuntimeFunction(CreateIdentPinShipmentFunction); +action.registerRuntimeFunction(CreateIdentShipmentFunction); +action.registerRuntimeFunction(CreatePickAndShipShipmentFunction); +action.registerRuntimeFunction(CreateShopDeliveryShipmentFunction); +action.registerRuntimeFunction(CreateShopReturnShipmentFunction); +action.registerRuntimeFunction(CreateSignatureShipmentFunction); +action.registerRuntimeFunction(CreateTyreShipmentFunction); + +action.registerRuntimeFunction(CreateAddressFunction); +action.registerRuntimeFunction(CreateConsigneeFunction); +action.registerRuntimeFunction(CreateCustomContentFunction); +action.registerRuntimeFunction(CreatePrintingOptionsFunction); +action.registerRuntimeFunction(CreateShipmentUnitFunction); + +action.on(CodeZeroEvent.connected, () => { + console.log("Connected to aquila"); +}); + +action.on(CodeZeroEvent.error, (error: Error) => { + console.error("Stream error:", error.message); + console.log("Attempting to reconnect in 5s..."); + setTimeout(() => { + action.connect(process.env.AUTH_TOKEN ?? "your_auth_token_here").catch((err: unknown) => { + console.error("Reconnect failed:", err); + }); + }, 5000); +}); + +action.connect(process.env.AUTH_TOKEN ?? "your_auth_token_here").catch((err: unknown) => { + console.error("Failed to connect:", err); + process.exit(1); +}); + +export { action }; diff --git a/actions/gls-action/src/types/auth.ts b/actions/gls-action/src/types/auth.ts deleted file mode 100644 index 8173bba..0000000 --- a/actions/gls-action/src/types/auth.ts +++ /dev/null @@ -1,15 +0,0 @@ -import z from "zod"; - -export const AuthenticationRequestDataSchema = z.object({ - grant_type: z.string().default("client_credentials"), - client_id: z.string(), - client_secret: z.string(), - scope: z.string().optional() -}) -export type AuthenticationRequestData = z.infer -export const AuthenticationResponseDataSchema = z.object({ - access_token: z.string(), - token_type: z.string(), - expires_in: z.number(), -}) -export type AuthenticationResponseData = z.infer \ No newline at end of file diff --git a/actions/gls-action/src/types/glsAddress.ts b/actions/gls-action/src/types/glsAddress.ts deleted file mode 100644 index 05f5a86..0000000 --- a/actions/gls-action/src/types/glsAddress.ts +++ /dev/null @@ -1,67 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import z from "zod" -import {singleZodSchemaToTypescriptDef} from "../helpers"; - -export const AddressSchema = z.object({ - Name1: z.string().max(40).describe(` - @description Primary name line (person or company). Max 40 characters. - `), - Name2: z.string().max(40).optional().describe(` - @description Optional second name line (e.g., department or additional identifier). Max 40 characters. - `), Name3: z.string().max(40).optional().describe(` - @description Optional third name line for extended address details. Max 40 characters. - `), - CountryCode: z.string().max(2).describe(` - @description Two-letter ISO country code (e.g., DE, US). - `), - Province: z.string().max(40).optional().describe(` - @description State, province, or region. Optional field. Max 40 characters. - `), - City: z.string().max(40).describe(` - @description City or locality name. Max 40 characters. - `), - Street: z.string().min(4).describe(` - @description Street name. Minimum 4 characters required. - `), - StreetNumber: z.string().max(40).optional().describe(` - @description House or building number. Optional field. Max 40 characters. - `), - ContactPerson: z.string().max(40).min(6).optional().describe(` - @description Full name of a contact person. Optional field. Must be between 6 and 40 characters. - `), - FixedLinePhonenumber: z.string().max(35).min(4).optional().describe(` - @description Landline phone number. Optional field. Must be between 4 and 35 characters. - `), - MobilePhonenumber: z.string().max(35).min(4).optional().describe(` - @description Mobile phone number. Optional field. Must be between 4 and 35 characters. - `), - eMail: z.string().max(80).optional().describe(` - @description Email address. Optional field. Max 80 characters. - `), - ZIPCode: z.string().max(10).describe(` - @description Postal or ZIP code. Max 10 characters. - `), -}) -export type AddressSchema = z.infer - - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_ADDRESS", - type: singleZodSchemaToTypescriptDef("GLS_ADDRESS", AddressSchema), - name: [ - { - code: "en-US", - content: "Address" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Address" - } - ] - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/types/glsAllowedServices.ts b/actions/gls-action/src/types/glsAllowedServices.ts deleted file mode 100644 index 8d4bd31..0000000 --- a/actions/gls-action/src/types/glsAllowedServices.ts +++ /dev/null @@ -1,71 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {singleZodSchemaToTypescriptDef} from "../helpers"; -import z from "zod"; - -export const AllowedServicesRequestDataSchema = z.object({ - Source: z.object({ - CountryCode: z.string().max(2), - ZIPCode: z.string().max(10) - }), - Destination: z.object({ - CountryCode: z.string().max(2), - ZIPCode: z.string().max(10) - }), - ContactID: z.string().optional() -}) -export type AllowedServicesRequestData = z.infer -export const AllowedServicesResponseDataSchema = z.object({ - AllowedServices: z.array(z.union([ - z.object({ - ServiceName: z.string(), - }).strict(), - z.object({ - ProductName: z.string(), - }).strict() - ])) -}) -export type AllowedServicesResponseData = z.infer - -export default (sdk: ActionSdk) => { - - return sdk.registerDataTypes( - { - identifier: "GLS_ALLOWED_SERVICES_REQUEST_DATA", - type: singleZodSchemaToTypescriptDef( - "GLS_ALLOWED_SERVICES_REQUEST_DATA", - AllowedServicesRequestDataSchema, - ), - name: [ - { - code: "en-US", - content: "Allowed services request data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Allowed services request data" - } - ] - }, - { - identifier: "GLS_ALLOWED_SERVICES_RESPONSE_DATA", - type: singleZodSchemaToTypescriptDef( - "GLS_ALLOWED_SERVICES_RESPONSE_DATA", - AllowedServicesResponseDataSchema, - ), - name: [ - { - code: "en-US", - content: "Allowed services response data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Allowed services response data" - } - ] - }, - ) -} diff --git a/actions/gls-action/src/types/glsCancelShipment.ts b/actions/gls-action/src/types/glsCancelShipment.ts deleted file mode 100644 index e2be4ca..0000000 --- a/actions/gls-action/src/types/glsCancelShipment.ts +++ /dev/null @@ -1,55 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {singleZodSchemaToTypescriptDef} from "../helpers"; -import z from "zod"; - -export const CancelShipmentRequestDataSchema = z.object({ - TrackID: z.string() -}) -export type CancelShipmentRequestData = z.infer -export const CancelShipmentResponseDataSchema = z.object({ - TrackID: z.string(), - result: z.enum(["CANCELLED", "CANCELLATION_PENDING", "SCANNED", "ERROR"]) -}) -export type CancelShipmentResponseData = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_CANCEL_SHIPMENT_REQUEST_DATA", - type: singleZodSchemaToTypescriptDef( - "GLS_CANCEL_SHIPMENT_REQUEST_DATA", - CancelShipmentRequestDataSchema - ), - name: [ - { - code: "en-US", - content: "Cancel shipment request data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Cancel shipment request data" - } - ] - }, - { - identifier: "GLS_CANCEL_SHIPMENT_RESPONSE_DATA", - type: singleZodSchemaToTypescriptDef("GLS_CANCEL_SHIPMENT_RESPONSE_DATA", - CancelShipmentResponseDataSchema - ), - name: [ - { - code: "en-US", - content: "Cancel shipment response data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Cancel shipment response data" - } - ] - } - ) -} diff --git a/actions/gls-action/src/types/glsConsignee.ts b/actions/gls-action/src/types/glsConsignee.ts deleted file mode 100644 index b125b15..0000000 --- a/actions/gls-action/src/types/glsConsignee.ts +++ /dev/null @@ -1,43 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {zodSchemaToTypescriptDefs} from "../helpers"; -import {AddressSchema} from "./glsAddress"; -import {z} from "zod"; - - -export const ConsigneeSchema = z.object({ - ConsigneeID: z.string().max(40).optional(), - CostCenter: z.string().max(80).optional(), - Category: z.enum(["BUSINESS", "PRIVATE"]).optional(), - Address: AddressSchema -}) -export type ConsigneeSchema = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_CONSIGNEE", - type: zodSchemaToTypescriptDefs( - "GLS_CONSIGNEE", - ConsigneeSchema, - { - GLS_ADDRESS: AddressSchema - } - ).get("GLS_CONSIGNEE")!, - name: [ - { - code: "en-US", - content: "Consignee" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Consignee" - } - ], - linkedDataTypes: [ - "GLS_ADDRESS" - ] - }, - ) -} diff --git a/actions/gls-action/src/types/glsCreateParcelsResponse.ts b/actions/gls-action/src/types/glsCreateParcelsResponse.ts deleted file mode 100644 index 6d510bc..0000000 --- a/actions/gls-action/src/types/glsCreateParcelsResponse.ts +++ /dev/null @@ -1,58 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {singleZodSchemaToTypescriptDef} from "../helpers"; -import {z} from "zod"; - -export const CreateParcelsResponseSchema = z.object({ - CreatedShipment: z.object({ - ShipmentReference: z.array(z.string()), - ParcelData: z.array(z.object({ - TrackID: z.string().min(8).max(8), - ParcelNumber: z.string(), - Barcodes: z.object({ - Primary2D: z.string(), - Secondary2D: z.string(), - Primary1D: z.string(), - Primary1DPrint: z.boolean(), - }), - RoutingInfo: z.object({ - Tour: z.string(), - InboundSortingFlag: z.string(), - FinalLocationCode: z.string(), - LastRoutingDate: z.iso.date(), - HubLocation: z.string(), - }) - })), - PrintData: z.array(z.object({ - Data: z.string(), - LabelFormat: z.enum(["PDF", "ZEBRA", "INTERMEC", "DATAMAX", "TOSHIBA", "PNG"]) - })), - CustomerID: z.string(), - PickupLocation: z.string(), - GDPR: z.array(z.string()) - }), -}) -export type CreateParcelsResponse = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_CREATE_PARCELS_RESPONSE", - type: singleZodSchemaToTypescriptDef( - "GLS_CREATE_PARCELS_RESPONSE", - CreateParcelsResponseSchema - ), - name: [ - { - code: "en-US", - content: "Create parcels response" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Create parcels response" - } - ] - }, - ) -} diff --git a/actions/gls-action/src/types/glsCustomContent.ts b/actions/gls-action/src/types/glsCustomContent.ts deleted file mode 100644 index df751ab..0000000 --- a/actions/gls-action/src/types/glsCustomContent.ts +++ /dev/null @@ -1,37 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {singleZodSchemaToTypescriptDef} from "../helpers"; -import {z} from "zod"; - -export const CustomContentSchema = z.object({ - CustomerLogo: z.string(), - BarcodeContentType: z.enum(["TRACK_ID", "GLS_SHIPMENT_REFERENCE"]), - Barcode: z.string().optional(), - BarcodeType: z.enum(["EAN_128", "CODE_39"]).optional(), - HideShipperAddress: z.boolean().optional() -}) -export type CustomContent = z.infer - - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_CUSTOM_CONTENT", - type: singleZodSchemaToTypescriptDef( - "GLS_CUSTOM_CONTENT", - CustomContentSchema - ), - name: [ - { - code: "en-US", - content: "Custom content" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Custom content" - } - ] - }, - ) -} diff --git a/actions/gls-action/src/types/glsEndOfDayRequest.ts b/actions/gls-action/src/types/glsEndOfDayRequest.ts deleted file mode 100644 index 81b62bb..0000000 --- a/actions/gls-action/src/types/glsEndOfDayRequest.ts +++ /dev/null @@ -1,74 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {singleZodSchemaToTypescriptDef, zodSchemaToTypescriptDefs} from "../helpers"; -import z from "zod"; -import {AddressSchema} from "./glsAddress"; - -export const EndOfDayRequestDataSchema = z.object({ - date: z.iso.date() -}) -export const EndOfDayResponseDataSchema = z.object({ - Shipments: z.array(z.object({ - ShippingDate: z.iso.date(), - Product: z.enum(["PARCEL", "EXPRESS"]), - Consignee: z.object({ - Address: AddressSchema - }), - Shipper: z.object({ - ContactID: z.string(), - AlternativeShipperAddress: AddressSchema.optional(), - }), - ShipmentUnit: z.array(z.object({ - Weight: z.string(), - TrackID: z.string(), - ParcelNumber: z.string() - })).optional() - })).optional() -}) -export type EndOfDayRequestData = z.infer -export type EndOfDayResponseData = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_END_OF_DAY_REQUEST_DATA", - type: singleZodSchemaToTypescriptDef( - "GLS_END_OF_DAY_REQUEST_DATA", - EndOfDayRequestDataSchema - ), - name: [ - { - code: "en-US", - content: "End of day request data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "End of day request data" - } - ] - }, - { - identifier: "GLS_END_OF_DAY_RESPONSE_DATA", - type: zodSchemaToTypescriptDefs( - "GLS_END_OF_DAY_RESPONSE_DATA", - EndOfDayResponseDataSchema, - { - GLS_ADDRESS: AddressSchema - } - ).get("GLS_END_OF_DAY_RESPONSE_DATA")!, - name: [ - { - code: "en-US", - content: "End of day response data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "End of day response data" - } - ] - }, - ) -} diff --git a/actions/gls-action/src/types/glsPrintingOptions.ts b/actions/gls-action/src/types/glsPrintingOptions.ts deleted file mode 100644 index 9d59be3..0000000 --- a/actions/gls-action/src/types/glsPrintingOptions.ts +++ /dev/null @@ -1,66 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {singleZodSchemaToTypescriptDef, zodSchemaToTypescriptDefs} from "../helpers"; -import {z} from "zod"; - -export const ReturnLabelsSchema = z.object({ - TemplateSet: z.enum([ - "NONE", "D_200", "PF_4_I", "PF_4_I_200", "PF_4_I_300", "PF_8_D_200", "T_200_BF", "T_300_BF", "ZPL_200", "ZPL_200_TRACKID_EAN_128", "ZPL_200_TRACKID_CODE_39", "ZPL_200_REFNO_EAN_128", "ZPL_200_REFNO_CODE_39", "ZPL_300", "ZPL_300_TRACKID_EAN_128", "ZPL_300_TRACKID_CODE_39", "ZPL_300_REFNO_EAN_128", "ZPL_300_REFNO_CODE_39" - ]), - LabelFormat: z.enum(["PDF", "ZEBRA", "INTERMEC", "DATAMAX", "TOSHIBA", "PNG"]) -}) - -export const PrintingOptionsSchema = z.object({ - ReturnLabels: ReturnLabelsSchema.optional(), - useDefault: z.string().max(7).optional(), - DefinePrinter: z.object({ - LabelPrinter: z.string().max(255).optional(), - DocumentPrinter: z.string().max(255).optional(), - }).optional(), -}) -export type PrintingOptions = z.infer -export type ReturnLabels = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "RETURN_LABELS", - type: singleZodSchemaToTypescriptDef("RETURN_LABELS", - ReturnLabelsSchema - ), - name: [ - { - code: "en-US", - content: "Return Labels" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Return Labels" - } - ] - }, - { - identifier: "GLS_PRINTING_OPTIONS", - type: zodSchemaToTypescriptDefs( - "GLS_PRINTING_OPTIONS", - PrintingOptionsSchema, - { - RETURN_LABELS: ReturnLabelsSchema - } - ).get("GLS_PRINTING_OPTIONS")!, - name: [ - { - code: "en-US", - content: "Printing Options" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Printing Options" - } - ] - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/types/glsReprintParcel.ts b/actions/gls-action/src/types/glsReprintParcel.ts deleted file mode 100644 index 34d639d..0000000 --- a/actions/gls-action/src/types/glsReprintParcel.ts +++ /dev/null @@ -1,92 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import {singleZodSchemaToTypescriptDef} from "../helpers"; -import z from "zod"; - -export const ReprintParcelRequestDataSchema = z.object({ - TrackID: z.string().max(8).optional(), - ParcelNumber: z.number().max(999999999999).optional(), - ShipmentReference: z.string().max(40).optional(), - ShipmentUnitReference: z.string().max(40).optional(), - PartnerParcelNumber: z.string().max(50).optional(), - CreationDate: z.iso.date(), - PrintingOptions: z.object({ - ReturnLabels: z.object({ - TemplateSet: z.enum(["NONE", "ZPL_200", "ZPL_300"]), - LabelFormat: z.enum(["PDF", "ZEBRA", "PNG", "PNG_200"]) - }) - }) -}) -export type ReprintParcelRequestData = z.infer -export const ReprintParcelResponseDataSchema = z.object({ - CreatedShipment: z.object({ - ParcelData: z.array(z.object({ - TrackID: z.string().min(8).max(8), - ShipmentUnitReference: z.array(z.string()).optional(), - ParcelNumber: z.string(), - Barcodes: z.object({ - Primary2D: z.string(), - Secondary2D: z.string(), - Primary1D: z.string(), - Primary1DPrint: z.boolean(), - }), - RoutingInfo: z.object({ - Tour: z.string(), - InboundSortingFlag: z.string(), - FinalLocationCode: z.string(), - LastRoutingDate: z.iso.date(), - HubLocation: z.string(), - }) - })), - PrintData: z.array(z.object({ - Data: z.string(), - LabelFormat: z.enum(["PDF", "ZEBRA", "PNG", "PNG_200"]) - })), - CustomerID: z.string(), - PickupLocation: z.string(), - GDPR: z.array(z.string()) - }) -}) -export type ReprintParcelResponseData = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_REPRINT_PARCEL_REQUEST_DATA", - type: singleZodSchemaToTypescriptDef( - "GLS_REPRINT_PARCEL_REQUEST_DATA", - ReprintParcelRequestDataSchema - ), - name: [ - { - code: "en-US", - content: "Reprint parcel request data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Reprint parcel request data" - } - ] - }, - { - identifier: "GLS_REPRINT_PARCEL_RESPONSE_DATA", - type: singleZodSchemaToTypescriptDef( - "GLS_REPRINT_PARCEL_RESPONSE_DATA", - ReprintParcelResponseDataSchema - ), - name: [ - { - code: "en-US", - content: "Reprint parcel response data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Reprint parcel response data" - } - ] - }, - ) -} diff --git a/actions/gls-action/src/types/glsReturnOptions.ts b/actions/gls-action/src/types/glsReturnOptions.ts deleted file mode 100644 index b94efc5..0000000 --- a/actions/gls-action/src/types/glsReturnOptions.ts +++ /dev/null @@ -1,34 +0,0 @@ -import {singleZodSchemaToTypescriptDef} from "../helpers"; -import {z} from "zod"; -import {ActionSdk} from "@code0-tech/hercules"; - - -export const ReturnOptionsSchema = z.object({ - ReturnPrintData: z.boolean().default(true).optional(), - ReturnRoutingInfo: z.boolean().default(true).optional() -}) -export type ReturnOptions = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_RETURN_OPTIONS", - type: singleZodSchemaToTypescriptDef( - "GLS_RETURN_OPTIONS", - ReturnOptionsSchema - ), - name: [ - { - code: "en-US", - content: "Return Options" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Return Options" - } - ] - }, - ) -} diff --git a/actions/gls-action/src/types/glsShipment.ts b/actions/gls-action/src/types/glsShipment.ts deleted file mode 100644 index e245db9..0000000 --- a/actions/gls-action/src/types/glsShipment.ts +++ /dev/null @@ -1,101 +0,0 @@ -import {zodSchemaToTypescriptDefs} from "../helpers"; -import {z} from "zod"; -import {ConsigneeSchema} from "./glsConsignee"; -import {AddressSchema} from "./glsAddress"; -import {InternalShipmentServiceSchema, ShipmentServiceSchema} from "./glsShipmentService"; -import {InternalShipmentUnitSchema, ShipmentUnitSchema} from "./glsShipmentUnit"; -import {InternalShipperSchema, ShipperSchema} from "./glsShipper"; -import {ActionSdk} from "@code0-tech/hercules"; - -export const ShipmentSchema = z.object({ - ShipmentReference: z.string().max(40).optional(), - ShipmentDate: z.date().optional(), - IncotermCode: z.int().max(99).optional(), - Identifier: z.string().max(40).optional(), - Product: z.enum(["PARCEL", "EXPRESS"]).default("PARCEL"), - ExpressAltDeliveryAllowed: z.boolean().optional(), - Consignee: ConsigneeSchema, - Shipper: ShipperSchema.optional(), - Carrier: z.enum(["ROYALMAIL"]).optional(), - ShipmentUnit: z.lazy(() => ShipmentUnitSchema), - Service: z.lazy(() => ShipmentServiceSchema), - Return: z.object({ - Address: AddressSchema - }).optional() -}) -export const ShipmentWithoutServicesSchema = ShipmentSchema.omit({Service: true}) -export type ShipmentWithoutServices = z.infer -export type Shipment = z.infer -export const InternalShipmentSchma = ShipmentSchema.extend({ - Middleware: z.string().max(40), - Shipper: InternalShipperSchema, - Service: z.lazy(() => InternalShipmentServiceSchema), - ShipmentUnit: z.lazy(() => InternalShipmentUnitSchema) -}) - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_SHIPMENT", - type: zodSchemaToTypescriptDefs( - "GLS_SHIPMENT", - ShipmentSchema, - { - GLS_ADDRESS: AddressSchema, - GLS_CONSIGNEE: ConsigneeSchema, - GLS_SHIPMENT_UNIT: ShipmentUnitSchema, - GLS_SHIPPER: ShipperSchema, - GLS_SHIPMENT_SERVICE: ShipmentServiceSchema, - }).get("GLS_SHIPMENT")!, - name: [ - { - code: "en-US", - content: "Shipment" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Shipment" - } - ], - linkedDataTypes: [ - "GLS_SHIPMENT_SERVICE", - "GLS_ADDRESS", - "GLS_SHIPMENT_UNIT", - "GLS_CONSIGNEE", - "GLS_SHIPPER" - ] - }, - { - identifier: "GLS_SHIPMENT_WITHOUT_SERVICES", - type: zodSchemaToTypescriptDefs( - "GLS_SHIPMENT_WITHOUT_SERVICES", - ShipmentWithoutServicesSchema, - { - GLS_ADDRESS: AddressSchema, - GLS_CONSIGNEE: ConsigneeSchema, - GLS_SHIPMENT_UNIT: ShipmentUnitSchema, - GLS_SHIPPER: ShipperSchema, - }).get("GLS_SHIPMENT_WITHOUT_SERVICES")!, - name: [ - { - code: "en-US", - content: "Shipment without services" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Shipment without services" - } - ], - linkedDataTypes: [ - "GLS_ADDRESS", - "GLS_SHIPMENT_UNIT", - "GLS_CONSIGNEE", - "GLS_SHIPPER" - ] - }, - ) -} \ No newline at end of file diff --git a/actions/gls-action/src/types/glsShipmentService.ts b/actions/gls-action/src/types/glsShipmentService.ts deleted file mode 100644 index c65ccf1..0000000 --- a/actions/gls-action/src/types/glsShipmentService.ts +++ /dev/null @@ -1,184 +0,0 @@ -import z from "zod"; -import {AddressSchema} from "./glsAddress"; - - -export const ShipmentServiceSchema = z.array(z.object({ - Service: z.object({ - serviceName: z.string() - }).optional(), - ShopDelivery: z.object({ - ParcelShopID: z.string().max(50) - }).optional(), - ShopReturn: z.object({ - NumberOfLabels: z.number(), - ReturnQR: z.enum(["PDF", "PNG", "ZPL"]).optional() - }).optional(), - Intercompany: z.object({ - Address: AddressSchema, - NumberOfLabels: z.number().min(1), - ExpectedWeight: z.number().min(1).optional() - }).optional(), - Exchange: z.object({ - Address: AddressSchema, - ExpectedWeight: z.number().min(1).optional() - }).optional(), - DeliveryAtWork: z.object({ - RecipientName: z.string().max(40), - AlternateRecipientName: z.string().max(40).optional(), - Building: z.string().max(40), - Floor: z.number(), - Room: z.number().optional(), - Phonenumber: z.string().max(35).optional() - }).optional(), - Deposit: z.object({ - PlaceOfDeposit: z.string().max(121), - }).optional(), - IdentPin: z.object({ - PIN: z.string().max(4), - Birthdate: z.iso.date().optional() - }).optional(), - Ident: z.object({ - Birthdate: z.iso.date(), - Firstname: z.string().max(40), - Lastname: z.string().max(40), - Nationality: z.string().max(2) - }).optional(), - PickAndShip: z.object({ - PickupDate: z.iso.date(), - }).optional(), - PickAndReturn: z.object({ - PickupDate: z.iso.date(), - }).optional(), - InboundLogistics: z.object().optional(), - DocumentReturnService: z.object().optional(), - CompleteDeliveryConsignmentService: z.object().optional(), - FlexDeliveryService: z.object().optional(), - SignatureService: z.object().optional(), - T24Service: z.object().optional(), - T48Service: z.object().optional(), - Guaranteed24Service: z.object().optional(), - AddresseeOnlyService: z.object().optional(), - TyreService: z.object().optional(), - '0800Service': z.object().optional(), - '0900Service': z.object().optional(), - '1000Service': z.object().optional(), - '1200Service': z.object().optional(), - '1300Service': z.object().optional(), - EOB: z.object().optional(), - Saturday1000Service: z.object().optional(), - Saturday1200Service: z.object().optional(), - SaturdayService: z.object().optional(), -})).optional() -export type ShipmentService = z.infer -export const InternalShipmentServiceSchema = z.array(z.object({ - Service: z.object({ - serviceName: z.string() - }).optional(), - ShopDelivery: z.object({ - serviceName: z.string().default("service_shopdelivery"), - ParcelShopID: z.string().max(50) - }).optional(), - ShopReturn: z.object({ - serviceName: z.string().default("service_shopreturn"), - NumberOfLabels: z.number(), - ReturnQR: z.enum(["PDF", "PNG", "ZPL"]).optional() - }).optional(), - Intercompany: z.object({ - serviceName: z.string().default("service_intercompany"), - Address: AddressSchema, - NumberOfLabels: z.number().min(1), - ExpectedWeight: z.number().min(1).optional() - }).optional(), - Exchange: z.object({ - serviceName: z.string().default("service_exchange"), - Address: AddressSchema, - ExpectedWeight: z.number().min(1).optional() - }).optional(), - DeliveryAtWork: z.object({ - serviceName: z.string().default("service_deliveryatwork"), - RecipientName: z.string().max(40), - AlternateRecipientName: z.string().max(40).optional(), - Building: z.string().max(40), - Floor: z.number(), - Room: z.number().optional(), - Phonenumber: z.string().max(35).optional() - }).optional(), - Deposit: z.object({ - serviceName: z.string().default("service_deposit"), - PlaceOfDeposit: z.string().max(121), - }).optional(), - IdentPin: z.object({ - serviceName: z.string().default("service_identpin"), - PIN: z.string().max(4), - Birthdate: z.date().optional() - }).optional(), - Ident: z.object({ - serviceName: z.string().default("service_ident"), - Birthdate: z.date(), - Firstname: z.string().max(40), - Lastname: z.string().max(40), - Nationality: z.string().max(2) - }).optional(), - PickAndShip: z.object({ - serviceName: z.string().default("service_pickandship"), - PickupDate: z.date(), - }).optional(), - PickAndReturn: z.object({ - serviceName: z.string().default("service_pickandreturn"), - PickupDate: z.date(), - }).optional(), - InboundLogistics: z.object({ - serviceName: z.string().default("service_inbound"), - }).optional(), - DocumentReturnService: z.object({ - serviceName: z.string().default("service_documentreturn"), - }).optional(), - CompleteDeliveryConsignmentService: z.object({ - serviceName: z.string().default("service_completedeliveryconsignment"), - }).optional(), - FlexDeliveryConsignmentService: z.object({ - serviceName: z.string().default("service_flexdelivery"), - }).optional(), - SignatureService: z.object({ - serviceName: z.string().default("service_signature"), - }).optional(), - T24Service: z.object({ - serviceName: z.string().default("service_t24"), - }).optional(), - T48Service: z.object({ - serviceName: z.string().default("service_t48"), - }).optional(), - Guaranteed24Service: z.object({ - serviceName: z.string().default("service_guaranteed24"), - }).optional(), - AddresseeOnlyService: z.object({ - serviceName: z.string().default("service_addresseeonly"), - }).optional(), - TyreService: z.object({ - serviceName: z.string().default("service_tyre"), - }).optional(), - '0800Service': z.object({ - serviceName: z.string().default("service_0800"), - }).optional(), - '0900Service': z.object({ - serviceName: z.string().default("service_0900"), - }).optional(), - '1000Service': z.object({ - serviceName: z.string().default("service_1000"), - }).optional(), - '1200Service': z.object({ - serviceName: z.string().default("service_1200"), - }).optional(), - '1300Service': z.object({ - serviceName: z.string().default("service_1300"), - }).optional(), - Saturday1000Service: z.object({ - serviceName: z.string().default("service_saturday_1000"), - }).optional(), - Saturday1200Service: z.object({ - serviceName: z.string().default("service_saturday_1200"), - }).optional(), - SaturdayService: z.object({ - serviceName: z.string().default("service_Saturday"), - }).optional(), -})).optional() diff --git a/actions/gls-action/src/types/glsShipmentUnit.ts b/actions/gls-action/src/types/glsShipmentUnit.ts deleted file mode 100644 index baceb6b..0000000 --- a/actions/gls-action/src/types/glsShipmentUnit.ts +++ /dev/null @@ -1,53 +0,0 @@ -import {z} from "zod"; -import {zodSchemaToTypescriptDefs} from "../helpers"; -import {ShipmentSchema} from "./glsShipment"; -import {InternalUnitServiceSchema, UnitServiceSchema} from "./glsUnitService"; -import {ActionSdk} from "@code0-tech/hercules"; - - -export const ShipmentUnitSchema = z.array( - z.object({ - ShipmentUnitReference: z.string().max(40).optional(), - PartnerParcelNumber: z.string().max(50).optional(), - Weight: z.number().min(0.10).max(99), - Note1: z.string().max(50).optional(), - Note2: z.string().max(50).optional(), - Service: UnitServiceSchema, - }) -).min(1) -export type ShipmentUnit = z.infer -export const InternalShipmentUnitSchema = ShipmentUnitSchema.element.extend( - { - Service: InternalUnitServiceSchema.optional() - } -).array().min(1) - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_SHIPMENT_UNIT", - type: zodSchemaToTypescriptDefs( - "XXX", - ShipmentSchema, - { - GLS_SHIPMENT_UNIT: ShipmentUnitSchema, - } - ).get("GLS_SHIPMENT_UNIT")!, // Hacky because shipment unit is an array - name: [ - { - code: "en-US", - content: "Shipment Unit" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Shipment Unit" - } - ], - linkedDataTypes: [ - "GLS_UNIT_SERVICE", - ] - }, - ) -} diff --git a/actions/gls-action/src/types/glsShipper.ts b/actions/gls-action/src/types/glsShipper.ts deleted file mode 100644 index 2887d09..0000000 --- a/actions/gls-action/src/types/glsShipper.ts +++ /dev/null @@ -1,44 +0,0 @@ -import {z} from "zod"; -import {AddressSchema} from "./glsAddress"; -import {zodSchemaToTypescriptDefs} from "../helpers"; -import {ActionSdk} from "@code0-tech/hercules"; - -export const ShipperSchema = z.object({ - AlternativeShipperAddress: AddressSchema.optional(), - Address: AddressSchema.optional(), -}) -export type ShipperSchema = z.infer -export const InternalShipperSchema = ShipperSchema.extend({ - ContactID: z.string().optional() -}) -export type InternalShipper = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_SHIPPER", - type: zodSchemaToTypescriptDefs( - "GLS_SHIPPER", - ShipperSchema, - { - GLS_ADDRESS: AddressSchema - } - ).get("GLS_SHIPPER")!, - name: [ - { - code: "en-US", - content: "Shipper" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Shipper" - } - ], - linkedDataTypes: [ - "GLS_ADDRESS" - ] - } - ) -} diff --git a/actions/gls-action/src/types/glsUnitService.ts b/actions/gls-action/src/types/glsUnitService.ts deleted file mode 100644 index 050fe26..0000000 --- a/actions/gls-action/src/types/glsUnitService.ts +++ /dev/null @@ -1,87 +0,0 @@ -import z from "zod" -import {zodSchemaToTypescriptDefs} from "../helpers"; -import {ShipmentSchema} from "./glsShipment"; -import {ActionSdk} from "@code0-tech/hercules"; - -export const UnitServiceSchema = z.array(z.object({ - Cash: z.object({ - Reason: z.string().max(160).describe("@description Test"), - Amount: z.number().min(1), - Currency: z.string().max(3).min(3) - }).optional(), - AddonLiability: z.object({ - Amount: z.number().min(1), - Currency: z.string().max(3).min(3), - ParcelContent: z.string().max(255) - }).optional(), - HazardousGoods: z.object({ - HarzardousGood: z.array( - z.object({ - Weight: z.number().min(1), - GLSHazNo: z.string().max(8) - })) - }).optional(), - ExWorks: z.object({}).optional(), - LimitedQuantities: z.object({ - Weight: z.number().optional() - }).optional() -})).optional() -export type UnitService = z.infer -// adding all service names -export const InternalUnitServiceSchema = z.array(z.object({ - Cash: z.object({ - serviceName: z.string("service_cash"), - Reason: z.string(), - Amount: z.number(), - Currency: z.string() - }).optional(), - AddonLiability: z.object({ - serviceName: z.string("service_addonliability"), - Amount: z.number(), - Currency: z.string(), - ParcelContent: z.string() - }).optional(), - HazardousGoods: z.object({ - serviceName: z.string("service_hazardousgoods"), - HarzardousGood: z.array( - z.object({ - Weight: z.number(), - GLSHazNo: z.string() - })) - }), - ExWorks: z.object({ - serviceName: z.string("service_exworks"), - }).optional(), - LimitedQuantities: z.object({ - serviceName: z.string("service_limitedquantities"), - Weight: z.number().optional() - }).optional() -})).optional() - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_UNIT_SERVICE", - type: zodSchemaToTypescriptDefs( - "XXX", - ShipmentSchema, - { - GLS_UNIT_SERVICE: UnitServiceSchema, - }).get("GLS_UNIT_SERVICE")!, // Hacky way because unit service is an arra - name: [ - { - code: "en-US", - content: "GLS unit service" - } - ], - displayMessage: [ - { - code: "en-US", - content: "GLS unit service" - } - ] - } - ) -} - - diff --git a/actions/gls-action/src/types/glsUpdateParcelWeight.ts b/actions/gls-action/src/types/glsUpdateParcelWeight.ts deleted file mode 100644 index 5a907c3..0000000 --- a/actions/gls-action/src/types/glsUpdateParcelWeight.ts +++ /dev/null @@ -1,60 +0,0 @@ -import z from "zod"; -import {singleZodSchemaToTypescriptDef} from "../helpers"; -import {ActionSdk} from "@code0-tech/hercules"; - -export const UpdateParcelWeightRequestDataSchema = z.object({ - TrackID: z.string().max(8).optional(), - ParcelNumber: z.number().max(999999999999).optional(), - ShipmentReference: z.string().max(40).optional(), - ShipmentUnitReference: z.string().max(40).optional(), - PartnerParcelNumber: z.string().max(50).optional(), - Weight: z.number().min(0.10) -}) -export type UpdateParcelWeightRequestData = z.infer -export const UpdateParcelWeightResponseDataSchema = z.object({ - UpdatedWeight: z.string() -}) -export type UpdateParcelWeightResponseData = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA", - type: singleZodSchemaToTypescriptDef( - "GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA", - UpdateParcelWeightRequestDataSchema - ), - name: [ - { - code: "en-US", - content: "Update parcel weight request data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Update parcel weight request data" - } - ] - }, - { - identifier: "GLS_UPDATE_PARCEL_WEIGHT_RESPONSE_DATA", - type: singleZodSchemaToTypescriptDef( - "GLS_UPDATE_PARCEL_WEIGHT_RESPONSE_DATA", - UpdateParcelWeightResponseDataSchema - ), - name: [ - { - code: "en-US", - content: "Update parcel weight response data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Update parcel weight response data" - } - ] - }, - ) -} diff --git a/actions/gls-action/src/types/glsValidateShipment.ts b/actions/gls-action/src/types/glsValidateShipment.ts deleted file mode 100644 index e22874f..0000000 --- a/actions/gls-action/src/types/glsValidateShipment.ts +++ /dev/null @@ -1,74 +0,0 @@ -import {ActionSdk} from "@code0-tech/hercules"; -import z from "zod"; -import {InternalShipmentSchma, ShipmentSchema} from "./glsShipment"; -import {singleZodSchemaToTypescriptDef, zodSchemaToTypescriptDefs} from "../helpers"; - - -export const ValidateShipmentRequestDataSchema = z.object({ - Shipment: ShipmentSchema, -}) -export type ValidateShipmentRequestData = z.infer -export const ValidateShipmentResponseDataSchema = z.object({ - success: z.boolean(), - validationResult: z.object({ - Issues: z.array(z.object({ - Rule: z.string(), - Location: z.string(), - Parameters: z.array(z.string()).optional() - })) - }) -}) -export type ValidateShipmentResponseData = z.infer -export const InternalValidateShipmentRequestDataSchema = z.object({ - Shipment: InternalShipmentSchma, -}) -export type InternalValidateShipmentRequestData = z.infer - -export default (sdk: ActionSdk) => { - return sdk.registerDataTypes( - { - identifier: "GLS_VALIDATE_SHIPMENT_REQUEST_DATA", - type: zodSchemaToTypescriptDefs( - "GLS_VALIDATE_SHIPMENT_REQUEST_DATA", - ValidateShipmentRequestDataSchema, - { - GLS_SHIPMENT: ShipmentSchema - } - ).get("GLS_VALIDATE_SHIPMENT_REQUEST_DATA")!, - name: [ - { - code: "en-US", - content: "Validate shipment request data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Validate shipment request data" - } - ], - linkedDataTypes: [ - "GLS_SHIPMENT" - ] - }, - { - identifier: "GLS_VALIDATE_SHIPMENT_RESPONSE_DATA", - type: singleZodSchemaToTypescriptDef( - "GLS_VALIDATE_SHIPMENT_RESPONSE_DATA", - ValidateShipmentResponseDataSchema - ), - name: [ - { - code: "en-US", - content: "Validate shipment response data" - } - ], - displayMessage: [ - { - code: "en-US", - content: "Validate shipment response data" - } - ] - }, - ) -} diff --git a/actions/gls-action/test/functions/reprintParcel.test.ts b/actions/gls-action/test/functions/reprintParcel.test.ts deleted file mode 100644 index 3f408a2..0000000 --- a/actions/gls-action/test/functions/reprintParcel.test.ts +++ /dev/null @@ -1,128 +0,0 @@ -import {describe, it, expect, vi, beforeEach} from "vitest"; -import {HerculesFunctionContext} from "@code0-tech/hercules"; -import { - ReprintParcelResponseData, - ReprintParcelResponseDataSchema -} from "../../src/types/glsReprintParcel"; -import {withBaseFunctionMock} from "../helpers/withBaseFunction"; -import {AuthenticationResponseData} from "../../src/types/auth"; - -const mockRequestData = { - CreationDate: "2024-01-01T00:00:00Z", - ParcelNumber: 0, - PartnerParcelNumber: "", - PrintingOptions: { - ReturnLabels: { - LabelFormat: "PDF", - TemplateSet: "ZPL_300" - } - }, - ShipmentReference: "", - ShipmentUnitReference: "", - TrackID: "SOME_TRACK_ID" -}; - -const createContext = (): HerculesFunctionContext => ({ - matchedConfig: { - projectId: 0, - configValues: [], - findConfig: (identifier) => { - const map: Record = { - client_id: "SOME_ID", - client_secret: "SOME_SECRET", - auth_url: "AUTH_URL", - ship_it_api_url: "API_URL" - }; - return map[identifier]; - } - }, - projectId: 0, - executionId: "SOME_ID" -}); - -describe("reprintParcel.ts", () => { - const postMock = vi.hoisted(() => vi.fn((url: string, data: any) => { - if (url === "AUTH_URL") { - const authResponse: AuthenticationResponseData = { - access_token: "TOKEN", - token_type: "Bearer", - expires_in: 14000 - }; - return {data: authResponse}; - } - - expect(data).toEqual(mockRequestData); - - const result: ReprintParcelResponseData = { - CreatedShipment: { - GDPR: [], - ParcelData: [], - PrintData: [], - CustomerID: "", - PickupLocation: "" - } - }; - - return {data: result}; - })); - - beforeEach(() => { - vi.resetModules(); - - vi.mock("axios", () => ({ - default: { - post: postMock - } - })); - }); - - it("registers function definitions and calls API endpoints correctly", async () => { - const register = await import("../../src/functions/reprintParcel"); - - await withBaseFunctionMock(register.default, async (state) => { - expect(state.registeredFunctionDefinitions).toHaveLength(1); - - const [reprintParcel] = state.registeredFunctionDefinitions; - - expect(reprintParcel.definition.runtimeName).toBe("reprintParcel"); - - const result = await reprintParcel.handler( - mockRequestData, - createContext() - ); - - expect(ReprintParcelResponseDataSchema.safeParse(result).success).toBe(true); - - expect(postMock).toHaveBeenCalledTimes(2); - - expect(postMock.mock.calls[0]).toEqual( - [ - "AUTH_URL", - { - grant_type: 'client_credentials', - client_id: createContext().matchedConfig.findConfig("client_id"), - client_secret: createContext().matchedConfig.findConfig("client_secret"), - }, - { - headers: { - 'Content-Type': "application/x-www-form-urlencoded" - } - } - ] - ); - - expect(postMock.mock.calls[1]).toEqual( - [ - "API_URL/rs/shipments/reprintparcel", - mockRequestData, - { - headers: { - Authorization: "Bearer TOKEN", - 'Content-Type': "application/glsVersion1+json" - } - } - ] - ); - }); - }); -}); \ No newline at end of file diff --git a/actions/gls-action/test/helpers/withBaseFunction.ts b/actions/gls-action/test/helpers/withBaseFunction.ts deleted file mode 100644 index cb587fe..0000000 --- a/actions/gls-action/test/helpers/withBaseFunction.ts +++ /dev/null @@ -1,56 +0,0 @@ -import {vi} from "vitest"; -import {SdkMockState} from "../index.test"; -import {withSdkMock} from "./withSdkMock"; -import {ActionSdk} from "@code0-tech/hercules"; - -export const withBaseFunctionMock = async ( - register: (sdk: ActionSdk) => Promise, - tests: (state: SdkMockState) => void -) => { - await withSdkMock(async (state) => { - const {createSdk} = await import("@code0-tech/hercules") - - vi.doMock("../helpers.ts", async (importOriginal) => { - const actual = await importOriginal() as any; - - return { - ...actual, - loadAllDefinitions: vi.fn(() => { - return Promise.resolve() - }) - } - }) - - const mockSdk = createSdk( - { - actionId: "", - version: "", - aquilaUrl: "", - authToken: "" - } - ) - - vi.doMock("../index.ts", () => ({ - sdk: mockSdk - })); - - vi.doMock("axios", () => { - return { - post: vi.fn(), - get: vi.fn(), - put: vi.fn(), - delete: vi.fn(), - }; - }); - - try { - await register(mockSdk) - - tests(state); - - } catch (error) { - console.error(error) - } - }) -} - diff --git a/actions/gls-action/test/helpers/withSdkMock.ts b/actions/gls-action/test/helpers/withSdkMock.ts deleted file mode 100644 index 6648559..0000000 --- a/actions/gls-action/test/helpers/withSdkMock.ts +++ /dev/null @@ -1,77 +0,0 @@ -import {beforeEach, vi} from "vitest"; -import { - ActionSdk, - HerculesActionConfigurationDefinition, - HerculesDataType, - HerculesFlowType, - HerculesRegisterFunctionParameter -} from "@code0-tech/hercules"; -import {SdkMockState} from "../index.test"; - -export const withSdkMock = async (tests: (state: SdkMockState) => void) => { - const state = vi.hoisted(() => { - const state: SdkMockState = { - registeredFunctionDefinitions: [] as HerculesRegisterFunctionParameter[], - dataTypes: [] as HerculesDataType[], - flowTypes: [] as HerculesFlowType[], - configDefinitions: [] as HerculesActionConfigurationDefinition[], - }; - return state - }) - - - vi.mock("@code0-tech/hercules", async (importOriginal) => { - const actual = await importOriginal() as any - return { - ...actual, - createSdk: (config, configDefinitions) => { - state.configDefinitions = configDefinitions || null - - const mockedActionSdk: ActionSdk = { - config: config, - registerFunctionDefinitions: (...defs: HerculesRegisterFunctionParameter[]) => { - state.registeredFunctionDefinitions = defs; - return Promise.resolve(); - }, - - registerConfigDefinitions: (...defs: HerculesActionConfigurationDefinition[]) => { - state.configDefinitions = defs; - return Promise.resolve(); - }, - - registerDataTypes: (...types: HerculesDataType[]) => { - state.dataTypes = types; - return Promise.resolve(); - }, - - registerFlowTypes: (...types: HerculesFlowType[]) => { - state.flowTypes = types; - return Promise.resolve(); - }, - fullyConnected: () => { - return true - }, - connect: vi.fn(() => { - return Promise.resolve([]); - }), - onError: vi.fn(), - dispatchEvent: vi.fn(), - getProjectActionConfigurations: vi.fn() - } - return mockedActionSdk - - } - } - - }) - - - beforeEach(() => { - state.registeredFunctionDefinitions = null; - state.dataTypes = null; - state.flowTypes = null; - state.configDefinitions = null; - }); - - tests(state); -} \ No newline at end of file diff --git a/actions/gls-action/test/index.test.ts b/actions/gls-action/test/index.test.ts deleted file mode 100644 index f11dcc9..0000000 --- a/actions/gls-action/test/index.test.ts +++ /dev/null @@ -1,106 +0,0 @@ -import {describe, expect, it, vi} from "vitest"; -import { - HerculesActionConfigurationDefinition, - HerculesDataType, - HerculesFlowType, - HerculesRegisterFunctionParameter -} from "@code0-tech/hercules"; -import {withSdkMock} from "./helpers/withSdkMock"; - -export type SdkMockState = { - registeredFunctionDefinitions: HerculesRegisterFunctionParameter[] | null; - dataTypes: HerculesDataType[] | null; - flowTypes: HerculesFlowType[] | null; - configDefinitions: HerculesActionConfigurationDefinition[] | null; -} - - -describe("withSdkMock", () => { - withSdkMock((state) => { - it("registers config definitions", async () => { - const {createSdk} = await import("@code0-tech/hercules"); - - const sdk = createSdk({ - authToken: "testToken", - aquilaUrl: "http://localhost:50051", - actionId: "testAction", - version: "1.0.0", - }); - - await sdk.registerConfigDefinitions({ - identifier: "config_test", - type: "STRING", - }); - - expect(state.configDefinitions).toEqual([ - {identifier: "config_test", type: "STRING"}, - ]); - }); - - it("registers data and flow types", async () => { - const {createSdk} = await import("@code0-tech/hercules"); - - const sdk = createSdk({ - authToken: "testToken", - aquilaUrl: "http://localhost:50051", - actionId: "testAction", - version: "1.0.0", - }); - - await sdk.registerDataTypes({ - identifier: "Data1", - type: "string", - }); - - await sdk.registerFlowTypes({ - signature: "", - identifier: "Flow1", - editable: false, - }); - - expect(state.dataTypes).toEqual([ - {identifier: "Data1", type: "string"}, - ]); - - expect(state.flowTypes).toEqual([ - {identifier: "Flow1", editable: false, signature: ""}, - ]); - }); - - - it('should be valid', async () => { - vi.resetModules(); // clear module cache - await import("../src"); // now it runs - - state.dataTypes?.forEach((dataType: HerculesDataType) => { - expect(dataType.identifier.startsWith("GLS_"), `${dataType.identifier}: Identifier should start with GLS_`).toBeTruthy() - expect(dataType.name || [], `${dataType.identifier}: Name should be set`).not.toHaveLength(0) - expect(dataType.displayMessage || [], `${dataType.identifier}: Display message should be set`).not.toHaveLength(0) - }) - - state.configDefinitions?.forEach(value => { - expect(value.name || [], `${value.identifier}: Name should be set`).not.toHaveLength(0) - expect(value.description || [], `${value.identifier}: Description should be set`).not.toHaveLength(0) - expect(value.linkedDataTypes || [], `${value.identifier}: Linked data types should be set`).not.toHaveLength(0) - }) - - state.flowTypes?.forEach(value => { - expect(value.identifier.startsWith("GLS_"), `${value.identifier}: Identifier should start with GLS_`).toBeTruthy() - expect(value.name || [], `${value.identifier}: Name should be set`).not.toHaveLength(0) - expect(value.description || [], `${value.identifier}: Description should be set`).not.toHaveLength(0) - expect(value.displayMessage || [], `${value.identifier}: Display message should be set`).not.toHaveLength(0) - expect(value.documentation || [], `${value.identifier}: Documentation should be set`).not.toHaveLength(0) - }) - - state.registeredFunctionDefinitions?.forEach(value => { - expect(value.definition.name || [], `${value.definition.runtimeName}: Name should be set`).not.toHaveLength(0) - expect(value.definition.description || [], `${value.definition.runtimeName}: Description should be set`).not.toHaveLength(0) - expect(value.definition.documentation || [], `${value.definition.runtimeName}: Documentation should be set`).not.toHaveLength(0) - value.definition.parameters?.forEach(param => { - expect(param.name || [], `${value.definition.runtimeName} parameter ${param.runtimeName}: Name should be set`).not.toHaveLength(0) - expect(param.description || [], `${value.definition.runtimeName} parameter ${param.runtimeName}: Description should be set`).not.toHaveLength(0) - }) - }) - }); - }); -}) diff --git a/actions/gls-action/tsconfig.json b/actions/gls-action/tsconfig.json index d3ec800..f433001 100644 --- a/actions/gls-action/tsconfig.json +++ b/actions/gls-action/tsconfig.json @@ -1,7 +1,21 @@ { - "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "dist" + "target": "ES2020", + "module": "ESNext", + "moduleResolution": "Bundler", + "declaration": true, + "outDir": "dist", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "allowImportingTsExtensions": true, + "noEmit": true, + "baseUrl": ".", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "types": ["node", "vite/client"] }, - "include": ["src", "scripts"] + "include": [ + "src/**/*" + ] } \ No newline at end of file diff --git a/actions/gls-action/vite.config.ts b/actions/gls-action/vite.config.ts index 7ab94be..dc45894 100644 --- a/actions/gls-action/vite.config.ts +++ b/actions/gls-action/vite.config.ts @@ -1,31 +1,18 @@ -import {defineConfig} from 'vite'; -import {resolve} from 'path'; +import { defineConfig } from 'vite'; +import { resolve } from 'path'; export default defineConfig({ build: { - target: 'node18', - ssr: true, - outDir: 'dist', - emptyOutDir: true, + target: "node18", + ssr: resolve(__dirname, 'src/index.ts'), rollupOptions: { - input: { - main: resolve(__dirname, 'src/index.ts'), - generateDocs: resolve(__dirname, 'scripts/generateDocs.ts') - }, - external: [ - 'fs', - 'path', - 'os', - 'crypto', - 'stream', - 'util', - 'events', - 'buffer', - 'url', - 'zlib', - 'node:fs', - 'node:path' - ] + external: (id) => + [ + 'fs', + 'path', + 'typescript', + '@code0-tech/hercules' + ].includes(id) || id.startsWith('node:') } } -}); \ No newline at end of file +}); diff --git a/actions/gls-action/vitest.config.ts b/actions/gls-action/vitest.config.ts deleted file mode 100644 index 918a608..0000000 --- a/actions/gls-action/vitest.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import baseConfig from "../../vitest.config"; -import { defineConfig, mergeConfig } from "vitest/config"; - -export default mergeConfig(baseConfig, defineConfig({ - test: { - include: ["**/*.{test,spec}.{ts,tsx}"] - } -})); \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 85b210b..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: "3.9" - -services: - gls-action: - build: - context: . - dockerfile: actions/gls-action/Dockerfile - container_name: gls-action \ No newline at end of file diff --git a/docs/Actions/GLS/configs.md b/docs/Actions/GLS/configs.md deleted file mode 100644 index 7572144..0000000 --- a/docs/Actions/GLS/configs.md +++ /dev/null @@ -1,115 +0,0 @@ ---- -title: Configuration -description: All configuration options for the GLS Action, including how to obtain credentials from the GLS Developer Portal. ---- - -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). - ---- - -## Configuration reference - -| Config Name | Type | Required | Default | Description | -|-------------------|-------------|----------|-------------------------------------------------------|-------------------------------------------------------------------------------| -| `client_id` | string | **Yes** | — | OAuth2 client ID for authenticating with the GLS API | -| `client_secret` | string | **Yes** | — | OAuth2 client secret for authenticating with the GLS API | -| `contact_id` | string | No | `""` | GLS contact ID used in some API requests (see note below) | -| `ship_it_api_url` | string | No | `https://api.gls-group.net/shipit-farm/v1/backend/rs` | GLS ShipIT API base URL | -| `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. - ---- - -## How to obtain your credentials - -### Step 1 — Create a GLS Developer account - -1. Go to -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 - -### Step 2 — Create an application - -1. After logging in, navigate to **My Apps** in the top navigation -2. Click **Create App** (or **New Application**) -3. Fill in the application name and description -4. Select the required API scopes (typically **ShipIT**) -5. Submit the form - -### Step 3 — Retrieve your credentials - -1. Open the application you just created in **My Apps** -2. Copy the **Client ID** — this is your `client_id` -3. Copy the **Client Secret** — this is your `client_secret` - -> Keep the `client_secret` confidential. Do not commit it to source control. - -### 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. - ---- - -## API endpoints - -GLS provides different API endpoints depending on your region and environment. -The defaults point to the global production API: - -| Setting | Default URL | -|---------|-------------| -| `ship_it_api_url` | `https://api.gls-group.net/shipit-farm/v1/backend/rs` | -| `auth_url` | `https://api.gls-group.net/oauth2/v2/token` | - -If you are using a regional or sandbox endpoint, update these values accordingly. Always ensure `auth_url` ends with `/token`. - ---- - -## Authentication flow - -The GLS Action authenticates using **OAuth2 client credentials**: - -```text -GLS Action - │ - ├── POST {auth_url} - │ body: grant_type=client_credentials - │ client_id= - │ client_secret= - │ - │◄── { access_token, expires_in } - │ - └── All subsequent API calls include: - Authorization: Bearer -``` - -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 value must be a valid `GLS_SHIPPER` object: - -```json -{ - "AddressSchema": { - "Name1": "My Company GmbH", - "CountryCode": "DE", - "City": "Berlin", - "Street": "Hauptstrasse", - "ZIPCode": "10115" - } -} -``` - -See [Types — GLS_SHIPPER](types.mdx#GLS_SHIPPER) for the full field reference. diff --git a/docs/Actions/GLS/events.md b/docs/Actions/GLS/events.md deleted file mode 100644 index da51c64..0000000 --- a/docs/Actions/GLS/events.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -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 - -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**. - ---- diff --git a/docs/Actions/GLS/functions.mdx b/docs/Actions/GLS/functions.mdx deleted file mode 100644 index ba60266..0000000 --- a/docs/Actions/GLS/functions.mdx +++ /dev/null @@ -1,2872 +0,0 @@ ---- -title: Functions -description: All functions registered by the GLS Action. ---- - -The GLS Action exposes functions grouped into three categories: - -- **Builder functions** — Construct data objects (no API call) -- **Shipment functions** — Create different types of GLS shipments (calls GLS API) -- **API functions** — Query or modify shipments (calls GLS API) - ---- - -## Builder functions - -### `createShipmentUnit` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| weight | Weight (kg) | number | Yes | The weight of the shipment unit in kilograms. Must be a positive number and greater than 0.10 and less than 99. | -| shipmentUnitReference | Shipment unit reference | string | No | The reference for the shipment unit. Max length is 40 characters. | -| partnerParcelNumber | Partner parcel number | string | No | The partner parcel number for the shipment unit. Max length is 50 characters. | -| note1 | Note 1 | string | No | Note 1 for the shipment unit. Max length is 50 characters. | -| note2 | Note 2 | string | No | Note 2 for the shipment unit. Max length is 50 characters. | -| shipmentUnitService | Shipment unit service | [GLS_SHIPMENT_UNIT$Service](./types.mdx#gls_shipment_unitservice) | Yes | The service associated with the shipment unit. | - -Return Type: [GLS_SHIPMENT_UNIT](./types.mdx#gls_shipment_unit) - -Creates a GLS shipment unit (an individual parcel within a shipment). - - - ---- - -### `createPrintingOptions` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| returnLabels | Return labels | RETURN_LABELS | Yes | The return labels to be included in the shipment. | - -Return Type: [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) - -Creates GLS printing options that control how labels are generated. - - - ---- - -### `createCustomContent` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| barcodeContentType | Barcode content type | "TRACK_ID"\|"GLS_SHIPMENT_REFERENCE" | Yes | Type of content encoded in the barcode (TRACK_ID or GLS_SHIPMENT_REFERENCE). | -| customerLogo | Customer logo | string | Yes | Base64-encoded customer logo to print on the label. | -| hideShipperAddress | Hide shipper address | boolean | No | Whether to hide the shipper address on the label. | -| barcodeType | Barcode type | "EAN_128"\|"CODE_39" | No | Type of barcode to use (EAN_128 or CODE_39). | -| barcode | Barcode | string | No | Barcode value to print on the label. | - -Return Type: [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) - -Creates custom content settings for GLS labels, including logos and barcodes. - - - ---- - -### `createConsignee` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| consigneeId | Consignee ID | string | Yes | The ID of the consignee. Max length is 40 characters. | -| costCenter | Cost center | string | Yes | The cost center for the consignee. Max length is 80 characters. | -| Address | Address | [GLS_ADDRESS](./types.mdx#gls_address) | Yes | The address of the consignee. | -| Category | Category | "BUSINESS"\|"PRIVATE" | Yes | The category of the consignee. Can be either BUSINESS or PRIVATE. | - -Return Type: [GLS_CONSIGNEE](./types.mdx#gls_consignee) - -Creates a GLS consignee (recipient) object for use in shipments. - - - ---- - -### `createAddress` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| Name1 | Name 1 | string | Yes | The name of the recipient or company. Max length is 40 characters. | -| CountryCode | Country code | string | Yes | The ISO alpha-2 country code. For example, DE for Germany or FR for France. | -| City | City | string | Yes | The city of the address. Max length is 40 characters. | -| Street | Street | string | Yes | The street name of the address. Min length is 4 characters. | -| ZIPCode | ZIP code | string | Yes | The ZIP code of the address. Max length is 10 characters. | -| Name2 | Name 2 | string | No | Additional name information. Max length is 40 characters. | -| Name3 | Name 3 | string | No | Additional name information. Max length is 40 characters. | -| Province | Province/State | string | No | The province or state of the address. Max length is 40 characters. | -| StreetNumber | Street number | string | No | The street number of the address. Max length is 40 characters. | -| ContactPerson | Contact person | string | No | The contact person for the address. Max length is 40 characters. | -| FixedLinePhonenumber | Fixed line phone number | string | No | The fixed line phone number for the address. Max length is 35 characters. | -| MobilePhonenumber | Mobile phone number | string | No | The mobile phone number for the address. Max length is 35 characters. | -| Email | Email | string | No | The email address for the address. Max length is 80 characters. | - -Return Type: [GLS_ADDRESS](./types.mdx#gls_address) - -Creates a GLS address object (`GLS_ADDRESS`) for use in shipments as consignee, shipper, or return address. - - - ---- - -## Shipment functions - -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:** - -| Parameter | Type | Required | Description | -|-------------------|-------------------------------|----------|----------------------------------------------------| -| `shipment` | GLS_SHIPMENT_WITHOUT_SERVICES | **Yes** | Shipment data (consignee, shipper, units, product) | -| `printingOptions` | GLS_PRINTING_OPTIONS | **Yes** | Label format settings | -| `returnOptions` | GLS_RETURN_OPTIONS | No | Whether to return print data and routing info | -| `customContent` | GLS_CUSTOM_CONTENT | No | Custom logo and barcode settings | - ---- - -### `createTyreShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Creates a shipment specifically for tyre/wheel delivery (uses the GLS TyreService). - - - ---- - -### `createSignatureShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Creates a shipment that requires a recipient signature upon delivery. - - - ---- - -### `createShopReturnShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| numberOfLabels | The number of labels | number | Yes | The number of labels to be created for the return shipment. | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | -| returnQR | Return QR | "PDF" \| "PNG" \| "ZPL" | Yes | The return QR of the shipment. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Creates a return shipment from a GLS Parcel Shop (customer drops off parcel at a shop). - - - ---- - -### `createShopDeliveryShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| parcelShopId | Parcel shop Id | string | Yes | The ID of the parcel shop where the shipment should be delivered. | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Delivers a parcel to a GLS Parcel Shop where the recipient can collect it. - - - ---- - -### `createPickAndShipShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| pickupDate | Pickup date | string | Yes | The pickup date for the pick and ship shipment. | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Schedules a pickup from the consignee's address on a given date. - - - ---- - -### `createIdentShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| birthDate | Birth date | string | Yes | The birth date for the ident shipment identification. | -| firstName | First name | string | Yes | The first name for the ident shipment identification. | -| lastName | Last name | string | Yes | The last name for the ident shipment identification. | -| nationality | Nationality | string | Yes | The nationality for the ident shipment identification. | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Delivers a parcel with identity verification - the driver checks the recipient's ID document. - - - ---- - -### `createIdentPinShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| pin | Pin | string | Yes | The pin for the ident pin shipment identification. | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | -| birthDate | Birth date | string | Yes | The birth date for the ident pin shipment identification. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Delivers a parcel with PIN and optional birthdate verification. - - - ---- - -### `createGuaranteed24Shipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Creates a shipment with guaranteed delivery within 24 hours. - - - ---- - -### `createFlexDeliveryShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Creates a shipment with flexible delivery - the recipient can redirect or reschedule delivery. - - - ---- - -### `createExchangeShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| address | Address | [GLS_ADDRESS](./types.mdx#gls_address) | Yes | The address of the exchange shipment. | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | -| expectedWeight | Expected weight | number | No | The expected weight for the exchange shipment. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Delivers a new parcel while simultaneously picking up an existing one (exchange). - - - ---- - -### `createDepositShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| placeOfDeposit | Place of deposit | string | Yes | The place of deposit for the delivery. | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Delivers a parcel to a designated deposit location (e.g. a garage or shed) without requiring a signature. - - - ---- - -### `createDeliverySaturdayShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Creates an EXPRESS shipment for Saturday delivery. - - - ---- - -### `createDeliveryNextWorkingDayShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Creates an EXPRESS shipment for delivery on the next working day (EOB service). - - - ---- - -### `createDeliveryAtWorkShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| recipientName | Recipient name | string | Yes | The recipient name for the delivery at work shipment. | -| building | Building | string | Yes | The building of the delivery at work shipment. | -| floor | Floor | number | Yes | The floor of the delivery at work shipment. | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | -| alternateRecipientName | Alternate recipient name | string | No | The alternate recipient name for the delivery at work shipment. | -| room | Room | number | No | The room of the delivery at work shipment. | -| phonenumber | Phone number | string | No | The phone number for the delivery at work shipment. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Delivers a parcel to a specific location within a workplace (building, floor, room). - - - ---- - -### `createAddresseeOnlyShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| shipment | Shipment | [GLS_SHIPMENT](./types.mdx#gls_shipment) | Yes | The shipment for which to create the parcels. Must include all necessary information and services for the shipment. | -| printingOptions | Printing options | [GLS_PRINTING_OPTIONS](./types.mdx#gls_printing_options) | Yes | The printing options for the shipment. Specifies options for the labels to be printed for the shipment. | -| returnOptions | Return options | [GLS_RETURN_OPTIONS](./types.mdx#gls_return_options) | No | The return options for the shipment. Specifies options for return shipments. | -| customContent | Custom content | [GLS_CUSTOM_CONTENT](./types.mdx#gls_custom_content) | No | The custom content for the shipment. Specifies options for custom content to be printed on the labels. | - -Return Type: [GLS_CREATE_PARCELS_RESPONSE](./types.mdx#gls_create_parcels_response) - -Creates a shipment that can only be delivered to the named addressee (no neighbor delivery). - - - ---- - -## API functions - -### `validateShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| data | Data | [GLS_VALIDATE_SHIPMENT_REQUEST_DATA](./types.mdx#gls_validate_shipment_request_data) | Yes | The shipment data to validate. | - -Return Type: [GLS_VALIDATE_SHIPMENT_RESPONSE_DATA](./types.mdx#gls_validate_shipment_response_data) - -Validates a shipment against the GLS API without creating it. -Use this before `createShipment` functions to catch errors early. - - - ---- - -### `updateParcelWeight` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| data | Data | [GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA](./types.mdx#gls_update_parcel_weight_request_data) | Yes | The update parcel weight request data. | - -Return Type: [GLS_END_OF_DAY_RESPONSE_DATA](./types.mdx#gls_end_of_day_response_data) - -Updates the weight of an already-created parcel. Useful when the final weight is only known after packaging. - - - ---- - -### `reprintParcel` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| data | Data | [GLS_REPRINT_PARCEL_REQUEST_DATA](./types.mdx#gls_reprint_parcel_request_data) | Yes | The reprint parcel request data. | - -Return Type: [GLS_REPRINT_PARCEL_RESPONSE_DATA](./types.mdx#gls_reprint_parcel_response_data) - -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. - - - ---- - -### `getEndOfDayReport` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| data | Data | [GLS_END_OF_DAY_REQUEST_DATA](./types.mdx#gls_end_of_day_request_data) | Yes | The end of day report request data. | - -Return Type: [GLS_END_OF_DAY_RESPONSE_DATA](./types.mdx#gls_end_of_day_response_data) - -Retrieves all shipments dispatched on a given date. Useful for reconciliation and end-of-day processing. - - - ---- - -### `getAllowedServices` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| data | Data | [GLS_ALLOWED_SERVICES_REQUEST_DATA](./types.mdx#gls_allowed_services_request_data) | Yes | The allowed services request data. | - -Return Type: [GLS_ALLOWED_SERVICES_RESPONSE_DATA](./types.mdx#gls_allowed_services_response_data) - -Returns the GLS services available for a given origin/destination country and ZIP code combination. - - - ---- - -### `cancelShipment` - -| Parameter | Name | Type | Required | Description | -| --- | --- | --- | --- | --- | -| data | Data | [GLS_CANCEL_SHIPMENT_REQUEST_DATA](./types.mdx#gls_cancel_shipment_request_data) | Yes | The cancel shipment request data. | - -Return Type: [GLS_CANCEL_SHIPMENT_RESPONSE_DATA](./types.mdx#gls_cancel_shipment_response_data) - -Cancels an existing shipment by its Track ID. Only possible if the parcel has not yet been scanned. - - - ---- diff --git a/docs/Actions/GLS/meta.json b/docs/Actions/GLS/meta.json deleted file mode 100644 index a1c1bf9..0000000 --- a/docs/Actions/GLS/meta.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "title": "GLS Action", - "description": "GLS ShipIT integration for creating and managing shipments", - "pages": [ - "---Introduction---", - "overview", - "quick-start", - "configs", - "troubleshooting", - "---Definitions---", - "events", - "functions", - "types", - "---Use Cases---", - "use-cases" - ] -} diff --git a/docs/Actions/GLS/overview.md b/docs/Actions/GLS/overview.md deleted file mode 100644 index 896b3d0..0000000 --- a/docs/Actions/GLS/overview.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Overview -description: Overview of the GLS ShipIT action — what it does, what you need to get started, and how it fits into your flows. -icon: IconHome ---- - -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. - ---- - -## What can the GLS Action do? - -- **Create shipments** of various types: standard delivery, shop delivery, returns, exchanges, Saturday delivery, and more -- **Validate shipments** before committing them to the API -- **Cancel shipments** that haven't been picked up yet -- **Retrieve allowed services** for a given origin/destination combination -- **Get end-of-day reports** summarizing all shipments dispatched on a given date -- **Update parcel weight** after a shipment has been created -- **Reprint parcel labels** in PDF, PNG, or ZPL format - ---- - -## Prerequisites - -Before using the GLS Action you will need: - -### Hercules / Aquila - -| Requirement | Description | -|-------------------------|-----------------------------------------------------------------------| -| Running Aquila server | The action connects to Aquila on startup to register its functions | -| `HERCULES_AUTH_TOKEN` | Auth token issued by your Aquila instance | -| `HERCULES_AQUILA_URL` | Host and port of your Aquila server (e.g. `aquila.example.com:50051`) | -| Docker + Docker Compose | Used to run the action as a container | - -### GLS Developer Portal - -| Requirement | How to obtain | -|---------------------------|-------------------------------------------------------------------------------------------| -| `client_id` | Create an application at and find it under **My Apps** | -| `client_secret` | Found alongside the `client_id` in **My Apps** on the GLS developer portal | -| `contact_id` *(optional)* | Issued by GLS support — contact them directly to request it | - -> **Note:** The `contact_id` is required for some shipment operations. -> If you are unsure whether you need it, contact GLS support. - ---- - -## Architecture overview - -```text -Your Flow - │ - ▼ - GLS Action (this action) - │ - ├── Authenticates with GLS via OAuth2 - │ └── GLS Auth API (/oauth2/v2/token) - │ - └── Calls GLS ShipIT API - └── GLS ShipIT API (/shipit-farm/v1/backend/rs/...) -``` - -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. - ---- - -## Data flow - -```text -Flow Input - │ - ▼ -Builder Functions ← createAddress, createConsignee, createShipmentUnit, ... - │ - ▼ -Shipment Functions ← createShopDeliveryShipment, createExchangeShipment, ... - │ - ▼ -GLS ShipIT API - │ - ▼ -GLS_CREATE_PARCELS_RESPONSE ← tracking IDs, barcode data, print data, routing info -``` - ---- - -## Next steps - -- [Quick Start](quick-start.md) — Create your first shipment in a few steps -- [Configuration](configs.md) — Full list of configuration options and how to get credentials -- [Functions](functions.mdx) — All available functions with parameter details -- [Types](types.mdx) — All data types used in the GLS Action -- [Events](events.md) — Events emitted by the GLS Action -- [Common Use Cases](use-cases.md) — Example flows for real-world scenarios -- [Troubleshooting](troubleshooting.md) — FAQ and community support diff --git a/docs/Actions/GLS/quick-start.md b/docs/Actions/GLS/quick-start.md deleted file mode 100644 index 63bd534..0000000 --- a/docs/Actions/GLS/quick-start.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Quick Start -description: Create your first GLS shipment in a few steps. ---- - -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. - ---- - -## Step 1: Install and configure the action - -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): - -| Config | Value | -|-------------------|--------------------------------------------------------------------------------------| -| `client_id` | Your GLS OAuth2 client ID | -| `client_secret` | Your GLS OAuth2 client secret | -| `ship_it_api_url` | GLS ShipIT endpoint (default: `https://api.gls-group.net/shipit-farm/v1/backend/rs`) | -| `auth_url` | GLS auth endpoint (default: `https://api.gls-group.net/oauth2/v2/token`) | - -See [Configuration](configs.md) for the full list of options and how to obtain credentials. - ---- - -## Step 2: Build your flow - -A basic "create a GLS parcel" flow looks like this: - -```text -[createAddress] → GLS_ADDRESS (recipient) -[createAddress] → GLS_ADDRESS (shipper) -[createShipmentUnit] → GLS_SHIPMENT_UNIT -[createPrintingOptions] → GLS_PRINTING_OPTIONS -[createShopDeliveryShipment] → GLS_CREATE_PARCELS_RESPONSE -``` - -### Flow diagram - -```text -START - │ - ├─ createAddress (recipient) - │ Name1: "John Doe" - │ CountryCode: "DE" - │ City: "Munich" - │ Street: "Musterstrasse" - │ ZIPCode: "80331" - │ │ - │ ▼ GLS_ADDRESS (recipient) - │ - ├─ createAddress (shipper) - │ Name1: "My Company GmbH" - │ CountryCode: "DE" - │ City: "Berlin" - │ Street: "Hauptstrasse" - │ ZIPCode: "10115" - │ │ - │ ▼ GLS_ADDRESS (shipper) - │ - ├─ createShipmentUnit - │ weight: 2.5 - │ │ - │ ▼ GLS_SHIPMENT_UNIT - │ - ├─ createPrintingOptions - │ returnLabels: - │ TemplateSet: "NONE" - │ LabelFormat: "PDF" - │ │ - │ ▼ GLS_PRINTING_OPTIONS - │ - └─ createShopDeliveryShipment - parcelShopId: "12345" - shipment: - Product: "PARCEL" - ConsigneeSchema: { AddressSchema: } - ShipperSchema: { AddressSchema: } - ShipmentUnit: [] - printingOptions: - │ - ▼ GLS_CREATE_PARCELS_RESPONSE - { CreatedShipment: { TrackID, PrintData, ... } } -``` - ---- - -## Step 3: Use the response - -The `GLS_CREATE_PARCELS_RESPONSE` contains everything you need: - -```json -{ - "CreatedShipment": { - "ShipmentReference": ["REF-001"], - "ParcelData": [ - { - "TrackID": "12345678", - "ParcelNumber": "00123456789", - "Barcodes": { - "Primary2D": "...", - "Secondary2D": "...", - "Primary1D": "..." - }, - "RoutingInfo": { - "Tour": "MUC-01", - "FinalLocationCode": "MUC", - "HubLocation": "MUC-HUB" - } - } - ], - "PrintData": [ - { - "Data": "", - "LabelFormat": "PDF" - } - ] - } -} -``` - -- **`TrackID`** — Use this to track the parcel or cancel the shipment later -- **`PrintData[].Data`** — Base64-encoded shipping label, decode and print it -- **`RoutingInfo`** — Routing information assigned by GLS - ---- - -## Common next steps - -- [Validate before creating](functions.mdx#validateShipment) — Call `validateShipment` first to catch errors before committing -- [Cancel a shipment](functions.mdx#cancelShipment) — Use `cancelShipment` with the `TrackID` if something changes -- [Reprint a label](functions.mdx#reprintParcel) — Use `reprintParcel` if a label is lost or damaged -- [Common Use Cases](use-cases.md) — End-to-end examples for real-world scenarios diff --git a/docs/Actions/GLS/troubleshooting.md b/docs/Actions/GLS/troubleshooting.md deleted file mode 100644 index 0aa13b1..0000000 --- a/docs/Actions/GLS/troubleshooting.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: Troubleshooting -description: Frequently asked questions, troubleshooting tips, and community resources for the GLS Action. ---- - -## FAQ - -### General - -#### What is the GLS Action? - -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. - -#### What GLS services does this action support? - -The action supports all major GLS shipment types and services, including: - -- Standard parcel delivery -- Shop delivery and shop returns -- Exchange shipments -- Delivery at work -- Deposit delivery -- Identity-verified delivery (Ident / IdentPIN) -- Flex delivery, signature, guaranteed 24h -- Tyre service, addressee-only delivery -- Saturday and next-working-day delivery (EXPRESS only) - -See [Functions](functions.mdx) for the complete list. - -#### Do I need a paid GLS account? - -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`. - -#### What is the `contact_id` and do I need it? - -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. - -#### Can I test the action without a real GLS account? - -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. - -### Installation & configuration - -#### The action starts but immediately disconnects. What's wrong? - -Check the following: - -1. `HERCULES_AUTH_TOKEN` — is it valid and not expired? -2. `HERCULES_AQUILA_URL` — is the Aquila server reachable from the Docker container? -3. Docker logs: `docker compose logs -f` — look for specific error messages - -### Authentication & API errors - -#### I get an `INVALID_PRODUCT` error when creating a Saturday delivery shipment - -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. - -#### I get `ERROR_CREATING_GLS_SHIPMENT` — how do I find out what went wrong? - -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). - -#### Can I cancel a shipment after it has been picked up by GLS? - -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. - -### Labels & printing - -#### What label formats are supported? - -The action supports: `PDF`, `ZEBRA`, `INTERMEC`, `DATAMAX`, `TOSHIBA`, `PNG`. For reprint, additionally `PNG_200`. - -Choose the format that matches your label printer. - -#### The label data returned is base64-encoded. How do I print it? - -Decode `CreatedShipment.PrintData[0].Data` from base64, then: - -- **PDF:** Save as a `.pdf` file and send to a PDF-capable printer -- **ZPL (ZEBRA):** Send the raw ZPL string directly to a Zebra label printer -- **PNG:** Save as a `.png` file and print as an image - -#### Can I reprint a label after the parcel has been dispatched? - -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`. - -## Common error codes - -| Error Code | Cause | Resolution | -|-------------------------------|------------------------------------------------------------------|---------------------------------------------| -| `ERROR_CREATING_GLS_SHIPMENT` | API returned an error during shipment creation or management | Check `validateShipment` output for details | -| `INVALID_PRODUCT` | Used `"PARCEL"` product with a service that requires `"EXPRESS"` | Set `Product: "EXPRESS"` in the shipment | - -## Still stuck? - -If you cannot resolve your issue with the FAQ above: - -1. **Check the action logs:** `docker compose logs -f` in the action directory -2. **Check the GLS API status:** Visit the [GLS Developer Portal](https://dev-portal.gls-group.net) for service announcements -3. **Open an issue** on GitHub (see below) - -## GitHub - -The source code for the GLS Action and all other Centaurus actions is available on GitHub: - -🔗 **** - -Use the GitHub repository to: - -- **Report bugs:** Open an [issue](https://github.com/code0-tech/centaurus/issues) -- **Request features:** Open a [discussion](https://github.com/code0-tech/centaurus/discussions) or issue with the `enhancement` label -- **Ask questions:** Use [GitHub Discussions](https://github.com/code0-tech/centaurus/discussions) - -## Contributing - -Contributions to Centaurus are welcome! Here is how to get started: - -### 1. Fork and clone - -```bash -git clone https://github.com//centaurus.git -cd centaurus -npm install -``` - -### 2. Create a new action (optional) - -Use the scaffolding script to create a new action: - -```bash -npm run create-action -- my-new-action -``` - -This creates a new directory at `actions/my-new-action/` with the standard structure. - -### 3. Make your changes - -- Follow the existing code style (TypeScript, Zod for validation, Hercules SDK patterns) -- Add tests for your changes in `src/index.test.ts` -- Run the test suite: `npm run test` -- Run the linter: `npm run lint` - -### 4. Submit a pull request - -Open a pull request against the `main` branch of [code0-tech/centaurus](https://github.com/code0-tech/centaurus). Include: - -- A clear description of what you changed and why -- Test results showing your changes pass - -### Development commands - -| Command | Description | -|-----------------------------------|-------------------------| -| `npm run build` | Build all actions | -| `npm run test` | Run the test suite | -| `npm run test:watch` | Run tests in watch mode | -| `npm run lint` | Run ESLint | -| `npm run create-action -- ` | Scaffold a new action | diff --git a/docs/Actions/GLS/types.mdx b/docs/Actions/GLS/types.mdx deleted file mode 100644 index bb20007..0000000 --- a/docs/Actions/GLS/types.mdx +++ /dev/null @@ -1,1681 +0,0 @@ ---- -title: Datatypes -description: All data types registered by the GLS Action. ---- - -import {TypeTable} from "fumadocs-ui/components/type-table"; - -## GLS Action Types - -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. - ---- - -## GLS_VALIDATE_SHIPMENT_REQUEST_DATA - -No documentation provided for this type. - - - -## GLS_VALIDATE_SHIPMENT_RESPONSE_DATA - -No documentation provided for this type. - - - -## GLS_VALIDATE_SHIPMENT_RESPONSE_DATA$validationResult - -No documentation provided for this type. - - - -## GLS_VALIDATE_SHIPMENT_RESPONSE_DATA$validationResult$Issues - -No documentation provided for this type. - - - -## GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA - -No documentation provided for this type. - - - -## GLS_UPDATE_PARCEL_WEIGHT_RESPONSE_DATA - -No documentation provided for this type. - - - -## GLS_UNIT_SERVICE - -No documentation provided for this type. - - - -## GLS_UNIT_SERVICE$LimitedQuantities - -No documentation provided for this type. - - - -## GLS_UNIT_SERVICE$ExWorks - -No documentation provided for this type. - - - -## GLS_UNIT_SERVICE$HazardousGoods - -No documentation provided for this type. - - - -## GLS_UNIT_SERVICE$HazardousGoods$HarzardousGood - -No documentation provided for this type. - - - -## GLS_UNIT_SERVICE$AddonLiability - -No documentation provided for this type. - - - -## GLS_UNIT_SERVICE$Cash - -No documentation provided for this type. - - - -## GLS_SHIPPER - -No documentation provided for this type. - - - -## GLS_SHIPMENT_UNIT - -No documentation provided for this type. - - - -## GLS_SHIPMENT_UNIT$Service - -No documentation provided for this type. - - - -## GLS_SHIPMENT_UNIT$Service$LimitedQuantities - -No documentation provided for this type. - - - -## GLS_SHIPMENT_UNIT$Service$ExWorks - -No documentation provided for this type. - - - -## GLS_SHIPMENT_UNIT$Service$HazardousGoods - -No documentation provided for this type. - - - -## GLS_SHIPMENT_UNIT$Service$HazardousGoods$HarzardousGood - -No documentation provided for this type. - - - -## GLS_SHIPMENT_UNIT$Service$AddonLiability - -No documentation provided for this type. - - - -## GLS_SHIPMENT_UNIT$Service$Cash - -No documentation provided for this type. - - - -## GLS_SHIPMENT - -No documentation provided for this type. - - - -## GLS_SHIPMENT$Return - -No documentation provided for this type. - - - -## GLS_SHIPMENT_WITHOUT_SERVICES - -No documentation provided for this type. - - - -## GLS_SHIPMENT_WITHOUT_SERVICES$Return - -No documentation provided for this type. - - - -## GLS_RETURN_OPTIONS - -No documentation provided for this type. - - - -## GLS_REPRINT_PARCEL_REQUEST_DATA - -No documentation provided for this type. - - - -## GLS_REPRINT_PARCEL_REQUEST_DATA$PrintingOptions - -No documentation provided for this type. - - - -## GLS_REPRINT_PARCEL_REQUEST_DATA$PrintingOptions$ReturnLabels - -No documentation provided for this type. - - - -## GLS_REPRINT_PARCEL_RESPONSE_DATA - -No documentation provided for this type. - - - -## GLS_REPRINT_PARCEL_RESPONSE_DATA$CreatedShipment - -No documentation provided for this type. - - - -## GLS_REPRINT_PARCEL_RESPONSE_DATA$CreatedShipment$PrintData - -No documentation provided for this type. - - - -## GLS_REPRINT_PARCEL_RESPONSE_DATA$CreatedShipment$ParcelData - -No documentation provided for this type. - - - -## GLS_REPRINT_PARCEL_RESPONSE_DATA$CreatedShipment$ParcelData$RoutingInfo - -No documentation provided for this type. - - - -## GLS_REPRINT_PARCEL_RESPONSE_DATA$CreatedShipment$ParcelData$Barcodes - -No documentation provided for this type. - - - -## RETURN_LABELS - -No documentation provided for this type. - - - -## GLS_PRINTING_OPTIONS - -No documentation provided for this type. - - - -## GLS_PRINTING_OPTIONS$DefinePrinter - -No documentation provided for this type. - - - -## GLS_END_OF_DAY_REQUEST_DATA - -No documentation provided for this type. - - - -## GLS_END_OF_DAY_RESPONSE_DATA - -No documentation provided for this type. - - - -## GLS_END_OF_DAY_RESPONSE_DATA$Shipments - -No documentation provided for this type. - - - -## GLS_END_OF_DAY_RESPONSE_DATA$Shipments$ShipmentUnit - -No documentation provided for this type. - - - -## GLS_END_OF_DAY_RESPONSE_DATA$Shipments$Shipper - -No documentation provided for this type. - - - -## GLS_END_OF_DAY_RESPONSE_DATA$Shipments$Consignee - -No documentation provided for this type. - - - -## GLS_CUSTOM_CONTENT - -No documentation provided for this type. - - - -## GLS_CREATE_PARCELS_RESPONSE - -No documentation provided for this type. - - - -## GLS_CREATE_PARCELS_RESPONSE$CreatedShipment - -No documentation provided for this type. - - - -## GLS_CREATE_PARCELS_RESPONSE$CreatedShipment$PrintData - -No documentation provided for this type. - - - -## GLS_CREATE_PARCELS_RESPONSE$CreatedShipment$ParcelData - -No documentation provided for this type. - - - -## GLS_CREATE_PARCELS_RESPONSE$CreatedShipment$ParcelData$RoutingInfo - -No documentation provided for this type. - - - -## GLS_CREATE_PARCELS_RESPONSE$CreatedShipment$ParcelData$Barcodes - -No documentation provided for this type. - - - -## GLS_CONSIGNEE - -No documentation provided for this type. - - - -## GLS_CANCEL_SHIPMENT_REQUEST_DATA - -No documentation provided for this type. - - - -## GLS_CANCEL_SHIPMENT_RESPONSE_DATA - -No documentation provided for this type. - - - -## GLS_ALLOWED_SERVICES_REQUEST_DATA - -No documentation provided for this type. - - - -## GLS_ALLOWED_SERVICES_REQUEST_DATA$Destination - -No documentation provided for this type. - - - -## GLS_ALLOWED_SERVICES_REQUEST_DATA$Source - -No documentation provided for this type. - - - -## GLS_ALLOWED_SERVICES_RESPONSE_DATA - -No documentation provided for this type. - - - -## GLS_ALLOWED_SERVICES_RESPONSE_DATA$AllowedServices - -No documentation provided for this type. - - - -## GLS_ADDRESS - -No documentation provided for this type. - - diff --git a/docs/Actions/GLS/use-cases.md b/docs/Actions/GLS/use-cases.md deleted file mode 100644 index 50a4b37..0000000 --- a/docs/Actions/GLS/use-cases.md +++ /dev/null @@ -1,443 +0,0 @@ ---- -title: Common Use Cases -description: End-to-end example flows using the GLS Action for real-world shipping scenarios. ---- - -This page shows complete, real-world examples of flows built with the GLS Action. -Each example includes a step-by-step breakdown and the data passed between functions. - ---- - -## Use Case 1: Standard parcel delivery - -**Scenario:** A customer places an order. You want to create a shipping label and send it to your label printer. - -### Flow - -```text -[createAddress] (recipient) - │ GLS_ADDRESS -[createAddress] (shipper) - │ GLS_ADDRESS -[createShipmentUnit] - │ GLS_SHIPMENT_UNIT -[createPrintingOptions] - │ GLS_PRINTING_OPTIONS -[createShopDeliveryShipment] - │ GLS_CREATE_PARCELS_RESPONSE -[send to printer / store TrackID] -``` - -### Step-by-step - -#### 1. Create recipient address - -```text -createAddress( - Name1: "Jane Smith", - CountryCode: "DE", - City: "Hamburg", - Street: "Reeperbahn", - ZIPCode: "20359", - StreetNumber: "1", - eMail: "jane@example.com" -) -→ GLS_ADDRESS (recipient) -``` - -#### 2. Create parcel unit - -```text -createShipmentUnit( - weight: 1.2, - shipmentUnitReference: "ORDER-12345", - note1: "Handle with care" -) -→ GLS_SHIPMENT_UNIT -``` - -#### 3. Set printing options - -```text -createPrintingOptions( - returnLabels: { - TemplateSet: "NONE", - LabelFormat: "PDF" - } -) -→ GLS_PRINTING_OPTIONS -``` - -#### 4. Create the shipment (using default shipper from config) - -```text -createShopDeliveryShipment( - parcelShopId: "PSH-HH-001", - shipment: { - Product: "PARCEL", - ConsigneeSchema: { - ConsigneeID: "CUST-5678", - Category: "PRIVATE", - AddressSchema: - }, - ShipperSchema: {}, ← uses default shipper from action config - ShipmentUnit: [] - }, - printingOptions: -) -→ GLS_CREATE_PARCELS_RESPONSE -``` - -#### 5. Use the response - -- Store `CreatedShipment.ParcelData[0].TrackID` in your order database -- Decode `CreatedShipment.PrintData[0].Data` (base64 PDF) and send to printer - ---- - -## Use Case 2: Validate before creating - -**Scenario:** You want to check a shipment for errors before submitting it, to avoid unnecessary API charges or failed deliveries. - -### Flow - -```text -[Build shipment data] → GLS_SHIPMENT - │ -[validateShipment] - │ GLS_VALIDATE_SHIPMENT_RESPONSE_DATA - │ - success? ──Yes──→ [createShopDeliveryShipment] - │ - No - │ - [log errors / notify user] -``` - -### Example - -#### 1. Validate the shipment - -```text -validateShipment({ - Shipment: { - Product: "PARCEL", - ConsigneeSchema: { - AddressSchema: { - Name1: "Test Recipient", - CountryCode: "DE", - City: "Berlin", - Street: "Hauptstrasse", - ZIPCode: "10115" - } - }, - ShipperSchema: {}, - ShipmentUnit: [{ Weight: 0.5 }] - } -}) -→ GLS_VALIDATE_SHIPMENT_RESPONSE_DATA -``` - -#### 2. Check the result - -```json -{ - "success": true, - "validationResult": { "Issues": [] } -} -``` - -If `success` is `false`, inspect `validationResult.Issues` for details: - -```json -{ - "success": false, - "validationResult": { - "Issues": [ - { - "Rule": "MIN_LENGTH", - "Location": "Shipment.ConsigneeSchema.AddressSchema.Street", - "Parameters": ["4"] - } - ] - } -} -``` - ---- - -## Use Case 3: Return shipment - -**Scenario:** A customer wants to return an item. You generate a return label they can drop off at any GLS Parcel Shop. - -### Flow - -```text -[createAddress] (your warehouse as consignee for return) - │ -[createShipmentUnit] - │ -[createPrintingOptions] - │ -[createShopReturnShipment] - │ GLS_CREATE_PARCELS_RESPONSE - │ -[email PrintData to customer as PDF] -``` - -### Example - -```text -createShopReturnShipment( - numberOfLabels: 1, - shipment: { - Product: "PARCEL", - ConsigneeSchema: { - AddressSchema: { - Name1: "My Warehouse GmbH", - CountryCode: "DE", - City: "Frankfurt", - Street: "Lagerstrasse", - ZIPCode: "60327" - } - }, - ShipperSchema: {}, - ShipmentUnit: [{ Weight: 2.0 }] - }, - printingOptions: { - ReturnLabels: { - TemplateSet: "NONE", - LabelFormat: "PDF" - } - }, - returnQR: "PDF" -) -→ GLS_CREATE_PARCELS_RESPONSE -``` - -**Customer flow:** - -1. Receive the PDF label by email -2. Print it (or show QR code on phone) -3. Drop off at any GLS Parcel Shop - ---- - -## Use Case 4: Identity-verified delivery (age-restricted goods) - -**Scenario:** You are shipping age-restricted goods (e.g. alcohol, medication) and need -to verify the recipient's identity on delivery. - -### Flow - -```text -[createShipmentUnit] - │ -[createPrintingOptions] - │ -[createIdentShipment] - │ GLS_CREATE_PARCELS_RESPONSE -``` - -### Example - -```text -createIdentShipment( - birthDate: "1990-05-15", - firstName: "Hans", - lastName: "Mueller", - nationality: "DE", - shipment: { - Product: "PARCEL", - ConsigneeSchema: { - AddressSchema: { - Name1: "Hans Mueller", - CountryCode: "DE", - City: "Munich", - Street: "Maximilianstrasse", - ZIPCode: "80333" - } - }, - ShipperSchema: {}, - ShipmentUnit: [{ Weight: 1.8 }] - }, - printingOptions: { - ReturnLabels: { - TemplateSet: "NONE", - LabelFormat: "PDF" - } - } -) -``` - -The GLS driver will verify the recipient's ID against the provided name, birthdate, -and nationality before handing over the parcel. - ---- - -## Use Case 5: End-of-day reconciliation - -**Scenario:** At the end of each business day, you want to fetch all shipments dispatched that day and -reconcile them with your order management system. - -### Flow - -```text -[getEndOfDayReport({ date: "2025-01-15" })] - │ GLS_END_OF_DAY_RESPONSE_DATA - │ -[for each Shipment in response] - │ -[match TrackID to order / update status] -``` - -### Example - -```text -getEndOfDayReport({ - date: "2025-01-15" -}) -→ GLS_END_OF_DAY_RESPONSE_DATA -``` - -Response: - -```json -{ - "Shipments": [ - { - "ShippingDate": "2025-01-15", - "Product": "PARCEL", - "ConsigneeSchema": { - "AddressSchema": { "Name1": "Jane Smith", "City": "Hamburg" } // ... and other parameters - }, - "ShipmentUnit": [ - { "TrackID": "12345678", "Weight": "1.2", "ParcelNumber": "00123456789" } - ] - } - ] -} -``` - ---- - -## Use Case 6: Reprint a lost label - -**Scenario:** A shipping label was damaged in your warehouse. You need to reprint it before the parcel is picked up. - -### Flow - -```text -[reprintParcel({ TrackID, CreationDate, PrintingOptions })] - │ GLS_REPRINT_PARCEL_RESPONSE_DATA - │ -[decode PrintData and send to printer] -``` - -### Example - -```text -reprintParcel({ - TrackID: "12345678", - CreationDate: "2025-01-15", - PrintingOptions: { - ReturnLabels: { - TemplateSet: "NONE", - LabelFormat: "PDF" - } - } -}) -→ GLS_REPRINT_PARCEL_RESPONSE_DATA -``` - ---- - -## Use Case 7: Check available services for a route - -**Scenario:** Before creating a shipment, you want to check which GLS services are available between your depot -(Berlin, DE) and a customer in France (Paris, 75001). - -### Flow - -```text -[getAllowedServices({ Source, Destination })] - │ GLS_ALLOWED_SERVICES_RESPONSE_DATA - │ -[filter AllowedServices list / present to user or use in logic] -``` - -### Example - -```text -getAllowedServices({ - Source: { - CountryCode: "DE", - ZIPCode: "10115" - }, - Destination: { - CountryCode: "FR", - ZIPCode: "75001" - } -}) -→ GLS_ALLOWED_SERVICES_RESPONSE_DATA -``` - -Response: - -```json -{ - "AllowedServices": [ - { "ProductName": "PARCEL" }, - { "ServiceName": "FlexDeliveryService" }, - { "ServiceName": "SignatureService" } - ] -} -``` - -Use this to dynamically enable/disable delivery options in your checkout flow. - ---- - -## Use Case 8: Saturday express delivery - -**Scenario:** A customer orders on Friday and wants to receive their parcel on Saturday. - -> **Important:** Saturday delivery requires `Product: "EXPRESS"`. Using `"PARCEL"` will throw an error. - -### Flow - -```text -[createShipmentUnit] - │ -[createPrintingOptions] - │ -[createDeliverySaturdayShipment] - │ GLS_CREATE_PARCELS_RESPONSE -``` - -### Example - -```text -createDeliverySaturdayShipment( - shipment: { - Product: "EXPRESS", ← required! - ConsigneeSchema: { - AddressSchema: { - Name1: "Weekend Shopper", - CountryCode: "DE", - City: "Cologne", - Street: "Schildergasse", - ZIPCode: "50667" - } - }, - ShipperSchema: {}, - ShipmentUnit: [{ Weight: 0.8 }] - }, - printingOptions: { - ReturnLabels: { - TemplateSet: "NONE", - LabelFormat: "PDF" - } - } -) -``` diff --git a/docs/index.mdx b/docs/index.mdx deleted file mode 100644 index f961b23..0000000 --- a/docs/index.mdx +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Action SDK -description: Find out how Centaurus works -template: splash ---- - -## What is Centaurus? - -Centaurus is a monorepo containing a collection of **actions** provided by [code0](https://github.com/code0-tech). -Actions are integrations that connect external services to the **Hercules** automation platform, allowing you to build -powerful workflows without writing boilerplate code. - -Each action exposes **functions**, **data types**, and **configuration** that can be composed inside flows to automate -real-world tasks such as shipping logistics, notifications, payments, and more. - ---- - -## Prerequisites - -Before using any action from Centaurus, make sure you have: - -- **Docker** and **Docker Compose** installed (for self-hosted deployment) -- A running instance of the **Aquila** server (part of the Hercules platform) -- An **auth token** (`HERCULES_AUTH_TOKEN`) for connecting your action to Aquila -- Credentials specific to the external service the action integrates with (e.g. GLS API keys) - ---- - -## Available Actions - -| Action | Description | Status | -|--------|-------------|--------| -| [GLS](Actions/GLS/overview.md) | GLS ShipIT integration for creating and managing shipments | ✅ Available | - ---- - -## Quick Links - -- [Installation Guide](installation.md) — How to deploy an action on your self-hosted instance -- [GLS Action Overview](Actions/GLS/overview.md) — Get started with the GLS shipping integration -- [GLS Configuration](Actions/GLS/configs.md) — API keys and configuration options -- [GLS Functions](Actions/GLS/functions.mdx) — All available functions and their parameters -- [GLS Types](Actions/GLS/types.mdx) — Data types used across the GLS action -- [GLS Events](Actions/GLS/events.md) — Events emitted by the GLS action -- [Common Use Cases](Actions/GLS/use-cases.md) — Example workflows using the GLS action -- [Troubleshooting](Actions/GLS/troubleshooting.md) — FAQ and community support diff --git a/docs/installation.md b/docs/installation.md deleted file mode 100644 index cb97105..0000000 --- a/docs/installation.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: Installation guide for actions ---- - -## Cloud edition - -The cloud edition is managed by code0 and requires no installation. Contact the code0 team for access. - ---- - -## Self-hosted - -To install an action on your self-hosted instance, follow these steps: - -### Prerequisites - -Before you begin, make sure you have the following: - -- **Git** installed on your machine -- **Docker** and **Docker Compose** installed -- A running **Aquila** server (part of the Hercules platform) -- Your `HERCULES_AUTH_TOKEN` from the Aquila admin panel -- Service-specific credentials (e.g. GLS API keys — see [GLS Configuration](Actions/GLS/configs.md)) - ---- - -## 1. Clone the repository - -```bash -git clone https://github.com/code0-tech/centaurus.git -cd centaurus -``` - ---- - -## 2. Navigate to the action directory - -Replace `` with the name of the action you want to deploy (e.g. `gls-action`): - -```bash -cd actions/ -``` - ---- - -## 3. Create the `.env` file - -Copy the example environment file and fill in your values: - -```bash -cp .example.env .env -``` - -Then open `.env` in your editor and set the required variables: - -### Common ENV variables (all actions) - -| ENV Variable | Description | Default Value | Required | -|------------------------|-----------------------------------------------------|---------------------|----------| -| `HERCULES_AUTH_TOKEN` | Authentication token for connecting to Aquila. | `""` (empty string) | Yes | -| `HERCULES_AQUILA_URL` | URL of the Aquila server to connect to. | `"localhost:50051"` | Yes | -| `HERCULES_ACTION_ID` | Unique identifier for this action in Hercules. | `""` | Yes | -| `HERCULES_SDK_VERSION` | Version of the Hercules SDK being used. | `"0.0.0"` | No | - -Example `.env` for the GLS action: - -```text -HERCULES_AUTH_TOKEN=your_hercules_auth_token -HERCULES_AQUILA_URL=your-aquila-host:50051 -HERCULES_ACTION_ID=gls-action -HERCULES_SDK_VERSION=1.0.0 -``` - -For action-specific variables (e.g. GLS API credentials), see the [GLS Configuration](Actions/GLS/configs.md) page. - ---- - -## 4. Start with Docker Compose - -```bash -docker compose up -d -``` - -The action will start, connect to your Aquila server, and register its functions and types. You can check the logs with: - -```bash -docker compose logs -f -``` - -A successful startup will show: - -```text -SDK connected successfully -``` - ---- - -## 5. Verify the action is registered - -Open your Hercules/Aquila admin panel and navigate to the **Actions** section. -The action should appear in the list with its registered functions and types. - ---- - -## Updating the action - -To update to a newer version: - -```bash -git pull -docker compose up -d --build -``` - ---- - -## Troubleshooting - -If the action fails to start or connect, check: - -- That `HERCULES_AUTH_TOKEN` is valid and not expired -- That `HERCULES_AQUILA_URL` points to the correct host and port -- That Docker has access to the internet (for pulling the base image) -- The service-specific credentials are correct (see [Troubleshooting](Actions/GLS/troubleshooting.md)) diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 76e5ba6..0000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,30 +0,0 @@ -import { defineConfig, globalIgnores } from "eslint/config"; -import js from "@eslint/js"; -import tseslint from "typescript-eslint"; -import globals from "globals"; - -export default defineConfig([ - js.configs.recommended, - ...tseslint.configs.recommended, - globalIgnores(["**/dist/**", "**/node_modules/**"]), - - { - rules: { - "@typescript-eslint/no-explicit-any": "off", - }, - }, - - { - files: ["scripts/**/*.mjs"], - languageOptions: { - globals: globals.node, - }, - }, - { - "rules": { - "@typescript-eslint/no-unused-vars": [ - "error" - ] - } - } -]); diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 273360b..0000000 --- a/package-lock.json +++ /dev/null @@ -1,3440 +0,0 @@ -{ - "name": "centaurus", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "centaurus", - "version": "0.0.0", - "workspaces": [ - "actions/*" - ], - "dependencies": { - "@code0-tech/hercules": "^0.0.2", - "axios": "^1.13.6", - "vite": "^7.3.1", - "zod": "^4.3.6", - "zod-to-ts": "^2.0.0" - }, - "devDependencies": { - "@eslint/js": "^10.0.0", - "eslint": "^10.0.0", - "globals": "^17.4.0", - "turbo": "^2.8.21", - "typescript": "^5", - "typescript-eslint": "^8.0.0", - "vitest": "^4.0.0" - } - }, - "actions/gls-action": { - "name": "@code0-tech/gls-action", - "version": "0.0.0", - "dependencies": { - "ts-morph": "^27.0.2" - } - }, - "actions/notion-action": { - "name": "@code0-tech/notion-action", - "version": "0.0.0", - "extraneous": true - }, - "node_modules/@code0-tech/gls-action": { - "resolved": "actions/gls-action", - "link": true - }, - "node_modules/@code0-tech/hercules": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@code0-tech/hercules/-/hercules-0.0.2.tgz", - "integrity": "sha512-oG0N8zRNX8WJmYORhbNnAj75HXi6pzL+xclO3vOxHQiOBjb4hjqnRYIBtCTuR9xAJSXeOEqPu5rgK2hHKTsdzA==", - "license": "ISC", - "dependencies": { - "@code0-tech/tucana": "^0.0.65", - "@grpc/grpc-js": "^1.14.3", - "@protobuf-ts/grpc-backend": "^2.11.1", - "@protobuf-ts/grpc-transport": "^2.11.1", - "@protobuf-ts/runtime": "^2.11.1", - "@protobuf-ts/runtime-rpc": "^2.11.1" - } - }, - "node_modules/@code0-tech/tucana": { - "version": "0.0.65", - "resolved": "https://registry.npmjs.org/@code0-tech/tucana/-/tucana-0.0.65.tgz", - "integrity": "sha512-XTNAZ+iqTEf1yLU0uqNc2+ICg6tRF0w41C6da9DePoV4qDa2aRmZwA4jJyr/1i+hohZVKRrhkY7Qaf/blsyx0g==", - "license": "Apache-2.0" - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", - "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz", - "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz", - "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz", - "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", - "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz", - "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz", - "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz", - "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz", - "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz", - "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz", - "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz", - "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz", - "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==", - "cpu": [ - "mips64el" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz", - "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz", - "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz", - "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz", - "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz", - "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz", - "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz", - "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz", - "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz", - "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz", - "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz", - "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz", - "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz", - "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", - "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.23.3", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.3.tgz", - "integrity": "sha512-j+eEWmB6YYLwcNOdlwQ6L2OsptI/LO6lNBuLIqe5R7RetD658HLoF+Mn7LzYmAWWNNzdC6cqP+L6r8ujeYXWLw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^3.0.3", - "debug": "^4.3.1", - "minimatch": "^10.2.4" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.3.tgz", - "integrity": "sha512-lzGN0onllOZCGroKJmRwY6QcEHxbjBw1gwB8SgRSqK8YbbtEXMvKynsXc3553ckIEBxsbMBU7oOZXKIPGZNeZw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.1.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/core": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.1.tgz", - "integrity": "sha512-QUPblTtE51/7/Zhfv8BDwO0qkkzQL7P/aWWbqcf4xWLEYn1oKjdO0gglQBB4GAsu7u6wjijbCmzsUTy6mnk6oQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/js": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", - "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "eslint": "^10.0.0" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/@eslint/object-schema": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.3.tgz", - "integrity": "sha512-iM869Pugn9Nsxbh/YHRqYiqd23AmIbxJOcpUMOuWCVNdoQJ5ZtwL6h3t0bcZzJUlC3Dq9jCFCESBZnX0GTv7iQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.6.1.tgz", - "integrity": "sha512-iH1B076HoAshH1mLpHMgwdGeTs0CYwL0SPMkGuSebZrwBp16v415e9NZXg2jtrqPVQjf6IANe2Vtlr5KswtcZQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^1.1.1", - "levn": "^0.4.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@grpc/grpc-js": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.3.tgz", - "integrity": "sha512-Iq8QQQ/7X3Sac15oB6p0FmUg/klxQvXLeileoqrTRGJYLV+/9tubbr9ipz0GKHjmXVsgFPo/+W+2cA8eNcR+XA==", - "license": "Apache-2.0", - "dependencies": { - "@grpc/proto-loader": "^0.8.0", - "@js-sdsl/ordered-map": "^4.4.2" - }, - "engines": { - "node": ">=12.10.0" - } - }, - "node_modules/@grpc/proto-loader": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz", - "integrity": "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ==", - "license": "Apache-2.0", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.5.3", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@js-sdsl/ordered-map": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", - "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/@protobuf-ts/grpc-backend": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/@protobuf-ts/grpc-backend/-/grpc-backend-2.11.1.tgz", - "integrity": "sha512-llAkJ03SlR/+p70YBTMOAQqdkXWghsTWwlPuGXC+Hj99hDQq6fa2CoVePPqbcn7A7/aLBcPG/9Ag3yqlltldxw==", - "license": "Apache-2.0", - "dependencies": { - "@protobuf-ts/runtime": "^2.11.1", - "@protobuf-ts/runtime-rpc": "^2.11.1" - }, - "peerDependencies": { - "@grpc/grpc-js": "^1.8.22" - } - }, - "node_modules/@protobuf-ts/grpc-transport": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/@protobuf-ts/grpc-transport/-/grpc-transport-2.11.1.tgz", - "integrity": "sha512-l6wrcFffY+tuNnuyrNCkRM8hDIsAZVLA8Mn7PKdVyYxITosYh60qW663p9kL6TWXYuDCL3oxH8ih3vLKTDyhtg==", - "license": "Apache-2.0", - "dependencies": { - "@protobuf-ts/runtime": "^2.11.1", - "@protobuf-ts/runtime-rpc": "^2.11.1" - }, - "peerDependencies": { - "@grpc/grpc-js": "^1.6.0" - } - }, - "node_modules/@protobuf-ts/runtime": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.11.1.tgz", - "integrity": "sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ==", - "license": "(Apache-2.0 AND BSD-3-Clause)" - }, - "node_modules/@protobuf-ts/runtime-rpc": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.11.1.tgz", - "integrity": "sha512-4CqqUmNA+/uMz00+d3CYKgElXO9VrEbucjnBFEjqI4GuDrEQ32MaI3q+9qPBvIGOlL4PmHXrzM32vBPWRhQKWQ==", - "license": "Apache-2.0", - "dependencies": { - "@protobuf-ts/runtime": "^2.11.1" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", - "license": "BSD-3-Clause" - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.0.tgz", - "integrity": "sha512-WOhNW9K8bR3kf4zLxbfg6Pxu2ybOUbB2AjMDHSQx86LIF4rH4Ft7vmMwNt0loO0eonglSNy4cpD3MKXXKQu0/A==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.0.tgz", - "integrity": "sha512-u6JHLll5QKRvjciE78bQXDmqRqNs5M/3GVqZeMwvmjaNODJih/WIrJlFVEihvV0MiYFmd+ZyPr9wxOVbPAG2Iw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.0.tgz", - "integrity": "sha512-qEF7CsKKzSRc20Ciu2Zw1wRrBz4g56F7r/vRwY430UPp/nt1x21Q/fpJ9N5l47WWvJlkNCPJz3QRVw008fi7yA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.0.tgz", - "integrity": "sha512-WADYozJ4QCnXCH4wPB+3FuGmDPoFseVCUrANmA5LWwGmC6FL14BWC7pcq+FstOZv3baGX65tZ378uT6WG8ynTw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.0.tgz", - "integrity": "sha512-6b8wGHJlDrGeSE3aH5mGNHBjA0TTkxdoNHik5EkvPHCt351XnigA4pS7Wsj/Eo9Y8RBU6f35cjN9SYmCFBtzxw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.0.tgz", - "integrity": "sha512-h25Ga0t4jaylMB8M/JKAyrvvfxGRjnPQIR8lnCayyzEjEOx2EJIlIiMbhpWxDRKGKF8jbNH01NnN663dH638mA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.0.tgz", - "integrity": "sha512-RzeBwv0B3qtVBWtcuABtSuCzToo2IEAIQrcyB/b2zMvBWVbjo8bZDjACUpnaafaxhTw2W+imQbP2BD1usasK4g==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.0.tgz", - "integrity": "sha512-Sf7zusNI2CIU1HLzuu9Tc5YGAHEZs5Lu7N1ssJG4Tkw6e0MEsN7NdjUDDfGNHy2IU+ENyWT+L2obgWiguWibWQ==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.0.tgz", - "integrity": "sha512-DX2x7CMcrJzsE91q7/O02IJQ5/aLkVtYFryqCjduJhUfGKG6yJV8hxaw8pZa93lLEpPTP/ohdN4wFz7yp/ry9A==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.0.tgz", - "integrity": "sha512-09EL+yFVbJZlhcQfShpswwRZ0Rg+z/CsSELFCnPt3iK+iqwGsI4zht3secj5vLEs957QvFFXnzAT0FFPIxSrkQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.0.tgz", - "integrity": "sha512-i9IcCMPr3EXm8EQg5jnja0Zyc1iFxJjZWlb4wr7U2Wx/GrddOuEafxRdMPRYVaXjgbhvqalp6np07hN1w9kAKw==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.0.tgz", - "integrity": "sha512-DGzdJK9kyJ+B78MCkWeGnpXJ91tK/iKA6HwHxF4TAlPIY7GXEvMe8hBFRgdrR9Ly4qebR/7gfUs9y2IoaVEyog==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.0.tgz", - "integrity": "sha512-RwpnLsqC8qbS8z1H1AxBA1H6qknR4YpPR9w2XX0vo2Sz10miu57PkNcnHVaZkbqyw/kUWfKMI73jhmfi9BRMUQ==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.0.tgz", - "integrity": "sha512-Z8pPf54Ly3aqtdWC3G4rFigZgNvd+qJlOE52fmko3KST9SoGfAdSRCwyoyG05q1HrrAblLbk1/PSIV+80/pxLg==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.0.tgz", - "integrity": "sha512-3a3qQustp3COCGvnP4SvrMHnPQ9d1vzCakQVRTliaz8cIp/wULGjiGpbcqrkv0WrHTEp8bQD/B3HBjzujVWLOA==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.0.tgz", - "integrity": "sha512-pjZDsVH/1VsghMJ2/kAaxt6dL0psT6ZexQVrijczOf+PeP2BUqTHYejk3l6TlPRydggINOeNRhvpLa0AYpCWSQ==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.0.tgz", - "integrity": "sha512-3ObQs0BhvPgiUVZrN7gqCSvmFuMWvWvsjG5ayJ3Lraqv+2KhOsp+pUbigqbeWqueGIsnn+09HBw27rJ+gYK4VQ==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.0.tgz", - "integrity": "sha512-EtylprDtQPdS5rXvAayrNDYoJhIz1/vzN2fEubo3yLE7tfAw+948dO0g4M0vkTVFhKojnF+n6C8bDNe+gDRdTg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.0.tgz", - "integrity": "sha512-k09oiRCi/bHU9UVFqD17r3eJR9bn03TyKraCrlz5ULFJGdJGi7VOmm9jl44vOJvRJ6P7WuBi/s2A97LxxHGIdw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openbsd-x64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.0.tgz", - "integrity": "sha512-1o/0/pIhozoSaDJoDcec+IVLbnRtQmHwPV730+AOD29lHEEo4F5BEUB24H0OBdhbBBDwIOSuf7vgg0Ywxdfiiw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.0.tgz", - "integrity": "sha512-pESDkos/PDzYwtyzB5p/UoNU/8fJo68vcXM9ZW2V0kjYayj1KaaUfi1NmTUTUpMn4UhU4gTuK8gIaFO4UGuMbA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.0.tgz", - "integrity": "sha512-hj1wFStD7B1YBeYmvY+lWXZ7ey73YGPcViMShYikqKT1GtstIKQAtfUI6yrzPjAy/O7pO0VLXGmUVWXQMaYgTQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.0.tgz", - "integrity": "sha512-SyaIPFoxmUPlNDq5EHkTbiKzmSEmq/gOYFI/3HHJ8iS/v1mbugVa7dXUzcJGQfoytp9DJFLhHH4U3/eTy2Bq4w==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.0.tgz", - "integrity": "sha512-RdcryEfzZr+lAr5kRm2ucN9aVlCCa2QNq4hXelZxb8GG0NJSazq44Z3PCCc8wISRuCVnGs0lQJVX5Vp6fKA+IA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.0.tgz", - "integrity": "sha512-PrsWNQ8BuE00O3Xsx3ALh2Df8fAj9+cvvX9AIA6o4KpATR98c9mud4XtDWVvsEuyia5U4tVSTKygawyJkjm60w==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@standard-schema/spec": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@ts-morph/common": { - "version": "0.28.1", - "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.28.1.tgz", - "integrity": "sha512-W74iWf7ILp1ZKNYXY5qbddNaml7e9Sedv5lvU1V8lftlitkc9Pq1A+jlH23ltDgWYeZFFEqGCD1Ies9hqu3O+g==", - "license": "MIT", - "dependencies": { - "minimatch": "^10.0.1", - "path-browserify": "^1.0.1", - "tinyglobby": "^0.2.14" - } - }, - "node_modules/@turbo/darwin-64": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/@turbo/darwin-64/-/darwin-64-2.8.21.tgz", - "integrity": "sha512-kfGoM0Iw8ZNZpbds+4IzOe0hjvHldqJwUPRAjXJi3KBxg/QOZL95N893SRoMtf2aJ+jJ3dk32yPkp8rvcIjP9g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@turbo/darwin-arm64": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/@turbo/darwin-arm64/-/darwin-arm64-2.8.21.tgz", - "integrity": "sha512-o9HEflxUEyr987x0cTUzZBhDOyL6u95JmdmlkH2VyxAw7zq2sdtM5e72y9ufv2N5SIoOBw1fVn9UES5VY5H6vQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@turbo/linux-64": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/@turbo/linux-64/-/linux-64-2.8.21.tgz", - "integrity": "sha512-uTxlCcXWy5h1fSSymP8XSJ+AudzEHMDV3IDfKX7+DGB8kgJ+SLoTUAH7z4OFA7I/l2sznz0upPdbNNZs91YMag==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@turbo/linux-arm64": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/@turbo/linux-arm64/-/linux-arm64-2.8.21.tgz", - "integrity": "sha512-cdHIcxNcihHHkCHp0Y4Zb60K4Qz+CK4xw1gb6s/t/9o4SMeMj+hTBCtoW6QpPnl9xPYmxuTou8Zw6+cylTnREg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@turbo/windows-64": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/@turbo/windows-64/-/windows-64-2.8.21.tgz", - "integrity": "sha512-/iBj4OzbqEY8CX+eaeKbBTMZv2CLXNrt0692F7HnK7LcyYwyDecaAiSET6ZzL4opT7sbwkKvzAC/fhqT3Quu1A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@turbo/windows-arm64": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/@turbo/windows-arm64/-/windows-arm64-2.8.21.tgz", - "integrity": "sha512-95tMA/ZbIidJFUUtkmqioQ1gf3n3I1YbRP3ZgVdWTVn2qVbkodcIdGXBKRHHrIbRsLRl99SiHi/L7IxhpZDagQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@types/chai": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/deep-eql": "*", - "assertion-error": "^2.0.1" - } - }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/esrecurse": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", - "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "25.4.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.4.0.tgz", - "integrity": "sha512-9wLpoeWuBlcbBpOY3XmzSTG3oscB6xjBEEtn+pYXTfhyXhIxC5FsBer2KTopBlvKEiW9l13po9fq+SJY/5lkhw==", - "license": "MIT", - "dependencies": { - "undici-types": "~7.18.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.57.0.tgz", - "integrity": "sha512-qeu4rTHR3/IaFORbD16gmjq9+rEs9fGKdX0kF6BKSfi+gCuG3RCKLlSBYzn/bGsY9Tj7KE/DAQStbp8AHJGHEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.57.0", - "@typescript-eslint/type-utils": "8.57.0", - "@typescript-eslint/utils": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.57.0", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.57.0.tgz", - "integrity": "sha512-XZzOmihLIr8AD1b9hL9ccNMzEMWt/dE2u7NyTY9jJG6YNiNthaD5XtUHVF2uCXZ15ng+z2hT3MVuxnUYhq6k1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.57.0", - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.57.0.tgz", - "integrity": "sha512-pR+dK0BlxCLxtWfaKQWtYr7MhKmzqZxuii+ZjuFlZlIGRZm22HnXFqa2eY+90MUz8/i80YJmzFGDUsi8dMOV5w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.57.0", - "@typescript-eslint/types": "^8.57.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.57.0.tgz", - "integrity": "sha512-nvExQqAHF01lUM66MskSaZulpPL5pgy5hI5RfrxviLgzZVffB5yYzw27uK/ft8QnKXI2X0LBrHJFr1TaZtAibw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.57.0.tgz", - "integrity": "sha512-LtXRihc5ytjJIQEH+xqjB0+YgsV4/tW35XKX3GTZHpWtcC8SPkT/d4tqdf1cKtesryHm2bgp6l555NYcT2NLvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.57.0.tgz", - "integrity": "sha512-yjgh7gmDcJ1+TcEg8x3uWQmn8ifvSupnPfjP21twPKrDP/pTHlEQgmKcitzF/rzPSmv7QjJ90vRpN4U+zoUjwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0", - "@typescript-eslint/utils": "8.57.0", - "debug": "^4.4.3", - "ts-api-utils": "^2.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.57.0.tgz", - "integrity": "sha512-dTLI8PEXhjUC7B9Kre+u0XznO696BhXcTlOn0/6kf1fHaQW8+VjJAVHJ3eTI14ZapTxdkOmc80HblPQLaEeJdg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.57.0.tgz", - "integrity": "sha512-m7faHcyVg0BT3VdYTlX8GdJEM7COexXxS6KqGopxdtkQRvBanK377QDHr4W/vIPAR+ah9+B/RclSW5ldVniO1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.57.0", - "@typescript-eslint/tsconfig-utils": "8.57.0", - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.57.0.tgz", - "integrity": "sha512-5iIHvpD3CZe06riAsbNxxreP+MuYgVUsV0n4bwLH//VJmgtt54sQeY2GszntJ4BjYCpMzrfVh2SBnUQTtys2lQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.57.0", - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.57.0.tgz", - "integrity": "sha512-zm6xx8UT/Xy2oSr2ZXD0pZo7Jx2XsCoID2IUh9YSTFRu7z+WdwYTRk6LhUftm1crwqbuoF6I8zAFeCMw0YjwDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.57.0", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@vitest/expect": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.18.tgz", - "integrity": "sha512-8sCWUyckXXYvx4opfzVY03EOiYVxyNrHS5QxX3DAIi5dpJAAkyJezHCP77VMX4HKA2LDT/Jpfo8i2r5BE3GnQQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@standard-schema/spec": "^1.0.0", - "@types/chai": "^5.2.2", - "@vitest/spy": "4.0.18", - "@vitest/utils": "4.0.18", - "chai": "^6.2.1", - "tinyrainbow": "^3.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/mocker": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.18.tgz", - "integrity": "sha512-HhVd0MDnzzsgevnOWCBj5Otnzobjy5wLBe4EdeeFGv8luMsGcYqDuFRMcttKWZA5vVO8RFjexVovXvAM4JoJDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "4.0.18", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.21" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^6.0.0 || ^7.0.0-0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "node_modules/@vitest/pretty-format": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.18.tgz", - "integrity": "sha512-P24GK3GulZWC5tz87ux0m8OADrQIUVDPIjjj65vBXYG17ZeU3qD7r+MNZ1RNv4l8CGU2vtTRqixrOi9fYk/yKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^3.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.18.tgz", - "integrity": "sha512-rpk9y12PGa22Jg6g5M3UVVnTS7+zycIGk9ZNGN+m6tZHKQb7jrP7/77WfZy13Y/EUDd52NDsLRQhYKtv7XfPQw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "4.0.18", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.18.tgz", - "integrity": "sha512-PCiV0rcl7jKQjbgYqjtakly6T1uwv/5BQ9SwBLekVg/EaYeQFPiXcgrC2Y7vDMA8dM1SUEAEV82kgSQIlXNMvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.0.18", - "magic-string": "^0.30.21", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.18.tgz", - "integrity": "sha512-cbQt3PTSD7P2OARdVW3qWER5EGq7PHlvE+QfzSC0lbwO+xnt7+XH06ZzFjFRgzUX//JmpxrCu92VdwvEPlWSNw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.18.tgz", - "integrity": "sha512-msMRKLMVLWygpK3u2Hybgi4MNjcYJvwTb0Ru09+fOyCXIgT5raYP041DRRdiJiI3k/2U6SEbAETB3YtBrUkCFA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "4.0.18", - "tinyrainbow": "^3.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/axios": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.15.0.tgz", - "integrity": "sha512-wWyJDlAatxk30ZJer+GeCWS209sA42X+N5jU2jy6oHTp7ufw8uzUTVFBX9+wTfAlhiJXGS0Bq7X6efruWjuK9Q==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.11", - "form-data": "^4.0.5", - "proxy-from-env": "^2.1.0" - } - }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/chai": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/code-block-writer": { - "version": "13.0.3", - "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz", - "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==", - "license": "MIT" - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", - "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", - "dev": true, - "license": "MIT" - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/esbuild": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", - "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.3", - "@esbuild/android-arm": "0.27.3", - "@esbuild/android-arm64": "0.27.3", - "@esbuild/android-x64": "0.27.3", - "@esbuild/darwin-arm64": "0.27.3", - "@esbuild/darwin-x64": "0.27.3", - "@esbuild/freebsd-arm64": "0.27.3", - "@esbuild/freebsd-x64": "0.27.3", - "@esbuild/linux-arm": "0.27.3", - "@esbuild/linux-arm64": "0.27.3", - "@esbuild/linux-ia32": "0.27.3", - "@esbuild/linux-loong64": "0.27.3", - "@esbuild/linux-mips64el": "0.27.3", - "@esbuild/linux-ppc64": "0.27.3", - "@esbuild/linux-riscv64": "0.27.3", - "@esbuild/linux-s390x": "0.27.3", - "@esbuild/linux-x64": "0.27.3", - "@esbuild/netbsd-arm64": "0.27.3", - "@esbuild/netbsd-x64": "0.27.3", - "@esbuild/openbsd-arm64": "0.27.3", - "@esbuild/openbsd-x64": "0.27.3", - "@esbuild/openharmony-arm64": "0.27.3", - "@esbuild/sunos-x64": "0.27.3", - "@esbuild/win32-arm64": "0.27.3", - "@esbuild/win32-ia32": "0.27.3", - "@esbuild/win32-x64": "0.27.3" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.0.3.tgz", - "integrity": "sha512-COV33RzXZkqhG9P2rZCFl9ZmJ7WL+gQSCRzE7RhkbclbQPtLAWReL7ysA0Sh4c8Im2U9ynybdR56PV0XcKvqaQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.3", - "@eslint/config-helpers": "^0.5.2", - "@eslint/core": "^1.1.1", - "@eslint/plugin-kit": "^0.6.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^9.1.2", - "eslint-visitor-keys": "^5.0.1", - "espree": "^11.1.1", - "esquery": "^1.7.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", - "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@types/esrecurse": "^4.3.1", - "@types/estree": "^1.0.8", - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", - "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.16.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^5.0.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expect-type": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", - "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", - "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", - "dev": true, - "license": "ISC" - }, - "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-17.4.0.tgz", - "integrity": "sha512-hjrNztw/VajQwOLsMNT1cbJiH2muO3OROCHnbehc8eY5JyD2gqz4AcMHPqgaOR59DjgUjYAYLeH699g/eWi2jw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "license": "MIT" - }, - "node_modules/long": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", - "license": "Apache-2.0" - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/obug": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", - "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", - "dev": true, - "funding": [ - "https://github.com/sponsors/sxzz", - "https://opencollective.com/debug" - ], - "license": "MIT" - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "license": "MIT" - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postcss": { - "version": "8.5.8", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", - "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/protobufjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", - "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/proxy-from-env": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", - "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "4.60.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.0.tgz", - "integrity": "sha512-yqjxruMGBQJ2gG4HtjZtAfXArHomazDHoFwFFmZZl0r7Pdo7qCIXKqKHZc8yeoMgzJJ+pO6pEEHa+V7uzWlrAQ==", - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.8" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.60.0", - "@rollup/rollup-android-arm64": "4.60.0", - "@rollup/rollup-darwin-arm64": "4.60.0", - "@rollup/rollup-darwin-x64": "4.60.0", - "@rollup/rollup-freebsd-arm64": "4.60.0", - "@rollup/rollup-freebsd-x64": "4.60.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.60.0", - "@rollup/rollup-linux-arm-musleabihf": "4.60.0", - "@rollup/rollup-linux-arm64-gnu": "4.60.0", - "@rollup/rollup-linux-arm64-musl": "4.60.0", - "@rollup/rollup-linux-loong64-gnu": "4.60.0", - "@rollup/rollup-linux-loong64-musl": "4.60.0", - "@rollup/rollup-linux-ppc64-gnu": "4.60.0", - "@rollup/rollup-linux-ppc64-musl": "4.60.0", - "@rollup/rollup-linux-riscv64-gnu": "4.60.0", - "@rollup/rollup-linux-riscv64-musl": "4.60.0", - "@rollup/rollup-linux-s390x-gnu": "4.60.0", - "@rollup/rollup-linux-x64-gnu": "4.60.0", - "@rollup/rollup-linux-x64-musl": "4.60.0", - "@rollup/rollup-openbsd-x64": "4.60.0", - "@rollup/rollup-openharmony-arm64": "4.60.0", - "@rollup/rollup-win32-arm64-msvc": "4.60.0", - "@rollup/rollup-win32-ia32-msvc": "4.60.0", - "@rollup/rollup-win32-x64-gnu": "4.60.0", - "@rollup/rollup-win32-x64-msvc": "4.60.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true, - "license": "ISC" - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true, - "license": "MIT" - }, - "node_modules/std-env": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", - "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyexec": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", - "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinyrainbow": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.0.3.tgz", - "integrity": "sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/ts-api-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", - "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/ts-morph": { - "version": "27.0.2", - "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-27.0.2.tgz", - "integrity": "sha512-fhUhgeljcrdZ+9DZND1De1029PrE+cMkIP7ooqkLRTrRLTqcki2AstsyJm0vRNbTbVCNJ0idGlbBrfqc7/nA8w==", - "license": "MIT", - "dependencies": { - "@ts-morph/common": "~0.28.1", - "code-block-writer": "^13.0.3" - } - }, - "node_modules/turbo": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.8.21.tgz", - "integrity": "sha512-FlJ8OD5Qcp0jTAM7E4a/RhUzRNds2GzKlyxHKA6N247VLy628rrxAGlMpIXSz6VB430+TiQDJ/SMl6PL1lu6wQ==", - "dev": true, - "license": "MIT", - "bin": { - "turbo": "bin/turbo" - }, - "optionalDependencies": { - "@turbo/darwin-64": "2.8.21", - "@turbo/darwin-arm64": "2.8.21", - "@turbo/linux-64": "2.8.21", - "@turbo/linux-arm64": "2.8.21", - "@turbo/windows-64": "2.8.21", - "@turbo/windows-arm64": "2.8.21" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.57.0.tgz", - "integrity": "sha512-W8GcigEMEeB07xEZol8oJ26rigm3+bfPHxHvwbYUlu1fUDsGuQ7Hiskx5xGW/xM4USc9Ephe3jtv7ZYPQntHeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.57.0", - "@typescript-eslint/parser": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0", - "@typescript-eslint/utils": "8.57.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/undici-types": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", - "license": "MIT" - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/vite": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.2.tgz", - "integrity": "sha512-Bby3NOsna2jsjfLVOHKes8sGwgl4TT0E6vvpYgnAYDIF/tie7MRaFthmKuHx1NSXjiTueXH3do80FMQgvEktRg==", - "license": "MIT", - "dependencies": { - "esbuild": "^0.27.0", - "fdir": "^6.5.0", - "picomatch": "^4.0.3", - "postcss": "^8.5.6", - "rollup": "^4.43.0", - "tinyglobby": "^0.2.15" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "lightningcss": "^1.21.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/vitest": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.18.tgz", - "integrity": "sha512-hOQuK7h0FGKgBAas7v0mSAsnvrIgAvWmRFjmzpJ7SwFHH3g1k2u37JtYwOwmEKhK6ZO3v9ggDBBm0La1LCK4uQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "4.0.18", - "@vitest/mocker": "4.0.18", - "@vitest/pretty-format": "4.0.18", - "@vitest/runner": "4.0.18", - "@vitest/snapshot": "4.0.18", - "@vitest/spy": "4.0.18", - "@vitest/utils": "4.0.18", - "es-module-lexer": "^1.7.0", - "expect-type": "^1.2.2", - "magic-string": "^0.30.21", - "obug": "^2.1.1", - "pathe": "^2.0.3", - "picomatch": "^4.0.3", - "std-env": "^3.10.0", - "tinybench": "^2.9.0", - "tinyexec": "^1.0.2", - "tinyglobby": "^0.2.15", - "tinyrainbow": "^3.0.3", - "vite": "^6.0.0 || ^7.0.0", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^20.0.0 || ^22.0.0 || >=24.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@opentelemetry/api": "^1.9.0", - "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.0.18", - "@vitest/browser-preview": "4.0.18", - "@vitest/browser-webdriverio": "4.0.18", - "@vitest/ui": "4.0.18", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@opentelemetry/api": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser-playwright": { - "optional": true - }, - "@vitest/browser-preview": { - "optional": true - }, - "@vitest/browser-webdriverio": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zod": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", - "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-to-ts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/zod-to-ts/-/zod-to-ts-2.0.0.tgz", - "integrity": "sha512-aHsUgIl+CQutKAxtRNeZslLCLXoeuSq+j5HU7q3kvi/c2KIAo6q4YjT7/lwFfACxLB923ELHYMkHmlxiqFy4lw==", - "license": "MIT", - "peerDependencies": { - "typescript": "^5.0.0", - "zod": "^3.25.0 || ^4.0.0" - } - }, - "packages/example": { - "name": "@code0-tech/example", - "version": "0.0.0", - "extraneous": true - }, - "packages/gls-action": { - "name": "@code0-tech/gls-action", - "version": "0.0.0", - "extraneous": true - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 4eb0488..0000000 --- a/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "centaurus", - "private": true, - "version": "0.0.0", - "type": "module", - "workspaces": [ - "actions/*" - ], - "packageManager": "npm@11.12.1", - "scripts": { - "build": "npm run build --workspaces --if-present", - "generate:docs": "npm run generate:docs --workspaces --if-present", - "start": "turbo run start", - "test": "vitest run", - "test:watch": "vitest", - "lint": "eslint .", - "create-action": "node scripts/create-action.mjs" - }, - "devDependencies": { - "@eslint/js": "^10.0.0", - "eslint": "^10.0.0", - "globals": "^17.4.0", - "turbo": "^2.8.21", - "typescript": "^5", - "typescript-eslint": "^8.0.0", - "vitest": "^4.0.0" - }, - "dependencies": { - "@code0-tech/hercules": "^0.0.2", - "axios": "^1.13.6", - "vite": "^7.3.1", - "zod": "^4.3.6", - "zod-to-ts": "^2.0.0" - } -} diff --git a/scripts/create-action.mjs b/scripts/create-action.mjs deleted file mode 100644 index 4dc142b..0000000 --- a/scripts/create-action.mjs +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/env node -// Creates a new package inside the packages/ workspace. -// Usage: npm run create-package -- - -import { mkdir, writeFile, readFile } from "fs/promises"; -import { join, dirname } from "path"; -import { fileURLToPath } from "url"; -import { existsSync } from "fs"; - -const __dirname = dirname(fileURLToPath(import.meta.url)); -const rootDir = join(__dirname, ".."); - -const actionName = process.argv[2]; - -if (!actionName) { - console.error("Usage: npm run create-package -- "); - process.exit(1); -} - -if (!/^[a-z][a-z0-9-]*$/.test(actionName)) { - console.error( - "Action name must start with a lowercase letter and contain only lowercase letters, digits, and hyphens." - ); - process.exit(1); -} - -const packageDir = join(rootDir, "actions", actionName); - -if (existsSync(packageDir)) { - console.error( - `Action "${actionName}" already exists at actions/${actionName}` - ); - process.exit(1); -} - -console.log(`Creating action "${actionName}"...`); - -// Create directory structure -await mkdir(join(packageDir, "src"), { recursive: true }); - -// package.json -const packageJson = { - name: `@code0-tech/${actionName}`, - version: "0.0.0", - private: true, - type: "module", - main: "./dist/index.js", - types: "./dist/index.d.ts", - scripts: { - build: "tsc --build", - lint: "eslint .", - }, -}; - -await writeFile( - join(packageDir, "package.json"), - JSON.stringify(packageJson, null, 2) + "\n" -); - -// tsconfig.json -const tsconfig = { - extends: "../../tsconfig.base.json", - compilerOptions: { - rootDir: "./src", - outDir: "./dist", - composite: true, - }, - include: ["src"], - exclude: ["src/**/*.test.ts", "src/**/*.spec.ts"], -}; - -await writeFile( - join(packageDir, "tsconfig.json"), - JSON.stringify(tsconfig, null, 2) + "\n" -); - -// src/index.ts -await writeFile(join(packageDir, "src", "index.ts"), `// ${actionName}\n`); - -// Update root tsconfig.json references -const rootTsconfigPath = join(rootDir, "tsconfig.json"); -const rootTsconfig = JSON.parse(await readFile(rootTsconfigPath, "utf-8")); - -rootTsconfig.references = rootTsconfig.references ?? []; -rootTsconfig.references.push({ path: `actions/${actionName}` }); - -await writeFile( - rootTsconfigPath, - JSON.stringify(rootTsconfig, null, 2) + "\n" -); - -console.log(`\n✅ Action "${actionName}" created successfully!`); -console.log(` Location : actions/${actionName}`); -console.log(` Run "npm install" to link the new workspace.`); diff --git a/src/standardActionDocs.ts b/src/standardActionDocs.ts deleted file mode 100644 index a32c42c..0000000 --- a/src/standardActionDocs.ts +++ /dev/null @@ -1,399 +0,0 @@ -import {writeFileSync} from "fs" -import { - ActionSdk, - HerculesActionConfigurationDefinition, - HerculesDataType, - HerculesFlowType, - HerculesRegisterFunctionParameter, -} from "@code0-tech/hercules" -import {Project, SymbolFlags, Type} from "ts-morph" - -interface Translation { - code?: string - content?: string -} - -interface FunctionDefinitionCard { - descriptions?: Array - displayMessages?: Array - identifier?: string - names?: Array - parameterDefinitions?: { - nodes: { - identifier: string - descriptions: Array - names: Array - }[] - } -} - -interface RegistryState { - dataTypes: HerculesDataType[] - actionConfigurationDefinitions: HerculesActionConfigurationDefinition[] - runtimeFunctions: HerculesRegisterFunctionParameter[] - flowTypes: HerculesFlowType[] -} - -interface FunctionGroup { - heading: string - modules: Record Promise> - intro?: string -} - -interface TypesCopy { - title: string - description: string - heading: string - intro: string -} - -interface FunctionsCopy { - title: string - description: string - intro: string -} - -export interface StandardActionDocsConfig { - actionName: string - typePrefix: string - typesOutputPath: string - functionsOutputPath: string - typesCopy: TypesCopy - functionsCopy: FunctionsCopy - functionGroups: FunctionGroup[] - typeLinkOverrides?: Record - loadAllDefinitions: (sdk: ActionSdk) => Promise -} - -function createRegistry(): RegistryState { - return { - dataTypes: [], - actionConfigurationDefinitions: [], - runtimeFunctions: [], - flowTypes: [], - } -} - -function createMockSdk(registry: RegistryState): ActionSdk { - return { - onError: () => {}, - connect: () => Promise.resolve([]), - dispatchEvent: () => Promise.resolve(), - getProjectActionConfigurations: () => [], - config: { - authToken: "", - aquilaUrl: "", - version: "", - actionId: "", - }, - fullyConnected: () => false, - registerDataTypes: (...dataTypes) => { - registry.dataTypes = [...dataTypes, ...registry.dataTypes] - return Promise.resolve() - }, - registerConfigDefinitions: (...actionConfigurations) => { - registry.actionConfigurationDefinitions = [ - ...actionConfigurations, - ...registry.actionConfigurationDefinitions, - ] - return Promise.resolve() - }, - registerFunctionDefinitions: (...functionDefinitions) => { - registry.runtimeFunctions = [...functionDefinitions, ...registry.runtimeFunctions] - return Promise.resolve() - }, - registerFlowTypes: (...flowTypes) => { - registry.flowTypes = [...registry.flowTypes, ...flowTypes] - return Promise.resolve() - }, - } -} - -function breakDownType(typeName: string, code: string): Record { - const map: Record = {} - const project = new Project({useInMemoryFileSystem: true}) - const sourceFile = project.createSourceFile("example.ts", code) - - const typeAlias = sourceFile.getTypeAliasOrThrow(typeName) - let rootType = typeAlias.getType() - - if (rootType.isArray()) { - rootType = rootType.getArrayElementTypeOrThrow() - } - - function buildType(type: Type, currentName: string): string { - const lines: string[] = [] - - type.getProperties().forEach(symbol => { - const name = symbol.getName() - const decl = symbol.getDeclarations()[0] - if (!decl) { - return - } - - let propType = symbol.getTypeAtLocation(decl) - let isArray = false - if (propType.isArray()) { - propType = propType.getArrayElementTypeOrThrow() - isArray = true - } - - let typeText: string - if (propType.getText().startsWith("{")) { - const nestedName = `${currentName}$${name}` - const nestedType = buildType(propType, nestedName) - map[nestedName] = `export type ${nestedName} = ${nestedType};` - typeText = isArray ? `${nestedName}[]` : nestedName - } else { - typeText = propType.getText(decl) - } - - const jsDocs = (decl as any).getJsDocs?.() - ?.map((doc: any) => doc.getText()) - .join("\n") - const docPrefix = jsDocs ? `${jsDocs}\n` : "" - lines.push(`${docPrefix}${name}${symbol.hasFlags(SymbolFlags.Optional) ? "?" : ""}: ${typeText};`) - }) - - return `{\n${lines.map(line => ` ${line}`).join("\n")}\n}` - } - - const finalType = buildType(rootType, typeName) - map[typeName] = `export type ${typeName} = ${finalType};` - return map -} - -function normalizeAnchor(typeName: string): string { - return typeName.toLowerCase().replace(/-/g, "_").replace(/\$/g, "").replace("[]", "") -} - -function getTypeLink(typeName: string | null, config: StandardActionDocsConfig): string | null { - if (!typeName) { - return null - } - - const override = config.typeLinkOverrides?.[typeName] - const resolved = override || typeName - - if (!resolved.startsWith(config.typePrefix)) { - return resolved - } - - return `[${resolved}](./types.mdx#${normalizeAnchor(resolved)})` -} - -function generateDatatypes(config: StandardActionDocsConfig, registry: RegistryState): string { - let generatedDoc = `--- -title: ${config.typesCopy.title} -description: ${config.typesCopy.description} ---- - -import {TypeTable} from "fumadocs-ui/components/type-table"; - -## ${config.typesCopy.heading} - -${config.typesCopy.intro} - ---- -` - - registry.dataTypes.forEach(value => { - value.type = `export type ${value.identifier} = ${value.type}`.replace(/ \| undefined/g, "") - - const parts = breakDownType(value.identifier, value.type) - const entries = Object.entries(parts).reverse() - - entries.forEach(([key, rawType]) => { - let typeString = "\n" - let globalDocumentation = "" - - const project = new Project({useInMemoryFileSystem: true}) - const sourceFile = project.createSourceFile("example.ts", rawType) - const typeAlias = sourceFile.getTypeAliasOrThrow(key) - - let parsedType = typeAlias.getType() - if (parsedType.isArray()) { - parsedType = parsedType.getArrayElementTypeOrThrow() - } - - parsedType.getProperties().forEach(property => { - const propertyType = property.getTypeAtLocation(typeAlias) - const propertyTypeText = propertyType.getText() - - const docs: Record = { - description: "No description set", - deprecated: false, - default: undefined, - link: undefined, - } - - property.getJsDocTags().forEach(tag => { - tag.getText().forEach(part => { - if (tag.getName() === "global") { - globalDocumentation = `${globalDocumentation}\n${part.text.trim()}` - return - } - docs[tag.getName()] = part.text.trim() - }) - }) - - if (propertyTypeText.startsWith(config.typePrefix)) { - docs.link = normalizeAnchor(propertyTypeText) - } - - typeString += `${property.getName()}: { - description: '${docs.description}', - deprecated: ${docs.deprecated}, - required: ${!property.isOptional()},${docs.link ? `\ntypeDescriptionLink: '#${docs.link}',` : ""} - type: '${propertyTypeText}',${docs.default ? `\ndefault: ${docs.default}` : ""} - }, - ` - }) - - generatedDoc += ` -## ${key} - -${globalDocumentation || "No documentation provided for this type."} - - -` - }) - }) - - return generatedDoc -} - -function getParamInfo(signature: string, paramName: string): { optional: boolean; type: string | null } { - const paramsMatch = signature.match(/\((.*)\)/s) - if (!paramsMatch) { - return {optional: false, type: null} - } - - const params = paramsMatch[1].split(",") - for (const param of params) { - const trimmed = param.trim() - const match = trimmed.match(new RegExp(`${paramName}\\s*(\\?)?\\s*:\\s*(.+)`)) - if (match) { - return { - optional: match[1] === "?", - type: match[2].trim(), - } - } - } - - return {optional: false, type: null} -} - -function generateMarkdownTable(headers: string[], rows: string[][]): string { - const headerRow = `| ${headers.join(" | ")} |` - const separator = `| ${headers.map(() => "---").join(" | ")} |` - const bodyRows = rows.map(row => `| ${row.join(" | ")} |`) - return [headerRow, separator, ...bodyRows].join("\n") -} - -async function loadFunctions( - modules: Record Promise>, - sdk: ActionSdk, - registry: RegistryState, -): Promise { - for (const path in modules) { - const mod: any = await modules[path]() - if (typeof mod.default !== "function") { - continue - } - - try { - await mod.default(sdk) - } catch (error) { - console.log(`Error registering functions from ${path}:`, error) - } - } - - registry.runtimeFunctions = [...registry.runtimeFunctions] -} - -async function generateFunctions(config: StandardActionDocsConfig, sdk: ActionSdk, registry: RegistryState): Promise { - let generatedDoc = `--- -title: ${config.functionsCopy.title} -description: ${config.functionsCopy.description} ---- - -${config.functionsCopy.intro} - ---- -` - - for (const group of config.functionGroups) { - registry.runtimeFunctions = [] - await loadFunctions(group.modules, sdk, registry) - - generatedDoc += ` -## ${group.heading} -${group.intro ? `\n${group.intro}\n` : ""}` - - registry.runtimeFunctions.forEach(value => { - const definition = value.definition - const card: FunctionDefinitionCard = { - descriptions: definition.description, - names: definition.name, - identifier: definition.runtimeName, - parameterDefinitions: { - nodes: definition.parameters.map(parameter => ({ - names: parameter.name, - identifier: parameter.runtimeName, - descriptions: parameter.description, - })), - }, - displayMessages: definition.displayMessage, - } - - const headers = ["Parameter", "Name", "Type", "Required", "Description"] - const rows: string[][] = definition.parameters.map(parameter => { - const paramInfo = getParamInfo(definition.signature, parameter.runtimeName) - const linkedType = getTypeLink(paramInfo.type, config) - - return [ - parameter.runtimeName, - parameter.name[0].content, - linkedType?.replace(/\|/g, "\\|") || "Unknown", - paramInfo.optional ? "No" : "Yes", - parameter.description[0].content, - ] - }) - - const returnType = definition.signature.split("):")[1]?.trim() - generatedDoc += ` -### \`${definition.runtimeName}\` - -${generateMarkdownTable(headers, rows)} - -Return Type: ${getTypeLink(returnType || null, config) || "Unknown"} - -${definition.documentation?.at(0)?.content || ""} - - - ---- -` - }) - } - - return generatedDoc -} - -export async function runStandardActionDocs(config: StandardActionDocsConfig): Promise { - const registry = createRegistry() - const sdk = createMockSdk(registry) - - await config.loadAllDefinitions(sdk) - - const typesContent = generateDatatypes(config, registry) - const functionsContent = await generateFunctions(config, sdk, registry) - - writeFileSync(config.typesOutputPath, typesContent, "utf8") - writeFileSync(config.functionsOutputPath, functionsContent, "utf8") -} - diff --git a/tsconfig.base.json b/tsconfig.base.json deleted file mode 100644 index e8bddc1..0000000 --- a/tsconfig.base.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "compilerOptions": { - "esModuleInterop": true, - "module": "es2022", - "moduleResolution": "bundler", - "target": "es2021", - "lib": ["es2022", "es2021", "dom"], - "strict": false, - "skipLibCheck": true, - "types": ["vite/client"], - }, - "include": ["src/**/*", "scripts"], - "exclude": ["node_modules", "dist", "***/test/**", "**/*.test.ts"] -} \ No newline at end of file diff --git a/turbo.json b/turbo.json deleted file mode 100644 index 8da0a4c..0000000 --- a/turbo.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "tasks": { - "start": { - "cache": false - } - } -} \ No newline at end of file diff --git a/vitest.config.ts b/vitest.config.ts deleted file mode 100644 index d246060..0000000 --- a/vitest.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { defineConfig } from "vitest/config"; -import {resolve} from "path"; - -export default defineConfig({ - test: { - include: [resolve(__dirname, "actions/**/*.{test,spec}.{ts,tsx}")], - environment: "node", - exclude: ["**/dist/**"], - setupFiles: [resolve(__dirname, "vitest.setup.ts")], - }, -}); \ No newline at end of file diff --git a/vitest.setup.ts b/vitest.setup.ts deleted file mode 100644 index f3cb84c..0000000 --- a/vitest.setup.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { beforeEach, vi } from "vitest"; - -beforeEach(() => { - vi.spyOn(console, "error").mockImplementation((...args) => { - throw new Error(args.join(" ")); - }); -}); - -process.on("unhandledRejection", (err) => { - throw err; -}); - -process.on("uncaughtException", (err) => { - throw err; -}); \ No newline at end of file