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
update entity types (#4662)
Sean Aye407449710a74
diff --git a/js/app/packages/service-clients/service-storage/graphql/generated/graphql.ts b/js/app/packages/service-clients/service-storage/graphql/generated/graphql.tsindex 57a786d829..d807028ffb 100644--- a/js/app/packages/service-clients/service-storage/graphql/generated/graphql.ts+++ b/js/app/packages/service-clients/service-storage/graphql/generated/graphql.ts@@ -335,6 +335,8 @@ export type GraphqlSoupEntityType =| 'CHAT'/** CRM company entity. */| 'CRM_COMPANY'+ /** crm contact */+ | 'CRM_CONTACT'/** Document entity. */| 'DOCUMENT'/** Email thread entity. */@@ -343,8 +345,12 @@ export type GraphqlSoupEntityType =| 'FOREIGN_ENTITY'/** Project entity. */| 'PROJECT'- /** Unknown or unsupported entity type. */- | 'UNKNOWN';+ /** Static File */+ | 'STATIC_FILE'+ /** Team entity */+ | 'TEAM'+ /** User entity */+ | 'USER';export type GraphqlSoupPropertyEntityType =| 'CHANNEL'@@ -384,15 +390,15 @@ export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null,| { __typename: 'GraphqlSoupCall', id: string, channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }> }| { __typename: 'GraphqlSoupChannel', id: string, channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null }| { __typename: 'GraphqlSoupChannelThread', id: string, channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number }- | { __typename: 'GraphqlSoupChat', id: string, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, chatName: string, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: string | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }- | { __typename: 'GraphqlSoupCrmCompany', id: string, description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: string | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }- | { __typename: 'GraphqlSoupDocument', id: string, ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, documentName: string, subType: { kind: string, isCompleted: boolean | null } | null, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: string | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }- | { __typename: 'GraphqlSoupEmailThread', id: string, providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, emailName: string | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: string | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }+ | { __typename: 'GraphqlSoupChat', id: string, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, chatName: string, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }+ | { __typename: 'GraphqlSoupCrmCompany', id: string, description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }+ | { __typename: 'GraphqlSoupDocument', id: string, ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, documentName: string, subType: { kind: string, isCompleted: boolean | null } | null, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }+ | { __typename: 'GraphqlSoupEmailThread', id: string, providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, emailName: string | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }| { __typename: 'GraphqlSoupForeignEntity', id: string, foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, metadata: unknown, createdAt: string, updatedAt: string }- | { __typename: 'GraphqlSoupProject', id: string, ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, projectName: string, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: string | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }+ | { __typename: 'GraphqlSoupProject', id: string, ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, projectName: string, properties: Array<{ propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null }> }}> } } };-export type SoupPropertyFieldsFragment = { propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: string | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null };+export type SoupPropertyFieldsFragment = { propertyDefinitionId: string, displayName: string, dataType: GraphqlSoupDataType, isMultiSelect: boolean, specificEntityType: GraphqlSoupPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value: { kind: string, boolValue: boolean | null, numberValue: number | null, stringValue: string | null, dateValue: string | null, selectOptionIds: Array<string>, links: Array<string>, entityReferences: Array<{ entityId: string, entityType: GraphqlSoupPropertyEntityType, specificMessageId: string | null }> } | null };export type SoupChannelMessageFieldsFragment = { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> };diff --git a/js/bun.lock b/js/bun.lockindex 9feefe33b8..26f0f49a46 100644--- a/js/bun.lock+++ b/js/bun.lock@@ -1023,7 +1023,7 @@"@img/sharp-win32-x64": ["@img/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw=="],- "@inkibra/tauri-plugins": ["@inkibra/tauri-plugins@github:macro-inc/tauri-plugins#26537c8", { "dependencies": { "react": "^18.3.1", "react-dom": "^18.3.1" } }, "macro-inc-tauri-plugins-26537c8"],+ "@inkibra/tauri-plugins": ["@inkibra/tauri-plugins@github:macro-inc/tauri-plugins#26537c8", { "dependencies": { "react": "^18.3.1", "react-dom": "^18.3.1" } }, "macro-inc-tauri-plugins-26537c8", "sha512-6p5xQAkS6Uw6J8Uh0vlj6MjKZXWps5E1Gu0hciBFq1E2BfPBZAgdeeafKnR3diNb4SXWK0JML49nAr+o5PhwKw=="],"@inquirer/ansi": ["@inquirer/[email protected]", "", {}, "sha512-3eTuUO1vH2cZm2ZKHeQxnOqlTi9EfZDGgIe3BL3I4u+rJHocr9Fz86M4fjYABPvFnQG/gGK551HqDiIcETwU6Q=="],@@ -2959,7 +2959,7 @@"pathval": ["[email protected]", "", {}, "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ=="],- "pdfjs-dist": ["pdfjs-dist@github:macro-inc/pdf.js#f9b2ce6", { "dependencies": { "dommatrix": "^1.0.3", "web-streams-polyfill": "^3.2.1" }, "peerDependencies": { "worker-loader": "^3.0.8" }, "optionalPeers": ["worker-loader"] }, "macro-inc-pdf.js-f9b2ce6"],+ "pdfjs-dist": ["pdfjs-dist@github:macro-inc/pdf.js#f9b2ce6", { "dependencies": { "dommatrix": "^1.0.3", "web-streams-polyfill": "^3.2.1" }, "peerDependencies": { "worker-loader": "^3.0.8" }, "optionalPeers": ["worker-loader"] }, "macro-inc-pdf.js-f9b2ce6", "sha512-HDFaPbCxLG2GHpf1smUG97nku5aPGBGaCcIbK05dGdp07TBLUlDcXsM4WcE82mO5W4RBPIBVYobX5N/6M6NFrA=="],"performance-now": ["[email protected]", "", {}, "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow=="],diff --git a/rust/cloud-storage/graphql_soup/src/objects.rs b/rust/cloud-storage/graphql_soup/src/objects.rsindex df7f1c3025..07c6eca7e1 100644--- a/rust/cloud-storage/graphql_soup/src/objects.rs+++ b/rust/cloud-storage/graphql_soup/src/objects.rs@@ -74,8 +74,14 @@ pub enum GraphqlSoupEntityType {CrmCompany,/// Foreign entity.ForeignEntity,- /// Unknown or unsupported entity type.- Unknown,+ /// User entity+ User,+ /// Team entity+ Team,+ /// Static File+ StaticFile,+ /// crm contact+ CrmContact,}impl From<EntityType> for GraphqlSoupEntityType {@@ -90,7 +96,10 @@ impl From<EntityType> for GraphqlSoupEntityType {EntityType::Call => Self::Call,EntityType::CrmCompany => Self::CrmCompany,EntityType::ForeignEntity => Self::ForeignEntity,- _ => Self::Unknown,+ EntityType::User => Self::User,+ EntityType::Team => Self::Team,+ EntityType::StaticFile => Self::StaticFile,+ EntityType::CrmContact => Self::CrmContact,}}}@@ -410,11 +419,11 @@ impl GraphqlSoupProperty {self.0.definition.is_multi_select}- async fn specific_entity_type(&self) -> Option<String> {+ async fn specific_entity_type(&self) -> Option<GraphqlSoupPropertyEntityType> {self.0.definition.specific_entity_type- .map(|entity_type| entity_type.to_string())+ .map(GraphqlSoupPropertyEntityType::from_property_entity)}async fn is_system(&self) -> bool {diff --git a/rust/cloud-storage/schema.graphql b/rust/cloud-storage/schema.graphqlindex d161ae29eb..02ffac5e96 100644--- a/rust/cloud-storage/schema.graphql+++ b/rust/cloud-storage/schema.graphql@@ -609,9 +609,21 @@ enum GraphqlSoupEntityType {"""FOREIGN_ENTITY"""- Unknown or unsupported entity type.+ User entity"""- UNKNOWN+ USER+ """+ Team entity+ """+ TEAM+ """+ Static File+ """+ STATIC_FILE+ """+ crm contact+ """+ CRM_CONTACT}type GraphqlSoupForeignEntity {@@ -672,7 +684,7 @@ type GraphqlSoupProperty {displayName: String!dataType: GraphqlSoupDataType!isMultiSelect: Boolean!- specificEntityType: String+ specificEntityType: GraphqlSoupPropertyEntityTypeisSystem: Boolean!isMetadata: Boolean!value: GraphqlSoupPropertyValue