@engagently/types 4.3.1 → 4.5.0

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.
@@ -4,6 +4,7 @@ import type { ThemeSettings } from '../../ui/themes/config';
4
4
  import type { CombinedError, Operation } from '@urql/preact';
5
5
  import type { EgyEntities, MessageEvents } from './WidgetDefinitions';
6
6
  import type { DsmFeatureName } from '../lib/api/enums';
7
+ import type { AdSlotProps, AdSlots } from '../lib/components/AdSlot';
7
8
  export declare enum ExperienceCallBackNames {
8
9
  POLL_BAR = "POLL_BAR",
9
10
  POLL_GRID = "POLL_GRID",
@@ -35,6 +36,7 @@ export interface EngageConfig {
35
36
  cta?: Partial<Record<DsmFeatureName | ExperienceCallBackNames, CallbackFn>>;
36
37
  error?: ErrorCallbackFn;
37
38
  events?: Partial<Record<EventHooks, CallbackFn>>;
39
+ ads?: Record<AdSlots, Omit<AdSlotProps, 'id'>>;
38
40
  }
39
41
  /**
40
42
  * Definition for the configuration related to the current community
@@ -340,7 +340,7 @@ export interface PollSliderWidget {
340
340
  /**
341
341
  * Events that can be used by the pub/sub implementation for window.postMessage
342
342
  */
343
- 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';
343
+ 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';
344
344
  export declare const EGY_AUTH = "egy_auth";
345
345
  export type EgyAuth = {
346
346
  accessToken: string;
@@ -3,6 +3,19 @@ export declare enum DsmCommentariesSort {
3
3
  CreatedAtDesc = "CREATED_AT_DESC",
4
4
  PopularityDesc = "POPULARITY_DESC"
5
5
  }
6
+ export declare enum DsmCommentaryReportReason {
7
+ Bully = "BULLY",
8
+ Fake = "FAKE",
9
+ Hate = "HATE",
10
+ Legal = "LEGAL",
11
+ Other = "OTHER",
12
+ Privacy = "PRIVACY",
13
+ Sexual = "SEXUAL",
14
+ Spam = "SPAM",
15
+ Terms = "TERMS",
16
+ Toxic = "TOXIC",
17
+ Violence = "VIOLENCE"
18
+ }
6
19
  export declare enum DsmDiscussionEffectiveState {
7
20
  Archived = "ARCHIVED",
8
21
  Closed = "CLOSED",
@@ -20,6 +33,7 @@ export declare enum DsmFeatureName {
20
33
  Ignore = "IGNORE",
21
34
  InstantContext = "INSTANT_CONTEXT",
22
35
  MyProfile = "MY_PROFILE",
36
+ OnboardNamehint = "ONBOARD_NAMEHINT",
23
37
  Profile = "PROFILE",
24
38
  Reaction = "REACTION",
25
39
  Reply = "REPLY",
@@ -62,6 +76,7 @@ export declare enum ExmQuestionChoiceType {
62
76
  }
63
77
  export declare enum ExmQuestionType {
64
78
  Bar = "BAR",
79
+ Grid = "GRID",
65
80
  Slider = "SLIDER"
66
81
  }
67
82
  export declare enum PageStatus {
@@ -16,6 +16,7 @@ export declare const defaultResources: {
16
16
  actions: {
17
17
  cancel: string;
18
18
  close: string;
19
+ continue: string;
19
20
  "open-discussion": string;
20
21
  "go-to-discussion": string;
21
22
  na: string;
@@ -43,11 +44,14 @@ export declare const defaultResources: {
43
44
  "load-older-comments": string;
44
45
  "load-newer-replies": string;
45
46
  "load-older-replies": string;
47
+ logout: string;
48
+ "logout-hint": string;
46
49
  options: string;
47
50
  reply: string;
48
51
  reply_other: string;
49
52
  "reply-count": string;
50
53
  "reply-count_other": string;
54
+ session: string;
51
55
  share: string;
52
56
  "shared-comment": string;
53
57
  user: {
@@ -99,8 +103,23 @@ export declare const defaultResources: {
99
103
  moderate: string;
100
104
  reply: string;
101
105
  report: {
102
- inactive: string;
103
- active: string;
106
+ action: string;
107
+ title: string;
108
+ "justification-description": string;
109
+ reasons: {
110
+ OTHER: string;
111
+ SPAM: string;
112
+ TOXIC: string;
113
+ BULLY: string;
114
+ HATE: string;
115
+ VIOLENCE: string;
116
+ SEXUAL: string;
117
+ PRIVACY: string;
118
+ FAKE: string;
119
+ TERMS: string;
120
+ LEGAL: string;
121
+ };
122
+ submitted: string;
104
123
  };
105
124
  reaction: {
106
125
  REACTION1: string;
@@ -113,6 +132,7 @@ export declare const defaultResources: {
113
132
  share: string;
114
133
  };
115
134
  "commentary-not-available": string;
135
+ feedback: string;
116
136
  filters: {
117
137
  CREATED_AT_ASC: {
118
138
  description: string;
@@ -152,6 +172,7 @@ export declare const defaultResources: {
152
172
  "no-more-comments": string;
153
173
  "no-comments-yet": string;
154
174
  "no-recent-comments": string;
175
+ "onboarding-username-change": string;
155
176
  placeholders: {
156
177
  "new-commentary": string;
157
178
  "new-reply": string;
@@ -216,6 +237,7 @@ export declare const defaultResources: {
216
237
  inline: {
217
238
  "write-comment": string;
218
239
  };
240
+ "report-commentary": string;
219
241
  };
220
242
  features: {
221
243
  COMMENT: {
@@ -230,6 +252,9 @@ export declare const defaultResources: {
230
252
  MY_PROFILE: {
231
253
  "call-to-action": string;
232
254
  };
255
+ ONBOARD_NAMEHINT: {
256
+ "call-to-action": string;
257
+ };
233
258
  PROFILE: {
234
259
  "call-to-action": string;
235
260
  };
@@ -302,6 +327,7 @@ export declare const defaultResources: {
302
327
  actions: {
303
328
  cancel: string;
304
329
  close: string;
330
+ continue: string;
305
331
  "open-discussion": string;
306
332
  "go-to-discussion": string;
307
333
  na: string;
@@ -329,11 +355,14 @@ export declare const defaultResources: {
329
355
  "load-older-comments": string;
330
356
  "load-newer-replies": string;
331
357
  "load-older-replies": string;
358
+ logout: string;
359
+ "logout-hint": string;
332
360
  options: string;
333
361
  reply: string;
334
362
  reply_other: string;
335
363
  "reply-count": string;
336
364
  "reply-count_other": string;
365
+ session: string;
337
366
  share: string;
338
367
  "shared-comment": string;
339
368
  user: {
@@ -385,8 +414,23 @@ export declare const defaultResources: {
385
414
  moderate: string;
386
415
  reply: string;
387
416
  report: {
388
- inactive: string;
389
- active: string;
417
+ action: string;
418
+ title: string;
419
+ "justification-description": string;
420
+ reasons: {
421
+ OTHER: string;
422
+ SPAM: string;
423
+ TOXIC: string;
424
+ BULLY: string;
425
+ HATE: string;
426
+ VIOLENCE: string;
427
+ SEXUAL: string;
428
+ PRIVACY: string;
429
+ FAKE: string;
430
+ TERMS: string;
431
+ LEGAL: string;
432
+ };
433
+ submitted: string;
390
434
  };
391
435
  reaction: {
392
436
  REACTION1: string;
@@ -399,6 +443,7 @@ export declare const defaultResources: {
399
443
  share: string;
400
444
  };
401
445
  "commentary-not-available": string;
446
+ feedback: string;
402
447
  filters: {
403
448
  CREATED_AT_ASC: {
404
449
  description: string;
@@ -438,6 +483,7 @@ export declare const defaultResources: {
438
483
  "no-more-comments": string;
439
484
  "no-comments-yet": string;
440
485
  "no-recent-comments": string;
486
+ "onboarding-username-change": string;
441
487
  placeholders: {
442
488
  "new-commentary": string;
443
489
  "new-reply": string;
@@ -501,6 +547,7 @@ export declare const defaultResources: {
501
547
  inline: {
502
548
  "write-comment": string;
503
549
  };
550
+ "report-commentary": string;
504
551
  };
505
552
  features: {
506
553
  COMMENT: {
@@ -515,6 +562,9 @@ export declare const defaultResources: {
515
562
  MY_PROFILE: {
516
563
  "call-to-action": string;
517
564
  };
565
+ ONBOARD_NAMEHINT: {
566
+ "call-to-action": string;
567
+ };
518
568
  PROFILE: {
519
569
  "call-to-action": string;
520
570
  };
@@ -1,9 +1,11 @@
1
1
  import type { CommunityConfig, EngageConfig, Translations } from '../../common/_types/ConfigDefinition';
2
- import type { SignOutOptions } from '../../common/lib/api/session';
3
2
  import type { Exchange } from '@urql/preact';
4
3
  type SignInOptions = Partial<{
5
4
  token: string | null;
6
5
  }>;
6
+ type SignOutOptions = Partial<{
7
+ anonymousSession: boolean;
8
+ }>;
7
9
  export declare const reinit: (partialConfig?: Partial<EngageConfig>) => Promise<void>;
8
10
  export declare const signOut: ({ anonymousSession }?: SignOutOptions) => Promise<void>;
9
11
  export type Engagently = {
@@ -18,6 +20,8 @@ export type Engagently = {
18
20
  core: {
19
21
  authExchange?: Exchange;
20
22
  subscriptionExchange?: Exchange;
23
+ canSignOut?: boolean;
24
+ signOut?: (options?: SignOutOptions) => Promise<void>;
21
25
  };
22
26
  } & {
23
27
  Configuration: (config: EngageConfig) => Promise<EngageConfig>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engagently/types",
3
- "version": "4.3.1",
3
+ "version": "4.5.0",
4
4
  "main": "./index.ts",
5
5
  "types": "dist/types/engagently.d.ts",
6
6
  "files": [