Overview

The Settings API allows you to manage various deployment-level settings, including authentication, display, B2B, and restrictions.

fetchDeploymentSettings()

Retrieves the current deployment settings.

Returns

Promise<DeploymentSettingsResponse>: A promise that resolves to the deployment settings object.

updateAuthenticationSettings(settings: AuthenticationSettings)

Updates the authentication settings for the deployment.

Parameters

  • settings (AuthenticationSettings): The authentication settings to update.

Returns

Promise<void>: A promise that resolves when the settings are successfully updated.

updateDisplaySettings(settings: DisplaySettings)

Updates the display settings for the deployment.

Parameters

  • settings (DisplaySettings): The display settings to update.

Returns

Promise<void>: A promise that resolves when the settings are successfully updated.

updateB2BSettings(settings: B2BSettings)

Updates the B2B settings for the deployment.

Parameters

  • settings (B2BSettings): The B2B settings to update.

Returns

Promise<void>: A promise that resolves when the settings are successfully updated.

updateDeploymentRestrictions(restrictions: DeploymentRestrictions)

Updates the deployment restrictions.

Parameters

  • restrictions (DeploymentRestrictions): The deployment restrictions to update.

Returns

Promise<void>: A promise that resolves when the restrictions are successfully updated.

fetchJwtTemplates()

Retrieves a list of JWT templates.

Returns

Promise<JwtTemplateListResponse>: A promise that resolves to a list of JWT templates.

createJwtTemplate(request: CreateJwtTemplateRequest)

Creates a new JWT template.

Parameters

  • request (CreateJwtTemplateRequest): The request body containing the details of the new JWT template.

Returns

Promise<JwtTemplate>: A promise that resolves to the newly created JWT template object.

updateJwtTemplate(templateId: string, request: UpdateJwtTemplateRequest)

Updates an existing JWT template.

Parameters

  • templateId (string): The unique identifier of the JWT template to update.
  • request (UpdateJwtTemplateRequest): The request body containing the updated details of the JWT template.

Returns

Promise<JwtTemplate>: A promise that resolves to the updated JWT template object.

deleteJwtTemplate(templateId: string)

Deletes a JWT template by its ID.

Parameters

  • templateId (string): The unique identifier of the JWT template to delete.

Returns

Promise<void>: A promise that resolves when the JWT template is successfully deleted.

fetchEmailTemplate(templateName: string)

Retrieves a specific email template by its name.

Parameters

  • templateName (string): The name of the email template.

Returns

Promise<EmailTemplate>: A promise that resolves to the email template object.

updateEmailTemplate(templateName: string, template: EmailTemplate)

Updates an existing email template.

Parameters

  • templateName (string): The name of the email template to update.
  • template (EmailTemplate): The email template object with updated content.

Returns

Promise<void>: A promise that resolves when the email template is successfully updated.

fetchSocialConnections()

Retrieves a list of social connections configured for the deployment.

Returns

Promise<SocialConnection[]>: A promise that resolves to a list of social connection objects.

upsertSocialConnection(connection: SocialConnection)

Creates or updates a social connection.

Parameters

  • connection (SocialConnection): The social connection object to create or update.

Returns

Promise<SocialConnection>: A promise that resolves to the created or updated social connection object.

uploadImage(imageType: string, fileContent: Uint8Array, fileName: string)

Uploads an image for use in the deployment (e.g., logo).

Parameters

  • imageType (string): The type of image being uploaded (e.g., ‘logo’).
  • fileContent (Uint8Array): The content of the image file.
  • fileName (string): The name of the image file.

Returns

Promise<ImageUploadResponse>: A promise that resolves to the image upload response, including the URL of the uploaded image.