@engagently/types 2.5.0 → 2.6.1
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.
- package/dist/common/_types/ConfigDefinition.d.ts +1 -1
- package/dist/common/_types/WidgetDefinitions.d.ts +1 -1
- package/dist/common/lib/api/enums.d.ts +2 -0
- package/dist/i18n/i18n.d.ts +14 -0
- package/dist/main/lib/engagently.d.ts +5 -1
- package/dist/ui/themes/_types.d.ts +3 -3
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export type CallbackFn = (data: {
|
|
|
10
10
|
payload?: unknown;
|
|
11
11
|
}) => void;
|
|
12
12
|
export type ErrorCallbackFn = (error: CombinedError, operation: Operation) => void;
|
|
13
|
-
export type EventHooks = 'onAny' | 'onChangeViewMode' | 'onLoadMoreComments' | 'onLoadMoreReplies';
|
|
13
|
+
export type EventHooks = 'onAny' | 'onChangeViewMode' | 'onLoadMoreComments' | 'onLoadMoreReplies' | 'onSetup';
|
|
14
14
|
export declare const EventHookMessageEventMap: Record<EventHooks, MessageEvents | MessageEvents[]>;
|
|
15
15
|
export type Translations = Record<string, DeepPartial<typeof defaultResources.en>>;
|
|
16
16
|
/**
|
|
@@ -94,7 +94,7 @@ export interface PollWidget {
|
|
|
94
94
|
/**
|
|
95
95
|
* Events that can be used by the pub/sub implementation for window.postMessage
|
|
96
96
|
*/
|
|
97
|
-
export type MessageEvents = 'EGY_SIGN_IN' | 'EGY_SIGN_OUT' | 'EGY_SIGNED_OUT' | 'EGY_AUTHENTICATED' | 'EGY_AUTHENTICATION_FAILED' | 'EGY_TOGGLE_COLOR_SCHEME' | 'EGY_CHANGE_LANGUAGE' | 'EGY_CHANGE_VIEW_MODE' | 'EGY_LOAD_MORE_COMMENTS' | 'EGY_LOAD_MORE_REPLIES' | 'EGY_REINIT';
|
|
97
|
+
export type MessageEvents = 'EGY_SETUP' | 'EGY_SIGN_IN' | 'EGY_SIGN_OUT' | 'EGY_SIGNED_OUT' | 'EGY_AUTHENTICATED' | 'EGY_AUTHENTICATION_FAILED' | 'EGY_TOGGLE_COLOR_SCHEME' | 'EGY_CHANGE_LANGUAGE' | 'EGY_CHANGE_VIEW_MODE' | 'EGY_LOAD_MORE_COMMENTS' | 'EGY_LOAD_MORE_REPLIES' | 'EGY_REINIT';
|
|
98
98
|
export declare const EGY_AUTH = "egy_auth";
|
|
99
99
|
export type EgyAuth = {
|
|
100
100
|
accessToken: string;
|
|
@@ -16,6 +16,8 @@ export declare enum DsmDiscussionState {
|
|
|
16
16
|
export declare enum DsmFeatureName {
|
|
17
17
|
Comment = "COMMENT",
|
|
18
18
|
CommentaryRead = "COMMENTARY_READ",
|
|
19
|
+
InstantContext = "INSTANT_CONTEXT",
|
|
20
|
+
MyProfile = "MY_PROFILE",
|
|
19
21
|
Profile = "PROFILE",
|
|
20
22
|
Reaction = "REACTION",
|
|
21
23
|
Reply = "REPLY",
|
package/dist/i18n/i18n.d.ts
CHANGED
|
@@ -171,6 +171,12 @@ export declare const defaultResources: {
|
|
|
171
171
|
COMMENTARY_READ: {
|
|
172
172
|
"call-to-action": string;
|
|
173
173
|
};
|
|
174
|
+
INSTANT_CONTEXT: {
|
|
175
|
+
"call-to-action": string;
|
|
176
|
+
};
|
|
177
|
+
MY_PROFILE: {
|
|
178
|
+
"call-to-action": string;
|
|
179
|
+
};
|
|
174
180
|
PROFILE: {
|
|
175
181
|
"call-to-action": string;
|
|
176
182
|
};
|
|
@@ -221,6 +227,7 @@ export declare const defaultResources: {
|
|
|
221
227
|
"discussion-preamble": string;
|
|
222
228
|
"log-in-to-comment": string;
|
|
223
229
|
"user-suspended": string;
|
|
230
|
+
"username-change": string;
|
|
224
231
|
};
|
|
225
232
|
poll: {
|
|
226
233
|
"thank-you-for-vote": string;
|
|
@@ -396,6 +403,12 @@ export declare const defaultResources: {
|
|
|
396
403
|
COMMENTARY_READ: {
|
|
397
404
|
"call-to-action": string;
|
|
398
405
|
};
|
|
406
|
+
INSTANT_CONTEXT: {
|
|
407
|
+
"call-to-action": string;
|
|
408
|
+
};
|
|
409
|
+
MY_PROFILE: {
|
|
410
|
+
"call-to-action": string;
|
|
411
|
+
};
|
|
399
412
|
PROFILE: {
|
|
400
413
|
"call-to-action": string;
|
|
401
414
|
};
|
|
@@ -446,6 +459,7 @@ export declare const defaultResources: {
|
|
|
446
459
|
"discussion-preamble": string;
|
|
447
460
|
"log-in-to-comment": string;
|
|
448
461
|
"user-suspended": string;
|
|
462
|
+
"username-change": string;
|
|
449
463
|
};
|
|
450
464
|
poll: {
|
|
451
465
|
"thank-you-for-vote": string;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { CommunityConfig, EngageConfig, Translations } from '../../common/_types/ConfigDefinition';
|
|
2
2
|
import type { SignOutOptions } from '../../common/lib/api/session';
|
|
3
|
+
type SignInOptions = Partial<{
|
|
4
|
+
token: string | null;
|
|
5
|
+
}>;
|
|
3
6
|
export type Engagently = {
|
|
4
7
|
config?: EngageConfig;
|
|
5
8
|
communityConfig?: DeepPartial<CommunityConfig>;
|
|
6
9
|
changeLanguage: (languageCode: string) => void;
|
|
7
10
|
toggleColorScheme: (mode: 'auto' | 'dark' | 'light') => void;
|
|
8
|
-
signOut: (options?: SignOutOptions) => Promise<
|
|
11
|
+
signOut: (options?: SignOutOptions) => Promise<void>;
|
|
12
|
+
signIn: (options?: SignInOptions) => Promise<void>;
|
|
9
13
|
reinit: (config: Partial<EngageConfig>) => Promise<void>;
|
|
10
14
|
remoteTranslations?: Translations | null;
|
|
11
15
|
} & {
|