@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
@@ -21,7 +21,324 @@ const testclient_js_1 = require("./testclient.js");
21
21
  person: {
22
22
  name: "George Clooney",
23
23
  obfuscatedId: "abc123",
24
- relatedDocuments: [],
24
+ relatedDocuments: [
25
+ {
26
+ querySuggestion: {
27
+ query: "app:github type:pull author:mortimer",
28
+ searchProviderInfo: {
29
+ name: "Google",
30
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
31
+ },
32
+ label: "Mortimer's PRs",
33
+ datasource: "github",
34
+ requestOptions: {
35
+ datasourceFilter: "JIRA",
36
+ datasourcesFilter: [
37
+ "JIRA",
38
+ ],
39
+ queryOverridesFacetFilters: true,
40
+ facetFilters: [
41
+ {
42
+ fieldName: "type",
43
+ values: [
44
+ {
45
+ value: "Spreadsheet",
46
+ relationType: "EQUALS",
47
+ },
48
+ {
49
+ value: "Presentation",
50
+ relationType: "EQUALS",
51
+ },
52
+ ],
53
+ },
54
+ ],
55
+ facetFilterSets: [
56
+ {
57
+ filters: [
58
+ {
59
+ fieldName: "type",
60
+ values: [
61
+ {
62
+ value: "Spreadsheet",
63
+ relationType: "EQUALS",
64
+ },
65
+ {
66
+ value: "Presentation",
67
+ relationType: "EQUALS",
68
+ },
69
+ ],
70
+ },
71
+ ],
72
+ },
73
+ {
74
+ filters: [
75
+ {
76
+ fieldName: "type",
77
+ values: [
78
+ {
79
+ value: "Spreadsheet",
80
+ relationType: "EQUALS",
81
+ },
82
+ {
83
+ value: "Presentation",
84
+ relationType: "EQUALS",
85
+ },
86
+ ],
87
+ },
88
+ ],
89
+ },
90
+ ],
91
+ facetBucketSize: 134365,
92
+ authTokens: [
93
+ {
94
+ accessToken: "123abc",
95
+ datasource: "gmail",
96
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
97
+ tokenType: "Bearer",
98
+ authUser: "1",
99
+ },
100
+ ],
101
+ },
102
+ ranges: [
103
+ {
104
+ startIndex: 796474,
105
+ document: {
106
+ metadata: {
107
+ datasource: "datasource",
108
+ objectType: "Feature Request",
109
+ container: "container",
110
+ parentId: "JIRA_EN-1337",
111
+ mimeType: "mimeType",
112
+ documentId: "documentId",
113
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
114
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
115
+ components: [
116
+ "Backend",
117
+ "Networking",
118
+ ],
119
+ status: "[\"Done\"]",
120
+ pins: [
121
+ {
122
+ audienceFilters: [
123
+ {
124
+ fieldName: "type",
125
+ values: [
126
+ {
127
+ value: "Spreadsheet",
128
+ relationType: "EQUALS",
129
+ },
130
+ {
131
+ value: "Presentation",
132
+ relationType: "EQUALS",
133
+ },
134
+ ],
135
+ },
136
+ ],
137
+ documentId: "<id>",
138
+ },
139
+ {
140
+ audienceFilters: [
141
+ {
142
+ fieldName: "type",
143
+ values: [
144
+ {
145
+ value: "Spreadsheet",
146
+ relationType: "EQUALS",
147
+ },
148
+ {
149
+ value: "Presentation",
150
+ relationType: "EQUALS",
151
+ },
152
+ ],
153
+ },
154
+ ],
155
+ documentId: "<id>",
156
+ },
157
+ {
158
+ audienceFilters: [
159
+ {
160
+ fieldName: "type",
161
+ values: [
162
+ {
163
+ value: "Spreadsheet",
164
+ relationType: "EQUALS",
165
+ },
166
+ {
167
+ value: "Presentation",
168
+ relationType: "EQUALS",
169
+ },
170
+ ],
171
+ },
172
+ ],
173
+ documentId: "<id>",
174
+ },
175
+ ],
176
+ collections: [
177
+ {
178
+ name: "<value>",
179
+ description: "fumigate convection though zowie",
180
+ audienceFilters: [
181
+ {
182
+ fieldName: "type",
183
+ values: [
184
+ {
185
+ value: "Spreadsheet",
186
+ relationType: "EQUALS",
187
+ },
188
+ {
189
+ value: "Presentation",
190
+ relationType: "EQUALS",
191
+ },
192
+ ],
193
+ },
194
+ ],
195
+ id: 496323,
196
+ items: [
197
+ {
198
+ collectionId: 782367,
199
+ shortcut: {
200
+ inputAlias: "<value>",
201
+ },
202
+ itemType: "URL",
203
+ },
204
+ ],
205
+ },
206
+ ],
207
+ interactions: {
208
+ reacts: [
209
+ {},
210
+ {},
211
+ {},
212
+ ],
213
+ shares: [
214
+ {
215
+ numDaysAgo: 219974,
216
+ },
217
+ {
218
+ numDaysAgo: 449221,
219
+ },
220
+ {
221
+ numDaysAgo: 427887,
222
+ },
223
+ ],
224
+ },
225
+ verification: {
226
+ state: "VERIFIED",
227
+ metadata: {
228
+ reminders: [
229
+ {
230
+ assignee: {
231
+ name: "George Clooney",
232
+ obfuscatedId: "abc123",
233
+ },
234
+ remindAt: 491427,
235
+ },
236
+ ],
237
+ lastReminder: {
238
+ assignee: {
239
+ name: "George Clooney",
240
+ obfuscatedId: "abc123",
241
+ },
242
+ remindAt: 490420,
243
+ },
244
+ },
245
+ },
246
+ shortcuts: [
247
+ {
248
+ inputAlias: "<value>",
249
+ },
250
+ ],
251
+ customData: {
252
+ "someCustomField": {},
253
+ },
254
+ },
255
+ },
256
+ },
257
+ ],
258
+ inputDetails: {
259
+ hasCopyPaste: true,
260
+ },
261
+ },
262
+ results: [
263
+ {
264
+ title: "title",
265
+ url: "https://example.com/foo/bar",
266
+ nativeAppUrl: "slack://foo/bar",
267
+ snippets: [
268
+ {
269
+ snippet: "snippet",
270
+ mimeType: "mimeType",
271
+ },
272
+ ],
273
+ },
274
+ ],
275
+ },
276
+ {
277
+ querySuggestion: {
278
+ query: "app:github type:pull author:mortimer",
279
+ searchProviderInfo: {
280
+ name: "Google",
281
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
282
+ },
283
+ label: "Mortimer's PRs",
284
+ datasource: "github",
285
+ requestOptions: {
286
+ datasourceFilter: "JIRA",
287
+ datasourcesFilter: [
288
+ "JIRA",
289
+ ],
290
+ queryOverridesFacetFilters: true,
291
+ facetFilters: [
292
+ {
293
+ fieldName: "type",
294
+ values: [
295
+ {
296
+ value: "Spreadsheet",
297
+ relationType: "EQUALS",
298
+ },
299
+ {
300
+ value: "Presentation",
301
+ relationType: "EQUALS",
302
+ },
303
+ ],
304
+ },
305
+ ],
306
+ facetFilterSets: [
307
+ {
308
+ filters: [
309
+ {
310
+ fieldName: "type",
311
+ values: [
312
+ {
313
+ value: "Spreadsheet",
314
+ relationType: "EQUALS",
315
+ },
316
+ {
317
+ value: "Presentation",
318
+ relationType: "EQUALS",
319
+ },
320
+ ],
321
+ },
322
+ ],
323
+ },
324
+ ],
325
+ facetBucketSize: 129663,
326
+ authTokens: [
327
+ {
328
+ accessToken: "123abc",
329
+ datasource: "gmail",
330
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
331
+ tokenType: "Bearer",
332
+ authUser: "1",
333
+ },
334
+ ],
335
+ },
336
+ inputDetails: {
337
+ hasCopyPaste: true,
338
+ },
339
+ },
340
+ },
341
+ ],
25
342
  metadata: {
26
343
  type: "FULL_TIME",
27
344
  title: "Actor",
@@ -38,12 +355,32 @@ const testclient_js_1 = require("./testclient.js");
38
355
  },
39
356
  ],
40
357
  querySuggestions: {
41
- suggestions: [],
358
+ suggestions: [
359
+ {
360
+ query: "app:github type:pull author:mortimer",
361
+ label: "Mortimer's PRs",
362
+ datasource: "github",
363
+ },
364
+ ],
42
365
  },
43
366
  inviteInfo: {
44
- invites: [],
367
+ invites: [
368
+ {},
369
+ {},
370
+ ],
45
371
  },
46
- customFields: [],
372
+ customFields: [
373
+ {
374
+ label: "<value>",
375
+ values: [
376
+ {},
377
+ ],
378
+ },
379
+ {
380
+ label: "<value>",
381
+ values: [],
382
+ },
383
+ ],
47
384
  badges: [
48
385
  {
49
386
  key: "deployment_name_new_hire",
@@ -61,17 +398,161 @@ const testclient_js_1 = require("./testclient.js");
61
398
  role: "OWNER",
62
399
  },
63
400
  {
401
+ person: {
402
+ name: "George Clooney",
403
+ obfuscatedId: "abc123",
404
+ metadata: {
405
+ type: "FULL_TIME",
406
+ title: "Actor",
407
+ department: "Movies",
408
+ email: "george@example.com",
409
+ location: "Hollywood, CA",
410
+ phone: "6505551234",
411
+ photoUrl: "https://example.com/george.jpg",
412
+ startDate: new index_js_2.RFCDate("2000-01-23"),
413
+ datasourceProfile: [
414
+ {
415
+ datasource: "github",
416
+ handle: "<value>",
417
+ },
418
+ ],
419
+ querySuggestions: {},
420
+ inviteInfo: {},
421
+ badges: [
422
+ {
423
+ key: "deployment_name_new_hire",
424
+ displayName: "New hire",
425
+ iconConfig: {
426
+ color: "#343CED",
427
+ key: "person_icon",
428
+ iconType: "GLYPH",
429
+ name: "user",
430
+ },
431
+ },
432
+ ],
433
+ },
434
+ },
64
435
  role: "VERIFIER",
65
436
  },
66
437
  ],
67
438
  removedRoles: [
68
439
  {
440
+ person: {
441
+ name: "George Clooney",
442
+ obfuscatedId: "abc123",
443
+ metadata: {
444
+ type: "FULL_TIME",
445
+ title: "Actor",
446
+ department: "Movies",
447
+ email: "george@example.com",
448
+ location: "Hollywood, CA",
449
+ phone: "6505551234",
450
+ photoUrl: "https://example.com/george.jpg",
451
+ startDate: new index_js_2.RFCDate("2000-01-23"),
452
+ datasourceProfile: [
453
+ {
454
+ datasource: "github",
455
+ handle: "<value>",
456
+ },
457
+ ],
458
+ querySuggestions: {},
459
+ inviteInfo: {},
460
+ badges: [
461
+ {
462
+ key: "deployment_name_new_hire",
463
+ displayName: "New hire",
464
+ iconConfig: {
465
+ color: "#343CED",
466
+ key: "person_icon",
467
+ iconType: "GLYPH",
468
+ name: "user",
469
+ },
470
+ },
471
+ ],
472
+ },
473
+ },
69
474
  role: "VERIFIER",
70
475
  },
71
476
  {
477
+ person: {
478
+ name: "George Clooney",
479
+ obfuscatedId: "abc123",
480
+ metadata: {
481
+ type: "FULL_TIME",
482
+ title: "Actor",
483
+ department: "Movies",
484
+ email: "george@example.com",
485
+ location: "Hollywood, CA",
486
+ phone: "6505551234",
487
+ photoUrl: "https://example.com/george.jpg",
488
+ startDate: new index_js_2.RFCDate("2000-01-23"),
489
+ datasourceProfile: [
490
+ {
491
+ datasource: "github",
492
+ handle: "<value>",
493
+ },
494
+ {
495
+ datasource: "github",
496
+ handle: "<value>",
497
+ },
498
+ {
499
+ datasource: "github",
500
+ handle: "<value>",
501
+ },
502
+ ],
503
+ querySuggestions: {},
504
+ inviteInfo: {},
505
+ badges: [
506
+ {
507
+ key: "deployment_name_new_hire",
508
+ displayName: "New hire",
509
+ iconConfig: {
510
+ color: "#343CED",
511
+ key: "person_icon",
512
+ iconType: "GLYPH",
513
+ name: "user",
514
+ },
515
+ },
516
+ ],
517
+ },
518
+ },
72
519
  role: "ANSWER_MODERATOR",
73
520
  },
74
521
  {
522
+ person: {
523
+ name: "George Clooney",
524
+ obfuscatedId: "abc123",
525
+ metadata: {
526
+ type: "FULL_TIME",
527
+ title: "Actor",
528
+ department: "Movies",
529
+ email: "george@example.com",
530
+ location: "Hollywood, CA",
531
+ phone: "6505551234",
532
+ photoUrl: "https://example.com/george.jpg",
533
+ startDate: new index_js_2.RFCDate("2000-01-23"),
534
+ datasourceProfile: [
535
+ {
536
+ datasource: "github",
537
+ handle: "<value>",
538
+ },
539
+ ],
540
+ querySuggestions: {},
541
+ inviteInfo: {},
542
+ badges: [
543
+ {
544
+ key: "deployment_name_new_hire",
545
+ displayName: "New hire",
546
+ iconConfig: {
547
+ color: "#343CED",
548
+ key: "person_icon",
549
+ iconType: "GLYPH",
550
+ name: "user",
551
+ },
552
+ },
553
+ ],
554
+ },
555
+ },
75
556
  role: "OWNER",
76
557
  },
77
558
  ],
@@ -141,7 +622,391 @@ const testclient_js_1 = require("./testclient.js");
141
622
  person: {
142
623
  name: "George Clooney",
143
624
  obfuscatedId: "abc123",
144
- relatedDocuments: [],
625
+ relatedDocuments: [
626
+ {
627
+ querySuggestion: {
628
+ query: "app:github type:pull author:mortimer",
629
+ searchProviderInfo: {
630
+ name: "Google",
631
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
632
+ },
633
+ label: "Mortimer's PRs",
634
+ datasource: "github",
635
+ requestOptions: {
636
+ datasourceFilter: "JIRA",
637
+ datasourcesFilter: [
638
+ "JIRA",
639
+ ],
640
+ queryOverridesFacetFilters: true,
641
+ facetFilters: [
642
+ {
643
+ fieldName: "type",
644
+ values: [
645
+ {
646
+ value: "Spreadsheet",
647
+ relationType: "EQUALS",
648
+ },
649
+ {
650
+ value: "Presentation",
651
+ relationType: "EQUALS",
652
+ },
653
+ ],
654
+ },
655
+ ],
656
+ facetFilterSets: [
657
+ {
658
+ filters: [
659
+ {
660
+ fieldName: "type",
661
+ values: [
662
+ {
663
+ value: "Spreadsheet",
664
+ relationType: "EQUALS",
665
+ },
666
+ {
667
+ value: "Presentation",
668
+ relationType: "EQUALS",
669
+ },
670
+ ],
671
+ },
672
+ ],
673
+ },
674
+ {
675
+ filters: [
676
+ {
677
+ fieldName: "type",
678
+ values: [
679
+ {
680
+ value: "Spreadsheet",
681
+ relationType: "EQUALS",
682
+ },
683
+ {
684
+ value: "Presentation",
685
+ relationType: "EQUALS",
686
+ },
687
+ ],
688
+ },
689
+ ],
690
+ },
691
+ {
692
+ filters: [
693
+ {
694
+ fieldName: "type",
695
+ values: [
696
+ {
697
+ value: "Spreadsheet",
698
+ relationType: "EQUALS",
699
+ },
700
+ {
701
+ value: "Presentation",
702
+ relationType: "EQUALS",
703
+ },
704
+ ],
705
+ },
706
+ ],
707
+ },
708
+ ],
709
+ facetBucketSize: 627690,
710
+ authTokens: [
711
+ {
712
+ accessToken: "123abc",
713
+ datasource: "gmail",
714
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
715
+ tokenType: "Bearer",
716
+ authUser: "1",
717
+ },
718
+ ],
719
+ },
720
+ ranges: [
721
+ {
722
+ startIndex: 984008,
723
+ document: {
724
+ metadata: {
725
+ datasource: "datasource",
726
+ objectType: "Feature Request",
727
+ container: "container",
728
+ parentId: "JIRA_EN-1337",
729
+ mimeType: "mimeType",
730
+ documentId: "documentId",
731
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
732
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
733
+ components: [
734
+ "Backend",
735
+ "Networking",
736
+ ],
737
+ status: "[\"Done\"]",
738
+ pins: [
739
+ {
740
+ audienceFilters: [
741
+ {
742
+ fieldName: "type",
743
+ values: [
744
+ {
745
+ value: "Spreadsheet",
746
+ relationType: "EQUALS",
747
+ },
748
+ {
749
+ value: "Presentation",
750
+ relationType: "EQUALS",
751
+ },
752
+ ],
753
+ },
754
+ ],
755
+ documentId: "<id>",
756
+ },
757
+ ],
758
+ collections: [
759
+ {
760
+ name: "<value>",
761
+ description: "for drat underneath sticky yuck even",
762
+ audienceFilters: [
763
+ {
764
+ fieldName: "type",
765
+ values: [
766
+ {
767
+ value: "Spreadsheet",
768
+ relationType: "EQUALS",
769
+ },
770
+ {
771
+ value: "Presentation",
772
+ relationType: "EQUALS",
773
+ },
774
+ ],
775
+ },
776
+ ],
777
+ id: 996168,
778
+ items: [
779
+ {
780
+ collectionId: 392671,
781
+ shortcut: {
782
+ inputAlias: "<value>",
783
+ },
784
+ itemType: "TEXT",
785
+ },
786
+ {
787
+ collectionId: 845914,
788
+ shortcut: {
789
+ inputAlias: "<value>",
790
+ },
791
+ itemType: "URL",
792
+ },
793
+ ],
794
+ },
795
+ {
796
+ name: "<value>",
797
+ description: "duh now mechanically during since anxiously lightly ultimately",
798
+ audienceFilters: [
799
+ {
800
+ fieldName: "type",
801
+ values: [
802
+ {
803
+ value: "Spreadsheet",
804
+ relationType: "EQUALS",
805
+ },
806
+ {
807
+ value: "Presentation",
808
+ relationType: "EQUALS",
809
+ },
810
+ ],
811
+ },
812
+ ],
813
+ id: 958595,
814
+ },
815
+ {
816
+ name: "<value>",
817
+ description: "whereas anenst habit onto worriedly revoke hm eminent sham",
818
+ audienceFilters: [
819
+ {
820
+ fieldName: "type",
821
+ values: [
822
+ {
823
+ value: "Spreadsheet",
824
+ relationType: "EQUALS",
825
+ },
826
+ {
827
+ value: "Presentation",
828
+ relationType: "EQUALS",
829
+ },
830
+ ],
831
+ },
832
+ ],
833
+ id: 115263,
834
+ },
835
+ ],
836
+ interactions: {
837
+ reacts: [
838
+ {},
839
+ {},
840
+ {},
841
+ ],
842
+ shares: [
843
+ {
844
+ numDaysAgo: 691669,
845
+ },
846
+ {
847
+ numDaysAgo: 202116,
848
+ },
849
+ ],
850
+ },
851
+ verification: {
852
+ state: "UNVERIFIED",
853
+ metadata: {
854
+ reminders: [
855
+ {
856
+ assignee: {
857
+ name: "George Clooney",
858
+ obfuscatedId: "abc123",
859
+ },
860
+ remindAt: 246216,
861
+ },
862
+ ],
863
+ lastReminder: {
864
+ assignee: {
865
+ name: "George Clooney",
866
+ obfuscatedId: "abc123",
867
+ },
868
+ remindAt: 778241,
869
+ },
870
+ },
871
+ },
872
+ shortcuts: [
873
+ {
874
+ inputAlias: "<value>",
875
+ },
876
+ {
877
+ inputAlias: "<value>",
878
+ },
879
+ {
880
+ inputAlias: "<value>",
881
+ },
882
+ ],
883
+ customData: {
884
+ "someCustomField": {},
885
+ },
886
+ },
887
+ },
888
+ },
889
+ {
890
+ startIndex: 698908,
891
+ document: {
892
+ metadata: {
893
+ datasource: "datasource",
894
+ objectType: "Feature Request",
895
+ container: "container",
896
+ parentId: "JIRA_EN-1337",
897
+ mimeType: "mimeType",
898
+ documentId: "documentId",
899
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
900
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
901
+ components: [
902
+ "Backend",
903
+ "Networking",
904
+ ],
905
+ status: "[\"Done\"]",
906
+ interactions: {},
907
+ verification: {
908
+ state: "UNVERIFIED",
909
+ metadata: {
910
+ lastReminder: {
911
+ assignee: {
912
+ name: "George Clooney",
913
+ obfuscatedId: "abc123",
914
+ },
915
+ remindAt: 451776,
916
+ },
917
+ },
918
+ },
919
+ customData: {
920
+ "someCustomField": {},
921
+ },
922
+ },
923
+ },
924
+ },
925
+ ],
926
+ inputDetails: {
927
+ hasCopyPaste: true,
928
+ },
929
+ },
930
+ results: [
931
+ {
932
+ title: "title",
933
+ url: "https://example.com/foo/bar",
934
+ nativeAppUrl: "slack://foo/bar",
935
+ snippets: [
936
+ {
937
+ snippet: "snippet",
938
+ mimeType: "mimeType",
939
+ },
940
+ ],
941
+ },
942
+ ],
943
+ },
944
+ {
945
+ querySuggestion: {
946
+ query: "app:github type:pull author:mortimer",
947
+ searchProviderInfo: {
948
+ name: "Google",
949
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
950
+ },
951
+ label: "Mortimer's PRs",
952
+ datasource: "github",
953
+ requestOptions: {
954
+ datasourceFilter: "JIRA",
955
+ datasourcesFilter: [
956
+ "JIRA",
957
+ ],
958
+ queryOverridesFacetFilters: true,
959
+ facetFilters: [
960
+ {
961
+ fieldName: "type",
962
+ values: [
963
+ {
964
+ value: "Spreadsheet",
965
+ relationType: "EQUALS",
966
+ },
967
+ {
968
+ value: "Presentation",
969
+ relationType: "EQUALS",
970
+ },
971
+ ],
972
+ },
973
+ ],
974
+ facetFilterSets: [
975
+ {
976
+ filters: [
977
+ {
978
+ fieldName: "type",
979
+ values: [
980
+ {
981
+ value: "Spreadsheet",
982
+ relationType: "EQUALS",
983
+ },
984
+ {
985
+ value: "Presentation",
986
+ relationType: "EQUALS",
987
+ },
988
+ ],
989
+ },
990
+ ],
991
+ },
992
+ ],
993
+ facetBucketSize: 158724,
994
+ authTokens: [
995
+ {
996
+ accessToken: "123abc",
997
+ datasource: "gmail",
998
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
999
+ tokenType: "Bearer",
1000
+ authUser: "1",
1001
+ },
1002
+ ],
1003
+ },
1004
+ inputDetails: {
1005
+ hasCopyPaste: true,
1006
+ },
1007
+ },
1008
+ },
1009
+ ],
145
1010
  metadata: {
146
1011
  type: "FULL_TIME",
147
1012
  title: "Actor",
@@ -166,12 +1031,34 @@ const testclient_js_1 = require("./testclient.js");
166
1031
  },
167
1032
  ],
168
1033
  querySuggestions: {
169
- suggestions: [],
1034
+ suggestions: [
1035
+ {
1036
+ query: "app:github type:pull author:mortimer",
1037
+ label: "Mortimer's PRs",
1038
+ datasource: "github",
1039
+ },
1040
+ ],
170
1041
  },
171
1042
  inviteInfo: {
172
- invites: [],
1043
+ invites: [
1044
+ {},
1045
+ {},
1046
+ ],
173
1047
  },
174
- customFields: [],
1048
+ customFields: [
1049
+ {
1050
+ label: "<value>",
1051
+ values: [
1052
+ {},
1053
+ {},
1054
+ {},
1055
+ ],
1056
+ },
1057
+ {
1058
+ label: "<value>",
1059
+ values: [],
1060
+ },
1061
+ ],
175
1062
  badges: [
176
1063
  {
177
1064
  key: "deployment_name_new_hire",
@@ -189,17 +1076,173 @@ const testclient_js_1 = require("./testclient.js");
189
1076
  role: "ANSWER_MODERATOR",
190
1077
  },
191
1078
  {
1079
+ person: {
1080
+ name: "George Clooney",
1081
+ obfuscatedId: "abc123",
1082
+ metadata: {
1083
+ type: "FULL_TIME",
1084
+ title: "Actor",
1085
+ department: "Movies",
1086
+ email: "george@example.com",
1087
+ location: "Hollywood, CA",
1088
+ phone: "6505551234",
1089
+ photoUrl: "https://example.com/george.jpg",
1090
+ startDate: new index_js_2.RFCDate("2000-01-23"),
1091
+ datasourceProfile: [
1092
+ {
1093
+ datasource: "github",
1094
+ handle: "<value>",
1095
+ },
1096
+ {
1097
+ datasource: "github",
1098
+ handle: "<value>",
1099
+ },
1100
+ {
1101
+ datasource: "github",
1102
+ handle: "<value>",
1103
+ },
1104
+ ],
1105
+ querySuggestions: {},
1106
+ inviteInfo: {},
1107
+ badges: [
1108
+ {
1109
+ key: "deployment_name_new_hire",
1110
+ displayName: "New hire",
1111
+ iconConfig: {
1112
+ color: "#343CED",
1113
+ key: "person_icon",
1114
+ iconType: "GLYPH",
1115
+ name: "user",
1116
+ },
1117
+ },
1118
+ ],
1119
+ },
1120
+ },
192
1121
  role: "EDITOR",
193
1122
  },
194
1123
  ],
195
1124
  removedRoles: [
196
1125
  {
1126
+ person: {
1127
+ name: "George Clooney",
1128
+ obfuscatedId: "abc123",
1129
+ metadata: {
1130
+ type: "FULL_TIME",
1131
+ title: "Actor",
1132
+ department: "Movies",
1133
+ email: "george@example.com",
1134
+ location: "Hollywood, CA",
1135
+ phone: "6505551234",
1136
+ photoUrl: "https://example.com/george.jpg",
1137
+ startDate: new index_js_2.RFCDate("2000-01-23"),
1138
+ datasourceProfile: [
1139
+ {
1140
+ datasource: "github",
1141
+ handle: "<value>",
1142
+ },
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
+ },
197
1164
  role: "VIEWER",
198
1165
  },
199
1166
  {
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 index_js_2.RFCDate("2000-01-23"),
1179
+ datasourceProfile: [
1180
+ {
1181
+ datasource: "github",
1182
+ handle: "<value>",
1183
+ },
1184
+ {
1185
+ datasource: "github",
1186
+ handle: "<value>",
1187
+ },
1188
+ ],
1189
+ querySuggestions: {},
1190
+ inviteInfo: {},
1191
+ badges: [
1192
+ {
1193
+ key: "deployment_name_new_hire",
1194
+ displayName: "New hire",
1195
+ iconConfig: {
1196
+ color: "#343CED",
1197
+ key: "person_icon",
1198
+ iconType: "GLYPH",
1199
+ name: "user",
1200
+ },
1201
+ },
1202
+ ],
1203
+ },
1204
+ },
200
1205
  role: "OWNER",
201
1206
  },
202
1207
  {
1208
+ person: {
1209
+ name: "George Clooney",
1210
+ obfuscatedId: "abc123",
1211
+ metadata: {
1212
+ type: "FULL_TIME",
1213
+ title: "Actor",
1214
+ department: "Movies",
1215
+ email: "george@example.com",
1216
+ location: "Hollywood, CA",
1217
+ phone: "6505551234",
1218
+ photoUrl: "https://example.com/george.jpg",
1219
+ startDate: new index_js_2.RFCDate("2000-01-23"),
1220
+ datasourceProfile: [
1221
+ {
1222
+ datasource: "github",
1223
+ handle: "<value>",
1224
+ },
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
+ },
203
1246
  role: "VIEWER",
204
1247
  },
205
1248
  ],