Skip to main content
Version: 2.1

Group

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

  const groupClient =  getGroupClient(rumsanService.client);

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

groupClient.create
ParameterTypeDescription
namestringname of the group
isSystemboolean
Response
 success: true
data: {
uuid: string
isSystem: boolean
id: number
name: string
createdAt: Date
updatedAt: Date
}

groupClient.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: {
uuid: string
isSystem: boolean
id: number
name: string
beneficiariesGroup:[
{
beneficiary:{
id: string
uuid: string
firstName: string
lastName: string
gender: string
birthDate: string
walletAddress: string
phone: string
email: string
location: string
latitude: number
longitude: number
govtIDNumber: string
notes: string
bankedStatus: string
internetStatus: string
phoneStatus: string
extras: {}
createdAt: string
updatedAt: string
deletedAt: string
}
}
]
}

groupClient.listById
ParameterTypeDescription
uuidstringuuid of group
pagenumberRequired number of page to be displayed on in
perPagenumberRequired list the number of data in a page
Response
 success: true
data: {
id: number
uuid: string
beneficiaryId: number
groupId: number
createdAt: Date
updatedAt: Date
beneficiary:{
id: string
uuid: string
firstName: string
lastName: string
gender: string
birthDate: string
walletAddress: string
phone: string
email: string
location: string
latitude: number
longitude: number
govtIDNumber: string
notes: string
bankedStatus: string
internetStatus: string
phoneStatus: string
extras: {}
createdAt: string
updatedAt: string
deletedAt: string
}
}

groupClient.update
ParameterTypeDescription
uuidstringuuid of group
namestringname of the group
isSystemboolean
Response
 success: true
data: {
uuid: string
isSystem: boolean
id: number
name: string
createdAt: Date
updatedAt: Date
}

groupClient.purgeGroup
ParameterTypeDescription
beneficiaryUuidstring[]Array of UUIDs identifying beneficiaries
groupUuidstringUUID identifying the group
Response
 success: true
data: {
uuid: string
isSystem: boolean
id: number
name: string
createdAt: Date
updatedAt: Date
}

groupClient.remove
ParameterTypeDescription
uuidstringUUID identifying the group
deleteBeneficiaryFlagboolean
Response
 success: true
data: {
uuid: string
isSystem: boolean
id: number
name: string
createdAt: Date
updatedAt: Date
}

groupClient.deleteGroup

ParameterTypeDescription
uuidstringUUID identifying the group
Response
 success: true
data: {
message: string
flag: string
}

groupClient.download

ParameterTypeDescription
uuidstringUUID identifying the group
Response
 success: true