Skip to content

Commit 6ae24c1

Browse files
author
Rodrigo Gomez Palacio
committed
Add missing types UserChangeEvent & new properties
Motivation: these were not added when the api.json was updated
1 parent 8283f34 commit 6ae24c1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/managers/TypingsWriterManager.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ import {
1717
SLIDEDOWN_EVENT_NAME,
1818
SLIDEDOWN_OPTIONS,
1919
SUBSCRIPTION_CHANGE_EVENT,
20-
TAG_CATEGORY } from "../snippets/types";
20+
TAG_CATEGORY,
21+
USER_CHANGE_EVENT,
22+
USER_NAMESPACE_PROPERTIES} from "../snippets/types";
2123
import { INTERFACE_PREFIX } from "../support/constants";
2224
import { ReaderManager } from "./ReaderManager";
2325

@@ -96,6 +98,8 @@ export class TypingsWriterManager extends CodeWriter {
9698
this.writeLine(prefix+NOTIFICATION_FOREGROUND_WILL_DISPLAY_EVENT);
9799
this.writeLine(prefix+NOTIFICATION_DISMISS_EVENT);
98100
this.writeLine(prefix+NOTIFICATION_CLICK_EVENT);
101+
this.writeLine(prefix+USER_CHANGE_EVENT);
102+
this.writeLine(prefix+USER_NAMESPACE_PROPERTIES);
99103
this.writeLine();
100104
this.writeLine(initObjectInterfaceContents);
101105
}

src/snippets/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,10 @@ export const NOTIFICATION_CLICK_EVENT = `interface NotificationClickEvent {
117117
readonly result: NotificationClickResult;
118118
}
119119
`;
120+
export const USER_CHANGE_EVENT = `type UserChangeEvent = {
121+
current: UserNamespaceProperties;
122+
};`;
123+
export const USER_NAMESPACE_PROPERTIES = `type UserNamespaceProperties = {
124+
onesignalId: string | undefined;
125+
externalId: string | undefined;
126+
};`;

0 commit comments

Comments
 (0)