{"_id":"@amritk/galaxy-dev-ts","_rev":"3-cd3fbd0a0426d7fd5fedd68aa7d8c616","name":"@amritk/galaxy-dev-ts","dist-tags":{"latest":"0.3.1"},"versions":{"0.2.0":{"name":"@amritk/galaxy-dev-ts","version":"0.2.0","author":{"name":"Scalar Galaxy"},"license":"Apache-2.0","_id":"@amritk/galaxy-dev-ts@0.2.0","maintainers":[{"name":"amritk","email":"amrit+spam@hockey-community.com"}],"homepage":"https://github.com/amritk/dev-typescript#readme","bugs":{"url":"https://github.com/amritk/dev-typescript/issues"},"dist":{"shasum":"a919e886de5fd927bec4ec8fb584e93aa24feb2a","tarball":"https://registry.npmjs.org/@amritk/galaxy-dev-ts/-/galaxy-dev-ts-0.2.0.tgz","fileCount":350,"integrity":"sha512-LX5G4ydv2t+SrqgdOC15GG3NHM0in6NH8Ho9+5bOUQPiOqx3CzPvi/Y5w3/FlCsi2PhNgjEWgI2DHH2/0NpZ/Q==","signatures":[{"sig":"MEUCIQCsUyH3Mh9N2cpMCfVqId82WaDEwTtRk6hS8dT4nTPx2QIgTO+faHuZo38eyjqE9oATsAeubgsdh9D8f0cr1SUwYLU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":670515},"main":"./dist/cjs/index.js","type":"module","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","default":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./*":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js","require":"./dist/cjs/*.js"},"./*.js":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js","require":"./dist/cjs/*.js"},"./*.mjs":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js"},"./package.json":"./package.json"},"gitHead":"b7e772adeef50938c79e6a6b581c877bf61f222e","scripts":{"build":"tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node scripts/finalize-build.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.cjs.json --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"amritk","email":"amrit+spam@hockey-community.com"},"repository":{"url":"git+https://github.com/amritk/dev-typescript.git","type":"git"},"_npmVersion":"11.16.0","description":"The Scalar Galaxy is an example OpenAPI document to test OpenAPI tools and libraries. It's a fictional universe with fictional planets and fictional data. Get all the data for all planets.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"standardwebhooks":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/galaxy-dev-ts_0.2.0_1789164961982_0.15846738703023822","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@amritk/galaxy-dev-ts","version":"0.2.1","author":{"name":"Scalar Galaxy"},"license":"Apache-2.0","_id":"@amritk/galaxy-dev-ts@0.2.1","maintainers":[{"name":"amritk","email":"amrit+spam@hockey-community.com"}],"homepage":"https://github.com/amritk/dev-typescript#readme","bugs":{"url":"https://github.com/amritk/dev-typescript/issues"},"dist":{"shasum":"e5719c19f40a782ff5a4b5352e1c74b4444dd4c0","tarball":"https://registry.npmjs.org/@amritk/galaxy-dev-ts/-/galaxy-dev-ts-0.2.1.tgz","fileCount":350,"integrity":"sha512-vzxIbyWC2mgHbz0Nm/5NjpRzE8zmNzrbqV2TH2EvttddeORYv6+KZx6AKekcUueDYD9dhpzl7zVtqi3AsXOr1A==","signatures":[{"sig":"MEQCIG69xPHqJReqhUY8rpHV2gA/rpX5O7Ur3LSKF9uqPlY+AiA0SoaNFKqjHxkdL2cXBSUuSB4VYy158bFJnMMb+EGxZA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIAV/k6FSNJcNlCyWt+/PC94eQCW1Que/g/iRoz3YyG6bAiEAwWgdj1c7A2FrZJR0mmOPywz/6P6h2M70YlvroMz/jbk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":670515},"main":"./dist/cjs/index.js","type":"module","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","default":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./*":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js","require":"./dist/cjs/*.js"},"./*.js":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js","require":"./dist/cjs/*.js"},"./*.mjs":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js"},"./package.json":"./package.json"},"gitHead":"58263c06eb96023642e9454221e237ac757bec93","scripts":{"build":"tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node scripts/finalize-build.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.cjs.json --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3ef718b9-f305-4f2e-a3d8-fc203a8b6c86"}},"repository":{"url":"git+https://github.com/amritk/dev-typescript.git","type":"git"},"_npmVersion":"11.19.1","description":"The Scalar Galaxy is an example OpenAPI document to test OpenAPI tools and libraries. It's a fictional universe with fictional planets and fictional data. Get all the data for all planets.","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"standardwebhooks":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/galaxy-dev-ts_0.2.1_1789165445294_0.19938783607237642","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"_id":"@amritk/galaxy-dev-ts@0.3.1","bugs":{"url":"https://github.com/amritk/dev-typescript/issues"},"dist":{"shasum":"c0f7d3e6acde7a19cd12ddf8b1f7344116ce427a","tarball":"https://registry.npmjs.org/@amritk/galaxy-dev-ts/-/galaxy-dev-ts-0.3.1.tgz","fileCount":374,"integrity":"sha512-2yhY57uKBqZxdBg5TAReg3WFLXEnrVS0/M2JJ67aSdujcm4vHAN7dDsvwYuLUCVob4+Qqvv9ebTvKoGFfvLNdg==","signatures":[{"sig":"MEUCIQDheY6KdxOjevOj+nJlxPbW7/bCV+NMqfsxAaY8EKu+RQIgOdEhU2XiyFm1HWbU3rzPw0sF7q4T/OgzwoeVfvF2T90=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDsXMxcVi2ODz3+Ny6B+gmDXq+pj+laocqsinR8SnWw4QIhAIfRFKK/gIr6if9b+4oARDb7ykcyjWVX+jU/WX9ZNGiq"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@amritk%2fgalaxy-dev-ts@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":669982},"main":"./dist/cjs/index.js","name":"@amritk/galaxy-dev-ts","type":"module","types":"./dist/esm/index.d.ts","author":{"name":"Test it"},"module":"./dist/esm/index.js","exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","default":"./dist/esm/index.js","require":"./dist/cjs/index.js"},"./*":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js","require":"./dist/cjs/*.js"},"./*.js":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js","require":"./dist/cjs/*.js"},"./*.mjs":{"types":"./dist/esm/*.d.ts","import":"./dist/esm/*.js","default":"./dist/esm/*.js"},"./package.json":"./package.json"},"gitHead":"4fc50d2d0160c3d5e976b10b80f74adc00c9d1d9","license":"Apache-2.0","scripts":{"build":"tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node scripts/finalize-build.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.cjs.json --noEmit","prepublishOnly":"npm run build"},"version":"0.3.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3ef718b9-f305-4f2e-a3d8-fc203a8b6c86"}},"homepage":"https://github.com/amritk/dev-typescript#readme","repository":{"url":"git+https://github.com/amritk/dev-typescript.git","type":"git"},"_npmVersion":"11.19.1","description":"The Scalar Galaxy is an example OpenAPI document to test OpenAPI tools and libraries. It's a fictional universe with fictional planets and fictional data. Get all the data for all planets.","directories":{},"maintainers":[{"name":"amritk","email":"amrit@scalar.com"}],"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"standardwebhooks":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/galaxy-dev-ts_0.3.1_1789770948908_0.532767587882564"}}},"time":{"created":"2026-09-11T22:16:01.399Z","modified":"2026-09-18T22:35:49.330Z","0.2.0":"2026-09-11T22:16:02.153Z","0.2.1":"2026-09-11T22:24:05.375Z","0.3.1":"2026-09-18T22:35:49.006Z"},"bugs":{"url":"https://github.com/amritk/dev-typescript/issues"},"author":{"name":"Test it"},"license":"Apache-2.0","homepage":"https://github.com/amritk/dev-typescript#readme","repository":{"url":"git+https://github.com/amritk/dev-typescript.git","type":"git"},"description":"The Scalar Galaxy is an example OpenAPI document to test OpenAPI tools and libraries. It's a fictional universe with fictional planets and fictional data. Get all the data for all planets.","maintainers":[{"name":"amritk","email":"amrit@scalar.com"}],"readme":"# Test it\n\nThis library provides convenient access to the Test it REST API from TypeScript or JavaScript.\n\nThe full API of this library can be found in [api.md](./api.md).\n\n<br />\n\n## Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API Reference](./api.md)\n- [Authentication](#authentication)\n- [Errors](#errors)\n- [Client Options](#client-options)\n- [Request Options](#request-options)\n- [Retries and Timeouts](#retries-and-timeouts)\n- [Helpers](#helpers)\n- [Logging](#logging)\n- [Requirements](#requirements)\n\n<br />\n\n## Installation\n\n```sh\nnpm install @amritk/galaxy-dev-ts\n```\n\n<br />\n\n## Usage\n\n```ts\nimport ApiTest from '@amritk/galaxy-dev-ts';\n\nconst client = new ApiTest({\n  bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var\n  environment: 'production',\n});\n\nconst pizza = await client.planets.pizzas.list({\n  limit: 10,\n  offset: 0,\n});\n\nconsole.log(pizza);\n```\n\nThe examples in the following sections assume a `client` configured as shown above.\n\nSee the [API reference](./api.md) for every available operation.\n\n<br />\n\n## Authentication\n\nPass credentials to the generated client constructor. Environment variables are read automatically when supported by the target runtime.\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| `bearerAuth` | `string \\| provider` | - | JWT Bearer token authentication Defaults to BEARER_AUTH. |\n| `basicAuthUsername` | `string \\| provider` | - | Basic HTTP authentication Defaults to BASIC_AUTH_USERNAME. |\n| `basicAuthPassword` | `string \\| provider` | - | Basic HTTP authentication Defaults to BASIC_AUTH_PASSWORD. |\n| `apiKeyHeader` | `string \\| provider` | - | API key request header Defaults to API_KEY_HEADER. |\n| `apiKeyCookie` | `string \\| provider` | - | API key browser cookie Defaults to API_KEY_COOKIE. |\n| `oAuth2` | `string \\| provider` | - | OAuth 2.0 authentication Defaults to O_AUTH2. |\n| `openIDConnect` | `string \\| provider` | - | OpenID Connect Authentication Defaults to OPEN_ID_CONNECT. |\n| `apiKeyQuery` | `string \\| provider` | - | API key query parameter Defaults to SCALAR_69_T4_L_API_KEY_QUERY. |\n\nDeclared schemes:\n\n- `bearerAuth` bearer token\n- `basicAuth` basic authentication\n- `apiKeyHeader` API key in header `X-API-Key`\n- `apiKeyQuery` API key in query `api_key`\n- `apiKeyCookie` API key in cookie `api_key`\n- `oAuth2` OAuth2/OpenID Connect\n- `openIdConnect` OAuth2/OpenID Connect\n\n<br />\n\n## Errors\n\nNon-success responses throw generated API errors. Error objects expose status, headers, response body, and request metadata where the target runtime supports it.\n\n```ts\nimport { APIError } from '@amritk/galaxy-dev-ts';\n\ntry {\n  const pizza = await client.planets.pizzas.list({\n    limit: 10,\n    offset: 0,\n  });\n} catch (err) {\n  if (err instanceof APIError) {\n    console.log(err.status, err.name, err.headers);\n  }\n  throw err;\n}\n```\n\nDocumented error statuses: `400`, `401`, `403`, `404`, `409`, `422`.\n\n<br />\n\n## Client Options\n\nConfigure the generated client by setting any of these options when you create it.\n\n```ts\nimport ApiTest from '@amritk/galaxy-dev-ts';\n\nconst client = new ApiTest({\n  timeout: 60000,\n  maxRetries: 2,\n  logLevel: 'debug',\n});\n```\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| `bearerAuth` | `string \\| AuthTokenProvider` | `process.env[\"BEARER_AUTH\"]` | JWT Bearer token authentication |\n| `basicAuthUsername` | `string \\| AuthTokenProvider` | `process.env[\"BASIC_AUTH_USERNAME\"]` | Basic HTTP authentication |\n| `basicAuthPassword` | `string \\| AuthTokenProvider` | `process.env[\"BASIC_AUTH_PASSWORD\"]` | Basic HTTP authentication |\n| `apiKeyHeader` | `string \\| AuthTokenProvider` | `process.env[\"API_KEY_HEADER\"]` | API key request header |\n| `apiKeyCookie` | `string \\| AuthTokenProvider` | `process.env[\"API_KEY_COOKIE\"]` | API key browser cookie |\n| `oAuth2` | `string \\| AuthTokenProvider` | `process.env[\"O_AUTH2\"]` | OAuth 2.0 authentication |\n| `openIDConnect` | `string \\| AuthTokenProvider` | `process.env[\"OPEN_ID_CONNECT\"]` | OpenID Connect Authentication |\n| `apiKeyQuery` | `string \\| AuthTokenProvider` | `process.env[\"SCALAR_69_T4_L_API_KEY_QUERY\"]` | API key query parameter |\n| `environment` | `Environment` | - | Select one of the configured API environments. |\n| `baseURL` | `string \\| null` | `process.env[\"SCALAR_69_T4_L_BASE_URL\"]` | Override the default API base URL. Pass `null` when selecting a configured environment. |\n| `timeout` | `number` | `60000` | Maximum time in milliseconds to wait for a response before aborting a request. |\n| `maxRetries` | `number` | `2` | Number of retries for temporary failures. |\n| `defaultHeaders` | `HeadersInit` | - | Headers sent with every request. |\n| `defaultQuery` | `Record<string, string \\| undefined>` | - | Query parameters sent with every request. |\n| `fetchOptions` | `RequestInit` | - | Additional fetch options sent with every request. |\n| `fetch` | `Fetch` | - | Custom fetch implementation. |\n| `logLevel` | `\"off\" \\| \"error\" \\| \"warn\" \\| \"info\" \\| \"debug\" \\| null` | `process.env[\"SCALAR_69_T4_L_LOG\"]` | Controls request and retry debug logging. |\n| `logger` | `Logger \\| null` | `console` | Custom logger implementation. |\n\n<br />\n\n## Request Options\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| `headers` | `HeadersInit` | - | Per-request headers. |\n| `query` | `Record<string, unknown>` | - | Per-request query parameters. |\n| `body` | `unknown` | - | Override the generated request body. |\n| `timeout` | `number` | - | Per-request timeout in milliseconds. |\n| `maxRetries` | `number` | - | Per-request retry count. |\n| `signal` | `AbortSignal` | - | Abort an in-flight request. |\n| `fetchOptions` | `RequestInit` | - | Per-request fetch options. |\n| `idempotencyKey` | `string` | - | Idempotency key for retry-safe operations. Applies to this request and its retries. |\n\n<br />\n\n## Retries and Timeouts\n\nGenerated clients support request timeouts and retry temporary failures such as network errors, 408, 409, 429, and 5xx responses. Retry delays honor `Retry-After` headers when present. Tune the retry and timeout client options shown above, or override them per request.\n\n<br />\n\n## Helpers\n\n- Use `.withResponse()` on any request to inspect both parsed data and the raw `Response` object.\n- Every operation returns an `APIPromise`, so you can `await` it directly or chain `.withResponse()`.\n\n<br />\n\n## Logging\n\n- Set `logLevel: \"debug\"` to log request URLs, options, response status, response headers, and retry attempts.\n- Pass a custom `logger` to route logs into your own observability pipeline.\n- Set `logLevel: null` to disable environment-driven logging.\n\n<br />\n\n## Requirements\n\n- Node.js 20+, a modern browser, or any runtime with `fetch` support\n\nPowered by Scalar.\n","readmeFilename":"README.md"}