open-index/open-npm huggingface dataset:
npm package: @property-credit/partners-api
Description: This package provides a client for interacting with the Property Credit Partners API.
Latest version: 1.0.2

# Partners API Client Documentation

This package provides a client for interacting with the Property Credit Partners API.

### Installation

```bash
npm install @property-credit/partners-api
```

## Usage

### Creating client

```typescript
import { createClient } from "@property-credit/partners-api";

// Initialize the client with your access key
const client = createClient("your-access-key");

// Or specify environment
const productionClient = createClient("your-access-key", "production");
```

### Available environments

- staging (default): https://api.staging.property.credit
- production: https://api.property.credit

### Available Methods

#### Applications

```typescript
// Get a single application
const application = await client.finance.v1.applications.get("application-id");

// List applications
const applications = await client.finance.v1.applications.list({
  first: 20,
  after: "djE6MTE3", // Used for pagination. Available on list() response `next` field.
});

// Create an application
const newApplication = await client.finance.v1.applications.create({
  // Application data
});
```

#### Drawdowns

```typescript
// Create a drawdown
const newDrawdown = await client.finance.v1.drawdowns.create({
  // Drawdown data
});
```

### Types

The package includes TypeScript definitions for all request and response objects. The compiler will help ensure you're sending correctly formatted data to the API.