No description
  • TypeScript 99.1%
  • JavaScript 0.7%
  • Shell 0.2%
Find a file
2025-04-03 00:13:47 -05:00
.swagger-codegen Initial commit 2025-02-19 09:49:38 -06:00
.vscode Initial commit 2025-02-19 09:49:38 -06:00
docs Initial commit 2025-02-19 09:49:38 -06:00
src refactor: update type handling and improve type safety in model classes 2025-04-03 00:13:47 -05:00
test add rsbuild and bundle 2025-02-19 15:09:42 -06:00
.babelrc Initial commit 2025-02-19 09:49:38 -06:00
.gitignore Initial commit 2025-02-19 09:49:38 -06:00
.swagger-codegen-ignore Initial commit 2025-02-19 09:49:38 -06:00
.travis.yml Initial commit 2025-02-19 09:49:38 -06:00
convert-to-ts.js Initial commit 2025-02-19 09:49:38 -06:00
git_push.sh Initial commit 2025-02-19 09:49:38 -06:00
mocha.opts Initial commit 2025-02-19 09:49:38 -06:00
package.json refactor: update type handling and improve type safety in model classes 2025-04-03 00:13:47 -05:00
README.md docs: update README and package description to reflect TypeScript nature 2025-02-19 15:24:17 -06:00
rspack.config.js add rsbuild and bundle 2025-02-19 15:09:42 -06:00
tsconfig.json refactor: update type handling and improve type safety in model classes 2025-04-03 00:13:47 -05:00
yarn.lock add rsbuild and bundle 2025-02-19 15:09:42 -06:00

@quantum-forge/tik-tok-business-sdk

A modern TypeScript SDK for the TikTok Business API, built with full TypeScript support and modern JavaScript features.

Features

  • Full TypeScript support with strict type checking
  • Modern JavaScript features (ESM, optional chaining, nullish coalescing)
  • Comprehensive type definitions for all API models and responses
  • Built with strict null checks and exact optional property types
  • Tree-shakeable exports for optimal bundle size
  • Type-safe API client with auto-completion support

Installation

npm install @quantum-forge/tik-tok-business-sdk

Usage

import { ApiClient } from '@quantum-forge/tik-tok-business-sdk';
import type { AdCreateBody } from '@quantum-forge/tik-tok-business-sdk';

// Initialize the client with your credentials
const client = new ApiClient({
    accessToken: 'YOUR_ACCESS_TOKEN',
    sandbox: false // Set to true for sandbox environment
});

// All request and response types are fully typed
async function createAd(adData: AdCreateBody) {
    const response = await client.ad.createAd(adData);
    return response.data;
}

TypeScript Configuration

This SDK is built with strict TypeScript settings and requires TypeScript 4.5 or later. We recommend using the following tsconfig.json settings for optimal type checking:

{
  "compilerOptions": {
    "strict": true,
    "exactOptionalPropertyTypes": true,
    "esModuleInterop": true
  }
}

Development

# Install dependencies
npm install

# Build the SDK
npm run build

# Run tests
npm test

License

MIT - see LICENSE

Author

Riley Seaburg riley@rileyseaburg.com

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.