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(email-service): FE types (#1222)

Evan Hutnik9a63b9c6820e
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/aPIThread.ts b/js/app/packages/service-clients/service-email/generated/schemas/aPIThread.ts
index 44b2f6e933..bfa27fe251 100644
--- a/js/app/packages/service-clients/service-email/generated/schemas/aPIThread.ts
+++ b/js/app/packages/service-clients/service-email/generated/schemas/aPIThread.ts
@@ -5,7 +5,6 @@
* OpenAPI spec version: 0.1.0
*/
import type { AccessLevel } from './accessLevel';
-import type { APIThreadDbId } from './aPIThreadDbId';
import type { APIThreadLatestInboundMessageTs } from './aPIThreadLatestInboundMessageTs';
import type { APIThreadLatestNonSpamMessageTs } from './aPIThreadLatestNonSpamMessageTs';
import type { APIThreadLatestOutboundMessageTs } from './aPIThreadLatestOutboundMessageTs';
@@ -18,7 +17,7 @@ import type { MessageWithBodyReplyless } from './messageWithBodyReplyless';
export interface APIThread {
access_level: AccessLevel;
created_at: string;
- db_id?: APIThreadDbId;
+ db_id: string;
inbox_visible: boolean;
is_read: boolean;
latest_inbound_message_ts?: APIThreadLatestInboundMessageTs;
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/aPIThreadDbId.ts b/js/app/packages/service-clients/service-email/generated/schemas/aPIThreadDbId.ts
deleted file mode 100644
index f3162a2030..0000000000
--- a/js/app/packages/service-clients/service-email/generated/schemas/aPIThreadDbId.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Generated by orval v7.13.0 🍺
- * Do not edit manually.
- * email_service
- * OpenAPI spec version: 0.1.0
- */
-
-export type APIThreadDbId = string | null;
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/attachment.ts b/js/app/packages/service-clients/service-email/generated/schemas/attachment.ts
index 1671cb0612..bfd54e0221 100644
--- a/js/app/packages/service-clients/service-email/generated/schemas/attachment.ts
+++ b/js/app/packages/service-clients/service-email/generated/schemas/attachment.ts
@@ -6,7 +6,6 @@
*/
import type { AttachmentContentId } from './attachmentContentId';
import type { AttachmentDataUrl } from './attachmentDataUrl';
-import type { AttachmentDbId } from './attachmentDbId';
import type { AttachmentFilename } from './attachmentFilename';
import type { AttachmentMimeType } from './attachmentMimeType';
import type { AttachmentProviderId } from './attachmentProviderId';
@@ -19,7 +18,7 @@ import type { AttachmentSizeBytes } from './attachmentSizeBytes';
export interface Attachment {
content_id?: AttachmentContentId;
data_url?: AttachmentDataUrl;
- db_id?: AttachmentDbId;
+ db_id: string;
filename?: AttachmentFilename;
mime_type?: AttachmentMimeType;
provider_id?: AttachmentProviderId;
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/attachmentDbId.ts b/js/app/packages/service-clients/service-email/generated/schemas/attachmentDbId.ts
deleted file mode 100644
index 09b4e64594..0000000000
--- a/js/app/packages/service-clients/service-email/generated/schemas/attachmentDbId.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Generated by orval v7.13.0 🍺
- * Do not edit manually.
- * email_service
- * OpenAPI spec version: 0.1.0
- */
-
-export type AttachmentDbId = string | null;
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/contact.ts b/js/app/packages/service-clients/service-email/generated/schemas/contact.ts
index 8d58ee77ce..98ba73072c 100644
--- a/js/app/packages/service-clients/service-email/generated/schemas/contact.ts
+++ b/js/app/packages/service-clients/service-email/generated/schemas/contact.ts
@@ -5,14 +5,13 @@
* OpenAPI spec version: 0.1.0
*/
import type { ContactEmailAddress } from './contactEmailAddress';
-import type { ContactId } from './contactId';
import type { ContactName } from './contactName';
import type { ContactOriginalPhotoUrl } from './contactOriginalPhotoUrl';
import type { ContactSfsPhotoUrl } from './contactSfsPhotoUrl';
export interface Contact {
email_address?: ContactEmailAddress;
- id?: ContactId;
+ id: string;
link_id: string;
name?: ContactName;
original_photo_url?: ContactOriginalPhotoUrl;
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/contactId.ts b/js/app/packages/service-clients/service-email/generated/schemas/contactId.ts
deleted file mode 100644
index fb1ddc4079..0000000000
--- a/js/app/packages/service-clients/service-email/generated/schemas/contactId.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Generated by orval v7.13.0 🍺
- * Do not edit manually.
- * email_service
- * OpenAPI spec version: 0.1.0
- */
-
-export type ContactId = string | null;
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/index.ts b/js/app/packages/service-clients/service-email/generated/schemas/index.ts
index 7c96b9bc34..5357897a4b 100644
--- a/js/app/packages/service-clients/service-email/generated/schemas/index.ts
+++ b/js/app/packages/service-clients/service-email/generated/schemas/index.ts
@@ -10,7 +10,6 @@ export * from './addDraftAttachmentRequest';
export * from './addDraftAttachmentResponse';
export * from './aPIEmailThreadPreviewMetadata';
export * from './aPIThread';
-export * from './aPIThreadDbId';
export * from './aPIThreadLatestInboundMessageTs';
export * from './aPIThreadLatestNonSpamMessageTs';
export * from './aPIThreadLatestOutboundMessageTs';
@@ -47,7 +46,6 @@ export * from './archiveThreadRequest';
export * from './attachment';
export * from './attachmentContentId';
export * from './attachmentDataUrl';
-export * from './attachmentDbId';
export * from './attachmentDraft';
export * from './attachmentFilename';
export * from './attachmentMimeType';
@@ -62,7 +60,6 @@ export * from './backfillJobThreadsRequestedLimit';
export * from './cancelBackfillParams';
export * from './contact';
export * from './contactEmailAddress';
-export * from './contactId';
export * from './contactInfo';
export * from './contactInfoLegacy';
export * from './contactInfoLegacyName';
@@ -114,7 +111,6 @@ export * from './message';
export * from './messageBodyHtmlSanitized';
export * from './messageBodyMacro';
export * from './messageBodyText';
-export * from './messageDbId';
export * from './messageFrom';
export * from './messageGlobalId';
export * from './messageHeadersJson';
@@ -129,7 +125,6 @@ export * from './messageSentAt';
export * from './messageSizeEstimate';
export * from './messageSnippet';
export * from './messageSubject';
-export * from './messageThreadDbId';
export * from './messageToSend';
export * from './messageToSendAttachments';
export * from './messageToSendBcc';
@@ -163,7 +158,6 @@ export * from './sendMessageResponse';
export * from './settings';
export * from './settingsSignatureOnRepliesForwards';
export * from './thread';
-export * from './threadDbId';
export * from './threadLatestInboundMessageTs';
export * from './threadLatestNonSpamMessageTs';
export * from './threadLatestOutboundMessageTs';
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/message.ts b/js/app/packages/service-clients/service-email/generated/schemas/message.ts
index 144f5cfc17..f0718d1b18 100644
--- a/js/app/packages/service-clients/service-email/generated/schemas/message.ts
+++ b/js/app/packages/service-clients/service-email/generated/schemas/message.ts
@@ -11,7 +11,6 @@ import type { Label } from './label';
import type { MessageBodyHtmlSanitized } from './messageBodyHtmlSanitized';
import type { MessageBodyMacro } from './messageBodyMacro';
import type { MessageBodyText } from './messageBodyText';
-import type { MessageDbId } from './messageDbId';
import type { MessageFrom } from './messageFrom';
import type { MessageGlobalId } from './messageGlobalId';
import type { MessageHeadersJson } from './messageHeadersJson';
@@ -25,7 +24,6 @@ import type { MessageSentAt } from './messageSentAt';
import type { MessageSizeEstimate } from './messageSizeEstimate';
import type { MessageSnippet } from './messageSnippet';
import type { MessageSubject } from './messageSubject';
-import type { MessageThreadDbId } from './messageThreadDbId';
export interface Message {
attachments: Attachment[];
@@ -37,7 +35,7 @@ export interface Message {
body_text?: MessageBodyText;
cc: ContactInfo[];
created_at: string;
- db_id?: MessageDbId;
+ db_id: string;
from?: MessageFrom;
/** The globally unique Message-ID header value created by the sender to uniquely identify this email
Used for threading across all providers (In-Reply-To header, References header) */
@@ -60,7 +58,7 @@ Used for threading across all providers (In-Reply-To header, References header)
size_estimate?: MessageSizeEstimate;
snippet?: MessageSnippet;
subject?: MessageSubject;
- thread_db_id?: MessageThreadDbId;
+ thread_db_id: string;
to: ContactInfo[];
updated_at: string;
}
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/messageDbId.ts b/js/app/packages/service-clients/service-email/generated/schemas/messageDbId.ts
deleted file mode 100644
index 0f75ba47c3..0000000000
--- a/js/app/packages/service-clients/service-email/generated/schemas/messageDbId.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Generated by orval v7.13.0 🍺
- * Do not edit manually.
- * email_service
- * OpenAPI spec version: 0.1.0
- */
-
-export type MessageDbId = string | null;
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/messageThreadDbId.ts b/js/app/packages/service-clients/service-email/generated/schemas/messageThreadDbId.ts
deleted file mode 100644
index 593ae4bca4..0000000000
--- a/js/app/packages/service-clients/service-email/generated/schemas/messageThreadDbId.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Generated by orval v7.13.0 🍺
- * Do not edit manually.
- * email_service
- * OpenAPI spec version: 0.1.0
- */
-
-export type MessageThreadDbId = string | null;
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/thread.ts b/js/app/packages/service-clients/service-email/generated/schemas/thread.ts
index d22f53ef09..9f0d2c61be 100644
--- a/js/app/packages/service-clients/service-email/generated/schemas/thread.ts
+++ b/js/app/packages/service-clients/service-email/generated/schemas/thread.ts
@@ -6,7 +6,6 @@
*/
import type { Message } from './message';
-import type { ThreadDbId } from './threadDbId';
import type { ThreadLatestInboundMessageTs } from './threadLatestInboundMessageTs';
import type { ThreadLatestNonSpamMessageTs } from './threadLatestNonSpamMessageTs';
import type { ThreadLatestOutboundMessageTs } from './threadLatestOutboundMessageTs';
@@ -14,7 +13,7 @@ import type { ThreadProviderId } from './threadProviderId';
export interface Thread {
created_at: string;
- db_id?: ThreadDbId;
+ db_id: string;
inbox_visible: boolean;
is_read: boolean;
latest_inbound_message_ts?: ThreadLatestInboundMessageTs;
diff --git a/js/app/packages/service-clients/service-email/generated/schemas/threadDbId.ts b/js/app/packages/service-clients/service-email/generated/schemas/threadDbId.ts
deleted file mode 100644
index dfb59f9723..0000000000
--- a/js/app/packages/service-clients/service-email/generated/schemas/threadDbId.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * Generated by orval v7.13.0 🍺
- * Do not edit manually.
- * email_service
- * OpenAPI spec version: 0.1.0
- */
-
-export type ThreadDbId = string | null;
diff --git a/js/app/packages/service-clients/service-email/openapi.json b/js/app/packages/service-clients/service-email/openapi.json
index 035e11bd8d..fc6a74e4cf 100644
--- a/js/app/packages/service-clients/service-email/openapi.json
+++ b/js/app/packages/service-clients/service-email/openapi.json
@@ -2003,6 +2003,7 @@
"type": "object",
"description": "Thread object exposed to the FE in Get Threads Call",
"required": [
+ "db_id",
"link_id",
"inbox_visible",
"is_read",
@@ -2020,7 +2021,7 @@
"format": "date-time"
},
"db_id": {
- "type": ["string", "null"],
+ "type": "string",
"format": "uuid"
},
"inbox_visible": {
@@ -2355,6 +2356,7 @@
"Attachment": {
"type": "object",
"description": "Attachments of a message, as sent to us by the provider.",
+ "required": ["db_id"],
"properties": {
"content_id": {
"type": ["string", "null"]
@@ -2363,7 +2365,7 @@
"type": ["string", "null"]
},
"db_id": {
- "type": ["string", "null"],
+ "type": "string",
"format": "uuid"
},
"filename": {
@@ -2515,13 +2517,13 @@
},
"Contact": {
"type": "object",
- "required": ["link_id"],
+ "required": ["id", "link_id"],
"properties": {
"email_address": {
"type": ["string", "null"]
},
"id": {
- "type": ["string", "null"],
+ "type": "string",
"format": "uuid"
},
"link_id": {
@@ -2923,6 +2925,8 @@
"Message": {
"type": "object",
"required": [
+ "db_id",
+ "thread_db_id",
"link_id",
"is_read",
"is_starred",
@@ -2978,7 +2982,7 @@
"format": "date-time"
},
"db_id": {
- "type": ["string", "null"],
+ "type": "string",
"format": "uuid"
},
"from": {
@@ -3066,7 +3070,7 @@
"type": ["string", "null"]
},
"thread_db_id": {
- "type": ["string", "null"],
+ "type": "string",
"format": "uuid"
},
"to": {
@@ -3329,6 +3333,7 @@
"Thread": {
"type": "object",
"required": [
+ "db_id",
"link_id",
"inbox_visible",
"is_read",
@@ -3342,7 +3347,7 @@
"format": "date-time"
},
"db_id": {
- "type": ["string", "null"],
+ "type": "string",
"format": "uuid"
},
"inbox_visible": {