// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../resource.js"; import * as Core from "../core.js"; import * as ViewAPI from "./view.js"; import * as AddressAPI from "./address.js"; import * as AppAPI from "./app.js"; import * as CardAPI from "./card.js"; import * as CartAPI from "./cart.js"; import * as OrderAPI from "./order.js"; import * as ProductAPI from "./product.js"; import * as ProfileAPI from "./profile.js"; import * as SubscriptionAPI from "./subscription.js"; import * as TokenAPI from "./token.js"; export class View extends APIResource { /** * Get initial app data, including user, products, cart, addresses, cards, * subscriptions, and orders. */ init(options?: Core.RequestOptions): Core.APIPromise { return this._client.get('/view/init', options); } } /** * A Terminal shop user's region. */ export type Region = 'eu' | 'na' | 'global'; export interface ViewInitResponse { /** * Initial app data. */ data: ViewInitResponse.Data; } export namespace ViewInitResponse { /** * Initial app data. */ export interface Data { addresses: Array; apps: Array; cards: Array; /** * The current Terminal shop user's cart. */ cart: CartAPI.Cart; orders: Array; products: Array; /** * A Terminal shop user's profile. (We have users, btw.) */ profile: ProfileAPI.Profile; /** * A Terminal shop user's region. */ region: ViewAPI.Region; subscriptions: Array; tokens: Array; } } export declare namespace View { export { type Region as Region, type ViewInitResponse as ViewInitResponse }; }