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.

fix: remove isTask (#495)

Will Hutchinson13d95c254942
diff --git a/js/app/packages/block-chat/definition.ts b/js/app/packages/block-chat/definition.ts
index bbabd40f60..8a34069716 100644
--- a/js/app/packages/block-chat/definition.ts
+++ b/js/app/packages/block-chat/definition.ts
@@ -50,7 +50,6 @@ export const definition = defineBlock({
createdAt: chat.chat.createdAt,
updatedAt: chat.chat.updatedAt,
fileType: 'chat' as any,
- isTask: false,
} satisfies DocumentMetadata,
});
}
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.ts
index 2c7f68867e..85b5d6bf73 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
@@ -11,6 +11,7 @@ import type { BasicDocumentDocumentFamilyId } from './basicDocumentDocumentFamil
import type { BasicDocumentFileType } from './basicDocumentFileType';
import type { BasicDocumentProjectId } from './basicDocumentProjectId';
import type { BasicDocumentSha } from './basicDocumentSha';
+import type { BasicDocumentSubType } from './basicDocumentSubType';
import type { BasicDocumentType } from './basicDocumentType';
export interface BasicDocument {
@@ -34,9 +35,6 @@ the file type */
fileType?: BasicDocumentFileType;
/** The document id */
id: string;
- /** Whether or not the document is a task.
-This is only applicable for md documents. */
- isTask: boolean;
/** The name of the document */
name: string;
/** The owner of the document */
@@ -46,6 +44,7 @@ This is only applicable for md documents. */
/** If the document is a PDF, this is the SHA of the pdf
If the document is a DOCX, this will not be present */
sha?: BasicDocumentSha;
+ subType?: BasicDocumentSubType;
/** The time the document instance / document BOM was updated */
updatedAt: number;
type: BasicDocumentType;
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/basicDocumentSubType.ts b/js/app/packages/service-clients/service-storage/generated/schemas/basicDocumentSubType.ts
new file mode 100644
index 0000000000..03cda11227
--- /dev/null
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/basicDocumentSubType.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 { DocumentSubType } from './documentSubType';
+
+export type BasicDocumentSubType = null | DocumentSubType;
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/documentMetadata.ts b/js/app/packages/service-clients/service-storage/generated/schemas/documentMetadata.ts
index 44442c721b..1d22049149 100644
--- a/js/app/packages/service-clients/service-storage/generated/schemas/documentMetadata.ts
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/documentMetadata.ts
@@ -12,6 +12,7 @@ import type { DocumentMetadataFileType } from './documentMetadataFileType';
import type { DocumentMetadataProjectId } from './documentMetadataProjectId';
import type { DocumentMetadataProjectName } from './documentMetadataProjectName';
import type { DocumentMetadataSha } from './documentMetadataSha';
+import type { DocumentMetadataSubType } from './documentMetadataSubType';
export interface DocumentMetadata {
/** The id of the document this document branched from */
@@ -36,9 +37,6 @@ the file type */
documentVersionId: number;
/** The file type of the document (file extension) */
fileType?: DocumentMetadataFileType;
- /** Whether or not the document is a task.
-This is only applicable for md documents. */
- isTask: boolean;
/** The modification data for the document instance.
This is only used for PDF documents. */
modificationData?: unknown;
@@ -51,6 +49,7 @@ This is only used for PDF documents. */
/** If the document is a PDF, this is the SHA of the pdf
If the document is a DOCX, this will not be present */
sha?: DocumentMetadataSha;
+ subType?: DocumentMetadataSubType;
/** The time the document instance / document BOM was updated */
updatedAt: number;
}
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/documentMetadataSubType.ts b/js/app/packages/service-clients/service-storage/generated/schemas/documentMetadataSubType.ts
new file mode 100644
index 0000000000..afa154ad3f
--- /dev/null
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/documentMetadataSubType.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 { DocumentSubType } from './documentSubType';
+
+export type DocumentMetadataSubType = null | DocumentSubType;
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/documentPreviewData.ts b/js/app/packages/service-clients/service-storage/generated/schemas/documentPreviewData.ts
index e4e82b7ebf..f2216f7776 100644
--- a/js/app/packages/service-clients/service-storage/generated/schemas/documentPreviewData.ts
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/documentPreviewData.ts
@@ -5,6 +5,7 @@
* OpenAPI spec version: 0.1.0
*/
import type { DocumentPreviewDataFileType } from './documentPreviewDataFileType';
+import type { DocumentPreviewDataSubType } from './documentPreviewDataSubType';
export interface DocumentPreviewData {
/** The document id */
@@ -13,11 +14,9 @@ export interface DocumentPreviewData {
document_name: string;
/** The file type of the document (e.g. pdf, docx) */
file_type?: DocumentPreviewDataFileType;
- /** Whether or not the document is a task.
-This is only applicable for md documents. */
- is_task: boolean;
/** The id of the owner of the document */
owner: string;
+ sub_type?: DocumentPreviewDataSubType;
/** The time the document was last updated */
updated_at: number;
}
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/documentPreviewDataSubType.ts b/js/app/packages/service-clients/service-storage/generated/schemas/documentPreviewDataSubType.ts
new file mode 100644
index 0000000000..76eaf4f9b6
--- /dev/null
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/documentPreviewDataSubType.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 { DocumentSubType } from './documentSubType';
+
+export type DocumentPreviewDataSubType = null | DocumentSubType;
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/documentResponseMetadata.ts b/js/app/packages/service-clients/service-storage/generated/schemas/documentResponseMetadata.ts
index 53c49d4740..553fc8eaca 100644
--- a/js/app/packages/service-clients/service-storage/generated/schemas/documentResponseMetadata.ts
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/documentResponseMetadata.ts
@@ -10,6 +10,7 @@ import type { DocumentResponseMetadataDocumentBom } from './documentResponseMeta
import type { DocumentResponseMetadataDocumentFamilyId } from './documentResponseMetadataDocumentFamilyId';
import type { DocumentResponseMetadataFileType } from './documentResponseMetadataFileType';
import type { DocumentResponseMetadataSha } from './documentResponseMetadataSha';
+import type { DocumentResponseMetadataSubType } from './documentResponseMetadataSubType';
export interface DocumentResponseMetadata {
/** The id of the document this document branched from */
@@ -34,9 +35,6 @@ the file type */
documentVersionId: number;
/** The file type of the document */
fileType?: DocumentResponseMetadataFileType;
- /** Whether or not the document is a task.
-This is only applicable for md documents. */
- isTask: boolean;
/** The modification data for the document instance.
This is only used for PDF documents. */
modificationData?: unknown;
@@ -45,6 +43,7 @@ This is only used for PDF documents. */
/** If the document is a PDF, this is the SHA of the pdf
If the document is a DOCX, this will not be present */
sha?: DocumentResponseMetadataSha;
+ subType?: DocumentResponseMetadataSubType;
/** The time the document instance / document BOM was updated */
updatedAt: number;
}
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/documentResponseMetadataSubType.ts b/js/app/packages/service-clients/service-storage/generated/schemas/documentResponseMetadataSubType.ts
new file mode 100644
index 0000000000..92b8fd3ec9
--- /dev/null
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/documentResponseMetadataSubType.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 { DocumentSubType } from './documentSubType';
+
+export type DocumentResponseMetadataSubType = null | DocumentSubType;
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/documentSubType.ts b/js/app/packages/service-clients/service-storage/generated/schemas/documentSubType.ts
new file mode 100644
index 0000000000..ecaf7a5371
--- /dev/null
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/documentSubType.ts
@@ -0,0 +1,18 @@
+/**
+ * Generated by orval v7.13.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * The document sub type enum represents all values of document sub types.
+These values should match the `document_sub_type_value` table in macrodb.
+ */
+export type DocumentSubType = typeof DocumentSubType[keyof typeof DocumentSubType];
+
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const DocumentSubType = {
+ task: 'task',
+} as const;
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.ts
index 98cab209e4..9bcddcf03c 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
@@ -47,6 +47,7 @@ export * from './basicDocumentDocumentFamilyId';
export * from './basicDocumentFileType';
export * from './basicDocumentProjectId';
export * from './basicDocumentSha';
+export * from './basicDocumentSubType';
export * from './basicDocumentType';
export * from './bomPart';
export * from './channelFilters';
@@ -142,6 +143,7 @@ export * from './documentMetadataFileType';
export * from './documentMetadataProjectId';
export * from './documentMetadataProjectName';
export * from './documentMetadataSha';
+export * from './documentMetadataSubType';
export * from './documentPermissionsToken';
export * from './documentPermissionsTokenRequest';
export * from './documentPermissionsTokenResponse';
@@ -149,6 +151,7 @@ export * from './documentPermissionsTokenUserId';
export * from './documentPreview';
export * from './documentPreviewData';
export * from './documentPreviewDataFileType';
+export * from './documentPreviewDataSubType';
export * from './documentPreviewOneOf';
export * from './documentPreviewOneOfAllOf';
export * from './documentPreviewOneOfAllOfType';
@@ -166,8 +169,10 @@ export * from './documentResponseMetadataDocumentBom';
export * from './documentResponseMetadataDocumentFamilyId';
export * from './documentResponseMetadataFileType';
export * from './documentResponseMetadataSha';
+export * from './documentResponseMetadataSubType';
export * from './documentResponsePresignedUrl';
export * from './documentStorageServiceApiVersion';
+export * from './documentSubType';
export * from './editAnchorRequest';
export * from './editAnchorRequestOneOf';
export * from './editAnchorRequestOneOfAllOf';
@@ -377,6 +382,7 @@ export * from './soupDocumentDocumentFamilyId';
export * from './soupDocumentFileType';
export * from './soupDocumentProjectId';
export * from './soupDocumentSha';
+export * from './soupDocumentSubType';
export * from './soupDocumentViewedAt';
export * from './soupEmailThreadPreview';
export * from './soupEmailThreadPreviewMetadata';
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/soupDocument.ts b/js/app/packages/service-clients/service-storage/generated/schemas/soupDocument.ts
index b5e90c8556..59feec8b7b 100644
--- a/js/app/packages/service-clients/service-storage/generated/schemas/soupDocument.ts
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/soupDocument.ts
@@ -10,6 +10,7 @@ import type { SoupDocumentDocumentFamilyId } from './soupDocumentDocumentFamilyI
import type { SoupDocumentFileType } from './soupDocumentFileType';
import type { SoupDocumentProjectId } from './soupDocumentProjectId';
import type { SoupDocumentSha } from './soupDocumentSha';
+import type { SoupDocumentSubType } from './soupDocumentSubType';
import type { SoupDocumentViewedAt } from './soupDocumentViewedAt';
export interface SoupDocument {
@@ -29,9 +30,6 @@ This could be the document_instance_id or document_bom_id depending on the file
fileType?: SoupDocumentFileType;
/** The document id */
id: string;
- /** Whether or not the document is a task.
-This is only applicable for md documents. */
- isTask: boolean;
/** The name of the document */
name: string;
/** The owner of the document */
@@ -41,6 +39,7 @@ This is only applicable for md documents. */
/** If the document is a PDF, this is the SHA of the pdf
If the document is a DOCX, this will not be present */
sha?: SoupDocumentSha;
+ subType?: SoupDocumentSubType;
/** The time the document instance / document BOM was updated */
updatedAt: number;
/** The time the document was last viewed */
diff --git a/js/app/packages/service-clients/service-storage/generated/schemas/soupDocumentSubType.ts b/js/app/packages/service-clients/service-storage/generated/schemas/soupDocumentSubType.ts
new file mode 100644
index 0000000000..0a6e7055e6
--- /dev/null
+++ b/js/app/packages/service-clients/service-storage/generated/schemas/soupDocumentSubType.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 { DocumentSubType } from './documentSubType';
+
+export type SoupDocumentSubType = null | DocumentSubType;
diff --git a/js/app/packages/service-clients/service-storage/generated/zod.ts b/js/app/packages/service-clients/service-storage/generated/zod.ts
index b384d37f0e..edcc9fb372 100644
--- a/js/app/packages/service-clients/service-storage/generated/zod.ts
+++ b/js/app/packages/service-clients/service-storage/generated/zod.ts
@@ -31,11 +31,11 @@ export const getRecentActivityHandlerResponse = zod.object({
"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)'),
"id": zod.string().describe('The document id'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"name": zod.string().describe('The name of the document'),
"owner": 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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated'),
"type": zod.enum(['document'])
})
@@ -550,12 +550,12 @@ export const getUserDocumentsHandlerResponse = zod.object({
"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)'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated')
})),
"next_offset": zod.number().nullish().describe('The next offset to be used if there is one'),
@@ -601,10 +601,10 @@ export const createDocumentHandlerResponse = zod.object({
"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'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"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'),
"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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated')
}),
"presignedUrl": zod.string().nullish()
@@ -707,8 +707,8 @@ export const getBatchPreviewHandlerResponse = zod.object({
"document_id": zod.string().describe('The document id'),
"document_name": zod.string().describe('The name of the document'),
"file_type": zod.string().nullish().describe('The file type of the document (e.g. pdf, docx)'),
- "is_task": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"owner": zod.string().describe('The id of the owner of the document'),
+ "sub_type": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updated_at": zod.number().describe('The time the document was last updated')
}).and(zod.object({
"type": zod.enum(['access'])
@@ -747,12 +747,12 @@ export const getDocumentResponse = zod.object({
"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)'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated')
}),
"userAccessLevel": zod.enum(['view', 'comment', 'edit', 'owner']).describe('Ordered from least to most access top -> bottom'),
@@ -794,10 +794,10 @@ export const saveDocumentHandlerResponse = zod.object({
"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'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"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'),
"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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated')
}),
"presignedUrl": zod.string().nullish().describe('If the document is an editable file, we provide a presigned url to save the updated file to.')
@@ -861,12 +861,12 @@ export const copyDocumentHandlerResponse = zod.object({
"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)'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated')
}),
"userAccessLevel": zod.enum(['view', 'comment', 'edit', 'owner']).describe('Ordered from least to most access top -> bottom'),
@@ -999,10 +999,10 @@ export const simpleSaveResponse = zod.object({
"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'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"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'),
"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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated')
}),
"presignedUrl": zod.string().nullish().describe('If the document is an editable file, we provide a presigned url to save the updated file to.')
@@ -1048,12 +1048,12 @@ export const getDocumentVersionResponse = zod.object({
"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)'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated')
}),
"userAccessLevel": zod.enum(['view', 'comment', 'edit', 'owner']).describe('Ordered from least to most access top -> bottom'),
@@ -1076,11 +1076,11 @@ export const getHistoryHandlerResponse = zod.object({
"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)'),
"id": zod.string().describe('The document id'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"name": zod.string().describe('The name of the document'),
"owner": 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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated'),
"type": zod.enum(['document'])
}),zod.object({
@@ -1180,11 +1180,11 @@ export const getItemsSoupResponse = zod.object({
"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().uuid().describe('The document id'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"name": zod.string().describe('The name of the document'),
"ownerId": zod.string().describe('The owner of the document'),
"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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"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')
}),
@@ -1336,11 +1336,11 @@ export const postItemsSoupResponse = zod.object({
"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().uuid().describe('The document id'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"name": zod.string().describe('The name of the document'),
"ownerId": zod.string().describe('The owner of the document'),
"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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"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')
}),
@@ -1465,11 +1465,11 @@ export const getPinsHandlerResponse = zod.object({
"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)'),
"id": zod.string().describe('The document id'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"name": zod.string().describe('The name of the document'),
"owner": 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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated'),
"type": zod.enum(['document'])
}),zod.object({
@@ -1503,11 +1503,11 @@ export const getPinsHandlerResponse = zod.object({
"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)'),
"id": zod.string().describe('The document id'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"name": zod.string().describe('The name of the document'),
"owner": 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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated'),
"type": zod.enum(['document'])
}),zod.object({
@@ -1825,11 +1825,11 @@ export const getProjectContentHandlerResponse = zod.object({
"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)'),
"id": zod.string().describe('The document id'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"name": zod.string().describe('The name of the document'),
"owner": 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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated'),
"type": zod.enum(['document'])
}),zod.object({
@@ -1924,11 +1924,11 @@ export const recentlyDeletedResponse = zod.object({
"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)'),
"id": zod.string().describe('The document id'),
- "isTask": zod.boolean().describe('Whether or not the document is a task.\nThis is only applicable for md documents.'),
"name": zod.string().describe('The name of the document'),
"owner": 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'),
+ "subType": zod.union([zod.null(),zod.enum(['task']).describe('The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.')]).optional(),
"updatedAt": zod.number().describe('The time the document instance / document BOM was updated'),
"type": zod.enum(['document'])
}),zod.object({
diff --git a/js/app/packages/service-clients/service-storage/openapi.json b/js/app/packages/service-clients/service-storage/openapi.json
index ac9539c3a7..1b671cde9c 100644
--- a/js/app/packages/service-clients/service-storage/openapi.json
+++ b/js/app/packages/service-clients/service-storage/openapi.json
@@ -4056,8 +4056,7 @@
"owner",
"name",
"createdAt",
- "updatedAt",
- "isTask"
+ "updatedAt"
],
"properties": {
"branchedFromId": {
@@ -4094,10 +4093,6 @@
"description": "The file type of the document (e.g. pdf, docx)"
},
"id": { "type": "string", "description": "The document id" },
- "isTask": {
- "type": "boolean",
- "description": "Whether or not the document is a task.\nThis is only applicable for md documents."
- },
"name": {
"type": "string",
"description": "The name of the document"
@@ -4114,6 +4109,15 @@
"type": ["string", "null"],
"description": "If the document is a PDF, this is the SHA of the pdf\nIf the document is a DOCX, this will not be present"
},
+ "subType": {
+ "oneOf": [
+ { "type": "null" },
+ {
+ "$ref": "#/components/schemas/DocumentSubType",
+ "description": "The sub type of the document if present."
+ }
+ ]
+ },
"updatedAt": {
"type": "integer",
"format": "int64",
@@ -4669,8 +4673,7 @@
"owner",
"documentName",
"createdAt",
- "updatedAt",
- "isTask"
+ "updatedAt"
],
"properties": {
"branchedFromId": {
@@ -4711,10 +4714,6 @@
"type": ["string", "null"],
"description": "The file type of the document (file extension)"
},
- "isTask": {
- "type": "boolean",
- "description": "Whether or not the document is a task.\nThis is only applicable for md documents."
- },
"modificationData": {
"description": "The modification data for the document instance.\nThis is only used for PDF documents."
},
@@ -4734,6 +4733,15 @@
"type": ["string", "null"],
"description": "If the document is a PDF, this is the SHA of the pdf\nIf the document is a DOCX, this will not be present"
},
+ "subType": {
+ "oneOf": [
+ { "type": "null" },
+ {
+ "$ref": "#/components/schemas/DocumentSubType",
+ "description": "The sub type of the document if present."
+ }
+ ]
+ },
"updatedAt": {
"type": "integer",
"format": "int64",
@@ -4824,13 +4832,7 @@
},
"DocumentPreviewData": {
"type": "object",
- "required": [
- "document_id",
- "document_name",
- "owner",
- "updated_at",
- "is_task"
- ],
+ "required": ["document_id", "document_name", "owner", "updated_at"],
"properties": {
"document_id": { "type": "string", "description": "The document id" },
"document_name": {
@@ -4841,14 +4843,19 @@
"type": ["string", "null"],
"description": "The file type of the document (e.g. pdf, docx)"
},
- "is_task": {
- "type": "boolean",
- "description": "Whether or not the document is a task.\nThis is only applicable for md documents."
- },
"owner": {
"type": "string",
"description": "The id of the owner of the document"
},
+ "sub_type": {
+ "oneOf": [
+ { "type": "null" },
+ {
+ "$ref": "#/components/schemas/DocumentSubType",
+ "description": "The sub type of the document if present."
+ }
+ ]
+ },
"updated_at": {
"type": "integer",
"format": "int64",
@@ -4874,8 +4881,7 @@
"owner",
"documentName",
"createdAt",
- "updatedAt",
- "isTask"
+ "updatedAt"
],
"properties": {
"branchedFromId": {
@@ -4916,10 +4922,6 @@
"type": ["string", "null"],
"description": "The file type of the document"
},
- "isTask": {
- "type": "boolean",
- "description": "Whether or not the document is a task.\nThis is only applicable for md documents."
- },
"modificationData": {
"description": "The modification data for the document instance.\nThis is only used for PDF documents."
},
@@ -4931,6 +4933,15 @@
"type": ["string", "null"],
"description": "If the document is a PDF, this is the SHA of the pdf\nIf the document is a DOCX, this will not be present"
},
+ "subType": {
+ "oneOf": [
+ { "type": "null" },
+ {
+ "$ref": "#/components/schemas/DocumentSubType",
+ "description": "The sub type of the document if present."
+ }
+ ]
+ },
"updatedAt": {
"type": "integer",
"format": "int64",
@@ -4942,6 +4953,11 @@
"type": "string",
"enum": ["v1", "v2"]
},
+ "DocumentSubType": {
+ "type": "string",
+ "description": "The document sub type enum represents all values of document sub types.\nThese values should match the `document_sub_type_value` table in macrodb.",
+ "enum": ["task"]
+ },
"EditAnchorRequest": {
"oneOf": [
{
@@ -6841,8 +6857,7 @@
"name",
"createdAt",
"updatedAt",
- "viewedAt",
- "isTask"
+ "viewedAt"
],
"properties": {
"branchedFromId": {
@@ -6879,10 +6894,6 @@
"format": "uuid",
"description": "The document id"
},
- "isTask": {
- "type": "boolean",
- "description": "Whether or not the document is a task.\nThis is only applicable for md documents."
- },
"name": {
"type": "string",
"description": "The name of the document"
@@ -6900,6 +6911,15 @@
"type": ["string", "null"],
"description": "If the document is a PDF, this is the SHA of the pdf\nIf the document is a DOCX, this will not be present"
},
+ "subType": {
+ "oneOf": [
+ { "type": "null" },
+ {
+ "$ref": "#/components/schemas/DocumentSubType",
+ "description": "The sub type of the document if present."
+ }
+ ]
+ },
"updatedAt": {
"type": "integer",
"format": "int64",