@adspireai/adspire-node-sdk
v1.0.119
Published
Official Node.js SDK for AdspireAI API
Readme
adspire-sdk-node
A Node.js SDK for easily interacting with the Adspire API.
Features
- Simple, auto-generated TypeScript client for Adspire's REST API
- Built on top of
@hey-api/client-fetch - Type-safe API calls (via auto-generated types)
- Easily configurable base URL and environment settings
Usage
First, set up your environment variable for the OpenAPI spec URL:
Copy the example environment file, then edit
.envas needed:npm run setupThe
.envfile will include:OPENAPI_SPEC=https://stage-api.adspire.ai/docs?api-docs.json
Scripts
npm run setup– Copiesenv.exampleto.envfor local environment setup.npm run generate– Regenerates the SDK from the OpenAPI spec (requires ts-node).npm run build– Compiles the TypeScript SDK (src/) into publishable JavaScript (dist/src/).
Installation
npm install @adspireai/adspire-node-sdkRegenerating SDK
If the API spec changes:
npm run generate
npm run buildThis will update the SDK code under src/ based on the latest OpenAPI spec defined in your .env file and dist package that gets published to npmjs.
Note: Only the compiled SDK (dist/src/) is published to npm, not the source or script files. If you're contributing or testing locally, use the scripts as above.
Development
The SDK is source-based and auto-generated using
@hey-api/openapi-ts.All TypeScript-generated API types and methods are available via:
import * from '@adspireai/adspire-node-sdk'See
src/client.gen.tsandsrc/index.tsfor details.
Local Development
For developers working locally with a parent application (e.g., adspire-app), you can copy the built SDK directly to the parent's node_modules after building:
npm run generate
npm run build
npm run copy-docsThis allows you to test SDK changes immediately in your parent application without publishing to npm.
Contributing
Pull requests welcome! For major changes, please open an issue first to discuss what you would like to change.
Generated by @hey-api/openapi-ts
Explanation:
This README.md covers installation, environment setup, usage, available scripts, development workflows, and licensing, matching the project details found in your package.json, env.example, and source files. For more advanced SDK usage or full API endpoint documentation, you should look into your generated src/sdk.gen.ts or the official Adspire API docs.
