ExpoPushGatewayOptions — @gj-kit/nest-notifications
A public interface from @gj-kit/nest-notifications/expo. The signature below is taken directly from the 0.1.1 release declaration.
Verified import example
Section titled “Verified import example”import { ExpoPushGatewayOptions } from '@gj-kit/nest-notifications/expo';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”interface ExpoPushGatewayOptions { /** * Sends one chunk. Declared with method syntax on purpose: method parameters * are compared bivariantly, so an `expo-server-sdk` instance's * `sendPushNotificationsAsync(messages: ExpoPushMessage[])` is assignable as is. * As an arrow-function property it would not be - under `strictFunctionTypes` * the parameter is contravariant and `readonly ExpoPushMessage[]` is not * assignable to `ExpoPushMessage[]` (design 2.2). A 15-line `fetch` call fits * the same shape; the library never imports either. * * **Assignability is not binding.** The gateway detaches this callback from the * options object and calls it with no receiver, so a class method that reads * `this` MUST be bound: * * ```ts * send: expo.sendPushNotificationsAsync.bind(expo) * // or: send: (messages) => expo.sendPushNotificationsAsync([...messages]) * ``` * * `expo-server-sdk`'s method is exactly such a method (it dereferences * `this.limitConcurrentRequests`), so `send: expo.sendPushNotificationsAsync` * type-checks and then throws on the first call - which this gateway absorbs * into `accepted: false`. Every push then fails silently, every delivery burns * its attempts, and nothing in the log names the cause. */ send(messages: readonly ExpoPushMessage[]): Promise<readonly ExpoPushTicket[]>; /** * Title used when a notification has none. Required and nullable rather than * defaulted: the source hard-coded its product name here, and that is a value * this library cannot hold. */ readonly defaultTitle: string | null; /** Defaults to `'default'`, matching the source. */ readonly sound?: 'default' | null | undefined; readonly channelId?: string | undefined; /** Continue remaining chunks after one fails. Default true (matches source). */ readonly continueAfterChunkFailure?: boolean | undefined;}This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/nest-notifications - Version:
0.1.1 - Public entry:
./expo - Source: GitHub