UNPKG

@shopify/shopify-app-remix

Version:

Shopify Remix - to simplify the building of Shopify Apps with Remix

34 lines 1.88 kB
import type { ConfigParams, Shopify } from '@shopify/shopify-api'; import { AppConfig } from '../config-types'; /** * Set future flags using the `future` configuration field to opt in to upcoming breaking changes. * * With this feature, you can prepare for major releases ahead of time, as well as try out new features before they are released. * @publicDocs */ export interface FutureFlags { /** * When enabled, embedded apps will fetch access tokens via [token exchange](https://shopify.dev/docs/apps/auth/get-access-tokens/token-exchange). * This assumes the app has scopes declared for [Shopify managing installation](https://shopify.dev/docs/apps/auth/installation#shopify-managed-installation). * * Learn more about this [new embedded app auth strategy](https://shopify.dev/docs/api/shopify-app-remix#embedded-auth-strategy). * * @default false */ unstable_newEmbeddedAuthStrategy?: boolean; /** * When enabled, the app will start using expiring offline access tokens and automatically refresh them when they are close to expiring. * * @default false */ expiringOfflineAccessTokens?: boolean; } export interface ApiFutureFlags<Future extends FutureFlagOptions> { expiringOfflineAccessTokens: Future extends FutureFlags ? Future['expiringOfflineAccessTokens'] : false; unstable_managedPricingSupport: true; } export type ApiConfigWithFutureFlags<Future extends FutureFlagOptions> = ConfigParams<ApiFutureFlags<Future>>; export type FutureFlagOptions = FutureFlags | undefined; export type FeatureEnabled<Future extends FutureFlagOptions, Flag extends keyof FutureFlags> = Future extends FutureFlags ? Future[Flag] extends true ? true : false : false; export declare function logDisabledFutureFlags(config: AppConfig, logger: Shopify['logger']): void; //# sourceMappingURL=flags.d.ts.map