Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(soup): expose calendar events through GraphQL (stack 3/3) (#5204)
teo56292616aedd
diff --git a/.sqlx/query-2749136b6b492ca961c53c3585ae85415807dc893919f95fac88a2f9991513c7.json b/.sqlx/query-2749136b6b492ca961c53c3585ae85415807dc893919f95fac88a2f9991513c7.jsonnew file mode 100644index 0000000000..662016ffd9--- /dev/null+++ b/.sqlx/query-2749136b6b492ca961c53c3585ae85415807dc893919f95fac88a2f9991513c7.json@@ -0,0 +1,22 @@+{+ "db_name": "PostgreSQL",+ "query": "SELECT owner_id FROM calendar_events WHERE id = $1",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "owner_id",+ "type_info": "Text"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "2749136b6b492ca961c53c3585ae85415807dc893919f95fac88a2f9991513c7"+}diff --git a/.sqlx/query-34476a8c58f66bdf4485dbf26077ce12ab3863682090ea3a4fc895aa0370134b.json b/.sqlx/query-34476a8c58f66bdf4485dbf26077ce12ab3863682090ea3a4fc895aa0370134b.jsonnew file mode 100644index 0000000000..28072abac3--- /dev/null+++ b/.sqlx/query-34476a8c58f66bdf4485dbf26077ce12ab3863682090ea3a4fc895aa0370134b.json@@ -0,0 +1,23 @@+{+ "db_name": "PostgreSQL",+ "query": "\n SELECT event.owner_id = $2 AS \"is_owner!\"\n FROM calendar_events event\n WHERE event.id = $1\n AND (\n event.owner_id = $2\n OR EXISTS (\n SELECT 1\n FROM macro_user_links link\n WHERE link.link_id = event.source_link_id\n AND link.primary_macro_id = $2\n )\n )\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "is_owner!",+ "type_info": "Bool"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid",+ "Text"+ ]+ },+ "nullable": [+ null+ ]+ },+ "hash": "34476a8c58f66bdf4485dbf26077ce12ab3863682090ea3a4fc895aa0370134b"+}diff --git a/apps/web/src/features/block-email/component/EmailContext.tsx b/apps/web/src/features/block-email/component/EmailContext.tsxindex a4d94bf389..7d48e781de 100644--- a/apps/web/src/features/block-email/component/EmailContext.tsx+++ b/apps/web/src/features/block-email/component/EmailContext.tsx@@ -526,7 +526,9 @@ export function EmailProvider(props: FlowProps<{ threadID: string }>) {const entity =selectedRow?.original ??- (cachedItem && cachedItem.tag !== 'channelThread'+ (cachedItem &&+ cachedItem.tag !== 'channelThread' &&+ cachedItem.tag !== 'calendarEvent'? mapApiSoupItemToEntity(cachedItem): undefined);@@ -626,7 +628,11 @@ export function EmailProvider(props: FlowProps<{ threadID: string }>) {markDoneOpts));- } else if (cachedItem && cachedItem.tag !== 'channelThread') {+ } else if (+ cachedItem &&+ cachedItem.tag !== 'channelThread' &&+ cachedItem.tag !== 'calendarEvent'+ ) {// Not rendered inside a soup list (e.g. thread opened in a split): no// row to drive the action from, so mark done via the cached soup entity// so soup views drop the thread and its notifications settle.diff --git a/apps/web/src/features/next-soup/filters/query-filters.ts b/apps/web/src/features/next-soup/filters/query-filters.tsindex 4ef0408eca..ab36098083 100644--- a/apps/web/src/features/next-soup/filters/query-filters.ts+++ b/apps/web/src/features/next-soup/filters/query-filters.ts@@ -78,82 +78,90 @@ export function filterSoupItemByRequestBody(item: SoupApiItem,body: SoupBody): boolean {- return match(item)- .with(- { tag: 'document' },- ({ data }) =>- !isIdFilteredOut(body.document_filters?.document_ids, data.id) &&- !isValueFilteredOut(body.document_filters?.owners, data.ownerId) &&- !isValueFilteredOut(- body.document_filters?.sub_types,- data.subType?.type- )- )- .with(- { tag: 'chat' },- ({ data }) => !isIdFilteredOut(body.chat_filters?.chat_ids, data.id)- )- .with(- { tag: 'channel' },- ({ data }) =>- !isIdFilteredOut(body.channel_filters?.channel_ids, data.channel.id) &&- !isAnyValueFilteredOut(body.channel_filters?.thread_ids, [- data.latest_message?.thread_id,- data.latest_non_thread_message?.thread_id,- ])- )- .with(- { tag: 'channelThread' },- ({ data }) =>- !isIdFilteredOut(body.channel_thread_filters?.thread_ids, data.id) &&- !isIdFilteredOut(- body.channel_thread_filters?.channel_ids,- data.channel_id- ) &&- !isValueFilteredOut(- body.channel_thread_filters?.root_sender_ids,- data.sender_id- )- )- .with(- { tag: 'project' },- ({ data }) => !isIdFilteredOut(body.project_filters?.project_ids, data.id)- )- .with(- { tag: 'emailThread' },- ({ data }) =>- !isIdFilteredOut(body.email_filters?.email_thread_ids, data.id)- )- .with(- { tag: 'call' },- ({ data }) =>- !isIdFilteredOut(body.call_filters?.call_ids, data.callId) &&- !isCallAttendanceFilteredOut(- body.call_filters?.status,- body.call_filters?.attended,- data.status,- data.attended- )- )- .with(- { tag: 'crmCompany' },- ({ data }) =>- !isIdFilteredOut(body.crm_company_filters?.company_ids, data.id)- )- .with(- { tag: 'foreignEntity' },- ({ data }) =>- !isIdFilteredOut(body.foreign_entity_filters?.ids, data.id) &&- !isIdFilteredOut(- body.foreign_entity_filters?.foreign_entity_ids,- data.foreignEntityId- ) &&- !isValueFilteredOut(- body.foreign_entity_filters?.foreign_entity_sources,- data.foreignEntitySource- )- )- .exhaustive();+ return (+ match(item)+ .with(+ { tag: 'document' },+ ({ data }) =>+ !isIdFilteredOut(body.document_filters?.document_ids, data.id) &&+ !isValueFilteredOut(body.document_filters?.owners, data.ownerId) &&+ !isValueFilteredOut(+ body.document_filters?.sub_types,+ data.subType?.type+ )+ )+ .with(+ { tag: 'chat' },+ ({ data }) => !isIdFilteredOut(body.chat_filters?.chat_ids, data.id)+ )+ .with(+ { tag: 'channel' },+ ({ data }) =>+ !isIdFilteredOut(+ body.channel_filters?.channel_ids,+ data.channel.id+ ) &&+ !isAnyValueFilteredOut(body.channel_filters?.thread_ids, [+ data.latest_message?.thread_id,+ data.latest_non_thread_message?.thread_id,+ ])+ )+ .with(+ { tag: 'channelThread' },+ ({ data }) =>+ !isIdFilteredOut(body.channel_thread_filters?.thread_ids, data.id) &&+ !isIdFilteredOut(+ body.channel_thread_filters?.channel_ids,+ data.channel_id+ ) &&+ !isValueFilteredOut(+ body.channel_thread_filters?.root_sender_ids,+ data.sender_id+ )+ )+ .with(+ { tag: 'project' },+ ({ data }) =>+ !isIdFilteredOut(body.project_filters?.project_ids, data.id)+ )+ .with(+ { tag: 'emailThread' },+ ({ data }) =>+ !isIdFilteredOut(body.email_filters?.email_thread_ids, data.id)+ )+ .with(+ { tag: 'call' },+ ({ data }) =>+ !isIdFilteredOut(body.call_filters?.call_ids, data.callId) &&+ !isCallAttendanceFilteredOut(+ body.call_filters?.status,+ body.call_filters?.attended,+ data.status,+ data.attended+ )+ )+ .with(+ { tag: 'crmCompany' },+ ({ data }) =>+ !isIdFilteredOut(body.crm_company_filters?.company_ids, data.id)+ )+ .with(+ { tag: 'foreignEntity' },+ ({ data }) =>+ !isIdFilteredOut(body.foreign_entity_filters?.ids, data.id) &&+ !isIdFilteredOut(+ body.foreign_entity_filters?.foreign_entity_ids,+ data.foreignEntityId+ ) &&+ !isValueFilteredOut(+ body.foreign_entity_filters?.foreign_entity_sources,+ data.foreignEntitySource+ )+ )+ // Calendar soup rendering lands with the calendar FE; never cache-match.+ .with({ tag: 'calendarEvent' }, () => false)+ .exhaustive()+ );}/**diff --git a/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx b/apps/web/src/features/next-soup/soup-view/soup-view-context.tsxindex 10fe23dd54..8d3d1ed6e8 100644--- a/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx+++ b/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx@@ -933,6 +933,8 @@ export const SoupViewContextProvider: FlowComponent<const membershipFilter = config().itemMembershipFilter;if (membershipFilter && !membershipFilter(item)) return false;+ if (item.tag === 'calendarEvent') return false;+return soup.predicates.test(mapApiSoupItemToEntity(item) as SoupEntity,getFilterContext()diff --git a/apps/web/src/features/property/editors/selectors/entityUtils.ts b/apps/web/src/features/property/editors/selectors/entityUtils.tsindex c7db627927..4abaf0070e 100644--- a/apps/web/src/features/property/editors/selectors/entityUtils.ts+++ b/apps/web/src/features/property/editors/selectors/entityUtils.ts@@ -31,6 +31,7 @@ export type EntityTypeItemMap = {COMPANY: never;// Call records aren't entity-reference targets in quickAccess.CALL_RECORD: never;+ CALENDAR_EVENT: never;};/**@@ -47,6 +48,7 @@ function entityTypeToBuckets(entityType: EntityType): readonly Bucket[] {.with('THREAD', () => ['email'] as const) // Note: emails aren't in quickAccess yet, handled separately.with('COMPANY', () => [] as const) // Companies aren't in quickAccess.with('CALL_RECORD', () => [] as const) // Call records aren't in quickAccess+ .with('CALENDAR_EVENT', () => [] as const) // Calendar events aren't in quickAccess.exhaustive();return buckets;}diff --git a/apps/web/src/features/property/utils/entityConversion.ts b/apps/web/src/features/property/utils/entityConversion.tsindex 227f6a78c3..ae2554c0d2 100644--- a/apps/web/src/features/property/utils/entityConversion.ts+++ b/apps/web/src/features/property/utils/entityConversion.ts@@ -60,6 +60,7 @@ export function entityTypeToItemType(type: EntityType): ItemType | undefined {.with('COMPANY', () => undefined) // huh.with('USER', () => undefined) // huh.with('THREAD', () => 'email' as ItemType)+ .with('CALENDAR_EVENT', () => undefined) // no calendar item rendering yet.exhaustive();}diff --git a/apps/web/src/lib/queries/notification/user-notifications.ts b/apps/web/src/lib/queries/notification/user-notifications.tsindex f766ebbd0f..0aa382df2e 100644--- a/apps/web/src/lib/queries/notification/user-notifications.ts+++ b/apps/web/src/lib/queries/notification/user-notifications.ts@@ -676,7 +676,8 @@ function notificationEntityTypeToSoupTag('channel_message','static_file','crm_company',- 'crm_contact'+ 'crm_contact',+ 'calendar_event'),() => null)diff --git a/apps/web/src/lib/queries/properties/entity.ts b/apps/web/src/lib/queries/properties/entity.tsindex 784d8f8327..70f07bb7e2 100644--- a/apps/web/src/lib/queries/properties/entity.ts+++ b/apps/web/src/lib/queries/properties/entity.ts@@ -46,7 +46,12 @@ import { propertiesKeys } from './keys';function toPropertyTargetEntityType(entityType: EntityType | PropertyTargetEntityType): PropertyTargetEntityType {- return entityType === 'TASK' ? 'DOCUMENT' : entityType;+ if (entityType === 'TASK') return 'DOCUMENT';+ if (entityType === 'CALENDAR_EVENT') {+ // Not a property target yet; surface a real error instead of a bad request.+ throw new Error('calendar events do not support properties');+ }+ return entityType;}export function useEntityPropertiesQuery(@@ -126,6 +131,7 @@ function optimisticUpdateSoupEntityProperties(current.tag === 'channel' ||current.tag === 'foreignEntity' ||current.tag === 'channelThread' ||+ current.tag === 'calendarEvent' ||!current.data.properties) {return undefined;diff --git a/apps/web/src/lib/queries/soup/normalized-cache/operations.ts b/apps/web/src/lib/queries/soup/normalized-cache/operations.tsindex 62c49b1c04..044eaba226 100644--- a/apps/web/src/lib/queries/soup/normalized-cache/operations.ts+++ b/apps/web/src/lib/queries/soup/normalized-cache/operations.ts@@ -580,6 +580,10 @@ export function buildSingleEntityFilter(...base,channel_thread_filters: { thread_ids: [entityId] },}))+ .with('calendarEvent', () => ({+ ...base,+ calendar_event_filters: { calendar_event_ids: [entityId] },+ })).exhaustive();}diff --git a/apps/web/src/lib/queries/soup/recently-viewed.ts b/apps/web/src/lib/queries/soup/recently-viewed.tsindex 28ea98221f..610b32e617 100644--- a/apps/web/src/lib/queries/soup/recently-viewed.ts+++ b/apps/web/src/lib/queries/soup/recently-viewed.ts@@ -61,7 +61,8 @@ export function useRecentlyViewedSoupQuery() {if (item.tag === 'call' ||item.tag === 'foreignEntity' ||- item.tag === 'channelThread'+ item.tag === 'channelThread' ||+ item.tag === 'calendarEvent') {return [];}diff --git a/apps/web/src/lib/queries/soup/transform-utils.ts b/apps/web/src/lib/queries/soup/transform-utils.tsindex 5abca70712..07df7e111d 100644--- a/apps/web/src/lib/queries/soup/transform-utils.ts+++ b/apps/web/src/lib/queries/soup/transform-utils.ts@@ -56,7 +56,11 @@ type InnerSearchResult =| ProjectSearchResult| CallRecordSearchResult;-type DisplayableSoupItem = SoupPage['items'][number];+// Calendar soup rendering lands with the calendar FE; skip those items for now.+type DisplayableSoupItem = Exclude<+ SoupPage['items'][number],+ { tag: 'calendarEvent' }+>;type SoupDocument = Extract<DisplayableSoupItem, { tag: 'document' }>['data'];type SoupEntity =@@ -594,7 +598,7 @@ const resolveDocumentEntityName = (export const isDisplayableSoupItem = (item: SoupPage['items'][number]-): item is DisplayableSoupItem => Boolean(item);+): item is DisplayableSoupItem => Boolean(item) && item.tag !== 'calendarEvent';/*** The email soup query encodes "no sort timestamp" — e.g. a never-viewed threaddiff --git a/apps/web/src/lib/service-clients/service-cognition/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-cognition/generated/schemas/entityType.tsindex 81f0de8b36..e156e9c797 100644--- a/apps/web/src/lib/service-clients/service-cognition/generated/schemas/entityType.ts+++ b/apps/web/src/lib/service-clients/service-cognition/generated/schemas/entityType.ts@@ -19,6 +19,7 @@ export const EntityType = {document: 'document',project: 'project',email_thread: 'email_thread',+ calendar_event: 'calendar_event',team: 'team',call: 'call',foreign_entity: 'foreign_entity',diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.tsindex de510c7b7e..b70cab7ad0 100644--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts@@ -1174,6 +1174,7 @@ export const ListEntities = z.object({z.array(z.any().superRefine((x, ctx) => {const schemas = [+ z.literal('calendar_event'),z.literal('document'),z.literal('ai_chat'),z.literal('project'),@@ -1292,6 +1293,41 @@ export const ListEntitiesResponse = z.object({items: z.array(z.any().superRefine((x, ctx) => {const schemas = [+ z.object({+ conferenceUrl: z.union([z.string(), z.null()]).optional(),+ id: z.string().uuid(),+ location: z.union([z.string(), z.null()]).optional(),+ status: z.string(),+ tags: z+ .array(+ z.object({+ label: z.string(),+ scope: z.any().superRefine((x, ctx) => {+ const schemas = [z.literal('personal'), z.literal('team')];+ const errors = schemas.reduce<z.ZodError[]>(+ (errors, schema) =>+ ((result) =>+ result.error ? [...errors, result.error] : errors)(+ schema.safeParse(x)+ ),+ []+ );+ if (schemas.length - errors.length !== 1) {+ ctx.addIssue({+ path: ctx.path,+ code: 'invalid_union',+ unionErrors: errors,+ message: 'Invalid input: Should pass single schema',+ });+ }+ }),+ })+ )+ .optional(),+ time: z.any(),+ title: z.string(),+ type: z.literal('calendarEvent'),+ }),z.object({fileType: z.union([z.string(), z.null()]).optional(),id: z.string().uuid(),diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.tsindex 1bbe940b44..f4957d57dd 100644--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts@@ -184,6 +184,39 @@ export type EmailPreset = 'signal';* Item returned by the list entities AI tool.*/export type EntityItem =+ | {+ /**+ * Optional conference join URL.+ */+ conferenceUrl?: string | null;+ /**+ * Calendar event id.+ */+ id: string;+ /**+ * Optional location.+ */+ location?: string | null;+ /**+ * Event status.+ */+ status: string;+ /**+ * Tags on the event visible to the user.+ */+ tags?: AppliedTag[];+ /**+ * Canonical timed or all-day span.+ */+ time: {+ [k: string]: unknown;+ };+ /**+ * Event title.+ */+ title: string;+ type: 'calendarEvent';+ }| {/*** The document's file type (e.g. md, pdf, docx), when known.@@ -338,6 +371,7 @@ export type EntityItem =* Entity types that can be returned by the list entities AI tool.*/export type ItemType =+ | 'calendar_event'| 'document'| 'ai_chat'| 'project'diff --git a/apps/web/src/lib/service-clients/service-cognition/openapi.json b/apps/web/src/lib/service-clients/service-cognition/openapi.jsonindex 06c92375e1..b9e70fac6c 100644--- a/apps/web/src/lib/service-clients/service-cognition/openapi.json+++ b/apps/web/src/lib/service-clients/service-cognition/openapi.json@@ -2620,6 +2620,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",diff --git a/apps/web/src/lib/service-clients/service-connection/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-connection/generated/schemas/entityType.tsindex 17d7a9144e..c944885a4d 100644--- a/apps/web/src/lib/service-clients/service-connection/generated/schemas/entityType.ts+++ b/apps/web/src/lib/service-clients/service-connection/generated/schemas/entityType.ts@@ -19,6 +19,7 @@ export const EntityType = {document: 'document',project: 'project',email_thread: 'email_thread',+ calendar_event: 'calendar_event',team: 'team',call: 'call',foreign_entity: 'foreign_entity',diff --git a/apps/web/src/lib/service-clients/service-connection/openapi.json b/apps/web/src/lib/service-clients/service-connection/openapi.jsonindex f8bd19cdc8..7b8df2626d 100644--- a/apps/web/src/lib/service-clients/service-connection/openapi.json+++ b/apps/web/src/lib/service-clients/service-connection/openapi.json@@ -252,6 +252,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",diff --git a/apps/web/src/lib/service-clients/service-notification/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-notification/generated/schemas/entityType.tsindex c45592dedb..0dcfae3dd0 100644--- a/apps/web/src/lib/service-clients/service-notification/generated/schemas/entityType.ts+++ b/apps/web/src/lib/service-clients/service-notification/generated/schemas/entityType.ts@@ -19,6 +19,7 @@ export const EntityType = {document: 'document',project: 'project',email_thread: 'email_thread',+ calendar_event: 'calendar_event',team: 'team',call: 'call',foreign_entity: 'foreign_entity',diff --git a/apps/web/src/lib/service-clients/service-notification/generated/zod.ts b/apps/web/src/lib/service-clients/service-notification/generated/zod.tsindex 41d58d2fcc..560e260184 100644--- a/apps/web/src/lib/service-clients/service-notification/generated/zod.ts+++ b/apps/web/src/lib/service-clients/service-notification/generated/zod.ts@@ -135,6 +135,7 @@ export const listTypedNotificationsResponse = zod'document','project','email_thread',+ 'calendar_event','team','call','foreign_entity',@@ -1396,6 +1397,7 @@ export const bulkGetTypedNotificationsByEventItemIdsResponse = zod'document','project','email_thread',+ 'calendar_event','team','call','foreign_entity',@@ -2651,6 +2653,7 @@ export const getTypedNotificationsByEventItemIdResponse = zod'document','project','email_thread',+ 'calendar_event','team','call','foreign_entity',@@ -3917,6 +3920,7 @@ export const getTypedNotificationByIdResponse = zod'document','project','email_thread',+ 'calendar_event','team','call','foreign_entity',diff --git a/apps/web/src/lib/service-clients/service-notification/openapi.json b/apps/web/src/lib/service-clients/service-notification/openapi.jsonindex 6f24ed0fb1..36e1e5b54e 100644--- a/apps/web/src/lib/service-clients/service-notification/openapi.json+++ b/apps/web/src/lib/service-clients/service-notification/openapi.json@@ -1498,6 +1498,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",diff --git a/apps/web/src/lib/service-clients/service-properties/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-properties/generated/schemas/entityType.tsindex 1451a0e434..8e55b4079f 100644--- a/apps/web/src/lib/service-clients/service-properties/generated/schemas/entityType.ts+++ b/apps/web/src/lib/service-clients/service-properties/generated/schemas/entityType.ts@@ -12,6 +12,7 @@ export type EntityType = (typeof EntityType)[keyof typeof EntityType];// eslint-disable-next-line @typescript-eslint/no-redeclareexport const EntityType = {+ CALENDAR_EVENT: 'CALENDAR_EVENT',CALL_RECORD: 'CALL_RECORD',CHANNEL: 'CHANNEL',CHAT: 'CHAT',diff --git a/apps/web/src/lib/service-clients/service-properties/generated/zod.ts b/apps/web/src/lib/service-clients/service-properties/generated/zod.tsindex 43513aa713..8702c3bf66 100644--- a/apps/web/src/lib/service-clients/service-properties/generated/zod.ts+++ b/apps/web/src/lib/service-clients/service-properties/generated/zod.ts@@ -19,6 +19,7 @@ export const listPropertiesQueryParams = zod.object({.describe('Whether to include property options in the response'),for_entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -94,6 +95,7 @@ export const listPropertiesResponseItem = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -173,6 +175,7 @@ export const listPropertiesResponseItem = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -298,6 +301,7 @@ export const createPropertyDefinitionBody = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -401,6 +405,7 @@ export const getPropertyDefinitionResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -689,6 +694,7 @@ export const getBulkEntityPropertiesResponse = zod.record(zod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -755,6 +761,7 @@ export const getBulkEntityPropertiesResponse = zod.record(entity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -850,6 +857,7 @@ export const getBulkEntityPropertiesResponse = zod.record(entity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -999,6 +1007,7 @@ export const getEntityPropertiesResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -1065,6 +1074,7 @@ export const getEntityPropertiesResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -1160,6 +1170,7 @@ export const getEntityPropertiesResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -1367,6 +1378,7 @@ export const setEntityPropertyBody = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -1401,6 +1413,7 @@ export const setEntityPropertyBody = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -1684,6 +1697,7 @@ export const listTagsResponseItem = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -1824,6 +1838,7 @@ export const ensureTagSetResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',diff --git a/apps/web/src/lib/service-clients/service-properties/openapi.json b/apps/web/src/lib/service-clients/service-properties/openapi.jsonindex 07d438e0e3..7abced117d 100644--- a/apps/web/src/lib/service-clients/service-properties/openapi.json+++ b/apps/web/src/lib/service-clients/service-properties/openapi.json@@ -1324,6 +1324,7 @@"type": "string","description": "Type of entity that can be referenced by entity properties.","enum": [+ "CALENDAR_EVENT","CALL_RECORD","CHANNEL","CHAT",diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/calendarEventFilters.ts b/apps/web/src/lib/service-clients/service-search/generated/models/calendarEventFilters.tsnew file mode 100644index 0000000000..746ad8fee8--- /dev/null+++ b/apps/web/src/lib/service-clients/service-search/generated/models/calendarEventFilters.ts@@ -0,0 +1,26 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * search_service+ * OpenAPI spec version: 0.1.0+ */+import type { CalendarEventFiltersEndsAfter } from './calendarEventFiltersEndsAfter';+import type { CalendarEventFiltersStartsBefore } from './calendarEventFiltersStartsBefore';++/**+ * Filters for canonical calendar-event entities.+ */+export interface CalendarEventFilters {+ /** Attendee email addresses. */+ attendees?: string[];+ /** Canonical event ids. */+ calendar_event_ids?: string[];+ /** Include master events ending after this instant. */+ ends_after?: CalendarEventFiltersEndsAfter;+ /** Organizer email addresses. */+ organizers?: string[];+ /** Include master events starting before this instant. */+ starts_before?: CalendarEventFiltersStartsBefore;+ /** Event statuses such as `confirmed`, `tentative`, or `cancelled`. */+ statuses?: string[];+}diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/calendarEventFiltersEndsAfter.ts b/apps/web/src/lib/service-clients/service-search/generated/models/calendarEventFiltersEndsAfter.tsnew file mode 100644index 0000000000..af21e69493--- /dev/null+++ b/apps/web/src/lib/service-clients/service-search/generated/models/calendarEventFiltersEndsAfter.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * search_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Include master events ending after this instant.+ */+export type CalendarEventFiltersEndsAfter = string | null;diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/calendarEventFiltersStartsBefore.ts b/apps/web/src/lib/service-clients/service-search/generated/models/calendarEventFiltersStartsBefore.tsnew file mode 100644index 0000000000..4a385d0532--- /dev/null+++ b/apps/web/src/lib/service-clients/service-search/generated/models/calendarEventFiltersStartsBefore.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * search_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Include master events starting before this instant.+ */+export type CalendarEventFiltersStartsBefore = string | null;diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts b/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.tsindex 77c4f75ff4..17e70b403b 100644--- a/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts+++ b/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts@@ -4,6 +4,7 @@* search_service* OpenAPI spec version: 0.1.0*/+import type { CalendarEventFilters } from './calendarEventFilters';import type { CallFilters } from './callFilters';import type { ChannelFilters } from './channelFilters';import type { ChannelThreadFilters } from './channelThreadFilters';@@ -20,6 +21,8 @@ import type { TagFilterMode } from './tagFilterMode';* a bundle of all of the filters for each entity type*/export interface EntityFilters {+ /** the bundled [CalendarEventFilters] */+ calendar_event_filters?: CalendarEventFilters;/** the bundled [CallFilters] */call_filters?: CallFilters;/** the bundled [ChannelFilters] */diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/entityType.ts b/apps/web/src/lib/service-clients/service-search/generated/models/entityType.tsindex f07d552b58..1e2d16f6b5 100644--- a/apps/web/src/lib/service-clients/service-search/generated/models/entityType.ts+++ b/apps/web/src/lib/service-clients/service-search/generated/models/entityType.ts@@ -12,6 +12,7 @@ export type EntityType = (typeof EntityType)[keyof typeof EntityType];// eslint-disable-next-line @typescript-eslint/no-redeclareexport const EntityType = {+ CALENDAR_EVENT: 'CALENDAR_EVENT',CALL_RECORD: 'CALL_RECORD',CHANNEL: 'CHANNEL',CHAT: 'CHAT',diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/index.ts b/apps/web/src/lib/service-clients/service-search/generated/models/index.tsindex ebbece3287..a9f09c6ea6 100644--- a/apps/web/src/lib/service-clients/service-search/generated/models/index.ts+++ b/apps/web/src/lib/service-clients/service-search/generated/models/index.ts@@ -5,6 +5,9 @@* OpenAPI spec version: 0.1.0*/+export * from './calendarEventFilters';+export * from './calendarEventFiltersEndsAfter';+export * from './calendarEventFiltersStartsBefore';export * from './callFilters';export * from './callFiltersAttended';export * from './callFiltersStatus';diff --git a/apps/web/src/lib/service-clients/service-search/openapi.json b/apps/web/src/lib/service-clients/service-search/openapi.jsonindex 8fd5341d4c..e0f68ed39f 100644--- a/apps/web/src/lib/service-clients/service-search/openapi.json+++ b/apps/web/src/lib/service-clients/service-search/openapi.json@@ -173,6 +173,50 @@},"components": {"schemas": {+ "CalendarEventFilters": {+ "type": "object",+ "description": "Filters for canonical calendar-event entities.",+ "properties": {+ "attendees": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Attendee email addresses."+ },+ "calendar_event_ids": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Canonical event ids."+ },+ "ends_after": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "Include master events ending after this instant."+ },+ "organizers": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Organizer email addresses."+ },+ "starts_before": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "Include master events starting before this instant."+ },+ "statuses": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Event statuses such as `confirmed`, `tentative`, or `cancelled`."+ }+ }+ },"CallFilters": {"type": "object","description": "Filters for call records.",@@ -1742,6 +1786,10 @@"type": "object","description": "a bundle of all of the filters for each entity type","properties": {+ "calendar_event_filters": {+ "$ref": "#/components/schemas/CalendarEventFilters",+ "description": "the bundled [CalendarEventFilters]"+ },"call_filters": {"$ref": "#/components/schemas/CallFilters","description": "the bundled [CallFilters]"@@ -1820,6 +1868,7 @@"type": "string","description": "Type of entity that can be referenced by entity properties.","enum": [+ "CALENDAR_EVENT","CALL_RECORD","CHANNEL","CHAT",diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/addFavoriteRequestEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/addFavoriteRequestEntityType.tsindex 8b1331a32d..36a396abf5 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/addFavoriteRequestEntityType.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/addFavoriteRequestEntityType.ts@@ -16,6 +16,7 @@ export type AddFavoriteRequestEntityType =| 'document'| 'project'| 'email_thread'+ | 'calendar_event'| 'team'| 'call'| 'foreign_entity'diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAst.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAst.tsindex 4c54302182..f2b63dcfd9 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAst.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAst.ts@@ -9,6 +9,8 @@* Wire-format entity filter AST accepted by soup AST endpoints.*/export interface ApiEntityFilterAst {+ /** filters applied to canonical calendar events */+ calf?: unknown;/** the filters that should be applied to the call entity */callf?: unknown;/** Filters applied to the crm_company entity (wire key `ccf`).diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/calendarEventFilters.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/calendarEventFilters.tsnew file mode 100644index 0000000000..884c4811d9--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/calendarEventFilters.ts@@ -0,0 +1,26 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { CalendarEventFiltersEndsAfter } from './calendarEventFiltersEndsAfter';+import type { CalendarEventFiltersStartsBefore } from './calendarEventFiltersStartsBefore';++/**+ * Filters for canonical calendar-event entities.+ */+export interface CalendarEventFilters {+ /** Attendee email addresses. */+ attendees?: string[];+ /** Canonical event ids. */+ calendar_event_ids?: string[];+ /** Include master events ending after this instant. */+ ends_after?: CalendarEventFiltersEndsAfter;+ /** Organizer email addresses. */+ organizers?: string[];+ /** Include master events starting before this instant. */+ starts_before?: CalendarEventFiltersStartsBefore;+ /** Event statuses such as `confirmed`, `tentative`, or `cancelled`. */+ statuses?: string[];+}diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/calendarEventFiltersEndsAfter.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/calendarEventFiltersEndsAfter.tsnew file mode 100644index 0000000000..8cf12f0b62--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/calendarEventFiltersEndsAfter.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Include master events ending after this instant.+ */+export type CalendarEventFiltersEndsAfter = string | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/calendarEventFiltersStartsBefore.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/calendarEventFiltersStartsBefore.tsnew file mode 100644index 0000000000..df3c51180a--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/calendarEventFiltersStartsBefore.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Include master events starting before this instant.+ */+export type CalendarEventFiltersStartsBefore = string | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.tsindex ec9032c835..4824371fc1 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts@@ -4,6 +4,7 @@* document_storage_service* OpenAPI spec version: 0.1.0*/+import type { CalendarEventFilters } from './calendarEventFilters';import type { CallFilters } from './callFilters';import type { ChannelFilters } from './channelFilters';import type { ChannelThreadFilters } from './channelThreadFilters';@@ -20,6 +21,8 @@ import type { TagFilterMode } from './tagFilterMode';* a bundle of all of the filters for each entity type*/export interface EntityFilters {+ /** the bundled [CalendarEventFilters] */+ calendar_event_filters?: CalendarEventFilters;/** the bundled [CallFilters] */call_filters?: CallFilters;/** the bundled [ChannelFilters] */diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityType.tsindex 696c62ba68..12c2c38349 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityType.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityType.ts@@ -12,6 +12,7 @@ export type EntityType = (typeof EntityType)[keyof typeof EntityType];// eslint-disable-next-line @typescript-eslint/no-redeclareexport const EntityType = {+ CALENDAR_EVENT: 'CALENDAR_EVENT',CALL_RECORD: 'CALL_RECORD',CHANNEL: 'CHANNEL',CHAT: 'CHAT',diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityRefEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityRefEntityType.tsindex 168e934f19..70436fcc0a 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityRefEntityType.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityRefEntityType.ts@@ -16,6 +16,7 @@ export type FavoriteEntityRefEntityType =| 'document'| 'project'| 'email_thread'+ | 'calendar_event'| 'team'| 'call'| 'foreign_entity'diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityType.tsindex c02044c12f..4753472e0d 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityType.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityType.ts@@ -16,6 +16,7 @@ export type FavoriteEntityType =| 'document'| 'project'| 'email_thread'+ | 'calendar_event'| 'team'| 'call'| 'foreign_entity'diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.tsindex efe6cd7385..aa90fb479d 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts@@ -168,6 +168,9 @@ export * from './calendarAttendeeDisplayName';export * from './calendarEvent';export * from './calendarEventConferenceUrl';export * from './calendarEventDescription';+export * from './calendarEventFilters';+export * from './calendarEventFiltersEndsAfter';+export * from './calendarEventFiltersStartsBefore';export * from './calendarEventLocation';export * from './calendarEventOrganizerEmail';export * from './calendarEventOrganizerName';@@ -924,6 +927,19 @@ export * from './soupAttachmentFilename';export * from './soupAttachmentMimeType';export * from './soupAttachmentProviderAttachmentId';export * from './soupAttachmentSizeBytes';+export * from './soupCalendarEventSoupPropertiesField';+export * from './soupCalendarEventSoupPropertiesFieldConferenceUrl';+export * from './soupCalendarEventSoupPropertiesFieldDescription';+export * from './soupCalendarEventSoupPropertiesFieldExtra';+export * from './soupCalendarEventSoupPropertiesFieldLocation';+export * from './soupCalendarEventSoupPropertiesFieldOrganizerEmail';+export * from './soupCalendarEventSoupPropertiesFieldOrganizerName';+export * from './soupCalendarEventTime';+export * from './soupCalendarEventTimeOneOf';+export * from './soupCalendarEventTimeOneOfFour';+export * from './soupCalendarEventTimeOneOfFourKind';+export * from './soupCalendarEventTimeOneOfKind';+export * from './soupCalendarEventTimeOneOfTimeZone';export * from './soupCallRecordParticipant';export * from './soupCallRecordParticipantLeftAt';export * from './soupCallRecordSoupPropertiesField';@@ -998,6 +1014,8 @@ export * from './soupItemOneOfNine';export * from './soupItemOneOfNineTag';export * from './soupItemOneOfOnefive';export * from './soupItemOneOfOnefiveTag';+export * from './soupItemOneOfOnenine';+export * from './soupItemOneOfOnenineTag';export * from './soupItemOneOfOneone';export * from './soupItemOneOfOneoneTag';export * from './soupItemOneOfOneseven';diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesField.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesField.tsnew file mode 100644index 0000000000..837234554c--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesField.ts@@ -0,0 +1,53 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { SoupCalendarEventSoupPropertiesFieldConferenceUrl } from './soupCalendarEventSoupPropertiesFieldConferenceUrl';+import type { SoupCalendarEventSoupPropertiesFieldDescription } from './soupCalendarEventSoupPropertiesFieldDescription';+import type { SoupCalendarEventSoupPropertiesFieldExtra } from './soupCalendarEventSoupPropertiesFieldExtra';+import type { SoupCalendarEventSoupPropertiesFieldLocation } from './soupCalendarEventSoupPropertiesFieldLocation';+import type { SoupCalendarEventSoupPropertiesFieldOrganizerEmail } from './soupCalendarEventSoupPropertiesFieldOrganizerEmail';+import type { SoupCalendarEventSoupPropertiesFieldOrganizerName } from './soupCalendarEventSoupPropertiesFieldOrganizerName';+import type { SoupCalendarEventTime } from './soupCalendarEventTime';++/**+ * A canonical calendar event entity in Soup.+ */+export interface SoupCalendarEventSoupPropertiesField {+ /** Direct conference join URL. */+ conferenceUrl?: SoupCalendarEventSoupPropertiesFieldConferenceUrl;+ /** Entity creation timestamp. */+ createdAt: string;+ /** Optional description. */+ description?: SoupCalendarEventSoupPropertiesFieldDescription;+ /** Property fields that can be flattened into property-bearing Soup items. */+ extra: SoupCalendarEventSoupPropertiesFieldExtra;+ /** RFC 5545 UID used for source reconciliation. */+ icalUid: string;+ /** Entity identifier. */+ id: string;+ /** Whether the selected canonical source is read-only. */+ isReadOnly: boolean;+ /** Optional location label. */+ location?: SoupCalendarEventSoupPropertiesFieldLocation;+ /** Organizer email. */+ organizerEmail?: SoupCalendarEventSoupPropertiesFieldOrganizerEmail;+ /** Organizer display name. */+ organizerName?: SoupCalendarEventSoupPropertiesFieldOrganizerName;+ /** Owning Macro user. */+ ownerId: string;+ /** Canonical status. */+ status: string;+ /** Canonical master time. */+ time: SoupCalendarEventTime;+ /** Display title. */+ title: string;+ /** Availability transparency. */+ transparency: string;+ /** Entity update timestamp. */+ updatedAt: string;+ /** Canonical visibility. */+ visibility: string;+}diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldConferenceUrl.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldConferenceUrl.tsnew file mode 100644index 0000000000..66e18a449b--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldConferenceUrl.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Direct conference join URL.+ */+export type SoupCalendarEventSoupPropertiesFieldConferenceUrl = string | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldDescription.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldDescription.tsnew file mode 100644index 0000000000..0f216b7263--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldDescription.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional description.+ */+export type SoupCalendarEventSoupPropertiesFieldDescription = string | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldExtra.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldExtra.tsnew file mode 100644index 0000000000..71088031a9--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldExtra.ts@@ -0,0 +1,15 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { SoupProperty } from './soupProperty';++/**+ * Property fields that can be flattened into property-bearing Soup items.+ */+export type SoupCalendarEventSoupPropertiesFieldExtra = {+ /** Properties attached to the entity. */+ properties: SoupProperty[];+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldLocation.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldLocation.tsnew file mode 100644index 0000000000..0be9071db0--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldLocation.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Optional location label.+ */+export type SoupCalendarEventSoupPropertiesFieldLocation = string | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldOrganizerEmail.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldOrganizerEmail.tsnew file mode 100644index 0000000000..0f40bf7f0e--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldOrganizerEmail.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Organizer email.+ */+export type SoupCalendarEventSoupPropertiesFieldOrganizerEmail = string | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldOrganizerName.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldOrganizerName.tsnew file mode 100644index 0000000000..14aa229838--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventSoupPropertiesFieldOrganizerName.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Organizer display name.+ */+export type SoupCalendarEventSoupPropertiesFieldOrganizerName = string | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTime.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTime.tsnew file mode 100644index 0000000000..ab4585bf0b--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTime.ts@@ -0,0 +1,15 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { SoupCalendarEventTimeOneOf } from './soupCalendarEventTimeOneOf';+import type { SoupCalendarEventTimeOneOfFour } from './soupCalendarEventTimeOneOfFour';++/**+ * Timed or all-day calendar event span.+ */+export type SoupCalendarEventTime =+ | SoupCalendarEventTimeOneOf+ | SoupCalendarEventTimeOneOfFour;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOf.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOf.tsnew file mode 100644index 0000000000..bd525c0d31--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOf.ts@@ -0,0 +1,21 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { SoupCalendarEventTimeOneOfKind } from './soupCalendarEventTimeOneOfKind';+import type { SoupCalendarEventTimeOneOfTimeZone } from './soupCalendarEventTimeOneOfTimeZone';++/**+ * Absolute timed event.+ */+export type SoupCalendarEventTimeOneOf = {+ /** Exclusive end. */+ ends_at: string;+ kind: SoupCalendarEventTimeOneOfKind;+ /** Inclusive start. */+ starts_at: string;+ /** Original IANA time zone. */+ time_zone?: SoupCalendarEventTimeOneOfTimeZone;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfFour.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfFour.tsnew file mode 100644index 0000000000..cdd0770553--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfFour.ts@@ -0,0 +1,18 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { SoupCalendarEventTimeOneOfFourKind } from './soupCalendarEventTimeOneOfFourKind';++/**+ * All-day event with an exclusive end date.+ */+export type SoupCalendarEventTimeOneOfFour = {+ /** Exclusive end date. */+ end_date: string;+ kind: SoupCalendarEventTimeOneOfFourKind;+ /** Inclusive start date. */+ start_date: string;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfFourKind.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfFourKind.tsnew file mode 100644index 0000000000..726e561b21--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfFourKind.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type SoupCalendarEventTimeOneOfFourKind =+ (typeof SoupCalendarEventTimeOneOfFourKind)[keyof typeof SoupCalendarEventTimeOneOfFourKind];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const SoupCalendarEventTimeOneOfFourKind = {+ allDay: 'allDay',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfKind.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfKind.tsnew file mode 100644index 0000000000..c938e4f75b--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfKind.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type SoupCalendarEventTimeOneOfKind =+ (typeof SoupCalendarEventTimeOneOfKind)[keyof typeof SoupCalendarEventTimeOneOfKind];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const SoupCalendarEventTimeOneOfKind = {+ timed: 'timed',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfTimeZone.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfTimeZone.tsnew file mode 100644index 0000000000..777a6ef5ec--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupCalendarEventTimeOneOfTimeZone.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Original IANA time zone.+ */+export type SoupCalendarEventTimeOneOfTimeZone = string | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItem.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItem.tsindex 71397d6c0c..4cc7075ad7 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItem.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItem.ts@@ -8,6 +8,7 @@ import type { SoupItemOneOf } from './soupItemOneOf';import type { SoupItemOneOfFive } from './soupItemOneOfFive';import type { SoupItemOneOfNine } from './soupItemOneOfNine';import type { SoupItemOneOfOnefive } from './soupItemOneOfOnefive';+import type { SoupItemOneOfOnenine } from './soupItemOneOfOnenine';import type { SoupItemOneOfOneone } from './soupItemOneOfOneone';import type { SoupItemOneOfOneseven } from './soupItemOneOfOneseven';import type { SoupItemOneOfOnethree } from './soupItemOneOfOnethree';@@ -26,4 +27,5 @@ export type SoupItem =| SoupItemOneOfOneone| SoupItemOneOfOnethree| SoupItemOneOfOnefive- | SoupItemOneOfOneseven;+ | SoupItemOneOfOneseven+ | SoupItemOneOfOnenine;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefive.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefive.tsindex 8cdfb61dbb..bd9aee904b 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefive.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefive.ts@@ -4,14 +4,14 @@* document_storage_service* OpenAPI spec version: 0.1.0*/-import type { SoupCrmCompanySoupPropertiesField } from './soupCrmCompanySoupPropertiesField';+import type { SoupCalendarEventSoupPropertiesField } from './soupCalendarEventSoupPropertiesField';import type { SoupItemOneOfOnefiveTag } from './soupItemOneOfOnefiveTag';/**- * CRM company item.+ * Calendar event item.*/export type SoupItemOneOfOnefive = {- /** CRM company item. */- data: SoupCrmCompanySoupPropertiesField;+ /** Calendar event item. */+ data: SoupCalendarEventSoupPropertiesField;tag: SoupItemOneOfOnefiveTag;};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefiveTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefiveTag.tsindex 2e329d4d25..1df62df4ee 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefiveTag.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefiveTag.ts@@ -10,5 +10,5 @@ export type SoupItemOneOfOnefiveTag =// eslint-disable-next-line @typescript-eslint/no-redeclareexport const SoupItemOneOfOnefiveTag = {- crmCompany: 'crmCompany',+ calendarEvent: 'calendarEvent',} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenine.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenine.tsnew file mode 100644index 0000000000..cde403523b--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenine.ts@@ -0,0 +1,17 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */+import type { SoupForeignEntity } from './soupForeignEntity';+import type { SoupItemOneOfOnenineTag } from './soupItemOneOfOnenineTag';++/**+ * Foreign entity item.+ */+export type SoupItemOneOfOnenine = {+ /** Foreign entity item. */+ data: SoupForeignEntity;+ tag: SoupItemOneOfOnenineTag;+};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenineTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenineTag.tsnew file mode 100644index 0000000000..f9c5bc5fc1--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenineTag.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type SoupItemOneOfOnenineTag =+ (typeof SoupItemOneOfOnenineTag)[keyof typeof SoupItemOneOfOnenineTag];++// eslint-disable-next-line @typescript-eslint/no-redeclare+export const SoupItemOneOfOnenineTag = {+ foreignEntity: 'foreignEntity',+} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneseven.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneseven.tsindex 2e998a61c9..629b58406b 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneseven.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneseven.ts@@ -4,14 +4,14 @@* document_storage_service* OpenAPI spec version: 0.1.0*/-import type { SoupForeignEntity } from './soupForeignEntity';+import type { SoupCrmCompanySoupPropertiesField } from './soupCrmCompanySoupPropertiesField';import type { SoupItemOneOfOnesevenTag } from './soupItemOneOfOnesevenTag';/**- * Foreign entity item.+ * CRM company item.*/export type SoupItemOneOfOneseven = {- /** Foreign entity item. */- data: SoupForeignEntity;+ /** CRM company item. */+ data: SoupCrmCompanySoupPropertiesField;tag: SoupItemOneOfOnesevenTag;};diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnesevenTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnesevenTag.tsindex 7685c77112..0ee1078e03 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnesevenTag.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnesevenTag.ts@@ -10,5 +10,5 @@ export type SoupItemOneOfOnesevenTag =// eslint-disable-next-line @typescript-eslint/no-redeclareexport const SoupItemOneOfOnesevenTag = {- foreignEntity: 'foreignEntity',+ crmCompany: 'crmCompany',} as const;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts b/apps/web/src/lib/service-clients/service-storage/generated/zod.tsindex 5ac5987b2d..b027205f91 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts@@ -4796,6 +4796,7 @@ export const createTaskHandlerBody = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -4830,6 +4831,7 @@ export const createTaskHandlerBody = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -7280,6 +7282,7 @@ export const listFavoritesResponse = zod'document','project','email_thread',+ 'calendar_event','team','call','foreign_entity',@@ -7322,6 +7325,7 @@ export const addFavoriteBody = zod'document','project','email_thread',+ 'calendar_event','team','call','foreign_entity',@@ -7365,6 +7369,7 @@ export const addFavoriteResponse = zod'document','project','email_thread',+ 'calendar_event','team','call','foreign_entity',@@ -7405,6 +7410,7 @@ export const reorderFavoritesBody = zod'document','project','email_thread',+ 'calendar_event','team','call','foreign_entity',@@ -7438,6 +7444,7 @@ export const removeFavoriteByEntityParams = zod.object({'document','project','email_thread',+ 'calendar_event','team','call','foreign_entity',@@ -7781,6 +7788,7 @@ export const getItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -7881,6 +7889,7 @@ export const getItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -8107,6 +8116,7 @@ export const getItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -8207,6 +8217,7 @@ export const getItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -8367,6 +8378,7 @@ export const getItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -8467,6 +8479,7 @@ export const getItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -8685,6 +8698,7 @@ export const getItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -8785,6 +8799,7 @@ export const getItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -9383,6 +9398,7 @@ export const getItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -9483,6 +9499,7 @@ export const getItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -9625,349 +9642,660 @@ export const getItemsSoupResponse = zod.object({data: zod.object({- properties: zod- .array(- zod- .object({- definition: zod+ conferenceUrl: zod+ .string()+ .nullish()+ .describe('Direct conference join URL.'),+ createdAt: zod.iso+ .datetime({})+ .describe('Entity creation timestamp.'),+ description: zod+ .string()+ .nullish()+ .describe('Optional description.'),+ extra: zod+ .object({+ properties: zod+ .array(+ zod.object({- created_at: zod.iso.datetime({}),- data_type: zod- .enum([- 'BOOLEAN',- 'DATE',- 'NUMBER',- 'STRING',- 'SELECT_NUMBER',- 'SELECT_STRING',- 'TAG',- 'ENTITY',- 'LINK',- ])- .describe(- 'Data type for property values, determining storage and validation.'- ),- display_name: zod.string(),- id: zod.uuid(),- is_metadata: zod- .boolean()- .describe(- 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'- ),- is_multi_select: zod.boolean(),- is_system: zod- .boolean()- .describe(- 'Flag to indicate if this is a system property (stored in DB).'- ),- owner: zod- .union([- zod- .object({- scope: zod.enum(['user']),- user_id: zod.string(),- })- .describe('User-scoped property.'),- zod- .object({- scope: zod.enum(['team']),- team_id: zod.uuid(),- })- .describe('Team-scoped property.'),- zod- .object({- scope: zod.enum(['system']),- })+ definition: zod+ .object({+ created_at: zod.iso.datetime({}),+ data_type: zod+ .enum([+ 'BOOLEAN',+ 'DATE',+ 'NUMBER',+ 'STRING',+ 'SELECT_NUMBER',+ 'SELECT_STRING',+ 'TAG',+ 'ENTITY',+ 'LINK',+ ]).describe(- 'System-owned property (no user or team owner).'+ 'Data type for property values, determining storage and validation.'),- ])- .describe(- 'Defines who owns a property - user-scoped, team-scoped, or system.'- ),- specific_entity_type: zod- .union([- zod.null(),- zod- .enum([- 'CALL_RECORD',- 'CHANNEL',- 'CHAT',- 'COMPANY',- 'DOCUMENT',- 'PROJECT',- 'TASK',- 'THREAD',- 'USER',+ display_name: zod.string(),+ id: zod.uuid(),+ is_metadata: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'+ ),+ is_multi_select: zod.boolean(),+ is_system: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system property (stored in DB).'+ ),+ owner: zod+ .union([+ zod+ .object({+ scope: zod.enum(['user']),+ user_id: zod.string(),+ })+ .describe('User-scoped property.'),+ zod+ .object({+ scope: zod.enum(['team']),+ team_id: zod.uuid(),+ })+ .describe('Team-scoped property.'),+ zod+ .object({+ scope: zod.enum(['system']),+ })+ .describe(+ 'System-owned property (no user or team owner).'+ ),]).describe(- 'Type of entity that can be referenced by entity properties.'+ 'Defines who owns a property - user-scoped, team-scoped, or system.'),- ])- .optional(),- updated_at: zod.iso.datetime({}),- })- .describe(- 'Property definition model (service representation).'- ),- id: zod- .uuid()- .describe(- 'Globally unique id of the assignment attaching this property to an entity.'- ),- value: zod- .union([- zod.null(),- zod+ specific_entity_type: zod+ .union([+ zod.null(),+ zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ ])+ .optional(),+ updated_at: zod.iso.datetime({}),+ })+ .describe(+ 'Property definition model (service representation).'+ ),+ id: zod+ .uuid()+ .describe(+ 'Globally unique id of the assignment attaching this property to an entity.'+ ),+ value: zod.union([+ zod.null(),zod- .object({- type: zod.enum(['Boolean']),- value: zod- .boolean()+ .union([+ zod+ .object({+ type: zod.enum(['Boolean']),+ value: zod+ .boolean()+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ }).describe('Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'),- })- .describe(- 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'- ),- zod- .object({- type: zod.enum(['Number']),- value: zod- .number()+ zod+ .object({+ type: zod.enum(['Number']),+ value: zod+ .number()+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ }).describe('Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'),- })- .describe(- 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'- ),- zod- .object({- type: zod.enum(['String']),- value: zod- .string()+ zod+ .object({+ type: zod.enum(['String']),+ value: zod+ .string()+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ }).describe('String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'),- })- .describe(- 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'- ),- zod- .object({- type: zod.enum(['Date']),- value: zod.iso- .datetime({})+ zod+ .object({+ type: zod.enum(['Date']),+ value: zod.iso+ .datetime({})+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ }).describe('Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'),- })- .describe(- 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'- ),- zod- .object({- type: zod.enum(['SelectOption']),- value: zod- .array(zod.uuid())+ zod+ .object({+ type: zod.enum(['SelectOption']),+ value: zod+ .array(zod.uuid())+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ }).describe('Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'),- })- .describe(- 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'- ),- zod- .object({- type: zod.enum(['EntityReference']),- value: zod- .array(- zod- .object({- entity_id: zod.string(),- entity_type: zod- .enum([- 'CALL_RECORD',- 'CHANNEL',- 'CHAT',- 'COMPANY',- 'DOCUMENT',- 'PROJECT',- 'TASK',- 'THREAD',- 'USER',- ])- .describe(- 'Type of entity that can be referenced by entity properties.'- ),- specific_message_id: zod- .uuid()- .nullish()+ zod+ .object({+ type: zod.enum(['EntityReference']),+ value: zod+ .array(+ zod+ .object({+ entity_id: zod.string(),+ entity_type: zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ specific_message_id: zod+ .uuid()+ .nullish()+ .describe(+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'+ ),+ }).describe(- 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'- ),- })- .describe(- 'Entity reference for entity-type property values.'+ 'Entity reference for entity-type property values.'+ ))- )+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ }).describe('Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'),- })- .describe(- 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'- ),- zod- .object({- type: zod.enum(['Link']),- value: zod- .array(zod.string())+ zod+ .object({+ type: zod.enum(['Link']),+ value: zod+ .array(zod.string())+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ }).describe('Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'),- })+ ]).describe(- 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'),])- .describe(- 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'- ),- ])- .optional(),- })- .describe(- 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'+ .optional(),+ })+ .describe(+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'+ ))- )- .describe('Properties attached to the entity.'),- })- .describe(- 'Property fields that can be flattened into property-bearing Soup items.'- )- .and(- zod.object({- createdAt: zod.iso- .datetime({})- .describe('When the company was created.'),- description: zod- .string()- .nullish()- .describe(- "Display description from the primary domain's directory entry."- ),- domains: zod- .array(- zod- .object({- companyId: zod- .uuid()- .describe(- 'The id of the company the domain belongs to.'- ),- createdAt: zod.iso- .datetime({})- .describe('When the domain record was created.'),- domain: zod- .string()- .describe(- 'The domain (lowercased, e.g. \"acme.com\").'- ),- id: zod- .uuid()- .describe('The id of the domain record.'),- })- .describe(- "A CRM domain as displayed in Soup. Mirrors the crm crate's\n[`CrmDomain`] with a stable wire shape that the FE can rely on."- )- )- .describe(- 'Domains associated with this company, ordered by creation time\nascending (primary first).'- ),- emailSync: zod- .boolean()- .describe(- 'Whether email sync is enabled for this company.'- ),- hidden: zod- .boolean()- .describe(- 'Whether the company is hidden from CRM listings. Soup filters\nthese out by default.'- ),- id: zod.uuid().describe('The id of the company.'),- name: zod- .string()- .nullish()- .describe(- "Display name from the primary domain's directory entry, or\n`None` when unresolved."- ),- teamId: zod- .uuid()- .describe(- 'The id of the team that owns this company record.'- ),- updatedAt: zod.iso- .datetime({})- .describe('When the company was last updated.'),- viewedAt: zod.iso- .datetime({})- .nullish()- .describe(- 'When the requesting user last viewed this company, or `None` if\nnever viewed. Mirrors the `viewed_at` other soup entities carry.'- ),- })- )- .describe(- 'A CRM company as displayed in Soup. Carries the core company\nfields plus display metadata resolved from `crm_domain_directory`\nagainst the primary (earliest-created) domain.'- ),- tag: zod.enum(['crmCompany']),- })- .describe('CRM company item.'),- zod- .object({- data: zod- .object({- createdAt: zod.iso- .datetime({})- .describe('Timestamp when the record was created.'),- foreignEntityId: zod- .string()- .describe('Identifier assigned by the external system.'),- foreignEntitySource: zod- .string()- .describe(- 'Source system that owns the external identifier.'- ),- id: zod- .uuid()+ .describe('Properties attached to the entity.'),+ }).describe(- 'Internal primary key for this foreign entity record.'+ 'Property fields that can be flattened into property-bearing Soup items.'),- metadata: zod- .object({})- .describe('Arbitrary metadata stored with the mapping.'),- storedForAuthEntity: zod+ icalUid: zod.string()+ .describe('RFC 5545 UID used for source reconciliation.'),+ id: zod.uuid().describe('Entity identifier.'),+ isReadOnly: zod+ .boolean().describe(- 'Internal auth entity namespace this foreign entity is stored for.'+ 'Whether the selected canonical source is read-only.'),- storedForId: zod+ location: zod.string()- .describe(- 'Internal entity identifier this foreign entity is stored for.'- ),+ .nullish()+ .describe('Optional location label.'),+ organizerEmail: zod+ .string()+ .nullish()+ .describe('Organizer email.'),+ organizerName: zod+ .string()+ .nullish()+ .describe('Organizer display name.'),+ ownerId: zod.string().describe('Owning Macro user.'),+ status: zod.string().describe('Canonical status.'),+ time: zod+ .union([+ zod+ .object({+ ends_at: zod.iso+ .datetime({})+ .describe('Exclusive end.'),+ kind: zod.enum(['timed']),+ starts_at: zod.iso+ .datetime({})+ .describe('Inclusive start.'),+ time_zone: zod+ .string()+ .nullish()+ .describe('Original IANA time zone.'),+ })+ .describe('Absolute timed event.'),+ zod+ .object({+ end_date: zod.iso+ .date()+ .describe('Exclusive end date.'),+ kind: zod.enum(['allDay']),+ start_date: zod.iso+ .date()+ .describe('Inclusive start date.'),+ })+ .describe('All-day event with an exclusive end date.'),+ ])+ .describe('Timed or all-day calendar event span.'),+ title: zod.string().describe('Display title.'),+ transparency: zod+ .string()+ .describe('Availability transparency.'),updatedAt: zod.iso.datetime({})- .describe('Timestamp when the record was last updated.'),+ .describe('Entity update timestamp.'),+ visibility: zod.string().describe('Canonical visibility.'),})- .describe('A foreign entity record as displayed in Soup.'),- tag: zod.enum(['foreignEntity']),+ .describe('A canonical calendar event entity in Soup.'),+ tag: zod.enum(['calendarEvent']),})- .describe('Foreign entity item.'),+ .describe('Calendar event item.'),+ zod+ .object({+ data: zod+ .object({+ properties: zod+ .array(+ zod+ .object({+ definition: zod+ .object({+ created_at: zod.iso.datetime({}),+ data_type: zod+ .enum([+ 'BOOLEAN',+ 'DATE',+ 'NUMBER',+ 'STRING',+ 'SELECT_NUMBER',+ 'SELECT_STRING',+ 'TAG',+ 'ENTITY',+ 'LINK',+ ])+ .describe(+ 'Data type for property values, determining storage and validation.'+ ),+ display_name: zod.string(),+ id: zod.uuid(),+ is_metadata: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'+ ),+ is_multi_select: zod.boolean(),+ is_system: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system property (stored in DB).'+ ),+ owner: zod+ .union([+ zod+ .object({+ scope: zod.enum(['user']),+ user_id: zod.string(),+ })+ .describe('User-scoped property.'),+ zod+ .object({+ scope: zod.enum(['team']),+ team_id: zod.uuid(),+ })+ .describe('Team-scoped property.'),+ zod+ .object({+ scope: zod.enum(['system']),+ })+ .describe(+ 'System-owned property (no user or team owner).'+ ),+ ])+ .describe(+ 'Defines who owns a property - user-scoped, team-scoped, or system.'+ ),+ specific_entity_type: zod+ .union([+ zod.null(),+ zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ ])+ .optional(),+ updated_at: zod.iso.datetime({}),+ })+ .describe(+ 'Property definition model (service representation).'+ ),+ id: zod+ .uuid()+ .describe(+ 'Globally unique id of the assignment attaching this property to an entity.'+ ),+ value: zod+ .union([+ zod.null(),+ zod+ .union([+ zod+ .object({+ type: zod.enum(['Boolean']),+ value: zod+ .boolean()+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ })+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ zod+ .object({+ type: zod.enum(['Number']),+ value: zod+ .number()+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ })+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ zod+ .object({+ type: zod.enum(['String']),+ value: zod+ .string()+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ })+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ zod+ .object({+ type: zod.enum(['Date']),+ value: zod.iso+ .datetime({})+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ })+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ zod+ .object({+ type: zod.enum(['SelectOption']),+ value: zod+ .array(zod.uuid())+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ })+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum(['EntityReference']),+ value: zod+ .array(+ zod+ .object({+ entity_id: zod.string(),+ entity_type: zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ specific_message_id: zod+ .uuid()+ .nullish()+ .describe(+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'+ ),+ })+ .describe(+ 'Entity reference for entity-type property values.'+ )+ )+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ })+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum(['Link']),+ value: zod+ .array(zod.string())+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ })+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ ])+ .describe(+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'+ ),+ ])+ .optional(),+ })+ .describe(+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'+ )+ )+ .describe('Properties attached to the entity.'),+ })+ .describe(+ 'Property fields that can be flattened into property-bearing Soup items.'+ )+ .and(+ zod.object({+ createdAt: zod.iso+ .datetime({})+ .describe('When the company was created.'),+ description: zod+ .string()+ .nullish()+ .describe(+ "Display description from the primary domain's directory entry."+ ),+ domains: zod+ .array(+ zod+ .object({+ companyId: zod+ .uuid()+ .describe(+ 'The id of the company the domain belongs to.'+ ),+ createdAt: zod.iso+ .datetime({})+ .describe('When the domain record was created.'),+ domain: zod+ .string()+ .describe(+ 'The domain (lowercased, e.g. \"acme.com\").'+ ),+ id: zod+ .uuid()+ .describe('The id of the domain record.'),+ })+ .describe(+ "A CRM domain as displayed in Soup. Mirrors the crm crate's\n[`CrmDomain`] with a stable wire shape that the FE can rely on."+ )+ )+ .describe(+ 'Domains associated with this company, ordered by creation time\nascending (primary first).'+ ),+ emailSync: zod+ .boolean()+ .describe(+ 'Whether email sync is enabled for this company.'+ ),+ hidden: zod+ .boolean()+ .describe(+ 'Whether the company is hidden from CRM listings. Soup filters\nthese out by default.'+ ),+ id: zod.uuid().describe('The id of the company.'),+ name: zod+ .string()+ .nullish()+ .describe(+ "Display name from the primary domain's directory entry, or\n`None` when unresolved."+ ),+ teamId: zod+ .uuid()+ .describe(+ 'The id of the team that owns this company record.'+ ),+ updatedAt: zod.iso+ .datetime({})+ .describe('When the company was last updated.'),+ viewedAt: zod.iso+ .datetime({})+ .nullish()+ .describe(+ 'When the requesting user last viewed this company, or `None` if\nnever viewed. Mirrors the `viewed_at` other soup entities carry.'+ ),+ })+ )+ .describe(+ 'A CRM company as displayed in Soup. Carries the core company\nfields plus display metadata resolved from `crm_domain_directory`\nagainst the primary (earliest-created) domain.'+ ),+ tag: zod.enum(['crmCompany']),+ })+ .describe('CRM company item.'),+ zod+ .object({+ data: zod+ .object({+ createdAt: zod.iso+ .datetime({})+ .describe('Timestamp when the record was created.'),+ foreignEntityId: zod+ .string()+ .describe('Identifier assigned by the external system.'),+ foreignEntitySource: zod+ .string()+ .describe(+ 'Source system that owns the external identifier.'+ ),+ id: zod+ .uuid()+ .describe(+ 'Internal primary key for this foreign entity record.'+ ),+ metadata: zod+ .object({})+ .describe('Arbitrary metadata stored with the mapping.'),+ storedForAuthEntity: zod+ .string()+ .describe(+ 'Internal auth entity namespace this foreign entity is stored for.'+ ),+ storedForId: zod+ .string()+ .describe(+ 'Internal entity identifier this foreign entity is stored for.'+ ),+ updatedAt: zod.iso+ .datetime({})+ .describe('Timestamp when the record was last updated.'),+ })+ .describe('A foreign entity record as displayed in Soup.'),+ tag: zod.enum(['foreignEntity']),+ })+ .describe('Foreign entity item.'),]).describe('A single item in the Soup feed.').and(@@ -9997,6 +10325,37 @@ export const postItemsSoupBodyLimitMin = 0;export const postItemsSoupBody = zod.object({+ calendar_event_filters: zod+ .object({+ attendees: zod+ .array(zod.string())+ .optional()+ .describe('Attendee email addresses.'),+ calendar_event_ids: zod+ .array(zod.string())+ .optional()+ .describe('Canonical event ids.'),+ ends_after: zod.iso+ .datetime({})+ .nullish()+ .describe('Include master events ending after this instant.'),+ organizers: zod+ .array(zod.string())+ .optional()+ .describe('Organizer email addresses.'),+ starts_before: zod.iso+ .datetime({})+ .nullish()+ .describe('Include master events starting before this instant.'),+ statuses: zod+ .array(zod.string())+ .optional()+ .describe(+ 'Event statuses such as `confirmed`, `tentative`, or `cancelled`.'+ ),+ })+ .optional()+ .describe('Filters for canonical calendar-event entities.'),call_filters: zod.object({attended: zod@@ -10658,6 +11017,7 @@ export const postItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -10758,6 +11118,7 @@ export const postItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -10984,6 +11345,7 @@ export const postItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -11084,6 +11446,7 @@ export const postItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -11244,6 +11607,7 @@ export const postItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -11344,6 +11708,7 @@ export const postItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -11562,6 +11927,7 @@ export const postItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -11662,6 +12028,7 @@ export const postItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -12260,6 +12627,7 @@ export const postItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -12360,6 +12728,7 @@ export const postItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -12497,7 +12866,316 @@ export const postItemsSoupResponse = zod),tag: zod.enum(['call']),})- .describe('Call record item.'),+ .describe('Call record item.'),+ zod+ .object({+ data: zod+ .object({+ conferenceUrl: zod+ .string()+ .nullish()+ .describe('Direct conference join URL.'),+ createdAt: zod.iso+ .datetime({})+ .describe('Entity creation timestamp.'),+ description: zod+ .string()+ .nullish()+ .describe('Optional description.'),+ extra: zod+ .object({+ properties: zod+ .array(+ zod+ .object({+ definition: zod+ .object({+ created_at: zod.iso.datetime({}),+ data_type: zod+ .enum([+ 'BOOLEAN',+ 'DATE',+ 'NUMBER',+ 'STRING',+ 'SELECT_NUMBER',+ 'SELECT_STRING',+ 'TAG',+ 'ENTITY',+ 'LINK',+ ])+ .describe(+ 'Data type for property values, determining storage and validation.'+ ),+ display_name: zod.string(),+ id: zod.uuid(),+ is_metadata: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'+ ),+ is_multi_select: zod.boolean(),+ is_system: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system property (stored in DB).'+ ),+ owner: zod+ .union([+ zod+ .object({+ scope: zod.enum(['user']),+ user_id: zod.string(),+ })+ .describe('User-scoped property.'),+ zod+ .object({+ scope: zod.enum(['team']),+ team_id: zod.uuid(),+ })+ .describe('Team-scoped property.'),+ zod+ .object({+ scope: zod.enum(['system']),+ })+ .describe(+ 'System-owned property (no user or team owner).'+ ),+ ])+ .describe(+ 'Defines who owns a property - user-scoped, team-scoped, or system.'+ ),+ specific_entity_type: zod+ .union([+ zod.null(),+ zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ ])+ .optional(),+ updated_at: zod.iso.datetime({}),+ })+ .describe(+ 'Property definition model (service representation).'+ ),+ id: zod+ .uuid()+ .describe(+ 'Globally unique id of the assignment attaching this property to an entity.'+ ),+ value: zod+ .union([+ zod.null(),+ zod+ .union([+ zod+ .object({+ type: zod.enum(['Boolean']),+ value: zod+ .boolean()+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ })+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ zod+ .object({+ type: zod.enum(['Number']),+ value: zod+ .number()+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ })+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ zod+ .object({+ type: zod.enum(['String']),+ value: zod+ .string()+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ })+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ zod+ .object({+ type: zod.enum(['Date']),+ value: zod.iso+ .datetime({})+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ })+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ zod+ .object({+ type: zod.enum(['SelectOption']),+ value: zod+ .array(zod.uuid())+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ })+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum(['EntityReference']),+ value: zod+ .array(+ zod+ .object({+ entity_id: zod.string(),+ entity_type: zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ specific_message_id: zod+ .uuid()+ .nullish()+ .describe(+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'+ ),+ })+ .describe(+ 'Entity reference for entity-type property values.'+ )+ )+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ })+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum(['Link']),+ value: zod+ .array(zod.string())+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ })+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ ])+ .describe(+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'+ ),+ ])+ .optional(),+ })+ .describe(+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'+ )+ )+ .describe('Properties attached to the entity.'),+ })+ .describe(+ 'Property fields that can be flattened into property-bearing Soup items.'+ ),+ icalUid: zod+ .string()+ .describe('RFC 5545 UID used for source reconciliation.'),+ id: zod.uuid().describe('Entity identifier.'),+ isReadOnly: zod+ .boolean()+ .describe(+ 'Whether the selected canonical source is read-only.'+ ),+ location: zod+ .string()+ .nullish()+ .describe('Optional location label.'),+ organizerEmail: zod+ .string()+ .nullish()+ .describe('Organizer email.'),+ organizerName: zod+ .string()+ .nullish()+ .describe('Organizer display name.'),+ ownerId: zod.string().describe('Owning Macro user.'),+ status: zod.string().describe('Canonical status.'),+ time: zod+ .union([+ zod+ .object({+ ends_at: zod.iso+ .datetime({})+ .describe('Exclusive end.'),+ kind: zod.enum(['timed']),+ starts_at: zod.iso+ .datetime({})+ .describe('Inclusive start.'),+ time_zone: zod+ .string()+ .nullish()+ .describe('Original IANA time zone.'),+ })+ .describe('Absolute timed event.'),+ zod+ .object({+ end_date: zod.iso+ .date()+ .describe('Exclusive end date.'),+ kind: zod.enum(['allDay']),+ start_date: zod.iso+ .date()+ .describe('Inclusive start date.'),+ })+ .describe('All-day event with an exclusive end date.'),+ ])+ .describe('Timed or all-day calendar event span.'),+ title: zod.string().describe('Display title.'),+ transparency: zod+ .string()+ .describe('Availability transparency.'),+ updatedAt: zod.iso+ .datetime({})+ .describe('Entity update timestamp.'),+ visibility: zod.string().describe('Canonical visibility.'),+ })+ .describe('A canonical calendar event entity in Soup.'),+ tag: zod.enum(['calendarEvent']),+ })+ .describe('Calendar event item.'),zod.object({data: zod@@ -12567,6 +13245,7 @@ export const postItemsSoupResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -12667,6 +13346,7 @@ export const postItemsSoupResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -12874,6 +13554,10 @@ export const postItemsSoupAstBodyLimitMin = 0;export const postItemsSoupAstBody = zod.object({+ calf: zod+ .unknown()+ .optional()+ .describe('filters applied to canonical calendar events'),callf: zod.unknown().optional()@@ -13055,6 +13739,7 @@ export const postItemsSoupAstResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -13155,6 +13840,7 @@ export const postItemsSoupAstResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -13381,6 +14067,7 @@ export const postItemsSoupAstResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -13481,6 +14168,7 @@ export const postItemsSoupAstResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -13641,6 +14329,7 @@ export const postItemsSoupAstResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -13741,6 +14430,7 @@ export const postItemsSoupAstResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -13959,6 +14649,7 @@ export const postItemsSoupAstResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -14059,6 +14750,7 @@ export const postItemsSoupAstResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -14659,6 +15351,7 @@ export const postItemsSoupAstResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -14759,6 +15452,7 @@ export const postItemsSoupAstResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -14896,7 +15590,316 @@ export const postItemsSoupAstResponse = zod),tag: zod.enum(['call']),})- .describe('Call record item.'),+ .describe('Call record item.'),+ zod+ .object({+ data: zod+ .object({+ conferenceUrl: zod+ .string()+ .nullish()+ .describe('Direct conference join URL.'),+ createdAt: zod.iso+ .datetime({})+ .describe('Entity creation timestamp.'),+ description: zod+ .string()+ .nullish()+ .describe('Optional description.'),+ extra: zod+ .object({+ properties: zod+ .array(+ zod+ .object({+ definition: zod+ .object({+ created_at: zod.iso.datetime({}),+ data_type: zod+ .enum([+ 'BOOLEAN',+ 'DATE',+ 'NUMBER',+ 'STRING',+ 'SELECT_NUMBER',+ 'SELECT_STRING',+ 'TAG',+ 'ENTITY',+ 'LINK',+ ])+ .describe(+ 'Data type for property values, determining storage and validation.'+ ),+ display_name: zod.string(),+ id: zod.uuid(),+ is_metadata: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'+ ),+ is_multi_select: zod.boolean(),+ is_system: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system property (stored in DB).'+ ),+ owner: zod+ .union([+ zod+ .object({+ scope: zod.enum(['user']),+ user_id: zod.string(),+ })+ .describe('User-scoped property.'),+ zod+ .object({+ scope: zod.enum(['team']),+ team_id: zod.uuid(),+ })+ .describe('Team-scoped property.'),+ zod+ .object({+ scope: zod.enum(['system']),+ })+ .describe(+ 'System-owned property (no user or team owner).'+ ),+ ])+ .describe(+ 'Defines who owns a property - user-scoped, team-scoped, or system.'+ ),+ specific_entity_type: zod+ .union([+ zod.null(),+ zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ ])+ .optional(),+ updated_at: zod.iso.datetime({}),+ })+ .describe(+ 'Property definition model (service representation).'+ ),+ id: zod+ .uuid()+ .describe(+ 'Globally unique id of the assignment attaching this property to an entity.'+ ),+ value: zod+ .union([+ zod.null(),+ zod+ .union([+ zod+ .object({+ type: zod.enum(['Boolean']),+ value: zod+ .boolean()+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ })+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ zod+ .object({+ type: zod.enum(['Number']),+ value: zod+ .number()+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ })+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ zod+ .object({+ type: zod.enum(['String']),+ value: zod+ .string()+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ })+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ zod+ .object({+ type: zod.enum(['Date']),+ value: zod.iso+ .datetime({})+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ })+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ zod+ .object({+ type: zod.enum(['SelectOption']),+ value: zod+ .array(zod.uuid())+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ })+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum(['EntityReference']),+ value: zod+ .array(+ zod+ .object({+ entity_id: zod.string(),+ entity_type: zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ specific_message_id: zod+ .uuid()+ .nullish()+ .describe(+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'+ ),+ })+ .describe(+ 'Entity reference for entity-type property values.'+ )+ )+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ })+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum(['Link']),+ value: zod+ .array(zod.string())+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ })+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ ])+ .describe(+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'+ ),+ ])+ .optional(),+ })+ .describe(+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'+ )+ )+ .describe('Properties attached to the entity.'),+ })+ .describe(+ 'Property fields that can be flattened into property-bearing Soup items.'+ ),+ icalUid: zod+ .string()+ .describe('RFC 5545 UID used for source reconciliation.'),+ id: zod.uuid().describe('Entity identifier.'),+ isReadOnly: zod+ .boolean()+ .describe(+ 'Whether the selected canonical source is read-only.'+ ),+ location: zod+ .string()+ .nullish()+ .describe('Optional location label.'),+ organizerEmail: zod+ .string()+ .nullish()+ .describe('Organizer email.'),+ organizerName: zod+ .string()+ .nullish()+ .describe('Organizer display name.'),+ ownerId: zod.string().describe('Owning Macro user.'),+ status: zod.string().describe('Canonical status.'),+ time: zod+ .union([+ zod+ .object({+ ends_at: zod.iso+ .datetime({})+ .describe('Exclusive end.'),+ kind: zod.enum(['timed']),+ starts_at: zod.iso+ .datetime({})+ .describe('Inclusive start.'),+ time_zone: zod+ .string()+ .nullish()+ .describe('Original IANA time zone.'),+ })+ .describe('Absolute timed event.'),+ zod+ .object({+ end_date: zod.iso+ .date()+ .describe('Exclusive end date.'),+ kind: zod.enum(['allDay']),+ start_date: zod.iso+ .date()+ .describe('Inclusive start date.'),+ })+ .describe('All-day event with an exclusive end date.'),+ ])+ .describe('Timed or all-day calendar event span.'),+ title: zod.string().describe('Display title.'),+ transparency: zod+ .string()+ .describe('Availability transparency.'),+ updatedAt: zod.iso+ .datetime({})+ .describe('Entity update timestamp.'),+ visibility: zod.string().describe('Canonical visibility.'),+ })+ .describe('A canonical calendar event entity in Soup.'),+ tag: zod.enum(['calendarEvent']),+ })+ .describe('Calendar event item.'),zod.object({data: zod@@ -14966,6 +15969,7 @@ export const postItemsSoupAstResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -15066,6 +16070,7 @@ export const postItemsSoupAstResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -15277,6 +16282,10 @@ export const postItemsSoupAstGroupedBody = zod.union([zod.object({+ calf: zod+ .unknown()+ .optional()+ .describe('filters applied to canonical calendar events'),callf: zod.unknown().optional()@@ -15429,6 +16438,10 @@ export const postItemsSoupAstGroupedBody = zod.describe('Initial grouped soup request.'),zod.object({+ calf: zod+ .unknown()+ .optional()+ .describe('filters applied to canonical calendar events'),callf: zod.unknown().optional()@@ -15706,6 +16719,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -15806,6 +16820,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -16036,6 +17051,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -16136,6 +17152,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -16298,6 +17315,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -16398,6 +17416,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -16631,6 +17650,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -16735,6 +17755,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -17382,6 +18403,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -17482,6 +18504,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -17621,7 +18644,330 @@ export const postItemsSoupAstGroupedResponse = zod),tag: zod.enum(['call']),})- .describe('Call record item.'),+ .describe('Call record item.'),+ zod+ .object({+ data: zod+ .object({+ conferenceUrl: zod+ .string()+ .nullish()+ .describe('Direct conference join URL.'),+ createdAt: zod.iso+ .datetime({})+ .describe('Entity creation timestamp.'),+ description: zod+ .string()+ .nullish()+ .describe('Optional description.'),+ extra: zod+ .object({+ properties: zod+ .array(+ zod+ .object({+ definition: zod+ .object({+ created_at: zod.iso.datetime({}),+ data_type: zod+ .enum([+ 'BOOLEAN',+ 'DATE',+ 'NUMBER',+ 'STRING',+ 'SELECT_NUMBER',+ 'SELECT_STRING',+ 'TAG',+ 'ENTITY',+ 'LINK',+ ])+ .describe(+ 'Data type for property values, determining storage and validation.'+ ),+ display_name: zod.string(),+ id: zod.uuid(),+ is_metadata: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'+ ),+ is_multi_select: zod.boolean(),+ is_system: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system property (stored in DB).'+ ),+ owner: zod+ .union([+ zod+ .object({+ scope: zod.enum(['user']),+ user_id: zod.string(),+ })+ .describe(+ 'User-scoped property.'+ ),+ zod+ .object({+ scope: zod.enum(['team']),+ team_id: zod.uuid(),+ })+ .describe(+ 'Team-scoped property.'+ ),+ zod+ .object({+ scope: zod.enum(['system']),+ })+ .describe(+ 'System-owned property (no user or team owner).'+ ),+ ])+ .describe(+ 'Defines who owns a property - user-scoped, team-scoped, or system.'+ ),+ specific_entity_type: zod+ .union([+ zod.null(),+ zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ ])+ .optional(),+ updated_at: zod.iso.datetime({}),+ })+ .describe(+ 'Property definition model (service representation).'+ ),+ id: zod+ .uuid()+ .describe(+ 'Globally unique id of the assignment attaching this property to an entity.'+ ),+ value: zod+ .union([+ zod.null(),+ zod+ .union([+ zod+ .object({+ type: zod.enum(['Boolean']),+ value: zod+ .boolean()+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ })+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ zod+ .object({+ type: zod.enum(['Number']),+ value: zod+ .number()+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ })+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ zod+ .object({+ type: zod.enum(['String']),+ value: zod+ .string()+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ })+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ zod+ .object({+ type: zod.enum(['Date']),+ value: zod.iso+ .datetime({})+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ })+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ zod+ .object({+ type: zod.enum([+ 'SelectOption',+ ]),+ value: zod+ .array(zod.uuid())+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ })+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum([+ 'EntityReference',+ ]),+ value: zod+ .array(+ zod+ .object({+ entity_id: zod.string(),+ entity_type: zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ specific_message_id: zod+ .uuid()+ .nullish()+ .describe(+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'+ ),+ })+ .describe(+ 'Entity reference for entity-type property values.'+ )+ )+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ })+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum(['Link']),+ value: zod+ .array(zod.string())+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ })+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ ])+ .describe(+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'+ ),+ ])+ .optional(),+ })+ .describe(+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'+ )+ )+ .describe('Properties attached to the entity.'),+ })+ .describe(+ 'Property fields that can be flattened into property-bearing Soup items.'+ ),+ icalUid: zod+ .string()+ .describe(+ 'RFC 5545 UID used for source reconciliation.'+ ),+ id: zod.uuid().describe('Entity identifier.'),+ isReadOnly: zod+ .boolean()+ .describe(+ 'Whether the selected canonical source is read-only.'+ ),+ location: zod+ .string()+ .nullish()+ .describe('Optional location label.'),+ organizerEmail: zod+ .string()+ .nullish()+ .describe('Organizer email.'),+ organizerName: zod+ .string()+ .nullish()+ .describe('Organizer display name.'),+ ownerId: zod.string().describe('Owning Macro user.'),+ status: zod.string().describe('Canonical status.'),+ time: zod+ .union([+ zod+ .object({+ ends_at: zod.iso+ .datetime({})+ .describe('Exclusive end.'),+ kind: zod.enum(['timed']),+ starts_at: zod.iso+ .datetime({})+ .describe('Inclusive start.'),+ time_zone: zod+ .string()+ .nullish()+ .describe('Original IANA time zone.'),+ })+ .describe('Absolute timed event.'),+ zod+ .object({+ end_date: zod.iso+ .date()+ .describe('Exclusive end date.'),+ kind: zod.enum(['allDay']),+ start_date: zod.iso+ .date()+ .describe('Inclusive start date.'),+ })+ .describe(+ 'All-day event with an exclusive end date.'+ ),+ ])+ .describe('Timed or all-day calendar event span.'),+ title: zod.string().describe('Display title.'),+ transparency: zod+ .string()+ .describe('Availability transparency.'),+ updatedAt: zod.iso+ .datetime({})+ .describe('Entity update timestamp.'),+ visibility: zod+ .string()+ .describe('Canonical visibility.'),+ })+ .describe('A canonical calendar event entity in Soup.'),+ tag: zod.enum(['calendarEvent']),+ })+ .describe('Calendar event item.'),zod.object({data: zod@@ -17691,6 +19037,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -17791,6 +19138,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -18113,6 +19461,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -18213,6 +19562,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -18443,6 +19793,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -18543,6 +19894,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -18705,6 +20057,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -18805,6 +20158,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -19038,6 +20392,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -19142,6 +20497,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -19471,564 +20827,889 @@ export const postItemsSoupAstGroupedResponse = zodmentions: zod.array(zod.string()).describe(- 'Message mentions formatted as `{ENTITY_TYPE}:{ENTITY_ID}`.'+ 'Message mentions formatted as `{ENTITY_TYPE}:{ENTITY_ID}`.'+ ),+ message_id: zod+ .uuid()+ .describe('Message id.'),+ sender_id: zod+ .string()+ .describe('Sender id.'),+ thread_id: zod+ .uuid()+ .nullish()+ .describe('Thread parent id.'),+ updated_at: zod.iso+ .datetime({})+ .describe('Update timestamp.'),+ })+ .describe(+ 'Lightweight channel message for soup payloads.'+ ),+ ])+ .optional(),+ })+ .describe('Latest-message bundle for soup payloads.')+ )+ .and(+ zod.object({+ interacted_at: zod.iso+ .datetime({})+ .nullish()+ .describe(+ 'Timestamp when the requesting user last interacted with this channel.'+ ),+ viewed_at: zod.iso+ .datetime({})+ .nullish()+ .describe(+ 'Timestamp when the requesting user last viewed this channel.'+ ),+ })+ )+ .describe('A channel as displayed in Soup.'),+ tag: zod.enum(['channel']),+ })+ .describe('Channel item.'),+ zod+ .object({+ data: zod+ .object({+ attachments: zod+ .array(+ zod+ .object({+ created_at: zod.iso+ .datetime({})+ .describe('Creation timestamp.'),+ entity_id: zod.string().describe('Entity id.'),+ entity_type: zod+ .string()+ .describe('Type of entity.'),+ height: zod+ .number()+ .nullish()+ .describe('Height for images.'),+ id: zod.uuid().describe('Attachment id.'),+ width: zod+ .number()+ .nullish()+ .describe('Width for images.'),+ })+ .describe('An attachment on a message.')+ )+ .describe('Attachments on this message.'),+ channel_id: zod.uuid().describe('Channel id.'),+ content: zod.string().describe('Message content.'),+ created_at: zod.iso+ .datetime({})+ .describe('Creation timestamp.'),+ deleted_at: zod.iso+ .datetime({})+ .nullish()+ .describe('Deletion timestamp.'),+ edited_at: zod.iso+ .datetime({})+ .nullish()+ .describe('Edit timestamp.'),+ id: zod.uuid().describe('Message id.'),+ reactions: zod+ .array(+ zod+ .object({+ emoji: zod.string().describe('Emoji string.'),+ users: zod+ .array(zod.string())+ .describe(+ 'User ids who added this reaction.'+ ),+ })+ .describe('A reaction with emoji and user list.')+ )+ .describe('Reactions on this message.'),+ sender: zod+ .object({+ avatar_url: zod+ .string()+ .nullish()+ .describe('Avatar URL for bot senders.'),+ id: zod+ .string()+ .describe(+ 'Sender id without the storage namespace prefix.'+ ),+ name: zod+ .string()+ .nullish()+ .describe('Display name for bot senders.'),+ type: zod+ .enum(['user', 'bot'])+ .describe(+ 'Public sender type for soup channel messages.'+ ),+ })+ .describe(+ 'Public sender identity for soup channel messages.'+ ),+ sender_id: zod.string().describe('Sender id.'),+ thread: zod+ .object({+ latest_reply_at: zod.iso+ .datetime({})+ .nullish()+ .describe('Timestamp of the latest reply.'),+ preview: zod+ .array(+ zod+ .object({+ attachments: zod+ .array(+ zod+ .object({+ created_at: zod.iso+ .datetime({})+ .describe('Creation timestamp.'),+ entity_id: zod+ .string()+ .describe('Entity id.'),+ entity_type: zod+ .string()+ .describe('Type of entity.'),+ height: zod+ .number()+ .nullish()+ .describe('Height for images.'),+ id: zod+ .uuid()+ .describe('Attachment id.'),+ width: zod+ .number()+ .nullish()+ .describe('Width for images.'),+ })+ .describe(+ 'An attachment on a message.'+ )+ )+ .describe('Attachments on this reply.'),+ content: zod+ .string()+ .describe('Reply content.'),+ created_at: zod.iso+ .datetime({})+ .describe('Creation timestamp.'),+ edited_at: zod.iso+ .datetime({})+ .nullish()+ .describe('Edit timestamp.'),+ id: zod.uuid().describe('Reply id.'),+ reactions: zod+ .array(+ zod+ .object({+ emoji: zod+ .string()+ .describe('Emoji string.'),+ users: zod+ .array(zod.string())+ .describe(+ 'User ids who added this reaction.'+ ),+ })+ .describe(+ 'A reaction with emoji and user list.'+ )+ )+ .describe('Reactions on this reply.'),+ sender: zod+ .object({+ avatar_url: zod+ .string()+ .nullish()+ .describe(+ 'Avatar URL for bot senders.'+ ),+ id: zod+ .string()+ .describe(+ 'Sender id without the storage namespace prefix.'+ ),+ name: zod+ .string()+ .nullish()+ .describe(+ 'Display name for bot senders.'+ ),+ type: zod+ .enum(['user', 'bot'])+ .describe(+ 'Public sender type for soup channel messages.'+ ),+ })+ .describe(+ 'Public sender identity for soup channel messages.'),- message_id: zod- .uuid()- .describe('Message id.'),sender_id: zod.string().describe('Sender id.'),- thread_id: zod- .uuid()- .nullish()- .describe('Thread parent id.'),updated_at: zod.iso.datetime({}).describe('Update timestamp.'),})+ .describe('A thread reply shown in preview.')+ )+ .describe('Preview replies.'),+ reply_count: zod+ .number()+ .describe('Total reply count.'),+ })+ .describe(+ 'Thread metadata and preview replies for soup channel messages.'+ ),+ updated_at: zod.iso+ .datetime({})+ .describe('Update timestamp.'),+ })+ .describe(+ 'A top-level channel message thread for soup payloads.\n\nThis mirrors the public channel-message API shape so soup consumers can\nrender a thread root the same way they render a channel timeline message.'+ ),+ tag: zod.enum(['channelThread']),+ })+ .describe('Channel thread item.'),+ zod+ .object({+ data: zod+ .object({+ properties: zod+ .array(+ zod+ .object({+ definition: zod+ .object({+ created_at: zod.iso.datetime({}),+ data_type: zod+ .enum([+ 'BOOLEAN',+ 'DATE',+ 'NUMBER',+ 'STRING',+ 'SELECT_NUMBER',+ 'SELECT_STRING',+ 'TAG',+ 'ENTITY',+ 'LINK',+ ])+ .describe(+ 'Data type for property values, determining storage and validation.'+ ),+ display_name: zod.string(),+ id: zod.uuid(),+ is_metadata: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'+ ),+ is_multi_select: zod.boolean(),+ is_system: zod+ .boolean()+ .describe(+ 'Flag to indicate if this is a system property (stored in DB).'+ ),+ owner: zod+ .union([+ zod+ .object({+ scope: zod.enum(['user']),+ user_id: zod.string(),+ })+ .describe('User-scoped property.'),+ zod+ .object({+ scope: zod.enum(['team']),+ team_id: zod.uuid(),+ })+ .describe('Team-scoped property.'),+ zod+ .object({+ scope: zod.enum(['system']),+ })+ .describe(+ 'System-owned property (no user or team owner).'+ ),+ ])+ .describe(+ 'Defines who owns a property - user-scoped, team-scoped, or system.'+ ),+ specific_entity_type: zod+ .union([+ zod.null(),+ zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ ])+ .optional(),+ updated_at: zod.iso.datetime({}),+ }).describe(- 'Lightweight channel message for soup payloads.'+ 'Property definition model (service representation).'),- ])- .optional(),- })- .describe('Latest-message bundle for soup payloads.')+ id: zod+ .uuid()+ .describe(+ 'Globally unique id of the assignment attaching this property to an entity.'+ ),+ value: zod+ .union([+ zod.null(),+ zod+ .union([+ zod+ .object({+ type: zod.enum(['Boolean']),+ value: zod+ .boolean()+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ })+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ zod+ .object({+ type: zod.enum(['Number']),+ value: zod+ .number()+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ })+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ zod+ .object({+ type: zod.enum(['String']),+ value: zod+ .string()+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ })+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ zod+ .object({+ type: zod.enum(['Date']),+ value: zod.iso+ .datetime({})+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ })+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ zod+ .object({+ type: zod.enum(['SelectOption']),+ value: zod+ .array(zod.uuid())+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ })+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum(['EntityReference']),+ value: zod+ .array(+ zod+ .object({+ entity_id: zod.string(),+ entity_type: zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ specific_message_id: zod+ .uuid()+ .nullish()+ .describe(+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'+ ),+ })+ .describe(+ 'Entity reference for entity-type property values.'+ )+ )+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ })+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ zod+ .object({+ type: zod.enum(['Link']),+ value: zod+ .array(zod.string())+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ })+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ ])+ .describe(+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'+ ),+ ])+ .optional(),+ })+ .describe(+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'+ )+ )+ .describe('Properties attached to the entity.'),+ })+ .describe(+ 'Property fields that can be flattened into property-bearing Soup items.').and(zod.object({- interacted_at: zod.iso+ attended: zod+ .boolean()+ .describe(+ 'Whether the requesting user attended this call. Kept for compatibility\nand derived from `status == ATTENDED`.'+ ),+ callId: zod.uuid().describe('The call identifier.'),+ channelId: zod+ .uuid()+ .describe('The channel this call belongs to.'),+ channelName: zod+ .string()+ .nullish()+ .describe('Resolved display name for the channel.'),+ createdBy: zod+ .string()+ .describe('User who created the call.'),+ customName: zod+ .string()+ .nullish()+ .describe(+ 'User-supplied or AI-generated display name for the call.'+ ),+ durationMs: zod+ .number()+ .nullish()+ .describe(+ 'Call duration in milliseconds (None if still active).'+ ),+ endedAt: zod.iso.datetime({}).nullish().describe(- 'Timestamp when the requesting user last interacted with this channel.'+ 'When the call ended (None if still active).'),- viewed_at: zod.iso+ isActive: zod+ .boolean()+ .describe('Whether the call is currently active.'),+ participants: zod+ .array(+ zod+ .object({+ joinedAt: zod.iso+ .datetime({})+ .describe('When the user joined the call.'),+ leftAt: zod.iso+ .datetime({})+ .nullish()+ .describe(+ 'When the user left (None if still in an active call).'+ ),+ userId: zod.string().describe('The user id.'),+ })+ .describe(+ 'A participant in a call record, as displayed in Soup.'+ )+ )+ .describe('Participants in the call.'),+ startedAt: zod.iso.datetime({})+ .describe('When the call started.'),+ status: zod+ .enum(['ATTENDED', 'MISSED', 'UNATTENDED'])+ .describe(+ 'Viewer-relative attendance status for a call record.\nSerializes as `ATTENDED`, `MISSED`, or `UNATTENDED`.'+ ),+ summary: zod+ .string().nullish().describe(- 'Timestamp when the requesting user last viewed this channel.'+ 'AI-generated summary of the call. Only set on archived\n`call_records` once summarization has run; active calls always\nreturn `None`.'),}))- .describe('A channel as displayed in Soup.'),- tag: zod.enum(['channel']),+ .describe(+ 'A call record as displayed in Soup. Excludes room_name, egress_id,\nand transcript — fields that are irrelevant for the soup feed.'+ ),+ tag: zod.enum(['call']),})- .describe('Channel item.'),+ .describe('Call record item.'),zod.object({data: zod.object({- attachments: zod- .array(- zod- .object({- created_at: zod.iso- .datetime({})- .describe('Creation timestamp.'),- entity_id: zod.string().describe('Entity id.'),- entity_type: zod- .string()- .describe('Type of entity.'),- height: zod- .number()- .nullish()- .describe('Height for images.'),- id: zod.uuid().describe('Attachment id.'),- width: zod- .number()- .nullish()- .describe('Width for images.'),- })- .describe('An attachment on a message.')- )- .describe('Attachments on this message.'),- channel_id: zod.uuid().describe('Channel id.'),- content: zod.string().describe('Message content.'),- created_at: zod.iso- .datetime({})- .describe('Creation timestamp.'),- deleted_at: zod.iso- .datetime({})+ conferenceUrl: zod+ .string().nullish()- .describe('Deletion timestamp.'),- edited_at: zod.iso+ .describe('Direct conference join URL.'),+ createdAt: zod.iso.datetime({})+ .describe('Entity creation timestamp.'),+ description: zod+ .string().nullish()- .describe('Edit timestamp.'),- id: zod.uuid().describe('Message id.'),- reactions: zod- .array(- zod- .object({- emoji: zod.string().describe('Emoji string.'),- users: zod- .array(zod.string())- .describe(- 'User ids who added this reaction.'- ),- })- .describe('A reaction with emoji and user list.')- )- .describe('Reactions on this message.'),- sender: zod- .object({- avatar_url: zod- .string()- .nullish()- .describe('Avatar URL for bot senders.'),- id: zod- .string()- .describe(- 'Sender id without the storage namespace prefix.'- ),- name: zod- .string()- .nullish()- .describe('Display name for bot senders.'),- type: zod- .enum(['user', 'bot'])- .describe(- 'Public sender type for soup channel messages.'- ),- })- .describe(- 'Public sender identity for soup channel messages.'- ),- sender_id: zod.string().describe('Sender id.'),- thread: zod+ .describe('Optional description.'),+ extra: zod.object({- latest_reply_at: zod.iso- .datetime({})- .nullish()- .describe('Timestamp of the latest reply.'),- preview: zod+ properties: zod.array(zod.object({- attachments: zod- .array(- zod- .object({- created_at: zod.iso- .datetime({})- .describe('Creation timestamp.'),- entity_id: zod- .string()- .describe('Entity id.'),- entity_type: zod- .string()- .describe('Type of entity.'),- height: zod- .number()- .nullish()- .describe('Height for images.'),- id: zod- .uuid()- .describe('Attachment id.'),- width: zod- .number()- .nullish()- .describe('Width for images.'),- })- .describe(- 'An attachment on a message.'- )- )- .describe('Attachments on this reply.'),- content: zod- .string()- .describe('Reply content.'),- created_at: zod.iso- .datetime({})- .describe('Creation timestamp.'),- edited_at: zod.iso- .datetime({})- .nullish()- .describe('Edit timestamp.'),- id: zod.uuid().describe('Reply id.'),- reactions: zod- .array(- zod- .object({- emoji: zod- .string()- .describe('Emoji string.'),- users: zod- .array(zod.string())- .describe(- 'User ids who added this reaction.'- ),- })- .describe(- 'A reaction with emoji and user list.'- )- )- .describe('Reactions on this reply.'),- sender: zod+ definition: zod.object({- avatar_url: zod- .string()- .nullish()+ created_at: zod.iso.datetime({}),+ data_type: zod+ .enum([+ 'BOOLEAN',+ 'DATE',+ 'NUMBER',+ 'STRING',+ 'SELECT_NUMBER',+ 'SELECT_STRING',+ 'TAG',+ 'ENTITY',+ 'LINK',+ ]).describe(- 'Avatar URL for bot senders.'+ 'Data type for property values, determining storage and validation.'),- id: zod- .string()+ display_name: zod.string(),+ id: zod.uuid(),+ is_metadata: zod+ .boolean().describe(- 'Sender id without the storage namespace prefix.'+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'),- name: zod- .string()- .nullish()+ is_multi_select: zod.boolean(),+ is_system: zod+ .boolean().describe(- 'Display name for bot senders.'+ 'Flag to indicate if this is a system property (stored in DB).'),- type: zod- .enum(['user', 'bot'])+ owner: zod+ .union([+ zod+ .object({+ scope: zod.enum(['user']),+ user_id: zod.string(),+ })+ .describe(+ 'User-scoped property.'+ ),+ zod+ .object({+ scope: zod.enum(['team']),+ team_id: zod.uuid(),+ })+ .describe(+ 'Team-scoped property.'+ ),+ zod+ .object({+ scope: zod.enum(['system']),+ })+ .describe(+ 'System-owned property (no user or team owner).'+ ),+ ]).describe(- 'Public sender type for soup channel messages.'+ 'Defines who owns a property - user-scoped, team-scoped, or system.'),+ specific_entity_type: zod+ .union([+ zod.null(),+ zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ ])+ .optional(),+ updated_at: zod.iso.datetime({}),}).describe(- 'Public sender identity for soup channel messages.'- ),- sender_id: zod- .string()- .describe('Sender id.'),- updated_at: zod.iso- .datetime({})- .describe('Update timestamp.'),- })- .describe('A thread reply shown in preview.')- )- .describe('Preview replies.'),- reply_count: zod- .number()- .describe('Total reply count.'),- })- .describe(- 'Thread metadata and preview replies for soup channel messages.'- ),- updated_at: zod.iso- .datetime({})- .describe('Update timestamp.'),- })- .describe(- 'A top-level channel message thread for soup payloads.\n\nThis mirrors the public channel-message API shape so soup consumers can\nrender a thread root the same way they render a channel timeline message.'- ),- tag: zod.enum(['channelThread']),- })- .describe('Channel thread item.'),- zod- .object({- data: zod- .object({- properties: zod- .array(- zod- .object({- definition: zod- .object({- created_at: zod.iso.datetime({}),- data_type: zod- .enum([- 'BOOLEAN',- 'DATE',- 'NUMBER',- 'STRING',- 'SELECT_NUMBER',- 'SELECT_STRING',- 'TAG',- 'ENTITY',- 'LINK',- ])- .describe(- 'Data type for property values, determining storage and validation.'- ),- display_name: zod.string(),- id: zod.uuid(),- is_metadata: zod- .boolean()- .describe(- 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'- ),- is_multi_select: zod.boolean(),- is_system: zod- .boolean()- .describe(- 'Flag to indicate if this is a system property (stored in DB).'+ 'Property definition model (service representation).'),- owner: zod- .union([- zod- .object({- scope: zod.enum(['user']),- user_id: zod.string(),- })- .describe('User-scoped property.'),- zod- .object({- scope: zod.enum(['team']),- team_id: zod.uuid(),- })- .describe('Team-scoped property.'),- zod- .object({- scope: zod.enum(['system']),- })- .describe(- 'System-owned property (no user or team owner).'- ),- ])+ id: zod+ .uuid().describe(- 'Defines who owns a property - user-scoped, team-scoped, or system.'+ 'Globally unique id of the assignment attaching this property to an entity.'),- specific_entity_type: zod+ value: zod.union([zod.null(),zod- .enum([- 'CALL_RECORD',- 'CHANNEL',- 'CHAT',- 'COMPANY',- 'DOCUMENT',- 'PROJECT',- 'TASK',- 'THREAD',- 'USER',- ])- .describe(- 'Type of entity that can be referenced by entity properties.'- ),- ])- .optional(),- updated_at: zod.iso.datetime({}),- })- .describe(- 'Property definition model (service representation).'- ),- id: zod- .uuid()- .describe(- 'Globally unique id of the assignment attaching this property to an entity.'- ),- value: zod- .union([- zod.null(),- zod- .union([- zod- .object({- type: zod.enum(['Boolean']),- value: zod- .boolean()+ .union([+ zod+ .object({+ type: zod.enum(['Boolean']),+ value: zod+ .boolean()+ .describe(+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'+ ),+ }).describe('Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'),- })- .describe(- 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'- ),- zod- .object({- type: zod.enum(['Number']),- value: zod- .number()+ zod+ .object({+ type: zod.enum(['Number']),+ value: zod+ .number()+ .describe(+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'+ ),+ }).describe('Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'),- })- .describe(- 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'- ),- zod- .object({- type: zod.enum(['String']),- value: zod- .string()+ zod+ .object({+ type: zod.enum(['String']),+ value: zod+ .string()+ .describe(+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'+ ),+ }).describe('String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'),- })- .describe(- 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'- ),- zod- .object({- type: zod.enum(['Date']),- value: zod.iso- .datetime({})+ zod+ .object({+ type: zod.enum(['Date']),+ value: zod.iso+ .datetime({})+ .describe(+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'+ ),+ }).describe('Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'),- })- .describe(- 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'- ),- zod- .object({- type: zod.enum(['SelectOption']),- value: zod- .array(zod.uuid())+ zod+ .object({+ type: zod.enum([+ 'SelectOption',+ ]),+ value: zod+ .array(zod.uuid())+ .describe(+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'+ ),+ }).describe('Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'),- })- .describe(- 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'- ),- zod- .object({- type: zod.enum(['EntityReference']),- value: zod- .array(- zod- .object({- entity_id: zod.string(),- entity_type: zod- .enum([- 'CALL_RECORD',- 'CHANNEL',- 'CHAT',- 'COMPANY',- 'DOCUMENT',- 'PROJECT',- 'TASK',- 'THREAD',- 'USER',- ])- .describe(- 'Type of entity that can be referenced by entity properties.'- ),- specific_message_id: zod- .uuid()- .nullish()+ zod+ .object({+ type: zod.enum([+ 'EntityReference',+ ]),+ value: zod+ .array(+ zod+ .object({+ entity_id: zod.string(),+ entity_type: zod+ .enum([+ 'CALENDAR_EVENT',+ 'CALL_RECORD',+ 'CHANNEL',+ 'CHAT',+ 'COMPANY',+ 'DOCUMENT',+ 'PROJECT',+ 'TASK',+ 'THREAD',+ 'USER',+ ])+ .describe(+ 'Type of entity that can be referenced by entity properties.'+ ),+ specific_message_id: zod+ .uuid()+ .nullish()+ .describe(+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'+ ),+ }).describe(- 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'- ),- })- .describe(- 'Entity reference for entity-type property values.'+ 'Entity reference for entity-type property values.'+ ))- )+ .describe(+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'+ ),+ }).describe('Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'),- })- .describe(- 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'- ),- zod- .object({- type: zod.enum(['Link']),- value: zod- .array(zod.string())+ zod+ .object({+ type: zod.enum(['Link']),+ value: zod+ .array(zod.string())+ .describe(+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ ),+ }).describe('Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'),- })+ ]).describe(- 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'),])- .describe(- 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'- ),- ])- .optional(),+ .optional(),+ })+ .describe(+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'+ )+ )+ .describe('Properties attached to the entity.'),+ })+ .describe(+ 'Property fields that can be flattened into property-bearing Soup items.'+ ),+ icalUid: zod+ .string()+ .describe(+ 'RFC 5545 UID used for source reconciliation.'+ ),+ id: zod.uuid().describe('Entity identifier.'),+ isReadOnly: zod+ .boolean()+ .describe(+ 'Whether the selected canonical source is read-only.'+ ),+ location: zod+ .string()+ .nullish()+ .describe('Optional location label.'),+ organizerEmail: zod+ .string()+ .nullish()+ .describe('Organizer email.'),+ organizerName: zod+ .string()+ .nullish()+ .describe('Organizer display name.'),+ ownerId: zod.string().describe('Owning Macro user.'),+ status: zod.string().describe('Canonical status.'),+ time: zod+ .union([+ zod+ .object({+ ends_at: zod.iso+ .datetime({})+ .describe('Exclusive end.'),+ kind: zod.enum(['timed']),+ starts_at: zod.iso+ .datetime({})+ .describe('Inclusive start.'),+ time_zone: zod+ .string()+ .nullish()+ .describe('Original IANA time zone.'),+ })+ .describe('Absolute timed event.'),+ zod+ .object({+ end_date: zod.iso+ .date()+ .describe('Exclusive end date.'),+ kind: zod.enum(['allDay']),+ start_date: zod.iso+ .date()+ .describe('Inclusive start date.'),}).describe(- 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'- )- )- .describe('Properties attached to the entity.'),+ 'All-day event with an exclusive end date.'+ ),+ ])+ .describe('Timed or all-day calendar event span.'),+ title: zod.string().describe('Display title.'),+ transparency: zod+ .string()+ .describe('Availability transparency.'),+ updatedAt: zod.iso+ .datetime({})+ .describe('Entity update timestamp.'),+ visibility: zod+ .string()+ .describe('Canonical visibility.'),})- .describe(- 'Property fields that can be flattened into property-bearing Soup items.'- )- .and(- zod.object({- attended: zod- .boolean()- .describe(- 'Whether the requesting user attended this call. Kept for compatibility\nand derived from `status == ATTENDED`.'- ),- callId: zod.uuid().describe('The call identifier.'),- channelId: zod- .uuid()- .describe('The channel this call belongs to.'),- channelName: zod- .string()- .nullish()- .describe('Resolved display name for the channel.'),- createdBy: zod- .string()- .describe('User who created the call.'),- customName: zod- .string()- .nullish()- .describe(- 'User-supplied or AI-generated display name for the call.'- ),- durationMs: zod- .number()- .nullish()- .describe(- 'Call duration in milliseconds (None if still active).'- ),- endedAt: zod.iso- .datetime({})- .nullish()- .describe(- 'When the call ended (None if still active).'- ),- isActive: zod- .boolean()- .describe('Whether the call is currently active.'),- participants: zod- .array(- zod- .object({- joinedAt: zod.iso- .datetime({})- .describe('When the user joined the call.'),- leftAt: zod.iso- .datetime({})- .nullish()- .describe(- 'When the user left (None if still in an active call).'- ),- userId: zod.string().describe('The user id.'),- })- .describe(- 'A participant in a call record, as displayed in Soup.'- )- )- .describe('Participants in the call.'),- startedAt: zod.iso- .datetime({})- .describe('When the call started.'),- status: zod- .enum(['ATTENDED', 'MISSED', 'UNATTENDED'])- .describe(- 'Viewer-relative attendance status for a call record.\nSerializes as `ATTENDED`, `MISSED`, or `UNATTENDED`.'- ),- summary: zod- .string()- .nullish()- .describe(- 'AI-generated summary of the call. Only set on archived\n`call_records` once summarization has run; active calls always\nreturn `None`.'- ),- })- )- .describe(- 'A call record as displayed in Soup. Excludes room_name, egress_id,\nand transcript — fields that are irrelevant for the soup feed.'- ),- tag: zod.enum(['call']),+ .describe('A canonical calendar event entity in Soup.'),+ tag: zod.enum(['calendarEvent']),})- .describe('Call record item.'),+ .describe('Calendar event item.'),zod.object({data: zod@@ -20098,6 +21779,7 @@ export const postItemsSoupAstGroupedResponse = zodzod.null(),zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',@@ -20198,6 +21880,7 @@ export const postItemsSoupAstGroupedResponse = zodentity_id: zod.string(),entity_type: zod.enum([+ 'CALENDAR_EVENT','CALL_RECORD','CHANNEL','CHAT',diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-properties.ts b/apps/web/src/lib/service-clients/service-storage/graphql-properties.tsindex ee46f84e09..88e57e2a23 100644--- a/apps/web/src/lib/service-clients/service-storage/graphql-properties.ts+++ b/apps/web/src/lib/service-clients/service-storage/graphql-properties.ts@@ -41,6 +41,7 @@ import { getGraphqlSoupClient } from './graphql-soup';* bad request.*/const ENTITY_TYPE_TO_GRAPHQL: Record<EntityType, GraphqlPropertyEntityType> = {+ CALENDAR_EVENT: 'CALENDAR_EVENT',CALL_RECORD: 'CALL_RECORD',CHANNEL: 'CHANNEL',CHAT: 'CHAT',diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts b/apps/web/src/lib/service-clients/service-storage/graphql-soup.tsindex c7c3b54a9f..582cd257be 100644--- a/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts+++ b/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts@@ -383,7 +383,7 @@ function mapGraphqlNotifications(notifications: GraphqlSoupNotification[]) {}));}-export function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {+export function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem | null {const frecency = item.frecencyScore ?? 0;return match(item)@@ -655,6 +655,11 @@ export function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {},}) as SoupApiItem)+ .with(+ { __typename: 'GraphqlSoupCalendarEvent' },+ // Calendar soup rendering lands with the calendar FE; skip for now.+ () => null+ ).exhaustive();}@@ -671,7 +676,9 @@ export type FetchGraphqlSoupOptions = {*/export function mapGraphqlSoupPage(data: SoupQuery): SoupPage {return {- items: data.user.soup.items.map(mapGraphqlSoupItem),+ items: data.user.soup.items+ .map(mapGraphqlSoupItem)+ .filter((item): item is SoupApiItem => item !== null),next_cursor: data.user.soup.nextCursor ?? undefined,};}@@ -682,9 +689,13 @@ export function mapGraphqlGroupedSoupPage(): GraphqlGroupedSoupPage {const items: Record<string, SoupApiItem> = {};const groups = data.user.groupSoup.bins.map((bin) => {- const itemIds = bin.items.map((item) => {- items[item.id] = mapGraphqlSoupItem(item);- return item.id;+ const itemIds = bin.items.flatMap((item) => {+ const mapped = mapGraphqlSoupItem(item);+ if (!mapped) {+ return [];+ }+ items[item.id] = mapped;+ return [item.id];});return {diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.tsindex 60d6f19f0a..284dda210b 100644--- a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts+++ b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts@@ -46,6 +46,40 @@ export type EntitySharePolicyInput = {publicAccessLevel?: GraphqlEntityAccessLevel | null | undefined;};+/** The two operands of a recursive `CalendarEventFilterExpr` binary expression. */+export type GraphqlCalendarEventBinaryExpr = {+ /** The left-hand expression. */+ left: GraphqlCalendarEventExpr;+ /** The right-hand expression. */+ right: GraphqlCalendarEventExpr;+};++/** A recursive `CalendarEventFilterExpr` filter expression. */+export type GraphqlCalendarEventExpr =+ { /** Matches when both expressions match. */+ and: GraphqlCalendarEventBinaryExpr; literal?: never; not?: never; or?: never; }+ | { and?: never; /** Matches a domain-specific literal condition. */+ literal: GraphqlCalendarEventLiteral; not?: never; or?: never; }+ | { and?: never; literal?: never; /** Negates an expression. */+ not: GraphqlCalendarEventExpr; or?: never; }+ | { and?: never; literal?: never; not?: never; /** Matches when either expression matches. */+ or: GraphqlCalendarEventBinaryExpr; };++/** GraphQL input representing a calendar event literal. */+export type GraphqlCalendarEventLiteral =+ { /** Attendee email. */+ attendee: string; endsAfter?: never; id?: never; organizer?: never; startsBefore?: never; status?: never; }+ | { attendee?: never; /** Master end must be after this RFC3339 instant. */+ endsAfter: string; id?: never; organizer?: never; startsBefore?: never; status?: never; }+ | { attendee?: never; endsAfter?: never; /** Canonical event id. */+ id: string | number; organizer?: never; startsBefore?: never; status?: never; }+ | { attendee?: never; endsAfter?: never; id?: never; /** Organizer email. */+ organizer: string; startsBefore?: never; status?: never; }+ | { attendee?: never; endsAfter?: never; id?: never; organizer?: never; /** Master start must be before this RFC3339 instant. */+ startsBefore: string; status?: never; }+ | { attendee?: never; endsAfter?: never; id?: never; organizer?: never; startsBefore?: never; /** Event status. */+ status: string; };+/** The two operands of a recursive `CallFilterExpr` binary expression. */export type GraphqlCallBinaryExpr = {/** The left-hand expression. */@@ -425,6 +459,8 @@ export type GraphqlEntityAccessLevel =/** GraphQL input mirroring `item_filters::ast::EntityFilterAst`. */export type GraphqlEntityFilterAst = {+ /** The calendar event filter to apply. */+ calendarEventFilter?: GraphqlCalendarEventExpr | null | undefined;/** The call filter to apply. */callFilter?: GraphqlCallExpr | null | undefined;/** The channel filter to apply. */@@ -474,6 +510,8 @@ export type GraphqlEntityReferenceInput = {/** Canonical entity types accepted by cross-entity APIs. */export type GraphqlEntityType =+ /** Calendar event entity. */+ | 'CALENDAR_EVENT'/** Call entity. */| 'CALL'/** Channel entity. */@@ -646,6 +684,8 @@ export type GraphqlPropertyDataType =/** An entity type supported by the properties domain. */export type GraphqlPropertyEntityType =+ /** Calendar event entity. */+ | 'CALENDAR_EVENT'/** Call record entity. */| 'CALL_RECORD'/** Channel entity. */@@ -745,6 +785,8 @@ export type GraphqlSimpleSortMethod =/** GraphQL representation of Soup entity types. */export type GraphqlSoupEntityType =+ /** Calendar event entity. */+ | 'CALENDAR_EVENT'/** Call entity. */| 'CALL'/** Channel entity. */@@ -907,6 +949,7 @@ type EntityMutationResultFields_GraphqlMutationError_Fragment = { __typename: 'Gtype EntityMutationResultFields_GraphqlMutationSuccess_Fragment = { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -980,6 +1023,7 @@ export type EntityMutationPayloadFieldsFragment = { results: Array<| { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1054,6 +1098,7 @@ export type RenameEntitiesMutation = { renameEntities: { results: Array<| { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1128,6 +1173,7 @@ export type MoveEntitiesMutation = { moveEntities: { results: Array<| { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1202,6 +1248,7 @@ export type UpdateEntitySharePoliciesMutation = { updateEntitySharePolicies: { r| { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1276,6 +1323,7 @@ export type TrashEntitiesMutation = { trashEntities: { results: Array<| { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1350,6 +1398,7 @@ export type RestoreEntitiesMutation = { restoreEntities: { results: Array<| { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1424,6 +1473,7 @@ export type DeleteEntitiesPermanentlyMutation = { deleteEntitiesPermanently: { r| { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1498,6 +1548,7 @@ export type DuplicateEntitiesMutation = { duplicateEntities: { results: Array<| { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1573,6 +1624,7 @@ export type SetEntityFavoriteMutation = { setEntityFavorite:| { __typename: 'GraphqlMutationSuccess', effects: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1643,6 +1695,7 @@ export type GroupSoupMembershipQueryVariables = Exact<{export type GroupSoupMembershipQuery = { user: { id: string, groupSoup: { bins: Array<{ key: string, totalCount: number, nextCursor: string | null, items: Array<+ | { __typename: 'GraphqlSoupCalendarEvent', id: string }| { __typename: 'GraphqlSoupCall', id: string }| { __typename: 'GraphqlSoupChannel', id: string }| { __typename: 'GraphqlSoupChannelMessage', id: string }@@ -1660,6 +1713,7 @@ export type GroupSoupQueryVariables = Exact<{export type GroupSoupQuery = { user: { id: string, groupSoup: { bins: Array<{ key: string, totalCount: number, nextCursor: string | null, items: Array<+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1722,6 +1776,8 @@ export type GroupSoupQuery = { user: { id: string, groupSoup: { bins: Array<{ ke| null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }> }> } } };+type GraphqlHistoryItemFields_GraphqlSoupCalendarEvent_Fragment = { __typename: 'GraphqlSoupCalendarEvent', id: string, entityType: GraphqlSoupEntityType, frecencyScore: number | null };+type GraphqlHistoryItemFields_GraphqlSoupCall_Fragment = { __typename: 'GraphqlSoupCall', id: string, channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, entityType: GraphqlSoupEntityType, frecencyScore: number | null, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1784,6 +1840,7 @@ type GraphqlHistoryItemFields_GraphqlSoupProject_Fragment = { __typename: 'Graph| null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> };export type GraphqlHistoryItemFieldsFragment =+ | GraphqlHistoryItemFields_GraphqlSoupCalendarEvent_Fragment| GraphqlHistoryItemFields_GraphqlSoupCall_Fragment| GraphqlHistoryItemFields_GraphqlSoupChannel_Fragment| GraphqlHistoryItemFields_GraphqlSoupChannelMessage_Fragment@@ -1813,6 +1870,7 @@ export type SetEntityPropertyMutation = { setEntityProperty: { id: string, propetype SoupPatchFields_GraphqlCacheDeletion_Fragment = { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string };type SoupPatchFields_SoupUpdated_Fragment = { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1886,6 +1944,7 @@ export type SoupUpdatesSubscriptionVariables = Exact<{ [key: string]: never; }>;export type SoupUpdatesSubscription = { soupUpdates: Array<| { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }| { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -1955,6 +2014,7 @@ export type SoupQueryVariables = Exact<{export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null, items: Array<+ | { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }| { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -2017,6 +2077,8 @@ export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null,| null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }> } } };+type SoupItemFields_GraphqlSoupCalendarEvent_Fragment = { __typename: 'GraphqlSoupCalendarEvent', frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> };+type SoupItemFields_GraphqlSoupCall_Fragment = { __typename: 'GraphqlSoupCall', channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }| { __typename: 'GraphqlDatePropertyValue', dateValue: string }@@ -2087,6 +2149,7 @@ type SoupItemFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProj| null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> };export type SoupItemFieldsFragment =+ | SoupItemFields_GraphqlSoupCalendarEvent_Fragment| SoupItemFields_GraphqlSoupCall_Fragment| SoupItemFields_GraphqlSoupChannel_Fragment| SoupItemFields_GraphqlSoupChannelMessage_Fragment@@ -2098,6 +2161,8 @@ export type SoupItemFieldsFragment =| SoupItemFields_GraphqlSoupProject_Fragment;+type SoupEntityCoreFields_GraphqlSoupCalendarEvent_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> };+type SoupEntityCoreFields_GraphqlSoupCall_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> };type SoupEntityCoreFields_GraphqlSoupChannel_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> };@@ -2117,6 +2182,7 @@ type SoupEntityCoreFields_GraphqlSoupForeignEntity_Fragment = { id: string, entitype SoupEntityCoreFields_GraphqlSoupProject_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> };export type SoupEntityCoreFieldsFragment =+ | SoupEntityCoreFields_GraphqlSoupCalendarEvent_Fragment| SoupEntityCoreFields_GraphqlSoupCall_Fragment| SoupEntityCoreFields_GraphqlSoupChannel_Fragment| SoupEntityCoreFields_GraphqlSoupChannelMessage_Fragmentdiff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.jsonindex 064ca7bdb3..cc99b57896 100644--- a/apps/web/src/lib/service-clients/service-storage/openapi.json+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json@@ -7815,6 +7815,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",@@ -10593,6 +10594,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",@@ -11566,6 +11568,9 @@"type": "object","description": "Wire-format entity filter AST accepted by soup AST endpoints.","properties": {+ "calf": {+ "description": "filters applied to canonical calendar events"+ },"callf": {"description": "the filters that should be applied to the call entity"},@@ -12425,6 +12430,50 @@}}},+ "CalendarEventFilters": {+ "type": "object",+ "description": "Filters for canonical calendar-event entities.",+ "properties": {+ "attendees": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Attendee email addresses."+ },+ "calendar_event_ids": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Canonical event ids."+ },+ "ends_after": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "Include master events ending after this instant."+ },+ "organizers": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Organizer email addresses."+ },+ "starts_before": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "Include master events starting before this instant."+ },+ "statuses": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Event statuses such as `confirmed`, `tentative`, or `cancelled`."+ }+ }+ },"CalendarOccurrence": {"type": "object","description": "A materialized recurrence instance optimized for range queries.",@@ -16752,6 +16801,10 @@"type": "object","description": "a bundle of all of the filters for each entity type","properties": {+ "calendar_event_filters": {+ "$ref": "#/components/schemas/CalendarEventFilters",+ "description": "the bundled [CalendarEventFilters]"+ },"call_filters": {"$ref": "#/components/schemas/CallFilters","description": "the bundled [CallFilters]"@@ -16919,6 +16972,7 @@"type": "string","description": "Type of entity that can be referenced by entity properties.","enum": [+ "CALENDAR_EVENT","CALL_RECORD","CHANNEL","CHAT",@@ -17082,6 +17136,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",@@ -17126,6 +17181,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",@@ -20855,6 +20911,158 @@}}},+ "SoupCalendarEventTime": {+ "oneOf": [+ {+ "type": "object",+ "description": "Absolute timed event.",+ "required": ["starts_at", "ends_at", "kind"],+ "properties": {+ "ends_at": {+ "type": "string",+ "format": "date-time",+ "description": "Exclusive end."+ },+ "kind": {+ "type": "string",+ "enum": ["timed"]+ },+ "starts_at": {+ "type": "string",+ "format": "date-time",+ "description": "Inclusive start."+ },+ "time_zone": {+ "type": ["string", "null"],+ "description": "Original IANA time zone."+ }+ }+ },+ {+ "type": "object",+ "description": "All-day event with an exclusive end date.",+ "required": ["start_date", "end_date", "kind"],+ "properties": {+ "end_date": {+ "type": "string",+ "format": "date",+ "description": "Exclusive end date."+ },+ "kind": {+ "type": "string",+ "enum": ["allDay"]+ },+ "start_date": {+ "type": "string",+ "format": "date",+ "description": "Inclusive start date."+ }+ }+ }+ ],+ "description": "Timed or all-day calendar event span."+ },+ "SoupCalendarEvent_SoupPropertiesField": {+ "type": "object",+ "description": "A canonical calendar event entity in Soup.",+ "required": [+ "id",+ "ownerId",+ "icalUid",+ "title",+ "status",+ "visibility",+ "transparency",+ "time",+ "isReadOnly",+ "createdAt",+ "updatedAt",+ "extra"+ ],+ "properties": {+ "conferenceUrl": {+ "type": ["string", "null"],+ "description": "Direct conference join URL."+ },+ "createdAt": {+ "type": "string",+ "format": "date-time",+ "description": "Entity creation timestamp."+ },+ "description": {+ "type": ["string", "null"],+ "description": "Optional description."+ },+ "extra": {+ "type": "object",+ "description": "Property fields that can be flattened into property-bearing Soup items.",+ "required": ["properties"],+ "properties": {+ "properties": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/SoupProperty"+ },+ "description": "Properties attached to the entity."+ }+ }+ },+ "icalUid": {+ "type": "string",+ "description": "RFC 5545 UID used for source reconciliation."+ },+ "id": {+ "type": "string",+ "format": "uuid",+ "description": "Entity identifier."+ },+ "isReadOnly": {+ "type": "boolean",+ "description": "Whether the selected canonical source is read-only."+ },+ "location": {+ "type": ["string", "null"],+ "description": "Optional location label."+ },+ "organizerEmail": {+ "type": ["string", "null"],+ "description": "Organizer email."+ },+ "organizerName": {+ "type": ["string", "null"],+ "description": "Organizer display name."+ },+ "ownerId": {+ "type": "string",+ "description": "Owning Macro user."+ },+ "status": {+ "type": "string",+ "description": "Canonical status."+ },+ "time": {+ "$ref": "#/components/schemas/SoupCalendarEventTime",+ "description": "Canonical master time."+ },+ "title": {+ "type": "string",+ "description": "Display title."+ },+ "transparency": {+ "type": "string",+ "description": "Availability transparency."+ },+ "updatedAt": {+ "type": "string",+ "format": "date-time",+ "description": "Entity update timestamp."+ },+ "visibility": {+ "type": "string",+ "description": "Canonical visibility."+ }+ }+ },"SoupCallRecordParticipant": {"type": "object","description": "A participant in a call record, as displayed in Soup.",@@ -21742,6 +21950,21 @@}}},+ {+ "type": "object",+ "description": "Calendar event item.",+ "required": ["data", "tag"],+ "properties": {+ "data": {+ "$ref": "#/components/schemas/SoupCalendarEvent_SoupPropertiesField",+ "description": "Calendar event item."+ },+ "tag": {+ "type": "string",+ "enum": ["calendarEvent"]+ }+ }+ },{"type": "object","description": "CRM company item.",diff --git a/crates/client/cache-core/src/meta.rs b/crates/client/cache-core/src/meta.rsindex 055e9e6e2d..9b2dbac7b5 100644--- a/crates/client/cache-core/src/meta.rs+++ b/crates/client/cache-core/src/meta.rs@@ -126,7 +126,8 @@ mod tests {assert_eq!(entity.kind, TypeKind::Interface);assert!(entity.possible_types.contains(&"GraphqlSoupDocument"));assert!(entity.possible_types.contains(&"GraphqlSoupForeignEntity"));- assert_eq!(entity.possible_types.len(), 9);+ assert!(entity.possible_types.contains(&"GraphqlSoupCalendarEvent"));+ assert_eq!(entity.possible_types.len(), 10);assert!(type_matches("GraphqlSoupDocument", "GraphqlSoupEntity"));assert!(!type_matches("GraphqlSoupItem", "GraphqlSoupEntity"));}diff --git a/crates/entity_access/src/domain/ports.rs b/crates/entity_access/src/domain/ports.rsindex b14a8e495b..fde067619a 100644--- a/crates/entity_access/src/domain/ports.rs+++ b/crates/entity_access/src/domain/ports.rs@@ -45,6 +45,13 @@ pub trait AccessRepository: Clone + Send + Sync + 'static {user_id: Option<&MacroUserId<Lowercase<'_>>>,) -> impl Future<Output = Result<Option<AccessLevel>, AccessError>> + Send;+ /// Get owner or explicitly delegated-inbox access to a calendar event.+ fn get_calendar_event_access(+ &self,+ event_id: &str,+ user_id: Option<&MacroUserId<Lowercase<'_>>>,+ ) -> impl Future<Output = Result<Option<AccessLevel>, AccessError>> + Send;+/// Return the requested email threads owned by, or inbox-delegated to, a user.fn get_owned_email_thread_ids(&self,diff --git a/crates/entity_access/src/domain/service.rs b/crates/entity_access/src/domain/service.rsindex 5873549bde..eaed39e240 100644--- a/crates/entity_access/src/domain/service.rs+++ b/crates/entity_access/src/domain/service.rs@@ -37,7 +37,7 @@ whereSelf { repo }}- /// Get access level for optimized entity types (document, chat, project, thread).+ /// Get access level for entity types with dedicated repository queries.async fn get_optimized_access(&self,entity_id: &str,@@ -50,6 +50,11 @@ whereEntityType::Project => self.repo.get_project_access(entity_id, user_id).await,EntityType::EmailThread => self.repo.get_thread_access(entity_id, user_id).await,EntityType::Call => self.repo.get_call_access(entity_id, user_id).await,+ EntityType::CalendarEvent => {+ self.repo+ .get_calendar_event_access(entity_id, user_id)+ .await+ }_ => unreachable!("Only optimized types should call this method"),}}@@ -230,7 +235,10 @@ whererole: TeamRole::Member,})}- EntityType::User | EntityType::ChannelMessage | EntityType::StaticFile => {+ EntityType::User+ | EntityType::ChannelMessage+ | EntityType::StaticFile+ | EntityType::CalendarEvent => {Err(AccessError::BadRequest("Unsupported bot entity type"))}}@@ -394,7 +402,8 @@ where| EntityType::Chat| EntityType::Project| EntityType::EmailThread- | EntityType::Call => {+ | EntityType::Call+ | EntityType::CalendarEvent => {self.get_optimized_access(entity_id, user_id, entity_type).await}@@ -462,7 +471,8 @@ where| EntityType::Chat| EntityType::Project| EntityType::EmailThread- | EntityType::Call => {+ | EntityType::Call+ | EntityType::CalendarEvent => {let access = self.get_optimized_access(entity_id, user_id, entity_type).await?;diff --git a/crates/entity_access/src/domain/service/test.rs b/crates/entity_access/src/domain/service/test.rsindex 864f13ffe5..54d7ae7218 100644--- a/crates/entity_access/src/domain/service/test.rs+++ b/crates/entity_access/src/domain/service/test.rs@@ -23,6 +23,7 @@ struct MockRepo {chat_access: Arc<Mutex<Option<AccessLevel>>>,project_access: Arc<Mutex<Option<AccessLevel>>>,thread_access: Arc<Mutex<Option<AccessLevel>>>,+ calendar_event_access: Arc<Mutex<Option<AccessLevel>>>,thread_access_calls: Arc<AtomicUsize>,owned_email_thread_ids: Arc<Mutex<Vec<Uuid>>>,call_access: Arc<Mutex<Option<AccessLevel>>>,@@ -55,6 +56,7 @@ impl MockRepo {chat_access: Arc::new(Mutex::new(None)),project_access: Arc::new(Mutex::new(None)),thread_access: Arc::new(Mutex::new(None)),+ calendar_event_access: Arc::new(Mutex::new(None)),thread_access_calls: Arc::new(AtomicUsize::new(0)),owned_email_thread_ids: Arc::new(Mutex::new(Vec::new())),call_access: Arc::new(Mutex::new(None)),@@ -229,6 +231,14 @@ impl AccessRepository for MockRepo {Ok(*self.thread_access.lock().await)}+ async fn get_calendar_event_access(+ &self,+ _event_id: &str,+ _user_id: Option<&MacroUserId<Lowercase<'_>>>,+ ) -> Result<Option<AccessLevel>, AccessError> {+ Ok(*self.calendar_event_access.lock().await)+ }+async fn get_owned_email_thread_ids(&self,thread_ids: &[Uuid],diff --git a/crates/entity_access/src/outbound/pg_access_repo/mod.rs b/crates/entity_access/src/outbound/pg_access_repo/mod.rsindex 844bd59263..cd24a10537 100644--- a/crates/entity_access/src/outbound/pg_access_repo/mod.rs+++ b/crates/entity_access/src/outbound/pg_access_repo/mod.rs@@ -131,6 +131,50 @@ impl AccessRepository for PgAccessRepository {.await?)}+ #[tracing::instrument(err, skip(self))]+ async fn get_calendar_event_access(+ &self,+ event_id: &str,+ user_id: Option<&MacroUserId<Lowercase<'_>>>,+ ) -> Result<Option<AccessLevel>, AccessError> {+ let event_id = event_id+ .parse::<Uuid>()+ .map_err(|_| AccessError::BadRequest("Invalid calendar event ID format"))?;+ let Some(user_id) = user_id else {+ return Ok(None);+ };+ let user_id = user_id.as_ref();+ let is_owner = sqlx::query_scalar!(+ r#"+ SELECT event.owner_id = $2 AS "is_owner!"+ FROM calendar_events event+ WHERE event.id = $1+ AND (+ event.owner_id = $2+ OR EXISTS (+ SELECT 1+ FROM macro_user_links link+ WHERE link.link_id = event.source_link_id+ AND link.primary_macro_id = $2+ )+ )+ "#,+ event_id,+ user_id,+ )+ .fetch_optional(&self.pool)+ .await+ .map_err(AccessError::from)?;++ Ok(is_owner.map(|is_owner| {+ if is_owner {+ AccessLevel::Owner+ } else {+ AccessLevel::Edit+ }+ }))+ }+#[tracing::instrument(err, skip(self, thread_ids, user_id))]async fn get_owned_email_thread_ids(&self,@@ -201,6 +245,7 @@ impl AccessRepository for PgAccessRepository {EntityType::User| EntityType::Channel| EntityType::ChannelMessage+ | EntityType::CalendarEvent| EntityType::Team| EntityType::ForeignEntity| EntityType::StaticFilediff --git a/crates/entity_access_db_utils/src/lib.rs b/crates/entity_access_db_utils/src/lib.rsindex c28d1a607c..49391095f5 100644--- a/crates/entity_access_db_utils/src/lib.rs+++ b/crates/entity_access_db_utils/src/lib.rs@@ -254,6 +254,7 @@ pub async fn update_entity_access_channel_share_permissions(| EntityType::Team| EntityType::Channel| EntityType::ChannelMessage+ | EntityType::CalendarEvent| EntityType::StaticFile| EntityType::CrmCompany| EntityType::CrmContact@@ -318,6 +319,7 @@ pub async fn update_entity_access_channel_share_permissions(| EntityType::Team| EntityType::Channel| EntityType::ChannelMessage+ | EntityType::CalendarEvent| EntityType::StaticFile| EntityType::CrmCompany| EntityType::CrmContactdiff --git a/crates/frecency/src/outbound/postgres/dynamic_tests.rs b/crates/frecency/src/outbound/postgres/dynamic_tests.rsindex 8ea614ece7..7cbb98f7ff 100644--- a/crates/frecency/src/outbound/postgres/dynamic_tests.rs+++ b/crates/frecency/src/outbound/postgres/dynamic_tests.rs@@ -954,6 +954,7 @@ async fn test_dynamic_filter_document_date_created_at_gt(pool: PgPool) {document_filter: Some(Arc::new(Expr::Literal(DocumentLiteral::CreatedAt(DateLiteral::GreaterThan(cutoff),)))),+ calendar_event_filter: None,project_filter: None,chat_filter: None,email_filter: item_filters::ast::EmailFilterAst::default(),@@ -1048,6 +1049,7 @@ async fn test_dynamic_filter_document_date_created_at_lt(pool: PgPool) {document_filter: Some(Arc::new(Expr::Literal(DocumentLiteral::CreatedAt(DateLiteral::LessThan(cutoff),)))),+ calendar_event_filter: None,project_filter: None,chat_filter: None,email_filter: item_filters::ast::EmailFilterAst::default(),@@ -1138,6 +1140,7 @@ async fn test_dynamic_filter_document_date_updated_at_gt(pool: PgPool) {document_filter: Some(Arc::new(Expr::Literal(DocumentLiteral::UpdatedAt(DateLiteral::GreaterThan(cutoff),)))),+ calendar_event_filter: None,project_filter: None,chat_filter: None,email_filter: item_filters::ast::EmailFilterAst::default(),@@ -1233,6 +1236,7 @@ async fn test_dynamic_filter_document_date_updated_at_lt(pool: PgPool) {document_filter: Some(Arc::new(Expr::Literal(DocumentLiteral::UpdatedAt(DateLiteral::LessThan(cutoff),)))),+ calendar_event_filter: None,project_filter: None,chat_filter: None,email_filter: item_filters::ast::EmailFilterAst::default(),diff --git a/crates/graphql_common/src/entity_type.rs b/crates/graphql_common/src/entity_type.rsindex 6910ef9f56..a9bd5a1b01 100644--- a/crates/graphql_common/src/entity_type.rs+++ b/crates/graphql_common/src/entity_type.rs@@ -22,6 +22,8 @@ pub enum GraphqlSoupEntityType {CrmCompany,/// Foreign entity.ForeignEntity,+ /// Calendar event entity.+ CalendarEvent,}/// Canonical entity types accepted by cross-entity APIs.@@ -41,6 +43,8 @@ pub enum GraphqlEntityType {ChannelMessage,/// Call entity.Call,+ /// Calendar event entity.+ CalendarEvent,/// CRM company entity.CrmCompany,/// Foreign entity.@@ -76,6 +80,7 @@ impl GraphqlSoupEntityType {EntityType::Call => Self::Call,EntityType::CrmCompany => Self::CrmCompany,EntityType::ForeignEntity => Self::ForeignEntity,+ EntityType::CalendarEvent => Self::CalendarEvent,_ => return None,})}@@ -92,6 +97,7 @@ impl GraphqlSoupEntityType {Self::Call => EntityType::Call,Self::CrmCompany => EntityType::CrmCompany,Self::ForeignEntity => EntityType::ForeignEntity,+ Self::CalendarEvent => EntityType::CalendarEvent,}}}@@ -107,6 +113,7 @@ impl GraphqlEntityType {EntityType::Channel => Self::Channel,EntityType::ChannelMessage => Self::ChannelMessage,EntityType::Call => Self::Call,+ EntityType::CalendarEvent => Self::CalendarEvent,EntityType::CrmCompany => Self::CrmCompany,EntityType::ForeignEntity => Self::ForeignEntity,EntityType::User => Self::User,@@ -124,6 +131,7 @@ impl GraphqlEntityType {/// Convert this GraphQL entity type into the canonical model type.pub fn into_model(self) -> EntityType {match self {+ Self::CalendarEvent => EntityType::CalendarEvent,Self::Document => EntityType::Document,Self::Chat => EntityType::Chat,Self::Project => EntityType::Project,diff --git a/crates/graphql_common/src/property_filter.rs b/crates/graphql_common/src/property_filter.rsindex 9778f332a7..44820fe09b 100644--- a/crates/graphql_common/src/property_filter.rs+++ b/crates/graphql_common/src/property_filter.rs@@ -71,6 +71,8 @@ impl GraphqlPropertyMatchValue {/// An entity type supported by the properties domain.#[derive(Enum, Copy, Clone, Eq, PartialEq)]pub enum GraphqlPropertyEntityType {+ /// Calendar event entity.+ CalendarEvent,/// Call record entity.CallRecord,/// Channel entity.@@ -95,6 +97,7 @@ impl GraphqlPropertyEntityType {/// Construct a GraphQL property entity type from its properties-domain model.pub fn new(value: models_properties::EntityType) -> Self {match value {+ models_properties::EntityType::CalendarEvent => Self::CalendarEvent,models_properties::EntityType::CallRecord => Self::CallRecord,models_properties::EntityType::Channel => Self::Channel,models_properties::EntityType::Chat => Self::Chat,@@ -110,6 +113,7 @@ impl GraphqlPropertyEntityType {/// Convert this GraphQL entity type into its properties-domain model.pub fn into_model(self) -> models_properties::EntityType {match self {+ Self::CalendarEvent => models_properties::EntityType::CalendarEvent,Self::CallRecord => models_properties::EntityType::CallRecord,Self::Channel => models_properties::EntityType::Channel,Self::Chat => models_properties::EntityType::Chat,@@ -128,6 +132,7 @@ impl TryFrom<GraphqlPropertyEntityType> for PropertyEntityType {fn try_from(value: GraphqlPropertyEntityType) -> Result<Self, Self::Error> {Ok(match value {+ GraphqlPropertyEntityType::CalendarEvent => Self::CalendarEvent,GraphqlPropertyEntityType::Channel => Self::Channel,GraphqlPropertyEntityType::Chat => Self::Chat,GraphqlPropertyEntityType::Company => Self::Company,diff --git a/crates/graphql_notification/src/loaders.rs b/crates/graphql_notification/src/loaders.rsindex 6b4f4bd0a8..ec5a580f6a 100644--- a/crates/graphql_notification/src/loaders.rs+++ b/crates/graphql_notification/src/loaders.rs@@ -32,7 +32,8 @@ fn notification_item_type(entity_type: model_entity::EntityType) -> Option<Notif| EntityType::Team| EntityType::StaticFile| EntityType::CrmCompany- | EntityType::CrmContact => None,+ | EntityType::CrmContact+ | EntityType::CalendarEvent => None,}}diff --git a/crates/graphql_soup/src/inputs.rs b/crates/graphql_soup/src/inputs.rsindex 2fd03ed083..ed7f3f8aca 100644--- a/crates/graphql_soup/src/inputs.rs+++ b/crates/graphql_soup/src/inputs.rs@@ -12,6 +12,7 @@ use item_filters::{CallStatus, SharedEmailFilter,ast::{CrmScope, EmailFilterAst, EntityFilterAst,+ calendar_event::CalendarEventLiteral,call::CallLiteral,channel::{ChannelLiteral, ChannelThreadLiteral, ChannelTypeFilter},chat::{ChatLiteral, ChatRole},@@ -366,6 +367,8 @@ impl GraphqlEmailView {/// GraphQL input mirroring `item_filters::ast::EntityFilterAst`.#[derive(async_graphql::InputObject)]struct GraphqlEntityFilterAst {+ /// The calendar event filter to apply.+ calendar_event_filter: Option<GraphqlCalendarEventExpr>,/// The document filter to apply.document_filter: Option<GraphqlDocumentExpr>,/// The project filter to apply.@@ -392,6 +395,7 @@ impl GraphqlEntityFilterAst {/// Convert this value into the ast representation.fn into_ast(self) -> async_graphql::Result<EntityFilterAst> {Ok(EntityFilterAst {+ calendar_event_filter: optional_tree(self.calendar_event_filter)?,document_filter: optional_tree(self.document_filter)?,project_filter: optional_tree(self.project_filter)?,chat_filter: optional_tree(self.chat_filter)?,@@ -410,6 +414,13 @@ impl GraphqlEntityFilterAst {}}+filter_expr_input!(+ GraphqlCalendarEventExpr,+ GraphqlCalendarEventBinaryExpr,+ GraphqlCalendarEventLiteral,+ CalendarEventLiteral,+ "CalendarEventFilterExpr"+);filter_expr_input!(GraphqlDocumentExpr,GraphqlDocumentBinaryExpr,@@ -417,6 +428,45 @@ filter_expr_input!(DocumentLiteral,"DocumentFilterExpr");++/// GraphQL input representing a calendar event literal.+#[derive(async_graphql::OneofObject)]+enum GraphqlCalendarEventLiteral {+ /// Canonical event id.+ Id(ID),+ /// Event status.+ Status(String),+ /// Master start must be before this RFC3339 instant.+ StartsBefore(String),+ /// Master end must be after this RFC3339 instant.+ EndsAfter(String),+ /// Attendee email.+ Attendee(String),+ /// Organizer email.+ Organizer(String),+}++impl IntoFilterExpr<CalendarEventLiteral> for GraphqlCalendarEventLiteral {+ fn into_expr(self) -> async_graphql::Result<Expr<CalendarEventLiteral>> {+ let parse_date = |value: String| {+ DateTime::parse_from_rfc3339(&value)+ .map(|date| date.with_timezone(&Utc))+ .map_err(|error| {+ async_graphql::Error::new(format!(+ "invalid RFC3339 calendar date `{value}`: {error}"+ ))+ })+ };+ Ok(Expr::val(match self {+ Self::Id(id) => CalendarEventLiteral::Id(parse_id(id, "id")?),+ Self::Status(status) => CalendarEventLiteral::Status(status.to_ascii_lowercase()),+ Self::StartsBefore(value) => CalendarEventLiteral::StartsBefore(parse_date(value)?),+ Self::EndsAfter(value) => CalendarEventLiteral::EndsAfter(parse_date(value)?),+ Self::Attendee(email) => CalendarEventLiteral::Attendee(email.to_ascii_lowercase()),+ Self::Organizer(email) => CalendarEventLiteral::Organizer(email.to_ascii_lowercase()),+ }))+ }+}filter_expr_input!(GraphqlProjectExpr,GraphqlProjectBinaryExpr,diff --git a/crates/graphql_soup/src/loaders.rs b/crates/graphql_soup/src/loaders.rsindex 4b9cafd736..c6de7ff198 100644--- a/crates/graphql_soup/src/loaders.rs+++ b/crates/graphql_soup/src/loaders.rs@@ -18,6 +18,7 @@ use filter_ast::Expr;use futures::{future::BoxFuture, future::try_join_all};use item_filters::ast::{EmailFilterAst, EntityFilterAst,+ calendar_event::CalendarEventLiteral,call::CallLiteral,channel::{ChannelLiteral, ChannelThreadLiteral},chat::ChatLiteral,@@ -335,6 +336,7 @@ fn entity_filter_ast(entities: &[Entity<'static>]) -> Result<EntityFilterAst, Solet mut calls = Vec::new();let mut crm_companies = Vec::new();let mut foreign_entities = Vec::new();+ let mut calendar_events = Vec::new();for entity in entities {let id = Uuid::parse_str(entity.entity_id.as_ref()).map_err(|error| {@@ -357,6 +359,7 @@ fn entity_filter_ast(entities: &[Entity<'static>]) -> Result<EntityFilterAst, SoEntityType::Call => calls.push(CallLiteral::CallId(id)),EntityType::CrmCompany => crm_companies.push(CrmCompanyLiteral::Id(id)),EntityType::ForeignEntity => foreign_entities.push(ForeignEntityLiteral::Id(id)),+ EntityType::CalendarEvent => calendar_events.push(CalendarEventLiteral::Id(id)),EntityType::User| EntityType::Team| EntityType::StaticFile@@ -372,6 +375,7 @@ fn entity_filter_ast(entities: &[Entity<'static>]) -> Result<EntityFilterAst, Solet nil = Uuid::nil();Ok(EntityFilterAst {+ calendar_event_filter: Some(literal_tree(calendar_events, CalendarEventLiteral::Id(nil))),document_filter: Some(literal_tree(documents, DocumentLiteral::Id(nil))),project_filter: Some(literal_tree(projects, ProjectLiteral::ProjectIdSelf(nil))),chat_filter: Some(literal_tree(chats, ChatLiteral::ChatId(nil))),diff --git a/crates/graphql_soup/src/objects.rs b/crates/graphql_soup/src/objects.rsindex 9d5be4eb90..3810b1022d 100644--- a/crates/graphql_soup/src/objects.rs+++ b/crates/graphql_soup/src/objects.rs@@ -10,6 +10,7 @@ use macro_user_id::user_id::MacroUserIdStr;use model_entity::Entity;use models_pagination::PaginatedOpaqueCursor;use models_soup::{+ calendar_event::SoupCalendarEvent,call_record::{SoupCallRecord, SoupCallRecordParticipant},chat::SoupChat,comms::{ChannelMessage, ChannelParticipant, ChannelType, SoupChannel, SoupChannelThread},@@ -180,6 +181,8 @@ impl<E: SoupEntityEdges> GraphqlSoupEntity<E> {Self::Call(entity) => entity.2 = score,Self::CrmCompany(entity) => entity.2 = score,Self::ForeignEntity(entity) => entity.2 = score,+ // Calendar events carry no frecency slot; scores never target them.+ Self::CalendarEvent(_) => {}}self}@@ -275,6 +278,8 @@ pub enum GraphqlSoupEntity<E: SoupEntityEdges> {ChannelMessage(GraphqlSoupChannelMessage<E>),/// Call entity.Call(GraphqlSoupCall<E>),+ /// Calendar event entity.+ CalendarEvent(GraphqlSoupCalendarEvent<E>),/// CRM company entity.CrmCompany(GraphqlSoupCrmCompany<E>),/// Foreign entity.@@ -301,6 +306,7 @@ whereGraphqlSoupEntityType::Call => GraphqlSoupCall::<E>::type_name(),GraphqlSoupEntityType::CrmCompany => GraphqlSoupCrmCompany::<E>::type_name(),GraphqlSoupEntityType::ForeignEntity => GraphqlSoupForeignEntity::<E>::type_name(),+ GraphqlSoupEntityType::CalendarEvent => GraphqlSoupCalendarEvent::<E>::type_name(),}.into_owned(),)@@ -351,6 +357,12 @@ where);Self::Call(GraphqlSoupCall(item, edges, None))}+ SoupItem::CalendarEvent(item) => {+ let edges = E::from_entity(+ model_entity::EntityType::CalendarEvent.with_entity_string(item.id.to_string()),+ );+ Self::CalendarEvent(GraphqlSoupCalendarEvent(item, edges))+ }SoupItem::CrmCompany(item) => {let edges = E::from_entity(model_entity::EntityType::CrmCompany.with_entity_string(item.id.to_string()),@@ -367,6 +379,104 @@ where}}+/// GraphQL calendar event entity.+pub struct GraphqlSoupCalendarEvent<E: SoupEntityEdges>(SoupCalendarEvent<()>, E);++/// GraphQL representation of a canonical calendar event.+#[Object(name = "GraphqlSoupCalendarEvent")]+impl<E> GraphqlSoupCalendarEvent<E>+where+ E: SoupEntityEdges,+{+ /// The unique identifier.+ async fn id(&self) -> ID {+ ID(self.0.id.to_string())+ }++ /// Canonical entity kind.+ async fn entity_type(&self) -> GraphqlSoupEntityType {+ GraphqlSoupEntityType::CalendarEvent+ }++ /// User-visible display name.+ async fn display_name(&self) -> Option<String> {+ Some(self.0.title.clone())+ }++ /// Common calendar event metadata.+ async fn metadata(&self) -> GraphqlEntityMetadata {+ GraphqlEntityMetadata {+ owner_id: Some(self.0.owner_id.clone()),+ parent: None,+ created_at: Some(self.0.created_at.to_rfc3339()),+ updated_at: Some(self.0.updated_at.to_rfc3339()),+ viewed_at: None,+ deleted_at: None,+ }+ }++ /// The owning Macro user.+ async fn owner_id(&self) -> &str {+ &self.0.owner_id+ }++ /// The event title.+ async fn title(&self) -> &str {+ &self.0.title+ }++ /// The event description.+ async fn description(&self) -> Option<&str> {+ self.0.description.as_deref()+ }++ /// The event location.+ async fn location(&self) -> Option<&str> {+ self.0.location.as_deref()+ }++ /// Canonical event status.+ async fn status(&self) -> &str {+ &self.0.status+ }++ /// Timed or all-day event span.+ async fn time(&self) -> Json<serde_json::Value> {+ Json(serde_json::to_value(&self.0.time).unwrap_or(serde_json::Value::Null))+ }++ /// Direct conference join URL.+ async fn conference_url(&self) -> Option<&str> {+ self.0.conference_url.as_deref()+ }++ /// Whether the canonical source is read-only.+ async fn is_read_only(&self) -> bool {+ self.0.is_read_only+ }++ /// Creation timestamp.+ async fn created_at(&self) -> String {+ self.0.created_at.to_rfc3339()+ }++ /// Update timestamp.+ async fn updated_at(&self) -> String {+ self.0.updated_at.to_rfc3339()+ }++ /// The viewer's frecency score for this entity, when loaded.+ async fn frecency_score(&self) -> Option<f64> {+ None+ }++ #[graphql(flatten)]+ /// Common entity edges.+ async fn edges(&self) -> E {+ self.1.clone()+ }+}+/// GraphQL document entity.pub struct GraphqlSoupDocument<E: SoupEntityEdges>(SoupDocument<()>, E, Option<f64>);@@ -1718,6 +1828,7 @@ macro_rules! impl_common_interface_edges {}impl_common_interface_edges!(+ GraphqlSoupCalendarEvent,GraphqlSoupDocument,GraphqlSoupChat,GraphqlSoupProject,diff --git a/crates/item_filters/src/ast.rs b/crates/item_filters/src/ast.rsindex 903c60e7a1..3aa1eaa42f 100644--- a/crates/item_filters/src/ast.rs+++ b/crates/item_filters/src/ast.rs@@ -2,10 +2,11 @@//! This is used to construct a strictly typed ast for the input filters, allowing consumers to have a logical represenation of the required operationsuse crate::{- CallFilters, ChannelFilters, ChannelThreadFilters, ChatFilters, CrmCompanyFilters,- DocumentFilters, EmailFilters, EntityFilters, ForeignEntityFilters, ProjectFilters,- PropertyFilter,+ CalendarEventFilters, CallFilters, ChannelFilters, ChannelThreadFilters, ChatFilters,+ CrmCompanyFilters, DocumentFilters, EmailFilters, EntityFilters, ForeignEntityFilters,+ ProjectFilters, PropertyFilter,ast::{+ calendar_event::CalendarEventLiteral,call::CallLiteral,channel::{ChannelLiteral, ChannelThreadLiteral, ChannelTypeFilter},chat::{ChatLiteral, ChatRole},@@ -23,6 +24,8 @@ use serde::{Deserialize, Serialize};use std::{marker::PhantomData, sync::Arc};use thiserror::Error;+/// contains the ast literal value for calendar events+pub mod calendar_event;/// contains the ast literal value for callspub mod call;/// contains the ast literal value for channels@@ -176,6 +179,10 @@ impl IsEmpty for EmailFilterAst {#[derive(Debug, Default, Serialize, Deserialize, Clone)]#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]pub struct EntityFilterAst {+ /// filters applied to canonical calendar events+ #[serde(default, rename = "calf")]+ #[cfg_attr(feature = "schema", schema(value_type = serde_json::Value))]+ pub calendar_event_filter: LiteralTree<CalendarEventLiteral>,/// the filters that should be applied to the document entity#[serde(default, rename = "df")]#[cfg_attr(feature = "schema", schema(value_type = serde_json::Value))]@@ -235,6 +242,10 @@ impl EntityFilterAst {.map(|(_, scope)| scope);let email_tree = EmailFilters::expand_ast(entity_filter.email_filters)?.map(Arc::new);Ok(Some(EntityFilterAst {+ calendar_event_filter: CalendarEventFilters::expand_ast(+ entity_filter.calendar_event_filters,+ )?+ .map(Arc::new),document_filter: DocumentFilters::expand_ast(entity_filter.document_filters)?.map(Arc::new),project_filter: ProjectFilters::expand_ast(entity_filter.project_filters)?@@ -284,6 +295,7 @@ impl EntityFilterAst {#[cfg(feature = "mock")]pub fn mock_empty() -> Self {Self {+ calendar_event_filter: None,document_filter: None,project_filter: None,chat_filter: None,@@ -316,6 +328,7 @@ fn crm_company_requests_admin(expr: &Expr<CrmCompanyLiteral>) -> bool {impl IsEmpty for EntityFilterAst {fn is_empty(&self) -> bool {let EntityFilterAst {+ calendar_event_filter,document_filter,project_filter,chat_filter,@@ -327,7 +340,8 @@ impl IsEmpty for EntityFilterAst {foreign_entity_filter,properties_filter,} = self;- document_filter.is_none()+ calendar_event_filter.is_none()+ && document_filter.is_none()&& project_filter.is_none()&& chat_filter.is_none()&& email_filter.is_empty()diff --git a/crates/item_filters/src/ast/calendar_event.rs b/crates/item_filters/src/ast/calendar_event.rsnew file mode 100644index 0000000000..b2708d853c--- /dev/null+++ b/crates/item_filters/src/ast/calendar_event.rs@@ -0,0 +1,73 @@+use chrono::{DateTime, Utc};+use filter_ast::{ExpandFrame, Expr, FoldTree, TryExpandNode};+use serde::{Deserialize, Serialize};+use uuid::Uuid;++use crate::{CalendarEventFilters, ast::ExpandErr};++/// Literal values supported by calendar-event Soup filters.+#[derive(Debug, Serialize, Deserialize, Clone)]+pub enum CalendarEventLiteral {+ /// Match a canonical event id.+ #[serde(rename = "id")]+ Id(Uuid),+ /// Match a canonical event status.+ #[serde(rename = "s")]+ Status(String),+ /// Match events whose master start is before this instant.+ #[serde(rename = "sb")]+ StartsBefore(DateTime<Utc>),+ /// Match events whose master end is after this instant.+ #[serde(rename = "ea")]+ EndsAfter(DateTime<Utc>),+ /// Match an attendee email.+ #[serde(rename = "a")]+ Attendee(String),+ /// Match an organizer email.+ #[serde(rename = "o")]+ Organizer(String),+}++impl ExpandFrame<CalendarEventLiteral> for CalendarEventFilters {+ type Err = ExpandErr;++ fn expand_ast(+ filters: CalendarEventFilters,+ ) -> Result<Option<Expr<CalendarEventLiteral>>, Self::Err> {+ let ids = filters+ .calendar_event_ids+ .iter()+ .map(|id| Uuid::parse_str(id))+ .try_expand(|id| id.map(CalendarEventLiteral::Id), Expr::or)?;+ let statuses = filters+ .statuses+ .into_iter()+ .map(|status| status.to_ascii_lowercase())+ .expand(CalendarEventLiteral::Status, Expr::or);+ let attendees = filters+ .attendees+ .into_iter()+ .map(|email| email.to_ascii_lowercase())+ .expand(CalendarEventLiteral::Attendee, Expr::or);+ let organizers = filters+ .organizers+ .into_iter()+ .map(|email| email.to_ascii_lowercase())+ .expand(CalendarEventLiteral::Organizer, Expr::or);++ Ok([+ ids,+ statuses,+ filters+ .starts_before+ .map(|value| Expr::val(CalendarEventLiteral::StartsBefore(value))),+ filters+ .ends_after+ .map(|value| Expr::val(CalendarEventLiteral::EndsAfter(value))),+ attendees,+ organizers,+ ]+ .into_iter()+ .fold_with(Expr::and))+ }+}diff --git a/crates/item_filters/src/ast/properties.rs b/crates/item_filters/src/ast/properties.rsindex 5a8381e6f4..960a196116 100644--- a/crates/item_filters/src/ast/properties.rs+++ b/crates/item_filters/src/ast/properties.rs@@ -15,6 +15,8 @@ use filter_ast::{ExpandFrame, Expr, FoldTree, TryExpandNode};#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]#[serde(rename_all = "SCREAMING_SNAKE_CASE")]pub enum PropertyEntityType {+ /// Calendar event entity+ CalendarEvent,/// Channel entityChannel,/// Chat entity@@ -42,6 +44,7 @@ impl FromStr for PropertyEntityType {type Err = PropertyEntityTypeError;fn from_str(s: &str) -> Result<Self, Self::Err> {match s {+ "CALENDAR_EVENT" => Ok(Self::CalendarEvent),"CHANNEL" => Ok(Self::Channel),"CHAT" => Ok(Self::Chat),"COMPANY" => Ok(Self::Company),@@ -58,6 +61,7 @@ impl FromStr for PropertyEntityType {impl fmt::Display for PropertyEntityType {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {match self {+ Self::CalendarEvent => write!(f, "CALENDAR_EVENT"),Self::Channel => write!(f, "CHANNEL"),Self::Chat => write!(f, "CHAT"),Self::Company => write!(f, "COMPANY"),diff --git a/crates/item_filters/src/lib.rs b/crates/item_filters/src/lib.rsindex 1d8fd24e13..2820586687 100644--- a/crates/item_filters/src/lib.rs+++ b/crates/item_filters/src/lib.rs@@ -369,6 +369,41 @@ impl IsEmpty for CallFilters {}}+/// Filters for canonical calendar-event entities.+#[derive(Debug, Serialize, Deserialize, Default, PartialEq, Clone)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema, schemars::JsonSchema))]+pub struct CalendarEventFilters {+ /// Canonical event ids.+ #[serde(default, skip_serializing_if = "Vec::is_empty")]+ pub calendar_event_ids: Vec<String>,+ /// Event statuses such as `confirmed`, `tentative`, or `cancelled`.+ #[serde(default, skip_serializing_if = "Vec::is_empty")]+ pub statuses: Vec<String>,+ /// Include master events starting before this instant.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub starts_before: Option<chrono::DateTime<chrono::Utc>>,+ /// Include master events ending after this instant.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub ends_after: Option<chrono::DateTime<chrono::Utc>>,+ /// Attendee email addresses.+ #[serde(default, skip_serializing_if = "Vec::is_empty")]+ pub attendees: Vec<String>,+ /// Organizer email addresses.+ #[serde(default, skip_serializing_if = "Vec::is_empty")]+ pub organizers: Vec<String>,+}++impl IsEmpty for CalendarEventFilters {+ fn is_empty(&self) -> bool {+ self.calendar_event_ids.is_empty()+ && self.statuses.is_empty()+ && self.starts_before.is_none()+ && self.ends_after.is_none()+ && self.attendees.is_empty()+ && self.organizers.is_empty()+ }+}+/// Filters for foreign entity records.#[derive(Debug, Serialize, Deserialize, Default, PartialEq, Clone)]#[cfg_attr(feature = "schema", derive(utoipa::ToSchema, schemars::JsonSchema))]@@ -634,6 +669,9 @@ pub enum TagFilterMode {#[derive(Debug, Clone, Default, Deserialize, Serialize)]#[cfg_attr(feature = "schema", derive(utoipa::ToSchema, schemars::JsonSchema))]pub struct EntityFilters {+ /// the bundled [CalendarEventFilters]+ #[serde(default)]+ pub calendar_event_filters: CalendarEventFilters,/// the bundled [ProjectFilters]#[serde(default)]pub project_filters: ProjectFilters,@@ -678,6 +716,7 @@ pub struct EntityFilters {impl IsEmpty for EntityFilters {fn is_empty(&self) -> bool {let EntityFilters {+ calendar_event_filters,project_filters,document_filters,chat_filters,@@ -692,7 +731,8 @@ impl IsEmpty for EntityFilters {// Mode is a modifier on tag_option_ids, not a filter by itself.tag_filter_mode: _,} = self;- project_filters.is_empty()+ calendar_event_filters.is_empty()+ && project_filters.is_empty()&& document_filters.is_empty()&& chat_filters.is_empty()&& channel_filters.is_empty()diff --git a/crates/macro_db_client/migrations/20260726023229_calendar_event_property_entity_type.sql b/crates/macro_db_client/migrations/20260726023229_calendar_event_property_entity_type.sqlnew file mode 100644index 0000000000..dc79a73e22--- /dev/null+++ b/crates/macro_db_client/migrations/20260726023229_calendar_event_property_entity_type.sql@@ -0,0 +1,4 @@+-- Add migration script here+-- Calendar events become property-bearing entities with the Soup/GraphQL layer.+ALTER TYPE property_entity_type+ ADD VALUE IF NOT EXISTS 'CALENDAR_EVENT';diff --git a/crates/macro_db_client/src/item_access/delete.rs b/crates/macro_db_client/src/item_access/delete.rsindex 500fe10ca7..15bcd227e6 100644--- a/crates/macro_db_client/src/item_access/delete.rs+++ b/crates/macro_db_client/src/item_access/delete.rs@@ -37,6 +37,7 @@ pub async fn delete_user_entity_access_bulk(| EntityType::Team| EntityType::Channel| EntityType::ChannelMessage+ | EntityType::CalendarEvent| EntityType::StaticFile| EntityType::CrmCompany| EntityType::CrmContactdiff --git a/crates/model-entity/src/lib.rs b/crates/model-entity/src/lib.rsindex 5fda4ac07c..3217f639a4 100644--- a/crates/model-entity/src/lib.rs+++ b/crates/model-entity/src/lib.rs@@ -46,6 +46,8 @@ pub enum EntityType {Project,/// The entity is an email threadEmailThread,+ /// The entity is a calendar event+ CalendarEvent,/// The entity is a teamTeam,/// The entity is a voice/video call@@ -72,6 +74,9 @@ impl EntityType {EntityType::Document => true,EntityType::Project => true,EntityType::EmailThread => true,+ // Calendar events use owner or inbox-delegation authorization and+ // are not represented in entity_access/project membership.+ EntityType::CalendarEvent => false,// Calls are handled by entity_access by resolving through the call's// owning channel (access is inherited from channel membership).EntityType::Call => true,diff --git a/crates/models_properties/src/shared/entity_type.rs b/crates/models_properties/src/shared/entity_type.rsindex 359ea783fd..b657c64b10 100644--- a/crates/models_properties/src/shared/entity_type.rs+++ b/crates/models_properties/src/shared/entity_type.rs@@ -13,6 +13,7 @@ use utoipa::ToSchema;rename_all = "SCREAMING_SNAKE_CASE")]pub enum EntityType {+ CalendarEvent,CallRecord,Channel,Chat,@@ -27,6 +28,7 @@ pub enum EntityType {impl fmt::Display for EntityType {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {match self {+ EntityType::CalendarEvent => write!(f, "calendar_event"),EntityType::CallRecord => write!(f, "call_record"),EntityType::Channel => write!(f, "channel"),EntityType::Chat => write!(f, "chat"),@@ -48,6 +50,7 @@ impl FromStr for EntityType {type Err = NoConversion;fn from_str(s: &str) -> Result<Self, Self::Err> {match s.to_lowercase().as_str() {+ "calendar_event" => Ok(Self::CalendarEvent),"call_record" => Ok(Self::CallRecord),"channel" => Ok(Self::Channel),"chat" => Ok(Self::Chat),diff --git a/crates/models_soup/src/calendar_event.rs b/crates/models_soup/src/calendar_event.rsnew file mode 100644index 0000000000..e969991b2e--- /dev/null+++ b/crates/models_soup/src/calendar_event.rs@@ -0,0 +1,73 @@+//! Calendar event models for Soup responses.++use chrono::{DateTime, NaiveDate, Utc};+use serde::{Deserialize, Serialize};+use uuid::Uuid;++/// Timed or all-day calendar event span.+#[derive(Clone, Serialize, Deserialize, Debug)]+#[serde(+ rename_all = "camelCase",+ rename_all_fields = "camelCase",+ tag = "kind"+)]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+pub enum SoupCalendarEventTime {+ /// Absolute timed event.+ Timed {+ /// Inclusive start.+ starts_at: DateTime<Utc>,+ /// Exclusive end.+ ends_at: DateTime<Utc>,+ /// Original IANA time zone.+ time_zone: Option<String>,+ },+ /// All-day event with an exclusive end date.+ AllDay {+ /// Inclusive start date.+ start_date: NaiveDate,+ /// Exclusive end date.+ end_date: NaiveDate,+ },+}++/// A canonical calendar event entity in Soup.+#[derive(Clone, Serialize, Deserialize, Debug)]+#[serde(rename_all = "camelCase")]+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]+pub struct SoupCalendarEvent<T = ()> {+ /// Entity identifier.+ pub id: Uuid,+ /// Owning Macro user.+ pub owner_id: String,+ /// RFC 5545 UID used for source reconciliation.+ pub ical_uid: String,+ /// Display title.+ pub title: String,+ /// Optional description.+ pub description: Option<String>,+ /// Optional location label.+ pub location: Option<String>,+ /// Canonical status.+ pub status: String,+ /// Canonical visibility.+ pub visibility: String,+ /// Availability transparency.+ pub transparency: String,+ /// Canonical master time.+ pub time: SoupCalendarEventTime,+ /// Organizer email.+ pub organizer_email: Option<String>,+ /// Organizer display name.+ pub organizer_name: Option<String>,+ /// Direct conference join URL.+ pub conference_url: Option<String>,+ /// Whether the selected canonical source is read-only.+ pub is_read_only: bool,+ /// Entity creation timestamp.+ pub created_at: DateTime<Utc>,+ /// Entity update timestamp.+ pub updated_at: DateTime<Utc>,+ /// Additional enriched data such as properties.+ pub extra: T,+}diff --git a/crates/models_soup/src/item.rs b/crates/models_soup/src/item.rsindex 4dfa9bafff..8fe0c5a270 100644--- a/crates/models_soup/src/item.rs+++ b/crates/models_soup/src/item.rs@@ -1,3 +1,4 @@+use crate::calendar_event::SoupCalendarEvent;use crate::call_record::SoupCallRecord;use crate::crm_company::SoupCrmCompany;use crate::document::SoupDocument;@@ -37,6 +38,8 @@ pub enum SoupItem<T = ()> {ChannelThread(SoupChannelThread),/// Call record item.Call(SoupCallRecord<T>),+ /// Calendar event item.+ CalendarEvent(SoupCalendarEvent<T>),/// CRM company item.CrmCompany(SoupCrmCompany<T>),/// Foreign entity item.@@ -68,6 +71,9 @@ impl<T> SoupItem<T> {SoupItem::Call(record) => {EntityType::Call.with_entity_string(record.call_id.to_string())}+ SoupItem::CalendarEvent(event) => {+ EntityType::CalendarEvent.with_entity_string(event.id.to_string())+ }SoupItem::CrmCompany(company) => {EntityType::CrmCompany.with_entity_string(company.id.to_string())}@@ -88,6 +94,7 @@ impl<T> SoupItem<T> {SoupItem::ChannelThread(thread) => thread.effective_updated_at(),// Calls intentionally lack `updated_at`; recency follows their lifecycle timestamps.SoupItem::Call(record) => record.ended_at.unwrap_or(record.started_at),+ SoupItem::CalendarEvent(event) => event.updated_at,SoupItem::CrmCompany(company) => company.updated_at,SoupItem::ForeignEntity(foreign_entity) => foreign_entity.updated_at,}@@ -150,6 +157,9 @@ impl<T> SoupItem<T> {// Calls intentionally lack `updated_at`; recency follows their lifecycle timestamps.(SoupItem::Call(record), SimpleSortMethod::CreatedAt) => record.started_at,(SoupItem::Call(record), _) => record.ended_at.unwrap_or(record.started_at),+ (SoupItem::CalendarEvent(event), SimpleSortMethod::CreatedAt) => event.created_at,+ (SoupItem::CalendarEvent(_), SimpleSortMethod::ViewedAt) => DateTime::<Utc>::default(),+ (SoupItem::CalendarEvent(event), _) => event.updated_at,(SoupItem::CrmCompany(company), SimpleSortMethod::CreatedAt) => company.created_at,(SoupItem::CrmCompany(company), SimpleSortMethod::ViewedAt) => {company.viewed_at.unwrap_or_default()@@ -192,6 +202,10 @@ impl<T> SoupItem<T> {c.call_id.to_string(),PropertiesEntityType::CallRecord,)),+ SoupItem::CalendarEvent(event) => Some(EntityReference::new(+ event.id.to_string(),+ PropertiesEntityType::CalendarEvent,+ )),SoupItem::CrmCompany(c) => Some(EntityReference::new(c.id.to_string(),PropertiesEntityType::Company,@@ -333,6 +347,43 @@ impl<T> SoupItem<T> {participants,extra: f(extra),}),+ SoupItem::CalendarEvent(SoupCalendarEvent {+ id,+ owner_id,+ ical_uid,+ title,+ description,+ location,+ status,+ visibility,+ transparency,+ time,+ organizer_email,+ organizer_name,+ conference_url,+ is_read_only,+ created_at,+ updated_at,+ extra,+ }) => SoupItem::CalendarEvent(SoupCalendarEvent {+ id,+ owner_id,+ ical_uid,+ title,+ description,+ location,+ status,+ visibility,+ transparency,+ time,+ organizer_email,+ organizer_name,+ conference_url,+ is_read_only,+ created_at,+ updated_at,+ extra: f(extra),+ }),SoupItem::CrmCompany(SoupCrmCompany {id,team_id,@@ -377,6 +428,7 @@ impl<T> Identify for SoupItem<T> {SoupItem::Channel(soup_channel) => soup_channel.channel.channel.id.0,SoupItem::ChannelThread(thread) => thread.id,SoupItem::Call(record) => record.call_id,+ SoupItem::CalendarEvent(event) => event.id,SoupItem::CrmCompany(company) => company.id,SoupItem::ForeignEntity(foreign_entity) => foreign_entity.id,}diff --git a/crates/models_soup/src/lib.rs b/crates/models_soup/src/lib.rsindex e941f1190c..ab022e0c7c 100644--- a/crates/models_soup/src/lib.rs+++ b/crates/models_soup/src/lib.rs@@ -2,6 +2,8 @@#![deny(missing_docs)]+/// Calendar event models for Soup responses.+pub mod calendar_event;/// Call record models for Soup responses.pub mod call_record;/// Chat models for Soup responses.diff --git a/crates/properties/src/domain/model.rs b/crates/properties/src/domain/model.rsindex eaec4f59ca..6d7abcd650 100644--- a/crates/properties/src/domain/model.rs+++ b/crates/properties/src/domain/model.rs@@ -15,6 +15,7 @@ use uuid::Uuid;/// Map an internal properties storage type to its canonical entity type.pub fn canonical_entity_type(entity_type: EntityType) -> AccessEntityType {match entity_type {+ EntityType::CalendarEvent => AccessEntityType::CalendarEvent,EntityType::Document | EntityType::Task => AccessEntityType::Document,EntityType::CallRecord => AccessEntityType::Call,EntityType::Chat => AccessEntityType::Chat,diff --git a/crates/properties/src/domain/service_impl/mod.rs b/crates/properties/src/domain/service_impl/mod.rsindex b85ade4a44..850e442686 100644--- a/crates/properties/src/domain/service_impl/mod.rs+++ b/crates/properties/src/domain/service_impl/mod.rs@@ -245,6 +245,7 @@ where.map(|receipt| {let canonical_entity_type = receipt.entity_type();let storage_entity_type = match canonical_entity_type {+ AccessEntityType::CalendarEvent => EntityType::CalendarEvent,AccessEntityType::Document => Uuid::parse_str(receipt.entity_id()).ok().and_then(|document_id| document_sub_types.get(&document_id))diff --git a/crates/properties/src/outbound/permission_queries.rs b/crates/properties/src/outbound/permission_queries.rsindex 93757092d1..895df84641 100644--- a/crates/properties/src/outbound/permission_queries.rs+++ b/crates/properties/src/outbound/permission_queries.rs@@ -36,6 +36,15 @@ pub async fn get_owner_and_deleted(.fetch_one(pool).await?}+ EntityType::CalendarEvent => {+ let row = sqlx::query!(+ "SELECT owner_id FROM calendar_events WHERE id = $1",+ Uuid::parse_str(entity_id)?,+ )+ .fetch_one(pool)+ .await?;+ (row.owner_id, false)+ }EntityType::Chat => {sqlx::query!(r#"SELECT "userId" as user_id, "deletedAt" as deleted_at FROM "Chat" WHERE id=$1"#,diff --git a/crates/properties/src/outbound/permission_service.rs b/crates/properties/src/outbound/permission_service.rsindex 27477c5b8e..a935313d79 100644--- a/crates/properties/src/outbound/permission_service.rs+++ b/crates/properties/src/outbound/permission_service.rs@@ -96,6 +96,7 @@ fn caller_auth(user_id: Option<&MacroUserIdStr<'_>>) -> EntityAccessAuth {fn storage_entity_type(entity_type: AccessEntityType) -> anyhow::Result<StorageEntityType> {Ok(match entity_type {+ AccessEntityType::CalendarEvent => StorageEntityType::CalendarEvent,AccessEntityType::Document => StorageEntityType::Document,AccessEntityType::Call => StorageEntityType::CallRecord,AccessEntityType::Chat => StorageEntityType::Chat,diff --git a/crates/soup/src/domain/models.rs b/crates/soup/src/domain/models.rsindex db0c0b3051..661d9aba06 100644--- a/crates/soup/src/domain/models.rs+++ b/crates/soup/src/domain/models.rs@@ -47,7 +47,7 @@ pub enum SoupType {}/// the parameters required for a [SimpleSortMethod]-#[derive(Debug)]+#[derive(Debug, Clone)]pub struct SimpleSortRequest<'a> {/// the limit of the number of items to returnpub(crate) limit: u16,@@ -70,7 +70,7 @@ pub struct GroupedSortRequest<'a> {pub grouping: GroupingConfig,}-#[derive(Debug)]+#[derive(Debug, Clone)]pub(crate) enum SimpleSortQuery {/// we dont have anything to filter outNoFilter(Query<Uuid, SimpleSortMethod, ()>),@@ -116,7 +116,6 @@ impl SimpleSortQuery {}impl SimpleSortQuery {- #[cfg(test)]pub(crate) fn sort_method(&self) -> &SimpleSortMethod {match self {SimpleSortQuery::NoFilter(query) => query.sort_method(),@@ -128,7 +127,7 @@ impl SimpleSortQuery {}/// Parameters for fetching soup items by an explicit ordered entity list.-#[derive(Debug)]+#[derive(Debug, Clone)]pub struct AdvancedSortParams<'a> {/// Entities to fetch and preserve in the requested order.pub entities: &'a [Entity<'a>],diff --git a/crates/soup/src/domain/models/grouping.rs b/crates/soup/src/domain/models/grouping.rsindex 8c1b360c69..cacfee24dc 100644--- a/crates/soup/src/domain/models/grouping.rs+++ b/crates/soup/src/domain/models/grouping.rs@@ -177,6 +177,7 @@ pub mod entity_type_labels {match key {"document" => "Documents","email" => "Emails",+ "calendar_event" => "Calendar","channel" => "Messages","chat" => "Chats","project" => "Projects",@@ -190,11 +191,12 @@ pub mod entity_type_labels {match key {"document" => 0,"email" => 1,- "channel" => 2,- "chat" => 3,- "project" => 4,- "call" => 5,- _ => 6,+ "calendar_event" => 2,+ "channel" => 3,+ "chat" => 4,+ "project" => 5,+ "call" => 6,+ _ => 7,}}}diff --git a/crates/soup/src/domain/service.rs b/crates/soup/src/domain/service.rsindex 4b228ed3a4..7099866bdf 100644--- a/crates/soup/src/domain/service.rs+++ b/crates/soup/src/domain/service.rs@@ -169,7 +169,6 @@ where.await.map_err(anyhow::Error::from)?,};-Ok(res.into_iter().map(|item| SoupCandidate {item,frecency_score: None,diff --git a/crates/soup/src/inbound/axum_router.rs b/crates/soup/src/inbound/axum_router.rsindex ab56217cb0..ce03d3092c 100644--- a/crates/soup/src/inbound/axum_router.rs+++ b/crates/soup/src/inbound/axum_router.rs@@ -34,6 +34,7 @@ use item_filters::{EntityFilters,ast::{EntityFilterAst, ExpandErr, LiteralTree,+ calendar_event::CalendarEventLiteral,call::CallLiteral,channel::{ChannelLiteral, ChannelThreadLiteral},chat::ChatLiteral,@@ -1059,6 +1060,10 @@ where/// Wire-format entity filter AST accepted by soup AST endpoints.#[derive(Debug, Default, Serialize, Deserialize, Clone, ToSchema)]pub struct ApiEntityFilterAst {+ /// filters applied to canonical calendar events+ #[serde(default, rename = "calf")]+ #[schema(value_type = serde_json::Value)]+ pub calendar_event_filter: LiteralTree<CalendarEventLiteral>,/// the filters that should be applied to the document entity#[serde(default, rename = "df")]#[schema(value_type = serde_json::Value)]@@ -1179,6 +1184,7 @@ impl ApiEntityFilterAst {#[tracing::instrument(err, skip(self))]fn into_entity_ast(self) -> Result<EntityFilterAst, Report> {let ApiEntityFilterAst {+ calendar_event_filter,document_filter,project_filter,chat_filter,@@ -1242,6 +1248,7 @@ impl ApiEntityFilterAst {};Ok(EntityFilterAst {+ calendar_event_filter,document_filter,project_filter,chat_filter,diff --git a/crates/soup/src/inbound/toolset/list_entities.rs b/crates/soup/src/inbound/toolset/list_entities.rsindex 237e578f95..84e641faf2 100644--- a/crates/soup/src/inbound/toolset/list_entities.rs+++ b/crates/soup/src/inbound/toolset/list_entities.rs@@ -12,6 +12,7 @@ use item_filters::{SharedEmailFilter,ast::{EntityFilterAst, LiteralTree,+ calendar_event::CalendarEventLiteral,call::CallLiteral,channel::{ChannelLiteral, ChannelThreadLiteral},chat::ChatLiteral,@@ -86,6 +87,8 @@ impl EmailPreset {#[derive(Debug, Clone, Copy, Deserialize, JsonSchema, PartialEq, Eq)]#[serde(rename_all = "snake_case")]pub enum ItemType {+ /// Calendar event.+ CalendarEvent,/// Macro document.Document,/// AI chat conversation.@@ -108,6 +111,25 @@ pub enum ItemType {#[derive(Debug, Serialize, JsonSchema)]#[serde(rename_all = "camelCase", tag = "type")]pub enum EntityItem {+ /// Canonical calendar event item.+ #[serde(rename_all = "camelCase")]+ CalendarEvent {+ /// Calendar event id.+ id: Uuid,+ /// Event title.+ title: String,+ /// Event status.+ status: String,+ /// Optional location.+ location: Option<String>,+ /// Optional conference join URL.+ conference_url: Option<String>,+ /// Canonical timed or all-day span.+ time: serde_json::Value,+ /// Tags on the event visible to the user.+ #[serde(default, skip_serializing_if = "Vec::is_empty")]+ tags: Vec<AppliedTag>,+ },/// Macro document item.#[serde(rename_all = "camelCase")]Document {@@ -217,6 +239,15 @@ impl EntityItem {tag_map: &HashMap<Uuid, AppliedTag>,) -> Self {match item {+ SoupItem::CalendarEvent(event) => EntityItem::CalendarEvent {+ id: event.id,+ title: event.title,+ status: event.status,+ location: event.location,+ conference_url: event.conference_url,+ time: serde_json::to_value(event.time).unwrap_or(serde_json::Value::Null),+ tags: resolve_applied_tags(&event.extra.properties, tag_map),+ },SoupItem::Document(doc) => EntityItem::Document {id: doc.id,sub_type: doc.sub_type.as_ref().map(|sub_type| {@@ -312,6 +343,7 @@ fn any_item_has_tags(items: &[EnrichedSoupItem]) -> bool {SoupItem::Chat(chat) => &chat.extra.properties,SoupItem::Project(project) => &project.extra.properties,SoupItem::EmailThread(thread) => &thread.extra.properties,+ SoupItem::CalendarEvent(event) => &event.extra.properties,SoupItem::CrmCompany(company) => &company.extra.properties,SoupItem::Channel(_)| SoupItem::ChannelThread(_)@@ -496,6 +528,7 @@ impl ListEntities {};let ast = EntityFilterAst {+ calendar_event_filter: None,document_filter: self.document_filter.clone(),project_filter: self.project_filter.clone(),chat_filter: self.chat_filter.clone(),@@ -534,6 +567,11 @@ impl ListEntities {};EntityFilterAst {+ calendar_event_filter: if include_types.contains(&ItemType::CalendarEvent) {+ ast.calendar_event_filter+ } else {+ Some(Arc::new(Expr::val(CalendarEventLiteral::Id(Uuid::nil()))))+ },document_filter: if include_types.contains(&ItemType::Document) {ast.document_filter} else {@@ -801,6 +839,7 @@ pub(super) fn build_summary(let mut channels = 0;let mut channel_threads = 0;let mut call_records = 0;+ let mut calendar_events = 0;let mut foreign_entities = 0;for item in items {@@ -812,6 +851,7 @@ pub(super) fn build_summary(EntityItem::Channel { .. } => channels += 1,EntityItem::ChannelThread { .. } => channel_threads += 1,EntityItem::Call { .. } => call_records += 1,+ EntityItem::CalendarEvent { .. } => calendar_events += 1,EntityItem::ForeignEntity { .. } => foreign_entities += 1,}}@@ -859,6 +899,12 @@ pub(super) fn build_summary(if call_records == 1 { "" } else { "s" }));}+ if calendar_events > 0 {+ parts.push(format!(+ "{calendar_events} calendar event{}",+ if calendar_events == 1 { "" } else { "s" }+ ));+ }if foreign_entities > 0 {let label = if foreign_entities == 1 {"foreign entity"diff --git a/crates/soup/src/outbound/pg_soup_repo.rs b/crates/soup/src/outbound/pg_soup_repo.rsindex a8a7b86298..0ce4e7a9ff 100644--- a/crates/soup/src/outbound/pg_soup_repo.rs+++ b/crates/soup/src/outbound/pg_soup_repo.rs@@ -10,13 +10,14 @@ use crate::{ExpandedDynamicCursorArgs, GroupedDynamicCursorArgs,},};-use either::Either;use macro_user_id::user_id::MacroUserIdStr;+use models_pagination::{Identify, SortOn};use models_properties::service::property_definition_with_options::PropertyDefinitionWithOptions;use models_soup::{SoupProperty, item::SoupItem};use readonly_pool::ReadOnlyPool;use system_properties::SystemPropertyKey;+mod calendar_event;mod expanded;pub mod grouping;mod unexpanded;@@ -37,26 +38,28 @@ impl SoupRepo for PgSoupRepo {type Err = sqlx::Error;type GroupedItems = std::vec::IntoIter<ItemGroupingInfo>;- fn expanded_generic_cursor_soup<'a>(+ async fn expanded_generic_cursor_soup<'a>(&self,req: SimpleSortRequest<'a>,- ) -> impl Future<Output = Result<Vec<SoupItem<()>>, Self::Err>> + Send {- match req.cursor {+ ) -> Result<Vec<SoupItem<()>>, Self::Err> {+ let calendar_req = req.clone();+ let sort = *req.cursor.sort_method();+ let limit = req.limit;+ let mut items = match req.cursor {SimpleSortQuery::ItemsAndFrecencyFilter(query) => {// Extract the EntityFilterAst from the tuple (Frecency, EntityFilterAst)- Either::Left(Either::Left(- expanded::dynamic::expanded_dynamic_cursor_soup(- &self.pool.0,- ExpandedDynamicCursorArgs {- user_id: req.user_id,- limit: req.limit,- cursor: query.map_filter(|(_, ast)| ast),- exclude_frecency: true,- },- ),- ))+ expanded::dynamic::expanded_dynamic_cursor_soup(+ &self.pool.0,+ ExpandedDynamicCursorArgs {+ user_id: req.user_id,+ limit: req.limit,+ cursor: query.map_filter(|(_, ast)| ast),+ exclude_frecency: true,+ },+ )+ .await?}- SimpleSortQuery::ItemsFilter(ast) => Either::Left(Either::Right(+ SimpleSortQuery::ItemsFilter(ast) => {expanded::dynamic::expanded_dynamic_cursor_soup(&self.pool.0,ExpandedDynamicCursorArgs {@@ -65,67 +68,88 @@ impl SoupRepo for PgSoupRepo {cursor: ast,exclude_frecency: false,},- ),- )),- SimpleSortQuery::FilterFrecency(f) => Either::Right(Either::Left(+ )+ .await?+ }+ SimpleSortQuery::FilterFrecency(f) => {expanded::by_cursor::no_frecency_expanded_generic_soup(&self.pool.0,req.user_id,req.limit,f,- ),- )),- SimpleSortQuery::NoFilter(f) => Either::Right(Either::Right(+ )+ .await?+ }+ SimpleSortQuery::NoFilter(f) => {expanded::by_cursor::expanded_generic_cursor_soup(&self.pool.0,req.user_id,req.limit,f,- ),- )),- }+ )+ .await?+ }+ };+ items.extend(calendar_event::cursor_soup(&self.pool.0, calendar_req).await?);+ sort_and_truncate(&mut items, sort, limit);+ Ok(items)}- fn unexpanded_generic_cursor_soup<'a>(+ async fn unexpanded_generic_cursor_soup<'a>(&self,req: SimpleSortRequest<'a>,- ) -> impl Future<Output = Result<Vec<SoupItem<()>>, Self::Err>> + Send {- match req.cursor {- SimpleSortQuery::ItemsFilter(_) => Either::Left(Either::Left(not_implemented(req))),- SimpleSortQuery::ItemsAndFrecencyFilter(_) => {- Either::Left(Either::Right(not_implemented(req)))- }- SimpleSortQuery::FilterFrecency(f) => Either::Right(Either::Left(+ ) -> Result<Vec<SoupItem<()>>, Self::Err> {+ let calendar_req = req.clone();+ let sort = *req.cursor.sort_method();+ let limit = req.limit;+ let mut items = match req.cursor {+ SimpleSortQuery::ItemsFilter(_) => not_implemented(req).await?,+ SimpleSortQuery::ItemsAndFrecencyFilter(_) => not_implemented(req).await?,+ SimpleSortQuery::FilterFrecency(f) => {expanded::by_cursor::no_frecency_expanded_generic_soup(&self.pool.0,req.user_id,req.limit,f,- ),- )),- SimpleSortQuery::NoFilter(f) => Either::Right(Either::Right(+ )+ .await?+ }+ SimpleSortQuery::NoFilter(f) => {unexpanded::by_cursor::unexpanded_generic_cursor_soup(&self.pool.0,req.user_id,req.limit,f,- ),- )),- }+ )+ .await?+ }+ };+ items.extend(calendar_event::cursor_soup(&self.pool.0, calendar_req).await?);+ sort_and_truncate(&mut items, sort, limit);+ Ok(items)}- fn expanded_soup_by_ids<'a>(+ async fn expanded_soup_by_ids<'a>(&self,req: AdvancedSortParams<'a>,- ) -> impl Future<Output = Result<Vec<SoupItem<()>>, Self::Err>> + Send {- expanded::by_ids::expanded_soup_by_ids(&self.pool.0, req.user_id, req.entities)+ ) -> Result<Vec<SoupItem<()>>, Self::Err> {+ let calendar_req = req.clone();+ let mut items =+ expanded::by_ids::expanded_soup_by_ids(&self.pool.0, req.user_id, req.entities).await?;+ items.extend(calendar_event::by_ids(&self.pool.0, calendar_req).await?);+ Ok(items)}- fn unexpanded_soup_by_ids<'a>(+ async fn unexpanded_soup_by_ids<'a>(&self,req: AdvancedSortParams<'a>,- ) -> impl Future<Output = Result<Vec<SoupItem<()>>, Self::Err>> + Send {- unexpanded::by_ids::unexpanded_soup_by_ids(&self.pool.0, req.user_id, req.entities)+ ) -> Result<Vec<SoupItem<()>>, Self::Err> {+ let calendar_req = req.clone();+ let mut items =+ unexpanded::by_ids::unexpanded_soup_by_ids(&self.pool.0, req.user_id, req.entities)+ .await?;+ items.extend(calendar_event::by_ids(&self.pool.0, calendar_req).await?);+ Ok(items)}fn populate_properties<'a>(@@ -166,6 +190,21 @@ impl SoupRepo for PgSoupRepo {}}+fn sort_and_truncate(+ items: &mut Vec<SoupItem<()>>,+ sort: models_pagination::SimpleSortMethod,+ limit: u16,+) {+ let mut sort_on = SoupItem::sort_on(sort);+ items.sort_by(|left, right| {+ sort_on(right)+ .last_val+ .cmp(&sort_on(left).last_val)+ .then_with(|| right.id().cmp(&left.id()))+ });+ items.truncate(usize::from(limit));+}+#[tracing::instrument(err)]async fn not_implemented<Ok>(_req: SimpleSortRequest<'_>) -> Result<Ok, sqlx::Error> {Err(sqlx::Error::InvalidArgument(@@ -226,6 +265,7 @@ pub(crate) async fn populate_properties(SoupItem::Chat(x) => properties_map.get(&x.id.to_string()),SoupItem::CrmCompany(x) => properties_map.get(&x.id.to_string()),SoupItem::Call(x) => properties_map.get(&x.call_id.to_string()),+ SoupItem::CalendarEvent(x) => properties_map.get(&x.id.to_string()),SoupItem::Channel(_) | SoupItem::ChannelThread(_) | SoupItem::ForeignEntity(_) => {None}diff --git a/crates/soup/src/outbound/pg_soup_repo/calendar_event.rs b/crates/soup/src/outbound/pg_soup_repo/calendar_event.rsnew file mode 100644index 0000000000..3ed4325ac3--- /dev/null+++ b/crates/soup/src/outbound/pg_soup_repo/calendar_event.rs@@ -0,0 +1,305 @@+use chrono::{DateTime, NaiveDate, Utc};+use filter_ast::Expr;+use item_filters::ast::{+ calendar_event::CalendarEventLiteral,+ properties::{PropertiesLiteral, PropertyEntityType, properties_filter_can_apply_to},+};+use model_entity::EntityType;+use models_pagination::{Query, SimpleSortMethod};+use models_soup::{+ calendar_event::{SoupCalendarEvent, SoupCalendarEventTime},+ item::SoupItem,+};+use sqlx::{FromRow, PgPool, Postgres, QueryBuilder};+use uuid::Uuid;++use crate::domain::models::{AdvancedSortParams, SimpleSortQuery, SimpleSortRequest};++#[derive(FromRow)]+struct CalendarEventRow {+ id: Uuid,+ owner_id: String,+ ical_uid: String,+ title: String,+ description: Option<String>,+ location: Option<String>,+ status: String,+ visibility: String,+ transparency: String,+ starts_at: Option<DateTime<Utc>>,+ ends_at: Option<DateTime<Utc>>,+ start_date: Option<NaiveDate>,+ end_date: Option<NaiveDate>,+ time_zone: Option<String>,+ organizer_email: Option<String>,+ organizer_name: Option<String>,+ conference_url: Option<String>,+ is_read_only: bool,+ created_at: DateTime<Utc>,+ updated_at: DateTime<Utc>,+}++struct CursorParts {+ sort: SimpleSortMethod,+ id: Option<Uuid>,+ timestamp: Option<DateTime<Utc>>,+ filter: Option<Expr<CalendarEventLiteral>>,+ property_filter: Option<Expr<PropertiesLiteral>>,+}++pub(super) async fn cursor_soup(+ db: &PgPool,+ req: SimpleSortRequest<'_>,+) -> Result<Vec<SoupItem<()>>, sqlx::Error> {+ let parts = cursor_parts(req.cursor);+ if parts.property_filter.as_ref().is_some_and(|filter| {+ !properties_filter_can_apply_to(filter, &[PropertyEntityType::CalendarEvent])+ }) {+ return Ok(Vec::new());+ }++ let sort = sort_sql(parts.sort);+ let mut query =+ QueryBuilder::<Postgres>::new(format!("{} WHERE (event.owner_id = ", select_sql()));+ query.push_bind(req.user_id.as_ref().to_string());+ query.push(" OR EXISTS (SELECT 1 FROM macro_user_links link WHERE link.link_id = event.source_link_id AND link.primary_macro_id = ");+ query.push_bind(req.user_id.as_ref().to_string());+ query.push("))");+ if let Some(filter) = &parts.filter {+ query.push(" AND (");+ push_filter(&mut query, filter);+ query.push(")");+ }+ query.push(super::expanded::dynamic::build_properties_filter(+ parts.property_filter.as_ref(),+ "event.id::text",+ ));+ if let (Some(timestamp), Some(id)) = (parts.timestamp, parts.id) {+ query.push(format!(" AND ({sort}, event.id) < ("));+ query.push_bind(timestamp);+ query.push(", ");+ query.push_bind(id);+ query.push(")");+ }+ query.push(format!(" ORDER BY {sort} DESC, event.id DESC LIMIT "));+ query.push_bind(i64::from(req.limit));++ query+ .build_query_as::<CalendarEventRow>()+ .fetch_all(db)+ .await?+ .into_iter()+ .map(row_to_item)+ .collect()+}++pub(super) async fn by_ids(+ db: &PgPool,+ req: AdvancedSortParams<'_>,+) -> Result<Vec<SoupItem<()>>, sqlx::Error> {+ let ids = req+ .entities+ .iter()+ .filter(|entity| entity.entity_type == EntityType::CalendarEvent)+ .filter_map(|entity| entity.entity_id.parse::<Uuid>().ok())+ .collect::<Vec<_>>();+ if ids.is_empty() {+ return Ok(Vec::new());+ }++ let mut query =+ QueryBuilder::<Postgres>::new(format!("{} WHERE (event.owner_id = ", select_sql()));+ query.push_bind(req.user_id.as_ref().to_string());+ query.push(" OR EXISTS (SELECT 1 FROM macro_user_links link WHERE link.link_id = event.source_link_id AND link.primary_macro_id = ");+ query.push_bind(req.user_id.as_ref().to_string());+ query.push(")) AND event.id = ANY(");+ query.push_bind(ids);+ query.push(") ORDER BY event.updated_at DESC, event.id DESC");+ query+ .build_query_as::<CalendarEventRow>()+ .fetch_all(db)+ .await?+ .into_iter()+ .map(row_to_item)+ .collect()+}++fn cursor_parts(cursor: SimpleSortQuery) -> CursorParts {+ match cursor {+ SimpleSortQuery::NoFilter(query) => parts_from_query(&query, None, None),+ // CalendarEvent is not emitted by the primary frecency query yet, so+ // it must remain in the timestamp fallback even if an aggregate exists.+ SimpleSortQuery::FilterFrecency(query) => parts_from_query(&query, None, None),+ SimpleSortQuery::ItemsFilter(query) => {+ let ast = query.filter();+ parts_from_query(+ &query,+ ast.calendar_event_filter.as_deref().cloned(),+ ast.properties_filter.as_deref().cloned(),+ )+ }+ SimpleSortQuery::ItemsAndFrecencyFilter(query) => {+ let ast = &query.filter().1;+ parts_from_query(+ &query,+ ast.calendar_event_filter.as_deref().cloned(),+ ast.properties_filter.as_deref().cloned(),+ )+ }+ }+}++fn parts_from_query<F>(+ query: &Query<Uuid, SimpleSortMethod, F>,+ filter: Option<Expr<CalendarEventLiteral>>,+ property_filter: Option<Expr<PropertiesLiteral>>,+) -> CursorParts {+ let (id, timestamp) = query.vals();+ CursorParts {+ sort: *query.sort_method(),+ id: id.copied(),+ timestamp: timestamp.copied(),+ filter,+ property_filter,+ }+}++#[cfg(test)]+mod test;++fn select_sql() -> &'static str {+ r#"+ SELECT+ event.id,+ event.owner_id,+ event.ical_uid,+ event.title,+ event.description,+ event.location,+ event.status,+ event.visibility,+ event.transparency,+ event.starts_at,+ event.ends_at,+ event.start_date,+ event.end_date,+ event.time_zone,+ event.organizer_email,+ event.organizer_name,+ event.conference_url,+ event.is_read_only,+ event.created_at,+ event.updated_at+ FROM calendar_events event+ "#+}++fn sort_sql(sort: SimpleSortMethod) -> &'static str {+ match sort {+ SimpleSortMethod::CreatedAt => "event.created_at",+ SimpleSortMethod::UpdatedAt | SimpleSortMethod::ViewedUpdated => "event.updated_at",+ SimpleSortMethod::ViewedAt => "'1970-01-01 00:00:00+00'::timestamptz",+ }+}++pub(super) fn push_filter(+ builder: &mut QueryBuilder<'_, Postgres>,+ expression: &Expr<CalendarEventLiteral>,+) {+ match expression {+ Expr::And(left, right) => {+ builder.push("(");+ push_filter(builder, left);+ builder.push(" AND ");+ push_filter(builder, right);+ builder.push(")");+ }+ Expr::Or(left, right) => {+ builder.push("(");+ push_filter(builder, left);+ builder.push(" OR ");+ push_filter(builder, right);+ builder.push(")");+ }+ Expr::Not(inner) => {+ builder.push("NOT (");+ push_filter(builder, inner);+ builder.push(")");+ }+ Expr::Literal(CalendarEventLiteral::Id(id)) => {+ builder.push("event.id = ");+ builder.push_bind(*id);+ }+ Expr::Literal(CalendarEventLiteral::Status(status)) => {+ builder.push("event.status = ");+ builder.push_bind(status.clone());+ }+ Expr::Literal(CalendarEventLiteral::StartsBefore(value)) => {+ builder.push(+ "COALESCE(event.starts_at, event.start_date::timestamp AT TIME ZONE 'UTC') < ",+ );+ builder.push_bind(*value);+ }+ Expr::Literal(CalendarEventLiteral::EndsAfter(value)) => {+ builder+ .push("COALESCE(event.ends_at, event.end_date::timestamp AT TIME ZONE 'UTC') > ");+ builder.push_bind(*value);+ }+ Expr::Literal(CalendarEventLiteral::Attendee(email)) => {+ builder.push(+ "EXISTS (SELECT 1 FROM calendar_event_attendees attendee \+ WHERE attendee.event_id = event.id AND attendee.email = lower(",+ );+ builder.push_bind(email.clone());+ builder.push("))");+ }+ Expr::Literal(CalendarEventLiteral::Organizer(email)) => {+ builder.push("lower(event.organizer_email) = lower(");+ builder.push_bind(email.clone());+ builder.push(")");+ }+ }+}++fn row_to_item(row: CalendarEventRow) -> Result<SoupItem<()>, sqlx::Error> {+ let time = match (row.starts_at, row.ends_at, row.start_date, row.end_date) {+ (Some(starts_at), Some(ends_at), None, None) => SoupCalendarEventTime::Timed {+ starts_at,+ ends_at,+ time_zone: row.time_zone,+ },+ (None, None, Some(start_date), Some(end_date)) => SoupCalendarEventTime::AllDay {+ start_date,+ end_date,+ },+ _ => {+ return Err(sqlx::Error::Decode(+ std::io::Error::new(+ std::io::ErrorKind::InvalidData,+ "calendar event has an invalid time shape",+ )+ .into(),+ ));+ }+ };++ Ok(SoupItem::CalendarEvent(SoupCalendarEvent {+ id: row.id,+ owner_id: row.owner_id,+ ical_uid: row.ical_uid,+ title: row.title,+ description: row.description,+ location: row.location,+ status: row.status,+ visibility: row.visibility,+ transparency: row.transparency,+ time,+ organizer_email: row.organizer_email,+ organizer_name: row.organizer_name,+ conference_url: row.conference_url,+ is_read_only: row.is_read_only,+ created_at: row.created_at,+ updated_at: row.updated_at,+ extra: (),+ }))+}diff --git a/crates/soup/src/outbound/pg_soup_repo/calendar_event/test.rs b/crates/soup/src/outbound/pg_soup_repo/calendar_event/test.rsnew file mode 100644index 0000000000..727da6bccf--- /dev/null+++ b/crates/soup/src/outbound/pg_soup_repo/calendar_event/test.rs@@ -0,0 +1,76 @@+use super::*;+use macro_db_migrator::MACRO_DB_MIGRATIONS;+use macro_user_id::user_id::MacroUserIdStr;+use models_pagination::Frecency;++#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]+async fn frecency_fallback_keeps_calendar_events_with_aggregates(+ pool: PgPool,+) -> anyhow::Result<()> {+ let owner_id = "macro|[email protected]";+ let link_id = Uuid::now_v7();+ let event_id = Uuid::now_v7();+ sqlx::query!(+ r#"+ INSERT INTO email_links (+ id, macro_id, fusionauth_user_id, email_address, provider+ )+ VALUES ($1, $2, $2, '[email protected]', 'GMAIL')+ "#,+ link_id,+ owner_id,+ )+ .execute(&pool)+ .await?;+ sqlx::query!(+ r#"+ INSERT INTO calendar_events (+ id, owner_id, source_link_id, ical_uid, title,+ starts_at, ends_at, canonical_source_kind,+ canonical_source_updated_at+ )+ VALUES (+ $1, $2, $3, '[email protected]', 'Frecency event',+ now(), now() + interval '1 hour', 'email_ics', now()+ )+ "#,+ event_id,+ owner_id,+ link_id,+ )+ .execute(&pool)+ .await?;+ sqlx::query!(+ r#"+ INSERT INTO frecency_aggregates (+ entity_id, entity_type, user_id, event_count,+ frecency_score, first_event, recent_events+ )+ VALUES ($1, 'calendar_event', $2, 1, 10, now(), '[]')+ "#,+ event_id.to_string(),+ owner_id,+ )+ .execute(&pool)+ .await?;++ let items = cursor_soup(+ &pool,+ SimpleSortRequest {+ limit: 10,+ cursor: SimpleSortQuery::FilterFrecency(Query::Sort(+ SimpleSortMethod::UpdatedAt,+ Frecency,+ )),+ user_id: MacroUserIdStr::parse_from_str(owner_id)?,+ },+ )+ .await?;++ assert_eq!(items.len(), 1);+ assert!(matches!(+ &items[0],+ SoupItem::CalendarEvent(event) if event.id == event_id+ ));+ Ok(())+}diff --git a/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic.rs b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic.rsindex 034eccfc73..3cad3a5ed6 100644--- a/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic.rs+++ b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic.rs@@ -17,6 +17,7 @@ use item_filters::ast::{use macro_user_id::{cowlike::CowLike, user_id::MacroUserIdStr};use models_pagination::{Query, SimpleSortMethod};use models_soup::{+ calendar_event::SoupCalendarEvent,chat::SoupChat,document::{SoupDocument, SoupDocumentSubType},item::SoupItem,@@ -127,6 +128,29 @@ static GROUPED_PROJECT_TOP_CLAUSE: &str = r#"WHERE p."deletedAt" IS NULL"#;+static GROUPED_CALENDAR_EVENT_TOP_CLAUSE: &str = r#"+ SELECT+ 'calendar_event'::text as item_type,+ event.id::text as id,+ CASE $2+ WHEN 'created_at' THEN event.created_at+ WHEN 'viewed_at' THEN '1970-01-01 00:00:00+00'::timestamptz+ ELSE event.updated_at+ END::timestamptz as sort_ts,+ NULL::text as project_id,+ 'CALENDAR_EVENT'::property_entity_type as property_entity_type+ FROM calendar_events event+ WHERE (+ event.owner_id = $1+ OR EXISTS (+ SELECT 1+ FROM macro_user_links link+ WHERE link.link_id = event.source_link_id+ AND link.primary_macro_id = $1+ )+ )+"#;+// -- Detail clauses: full columns, joined back from TopItems --static DOCUMENT_DETAIL_CLAUSE: &str = r#"@@ -279,6 +303,7 @@ static GROUPED_DOCUMENT_DETAIL_CLAUSE: &str = r#"ELSE NULLEND as "is_completed",d."deletedAt"::timestamptz as "deleted_at",+ NULL::jsonb as "calendar_event",gi.group_key as "group_key",gi.group_total_count as "group_total_count",gi.row_in_group as "row_in_group"@@ -330,6 +355,7 @@ static GROUPED_CHAT_DETAIL_CLAUSE: &str = r#"gi.sort_ts as "sort_ts",NULL as "is_completed",c."deletedAt"::timestamptz as "deleted_at",+ NULL::jsonb as "calendar_event",gi.group_key as "group_key",gi.group_total_count as "group_total_count",gi.row_in_group as "row_in_group"@@ -361,6 +387,7 @@ static GROUPED_PROJECT_DETAIL_CLAUSE: &str = r#"gi.sort_ts as "sort_ts",NULL as "is_completed",p."deletedAt"::timestamptz as "deleted_at",+ NULL::jsonb as "calendar_event",gi.group_key as "group_key",gi.group_total_count as "group_total_count",gi.row_in_group as "row_in_group"@@ -373,6 +400,66 @@ static GROUPED_PROJECT_DETAIL_CLAUSE: &str = r#"WHERE gi.item_type = 'project'"#;+static GROUPED_CALENDAR_EVENT_DETAIL_CLAUSE: &str = r#"+ SELECT+ 'calendar_event' as "item_type",+ event.id::text as "id",+ NULL::text as "document_version_id",+ event.owner_id as "user_id",+ event.title as "name",+ NULL::text as "branched_from_id",+ NULL::bigint as "branched_from_version_id",+ NULL::bigint as "document_family_id",+ NULL::text as "file_type",+ event.created_at as "created_at",+ event.updated_at as "updated_at",+ NULL::text as "project_id",+ NULL::boolean as "is_persistent",+ NULL::text as "sha",+ NULL::document_sub_type_value as "sub_type",+ NULL::timestamptz as "viewed_at",+ gi.sort_ts as "sort_ts",+ NULL::boolean as "is_completed",+ NULL::timestamptz as "deleted_at",+ jsonb_build_object(+ 'id', event.id,+ 'ownerId', event.owner_id,+ 'icalUid', event.ical_uid,+ 'title', event.title,+ 'description', event.description,+ 'location', event.location,+ 'status', event.status,+ 'visibility', event.visibility,+ 'transparency', event.transparency,+ 'time', CASE+ WHEN event.starts_at IS NOT NULL THEN jsonb_build_object(+ 'kind', 'timed',+ 'startsAt', event.starts_at,+ 'endsAt', event.ends_at,+ 'timeZone', event.time_zone+ )+ ELSE jsonb_build_object(+ 'kind', 'allDay',+ 'startDate', event.start_date,+ 'endDate', event.end_date+ )+ END,+ 'organizerEmail', event.organizer_email,+ 'organizerName', event.organizer_name,+ 'conferenceUrl', event.conference_url,+ 'isReadOnly', event.is_read_only,+ 'createdAt', event.created_at,+ 'updatedAt', event.updated_at,+ 'extra', NULL+ ) as "calendar_event",+ gi.group_key as "group_key",+ gi.group_total_count as "group_total_count",+ gi.row_in_group as "row_in_group"+ FROM GroupedItems gi+ INNER JOIN calendar_events event ON event.id::text = gi.id+ WHERE gi.item_type = 'calendar_event'+"#;+static GROUPED_EMPTY_COMBINED_CLAUSE: &str = r#"SELECT'document' as "item_type",@@ -394,6 +481,7 @@ static GROUPED_EMPTY_COMBINED_CLAUSE: &str = r#"NULL::timestamptz as "sort_ts",NULL::boolean as "is_completed",NULL::timestamptz as "deleted_at",+ NULL::jsonb as "calendar_event",NULL::text as "group_key",NULL::bigint as "group_total_count",NULL::bigint as "row_in_group"@@ -810,7 +898,10 @@ fn build_project_filter(ast: Option<&Expr<ProjectLiteral>>) -> String {}}-fn build_properties_filter(ast: Option<&Expr<PropertiesLiteral>>, entity_id_sql: &str) -> String {+pub(in crate::outbound::pg_soup_repo) fn build_properties_filter(+ ast: Option<&Expr<PropertiesLiteral>>,+ entity_id_sql: &str,+) -> String {let Some(expr) = ast else {return String::new();};@@ -1367,7 +1458,6 @@ fn build_query(WHERE false"#,);}-builder.push(DETAIL_SUFFIX);builder@@ -1424,6 +1514,7 @@ enum SoupRow {Document(DocumentRow),Chat(ChatRow),Project(ProjectRow),+ CalendarEvent(SoupCalendarEvent<()>),}impl<'a> FromRow<'a, PgRow> for SoupRow {@@ -1433,6 +1524,12 @@ impl<'a> FromRow<'a, PgRow> for SoupRow {"document" => Ok(SoupRow::Document(DocumentRow::from_row(row)?)),"chat" => Ok(SoupRow::Chat(ChatRow::from_row(row)?)),"project" => Ok(SoupRow::Project(ProjectRow::from_row(row)?)),+ "calendar_event" => {+ let value: serde_json::Value = row.try_get("calendar_event")?;+ let event = serde_json::from_value(value)+ .map_err(|error| sqlx::Error::Decode(Box::new(error)))?;+ Ok(SoupRow::CalendarEvent(event))+ }_ => Err(sqlx::Error::TypeNotFound {type_name: item_type.to_string(),}),@@ -1545,6 +1642,7 @@ impl SoupRow {deleted_at,extra: (),}),+ SoupRow::CalendarEvent(event) => SoupItem::CalendarEvent(event),})}}@@ -1719,6 +1817,10 @@ fn build_grouped_query<'a>(filter_ast.properties_filter.as_deref(),&[PropertyEntityType::Project],);+ let include_calendar_events = properties_filter_can_apply_to(+ filter_ast.properties_filter.as_deref(),+ &[PropertyEntityType::CalendarEvent],+ );push_accessible_items_cte(&mut builder,@@ -1769,6 +1871,20 @@ fn build_grouped_query<'a>());}+ if include_calendar_events {+ push_union_separator(&mut builder, &mut needs_separator);+ builder.push(GROUPED_CALENDAR_EVENT_TOP_CLAUSE);+ if let Some(filter) = filter_ast.calendar_event_filter.as_deref() {+ builder.push(" AND (");+ super::super::calendar_event::push_filter(&mut builder, filter);+ builder.push(")");+ }+ builder.push(build_properties_filter(+ filter_ast.properties_filter.as_deref(),+ "event.id::text",+ ));+ }+// Fallback when all entity types are filtered outif !needs_separator {builder.push(@@ -1840,6 +1956,13 @@ fn build_grouped_query<'a>(.replace("GroupedItems gi", &format!("{} gi", source_table)),);}+ if include_calendar_events {+ push_union_separator(&mut builder, &mut combined_needs_separator);+ builder.push(+ GROUPED_CALENDAR_EVENT_DETAIL_CLAUSE+ .replace("GroupedItems gi", &format!("{} gi", source_table)),+ );+ }if !combined_needs_separator {builder.push(GROUPED_EMPTY_COMBINED_CLAUSE);}diff --git a/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs b/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rsindex 51503798c5..2d995ccdac 100644--- a/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs+++ b/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs@@ -5513,6 +5513,7 @@ async fn test_dyn_filter_by_not_document_sub_type_task(db: PgPool) -> anyhow::Refn mock_empty_ast() -> EntityFilterAst {EntityFilterAst {document_filter: None,+ calendar_event_filter: None,project_filter: None,chat_filter: None,email_filter: item_filters::ast::EmailFilterAst::default(),diff --git a/crates/soup/src/outbound/pg_soup_repo/grouping/test.rs b/crates/soup/src/outbound/pg_soup_repo/grouping/test.rsindex cc240e88a6..01030f0241 100644--- a/crates/soup/src/outbound/pg_soup_repo/grouping/test.rs+++ b/crates/soup/src/outbound/pg_soup_repo/grouping/test.rs@@ -299,3 +299,102 @@ async fn test_grouped_single_group_filter(pool: Pool<Postgres>) -> anyhow::ResulOk(())}++#[sqlx::test(+ fixtures(+ path = "../../../../../macro_db_client/fixtures",+ scripts("mixed_items_expanded")+ ),+ migrator = "MACRO_DB_MIGRATIONS"+)]+async fn tagged_calendar_event_participates_in_grouped_property_soup(+ pool: Pool<Postgres>,+) -> anyhow::Result<()> {+ const OWNER_ID: &str = "macro|[email protected]";+ const EVENT_ID: uuid::Uuid = uuid::uuid!("ca1e0000-0000-0000-0000-000000000001");+ const LINK_ID: uuid::Uuid = uuid::uuid!("ca1e0000-0000-0000-0000-000000000002");+ const STATUS_PROPERTY_ID: uuid::Uuid = uuid::uuid!("00000001-0000-0000-0000-000000000002");+ const IN_PROGRESS_OPTION_ID: &str = "00000001-0000-0000-0002-000000000002";++ sqlx::query!(+ r#"+ INSERT INTO email_links (+ id, macro_id, fusionauth_user_id, email_address, provider+ )+ VALUES ($1, $2, $2, '[email protected]', 'GMAIL')+ "#,+ LINK_ID,+ OWNER_ID,+ )+ .execute(&pool)+ .await?;+ sqlx::query!(+ r#"+ INSERT INTO calendar_events (+ id, owner_id, source_link_id, ical_uid, title,+ starts_at, ends_at, canonical_source_kind, canonical_source_updated_at+ )+ VALUES (+ $1, $2, $3, '[email protected]', 'Grouped calendar event',+ '2026-07-24T14:00:00Z', '2026-07-24T15:00:00Z', 'email_ics',+ '2026-07-24T12:00:00Z'+ )+ "#,+ EVENT_ID,+ OWNER_ID,+ LINK_ID,+ )+ .execute(&pool)+ .await?;+ sqlx::query!(+ r#"+ INSERT INTO entity_properties+ (id, entity_id, entity_type, property_definition_id, values)+ VALUES (+ 'ca1e0000-0000-0000-0000-000000000003',+ ($1::uuid)::text,+ 'CALENDAR_EVENT',+ $2,+ '{"type":"SelectOption","value":["00000001-0000-0000-0002-000000000002"]}'::jsonb+ )+ "#,+ EVENT_ID,+ STATUS_PROPERTY_ID,+ )+ .execute(&pool)+ .await?;++ let user_id = MacroUserIdStr::parse_from_str(OWNER_ID).unwrap();+ let items = expanded_dynamic_cursor_soup_grouped(+ &pool,+ GroupedDynamicCursorArgs {+ user_id: user_id.copied(),+ limit: 50,+ cursor: Query::Sort(+ SimpleSortMethod::ViewedUpdated,+ EntityFilterAst::mock_empty(),+ ),+ exclude_frecency: false,+ grouping: GroupingConfig {+ field: GroupByField::Property {+ property_definition_id: STATUS_PROPERTY_ID,+ entity_type: None,+ },+ group_key: None,+ per_group_limit: None,+ },+ },+ )+ .await?+ .filter(|item| item.item.id() == EVENT_ID)+ .collect::<Vec<_>>();++ assert_eq!(items.len(), 1);+ assert_eq!(items[0].key, IN_PROGRESS_OPTION_ID);+ assert!(matches!(+ items[0].item,+ models_soup::item::SoupItem::CalendarEvent(_)+ ));++ Ok(())+}diff --git a/crates/soup_realtime/src/inbound/kafka_consumer.rs b/crates/soup_realtime/src/inbound/kafka_consumer.rsindex 3624532e76..08fab0ca4b 100644--- a/crates/soup_realtime/src/inbound/kafka_consumer.rs+++ b/crates/soup_realtime/src/inbound/kafka_consumer.rs@@ -324,6 +324,7 @@ fn patches_from_channel_event(event: &ChannelTopicEvent) -> Vec<SoupRealtimePatcfn soup_entity_type_from_property(entity_type: PropertyEntityType) -> Option<EntityType> {match entity_type {+ PropertyEntityType::CalendarEvent => Some(EntityType::CalendarEvent),PropertyEntityType::CallRecord => Some(EntityType::Call),PropertyEntityType::Chat => Some(EntityType::Chat),PropertyEntityType::Company => Some(EntityType::CrmCompany),diff --git a/packages/sdk/generated/cognition/types.gen.ts b/packages/sdk/generated/cognition/types.gen.tsindex b8be52439f..99e26aee44 100644--- a/packages/sdk/generated/cognition/types.gen.ts+++ b/packages/sdk/generated/cognition/types.gen.ts@@ -508,7 +508,7 @@ export type Entity = {/*** The type of an entity in Macro*/-export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';+export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';/*** Error response body.diff --git a/packages/sdk/generated/connection/types.gen.ts b/packages/sdk/generated/connection/types.gen.tsindex 07df293838..ed7960be22 100644--- a/packages/sdk/generated/connection/types.gen.ts+++ b/packages/sdk/generated/connection/types.gen.ts@@ -40,7 +40,7 @@ export type Entity = {/*** The type of an entity in Macro*/-export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';+export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';export type GenericErrorResponse = {/**diff --git a/packages/sdk/generated/notification/types.gen.ts b/packages/sdk/generated/notification/types.gen.tsindex f5fe9bd558..09dda0b888 100644--- a/packages/sdk/generated/notification/types.gen.ts+++ b/packages/sdk/generated/notification/types.gen.ts@@ -350,7 +350,7 @@ export type Entity = {/*** The type of an entity in Macro*/-export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';+export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';/*** A plain old json error response for use with axum.diff --git a/packages/sdk/generated/properties/types.gen.ts b/packages/sdk/generated/properties/types.gen.tsindex 8e3d278268..a1d81d6a22 100644--- a/packages/sdk/generated/properties/types.gen.ts+++ b/packages/sdk/generated/properties/types.gen.ts@@ -273,7 +273,7 @@ export type EntityReference = {/*** Type of entity that can be referenced by entity properties.*/-export type EntityType = 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';+export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';/*** Query parameters for listing propertiesdiff --git a/packages/sdk/generated/search/index.ts b/packages/sdk/generated/search/index.tsindex c17bf824c8..0a7c66b43d 100644--- a/packages/sdk/generated/search/index.ts+++ b/packages/sdk/generated/search/index.ts@@ -1,4 +1,4 @@// This file is auto-generated by @hey-api/openapi-tsexport { type Options, Sdk } from './sdk.gen';-export type { CallFilters, CallRecordMetadata, CallRecordSearchResponseItem, CallRecordSearchResponseItemWithMetadata, CallRecordSearchResult, CallStatus, ChannelFilters, ChannelMessageSearchResponseItem, ChannelMetadata, ChannelNameSearchResponseItem, ChannelSearchRequest, ChannelSearchResponse, ChannelSearchResponseItem, ChannelSearchResponseItemWithMetadata, ChannelSearchResult, ChannelSortTimestamp, ChannelThreadFilters, ChatFilters, ChatMessageSearchResult, ChatMetadata, ChatSearchRequest, ChatSearchResponse, ChatSearchResponseItem, ChatSearchResponseItemWithMetadata, ClientOptions, CrmCompanyFilters, CrmCompanySearchDomain, CrmCompanySearchResponseItem, DataType, DocumentFilters, DocumentMetadata, DocumentSearchRequest, DocumentSearchResponse, DocumentSearchResponseItem, DocumentSearchResponseItemWithMetadata, DocumentSearchResult, DocumentSubType, EmailFilters, EmailSearchParticipant, EmailSearchRequest, EmailSearchResponse, EmailSearchResponseItem, EmailSearchResponseItemWithMetadata, EmailSearchResult, EmptyResponse, EntityFilters, EntityReference, EntityType, ErrorResponse, FileType, ForeignEntityFilters, MatchType, NotificationFilters, ProjectFilters, ProjectMetadata, ProjectSearchMetadata, ProjectSearchRequest, ProjectSearchResponseItem, ProjectSearchResponseItemWithMetadata, ProjectSearchResult, PropertyDefinition, PropertyFilter, PropertyOwner, PropertyValue, SearchHighlight, SearchOn, SearchResponse, SharedEmailFilter, SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp, SimpleChannelSearchReponseBaseItem, SimpleChannelSearchReponseBaseItemHumanReadableTimestamp, SimpleChannelSearchResponse, SimpleChatSearchResponse, SimpleChatSearchResponseBaseItem, SimpleChatSearchResponseBaseItemHumanReadableTimestamp, SimpleDocumentSearchResponse, SimpleDocumentSearchResponseBaseItem, SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp, SimpleEmailSearchResponse, SimpleEmailSearchResponseBaseItem, SimpleEmailSearchResponseBaseItemHumanReadableTimestamp, SimpleProjectSearchResponse, SimpleProjectSearchResponseBaseItem, SimpleProjectSearchResponseBaseItemHumanReadableTimestamp, SimpleUnifiedSearchBaseResponse, SimpleUnifiedSearchData, SimpleUnifiedSearchError, SimpleUnifiedSearchErrors, SimpleUnifiedSearchResponse, SimpleUnifiedSearchResponseBaseItem, SimpleUnifiedSearchResponseBaseItemHumanReadableTimestamp, SimpleUnifiedSearchResponses, SoupProperty, TagFilterMode, TaskFilters, UnifiedSearchData, UnifiedSearchError, UnifiedSearchErrors, UnifiedSearchRequest, UnifiedSearchResponse, UnifiedSearchResponse2, UnifiedSearchResponseItem, UnifiedSearchResponses } from './types.gen';+export type { CalendarEventFilters, CallFilters, CallRecordMetadata, CallRecordSearchResponseItem, CallRecordSearchResponseItemWithMetadata, CallRecordSearchResult, CallStatus, ChannelFilters, ChannelMessageSearchResponseItem, ChannelMetadata, ChannelNameSearchResponseItem, ChannelSearchRequest, ChannelSearchResponse, ChannelSearchResponseItem, ChannelSearchResponseItemWithMetadata, ChannelSearchResult, ChannelSortTimestamp, ChannelThreadFilters, ChatFilters, ChatMessageSearchResult, ChatMetadata, ChatSearchRequest, ChatSearchResponse, ChatSearchResponseItem, ChatSearchResponseItemWithMetadata, ClientOptions, CrmCompanyFilters, CrmCompanySearchDomain, CrmCompanySearchResponseItem, DataType, DocumentFilters, DocumentMetadata, DocumentSearchRequest, DocumentSearchResponse, DocumentSearchResponseItem, DocumentSearchResponseItemWithMetadata, DocumentSearchResult, DocumentSubType, EmailFilters, EmailSearchParticipant, EmailSearchRequest, EmailSearchResponse, EmailSearchResponseItem, EmailSearchResponseItemWithMetadata, EmailSearchResult, EmptyResponse, EntityFilters, EntityReference, EntityType, ErrorResponse, FileType, ForeignEntityFilters, MatchType, NotificationFilters, ProjectFilters, ProjectMetadata, ProjectSearchMetadata, ProjectSearchRequest, ProjectSearchResponseItem, ProjectSearchResponseItemWithMetadata, ProjectSearchResult, PropertyDefinition, PropertyFilter, PropertyOwner, PropertyValue, SearchHighlight, SearchOn, SearchResponse, SharedEmailFilter, SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp, SimpleChannelSearchReponseBaseItem, SimpleChannelSearchReponseBaseItemHumanReadableTimestamp, SimpleChannelSearchResponse, SimpleChatSearchResponse, SimpleChatSearchResponseBaseItem, SimpleChatSearchResponseBaseItemHumanReadableTimestamp, SimpleDocumentSearchResponse, SimpleDocumentSearchResponseBaseItem, SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp, SimpleEmailSearchResponse, SimpleEmailSearchResponseBaseItem, SimpleEmailSearchResponseBaseItemHumanReadableTimestamp, SimpleProjectSearchResponse, SimpleProjectSearchResponseBaseItem, SimpleProjectSearchResponseBaseItemHumanReadableTimestamp, SimpleUnifiedSearchBaseResponse, SimpleUnifiedSearchData, SimpleUnifiedSearchError, SimpleUnifiedSearchErrors, SimpleUnifiedSearchResponse, SimpleUnifiedSearchResponseBaseItem, SimpleUnifiedSearchResponseBaseItemHumanReadableTimestamp, SimpleUnifiedSearchResponses, SoupProperty, TagFilterMode, TaskFilters, UnifiedSearchData, UnifiedSearchError, UnifiedSearchErrors, UnifiedSearchRequest, UnifiedSearchResponse, UnifiedSearchResponse2, UnifiedSearchResponseItem, UnifiedSearchResponses } from './types.gen';diff --git a/packages/sdk/generated/search/types.gen.ts b/packages/sdk/generated/search/types.gen.tsindex 1f10ed6a57..5b67517e5e 100644--- a/packages/sdk/generated/search/types.gen.ts+++ b/packages/sdk/generated/search/types.gen.ts@@ -4,6 +4,36 @@ export type ClientOptions = {baseUrl: `${string}://${string}` | (string & {});};+/**+ * Filters for canonical calendar-event entities.+ */+export type CalendarEventFilters = {+ /**+ * Attendee email addresses.+ */+ attendees?: Array<string>;+ /**+ * Canonical event ids.+ */+ calendar_event_ids?: Array<string>;+ /**+ * Include master events ending after this instant.+ */+ ends_after?: string | null;+ /**+ * Organizer email addresses.+ */+ organizers?: Array<string>;+ /**+ * Include master events starting before this instant.+ */+ starts_before?: string | null;+ /**+ * Event statuses such as `confirmed`, `tentative`, or `cancelled`.+ */+ statuses?: Array<string>;+};+/*** Filters for call records.*/@@ -1018,6 +1048,10 @@ export type EmptyResponse = {* a bundle of all of the filters for each entity type*/export type EntityFilters = {+ /**+ * the bundled [CalendarEventFilters]+ */+ calendar_event_filters?: CalendarEventFilters;/*** the bundled [CallFilters]*/@@ -1087,7 +1121,7 @@ export type EntityReference = {/*** Type of entity that can be referenced by entity properties.*/-export type EntityType = 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';+export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';/*** A plain old json error response for use with axum.diff --git a/packages/sdk/generated/storage/index.ts b/packages/sdk/generated/storage/index.tsindex e29241a4d4..a74c5e8b6f 100644--- a/packages/sdk/generated/storage/index.ts+++ b/packages/sdk/generated/storage/index.ts@@ -1,4 +1,4 @@// This file is auto-generated by @hey-api/openapi-tsexport { type Options, Sdk } from './sdk.gen';-export type { AccessLevel, Activity, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Anchor, AnchorId, AnchorRequest, AnchorResponse, AnnotationIncrementalUpdate, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelContextMessage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelMessage, ApiChannelMessageKind, ApiChannelMessagesPage, ApiChannelParticipant, ApiChannelWithLatest, ApiCountedReaction, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiMessageAttachment, ApiMessageSender, ApiMessageSenderType, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, ApiResolvedChannelMessage, ApiThreadInfo, ApiThreadReply, AttendeeResponseStatus, BasicDocument, BasicDocumentSubType, BomPart, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallFilters, CallRecord, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelEventAttachment, ChannelFilters, ChannelJoinCodeResponse, ChannelMentionedMetadata, ChannelMessage, ChannelMessageAttachmentCreatedMetadata, ChannelMessageAttachmentRemovedMetadata, ChannelMessageDeletedMetadata, ChannelMessageFilters, ChannelMessagePatchedMetadata, ChannelMessagePostedMetadata, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClientOptions, CloudStorageItemType, Comment, CommentThread, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCommentData, CreateCommentError, CreateCommentErrors, CreateCommentRequest, CreateCommentResponse, CreateCommentResponse2, CreateCommentResponses, CreateCrmCommentData, CreateCrmCommentError, CreateCrmCommentErrors, CreateCrmCommentRequest, CreateCrmCommentResponse, CreateCrmCommentResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmComment, CrmCommentEntityType, CrmCommentThread, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmTeamSettingsResponse, CrmThread, CustomSpeakerAssignment, DataType, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorInfo, DeleteAnchorResponse, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelResponse, DeleteChannelResponses, DeleteCommentData, DeleteCommentError, DeleteCommentErrors, DeleteCommentRequest, DeleteCommentResponse, DeleteCommentResponse2, DeleteCommentResponses, DeleteCrmCommentData, DeleteCrmCommentError, DeleteCrmCommentErrors, DeleteCrmCommentResponse, DeleteCrmCommentResponses, DeleteCrmCommentResult, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteMessageData, DeleteMessageError, DeleteMessageErrors, DeleteMessageQuery, DeleteMessageResponse, DeleteMessageResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteThreadInfo, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentTeamShareResponse, DocumentTopicEvent, DocumentUpdatedMetadata, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditCommentData, EditCommentError, EditCommentErrors, EditCommentRequest, EditCommentResponse, EditCommentResponse2, EditCommentResponses, EditCrmCommentData, EditCrmCommentError, EditCrmCommentErrors, EditCrmCommentRequest, EditCrmCommentResponse, EditCrmCommentResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmptyResponse, EntityFilters, EntityPermission, EntityPermissionResponse, EntityReference, EntityType, ErrorResponse, EventStatus, EventTime, EventTransparency, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileSystemNodeWithIds, FileType, FileTypeUpdate, FolderItem, ForeignEntity, ForeignEntityFilters, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActivitiesResponse, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelMessagesData, GetChannelMessagesError, GetChannelMessagesErrors, GetChannelMessagesResponse, GetChannelMessagesResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentCommentsData, GetDocumentCommentsError, GetDocumentCommentsErrors, GetDocumentCommentsResponse, GetDocumentCommentsResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMessageWithContextData, GetMessageWithContextError, GetMessageWithContextErrors, GetMessageWithContextResponse, GetMessageWithContextResponse2, GetMessageWithContextResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetRecentActivityHandlerData, GetRecentActivityHandlerError, GetRecentActivityHandlerErrors, GetRecentActivityHandlerResponse, GetRecentActivityHandlerResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetThreadRepliesData, GetThreadRepliesError, GetThreadRepliesErrors, GetThreadRepliesResponse, GetThreadRepliesResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubPullRequest, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestsResponse, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InstallSyncData, InteractionReason, Item, ItemWithUserAccessLevel, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, LatestMessage, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmCommentsData, ListCrmCommentsError, ListCrmCommentsErrors, ListCrmCommentsResponse, ListCrmCommentsResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, Mentions, NewChannelAttachment, NotificationFilters, Params, ParticipantRole, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchMessageData, PatchMessageError, PatchMessageErrors, PatchMessageRequest, PatchMessageResponse, PatchMessageResponses, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfAnchorRequest, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PdfPlaceableCommentAnchorRequest, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostChannelMessagesData, PostChannelMessagesError, PostChannelMessagesErrors, PostChannelMessagesResponse, PostChannelMessagesResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessageData, PostMessageError, PostMessageErrors, PostMessageRequest, PostMessageResponse, PostMessageResponse2, PostMessageResponses, PostReactionData, PostReactionError, PostReactionErrors, PostReactionRequest, PostReactionResponse, PostReactionResponses, PostSoupAstRequest, PostSoupRequest, PostTypingData, PostTypingError, PostTypingErrors, PostTypingRequest, PostTypingResponse, PostTypingResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresignedUrl, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyDefinition, PropertyFilter, PropertyInput, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, ReactionAction, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ResolveChannelMessageData, ResolveChannelMessageError, ResolveChannelMessageErrors, ResolveChannelMessageResponse, ResolveChannelMessageResponses, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RingStatus, RingStatusResponse, S3ObjectInfo, SaveBomPart, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetPropertyValue, SharedEmailFilter, SharePermissionV2, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SoupApiItem, SoupApiSort, SoupAttachment, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmDomain, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupThreadInfo, SoupThreadReply, StarterDocumentsResponse, String, SuccessResponse, SyncServiceVersionId, TagFilterMode, TaskFilters, TeamRole, Thread, ThreadResponse, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TranscriptSegmentRequest, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingAction, UnthreadedPdfUuidRequest, UpdateChannelSharePermission, UpdateCrmTeamSettingsRequest, UpdateOperation, UpdateSharePermissionRequestV2, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserActivitiesResponse, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, View, ViewPatch, ViewsResponse, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';+export type { AccessLevel, Activity, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Anchor, AnchorId, AnchorRequest, AnchorResponse, AnnotationIncrementalUpdate, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelContextMessage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelMessage, ApiChannelMessageKind, ApiChannelMessagesPage, ApiChannelParticipant, ApiChannelWithLatest, ApiCountedReaction, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiMessageAttachment, ApiMessageSender, ApiMessageSenderType, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, ApiResolvedChannelMessage, ApiThreadInfo, ApiThreadReply, AttendeeResponseStatus, BasicDocument, BasicDocumentSubType, BomPart, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallFilters, CallRecord, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelEventAttachment, ChannelFilters, ChannelJoinCodeResponse, ChannelMentionedMetadata, ChannelMessage, ChannelMessageAttachmentCreatedMetadata, ChannelMessageAttachmentRemovedMetadata, ChannelMessageDeletedMetadata, ChannelMessageFilters, ChannelMessagePatchedMetadata, ChannelMessagePostedMetadata, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClientOptions, CloudStorageItemType, Comment, CommentThread, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCommentData, CreateCommentError, CreateCommentErrors, CreateCommentRequest, CreateCommentResponse, CreateCommentResponse2, CreateCommentResponses, CreateCrmCommentData, CreateCrmCommentError, CreateCrmCommentErrors, CreateCrmCommentRequest, CreateCrmCommentResponse, CreateCrmCommentResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmComment, CrmCommentEntityType, CrmCommentThread, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmTeamSettingsResponse, CrmThread, CustomSpeakerAssignment, DataType, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorInfo, DeleteAnchorResponse, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelResponse, DeleteChannelResponses, DeleteCommentData, DeleteCommentError, DeleteCommentErrors, DeleteCommentRequest, DeleteCommentResponse, DeleteCommentResponse2, DeleteCommentResponses, DeleteCrmCommentData, DeleteCrmCommentError, DeleteCrmCommentErrors, DeleteCrmCommentResponse, DeleteCrmCommentResponses, DeleteCrmCommentResult, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteMessageData, DeleteMessageError, DeleteMessageErrors, DeleteMessageQuery, DeleteMessageResponse, DeleteMessageResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteThreadInfo, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentTeamShareResponse, DocumentTopicEvent, DocumentUpdatedMetadata, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditCommentData, EditCommentError, EditCommentErrors, EditCommentRequest, EditCommentResponse, EditCommentResponse2, EditCommentResponses, EditCrmCommentData, EditCrmCommentError, EditCrmCommentErrors, EditCrmCommentRequest, EditCrmCommentResponse, EditCrmCommentResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmptyResponse, EntityFilters, EntityPermission, EntityPermissionResponse, EntityReference, EntityType, ErrorResponse, EventStatus, EventTime, EventTransparency, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileSystemNodeWithIds, FileType, FileTypeUpdate, FolderItem, ForeignEntity, ForeignEntityFilters, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActivitiesResponse, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelMessagesData, GetChannelMessagesError, GetChannelMessagesErrors, GetChannelMessagesResponse, GetChannelMessagesResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentCommentsData, GetDocumentCommentsError, GetDocumentCommentsErrors, GetDocumentCommentsResponse, GetDocumentCommentsResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMessageWithContextData, GetMessageWithContextError, GetMessageWithContextErrors, GetMessageWithContextResponse, GetMessageWithContextResponse2, GetMessageWithContextResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetRecentActivityHandlerData, GetRecentActivityHandlerError, GetRecentActivityHandlerErrors, GetRecentActivityHandlerResponse, GetRecentActivityHandlerResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetThreadRepliesData, GetThreadRepliesError, GetThreadRepliesErrors, GetThreadRepliesResponse, GetThreadRepliesResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubPullRequest, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestsResponse, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InstallSyncData, InteractionReason, Item, ItemWithUserAccessLevel, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, LatestMessage, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmCommentsData, ListCrmCommentsError, ListCrmCommentsErrors, ListCrmCommentsResponse, ListCrmCommentsResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, Mentions, NewChannelAttachment, NotificationFilters, Params, ParticipantRole, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchMessageData, PatchMessageError, PatchMessageErrors, PatchMessageRequest, PatchMessageResponse, PatchMessageResponses, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfAnchorRequest, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PdfPlaceableCommentAnchorRequest, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostChannelMessagesData, PostChannelMessagesError, PostChannelMessagesErrors, PostChannelMessagesResponse, PostChannelMessagesResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessageData, PostMessageError, PostMessageErrors, PostMessageRequest, PostMessageResponse, PostMessageResponse2, PostMessageResponses, PostReactionData, PostReactionError, PostReactionErrors, PostReactionRequest, PostReactionResponse, PostReactionResponses, PostSoupAstRequest, PostSoupRequest, PostTypingData, PostTypingError, PostTypingErrors, PostTypingRequest, PostTypingResponse, PostTypingResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresignedUrl, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyDefinition, PropertyFilter, PropertyInput, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, ReactionAction, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ResolveChannelMessageData, ResolveChannelMessageError, ResolveChannelMessageErrors, ResolveChannelMessageResponse, ResolveChannelMessageResponses, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RingStatus, RingStatusResponse, S3ObjectInfo, SaveBomPart, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetPropertyValue, SharedEmailFilter, SharePermissionV2, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SoupApiItem, SoupApiSort, SoupAttachment, SoupCalendarEventSoupPropertiesField, SoupCalendarEventTime, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmDomain, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupThreadInfo, SoupThreadReply, StarterDocumentsResponse, String, SuccessResponse, SyncServiceVersionId, TagFilterMode, TaskFilters, TeamRole, Thread, ThreadResponse, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TranscriptSegmentRequest, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingAction, UnthreadedPdfUuidRequest, UpdateChannelSharePermission, UpdateCrmTeamSettingsRequest, UpdateOperation, UpdateSharePermissionRequestV2, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserActivitiesResponse, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, View, ViewPatch, ViewsResponse, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.tsindex 3a03e39917..da944c611d 100644--- a/packages/sdk/generated/storage/types.gen.ts+++ b/packages/sdk/generated/storage/types.gen.ts@@ -31,7 +31,7 @@ export type AddFavoriteRequest = {/*** The type of the entity to favorite.*/- entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';+ entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';};/**@@ -619,6 +619,10 @@ export type ApiCountedReaction = {* Wire-format entity filter AST accepted by soup AST endpoints.*/export type ApiEntityFilterAst = {+ /**+ * filters applied to canonical calendar events+ */+ calf?: unknown;/*** the filters that should be applied to the call entity*/@@ -1266,6 +1270,36 @@ export type CalendarEvent = {visibility: EventVisibility;};+/**+ * Filters for canonical calendar-event entities.+ */+export type CalendarEventFilters = {+ /**+ * Attendee email addresses.+ */+ attendees?: Array<string>;+ /**+ * Canonical event ids.+ */+ calendar_event_ids?: Array<string>;+ /**+ * Include master events ending after this instant.+ */+ ends_after?: string | null;+ /**+ * Organizer email addresses.+ */+ organizers?: Array<string>;+ /**+ * Include master events starting before this instant.+ */+ starts_before?: string | null;+ /**+ * Event statuses such as `confirmed`, `tentative`, or `cancelled`.+ */+ statuses?: Array<string>;+};+/*** A materialized recurrence instance optimized for range queries.*/@@ -4181,6 +4215,10 @@ export type EmptyResponse = {* a bundle of all of the filters for each entity type*/export type EntityFilters = {+ /**+ * the bundled [CalendarEventFilters]+ */+ calendar_event_filters?: CalendarEventFilters;/*** the bundled [CallFilters]*/@@ -4288,7 +4326,7 @@ export type EntityReference = {/*** Type of entity that can be referenced by entity properties.*/-export type EntityType = 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';+export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';/*** A plain old json error response for use with axum.@@ -4406,7 +4444,7 @@ export type Favorite = {/*** The type of the favorited entity.*/- entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';+ entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';/*** File type of the favorited document, when applicable.*/@@ -4428,7 +4466,7 @@ export type FavoriteEntityRef = {/*** The type of the favorited entity.*/- entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';+ entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';};/**@@ -6289,6 +6327,114 @@ export type SoupAttachment = {sizeBytes?: number | null;};+/**+ * Timed or all-day calendar event span.+ */+export type SoupCalendarEventTime = {+ /**+ * Exclusive end.+ */+ ends_at: string;+ kind: 'timed';+ /**+ * Inclusive start.+ */+ starts_at: string;+ /**+ * Original IANA time zone.+ */+ time_zone?: string | null;+} | {+ /**+ * Exclusive end date.+ */+ end_date: string;+ kind: 'allDay';+ /**+ * Inclusive start date.+ */+ start_date: string;+};++/**+ * A canonical calendar event entity in Soup.+ */+export type SoupCalendarEventSoupPropertiesField = {+ /**+ * Direct conference join URL.+ */+ conferenceUrl?: string | null;+ /**+ * Entity creation timestamp.+ */+ createdAt: string;+ /**+ * Optional description.+ */+ description?: string | null;+ /**+ * Property fields that can be flattened into property-bearing Soup items.+ */+ extra: {+ /**+ * Properties attached to the entity.+ */+ properties: Array<SoupProperty>;+ };+ /**+ * RFC 5545 UID used for source reconciliation.+ */+ icalUid: string;+ /**+ * Entity identifier.+ */+ id: string;+ /**+ * Whether the selected canonical source is read-only.+ */+ isReadOnly: boolean;+ /**+ * Optional location label.+ */+ location?: string | null;+ /**+ * Organizer email.+ */+ organizerEmail?: string | null;+ /**+ * Organizer display name.+ */+ organizerName?: string | null;+ /**+ * Owning Macro user.+ */+ ownerId: string;+ /**+ * Canonical status.+ */+ status: string;+ /**+ * Canonical master time.+ */+ time: SoupCalendarEventTime;+ /**+ * Display title.+ */+ title: string;+ /**+ * Availability transparency.+ */+ transparency: string;+ /**+ * Entity update timestamp.+ */+ updatedAt: string;+ /**+ * Canonical visibility.+ */+ visibility: string;+};+/*** A participant in a call record, as displayed in Soup.*/@@ -6880,6 +7026,12 @@ export type SoupItem = {*/data: SoupCallRecordSoupPropertiesField;tag: 'call';+} | {+ /**+ * Calendar event item.+ */+ data: SoupCalendarEventSoupPropertiesField;+ tag: 'calendarEvent';} | {/*** CRM company item.@@ -10755,7 +10907,7 @@ export type RemoveFavoriteByEntityData = {/*** The type of an entity in Macro*/- entity_type: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';+ entity_type: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact';/*** The id of the favorited entity.*/diff --git a/packages/sdk/specs/cognition.json b/packages/sdk/specs/cognition.jsonindex 06c92375e1..b9e70fac6c 100644--- a/packages/sdk/specs/cognition.json+++ b/packages/sdk/specs/cognition.json@@ -2620,6 +2620,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",diff --git a/packages/sdk/specs/connection.json b/packages/sdk/specs/connection.jsonindex f8bd19cdc8..7b8df2626d 100644--- a/packages/sdk/specs/connection.json+++ b/packages/sdk/specs/connection.json@@ -252,6 +252,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",diff --git a/packages/sdk/specs/notification.json b/packages/sdk/specs/notification.jsonindex 6f24ed0fb1..36e1e5b54e 100644--- a/packages/sdk/specs/notification.json+++ b/packages/sdk/specs/notification.json@@ -1498,6 +1498,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",diff --git a/packages/sdk/specs/properties.json b/packages/sdk/specs/properties.jsonindex 07d438e0e3..7abced117d 100644--- a/packages/sdk/specs/properties.json+++ b/packages/sdk/specs/properties.json@@ -1324,6 +1324,7 @@"type": "string","description": "Type of entity that can be referenced by entity properties.","enum": [+ "CALENDAR_EVENT","CALL_RECORD","CHANNEL","CHAT",diff --git a/packages/sdk/specs/search.json b/packages/sdk/specs/search.jsonindex 8fd5341d4c..e0f68ed39f 100644--- a/packages/sdk/specs/search.json+++ b/packages/sdk/specs/search.json@@ -173,6 +173,50 @@},"components": {"schemas": {+ "CalendarEventFilters": {+ "type": "object",+ "description": "Filters for canonical calendar-event entities.",+ "properties": {+ "attendees": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Attendee email addresses."+ },+ "calendar_event_ids": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Canonical event ids."+ },+ "ends_after": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "Include master events ending after this instant."+ },+ "organizers": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Organizer email addresses."+ },+ "starts_before": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "Include master events starting before this instant."+ },+ "statuses": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Event statuses such as `confirmed`, `tentative`, or `cancelled`."+ }+ }+ },"CallFilters": {"type": "object","description": "Filters for call records.",@@ -1742,6 +1786,10 @@"type": "object","description": "a bundle of all of the filters for each entity type","properties": {+ "calendar_event_filters": {+ "$ref": "#/components/schemas/CalendarEventFilters",+ "description": "the bundled [CalendarEventFilters]"+ },"call_filters": {"$ref": "#/components/schemas/CallFilters","description": "the bundled [CallFilters]"@@ -1820,6 +1868,7 @@"type": "string","description": "Type of entity that can be referenced by entity properties.","enum": [+ "CALENDAR_EVENT","CALL_RECORD","CHANNEL","CHAT",diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.jsonindex 064ca7bdb3..cc99b57896 100644--- a/packages/sdk/specs/storage.json+++ b/packages/sdk/specs/storage.json@@ -7815,6 +7815,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",@@ -10593,6 +10594,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",@@ -11566,6 +11568,9 @@"type": "object","description": "Wire-format entity filter AST accepted by soup AST endpoints.","properties": {+ "calf": {+ "description": "filters applied to canonical calendar events"+ },"callf": {"description": "the filters that should be applied to the call entity"},@@ -12425,6 +12430,50 @@}}},+ "CalendarEventFilters": {+ "type": "object",+ "description": "Filters for canonical calendar-event entities.",+ "properties": {+ "attendees": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Attendee email addresses."+ },+ "calendar_event_ids": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Canonical event ids."+ },+ "ends_after": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "Include master events ending after this instant."+ },+ "organizers": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Organizer email addresses."+ },+ "starts_before": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "Include master events starting before this instant."+ },+ "statuses": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Event statuses such as `confirmed`, `tentative`, or `cancelled`."+ }+ }+ },"CalendarOccurrence": {"type": "object","description": "A materialized recurrence instance optimized for range queries.",@@ -16752,6 +16801,10 @@"type": "object","description": "a bundle of all of the filters for each entity type","properties": {+ "calendar_event_filters": {+ "$ref": "#/components/schemas/CalendarEventFilters",+ "description": "the bundled [CalendarEventFilters]"+ },"call_filters": {"$ref": "#/components/schemas/CallFilters","description": "the bundled [CallFilters]"@@ -16919,6 +16972,7 @@"type": "string","description": "Type of entity that can be referenced by entity properties.","enum": [+ "CALENDAR_EVENT","CALL_RECORD","CHANNEL","CHAT",@@ -17082,6 +17136,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",@@ -17126,6 +17181,7 @@"document","project","email_thread",+ "calendar_event","team","call","foreign_entity",@@ -20855,6 +20911,158 @@}}},+ "SoupCalendarEventTime": {+ "oneOf": [+ {+ "type": "object",+ "description": "Absolute timed event.",+ "required": ["starts_at", "ends_at", "kind"],+ "properties": {+ "ends_at": {+ "type": "string",+ "format": "date-time",+ "description": "Exclusive end."+ },+ "kind": {+ "type": "string",+ "enum": ["timed"]+ },+ "starts_at": {+ "type": "string",+ "format": "date-time",+ "description": "Inclusive start."+ },+ "time_zone": {+ "type": ["string", "null"],+ "description": "Original IANA time zone."+ }+ }+ },+ {+ "type": "object",+ "description": "All-day event with an exclusive end date.",+ "required": ["start_date", "end_date", "kind"],+ "properties": {+ "end_date": {+ "type": "string",+ "format": "date",+ "description": "Exclusive end date."+ },+ "kind": {+ "type": "string",+ "enum": ["allDay"]+ },+ "start_date": {+ "type": "string",+ "format": "date",+ "description": "Inclusive start date."+ }+ }+ }+ ],+ "description": "Timed or all-day calendar event span."+ },+ "SoupCalendarEvent_SoupPropertiesField": {+ "type": "object",+ "description": "A canonical calendar event entity in Soup.",+ "required": [+ "id",+ "ownerId",+ "icalUid",+ "title",+ "status",+ "visibility",+ "transparency",+ "time",+ "isReadOnly",+ "createdAt",+ "updatedAt",+ "extra"+ ],+ "properties": {+ "conferenceUrl": {+ "type": ["string", "null"],+ "description": "Direct conference join URL."+ },+ "createdAt": {+ "type": "string",+ "format": "date-time",+ "description": "Entity creation timestamp."+ },+ "description": {+ "type": ["string", "null"],+ "description": "Optional description."+ },+ "extra": {+ "type": "object",+ "description": "Property fields that can be flattened into property-bearing Soup items.",+ "required": ["properties"],+ "properties": {+ "properties": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/SoupProperty"+ },+ "description": "Properties attached to the entity."+ }+ }+ },+ "icalUid": {+ "type": "string",+ "description": "RFC 5545 UID used for source reconciliation."+ },+ "id": {+ "type": "string",+ "format": "uuid",+ "description": "Entity identifier."+ },+ "isReadOnly": {+ "type": "boolean",+ "description": "Whether the selected canonical source is read-only."+ },+ "location": {+ "type": ["string", "null"],+ "description": "Optional location label."+ },+ "organizerEmail": {+ "type": ["string", "null"],+ "description": "Organizer email."+ },+ "organizerName": {+ "type": ["string", "null"],+ "description": "Organizer display name."+ },+ "ownerId": {+ "type": "string",+ "description": "Owning Macro user."+ },+ "status": {+ "type": "string",+ "description": "Canonical status."+ },+ "time": {+ "$ref": "#/components/schemas/SoupCalendarEventTime",+ "description": "Canonical master time."+ },+ "title": {+ "type": "string",+ "description": "Display title."+ },+ "transparency": {+ "type": "string",+ "description": "Availability transparency."+ },+ "updatedAt": {+ "type": "string",+ "format": "date-time",+ "description": "Entity update timestamp."+ },+ "visibility": {+ "type": "string",+ "description": "Canonical visibility."+ }+ }+ },"SoupCallRecordParticipant": {"type": "object","description": "A participant in a call record, as displayed in Soup.",@@ -21742,6 +21950,21 @@}}},+ {+ "type": "object",+ "description": "Calendar event item.",+ "required": ["data", "tag"],+ "properties": {+ "data": {+ "$ref": "#/components/schemas/SoupCalendarEvent_SoupPropertiesField",+ "description": "Calendar event item."+ },+ "tag": {+ "type": "string",+ "enum": ["calendarEvent"]+ }+ }+ },{"type": "object","description": "CRM company item.",diff --git a/services/document_storage_service/src/service/entity_mutation.rs b/services/document_storage_service/src/service/entity_mutation.rsindex c99b0a53a3..45065ed0b3 100644--- a/services/document_storage_service/src/service/entity_mutation.rs+++ b/services/document_storage_service/src/service/entity_mutation.rs@@ -183,7 +183,8 @@ fn favoritable(entity_type: EntityType) -> bool {| EntityType::Team| EntityType::ChannelMessage| EntityType::StaticFile- | EntityType::CrmContact => false,+ | EntityType::CrmContact+ | EntityType::CalendarEvent => false,}}@@ -453,7 +454,8 @@ where| EntityType::ForeignEntity| EntityType::StaticFile| EntityType::CrmCompany- | EntityType::CrmContact => {+ | EntityType::CrmContact+ | EntityType::CalendarEvent => {return unsupported(requested, "rename");}};@@ -495,7 +497,8 @@ where| EntityType::ForeignEntity| EntityType::StaticFile| EntityType::CrmCompany- | EntityType::CrmContact => {+ | EntityType::CrmContact+ | EntityType::CalendarEvent => {return unsupported(requested, "move");}};@@ -539,7 +542,8 @@ where| EntityType::ForeignEntity| EntityType::StaticFile| EntityType::CrmCompany- | EntityType::CrmContact => {+ | EntityType::CrmContact+ | EntityType::CalendarEvent => {return unsupported(requested, "share policy updates");}};@@ -586,7 +590,8 @@ where| EntityType::ForeignEntity| EntityType::StaticFile| EntityType::CrmCompany- | EntityType::CrmContact => {+ | EntityType::CrmContact+ | EntityType::CalendarEvent => {return unsupported(requested, "trash");}};@@ -612,7 +617,8 @@ where| EntityType::ForeignEntity| EntityType::StaticFile| EntityType::CrmCompany- | EntityType::CrmContact => {+ | EntityType::CrmContact+ | EntityType::CalendarEvent => {return unsupported(requested, "restore");}};@@ -658,7 +664,8 @@ where| EntityType::ForeignEntity| EntityType::StaticFile| EntityType::CrmCompany- | EntityType::CrmContact => {+ | EntityType::CrmContact+ | EntityType::CalendarEvent => {return unsupported(requested, "permanent deletion");}};@@ -714,7 +721,8 @@ where| EntityType::ForeignEntity| EntityType::StaticFile| EntityType::CrmCompany- | EntityType::CrmContact => {+ | EntityType::CrmContact+ | EntityType::CalendarEvent => {return unsupported(requested, "duplication");}};diff --git a/static_assets/schema.graphql b/static_assets/schema.graphqlindex dd457be73e..d8281a0e67 100644--- a/static_assets/schema.graphql+++ b/static_assets/schema.graphql@@ -180,6 +180,72 @@ type GraphqlCacheDeletion {entityId: ID!}+"""+The two operands of a recursive `CalendarEventFilterExpr` binary expression.+"""+input GraphqlCalendarEventBinaryExpr {+ """+ The left-hand expression.+ """+ left: GraphqlCalendarEventExpr!+ """+ The right-hand expression.+ """+ right: GraphqlCalendarEventExpr!+}++"""+A recursive `CalendarEventFilterExpr` filter expression.+"""+input GraphqlCalendarEventExpr @oneOf {+ """+ Matches when both expressions match.+ """+ and: GraphqlCalendarEventBinaryExpr+ """+ Matches when either expression matches.+ """+ or: GraphqlCalendarEventBinaryExpr+ """+ Negates an expression.+ """+ not: GraphqlCalendarEventExpr+ """+ Matches a domain-specific literal condition.+ """+ literal: GraphqlCalendarEventLiteral+}++"""+GraphQL input representing a calendar event literal.+"""+input GraphqlCalendarEventLiteral @oneOf {+ """+ Canonical event id.+ """+ id: ID+ """+ Event status.+ """+ status: String+ """+ Master start must be before this RFC3339 instant.+ """+ startsBefore: String+ """+ Master end must be after this RFC3339 instant.+ """+ endsAfter: String+ """+ Attendee email.+ """+ attendee: String+ """+ Organizer email.+ """+ organizer: String+}+"""The two operands of a recursive `CallFilterExpr` binary expression."""@@ -1116,6 +1182,10 @@ enum GraphqlEntityAccessLevel {GraphQL input mirroring `item_filters::ast::EntityFilterAst`."""input GraphqlEntityFilterAst {+ """+ The calendar event filter to apply.+ """+ calendarEventFilter: GraphqlCalendarEventExpr"""The document filter to apply."""@@ -1292,6 +1362,10 @@ enum GraphqlEntityType {"""CALL"""+ Calendar event entity.+ """+ CALENDAR_EVENT+ """CRM company entity."""CRM_COMPANY@@ -1701,6 +1775,10 @@ type GraphqlPropertyEntityReference {An entity type supported by the properties domain."""enum GraphqlPropertyEntityType {+ """+ Calendar event entity.+ """+ CALENDAR_EVENT"""Call record entity."""@@ -1942,6 +2020,88 @@ type GraphqlSoupBin {items: [GraphqlSoupEntity!]!}+"""+GraphQL representation of a canonical calendar event.+"""+type GraphqlSoupCalendarEvent implements GraphqlSoupEntity {+ """+ The unique identifier.+ """+ id: ID!+ """+ Canonical entity kind.+ """+ entityType: GraphqlSoupEntityType!+ """+ User-visible display name.+ """+ displayName: String+ """+ Common calendar event metadata.+ """+ metadata: GraphqlEntityMetadata!+ """+ The owning Macro user.+ """+ ownerId: String!+ """+ The event title.+ """+ title: String!+ """+ The event description.+ """+ description: String+ """+ The event location.+ """+ location: String+ """+ Canonical event status.+ """+ status: String!+ """+ Timed or all-day event span.+ """+ time: JSON!+ """+ Direct conference join URL.+ """+ conferenceUrl: String+ """+ Whether the canonical source is read-only.+ """+ isReadOnly: Boolean!+ """+ Creation timestamp.+ """+ createdAt: String!+ """+ Update timestamp.+ """+ updatedAt: String!+ """+ The viewer's frecency score for this entity, when loaded.+ """+ frecencyScore: Float+ """+ Properties assigned to this entity that the authenticated user may view.+ """+ properties: [GraphqlProperty!]!+ """+ Notifications associated with this entity for the authenticated user.+ """+ notifications: [GraphqlSoupNotification!]!+ """+ Whether the authenticated viewer has favorited this entity.+ """+ isFavorited: Boolean!+ """+ The authenticated viewer's effective permission for this entity.+ """+ viewerPermission: GraphqlEntityPermission+}+"""GraphQL representation of the soup call."""@@ -2994,6 +3154,10 @@ enum GraphqlSoupEntityType {Foreign entity."""FOREIGN_ENTITY+ """+ Calendar event entity.+ """+ CALENDAR_EVENT}"""