@macro-inc/sdk 0.0.1
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.
- package/README.md +177 -0
- package/dist/chunk-5HAKQN23.js +1263 -0
- package/dist/chunk-77EI4LSQ.js +2492 -0
- package/dist/chunk-CTKR64MY.js +1436 -0
- package/dist/chunk-JXIQT5TH.js +1467 -0
- package/dist/chunk-P4DTO6VD.js +830 -0
- package/dist/chunk-PAAFJYGO.js +967 -0
- package/dist/chunk-QNUS5BC5.js +913 -0
- package/dist/chunk-SGAHIERJ.js +1235 -0
- package/dist/chunk-V45LUJDI.js +838 -0
- package/dist/chunk-YRUXFEZM.js +1044 -0
- package/dist/generated/agent-harness/client/client.gen.d.ts +2 -0
- package/dist/generated/agent-harness/client/index.d.ts +10 -0
- package/dist/generated/agent-harness/client/types.gen.d.ts +120 -0
- package/dist/generated/agent-harness/client/utils.gen.d.ts +37 -0
- package/dist/generated/agent-harness/client.gen.d.ts +12 -0
- package/dist/generated/agent-harness/core/auth.gen.d.ts +25 -0
- package/dist/generated/agent-harness/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/agent-harness/core/params.gen.d.ts +43 -0
- package/dist/generated/agent-harness/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/agent-harness/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/agent-harness/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/agent-harness/core/types.gen.d.ts +83 -0
- package/dist/generated/agent-harness/core/utils.gen.d.ts +19 -0
- package/dist/generated/agent-harness/index.d.ts +2 -0
- package/dist/generated/agent-harness/index.js +6 -0
- package/dist/generated/agent-harness/sdk.gen.d.ts +84 -0
- package/dist/generated/agent-harness/types.gen.d.ts +539 -0
- package/dist/generated/auth/client/client.gen.d.ts +2 -0
- package/dist/generated/auth/client/index.d.ts +10 -0
- package/dist/generated/auth/client/types.gen.d.ts +120 -0
- package/dist/generated/auth/client/utils.gen.d.ts +37 -0
- package/dist/generated/auth/client.gen.d.ts +12 -0
- package/dist/generated/auth/core/auth.gen.d.ts +25 -0
- package/dist/generated/auth/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/auth/core/params.gen.d.ts +43 -0
- package/dist/generated/auth/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/auth/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/auth/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/auth/core/types.gen.d.ts +83 -0
- package/dist/generated/auth/core/utils.gen.d.ts +19 -0
- package/dist/generated/auth/index.d.ts +2 -0
- package/dist/generated/auth/index.js +6 -0
- package/dist/generated/auth/sdk.gen.d.ts +383 -0
- package/dist/generated/auth/types.gen.d.ts +2175 -0
- package/dist/generated/cognition/client/client.gen.d.ts +2 -0
- package/dist/generated/cognition/client/index.d.ts +10 -0
- package/dist/generated/cognition/client/types.gen.d.ts +120 -0
- package/dist/generated/cognition/client/utils.gen.d.ts +37 -0
- package/dist/generated/cognition/client.gen.d.ts +12 -0
- package/dist/generated/cognition/core/auth.gen.d.ts +25 -0
- package/dist/generated/cognition/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/cognition/core/params.gen.d.ts +43 -0
- package/dist/generated/cognition/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/cognition/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/cognition/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/cognition/core/types.gen.d.ts +83 -0
- package/dist/generated/cognition/core/utils.gen.d.ts +19 -0
- package/dist/generated/cognition/index.d.ts +2 -0
- package/dist/generated/cognition/index.js +6 -0
- package/dist/generated/cognition/sdk.gen.d.ts +224 -0
- package/dist/generated/cognition/types.gen.d.ts +2484 -0
- package/dist/generated/connection/client/client.gen.d.ts +2 -0
- package/dist/generated/connection/client/index.d.ts +10 -0
- package/dist/generated/connection/client/types.gen.d.ts +120 -0
- package/dist/generated/connection/client/utils.gen.d.ts +37 -0
- package/dist/generated/connection/client.gen.d.ts +12 -0
- package/dist/generated/connection/core/auth.gen.d.ts +25 -0
- package/dist/generated/connection/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/connection/core/params.gen.d.ts +43 -0
- package/dist/generated/connection/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/connection/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/connection/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/connection/core/types.gen.d.ts +83 -0
- package/dist/generated/connection/core/utils.gen.d.ts +19 -0
- package/dist/generated/connection/index.d.ts +2 -0
- package/dist/generated/connection/index.js +839 -0
- package/dist/generated/connection/sdk.gen.d.ts +38 -0
- package/dist/generated/connection/types.gen.d.ts +235 -0
- package/dist/generated/contacts/client/client.gen.d.ts +2 -0
- package/dist/generated/contacts/client/index.d.ts +10 -0
- package/dist/generated/contacts/client/types.gen.d.ts +120 -0
- package/dist/generated/contacts/client/utils.gen.d.ts +37 -0
- package/dist/generated/contacts/client.gen.d.ts +12 -0
- package/dist/generated/contacts/core/auth.gen.d.ts +25 -0
- package/dist/generated/contacts/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/contacts/core/params.gen.d.ts +43 -0
- package/dist/generated/contacts/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/contacts/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/contacts/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/contacts/core/types.gen.d.ts +83 -0
- package/dist/generated/contacts/core/utils.gen.d.ts +19 -0
- package/dist/generated/contacts/index.d.ts +2 -0
- package/dist/generated/contacts/index.js +6 -0
- package/dist/generated/contacts/sdk.gen.d.ts +43 -0
- package/dist/generated/contacts/types.gen.d.ts +52 -0
- package/dist/generated/email/client/client.gen.d.ts +2 -0
- package/dist/generated/email/client/index.d.ts +10 -0
- package/dist/generated/email/client/types.gen.d.ts +120 -0
- package/dist/generated/email/client/utils.gen.d.ts +37 -0
- package/dist/generated/email/client.gen.d.ts +12 -0
- package/dist/generated/email/core/auth.gen.d.ts +25 -0
- package/dist/generated/email/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/email/core/params.gen.d.ts +43 -0
- package/dist/generated/email/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/email/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/email/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/email/core/types.gen.d.ts +83 -0
- package/dist/generated/email/core/utils.gen.d.ts +19 -0
- package/dist/generated/email/index.d.ts +2 -0
- package/dist/generated/email/index.js +6 -0
- package/dist/generated/email/sdk.gen.d.ts +254 -0
- package/dist/generated/email/types.gen.d.ts +2614 -0
- package/dist/generated/notification/client/client.gen.d.ts +2 -0
- package/dist/generated/notification/client/index.d.ts +10 -0
- package/dist/generated/notification/client/types.gen.d.ts +120 -0
- package/dist/generated/notification/client/utils.gen.d.ts +37 -0
- package/dist/generated/notification/client.gen.d.ts +12 -0
- package/dist/generated/notification/core/auth.gen.d.ts +25 -0
- package/dist/generated/notification/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/notification/core/params.gen.d.ts +43 -0
- package/dist/generated/notification/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/notification/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/notification/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/notification/core/types.gen.d.ts +83 -0
- package/dist/generated/notification/core/utils.gen.d.ts +19 -0
- package/dist/generated/notification/index.d.ts +2 -0
- package/dist/generated/notification/index.js +6 -0
- package/dist/generated/notification/sdk.gen.d.ts +118 -0
- package/dist/generated/notification/types.gen.d.ts +1352 -0
- package/dist/generated/properties/client/client.gen.d.ts +2 -0
- package/dist/generated/properties/client/index.d.ts +10 -0
- package/dist/generated/properties/client/types.gen.d.ts +120 -0
- package/dist/generated/properties/client/utils.gen.d.ts +37 -0
- package/dist/generated/properties/client.gen.d.ts +12 -0
- package/dist/generated/properties/core/auth.gen.d.ts +25 -0
- package/dist/generated/properties/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/properties/core/params.gen.d.ts +43 -0
- package/dist/generated/properties/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/properties/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/properties/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/properties/core/types.gen.d.ts +83 -0
- package/dist/generated/properties/core/utils.gen.d.ts +19 -0
- package/dist/generated/properties/index.d.ts +2 -0
- package/dist/generated/properties/index.js +6 -0
- package/dist/generated/properties/sdk.gen.d.ts +158 -0
- package/dist/generated/properties/types.gen.d.ts +1288 -0
- package/dist/generated/scheduled-action/client/client.gen.d.ts +2 -0
- package/dist/generated/scheduled-action/client/index.d.ts +10 -0
- package/dist/generated/scheduled-action/client/types.gen.d.ts +120 -0
- package/dist/generated/scheduled-action/client/utils.gen.d.ts +37 -0
- package/dist/generated/scheduled-action/client.gen.d.ts +12 -0
- package/dist/generated/scheduled-action/core/auth.gen.d.ts +25 -0
- package/dist/generated/scheduled-action/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/scheduled-action/core/params.gen.d.ts +43 -0
- package/dist/generated/scheduled-action/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/scheduled-action/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/scheduled-action/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/scheduled-action/core/types.gen.d.ts +83 -0
- package/dist/generated/scheduled-action/core/utils.gen.d.ts +19 -0
- package/dist/generated/scheduled-action/index.d.ts +2 -0
- package/dist/generated/scheduled-action/index.js +845 -0
- package/dist/generated/scheduled-action/sdk.gen.d.ts +42 -0
- package/dist/generated/scheduled-action/types.gen.d.ts +241 -0
- package/dist/generated/search/client/client.gen.d.ts +2 -0
- package/dist/generated/search/client/index.d.ts +10 -0
- package/dist/generated/search/client/types.gen.d.ts +120 -0
- package/dist/generated/search/client/utils.gen.d.ts +37 -0
- package/dist/generated/search/client.gen.d.ts +12 -0
- package/dist/generated/search/core/auth.gen.d.ts +25 -0
- package/dist/generated/search/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/search/core/params.gen.d.ts +43 -0
- package/dist/generated/search/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/search/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/search/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/search/core/types.gen.d.ts +83 -0
- package/dist/generated/search/core/utils.gen.d.ts +19 -0
- package/dist/generated/search/index.d.ts +2 -0
- package/dist/generated/search/index.js +6 -0
- package/dist/generated/search/sdk.gen.d.ts +44 -0
- package/dist/generated/search/types.gen.d.ts +2194 -0
- package/dist/generated/static-files/client/client.gen.d.ts +2 -0
- package/dist/generated/static-files/client/index.d.ts +10 -0
- package/dist/generated/static-files/client/types.gen.d.ts +120 -0
- package/dist/generated/static-files/client/utils.gen.d.ts +37 -0
- package/dist/generated/static-files/client.gen.d.ts +12 -0
- package/dist/generated/static-files/core/auth.gen.d.ts +25 -0
- package/dist/generated/static-files/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/static-files/core/params.gen.d.ts +43 -0
- package/dist/generated/static-files/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/static-files/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/static-files/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/static-files/core/types.gen.d.ts +83 -0
- package/dist/generated/static-files/core/utils.gen.d.ts +19 -0
- package/dist/generated/static-files/index.d.ts +2 -0
- package/dist/generated/static-files/index.js +842 -0
- package/dist/generated/static-files/sdk.gen.d.ts +43 -0
- package/dist/generated/static-files/types.gen.d.ts +214 -0
- package/dist/generated/storage/client/client.gen.d.ts +2 -0
- package/dist/generated/storage/client/index.d.ts +10 -0
- package/dist/generated/storage/client/types.gen.d.ts +120 -0
- package/dist/generated/storage/client/utils.gen.d.ts +37 -0
- package/dist/generated/storage/client.gen.d.ts +12 -0
- package/dist/generated/storage/core/auth.gen.d.ts +25 -0
- package/dist/generated/storage/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/storage/core/params.gen.d.ts +43 -0
- package/dist/generated/storage/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/storage/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/storage/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/storage/core/types.gen.d.ts +83 -0
- package/dist/generated/storage/core/utils.gen.d.ts +19 -0
- package/dist/generated/storage/index.d.ts +2 -0
- package/dist/generated/storage/index.js +6 -0
- package/dist/generated/storage/sdk.gen.d.ts +858 -0
- package/dist/generated/storage/types.gen.d.ts +12105 -0
- package/dist/generated/unfurl/client/client.gen.d.ts +2 -0
- package/dist/generated/unfurl/client/index.d.ts +10 -0
- package/dist/generated/unfurl/client/types.gen.d.ts +120 -0
- package/dist/generated/unfurl/client/utils.gen.d.ts +37 -0
- package/dist/generated/unfurl/client.gen.d.ts +12 -0
- package/dist/generated/unfurl/core/auth.gen.d.ts +25 -0
- package/dist/generated/unfurl/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/unfurl/core/params.gen.d.ts +43 -0
- package/dist/generated/unfurl/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/unfurl/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/unfurl/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/unfurl/core/types.gen.d.ts +83 -0
- package/dist/generated/unfurl/core/utils.gen.d.ts +19 -0
- package/dist/generated/unfurl/index.d.ts +2 -0
- package/dist/generated/unfurl/index.js +835 -0
- package/dist/generated/unfurl/sdk.gen.d.ts +47 -0
- package/dist/generated/unfurl/types.gen.d.ts +125 -0
- package/dist/src/config.d.ts +51 -0
- package/dist/src/entities/agent-sessions/agent-session.d.ts +45 -0
- package/dist/src/entities/agent-sessions/namespace.d.ts +18 -0
- package/dist/src/entities/bots/namespace.d.ts +25 -0
- package/dist/src/entities/calls/call-record.d.ts +55 -0
- package/dist/src/entities/calls/namespace.d.ts +9 -0
- package/dist/src/entities/channels/channel.d.ts +88 -0
- package/dist/src/entities/channels/message.d.ts +64 -0
- package/dist/src/entities/channels/namespace.d.ts +30 -0
- package/dist/src/entities/channels/post.d.ts +20 -0
- package/dist/src/entities/channels/thread.d.ts +30 -0
- package/dist/src/entities/chats/chat.d.ts +55 -0
- package/dist/src/entities/chats/namespace.d.ts +14 -0
- package/dist/src/entities/crm/comment.d.ts +43 -0
- package/dist/src/entities/crm/company.d.ts +70 -0
- package/dist/src/entities/crm/contact.d.ts +48 -0
- package/dist/src/entities/crm/namespace.d.ts +22 -0
- package/dist/src/entities/documents/comment.d.ts +41 -0
- package/dist/src/entities/documents/document.d.ts +130 -0
- package/dist/src/entities/documents/namespace.d.ts +43 -0
- package/dist/src/entities/documents/system-skill.d.ts +16 -0
- package/dist/src/entities/email/attachment.d.ts +36 -0
- package/dist/src/entities/email/label.d.ts +31 -0
- package/dist/src/entities/email/link.d.ts +29 -0
- package/dist/src/entities/email/message.d.ts +58 -0
- package/dist/src/entities/email/namespace.d.ts +49 -0
- package/dist/src/entities/email/thread.d.ts +88 -0
- package/dist/src/entities/entity.d.ts +101 -0
- package/dist/src/entities/favorites/namespace.d.ts +19 -0
- package/dist/src/entities/foreign/foreign-entity.d.ts +30 -0
- package/dist/src/entities/foreign/namespace.d.ts +7 -0
- package/dist/src/entities/notifications/namespace.d.ts +29 -0
- package/dist/src/entities/notifications/notification.d.ts +50 -0
- package/dist/src/entities/pins/namespace.d.ts +19 -0
- package/dist/src/entities/projects/namespace.d.ts +13 -0
- package/dist/src/entities/projects/project.d.ts +42 -0
- package/dist/src/entities/properties/namespace.d.ts +47 -0
- package/dist/src/entities/properties/property-definition.d.ts +45 -0
- package/dist/src/entities/properties/property-option.d.ts +32 -0
- package/dist/src/entities/search.d.ts +23 -0
- package/dist/src/entities/tasks/namespace.d.ts +21 -0
- package/dist/src/entities/tasks/task.d.ts +34 -0
- package/dist/src/entities/teams/namespace.d.ts +12 -0
- package/dist/src/entities/teams/team.d.ts +40 -0
- package/dist/src/entities/users/namespace.d.ts +10 -0
- package/dist/src/entities/users/user.d.ts +43 -0
- package/dist/src/entities/webhooks/namespace.d.ts +31 -0
- package/dist/src/entities/webhooks/webhook.d.ts +88 -0
- package/dist/src/events/hydrate/channel.d.ts +85 -0
- package/dist/src/events/hydrate/document.d.ts +54 -0
- package/dist/src/events/receiver.d.ts +51 -0
- package/dist/src/events/types.d.ts +40 -0
- package/dist/src/events/verify.d.ts +13 -0
- package/dist/src/local-portmap.d.ts +8 -0
- package/dist/src/macro.d.ts +62 -0
- package/dist/src/macro.js +4215 -0
- package/dist/src/mentions.d.ts +37 -0
- package/dist/src/raw.d.ts +12 -0
- package/dist/src/utils/client.d.ts +53 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/lazy.d.ts +18 -0
- package/dist/src/utils/pagination.d.ts +7 -0
- package/dist/src/utils/unwrap.d.ts +23 -0
- package/package.json +49 -0
|
@@ -0,0 +1,2194 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: `${string}://${string}` | (string & {});
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Filters for canonical calendar-event entities.
|
|
6
|
+
*/
|
|
7
|
+
export type CalendarEventFilters = {
|
|
8
|
+
/**
|
|
9
|
+
* Attendee email addresses.
|
|
10
|
+
*/
|
|
11
|
+
attendees?: Array<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Canonical event ids.
|
|
14
|
+
*/
|
|
15
|
+
calendar_event_ids?: Array<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Include master events ending after this instant.
|
|
18
|
+
*/
|
|
19
|
+
ends_after?: string | null;
|
|
20
|
+
/**
|
|
21
|
+
* Organizer email addresses.
|
|
22
|
+
*/
|
|
23
|
+
organizers?: Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Include master events starting before this instant.
|
|
26
|
+
*/
|
|
27
|
+
starts_before?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Event statuses such as `confirmed`, `tentative`, or `cancelled`.
|
|
30
|
+
*/
|
|
31
|
+
statuses?: Array<string>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Metadata for a calendar event fetched from the database.
|
|
35
|
+
*
|
|
36
|
+
* The index carries the master span for ranking, but the occurrence a row
|
|
37
|
+
* should display depends on when the query ran, so it is resolved here
|
|
38
|
+
* rather than indexed.
|
|
39
|
+
*/
|
|
40
|
+
export type CalendarEventMetadata = {
|
|
41
|
+
/**
|
|
42
|
+
* Direct conference join URL when known.
|
|
43
|
+
*/
|
|
44
|
+
conferenceUrl?: string | null;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the canonical source prohibits mutation.
|
|
48
|
+
*/
|
|
49
|
+
isReadOnly: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the series carries a recurrence rule. Lets a row render a
|
|
52
|
+
* recurring badge without parsing the rules.
|
|
53
|
+
*/
|
|
54
|
+
isRecurring: boolean;
|
|
55
|
+
occurrence?: null | CalendarEventSearchOccurrence;
|
|
56
|
+
/**
|
|
57
|
+
* Canonical status (`confirmed`, `tentative`, `cancelled`).
|
|
58
|
+
*/
|
|
59
|
+
status: string;
|
|
60
|
+
/**
|
|
61
|
+
* The series' own span.
|
|
62
|
+
*/
|
|
63
|
+
time: CalendarEventSearchTime;
|
|
64
|
+
updatedAt: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The instance a search row points at.
|
|
68
|
+
*
|
|
69
|
+
* A recurring series is indexed once, as its master. Which instance the row
|
|
70
|
+
* should show is decided per request rather than baked into the index: the
|
|
71
|
+
* next occurrence at or after now, else the most recent past one. This is
|
|
72
|
+
* the same resolution a calendar mention performs, so a search row and a
|
|
73
|
+
* mention of the same event agree on where they land.
|
|
74
|
+
*/
|
|
75
|
+
export type CalendarEventSearchOccurrence = {
|
|
76
|
+
/**
|
|
77
|
+
* Stable key of the resolved instance within its series.
|
|
78
|
+
*/
|
|
79
|
+
occurrenceKey: string;
|
|
80
|
+
/**
|
|
81
|
+
* Span of the resolved instance.
|
|
82
|
+
*/
|
|
83
|
+
time: CalendarEventSearchTime;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* A single response item, part of the CalendarEventSearchResponse object
|
|
87
|
+
*/
|
|
88
|
+
export type CalendarEventSearchResponseItem = {
|
|
89
|
+
calendar_event_search_results: Array<CalendarEventSearchResult>;
|
|
90
|
+
created_at: string;
|
|
91
|
+
/**
|
|
92
|
+
* Standardized fields that all item types will share.
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
95
|
+
name: string;
|
|
96
|
+
owner_id: string;
|
|
97
|
+
updated_at: string;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* CalendarEventSearchResponseItem with metadata fetched from macrodb.
|
|
101
|
+
*/
|
|
102
|
+
export type CalendarEventSearchResponseItemWithMetadata = CalendarEventSearchResponseItem & {
|
|
103
|
+
metadata?: null | CalendarEventMetadata;
|
|
104
|
+
/**
|
|
105
|
+
* Entity properties (e.g. tags) on the event.
|
|
106
|
+
*/
|
|
107
|
+
properties?: Array<SoupProperty> | null;
|
|
108
|
+
};
|
|
109
|
+
export type CalendarEventSearchResult = {
|
|
110
|
+
highlight: SearchHighlight;
|
|
111
|
+
/**
|
|
112
|
+
* The score of the result
|
|
113
|
+
*/
|
|
114
|
+
score?: number | null;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Timed or all-day span of a calendar event.
|
|
118
|
+
*
|
|
119
|
+
* Deliberately a local mirror of `models_soup::calendar_event::SoupCalendarEventTime`
|
|
120
|
+
* rather than a reuse of it: this module needs both `ToSchema` (OpenAPI) and
|
|
121
|
+
* `JsonSchema` (AI tool schemas), and `models_soup` carries no schemars
|
|
122
|
+
* dependency. The wire shape is identical and must stay that way, so a
|
|
123
|
+
* client can decode a search row and a soup row with one mapping.
|
|
124
|
+
*
|
|
125
|
+
* Fields are camelCased per variant rather than via `rename_all_fields`,
|
|
126
|
+
* which utoipa ignores.
|
|
127
|
+
*/
|
|
128
|
+
export type CalendarEventSearchTime = {
|
|
129
|
+
/**
|
|
130
|
+
* Exclusive end.
|
|
131
|
+
*/
|
|
132
|
+
endsAt: string;
|
|
133
|
+
kind: 'timed';
|
|
134
|
+
/**
|
|
135
|
+
* Inclusive start.
|
|
136
|
+
*/
|
|
137
|
+
startsAt: string;
|
|
138
|
+
/**
|
|
139
|
+
* Original IANA time zone.
|
|
140
|
+
*/
|
|
141
|
+
timeZone?: string | null;
|
|
142
|
+
} | {
|
|
143
|
+
/**
|
|
144
|
+
* Exclusive end date.
|
|
145
|
+
*/
|
|
146
|
+
endDate: string;
|
|
147
|
+
kind: 'allDay';
|
|
148
|
+
/**
|
|
149
|
+
* Inclusive start date.
|
|
150
|
+
*/
|
|
151
|
+
startDate: string;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Filters for call records.
|
|
155
|
+
*/
|
|
156
|
+
export type CallFilters = {
|
|
157
|
+
/**
|
|
158
|
+
* Legacy filter by whether the requesting user attended the call.
|
|
159
|
+
* Prefer [`CallFilters::status`] for new callers.
|
|
160
|
+
* `None` = no filter, `Some(true)` = only calls the user joined,
|
|
161
|
+
* `Some(false)` = only calls the user did not join.
|
|
162
|
+
*/
|
|
163
|
+
attended?: boolean | null;
|
|
164
|
+
/**
|
|
165
|
+
* Call record IDs to filter by. Empty to include all calls.
|
|
166
|
+
*/
|
|
167
|
+
call_ids?: Array<string>;
|
|
168
|
+
/**
|
|
169
|
+
* Channel IDs to filter calls by. Empty to include all calls.
|
|
170
|
+
*/
|
|
171
|
+
channel_ids?: Array<string>;
|
|
172
|
+
/**
|
|
173
|
+
* Speaker macro user ids. Empty to include all.
|
|
174
|
+
*/
|
|
175
|
+
speaker_ids?: Array<string>;
|
|
176
|
+
status?: null | CallStatus;
|
|
177
|
+
};
|
|
178
|
+
export type CallRecordMetadata = {
|
|
179
|
+
attended: boolean;
|
|
180
|
+
channel_name?: string | null;
|
|
181
|
+
created_by: string;
|
|
182
|
+
duration_ms: number;
|
|
183
|
+
ended_at: string;
|
|
184
|
+
started_at: string;
|
|
185
|
+
status: CallStatus;
|
|
186
|
+
updated_at: string;
|
|
187
|
+
};
|
|
188
|
+
export type CallRecordSearchResponseItem = {
|
|
189
|
+
call_id: string;
|
|
190
|
+
call_search_results: Array<CallRecordSearchResult>;
|
|
191
|
+
channel_id: string;
|
|
192
|
+
id: string;
|
|
193
|
+
name?: string | null;
|
|
194
|
+
owner_id: string;
|
|
195
|
+
participant_ids: Array<string>;
|
|
196
|
+
};
|
|
197
|
+
export type CallRecordSearchResponseItemWithMetadata = CallRecordSearchResponseItem & {
|
|
198
|
+
metadata?: null | CallRecordMetadata;
|
|
199
|
+
/**
|
|
200
|
+
* Entity properties (e.g. tags) on the call.
|
|
201
|
+
*/
|
|
202
|
+
properties?: Array<SoupProperty> | null;
|
|
203
|
+
};
|
|
204
|
+
export type CallRecordSearchResult = {
|
|
205
|
+
ended_at?: string | null;
|
|
206
|
+
highlight: SearchHighlight;
|
|
207
|
+
score?: number | null;
|
|
208
|
+
sequence_num?: number | null;
|
|
209
|
+
speaker_id?: string | null;
|
|
210
|
+
started_at?: string | null;
|
|
211
|
+
transcript_id?: string | null;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Viewer-relative attendance status for a call record.
|
|
215
|
+
* Serializes as `ATTENDED`, `MISSED`, or `UNATTENDED`.
|
|
216
|
+
*/
|
|
217
|
+
export type CallStatus = 'ATTENDED' | 'MISSED' | 'UNATTENDED';
|
|
218
|
+
/**
|
|
219
|
+
* The channel message filters used to filter down what channel messages you search over.
|
|
220
|
+
*/
|
|
221
|
+
export type ChannelFilters = {
|
|
222
|
+
/**
|
|
223
|
+
* Channel IDs to search within. Examples: ['general']. Empty to search all accessible channels.
|
|
224
|
+
*/
|
|
225
|
+
channel_ids?: Array<string>;
|
|
226
|
+
/**
|
|
227
|
+
* Channel types to filter by. Examples: ['public'], ['direct_message', 'private']. Empty to search all channel types.
|
|
228
|
+
*/
|
|
229
|
+
channel_types?: Array<string>;
|
|
230
|
+
/**
|
|
231
|
+
* Filter by channel importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.
|
|
232
|
+
*/
|
|
233
|
+
importance?: boolean | null;
|
|
234
|
+
/**
|
|
235
|
+
* Filter by whether the requesting user is an active participant of the channel.
|
|
236
|
+
* Presence of this filter also widens the candidate set to team channels of the
|
|
237
|
+
* user's teams that they have not joined, so `false` matches those channels.
|
|
238
|
+
* None to ignore (participant channels only, today's default).
|
|
239
|
+
*/
|
|
240
|
+
is_participant?: boolean | null;
|
|
241
|
+
/**
|
|
242
|
+
* Channel user mentions to search for. Examples: ['@username']. Empty if not filtering by mentions.
|
|
243
|
+
*/
|
|
244
|
+
mentions?: Array<string>;
|
|
245
|
+
/**
|
|
246
|
+
* Filter by channel notification state.
|
|
247
|
+
*/
|
|
248
|
+
notification_filters?: NotificationFilters;
|
|
249
|
+
/**
|
|
250
|
+
* Channel organization ID to search within. Empty to ignore organization filtering.
|
|
251
|
+
*/
|
|
252
|
+
org_id?: number | null;
|
|
253
|
+
/**
|
|
254
|
+
* Sender IDs to search within. Examples: ['user1']. Empty to search all accessible senders.
|
|
255
|
+
*/
|
|
256
|
+
sender_ids?: Array<string>;
|
|
257
|
+
/**
|
|
258
|
+
* Channel team ID to search within. Empty to ignore team filtering.
|
|
259
|
+
*/
|
|
260
|
+
team_id?: string | null;
|
|
261
|
+
/**
|
|
262
|
+
* Channel thread IDs to search within. Examples: ['thread123']. Empty to search all threads.
|
|
263
|
+
*/
|
|
264
|
+
thread_ids?: Array<string>;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* A single channel-message content hit in the unified search response.
|
|
268
|
+
* One item per matching message, timestamped by the message itself, so the
|
|
269
|
+
* unified sort interleaves channel messages with other entity types by
|
|
270
|
+
* their own recency.
|
|
271
|
+
*/
|
|
272
|
+
export type ChannelMessageSearchResponseItem = {
|
|
273
|
+
/**
|
|
274
|
+
* The id of the channel the message belongs to
|
|
275
|
+
*/
|
|
276
|
+
channel_id: string;
|
|
277
|
+
/**
|
|
278
|
+
* The type of channel
|
|
279
|
+
*/
|
|
280
|
+
channel_type: string;
|
|
281
|
+
/**
|
|
282
|
+
* When the channel message was created
|
|
283
|
+
*/
|
|
284
|
+
created_at: string;
|
|
285
|
+
/**
|
|
286
|
+
* When the channel message was deleted, if it has been
|
|
287
|
+
*/
|
|
288
|
+
deleted_at?: string | null;
|
|
289
|
+
/**
|
|
290
|
+
* The highlights for the channel message
|
|
291
|
+
*/
|
|
292
|
+
highlight: SearchHighlight;
|
|
293
|
+
/**
|
|
294
|
+
* Standardized id field shared by all item types; the channel id.
|
|
295
|
+
*/
|
|
296
|
+
id: string;
|
|
297
|
+
/**
|
|
298
|
+
* The channel message id
|
|
299
|
+
*/
|
|
300
|
+
message_id: string;
|
|
301
|
+
/**
|
|
302
|
+
* we don't store this for channels atm but keeping it here for consistency
|
|
303
|
+
*/
|
|
304
|
+
owner_id?: string | null;
|
|
305
|
+
/**
|
|
306
|
+
* The score of the result
|
|
307
|
+
*/
|
|
308
|
+
score?: number | null;
|
|
309
|
+
/**
|
|
310
|
+
* The sender id
|
|
311
|
+
*/
|
|
312
|
+
sender_id: string;
|
|
313
|
+
/**
|
|
314
|
+
* The channel message thread id
|
|
315
|
+
*/
|
|
316
|
+
thread_id?: string | null;
|
|
317
|
+
/**
|
|
318
|
+
* When the channel message was last updated
|
|
319
|
+
*/
|
|
320
|
+
updated_at: string;
|
|
321
|
+
};
|
|
322
|
+
/**
|
|
323
|
+
* Metadata for a channel fetched from the database
|
|
324
|
+
*/
|
|
325
|
+
export type ChannelMetadata = {
|
|
326
|
+
created_at: string;
|
|
327
|
+
interacted_at?: string | null;
|
|
328
|
+
updated_at: string;
|
|
329
|
+
viewed_at?: string | null;
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* A channel-name search hit.
|
|
333
|
+
*/
|
|
334
|
+
export type ChannelNameSearchResponseItem = {
|
|
335
|
+
/**
|
|
336
|
+
* The channel id.
|
|
337
|
+
*/
|
|
338
|
+
channel_id: string;
|
|
339
|
+
/**
|
|
340
|
+
* The type of channel.
|
|
341
|
+
*/
|
|
342
|
+
channel_type: string;
|
|
343
|
+
/**
|
|
344
|
+
* The matched channel-name highlight.
|
|
345
|
+
*/
|
|
346
|
+
highlight: SearchHighlight;
|
|
347
|
+
/**
|
|
348
|
+
* Standardized id field shared by all item types; the channel id.
|
|
349
|
+
*/
|
|
350
|
+
id: string;
|
|
351
|
+
metadata?: null | ChannelMetadata;
|
|
352
|
+
/**
|
|
353
|
+
* The channel owner.
|
|
354
|
+
*/
|
|
355
|
+
owner_id?: string | null;
|
|
356
|
+
/**
|
|
357
|
+
* The score of the result.
|
|
358
|
+
*/
|
|
359
|
+
score?: number | null;
|
|
360
|
+
};
|
|
361
|
+
export type ChannelSearchRequest = (null | ChannelFilters) & {
|
|
362
|
+
/**
|
|
363
|
+
* If true, returns only 1 result per entity. False by default.
|
|
364
|
+
*/
|
|
365
|
+
collapse?: boolean | null;
|
|
366
|
+
/**
|
|
367
|
+
* The match type to use when searching
|
|
368
|
+
*/
|
|
369
|
+
match_type: MatchType;
|
|
370
|
+
/**
|
|
371
|
+
* The query to search for
|
|
372
|
+
*/
|
|
373
|
+
query?: string | null;
|
|
374
|
+
/**
|
|
375
|
+
* Fields to search on (Name, Content, NameContent). Defaults to Content
|
|
376
|
+
*/
|
|
377
|
+
search_on?: SearchOn;
|
|
378
|
+
/**
|
|
379
|
+
* Sort key for results. Defaults to `message`.
|
|
380
|
+
*/
|
|
381
|
+
sort?: ChannelSortTimestamp;
|
|
382
|
+
/**
|
|
383
|
+
* Multiple terms to search over
|
|
384
|
+
*/
|
|
385
|
+
terms?: Array<string> | null;
|
|
386
|
+
};
|
|
387
|
+
/**
|
|
388
|
+
* The document search response object
|
|
389
|
+
*/
|
|
390
|
+
export type ChannelSearchResponse = {
|
|
391
|
+
/**
|
|
392
|
+
* Base64-encoded cursor for the next page; `None` when exhausted.
|
|
393
|
+
*/
|
|
394
|
+
next_cursor?: string | null;
|
|
395
|
+
/**
|
|
396
|
+
* List containing results from email threads
|
|
397
|
+
*/
|
|
398
|
+
results: Array<ChannelSearchResponseItemWithMetadata>;
|
|
399
|
+
/**
|
|
400
|
+
* Total number of matching channel messages across all pages.
|
|
401
|
+
*/
|
|
402
|
+
total_count: number;
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* A single response item, part of the ChannelSearchResponse object
|
|
406
|
+
*/
|
|
407
|
+
export type ChannelSearchResponseItem = {
|
|
408
|
+
/**
|
|
409
|
+
* The id of the channel
|
|
410
|
+
*/
|
|
411
|
+
channel_id: string;
|
|
412
|
+
/**
|
|
413
|
+
* The search results for the channel
|
|
414
|
+
* This may be empty if the search result match was not on content
|
|
415
|
+
*/
|
|
416
|
+
channel_message_search_results: Array<ChannelSearchResult>;
|
|
417
|
+
/**
|
|
418
|
+
* The type of channel
|
|
419
|
+
*/
|
|
420
|
+
channel_type: string;
|
|
421
|
+
/**
|
|
422
|
+
* Standardized fields that all item types will share.
|
|
423
|
+
* These field names are being aligned across all item types
|
|
424
|
+
* for consistency in our data model.
|
|
425
|
+
*/
|
|
426
|
+
id: string;
|
|
427
|
+
/**
|
|
428
|
+
* we don't store this for channels atm but keeping it here for consistency
|
|
429
|
+
*/
|
|
430
|
+
owner_id?: string | null;
|
|
431
|
+
};
|
|
432
|
+
/**
|
|
433
|
+
* ChannelSearchResponseItem object with channel metadata we fetch from macrodb. we don't store these
|
|
434
|
+
* timestamps in opensearch as they would require us to update each chat message record for the chat
|
|
435
|
+
* every time the chat updates (specifically for updated_at and viewed_at and interacted_at)
|
|
436
|
+
*/
|
|
437
|
+
export type ChannelSearchResponseItemWithMetadata = ChannelSearchResponseItem & {
|
|
438
|
+
metadata?: null | ChannelMetadata;
|
|
439
|
+
};
|
|
440
|
+
/**
|
|
441
|
+
* A channel message match for a given channel id
|
|
442
|
+
*/
|
|
443
|
+
export type ChannelSearchResult = {
|
|
444
|
+
/**
|
|
445
|
+
* When the channel message was created
|
|
446
|
+
* This is only prsent if the search result is on the message content
|
|
447
|
+
*/
|
|
448
|
+
created_at?: string | null;
|
|
449
|
+
/**
|
|
450
|
+
* When the channel message was deleted, if it has been
|
|
451
|
+
*/
|
|
452
|
+
deleted_at?: string | null;
|
|
453
|
+
/**
|
|
454
|
+
* The highlights for the channel message
|
|
455
|
+
*/
|
|
456
|
+
highlight: SearchHighlight;
|
|
457
|
+
/**
|
|
458
|
+
* The channel message id
|
|
459
|
+
* This is only prsent if the search result is on the message content
|
|
460
|
+
*/
|
|
461
|
+
message_id?: string | null;
|
|
462
|
+
/**
|
|
463
|
+
* The score of the result
|
|
464
|
+
*/
|
|
465
|
+
score?: number | null;
|
|
466
|
+
/**
|
|
467
|
+
* The sender id
|
|
468
|
+
* This is only prsent if the search result is on the message content
|
|
469
|
+
*/
|
|
470
|
+
sender_id?: string | null;
|
|
471
|
+
/**
|
|
472
|
+
* The channel message thread id
|
|
473
|
+
*/
|
|
474
|
+
thread_id?: string | null;
|
|
475
|
+
/**
|
|
476
|
+
* When the channel message was last updated
|
|
477
|
+
* This is only prsent if the search result is on the message content
|
|
478
|
+
*/
|
|
479
|
+
updated_at?: string | null;
|
|
480
|
+
};
|
|
481
|
+
/**
|
|
482
|
+
* Sort key for channel content search results.
|
|
483
|
+
*/
|
|
484
|
+
export type ChannelSortTimestamp = 'message' | 'thread';
|
|
485
|
+
/**
|
|
486
|
+
* The channel thread filters used to filter down channel-thread entities.
|
|
487
|
+
*/
|
|
488
|
+
export type ChannelThreadFilters = {
|
|
489
|
+
/**
|
|
490
|
+
* Channel IDs containing the thread. Empty to include threads from all accessible channels.
|
|
491
|
+
*/
|
|
492
|
+
channel_ids?: Array<string>;
|
|
493
|
+
/**
|
|
494
|
+
* Thread participant user IDs. A participant is the root message sender, anyone
|
|
495
|
+
* who replied in the thread, or anyone @-mentioned in the thread (group mentions
|
|
496
|
+
* like @here count through their per-user expansion at send time). Empty to
|
|
497
|
+
* include threads regardless of participants.
|
|
498
|
+
*/
|
|
499
|
+
participant_ids?: Array<string>;
|
|
500
|
+
/**
|
|
501
|
+
* Sender IDs for the root thread message. Empty to include all root senders.
|
|
502
|
+
*/
|
|
503
|
+
root_sender_ids?: Array<string>;
|
|
504
|
+
/**
|
|
505
|
+
* Channel thread parent message IDs to include. Empty to include all accessible threads.
|
|
506
|
+
*/
|
|
507
|
+
thread_ids?: Array<string>;
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* The chat filters used to filter down what chats you search over.
|
|
511
|
+
*/
|
|
512
|
+
export type ChatFilters = {
|
|
513
|
+
/**
|
|
514
|
+
* Chat ids to search over. Examples: ['chat1'], ['chat1', 'chat2']. When provided, chat search will only match results on these chats. Empty to search all accessible chats.
|
|
515
|
+
*/
|
|
516
|
+
chat_ids?: Array<string>;
|
|
517
|
+
/**
|
|
518
|
+
* Filter by chat importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.
|
|
519
|
+
*/
|
|
520
|
+
importance?: boolean | null;
|
|
521
|
+
/**
|
|
522
|
+
* Filter by chat notification state.
|
|
523
|
+
*/
|
|
524
|
+
notification_filters?: NotificationFilters;
|
|
525
|
+
/**
|
|
526
|
+
* Filter by chat owner. Examples: ['macro|user1@user.com'], ['macro|user1@user.com', 'macro|user2@user.com']. Empty to search all owners.
|
|
527
|
+
*/
|
|
528
|
+
owners?: Array<string>;
|
|
529
|
+
/**
|
|
530
|
+
* A list of project ids to search within. Examples: ['project1']. Empty to ignore project filtering.
|
|
531
|
+
*/
|
|
532
|
+
project_ids?: Array<string>;
|
|
533
|
+
/**
|
|
534
|
+
* Chat message roles to search. Examples: ['user'], ['assistant']. Empty to search all roles.
|
|
535
|
+
*/
|
|
536
|
+
role?: Array<string>;
|
|
537
|
+
};
|
|
538
|
+
/**
|
|
539
|
+
* A chat match for a given message id
|
|
540
|
+
*/
|
|
541
|
+
export type ChatMessageSearchResult = {
|
|
542
|
+
/**
|
|
543
|
+
* The chat message id for the chat
|
|
544
|
+
* This is only present if the search match was on the chat message content
|
|
545
|
+
*/
|
|
546
|
+
chat_message_id?: string | null;
|
|
547
|
+
/**
|
|
548
|
+
* The highlights for the chat message
|
|
549
|
+
*/
|
|
550
|
+
highlight: SearchHighlight;
|
|
551
|
+
/**
|
|
552
|
+
* The role of the chat message
|
|
553
|
+
* This is only present if the search match was on the chat message content
|
|
554
|
+
*/
|
|
555
|
+
role?: string | null;
|
|
556
|
+
/**
|
|
557
|
+
* The score of the result
|
|
558
|
+
*/
|
|
559
|
+
score?: number | null;
|
|
560
|
+
};
|
|
561
|
+
/**
|
|
562
|
+
* Metadata for a chat fetched from the database
|
|
563
|
+
*/
|
|
564
|
+
export type ChatMetadata = {
|
|
565
|
+
created_at: string;
|
|
566
|
+
deleted_at?: string | null;
|
|
567
|
+
project_id?: string | null;
|
|
568
|
+
updated_at: string;
|
|
569
|
+
viewed_at?: string | null;
|
|
570
|
+
};
|
|
571
|
+
export type ChatSearchRequest = (null | ChatFilters) & {
|
|
572
|
+
/**
|
|
573
|
+
* If true, returns only 1 result per entity. False by default.
|
|
574
|
+
*/
|
|
575
|
+
collapse?: boolean | null;
|
|
576
|
+
/**
|
|
577
|
+
* The match type to use when searching
|
|
578
|
+
*/
|
|
579
|
+
match_type: MatchType;
|
|
580
|
+
/**
|
|
581
|
+
* The query to search for
|
|
582
|
+
*/
|
|
583
|
+
query?: string | null;
|
|
584
|
+
/**
|
|
585
|
+
* Fields to search on (Name, Content, NameContent). Defaults to Content
|
|
586
|
+
*/
|
|
587
|
+
search_on?: SearchOn;
|
|
588
|
+
/**
|
|
589
|
+
* Multiple terms to search over
|
|
590
|
+
*/
|
|
591
|
+
terms?: Array<string> | null;
|
|
592
|
+
};
|
|
593
|
+
/**
|
|
594
|
+
* The chat search response object
|
|
595
|
+
*/
|
|
596
|
+
export type ChatSearchResponse = {
|
|
597
|
+
/**
|
|
598
|
+
* List containing results from chats
|
|
599
|
+
*/
|
|
600
|
+
results: Array<ChatSearchResponseItemWithMetadata>;
|
|
601
|
+
};
|
|
602
|
+
/**
|
|
603
|
+
* A single response item, part of the ChatSearchResponse object
|
|
604
|
+
*/
|
|
605
|
+
export type ChatSearchResponseItem = {
|
|
606
|
+
/**
|
|
607
|
+
* The id of the chat
|
|
608
|
+
*/
|
|
609
|
+
chat_id: string;
|
|
610
|
+
/**
|
|
611
|
+
* The search results for the chat
|
|
612
|
+
* This may be empty if the search result match was on the chat title only
|
|
613
|
+
*/
|
|
614
|
+
chat_search_results: Array<ChatMessageSearchResult>;
|
|
615
|
+
/**
|
|
616
|
+
* Standardized fields that all item types will share.
|
|
617
|
+
* These field names are being aligned across all item types
|
|
618
|
+
* for consistency in our data model.
|
|
619
|
+
*/
|
|
620
|
+
id: string;
|
|
621
|
+
name: string;
|
|
622
|
+
owner_id: string;
|
|
623
|
+
/**
|
|
624
|
+
* The id of the creator of the chat
|
|
625
|
+
*/
|
|
626
|
+
user_id: string;
|
|
627
|
+
};
|
|
628
|
+
/**
|
|
629
|
+
* ChatSearchResponse object with channel metadata we fetch from macrodb. we don't store these
|
|
630
|
+
* timestamps in opensearch as they would require us to update each chat message record for the chat
|
|
631
|
+
* every time the chat updates (specifically for updated_at and viewed_at)
|
|
632
|
+
*/
|
|
633
|
+
export type ChatSearchResponseItemWithMetadata = ChatSearchResponseItem & {
|
|
634
|
+
metadata?: null | ChatMetadata;
|
|
635
|
+
/**
|
|
636
|
+
* Entity properties (e.g. tags) on the chat.
|
|
637
|
+
*/
|
|
638
|
+
properties?: Array<SoupProperty> | null;
|
|
639
|
+
};
|
|
640
|
+
/**
|
|
641
|
+
* The crm company filters used to narrow which CRM companies appear in soup.
|
|
642
|
+
*/
|
|
643
|
+
export type CrmCompanyFilters = {
|
|
644
|
+
/**
|
|
645
|
+
* CRM company ids to filter by. Examples: ['11111111-...']. Empty to
|
|
646
|
+
* include all of the team's visible CRM companies.
|
|
647
|
+
*/
|
|
648
|
+
company_ids?: Array<string>;
|
|
649
|
+
/**
|
|
650
|
+
* Optional `crm_companies.hidden` filter. `None` = visible only
|
|
651
|
+
* (default for back-compat with non-admin callers). `Some(false)` =
|
|
652
|
+
* visible only (explicit). `Some(true)` = hidden only — requires
|
|
653
|
+
* admin/owner team role; enforced by the CRM service from the
|
|
654
|
+
* caller's team receipt.
|
|
655
|
+
*/
|
|
656
|
+
hidden?: boolean | null;
|
|
657
|
+
};
|
|
658
|
+
/**
|
|
659
|
+
* A CRM domain attached to a company in search results.
|
|
660
|
+
*/
|
|
661
|
+
export type CrmCompanySearchDomain = {
|
|
662
|
+
/**
|
|
663
|
+
* The id of the company the domain belongs to.
|
|
664
|
+
*/
|
|
665
|
+
companyId: string;
|
|
666
|
+
/**
|
|
667
|
+
* When the domain record was created.
|
|
668
|
+
*/
|
|
669
|
+
createdAt: string;
|
|
670
|
+
/**
|
|
671
|
+
* The domain (lowercased, e.g. "acme.com").
|
|
672
|
+
*/
|
|
673
|
+
domain: string;
|
|
674
|
+
/**
|
|
675
|
+
* The id of the domain record.
|
|
676
|
+
*/
|
|
677
|
+
id: string;
|
|
678
|
+
};
|
|
679
|
+
/**
|
|
680
|
+
* A CRM company match in unified search results. Carries the display
|
|
681
|
+
* metadata resolved from the primary domain plus the highlighted name.
|
|
682
|
+
*/
|
|
683
|
+
export type CrmCompanySearchResponseItem = {
|
|
684
|
+
/**
|
|
685
|
+
* When the company was created.
|
|
686
|
+
*/
|
|
687
|
+
createdAt: string;
|
|
688
|
+
/**
|
|
689
|
+
* Display description from the primary domain's directory entry.
|
|
690
|
+
*/
|
|
691
|
+
description?: string | null;
|
|
692
|
+
/**
|
|
693
|
+
* Domains associated with this company, primary first.
|
|
694
|
+
*/
|
|
695
|
+
domains: Array<CrmCompanySearchDomain>;
|
|
696
|
+
/**
|
|
697
|
+
* Whether the company is hidden from CRM listings.
|
|
698
|
+
*/
|
|
699
|
+
hidden: boolean;
|
|
700
|
+
/**
|
|
701
|
+
* The id of the company.
|
|
702
|
+
*/
|
|
703
|
+
id: string;
|
|
704
|
+
/**
|
|
705
|
+
* Display name from the primary domain's directory entry.
|
|
706
|
+
*/
|
|
707
|
+
name?: string | null;
|
|
708
|
+
/**
|
|
709
|
+
* `name` with matched spans wrapped in `<macro_em>…</macro_em>`.
|
|
710
|
+
*/
|
|
711
|
+
nameHighlighted?: string | null;
|
|
712
|
+
/**
|
|
713
|
+
* The id of the team that owns this company record.
|
|
714
|
+
*/
|
|
715
|
+
teamId: string;
|
|
716
|
+
/**
|
|
717
|
+
* When the company was last updated (the sort key).
|
|
718
|
+
*/
|
|
719
|
+
updatedAt: string;
|
|
720
|
+
};
|
|
721
|
+
/**
|
|
722
|
+
* Data type for property values, determining storage and validation.
|
|
723
|
+
*/
|
|
724
|
+
export type DataType = 'BOOLEAN' | 'DATE' | 'NUMBER' | 'STRING' | 'SELECT_NUMBER' | 'SELECT_STRING' | 'TAG' | 'ENTITY' | 'LINK';
|
|
725
|
+
/**
|
|
726
|
+
* The document filters used to filter down what documents you search over.
|
|
727
|
+
*/
|
|
728
|
+
export type DocumentFilters = {
|
|
729
|
+
/**
|
|
730
|
+
* Document ids to search over. Examples: ['doc1'], ['doc1', 'doc2']. Empty to search all accessible documents.
|
|
731
|
+
*/
|
|
732
|
+
document_ids?: Array<string>;
|
|
733
|
+
/**
|
|
734
|
+
* Document file types to search. Examples: ['pdf'], ['md', 'txt']. Empty to search all file types.
|
|
735
|
+
*/
|
|
736
|
+
file_types?: Array<string>;
|
|
737
|
+
/**
|
|
738
|
+
* Filter by document importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.
|
|
739
|
+
*/
|
|
740
|
+
importance?: boolean | null;
|
|
741
|
+
/**
|
|
742
|
+
* Filter by email attachment status. true = only email attachments, false = only non-email attachments, None = both.
|
|
743
|
+
*/
|
|
744
|
+
is_email_attachment?: boolean | null;
|
|
745
|
+
/**
|
|
746
|
+
* Filter by document notification state.
|
|
747
|
+
*/
|
|
748
|
+
notification_filters?: NotificationFilters;
|
|
749
|
+
/**
|
|
750
|
+
* Filter by document owner. Examples: ['macro|user1@user.com'], ['macro|user1@user.com', 'macro|user2@user.com']. Empty to search all owners.
|
|
751
|
+
*/
|
|
752
|
+
owners?: Array<string>;
|
|
753
|
+
/**
|
|
754
|
+
* A list of project ids to search within. Examples: ['project1'].
|
|
755
|
+
* filtering. Empty to ignore project filtering.
|
|
756
|
+
*/
|
|
757
|
+
project_ids?: Array<string>;
|
|
758
|
+
/**
|
|
759
|
+
* Filter by document sub type. Examples: ['task']. Empty to search all sub types.
|
|
760
|
+
*/
|
|
761
|
+
sub_types?: Array<string>;
|
|
762
|
+
/**
|
|
763
|
+
* Task-specific filters that only apply to task subtype documents.
|
|
764
|
+
*/
|
|
765
|
+
task_filters?: TaskFilters;
|
|
766
|
+
};
|
|
767
|
+
/**
|
|
768
|
+
* Metadata for a document fetched from the database
|
|
769
|
+
*/
|
|
770
|
+
export type DocumentMetadata = {
|
|
771
|
+
created_at: string;
|
|
772
|
+
deleted_at?: string | null;
|
|
773
|
+
project_id?: string | null;
|
|
774
|
+
updated_at: string;
|
|
775
|
+
viewed_at?: string | null;
|
|
776
|
+
};
|
|
777
|
+
export type DocumentSearchRequest = (null | DocumentFilters) & {
|
|
778
|
+
/**
|
|
779
|
+
* If true, returns only 1 result per entity. False by default.
|
|
780
|
+
*/
|
|
781
|
+
collapse?: boolean | null;
|
|
782
|
+
/**
|
|
783
|
+
* The match type to use when searching
|
|
784
|
+
*/
|
|
785
|
+
match_type: MatchType;
|
|
786
|
+
/**
|
|
787
|
+
* The query to search for
|
|
788
|
+
*/
|
|
789
|
+
query?: string | null;
|
|
790
|
+
/**
|
|
791
|
+
* Fields to search on (Name, Content, NameContent). Defaults to Content
|
|
792
|
+
*/
|
|
793
|
+
search_on?: SearchOn;
|
|
794
|
+
/**
|
|
795
|
+
* Multiple terms to search over
|
|
796
|
+
*/
|
|
797
|
+
terms?: Array<string> | null;
|
|
798
|
+
};
|
|
799
|
+
/**
|
|
800
|
+
* The document search response object
|
|
801
|
+
*/
|
|
802
|
+
export type DocumentSearchResponse = {
|
|
803
|
+
/**
|
|
804
|
+
* List containing results from documents
|
|
805
|
+
*/
|
|
806
|
+
results: Array<DocumentSearchResponseItemWithMetadata>;
|
|
807
|
+
};
|
|
808
|
+
/**
|
|
809
|
+
* A single response item, part of the DocumentSearchResponse object
|
|
810
|
+
*/
|
|
811
|
+
export type DocumentSearchResponseItem = {
|
|
812
|
+
/**
|
|
813
|
+
* The id of the document
|
|
814
|
+
*/
|
|
815
|
+
document_id: string;
|
|
816
|
+
/**
|
|
817
|
+
* The name of the document
|
|
818
|
+
*/
|
|
819
|
+
document_name: string;
|
|
820
|
+
/**
|
|
821
|
+
* The search results for the document
|
|
822
|
+
* This may be empty if the search result match was on the document name only
|
|
823
|
+
*/
|
|
824
|
+
document_search_results: Array<DocumentSearchResult>;
|
|
825
|
+
/**
|
|
826
|
+
* The file type of the document
|
|
827
|
+
*/
|
|
828
|
+
file_type?: string | null;
|
|
829
|
+
/**
|
|
830
|
+
* Standardized fields that all item types will share.
|
|
831
|
+
* These field names are being aligned across all item types
|
|
832
|
+
* for consistency in our data model.
|
|
833
|
+
*/
|
|
834
|
+
id: string;
|
|
835
|
+
name: string;
|
|
836
|
+
owner_id: string;
|
|
837
|
+
sub_type?: null | DocumentSubType;
|
|
838
|
+
};
|
|
839
|
+
/**
|
|
840
|
+
* DocumentSearchResponseItem object with document metadata we fetch from macrodb. we don't store these
|
|
841
|
+
* timestamps in opensearch as they would require us to update document page record
|
|
842
|
+
* every time the document updates (specifically for updated_at and viewed_at)
|
|
843
|
+
*/
|
|
844
|
+
export type DocumentSearchResponseItemWithMetadata = DocumentSearchResponseItem & {
|
|
845
|
+
metadata?: null | DocumentMetadata;
|
|
846
|
+
/**
|
|
847
|
+
* Entity properties (assignees, status, priority, etc.) for markdown documents.
|
|
848
|
+
*/
|
|
849
|
+
properties?: Array<SoupProperty> | null;
|
|
850
|
+
};
|
|
851
|
+
/**
|
|
852
|
+
* A document match for a given node
|
|
853
|
+
*/
|
|
854
|
+
export type DocumentSearchResult = {
|
|
855
|
+
/**
|
|
856
|
+
* The highlights for the document
|
|
857
|
+
*/
|
|
858
|
+
highlight: SearchHighlight;
|
|
859
|
+
/**
|
|
860
|
+
* The node id for the document.
|
|
861
|
+
* This is only useful for markdown at the moment
|
|
862
|
+
* This will only be provided if the match was on content
|
|
863
|
+
*/
|
|
864
|
+
node_id?: string | null;
|
|
865
|
+
/**
|
|
866
|
+
* The raw content of the document.
|
|
867
|
+
* This is only included for markdown files and will be the raw json node of the match
|
|
868
|
+
*/
|
|
869
|
+
raw_content?: string | null;
|
|
870
|
+
/**
|
|
871
|
+
* The score of the result
|
|
872
|
+
*/
|
|
873
|
+
score?: number | null;
|
|
874
|
+
};
|
|
875
|
+
/**
|
|
876
|
+
* The document sub type enum represents all values of document sub types.
|
|
877
|
+
* These values should match the `document_sub_type_value` table in macrodb.
|
|
878
|
+
*/
|
|
879
|
+
export type DocumentSubType = 'task' | 'snippet' | 'skill';
|
|
880
|
+
/**
|
|
881
|
+
* The email filters used to filter down what emails you search over.
|
|
882
|
+
*/
|
|
883
|
+
export type EmailFilters = {
|
|
884
|
+
/**
|
|
885
|
+
* Email BCC addresses to filter by. Examples: ['user@example.com']. Empty if not filtering by BCC.
|
|
886
|
+
*/
|
|
887
|
+
bcc?: Array<string>;
|
|
888
|
+
/**
|
|
889
|
+
* When `Some(true)`, only include threads that have at least one message
|
|
890
|
+
* with an iCalendar attachment (`.ics` filename or `application/ics` mime
|
|
891
|
+
* type). `Some(false)` and `None` apply no constraint.
|
|
892
|
+
*/
|
|
893
|
+
calendar_only?: boolean | null;
|
|
894
|
+
/**
|
|
895
|
+
* Email CC addresses to filter by. Examples: ['user@example.com']. Empty if not filtering by CC.
|
|
896
|
+
*/
|
|
897
|
+
cc?: Array<string>;
|
|
898
|
+
/**
|
|
899
|
+
* CRM-scoped address filter. When non-empty, expands visibility to every
|
|
900
|
+
* teammate's mailbox and restricts to threads involving any of these
|
|
901
|
+
* fully-qualified addresses. Each address is authorized against
|
|
902
|
+
* `crm_contacts` + `crm_companies` (contact must not be hidden, company
|
|
903
|
+
* must not be hidden, `email_sync` must be true).
|
|
904
|
+
* Mutually exclusive with `crm_domains`.
|
|
905
|
+
*/
|
|
906
|
+
crm_addresses?: Array<string>;
|
|
907
|
+
/**
|
|
908
|
+
* CRM-scoped domain filter. When non-empty, expands visibility to every
|
|
909
|
+
* teammate's mailbox and restricts to threads involving any of these
|
|
910
|
+
* domains (in any of sender/cc/bcc/recipient). Each domain is authorized
|
|
911
|
+
* against `crm_domains` + `crm_companies` (must exist for the caller's
|
|
912
|
+
* team, company must not be hidden, `email_sync` must be true).
|
|
913
|
+
* Mutually exclusive with `crm_addresses`.
|
|
914
|
+
*/
|
|
915
|
+
crm_domains?: Array<string>;
|
|
916
|
+
/**
|
|
917
|
+
* Email thread IDs to filter by. Examples: ['thread-uuid-1']. Empty to search all threads.
|
|
918
|
+
*/
|
|
919
|
+
email_thread_ids?: Array<string>;
|
|
920
|
+
/**
|
|
921
|
+
* Exclude emails that have any of these labels. Supports both Gmail system labels (e.g. "CATEGORY_PROMOTIONS") and user-created labels. Empty to not exclude any labels.
|
|
922
|
+
* Note: SPAM and TRASH emails are not indexed in OpenSearch, so they are already excluded by default.
|
|
923
|
+
*/
|
|
924
|
+
exclude_labels?: Array<string>;
|
|
925
|
+
/**
|
|
926
|
+
* Filter by email importance. None to not filter. True to show only important emails
|
|
927
|
+
* (drafts, personal, sent, or uncategorized). False to show only unimportant emails
|
|
928
|
+
* (those categorized as promotions, social, updates, or forums).
|
|
929
|
+
*/
|
|
930
|
+
importance?: boolean | null;
|
|
931
|
+
/**
|
|
932
|
+
* Only include emails that have at least one of these labels. Supports both Gmail system labels (e.g. "INBOX", "CATEGORY_PROMOTIONS") and user-created labels (e.g. "github"). Empty to not filter by included labels.
|
|
933
|
+
* Note: SPAM and TRASH emails are not indexed in OpenSearch, so they will never appear in results regardless of this filter.
|
|
934
|
+
*/
|
|
935
|
+
include_labels?: Array<string>;
|
|
936
|
+
/**
|
|
937
|
+
* Restrict to specific inboxes by email_links.id. Empty means "any inbox the
|
|
938
|
+
* caller can access" (soup expands to the full set at the router edge).
|
|
939
|
+
*/
|
|
940
|
+
link_ids?: Array<string>;
|
|
941
|
+
/**
|
|
942
|
+
* Filter by email notification state.
|
|
943
|
+
*/
|
|
944
|
+
notification_filters?: NotificationFilters;
|
|
945
|
+
/**
|
|
946
|
+
* A list of project ids to search within. Empty to ignore project filtering.
|
|
947
|
+
*/
|
|
948
|
+
project_ids?: Array<string>;
|
|
949
|
+
/**
|
|
950
|
+
* Email Recipient addresses to filter by. Examples: ['user@example.com']. Empty if not filtering by Recipient.
|
|
951
|
+
*/
|
|
952
|
+
recipients?: Array<string>;
|
|
953
|
+
/**
|
|
954
|
+
* Email sender addresses to filter by. Examples: ['user@example.com']. Empty to search all senders.
|
|
955
|
+
*/
|
|
956
|
+
senders?: Array<string>;
|
|
957
|
+
/**
|
|
958
|
+
* Controls whether shared email threads are included in results.
|
|
959
|
+
* Defaults to "exclude" (only the user's own threads).
|
|
960
|
+
*/
|
|
961
|
+
shared?: SharedEmailFilter;
|
|
962
|
+
};
|
|
963
|
+
/**
|
|
964
|
+
* A participant (sender) in an email thread
|
|
965
|
+
*/
|
|
966
|
+
export type EmailSearchParticipant = {
|
|
967
|
+
email: string;
|
|
968
|
+
name?: string | null;
|
|
969
|
+
};
|
|
970
|
+
export type EmailSearchRequest = (null | EmailFilters) & {
|
|
971
|
+
/**
|
|
972
|
+
* If true, returns only 1 result per entity. False by default.
|
|
973
|
+
*/
|
|
974
|
+
collapse?: boolean | null;
|
|
975
|
+
/**
|
|
976
|
+
* The match type to use when searching
|
|
977
|
+
*/
|
|
978
|
+
match_type: MatchType;
|
|
979
|
+
/**
|
|
980
|
+
* The query to search for
|
|
981
|
+
*/
|
|
982
|
+
query?: string | null;
|
|
983
|
+
/**
|
|
984
|
+
* Fields to search on (Name, Content, NameContent). Defaults to Content
|
|
985
|
+
*/
|
|
986
|
+
search_on?: SearchOn;
|
|
987
|
+
/**
|
|
988
|
+
* Multiple terms to search over
|
|
989
|
+
*/
|
|
990
|
+
terms?: Array<string> | null;
|
|
991
|
+
};
|
|
992
|
+
/**
|
|
993
|
+
* The document search response object
|
|
994
|
+
*/
|
|
995
|
+
export type EmailSearchResponse = {
|
|
996
|
+
/**
|
|
997
|
+
* List containing results from email threads
|
|
998
|
+
*/
|
|
999
|
+
results: Array<EmailSearchResponseItemWithMetadata>;
|
|
1000
|
+
};
|
|
1001
|
+
/**
|
|
1002
|
+
* A single response item, part of the EmailSearchResponse object
|
|
1003
|
+
*/
|
|
1004
|
+
export type EmailSearchResponseItem = {
|
|
1005
|
+
/**
|
|
1006
|
+
* The search results for the document
|
|
1007
|
+
* This may be empty if the search result match was on the email subject only
|
|
1008
|
+
*/
|
|
1009
|
+
email_message_search_results: Array<EmailSearchResult>;
|
|
1010
|
+
/**
|
|
1011
|
+
* Standardized fields that all item types will share.
|
|
1012
|
+
* These field names are being aligned across all item types
|
|
1013
|
+
* for consistency in our data model.
|
|
1014
|
+
*/
|
|
1015
|
+
id: string;
|
|
1016
|
+
/**
|
|
1017
|
+
* The inbox that owns the thread. Drives the multi-inbox indicator
|
|
1018
|
+
* when the caller has more than one inbox.
|
|
1019
|
+
*/
|
|
1020
|
+
link_id: string;
|
|
1021
|
+
/**
|
|
1022
|
+
* Subject of the email thread
|
|
1023
|
+
*/
|
|
1024
|
+
name?: string | null;
|
|
1025
|
+
owner_id: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* The participants (senders) in this email thread
|
|
1028
|
+
*/
|
|
1029
|
+
participants: Array<EmailSearchParticipant>;
|
|
1030
|
+
/**
|
|
1031
|
+
* The subject of the email
|
|
1032
|
+
* This is only present if the search result is on the message content
|
|
1033
|
+
*/
|
|
1034
|
+
subject?: string | null;
|
|
1035
|
+
/**
|
|
1036
|
+
* The id of the email thread
|
|
1037
|
+
*/
|
|
1038
|
+
thread_id: string;
|
|
1039
|
+
/**
|
|
1040
|
+
* The id of the owner of the email thread
|
|
1041
|
+
*/
|
|
1042
|
+
user_id: string;
|
|
1043
|
+
};
|
|
1044
|
+
/**
|
|
1045
|
+
* EmailSearchResponseItem object with email metadata we fetch from email service. we don't store these
|
|
1046
|
+
* timestamps in opensearch as they would require us to update each email message record for the thread
|
|
1047
|
+
* every time the thread updates (specifically for updated_at and viewed_at)
|
|
1048
|
+
*/
|
|
1049
|
+
export type EmailSearchResponseItemWithMetadata = EmailSearchResponseItem & {
|
|
1050
|
+
created_at: string;
|
|
1051
|
+
inbox_visible: boolean;
|
|
1052
|
+
is_draft: boolean;
|
|
1053
|
+
is_important: boolean;
|
|
1054
|
+
is_read: boolean;
|
|
1055
|
+
/**
|
|
1056
|
+
* Entity properties (e.g. tags) on the thread.
|
|
1057
|
+
*/
|
|
1058
|
+
properties?: Array<SoupProperty> | null;
|
|
1059
|
+
snippet?: string | null;
|
|
1060
|
+
updated_at: string;
|
|
1061
|
+
viewed_at?: string | null;
|
|
1062
|
+
};
|
|
1063
|
+
/**
|
|
1064
|
+
* A email message match for a given thread id
|
|
1065
|
+
*/
|
|
1066
|
+
export type EmailSearchResult = {
|
|
1067
|
+
/**
|
|
1068
|
+
* This is only present if the search result is on the message content
|
|
1069
|
+
*/
|
|
1070
|
+
bcc: Array<string>;
|
|
1071
|
+
/**
|
|
1072
|
+
* This is only present if the search result is on the message content
|
|
1073
|
+
*/
|
|
1074
|
+
cc: Array<string>;
|
|
1075
|
+
/**
|
|
1076
|
+
* The highlights for the email message
|
|
1077
|
+
*/
|
|
1078
|
+
highlight: SearchHighlight;
|
|
1079
|
+
/**
|
|
1080
|
+
* This is only present if the search result is on the message content
|
|
1081
|
+
*/
|
|
1082
|
+
labels: Array<string>;
|
|
1083
|
+
/**
|
|
1084
|
+
* The email message id.
|
|
1085
|
+
* This is only present if the search result is on the message content
|
|
1086
|
+
*/
|
|
1087
|
+
message_id?: string | null;
|
|
1088
|
+
/**
|
|
1089
|
+
* The pretty sender.
|
|
1090
|
+
* If the match is on the subject, the pretty sender is the latest sender on the thread.
|
|
1091
|
+
* This could be the sender's email if there is no contact name for the sender.
|
|
1092
|
+
*/
|
|
1093
|
+
pretty_sender: string;
|
|
1094
|
+
/**
|
|
1095
|
+
* This is only present if the search result is on the message content
|
|
1096
|
+
*/
|
|
1097
|
+
recipients: Array<string>;
|
|
1098
|
+
/**
|
|
1099
|
+
* The score of the result
|
|
1100
|
+
*/
|
|
1101
|
+
score?: number | null;
|
|
1102
|
+
/**
|
|
1103
|
+
* The sender.
|
|
1104
|
+
* If the match is on the subject, the sender is the latest sender on the thread.
|
|
1105
|
+
*/
|
|
1106
|
+
sender: string;
|
|
1107
|
+
/**
|
|
1108
|
+
* When the email message was sent
|
|
1109
|
+
* This is only present if the search result is on the message content
|
|
1110
|
+
*/
|
|
1111
|
+
sent_at?: string | null;
|
|
1112
|
+
};
|
|
1113
|
+
/**
|
|
1114
|
+
* Empty response is required due to custom fetch forcing `response.json()`
|
|
1115
|
+
*/
|
|
1116
|
+
export type EmptyResponse = {
|
|
1117
|
+
[key: string]: unknown;
|
|
1118
|
+
};
|
|
1119
|
+
/**
|
|
1120
|
+
* a bundle of all of the filters for each entity type
|
|
1121
|
+
*/
|
|
1122
|
+
export type EntityFilters = {
|
|
1123
|
+
/**
|
|
1124
|
+
* the bundled [CalendarEventFilters]
|
|
1125
|
+
*/
|
|
1126
|
+
calendar_event_filters?: CalendarEventFilters;
|
|
1127
|
+
/**
|
|
1128
|
+
* the bundled [CallFilters]
|
|
1129
|
+
*/
|
|
1130
|
+
call_filters?: CallFilters;
|
|
1131
|
+
/**
|
|
1132
|
+
* the bundled [ChannelFilters]
|
|
1133
|
+
*/
|
|
1134
|
+
channel_filters?: ChannelFilters;
|
|
1135
|
+
/**
|
|
1136
|
+
* the bundled [ChannelThreadFilters]
|
|
1137
|
+
*/
|
|
1138
|
+
channel_thread_filters?: ChannelThreadFilters;
|
|
1139
|
+
/**
|
|
1140
|
+
* the bundled [ChatFilters]
|
|
1141
|
+
*/
|
|
1142
|
+
chat_filters?: ChatFilters;
|
|
1143
|
+
/**
|
|
1144
|
+
* the bundled [CrmCompanyFilters]
|
|
1145
|
+
*/
|
|
1146
|
+
crm_company_filters?: CrmCompanyFilters;
|
|
1147
|
+
/**
|
|
1148
|
+
* the bundled [DocumentFilters]
|
|
1149
|
+
*/
|
|
1150
|
+
document_filters?: DocumentFilters;
|
|
1151
|
+
/**
|
|
1152
|
+
* the bundled [EmailFilters]
|
|
1153
|
+
*/
|
|
1154
|
+
email_filters?: EmailFilters;
|
|
1155
|
+
/**
|
|
1156
|
+
* the bundled [ForeignEntityFilters]
|
|
1157
|
+
*/
|
|
1158
|
+
foreign_entity_filters?: ForeignEntityFilters;
|
|
1159
|
+
/**
|
|
1160
|
+
* the bundled [ProjectFilters]
|
|
1161
|
+
*/
|
|
1162
|
+
project_filters?: ProjectFilters;
|
|
1163
|
+
/**
|
|
1164
|
+
* property-based filters applied across entity types
|
|
1165
|
+
*/
|
|
1166
|
+
property_filters?: Array<PropertyFilter>;
|
|
1167
|
+
/**
|
|
1168
|
+
* the bundled [ReminderFilters]
|
|
1169
|
+
*/
|
|
1170
|
+
reminder_filters?: ReminderFilters;
|
|
1171
|
+
/**
|
|
1172
|
+
* How the `tag_option_ids` combine: `any` (default) matches entities
|
|
1173
|
+
* holding at least one selected tag, `all` requires every selected tag.
|
|
1174
|
+
*/
|
|
1175
|
+
tag_filter_mode?: TagFilterMode;
|
|
1176
|
+
/**
|
|
1177
|
+
* tag option ids matched against `properties.values`, OR'd together across
|
|
1178
|
+
* all tag definitions. Option ids are globally unique, so the match ignores
|
|
1179
|
+
* the owning definition id (personal and team tags combine into one OR).
|
|
1180
|
+
*/
|
|
1181
|
+
tag_option_ids?: Array<string>;
|
|
1182
|
+
};
|
|
1183
|
+
/**
|
|
1184
|
+
* Entity reference for entity-type property values.
|
|
1185
|
+
*/
|
|
1186
|
+
export type EntityReference = {
|
|
1187
|
+
entity_id: string;
|
|
1188
|
+
entity_type: EntityType;
|
|
1189
|
+
/**
|
|
1190
|
+
* For CHANNEL, CHAT, THREAD entity types - optional specific message ID.
|
|
1191
|
+
* This allows referencing a specific message within a thread/channel/chat.
|
|
1192
|
+
*/
|
|
1193
|
+
specific_message_id?: string | null;
|
|
1194
|
+
};
|
|
1195
|
+
/**
|
|
1196
|
+
* Type of entity that can be referenced by entity properties.
|
|
1197
|
+
*/
|
|
1198
|
+
export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';
|
|
1199
|
+
/**
|
|
1200
|
+
* A plain old json error response for use with axum.
|
|
1201
|
+
* yup, thats it.
|
|
1202
|
+
*/
|
|
1203
|
+
export type ErrorResponse = {
|
|
1204
|
+
/**
|
|
1205
|
+
* Message to explain failure
|
|
1206
|
+
*/
|
|
1207
|
+
message: string;
|
|
1208
|
+
};
|
|
1209
|
+
/**
|
|
1210
|
+
* Generates a FileType enum and associated ContentType enum with their implementations.
|
|
1211
|
+
*
|
|
1212
|
+
* This macro takes a list of tuples in the format:
|
|
1213
|
+
* (Variant, "extension", "mime_type", CONTENT_TYPE_VARIANT)
|
|
1214
|
+
*
|
|
1215
|
+
* For each tuple it generates:
|
|
1216
|
+
* - A variant in the FileType enum
|
|
1217
|
+
* - A variant in the ContentType enum
|
|
1218
|
+
* - Implementations for:
|
|
1219
|
+
* - FileType::to_str() - Converts FileType to extension string
|
|
1220
|
+
* - FileType::from_str() - Converts extension string to FileType
|
|
1221
|
+
* - From<FileType> for ContentType - Maps FileType to ContentType
|
|
1222
|
+
* - ContentType::mime_type() - Gets MIME type for ContentType
|
|
1223
|
+
*
|
|
1224
|
+
*/
|
|
1225
|
+
export type FileType = 'docx' | 'pdf' | 'md' | 'canvas' | 'coffee' | 'cson' | 'iced' | 'c' | 'i' | 'cpp' | 'cppm' | 'cc' | 'ccm' | 'cxx' | 'cxxm' | 'cplusplus' | 'cplusplusm' | 'hpp' | 'hh' | 'hxx' | 'hplusplus' | 'h' | 'ii' | 'ino' | 'inl' | 'ipp' | 'ixx' | 'tpp' | 'txx' | 'hppin' | 'hin' | 'cu' | 'cuh' | 'cs' | 'csx' | 'cake' | 'css' | 'dart' | 'diff' | 'patch' | 'rej' | 'dockerfile' | 'containerfile' | 'go' | 'handlebars' | 'hbs' | 'hjs' | 'hlsl' | 'hlsli' | 'fx' | 'fxh' | 'vsh' | 'psh' | 'cginc' | 'compute' | 'html' | 'htm' | 'shtml' | 'xhtml' | 'xht' | 'mdoc' | 'jsp' | 'asp' | 'aspx' | 'jshtm' | 'volt' | 'ejs' | 'rhtml' | 'ini' | 'conf' | 'properties' | 'cfg' | 'directory' | 'gitattributes' | 'gitconfig' | 'gitmodules' | 'editorconfig' | 'repo' | 'java' | 'jav' | 'jsx' | 'js' | 'es6' | 'mjs' | 'cjs' | 'pac' | 'json' | 'bowerrc' | 'jscsrc' | 'webmanifest' | 'jsmap' | 'cssmap' | 'tsmap' | 'har' | 'jslintrc' | 'jsonld' | 'geojson' | 'ipynb' | 'vuerc' | 'jsonc' | 'eslintrc' | 'eslintrcjson' | 'jsfmtrc' | 'jshintrc' | 'swcrc' | 'hintrc' | 'babelrc' | 'jsonl' | 'ndjson' | 'codesnippets' | 'jl' | 'jmd' | 'sty' | 'cls' | 'bbx' | 'cbx' | 'tex' | 'ltx' | 'ctx' | 'bib' | 'less' | 'log' | 'lua' | 'mak' | 'mk' | 'mkd' | 'mdwn' | 'mdown' | 'markdown' | 'markdn' | 'mdtxt' | 'mdtext' | 'workbook' | 'm' | 'mm' | 'pl' | 'pm' | 'pod' | 't' | 'psgi' | 'raku' | 'rakumod' | 'rakutest' | 'rakudoc' | 'nqp' | 'p6' | 'pl6' | 'pm6' | 'php' | 'php4' | 'php5' | 'phtml' | 'ctp' | 'ps1' | 'psm1' | 'psd1' | 'pssc' | 'psrc' | 'py' | 'rpy' | 'pyw' | 'cpy' | 'gyp' | 'gypi' | 'pyi' | 'ipy' | 'pyt' | 'r' | 'rhistory' | 'rprofile' | 'rt' | 'cshtml' | 'razor' | 'rb' | 'rbx' | 'rjs' | 'gemspec' | 'rake' | 'ru' | 'erb' | 'podspec' | 'rbi' | 'rs' | 'scss' | 'sass' | 'shader' | 'sh' | 'bash' | 'bashrc' | 'bashaliases' | 'bashprofile' | 'bashlogin' | 'ebuild' | 'eclass' | 'profile' | 'bashlogout' | 'xprofile' | 'xsession' | 'xsessionrc' | 'zsh' | 'zshrc' | 'zprofile' | 'zlogin' | 'zlogout' | 'zshenv' | 'zshtheme' | 'fish' | 'ksh' | 'csh' | 'cshrc' | 'tcshrc' | 'yashrc' | 'yashprofile' | 'sql' | 'dsql' | 'swift' | 'ts' | 'cts' | 'mts' | 'tsx' | 'tsbuildinfo' | 'xml' | 'xsd' | 'ascx' | 'atom' | 'axml' | 'axaml' | 'bpmn' | 'cpt' | 'csl' | 'csproj' | 'csprojuser' | 'dita' | 'ditamap' | 'dtd' | 'ent' | 'mod' | 'dtml' | 'fsproj' | 'fxml' | 'iml' | 'isml' | 'jmx' | 'launch' | 'menu' | 'mxml' | 'nuspec' | 'opml' | 'owl' | 'proj' | 'props' | 'pt' | 'publishsettings' | 'pubxml' | 'pubxmluser' | 'rbxlx' | 'rbxmx' | 'rdf' | 'rng' | 'rss' | 'shproj' | 'storyboard' | 'targets' | 'tld' | 'tmx' | 'vbproj' | 'vbprojuser' | 'vcxproj' | 'vcxprojfilters' | 'wsdl' | 'wxi' | 'wxl' | 'wxs' | 'xaml' | 'xbl' | 'xib' | 'xlf' | 'xliff' | 'xpdl' | 'xul' | 'xoml' | 'xsl' | 'xslt' | 'yaml' | 'yml' | 'eyaml' | 'eyml' | 'cff' | 'yamltmlanguage' | 'yamltmpreferences' | 'yamltmtheme' | 'winget' | 'txt' | 'csv' | 'tsv' | 'jpeg' | 'jpg' | 'png' | 'gif' | 'svg' | 'webp' | 'avif' | 'bmp' | 'ico' | 'tiff' | 'tif' | 'heic' | 'heif' | 'tar' | 'targz' | 'tgz' | 'gz' | 'bz2' | 'tarbz2' | 'tbz2' | 'z' | 'tarz' | 'lz' | 'tarlz' | 'xz' | 'tarxz' | 'txz' | 'lzma' | 'tarlzma' | 'rar' | 'sevenz' | 'zst' | 'tarzst' | 'tzst' | 'zip' | 'exe' | 'msi' | 'dll' | 'bat' | 'cmd' | 'com' | 'appimage' | 'app' | 'bin' | 'deb' | 'rpm' | 'apk' | 'dmg' | 'pkg' | 'crx' | 'xpi' | 'mp3' | 'wav' | 'ogg' | 'flac' | 'aac' | 'm4a' | 'wma' | 'mid' | 'midi' | 'mp4' | 'mkv' | 'webm' | 'avi' | 'mov' | 'wmv' | 'mpg' | 'mpeg' | 'm4v' | 'flv' | 'f4v' | 'threegp' | 'ttf' | 'otf' | 'woff' | 'woff2' | 'eot' | 'rtf' | 'odt' | 'ods' | 'odp' | 'odg' | 'odf' | 'epub' | 'mobi' | 'azw' | 'azw3' | 'djvu' | 'xls' | 'ppt' | 'pptx' | 'xlsx' | 'db' | 'sqlite' | 'sqlite3' | 'mdb' | 'accdb' | 'dbf' | 'plist' | 'toml' | 'env' | 'dot' | 'gv' | 'torrent' | 'ics' | 'vcf' | 'ai' | 'eps' | 'ps' | 'dxf' | 'dwg' | 'stl' | 'obj' | 'fbx' | 'blend' | 'dae' | 'threeds' | 'gltf' | 'glb' | 'vhd' | 'vhdx' | 'vmdk' | 'ova' | 'ovf' | 'iso' | 'img' | 'swf';
|
|
1226
|
+
/**
|
|
1227
|
+
* Filters for foreign entity records.
|
|
1228
|
+
*/
|
|
1229
|
+
export type ForeignEntityFilters = {
|
|
1230
|
+
/**
|
|
1231
|
+
* External entity identifiers to filter by. Empty to include all external IDs.
|
|
1232
|
+
*/
|
|
1233
|
+
foreign_entity_ids?: Array<string>;
|
|
1234
|
+
/**
|
|
1235
|
+
* External source names to filter by. Empty to include all sources.
|
|
1236
|
+
*/
|
|
1237
|
+
foreign_entity_sources?: Array<string>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Internal foreign entity record IDs to filter by. Empty to include all records.
|
|
1240
|
+
*/
|
|
1241
|
+
ids?: Array<string>;
|
|
1242
|
+
/**
|
|
1243
|
+
* When true, only return foreign entities whose metadata lists the requesting user as a
|
|
1244
|
+
* participant (GitHub `involves:me` semantics for `github_pull_request` records). False or
|
|
1245
|
+
* absent applies no filter. Serialized in filter ASTs as the `"me"` literal.
|
|
1246
|
+
*/
|
|
1247
|
+
includes_me?: boolean;
|
|
1248
|
+
/**
|
|
1249
|
+
* Filter by the notification state of the foreign entity (e.g. whether the requesting user's
|
|
1250
|
+
* GitHub PR notification is done/seen).
|
|
1251
|
+
*/
|
|
1252
|
+
notification_filters?: NotificationFilters;
|
|
1253
|
+
};
|
|
1254
|
+
export type MatchType = 'exact' | 'partial' | 'regexp' | 'query';
|
|
1255
|
+
/**
|
|
1256
|
+
* Notification-level filters that apply to an entity type.
|
|
1257
|
+
*/
|
|
1258
|
+
export type NotificationFilters = {
|
|
1259
|
+
/**
|
|
1260
|
+
* Filter by notification done state.
|
|
1261
|
+
* None to ignore, true to include only done notifications, false to include only not-done notifications.
|
|
1262
|
+
*/
|
|
1263
|
+
done?: boolean | null;
|
|
1264
|
+
/**
|
|
1265
|
+
* Filter by notification seen state.
|
|
1266
|
+
* None to ignore, true to include only seen notifications, false to include only unseen notifications.
|
|
1267
|
+
*/
|
|
1268
|
+
seen?: boolean | null;
|
|
1269
|
+
};
|
|
1270
|
+
/**
|
|
1271
|
+
* The project filters used to filter down what projects you search over.
|
|
1272
|
+
*/
|
|
1273
|
+
export type ProjectFilters = {
|
|
1274
|
+
/**
|
|
1275
|
+
* Filter by project importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.
|
|
1276
|
+
*/
|
|
1277
|
+
importance?: boolean | null;
|
|
1278
|
+
/**
|
|
1279
|
+
* When true, `project_ids` also matches the projects themselves in addition to their children.
|
|
1280
|
+
*/
|
|
1281
|
+
include_root?: boolean;
|
|
1282
|
+
/**
|
|
1283
|
+
* Filter by project notification state.
|
|
1284
|
+
*/
|
|
1285
|
+
notification_filters?: NotificationFilters;
|
|
1286
|
+
/**
|
|
1287
|
+
* Filter by project owner. Examples: ['macro|user1@user.com'], ['macro|user1@user.com', 'macro|user2@user.com']. Empty to search all owners.
|
|
1288
|
+
*/
|
|
1289
|
+
owners?: Array<string>;
|
|
1290
|
+
/**
|
|
1291
|
+
* Project IDs to search within. Examples: ['project1']. Empty to search all accessible projects.
|
|
1292
|
+
* By default matches children of these projects; set `include_root` to also match the projects themselves.
|
|
1293
|
+
*/
|
|
1294
|
+
project_ids?: Array<string>;
|
|
1295
|
+
};
|
|
1296
|
+
/**
|
|
1297
|
+
* Metadata for a project fetched from the database
|
|
1298
|
+
*/
|
|
1299
|
+
export type ProjectMetadata = {
|
|
1300
|
+
created_at: string;
|
|
1301
|
+
deleted_at?: string | null;
|
|
1302
|
+
parent_project_id?: string | null;
|
|
1303
|
+
updated_at: string;
|
|
1304
|
+
viewed_at?: string | null;
|
|
1305
|
+
};
|
|
1306
|
+
/**
|
|
1307
|
+
* Metadata associated with Project Search, to be used with SearchResponseItem
|
|
1308
|
+
*/
|
|
1309
|
+
export type ProjectSearchMetadata = {
|
|
1310
|
+
created_at: string;
|
|
1311
|
+
owner_id: string;
|
|
1312
|
+
project_id: string;
|
|
1313
|
+
project_name: string;
|
|
1314
|
+
updated_at: string;
|
|
1315
|
+
};
|
|
1316
|
+
export type ProjectSearchRequest = (null | ProjectFilters) & {
|
|
1317
|
+
/**
|
|
1318
|
+
* If true, returns only 1 result per entity. False by default.
|
|
1319
|
+
*/
|
|
1320
|
+
collapse?: boolean | null;
|
|
1321
|
+
/**
|
|
1322
|
+
* The match type to use when searching
|
|
1323
|
+
*/
|
|
1324
|
+
match_type: MatchType;
|
|
1325
|
+
/**
|
|
1326
|
+
* The query to search for
|
|
1327
|
+
*/
|
|
1328
|
+
query?: string | null;
|
|
1329
|
+
/**
|
|
1330
|
+
* Fields to search on (Name, Content, NameContent). Defaults to Content
|
|
1331
|
+
*/
|
|
1332
|
+
search_on?: SearchOn;
|
|
1333
|
+
/**
|
|
1334
|
+
* Multiple terms to search over
|
|
1335
|
+
*/
|
|
1336
|
+
terms?: Array<string> | null;
|
|
1337
|
+
};
|
|
1338
|
+
/**
|
|
1339
|
+
* A single response item, part of the ProjectSearchResponse object
|
|
1340
|
+
*/
|
|
1341
|
+
export type ProjectSearchResponseItem = {
|
|
1342
|
+
created_at: string;
|
|
1343
|
+
/**
|
|
1344
|
+
* Standardized fields that all item types will share.
|
|
1345
|
+
* These field names are being aligned across all item types
|
|
1346
|
+
* for consistency in our data model.
|
|
1347
|
+
*/
|
|
1348
|
+
id: string;
|
|
1349
|
+
name: string;
|
|
1350
|
+
owner_id: string;
|
|
1351
|
+
project_search_results: Array<ProjectSearchResult>;
|
|
1352
|
+
updated_at: string;
|
|
1353
|
+
};
|
|
1354
|
+
/**
|
|
1355
|
+
* ProjectSearchResponseItem object with project metadata we fetch from macrodb.
|
|
1356
|
+
* The index carries created_at/updated_at for ranking, but viewed_at is
|
|
1357
|
+
* per-user and deleted_at changes without a reindex, so metadata stays
|
|
1358
|
+
* database-sourced.
|
|
1359
|
+
*/
|
|
1360
|
+
export type ProjectSearchResponseItemWithMetadata = ProjectSearchResponseItem & {
|
|
1361
|
+
metadata?: null | ProjectMetadata;
|
|
1362
|
+
/**
|
|
1363
|
+
* Entity properties (e.g. tags) on the project.
|
|
1364
|
+
*/
|
|
1365
|
+
properties?: Array<SoupProperty> | null;
|
|
1366
|
+
};
|
|
1367
|
+
export type ProjectSearchResult = {
|
|
1368
|
+
highlight: SearchHighlight;
|
|
1369
|
+
/**
|
|
1370
|
+
* The score of the result
|
|
1371
|
+
*/
|
|
1372
|
+
score?: number | null;
|
|
1373
|
+
};
|
|
1374
|
+
/**
|
|
1375
|
+
* Property definition model (service representation).
|
|
1376
|
+
*/
|
|
1377
|
+
export type PropertyDefinition = {
|
|
1378
|
+
created_at: string;
|
|
1379
|
+
data_type: DataType;
|
|
1380
|
+
display_name: string;
|
|
1381
|
+
id: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* Flag to indicate if this is a system-generated metadata property.
|
|
1384
|
+
* Not stored in database - computed at service layer.
|
|
1385
|
+
*/
|
|
1386
|
+
is_metadata: boolean;
|
|
1387
|
+
is_multi_select: boolean;
|
|
1388
|
+
/**
|
|
1389
|
+
* Flag to indicate if this is a system property (stored in DB).
|
|
1390
|
+
*/
|
|
1391
|
+
is_system: boolean;
|
|
1392
|
+
owner: PropertyOwner;
|
|
1393
|
+
specific_entity_type?: null | EntityType;
|
|
1394
|
+
updated_at: string;
|
|
1395
|
+
};
|
|
1396
|
+
/**
|
|
1397
|
+
* A single property-based filter condition.
|
|
1398
|
+
*
|
|
1399
|
+
* Each filter targets a specific property definition on entities of a given type,
|
|
1400
|
+
* matching against select option UUIDs or entity reference IDs.
|
|
1401
|
+
* Multiple values within a single filter are OR'd together.
|
|
1402
|
+
* Multiple filters are AND'd together.
|
|
1403
|
+
*/
|
|
1404
|
+
export type PropertyFilter = {
|
|
1405
|
+
/**
|
|
1406
|
+
* Entity reference IDs to match. Multiple values are OR'd together.
|
|
1407
|
+
*/
|
|
1408
|
+
entity_ids?: Array<string>;
|
|
1409
|
+
/**
|
|
1410
|
+
* The entity type for the property lookup (e.g., "TASK", "DOCUMENT", "PROJECT").
|
|
1411
|
+
* When None, matches across all entity types.
|
|
1412
|
+
*/
|
|
1413
|
+
entity_type?: string | null;
|
|
1414
|
+
/**
|
|
1415
|
+
* Select option UUIDs to match. Multiple values are OR'd together.
|
|
1416
|
+
*/
|
|
1417
|
+
option_ids?: Array<string>;
|
|
1418
|
+
/**
|
|
1419
|
+
* The UUID of the property definition to filter on.
|
|
1420
|
+
*/
|
|
1421
|
+
property_definition_id: string;
|
|
1422
|
+
};
|
|
1423
|
+
/**
|
|
1424
|
+
* Defines who owns a property - user-scoped, team-scoped, or system.
|
|
1425
|
+
*/
|
|
1426
|
+
export type PropertyOwner = {
|
|
1427
|
+
scope: 'user';
|
|
1428
|
+
user_id: string;
|
|
1429
|
+
} | {
|
|
1430
|
+
scope: 'team';
|
|
1431
|
+
team_id: string;
|
|
1432
|
+
} | {
|
|
1433
|
+
scope: 'system';
|
|
1434
|
+
};
|
|
1435
|
+
/**
|
|
1436
|
+
* Property value (service representation).
|
|
1437
|
+
*
|
|
1438
|
+
* Represents the actual value stored for an entity property.
|
|
1439
|
+
* This is serialized to/from JSONB in the database.
|
|
1440
|
+
*/
|
|
1441
|
+
export type PropertyValue = {
|
|
1442
|
+
type: 'Boolean';
|
|
1443
|
+
/**
|
|
1444
|
+
* Boolean value
|
|
1445
|
+
* Serializes as: {"type": "Boolean", "value": true}
|
|
1446
|
+
*/
|
|
1447
|
+
value: boolean;
|
|
1448
|
+
} | {
|
|
1449
|
+
type: 'Number';
|
|
1450
|
+
/**
|
|
1451
|
+
* Numeric value
|
|
1452
|
+
* Serializes as: {"type": "Number", "value": 42.5}
|
|
1453
|
+
*/
|
|
1454
|
+
value: number;
|
|
1455
|
+
} | {
|
|
1456
|
+
type: 'String';
|
|
1457
|
+
/**
|
|
1458
|
+
* String value
|
|
1459
|
+
* Serializes as: {"type": "String", "value": "text"}
|
|
1460
|
+
*/
|
|
1461
|
+
value: string;
|
|
1462
|
+
} | {
|
|
1463
|
+
type: 'Date';
|
|
1464
|
+
/**
|
|
1465
|
+
* Date/timestamp value
|
|
1466
|
+
* Serializes as: {"type": "Date", "value": "2025-01-01T00:00:00Z"}
|
|
1467
|
+
*/
|
|
1468
|
+
value: string;
|
|
1469
|
+
} | {
|
|
1470
|
+
type: 'SelectOption';
|
|
1471
|
+
/**
|
|
1472
|
+
* Select option(s) - always an array (check is_multi_select to determine if single or multi)
|
|
1473
|
+
* Single-select: {"type": "SelectOption", "value": ["uuid"]} (length 0 or 1)
|
|
1474
|
+
* Multi-select: {"type": "SelectOption", "value": ["uuid1", "uuid2", ...]} (length 0+)
|
|
1475
|
+
*/
|
|
1476
|
+
value: Array<string>;
|
|
1477
|
+
} | {
|
|
1478
|
+
type: 'EntityReference';
|
|
1479
|
+
/**
|
|
1480
|
+
* Entity reference(s) - always an array (check is_multi_select to determine if single or multi)
|
|
1481
|
+
* Single-select: {"type": "EntityReference", "value": [{...}]} (length 0 or 1)
|
|
1482
|
+
* Multi-select: {"type": "EntityReference", "value": [{...}, {...}, ...]} (length 0+)
|
|
1483
|
+
*/
|
|
1484
|
+
value: Array<EntityReference>;
|
|
1485
|
+
} | {
|
|
1486
|
+
type: 'Link';
|
|
1487
|
+
/**
|
|
1488
|
+
* Link value(s) - always an array (check is_multi_select to determine if single or multi)
|
|
1489
|
+
* Single-select: {"type": "Link", "value": ["https://example.com"]} (length 0 or 1)
|
|
1490
|
+
* Multi-select: {"type": "Link", "value": ["https://example.com", "https://other.com"]} (length 0+)
|
|
1491
|
+
*/
|
|
1492
|
+
value: Array<string>;
|
|
1493
|
+
};
|
|
1494
|
+
/**
|
|
1495
|
+
* Filters for reminders.
|
|
1496
|
+
*/
|
|
1497
|
+
export type ReminderFilters = {
|
|
1498
|
+
/**
|
|
1499
|
+
* Filter on whether the owner has marked the reminder done. `None` returns
|
|
1500
|
+
* both.
|
|
1501
|
+
*/
|
|
1502
|
+
completed?: boolean | null;
|
|
1503
|
+
/**
|
|
1504
|
+
* Restrict to reminders attached to these entities, each `"{type}:{id}"`.
|
|
1505
|
+
*/
|
|
1506
|
+
entities?: Array<string>;
|
|
1507
|
+
/**
|
|
1508
|
+
* Filter on whether the reminder's next run has come due, i.e. it has
|
|
1509
|
+
* fired and is awaiting its owner. `None` returns both.
|
|
1510
|
+
*
|
|
1511
|
+
* Evaluated server-side against the database clock rather than a
|
|
1512
|
+
* timestamp supplied by the caller: a timestamp would land in the query
|
|
1513
|
+
* cache key and change on every render.
|
|
1514
|
+
*/
|
|
1515
|
+
fired?: boolean | null;
|
|
1516
|
+
/**
|
|
1517
|
+
* Reminder ids to filter by. Empty to include all of the caller's reminders.
|
|
1518
|
+
*/
|
|
1519
|
+
ids?: Array<string>;
|
|
1520
|
+
/**
|
|
1521
|
+
* Opt this query into reminders at all. Reminders are off by default —
|
|
1522
|
+
* see [`crate::ast::reminder::ReminderLiteral::Include`]. Asking for
|
|
1523
|
+
* specific `ids` or `entities` also opts in.
|
|
1524
|
+
*/
|
|
1525
|
+
include?: boolean;
|
|
1526
|
+
};
|
|
1527
|
+
export type SearchHighlight = {
|
|
1528
|
+
/**
|
|
1529
|
+
* The highlight match on the bcc (email only)
|
|
1530
|
+
*/
|
|
1531
|
+
bcc?: Array<string>;
|
|
1532
|
+
/**
|
|
1533
|
+
* The highlight match on the cc (email only)
|
|
1534
|
+
*/
|
|
1535
|
+
cc?: Array<string>;
|
|
1536
|
+
/**
|
|
1537
|
+
* The highlight match on the content field
|
|
1538
|
+
*/
|
|
1539
|
+
content?: Array<string>;
|
|
1540
|
+
/**
|
|
1541
|
+
* The highlight match on the name field
|
|
1542
|
+
*/
|
|
1543
|
+
name?: string | null;
|
|
1544
|
+
/**
|
|
1545
|
+
* The highlight match on the recipients (email only)
|
|
1546
|
+
*/
|
|
1547
|
+
recipients?: Array<string>;
|
|
1548
|
+
/**
|
|
1549
|
+
* The highlight match on the sender (email only)
|
|
1550
|
+
*/
|
|
1551
|
+
sender?: string | null;
|
|
1552
|
+
/**
|
|
1553
|
+
* The highlight match on the user (owner) of the entity
|
|
1554
|
+
*/
|
|
1555
|
+
user_id?: string | null;
|
|
1556
|
+
};
|
|
1557
|
+
export type SearchOn = 'name' | 'content' | 'name_content';
|
|
1558
|
+
export type SearchResponse = {
|
|
1559
|
+
/**
|
|
1560
|
+
* List containing results from a request
|
|
1561
|
+
*/
|
|
1562
|
+
results: Array<ProjectSearchResponseItemWithMetadata>;
|
|
1563
|
+
};
|
|
1564
|
+
/**
|
|
1565
|
+
* Controls whether shared email threads are included in results.
|
|
1566
|
+
*/
|
|
1567
|
+
export type SharedEmailFilter = 'exclude' | 'include' | 'only';
|
|
1568
|
+
export type SimpleCalendarEventSearchResponseBaseItemHumanReadableTimestamp = {
|
|
1569
|
+
/**
|
|
1570
|
+
* The calendar event id
|
|
1571
|
+
*/
|
|
1572
|
+
calendar_event_id: string;
|
|
1573
|
+
/**
|
|
1574
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1575
|
+
*/
|
|
1576
|
+
created_at: string;
|
|
1577
|
+
/**
|
|
1578
|
+
* The highlights on the event
|
|
1579
|
+
*/
|
|
1580
|
+
highlight: SearchHighlight;
|
|
1581
|
+
/**
|
|
1582
|
+
* Whether the series carries a recurrence rule
|
|
1583
|
+
*/
|
|
1584
|
+
is_recurring: boolean;
|
|
1585
|
+
/**
|
|
1586
|
+
* Stable key of the instance this row points at, when one resolved
|
|
1587
|
+
*/
|
|
1588
|
+
occurrence_key?: string | null;
|
|
1589
|
+
/**
|
|
1590
|
+
* The event title
|
|
1591
|
+
*/
|
|
1592
|
+
title: string;
|
|
1593
|
+
/**
|
|
1594
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1595
|
+
*/
|
|
1596
|
+
updated_at: string;
|
|
1597
|
+
/**
|
|
1598
|
+
* The owner of this event projection
|
|
1599
|
+
*/
|
|
1600
|
+
user_id: string;
|
|
1601
|
+
};
|
|
1602
|
+
export type SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp = {
|
|
1603
|
+
call_id: string;
|
|
1604
|
+
channel_id: string;
|
|
1605
|
+
channel_name?: string | null;
|
|
1606
|
+
duration_ms: number;
|
|
1607
|
+
/**
|
|
1608
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1609
|
+
*/
|
|
1610
|
+
ended_at: string;
|
|
1611
|
+
highlight: SearchHighlight;
|
|
1612
|
+
participant_ids: Array<string>;
|
|
1613
|
+
/**
|
|
1614
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1615
|
+
*/
|
|
1616
|
+
started_at: string;
|
|
1617
|
+
user_id: string;
|
|
1618
|
+
};
|
|
1619
|
+
export type SimpleChannelSearchReponseBaseItem = {
|
|
1620
|
+
/**
|
|
1621
|
+
* The channel id
|
|
1622
|
+
*/
|
|
1623
|
+
channel_id: string;
|
|
1624
|
+
/**
|
|
1625
|
+
* The channel type
|
|
1626
|
+
*/
|
|
1627
|
+
channel_type: string;
|
|
1628
|
+
/**
|
|
1629
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1630
|
+
*/
|
|
1631
|
+
created_at: string;
|
|
1632
|
+
/**
|
|
1633
|
+
* The highlights on the channel message
|
|
1634
|
+
*/
|
|
1635
|
+
highlight: SearchHighlight;
|
|
1636
|
+
/**
|
|
1637
|
+
* The mentions
|
|
1638
|
+
*/
|
|
1639
|
+
mentions: Array<string>;
|
|
1640
|
+
/**
|
|
1641
|
+
* The message id
|
|
1642
|
+
*/
|
|
1643
|
+
message_id: string;
|
|
1644
|
+
/**
|
|
1645
|
+
* The org id
|
|
1646
|
+
*/
|
|
1647
|
+
org_id?: number | null;
|
|
1648
|
+
/**
|
|
1649
|
+
* The sender id
|
|
1650
|
+
*/
|
|
1651
|
+
sender_id: string;
|
|
1652
|
+
/**
|
|
1653
|
+
* The thread id
|
|
1654
|
+
*/
|
|
1655
|
+
thread_id?: string | null;
|
|
1656
|
+
/**
|
|
1657
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1658
|
+
*/
|
|
1659
|
+
updated_at: string;
|
|
1660
|
+
};
|
|
1661
|
+
export type SimpleChannelSearchReponseBaseItemHumanReadableTimestamp = {
|
|
1662
|
+
/**
|
|
1663
|
+
* The channel id
|
|
1664
|
+
*/
|
|
1665
|
+
channel_id: string;
|
|
1666
|
+
/**
|
|
1667
|
+
* The channel type
|
|
1668
|
+
*/
|
|
1669
|
+
channel_type: string;
|
|
1670
|
+
/**
|
|
1671
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1672
|
+
*/
|
|
1673
|
+
created_at: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* The highlights on the channel message
|
|
1676
|
+
*/
|
|
1677
|
+
highlight: SearchHighlight;
|
|
1678
|
+
/**
|
|
1679
|
+
* The mentions
|
|
1680
|
+
*/
|
|
1681
|
+
mentions: Array<string>;
|
|
1682
|
+
/**
|
|
1683
|
+
* The message id
|
|
1684
|
+
*/
|
|
1685
|
+
message_id: string;
|
|
1686
|
+
/**
|
|
1687
|
+
* The org id
|
|
1688
|
+
*/
|
|
1689
|
+
org_id?: number | null;
|
|
1690
|
+
/**
|
|
1691
|
+
* The sender id
|
|
1692
|
+
*/
|
|
1693
|
+
sender_id: string;
|
|
1694
|
+
/**
|
|
1695
|
+
* The thread id
|
|
1696
|
+
*/
|
|
1697
|
+
thread_id?: string | null;
|
|
1698
|
+
/**
|
|
1699
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1700
|
+
*/
|
|
1701
|
+
updated_at: string;
|
|
1702
|
+
};
|
|
1703
|
+
export type SimpleChannelSearchResponse = {
|
|
1704
|
+
/**
|
|
1705
|
+
* List containing results from channels.
|
|
1706
|
+
* Each item in the list is for a specific message in a channel.
|
|
1707
|
+
*/
|
|
1708
|
+
results: Array<SimpleChannelSearchReponseBaseItem>;
|
|
1709
|
+
};
|
|
1710
|
+
export type SimpleChatSearchResponse = {
|
|
1711
|
+
/**
|
|
1712
|
+
* List containing results from chats.
|
|
1713
|
+
* Each item in the list is for a specific message in a chat.
|
|
1714
|
+
*/
|
|
1715
|
+
results: Array<SimpleChatSearchResponseBaseItem>;
|
|
1716
|
+
};
|
|
1717
|
+
export type SimpleChatSearchResponseBaseItem = {
|
|
1718
|
+
/**
|
|
1719
|
+
* The chat id
|
|
1720
|
+
*/
|
|
1721
|
+
chat_id: string;
|
|
1722
|
+
/**
|
|
1723
|
+
* The chat message id
|
|
1724
|
+
*/
|
|
1725
|
+
chat_message_id: string;
|
|
1726
|
+
/**
|
|
1727
|
+
* The highlights on the chat
|
|
1728
|
+
*/
|
|
1729
|
+
highlight: SearchHighlight;
|
|
1730
|
+
/**
|
|
1731
|
+
* The role
|
|
1732
|
+
*/
|
|
1733
|
+
role: string;
|
|
1734
|
+
/**
|
|
1735
|
+
* The title
|
|
1736
|
+
*/
|
|
1737
|
+
title: string;
|
|
1738
|
+
/**
|
|
1739
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1740
|
+
*/
|
|
1741
|
+
updated_at: string;
|
|
1742
|
+
/**
|
|
1743
|
+
* The user id
|
|
1744
|
+
*/
|
|
1745
|
+
user_id: string;
|
|
1746
|
+
};
|
|
1747
|
+
export type SimpleChatSearchResponseBaseItemHumanReadableTimestamp = {
|
|
1748
|
+
/**
|
|
1749
|
+
* The chat id
|
|
1750
|
+
*/
|
|
1751
|
+
chat_id: string;
|
|
1752
|
+
/**
|
|
1753
|
+
* The chat message id
|
|
1754
|
+
*/
|
|
1755
|
+
chat_message_id: string;
|
|
1756
|
+
/**
|
|
1757
|
+
* The highlights on the chat
|
|
1758
|
+
*/
|
|
1759
|
+
highlight: SearchHighlight;
|
|
1760
|
+
/**
|
|
1761
|
+
* The role
|
|
1762
|
+
*/
|
|
1763
|
+
role: string;
|
|
1764
|
+
/**
|
|
1765
|
+
* The title
|
|
1766
|
+
*/
|
|
1767
|
+
title: string;
|
|
1768
|
+
/**
|
|
1769
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1770
|
+
*/
|
|
1771
|
+
updated_at: string;
|
|
1772
|
+
/**
|
|
1773
|
+
* The user id
|
|
1774
|
+
*/
|
|
1775
|
+
user_id: string;
|
|
1776
|
+
};
|
|
1777
|
+
export type SimpleDocumentSearchResponse = {
|
|
1778
|
+
/**
|
|
1779
|
+
* List containing results from documents.
|
|
1780
|
+
* Each item in the list is for a specific page/node of a document.
|
|
1781
|
+
*/
|
|
1782
|
+
results: Array<SimpleDocumentSearchResponseBaseItem>;
|
|
1783
|
+
};
|
|
1784
|
+
export type SimpleDocumentSearchResponseBaseItem = {
|
|
1785
|
+
/**
|
|
1786
|
+
* The document id
|
|
1787
|
+
*/
|
|
1788
|
+
document_id: string;
|
|
1789
|
+
/**
|
|
1790
|
+
* The document name
|
|
1791
|
+
*/
|
|
1792
|
+
document_name: string;
|
|
1793
|
+
/**
|
|
1794
|
+
* The file type
|
|
1795
|
+
*/
|
|
1796
|
+
file_type: string;
|
|
1797
|
+
/**
|
|
1798
|
+
* The highlights on the document
|
|
1799
|
+
*/
|
|
1800
|
+
highlight: SearchHighlight;
|
|
1801
|
+
/**
|
|
1802
|
+
* The node id
|
|
1803
|
+
*/
|
|
1804
|
+
node_id: string;
|
|
1805
|
+
/**
|
|
1806
|
+
* The owner id
|
|
1807
|
+
*/
|
|
1808
|
+
owner_id: string;
|
|
1809
|
+
/**
|
|
1810
|
+
* The raw content of the document
|
|
1811
|
+
*/
|
|
1812
|
+
raw_content?: string | null;
|
|
1813
|
+
/**
|
|
1814
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1815
|
+
*/
|
|
1816
|
+
updated_at: string;
|
|
1817
|
+
};
|
|
1818
|
+
export type SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp = {
|
|
1819
|
+
/**
|
|
1820
|
+
* The document id
|
|
1821
|
+
*/
|
|
1822
|
+
document_id: string;
|
|
1823
|
+
/**
|
|
1824
|
+
* The document name
|
|
1825
|
+
*/
|
|
1826
|
+
document_name: string;
|
|
1827
|
+
/**
|
|
1828
|
+
* The file type
|
|
1829
|
+
*/
|
|
1830
|
+
file_type: string;
|
|
1831
|
+
/**
|
|
1832
|
+
* The highlights on the document
|
|
1833
|
+
*/
|
|
1834
|
+
highlight: SearchHighlight;
|
|
1835
|
+
/**
|
|
1836
|
+
* The node id
|
|
1837
|
+
*/
|
|
1838
|
+
node_id: string;
|
|
1839
|
+
/**
|
|
1840
|
+
* The owner id
|
|
1841
|
+
*/
|
|
1842
|
+
owner_id: string;
|
|
1843
|
+
/**
|
|
1844
|
+
* The raw content of the document
|
|
1845
|
+
*/
|
|
1846
|
+
raw_content?: string | null;
|
|
1847
|
+
/**
|
|
1848
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1849
|
+
*/
|
|
1850
|
+
updated_at: string;
|
|
1851
|
+
};
|
|
1852
|
+
export type SimpleEmailSearchResponse = {
|
|
1853
|
+
/**
|
|
1854
|
+
* List containing results from emails.
|
|
1855
|
+
* Each item in the list is for a specific message in an email thread.
|
|
1856
|
+
*/
|
|
1857
|
+
results: Array<SimpleEmailSearchResponseBaseItem>;
|
|
1858
|
+
};
|
|
1859
|
+
export type SimpleEmailSearchResponseBaseItem = {
|
|
1860
|
+
/**
|
|
1861
|
+
* The bcc
|
|
1862
|
+
*/
|
|
1863
|
+
bcc: Array<string>;
|
|
1864
|
+
/**
|
|
1865
|
+
* The cc
|
|
1866
|
+
*/
|
|
1867
|
+
cc: Array<string>;
|
|
1868
|
+
/**
|
|
1869
|
+
* The highlights on the email
|
|
1870
|
+
*/
|
|
1871
|
+
highlight: SearchHighlight;
|
|
1872
|
+
/**
|
|
1873
|
+
* The labels
|
|
1874
|
+
*/
|
|
1875
|
+
labels: Array<string>;
|
|
1876
|
+
/**
|
|
1877
|
+
* The link id
|
|
1878
|
+
*/
|
|
1879
|
+
link_id: string;
|
|
1880
|
+
/**
|
|
1881
|
+
* The message id
|
|
1882
|
+
*/
|
|
1883
|
+
message_id: string;
|
|
1884
|
+
/**
|
|
1885
|
+
* The recipients
|
|
1886
|
+
*/
|
|
1887
|
+
recipients: Array<string>;
|
|
1888
|
+
/**
|
|
1889
|
+
* The sender
|
|
1890
|
+
*/
|
|
1891
|
+
sender: string;
|
|
1892
|
+
/**
|
|
1893
|
+
* The time the email was sent
|
|
1894
|
+
*/
|
|
1895
|
+
sent_at?: null | string;
|
|
1896
|
+
/**
|
|
1897
|
+
* The subject
|
|
1898
|
+
*/
|
|
1899
|
+
subject?: string | null;
|
|
1900
|
+
/**
|
|
1901
|
+
* The thread id
|
|
1902
|
+
*/
|
|
1903
|
+
thread_id: string;
|
|
1904
|
+
/**
|
|
1905
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1906
|
+
*/
|
|
1907
|
+
updated_at: string;
|
|
1908
|
+
/**
|
|
1909
|
+
* The user id
|
|
1910
|
+
*/
|
|
1911
|
+
user_id: string;
|
|
1912
|
+
};
|
|
1913
|
+
export type SimpleEmailSearchResponseBaseItemHumanReadableTimestamp = {
|
|
1914
|
+
/**
|
|
1915
|
+
* The bcc
|
|
1916
|
+
*/
|
|
1917
|
+
bcc: Array<string>;
|
|
1918
|
+
/**
|
|
1919
|
+
* The cc
|
|
1920
|
+
*/
|
|
1921
|
+
cc: Array<string>;
|
|
1922
|
+
/**
|
|
1923
|
+
* The highlights on the email
|
|
1924
|
+
*/
|
|
1925
|
+
highlight: SearchHighlight;
|
|
1926
|
+
/**
|
|
1927
|
+
* The labels
|
|
1928
|
+
*/
|
|
1929
|
+
labels: Array<string>;
|
|
1930
|
+
/**
|
|
1931
|
+
* The link id
|
|
1932
|
+
*/
|
|
1933
|
+
link_id: string;
|
|
1934
|
+
/**
|
|
1935
|
+
* The message id
|
|
1936
|
+
*/
|
|
1937
|
+
message_id: string;
|
|
1938
|
+
/**
|
|
1939
|
+
* The recipients
|
|
1940
|
+
*/
|
|
1941
|
+
recipients: Array<string>;
|
|
1942
|
+
/**
|
|
1943
|
+
* The sender
|
|
1944
|
+
*/
|
|
1945
|
+
sender: string;
|
|
1946
|
+
/**
|
|
1947
|
+
* The time the email was sent
|
|
1948
|
+
*/
|
|
1949
|
+
sent_at?: null | string;
|
|
1950
|
+
/**
|
|
1951
|
+
* The subject
|
|
1952
|
+
*/
|
|
1953
|
+
subject?: string | null;
|
|
1954
|
+
/**
|
|
1955
|
+
* The thread id
|
|
1956
|
+
*/
|
|
1957
|
+
thread_id: string;
|
|
1958
|
+
/**
|
|
1959
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1960
|
+
*/
|
|
1961
|
+
updated_at: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* The user id
|
|
1964
|
+
*/
|
|
1965
|
+
user_id: string;
|
|
1966
|
+
};
|
|
1967
|
+
export type SimpleProjectSearchResponse = {
|
|
1968
|
+
/**
|
|
1969
|
+
* List containing results from projects.
|
|
1970
|
+
* Each item in the list is for a specific project.
|
|
1971
|
+
*/
|
|
1972
|
+
results: Array<SimpleProjectSearchResponseBaseItem>;
|
|
1973
|
+
};
|
|
1974
|
+
export type SimpleProjectSearchResponseBaseItem = {
|
|
1975
|
+
/**
|
|
1976
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1977
|
+
*/
|
|
1978
|
+
created_at: string;
|
|
1979
|
+
/**
|
|
1980
|
+
* The highlights on the project
|
|
1981
|
+
*/
|
|
1982
|
+
highlight: SearchHighlight;
|
|
1983
|
+
/**
|
|
1984
|
+
* The project id
|
|
1985
|
+
*/
|
|
1986
|
+
project_id: string;
|
|
1987
|
+
/**
|
|
1988
|
+
* The project name
|
|
1989
|
+
*/
|
|
1990
|
+
project_name: string;
|
|
1991
|
+
/**
|
|
1992
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
1993
|
+
*/
|
|
1994
|
+
updated_at: string;
|
|
1995
|
+
/**
|
|
1996
|
+
* The id of the user who created the project
|
|
1997
|
+
*/
|
|
1998
|
+
user_id: string;
|
|
1999
|
+
};
|
|
2000
|
+
export type SimpleProjectSearchResponseBaseItemHumanReadableTimestamp = {
|
|
2001
|
+
/**
|
|
2002
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
2003
|
+
*/
|
|
2004
|
+
created_at: string;
|
|
2005
|
+
/**
|
|
2006
|
+
* The highlights on the project
|
|
2007
|
+
*/
|
|
2008
|
+
highlight: SearchHighlight;
|
|
2009
|
+
/**
|
|
2010
|
+
* The project id
|
|
2011
|
+
*/
|
|
2012
|
+
project_id: string;
|
|
2013
|
+
/**
|
|
2014
|
+
* The project name
|
|
2015
|
+
*/
|
|
2016
|
+
project_name: string;
|
|
2017
|
+
/**
|
|
2018
|
+
* DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
|
|
2019
|
+
*/
|
|
2020
|
+
updated_at: string;
|
|
2021
|
+
/**
|
|
2022
|
+
* The id of the user who created the project
|
|
2023
|
+
*/
|
|
2024
|
+
user_id: string;
|
|
2025
|
+
};
|
|
2026
|
+
export type SimpleUnifiedSearchBaseResponse = {
|
|
2027
|
+
results: Array<SimpleUnifiedSearchResponseBaseItemHumanReadableTimestamp>;
|
|
2028
|
+
};
|
|
2029
|
+
export type SimpleUnifiedSearchResponseBaseItem = (SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2030
|
+
type: 'document';
|
|
2031
|
+
}) | (SimpleChatSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2032
|
+
type: 'chat';
|
|
2033
|
+
}) | (SimpleEmailSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2034
|
+
type: 'email';
|
|
2035
|
+
}) | (SimpleChannelSearchReponseBaseItemHumanReadableTimestamp & {
|
|
2036
|
+
type: 'channel';
|
|
2037
|
+
}) | (SimpleProjectSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2038
|
+
type: 'project';
|
|
2039
|
+
}) | (SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2040
|
+
type: 'call';
|
|
2041
|
+
}) | (SimpleCalendarEventSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2042
|
+
type: 'calendarEvent';
|
|
2043
|
+
});
|
|
2044
|
+
export type SimpleUnifiedSearchResponseBaseItemHumanReadableTimestamp = (SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2045
|
+
type: 'document';
|
|
2046
|
+
}) | (SimpleChatSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2047
|
+
type: 'chat';
|
|
2048
|
+
}) | (SimpleEmailSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2049
|
+
type: 'email';
|
|
2050
|
+
}) | (SimpleChannelSearchReponseBaseItemHumanReadableTimestamp & {
|
|
2051
|
+
type: 'channel';
|
|
2052
|
+
}) | (SimpleProjectSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2053
|
+
type: 'project';
|
|
2054
|
+
}) | (SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2055
|
+
type: 'call';
|
|
2056
|
+
}) | (SimpleCalendarEventSearchResponseBaseItemHumanReadableTimestamp & {
|
|
2057
|
+
type: 'calendarEvent';
|
|
2058
|
+
});
|
|
2059
|
+
/**
|
|
2060
|
+
* A property attached to a Soup item.
|
|
2061
|
+
*
|
|
2062
|
+
* This is a simplified representation that includes only the definition and value,
|
|
2063
|
+
* omitting the entity property assignment metadata and options.
|
|
2064
|
+
*/
|
|
2065
|
+
export type SoupProperty = {
|
|
2066
|
+
/**
|
|
2067
|
+
* The property definition
|
|
2068
|
+
*/
|
|
2069
|
+
definition: PropertyDefinition;
|
|
2070
|
+
/**
|
|
2071
|
+
* Globally unique id of the assignment attaching this property to an entity.
|
|
2072
|
+
*/
|
|
2073
|
+
id: string;
|
|
2074
|
+
value?: null | PropertyValue;
|
|
2075
|
+
};
|
|
2076
|
+
/**
|
|
2077
|
+
* How multiple `tag_option_ids` combine when filtering.
|
|
2078
|
+
*/
|
|
2079
|
+
export type TagFilterMode = 'any' | 'all';
|
|
2080
|
+
/**
|
|
2081
|
+
* Task-only filters nested under document filters.
|
|
2082
|
+
*/
|
|
2083
|
+
export type TaskFilters = {
|
|
2084
|
+
/**
|
|
2085
|
+
* Include tasks that are created by me, assigned to me, and not completed,
|
|
2086
|
+
* even when they do not match other document filters.
|
|
2087
|
+
*/
|
|
2088
|
+
include_cbm_atm_nc?: boolean | null;
|
|
2089
|
+
};
|
|
2090
|
+
export type UnifiedSearchRequest = {
|
|
2091
|
+
collapse?: boolean | null;
|
|
2092
|
+
/**
|
|
2093
|
+
* Entity filters in the same shape as soup. Entity types with a NIL UUID in their primary ID field are excluded from search.
|
|
2094
|
+
*/
|
|
2095
|
+
filters?: EntityFilters;
|
|
2096
|
+
/**
|
|
2097
|
+
* Opt in to searching the caller's team CRM companies (name/domain).
|
|
2098
|
+
* Off by default: CRM results are only included when this is true and
|
|
2099
|
+
* the caller has a qualifying team membership. CRM has no content
|
|
2100
|
+
* index, so it is searched only under Name / NameContent.
|
|
2101
|
+
*/
|
|
2102
|
+
include_crm?: boolean;
|
|
2103
|
+
/**
|
|
2104
|
+
* How to match the search terms. 'exact' for precise case-sensitive phrase matches, 'partial' for prefix/partial matches. REQUIRED field.
|
|
2105
|
+
*/
|
|
2106
|
+
match_type: MatchType;
|
|
2107
|
+
/**
|
|
2108
|
+
* The search query string. Must be at least 3 characters.
|
|
2109
|
+
*/
|
|
2110
|
+
query: string;
|
|
2111
|
+
/**
|
|
2112
|
+
* Fields to search on (Name, Content, NameContent). Defaults to Content
|
|
2113
|
+
*/
|
|
2114
|
+
search_on?: SearchOn;
|
|
2115
|
+
};
|
|
2116
|
+
export type UnifiedSearchResponse = {
|
|
2117
|
+
/**
|
|
2118
|
+
* The next cursor to use for paginating results
|
|
2119
|
+
*/
|
|
2120
|
+
next_cursor?: string | null;
|
|
2121
|
+
/**
|
|
2122
|
+
* The search results
|
|
2123
|
+
*/
|
|
2124
|
+
results: Array<UnifiedSearchResponseItem>;
|
|
2125
|
+
};
|
|
2126
|
+
export type UnifiedSearchResponseItem = (DocumentSearchResponseItemWithMetadata & {
|
|
2127
|
+
type: 'document';
|
|
2128
|
+
}) | (ChatSearchResponseItemWithMetadata & {
|
|
2129
|
+
type: 'chat';
|
|
2130
|
+
}) | (EmailSearchResponseItemWithMetadata & {
|
|
2131
|
+
type: 'email';
|
|
2132
|
+
}) | (ChannelMessageSearchResponseItem & {
|
|
2133
|
+
type: 'channelMessage';
|
|
2134
|
+
}) | (ChannelNameSearchResponseItem & {
|
|
2135
|
+
type: 'channel';
|
|
2136
|
+
}) | (ProjectSearchResponseItemWithMetadata & {
|
|
2137
|
+
type: 'project';
|
|
2138
|
+
}) | (CallRecordSearchResponseItemWithMetadata & {
|
|
2139
|
+
type: 'call';
|
|
2140
|
+
}) | (CrmCompanySearchResponseItem & {
|
|
2141
|
+
type: 'company';
|
|
2142
|
+
}) | (CalendarEventSearchResponseItemWithMetadata & {
|
|
2143
|
+
type: 'calendarEvent';
|
|
2144
|
+
});
|
|
2145
|
+
export type UnifiedSearchData = {
|
|
2146
|
+
body: UnifiedSearchRequest;
|
|
2147
|
+
path?: never;
|
|
2148
|
+
query: {
|
|
2149
|
+
/**
|
|
2150
|
+
* The page size. Defaults to 10.
|
|
2151
|
+
*/
|
|
2152
|
+
page_size: number;
|
|
2153
|
+
/**
|
|
2154
|
+
* Base64 encoded cursor value.
|
|
2155
|
+
*/
|
|
2156
|
+
cursor?: string;
|
|
2157
|
+
};
|
|
2158
|
+
url: '/search';
|
|
2159
|
+
};
|
|
2160
|
+
export type UnifiedSearchErrors = {
|
|
2161
|
+
400: ErrorResponse;
|
|
2162
|
+
401: ErrorResponse;
|
|
2163
|
+
500: ErrorResponse;
|
|
2164
|
+
};
|
|
2165
|
+
export type UnifiedSearchError = UnifiedSearchErrors[keyof UnifiedSearchErrors];
|
|
2166
|
+
export type UnifiedSearchResponses = {
|
|
2167
|
+
200: UnifiedSearchResponse;
|
|
2168
|
+
};
|
|
2169
|
+
export type UnifiedSearchResponse2 = UnifiedSearchResponses[keyof UnifiedSearchResponses];
|
|
2170
|
+
export type SimpleUnifiedSearchData = {
|
|
2171
|
+
body: UnifiedSearchRequest;
|
|
2172
|
+
path?: never;
|
|
2173
|
+
query: {
|
|
2174
|
+
/**
|
|
2175
|
+
* The page size. Defaults to 10.
|
|
2176
|
+
*/
|
|
2177
|
+
page_size: number;
|
|
2178
|
+
/**
|
|
2179
|
+
* Base64 encoded cursor for pagination.
|
|
2180
|
+
*/
|
|
2181
|
+
cursor?: string;
|
|
2182
|
+
};
|
|
2183
|
+
url: '/search/simple';
|
|
2184
|
+
};
|
|
2185
|
+
export type SimpleUnifiedSearchErrors = {
|
|
2186
|
+
400: ErrorResponse;
|
|
2187
|
+
401: ErrorResponse;
|
|
2188
|
+
500: ErrorResponse;
|
|
2189
|
+
};
|
|
2190
|
+
export type SimpleUnifiedSearchError = SimpleUnifiedSearchErrors[keyof SimpleUnifiedSearchErrors];
|
|
2191
|
+
export type SimpleUnifiedSearchResponses = {
|
|
2192
|
+
200: SimpleUnifiedSearchBaseResponse;
|
|
2193
|
+
};
|
|
2194
|
+
export type SimpleUnifiedSearchResponse = SimpleUnifiedSearchResponses[keyof SimpleUnifiedSearchResponses];
|