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: show full folder path in soup render (#250)

gbirman10f1bb247a3f
diff --git a/js/app/packages/app/component/UnifiedListView.tsx b/js/app/packages/app/component/UnifiedListView.tsx
index d1ab5b4e68..c0c31bbac5 100644
--- a/js/app/packages/app/component/UnifiedListView.tsx
+++ b/js/app/packages/app/component/UnifiedListView.tsx
@@ -835,9 +835,10 @@ export function UnifiedListView(props: UnifiedListViewProps) {
const entityClickHandler: EntityClickHandler<EntityData> = (
entity,
- event
+ event,
+ options
) => {
- if (preview()) {
+ if (preview() && !options?.ignorePreview) {
setViewDataStore(selectedView(), 'selectedEntity', entity);
return;
}
diff --git a/js/app/packages/core/component/Tooltip.tsx b/js/app/packages/core/component/Tooltip.tsx
index 267d7e12a2..c69fea79ea 100644
--- a/js/app/packages/core/component/Tooltip.tsx
+++ b/js/app/packages/core/component/Tooltip.tsx
@@ -14,7 +14,7 @@ export type TooltipProps = ParentProps<{
class?: string;
delayOverride?: number;
spanMode?: boolean;
- hidden?: boolean;
+ hide?: boolean;
}>;
/**
@@ -72,6 +72,7 @@ export function Tooltip(props: TooltipProps) {
</CorvuTooltip.Trigger>
<CorvuTooltip.Portal>
<CorvuTooltip.Content
+ hidden={props.hide}
class="z-tool-tip"
style={{
'max-width': `calc(100vw - ${2 * padding()}px)`,
diff --git a/js/app/packages/macro-entity/src/components/Entity.tsx b/js/app/packages/macro-entity/src/components/Entity.tsx
index e3ae327c06..964bb60efc 100644
--- a/js/app/packages/macro-entity/src/components/Entity.tsx
+++ b/js/app/packages/macro-entity/src/components/Entity.tsx
@@ -12,7 +12,8 @@ export type EntityClickEvent = Parameters<
>[0];
export type EntityClickHandler<T extends EntityData> = (
entity: T,
- event: EntityClickEvent
+ event: EntityClickEvent,
+ options?: { ignorePreview?: boolean }
) => void;
interface EntityProps<T extends EntityData> extends ParentProps {
entity: T;
diff --git a/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx b/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx
index a1ee2c7d7b..6921fed6dd 100644
--- a/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx
+++ b/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx
@@ -13,6 +13,8 @@ import { onKeyDownClick, onKeyUpClick } from 'core/util/click';
import { notificationWithMetadata } from 'notifications/notificationMetadata';
import type { ParentProps, Ref } from 'solid-js';
import {
+ createDeferred,
+ createEffect,
createMemo,
createSignal,
For,
@@ -28,10 +30,10 @@ import {
isProjectContainedEntity,
type ProjectContainedEntity,
} from '../queries/project';
-import type { EntityData } from '../types/entity';
+import type { EntityData, ProjectEntity } from '../types/entity';
import type { Notification, WithNotification } from '../types/notification';
import type { WithSearch } from '../types/search';
-import type { EntityClickHandler } from './Entity';
+import type { EntityClickEvent, EntityClickHandler } from './Entity';
function UnreadIndicator(props: { active?: boolean }) {
return (
@@ -473,7 +475,9 @@ export function EntityWithEverything(
)}
</Show>
<Show when={matches(props.entity, isProjectContainedEntity)}>
- {(entity) => <EntityProject entity={entity()} />}
+ {(entity) => (
+ <EntityProject entity={entity()} onClick={props.onClick} />
+ )}
</Show>
<Show when={props.timestamp ?? props.entity.updatedAt}>
{(date) => {
@@ -716,10 +720,97 @@ function NotificationUserIcon(props: { id: string; name?: string }) {
);
}
-function EntityProject(props: { entity: ProjectContainedEntity }) {
+function EntityProjectPathDisplay(props: { name: string; path: string[] }) {
+ const [displayPath, setDisplayPath] = createSignal<string | undefined>(
+ props.name
+ );
+ const [truncated, setTruncated] = createSignal(false);
+
+ const fullPath = createMemo(() => props.path.join(' / '));
+
+ const getDisplayPath = (): { name: string; truncated: boolean } => {
+ const fullPathString = fullPath();
+ const maxLength = 30;
+
+ if (fullPathString.length <= maxLength) {
+ return { name: fullPathString, truncated: false };
+ }
+
+ if (props.path.length === 1) {
+ return {
+ name: props.path[0].slice(0, maxLength - 3) + '...',
+ truncated: true,
+ };
+ }
+
+ if (props.path.length === 2) {
+ const first = props.path[0];
+ const last = props.path[props.path.length - 1];
+ const combined = `${first} / ... / ${last}`;
+ if (combined.length <= maxLength) {
+ return { name: combined, truncated: true };
+ }
+ return {
+ name: `${first.slice(0, 10)}... / ${last.slice(0, 10)}...`,
+ truncated: true,
+ };
+ }
+
+ const first = props.path[0];
+ const last = props.path[props.path.length - 1];
+ return { name: `${first} / ... / ${last}`, truncated: true };
+ };
+
+ createDeferred(() => {
+ const { name, truncated } = getDisplayPath();
+ setDisplayPath(name);
+ setTruncated(truncated);
+ });
+
+ return (
+ <Tooltip tooltip={fullPath()} hide={!truncated()}>
+ <div class="truncate">{displayPath()}</div>
+ </Tooltip>
+ );
+}
+
+function EntityProject(props: {
+ entity: ProjectContainedEntity;
+ onClick?: EntityClickHandler<ProjectEntity>;
+}) {
const projectQuery = createProjectQuery(props.entity);
+ let projectIconRef!: HTMLDivElement;
+
+ createEffect(() => {
+ const click = props.onClick;
+ if (!click) return;
+ if (!projectQuery.isSuccess) return;
+
+ const data = projectQuery.data;
+ const handleClick = (e: EntityClickEvent) => {
+ const projectEntity: ProjectEntity = {
+ type: 'project',
+ id: data.id,
+ name: data.name,
+ ownerId: data.owner,
+ updatedAt: data.updatedAt,
+ };
+ click(projectEntity, e, { ignorePreview: true });
+ };
+
+ projectIconRef.classList.add('hover:text-accent');
+ projectIconRef.dataset.blocksNavigation = 'true';
+ projectIconRef.addEventListener('click', handleClick);
+ onCleanup(() => {
+ projectIconRef.removeEventListener('click', handleClick);
+ });
+ });
+
return (
- <div class="flex gap-1 items-center text-xs text-ink-extra-muted min-w-0">
+ <div
+ ref={projectIconRef}
+ class="flex gap-1 items-center text-xs text-ink-extra-muted min-w-0"
+ >
<svg
class="shrink-0"
xmlns="http://www.w3.org/2000/svg"
@@ -736,8 +827,10 @@ function EntityProject(props: { entity: ProjectContainedEntity }) {
<Suspense
fallback={<div class="h-3 w-10 bg-ink-placeholder animate-pulse" />}
>
- <Show when={projectQuery.data?.name}>
- {(name) => <div class="truncate">{name()}</div>}
+ <Show when={projectQuery.data}>
+ {(data) => (
+ <EntityProjectPathDisplay name={data().name} path={data().path} />
+ )}
</Show>
</Suspense>
</div>
diff --git a/js/app/packages/macro-entity/src/queries/project.ts b/js/app/packages/macro-entity/src/queries/project.ts
index bf7805382b..4c79d17dbd 100644
--- a/js/app/packages/macro-entity/src/queries/project.ts
+++ b/js/app/packages/macro-entity/src/queries/project.ts
@@ -1,5 +1,9 @@
import { SERVER_HOSTS } from '@core/constant/servers';
import type { WithRequired } from '@core/util/withRequired';
+import type {
+ GetBatchProjectPreviewResponse,
+ ProjectPreviewData,
+} from '@service-storage/generated/schemas';
import { useQuery } from '@tanstack/solid-query';
import type { ChatEntity, DocumentEntity, EntityData } from '../types/entity';
import { createApiTokenQuery } from './auth';
@@ -17,7 +21,10 @@ export const isProjectContainedEntity = (
return !!entity.projectId;
};
-const fetchProjectData = async (projectId: string, apiToken?: string) => {
+const fetchProjectData = async (
+ projectId: string,
+ apiToken?: string
+): Promise<ProjectPreviewData> => {
if (!apiToken) throw new Error('No API token provided');
const dssHost = SERVER_HOSTS['document-storage-service'];
@@ -68,11 +75,11 @@ const fetchProjectData = async (projectId: string, apiToken?: string) => {
);
}
- const json = await response.json();
+ const json = (await response.json()) as GetBatchProjectPreviewResponse;
// Find the preview for our specific project ID
const projectPreview = json.previews.find(
- (preview: any) => preview.id === projectId
+ (preview) => preview.id === projectId
);
if (!projectPreview) {
diff --git a/js/app/packages/service-storage/generated/schemas/channelFilters.ts b/js/app/packages/service-storage/generated/schemas/channelFilters.ts
new file mode 100644
index 0000000000..0514b638ee
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/channelFilters.ts
@@ -0,0 +1,23 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { ChannelFiltersOrgId } from './channelFiltersOrgId';
+
+/**
+ * The channel message filters used to filter down what channel messages you search over.
+ */
+export interface ChannelFilters {
+ /** Channel IDs to search within. Examples: ['general']. Empty to search all accessible channels. */
+ channel_ids?: string[];
+ /** Channel user mentions to search for. Examples: ['@username']. Empty if not filtering by mentions. */
+ mentions?: string[];
+ /** Channel organization ID to search within. Empty to ignore organization filtering. */
+ org_id?: ChannelFiltersOrgId;
+ /** Sender IDs to search within. Examples: ['user1']. Empty to search all accessible senders. */
+ sender_ids?: string[];
+ /** Channel thread IDs to search within. Examples: ['thread123']. Empty to search all threads. */
+ thread_ids?: string[];
+}
diff --git a/js/app/packages/service-storage/generated/schemas/channelFiltersOrgId.ts b/js/app/packages/service-storage/generated/schemas/channelFiltersOrgId.ts
new file mode 100644
index 0000000000..9d100e87f5
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/channelFiltersOrgId.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Channel organization ID to search within. Empty to ignore organization filtering.
+ */
+export type ChannelFiltersOrgId = number | null;
diff --git a/js/app/packages/service-storage/generated/schemas/chatFilters.ts b/js/app/packages/service-storage/generated/schemas/chatFilters.ts
new file mode 100644
index 0000000000..a14605cf13
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/chatFilters.ts
@@ -0,0 +1,20 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * The chat filters used to filter down what chats you search over.
+ */
+export interface ChatFilters {
+ /** Chat ids to search over. Examples: ['chat1'], ['chat1', 'chat2']. When provided, chat search will only match results on these chats. Empty to search all accessible chats. */
+ chat_ids?: string[];
+ /** Filter by chat owner. Examples: ['macro|[email protected]'], ['macro|[email protected]', 'macro|[email protected]']. Empty to search all owners. */
+ owners?: string[];
+ /** A list of project ids to search within. Examples: ['project1']. Empty to ignore project filtering. */
+ project_ids?: string[];
+ /** Chat message roles to search. Examples: ['user'], ['assistant']. Empty to search all roles. */
+ role?: string[];
+}
diff --git a/js/app/packages/service-storage/generated/schemas/createDocumentRequest.ts b/js/app/packages/service-storage/generated/schemas/createDocumentRequest.ts
index 4ccb14a6fd..e16ac5466f 100644
--- a/js/app/packages/service-storage/generated/schemas/createDocumentRequest.ts
+++ b/js/app/packages/service-storage/generated/schemas/createDocumentRequest.ts
@@ -6,7 +6,9 @@
*/
import type { CreateDocumentRequestBranchedFromId } from './createDocumentRequestBranchedFromId';
import type { CreateDocumentRequestBranchedFromVersionId } from './createDocumentRequestBranchedFromVersionId';
+import type { CreateDocumentRequestCreatedAt } from './createDocumentRequestCreatedAt';
import type { CreateDocumentRequestDocumentFamilyId } from './createDocumentRequestDocumentFamilyId';
+import type { CreateDocumentRequestEmailAttachmentId } from './createDocumentRequestEmailAttachmentId';
import type { CreateDocumentRequestFileType } from './createDocumentRequestFileType';
import type { CreateDocumentRequestId } from './createDocumentRequestId';
import type { CreateDocumentRequestJobId } from './createDocumentRequestJobId';
@@ -18,10 +20,15 @@ export interface CreateDocumentRequest {
branchedFromId?: CreateDocumentRequestBranchedFromId;
/** The version id if the document is being branched. */
branchedFromVersionId?: CreateDocumentRequestBranchedFromVersionId;
+ /** Optional time to set the document's created_at to. Set when backfilling email attachments. */
+ createdAt?: CreateDocumentRequestCreatedAt;
/** The document family id if the document is being branched. */
documentFamilyId?: CreateDocumentRequestDocumentFamilyId;
/** The name of the document without extension. */
documentName: string;
+ /** Internal only field that links the document created to the specified email attachment by
+creating a row in the document_email table. */
+ emailAttachmentId?: CreateDocumentRequestEmailAttachmentId;
/** Optional file type of the document. */
fileType?: CreateDocumentRequestFileType;
/** The id of the document in the database */
diff --git a/js/app/packages/service-storage/generated/schemas/createDocumentRequestCreatedAt.ts b/js/app/packages/service-storage/generated/schemas/createDocumentRequestCreatedAt.ts
new file mode 100644
index 0000000000..68473a2375
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/createDocumentRequestCreatedAt.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Optional time to set the document's created_at to. Set when backfilling email attachments.
+ */
+export type CreateDocumentRequestCreatedAt = string | null;
diff --git a/js/app/packages/service-storage/generated/schemas/createDocumentRequestEmailAttachmentId.ts b/js/app/packages/service-storage/generated/schemas/createDocumentRequestEmailAttachmentId.ts
new file mode 100644
index 0000000000..e8b4fe0aa1
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/createDocumentRequestEmailAttachmentId.ts
@@ -0,0 +1,12 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Internal only field that links the document created to the specified email attachment by
+creating a row in the document_email table.
+ */
+export type CreateDocumentRequestEmailAttachmentId = string | null;
diff --git a/js/app/packages/service-storage/generated/schemas/documentFilters.ts b/js/app/packages/service-storage/generated/schemas/documentFilters.ts
new file mode 100644
index 0000000000..e0596668fe
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/documentFilters.ts
@@ -0,0 +1,21 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * The document filters used to filter down what documents you search over.
+ */
+export interface DocumentFilters {
+ /** Document ids to search over. Examples: ['doc1'], ['doc1', 'doc2']. Empty to search all accessible documents. */
+ document_ids?: string[];
+ /** Document file types to search. Examples: ['pdf'], ['md', 'txt']. Empty to search all file types. */
+ file_types?: string[];
+ /** Filter by document owner. Examples: ['macro|[email protected]'], ['macro|[email protected]', 'macro|[email protected]']. Empty to search all owners. */
+ owners?: string[];
+ /** A list of project ids to search within. Examples: ['project1'].
+filtering. Empty to ignore project filtering. */
+ project_ids?: string[];
+}
diff --git a/js/app/packages/service-storage/generated/schemas/emailFilters.ts b/js/app/packages/service-storage/generated/schemas/emailFilters.ts
new file mode 100644
index 0000000000..7a17efd6e0
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/emailFilters.ts
@@ -0,0 +1,20 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * The email filters used to filter down what emails you search over.
+ */
+export interface EmailFilters {
+ /** Email BCC addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by BCC. */
+ bcc?: string[];
+ /** Email CC addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by CC. */
+ cc?: string[];
+ /** Email Recipient addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by Recipient. */
+ recipients?: string[];
+ /** Email sender addresses to filter by. Examples: ['[email protected]']. Empty to search all senders. */
+ senders?: string[];
+}
diff --git a/js/app/packages/service-storage/generated/schemas/entityFilters.ts b/js/app/packages/service-storage/generated/schemas/entityFilters.ts
new file mode 100644
index 0000000000..e4510f8119
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/entityFilters.ts
@@ -0,0 +1,27 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { ChannelFilters } from './channelFilters';
+import type { ChatFilters } from './chatFilters';
+import type { DocumentFilters } from './documentFilters';
+import type { EmailFilters } from './emailFilters';
+import type { ProjectFilters } from './projectFilters';
+
+/**
+ * a bundle of all of the filters for each entity type
+ */
+export interface EntityFilters {
+ /** the bundled [ChannelFilters] */
+ channel_filters?: ChannelFilters;
+ /** the bundled [ChatFilters] */
+ chat_filters?: ChatFilters;
+ /** the bundled [DocumentFilters] */
+ document_filters?: DocumentFilters;
+ /** the bundled [EmailFilters] */
+ email_filters?: EmailFilters;
+ /** the bundled [ProjectFilters] */
+ project_filters?: ProjectFilters;
+}
diff --git a/js/app/packages/service-storage/generated/schemas/folderItem.ts b/js/app/packages/service-storage/generated/schemas/folderItem.ts
index 7991a724cc..7a19120aab 100644
--- a/js/app/packages/service-storage/generated/schemas/folderItem.ts
+++ b/js/app/packages/service-storage/generated/schemas/folderItem.ts
@@ -8,6 +8,8 @@ import type { FolderItemFileType } from './folderItemFileType';
export interface FolderItem {
fileType?: FolderItemFileType;
+ /** The full OS name of the file for deduplication */
+ fullName: string;
/** The name of the file, without the extension */
name: string;
/** The relative path of the file.
diff --git a/js/app/packages/service-storage/generated/schemas/getItemsSoupParams.ts b/js/app/packages/service-storage/generated/schemas/getItemsSoupParams.ts
index 223d8c8a36..a766251967 100644
--- a/js/app/packages/service-storage/generated/schemas/getItemsSoupParams.ts
+++ b/js/app/packages/service-storage/generated/schemas/getItemsSoupParams.ts
@@ -8,7 +8,7 @@ import type { SoupApiSort } from './soupApiSort';
export type GetItemsSoupParams = {
/**
- * Whether to expand projects. Defaults to false.
+ * Whether to expand projects. Defaults to true.
*/
expand?: boolean;
/**
diff --git a/js/app/packages/service-storage/generated/schemas/getUsersAffiliateResponse.ts b/js/app/packages/service-storage/generated/schemas/getUsersAffiliateResponse.ts
deleted file mode 100644
index c453cf0624..0000000000
--- a/js/app/packages/service-storage/generated/schemas/getUsersAffiliateResponse.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * Generated by orval v7.13.0 🍺
- * Do not edit manually.
- * document_storage_service
- * OpenAPI spec version: 0.1.0
- */
-import type { GetUsersAffiliateResponseAffiliate } from './getUsersAffiliateResponseAffiliate';
-
-export interface GetUsersAffiliateResponse {
- affiliate?: GetUsersAffiliateResponseAffiliate;
-}
diff --git a/js/app/packages/service-storage/generated/schemas/index.ts b/js/app/packages/service-storage/generated/schemas/index.ts
index 9bddaa4f0f..5a74017d6e 100644
--- a/js/app/packages/service-storage/generated/schemas/index.ts
+++ b/js/app/packages/service-storage/generated/schemas/index.ts
@@ -10,7 +10,6 @@ export * from './activity';
export * from './activityOneOf';
export * from './activityOneOfTwo';
export * from './addPinRequest';
-export * from './affiliateUser';
export * from './anchor';
export * from './anchorId';
export * from './anchorIdOneOf';
@@ -50,9 +49,12 @@ export * from './basicDocumentProjectId';
export * from './basicDocumentSha';
export * from './basicDocumentType';
export * from './bomPart';
+export * from './channelFilters';
+export * from './channelFiltersOrgId';
export * from './channelSharePermission';
export * from './chat';
export * from './chatDeletedAt';
+export * from './chatFilters';
export * from './chatModel';
export * from './chatProjectId';
export * from './chatTokenCount';
@@ -87,7 +89,9 @@ export * from './createDocumentHandler200DataOneOfAllOfFileType';
export * from './createDocumentRequest';
export * from './createDocumentRequestBranchedFromId';
export * from './createDocumentRequestBranchedFromVersionId';
+export * from './createDocumentRequestCreatedAt';
export * from './createDocumentRequestDocumentFamilyId';
+export * from './createDocumentRequestEmailAttachmentId';
export * from './createDocumentRequestFileType';
export * from './createDocumentRequestId';
export * from './createDocumentRequestJobId';
@@ -130,6 +134,7 @@ export * from './deleteUnthreadedAnchorResponseAllOfThreadId';
export * from './deleteUnthreadedPdfAnchorRequest';
export * from './deleteUnthreadedPdfAnchorRequestOneOf';
export * from './deleteUnthreadedPdfAnchorRequestOneOfAnchorType';
+export * from './documentFilters';
export * from './documentMetadata';
export * from './documentMetadataBranchedFromId';
export * from './documentMetadataBranchedFromVersionId';
@@ -195,7 +200,9 @@ export * from './editPdfPlaceableCommentAnchorRequestWasEdited';
export * from './editPdfPlaceableCommentAnchorRequestWidthPct';
export * from './editPdfPlaceableCommentAnchorRequestXPct';
export * from './editPdfPlaceableCommentAnchorRequestYPct';
+export * from './emailFilters';
export * from './emptyResponse';
+export * from './entityFilters';
export * from './errorResponse';
export * from './excludeDefaultViewRequest';
export * from './excludedDefaultView';
@@ -215,7 +222,6 @@ export * from './genericResponseMessage';
export * from './genericSuccessResponse';
export * from './getActivitiesResponse';
export * from './getActivitiesResponseData';
-export * from './getAffiliateUsersResponse';
export * from './getBatchPreviewRequest';
export * from './getBatchPreviewResponse';
export * from './getBatchProjectPreviewRequest';
@@ -255,8 +261,6 @@ export * from './getProjectsResponse';
export * from './getRecentActivityHandlerParams';
export * from './getUserDocumentsHandlerParams';
export * from './getUserHistoryResponse';
-export * from './getUsersAffiliateResponse';
-export * from './getUsersAffiliateResponseAffiliate';
export * from './hashMap';
export * from './hashMapOneOf';
export * from './hashMapOneOfAllOf';
@@ -270,6 +274,10 @@ export * from './itemWithUserAccessLevel';
export * from './locationResponseData';
export * from './locationResponseDataOneOf';
export * from './locationResponseDataOneOfTwo';
+export * from './params';
+export * from './paramsExpand';
+export * from './paramsLimit';
+export * from './paramsSortMethod';
export * from './patchProjectRequestV2';
export * from './patchProjectRequestV2Name';
export * from './patchProjectRequestV2ProjectParentId';
@@ -311,6 +319,8 @@ export * from './pdfPlaceableCommentAnchorRequest';
export * from './pdfPlaceableCommentAnchorRequestUuid';
export * from './pinRequest';
export * from './pinnedItem';
+export * from './postItemsSoupParams';
+export * from './postSoupRequest';
export * from './preSaveDocumentRequest';
export * from './preSaveDocumentResponse';
export * from './preSaveDocumentResponseData';
@@ -319,6 +329,7 @@ export * from './project';
export * from './projectDeleteResponseData';
export * from './projectDeletedAt';
export * from './projectDocumentStatus';
+export * from './projectFilters';
export * from './projectParentId';
export * from './projectPreview';
export * from './projectPreviewData';
diff --git a/js/app/packages/service-storage/generated/schemas/params.ts b/js/app/packages/service-storage/generated/schemas/params.ts
new file mode 100644
index 0000000000..1d28ce2f86
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/params.ts
@@ -0,0 +1,20 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { ParamsExpand } from './paramsExpand';
+import type { ParamsLimit } from './paramsLimit';
+import type { ParamsSortMethod } from './paramsSortMethod';
+
+export interface Params {
+ /** Whether to expand projects. Defaults to true. */
+ expand?: ParamsExpand;
+ /**
+ * Limit the number of items returned. Defaults to 20. Max 500.
+ * @minimum 0
+ */
+ limit?: ParamsLimit;
+ sort_method?: ParamsSortMethod;
+}
diff --git a/js/app/packages/service-storage/generated/schemas/getUsersAffiliateResponseAffiliate.ts b/js/app/packages/service-storage/generated/schemas/paramsExpand.ts
similarity index 50%
rename from js/app/packages/service-storage/generated/schemas/getUsersAffiliateResponseAffiliate.ts
rename to js/app/packages/service-storage/generated/schemas/paramsExpand.ts
index cc4839c1a8..7e42d24228 100644
--- a/js/app/packages/service-storage/generated/schemas/getUsersAffiliateResponseAffiliate.ts
+++ b/js/app/packages/service-storage/generated/schemas/paramsExpand.ts
@@ -4,6 +4,8 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { AffiliateUser } from './affiliateUser';
-export type GetUsersAffiliateResponseAffiliate = null | AffiliateUser;
+/**
+ * Whether to expand projects. Defaults to true.
+ */
+export type ParamsExpand = boolean | null;
diff --git a/js/app/packages/service-storage/generated/schemas/getAffiliateUsersResponse.ts b/js/app/packages/service-storage/generated/schemas/paramsLimit.ts
similarity index 50%
rename from js/app/packages/service-storage/generated/schemas/getAffiliateUsersResponse.ts
rename to js/app/packages/service-storage/generated/schemas/paramsLimit.ts
index 6a2e205e11..c7c3b2d2ac 100644
--- a/js/app/packages/service-storage/generated/schemas/getAffiliateUsersResponse.ts
+++ b/js/app/packages/service-storage/generated/schemas/paramsLimit.ts
@@ -4,8 +4,9 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { AffiliateUser } from './affiliateUser';
-export interface GetAffiliateUsersResponse {
- users: AffiliateUser[];
-}
+/**
+ * Limit the number of items returned. Defaults to 20. Max 500.
+ * @minimum 0
+ */
+export type ParamsLimit = number | null;
diff --git a/js/app/packages/service-storage/generated/schemas/paramsSortMethod.ts b/js/app/packages/service-storage/generated/schemas/paramsSortMethod.ts
new file mode 100644
index 0000000000..c9eece1c3a
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/paramsSortMethod.ts
@@ -0,0 +1,9 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { SoupApiSort } from './soupApiSort';
+
+export type ParamsSortMethod = null | SoupApiSort;
diff --git a/js/app/packages/service-storage/generated/schemas/affiliateUser.ts b/js/app/packages/service-storage/generated/schemas/postItemsSoupParams.ts
similarity index 57%
rename from js/app/packages/service-storage/generated/schemas/affiliateUser.ts
rename to js/app/packages/service-storage/generated/schemas/postItemsSoupParams.ts
index 21a59ea1c4..cd3e687281 100644
--- a/js/app/packages/service-storage/generated/schemas/affiliateUser.ts
+++ b/js/app/packages/service-storage/generated/schemas/postItemsSoupParams.ts
@@ -5,7 +5,9 @@
* OpenAPI spec version: 0.1.0
*/
-export interface AffiliateUser {
- createdAt: number;
- email: string;
-}
+export type PostItemsSoupParams = {
+/**
+ * Base64 encoded cursor value.
+ */
+cursor?: string;
+};
diff --git a/js/app/packages/service-storage/generated/schemas/postSoupRequest.ts b/js/app/packages/service-storage/generated/schemas/postSoupRequest.ts
new file mode 100644
index 0000000000..62221acd65
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/postSoupRequest.ts
@@ -0,0 +1,10 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { EntityFilters } from './entityFilters';
+import type { Params } from './params';
+
+export type PostSoupRequest = EntityFilters & Params;
diff --git a/js/app/packages/service-storage/generated/schemas/projectFilters.ts b/js/app/packages/service-storage/generated/schemas/projectFilters.ts
new file mode 100644
index 0000000000..fb887ddbb4
--- /dev/null
+++ b/js/app/packages/service-storage/generated/schemas/projectFilters.ts
@@ -0,0 +1,16 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * The project filters used to filter down what projects you search over.
+ */
+export interface ProjectFilters {
+ /** Filter by project owner. Examples: ['macro|[email protected]'], ['macro|[email protected]', 'macro|[email protected]']. Empty to search all owners. */
+ owners?: string[];
+ /** Project IDs to search within. Examples: ['project1']. Empty to search all accessible projects. */
+ project_ids?: string[];
+}
diff --git a/js/app/packages/service-storage/generated/schemas/projectPreviewData.ts b/js/app/packages/service-storage/generated/schemas/projectPreviewData.ts
index b542378f1e..b26e67c5de 100644
--- a/js/app/packages/service-storage/generated/schemas/projectPreviewData.ts
+++ b/js/app/packages/service-storage/generated/schemas/projectPreviewData.ts
@@ -9,5 +9,6 @@ export interface ProjectPreviewData {
id: string;
name: string;
owner: string;
+ path: string[];
updatedAt: number;
}
diff --git a/js/app/packages/service-storage/generated/zod.ts b/js/app/packages/service-storage/generated/zod.ts
index efc979d97b..47bf5c454a 100644
--- a/js/app/packages/service-storage/generated/zod.ts
+++ b/js/app/packages/service-storage/generated/zod.ts
@@ -59,40 +59,6 @@ export const getRecentActivityHandlerResponse = zod.object({
})
-/**
- * @summary Gets the users that have been affiliated with your code
- */
-export const getAffiliateUsersResponse = zod.object({
- "users": zod.array(zod.object({
- "createdAt": zod.number(),
- "email": zod.string()
-}))
-})
-
-
-/**
- * @summary Gets who the affiliate code the user was referred by
- */
-export const getAffiliateReferredByResponse = zod.object({
- "affiliate": zod.union([zod.null(),zod.object({
- "createdAt": zod.number(),
- "email": zod.string()
-})]).optional()
-})
-
-
-/**
- * @summary Affiliates a user with a given affiliate code
- */
-export const affiliateUserParams = zod.object({
- "affiliate_code": zod.string().describe('Affiliate code')
-})
-
-export const affiliateUserResponse = zod.object({
-
-}).describe('Empty response is required due to custom fetch forcing `response.json()`')
-
-
/**
* @summary Deletes a single unthreaded anchor for a document
If you need to delete a threaded anchor, see the delete comment handler
@@ -604,8 +570,10 @@ export const getUserDocumentsHandlerResponse = zod.object({
export const createDocumentHandlerBody = zod.object({
"branchedFromId": zod.string().nullish().describe('The document id if the document is being branched.'),
"branchedFromVersionId": zod.number().nullish().describe('The version id if the document is being branched.'),
+ "createdAt": zod.string().datetime({}).nullish().describe('Optional time to set the document\'s created_at to. Set when backfilling email attachments.'),
"documentFamilyId": zod.number().nullish().describe('The document family id if the document is being branched.'),
"documentName": zod.string().describe('The name of the document without extension.'),
+ "emailAttachmentId": zod.string().uuid().nullish().describe('Internal only field that links the document created to the specified email attachment by\ncreating a row in the document_email table.'),
"fileType": zod.string().nullish().describe('Optional file type of the document.'),
"id": zod.string().nullish().describe('The id of the document in the database'),
"jobId": zod.string().nullish().describe('Optional job id to be used to track an upload job for the newly created document.\nWill need to have a corresponding job initiated for the file beforehand.'),
@@ -1215,7 +1183,7 @@ export const getItemsSoupQueryLimitMin = 0;
export const getItemsSoupQueryParams = zod.object({
- "expand": zod.boolean().optional().describe('Whether to expand projects. Defaults to false.'),
+ "expand": zod.boolean().optional().describe('Whether to expand projects. Defaults to true.'),
"limit": zod.number().min(getItemsSoupQueryLimitMin).optional().describe('Limit the number of items returned. Defaults to 20. Max 500.'),
"sort_method": zod.enum(['viewed_at', 'created_at', 'updated_at', 'viewed_updated', 'frecency']).optional().describe('Sort method. Options are viewed_at, created_at, updated_at, viewed_updated. Defaults to viewed_at.'),
"cursor": zod.string().optional().describe('Base64 encoded cursor value.')
@@ -1263,6 +1231,94 @@ export const getItemsSoupResponse = zod.object({
})
+/**
+ * @summary Gets the items the user has access to
+ */
+export const postItemsSoupQueryParams = zod.object({
+ "cursor": zod.string().optional().describe('Base64 encoded cursor value.')
+})
+
+export const postItemsSoupBodyLimitMin = 0;
+
+
+export const postItemsSoupBody = zod.object({
+ "channel_filters": zod.object({
+ "channel_ids": zod.array(zod.string()).optional().describe('Channel IDs to search within. Examples: [\'general\']. Empty to search all accessible channels.'),
+ "mentions": zod.array(zod.string()).optional().describe('Channel user mentions to search for. Examples: [\'@username\']. Empty if not filtering by mentions.'),
+ "org_id": zod.number().nullish().describe('Channel organization ID to search within. Empty to ignore organization filtering.'),
+ "sender_ids": zod.array(zod.string()).optional().describe('Sender IDs to search within. Examples: [\'user1\']. Empty to search all accessible senders.'),
+ "thread_ids": zod.array(zod.string()).optional().describe('Channel thread IDs to search within. Examples: [\'thread123\']. Empty to search all threads.')
+}).optional().describe('The channel message filters used to filter down what channel messages you search over.'),
+ "chat_filters": zod.object({
+ "chat_ids": zod.array(zod.string()).optional().describe('Chat ids to search over. Examples: [\'chat1\'], [\'chat1\', \'chat2\']. When provided, chat search will only match results on these chats. Empty to search all accessible chats.'),
+ "owners": zod.array(zod.string()).optional().describe('Filter by chat owner. Examples: [\'macro|[email protected]\'], [\'macro|[email protected]\', \'macro|[email protected]\']. Empty to search all owners.'),
+ "project_ids": zod.array(zod.string()).optional().describe('A list of project ids to search within. Examples: [\'project1\']. Empty to ignore project filtering.'),
+ "role": zod.array(zod.string()).optional().describe('Chat message roles to search. Examples: [\'user\'], [\'assistant\']. Empty to search all roles.')
+}).optional().describe('The chat filters used to filter down what chats you search over.'),
+ "document_filters": zod.object({
+ "document_ids": zod.array(zod.string()).optional().describe('Document ids to search over. Examples: [\'doc1\'], [\'doc1\', \'doc2\']. Empty to search all accessible documents.'),
+ "file_types": zod.array(zod.string()).optional().describe('Document file types to search. Examples: [\'pdf\'], [\'md\', \'txt\']. Empty to search all file types.'),
+ "owners": zod.array(zod.string()).optional().describe('Filter by document owner. Examples: [\'macro|[email protected]\'], [\'macro|[email protected]\', \'macro|[email protected]\']. Empty to search all owners.'),
+ "project_ids": zod.array(zod.string()).optional().describe('A list of project ids to search within. Examples: [\'project1\'].\nfiltering. Empty to ignore project filtering.')
+}).optional().describe('The document filters used to filter down what documents you search over.'),
+ "email_filters": zod.object({
+ "bcc": zod.array(zod.string()).optional().describe('Email BCC addresses to filter by. Examples: [\'[email protected]\']. Empty if not filtering by BCC.'),
+ "cc": zod.array(zod.string()).optional().describe('Email CC addresses to filter by. Examples: [\'[email protected]\']. Empty if not filtering by CC.'),
+ "recipients": zod.array(zod.string()).optional().describe('Email Recipient addresses to filter by. Examples: [\'[email protected]\']. Empty if not filtering by Recipient.'),
+ "senders": zod.array(zod.string()).optional().describe('Email sender addresses to filter by. Examples: [\'[email protected]\']. Empty to search all senders.')
+}).optional().describe('The email filters used to filter down what emails you search over.'),
+ "project_filters": zod.object({
+ "owners": zod.array(zod.string()).optional().describe('Filter by project owner. Examples: [\'macro|[email protected]\'], [\'macro|[email protected]\', \'macro|[email protected]\']. Empty to search all owners.'),
+ "project_ids": zod.array(zod.string()).optional().describe('Project IDs to search within. Examples: [\'project1\']. Empty to search all accessible projects.')
+}).optional().describe('The project filters used to filter down what projects you search over.')
+}).describe('a bundle of all of the filters for each entity type').and(zod.object({
+ "expand": zod.boolean().nullish().describe('Whether to expand projects. Defaults to true.'),
+ "limit": zod.number().min(postItemsSoupBodyLimitMin).nullish().describe('Limit the number of items returned. Defaults to 20. Max 500.'),
+ "sort_method": zod.union([zod.null(),zod.enum(['viewed_at', 'created_at', 'updated_at', 'viewed_updated', 'frecency'])]).optional()
+}))
+
+export const postItemsSoupResponse = zod.object({
+ "items": zod.array(zod.union([zod.object({
+ "branchedFromId": zod.string().nullish().describe('The id of the document this document branched from'),
+ "branchedFromVersionId": zod.number().nullish().describe('The id of the version this document branched from\nThis could be either DocumentInstance or DocumentBom id depending on the file type'),
+ "createdAt": zod.number().describe('The time the document was created'),
+ "documentFamilyId": zod.number().nullish().describe('The id of the document family this document belongs to'),
+ "documentVersionId": zod.number().describe('The version of the document\nThis could be the document_instance_id or document_bom_id depending on the file type'),
+ "fileType": zod.string().nullish().describe('The file type of the document (e.g. pdf, docx)'),
+ "id": zod.string().describe('The document id'),
+ "name": zod.string().describe('The name of the document'),
+ "ownerId": zod.string().describe('The owner of the document'),
+ "projectId": zod.string().nullish().describe('The id of the project that this document belongs to'),
+ "sha": zod.string().nullish().describe('If the document is a PDF, this is the SHA of the pdf\nIf the document is a DOCX, this will not be present'),
+ "updatedAt": zod.number().describe('The time the document instance / document BOM was updated'),
+ "viewedAt": zod.number().nullable().describe('The time the document was last viewed'),
+ "type": zod.enum(['document'])
+}),zod.object({
+ "createdAt": zod.number().describe('The time the chat was created'),
+ "id": zod.string().describe('The chat uuid'),
+ "isPersistent": zod.boolean().describe('Whether the chat is persistent or not'),
+ "name": zod.string().describe('The name of the chat'),
+ "ownerId": zod.string().describe('Who the chat belongs to'),
+ "projectId": zod.string().nullish().describe('The project id of the chat'),
+ "updatedAt": zod.number().describe('The time the chat was last updated'),
+ "viewedAt": zod.number().nullable().describe('The time the chat was last viewed'),
+ "type": zod.enum(['chat'])
+}),zod.object({
+ "createdAt": zod.number().describe('The time the project was created'),
+ "id": zod.string().describe('The id of the project'),
+ "name": zod.string().describe('The name of the project'),
+ "ownerId": zod.string().describe('The user id of who created the project'),
+ "parentId": zod.string().nullish().describe('The parent project id'),
+ "updatedAt": zod.number().describe('The time the project was updated'),
+ "viewedAt": zod.number().nullable().describe('The time the document was last viewed'),
+ "type": zod.enum(['project'])
+})]).and(zod.object({
+ "frecency_score": zod.number()
+}))),
+ "next_cursor": zod.string().nullish()
+})
+
+
export const upsertUserMentionsParams = zod.object({
"document_id": zod.string().describe('Document ID')
})
@@ -1495,6 +1551,7 @@ export const getBatchProjectPreviewResponse = zod.object({
"id": zod.string(),
"name": zod.string(),
"owner": zod.string(),
+ "path": zod.array(zod.string()),
"updatedAt": zod.number()
}).and(zod.object({
"access": zod.enum(['access'])
@@ -1517,6 +1574,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(),
+ "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.'),
"sha": zod.string().describe('The sha of the file.')
@@ -1543,6 +1601,7 @@ export const uploadFolderHandlerResponse = 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(),
+ "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.'),
"sha": zod.string().describe('The sha of the file.')
diff --git a/js/app/packages/service-storage/openapi.json b/js/app/packages/service-storage/openapi.json
index 591145db6c..93efbc8222 100644
--- a/js/app/packages/service-storage/openapi.json
+++ b/js/app/packages/service-storage/openapi.json
@@ -74,140 +74,6 @@
"deprecated": true
}
},
- "/affiliate": {
- "get": {
- "tags": ["affiliate::get_affiliate_users"],
- "summary": "Gets the users that have been affiliated with your code",
- "operationId": "get_affiliate_users",
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetAffiliateUsersResponse"
- }
- }
- }
- },
- "401": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GenericErrorResponse"
- }
- }
- }
- },
- "500": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GenericErrorResponse"
- }
- }
- }
- }
- }
- }
- },
- "/affiliate/referred_by": {
- "get": {
- "tags": ["affiliate::get_affiliate_referred_by"],
- "summary": "Gets who the affiliate code the user was referred by",
- "operationId": "get_affiliate_referred_by",
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GetUsersAffiliateResponse"
- }
- }
- }
- },
- "401": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GenericErrorResponse"
- }
- }
- }
- },
- "500": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GenericErrorResponse"
- }
- }
- }
- }
- }
- }
- },
- "/affiliate/{affiliate_code}": {
- "post": {
- "tags": ["affiliate::affiliate_user"],
- "summary": "Affiliates a user with a given affiliate code",
- "operationId": "affiliate_user",
- "parameters": [
- {
- "name": "affiliate_code",
- "in": "path",
- "description": "Affiliate code",
- "required": true,
- "schema": { "type": "string" }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "content": {
- "application/json": {
- "schema": { "$ref": "#/components/schemas/EmptyResponse" }
- }
- }
- },
- "400": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GenericErrorResponse"
- }
- }
- }
- },
- "401": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GenericErrorResponse"
- }
- }
- }
- },
- "500": {
- "description": "",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/GenericErrorResponse"
- }
- }
- }
- }
- }
- }
- },
"/annotations/anchors": {
"delete": {
"tags": ["annotations::delete_anchor"],
@@ -2328,7 +2194,7 @@
{
"name": "expand",
"in": "query",
- "description": "Whether to expand projects. Defaults to false.",
+ "description": "Whether to expand projects. Defaults to true.",
"required": false,
"schema": { "type": "boolean" }
},
@@ -2372,6 +2238,46 @@
}
}
}
+ },
+ "post": {
+ "tags": ["soup::inbound::axum_router"],
+ "summary": "Gets the items the user has access to",
+ "operationId": "post_items_soup",
+ "parameters": [
+ {
+ "name": "cursor",
+ "in": "query",
+ "description": "Base64 encoded cursor value.",
+ "required": false,
+ "schema": { "type": "string" }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/PostSoupRequest" }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/SoupPage" }
+ }
+ }
+ },
+ "500": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": { "$ref": "#/components/schemas/ErrorResponse" }
+ }
+ }
+ }
+ }
}
},
"/mentions/{document_id}": {
@@ -4054,14 +3960,6 @@
"pinType": { "type": "string", "description": "The type of the pin" }
}
},
- "AffiliateUser": {
- "type": "object",
- "required": ["email", "createdAt"],
- "properties": {
- "createdAt": { "type": "integer", "format": "int64" },
- "email": { "type": "string" }
- }
- },
"Anchor": { "oneOf": [{ "$ref": "#/components/schemas/PdfAnchor" }] },
"AnchorId": {
"oneOf": [
@@ -4300,6 +4198,37 @@
}
}
},
+ "ChannelFilters": {
+ "type": "object",
+ "description": "The channel message filters used to filter down what channel messages you search over.",
+ "properties": {
+ "channel_ids": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Channel IDs to search within. Examples: ['general']. Empty to search all accessible channels."
+ },
+ "mentions": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Channel user mentions to search for. Examples: ['@username']. Empty if not filtering by mentions."
+ },
+ "org_id": {
+ "type": ["integer", "null"],
+ "format": "int64",
+ "description": "Channel organization ID to search within. Empty to ignore organization filtering."
+ },
+ "sender_ids": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Sender IDs to search within. Examples: ['user1']. Empty to search all accessible senders."
+ },
+ "thread_ids": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Channel thread IDs to search within. Examples: ['thread123']. Empty to search all threads."
+ }
+ }
+ },
"ChannelSharePermission": {
"type": "object",
"description": "The channel share permission",
@@ -4356,6 +4285,32 @@
}
}
},
+ "ChatFilters": {
+ "type": "object",
+ "description": "The chat filters used to filter down what chats you search over.",
+ "properties": {
+ "chat_ids": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Chat ids to search over. Examples: ['chat1'], ['chat1', 'chat2']. When provided, chat search will only match results on these chats. Empty to search all accessible chats."
+ },
+ "owners": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Filter by chat owner. Examples: ['macro|[email protected]'], ['macro|[email protected]', 'macro|[email protected]']. Empty to search all owners."
+ },
+ "project_ids": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "A list of project ids to search within. Examples: ['project1']. Empty to ignore project filtering."
+ },
+ "role": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Chat message roles to search. Examples: ['user'], ['assistant']. Empty to search all roles."
+ }
+ }
+ },
"CloudStorageItemType": {
"type": "string",
"enum": ["document", "chat", "project"]
@@ -4517,6 +4472,11 @@
"format": "int64",
"description": "The version id if the document is being branched."
},
+ "createdAt": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Optional time to set the document's created_at to. Set when backfilling email attachments."
+ },
"documentFamilyId": {
"type": ["integer", "null"],
"format": "int64",
@@ -4526,6 +4486,11 @@
"type": "string",
"description": "The name of the document without extension."
},
+ "emailAttachmentId": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Internal only field that links the document created to the specified email attachment by\ncreating a row in the document_email table."
+ },
"fileType": {
"type": ["string", "null"],
"description": "Optional file type of the document."
@@ -4732,6 +4697,32 @@
}
]
},
+ "DocumentFilters": {
+ "type": "object",
+ "description": "The document filters used to filter down what documents you search over.",
+ "properties": {
+ "document_ids": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Document ids to search over. Examples: ['doc1'], ['doc1', 'doc2']. Empty to search all accessible documents."
+ },
+ "file_types": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Document file types to search. Examples: ['pdf'], ['md', 'txt']. Empty to search all file types."
+ },
+ "owners": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Filter by document owner. Examples: ['macro|[email protected]'], ['macro|[email protected]', 'macro|[email protected]']. Empty to search all owners."
+ },
+ "project_ids": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "A list of project ids to search within. Examples: ['project1'].\nfiltering. Empty to ignore project filtering."
+ }
+ }
+ },
"DocumentMetadata": {
"type": "object",
"required": [
@@ -5092,10 +5083,62 @@
"yPct": { "type": ["number", "null"], "format": "double" }
}
},
+ "EmailFilters": {
+ "type": "object",
+ "description": "The email filters used to filter down what emails you search over.",
+ "properties": {
+ "bcc": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Email BCC addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by BCC."
+ },
+ "cc": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Email CC addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by CC."
+ },
+ "recipients": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Email Recipient addresses to filter by. Examples: ['[email protected]']. Empty if not filtering by Recipient."
+ },
+ "senders": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Email sender addresses to filter by. Examples: ['[email protected]']. Empty to search all senders."
+ }
+ }
+ },
"EmptyResponse": {
"type": "object",
"description": "Empty response is required due to custom fetch forcing `response.json()`"
},
+ "EntityFilters": {
+ "type": "object",
+ "description": "a bundle of all of the filters for each entity type",
+ "properties": {
+ "channel_filters": {
+ "$ref": "#/components/schemas/ChannelFilters",
+ "description": "the bundled [ChannelFilters]"
+ },
+ "chat_filters": {
+ "$ref": "#/components/schemas/ChatFilters",
+ "description": "the bundled [ChatFilters]"
+ },
+ "document_filters": {
+ "$ref": "#/components/schemas/DocumentFilters",
+ "description": "the bundled [DocumentFilters]"
+ },
+ "email_filters": {
+ "$ref": "#/components/schemas/EmailFilters",
+ "description": "the bundled [EmailFilters]"
+ },
+ "project_filters": {
+ "$ref": "#/components/schemas/ProjectFilters",
+ "description": "the bundled [ProjectFilters]"
+ }
+ }
+ },
"ErrorResponse": {
"type": "object",
"description": "A plain old json error response for use with axum.\nyup, thats it.",
@@ -5589,7 +5632,7 @@
},
"FolderItem": {
"type": "object",
- "required": ["name", "relativePath", "sha"],
+ "required": ["name", "fullName", "relativePath", "sha"],
"properties": {
"fileType": {
"oneOf": [
@@ -5600,6 +5643,10 @@
}
]
},
+ "fullName": {
+ "type": "string",
+ "description": "The full OS name of the file for deduplication"
+ },
"name": {
"type": "string",
"description": "The name of the file, without the extension"
@@ -5670,16 +5717,6 @@
},
"deprecated": true
},
- "GetAffiliateUsersResponse": {
- "type": "object",
- "required": ["users"],
- "properties": {
- "users": {
- "type": "array",
- "items": { "$ref": "#/components/schemas/AffiliateUser" }
- }
- }
- },
"GetBatchPreviewRequest": {
"type": "object",
"required": ["document_ids"],
@@ -6007,17 +6044,6 @@
}
}
},
- "GetUsersAffiliateResponse": {
- "type": "object",
- "properties": {
- "affiliate": {
- "oneOf": [
- { "type": "null" },
- { "$ref": "#/components/schemas/AffiliateUser" }
- ]
- }
- }
- },
"HashMap": {
"type": "object",
"additionalProperties": {
@@ -6101,6 +6127,30 @@
}
]
},
+ "Params": {
+ "type": "object",
+ "properties": {
+ "expand": {
+ "type": ["boolean", "null"],
+ "description": "Whether to expand projects. Defaults to true."
+ },
+ "limit": {
+ "type": ["integer", "null"],
+ "format": "int32",
+ "description": "Limit the number of items returned. Defaults to 20. Max 500.",
+ "minimum": 0
+ },
+ "sort_method": {
+ "oneOf": [
+ { "type": "null" },
+ {
+ "$ref": "#/components/schemas/SoupApiSort",
+ "description": "Sort method. Options are viewed_at, created_at, updated_at, viewed_updated. Defaults to viewed_at."
+ }
+ ]
+ }
+ }
+ },
"PatchProjectRequestV2": {
"type": "object",
"properties": {
@@ -6423,6 +6473,12 @@
}
}
},
+ "PostSoupRequest": {
+ "allOf": [
+ { "$ref": "#/components/schemas/EntityFilters" },
+ { "$ref": "#/components/schemas/Params" }
+ ]
+ },
"PreSaveDocumentRequest": {
"type": "object",
"required": ["newBom"],
@@ -6533,6 +6589,22 @@
"status": { "$ref": "#/components/schemas/UploadDocumentStatus" }
}
},
+ "ProjectFilters": {
+ "type": "object",
+ "description": "The project filters used to filter down what projects you search over.",
+ "properties": {
+ "owners": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Filter by project owner. Examples: ['macro|[email protected]'], ['macro|[email protected]', 'macro|[email protected]']. Empty to search all owners."
+ },
+ "project_ids": {
+ "type": "array",
+ "items": { "type": "string" },
+ "description": "Project IDs to search within. Examples: ['project1']. Empty to search all accessible projects."
+ }
+ }
+ },
"ProjectPreview": {
"oneOf": [
{
@@ -6575,11 +6647,12 @@
},
"ProjectPreviewData": {
"type": "object",
- "required": ["id", "name", "owner", "updatedAt"],
+ "required": ["id", "name", "owner", "path", "updatedAt"],
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"owner": { "type": "string" },
+ "path": { "type": "array", "items": { "type": "string" } },
"updatedAt": { "type": "integer", "format": "int64" }
}
},