@livetiles/reach-components-react 0.5.0-preview.1167 → 0.5.0-preview.1168

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/index.d.ts CHANGED
@@ -69,13 +69,43 @@ declare type ReachContextProps = {
69
69
  };
70
70
  declare const ReachContextProvider: FC<ReachContextProps>;
71
71
 
72
- interface PaginatedList<TItem> {
73
- hasMoreUnreadComments?: boolean;
74
- hasNextPage?: boolean;
75
- items: TItem[];
76
- nextItem?: TItem;
77
- paginationToken?: any;
78
- totalCount?: number;
72
+ declare enum AttachmentType {
73
+ Image = 0,
74
+ File = 1,
75
+ YouTubeVideo = 2,
76
+ VimeoVideo = 3,
77
+ News = 4,
78
+ Event = 5,
79
+ Page = 6,
80
+ Post = 7,
81
+ Giphy = 8,
82
+ MicrosoftStreamVideo = 9
83
+ }
84
+ interface BaseAttachment {
85
+ id: string;
86
+ filename?: string;
87
+ previewUrl?: string;
88
+ url?: string;
89
+ isUploadInProgress?: boolean;
90
+ hasError?: boolean;
91
+ width?: number;
92
+ height?: number;
93
+ }
94
+ interface Attachment extends BaseAttachment {
95
+ type: AttachmentType;
96
+ }
97
+
98
+ declare enum GraphQLAttachmentType {
99
+ Image = "IMAGE",
100
+ File = "FILE",
101
+ YouTubeVideo = "YOU_TUBE_VIDEO",
102
+ VimeoVideo = "VIMEO_VIDEO",
103
+ News = "NEWS",
104
+ Event = "EVENT",
105
+ Page = "PAGE",
106
+ Post = "POST",
107
+ Giphy = "GIPHY",
108
+ MicrosoftStreamVideo = "MICROSOFT_STREAM_VIDEO"
79
109
  }
80
110
 
81
111
  interface BasicUserInformation {
@@ -97,10 +127,143 @@ interface Account extends BasicUserInformation {
97
127
  tenantId?: string;
98
128
  }
99
129
 
130
+ interface PaginatedList<TItem> {
131
+ hasMoreUnreadComments?: boolean;
132
+ hasNextPage?: boolean;
133
+ items: TItem[];
134
+ nextItem?: TItem;
135
+ paginationToken?: any;
136
+ totalCount?: number;
137
+ }
138
+
139
+ interface Channel {
140
+ id: string;
141
+ name: string;
142
+ translations?: {
143
+ [key: string]: string;
144
+ };
145
+ }
146
+
100
147
  interface Resources {
101
148
  [language: string]: Record<string, string>;
102
149
  }
103
150
 
151
+ interface UserChannelSubscription {
152
+ id: string;
153
+ name: string;
154
+ sendNotifications?: boolean;
155
+ isPinnedToNavigation?: boolean;
156
+ isMandatory?: boolean;
157
+ }
158
+
159
+ interface PublishableItemNotificationSummary {
160
+ itemId: string;
161
+ title?: string;
162
+ channelIds?: string[];
163
+ publishingDate?: string;
164
+ }
165
+ declare enum GroupRoleNames {
166
+ Admin = "Admin",
167
+ Editor = "Editor",
168
+ Author = "Author",
169
+ Reader = "Reader",
170
+ LimitedReader = "LimitedReader",
171
+ None = "None"
172
+ }
173
+ declare enum GroupRoles {
174
+ None = 0,
175
+ LimitedReader = 5,
176
+ Reader = 10,
177
+ Author = 20,
178
+ Editor = 30,
179
+ Admin = 40
180
+ }
181
+ declare enum NotificationType {
182
+ None = 0,
183
+ MobilePush = 1,
184
+ Email = 2,
185
+ Teams = 4,
186
+ BrowserPush = 8
187
+ }
188
+ interface NotificationTypeSettings {
189
+ news: NotificationType;
190
+ posts: NotificationType;
191
+ comments: NotificationType;
192
+ mentions: NotificationType;
193
+ events: NotificationType;
194
+ chat: NotificationType;
195
+ pluginNotifications: {
196
+ [key: string]: NotificationType;
197
+ };
198
+ newsEditor: NotificationType;
199
+ eventEditor: NotificationType;
200
+ }
201
+ interface CurrentUser extends Account {
202
+ isEmailVerificationPending?: boolean;
203
+ isSubscriptionOwner: boolean;
204
+ givenName: string;
205
+ surname: string;
206
+ preferredUiLanguage: string;
207
+ preferredContentLanguage?: string;
208
+ preferredLocale?: string;
209
+ bookmarks: string[];
210
+ groups: UserGroup[];
211
+ subscription: SubscriptionSummary;
212
+ availableSubscriptions: SubscriptionSummary[];
213
+ channels: UserChannelSubscription[];
214
+ userHash: string;
215
+ unreadNews: PublishableItemNotificationSummary[];
216
+ unreadEvents: PublishableItemNotificationSummary[];
217
+ unreadPosts: {
218
+ groupId: string;
219
+ itemId: string;
220
+ }[];
221
+ unreadFeedItemsCount?: number;
222
+ mostRecentPostGroups: string[];
223
+ notificationTypeSettings: NotificationTypeSettings;
224
+ hasPendingRegistration?: boolean;
225
+ minRoles: UserMinRoles;
226
+ hasDirectory: boolean;
227
+ contacts: UserContact[];
228
+ termsAndConditionsApprovedHash: string;
229
+ isPublicUser?: boolean;
230
+ hasUnreadChats?: boolean;
231
+ publicSubscriptionIds?: string[];
232
+ }
233
+ interface UserContact {
234
+ tokenUniqueId: string;
235
+ tenantId: string;
236
+ }
237
+ interface GroupBase {
238
+ id: string;
239
+ name: string;
240
+ translations?: {
241
+ [key: string]: string;
242
+ };
243
+ }
244
+ interface UserGroup extends GroupBase {
245
+ allowPosts: boolean;
246
+ disablePostComments: boolean;
247
+ availableChannelIds: string[];
248
+ defaultChannelIds: string[];
249
+ mandatoryChannelIds: string[];
250
+ availableKeywordIds: string[];
251
+ defaultKeywordIds: string[];
252
+ mandatoryKeywordIds: string[];
253
+ role: UserGroupRole;
254
+ }
255
+ interface UserMinRoles {
256
+ isEditor: boolean;
257
+ isAuthor: boolean;
258
+ isAdmin: boolean;
259
+ isReader: boolean;
260
+ isSubscriptionOwner: boolean;
261
+ }
262
+ interface UserGroupRole {
263
+ roleValue: GroupRoles;
264
+ displayName: GroupRoleNames;
265
+ }
266
+
104
267
  interface LanguageBase {
105
268
  code: string;
106
269
  }
@@ -122,14 +285,6 @@ interface Keyword {
122
285
  };
123
286
  }
124
287
 
125
- interface Channel {
126
- id: string;
127
- name: string;
128
- translations?: {
129
- [key: string]: string;
130
- };
131
- }
132
-
133
288
  declare enum ItemResourceTypes {
134
289
  News = "news",
135
290
  Pages = "pages",
@@ -298,120 +453,37 @@ declare enum FieldMode {
298
453
  Hidden = 3
299
454
  }
300
455
 
301
- interface UserChannelSubscription {
302
- id: string;
303
- name: string;
304
- sendNotifications?: boolean;
305
- isPinnedToNavigation?: boolean;
306
- isMandatory?: boolean;
456
+ interface ItemWithAttachments {
457
+ attachments?: Attachment[];
458
+ fileAccessToken?: string;
459
+ attachmentContainerId?: string;
307
460
  }
308
461
 
309
- interface PublishableItemNotificationSummary {
310
- itemId: string;
311
- title?: string;
312
- channelIds?: string[];
313
- publishingDate?: string;
314
- }
315
- declare enum GroupRoleNames {
316
- Admin = "Admin",
317
- Editor = "Editor",
318
- Author = "Author",
319
- Reader = "Reader",
320
- LimitedReader = "LimitedReader",
321
- None = "None"
322
- }
323
- declare enum GroupRoles {
324
- None = 0,
325
- LimitedReader = 5,
326
- Reader = 10,
327
- Author = 20,
328
- Editor = 30,
329
- Admin = 40
330
- }
331
- declare enum NotificationType {
332
- None = 0,
333
- MobilePush = 1,
334
- Email = 2,
335
- Teams = 4,
336
- BrowserPush = 8
337
- }
338
- interface NotificationTypeSettings {
339
- news: NotificationType;
340
- posts: NotificationType;
341
- comments: NotificationType;
342
- mentions: NotificationType;
343
- events: NotificationType;
344
- chat: NotificationType;
345
- pluginNotifications: {
346
- [key: string]: NotificationType;
347
- };
348
- newsEditor: NotificationType;
349
- eventEditor: NotificationType;
350
- }
351
- interface CurrentUser extends Account {
352
- isEmailVerificationPending?: boolean;
353
- isSubscriptionOwner: boolean;
354
- givenName: string;
355
- surname: string;
356
- preferredUiLanguage: string;
357
- preferredContentLanguage?: string;
358
- preferredLocale?: string;
359
- bookmarks: string[];
360
- groups: UserGroup[];
361
- subscription: SubscriptionSummary;
362
- availableSubscriptions: SubscriptionSummary[];
363
- channels: UserChannelSubscription[];
364
- userHash: string;
365
- unreadNews: PublishableItemNotificationSummary[];
366
- unreadEvents: PublishableItemNotificationSummary[];
367
- unreadPosts: {
368
- groupId: string;
369
- itemId: string;
370
- }[];
371
- unreadFeedItemsCount?: number;
372
- mostRecentPostGroups: string[];
373
- notificationTypeSettings: NotificationTypeSettings;
374
- hasPendingRegistration?: boolean;
375
- minRoles: UserMinRoles;
376
- hasDirectory: boolean;
377
- contacts: UserContact[];
378
- termsAndConditionsApprovedHash: string;
379
- isPublicUser?: boolean;
380
- hasUnreadChats?: boolean;
381
- publicSubscriptionIds?: string[];
382
- }
383
- interface UserContact {
384
- tokenUniqueId: string;
385
- tenantId: string;
386
- }
387
- interface GroupBase {
462
+ interface Comment extends ItemWithAttachments {
388
463
  id: string;
389
- name: string;
390
- translations?: {
391
- [key: string]: string;
392
- };
393
- }
394
- interface UserGroup extends GroupBase {
395
- allowPosts: boolean;
396
- disablePostComments: boolean;
397
- availableChannelIds: string[];
398
- defaultChannelIds: string[];
399
- mandatoryChannelIds: string[];
400
- availableKeywordIds: string[];
401
- defaultKeywordIds: string[];
402
- mandatoryKeywordIds: string[];
403
- role: UserGroupRole;
464
+ parentItemId: string;
465
+ content: string;
466
+ formattedContent?: string;
467
+ contentLanguageCode?: string;
468
+ receivedDateTime: string;
469
+ sender: Account;
470
+ conversationScope: ConversationScope;
471
+ modified?: string;
472
+ statistics?: CommentStatistics;
473
+ isLiked?: boolean;
474
+ threadId?: string;
475
+ isUnread?: boolean;
476
+ hasUnreadReplies?: boolean;
477
+ isDemoContent?: boolean;
404
478
  }
405
- interface UserMinRoles {
406
- isEditor: boolean;
407
- isAuthor: boolean;
408
- isAdmin: boolean;
409
- isReader: boolean;
410
- isSubscriptionOwner: boolean;
479
+ interface CommentStatistics {
480
+ likeCount?: number;
481
+ replyCount?: number;
411
482
  }
412
- interface UserGroupRole {
413
- roleValue: GroupRoles;
414
- displayName: GroupRoleNames;
483
+ declare enum ConversationScope {
484
+ Public = 0,
485
+ Editor = 1,
486
+ Posts = 2
415
487
  }
416
488
 
417
489
  interface ItemStatistics {
@@ -603,80 +675,6 @@ interface ChoiceTranslations {
603
675
  text: string;
604
676
  }
605
677
 
606
- declare function useCurrentUser(): CurrentUser;
607
-
608
- declare enum AttachmentType {
609
- Image = 0,
610
- File = 1,
611
- YouTubeVideo = 2,
612
- VimeoVideo = 3,
613
- News = 4,
614
- Event = 5,
615
- Page = 6,
616
- Post = 7,
617
- Giphy = 8,
618
- MicrosoftStreamVideo = 9
619
- }
620
- interface BaseAttachment {
621
- id: string;
622
- filename?: string;
623
- previewUrl?: string;
624
- url?: string;
625
- isUploadInProgress?: boolean;
626
- hasError?: boolean;
627
- width?: number;
628
- height?: number;
629
- }
630
- interface Attachment extends BaseAttachment {
631
- type: AttachmentType;
632
- }
633
-
634
- declare enum GraphQLAttachmentType {
635
- Image = "IMAGE",
636
- File = "FILE",
637
- YouTubeVideo = "YOU_TUBE_VIDEO",
638
- VimeoVideo = "VIMEO_VIDEO",
639
- News = "NEWS",
640
- Event = "EVENT",
641
- Page = "PAGE",
642
- Post = "POST",
643
- Giphy = "GIPHY",
644
- MicrosoftStreamVideo = "MICROSOFT_STREAM_VIDEO"
645
- }
646
-
647
- interface ItemWithAttachments {
648
- attachments?: Attachment[];
649
- fileAccessToken?: string;
650
- attachmentContainerId?: string;
651
- }
652
-
653
- interface Comment extends ItemWithAttachments {
654
- id: string;
655
- parentItemId: string;
656
- content: string;
657
- formattedContent?: string;
658
- contentLanguageCode?: string;
659
- receivedDateTime: string;
660
- sender: Account;
661
- conversationScope: ConversationScope;
662
- modified?: string;
663
- statistics?: CommentStatistics;
664
- isLiked?: boolean;
665
- threadId?: string;
666
- isUnread?: boolean;
667
- hasUnreadReplies?: boolean;
668
- isDemoContent?: boolean;
669
- }
670
- interface CommentStatistics {
671
- likeCount?: number;
672
- replyCount?: number;
673
- }
674
- declare enum ConversationScope {
675
- Public = 0,
676
- Editor = 1,
677
- Posts = 2
678
- }
679
-
680
678
  declare enum EventResponse {
681
679
  NotSet = 0,
682
680
  Registered = 1,
@@ -830,6 +828,8 @@ declare type KeywordsByGroupId = {
830
828
  [key: string]: Keyword[];
831
829
  };
832
830
 
831
+ declare function useCurrentUser(): CurrentUser;
832
+
833
833
  interface SubscriptionData {
834
834
  channels?: Channel[];
835
835
  allKeywords?: Keyword[];