Interfaces
The Netlify SDK provides the following TypeScript interfaces.
Account
Properties
Name | Type |
---|---|
id | string |
name | string |
slug | string |
BuildTokenValidationResponse
Properties
Name | Type |
---|---|
token | string |
site_id | string |
team_id | string |
ConnectorConfig
Properties
Name | Type | Description |
---|---|---|
supports | { key: boolean } | Specifies functionality that the connector supports. Possible keys are connect for Netlify Connect, visualEditor for Netlify Visual Editor, and deltaSync for cache settings. |
typePrefix | string | The prefix to use for all types defined by the connector. |
localDevOptions | { [key: string]: string | boolean | number } | undefined | Optional configuration options for local development. |
EdgeFunctionsOptions
Properties
Name | Type | Description |
---|---|---|
prefix | string | A prefix used to namespace edge functions. Helps to avoid conflicts between other edge functions in a user’s site. |
shouldInjectFunction | function | An optional function used to control whether or not a given function should be injected into a user’s site. |
EnvironmentVariable
Properties
Name | Type | Description |
---|---|---|
key | string | The name of the environment variable. |
scopes | EnvironmentVariableScopeType | The scopes for this environment variable. |
values | EnvironmentVariableValue[] | An array of values for this environment variable. |
EnvironmentVariableScope
Properties
Name | Type |
---|---|
All | "all" |
Build | "build" |
Functions | "functions" |
Post processing | "post-processing" |
Runtime | "runtime" |
EnvironmentVariableScopeType
Properties
Name | Type |
---|---|
"all" | "all" |
"build" | "build" |
"functions" | "functions" |
"post-processing" | "post-processing" |
"runtime" | "runtime" |
EnvironmentVariableValue
Properties
Name | Type | Description |
---|---|---|
value | string | The value of the environment variable. |
context_parameter | string | undefined | The name of the context parameter that this value is associated with, if any. |
context | DeployContextType | The deploy context for this value. |
EnvVarRequest
An EnvVarRequest
is either a string
or the following object:
FunctionsOptions
Properties
Name | Type | Description |
---|---|---|
prefix | string | A prefix used to namespace edge functions. Helps to avoid conflicts between other edge functions in a user’s site. |
shouldInjectFunction | function | An optional function used to control whether or not a given function should be injected into a user’s site. |
ExtensionResponse
Properties
Name | Type |
---|---|
config | Config |
has_build_hook_enabled | boolean |
Site
Properties
Name | Type |
---|---|
id | string |
name | string |
build_settings | { env: Record<string, string | undefined> } |
plugins | { package: string, pinned_version?: string }[] |