The BaseClient class provides methods for interacting with API clients, handling sessions, and managing users.

Hierarchy (view full)

Constructors

  • Initializes the BaseClient with a session ID and access denied handler.

    Parameters

    • session: string

      The session ID.

    • OptionalonAccessDenied: (() => void | Promise<void>)

      A callback function when access is denied.

        • (): void | Promise<void>
        • Returns void | Promise<void>

    Returns BaseClient

Properties

client: DecoratedProcedureRecord<CreateRouterInner<RootConfig<{}>, {}>, {}>
sessionId: string

Methods

  • Parameters

    • __namedParameters: {
          backUrl: string;
      }
      • backUrl: string

    Returns Promise<null | string>

  • Logs out the current session by clearing session data and calling the API logout method.

    Parameters

    • OptionalsessionId: null | string

      The session ID to log out from (optional).

    Returns Promise<void>

    A promise that resolves when the operation is complete.

  • Parameters

    • search: string

    Returns Promise<{}[]>

  • Parameters

    • data: {}

      Returns Promise<Omit<{} & {} & {} & {}, "account">>

    • Creates a new instance of the API client.

      Parameters

      • Optionalsession: null | string

        The session ID, which can be null or undefined.

      • OptionalonAccessDenied: (() => void | Promise<void>)

        Callback function to execute when access is denied.

          • (): void | Promise<void>
          • Returns void | Promise<void>

      Returns DecoratedProcedureRecord<CreateRouterInner<RootConfig<{}>, {}>, {}>

      The API client.

    • Parameters

      • __namedParameters: {
            paymentRequestId: string;
            secrecyIdSeller: string;
        }
        • paymentRequestId: string
        • secrecyIdSeller: string

      Returns Promise<Record<string, unknown>>

    • Parameters

      • userId: string
      • OptionalsessionId: null | string

      Returns Promise<{}>

    • Parameters

      Returns Promise<boolean>