# README

## Content

# spreadjs-api

## Table of contents

### Enumerations

- [BrowsingMode](enums/BrowsingMode)
- [OpType](enums/OpType)
- [PermissionTypes](enums/PermissionTypes)

### Interfaces

- [IBindPresenceOptions](interfaces/IBindPresenceOptions)
- [IChangeSet](interfaces/IChangeSet)
- [IOpComponent](interfaces/IOpComponent)
- [IPermission](interfaces/IPermission)
- [IPresence](interfaces/IPresence)
- [IRange](interfaces/IRange)
- [ISelections](interfaces/ISelections)
- [IUser](interfaces/IUser)

### Variables

- [type](README#type)

### Functions

- [bind](README#bind)
- [bindPresence](README#bindpresence)

## Variables

### <a id="type" name="type"></a> type

• **type**: `OT_Type`<`unknown`, [`IChangeSet`](interfaces/IChangeSet)\>

Defines the OT type for spreadsheets.

## Functions

### <a id="bind" name="bind"></a> bind

▸ **bind**(`workbook`, `doc`): `Promise`<`void`\>

Binds a workbook to a shared document.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `workbook` | `any` | The instance of GC.Spread.Sheets.Workbook. |
| `doc` | `SharedDoc`<`any`, [`IChangeSet`](interfaces/IChangeSet)\> | The instance of SharedDoc. |

#### Returns

`Promise`<`void`\>

A promise that resolves when the binding is complete.

___

### <a id="bindpresence" name="bindpresence"></a> bindPresence

▸ **bindPresence**(`workbook`, `presence`, `user`, `options?`): `Promise`<`void`\>

Binds a workbook to a presence instance.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `workbook` | `any` | The instance of GC.Spread.Sheets.Workbook. |
| `presence` | `Presence`<[`IPresence`](interfaces/IPresence)\> | The presence instance. |
| `user` | [`IUser`](interfaces/IUser) | The user information. |
| `options?` | [`IBindPresenceOptions`](interfaces/IBindPresenceOptions) | - |

#### Returns

`Promise`<`void`\>

A promise that resolves when the binding is complete.
