@engagently/types 4.8.2 → 4.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,7 +16,7 @@ export type CallbackFn = (data: {
|
|
|
16
16
|
payload?: unknown;
|
|
17
17
|
}) => void;
|
|
18
18
|
export type ErrorCallbackFn = (error: CombinedError, operation: Operation) => void;
|
|
19
|
-
export type EventHooks = 'onAny' | 'onChangeViewMode' | 'onLoadMoreComments' | 'onLoadMoreReplies' | 'onSetup' | 'onSignIn' | 'onSubmitCommentary';
|
|
19
|
+
export type EventHooks = 'onAny' | 'onChangeViewMode' | 'onCommentaryAction' | 'onLoadMoreComments' | 'onLoadMoreReplies' | 'onSetup' | 'onSignIn' | 'onSubmitCommentary';
|
|
20
20
|
export declare const EventHookMessageEventMap: Record<EventHooks, MessageEvents | MessageEvents[]>;
|
|
21
21
|
export type Translations = Record<string, DeepPartial<typeof defaultResources.en>>;
|
|
22
22
|
/**
|
|
@@ -376,7 +376,7 @@ export interface PollSliderWidget {
|
|
|
376
376
|
/**
|
|
377
377
|
* Events that can be used by the pub/sub implementation for window.postMessage
|
|
378
378
|
*/
|
|
379
|
-
export type MessageEvents = 'EGY_SETUP' | 'EGY_SIGN_IN' | 'EGY_SIGNED_OUT' | 'EGY_AUTHENTICATED' | 'EGY_TOGGLE_COLOR_SCHEME' | 'EGY_CHANGE_LANGUAGE' | 'EGY_CHANGE_VIEW_MODE' | 'EGY_LOAD_MORE_COMMENTS' | 'EGY_LOAD_MORE_REPLIES' | 'EGY_SUBMIT_COMMENTARY' | 'EGY_REINIT' | 'EGY_CAN_LOGOUT';
|
|
379
|
+
export type MessageEvents = 'EGY_SETUP' | 'EGY_SIGN_IN' | 'EGY_SIGNED_OUT' | 'EGY_AUTHENTICATED' | 'EGY_TOGGLE_COLOR_SCHEME' | 'EGY_CHANGE_LANGUAGE' | 'EGY_CHANGE_VIEW_MODE' | 'EGY_LOAD_MORE_COMMENTS' | 'EGY_LOAD_MORE_REPLIES' | 'EGY_SUBMIT_COMMENTARY' | 'EGY_COMMENTARY_ACTION' | 'EGY_REINIT' | 'EGY_CAN_LOGOUT';
|
|
380
380
|
export declare const EGY_AUTH = "egy_auth";
|
|
381
381
|
export type EgyAuth = {
|
|
382
382
|
accessToken: string;
|
|
@@ -392,6 +392,10 @@ export type SubmitCommentaryPayload = {
|
|
|
392
392
|
commentaryType: 'COMMENT' | 'REPLY';
|
|
393
393
|
mode: 'CREATE' | 'EDIT';
|
|
394
394
|
};
|
|
395
|
+
export type ActionPayload = {
|
|
396
|
+
actionType: DiscussionCommentaryActions;
|
|
397
|
+
result: 'create' | 'delete' | 'update' | 'error' | 'none';
|
|
398
|
+
};
|
|
395
399
|
/**
|
|
396
400
|
* Will convert an array type -> ["foo", "bar"] as keys for an object type
|
|
397
401
|
* requiring strings -> { foo: string; bar: string }
|