Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export interface IStory {
- id?: number;
- background: {
- color: string;
- image?: {
- height: number;
- scale: number;
- src?: string;
- upload_id?: number;
- width: number;
- x: number;
- y: number;
- };
- video?: unknown;
- };
- datetime: string;
- link: string;
- objects: Map<IStoryObject["id"], IStoryObject>;
- page_config_id?: IEpPageconfig["id"];
- result_image_upload_id?: string;
- resut_thumb_upload_id?: string;
- }
- export type IStoryObject =
- | IStoryCountdown
- | IStoryGif
- | IStoryImage
- | IStoryHashtag
- | IStoryLocation
- | IStoryMention
- | IStoryPoll
- | IStoryQuestion
- | IStoryQuiz
- | IStoryText;
- export type IStoryObjectPreparing =
- | Omit<IStoryCountdown, "id">
- | Omit<IStoryGif, "id">
- | Omit<IStoryImage, "id">
- | Omit<IStoryHashtag, "id">
- | Omit<IStoryLocation, "id">
- | Omit<IStoryMention, "id">
- | Omit<IStoryPoll, "id">
- | Omit<IStoryQuestion, "id">
- | Omit<IStoryQuiz, "id">
- | Omit<IStoryText, "id">;
- export interface IStoryObjectBase {
- height: number;
- id: string;
- rotation: number;
- type:
- | "countdown"
- | "gif"
- | "image"
- | "hashtag"
- | "location"
- | "mention"
- | "poll"
- | "question"
- | "quiz"
- | "text";
- x: number;
- y: number;
- width: number;
- }
- export interface IStoryCountdown extends IStoryObjectBase {
- datetime: string;
- fill_variant:
- | "black"
- | "blue"
- | "green"
- | "green_to_blue"
- | "orange"
- | "red"
- | "red_to_orange"
- | "violet"
- | "violet_to_blue"
- | "violet_to_red"
- | "white"
- | "yellow";
- text: string;
- type: "countdown";
- }
- export interface IStoryGif extends IStoryObjectBase {
- src_gif: string;
- src_mp4: string;
- type: "gif";
- }
- export interface IStoryHashtag extends IStoryObjectBase {
- fill_variant: "classic" | "color" | "transparent";
- text: string;
- type: "hashtag";
- }
- export interface IStoryImage extends IStoryObjectBase {
- src?: string;
- upload_id?: number;
- type: "image";
- }
- export interface IStoryLocation extends IStoryObjectBase {
- fill_variant: "classic" | "color" | "transparent";
- place: IInstagramPlace;
- type: "location";
- }
- export interface IStoryMention extends IStoryObjectBase {
- fill_variant: "classic" | "color" | "transparent";
- user: IInstagramUser;
- type: "mention";
- }
- export interface IStoryPoll extends IStoryObjectBase {
- answer_negative: string;
- answer_positive: string;
- text: string;
- type: "poll";
- }
- export interface IStoryQuestion extends IStoryObjectBase {
- fill_variant:
- | "black"
- | "blue"
- | "green"
- | "orange"
- | "red"
- | "rose"
- | "violet"
- | "white"
- | "yellow";
- text: string;
- type: "question";
- }
- export interface IStoryQuiz extends IStoryObjectBase {
- answers: { text: string; isCorrect: boolean }[];
- fill_variant:
- | "black"
- | "blue"
- | "green"
- | "green_to_blue"
- | "orange"
- | "red"
- | "red_to_orange"
- | "violet"
- | "violet_to_blue"
- | "violet_to_red"
- | "yellow";
- text: string;
- type: "quiz";
- }
- export interface IStoryText extends IStoryObjectBase {
- align: "center" | "left" | "right";
- effect: "" | "glow" | "shadow";
- fill: string;
- font_family: string;
- font_size: number;
- font_style: string;
- line_height: number;
- text: string;
- type: "text";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement