UNPKG

tgsnake

Version:

Telegram MTProto framework for nodejs.

82 lines (81 loc) 2.63 kB
import { TLObject } from '../TL.js'; import { Raw } from '../../platform.node.js'; import { User } from '../Advanced/User.js'; import type { Snake } from '../../Client/index.js'; export interface TypeShippingAddress { countryCode: string; state: string; city: string; streetLine1: string; streetLine2: string; postCode: string; } export declare class ShippingAddress extends TLObject { countryCode: string; state: string; city: string; streetLine1: string; streetLine2: string; postCode: string; constructor({ countryCode, state, city, streetLine1, streetLine2, postCode }: TypeShippingAddress, client: Snake); static parse(client: Snake, address: Raw.PostAddress): ShippingAddress; } export interface TypeLabeledPrice { label: string; amount: number; } export interface TypeOrderInfo { name?: string; phoneNumber?: string; email?: string; shippingAddress?: ShippingAddress; } export declare class OrderInfo extends TLObject { name?: string; phoneNumber?: string; email?: string; shippingAddress?: ShippingAddress; constructor({ name, phoneNumber, email, shippingAddress }: TypeOrderInfo, client: Snake); static parse(client: Snake, info: Raw.PaymentRequestedInfo): OrderInfo; } export interface TypeShippingOption { id: string; title: string; prices: Array<TypeLabeledPrice>; } export interface TypeSuccessfulPayment { } export interface TypeShippingQuery { id: string; invoicePayload: string; shippingAddress: ShippingAddress; from?: User; } export declare class ShippingQuery extends TLObject { id: string; invoicePayload: string; shippingAddress: ShippingAddress; from?: User; constructor({ id, invoicePayload, shippingAddress, from }: TypeShippingQuery, client: Snake); static parse(client: Snake, update: Raw.UpdateBotShippingQuery, users: Array<Raw.TypeUser>): ShippingQuery; } export interface TypePreCheckoutQuery { id: string; currency: string; totalAmount: bigint; invoicePayload: string; shippingOptionId?: string; orderInfo?: OrderInfo; from?: User; } export declare class PreCheckoutQuery extends TLObject { id: string; currency: string; totalAmount: bigint; invoicePayload: string; shippingOptionId?: string; orderInfo?: OrderInfo; from?: User; constructor({ id, currency, totalAmount, invoicePayload, shippingOptionId, orderInfo, from, }: TypePreCheckoutQuery, client: Snake); static parse(client: Snake, update: Raw.UpdateBotPrecheckoutQuery, users: Array<Raw.TypeUser>): PreCheckoutQuery; }