Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(web-app) fix fe types for search and remove create blank docx (#300)
Will Hutchinson566a04964733
diff --git a/js/app/packages/app/component/command/useSearchItems.ts b/js/app/packages/app/component/command/useSearchItems.tsindex 8e27fe9d2a..611e66b667 100644--- a/js/app/packages/app/component/command/useSearchItems.ts+++ b/js/app/packages/app/component/command/useSearchItems.ts@@ -138,7 +138,7 @@ function createChannelItems(type: 'channel',data: {id: channel.channel_id,- name: channel.channel_name!,+ name: '', // Set name to empty string since search results don't contain channel names anymore},snippet: {content,diff --git a/js/app/packages/core/component/AI/component/tool/UnifiedSearch.tsx b/js/app/packages/core/component/AI/component/tool/UnifiedSearch.tsxindex f18885c0a7..0d2c1ef1a1 100644--- a/js/app/packages/core/component/AI/component/tool/UnifiedSearch.tsx+++ b/js/app/packages/core/component/AI/component/tool/UnifiedSearch.tsx@@ -56,7 +56,7 @@ const UnifiedSearchToolResponse = (props: {case 'email':return result.subject || 'Email';case 'channel':- return result.channel_name || 'Channel';+ return 'Channel'; // there are no channel names from search resultscase 'project':return result.project_name || 'Project';default:diff --git a/js/app/packages/macro-entity/src/queries/search.ts b/js/app/packages/macro-entity/src/queries/search.tsindex 161e4a79fd..f1eea463e2 100644--- a/js/app/packages/macro-entity/src/queries/search.ts+++ b/js/app/packages/macro-entity/src/queries/search.ts@@ -126,7 +126,7 @@ const useMapSearchResponseItem = () => {type: 'channel',// TODO: distinguish channel name match from channel message matchid: result.channel_id,- name: result.name ?? channelWithLatest?.name ?? '',+ name: channelWithLatest?.name ?? '',ownerId: result.owner_id ?? '',createdAt: result.metadata?.created_at,updatedAt: result.metadata?.updated_at,diff --git a/js/app/packages/service-search/generated/models/channelSearchResponseItem.ts b/js/app/packages/service-search/generated/models/channelSearchResponseItem.tsindex 97878a5574..1e3dce8591 100644--- a/js/app/packages/service-search/generated/models/channelSearchResponseItem.ts+++ b/js/app/packages/service-search/generated/models/channelSearchResponseItem.ts@@ -5,8 +5,6 @@* OpenAPI spec version: 0.1.0*/import type { ChannelSearchResult } from './channelSearchResult';-import type { ChannelSearchResponseItemChannelName } from './channelSearchResponseItemChannelName';-import type { ChannelSearchResponseItemName } from './channelSearchResponseItemName';import type { ChannelSearchResponseItemOwnerId } from './channelSearchResponseItemOwnerId';/**@@ -18,15 +16,12 @@ export interface ChannelSearchResponseItem {/** The search results for the channelThis may be empty if the search result match was not on content */channel_message_search_results: ChannelSearchResult[];- /** The name of the channel if present */- channel_name?: ChannelSearchResponseItemChannelName;/** The type of channel */channel_type: string;/** Standardized fields that all item types will share.These field names are being aligned across all item typesfor consistency in our data model. */id: string;- name?: ChannelSearchResponseItemName;/** we don't store this for channels atm but keeping it here for consistency */owner_id?: ChannelSearchResponseItemOwnerId;}diff --git a/js/app/packages/service-search/generated/models/channelSearchResult.ts b/js/app/packages/service-search/generated/models/channelSearchResult.tsindex cbd9d7c662..e25abd8b5b 100644--- a/js/app/packages/service-search/generated/models/channelSearchResult.ts+++ b/js/app/packages/service-search/generated/models/channelSearchResult.ts@@ -5,6 +5,7 @@* OpenAPI spec version: 0.1.0*/import type { SearchHighlight } from './searchHighlight';+import type { ChannelSearchResultScore } from './channelSearchResultScore';import type { ChannelSearchResultThreadId } from './channelSearchResultThreadId';/**@@ -17,6 +18,8 @@ export interface ChannelSearchResult {highlight: SearchHighlight;/** The channel message id */message_id: string;+ /** The score of the result */+ score?: ChannelSearchResultScore;/** The sender id */sender_id: string;/** The channel message thread id */diff --git a/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemChannelName.ts b/js/app/packages/service-search/generated/models/channelSearchResultScore.tssimilarity index 57%rename from js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemChannelName.tsrename to js/app/packages/service-search/generated/models/channelSearchResultScore.tsindex e79bb3bc45..e3249b7c88 100644--- a/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemChannelName.ts+++ b/js/app/packages/service-search/generated/models/channelSearchResultScore.ts@@ -6,6 +6,6 @@*//**- * The channel name+ * The score of the result*/-export type SimpleChannelSearchReponseBaseItemChannelName = string | null;+export type ChannelSearchResultScore = number | null;diff --git a/js/app/packages/service-search/generated/models/chatMessageSearchResult.ts b/js/app/packages/service-search/generated/models/chatMessageSearchResult.tsindex 85fdc8a0d8..5bf51a3a06 100644--- a/js/app/packages/service-search/generated/models/chatMessageSearchResult.ts+++ b/js/app/packages/service-search/generated/models/chatMessageSearchResult.ts@@ -5,6 +5,7 @@* OpenAPI spec version: 0.1.0*/import type { SearchHighlight } from './searchHighlight';+import type { ChatMessageSearchResultScore } from './chatMessageSearchResultScore';/*** A chat match for a given message id@@ -16,6 +17,8 @@ export interface ChatMessageSearchResult {highlight: SearchHighlight;/** The role of the chat message */role: string;+ /** The score of the result */+ score?: ChatMessageSearchResultScore;/** The title of the chat */title: string;/** When the search chat was last updated */diff --git a/js/app/packages/service-search/generated/models/channelSearchResponseItemChannelName.ts b/js/app/packages/service-search/generated/models/chatMessageSearchResultScore.tssimilarity index 54%rename from js/app/packages/service-search/generated/models/channelSearchResponseItemChannelName.tsrename to js/app/packages/service-search/generated/models/chatMessageSearchResultScore.tsindex c1ca128cab..bdb5ce72eb 100644--- a/js/app/packages/service-search/generated/models/channelSearchResponseItemChannelName.ts+++ b/js/app/packages/service-search/generated/models/chatMessageSearchResultScore.ts@@ -6,6 +6,6 @@*//**- * The name of the channel if present+ * The score of the result*/-export type ChannelSearchResponseItemChannelName = string | null;+export type ChatMessageSearchResultScore = number | null;diff --git a/js/app/packages/service-search/generated/models/documentSearchResult.ts b/js/app/packages/service-search/generated/models/documentSearchResult.tsindex 63cb89013d..d7df821979 100644--- a/js/app/packages/service-search/generated/models/documentSearchResult.ts+++ b/js/app/packages/service-search/generated/models/documentSearchResult.ts@@ -6,6 +6,7 @@*/import type { SearchHighlight } from './searchHighlight';import type { DocumentSearchResultRawContent } from './documentSearchResultRawContent';+import type { DocumentSearchResultScore } from './documentSearchResultScore';/*** A document match for a given node@@ -19,6 +20,8 @@ This is only useful for markdown at the moment *//** The raw content of the document.This is only included for markdown files and will be the raw json node of the match */raw_content?: DocumentSearchResultRawContent;+ /** The score of the result */+ score?: DocumentSearchResultScore;/** When the search document was last updated */updated_at: number;}diff --git a/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemTimestampSecondsChannelName.ts b/js/app/packages/service-search/generated/models/documentSearchResultScore.tssimilarity index 53%rename from js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemTimestampSecondsChannelName.tsrename to js/app/packages/service-search/generated/models/documentSearchResultScore.tsindex c5826179a0..14d5098e78 100644--- a/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemTimestampSecondsChannelName.ts+++ b/js/app/packages/service-search/generated/models/documentSearchResultScore.ts@@ -6,6 +6,6 @@*//**- * The channel name+ * The score of the result*/-export type SimpleChannelSearchReponseBaseItemTimestampSecondsChannelName = string | null;+export type DocumentSearchResultScore = number | null;diff --git a/js/app/packages/service-search/generated/models/emailSearchResult.ts b/js/app/packages/service-search/generated/models/emailSearchResult.tsindex 0eea894f2a..2577bba7ec 100644--- a/js/app/packages/service-search/generated/models/emailSearchResult.ts+++ b/js/app/packages/service-search/generated/models/emailSearchResult.ts@@ -5,6 +5,7 @@* OpenAPI spec version: 0.1.0*/import type { SearchHighlight } from './searchHighlight';+import type { EmailSearchResultScore } from './emailSearchResultScore';import type { EmailSearchResultSentAt } from './emailSearchResultSentAt';import type { EmailSearchResultSubject } from './emailSearchResultSubject';@@ -20,6 +21,8 @@ export interface EmailSearchResult {/** The email message id. */message_id: string;recipients: string[];+ /** The score of the result */+ score?: EmailSearchResultScore;sender: string;/** When the email message was sent */sent_at?: EmailSearchResultSentAt;diff --git a/js/app/packages/service-search/generated/models/channelSearchResponseItemName.ts b/js/app/packages/service-search/generated/models/emailSearchResultScore.tssimilarity index 57%rename from js/app/packages/service-search/generated/models/channelSearchResponseItemName.tsrename to js/app/packages/service-search/generated/models/emailSearchResultScore.tsindex 330d842704..4c4f0b32ff 100644--- a/js/app/packages/service-search/generated/models/channelSearchResponseItemName.ts+++ b/js/app/packages/service-search/generated/models/emailSearchResultScore.ts@@ -5,4 +5,7 @@* OpenAPI spec version: 0.1.0*/-export type ChannelSearchResponseItemName = string | null;+/**+ * The score of the result+ */+export type EmailSearchResultScore = number | null;diff --git a/js/app/packages/service-search/generated/models/index.ts b/js/app/packages/service-search/generated/models/index.tsindex fab02126a0..78077ed74d 100644--- a/js/app/packages/service-search/generated/models/index.ts+++ b/js/app/packages/service-search/generated/models/index.ts@@ -19,16 +19,16 @@ export * from './channelSearchRequestAllOfTwoQuery';export * from './channelSearchRequestAllOfTwoTerms';export * from './channelSearchResponse';export * from './channelSearchResponseItem';-export * from './channelSearchResponseItemChannelName';-export * from './channelSearchResponseItemName';export * from './channelSearchResponseItemOwnerId';export * from './channelSearchResponseItemWithMetadata';export * from './channelSearchResponseItemWithMetadataAllOf';export * from './channelSearchResponseItemWithMetadataAllOfMetadata';export * from './channelSearchResult';+export * from './channelSearchResultScore';export * from './channelSearchResultThreadId';export * from './chatFilters';export * from './chatMessageSearchResult';+export * from './chatMessageSearchResultScore';export * from './chatMetadata';export * from './chatMetadataDeletedAt';export * from './chatMetadataProjectId';@@ -64,6 +64,7 @@ export * from './documentSearchResponseItemWithMetadataAllOf';export * from './documentSearchResponseItemWithMetadataAllOfMetadata';export * from './documentSearchResult';export * from './documentSearchResultRawContent';+export * from './documentSearchResultScore';export * from './emailFilters';export * from './emailSearchParams';export * from './emailSearchRequest';@@ -80,6 +81,7 @@ export * from './emailSearchResponseItemWithMetadataAllOf';export * from './emailSearchResponseItemWithMetadataAllOfSnippet';export * from './emailSearchResponseItemWithMetadataAllOfViewedAt';export * from './emailSearchResult';+export * from './emailSearchResultScore';export * from './emailSearchResultSentAt';export * from './emailSearchResultSubject';export * from './emptyResponse';@@ -104,17 +106,16 @@ export * from './projectSearchResponseItemWithMetadata';export * from './projectSearchResponseItemWithMetadataAllOf';export * from './projectSearchResponseItemWithMetadataAllOfMetadata';export * from './projectSearchResult';+export * from './projectSearchResultScore';export * from './searchHighlight';export * from './searchHighlightName';export * from './searchOn';export * from './searchResponse';export * from './simpleChannelSearchParams';export * from './simpleChannelSearchReponseBaseItem';-export * from './simpleChannelSearchReponseBaseItemChannelName';export * from './simpleChannelSearchReponseBaseItemOrgId';export * from './simpleChannelSearchReponseBaseItemThreadId';export * from './simpleChannelSearchReponseBaseItemTimestampSeconds';-export * from './simpleChannelSearchReponseBaseItemTimestampSecondsChannelName';export * from './simpleChannelSearchReponseBaseItemTimestampSecondsOrgId';export * from './simpleChannelSearchReponseBaseItemTimestampSecondsThreadId';export * from './simpleChannelSearchResponse';diff --git a/js/app/packages/service-search/generated/models/projectSearchResult.ts b/js/app/packages/service-search/generated/models/projectSearchResult.tsindex 985a843a7c..8375d650e3 100644--- a/js/app/packages/service-search/generated/models/projectSearchResult.ts+++ b/js/app/packages/service-search/generated/models/projectSearchResult.ts@@ -5,7 +5,10 @@* OpenAPI spec version: 0.1.0*/import type { SearchHighlight } from './searchHighlight';+import type { ProjectSearchResultScore } from './projectSearchResultScore';export interface ProjectSearchResult {highlight: SearchHighlight;+ /** The score of the result */+ score?: ProjectSearchResultScore;}diff --git a/js/app/packages/service-search/generated/models/projectSearchResultScore.ts b/js/app/packages/service-search/generated/models/projectSearchResultScore.tsnew file mode 100644index 0000000000..b2f2482acd--- /dev/null+++ b/js/app/packages/service-search/generated/models/projectSearchResultScore.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.13.0 🍺+ * Do not edit manually.+ * search_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * The score of the result+ */+export type ProjectSearchResultScore = number | null;diff --git a/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItem.ts b/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItem.tsindex d2513d0328..0add782326 100644--- a/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItem.ts+++ b/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItem.ts@@ -4,7 +4,6 @@* search_service* OpenAPI spec version: 0.1.0*/-import type { SimpleChannelSearchReponseBaseItemChannelName } from './simpleChannelSearchReponseBaseItemChannelName';import type { SearchHighlight } from './searchHighlight';import type { SimpleChannelSearchReponseBaseItemOrgId } from './simpleChannelSearchReponseBaseItemOrgId';import type { SimpleChannelSearchReponseBaseItemThreadId } from './simpleChannelSearchReponseBaseItemThreadId';@@ -12,8 +11,6 @@ import type { SimpleChannelSearchReponseBaseItemThreadId } from './simpleChannelexport interface SimpleChannelSearchReponseBaseItem {/** The channel id */channel_id: string;- /** The channel name */- channel_name?: SimpleChannelSearchReponseBaseItemChannelName;/** The channel type */channel_type: string;/** The time the channel message was created */diff --git a/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemTimestampSeconds.ts b/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemTimestampSeconds.tsindex 122ca163ea..51ffd93ccc 100644--- a/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemTimestampSeconds.ts+++ b/js/app/packages/service-search/generated/models/simpleChannelSearchReponseBaseItemTimestampSeconds.ts@@ -4,7 +4,6 @@* search_service* OpenAPI spec version: 0.1.0*/-import type { SimpleChannelSearchReponseBaseItemTimestampSecondsChannelName } from './simpleChannelSearchReponseBaseItemTimestampSecondsChannelName';import type { SearchHighlight } from './searchHighlight';import type { SimpleChannelSearchReponseBaseItemTimestampSecondsOrgId } from './simpleChannelSearchReponseBaseItemTimestampSecondsOrgId';import type { SimpleChannelSearchReponseBaseItemTimestampSecondsThreadId } from './simpleChannelSearchReponseBaseItemTimestampSecondsThreadId';@@ -12,8 +11,6 @@ import type { SimpleChannelSearchReponseBaseItemTimestampSecondsThreadId } fromexport interface SimpleChannelSearchReponseBaseItemTimestampSeconds {/** The channel id */channel_id: string;- /** The channel name */- channel_name?: SimpleChannelSearchReponseBaseItemTimestampSecondsChannelName;/** The channel type */channel_type: string;/** The time the channel message was created */diff --git a/js/app/packages/service-search/openapi.json b/js/app/packages/service-search/openapi.jsonindex 1533c2eecb..4b9a053e01 100644--- a/js/app/packages/service-search/openapi.json+++ b/js/app/packages/service-search/openapi.json@@ -945,10 +945,6 @@"items": { "$ref": "#/components/schemas/ChannelSearchResult" },"description": "The search results for the channel\nThis may be empty if the search result match was not on content"},- "channel_name": {- "type": ["string", "null"],- "description": "The name of the channel if present"- },"channel_type": {"type": "string","description": "The type of channel"@@ -957,7 +953,6 @@"type": "string","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", "null"] },"owner_id": {"type": ["string", "null"],"description": "we don't store this for channels atm but keeping it here for consistency"@@ -1008,6 +1003,11 @@"type": "string","description": "The channel message id"},+ "score": {+ "type": ["number", "null"],+ "format": "double",+ "description": "The score of the result"+ },"sender_id": { "type": "string", "description": "The sender id" },"thread_id": {"type": ["string", "null"],@@ -1069,6 +1069,11 @@"type": "string","description": "The role of the chat message"},+ "score": {+ "type": ["number", "null"],+ "format": "double",+ "description": "The score of the result"+ },"title": { "type": "string", "description": "The title of the chat" },"updated_at": {"type": "integer",@@ -1368,6 +1373,11 @@"type": ["string", "null"],"description": "The raw content of the document.\nThis is only included for markdown files and will be the raw json node of the match"},+ "score": {+ "type": ["number", "null"],+ "format": "double",+ "description": "The score of the result"+ },"updated_at": {"type": "integer","format": "int64",@@ -1536,6 +1546,11 @@"description": "The email message id."},"recipients": { "type": "array", "items": { "type": "string" } },+ "score": {+ "type": ["number", "null"],+ "format": "double",+ "description": "The score of the result"+ },"sender": { "type": "string" },"sent_at": {"type": ["integer", "null"],@@ -2136,7 +2151,12 @@"type": "object","required": ["highlight"],"properties": {- "highlight": { "$ref": "#/components/schemas/SearchHighlight" }+ "highlight": { "$ref": "#/components/schemas/SearchHighlight" },+ "score": {+ "type": ["number", "null"],+ "format": "double",+ "description": "The score of the result"+ }}},"SearchHighlight": {@@ -2184,10 +2204,6 @@],"properties": {"channel_id": { "type": "string", "description": "The channel id" },- "channel_name": {- "type": ["string", "null"],- "description": "The channel name"- },"channel_type": {"type": "string","description": "The channel type"@@ -2236,10 +2252,6 @@],"properties": {"channel_id": { "type": "string", "description": "The channel id" },- "channel_name": {- "type": ["string", "null"],- "description": "The channel name"- },"channel_type": {"type": "string","description": "The channel type"diff --git a/js/app/packages/service-storage/client.ts b/js/app/packages/service-storage/client.tsindex dc66bef68c..6b44bcc834 100644--- a/js/app/packages/service-storage/client.ts+++ b/js/app/packages/service-storage/client.ts@@ -38,7 +38,6 @@ import {type CloudStorageItemType,CloudStorageItemType as CloudStorageItemTypeMap,} from './generated/schemas/cloudStorageItemType';-import type { CreateBlankDocxRequest } from './generated/schemas/createBlankDocxRequest';import type { CreateCommentResponse } from './generated/schemas/createCommentResponse';import type { CreateDocumentHandler200 as CreateDocumentResponse } from './generated/schemas/createDocumentHandler200';import type { CreateDocumentRequest } from './generated/schemas/createDocumentRequest';@@ -502,13 +501,6 @@ export const storageServiceClient = {});},- async createBlankDocx(request: CreateBlankDocxRequest) {- return dssFetch<DocumentMetadata>(`/documents/blank_docx`, {- method: 'POST',- body: JSON.stringify(request),- });- },-async copyDocument(params: {documentId: string;documentVersionId?: number;diff --git a/js/app/packages/service-storage/generated/schemas/createBlankDocxRequest.ts b/js/app/packages/service-storage/generated/schemas/createBlankDocxRequest.tsdeleted file mode 100644index 376a909529..0000000000--- a/js/app/packages/service-storage/generated/schemas/createBlankDocxRequest.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 { CreateBlankDocxRequestProjectId } from './createBlankDocxRequestProjectId';--export interface CreateBlankDocxRequest {- projectId?: CreateBlankDocxRequestProjectId;-}diff --git a/js/app/packages/service-storage/generated/schemas/createBlankDocxRequestProjectId.ts b/js/app/packages/service-storage/generated/schemas/createBlankDocxRequestProjectId.tsdeleted file mode 100644index b51aae1d39..0000000000--- a/js/app/packages/service-storage/generated/schemas/createBlankDocxRequestProjectId.ts+++ /dev/null@@ -1,8 +0,0 @@-/**- * Generated by orval v7.13.0 🍺- * Do not edit manually.- * document_storage_service- * OpenAPI spec version: 0.1.0- */--export type CreateBlankDocxRequestProjectId = string | null;diff --git a/js/app/packages/service-storage/generated/schemas/index.ts b/js/app/packages/service-storage/generated/schemas/index.tsindex 5a74017d6e..991b244545 100644--- a/js/app/packages/service-storage/generated/schemas/index.ts+++ b/js/app/packages/service-storage/generated/schemas/index.ts@@ -70,8 +70,6 @@ export * from './copyDocumentQueryParams';export * from './copyDocumentQueryParamsVersionId';export * from './copyDocumentRequest';export * from './copyDocumentRequestVersionId';-export * from './createBlankDocxRequest';-export * from './createBlankDocxRequestProjectId';export * from './createBulkDocumentResponse';export * from './createBulkDocumentResponseData';export * from './createBulkDocumentResponseDataDocumentMetadata';diff --git a/js/app/packages/service-storage/generated/zod.ts b/js/app/packages/service-storage/generated/zod.tsindex 47bf5c454a..d663514e12 100644--- a/js/app/packages/service-storage/generated/zod.ts+++ b/js/app/packages/service-storage/generated/zod.ts@@ -612,36 +612,6 @@ export const createDocumentHandlerResponse = zod.object({})-/**- * @summary Creates a new blank docx file for the user- */-export const createBlankDocxBody = zod.object({- "projectId": zod.string().nullish()-})--export const createBlankDocxResponse = 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\nthe file type'),- "createdAt": zod.number().describe('The time the document was created'),- "documentBom": zod.array(zod.object({- "id": zod.string().describe('The uuid of the bom part'),- "path": zod.string().describe('The file path of the bom part content'),- "sha": zod.string().describe('The sha of the bom part content\nThere is an index on sha for more performant queries based on it.')-})).nullish().describe('If the document is a DOCX document and unzipped, the document_bom will be present'),- "documentFamilyId": zod.number().nullish().describe('The id of the document family this document belongs to'),- "documentId": zod.string().describe('The document id'),- "documentName": zod.string().describe('The name of the document'),- "documentVersionId": zod.number().describe('The version of the document\nThis could be the document_instance_id or document_bom_id depending on\nthe file type'),- "fileType": zod.string().nullish().describe('The file type of the document (file extension)'),- "modificationData": zod.any().optional().describe('The modification data for the document instance.\nThis is only used for PDF documents.'),- "owner": zod.string().describe('The owner of the document'),- "projectId": zod.string().nullish().describe('The id of the project that this document belongs to'),- "projectName": zod.string().nullish().describe('The name 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')-})--export const initializeUserDocumentsResponse = zod.object({"success": zod.boolean().describe('Indicates if the request was successful')})@@ -1191,36 +1161,36 @@ export const getItemsSoupQueryParams = zod.object({export const getItemsSoupResponse = zod.object({"items": zod.array(zod.union([zod.object({- "branchedFromId": zod.string().nullish().describe('The id of the document this document branched from'),+ "branchedFromId": zod.string().uuid().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'),+ "id": zod.string().uuid().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'),+ "projectId": zod.string().uuid().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'),+ "id": zod.string().uuid().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'),+ "projectId": zod.string().uuid().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'),+ "id": zod.string().uuid().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'),+ "parentId": zod.string().uuid().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'])@@ -1279,36 +1249,36 @@ export const postItemsSoupBody = zod.object({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'),+ "branchedFromId": zod.string().uuid().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'),+ "id": zod.string().uuid().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'),+ "projectId": zod.string().uuid().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'),+ "id": zod.string().uuid().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'),+ "projectId": zod.string().uuid().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'),+ "id": zod.string().uuid().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'),+ "parentId": zod.string().uuid().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'])diff --git a/js/app/packages/service-storage/openapi.json b/js/app/packages/service-storage/openapi.jsonindex 93efbc8222..ecde279a7d 100644--- a/js/app/packages/service-storage/openapi.json+++ b/js/app/packages/service-storage/openapi.json@@ -680,73 +680,6 @@}}},- "/documents/blank_docx": {- "post": {- "tags": ["documents::create_document::create_blank_docx"],- "summary": "Creates a new blank docx file for the user",- "operationId": "create_blank_docx",- "requestBody": {- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/CreateBlankDocxRequest"- }- }- },- "required": true- },- "responses": {- "200": {- "description": "",- "content": {- "application/json": {- "schema": { "$ref": "#/components/schemas/DocumentMetadata" }- }- }- },- "400": {- "description": "",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/GenericErrorResponse"- }- }- }- },- "401": {- "description": "",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/GenericErrorResponse"- }- }- }- },- "403": {- "description": "",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/GenericErrorResponse"- }- }- }- },- "500": {- "description": "",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/GenericErrorResponse"- }- }- }- }- }- }- },"/documents/initialize_user_documents": {"post": {"tags": ["document"],@@ -4376,10 +4309,6 @@}}},- "CreateBlankDocxRequest": {- "type": "object",- "properties": { "projectId": { "type": ["string", "null"] } }- },"CreateBulkDocumentResponse": {"type": "object","required": ["error", "data"],@@ -6818,7 +6747,11 @@"format": "int64","description": "The time the chat was created"},- "id": { "type": "string", "description": "The chat uuid" },+ "id": {+ "type": "string",+ "format": "uuid",+ "description": "The chat uuid"+ },"isPersistent": {"type": "boolean","description": "Whether the chat is persistent or not"@@ -6830,6 +6763,7 @@},"projectId": {"type": ["string", "null"],+ "format": "uuid","description": "The project id of the chat"},"updatedAt": {@@ -6858,6 +6792,7 @@"properties": {"branchedFromId": {"type": ["string", "null"],+ "format": "uuid","description": "The id of the document this document branched from"},"branchedFromVersionId": {@@ -6884,7 +6819,11 @@"type": ["string", "null"],"description": "The file type of the document (e.g. pdf, docx)"},- "id": { "type": "string", "description": "The document id" },+ "id": {+ "type": "string",+ "format": "uuid",+ "description": "The document id"+ },"name": {"type": "string","description": "The name of the document"@@ -6895,6 +6834,7 @@},"projectId": {"type": ["string", "null"],+ "format": "uuid","description": "The id of the project that this document belongs to"},"sha": {@@ -6959,7 +6899,11 @@"format": "int64","description": "The time the project was created"},- "id": { "type": "string", "description": "The id of the project" },+ "id": {+ "type": "string",+ "format": "uuid",+ "description": "The id of the project"+ },"name": {"type": "string","description": "The name of the project"@@ -6970,6 +6914,7 @@},"parentId": {"type": ["string", "null"],+ "format": "uuid","description": "The parent project id"},"updatedAt": {diff --git a/js/app/packages/service-storage/service.ts b/js/app/packages/service-storage/service.tsindex e40e6cae88..d49859b0c3 100644--- a/js/app/packages/service-storage/service.ts+++ b/js/app/packages/service-storage/service.ts@@ -457,13 +457,6 @@ export const StorageService = new Svc('Document++ Storage Service API')modifies: true,throws: withFetchErrors('INVALID_RESPONSE'),})- .fn('createBlankDocx', {- description: schemas.createBlankDocxResponse.description || '',- args: schemas.createBlankDocxBody.shape,- result: schemas.createBlankDocxResponse.shape,- modifies: true,- throws: withFetchErrors('INVALID_RESPONSE'),- }).fn('copyDocument', {description: schemas.copyDocumentHandlerResponse.description!,args: {