/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/subscriptions": { readonly parameters: { readonly query?: never; readonly path?: never; readonly cookie?: never; }; /** * Create a Subscription * @description Creates or updates an email subscription. * * By default, customers receive abandoned cart emails as soon as they provide their email address in the checkout flow. They can opt out using this endpoint. * * However, if **Store Settings > Miscellaneous > Require Consent** is enabled, Abandoned Cart Emails are not sent by default, and the customer should opt-in. * * > #### Note * > * Substitute your storefront domain for `yourstore.example.com`. * > * The Send a Test Request feature is not currently supported for this endpoint. */ readonly post: operations["createSubscription"]; }; } export type webhooks = Record; export interface components { schemas: { readonly SubscriptionRequest: { /** @description Email of subscriber */ readonly email?: string; /** @description Describes whether subscriber has consented to receive Marketing emails. */ readonly acceptsMarketingNewsletter?: boolean; /** @description Describes whether subscriber has consented to receive Abandoned Cart emails. */ readonly acceptsAbandonedCartEmails?: boolean; }; /** @description Subscription properties. */ readonly Subscription: { /** @description The unique numeric ID of the subscriber; increments sequentially. * */ readonly id?: number; /** @description The email of the subscriber. Must be unique. * */ readonly email?: string; /** @description The first name of the subscriber. * */ readonly firstName?: string; /** @description The last name of the subscriber. * */ readonly lastName?: string; /** @description The source of the subscriber. Values are: `storefront`, `order`, or `custom`. * */ readonly source?: string; /** @description The ID of the source order, if source was an order. * */ readonly orderId?: number | null; /** @description The collection of consents the shopper is subscribing to. * */ readonly consents?: readonly unknown[]; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly createSubscription: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: { readonly content: { readonly "application/json": components["schemas"]["SubscriptionRequest"]; }; }; readonly responses: { readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["Subscription"]; }; }; }; }; }