@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
@@ -33,7 +33,324 @@ async function run() {
33
33
  person: {
34
34
  name: "George Clooney",
35
35
  obfuscatedId: "abc123",
36
- relatedDocuments: [],
36
+ relatedDocuments: [
37
+ {
38
+ querySuggestion: {
39
+ query: "app:github type:pull author:mortimer",
40
+ searchProviderInfo: {
41
+ name: "Google",
42
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
43
+ },
44
+ label: "Mortimer's PRs",
45
+ datasource: "github",
46
+ requestOptions: {
47
+ datasourceFilter: "JIRA",
48
+ datasourcesFilter: [
49
+ "JIRA",
50
+ ],
51
+ queryOverridesFacetFilters: true,
52
+ facetFilters: [
53
+ {
54
+ fieldName: "type",
55
+ values: [
56
+ {
57
+ value: "Spreadsheet",
58
+ relationType: "EQUALS",
59
+ },
60
+ {
61
+ value: "Presentation",
62
+ relationType: "EQUALS",
63
+ },
64
+ ],
65
+ },
66
+ ],
67
+ facetFilterSets: [
68
+ {
69
+ filters: [
70
+ {
71
+ fieldName: "type",
72
+ values: [
73
+ {
74
+ value: "Spreadsheet",
75
+ relationType: "EQUALS",
76
+ },
77
+ {
78
+ value: "Presentation",
79
+ relationType: "EQUALS",
80
+ },
81
+ ],
82
+ },
83
+ ],
84
+ },
85
+ {
86
+ filters: [
87
+ {
88
+ fieldName: "type",
89
+ values: [
90
+ {
91
+ value: "Spreadsheet",
92
+ relationType: "EQUALS",
93
+ },
94
+ {
95
+ value: "Presentation",
96
+ relationType: "EQUALS",
97
+ },
98
+ ],
99
+ },
100
+ ],
101
+ },
102
+ ],
103
+ facetBucketSize: 134365,
104
+ authTokens: [
105
+ {
106
+ accessToken: "123abc",
107
+ datasource: "gmail",
108
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
109
+ tokenType: "Bearer",
110
+ authUser: "1",
111
+ },
112
+ ],
113
+ },
114
+ ranges: [
115
+ {
116
+ startIndex: 796474,
117
+ document: {
118
+ metadata: {
119
+ datasource: "datasource",
120
+ objectType: "Feature Request",
121
+ container: "container",
122
+ parentId: "JIRA_EN-1337",
123
+ mimeType: "mimeType",
124
+ documentId: "documentId",
125
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
126
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
127
+ components: [
128
+ "Backend",
129
+ "Networking",
130
+ ],
131
+ status: "[\"Done\"]",
132
+ pins: [
133
+ {
134
+ audienceFilters: [
135
+ {
136
+ fieldName: "type",
137
+ values: [
138
+ {
139
+ value: "Spreadsheet",
140
+ relationType: "EQUALS",
141
+ },
142
+ {
143
+ value: "Presentation",
144
+ relationType: "EQUALS",
145
+ },
146
+ ],
147
+ },
148
+ ],
149
+ documentId: "<id>",
150
+ },
151
+ {
152
+ audienceFilters: [
153
+ {
154
+ fieldName: "type",
155
+ values: [
156
+ {
157
+ value: "Spreadsheet",
158
+ relationType: "EQUALS",
159
+ },
160
+ {
161
+ value: "Presentation",
162
+ relationType: "EQUALS",
163
+ },
164
+ ],
165
+ },
166
+ ],
167
+ documentId: "<id>",
168
+ },
169
+ {
170
+ audienceFilters: [
171
+ {
172
+ fieldName: "type",
173
+ values: [
174
+ {
175
+ value: "Spreadsheet",
176
+ relationType: "EQUALS",
177
+ },
178
+ {
179
+ value: "Presentation",
180
+ relationType: "EQUALS",
181
+ },
182
+ ],
183
+ },
184
+ ],
185
+ documentId: "<id>",
186
+ },
187
+ ],
188
+ collections: [
189
+ {
190
+ name: "<value>",
191
+ description: "fumigate convection though zowie",
192
+ audienceFilters: [
193
+ {
194
+ fieldName: "type",
195
+ values: [
196
+ {
197
+ value: "Spreadsheet",
198
+ relationType: "EQUALS",
199
+ },
200
+ {
201
+ value: "Presentation",
202
+ relationType: "EQUALS",
203
+ },
204
+ ],
205
+ },
206
+ ],
207
+ id: 496323,
208
+ items: [
209
+ {
210
+ collectionId: 782367,
211
+ shortcut: {
212
+ inputAlias: "<value>",
213
+ },
214
+ itemType: "URL",
215
+ },
216
+ ],
217
+ },
218
+ ],
219
+ interactions: {
220
+ reacts: [
221
+ {},
222
+ {},
223
+ {},
224
+ ],
225
+ shares: [
226
+ {
227
+ numDaysAgo: 219974,
228
+ },
229
+ {
230
+ numDaysAgo: 449221,
231
+ },
232
+ {
233
+ numDaysAgo: 427887,
234
+ },
235
+ ],
236
+ },
237
+ verification: {
238
+ state: "VERIFIED",
239
+ metadata: {
240
+ reminders: [
241
+ {
242
+ assignee: {
243
+ name: "George Clooney",
244
+ obfuscatedId: "abc123",
245
+ },
246
+ remindAt: 491427,
247
+ },
248
+ ],
249
+ lastReminder: {
250
+ assignee: {
251
+ name: "George Clooney",
252
+ obfuscatedId: "abc123",
253
+ },
254
+ remindAt: 490420,
255
+ },
256
+ },
257
+ },
258
+ shortcuts: [
259
+ {
260
+ inputAlias: "<value>",
261
+ },
262
+ ],
263
+ customData: {
264
+ "someCustomField": {},
265
+ },
266
+ },
267
+ },
268
+ },
269
+ ],
270
+ inputDetails: {
271
+ hasCopyPaste: true,
272
+ },
273
+ },
274
+ results: [
275
+ {
276
+ title: "title",
277
+ url: "https://example.com/foo/bar",
278
+ nativeAppUrl: "slack://foo/bar",
279
+ snippets: [
280
+ {
281
+ snippet: "snippet",
282
+ mimeType: "mimeType",
283
+ },
284
+ ],
285
+ },
286
+ ],
287
+ },
288
+ {
289
+ querySuggestion: {
290
+ query: "app:github type:pull author:mortimer",
291
+ searchProviderInfo: {
292
+ name: "Google",
293
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
294
+ },
295
+ label: "Mortimer's PRs",
296
+ datasource: "github",
297
+ requestOptions: {
298
+ datasourceFilter: "JIRA",
299
+ datasourcesFilter: [
300
+ "JIRA",
301
+ ],
302
+ queryOverridesFacetFilters: true,
303
+ facetFilters: [
304
+ {
305
+ fieldName: "type",
306
+ values: [
307
+ {
308
+ value: "Spreadsheet",
309
+ relationType: "EQUALS",
310
+ },
311
+ {
312
+ value: "Presentation",
313
+ relationType: "EQUALS",
314
+ },
315
+ ],
316
+ },
317
+ ],
318
+ facetFilterSets: [
319
+ {
320
+ filters: [
321
+ {
322
+ fieldName: "type",
323
+ values: [
324
+ {
325
+ value: "Spreadsheet",
326
+ relationType: "EQUALS",
327
+ },
328
+ {
329
+ value: "Presentation",
330
+ relationType: "EQUALS",
331
+ },
332
+ ],
333
+ },
334
+ ],
335
+ },
336
+ ],
337
+ facetBucketSize: 129663,
338
+ authTokens: [
339
+ {
340
+ accessToken: "123abc",
341
+ datasource: "gmail",
342
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
343
+ tokenType: "Bearer",
344
+ authUser: "1",
345
+ },
346
+ ],
347
+ },
348
+ inputDetails: {
349
+ hasCopyPaste: true,
350
+ },
351
+ },
352
+ },
353
+ ],
37
354
  metadata: {
38
355
  type: "FULL_TIME",
39
356
  title: "Actor",
@@ -50,12 +367,32 @@ async function run() {
50
367
  },
51
368
  ],
52
369
  querySuggestions: {
53
- suggestions: [],
370
+ suggestions: [
371
+ {
372
+ query: "app:github type:pull author:mortimer",
373
+ label: "Mortimer's PRs",
374
+ datasource: "github",
375
+ },
376
+ ],
54
377
  },
55
378
  inviteInfo: {
56
- invites: [],
379
+ invites: [
380
+ {},
381
+ {},
382
+ ],
57
383
  },
58
- customFields: [],
384
+ customFields: [
385
+ {
386
+ label: "<value>",
387
+ values: [
388
+ {},
389
+ ],
390
+ },
391
+ {
392
+ label: "<value>",
393
+ values: [],
394
+ },
395
+ ],
59
396
  badges: [
60
397
  {
61
398
  key: "deployment_name_new_hire",
@@ -73,17 +410,161 @@ async function run() {
73
410
  role: "OWNER",
74
411
  },
75
412
  {
413
+ person: {
414
+ name: "George Clooney",
415
+ obfuscatedId: "abc123",
416
+ metadata: {
417
+ type: "FULL_TIME",
418
+ title: "Actor",
419
+ department: "Movies",
420
+ email: "george@example.com",
421
+ location: "Hollywood, CA",
422
+ phone: "6505551234",
423
+ photoUrl: "https://example.com/george.jpg",
424
+ startDate: new RFCDate("2000-01-23"),
425
+ datasourceProfile: [
426
+ {
427
+ datasource: "github",
428
+ handle: "<value>",
429
+ },
430
+ ],
431
+ querySuggestions: {},
432
+ inviteInfo: {},
433
+ badges: [
434
+ {
435
+ key: "deployment_name_new_hire",
436
+ displayName: "New hire",
437
+ iconConfig: {
438
+ color: "#343CED",
439
+ key: "person_icon",
440
+ iconType: "GLYPH",
441
+ name: "user",
442
+ },
443
+ },
444
+ ],
445
+ },
446
+ },
76
447
  role: "VERIFIER",
77
448
  },
78
449
  ],
79
450
  removedRoles: [
80
451
  {
452
+ person: {
453
+ name: "George Clooney",
454
+ obfuscatedId: "abc123",
455
+ metadata: {
456
+ type: "FULL_TIME",
457
+ title: "Actor",
458
+ department: "Movies",
459
+ email: "george@example.com",
460
+ location: "Hollywood, CA",
461
+ phone: "6505551234",
462
+ photoUrl: "https://example.com/george.jpg",
463
+ startDate: new RFCDate("2000-01-23"),
464
+ datasourceProfile: [
465
+ {
466
+ datasource: "github",
467
+ handle: "<value>",
468
+ },
469
+ ],
470
+ querySuggestions: {},
471
+ inviteInfo: {},
472
+ badges: [
473
+ {
474
+ key: "deployment_name_new_hire",
475
+ displayName: "New hire",
476
+ iconConfig: {
477
+ color: "#343CED",
478
+ key: "person_icon",
479
+ iconType: "GLYPH",
480
+ name: "user",
481
+ },
482
+ },
483
+ ],
484
+ },
485
+ },
81
486
  role: "VERIFIER",
82
487
  },
83
488
  {
489
+ person: {
490
+ name: "George Clooney",
491
+ obfuscatedId: "abc123",
492
+ metadata: {
493
+ type: "FULL_TIME",
494
+ title: "Actor",
495
+ department: "Movies",
496
+ email: "george@example.com",
497
+ location: "Hollywood, CA",
498
+ phone: "6505551234",
499
+ photoUrl: "https://example.com/george.jpg",
500
+ startDate: new RFCDate("2000-01-23"),
501
+ datasourceProfile: [
502
+ {
503
+ datasource: "github",
504
+ handle: "<value>",
505
+ },
506
+ {
507
+ datasource: "github",
508
+ handle: "<value>",
509
+ },
510
+ {
511
+ datasource: "github",
512
+ handle: "<value>",
513
+ },
514
+ ],
515
+ querySuggestions: {},
516
+ inviteInfo: {},
517
+ badges: [
518
+ {
519
+ key: "deployment_name_new_hire",
520
+ displayName: "New hire",
521
+ iconConfig: {
522
+ color: "#343CED",
523
+ key: "person_icon",
524
+ iconType: "GLYPH",
525
+ name: "user",
526
+ },
527
+ },
528
+ ],
529
+ },
530
+ },
84
531
  role: "ANSWER_MODERATOR",
85
532
  },
86
533
  {
534
+ person: {
535
+ name: "George Clooney",
536
+ obfuscatedId: "abc123",
537
+ metadata: {
538
+ type: "FULL_TIME",
539
+ title: "Actor",
540
+ department: "Movies",
541
+ email: "george@example.com",
542
+ location: "Hollywood, CA",
543
+ phone: "6505551234",
544
+ photoUrl: "https://example.com/george.jpg",
545
+ startDate: new RFCDate("2000-01-23"),
546
+ datasourceProfile: [
547
+ {
548
+ datasource: "github",
549
+ handle: "<value>",
550
+ },
551
+ ],
552
+ querySuggestions: {},
553
+ inviteInfo: {},
554
+ badges: [
555
+ {
556
+ key: "deployment_name_new_hire",
557
+ displayName: "New hire",
558
+ iconConfig: {
559
+ color: "#343CED",
560
+ key: "person_icon",
561
+ iconType: "GLYPH",
562
+ name: "user",
563
+ },
564
+ },
565
+ ],
566
+ },
567
+ },
87
568
  role: "OWNER",
88
569
  },
89
570
  ],
@@ -120,7 +601,324 @@ async function run() {
120
601
  person: {
121
602
  name: "George Clooney",
122
603
  obfuscatedId: "abc123",
123
- relatedDocuments: [],
604
+ relatedDocuments: [
605
+ {
606
+ querySuggestion: {
607
+ query: "app:github type:pull author:mortimer",
608
+ searchProviderInfo: {
609
+ name: "Google",
610
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
611
+ },
612
+ label: "Mortimer's PRs",
613
+ datasource: "github",
614
+ requestOptions: {
615
+ datasourceFilter: "JIRA",
616
+ datasourcesFilter: [
617
+ "JIRA",
618
+ ],
619
+ queryOverridesFacetFilters: true,
620
+ facetFilters: [
621
+ {
622
+ fieldName: "type",
623
+ values: [
624
+ {
625
+ value: "Spreadsheet",
626
+ relationType: "EQUALS",
627
+ },
628
+ {
629
+ value: "Presentation",
630
+ relationType: "EQUALS",
631
+ },
632
+ ],
633
+ },
634
+ ],
635
+ facetFilterSets: [
636
+ {
637
+ filters: [
638
+ {
639
+ fieldName: "type",
640
+ values: [
641
+ {
642
+ value: "Spreadsheet",
643
+ relationType: "EQUALS",
644
+ },
645
+ {
646
+ value: "Presentation",
647
+ relationType: "EQUALS",
648
+ },
649
+ ],
650
+ },
651
+ ],
652
+ },
653
+ {
654
+ filters: [
655
+ {
656
+ fieldName: "type",
657
+ values: [
658
+ {
659
+ value: "Spreadsheet",
660
+ relationType: "EQUALS",
661
+ },
662
+ {
663
+ value: "Presentation",
664
+ relationType: "EQUALS",
665
+ },
666
+ ],
667
+ },
668
+ ],
669
+ },
670
+ ],
671
+ facetBucketSize: 134365,
672
+ authTokens: [
673
+ {
674
+ accessToken: "123abc",
675
+ datasource: "gmail",
676
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
677
+ tokenType: "Bearer",
678
+ authUser: "1",
679
+ },
680
+ ],
681
+ },
682
+ ranges: [
683
+ {
684
+ startIndex: 796474,
685
+ document: {
686
+ metadata: {
687
+ datasource: "datasource",
688
+ objectType: "Feature Request",
689
+ container: "container",
690
+ parentId: "JIRA_EN-1337",
691
+ mimeType: "mimeType",
692
+ documentId: "documentId",
693
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
694
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
695
+ components: [
696
+ "Backend",
697
+ "Networking",
698
+ ],
699
+ status: "[\"Done\"]",
700
+ pins: [
701
+ {
702
+ audienceFilters: [
703
+ {
704
+ fieldName: "type",
705
+ values: [
706
+ {
707
+ value: "Spreadsheet",
708
+ relationType: "EQUALS",
709
+ },
710
+ {
711
+ value: "Presentation",
712
+ relationType: "EQUALS",
713
+ },
714
+ ],
715
+ },
716
+ ],
717
+ documentId: "<id>",
718
+ },
719
+ {
720
+ audienceFilters: [
721
+ {
722
+ fieldName: "type",
723
+ values: [
724
+ {
725
+ value: "Spreadsheet",
726
+ relationType: "EQUALS",
727
+ },
728
+ {
729
+ value: "Presentation",
730
+ relationType: "EQUALS",
731
+ },
732
+ ],
733
+ },
734
+ ],
735
+ documentId: "<id>",
736
+ },
737
+ {
738
+ audienceFilters: [
739
+ {
740
+ fieldName: "type",
741
+ values: [
742
+ {
743
+ value: "Spreadsheet",
744
+ relationType: "EQUALS",
745
+ },
746
+ {
747
+ value: "Presentation",
748
+ relationType: "EQUALS",
749
+ },
750
+ ],
751
+ },
752
+ ],
753
+ documentId: "<id>",
754
+ },
755
+ ],
756
+ collections: [
757
+ {
758
+ name: "<value>",
759
+ description: "fumigate convection though zowie",
760
+ audienceFilters: [
761
+ {
762
+ fieldName: "type",
763
+ values: [
764
+ {
765
+ value: "Spreadsheet",
766
+ relationType: "EQUALS",
767
+ },
768
+ {
769
+ value: "Presentation",
770
+ relationType: "EQUALS",
771
+ },
772
+ ],
773
+ },
774
+ ],
775
+ id: 496323,
776
+ items: [
777
+ {
778
+ collectionId: 782367,
779
+ shortcut: {
780
+ inputAlias: "<value>",
781
+ },
782
+ itemType: "URL",
783
+ },
784
+ ],
785
+ },
786
+ ],
787
+ interactions: {
788
+ reacts: [
789
+ {},
790
+ {},
791
+ {},
792
+ ],
793
+ shares: [
794
+ {
795
+ numDaysAgo: 219974,
796
+ },
797
+ {
798
+ numDaysAgo: 449221,
799
+ },
800
+ {
801
+ numDaysAgo: 427887,
802
+ },
803
+ ],
804
+ },
805
+ verification: {
806
+ state: "VERIFIED",
807
+ metadata: {
808
+ reminders: [
809
+ {
810
+ assignee: {
811
+ name: "George Clooney",
812
+ obfuscatedId: "abc123",
813
+ },
814
+ remindAt: 491427,
815
+ },
816
+ ],
817
+ lastReminder: {
818
+ assignee: {
819
+ name: "George Clooney",
820
+ obfuscatedId: "abc123",
821
+ },
822
+ remindAt: 490420,
823
+ },
824
+ },
825
+ },
826
+ shortcuts: [
827
+ {
828
+ inputAlias: "<value>",
829
+ },
830
+ ],
831
+ customData: {
832
+ "someCustomField": {},
833
+ },
834
+ },
835
+ },
836
+ },
837
+ ],
838
+ inputDetails: {
839
+ hasCopyPaste: true,
840
+ },
841
+ },
842
+ results: [
843
+ {
844
+ title: "title",
845
+ url: "https://example.com/foo/bar",
846
+ nativeAppUrl: "slack://foo/bar",
847
+ snippets: [
848
+ {
849
+ snippet: "snippet",
850
+ mimeType: "mimeType",
851
+ },
852
+ ],
853
+ },
854
+ ],
855
+ },
856
+ {
857
+ querySuggestion: {
858
+ query: "app:github type:pull author:mortimer",
859
+ searchProviderInfo: {
860
+ name: "Google",
861
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
862
+ },
863
+ label: "Mortimer's PRs",
864
+ datasource: "github",
865
+ requestOptions: {
866
+ datasourceFilter: "JIRA",
867
+ datasourcesFilter: [
868
+ "JIRA",
869
+ ],
870
+ queryOverridesFacetFilters: true,
871
+ facetFilters: [
872
+ {
873
+ fieldName: "type",
874
+ values: [
875
+ {
876
+ value: "Spreadsheet",
877
+ relationType: "EQUALS",
878
+ },
879
+ {
880
+ value: "Presentation",
881
+ relationType: "EQUALS",
882
+ },
883
+ ],
884
+ },
885
+ ],
886
+ facetFilterSets: [
887
+ {
888
+ filters: [
889
+ {
890
+ fieldName: "type",
891
+ values: [
892
+ {
893
+ value: "Spreadsheet",
894
+ relationType: "EQUALS",
895
+ },
896
+ {
897
+ value: "Presentation",
898
+ relationType: "EQUALS",
899
+ },
900
+ ],
901
+ },
902
+ ],
903
+ },
904
+ ],
905
+ facetBucketSize: 129663,
906
+ authTokens: [
907
+ {
908
+ accessToken: "123abc",
909
+ datasource: "gmail",
910
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
911
+ tokenType: "Bearer",
912
+ authUser: "1",
913
+ },
914
+ ],
915
+ },
916
+ inputDetails: {
917
+ hasCopyPaste: true,
918
+ },
919
+ },
920
+ },
921
+ ],
124
922
  metadata: {
125
923
  type: "FULL_TIME",
126
924
  title: "Actor",
@@ -137,12 +935,32 @@ async function run() {
137
935
  },
138
936
  ],
139
937
  querySuggestions: {
140
- suggestions: [],
938
+ suggestions: [
939
+ {
940
+ query: "app:github type:pull author:mortimer",
941
+ label: "Mortimer's PRs",
942
+ datasource: "github",
943
+ },
944
+ ],
141
945
  },
142
946
  inviteInfo: {
143
- invites: [],
947
+ invites: [
948
+ {},
949
+ {},
950
+ ],
144
951
  },
145
- customFields: [],
952
+ customFields: [
953
+ {
954
+ label: "<value>",
955
+ values: [
956
+ {},
957
+ ],
958
+ },
959
+ {
960
+ label: "<value>",
961
+ values: [],
962
+ },
963
+ ],
146
964
  badges: [
147
965
  {
148
966
  key: "deployment_name_new_hire",
@@ -160,17 +978,161 @@ async function run() {
160
978
  role: "OWNER",
161
979
  },
162
980
  {
981
+ person: {
982
+ name: "George Clooney",
983
+ obfuscatedId: "abc123",
984
+ metadata: {
985
+ type: "FULL_TIME",
986
+ title: "Actor",
987
+ department: "Movies",
988
+ email: "george@example.com",
989
+ location: "Hollywood, CA",
990
+ phone: "6505551234",
991
+ photoUrl: "https://example.com/george.jpg",
992
+ startDate: new RFCDate("2000-01-23"),
993
+ datasourceProfile: [
994
+ {
995
+ datasource: "github",
996
+ handle: "<value>",
997
+ },
998
+ ],
999
+ querySuggestions: {},
1000
+ inviteInfo: {},
1001
+ badges: [
1002
+ {
1003
+ key: "deployment_name_new_hire",
1004
+ displayName: "New hire",
1005
+ iconConfig: {
1006
+ color: "#343CED",
1007
+ key: "person_icon",
1008
+ iconType: "GLYPH",
1009
+ name: "user",
1010
+ },
1011
+ },
1012
+ ],
1013
+ },
1014
+ },
163
1015
  role: "VERIFIER",
164
1016
  },
165
1017
  ],
166
1018
  removedRoles: [
167
1019
  {
1020
+ person: {
1021
+ name: "George Clooney",
1022
+ obfuscatedId: "abc123",
1023
+ metadata: {
1024
+ type: "FULL_TIME",
1025
+ title: "Actor",
1026
+ department: "Movies",
1027
+ email: "george@example.com",
1028
+ location: "Hollywood, CA",
1029
+ phone: "6505551234",
1030
+ photoUrl: "https://example.com/george.jpg",
1031
+ startDate: new RFCDate("2000-01-23"),
1032
+ datasourceProfile: [
1033
+ {
1034
+ datasource: "github",
1035
+ handle: "<value>",
1036
+ },
1037
+ ],
1038
+ querySuggestions: {},
1039
+ inviteInfo: {},
1040
+ badges: [
1041
+ {
1042
+ key: "deployment_name_new_hire",
1043
+ displayName: "New hire",
1044
+ iconConfig: {
1045
+ color: "#343CED",
1046
+ key: "person_icon",
1047
+ iconType: "GLYPH",
1048
+ name: "user",
1049
+ },
1050
+ },
1051
+ ],
1052
+ },
1053
+ },
168
1054
  role: "VERIFIER",
169
1055
  },
170
1056
  {
1057
+ person: {
1058
+ name: "George Clooney",
1059
+ obfuscatedId: "abc123",
1060
+ metadata: {
1061
+ type: "FULL_TIME",
1062
+ title: "Actor",
1063
+ department: "Movies",
1064
+ email: "george@example.com",
1065
+ location: "Hollywood, CA",
1066
+ phone: "6505551234",
1067
+ photoUrl: "https://example.com/george.jpg",
1068
+ startDate: new RFCDate("2000-01-23"),
1069
+ datasourceProfile: [
1070
+ {
1071
+ datasource: "github",
1072
+ handle: "<value>",
1073
+ },
1074
+ {
1075
+ datasource: "github",
1076
+ handle: "<value>",
1077
+ },
1078
+ {
1079
+ datasource: "github",
1080
+ handle: "<value>",
1081
+ },
1082
+ ],
1083
+ querySuggestions: {},
1084
+ inviteInfo: {},
1085
+ badges: [
1086
+ {
1087
+ key: "deployment_name_new_hire",
1088
+ displayName: "New hire",
1089
+ iconConfig: {
1090
+ color: "#343CED",
1091
+ key: "person_icon",
1092
+ iconType: "GLYPH",
1093
+ name: "user",
1094
+ },
1095
+ },
1096
+ ],
1097
+ },
1098
+ },
171
1099
  role: "ANSWER_MODERATOR",
172
1100
  },
173
1101
  {
1102
+ person: {
1103
+ name: "George Clooney",
1104
+ obfuscatedId: "abc123",
1105
+ metadata: {
1106
+ type: "FULL_TIME",
1107
+ title: "Actor",
1108
+ department: "Movies",
1109
+ email: "george@example.com",
1110
+ location: "Hollywood, CA",
1111
+ phone: "6505551234",
1112
+ photoUrl: "https://example.com/george.jpg",
1113
+ startDate: new RFCDate("2000-01-23"),
1114
+ datasourceProfile: [
1115
+ {
1116
+ datasource: "github",
1117
+ handle: "<value>",
1118
+ },
1119
+ ],
1120
+ querySuggestions: {},
1121
+ inviteInfo: {},
1122
+ badges: [
1123
+ {
1124
+ key: "deployment_name_new_hire",
1125
+ displayName: "New hire",
1126
+ iconConfig: {
1127
+ color: "#343CED",
1128
+ key: "person_icon",
1129
+ iconType: "GLYPH",
1130
+ name: "user",
1131
+ },
1132
+ },
1133
+ ],
1134
+ },
1135
+ },
174
1136
  role: "OWNER",
175
1137
  },
176
1138
  ],
@@ -551,7 +1513,551 @@ async function run() {
551
1513
  person: {
552
1514
  name: "George Clooney",
553
1515
  obfuscatedId: "abc123",
554
- relatedDocuments: [],
1516
+ relatedDocuments: [
1517
+ {
1518
+ querySuggestion: {
1519
+ query: "app:github type:pull author:mortimer",
1520
+ searchProviderInfo: {
1521
+ name: "Google",
1522
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
1523
+ },
1524
+ label: "Mortimer's PRs",
1525
+ datasource: "github",
1526
+ requestOptions: {
1527
+ datasourceFilter: "JIRA",
1528
+ datasourcesFilter: [
1529
+ "JIRA",
1530
+ ],
1531
+ queryOverridesFacetFilters: true,
1532
+ facetFilters: [
1533
+ {
1534
+ fieldName: "type",
1535
+ values: [
1536
+ {
1537
+ value: "Spreadsheet",
1538
+ relationType: "EQUALS",
1539
+ },
1540
+ {
1541
+ value: "Presentation",
1542
+ relationType: "EQUALS",
1543
+ },
1544
+ ],
1545
+ },
1546
+ ],
1547
+ facetFilterSets: [
1548
+ {
1549
+ filters: [
1550
+ {
1551
+ fieldName: "type",
1552
+ values: [
1553
+ {
1554
+ value: "Spreadsheet",
1555
+ relationType: "EQUALS",
1556
+ },
1557
+ {
1558
+ value: "Presentation",
1559
+ relationType: "EQUALS",
1560
+ },
1561
+ ],
1562
+ },
1563
+ ],
1564
+ },
1565
+ {
1566
+ filters: [
1567
+ {
1568
+ fieldName: "type",
1569
+ values: [
1570
+ {
1571
+ value: "Spreadsheet",
1572
+ relationType: "EQUALS",
1573
+ },
1574
+ {
1575
+ value: "Presentation",
1576
+ relationType: "EQUALS",
1577
+ },
1578
+ ],
1579
+ },
1580
+ ],
1581
+ },
1582
+ {
1583
+ filters: [
1584
+ {
1585
+ fieldName: "type",
1586
+ values: [
1587
+ {
1588
+ value: "Spreadsheet",
1589
+ relationType: "EQUALS",
1590
+ },
1591
+ {
1592
+ value: "Presentation",
1593
+ relationType: "EQUALS",
1594
+ },
1595
+ ],
1596
+ },
1597
+ ],
1598
+ },
1599
+ ],
1600
+ facetBucketSize: 627690,
1601
+ authTokens: [
1602
+ {
1603
+ accessToken: "123abc",
1604
+ datasource: "gmail",
1605
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
1606
+ tokenType: "Bearer",
1607
+ authUser: "1",
1608
+ },
1609
+ ],
1610
+ },
1611
+ ranges: [
1612
+ {
1613
+ startIndex: 984008,
1614
+ document: {
1615
+ metadata: {
1616
+ datasource: "datasource",
1617
+ objectType: "Feature Request",
1618
+ container: "container",
1619
+ parentId: "JIRA_EN-1337",
1620
+ mimeType: "mimeType",
1621
+ documentId: "documentId",
1622
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
1623
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
1624
+ components: [
1625
+ "Backend",
1626
+ "Networking",
1627
+ ],
1628
+ status: "[\"Done\"]",
1629
+ pins: [
1630
+ {
1631
+ audienceFilters: [
1632
+ {
1633
+ fieldName: "type",
1634
+ values: [
1635
+ {
1636
+ value: "Spreadsheet",
1637
+ relationType: "EQUALS",
1638
+ },
1639
+ {
1640
+ value: "Presentation",
1641
+ relationType: "EQUALS",
1642
+ },
1643
+ ],
1644
+ },
1645
+ ],
1646
+ documentId: "<id>",
1647
+ },
1648
+ ],
1649
+ collections: [
1650
+ {
1651
+ name: "<value>",
1652
+ description: "for drat underneath sticky yuck even",
1653
+ audienceFilters: [
1654
+ {
1655
+ fieldName: "type",
1656
+ values: [
1657
+ {
1658
+ value: "Spreadsheet",
1659
+ relationType: "EQUALS",
1660
+ },
1661
+ {
1662
+ value: "Presentation",
1663
+ relationType: "EQUALS",
1664
+ },
1665
+ ],
1666
+ },
1667
+ ],
1668
+ id: 996168,
1669
+ items: [
1670
+ {
1671
+ collectionId: 392671,
1672
+ shortcut: {
1673
+ inputAlias: "<value>",
1674
+ },
1675
+ itemType: "TEXT",
1676
+ },
1677
+ {
1678
+ collectionId: 845914,
1679
+ shortcut: {
1680
+ inputAlias: "<value>",
1681
+ },
1682
+ itemType: "URL",
1683
+ },
1684
+ ],
1685
+ },
1686
+ {
1687
+ name: "<value>",
1688
+ description: "duh now mechanically during since anxiously lightly ultimately",
1689
+ audienceFilters: [
1690
+ {
1691
+ fieldName: "type",
1692
+ values: [
1693
+ {
1694
+ value: "Spreadsheet",
1695
+ relationType: "EQUALS",
1696
+ },
1697
+ {
1698
+ value: "Presentation",
1699
+ relationType: "EQUALS",
1700
+ },
1701
+ ],
1702
+ },
1703
+ ],
1704
+ id: 958595,
1705
+ },
1706
+ {
1707
+ name: "<value>",
1708
+ description: "whereas anenst habit onto worriedly revoke hm eminent sham",
1709
+ audienceFilters: [
1710
+ {
1711
+ fieldName: "type",
1712
+ values: [
1713
+ {
1714
+ value: "Spreadsheet",
1715
+ relationType: "EQUALS",
1716
+ },
1717
+ {
1718
+ value: "Presentation",
1719
+ relationType: "EQUALS",
1720
+ },
1721
+ ],
1722
+ },
1723
+ ],
1724
+ id: 115263,
1725
+ },
1726
+ ],
1727
+ interactions: {
1728
+ reacts: [
1729
+ {},
1730
+ {},
1731
+ {},
1732
+ ],
1733
+ shares: [
1734
+ {
1735
+ numDaysAgo: 691669,
1736
+ },
1737
+ {
1738
+ numDaysAgo: 202116,
1739
+ },
1740
+ ],
1741
+ },
1742
+ verification: {
1743
+ state: "UNVERIFIED",
1744
+ metadata: {
1745
+ reminders: [
1746
+ {
1747
+ assignee: {
1748
+ name: "George Clooney",
1749
+ obfuscatedId: "abc123",
1750
+ },
1751
+ remindAt: 246216,
1752
+ },
1753
+ ],
1754
+ lastReminder: {
1755
+ assignee: {
1756
+ name: "George Clooney",
1757
+ obfuscatedId: "abc123",
1758
+ },
1759
+ remindAt: 778241,
1760
+ },
1761
+ },
1762
+ },
1763
+ shortcuts: [
1764
+ {
1765
+ inputAlias: "<value>",
1766
+ },
1767
+ {
1768
+ inputAlias: "<value>",
1769
+ },
1770
+ {
1771
+ inputAlias: "<value>",
1772
+ },
1773
+ ],
1774
+ customData: {
1775
+ "someCustomField": {},
1776
+ },
1777
+ },
1778
+ },
1779
+ },
1780
+ {
1781
+ startIndex: 698908,
1782
+ document: {
1783
+ metadata: {
1784
+ datasource: "datasource",
1785
+ objectType: "Feature Request",
1786
+ container: "container",
1787
+ parentId: "JIRA_EN-1337",
1788
+ mimeType: "mimeType",
1789
+ documentId: "documentId",
1790
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
1791
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
1792
+ components: [
1793
+ "Backend",
1794
+ "Networking",
1795
+ ],
1796
+ status: "[\"Done\"]",
1797
+ interactions: {},
1798
+ verification: {
1799
+ state: "UNVERIFIED",
1800
+ metadata: {
1801
+ lastReminder: {
1802
+ assignee: {
1803
+ name: "George Clooney",
1804
+ obfuscatedId: "abc123",
1805
+ },
1806
+ remindAt: 451776,
1807
+ },
1808
+ },
1809
+ },
1810
+ customData: {
1811
+ "someCustomField": {},
1812
+ },
1813
+ },
1814
+ },
1815
+ },
1816
+ ],
1817
+ inputDetails: {
1818
+ hasCopyPaste: true,
1819
+ },
1820
+ },
1821
+ results: [
1822
+ {
1823
+ title: "title",
1824
+ url: "https://example.com/foo/bar",
1825
+ nativeAppUrl: "slack://foo/bar",
1826
+ snippets: [
1827
+ {
1828
+ snippet: "snippet",
1829
+ mimeType: "mimeType",
1830
+ },
1831
+ ],
1832
+ },
1833
+ ],
1834
+ },
1835
+ {
1836
+ querySuggestion: {
1837
+ query: "app:github type:pull author:mortimer",
1838
+ searchProviderInfo: {
1839
+ name: "Google",
1840
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
1841
+ },
1842
+ label: "Mortimer's PRs",
1843
+ datasource: "github",
1844
+ requestOptions: {
1845
+ datasourceFilter: "JIRA",
1846
+ datasourcesFilter: [
1847
+ "JIRA",
1848
+ ],
1849
+ queryOverridesFacetFilters: true,
1850
+ facetFilters: [
1851
+ {
1852
+ fieldName: "type",
1853
+ values: [
1854
+ {
1855
+ value: "Spreadsheet",
1856
+ relationType: "EQUALS",
1857
+ },
1858
+ {
1859
+ value: "Presentation",
1860
+ relationType: "EQUALS",
1861
+ },
1862
+ ],
1863
+ },
1864
+ ],
1865
+ facetFilterSets: [
1866
+ {
1867
+ filters: [
1868
+ {
1869
+ fieldName: "type",
1870
+ values: [
1871
+ {
1872
+ value: "Spreadsheet",
1873
+ relationType: "EQUALS",
1874
+ },
1875
+ {
1876
+ value: "Presentation",
1877
+ relationType: "EQUALS",
1878
+ },
1879
+ ],
1880
+ },
1881
+ ],
1882
+ },
1883
+ ],
1884
+ facetBucketSize: 158724,
1885
+ authTokens: [
1886
+ {
1887
+ accessToken: "123abc",
1888
+ datasource: "gmail",
1889
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
1890
+ tokenType: "Bearer",
1891
+ authUser: "1",
1892
+ },
1893
+ ],
1894
+ },
1895
+ inputDetails: {
1896
+ hasCopyPaste: true,
1897
+ },
1898
+ },
1899
+ },
1900
+ ],
1901
+ metadata: {
1902
+ type: "FULL_TIME",
1903
+ title: "Actor",
1904
+ department: "Movies",
1905
+ email: "george@example.com",
1906
+ location: "Hollywood, CA",
1907
+ phone: "6505551234",
1908
+ photoUrl: "https://example.com/george.jpg",
1909
+ startDate: new RFCDate("2000-01-23"),
1910
+ datasourceProfile: [
1911
+ {
1912
+ datasource: "github",
1913
+ handle: "<value>",
1914
+ },
1915
+ {
1916
+ datasource: "github",
1917
+ handle: "<value>",
1918
+ },
1919
+ {
1920
+ datasource: "github",
1921
+ handle: "<value>",
1922
+ },
1923
+ ],
1924
+ querySuggestions: {
1925
+ suggestions: [
1926
+ {
1927
+ query: "app:github type:pull author:mortimer",
1928
+ label: "Mortimer's PRs",
1929
+ datasource: "github",
1930
+ },
1931
+ ],
1932
+ },
1933
+ inviteInfo: {
1934
+ invites: [
1935
+ {},
1936
+ {},
1937
+ ],
1938
+ },
1939
+ customFields: [
1940
+ {
1941
+ label: "<value>",
1942
+ values: [
1943
+ {},
1944
+ {},
1945
+ {},
1946
+ ],
1947
+ },
1948
+ {
1949
+ label: "<value>",
1950
+ values: [],
1951
+ },
1952
+ ],
1953
+ badges: [
1954
+ {
1955
+ key: "deployment_name_new_hire",
1956
+ displayName: "New hire",
1957
+ iconConfig: {
1958
+ color: "#343CED",
1959
+ key: "person_icon",
1960
+ iconType: "GLYPH",
1961
+ name: "user",
1962
+ },
1963
+ },
1964
+ ],
1965
+ },
1966
+ },
1967
+ role: "ANSWER_MODERATOR",
1968
+ },
1969
+ {
1970
+ person: {
1971
+ name: "George Clooney",
1972
+ obfuscatedId: "abc123",
1973
+ metadata: {
1974
+ type: "FULL_TIME",
1975
+ title: "Actor",
1976
+ department: "Movies",
1977
+ email: "george@example.com",
1978
+ location: "Hollywood, CA",
1979
+ phone: "6505551234",
1980
+ photoUrl: "https://example.com/george.jpg",
1981
+ startDate: new RFCDate("2000-01-23"),
1982
+ datasourceProfile: [
1983
+ {
1984
+ datasource: "github",
1985
+ handle: "<value>",
1986
+ },
1987
+ {
1988
+ datasource: "github",
1989
+ handle: "<value>",
1990
+ },
1991
+ {
1992
+ datasource: "github",
1993
+ handle: "<value>",
1994
+ },
1995
+ ],
1996
+ querySuggestions: {},
1997
+ inviteInfo: {},
1998
+ badges: [
1999
+ {
2000
+ key: "deployment_name_new_hire",
2001
+ displayName: "New hire",
2002
+ iconConfig: {
2003
+ color: "#343CED",
2004
+ key: "person_icon",
2005
+ iconType: "GLYPH",
2006
+ name: "user",
2007
+ },
2008
+ },
2009
+ ],
2010
+ },
2011
+ },
2012
+ role: "EDITOR",
2013
+ },
2014
+ ],
2015
+ removedRoles: [
2016
+ {
2017
+ person: {
2018
+ name: "George Clooney",
2019
+ obfuscatedId: "abc123",
2020
+ metadata: {
2021
+ type: "FULL_TIME",
2022
+ title: "Actor",
2023
+ department: "Movies",
2024
+ email: "george@example.com",
2025
+ location: "Hollywood, CA",
2026
+ phone: "6505551234",
2027
+ photoUrl: "https://example.com/george.jpg",
2028
+ startDate: new RFCDate("2000-01-23"),
2029
+ datasourceProfile: [
2030
+ {
2031
+ datasource: "github",
2032
+ handle: "<value>",
2033
+ },
2034
+ {
2035
+ datasource: "github",
2036
+ handle: "<value>",
2037
+ },
2038
+ ],
2039
+ querySuggestions: {},
2040
+ inviteInfo: {},
2041
+ badges: [
2042
+ {
2043
+ key: "deployment_name_new_hire",
2044
+ displayName: "New hire",
2045
+ iconConfig: {
2046
+ color: "#343CED",
2047
+ key: "person_icon",
2048
+ iconType: "GLYPH",
2049
+ name: "user",
2050
+ },
2051
+ },
2052
+ ],
2053
+ },
2054
+ },
2055
+ role: "VIEWER",
2056
+ },
2057
+ {
2058
+ person: {
2059
+ name: "George Clooney",
2060
+ obfuscatedId: "abc123",
555
2061
  metadata: {
556
2062
  type: "FULL_TIME",
557
2063
  title: "Actor",
@@ -570,18 +2076,50 @@ async function run() {
570
2076
  datasource: "github",
571
2077
  handle: "<value>",
572
2078
  },
2079
+ ],
2080
+ querySuggestions: {},
2081
+ inviteInfo: {},
2082
+ badges: [
2083
+ {
2084
+ key: "deployment_name_new_hire",
2085
+ displayName: "New hire",
2086
+ iconConfig: {
2087
+ color: "#343CED",
2088
+ key: "person_icon",
2089
+ iconType: "GLYPH",
2090
+ name: "user",
2091
+ },
2092
+ },
2093
+ ],
2094
+ },
2095
+ },
2096
+ role: "OWNER",
2097
+ },
2098
+ {
2099
+ person: {
2100
+ name: "George Clooney",
2101
+ obfuscatedId: "abc123",
2102
+ metadata: {
2103
+ type: "FULL_TIME",
2104
+ title: "Actor",
2105
+ department: "Movies",
2106
+ email: "george@example.com",
2107
+ location: "Hollywood, CA",
2108
+ phone: "6505551234",
2109
+ photoUrl: "https://example.com/george.jpg",
2110
+ startDate: new RFCDate("2000-01-23"),
2111
+ datasourceProfile: [
2112
+ {
2113
+ datasource: "github",
2114
+ handle: "<value>",
2115
+ },
573
2116
  {
574
2117
  datasource: "github",
575
2118
  handle: "<value>",
576
2119
  },
577
2120
  ],
578
- querySuggestions: {
579
- suggestions: [],
580
- },
581
- inviteInfo: {
582
- invites: [],
583
- },
584
- customFields: [],
2121
+ querySuggestions: {},
2122
+ inviteInfo: {},
585
2123
  badges: [
586
2124
  {
587
2125
  key: "deployment_name_new_hire",
@@ -596,20 +2134,6 @@ async function run() {
596
2134
  ],
597
2135
  },
598
2136
  },
599
- role: "ANSWER_MODERATOR",
600
- },
601
- {
602
- role: "EDITOR",
603
- },
604
- ],
605
- removedRoles: [
606
- {
607
- role: "VIEWER",
608
- },
609
- {
610
- role: "OWNER",
611
- },
612
- {
613
2137
  role: "VIEWER",
614
2138
  },
615
2139
  ],
@@ -645,7 +2169,391 @@ async function run() {
645
2169
  person: {
646
2170
  name: "George Clooney",
647
2171
  obfuscatedId: "abc123",
648
- relatedDocuments: [],
2172
+ relatedDocuments: [
2173
+ {
2174
+ querySuggestion: {
2175
+ query: "app:github type:pull author:mortimer",
2176
+ searchProviderInfo: {
2177
+ name: "Google",
2178
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
2179
+ },
2180
+ label: "Mortimer's PRs",
2181
+ datasource: "github",
2182
+ requestOptions: {
2183
+ datasourceFilter: "JIRA",
2184
+ datasourcesFilter: [
2185
+ "JIRA",
2186
+ ],
2187
+ queryOverridesFacetFilters: true,
2188
+ facetFilters: [
2189
+ {
2190
+ fieldName: "type",
2191
+ values: [
2192
+ {
2193
+ value: "Spreadsheet",
2194
+ relationType: "EQUALS",
2195
+ },
2196
+ {
2197
+ value: "Presentation",
2198
+ relationType: "EQUALS",
2199
+ },
2200
+ ],
2201
+ },
2202
+ ],
2203
+ facetFilterSets: [
2204
+ {
2205
+ filters: [
2206
+ {
2207
+ fieldName: "type",
2208
+ values: [
2209
+ {
2210
+ value: "Spreadsheet",
2211
+ relationType: "EQUALS",
2212
+ },
2213
+ {
2214
+ value: "Presentation",
2215
+ relationType: "EQUALS",
2216
+ },
2217
+ ],
2218
+ },
2219
+ ],
2220
+ },
2221
+ {
2222
+ filters: [
2223
+ {
2224
+ fieldName: "type",
2225
+ values: [
2226
+ {
2227
+ value: "Spreadsheet",
2228
+ relationType: "EQUALS",
2229
+ },
2230
+ {
2231
+ value: "Presentation",
2232
+ relationType: "EQUALS",
2233
+ },
2234
+ ],
2235
+ },
2236
+ ],
2237
+ },
2238
+ {
2239
+ filters: [
2240
+ {
2241
+ fieldName: "type",
2242
+ values: [
2243
+ {
2244
+ value: "Spreadsheet",
2245
+ relationType: "EQUALS",
2246
+ },
2247
+ {
2248
+ value: "Presentation",
2249
+ relationType: "EQUALS",
2250
+ },
2251
+ ],
2252
+ },
2253
+ ],
2254
+ },
2255
+ ],
2256
+ facetBucketSize: 627690,
2257
+ authTokens: [
2258
+ {
2259
+ accessToken: "123abc",
2260
+ datasource: "gmail",
2261
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
2262
+ tokenType: "Bearer",
2263
+ authUser: "1",
2264
+ },
2265
+ ],
2266
+ },
2267
+ ranges: [
2268
+ {
2269
+ startIndex: 984008,
2270
+ document: {
2271
+ metadata: {
2272
+ datasource: "datasource",
2273
+ objectType: "Feature Request",
2274
+ container: "container",
2275
+ parentId: "JIRA_EN-1337",
2276
+ mimeType: "mimeType",
2277
+ documentId: "documentId",
2278
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
2279
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
2280
+ components: [
2281
+ "Backend",
2282
+ "Networking",
2283
+ ],
2284
+ status: "[\"Done\"]",
2285
+ pins: [
2286
+ {
2287
+ audienceFilters: [
2288
+ {
2289
+ fieldName: "type",
2290
+ values: [
2291
+ {
2292
+ value: "Spreadsheet",
2293
+ relationType: "EQUALS",
2294
+ },
2295
+ {
2296
+ value: "Presentation",
2297
+ relationType: "EQUALS",
2298
+ },
2299
+ ],
2300
+ },
2301
+ ],
2302
+ documentId: "<id>",
2303
+ },
2304
+ ],
2305
+ collections: [
2306
+ {
2307
+ name: "<value>",
2308
+ description: "for drat underneath sticky yuck even",
2309
+ audienceFilters: [
2310
+ {
2311
+ fieldName: "type",
2312
+ values: [
2313
+ {
2314
+ value: "Spreadsheet",
2315
+ relationType: "EQUALS",
2316
+ },
2317
+ {
2318
+ value: "Presentation",
2319
+ relationType: "EQUALS",
2320
+ },
2321
+ ],
2322
+ },
2323
+ ],
2324
+ id: 996168,
2325
+ items: [
2326
+ {
2327
+ collectionId: 392671,
2328
+ shortcut: {
2329
+ inputAlias: "<value>",
2330
+ },
2331
+ itemType: "TEXT",
2332
+ },
2333
+ {
2334
+ collectionId: 845914,
2335
+ shortcut: {
2336
+ inputAlias: "<value>",
2337
+ },
2338
+ itemType: "URL",
2339
+ },
2340
+ ],
2341
+ },
2342
+ {
2343
+ name: "<value>",
2344
+ description: "duh now mechanically during since anxiously lightly ultimately",
2345
+ audienceFilters: [
2346
+ {
2347
+ fieldName: "type",
2348
+ values: [
2349
+ {
2350
+ value: "Spreadsheet",
2351
+ relationType: "EQUALS",
2352
+ },
2353
+ {
2354
+ value: "Presentation",
2355
+ relationType: "EQUALS",
2356
+ },
2357
+ ],
2358
+ },
2359
+ ],
2360
+ id: 958595,
2361
+ },
2362
+ {
2363
+ name: "<value>",
2364
+ description: "whereas anenst habit onto worriedly revoke hm eminent sham",
2365
+ audienceFilters: [
2366
+ {
2367
+ fieldName: "type",
2368
+ values: [
2369
+ {
2370
+ value: "Spreadsheet",
2371
+ relationType: "EQUALS",
2372
+ },
2373
+ {
2374
+ value: "Presentation",
2375
+ relationType: "EQUALS",
2376
+ },
2377
+ ],
2378
+ },
2379
+ ],
2380
+ id: 115263,
2381
+ },
2382
+ ],
2383
+ interactions: {
2384
+ reacts: [
2385
+ {},
2386
+ {},
2387
+ {},
2388
+ ],
2389
+ shares: [
2390
+ {
2391
+ numDaysAgo: 691669,
2392
+ },
2393
+ {
2394
+ numDaysAgo: 202116,
2395
+ },
2396
+ ],
2397
+ },
2398
+ verification: {
2399
+ state: "UNVERIFIED",
2400
+ metadata: {
2401
+ reminders: [
2402
+ {
2403
+ assignee: {
2404
+ name: "George Clooney",
2405
+ obfuscatedId: "abc123",
2406
+ },
2407
+ remindAt: 246216,
2408
+ },
2409
+ ],
2410
+ lastReminder: {
2411
+ assignee: {
2412
+ name: "George Clooney",
2413
+ obfuscatedId: "abc123",
2414
+ },
2415
+ remindAt: 778241,
2416
+ },
2417
+ },
2418
+ },
2419
+ shortcuts: [
2420
+ {
2421
+ inputAlias: "<value>",
2422
+ },
2423
+ {
2424
+ inputAlias: "<value>",
2425
+ },
2426
+ {
2427
+ inputAlias: "<value>",
2428
+ },
2429
+ ],
2430
+ customData: {
2431
+ "someCustomField": {},
2432
+ },
2433
+ },
2434
+ },
2435
+ },
2436
+ {
2437
+ startIndex: 698908,
2438
+ document: {
2439
+ metadata: {
2440
+ datasource: "datasource",
2441
+ objectType: "Feature Request",
2442
+ container: "container",
2443
+ parentId: "JIRA_EN-1337",
2444
+ mimeType: "mimeType",
2445
+ documentId: "documentId",
2446
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
2447
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
2448
+ components: [
2449
+ "Backend",
2450
+ "Networking",
2451
+ ],
2452
+ status: "[\"Done\"]",
2453
+ interactions: {},
2454
+ verification: {
2455
+ state: "UNVERIFIED",
2456
+ metadata: {
2457
+ lastReminder: {
2458
+ assignee: {
2459
+ name: "George Clooney",
2460
+ obfuscatedId: "abc123",
2461
+ },
2462
+ remindAt: 451776,
2463
+ },
2464
+ },
2465
+ },
2466
+ customData: {
2467
+ "someCustomField": {},
2468
+ },
2469
+ },
2470
+ },
2471
+ },
2472
+ ],
2473
+ inputDetails: {
2474
+ hasCopyPaste: true,
2475
+ },
2476
+ },
2477
+ results: [
2478
+ {
2479
+ title: "title",
2480
+ url: "https://example.com/foo/bar",
2481
+ nativeAppUrl: "slack://foo/bar",
2482
+ snippets: [
2483
+ {
2484
+ snippet: "snippet",
2485
+ mimeType: "mimeType",
2486
+ },
2487
+ ],
2488
+ },
2489
+ ],
2490
+ },
2491
+ {
2492
+ querySuggestion: {
2493
+ query: "app:github type:pull author:mortimer",
2494
+ searchProviderInfo: {
2495
+ name: "Google",
2496
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
2497
+ },
2498
+ label: "Mortimer's PRs",
2499
+ datasource: "github",
2500
+ requestOptions: {
2501
+ datasourceFilter: "JIRA",
2502
+ datasourcesFilter: [
2503
+ "JIRA",
2504
+ ],
2505
+ queryOverridesFacetFilters: true,
2506
+ facetFilters: [
2507
+ {
2508
+ fieldName: "type",
2509
+ values: [
2510
+ {
2511
+ value: "Spreadsheet",
2512
+ relationType: "EQUALS",
2513
+ },
2514
+ {
2515
+ value: "Presentation",
2516
+ relationType: "EQUALS",
2517
+ },
2518
+ ],
2519
+ },
2520
+ ],
2521
+ facetFilterSets: [
2522
+ {
2523
+ filters: [
2524
+ {
2525
+ fieldName: "type",
2526
+ values: [
2527
+ {
2528
+ value: "Spreadsheet",
2529
+ relationType: "EQUALS",
2530
+ },
2531
+ {
2532
+ value: "Presentation",
2533
+ relationType: "EQUALS",
2534
+ },
2535
+ ],
2536
+ },
2537
+ ],
2538
+ },
2539
+ ],
2540
+ facetBucketSize: 158724,
2541
+ authTokens: [
2542
+ {
2543
+ accessToken: "123abc",
2544
+ datasource: "gmail",
2545
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
2546
+ tokenType: "Bearer",
2547
+ authUser: "1",
2548
+ },
2549
+ ],
2550
+ },
2551
+ inputDetails: {
2552
+ hasCopyPaste: true,
2553
+ },
2554
+ },
2555
+ },
2556
+ ],
649
2557
  metadata: {
650
2558
  type: "FULL_TIME",
651
2559
  title: "Actor",
@@ -670,12 +2578,34 @@ async function run() {
670
2578
  },
671
2579
  ],
672
2580
  querySuggestions: {
673
- suggestions: [],
2581
+ suggestions: [
2582
+ {
2583
+ query: "app:github type:pull author:mortimer",
2584
+ label: "Mortimer's PRs",
2585
+ datasource: "github",
2586
+ },
2587
+ ],
674
2588
  },
675
2589
  inviteInfo: {
676
- invites: [],
2590
+ invites: [
2591
+ {},
2592
+ {},
2593
+ ],
677
2594
  },
678
- customFields: [],
2595
+ customFields: [
2596
+ {
2597
+ label: "<value>",
2598
+ values: [
2599
+ {},
2600
+ {},
2601
+ {},
2602
+ ],
2603
+ },
2604
+ {
2605
+ label: "<value>",
2606
+ values: [],
2607
+ },
2608
+ ],
679
2609
  badges: [
680
2610
  {
681
2611
  key: "deployment_name_new_hire",
@@ -693,17 +2623,173 @@ async function run() {
693
2623
  role: "ANSWER_MODERATOR",
694
2624
  },
695
2625
  {
2626
+ person: {
2627
+ name: "George Clooney",
2628
+ obfuscatedId: "abc123",
2629
+ metadata: {
2630
+ type: "FULL_TIME",
2631
+ title: "Actor",
2632
+ department: "Movies",
2633
+ email: "george@example.com",
2634
+ location: "Hollywood, CA",
2635
+ phone: "6505551234",
2636
+ photoUrl: "https://example.com/george.jpg",
2637
+ startDate: new RFCDate("2000-01-23"),
2638
+ datasourceProfile: [
2639
+ {
2640
+ datasource: "github",
2641
+ handle: "<value>",
2642
+ },
2643
+ {
2644
+ datasource: "github",
2645
+ handle: "<value>",
2646
+ },
2647
+ {
2648
+ datasource: "github",
2649
+ handle: "<value>",
2650
+ },
2651
+ ],
2652
+ querySuggestions: {},
2653
+ inviteInfo: {},
2654
+ badges: [
2655
+ {
2656
+ key: "deployment_name_new_hire",
2657
+ displayName: "New hire",
2658
+ iconConfig: {
2659
+ color: "#343CED",
2660
+ key: "person_icon",
2661
+ iconType: "GLYPH",
2662
+ name: "user",
2663
+ },
2664
+ },
2665
+ ],
2666
+ },
2667
+ },
696
2668
  role: "EDITOR",
697
2669
  },
698
2670
  ],
699
2671
  removedRoles: [
700
2672
  {
2673
+ person: {
2674
+ name: "George Clooney",
2675
+ obfuscatedId: "abc123",
2676
+ metadata: {
2677
+ type: "FULL_TIME",
2678
+ title: "Actor",
2679
+ department: "Movies",
2680
+ email: "george@example.com",
2681
+ location: "Hollywood, CA",
2682
+ phone: "6505551234",
2683
+ photoUrl: "https://example.com/george.jpg",
2684
+ startDate: new RFCDate("2000-01-23"),
2685
+ datasourceProfile: [
2686
+ {
2687
+ datasource: "github",
2688
+ handle: "<value>",
2689
+ },
2690
+ {
2691
+ datasource: "github",
2692
+ handle: "<value>",
2693
+ },
2694
+ ],
2695
+ querySuggestions: {},
2696
+ inviteInfo: {},
2697
+ badges: [
2698
+ {
2699
+ key: "deployment_name_new_hire",
2700
+ displayName: "New hire",
2701
+ iconConfig: {
2702
+ color: "#343CED",
2703
+ key: "person_icon",
2704
+ iconType: "GLYPH",
2705
+ name: "user",
2706
+ },
2707
+ },
2708
+ ],
2709
+ },
2710
+ },
701
2711
  role: "VIEWER",
702
2712
  },
703
2713
  {
2714
+ person: {
2715
+ name: "George Clooney",
2716
+ obfuscatedId: "abc123",
2717
+ metadata: {
2718
+ type: "FULL_TIME",
2719
+ title: "Actor",
2720
+ department: "Movies",
2721
+ email: "george@example.com",
2722
+ location: "Hollywood, CA",
2723
+ phone: "6505551234",
2724
+ photoUrl: "https://example.com/george.jpg",
2725
+ startDate: new RFCDate("2000-01-23"),
2726
+ datasourceProfile: [
2727
+ {
2728
+ datasource: "github",
2729
+ handle: "<value>",
2730
+ },
2731
+ {
2732
+ datasource: "github",
2733
+ handle: "<value>",
2734
+ },
2735
+ ],
2736
+ querySuggestions: {},
2737
+ inviteInfo: {},
2738
+ badges: [
2739
+ {
2740
+ key: "deployment_name_new_hire",
2741
+ displayName: "New hire",
2742
+ iconConfig: {
2743
+ color: "#343CED",
2744
+ key: "person_icon",
2745
+ iconType: "GLYPH",
2746
+ name: "user",
2747
+ },
2748
+ },
2749
+ ],
2750
+ },
2751
+ },
704
2752
  role: "OWNER",
705
2753
  },
706
2754
  {
2755
+ person: {
2756
+ name: "George Clooney",
2757
+ obfuscatedId: "abc123",
2758
+ metadata: {
2759
+ type: "FULL_TIME",
2760
+ title: "Actor",
2761
+ department: "Movies",
2762
+ email: "george@example.com",
2763
+ location: "Hollywood, CA",
2764
+ phone: "6505551234",
2765
+ photoUrl: "https://example.com/george.jpg",
2766
+ startDate: new RFCDate("2000-01-23"),
2767
+ datasourceProfile: [
2768
+ {
2769
+ datasource: "github",
2770
+ handle: "<value>",
2771
+ },
2772
+ {
2773
+ datasource: "github",
2774
+ handle: "<value>",
2775
+ },
2776
+ ],
2777
+ querySuggestions: {},
2778
+ inviteInfo: {},
2779
+ badges: [
2780
+ {
2781
+ key: "deployment_name_new_hire",
2782
+ displayName: "New hire",
2783
+ iconConfig: {
2784
+ color: "#343CED",
2785
+ key: "person_icon",
2786
+ iconType: "GLYPH",
2787
+ name: "user",
2788
+ },
2789
+ },
2790
+ ],
2791
+ },
2792
+ },
707
2793
  role: "VIEWER",
708
2794
  },
709
2795
  ],