0.0.2 • Published 6 months ago

@aai-osp-test/websdk v0.0.2

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

aai osp SDK

The official Javascript client library for the AAI one-stop flow.

Table of Contents

Install

npm install @AAI-OSP/websdk

Documentation

The module provides a sdk for the AAI OSP flow. For complete information about the API, head to the docs.

Getting Started

To open the flow you must create a Client object.

import AAIOSP from '@AAI-OSP/websdk'
const container = document.querySelector('#app')
const osp = OSP.init(container!, {
    token: 'XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX',
    environment: 'local',
    language: 'en',
    onReady() {
        console.log('onReady')
        osp.open()
    },
    onLoad() {
        console.log('onload')
    },
    onError() {
        console.error('onerror')
    },
    onEvent(data) {
        console.log(`onEvent:${JSON.stringify(data)}`)
    },
    onComplete(){
        console.log('workflow complete!')
    }
})

Contributing

Please see Contributing for guidelines and instructions for local development.

License

MIT

0.0.2

6 months ago

0.0.1

6 months ago