Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat: include individual content hit senders in email search (#765)

gbirman071142f91280
diff --git a/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx b/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx
index 4261c65240..308212e435 100644
--- a/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx
+++ b/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx
@@ -22,10 +22,12 @@ import {
createMemo,
createSignal,
For,
+ Match,
onCleanup,
onMount,
Show,
Suspense,
+ Switch,
} from 'solid-js';
import { Dynamic } from 'solid-js/web';
import {
@@ -43,6 +45,7 @@ import type { Notification, WithNotification } from '../types/notification';
import type {
ChannelContentHitData,
ContentHitData,
+ EmailContentHitData,
SearchLocation,
WithSearch,
} from '../types/search';
@@ -94,7 +97,6 @@ function GenericContentHit(props: { data: ContentHitData }) {
function ChannelMessageContentHit(props: { data: ChannelContentHitData }) {
const [userName] = useDisplayName(props.data.senderId);
- const formattedDate = createFormattedDate(props.data.sentAt);
return (
<div class="flex gap-2 items-center min-w-0">
@@ -106,7 +108,7 @@ function ChannelMessageContentHit(props: { data: ChannelContentHitData }) {
{userName()}
</div>
<div class="shrink-0 font-mono text-xs uppercase text-ink-extra-muted">
- {formattedDate()}
+ {createFormattedDate(props.data.sentAt)}
</div>
<div class="text-sm text-ink-muted truncate flex items-center flex-1 min-w-0">
<StaticMarkdown
@@ -120,6 +122,56 @@ function ChannelMessageContentHit(props: { data: ChannelContentHitData }) {
);
}
+function EmailMessageContentHit(props: {
+ allData: EmailContentHitData[];
+ data: EmailContentHitData;
+}) {
+ const isSingleMatch = createMemo(() => {
+ return props.allData.length === 1;
+ });
+ const isSingleSender = createMemo(() => {
+ const senders = props.allData.map((d) => d.sender);
+ if (senders.length === 1) return true;
+ if (new Set(senders).size === 1) return true;
+ return false;
+ });
+ const isSingleSentAt = createMemo(() => {
+ const sentAts = props.allData.map((d) => d.sentAt);
+ if (sentAts.length === 1) return true;
+ if (new Set(sentAts).size === 1) return true;
+ const formattedDates = sentAts.map(createFormattedDate);
+ if (new Set(formattedDates).size === 1) return true;
+ return false;
+ });
+
+ return (
+ <div class="flex gap-2 items-center min-w-0">
+ <div class="flex size-5 shrink-0 items-center justify-center">
+ <UserIcon id={props.data.senderId} size="xs" />
+ </div>
+ <div class="flex gap-2 text-sm w-full min-w-0 overflow-hidden items-baseline">
+ <Show when={!isSingleMatch() && !isSingleSender()}>
+ <div class="text-sm shrink-0 truncate min-w-0 font-medium">
+ {props.data.sender}
+ </div>
+ </Show>
+ <Show when={!isSingleMatch() && !isSingleSentAt()}>
+ <div class="shrink-0 font-mono text-xs uppercase text-ink-extra-muted">
+ {createFormattedDate(props.data.sentAt)}
+ </div>
+ </Show>
+ <div class="text-sm text-ink-muted truncate flex items-center flex-1 min-w-0">
+ <StaticMarkdown
+ markdown={props.data.content}
+ theme={unifiedListMarkdownTheme}
+ singleLine={true}
+ />
+ </div>
+ </div>
+ </div>
+ );
+}
+
function ThreadBorder() {
return (
<div
@@ -217,7 +269,6 @@ function NotificationRow(props: {
entity: EntityData;
}) {
const [userName] = useDisplayName(props.notification.senderId);
- const formattedDate = createFormattedDate(props.notification.createdAt);
const ActionContent = () => {
if (
@@ -302,13 +353,14 @@ function NotificationRow(props: {
<MessageContent />
</div>
<div class="shrink-0 font-mono text-xs uppercase text-ink-extra-muted ml-2">
- {formattedDate()}
+ {createFormattedDate(props.notification.createdAt)}
</div>
</CollapsibleListRow>
);
}
function ContentHitRow(props: {
+ allData: ContentHitData[];
data: ContentHitData;
onClick: (e: EntityClickEvent, location?: SearchLocation) => void;
index?: number;
@@ -325,9 +377,19 @@ function ContentHitRow(props: {
onClick={(e) => props.onClick(e, props.data.location)}
showThreadBorder={props.data.type === 'channel'}
>
- <Show
- when={props.data.type === 'channel' && props.data}
- fallback={
+ <Switch>
+ <Match when={props.data.type === 'channel' && props.data}>
+ {(data) => <ChannelMessageContentHit data={data()} />}
+ </Match>
+ <Match when={props.data.type === 'email' && props.data}>
+ {(data) => (
+ <EmailMessageContentHit
+ allData={props.allData as EmailContentHitData[]}
+ data={data()}
+ />
+ )}
+ </Match>
+ <Match when={true}>
<div class="flex gap-2 items-center min-w-0 w-full">
<div class="flex size-5 shrink-0 items-center justify-center">
<div class="h-4/5 border-l border-b w-2 border-edge-muted -translate-y-2 translate-x-[calc(0.25em-1px)]"></div>
@@ -343,10 +405,8 @@ function ContentHitRow(props: {
</Show>
<GenericContentHit data={props.data} />
</div>
- }
- >
- {(data) => <ChannelMessageContentHit data={data()} />}
- </Show>
+ </Match>
+ </Switch>
</CollapsibleListRow>
);
}
@@ -602,14 +662,11 @@ export function EntityWithEverything(
</div>
{/* Timestamp inline with subject in narrow mode */}
<Show when={props.timestamp ?? props.entity.updatedAt}>
- {(date) => {
- const formattedDate = createFormattedDate(date());
- return (
- <span class="hidden @max-md/split:inline shrink-0 whitespace-nowrap text-xs font-mono uppercase text-ink-extra-muted">
- {formattedDate()}
- </span>
- );
- }}
+ {(date) => (
+ <span class="hidden @max-md/split:inline shrink-0 whitespace-nowrap text-xs font-mono uppercase text-ink-extra-muted">
+ {createFormattedDate(date())}
+ </span>
+ )}
</Show>
</div>
{/* Body snippet - below subject in narrow mode */}
@@ -713,14 +770,11 @@ export function EntityWithEverything(
</span>
{/* Timestamp inline with title in narrow mode */}
<Show when={props.timestamp ?? props.entity.updatedAt}>
- {(date) => {
- const formattedDate = createFormattedDate(date());
- return (
- <span class="hidden @max-md/split:inline shrink-0 whitespace-nowrap text-xs font-mono uppercase text-ink-extra-muted">
- {formattedDate()}
- </span>
- );
- }}
+ {(date) => (
+ <span class="hidden @max-md/split:inline shrink-0 whitespace-nowrap text-xs font-mono uppercase text-ink-extra-muted">
+ {createFormattedDate(date())}
+ </span>
+ )}
</Show>
</div>
@@ -979,14 +1033,11 @@ export function EntityWithEverything(
)}
</Show>
<Show when={props.timestamp ?? props.entity.updatedAt}>
- {(date) => {
- const formattedDate = createFormattedDate(date());
- return (
- <span class="shrink-0 whitespace-nowrap text-xs font-mono uppercase text-ink-extra-muted @max-md/split:hidden">
- {formattedDate()}
- </span>
- );
- }}
+ {(date) => (
+ <span class="shrink-0 whitespace-nowrap text-xs font-mono uppercase text-ink-extra-muted @max-md/split:hidden">
+ {createFormattedDate(date())}
+ </span>
+ )}
</Show>
<Show
when={
@@ -1025,6 +1076,7 @@ export function EntityWithEverything(
<CollapsibleList items={contentHitData()} threadBorder>
{(data, index, count) => (
<ContentHitRow
+ allData={contentHitData()}
data={data}
onClick={(e, location) => {
props.onClick?.(props.entity, e, location);
@@ -1240,39 +1292,38 @@ const trackKeydownDuringTask = () => {
const startOfDay = (d: Date) =>
new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();
-const createFormattedDate = (timestamp: number) =>
- createMemo(() => {
- const ts = timestamp < 1e12 ? timestamp * 1000 : timestamp;
-
- const date = new Date(ts);
- const now = new Date();
+const createFormattedDate = (timestamp: number) => {
+ const ts = timestamp < 1e12 ? timestamp * 1000 : timestamp;
- const dateDay = startOfDay(date);
- const todayDay = startOfDay(now);
+ const date = new Date(ts);
+ const now = new Date();
- // Today → show time
- if (dateDay === todayDay) {
- return date.toLocaleTimeString('en-US', {
- hour: '2-digit',
- minute: '2-digit',
- });
- }
+ const dateDay = startOfDay(date);
+ const todayDay = startOfDay(now);
- // Same year → show Month Day
- if (date.getFullYear() === now.getFullYear()) {
- return date.toLocaleDateString('en-US', {
- month: 'short',
- day: 'numeric',
- });
- }
+ // Today → show time
+ if (dateDay === todayDay) {
+ return date.toLocaleTimeString('en-US', {
+ hour: '2-digit',
+ minute: '2-digit',
+ });
+ }
- // Older → show numeric date
+ // Same year → show Month Day
+ if (date.getFullYear() === now.getFullYear()) {
return date.toLocaleDateString('en-US', {
- month: 'numeric',
+ month: 'short',
day: 'numeric',
- year: '2-digit',
});
+ }
+
+ // Older → show numeric date
+ return date.toLocaleDateString('en-US', {
+ month: 'numeric',
+ day: 'numeric',
+ year: '2-digit',
});
+};
let lastMouseX: number | null = null;
let lastMouseY: number | null = null;
diff --git a/js/app/packages/macro-entity/src/queries/search.ts b/js/app/packages/macro-entity/src/queries/search.ts
index 1feaa5efb4..a547c7ebd1 100644
--- a/js/app/packages/macro-entity/src/queries/search.ts
+++ b/js/app/packages/macro-entity/src/queries/search.ts
@@ -1,6 +1,7 @@
import { useChannelsContext } from '@core/component/ChannelsProvider';
import { blockNameToDefaultFile } from '@core/constant/allBlocks';
import { ENABLE_SEARCH_SERVICE } from '@core/constant/featureFlags';
+import { emailToId } from '@core/user';
import { isErr } from '@core/util/maybeResult';
import {
extractSearchSnippet,
@@ -108,6 +109,9 @@ const getSearchData = (data: TypedInnerSearchResult): SearchData => {
return contents.map((content) => ({
type: 'email' as const,
content: mergeAdjacentMacroEmTags(content),
+ sender: r.pretty_sender!,
+ senderId: emailToId(r.sender),
+ sentAt: r.sent_at!,
location: {
type: 'email' as const,
messageId: r.message_id!,
diff --git a/js/app/packages/macro-entity/src/types/search.ts b/js/app/packages/macro-entity/src/types/search.ts
index 35835d739f..1494f28559 100644
--- a/js/app/packages/macro-entity/src/types/search.ts
+++ b/js/app/packages/macro-entity/src/types/search.ts
@@ -57,9 +57,12 @@ type GenericContentHitData = {
location?: never;
};
-type EmailContentHitData = {
+export type EmailContentHitData = {
type: 'email';
content: string;
+ sender: string;
+ senderId: string;
+ sentAt: number;
location: EmailMessageHighlightLocation;
};
diff --git a/js/app/packages/service-clients/service-search/generated/models/fileType.ts b/js/app/packages/service-clients/service-search/generated/models/fileType.ts
index 671522dd6a..95d503e7a5 100644
--- a/js/app/packages/service-clients/service-search/generated/models/fileType.ts
+++ b/js/app/packages/service-clients/service-search/generated/models/fileType.ts
@@ -210,6 +210,7 @@ export const FileType = {
rbi: 'rbi',
rs: 'rs',
scss: 'scss',
+ sass: 'sass',
shader: 'shader',
sh: 'sh',
bash: 'bash',
diff --git a/js/app/packages/service-clients/service-search/generated/models/index.ts b/js/app/packages/service-clients/service-search/generated/models/index.ts
index b1ff46ee5d..b5ed1154a0 100644
--- a/js/app/packages/service-clients/service-search/generated/models/index.ts
+++ b/js/app/packages/service-clients/service-search/generated/models/index.ts
@@ -120,6 +120,8 @@ export * from './projectSearchResult';
export * from './projectSearchResultScore';
export * from './searchHighlight';
export * from './searchHighlightName';
+export * from './searchHighlightSender';
+export * from './searchHighlightUserId';
export * from './searchOn';
export * from './searchResponse';
export * from './simpleChannelSearchParams';
diff --git a/js/app/packages/service-clients/service-search/generated/models/searchHighlight.ts b/js/app/packages/service-clients/service-search/generated/models/searchHighlight.ts
index 918f281a61..b3de999a8f 100644
--- a/js/app/packages/service-clients/service-search/generated/models/searchHighlight.ts
+++ b/js/app/packages/service-clients/service-search/generated/models/searchHighlight.ts
@@ -5,10 +5,22 @@
* OpenAPI spec version: 0.1.0
*/
import type { SearchHighlightName } from './searchHighlightName';
+import type { SearchHighlightSender } from './searchHighlightSender';
+import type { SearchHighlightUserId } from './searchHighlightUserId';
export interface SearchHighlight {
+ /** The highlight match on the bcc (email only) */
+ bcc?: string[];
+ /** The highlight match on the cc (email only) */
+ cc?: string[];
/** The highlight match on the content field */
content?: string[];
/** The highlight match on the name field */
name?: SearchHighlightName;
+ /** The highlight match on the recipients (email only) */
+ recipients?: string[];
+ /** The highlight match on the sender (email only) */
+ sender?: SearchHighlightSender;
+ /** The highlight match on the user (owner) of the entity */
+ user_id?: SearchHighlightUserId;
}
diff --git a/js/app/packages/service-clients/service-search/generated/models/searchHighlightSender.ts b/js/app/packages/service-clients/service-search/generated/models/searchHighlightSender.ts
new file mode 100644
index 0000000000..1879955749
--- /dev/null
+++ b/js/app/packages/service-clients/service-search/generated/models/searchHighlightSender.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * search_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * The highlight match on the sender (email only)
+ */
+export type SearchHighlightSender = string | null;
diff --git a/js/app/packages/service-clients/service-search/generated/models/searchHighlightUserId.ts b/js/app/packages/service-clients/service-search/generated/models/searchHighlightUserId.ts
new file mode 100644
index 0000000000..8200fa5f0c
--- /dev/null
+++ b/js/app/packages/service-clients/service-search/generated/models/searchHighlightUserId.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * search_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * The highlight match on the user (owner) of the entity
+ */
+export type SearchHighlightUserId = string | null;
diff --git a/js/app/packages/service-clients/service-search/openapi.json b/js/app/packages/service-clients/service-search/openapi.json
index 27b64078e5..72c59dec57 100644
--- a/js/app/packages/service-clients/service-search/openapi.json
+++ b/js/app/packages/service-clients/service-search/openapi.json
@@ -938,6 +938,7 @@
"properties": {
"channel_id": {
"type": "string",
+ "format": "uuid",
"description": "The id of the channel"
},
"channel_message_search_results": {
@@ -951,6 +952,7 @@
},
"id": {
"type": "string",
+ "format": "uuid",
"description": "Standardized fields that all item types will share.\nThese field names are being aligned across all item types\nfor consistency in our data model."
},
"owner_id": {
@@ -995,6 +997,7 @@
},
"message_id": {
"type": ["string", "null"],
+ "format": "uuid",
"description": "The channel message id\nThis is only prsent if the search result is on the message content"
},
"score": {
@@ -1008,6 +1011,7 @@
},
"thread_id": {
"type": ["string", "null"],
+ "format": "uuid",
"description": "The channel message thread id"
},
"updated_at": {
@@ -1050,6 +1054,7 @@
"properties": {
"chat_message_id": {
"type": ["string", "null"],
+ "format": "uuid",
"description": "The chat message id for the chat\nThis is only present if the search match was on the chat message content"
},
"highlight": {
@@ -1149,7 +1154,11 @@
"chat_search_results"
],
"properties": {
- "chat_id": { "type": "string", "description": "The id of the chat" },
+ "chat_id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "The id of the chat"
+ },
"chat_search_results": {
"type": "array",
"items": { "$ref": "#/components/schemas/ChatMessageSearchResult" },
@@ -1157,6 +1166,7 @@
},
"id": {
"type": "string",
+ "format": "uuid",
"description": "Standardized fields that all item types will share.\nThese field names are being aligned across all item types\nfor consistency in our data model."
},
"name": { "type": "string" },
@@ -1297,6 +1307,7 @@
"properties": {
"document_id": {
"type": "string",
+ "format": "uuid",
"description": "The id of the document"
},
"document_name": {
@@ -1314,6 +1325,7 @@
},
"id": {
"type": "string",
+ "format": "uuid",
"description": "Standardized fields that all item types will share.\nThese field names are being aligned across all item types\nfor consistency in our data model."
},
"name": { "type": "string" },
@@ -1480,6 +1492,7 @@
},
"id": {
"type": "string",
+ "format": "uuid",
"description": "Standardized fields that all item types will share.\nThese field names are being aligned across all item types\nfor consistency in our data model."
},
"name": {
@@ -1493,6 +1506,7 @@
},
"thread_id": {
"type": "string",
+ "format": "uuid",
"description": "The id of the email thread"
},
"user_id": {
@@ -1782,6 +1796,7 @@
"rbi",
"rs",
"scss",
+ "sass",
"shader",
"sh",
"bash",
@@ -2066,7 +2081,7 @@
"properties": {
"created_at": { "type": "integer", "format": "int64" },
"owner_id": { "type": "string" },
- "project_id": { "type": "string" },
+ "project_id": { "type": "string", "format": "uuid" },
"project_name": { "type": "string" },
"updated_at": { "type": "integer", "format": "int64" }
}
@@ -2130,6 +2145,7 @@
"created_at": { "type": "integer", "format": "int64" },
"id": {
"type": "string",
+ "format": "uuid",
"description": "Standardized fields that all item types will share.\nThese field names are being aligned across all item types\nfor consistency in our data model."
},
"name": { "type": "string" },
@@ -2176,6 +2192,16 @@
"SearchHighlight": {
"type": "object",
"properties": {
+ "bcc": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "The highlight match on the bcc (email only)"
+ },
+ "cc": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "The highlight match on the cc (email only)"
+ },
"content": {
"type": "array",
"items": { "type": "string" },
@@ -2184,6 +2210,19 @@
"name": {
"type": ["string", "null"],
"description": "The highlight match on the name field"
+ },
+ "recipients": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "The highlight match on the recipients (email only)"
+ },
+ "sender": {
+ "type": ["string", "null"],
+ "description": "The highlight match on the sender (email only)"
+ },
+ "user_id": {
+ "type": ["string", "null"],
+ "description": "The highlight match on the user (owner) of the entity"
}
}
},
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/fileType.ts b/js/app/packages/service-clients/service-storage/generated/schemas/fileType.ts
index 721bc4bcbd..81d331999a 100644
--- a/js/app/packages/service-clients/service-storage/generated/schemas/fileType.ts
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/fileType.ts
@@ -210,6 +210,7 @@ export const FileType = {
rbi: 'rbi',
rs: 'rs',
scss: 'scss',
+ sass: 'sass',
shader: 'shader',
sh: 'sh',
bash: 'bash',
diff --git a/js/app/packages/service-clients/service-storage/generated/zod.ts b/js/app/packages/service-clients/service-storage/generated/zod.ts
index d643b908ce..4b20844234 100644
--- a/js/app/packages/service-clients/service-storage/generated/zod.ts
+++ b/js/app/packages/service-clients/service-storage/generated/zod.ts
@@ -1694,7 +1694,7 @@ with projects and placing all documents in the correct location.
*/
export const uploadFolderHandlerBody = zod.object({
"content": zod.array(zod.object({
- "fileType": zod.union([zod.null(),zod.enum(['docx', 'pdf', 'md', 'canvas', 'coffee', 'cson', 'iced', 'c', 'i', 'cpp', 'cppm', 'cc', 'ccm', 'cxx', 'cxxm', 'cplusplus', 'cplusplusm', 'hpp', 'hh', 'hxx', 'hplusplus', 'h', 'ii', 'ino', 'inl', 'ipp', 'ixx', 'tpp', 'txx', 'hppin', 'hin', 'cu', 'cuh', 'cs', 'csx', 'cake', 'css', 'dart', 'diff', 'patch', 'rej', 'dockerfile', 'containerfile', 'go', 'handlebars', 'hbs', 'hjs', 'hlsl', 'hlsli', 'fx', 'fxh', 'vsh', 'psh', 'cginc', 'compute', 'html', 'htm', 'shtml', 'xhtml', 'xht', 'mdoc', 'jsp', 'asp', 'aspx', 'jshtm', 'volt', 'ejs', 'rhtml', 'ini', 'conf', 'properties', 'cfg', 'directory', 'gitattributes', 'gitconfig', 'gitmodules', 'editorconfig', 'repo', 'java', 'jav', 'jsx', 'js', 'es6', 'mjs', 'cjs', 'pac', 'json', 'bowerrc', 'jscsrc', 'webmanifest', 'jsmap', 'cssmap', 'tsmap', 'har', 'jslintrc', 'jsonld', 'geojson', 'ipynb', 'vuerc', 'jsonc', 'eslintrc', 'eslintrcjson', 'jsfmtrc', 'jshintrc', 'swcrc', 'hintrc', 'babelrc', 'jsonl', 'ndjson', 'codesnippets', 'jl', 'jmd', 'sty', 'cls', 'bbx', 'cbx', 'tex', 'ltx', 'ctx', 'bib', 'less', 'log', 'lua', 'mak', 'mk', 'mkd', 'mdwn', 'mdown', 'markdown', 'markdn', 'mdtxt', 'mdtext', 'workbook', 'm', 'mm', 'pl', 'pm', 'pod', 't', 'psgi', 'raku', 'rakumod', 'rakutest', 'rakudoc', 'nqp', 'p6', 'pl6', 'pm6', 'php', 'php4', 'php5', 'phtml', 'ctp', 'ps1', 'psm1', 'psd1', 'pssc', 'psrc', 'py', 'rpy', 'pyw', 'cpy', 'gyp', 'gypi', 'pyi', 'ipy', 'pyt', 'r', 'rhistory', 'rprofile', 'rt', 'cshtml', 'razor', 'rb', 'rbx', 'rjs', 'gemspec', 'rake', 'ru', 'erb', 'podspec', 'rbi', 'rs', 'scss', 'shader', 'sh', 'bash', 'bashrc', 'bashaliases', 'bashprofile', 'bashlogin', 'ebuild', 'eclass', 'profile', 'bashlogout', 'xprofile', 'xsession', 'xsessionrc', 'zsh', 'zshrc', 'zprofile', 'zlogin', 'zlogout', 'zshenv', 'zshtheme', 'fish', 'ksh', 'csh', 'cshrc', 'tcshrc', 'yashrc', 'yashprofile', 'sql', 'dsql', 'swift', 'ts', 'cts', 'mts', 'tsx', 'tsbuildinfo', 'xml', 'xsd', 'ascx', 'atom', 'axml', 'axaml', 'bpmn', 'cpt', 'csl', 'csproj', 'csprojuser', 'dita', 'ditamap', 'dtd', 'ent', 'mod', 'dtml', 'fsproj', 'fxml', 'iml', 'isml', 'jmx', 'launch', 'menu', 'mxml', 'nuspec', 'opml', 'owl', 'proj', 'props', 'pt', 'publishsettings', 'pubxml', 'pubxmluser', 'rbxlx', 'rbxmx', 'rdf', 'rng', 'rss', 'shproj', 'storyboard', 'targets', 'tld', 'tmx', 'vbproj', 'vbprojuser', 'vcxproj', 'vcxprojfilters', 'wsdl', 'wxi', 'wxl', 'wxs', 'xaml', 'xbl', 'xib', 'xlf', 'xliff', 'xpdl', 'xul', 'xoml', 'xsl', 'xslt', 'yaml', 'yml', 'eyaml', 'eyml', 'cff', 'yamltmlanguage', 'yamltmpreferences', 'yamltmtheme', 'winget', 'txt', 'csv', 'tsv', 'jpeg', 'jpg', 'png', 'gif', 'svg', 'webp', 'avif', 'bmp', 'ico', 'tiff', 'tif', 'heic', 'heif', 'tar', 'targz', 'tgz', 'gz', 'bz2', 'tarbz2', 'tbz2', 'z', 'tarz', 'lz', 'tarlz', 'xz', 'tarxz', 'txz', 'lzma', 'tarlzma', 'rar', 'sevenz', 'zst', 'tarzst', 'tzst', 'zip', 'exe', 'msi', 'dll', 'bat', 'cmd', 'com', 'appimage', 'app', 'bin', 'deb', 'rpm', 'apk', 'dmg', 'pkg', 'crx', 'xpi', 'mp3', 'wav', 'ogg', 'flac', 'aac', 'm4a', 'wma', 'mid', 'midi', 'mp4', 'mkv', 'webm', 'avi', 'mov', 'wmv', 'mpg', 'mpeg', 'm4v', 'flv', 'f4v', 'threegp', 'ttf', 'otf', 'woff', 'woff2', 'eot', 'rtf', 'odt', 'ods', 'odp', 'odg', 'odf', 'epub', 'mobi', 'azw', 'azw3', 'djvu', 'xls', 'ppt', 'pptx', 'xlsx', 'db', 'sqlite', 'sqlite3', 'mdb', 'accdb', 'dbf', 'plist', 'toml', 'env', 'dot', 'gv', 'torrent', 'ics', 'vcf', 'ai', 'eps', 'ps', 'dxf', 'dwg', 'stl', 'obj', 'fbx', 'blend', 'dae', 'threeds', 'gltf', 'glb', 'vhd', 'vhdx', 'vmdk', 'ova', 'ovf', 'iso', 'img', 'swf']).describe('Generates a FileType enum and associated ContentType enum with their implementations.\n\nThis macro takes a list of tuples in the format:\n(Variant, \"extension\", \"mime_type\", CONTENT_TYPE_VARIANT)\n\nFor each tuple it generates:\n- A variant in the FileType enum\n- A variant in the ContentType enum\n- Implementations for:\n - FileType::to_str() - Converts FileType to extension string\n - FileType::from_str() - Converts extension string to FileType\n - From<FileType> for ContentType - Maps FileType to ContentType\n - ContentType::mime_type() - Gets MIME type for ContentType\n')]).optional(),
+ "fileType": zod.union([zod.null(),zod.enum(['docx', 'pdf', 'md', 'canvas', 'coffee', 'cson', 'iced', 'c', 'i', 'cpp', 'cppm', 'cc', 'ccm', 'cxx', 'cxxm', 'cplusplus', 'cplusplusm', 'hpp', 'hh', 'hxx', 'hplusplus', 'h', 'ii', 'ino', 'inl', 'ipp', 'ixx', 'tpp', 'txx', 'hppin', 'hin', 'cu', 'cuh', 'cs', 'csx', 'cake', 'css', 'dart', 'diff', 'patch', 'rej', 'dockerfile', 'containerfile', 'go', 'handlebars', 'hbs', 'hjs', 'hlsl', 'hlsli', 'fx', 'fxh', 'vsh', 'psh', 'cginc', 'compute', 'html', 'htm', 'shtml', 'xhtml', 'xht', 'mdoc', 'jsp', 'asp', 'aspx', 'jshtm', 'volt', 'ejs', 'rhtml', 'ini', 'conf', 'properties', 'cfg', 'directory', 'gitattributes', 'gitconfig', 'gitmodules', 'editorconfig', 'repo', 'java', 'jav', 'jsx', 'js', 'es6', 'mjs', 'cjs', 'pac', 'json', 'bowerrc', 'jscsrc', 'webmanifest', 'jsmap', 'cssmap', 'tsmap', 'har', 'jslintrc', 'jsonld', 'geojson', 'ipynb', 'vuerc', 'jsonc', 'eslintrc', 'eslintrcjson', 'jsfmtrc', 'jshintrc', 'swcrc', 'hintrc', 'babelrc', 'jsonl', 'ndjson', 'codesnippets', 'jl', 'jmd', 'sty', 'cls', 'bbx', 'cbx', 'tex', 'ltx', 'ctx', 'bib', 'less', 'log', 'lua', 'mak', 'mk', 'mkd', 'mdwn', 'mdown', 'markdown', 'markdn', 'mdtxt', 'mdtext', 'workbook', 'm', 'mm', 'pl', 'pm', 'pod', 't', 'psgi', 'raku', 'rakumod', 'rakutest', 'rakudoc', 'nqp', 'p6', 'pl6', 'pm6', 'php', 'php4', 'php5', 'phtml', 'ctp', 'ps1', 'psm1', 'psd1', 'pssc', 'psrc', 'py', 'rpy', 'pyw', 'cpy', 'gyp', 'gypi', 'pyi', 'ipy', 'pyt', 'r', 'rhistory', 'rprofile', 'rt', 'cshtml', 'razor', 'rb', 'rbx', 'rjs', 'gemspec', 'rake', 'ru', 'erb', 'podspec', 'rbi', 'rs', 'scss', 'sass', 'shader', 'sh', 'bash', 'bashrc', 'bashaliases', 'bashprofile', 'bashlogin', 'ebuild', 'eclass', 'profile', 'bashlogout', 'xprofile', 'xsession', 'xsessionrc', 'zsh', 'zshrc', 'zprofile', 'zlogin', 'zlogout', 'zshenv', 'zshtheme', 'fish', 'ksh', 'csh', 'cshrc', 'tcshrc', 'yashrc', 'yashprofile', 'sql', 'dsql', 'swift', 'ts', 'cts', 'mts', 'tsx', 'tsbuildinfo', 'xml', 'xsd', 'ascx', 'atom', 'axml', 'axaml', 'bpmn', 'cpt', 'csl', 'csproj', 'csprojuser', 'dita', 'ditamap', 'dtd', 'ent', 'mod', 'dtml', 'fsproj', 'fxml', 'iml', 'isml', 'jmx', 'launch', 'menu', 'mxml', 'nuspec', 'opml', 'owl', 'proj', 'props', 'pt', 'publishsettings', 'pubxml', 'pubxmluser', 'rbxlx', 'rbxmx', 'rdf', 'rng', 'rss', 'shproj', 'storyboard', 'targets', 'tld', 'tmx', 'vbproj', 'vbprojuser', 'vcxproj', 'vcxprojfilters', 'wsdl', 'wxi', 'wxl', 'wxs', 'xaml', 'xbl', 'xib', 'xlf', 'xliff', 'xpdl', 'xul', 'xoml', 'xsl', 'xslt', 'yaml', 'yml', 'eyaml', 'eyml', 'cff', 'yamltmlanguage', 'yamltmpreferences', 'yamltmtheme', 'winget', 'txt', 'csv', 'tsv', 'jpeg', 'jpg', 'png', 'gif', 'svg', 'webp', 'avif', 'bmp', 'ico', 'tiff', 'tif', 'heic', 'heif', 'tar', 'targz', 'tgz', 'gz', 'bz2', 'tarbz2', 'tbz2', 'z', 'tarz', 'lz', 'tarlz', 'xz', 'tarxz', 'txz', 'lzma', 'tarlzma', 'rar', 'sevenz', 'zst', 'tarzst', 'tzst', 'zip', 'exe', 'msi', 'dll', 'bat', 'cmd', 'com', 'appimage', 'app', 'bin', 'deb', 'rpm', 'apk', 'dmg', 'pkg', 'crx', 'xpi', 'mp3', 'wav', 'ogg', 'flac', 'aac', 'm4a', 'wma', 'mid', 'midi', 'mp4', 'mkv', 'webm', 'avi', 'mov', 'wmv', 'mpg', 'mpeg', 'm4v', 'flv', 'f4v', 'threegp', 'ttf', 'otf', 'woff', 'woff2', 'eot', 'rtf', 'odt', 'ods', 'odp', 'odg', 'odf', 'epub', 'mobi', 'azw', 'azw3', 'djvu', 'xls', 'ppt', 'pptx', 'xlsx', 'db', 'sqlite', 'sqlite3', 'mdb', 'accdb', 'dbf', 'plist', 'toml', 'env', 'dot', 'gv', 'torrent', 'ics', 'vcf', 'ai', 'eps', 'ps', 'dxf', 'dwg', 'stl', 'obj', 'fbx', 'blend', 'dae', 'threeds', 'gltf', 'glb', 'vhd', 'vhdx', 'vmdk', 'ova', 'ovf', 'iso', 'img', 'swf']).describe('Generates a FileType enum and associated ContentType enum with their implementations.\n\nThis macro takes a list of tuples in the format:\n(Variant, \"extension\", \"mime_type\", CONTENT_TYPE_VARIANT)\n\nFor each tuple it generates:\n- A variant in the FileType enum\n- A variant in the ContentType enum\n- Implementations for:\n - FileType::to_str() - Converts FileType to extension string\n - FileType::from_str() - Converts extension string to FileType\n - From<FileType> for ContentType - Maps FileType to ContentType\n - ContentType::mime_type() - Gets MIME type for ContentType\n')]).optional(),
"fullName": zod.string().describe('The full OS name of the file for deduplication'),
"name": zod.string().describe('The name of the file, without the extension'),
"relativePath": zod.string().describe('The relative path of the file.\n\nThis is the `webkitRelativePath` with the name of the file stripped at the end.'),
@@ -1721,7 +1721,7 @@ export const uploadFolderHandlerResponse = zod.object({
"fileSystem": zod.union([zod.object({
"document_id": zod.string(),
"item": zod.object({
- "fileType": zod.union([zod.null(),zod.enum(['docx', 'pdf', 'md', 'canvas', 'coffee', 'cson', 'iced', 'c', 'i', 'cpp', 'cppm', 'cc', 'ccm', 'cxx', 'cxxm', 'cplusplus', 'cplusplusm', 'hpp', 'hh', 'hxx', 'hplusplus', 'h', 'ii', 'ino', 'inl', 'ipp', 'ixx', 'tpp', 'txx', 'hppin', 'hin', 'cu', 'cuh', 'cs', 'csx', 'cake', 'css', 'dart', 'diff', 'patch', 'rej', 'dockerfile', 'containerfile', 'go', 'handlebars', 'hbs', 'hjs', 'hlsl', 'hlsli', 'fx', 'fxh', 'vsh', 'psh', 'cginc', 'compute', 'html', 'htm', 'shtml', 'xhtml', 'xht', 'mdoc', 'jsp', 'asp', 'aspx', 'jshtm', 'volt', 'ejs', 'rhtml', 'ini', 'conf', 'properties', 'cfg', 'directory', 'gitattributes', 'gitconfig', 'gitmodules', 'editorconfig', 'repo', 'java', 'jav', 'jsx', 'js', 'es6', 'mjs', 'cjs', 'pac', 'json', 'bowerrc', 'jscsrc', 'webmanifest', 'jsmap', 'cssmap', 'tsmap', 'har', 'jslintrc', 'jsonld', 'geojson', 'ipynb', 'vuerc', 'jsonc', 'eslintrc', 'eslintrcjson', 'jsfmtrc', 'jshintrc', 'swcrc', 'hintrc', 'babelrc', 'jsonl', 'ndjson', 'codesnippets', 'jl', 'jmd', 'sty', 'cls', 'bbx', 'cbx', 'tex', 'ltx', 'ctx', 'bib', 'less', 'log', 'lua', 'mak', 'mk', 'mkd', 'mdwn', 'mdown', 'markdown', 'markdn', 'mdtxt', 'mdtext', 'workbook', 'm', 'mm', 'pl', 'pm', 'pod', 't', 'psgi', 'raku', 'rakumod', 'rakutest', 'rakudoc', 'nqp', 'p6', 'pl6', 'pm6', 'php', 'php4', 'php5', 'phtml', 'ctp', 'ps1', 'psm1', 'psd1', 'pssc', 'psrc', 'py', 'rpy', 'pyw', 'cpy', 'gyp', 'gypi', 'pyi', 'ipy', 'pyt', 'r', 'rhistory', 'rprofile', 'rt', 'cshtml', 'razor', 'rb', 'rbx', 'rjs', 'gemspec', 'rake', 'ru', 'erb', 'podspec', 'rbi', 'rs', 'scss', 'shader', 'sh', 'bash', 'bashrc', 'bashaliases', 'bashprofile', 'bashlogin', 'ebuild', 'eclass', 'profile', 'bashlogout', 'xprofile', 'xsession', 'xsessionrc', 'zsh', 'zshrc', 'zprofile', 'zlogin', 'zlogout', 'zshenv', 'zshtheme', 'fish', 'ksh', 'csh', 'cshrc', 'tcshrc', 'yashrc', 'yashprofile', 'sql', 'dsql', 'swift', 'ts', 'cts', 'mts', 'tsx', 'tsbuildinfo', 'xml', 'xsd', 'ascx', 'atom', 'axml', 'axaml', 'bpmn', 'cpt', 'csl', 'csproj', 'csprojuser', 'dita', 'ditamap', 'dtd', 'ent', 'mod', 'dtml', 'fsproj', 'fxml', 'iml', 'isml', 'jmx', 'launch', 'menu', 'mxml', 'nuspec', 'opml', 'owl', 'proj', 'props', 'pt', 'publishsettings', 'pubxml', 'pubxmluser', 'rbxlx', 'rbxmx', 'rdf', 'rng', 'rss', 'shproj', 'storyboard', 'targets', 'tld', 'tmx', 'vbproj', 'vbprojuser', 'vcxproj', 'vcxprojfilters', 'wsdl', 'wxi', 'wxl', 'wxs', 'xaml', 'xbl', 'xib', 'xlf', 'xliff', 'xpdl', 'xul', 'xoml', 'xsl', 'xslt', 'yaml', 'yml', 'eyaml', 'eyml', 'cff', 'yamltmlanguage', 'yamltmpreferences', 'yamltmtheme', 'winget', 'txt', 'csv', 'tsv', 'jpeg', 'jpg', 'png', 'gif', 'svg', 'webp', 'avif', 'bmp', 'ico', 'tiff', 'tif', 'heic', 'heif', 'tar', 'targz', 'tgz', 'gz', 'bz2', 'tarbz2', 'tbz2', 'z', 'tarz', 'lz', 'tarlz', 'xz', 'tarxz', 'txz', 'lzma', 'tarlzma', 'rar', 'sevenz', 'zst', 'tarzst', 'tzst', 'zip', 'exe', 'msi', 'dll', 'bat', 'cmd', 'com', 'appimage', 'app', 'bin', 'deb', 'rpm', 'apk', 'dmg', 'pkg', 'crx', 'xpi', 'mp3', 'wav', 'ogg', 'flac', 'aac', 'm4a', 'wma', 'mid', 'midi', 'mp4', 'mkv', 'webm', 'avi', 'mov', 'wmv', 'mpg', 'mpeg', 'm4v', 'flv', 'f4v', 'threegp', 'ttf', 'otf', 'woff', 'woff2', 'eot', 'rtf', 'odt', 'ods', 'odp', 'odg', 'odf', 'epub', 'mobi', 'azw', 'azw3', 'djvu', 'xls', 'ppt', 'pptx', 'xlsx', 'db', 'sqlite', 'sqlite3', 'mdb', 'accdb', 'dbf', 'plist', 'toml', 'env', 'dot', 'gv', 'torrent', 'ics', 'vcf', 'ai', 'eps', 'ps', 'dxf', 'dwg', 'stl', 'obj', 'fbx', 'blend', 'dae', 'threeds', 'gltf', 'glb', 'vhd', 'vhdx', 'vmdk', 'ova', 'ovf', 'iso', 'img', 'swf']).describe('Generates a FileType enum and associated ContentType enum with their implementations.\n\nThis macro takes a list of tuples in the format:\n(Variant, \"extension\", \"mime_type\", CONTENT_TYPE_VARIANT)\n\nFor each tuple it generates:\n- A variant in the FileType enum\n- A variant in the ContentType enum\n- Implementations for:\n - FileType::to_str() - Converts FileType to extension string\n - FileType::from_str() - Converts extension string to FileType\n - From<FileType> for ContentType - Maps FileType to ContentType\n - ContentType::mime_type() - Gets MIME type for ContentType\n')]).optional(),
+ "fileType": zod.union([zod.null(),zod.enum(['docx', 'pdf', 'md', 'canvas', 'coffee', 'cson', 'iced', 'c', 'i', 'cpp', 'cppm', 'cc', 'ccm', 'cxx', 'cxxm', 'cplusplus', 'cplusplusm', 'hpp', 'hh', 'hxx', 'hplusplus', 'h', 'ii', 'ino', 'inl', 'ipp', 'ixx', 'tpp', 'txx', 'hppin', 'hin', 'cu', 'cuh', 'cs', 'csx', 'cake', 'css', 'dart', 'diff', 'patch', 'rej', 'dockerfile', 'containerfile', 'go', 'handlebars', 'hbs', 'hjs', 'hlsl', 'hlsli', 'fx', 'fxh', 'vsh', 'psh', 'cginc', 'compute', 'html', 'htm', 'shtml', 'xhtml', 'xht', 'mdoc', 'jsp', 'asp', 'aspx', 'jshtm', 'volt', 'ejs', 'rhtml', 'ini', 'conf', 'properties', 'cfg', 'directory', 'gitattributes', 'gitconfig', 'gitmodules', 'editorconfig', 'repo', 'java', 'jav', 'jsx', 'js', 'es6', 'mjs', 'cjs', 'pac', 'json', 'bowerrc', 'jscsrc', 'webmanifest', 'jsmap', 'cssmap', 'tsmap', 'har', 'jslintrc', 'jsonld', 'geojson', 'ipynb', 'vuerc', 'jsonc', 'eslintrc', 'eslintrcjson', 'jsfmtrc', 'jshintrc', 'swcrc', 'hintrc', 'babelrc', 'jsonl', 'ndjson', 'codesnippets', 'jl', 'jmd', 'sty', 'cls', 'bbx', 'cbx', 'tex', 'ltx', 'ctx', 'bib', 'less', 'log', 'lua', 'mak', 'mk', 'mkd', 'mdwn', 'mdown', 'markdown', 'markdn', 'mdtxt', 'mdtext', 'workbook', 'm', 'mm', 'pl', 'pm', 'pod', 't', 'psgi', 'raku', 'rakumod', 'rakutest', 'rakudoc', 'nqp', 'p6', 'pl6', 'pm6', 'php', 'php4', 'php5', 'phtml', 'ctp', 'ps1', 'psm1', 'psd1', 'pssc', 'psrc', 'py', 'rpy', 'pyw', 'cpy', 'gyp', 'gypi', 'pyi', 'ipy', 'pyt', 'r', 'rhistory', 'rprofile', 'rt', 'cshtml', 'razor', 'rb', 'rbx', 'rjs', 'gemspec', 'rake', 'ru', 'erb', 'podspec', 'rbi', 'rs', 'scss', 'sass', 'shader', 'sh', 'bash', 'bashrc', 'bashaliases', 'bashprofile', 'bashlogin', 'ebuild', 'eclass', 'profile', 'bashlogout', 'xprofile', 'xsession', 'xsessionrc', 'zsh', 'zshrc', 'zprofile', 'zlogin', 'zlogout', 'zshenv', 'zshtheme', 'fish', 'ksh', 'csh', 'cshrc', 'tcshrc', 'yashrc', 'yashprofile', 'sql', 'dsql', 'swift', 'ts', 'cts', 'mts', 'tsx', 'tsbuildinfo', 'xml', 'xsd', 'ascx', 'atom', 'axml', 'axaml', 'bpmn', 'cpt', 'csl', 'csproj', 'csprojuser', 'dita', 'ditamap', 'dtd', 'ent', 'mod', 'dtml', 'fsproj', 'fxml', 'iml', 'isml', 'jmx', 'launch', 'menu', 'mxml', 'nuspec', 'opml', 'owl', 'proj', 'props', 'pt', 'publishsettings', 'pubxml', 'pubxmluser', 'rbxlx', 'rbxmx', 'rdf', 'rng', 'rss', 'shproj', 'storyboard', 'targets', 'tld', 'tmx', 'vbproj', 'vbprojuser', 'vcxproj', 'vcxprojfilters', 'wsdl', 'wxi', 'wxl', 'wxs', 'xaml', 'xbl', 'xib', 'xlf', 'xliff', 'xpdl', 'xul', 'xoml', 'xsl', 'xslt', 'yaml', 'yml', 'eyaml', 'eyml', 'cff', 'yamltmlanguage', 'yamltmpreferences', 'yamltmtheme', 'winget', 'txt', 'csv', 'tsv', 'jpeg', 'jpg', 'png', 'gif', 'svg', 'webp', 'avif', 'bmp', 'ico', 'tiff', 'tif', 'heic', 'heif', 'tar', 'targz', 'tgz', 'gz', 'bz2', 'tarbz2', 'tbz2', 'z', 'tarz', 'lz', 'tarlz', 'xz', 'tarxz', 'txz', 'lzma', 'tarlzma', 'rar', 'sevenz', 'zst', 'tarzst', 'tzst', 'zip', 'exe', 'msi', 'dll', 'bat', 'cmd', 'com', 'appimage', 'app', 'bin', 'deb', 'rpm', 'apk', 'dmg', 'pkg', 'crx', 'xpi', 'mp3', 'wav', 'ogg', 'flac', 'aac', 'm4a', 'wma', 'mid', 'midi', 'mp4', 'mkv', 'webm', 'avi', 'mov', 'wmv', 'mpg', 'mpeg', 'm4v', 'flv', 'f4v', 'threegp', 'ttf', 'otf', 'woff', 'woff2', 'eot', 'rtf', 'odt', 'ods', 'odp', 'odg', 'odf', 'epub', 'mobi', 'azw', 'azw3', 'djvu', 'xls', 'ppt', 'pptx', 'xlsx', 'db', 'sqlite', 'sqlite3', 'mdb', 'accdb', 'dbf', 'plist', 'toml', 'env', 'dot', 'gv', 'torrent', 'ics', 'vcf', 'ai', 'eps', 'ps', 'dxf', 'dwg', 'stl', 'obj', 'fbx', 'blend', 'dae', 'threeds', 'gltf', 'glb', 'vhd', 'vhdx', 'vmdk', 'ova', 'ovf', 'iso', 'img', 'swf']).describe('Generates a FileType enum and associated ContentType enum with their implementations.\n\nThis macro takes a list of tuples in the format:\n(Variant, \"extension\", \"mime_type\", CONTENT_TYPE_VARIANT)\n\nFor each tuple it generates:\n- A variant in the FileType enum\n- A variant in the ContentType enum\n- Implementations for:\n - FileType::to_str() - Converts FileType to extension string\n - FileType::from_str() - Converts extension string to FileType\n - From<FileType> for ContentType - Maps FileType to ContentType\n - ContentType::mime_type() - Gets MIME type for ContentType\n')]).optional(),
"fullName": zod.string().describe('The full OS name of the file for deduplication'),
"name": zod.string().describe('The name of the file, without the extension'),
"relativePath": zod.string().describe('The relative path of the file.\n\nThis is the `webkitRelativePath` with the name of the file stripped at the end.'),
diff --git a/js/app/packages/service-clients/service-storage/openapi.json b/js/app/packages/service-clients/service-storage/openapi.json
index 167231a63e..2670b9ec58 100644
--- a/js/app/packages/service-clients/service-storage/openapi.json
+++ b/js/app/packages/service-clients/service-storage/openapi.json
@@ -5367,6 +5367,7 @@
"rbi",
"rs",
"scss",
+ "sass",
"shader",
"sh",
"bash",