npm package: @randock/cv-subscription-api-client
Description: OpenAPI client for @randock/cv-subscription-api-client
Author: OpenAPI-Generator
Latest version: 0.0.8

# @randock/cv-subscription-api-client@1.0

A TypeScript SDK client for the localhost API.

## Usage

First, install the SDK from npm.

```bash
npm install @randock/cv-subscription-api-client --save
```

Next, try it out.


```ts
import {
  Configuration,
  CustomerApi,
} from '@randock/cv-subscription-api-client';
import type { ListRequest } from '@randock/cv-subscription-api-client';

async function example() {
  console.log("🚀 Testing @randock/cv-subscription-api-client SDK...");
  const config = new Configuration({ 
    // To configure API key authorization: api-key
    apiKey: "YOUR API KEY",
  });
  const api = new CustomerApi(config);

  const body = {
    // number (optional)
    limit: 8.14,
    // Array<SortDto> (optional)
    sort: ...,
    // string | Partially supports LQL (Liqe query language) (optional)
    filter: filter_example,
    // string | Search query (optional)
    search: search_example,
    // string (optional)
    cursor: cursor_example,
  } satisfies ListRequest;

  try {
    const data = await api.list(body);
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);
```


## Documentation

### API Endpoints

All URIs are relative to *http://localhost*

| Class | Method | HTTP request | Description
| ----- | ------ | ------------ | -------------
*CustomerApi* | [**list**](docs/CustomerApi.md#list) | **GET** /customers | 
*SubscriptionApi* | [**cancelSubscription**](docs/SubscriptionApi.md#cancelsubscription) | **POST** /subscriptions/{subscriptionId}/cancel | 
*SubscriptionApi* | [**createManualBill**](docs/SubscriptionApi.md#createmanualbill) | **POST** /subscriptions/{subscriptionId}/bills | 
*SubscriptionApi* | [**get**](docs/SubscriptionApi.md#get) | **GET** /subscriptions/{subscriptionId} | 
*SubscriptionApi* | [**getBill**](docs/SubscriptionApi.md#getbill) | **GET** /subscriptions/{subscriptionId}/bills/{billId} | 
*SubscriptionApi* | [**getByExternalId**](docs/SubscriptionApi.md#getbyexternalid) | **GET** /subscriptions/by-external-id/{externalId} | 
*SubscriptionApi* | [**getPaymentMethods**](docs/SubscriptionApi.md#getpaymentmethods) | **GET** /subscriptions/{subscriptionId}/payment-methods | 
*SubscriptionApi* | [**getTransaction**](docs/SubscriptionApi.md#gettransaction) | **GET** /subscriptions/{subscriptionId}/bills/{billId}/transactions/{transactionId} | 
*SubscriptionApi* | [**getTransactionBalanceChange**](docs/SubscriptionApi.md#gettransactionbalancechange) | **GET** /subscriptions/{subscriptionId}/bills/{billId}/transactions/{transactionId}/balance-change/{balanceChangeId} | 
*SubscriptionApi* | [**initializePayment**](docs/SubscriptionApi.md#initializepayment) | **POST** /subscriptions/{subscriptionId}/initialize-payment | 
*SubscriptionApi* | [**list**](docs/SubscriptionApi.md#list) | **GET** /subscriptions | 
*SubscriptionApi* | [**listBillTransactions**](docs/SubscriptionApi.md#listbilltransactions) | **GET** /subscriptions/{subscriptionId}/bills/{billId}/transactions | 
*SubscriptionApi* | [**listBills**](docs/SubscriptionApi.md#listbills) | **GET** /subscriptions/{subscriptionId}/bills | 
*SubscriptionApi* | [**listTransactionBalanceChanges**](docs/SubscriptionApi.md#listtransactionbalancechanges) | **GET** /subscriptions/{subscriptionId}/bills/{billId}/transactions/{transactionId}/balance-change | 
*SubscriptionApi* | [**removeCancellation**](docs/SubscriptionApi.md#removecancellation) | **DELETE** /subscriptions/{subscriptionId}/cancel | 
*SubscriptionApi* | [**start**](docs/SubscriptionApi.md#start) | **POST** /subscriptions/start | 
*SubscriptionPlanApi* | [**list**](docs/SubscriptionPlanApi.md#list) | **GET** /subscription-plans | 
*SubscriptionPlanApi* | [**listPrices**](docs/SubscriptionPlanApi.md#listprices) | **GET** /subscription-plans/{subscriptionPlanId}/prices | 
*SvixAppPortalApi* | [**svixAppPortalControllerGetAppPortal**](docs/SvixAppPortalApi.md#svixappportalcontrollergetappportal) | **GET** /svix/portal | 


### Models

- [AggregatedPaginationResponse](docs/AggregatedPaginationResponse.md)
- [CancelSubscriptionInput](docs/CancelSubscriptionInput.md)
- [CreateManualBillInput](docs/CreateManualBillInput.md)
- [CreateManualBillResponse](docs/CreateManualBillResponse.md)
- [CursorBasedPageInfo](docs/CursorBasedPageInfo.md)
- [CursorBasedPaginationResponse](docs/CursorBasedPaginationResponse.md)
- [CustomerDto](docs/CustomerDto.md)
- [GetPaymentMethodsForSubscriptionResponse](docs/GetPaymentMethodsForSubscriptionResponse.md)
- [GetSubscriptionBillResponse](docs/GetSubscriptionBillResponse.md)
- [GetTransactionBalanceChangeResponse](docs/GetTransactionBalanceChangeResponse.md)
- [GetTransactionResponse](docs/GetTransactionResponse.md)
- [InitializePaymentInput](docs/InitializePaymentInput.md)
- [InitializePaymentResponse](docs/InitializePaymentResponse.md)
- [List200Response](docs/List200Response.md)
- [List200Response1](docs/List200Response1.md)
- [List200Response2](docs/List200Response2.md)
- [ListBillTransactionResponse](docs/ListBillTransactionResponse.md)
- [ListBillTransactions200Response](docs/ListBillTransactions200Response.md)
- [ListBills200Response](docs/ListBills200Response.md)
- [ListCustomerResponse](docs/ListCustomerResponse.md)
- [ListPrices200Response](docs/ListPrices200Response.md)
- [ListSubscriptionBillResponse](docs/ListSubscriptionBillResponse.md)
- [ListSubscriptionPlanPricePricingResponse](docs/ListSubscriptionPlanPricePricingResponse.md)
- [ListSubscriptionPlanPriceResponse](docs/ListSubscriptionPlanPriceResponse.md)
- [ListSubscriptionPlanResponse](docs/ListSubscriptionPlanResponse.md)
- [ListSubscriptionPlanResponseSettings](docs/ListSubscriptionPlanResponseSettings.md)
- [ListSubscriptionPricingResponse](docs/ListSubscriptionPricingResponse.md)
- [ListSubscriptionPricingResponseBillingPeriod](docs/ListSubscriptionPricingResponseBillingPeriod.md)
- [ListSubscriptionPricingResponseSetupFee](docs/ListSubscriptionPricingResponseSetupFee.md)
- [ListSubscriptionResponse](docs/ListSubscriptionResponse.md)
- [ListTransactionBalanceChangeResponse](docs/ListTransactionBalanceChangeResponse.md)
- [ListTransactionBalanceChanges200Response](docs/ListTransactionBalanceChanges200Response.md)
- [MoneyInput](docs/MoneyInput.md)
- [PageBasedPageInfo](docs/PageBasedPageInfo.md)
- [PageBasedPaginationResponse](docs/PageBasedPaginationResponse.md)
- [PaymentMethodItem](docs/PaymentMethodItem.md)
- [PricingInput](docs/PricingInput.md)
- [SortDto](docs/SortDto.md)
- [StartSubscriptionInput](docs/StartSubscriptionInput.md)
- [StartSubscriptionInputInput](docs/StartSubscriptionInputInput.md)
- [StartSubscriptionResponse](docs/StartSubscriptionResponse.md)
- [StartSubscriptionWithCustomPricingInput](docs/StartSubscriptionWithCustomPricingInput.md)
- [StartSubscriptionWithPlanPricingInput](docs/StartSubscriptionWithPlanPricingInput.md)
- [SubscriptionBillTaxResponse](docs/SubscriptionBillTaxResponse.md)
- [SubscriptionDetailPricingResponse](docs/SubscriptionDetailPricingResponse.md)
- [SubscriptionDetailResponse](docs/SubscriptionDetailResponse.md)
- [TaxLocationInput](docs/TaxLocationInput.md)
- [TimePeriodInput](docs/TimePeriodInput.md)

### Authorization


Authentication schemes defined for the API:
<a id="api-key"></a>
#### api-key


- **Type**: API key
- **API key parameter name**: `x-api-key`
- **Location**: HTTP header

## About

This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/)
and is automatically generated by the
[OpenAPI Generator](https://openapi-generator.tech) project:

- API version: `1.0`
- Package version: `1.0`
- Generator version: `7.17.0`
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`

The generated npm module supports the following:

- Environments
  * Node.js
  * Webpack
  * Browserify
- Language levels
  * ES5 - you must have a Promises/A+ library installed
  * ES6
- Module systems
  * CommonJS
  * ES6 module system


## Development

### Building

To build the TypeScript source code, you need to have Node.js and npm installed.
After cloning the repository, navigate to the project directory and run:

```bash
npm install
npm run build
```

### Publishing

Once you've built the package, you can publish it to npm:

```bash
npm publish
```

## License

[]()