Interface: IBundle<T>
A bundle is a collection of CRUD operations that can be performed on a resource.
Interface
IBundle
Type parameters
| Name | Type | Description |
|---|---|---|
T | any | The type of the resource. |
Implemented by
Table of contents
Properties
- get
- getByName
- create
- createBulk
- update
- updateBulk
- delete
- deleteBulk
- query
- countByQuery
- stream
- fetch
- logs
- setStatus
- doesLabelHaveAttributes
- calcLabelsHaveAttributes
- missingRequiredAttribute
Properties
get
• Optional get: (payload: ReadPayload<T>, options?: any) => Promise<T>
Type declaration
▸ (payload, options?): Promise<T>
Parameters
| Name | Type |
|---|---|
payload | ReadPayload<T> |
options? | any |
Returns
Promise<T>
getByName
• Optional getByName: (payload: string, options?: any) => Promise<T>
Type declaration
▸ (payload, options?): Promise<T>
Parameters
| Name | Type |
|---|---|
payload | string |
options? | any |
Returns
Promise<T>
create
• Optional create: (payload: any, options?: any) => Promise<T | T[]>
Type declaration
▸ (payload, options?): Promise<T | T[]>
Parameters
| Name | Type |
|---|---|
payload | any |
options? | any |
Returns
Promise<T | T[]>
createBulk
• Optional createBulk: (payload: any, options?: any) => Promise<T[]>
Type declaration
▸ (payload, options?): Promise<T[]>
Parameters
| Name | Type |
|---|---|
payload | any |
options? | any |
Returns
Promise<T[]>
update
• Optional update: (payload: Partial<T>, options?: any) => Promise<T | T[]>
Type declaration
▸ (payload, options?): Promise<T | T[]>
Parameters
| Name | Type |
|---|---|
payload | Partial<T> |
options? | any |
Returns
Promise<T | T[]>
updateBulk
• Optional updateBulk: (payload: T[], options?: any) => Promise<T[]>
Type declaration
▸ (payload, options?): Promise<T[]>
Parameters
| Name | Type |
|---|---|
payload | T[] |
options? | any |
Returns
Promise<T[]>
delete
• Optional delete: (payload: DeletePayload<T>, options?: any) => Promise<string | void>
Type declaration
▸ (payload, options?): Promise<string | void>
Parameters
| Name | Type |
|---|---|
payload | DeletePayload<T> |
options? | any |
Returns
Promise<string | void>
deleteBulk
• Optional deleteBulk: (payload: DeletePayload<T>[], options?: any) => Promise<void>
Type declaration
▸ (payload, options?): Promise<void>
Parameters
| Name | Type |
|---|---|
payload | DeletePayload<T>[] |
options? | any |
Returns
Promise<void>
query
• Optional query: (payload: any, options?: any) => Promise<IPagedResponse<T>>
Type declaration
▸ (payload, options?): Promise<IPagedResponse<T>>
Parameters
| Name | Type |
|---|---|
payload | any |
options? | any |
Returns
Promise<IPagedResponse<T>>
countByQuery
• Optional countByQuery: (payload: any, options?: any) => Promise<number>
Type declaration
▸ (payload, options?): Promise<number>
Parameters
| Name | Type |
|---|---|
payload | any |
options? | any |
Returns
Promise<number>
stream
• Optional stream: (payload: any, options?: any) => Promise<any>
Type declaration
▸ (payload, options?): Promise<any>
Parameters
| Name | Type |
|---|---|
payload | any |
options? | any |
Returns
Promise<any>
fetch
• Optional fetch: (payload: string) => Promise<any>
Type declaration
▸ (payload): Promise<any>
Parameters
| Name | Type |
|---|---|
payload | string |
Returns
Promise<any>
logs
• Optional logs: (payload: Partial<T>) => Promise<any>
Type declaration
▸ (payload): Promise<any>
Parameters
| Name | Type |
|---|---|
payload | Partial<T> |
Returns
Promise<any>
setStatus
• Optional setStatus: (payload: any) => Promise<void>
Type declaration
▸ (payload): Promise<void>
Parameters
| Name | Type |
|---|---|
payload | any |
Returns
Promise<void>
doesLabelHaveAttributes
• Optional doesLabelHaveAttributes: (payload: any) => Promise<boolean>
Type declaration
▸ (payload): Promise<boolean>
Parameters
| Name | Type |
|---|---|
payload | any |
Returns
Promise<boolean>
calcLabelsHaveAttributes
• Optional calcLabelsHaveAttributes: (payload: any) => Promise<void>
Type declaration
▸ (payload): Promise<void>
Parameters
| Name | Type |
|---|---|
payload | any |
Returns
Promise<void>
missingRequiredAttribute
• Optional missingRequiredAttribute: (payload: string) => Promise<boolean>
Type declaration
▸ (payload): Promise<boolean>
Parameters
| Name | Type |
|---|---|
payload | string |
Returns
Promise<boolean>