# Class PushMessageHelper

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:50

##### Index

### Constructors

constructor

### Properties

badge?
firebaseApp?
firebaseJsonContent?
firebaseJsonPath?
icon?
notificationSubs
state
syncSubs
vapidEmail?
vapidPrivateKey?
vapidPublicKey?

### Methods

pushNotification
pushSync
updateConfig

## Constructors

### constructor

- new PushMessageHelper(config: PushMessageHelperConfig): PushMessageHelper

  normal first init

  #### Parameters

  - config: PushMessageHelperConfig

    PushMessageHelper configuration

  #### Returns PushMessageHelper

  - Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:70

## Properties

### `Optional` badge

badge?: string

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:55

### `Optional` firebaseApp

firebaseApp?: App | null

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:59

### `Optional` firebaseJsonContent

firebaseJsonContent?: any

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:58

### `Optional` firebaseJsonPath

firebaseJsonPath?: string

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:57

### `Optional` icon

icon?: string

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:54

### notificationSubs

notificationSubs: Record<string, Subscription[]>

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:61

### state

state: any

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:64

### syncSubs

syncSubs: Record<string, FcmSubscription[]>

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:62

### `Optional` vapidEmail

vapidEmail?: string

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:53

### `Optional` vapidPrivateKey

vapidPrivateKey?: string

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:52

### `Optional` vapidPublicKey

vapidPublicKey?: string

- Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:51

## Methods

### pushNotification

- pushNotification(notification: Notification): Promise<void>

  Sends a notification to all subscriptions.

  #### Parameters

  - notification: Notification

    The notification to send.

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:107

### pushSync

- pushSync(tableName: string): Promise<void>

  #### Parameters

  - tableName: string

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:137

### updateConfig

- updateConfig(config: any): void

  will be used when a config changes (no complete re-init)

  #### Parameters

  - config: any

    new configuration.

  #### Returns void

  - Defined in packages/saltcorn-data/models/internal/push_message_helper.ts:88