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