All files / src base-types.ts

100% Statements 16/16
100% Branches 4/4
100% Functions 2/2
100% Lines 16/16

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40  24x 24x   24x 24x 24x 24x 24x 24x 24x   24x   24x 24x 24x 24x 24x 24x                                        
import {AuthScopes} from './auth/scopes';
import {SessionStorage} from './auth/session/session_storage';
import {BillingSettings} from './billing/types';
 
export interface ContextParams {
  API_KEY: string;
  API_SECRET_KEY: string;
  SCOPES: string[] | AuthScopes;
  HOST_NAME: string;
  HOST_SCHEME?: string;
  API_VERSION: ApiVersion;
  IS_EMBEDDED_APP: boolean;
  IS_PRIVATE_APP?: boolean;
  SESSION_STORAGE?: SessionStorage;
  LOG_FILE?: string;
  USER_AGENT_PREFIX?: string;
  PRIVATE_APP_STOREFRONT_ACCESS_TOKEN?: string;
  CUSTOM_SHOP_DOMAINS?: (RegExp | string)[];
  BILLING?: BillingSettings;
}
 
export enum ApiVersion {
  October21 = '2021-10',
  January22 = '2022-01',
  April22 = '2022-04',
  July22 = '2022-07',
  October22 = '2022-10',
  Unstable = 'unstable',
}
 
export const LATEST_API_VERSION = ApiVersion.October22;
 
export enum ShopifyHeader {
  AccessToken = 'X-Shopify-Access-Token',
  StorefrontAccessToken = 'X-Shopify-Storefront-Access-Token',
  Hmac = 'X-Shopify-Hmac-Sha256',
  Topic = 'X-Shopify-Topic',
  Domain = 'X-Shopify-Shop-Domain',
}