Skip to main content
Version: 2.1

Targeting

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

  const targetingClient =  getAppClient(rumsanService.client);

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

targetingClient.create

ParameterType
filterOptionsany
 success: true
data: {
message:string
}
targetingClient.list(payload)

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: [
{

id: number
updatedAt: Date
createdAt: Date
uuid: UUID
label: string
createdBy: UUID
user: {
name: string
}
}
]

  • export grouped beneficiaries

targetingClient.exportTargetBeneficiary(inputData)
ParameterTypeDescription
groupUUIDUUIDuuid identifying the group
appURL`string``appurl for export
Response
 success: true
data: [
{
message:string
}
]

targetingClient.listByTargetUuid({
target_uuid: target_uuid,
query: payload,
}),
ParameterTypeDescription
target_uuidstringuuid identifying the targets
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: [
{

id: number
benefUuid: `${string}-${string}-${string}-${string}-${string}
targetUuid: UUID
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
}
}
]

targetingClient.search
ParameterType
filterOptionsany
Response
 success: true
data: [
{
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

}
]

targetingClient.targetResult
ParameterType
filterOptionsany
targetUuidstring
Response
 success: true
data:
{

message:string
}
targetingClient.patchLabel
ParameterType
uuidstring
payloadany
Response
 success: true
data:
{

id: number
updatedAt: Date
createdAt: Date
uuid: UUID
label: string
filterOptions:any
status: enum
createdAt: Date
updatedAt: Date

}
targetingClient.export
ParameterTypeDescription
targetUuidstringuuid identifying the targets
Response
 success: true
data:
{

message:string
}
targetingClient.downloadPinnedBeneficiary

ParameterTypeDescription
target_uuidstringuuid identifying the targets
Response
 success: true