-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Implement functionality for a complete USSD request):
Adds utility functions for graph interaction with user objects.
- Loading branch information
Mango Habanero
committed
Jan 20, 2023
1 parent
9119a07
commit 4bc3f15
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
export const userAccountFields = `accounts { | ||
id | ||
}` | ||
|
||
export const personalInformationFields = `{ | ||
family_name | ||
gender | ||
gender_type { | ||
value | ||
} | ||
geo | ||
given_names | ||
location_name | ||
user_identifier | ||
year_of_birth | ||
}` | ||
|
||
export const userFields = `{ | ||
id | ||
created_at | ||
activated | ||
personal_information ${personalInformationFields} | ||
${userAccountFields} | ||
}` | ||
|
||
export enum Gender { | ||
MALE = "MALE", | ||
FEMALE = "FEMALE", | ||
} | ||
|
||
export enum InterfaceType { | ||
USSD = "USSD", | ||
WEB = "WEB", | ||
} | ||
|
||
export type PersonalInformation = { | ||
family_name?: string; | ||
gender?: string; | ||
gender_type?: { | ||
value?: string; | ||
} | ||
geo?: string; | ||
given_names?: string; | ||
location_name?: string; | ||
user_identifier?: number; | ||
year_of_birth?: number; | ||
} | ||
|
||
export type User = { | ||
activated: boolean; | ||
interface_identifier: string; | ||
interface_type: string; | ||
personal_information?: PersonalInformation; | ||
} |