@snap/camera-kit
Version:
Camera Kit Web
45 lines • 1.53 kB
TypeScript
/**
* Lens launch params.
*/
export type LensLaunchParams = Record<string, string | number | string[] | number[]>;
/**
* Some Lenses may accept (or require) certain data provided to them when the Lens is applied.
*
* This data may include things like user info (to render the user's name, for example, or perform some task based on
* their birth date), or arbitrary `launchParams` defined by the Lens.
*
* @category Lenses
*/
export interface LensLaunchData {
userId?: string;
userData?: LensUserData;
launchParams?: LensLaunchParams;
}
export interface LensUserData {
userId?: string;
username?: string;
birthdate?: string;
displayName?: string;
countrycode?: string;
score?: string;
bitmojiInfo?: BitmojiUserInfo;
friendInfo?: FriendUserInfo;
zodiac?: Zodiac;
}
export interface BitmojiUserInfo {
avatarId?: string;
selfieId?: string;
}
export interface FriendUserInfo {
friendshipStart?: Date;
lastInteraction?: Date;
streak?: number;
}
export type Zodiac = "aquarius" | "aries" | "cancer" | "capricorn" | "gemini" | "leo" | "libra" | "pisces" | "sagittarius" | "scorpio" | "taurus" | "virgo";
export declare function isZodiac(value: unknown): value is Zodiac;
export declare function isLensLaunchDataOrUndefined(value: unknown): value is LensLaunchData | undefined;
/**
* @internal
*/
export declare const encodeLensLaunchData: (launchData: LensLaunchData, persistentStore: ArrayBuffer) => Uint8Array;
//# sourceMappingURL=LensLaunchData.d.ts.map