@esri/hub-common 13.21.1 → 13.22.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.
Files changed (68) hide show
  1. package/dist/esm/discussions/api/channels/channels.js +14 -0
  2. package/dist/esm/discussions/api/channels/channels.js.map +1 -0
  3. package/dist/esm/discussions/api/channels/index.js +2 -0
  4. package/dist/esm/discussions/api/channels/index.js.map +1 -0
  5. package/dist/esm/discussions/api/index.js +3 -0
  6. package/dist/esm/discussions/api/index.js.map +1 -0
  7. package/dist/esm/discussions/api/request.js +20 -0
  8. package/dist/esm/discussions/api/request.js.map +1 -0
  9. package/dist/esm/discussions/api/types.js +244 -0
  10. package/dist/esm/discussions/api/types.js.map +1 -0
  11. package/dist/esm/discussions/api/utils/request.js +77 -0
  12. package/dist/esm/discussions/api/utils/request.js.map +1 -0
  13. package/dist/esm/discussions/index.js +1 -0
  14. package/dist/esm/discussions/index.js.map +1 -1
  15. package/dist/esm/search/_internal/commonHelpers/getApi.js +5 -0
  16. package/dist/esm/search/_internal/commonHelpers/getApi.js.map +1 -1
  17. package/dist/esm/search/_internal/commonHelpers/getDiscussionsApiDefinition.js +10 -0
  18. package/dist/esm/search/_internal/commonHelpers/getDiscussionsApiDefinition.js.map +1 -0
  19. package/dist/esm/search/_internal/commonHelpers/shouldUseDiscussionsApi.js +13 -0
  20. package/dist/esm/search/_internal/commonHelpers/shouldUseDiscussionsApi.js.map +1 -0
  21. package/dist/esm/search/_internal/hubSearchChannels.js +116 -0
  22. package/dist/esm/search/_internal/hubSearchChannels.js.map +1 -0
  23. package/dist/esm/search/_internal/index.js +1 -0
  24. package/dist/esm/search/_internal/index.js.map +1 -1
  25. package/dist/esm/search/hubSearch.js +2 -1
  26. package/dist/esm/search/hubSearch.js.map +1 -1
  27. package/dist/esm/types.js.map +1 -1
  28. package/dist/node/discussions/api/channels/channels.js +18 -0
  29. package/dist/node/discussions/api/channels/channels.js.map +1 -0
  30. package/dist/node/discussions/api/channels/index.js +5 -0
  31. package/dist/node/discussions/api/channels/index.js.map +1 -0
  32. package/dist/node/discussions/api/index.js +6 -0
  33. package/dist/node/discussions/api/index.js.map +1 -0
  34. package/dist/node/discussions/api/request.js +24 -0
  35. package/dist/node/discussions/api/request.js.map +1 -0
  36. package/dist/node/discussions/api/types.js +247 -0
  37. package/dist/node/discussions/api/types.js.map +1 -0
  38. package/dist/node/discussions/api/utils/request.js +83 -0
  39. package/dist/node/discussions/api/utils/request.js.map +1 -0
  40. package/dist/node/discussions/index.js +1 -0
  41. package/dist/node/discussions/index.js.map +1 -1
  42. package/dist/node/search/_internal/commonHelpers/getApi.js +5 -0
  43. package/dist/node/search/_internal/commonHelpers/getApi.js.map +1 -1
  44. package/dist/node/search/_internal/commonHelpers/getDiscussionsApiDefinition.js +14 -0
  45. package/dist/node/search/_internal/commonHelpers/getDiscussionsApiDefinition.js.map +1 -0
  46. package/dist/node/search/_internal/commonHelpers/shouldUseDiscussionsApi.js +17 -0
  47. package/dist/node/search/_internal/commonHelpers/shouldUseDiscussionsApi.js.map +1 -0
  48. package/dist/node/search/_internal/hubSearchChannels.js +119 -0
  49. package/dist/node/search/_internal/hubSearchChannels.js.map +1 -0
  50. package/dist/node/search/_internal/index.js +1 -0
  51. package/dist/node/search/_internal/index.js.map +1 -1
  52. package/dist/node/search/hubSearch.js +1 -0
  53. package/dist/node/search/hubSearch.js.map +1 -1
  54. package/dist/node/types.js.map +1 -1
  55. package/dist/types/discussions/api/channels/channels.d.ts +10 -0
  56. package/dist/types/discussions/api/channels/index.d.ts +1 -0
  57. package/dist/types/discussions/api/index.d.ts +2 -0
  58. package/dist/types/discussions/api/request.d.ts +11 -0
  59. package/dist/types/discussions/api/types.d.ts +986 -0
  60. package/dist/types/discussions/api/utils/request.d.ts +25 -0
  61. package/dist/types/discussions/index.d.ts +1 -0
  62. package/dist/types/search/_internal/commonHelpers/getDiscussionsApiDefinition.d.ts +2 -0
  63. package/dist/types/search/_internal/commonHelpers/shouldUseDiscussionsApi.d.ts +11 -0
  64. package/dist/types/search/_internal/hubSearchChannels.d.ts +30 -0
  65. package/dist/types/search/_internal/index.d.ts +1 -0
  66. package/dist/types/search/types/IHubCatalog.d.ts +1 -1
  67. package/dist/types/types.d.ts +1 -1
  68. package/package.json +1 -1
@@ -0,0 +1,986 @@
1
+ import { IPagingParams, IPagedResponse as IRestPagedResponse, IUser } from "@esri/arcgis-rest-types";
2
+ import { Geometry } from "geojson";
3
+ import { IHubRequestOptions } from "../../types";
4
+ /**
5
+ * sort orders
6
+ *
7
+ * @export
8
+ * @enum {string}
9
+ */
10
+ export declare enum SortOrder {
11
+ ASC = "ASC",
12
+ DESC = "DESC"
13
+ }
14
+ /**
15
+ * reactions to posts
16
+ *
17
+ * @export
18
+ * @enum {string}
19
+ */
20
+ export declare enum PostReaction {
21
+ CLAPPING_HANDS = "clapping_hands",
22
+ CONFUSED = "confused",
23
+ DOWN_ARROW = "down_arrow",
24
+ EYES = "eyes",
25
+ FACE_WITH_TEARS_OF_JOY = "face_with_tears_of_joy",
26
+ FIRE = "fire",
27
+ GRINNING = "grinning",
28
+ HEART = "heart",
29
+ LAUGH = "laugh",
30
+ ONE_HUNDRED = "one_hundred",
31
+ PARTYING = "partying",
32
+ PARTY_POPPER = "party_popper",
33
+ RAISING_HANDS = "raising_hands",
34
+ ROCKET = "rocket",
35
+ SAD = "sad",
36
+ SLIGHTLY_SMILING = "slightly_smiling",
37
+ SURPRISED = "surprised",
38
+ THINKING = "thinking",
39
+ THUMBS_UP = "thumbs_up",
40
+ THUMBS_DOWN = "thumbs_down",
41
+ TROPHY = "trophy",
42
+ UP_ARROW = "up_arrow",
43
+ WAVING_HAND = "waving_hand",
44
+ WINKING = "winking",
45
+ WORLD_MAP = "world_map"
46
+ }
47
+ /**
48
+ * platform sharing access values
49
+ *
50
+ * @export
51
+ * @enum {string}
52
+ */
53
+ export declare enum SharingAccess {
54
+ PUBLIC = "public",
55
+ ORG = "org",
56
+ PRIVATE = "private"
57
+ }
58
+ /**
59
+ * representation of AGOL platform sharing ACL
60
+ * NOTE: orgs is an array to enable future org-org sharing/discussion
61
+ *
62
+ * @export
63
+ * @interface IPlatformSharing
64
+ */
65
+ export interface IPlatformSharing {
66
+ groups: string[];
67
+ orgs: string[];
68
+ access: SharingAccess;
69
+ }
70
+ /**
71
+ * possible statuses of a post
72
+ *
73
+ * @export
74
+ * @enum {string}
75
+ */
76
+ export declare enum PostStatus {
77
+ PENDING = "pending",
78
+ APPROVED = "approved",
79
+ REJECTED = "rejected",
80
+ DELETED = "deleted",
81
+ HIDDEN = "hidden"
82
+ }
83
+ /**
84
+ * possible discussionn content types, i.e. a post can be about an item, dataset, or group
85
+ *
86
+ * @export
87
+ * @enum {string}
88
+ */
89
+ export declare enum DiscussionType {
90
+ GROUP = "group",
91
+ CONTENT = "content",
92
+ BOARD = "board"
93
+ }
94
+ /**
95
+ * source of a post, i.e. app context
96
+ *
97
+ * @export
98
+ * @enum {string}
99
+ */
100
+ export declare enum DiscussionSource {
101
+ HUB = "hub",
102
+ AGO = "ago",
103
+ URBAN = "urban"
104
+ }
105
+ /**
106
+ * named parts of a discussion URI, follows this convention:
107
+ * ${source}://${type}/${id}_${layer}?features=${...features}&attribute=${attribute}
108
+ *
109
+ * coarse-grained uri - hub://item/ab3 -- commenting from hub about item ab3
110
+ * --
111
+ * fine-grained uri - hub://dataset/3ef_0?features=10,32&attribute=species -- commenting from
112
+ * hub about species attribute of features id 10 & 32 in dataset 3ef layer 0
113
+ *
114
+ * @export
115
+ * @interface IDiscussionParams
116
+ */
117
+ export interface IDiscussionParams {
118
+ source: string | null;
119
+ type: string | null;
120
+ id: string | null;
121
+ layer: string | null;
122
+ features: string[] | null;
123
+ attribute: string | null;
124
+ }
125
+ /**
126
+ * relations of post entity
127
+ *
128
+ * @export
129
+ * @enum {string}
130
+ */
131
+ export declare enum PostRelation {
132
+ REPLIES = "replies",
133
+ REACTIONS = "reactions",
134
+ PARENT = "parent",
135
+ CHANNEL = "channel"
136
+ }
137
+ /**
138
+ * relations of reaction entity
139
+ *
140
+ * @export
141
+ * @enum {string}
142
+ */
143
+ export declare enum ReactionRelation {
144
+ POST = "post"
145
+ }
146
+ /**
147
+ * filters of channel entity
148
+ *
149
+ * @export
150
+ * @enum {string}
151
+ */
152
+ export declare enum ChannelFilter {
153
+ HAS_USER_POSTS = "has_user_posts"
154
+ }
155
+ /**
156
+ * @export
157
+ * @enum {string}
158
+ */
159
+ export declare enum CommonSort {
160
+ CREATED_AT = "createdAt",
161
+ CREATOR = "creator",
162
+ EDITOR = "editor",
163
+ ID = "id",
164
+ UPDATED_AT = "updatedAt"
165
+ }
166
+ /**
167
+ * creator property
168
+ *
169
+ * @export
170
+ * @interface IWithAuthor
171
+ */
172
+ export interface IWithAuthor {
173
+ creator: string;
174
+ }
175
+ /**
176
+ * editor property
177
+ *
178
+ * @export
179
+ * @interface IWithEditor
180
+ */
181
+ export interface IWithEditor {
182
+ editor: string;
183
+ }
184
+ /**
185
+ * sorting properties
186
+ *
187
+ * @export
188
+ * @interface IWithSorting
189
+ */
190
+ export interface IWithSorting<SortEnum> {
191
+ sortBy: SortEnum;
192
+ sortOrder: SortOrder;
193
+ }
194
+ /**
195
+ * filtering properties
196
+ *
197
+ * @export
198
+ * @interface IWithFiltering
199
+ */
200
+ export interface IWithFiltering<FilterEnum> {
201
+ filterBy: FilterEnum;
202
+ }
203
+ /**
204
+ * properties that enable temporal querying
205
+ *
206
+ * @export
207
+ * @interface IWithTimeQueries
208
+ */
209
+ export interface IWithTimeQueries {
210
+ createdBefore: Date;
211
+ createdAfter: Date;
212
+ updatedBefore: Date;
213
+ updatedAfter: Date;
214
+ }
215
+ /**
216
+ * temporal properties
217
+ *
218
+ * @export
219
+ * @interface IWithTimestamps
220
+ */
221
+ export interface IWithTimestamps {
222
+ createdAt: Date;
223
+ updatedAt: Date;
224
+ }
225
+ /**
226
+ * paginated response properties
227
+ *
228
+ * @export
229
+ * @interface IPagedResponse
230
+ * @extends {IRestPagedResponse}
231
+ * @template PaginationObject
232
+ */
233
+ export interface IPagedResponse<PaginationObject> extends IRestPagedResponse {
234
+ items: PaginationObject[];
235
+ }
236
+ /**
237
+ * delete notifications opt out response properties
238
+ *
239
+ * @export
240
+ * @interface IRemoveChannelNotificationOptOutResult
241
+ */
242
+ export interface IRemoveChannelNotificationOptOutResult {
243
+ success: boolean;
244
+ channelId: string;
245
+ username: string;
246
+ }
247
+ /**
248
+ * delete channel activity response properties
249
+ *
250
+ * @export
251
+ * @interface IRemoveChannelActivityResult
252
+ */
253
+ export interface IRemoveChannelActivityResult {
254
+ success: boolean;
255
+ channelId: string;
256
+ username: string;
257
+ }
258
+ /**
259
+ * opt out response properties
260
+ *
261
+ * @export
262
+ * @interface IChannelNotificationOptOut
263
+ */
264
+ export interface IChannelNotificationOptOut {
265
+ channelId: string;
266
+ username: string;
267
+ }
268
+ /**
269
+ * options for making requests against Discussion API
270
+ *
271
+ * @export
272
+ * @interface IDiscussionsRequestOptions
273
+ * @extends {RequestInit}
274
+ */
275
+ export interface IDiscussionsRequestOptions extends Omit<IHubRequestOptions, "httpMethod" | "isPortal">, Pick<RequestInit, "mode" | "cache" | "credentials"> {
276
+ httpMethod?: "GET" | "POST" | "PATCH" | "DELETE";
277
+ isPortal?: boolean;
278
+ token?: string;
279
+ data?: {
280
+ [key: string]: any;
281
+ };
282
+ }
283
+ /**
284
+ * Role types
285
+ *
286
+ * @export
287
+ * @enum {string}
288
+ */
289
+ export declare enum Role {
290
+ READ = "read",
291
+ WRITE = "write",
292
+ READWRITE = "readWrite",
293
+ MODERATE = "moderate",
294
+ MANAGE = "manage",
295
+ OWNER = "owner"
296
+ }
297
+ /**
298
+ * Interface representing the meta data associated with a discussions
299
+ * mention email
300
+ *
301
+ * @export
302
+ * @interface IDiscussionsMentionMeta
303
+ */
304
+ export interface IDiscussionsMentionMeta {
305
+ channelId: string;
306
+ discussion: string;
307
+ postId: string;
308
+ replyId?: string;
309
+ }
310
+ /**
311
+ * @export
312
+ * @interface IDiscussionsUser
313
+ * @extends {IUser}
314
+ */
315
+ export interface IDiscussionsUser extends IUser {
316
+ username?: string | null;
317
+ }
318
+ /**
319
+ * representation of reaction from the service
320
+ *
321
+ * @export
322
+ * @interface IReaction
323
+ * @extends {IWithAuthor}
324
+ * @extends {IWithEditor}
325
+ * @extends {IWithTimestamps}
326
+ */
327
+ export interface IReaction extends IWithAuthor, IWithEditor, IWithTimestamps {
328
+ id: string;
329
+ value: PostReaction;
330
+ postId?: string;
331
+ post?: IPost;
332
+ }
333
+ /**
334
+ * dto for creating a reaction
335
+ *
336
+ * @export
337
+ * @interface ICreateReaction
338
+ */
339
+ export interface ICreateReaction {
340
+ postId: string;
341
+ value: PostReaction;
342
+ }
343
+ /**
344
+ * request options for creating a reaction to a post
345
+ *
346
+ * @export
347
+ * @interface ICreateReactionOptions
348
+ * @extends {IHubRequestOptions}
349
+ */
350
+ export interface ICreateReactionOptions extends IDiscussionsRequestOptions {
351
+ data: ICreateReaction;
352
+ }
353
+ /**
354
+ * request options for deleting a reaction
355
+ *
356
+ * @export
357
+ * @interface IRemoveReactionOptions
358
+ * @extends {IHubRequestOptions}
359
+ */
360
+ export interface IRemoveReactionOptions extends IDiscussionsRequestOptions {
361
+ reactionId: string;
362
+ }
363
+ /**
364
+ * delete reaction response properties
365
+ *
366
+ * @export
367
+ * @interface IRemoveReactionResponse
368
+ */
369
+ export interface IRemoveReactionResponse {
370
+ success: boolean;
371
+ reactionId: string;
372
+ }
373
+ /**
374
+ * Post sorting fields
375
+ *
376
+ * @export
377
+ * @enum {string}
378
+ */
379
+ export declare enum PostSort {
380
+ BODY = "body",
381
+ CHANNEL_ID = "channelId",
382
+ CREATED_AT = "createdAt",
383
+ CREATOR = "creator",
384
+ DISCUSSION = "discussion",
385
+ EDITOR = "editor",
386
+ ID = "id",
387
+ PARENT_ID = "parentId",
388
+ STATUS = "status",
389
+ TITLE = "title",
390
+ UPDATED_AT = "updatedAt"
391
+ }
392
+ /**
393
+ * Post types
394
+ *
395
+ * @export
396
+ * @enum{string}
397
+ */
398
+ export declare enum PostType {
399
+ Text = "text",
400
+ Announcement = "announcement",
401
+ Poll = "poll",
402
+ Question = "question"
403
+ }
404
+ /**
405
+ * representation of post from service
406
+ *
407
+ * @export
408
+ * @interface IPost
409
+ * @extends {IWithAuthor}
410
+ * @extends {IWithEditor}
411
+ * @extends {IWithTimestamps}
412
+ */
413
+ export interface IPost extends Partial<IWithAuthor>, Partial<IWithEditor>, IWithTimestamps {
414
+ id: string;
415
+ title: string | null;
416
+ body: string;
417
+ status: PostStatus;
418
+ appInfo: string | null;
419
+ discussion: string | null;
420
+ geometry: Geometry | null;
421
+ featureGeometry: Geometry | null;
422
+ postType: PostType;
423
+ channelId?: string;
424
+ channel?: IChannel;
425
+ parentId?: string;
426
+ parent?: IPost | null;
427
+ replies?: IPost[] | IPagedResponse<IPost>;
428
+ replyCount?: number;
429
+ reactions?: IReaction[];
430
+ }
431
+ /**
432
+ * base parameters for creating a post
433
+ *
434
+ * @export
435
+ * @interface IPostOptions
436
+ */
437
+ export interface IPostOptions {
438
+ body: string;
439
+ title?: string;
440
+ discussion?: string;
441
+ geometry?: Geometry;
442
+ featureGeometry?: Geometry;
443
+ appInfo?: string;
444
+ asAnonymous?: boolean;
445
+ }
446
+ /**
447
+ * dto for creating a post in a known channel
448
+ *
449
+ * @export
450
+ * @interface ICreatePost
451
+ * @extends {IPostOptions}
452
+ */
453
+ export interface ICreatePost extends IPostOptions {
454
+ channelId: string;
455
+ }
456
+ /**
457
+ * dto for creating a post in a unknown or not yet created channel
458
+ *
459
+ * @export
460
+ * @interface ICreateChannelPost
461
+ * @extends {IPostOptions}
462
+ * @extends {ICreateChannel}
463
+ */
464
+ export interface ICreateChannelPost extends IPostOptions, ICreateChannel {
465
+ }
466
+ /**
467
+ * request options for creating post
468
+ *
469
+ * @export
470
+ * @interface ICreatePostParams
471
+ * @extends {IHubRequestOptions}
472
+ */
473
+ export interface ICreatePostParams extends IDiscussionsRequestOptions {
474
+ data: ICreatePost | ICreateChannelPost;
475
+ mentionUrl?: string;
476
+ }
477
+ /**
478
+ * request options for creating reply to post
479
+ *
480
+ * @export
481
+ * @interface ICreateReplyParams
482
+ * @extends {IHubRequestOptions}
483
+ */
484
+ export interface ICreateReplyParams extends IDiscussionsRequestOptions {
485
+ postId: string;
486
+ data: IPostOptions;
487
+ mentionUrl?: string;
488
+ }
489
+ /**
490
+ * dto for decorating found post with relations
491
+ *
492
+ * @export
493
+ * @interface IFetchPost
494
+ */
495
+ export interface IFetchPost {
496
+ relations?: PostRelation[];
497
+ }
498
+ /**
499
+ * dto for querying posts in a single channel
500
+ *
501
+ * @export
502
+ * @interface ISearchChannelPosts
503
+ * @extends {Partial<IWithAuthor>}
504
+ * @extends {Partial<IWithEditor>}
505
+ * @extends {Partial<IPagingParams>}
506
+ * @extends {Partial<IWithSorting<PostSort>>}
507
+ * @extends {Partial<IWithTimeQueries>}
508
+ */
509
+ export interface ISearchPosts extends Partial<IWithAuthor>, Partial<IWithEditor>, Partial<IPagingParams>, Partial<IWithSorting<PostSort>>, Partial<IWithTimeQueries> {
510
+ title?: string;
511
+ body?: string;
512
+ discussion?: string;
513
+ geometry?: Geometry;
514
+ featureGeometry?: Geometry;
515
+ parents?: Array<string | null>;
516
+ status?: PostStatus[];
517
+ relations?: PostRelation[];
518
+ groups?: string[];
519
+ access?: SharingAccess[];
520
+ channels?: string[];
521
+ }
522
+ /**
523
+ * dto for updating a post's status
524
+ *
525
+ * @export
526
+ * @interface IUpdatePostStatus
527
+ */
528
+ export interface IUpdatePostStatus {
529
+ status: PostStatus;
530
+ }
531
+ /**
532
+ * dto for updating a post's content
533
+ *
534
+ * @export
535
+ * @interface IUpdatePost
536
+ */
537
+ export interface IUpdatePost {
538
+ title?: string;
539
+ body?: string;
540
+ discussion?: string | null;
541
+ geometry?: Geometry | null;
542
+ featureGeometry?: Geometry | null;
543
+ appInfo?: string | null;
544
+ }
545
+ /**
546
+ * request options for querying posts
547
+ *
548
+ * @export
549
+ * @interface ISearchPostsParams
550
+ * @extends {IDiscussionsRequestOptions}
551
+ */
552
+ export interface ISearchPostsParams extends IDiscussionsRequestOptions {
553
+ data?: ISearchPosts;
554
+ }
555
+ /**
556
+ * request params for getting post
557
+ *
558
+ * @export
559
+ * @interface IFetchPostParams
560
+ * @extends {IDiscussionsRequestOptions}
561
+ */
562
+ export interface IFetchPostParams extends IDiscussionsRequestOptions {
563
+ postId: string;
564
+ data?: IFetchPost;
565
+ }
566
+ /**
567
+ * request options for updating post
568
+ *
569
+ * @export
570
+ * @interface IUpdatePostParams
571
+ * @extends {IDiscussionsRequestOptions}
572
+ */
573
+ export interface IUpdatePostParams extends IDiscussionsRequestOptions {
574
+ postId: string;
575
+ data: IUpdatePost;
576
+ mentionUrl?: string;
577
+ }
578
+ /**
579
+ * request options for updating a post's status
580
+ *
581
+ * @export
582
+ * @interface IUpdatePostStatusParams
583
+ * @extends {IDiscussionsRequestOptions}
584
+ */
585
+ export interface IUpdatePostStatusParams extends IDiscussionsRequestOptions {
586
+ postId: string;
587
+ data: IUpdatePostStatus;
588
+ }
589
+ /**
590
+ * request options for deleting a post
591
+ *
592
+ * @export
593
+ * @interface IRemovePostParams
594
+ * @extends {IDiscussionsRequestOptions}
595
+ */
596
+ export interface IRemovePostParams extends IDiscussionsRequestOptions {
597
+ postId: string;
598
+ }
599
+ /**
600
+ * delete post response properties
601
+ *
602
+ * @export
603
+ * @interface IRemovePostResponse
604
+ */
605
+ export interface IRemovePostResponse {
606
+ success: boolean;
607
+ postId: string;
608
+ }
609
+ /**
610
+ * Channel sorting fields
611
+ *
612
+ * @export
613
+ * @enum {string}
614
+ */
615
+ export declare enum ChannelSort {
616
+ ACCESS = "access",
617
+ CREATED_AT = "createdAt",
618
+ CREATOR = "creator",
619
+ EDITOR = "editor",
620
+ ID = "id",
621
+ LAST_ACTIVITY = "last_activity",
622
+ UPDATED_AT = "updatedAt"
623
+ }
624
+ /**
625
+ * relations of channel entity
626
+ *
627
+ * @export
628
+ * @enum {string}
629
+ */
630
+ export declare enum ChannelRelation {
631
+ CHANNEL_ACL = "channelAcl"
632
+ }
633
+ /**
634
+ * @export
635
+ * @enum {string}
636
+ */
637
+ export declare enum AclCategory {
638
+ GROUP = "group",
639
+ ORG = "org",
640
+ USER = "user",
641
+ ANONYMOUS_USER = "anonymousUser",
642
+ AUTHENTICATED_USER = "authenticatedUser"
643
+ }
644
+ /**
645
+ * @export
646
+ * @enum {string}
647
+ */
648
+ export declare enum AclSubCategory {
649
+ ADMIN = "admin",
650
+ MEMBER = "member"
651
+ }
652
+ /**
653
+ * request option for creating a channel ACL permission
654
+ *
655
+ * @export
656
+ * @interface IChannelAclPermissionDefinition
657
+ */
658
+ export interface IChannelAclPermissionDefinition {
659
+ category: AclCategory;
660
+ subCategory?: AclSubCategory;
661
+ key?: string;
662
+ role: Role;
663
+ restrictedBefore?: string;
664
+ }
665
+ /**
666
+ * request option for updating a channel ACL permission
667
+ *
668
+ * @export
669
+ * @interface IChannelAclPermissionUpdateDefinition
670
+ * @extends {IChannelAclPermissionDefinition}
671
+ */
672
+ export interface IChannelAclPermissionUpdateDefinition extends IChannelAclPermissionDefinition {
673
+ channelId: string;
674
+ }
675
+ /**
676
+ * representation of channel Acl permission from service
677
+ *
678
+ * @export
679
+ * @interface IChannelAclPermission
680
+ * @extends {IChannelAclDefinition}
681
+ * @extends {IWithAuthor}
682
+ * @extends {IWithEditor}
683
+ * @extends {IWithTimestamps}
684
+ */
685
+ export interface IChannelAclPermission extends Omit<IChannelAclPermissionDefinition, "restrictedBefore">, IWithAuthor, IWithEditor, IWithTimestamps {
686
+ id: string;
687
+ restrictedBefore: string;
688
+ }
689
+ /**
690
+ * settings parameters for creating a channel
691
+ *
692
+ * @export
693
+ * @interface ICreateChannelSettings
694
+ */
695
+ export interface ICreateChannelSettings {
696
+ allowedReactions?: PostReaction[];
697
+ allowReaction?: boolean;
698
+ allowReply?: boolean;
699
+ blockWords?: string[];
700
+ defaultPostStatus?: PostStatus;
701
+ metadata?: IChannelMetadata;
702
+ name?: string;
703
+ softDelete?: boolean;
704
+ }
705
+ /**
706
+ * @export
707
+ * @interface IChannelMetadata
708
+ */
709
+ export interface IChannelMetadata {
710
+ guidelineUrl?: string | null;
711
+ }
712
+ /**
713
+ * permissions parameters for creating a channel
714
+ *
715
+ * @export
716
+ * @interface ICreateChannelPermissions
717
+ */
718
+ export interface ICreateChannelPermissions {
719
+ access?: SharingAccess;
720
+ allowAnonymous?: boolean;
721
+ groups?: string[];
722
+ orgs?: string[];
723
+ /**
724
+ * Not available until the V2 Api is released
725
+ * @hidden
726
+ */
727
+ channelAclDefinition?: IChannelAclPermissionDefinition[];
728
+ }
729
+ /**
730
+ * permissions parameters for updating a channel
731
+ *
732
+ * @export
733
+ * @interface IUpdateChannelPermissions
734
+ */
735
+ export interface IUpdateChannelPermissions {
736
+ access?: SharingAccess;
737
+ allowAnonymous?: boolean;
738
+ }
739
+ /**
740
+ * permissions and settings options for creating a channel
741
+ *
742
+ * @export
743
+ * @interface ICreateChannel
744
+ * @extends {ICreateChannelSettings}
745
+ * @extends {ICreateChannelPermissions}
746
+ */
747
+ export interface ICreateChannel extends ICreateChannelSettings, ICreateChannelPermissions {
748
+ }
749
+ /**
750
+ * representation of channel from service
751
+ *
752
+ * @export
753
+ * @interface IChannel
754
+ * @extends {IWithAuthor}
755
+ * @extends {IWithEditor}
756
+ * @extends {IWithTimestamps}
757
+ */
758
+ export interface IChannel extends IWithAuthor, IWithEditor, IWithTimestamps {
759
+ access: SharingAccess;
760
+ allowAnonymous: boolean;
761
+ allowedReactions: PostReaction[] | null;
762
+ allowReaction: boolean;
763
+ allowReply: boolean;
764
+ blockWords: string[] | null;
765
+ channelAcl?: IChannelAclPermission[];
766
+ defaultPostStatus: PostStatus;
767
+ groups: string[];
768
+ metadata: IChannelMetadata | null;
769
+ id: string;
770
+ name: string | null;
771
+ orgs: string[];
772
+ posts?: IPost[];
773
+ softDelete: boolean;
774
+ }
775
+ /**
776
+ * parameters/options for updating channel settings
777
+ *
778
+ * @export
779
+ * @interface IUpdateChannel
780
+ * @extends {ICreateChannelSettings}
781
+ * @extends {IUpdateChannelPermissions}
782
+ * @extends {Partial<IWithAuthor>}
783
+ */
784
+ export interface IUpdateChannel extends ICreateChannelSettings, IUpdateChannelPermissions, Partial<IWithAuthor> {
785
+ }
786
+ /**
787
+ * dto for decorating found channel with relations
788
+ *
789
+ * @export
790
+ * @interface IFetchChannel
791
+ */
792
+ export interface IFetchChannel {
793
+ relations?: ChannelRelation[];
794
+ }
795
+ /**
796
+ * dto for querying channels
797
+ *
798
+ * @export
799
+ * @interface ISearchChannels
800
+ * @extends {Partial<IPagingParams>}
801
+ * @extends {Partial<IWithSorting<ChannelSort>>}
802
+ * @extends {Partial<IWithTimeQueries>}
803
+ * @extends {Partial<IWithFiltering<ChannelFilter>>}
804
+ */
805
+ export interface ISearchChannels extends Partial<IPagingParams>, Partial<IWithSorting<ChannelSort>>, Partial<IWithTimeQueries>, Partial<IWithFiltering<ChannelFilter>> {
806
+ groups?: string[];
807
+ access?: SharingAccess[];
808
+ relations?: ChannelRelation[];
809
+ }
810
+ /**
811
+ * request params for creating a channel
812
+ *
813
+ * @export
814
+ * @interface ICreateChannelParams
815
+ * @extends {IDiscussionsRequestOptions}
816
+ */
817
+ export interface ICreateChannelParams extends IDiscussionsRequestOptions {
818
+ data: ICreateChannel;
819
+ }
820
+ /**
821
+ * request params for getting a channel
822
+ *
823
+ * @export
824
+ * @interface IFetchChannelParams
825
+ * @extends {IDiscussionsRequestOptions}
826
+ */
827
+ export interface IFetchChannelParams extends IDiscussionsRequestOptions {
828
+ channelId: string;
829
+ data?: IFetchChannel;
830
+ }
831
+ /**
832
+ * request params for searching channels
833
+ *
834
+ * @export
835
+ * @interface ISearchChannelsParams
836
+ * @extends {IDiscussionsRequestOptions}
837
+ */
838
+ export interface ISearchChannelsParams extends IDiscussionsRequestOptions {
839
+ data?: ISearchChannels;
840
+ }
841
+ /**
842
+ * request params for updating a channel's settings
843
+ *
844
+ * @export
845
+ * @interface IUpdateChannelParams
846
+ * @extends {IDiscussionsRequestOptions}
847
+ */
848
+ export interface IUpdateChannelParams extends IDiscussionsRequestOptions {
849
+ channelId: string;
850
+ data: IUpdateChannel;
851
+ }
852
+ /**
853
+ * request params for deleting a channel
854
+ *
855
+ * @export
856
+ * @interface IRemoveChannelParams
857
+ * @extends {IDiscussionsRequestOptions}
858
+ */
859
+ export interface IRemoveChannelParams extends IDiscussionsRequestOptions {
860
+ channelId: string;
861
+ }
862
+ /**
863
+ * delete channel response properties
864
+ *
865
+ * @export
866
+ * @interface IRemoveChannelResponse
867
+ */
868
+ export interface IRemoveChannelResponse {
869
+ success: boolean;
870
+ channelId: string;
871
+ }
872
+ /**
873
+ * request params for fetching opt out status
874
+ *
875
+ * @export
876
+ * @interface IFetchChannelNotificationOptOutParams
877
+ * @extends {IDiscussionsRequestOptions}
878
+ */
879
+ export interface IFetchChannelNotificationOptOutParams extends IDiscussionsRequestOptions {
880
+ channelId: string;
881
+ }
882
+ /**
883
+ * request params for opting out
884
+ *
885
+ * @export
886
+ * @interface ICreateChannelNotificationOptOutParams
887
+ * @extends {IDiscussionsRequestOptions}
888
+ */
889
+ export interface ICreateChannelNotificationOptOutParams extends IDiscussionsRequestOptions {
890
+ channelId: string;
891
+ }
892
+ /**
893
+ * request params for opting back in
894
+ *
895
+ * @export
896
+ * @interface IRemoveChannelNotificationOptOutParams
897
+ * @extends {IDiscussionsRequestOptions}
898
+ */
899
+ export interface IRemoveChannelNotificationOptOutParams extends IDiscussionsRequestOptions {
900
+ channelId: string;
901
+ }
902
+ /**
903
+ * request params for deleting channel activity
904
+ *
905
+ * @export
906
+ * @interface IRemoveChannelActivityParams
907
+ * @extends {IDiscussionsRequestOptions}
908
+ */
909
+ export interface IRemoveChannelActivityParams extends IDiscussionsRequestOptions {
910
+ channelId: string;
911
+ }
912
+ /**
913
+ * representation of a discussion setting record from the service
914
+ *
915
+ * @export
916
+ * @interface IDiscussionSetting
917
+ * @extends {IWithAuthor}
918
+ * @extends {IWithEditor}
919
+ * @extends {IWithTimestamps}
920
+ */
921
+ export interface IDiscussionSetting extends IWithAuthor, IWithEditor, IWithTimestamps {
922
+ id: string;
923
+ type: DiscussionSettingType;
924
+ settings: ISettings;
925
+ }
926
+ /**
927
+ * @export
928
+ * @enum {string}
929
+ */
930
+ export declare enum DiscussionSettingType {
931
+ CONTENT = "content"
932
+ }
933
+ /**
934
+ * @export
935
+ * @interface ISettings
936
+ */
937
+ export interface ISettings {
938
+ allowedChannelIds: string[] | null;
939
+ }
940
+ /**
941
+ * @export
942
+ * @interface IRemoveDiscussionSettingResponse
943
+ */
944
+ export interface IRemoveDiscussionSettingResponse {
945
+ id: string;
946
+ success: boolean;
947
+ }
948
+ /**
949
+ * @export
950
+ * @interface ICreateDiscussionSetting
951
+ */
952
+ export interface ICreateDiscussionSetting {
953
+ id: string;
954
+ type: DiscussionSettingType;
955
+ settings: ISettings;
956
+ }
957
+ /**
958
+ * parameters for creating a discussionSetting
959
+ *
960
+ * @export
961
+ * @interface ICreateDiscussionSettingParams
962
+ * @extends {IDiscussionsRequestOptions}
963
+ */
964
+ export interface ICreateDiscussionSettingParams extends IDiscussionsRequestOptions {
965
+ data: ICreateDiscussionSetting;
966
+ }
967
+ /**
968
+ * parameters for fetching a discussionSetting
969
+ *
970
+ * @export
971
+ * @interface IFetchDiscussionSettingParams
972
+ * @extends {IDiscussionsRequestOptions}
973
+ */
974
+ export interface IFetchDiscussionSettingParams extends IDiscussionsRequestOptions {
975
+ id: string;
976
+ }
977
+ /**
978
+ * parameters for removing a discussionSetting
979
+ *
980
+ * @export
981
+ * @interface IRemoveDiscussionSettingParams
982
+ * @extends {IDiscussionsRequestOptions}
983
+ */
984
+ export interface IRemoveDiscussionSettingParams extends IDiscussionsRequestOptions {
985
+ id: string;
986
+ }