From e37f2d4dfb85ac94941afe3af69ca2bf6382eb9f Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Fri, 16 May 2025 07:13:12 -0700 Subject: [PATCH 01/13] test: Improve integration tests in Python (box/box-codegen#730) --- .codegen.json | 2 +- src/test/collections.generated.test.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.codegen.json b/.codegen.json index 4e9b95b8..77aa98d2 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "c6650a9", "specHash": "a8825be", "version": "1.15.1" } +{ "engineHash": "31cbd21", "specHash": "a8825be", "version": "1.15.1" } diff --git a/src/test/collections.generated.test.ts b/src/test/collections.generated.test.ts index f370c4a4..dfed0795 100644 --- a/src/test/collections.generated.test.ts +++ b/src/test/collections.generated.test.ts @@ -66,9 +66,7 @@ test('testCollections', async function testCollections(): Promise { } satisfies UpdateFolderByIdOptionalsInput); const collectionItemsAfterUpdate: ItemsOffsetPaginated = await client.collections.getCollectionItems(favouriteCollection.id!); - if ( - !(collectionItemsAfterUpdate.totalCount! == collectionItems.totalCount! + 1) - ) { + if (!(collectionItemsAfterUpdate.totalCount! > 0)) { throw new Error('Assertion failed'); } await client.folders.updateFolderById(folder.id, { From ca905388838f8d4d6956e165114b93db001f646e Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Fri, 16 May 2025 10:13:10 -0700 Subject: [PATCH 02/13] chore: Update .codegen.json with commit hash of codegen and openapi spec --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 77aa98d2..c7c78bd6 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "31cbd21", "specHash": "a8825be", "version": "1.15.1" } +{ "engineHash": "757e57a", "specHash": "a8825be", "version": "1.15.1" } From 3f7df711ba43063b7c2c1ea6d143c53852a2c6cd Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 20 May 2025 03:50:17 -0700 Subject: [PATCH 03/13] fix: Fix parsing `Date` into query parameters (box/box-codegen#729) --- .codegen.json | 2 +- docs/docgen.md | 6 +- package-lock.json | 190 +++++++++++++++--------------- src/test/docgen.generated.test.ts | 13 +- 4 files changed, 111 insertions(+), 100 deletions(-) diff --git a/.codegen.json b/.codegen.json index c7c78bd6..e22b9fd1 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "757e57a", "specHash": "a8825be", "version": "1.15.1" } +{ "engineHash": "0be574b", "specHash": "a8825be", "version": "1.15.1" } diff --git a/docs/docgen.md b/docs/docgen.md index 1e598be9..20280535 100644 --- a/docs/docgen.md +++ b/docs/docgen.md @@ -17,7 +17,7 @@ See the endpoint docs at ```ts -await client.docgen.getDocgenJobByIdV2025R0(docgenJobs.entries![0].id); +await client.docgen.getDocgenJobByIdV2025R0(docgenJobItemFromList.id); ``` ### Arguments @@ -45,7 +45,9 @@ See the endpoint docs at ```ts -await client.docgen.getDocgenJobsV2025R0(); +await client.docgen.getDocgenJobsV2025R0({ + limit: 500, +} satisfies GetDocgenJobsV2025R0QueryParams); ``` ### Arguments diff --git a/package-lock.json b/package-lock.json index 55677910..fa09ed90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1090,9 +1090,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.2.tgz", - "integrity": "sha512-JkdNEq+DFxZfUwxvB58tHMHBHVgX23ew41g1OQinthJ+ryhdRk67O31S7sYw8u2lTjHUPFxwar07BBt1KHp/hg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.0.tgz", + "integrity": "sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==", "cpu": [ "arm" ], @@ -1104,9 +1104,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.2.tgz", - "integrity": "sha512-13unNoZ8NzUmnndhPTkWPWbX3vtHodYmy+I9kuLxN+F+l+x3LdVF7UCu8TWVMt1POHLh6oDHhnOA04n8oJZhBw==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.0.tgz", + "integrity": "sha512-yDvqx3lWlcugozax3DItKJI5j05B0d4Kvnjx+5mwiUpWramVvmAByYigMplaoAQ3pvdprGCTCE03eduqE/8mPQ==", "cpu": [ "arm64" ], @@ -1118,9 +1118,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.2.tgz", - "integrity": "sha512-Gzf1Hn2Aoe8VZzevHostPX23U7N5+4D36WJNHK88NZHCJr7aVMG4fadqkIf72eqVPGjGc0HJHNuUaUcxiR+N/w==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.0.tgz", + "integrity": "sha512-2KOU574vD3gzcPSjxO0eyR5iWlnxxtmW1F5CkNOHmMlueKNCQkxR6+ekgWyVnz6zaZihpUNkGxjsYrkTJKhkaw==", "cpu": [ "arm64" ], @@ -1132,9 +1132,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.2.tgz", - "integrity": "sha512-47N4hxa01a4x6XnJoskMKTS8XZ0CZMd8YTbINbi+w03A2w4j1RTlnGHOz/P0+Bg1LaVL6ufZyNprSg+fW5nYQQ==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.0.tgz", + "integrity": "sha512-gE5ACNSxHcEZyP2BA9TuTakfZvULEW4YAOtxl/A/YDbIir/wPKukde0BNPlnBiP88ecaN4BJI2TtAd+HKuZPQQ==", "cpu": [ "x64" ], @@ -1146,9 +1146,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.2.tgz", - "integrity": "sha512-8t6aL4MD+rXSHHZUR1z19+9OFJ2rl1wGKvckN47XFRVO+QL/dUSpKA2SLRo4vMg7ELA8pzGpC+W9OEd1Z/ZqoQ==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.0.tgz", + "integrity": "sha512-GSxU6r5HnWij7FoSo7cZg3l5GPg4HFLkzsFFh0N/b16q5buW1NAWuCJ+HMtIdUEi6XF0qH+hN0TEd78laRp7Dg==", "cpu": [ "arm64" ], @@ -1160,9 +1160,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.2.tgz", - "integrity": "sha512-C+AyHBzfpsOEYRFjztcYUFsH4S7UsE9cDtHCtma5BK8+ydOZYgMmWg1d/4KBytQspJCld8ZIujFMAdKG1xyr4Q==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.0.tgz", + "integrity": "sha512-KGiGKGDg8qLRyOWmk6IeiHJzsN/OYxO6nSbT0Vj4MwjS2XQy/5emsmtoqLAabqrohbgLWJ5GV3s/ljdrIr8Qjg==", "cpu": [ "x64" ], @@ -1174,9 +1174,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.2.tgz", - "integrity": "sha512-de6TFZYIvJwRNjmW3+gaXiZ2DaWL5D5yGmSYzkdzjBDS3W+B9JQ48oZEsmMvemqjtAFzE16DIBLqd6IQQRuG9Q==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.0.tgz", + "integrity": "sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==", "cpu": [ "arm" ], @@ -1188,9 +1188,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.2.tgz", - "integrity": "sha512-urjaEZubdIkacKc930hUDOfQPysezKla/O9qV+O89enqsqUmQm8Xj8O/vh0gHg4LYfv7Y7UsE3QjzLQzDYN1qg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.0.tgz", + "integrity": "sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==", "cpu": [ "arm" ], @@ -1202,9 +1202,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.2.tgz", - "integrity": "sha512-KlE8IC0HFOC33taNt1zR8qNlBYHj31qGT1UqWqtvR/+NuCVhfufAq9fxO8BMFC22Wu0rxOwGVWxtCMvZVLmhQg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.0.tgz", + "integrity": "sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==", "cpu": [ "arm64" ], @@ -1216,9 +1216,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.2.tgz", - "integrity": "sha512-j8CgxvfM0kbnhu4XgjnCWJQyyBOeBI1Zq91Z850aUddUmPeQvuAy6OiMdPS46gNFgy8gN1xkYyLgwLYZG3rBOg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.0.tgz", + "integrity": "sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==", "cpu": [ "arm64" ], @@ -1230,9 +1230,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.2.tgz", - "integrity": "sha512-Ybc/1qUampKuRF4tQXc7G7QY9YRyeVSykfK36Y5Qc5dmrIxwFhrOzqaVTNoZygqZ1ZieSWTibfFhQ5qK8jpWxw==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.0.tgz", + "integrity": "sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==", "cpu": [ "loong64" ], @@ -1244,9 +1244,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.2.tgz", - "integrity": "sha512-3FCIrnrt03CCsZqSYAOW/k9n625pjpuMzVfeI+ZBUSDT3MVIFDSPfSUgIl9FqUftxcUXInvFah79hE1c9abD+Q==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.0.tgz", + "integrity": "sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==", "cpu": [ "ppc64" ], @@ -1258,9 +1258,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.2.tgz", - "integrity": "sha512-QNU7BFHEvHMp2ESSY3SozIkBPaPBDTsfVNGx3Xhv+TdvWXFGOSH2NJvhD1zKAT6AyuuErJgbdvaJhYVhVqrWTg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.0.tgz", + "integrity": "sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==", "cpu": [ "riscv64" ], @@ -1272,9 +1272,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.2.tgz", - "integrity": "sha512-5W6vNYkhgfh7URiXTO1E9a0cy4fSgfE4+Hl5agb/U1sa0kjOLMLC1wObxwKxecE17j0URxuTrYZZME4/VH57Hg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.0.tgz", + "integrity": "sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==", "cpu": [ "riscv64" ], @@ -1286,9 +1286,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.2.tgz", - "integrity": "sha512-B7LKIz+0+p348JoAL4X/YxGx9zOx3sR+o6Hj15Y3aaApNfAshK8+mWZEf759DXfRLeL2vg5LYJBB7DdcleYCoQ==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.0.tgz", + "integrity": "sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==", "cpu": [ "s390x" ], @@ -1300,9 +1300,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.2.tgz", - "integrity": "sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.0.tgz", + "integrity": "sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==", "cpu": [ "x64" ], @@ -1314,9 +1314,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.2.tgz", - "integrity": "sha512-tD46wKHd+KJvsmije4bUskNuvWKFcTOIM9tZ/RrmIvcXnbi0YK/cKS9FzFtAm7Oxi2EhV5N2OpfFB348vSQRXA==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.0.tgz", + "integrity": "sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==", "cpu": [ "x64" ], @@ -1328,9 +1328,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.2.tgz", - "integrity": "sha512-Bjv/HG8RRWLNkXwQQemdsWw4Mg+IJ29LK+bJPW2SCzPKOUaMmPEppQlu/Fqk1d7+DX3V7JbFdbkh/NMmurT6Pg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.0.tgz", + "integrity": "sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==", "cpu": [ "arm64" ], @@ -1342,9 +1342,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.2.tgz", - "integrity": "sha512-dt1llVSGEsGKvzeIO76HToiYPNPYPkmjhMHhP00T9S4rDern8P2ZWvWAQUEJ+R1UdMWJ/42i/QqJ2WV765GZcA==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.0.tgz", + "integrity": "sha512-tmazCrAsKzdkXssEc65zIE1oC6xPHwfy9d5Ta25SRCDOZS+I6RypVVShWALNuU9bxIfGA0aqrmzlzoM5wO5SPQ==", "cpu": [ "ia32" ], @@ -1356,9 +1356,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.2.tgz", - "integrity": "sha512-bwspbWB04XJpeElvsp+DCylKfF4trJDa2Y9Go8O6A7YLX2LIKGcNK/CYImJN6ZP4DcuOHB4Utl3iCbnR62DudA==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.0.tgz", + "integrity": "sha512-h1J+Yzjo/X+0EAvR2kIXJDuTuyT7drc+t2ALY0nIcGPbTatNOf0VWdhEA2Z4AAjv6X1NJV7SYo5oCTYRJhSlVA==", "cpu": [ "x64" ], @@ -1535,9 +1535,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "22.15.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.18.tgz", - "integrity": "sha512-v1DKRfUdyW+jJhZNEI1PYy29S2YRxMV5AOO/x/SjKmW0acCIOqmbj6Haf9eHAhsPmrhlHSxEhv/1WszcLWV4cg==", + "version": "22.15.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.19.tgz", + "integrity": "sha512-3vMNr4TzNQyjHcRZadojpRaD9Ofr6LsonZAoQ+HMUa/9ORTPoxVIw0e0mpqWpdjj8xybyCM+oKOUH2vwFu/oEw==", "dev": true, "license": "MIT", "dependencies": { @@ -5051,9 +5051,9 @@ } }, "node_modules/rollup": { - "version": "4.40.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.2.tgz", - "integrity": "sha512-tfUOg6DTP4rhQ3VjOO6B4wyrJnGOX85requAXvqYTHsOgb2TFJdZ3aWpT8W2kPoypSGP7dZUyzxJ9ee4buM5Fg==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz", + "integrity": "sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==", "dev": true, "license": "MIT", "dependencies": { @@ -5067,26 +5067,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.40.2", - "@rollup/rollup-android-arm64": "4.40.2", - "@rollup/rollup-darwin-arm64": "4.40.2", - "@rollup/rollup-darwin-x64": "4.40.2", - "@rollup/rollup-freebsd-arm64": "4.40.2", - "@rollup/rollup-freebsd-x64": "4.40.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.40.2", - "@rollup/rollup-linux-arm-musleabihf": "4.40.2", - "@rollup/rollup-linux-arm64-gnu": "4.40.2", - "@rollup/rollup-linux-arm64-musl": "4.40.2", - "@rollup/rollup-linux-loongarch64-gnu": "4.40.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.40.2", - "@rollup/rollup-linux-riscv64-gnu": "4.40.2", - "@rollup/rollup-linux-riscv64-musl": "4.40.2", - "@rollup/rollup-linux-s390x-gnu": "4.40.2", - "@rollup/rollup-linux-x64-gnu": "4.40.2", - "@rollup/rollup-linux-x64-musl": "4.40.2", - "@rollup/rollup-win32-arm64-msvc": "4.40.2", - "@rollup/rollup-win32-ia32-msvc": "4.40.2", - "@rollup/rollup-win32-x64-msvc": "4.40.2", + "@rollup/rollup-android-arm-eabi": "4.41.0", + "@rollup/rollup-android-arm64": "4.41.0", + "@rollup/rollup-darwin-arm64": "4.41.0", + "@rollup/rollup-darwin-x64": "4.41.0", + "@rollup/rollup-freebsd-arm64": "4.41.0", + "@rollup/rollup-freebsd-x64": "4.41.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.41.0", + "@rollup/rollup-linux-arm-musleabihf": "4.41.0", + "@rollup/rollup-linux-arm64-gnu": "4.41.0", + "@rollup/rollup-linux-arm64-musl": "4.41.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.41.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.41.0", + "@rollup/rollup-linux-riscv64-gnu": "4.41.0", + "@rollup/rollup-linux-riscv64-musl": "4.41.0", + "@rollup/rollup-linux-s390x-gnu": "4.41.0", + "@rollup/rollup-linux-x64-gnu": "4.41.0", + "@rollup/rollup-linux-x64-musl": "4.41.0", + "@rollup/rollup-win32-arm64-msvc": "4.41.0", + "@rollup/rollup-win32-ia32-msvc": "4.41.0", + "@rollup/rollup-win32-x64-msvc": "4.41.0", "fsevents": "~2.3.2" } }, @@ -5382,9 +5382,9 @@ } }, "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", + "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", "dev": true, "license": "MIT", "engines": { @@ -5580,9 +5580,9 @@ "license": "MIT" }, "node_modules/ts-jest": { - "version": "29.3.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.3.tgz", - "integrity": "sha512-y6jLm19SL4GroiBmHwFK4dSHUfDNmOrJbRfp6QmDIlI9p5tT5Q8ItccB4pTIslCIqOZuQnBwpTR0bQ5eUMYwkw==", + "version": "29.3.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.4.tgz", + "integrity": "sha512-Iqbrm8IXOmV+ggWHOTEbjwyCf2xZlUMv5npExksXohL+tk8va4Fjhb+X2+Rt9NBmgO7bJ8WpnMLOwih/DnMlFA==", "dev": true, "license": "MIT", "dependencies": { @@ -5819,9 +5819,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", - "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.3.tgz", + "integrity": "sha512-adBYQLivcg1jbdKEJeqScJJFvgm4qY9+3tXw+jdG6lkVeqRJEtiQmSWjmth8GKmDZuX7sYM4YFxQsf0AzMfGGw==", "dev": true, "license": "MIT", "peer": true, diff --git a/src/test/docgen.generated.test.ts b/src/test/docgen.generated.test.ts index 2fab6dc1..9ce0595c 100644 --- a/src/test/docgen.generated.test.ts +++ b/src/test/docgen.generated.test.ts @@ -20,6 +20,8 @@ import { serializeDocGenJobsV2025R0 } from '../schemas/v2025R0/docGenJobsV2025R0 import { deserializeDocGenJobsV2025R0 } from '../schemas/v2025R0/docGenJobsV2025R0.generated.js'; import { serializeDocGenJobsFullV2025R0 } from '../schemas/v2025R0/docGenJobsFullV2025R0.generated.js'; import { deserializeDocGenJobsFullV2025R0 } from '../schemas/v2025R0/docGenJobsFullV2025R0.generated.js'; +import { serializeDocGenJobFullV2025R0 } from '../schemas/v2025R0/docGenJobFullV2025R0.generated.js'; +import { deserializeDocGenJobFullV2025R0 } from '../schemas/v2025R0/docGenJobFullV2025R0.generated.js'; import { serializeDocGenJobV2025R0 } from '../schemas/v2025R0/docGenJobV2025R0.generated.js'; import { deserializeDocGenJobV2025R0 } from '../schemas/v2025R0/docGenJobV2025R0.generated.js'; import { BoxClient } from '../client.generated.js'; @@ -34,6 +36,8 @@ import { DocGenBatchCreateRequestV2025R0DestinationFolderField } from '../schema import { DocGenDocumentGenerationDataV2025R0 } from '../schemas/v2025R0/docGenDocumentGenerationDataV2025R0.generated.js'; import { DocGenJobsV2025R0 } from '../schemas/v2025R0/docGenJobsV2025R0.generated.js'; import { DocGenJobsFullV2025R0 } from '../schemas/v2025R0/docGenJobsFullV2025R0.generated.js'; +import { GetDocgenJobsV2025R0QueryParams } from '../managers/docgen.generated.js'; +import { DocGenJobFullV2025R0 } from '../schemas/v2025R0/docGenJobFullV2025R0.generated.js'; import { DocGenJobV2025R0 } from '../schemas/v2025R0/docGenJobV2025R0.generated.js'; import { getDefaultClient } from './commons.generated.js'; import { uploadNewFile } from './commons.generated.js'; @@ -103,7 +107,9 @@ test('testDocgenBatchAndJobs', async function testDocgenBatchAndJobs(): Promise< throw new Error('Assertion failed'); } const docgenJobs: DocGenJobsFullV2025R0 = - await client.docgen.getDocgenJobsV2025R0(); + await client.docgen.getDocgenJobsV2025R0({ + limit: 500, + } satisfies GetDocgenJobsV2025R0QueryParams); if (!(docgenJobs.entries!.length >= 1)) { throw new Error('Assertion failed'); } @@ -150,8 +156,11 @@ test('testDocgenBatchAndJobs', async function testDocgenBatchAndJobs(): Promise< if (!((toString(docgenJobs.entries![0].type) as string) == 'docgen_job')) { throw new Error('Assertion failed'); } + const indexOfItem: number = 0; + const docgenJobItemFromList: DocGenJobFullV2025R0 = + docgenJobs.entries![indexOfItem]; const docgenJob: DocGenJobV2025R0 = - await client.docgen.getDocgenJobByIdV2025R0(docgenJobs.entries![0].id); + await client.docgen.getDocgenJobByIdV2025R0(docgenJobItemFromList.id); if (!!(docgenJob.batch.id == '')) { throw new Error('Assertion failed'); } From 4af9073c473655606b9191541e724f801009fa0c Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 20 May 2025 07:13:03 -0700 Subject: [PATCH 04/13] chore: add deprecation warning for old tfms, fix packaging (box/box-codegen#733) --- .codegen.json | 2 +- package-lock.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.codegen.json b/.codegen.json index e22b9fd1..49064766 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "0be574b", "specHash": "a8825be", "version": "1.15.1" } +{ "engineHash": "fe574b1", "specHash": "a8825be", "version": "1.15.1" } diff --git a/package-lock.json b/package-lock.json index fa09ed90..8950870b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5840,9 +5840,9 @@ "license": "BSD-2-Clause" }, "node_modules/webpack": { - "version": "5.99.8", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.99.8.tgz", - "integrity": "sha512-lQ3CPiSTpfOnrEGeXDwoq5hIGzSjmwD72GdfVzF7CQAI7t47rJG9eDWvcEkEn3CUQymAElVvDg3YNTlCYj+qUQ==", + "version": "5.99.9", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.99.9.tgz", + "integrity": "sha512-brOPwM3JnmOa+7kd3NsmOUOwbDAj8FT9xDsG3IW0MgbN9yZV7Oi/s/+MNQ/EcSMqw7qfoRyXPoeEWT8zLVdVGg==", "dev": true, "license": "MIT", "peer": true, From feaf768b05c1507caf205848593e40f219e3e241 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 21 May 2025 04:23:31 -0700 Subject: [PATCH 05/13] feat: Support DateTime in Java (box/box-codegen#726) --- .codegen.json | 2 +- package-lock.json | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.codegen.json b/.codegen.json index 49064766..fb2c222b 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "fe574b1", "specHash": "a8825be", "version": "1.15.1" } +{ "engineHash": "56d8b65", "specHash": "a8825be", "version": "1.15.1" } diff --git a/package-lock.json b/package-lock.json index 8950870b..7b248e84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1535,9 +1535,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "22.15.19", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.19.tgz", - "integrity": "sha512-3vMNr4TzNQyjHcRZadojpRaD9Ofr6LsonZAoQ+HMUa/9ORTPoxVIw0e0mpqWpdjj8xybyCM+oKOUH2vwFu/oEw==", + "version": "22.15.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz", + "integrity": "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5819,9 +5819,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.3.tgz", - "integrity": "sha512-adBYQLivcg1jbdKEJeqScJJFvgm4qY9+3tXw+jdG6lkVeqRJEtiQmSWjmth8GKmDZuX7sYM4YFxQsf0AzMfGGw==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz", + "integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", "dev": true, "license": "MIT", "peer": true, From 2673a20942888ec3ba590f08e16fe6df0393db9c Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Fri, 23 May 2025 00:39:39 -0700 Subject: [PATCH 06/13] fix: Fix downscope token to use retrieveToken method for token retrieval (box/box-codegen#731) --- .codegen.json | 2 +- package-lock.json | 6 +- src/box/ccgAuth.generated.ts | 3 +- src/box/developerTokenAuth.generated.ts | 3 +- src/box/jwtAuth.generated.ts | 3 +- src/box/oauth.generated.ts | 3 +- src/test/auth.generated.test.ts | 83 +++++++++++++++++++++++++ src/test/events.generated.test.ts | 3 +- test-browser/sdkTest.config.mjs | 1 + 9 files changed, 98 insertions(+), 9 deletions(-) diff --git a/.codegen.json b/.codegen.json index fb2c222b..28ec15d7 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "56d8b65", "specHash": "a8825be", "version": "1.15.1" } +{ "engineHash": "20cb559", "specHash": "a8825be", "version": "1.15.1" } diff --git a/package-lock.json b/package-lock.json index 7b248e84..f9522601 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2612,9 +2612,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.155", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.155.tgz", - "integrity": "sha512-ps5KcGGmwL8VaeJlvlDlu4fORQpv3+GIcF5I3f9tUKUlJ/wsysh6HU8P5L1XWRYeXfA0oJd4PyM8ds8zTFf6Ng==", + "version": "1.5.157", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.157.tgz", + "integrity": "sha512-/0ybgsQd1muo8QlnuTpKwtl0oX5YMlUGbm8xyqgDU00motRkKFFbUJySAQBWcY79rVqNLWIWa87BGVGClwAB2w==", "dev": true, "license": "ISC" }, diff --git a/src/box/ccgAuth.generated.ts b/src/box/ccgAuth.generated.ts index 63fced7f..f28c35a3 100644 --- a/src/box/ccgAuth.generated.ts +++ b/src/box/ccgAuth.generated.ts @@ -202,7 +202,8 @@ export class BoxCcgAuth implements Authentication { sharedLink?: string, networkSession?: NetworkSession, ): Promise { - const token: undefined | AccessToken = await this.tokenStorage.get(); + const token: undefined | AccessToken = + await this.retrieveToken(networkSession); if (token == void 0) { throw new BoxSdkError({ message: diff --git a/src/box/developerTokenAuth.generated.ts b/src/box/developerTokenAuth.generated.ts index 463a345c..83c0e3a4 100644 --- a/src/box/developerTokenAuth.generated.ts +++ b/src/box/developerTokenAuth.generated.ts @@ -113,7 +113,8 @@ export class BoxDeveloperTokenAuth implements Authentication { sharedLink?: string, networkSession?: NetworkSession, ): Promise { - const token: undefined | AccessToken = await this.tokenStorage.get(); + const token: undefined | AccessToken = + await this.retrieveToken(networkSession); if (token == void 0 || token!.accessToken == void 0) { throw new BoxSdkError({ message: 'No access token is available.' }); } diff --git a/src/box/jwtAuth.generated.ts b/src/box/jwtAuth.generated.ts index 3be31bb1..5b85f2b0 100644 --- a/src/box/jwtAuth.generated.ts +++ b/src/box/jwtAuth.generated.ts @@ -374,7 +374,8 @@ export class BoxJwtAuth implements Authentication { sharedLink?: string, networkSession?: NetworkSession, ): Promise { - const token: undefined | AccessToken = await this.tokenStorage.get(); + const token: undefined | AccessToken = + await this.retrieveToken(networkSession); if (token == void 0) { throw new BoxSdkError({ message: diff --git a/src/box/oauth.generated.ts b/src/box/oauth.generated.ts index 14dd4bda..7f3c76c9 100644 --- a/src/box/oauth.generated.ts +++ b/src/box/oauth.generated.ts @@ -213,7 +213,8 @@ export class BoxOAuth implements Authentication { sharedLink?: string, networkSession?: NetworkSession, ): Promise { - const token: undefined | AccessToken = await this.tokenStorage.get(); + const token: undefined | AccessToken = + await this.retrieveToken(networkSession); if (token == void 0 || token!.accessToken == void 0) { throw new BoxSdkError({ message: 'No access token is available.' }); } diff --git a/src/test/auth.generated.test.ts b/src/test/auth.generated.test.ts index 3ee09092..b1cf0929 100644 --- a/src/test/auth.generated.test.ts +++ b/src/test/auth.generated.test.ts @@ -137,6 +137,32 @@ test('test_jwt_auth_downscope', async function test_jwt_auth_downscope(): Promis }).rejects.toThrow(); await parentClient.files.deleteFileById(file.id); }); +test('test_jwt_downscope_token_succeeds_if_no_token_available', async function test_jwt_downscope_token_succeeds_if_no_token_available(): Promise { + const jwtConfig: JwtConfig = JwtConfig.fromConfigJsonString( + decodeBase64(getEnvVar('JWT_CONFIG_BASE_64')), + ); + const auth: BoxJwtAuth = new BoxJwtAuth({ config: jwtConfig }); + const downscopedToken: AccessToken = await auth.downscopeToken([ + 'root_readonly', + ]); + if (!!(downscopedToken.accessToken == void 0)) { + throw new Error('Assertion failed'); + } + const downscopedClient: BoxClient = new BoxClient({ + auth: new BoxDeveloperTokenAuth({ token: downscopedToken.accessToken! }), + }); + await expect(async () => { + await downscopedClient.uploads.uploadFile({ + attributes: { + name: getUuid(), + parent: { + id: '0', + } satisfies UploadFileRequestBodyAttributesParentField, + } satisfies UploadFileRequestBodyAttributesField, + file: generateByteStream(1024 * 1024), + } satisfies UploadFileRequestBody); + }).rejects.toThrow(); +}); test('test_jwt_auth_revoke', async function test_jwt_auth_revoke(): Promise { const jwtConfig: JwtConfig = JwtConfig.fromConfigJsonString( decodeBase64(getEnvVar('JWT_CONFIG_BASE_64')), @@ -175,6 +201,19 @@ test('test_oauth_auth_authorizeUrl', function test_oauth_auth_authorizeUrl(): an throw new Error('Assertion failed'); } }); +test('test_oauth_downscope_token_succeeds_if_no_token_available', async function test_oauth_downscope_token_succeeds_if_no_token_available(): Promise { + const config: OAuthConfig = new OAuthConfig({ + clientId: getEnvVar('CLIENT_ID'), + clientSecret: getEnvVar('CLIENT_SECRET'), + }); + const auth: BoxOAuth = new BoxOAuth({ config: config }); + const resourcePath: string = ''.concat( + 'https://api.box.com/2.0/files/12345', + ) as string; + await expect(async () => { + await auth.downscopeToken(['item_rename', 'item_preview'], resourcePath); + }).rejects.toThrow(); +}); test('test_ccg_auth', async function test_ccg_auth(): Promise { const userId: string = getEnvVar('USER_ID'); const enterpriseId: string = getEnvVar('ENTERPRISE_ID'); @@ -240,6 +279,34 @@ test('test_ccg_auth_downscope', async function test_ccg_auth_downscope(): Promis }).rejects.toThrow(); await parentClient.folders.deleteFolderById(folder.id); }); +test('test_ccg_downscope_token_succeeds_if_no_token_available', async function test_ccg_downscope_token_succeeds_if_no_token_available(): Promise { + const ccgConfig: CcgConfig = new CcgConfig({ + clientId: getEnvVar('CLIENT_ID'), + clientSecret: getEnvVar('CLIENT_SECRET'), + userId: getEnvVar('USER_ID'), + }); + const auth: BoxCcgAuth = new BoxCcgAuth({ config: ccgConfig }); + const downscopedToken: AccessToken = await auth.downscopeToken([ + 'root_readonly', + ]); + if (!!(downscopedToken.accessToken == void 0)) { + throw new Error('Assertion failed'); + } + const downscopedClient: BoxClient = new BoxClient({ + auth: new BoxDeveloperTokenAuth({ token: downscopedToken.accessToken! }), + }); + await expect(async () => { + await downscopedClient.uploads.uploadFile({ + attributes: { + name: getUuid(), + parent: { + id: '0', + } satisfies UploadFileRequestBodyAttributesParentField, + } satisfies UploadFileRequestBodyAttributesField, + file: generateByteStream(1024 * 1024), + } satisfies UploadFileRequestBody); + }).rejects.toThrow(); +}); test('test_ccg_auth_revoke', async function test_ccg_auth_revoke(): Promise { const ccgConfig: CcgConfig = new CcgConfig({ clientId: getEnvVar('CLIENT_ID'), @@ -262,6 +329,22 @@ test('test_ccg_auth_revoke', async function test_ccg_auth_revoke(): Promise throw new Error('Assertion failed'); } }); +test('test_developer_downscope_token_succeeds_if_no_token_available', async function test_developer_downscope_token_succeeds_if_no_token_available(): Promise { + const developerTokenConfig: DeveloperTokenConfig = { + clientId: getEnvVar('CLIENT_ID'), + clientSecret: getEnvVar('CLIENT_SECRET'), + } satisfies DeveloperTokenConfig; + const auth: BoxDeveloperTokenAuth = new BoxDeveloperTokenAuth({ + token: '', + config: developerTokenConfig, + }); + const resourcePath: string = ''.concat( + 'https://api.box.com/2.0/folders/12345', + ) as string; + await expect(async () => { + await auth.downscopeToken(['item_rename', 'item_preview'], resourcePath); + }).rejects.toThrow(); +}); test('test_developer_token_auth_revoke', async function test_developer_token_auth_revoke(): Promise { const developerTokenConfig: DeveloperTokenConfig = { clientId: getEnvVar('CLIENT_ID'), diff --git a/src/test/events.generated.test.ts b/src/test/events.generated.test.ts index 144b29bd..fda73418 100644 --- a/src/test/events.generated.test.ts +++ b/src/test/events.generated.test.ts @@ -118,7 +118,8 @@ test('testEventSourceFileOrFolder', async function testEventSourceFileOrFolder() if ( !( (toString(source.type) as string) == 'file' || - (toString(source.type) as string) == 'folder' + (toString(source.type) as string) == 'folder' || + (toString(source.type) as string) == 'collaboration' ) ) { throw new Error('Assertion failed'); diff --git a/test-browser/sdkTest.config.mjs b/test-browser/sdkTest.config.mjs index 5048afce..06e11a5c 100644 --- a/test-browser/sdkTest.config.mjs +++ b/test-browser/sdkTest.config.mjs @@ -3,6 +3,7 @@ export const testConfig = { test_jwt_auth: 'skip', test_jwt_auth_downscope: 'skip', test_jwt_auth_revoke: 'skip', + test_jwt_downscope_token_succeeds_if_no_token_available: 'skip', // Unknown reason, these tests fail in browser testDocgenBatchAndJobs: 'skip', From 9ff4d9fb931f4a5548e740f975d4418f13b9bd78 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 27 May 2025 07:08:11 -0700 Subject: [PATCH 07/13] docs: legal holds param update (box/box-openapi#526) --- .codegen.json | 2 +- package-lock.json | 268 +++++++++--------- .../legalHoldPolicyAssignments.generated.ts | 18 +- src/schemas/aiAgentAsk.generated.ts | 46 +++ src/schemas/aiAgentExtract.generated.ts | 23 ++ .../aiAgentExtractStructured.generated.ts | 23 ++ 6 files changed, 244 insertions(+), 136 deletions(-) diff --git a/.codegen.json b/.codegen.json index 28ec15d7..f5ae4b96 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "20cb559", "specHash": "a8825be", "version": "1.15.1" } +{ "engineHash": "20cb559", "specHash": "2da99e0", "version": "1.15.1" } diff --git a/package-lock.json b/package-lock.json index f9522601..8656d3c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -67,9 +67,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.2.tgz", - "integrity": "sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.3.tgz", + "integrity": "sha512-V42wFfx1ymFte+ecf6iXghnnP8kWTO+ZLXIyZq+1LAXHHvTZdVxicn4yiVYdYMGaCO3tmqub11AorKkv+iodqw==", "dev": true, "license": "MIT", "engines": { @@ -77,22 +77,22 @@ } }, "node_modules/@babel/core": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz", - "integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.3.tgz", + "integrity": "sha512-hyrN8ivxfvJ4i0fIJuV4EOlV0WDMz5Ui4StRTgVaAvWeiRCilXgwVvxJKtFQ3TKtHgJscB2YiXKGNJuVwhQMtA==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.1", - "@babel/helper-compilation-targets": "^7.27.1", - "@babel/helper-module-transforms": "^7.27.1", - "@babel/helpers": "^7.27.1", - "@babel/parser": "^7.27.1", - "@babel/template": "^7.27.1", - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1", + "@babel/generator": "^7.27.3", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.3", + "@babel/parser": "^7.27.3", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.27.3", + "@babel/types": "^7.27.3", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -108,14 +108,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.1.tgz", - "integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", + "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.1", - "@babel/types": "^7.27.1", + "@babel/parser": "^7.27.3", + "@babel/types": "^7.27.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -156,15 +156,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz", - "integrity": "sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/traverse": "^7.27.3" }, "engines": { "node": ">=6.9.0" @@ -214,27 +214,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.1.tgz", - "integrity": "sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.3.tgz", + "integrity": "sha512-h/eKy9agOya1IGuLaZ9tEUgz+uIRXcbtOhRtUyyMf8JFmn1iT13vnl/IGVWSkdOCG/pC57U4S1jnAabAavTMwg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz", - "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.3.tgz", + "integrity": "sha512-xyYxRj6+tLNDTWi0KCBcZ9V7yg3/lwL9DWh9Uwh/RIVlIfFidggcgxKX3GCXwCiswwcGRawBKbEg2LG/Y8eJhw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.1" + "@babel/types": "^7.27.3" }, "bin": { "parser": "bin/babel-parser.js" @@ -498,17 +498,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.1.tgz", - "integrity": "sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.3.tgz", + "integrity": "sha512-lId/IfN/Ye1CIu8xG7oKBHXd2iNb2aW1ilPszzGcJug6M8RCKfVNcYhpI5+bMvFYjK7lXIM0R+a+6r8xhHp2FQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.1", - "@babel/parser": "^7.27.1", - "@babel/template": "^7.27.1", - "@babel/types": "^7.27.1", + "@babel/generator": "^7.27.3", + "@babel/parser": "^7.27.3", + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -517,9 +517,9 @@ } }, "node_modules/@babel/types": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz", - "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.3.tgz", + "integrity": "sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw==", "dev": true, "license": "MIT", "dependencies": { @@ -1090,9 +1090,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.0.tgz", - "integrity": "sha512-KxN+zCjOYHGwCl4UCtSfZ6jrq/qi88JDUtiEFk8LELEHq2Egfc/FgW+jItZiOLRuQfb/3xJSgFuNPC9jzggX+A==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.41.1.tgz", + "integrity": "sha512-NELNvyEWZ6R9QMkiytB4/L4zSEaBC03KIXEghptLGLZWJ6VPrL63ooZQCOnlx36aQPGhzuOMwDerC1Eb2VmrLw==", "cpu": [ "arm" ], @@ -1104,9 +1104,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.0.tgz", - "integrity": "sha512-yDvqx3lWlcugozax3DItKJI5j05B0d4Kvnjx+5mwiUpWramVvmAByYigMplaoAQ3pvdprGCTCE03eduqE/8mPQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.41.1.tgz", + "integrity": "sha512-DXdQe1BJ6TK47ukAoZLehRHhfKnKg9BjnQYUu9gzhI8Mwa1d2fzxA1aw2JixHVl403bwp1+/o/NhhHtxWJBgEA==", "cpu": [ "arm64" ], @@ -1118,9 +1118,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.0.tgz", - "integrity": "sha512-2KOU574vD3gzcPSjxO0eyR5iWlnxxtmW1F5CkNOHmMlueKNCQkxR6+ekgWyVnz6zaZihpUNkGxjsYrkTJKhkaw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.41.1.tgz", + "integrity": "sha512-5afxvwszzdulsU2w8JKWwY8/sJOLPzf0e1bFuvcW5h9zsEg+RQAojdW0ux2zyYAz7R8HvvzKCjLNJhVq965U7w==", "cpu": [ "arm64" ], @@ -1132,9 +1132,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.0.tgz", - "integrity": "sha512-gE5ACNSxHcEZyP2BA9TuTakfZvULEW4YAOtxl/A/YDbIir/wPKukde0BNPlnBiP88ecaN4BJI2TtAd+HKuZPQQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.41.1.tgz", + "integrity": "sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==", "cpu": [ "x64" ], @@ -1146,9 +1146,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.0.tgz", - "integrity": "sha512-GSxU6r5HnWij7FoSo7cZg3l5GPg4HFLkzsFFh0N/b16q5buW1NAWuCJ+HMtIdUEi6XF0qH+hN0TEd78laRp7Dg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.41.1.tgz", + "integrity": "sha512-DBVMZH5vbjgRk3r0OzgjS38z+atlupJ7xfKIDJdZZL6sM6wjfDNo64aowcLPKIx7LMQi8vybB56uh1Ftck/Atg==", "cpu": [ "arm64" ], @@ -1160,9 +1160,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.0.tgz", - "integrity": "sha512-KGiGKGDg8qLRyOWmk6IeiHJzsN/OYxO6nSbT0Vj4MwjS2XQy/5emsmtoqLAabqrohbgLWJ5GV3s/ljdrIr8Qjg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.41.1.tgz", + "integrity": "sha512-3FkydeohozEskBxNWEIbPfOE0aqQgB6ttTkJ159uWOFn42VLyfAiyD9UK5mhu+ItWzft60DycIN1Xdgiy8o/SA==", "cpu": [ "x64" ], @@ -1174,9 +1174,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.0.tgz", - "integrity": "sha512-46OzWeqEVQyX3N2/QdiU/CMXYDH/lSHpgfBkuhl3igpZiaB3ZIfSjKuOnybFVBQzjsLwkus2mjaESy8H41SzvA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.41.1.tgz", + "integrity": "sha512-wC53ZNDgt0pqx5xCAgNunkTzFE8GTgdZ9EwYGVcg+jEjJdZGtq9xPjDnFgfFozQI/Xm1mh+D9YlYtl+ueswNEg==", "cpu": [ "arm" ], @@ -1188,9 +1188,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.0.tgz", - "integrity": "sha512-lfgW3KtQP4YauqdPpcUZHPcqQXmTmH4nYU0cplNeW583CMkAGjtImw4PKli09NFi2iQgChk4e9erkwlfYem6Lg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.41.1.tgz", + "integrity": "sha512-jwKCca1gbZkZLhLRtsrka5N8sFAaxrGz/7wRJ8Wwvq3jug7toO21vWlViihG85ei7uJTpzbXZRcORotE+xyrLA==", "cpu": [ "arm" ], @@ -1202,9 +1202,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.0.tgz", - "integrity": "sha512-nn8mEyzMbdEJzT7cwxgObuwviMx6kPRxzYiOl6o/o+ChQq23gfdlZcUNnt89lPhhz3BYsZ72rp0rxNqBSfqlqw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.41.1.tgz", + "integrity": "sha512-g0UBcNknsmmNQ8V2d/zD2P7WWfJKU0F1nu0k5pW4rvdb+BIqMm8ToluW/eeRmxCared5dD76lS04uL4UaNgpNA==", "cpu": [ "arm64" ], @@ -1216,9 +1216,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.0.tgz", - "integrity": "sha512-l+QK99je2zUKGd31Gh+45c4pGDAqZSuWQiuRFCdHYC2CSiO47qUWsCcenrI6p22hvHZrDje9QjwSMAFL3iwXwQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.41.1.tgz", + "integrity": "sha512-XZpeGB5TKEZWzIrj7sXr+BEaSgo/ma/kCgrZgL0oo5qdB1JlTzIYQKel/RmhT6vMAvOdM2teYlAaOGJpJ9lahg==", "cpu": [ "arm64" ], @@ -1230,9 +1230,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.0.tgz", - "integrity": "sha512-WbnJaxPv1gPIm6S8O/Wg+wfE/OzGSXlBMbOe4ie+zMyykMOeqmgD1BhPxZQuDqwUN+0T/xOFtL2RUWBspnZj3w==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.41.1.tgz", + "integrity": "sha512-bkCfDJ4qzWfFRCNt5RVV4DOw6KEgFTUZi2r2RuYhGWC8WhCA8lCAJhDeAmrM/fdiAH54m0mA0Vk2FGRPyzI+tw==", "cpu": [ "loong64" ], @@ -1244,9 +1244,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.0.tgz", - "integrity": "sha512-eRDWR5t67/b2g8Q/S8XPi0YdbKcCs4WQ8vklNnUYLaSWF+Cbv2axZsp4jni6/j7eKvMLYCYdcsv8dcU+a6QNFg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.41.1.tgz", + "integrity": "sha512-3mr3Xm+gvMX+/8EKogIZSIEF0WUu0HL9di+YWlJpO8CQBnoLAEL/roTCxuLncEdgcfJcvA4UMOf+2dnjl4Ut1A==", "cpu": [ "ppc64" ], @@ -1258,9 +1258,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.0.tgz", - "integrity": "sha512-TWrZb6GF5jsEKG7T1IHwlLMDRy2f3DPqYldmIhnA2DVqvvhY2Ai184vZGgahRrg8k9UBWoSlHv+suRfTN7Ua4A==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.41.1.tgz", + "integrity": "sha512-3rwCIh6MQ1LGrvKJitQjZFuQnT2wxfU+ivhNBzmxXTXPllewOF7JR1s2vMX/tWtUYFgphygxjqMl76q4aMotGw==", "cpu": [ "riscv64" ], @@ -1272,9 +1272,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.0.tgz", - "integrity": "sha512-ieQljaZKuJpmWvd8gW87ZmSFwid6AxMDk5bhONJ57U8zT77zpZ/TPKkU9HpnnFrM4zsgr4kiGuzbIbZTGi7u9A==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.41.1.tgz", + "integrity": "sha512-LdIUOb3gvfmpkgFZuccNa2uYiqtgZAz3PTzjuM5bH3nvuy9ty6RGc/Q0+HDFrHrizJGVpjnTZ1yS5TNNjFlklw==", "cpu": [ "riscv64" ], @@ -1286,9 +1286,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.0.tgz", - "integrity": "sha512-/L3pW48SxrWAlVsKCN0dGLB2bi8Nv8pr5S5ocSM+S0XCn5RCVCXqi8GVtHFsOBBCSeR+u9brV2zno5+mg3S4Aw==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.41.1.tgz", + "integrity": "sha512-oIE6M8WC9ma6xYqjvPhzZYk6NbobIURvP/lEbh7FWplcMO6gn7MM2yHKA1eC/GvYwzNKK/1LYgqzdkZ8YFxR8g==", "cpu": [ "s390x" ], @@ -1300,9 +1300,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.0.tgz", - "integrity": "sha512-XMLeKjyH8NsEDCRptf6LO8lJk23o9wvB+dJwcXMaH6ZQbbkHu2dbGIUindbMtRN6ux1xKi16iXWu6q9mu7gDhQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.41.1.tgz", + "integrity": "sha512-cWBOvayNvA+SyeQMp79BHPK8ws6sHSsYnK5zDcsC3Hsxr1dgTABKjMnMslPq1DvZIp6uO7kIWhiGwaTdR4Og9A==", "cpu": [ "x64" ], @@ -1314,9 +1314,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.0.tgz", - "integrity": "sha512-m/P7LycHZTvSQeXhFmgmdqEiTqSV80zn6xHaQ1JSqwCtD1YGtwEK515Qmy9DcB2HK4dOUVypQxvhVSy06cJPEg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.41.1.tgz", + "integrity": "sha512-y5CbN44M+pUCdGDlZFzGGBSKCA4A/J2ZH4edTYSSxFg7ce1Xt3GtydbVKWLlzL+INfFIZAEg1ZV6hh9+QQf9YQ==", "cpu": [ "x64" ], @@ -1328,9 +1328,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.0.tgz", - "integrity": "sha512-4yodtcOrFHpbomJGVEqZ8fzD4kfBeCbpsUy5Pqk4RluXOdsWdjLnjhiKy2w3qzcASWd04fp52Xz7JKarVJ5BTg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.41.1.tgz", + "integrity": "sha512-lZkCxIrjlJlMt1dLO/FbpZbzt6J/A8p4DnqzSa4PWqPEUUUnzXLeki/iyPLfV0BmHItlYgHUqJe+3KiyydmiNQ==", "cpu": [ "arm64" ], @@ -1342,9 +1342,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.0.tgz", - "integrity": "sha512-tmazCrAsKzdkXssEc65zIE1oC6xPHwfy9d5Ta25SRCDOZS+I6RypVVShWALNuU9bxIfGA0aqrmzlzoM5wO5SPQ==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.41.1.tgz", + "integrity": "sha512-+psFT9+pIh2iuGsxFYYa/LhS5MFKmuivRsx9iPJWNSGbh2XVEjk90fmpUEjCnILPEPJnikAU6SFDiEUyOv90Pg==", "cpu": [ "ia32" ], @@ -1356,9 +1356,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.0.tgz", - "integrity": "sha512-h1J+Yzjo/X+0EAvR2kIXJDuTuyT7drc+t2ALY0nIcGPbTatNOf0VWdhEA2Z4AAjv6X1NJV7SYo5oCTYRJhSlVA==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.41.1.tgz", + "integrity": "sha512-Wq2zpapRYLfi4aKxf2Xff0tN+7slj2d4R87WEzqw7ZLsVvO5zwYCIuEGSZYiK41+GlwUo1HiR+GdkLEJnCKTCw==", "cpu": [ "x64" ], @@ -2612,9 +2612,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.157", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.157.tgz", - "integrity": "sha512-/0ybgsQd1muo8QlnuTpKwtl0oX5YMlUGbm8xyqgDU00motRkKFFbUJySAQBWcY79rVqNLWIWa87BGVGClwAB2w==", + "version": "1.5.158", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.158.tgz", + "integrity": "sha512-9vcp2xHhkvraY6AHw2WMi+GDSLPX42qe2xjYaVoZqFRJiOcilVQFq9mZmpuHEQpzlgGDelKlV7ZiGcmMsc8WxQ==", "dev": true, "license": "ISC" }, @@ -5051,9 +5051,9 @@ } }, "node_modules/rollup": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.0.tgz", - "integrity": "sha512-HqMFpUbWlf/tvcxBFNKnJyzc7Lk+XO3FGc3pbNBLqEbOz0gPLRgcrlS3UF4MfUrVlstOaP/q0kM6GVvi+LrLRg==", + "version": "4.41.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.41.1.tgz", + "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", "dev": true, "license": "MIT", "dependencies": { @@ -5067,26 +5067,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.41.0", - "@rollup/rollup-android-arm64": "4.41.0", - "@rollup/rollup-darwin-arm64": "4.41.0", - "@rollup/rollup-darwin-x64": "4.41.0", - "@rollup/rollup-freebsd-arm64": "4.41.0", - "@rollup/rollup-freebsd-x64": "4.41.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.41.0", - "@rollup/rollup-linux-arm-musleabihf": "4.41.0", - "@rollup/rollup-linux-arm64-gnu": "4.41.0", - "@rollup/rollup-linux-arm64-musl": "4.41.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.41.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.41.0", - "@rollup/rollup-linux-riscv64-gnu": "4.41.0", - "@rollup/rollup-linux-riscv64-musl": "4.41.0", - "@rollup/rollup-linux-s390x-gnu": "4.41.0", - "@rollup/rollup-linux-x64-gnu": "4.41.0", - "@rollup/rollup-linux-x64-musl": "4.41.0", - "@rollup/rollup-win32-arm64-msvc": "4.41.0", - "@rollup/rollup-win32-ia32-msvc": "4.41.0", - "@rollup/rollup-win32-x64-msvc": "4.41.0", + "@rollup/rollup-android-arm-eabi": "4.41.1", + "@rollup/rollup-android-arm64": "4.41.1", + "@rollup/rollup-darwin-arm64": "4.41.1", + "@rollup/rollup-darwin-x64": "4.41.1", + "@rollup/rollup-freebsd-arm64": "4.41.1", + "@rollup/rollup-freebsd-x64": "4.41.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.41.1", + "@rollup/rollup-linux-arm-musleabihf": "4.41.1", + "@rollup/rollup-linux-arm64-gnu": "4.41.1", + "@rollup/rollup-linux-arm64-musl": "4.41.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.41.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-gnu": "4.41.1", + "@rollup/rollup-linux-riscv64-musl": "4.41.1", + "@rollup/rollup-linux-s390x-gnu": "4.41.1", + "@rollup/rollup-linux-x64-gnu": "4.41.1", + "@rollup/rollup-linux-x64-musl": "4.41.1", + "@rollup/rollup-win32-arm64-msvc": "4.41.1", + "@rollup/rollup-win32-ia32-msvc": "4.41.1", + "@rollup/rollup-win32-x64-msvc": "4.41.1", "fsevents": "~2.3.2" } }, @@ -5392,9 +5392,9 @@ } }, "node_modules/terser": { - "version": "5.39.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.2.tgz", - "integrity": "sha512-yEPUmWve+VA78bI71BW70Dh0TuV4HHd+I5SHOAfS1+QBOmvmCiiffgjR8ryyEd3KIfvPGFqoADt8LdQ6XpXIvg==", + "version": "5.40.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.40.0.tgz", + "integrity": "sha512-cfeKl/jjwSR5ar7d0FGmave9hFGJT8obyo0z+CrQOylLDbk7X81nPU6vq9VORa5jU30SkDnT2FXjLbR8HLP+xA==", "dev": true, "license": "BSD-2-Clause", "peer": true, @@ -5889,9 +5889,9 @@ } }, "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.0.tgz", + "integrity": "sha512-77R0RDmJfj9dyv5p3bM5pOHa+X8/ZkO9c7kpDstigkC4nIDobadsfSGCwB4bKhMVxqAok8tajaoR8rirM7+VFQ==", "dev": true, "license": "MIT", "peer": true, diff --git a/src/managers/legalHoldPolicyAssignments.generated.ts b/src/managers/legalHoldPolicyAssignments.generated.ts index 1f8ffd33..3d0a14cc 100644 --- a/src/managers/legalHoldPolicyAssignments.generated.ts +++ b/src/managers/legalHoldPolicyAssignments.generated.ts @@ -179,6 +179,8 @@ export type GetLegalHoldPolicyAssignmentsQueryParamsAssignToTypeField = | 'file_version' | 'folder' | 'user' + | 'ownership' + | 'interactions' | string; export interface GetLegalHoldPolicyAssignmentsQueryParams { /** @@ -241,7 +243,9 @@ export type CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField = | 'file' | 'file_version' | 'folder' - | 'user'; + | 'user' + | 'ownership' + | 'interaction'; export interface CreateLegalHoldPolicyAssignmentRequestBodyAssignToField { /** * The type of item to assign the policy to */ @@ -684,6 +688,12 @@ export function deserializeGetLegalHoldPolicyAssignmentsQueryParamsAssignToTypeF if (val == 'user') { return val; } + if (val == 'ownership') { + return val; + } + if (val == 'interactions') { + return val; + } if (sdIsString(val)) { return val; } @@ -712,6 +722,12 @@ export function deserializeCreateLegalHoldPolicyAssignmentRequestBodyAssignToTyp if (val == 'user') { return val; } + if (val == 'ownership') { + return val; + } + if (val == 'interaction') { + return val; + } throw new BoxSdkError({ message: "Can't deserialize CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField", diff --git a/src/schemas/aiAgentAsk.generated.ts b/src/schemas/aiAgentAsk.generated.ts index 8afac483..0d0c761c 100644 --- a/src/schemas/aiAgentAsk.generated.ts +++ b/src/schemas/aiAgentAsk.generated.ts @@ -21,6 +21,8 @@ export class AiAgentAsk { readonly basicText?: AiAgentBasicTextTool; readonly longTextMulti?: AiAgentLongTextTool; readonly basicTextMulti?: AiAgentBasicTextTool; + readonly basicImage?: AiAgentBasicTextTool; + readonly basicImageMulti?: AiAgentBasicTextTool; readonly rawData?: SerializedData; constructor( fields: Omit & Partial>, @@ -40,6 +42,12 @@ export class AiAgentAsk { if (fields.basicTextMulti !== undefined) { this.basicTextMulti = fields.basicTextMulti; } + if (fields.basicImage !== undefined) { + this.basicImage = fields.basicImage; + } + if (fields.basicImageMulti !== undefined) { + this.basicImageMulti = fields.basicImageMulti; + } if (fields.rawData !== undefined) { this.rawData = fields.rawData; } @@ -53,6 +61,8 @@ export interface AiAgentAskInput { readonly basicText?: AiAgentBasicTextTool; readonly longTextMulti?: AiAgentLongTextTool; readonly basicTextMulti?: AiAgentBasicTextTool; + readonly basicImage?: AiAgentBasicTextTool; + readonly basicImageMulti?: AiAgentBasicTextTool; readonly rawData?: SerializedData; } export function serializeAiAgentAskTypeField( @@ -87,6 +97,14 @@ export function serializeAiAgentAsk(val: AiAgentAsk): SerializedData { val.basicTextMulti == void 0 ? val.basicTextMulti : serializeAiAgentBasicTextTool(val.basicTextMulti), + ['basic_image']: + val.basicImage == void 0 + ? val.basicImage + : serializeAiAgentBasicTextTool(val.basicImage), + ['basic_image_multi']: + val.basicImageMulti == void 0 + ? val.basicImageMulti + : serializeAiAgentBasicTextTool(val.basicImageMulti), }; } export function deserializeAiAgentAsk(val: SerializedData): AiAgentAsk { @@ -115,12 +133,22 @@ export function deserializeAiAgentAsk(val: SerializedData): AiAgentAsk { val.basic_text_multi == void 0 ? void 0 : deserializeAiAgentBasicTextTool(val.basic_text_multi); + const basicImage: undefined | AiAgentBasicTextTool = + val.basic_image == void 0 + ? void 0 + : deserializeAiAgentBasicTextTool(val.basic_image); + const basicImageMulti: undefined | AiAgentBasicTextTool = + val.basic_image_multi == void 0 + ? void 0 + : deserializeAiAgentBasicTextTool(val.basic_image_multi); return { type: type, longText: longText, basicText: basicText, longTextMulti: longTextMulti, basicTextMulti: basicTextMulti, + basicImage: basicImage, + basicImageMulti: basicImageMulti, } satisfies AiAgentAsk; } export function serializeAiAgentAskInput(val: AiAgentAskInput): SerializedData { @@ -143,6 +171,14 @@ export function serializeAiAgentAskInput(val: AiAgentAskInput): SerializedData { val.basicTextMulti == void 0 ? val.basicTextMulti : serializeAiAgentBasicTextTool(val.basicTextMulti), + ['basic_image']: + val.basicImage == void 0 + ? val.basicImage + : serializeAiAgentBasicTextTool(val.basicImage), + ['basic_image_multi']: + val.basicImageMulti == void 0 + ? val.basicImageMulti + : serializeAiAgentBasicTextTool(val.basicImageMulti), }; } export function deserializeAiAgentAskInput( @@ -169,11 +205,21 @@ export function deserializeAiAgentAskInput( val.basic_text_multi == void 0 ? void 0 : deserializeAiAgentBasicTextTool(val.basic_text_multi); + const basicImage: undefined | AiAgentBasicTextTool = + val.basic_image == void 0 + ? void 0 + : deserializeAiAgentBasicTextTool(val.basic_image); + const basicImageMulti: undefined | AiAgentBasicTextTool = + val.basic_image_multi == void 0 + ? void 0 + : deserializeAiAgentBasicTextTool(val.basic_image_multi); return { type: type, longText: longText, basicText: basicText, longTextMulti: longTextMulti, basicTextMulti: basicTextMulti, + basicImage: basicImage, + basicImageMulti: basicImageMulti, } satisfies AiAgentAskInput; } diff --git a/src/schemas/aiAgentExtract.generated.ts b/src/schemas/aiAgentExtract.generated.ts index ea985002..8eaf2229 100644 --- a/src/schemas/aiAgentExtract.generated.ts +++ b/src/schemas/aiAgentExtract.generated.ts @@ -20,6 +20,7 @@ export class AiAgentExtract { 'ai_agent_extract' as AiAgentExtractTypeField; readonly longText?: AiAgentLongTextTool; readonly basicText?: AiAgentBasicTextTool; + readonly basicImage?: AiAgentBasicTextTool; readonly rawData?: SerializedData; constructor( fields: Omit & @@ -34,6 +35,9 @@ export class AiAgentExtract { if (fields.basicText !== undefined) { this.basicText = fields.basicText; } + if (fields.basicImage !== undefined) { + this.basicImage = fields.basicImage; + } if (fields.rawData !== undefined) { this.rawData = fields.rawData; } @@ -45,6 +49,7 @@ export interface AiAgentExtractInput { readonly type?: AiAgentExtractTypeField; readonly longText?: AiAgentLongTextTool; readonly basicText?: AiAgentBasicTextTool; + readonly basicImage?: AiAgentBasicTextTool; readonly rawData?: SerializedData; } export function serializeAiAgentExtractTypeField( @@ -73,6 +78,10 @@ export function serializeAiAgentExtract(val: AiAgentExtract): SerializedData { val.basicText == void 0 ? val.basicText : serializeAiAgentBasicTextTool(val.basicText), + ['basic_image']: + val.basicImage == void 0 + ? val.basicImage + : serializeAiAgentBasicTextTool(val.basicImage), }; } export function deserializeAiAgentExtract(val: SerializedData): AiAgentExtract { @@ -95,10 +104,15 @@ export function deserializeAiAgentExtract(val: SerializedData): AiAgentExtract { val.basic_text == void 0 ? void 0 : deserializeAiAgentBasicTextTool(val.basic_text); + const basicImage: undefined | AiAgentBasicTextTool = + val.basic_image == void 0 + ? void 0 + : deserializeAiAgentBasicTextTool(val.basic_image); return { type: type, longText: longText, basicText: basicText, + basicImage: basicImage, } satisfies AiAgentExtract; } export function serializeAiAgentExtractInput( @@ -117,6 +131,10 @@ export function serializeAiAgentExtractInput( val.basicText == void 0 ? val.basicText : serializeAiAgentBasicTextTool(val.basicText), + ['basic_image']: + val.basicImage == void 0 + ? val.basicImage + : serializeAiAgentBasicTextTool(val.basicImage), }; } export function deserializeAiAgentExtractInput( @@ -137,9 +155,14 @@ export function deserializeAiAgentExtractInput( val.basic_text == void 0 ? void 0 : deserializeAiAgentBasicTextTool(val.basic_text); + const basicImage: undefined | AiAgentBasicTextTool = + val.basic_image == void 0 + ? void 0 + : deserializeAiAgentBasicTextTool(val.basic_image); return { type: type, longText: longText, basicText: basicText, + basicImage: basicImage, } satisfies AiAgentExtractInput; } diff --git a/src/schemas/aiAgentExtractStructured.generated.ts b/src/schemas/aiAgentExtractStructured.generated.ts index 47a1e9eb..d02b6bef 100644 --- a/src/schemas/aiAgentExtractStructured.generated.ts +++ b/src/schemas/aiAgentExtractStructured.generated.ts @@ -20,6 +20,7 @@ export class AiAgentExtractStructured { 'ai_agent_extract_structured' as AiAgentExtractStructuredTypeField; readonly longText?: AiAgentLongTextTool; readonly basicText?: AiAgentBasicTextTool; + readonly basicImage?: AiAgentBasicTextTool; readonly rawData?: SerializedData; constructor( fields: Omit & @@ -34,6 +35,9 @@ export class AiAgentExtractStructured { if (fields.basicText !== undefined) { this.basicText = fields.basicText; } + if (fields.basicImage !== undefined) { + this.basicImage = fields.basicImage; + } if (fields.rawData !== undefined) { this.rawData = fields.rawData; } @@ -45,6 +49,7 @@ export interface AiAgentExtractStructuredInput { readonly type?: AiAgentExtractStructuredTypeField; readonly longText?: AiAgentLongTextTool; readonly basicText?: AiAgentBasicTextTool; + readonly basicImage?: AiAgentBasicTextTool; readonly rawData?: SerializedData; } export function serializeAiAgentExtractStructuredTypeField( @@ -75,6 +80,10 @@ export function serializeAiAgentExtractStructured( val.basicText == void 0 ? val.basicText : serializeAiAgentBasicTextTool(val.basicText), + ['basic_image']: + val.basicImage == void 0 + ? val.basicImage + : serializeAiAgentBasicTextTool(val.basicImage), }; } export function deserializeAiAgentExtractStructured( @@ -101,10 +110,15 @@ export function deserializeAiAgentExtractStructured( val.basic_text == void 0 ? void 0 : deserializeAiAgentBasicTextTool(val.basic_text); + const basicImage: undefined | AiAgentBasicTextTool = + val.basic_image == void 0 + ? void 0 + : deserializeAiAgentBasicTextTool(val.basic_image); return { type: type, longText: longText, basicText: basicText, + basicImage: basicImage, } satisfies AiAgentExtractStructured; } export function serializeAiAgentExtractStructuredInput( @@ -123,6 +137,10 @@ export function serializeAiAgentExtractStructuredInput( val.basicText == void 0 ? val.basicText : serializeAiAgentBasicTextTool(val.basicText), + ['basic_image']: + val.basicImage == void 0 + ? val.basicImage + : serializeAiAgentBasicTextTool(val.basicImage), }; } export function deserializeAiAgentExtractStructuredInput( @@ -145,9 +163,14 @@ export function deserializeAiAgentExtractStructuredInput( val.basic_text == void 0 ? void 0 : deserializeAiAgentBasicTextTool(val.basic_text); + const basicImage: undefined | AiAgentBasicTextTool = + val.basic_image == void 0 + ? void 0 + : deserializeAiAgentBasicTextTool(val.basic_image); return { type: type, longText: longText, basicText: basicText, + basicImage: basicImage, } satisfies AiAgentExtractStructuredInput; } From ef3c4ff56e8924dcd92d034e06f815baf1e30c34 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 28 May 2025 02:09:47 -0700 Subject: [PATCH 08/13] fix: Fix issues in box-openapi (box/box-openapi#527) --- .codegen.json | 2 +- package-lock.json | 12 ++++++------ src/managers/files.generated.ts | 5 ++++- src/managers/folders.generated.ts | 22 ++++++++++++++++------ src/managers/uploads.generated.ts | 10 ++++++++-- 5 files changed, 35 insertions(+), 16 deletions(-) diff --git a/.codegen.json b/.codegen.json index f5ae4b96..6f4a2ac4 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "20cb559", "specHash": "2da99e0", "version": "1.15.1" } +{ "engineHash": "20cb559", "specHash": "a54170e", "version": "1.15.1" } diff --git a/package-lock.json b/package-lock.json index 8656d3c4..eb9bb2fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1535,9 +1535,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "22.15.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.21.tgz", - "integrity": "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ==", + "version": "22.15.23", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.23.tgz", + "integrity": "sha512-7Ec1zaFPF4RJ0eXu1YT/xgiebqwqoJz8rYPDi/O2BcZ++Wpt0Kq9cl0eg6NN6bYbPnR67ZLo7St5Q3UK0SnARw==", "dev": true, "license": "MIT", "dependencies": { @@ -2612,9 +2612,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.158", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.158.tgz", - "integrity": "sha512-9vcp2xHhkvraY6AHw2WMi+GDSLPX42qe2xjYaVoZqFRJiOcilVQFq9mZmpuHEQpzlgGDelKlV7ZiGcmMsc8WxQ==", + "version": "1.5.159", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.159.tgz", + "integrity": "sha512-CEvHptWAMV5p6GJ0Lq8aheyvVbfzVrv5mmidu1D3pidoVNkB3tTBsTMVtPJ+rzRK5oV229mCLz9Zj/hNvU8GBA==", "dev": true, "license": "ISC" }, diff --git a/src/managers/files.generated.ts b/src/managers/files.generated.ts index f2b93d83..f00baeb3 100644 --- a/src/managers/files.generated.ts +++ b/src/managers/files.generated.ts @@ -452,7 +452,10 @@ export interface UpdateFileByIdRequestBodyCollectionsField { export interface UpdateFileByIdRequestBody { /** * An optional different name for the file. This can be used to - * rename the file. */ + * rename the file. + * + * File names must be unique within their parent folder. The name check is case-insensitive, so a file + * named `New File` cannot be created in a parent folder that already contains a folder named `new file`. */ readonly name?: string; /** * The description for a file. This can be seen in the right-hand sidebar panel diff --git a/src/managers/folders.generated.ts b/src/managers/folders.generated.ts index 7aa6637f..517eeb3a 100644 --- a/src/managers/folders.generated.ts +++ b/src/managers/folders.generated.ts @@ -469,7 +469,16 @@ export interface UpdateFolderByIdRequestBodyCollectionsField { } export interface UpdateFolderByIdRequestBody { /** - * The optional new name for this folder. */ + * The optional new name for this folder. + * + * The following restrictions to folder names apply: names containing + * non-printable ASCII characters, forward and backward slashes + * (`/`, `\`), names with trailing spaces, and names `.` and `..` are + * not allowed. + * + * Folder names must be unique within their parent folder. The name check is case-insensitive, + * so a folder named `New Folder` cannot be created in a parent folder that already contains + * a folder named `new folder`. */ readonly name?: string; /** * The optional description of this folder */ @@ -811,13 +820,14 @@ export interface CreateFolderRequestBody { /** * The name for the new folder. * - * There are some restrictions to the file name. Names containing + * The following restrictions to folder names apply: names containing * non-printable ASCII characters, forward and backward slashes - * (`/`, `\`), as well as names with trailing spaces are - * prohibited. + * (`/`, `\`), names with trailing spaces, and names `.` and `..` are + * not allowed. * - * Additionally, the names `.` and `..` are - * not allowed either. */ + * Folder names must be unique within their parent folder. The name check is case-insensitive, + * so a folder named `New Folder` cannot be created in a parent folder that already contains + * a folder named `new folder`. */ readonly name: string; /** * The parent folder to create the new folder within. */ diff --git a/src/managers/uploads.generated.ts b/src/managers/uploads.generated.ts index 1526618f..723830c9 100644 --- a/src/managers/uploads.generated.ts +++ b/src/managers/uploads.generated.ts @@ -292,7 +292,10 @@ export interface UploadFileRequestBodyAttributesParentField { } export interface UploadFileRequestBodyAttributesField { /** - * The name of the file */ + * The name of the file. + * + * File names must be unique within their parent folder. The name check is case-insensitive, so a file + * named `New File` cannot be created in a parent folder that already contains a folder named `new file`. */ readonly name: string; /** * The parent folder to upload the file to */ @@ -396,7 +399,10 @@ export interface UploadWithPreflightCheckRequestBodyAttributesParentField { } export interface UploadWithPreflightCheckRequestBodyAttributesField { /** - * The name of the file */ + * The name of the file. + * + * File names must be unique within their parent folder. The name check is case-insensitive, so a file + * named `New File` cannot be created in a parent folder that already contains a folder named `new file`. */ readonly name: string; /** * The parent folder to upload the file to */ From ab80bd3a6a12a070a5162a33679779f5e137022e Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 28 May 2025 10:41:54 -0700 Subject: [PATCH 09/13] docs: Shield Lists documentation (box/box-openapi#528) --- .codegen.json | 2 +- docs/README.md | 1 + docs/shieldLists.md | 129 ++++ package-lock.json | 6 +- src/client.generated.ts | 7 + src/managers/shieldLists.generated.ts | 591 ++++++++++++++++++ ...ieldListContentCountryV2025R0.generated.ts | 167 +++++ ...hieldListContentDomainV2025R0.generated.ts | 163 +++++ ...shieldListContentEmailV2025R0.generated.ts | 167 +++++ ...ListContentIntegrationV2025R0.generated.ts | 201 ++++++ .../shieldListContentIpV2025R0.generated.ts | 166 +++++ ...ieldListContentRequestV2025R0.generated.ts | 66 ++ .../shieldListContentV2025R0.generated.ts | 74 +++ .../shieldListMiniV2025R0.generated.ts | 226 +++++++ .../v2025R0/shieldListV2025R0.generated.ts | 153 +++++ .../shieldListsCreateV2025R0.generated.ts | 72 +++ .../shieldListsUpdateV2025R0.generated.ts | 72 +++ .../v2025R0/shieldListsV2025R0.generated.ts | 56 ++ 18 files changed, 2315 insertions(+), 4 deletions(-) create mode 100644 docs/shieldLists.md create mode 100644 src/managers/shieldLists.generated.ts create mode 100644 src/schemas/v2025R0/shieldListContentCountryV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListContentDomainV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListContentEmailV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListContentIntegrationV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListContentIpV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListContentRequestV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListContentV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListMiniV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListsCreateV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListsUpdateV2025R0.generated.ts create mode 100644 src/schemas/v2025R0/shieldListsV2025R0.generated.ts diff --git a/.codegen.json b/.codegen.json index 6f4a2ac4..a7680394 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "20cb559", "specHash": "a54170e", "version": "1.15.1" } +{ "engineHash": "20cb559", "specHash": "630fc85", "version": "1.15.1" } diff --git a/docs/README.md b/docs/README.md index e3286b9c..c7794529 100644 --- a/docs/README.md +++ b/docs/README.md @@ -58,6 +58,7 @@ the SDK are available by topic: - [Shield information barrier segment restrictions](shieldInformationBarrierSegmentRestrictions.md) - [Shield information barrier segments](shieldInformationBarrierSegments.md) - [Shield information barriers](shieldInformationBarriers.md) +- [Shield lists](shieldLists.md) - [Sign requests](signRequests.md) - [Sign templates](signTemplates.md) - [Skills](skills.md) diff --git a/docs/shieldLists.md b/docs/shieldLists.md new file mode 100644 index 00000000..5f6d686e --- /dev/null +++ b/docs/shieldLists.md @@ -0,0 +1,129 @@ +# ShieldListsManager + +- [Get all shield lists in enterprise](#get-all-shield-lists-in-enterprise) +- [Create shield list](#create-shield-list) +- [Get single shield list by shield list id](#get-single-shield-list-by-shield-list-id) +- [Delete single shield list by shield list id](#delete-single-shield-list-by-shield-list-id) +- [Update shield list](#update-shield-list) + +## Get all shield lists in enterprise + +Retrieves all shield lists in the enterprise. + +This operation is performed by calling function `getShieldListsV2025R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2025.0/get-shield-lists/). + +_Currently we don't have an example for calling `getShieldListsV2025R0` in integration tests_ + +### Arguments + +- headersInput `GetShieldListsV2025R0HeadersInput` + - Headers of getShieldListsV2025R0 method +- cancellationToken `undefined | CancellationToken` + - Token used for request cancellation. + +### Returns + +This function returns a value of type `ShieldListsV2025R0`. + +Returns the list of shield list objects. + +## Create shield list + +Creates a shield list. + +This operation is performed by calling function `createShieldListV2025R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2025.0/post-shield-lists/). + +_Currently we don't have an example for calling `createShieldListV2025R0` in integration tests_ + +### Arguments + +- requestBody `ShieldListsCreateV2025R0` + - Request body of createShieldListV2025R0 method +- optionalsInput `CreateShieldListV2025R0OptionalsInput` + - + +### Returns + +This function returns a value of type `ShieldListV2025R0`. + +Returns the shield list object. + +## Get single shield list by shield list id + +Retrieves a single shield list by its ID. + +This operation is performed by calling function `getShieldListByIdV2025R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2025.0/get-shield-lists-id/). + +_Currently we don't have an example for calling `getShieldListByIdV2025R0` in integration tests_ + +### Arguments + +- shieldListId `string` + - The unique identifier that represents a shield list. The ID for any Shield List can be determined by the response from the endpoint fetching all shield lists for the enterprise. Example: "90fb0e17-c332-40ed-b4f9-fa8908fbbb24 " +- optionalsInput `GetShieldListByIdV2025R0OptionalsInput` + - + +### Returns + +This function returns a value of type `ShieldListV2025R0`. + +Returns the shield list object. + +## Delete single shield list by shield list id + +Delete a single shield list by its ID. + +This operation is performed by calling function `deleteShieldListByIdV2025R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2025.0/delete-shield-lists-id/). + +_Currently we don't have an example for calling `deleteShieldListByIdV2025R0` in integration tests_ + +### Arguments + +- shieldListId `string` + - The unique identifier that represents a shield list. The ID for any Shield List can be determined by the response from the endpoint fetching all shield lists for the enterprise. Example: "90fb0e17-c332-40ed-b4f9-fa8908fbbb24 " +- optionalsInput `DeleteShieldListByIdV2025R0OptionalsInput` + - + +### Returns + +This function returns a value of type `undefined`. + +Shield List correctly removed. No content in response. + +## Update shield list + +Updates a shield list. + +This operation is performed by calling function `updateShieldListByIdV2025R0`. + +See the endpoint docs at +[API Reference](https://developer.box.com/reference/v2025.0/put-shield-lists-id/). + +_Currently we don't have an example for calling `updateShieldListByIdV2025R0` in integration tests_ + +### Arguments + +- shieldListId `string` + - The unique identifier that represents a shield list. The ID for any Shield List can be determined by the response from the endpoint fetching all shield lists for the enterprise. Example: "90fb0e17-c332-40ed-b4f9-fa8908fbbb24 " +- requestBody `ShieldListsUpdateV2025R0` + - Request body of updateShieldListByIdV2025R0 method +- optionalsInput `UpdateShieldListByIdV2025R0OptionalsInput` + - + +### Returns + +This function returns a value of type `ShieldListV2025R0`. + +Returns the shield list object. diff --git a/package-lock.json b/package-lock.json index eb9bb2fa..3254b374 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1535,9 +1535,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "22.15.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.23.tgz", - "integrity": "sha512-7Ec1zaFPF4RJ0eXu1YT/xgiebqwqoJz8rYPDi/O2BcZ++Wpt0Kq9cl0eg6NN6bYbPnR67ZLo7St5Q3UK0SnARw==", + "version": "22.15.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.24.tgz", + "integrity": "sha512-w9CZGm9RDjzTh/D+hFwlBJ3ziUaVw7oufKA3vOFSOZlzmW9AkZnfjPb+DLnrV6qtgL/LNmP0/2zBNCFHL3F0ng==", "dev": true, "license": "MIT", "dependencies": { diff --git a/src/client.generated.ts b/src/client.generated.ts index 04ea52c2..1f70d4ee 100644 --- a/src/client.generated.ts +++ b/src/client.generated.ts @@ -76,6 +76,7 @@ import { AiManager } from './managers/ai.generated.js'; import { AiStudioManager } from './managers/aiStudio.generated.js'; import { DocgenTemplateManager } from './managers/docgenTemplate.generated.js'; import { DocgenManager } from './managers/docgen.generated.js'; +import { ShieldListsManager } from './managers/shieldLists.generated.js'; import { Authentication } from './networking/auth.generated.js'; import { NetworkSession } from './networking/network.generated.js'; import { BoxSdkError } from './box/errors.js'; @@ -171,6 +172,7 @@ export class BoxClient { readonly aiStudio: AiStudioManager; readonly docgenTemplate: DocgenTemplateManager; readonly docgen: DocgenManager; + readonly shieldLists: ShieldListsManager; constructor( fields: Omit< BoxClient, @@ -248,6 +250,7 @@ export class BoxClient { | 'aiStudio' | 'docgenTemplate' | 'docgen' + | 'shieldLists' | 'networkSession' | 'makeRequest' | 'withAsUserHeader' @@ -568,6 +571,10 @@ export class BoxClient { auth: this.auth, networkSession: this.networkSession, }); + this.shieldLists = new ShieldListsManager({ + auth: this.auth, + networkSession: this.networkSession, + }); } /** * Make a custom http request using the client authentication and network session. diff --git a/src/managers/shieldLists.generated.ts b/src/managers/shieldLists.generated.ts new file mode 100644 index 00000000..c0d0e80e --- /dev/null +++ b/src/managers/shieldLists.generated.ts @@ -0,0 +1,591 @@ +import { serializeShieldListsV2025R0 } from '../schemas/v2025R0/shieldListsV2025R0.generated.js'; +import { deserializeShieldListsV2025R0 } from '../schemas/v2025R0/shieldListsV2025R0.generated.js'; +import { serializeBoxVersionHeaderV2025R0 } from '../parameters/v2025R0/boxVersionHeaderV2025R0.generated.js'; +import { deserializeBoxVersionHeaderV2025R0 } from '../parameters/v2025R0/boxVersionHeaderV2025R0.generated.js'; +import { serializeShieldListV2025R0 } from '../schemas/v2025R0/shieldListV2025R0.generated.js'; +import { deserializeShieldListV2025R0 } from '../schemas/v2025R0/shieldListV2025R0.generated.js'; +import { serializeClientErrorV2025R0 } from '../schemas/v2025R0/clientErrorV2025R0.generated.js'; +import { deserializeClientErrorV2025R0 } from '../schemas/v2025R0/clientErrorV2025R0.generated.js'; +import { serializeShieldListsCreateV2025R0 } from '../schemas/v2025R0/shieldListsCreateV2025R0.generated.js'; +import { deserializeShieldListsCreateV2025R0 } from '../schemas/v2025R0/shieldListsCreateV2025R0.generated.js'; +import { serializeShieldListsUpdateV2025R0 } from '../schemas/v2025R0/shieldListsUpdateV2025R0.generated.js'; +import { deserializeShieldListsUpdateV2025R0 } from '../schemas/v2025R0/shieldListsUpdateV2025R0.generated.js'; +import { ResponseFormat } from '../networking/fetchOptions.generated.js'; +import { ShieldListsV2025R0 } from '../schemas/v2025R0/shieldListsV2025R0.generated.js'; +import { BoxVersionHeaderV2025R0 } from '../parameters/v2025R0/boxVersionHeaderV2025R0.generated.js'; +import { ShieldListV2025R0 } from '../schemas/v2025R0/shieldListV2025R0.generated.js'; +import { ClientErrorV2025R0 } from '../schemas/v2025R0/clientErrorV2025R0.generated.js'; +import { ShieldListsCreateV2025R0 } from '../schemas/v2025R0/shieldListsCreateV2025R0.generated.js'; +import { ShieldListsUpdateV2025R0 } from '../schemas/v2025R0/shieldListsUpdateV2025R0.generated.js'; +import { BoxSdkError } from '../box/errors.js'; +import { Authentication } from '../networking/auth.generated.js'; +import { NetworkSession } from '../networking/network.generated.js'; +import { FetchOptions } from '../networking/fetchOptions.generated.js'; +import { FetchResponse } from '../networking/fetchResponse.generated.js'; +import { prepareParams } from '../internal/utils.js'; +import { toString } from '../internal/utils.js'; +import { ByteStream } from '../internal/utils.js'; +import { CancellationToken } from '../internal/utils.js'; +import { sdToJson } from '../serialization/json.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export class CreateShieldListV2025R0Optionals { + readonly headers: CreateShieldListV2025R0Headers = + new CreateShieldListV2025R0Headers({}); + readonly cancellationToken?: CancellationToken = void 0; + constructor( + fields: Omit< + CreateShieldListV2025R0Optionals, + 'headers' | 'cancellationToken' + > & + Partial< + Pick + >, + ) { + if (fields.headers !== undefined) { + this.headers = fields.headers; + } + if (fields.cancellationToken !== undefined) { + this.cancellationToken = fields.cancellationToken; + } + } +} +export interface CreateShieldListV2025R0OptionalsInput { + readonly headers?: CreateShieldListV2025R0Headers; + readonly cancellationToken?: undefined | CancellationToken; +} +export class GetShieldListByIdV2025R0Optionals { + readonly headers: GetShieldListByIdV2025R0Headers = + new GetShieldListByIdV2025R0Headers({}); + readonly cancellationToken?: CancellationToken = void 0; + constructor( + fields: Omit< + GetShieldListByIdV2025R0Optionals, + 'headers' | 'cancellationToken' + > & + Partial< + Pick + >, + ) { + if (fields.headers !== undefined) { + this.headers = fields.headers; + } + if (fields.cancellationToken !== undefined) { + this.cancellationToken = fields.cancellationToken; + } + } +} +export interface GetShieldListByIdV2025R0OptionalsInput { + readonly headers?: GetShieldListByIdV2025R0Headers; + readonly cancellationToken?: undefined | CancellationToken; +} +export class DeleteShieldListByIdV2025R0Optionals { + readonly headers: DeleteShieldListByIdV2025R0Headers = + new DeleteShieldListByIdV2025R0Headers({}); + readonly cancellationToken?: CancellationToken = void 0; + constructor( + fields: Omit< + DeleteShieldListByIdV2025R0Optionals, + 'headers' | 'cancellationToken' + > & + Partial< + Pick< + DeleteShieldListByIdV2025R0Optionals, + 'headers' | 'cancellationToken' + > + >, + ) { + if (fields.headers !== undefined) { + this.headers = fields.headers; + } + if (fields.cancellationToken !== undefined) { + this.cancellationToken = fields.cancellationToken; + } + } +} +export interface DeleteShieldListByIdV2025R0OptionalsInput { + readonly headers?: DeleteShieldListByIdV2025R0Headers; + readonly cancellationToken?: undefined | CancellationToken; +} +export class UpdateShieldListByIdV2025R0Optionals { + readonly headers: UpdateShieldListByIdV2025R0Headers = + new UpdateShieldListByIdV2025R0Headers({}); + readonly cancellationToken?: CancellationToken = void 0; + constructor( + fields: Omit< + UpdateShieldListByIdV2025R0Optionals, + 'headers' | 'cancellationToken' + > & + Partial< + Pick< + UpdateShieldListByIdV2025R0Optionals, + 'headers' | 'cancellationToken' + > + >, + ) { + if (fields.headers !== undefined) { + this.headers = fields.headers; + } + if (fields.cancellationToken !== undefined) { + this.cancellationToken = fields.cancellationToken; + } + } +} +export interface UpdateShieldListByIdV2025R0OptionalsInput { + readonly headers?: UpdateShieldListByIdV2025R0Headers; + readonly cancellationToken?: undefined | CancellationToken; +} +export class GetShieldListsV2025R0Headers { + /** + * Version header */ + readonly boxVersion: BoxVersionHeaderV2025R0 = + '2025.0' as BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: { + readonly [key: string]: undefined | string; + } = {}; + constructor( + fields: Omit & + Partial< + Pick + >, + ) { + if (fields.boxVersion !== undefined) { + this.boxVersion = fields.boxVersion; + } + if (fields.extraHeaders !== undefined) { + this.extraHeaders = fields.extraHeaders; + } + } +} +export interface GetShieldListsV2025R0HeadersInput { + /** + * Version header */ + readonly boxVersion?: BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: + | undefined + | { + readonly [key: string]: undefined | string; + }; +} +export class CreateShieldListV2025R0Headers { + /** + * Version header */ + readonly boxVersion: BoxVersionHeaderV2025R0 = + '2025.0' as BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: { + readonly [key: string]: undefined | string; + } = {}; + constructor( + fields: Omit< + CreateShieldListV2025R0Headers, + 'boxVersion' | 'extraHeaders' + > & + Partial< + Pick + >, + ) { + if (fields.boxVersion !== undefined) { + this.boxVersion = fields.boxVersion; + } + if (fields.extraHeaders !== undefined) { + this.extraHeaders = fields.extraHeaders; + } + } +} +export interface CreateShieldListV2025R0HeadersInput { + /** + * Version header */ + readonly boxVersion?: BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: + | undefined + | { + readonly [key: string]: undefined | string; + }; +} +export class GetShieldListByIdV2025R0Headers { + /** + * Version header */ + readonly boxVersion: BoxVersionHeaderV2025R0 = + '2025.0' as BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: { + readonly [key: string]: undefined | string; + } = {}; + constructor( + fields: Omit< + GetShieldListByIdV2025R0Headers, + 'boxVersion' | 'extraHeaders' + > & + Partial< + Pick + >, + ) { + if (fields.boxVersion !== undefined) { + this.boxVersion = fields.boxVersion; + } + if (fields.extraHeaders !== undefined) { + this.extraHeaders = fields.extraHeaders; + } + } +} +export interface GetShieldListByIdV2025R0HeadersInput { + /** + * Version header */ + readonly boxVersion?: BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: + | undefined + | { + readonly [key: string]: undefined | string; + }; +} +export class DeleteShieldListByIdV2025R0Headers { + /** + * Version header */ + readonly boxVersion: BoxVersionHeaderV2025R0 = + '2025.0' as BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: { + readonly [key: string]: undefined | string; + } = {}; + constructor( + fields: Omit< + DeleteShieldListByIdV2025R0Headers, + 'boxVersion' | 'extraHeaders' + > & + Partial< + Pick + >, + ) { + if (fields.boxVersion !== undefined) { + this.boxVersion = fields.boxVersion; + } + if (fields.extraHeaders !== undefined) { + this.extraHeaders = fields.extraHeaders; + } + } +} +export interface DeleteShieldListByIdV2025R0HeadersInput { + /** + * Version header */ + readonly boxVersion?: BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: + | undefined + | { + readonly [key: string]: undefined | string; + }; +} +export class UpdateShieldListByIdV2025R0Headers { + /** + * Version header */ + readonly boxVersion: BoxVersionHeaderV2025R0 = + '2025.0' as BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: { + readonly [key: string]: undefined | string; + } = {}; + constructor( + fields: Omit< + UpdateShieldListByIdV2025R0Headers, + 'boxVersion' | 'extraHeaders' + > & + Partial< + Pick + >, + ) { + if (fields.boxVersion !== undefined) { + this.boxVersion = fields.boxVersion; + } + if (fields.extraHeaders !== undefined) { + this.extraHeaders = fields.extraHeaders; + } + } +} +export interface UpdateShieldListByIdV2025R0HeadersInput { + /** + * Version header */ + readonly boxVersion?: BoxVersionHeaderV2025R0; + /** + * Extra headers that will be included in the HTTP request. */ + readonly extraHeaders?: + | undefined + | { + readonly [key: string]: undefined | string; + }; +} +export class ShieldListsManager { + readonly auth?: Authentication; + readonly networkSession: NetworkSession = new NetworkSession({}); + constructor( + fields: Omit< + ShieldListsManager, + | 'networkSession' + | 'getShieldListsV2025R0' + | 'createShieldListV2025R0' + | 'getShieldListByIdV2025R0' + | 'deleteShieldListByIdV2025R0' + | 'updateShieldListByIdV2025R0' + > & + Partial>, + ) { + if (fields.auth !== undefined) { + this.auth = fields.auth; + } + if (fields.networkSession !== undefined) { + this.networkSession = fields.networkSession; + } + } + /** + * Retrieves all shield lists in the enterprise. + * @param {GetShieldListsV2025R0HeadersInput} headersInput Headers of getShieldListsV2025R0 method + * @param {CancellationToken} cancellationToken Token used for request cancellation. + * @returns {Promise} + */ + async getShieldListsV2025R0( + headersInput: GetShieldListsV2025R0HeadersInput = new GetShieldListsV2025R0Headers( + {}, + ), + cancellationToken?: CancellationToken, + ): Promise { + const headers: GetShieldListsV2025R0Headers = + new GetShieldListsV2025R0Headers({ + boxVersion: headersInput.boxVersion, + extraHeaders: headersInput.extraHeaders, + }); + const headersMap: { + readonly [key: string]: string; + } = prepareParams({ + ...{ ['box-version']: toString(headers.boxVersion) as string }, + ...headers.extraHeaders, + }); + const response: FetchResponse = + await this.networkSession.networkClient.fetch( + new FetchOptions({ + url: ''.concat( + this.networkSession.baseUrls.baseUrl, + '/2.0/shield_lists', + ) as string, + method: 'GET', + headers: headersMap, + responseFormat: 'json' as ResponseFormat, + auth: this.auth, + networkSession: this.networkSession, + cancellationToken: cancellationToken, + }), + ); + return { + ...deserializeShieldListsV2025R0(response.data!), + rawData: response.data!, + }; + } + /** + * Creates a shield list. + * @param {ShieldListsCreateV2025R0} requestBody Request body of createShieldListV2025R0 method + * @param {CreateShieldListV2025R0OptionalsInput} optionalsInput + * @returns {Promise} + */ + async createShieldListV2025R0( + requestBody: ShieldListsCreateV2025R0, + optionalsInput: CreateShieldListV2025R0OptionalsInput = {}, + ): Promise { + const optionals: CreateShieldListV2025R0Optionals = + new CreateShieldListV2025R0Optionals({ + headers: optionalsInput.headers, + cancellationToken: optionalsInput.cancellationToken, + }); + const headers: any = optionals.headers; + const cancellationToken: any = optionals.cancellationToken; + const headersMap: { + readonly [key: string]: string; + } = prepareParams({ + ...{ ['box-version']: toString(headers.boxVersion) as string }, + ...headers.extraHeaders, + }); + const response: FetchResponse = + await this.networkSession.networkClient.fetch( + new FetchOptions({ + url: ''.concat( + this.networkSession.baseUrls.baseUrl, + '/2.0/shield_lists', + ) as string, + method: 'POST', + headers: headersMap, + data: serializeShieldListsCreateV2025R0(requestBody), + contentType: 'application/json', + responseFormat: 'json' as ResponseFormat, + auth: this.auth, + networkSession: this.networkSession, + cancellationToken: cancellationToken, + }), + ); + return { + ...deserializeShieldListV2025R0(response.data!), + rawData: response.data!, + }; + } + /** + * Retrieves a single shield list by its ID. + * @param {string} shieldListId The unique identifier that represents a shield list. + The ID for any Shield List can be determined by the response from the endpoint + fetching all shield lists for the enterprise. + Example: "90fb0e17-c332-40ed-b4f9-fa8908fbbb24 " + * @param {GetShieldListByIdV2025R0OptionalsInput} optionalsInput + * @returns {Promise} + */ + async getShieldListByIdV2025R0( + shieldListId: string, + optionalsInput: GetShieldListByIdV2025R0OptionalsInput = {}, + ): Promise { + const optionals: GetShieldListByIdV2025R0Optionals = + new GetShieldListByIdV2025R0Optionals({ + headers: optionalsInput.headers, + cancellationToken: optionalsInput.cancellationToken, + }); + const headers: any = optionals.headers; + const cancellationToken: any = optionals.cancellationToken; + const headersMap: { + readonly [key: string]: string; + } = prepareParams({ + ...{ ['box-version']: toString(headers.boxVersion) as string }, + ...headers.extraHeaders, + }); + const response: FetchResponse = + await this.networkSession.networkClient.fetch( + new FetchOptions({ + url: ''.concat( + this.networkSession.baseUrls.baseUrl, + '/2.0/shield_lists/', + toString(shieldListId) as string, + ) as string, + method: 'GET', + headers: headersMap, + responseFormat: 'json' as ResponseFormat, + auth: this.auth, + networkSession: this.networkSession, + cancellationToken: cancellationToken, + }), + ); + return { + ...deserializeShieldListV2025R0(response.data!), + rawData: response.data!, + }; + } + /** + * Delete a single shield list by its ID. + * @param {string} shieldListId The unique identifier that represents a shield list. + The ID for any Shield List can be determined by the response from the endpoint + fetching all shield lists for the enterprise. + Example: "90fb0e17-c332-40ed-b4f9-fa8908fbbb24 " + * @param {DeleteShieldListByIdV2025R0OptionalsInput} optionalsInput + * @returns {Promise} + */ + async deleteShieldListByIdV2025R0( + shieldListId: string, + optionalsInput: DeleteShieldListByIdV2025R0OptionalsInput = {}, + ): Promise { + const optionals: DeleteShieldListByIdV2025R0Optionals = + new DeleteShieldListByIdV2025R0Optionals({ + headers: optionalsInput.headers, + cancellationToken: optionalsInput.cancellationToken, + }); + const headers: any = optionals.headers; + const cancellationToken: any = optionals.cancellationToken; + const headersMap: { + readonly [key: string]: string; + } = prepareParams({ + ...{ ['box-version']: toString(headers.boxVersion) as string }, + ...headers.extraHeaders, + }); + const response: FetchResponse = + await this.networkSession.networkClient.fetch( + new FetchOptions({ + url: ''.concat( + this.networkSession.baseUrls.baseUrl, + '/2.0/shield_lists/', + toString(shieldListId) as string, + ) as string, + method: 'DELETE', + headers: headersMap, + responseFormat: 'no_content' as ResponseFormat, + auth: this.auth, + networkSession: this.networkSession, + cancellationToken: cancellationToken, + }), + ); + return void 0; + } + /** + * Updates a shield list. + * @param {string} shieldListId The unique identifier that represents a shield list. + The ID for any Shield List can be determined by the response from the endpoint + fetching all shield lists for the enterprise. + Example: "90fb0e17-c332-40ed-b4f9-fa8908fbbb24 " + * @param {ShieldListsUpdateV2025R0} requestBody Request body of updateShieldListByIdV2025R0 method + * @param {UpdateShieldListByIdV2025R0OptionalsInput} optionalsInput + * @returns {Promise} + */ + async updateShieldListByIdV2025R0( + shieldListId: string, + requestBody: ShieldListsUpdateV2025R0, + optionalsInput: UpdateShieldListByIdV2025R0OptionalsInput = {}, + ): Promise { + const optionals: UpdateShieldListByIdV2025R0Optionals = + new UpdateShieldListByIdV2025R0Optionals({ + headers: optionalsInput.headers, + cancellationToken: optionalsInput.cancellationToken, + }); + const headers: any = optionals.headers; + const cancellationToken: any = optionals.cancellationToken; + const headersMap: { + readonly [key: string]: string; + } = prepareParams({ + ...{ ['box-version']: toString(headers.boxVersion) as string }, + ...headers.extraHeaders, + }); + const response: FetchResponse = + await this.networkSession.networkClient.fetch( + new FetchOptions({ + url: ''.concat( + this.networkSession.baseUrls.baseUrl, + '/2.0/shield_lists/', + toString(shieldListId) as string, + ) as string, + method: 'PUT', + headers: headersMap, + data: serializeShieldListsUpdateV2025R0(requestBody), + contentType: 'application/json', + responseFormat: 'json' as ResponseFormat, + auth: this.auth, + networkSession: this.networkSession, + cancellationToken: cancellationToken, + }), + ); + return { + ...deserializeShieldListV2025R0(response.data!), + rawData: response.data!, + }; + } +} +export interface ShieldListsManagerInput { + readonly auth?: Authentication; + readonly networkSession?: NetworkSession; +} diff --git a/src/schemas/v2025R0/shieldListContentCountryV2025R0.generated.ts b/src/schemas/v2025R0/shieldListContentCountryV2025R0.generated.ts new file mode 100644 index 00000000..3af86047 --- /dev/null +++ b/src/schemas/v2025R0/shieldListContentCountryV2025R0.generated.ts @@ -0,0 +1,167 @@ +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export type ShieldListContentCountryV2025R0TypeField = 'country'; +export class ShieldListContentCountryV2025R0 { + /** + * The type of content in the shield list. */ + readonly type: ShieldListContentCountryV2025R0TypeField = + 'country' as ShieldListContentCountryV2025R0TypeField; + /** + * List of country codes values. */ + readonly countryCodes!: readonly string[]; + readonly rawData?: SerializedData; + constructor( + fields: Omit & + Partial>, + ) { + if (fields.type !== undefined) { + this.type = fields.type; + } + if (fields.countryCodes !== undefined) { + this.countryCodes = fields.countryCodes; + } + if (fields.rawData !== undefined) { + this.rawData = fields.rawData; + } + } +} +export interface ShieldListContentCountryV2025R0Input { + /** + * The type of content in the shield list. */ + readonly type?: ShieldListContentCountryV2025R0TypeField; + /** + * List of country codes values. */ + readonly countryCodes: readonly string[]; + readonly rawData?: SerializedData; +} +export function serializeShieldListContentCountryV2025R0TypeField( + val: ShieldListContentCountryV2025R0TypeField, +): SerializedData { + return val; +} +export function deserializeShieldListContentCountryV2025R0TypeField( + val: SerializedData, +): ShieldListContentCountryV2025R0TypeField { + if (val == 'country') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize ShieldListContentCountryV2025R0TypeField", + }); +} +export function serializeShieldListContentCountryV2025R0( + val: ShieldListContentCountryV2025R0, +): SerializedData { + return { + ['type']: serializeShieldListContentCountryV2025R0TypeField(val.type), + ['country_codes']: val.countryCodes.map(function ( + item: string, + ): SerializedData { + return item; + }) as readonly any[], + }; +} +export function deserializeShieldListContentCountryV2025R0( + val: SerializedData, +): ShieldListContentCountryV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentCountryV2025R0"', + }); + } + if (val.type == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "type" of type "ShieldListContentCountryV2025R0" to be defined', + }); + } + const type: ShieldListContentCountryV2025R0TypeField = + deserializeShieldListContentCountryV2025R0TypeField(val.type); + if (val.country_codes == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "country_codes" of type "ShieldListContentCountryV2025R0" to be defined', + }); + } + if (!sdIsList(val.country_codes)) { + throw new BoxSdkError({ + message: + 'Expecting array for "country_codes" of type "ShieldListContentCountryV2025R0"', + }); + } + const countryCodes: readonly string[] = sdIsList(val.country_codes) + ? (val.country_codes.map(function (itm: SerializedData): string { + if (!sdIsString(itm)) { + throw new BoxSdkError({ + message: 'Expecting string for "ShieldListContentCountryV2025R0"', + }); + } + return itm; + }) as readonly any[]) + : []; + return { + type: type, + countryCodes: countryCodes, + } satisfies ShieldListContentCountryV2025R0; +} +export function serializeShieldListContentCountryV2025R0Input( + val: ShieldListContentCountryV2025R0Input, +): SerializedData { + return { + ['type']: + val.type == void 0 + ? val.type + : serializeShieldListContentCountryV2025R0TypeField(val.type), + ['country_codes']: val.countryCodes.map(function ( + item: string, + ): SerializedData { + return item; + }) as readonly any[], + }; +} +export function deserializeShieldListContentCountryV2025R0Input( + val: SerializedData, +): ShieldListContentCountryV2025R0Input { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentCountryV2025R0Input"', + }); + } + const type: undefined | ShieldListContentCountryV2025R0TypeField = + val.type == void 0 + ? void 0 + : deserializeShieldListContentCountryV2025R0TypeField(val.type); + if (val.country_codes == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "country_codes" of type "ShieldListContentCountryV2025R0Input" to be defined', + }); + } + if (!sdIsList(val.country_codes)) { + throw new BoxSdkError({ + message: + 'Expecting array for "country_codes" of type "ShieldListContentCountryV2025R0Input"', + }); + } + const countryCodes: readonly string[] = sdIsList(val.country_codes) + ? (val.country_codes.map(function (itm: SerializedData): string { + if (!sdIsString(itm)) { + throw new BoxSdkError({ + message: + 'Expecting string for "ShieldListContentCountryV2025R0Input"', + }); + } + return itm; + }) as readonly any[]) + : []; + return { + type: type, + countryCodes: countryCodes, + } satisfies ShieldListContentCountryV2025R0Input; +} diff --git a/src/schemas/v2025R0/shieldListContentDomainV2025R0.generated.ts b/src/schemas/v2025R0/shieldListContentDomainV2025R0.generated.ts new file mode 100644 index 00000000..9b2811de --- /dev/null +++ b/src/schemas/v2025R0/shieldListContentDomainV2025R0.generated.ts @@ -0,0 +1,163 @@ +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export type ShieldListContentDomainV2025R0TypeField = 'domain'; +export class ShieldListContentDomainV2025R0 { + /** + * The type of content in the shield list. */ + readonly type: ShieldListContentDomainV2025R0TypeField = + 'domain' as ShieldListContentDomainV2025R0TypeField; + /** + * List of domain. */ + readonly domains!: readonly string[]; + readonly rawData?: SerializedData; + constructor( + fields: Omit & + Partial>, + ) { + if (fields.type !== undefined) { + this.type = fields.type; + } + if (fields.domains !== undefined) { + this.domains = fields.domains; + } + if (fields.rawData !== undefined) { + this.rawData = fields.rawData; + } + } +} +export interface ShieldListContentDomainV2025R0Input { + /** + * The type of content in the shield list. */ + readonly type?: ShieldListContentDomainV2025R0TypeField; + /** + * List of domain. */ + readonly domains: readonly string[]; + readonly rawData?: SerializedData; +} +export function serializeShieldListContentDomainV2025R0TypeField( + val: ShieldListContentDomainV2025R0TypeField, +): SerializedData { + return val; +} +export function deserializeShieldListContentDomainV2025R0TypeField( + val: SerializedData, +): ShieldListContentDomainV2025R0TypeField { + if (val == 'domain') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize ShieldListContentDomainV2025R0TypeField", + }); +} +export function serializeShieldListContentDomainV2025R0( + val: ShieldListContentDomainV2025R0, +): SerializedData { + return { + ['type']: serializeShieldListContentDomainV2025R0TypeField(val.type), + ['domains']: val.domains.map(function (item: string): SerializedData { + return item; + }) as readonly any[], + }; +} +export function deserializeShieldListContentDomainV2025R0( + val: SerializedData, +): ShieldListContentDomainV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentDomainV2025R0"', + }); + } + if (val.type == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "type" of type "ShieldListContentDomainV2025R0" to be defined', + }); + } + const type: ShieldListContentDomainV2025R0TypeField = + deserializeShieldListContentDomainV2025R0TypeField(val.type); + if (val.domains == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "domains" of type "ShieldListContentDomainV2025R0" to be defined', + }); + } + if (!sdIsList(val.domains)) { + throw new BoxSdkError({ + message: + 'Expecting array for "domains" of type "ShieldListContentDomainV2025R0"', + }); + } + const domains: readonly string[] = sdIsList(val.domains) + ? (val.domains.map(function (itm: SerializedData): string { + if (!sdIsString(itm)) { + throw new BoxSdkError({ + message: 'Expecting string for "ShieldListContentDomainV2025R0"', + }); + } + return itm; + }) as readonly any[]) + : []; + return { + type: type, + domains: domains, + } satisfies ShieldListContentDomainV2025R0; +} +export function serializeShieldListContentDomainV2025R0Input( + val: ShieldListContentDomainV2025R0Input, +): SerializedData { + return { + ['type']: + val.type == void 0 + ? val.type + : serializeShieldListContentDomainV2025R0TypeField(val.type), + ['domains']: val.domains.map(function (item: string): SerializedData { + return item; + }) as readonly any[], + }; +} +export function deserializeShieldListContentDomainV2025R0Input( + val: SerializedData, +): ShieldListContentDomainV2025R0Input { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentDomainV2025R0Input"', + }); + } + const type: undefined | ShieldListContentDomainV2025R0TypeField = + val.type == void 0 + ? void 0 + : deserializeShieldListContentDomainV2025R0TypeField(val.type); + if (val.domains == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "domains" of type "ShieldListContentDomainV2025R0Input" to be defined', + }); + } + if (!sdIsList(val.domains)) { + throw new BoxSdkError({ + message: + 'Expecting array for "domains" of type "ShieldListContentDomainV2025R0Input"', + }); + } + const domains: readonly string[] = sdIsList(val.domains) + ? (val.domains.map(function (itm: SerializedData): string { + if (!sdIsString(itm)) { + throw new BoxSdkError({ + message: + 'Expecting string for "ShieldListContentDomainV2025R0Input"', + }); + } + return itm; + }) as readonly any[]) + : []; + return { + type: type, + domains: domains, + } satisfies ShieldListContentDomainV2025R0Input; +} diff --git a/src/schemas/v2025R0/shieldListContentEmailV2025R0.generated.ts b/src/schemas/v2025R0/shieldListContentEmailV2025R0.generated.ts new file mode 100644 index 00000000..40bb9846 --- /dev/null +++ b/src/schemas/v2025R0/shieldListContentEmailV2025R0.generated.ts @@ -0,0 +1,167 @@ +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export type ShieldListContentEmailV2025R0TypeField = 'email'; +export class ShieldListContentEmailV2025R0 { + /** + * The type of content in the shield list. */ + readonly type: ShieldListContentEmailV2025R0TypeField = + 'email' as ShieldListContentEmailV2025R0TypeField; + /** + * List of emails */ + readonly emailAddresses!: readonly string[]; + readonly rawData?: SerializedData; + constructor( + fields: Omit & + Partial>, + ) { + if (fields.type !== undefined) { + this.type = fields.type; + } + if (fields.emailAddresses !== undefined) { + this.emailAddresses = fields.emailAddresses; + } + if (fields.rawData !== undefined) { + this.rawData = fields.rawData; + } + } +} +export interface ShieldListContentEmailV2025R0Input { + /** + * The type of content in the shield list. */ + readonly type?: ShieldListContentEmailV2025R0TypeField; + /** + * List of emails */ + readonly emailAddresses: readonly string[]; + readonly rawData?: SerializedData; +} +export function serializeShieldListContentEmailV2025R0TypeField( + val: ShieldListContentEmailV2025R0TypeField, +): SerializedData { + return val; +} +export function deserializeShieldListContentEmailV2025R0TypeField( + val: SerializedData, +): ShieldListContentEmailV2025R0TypeField { + if (val == 'email') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize ShieldListContentEmailV2025R0TypeField", + }); +} +export function serializeShieldListContentEmailV2025R0( + val: ShieldListContentEmailV2025R0, +): SerializedData { + return { + ['type']: serializeShieldListContentEmailV2025R0TypeField(val.type), + ['email_addresses']: val.emailAddresses.map(function ( + item: string, + ): SerializedData { + return item; + }) as readonly any[], + }; +} +export function deserializeShieldListContentEmailV2025R0( + val: SerializedData, +): ShieldListContentEmailV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentEmailV2025R0"', + }); + } + if (val.type == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "type" of type "ShieldListContentEmailV2025R0" to be defined', + }); + } + const type: ShieldListContentEmailV2025R0TypeField = + deserializeShieldListContentEmailV2025R0TypeField(val.type); + if (val.email_addresses == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "email_addresses" of type "ShieldListContentEmailV2025R0" to be defined', + }); + } + if (!sdIsList(val.email_addresses)) { + throw new BoxSdkError({ + message: + 'Expecting array for "email_addresses" of type "ShieldListContentEmailV2025R0"', + }); + } + const emailAddresses: readonly string[] = sdIsList(val.email_addresses) + ? (val.email_addresses.map(function (itm: SerializedData): string { + if (!sdIsString(itm)) { + throw new BoxSdkError({ + message: 'Expecting string for "ShieldListContentEmailV2025R0"', + }); + } + return itm; + }) as readonly any[]) + : []; + return { + type: type, + emailAddresses: emailAddresses, + } satisfies ShieldListContentEmailV2025R0; +} +export function serializeShieldListContentEmailV2025R0Input( + val: ShieldListContentEmailV2025R0Input, +): SerializedData { + return { + ['type']: + val.type == void 0 + ? val.type + : serializeShieldListContentEmailV2025R0TypeField(val.type), + ['email_addresses']: val.emailAddresses.map(function ( + item: string, + ): SerializedData { + return item; + }) as readonly any[], + }; +} +export function deserializeShieldListContentEmailV2025R0Input( + val: SerializedData, +): ShieldListContentEmailV2025R0Input { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentEmailV2025R0Input"', + }); + } + const type: undefined | ShieldListContentEmailV2025R0TypeField = + val.type == void 0 + ? void 0 + : deserializeShieldListContentEmailV2025R0TypeField(val.type); + if (val.email_addresses == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "email_addresses" of type "ShieldListContentEmailV2025R0Input" to be defined', + }); + } + if (!sdIsList(val.email_addresses)) { + throw new BoxSdkError({ + message: + 'Expecting array for "email_addresses" of type "ShieldListContentEmailV2025R0Input"', + }); + } + const emailAddresses: readonly string[] = sdIsList(val.email_addresses) + ? (val.email_addresses.map(function (itm: SerializedData): string { + if (!sdIsString(itm)) { + throw new BoxSdkError({ + message: + 'Expecting string for "ShieldListContentEmailV2025R0Input"', + }); + } + return itm; + }) as readonly any[]) + : []; + return { + type: type, + emailAddresses: emailAddresses, + } satisfies ShieldListContentEmailV2025R0Input; +} diff --git a/src/schemas/v2025R0/shieldListContentIntegrationV2025R0.generated.ts b/src/schemas/v2025R0/shieldListContentIntegrationV2025R0.generated.ts new file mode 100644 index 00000000..8cf4b602 --- /dev/null +++ b/src/schemas/v2025R0/shieldListContentIntegrationV2025R0.generated.ts @@ -0,0 +1,201 @@ +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export type ShieldListContentIntegrationV2025R0TypeField = 'integration'; +export interface ShieldListContentIntegrationV2025R0IntegrationsField { + /** + * The ID of the integration. */ + readonly id?: string; + readonly rawData?: SerializedData; +} +export class ShieldListContentIntegrationV2025R0 { + /** + * The type of content in the shield list. */ + readonly type: ShieldListContentIntegrationV2025R0TypeField = + 'integration' as ShieldListContentIntegrationV2025R0TypeField; + /** + * List of integration */ + readonly integrations!: readonly ShieldListContentIntegrationV2025R0IntegrationsField[]; + readonly rawData?: SerializedData; + constructor( + fields: Omit & + Partial>, + ) { + if (fields.type !== undefined) { + this.type = fields.type; + } + if (fields.integrations !== undefined) { + this.integrations = fields.integrations; + } + if (fields.rawData !== undefined) { + this.rawData = fields.rawData; + } + } +} +export interface ShieldListContentIntegrationV2025R0Input { + /** + * The type of content in the shield list. */ + readonly type?: ShieldListContentIntegrationV2025R0TypeField; + /** + * List of integration */ + readonly integrations: readonly ShieldListContentIntegrationV2025R0IntegrationsField[]; + readonly rawData?: SerializedData; +} +export function serializeShieldListContentIntegrationV2025R0TypeField( + val: ShieldListContentIntegrationV2025R0TypeField, +): SerializedData { + return val; +} +export function deserializeShieldListContentIntegrationV2025R0TypeField( + val: SerializedData, +): ShieldListContentIntegrationV2025R0TypeField { + if (val == 'integration') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize ShieldListContentIntegrationV2025R0TypeField", + }); +} +export function serializeShieldListContentIntegrationV2025R0IntegrationsField( + val: ShieldListContentIntegrationV2025R0IntegrationsField, +): SerializedData { + return { ['id']: val.id }; +} +export function deserializeShieldListContentIntegrationV2025R0IntegrationsField( + val: SerializedData, +): ShieldListContentIntegrationV2025R0IntegrationsField { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: + 'Expecting a map for "ShieldListContentIntegrationV2025R0IntegrationsField"', + }); + } + if (!(val.id == void 0) && !sdIsString(val.id)) { + throw new BoxSdkError({ + message: + 'Expecting string for "id" of type "ShieldListContentIntegrationV2025R0IntegrationsField"', + }); + } + const id: undefined | string = val.id == void 0 ? void 0 : val.id; + return { + id: id, + } satisfies ShieldListContentIntegrationV2025R0IntegrationsField; +} +export function serializeShieldListContentIntegrationV2025R0( + val: ShieldListContentIntegrationV2025R0, +): SerializedData { + return { + ['type']: serializeShieldListContentIntegrationV2025R0TypeField(val.type), + ['integrations']: val.integrations.map(function ( + item: ShieldListContentIntegrationV2025R0IntegrationsField, + ): SerializedData { + return serializeShieldListContentIntegrationV2025R0IntegrationsField( + item, + ); + }) as readonly any[], + }; +} +export function deserializeShieldListContentIntegrationV2025R0( + val: SerializedData, +): ShieldListContentIntegrationV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentIntegrationV2025R0"', + }); + } + if (val.type == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "type" of type "ShieldListContentIntegrationV2025R0" to be defined', + }); + } + const type: ShieldListContentIntegrationV2025R0TypeField = + deserializeShieldListContentIntegrationV2025R0TypeField(val.type); + if (val.integrations == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "integrations" of type "ShieldListContentIntegrationV2025R0" to be defined', + }); + } + if (!sdIsList(val.integrations)) { + throw new BoxSdkError({ + message: + 'Expecting array for "integrations" of type "ShieldListContentIntegrationV2025R0"', + }); + } + const integrations: readonly ShieldListContentIntegrationV2025R0IntegrationsField[] = + sdIsList(val.integrations) + ? (val.integrations.map(function ( + itm: SerializedData, + ): ShieldListContentIntegrationV2025R0IntegrationsField { + return deserializeShieldListContentIntegrationV2025R0IntegrationsField( + itm, + ); + }) as readonly any[]) + : []; + return { + type: type, + integrations: integrations, + } satisfies ShieldListContentIntegrationV2025R0; +} +export function serializeShieldListContentIntegrationV2025R0Input( + val: ShieldListContentIntegrationV2025R0Input, +): SerializedData { + return { + ['type']: + val.type == void 0 + ? val.type + : serializeShieldListContentIntegrationV2025R0TypeField(val.type), + ['integrations']: val.integrations.map(function ( + item: ShieldListContentIntegrationV2025R0IntegrationsField, + ): SerializedData { + return serializeShieldListContentIntegrationV2025R0IntegrationsField( + item, + ); + }) as readonly any[], + }; +} +export function deserializeShieldListContentIntegrationV2025R0Input( + val: SerializedData, +): ShieldListContentIntegrationV2025R0Input { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentIntegrationV2025R0Input"', + }); + } + const type: undefined | ShieldListContentIntegrationV2025R0TypeField = + val.type == void 0 + ? void 0 + : deserializeShieldListContentIntegrationV2025R0TypeField(val.type); + if (val.integrations == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "integrations" of type "ShieldListContentIntegrationV2025R0Input" to be defined', + }); + } + if (!sdIsList(val.integrations)) { + throw new BoxSdkError({ + message: + 'Expecting array for "integrations" of type "ShieldListContentIntegrationV2025R0Input"', + }); + } + const integrations: readonly ShieldListContentIntegrationV2025R0IntegrationsField[] = + sdIsList(val.integrations) + ? (val.integrations.map(function ( + itm: SerializedData, + ): ShieldListContentIntegrationV2025R0IntegrationsField { + return deserializeShieldListContentIntegrationV2025R0IntegrationsField( + itm, + ); + }) as readonly any[]) + : []; + return { + type: type, + integrations: integrations, + } satisfies ShieldListContentIntegrationV2025R0Input; +} diff --git a/src/schemas/v2025R0/shieldListContentIpV2025R0.generated.ts b/src/schemas/v2025R0/shieldListContentIpV2025R0.generated.ts new file mode 100644 index 00000000..00354e20 --- /dev/null +++ b/src/schemas/v2025R0/shieldListContentIpV2025R0.generated.ts @@ -0,0 +1,166 @@ +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export type ShieldListContentIpV2025R0TypeField = 'ip'; +export class ShieldListContentIpV2025R0 { + /** + * The type of content in the shield list. */ + readonly type: ShieldListContentIpV2025R0TypeField = + 'ip' as ShieldListContentIpV2025R0TypeField; + /** + * List of ips and cidrs. */ + readonly ipAddresses!: readonly string[]; + readonly rawData?: SerializedData; + constructor( + fields: Omit & + Partial>, + ) { + if (fields.type !== undefined) { + this.type = fields.type; + } + if (fields.ipAddresses !== undefined) { + this.ipAddresses = fields.ipAddresses; + } + if (fields.rawData !== undefined) { + this.rawData = fields.rawData; + } + } +} +export interface ShieldListContentIpV2025R0Input { + /** + * The type of content in the shield list. */ + readonly type?: ShieldListContentIpV2025R0TypeField; + /** + * List of ips and cidrs. */ + readonly ipAddresses: readonly string[]; + readonly rawData?: SerializedData; +} +export function serializeShieldListContentIpV2025R0TypeField( + val: ShieldListContentIpV2025R0TypeField, +): SerializedData { + return val; +} +export function deserializeShieldListContentIpV2025R0TypeField( + val: SerializedData, +): ShieldListContentIpV2025R0TypeField { + if (val == 'ip') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize ShieldListContentIpV2025R0TypeField", + }); +} +export function serializeShieldListContentIpV2025R0( + val: ShieldListContentIpV2025R0, +): SerializedData { + return { + ['type']: serializeShieldListContentIpV2025R0TypeField(val.type), + ['ip_addresses']: val.ipAddresses.map(function ( + item: string, + ): SerializedData { + return item; + }) as readonly any[], + }; +} +export function deserializeShieldListContentIpV2025R0( + val: SerializedData, +): ShieldListContentIpV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentIpV2025R0"', + }); + } + if (val.type == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "type" of type "ShieldListContentIpV2025R0" to be defined', + }); + } + const type: ShieldListContentIpV2025R0TypeField = + deserializeShieldListContentIpV2025R0TypeField(val.type); + if (val.ip_addresses == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "ip_addresses" of type "ShieldListContentIpV2025R0" to be defined', + }); + } + if (!sdIsList(val.ip_addresses)) { + throw new BoxSdkError({ + message: + 'Expecting array for "ip_addresses" of type "ShieldListContentIpV2025R0"', + }); + } + const ipAddresses: readonly string[] = sdIsList(val.ip_addresses) + ? (val.ip_addresses.map(function (itm: SerializedData): string { + if (!sdIsString(itm)) { + throw new BoxSdkError({ + message: 'Expecting string for "ShieldListContentIpV2025R0"', + }); + } + return itm; + }) as readonly any[]) + : []; + return { + type: type, + ipAddresses: ipAddresses, + } satisfies ShieldListContentIpV2025R0; +} +export function serializeShieldListContentIpV2025R0Input( + val: ShieldListContentIpV2025R0Input, +): SerializedData { + return { + ['type']: + val.type == void 0 + ? val.type + : serializeShieldListContentIpV2025R0TypeField(val.type), + ['ip_addresses']: val.ipAddresses.map(function ( + item: string, + ): SerializedData { + return item; + }) as readonly any[], + }; +} +export function deserializeShieldListContentIpV2025R0Input( + val: SerializedData, +): ShieldListContentIpV2025R0Input { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentIpV2025R0Input"', + }); + } + const type: undefined | ShieldListContentIpV2025R0TypeField = + val.type == void 0 + ? void 0 + : deserializeShieldListContentIpV2025R0TypeField(val.type); + if (val.ip_addresses == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "ip_addresses" of type "ShieldListContentIpV2025R0Input" to be defined', + }); + } + if (!sdIsList(val.ip_addresses)) { + throw new BoxSdkError({ + message: + 'Expecting array for "ip_addresses" of type "ShieldListContentIpV2025R0Input"', + }); + } + const ipAddresses: readonly string[] = sdIsList(val.ip_addresses) + ? (val.ip_addresses.map(function (itm: SerializedData): string { + if (!sdIsString(itm)) { + throw new BoxSdkError({ + message: 'Expecting string for "ShieldListContentIpV2025R0Input"', + }); + } + return itm; + }) as readonly any[]) + : []; + return { + type: type, + ipAddresses: ipAddresses, + } satisfies ShieldListContentIpV2025R0Input; +} diff --git a/src/schemas/v2025R0/shieldListContentRequestV2025R0.generated.ts b/src/schemas/v2025R0/shieldListContentRequestV2025R0.generated.ts new file mode 100644 index 00000000..b38d8401 --- /dev/null +++ b/src/schemas/v2025R0/shieldListContentRequestV2025R0.generated.ts @@ -0,0 +1,66 @@ +import { serializeShieldListContentCountryV2025R0 } from './shieldListContentCountryV2025R0.generated.js'; +import { deserializeShieldListContentCountryV2025R0 } from './shieldListContentCountryV2025R0.generated.js'; +import { serializeShieldListContentDomainV2025R0 } from './shieldListContentDomainV2025R0.generated.js'; +import { deserializeShieldListContentDomainV2025R0 } from './shieldListContentDomainV2025R0.generated.js'; +import { serializeShieldListContentEmailV2025R0 } from './shieldListContentEmailV2025R0.generated.js'; +import { deserializeShieldListContentEmailV2025R0 } from './shieldListContentEmailV2025R0.generated.js'; +import { serializeShieldListContentIpV2025R0 } from './shieldListContentIpV2025R0.generated.js'; +import { deserializeShieldListContentIpV2025R0 } from './shieldListContentIpV2025R0.generated.js'; +import { ShieldListContentCountryV2025R0 } from './shieldListContentCountryV2025R0.generated.js'; +import { ShieldListContentDomainV2025R0 } from './shieldListContentDomainV2025R0.generated.js'; +import { ShieldListContentEmailV2025R0 } from './shieldListContentEmailV2025R0.generated.js'; +import { ShieldListContentIpV2025R0 } from './shieldListContentIpV2025R0.generated.js'; +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export type ShieldListContentRequestV2025R0 = + | ShieldListContentCountryV2025R0 + | ShieldListContentDomainV2025R0 + | ShieldListContentEmailV2025R0 + | ShieldListContentIpV2025R0; +export function serializeShieldListContentRequestV2025R0( + val: any, +): SerializedData { + if (val.type == 'country') { + return serializeShieldListContentCountryV2025R0(val); + } + if (val.type == 'domain') { + return serializeShieldListContentDomainV2025R0(val); + } + if (val.type == 'email') { + return serializeShieldListContentEmailV2025R0(val); + } + if (val.type == 'ip') { + return serializeShieldListContentIpV2025R0(val); + } + throw new BoxSdkError({ message: 'unknown type' }); +} +export function deserializeShieldListContentRequestV2025R0( + val: SerializedData, +): ShieldListContentRequestV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentRequestV2025R0"', + }); + } + if (val.type == 'country') { + return deserializeShieldListContentCountryV2025R0(val); + } + if (val.type == 'domain') { + return deserializeShieldListContentDomainV2025R0(val); + } + if (val.type == 'email') { + return deserializeShieldListContentEmailV2025R0(val); + } + if (val.type == 'ip') { + return deserializeShieldListContentIpV2025R0(val); + } + throw new BoxSdkError({ + message: "Can't deserialize ShieldListContentRequestV2025R0", + }); +} diff --git a/src/schemas/v2025R0/shieldListContentV2025R0.generated.ts b/src/schemas/v2025R0/shieldListContentV2025R0.generated.ts new file mode 100644 index 00000000..397f69ae --- /dev/null +++ b/src/schemas/v2025R0/shieldListContentV2025R0.generated.ts @@ -0,0 +1,74 @@ +import { serializeShieldListContentCountryV2025R0 } from './shieldListContentCountryV2025R0.generated.js'; +import { deserializeShieldListContentCountryV2025R0 } from './shieldListContentCountryV2025R0.generated.js'; +import { serializeShieldListContentDomainV2025R0 } from './shieldListContentDomainV2025R0.generated.js'; +import { deserializeShieldListContentDomainV2025R0 } from './shieldListContentDomainV2025R0.generated.js'; +import { serializeShieldListContentEmailV2025R0 } from './shieldListContentEmailV2025R0.generated.js'; +import { deserializeShieldListContentEmailV2025R0 } from './shieldListContentEmailV2025R0.generated.js'; +import { serializeShieldListContentIpV2025R0 } from './shieldListContentIpV2025R0.generated.js'; +import { deserializeShieldListContentIpV2025R0 } from './shieldListContentIpV2025R0.generated.js'; +import { serializeShieldListContentIntegrationV2025R0 } from './shieldListContentIntegrationV2025R0.generated.js'; +import { deserializeShieldListContentIntegrationV2025R0 } from './shieldListContentIntegrationV2025R0.generated.js'; +import { ShieldListContentCountryV2025R0 } from './shieldListContentCountryV2025R0.generated.js'; +import { ShieldListContentDomainV2025R0 } from './shieldListContentDomainV2025R0.generated.js'; +import { ShieldListContentEmailV2025R0 } from './shieldListContentEmailV2025R0.generated.js'; +import { ShieldListContentIpV2025R0 } from './shieldListContentIpV2025R0.generated.js'; +import { ShieldListContentIntegrationV2025R0 } from './shieldListContentIntegrationV2025R0.generated.js'; +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export type ShieldListContentV2025R0 = + | ShieldListContentCountryV2025R0 + | ShieldListContentDomainV2025R0 + | ShieldListContentEmailV2025R0 + | ShieldListContentIpV2025R0 + | ShieldListContentIntegrationV2025R0; +export function serializeShieldListContentV2025R0(val: any): SerializedData { + if (val.type == 'country') { + return serializeShieldListContentCountryV2025R0(val); + } + if (val.type == 'domain') { + return serializeShieldListContentDomainV2025R0(val); + } + if (val.type == 'email') { + return serializeShieldListContentEmailV2025R0(val); + } + if (val.type == 'ip') { + return serializeShieldListContentIpV2025R0(val); + } + if (val.type == 'integration') { + return serializeShieldListContentIntegrationV2025R0(val); + } + throw new BoxSdkError({ message: 'unknown type' }); +} +export function deserializeShieldListContentV2025R0( + val: SerializedData, +): ShieldListContentV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListContentV2025R0"', + }); + } + if (val.type == 'country') { + return deserializeShieldListContentCountryV2025R0(val); + } + if (val.type == 'domain') { + return deserializeShieldListContentDomainV2025R0(val); + } + if (val.type == 'email') { + return deserializeShieldListContentEmailV2025R0(val); + } + if (val.type == 'ip') { + return deserializeShieldListContentIpV2025R0(val); + } + if (val.type == 'integration') { + return deserializeShieldListContentIntegrationV2025R0(val); + } + throw new BoxSdkError({ + message: "Can't deserialize ShieldListContentV2025R0", + }); +} diff --git a/src/schemas/v2025R0/shieldListMiniV2025R0.generated.ts b/src/schemas/v2025R0/shieldListMiniV2025R0.generated.ts new file mode 100644 index 00000000..e1f90735 --- /dev/null +++ b/src/schemas/v2025R0/shieldListMiniV2025R0.generated.ts @@ -0,0 +1,226 @@ +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export type ShieldListMiniV2025R0TypeField = 'shield_list'; +export interface ShieldListMiniV2025R0ContentField { + /** + * The type of content in the shield list. */ + readonly type?: string; + readonly rawData?: SerializedData; +} +export class ShieldListMiniV2025R0 { + /** + * Unique global identifier for this list */ + readonly id!: string; + /** + * The type of object */ + readonly type: ShieldListMiniV2025R0TypeField = + 'shield_list' as ShieldListMiniV2025R0TypeField; + /** + * Name of Shield List */ + readonly name!: string; + readonly content!: ShieldListMiniV2025R0ContentField; + readonly rawData?: SerializedData; + constructor( + fields: Omit & + Partial>, + ) { + if (fields.id !== undefined) { + this.id = fields.id; + } + if (fields.type !== undefined) { + this.type = fields.type; + } + if (fields.name !== undefined) { + this.name = fields.name; + } + if (fields.content !== undefined) { + this.content = fields.content; + } + if (fields.rawData !== undefined) { + this.rawData = fields.rawData; + } + } +} +export interface ShieldListMiniV2025R0Input { + /** + * Unique global identifier for this list */ + readonly id: string; + /** + * The type of object */ + readonly type?: ShieldListMiniV2025R0TypeField; + /** + * Name of Shield List */ + readonly name: string; + readonly content: ShieldListMiniV2025R0ContentField; + readonly rawData?: SerializedData; +} +export function serializeShieldListMiniV2025R0TypeField( + val: ShieldListMiniV2025R0TypeField, +): SerializedData { + return val; +} +export function deserializeShieldListMiniV2025R0TypeField( + val: SerializedData, +): ShieldListMiniV2025R0TypeField { + if (val == 'shield_list') { + return val; + } + throw new BoxSdkError({ + message: "Can't deserialize ShieldListMiniV2025R0TypeField", + }); +} +export function serializeShieldListMiniV2025R0ContentField( + val: ShieldListMiniV2025R0ContentField, +): SerializedData { + return { ['type']: val.type }; +} +export function deserializeShieldListMiniV2025R0ContentField( + val: SerializedData, +): ShieldListMiniV2025R0ContentField { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListMiniV2025R0ContentField"', + }); + } + if (!(val.type == void 0) && !sdIsString(val.type)) { + throw new BoxSdkError({ + message: + 'Expecting string for "type" of type "ShieldListMiniV2025R0ContentField"', + }); + } + const type: undefined | string = val.type == void 0 ? void 0 : val.type; + return { type: type } satisfies ShieldListMiniV2025R0ContentField; +} +export function serializeShieldListMiniV2025R0( + val: ShieldListMiniV2025R0, +): SerializedData { + return { + ['id']: val.id, + ['type']: serializeShieldListMiniV2025R0TypeField(val.type), + ['name']: val.name, + ['content']: serializeShieldListMiniV2025R0ContentField(val.content), + }; +} +export function deserializeShieldListMiniV2025R0( + val: SerializedData, +): ShieldListMiniV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListMiniV2025R0"', + }); + } + if (val.id == void 0) { + throw new BoxSdkError({ + message: 'Expecting "id" of type "ShieldListMiniV2025R0" to be defined', + }); + } + if (!sdIsString(val.id)) { + throw new BoxSdkError({ + message: 'Expecting string for "id" of type "ShieldListMiniV2025R0"', + }); + } + const id: string = val.id; + if (val.type == void 0) { + throw new BoxSdkError({ + message: 'Expecting "type" of type "ShieldListMiniV2025R0" to be defined', + }); + } + const type: ShieldListMiniV2025R0TypeField = + deserializeShieldListMiniV2025R0TypeField(val.type); + if (val.name == void 0) { + throw new BoxSdkError({ + message: 'Expecting "name" of type "ShieldListMiniV2025R0" to be defined', + }); + } + if (!sdIsString(val.name)) { + throw new BoxSdkError({ + message: 'Expecting string for "name" of type "ShieldListMiniV2025R0"', + }); + } + const name: string = val.name; + if (val.content == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "content" of type "ShieldListMiniV2025R0" to be defined', + }); + } + const content: ShieldListMiniV2025R0ContentField = + deserializeShieldListMiniV2025R0ContentField(val.content); + return { + id: id, + type: type, + name: name, + content: content, + } satisfies ShieldListMiniV2025R0; +} +export function serializeShieldListMiniV2025R0Input( + val: ShieldListMiniV2025R0Input, +): SerializedData { + return { + ['id']: val.id, + ['type']: + val.type == void 0 + ? val.type + : serializeShieldListMiniV2025R0TypeField(val.type), + ['name']: val.name, + ['content']: serializeShieldListMiniV2025R0ContentField(val.content), + }; +} +export function deserializeShieldListMiniV2025R0Input( + val: SerializedData, +): ShieldListMiniV2025R0Input { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListMiniV2025R0Input"', + }); + } + if (val.id == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "id" of type "ShieldListMiniV2025R0Input" to be defined', + }); + } + if (!sdIsString(val.id)) { + throw new BoxSdkError({ + message: 'Expecting string for "id" of type "ShieldListMiniV2025R0Input"', + }); + } + const id: string = val.id; + const type: undefined | ShieldListMiniV2025R0TypeField = + val.type == void 0 + ? void 0 + : deserializeShieldListMiniV2025R0TypeField(val.type); + if (val.name == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "name" of type "ShieldListMiniV2025R0Input" to be defined', + }); + } + if (!sdIsString(val.name)) { + throw new BoxSdkError({ + message: + 'Expecting string for "name" of type "ShieldListMiniV2025R0Input"', + }); + } + const name: string = val.name; + if (val.content == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "content" of type "ShieldListMiniV2025R0Input" to be defined', + }); + } + const content: ShieldListMiniV2025R0ContentField = + deserializeShieldListMiniV2025R0ContentField(val.content); + return { + id: id, + type: type, + name: name, + content: content, + } satisfies ShieldListMiniV2025R0Input; +} diff --git a/src/schemas/v2025R0/shieldListV2025R0.generated.ts b/src/schemas/v2025R0/shieldListV2025R0.generated.ts new file mode 100644 index 00000000..9b0b3019 --- /dev/null +++ b/src/schemas/v2025R0/shieldListV2025R0.generated.ts @@ -0,0 +1,153 @@ +import { serializeEnterpriseReferenceV2025R0 } from './enterpriseReferenceV2025R0.generated.js'; +import { deserializeEnterpriseReferenceV2025R0 } from './enterpriseReferenceV2025R0.generated.js'; +import { serializeShieldListContentV2025R0 } from './shieldListContentV2025R0.generated.js'; +import { deserializeShieldListContentV2025R0 } from './shieldListContentV2025R0.generated.js'; +import { serializeDateTime } from '../../internal/utils.js'; +import { deserializeDateTime } from '../../internal/utils.js'; +import { EnterpriseReferenceV2025R0 } from './enterpriseReferenceV2025R0.generated.js'; +import { ShieldListContentV2025R0 } from './shieldListContentV2025R0.generated.js'; +import { BoxSdkError } from '../../box/errors.js'; +import { DateTime } from '../../internal/utils.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export interface ShieldListV2025R0 { + /** + * Unique identifier for the shield list. */ + readonly id: string; + /** + * Type of the object. */ + readonly type: string; + /** + * Name of the shield list. */ + readonly name: string; + readonly enterprise: EnterpriseReferenceV2025R0; + /** + * Description of Shield List */ + readonly description?: string; + /** + * ISO date time string when this shield list object was created. */ + readonly createdAt: DateTime; + /** + * ISO date time string when this shield list object was updated. */ + readonly updatedAt: DateTime; + readonly content: ShieldListContentV2025R0; + readonly rawData?: SerializedData; +} +export function serializeShieldListV2025R0( + val: ShieldListV2025R0, +): SerializedData { + return { + ['id']: val.id, + ['type']: val.type, + ['name']: val.name, + ['enterprise']: serializeEnterpriseReferenceV2025R0(val.enterprise), + ['description']: val.description, + ['created_at']: serializeDateTime(val.createdAt), + ['updated_at']: serializeDateTime(val.updatedAt), + ['content']: serializeShieldListContentV2025R0(val.content), + }; +} +export function deserializeShieldListV2025R0( + val: SerializedData, +): ShieldListV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListV2025R0"', + }); + } + if (val.id == void 0) { + throw new BoxSdkError({ + message: 'Expecting "id" of type "ShieldListV2025R0" to be defined', + }); + } + if (!sdIsString(val.id)) { + throw new BoxSdkError({ + message: 'Expecting string for "id" of type "ShieldListV2025R0"', + }); + } + const id: string = val.id; + if (val.type == void 0) { + throw new BoxSdkError({ + message: 'Expecting "type" of type "ShieldListV2025R0" to be defined', + }); + } + if (!sdIsString(val.type)) { + throw new BoxSdkError({ + message: 'Expecting string for "type" of type "ShieldListV2025R0"', + }); + } + const type: string = val.type; + if (val.name == void 0) { + throw new BoxSdkError({ + message: 'Expecting "name" of type "ShieldListV2025R0" to be defined', + }); + } + if (!sdIsString(val.name)) { + throw new BoxSdkError({ + message: 'Expecting string for "name" of type "ShieldListV2025R0"', + }); + } + const name: string = val.name; + if (val.enterprise == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "enterprise" of type "ShieldListV2025R0" to be defined', + }); + } + const enterprise: EnterpriseReferenceV2025R0 = + deserializeEnterpriseReferenceV2025R0(val.enterprise); + if (!(val.description == void 0) && !sdIsString(val.description)) { + throw new BoxSdkError({ + message: 'Expecting string for "description" of type "ShieldListV2025R0"', + }); + } + const description: undefined | string = + val.description == void 0 ? void 0 : val.description; + if (val.created_at == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "created_at" of type "ShieldListV2025R0" to be defined', + }); + } + if (!sdIsString(val.created_at)) { + throw new BoxSdkError({ + message: 'Expecting string for "created_at" of type "ShieldListV2025R0"', + }); + } + const createdAt: DateTime = deserializeDateTime(val.created_at); + if (val.updated_at == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "updated_at" of type "ShieldListV2025R0" to be defined', + }); + } + if (!sdIsString(val.updated_at)) { + throw new BoxSdkError({ + message: 'Expecting string for "updated_at" of type "ShieldListV2025R0"', + }); + } + const updatedAt: DateTime = deserializeDateTime(val.updated_at); + if (val.content == void 0) { + throw new BoxSdkError({ + message: 'Expecting "content" of type "ShieldListV2025R0" to be defined', + }); + } + const content: ShieldListContentV2025R0 = deserializeShieldListContentV2025R0( + val.content, + ); + return { + id: id, + type: type, + name: name, + enterprise: enterprise, + description: description, + createdAt: createdAt, + updatedAt: updatedAt, + content: content, + } satisfies ShieldListV2025R0; +} diff --git a/src/schemas/v2025R0/shieldListsCreateV2025R0.generated.ts b/src/schemas/v2025R0/shieldListsCreateV2025R0.generated.ts new file mode 100644 index 00000000..e72aeabd --- /dev/null +++ b/src/schemas/v2025R0/shieldListsCreateV2025R0.generated.ts @@ -0,0 +1,72 @@ +import { serializeShieldListContentRequestV2025R0 } from './shieldListContentRequestV2025R0.generated.js'; +import { deserializeShieldListContentRequestV2025R0 } from './shieldListContentRequestV2025R0.generated.js'; +import { ShieldListContentRequestV2025R0 } from './shieldListContentRequestV2025R0.generated.js'; +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export interface ShieldListsCreateV2025R0 { + /** + * The name of the shield list. */ + readonly name: string; + /** + * Description of Shield List: Optional. */ + readonly description?: string; + readonly content: ShieldListContentRequestV2025R0; + readonly rawData?: SerializedData; +} +export function serializeShieldListsCreateV2025R0( + val: ShieldListsCreateV2025R0, +): SerializedData { + return { + ['name']: val.name, + ['description']: val.description, + ['content']: serializeShieldListContentRequestV2025R0(val.content), + }; +} +export function deserializeShieldListsCreateV2025R0( + val: SerializedData, +): ShieldListsCreateV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListsCreateV2025R0"', + }); + } + if (val.name == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "name" of type "ShieldListsCreateV2025R0" to be defined', + }); + } + if (!sdIsString(val.name)) { + throw new BoxSdkError({ + message: 'Expecting string for "name" of type "ShieldListsCreateV2025R0"', + }); + } + const name: string = val.name; + if (!(val.description == void 0) && !sdIsString(val.description)) { + throw new BoxSdkError({ + message: + 'Expecting string for "description" of type "ShieldListsCreateV2025R0"', + }); + } + const description: undefined | string = + val.description == void 0 ? void 0 : val.description; + if (val.content == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "content" of type "ShieldListsCreateV2025R0" to be defined', + }); + } + const content: ShieldListContentRequestV2025R0 = + deserializeShieldListContentRequestV2025R0(val.content); + return { + name: name, + description: description, + content: content, + } satisfies ShieldListsCreateV2025R0; +} diff --git a/src/schemas/v2025R0/shieldListsUpdateV2025R0.generated.ts b/src/schemas/v2025R0/shieldListsUpdateV2025R0.generated.ts new file mode 100644 index 00000000..f80fd994 --- /dev/null +++ b/src/schemas/v2025R0/shieldListsUpdateV2025R0.generated.ts @@ -0,0 +1,72 @@ +import { serializeShieldListContentRequestV2025R0 } from './shieldListContentRequestV2025R0.generated.js'; +import { deserializeShieldListContentRequestV2025R0 } from './shieldListContentRequestV2025R0.generated.js'; +import { ShieldListContentRequestV2025R0 } from './shieldListContentRequestV2025R0.generated.js'; +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export interface ShieldListsUpdateV2025R0 { + /** + * The name of the shield list. */ + readonly name: string; + /** + * Description of Shield List: Optional. */ + readonly description?: string; + readonly content: ShieldListContentRequestV2025R0; + readonly rawData?: SerializedData; +} +export function serializeShieldListsUpdateV2025R0( + val: ShieldListsUpdateV2025R0, +): SerializedData { + return { + ['name']: val.name, + ['description']: val.description, + ['content']: serializeShieldListContentRequestV2025R0(val.content), + }; +} +export function deserializeShieldListsUpdateV2025R0( + val: SerializedData, +): ShieldListsUpdateV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListsUpdateV2025R0"', + }); + } + if (val.name == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "name" of type "ShieldListsUpdateV2025R0" to be defined', + }); + } + if (!sdIsString(val.name)) { + throw new BoxSdkError({ + message: 'Expecting string for "name" of type "ShieldListsUpdateV2025R0"', + }); + } + const name: string = val.name; + if (!(val.description == void 0) && !sdIsString(val.description)) { + throw new BoxSdkError({ + message: + 'Expecting string for "description" of type "ShieldListsUpdateV2025R0"', + }); + } + const description: undefined | string = + val.description == void 0 ? void 0 : val.description; + if (val.content == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "content" of type "ShieldListsUpdateV2025R0" to be defined', + }); + } + const content: ShieldListContentRequestV2025R0 = + deserializeShieldListContentRequestV2025R0(val.content); + return { + name: name, + description: description, + content: content, + } satisfies ShieldListsUpdateV2025R0; +} diff --git a/src/schemas/v2025R0/shieldListsV2025R0.generated.ts b/src/schemas/v2025R0/shieldListsV2025R0.generated.ts new file mode 100644 index 00000000..fd26bbf2 --- /dev/null +++ b/src/schemas/v2025R0/shieldListsV2025R0.generated.ts @@ -0,0 +1,56 @@ +import { serializeShieldListMiniV2025R0 } from './shieldListMiniV2025R0.generated.js'; +import { deserializeShieldListMiniV2025R0 } from './shieldListMiniV2025R0.generated.js'; +import { ShieldListMiniV2025R0 } from './shieldListMiniV2025R0.generated.js'; +import { BoxSdkError } from '../../box/errors.js'; +import { SerializedData } from '../../serialization/json.js'; +import { sdIsEmpty } from '../../serialization/json.js'; +import { sdIsBoolean } from '../../serialization/json.js'; +import { sdIsNumber } from '../../serialization/json.js'; +import { sdIsString } from '../../serialization/json.js'; +import { sdIsList } from '../../serialization/json.js'; +import { sdIsMap } from '../../serialization/json.js'; +export interface ShieldListsV2025R0 { + /** + * A list of shield list objects */ + readonly entries?: readonly ShieldListMiniV2025R0[]; + readonly rawData?: SerializedData; +} +export function serializeShieldListsV2025R0( + val: ShieldListsV2025R0, +): SerializedData { + return { + ['entries']: + val.entries == void 0 + ? val.entries + : (val.entries.map(function ( + item: ShieldListMiniV2025R0, + ): SerializedData { + return serializeShieldListMiniV2025R0(item); + }) as readonly any[]), + }; +} +export function deserializeShieldListsV2025R0( + val: SerializedData, +): ShieldListsV2025R0 { + if (!sdIsMap(val)) { + throw new BoxSdkError({ + message: 'Expecting a map for "ShieldListsV2025R0"', + }); + } + if (!(val.entries == void 0) && !sdIsList(val.entries)) { + throw new BoxSdkError({ + message: 'Expecting array for "entries" of type "ShieldListsV2025R0"', + }); + } + const entries: undefined | readonly ShieldListMiniV2025R0[] = + val.entries == void 0 + ? void 0 + : sdIsList(val.entries) + ? (val.entries.map(function ( + itm: SerializedData, + ): ShieldListMiniV2025R0 { + return deserializeShieldListMiniV2025R0(itm); + }) as readonly any[]) + : []; + return { entries: entries } satisfies ShieldListsV2025R0; +} From b2f0afb8844e4be775d1e4dd1bab5d6a966295c2 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Thu, 29 May 2025 05:12:43 -0700 Subject: [PATCH 10/13] fix: Fix `mergeMaps` function in Java (box/box-codegen#734) --- .codegen.json | 2 +- package-lock.json | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.codegen.json b/.codegen.json index a7680394..1e17650d 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "20cb559", "specHash": "630fc85", "version": "1.15.1" } +{ "engineHash": "8db92f5", "specHash": "630fc85", "version": "1.15.1" } diff --git a/package-lock.json b/package-lock.json index 3254b374..0a6d4d43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2155,9 +2155,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", - "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", + "integrity": "sha512-PJ8gYKeS5e/whHBh8xrwYK+dAvEj7JXtz6uTucnMRB8OiGTsKccFekoRrjajPBHV8oOY+2tI4uxeceSimKwMFA==", "dev": true, "funding": [ { @@ -2175,8 +2175,8 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001716", - "electron-to-chromium": "^1.5.149", + "caniuse-lite": "^1.0.30001718", + "electron-to-chromium": "^1.5.160", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, @@ -2275,9 +2275,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001718", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", - "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", + "version": "1.0.30001720", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001720.tgz", + "integrity": "sha512-Ec/2yV2nNPwb4DnTANEV99ZWwm3ZWfdlfkQbWSDDt+PsXEVYwlhPH8tdMaPunYTKKmz7AnHi2oNEi1GcmKCD8g==", "dev": true, "funding": [ { @@ -2612,9 +2612,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.159", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.159.tgz", - "integrity": "sha512-CEvHptWAMV5p6GJ0Lq8aheyvVbfzVrv5mmidu1D3pidoVNkB3tTBsTMVtPJ+rzRK5oV229mCLz9Zj/hNvU8GBA==", + "version": "1.5.161", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.161.tgz", + "integrity": "sha512-hwtetwfKNZo/UlwHIVBlKZVdy7o8bIZxxKs0Mv/ROPiQQQmDgdm5a+KvKtBsxM8ZjFzTaCeLoodZ8jiBE3o9rA==", "dev": true, "license": "ISC" }, From 30a427888fd0896161933e4359a5979c157ba143 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 2 Jun 2025 06:12:16 -0700 Subject: [PATCH 11/13] fix: fix backslash and forward slash escaping in TS and Python (box/box-codegen#736) --- .codegen.json | 2 +- package-lock.json | 38 +++++++++++++------------- src/internal/utilsBrowser.ts | 2 +- src/internal/utilsNode.ts | 2 +- src/test/webhooks.generated.test.ts | 42 +++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 22 deletions(-) diff --git a/.codegen.json b/.codegen.json index 1e17650d..6fd2ccc4 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "8db92f5", "specHash": "630fc85", "version": "1.15.1" } +{ "engineHash": "70390f5", "specHash": "630fc85", "version": "1.15.1" } diff --git a/package-lock.json b/package-lock.json index 0a6d4d43..dddc7a30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,9 +77,9 @@ } }, "node_modules/@babel/core": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.3.tgz", - "integrity": "sha512-hyrN8ivxfvJ4i0fIJuV4EOlV0WDMz5Ui4StRTgVaAvWeiRCilXgwVvxJKtFQ3TKtHgJscB2YiXKGNJuVwhQMtA==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.4.tgz", + "integrity": "sha512-bXYxrXFubeYdvB0NhD/NBB3Qi6aZeV20GOWVI47t2dkecCEoneR4NPVcb7abpXDEvejgrUfFtG6vG/zxAKmg+g==", "dev": true, "license": "MIT", "dependencies": { @@ -88,10 +88,10 @@ "@babel/generator": "^7.27.3", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-module-transforms": "^7.27.3", - "@babel/helpers": "^7.27.3", - "@babel/parser": "^7.27.3", + "@babel/helpers": "^7.27.4", + "@babel/parser": "^7.27.4", "@babel/template": "^7.27.2", - "@babel/traverse": "^7.27.3", + "@babel/traverse": "^7.27.4", "@babel/types": "^7.27.3", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -214,9 +214,9 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.3.tgz", - "integrity": "sha512-h/eKy9agOya1IGuLaZ9tEUgz+uIRXcbtOhRtUyyMf8JFmn1iT13vnl/IGVWSkdOCG/pC57U4S1jnAabAavTMwg==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.4.tgz", + "integrity": "sha512-Y+bO6U+I7ZKaM5G5rDUZiYfUvQPUibYmAFe7EnKdnKBbVXDZxvp+MWOH5gYciY0EPk4EScsuFMQBbEfpdRKSCQ==", "dev": true, "license": "MIT", "dependencies": { @@ -228,9 +228,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.3.tgz", - "integrity": "sha512-xyYxRj6+tLNDTWi0KCBcZ9V7yg3/lwL9DWh9Uwh/RIVlIfFidggcgxKX3GCXwCiswwcGRawBKbEg2LG/Y8eJhw==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.4.tgz", + "integrity": "sha512-BRmLHGwpUqLFR2jzx9orBuX/ABDkj2jLKOXrHDTN2aOKL+jFDDKaRNo9nyYsIl9h/UE/7lMKdDjKQQyxKKDZ7g==", "dev": true, "license": "MIT", "dependencies": { @@ -498,15 +498,15 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.3.tgz", - "integrity": "sha512-lId/IfN/Ye1CIu8xG7oKBHXd2iNb2aW1ilPszzGcJug6M8RCKfVNcYhpI5+bMvFYjK7lXIM0R+a+6r8xhHp2FQ==", + "version": "7.27.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz", + "integrity": "sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.27.3", - "@babel/parser": "^7.27.3", + "@babel/parser": "^7.27.4", "@babel/template": "^7.27.2", "@babel/types": "^7.27.3", "debug": "^4.3.1", @@ -1535,9 +1535,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "22.15.24", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.24.tgz", - "integrity": "sha512-w9CZGm9RDjzTh/D+hFwlBJ3ziUaVw7oufKA3vOFSOZlzmW9AkZnfjPb+DLnrV6qtgL/LNmP0/2zBNCFHL3F0ng==", + "version": "22.15.29", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", + "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/src/internal/utilsBrowser.ts b/src/internal/utilsBrowser.ts index d9316db3..351eae04 100644 --- a/src/internal/utilsBrowser.ts +++ b/src/internal/utilsBrowser.ts @@ -291,7 +291,7 @@ export async function computeWebhookSignature( signatureKey: string, ): Promise { const escapedBody = jsonStringifyWithEscapedUnicode(body).replace( - /\//g, + /(? { const escapedBody = jsonStringifyWithEscapedUnicode(body).replace( - /\//g, + /(? Date: Tue, 3 Jun 2025 02:42:10 -0700 Subject: [PATCH 12/13] chore: Release Java SDK to Maven Central (box/box-codegen#735) --- .codegen.json | 2 +- package-lock.json | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.codegen.json b/.codegen.json index 6fd2ccc4..8e7ddf90 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "70390f5", "specHash": "630fc85", "version": "1.15.1" } +{ "engineHash": "4f12f8f", "specHash": "630fc85", "version": "1.15.1" } diff --git a/package-lock.json b/package-lock.json index dddc7a30..2248503d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2612,9 +2612,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.161", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.161.tgz", - "integrity": "sha512-hwtetwfKNZo/UlwHIVBlKZVdy7o8bIZxxKs0Mv/ROPiQQQmDgdm5a+KvKtBsxM8ZjFzTaCeLoodZ8jiBE3o9rA==", + "version": "1.5.162", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.162.tgz", + "integrity": "sha512-hQA+Zb5QQwoSaXJWEAGEw1zhk//O7qDzib05Z4qTqZfNju/FAkrm5ZInp0JbTp4Z18A6bilopdZWEYrFSsfllA==", "dev": true, "license": "ISC" }, @@ -5889,9 +5889,9 @@ } }, "node_modules/webpack-sources": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.0.tgz", - "integrity": "sha512-77R0RDmJfj9dyv5p3bM5pOHa+X8/ZkO9c7kpDstigkC4nIDobadsfSGCwB4bKhMVxqAok8tajaoR8rirM7+VFQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.2.tgz", + "integrity": "sha512-ykKKus8lqlgXX/1WjudpIEjqsafjOTcOJqxnAbMLAu/KCsDCJ6GBtvscewvTkrn24HsnvFwrSCbenFrhtcCsAA==", "dev": true, "license": "MIT", "peer": true, From 23e8bc97a9796f36fcc581e1a23bec2f56728540 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 4 Jun 2025 03:42:05 -0700 Subject: [PATCH 13/13] test: Support shield lists itest (box/box-codegen#720) --- .codegen.json | 2 +- docs/shieldLists.md | 44 +++++++- package-lock.json | 32 +++--- src/test/shieldLists.generated.test.ts | 145 +++++++++++++++++++++++++ 4 files changed, 201 insertions(+), 22 deletions(-) create mode 100644 src/test/shieldLists.generated.test.ts diff --git a/.codegen.json b/.codegen.json index 8e7ddf90..3c0f262a 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "4f12f8f", "specHash": "630fc85", "version": "1.15.1" } +{ "engineHash": "c17f683", "specHash": "630fc85", "version": "1.15.1" } diff --git a/docs/shieldLists.md b/docs/shieldLists.md index 5f6d686e..e7b88dee 100644 --- a/docs/shieldLists.md +++ b/docs/shieldLists.md @@ -15,7 +15,11 @@ This operation is performed by calling function `getShieldListsV2025R0`. See the endpoint docs at [API Reference](https://developer.box.com/reference/v2025.0/get-shield-lists/). -_Currently we don't have an example for calling `getShieldListsV2025R0` in integration tests_ + + +```ts +await client.shieldLists.getShieldListsV2025R0(); +``` ### Arguments @@ -39,7 +43,18 @@ This operation is performed by calling function `createShieldListV2025R0`. See the endpoint docs at [API Reference](https://developer.box.com/reference/v2025.0/post-shield-lists/). -_Currently we don't have an example for calling `createShieldListV2025R0` in integration tests_ + + +```ts +await client.shieldLists.createShieldListV2025R0({ + name: shieldListCountryName, + description: 'A list of things that are shielded', + content: new ShieldListContentCountryV2025R0({ + type: 'country' as ShieldListContentCountryV2025R0TypeField, + countryCodes: ['US' as string, 'PL' as string], + }), +} satisfies ShieldListsCreateV2025R0); +``` ### Arguments @@ -63,7 +78,11 @@ This operation is performed by calling function `getShieldListByIdV2025R0`. See the endpoint docs at [API Reference](https://developer.box.com/reference/v2025.0/get-shield-lists-id/). -_Currently we don't have an example for calling `getShieldListByIdV2025R0` in integration tests_ + + +```ts +await client.shieldLists.getShieldListByIdV2025R0(shieldListCountry.id); +``` ### Arguments @@ -87,7 +106,11 @@ This operation is performed by calling function `deleteShieldListByIdV2025R0`. See the endpoint docs at [API Reference](https://developer.box.com/reference/v2025.0/delete-shield-lists-id/). -_Currently we don't have an example for calling `deleteShieldListByIdV2025R0` in integration tests_ + + +```ts +await client.shieldLists.deleteShieldListByIdV2025R0(shieldListCountry.id); +``` ### Arguments @@ -111,7 +134,18 @@ This operation is performed by calling function `updateShieldListByIdV2025R0`. See the endpoint docs at [API Reference](https://developer.box.com/reference/v2025.0/put-shield-lists-id/). -_Currently we don't have an example for calling `updateShieldListByIdV2025R0` in integration tests_ + + +```ts +await client.shieldLists.updateShieldListByIdV2025R0(shieldListCountry.id, { + name: shieldListCountryName, + description: 'Updated description', + content: new ShieldListContentCountryV2025R0({ + type: 'country' as ShieldListContentCountryV2025R0TypeField, + countryCodes: ['US' as string], + }), +} satisfies ShieldListsUpdateV2025R0); +``` ### Arguments diff --git a/package-lock.json b/package-lock.json index 2248503d..20884c86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -67,9 +67,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.3.tgz", - "integrity": "sha512-V42wFfx1ymFte+ecf6iXghnnP8kWTO+ZLXIyZq+1LAXHHvTZdVxicn4yiVYdYMGaCO3tmqub11AorKkv+iodqw==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.5.tgz", + "integrity": "sha512-KiRAp/VoJaWkkte84TvUd9qjdbZAdiqyvMxrGl1N6vzFogKmaLgoM3L1kgtLicp2HP5fBJS8JrZKLVIZGVJAVg==", "dev": true, "license": "MIT", "engines": { @@ -108,13 +108,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", - "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", + "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.3", + "@babel/parser": "^7.27.5", "@babel/types": "^7.27.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", @@ -228,9 +228,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.4.tgz", - "integrity": "sha512-BRmLHGwpUqLFR2jzx9orBuX/ABDkj2jLKOXrHDTN2aOKL+jFDDKaRNo9nyYsIl9h/UE/7lMKdDjKQQyxKKDZ7g==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz", + "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==", "dev": true, "license": "MIT", "dependencies": { @@ -2275,9 +2275,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001720", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001720.tgz", - "integrity": "sha512-Ec/2yV2nNPwb4DnTANEV99ZWwm3ZWfdlfkQbWSDDt+PsXEVYwlhPH8tdMaPunYTKKmz7AnHi2oNEi1GcmKCD8g==", + "version": "1.0.30001721", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001721.tgz", + "integrity": "sha512-cOuvmUVtKrtEaoKiO0rSc29jcjwMwX5tOHDy4MgVFEWiUXj4uBMJkwI8MDySkgXidpMiHUcviogAvFi4pA2hDQ==", "dev": true, "funding": [ { @@ -2612,9 +2612,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.162", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.162.tgz", - "integrity": "sha512-hQA+Zb5QQwoSaXJWEAGEw1zhk//O7qDzib05Z4qTqZfNju/FAkrm5ZInp0JbTp4Z18A6bilopdZWEYrFSsfllA==", + "version": "1.5.164", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.164.tgz", + "integrity": "sha512-TXBrF2aZenRjY3wbj5Yc0mZn43lMiSHNkzwPkIxx+vWUB35Kf8Gm/uOYmOJFNQ7SUwWAinbfxX73ANIud65wSA==", "dev": true, "license": "ISC" }, diff --git a/src/test/shieldLists.generated.test.ts b/src/test/shieldLists.generated.test.ts new file mode 100644 index 00000000..bc75d21c --- /dev/null +++ b/src/test/shieldLists.generated.test.ts @@ -0,0 +1,145 @@ +import { serializeShieldListV2025R0 } from '../schemas/v2025R0/shieldListV2025R0.generated.js'; +import { deserializeShieldListV2025R0 } from '../schemas/v2025R0/shieldListV2025R0.generated.js'; +import { serializeShieldListsCreateV2025R0 } from '../schemas/v2025R0/shieldListsCreateV2025R0.generated.js'; +import { deserializeShieldListsCreateV2025R0 } from '../schemas/v2025R0/shieldListsCreateV2025R0.generated.js'; +import { serializeShieldListContentCountryV2025R0TypeField } from '../schemas/v2025R0/shieldListContentCountryV2025R0.generated.js'; +import { deserializeShieldListContentCountryV2025R0TypeField } from '../schemas/v2025R0/shieldListContentCountryV2025R0.generated.js'; +import { serializeShieldListContentDomainV2025R0TypeField } from '../schemas/v2025R0/shieldListContentDomainV2025R0.generated.js'; +import { deserializeShieldListContentDomainV2025R0TypeField } from '../schemas/v2025R0/shieldListContentDomainV2025R0.generated.js'; +import { serializeShieldListContentEmailV2025R0TypeField } from '../schemas/v2025R0/shieldListContentEmailV2025R0.generated.js'; +import { deserializeShieldListContentEmailV2025R0TypeField } from '../schemas/v2025R0/shieldListContentEmailV2025R0.generated.js'; +import { serializeShieldListContentIpV2025R0TypeField } from '../schemas/v2025R0/shieldListContentIpV2025R0.generated.js'; +import { deserializeShieldListContentIpV2025R0TypeField } from '../schemas/v2025R0/shieldListContentIpV2025R0.generated.js'; +import { serializeShieldListsV2025R0 } from '../schemas/v2025R0/shieldListsV2025R0.generated.js'; +import { deserializeShieldListsV2025R0 } from '../schemas/v2025R0/shieldListsV2025R0.generated.js'; +import { serializeShieldListsUpdateV2025R0 } from '../schemas/v2025R0/shieldListsUpdateV2025R0.generated.js'; +import { deserializeShieldListsUpdateV2025R0 } from '../schemas/v2025R0/shieldListsUpdateV2025R0.generated.js'; +import { serializeShieldListContentCountryV2025R0 } from '../schemas/v2025R0/shieldListContentCountryV2025R0.generated.js'; +import { deserializeShieldListContentCountryV2025R0 } from '../schemas/v2025R0/shieldListContentCountryV2025R0.generated.js'; +import { serializeShieldListContentDomainV2025R0 } from '../schemas/v2025R0/shieldListContentDomainV2025R0.generated.js'; +import { deserializeShieldListContentDomainV2025R0 } from '../schemas/v2025R0/shieldListContentDomainV2025R0.generated.js'; +import { serializeShieldListContentEmailV2025R0 } from '../schemas/v2025R0/shieldListContentEmailV2025R0.generated.js'; +import { deserializeShieldListContentEmailV2025R0 } from '../schemas/v2025R0/shieldListContentEmailV2025R0.generated.js'; +import { serializeShieldListContentIpV2025R0 } from '../schemas/v2025R0/shieldListContentIpV2025R0.generated.js'; +import { deserializeShieldListContentIpV2025R0 } from '../schemas/v2025R0/shieldListContentIpV2025R0.generated.js'; +import { BoxClient } from '../client.generated.js'; +import { ShieldListV2025R0 } from '../schemas/v2025R0/shieldListV2025R0.generated.js'; +import { ShieldListsCreateV2025R0 } from '../schemas/v2025R0/shieldListsCreateV2025R0.generated.js'; +import { ShieldListContentCountryV2025R0TypeField } from '../schemas/v2025R0/shieldListContentCountryV2025R0.generated.js'; +import { ShieldListContentDomainV2025R0TypeField } from '../schemas/v2025R0/shieldListContentDomainV2025R0.generated.js'; +import { ShieldListContentEmailV2025R0TypeField } from '../schemas/v2025R0/shieldListContentEmailV2025R0.generated.js'; +import { ShieldListContentIpV2025R0TypeField } from '../schemas/v2025R0/shieldListContentIpV2025R0.generated.js'; +import { ShieldListsV2025R0 } from '../schemas/v2025R0/shieldListsV2025R0.generated.js'; +import { ShieldListsUpdateV2025R0 } from '../schemas/v2025R0/shieldListsUpdateV2025R0.generated.js'; +import { getUuid } from '../internal/utils.js'; +import { getEnvVar } from '../internal/utils.js'; +import { uploadNewFile } from './commons.generated.js'; +import { createNewFolder } from './commons.generated.js'; +import { getDefaultClientWithUserSubject } from './commons.generated.js'; +import { ShieldListContentCountryV2025R0 } from '../schemas/v2025R0/shieldListContentCountryV2025R0.generated.js'; +import { ShieldListContentDomainV2025R0 } from '../schemas/v2025R0/shieldListContentDomainV2025R0.generated.js'; +import { ShieldListContentEmailV2025R0 } from '../schemas/v2025R0/shieldListContentEmailV2025R0.generated.js'; +import { ShieldListContentIpV2025R0 } from '../schemas/v2025R0/shieldListContentIpV2025R0.generated.js'; +import { SerializedData } from '../serialization/json.js'; +import { sdIsEmpty } from '../serialization/json.js'; +import { sdIsBoolean } from '../serialization/json.js'; +import { sdIsNumber } from '../serialization/json.js'; +import { sdIsString } from '../serialization/json.js'; +import { sdIsList } from '../serialization/json.js'; +import { sdIsMap } from '../serialization/json.js'; +export const userId: string = getEnvVar('USER_ID'); +export const client: BoxClient = getDefaultClientWithUserSubject(userId); +test('testCreateGetUpdateDeleteShieldList', async function testCreateGetUpdateDeleteShieldList(): Promise { + const shieldListCountryName: string = ''.concat( + getUuid(), + 'shieldListCountry', + ) as string; + const shieldListCountry: ShieldListV2025R0 = + await client.shieldLists.createShieldListV2025R0({ + name: shieldListCountryName, + description: 'A list of things that are shielded', + content: new ShieldListContentCountryV2025R0({ + type: 'country' as ShieldListContentCountryV2025R0TypeField, + countryCodes: ['US' as string, 'PL' as string], + }), + } satisfies ShieldListsCreateV2025R0); + const shieldListContentDomainName: string = ''.concat( + getUuid(), + 'shieldListContentDomain', + ) as string; + const shieldListContentDomain: ShieldListV2025R0 = + await client.shieldLists.createShieldListV2025R0({ + name: shieldListContentDomainName, + description: 'A list of things that are shielded', + content: new ShieldListContentDomainV2025R0({ + type: 'domain' as ShieldListContentDomainV2025R0TypeField, + domains: ['box.com' as string, 'example.com' as string], + }), + } satisfies ShieldListsCreateV2025R0); + const shieldListContentEmailName: string = ''.concat( + getUuid(), + 'shieldListContentEmail', + ) as string; + const shieldListContentEmail: ShieldListV2025R0 = + await client.shieldLists.createShieldListV2025R0({ + name: shieldListContentEmailName, + description: 'A list of things that are shielded', + content: new ShieldListContentEmailV2025R0({ + type: 'email' as ShieldListContentEmailV2025R0TypeField, + emailAddresses: [ + 'test@box.com' as string, + 'test@example.com' as string, + ], + }), + } satisfies ShieldListsCreateV2025R0); + const shieldListContentIpName: string = ''.concat( + getUuid(), + 'shieldListContentIp', + ) as string; + const shieldListContentIp: ShieldListV2025R0 = + await client.shieldLists.createShieldListV2025R0({ + name: shieldListContentIpName, + description: 'A list of things that are shielded', + content: new ShieldListContentIpV2025R0({ + type: 'ip' as ShieldListContentIpV2025R0TypeField, + ipAddresses: ['127.0.0.1' as string, '80.12.12.12/24' as string], + }), + } satisfies ShieldListsCreateV2025R0); + const shieldLists: ShieldListsV2025R0 = + await client.shieldLists.getShieldListsV2025R0(); + if (!(shieldLists.entries!.length > 0)) { + throw new Error('Assertion failed'); + } + const getShieldListCountry: ShieldListV2025R0 = + await client.shieldLists.getShieldListByIdV2025R0(shieldListCountry.id); + if (!(getShieldListCountry.name == shieldListCountryName)) { + throw new Error('Assertion failed'); + } + if ( + !(getShieldListCountry.description == 'A list of things that are shielded') + ) { + throw new Error('Assertion failed'); + } + await client.shieldLists.updateShieldListByIdV2025R0(shieldListCountry.id, { + name: shieldListCountryName, + description: 'Updated description', + content: new ShieldListContentCountryV2025R0({ + type: 'country' as ShieldListContentCountryV2025R0TypeField, + countryCodes: ['US' as string], + }), + } satisfies ShieldListsUpdateV2025R0); + const getShieldListCountryUpdated: ShieldListV2025R0 = + await client.shieldLists.getShieldListByIdV2025R0(shieldListCountry.id); + if (!(getShieldListCountryUpdated.description == 'Updated description')) { + throw new Error('Assertion failed'); + } + await client.shieldLists.deleteShieldListByIdV2025R0(shieldListCountry.id); + await client.shieldLists.deleteShieldListByIdV2025R0( + shieldListContentDomain.id, + ); + await client.shieldLists.deleteShieldListByIdV2025R0( + shieldListContentEmail.id, + ); + await client.shieldLists.deleteShieldListByIdV2025R0(shieldListContentIp.id); +}); +export {};