0.0.5 • Published 1 month ago

@sunwise-clients/wise v0.0.5

Weekly downloads
-
License
-
Repository
github
Last release
1 month ago

Sunwise WISE API Client.

Description

This package provides a client for interacting with the Sunwise WISE API. It allows you to easily make requests to the API and handle responses. It is built using TypeScript and Axios, and it includes type definitions for all the endpoints and data structures used by the API.

Installation

To install the package you can use npm, pnpm or any other package manager that supports npm packages.

npm install @sunwise-clients/wise
pnpm install @sunwise-clients/wise

Usage

It exposes the client (an Axios instance) and also exports the types and schemas used by the API.

import { client } from "@sunwise-clients/wise";
import { BaseProjectSchemaSchema } from "@sunwise-clients/wise";

All the endpoints are available as methods on the client object.

import { projectsProjectsUploadDocuments } from "@sunwise-clients/wise";

const response = await projectsProjectsUploadDocuments({
  body: { country: "México", files: [], overwrite: false },
  path: { project_id: "project_id" },
});

Authentication

To authenticate the client you can use the setConfig method.

import { client } from "@sunwise-clients/wise";

client.setConfig({
  auth: () => "<my_token>", // Required for authentication
  baseURL: "https://example.com", // Optional
});

It uses the "@hey-api/client-axios" package under the hood to create the client. You can find more information about the package here.

Types and Schemas

The package also exports the types and schemas used by the API, which can be useful for TypeScript users and for validating data structures.

import { BaseProjectSchemaSchema } from "@sunwise-clients/wise";

// Example usage
const project: ProjectSchema = {
  id: "project_id",
  // other fields...
};

Issues and Support

If you encounter any issues or have questions, please contact our support team at soporte@sunwise.io.

0.0.5

1 month ago

0.0.2

4 months ago

0.0.1-release

4 months ago

0.0.2-release

4 months ago