generated from sanity-io/hydrogen-sanity-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremix.env.d.ts
46 lines (42 loc) · 1.33 KB
/
remix.env.d.ts
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
41
42
43
44
45
46
/// <reference types="@remix-run/dev" />
/// <reference types="@shopify/remix-oxygen" />
/// <reference types="@shopify/oxygen-workers-types" />
import type { Storefront } from '~/types/shopify'
import type { HydrogenSession } from '../server'
import type { PreviewSession, Sanity } from 'hydrogen-sanity'
import type { Cache, HydrogenCart } from '@shopify/hydrogen'
declare global {
/**
* A global `process` object is only available during build to access NODE_ENV.
*/
const process: { env: { NODE_ENV: 'production' | 'development' } }
/**
* Declare expected Env parameter in fetch handler.
*/
interface Env {
SESSION_SECRET: string
PUBLIC_STOREFRONT_API_TOKEN: string
PRIVATE_STOREFRONT_API_TOKEN: string
PUBLIC_STOREFRONT_API_VERSION: string
PUBLIC_STORE_DOMAIN: string
PUBLIC_STOREFRONT_ID: string
SANITY_PROJECT_ID: string
SANITY_DATASET: string
SANITY_API_VERSION: string
SANITY_API_TOKEN: string
SANITY_PREVIEW_SECRET: string
}
}
/**
* Declare local additions to `AppLoadContext` to include the session utilities we injected in `server.ts`.
*/
declare module '@shopify/remix-oxygen' {
export interface AppLoadContext {
session: HydrogenSession
waitUntil: ExecutionContext['waitUntil']
storefront: Storefront
cart: HydrogenCart
env: Env
sanity: Sanity
}
}