@gleanwork/api-client 0.2.0 → 0.3.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 (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -10
  3. package/dist/commonjs/__tests__/adminsearch.test.js +1783 -12
  4. package/dist/commonjs/__tests__/adminsearch.test.js.map +1 -1
  5. package/dist/commonjs/__tests__/announcements.test.js +3922 -2
  6. package/dist/commonjs/__tests__/announcements.test.js.map +1 -1
  7. package/dist/commonjs/__tests__/answers.test.js +1315 -30
  8. package/dist/commonjs/__tests__/answers.test.js.map +1 -1
  9. package/dist/commonjs/__tests__/chat.test.js +19803 -1532
  10. package/dist/commonjs/__tests__/chat.test.js.map +1 -1
  11. package/dist/commonjs/__tests__/clientsearch.test.js +3850 -142
  12. package/dist/commonjs/__tests__/clientsearch.test.js.map +1 -1
  13. package/dist/commonjs/__tests__/clientshortcuts.test.js +1051 -8
  14. package/dist/commonjs/__tests__/clientshortcuts.test.js.map +1 -1
  15. package/dist/commonjs/__tests__/collections.test.js +1053 -8
  16. package/dist/commonjs/__tests__/collections.test.js.map +1 -1
  17. package/dist/commonjs/lib/config.d.ts +6 -6
  18. package/dist/commonjs/lib/config.d.ts.map +1 -1
  19. package/dist/commonjs/lib/config.js +5 -5
  20. package/dist/commonjs/lib/config.js.map +1 -1
  21. package/dist/esm/__tests__/adminsearch.test.js +1783 -12
  22. package/dist/esm/__tests__/adminsearch.test.js.map +1 -1
  23. package/dist/esm/__tests__/announcements.test.js +3922 -2
  24. package/dist/esm/__tests__/announcements.test.js.map +1 -1
  25. package/dist/esm/__tests__/answers.test.js +1315 -30
  26. package/dist/esm/__tests__/answers.test.js.map +1 -1
  27. package/dist/esm/__tests__/chat.test.js +19803 -1532
  28. package/dist/esm/__tests__/chat.test.js.map +1 -1
  29. package/dist/esm/__tests__/clientsearch.test.js +3850 -142
  30. package/dist/esm/__tests__/clientsearch.test.js.map +1 -1
  31. package/dist/esm/__tests__/clientshortcuts.test.js +1051 -8
  32. package/dist/esm/__tests__/clientshortcuts.test.js.map +1 -1
  33. package/dist/esm/__tests__/collections.test.js +1053 -8
  34. package/dist/esm/__tests__/collections.test.js.map +1 -1
  35. package/dist/esm/lib/config.d.ts +6 -6
  36. package/dist/esm/lib/config.d.ts.map +1 -1
  37. package/dist/esm/lib/config.js +5 -5
  38. package/dist/esm/lib/config.js.map +1 -1
  39. package/docs/sdks/announcements/README.md +7846 -4
  40. package/docs/sdks/answers/README.md +2910 -340
  41. package/docs/sdks/clientshortcuts/README.md +2120 -34
  42. package/docs/sdks/collections/README.md +2124 -34
  43. package/docs/sdks/search/README.md +11601 -643
  44. package/jsr.json +1 -1
  45. package/package.json +2 -1
  46. package/src/__tests__/adminsearch.test.ts +1790 -12
  47. package/src/__tests__/announcements.test.ts +3936 -2
  48. package/src/__tests__/answers.test.ts +1324 -30
  49. package/src/__tests__/chat.test.ts +20119 -1599
  50. package/src/__tests__/clientsearch.test.ts +3867 -146
  51. package/src/__tests__/clientshortcuts.test.ts +1061 -8
  52. package/src/__tests__/collections.test.ts +1062 -8
  53. package/src/lib/config.ts +7 -7
@@ -38,7 +38,328 @@ test("Collections Createcollection", async () => {
38
38
  person: {
39
39
  name: "George Clooney",
40
40
  obfuscatedId: "abc123",
41
- relatedDocuments: [],
41
+ relatedDocuments: [
42
+ {
43
+ querySuggestion: {
44
+ query: "app:github type:pull author:mortimer",
45
+ searchProviderInfo: {
46
+ name: "Google",
47
+ searchLinkUrlTemplate:
48
+ "https://www.google.com/search?q={query}&hl=en",
49
+ },
50
+ label: "Mortimer's PRs",
51
+ datasource: "github",
52
+ requestOptions: {
53
+ datasourceFilter: "JIRA",
54
+ datasourcesFilter: [
55
+ "JIRA",
56
+ ],
57
+ queryOverridesFacetFilters: true,
58
+ facetFilters: [
59
+ {
60
+ fieldName: "type",
61
+ values: [
62
+ {
63
+ value: "Spreadsheet",
64
+ relationType: "EQUALS",
65
+ },
66
+ {
67
+ value: "Presentation",
68
+ relationType: "EQUALS",
69
+ },
70
+ ],
71
+ },
72
+ ],
73
+ facetFilterSets: [
74
+ {
75
+ filters: [
76
+ {
77
+ fieldName: "type",
78
+ values: [
79
+ {
80
+ value: "Spreadsheet",
81
+ relationType: "EQUALS",
82
+ },
83
+ {
84
+ value: "Presentation",
85
+ relationType: "EQUALS",
86
+ },
87
+ ],
88
+ },
89
+ ],
90
+ },
91
+ {
92
+ filters: [
93
+ {
94
+ fieldName: "type",
95
+ values: [
96
+ {
97
+ value: "Spreadsheet",
98
+ relationType: "EQUALS",
99
+ },
100
+ {
101
+ value: "Presentation",
102
+ relationType: "EQUALS",
103
+ },
104
+ ],
105
+ },
106
+ ],
107
+ },
108
+ ],
109
+ facetBucketSize: 134365,
110
+ authTokens: [
111
+ {
112
+ accessToken: "123abc",
113
+ datasource: "gmail",
114
+ scope:
115
+ "email profile https://www.googleapis.com/auth/gmail.readonly",
116
+ tokenType: "Bearer",
117
+ authUser: "1",
118
+ },
119
+ ],
120
+ },
121
+ ranges: [
122
+ {
123
+ startIndex: 796474,
124
+ document: {
125
+ metadata: {
126
+ datasource: "datasource",
127
+ objectType: "Feature Request",
128
+ container: "container",
129
+ parentId: "JIRA_EN-1337",
130
+ mimeType: "mimeType",
131
+ documentId: "documentId",
132
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
133
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
134
+ components: [
135
+ "Backend",
136
+ "Networking",
137
+ ],
138
+ status: "[\"Done\"]",
139
+ pins: [
140
+ {
141
+ audienceFilters: [
142
+ {
143
+ fieldName: "type",
144
+ values: [
145
+ {
146
+ value: "Spreadsheet",
147
+ relationType: "EQUALS",
148
+ },
149
+ {
150
+ value: "Presentation",
151
+ relationType: "EQUALS",
152
+ },
153
+ ],
154
+ },
155
+ ],
156
+ documentId: "<id>",
157
+ },
158
+ {
159
+ audienceFilters: [
160
+ {
161
+ fieldName: "type",
162
+ values: [
163
+ {
164
+ value: "Spreadsheet",
165
+ relationType: "EQUALS",
166
+ },
167
+ {
168
+ value: "Presentation",
169
+ relationType: "EQUALS",
170
+ },
171
+ ],
172
+ },
173
+ ],
174
+ documentId: "<id>",
175
+ },
176
+ {
177
+ audienceFilters: [
178
+ {
179
+ fieldName: "type",
180
+ values: [
181
+ {
182
+ value: "Spreadsheet",
183
+ relationType: "EQUALS",
184
+ },
185
+ {
186
+ value: "Presentation",
187
+ relationType: "EQUALS",
188
+ },
189
+ ],
190
+ },
191
+ ],
192
+ documentId: "<id>",
193
+ },
194
+ ],
195
+ collections: [
196
+ {
197
+ name: "<value>",
198
+ description: "fumigate convection though zowie",
199
+ audienceFilters: [
200
+ {
201
+ fieldName: "type",
202
+ values: [
203
+ {
204
+ value: "Spreadsheet",
205
+ relationType: "EQUALS",
206
+ },
207
+ {
208
+ value: "Presentation",
209
+ relationType: "EQUALS",
210
+ },
211
+ ],
212
+ },
213
+ ],
214
+ id: 496323,
215
+ items: [
216
+ {
217
+ collectionId: 782367,
218
+ shortcut: {
219
+ inputAlias: "<value>",
220
+ },
221
+ itemType: "URL",
222
+ },
223
+ ],
224
+ },
225
+ ],
226
+ interactions: {
227
+ reacts: [
228
+ {},
229
+ {},
230
+ {},
231
+ ],
232
+ shares: [
233
+ {
234
+ numDaysAgo: 219974,
235
+ },
236
+ {
237
+ numDaysAgo: 449221,
238
+ },
239
+ {
240
+ numDaysAgo: 427887,
241
+ },
242
+ ],
243
+ },
244
+ verification: {
245
+ state: "VERIFIED",
246
+ metadata: {
247
+ reminders: [
248
+ {
249
+ assignee: {
250
+ name: "George Clooney",
251
+ obfuscatedId: "abc123",
252
+ },
253
+ remindAt: 491427,
254
+ },
255
+ ],
256
+ lastReminder: {
257
+ assignee: {
258
+ name: "George Clooney",
259
+ obfuscatedId: "abc123",
260
+ },
261
+ remindAt: 490420,
262
+ },
263
+ },
264
+ },
265
+ shortcuts: [
266
+ {
267
+ inputAlias: "<value>",
268
+ },
269
+ ],
270
+ customData: {
271
+ "someCustomField": {},
272
+ },
273
+ },
274
+ },
275
+ },
276
+ ],
277
+ inputDetails: {
278
+ hasCopyPaste: true,
279
+ },
280
+ },
281
+ results: [
282
+ {
283
+ title: "title",
284
+ url: "https://example.com/foo/bar",
285
+ nativeAppUrl: "slack://foo/bar",
286
+ snippets: [
287
+ {
288
+ snippet: "snippet",
289
+ mimeType: "mimeType",
290
+ },
291
+ ],
292
+ },
293
+ ],
294
+ },
295
+ {
296
+ querySuggestion: {
297
+ query: "app:github type:pull author:mortimer",
298
+ searchProviderInfo: {
299
+ name: "Google",
300
+ searchLinkUrlTemplate:
301
+ "https://www.google.com/search?q={query}&hl=en",
302
+ },
303
+ label: "Mortimer's PRs",
304
+ datasource: "github",
305
+ requestOptions: {
306
+ datasourceFilter: "JIRA",
307
+ datasourcesFilter: [
308
+ "JIRA",
309
+ ],
310
+ queryOverridesFacetFilters: true,
311
+ facetFilters: [
312
+ {
313
+ fieldName: "type",
314
+ values: [
315
+ {
316
+ value: "Spreadsheet",
317
+ relationType: "EQUALS",
318
+ },
319
+ {
320
+ value: "Presentation",
321
+ relationType: "EQUALS",
322
+ },
323
+ ],
324
+ },
325
+ ],
326
+ facetFilterSets: [
327
+ {
328
+ filters: [
329
+ {
330
+ fieldName: "type",
331
+ values: [
332
+ {
333
+ value: "Spreadsheet",
334
+ relationType: "EQUALS",
335
+ },
336
+ {
337
+ value: "Presentation",
338
+ relationType: "EQUALS",
339
+ },
340
+ ],
341
+ },
342
+ ],
343
+ },
344
+ ],
345
+ facetBucketSize: 129663,
346
+ authTokens: [
347
+ {
348
+ accessToken: "123abc",
349
+ datasource: "gmail",
350
+ scope:
351
+ "email profile https://www.googleapis.com/auth/gmail.readonly",
352
+ tokenType: "Bearer",
353
+ authUser: "1",
354
+ },
355
+ ],
356
+ },
357
+ inputDetails: {
358
+ hasCopyPaste: true,
359
+ },
360
+ },
361
+ },
362
+ ],
42
363
  metadata: {
43
364
  type: "FULL_TIME",
44
365
  title: "Actor",
@@ -55,12 +376,32 @@ test("Collections Createcollection", async () => {
55
376
  },
56
377
  ],
57
378
  querySuggestions: {
58
- suggestions: [],
379
+ suggestions: [
380
+ {
381
+ query: "app:github type:pull author:mortimer",
382
+ label: "Mortimer's PRs",
383
+ datasource: "github",
384
+ },
385
+ ],
59
386
  },
60
387
  inviteInfo: {
61
- invites: [],
388
+ invites: [
389
+ {},
390
+ {},
391
+ ],
62
392
  },
63
- customFields: [],
393
+ customFields: [
394
+ {
395
+ label: "<value>",
396
+ values: [
397
+ {},
398
+ ],
399
+ },
400
+ {
401
+ label: "<value>",
402
+ values: [],
403
+ },
404
+ ],
64
405
  badges: [
65
406
  {
66
407
  key: "deployment_name_new_hire",
@@ -78,17 +419,161 @@ test("Collections Createcollection", async () => {
78
419
  role: "OWNER",
79
420
  },
80
421
  {
422
+ person: {
423
+ name: "George Clooney",
424
+ obfuscatedId: "abc123",
425
+ metadata: {
426
+ type: "FULL_TIME",
427
+ title: "Actor",
428
+ department: "Movies",
429
+ email: "george@example.com",
430
+ location: "Hollywood, CA",
431
+ phone: "6505551234",
432
+ photoUrl: "https://example.com/george.jpg",
433
+ startDate: new RFCDate("2000-01-23"),
434
+ datasourceProfile: [
435
+ {
436
+ datasource: "github",
437
+ handle: "<value>",
438
+ },
439
+ ],
440
+ querySuggestions: {},
441
+ inviteInfo: {},
442
+ badges: [
443
+ {
444
+ key: "deployment_name_new_hire",
445
+ displayName: "New hire",
446
+ iconConfig: {
447
+ color: "#343CED",
448
+ key: "person_icon",
449
+ iconType: "GLYPH",
450
+ name: "user",
451
+ },
452
+ },
453
+ ],
454
+ },
455
+ },
81
456
  role: "VERIFIER",
82
457
  },
83
458
  ],
84
459
  removedRoles: [
85
460
  {
461
+ person: {
462
+ name: "George Clooney",
463
+ obfuscatedId: "abc123",
464
+ metadata: {
465
+ type: "FULL_TIME",
466
+ title: "Actor",
467
+ department: "Movies",
468
+ email: "george@example.com",
469
+ location: "Hollywood, CA",
470
+ phone: "6505551234",
471
+ photoUrl: "https://example.com/george.jpg",
472
+ startDate: new RFCDate("2000-01-23"),
473
+ datasourceProfile: [
474
+ {
475
+ datasource: "github",
476
+ handle: "<value>",
477
+ },
478
+ ],
479
+ querySuggestions: {},
480
+ inviteInfo: {},
481
+ badges: [
482
+ {
483
+ key: "deployment_name_new_hire",
484
+ displayName: "New hire",
485
+ iconConfig: {
486
+ color: "#343CED",
487
+ key: "person_icon",
488
+ iconType: "GLYPH",
489
+ name: "user",
490
+ },
491
+ },
492
+ ],
493
+ },
494
+ },
86
495
  role: "VERIFIER",
87
496
  },
88
497
  {
498
+ person: {
499
+ name: "George Clooney",
500
+ obfuscatedId: "abc123",
501
+ metadata: {
502
+ type: "FULL_TIME",
503
+ title: "Actor",
504
+ department: "Movies",
505
+ email: "george@example.com",
506
+ location: "Hollywood, CA",
507
+ phone: "6505551234",
508
+ photoUrl: "https://example.com/george.jpg",
509
+ startDate: new RFCDate("2000-01-23"),
510
+ datasourceProfile: [
511
+ {
512
+ datasource: "github",
513
+ handle: "<value>",
514
+ },
515
+ {
516
+ datasource: "github",
517
+ handle: "<value>",
518
+ },
519
+ {
520
+ datasource: "github",
521
+ handle: "<value>",
522
+ },
523
+ ],
524
+ querySuggestions: {},
525
+ inviteInfo: {},
526
+ badges: [
527
+ {
528
+ key: "deployment_name_new_hire",
529
+ displayName: "New hire",
530
+ iconConfig: {
531
+ color: "#343CED",
532
+ key: "person_icon",
533
+ iconType: "GLYPH",
534
+ name: "user",
535
+ },
536
+ },
537
+ ],
538
+ },
539
+ },
89
540
  role: "ANSWER_MODERATOR",
90
541
  },
91
542
  {
543
+ person: {
544
+ name: "George Clooney",
545
+ obfuscatedId: "abc123",
546
+ metadata: {
547
+ type: "FULL_TIME",
548
+ title: "Actor",
549
+ department: "Movies",
550
+ email: "george@example.com",
551
+ location: "Hollywood, CA",
552
+ phone: "6505551234",
553
+ photoUrl: "https://example.com/george.jpg",
554
+ startDate: new RFCDate("2000-01-23"),
555
+ datasourceProfile: [
556
+ {
557
+ datasource: "github",
558
+ handle: "<value>",
559
+ },
560
+ ],
561
+ querySuggestions: {},
562
+ inviteInfo: {},
563
+ badges: [
564
+ {
565
+ key: "deployment_name_new_hire",
566
+ displayName: "New hire",
567
+ iconConfig: {
568
+ color: "#343CED",
569
+ key: "person_icon",
570
+ iconType: "GLYPH",
571
+ name: "user",
572
+ },
573
+ },
574
+ ],
575
+ },
576
+ },
92
577
  role: "OWNER",
93
578
  },
94
579
  ],
@@ -160,7 +645,407 @@ test("Collections Editcollection", async () => {
160
645
  person: {
161
646
  name: "George Clooney",
162
647
  obfuscatedId: "abc123",
163
- relatedDocuments: [],
648
+ relatedDocuments: [
649
+ {
650
+ querySuggestion: {
651
+ query: "app:github type:pull author:mortimer",
652
+ searchProviderInfo: {
653
+ name: "Google",
654
+ searchLinkUrlTemplate:
655
+ "https://www.google.com/search?q={query}&hl=en",
656
+ },
657
+ label: "Mortimer's PRs",
658
+ datasource: "github",
659
+ requestOptions: {
660
+ datasourceFilter: "JIRA",
661
+ datasourcesFilter: [
662
+ "JIRA",
663
+ ],
664
+ queryOverridesFacetFilters: true,
665
+ facetFilters: [
666
+ {
667
+ fieldName: "type",
668
+ values: [
669
+ {
670
+ value: "Spreadsheet",
671
+ relationType: "EQUALS",
672
+ },
673
+ {
674
+ value: "Presentation",
675
+ relationType: "EQUALS",
676
+ },
677
+ ],
678
+ },
679
+ ],
680
+ facetFilterSets: [
681
+ {
682
+ filters: [
683
+ {
684
+ fieldName: "type",
685
+ values: [
686
+ {
687
+ value: "Spreadsheet",
688
+ relationType: "EQUALS",
689
+ },
690
+ {
691
+ value: "Presentation",
692
+ relationType: "EQUALS",
693
+ },
694
+ ],
695
+ },
696
+ ],
697
+ },
698
+ {
699
+ filters: [
700
+ {
701
+ fieldName: "type",
702
+ values: [
703
+ {
704
+ value: "Spreadsheet",
705
+ relationType: "EQUALS",
706
+ },
707
+ {
708
+ value: "Presentation",
709
+ relationType: "EQUALS",
710
+ },
711
+ ],
712
+ },
713
+ ],
714
+ },
715
+ ],
716
+ facetBucketSize: 991464,
717
+ authTokens: [
718
+ {
719
+ accessToken: "123abc",
720
+ datasource: "gmail",
721
+ scope:
722
+ "email profile https://www.googleapis.com/auth/gmail.readonly",
723
+ tokenType: "Bearer",
724
+ authUser: "1",
725
+ },
726
+ ],
727
+ },
728
+ ranges: [
729
+ {
730
+ startIndex: 488852,
731
+ document: {
732
+ metadata: {
733
+ datasource: "datasource",
734
+ objectType: "Feature Request",
735
+ container: "container",
736
+ parentId: "JIRA_EN-1337",
737
+ mimeType: "mimeType",
738
+ documentId: "documentId",
739
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
740
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
741
+ components: [
742
+ "Backend",
743
+ "Networking",
744
+ ],
745
+ status: "[\"Done\"]",
746
+ pins: [
747
+ {
748
+ audienceFilters: [
749
+ {
750
+ fieldName: "type",
751
+ values: [
752
+ {
753
+ value: "Spreadsheet",
754
+ relationType: "EQUALS",
755
+ },
756
+ {
757
+ value: "Presentation",
758
+ relationType: "EQUALS",
759
+ },
760
+ ],
761
+ },
762
+ ],
763
+ documentId: "<id>",
764
+ },
765
+ {
766
+ audienceFilters: [
767
+ {
768
+ fieldName: "type",
769
+ values: [
770
+ {
771
+ value: "Spreadsheet",
772
+ relationType: "EQUALS",
773
+ },
774
+ {
775
+ value: "Presentation",
776
+ relationType: "EQUALS",
777
+ },
778
+ ],
779
+ },
780
+ ],
781
+ documentId: "<id>",
782
+ },
783
+ {
784
+ audienceFilters: [
785
+ {
786
+ fieldName: "type",
787
+ values: [
788
+ {
789
+ value: "Spreadsheet",
790
+ relationType: "EQUALS",
791
+ },
792
+ {
793
+ value: "Presentation",
794
+ relationType: "EQUALS",
795
+ },
796
+ ],
797
+ },
798
+ ],
799
+ documentId: "<id>",
800
+ },
801
+ ],
802
+ collections: [
803
+ {
804
+ name: "<value>",
805
+ description:
806
+ "eulogise whereas till mild than during meanwhile disapprove finer ha",
807
+ audienceFilters: [
808
+ {
809
+ fieldName: "type",
810
+ values: [
811
+ {
812
+ value: "Spreadsheet",
813
+ relationType: "EQUALS",
814
+ },
815
+ {
816
+ value: "Presentation",
817
+ relationType: "EQUALS",
818
+ },
819
+ ],
820
+ },
821
+ ],
822
+ id: 2984,
823
+ items: [
824
+ {
825
+ collectionId: 477967,
826
+ shortcut: {
827
+ inputAlias: "<value>",
828
+ },
829
+ itemType: "COLLECTION",
830
+ },
831
+ {
832
+ collectionId: 424273,
833
+ shortcut: {
834
+ inputAlias: "<value>",
835
+ },
836
+ itemType: "COLLECTION",
837
+ },
838
+ ],
839
+ },
840
+ ],
841
+ interactions: {
842
+ reacts: [
843
+ {},
844
+ ],
845
+ shares: [
846
+ {
847
+ numDaysAgo: 301848,
848
+ },
849
+ {
850
+ numDaysAgo: 657278,
851
+ },
852
+ ],
853
+ },
854
+ verification: {
855
+ state: "UNVERIFIED",
856
+ metadata: {
857
+ reminders: [
858
+ {
859
+ assignee: {
860
+ name: "George Clooney",
861
+ obfuscatedId: "abc123",
862
+ },
863
+ remindAt: 335191,
864
+ },
865
+ ],
866
+ lastReminder: {
867
+ assignee: {
868
+ name: "George Clooney",
869
+ obfuscatedId: "abc123",
870
+ },
871
+ remindAt: 532806,
872
+ },
873
+ },
874
+ },
875
+ shortcuts: [
876
+ {
877
+ inputAlias: "<value>",
878
+ },
879
+ {
880
+ inputAlias: "<value>",
881
+ },
882
+ {
883
+ inputAlias: "<value>",
884
+ },
885
+ ],
886
+ customData: {
887
+ "someCustomField": {},
888
+ },
889
+ },
890
+ },
891
+ },
892
+ {
893
+ startIndex: 463392,
894
+ document: {
895
+ metadata: {
896
+ datasource: "datasource",
897
+ objectType: "Feature Request",
898
+ container: "container",
899
+ parentId: "JIRA_EN-1337",
900
+ mimeType: "mimeType",
901
+ documentId: "documentId",
902
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
903
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
904
+ components: [
905
+ "Backend",
906
+ "Networking",
907
+ ],
908
+ status: "[\"Done\"]",
909
+ interactions: {},
910
+ verification: {
911
+ state: "VERIFIED",
912
+ metadata: {
913
+ lastReminder: {
914
+ assignee: {
915
+ name: "George Clooney",
916
+ obfuscatedId: "abc123",
917
+ },
918
+ remindAt: 58704,
919
+ },
920
+ },
921
+ },
922
+ customData: {
923
+ "someCustomField": {},
924
+ },
925
+ },
926
+ },
927
+ },
928
+ ],
929
+ inputDetails: {
930
+ hasCopyPaste: true,
931
+ },
932
+ },
933
+ results: [
934
+ {
935
+ title: "title",
936
+ url: "https://example.com/foo/bar",
937
+ nativeAppUrl: "slack://foo/bar",
938
+ snippets: [
939
+ {
940
+ snippet: "snippet",
941
+ mimeType: "mimeType",
942
+ },
943
+ ],
944
+ },
945
+ ],
946
+ },
947
+ {
948
+ querySuggestion: {
949
+ query: "app:github type:pull author:mortimer",
950
+ searchProviderInfo: {
951
+ name: "Google",
952
+ searchLinkUrlTemplate:
953
+ "https://www.google.com/search?q={query}&hl=en",
954
+ },
955
+ label: "Mortimer's PRs",
956
+ datasource: "github",
957
+ requestOptions: {
958
+ datasourceFilter: "JIRA",
959
+ datasourcesFilter: [
960
+ "JIRA",
961
+ ],
962
+ queryOverridesFacetFilters: true,
963
+ facetFilters: [
964
+ {
965
+ fieldName: "type",
966
+ values: [
967
+ {
968
+ value: "Spreadsheet",
969
+ relationType: "EQUALS",
970
+ },
971
+ {
972
+ value: "Presentation",
973
+ relationType: "EQUALS",
974
+ },
975
+ ],
976
+ },
977
+ ],
978
+ facetFilterSets: [
979
+ {
980
+ filters: [
981
+ {
982
+ fieldName: "type",
983
+ values: [
984
+ {
985
+ value: "Spreadsheet",
986
+ relationType: "EQUALS",
987
+ },
988
+ {
989
+ value: "Presentation",
990
+ relationType: "EQUALS",
991
+ },
992
+ ],
993
+ },
994
+ ],
995
+ },
996
+ {
997
+ filters: [
998
+ {
999
+ fieldName: "type",
1000
+ values: [
1001
+ {
1002
+ value: "Spreadsheet",
1003
+ relationType: "EQUALS",
1004
+ },
1005
+ {
1006
+ value: "Presentation",
1007
+ relationType: "EQUALS",
1008
+ },
1009
+ ],
1010
+ },
1011
+ ],
1012
+ },
1013
+ {
1014
+ filters: [
1015
+ {
1016
+ fieldName: "type",
1017
+ values: [
1018
+ {
1019
+ value: "Spreadsheet",
1020
+ relationType: "EQUALS",
1021
+ },
1022
+ {
1023
+ value: "Presentation",
1024
+ relationType: "EQUALS",
1025
+ },
1026
+ ],
1027
+ },
1028
+ ],
1029
+ },
1030
+ ],
1031
+ facetBucketSize: 326276,
1032
+ authTokens: [
1033
+ {
1034
+ accessToken: "123abc",
1035
+ datasource: "gmail",
1036
+ scope:
1037
+ "email profile https://www.googleapis.com/auth/gmail.readonly",
1038
+ tokenType: "Bearer",
1039
+ authUser: "1",
1040
+ },
1041
+ ],
1042
+ },
1043
+ inputDetails: {
1044
+ hasCopyPaste: true,
1045
+ },
1046
+ },
1047
+ },
1048
+ ],
164
1049
  metadata: {
165
1050
  type: "FULL_TIME",
166
1051
  title: "Actor",
@@ -177,12 +1062,29 @@ test("Collections Editcollection", async () => {
177
1062
  },
178
1063
  ],
179
1064
  querySuggestions: {
180
- suggestions: [],
1065
+ suggestions: [
1066
+ {
1067
+ query: "app:github type:pull author:mortimer",
1068
+ label: "Mortimer's PRs",
1069
+ datasource: "github",
1070
+ },
1071
+ ],
181
1072
  },
182
1073
  inviteInfo: {
183
- invites: [],
1074
+ invites: [
1075
+ {},
1076
+ {},
1077
+ {},
1078
+ ],
184
1079
  },
185
- customFields: [],
1080
+ customFields: [
1081
+ {
1082
+ label: "<value>",
1083
+ values: [
1084
+ {},
1085
+ ],
1086
+ },
1087
+ ],
186
1088
  badges: [
187
1089
  {
188
1090
  key: "deployment_name_new_hire",
@@ -200,17 +1102,169 @@ test("Collections Editcollection", async () => {
200
1102
  role: "EDITOR",
201
1103
  },
202
1104
  {
1105
+ person: {
1106
+ name: "George Clooney",
1107
+ obfuscatedId: "abc123",
1108
+ metadata: {
1109
+ type: "FULL_TIME",
1110
+ title: "Actor",
1111
+ department: "Movies",
1112
+ email: "george@example.com",
1113
+ location: "Hollywood, CA",
1114
+ phone: "6505551234",
1115
+ photoUrl: "https://example.com/george.jpg",
1116
+ startDate: new RFCDate("2000-01-23"),
1117
+ datasourceProfile: [
1118
+ {
1119
+ datasource: "github",
1120
+ handle: "<value>",
1121
+ },
1122
+ {
1123
+ datasource: "github",
1124
+ handle: "<value>",
1125
+ },
1126
+ ],
1127
+ querySuggestions: {},
1128
+ inviteInfo: {},
1129
+ badges: [
1130
+ {
1131
+ key: "deployment_name_new_hire",
1132
+ displayName: "New hire",
1133
+ iconConfig: {
1134
+ color: "#343CED",
1135
+ key: "person_icon",
1136
+ iconType: "GLYPH",
1137
+ name: "user",
1138
+ },
1139
+ },
1140
+ ],
1141
+ },
1142
+ },
203
1143
  role: "ANSWER_MODERATOR",
204
1144
  },
205
1145
  {
1146
+ person: {
1147
+ name: "George Clooney",
1148
+ obfuscatedId: "abc123",
1149
+ metadata: {
1150
+ type: "FULL_TIME",
1151
+ title: "Actor",
1152
+ department: "Movies",
1153
+ email: "george@example.com",
1154
+ location: "Hollywood, CA",
1155
+ phone: "6505551234",
1156
+ photoUrl: "https://example.com/george.jpg",
1157
+ startDate: new RFCDate("2000-01-23"),
1158
+ datasourceProfile: [
1159
+ {
1160
+ datasource: "github",
1161
+ handle: "<value>",
1162
+ },
1163
+ ],
1164
+ querySuggestions: {},
1165
+ inviteInfo: {},
1166
+ badges: [
1167
+ {
1168
+ key: "deployment_name_new_hire",
1169
+ displayName: "New hire",
1170
+ iconConfig: {
1171
+ color: "#343CED",
1172
+ key: "person_icon",
1173
+ iconType: "GLYPH",
1174
+ name: "user",
1175
+ },
1176
+ },
1177
+ ],
1178
+ },
1179
+ },
206
1180
  role: "OWNER",
207
1181
  },
208
1182
  ],
209
1183
  removedRoles: [
210
1184
  {
1185
+ person: {
1186
+ name: "George Clooney",
1187
+ obfuscatedId: "abc123",
1188
+ metadata: {
1189
+ type: "FULL_TIME",
1190
+ title: "Actor",
1191
+ department: "Movies",
1192
+ email: "george@example.com",
1193
+ location: "Hollywood, CA",
1194
+ phone: "6505551234",
1195
+ photoUrl: "https://example.com/george.jpg",
1196
+ startDate: new RFCDate("2000-01-23"),
1197
+ datasourceProfile: [
1198
+ {
1199
+ datasource: "github",
1200
+ handle: "<value>",
1201
+ },
1202
+ {
1203
+ datasource: "github",
1204
+ handle: "<value>",
1205
+ },
1206
+ {
1207
+ datasource: "github",
1208
+ handle: "<value>",
1209
+ },
1210
+ ],
1211
+ querySuggestions: {},
1212
+ inviteInfo: {},
1213
+ badges: [
1214
+ {
1215
+ key: "deployment_name_new_hire",
1216
+ displayName: "New hire",
1217
+ iconConfig: {
1218
+ color: "#343CED",
1219
+ key: "person_icon",
1220
+ iconType: "GLYPH",
1221
+ name: "user",
1222
+ },
1223
+ },
1224
+ ],
1225
+ },
1226
+ },
211
1227
  role: "OWNER",
212
1228
  },
213
1229
  {
1230
+ person: {
1231
+ name: "George Clooney",
1232
+ obfuscatedId: "abc123",
1233
+ metadata: {
1234
+ type: "FULL_TIME",
1235
+ title: "Actor",
1236
+ department: "Movies",
1237
+ email: "george@example.com",
1238
+ location: "Hollywood, CA",
1239
+ phone: "6505551234",
1240
+ photoUrl: "https://example.com/george.jpg",
1241
+ startDate: new RFCDate("2000-01-23"),
1242
+ datasourceProfile: [
1243
+ {
1244
+ datasource: "github",
1245
+ handle: "<value>",
1246
+ },
1247
+ {
1248
+ datasource: "github",
1249
+ handle: "<value>",
1250
+ },
1251
+ ],
1252
+ querySuggestions: {},
1253
+ inviteInfo: {},
1254
+ badges: [
1255
+ {
1256
+ key: "deployment_name_new_hire",
1257
+ displayName: "New hire",
1258
+ iconConfig: {
1259
+ color: "#343CED",
1260
+ key: "person_icon",
1261
+ iconType: "GLYPH",
1262
+ name: "user",
1263
+ },
1264
+ },
1265
+ ],
1266
+ },
1267
+ },
214
1268
  role: "VERIFIER",
215
1269
  },
216
1270
  ],