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 (types): deleted at must be included in project schema :( (#573)
Eric Hayes51b3a4028adf
diff --git a/js/app/packages/block-project/definition.ts b/js/app/packages/block-project/definition.tsindex 79e1baa9d5..aec9f08412 100644--- a/js/app/packages/block-project/definition.ts+++ b/js/app/packages/block-project/definition.ts@@ -26,6 +26,7 @@ export const definition = defineBlock({updatedAt: 0,type: ProjectType.project,userId: '',+ deletedAt: null,},userAccessLevel: 'owner',} satisfies GetProjectResponseData);@@ -39,6 +40,7 @@ export const definition = defineBlock({updatedAt: 0,type: ProjectType.project,userId: '',+ deletedAt: null,},userAccessLevel: 'owner',} satisfies GetProjectResponseData);diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/basicDocument.ts b/js/app/packages/service-clients/service-storage/generated/schemas/basicDocument.tsindex 85b5d6bf73..1492e01326 100644--- a/js/app/packages/service-clients/service-storage/generated/schemas/basicDocument.ts+++ b/js/app/packages/service-clients/service-storage/generated/schemas/basicDocument.ts@@ -24,7 +24,7 @@ the file type *//** The time the document was created */createdAt: number;/** The time the document was deleted */- deletedAt?: BasicDocumentDeletedAt;+ deletedAt: BasicDocumentDeletedAt;/** The id of the document family this document belongs to */documentFamilyId?: BasicDocumentDocumentFamilyId;/** The version of the documentdiff --git a/js/app/packages/service-clients/service-storage/generated/schemas/chat.ts b/js/app/packages/service-clients/service-storage/generated/schemas/chat.tsindex a3250cb64f..0adf3972db 100644--- a/js/app/packages/service-clients/service-storage/generated/schemas/chat.ts+++ b/js/app/packages/service-clients/service-storage/generated/schemas/chat.ts@@ -14,7 +14,7 @@ export interface Chat {/** The time the chat was created */createdAt: number;/** The time the chat was deleted */- deletedAt?: ChatDeletedAt;+ deletedAt: ChatDeletedAt;/** The chat uuid */id: string;isPersistent: boolean;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/index.ts b/js/app/packages/service-clients/service-storage/generated/schemas/index.tsindex 9bcddcf03c..c531d79123 100644--- a/js/app/packages/service-clients/service-storage/generated/schemas/index.ts+++ b/js/app/packages/service-clients/service-storage/generated/schemas/index.ts@@ -324,6 +324,7 @@ export * from './pinRequest';export * from './pinnedItem';export * from './postItemsSoupParams';export * from './postSoupRequest';+export * from './postSoupRequestAllOf';export * from './preSaveDocumentRequest';export * from './preSaveDocumentResponse';export * from './preSaveDocumentResponseData';diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postSoupRequest.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postSoupRequest.tsindex 62221acd65..94b4d186d9 100644--- a/js/app/packages/service-clients/service-storage/generated/schemas/postSoupRequest.ts+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postSoupRequest.ts@@ -6,5 +6,6 @@*/import type { EntityFilters } from './entityFilters';import type { Params } from './params';+import type { PostSoupRequestAllOf } from './postSoupRequestAllOf';-export type PostSoupRequest = EntityFilters & Params;+export type PostSoupRequest = EntityFilters & Params & PostSoupRequestAllOf;diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/postSoupRequestAllOf.ts b/js/app/packages/service-clients/service-storage/generated/schemas/postSoupRequestAllOf.tsnew file mode 100644index 0000000000..324aa9886b--- /dev/null+++ b/js/app/packages/service-clients/service-storage/generated/schemas/postSoupRequestAllOf.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.13.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++export type PostSoupRequestAllOf = {+ /** the view of specific emails to display */+ emailView?: string;+};diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/project.ts b/js/app/packages/service-clients/service-storage/generated/schemas/project.tsindex 3c614edcbd..dbcc1e50df 100644--- a/js/app/packages/service-clients/service-storage/generated/schemas/project.ts+++ b/js/app/packages/service-clients/service-storage/generated/schemas/project.ts@@ -11,8 +11,7 @@ import type { ProjectType } from './projectType';export interface Project {/** The time the project was created */createdAt: number;- /** The time the project was deleted */- deletedAt?: ProjectDeletedAt;+ deletedAt: ProjectDeletedAt;/** The id of the project */id: string;/** The name of the project */diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/projectDeletedAt.ts b/js/app/packages/service-clients/service-storage/generated/schemas/projectDeletedAt.tsindex 33b6ea8f58..b82981784b 100644--- a/js/app/packages/service-clients/service-storage/generated/schemas/projectDeletedAt.ts+++ b/js/app/packages/service-clients/service-storage/generated/schemas/projectDeletedAt.ts@@ -5,7 +5,4 @@* OpenAPI spec version: 0.1.0*/-/**- * The time the project was deleted- */export type ProjectDeletedAt = number | null;diff --git a/js/app/packages/service-clients/service-storage/generated/zod.ts b/js/app/packages/service-clients/service-storage/generated/zod.tsindex edcc9fb372..d643b908ce 100644--- a/js/app/packages/service-clients/service-storage/generated/zod.ts+++ b/js/app/packages/service-clients/service-storage/generated/zod.ts@@ -26,7 +26,7 @@ export const getRecentActivityHandlerResponse = 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'),- "deletedAt": zod.number().nullish().describe('The time the document was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the document was deleted'),"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\nthe file type'),"fileType": zod.string().nullish().describe('The file type of the document (e.g. pdf, docx)'),@@ -42,7 +42,7 @@ export const getRecentActivityHandlerResponse = zod.object({}),zod.object({"Chat": zod.object({"createdAt": zod.number().describe('The time the chat was created'),- "deletedAt": zod.number().nullish().describe('The time the chat was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the chat was deleted'),"id": zod.string().describe('The chat uuid'),"isPersistent": zod.boolean(),"model": zod.string().nullish().describe('The model used to generate the chat'),@@ -1071,7 +1071,7 @@ export const getHistoryHandlerResponse = 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'),- "deletedAt": zod.number().nullish().describe('The time the document was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the document was deleted'),"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\nthe file type'),"fileType": zod.string().nullish().describe('The file type of the document (e.g. pdf, docx)'),@@ -1085,7 +1085,7 @@ export const getHistoryHandlerResponse = zod.object({"type": zod.enum(['document'])}),zod.object({"createdAt": zod.number().describe('The time the chat was created'),- "deletedAt": zod.number().nullish().describe('The time the chat was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the chat was deleted'),"id": zod.string().describe('The chat uuid'),"isPersistent": zod.boolean(),"model": zod.string().nullish().describe('The model used to generate the chat'),@@ -1097,7 +1097,7 @@ export const getHistoryHandlerResponse = zod.object({"type": zod.enum(['chat'])}),zod.object({"createdAt": zod.number().describe('The time the project was created'),- "deletedAt": zod.number().nullish().describe('The time the project was deleted'),+ "deletedAt": zod.number().nullable(),"id": zod.string().describe('The id of the project'),"name": zod.string().describe('The name of the project'),"parentId": zod.string().nullish().describe('The parent project id'),@@ -1324,6 +1324,8 @@ export const postItemsSoupBody = 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()+})).and(zod.object({+ "emailView": zod.string().optional().describe('the view of specific emails to display')}))export const postItemsSoupResponse = zod.object({@@ -1460,7 +1462,7 @@ export const getPinsHandlerResponse = 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'),- "deletedAt": zod.number().nullish().describe('The time the document was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the document was deleted'),"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\nthe file type'),"fileType": zod.string().nullish().describe('The file type of the document (e.g. pdf, docx)'),@@ -1474,7 +1476,7 @@ export const getPinsHandlerResponse = zod.object({"type": zod.enum(['document'])}),zod.object({"createdAt": zod.number().describe('The time the chat was created'),- "deletedAt": zod.number().nullish().describe('The time the chat was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the chat was deleted'),"id": zod.string().describe('The chat uuid'),"isPersistent": zod.boolean(),"model": zod.string().nullish().describe('The model used to generate the chat'),@@ -1486,7 +1488,7 @@ export const getPinsHandlerResponse = zod.object({"type": zod.enum(['chat'])}),zod.object({"createdAt": zod.number().describe('The time the project was created'),- "deletedAt": zod.number().nullish().describe('The time the project was deleted'),+ "deletedAt": zod.number().nullable(),"id": zod.string().describe('The id of the project'),"name": zod.string().describe('The name of the project'),"parentId": zod.string().nullish().describe('The parent project id'),@@ -1498,7 +1500,7 @@ export const getPinsHandlerResponse = 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'),- "deletedAt": zod.number().nullish().describe('The time the document was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the document was deleted'),"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\nthe file type'),"fileType": zod.string().nullish().describe('The file type of the document (e.g. pdf, docx)'),@@ -1512,7 +1514,7 @@ export const getPinsHandlerResponse = zod.object({"type": zod.enum(['document'])}),zod.object({"createdAt": zod.number().describe('The time the chat was created'),- "deletedAt": zod.number().nullish().describe('The time the chat was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the chat was deleted'),"id": zod.string().describe('The chat uuid'),"isPersistent": zod.boolean(),"model": zod.string().nullish().describe('The model used to generate the chat'),@@ -1524,7 +1526,7 @@ export const getPinsHandlerResponse = zod.object({"type": zod.enum(['chat'])}),zod.object({"createdAt": zod.number().describe('The time the project was created'),- "deletedAt": zod.number().nullish().describe('The time the project was deleted'),+ "deletedAt": zod.number().nullable(),"id": zod.string().describe('The id of the project'),"name": zod.string().describe('The name of the project'),"parentId": zod.string().nullish().describe('The parent project id'),@@ -1602,7 +1604,7 @@ export const removePinHandlerResponse = zod.object({export const getProjectsHandlerResponse = zod.object({"data": zod.array(zod.object({"createdAt": zod.number().describe('The time the project was created'),- "deletedAt": zod.number().nullish().describe('The time the project was deleted'),+ "deletedAt": zod.number().nullable(),"id": zod.string().describe('The id of the project'),"name": zod.string().describe('The name of the project'),"parentId": zod.string().nullish().describe('The parent project id'),@@ -1626,7 +1628,7 @@ export const createProjectHandlerBody = zod.object({export const createProjectHandlerResponse = zod.object({"data": zod.object({"createdAt": zod.number().describe('The time the project was created'),- "deletedAt": zod.number().nullish().describe('The time the project was deleted'),+ "deletedAt": zod.number().nullable(),"id": zod.string().describe('The id of the project'),"name": zod.string().describe('The name of the project'),"parentId": zod.string().nullish().describe('The parent project id'),@@ -1644,7 +1646,7 @@ export const createProjectHandlerResponse = zod.object({export const getPendingProjectsHandlerResponse = zod.object({"data": zod.array(zod.object({"createdAt": zod.number().describe('The time the project was created'),- "deletedAt": zod.number().nullish().describe('The time the project was deleted'),+ "deletedAt": zod.number().nullable(),"id": zod.string().describe('The id of the project'),"name": zod.string().describe('The name of the project'),"parentId": zod.string().nullish().describe('The parent project id'),@@ -1764,7 +1766,7 @@ export const getProjectHandlerResponse = zod.object({"data": zod.object({"projectMetadata": zod.object({"createdAt": zod.number().describe('The time the project was created'),- "deletedAt": zod.number().nullish().describe('The time the project was deleted'),+ "deletedAt": zod.number().nullable(),"id": zod.string().describe('The id of the project'),"name": zod.string().describe('The name of the project'),"parentId": zod.string().nullish().describe('The parent project id'),@@ -1820,7 +1822,7 @@ export const getProjectContentHandlerResponse = 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'),- "deletedAt": zod.number().nullish().describe('The time the document was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the document was deleted'),"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\nthe file type'),"fileType": zod.string().nullish().describe('The file type of the document (e.g. pdf, docx)'),@@ -1834,7 +1836,7 @@ export const getProjectContentHandlerResponse = zod.object({"type": zod.enum(['document'])}),zod.object({"createdAt": zod.number().describe('The time the chat was created'),- "deletedAt": zod.number().nullish().describe('The time the chat was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the chat was deleted'),"id": zod.string().describe('The chat uuid'),"isPersistent": zod.boolean(),"model": zod.string().nullish().describe('The model used to generate the chat'),@@ -1846,7 +1848,7 @@ export const getProjectContentHandlerResponse = zod.object({"type": zod.enum(['chat'])}),zod.object({"createdAt": zod.number().describe('The time the project was created'),- "deletedAt": zod.number().nullish().describe('The time the project was deleted'),+ "deletedAt": zod.number().nullable(),"id": zod.string().describe('The id of the project'),"name": zod.string().describe('The name of the project'),"parentId": zod.string().nullish().describe('The parent project id'),@@ -1919,7 +1921,7 @@ export const recentlyDeletedResponse = 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'),- "deletedAt": zod.number().nullish().describe('The time the document was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the document was deleted'),"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\nthe file type'),"fileType": zod.string().nullish().describe('The file type of the document (e.g. pdf, docx)'),@@ -1933,7 +1935,7 @@ export const recentlyDeletedResponse = zod.object({"type": zod.enum(['document'])}),zod.object({"createdAt": zod.number().describe('The time the chat was created'),- "deletedAt": zod.number().nullish().describe('The time the chat was deleted'),+ "deletedAt": zod.number().nullable().describe('The time the chat was deleted'),"id": zod.string().describe('The chat uuid'),"isPersistent": zod.boolean(),"model": zod.string().nullish().describe('The model used to generate the chat'),@@ -1945,7 +1947,7 @@ export const recentlyDeletedResponse = zod.object({"type": zod.enum(['chat'])}),zod.object({"createdAt": zod.number().describe('The time the project was created'),- "deletedAt": zod.number().nullish().describe('The time the project was deleted'),+ "deletedAt": zod.number().nullable(),"id": zod.string().describe('The id of the project'),"name": zod.string().describe('The name of the project'),"parentId": zod.string().nullish().describe('The parent project id'),diff --git a/js/app/packages/service-clients/service-storage/openapi.json b/js/app/packages/service-clients/service-storage/openapi.jsonindex 1b671cde9c..167231a63e 100644--- a/js/app/packages/service-clients/service-storage/openapi.json+++ b/js/app/packages/service-clients/service-storage/openapi.json@@ -4056,7 +4056,8 @@"owner","name","createdAt",- "updatedAt"+ "updatedAt",+ "deletedAt"],"properties": {"branchedFromId": {@@ -4191,7 +4192,8 @@"userId","createdAt","updatedAt",- "isPersistent"+ "isPersistent",+ "deletedAt"],"properties": {"createdAt": {@@ -6450,7 +6452,16 @@"PostSoupRequest": {"allOf": [{ "$ref": "#/components/schemas/EntityFilters" },- { "$ref": "#/components/schemas/Params" }+ { "$ref": "#/components/schemas/Params" },+ {+ "type": "object",+ "properties": {+ "emailView": {+ "type": "string",+ "description": "the view of specific emails to display"+ }+ }+ }]},"PreSaveDocumentRequest": {@@ -6502,18 +6513,21 @@},"Project": {"type": "object",- "required": ["id", "name", "userId", "createdAt", "updatedAt"],+ "required": [+ "id",+ "name",+ "userId",+ "createdAt",+ "updatedAt",+ "deletedAt"+ ],"properties": {"createdAt": {"type": "integer","format": "int64","description": "The time the project was created"},- "deletedAt": {- "type": ["integer", "null"],- "format": "int64",- "description": "The time the project was deleted"- },+ "deletedAt": { "type": ["integer", "null"], "format": "int64" },"id": { "type": "string", "description": "The id of the project" },"name": {"type": "string",diff --git a/js/app/packages/service-clients/service-storage/projects.ts b/js/app/packages/service-clients/service-storage/projects.tsindex b7b94ced2e..561c510a93 100644--- a/js/app/packages/service-clients/service-storage/projects.ts+++ b/js/app/packages/service-clients/service-storage/projects.ts@@ -170,6 +170,7 @@ export function useCreateProject() {type: 'project',userId: '',updatedAt: Date.now(),+ deletedAt: null,};// Optimistic update