{"_id":"@dyad-sh/supabase-management-js","_rev":"2-b9d309cacb8d73cb55bb6c391ebec6f3","name":"@dyad-sh/supabase-management-js","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@dyad-sh/supabase-management-js","version":"1.0.0","_id":"@dyad-sh/supabase-management-js@1.0.0","maintainers":[{"name":"dyad-sh","email":"will@dyad.sh"}],"dist":{"shasum":"f889c475104a0de4d194fdac49151c9c9c101297","tarball":"https://registry.npmjs.org/@dyad-sh/supabase-management-js/-/supabase-management-js-1.0.0.tgz","fileCount":8,"integrity":"sha512-v/DupITKhM0/pmXJPFYFtjCoKzD5ZAQn1Haay1hXTSBP3SoEv1Ff7bQS7q7Ee30JCZllHy6dQFa6loqJKdkXOg==","signatures":[{"sig":"MEQCID6Kab1/jEZvvxzyzQ/HQWpSalo883GFRcx0CtOAB+aPAiAvu9RtNmeSogRvhfzSvf/p5WKjeCqTlVMIyWJhUKTuzQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":486752},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"f5a98bd385310fc45120a14c3bfdc2863c3af44c","scripts":{"build":"npm run clean && npm run build:tsup","clean":"rimraf dist","generate":"openapi-typescript https://api.supabase.com/api/v1-json -o ./src/api/v1.d.ts","typecheck":"tsc --noEmit","build:tsup":"tsup --dts-resolve","changeset:release":"npm run build && changeset publish","changeset:version":"changeset version"},"_npmUser":{"name":"dyad-sh","email":"will@dyad.sh"},"_npmVersion":"10.9.2","description":"Convenience wrapper for the Supabase Management API","directories":{},"_nodeVersion":"22.14.0","dependencies":{"openapi-fetch":"^0.6.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.6.2","tsup":"^8.0.1","rimraf":"^3.0.2","esbuild":"^0.19.2","typescript":"^4.8.4","@types/node":"18","@changesets/cli":"^2.26.2","openapi-typescript":"^6.3.4"},"_npmOperationalInternal":{"tmp":"tmp/supabase-management-js_1.0.0_1745389129265_0.48737956854682785","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@dyad-sh/supabase-management-js","version":"1.0.1","description":"Convenience wrapper for the Supabase Management API","main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","publishConfig":{"access":"public"},"exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":"./dist/index.js","types":"./dist/index.d.ts"},"./package.json":"./package.json"},"scripts":{"clean":"rimraf dist","build":"npm run clean && npm run build:tsup","build:tsup":"tsup --dts-resolve","typecheck":"tsc --noEmit","generate":"openapi-typescript https://api.supabase.com/api/v1-json -o ./src/api/v1.d.ts","changeset:version":"changeset version","changeset:release":"npm run build && changeset publish"},"dependencies":{"openapi-fetch":"^0.6.1"},"devDependencies":{"@changesets/cli":"^2.26.2","@types/node":"18","esbuild":"^0.19.2","openapi-typescript":"^6.3.4","rimraf":"^3.0.2","tsup":"^8.0.1","tsx":"^4.6.2","typescript":"^4.8.4"},"engines":{"node":">=18.0.0"},"_id":"@dyad-sh/supabase-management-js@1.0.1","gitHead":"1d1d099da61f4876a77d6d3b7a273a0352cc207f","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-bzYLnsHH3IB3HI5oeX8MXTvVngqEqgKWzJqBcVvd/eo2ELcr6w1XBMM2jdNRW8rN/cBa8kjpo/JuJxRzDbhoWQ==","shasum":"8a284e357332f65ede99eacb17dae355ed37bdbb","tarball":"https://registry.npmjs.org/@dyad-sh/supabase-management-js/-/supabase-management-js-1.0.1.tgz","fileCount":8,"unpackedSize":487434,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBsybqH0n0WfIEyVT5GMHQOG44HxWfFVqgFwy5JIgoWDAiEAjDJqwDm3cfU7hI1qSlgv8Q9o9zckdKNKXbBylsuSlfQ="}]},"_npmUser":{"name":"dyad-sh","email":"will@dyad.sh"},"directories":{},"maintainers":[{"name":"dyad-sh","email":"will@dyad.sh"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/supabase-management-js_1.0.1_1763018802151_0.8252233904710631"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-23T06:18:49.178Z","modified":"2025-11-13T07:26:42.745Z","1.0.0":"2025-04-23T06:18:49.479Z","1.0.1":"2025-11-13T07:26:42.559Z"},"description":"Convenience wrapper for the Supabase Management API","maintainers":[{"name":"dyad-sh","email":"will@dyad.sh"}],"readme":"## supabase-management-js\n\nA convenience wrapper for the [Supabase Management API](https://supabase.com/docs/reference/api/introduction) written in TypeScript.\n\n### Status\n\nThe Management API is in beta. It is usable in it's current state, but it's likely that there will be breaking changes.\n\n### Installation\n\nTo install `supabase-management-js` in a Node.js project:\n\n```sh\nnpm install supabase-management-js\n```\n\n`supabase-management-js` requires Node.js 18 and above because it relies on the native `fetch` client.\n\n### Authentication\n\nYou can configure the `SupabaseManagementAPI` class with an access token, retrieved either through [OAuth](https://supabase.com/docs/guides/integrations/oauth-apps/authorize-an-oauth-app) or by generating an API token in your [account](https://supabase.com/dashboard/account/tokens) page. Your API tokens carry the same privileges as your user account, so be sure to keep it secret.\n\n```ts\nimport { SupabaseManagementAPI } from \"supabase-management-js\";\n\nconst client = new SupabaseManagementAPI({ accessToken: \"<access token>\" });\n```\n\n### Usage\n\nThe `SupabaseManagementAPI` class exposes each API endpoint of the [Management API](https://supabase.com/docs/reference/api/introduction) as a function that returns a Promise with the corresponding response data type.\n\n```ts\nimport { SupabaseManagementAPI } from \"supabase-management-js\";\n\nconst client = new SupabaseManagementAPI({ accessToken: \"<access token>\" });\n\nconst projects = await client.getProjects();\n\nif (projects) {\n  console.log(`Found ${projects.length} projects`);\n}\n```\n\n### Handling errors\n\nResponse errors are thrown as an instance of `SupabaseManagementAPIError` which is a subclass of `Error`. You can use the exported `isSupabaseError` guard function to narrow the type of an `unknown` error object:\n\n```ts\nimport { SupabaseManagementAPI, isSupabaseError } from \"supabase-management-js\";\n\nconst client = new SupabaseManagementAPI({ accessToken: \"<access token>\" });\n\ntry {\n  await client.getProjects();\n} catch (error) {\n  if (isSupabaseError(error)) {\n    // error is now typed as SupabaseManagementAPI\n    console.log(\n      `Supabase Error:  ${error.message}, response status: ${error.response.status}`\n    );\n  }\n}\n```\n\n### Contributing\n\nContributions to this project are very welcome and greatly appreciated!\n\n1. Clone the repo into a public GitHub repo (or fork https://github.com/supabase-community/supabase-management-js/fork).\n\n2. Go to the project folder.\n\n```sh\ncd supabase-management-js\n```\n\n3. Install packages with `npm`:\n\n```sh\nnpm install\n```\n\n4. Make your changes\n\n5. Make sure types are correct\n\n```sh\nnpm run typecheck\n```\n\n6. Create a changeset to describe your changes if you are making changes to the source code that effects its public API\n\n```sh\nnpm exec changeset\n```\n\n7. Create a branch, commit your changes, and open a Pull Request against the `main` branch in this repo.\n\n### Regenerating types\n\nThe [v1.d.ts](./src/api/v1.d.ts) file is auto-generated based on the Supabase [OpenAPI spec](https://api.supabase.com/api/v1-json) file with the following command:\n\n```sh\nnpm run generate\n```\n","readmeFilename":"README.md"}