-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshared.ts
More file actions
94 lines (70 loc) · 1.86 KB
/
Copy pathshared.ts
File metadata and controls
94 lines (70 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { CursorPage } from '../core/pagination';
export interface Metadata {
created_at?: string | null;
events?: Array<Notification>;
indexed_at?: string | null;
last_modified?: string | null;
status?: 'pending' | 'processing' | 'completed' | 'failed' | 'pending_review' | 'skipped';
url?: string | null;
[k: string]: unknown;
}
export interface Notification {
message: string;
type: 'error' | 'warning' | 'info' | 'success';
time?: string;
}
export interface QueryResult {
documents: Array<Resource>;
/**
* The answer to the query, if the request was set to answer.
*/
answer?: string | null;
/**
* Errors that occurred during the query. These are meant to help the developer
* debug the query, and are not meant to be shown to the user.
*/
errors?: Array<{ [key: string]: string }> | null;
/**
* The ID of the query. This can be used to retrieve the query later, or add
* feedback to it. If the query failed, this will be None.
*/
query_id?: string | null;
/**
* The average score of the query feedback, if any.
*/
score?: number | null;
}
export interface Resource {
resource_id: string;
source:
| 'reddit'
| 'notion'
| 'slack'
| 'google_calendar'
| 'google_mail'
| 'box'
| 'dropbox'
| 'github'
| 'google_drive'
| 'vault'
| 'web_crawler'
| 'trace'
| 'microsoft_teams'
| 'gmail_actions';
/**
* Provider folder ID this resource belongs to
*/
folder_id?: string | null;
metadata?: Metadata;
/**
* Parent folder ID for policy inheritance
*/
parent_folder_id?: string | null;
/**
* The relevance of the resource to the query
*/
score?: number | null;
title?: string | null;
}
export type ResourcesCursorPage = CursorPage<Resource>;