# test-codat-local

Latest version **1.0.0** (published 2023-07-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install test-codat-local
pnpm add test-codat-local
yarn add test-codat-local
bun add test-codat-local
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-07-01 |
| First published | 2023-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 15 |
| Unpacked size | 430 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Testing codat locally |
| Maintainers | norayr93 |

## Links

- npm: https://www.npmjs.com/package/test-codat-local
- npm.io page: https://npm.io/package/test-codat-local

## Dependencies (15)

- [rxjs](https://npm.io/package/rxjs.md) ^7.5.6
- [axios](https://npm.io/package/axios.md) ^0.27.2
- [react](https://npm.io/package/react.md) ^17.0.0
- [js-cookie](https://npm.io/package/js-cookie.md) ^3.0.1
- [classnames](https://npm.io/package/classnames.md) ^2.3.1
- [axios-hooks](https://npm.io/package/axios-hooks.md) ^3.1.5
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.2
- [query-string](https://npm.io/package/query-string.md) ^7.1.1
- [react-router](https://npm.io/package/react-router.md) ^5.3.4
- [use-debounce](https://npm.io/package/use-debounce.md) ^6.0.0
- [lodash.uniqby](https://npm.io/package/lodash.uniqby.md) ^4.7.0
- [path-to-regexp](https://npm.io/package/path-to-regexp.md) ^1.7.0
- [lodash.debounce](https://npm.io/package/lodash.debounce.md) ^4.0.8
- [react-router-dom](https://npm.io/package/react-router-dom.md) ^5.3.4
- [@codat/orchard-ui](https://npm.io/package/@codat/orchard-ui.md) ^27.3.4

## Recent versions

- 1.0.0 (latest) — 2023-07-01

## README

# Codat Embedded Link SDK


> 🚧 Beta testing
> 
> Embedded Link is in the beta phase. If you want to use the Embedded Link solution, please [get in touch](mailto:embedded-link@codat.io).
> 
> You can also [request features and suggest improvements](https://portal.productboard.com/codat/7-product-roadmap/c/485-embed-a-pre-built-auth-flow-in-your-website-or-app) to the component.

**Full documentation can be found [here](https://docs.codat.io/docs/authorize-embedded-link)**

## Prerequisites

You should use React 17 or 18 when embedding the Link component into your webpage or application.

## Getting started

You can install this library using npm:
```
npm i @codat/link-sdk
```
After installing the library, instantiate it in your own project:
```
import { CodatLink } from '@codat/link-sdk';
import '../node_modules/@codat/link-sdk/index.css';
```

## Embedding the Link application

The component requires a `companyId` parameter to open Link for a specific company. To obtain the `companyId`, first [create a Codat company](https://docs.codat.io/docs/managing-companies) for your customer. We recommend doing that at the same time as your SMB customer signs up within your app.

From the response to company creation, retain the `companyId` parameter. Then, initialize the Codat Link component in your app:
```
<CodatLink
    companyId="a00a0a00-0a0a-a0aa-0000a00aa00a"
    onConnection={(id) => alert('Success: Connection ' + id + ' established')} // Called each time a connection is established
    onClose={() => alert('Closed')} // Called when the user clicks 'X'
    onError={(err) => alert('Error: ' + err)} // Called when an error is reached
    onFinish={() => alert("Finished")} // Called when user completes the whole flow
/>
```
## Getting help

To report issues with this library, please [get in touch](mailto:embedded-link@codat.io) with us.

## Pitfalls

- Disable React.StrictMode
- The Embedded Link component is not optimized for use on mobile devices.

---
_Source: https://npm.io/package/test-codat-local · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
