# @equisoft/ucx-proxy-sdk-typescript@0.0.11

A TypeScript SDK client for the .. API.

## Usage

First, install the SDK from npm.

```bash
npm install @equisoft/ucx-proxy-sdk-typescript --save
```

Next, try it out.


```ts
import {
  Configuration,
  ConfiguredSourceApi,
} from '@equisoft/ucx-proxy-sdk-typescript';
import type { ListConfiguredSourcesRequest } from '@equisoft/ucx-proxy-sdk-typescript';

async function example() {
  console.log("🚀 Testing @equisoft/ucx-proxy-sdk-typescript SDK...");
  const config = new Configuration({ 
    // To configure OAuth2 access token for authorization: default accessCode
    accessToken: "YOUR ACCESS TOKEN",
  });
  const api = new ConfiguredSourceApi(config);

  const body = {
    // string | The organization uuid to which the user belongs. Optional (optional)
    organizationId: organizationId_example,
    // boolean | If true, will include inactive sources in the response (optional)
    includeInactive: true,
  } satisfies ListConfiguredSourcesRequest;

  try {
    const data = await api.listConfiguredSources(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://../..*

| Class | Method | HTTP request | Description
| ----- | ------ | ------------ | -------------
*ConfiguredSourceApi* | [**listConfiguredSources**](docs/ConfiguredSourceApi.md#listconfiguredsources) | **GET** /sources | Get all active (and inactive) sources for the current user / organization
*ContactApi* | [**getContactById**](docs/ContactApi.md#getcontactbyid) | **GET** /contacts/{uniqueIdentifier} | Get contact by unique identifier
*ContactApi* | [**searchContacts**](docs/ContactApi.md#searchcontacts) | **GET** /contacts | Search contacts for a specific organization
*InvestmentApi* | [**getInvestmentAccounts**](docs/InvestmentApi.md#getinvestmentaccounts) | **GET** /contacts/{uniqueIdentifier}/investments | Get investment accounts for a specific contact
*InvestmentApi* | [**getInvestmentAccounts1**](docs/InvestmentApi.md#getinvestmentaccounts1) | **GET** /contacts/{uniqueIdentifier}/investments/{investmentAccountId} | Get investment accounts for a specific contact
*OrganizationSourceAuthenticationApi* | [**createOrganizationSource**](docs/OrganizationSourceAuthenticationApi.md#createorganizationsource) | **POST** /authentications/organizations/{organizationId}/sources | Create a new source for an organization and authenticate
*OrganizationSourceAuthenticationApi* | [**deleteOrganizationSource**](docs/OrganizationSourceAuthenticationApi.md#deleteorganizationsource) | **DELETE** /authentications/organizations/{organizationId}/sources/{sourceKey} | Delete an existing source
*OrganizationSourceAuthenticationApi* | [**listOrganizationSources**](docs/OrganizationSourceAuthenticationApi.md#listorganizationsources) | **GET** /authentications/organizations/{organizationId}/sources | Get all the authentication sources for an organization
*OrganizationSourceAuthenticationApi* | [**toggleOrganizationSource**](docs/OrganizationSourceAuthenticationApi.md#toggleorganizationsource) | **PUT** /authentications/organizations/{organizationId}/sources/{sourceKey}/state | Enable or disable a given source for an organization
*OrganizationSourceAuthenticationApi* | [**updateOrganizationSource**](docs/OrganizationSourceAuthenticationApi.md#updateorganizationsource) | **PUT** /authentications/organizations/{organizationId}/sources/{sourceKey} | Update the credentials of a given source for an organization
*SourceApi* | [**listSources**](docs/SourceApi.md#listsources) | **GET** /sources/available | Get all sources


### Models

- [AccountType](docs/AccountType.md)
- [AddressLabel](docs/AddressLabel.md)
- [AddressSchema](docs/AddressSchema.md)
- [AuthenticationConfigSchema](docs/AuthenticationConfigSchema.md)
- [CivilityTitle](docs/CivilityTitle.md)
- [ConfiguredSourceSchema](docs/ConfiguredSourceSchema.md)
- [ContactLanguage](docs/ContactLanguage.md)
- [ContactReferenceSchema](docs/ContactReferenceSchema.md)
- [ContactResultSchema](docs/ContactResultSchema.md)
- [ContactSchema](docs/ContactSchema.md)
- [CreatePayloadSourceAuthenticationSchema](docs/CreatePayloadSourceAuthenticationSchema.md)
- [EmailLabel](docs/EmailLabel.md)
- [EmailSchema](docs/EmailSchema.md)
- [ErrorCodes](docs/ErrorCodes.md)
- [ErrorResponse](docs/ErrorResponse.md)
- [ErrorSchema](docs/ErrorSchema.md)
- [Gender](docs/Gender.md)
- [HoldingExchange](docs/HoldingExchange.md)
- [HoldingSchema](docs/HoldingSchema.md)
- [HoldingType](docs/HoldingType.md)
- [IncomeSchema](docs/IncomeSchema.md)
- [InvestmentAccountSchema](docs/InvestmentAccountSchema.md)
- [InvestmentSourceResultSchema](docs/InvestmentSourceResultSchema.md)
- [InvestmentStatus](docs/InvestmentStatus.md)
- [ListOrganizationSourceAuthenticationResultSchema](docs/ListOrganizationSourceAuthenticationResultSchema.md)
- [MaritalStatus](docs/MaritalStatus.md)
- [OrganizationSourceAuthenticationResultSchema](docs/OrganizationSourceAuthenticationResultSchema.md)
- [OrganizationSourceAuthenticationSchema](docs/OrganizationSourceAuthenticationSchema.md)
- [PhoneLabel](docs/PhoneLabel.md)
- [PhoneSchema](docs/PhoneSchema.md)
- [RegistrationType](docs/RegistrationType.md)
- [SmokerStatus](docs/SmokerStatus.md)
- [SourceResultSchema](docs/SourceResultSchema.md)
- [SourceSchema](docs/SourceSchema.md)
- [SourceStatus](docs/SourceStatus.md)
- [Status](docs/Status.md)
- [SymbolsSchema](docs/SymbolsSchema.md)
- [ToggleSourceAuthenticationSchema](docs/ToggleSourceAuthenticationSchema.md)
- [UpdatePayloadSourceAuthenticationSchema](docs/UpdatePayloadSourceAuthenticationSchema.md)

### Authorization


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


- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: ${equisoft.auth.auth-server.base-url}/oauth/authorize
- **Scopes**: 
  - `ucx`: Add sources and search for contacts/investments.
  - `ucx:read`: Get/Search for contacts/investments.
  - `ucx:organization`: Access to source configuration operations.

## 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: `0.0.11`
- Package version: `0.0.11`
- Generator version: `7.20.0-equisoft1`
- 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

For more information, please visit [https://www.equisoft.com/](https://www.equisoft.com/)

## 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

[Proprietary](https://www.equisoft.com/legal)
