Hierarchy

  • EventEmitter
    • TwilioServerlessApiClient

Constructors

Properties

captureRejectionSymbol: typeof captureRejectionSymbol
captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

defaultMaxListeners: number
errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Methods

  • "Activates" a build by taking a specified build SID or a "source environment" and activating the same build in the specified environment.

    Can optionally create the new environment when called with activateConfig.createEnvironment

    Returns

    Promise Object containing meta information around deployment

    Parameters

    • activateConfig: ActivateConfig

      Config to specify which build to activate in which environment

    Returns Promise<ActivateResult>

  • Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TwilioServerlessApiClient

  • Deploys a local project by reading existing functions and assets from deployConfig.cwd and calling this.deployProject with it.

    Functions have to be placed in a functions or src directory to be found. Assets have to be placed into an assets or static directory.

    Nested folder structures will result in nested routes.

    Returns

    Promise Object containing meta information around deployment

    Parameters

    Returns Promise<DeployResult>

  • Deploys a set of functions, assets, variables and dependencies specified in deployConfig. Functions & assets can either be paths to the local filesystem or Buffer instances allowing you to dynamically upload even without a file system.

    Unless a deployConfig. serviceSid is specified, it will try to create one. If a service with the name deployConfig.serviceName already exists, it will throw an error. You can make it use the existing service by setting overrideExistingService to true.

    Updates to the deployment will be emitted as events to status-update. Example:

    client.on('status-update', ({ status, message }) => {
    console.log('[%s]: %s', status, message);
    })

    Returns

    Promise Object containing meta information around deployment

    Parameters

    Returns Promise<DeployResult>

  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

  • Returns (string | symbol)[]

  • Returns number

  • Returns an object containing lists of services, environments, variables functions or assets, depending on which have beeen requested in listConfig

    Returns

    Promise Object containing the different lists.

    Parameters

    • listConfig: ListConfig

      Specifies info around which things should be listed

    Returns Promise<ListResult>

  • Parameters

    • event: string | symbol

    Returns number

  • Parameters

    • event: string | symbol

    Returns Function[]

  • Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TwilioServerlessApiClient

  • Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TwilioServerlessApiClient

  • Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TwilioServerlessApiClient

  • Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TwilioServerlessApiClient

  • Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TwilioServerlessApiClient

  • Parameters

    • event: string | symbol

    Returns Function[]

  • Parameters

    • Optional event: string | symbol

    Returns TwilioServerlessApiClient

  • Parameters

    • event: string | symbol
    • listener: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns TwilioServerlessApiClient

  • Parameters

    • method: HTTPAlias
    • path: string

    Returns Promise<Response<unknown>>

  • Parameters

    • method: HTTPAlias
    • path: string
    • options: OptionsOfJSONResponseBody

    Returns Promise<Response<unknown>>

  • Parameters

    • method: HTTPAlias
    • path: string
    • options: OptionsOfTextResponseBody

    Returns Promise<Response<string>>

  • Deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>

Generated using TypeDoc