Skip to content

Commit a74b669

Browse files
authored
Merge pull request #198 from OneSignal/cd_update
fix: update init object interface
2 parents a0aeac0 + 629ce43 commit a74b669

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

index.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,9 @@ export type UserNamespaceProperties = {
253253

254254
export interface IInitObject {
255255
appId: string;
256-
subdomainName?: string;
257256
requiresUserPrivacyConsent?: boolean;
257+
safari_web_id?: string;
258+
subdomainName?: string;
258259
promptOptions?: {
259260
slidedown: {
260261
prompts: {
@@ -270,7 +271,7 @@ export interface IInitObject {
270271
* @example
271272
* categories: [{ tag: 'local_news', label: 'Local News' }] // The user will be tagged with local_news but will see "Local News" in the prompt.
272273
*/
273-
categories: {
274+
categories?: {
274275
/** Should identify the action. */
275276
tag: string;
276277

@@ -301,7 +302,7 @@ export interface IInitObject {
301302
acceptButton?: string;
302303

303304
/** Cancels opt-in. Up to 15 characters. */
304-
cancelMessage?: string;
305+
cancelButton?: string;
305306

306307
/** The message of the confirmation prompt displayed after the email and/or phone number is provided. Up to 90 characters. */
307308
confirmMessage?: string;
@@ -450,15 +451,13 @@ export interface IInitObject {
450451
};
451452
autoResubscribe?: boolean;
452453
autoRegister?: boolean;
453-
notificationClickHandlerMatch?: string;
454-
notificationClickHandlerAction?: string;
454+
notificationClickHandlerMatch?: 'exact' | 'origin';
455+
notificationClickHandlerAction?: 'navigate' | 'focus';
455456
path?: string;
456457
serviceWorkerParam?: { scope: string };
457458
serviceWorkerPath?: string;
458459
serviceWorkerOverrideForTypical?: boolean;
459-
serviceWorkerUpdaterPath?: string;
460-
allowLocalhostAsSecureOrigin?: boolean;
461-
[key: string]: any;
460+
[key: string]: unknown;
462461
}
463462

464463
export interface IOneSignalOneSignal {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)