import { Type, Static } from '@sinclair/typebox' export type GetSharingUrlSuccess = Static export const GetSharingUrlSuccess = Type.Object({ status: Type.Literal("success"), sharingUrl: Type.String() }) export type GetSharingUrlMessage = Static export const GetSharingUrlMessage = Type.Union([ Type.Literal("not found"), Type.Literal("not authorized"), Type.Literal("article_url should not be empty") ]) export type GetSharingUrlFailed = Static export const GetSharingUrlFailed = Type.Object({ status: Type.Literal("error"), message: GetSharingUrlMessage }) export type GetSharingUrlResponse = Static export const GetSharingUrlResponse = Type.Union([ GetSharingUrlFailed, GetSharingUrlMessage ]) export type GetSharingUrlOpts = Static export const GetSharingUrlOpts = Type.Object({ url: Type.String() })