AbiirSkincare/Hydrogen/web/env.d.ts

45 lines
1.8 KiB
TypeScript

/// <reference types="vite/client" />
/// <reference types="react-router" />
/// <reference types="@shopify/oxygen-workers-types" />
/// <reference types="@shopify/hydrogen/react-router-types" />
// Enhance TypeScript's built-in typings.
import '@total-typescript/ts-reset';
declare global {
interface Env {
/**
* Extra origin(s) for CSP `media-src` / `connect-src` when media uses a host not already
* covered (Shopify CDNs + in-repo canonical ABiiR domains are merged in `entry.server.tsx`).
*/
PUBLIC_SHOP_MEDIA_ORIGIN?: string;
/**
* Admin API access token for the **same** shop as `PUBLIC_STORE_DOMAIN`.
* Create a Custom App in Shopify Admin → Settings → Apps → Develop apps,
* enable Admin API scopes: **`write_customers`** (and `read_customers` if you prefer).
* Never expose this to the client — use only in server loaders/actions.
*/
PRIVATE_SHOPIFY_ADMIN_ACCESS_TOKEN?: string;
SANITY_PROJECT_ID: string;
SANITY_DATASET: string;
/**
* Sanity write token (Editor / create). Server-only — never exposed to the client.
* Used for creating UGC (e.g. product reviews) from Hydrogen API routes.
*/
SANITY_API_WRITE_TOKEN?: string;
/** Optional; passed to @sanity/client apiVersion */
SANITY_API_VERSION?: string;
/**
* Instagram Graph API — long-lived token for the Instagram Business/Creator account
* linked to **@abiir_skincare**.
*
* - Feed tiles: typically `instagram_basic` (+ valid app review where required).
* - **Stories** (`/{ig-user-id}/stories`): also needs `pages_read_engagement`
* (@see Meta IG User Stories reference).
*/
INSTAGRAM_ACCESS_TOKEN?: string;
/** Instagram Business Account ID (numeric) for @abiir_skincare — not the @handle */
INSTAGRAM_USER_ID?: string;
}
}