Represents a collection of methods for generating various types of links.

interface Links {
    CanImpersonate: ((customerObj: number | Customer) => string);
    ImpersonateLink: ((customerObj: number | Customer, redirectUrl?: string, logoutUrl?: string) => string);
    ImpersonateLinkAjax: ((customerObj: number | Customer, logoutUrl?: string) => string);
    MegaScriptLink: ((parameters: MegascriptLinkParam, additionalParameters: {}) => string);
}

Properties

CanImpersonate: ((customerObj: number | Customer) => string)

Checks if impersonation is allowed for a customer.

Type declaration

    • (customerObj): string
    • Parameters

      • customerObj: number | Customer

        Customer object or customer identifier to check.

      Returns string

      A string indicating the impersonation status.

ImpersonateLink: ((customerObj: number | Customer, redirectUrl?: string, logoutUrl?: string) => string)

Generates an impersonation link for a customer.

Type declaration

    • (customerObj, redirectUrl?, logoutUrl?): string
    • Parameters

      • customerObj: number | Customer

        Customer object or customer identifier for impersonation.

      • OptionalredirectUrl: string

        Optional URL to redirect after impersonation.

      • OptionallogoutUrl: string

        Optional URL to redirect for logout after impersonation.

      Returns string

      A string representing the generated impersonation link.

ImpersonateLinkAjax: ((customerObj: number | Customer, logoutUrl?: string) => string)

Generates an AJAX impersonation link for a customer.

Type declaration

    • (customerObj, logoutUrl?): string
    • Parameters

      • customerObj: number | Customer

        Customer object or customer identifier for impersonation.

      • OptionallogoutUrl: string

        Optional URL to redirect for logout after impersonation.

      Returns string

      A string representing the generated AJAX impersonation link.

MegaScriptLink: ((parameters: MegascriptLinkParam, additionalParameters: {}) => string)

Generates a link for a Megascript instance.

Type declaration

    • (parameters, additionalParameters): string
    • Parameters

      • parameters: MegascriptLinkParam

        Parameters for generating the Megascript link.

      • additionalParameters: {}

        Additional parameters for the Megascript link.

        Returns string

        A string representing the generated Megascript link.