Skip to content

Commit

Permalink
feat(Implement functionality for a complete USSD request):
Browse files Browse the repository at this point in the history
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.
54 changes: 54 additions & 0 deletions src/lib/types/graph/user.ts
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;
}

0 comments on commit 4bc3f15

Please sign in to comment.