0.3.1-alpha.1 • Published 12 months ago

@raccoonai/tail v0.3.1-alpha.1

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Tail SDK

The Tail SDK is a Typescript toolkit designed to help you integrate the Raccoon Tail in your platform using popular libraries like React or core Vanilla JavaScript.

To learn more about how to use the Tail SDK, check out our API Reference and Documentation

Installation

You will need Node.js 18+ and pnpm installed on your local development machine.

npm install @raccoonai/tail

Usage

Tail SDK

The Tail SDK Core module provides a way to allow users to link apps of your choice.

@/index.ts (Browser Runtime)
import { TailSDK } from '@raccoonai/tail';
import type { TailError } from '@raccoonai/tail';

const tailInstance = new TailSDK({
    secretKey: 'some_secret', // Your Organisation's secret key
    callbacks: {
        onSuccess: (message) => console.log(message),
        onError: (error) => console.error(error)
    }
});

Check our API Reference to see the available methods on the tailInstance.

Tail SDK React

The Tail SDK React module provides a set of hooks and components that help you integrate Tail SDK in your React-based apps.

You have to install the React Tail SDK. No need to install the @raccoonai/tail package if you are planning on using the React SDK.

npm install @raccoonai/tail-react
@/components/RaccoonTail.tsx (Any React Component)
'use client';

import { useTailSDK, LinkAppModal } from '@raccoonai/tail-react';

const RACCOON_PASSCODE = "user_passcode" // User's raccoon passcode to link the app

export default function RaccoonTail() {
    const tailInstance = useTailSDK(config); // same config from core @/index.ts

    const [isOpen, setIsOpen] = useState(false); // Modal visibility state

    return <div>
        <LinkAppModal
                isModalVisible={isOpen}
                tailInstance={tailInstance}
                app='uber'
                onCancel={closeModal}
                raccoonPasscode={RACCOON_PASSCODE}
            />
    </div>
}

Community

The Raccoon Community can be found on Discord where you can ask questions, voice ideas, and share your projects with other people.

Contributing

Suggestions and contributions to Tail SDK are highly appreciated. For feature requests please connect with us via our chatbot, and we will get back to you.

Authors

This library is created by Raccoon AI team members.

0.3.1-alpha.1

12 months ago

0.2.1-alpha.1

1 year ago

0.1.5-alpha.2

1 year ago

0.1.5-alpha.1

1 year ago

0.1.4-alpha.1

1 year ago

0.1.3-alpha.3

1 year ago

0.1.3-alpha.2

1 year ago

0.1.3-alpha.1

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago