@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 @@ const testclient_js_1 = require("./testclient.js");
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 @@ const testclient_js_1 = require("./testclient.js");
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 @@ const testclient_js_1 = require("./testclient.js");
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 index_js_2.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 index_js_2.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 index_js_2.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 index_js_2.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
  ],
@@ -146,7 +627,402 @@ const testclient_js_1 = require("./testclient.js");
146
627
  person: {
147
628
  name: "George Clooney",
148
629
  obfuscatedId: "abc123",
149
- relatedDocuments: [],
630
+ relatedDocuments: [
631
+ {
632
+ querySuggestion: {
633
+ query: "app:github type:pull author:mortimer",
634
+ searchProviderInfo: {
635
+ name: "Google",
636
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
637
+ },
638
+ label: "Mortimer's PRs",
639
+ datasource: "github",
640
+ requestOptions: {
641
+ datasourceFilter: "JIRA",
642
+ datasourcesFilter: [
643
+ "JIRA",
644
+ ],
645
+ queryOverridesFacetFilters: true,
646
+ facetFilters: [
647
+ {
648
+ fieldName: "type",
649
+ values: [
650
+ {
651
+ value: "Spreadsheet",
652
+ relationType: "EQUALS",
653
+ },
654
+ {
655
+ value: "Presentation",
656
+ relationType: "EQUALS",
657
+ },
658
+ ],
659
+ },
660
+ ],
661
+ facetFilterSets: [
662
+ {
663
+ filters: [
664
+ {
665
+ fieldName: "type",
666
+ values: [
667
+ {
668
+ value: "Spreadsheet",
669
+ relationType: "EQUALS",
670
+ },
671
+ {
672
+ value: "Presentation",
673
+ relationType: "EQUALS",
674
+ },
675
+ ],
676
+ },
677
+ ],
678
+ },
679
+ {
680
+ filters: [
681
+ {
682
+ fieldName: "type",
683
+ values: [
684
+ {
685
+ value: "Spreadsheet",
686
+ relationType: "EQUALS",
687
+ },
688
+ {
689
+ value: "Presentation",
690
+ relationType: "EQUALS",
691
+ },
692
+ ],
693
+ },
694
+ ],
695
+ },
696
+ ],
697
+ facetBucketSize: 991464,
698
+ authTokens: [
699
+ {
700
+ accessToken: "123abc",
701
+ datasource: "gmail",
702
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
703
+ tokenType: "Bearer",
704
+ authUser: "1",
705
+ },
706
+ ],
707
+ },
708
+ ranges: [
709
+ {
710
+ startIndex: 488852,
711
+ document: {
712
+ metadata: {
713
+ datasource: "datasource",
714
+ objectType: "Feature Request",
715
+ container: "container",
716
+ parentId: "JIRA_EN-1337",
717
+ mimeType: "mimeType",
718
+ documentId: "documentId",
719
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
720
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
721
+ components: [
722
+ "Backend",
723
+ "Networking",
724
+ ],
725
+ status: "[\"Done\"]",
726
+ pins: [
727
+ {
728
+ audienceFilters: [
729
+ {
730
+ fieldName: "type",
731
+ values: [
732
+ {
733
+ value: "Spreadsheet",
734
+ relationType: "EQUALS",
735
+ },
736
+ {
737
+ value: "Presentation",
738
+ relationType: "EQUALS",
739
+ },
740
+ ],
741
+ },
742
+ ],
743
+ documentId: "<id>",
744
+ },
745
+ {
746
+ audienceFilters: [
747
+ {
748
+ fieldName: "type",
749
+ values: [
750
+ {
751
+ value: "Spreadsheet",
752
+ relationType: "EQUALS",
753
+ },
754
+ {
755
+ value: "Presentation",
756
+ relationType: "EQUALS",
757
+ },
758
+ ],
759
+ },
760
+ ],
761
+ documentId: "<id>",
762
+ },
763
+ {
764
+ audienceFilters: [
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
+ documentId: "<id>",
780
+ },
781
+ ],
782
+ collections: [
783
+ {
784
+ name: "<value>",
785
+ description: "eulogise whereas till mild than during meanwhile disapprove finer ha",
786
+ audienceFilters: [
787
+ {
788
+ fieldName: "type",
789
+ values: [
790
+ {
791
+ value: "Spreadsheet",
792
+ relationType: "EQUALS",
793
+ },
794
+ {
795
+ value: "Presentation",
796
+ relationType: "EQUALS",
797
+ },
798
+ ],
799
+ },
800
+ ],
801
+ id: 2984,
802
+ items: [
803
+ {
804
+ collectionId: 477967,
805
+ shortcut: {
806
+ inputAlias: "<value>",
807
+ },
808
+ itemType: "COLLECTION",
809
+ },
810
+ {
811
+ collectionId: 424273,
812
+ shortcut: {
813
+ inputAlias: "<value>",
814
+ },
815
+ itemType: "COLLECTION",
816
+ },
817
+ ],
818
+ },
819
+ ],
820
+ interactions: {
821
+ reacts: [
822
+ {},
823
+ ],
824
+ shares: [
825
+ {
826
+ numDaysAgo: 301848,
827
+ },
828
+ {
829
+ numDaysAgo: 657278,
830
+ },
831
+ ],
832
+ },
833
+ verification: {
834
+ state: "UNVERIFIED",
835
+ metadata: {
836
+ reminders: [
837
+ {
838
+ assignee: {
839
+ name: "George Clooney",
840
+ obfuscatedId: "abc123",
841
+ },
842
+ remindAt: 335191,
843
+ },
844
+ ],
845
+ lastReminder: {
846
+ assignee: {
847
+ name: "George Clooney",
848
+ obfuscatedId: "abc123",
849
+ },
850
+ remindAt: 532806,
851
+ },
852
+ },
853
+ },
854
+ shortcuts: [
855
+ {
856
+ inputAlias: "<value>",
857
+ },
858
+ {
859
+ inputAlias: "<value>",
860
+ },
861
+ {
862
+ inputAlias: "<value>",
863
+ },
864
+ ],
865
+ customData: {
866
+ "someCustomField": {},
867
+ },
868
+ },
869
+ },
870
+ },
871
+ {
872
+ startIndex: 463392,
873
+ document: {
874
+ metadata: {
875
+ datasource: "datasource",
876
+ objectType: "Feature Request",
877
+ container: "container",
878
+ parentId: "JIRA_EN-1337",
879
+ mimeType: "mimeType",
880
+ documentId: "documentId",
881
+ createTime: new Date("2000-01-23T04:56:07.000Z"),
882
+ updateTime: new Date("2000-01-23T04:56:07.000Z"),
883
+ components: [
884
+ "Backend",
885
+ "Networking",
886
+ ],
887
+ status: "[\"Done\"]",
888
+ interactions: {},
889
+ verification: {
890
+ state: "VERIFIED",
891
+ metadata: {
892
+ lastReminder: {
893
+ assignee: {
894
+ name: "George Clooney",
895
+ obfuscatedId: "abc123",
896
+ },
897
+ remindAt: 58704,
898
+ },
899
+ },
900
+ },
901
+ customData: {
902
+ "someCustomField": {},
903
+ },
904
+ },
905
+ },
906
+ },
907
+ ],
908
+ inputDetails: {
909
+ hasCopyPaste: true,
910
+ },
911
+ },
912
+ results: [
913
+ {
914
+ title: "title",
915
+ url: "https://example.com/foo/bar",
916
+ nativeAppUrl: "slack://foo/bar",
917
+ snippets: [
918
+ {
919
+ snippet: "snippet",
920
+ mimeType: "mimeType",
921
+ },
922
+ ],
923
+ },
924
+ ],
925
+ },
926
+ {
927
+ querySuggestion: {
928
+ query: "app:github type:pull author:mortimer",
929
+ searchProviderInfo: {
930
+ name: "Google",
931
+ searchLinkUrlTemplate: "https://www.google.com/search?q={query}&hl=en",
932
+ },
933
+ label: "Mortimer's PRs",
934
+ datasource: "github",
935
+ requestOptions: {
936
+ datasourceFilter: "JIRA",
937
+ datasourcesFilter: [
938
+ "JIRA",
939
+ ],
940
+ queryOverridesFacetFilters: true,
941
+ facetFilters: [
942
+ {
943
+ fieldName: "type",
944
+ values: [
945
+ {
946
+ value: "Spreadsheet",
947
+ relationType: "EQUALS",
948
+ },
949
+ {
950
+ value: "Presentation",
951
+ relationType: "EQUALS",
952
+ },
953
+ ],
954
+ },
955
+ ],
956
+ facetFilterSets: [
957
+ {
958
+ filters: [
959
+ {
960
+ fieldName: "type",
961
+ values: [
962
+ {
963
+ value: "Spreadsheet",
964
+ relationType: "EQUALS",
965
+ },
966
+ {
967
+ value: "Presentation",
968
+ relationType: "EQUALS",
969
+ },
970
+ ],
971
+ },
972
+ ],
973
+ },
974
+ {
975
+ filters: [
976
+ {
977
+ fieldName: "type",
978
+ values: [
979
+ {
980
+ value: "Spreadsheet",
981
+ relationType: "EQUALS",
982
+ },
983
+ {
984
+ value: "Presentation",
985
+ relationType: "EQUALS",
986
+ },
987
+ ],
988
+ },
989
+ ],
990
+ },
991
+ {
992
+ filters: [
993
+ {
994
+ fieldName: "type",
995
+ values: [
996
+ {
997
+ value: "Spreadsheet",
998
+ relationType: "EQUALS",
999
+ },
1000
+ {
1001
+ value: "Presentation",
1002
+ relationType: "EQUALS",
1003
+ },
1004
+ ],
1005
+ },
1006
+ ],
1007
+ },
1008
+ ],
1009
+ facetBucketSize: 326276,
1010
+ authTokens: [
1011
+ {
1012
+ accessToken: "123abc",
1013
+ datasource: "gmail",
1014
+ scope: "email profile https://www.googleapis.com/auth/gmail.readonly",
1015
+ tokenType: "Bearer",
1016
+ authUser: "1",
1017
+ },
1018
+ ],
1019
+ },
1020
+ inputDetails: {
1021
+ hasCopyPaste: true,
1022
+ },
1023
+ },
1024
+ },
1025
+ ],
150
1026
  metadata: {
151
1027
  type: "FULL_TIME",
152
1028
  title: "Actor",
@@ -163,12 +1039,29 @@ const testclient_js_1 = require("./testclient.js");
163
1039
  },
164
1040
  ],
165
1041
  querySuggestions: {
166
- suggestions: [],
1042
+ suggestions: [
1043
+ {
1044
+ query: "app:github type:pull author:mortimer",
1045
+ label: "Mortimer's PRs",
1046
+ datasource: "github",
1047
+ },
1048
+ ],
167
1049
  },
168
1050
  inviteInfo: {
169
- invites: [],
1051
+ invites: [
1052
+ {},
1053
+ {},
1054
+ {},
1055
+ ],
170
1056
  },
171
- customFields: [],
1057
+ customFields: [
1058
+ {
1059
+ label: "<value>",
1060
+ values: [
1061
+ {},
1062
+ ],
1063
+ },
1064
+ ],
172
1065
  badges: [
173
1066
  {
174
1067
  key: "deployment_name_new_hire",
@@ -186,17 +1079,169 @@ const testclient_js_1 = require("./testclient.js");
186
1079
  role: "EDITOR",
187
1080
  },
188
1081
  {
1082
+ person: {
1083
+ name: "George Clooney",
1084
+ obfuscatedId: "abc123",
1085
+ metadata: {
1086
+ type: "FULL_TIME",
1087
+ title: "Actor",
1088
+ department: "Movies",
1089
+ email: "george@example.com",
1090
+ location: "Hollywood, CA",
1091
+ phone: "6505551234",
1092
+ photoUrl: "https://example.com/george.jpg",
1093
+ startDate: new index_js_2.RFCDate("2000-01-23"),
1094
+ datasourceProfile: [
1095
+ {
1096
+ datasource: "github",
1097
+ handle: "<value>",
1098
+ },
1099
+ {
1100
+ datasource: "github",
1101
+ handle: "<value>",
1102
+ },
1103
+ ],
1104
+ querySuggestions: {},
1105
+ inviteInfo: {},
1106
+ badges: [
1107
+ {
1108
+ key: "deployment_name_new_hire",
1109
+ displayName: "New hire",
1110
+ iconConfig: {
1111
+ color: "#343CED",
1112
+ key: "person_icon",
1113
+ iconType: "GLYPH",
1114
+ name: "user",
1115
+ },
1116
+ },
1117
+ ],
1118
+ },
1119
+ },
189
1120
  role: "ANSWER_MODERATOR",
190
1121
  },
191
1122
  {
1123
+ person: {
1124
+ name: "George Clooney",
1125
+ obfuscatedId: "abc123",
1126
+ metadata: {
1127
+ type: "FULL_TIME",
1128
+ title: "Actor",
1129
+ department: "Movies",
1130
+ email: "george@example.com",
1131
+ location: "Hollywood, CA",
1132
+ phone: "6505551234",
1133
+ photoUrl: "https://example.com/george.jpg",
1134
+ startDate: new index_js_2.RFCDate("2000-01-23"),
1135
+ datasourceProfile: [
1136
+ {
1137
+ datasource: "github",
1138
+ handle: "<value>",
1139
+ },
1140
+ ],
1141
+ querySuggestions: {},
1142
+ inviteInfo: {},
1143
+ badges: [
1144
+ {
1145
+ key: "deployment_name_new_hire",
1146
+ displayName: "New hire",
1147
+ iconConfig: {
1148
+ color: "#343CED",
1149
+ key: "person_icon",
1150
+ iconType: "GLYPH",
1151
+ name: "user",
1152
+ },
1153
+ },
1154
+ ],
1155
+ },
1156
+ },
192
1157
  role: "OWNER",
193
1158
  },
194
1159
  ],
195
1160
  removedRoles: [
196
1161
  {
1162
+ person: {
1163
+ name: "George Clooney",
1164
+ obfuscatedId: "abc123",
1165
+ metadata: {
1166
+ type: "FULL_TIME",
1167
+ title: "Actor",
1168
+ department: "Movies",
1169
+ email: "george@example.com",
1170
+ location: "Hollywood, CA",
1171
+ phone: "6505551234",
1172
+ photoUrl: "https://example.com/george.jpg",
1173
+ startDate: new index_js_2.RFCDate("2000-01-23"),
1174
+ datasourceProfile: [
1175
+ {
1176
+ datasource: "github",
1177
+ handle: "<value>",
1178
+ },
1179
+ {
1180
+ datasource: "github",
1181
+ handle: "<value>",
1182
+ },
1183
+ {
1184
+ datasource: "github",
1185
+ handle: "<value>",
1186
+ },
1187
+ ],
1188
+ querySuggestions: {},
1189
+ inviteInfo: {},
1190
+ badges: [
1191
+ {
1192
+ key: "deployment_name_new_hire",
1193
+ displayName: "New hire",
1194
+ iconConfig: {
1195
+ color: "#343CED",
1196
+ key: "person_icon",
1197
+ iconType: "GLYPH",
1198
+ name: "user",
1199
+ },
1200
+ },
1201
+ ],
1202
+ },
1203
+ },
197
1204
  role: "OWNER",
198
1205
  },
199
1206
  {
1207
+ person: {
1208
+ name: "George Clooney",
1209
+ obfuscatedId: "abc123",
1210
+ metadata: {
1211
+ type: "FULL_TIME",
1212
+ title: "Actor",
1213
+ department: "Movies",
1214
+ email: "george@example.com",
1215
+ location: "Hollywood, CA",
1216
+ phone: "6505551234",
1217
+ photoUrl: "https://example.com/george.jpg",
1218
+ startDate: new index_js_2.RFCDate("2000-01-23"),
1219
+ datasourceProfile: [
1220
+ {
1221
+ datasource: "github",
1222
+ handle: "<value>",
1223
+ },
1224
+ {
1225
+ datasource: "github",
1226
+ handle: "<value>",
1227
+ },
1228
+ ],
1229
+ querySuggestions: {},
1230
+ inviteInfo: {},
1231
+ badges: [
1232
+ {
1233
+ key: "deployment_name_new_hire",
1234
+ displayName: "New hire",
1235
+ iconConfig: {
1236
+ color: "#343CED",
1237
+ key: "person_icon",
1238
+ iconType: "GLYPH",
1239
+ name: "user",
1240
+ },
1241
+ },
1242
+ ],
1243
+ },
1244
+ },
200
1245
  role: "VERIFIER",
201
1246
  },
202
1247
  ],