advanced-ussd-builder
Version:
Advanced USSD Menu Builder with persistent state and navigation
45 lines • 1.29 kB
TypeScript
export type tUssdMenuMetadata<T = any> = {
[key: string]: T;
};
export interface iUssdMenuPagination {
total_pages: number;
current_page: number;
}
export interface iUssdSession {
msisdn: string;
network: string;
session_id: string;
service_code: string;
user_inputs: string[];
last_menu_route?: string;
last_activity_timestamp: Date;
menu_metadata: tUssdMenuMetadata;
menu_pagination: {
[key: string]: iUssdMenuPagination;
};
}
export type ReadonlyPartial = {
readonly [K in keyof iUssdSession]?: iUssdSession[K];
};
type DotAndArrayNotation<AssignableType> = {
readonly [key: string]: AssignableType;
};
export type ReadonlyPartialForUnset = {
readonly [K in keyof iUssdSession]?: string;
};
type tSessionQuery = ReadonlyPartial & DotAndArrayNotation<any>;
type tSessionUnsetQuery = ReadonlyPartialForUnset & DotAndArrayNotation<any>;
export type tSessionUpdateQuery = {
$set?: tSessionQuery;
$push?: tSessionQuery;
$unset?: tSessionUnsetQuery;
};
type tSetCustomSession = {
custom_metadata?: Record<string, any>;
} & DotAndArrayNotation<any>;
export type tSetCustomSessionQuery = {
$set?: tSetCustomSession;
$unset?: tSetCustomSession;
};
export {};
//# sourceMappingURL=ussd-schema.d.ts.map