Skip to content

NetlifyExtensionClient

The NetlifyExtensionClient provides different methods to interact with both the Netlify API and the Extension API.

When you install the Netlify SDK, you have access to the TypeScript definitions directly in the @netlify/sdk package. You can browse through the definition files individually or review the type definition inline, depending on your code editor.

Example

import { withNetlifySDKContext } from "@netlify/sdk/ui/functions";
export default withNetlifySDKContext((req, context) => {
const { accountId, auth, client } = context;
const accountInfo = await client.getAccount(accountId);
// Using the user’s OAuth connection to make a request to a third-party API
await fetch("https://api.example.com/project", {
headers: {
Authorization: `Bearer ${auth.providerToken}`,
},
method: "POST",
body: JSON.stringify({
name: `project_${accountInfo.name}`,
}),
});
return Response.json({});
});

Extends

  • NetlifyClient

Type Parameters

Type Parameter
SiteConfiguration
TeamConfiguration
ConnectorConfiguration

Constructors

new NetlifyExtensionClient()

new NetlifyExtensionClient<SiteConfiguration, TeamConfiguration, ConnectorConfiguration>(netlifyToken, extension, __namedParameters): NetlifyExtensionClient<SiteConfiguration, TeamConfiguration, ConnectorConfiguration>

Parameters

ParameterType
netlifyTokenstring
extensionstring
__namedParametersExtensionClientOptions

Returns

NetlifyExtensionClient<SiteConfiguration, TeamConfiguration, ConnectorConfiguration>

Overrides

NetlifyClient.constructor

Properties

PropertyTypeInherited from
apiKeystringNetlifyClient.apiKey
extensionstring-
extensionApiWretch<unknown, unknown, undefined>-
netlifyToken?string-
siteConfigId?string-
teamConfigId?string-
wretchWretch<unknown, unknown, undefined>NetlifyClient.wretch

Methods

cancelSiteDeploy()

cancelSiteDeploy(deployId): Promise<object>

Cancels an in-progress deployment.

Parameters

ParameterType
deployIdstring

Returns

Promise<object>

NameType
adminUrlstring
availableFunctionsstring[]
branchstring
buildIdstring
commitMessagestring
commitRefstring
commitUrlstring
committerstring
context"production" | "branch-deploy" | "deploy-preview"
createdAtstring
deploySslUrlstring
deployTimenumber
deployUrlstring
edgeFunctionsPresentundefined | boolean
entryPathstring
errorMessagestring
expiresAtundefined | string
frameworkstring
functionSchedulesobject[]
idstring
lockedboolean
manualDeployboolean
namestring
pluginState"success" | "canceled_build" | "failed_plugin" | "failed_build" | "skipped" | "none"
publishedAtstring
requiredstring[]
requiredFunctionsstring[]
reviewIdnumber
reviewUrlstring
screenshotUrlstring
siteIdstring
skippedboolean
skippedLogboolean
sslUrlstring
state"new" | "pending_review" | "accepted" | "rejected" | "enqueued" | "building" | "uploading" | "uploaded" | "preparing" | "prepared" | "processing" | "ready" | "error" | "retrying"
summaryobject
summary.messagesundefined | object[]
summary.statusundefined | string
titlestring
updatedAtstring
urlstring
userIdstring
viewsCountnumber

Inherited from

NetlifyClient.cancelSiteDeploy


createBuildHook()

createBuildHook(siteId, buildHook): Promise<BuildHookResponse>

Creates a new build hook for a site.

Parameters

ParameterType
siteIdstring
buildHookBuildHookInput

Returns

Promise<BuildHookResponse>

Inherited from

NetlifyClient.createBuildHook


createConnectConfiguration()

createConnectConfiguration(__namedParameters): Promise<WretchResponse>

Creates a Connect configuration for an extension installation.

Parameters

ParameterType
__namedParametersobject
__namedParameters.configConnectorConfiguration
__namedParameters.dataLayerIdstring
__namedParameters.namestring
__namedParameters.prefix?string
__namedParameters.teamIdstring

Returns

Promise<WretchResponse>


createEnvironmentVariable()

createEnvironmentVariable(__namedParameters): Promise<EnvironmentVariable>

Creates a new environment variable for a site.

Parameters

ParameterType
__namedParametersobject
__namedParameters.accountIdstring
__namedParameters.isSecret?boolean
__namedParameters.keystring
__namedParameters.scopes?EnvironmentVariableScopeType[]
__namedParameters.siteIdstring
__namedParameters.valuesEnvironmentVariableValue[]

Returns

Promise<EnvironmentVariable>

Inherited from

NetlifyClient.createEnvironmentVariable


createHook()

createHook(CreateHookRequest): Promise<CreateHookResponse>

Parameters

ParameterType
CreateHookRequestCreateHookRequest

Returns

Promise<CreateHookResponse>

Inherited from

NetlifyClient.createHook


createHookBySiteId()

createHookBySiteId(siteId, input): Promise<object>

Creates a webhook for the given site.

Parameters

ParameterType
siteIdstring
inputCreateHookBySiteIdInput

Returns

Promise<object>

NameType
actorstring
createdAtstring
dataobject
disabledboolean
eventstring
formIdstring
formNamestring
idstring
restrictedboolean
siteIdstring
successboolean
typestring
updatedAtstring
userIdstring

Inherited from

NetlifyClient.createHookBySiteId


createOrUpdateVariable()

createOrUpdateVariable(__namedParameters): Promise<void>

Creates or updates a single environment variable for a site when passed a siteId. When not passed a siteId, operates on the team level.

Parameters

ParameterType
__namedParametersobject
__namedParameters.accountIdstring
__namedParameters.isSecret?boolean
__namedParameters.keystring
__namedParameters.scopes?EnvironmentVariableScopeType[]
__namedParameters.siteId?string
__namedParameters.valueEnvVarRequest

Returns

Promise<void>

Inherited from

NetlifyClient.createOrUpdateVariable


createOrUpdateVariables()

createOrUpdateVariables(__namedParameters): Promise<void>

Creates or updates all environment variables in the variables object for a site when passed a siteId. When not passed a siteId, operates on the team level.

Parameters

ParameterType
__namedParametersobject
__namedParameters.accountIdstring
__namedParameters.isSecret?boolean
__namedParameters.scopes?EnvironmentVariableScopeType[]
__namedParameters.siteId?string
__namedParameters.variablesRecord<string, EnvVarRequest>

Returns

Promise<void>

Inherited from

NetlifyClient.createOrUpdateVariables


createSiteBuildHook()

createSiteBuildHook(siteId, input): Promise<object>

Creates a new build hook for a site.

Parameters

ParameterType
siteIdstring
inputCreateSiteBuildHookInput

Returns

Promise<object>

NameType
branchstring
createdAtstring
draftboolean
idstring
msgstring
siteIdstring
titlestring
urlstring

Inherited from

NetlifyClient.createSiteBuildHook


createSiteConfiguration()

createSiteConfiguration(teamId, siteId, config): Promise<WretchResponse>

Creates a site configuration for an extension installation.

Parameters

ParameterType
teamIdstring
siteIdstring
configSiteConfiguration

Returns

Promise<WretchResponse>


createSiteDeploy()

createSiteDeploy(siteId, input): Promise<object>

Creates a new deployment for a site.

Parameters

ParameterType
siteIdstring
inputCreateSiteDeployInput

Returns

Promise<object>

NameType
adminUrlstring
availableFunctionsstring[]
branchstring
buildIdstring
commitMessagestring
commitRefstring
commitUrlstring
committerstring
context"production" | "branch-deploy" | "deploy-preview"
createdAtstring
deploySslUrlstring
deployTimenumber
deployUrlstring
edgeFunctionsPresentundefined | boolean
entryPathstring
errorMessagestring
expiresAtundefined | string
frameworkstring
functionSchedulesobject[]
idstring
lockedboolean
manualDeployboolean
namestring
pluginState"success" | "canceled_build" | "failed_plugin" | "failed_build" | "skipped" | "none"
publishedAtstring
requiredstring[]
requiredFunctionsstring[]
reviewIdnumber
reviewUrlstring
screenshotUrlstring
siteIdstring
skippedboolean
skippedLogboolean
sslUrlstring
state"new" | "pending_review" | "accepted" | "rejected" | "enqueued" | "building" | "uploading" | "uploaded" | "preparing" | "prepared" | "processing" | "ready" | "error" | "retrying"
summaryobject
summary.messagesundefined | object[]
summary.statusundefined | string
titlestring
updatedAtstring
urlstring
userIdstring
viewsCountnumber

Inherited from

NetlifyClient.createSiteDeploy


createSiteLogDrain()

createSiteLogDrain(siteId, input): Promise<object>

Creates a log drain for a site.

Parameters

ParameterType
siteIdstring
inputCreateSiteLogDrainInput

Returns

Promise<object>

NameType
destinationstring
excludePiiundefined | boolean
format"json" | "ndjson"
idstring
logTypesstring
serviceConfigobject
serviceConfig.urlstring
siteIdstring

Inherited from

NetlifyClient.createSiteLogDrain


createTeamConfiguration()

createTeamConfiguration(teamId, config): Promise<WretchResponse>

Creates a team configuration for an extension installation.

Parameters

ParameterType
teamIdstring
configTeamConfiguration

Returns

Promise<WretchResponse>


createVisualEditorConfiguration()

createVisualEditorConfiguration(__namedParameters): Promise<WretchResponse>

Creates a visual editor configuration for an extension installation.

Parameters

ParameterType
__namedParametersobject
__namedParameters.configConnectorConfiguration
__namedParameters.namestring
__namedParameters.notifyVisualEditor?boolean
__namedParameters.prefixstring
__namedParameters.projectIdstring
__namedParameters.siteIdstring
__namedParameters.teamIdstring

Returns

Promise<WretchResponse>


deleteBuildHook()

deleteBuildHook(siteId, buildHookId): Promise<BuildHookResponse>

Deletes a build hook for a site.

Parameters

ParameterType
siteIdstring
buildHookIdstring

Returns

Promise<BuildHookResponse>

Inherited from

NetlifyClient.deleteBuildHook


deleteConnectConfiguration()

deleteConnectConfiguration(__namedParameters): Promise<WretchResponse>

Deletes a Connect configuration for uninstalling the extension.

Parameters

ParameterType
__namedParametersobject
__namedParameters.configurationIdstring
__namedParameters.dataLayerIdstring
__namedParameters.teamIdstring

Returns

Promise<WretchResponse>


deleteDeploy()

deleteDeploy(deployId): Promise<void>

Deletes a deployment.

Parameters

ParameterType
deployIdstring

Returns

Promise<void>

Inherited from

NetlifyClient.deleteDeploy


deleteEnvironmentVariable()

deleteEnvironmentVariable(__namedParameters): Promise<WretchResponse>

Deletes an environment variable for a site when passed a siteId. When not passed a siteId, operates on the team level.

Parameters

ParameterType
__namedParametersobject
__namedParameters.accountIdstring
__namedParameters.keystring
__namedParameters.siteId?string

Returns

Promise<WretchResponse>

Inherited from

NetlifyClient.deleteEnvironmentVariable


deleteEnvironmentVariables()

deleteEnvironmentVariables(__namedParameters): Promise<void>

Deletes all environment variables specified in the variables array for a site when passed a siteId. When not passed a siteId, operates on the team level.

Parameters

ParameterType
__namedParametersobject
__namedParameters.accountIdstring
__namedParameters.siteId?string
__namedParameters.variablesstring[]

Returns

Promise<void>

Inherited from

NetlifyClient.deleteEnvironmentVariables


deleteHook()

deleteHook(hookId): Promise<void>

Deletes the given webhook.

Parameters

ParameterType
hookIdstring

Returns

Promise<void>

Inherited from

NetlifyClient.deleteHook


deleteSiteBuildHook()

deleteSiteBuildHook(siteId, buildHookId): Promise<void>

Deletes a build hook by site ID and build hook ID.

Parameters

ParameterType
siteIdstring
buildHookIdstring

Returns

Promise<void>

Inherited from

NetlifyClient.deleteSiteBuildHook


deleteSiteConfiguration()

deleteSiteConfiguration(teamId, siteId): Promise<WretchResponse>

Deletes a site configuration for uninstalling the extension.

Parameters

ParameterType
teamIdstring
siteIdstring

Returns

Promise<WretchResponse>


deleteSiteForm()

deleteSiteForm(siteId, formId): Promise<void>

Deletes a form.

Parameters

ParameterType
siteIdstring
formIdstring

Returns

Promise<void>

Inherited from

NetlifyClient.deleteSiteForm


deleteSiteLogDrain()

deleteSiteLogDrain(siteId, logDrainId): Promise<void>

Deletes a log drain for a site.

Parameters

ParameterType
siteIdstring
logDrainIdstring

Returns

Promise<void>

Inherited from

NetlifyClient.deleteSiteLogDrain


deleteTeamConfiguration()

deleteTeamConfiguration(teamId): Promise<WretchResponse>

Deletes a team configuration for uninstalling the extension.

Parameters

ParameterType
teamIdstring

Returns

Promise<WretchResponse>


deleteVisualEditorConfiguration()

deleteVisualEditorConfiguration(__namedParameters): Promise<WretchResponse>

Deletes a visual editor configuration for uninstalling the extension.

Parameters

ParameterType
__namedParametersobject
__namedParameters.configurationIdstring
__namedParameters.projectIdstring
__namedParameters.siteIdstring
__namedParameters.teamIdstring

Returns

Promise<WretchResponse>


exchangeBuildToken()

exchangeBuildToken(siteId, teamId): Promise<BuildTokenValidationResponse>

Validates a build token, returning the siteId and teamId if the token is valid and returning an error if the token is invalid.

Parameters

ParameterType
siteIdstring
teamIdstring

Returns

Promise<BuildTokenValidationResponse>


generateBuildToken()

generateBuildToken(siteId, teamId): Promise<object>

Generates a build token for a site, allowing a build hook to use the Build Context API.

Parameters

ParameterType
siteIdstring
teamIdstring

Returns

Promise<object>

NameType
tokenstring

getAccount()

getAccount(accountId): Promise<Account>

Gets an account by ID and returns account information.

Parameters

ParameterType
accountIdstring

Returns

Promise<Account>

Inherited from

NetlifyClient.getAccount


getBlobStore()

getBlobStore(siteId, storeName): Store

Returns a configured @netlify/blobs#Blobs client for the given site and blob store name.

Parameters

ParameterType
siteIdstring
storeNamestring

Returns

Store

See

The @netlify/blobs package

Inherited from

NetlifyClient.getBlobStore


getConnectConfiguration()

getConnectConfiguration(__namedParameters): Promise<null | ConfigurationResponse<ConnectorConfiguration>>

Gets a Connect configuration by the specified team ID, data layer ID, and configuration ID.

Parameters

ParameterType
__namedParametersobject
__namedParameters.configurationIdstring
__namedParameters.dataLayerIdstring
__namedParameters.teamIdstring

Returns

Promise<null | ConfigurationResponse<ConnectorConfiguration>>


getCurrentUser()

getCurrentUser(): Promise<null | User>

getCurrentUser retrieves information about the current authenticated user. If the request is not authenticated, returns null.

Returns

Promise<null | User>

Inherited from

NetlifyClient.getCurrentUser


getDeploy()

getDeploy(deployId): Promise<null | object>

Retrieves a deployment.

Parameters

ParameterType
deployIdstring

Returns

Promise<null | object>

Inherited from

NetlifyClient.getDeploy


getDnsForSite()

getDnsForSite(siteId): Promise<object[]>

Lists a site’s DNS records

Parameters

ParameterType
siteIdstring

Returns

Promise<object[]>

Inherited from

NetlifyClient.getDnsForSite


getEnvironmentVariables()

getEnvironmentVariables(__namedParameters): Promise<EnvironmentVariable[]>

Gets all environment variables for a site when passed a siteId. When not passed a siteId, operates on the team level.

Parameters

ParameterType
__namedParametersobject
__namedParameters.accountIdstring
__namedParameters.siteId?string

Returns

Promise<EnvironmentVariable[]>

Inherited from

NetlifyClient.getEnvironmentVariables


getHook()

getHook(hookId): Promise<null | object>

Retrieves a webhook by ID. Returns null if the webhook does not exist.

Parameters

ParameterType
hookIdstring

Returns

Promise<null | object>

Inherited from

NetlifyClient.getHook


getSite()

getSite(siteId): Promise<Site>

Gets a site by ID and returns site information.

Parameters

ParameterType
siteIdstring

Returns

Promise<Site>

Inherited from

NetlifyClient.getSite


getSiteBuild()

getSiteBuild(buildId): Promise<null | object>

getSiteBuild retrieves a site build by ID.

Returns null when no build is found for the given ID.

Parameters

ParameterType
buildIdstring

Returns

Promise<null | object>

Inherited from

NetlifyClient.getSiteBuild


getSiteBuildHook()

getSiteBuildHook(siteId, buildHookId): Promise<null | object>

Retrieves a build hook by site ID and build hook ID.

Parameters

ParameterType
siteIdstring
buildHookIdstring

Returns

Promise<null | object>

Inherited from

NetlifyClient.getSiteBuildHook


getSiteConfiguration()

getSiteConfiguration(teamId, siteId): Promise<null | ConfigurationResponse<SiteConfiguration>>

Returns the extension configuration for a site for the current extension.

Parameters

ParameterType
teamIdstring
siteIdstring

Returns

Promise<null | ConfigurationResponse<SiteConfiguration>>


getSiteForm()

getSiteForm(siteId, formId): Promise<null | object>

Gets a form.

Parameters

ParameterType
siteIdstring
formIdstring

Returns

Promise<null | object>

Inherited from

NetlifyClient.getSiteForm


getSiteLogDrain()

getSiteLogDrain(siteId, logDrainId): Promise<null | object>

Gets a log drain for a site.

Parameters

ParameterType
siteIdstring
logDrainIdstring

Returns

Promise<null | object>

Inherited from

NetlifyClient.getSiteLogDrain


getSites()

getSites(): Promise<Site[]>

Gets all sites for an account.

Returns

Promise<Site[]>

Inherited from

NetlifyClient.getSites


getTeamConfiguration()

getTeamConfiguration(teamId): Promise<null | ConfigurationResponse<TeamConfiguration>>

Returns the extension configuration for a team for the current extension.

Parameters

ParameterType
teamIdstring

Returns

Promise<null | ConfigurationResponse<TeamConfiguration>>


getVisualEditorConfiguration()

getVisualEditorConfiguration(__namedParameters): Promise<null | ConfigurationResponse<ConnectorConfiguration>>

Gets a visual editor configuration by the specified team ID, data layer ID, and configuration ID.

Parameters

ParameterType
__namedParametersobject
__namedParameters.configurationIdstring
__namedParameters.siteIdstring
__namedParameters.teamIdstring

Returns

Promise<null | ConfigurationResponse<ConnectorConfiguration>>


installExtensionOnTeam()

installExtensionOnTeam(teamId, hasDataIntegration): Promise<object>

Installs this extension for a team.

Parameters

ParameterTypeDefault value
teamIdstringundefined
hasDataIntegrationbooleanfalse

Returns

Promise<object>

NameType
tokenstring

listHooksBySiteId()

listHooksBySiteId(siteId): Promise<object[]>

Retrieves a list of webhooks for the given site.

Parameters

ParameterType
siteIdstring

Returns

Promise<object[]>

Inherited from

NetlifyClient.listHooksBySiteId


listSiteBuildHooks()

listSiteBuildHooks(siteId): Promise<object[]>

Lists all build hooks for a site.

Parameters

ParameterType
siteIdstring

Returns

Promise<object[]>

Inherited from

NetlifyClient.listSiteBuildHooks


listSiteConfigurations()

listSiteConfigurations(teamId): Promise<ConfigurationResponse<SiteConfiguration>[]>

List all site configurations for the specified team.

Parameters

ParameterType
teamIdstring

Returns

Promise<ConfigurationResponse<SiteConfiguration>[]>


listSiteDeploys()

listSiteDeploys(siteId): Promise<object[]>

Lists deployments for a site.

Parameters

ParameterType
siteIdstring

Returns

Promise<object[]>

Inherited from

NetlifyClient.listSiteDeploys


listSiteForms()

listSiteForms(siteId): Promise<object[]>

Lists forms for a site.

Parameters

ParameterType
siteIdstring

Returns

Promise<object[]>

Inherited from

NetlifyClient.listSiteForms


listSiteLogDrains()

listSiteLogDrains(siteId): Promise<object[]>

Lists a site’s log drains.

Parameters

ParameterType
siteIdstring

Returns

Promise<object[]>

Inherited from

NetlifyClient.listSiteLogDrains


lockDeploy()

lockDeploy(deployId): Promise<void>

Locks an existing deployment.

Parameters

ParameterType
deployIdstring

Returns

Promise<void>

Inherited from

NetlifyClient.lockDeploy


patchEnvironmentVariable()

patchEnvironmentVariable(__namedParameters): Promise<EnvironmentVariable>

Creates or updates an environment variable for a site when passed a siteId. When not passed a siteId, operates on the team level.

Parameters

ParameterType
__namedParametersobject
__namedParameters.accountIdstring
__namedParameters.contextstring
__namedParameters.contextParameter?string
__namedParameters.keystring
__namedParameters.siteId?string
__namedParameters.valuestring

Returns

Promise<EnvironmentVariable>

Inherited from

NetlifyClient.patchEnvironmentVariable


purgeCache()

purgeCache(siteId, cacheTags): Promise<void>

purgeCache purges cached content from Netlify’s CDN. Supports purging by Cache-Tag.

Parameters

ParameterType
siteIdstring
cacheTagsstring[]

Returns

Promise<void>

Inherited from

NetlifyClient.purgeCache


redeploySite()

redeploySite(__namedParameters): Promise<RedeploySiteResponse>

Redeploys a site by triggering a new build. A ‘branch’ can be specified to build a specific branch. If none are specified, the default branch will be built.

Parameters

ParameterType
__namedParametersobject
__namedParameters.branch?string
__namedParameters.siteIdstring

Returns

Promise<RedeploySiteResponse>

Inherited from

NetlifyClient.redeploySite


removeBuildToken()

removeBuildToken(accountId, siteId): Promise<void>

Removes the build token for a site.

Parameters

ParameterType
accountIdstring
siteIdstring

Returns

Promise<void>


restoreSiteDeploy()

restoreSiteDeploy(siteId, deployId): Promise<object>

Restores a site to the specified deployment.

Parameters

ParameterType
siteIdstring
deployIdstring

Returns

Promise<object>

NameType
adminUrlstring
availableFunctionsstring[]
branchstring
buildIdstring
commitMessagestring
commitRefstring
commitUrlstring
committerstring
context"production" | "branch-deploy" | "deploy-preview"
createdAtstring
deploySslUrlstring
deployTimenumber
deployUrlstring
edgeFunctionsPresentundefined | boolean
entryPathstring
errorMessagestring
expiresAtundefined | string
frameworkstring
functionSchedulesobject[]
idstring
lockedboolean
manualDeployboolean
namestring
pluginState"success" | "canceled_build" | "failed_plugin" | "failed_build" | "skipped" | "none"
publishedAtstring
requiredstring[]
requiredFunctionsstring[]
reviewIdnumber
reviewUrlstring
screenshotUrlstring
siteIdstring
skippedboolean
skippedLogboolean
sslUrlstring
state"new" | "pending_review" | "accepted" | "rejected" | "enqueued" | "building" | "uploading" | "uploaded" | "preparing" | "prepared" | "processing" | "ready" | "error" | "retrying"
summaryobject
summary.messagesundefined | object[]
summary.statusundefined | string
titlestring
updatedAtstring
urlstring
userIdstring
viewsCountnumber

Inherited from

NetlifyClient.restoreSiteDeploy


rollbackSiteDeploy()

rollbackSiteDeploy(siteId): Promise<void>

Initiates a deployment rollback for the site, restoring the site to its previous deployment.

Parameters

ParameterType
siteIdstring

Returns

Promise<void>

Inherited from

NetlifyClient.rollbackSiteDeploy


setBuildToken()

setBuildToken(accountId, siteId, token): Promise<void>

Sets the build token for a site. Build tokens can be created using the generateBuildToken method.

Parameters

ParameterType
accountIdstring
siteIdstring
tokenstring

Returns

Promise<void>


uninstallExtensionOnTeam()

uninstallExtensionOnTeam(teamId): Promise<WretchResponse>

Uninstalls this extension for a team, which also deletes the configuration.

Parameters

ParameterType
teamIdstring

Returns

Promise<WretchResponse>


unlockDeploy()

unlockDeploy(deployId): Promise<void>

Unlocks a locked deployment.

Parameters

ParameterType
deployIdstring

Returns

Promise<void>

Inherited from

NetlifyClient.unlockDeploy


updateConnectConfiguration()

updateConnectConfiguration(__namedParameters): Promise<WretchResponse>

Updates a Connect configuration, based on the specified configuration ID.

Parameters

ParameterType
__namedParametersobject
__namedParameters.configConnectorConfiguration
__namedParameters.configurationIdstring
__namedParameters.dataLayerIdstring
__namedParameters.namestring
__namedParameters.prefix?string
__namedParameters.teamIdstring

Returns

Promise<WretchResponse>


updateEnvironmentVariable()

updateEnvironmentVariable(__namedParameters): Promise<EnvironmentVariable>

Updates an existing environment variable for a site when passed a siteId. When not passed a siteId, operates on the team level.

Parameters

ParameterType
__namedParametersobject
__namedParameters.accountIdstring
__namedParameters.isSecret?boolean
__namedParameters.keystring
__namedParameters.scopes?EnvironmentVariableScopeType[]
__namedParameters.siteId?string
__namedParameters.valuesEnvironmentVariableValue[]

Returns

Promise<EnvironmentVariable>

Inherited from

NetlifyClient.updateEnvironmentVariable


updateHook()

updateHook(hookId, input): Promise<object>

Updates a webhook by ID. Returns the updated webhook.

Parameters

ParameterType
hookIdstring
inputUpdateHookInput

Returns

Promise<object>

NameType
actorstring
createdAtstring
dataobject
disabledboolean
eventstring
formIdstring
formNamestring
idstring
restrictedboolean
siteIdstring
successboolean
typestring
updatedAtstring
userIdstring

Inherited from

NetlifyClient.updateHook


updateSite()

updateSite(siteId, changes): Promise<Site>

Updates a site with the given changes.

Parameters

ParameterType
siteIdstring
changesPartial<Site>

Returns

Promise<Site>

Inherited from

NetlifyClient.updateSite


updateSiteBuildHook()

updateSiteBuildHook(siteId, buildHookId, input): Promise<object>

Updates a build hook by site ID and build hook ID.

Parameters

ParameterType
siteIdstring
buildHookIdstring
inputUpdateSiteBuildHookInput

Returns

Promise<object>

NameType
branchstring
createdAtstring
draftboolean
idstring
msgstring
siteIdstring
titlestring
urlstring

Inherited from

NetlifyClient.updateSiteBuildHook


updateSiteConfiguration()

updateSiteConfiguration(teamId, siteId, config): Promise<WretchResponse>

Updates the extension configuration for a site.

Parameters

ParameterType
teamIdstring
siteIdstring
configSiteConfiguration

Returns

Promise<WretchResponse>


updateSiteLogDrain()

updateSiteLogDrain(siteId, logDrainId, input): Promise<object>

Updates a log drain for a site.

Parameters

ParameterType
siteIdstring
logDrainIdstring
inputCreateSiteLogDrainInput

Returns

Promise<object>

NameType
destinationstring
excludePiiundefined | boolean
format"json" | "ndjson"
idstring
logTypesstring
serviceConfigobject
serviceConfig.urlstring
siteIdstring

Inherited from

NetlifyClient.updateSiteLogDrain


updateTeamConfiguration()

updateTeamConfiguration(teamId, config): Promise<WretchResponse>

Updates the extension configuration for a team.

Parameters

ParameterType
teamIdstring
configTeamConfiguration

Returns

Promise<WretchResponse>


updateVisualEditorConfiguration()

updateVisualEditorConfiguration(__namedParameters): Promise<WretchResponse>

Updates a visual editor configuration, based on the specified configuration ID.

Parameters

ParameterType
__namedParametersobject
__namedParameters.configConnectorConfiguration
__namedParameters.configurationIdstring
__namedParameters.namestring
__namedParameters.notifyVisualEditor?boolean
__namedParameters.prefixstring
__namedParameters.projectIdstring
__namedParameters.siteIdstring
__namedParameters.teamIdstring

Returns

Promise<WretchResponse>


upsertSiteConfiguration()

upsertSiteConfiguration(teamId, siteId, config): Promise<WretchResponse>

Upserts a configuration object of type ‘site’ for the extension installation

Parameters

ParameterType
teamIdstring
siteIdstring
configSiteConfiguration

Returns

Promise<WretchResponse>


upsertTeamConfiguration()

upsertTeamConfiguration(teamId, config): Promise<WretchResponse>

Upserts a configuration object of type ‘team’ for the extension installation

Parameters

ParameterType
teamIdstring
configTeamConfiguration

Returns

Promise<WretchResponse>