Home Manual Reference Source Test Repository
public class | source

BulkBuilder

Extends:

BaseProvision → BulkBuilder

This class allow set simple values.

Constructor Summary

Public Constructor
public

constructor(ogapi: InternalOpenGateAPI, resource: resource, extension: extension, timeout: number)

Constructor

Method Summary

Public Methods
public

create(rawFile: string | Blob, csv_response: boolean): *

Execute the bulk creation operation

public

delete(rawFile: string | Blob, csv_response: boolean): *

Execute the bulk delete operation

public

deleteAll(rawFile: string | Blob, csv_response: boolean): *

Execute the bulk delete full operation

public

patch(rawFile: string | Blob, csv_response: boolean): *

Execute the bulk patch operation

public

update(rawFile: string | Blob, csv_response: boolean): *

Execute the bulk update operation

Inherited Summary

From class BaseProvision
public

This invoke a request to OpenGate North API and the callback is managed by promises This function create a entity of provision

public

delete(body: *): Promise

This invoke a request to OpenGate North API and the callback is managed by promises This function deletes a entity of provision

public

This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision

Public Constructors

public constructor(ogapi: InternalOpenGateAPI, resource: resource, extension: extension, timeout: number) source

Constructor

Override:

BaseProvision#constructor

Params:

NameTypeAttributeDescription
ogapi InternalOpenGateAPI

required field. This is ogapi instance

resource resource

required field. This is the resource used for the bulk provision

extension extension

required field. Type of file to send

timeout number
  • optional

timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception

Public Methods

public create(rawFile: string | Blob, csv_response: boolean): * source

Execute the bulk creation operation

Override:

BaseProvision#create

Params:

NameTypeAttributeDescription
rawFile string | Blob

File with format string or Blob

csv_response boolean
  • optional

true if you want a response on format csv. False or null if you want a response on format json

Return:

*

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).create(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).create(new Blob(), true)

public delete(rawFile: string | Blob, csv_response: boolean): * source

Execute the bulk delete operation

Override:

BaseProvision#delete

Params:

NameTypeAttributeDescription
rawFile string | Blob

File with format string or Blob

csv_response boolean
  • optional

true if you want a response on format csv. False or null if you want a response on format json

Return:

*

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).delete(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).delete(new Blob(), true)

public deleteAll(rawFile: string | Blob, csv_response: boolean): * source

Execute the bulk delete full operation

Params:

NameTypeAttributeDescription
rawFile string | Blob

File with format string or Blob

csv_response boolean
  • optional

true if you want a response on format csv. False or null if you want a response on format json

Return:

*

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).deleteAll(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).deleteAll(new Blob(), true)

public patch(rawFile: string | Blob, csv_response: boolean): * source

Execute the bulk patch operation

Params:

NameTypeAttributeDescription
rawFile string | Blob

File with format string or Blob

csv_response boolean
  • optional

true if you want a response on format csv. False or null if you want a response on format json

Return:

*

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(new Blob(), true)

public update(rawFile: string | Blob, csv_response: boolean): * source

Execute the bulk update operation

Override:

BaseProvision#update

Params:

NameTypeAttributeDescription
rawFile string | Blob

File with format string or Blob

csv_response boolean
  • optional

true if you want a response on format csv. False or null if you want a response on format json

Return:

*

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(new Blob(), true)