# SupabaseRealtimeClient | @supabase/supabase-js
Documentation for @supabase/supabase-js

### Hierarchy

- SupabaseRealtimeClient

## Index

### Constructors

- constructor

### Properties

- subscription

### Methods

- getPayloadRecords
- on
- subscribe

## Constructors

### constructor

- new SupabaseRealtimeClient(socket: RealtimeClient, headers: GenericObject, schema: string, tableName: string): SupabaseRealtimeClient

- - Defined in src/lib/SupabaseRealtimeClient.ts:7

  #### Parameters

  - ##### socket: RealtimeClient

  - ##### headers: GenericObject

  - ##### schema: string

  - ##### tableName: string

  #### Returns SupabaseRealtimeClient

## Properties

### subscription

subscription: RealtimeSubscription

- Defined in src/lib/SupabaseRealtimeClient.ts:5

## Methods

### Private getPayloadRecords

- getPayloadRecords(payload: any): { new: {}; old: {} }

- - Defined in src/lib/SupabaseRealtimeClient.ts:19

  #### Parameters

  - ##### payload: any

  #### Returns { new: {}; old: {} }

  - ##### new: {}

  - ##### old: {}

### on

- on(event: SupabaseEventTypes, callback: ((payload: SupabaseRealtimePayload <any>) => void)): SupabaseRealtimeClient

- - Defined in src/lib/SupabaseRealtimeClient.ts:42

  The event you want to listen to.

  #### Parameters

  - ##### event: SupabaseEventTypes

    The event

  - ##### callback: ((payload: SupabaseRealtimePayload <any>) => void)

    A callback function that is called whenever the event occurs.

    - - (payload: SupabaseRealtimePayload <any>): void

      - #### Parameters

        - ##### payload: SupabaseRealtimePayload <any>

        #### Returns void

  #### Returns SupabaseRealtimeClient

### subscribe

- subscribe(callback?: Function): RealtimeSubscription

- - Defined in src/lib/SupabaseRealtimeClient.ts:64

  Enables the subscription.

  #### Parameters

  - ##### callback: Function = ...

  #### Returns RealtimeSubscription

Generated using TypeDoc