A bulk

!!! Bulk should only be instantiated by Client !!!

### Type parameters

- #### T: SCThings

### Hierarchy

- Bulk

## Index

### Constructors

- constructor

### Properties

- bulkAddRoute
- bulkDoneRoute
- bulkResponse
- client
- type

### Methods

- add
- done

## Constructors

### constructor

- new Bulk(type: SCThingType, client: Client, bulkResponse: SCBulkResponse): Bulk

- - Defined in src/bulk.ts:41

  !!! Bulk should only be instantiated by Client !!!

  see

    Client.bulk

  #### Parameters

  - ##### type: SCThingType

  - ##### client: Client

  - ##### bulkResponse: SCBulkResponse

  #### Returns Bulk

## Properties

### Private bulkAddRoute

bulkAddRoute: SCBulkAddRoute = new SCBulkAddRoute()

- Defined in src/bulk.ts:36

Instance of multi search request route

### Private bulkDoneRoute

bulkDoneRoute: SCBulkDoneRoute = new SCBulkDoneRoute()

- Defined in src/bulk.ts:41

Instance of multi search request route

### Private bulkResponse

bulkResponse: SCBulkResponse

- Defined in src/bulk.ts:51

### Private client

client: Client

- Defined in src/bulk.ts:50

### Private type

type: SCThingType

- Defined in src/bulk.ts:49

## Methods

### add

- add(thing: T): Promise<SCBulkAddResponse>

- - Defined in src/bulk.ts:61

  Add a thing to the bulk

  #### Parameters

  - ##### thing: T

    Thing to add to the bulk

  #### Returns Promise<SCBulkAddResponse>

### done

- done(): Promise<SCBulkDoneResponse>

- - Defined in src/bulk.ts:78

  Declare this bulk transfer as done

  This will activate the index in the backend and possibly delete old data. There are many potential processing steps required in the backend so it might take a few seconds before the callback is called.

  #### Returns Promise<SCBulkDoneResponse>

Generated using TypeDoc