Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-packages/utils/lib/factory/ajax/commonUrlBuilder"

Index

Type aliases

RouteLocationInterface

RouteLocationInterface: WithOptional<IRouteLocationInterface, "method"> & { namespace?: string }

RouteParamsInterface

RouteParamsInterface: IRouteParamsInterface

RouteRequestInterface

RouteRequestInterface: IRouteRequestInterface

RouteResponseInterface

RouteResponseInterface: IRouteResponseInterface

Functions

applyQueryString

  • applyQueryString(url: URL, query: any, merge?: boolean): URL
  • Parameters

    • url: URL
    • query: any
    • Optional merge: boolean

    Returns URL

commonUrlBuilder

  • commonUrlBuilder(__namedParameters: { cookieValueAsParam: string[]; location: RouteLocationInterface; nonce: boolean; options: { restNamespace: BaseOptions["restNamespace"]; restNonce?: BaseOptions["restNonce"]; restQuery?: BaseOptions["restQuery"]; restRecreateNonceEndpoint?: BaseOptions["restRecreateNonceEndpoint"]; restRoot: BaseOptions["restRoot"] }; params: IRouteParamsInterface }): string
  • Build an URL for a specific scheme.

    Parameters

    • __namedParameters: { cookieValueAsParam: string[]; location: RouteLocationInterface; nonce: boolean; options: { restNamespace: BaseOptions["restNamespace"]; restNonce?: BaseOptions["restNonce"]; restQuery?: BaseOptions["restQuery"]; restRecreateNonceEndpoint?: BaseOptions["restRecreateNonceEndpoint"]; restRoot: BaseOptions["restRoot"] }; params: IRouteParamsInterface }
      • cookieValueAsParam: string[]
      • location: RouteLocationInterface
      • nonce: boolean
      • options: { restNamespace: BaseOptions["restNamespace"]; restNonce?: BaseOptions["restNonce"]; restQuery?: BaseOptions["restQuery"]; restRecreateNonceEndpoint?: BaseOptions["restRecreateNonceEndpoint"]; restRoot: BaseOptions["restRoot"] }
        • restNamespace: BaseOptions["restNamespace"]
        • Optional restNonce?: BaseOptions["restNonce"]
        • Optional restQuery?: BaseOptions["restQuery"]
        • Optional restRecreateNonceEndpoint?: BaseOptions["restRecreateNonceEndpoint"]
        • restRoot: BaseOptions["restRoot"]
      • params: IRouteParamsInterface

    Returns string

Generated using TypeDoc