From 285c11eedb96eeb3ef58e6ce8264be3cbb39583e Mon Sep 17 00:00:00 2001 From: Sergio Marcelino Date: Mon, 23 Mar 2026 14:38:36 -0300 Subject: [PATCH 1/2] feat: update tsdown version, add zod dependency, and enhance type definitions in SDK (#1341) --- pnpm-lock.yaml | 361 +++++++++++++++++- sdk/packages/node/iii-example/package.json | 3 +- .../node/iii-example/src/iii-zod-example.ts | 25 ++ sdk/packages/node/iii-example/src/iii.ts | 1 + sdk/packages/node/iii-example/src/index.ts | 54 ++- sdk/packages/node/iii-example/src/state.ts | 5 +- sdk/packages/node/iii/package.json | 2 +- sdk/packages/node/iii/src/iii-types.ts | 7 +- sdk/packages/node/iii/tsdown.config.ts | 2 +- 9 files changed, 420 insertions(+), 40 deletions(-) create mode 100644 sdk/packages/node/iii-example/src/iii-zod-example.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9fde4788..ec9576977 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -405,8 +405,8 @@ importers: specifier: ^2.1.0 version: 2.1.9(vitest@2.1.9(@types/node@25.3.3)(lightningcss@1.31.1)) tsdown: - specifier: ^0.17.0 - version: 0.17.4(synckit@0.11.12)(typescript@5.9.3) + specifier: ^0.21.4 + version: 0.21.4(synckit@0.11.12)(typescript@5.9.3) typedoc: specifier: ^0.28.17 version: 0.28.17(typescript@5.9.3) @@ -422,6 +422,9 @@ importers: iii-sdk: specifier: workspace:* version: link:../iii + zod: + specifier: ^4.3.6 + version: 4.3.6 devDependencies: '@types/node': specifier: ^24.10.1 @@ -456,6 +459,10 @@ packages: resolution: {integrity: sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==} engines: {node: '>=6.9.0'} + '@babel/generator@8.0.0-rc.2': + resolution: {integrity: sha512-oCQ1IKPwkzCeJzAPb7Fv8rQ9k5+1sG8mf2uoHiMInPYvkRfrDJxbTIbH51U+jstlkghus0vAi3EBvkfvEsYNLQ==} + engines: {node: ^20.19.0 || >=22.12.0} + '@babel/helper-compilation-targets@7.28.6': resolution: {integrity: sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==} engines: {node: '>=6.9.0'} @@ -482,10 +489,18 @@ packages: resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@8.0.0-rc.3': + resolution: {integrity: sha512-AmwWFx1m8G/a5cXkxLxTiWl+YEoWuoFLUCwqMlNuWO1tqAYITQAbCRPUkyBHv1VOFgfjVOqEj6L3u15J5ZCzTA==} + engines: {node: ^20.19.0 || >=22.12.0} + '@babel/helper-validator-identifier@7.28.5': resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@8.0.0-rc.2': + resolution: {integrity: sha512-xExUBkuXWJjVuIbO7z6q7/BA9bgfJDEhVL0ggrggLMbg0IzCUWGT1hZGE8qUH7Il7/RD/a6cZ3AAFrrlp1LF/A==} + engines: {node: ^20.19.0 || >=22.12.0} + '@babel/helper-validator-option@7.27.1': resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} engines: {node: '>=6.9.0'} @@ -499,6 +514,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@8.0.0-rc.2': + resolution: {integrity: sha512-29AhEtcq4x8Dp3T72qvUMZHx0OMXCj4Jy/TEReQa+KWLln524Cj1fWb3QFi0l/xSpptQBR6y9RNEXuxpFvwiUQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + '@babel/plugin-syntax-async-generators@7.8.4': resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: @@ -618,6 +638,10 @@ packages: resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} engines: {node: '>=6.9.0'} + '@babel/types@8.0.0-rc.2': + resolution: {integrity: sha512-91gAaWRznDwSX4E2tZ1YjBuIfnQVOFDCQ2r0Toby0gu4XEbyF623kXLMA8d4ZbCu+fINcrudkmEcwSUHgDDkNw==} + engines: {node: ^20.19.0 || >=22.12.0} + '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -1633,6 +1657,9 @@ packages: '@oxc-project/types@0.114.0': resolution: {integrity: sha512-//nBfbzHQHvJs8oFIjv6coZ6uxQ4alLfiPe6D5vit6c4pmxATHHlVwgB1k+Hv4yoAMyncdxgRBF5K4BYWUCzvA==} + '@oxc-project/types@0.115.0': + resolution: {integrity: sha512-4n91DKnebUS4yjUHl2g3/b2T+IUdCfmoZGhmwsovZCDaJSs+QkVAM+0AqqTxHSsHfeiMuueT75cZaZcT/m0pSw==} + '@oxc-project/types@0.99.0': resolution: {integrity: sha512-LLDEhXB7g1m5J+woRSgfKsFPS3LhR9xRhTeIoEBm5WrkwMxn6eZ0Ld0c0K5eHB57ChZX6I3uSmmLjZ8pcjlRcw==} @@ -2060,6 +2087,12 @@ packages: cpu: [arm64] os: [android] + '@rolldown/binding-android-arm64@1.0.0-rc.9': + resolution: {integrity: sha512-lcJL0bN5hpgJfSIz/8PIf02irmyL43P+j1pTCfbD1DbLkmGRuFIA4DD3B3ZOvGqG0XiVvRznbKtN0COQVaKUTg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + '@rolldown/binding-darwin-arm64@1.0.0-beta.52': resolution: {integrity: sha512-MmKeoLnKu1d9j6r19K8B+prJnIZ7u+zQ+zGQ3YHXGnr41rzE3eqQLovlkvoZnRoxDGPA4ps0pGiwXy6YE3lJyg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2078,6 +2111,12 @@ packages: cpu: [arm64] os: [darwin] + '@rolldown/binding-darwin-arm64@1.0.0-rc.9': + resolution: {integrity: sha512-J7Zk3kLYFsLtuH6U+F4pS2sYVzac0qkjcO5QxHS7OS7yZu2LRs+IXo+uvJ/mvpyUljDJ3LROZPoQfgBIpCMhdQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + '@rolldown/binding-darwin-x64@1.0.0-beta.52': resolution: {integrity: sha512-qpHedvQBmIjT8zdnjN3nWPR2qjQyJttbXniCEKKdHeAbZG9HyNPBUzQF7AZZGwmS9coQKL+hWg9FhWzh2dZ2IA==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2096,6 +2135,12 @@ packages: cpu: [x64] os: [darwin] + '@rolldown/binding-darwin-x64@1.0.0-rc.9': + resolution: {integrity: sha512-iwtmmghy8nhfRGeNAIltcNXzD0QMNaaA5U/NyZc1Ia4bxrzFByNMDoppoC+hl7cDiUq5/1CnFthpT9n+UtfFyg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + '@rolldown/binding-freebsd-x64@1.0.0-beta.52': resolution: {integrity: sha512-dDp7WbPapj/NVW0LSiH/CLwMhmLwwKb3R7mh2kWX+QW85X1DGVnIEyKh9PmNJjB/+suG1dJygdtdNPVXK1hylg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2114,6 +2159,12 @@ packages: cpu: [x64] os: [freebsd] + '@rolldown/binding-freebsd-x64@1.0.0-rc.9': + resolution: {integrity: sha512-DLFYI78SCiZr5VvdEplsVC2Vx53lnA4/Ga5C65iyldMVaErr86aiqCoNBLl92PXPfDtUYjUh+xFFor40ueNs4Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.52': resolution: {integrity: sha512-9e4l6vy5qNSliDPqNfR6CkBOAx6PH7iDV4OJiEJzajajGrVy8gc/IKKJUsoE52G8ud8MX6r3PMl97NfwgOzB7g==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2132,6 +2183,12 @@ packages: cpu: [arm] os: [linux] + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.9': + resolution: {integrity: sha512-CsjTmTwd0Hri6iTw/DRMK7kOZ7FwAkrO4h8YWKoX/kcj833e4coqo2wzIFywtch/8Eb5enQ/lwLM7w6JX1W5RQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.52': resolution: {integrity: sha512-V48oDR84feRU2KRuzpALp594Uqlx27+zFsT6+BgTcXOtu7dWy350J1G28ydoCwKB+oxwsRPx2e7aeQnmd3YJbQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2150,6 +2207,12 @@ packages: cpu: [arm64] os: [linux] + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-2x9O2JbSPxpxMDhP9Z74mahAStibTlrBMW0520+epJH5sac7/LwZW5Bmg/E6CXuEF53JJFW509uP+lSedaUNxg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.52': resolution: {integrity: sha512-ENLmSQCWqSA/+YN45V2FqTIemg7QspaiTjlm327eUAMeOLdqmSOVVyrQexJGNTQ5M8sDYCgVAig2Kk01Ggmqaw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2168,6 +2231,24 @@ packages: cpu: [arm64] os: [linux] + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.9': + resolution: {integrity: sha512-JA1QRW31ogheAIRhIg9tjMfsYbglXXYGNPLdPEYrwFxdbkQCAzvpSCSHCDWNl4hTtrol8WeboCSEpjdZK8qrCg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-aOKU9dJheda8Kj8Y3w9gnt9QFOO+qKPAl8SWd7JPHP+Cu0EuDAE5wokQubLzIDQWg2myXq2XhTpOVS07qqvT+w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-OalO94fqj7IWRn3VdXWty75jC5dk4C197AWEuMhIpvVv2lw9fiPhud0+bW2ctCxb3YoBZor71QHbY+9/WToadA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.52': resolution: {integrity: sha512-klahlb2EIFltSUubn/VLjuc3qxp1E7th8ukayPfdkcKvvYcQ5rJztgx8JsJSuAKVzKtNTqUGOhy4On71BuyV8g==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2186,6 +2267,12 @@ packages: cpu: [x64] os: [linux] + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.9': + resolution: {integrity: sha512-cVEl1vZtBsBZna3YMjGXNvnYYrOJ7RzuWvZU0ffvJUexWkukMaDuGhUXn0rjnV0ptzGVkvc+vW9Yqy6h8YX4pg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + '@rolldown/binding-linux-x64-musl@1.0.0-beta.52': resolution: {integrity: sha512-UuA+JqQIgqtkgGN2c/AQ5wi8M6mJHrahz/wciENPTeI6zEIbbLGoth5XN+sQe2pJDejEVofN9aOAp0kaazwnVg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2204,6 +2291,12 @@ packages: cpu: [x64] os: [linux] + '@rolldown/binding-linux-x64-musl@1.0.0-rc.9': + resolution: {integrity: sha512-UzYnKCIIc4heAKgI4PZ3dfBGUZefGCJ1TPDuLHoCzgrMYPb5Rv6TLFuYtyM4rWyHM7hymNdsg5ik2C+UD9VDbA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + '@rolldown/binding-openharmony-arm64@1.0.0-beta.52': resolution: {integrity: sha512-1BNQW8u4ro8bsN1+tgKENJiqmvc+WfuaUhXzMImOVSMw28pkBKdfZtX2qJPADV3terx+vNJtlsgSGeb3+W6Jiw==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2222,6 +2315,12 @@ packages: cpu: [arm64] os: [openharmony] + '@rolldown/binding-openharmony-arm64@1.0.0-rc.9': + resolution: {integrity: sha512-+6zoiF+RRyf5cdlFQP7nm58mq7+/2PFaY2DNQeD4B87N36JzfF/l9mdBkkmTvSYcYPE8tMh/o3cRlsx1ldLfog==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + '@rolldown/binding-wasm32-wasi@1.0.0-beta.52': resolution: {integrity: sha512-K/p7clhCqJOQpXGykrFaBX2Dp9AUVIDHGc+PtFGBwg7V+mvBTv/tsm3LC3aUmH02H2y3gz4y+nUTQ0MLpofEEg==} engines: {node: '>=14.0.0'} @@ -2237,6 +2336,11 @@ packages: engines: {node: '>=14.0.0'} cpu: [wasm32] + '@rolldown/binding-wasm32-wasi@1.0.0-rc.9': + resolution: {integrity: sha512-rgFN6sA/dyebil3YTlL2evvi/M+ivhfnyxec7AccTpRPccno/rPoNlqybEZQBkcbZu8Hy+eqNJCqfBR8P7Pg8g==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.52': resolution: {integrity: sha512-a4EkXBtnYYsKipjS7QOhEBM4bU5IlR9N1hU+JcVEVeuTiaslIyhWVKsvf7K2YkQHyVAJ+7/A9BtrGqORFcTgng==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2255,6 +2359,12 @@ packages: cpu: [arm64] os: [win32] + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.9': + resolution: {integrity: sha512-lHVNUG/8nlF1IQk1C0Ci574qKYyty2goMiPlRqkC5R+3LkXDkL5Dhx8ytbxq35m+pkHVIvIxviD+TWLdfeuadA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.52': resolution: {integrity: sha512-5ZXcYyd4GxPA6QfbGrNcQjmjbuLGvfz6728pZMsQvGHI+06LT06M6TPtXvFvLgXtexc+OqvFe1yAIXJU1gob/w==} engines: {node: ^20.19.0 || >=22.12.0} @@ -2279,6 +2389,12 @@ packages: cpu: [x64] os: [win32] + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.9': + resolution: {integrity: sha512-G0oA4+w1iY5AGi5HcDTxWsoxF509hrFIPB2rduV5aDqS9FtDg1CAfa7V34qImbjfhIcA8C+RekocJZA96EarwQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@rolldown/pluginutils@1.0.0-beta.52': resolution: {integrity: sha512-/L0htLJZbaZFL1g9OHOblTxbCYIGefErJjtYOwgl9ZqNx27P3L0SDfjhhHIss32gu5NWgnxuT2a2Hnnv6QGHKA==} @@ -2291,6 +2407,9 @@ packages: '@rolldown/pluginutils@1.0.0-rc.5': resolution: {integrity: sha512-RxlLX/DPoarZ9PtxVrQgZhPoor987YtKQqCo5zkjX+0S0yLJ7Vv515Wk6+xtTL67VONKJKxETWZwuZjss2idYw==} + '@rolldown/pluginutils@1.0.0-rc.9': + resolution: {integrity: sha512-w6oiRWgEBl04QkFZgmW+jnU1EC9b57Oihi2ot3HNWIQRqgHp5PnYDia5iZ5FF7rpa4EQdiqMDXjlqKGXBhsoXw==} + '@rollup/plugin-babel@6.1.0': resolution: {integrity: sha512-dFZNuFD2YRcoomP4oYf+DvQNSUA9ih+A3vUqopQx5EdtPGo3WBnQcI/S8pwpz91UsGfL0HsMSOlaMld8HrbubA==} engines: {node: '>=14.0.0'} @@ -2783,6 +2902,9 @@ packages: '@types/jest@30.0.0': resolution: {integrity: sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==} + '@types/jsesc@2.5.1': + resolution: {integrity: sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -3162,6 +3284,10 @@ packages: resolution: {integrity: sha512-m1Q/RaVOnTp9JxPX+F+Zn7IcLYMzM8kZofDImfsKZd8MbR+ikdOzTeztStWqfrqIxZnYWryyI9ePm3NGjnZgGw==} engines: {node: '>=20.19.0'} + ast-kit@3.0.0-beta.1: + resolution: {integrity: sha512-trmleAnZ2PxN/loHWVhhx1qeOHSRXq4TDsBBxq3GqeJitfk3+jTQ+v/C1km/KYq9M7wKqCewMh+/NAvVH7m+bw==} + engines: {node: '>=20.19.0'} + ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} @@ -3282,6 +3408,10 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + cac@7.0.0: + resolution: {integrity: sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==} + engines: {node: '>=20.19.0'} + call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} @@ -4137,6 +4267,9 @@ packages: hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + hookable@6.1.0: + resolution: {integrity: sha512-ZoKZSJgu8voGK2geJS+6YtYjvIzu9AOM/KZXsBxr83uhLL++e9pEv/dlgwgy3dvHg06kTz6JOh1hk3C8Ceiymw==} + html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} @@ -5429,6 +5562,25 @@ packages: vue-tsc: optional: true + rolldown-plugin-dts@0.22.5: + resolution: {integrity: sha512-M/HXfM4cboo+jONx9Z0X+CUf3B5tCi7ni+kR5fUW50Fp9AlZk0oVLesibGWgCXDKFp5lpgQ9yhKoImUFjl3VZw==} + engines: {node: '>=20.19.0'} + peerDependencies: + '@ts-macro/tsc': ^0.3.6 + '@typescript/native-preview': '>=7.0.0-dev.20250601.1' + rolldown: ^1.0.0-rc.3 + typescript: ^5.0.0 || ^6.0.0-beta + vue-tsc: ~3.2.0 + peerDependenciesMeta: + '@ts-macro/tsc': + optional: true + '@typescript/native-preview': + optional: true + typescript: + optional: true + vue-tsc: + optional: true + rolldown@1.0.0-beta.52: resolution: {integrity: sha512-Hbnpljue+JhMJrlOjQ1ixp9me7sUec7OjFvS+A1Qm8k8Xyxmw3ZhxFu7LlSXW1s9AX3POE9W9o2oqCEeR5uDmg==} engines: {node: ^20.19.0 || >=22.12.0} @@ -5444,6 +5596,11 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + rolldown@1.0.0-rc.9: + resolution: {integrity: sha512-9EbgWge7ZH+yqb4d2EnELAntgPTWbfL8ajiTW+SyhJEC4qhBbkCKbqFV4Ge4zmu5ziQuVbWxb/XwLZ+RIO7E8Q==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + rollup@4.59.0: resolution: {integrity: sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -5730,6 +5887,10 @@ packages: resolution: {integrity: sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==} engines: {node: '>=18'} + tinyexec@1.0.4: + resolution: {integrity: sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==} + engines: {node: '>=18'} + tinyglobby@0.2.15: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} @@ -5867,6 +6028,34 @@ packages: unplugin-unused: optional: true + tsdown@0.21.4: + resolution: {integrity: sha512-Q/kBi8SXkr4X6JI/NAZKZY1UuiEcbuXtIskL4tZCsgpDiEPM/2W6lC+OonNA31S+V3KsWedFvbFDBs23hvt+Aw==} + engines: {node: '>=20.19.0'} + hasBin: true + peerDependencies: + '@arethetypeswrong/core': ^0.18.1 + '@tsdown/css': 0.21.4 + '@tsdown/exe': 0.21.4 + '@vitejs/devtools': '*' + publint: ^0.3.0 + typescript: ^5.0.0 + unplugin-unused: ^0.5.0 + peerDependenciesMeta: + '@arethetypeswrong/core': + optional: true + '@tsdown/css': + optional: true + '@tsdown/exe': + optional: true + '@vitejs/devtools': + optional: true + publint: + optional: true + typescript: + optional: true + unplugin-unused: + optional: true + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -6023,6 +6212,16 @@ packages: synckit: optional: true + unrun@0.2.32: + resolution: {integrity: sha512-opd3z6791rf281JdByf0RdRQrpcc7WyzqittqIXodM/5meNWdTwrVxeyzbaCp4/Rgls/um14oUaif1gomO8YGg==} + engines: {node: '>=20.19.0'} + hasBin: true + peerDependencies: + synckit: ^0.11.11 + peerDependenciesMeta: + synckit: + optional: true + update-browserslist-db@1.2.3: resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} hasBin: true @@ -6341,6 +6540,15 @@ snapshots: '@jridgewell/trace-mapping': 0.3.31 jsesc: 3.1.0 + '@babel/generator@8.0.0-rc.2': + dependencies: + '@babel/parser': 8.0.0-rc.2 + '@babel/types': 8.0.0-rc.2 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + '@types/jsesc': 2.5.1 + jsesc: 3.1.0 + '@babel/helper-compilation-targets@7.28.6': dependencies: '@babel/compat-data': 7.29.0 @@ -6371,8 +6579,12 @@ snapshots: '@babel/helper-string-parser@7.27.1': {} + '@babel/helper-string-parser@8.0.0-rc.3': {} + '@babel/helper-validator-identifier@7.28.5': {} + '@babel/helper-validator-identifier@8.0.0-rc.2': {} + '@babel/helper-validator-option@7.27.1': {} '@babel/helpers@7.28.6': @@ -6384,6 +6596,10 @@ snapshots: dependencies: '@babel/types': 7.29.0 + '@babel/parser@8.0.0-rc.2': + dependencies: + '@babel/types': 8.0.0-rc.2 + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.29.0)': dependencies: '@babel/core': 7.29.0 @@ -6504,6 +6720,11 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 + '@babel/types@8.0.0-rc.2': + dependencies: + '@babel/helper-string-parser': 8.0.0-rc.3 + '@babel/helper-validator-identifier': 8.0.0-rc.2 + '@bcoe/v8-coverage@0.2.3': {} '@biomejs/biome@2.4.4': @@ -7409,6 +7630,8 @@ snapshots: '@oxc-project/types@0.114.0': {} + '@oxc-project/types@0.115.0': {} + '@oxc-project/types@0.99.0': {} '@pkgjs/parseargs@0.11.0': @@ -7808,6 +8031,9 @@ snapshots: '@rolldown/binding-android-arm64@1.0.0-rc.5': optional: true + '@rolldown/binding-android-arm64@1.0.0-rc.9': + optional: true + '@rolldown/binding-darwin-arm64@1.0.0-beta.52': optional: true @@ -7817,6 +8043,9 @@ snapshots: '@rolldown/binding-darwin-arm64@1.0.0-rc.5': optional: true + '@rolldown/binding-darwin-arm64@1.0.0-rc.9': + optional: true + '@rolldown/binding-darwin-x64@1.0.0-beta.52': optional: true @@ -7826,6 +8055,9 @@ snapshots: '@rolldown/binding-darwin-x64@1.0.0-rc.5': optional: true + '@rolldown/binding-darwin-x64@1.0.0-rc.9': + optional: true + '@rolldown/binding-freebsd-x64@1.0.0-beta.52': optional: true @@ -7835,6 +8067,9 @@ snapshots: '@rolldown/binding-freebsd-x64@1.0.0-rc.5': optional: true + '@rolldown/binding-freebsd-x64@1.0.0-rc.9': + optional: true + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.52': optional: true @@ -7844,6 +8079,9 @@ snapshots: '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.5': optional: true + '@rolldown/binding-linux-arm-gnueabihf@1.0.0-rc.9': + optional: true + '@rolldown/binding-linux-arm64-gnu@1.0.0-beta.52': optional: true @@ -7853,6 +8091,9 @@ snapshots: '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.5': optional: true + '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.9': + optional: true + '@rolldown/binding-linux-arm64-musl@1.0.0-beta.52': optional: true @@ -7862,6 +8103,15 @@ snapshots: '@rolldown/binding-linux-arm64-musl@1.0.0-rc.5': optional: true + '@rolldown/binding-linux-arm64-musl@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.9': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.9': + optional: true + '@rolldown/binding-linux-x64-gnu@1.0.0-beta.52': optional: true @@ -7871,6 +8121,9 @@ snapshots: '@rolldown/binding-linux-x64-gnu@1.0.0-rc.5': optional: true + '@rolldown/binding-linux-x64-gnu@1.0.0-rc.9': + optional: true + '@rolldown/binding-linux-x64-musl@1.0.0-beta.52': optional: true @@ -7880,6 +8133,9 @@ snapshots: '@rolldown/binding-linux-x64-musl@1.0.0-rc.5': optional: true + '@rolldown/binding-linux-x64-musl@1.0.0-rc.9': + optional: true + '@rolldown/binding-openharmony-arm64@1.0.0-beta.52': optional: true @@ -7889,6 +8145,9 @@ snapshots: '@rolldown/binding-openharmony-arm64@1.0.0-rc.5': optional: true + '@rolldown/binding-openharmony-arm64@1.0.0-rc.9': + optional: true + '@rolldown/binding-wasm32-wasi@1.0.0-beta.52': dependencies: '@napi-rs/wasm-runtime': 1.1.1 @@ -7904,6 +8163,11 @@ snapshots: '@napi-rs/wasm-runtime': 1.1.1 optional: true + '@rolldown/binding-wasm32-wasi@1.0.0-rc.9': + dependencies: + '@napi-rs/wasm-runtime': 1.1.1 + optional: true + '@rolldown/binding-win32-arm64-msvc@1.0.0-beta.52': optional: true @@ -7913,6 +8177,9 @@ snapshots: '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.5': optional: true + '@rolldown/binding-win32-arm64-msvc@1.0.0-rc.9': + optional: true + '@rolldown/binding-win32-ia32-msvc@1.0.0-beta.52': optional: true @@ -7925,6 +8192,9 @@ snapshots: '@rolldown/binding-win32-x64-msvc@1.0.0-rc.5': optional: true + '@rolldown/binding-win32-x64-msvc@1.0.0-rc.9': + optional: true + '@rolldown/pluginutils@1.0.0-beta.52': {} '@rolldown/pluginutils@1.0.0-beta.53': {} @@ -7933,6 +8203,8 @@ snapshots: '@rolldown/pluginutils@1.0.0-rc.5': {} + '@rolldown/pluginutils@1.0.0-rc.9': {} + '@rollup/plugin-babel@6.1.0(@babel/core@7.29.0)(@types/babel__core@7.20.5)(rollup@4.59.0)': dependencies: '@babel/core': 7.29.0 @@ -8418,6 +8690,8 @@ snapshots: expect: 30.2.0 pretty-format: 30.2.0 + '@types/jsesc@2.5.1': {} + '@types/json-schema@7.0.15': {} '@types/json5@0.0.29': {} @@ -8852,6 +9126,12 @@ snapshots: '@babel/parser': 7.29.0 pathe: 2.0.3 + ast-kit@3.0.0-beta.1: + dependencies: + '@babel/parser': 8.0.0-rc.2 + estree-walker: 3.0.3 + pathe: 2.0.3 + ast-types-flow@0.0.8: {} ast-types@0.16.1: @@ -8993,6 +9273,8 @@ snapshots: cac@6.7.14: {} + cac@7.0.0: {} + call-bind-apply-helpers@1.0.2: dependencies: es-errors: 1.3.0 @@ -10129,6 +10411,8 @@ snapshots: hookable@5.5.3: {} + hookable@6.1.0: {} + html-escaper@2.0.2: {} html-void-elements@3.0.0: {} @@ -11952,6 +12236,23 @@ snapshots: transitivePeerDependencies: - oxc-resolver + rolldown-plugin-dts@0.22.5(rolldown@1.0.0-rc.9)(typescript@5.9.3): + dependencies: + '@babel/generator': 8.0.0-rc.2 + '@babel/helper-validator-identifier': 8.0.0-rc.2 + '@babel/parser': 8.0.0-rc.2 + '@babel/types': 8.0.0-rc.2 + ast-kit: 3.0.0-beta.1 + birpc: 4.0.0 + dts-resolver: 2.1.3 + get-tsconfig: 4.13.6 + obug: 2.1.1 + rolldown: 1.0.0-rc.9 + optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - oxc-resolver + rolldown@1.0.0-beta.52: dependencies: '@oxc-project/types': 0.99.0 @@ -12010,6 +12311,27 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.5 '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.5 + rolldown@1.0.0-rc.9: + dependencies: + '@oxc-project/types': 0.115.0 + '@rolldown/pluginutils': 1.0.0-rc.9 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.0-rc.9 + '@rolldown/binding-darwin-arm64': 1.0.0-rc.9 + '@rolldown/binding-darwin-x64': 1.0.0-rc.9 + '@rolldown/binding-freebsd-x64': 1.0.0-rc.9 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.0-rc.9 + '@rolldown/binding-linux-arm64-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-arm64-musl': 1.0.0-rc.9 + '@rolldown/binding-linux-ppc64-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-s390x-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-x64-gnu': 1.0.0-rc.9 + '@rolldown/binding-linux-x64-musl': 1.0.0-rc.9 + '@rolldown/binding-openharmony-arm64': 1.0.0-rc.9 + '@rolldown/binding-wasm32-wasi': 1.0.0-rc.9 + '@rolldown/binding-win32-arm64-msvc': 1.0.0-rc.9 + '@rolldown/binding-win32-x64-msvc': 1.0.0-rc.9 + rollup@4.59.0: dependencies: '@types/estree': 1.0.8 @@ -12380,6 +12702,8 @@ snapshots: tinyexec@1.0.2: {} + tinyexec@1.0.4: {} + tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) @@ -12546,6 +12870,33 @@ snapshots: - synckit - vue-tsc + tsdown@0.21.4(synckit@0.11.12)(typescript@5.9.3): + dependencies: + ansis: 4.2.0 + cac: 7.0.0 + defu: 6.1.4 + empathic: 2.0.0 + hookable: 6.1.0 + import-without-cache: 0.2.5 + obug: 2.1.1 + picomatch: 4.0.3 + rolldown: 1.0.0-rc.9 + rolldown-plugin-dts: 0.22.5(rolldown@1.0.0-rc.9)(typescript@5.9.3) + semver: 7.7.4 + tinyexec: 1.0.4 + tinyglobby: 0.2.15 + tree-kill: 1.2.2 + unconfig-core: 7.5.0 + unrun: 0.2.32(synckit@0.11.12) + optionalDependencies: + typescript: 5.9.3 + transitivePeerDependencies: + - '@ts-macro/tsc' + - '@typescript/native-preview' + - oxc-resolver + - synckit + - vue-tsc + tslib@2.8.1: {} tsx@4.21.0: @@ -12743,6 +13094,12 @@ snapshots: optionalDependencies: synckit: 0.11.12 + unrun@0.2.32(synckit@0.11.12): + dependencies: + rolldown: 1.0.0-rc.9 + optionalDependencies: + synckit: 0.11.12 + update-browserslist-db@1.2.3(browserslist@4.28.1): dependencies: browserslist: 4.28.1 diff --git a/sdk/packages/node/iii-example/package.json b/sdk/packages/node/iii-example/package.json index ed597742f..41e6c1c37 100644 --- a/sdk/packages/node/iii-example/package.json +++ b/sdk/packages/node/iii-example/package.json @@ -7,7 +7,8 @@ "dev": "bun src/index.ts" }, "dependencies": { - "iii-sdk": "workspace:*" + "iii-sdk": "workspace:*", + "zod": "^4.3.6" }, "devDependencies": { "@types/node": "^24.10.1", diff --git a/sdk/packages/node/iii-example/src/iii-zod-example.ts b/sdk/packages/node/iii-example/src/iii-zod-example.ts new file mode 100644 index 000000000..ec34c21c3 --- /dev/null +++ b/sdk/packages/node/iii-example/src/iii-zod-example.ts @@ -0,0 +1,25 @@ +import { toJSONSchema, z } from 'zod' +import { iii } from './iii' + +const inputSchema = z.object({ + scope: z.string(), + key: z.string(), +}) + +const outputSchema = z.object({ + value: z.string(), +}) + +async function helloWorld(input: z.infer): Promise> { + return { value: `${input.scope}::${input.key}` } +} + +iii.registerFunction( + { + id: 'example::hello-world', + description: 'description', + request_format: toJSONSchema(inputSchema), + response_format: toJSONSchema(outputSchema), + }, + helloWorld, +) diff --git a/sdk/packages/node/iii-example/src/iii.ts b/sdk/packages/node/iii-example/src/iii.ts index e5d2f99b1..caf68832e 100644 --- a/sdk/packages/node/iii-example/src/iii.ts +++ b/sdk/packages/node/iii-example/src/iii.ts @@ -1,6 +1,7 @@ import { registerWorker } from 'iii-sdk' import { version } from '../package.json' +/** @ts-expect-error process.env is not typed */ // Engine WebSocket URL - used for both III and telemetry const engineWsUrl = process.env.III_URL ?? 'ws://localhost:49134' diff --git a/sdk/packages/node/iii-example/src/index.ts b/sdk/packages/node/iii-example/src/index.ts index 7455c70f8..869d59efe 100644 --- a/sdk/packages/node/iii-example/src/index.ts +++ b/sdk/packages/node/iii-example/src/index.ts @@ -101,40 +101,34 @@ useApi( }, ) -useApi( - { api_path: 'state', http_method: 'POST', description: 'Set application state' }, - async (req, logger) => { - logger.info('Creating new todo', { body: req.body }) +useApi({ api_path: 'state', http_method: 'POST', description: 'Set application state' }, async (req, logger) => { + logger.info('Creating new todo', { body: req.body }) - const { description, dueDate } = req.body - const todoId = `todo-${Date.now()}-${Math.random().toString(36).substring(2, 9)}` + const { description, dueDate } = req.body + const todoId = `todo-${Date.now()}-${Math.random().toString(36).substring(2, 9)}` - if (!description) { - return { status_code: 400, body: { error: 'Description is required' } } - } + if (!description) { + return { status_code: 400, body: { error: 'Description is required' } } + } - const newTodo: Todo = { - id: todoId, - description, - groupId: 'inbox', - createdAt: new Date().toISOString(), - dueDate: dueDate, - completedAt: null, - } - const todo = await state.set({ scope: 'todo', key: todoId, data: newTodo }) + const newTodo: Todo = { + id: todoId, + description, + groupId: 'inbox', + createdAt: new Date().toISOString(), + dueDate: dueDate, + completedAt: null, + } + const todo = await state.set({ scope: 'todo', key: todoId, value: newTodo }) - return { status_code: 201, body: todo, headers: { 'Content-Type': 'application/json' } } - }, -) + return { status_code: 201, body: todo, headers: { 'Content-Type': 'application/json' } } +}) -useApi( - { api_path: 'state/:id', http_method: 'GET', description: 'Get state by ID' }, - async (req, logger) => { - logger.info('Getting todo', { ...req.path_params }) +useApi({ api_path: 'state/:id', http_method: 'GET', description: 'Get state by ID' }, async (req, logger) => { + logger.info('Getting todo', { ...req.path_params }) - const todoId = req.path_params.id - const todo = await state.get({ scope: 'todo', key: todoId }) + const todoId = req.path_params.id + const todo = await state.get({ scope: 'todo', key: todoId }) - return { status_code: 200, body: todo, headers: { 'Content-Type': 'application/json' } } - }, -) + return { status_code: 200, body: todo, headers: { 'Content-Type': 'application/json' } } +}) diff --git a/sdk/packages/node/iii-example/src/state.ts b/sdk/packages/node/iii-example/src/state.ts index 1c37c8999..62c1f00ef 100644 --- a/sdk/packages/node/iii-example/src/state.ts +++ b/sdk/packages/node/iii-example/src/state.ts @@ -1,4 +1,3 @@ -import { iii } from './iii' import type { IState, StateDeleteInput, @@ -10,6 +9,7 @@ import type { StateUpdateInput, StateUpdateResult, } from 'iii-sdk/state' +import { iii } from './iii' export const state: IState = { get: (input: StateGetInput): Promise => @@ -18,8 +18,7 @@ export const state: IState = { iii.trigger({ function_id: 'state::set', payload: input }), delete: (input: StateDeleteInput): Promise => iii.trigger({ function_id: 'state::delete', payload: input }), - list: (input: StateListInput): Promise => - iii.trigger({ function_id: 'state::list', payload: input }), + list: (input: StateListInput): Promise => iii.trigger({ function_id: 'state::list', payload: input }), update: (input: StateUpdateInput): Promise | null> => iii.trigger({ function_id: 'state::update', payload: input }), } diff --git a/sdk/packages/node/iii/package.json b/sdk/packages/node/iii/package.json index 7bb6882b7..21d1e309a 100644 --- a/sdk/packages/node/iii/package.json +++ b/sdk/packages/node/iii/package.json @@ -60,7 +60,7 @@ "devDependencies": { "@types/ws": "^8.18.1", "@vitest/coverage-v8": "^2.1.0", - "tsdown": "^0.17.0", + "tsdown": "^0.21.4", "typedoc": "^0.28.17", "typescript": "^5.9.3", "vitest": "^2.1.0" diff --git a/sdk/packages/node/iii/src/iii-types.ts b/sdk/packages/node/iii/src/iii-types.ts index e69273c55..f0d4598fb 100644 --- a/sdk/packages/node/iii/src/iii-types.ts +++ b/sdk/packages/node/iii/src/iii-types.ts @@ -84,7 +84,10 @@ export type HttpInvocationConfig = { } export type RegisterFunctionFormat = { - name: string + /** + * The name of the parameter + */ + name?: string /** * The description of the parameter */ @@ -96,7 +99,7 @@ export type RegisterFunctionFormat = { /** * The body of the parameter */ - body?: RegisterFunctionFormat[] + properties?: RegisterFunctionFormat[] /** * The items of the parameter */ diff --git a/sdk/packages/node/iii/tsdown.config.ts b/sdk/packages/node/iii/tsdown.config.ts index b72bce9a4..d68f9bfe7 100644 --- a/sdk/packages/node/iii/tsdown.config.ts +++ b/sdk/packages/node/iii/tsdown.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ dts: true, sourcemap: true, clean: true, - external: [], minify: false, treeshake: true, + deps: { neverBundle: [] }, }) From 5319fdc635a8273cfadfb02975d3ec94ae336d9a Mon Sep 17 00:00:00 2001 From: Sergio Marcelino Date: Tue, 24 Mar 2026 07:41:57 -0300 Subject: [PATCH 2/2] fix: update RegisterFunctionFormat type to use Record for properties and adjust zod import in examples --- sdk/packages/node/iii-example/src/iii-zod-example.ts | 6 +++--- sdk/packages/node/iii-example/src/index.ts | 1 + sdk/packages/node/iii/src/iii-types.ts | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sdk/packages/node/iii-example/src/iii-zod-example.ts b/sdk/packages/node/iii-example/src/iii-zod-example.ts index ec34c21c3..47f059c95 100644 --- a/sdk/packages/node/iii-example/src/iii-zod-example.ts +++ b/sdk/packages/node/iii-example/src/iii-zod-example.ts @@ -1,4 +1,4 @@ -import { toJSONSchema, z } from 'zod' +import { z } from 'zod' import { iii } from './iii' const inputSchema = z.object({ @@ -18,8 +18,8 @@ iii.registerFunction( { id: 'example::hello-world', description: 'description', - request_format: toJSONSchema(inputSchema), - response_format: toJSONSchema(outputSchema), + request_format: z.toJSONSchema(inputSchema), + response_format: z.toJSONSchema(outputSchema), }, helloWorld, ) diff --git a/sdk/packages/node/iii-example/src/index.ts b/sdk/packages/node/iii-example/src/index.ts index 869d59efe..e335de505 100644 --- a/sdk/packages/node/iii-example/src/index.ts +++ b/sdk/packages/node/iii-example/src/index.ts @@ -3,6 +3,7 @@ import { state } from './state' import { streams } from './stream' import type { Todo } from './types' import './http-example' +import './iii-zod-example' useApi( { diff --git a/sdk/packages/node/iii/src/iii-types.ts b/sdk/packages/node/iii/src/iii-types.ts index f0d4598fb..ea6cf1ec1 100644 --- a/sdk/packages/node/iii/src/iii-types.ts +++ b/sdk/packages/node/iii/src/iii-types.ts @@ -99,7 +99,7 @@ export type RegisterFunctionFormat = { /** * The body of the parameter */ - properties?: RegisterFunctionFormat[] + properties?: Record /** * The items of the parameter */ @@ -107,7 +107,7 @@ export type RegisterFunctionFormat = { /** * Whether the parameter is required */ - required?: boolean + required?: string[] } export type RegisterFunctionMessage = {