Skip to main content
Version: 2.1

Field Definition

To use field definition sdk client we need retrive from the SDK using rumsanService.client

 const fieldDefClient = getFieldDefinitionClient(rumsanService.client);

As the mutation function or query function may contain some payload to be pass which are the parmaeter.

fieldDefClient.create
ParameterTypeDescription
namestringname of the field
fieldTypestringname of the field type
fieldPopulatestring[]an object that contains a key "data", which holds an array of objects containing key-value pairs in which key are labels and value
isActiveboolean
isTargetingboolean
Response
success: true
data: [
{
name: string
fieldType: string
fieldPopulate: any
isActive: boolean
isTargeting: boolean
createdAt: Date
updatedAt: Date
}
]

fieldDefClient.list
ParameterTypeDescription
pagenumberRequired number of page to be displayed on in
perPagenumberRequired list the number of data in a page
sortstringfor sorting the data
orderasc or desc
Response
 success: true
data: [
{

name: string
fieldType: string
fieldPopulate: any
isActive: boolean
isTargeting: boolean
createdAt: Date
updatedAt: Date
}
]

fieldDefClient.listById
ParameterTypeDescription
idstringRequired get the individual data by id
Response
 success: true
data: {
name: string
fieldType: string
fieldPopulate: any
isActive: boolean
isTargeting: boolean
createdAt: Date
updatedAt: Date
}


fieldDefClient.listActive
ParameterTypeDescription
pagenumberRequired number of page to be displayed on in
perPagenumberRequired list the number of data in a page
sortstringfor sorting the data
orderasc or desc
Response
 success: true
data: [
{

name: string
fieldType: string
fieldPopulate: any
isActive: boolean
isTargeting: boolean
createdAt: Date
updatedAt: Date
}
]


fieldDefClient.update
ParameterTypeDescription
idstringRequired get the individual data by id
namestringname of the field
fieldTypestringname of the field type
fieldPopulatestring[]an object that contains a key "data", which holds an array of objects containing key-value pairs in which key are labels and value
isActiveboolean
isTargetingboolean
Response
 success: true
data: {
name: string
fieldType: string
fieldPopulate: any
isActive: boolean
isTargeting: boolean
createdAt: Date
updatedAt: Date
}

fieldDefClient.toggleStatus
ParameterTypeDescription
idstringRequired get the individual data by id
isActiveboolean
Response
 success: true
data: {
name: string
fieldType: string
fieldPopulate: any
isActive: boolean
isTargeting: boolean
createdAt: Date
pdatedAt: Date
}

fieldDefClient.addBulks
ParameterType
fileany
Response
 success: true