diff --git a/README.md b/README.md index 9cea278..15ab8dc 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ export default function TypescriptSdkDemo() { const client = new InstillClient( "http://localhost:8080", "v1alpha", - "" // get console API token from `http://localhost:3000/settings` + "" // get console API token from `http://localhost:3000/settings` ); useEffect(() => { @@ -110,7 +110,7 @@ export default function TypescriptSdkDemo() { const client = new InstillClient( "https://api.instill.tech", "v1alpha", - "" // console API token + "" // console API token ); useEffect(() => { @@ -164,6 +164,70 @@ export default function TypescriptSdkDemo() { ### Pipelines +### create Pipeline + +``` + +userName : check your userName: https://console.instill.tech/settings + +client.PipelineClient.createUserPipelineMutation("", + { + "id": "overseas-blue-lobster", + "recipe": { + "version": "v1alpha", + "components": [ + { + "id": "start", + "resource_name": "", + "configuration": { + "metadata": { + "text": { + "type": "text", + "title": "text" + } + } + }, + "definition_name": "operator-definitions/op-start" + }, + { + "id": "end", + "resource_name": "", + "configuration": { + "metadata": { + "output": { + "title": "output" + } + }, + "input": { + "output": "{ai_1.output.texts}" + } + }, + "definition_name": "operator-definitions/op-end" + }, + { + "id": "ai_1", + "resource_name": "users/namananand-instill-ai/connector-resources/ai2", + "configuration": { + "task": "TASK_TEXT_GENERATION", + "input": { + "prompt": "{start.text}", + "model": "gpt-3.5-turbo" + } + }, + "definition_name": "connector-definitions/ai-openai" + } + ] + } + } +).then((response) => { + console.log(response.data) +}) +.catch(error => { + console.log(error) +}) + +``` + | function | params | | :------------------------------------ | :---------------------------------------------: | | listPipelinesQuery | pageSize, nextPageToken | @@ -188,6 +252,28 @@ export default function TypescriptSdkDemo() { ### Connector +### Create new connector + +``` +userName : check your userName: https://console.instill.tech/settings + +query.ConnectorClient.createUserConnectorResourceMutation("", + { + "id": "open-ai-model-1", + "connector_definition_name": "connector-definitions/ai-openai", + "configuration": { + "organization": "my-org", + "api_key": "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" + } + } +).then((response) => { + console.log(response.data) +}) +.catch(error => { + console.log(error) +}) +``` + | function | params | | :---------------------------------------- | :---------------------------------------: | | listConnectorResourcesQuery | userName, pageSize, nextPageToken, filter | @@ -195,8 +281,8 @@ export default function TypescriptSdkDemo() { | listConnectorDefinitionsQuery | connectorDefinitionName | | getConnectorDefinitionQuery | connectorDefinitionName | | getUserConnectorResourceQuery | connectorDefinitionName | -| watchUserConnectorResource | userName, payload | -| createUserConnectorResourceMutation | connectorDefinitionName | +| watchUserConnectorResource | connectorResourceName | +| createUserConnectorResourceMutation | userName, payload | | deleteUserConnectorResourceMutation | payload | | updateUserConnectorResourceMutation | payload | | renameUserConnectorResource | payload | @@ -212,8 +298,6 @@ export default function TypescriptSdkDemo() { | listTriggeredPipelineQuery | pageSize, nextPageToken, filter | | listTriggeredPipelineChartQuery | pageSize, nextPageToken, filter | -modelDefinitionName, - ### Model | function | params | @@ -240,6 +324,22 @@ modelDefinitionName, ### Mgmt +### create API token + +``` + +client.AuthClient.createApiTokenMutation({ + "id": "aa", + "ttl": -1 +}).then((response) => { + console.log(response.data) +}) +.catch(error => { + console.log(error) +}) + +``` + | function | params | | :--------------------- | :---------------------: | | getUserQuery | | diff --git a/examples/next-app/package.json b/examples/next-app/package.json index cdf448c..2ad6e75 100644 --- a/examples/next-app/package.json +++ b/examples/next-app/package.json @@ -9,7 +9,7 @@ "lint": "next lint" }, "dependencies": { - "@instill-ai/typescript-sdk": "0.0.8-rc.12", + "@instill-ai/typescript-sdk": "0.0.11-rc.0", "next": "latest", "react": "latest", "react-dom": "latest" diff --git a/examples/next-app/pnpm-lock.yaml b/examples/next-app/pnpm-lock.yaml index 453c104..852a98b 100644 --- a/examples/next-app/pnpm-lock.yaml +++ b/examples/next-app/pnpm-lock.yaml @@ -6,11 +6,11 @@ settings: dependencies: '@instill-ai/typescript-sdk': - specifier: 0.0.8-rc.12 - version: 0.0.8-rc.12(@instill-ai/design-system@0.49.1)(@instill-ai/design-tokens@0.3.2)(@types/react-dom@18.2.8)(@types/react@18.2.23)(next@13.5.3)(react-dom@18.2.0)(react@18.2.0) + specifier: 0.0.11-rc.0 + version: 0.0.11-rc.0(@instill-ai/design-system@0.49.1)(@instill-ai/design-tokens@0.3.2)(@types/react-dom@18.2.8)(@types/react@18.2.25)(next@13.5.4)(react-dom@18.2.0)(react@18.2.0) next: specifier: latest - version: 13.5.3(react-dom@18.2.0)(react@18.2.0) + version: 13.5.4(react-dom@18.2.0)(react@18.2.0) react: specifier: latest version: 18.2.0 @@ -24,7 +24,7 @@ devDependencies: version: 20.8.0 '@types/react': specifier: latest - version: 18.2.23 + version: 18.2.25 '@types/react-dom': specifier: latest version: 18.2.8 @@ -170,7 +170,7 @@ packages: react-hook-form: 7.46.2(react@18.2.0) dev: false - /@instill-ai/design-system@0.49.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0)(tailwindcss@3.3.3): + /@instill-ai/design-system@0.49.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0)(tailwindcss@3.3.3): resolution: {integrity: sha512-Ytfz/nLUiFqJyMAnTzWWRikUn6UefXJjSRTgva3H9jltkgAamfRsRfuLoBbTDR8yWs1XMuJaZYTfdtPTf9qNpg==} engines: {node: '>=14.6.0'} peerDependencies: @@ -179,21 +179,21 @@ packages: dependencies: '@hookform/resolvers': 3.3.1(react-hook-form@7.46.2) '@instill-ai/design-tokens': 0.3.2(tailwindcss@3.3.3) - '@radix-ui/react-checkbox': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-dialog': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-dropdown-menu': 2.0.6(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-label': 2.0.2(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-popover': 1.0.7(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-scroll-area': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-select': 1.2.2(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-separator': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-switch': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-toast': 1.1.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-tooltip': 1.0.7(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-checkbox': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-dialog': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-dropdown-menu': 2.0.6(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-label': 2.0.2(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-popover': 1.0.7(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-scroll-area': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-select': 1.2.2(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-separator': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-switch': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-toast': 1.1.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-tooltip': 1.0.7(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) '@tanstack/react-table': 8.10.3(react-dom@18.2.0)(react@18.2.0) class-variance-authority: 0.6.1 - cmdk: 0.2.0(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) + cmdk: 0.2.0(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-hook-form: 7.46.2(react@18.2.0) @@ -217,7 +217,7 @@ packages: tailwindcss: 3.3.3 dev: false - /@instill-ai/toolkit@0.68.0-rc.23(@instill-ai/design-system@0.49.1)(@instill-ai/design-tokens@0.3.2)(@types/react-dom@18.2.8)(@types/react@18.2.23)(next@13.5.3)(react-dom@18.2.0)(react@18.2.0): + /@instill-ai/toolkit@0.68.0-rc.23(@instill-ai/design-system@0.49.1)(@instill-ai/design-tokens@0.3.2)(@types/react-dom@18.2.8)(@types/react@18.2.25)(next@13.5.4)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-tbdc8BVCFZ5r6aygJ0FTCueuWvDpfVzil3D91ID5TiXbvWfFgMuRDbjS5HNPdlX88miLJFuh/CB7Et4VBO2Cjg==} peerDependencies: '@instill-ai/design-system': 0.49.1 @@ -229,10 +229,10 @@ packages: '@amplitude/analytics-browser': 1.13.1 '@dnd-kit/core': 6.0.8(react-dom@18.2.0)(react@18.2.0) '@hookform/resolvers': 3.3.1(react-hook-form@7.46.2) - '@instill-ai/design-system': 0.49.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0)(tailwindcss@3.3.3) + '@instill-ai/design-system': 0.49.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0)(tailwindcss@3.3.3) '@instill-ai/design-tokens': 0.3.2(tailwindcss@3.3.3) - '@radix-ui/react-label': 2.0.2(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.23)(react@18.2.0) + '@radix-ui/react-label': 2.0.2(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.25)(react@18.2.0) '@tanstack/react-query': 4.35.3(react-dom@18.2.0)(react@18.2.0) '@tanstack/react-query-devtools': 4.35.3(@tanstack/react-query@4.35.3)(react-dom@18.2.0)(react@18.2.0) '@tanstack/react-table': 8.10.3(react-dom@18.2.0)(react@18.2.0) @@ -243,17 +243,17 @@ packages: elkjs: 0.8.2 fuse.js: 6.6.2 immer: 9.0.21 - next: 13.5.3(react-dom@18.2.0)(react@18.2.0) + next: 13.5.4(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-hook-form: 7.46.2(react@18.2.0) react-syntax-highlighter: 15.5.0(react@18.2.0) - reactflow: 11.9.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + reactflow: 11.9.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) unique-names-generator: 4.7.1 uuid: 9.0.1 yup: 0.32.11 zod: 3.21.4 - zustand: 4.4.1(@types/react@18.2.23)(immer@9.0.21)(react@18.2.0) + zustand: 4.4.1(@types/react@18.2.25)(immer@9.0.21)(react@18.2.0) transitivePeerDependencies: - '@types/react' - '@types/react-dom' @@ -261,10 +261,10 @@ packages: - react-native dev: false - /@instill-ai/typescript-sdk@0.0.8-rc.12(@instill-ai/design-system@0.49.1)(@instill-ai/design-tokens@0.3.2)(@types/react-dom@18.2.8)(@types/react@18.2.23)(next@13.5.3)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-IrvOa6sEce/hHLF+DZwKBEfy9GE5LAmfLjlp4i9Xujcli78N6UwxbhDSYY/gDqXzG0u57iPfkoCds3isTMD9Tw==} + /@instill-ai/typescript-sdk@0.0.11-rc.0(@instill-ai/design-system@0.49.1)(@instill-ai/design-tokens@0.3.2)(@types/react-dom@18.2.8)(@types/react@18.2.25)(next@13.5.4)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-OvIsgB9lGO3eyt5HS9zpFJt0PPgFhF31M3HX1rg84/0xHmfaga5eHpHlcNskB3jCEIDEHhwslhqqZk763eflHA==} dependencies: - '@instill-ai/toolkit': 0.68.0-rc.23(@instill-ai/design-system@0.49.1)(@instill-ai/design-tokens@0.3.2)(@types/react-dom@18.2.8)(@types/react@18.2.23)(next@13.5.3)(react-dom@18.2.0)(react@18.2.0) + '@instill-ai/toolkit': 0.68.0-rc.23(@instill-ai/design-system@0.49.1)(@instill-ai/design-tokens@0.3.2)(@types/react-dom@18.2.8)(@types/react@18.2.25)(next@13.5.4)(react-dom@18.2.0)(react@18.2.0) '@types/json-schema': 7.0.13 axios: 1.5.1 json-schema: 0.4.0 @@ -311,12 +311,12 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: false - /@next/env@13.5.3: - resolution: {integrity: sha512-X4te86vsbjsB7iO4usY9jLPtZ827Mbx+WcwNBGUOIuswuTAKQtzsuoxc/6KLxCMvogKG795MhrR1LDhYgDvasg==} + /@next/env@13.5.4: + resolution: {integrity: sha512-LGegJkMvRNw90WWphGJ3RMHMVplYcOfRWf2Be3td3sUa+1AaxmsYyANsA+znrGCBjXJNi4XAQlSoEfUxs/4kIQ==} dev: false - /@next/swc-darwin-arm64@13.5.3: - resolution: {integrity: sha512-6hiYNJxJmyYvvKGrVThzo4nTcqvqUTA/JvKim7Auaj33NexDqSNwN5YrrQu+QhZJCIpv2tULSHt+lf+rUflLSw==} + /@next/swc-darwin-arm64@13.5.4: + resolution: {integrity: sha512-Df8SHuXgF1p+aonBMcDPEsaahNo2TCwuie7VXED4FVyECvdXfRT9unapm54NssV9tF3OQFKBFOdlje4T43VO0w==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -324,8 +324,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64@13.5.3: - resolution: {integrity: sha512-UpBKxu2ob9scbpJyEq/xPgpdrgBgN3aLYlxyGqlYX5/KnwpJpFuIHU2lx8upQQ7L+MEmz+fA1XSgesoK92ppwQ==} + /@next/swc-darwin-x64@13.5.4: + resolution: {integrity: sha512-siPuUwO45PnNRMeZnSa8n/Lye5ZX93IJom9wQRB5DEOdFrw0JjOMu1GINB8jAEdwa7Vdyn1oJ2xGNaQpdQQ9Pw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -333,8 +333,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu@13.5.3: - resolution: {integrity: sha512-5AzM7Yx1Ky+oLY6pHs7tjONTF22JirDPd5Jw/3/NazJ73uGB05NqhGhB4SbeCchg7SlVYVBeRMrMSZwJwq/xoA==} + /@next/swc-linux-arm64-gnu@13.5.4: + resolution: {integrity: sha512-l/k/fvRP/zmB2jkFMfefmFkyZbDkYW0mRM/LB+tH5u9pB98WsHXC0WvDHlGCYp3CH/jlkJPL7gN8nkTQVrQ/2w==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -342,8 +342,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl@13.5.3: - resolution: {integrity: sha512-A/C1shbyUhj7wRtokmn73eBksjTM7fFQoY2v/0rTM5wehpkjQRLOXI8WJsag2uLhnZ4ii5OzR1rFPwoD9cvOgA==} + /@next/swc-linux-arm64-musl@13.5.4: + resolution: {integrity: sha512-YYGb7SlLkI+XqfQa8VPErljb7k9nUnhhRrVaOdfJNCaQnHBcvbT7cx/UjDQLdleJcfyg1Hkn5YSSIeVfjgmkTg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -351,8 +351,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu@13.5.3: - resolution: {integrity: sha512-FubPuw/Boz8tKkk+5eOuDHOpk36F80rbgxlx4+xty/U71e3wZZxVYHfZXmf0IRToBn1Crb8WvLM9OYj/Ur815g==} + /@next/swc-linux-x64-gnu@13.5.4: + resolution: {integrity: sha512-uE61vyUSClnCH18YHjA8tE1prr/PBFlBFhxBZis4XBRJoR+txAky5d7gGNUIbQ8sZZ7LVkSVgm/5Fc7mwXmRAg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -360,8 +360,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl@13.5.3: - resolution: {integrity: sha512-DPw8nFuM1uEpbX47tM3wiXIR0Qa+atSzs9Q3peY1urkhofx44o7E1svnq+a5Q0r8lAcssLrwiM+OyJJgV/oj7g==} + /@next/swc-linux-x64-musl@13.5.4: + resolution: {integrity: sha512-qVEKFYML/GvJSy9CfYqAdUexA6M5AklYcQCW+8JECmkQHGoPxCf04iMh7CPR7wkHyWWK+XLt4Ja7hhsPJtSnhg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -369,8 +369,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc@13.5.3: - resolution: {integrity: sha512-zBPSP8cHL51Gub/YV8UUePW7AVGukp2D8JU93IHbVDu2qmhFAn9LWXiOOLKplZQKxnIPUkJTQAJDCWBWU4UWUA==} + /@next/swc-win32-arm64-msvc@13.5.4: + resolution: {integrity: sha512-mDSQfqxAlfpeZOLPxLymZkX0hYF3juN57W6vFHTvwKlnHfmh12Pt7hPIRLYIShk8uYRsKPtMTth/EzpwRI+u8w==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -378,8 +378,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc@13.5.3: - resolution: {integrity: sha512-ONcL/lYyGUj4W37D4I2I450SZtSenmFAvapkJQNIJhrPMhzDU/AdfLkW98NvH1D2+7FXwe7yclf3+B7v28uzBQ==} + /@next/swc-win32-ia32-msvc@13.5.4: + resolution: {integrity: sha512-aoqAT2XIekIWoriwzOmGFAvTtVY5O7JjV21giozBTP5c6uZhpvTWRbmHXbmsjZqY4HnEZQRXWkSAppsIBweKqw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -387,8 +387,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc@13.5.3: - resolution: {integrity: sha512-2Vz2tYWaLqJvLcWbbTlJ5k9AN6JD7a5CN2pAeIzpbecK8ZF/yobA39cXtv6e+Z8c5UJuVOmaTldEAIxvsIux/Q==} + /@next/swc-win32-x64-msvc@13.5.4: + resolution: {integrity: sha512-cyRvlAxwlddlqeB9xtPSfNSCRy8BOa4wtMo0IuI9P7Y0XT2qpDrpFKRyZ7kUngZis59mPVla5k8X1oOJ8RxDYg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -435,7 +435,7 @@ packages: '@babel/runtime': 7.23.1 dev: false - /@radix-ui/react-arrow@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-arrow@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==} peerDependencies: '@types/react': '*' @@ -449,14 +449,14 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-checkbox@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-checkbox@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-CBuGQa52aAYnADZVt/KBQzXrwx6TqnlwtcIPGtVt5JkkzQwMOLJjPukimhfKEr4GQNd43C+djUh5Ikopj8pSLg==} peerDependencies: '@types/react': '*' @@ -471,20 +471,20 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-previous': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-previous': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-collection@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-collection@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==} peerDependencies: '@types/react': '*' @@ -498,11 +498,11 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -517,7 +517,7 @@ packages: react: 18.2.0 dev: false - /@radix-ui/react-compose-refs@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-compose-refs@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} peerDependencies: '@types/react': '*' @@ -527,7 +527,7 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 dev: false @@ -540,7 +540,7 @@ packages: react: 18.2.0 dev: false - /@radix-ui/react-context@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-context@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==} peerDependencies: '@types/react': '*' @@ -550,11 +550,11 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 dev: false - /@radix-ui/react-dialog@1.0.0(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-dialog@1.0.0(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-Yn9YU+QlHYLWwV1XfKiqnGVpWYWk6MeBVM6x/bcoyPvxgjQGoeT35482viLPctTMWoMw0PoHgqfSox7Ig+957Q==} peerDependencies: react: ^16.8 || ^17.0 || ^18.0 @@ -576,12 +576,12 @@ packages: aria-hidden: 1.2.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-remove-scroll: 2.5.4(@types/react@18.2.23)(react@18.2.0) + react-remove-scroll: 2.5.4(@types/react@18.2.25)(react@18.2.0) transitivePeerDependencies: - '@types/react' dev: false - /@radix-ui/react-dialog@1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-dialog@1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==} peerDependencies: '@types/react': '*' @@ -596,26 +596,26 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-id': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 aria-hidden: 1.2.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-remove-scroll: 2.5.5(@types/react@18.2.23)(react@18.2.0) + react-remove-scroll: 2.5.5(@types/react@18.2.25)(react@18.2.0) dev: false - /@radix-ui/react-direction@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-direction@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==} peerDependencies: '@types/react': '*' @@ -625,7 +625,7 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 dev: false @@ -645,7 +645,7 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-dismissable-layer@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-dismissable-layer@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-7UpBa/RKMoHJYjie1gkF1DlK8l1fdU/VKDpoS3rCCo8YBJR294GwcEHyxHw72yvphJ7ld0AXEcSLAzY2F/WyCg==} peerDependencies: '@types/react': '*' @@ -660,17 +660,17 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-dismissable-layer@1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-dismissable-layer@1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==} peerDependencies: '@types/react': '*' @@ -685,17 +685,17 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-dropdown-menu@2.0.6(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-dropdown-menu@2.0.6(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA==} peerDependencies: '@types/react': '*' @@ -710,13 +710,13 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-id': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-menu': 2.0.6(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-menu': 2.0.6(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -731,7 +731,7 @@ packages: react: 18.2.0 dev: false - /@radix-ui/react-focus-guards@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-focus-guards@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==} peerDependencies: '@types/react': '*' @@ -741,7 +741,7 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 dev: false @@ -759,7 +759,7 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-focus-scope@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-focus-scope@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-upXdPfqI4islj2CslyfUBNlaJCPybbqRHAi1KER7Isel9Q2AtSJ0zRBZv8mWQiFXD2nyAJ4BhC3yXgZ6kMBSrQ==} peerDependencies: '@types/react': '*' @@ -773,16 +773,16 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-focus-scope@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-focus-scope@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==} peerDependencies: '@types/react': '*' @@ -796,10 +796,10 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -815,7 +815,7 @@ packages: react: 18.2.0 dev: false - /@radix-ui/react-id@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-id@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==} peerDependencies: '@types/react': '*' @@ -825,12 +825,12 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 react: 18.2.0 dev: false - /@radix-ui/react-label@2.0.2(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-label@2.0.2(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-N5ehvlM7qoTLx7nWPodsPYPgMzA5WM8zZChQg8nyFJKnDO5WHdba1vv5/H6IO5LtJMfD2Q3wh1qHFGNtK0w3bQ==} peerDependencies: '@types/react': '*' @@ -844,14 +844,14 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-menu@2.0.6(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-menu@2.0.6(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA==} peerDependencies: '@types/react': '*' @@ -866,30 +866,30 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-direction': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-id': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-roving-focus': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-roving-focus': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 aria-hidden: 1.2.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-remove-scroll: 2.5.5(@types/react@18.2.23)(react@18.2.0) + react-remove-scroll: 2.5.5(@types/react@18.2.25)(react@18.2.0) dev: false - /@radix-ui/react-popover@1.0.7(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-popover@1.0.7(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-shtvVnlsxT6faMnK/a7n0wptwBD23xc1Z5mdrtKLwVEfsEMXodS0r5s0/g5P0hX//EKYZS2sxUjqfzlg52ZSnQ==} peerDependencies: '@types/react': '*' @@ -904,27 +904,27 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-id': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 aria-hidden: 1.2.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-remove-scroll: 2.5.5(@types/react@18.2.23)(react@18.2.0) + react-remove-scroll: 2.5.5(@types/react@18.2.25)(react@18.2.0) dev: false - /@radix-ui/react-popper@1.1.2(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-popper@1.1.2(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-1CnGGfFi/bbqtJZZ0P/NQY20xdG3E0LALJaLUEoKwPLwl6PPPfbeiCqMVQnhoFRAxjJj4RpBRJzDmUgsex2tSg==} peerDependencies: '@types/react': '*' @@ -939,22 +939,22 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@floating-ui/react-dom': 2.0.2(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-arrow': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-rect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.23)(react@18.2.0) + '@radix-ui/react-arrow': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-rect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.25)(react@18.2.0) '@radix-ui/rect': 1.0.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-popper@1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-popper@1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-cKpopj/5RHZWjrbF2846jBNacjQVwkP068DfmgrNJXpvVWrOvlAmE9xSiy5OqeE+Gi8D9fP+oDhUnPqNMY8/5w==} peerDependencies: '@types/react': '*' @@ -969,16 +969,16 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@floating-ui/react-dom': 2.0.2(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-arrow': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-rect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.23)(react@18.2.0) + '@radix-ui/react-arrow': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-rect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.25)(react@18.2.0) '@radix-ui/rect': 1.0.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -996,7 +996,7 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-portal@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-portal@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-xLYZeHrWoPmA5mEKEfZZevoVRK/Q43GfzRXkWV6qawIWWK8t6ifIiLQdd7rmQ4Vk1bmI21XhqF9BN3jWf+phpA==} peerDependencies: '@types/react': '*' @@ -1010,14 +1010,14 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-portal@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-portal@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==} peerDependencies: '@types/react': '*' @@ -1031,8 +1031,8 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -1051,7 +1051,7 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-presence@1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-presence@1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==} peerDependencies: '@types/react': '*' @@ -1065,9 +1065,9 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -1085,7 +1085,7 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-primitive@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-primitive@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==} peerDependencies: '@types/react': '*' @@ -1099,14 +1099,14 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-roving-focus@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-roving-focus@1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-2mUg5Mgcu001VkGy+FfzZyzbmuUWzgWkj3rvv4yu+mLw03+mTzbxZHvfcGyFp2b8EkQeMkpRQ5FiA2Vr2O6TeQ==} peerDependencies: '@types/react': '*' @@ -1121,21 +1121,21 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-direction': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-id': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-scroll-area@1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-scroll-area@1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-b6PAgH4GQf9QEn8zbT2XUHpW5z8BzqEc7Kl11TwDrvuTrxlkcjTD5qa/bxgKr+nmuXKu4L/W5UZ4mlP/VG/5Gw==} peerDependencies: '@types/react': '*' @@ -1151,20 +1151,20 @@ packages: '@babel/runtime': 7.23.1 '@radix-ui/number': 1.0.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-direction': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-select@1.2.2(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-select@1.2.2(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-zI7McXr8fNaSrUY9mZe4x/HC0jTLY9fWNhO1oLWYMQGDXuV4UCivIGTxwioSzO0ZCYX9iSLyWmAh/1TOmX3Cnw==} peerDependencies: '@types/react': '*' @@ -1180,32 +1180,32 @@ packages: '@babel/runtime': 7.23.1 '@radix-ui/number': 1.0.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-direction': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-dismissable-layer': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-focus-scope': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-id': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-popper': 1.1.2(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-portal': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-previous': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-visually-hidden': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-direction': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-focus-scope': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-popper': 1.1.2(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-previous': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-visually-hidden': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 aria-hidden: 1.2.3 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-remove-scroll: 2.5.5(@types/react@18.2.23)(react@18.2.0) + react-remove-scroll: 2.5.5(@types/react@18.2.25)(react@18.2.0) dev: false - /@radix-ui/react-separator@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-separator@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-itYmTy/kokS21aiV5+Z56MZB54KrhPgn6eHDKkFeOLR34HMN2s8PaN47qZZAGnvupcjxHaFZnW4pQEh0BvvVuw==} peerDependencies: '@types/react': '*' @@ -1219,8 +1219,8 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -1236,7 +1236,7 @@ packages: react: 18.2.0 dev: false - /@radix-ui/react-slot@1.0.2(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-slot@1.0.2(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} peerDependencies: '@types/react': '*' @@ -1246,12 +1246,12 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 react: 18.2.0 dev: false - /@radix-ui/react-switch@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-switch@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-mxm87F88HyHztsI7N+ZUmEoARGkC22YVW5CaC+Byc+HRpuvCrOBPTAnXgf+tZ/7i0Sg/eOePGdMhUKhPaQEqow==} peerDependencies: '@types/react': '*' @@ -1266,19 +1266,19 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-previous': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-previous': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-size': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-toast@1.1.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-toast@1.1.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-fRLn227WHIBRSzuRzGJ8W+5YALxofH23y0MlPLddaIpLpCDqdE0NZlS2NRQDRiptfxDeeCjgFIpexB1/zkxDlw==} peerDependencies: '@types/react': '*' @@ -1293,24 +1293,24 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-visually-hidden': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-collection': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-visually-hidden': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@radix-ui/react-tooltip@1.0.7(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-tooltip@1.0.7(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-lPh5iKNFVQ/jav/j6ZrWq3blfDJ0OH9R6FlNUHPMqdLuQ9vwDgFsRxvl8b7Asuy5c8xmoojHUxKHQSOAvMHxyw==} peerDependencies: '@types/react': '*' @@ -1325,18 +1325,18 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-context': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-id': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-slot': 1.0.2(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@radix-ui/react-visually-hidden': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-popper': 1.1.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@radix-ui/react-visually-hidden': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -1351,7 +1351,7 @@ packages: react: 18.2.0 dev: false - /@radix-ui/react-use-callback-ref@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-use-callback-ref@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==} peerDependencies: '@types/react': '*' @@ -1361,7 +1361,7 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 dev: false @@ -1375,7 +1375,7 @@ packages: react: 18.2.0 dev: false - /@radix-ui/react-use-controllable-state@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-use-controllable-state@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==} peerDependencies: '@types/react': '*' @@ -1385,8 +1385,8 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 react: 18.2.0 dev: false @@ -1400,7 +1400,7 @@ packages: react: 18.2.0 dev: false - /@radix-ui/react-use-escape-keydown@1.0.3(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-use-escape-keydown@1.0.3(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==} peerDependencies: '@types/react': '*' @@ -1410,8 +1410,8 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 react: 18.2.0 dev: false @@ -1424,7 +1424,7 @@ packages: react: 18.2.0 dev: false - /@radix-ui/react-use-layout-effect@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-use-layout-effect@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==} peerDependencies: '@types/react': '*' @@ -1434,11 +1434,11 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 dev: false - /@radix-ui/react-use-previous@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-use-previous@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-cV5La9DPwiQ7S0gf/0qiD6YgNqM5Fk97Kdrlc5yBcrF3jyEZQwm7vYFqMo4IfeHgJXsRaMvLABFtd0OVEmZhDw==} peerDependencies: '@types/react': '*' @@ -1448,11 +1448,11 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 dev: false - /@radix-ui/react-use-rect@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-use-rect@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==} peerDependencies: '@types/react': '*' @@ -1463,11 +1463,11 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@radix-ui/rect': 1.0.1 - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 dev: false - /@radix-ui/react-use-size@1.0.1(@types/react@18.2.23)(react@18.2.0): + /@radix-ui/react-use-size@1.0.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==} peerDependencies: '@types/react': '*' @@ -1477,12 +1477,12 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.23)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.2.25)(react@18.2.0) + '@types/react': 18.2.25 react: 18.2.0 dev: false - /@radix-ui/react-visually-hidden@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /@radix-ui/react-visually-hidden@1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==} peerDependencies: '@types/react': '*' @@ -1496,8 +1496,8 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.23 + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.2.8)(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.25 '@types/react-dom': 18.2.8 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -1509,39 +1509,39 @@ packages: '@babel/runtime': 7.23.1 dev: false - /@reactflow/background@11.3.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): + /@reactflow/background@11.3.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-KOy24lz9HpaBlx5KGcpQRsbMRWWkZdFyRxFq5RfPy6BnxDx0GFZ2o2igKKVutuo2bgCQdhaqzipcOUHlEAvnbQ==} peerDependencies: react: '>=17' react-dom: '>=17' dependencies: - '@reactflow/core': 11.9.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/core': 11.9.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) classcat: 5.0.4 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - zustand: 4.4.1(@types/react@18.2.23)(immer@9.0.21)(react@18.2.0) + zustand: 4.4.1(@types/react@18.2.25)(immer@9.0.21)(react@18.2.0) transitivePeerDependencies: - '@types/react' - immer dev: false - /@reactflow/controls@11.2.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): + /@reactflow/controls@11.2.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-VuDxm9l0B4esXzRpzKRqH7Sc1Szj+KBV1bsswaOQWDbLlGKRtIZMXjdQ9BwBf+PMJD4ANrmnGEdHxFTL6NUpbg==} peerDependencies: react: '>=17' react-dom: '>=17' dependencies: - '@reactflow/core': 11.9.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/core': 11.9.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) classcat: 5.0.4 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - zustand: 4.4.1(@types/react@18.2.23)(immer@9.0.21)(react@18.2.0) + zustand: 4.4.1(@types/react@18.2.25)(immer@9.0.21)(react@18.2.0) transitivePeerDependencies: - '@types/react' - immer dev: false - /@reactflow/core@11.9.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): + /@reactflow/core@11.9.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-/tiE8sPShzeWFnshvi8hc1lbp1C5PLgAFl94JQdBstq94uOBTpdoI//1MN4a+fGp1xwAUP7P0IcLuWqIDZgrZg==} peerDependencies: react: '>=17' @@ -1557,19 +1557,19 @@ packages: d3-zoom: 3.0.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - zustand: 4.4.1(@types/react@18.2.23)(immer@9.0.21)(react@18.2.0) + zustand: 4.4.1(@types/react@18.2.25)(immer@9.0.21)(react@18.2.0) transitivePeerDependencies: - '@types/react' - immer dev: false - /@reactflow/minimap@11.7.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): + /@reactflow/minimap@11.7.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-GqhJ0AoNhYf/GXI7JlWOR4THvi1nEcyo6sL6pGupJu8Ve1b8rpcTKNh4mXIerl8x0oRF8ajGvpIvh4R6rEtLoQ==} peerDependencies: react: '>=17' react-dom: '>=17' dependencies: - '@reactflow/core': 11.9.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/core': 11.9.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) '@types/d3-selection': 3.0.7 '@types/d3-zoom': 3.0.5 classcat: 5.0.4 @@ -1577,41 +1577,41 @@ packages: d3-zoom: 3.0.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - zustand: 4.4.1(@types/react@18.2.23)(immer@9.0.21)(react@18.2.0) + zustand: 4.4.1(@types/react@18.2.25)(immer@9.0.21)(react@18.2.0) transitivePeerDependencies: - '@types/react' - immer dev: false - /@reactflow/node-resizer@2.2.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): + /@reactflow/node-resizer@2.2.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-p8fqfEtMdXVAEdAT74GVpMeIm2v2t92LObKPFvIbOaA11vmcp+jSt45y2mPD6CxP6snzEVHXigYmGZNiujDtlQ==} peerDependencies: react: '>=17' react-dom: '>=17' dependencies: - '@reactflow/core': 11.9.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/core': 11.9.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) classcat: 5.0.4 d3-drag: 3.0.0 d3-selection: 3.0.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - zustand: 4.4.1(@types/react@18.2.23)(immer@9.0.21)(react@18.2.0) + zustand: 4.4.1(@types/react@18.2.25)(immer@9.0.21)(react@18.2.0) transitivePeerDependencies: - '@types/react' - immer dev: false - /@reactflow/node-toolbar@1.3.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): + /@reactflow/node-toolbar@1.3.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-s8gP07HClKDidsBSrcljoK600cdVLLBK1gNK0bSVpCk3hBVKUkEGESwMf7VwpZ1oxhM3859R3pz++7lUrbmF3w==} peerDependencies: react: '>=17' react-dom: '>=17' dependencies: - '@reactflow/core': 11.9.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/core': 11.9.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) classcat: 5.0.4 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - zustand: 4.4.1(@types/react@18.2.23)(immer@9.0.21)(react@18.2.0) + zustand: 4.4.1(@types/react@18.2.25)(immer@9.0.21)(react@18.2.0) transitivePeerDependencies: - '@types/react' - immer @@ -1891,10 +1891,17 @@ packages: /@types/react-dom@18.2.8: resolution: {integrity: sha512-bAIvO5lN/U8sPGvs1Xm61rlRHHaq5rp5N3kp9C+NJ/Q41P8iqjkXSu0+/qu8POsjH9pNWb0OYabFez7taP7omw==} dependencies: - '@types/react': 18.2.23 + '@types/react': 18.2.29 - /@types/react@18.2.23: - resolution: {integrity: sha512-qHLW6n1q2+7KyBEYnrZpcsAmU/iiCh9WGCKgXvMxx89+TYdJWRjZohVIo9XTcoLhfX3+/hP0Pbulu3bCZQ9PSA==} + /@types/react@18.2.25: + resolution: {integrity: sha512-24xqse6+VByVLIr+xWaQ9muX1B4bXJKXBbjszbld/UEDslGLY53+ZucF44HCmLbMPejTzGG9XgR+3m2/Wqu1kw==} + dependencies: + '@types/prop-types': 15.7.7 + '@types/scheduler': 0.16.4 + csstype: 3.1.2 + + /@types/react@18.2.29: + resolution: {integrity: sha512-Z+ZrIRocWtdD70j45izShRwDuiB4JZqDegqMFW/I8aG5DxxLKOzVNoq62UIO82v9bdgi+DO1jvsb9sTEZUSm+Q==} dependencies: '@types/prop-types': 15.7.7 '@types/scheduler': 0.16.4 @@ -2076,13 +2083,13 @@ packages: engines: {node: '>=6'} dev: false - /cmdk@0.2.0(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0): + /cmdk@0.2.0(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-JQpKvEOb86SnvMZbYaFKYhvzFntWBeSZdyii0rZPhKJj9uwJBxu4DaVYDrRN7r3mPop56oPhRw+JYWTKs66TYw==} peerDependencies: react: ^18.0.0 react-dom: ^18.0.0 dependencies: - '@radix-ui/react-dialog': 1.0.0(@types/react@18.2.23)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-dialog': 1.0.0(@types/react@18.2.25)(react-dom@18.2.0)(react@18.2.0) command-score: 0.1.2 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2677,8 +2684,8 @@ packages: hasBin: true dev: false - /next@13.5.3(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-4Nt4HRLYDW/yRpJ/QR2t1v63UOMS55A38dnWv3UDOWGezuY0ZyFO1ABNbD7mulVzs9qVhgy2+ppjdsANpKP1mg==} + /next@13.5.4(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-+93un5S779gho8y9ASQhb/bTkQF17FNQOtXLKAj3lsNgltEcF0C5PMLLncDmH+8X1EnJH1kbqAERa29nRXqhjA==} engines: {node: '>=16.14.0'} hasBin: true peerDependencies: @@ -2692,26 +2699,25 @@ packages: sass: optional: true dependencies: - '@next/env': 13.5.3 + '@next/env': 13.5.4 '@swc/helpers': 0.5.2 busboy: 1.6.0 caniuse-lite: 1.0.30001541 - postcss: 8.4.14 + postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.1(react@18.2.0) watchpack: 2.4.0 - zod: 3.21.4 optionalDependencies: - '@next/swc-darwin-arm64': 13.5.3 - '@next/swc-darwin-x64': 13.5.3 - '@next/swc-linux-arm64-gnu': 13.5.3 - '@next/swc-linux-arm64-musl': 13.5.3 - '@next/swc-linux-x64-gnu': 13.5.3 - '@next/swc-linux-x64-musl': 13.5.3 - '@next/swc-win32-arm64-msvc': 13.5.3 - '@next/swc-win32-ia32-msvc': 13.5.3 - '@next/swc-win32-x64-msvc': 13.5.3 + '@next/swc-darwin-arm64': 13.5.4 + '@next/swc-darwin-x64': 13.5.4 + '@next/swc-linux-arm64-gnu': 13.5.4 + '@next/swc-linux-arm64-musl': 13.5.4 + '@next/swc-linux-x64-gnu': 13.5.4 + '@next/swc-linux-x64-musl': 13.5.4 + '@next/swc-win32-arm64-msvc': 13.5.4 + '@next/swc-win32-ia32-msvc': 13.5.4 + '@next/swc-win32-x64-msvc': 13.5.4 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -2874,15 +2880,6 @@ packages: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} dev: false - /postcss@8.4.14: - resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.6 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: false - /postcss@8.4.31: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} @@ -2939,7 +2936,7 @@ packages: react: 18.2.0 dev: false - /react-remove-scroll-bar@2.3.4(@types/react@18.2.23)(react@18.2.0): + /react-remove-scroll-bar@2.3.4(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==} engines: {node: '>=10'} peerDependencies: @@ -2949,13 +2946,13 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 - react-style-singleton: 2.2.1(@types/react@18.2.23)(react@18.2.0) + react-style-singleton: 2.2.1(@types/react@18.2.25)(react@18.2.0) tslib: 2.6.2 dev: false - /react-remove-scroll@2.5.4(@types/react@18.2.23)(react@18.2.0): + /react-remove-scroll@2.5.4(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-xGVKJJr0SJGQVirVFAUZ2k1QLyO6m+2fy0l8Qawbp5Jgrv3DeLalrfMNBFSlmz5kriGGzsVBtGVnf4pTKIhhWA==} engines: {node: '>=10'} peerDependencies: @@ -2965,16 +2962,16 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 - react-remove-scroll-bar: 2.3.4(@types/react@18.2.23)(react@18.2.0) - react-style-singleton: 2.2.1(@types/react@18.2.23)(react@18.2.0) + react-remove-scroll-bar: 2.3.4(@types/react@18.2.25)(react@18.2.0) + react-style-singleton: 2.2.1(@types/react@18.2.25)(react@18.2.0) tslib: 2.6.2 - use-callback-ref: 1.3.0(@types/react@18.2.23)(react@18.2.0) - use-sidecar: 1.1.2(@types/react@18.2.23)(react@18.2.0) + use-callback-ref: 1.3.0(@types/react@18.2.25)(react@18.2.0) + use-sidecar: 1.1.2(@types/react@18.2.25)(react@18.2.0) dev: false - /react-remove-scroll@2.5.5(@types/react@18.2.23)(react@18.2.0): + /react-remove-scroll@2.5.5(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==} engines: {node: '>=10'} peerDependencies: @@ -2984,16 +2981,16 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 - react-remove-scroll-bar: 2.3.4(@types/react@18.2.23)(react@18.2.0) - react-style-singleton: 2.2.1(@types/react@18.2.23)(react@18.2.0) + react-remove-scroll-bar: 2.3.4(@types/react@18.2.25)(react@18.2.0) + react-style-singleton: 2.2.1(@types/react@18.2.25)(react@18.2.0) tslib: 2.6.2 - use-callback-ref: 1.3.0(@types/react@18.2.23)(react@18.2.0) - use-sidecar: 1.1.2(@types/react@18.2.23)(react@18.2.0) + use-callback-ref: 1.3.0(@types/react@18.2.25)(react@18.2.0) + use-sidecar: 1.1.2(@types/react@18.2.25)(react@18.2.0) dev: false - /react-style-singleton@2.2.1(@types/react@18.2.23)(react@18.2.0): + /react-style-singleton@2.2.1(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: @@ -3003,7 +3000,7 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.23 + '@types/react': 18.2.25 get-nonce: 1.0.1 invariant: 2.2.4 react: 18.2.0 @@ -3030,18 +3027,18 @@ packages: loose-envify: 1.4.0 dev: false - /reactflow@11.9.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): + /reactflow@11.9.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-hARhGVX9rcZhtRWsjBszDpF0EefsYhCzrRCk12CsB2oqWJZPLQD4OYh5eQygr9Yi3M/i+3+rcNyPs9IsFzU5iQ==} peerDependencies: react: '>=17' react-dom: '>=17' dependencies: - '@reactflow/background': 11.3.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) - '@reactflow/controls': 11.2.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) - '@reactflow/core': 11.9.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) - '@reactflow/minimap': 11.7.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) - '@reactflow/node-resizer': 2.2.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) - '@reactflow/node-toolbar': 1.3.2(@types/react@18.2.23)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/background': 11.3.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/controls': 11.2.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/core': 11.9.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/minimap': 11.7.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/node-resizer': 2.2.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) + '@reactflow/node-toolbar': 1.3.2(@types/react@18.2.25)(immer@9.0.21)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) transitivePeerDependencies: @@ -3325,7 +3322,7 @@ packages: tslib: 2.6.2 dev: false - /use-callback-ref@1.3.0(@types/react@18.2.23)(react@18.2.0): + /use-callback-ref@1.3.0(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w==} engines: {node: '>=10'} peerDependencies: @@ -3335,12 +3332,12 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.23 + '@types/react': 18.2.25 react: 18.2.0 tslib: 2.6.2 dev: false - /use-sidecar@1.1.2(@types/react@18.2.23)(react@18.2.0): + /use-sidecar@1.1.2(@types/react@18.2.25)(react@18.2.0): resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} engines: {node: '>=10'} peerDependencies: @@ -3350,7 +3347,7 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.23 + '@types/react': 18.2.25 detect-node-es: 1.1.0 react: 18.2.0 tslib: 2.6.2 @@ -3418,7 +3415,7 @@ packages: tslib: 2.3.0 dev: false - /zustand@4.4.1(@types/react@18.2.23)(immer@9.0.21)(react@18.2.0): + /zustand@4.4.1(@types/react@18.2.25)(immer@9.0.21)(react@18.2.0): resolution: {integrity: sha512-QCPfstAS4EBiTQzlaGP1gmorkh/UL1Leaj2tdj+zZCZ/9bm0WS7sI2wnfD5lpOszFqWJ1DcPnGoY8RDL61uokw==} engines: {node: '>=12.7.0'} peerDependencies: @@ -3433,7 +3430,7 @@ packages: react: optional: true dependencies: - '@types/react': 18.2.23 + '@types/react': 18.2.25 immer: 9.0.21 react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) diff --git a/examples/next-app/src/pages/index.tsx b/examples/next-app/src/pages/index.tsx index 10229ac..6267a30 100644 --- a/examples/next-app/src/pages/index.tsx +++ b/examples/next-app/src/pages/index.tsx @@ -1,14 +1,9 @@ import { useEffect, useState } from "react"; -import InstillClient, { - Nullable, - Pipeline, - User, -} from "@instill-ai/typescript-sdk"; +import InstillClient, { Pipeline, User } from "@instill-ai/typescript-sdk"; export default function TypescriptSdkDemo() { const [pipelines, setPipelines] = useState([]); const [user, setUser] = useState([]); - const [token, setToken] = useState>(null); const client = new InstillClient( "http://localhost:8080", @@ -17,28 +12,26 @@ export default function TypescriptSdkDemo() { ); useEffect(() => { - if (token) { - client.Auth.getUserQuery() - .then((data: any) => { - console.log("data", data); - setUser(data); - }) - .catch((error: any) => { - console.log("error", error); - }); + client.Auth.getUserQuery() + .then((data: any) => { + console.log("data", data); + setUser(data); + }) + .catch((error: any) => { + console.log("error", error); + }); - client.Pipeline.listPipelinesQuery({ - pageSize: null, - nextPageToken: null, + client.Pipeline.listPipelinesQuery({ + pageSize: null, + nextPageToken: null, + }) + .then((data: any) => { + console.log("data", data); + setPipelines(data); }) - .then((data: any) => { - console.log("data", data); - setPipelines(data); - }) - .catch((error: any) => { - console.log("error", error); - }); - } + .catch((error: any) => { + console.log("error", error); + }); }, []); return ( diff --git a/package.json b/package.json index 6115ab5..3282fcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@instill-ai/typescript-sdk", - "version": "0.0.10", + "version": "0.0.11-rc.0", "description": "Instill AI's Typescript SDK", "repository": "https://github.com/instill-ai/typescript-sdk.git", "bugs": "https://github.com/instill-ai/community/issues", diff --git a/src/connector/ConnectorClient.ts b/src/connector/ConnectorClient.ts index cdac03c..c55bdf4 100644 --- a/src/connector/ConnectorClient.ts +++ b/src/connector/ConnectorClient.ts @@ -1,33 +1,35 @@ import axios, { AxiosInstance } from "axios"; import { Nullable } from "../types"; import { - ConnectorDefinition, - ConnectorResourceWatchState, - ConnectorResourceWithDefinition, CreateUserConnectorResourcePayload, - CreateUserConnectorResourceResponse, RenameUserConnectorResourcePayload, - RenameUserConnectorResourceResponse, UpdateUserConnectorResourcePayload, - UpdateUserConnectorResourceResponse, - GetConnectorDefinitionResponse, - GetUserConnectorResourceResponse, - ListConnectorDefinitionsResponse, - ListConnectorResourcesResponse, - ConnectUserConnectorResourceResponse, - DisconnectUserConnectorResourceResponse, - TestUserConnectorResourceConnectionResponse, } from "./types"; import { getQueryString } from "../helper"; +import { + getConnectorDefinitionQuery, + getUserConnectorResourceQuery, + listConnectorDefinitionsQuery, + listConnectorResourcesQuery, + listUserConnectorResourcesQuery, + watchUserConnectorResource, +} from "./queries"; +import { + createUserConnectorResourceMutation, + deleteUserConnectorResourceMutation, + renameUserConnectorResource, + updateUserConnectorResourceMutation, +} from "./mutation"; +import { + connectUserConnectorResourceAction, + disconnectUserConnectorResourceAction, + testUserConnectorResourceConnectionAction, +} from "./action"; class ConnectorClient { private axiosInstance: AxiosInstance; - constructor( - baseUrl: string, - appVersion: string, - apiToken: string - ) { + constructor(baseUrl: string, appVersion: string, apiToken: string) { let URL: Nullable = `${baseUrl}/vdp/${appVersion}`; this.axiosInstance = axios.create({ @@ -45,139 +47,55 @@ class ConnectorClient { async listConnectorResourcesQuery({ pageSize, nextPageToken, - filter, }: { pageSize: Nullable; nextPageToken: Nullable; - filter: Nullable; }) { - try { - const connectors: ConnectorResourceWithDefinition[] = []; - - const queryString = getQueryString({ - baseURL: `/connector-resources?view=VIEW_FULL`, - pageSize, - nextPageToken, - filter, - }); - - const { data } = - await this.axiosInstance.get( - queryString - ); - - connectors.push(...data.connector_resources); - - if (data.next_page_token) { - connectors.push( - ...(await this.listConnectorResourcesQuery({ - pageSize, - - nextPageToken: data.next_page_token, - filter, - })) - ); - } - - return Promise.resolve(connectors); - } catch (err) { - return Promise.reject(err); - } + return listConnectorResourcesQuery({ + axiosInstance: this.axiosInstance, + pageSize, + nextPageToken, + filter, + }); } async listUserConnectorResourcesQuery({ userName, pageSize, nextPageToken, - filter, }: { userName: string; pageSize: Nullable; nextPageToken: Nullable; - filter: Nullable; }) { - try { - const connectors: ConnectorResourceWithDefinition[] = []; - - const queryString = getQueryString({ - baseURL: `${userName}/connector-resources?view=VIEW_FULL`, - pageSize, - nextPageToken, - filter, - }); - - const { data } = - await this.axiosInstance.get( - queryString - ); - - connectors.push(...data.connector_resources); - - if (data.next_page_token) { - connectors.push( - ...(await this.listUserConnectorResourcesQuery({ - userName, - pageSize, - - nextPageToken: data.next_page_token, - filter, - })) - ); - } - - return Promise.resolve(connectors); - } catch (err) { - return Promise.reject(err); - } + return listUserConnectorResourcesQuery({ + axiosInstance: this.axiosInstance, + userName, + pageSize, + nextPageToken, + filter, + }); } async listConnectorDefinitionsQuery({ pageSize, nextPageToken, - filter, }: { pageSize: Nullable; nextPageToken: Nullable; - filter: Nullable; }) { - try { - const connectorDefinitions: ConnectorDefinition[] = []; - - const queryString = getQueryString({ - baseURL: `/connector-definitions?view=VIEW_FULL`, - pageSize, - nextPageToken, - filter, - }); - - const { data } = - await this.axiosInstance.get( - queryString - ); - - connectorDefinitions.push(...data.connector_definitions); - - if (data.next_page_token) { - connectorDefinitions.push( - ...(await this.listConnectorDefinitionsQuery({ - pageSize, - - nextPageToken: data.next_page_token, - filter, - })) - ); - } - - return Promise.resolve(connectorDefinitions); - } catch (err) { - return Promise.reject(err); - } + return listConnectorDefinitionsQuery({ + axiosInstance: this.axiosInstance, + pageSize, + nextPageToken, + filter, + }); } async getConnectorDefinitionQuery({ @@ -185,16 +103,10 @@ class ConnectorClient { }: { connectorDefinitionName: string; }) { - try { - const { data } = - await this.axiosInstance.get( - `/${connectorDefinitionName}?view=VIEW_FULL` - ); - - return Promise.resolve(data.connector_definition); - } catch (err) { - return Promise.reject(err); - } + return getConnectorDefinitionQuery({ + axiosInstance: this.axiosInstance, + connectorDefinitionName, + }); } async getUserConnectorResourceQuery({ @@ -202,16 +114,10 @@ class ConnectorClient { }: { connectorResourceName: string; }) { - try { - const { data } = - await this.axiosInstance.get( - `/${connectorResourceName}?view=VIEW_FULL` - ); - - return Promise.resolve(data.connector_resource); - } catch (err) { - return Promise.reject(err); - } + return getUserConnectorResourceQuery({ + axiosInstance: this.axiosInstance, + connectorResourceName, + }); } async watchUserConnectorResource({ @@ -219,15 +125,10 @@ class ConnectorClient { }: { connectorResourceName: string; }) { - try { - const { data } = - await this.axiosInstance.get( - `/${connectorResourceName}/watch` - ); - return Promise.resolve(data); - } catch (err) { - return Promise.reject(err); - } + return watchUserConnectorResource({ + axiosInstance: this.axiosInstance, + connectorResourceName, + }); } /* ------------------------------------------------------------------------- @@ -241,16 +142,11 @@ class ConnectorClient { userName: string; payload: CreateUserConnectorResourcePayload; }) { - try { - const res = - await this.axiosInstance.post( - `${userName}/connector-resources`, - payload - ); - return Promise.resolve(res.data.connector_resource); - } catch (err) { - return Promise.reject(err); - } + return createUserConnectorResourceMutation({ + axiosInstance: this.axiosInstance, + userName, + payload, + }); } async deleteUserConnectorResourceMutation({ @@ -258,11 +154,10 @@ class ConnectorClient { }: { connectorResourceName: string; }) { - try { - await this.axiosInstance.delete(`/${connectorResourceName}`); - } catch (err) { - return Promise.reject(err); - } + return deleteUserConnectorResourceMutation({ + axiosInstance: this.axiosInstance, + connectorResourceName, + }); } async updateUserConnectorResourceMutation({ @@ -270,19 +165,10 @@ class ConnectorClient { }: { payload: UpdateUserConnectorResourcePayload; }) { - try { - const res = - await this.axiosInstance.patch( - `/${payload.connectorResourceName}`, - { - ...payload, - connectorResourceName: undefined, - } - ); - return Promise.resolve(res.data.connector_resource); - } catch (err) { - return Promise.reject(err); - } + return updateUserConnectorResourceMutation({ + axiosInstance: this.axiosInstance, + payload, + }); } async renameUserConnectorResource({ @@ -290,17 +176,10 @@ class ConnectorClient { }: { payload: RenameUserConnectorResourcePayload; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${payload.name}/rename`, - payload - ); - - return Promise.resolve(data.connector_resource); - } catch (err) { - return Promise.reject(err); - } + return renameUserConnectorResource({ + axiosInstance: this.axiosInstance, + payload, + }); } /* ------------------------------------------------------------------------- @@ -312,15 +191,10 @@ class ConnectorClient { }: { connectorResourceName: string; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${connectorResourceName}/testConnection` - ); - return Promise.resolve(data.state); - } catch (err) { - return Promise.reject(err); - } + return testUserConnectorResourceConnectionAction({ + axiosInstance: this.axiosInstance, + connectorResourceName, + }); } async connectUserConnectorResourceAction({ @@ -328,15 +202,10 @@ class ConnectorClient { }: { connectorResourceName: string; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${connectorResourceName}/connect` - ); - return Promise.resolve(data.connector_resource); - } catch (err) { - return Promise.reject(err); - } + return connectUserConnectorResourceAction({ + axiosInstance: this.axiosInstance, + connectorResourceName, + }); } async disconnectUserConnectorResourceAction({ @@ -344,15 +213,10 @@ class ConnectorClient { }: { connectorResourceName: string; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${connectorResourceName}/disconnect` - ); - return Promise.resolve(data.connector_resource); - } catch (err) { - return Promise.reject(err); - } + return disconnectUserConnectorResourceAction({ + axiosInstance: this.axiosInstance, + connectorResourceName, + }); } } diff --git a/src/connector/action.ts b/src/connector/action.ts new file mode 100644 index 0000000..bcf3498 --- /dev/null +++ b/src/connector/action.ts @@ -0,0 +1,60 @@ +import { AxiosInstance } from "axios"; +import { + ConnectUserConnectorResourceResponse, + DisconnectUserConnectorResourceResponse, + TestUserConnectorResourceConnectionResponse, +} from "./types"; + +export async function testUserConnectorResourceConnectionAction({ + axiosInstance, + connectorResourceName, +}: { + axiosInstance: AxiosInstance; + connectorResourceName: string; +}) { + try { + const { data } = + await axiosInstance.post( + `/${connectorResourceName}/testConnection` + ); + return Promise.resolve(data.state); + } catch (err) { + return Promise.reject(err); + } +} + +export async function connectUserConnectorResourceAction({ + axiosInstance, + connectorResourceName, +}: { + axiosInstance: AxiosInstance; + connectorResourceName: string; +}) { + try { + const { data } = + await axiosInstance.post( + `/${connectorResourceName}/connect` + ); + return Promise.resolve(data.connector_resource); + } catch (err) { + return Promise.reject(err); + } +} + +export async function disconnectUserConnectorResourceAction({ + axiosInstance, + connectorResourceName, +}: { + axiosInstance: AxiosInstance; + connectorResourceName: string; +}) { + try { + const { data } = + await axiosInstance.post( + `/${connectorResourceName}/disconnect` + ); + return Promise.resolve(data.connector_resource); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/connector/index.ts b/src/connector/index.ts index d3b50a1..1dc24ee 100644 --- a/src/connector/index.ts +++ b/src/connector/index.ts @@ -1,6 +1,3 @@ -// export * from "./queries"; -// export * from "./mutations"; -// export * from "./actions"; export * from "./types"; export * from "./ConnectorClient"; diff --git a/src/connector/mutation.ts b/src/connector/mutation.ts new file mode 100644 index 0000000..e29c3a2 --- /dev/null +++ b/src/connector/mutation.ts @@ -0,0 +1,84 @@ +import { AxiosInstance } from "axios"; +import { + CreateUserConnectorResourcePayload, + CreateUserConnectorResourceResponse, + RenameUserConnectorResourcePayload, + RenameUserConnectorResourceResponse, + UpdateUserConnectorResourcePayload, + UpdateUserConnectorResourceResponse, +} from "./types"; + +export async function createUserConnectorResourceMutation({ + axiosInstance, + userName, + payload, +}: { + axiosInstance: AxiosInstance; + userName: string; + payload: CreateUserConnectorResourcePayload; +}) { + try { + const res = await axiosInstance.post( + `${userName}/connector-resources`, + payload + ); + return Promise.resolve(res.data.connector_resource); + } catch (err) { + return Promise.reject(err); + } +} + +export async function deleteUserConnectorResourceMutation({ + axiosInstance, + connectorResourceName, +}: { + axiosInstance: AxiosInstance; + connectorResourceName: string; +}) { + try { + await axiosInstance.delete(`/${connectorResourceName}`); + } catch (err) { + return Promise.reject(err); + } +} + +export async function updateUserConnectorResourceMutation({ + axiosInstance, + payload, +}: { + axiosInstance: AxiosInstance; + payload: UpdateUserConnectorResourcePayload; +}) { + try { + const res = await axiosInstance.patch( + `/${payload.connectorResourceName}`, + { + ...payload, + connectorResourceName: undefined, + } + ); + return Promise.resolve(res.data.connector_resource); + } catch (err) { + return Promise.reject(err); + } +} + +export async function renameUserConnectorResource({ + axiosInstance, + payload, +}: { + axiosInstance: AxiosInstance; + payload: RenameUserConnectorResourcePayload; +}) { + try { + const { data } = + await axiosInstance.post( + `/${payload.name}/rename`, + payload + ); + + return Promise.resolve(data.connector_resource); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/connector/queries.ts b/src/connector/queries.ts new file mode 100644 index 0000000..e2a3939 --- /dev/null +++ b/src/connector/queries.ts @@ -0,0 +1,204 @@ +import { AxiosInstance } from "axios"; +import { getQueryString } from "../helper"; +import { Nullable } from "../types"; +import { + ConnectorDefinition, + ConnectorResourceWatchState, + ConnectorResourceWithDefinition, + GetConnectorDefinitionResponse, + GetUserConnectorResourceResponse, + ListConnectorDefinitionsResponse, + ListConnectorResourcesResponse, +} from "./types"; + +export async function listConnectorResourcesQuery({ + axiosInstance, + pageSize, + nextPageToken, + filter, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; + + filter: Nullable; +}) { + try { + const connectors: ConnectorResourceWithDefinition[] = []; + + const queryString = getQueryString({ + baseURL: `/connector-resources?view=VIEW_FULL`, + pageSize, + nextPageToken, + filter, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + connectors.push(...data.connector_resources); + + if (data.next_page_token) { + connectors.push( + ...(await listConnectorResourcesQuery({ + axiosInstance, + pageSize, + nextPageToken: data.next_page_token, + filter, + })) + ); + } + + return Promise.resolve(connectors); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listUserConnectorResourcesQuery({ + axiosInstance, + userName, + pageSize, + nextPageToken, + + filter, +}: { + axiosInstance: AxiosInstance; + userName: string; + pageSize: Nullable; + nextPageToken: Nullable; + + filter: Nullable; +}) { + try { + const connectors: ConnectorResourceWithDefinition[] = []; + + const queryString = getQueryString({ + baseURL: `${userName}/connector-resources?view=VIEW_FULL`, + pageSize, + nextPageToken, + filter, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + connectors.push(...data.connector_resources); + + if (data.next_page_token) { + connectors.push( + ...(await listUserConnectorResourcesQuery({ + axiosInstance, + userName, + pageSize, + nextPageToken: data.next_page_token, + filter, + })) + ); + } + + return Promise.resolve(connectors); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listConnectorDefinitionsQuery({ + axiosInstance, + pageSize, + nextPageToken, + filter, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; + + filter: Nullable; +}) { + try { + const connectorDefinitions: ConnectorDefinition[] = []; + + const queryString = getQueryString({ + baseURL: `/connector-definitions?view=VIEW_FULL`, + pageSize, + nextPageToken, + filter, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + connectorDefinitions.push(...data.connector_definitions); + + if (data.next_page_token) { + connectorDefinitions.push( + ...(await listConnectorDefinitionsQuery({ + axiosInstance, + pageSize, + nextPageToken: data.next_page_token, + filter, + })) + ); + } + + return Promise.resolve(connectorDefinitions); + } catch (err) { + return Promise.reject(err); + } +} + +export async function getConnectorDefinitionQuery({ + axiosInstance, + connectorDefinitionName, +}: { + axiosInstance: AxiosInstance; + connectorDefinitionName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${connectorDefinitionName}?view=VIEW_FULL` + ); + + return Promise.resolve(data.connector_definition); + } catch (err) { + return Promise.reject(err); + } +} + +export async function getUserConnectorResourceQuery({ + axiosInstance, + connectorResourceName, +}: { + axiosInstance: AxiosInstance; + connectorResourceName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${connectorResourceName}?view=VIEW_FULL` + ); + + return Promise.resolve(data.connector_resource); + } catch (err) { + return Promise.reject(err); + } +} + +export async function watchUserConnectorResource({ + axiosInstance, + connectorResourceName, +}: { + axiosInstance: AxiosInstance; + connectorResourceName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${connectorResourceName}/watch` + ); + return Promise.resolve(data); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/index.ts b/src/index.ts index e7b27c1..d34f220 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,6 @@ import AuthClient from "./mgmt/AuthClient"; import ModelClient from "./model/ModelClient"; import OperationClient from "./operation/OperationClient"; import PipelineClient from "./pipeline/PipelineClient"; -import { Nullable } from "./types"; class InstillClient { public Pipeline: PipelineClient; @@ -14,11 +13,7 @@ class InstillClient { public Model: ModelClient; public Operation: OperationClient; - constructor( - baseUrl: string, - appVersion: string, - apiToken: string - ) { + constructor(baseUrl: string, appVersion: string, apiToken: string) { this.Pipeline = new PipelineClient(baseUrl, appVersion, apiToken); this.Auth = new AuthClient(baseUrl, appVersion, apiToken); this.Connector = new ConnectorClient(baseUrl, appVersion, apiToken); diff --git a/src/metric/MetricClient.ts b/src/metric/MetricClient.ts index f4a8b53..3564513 100644 --- a/src/metric/MetricClient.ts +++ b/src/metric/MetricClient.ts @@ -1,23 +1,15 @@ import axios, { AxiosInstance } from "axios"; import { Nullable } from "../types"; import { - ListPipelineTriggerRecordsResponse, - ListPipelinesChartResponse, - ListTriggeredPipelinesResponse, - PipelineTriggerRecord, - PipelinesChart, - TriggeredPipeline, -} from "./pipeline"; -import { getQueryString } from "../helper"; + listPipelineTriggerRecordsQuery, + listTriggeredPipelineChartQuery, + listTriggeredPipelineQuery, +} from "./pipeline/queries"; class MetricClient { private axiosInstance: AxiosInstance; - constructor( - baseUrl: string, - appVersion: string, - apiToken: string - ) { + constructor(baseUrl: string, appVersion: string, apiToken: string) { let URL: Nullable = `${baseUrl}/base/${appVersion}`; this.axiosInstance = axios.create({ @@ -35,123 +27,52 @@ class MetricClient { async listPipelineTriggerRecordsQuery({ pageSize, nextPageToken, - filter, }: { pageSize: Nullable; nextPageToken: Nullable; - filter: Nullable; }) { - try { - const triggers: PipelineTriggerRecord[] = []; - - const queryString = getQueryString({ - baseURL: `/metrics/vdp/pipeline/triggers`, - pageSize, - nextPageToken, - filter, - }); - - const { data } = - await this.axiosInstance.get( - queryString - ); - - triggers.push(...data.pipeline_trigger_records); - - if (data.next_page_token) { - triggers.push( - ...(await this.listPipelineTriggerRecordsQuery({ - pageSize, - - nextPageToken: data.next_page_token, - filter, - })) - ); - } - - return Promise.resolve(triggers); - } catch (err) { - return Promise.reject(err); - } + return listPipelineTriggerRecordsQuery({ + axiosInstance: this.axiosInstance, + pageSize, + nextPageToken, + filter, + }); } async listTriggeredPipelineQuery({ pageSize, nextPageToken, - filter, }: { pageSize: Nullable; nextPageToken: Nullable; - filter: Nullable; }) { - try { - const pipelines: TriggeredPipeline[] = []; - - const queryString = getQueryString({ - baseURL: `/metrics/vdp/pipeline/tables`, - pageSize, - nextPageToken, - filter, - }); - - const { data } = - await this.axiosInstance.get( - queryString - ); - - pipelines.push(...data.pipeline_trigger_table_records); - - if (data.next_page_token) { - pipelines.push( - ...(await this.listTriggeredPipelineQuery({ - pageSize, - - nextPageToken: data.next_page_token, - filter, - })) - ); - } - - return Promise.resolve(pipelines); - } catch (err) { - return Promise.reject(err); - } + return listTriggeredPipelineQuery({ + axiosInstance: this.axiosInstance, + pageSize, + nextPageToken, + filter, + }); } async listTriggeredPipelineChartQuery({ pageSize, nextPageToken, - filter, }: { pageSize: Nullable; nextPageToken: Nullable; - filter: Nullable; }) { - try { - const pipelinesChart: PipelinesChart[] = []; - - const queryString = getQueryString({ - baseURL: `/metrics/vdp/pipeline/charts`, - pageSize, - nextPageToken, - filter, - }); - - const { data } = await this.axiosInstance.get( - queryString - ); - pipelinesChart.push(...data.pipeline_trigger_chart_records); - - return Promise.resolve(pipelinesChart); - } catch (err) { - return Promise.reject(err); - } + return listTriggeredPipelineChartQuery({ + axiosInstance: this.axiosInstance, + pageSize, + nextPageToken, + filter, + }); } } diff --git a/src/metric/pipeline/queries.ts b/src/metric/pipeline/queries.ts new file mode 100644 index 0000000..a4aa65f --- /dev/null +++ b/src/metric/pipeline/queries.ts @@ -0,0 +1,130 @@ +import { AxiosInstance } from "axios"; +import { Nullable } from "../../types"; +import { + ListPipelineTriggerRecordsResponse, + ListPipelinesChartResponse, + ListTriggeredPipelinesResponse, + PipelineTriggerRecord, + PipelinesChart, + TriggeredPipeline, +} from "./types"; +import { getQueryString } from "../../helper"; + +export async function listPipelineTriggerRecordsQuery({ + axiosInstance, + pageSize, + nextPageToken, + filter, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; + filter: Nullable; +}) { + try { + const triggers: PipelineTriggerRecord[] = []; + + const queryString = getQueryString({ + baseURL: `/metrics/vdp/pipeline/triggers`, + pageSize, + nextPageToken, + filter, + }); + + const { data } = + await axiosInstance.get(queryString); + + triggers.push(...data.pipeline_trigger_records); + + if (data.next_page_token) { + triggers.push( + ...(await listPipelineTriggerRecordsQuery({ + axiosInstance, + pageSize, + nextPageToken: data.next_page_token, + filter, + })) + ); + } + + return Promise.resolve(triggers); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listTriggeredPipelineQuery({ + axiosInstance, + pageSize, + nextPageToken, + filter, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; + filter: Nullable; +}) { + try { + const pipelines: TriggeredPipeline[] = []; + + const queryString = getQueryString({ + baseURL: `/metrics/vdp/pipeline/tables`, + pageSize, + nextPageToken, + filter, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + pipelines.push(...data.pipeline_trigger_table_records); + + if (data.next_page_token) { + pipelines.push( + ...(await listTriggeredPipelineQuery({ + axiosInstance, + pageSize, + nextPageToken: data.next_page_token, + filter, + })) + ); + } + + return Promise.resolve(pipelines); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listTriggeredPipelineChartQuery({ + axiosInstance, + pageSize, + nextPageToken, + filter, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; + filter: Nullable; +}) { + try { + const pipelinesChart: PipelinesChart[] = []; + + const queryString = getQueryString({ + baseURL: `/metrics/vdp/pipeline/charts`, + pageSize, + nextPageToken, + filter, + }); + + const { data } = await axiosInstance.get( + queryString + ); + pipelinesChart.push(...data.pipeline_trigger_chart_records); + + return Promise.resolve(pipelinesChart); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/mgmt/AuthClient.ts b/src/mgmt/AuthClient.ts index b843b93..aac971e 100644 --- a/src/mgmt/AuthClient.ts +++ b/src/mgmt/AuthClient.ts @@ -1,29 +1,33 @@ import axios, { AxiosInstance } from "axios"; import { Nullable } from "../types"; import { - ApiToken, User, - CheckUserIdExistResponse, - GetApiTokenResponse, - GetUserResponse, - ListApiTokensResponse, ChangePasswordPayload, CreateApiTokenPayload, - CreateApiTokenResponse, - UpdateUserResponse, AuthLoginActionPayload, - AuthLoginActionResponse, } from "./types"; -import { getQueryString } from "../helper"; +import { + checkUserIdExist, + getApiTokenQuery, + getUserQuery, + listApiTokensQuery, +} from "./queries"; +import { + changePasswordMutation, + createApiTokenMutation, + deleteApiTokenMutation, + updateUserMutation, +} from "./mutation"; +import { + authLoginAction, + authLogoutAction, + authValidateTokenAction, +} from "./action"; class AuthClient { private axiosInstance: AxiosInstance; - constructor( - baseUrl: string, - appVersion: string, - apiToken: string - ) { + constructor(baseUrl: string, appVersion: string, apiToken: string) { let URL: Nullable = `${baseUrl}/base/${appVersion}`; this.axiosInstance = axios.create({ @@ -39,38 +43,18 @@ class AuthClient { * -----------------------------------------------------------------------*/ async getUserQuery() { - try { - const { data } = await this.axiosInstance.get( - "/users/me" - ); - - return Promise.resolve(data.user); - } catch (err) { - return Promise.reject(err); - } + return getUserQuery(this.axiosInstance); } async checkUserIdExist({ id }: { id: string }) { - try { - const { data } = await this.axiosInstance.get( - `/users/${id}/exist` - ); - return Promise.resolve(data.exists); - } catch (err) { - return Promise.reject(err); - } + return checkUserIdExist({ axiosInstance: this.axiosInstance, id: id }); } async getApiTokenQuery({ tokenName }: { tokenName: string }) { - try { - const { data } = await this.axiosInstance.get( - `/${tokenName}` - ); - - return Promise.resolve(data.token); - } catch (err) { - return Promise.reject(err); - } + return getApiTokenQuery({ + axiosInstance: this.axiosInstance, + tokenName: tokenName, + }); } async listApiTokensQuery({ @@ -80,36 +64,11 @@ class AuthClient { pageSize: Nullable; nextPageToken: Nullable; }) { - try { - const tokens: ApiToken[] = []; - - const queryString = getQueryString({ - baseURL: "/tokens", - pageSize, - nextPageToken, - filter: null, - }); - - const { data } = await this.axiosInstance.get( - queryString - ); - - tokens.push(...data.tokens); - - if (data.next_page_token) { - tokens.push( - ...(await this.listApiTokensQuery({ - pageSize, - - nextPageToken: data.next_page_token, - })) - ); - } - - return Promise.resolve(tokens); - } catch (err) { - return Promise.reject(err); - } + return listApiTokensQuery({ + axiosInstance: this.axiosInstance, + pageSize: pageSize, + nextPageToken: nextPageToken, + }); } /* ------------------------------------------------------------------------- @@ -117,16 +76,10 @@ class AuthClient { * -----------------------------------------------------------------------*/ async updateUserMutation({ payload }: { payload: Partial }) { - try { - const { data } = await this.axiosInstance.patch( - "/users/me", - payload - ); - - return Promise.resolve(data.user); - } catch (err) { - return Promise.reject(err); - } + return updateUserMutation({ + axiosInstance: this.axiosInstance, + payload: payload, + }); } async createApiTokenMutation({ @@ -134,24 +87,17 @@ class AuthClient { }: { payload: CreateApiTokenPayload; }) { - try { - const { data } = await this.axiosInstance.post( - "/tokens", - payload - ); - - return Promise.resolve(data.token); - } catch (err) { - return Promise.reject(err); - } + return createApiTokenMutation({ + axiosInstance: this.axiosInstance, + payload: payload, + }); } async deleteApiTokenMutation({ tokenName }: { tokenName: string }) { - try { - await this.axiosInstance.delete(`/${tokenName}`); - } catch (err) { - return Promise.reject(err); - } + return deleteApiTokenMutation({ + axiosInstance: this.axiosInstance, + tokenName: tokenName, + }); } /* ------------------------------------------------------------------------- @@ -163,11 +109,10 @@ class AuthClient { }: { payload: ChangePasswordPayload; }) { - try { - await this.axiosInstance.post("/auth/change_password", payload); - } catch (err) { - return Promise.reject(err); - } + return changePasswordMutation({ + axiosInstance: this.axiosInstance, + payload: payload, + }); } /* ------------------------------------------------------------------------- @@ -175,32 +120,18 @@ class AuthClient { * -----------------------------------------------------------------------*/ async authLogoutAction() { - try { - await this.axiosInstance.post("/auth/logout"); - } catch (err) { - return Promise.reject(err); - } + return authLogoutAction(this.axiosInstance); } async authLoginAction({ payload }: { payload: AuthLoginActionPayload }) { - try { - const { data } = await this.axiosInstance.post( - "/auth/login", - payload - ); - - return Promise.resolve(data.access_token); - } catch (err) { - return Promise.reject(err); - } + return authLoginAction({ + axiosInstance: this.axiosInstance, + payload: payload, + }); } - async authValidateTokenAction({}: {}) { - try { - await this.axiosInstance.post("/auth/validate_access_token"); - } catch (err) { - return Promise.reject(err); - } + async authValidateTokenAction() { + return authValidateTokenAction(this.axiosInstance); } } diff --git a/src/mgmt/action.ts b/src/mgmt/action.ts new file mode 100644 index 0000000..6d8d396 --- /dev/null +++ b/src/mgmt/action.ts @@ -0,0 +1,37 @@ +import { AxiosInstance } from "axios"; +import { AuthLoginActionPayload, AuthLoginActionResponse } from "./types"; + +export async function authLogoutAction(axiosInstance: AxiosInstance) { + try { + await axiosInstance.post("/auth/logout"); + } catch (err) { + return Promise.reject(err); + } +} + +export async function authLoginAction({ + axiosInstance, + payload, +}: { + axiosInstance: AxiosInstance; + payload: AuthLoginActionPayload; +}) { + try { + const { data } = await axiosInstance.post( + "/auth/login", + payload + ); + + return Promise.resolve(data.access_token); + } catch (err) { + return Promise.reject(err); + } +} + +export async function authValidateTokenAction(axiosInstance: AxiosInstance) { + try { + await axiosInstance.post("/auth/validate_access_token"); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/mgmt/index.ts b/src/mgmt/index.ts index e9e3461..e64a6f1 100644 --- a/src/mgmt/index.ts +++ b/src/mgmt/index.ts @@ -1,5 +1,2 @@ -// export * from "./actions"; -// export * from "./mutations"; -// export * from "./queries"; export * from "./types"; export * from "./AuthClient"; diff --git a/src/mgmt/mutation.ts b/src/mgmt/mutation.ts new file mode 100644 index 0000000..234189a --- /dev/null +++ b/src/mgmt/mutation.ts @@ -0,0 +1,78 @@ +import { AxiosInstance } from "axios"; +import { + ChangePasswordPayload, + CreateApiTokenPayload, + CreateApiTokenResponse, + UpdateUserResponse, + User, +} from "./types"; + +export async function updateUserMutation({ + axiosInstance, + payload, +}: { + axiosInstance: AxiosInstance; + payload: Partial; +}) { + try { + const { data } = await axiosInstance.patch( + "/users/me", + payload + ); + + return Promise.resolve(data.user); + } catch (err) { + return Promise.reject(err); + } +} + +export async function createApiTokenMutation({ + axiosInstance, + payload, +}: { + axiosInstance: AxiosInstance; + payload: CreateApiTokenPayload; +}) { + try { + const { data } = await axiosInstance.post( + "/tokens", + payload + ); + + return Promise.resolve(data.token); + } catch (err) { + return Promise.reject(err); + } +} + +export async function deleteApiTokenMutation({ + axiosInstance, + tokenName, +}: { + axiosInstance: AxiosInstance; + tokenName: string; +}) { + try { + await axiosInstance.delete(`/${tokenName}`); + } catch (err) { + return Promise.reject(err); + } +} + +/* ------------------------------------------------------------------------- + * Auth + * -----------------------------------------------------------------------*/ + +export async function changePasswordMutation({ + axiosInstance, + payload, +}: { + axiosInstance: AxiosInstance; + payload: ChangePasswordPayload; +}) { + try { + await axiosInstance.post("/auth/change_password", payload); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/mgmt/queries.ts b/src/mgmt/queries.ts new file mode 100644 index 0000000..62418a7 --- /dev/null +++ b/src/mgmt/queries.ts @@ -0,0 +1,96 @@ +import { AxiosInstance } from "axios"; +import { + ApiToken, + CheckUserIdExistResponse, + GetApiTokenResponse, + GetUserResponse, + ListApiTokensResponse, +} from "./types"; +import { getQueryString } from "../helper"; +import { Nullable } from "../types"; + +export async function getUserQuery(axiosInstance: AxiosInstance) { + try { + const { data } = await axiosInstance.get("/users/me"); + + return Promise.resolve(data.user); + } catch (err) { + return Promise.reject(err); + } +} + +export async function checkUserIdExist({ + axiosInstance, + id, +}: { + axiosInstance: AxiosInstance; + id: string; +}) { + try { + const { data } = await axiosInstance.get( + `/users/${id}/exist` + ); + return Promise.resolve(data.exists); + } catch (err) { + return Promise.reject(err); + } +} + +export async function getApiTokenQuery({ + axiosInstance, + tokenName, +}: { + axiosInstance: AxiosInstance; + tokenName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${tokenName}` + ); + + return Promise.resolve(data.token); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listApiTokensQuery({ + axiosInstance, + pageSize, + nextPageToken, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; +}) { + try { + const tokens: ApiToken[] = []; + + const queryString = getQueryString({ + baseURL: "/tokens", + pageSize, + nextPageToken, + filter: null, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + tokens.push(...data.tokens); + + if (data.next_page_token) { + tokens.push( + ...(await listApiTokensQuery({ + axiosInstance, + pageSize, + nextPageToken: data.next_page_token, + })) + ); + } + + return Promise.resolve(tokens); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/model/ModelClient.ts b/src/model/ModelClient.ts index 3292e06..3b18371 100644 --- a/src/model/ModelClient.ts +++ b/src/model/ModelClient.ts @@ -1,31 +1,25 @@ import axios, { AxiosInstance } from "axios"; import { Nullable } from "../types"; +import { CreateUserModelPayload, UpdateUserModelPayload } from "./types"; import { - Model, - ModelDefinition, - ModelWatchState, - GetModelDefinitionResponse, - GetUserModelReadmeQueryResponse, - GetUserModelResponse, - ListModelDefinitionsResponse, - ListModelsResponse, - ListUserModelsResponse, - CreateUserModelPayload, - CreateUserModelResponse, - UpdateUserModelPayload, - UpdateUserModelResponse, - DeployUserModelResponse, - UndeployUserModelResponse, -} from "./types"; -import { getQueryString } from "../helper"; + getModelDefinitionQuery, + getUserModelQuery, + getUserModelReadmeQuery, + listModelDefinitionsQuery, + listModelsQuery, + listUserModelsQuery, + watchUserModel, +} from "./queries"; +import { + createUserModelMutation, + deleteUserModelMutation, + updateModelMutation, +} from "./mutation"; +import { deployUserModelAction, undeployUserModelAction } from "./action"; class ModelClient { private axiosInstance: AxiosInstance; - constructor( - baseUrl: string, - appVersion: string, - apiToken: string - ) { + constructor(baseUrl: string, appVersion: string, apiToken: string) { let URL: Nullable = `${baseUrl}/model/${appVersion}`; this.axiosInstance = axios.create({ @@ -35,7 +29,6 @@ class ModelClient { }, }); } - /* ------------------------------------------------------------------------- * Model Queries * -----------------------------------------------------------------------*/ @@ -45,15 +38,10 @@ class ModelClient { }: { modelDefinitionName: string; }) { - try { - const { data } = await this.axiosInstance.get( - `/${modelDefinitionName}` - ); - - return Promise.resolve(data.model_definition); - } catch (err) { - return Promise.reject(err); - } + return getModelDefinitionQuery({ + axiosInstance: this.axiosInstance, + modelDefinitionName, + }); } async listModelDefinitionsQuery({ @@ -63,35 +51,11 @@ class ModelClient { pageSize: Nullable; nextPageToken: Nullable; }) { - try { - const modelDefinitions: ModelDefinition[] = []; - - const queryString = getQueryString({ - baseURL: "/model-definitions", - pageSize, - nextPageToken, - filter: null, - }); - - const { data } = - await this.axiosInstance.get(queryString); - - modelDefinitions.push(...data.model_definitions); - - if (data.next_page_token) { - modelDefinitions.push( - ...(await this.listModelDefinitionsQuery({ - pageSize, - - nextPageToken: data.next_page_token, - })) - ); - } - - return Promise.resolve(modelDefinitions); - } catch (err) { - return Promise.reject(err); - } + return listModelDefinitionsQuery({ + axiosInstance: this.axiosInstance, + pageSize, + nextPageToken, + }); } /* ------------------------------------------------------------------------- @@ -99,14 +63,10 @@ class ModelClient { * -----------------------------------------------------------------------*/ async getUserModelQuery({ modelName }: { modelName: string }) { - try { - const { data } = await this.axiosInstance.get( - `/${modelName}?view=VIEW_FULL` - ); - return Promise.resolve(data.model); - } catch (err) { - return Promise.reject(err); - } + return getUserModelQuery({ + axiosInstance: this.axiosInstance, + modelName, + }); } async listModelsQuery({ @@ -116,36 +76,11 @@ class ModelClient { pageSize: Nullable; nextPageToken: Nullable; }) { - try { - const models: Model[] = []; - - const queryString = getQueryString({ - baseURL: "/models?view=VIEW_FULL", - pageSize, - nextPageToken, - filter: null, - }); - - const { data } = await this.axiosInstance.get( - queryString - ); - - models.push(...data.models); - - if (data.next_page_token) { - models.push( - ...(await this.listModelsQuery({ - pageSize, - - nextPageToken: data.next_page_token, - })) - ); - } - - return Promise.resolve(models); - } catch (err) { - return Promise.reject(err); - } + return listModelsQuery({ + axiosInstance: this.axiosInstance, + pageSize, + nextPageToken, + }); } async listUserModelsQuery({ @@ -157,49 +92,19 @@ class ModelClient { pageSize: Nullable; nextPageToken: Nullable; }) { - try { - const models: Model[] = []; - - const queryString = getQueryString({ - baseURL: `/${userName}/models?view=VIEW_FULL`, - pageSize, - nextPageToken, - filter: null, - }); - - const { data } = await this.axiosInstance.get( - queryString - ); - - models.push(...data.models); - - if (data.next_page_token) { - models.push( - ...(await this.listUserModelsQuery({ - userName, - pageSize, - - nextPageToken: data.next_page_token, - })) - ); - } - - return Promise.resolve(models); - } catch (err) { - return Promise.reject(err); - } + return listUserModelsQuery({ + axiosInstance: this.axiosInstance, + userName, + pageSize, + nextPageToken, + }); } async getUserModelReadmeQuery({ modelName }: { modelName: string }) { - try { - const { data } = - await this.axiosInstance.get( - `/${modelName}/readme` - ); - return Promise.resolve(data.readme); - } catch (err) { - return Promise.reject(err); - } + return getUserModelReadmeQuery({ + axiosInstance: this.axiosInstance, + modelName, + }); } /* ------------------------------------------------------------------------- @@ -207,14 +112,10 @@ class ModelClient { * -----------------------------------------------------------------------*/ async watchUserModel({ modelName }: { modelName: string }) { - try { - const { data } = await this.axiosInstance.get( - `/${modelName}/watch` - ); - return Promise.resolve(data); - } catch (err) { - return Promise.reject(err); - } + return watchUserModel({ + axiosInstance: this.axiosInstance, + modelName, + }); } /* ------------------------------------------------------------------------- @@ -228,98 +129,25 @@ class ModelClient { userName: string; payload: CreateUserModelPayload; }) { - if (payload.type === "Local") { - try { - const formData = new FormData(); - formData.append("id", payload.id); - formData.append("model_definition", payload.model_definition); - formData.append("content", payload.configuration.content); - - if (payload.description) { - formData.append("description", payload.description); - } - - const { data } = await this.axiosInstance.post( - "/models/multipart", - formData, - { - headers: { - "Content-Type": "multipart/form-data", - }, - } - ); - return Promise.resolve(data.operation); - } catch (err) { - return Promise.reject(err); - } - } else { - let input: Record = {}; - - if (payload.type === "GitHub") { - input = { - id: payload.id, - model_definition: payload.model_definition, - description: payload.description, - configuration: { - repository: payload.configuration.repository, - tag: payload.configuration.tag, - }, - }; - } else if (payload.type === "ArtiVC") { - input = { - id: payload.id, - model_definition: payload.model_definition, - description: payload.description, - configuration: { - url: payload.configuration.url, - credential: payload.configuration.credential - ? JSON.parse(payload.configuration.credential) - : undefined, - tag: payload.configuration.tag, - }, - }; - } else { - input = { - id: payload.id, - model_definition: payload.model_definition, - description: payload.description, - configuration: { - repo_id: payload.configuration.repo_id, - }, - }; - } - - try { - const { data } = await this.axiosInstance.post( - `${userName}/models`, - input - ); - - return Promise.resolve(data.operation); - } catch (err) { - return Promise.reject(err); - } - } + return createUserModelMutation({ + axiosInstance: this.axiosInstance, + userName, + payload, + }); } async updateModelMutation({ payload }: { payload: UpdateUserModelPayload }) { - try { - const { data } = await this.axiosInstance.patch( - `/${payload.name}`, - payload - ); - return Promise.resolve(data.model); - } catch (err) { - return Promise.reject(err); - } + return updateModelMutation({ + axiosInstance: this.axiosInstance, + payload, + }); } async deleteUserModelMutation({ modelName }: { modelName: string }) { - try { - await this.axiosInstance.delete(`/${modelName}`); - } catch (err) { - return Promise.reject(err); - } + return deleteUserModelMutation({ + axiosInstance: this.axiosInstance, + modelName, + }); } /* ------------------------------------------------------------------------- @@ -327,25 +155,17 @@ class ModelClient { * -----------------------------------------------------------------------*/ async deployUserModelAction({ modelName }: { modelName: string }) { - try { - const { data } = await this.axiosInstance.post( - `/${modelName}/deploy` - ); - return Promise.resolve(data.model_id); - } catch (err) { - return Promise.reject(err); - } + return deployUserModelAction({ + axiosInstance: this.axiosInstance, + modelName, + }); } - async undeployUserModeleAction({ modelName }: { modelName: string }) { - try { - const { data } = await this.axiosInstance.post( - `/${modelName}/undeploy` - ); - return Promise.resolve(data.model_id); - } catch (err) { - return Promise.reject(err); - } + async undeployUserModelAction({ modelName }: { modelName: string }) { + return undeployUserModelAction({ + axiosInstance: this.axiosInstance, + modelName, + }); } } diff --git a/src/model/action.ts b/src/model/action.ts new file mode 100644 index 0000000..f3b51d5 --- /dev/null +++ b/src/model/action.ts @@ -0,0 +1,36 @@ +import { AxiosInstance } from "axios"; +import { DeployUserModelResponse, UndeployUserModelResponse } from "./types"; + +export async function deployUserModelAction({ + axiosInstance, + modelName, +}: { + axiosInstance: AxiosInstance; + modelName: string; +}) { + try { + const { data } = await axiosInstance.post( + `/${modelName}/deploy` + ); + return Promise.resolve(data.model_id); + } catch (err) { + return Promise.reject(err); + } +} + +export async function undeployUserModelAction({ + axiosInstance, + modelName, +}: { + axiosInstance: AxiosInstance; + modelName: string; +}) { + try { + const { data } = await axiosInstance.post( + `/${modelName}/undeploy` + ); + return Promise.resolve(data.model_id); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/model/index.ts b/src/model/index.ts index d89d970..8395afc 100644 --- a/src/model/index.ts +++ b/src/model/index.ts @@ -1,5 +1,2 @@ -// export * from "./actions"; -// export * from "./mutations"; -// export * from "./queries"; export * from "./types"; export * from "./ModelClient"; diff --git a/src/model/mutation.ts b/src/model/mutation.ts new file mode 100644 index 0000000..f585dcf --- /dev/null +++ b/src/model/mutation.ts @@ -0,0 +1,122 @@ +import { AxiosInstance } from "axios"; +import { + CreateUserModelPayload, + CreateUserModelResponse, + UpdateUserModelPayload, + UpdateUserModelResponse, +} from "./types"; + +export async function createUserModelMutation({ + axiosInstance, + userName, + payload, +}: { + axiosInstance: AxiosInstance; + userName: string; + payload: CreateUserModelPayload; +}) { + if (payload.type === "Local") { + try { + const formData = new FormData(); + formData.append("id", payload.id); + formData.append("model_definition", payload.model_definition); + formData.append("content", payload.configuration.content); + + if (payload.description) { + formData.append("description", payload.description); + } + + const { data } = await axiosInstance.post( + "/models/multipart", + formData, + { + headers: { + "Content-Type": "multipart/form-data", + }, + } + ); + return Promise.resolve(data.operation); + } catch (err) { + return Promise.reject(err); + } + } else { + let input: Record = {}; + + if (payload.type === "GitHub") { + input = { + id: payload.id, + model_definition: payload.model_definition, + description: payload.description, + configuration: { + repository: payload.configuration.repository, + tag: payload.configuration.tag, + }, + }; + } else if (payload.type === "ArtiVC") { + input = { + id: payload.id, + model_definition: payload.model_definition, + description: payload.description, + configuration: { + url: payload.configuration.url, + credential: payload.configuration.credential + ? JSON.parse(payload.configuration.credential) + : undefined, + tag: payload.configuration.tag, + }, + }; + } else { + input = { + id: payload.id, + model_definition: payload.model_definition, + description: payload.description, + configuration: { + repo_id: payload.configuration.repo_id, + }, + }; + } + + try { + const { data } = await axiosInstance.post( + `${userName}/models`, + input + ); + + return Promise.resolve(data.operation); + } catch (err) { + return Promise.reject(err); + } + } +} + +export async function updateModelMutation({ + axiosInstance, + payload, +}: { + axiosInstance: AxiosInstance; + payload: UpdateUserModelPayload; +}) { + try { + const { data } = await axiosInstance.patch( + `/${payload.name}`, + payload + ); + return Promise.resolve(data.model); + } catch (err) { + return Promise.reject(err); + } +} + +export async function deleteUserModelMutation({ + axiosInstance, + modelName, +}: { + axiosInstance: AxiosInstance; + modelName: string; +}) { + try { + await axiosInstance.delete(`/${modelName}`); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/model/queries.ts b/src/model/queries.ts new file mode 100644 index 0000000..6c3a62c --- /dev/null +++ b/src/model/queries.ts @@ -0,0 +1,206 @@ +import { AxiosInstance } from "axios"; +import { + GetModelDefinitionResponse, + GetUserModelReadmeQueryResponse, + GetUserModelResponse, + ListModelDefinitionsResponse, + ListModelsResponse, + ListUserModelsResponse, + Model, + ModelDefinition, + ModelWatchState, +} from "./types"; +import { Nullable } from "../types"; +import { getQueryString } from "../helper"; + +export async function getModelDefinitionQuery({ + axiosInstance, + modelDefinitionName, +}: { + axiosInstance: AxiosInstance; + modelDefinitionName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${modelDefinitionName}` + ); + return Promise.resolve(data.model_definition); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listModelDefinitionsQuery({ + axiosInstance, + pageSize, + nextPageToken, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; +}) { + try { + const modelDefinitions: ModelDefinition[] = []; + + const queryString = getQueryString({ + baseURL: "/model-definitions", + pageSize, + nextPageToken, + filter: null, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + modelDefinitions.push(...data.model_definitions); + + if (data.next_page_token) { + modelDefinitions.push( + ...(await listModelDefinitionsQuery({ + axiosInstance, + pageSize, + nextPageToken: data.next_page_token, + })) + ); + } + + return Promise.resolve(modelDefinitions); + } catch (err) { + return Promise.reject(err); + } +} + +export async function getUserModelQuery({ + axiosInstance, + modelName, +}: { + axiosInstance: AxiosInstance; + modelName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${modelName}?view=VIEW_FULL` + ); + return Promise.resolve(data.model); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listModelsQuery({ + axiosInstance, + pageSize, + nextPageToken, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; +}) { + try { + const models: Model[] = []; + + const queryString = getQueryString({ + baseURL: "/models?view=VIEW_FULL", + pageSize, + nextPageToken, + filter: null, + }); + + const { data } = await axiosInstance.get(queryString); + + models.push(...data.models); + + if (data.next_page_token) { + models.push( + ...(await listModelsQuery({ + axiosInstance, + pageSize, + nextPageToken: data.next_page_token, + })) + ); + } + + return Promise.resolve(models); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listUserModelsQuery({ + axiosInstance, + userName, + pageSize, + nextPageToken, +}: { + axiosInstance: AxiosInstance; + userName: string; + pageSize: Nullable; + nextPageToken: Nullable; +}) { + try { + const models: Model[] = []; + + const queryString = getQueryString({ + baseURL: `/${userName}/models?view=VIEW_FULL`, + pageSize, + nextPageToken, + filter: null, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + models.push(...data.models); + + if (data.next_page_token) { + models.push( + ...(await listUserModelsQuery({ + axiosInstance, + userName, + pageSize, + nextPageToken: data.next_page_token, + })) + ); + } + + return Promise.resolve(models); + } catch (err) { + return Promise.reject(err); + } +} + +export async function getUserModelReadmeQuery({ + axiosInstance, + modelName, +}: { + axiosInstance: AxiosInstance; + modelName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${modelName}/readme` + ); + return Promise.resolve(data.readme); + } catch (err) { + return Promise.reject(err); + } +} + +export async function watchUserModel({ + axiosInstance, + modelName, +}: { + axiosInstance: AxiosInstance; + modelName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${modelName}/watch` + ); + return Promise.resolve(data); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/operation/OperationClient.ts b/src/operation/OperationClient.ts index 60e0c8c..67bbf5f 100644 --- a/src/operation/OperationClient.ts +++ b/src/operation/OperationClient.ts @@ -1,15 +1,11 @@ import axios, { AxiosInstance } from "axios"; import { Nullable } from "../types"; -import { GetModelOperationResponse } from "./types"; +import { checkUntilOperationIsDone, getOperationQuery } from "./queries"; class OperationClient { private axiosInstance: AxiosInstance; - constructor( - baseUrl: string, - appVersion: string, - apiToken: string - ) { + constructor(baseUrl: string, appVersion: string, apiToken: string) { let URL: Nullable = `${baseUrl}/model/${appVersion}`; this.axiosInstance = axios.create({ @@ -20,39 +16,26 @@ class OperationClient { }); } + /* ------------------------------------------------------------------------- + * Operation Queries + * -----------------------------------------------------------------------*/ + async getOperationQuery({ operationName }: { operationName: string }) { - try { - const { data } = await this.axiosInstance.get( - `/${operationName}` - ); - return Promise.resolve(data.operation); - } catch (err) { - return Promise.reject(err); - } + return getOperationQuery({ + axiosInstance: this.axiosInstance, + operationName, + }); } - async checkUntilOperationIsDoen({ + async checkUntilOperationIsDone({ operationName, }: { operationName: string; }): Promise { - try { - const operation = await this.getOperationQuery({ - operationName, - }); - - if (operation.done) { - return Promise.resolve(true); - } else { - await new Promise((resolve) => setTimeout(resolve, 1000)); - const result = await this.checkUntilOperationIsDoen({ - operationName, - }); - return Promise.resolve(result); - } - } catch (err) { - return Promise.reject(err); - } + return checkUntilOperationIsDone({ + axiosInstance: this.axiosInstance, + operationName, + }); } } diff --git a/src/operation/index.ts b/src/operation/index.ts index 2550150..c7cd75f 100644 --- a/src/operation/index.ts +++ b/src/operation/index.ts @@ -1,3 +1,2 @@ -// export * from "./queries"; export * from "./types"; export * from "./OperationClient"; diff --git a/src/operation/queries.ts b/src/operation/queries.ts new file mode 100644 index 0000000..740d3d8 --- /dev/null +++ b/src/operation/queries.ts @@ -0,0 +1,47 @@ +import { AxiosInstance } from "axios"; +import { GetModelOperationResponse } from "./types"; + +export async function getOperationQuery({ + axiosInstance, + operationName, +}: { + axiosInstance: AxiosInstance; + operationName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${operationName}` + ); + return Promise.resolve(data.operation); + } catch (err) { + return Promise.reject(err); + } +} + +export async function checkUntilOperationIsDone({ + axiosInstance, + operationName, +}: { + axiosInstance: AxiosInstance; + operationName: string; +}): Promise { + try { + const operation = await getOperationQuery({ + axiosInstance, + operationName, + }); + + if (operation.done) { + return Promise.resolve(true); + } else { + await new Promise((resolve) => setTimeout(resolve, 1000)); + const result = await checkUntilOperationIsDone({ + axiosInstance, + operationName, + }); + return Promise.resolve(result); + } + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/pipeline/PipelineClient.ts b/src/pipeline/PipelineClient.ts index e726e13..5bf4480 100644 --- a/src/pipeline/PipelineClient.ts +++ b/src/pipeline/PipelineClient.ts @@ -1,44 +1,46 @@ import axios, { AxiosInstance } from "axios"; -import { getQueryString } from "../helper"; import { Nullable } from "../types"; import { - Pipeline, - PipelineRelease, - RestoreUserPipelineReleaseResponse, - SetDefaultUserPipelineReleaseResponse, TriggerAsyncUserPipelinePayload, - TriggerAsyncUserPipelineReleaseResponse, - TriggerAsyncUserPipelineResponse, TriggerUserPipelinePayload, - TriggerUserPipelineResponse, - GetUserPipelineReleaseResponse, - GetUserPipelineResponse, - ListPipelineReleasesResponse, - ListPipelinesResponse, - ListUserPipelinesResponse, - WatchUserPipelineReleaseResponse, - CreatePipelineResponse, - CreateUserPipelinePayload, CreateUserPipelineReleasePayload, - CreateUserPipelineReleaseResponse, RenameUserPipelinePayload, - RenameUserPipelineResponse, UpdateUserPipelinePayload, UpdateUserPipelineReleasePayload, - UpdateUserPipelineReleaseResponse, - UpdateUserPipelineResponse, + CreateUserPipelinePayload, } from "./types"; +import { + getUserPipelineQuery, + getUserPipelineReleaseQuery, + listPipelinesQuery, + listUserPipelineReleasesQuery, + listUserPipelinesQuery, + watchUserPipelineReleaseQuery, +} from "./queries"; +import { + createUserPipelineMutation, + createUserPipelineReleaseMutation, + deleteUserPipelineMutation, + deleteUserPipelineReleaseMutation, + renameUserPipelineMutation, + updateUserPipelineMutation, + updateUserPipelineReleaseMutation, +} from "./mutation"; +import { + restoreUserPipelineReleaseMutation, + setDefaultUserPipelineReleaseMutation, + triggerAsyncUserPipelineAction, + triggerAsyncUserPipelineReleaseAction, + triggerUserPipelineAction, + triggerUserPipelineReleaseAction, +} from "./action"; class PipelineClient { // Define your specific API methods here private axiosInstance: AxiosInstance; - constructor( - baseUrl: string, - appVersion: string, - apiToken: string - ) { + constructor(baseUrl: string, appVersion: string, apiToken: string) { let URL: Nullable = `${baseUrl}/vdp/${appVersion}`; this.axiosInstance = axios.create({ @@ -49,7 +51,9 @@ class PipelineClient { }); } - // Queries + /* ------------------------------------------------------------------------- + * Pipeline Queries + * -----------------------------------------------------------------------*/ async listPipelinesQuery({ pageSize, @@ -58,35 +62,11 @@ class PipelineClient { pageSize: Nullable; nextPageToken: Nullable; }) { - try { - const pipelines: Pipeline[] = []; - - const queryString = getQueryString({ - baseURL: "/pipelines?view=VIEW_FULL", - pageSize, - nextPageToken, - filter: null, - }); - - const { data } = await this.axiosInstance.get( - queryString - ); - - pipelines.push(...data.pipelines); - - if (data.next_page_token) { - pipelines.push( - ...(await this.listPipelinesQuery({ - pageSize, - nextPageToken: data.next_page_token, - })) - ); - } - - return Promise.resolve(pipelines); - } catch (err) { - return Promise.reject(err); - } + return listPipelinesQuery({ + axiosInstance: this.axiosInstance, + pageSize, + nextPageToken, + }); } async listUserPipelinesQuery({ @@ -98,56 +78,26 @@ class PipelineClient { nextPageToken: Nullable; userName: string; }) { - try { - const pipelines: Pipeline[] = []; - - const queryString = getQueryString({ - baseURL: `${userName}/pipelines?view=VIEW_FULL`, - pageSize, - nextPageToken, - filter: null, - }); - - const { data } = await this.axiosInstance.get( - queryString - ); - - pipelines.push(...data.pipelines); - - if (data.next_page_token) { - pipelines.push( - ...(await this.listUserPipelinesQuery({ - pageSize, - nextPageToken: data.next_page_token, - - userName, - })) - ); - } - - return Promise.resolve(pipelines); - } catch (err) { - return Promise.reject(err); - } + return listUserPipelinesQuery({ + axiosInstance: this.axiosInstance, + pageSize, + nextPageToken, + userName, + }); } async getUserPipelineQuery({ pipelineName }: { pipelineName: string }) { - try { - const { data } = await this.axiosInstance.get( - `/${pipelineName}?view=VIEW_FULL` - ); - - return Promise.resolve(data.pipeline); - } catch (err) { - return Promise.reject(err); - } + return getUserPipelineQuery({ + axiosInstance: this.axiosInstance, + pipelineName, + }); } /* ------------------------------------------------------------------------- * Pipeline Release * -----------------------------------------------------------------------*/ - async ListUserPipelineReleasesQuery({ + async listUserPipelineReleasesQuery({ pipelineName, pageSize, nextPageToken, @@ -156,35 +106,12 @@ class PipelineClient { pageSize: Nullable; nextPageToken: Nullable; }) { - try { - const releases: PipelineRelease[] = []; - - const queryString = getQueryString({ - baseURL: `/${pipelineName}/releases?view=VIEW_FULL`, - pageSize, - nextPageToken, - filter: null, - }); - - const { data } = - await this.axiosInstance.get(queryString); - - releases.push(...data.releases); - - if (data.next_page_token) { - releases.push( - ...(await this.ListUserPipelineReleasesQuery({ - pipelineName, - pageSize, - nextPageToken: data.next_page_token, - })) - ); - } - - return Promise.resolve(releases); - } catch (err) { - return Promise.reject(err); - } + return listUserPipelineReleasesQuery({ + axiosInstance: this.axiosInstance, + pipelineName, + pageSize, + nextPageToken, + }); } async getUserPipelineReleaseQuery({ @@ -192,16 +119,10 @@ class PipelineClient { }: { pipelineReleaseName: string; }) { - try { - const { data } = - await this.axiosInstance.get( - `/${pipelineReleaseName}?view=VIEW_FULL` - ); - - return Promise.resolve(data.release); - } catch (err) { - return Promise.reject(err); - } + return getUserPipelineReleaseQuery({ + axiosInstance: this.axiosInstance, + pipelineReleaseName, + }); } async watchUserPipelineReleaseQuery({ @@ -209,18 +130,15 @@ class PipelineClient { }: { pipelineReleaseName: string; }) { - try { - const { data } = - await this.axiosInstance.get( - `/${pipelineReleaseName}/watch` - ); - return Promise.resolve(data.state); - } catch (err) { - return Promise.reject(err); - } + return watchUserPipelineReleaseQuery({ + axiosInstance: this.axiosInstance, + pipelineReleaseName, + }); } - // Mutation + /* ------------------------------------------------------------------------- + * Pipeline Mutation + * -----------------------------------------------------------------------*/ async createUserPipelineMutation({ userName, @@ -229,15 +147,11 @@ class PipelineClient { userName: string; payload: CreateUserPipelinePayload; }) { - try { - const { data } = await this.axiosInstance.post( - `${userName}/pipelines`, - payload - ); - return Promise.resolve(data.pipeline); - } catch (err) { - return Promise.reject(err); - } + return createUserPipelineMutation({ + axiosInstance: this.axiosInstance, + userName, + payload, + }); } async updateUserPipelineMutation({ @@ -245,24 +159,17 @@ class PipelineClient { }: { payload: UpdateUserPipelinePayload; }) { - try { - const { data } = - await this.axiosInstance.patch( - `/${payload.name}`, - payload - ); - return Promise.resolve(data.pipeline); - } catch (err) { - return Promise.reject(err); - } + return updateUserPipelineMutation({ + axiosInstance: this.axiosInstance, + payload, + }); } async deleteUserPipelineMutation({ pipelineName }: { pipelineName: string }) { - try { - await this.axiosInstance.delete(`/${pipelineName}`); - } catch (err) { - return Promise.reject(err); - } + return deleteUserPipelineMutation({ + axiosInstance: this.axiosInstance, + pipelineName, + }); } async renameUserPipelineMutation({ @@ -270,17 +177,10 @@ class PipelineClient { }: { payload: RenameUserPipelinePayload; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${payload.name}/rename`, - payload - ); - - return Promise.resolve(data.pipeline); - } catch (err) { - return Promise.reject(err); - } + return renameUserPipelineMutation({ + axiosInstance: this.axiosInstance, + payload, + }); } /* ------------------------------------------------------------------------- @@ -294,17 +194,11 @@ class PipelineClient { pipelineName: string; payload: CreateUserPipelineReleasePayload; }) { - try { - const { data } = - await this.axiosInstance.post( - `${pipelineName}/releases`, - payload - ); - - return Promise.resolve(data.release); - } catch (err) { - return Promise.reject(err); - } + return createUserPipelineReleaseMutation({ + axiosInstance: this.axiosInstance, + pipelineName, + payload, + }); } async updateUserPipelineReleaseMutation({ @@ -314,16 +208,11 @@ class PipelineClient { payload: UpdateUserPipelineReleasePayload; pipelineReleaseName: string; }) { - try { - const { data } = - await this.axiosInstance.patch( - `/${pipelineReleaseName}`, - payload - ); - return Promise.resolve(data.release); - } catch (err) { - return Promise.reject(err); - } + return updateUserPipelineReleaseMutation({ + axiosInstance: this.axiosInstance, + payload, + pipelineReleaseName, + }); } async deleteUserPipelineReleaseMutation({ @@ -331,73 +220,48 @@ class PipelineClient { }: { pipelineReleaseName: string; }) { - try { - await this.axiosInstance.delete(`/${pipelineReleaseName}`); - } catch (err) { - return Promise.reject(err); - } + return deleteUserPipelineReleaseMutation({ + axiosInstance: this.axiosInstance, + pipelineReleaseName, + }); } - // Actions + /* ------------------------------------------------------------------------- + * Pipeline Actions + * -----------------------------------------------------------------------*/ async triggerUserPipelineAction({ pipelineName, payload, - returnTraces, }: { pipelineName: string; payload: TriggerUserPipelinePayload; - returnTraces?: boolean; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${pipelineName}/trigger`, - payload, - { - headers: { - "instill-return-traces": returnTraces ? "true" : "false", - "Access-Control-Allow-Headers": "instill-return-traces", - "Content-Type": "application/json", - }, - } - ); - return Promise.resolve(data); - } catch (err) { - return Promise.reject(err); - } + return triggerUserPipelineAction({ + axiosInstance: this.axiosInstance, + pipelineName, + payload, + returnTraces, + }); } async triggerAsyncUserPipelineAction({ pipelineName, payload, - returnTraces, }: { pipelineName: string; payload: TriggerAsyncUserPipelinePayload; - returnTraces?: boolean; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${pipelineName}/triggerAsync`, - payload, - { - headers: { - "instill-return-traces": returnTraces ? "true" : "false", - "Access-Control-Allow-Headers": "instill-return-traces", - "Content-Type": "application/json", - }, - } - ); - return Promise.resolve(data.operation); - } catch (err) { - return Promise.reject(err); - } + return triggerAsyncUserPipelineAction({ + axiosInstance: this.axiosInstance, + pipelineName, + payload, + returnTraces, + }); } /* ------------------------------------------------------------------------- @@ -409,15 +273,10 @@ class PipelineClient { }: { pipelineReleaseName: string; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${pipelineReleaseName}/setDefault` - ); - return Promise.resolve(data.release); - } catch (err) { - return Promise.reject(err); - } + return setDefaultUserPipelineReleaseMutation({ + axiosInstance: this.axiosInstance, + pipelineReleaseName, + }); } async restoreUserPipelineReleaseMutation({ @@ -425,75 +284,44 @@ class PipelineClient { }: { pipelineReleaseName: string; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${pipelineReleaseName}/restore` - ); - return Promise.resolve(data.release); - } catch (err) { - return Promise.reject(err); - } + return restoreUserPipelineReleaseMutation({ + axiosInstance: this.axiosInstance, + pipelineReleaseName, + }); } async triggerUserPipelineReleaseAction({ pipelineReleaseName, payload, - returnTraces, }: { pipelineReleaseName: string; payload: TriggerUserPipelinePayload; - returnTraces?: boolean; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${pipelineReleaseName}/trigger`, - payload, - { - headers: { - "instill-return-traces": returnTraces ? "true" : "false", - "Access-Control-Allow-Headers": "instill-return-traces", - "Content-Type": "application/json", - }, - } - ); - return Promise.resolve(data); - } catch (err) { - return Promise.reject(err); - } + return triggerUserPipelineReleaseAction({ + axiosInstance: this.axiosInstance, + pipelineReleaseName, + payload, + returnTraces, + }); } async triggerAsyncUserPipelineReleaseAction({ pipelineReleaseName, payload, - returnTraces, }: { pipelineReleaseName: string; payload: TriggerAsyncUserPipelinePayload; - returnTraces?: boolean; }) { - try { - const { data } = - await this.axiosInstance.post( - `/${pipelineReleaseName}/triggerAsync`, - payload, - { - headers: { - "instill-return-traces": returnTraces ? "true" : "false", - "Access-Control-Allow-Headers": "instill-return-traces", - "Content-Type": "application/json", - }, - } - ); - return Promise.resolve(data.operation); - } catch (err) { - return Promise.reject(err); - } + return triggerAsyncUserPipelineReleaseAction({ + axiosInstance: this.axiosInstance, + pipelineReleaseName, + payload, + returnTraces, + }); } } diff --git a/src/pipeline/action.ts b/src/pipeline/action.ts new file mode 100644 index 0000000..b079f77 --- /dev/null +++ b/src/pipeline/action.ts @@ -0,0 +1,163 @@ +import { AxiosInstance } from "axios"; +import { + RestoreUserPipelineReleaseResponse, + SetDefaultUserPipelineReleaseResponse, + TriggerAsyncUserPipelinePayload, + TriggerAsyncUserPipelineReleaseResponse, + TriggerAsyncUserPipelineResponse, + TriggerUserPipelinePayload, + TriggerUserPipelineResponse, +} from "./types"; + +export async function triggerUserPipelineAction({ + axiosInstance, + pipelineName, + payload, + returnTraces, +}: { + axiosInstance: AxiosInstance; + pipelineName: string; + payload: TriggerUserPipelinePayload; + returnTraces?: boolean; +}) { + try { + const { data } = await axiosInstance.post( + `/${pipelineName}/trigger`, + payload, + { + headers: { + "instill-return-traces": returnTraces ? "true" : "false", + "Access-Control-Allow-Headers": "instill-return-traces", + "Content-Type": "application/json", + }, + } + ); + return Promise.resolve(data); + } catch (err) { + return Promise.reject(err); + } +} + +export async function triggerAsyncUserPipelineAction({ + axiosInstance, + pipelineName, + payload, + returnTraces, +}: { + axiosInstance: AxiosInstance; + pipelineName: string; + payload: TriggerAsyncUserPipelinePayload; + returnTraces?: boolean; +}) { + try { + const { data } = await axiosInstance.post( + `/${pipelineName}/triggerAsync`, + payload, + { + headers: { + "instill-return-traces": returnTraces ? "true" : "false", + "Access-Control-Allow-Headers": "instill-return-traces", + "Content-Type": "application/json", + }, + } + ); + return Promise.resolve(data.operation); + } catch (err) { + return Promise.reject(err); + } +} + +export async function setDefaultUserPipelineReleaseMutation({ + axiosInstance, + pipelineReleaseName, +}: { + axiosInstance: AxiosInstance; + pipelineReleaseName: string; +}) { + try { + const { data } = + await axiosInstance.post( + `/${pipelineReleaseName}/setDefault` + ); + return Promise.resolve(data.release); + } catch (err) { + return Promise.reject(err); + } +} + +export async function restoreUserPipelineReleaseMutation({ + axiosInstance, + pipelineReleaseName, +}: { + axiosInstance: AxiosInstance; + pipelineReleaseName: string; +}) { + try { + const { data } = + await axiosInstance.post( + `/${pipelineReleaseName}/restore` + ); + return Promise.resolve(data.release); + } catch (err) { + return Promise.reject(err); + } +} + +export async function triggerUserPipelineReleaseAction({ + axiosInstance, + pipelineReleaseName, + payload, + returnTraces, +}: { + axiosInstance: AxiosInstance; + pipelineReleaseName: string; + payload: TriggerUserPipelinePayload; + returnTraces?: boolean; +}) { + try { + const { data } = await axiosInstance.post( + `/${pipelineReleaseName}/trigger`, + payload, + { + headers: { + "instill-return-traces": returnTraces ? "true" : "false", + "Access-Control-Allow-Headers": "instill-return-traces", + "Content-Type": "application/json", + }, + } + ); + return Promise.resolve(data); + } catch (err) { + return Promise.reject(err); + } +} + +export async function triggerAsyncUserPipelineReleaseAction({ + axiosInstance, + pipelineReleaseName, + payload, + returnTraces, +}: { + axiosInstance: AxiosInstance; + pipelineReleaseName: string; + payload: TriggerAsyncUserPipelinePayload; + returnTraces?: boolean; +}) { + try { + const { data } = + await axiosInstance.post( + `/${pipelineReleaseName}/triggerAsync`, + payload, + { + headers: { + "instill-return-traces": returnTraces ? "true" : "false", + "Access-Control-Allow-Headers": "instill-return-traces", + "Content-Type": "application.json", + }, + } + ); + return Promise.resolve(data.operation); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/pipeline/index.ts b/src/pipeline/index.ts index 6c1da8e..fa0d1a2 100644 --- a/src/pipeline/index.ts +++ b/src/pipeline/index.ts @@ -1,5 +1,2 @@ -// export * from "./actions"; -// export * from "./mutations"; -// export * from "./queries"; export * from "./types"; export * from "./PipelineClient"; diff --git a/src/pipeline/mutation.ts b/src/pipeline/mutation.ts new file mode 100644 index 0000000..67381d2 --- /dev/null +++ b/src/pipeline/mutation.ts @@ -0,0 +1,141 @@ +import { AxiosInstance } from "axios"; +import { + CreatePipelineResponse, + CreateUserPipelinePayload, + CreateUserPipelineReleasePayload, + CreateUserPipelineReleaseResponse, + RenameUserPipelinePayload, + RenameUserPipelineResponse, + UpdateUserPipelinePayload, + UpdateUserPipelineReleasePayload, + UpdateUserPipelineReleaseResponse, + UpdateUserPipelineResponse, +} from "./types"; + +export async function createUserPipelineMutation({ + axiosInstance, + userName, + payload, +}: { + axiosInstance: AxiosInstance; + userName: string; + payload: CreateUserPipelinePayload; +}) { + try { + const { data } = await axiosInstance.post( + `${userName}/pipelines`, + payload + ); + return Promise.resolve(data.pipeline); + } catch (err) { + return Promise.reject(err); + } +} + +export async function updateUserPipelineMutation({ + axiosInstance, + payload, +}: { + axiosInstance: AxiosInstance; + payload: UpdateUserPipelinePayload; +}) { + try { + const { data } = await axiosInstance.patch( + `/${payload.name}`, + payload + ); + return Promise.resolve(data.pipeline); + } catch (err) { + return Promise.reject(err); + } +} + +export async function deleteUserPipelineMutation({ + axiosInstance, + pipelineName, +}: { + axiosInstance: AxiosInstance; + pipelineName: string; +}) { + try { + await axiosInstance.delete(`/${pipelineName}`); + } catch (err) { + return Promise.reject(err); + } +} + +export async function renameUserPipelineMutation({ + axiosInstance, + payload, +}: { + axiosInstance: AxiosInstance; + payload: RenameUserPipelinePayload; +}) { + try { + const { data } = await axiosInstance.post( + `/${payload.name}/rename`, + payload + ); + + return Promise.resolve(data.pipeline); + } catch (err) { + return Promise.reject(err); + } +} + +export async function createUserPipelineReleaseMutation({ + axiosInstance, + pipelineName, + payload, +}: { + axiosInstance: AxiosInstance; + pipelineName: string; + payload: CreateUserPipelineReleasePayload; +}) { + try { + const { data } = + await axiosInstance.post( + `${pipelineName}/releases`, + payload + ); + + return Promise.resolve(data.release); + } catch (err) { + return Promise.reject(err); + } +} + +export async function updateUserPipelineReleaseMutation({ + axiosInstance, + payload, + pipelineReleaseName, +}: { + axiosInstance: AxiosInstance; + payload: UpdateUserPipelineReleasePayload; + pipelineReleaseName: string; +}) { + try { + const { data } = + await axiosInstance.patch( + `/${pipelineReleaseName}`, + payload + ); + return Promise.resolve(data.release); + } catch (err) { + return Promise.reject(err); + } +} + +export async function deleteUserPipelineReleaseMutation({ + axiosInstance, + pipelineReleaseName, +}: { + axiosInstance: AxiosInstance; + pipelineReleaseName: string; +}) { + try { + await axiosInstance.delete(`/${pipelineReleaseName}`); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/pipeline/queries.ts b/src/pipeline/queries.ts new file mode 100644 index 0000000..60a5562 --- /dev/null +++ b/src/pipeline/queries.ts @@ -0,0 +1,195 @@ +import { AxiosInstance } from "axios"; +import { Nullable } from "../types"; +import { + GetUserPipelineReleaseResponse, + GetUserPipelineResponse, + ListPipelineReleasesResponse, + ListPipelinesResponse, + ListUserPipelinesResponse, + Pipeline, + PipelineRelease, + WatchUserPipelineReleaseResponse, +} from "./types"; +import { getQueryString } from "../helper"; + +export async function listPipelinesQuery({ + axiosInstance, + pageSize, + nextPageToken, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; +}) { + try { + const pipelines: Pipeline[] = []; + + const queryString = getQueryString({ + baseURL: "/pipelines?view=VIEW_FULL", + pageSize, + nextPageToken, + filter: null, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + pipelines.push(...data.pipelines); + + if (data.next_page_token) { + pipelines.push( + ...(await listPipelinesQuery({ + axiosInstance, + pageSize, + nextPageToken: data.next_page_token, + })) + ); + } + + return Promise.resolve(pipelines); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listUserPipelinesQuery({ + axiosInstance, + pageSize, + nextPageToken, + userName, +}: { + axiosInstance: AxiosInstance; + pageSize: Nullable; + nextPageToken: Nullable; + userName: string; +}) { + try { + const pipelines: Pipeline[] = []; + + const queryString = getQueryString({ + baseURL: `${userName}/pipelines?view=VIEW_FULL`, + pageSize, + nextPageToken, + filter: null, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + pipelines.push(...data.pipelines); + + if (data.next_page_token) { + pipelines.push( + ...(await listUserPipelinesQuery({ + axiosInstance, + pageSize, + nextPageToken: data.next_page_token, + userName, + })) + ); + } + + return Promise.resolve(pipelines); + } catch (err) { + return Promise.reject(err); + } +} + +export async function getUserPipelineQuery({ + axiosInstance, + pipelineName, +}: { + axiosInstance: AxiosInstance; + pipelineName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${pipelineName}?view=VIEW_FULL` + ); + + return Promise.resolve(data.pipeline); + } catch (err) { + return Promise.reject(err); + } +} + +export async function listUserPipelineReleasesQuery({ + axiosInstance, + pipelineName, + pageSize, + nextPageToken, +}: { + axiosInstance: AxiosInstance; + pipelineName: string; + pageSize: Nullable; + nextPageToken: Nullable; +}) { + try { + const releases: PipelineRelease[] = []; + + const queryString = getQueryString({ + baseURL: `/${pipelineName}/releases?view=VIEW_FULL`, + pageSize, + nextPageToken, + filter: null, + }); + + const { data } = await axiosInstance.get( + queryString + ); + + releases.push(...data.releases); + + if (data.next_page_token) { + releases.push( + ...(await listUserPipelineReleasesQuery({ + axiosInstance, + pipelineName, + pageSize, + nextPageToken: data.next_page_token, + })) + ); + } + + return Promise.resolve(releases); + } catch (err) { + return Promise.reject(err); + } +} + +export async function getUserPipelineReleaseQuery({ + axiosInstance, + pipelineReleaseName, +}: { + axiosInstance: AxiosInstance; + pipelineReleaseName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${pipelineReleaseName}?view=VIEW_FULL` + ); + + return Promise.resolve(data.release); + } catch (err) { + return Promise.reject(err); + } +} + +export async function watchUserPipelineReleaseQuery({ + axiosInstance, + pipelineReleaseName, +}: { + axiosInstance: AxiosInstance; + pipelineReleaseName: string; +}) { + try { + const { data } = await axiosInstance.get( + `/${pipelineReleaseName}/watch` + ); + return Promise.resolve(data.state); + } catch (err) { + return Promise.reject(err); + } +} diff --git a/src/tests/recipePayload.json b/src/tests/recipePayload.json new file mode 100644 index 0000000..e872679 --- /dev/null +++ b/src/tests/recipePayload.json @@ -0,0 +1,48 @@ +{ + "id": "overseas-blue-lobster", + "recipe": { + "version": "v1alpha", + "components": [ + { + "id": "start", + "resource_name": "", + "configuration": { + "metadata": { + "text": { + "type": "text", + "title": "text" + } + } + }, + "definition_name": "operator-definitions/op-start" + }, + { + "id": "end", + "resource_name": "", + "configuration": { + "metadata": { + "output": { + "title": "output" + } + }, + "input": { + "output": "{ai_1.output.texts}" + } + }, + "definition_name": "operator-definitions/op-end" + }, + { + "id": "ai_1", + "resource_name": "users/namananand-instill-ai/connector-resources/ai2", + "configuration": { + "task": "TASK_TEXT_GENERATION", + "input": { + "prompt": "{start.text}", + "model": "gpt-3.5-turbo" + } + }, + "definition_name": "connector-definitions/ai-openai" + } + ] + } +} diff --git a/src/tests/resourcePaylaod.json b/src/tests/resourcePaylaod.json new file mode 100644 index 0000000..372f48e --- /dev/null +++ b/src/tests/resourcePaylaod.json @@ -0,0 +1,8 @@ +{ + "id": "open-ai-model-1", + "connector_definition_name": "connector-definitions/ai-openai", + "configuration": { + "organization": "my-org", + "api_key": "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" + } +}