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
chore: gen (#1207)
Will Hutchinsoncdafa863317a
diff --git a/.github/workflows/web-app-check-main.yml b/.github/workflows/web-app-check-main.ymlindex 5f238cabf8..565652608f 100644--- a/.github/workflows/web-app-check-main.yml+++ b/.github/workflows/web-app-check-main.yml@@ -33,7 +33,8 @@ jobs:typescript:needs: path-check- if: needs.path-check.outputs.should_run == 'true'+ # Run the type check if rust code or frontend code has changed.+ if: needs.path-check.outputs.should_run == 'true' || needs.path-check.outputs.api_changed == 'true'name: Typecheckruns-on: linux-latest-beefysteps:diff --git a/js/app/packages/block-chat/definition.ts b/js/app/packages/block-chat/definition.tsindex 00b0227a08..47a04068e1 100644--- a/js/app/packages/block-chat/definition.ts+++ b/js/app/packages/block-chat/definition.ts@@ -52,6 +52,7 @@ export const definition = defineBlock({owner: chat.chat.userId,createdAt: chat.chat.createdAt,updatedAt: chat.chat.updatedAt,+ deletedAt: null,fileType: 'chat' as any,} satisfies DocumentMetadata,});diff --git a/js/app/packages/service-clients/service-cognition/generated/tools/types.ts b/js/app/packages/service-clients/service-cognition/generated/tools/types.tsindex 30a69dcc13..c49ead71db 100644--- a/js/app/packages/service-clients/service-cognition/generated/tools/types.ts+++ b/js/app/packages/service-clients/service-cognition/generated/tools/types.ts@@ -857,7 +857,7 @@ export interface NameSearch {/*** Read content by ID(s). Supports reading documents, channels, chats, and emails by their respective IDs. Use this tool when you need to retrieve the full content of a specific item(s).- * Channel transcripts only include 300 messages. Use 'messages_since' to see messages in a different time window.+ * Channel transcripts only include the latest 150 messages. Use 'messages_since' to see messages in a different time window.*/export interface Read {/**diff --git a/js/app/packages/service-clients/service-static-files/generated/client.ts b/js/app/packages/service-clients/service-static-files/generated/client.tsindex a4adb0b58a..4e6daf11e5 100644--- a/js/app/packages/service-clients/service-static-files/generated/client.ts+++ b/js/app/packages/service-clients/service-static-files/generated/client.ts@@ -4,7 +4,14 @@* static_file_service* OpenAPI spec version: 0.1.0*/-import type { FileMetadata, PutFileRequest, PutFileResponse } from './schemas';+import type {+ BulkDeleteRequest,+ BulkDeleteResponse,+ ErrorResponse,+ FileMetadata,+ PutFileRequest,+ PutFileResponse,+} from './schemas';export type putPresignedUrlResponse200 = {data: PutFileResponse;@@ -60,6 +67,78 @@ export const putPresignedUrl = async (} as putPresignedUrlResponse;};+/**+ * @summary Bulk delete files.+ */+export type handleBulkDeleteFileResponse200 = {+ data: BulkDeleteResponse;+ status: 200;+};++export type handleBulkDeleteFileResponse400 = {+ data: ErrorResponse;+ status: 400;+};++export type handleBulkDeleteFileResponse401 = {+ data: ErrorResponse;+ status: 401;+};++export type handleBulkDeleteFileResponse403 = {+ data: ErrorResponse;+ status: 403;+};++export type handleBulkDeleteFileResponse500 = {+ data: ErrorResponse;+ status: 500;+};++export type handleBulkDeleteFileResponseSuccess =+ handleBulkDeleteFileResponse200 & {+ headers: Headers;+ };+export type handleBulkDeleteFileResponseError = (+ | handleBulkDeleteFileResponse400+ | handleBulkDeleteFileResponse401+ | handleBulkDeleteFileResponse403+ | handleBulkDeleteFileResponse500+) & {+ headers: Headers;+};++export type handleBulkDeleteFileResponse =+ | handleBulkDeleteFileResponseSuccess+ | handleBulkDeleteFileResponseError;++export const getHandleBulkDeleteFileUrl = () => {+ return `/api/file/bulk-delete`;+};++export const handleBulkDeleteFile = async (+ bulkDeleteRequest: BulkDeleteRequest,+ options?: RequestInit+): Promise<handleBulkDeleteFileResponse> => {+ const res = await fetch(getHandleBulkDeleteFileUrl(), {+ ...options,+ method: 'POST',+ headers: { 'Content-Type': 'application/json', ...options?.headers },+ body: JSON.stringify(bulkDeleteRequest),+ });++ const body = [204, 205, 304].includes(res.status) ? null : await res.text();++ const data: handleBulkDeleteFileResponse['data'] = body+ ? JSON.parse(body)+ : {};+ return {+ data,+ status: res.status,+ headers: res.headers,+ } as handleBulkDeleteFileResponse;+};+export type handleGetMetadataResponse200 = {data: FileMetadata;status: 200;diff --git a/js/app/packages/service-clients/service-static-files/generated/schemas/bulkDeleteRequest.ts b/js/app/packages/service-clients/service-static-files/generated/schemas/bulkDeleteRequest.tsnew file mode 100644index 0000000000..6cbc6cb878--- /dev/null+++ b/js/app/packages/service-clients/service-static-files/generated/schemas/bulkDeleteRequest.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.13.0 🍺+ * Do not edit manually.+ * static_file_service+ * OpenAPI spec version: 0.1.0+ */++export interface BulkDeleteRequest {+ /** List of file IDs to delete */+ file_ids: string[];+}diff --git a/js/app/packages/service-clients/service-static-files/generated/schemas/bulkDeleteResponse.ts b/js/app/packages/service-clients/service-static-files/generated/schemas/bulkDeleteResponse.tsnew file mode 100644index 0000000000..0ac3e2bd30--- /dev/null+++ b/js/app/packages/service-clients/service-static-files/generated/schemas/bulkDeleteResponse.ts@@ -0,0 +1,27 @@+/**+ * Generated by orval v7.13.0 🍺+ * Do not edit manually.+ * static_file_service+ * OpenAPI spec version: 0.1.0+ */+import type { DeleteResult } from './deleteResult';++export interface BulkDeleteResponse {+ /**+ * Number of failed deletions+ * @minimum 0+ */+ failed: number;+ /** Individual results for each file */+ results: DeleteResult[];+ /**+ * Number of successful deletions+ * @minimum 0+ */+ succeeded: number;+ /**+ * Total number of files attempted+ * @minimum 0+ */+ total: number;+}diff --git a/js/app/packages/service-clients/service-static-files/generated/schemas/deleteResult.ts b/js/app/packages/service-clients/service-static-files/generated/schemas/deleteResult.tsnew file mode 100644index 0000000000..1c56dcbb0a--- /dev/null+++ b/js/app/packages/service-clients/service-static-files/generated/schemas/deleteResult.ts@@ -0,0 +1,16 @@+/**+ * Generated by orval v7.13.0 🍺+ * Do not edit manually.+ * static_file_service+ * OpenAPI spec version: 0.1.0+ */+import type { DeleteResultError } from './deleteResultError';++export interface DeleteResult {+ /** Error message if deletion failed */+ error?: DeleteResultError;+ /** File ID that was attempted to delete */+ file_id: string;+ /** Whether the deletion was successful */+ success: boolean;+}diff --git a/js/app/packages/service-clients/service-static-files/generated/schemas/deleteResultError.ts b/js/app/packages/service-clients/service-static-files/generated/schemas/deleteResultError.tsnew file mode 100644index 0000000000..0ddc7c6a4d--- /dev/null+++ b/js/app/packages/service-clients/service-static-files/generated/schemas/deleteResultError.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.13.0 🍺+ * Do not edit manually.+ * static_file_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Error message if deletion failed+ */+export type DeleteResultError = string | null;diff --git a/js/app/packages/service-clients/service-static-files/generated/schemas/errorResponse.ts b/js/app/packages/service-clients/service-static-files/generated/schemas/errorResponse.tsnew file mode 100644index 0000000000..b611ac5abf--- /dev/null+++ b/js/app/packages/service-clients/service-static-files/generated/schemas/errorResponse.ts@@ -0,0 +1,15 @@+/**+ * Generated by orval v7.13.0 🍺+ * Do not edit manually.+ * static_file_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * A plain old json error response for use with axum.+yup, thats it.+ */+export interface ErrorResponse {+ /** Message to explain failure */+ message: string;+}diff --git a/js/app/packages/service-clients/service-static-files/generated/schemas/index.ts b/js/app/packages/service-clients/service-static-files/generated/schemas/index.tsindex 1f709fbd7e..4656acebbb 100644--- a/js/app/packages/service-clients/service-static-files/generated/schemas/index.ts+++ b/js/app/packages/service-clients/service-static-files/generated/schemas/index.ts@@ -5,6 +5,11 @@* OpenAPI spec version: 0.1.0*/+export * from './bulkDeleteRequest';+export * from './bulkDeleteResponse';+export * from './deleteResult';+export * from './deleteResultError';+export * from './errorResponse';export * from './fileMetadata';export * from './putFileRequest';export * from './putFileRequestContentType';diff --git a/js/app/packages/service-clients/service-static-files/openapi.json b/js/app/packages/service-clients/service-static-files/openapi.jsonindex dbecd9f219..34e190b651 100644--- a/js/app/packages/service-clients/service-static-files/openapi.json+++ b/js/app/packages/service-clients/service-static-files/openapi.json@@ -58,6 +58,75 @@}}},+ "/api/file/bulk-delete": {+ "post": {+ "tags": ["file::bulk_delete_file"],+ "summary": "Bulk delete files.",+ "operationId": "handle_bulk_delete_file",+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/BulkDeleteRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "Bulk delete results",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/BulkDeleteResponse"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "403": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },"/api/file/metadata/{file_id}": {"get": {"tags": ["file::metadata"],@@ -206,6 +275,76 @@},"components": {"schemas": {+ "BulkDeleteRequest": {+ "type": "object",+ "required": ["file_ids"],+ "properties": {+ "file_ids": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "List of file IDs to delete"+ }+ }+ },+ "BulkDeleteResponse": {+ "type": "object",+ "required": ["total", "succeeded", "failed", "results"],+ "properties": {+ "failed": {+ "type": "integer",+ "description": "Number of failed deletions",+ "minimum": 0+ },+ "results": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/DeleteResult"+ },+ "description": "Individual results for each file"+ },+ "succeeded": {+ "type": "integer",+ "description": "Number of successful deletions",+ "minimum": 0+ },+ "total": {+ "type": "integer",+ "description": "Total number of files attempted",+ "minimum": 0+ }+ }+ },+ "DeleteResult": {+ "type": "object",+ "required": ["file_id", "success"],+ "properties": {+ "error": {+ "type": ["string", "null"],+ "description": "Error message if deletion failed"+ },+ "file_id": {+ "type": "string",+ "description": "File ID that was attempted to delete"+ },+ "success": {+ "type": "boolean",+ "description": "Whether the deletion was successful"+ }+ }+ },+ "ErrorResponse": {+ "type": "object",+ "description": "A plain old json error response for use with axum.\nyup, thats it.",+ "required": ["message"],+ "properties": {+ "message": {+ "type": "string",+ "description": "Message to explain failure"+ }+ }+ },"FileMetadata": {"type": "object","description": "File metadata for static files",