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.

feat(model-entity): add ScheduledAction entity type (#6387)

Will Hutchinsonb85bb439ad61
diff --git a/apps/web/src/features/dynamic-ui/widgets/Timeline.tsx b/apps/web/src/features/dynamic-ui/widgets/Timeline.tsx
index 0835f827b7..4b660146ca 100644
--- a/apps/web/src/features/dynamic-ui/widgets/Timeline.tsx
+++ b/apps/web/src/features/dynamic-ui/widgets/Timeline.tsx
@@ -21,6 +21,7 @@ function toItemType(type: EntityRef['type']): ItemType | undefined {
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
() => undefined
)
.otherwise((itemType) => itemType);
diff --git a/apps/web/src/lib/queries/notification/user-notifications.ts b/apps/web/src/lib/queries/notification/user-notifications.ts
index 7875d04981..71644b6acb 100644
--- a/apps/web/src/lib/queries/notification/user-notifications.ts
+++ b/apps/web/src/lib/queries/notification/user-notifications.ts
@@ -935,7 +935,8 @@ function notificationEntityTypeToSoupTag(
'crm_company',
'crm_contact',
'skill',
- 'agent_session'
+ 'agent_session',
+ 'scheduled_action'
),
() => null
)
diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-cognition/generated/schemas/entityType.ts
index f17f185298..66b3665f5c 100644
--- a/apps/web/src/lib/service-clients/service-cognition/generated/schemas/entityType.ts
+++ b/apps/web/src/lib/service-clients/service-cognition/generated/schemas/entityType.ts
@@ -29,4 +29,5 @@ export const EntityType = {
reminder: 'reminder',
skill: 'skill',
agent_session: 'agent_session',
+ scheduled_action: 'scheduled_action',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts
index 8e5fa9dfe3..a04c3fdce7 100644
--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts
+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/schemas.ts
@@ -2530,6 +2530,7 @@ export const ListNotifications = z.object({
'crm_contact',
'reminder',
'skill',
+ 'scheduled_action',
]),
id: z.string(),
})
diff --git a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts
index 60e6a91640..35127fd2d0 100644
--- a/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts
+++ b/apps/web/src/lib/service-clients/service-cognition/generated/tools/types.ts
@@ -535,7 +535,8 @@ export type NotificationEntityType =
| 'crm_company'
| 'crm_contact'
| 'reminder'
- | 'skill';
+ | 'skill'
+ | 'scheduled_action';
/**
* Channel-access change to apply to a bot.
*/
diff --git a/apps/web/src/lib/service-clients/service-cognition/openapi.json b/apps/web/src/lib/service-clients/service-cognition/openapi.json
index ddae0a28ef..980d5c66ae 100644
--- a/apps/web/src/lib/service-clients/service-cognition/openapi.json
+++ b/apps/web/src/lib/service-clients/service-cognition/openapi.json
@@ -2971,7 +2971,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
},
"ErrorBody": {
diff --git a/apps/web/src/lib/service-clients/service-connection/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-connection/generated/schemas/entityType.ts
index 6d7798695e..1a604de95b 100644
--- a/apps/web/src/lib/service-clients/service-connection/generated/schemas/entityType.ts
+++ b/apps/web/src/lib/service-clients/service-connection/generated/schemas/entityType.ts
@@ -29,4 +29,5 @@ export const EntityType = {
reminder: 'reminder',
skill: 'skill',
agent_session: 'agent_session',
+ scheduled_action: 'scheduled_action',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-connection/openapi.json b/apps/web/src/lib/service-clients/service-connection/openapi.json
index f6b18ebab1..cd215f2aaf 100644
--- a/apps/web/src/lib/service-clients/service-connection/openapi.json
+++ b/apps/web/src/lib/service-clients/service-connection/openapi.json
@@ -261,7 +261,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
},
"GenericErrorResponse": {
diff --git a/apps/web/src/lib/service-clients/service-notification/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-notification/generated/schemas/entityType.ts
index c6b560e823..c8f8ddf184 100644
--- a/apps/web/src/lib/service-clients/service-notification/generated/schemas/entityType.ts
+++ b/apps/web/src/lib/service-clients/service-notification/generated/schemas/entityType.ts
@@ -29,4 +29,5 @@ export const EntityType = {
reminder: 'reminder',
skill: 'skill',
agent_session: 'agent_session',
+ scheduled_action: 'scheduled_action',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-notification/generated/zod.ts b/apps/web/src/lib/service-clients/service-notification/generated/zod.ts
index f8b02c9569..16f720b698 100644
--- a/apps/web/src/lib/service-clients/service-notification/generated/zod.ts
+++ b/apps/web/src/lib/service-clients/service-notification/generated/zod.ts
@@ -155,6 +155,7 @@ export const listTypedNotificationsResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro'),
})
@@ -1732,6 +1733,7 @@ export const bulkGetTypedNotificationsByEventItemIdsResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro'),
})
@@ -3303,6 +3305,7 @@ export const getTypedNotificationsByEventItemIdResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro'),
})
@@ -4879,6 +4882,7 @@ export const getTypedNotificationByIdResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro'),
})
diff --git a/apps/web/src/lib/service-clients/service-notification/openapi.json b/apps/web/src/lib/service-clients/service-notification/openapi.json
index c68ad8a17c..bcca393fd2 100644
--- a/apps/web/src/lib/service-clients/service-notification/openapi.json
+++ b/apps/web/src/lib/service-clients/service-notification/openapi.json
@@ -1621,7 +1621,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
},
"ErrorResponse": {
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/addFavoriteRequestEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/addFavoriteRequestEntityType.ts
index d7dcbc2418..425babc0f3 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/addFavoriteRequestEntityType.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/addFavoriteRequestEntityType.ts
@@ -25,4 +25,5 @@ export type AddFavoriteRequestEntityType =
| 'crm_contact'
| 'reminder'
| 'skill'
- | 'agent_session';
+ | 'agent_session'
+ | 'scheduled_action';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/collabSurfaceResponseParentEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/collabSurfaceResponseParentEntityType.ts
index 8d2bf3c135..24e908e43b 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/collabSurfaceResponseParentEntityType.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/collabSurfaceResponseParentEntityType.ts
@@ -25,4 +25,5 @@ export type CollabSurfaceResponseParentEntityType =
| 'crm_contact'
| 'reminder'
| 'skill'
- | 'agent_session';
+ | 'agent_session'
+ | 'scheduled_action';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/createReminderRequestEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/createReminderRequestEntityType.ts
index ccef694cad..a9e04f0022 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/createReminderRequestEntityType.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/createReminderRequestEntityType.ts
@@ -26,4 +26,5 @@ export type CreateReminderRequestEntityType =
| 'crm_contact'
| 'reminder'
| 'skill'
- | 'agent_session';
+ | 'agent_session'
+ | 'scheduled_action';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/ensureCollabSurfaceRequestParentEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/ensureCollabSurfaceRequestParentEntityType.ts
index 316facbb86..513e40483f 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/ensureCollabSurfaceRequestParentEntityType.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/ensureCollabSurfaceRequestParentEntityType.ts
@@ -25,4 +25,5 @@ export type EnsureCollabSurfaceRequestParentEntityType =
| 'crm_contact'
| 'reminder'
| 'skill'
- | 'agent_session';
+ | 'agent_session'
+ | 'scheduled_action';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityRefEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityRefEntityType.ts
index 0f6778c3af..fb6026f771 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityRefEntityType.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityRefEntityType.ts
@@ -25,4 +25,5 @@ export type FavoriteEntityRefEntityType =
| 'crm_contact'
| 'reminder'
| 'skill'
- | 'agent_session';
+ | 'agent_session'
+ | 'scheduled_action';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityType.ts
index 986ac32d51..066681fcd1 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityType.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/favoriteEntityType.ts
@@ -25,4 +25,5 @@ export type FavoriteEntityType =
| 'crm_contact'
| 'reminder'
| 'skill'
- | 'agent_session';
+ | 'agent_session'
+ | 'scheduled_action';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/listFavoritesEntityTypeItem.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/listFavoritesEntityTypeItem.ts
index e9a2ab3c45..1fc62e31af 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/listFavoritesEntityTypeItem.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/listFavoritesEntityTypeItem.ts
@@ -30,4 +30,5 @@ export const ListFavoritesEntityTypeItem = {
reminder: 'reminder',
skill: 'skill',
agent_session: 'agent_session',
+ scheduled_action: 'scheduled_action',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/listRemindersEntityTypeItem.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/listRemindersEntityTypeItem.ts
index 979c6ca2ee..8fd16c6d8e 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/listRemindersEntityTypeItem.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/listRemindersEntityTypeItem.ts
@@ -30,4 +30,5 @@ export const ListRemindersEntityTypeItem = {
reminder: 'reminder',
skill: 'skill',
agent_session: 'agent_session',
+ scheduled_action: 'scheduled_action',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderEntityType.ts
index f98122f5b2..48c41fd4c8 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderEntityType.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderEntityType.ts
@@ -26,4 +26,5 @@ export type ReminderEntityType =
| 'crm_contact'
| 'reminder'
| 'skill'
- | 'agent_session';
+ | 'agent_session'
+ | 'scheduled_action';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderReferenceEntityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderReferenceEntityType.ts
index a1725d7d8e..7c123a3e34 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderReferenceEntityType.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderReferenceEntityType.ts
@@ -25,4 +25,5 @@ export type SoupReminderReferenceEntityType =
| 'crm_contact'
| 'reminder'
| 'skill'
- | 'agent_session';
+ | 'agent_session'
+ | 'scheduled_action';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
index 10d294c32b..b871067953 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
@@ -4109,6 +4109,7 @@ export const getCollabSurfaceResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe('Type of the parent entity.'),
@@ -4159,6 +4160,7 @@ export const ensureCollabSurfaceBody = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe('Type of the parent entity access derives from.'),
@@ -4190,6 +4192,7 @@ export const ensureCollabSurfaceResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe('Type of the parent entity.'),
@@ -8561,6 +8564,7 @@ export const listFavoritesQueryParams = zod.object({
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
)
@@ -8619,6 +8623,7 @@ export const listFavoritesResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe('The type of the favorited entity.'),
@@ -8665,6 +8670,7 @@ export const addFavoriteBody = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe('The type of the entity to favorite.'),
@@ -8712,6 +8718,7 @@ export const addFavoriteResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe('The type of the favorited entity.'),
@@ -8756,6 +8763,7 @@ export const reorderFavoritesBody = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe('The type of the favorited entity.'),
@@ -8793,6 +8801,7 @@ export const removeFavoriteByEntityParams = zod.object({
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of the favorited entity.'),
entity_id: zod.string().describe('The id of the favorited entity.'),
@@ -12286,6 +12295,7 @@ export const getItemsSoupResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe("The referenced entity's type."),
@@ -16253,6 +16263,7 @@ export const postItemsSoupResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe("The referenced entity's type."),
@@ -19663,6 +19674,7 @@ export const postItemsSoupAstResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe("The referenced entity's type."),
@@ -23429,6 +23441,7 @@ export const postItemsSoupAstGroupedResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe("The referenced entity's type."),
@@ -26835,6 +26848,7 @@ export const postItemsSoupAstGroupedResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
.describe("The referenced entity's type."),
@@ -29191,6 +29205,7 @@ export const listRemindersQueryParams = zod.object({
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro')
)
@@ -29272,6 +29287,7 @@ export const listRemindersResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro'),
])
@@ -29358,6 +29374,7 @@ export const createReminderBody = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro'),
])
@@ -29441,6 +29458,7 @@ export const getReminderResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro'),
])
@@ -29584,6 +29602,7 @@ export const updateReminderResponse = zod
'reminder',
'skill',
'agent_session',
+ 'scheduled_action',
])
.describe('The type of an entity in Macro'),
])
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-favorites.ts b/apps/web/src/lib/service-clients/service-storage/graphql-favorites.ts
index 0889ef5f55..505846c52c 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql-favorites.ts
+++ b/apps/web/src/lib/service-clients/service-storage/graphql-favorites.ts
@@ -41,6 +41,7 @@ const FAVORITE_ENTITY_TYPE_TO_GRAPHQL = {
reminder: 'REMINDER',
skill: 'SKILL',
agent_session: 'AGENT_SESSION',
+ scheduled_action: 'SCHEDULED_ACTION',
} satisfies Record<FavoriteEntityType, GraphqlEntityType>;
const GRAPHQL_ENTITY_TYPE_TO_FAVORITE = {
@@ -58,6 +59,7 @@ const GRAPHQL_ENTITY_TYPE_TO_FAVORITE = {
PROJECT: 'project',
REMINDER: 'reminder',
SKILL: 'skill',
+ SCHEDULED_ACTION: 'scheduled_action',
STATIC_FILE: 'static_file',
TEAM: 'team',
USER: 'user',
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
index 4d5269eebe..936a16b3bd 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
@@ -609,6 +609,8 @@ export type GraphqlEntityType =
| 'PROJECT'
/** Reminder entity. */
| 'REMINDER'
+ /** Scheduled action entity. */
+ | 'SCHEDULED_ACTION'
/** AI skill entity (skill document or built-in system skill). */
| 'SKILL'
/** Static file entity. */
diff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.json
index 4d03acf883..ceccecd135 100644
--- a/apps/web/src/lib/service-clients/service-storage/openapi.json
+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json
@@ -8639,7 +8639,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
},
@@ -8852,7 +8853,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
},
@@ -11260,7 +11262,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
},
@@ -12897,7 +12900,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -16963,7 +16967,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -17775,7 +17780,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -20245,7 +20251,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -20656,7 +20663,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -20704,7 +20712,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -24334,7 +24343,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -26679,7 +26689,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
diff --git a/crates/activity/src/outbound/pg_activity_repo.rs b/crates/activity/src/outbound/pg_activity_repo.rs
index 208e0accac..3c67c6f3a8 100644
--- a/crates/activity/src/outbound/pg_activity_repo.rs
+++ b/crates/activity/src/outbound/pg_activity_repo.rs
@@ -444,7 +444,8 @@ const fn _rankable_entity_types_are_exhaustive(entity_type: EntityType) {
| EntityType::CrmContact
| EntityType::Reminder
| EntityType::Skill
- | EntityType::AgentSession => {}
+ | EntityType::AgentSession
+ | EntityType::ScheduledAction => {}
}
}
@@ -468,6 +469,7 @@ fn rankable_entity_types() -> Vec<String> {
EntityType::Reminder,
EntityType::Skill,
EntityType::AgentSession,
+ EntityType::ScheduledAction,
]
.into_iter()
.map(|entity_type| entity_type.as_ref().to_owned())
diff --git a/crates/entity_access/src/domain/explain.rs b/crates/entity_access/src/domain/explain.rs
index f6270f9555..8270591bd9 100644
--- a/crates/entity_access/src/domain/explain.rs
+++ b/crates/entity_access/src/domain/explain.rs
@@ -61,6 +61,9 @@ where
fn supports_explain(entity_type: EntityType) -> bool {
!matches!(
entity_type,
- EntityType::User | EntityType::ChannelMessage | EntityType::Skill
+ EntityType::User
+ | EntityType::ChannelMessage
+ | EntityType::Skill
+ | EntityType::ScheduledAction
)
}
diff --git a/crates/entity_access/src/domain/explain/test.rs b/crates/entity_access/src/domain/explain/test.rs
index c32920171a..3b4905718e 100644
--- a/crates/entity_access/src/domain/explain/test.rs
+++ b/crates/entity_access/src/domain/explain/test.rs
@@ -35,6 +35,7 @@ async fn unsupported_types_are_bad_request() {
EntityType::User,
EntityType::ChannelMessage,
EntityType::Skill,
+ EntityType::ScheduledAction,
] {
let error = service
.explain_access(&user, "id", entity_type)
diff --git a/crates/entity_access/src/domain/service.rs b/crates/entity_access/src/domain/service.rs
index 8628f898f4..107f23810a 100644
--- a/crates/entity_access/src/domain/service.rs
+++ b/crates/entity_access/src/domain/service.rs
@@ -245,7 +245,8 @@ where
| EntityType::CalendarEvent
// A reminder belongs to a user, so a team-scoped bot never reaches one.
| EntityType::Reminder
- | EntityType::Skill => {
+ | EntityType::Skill
+ | EntityType::ScheduledAction => {
Err(AccessError::BadRequest("Unsupported bot entity type"))
}
}
@@ -438,7 +439,8 @@ where
EntityType::Team
| EntityType::User
| EntityType::ChannelMessage
- | EntityType::Skill => Ok(None),
+ | EntityType::Skill
+ | EntityType::ScheduledAction => Ok(None),
}
}
diff --git a/crates/entity_access/src/outbound/pg_access_repo.rs b/crates/entity_access/src/outbound/pg_access_repo.rs
index 7b3db41960..bfd26b963b 100644
--- a/crates/entity_access/src/outbound/pg_access_repo.rs
+++ b/crates/entity_access/src/outbound/pg_access_repo.rs
@@ -319,8 +319,10 @@ impl AccessRepository for PgAccessRepository {
| EntityType::CrmCompany
| EntityType::CrmContact
| EntityType::Skill
- // Reminders are user-owned, never reachable through a team scope.
- | EntityType::Reminder => {
+ // Reminders and scheduled actions are user-owned, never reachable
+ // through a team scope.
+ | EntityType::Reminder
+ | EntityType::ScheduledAction => {
return Err(AccessError::BadRequest(
"Unsupported entity type for team item access",
));
diff --git a/crates/entity_access/src/outbound/pg_explain_access_repo.rs b/crates/entity_access/src/outbound/pg_explain_access_repo.rs
index 429444d3ca..161ebe4611 100644
--- a/crates/entity_access/src/outbound/pg_explain_access_repo.rs
+++ b/crates/entity_access/src/outbound/pg_explain_access_repo.rs
@@ -190,7 +190,10 @@ impl ExplainAccessRepository for PgExplainAccessRepository {
.await?)
}
EntityType::StaticFile => Ok(vec![AccessGrant::StaticFileAlwaysView]),
- EntityType::User | EntityType::ChannelMessage | EntityType::Skill => Ok(vec![]),
+ EntityType::User
+ | EntityType::ChannelMessage
+ | EntityType::Skill
+ | EntityType::ScheduledAction => Ok(vec![]),
}
}
}
diff --git a/crates/entity_access_db_utils/src/lib.rs b/crates/entity_access_db_utils/src/lib.rs
index e8ccdb5741..ddc9c12eab 100644
--- a/crates/entity_access_db_utils/src/lib.rs
+++ b/crates/entity_access_db_utils/src/lib.rs
@@ -266,8 +266,10 @@ pub async fn update_entity_access_channel_share_permissions(
| EntityType::CrmContact
| EntityType::Skill
| EntityType::ForeignEntity
- // Reminders are never channel-shared: they are private to one user.
- | EntityType::Reminder => {
+ // Reminders and scheduled actions are never channel-shared: they
+ // are private to one user.
+ | EntityType::Reminder
+ | EntityType::ScheduledAction => {
return Err(sqlx::Error::InvalidArgument(format!(
"received unexpected entity type {entity_type:?}"
)));
@@ -335,8 +337,10 @@ pub async fn update_entity_access_channel_share_permissions(
| EntityType::CrmContact
| EntityType::Skill
| EntityType::ForeignEntity
- // Reminders are never channel-shared: they are private to one user.
- | EntityType::Reminder => {
+ // Reminders and scheduled actions are never channel-shared: they
+ // are private to one user.
+ | EntityType::Reminder
+ | EntityType::ScheduledAction => {
return Err(sqlx::Error::InvalidArgument(format!(
"Received invalid EntityType {entity_type:?}"
)));
diff --git a/crates/favorites/src/domain/mutation_service.rs b/crates/favorites/src/domain/mutation_service.rs
index e951ab69e5..3a5842b503 100644
--- a/crates/favorites/src/domain/mutation_service.rs
+++ b/crates/favorites/src/domain/mutation_service.rs
@@ -105,6 +105,7 @@ fn validate_favoritable(entity_type: EntityType) -> Result<(), FavoritesError> {
| EntityType::CalendarEvent
| EntityType::Reminder
| EntityType::Skill
- | EntityType::AgentSession => Err(FavoritesError::UnsupportedEntityType(entity_type)),
+ | EntityType::AgentSession
+ | EntityType::ScheduledAction => Err(FavoritesError::UnsupportedEntityType(entity_type)),
}
}
diff --git a/crates/graphql_common/src/entity_type.rs b/crates/graphql_common/src/entity_type.rs
index 411801cbeb..05364177b4 100644
--- a/crates/graphql_common/src/entity_type.rs
+++ b/crates/graphql_common/src/entity_type.rs
@@ -67,6 +67,8 @@ pub enum GraphqlEntityType {
Skill,
/// AI coding agent session entity.
AgentSession,
+ /// Scheduled action entity.
+ ScheduledAction,
}
impl GraphqlSoupEntityType {
@@ -93,7 +95,12 @@ impl GraphqlSoupEntityType {
EntityType::CalendarEvent => Self::CalendarEvent,
EntityType::Reminder => Self::Reminder,
EntityType::AgentSession => Self::AgentSession,
- _ => return None,
+ EntityType::User
+ | EntityType::Team
+ | EntityType::StaticFile
+ | EntityType::CrmContact
+ | EntityType::Skill
+ | EntityType::ScheduledAction => return None,
})
}
@@ -137,6 +144,7 @@ impl GraphqlEntityType {
EntityType::Reminder => Self::Reminder,
EntityType::Skill => Self::Skill,
EntityType::AgentSession => Self::AgentSession,
+ EntityType::ScheduledAction => Self::ScheduledAction,
}
}
@@ -165,6 +173,7 @@ impl GraphqlEntityType {
Self::Reminder => EntityType::Reminder,
Self::Skill => EntityType::Skill,
Self::AgentSession => EntityType::AgentSession,
+ Self::ScheduledAction => EntityType::ScheduledAction,
}
}
}
@@ -204,3 +213,20 @@ impl GraphqlCacheDeletion {
}
}
}
+
+#[cfg(test)]
+mod test {
+ use super::*;
+
+ #[test]
+ fn scheduled_action_round_trips_through_graphql_entity_type() {
+ let graphql = GraphqlEntityType::new(EntityType::ScheduledAction);
+ assert!(matches!(graphql, GraphqlEntityType::ScheduledAction));
+ assert!(matches!(graphql.into_model(), EntityType::ScheduledAction));
+ }
+
+ #[test]
+ fn scheduled_action_is_not_a_soup_entity_type() {
+ assert!(GraphqlSoupEntityType::try_new(EntityType::ScheduledAction).is_none());
+ }
+}
diff --git a/crates/graphql_soup/src/loaders.rs b/crates/graphql_soup/src/loaders.rs
index 4f75449ef9..892afc59a9 100644
--- a/crates/graphql_soup/src/loaders.rs
+++ b/crates/graphql_soup/src/loaders.rs
@@ -374,7 +374,8 @@ fn entity_filter_ast(entities: &[Entity<'static>]) -> Result<EntityFilterAst, So
| EntityType::Team
| EntityType::StaticFile
| EntityType::CrmContact
- | EntityType::Skill => {
+ | EntityType::Skill
+ | EntityType::ScheduledAction => {
return Err(rootcause::report!(
"entity type {} is not represented in Soup",
entity.entity_type
diff --git a/crates/macro_db_client/src/item_access/delete.rs b/crates/macro_db_client/src/item_access/delete.rs
index d943c588c2..7f4f001a6b 100644
--- a/crates/macro_db_client/src/item_access/delete.rs
+++ b/crates/macro_db_client/src/item_access/delete.rs
@@ -43,8 +43,9 @@ pub async fn delete_user_entity_access_bulk(
| EntityType::CrmContact
| EntityType::Skill
| EntityType::ForeignEntity
- // Reminders own no entity_access rows to delete.
- | EntityType::Reminder => {
+ // Reminders and scheduled actions own no entity_access rows to delete.
+ | EntityType::Reminder
+ | EntityType::ScheduledAction => {
anyhow::bail!("invalid entity type")
}
EntityType::Project => {
diff --git a/crates/model-entity/src/lib.rs b/crates/model-entity/src/lib.rs
index 470ce75a30..d92060a4b9 100644
--- a/crates/model-entity/src/lib.rs
+++ b/crates/model-entity/src/lib.rs
@@ -68,6 +68,8 @@ pub enum EntityType {
/// The entity is an AI coding agent session (see the `agent_session`
/// crate)
AgentSession,
+ /// The entity is a scheduled action (see the `scheduled_action` service)
+ ScheduledAction,
}
impl EntityType {
@@ -105,6 +107,10 @@ impl EntityType {
// owner, the channel the bot was mentioned in as editor - but
// are not something you file into a project.
EntityType::AgentSession => false,
+ // Scheduled actions are owner-scoped and are not something you
+ // file into a project. Access currently resolves from the owner
+ // column, not from a row in the `entity_access` table.
+ EntityType::ScheduledAction => false,
}
}
/// provide an entity string slice to upgrade this type into an [Entity]
diff --git a/crates/model-entity/src/tests.rs b/crates/model-entity/src/tests.rs
index 070541a687..29f586c227 100644
--- a/crates/model-entity/src/tests.rs
+++ b/crates/model-entity/src/tests.rs
@@ -1,4 +1,5 @@
use crate::EntityType;
+use std::str::FromStr;
#[test]
fn it_should_build_entity_from_type() {
@@ -6,3 +7,23 @@ fn it_should_build_entity_from_type() {
assert_eq!(entity.entity_id, "my_entity_id");
assert_eq!(entity.entity_type, EntityType::Document);
}
+
+#[test]
+fn scheduled_action_round_trips_as_snake_case() {
+ let encoded = serde_json::to_string(&EntityType::ScheduledAction).unwrap();
+ assert_eq!(encoded, "\"scheduled_action\"");
+ assert_eq!(
+ serde_json::from_str::<EntityType>(&encoded).unwrap(),
+ EntityType::ScheduledAction
+ );
+ assert_eq!(EntityType::ScheduledAction.as_ref(), "scheduled_action");
+ assert_eq!(
+ EntityType::from_str("scheduled_action").unwrap(),
+ EntityType::ScheduledAction
+ );
+}
+
+#[test]
+fn scheduled_action_is_not_an_entity_access_entity() {
+ assert!(!EntityType::ScheduledAction.is_valid_entity_access_entity());
+}
diff --git a/crates/notification/src/inbound/ai_tool.rs b/crates/notification/src/inbound/ai_tool.rs
index 1fcf189c6f..bdbdcb4f64 100644
--- a/crates/notification/src/inbound/ai_tool.rs
+++ b/crates/notification/src/inbound/ai_tool.rs
@@ -90,6 +90,7 @@ pub enum NotificationEntityType {
CrmContact,
Reminder,
Skill,
+ ScheduledAction,
}
impl From<NotificationEntityType> for EntityType {
@@ -111,6 +112,7 @@ impl From<NotificationEntityType> for EntityType {
NotificationEntityType::CrmContact => Self::CrmContact,
NotificationEntityType::Reminder => Self::Reminder,
NotificationEntityType::Skill => Self::Skill,
+ NotificationEntityType::ScheduledAction => Self::ScheduledAction,
}
}
}
diff --git a/crates/properties/src/domain/model.rs b/crates/properties/src/domain/model.rs
index e93ee339e1..27de229423 100644
--- a/crates/properties/src/domain/model.rs
+++ b/crates/properties/src/domain/model.rs
@@ -55,7 +55,8 @@ pub fn storage_entity_type(entity_type: AccessEntityType) -> Option<EntityType>
| AccessEntityType::CrmContact
| AccessEntityType::Reminder
| AccessEntityType::Skill
- | AccessEntityType::AgentSession => None,
+ | AccessEntityType::AgentSession
+ | AccessEntityType::ScheduledAction => None,
}
}
diff --git a/crates/properties/src/domain/model/test.rs b/crates/properties/src/domain/model/test.rs
index c41753fcf7..a31df8253a 100644
--- a/crates/properties/src/domain/model/test.rs
+++ b/crates/properties/src/domain/model/test.rs
@@ -51,6 +51,7 @@ fn canonical_types_without_properties_storage_map_to_none() {
AccessEntityType::Reminder,
AccessEntityType::Skill,
AccessEntityType::AgentSession,
+ AccessEntityType::ScheduledAction,
] {
assert_eq!(storage_entity_type(unsupported), None, "{unsupported:?}");
}
diff --git a/packages/sdk/generated/cognition/types.gen.ts b/packages/sdk/generated/cognition/types.gen.ts
index cfaba3fc8c..c4379c6722 100644
--- a/packages/sdk/generated/cognition/types.gen.ts
+++ b/packages/sdk/generated/cognition/types.gen.ts
@@ -508,7 +508,7 @@ export type Entity = {
/**
* The type of an entity in Macro
*/
-export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
/**
* Error response body.
diff --git a/packages/sdk/generated/connection/types.gen.ts b/packages/sdk/generated/connection/types.gen.ts
index 8a3cc32ae4..f97dce031e 100644
--- a/packages/sdk/generated/connection/types.gen.ts
+++ b/packages/sdk/generated/connection/types.gen.ts
@@ -40,7 +40,7 @@ export type Entity = {
/**
* The type of an entity in Macro
*/
-export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
export type GenericErrorResponse = {
/**
diff --git a/packages/sdk/generated/notification/types.gen.ts b/packages/sdk/generated/notification/types.gen.ts
index bb253ff308..7d4be33810 100644
--- a/packages/sdk/generated/notification/types.gen.ts
+++ b/packages/sdk/generated/notification/types.gen.ts
@@ -438,7 +438,7 @@ export type Entity = {
/**
* The type of an entity in Macro
*/
-export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
/**
* A plain old json error response for use with axum.
diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.ts
index b5ded1b509..3a3ea67fc2 100644
--- a/packages/sdk/generated/storage/types.gen.ts
+++ b/packages/sdk/generated/storage/types.gen.ts
@@ -62,7 +62,7 @@ export type AddFavoriteRequest = {
/**
* The type of the entity to favorite.
*/
- entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+ entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
};
/**
@@ -2881,7 +2881,7 @@ export type CollabSurfaceResponse = {
/**
* Type of the parent entity.
*/
- parentEntityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+ parentEntityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
/**
* Lifecycle state (`ready` for every surface visible via the API).
*/
@@ -3461,7 +3461,7 @@ export type CreateReminderRequest = {
/**
* Type of the entity to attach the reminder to. Requires `entityId`.
*/
- entityType?: null | 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+ entityType?: null | 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
/**
* When and how often the reminder fires.
*/
@@ -5061,7 +5061,7 @@ export type EnsureCollabSurfaceRequest = {
/**
* Type of the parent entity access derives from.
*/
- parentEntityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+ parentEntityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
};
/**
@@ -5344,7 +5344,7 @@ export type Favorite = {
/**
* The type of the favorited entity.
*/
- entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+ entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
/**
* File type of the favorited document, when applicable.
*/
@@ -5366,7 +5366,7 @@ export type FavoriteEntityRef = {
/**
* The type of the favorited entity.
*/
- entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+ entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
};
/**
@@ -7192,7 +7192,7 @@ export type Reminder = {
/**
* Type of the associated entity, when the reminder is attached to one.
*/
- entityType?: null | 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+ entityType?: null | 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
/**
* Reminder id.
*/
@@ -8775,7 +8775,7 @@ export type SoupReminderReference = {
/**
* The referenced entity's type.
*/
- entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+ entityType: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
/**
* File type, when the reference is a document — `md`, `pdf`, and so on.
*/
@@ -13233,7 +13233,7 @@ export type ListFavoritesData = {
/**
* Restrict to favorites whose entity is one of these types.
*/
- entityType?: Array<'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session'>;
+ entityType?: Array<'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action'>;
/**
* Restrict to favorites whose entity is one of these ids.
*/
@@ -13302,7 +13302,7 @@ export type RemoveFavoriteByEntityData = {
/**
* The type of an entity in Macro
*/
- entity_type: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
+ entity_type: 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action';
/**
* The id of the favorited entity.
*/
@@ -14363,7 +14363,7 @@ export type ListRemindersData = {
/**
* Restrict to reminders attached to an entity of these types.
*/
- entityType?: Array<'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session'>;
+ entityType?: Array<'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session' | 'scheduled_action'>;
/**
* Restrict to reminders attached to these entity ids.
*/
diff --git a/packages/sdk/specs/cognition.json b/packages/sdk/specs/cognition.json
index ddae0a28ef..980d5c66ae 100644
--- a/packages/sdk/specs/cognition.json
+++ b/packages/sdk/specs/cognition.json
@@ -2971,7 +2971,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
},
"ErrorBody": {
diff --git a/packages/sdk/specs/connection.json b/packages/sdk/specs/connection.json
index f6b18ebab1..cd215f2aaf 100644
--- a/packages/sdk/specs/connection.json
+++ b/packages/sdk/specs/connection.json
@@ -261,7 +261,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
},
"GenericErrorResponse": {
diff --git a/packages/sdk/specs/notification.json b/packages/sdk/specs/notification.json
index c68ad8a17c..bcca393fd2 100644
--- a/packages/sdk/specs/notification.json
+++ b/packages/sdk/specs/notification.json
@@ -1621,7 +1621,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
},
"ErrorResponse": {
diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.json
index 4d03acf883..ceccecd135 100644
--- a/packages/sdk/specs/storage.json
+++ b/packages/sdk/specs/storage.json
@@ -8639,7 +8639,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
},
@@ -8852,7 +8853,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
},
@@ -11260,7 +11262,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
},
@@ -12897,7 +12900,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -16963,7 +16967,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -17775,7 +17780,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -20245,7 +20251,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -20656,7 +20663,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -20704,7 +20712,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -24334,7 +24343,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
@@ -26679,7 +26689,8 @@
"crm_contact",
"reminder",
"skill",
- "agent_session"
+ "agent_session",
+ "scheduled_action"
]
}
],
diff --git a/services/document_storage_service/src/service/entity_mutation.rs b/services/document_storage_service/src/service/entity_mutation.rs
index 0e23279f3d..296b70a08e 100644
--- a/services/document_storage_service/src/service/entity_mutation.rs
+++ b/services/document_storage_service/src/service/entity_mutation.rs
@@ -409,7 +409,8 @@ where
| EntityType::CalendarEvent
| EntityType::Reminder
| EntityType::Skill
- | EntityType::AgentSession => {
+ | EntityType::AgentSession
+ | EntityType::ScheduledAction => {
return unsupported(requested, "rename");
}
};
@@ -455,7 +456,8 @@ where
| EntityType::CalendarEvent
| EntityType::Reminder
| EntityType::Skill
- | EntityType::AgentSession => {
+ | EntityType::AgentSession
+ | EntityType::ScheduledAction => {
return unsupported(requested, "move");
}
};
@@ -503,7 +505,8 @@ where
| EntityType::CalendarEvent
| EntityType::Reminder
| EntityType::Skill
- | EntityType::AgentSession => {
+ | EntityType::AgentSession
+ | EntityType::ScheduledAction => {
return unsupported(requested, "share policy updates");
}
};
@@ -554,7 +557,8 @@ where
| EntityType::CalendarEvent
| EntityType::Reminder
| EntityType::Skill
- | EntityType::AgentSession => {
+ | EntityType::AgentSession
+ | EntityType::ScheduledAction => {
return unsupported(requested, "trash");
}
};
@@ -584,7 +588,8 @@ where
| EntityType::CalendarEvent
| EntityType::Reminder
| EntityType::Skill
- | EntityType::AgentSession => {
+ | EntityType::AgentSession
+ | EntityType::ScheduledAction => {
return unsupported(requested, "restore");
}
};
@@ -634,7 +639,8 @@ where
| EntityType::CalendarEvent
| EntityType::Reminder
| EntityType::Skill
- | EntityType::AgentSession => {
+ | EntityType::AgentSession
+ | EntityType::ScheduledAction => {
return unsupported(requested, "permanent deletion");
}
};
@@ -694,7 +700,8 @@ where
| EntityType::CalendarEvent
| EntityType::Reminder
| EntityType::Skill
- | EntityType::AgentSession => {
+ | EntityType::AgentSession
+ | EntityType::ScheduledAction => {
return unsupported(requested, "duplication");
}
};
diff --git a/static_assets/schema.graphql b/static_assets/schema.graphql
index eef3319f1c..a150770b82 100644
--- a/static_assets/schema.graphql
+++ b/static_assets/schema.graphql
@@ -2219,6 +2219,10 @@ enum GraphqlEntityType {
AI coding agent session entity.
"""
AGENT_SESSION
+ """
+ Scheduled action entity.
+ """
+ SCHEDULED_ACTION
}
"""