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: add initiative properties and GraphQL APIs (#6834)

teo20481bb9f6ef
diff --git a/.github/workspace-dep-closures.json b/.github/workspace-dep-closures.json
index 29fa229202..2eb9a7b4de 100644
--- a/.github/workspace-dep-closures.json
+++ b/.github/workspace-dep-closures.json
@@ -2763,6 +2763,7 @@
"crates/graphql_email",
"crates/graphql_entity_mutation",
"crates/graphql_favorite",
+ "crates/graphql_initiative",
"crates/graphql_notification",
"crates/graphql_permission",
"crates/graphql_properties",
@@ -2770,6 +2771,7 @@
"crates/graphql_soup_filter_input",
"crates/harness_id",
"crates/harness_token",
+ "crates/initiative",
"crates/invite_email",
"crates/ip_extractor",
"crates/item_filter_index",
@@ -3643,6 +3645,7 @@
"crates/graphql_email",
"crates/graphql_entity_mutation",
"crates/graphql_favorite",
+ "crates/graphql_initiative",
"crates/graphql_notification",
"crates/graphql_permission",
"crates/graphql_properties",
@@ -5589,6 +5592,136 @@
"crates/user_quota",
"crates/workspace-hack"
],
+ "graphql_initiative": [
+ "crates/activity",
+ "crates/agent",
+ "crates/agent_changes",
+ "crates/agent_fold",
+ "crates/agent_runtime_protocol",
+ "crates/agent_session",
+ "crates/ai_toolset",
+ "crates/ai_usage",
+ "crates/attachment",
+ "crates/authentication_service_client",
+ "crates/bot_id",
+ "crates/bot_token",
+ "crates/bots",
+ "crates/broadcast",
+ "crates/call",
+ "crates/channel_sender",
+ "crates/channels",
+ "crates/chat",
+ "crates/comms_db_client",
+ "crates/connection",
+ "crates/connection_gateway_client",
+ "crates/connection_gateway_models",
+ "crates/contacts",
+ "crates/cowlike",
+ "crates/crm",
+ "crates/database_env_vars",
+ "crates/document_sub_type",
+ "crates/documents",
+ "crates/dynamodb_client",
+ "crates/email",
+ "crates/email_utils",
+ "crates/embedding",
+ "crates/entity_access",
+ "crates/entity_access_db_utils",
+ "crates/entity_access_management",
+ "crates/entity_mutation",
+ "crates/entity_registry/entity_registry",
+ "crates/entity_registry/entity_registry_db_utils",
+ "crates/entity_registry/shared_entity_registry",
+ "crates/filter_ast",
+ "crates/foreign_entity",
+ "crates/frecency",
+ "crates/fusionauth",
+ "crates/genai_telemetry",
+ "crates/github",
+ "crates/google_token",
+ "crates/graphql_common",
+ "crates/graphql_email",
+ "crates/graphql_initiative",
+ "crates/graphql_permission",
+ "crates/graphql_soup",
+ "crates/graphql_soup_filter_input",
+ "crates/harness_id",
+ "crates/harness_token",
+ "crates/initiative",
+ "crates/invite_email",
+ "crates/ip_extractor",
+ "crates/item_filter_index",
+ "crates/item_filters",
+ "crates/kafka_util",
+ "crates/last_online_tracker",
+ "crates/lexical_client",
+ "crates/macro_auth",
+ "crates/macro_authorization",
+ "crates/macro_aws_config",
+ "crates/macro_db_client",
+ "crates/macro_entrypoint",
+ "crates/macro_env",
+ "crates/macro_env_var",
+ "crates/macro_event_broker",
+ "crates/macro_event_topics",
+ "crates/macro_service_urls",
+ "crates/macro_sha_count_client",
+ "crates/macro_sync_service_jwt",
+ "crates/macro_tower_layers",
+ "crates/macro_user_id",
+ "crates/macro_uuid",
+ "crates/mention_utils",
+ "crates/messages",
+ "crates/model",
+ "crates/model-entity",
+ "crates/model-error-response",
+ "crates/model_file_type",
+ "crates/model_notifications",
+ "crates/model_owner",
+ "crates/model_user",
+ "crates/models_ai_projection",
+ "crates/models_bulk_upload",
+ "crates/models_dcs",
+ "crates/models_email",
+ "crates/models_entity_access_management",
+ "crates/models_grouping",
+ "crates/models_opensearch",
+ "crates/models_pagination",
+ "crates/models_permissions",
+ "crates/models_properties",
+ "crates/models_sfs",
+ "crates/models_soup",
+ "crates/models_team",
+ "crates/non_empty",
+ "crates/notification",
+ "crates/notification_state",
+ "crates/predicate_index",
+ "crates/projects",
+ "crates/prompt",
+ "crates/properties",
+ "crates/rate_limit",
+ "crates/readonly_pool",
+ "crates/reminders",
+ "crates/remote_env_var",
+ "crates/roles_and_permissions",
+ "crates/s3_key",
+ "crates/secretsmanager_client",
+ "crates/share_permission_db_utils",
+ "crates/soup",
+ "crates/soup_filter_projection",
+ "crates/soup_realtime",
+ "crates/sqs_client",
+ "crates/sqs_worker",
+ "crates/static_file_service_client",
+ "crates/sync_service",
+ "crates/sync_service_client",
+ "crates/system_properties",
+ "crates/system_skills",
+ "crates/task_dedup",
+ "crates/unfurl",
+ "crates/user_quota",
+ "crates/workspace-hack"
+ ],
"graphql_notification": [
"crates/ai_toolset",
"crates/bot_id",
@@ -6051,12 +6184,15 @@
"crates/workspace-hack"
],
"initiative": [
+ "crates/activity",
"crates/agent",
"crates/ai_toolset",
"crates/ai_usage",
"crates/attachment",
"crates/bot_id",
"crates/bot_token",
+ "crates/broadcast",
+ "crates/channel_sender",
"crates/cowlike",
"crates/database_env_vars",
"crates/document_sub_type",
@@ -6066,27 +6202,41 @@
"crates/harness_id",
"crates/harness_token",
"crates/initiative",
+ "crates/invite_email",
+ "crates/kafka_util",
+ "crates/last_online_tracker",
"crates/macro_auth",
"crates/macro_authorization",
"crates/macro_entrypoint",
"crates/macro_env",
"crates/macro_env_var",
+ "crates/macro_event_broker",
+ "crates/macro_event_topics",
+ "crates/macro_service_urls",
"crates/macro_user_id",
"crates/macro_uuid",
+ "crates/mention_utils",
"crates/model",
"crates/model-entity",
"crates/model-error-response",
"crates/model_file_type",
+ "crates/model_notifications",
"crates/model_owner",
"crates/model_user",
"crates/models_bulk_upload",
"crates/models_entity_access_management",
"crates/models_pagination",
"crates/models_permissions",
+ "crates/models_properties",
"crates/non_empty",
+ "crates/notification",
+ "crates/notification_state",
"crates/prompt",
+ "crates/properties",
+ "crates/rate_limit",
"crates/remote_env_var",
"crates/share_permission_db_utils",
+ "crates/system_properties",
"crates/workspace-hack"
],
"initiative_documents": [
diff --git a/.sqlx/query-007d3ef4dfea1ce7abf9d643fe4bf961daaf902d4015135205e12f130af45b23.json b/.sqlx/query-007d3ef4dfea1ce7abf9d643fe4bf961daaf902d4015135205e12f130af45b23.json
new file mode 100644
index 0000000000..c817471a71
--- /dev/null
+++ b/.sqlx/query-007d3ef4dfea1ce7abf9d643fe4bf961daaf902d4015135205e12f130af45b23.json
@@ -0,0 +1,28 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "SELECT description_document_id, owner_user_id FROM initiative WHERE id = $1 FOR UPDATE",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "description_document_id",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 1,
+ "name": "owner_user_id",
+ "type_info": "Text"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Uuid"
+ ]
+ },
+ "nullable": [
+ false,
+ false
+ ]
+ },
+ "hash": "007d3ef4dfea1ce7abf9d643fe4bf961daaf902d4015135205e12f130af45b23"
+}
diff --git a/.sqlx/query-089ddab77c715460d9e8573812b50ba5b5eb4ba617f613b80c1ac772db727669.json b/.sqlx/query-089ddab77c715460d9e8573812b50ba5b5eb4ba617f613b80c1ac772db727669.json
index 6b9c79fc3e..a7c2304e3c 100644
--- a/.sqlx/query-089ddab77c715460d9e8573812b50ba5b5eb4ba617f613b80c1ac772db727669.json
+++ b/.sqlx/query-089ddab77c715460d9e8573812b50ba5b5eb4ba617f613b80c1ac772db727669.json
@@ -36,7 +36,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-be9196900ae5aa5d1bf5bdee0a4e8bb94fa15e24fe46ee1fd0cbeb9b644c80ea.json b/.sqlx/query-287928fad1682cfac52c0e476c7ebf1d70f2cef645c47d14a0a14506a0083e52.json
similarity index 86%
rename from .sqlx/query-be9196900ae5aa5d1bf5bdee0a4e8bb94fa15e24fe46ee1fd0cbeb9b644c80ea.json
rename to .sqlx/query-287928fad1682cfac52c0e476c7ebf1d70f2cef645c47d14a0a14506a0083e52.json
index eff841fd3f..7ffa61f0fd 100644
--- a/.sqlx/query-be9196900ae5aa5d1bf5bdee0a4e8bb94fa15e24fe46ee1fd0cbeb9b644c80ea.json
+++ b/.sqlx/query-287928fad1682cfac52c0e476c7ebf1d70f2cef645c47d14a0a14506a0083e52.json
@@ -1,6 +1,6 @@
{
"db_name": "PostgreSQL",
- "query": "\n SELECT\n pd.id,\n pd.team_id,\n pd.user_id,\n pd.display_name,\n pd.data_type as \"data_type: DataType\",\n pd.is_multi_select,\n pd.specific_entity_type as \"specific_entity_type: Option<EntityType>\",\n pd.created_at,\n pd.updated_at,\n pd.is_system,\n po.id as \"option_id?\",\n po.display_order as \"option_display_order?\",\n po.number_value as option_number_value,\n po.string_value as option_string_value,\n po.color as option_color,\n po.created_at as \"option_created_at?\",\n po.updated_at as \"option_updated_at?\"\n FROM property_definitions pd\n LEFT JOIN property_options po ON pd.id = po.property_definition_id\n WHERE\n ($3 AND pd.is_system)\n OR (\n ($1::uuid IS NOT NULL AND pd.team_id = $1)\n OR ($2::text IS NOT NULL AND pd.user_id = $2)\n )\n ORDER BY LOWER(pd.display_name), po.display_order, po.number_value, LOWER(po.string_value)\n ",
+ "query": "\n SELECT\n pd.id,\n pd.team_id,\n pd.user_id,\n pd.display_name,\n pd.data_type as \"data_type: DataType\",\n pd.is_multi_select,\n pd.specific_entity_type as \"specific_entity_type: Option<EntityType>\",\n pd.created_at,\n pd.updated_at,\n pd.is_system,\n po.id as \"option_id?\",\n po.display_order as \"option_display_order?\",\n po.number_value as option_number_value,\n po.string_value as option_string_value,\n po.color as option_color,\n po.created_at as \"option_created_at?\",\n po.updated_at as \"option_updated_at?\"\n FROM property_definitions pd\n LEFT JOIN property_options po ON pd.id = po.property_definition_id\n WHERE\n ($4::uuid[] IS NULL OR pd.id = ANY($4))\n AND (\n ($3 AND pd.is_system)\n OR ($1::uuid IS NOT NULL AND pd.team_id = $1)\n OR ($2::text IS NOT NULL AND pd.user_id = $2)\n )\n ORDER BY LOWER(pd.display_name), po.display_order, po.number_value, LOWER(po.string_value)\n ",
"describe": {
"columns": [
{
@@ -67,7 +67,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -128,7 +129,8 @@
"Left": [
"Uuid",
"Text",
- "Bool"
+ "Bool",
+ "UuidArray"
]
},
"nullable": [
@@ -151,5 +153,5 @@
false
]
},
- "hash": "be9196900ae5aa5d1bf5bdee0a4e8bb94fa15e24fe46ee1fd0cbeb9b644c80ea"
+ "hash": "287928fad1682cfac52c0e476c7ebf1d70f2cef645c47d14a0a14506a0083e52"
}
diff --git a/.sqlx/query-301f5b3142a30e271df62607b5743ff019bff1a5b0142fc260ff772837db3f39.json b/.sqlx/query-301f5b3142a30e271df62607b5743ff019bff1a5b0142fc260ff772837db3f39.json
index cbb809a7c2..24c26f6fb6 100644
--- a/.sqlx/query-301f5b3142a30e271df62607b5743ff019bff1a5b0142fc260ff772837db3f39.json
+++ b/.sqlx/query-301f5b3142a30e271df62607b5743ff019bff1a5b0142fc260ff772837db3f39.json
@@ -30,7 +30,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -115,7 +116,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -158,7 +160,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-31ac47cc5a518a93cceebbf65878f54f571c2cb9c8376918a6c20bae6c190c61.json b/.sqlx/query-31ac47cc5a518a93cceebbf65878f54f571c2cb9c8376918a6c20bae6c190c61.json
index 625010797d..0473240aed 100644
--- a/.sqlx/query-31ac47cc5a518a93cceebbf65878f54f571c2cb9c8376918a6c20bae6c190c61.json
+++ b/.sqlx/query-31ac47cc5a518a93cceebbf65878f54f571c2cb9c8376918a6c20bae6c190c61.json
@@ -30,7 +30,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -69,7 +70,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-339ed96279e420f9f18f5152d5c64b8c77fe7dae968c4ddf29e3acbedc6afae6.json b/.sqlx/query-339ed96279e420f9f18f5152d5c64b8c77fe7dae968c4ddf29e3acbedc6afae6.json
index 174d16dbfc..6ac8a4f3ee 100644
--- a/.sqlx/query-339ed96279e420f9f18f5152d5c64b8c77fe7dae968c4ddf29e3acbedc6afae6.json
+++ b/.sqlx/query-339ed96279e420f9f18f5152d5c64b8c77fe7dae968c4ddf29e3acbedc6afae6.json
@@ -30,7 +30,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -80,7 +81,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-3f3b5a5d8734e3748d4e29d64cfa89baff99dae621e7cbd7a10017beec9485c8.json b/.sqlx/query-3f3b5a5d8734e3748d4e29d64cfa89baff99dae621e7cbd7a10017beec9485c8.json
index 14090c2bfc..0f76571028 100644
--- a/.sqlx/query-3f3b5a5d8734e3748d4e29d64cfa89baff99dae621e7cbd7a10017beec9485c8.json
+++ b/.sqlx/query-3f3b5a5d8734e3748d4e29d64cfa89baff99dae621e7cbd7a10017beec9485c8.json
@@ -25,7 +25,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-45ac2a692bf3676d053ca1905fe8586ff1dd139822d3cbde8e125add5575194a.json b/.sqlx/query-45ac2a692bf3676d053ca1905fe8586ff1dd139822d3cbde8e125add5575194a.json
index 697aeae999..e47cb91623 100644
--- a/.sqlx/query-45ac2a692bf3676d053ca1905fe8586ff1dd139822d3cbde8e125add5575194a.json
+++ b/.sqlx/query-45ac2a692bf3676d053ca1905fe8586ff1dd139822d3cbde8e125add5575194a.json
@@ -26,7 +26,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-462655d9cce541e4b25cb2d85e9d2e8ce3c84e28b4f459e4ea4ef62881278ae8.json b/.sqlx/query-462655d9cce541e4b25cb2d85e9d2e8ce3c84e28b4f459e4ea4ef62881278ae8.json
index 6ced5d7c76..02b55348ed 100644
--- a/.sqlx/query-462655d9cce541e4b25cb2d85e9d2e8ce3c84e28b4f459e4ea4ef62881278ae8.json
+++ b/.sqlx/query-462655d9cce541e4b25cb2d85e9d2e8ce3c84e28b4f459e4ea4ef62881278ae8.json
@@ -67,7 +67,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-4cc83ea0dfe3d47bf30c18701f37f77a52760d279c5dbdeae68b88d329d8c124.json b/.sqlx/query-4cc83ea0dfe3d47bf30c18701f37f77a52760d279c5dbdeae68b88d329d8c124.json
index 170cdf8f1f..60b88590ac 100644
--- a/.sqlx/query-4cc83ea0dfe3d47bf30c18701f37f77a52760d279c5dbdeae68b88d329d8c124.json
+++ b/.sqlx/query-4cc83ea0dfe3d47bf30c18701f37f77a52760d279c5dbdeae68b88d329d8c124.json
@@ -25,7 +25,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-4e7dff37296c4976495ee40673ee20a6729b6ce030222e1776a0fd22d93bafb7.json b/.sqlx/query-4e7dff37296c4976495ee40673ee20a6729b6ce030222e1776a0fd22d93bafb7.json
index 76543634dc..8b61c096c5 100644
--- a/.sqlx/query-4e7dff37296c4976495ee40673ee20a6729b6ce030222e1776a0fd22d93bafb7.json
+++ b/.sqlx/query-4e7dff37296c4976495ee40673ee20a6729b6ce030222e1776a0fd22d93bafb7.json
@@ -67,7 +67,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-5426870d4de50026ecdc17a7369e3bc375958d3556b33f318c7ef44814bcc96c.json b/.sqlx/query-5426870d4de50026ecdc17a7369e3bc375958d3556b33f318c7ef44814bcc96c.json
index 316415477c..cfcf4e70a5 100644
--- a/.sqlx/query-5426870d4de50026ecdc17a7369e3bc375958d3556b33f318c7ef44814bcc96c.json
+++ b/.sqlx/query-5426870d4de50026ecdc17a7369e3bc375958d3556b33f318c7ef44814bcc96c.json
@@ -30,7 +30,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -79,7 +80,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-55d25e12b2b7effa8b188f1ec354c00e1ea2c0f77a18d9c6c032f472b04ea46e.json b/.sqlx/query-55d25e12b2b7effa8b188f1ec354c00e1ea2c0f77a18d9c6c032f472b04ea46e.json
new file mode 100644
index 0000000000..409c43239a
--- /dev/null
+++ b/.sqlx/query-55d25e12b2b7effa8b188f1ec354c00e1ea2c0f77a18d9c6c032f472b04ea46e.json
@@ -0,0 +1,28 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "SELECT task_id, initiative_id FROM task_initiative WHERE task_id = ANY($1)",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "task_id",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 1,
+ "name": "initiative_id",
+ "type_info": "Uuid"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "TextArray"
+ ]
+ },
+ "nullable": [
+ false,
+ false
+ ]
+ },
+ "hash": "55d25e12b2b7effa8b188f1ec354c00e1ea2c0f77a18d9c6c032f472b04ea46e"
+}
diff --git a/.sqlx/query-6645d947e0e4f0c75e6a34b49690b22130ff90a6af5659837e2202381be03393.json b/.sqlx/query-6645d947e0e4f0c75e6a34b49690b22130ff90a6af5659837e2202381be03393.json
index af19313955..a362a1c761 100644
--- a/.sqlx/query-6645d947e0e4f0c75e6a34b49690b22130ff90a6af5659837e2202381be03393.json
+++ b/.sqlx/query-6645d947e0e4f0c75e6a34b49690b22130ff90a6af5659837e2202381be03393.json
@@ -30,7 +30,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -80,7 +81,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-6a5e78ae2a24b1c443a38d9ecc41184b8cd192359c2aabcd8b4e2f8375ac493f.json b/.sqlx/query-6a5e78ae2a24b1c443a38d9ecc41184b8cd192359c2aabcd8b4e2f8375ac493f.json
index a599a60781..99a86f1a59 100644
--- a/.sqlx/query-6a5e78ae2a24b1c443a38d9ecc41184b8cd192359c2aabcd8b4e2f8375ac493f.json
+++ b/.sqlx/query-6a5e78ae2a24b1c443a38d9ecc41184b8cd192359c2aabcd8b4e2f8375ac493f.json
@@ -26,7 +26,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-6fd87794b687b1687b8c4f0bc0390ffcc91811ae9909ce333273e6bf77013b03.json b/.sqlx/query-6fd87794b687b1687b8c4f0bc0390ffcc91811ae9909ce333273e6bf77013b03.json
index 66a65818f9..fe60e92ff6 100644
--- a/.sqlx/query-6fd87794b687b1687b8c4f0bc0390ffcc91811ae9909ce333273e6bf77013b03.json
+++ b/.sqlx/query-6fd87794b687b1687b8c4f0bc0390ffcc91811ae9909ce333273e6bf77013b03.json
@@ -67,7 +67,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -123,7 +124,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-7c4b46b16a635d672e78bcfa44d07bc3c5cdd851ed623b1a068022eed85fa96b.json b/.sqlx/query-7c4b46b16a635d672e78bcfa44d07bc3c5cdd851ed623b1a068022eed85fa96b.json
index b887727dc7..fbf0aa64d7 100644
--- a/.sqlx/query-7c4b46b16a635d672e78bcfa44d07bc3c5cdd851ed623b1a068022eed85fa96b.json
+++ b/.sqlx/query-7c4b46b16a635d672e78bcfa44d07bc3c5cdd851ed623b1a068022eed85fa96b.json
@@ -21,7 +21,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-7d08bfd9600cf2460a1ee8769d415d3963907a083ffe68ef8eaf679e898ca354.json b/.sqlx/query-7d08bfd9600cf2460a1ee8769d415d3963907a083ffe68ef8eaf679e898ca354.json
index c0859295bc..c99376f82d 100644
--- a/.sqlx/query-7d08bfd9600cf2460a1ee8769d415d3963907a083ffe68ef8eaf679e898ca354.json
+++ b/.sqlx/query-7d08bfd9600cf2460a1ee8769d415d3963907a083ffe68ef8eaf679e898ca354.json
@@ -67,7 +67,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-92b9f96f119c098f3c790e8276f77595535d586e6cfb1ecb0a5411c869a14cfb.json b/.sqlx/query-92b9f96f119c098f3c790e8276f77595535d586e6cfb1ecb0a5411c869a14cfb.json
new file mode 100644
index 0000000000..de64fbd635
--- /dev/null
+++ b/.sqlx/query-92b9f96f119c098f3c790e8276f77595535d586e6cfb1ecb0a5411c869a14cfb.json
@@ -0,0 +1,53 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n SELECT entity_type AS \"entity_type: EntityType\", property_definition_id, values\n FROM entity_properties\n WHERE entity_id = $1\n ",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "entity_type: EntityType",
+ "type_info": {
+ "Custom": {
+ "name": "property_entity_type",
+ "kind": {
+ "Enum": [
+ "CHANNEL",
+ "CHAT",
+ "DOCUMENT",
+ "PROJECT",
+ "THREAD",
+ "USER",
+ "COMPANY",
+ "TASK",
+ "CALL_RECORD",
+ "CALENDAR_EVENT",
+ "INITIATIVE"
+ ]
+ }
+ }
+ }
+ },
+ {
+ "ordinal": 1,
+ "name": "property_definition_id",
+ "type_info": "Uuid"
+ },
+ {
+ "ordinal": 2,
+ "name": "values",
+ "type_info": "Jsonb"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Text"
+ ]
+ },
+ "nullable": [
+ false,
+ false,
+ true
+ ]
+ },
+ "hash": "92b9f96f119c098f3c790e8276f77595535d586e6cfb1ecb0a5411c869a14cfb"
+}
diff --git a/.sqlx/query-9c7cf0202d59d6a1d07ba2254b99d316468775a153e273437ef05bbae2c6f346.json b/.sqlx/query-9c7cf0202d59d6a1d07ba2254b99d316468775a153e273437ef05bbae2c6f346.json
index 7efe085d5e..284a0df31f 100644
--- a/.sqlx/query-9c7cf0202d59d6a1d07ba2254b99d316468775a153e273437ef05bbae2c6f346.json
+++ b/.sqlx/query-9c7cf0202d59d6a1d07ba2254b99d316468775a153e273437ef05bbae2c6f346.json
@@ -30,7 +30,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -84,7 +85,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-a63c0f9e0b3c58438d46cff265e3f412890402e3627b85d5dfb74a08d72787e1.json b/.sqlx/query-a63c0f9e0b3c58438d46cff265e3f412890402e3627b85d5dfb74a08d72787e1.json
index 0e73a87f03..ca5970dd65 100644
--- a/.sqlx/query-a63c0f9e0b3c58438d46cff265e3f412890402e3627b85d5dfb74a08d72787e1.json
+++ b/.sqlx/query-a63c0f9e0b3c58438d46cff265e3f412890402e3627b85d5dfb74a08d72787e1.json
@@ -67,7 +67,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-a941261a6ffe89c2759c51f101302e8ea9c710ace7d2dff7e614d4e2933f3569.json b/.sqlx/query-a941261a6ffe89c2759c51f101302e8ea9c710ace7d2dff7e614d4e2933f3569.json
index 1bde31e64c..163f99f5a7 100644
--- a/.sqlx/query-a941261a6ffe89c2759c51f101302e8ea9c710ace7d2dff7e614d4e2933f3569.json
+++ b/.sqlx/query-a941261a6ffe89c2759c51f101302e8ea9c710ace7d2dff7e614d4e2933f3569.json
@@ -25,7 +25,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-aca8220ff6a196f591e767423a06d4760803e257bb93194abc5225e54ce0794d.json b/.sqlx/query-aca8220ff6a196f591e767423a06d4760803e257bb93194abc5225e54ce0794d.json
new file mode 100644
index 0000000000..fb1b1312db
--- /dev/null
+++ b/.sqlx/query-aca8220ff6a196f591e767423a06d4760803e257bb93194abc5225e54ce0794d.json
@@ -0,0 +1,59 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n WITH user_source_ids AS (\n SELECT cp.channel_id::text AS source_id FROM comms_channel_participants cp\n WHERE cp.user_id = $1 AND cp.left_at IS NULL\n UNION ALL SELECT team_id::text FROM team_user WHERE user_id = $1\n UNION ALL SELECT $1\n )\n SELECT i.id, i.name, i.owner_user_id, i.description_document_id,\n i.created_at, i.updated_at, uh.\"updatedAt\"::timestamptz AS viewed_at\n FROM initiative i\n LEFT JOIN \"UserHistory\" uh ON uh.\"itemId\" = i.id::text\n AND uh.\"itemType\" = 'initiative' AND uh.\"userId\" = $1\n WHERE i.id = ANY($2) AND (\n EXISTS (SELECT 1 FROM entity_access ea\n WHERE ea.entity_id = i.id AND ea.entity_type = 'initiative'\n AND ea.source_id IN (SELECT source_id FROM user_source_ids))\n OR EXISTS (SELECT 1 FROM \"SharePermission\" sp\n JOIN team_user owner_team ON owner_team.user_id = i.owner_user_id\n WHERE sp.id = i.share_permission_id AND sp.\"linkShare\" = 'TEAM'\n AND owner_team.team_id::text IN (SELECT source_id FROM user_source_ids))\n )\n",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "id",
+ "type_info": "Uuid"
+ },
+ {
+ "ordinal": 1,
+ "name": "name",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 2,
+ "name": "owner_user_id",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 3,
+ "name": "description_document_id",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 4,
+ "name": "created_at",
+ "type_info": "Timestamptz"
+ },
+ {
+ "ordinal": 5,
+ "name": "updated_at",
+ "type_info": "Timestamptz"
+ },
+ {
+ "ordinal": 6,
+ "name": "viewed_at",
+ "type_info": "Timestamptz"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Text",
+ "UuidArray"
+ ]
+ },
+ "nullable": [
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ null
+ ]
+ },
+ "hash": "aca8220ff6a196f591e767423a06d4760803e257bb93194abc5225e54ce0794d"
+}
diff --git a/.sqlx/query-ad97ba51e2f2fa5f9a82426e4fee151044d5b6ba667d90bd8a63a21f28ce6b43.json b/.sqlx/query-ad97ba51e2f2fa5f9a82426e4fee151044d5b6ba667d90bd8a63a21f28ce6b43.json
index d91ee00599..3ca898d4da 100644
--- a/.sqlx/query-ad97ba51e2f2fa5f9a82426e4fee151044d5b6ba667d90bd8a63a21f28ce6b43.json
+++ b/.sqlx/query-ad97ba51e2f2fa5f9a82426e4fee151044d5b6ba667d90bd8a63a21f28ce6b43.json
@@ -26,7 +26,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-b069a57e11e7ed107a8495a4eb2d739b9751e8c1c7703fe2513b14c0ad0e42c2.json b/.sqlx/query-b069a57e11e7ed107a8495a4eb2d739b9751e8c1c7703fe2513b14c0ad0e42c2.json
index 85f814cdf2..29a764a3e2 100644
--- a/.sqlx/query-b069a57e11e7ed107a8495a4eb2d739b9751e8c1c7703fe2513b14c0ad0e42c2.json
+++ b/.sqlx/query-b069a57e11e7ed107a8495a4eb2d739b9751e8c1c7703fe2513b14c0ad0e42c2.json
@@ -30,7 +30,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -79,7 +80,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-b68293cb0a18d2274fade4859e0ddcaf7352f2c8e7409d8eb3565cdeabb4fe6a.json b/.sqlx/query-b68293cb0a18d2274fade4859e0ddcaf7352f2c8e7409d8eb3565cdeabb4fe6a.json
index 949b6cc007..36116589ab 100644
--- a/.sqlx/query-b68293cb0a18d2274fade4859e0ddcaf7352f2c8e7409d8eb3565cdeabb4fe6a.json
+++ b/.sqlx/query-b68293cb0a18d2274fade4859e0ddcaf7352f2c8e7409d8eb3565cdeabb4fe6a.json
@@ -30,7 +30,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -115,7 +116,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -158,7 +160,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-b6a900ce4ef05b399b15c5df9df622228577a112642245990b64442fb691305f.json b/.sqlx/query-b6a900ce4ef05b399b15c5df9df622228577a112642245990b64442fb691305f.json
index 7b26589551..f4491278f0 100644
--- a/.sqlx/query-b6a900ce4ef05b399b15c5df9df622228577a112642245990b64442fb691305f.json
+++ b/.sqlx/query-b6a900ce4ef05b399b15c5df9df622228577a112642245990b64442fb691305f.json
@@ -67,7 +67,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-c12b511f8fbe853ce8e5489db2468ee8a07030cb234bc0a10bc014c493b8e9c2.json b/.sqlx/query-c12b511f8fbe853ce8e5489db2468ee8a07030cb234bc0a10bc014c493b8e9c2.json
index e5e7920533..c4481afa76 100644
--- a/.sqlx/query-c12b511f8fbe853ce8e5489db2468ee8a07030cb234bc0a10bc014c493b8e9c2.json
+++ b/.sqlx/query-c12b511f8fbe853ce8e5489db2468ee8a07030cb234bc0a10bc014c493b8e9c2.json
@@ -20,7 +20,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-d09a22b5d0a049677c6fc96d0aef74260d592ae30752c12a50512ebf95592e5f.json b/.sqlx/query-d09a22b5d0a049677c6fc96d0aef74260d592ae30752c12a50512ebf95592e5f.json
index 93db5a63f2..b5ab7db4d3 100644
--- a/.sqlx/query-d09a22b5d0a049677c6fc96d0aef74260d592ae30752c12a50512ebf95592e5f.json
+++ b/.sqlx/query-d09a22b5d0a049677c6fc96d0aef74260d592ae30752c12a50512ebf95592e5f.json
@@ -30,7 +30,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -115,7 +116,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
@@ -154,7 +156,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-eaf32ba063527b6af6e09f701039d2bf0fd4316d9e1280175eca27a0470c2a71.json b/.sqlx/query-eaf32ba063527b6af6e09f701039d2bf0fd4316d9e1280175eca27a0470c2a71.json
index 1eb8d0c3e8..fbb813325f 100644
--- a/.sqlx/query-eaf32ba063527b6af6e09f701039d2bf0fd4316d9e1280175eca27a0470c2a71.json
+++ b/.sqlx/query-eaf32ba063527b6af6e09f701039d2bf0fd4316d9e1280175eca27a0470c2a71.json
@@ -31,7 +31,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/.sqlx/query-f54491fb1559e95fd91f725c67f260e2057b1bf4679801f170bcf8f891027282.json b/.sqlx/query-f54491fb1559e95fd91f725c67f260e2057b1bf4679801f170bcf8f891027282.json
index ace10abd78..06aab5ed62 100644
--- a/.sqlx/query-f54491fb1559e95fd91f725c67f260e2057b1bf4679801f170bcf8f891027282.json
+++ b/.sqlx/query-f54491fb1559e95fd91f725c67f260e2057b1bf4679801f170bcf8f891027282.json
@@ -78,7 +78,8 @@
"COMPANY",
"TASK",
"CALL_RECORD",
- "CALENDAR_EVENT"
+ "CALENDAR_EVENT",
+ "INITIATIVE"
]
}
}
diff --git a/Cargo.lock b/Cargo.lock
index a0da8bd261..361591af40 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3156,7 +3156,7 @@ dependencies = [
[[package]]
name = "cache-wasm"
-version = "0.6.19"
+version = "0.6.24"
dependencies = [
"async-lock",
"cache-core",
@@ -4094,6 +4094,7 @@ dependencies = [
"graphql_email",
"graphql_entity_mutation",
"graphql_favorite",
+ "graphql_initiative",
"graphql_notification",
"graphql_permission",
"graphql_properties",
@@ -5649,6 +5650,7 @@ dependencies = [
"frecency",
"futures",
"github",
+ "graphql_initiative",
"graphql_soup",
"harnesses",
"hex",
@@ -7737,6 +7739,34 @@ dependencies = [
"workspace-hack",
]
+[[package]]
+name = "graphql_initiative"
+version = "0.1.0"
+dependencies = [
+ "async-graphql",
+ "chrono",
+ "entity_access",
+ "futures",
+ "graphql_common",
+ "graphql_permission",
+ "graphql_soup",
+ "initiative",
+ "macro_user_id",
+ "model-entity",
+ "model_owner",
+ "models_pagination",
+ "models_permissions",
+ "models_properties",
+ "models_soup",
+ "rootcause",
+ "serde",
+ "soup",
+ "tokio",
+ "tracing",
+ "uuid",
+ "workspace-hack",
+]
+
[[package]]
name = "graphql_notification"
version = "0.1.0"
@@ -9133,11 +9163,14 @@ dependencies = [
"model-error-response",
"model_user",
"models_permissions",
+ "models_properties",
+ "properties",
"rootcause",
"serde",
"serde_json",
"share_permission_db_utils",
"sqlx",
+ "system_properties",
"thiserror 2.0.18",
"tokio",
"tower 0.5.3",
diff --git a/Cargo.toml b/Cargo.toml
index 79760c147e..176493eb07 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -51,6 +51,7 @@ members = [
"crates/graphql_email",
"crates/graphql_entity_mutation",
"crates/graphql_favorite",
+ "crates/graphql_initiative",
"crates/graphql_notification",
"crates/graphql_permission",
"crates/graphql_properties",
diff --git a/apps/web/src/features/next-soup/filters/query-filters.test.ts b/apps/web/src/features/next-soup/filters/query-filters.test.ts
index 08ad33005f..6363db721e 100644
--- a/apps/web/src/features/next-soup/filters/query-filters.test.ts
+++ b/apps/web/src/features/next-soup/filters/query-filters.test.ts
@@ -185,6 +185,99 @@ describe('filterSoupItemByRequestBody', () => {
});
});
+describe('initiative cache membership', () => {
+ const initiative: SoupApiItem = {
+ tag: 'initiative',
+ is_favorited: false,
+ frecency_score: 0,
+ data: {
+ id: 'initiative',
+ name: 'Launch',
+ ownerId: 'owner',
+ createdAt: '2026-09-01',
+ updatedAt: '2026-09-26',
+ properties: [],
+ },
+ };
+ it('requires explicit initiative inclusion and never confuses projects with folders', () => {
+ expect(filterSoupItemByRequestBody(initiative, {})).toBe(false);
+ expect(
+ filterSoupItemByRequestBody(initiative, { ...QUERY_FILTERS_BASE })
+ ).toBe(false);
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ project_filters: { project_ids: ['initiative'] },
+ })
+ ).toBe(false);
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ initiative_filters: { initiative_ids: ['initiative'] },
+ })
+ ).toBe(true);
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ initiative_filters: { initiative_ids: ['another'] },
+ })
+ ).toBe(false);
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ initiative_filters: { include: true, owners: ['owner'] },
+ })
+ ).toBe(true);
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ initiative_filters: { include: true, owners: ['another'] },
+ })
+ ).toBe(false);
+ });
+
+ it.each([
+ { name: 'launch' },
+ { name: '' },
+ { due_after: '2026-09-01T00:00:00Z' },
+ { due_before: '2026-09-30T00:00:00Z' },
+ ])('retains initiatives requested by %j', (filters) => {
+ // Each present value expands to a positive server literal. An empty name
+ // is still a literal, and include:false does not negate the other filters.
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ initiative_filters: filters,
+ })
+ ).toBe(true);
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ initiative_filters: { include: false, ...filters },
+ })
+ ).toBe(true);
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ initiative_filters: { ...filters, initiative_ids: ['another'] },
+ })
+ ).toBe(false);
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ initiative_filters: { ...filters, owners: ['another'] },
+ })
+ ).toBe(false);
+ });
+
+ it.each([
+ {},
+ { include: false },
+ { initiative_ids: [], owners: [] },
+ { name: null, due_after: null, due_before: null },
+ ])(
+ 'keeps initiatives excluded when filters have no literals: %j',
+ (filters) => {
+ expect(
+ filterSoupItemByRequestBody(initiative, {
+ initiative_filters: filters,
+ })
+ ).toBe(false);
+ }
+ );
+});
+
describe('soupItemMatchesProjectMembership', () => {
const PROJECT = 'proj-1';
diff --git a/apps/web/src/features/next-soup/filters/query-filters.ts b/apps/web/src/features/next-soup/filters/query-filters.ts
index a45e6a95ce..487a77ae0c 100644
--- a/apps/web/src/features/next-soup/filters/query-filters.ts
+++ b/apps/web/src/features/next-soup/filters/query-filters.ts
@@ -167,6 +167,23 @@ export function filterSoupItemByRequestBody(
{ tag: 'reminder' },
({ data }) => !isIdFilteredOut(body.reminder_filters?.ids, data.id)
)
+ .with({ tag: 'initiative' }, ({ data }) => {
+ const filters = body.initiative_filters;
+ // Match the server's opt-in rule; cached projects never leak into tasks
+ // or folders when an older Soup caller has no initiative filter.
+ const optedIn =
+ filters?.include === true ||
+ Boolean(filters?.initiative_ids?.length) ||
+ Boolean(filters?.owners?.length) ||
+ (filters?.name !== undefined && filters.name !== null) ||
+ (filters?.due_after !== undefined && filters.due_after !== null) ||
+ (filters?.due_before !== undefined && filters.due_before !== null);
+ return (
+ optedIn &&
+ !isIdFilteredOut(filters?.initiative_ids, data.id) &&
+ !isValueFilteredOut(filters?.owners, data.ownerId)
+ );
+ })
.with({ tag: 'agentSession' }, ({ data }) => {
const filters = body.agent_session_filters;
// Agent sessions are opt-in on the server: a body that neither includes
diff --git a/apps/web/src/features/property/editors/selectors/entityUtils.ts b/apps/web/src/features/property/editors/selectors/entityUtils.ts
index 4abaf0070e..0d3ea49ada 100644
--- a/apps/web/src/features/property/editors/selectors/entityUtils.ts
+++ b/apps/web/src/features/property/editors/selectors/entityUtils.ts
@@ -29,6 +29,8 @@ export type EntityTypeItemMap = {
TASK: EntityItem<TaskEntity>;
THREAD: EntityItem<EmailEntity>;
COMPANY: never;
+ // Native projects use the initiative picker, separate from folder quick access.
+ INITIATIVE: never;
// Call records aren't entity-reference targets in quickAccess.
CALL_RECORD: never;
CALENDAR_EVENT: never;
@@ -46,6 +48,7 @@ function entityTypeToBuckets(entityType: EntityType): readonly Bucket[] {
.with('CHAT', () => ['chat'] as const)
.with('TASK', () => ['task'] as const)
.with('THREAD', () => ['email'] as const) // Note: emails aren't in quickAccess yet, handled separately
+ .with('INITIATIVE', () => [] as const)
.with('COMPANY', () => [] as const) // Companies aren't in quickAccess
.with('CALL_RECORD', () => [] as const) // Call records aren't in quickAccess
.with('CALENDAR_EVENT', () => [] as const) // Calendar events aren't in quickAccess
diff --git a/apps/web/src/features/property/hooks/usePropertyEntityDisplay.tsx b/apps/web/src/features/property/hooks/usePropertyEntityDisplay.tsx
index d51cc208c1..4e5a387048 100644
--- a/apps/web/src/features/property/hooks/usePropertyEntityDisplay.tsx
+++ b/apps/web/src/features/property/hooks/usePropertyEntityDisplay.tsx
@@ -103,6 +103,7 @@ export function usePropertyEntityDisplay(
const name = createMemo(() =>
match(entityType())
+ .with('INITIATIVE', () => 'Project')
.with('USER', () => userName())
.with('CHANNEL', () => channelName() || 'Channel')
.with('COMPANY', () => entityId())
diff --git a/apps/web/src/features/property/utils/entityConversion.ts b/apps/web/src/features/property/utils/entityConversion.ts
index f3a1404736..4674ab0a96 100644
--- a/apps/web/src/features/property/utils/entityConversion.ts
+++ b/apps/web/src/features/property/utils/entityConversion.ts
@@ -59,7 +59,7 @@ export function entityTypeToItemType(type: EntityType): ItemType | undefined {
.with('CHAT', () => 'chat')
.with('CALL_RECORD', () => 'call')
.with('THREAD', () => 'email')
- .with('COMPANY', 'USER', 'CALENDAR_EVENT', () => undefined)
+ .with('COMPANY', 'USER', 'CALENDAR_EVENT', 'INITIATIVE', () => undefined)
.exhaustive();
}
diff --git a/apps/web/src/lib/graphql-cache/generated/entity-resolver-schema.ts b/apps/web/src/lib/graphql-cache/generated/entity-resolver-schema.ts
index f8398c8b32..66997d9c82 100644
--- a/apps/web/src/lib/graphql-cache/generated/entity-resolver-schema.ts
+++ b/apps/web/src/lib/graphql-cache/generated/entity-resolver-schema.ts
@@ -33,12 +33,20 @@ export const entityResolverSchema = {
['input', 'threadId'],
],
},
+ updateInitiative: {
+ targets: ['GraphqlSoupInitiative'],
+ argumentPaths: [['initiativeId']],
+ },
},
GraphqlUser: {
emailThread: {
targets: ['GraphqlSoupEmailThread'],
argumentPaths: [['input', 'threadId']],
},
+ initiative: {
+ targets: ['GraphqlSoupInitiative'],
+ argumentPaths: [['initiativeId']],
+ },
},
} as const;
@@ -46,8 +54,10 @@ export type GeneratedEntityResolverSchema = typeof entityResolverSchema;
export type GeneratedEntityResolverTarget =
| 'GraphqlChannelActivity'
| 'GraphqlProperty'
- | 'GraphqlSoupEmailThread';
+ | 'GraphqlSoupEmailThread'
+ | 'GraphqlSoupInitiative';
export type GeneratedEntityResolverArgumentPath =
+ | readonly ['initiativeId']
| readonly ['input', 'channelId']
| readonly ['input', 'labelId']
| readonly ['input', 'propertyDefinitionId']
diff --git a/apps/web/src/lib/queries/soup/graphql/entity-input.ts b/apps/web/src/lib/queries/soup/graphql/entity-input.ts
index 3082883e00..c5f2b51f93 100644
--- a/apps/web/src/lib/queries/soup/graphql/entity-input.ts
+++ b/apps/web/src/lib/queries/soup/graphql/entity-input.ts
@@ -108,7 +108,7 @@ export function buildGraphqlEntitySoupInput(
.with('CALENDAR_EVENT', () => ({
calendarEventFilter: { literal: { id: entityId } },
}))
- .with('USER', () => undefined)
+ .with('USER', 'INITIATIVE', () => undefined)
.exhaustive();
if (!targetFilter) return undefined;
diff --git a/apps/web/src/lib/queries/soup/normalized-cache/operations.test.ts b/apps/web/src/lib/queries/soup/normalized-cache/operations.test.ts
index 630dc6d347..8f7d6543ea 100644
--- a/apps/web/src/lib/queries/soup/normalized-cache/operations.test.ts
+++ b/apps/web/src/lib/queries/soup/normalized-cache/operations.test.ts
@@ -258,6 +258,11 @@ describe('buildSingleEntityFilter', () => {
filterKey: 'project_filters',
idKey: 'project_ids',
},
+ {
+ entityType: 'initiative' as const,
+ filterKey: 'initiative_filters',
+ idKey: 'initiative_ids',
+ },
{
entityType: 'call' as const,
filterKey: 'call_filters',
diff --git a/apps/web/src/lib/queries/soup/normalized-cache/operations.ts b/apps/web/src/lib/queries/soup/normalized-cache/operations.ts
index b53e438efd..590a30f2f7 100644
--- a/apps/web/src/lib/queries/soup/normalized-cache/operations.ts
+++ b/apps/web/src/lib/queries/soup/normalized-cache/operations.ts
@@ -932,6 +932,10 @@ export function buildSingleEntityFilter(
...base,
reminder_filters: { ids: [entityId] },
}))
+ .with('initiative', () => ({
+ ...base,
+ initiative_filters: { initiative_ids: [entityId] },
+ }))
.with('agentSession', () => ({
...base,
agent_session_filters: { ids: [entityId] },
diff --git a/apps/web/src/lib/queries/soup/transform-utils.test.ts b/apps/web/src/lib/queries/soup/transform-utils.test.ts
index d52cbfd429..49441e1d17 100644
--- a/apps/web/src/lib/queries/soup/transform-utils.test.ts
+++ b/apps/web/src/lib/queries/soup/transform-utils.test.ts
@@ -1,6 +1,9 @@
import type { SoupApiItem } from '@service-storage/generated/schemas';
import { describe, expect, it, vi } from 'vitest';
-import { mapApiSoupItemToEntity } from './transform-utils';
+import {
+ isDisplayableSoupItem,
+ mapApiSoupItemToEntity,
+} from './transform-utils';
vi.mock('@core/constant/allBlocks', () => ({
blockNameToDefaultFile: {},
@@ -9,6 +12,28 @@ vi.mock('@core/constant/allBlocks', () => ({
vi.mock('@core/context/channels', () => ({ useChannelsContext: vi.fn() }));
vi.mock('@core/user', () => ({ emailToId: vi.fn() }));
+describe('initiative rollout compatibility', () => {
+ it('does not present opt-in initiatives as existing folders or tasks', () => {
+ const item = {
+ tag: 'initiative',
+ is_favorited: false,
+ frecency_score: 0,
+ data: {
+ id: 'initiative',
+ name: 'Launch',
+ ownerId: 'owner',
+ createdAt: '2026-09-01',
+ updatedAt: '2026-09-26',
+ properties: [],
+ },
+ } satisfies SoupApiItem;
+ expect(isDisplayableSoupItem(item)).toBe(false);
+ expect(() => mapApiSoupItemToEntity(item)).toThrow(
+ 'Initiative Soup rendering is not enabled'
+ );
+ });
+});
+
describe('chat soup entities', () => {
it.each(['openai/gpt-5.6', 'anthropic/claude-sonnet-5', null, undefined])(
'preserves an optional saved model (%s) from REST or mapped GraphQL data',
diff --git a/apps/web/src/lib/queries/soup/transform-utils.ts b/apps/web/src/lib/queries/soup/transform-utils.ts
index 88ce5cdead..28db4c8c45 100644
--- a/apps/web/src/lib/queries/soup/transform-utils.ts
+++ b/apps/web/src/lib/queries/soup/transform-utils.ts
@@ -644,7 +644,7 @@ const resolveDocumentEntityName = (
export const isDisplayableSoupItem = (
item: SoupPage['items'][number]
-): item is DisplayableSoupItem => Boolean(item);
+): item is DisplayableSoupItem => Boolean(item) && item.tag !== 'initiative';
/**
* The email soup query encodes "no sort timestamp" — e.g. a never-viewed thread
@@ -746,6 +746,11 @@ export const mapApiSoupItemToEntity = (
item: DisplayableSoupItem
): SoupEntity => {
const entity = match(item)
+ // Initiatives are opt-in on the server. Their frontend adapter lands with
+ // the Projects UI; existing lists exclude them via isDisplayableSoupItem.
+ .with({ tag: 'initiative' }, () => {
+ throw new Error('Initiative Soup rendering is not enabled');
+ })
.with({ tag: 'agentSession' }, (item) => ({
...item.data,
type: 'agent_session' as const,
diff --git a/apps/web/src/lib/service-clients/service-properties/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-properties/generated/schemas/entityType.ts
index 8e55b4079f..b43ff293d8 100644
--- a/apps/web/src/lib/service-clients/service-properties/generated/schemas/entityType.ts
+++ b/apps/web/src/lib/service-clients/service-properties/generated/schemas/entityType.ts
@@ -18,6 +18,7 @@ export const EntityType = {
CHAT: 'CHAT',
COMPANY: 'COMPANY',
DOCUMENT: 'DOCUMENT',
+ INITIATIVE: 'INITIATIVE',
PROJECT: 'PROJECT',
TASK: 'TASK',
THREAD: 'THREAD',
diff --git a/apps/web/src/lib/service-clients/service-properties/generated/schemas/propertyTargetEntityType.ts b/apps/web/src/lib/service-clients/service-properties/generated/schemas/propertyTargetEntityType.ts
index 572bc005e4..84e68ebf7c 100644
--- a/apps/web/src/lib/service-clients/service-properties/generated/schemas/propertyTargetEntityType.ts
+++ b/apps/web/src/lib/service-clients/service-properties/generated/schemas/propertyTargetEntityType.ts
@@ -22,6 +22,7 @@ export const PropertyTargetEntityType = {
CHAT: 'CHAT',
COMPANY: 'COMPANY',
DOCUMENT: 'DOCUMENT',
+ INITIATIVE: 'INITIATIVE',
PROJECT: 'PROJECT',
THREAD: 'THREAD',
USER: 'USER',
diff --git a/apps/web/src/lib/service-clients/service-properties/generated/zod.ts b/apps/web/src/lib/service-clients/service-properties/generated/zod.ts
index b785442244..37f0808565 100644
--- a/apps/web/src/lib/service-clients/service-properties/generated/zod.ts
+++ b/apps/web/src/lib/service-clients/service-properties/generated/zod.ts
@@ -25,6 +25,7 @@ export const listPropertiesQueryParams = zod.object({
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -101,6 +102,7 @@ export const listPropertiesResponseItem = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -181,6 +183,7 @@ export const listPropertiesResponseItem = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -307,6 +310,7 @@ export const createPropertyDefinitionBody = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -411,6 +415,7 @@ export const getPropertyDefinitionResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -605,6 +610,7 @@ export const getBulkEntityPropertiesBody = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'THREAD',
'USER',
@@ -700,6 +706,7 @@ export const getBulkEntityPropertiesResponse = zod.record(
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -767,6 +774,7 @@ export const getBulkEntityPropertiesResponse = zod.record(
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -863,6 +871,7 @@ export const getBulkEntityPropertiesResponse = zod.record(
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -927,6 +936,7 @@ export const getEntityPropertiesParams = zod.object({
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'THREAD',
'USER',
@@ -1013,6 +1023,7 @@ export const getEntityPropertiesResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -1080,6 +1091,7 @@ export const getEntityPropertiesResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -1176,6 +1188,7 @@ export const getEntityPropertiesResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -1245,6 +1258,7 @@ export const bulkUpdateEntityPropertyOptionsParams = zod.object({
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'THREAD',
'USER',
@@ -1317,6 +1331,7 @@ export const setEntityPropertyParams = zod.object({
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'THREAD',
'USER',
@@ -1384,6 +1399,7 @@ export const setEntityPropertyBody = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -1419,6 +1435,7 @@ export const setEntityPropertyBody = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -1481,6 +1498,7 @@ export const addEntityPropertyOptionParams = zod.object({
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'THREAD',
'USER',
@@ -1505,6 +1523,7 @@ export const removeEntityPropertyOptionParams = zod.object({
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'THREAD',
'USER',
@@ -1551,6 +1570,7 @@ export const bulkUpdateEntitiesPropertyOptionsBody = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'THREAD',
'USER',
@@ -1596,6 +1616,7 @@ export const bulkUpdateEntitiesPropertyOptionsResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'THREAD',
'USER',
@@ -1703,6 +1724,7 @@ export const listTagsResponseItem = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -1844,6 +1866,7 @@ export const ensureTagSetResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
diff --git a/apps/web/src/lib/service-clients/service-properties/openapi.json b/apps/web/src/lib/service-clients/service-properties/openapi.json
index a71d891cdf..2c22ce8fcc 100644
--- a/apps/web/src/lib/service-clients/service-properties/openapi.json
+++ b/apps/web/src/lib/service-clients/service-properties/openapi.json
@@ -1421,6 +1421,7 @@
"CHAT",
"COMPANY",
"DOCUMENT",
+ "INITIATIVE",
"PROJECT",
"TASK",
"THREAD",
@@ -1931,6 +1932,7 @@
"CHAT",
"COMPANY",
"DOCUMENT",
+ "INITIATIVE",
"PROJECT",
"THREAD",
"USER"
diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts b/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts
index 94a7cf02e4..806264d8a8 100644
--- a/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts
+++ b/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts
@@ -14,6 +14,7 @@ import type { CrmCompanyFilters } from './crmCompanyFilters';
import type { DocumentFilters } from './documentFilters';
import type { EmailFilters } from './emailFilters';
import type { ForeignEntityFilters } from './foreignEntityFilters';
+import type { InitiativeFilters } from './initiativeFilters';
import type { ProjectFilters } from './projectFilters';
import type { PropertyFilter } from './propertyFilter';
import type { ReminderFilters } from './reminderFilters';
@@ -43,6 +44,8 @@ export interface EntityFilters {
email_filters?: EmailFilters;
/** the bundled [ForeignEntityFilters] */
foreign_entity_filters?: ForeignEntityFilters;
+ /** Initiative filters. Initiatives are opt-in. */
+ initiative_filters?: InitiativeFilters;
/** the bundled [ProjectFilters] */
project_filters?: ProjectFilters;
/** property-based filters applied across entity types */
diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/entityType.ts b/apps/web/src/lib/service-clients/service-search/generated/models/entityType.ts
index 1e2d16f6b5..bbd58a5c57 100644
--- a/apps/web/src/lib/service-clients/service-search/generated/models/entityType.ts
+++ b/apps/web/src/lib/service-clients/service-search/generated/models/entityType.ts
@@ -18,6 +18,7 @@ export const EntityType = {
CHAT: 'CHAT',
COMPANY: 'COMPANY',
DOCUMENT: 'DOCUMENT',
+ INITIATIVE: 'INITIATIVE',
PROJECT: 'PROJECT',
TASK: 'TASK',
THREAD: 'THREAD',
diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/index.ts b/apps/web/src/lib/service-clients/service-search/generated/models/index.ts
index 4a7a0b580b..16d0910c9e 100644
--- a/apps/web/src/lib/service-clients/service-search/generated/models/index.ts
+++ b/apps/web/src/lib/service-clients/service-search/generated/models/index.ts
@@ -187,6 +187,10 @@ export * from './fileType';
export * from './foreignEntityFilters';
export * from './highlight';
export * from './highlightName';
+export * from './initiativeFilters';
+export * from './initiativeFiltersDueAfter';
+export * from './initiativeFiltersDueBefore';
+export * from './initiativeFiltersName';
export * from './matchType';
export * from './notificationFilters';
export * from './notificationState';
diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFilters.ts b/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFilters.ts
new file mode 100644
index 0000000000..f6f464d597
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFilters.ts
@@ -0,0 +1,31 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * search_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { InitiativeFiltersDueAfter } from './initiativeFiltersDueAfter';
+import type { InitiativeFiltersDueBefore } from './initiativeFiltersDueBefore';
+import type { InitiativeFiltersName } from './initiativeFiltersName';
+
+/**
+ * Filters for initiatives.
+ */
+export interface InitiativeFilters {
+ /** Inclusive lower due-date bound. */
+ due_after?: InitiativeFiltersDueAfter;
+ /** Inclusive upper due-date bound. */
+ due_before?: InitiativeFiltersDueBefore;
+ /** Opt this query into initiatives at all. Initiatives are off by
+default — see [`crate::ast::initiative::InitiativeLiteral::Include`].
+Asking for specific `initiative_ids` or `owners` also opts in. */
+ include?: boolean;
+ /** Initiative ids to filter by. Empty to include all accessible initiatives. */
+ initiative_ids?: string[];
+ /** Case-insensitive name substring. */
+ name?: InitiativeFiltersName;
+ /** Filter by initiative owner principal — a user ('macro|[email protected]'), a bot
+('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every
+owner. */
+ owners?: string[];
+}
diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFiltersDueAfter.ts b/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFiltersDueAfter.ts
new file mode 100644
index 0000000000..87dba08d7c
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFiltersDueAfter.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * search_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Inclusive lower due-date bound.
+ */
+export type InitiativeFiltersDueAfter = string | null;
diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFiltersDueBefore.ts b/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFiltersDueBefore.ts
new file mode 100644
index 0000000000..2fb9423e85
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFiltersDueBefore.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * search_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Inclusive upper due-date bound.
+ */
+export type InitiativeFiltersDueBefore = string | null;
diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFiltersName.ts b/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFiltersName.ts
new file mode 100644
index 0000000000..082e38c10b
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-search/generated/models/initiativeFiltersName.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * search_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Case-insensitive name substring.
+ */
+export type InitiativeFiltersName = string | null;
diff --git a/apps/web/src/lib/service-clients/service-search/openapi.json b/apps/web/src/lib/service-clients/service-search/openapi.json
index f90d825f2e..476c2eee6f 100644
--- a/apps/web/src/lib/service-clients/service-search/openapi.json
+++ b/apps/web/src/lib/service-clients/service-search/openapi.json
@@ -2167,6 +2167,10 @@
"$ref": "#/components/schemas/ForeignEntityFilters",
"description": "the bundled [ForeignEntityFilters]"
},
+ "initiative_filters": {
+ "$ref": "#/components/schemas/InitiativeFilters",
+ "description": "Initiative filters. Initiatives are opt-in."
+ },
"project_filters": {
"$ref": "#/components/schemas/ProjectFilters",
"description": "the bundled [ProjectFilters]"
@@ -2223,6 +2227,7 @@
"CHAT",
"COMPANY",
"DOCUMENT",
+ "INITIATIVE",
"PROJECT",
"TASK",
"THREAD",
@@ -2721,6 +2726,44 @@
}
}
},
+ "InitiativeFilters": {
+ "type": "object",
+ "description": "Filters for initiatives.",
+ "properties": {
+ "due_after": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Inclusive lower due-date bound."
+ },
+ "due_before": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Inclusive upper due-date bound."
+ },
+ "include": {
+ "type": "boolean",
+ "description": "Opt this query into initiatives at all. Initiatives are off by\ndefault — see [`crate::ast::initiative::InitiativeLiteral::Include`].\nAsking for specific `initiative_ids` or `owners` also opts in."
+ },
+ "initiative_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Initiative ids to filter by. Empty to include all accessible initiatives."
+ },
+ "name": {
+ "type": ["string", "null"],
+ "description": "Case-insensitive name substring."
+ },
+ "owners": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Filter by initiative owner principal — a user ('macro|[email protected]'), a bot\n('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every\nowner."
+ }
+ }
+ },
"MatchType": {
"type": "string",
"enum": ["exact", "partial", "regexp", "query"]
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts
index 5ae2cd1670..d63bf53cee 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts
@@ -14,6 +14,7 @@ import type { CrmCompanyFilters } from './crmCompanyFilters';
import type { DocumentFilters } from './documentFilters';
import type { EmailFilters } from './emailFilters';
import type { ForeignEntityFilters } from './foreignEntityFilters';
+import type { InitiativeFilters } from './initiativeFilters';
import type { ProjectFilters } from './projectFilters';
import type { PropertyFilter } from './propertyFilter';
import type { ReminderFilters } from './reminderFilters';
@@ -43,6 +44,8 @@ export interface EntityFilters {
email_filters?: EmailFilters;
/** the bundled [ForeignEntityFilters] */
foreign_entity_filters?: ForeignEntityFilters;
+ /** Initiative filters. Initiatives are opt-in. */
+ initiative_filters?: InitiativeFilters;
/** the bundled [ProjectFilters] */
project_filters?: ProjectFilters;
/** property-based filters applied across entity types */
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityType.ts
index 12c2c38349..2048cf95bd 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityType.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityType.ts
@@ -18,6 +18,7 @@ export const EntityType = {
CHAT: 'CHAT',
COMPANY: 'COMPANY',
DOCUMENT: 'DOCUMENT',
+ INITIATIVE: 'INITIATIVE',
PROJECT: 'PROJECT',
TASK: 'TASK',
THREAD: 'THREAD',
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts
index 02cd724894..4d02838fc4 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts
@@ -887,6 +887,10 @@ export * from './inFlightTurnSummary';
export * from './inFlightTurnSummaryActor';
export * from './inFlightTurnSummaryAnnouncementMessageId';
export * from './initiativeDetail';
+export * from './initiativeFilters';
+export * from './initiativeFiltersDueAfter';
+export * from './initiativeFiltersDueBefore';
+export * from './initiativeFiltersName';
export * from './initiativeId';
export * from './initiativeList';
export * from './initiativeSummary';
@@ -1364,6 +1368,11 @@ export * from './soupEnrichedEmailThreadPreviewSoupPropertiesFieldAllOf';
export * from './soupEnrichedEmailThreadPreviewSoupPropertiesFieldAllOfTwo';
export * from './soupForeignEntity';
export * from './soupForeignEntityMetadata';
+export * from './soupInitiativeSoupPropertiesField';
+export * from './soupInitiativeSoupPropertiesFieldAllOf';
+export * from './soupInitiativeSoupPropertiesFieldAllOfTwo';
+export * from './soupInitiativeSoupPropertiesFieldAllOfTwoDescriptionDocumentId';
+export * from './soupInitiativeSoupPropertiesFieldAllOfTwoViewedAt';
export * from './soupItem';
export * from './soupItemOneOf';
export * from './soupItemOneOfFive';
@@ -1385,6 +1394,8 @@ export * from './soupItemOneOfSevenTag';
export * from './soupItemOneOfTag';
export * from './soupItemOneOfThree';
export * from './soupItemOneOfThreeTag';
+export * from './soupItemOneOfTwofive';
+export * from './soupItemOneOfTwofiveTag';
export * from './soupItemOneOfTwoone';
export * from './soupItemOneOfTwooneTag';
export * from './soupItemOneOfTwothree';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFilters.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFilters.ts
new file mode 100644
index 0000000000..02c8c6f732
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFilters.ts
@@ -0,0 +1,31 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { InitiativeFiltersDueAfter } from './initiativeFiltersDueAfter';
+import type { InitiativeFiltersDueBefore } from './initiativeFiltersDueBefore';
+import type { InitiativeFiltersName } from './initiativeFiltersName';
+
+/**
+ * Filters for initiatives.
+ */
+export interface InitiativeFilters {
+ /** Inclusive lower due-date bound. */
+ due_after?: InitiativeFiltersDueAfter;
+ /** Inclusive upper due-date bound. */
+ due_before?: InitiativeFiltersDueBefore;
+ /** Opt this query into initiatives at all. Initiatives are off by
+default — see [`crate::ast::initiative::InitiativeLiteral::Include`].
+Asking for specific `initiative_ids` or `owners` also opts in. */
+ include?: boolean;
+ /** Initiative ids to filter by. Empty to include all accessible initiatives. */
+ initiative_ids?: string[];
+ /** Case-insensitive name substring. */
+ name?: InitiativeFiltersName;
+ /** Filter by initiative owner principal — a user ('macro|[email protected]'), a bot
+('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every
+owner. */
+ owners?: string[];
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFiltersDueAfter.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFiltersDueAfter.ts
new file mode 100644
index 0000000000..a1ad627809
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFiltersDueAfter.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Inclusive lower due-date bound.
+ */
+export type InitiativeFiltersDueAfter = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFiltersDueBefore.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFiltersDueBefore.ts
new file mode 100644
index 0000000000..702077f918
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFiltersDueBefore.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Inclusive upper due-date bound.
+ */
+export type InitiativeFiltersDueBefore = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFiltersName.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFiltersName.ts
new file mode 100644
index 0000000000..88e4dbd6cd
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/initiativeFiltersName.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Case-insensitive name substring.
+ */
+export type InitiativeFiltersName = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesField.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesField.ts
new file mode 100644
index 0000000000..9746b0733d
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesField.ts
@@ -0,0 +1,15 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { SoupInitiativeSoupPropertiesFieldAllOf } from './soupInitiativeSoupPropertiesFieldAllOf';
+import type { SoupInitiativeSoupPropertiesFieldAllOfTwo } from './soupInitiativeSoupPropertiesFieldAllOfTwo';
+
+/**
+ * An initiative (called a project in the frontend) in the Soup feed.
+ */
+export type SoupInitiativeSoupPropertiesField =
+ SoupInitiativeSoupPropertiesFieldAllOf &
+ SoupInitiativeSoupPropertiesFieldAllOfTwo;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOf.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOf.ts
new file mode 100644
index 0000000000..b042380440
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOf.ts
@@ -0,0 +1,15 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { SoupProperty } from './soupProperty';
+
+/**
+ * Property fields that can be flattened into property-bearing Soup items.
+ */
+export type SoupInitiativeSoupPropertiesFieldAllOf = {
+ /** Properties attached to the entity. */
+ properties: SoupProperty[];
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOfTwo.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOfTwo.ts
new file mode 100644
index 0000000000..b3ce41ffb0
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOfTwo.ts
@@ -0,0 +1,25 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { SoupInitiativeSoupPropertiesFieldAllOfTwoDescriptionDocumentId } from './soupInitiativeSoupPropertiesFieldAllOfTwoDescriptionDocumentId';
+import type { SoupInitiativeSoupPropertiesFieldAllOfTwoViewedAt } from './soupInitiativeSoupPropertiesFieldAllOfTwoViewedAt';
+
+export type SoupInitiativeSoupPropertiesFieldAllOfTwo = {
+ /** Creation timestamp. */
+ createdAt: string;
+ /** Document holding the initiative description. */
+ descriptionDocumentId?: SoupInitiativeSoupPropertiesFieldAllOfTwoDescriptionDocumentId;
+ /** Initiative identifier. */
+ id: string;
+ /** Initiative display name. */
+ name: string;
+ /** Initiative owner. */
+ ownerId: string;
+ /** Last modification timestamp. */
+ updatedAt: string;
+ /** Last time the requesting user viewed the initiative. */
+ viewedAt?: SoupInitiativeSoupPropertiesFieldAllOfTwoViewedAt;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOfTwoDescriptionDocumentId.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOfTwoDescriptionDocumentId.ts
new file mode 100644
index 0000000000..ef22cce2e6
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOfTwoDescriptionDocumentId.ts
@@ -0,0 +1,13 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Document holding the initiative description.
+ */
+export type SoupInitiativeSoupPropertiesFieldAllOfTwoDescriptionDocumentId =
+ | string
+ | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOfTwoViewedAt.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOfTwoViewedAt.ts
new file mode 100644
index 0000000000..735caeb6db
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupInitiativeSoupPropertiesFieldAllOfTwoViewedAt.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Last time the requesting user viewed the initiative.
+ */
+export type SoupInitiativeSoupPropertiesFieldAllOfTwoViewedAt = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItem.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItem.ts
index 1dfab2271d..580513b6ad 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItem.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItem.ts
@@ -14,6 +14,7 @@ import type { SoupItemOneOfOneseven } from './soupItemOneOfOneseven';
import type { SoupItemOneOfOnethree } from './soupItemOneOfOnethree';
import type { SoupItemOneOfSeven } from './soupItemOneOfSeven';
import type { SoupItemOneOfThree } from './soupItemOneOfThree';
+import type { SoupItemOneOfTwofive } from './soupItemOneOfTwofive';
import type { SoupItemOneOfTwoone } from './soupItemOneOfTwoone';
import type { SoupItemOneOfTwothree } from './soupItemOneOfTwothree';
@@ -32,4 +33,5 @@ export type SoupItem =
| SoupItemOneOfOneseven
| SoupItemOneOfOnenine
| SoupItemOneOfTwoone
- | SoupItemOneOfTwothree;
+ | SoupItemOneOfTwothree
+ | SoupItemOneOfTwofive;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfNine.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfNine.ts
index 28b5c82b4d..28faab9d96 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfNine.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfNine.ts
@@ -4,14 +4,14 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { SoupChannel } from './soupChannel';
+import type { SoupEnrichedEmailThreadPreviewSoupPropertiesField } from './soupEnrichedEmailThreadPreviewSoupPropertiesField';
import type { SoupItemOneOfNineTag } from './soupItemOneOfNineTag';
/**
- * Channel item.
+ * Email thread item.
*/
export type SoupItemOneOfNine = {
- /** Channel item. */
- data: SoupChannel;
+ /** Email thread item. */
+ data: SoupEnrichedEmailThreadPreviewSoupPropertiesField;
tag: SoupItemOneOfNineTag;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfNineTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfNineTag.ts
index fe32ee5964..e64c8c0a30 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfNineTag.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfNineTag.ts
@@ -10,5 +10,5 @@ export type SoupItemOneOfNineTag =
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const SoupItemOneOfNineTag = {
- channel: 'channel',
+ emailThread: 'emailThread',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefive.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefive.ts
index bd9aee904b..4785fd74da 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefive.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefive.ts
@@ -4,14 +4,14 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { SoupCalendarEventSoupPropertiesField } from './soupCalendarEventSoupPropertiesField';
+import type { SoupCallRecordSoupPropertiesField } from './soupCallRecordSoupPropertiesField';
import type { SoupItemOneOfOnefiveTag } from './soupItemOneOfOnefiveTag';
/**
- * Calendar event item.
+ * Call record item.
*/
export type SoupItemOneOfOnefive = {
- /** Calendar event item. */
- data: SoupCalendarEventSoupPropertiesField;
+ /** Call record item. */
+ data: SoupCallRecordSoupPropertiesField;
tag: SoupItemOneOfOnefiveTag;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefiveTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefiveTag.ts
index 1df62df4ee..bfa26a2026 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefiveTag.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnefiveTag.ts
@@ -10,5 +10,5 @@ export type SoupItemOneOfOnefiveTag =
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const SoupItemOneOfOnefiveTag = {
- calendarEvent: 'calendarEvent',
+ call: 'call',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenine.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenine.ts
index cde403523b..726f8e49f5 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenine.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenine.ts
@@ -4,14 +4,14 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { SoupForeignEntity } from './soupForeignEntity';
+import type { SoupCrmCompanySoupPropertiesField } from './soupCrmCompanySoupPropertiesField';
import type { SoupItemOneOfOnenineTag } from './soupItemOneOfOnenineTag';
/**
- * Foreign entity item.
+ * CRM company item.
*/
export type SoupItemOneOfOnenine = {
- /** Foreign entity item. */
- data: SoupForeignEntity;
+ /** CRM company item. */
+ data: SoupCrmCompanySoupPropertiesField;
tag: SoupItemOneOfOnenineTag;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenineTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenineTag.ts
index f9c5bc5fc1..bfac38489a 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenineTag.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnenineTag.ts
@@ -10,5 +10,5 @@ export type SoupItemOneOfOnenineTag =
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const SoupItemOneOfOnenineTag = {
- foreignEntity: 'foreignEntity',
+ crmCompany: 'crmCompany',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneone.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneone.ts
index dd61d0d73d..3e51577147 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneone.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneone.ts
@@ -4,14 +4,14 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { SoupChannelThread } from './soupChannelThread';
+import type { SoupChannel } from './soupChannel';
import type { SoupItemOneOfOneoneTag } from './soupItemOneOfOneoneTag';
/**
- * Channel thread item.
+ * Channel item.
*/
export type SoupItemOneOfOneone = {
- /** Channel thread item. */
- data: SoupChannelThread;
+ /** Channel item. */
+ data: SoupChannel;
tag: SoupItemOneOfOneoneTag;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneoneTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneoneTag.ts
index fd0c673e37..1d698a5843 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneoneTag.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneoneTag.ts
@@ -10,5 +10,5 @@ export type SoupItemOneOfOneoneTag =
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const SoupItemOneOfOneoneTag = {
- channelThread: 'channelThread',
+ channel: 'channel',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneseven.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneseven.ts
index 629b58406b..21bc188731 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneseven.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOneseven.ts
@@ -4,14 +4,14 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { SoupCrmCompanySoupPropertiesField } from './soupCrmCompanySoupPropertiesField';
+import type { SoupCalendarEventSoupPropertiesField } from './soupCalendarEventSoupPropertiesField';
import type { SoupItemOneOfOnesevenTag } from './soupItemOneOfOnesevenTag';
/**
- * CRM company item.
+ * Calendar event item.
*/
export type SoupItemOneOfOneseven = {
- /** CRM company item. */
- data: SoupCrmCompanySoupPropertiesField;
+ /** Calendar event item. */
+ data: SoupCalendarEventSoupPropertiesField;
tag: SoupItemOneOfOnesevenTag;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnesevenTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnesevenTag.ts
index 0ee1078e03..0e8bd90812 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnesevenTag.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnesevenTag.ts
@@ -10,5 +10,5 @@ export type SoupItemOneOfOnesevenTag =
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const SoupItemOneOfOnesevenTag = {
- crmCompany: 'crmCompany',
+ calendarEvent: 'calendarEvent',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnethree.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnethree.ts
index a19723ebef..ae905a9490 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnethree.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnethree.ts
@@ -4,14 +4,14 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { SoupCallRecordSoupPropertiesField } from './soupCallRecordSoupPropertiesField';
+import type { SoupChannelThread } from './soupChannelThread';
import type { SoupItemOneOfOnethreeTag } from './soupItemOneOfOnethreeTag';
/**
- * Call record item.
+ * Channel thread item.
*/
export type SoupItemOneOfOnethree = {
- /** Call record item. */
- data: SoupCallRecordSoupPropertiesField;
+ /** Channel thread item. */
+ data: SoupChannelThread;
tag: SoupItemOneOfOnethreeTag;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnethreeTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnethreeTag.ts
index 627e638a9b..74f10c09b9 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnethreeTag.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfOnethreeTag.ts
@@ -10,5 +10,5 @@ export type SoupItemOneOfOnethreeTag =
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const SoupItemOneOfOnethreeTag = {
- call: 'call',
+ channelThread: 'channelThread',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfSeven.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfSeven.ts
index eb354ba092..5b273825ee 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfSeven.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfSeven.ts
@@ -4,14 +4,14 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { SoupEnrichedEmailThreadPreviewSoupPropertiesField } from './soupEnrichedEmailThreadPreviewSoupPropertiesField';
+import type { SoupInitiativeSoupPropertiesField } from './soupInitiativeSoupPropertiesField';
import type { SoupItemOneOfSevenTag } from './soupItemOneOfSevenTag';
/**
- * Email thread item.
+ * Initiative entity.
*/
export type SoupItemOneOfSeven = {
- /** Email thread item. */
- data: SoupEnrichedEmailThreadPreviewSoupPropertiesField;
+ /** Initiative entity. */
+ data: SoupInitiativeSoupPropertiesField;
tag: SoupItemOneOfSevenTag;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfSevenTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfSevenTag.ts
index c9c7b55911..8d543bffb2 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfSevenTag.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfSevenTag.ts
@@ -10,5 +10,5 @@ export type SoupItemOneOfSevenTag =
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const SoupItemOneOfSevenTag = {
- emailThread: 'emailThread',
+ initiative: 'initiative',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwofive.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwofive.ts
new file mode 100644
index 0000000000..30207525ff
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwofive.ts
@@ -0,0 +1,17 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { SoupAgentSessionSoupPropertiesField } from './soupAgentSessionSoupPropertiesField';
+import type { SoupItemOneOfTwofiveTag } from './soupItemOneOfTwofiveTag';
+
+/**
+ * Agent session item.
+ */
+export type SoupItemOneOfTwofive = {
+ /** Agent session item. */
+ data: SoupAgentSessionSoupPropertiesField;
+ tag: SoupItemOneOfTwofiveTag;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwofiveTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwofiveTag.ts
new file mode 100644
index 0000000000..9f255b4d07
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwofiveTag.ts
@@ -0,0 +1,14 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type SoupItemOneOfTwofiveTag =
+ (typeof SoupItemOneOfTwofiveTag)[keyof typeof SoupItemOneOfTwofiveTag];
+
+// eslint-disable-next-line @typescript-eslint/no-redeclare
+export const SoupItemOneOfTwofiveTag = {
+ agentSession: 'agentSession',
+} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwoone.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwoone.ts
index 3475d97ad8..e6128fd047 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwoone.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwoone.ts
@@ -4,15 +4,14 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-
+import type { SoupForeignEntity } from './soupForeignEntity';
import type { SoupItemOneOfTwooneTag } from './soupItemOneOfTwooneTag';
-import type { SoupReminderSoupPropertiesField } from './soupReminderSoupPropertiesField';
/**
- * Reminder item.
+ * Foreign entity item.
*/
export type SoupItemOneOfTwoone = {
- /** Reminder item. */
- data: SoupReminderSoupPropertiesField;
+ /** Foreign entity item. */
+ data: SoupForeignEntity;
tag: SoupItemOneOfTwooneTag;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwooneTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwooneTag.ts
index 34b011fec2..c6194a2da3 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwooneTag.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwooneTag.ts
@@ -10,5 +10,5 @@ export type SoupItemOneOfTwooneTag =
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const SoupItemOneOfTwooneTag = {
- reminder: 'reminder',
+ foreignEntity: 'foreignEntity',
} as const;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwothree.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwothree.ts
index 7f93f39791..e468527fbc 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwothree.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwothree.ts
@@ -4,14 +4,15 @@
* document_storage_service
* OpenAPI spec version: 0.1.0
*/
-import type { SoupAgentSessionSoupPropertiesField } from './soupAgentSessionSoupPropertiesField';
+
import type { SoupItemOneOfTwothreeTag } from './soupItemOneOfTwothreeTag';
+import type { SoupReminderSoupPropertiesField } from './soupReminderSoupPropertiesField';
/**
- * Agent session item.
+ * Reminder item.
*/
export type SoupItemOneOfTwothree = {
- /** Agent session item. */
- data: SoupAgentSessionSoupPropertiesField;
+ /** Reminder item. */
+ data: SoupReminderSoupPropertiesField;
tag: SoupItemOneOfTwothreeTag;
};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwothreeTag.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwothreeTag.ts
index 2d96bdae62..7bb396eac9 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwothreeTag.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupItemOneOfTwothreeTag.ts
@@ -10,5 +10,5 @@ export type SoupItemOneOfTwothreeTag =
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const SoupItemOneOfTwothreeTag = {
- agentSession: 'agentSession',
+ reminder: 'reminder',
} as const;
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 8644e56ced..bf5f07c3f4 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
@@ -6873,6 +6873,7 @@ export const createTaskHandlerBody = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -6908,6 +6909,7 @@ export const createTaskHandlerBody = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -10909,6 +10911,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -11010,6 +11013,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -11251,6 +11255,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -11352,6 +11357,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -11519,6 +11525,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -11620,6 +11627,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -11703,6 +11711,267 @@ export const getItemsSoupResponse = zod
tag: zod.enum(['project']),
})
.describe('Project item.'),
+ zod
+ .object({
+ data: zod
+ .object({
+ properties: zod
+ .array(
+ zod
+ .object({
+ definition: zod
+ .object({
+ created_at: zod.iso.datetime({}),
+ data_type: zod
+ .enum([
+ 'BOOLEAN',
+ 'DATE',
+ 'NUMBER',
+ 'STRING',
+ 'SELECT_NUMBER',
+ 'SELECT_STRING',
+ 'TAG',
+ 'ENTITY',
+ 'LINK',
+ ])
+ .describe(
+ 'Data type for property values, determining storage and validation.'
+ ),
+ display_name: zod.string(),
+ id: zod.uuid(),
+ is_metadata: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'
+ ),
+ is_multi_select: zod.boolean(),
+ is_system: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system property (stored in DB).'
+ ),
+ owner: zod
+ .union([
+ zod
+ .object({
+ scope: zod.enum(['user']),
+ user_id: zod.string(),
+ })
+ .describe('User-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['team']),
+ team_id: zod.uuid(),
+ })
+ .describe('Team-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['system']),
+ })
+ .describe(
+ 'System-owned property (no user or team owner).'
+ ),
+ ])
+ .describe(
+ 'Defines who owns a property - user-scoped, team-scoped, or system.'
+ ),
+ specific_entity_type: zod
+ .union([
+ zod.null(),
+ zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ ])
+ .optional(),
+ updated_at: zod.iso.datetime({}),
+ })
+ .describe(
+ 'Property definition model (service representation).'
+ ),
+ id: zod
+ .uuid()
+ .describe(
+ 'Globally unique id of the assignment attaching this property to an entity.'
+ ),
+ value: zod
+ .union([
+ zod.null(),
+ zod
+ .union([
+ zod
+ .object({
+ type: zod.enum(['Boolean']),
+ value: zod
+ .boolean()
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ })
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Number']),
+ value: zod
+ .number()
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ })
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['String']),
+ value: zod
+ .string()
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ })
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Date']),
+ value: zod.iso
+ .datetime({})
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ })
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['SelectOption']),
+ value: zod
+ .array(zod.uuid())
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['EntityReference']),
+ value: zod
+ .array(
+ zod
+ .object({
+ entity_id: zod.string(),
+ entity_type: zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ specific_message_id: zod
+ .uuid()
+ .nullish()
+ .describe(
+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'
+ ),
+ })
+ .describe(
+ 'Entity reference for entity-type property values.'
+ )
+ )
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Link']),
+ value: zod
+ .array(zod.string())
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ ])
+ .describe(
+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'
+ ),
+ ])
+ .optional(),
+ })
+ .describe(
+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'
+ )
+ )
+ .describe('Properties attached to the entity.'),
+ })
+ .describe(
+ 'Property fields that can be flattened into property-bearing Soup items.'
+ )
+ .and(
+ zod.object({
+ createdAt: zod.iso
+ .datetime({})
+ .describe('Creation timestamp.'),
+ descriptionDocumentId: zod
+ .uuid()
+ .nullish()
+ .describe('Document holding the initiative description.'),
+ id: zod.uuid().describe('Initiative identifier.'),
+ name: zod.string().describe('Initiative display name.'),
+ ownerId: zod.string().describe('Initiative owner.'),
+ updatedAt: zod.iso
+ .datetime({})
+ .describe('Last modification timestamp.'),
+ viewedAt: zod.iso
+ .datetime({})
+ .nullish()
+ .describe(
+ 'Last time the requesting user viewed the initiative.'
+ ),
+ })
+ )
+ .describe(
+ 'An initiative (called a project in the frontend) in the Soup feed.'
+ ),
+ tag: zod.enum(['initiative']),
+ })
+ .describe('Initiative entity.'),
zod
.object({
data: zod
@@ -11842,6 +12111,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -11943,6 +12213,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -12542,6 +12813,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -12643,6 +12915,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -12898,6 +13171,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -12999,6 +13273,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -13202,6 +13477,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -13303,6 +13579,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -13551,6 +13828,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -13652,6 +13930,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -13898,6 +14177,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -13999,6 +14279,7 @@ export const getItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -14698,14 +14979,49 @@ export const postItemsSoupBody = zod
})
.optional()
.describe('Filters for foreign entity records.'),
- project_filters: zod
+ initiative_filters: zod
.object({
- importance: zod
- .boolean()
+ due_after: zod.iso
+ .datetime({})
.nullish()
- .describe(
- 'Filter by project importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.'
- ),
+ .describe('Inclusive lower due-date bound.'),
+ due_before: zod.iso
+ .datetime({})
+ .nullish()
+ .describe('Inclusive upper due-date bound.'),
+ include: zod
+ .boolean()
+ .optional()
+ .describe(
+ 'Opt this query into initiatives at all. Initiatives are off by\ndefault — see [`crate::ast::initiative::InitiativeLiteral::Include`].\nAsking for specific `initiative_ids` or `owners` also opts in.'
+ ),
+ initiative_ids: zod
+ .array(zod.string())
+ .optional()
+ .describe(
+ 'Initiative ids to filter by. Empty to include all accessible initiatives.'
+ ),
+ name: zod
+ .string()
+ .nullish()
+ .describe('Case-insensitive name substring.'),
+ owners: zod
+ .array(zod.string())
+ .optional()
+ .describe(
+ "Filter by initiative owner principal — a user ('macro|[email protected]'), a bot\n('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every\nowner."
+ ),
+ })
+ .optional()
+ .describe('Filters for initiatives.'),
+ project_filters: zod
+ .object({
+ importance: zod
+ .boolean()
+ .nullish()
+ .describe(
+ 'Filter by project importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.'
+ ),
include_root: zod
.boolean()
.optional()
@@ -14962,6 +15278,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -15063,6 +15380,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -15304,6 +15622,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -15405,6 +15724,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -15572,6 +15892,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -15673,6 +15994,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -15745,17 +16067,278 @@ export const postItemsSoupResponse = zod
.describe('The parent project id'),
updatedAt: zod.iso
.datetime({})
- .describe('The time the project was updated'),
+ .describe('The time the project was updated'),
+ viewedAt: zod.iso
+ .datetime({})
+ .nullish()
+ .describe('The time the document was last viewed'),
+ })
+ )
+ .describe('A project as displayed in Soup.'),
+ tag: zod.enum(['project']),
+ })
+ .describe('Project item.'),
+ zod
+ .object({
+ data: zod
+ .object({
+ properties: zod
+ .array(
+ zod
+ .object({
+ definition: zod
+ .object({
+ created_at: zod.iso.datetime({}),
+ data_type: zod
+ .enum([
+ 'BOOLEAN',
+ 'DATE',
+ 'NUMBER',
+ 'STRING',
+ 'SELECT_NUMBER',
+ 'SELECT_STRING',
+ 'TAG',
+ 'ENTITY',
+ 'LINK',
+ ])
+ .describe(
+ 'Data type for property values, determining storage and validation.'
+ ),
+ display_name: zod.string(),
+ id: zod.uuid(),
+ is_metadata: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'
+ ),
+ is_multi_select: zod.boolean(),
+ is_system: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system property (stored in DB).'
+ ),
+ owner: zod
+ .union([
+ zod
+ .object({
+ scope: zod.enum(['user']),
+ user_id: zod.string(),
+ })
+ .describe('User-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['team']),
+ team_id: zod.uuid(),
+ })
+ .describe('Team-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['system']),
+ })
+ .describe(
+ 'System-owned property (no user or team owner).'
+ ),
+ ])
+ .describe(
+ 'Defines who owns a property - user-scoped, team-scoped, or system.'
+ ),
+ specific_entity_type: zod
+ .union([
+ zod.null(),
+ zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ ])
+ .optional(),
+ updated_at: zod.iso.datetime({}),
+ })
+ .describe(
+ 'Property definition model (service representation).'
+ ),
+ id: zod
+ .uuid()
+ .describe(
+ 'Globally unique id of the assignment attaching this property to an entity.'
+ ),
+ value: zod
+ .union([
+ zod.null(),
+ zod
+ .union([
+ zod
+ .object({
+ type: zod.enum(['Boolean']),
+ value: zod
+ .boolean()
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ })
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Number']),
+ value: zod
+ .number()
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ })
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['String']),
+ value: zod
+ .string()
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ })
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Date']),
+ value: zod.iso
+ .datetime({})
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ })
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['SelectOption']),
+ value: zod
+ .array(zod.uuid())
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['EntityReference']),
+ value: zod
+ .array(
+ zod
+ .object({
+ entity_id: zod.string(),
+ entity_type: zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ specific_message_id: zod
+ .uuid()
+ .nullish()
+ .describe(
+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'
+ ),
+ })
+ .describe(
+ 'Entity reference for entity-type property values.'
+ )
+ )
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Link']),
+ value: zod
+ .array(zod.string())
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ ])
+ .describe(
+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'
+ ),
+ ])
+ .optional(),
+ })
+ .describe(
+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'
+ )
+ )
+ .describe('Properties attached to the entity.'),
+ })
+ .describe(
+ 'Property fields that can be flattened into property-bearing Soup items.'
+ )
+ .and(
+ zod.object({
+ createdAt: zod.iso
+ .datetime({})
+ .describe('Creation timestamp.'),
+ descriptionDocumentId: zod
+ .uuid()
+ .nullish()
+ .describe('Document holding the initiative description.'),
+ id: zod.uuid().describe('Initiative identifier.'),
+ name: zod.string().describe('Initiative display name.'),
+ ownerId: zod.string().describe('Initiative owner.'),
+ updatedAt: zod.iso
+ .datetime({})
+ .describe('Last modification timestamp.'),
viewedAt: zod.iso
.datetime({})
.nullish()
- .describe('The time the document was last viewed'),
+ .describe(
+ 'Last time the requesting user viewed the initiative.'
+ ),
})
)
- .describe('A project as displayed in Soup.'),
- tag: zod.enum(['project']),
+ .describe(
+ 'An initiative (called a project in the frontend) in the Soup feed.'
+ ),
+ tag: zod.enum(['initiative']),
})
- .describe('Project item.'),
+ .describe('Initiative entity.'),
zod
.object({
data: zod
@@ -15895,6 +16478,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -15996,6 +16580,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -16595,6 +17180,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -16696,6 +17282,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -16951,6 +17538,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -17052,6 +17640,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -17255,6 +17844,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -17356,6 +17946,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -17604,6 +18195,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -17705,6 +18297,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -17951,6 +18544,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -18052,6 +18646,7 @@ export const postItemsSoupResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -18456,6 +19051,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -18557,6 +19153,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -18798,6 +19395,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -18899,6 +19497,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -19066,6 +19665,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -19167,6 +19767,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -19249,7 +19850,268 @@ export const postItemsSoupAstResponse = zod
.describe('A project as displayed in Soup.'),
tag: zod.enum(['project']),
})
- .describe('Project item.'),
+ .describe('Project item.'),
+ zod
+ .object({
+ data: zod
+ .object({
+ properties: zod
+ .array(
+ zod
+ .object({
+ definition: zod
+ .object({
+ created_at: zod.iso.datetime({}),
+ data_type: zod
+ .enum([
+ 'BOOLEAN',
+ 'DATE',
+ 'NUMBER',
+ 'STRING',
+ 'SELECT_NUMBER',
+ 'SELECT_STRING',
+ 'TAG',
+ 'ENTITY',
+ 'LINK',
+ ])
+ .describe(
+ 'Data type for property values, determining storage and validation.'
+ ),
+ display_name: zod.string(),
+ id: zod.uuid(),
+ is_metadata: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'
+ ),
+ is_multi_select: zod.boolean(),
+ is_system: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system property (stored in DB).'
+ ),
+ owner: zod
+ .union([
+ zod
+ .object({
+ scope: zod.enum(['user']),
+ user_id: zod.string(),
+ })
+ .describe('User-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['team']),
+ team_id: zod.uuid(),
+ })
+ .describe('Team-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['system']),
+ })
+ .describe(
+ 'System-owned property (no user or team owner).'
+ ),
+ ])
+ .describe(
+ 'Defines who owns a property - user-scoped, team-scoped, or system.'
+ ),
+ specific_entity_type: zod
+ .union([
+ zod.null(),
+ zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ ])
+ .optional(),
+ updated_at: zod.iso.datetime({}),
+ })
+ .describe(
+ 'Property definition model (service representation).'
+ ),
+ id: zod
+ .uuid()
+ .describe(
+ 'Globally unique id of the assignment attaching this property to an entity.'
+ ),
+ value: zod
+ .union([
+ zod.null(),
+ zod
+ .union([
+ zod
+ .object({
+ type: zod.enum(['Boolean']),
+ value: zod
+ .boolean()
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ })
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Number']),
+ value: zod
+ .number()
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ })
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['String']),
+ value: zod
+ .string()
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ })
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Date']),
+ value: zod.iso
+ .datetime({})
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ })
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['SelectOption']),
+ value: zod
+ .array(zod.uuid())
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['EntityReference']),
+ value: zod
+ .array(
+ zod
+ .object({
+ entity_id: zod.string(),
+ entity_type: zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ specific_message_id: zod
+ .uuid()
+ .nullish()
+ .describe(
+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'
+ ),
+ })
+ .describe(
+ 'Entity reference for entity-type property values.'
+ )
+ )
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Link']),
+ value: zod
+ .array(zod.string())
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ ])
+ .describe(
+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'
+ ),
+ ])
+ .optional(),
+ })
+ .describe(
+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'
+ )
+ )
+ .describe('Properties attached to the entity.'),
+ })
+ .describe(
+ 'Property fields that can be flattened into property-bearing Soup items.'
+ )
+ .and(
+ zod.object({
+ createdAt: zod.iso
+ .datetime({})
+ .describe('Creation timestamp.'),
+ descriptionDocumentId: zod
+ .uuid()
+ .nullish()
+ .describe('Document holding the initiative description.'),
+ id: zod.uuid().describe('Initiative identifier.'),
+ name: zod.string().describe('Initiative display name.'),
+ ownerId: zod.string().describe('Initiative owner.'),
+ updatedAt: zod.iso
+ .datetime({})
+ .describe('Last modification timestamp.'),
+ viewedAt: zod.iso
+ .datetime({})
+ .nullish()
+ .describe(
+ 'Last time the requesting user viewed the initiative.'
+ ),
+ })
+ )
+ .describe(
+ 'An initiative (called a project in the frontend) in the Soup feed.'
+ ),
+ tag: zod.enum(['initiative']),
+ })
+ .describe('Initiative entity.'),
zod
.object({
data: zod
@@ -19389,6 +20251,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -19490,6 +20353,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -20091,6 +20955,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -20192,6 +21057,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -20447,6 +21313,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -20548,6 +21415,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -20751,6 +21619,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -20852,6 +21721,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -21100,6 +21970,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -21201,6 +22072,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -21447,6 +22319,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -21548,6 +22421,7 @@ export const postItemsSoupAstResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -22208,6 +23082,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -22309,6 +23184,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -22556,6 +23432,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -22657,6 +23534,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -22826,6 +23704,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -22927,6 +23806,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -23013,7 +23893,272 @@ export const postItemsSoupAstGroupedResponse = zod
.describe('A project as displayed in Soup.'),
tag: zod.enum(['project']),
})
- .describe('Project item.'),
+ .describe('Project item.'),
+ zod
+ .object({
+ data: zod
+ .object({
+ properties: zod
+ .array(
+ zod
+ .object({
+ definition: zod
+ .object({
+ created_at: zod.iso.datetime({}),
+ data_type: zod
+ .enum([
+ 'BOOLEAN',
+ 'DATE',
+ 'NUMBER',
+ 'STRING',
+ 'SELECT_NUMBER',
+ 'SELECT_STRING',
+ 'TAG',
+ 'ENTITY',
+ 'LINK',
+ ])
+ .describe(
+ 'Data type for property values, determining storage and validation.'
+ ),
+ display_name: zod.string(),
+ id: zod.uuid(),
+ is_metadata: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'
+ ),
+ is_multi_select: zod.boolean(),
+ is_system: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system property (stored in DB).'
+ ),
+ owner: zod
+ .union([
+ zod
+ .object({
+ scope: zod.enum(['user']),
+ user_id: zod.string(),
+ })
+ .describe('User-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['team']),
+ team_id: zod.uuid(),
+ })
+ .describe('Team-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['system']),
+ })
+ .describe(
+ 'System-owned property (no user or team owner).'
+ ),
+ ])
+ .describe(
+ 'Defines who owns a property - user-scoped, team-scoped, or system.'
+ ),
+ specific_entity_type: zod
+ .union([
+ zod.null(),
+ zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ ])
+ .optional(),
+ updated_at: zod.iso.datetime({}),
+ })
+ .describe(
+ 'Property definition model (service representation).'
+ ),
+ id: zod
+ .uuid()
+ .describe(
+ 'Globally unique id of the assignment attaching this property to an entity.'
+ ),
+ value: zod
+ .union([
+ zod.null(),
+ zod
+ .union([
+ zod
+ .object({
+ type: zod.enum(['Boolean']),
+ value: zod
+ .boolean()
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ })
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Number']),
+ value: zod
+ .number()
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ })
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['String']),
+ value: zod
+ .string()
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ })
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Date']),
+ value: zod.iso
+ .datetime({})
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ })
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['SelectOption']),
+ value: zod
+ .array(zod.uuid())
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['EntityReference']),
+ value: zod
+ .array(
+ zod
+ .object({
+ entity_id: zod.string(),
+ entity_type: zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ specific_message_id: zod
+ .uuid()
+ .nullish()
+ .describe(
+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'
+ ),
+ })
+ .describe(
+ 'Entity reference for entity-type property values.'
+ )
+ )
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Link']),
+ value: zod
+ .array(zod.string())
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ ])
+ .describe(
+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'
+ ),
+ ])
+ .optional(),
+ })
+ .describe(
+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'
+ )
+ )
+ .describe('Properties attached to the entity.'),
+ })
+ .describe(
+ 'Property fields that can be flattened into property-bearing Soup items.'
+ )
+ .and(
+ zod.object({
+ createdAt: zod.iso
+ .datetime({})
+ .describe('Creation timestamp.'),
+ descriptionDocumentId: zod
+ .uuid()
+ .nullish()
+ .describe(
+ 'Document holding the initiative description.'
+ ),
+ id: zod.uuid().describe('Initiative identifier.'),
+ name: zod
+ .string()
+ .describe('Initiative display name.'),
+ ownerId: zod.string().describe('Initiative owner.'),
+ updatedAt: zod.iso
+ .datetime({})
+ .describe('Last modification timestamp.'),
+ viewedAt: zod.iso
+ .datetime({})
+ .nullish()
+ .describe(
+ 'Last time the requesting user viewed the initiative.'
+ ),
+ })
+ )
+ .describe(
+ 'An initiative (called a project in the frontend) in the Soup feed.'
+ ),
+ tag: zod.enum(['initiative']),
+ })
+ .describe('Initiative entity.'),
zod
.object({
data: zod
@@ -23166,6 +24311,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -23271,6 +24417,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -23919,6 +25066,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -24020,6 +25168,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -24287,6 +25436,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -24392,6 +25542,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -24601,6 +25752,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -24702,6 +25854,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -24960,6 +26113,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -25061,6 +26215,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -25309,6 +26464,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -25410,6 +26566,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -25710,6 +26867,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -25811,6 +26969,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -26058,6 +27217,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -26159,6 +27319,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -26328,6 +27489,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -26429,6 +27591,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -26516,6 +27679,271 @@ export const postItemsSoupAstGroupedResponse = zod
tag: zod.enum(['project']),
})
.describe('Project item.'),
+ zod
+ .object({
+ data: zod
+ .object({
+ properties: zod
+ .array(
+ zod
+ .object({
+ definition: zod
+ .object({
+ created_at: zod.iso.datetime({}),
+ data_type: zod
+ .enum([
+ 'BOOLEAN',
+ 'DATE',
+ 'NUMBER',
+ 'STRING',
+ 'SELECT_NUMBER',
+ 'SELECT_STRING',
+ 'TAG',
+ 'ENTITY',
+ 'LINK',
+ ])
+ .describe(
+ 'Data type for property values, determining storage and validation.'
+ ),
+ display_name: zod.string(),
+ id: zod.uuid(),
+ is_metadata: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system-generated metadata property.\nNot stored in database - computed at service layer.'
+ ),
+ is_multi_select: zod.boolean(),
+ is_system: zod
+ .boolean()
+ .describe(
+ 'Flag to indicate if this is a system property (stored in DB).'
+ ),
+ owner: zod
+ .union([
+ zod
+ .object({
+ scope: zod.enum(['user']),
+ user_id: zod.string(),
+ })
+ .describe('User-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['team']),
+ team_id: zod.uuid(),
+ })
+ .describe('Team-scoped property.'),
+ zod
+ .object({
+ scope: zod.enum(['system']),
+ })
+ .describe(
+ 'System-owned property (no user or team owner).'
+ ),
+ ])
+ .describe(
+ 'Defines who owns a property - user-scoped, team-scoped, or system.'
+ ),
+ specific_entity_type: zod
+ .union([
+ zod.null(),
+ zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ ])
+ .optional(),
+ updated_at: zod.iso.datetime({}),
+ })
+ .describe(
+ 'Property definition model (service representation).'
+ ),
+ id: zod
+ .uuid()
+ .describe(
+ 'Globally unique id of the assignment attaching this property to an entity.'
+ ),
+ value: zod
+ .union([
+ zod.null(),
+ zod
+ .union([
+ zod
+ .object({
+ type: zod.enum(['Boolean']),
+ value: zod
+ .boolean()
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ })
+ .describe(
+ 'Boolean value\nSerializes as: {\"type\": \"Boolean\", \"value\": true}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Number']),
+ value: zod
+ .number()
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ })
+ .describe(
+ 'Numeric value\nSerializes as: {\"type\": \"Number\", \"value\": 42.5}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['String']),
+ value: zod
+ .string()
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ })
+ .describe(
+ 'String value\nSerializes as: {\"type\": \"String\", \"value\": \"text\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Date']),
+ value: zod.iso
+ .datetime({})
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ })
+ .describe(
+ 'Date\/timestamp value\nSerializes as: {\"type\": \"Date\", \"value\": \"2025-01-01T00:00:00Z\"}'
+ ),
+ zod
+ .object({
+ type: zod.enum(['SelectOption']),
+ value: zod
+ .array(zod.uuid())
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Select option(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"SelectOption\", \"value\": [\"uuid\"]} (length 0 or 1)\nMulti-select: {\"type\": \"SelectOption\", \"value\": [\"uuid1\", \"uuid2\", ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['EntityReference']),
+ value: zod
+ .array(
+ zod
+ .object({
+ entity_id: zod.string(),
+ entity_type: zod
+ .enum([
+ 'CALENDAR_EVENT',
+ 'CALL_RECORD',
+ 'CHANNEL',
+ 'CHAT',
+ 'COMPANY',
+ 'DOCUMENT',
+ 'INITIATIVE',
+ 'PROJECT',
+ 'TASK',
+ 'THREAD',
+ 'USER',
+ ])
+ .describe(
+ 'Type of entity that can be referenced by entity properties.'
+ ),
+ specific_message_id: zod
+ .uuid()
+ .nullish()
+ .describe(
+ 'For CHANNEL, CHAT, THREAD entity types - optional specific message ID.\nThis allows referencing a specific message within a thread\/channel\/chat.'
+ ),
+ })
+ .describe(
+ 'Entity reference for entity-type property values.'
+ )
+ )
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Entity reference(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"EntityReference\", \"value\": [{...}]} (length 0 or 1)\nMulti-select: {\"type\": \"EntityReference\", \"value\": [{...}, {...}, ...]} (length 0+)'
+ ),
+ zod
+ .object({
+ type: zod.enum(['Link']),
+ value: zod
+ .array(zod.string())
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ })
+ .describe(
+ 'Link value(s) - always an array (check is_multi_select to determine if single or multi)\nSingle-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\"]} (length 0 or 1)\nMulti-select: {\"type\": \"Link\", \"value\": [\"https:\/\/example.com\", \"https:\/\/other.com\"]} (length 0+)'
+ ),
+ ])
+ .describe(
+ 'Property value (service representation).\n\nRepresents the actual value stored for an entity property.\nThis is serialized to\/from JSONB in the database.'
+ ),
+ ])
+ .optional(),
+ })
+ .describe(
+ 'A property attached to a Soup item.\n\nThis is a simplified representation that includes only the definition and value,\nomitting the entity property assignment metadata and options.'
+ )
+ )
+ .describe('Properties attached to the entity.'),
+ })
+ .describe(
+ 'Property fields that can be flattened into property-bearing Soup items.'
+ )
+ .and(
+ zod.object({
+ createdAt: zod.iso
+ .datetime({})
+ .describe('Creation timestamp.'),
+ descriptionDocumentId: zod
+ .uuid()
+ .nullish()
+ .describe(
+ 'Document holding the initiative description.'
+ ),
+ id: zod.uuid().describe('Initiative identifier.'),
+ name: zod
+ .string()
+ .describe('Initiative display name.'),
+ ownerId: zod.string().describe('Initiative owner.'),
+ updatedAt: zod.iso
+ .datetime({})
+ .describe('Last modification timestamp.'),
+ viewedAt: zod.iso
+ .datetime({})
+ .nullish()
+ .describe(
+ 'Last time the requesting user viewed the initiative.'
+ ),
+ })
+ )
+ .describe(
+ 'An initiative (called a project in the frontend) in the Soup feed.'
+ ),
+ tag: zod.enum(['initiative']),
+ })
+ .describe('Initiative entity.'),
zod
.object({
data: zod
@@ -26668,6 +28096,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -26773,6 +28202,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -27421,6 +28851,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -27522,6 +28953,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -27789,6 +29221,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -27894,6 +29327,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -28103,6 +29537,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -28204,6 +29639,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -28462,6 +29898,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -28563,6 +30000,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -28811,6 +30249,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
@@ -28912,6 +30351,7 @@ export const postItemsSoupAstGroupedResponse = zod
'CHAT',
'COMPANY',
'DOCUMENT',
+ 'INITIATIVE',
'PROJECT',
'TASK',
'THREAD',
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-soup.test.ts b/apps/web/src/lib/service-clients/service-storage/graphql-soup.test.ts
index 447a044b9a..449e6187a7 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql-soup.test.ts
+++ b/apps/web/src/lib/service-clients/service-storage/graphql-soup.test.ts
@@ -10,6 +10,22 @@ import type {
SoupItemFieldsFragment,
} from './graphql/generated/graphql';
+it('omits opt-in initiatives until the Projects renderer is available', async () => {
+ const { mapGraphqlSoupItem } = await import('./graphql-soup');
+ expect(
+ mapGraphqlSoupItem({
+ __typename: 'GraphqlSoupInitiative',
+ id: 'initiative',
+ entityType: 'INITIATIVE',
+ displayName: 'Launch',
+ isFavorited: false,
+ frecencyScore: null,
+ notifications: [],
+ cacheProjection: null,
+ })
+ ).toBeNull();
+});
+
it('maps agent sessions without discarding persona, favorites or notifications', async () => {
const { mapGraphqlSoupItem } = await import('./graphql-soup');
const mapped = mapGraphqlSoupItem({
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts b/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts
index 7564b959a7..b74be45079 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts
+++ b/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts
@@ -1288,6 +1288,9 @@ function mapGraphqlReminderSchedule(entity: {
}
export function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem | null {
+ // No client opts into initiatives until the Projects UI adds its fragment.
+ if (item.__typename === 'GraphqlSoupInitiative') return null;
+
const frecency = item.frecencyScore ?? 0;
return match(item)
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 a53b5973de..6ca4fcce8a 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
@@ -596,6 +596,8 @@ export type GraphqlEntityFilterAst = {
emailFilter?: GraphqlEmailFilterAst | null | undefined;
/** The foreign entity filter to apply. */
foreignEntityFilter?: GraphqlForeignEntityExpr | null | undefined;
+ /** The initiative filter to apply. Initiatives are opt-in. */
+ initiativeFilter?: GraphqlInitiativeExpr | null | undefined;
/** The project filter to apply. */
projectFilter?: GraphqlProjectExpr | null | undefined;
/** The properties filter to apply. */
@@ -811,6 +813,40 @@ export type GraphqlGroupByInput = {
propertyDefinitionId?: string | number | null | undefined;
};
+/** The two operands of a recursive `InitiativeFilterExpr` binary expression. */
+export type GraphqlInitiativeBinaryExpr = {
+ /** Left expression. */
+ left: GraphqlInitiativeExpr;
+ /** Right expression. */
+ right: GraphqlInitiativeExpr;
+};
+
+/** A recursive `InitiativeFilterExpr` filter expression. */
+export type GraphqlInitiativeExpr =
+ { /** Both expressions must match. */
+ and: GraphqlInitiativeBinaryExpr; literal?: never; not?: never; or?: never; }
+ | { and?: never; /** Match a literal. */
+ literal: GraphqlInitiativeLiteral; not?: never; or?: never; }
+ | { and?: never; literal?: never; /** Negate an expression. */
+ not: GraphqlInitiativeExpr; or?: never; }
+ | { and?: never; literal?: never; not?: never; /** Either expression may match. */
+ or: GraphqlInitiativeBinaryExpr; };
+
+/** GraphQL input for selecting initiatives through Soup. */
+export type GraphqlInitiativeLiteral =
+ { /** Match projects due after this RFC 3339 timestamp. */
+ dueAfter: string; dueBefore?: never; id?: never; include?: never; nameContains?: never; owner?: never; }
+ | { dueAfter?: never; /** Match projects due before this RFC 3339 timestamp. */
+ dueBefore: string; id?: never; include?: never; nameContains?: never; owner?: never; }
+ | { dueAfter?: never; dueBefore?: never; /** Match an initiative identifier. */
+ id: string | number; include?: never; nameContains?: never; owner?: never; }
+ | { dueAfter?: never; dueBefore?: never; id?: never; /** Opt into initiatives; must be true. Omit the filter to exclude them. */
+ include: boolean; nameContains?: never; owner?: never; }
+ | { dueAfter?: never; dueBefore?: never; id?: never; include?: never; /** Match a case-insensitive substring of the name. */
+ nameContains: string; owner?: never; }
+ | { dueAfter?: never; dueBefore?: never; id?: never; include?: never; nameContains?: never; /** Match the owning principal. */
+ owner: string; };
+
/** Audience allowed to access an entity through its share link. */
export type GraphqlLinkShare =
/** Anyone with the link can access the entity. */
@@ -914,6 +950,8 @@ export type GraphqlPropertyEntityType =
| 'COMPANY'
/** Document entity. */
| 'DOCUMENT'
+ /** Initiative entity. */
+ | 'INITIATIVE'
/** Project entity. */
| 'PROJECT'
/** Task entity. */
@@ -935,7 +973,9 @@ export type GraphqlPropertyTargetEntityType =
| 'COMPANY'
/** Document target, including tasks and snippets. */
| 'DOCUMENT'
- /** Project target. */
+ /** Initiative target, displayed as a Project in the application. */
+ | 'INITIATIVE'
+ /** Folder project target. */
| 'PROJECT'
/** Email thread target. */
| 'THREAD'
@@ -1067,6 +1107,8 @@ export type GraphqlSoupEntityType =
| 'EMAIL_THREAD'
/** Foreign entity. */
| 'FOREIGN_ENTITY'
+ /** Initiative entity, presented as a project in the frontend. */
+ | 'INITIATIVE'
/** Project entity. */
| 'PROJECT'
/** Reminder entity. */
@@ -1516,6 +1558,19 @@ export type EntityActivityQuery = { user: { id: string, soup: { items: Array<
| { __typename: 'GraphqlActivitySent' }
| { __typename: 'GraphqlActivityUnknownAction', tag: string, payload: unknown }
}> }
+ | { __typename: 'GraphqlSoupInitiative', id: string, activity: Array<{ __typename: 'GraphqlActivityEvent', id: string, actorId: string, subjectId: string, entityType: GraphqlEntityType, entityId: string, occurredAt: string, action:
+ | { __typename: 'GraphqlActivityCallStarted', callId: string }
+ | { __typename: 'GraphqlActivityCreated' }
+ | { __typename: 'GraphqlActivityDeleted' }
+ | { __typename: 'GraphqlActivityEdited' }
+ | { __typename: 'GraphqlActivityMessaged' }
+ | { __typename: 'GraphqlActivityOpened' }
+ | { __typename: 'GraphqlActivityParticipantAdded', participant: string }
+ | { __typename: 'GraphqlActivityParticipantRemoved', participant: string }
+ | { __typename: 'GraphqlActivityPropertyChanged', property: string, from: unknown, to: unknown }
+ | { __typename: 'GraphqlActivitySent' }
+ | { __typename: 'GraphqlActivityUnknownAction', tag: string, payload: unknown }
+ }> }
| { __typename: 'GraphqlSoupProject', id: string, activity: Array<{ __typename: 'GraphqlActivityEvent', id: string, actorId: string, subjectId: string, entityType: GraphqlEntityType, entityId: string, occurredAt: string, action:
| { __typename: 'GraphqlActivityCallStarted', callId: string }
| { __typename: 'GraphqlActivityCreated' }
@@ -1684,6 +1739,20 @@ type EntityActivityFields_GraphqlSoupForeignEntity_Fragment = { __typename: 'Gra
| { __typename: 'GraphqlActivityUnknownAction', tag: string, payload: unknown }
}> };
+type EntityActivityFields_GraphqlSoupInitiative_Fragment = { __typename: 'GraphqlSoupInitiative', id: string, activity: Array<{ __typename: 'GraphqlActivityEvent', id: string, actorId: string, subjectId: string, entityType: GraphqlEntityType, entityId: string, occurredAt: string, action:
+ | { __typename: 'GraphqlActivityCallStarted', callId: string }
+ | { __typename: 'GraphqlActivityCreated' }
+ | { __typename: 'GraphqlActivityDeleted' }
+ | { __typename: 'GraphqlActivityEdited' }
+ | { __typename: 'GraphqlActivityMessaged' }
+ | { __typename: 'GraphqlActivityOpened' }
+ | { __typename: 'GraphqlActivityParticipantAdded', participant: string }
+ | { __typename: 'GraphqlActivityParticipantRemoved', participant: string }
+ | { __typename: 'GraphqlActivityPropertyChanged', property: string, from: unknown, to: unknown }
+ | { __typename: 'GraphqlActivitySent' }
+ | { __typename: 'GraphqlActivityUnknownAction', tag: string, payload: unknown }
+ }> };
+
type EntityActivityFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProject', id: string, activity: Array<{ __typename: 'GraphqlActivityEvent', id: string, actorId: string, subjectId: string, entityType: GraphqlEntityType, entityId: string, occurredAt: string, action:
| { __typename: 'GraphqlActivityCallStarted', callId: string }
| { __typename: 'GraphqlActivityCreated' }
@@ -1723,6 +1792,7 @@ export type EntityActivityFieldsFragment =
| EntityActivityFields_GraphqlSoupDocument_Fragment
| EntityActivityFields_GraphqlSoupEmailThread_Fragment
| EntityActivityFields_GraphqlSoupForeignEntity_Fragment
+ | EntityActivityFields_GraphqlSoupInitiative_Fragment
| EntityActivityFields_GraphqlSoupProject_Fragment
| EntityActivityFields_GraphqlSoupReminder_Fragment
;
@@ -1757,6 +1827,7 @@ export type AgentSessionMentionsQuery = { user: { id: string, soup: { items: Arr
| { __typename: 'GraphqlSoupDocument', id: string }
| { __typename: 'GraphqlSoupEmailThread', id: string }
| { __typename: 'GraphqlSoupForeignEntity', id: string }
+ | { __typename: 'GraphqlSoupInitiative', id: string }
| { __typename: 'GraphqlSoupProject', id: string }
| { __typename: 'GraphqlSoupReminder', id: string }
> } } };
@@ -1911,6 +1982,7 @@ export type ChannelListSoupQuery = { user: { id: string, emailLinks: Array<{ id:
| { __typename: 'GraphqlStringPropertyValue', stringValue: string }
| null }> }
| { __typename: 'GraphqlSoupForeignEntity', foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, sourceMetadata: unknown, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
| { __typename: 'GraphqlDatePropertyValue', dateValue: string }
@@ -2012,6 +2084,8 @@ type ChannelListItemFields_GraphqlSoupEmailThread_Fragment = { __typename: 'Grap
type ChannelListItemFields_GraphqlSoupForeignEntity_Fragment = { __typename: 'GraphqlSoupForeignEntity', foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, sourceMetadata: unknown, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean };
+type ChannelListItemFields_GraphqlSoupInitiative_Fragment = { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean };
+
type ChannelListItemFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
| { __typename: 'GraphqlDatePropertyValue', dateValue: string }
@@ -2043,6 +2117,7 @@ export type ChannelListItemFieldsFragment =
| ChannelListItemFields_GraphqlSoupDocument_Fragment
| ChannelListItemFields_GraphqlSoupEmailThread_Fragment
| ChannelListItemFields_GraphqlSoupForeignEntity_Fragment
+ | ChannelListItemFields_GraphqlSoupInitiative_Fragment
| ChannelListItemFields_GraphqlSoupProject_Fragment
| ChannelListItemFields_GraphqlSoupReminder_Fragment
;
@@ -2091,6 +2166,7 @@ export type ChannelUnreadMembershipCacheWriteQuery = { user: { id: string, soup:
| { __typename: 'GraphqlSoupDocument', id: string }
| { __typename: 'GraphqlSoupEmailThread', id: string }
| { __typename: 'GraphqlSoupForeignEntity', id: string }
+ | { __typename: 'GraphqlSoupInitiative', id: string }
| { __typename: 'GraphqlSoupProject', id: string }
| { __typename: 'GraphqlSoupReminder', id: string }
> } } };
@@ -2111,6 +2187,7 @@ export type ChannelUnreadCacheWriteSubscription = { soupUpdates: Array<
| { __typename: 'GraphqlSoupDocument', id: string }
| { __typename: 'GraphqlSoupEmailThread', id: string }
| { __typename: 'GraphqlSoupForeignEntity', id: string }
+ | { __typename: 'GraphqlSoupInitiative', id: string }
| { __typename: 'GraphqlSoupProject', id: string }
| { __typename: 'GraphqlSoupReminder', id: string }
}
@@ -2132,6 +2209,7 @@ export type ChannelUnreadPresenceQuery = { user: { id: string, soup: { items: Ar
| { __typename: 'GraphqlSoupDocument', id: string }
| { __typename: 'GraphqlSoupEmailThread', id: string }
| { __typename: 'GraphqlSoupForeignEntity', id: string }
+ | { __typename: 'GraphqlSoupInitiative', id: string }
| { __typename: 'GraphqlSoupProject', id: string }
| { __typename: 'GraphqlSoupReminder', id: string }
> } } };
@@ -2534,6 +2612,33 @@ type EntityMutationResultFields_GraphqlMutationSuccess_Fragment = { __typename:
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -2948,6 +3053,33 @@ export type EntityMutationPayloadFieldsFragment = { results: Array<
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -3363,6 +3495,33 @@ export type RenameEntitiesMutation = { renameEntities: { results: Array<
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -3778,6 +3937,33 @@ export type MoveEntitiesMutation = { moveEntities: { results: Array<
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -4193,6 +4379,33 @@ export type UpdateEntitySharePoliciesMutation = { updateEntitySharePolicies: { r
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -4608,6 +4821,33 @@ export type TrashEntitiesMutation = { trashEntities: { results: Array<
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -5023,6 +5263,33 @@ export type RestoreEntitiesMutation = { restoreEntities: { results: Array<
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -5438,6 +5705,33 @@ export type DeleteEntitiesPermanentlyMutation = { deleteEntitiesPermanently: { r
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -5853,7 +6147,7 @@ export type DuplicateEntitiesMutation = { duplicateEntities: { results: Array<
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
- | { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -5879,13 +6173,40 @@ export type DuplicateEntitiesMutation = { duplicateEntities: { results: Array<
| { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
- | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
- | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
- | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
- | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
- | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
- | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ }> }
+ | { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
| { __typename: 'GraphqlStringPropertyValue', stringValue: string }
| null }> }
| { __typename: 'GraphqlSoupReminder', scheduleType: GraphqlReminderScheduleType, remindAt: string | null, cron: string | null, timezone: string | null, nextRunAt: string, enabled: boolean, completedAt: string | null, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, reminderDescription: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
@@ -6269,6 +6590,33 @@ export type SetEntityFavoriteMutation = { setEntityFavorite:
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -6439,6 +6787,15 @@ export type EntityPropertiesQuery = { user: { id: string, soup: { items: Array<
| { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
| { __typename: 'GraphqlStringPropertyValue', stringValue: string }
| null }> }
+ | { __typename: 'GraphqlSoupInitiative', id: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
| { __typename: 'GraphqlSoupProject', id: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
| { __typename: 'GraphqlDatePropertyValue', dateValue: string }
@@ -6502,6 +6859,7 @@ export type GroupSoupMembershipQuery = { user: { id: string, groupSoup: { bins:
| { __typename: 'GraphqlSoupDocument', id: string }
| { __typename: 'GraphqlSoupEmailThread', id: string }
| { __typename: 'GraphqlSoupForeignEntity', id: string }
+ | { __typename: 'GraphqlSoupInitiative', id: string }
| { __typename: 'GraphqlSoupProject', id: string }
| { __typename: 'GraphqlSoupReminder', id: string }
> }> } } };
@@ -6843,6 +7201,33 @@ export type GroupSoupQuery = { user: { id: string, groupSoup: { bins: Array<{ ke
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -7016,6 +7401,7 @@ export type ItemPreviewNameCacheWriteQuery = { user: { id: string, soup: { items
| { __typename: 'GraphqlSoupDocument', id: string, displayName: string | null, documentName: string }
| { __typename: 'GraphqlSoupEmailThread', id: string, displayName: string | null, emailName: string | null }
| { __typename: 'GraphqlSoupForeignEntity', id: string, displayName: string | null }
+ | { __typename: 'GraphqlSoupInitiative', id: string, displayName: string | null }
| { __typename: 'GraphqlSoupProject', id: string, displayName: string | null, projectName: string }
| { __typename: 'GraphqlSoupReminder', id: string, displayName: string | null }
> } } };
@@ -7036,6 +7422,7 @@ export type ItemPreviewFileTypeCacheWriteQuery = { user: { id: string, soup: { i
| { __typename: 'GraphqlSoupDocument', fileType: string | null, id: string }
| { __typename: 'GraphqlSoupEmailThread', id: string }
| { __typename: 'GraphqlSoupForeignEntity', id: string }
+ | { __typename: 'GraphqlSoupInitiative', id: string }
| { __typename: 'GraphqlSoupProject', id: string }
| { __typename: 'GraphqlSoupReminder', id: string }
> } } };
@@ -7061,6 +7448,7 @@ export type ItemPreviewQuery = { user: { id: string, soup: { items: Array<
| null }
| { __typename: 'GraphqlSoupEmailThread', senderEmail: string | null, senderName: string | null, id: string, displayName: string | null, emailName: string | null }
| { __typename: 'GraphqlSoupForeignEntity', id: string, displayName: string | null }
+ | { __typename: 'GraphqlSoupInitiative', id: string, displayName: string | null }
| { __typename: 'GraphqlSoupProject', id: string, displayName: string | null, projectName: string }
| { __typename: 'GraphqlSoupReminder', id: string, displayName: string | null }
> } } };
@@ -7099,6 +7487,7 @@ export type ItemPreviewsQuery = { user: { id: string, soup: { items: Array<
| null }
| { __typename: 'GraphqlSoupEmailThread', senderEmail: string | null, senderName: string | null, id: string, displayName: string | null, emailName: string | null }
| { __typename: 'GraphqlSoupForeignEntity', id: string, displayName: string | null }
+ | { __typename: 'GraphqlSoupInitiative', id: string, displayName: string | null }
| { __typename: 'GraphqlSoupProject', id: string, displayName: string | null, projectName: string }
| { __typename: 'GraphqlSoupReminder', id: string, displayName: string | null }
> } } };
@@ -7141,6 +7530,8 @@ type ItemPreviewDetailsFields_GraphqlSoupEmailThread_Fragment = { __typename: 'G
type ItemPreviewDetailsFields_GraphqlSoupForeignEntity_Fragment = { __typename: 'GraphqlSoupForeignEntity', id: string, displayName: string | null };
+type ItemPreviewDetailsFields_GraphqlSoupInitiative_Fragment = { __typename: 'GraphqlSoupInitiative', id: string, displayName: string | null };
+
type ItemPreviewDetailsFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProject', id: string, displayName: string | null, projectName: string };
type ItemPreviewDetailsFields_GraphqlSoupReminder_Fragment = { __typename: 'GraphqlSoupReminder', id: string, displayName: string | null };
@@ -7156,6 +7547,7 @@ export type ItemPreviewDetailsFieldsFragment =
| ItemPreviewDetailsFields_GraphqlSoupDocument_Fragment
| ItemPreviewDetailsFields_GraphqlSoupEmailThread_Fragment
| ItemPreviewDetailsFields_GraphqlSoupForeignEntity_Fragment
+ | ItemPreviewDetailsFields_GraphqlSoupInitiative_Fragment
| ItemPreviewDetailsFields_GraphqlSoupProject_Fragment
| ItemPreviewDetailsFields_GraphqlSoupReminder_Fragment
;
@@ -7185,6 +7577,8 @@ type ItemPreviewFields_GraphqlSoupEmailThread_Fragment = { __typename: 'GraphqlS
type ItemPreviewFields_GraphqlSoupForeignEntity_Fragment = { __typename: 'GraphqlSoupForeignEntity', id: string, displayName: string | null };
+type ItemPreviewFields_GraphqlSoupInitiative_Fragment = { __typename: 'GraphqlSoupInitiative', id: string, displayName: string | null };
+
type ItemPreviewFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProject', id: string, displayName: string | null, projectName: string };
type ItemPreviewFields_GraphqlSoupReminder_Fragment = { __typename: 'GraphqlSoupReminder', id: string, displayName: string | null };
@@ -7200,6 +7594,7 @@ export type ItemPreviewFieldsFragment =
| ItemPreviewFields_GraphqlSoupDocument_Fragment
| ItemPreviewFields_GraphqlSoupEmailThread_Fragment
| ItemPreviewFields_GraphqlSoupForeignEntity_Fragment
+ | ItemPreviewFields_GraphqlSoupInitiative_Fragment
| ItemPreviewFields_GraphqlSoupProject_Fragment
| ItemPreviewFields_GraphqlSoupReminder_Fragment
;
@@ -7235,6 +7630,7 @@ export type SoupMembershipQuery = { user: { id: string, soup: { items: Array<
| { __typename: 'GraphqlSoupDocument', id: string }
| { __typename: 'GraphqlSoupEmailThread', id: string }
| { __typename: 'GraphqlSoupForeignEntity', id: string }
+ | { __typename: 'GraphqlSoupInitiative', id: string }
| { __typename: 'GraphqlSoupProject', id: string }
| { __typename: 'GraphqlSoupReminder', id: string }
> } } };
@@ -7573,6 +7969,33 @@ type SoupPatchFields_SoupUpdated_Fragment = { __typename: 'SoupUpdated', item:
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -7987,6 +8410,33 @@ export type SoupUpdatesSubscription = { soupUpdates: Array<
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -8397,6 +8847,33 @@ export type SoupQuery = { user: { id: string, emailLinks: Array<{ id: string, em
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -8811,6 +9288,33 @@ export type SoupBackfillQuery = { user: { id: string, emailLinks: Array<{ id: st
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -9220,6 +9724,33 @@ export type SoupMailBackfillQuery = { user: { id: string, emailLinks: Array<{ id
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -9629,6 +10160,33 @@ export type SoupSharedMailBackfillQuery = { user: { id: string, emailLinks: Arra
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -9710,6 +10268,7 @@ export type SoupSharedMailBackfillQuery = { user: { id: string, emailLinks: Arra
| { __typename: 'GraphqlSoupDocument', id: string }
| { __typename: 'GraphqlSoupEmailThread', id: string }
| { __typename: 'GraphqlSoupForeignEntity', id: string }
+ | { __typename: 'GraphqlSoupInitiative', id: string }
| { __typename: 'GraphqlSoupProject', id: string }
| { __typename: 'GraphqlSoupReminder', id: string }
> } } };
@@ -10062,6 +10621,34 @@ type MailItemFields_GraphqlSoupForeignEntity_Fragment = { __typename: 'GraphqlSo
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> };
+type MailItemFields_GraphqlSoupInitiative_Fragment = { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> };
+
type MailItemFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -10145,6 +10732,7 @@ export type MailItemFieldsFragment =
| MailItemFields_GraphqlSoupDocument_Fragment
| MailItemFields_GraphqlSoupEmailThread_Fragment
| MailItemFields_GraphqlSoupForeignEntity_Fragment
+ | MailItemFields_GraphqlSoupInitiative_Fragment
| MailItemFields_GraphqlSoupProject_Fragment
| MailItemFields_GraphqlSoupReminder_Fragment
;
@@ -10490,6 +11078,34 @@ type SoupItemFields_GraphqlSoupForeignEntity_Fragment = { __typename: 'GraphqlSo
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> };
+type SoupItemFields_GraphqlSoupInitiative_Fragment = { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> };
+
type SoupItemFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -10573,6 +11189,7 @@ export type SoupItemFieldsFragment =
| SoupItemFields_GraphqlSoupDocument_Fragment
| SoupItemFields_GraphqlSoupEmailThread_Fragment
| SoupItemFields_GraphqlSoupForeignEntity_Fragment
+ | SoupItemFields_GraphqlSoupInitiative_Fragment
| SoupItemFields_GraphqlSoupProject_Fragment
| SoupItemFields_GraphqlSoupReminder_Fragment
;
@@ -10658,6 +11275,8 @@ type SoupItemPreviewFields_GraphqlSoupEmailThread_Fragment = { __typename: 'Grap
type SoupItemPreviewFields_GraphqlSoupForeignEntity_Fragment = { __typename: 'GraphqlSoupForeignEntity', foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, sourceMetadata: unknown, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean };
+type SoupItemPreviewFields_GraphqlSoupInitiative_Fragment = { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean };
+
type SoupItemPreviewFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
| { __typename: 'GraphqlDatePropertyValue', dateValue: string }
@@ -10689,6 +11308,7 @@ export type SoupItemPreviewFieldsFragment =
| SoupItemPreviewFields_GraphqlSoupDocument_Fragment
| SoupItemPreviewFields_GraphqlSoupEmailThread_Fragment
| SoupItemPreviewFields_GraphqlSoupForeignEntity_Fragment
+ | SoupItemPreviewFields_GraphqlSoupInitiative_Fragment
| SoupItemPreviewFields_GraphqlSoupProject_Fragment
| SoupItemPreviewFields_GraphqlSoupReminder_Fragment
;
@@ -10973,6 +11593,34 @@ type SoupEntityCoreFields_GraphqlSoupForeignEntity_Fragment = { id: string, enti
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> };
+type SoupEntityCoreFields_GraphqlSoupInitiative_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> };
+
type SoupEntityCoreFields_GraphqlSoupProject_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -11040,6 +11688,7 @@ export type SoupEntityCoreFieldsFragment =
| SoupEntityCoreFields_GraphqlSoupDocument_Fragment
| SoupEntityCoreFields_GraphqlSoupEmailThread_Fragment
| SoupEntityCoreFields_GraphqlSoupForeignEntity_Fragment
+ | SoupEntityCoreFields_GraphqlSoupInitiative_Fragment
| SoupEntityCoreFields_GraphqlSoupProject_Fragment
| SoupEntityCoreFields_GraphqlSoupReminder_Fragment
;
@@ -11064,6 +11713,8 @@ type SoupEntityIdentityFields_GraphqlSoupEmailThread_Fragment = { id: string, en
type SoupEntityIdentityFields_GraphqlSoupForeignEntity_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean };
+type SoupEntityIdentityFields_GraphqlSoupInitiative_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean };
+
type SoupEntityIdentityFields_GraphqlSoupProject_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean };
type SoupEntityIdentityFields_GraphqlSoupReminder_Fragment = { id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean };
@@ -11079,6 +11730,7 @@ export type SoupEntityIdentityFieldsFragment =
| SoupEntityIdentityFields_GraphqlSoupDocument_Fragment
| SoupEntityIdentityFields_GraphqlSoupEmailThread_Fragment
| SoupEntityIdentityFields_GraphqlSoupForeignEntity_Fragment
+ | SoupEntityIdentityFields_GraphqlSoupInitiative_Fragment
| SoupEntityIdentityFields_GraphqlSoupProject_Fragment
| SoupEntityIdentityFields_GraphqlSoupReminder_Fragment
;
@@ -11572,6 +12224,33 @@ export type SoupNotificationsQuery = { user: { id: string, soup: { nextCursor: s
| { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> }
+ | { __typename: 'GraphqlSoupInitiative', id: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }
| { __typename: 'GraphqlSoupProject', id: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -11908,6 +12587,34 @@ type SoupNotificationsEntityFields_GraphqlSoupForeignEntity_Fragment = { __typen
| { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
}> };
+type SoupNotificationsEntityFields_GraphqlSoupInitiative_Fragment = { __typename: 'GraphqlSoupInitiative', id: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> };
+
type SoupNotificationsEntityFields_GraphqlSoupProject_Fragment = { __typename: 'GraphqlSoupProject', id: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
| { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
| { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
@@ -11975,6 +12682,7 @@ export type SoupNotificationsEntityFieldsFragment =
| SoupNotificationsEntityFields_GraphqlSoupDocument_Fragment
| SoupNotificationsEntityFields_GraphqlSoupEmailThread_Fragment
| SoupNotificationsEntityFields_GraphqlSoupForeignEntity_Fragment
+ | SoupNotificationsEntityFields_GraphqlSoupInitiative_Fragment
| SoupNotificationsEntityFields_GraphqlSoupProject_Fragment
| SoupNotificationsEntityFields_GraphqlSoupReminder_Fragment
;
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 ef70322726..b1371384d0 100644
--- a/apps/web/src/lib/service-clients/service-storage/openapi.json
+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json
@@ -23463,6 +23463,10 @@
"$ref": "#/components/schemas/ForeignEntityFilters",
"description": "the bundled [ForeignEntityFilters]"
},
+ "initiative_filters": {
+ "$ref": "#/components/schemas/InitiativeFilters",
+ "description": "Initiative filters. Initiatives are opt-in."
+ },
"project_filters": {
"$ref": "#/components/schemas/ProjectFilters",
"description": "the bundled [ProjectFilters]"
@@ -23608,6 +23612,7 @@
"CHAT",
"COMPANY",
"DOCUMENT",
+ "INITIATIVE",
"PROJECT",
"TASK",
"THREAD",
@@ -25761,6 +25766,44 @@
}
}
},
+ "InitiativeFilters": {
+ "type": "object",
+ "description": "Filters for initiatives.",
+ "properties": {
+ "due_after": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Inclusive lower due-date bound."
+ },
+ "due_before": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Inclusive upper due-date bound."
+ },
+ "include": {
+ "type": "boolean",
+ "description": "Opt this query into initiatives at all. Initiatives are off by\ndefault — see [`crate::ast::initiative::InitiativeLiteral::Include`].\nAsking for specific `initiative_ids` or `owners` also opts in."
+ },
+ "initiative_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Initiative ids to filter by. Empty to include all accessible initiatives."
+ },
+ "name": {
+ "type": ["string", "null"],
+ "description": "Case-insensitive name substring."
+ },
+ "owners": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Filter by initiative owner principal — a user ('macro|[email protected]'), a bot\n('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every\nowner."
+ }
+ }
+ },
"InitiativeId": {
"type": "string",
"format": "uuid",
@@ -30539,6 +30582,64 @@
}
}
},
+ "SoupInitiative_SoupPropertiesField": {
+ "allOf": [
+ {
+ "type": "object",
+ "description": "Property fields that can be flattened into property-bearing Soup items.",
+ "required": ["properties"],
+ "properties": {
+ "properties": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SoupProperty"
+ },
+ "description": "Properties attached to the entity."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "required": ["id", "name", "ownerId", "createdAt", "updatedAt"],
+ "properties": {
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Creation timestamp."
+ },
+ "descriptionDocumentId": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Document holding the initiative description."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Initiative identifier."
+ },
+ "name": {
+ "type": "string",
+ "description": "Initiative display name."
+ },
+ "ownerId": {
+ "type": "string",
+ "description": "Initiative owner."
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Last modification timestamp."
+ },
+ "viewedAt": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Last time the requesting user viewed the initiative."
+ }
+ }
+ }
+ ],
+ "description": "An initiative (called a project in the frontend) in the Soup feed."
+ },
"SoupItem": {
"oneOf": [
{
@@ -30586,6 +30687,21 @@
}
}
},
+ {
+ "type": "object",
+ "description": "Initiative entity.",
+ "required": ["data", "tag"],
+ "properties": {
+ "data": {
+ "$ref": "#/components/schemas/SoupInitiative_SoupPropertiesField",
+ "description": "Initiative entity."
+ },
+ "tag": {
+ "type": "string",
+ "enum": ["initiative"]
+ }
+ }
+ },
{
"type": "object",
"description": "Email thread item.",
diff --git a/crates/client/cache-core/src/meta.rs b/crates/client/cache-core/src/meta.rs
index 50df02ddd0..c2e7241462 100644
--- a/crates/client/cache-core/src/meta.rs
+++ b/crates/client/cache-core/src/meta.rs
@@ -129,8 +129,10 @@ mod tests {
assert!(entity.possible_types.contains(&"GraphqlSoupCalendarEvent"));
assert!(entity.possible_types.contains(&"GraphqlSoupReminder"));
assert!(entity.possible_types.contains(&"GraphqlSoupAgentSession"));
- assert_eq!(entity.possible_types.len(), 12);
+ assert!(entity.possible_types.contains(&"GraphqlSoupInitiative"));
+ assert_eq!(entity.possible_types.len(), 13);
assert!(type_matches("GraphqlSoupDocument", "GraphqlSoupEntity"));
+ assert!(type_matches("GraphqlSoupInitiative", "GraphqlSoupEntity"));
assert!(!type_matches("GraphqlSoupItem", "GraphqlSoupEntity"));
}
diff --git a/crates/client/cache-core/tests/initiative.rs b/crates/client/cache-core/tests/initiative.rs
new file mode 100644
index 0000000000..b8bde858fd
--- /dev/null
+++ b/crates/client/cache-core/tests/initiative.rs
@@ -0,0 +1,167 @@
+//! Initiative list, detail, and mutation responses share one normalized entity.
+
+use cache_core::engine::{Engine, NetworkWrite, QueryRegistration, ReadResult};
+use cache_core::store::InMemoryStorage;
+use pollster::block_on;
+use serde_json::{Value as Json, json};
+
+const SOUP_QUERY: &str = r#"
+query Projects($input: SoupInput!) {
+ user {
+ id
+ soup(input: $input) {
+ items {
+ __typename
+ id
+ ... on GraphqlSoupInitiative { displayName }
+ }
+ nextCursor
+ }
+ }
+}
+"#;
+
+const DETAIL_QUERY: &str = r#"
+query Project($id: ID!) {
+ user {
+ id
+ initiative(initiativeId: $id) {
+ __typename
+ id
+ displayName
+ memberIds
+ taskCount
+ }
+ }
+}
+"#;
+
+const UPDATE_MUTATION: &str = r#"
+mutation UpdateProject($id: ID!, $input: UpdateInitiativeInput!) {
+ updateInitiative(initiativeId: $id, input: $input) {
+ __typename
+ id
+ displayName
+ }
+}
+"#;
+
+fn object(value: Json) -> serde_json::Map<String, Json> {
+ let Json::Object(value) = value else {
+ panic!("expected object")
+ };
+ value
+}
+
+#[test]
+fn mutation_updates_list_and_detail_without_losing_detail_fields() {
+ block_on(async {
+ let mut engine = Engine::new(InMemoryStorage::new());
+ let soup_variables = object(json!({ "input": { "limit": 10 } }));
+ let detail_variables = object(json!({ "id": "initiative-1" }));
+ let soup_response = json!({
+ "user": {
+ "id": "user-1",
+ "soup": {
+ "items": [{
+ "__typename": "GraphqlSoupInitiative",
+ "id": "initiative-1",
+ "displayName": "Original name"
+ }],
+ "nextCursor": null
+ }
+ }
+ });
+ let detail_response = json!({
+ "user": {
+ "id": "user-1",
+ "initiative": {
+ "__typename": "GraphqlSoupInitiative",
+ "id": "initiative-1",
+ "displayName": "Original name",
+ "memberIds": ["user-1", "user-2"],
+ "taskCount": 3
+ }
+ }
+ });
+
+ // Register the two views directly from their network responses.
+ // No entity-from-argument resolver or preliminary cache read is needed.
+ for (op_id, query, operation_name, variables, data) in [
+ (1, SOUP_QUERY, "Projects", &soup_variables, &soup_response),
+ (
+ 2,
+ DETAIL_QUERY,
+ "Project",
+ &detail_variables,
+ &detail_response,
+ ),
+ ] {
+ engine
+ .write_query_with_registration(
+ Some(op_id),
+ Some(QueryRegistration {
+ op_id,
+ entity_resolvers: &[],
+ }),
+ NetworkWrite {
+ query,
+ operation_name: Some(operation_name),
+ variables,
+ data,
+ identity: None,
+ },
+ )
+ .await
+ .unwrap();
+ }
+
+ let write = engine
+ .write_query(
+ Some(3),
+ UPDATE_MUTATION,
+ Some("UpdateProject"),
+ &object(json!({
+ "id": "initiative-1",
+ "input": { "name": "Renamed project" }
+ })),
+ &json!({
+ "updateInitiative": {
+ "__typename": "GraphqlSoupInitiative",
+ "id": "initiative-1",
+ "displayName": "Renamed project"
+ }
+ }),
+ None,
+ )
+ .await
+ .unwrap();
+
+ assert_eq!(write.affected_ops, [1, 2].into());
+
+ let mut expected_soup = soup_response;
+ expected_soup["user"]["soup"]["items"][0]["displayName"] = json!("Renamed project");
+ let mut expected_detail = detail_response;
+ expected_detail["user"]["initiative"]["displayName"] = json!("Renamed project");
+
+ for (op_id, query, operation_name, variables, expected) in [
+ (1, SOUP_QUERY, "Projects", &soup_variables, expected_soup),
+ (
+ 2,
+ DETAIL_QUERY,
+ "Project",
+ &detail_variables,
+ expected_detail,
+ ),
+ ] {
+ let ReadResult::Hit { data } = engine
+ .read_query(Some(op_id), query, Some(operation_name), variables)
+ .await
+ .unwrap()
+ else {
+ panic!("expected {operation_name} to remain complete in cache")
+ };
+ assert_eq!(data, expected);
+ }
+ });
+}
diff --git a/crates/client/cache-wasm/Cargo.toml b/crates/client/cache-wasm/Cargo.toml
index 171858fc84..12181ca9c2 100644
--- a/crates/client/cache-wasm/Cargo.toml
+++ b/crates/client/cache-wasm/Cargo.toml
@@ -2,8 +2,8 @@
edition = "2024"
name = "cache-wasm"
publish = false
-# Rebuild schema metadata for the archive/unarchive GraphQL mutation.
-version = "0.6.19"
+# Rebuild the browser cache with one canonical initiative GraphQL entity.
+version = "0.6.24"
[features]
default = []
diff --git a/crates/complete_graph/Cargo.toml b/crates/complete_graph/Cargo.toml
index 871bba0b67..e4009d2a7f 100644
--- a/crates/complete_graph/Cargo.toml
+++ b/crates/complete_graph/Cargo.toml
@@ -25,6 +25,7 @@ graphql_common = { path = "../graphql_common" }
graphql_email = { path = "../graphql_email" }
graphql_entity_mutation = { path = "../graphql_entity_mutation" }
graphql_favorite = { path = "../graphql_favorite" }
+graphql_initiative = { path = "../graphql_initiative" }
graphql_notification = { path = "../graphql_notification" }
graphql_permission = { path = "../graphql_permission" }
graphql_properties = { path = "../graphql_properties" }
diff --git a/crates/complete_graph/src/edges.rs b/crates/complete_graph/src/edges.rs
index 5cd5079fe0..f188bf445d 100644
--- a/crates/complete_graph/src/edges.rs
+++ b/crates/complete_graph/src/edges.rs
@@ -72,6 +72,7 @@ where
type ActivityEvent = GraphqlActivityEvent;
type EmailThreadEdges = SoupEmailThreadEdges<ER>;
type AgentSessionEdges = SoupAgentSessionEdges;
+ type InitiativeEdges = SoupInitiativeEdges;
fn from_entity(entity: model_entity::Entity<'static>) -> Self {
Self {
@@ -118,6 +119,10 @@ where
Ok(Some(encode_cache_projection_supplement(&supplement)?))
}
+ fn initiative_edges(initiative_id: Uuid) -> Self::InitiativeEdges {
+ SoupInitiativeEdges { initiative_id }
+ }
+
fn agent_session_edges(bot_id: Uuid) -> Self::AgentSessionEdges {
SoupAgentSessionEdges {
bot_id: BotId::new_from_uuid(bot_id),
@@ -436,5 +441,54 @@ where
}
}
+/// Initiative detail fields composed onto the canonical Soup entity.
+#[derive(Clone)]
+pub struct SoupInitiativeEdges {
+ /// Initiative whose domain-authorized details are requested.
+ initiative_id: Uuid,
+}
+
+#[Object]
+impl SoupInitiativeEdges {
+ /// Collaborators, independent of assignees.
+ async fn member_ids(&self, ctx: &Context<'_>) -> async_graphql::Result<Vec<String>> {
+ let detail = graphql_initiative::load_initiative_detail(ctx, self.initiative_id).await?;
+ Ok(detail.member_ids.iter().map(ToString::to_string).collect())
+ }
+
+ /// Associated task identifiers visible to this viewer.
+ async fn task_ids(&self, ctx: &Context<'_>) -> async_graphql::Result<Vec<ID>> {
+ let detail = graphql_initiative::load_initiative_detail(ctx, self.initiative_id).await?;
+ Ok(detail.task_ids.iter().cloned().map(ID).collect())
+ }
+
+ /// Current sharing state.
+ async fn share_permission(
+ &self,
+ ctx: &Context<'_>,
+ ) -> async_graphql::Result<graphql_initiative::GraphqlInitiativeSharePermission> {
+ let detail = graphql_initiative::load_initiative_detail(ctx, self.initiative_id).await?;
+ Ok(detail.share_permission.clone().into())
+ }
+
+ /// Number of associated tasks this viewer can see.
+ async fn task_count(&self, ctx: &Context<'_>) -> async_graphql::Result<u32> {
+ Ok(
+ graphql_initiative::load_initiative_summary(ctx, self.initiative_id)
+ .await?
+ .task_count,
+ )
+ }
+
+ /// Number of completed associated tasks this viewer can see.
+ async fn completed_task_count(&self, ctx: &Context<'_>) -> async_graphql::Result<u32> {
+ Ok(
+ graphql_initiative::load_initiative_summary(ctx, self.initiative_id)
+ .await?
+ .completed_task_count,
+ )
+ }
+}
+
#[cfg(test)]
mod test;
diff --git a/crates/complete_graph/src/schema.rs b/crates/complete_graph/src/schema.rs
index df94504b27..ef1c88fad5 100644
--- a/crates/complete_graph/src/schema.rs
+++ b/crates/complete_graph/src/schema.rs
@@ -30,19 +30,26 @@ use graphql_favorite::{
EntityFavoriteEdgeReader, FavoriteMutationRoot, FavoriteQueryReader, FavoritesFilterInput,
GraphqlFavorite, NoOpEntityFavoriteEdgeReader, NoOpFavoriteMutationService, resolve_favorites,
};
+use graphql_initiative::{
+ GraphqlInitiativeTasksPage, GraphqlTaskInitiativeReference, InitiativeMutationRoot,
+ InitiativeTasksInput, resolve_initiative, resolve_initiative_tasks,
+ resolve_task_initiative_references,
+};
use graphql_notification::{
NoOpNotificationMutationService, NoOpSoupNotificationEdgeReader, NotificationMutationRoot,
NotificationMutationService, NotificationSubscriptionRoot, SoupNotificationEdgeReader,
};
use graphql_permission::{EntityPermissionEdgeReader, NoOpEntityPermissionEdgeReader};
use graphql_properties::{
- EntityPropertyReader, EntityPropertyWriter, NoOpEntityPropertyReader, NoOpEntityPropertyWriter,
- PropertiesMutationRoot,
+ EntityPropertyReader, EntityPropertyWriter, GraphqlPropertyDefinition,
+ GraphqlPropertyDefinitionScope, GraphqlPropertyOption, NoOpEntityPropertyReader,
+ NoOpEntityPropertyWriter, PropertiesMutationRoot, load_property_definitions,
+ load_property_options,
};
use graphql_soup::{
- GraphqlSoupEmailThread, GroupedSoup, GroupedSoupInput, SoupEmailThreadMutationOutput,
- SoupEntityEdges, SoupInput, SoupPage, SoupPatch, resolve_grouped_soup, resolve_soup,
- resolve_soup_email_thread, resolve_soup_updates,
+ GraphqlSoupEmailThread, GraphqlSoupInitiative, GroupedSoup, GroupedSoupInput,
+ SoupEmailThreadMutationOutput, SoupEntityEdges, SoupInput, SoupPage, SoupPatch,
+ resolve_grouped_soup, resolve_soup, resolve_soup_email_thread, resolve_soup_updates,
};
use macro_authorization::{
InternalAuthConfig, MacroAuthorizationService, MacroAuthorizationServiceImpl,
@@ -81,6 +88,7 @@ pub struct CompleteMutationRoot<
ChannelMutationRoot<C, A>,
NotificationMutationRoot<N>,
GraphqlEmailMutation<ES, SoupEmailThreadMutationOutput<E>>,
+ InitiativeMutationRoot<E>,
);
impl<
@@ -103,6 +111,7 @@ impl<
ChannelMutationRoot::<C, A>::new(),
NotificationMutationRoot::<N>::new(),
GraphqlEmailMutation::<ES, SoupEmailThreadMutationOutput<E>>::new(),
+ InitiativeMutationRoot::<E>::default(),
)
}
}
@@ -622,6 +631,61 @@ where
async_graphql::ID(self.user_id.to_string())
}
+ /// One initiative accessible to the authenticated viewer.
+ async fn initiative(
+ &self,
+ ctx: &Context<'_>,
+ initiative_id: ID,
+ ) -> async_graphql::Result<GraphqlSoupInitiative<SoupEdges<NR, PR, ER, FR, AR, AcR>>> {
+ resolve_initiative(ctx, initiative_id).await
+ }
+
+ /// A permission-filtered page of task identifiers within an initiative.
+ async fn initiative_tasks(
+ &self,
+ ctx: &Context<'_>,
+ initiative_id: ID,
+ input: Option<InitiativeTasksInput>,
+ ) -> async_graphql::Result<GraphqlInitiativeTasksPage> {
+ resolve_initiative_tasks(
+ ctx,
+ self.user_id.clone(),
+ initiative_id,
+ input.unwrap_or_default(),
+ )
+ .await
+ }
+
+ /// Initiative chips for tasks, without inaccessible project metadata.
+ async fn task_initiative_references(
+ &self,
+ ctx: &Context<'_>,
+ task_ids: Vec<ID>,
+ ) -> async_graphql::Result<
+ Vec<GraphqlTaskInitiativeReference<SoupEdges<NR, PR, ER, FR, AR, AcR>>>,
+ > {
+ resolve_task_initiative_references(ctx, self.user_id.clone(), task_ids).await
+ }
+
+ /// Authorized property definitions available to this viewer.
+ async fn property_definitions(
+ &self,
+ ctx: &Context<'_>,
+ scope: GraphqlPropertyDefinitionScope,
+ for_entity_type: Option<graphql_common::GraphqlPropertyEntityType>,
+ ) -> async_graphql::Result<Vec<GraphqlPropertyDefinition<PR>>> {
+ load_property_definitions::<PR>(ctx, scope, for_entity_type).await
+ }
+
+ /// Select options available to the viewer for one property definition.
+ async fn property_options(
+ &self,
+ ctx: &Context<'_>,
+ property_definition_id: ID,
+ ) -> async_graphql::Result<Vec<GraphqlPropertyOption>> {
+ load_property_options::<PR>(ctx, property_definition_id).await
+ }
+
/// The authenticated user's favorites in manual order, optionally
/// restricted by entity type and entity id.
async fn favorites(
diff --git a/crates/complete_graph/src/schema/test.rs b/crates/complete_graph/src/schema/test.rs
index e6edc52bde..0ef88970ac 100644
--- a/crates/complete_graph/src/schema/test.rs
+++ b/crates/complete_graph/src/schema/test.rs
@@ -34,6 +34,7 @@ use models_soup::{
chat::SoupChat,
document::SoupDocument,
email_thread::{SoupContact, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreview},
+ initiative::SoupInitiative,
item::SoupItem,
project::SoupProject,
};
@@ -44,6 +45,7 @@ use uuid::Uuid;
use super::*;
mod email_archive;
+mod initiative;
mod soup_patches;
const VALID_USER_ID: &str = "macro|[email protected]";
@@ -85,6 +87,19 @@ fn soup_document(id: Uuid) -> SoupItem<()> {
grouped_document(id).map_extra(|_| ())
}
+fn soup_initiative(id: Uuid) -> SoupItem<()> {
+ SoupItem::Initiative(SoupInitiative {
+ id,
+ name: "Launch project".to_string(),
+ owner_id: Owner::from_principal_str(VALID_USER_ID).unwrap(),
+ description_document_id: Some(Uuid::from_u128(43)),
+ created_at: Default::default(),
+ updated_at: Default::default(),
+ viewed_at: None,
+ extra: (),
+ })
+}
+
fn soup_project(id: Uuid) -> SoupItem<()> {
SoupItem::Project(SoupProject {
id,
@@ -1174,6 +1189,10 @@ impl TestHarness {
self.soup_service.clone(),
Arc::new(self.email_service.clone()),
))
+ .data(graphql_properties::entity_properties_loader(
+ user_id.clone(),
+ NoOpEntityPropertyReader,
+ ))
.data(graphql_email::email_content_loader(
user_id.clone(),
self.email_content_reader.clone(),
@@ -2321,3 +2340,40 @@ async fn email_thread_rejects_an_invalid_thread_id_before_loading_soup() {
assert_eq!(harness.raw_soup_calls.load(Ordering::SeqCst), 0);
assert_eq!(harness.inbox_calls.load(Ordering::SeqCst), 0);
}
+
+#[tokio::test]
+async fn initiatives_are_returned_by_soup_with_shared_edges() {
+ let harness = harness();
+ let id = Uuid::from_u128(42);
+ harness
+ .soup_service
+ .set_raw_response(vec![soup_initiative(id)]);
+ let response = harness
+ .execute(
+ r#"{
+ user { soup(input: {initial: {filters: {initiativeFilter: {literal: {include: true}}}}}) {
+ items {
+ __typename id entityType displayName
+ metadata { ownerId ownerType createdAt updatedAt }
+ properties { id }
+ ... on GraphqlSoupInitiative { descriptionDocumentId }
+ }
+ } }
+ }"#,
+ )
+ .await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ let item = &data["user"]["soup"]["items"][0];
+ assert_eq!(item["__typename"], "GraphqlSoupInitiative");
+ assert_eq!(item["id"], id.to_string());
+ assert_eq!(item["entityType"], "INITIATIVE");
+ assert_eq!(item["displayName"], "Launch project");
+ assert_eq!(item["metadata"]["ownerId"], VALID_USER_ID);
+ assert_eq!(
+ item["descriptionDocumentId"],
+ Uuid::from_u128(43).to_string()
+ );
+ assert!(item["properties"].is_array());
+ assert_eq!(harness.raw_soup_calls.load(Ordering::SeqCst), 1);
+}
diff --git a/crates/complete_graph/src/schema/test/initiative.rs b/crates/complete_graph/src/schema/test/initiative.rs
new file mode 100644
index 0000000000..e67cc50691
--- /dev/null
+++ b/crates/complete_graph/src/schema/test/initiative.rs
@@ -0,0 +1,69 @@
+use super::*;
+
+async fn execute_initiative_query(harness: &TestHarness, query: &str) -> async_graphql::Response {
+ let viewer = MacroUserIdStr::parse_from_str(VALID_USER_ID).unwrap();
+ harness
+ .schema
+ .execute(
+ harness
+ .request(query, authenticated_parts())
+ .data(viewer)
+ .data(graphql_initiative::InitiativeEntityLoader(
+ graphql_soup::soup_item_loader(
+ harness.soup_service.clone(),
+ Arc::new(harness.email_service.clone()),
+ ),
+ )),
+ )
+ .await
+}
+
+#[tokio::test]
+async fn initiative_soup_and_detail_queries_share_identity_without_loading_domain_details() {
+ let harness = harness();
+ let id = Uuid::from_u128(42);
+ harness
+ .soup_service
+ .set_raw_response(vec![soup_initiative(id)]);
+ // No initiative domain context/loaders are installed. Selecting the shared
+ // Soup fields must still work for both collection and individual queries.
+ let response = execute_initiative_query(&harness, &format!(
+ r#"{{ user {{
+ soup(input: {{initial: {{filters: {{initiativeFilter: {{literal: {{include: true}}}}}}}}}}) {{
+ items {{ __typename id displayName metadata {{ ownerId createdAt updatedAt }} }}
+ }}
+ initiative(initiativeId: "{id}") {{
+ __typename id displayName metadata {{ ownerId createdAt updatedAt }}
+ }}
+ }} }}"#
+ )).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ assert_eq!(data["user"]["soup"]["items"][0], data["user"]["initiative"]);
+ assert_eq!(
+ data["user"]["initiative"]["__typename"],
+ "GraphqlSoupInitiative"
+ );
+ assert_eq!(data["user"]["initiative"]["id"], id.to_string());
+}
+
+#[tokio::test]
+async fn initiative_detail_query_does_not_expose_a_project_missing_from_authorized_soup() {
+ let harness = harness();
+ harness.soup_service.set_raw_response(Vec::new());
+ let response = execute_initiative_query(
+ &harness,
+ &format!(
+ r#"{{ user {{ initiative(initiativeId: "{}") {{ id displayName }} }} }}"#,
+ Uuid::from_u128(42)
+ ),
+ )
+ .await;
+ assert_eq!(response.errors.len(), 1);
+ assert_eq!(response.errors[0].message, "initiative not found");
+ assert_eq!(
+ response.errors[0].extensions.as_ref().unwrap().get("code"),
+ Some(&async_graphql::Value::from("NOT_FOUND"))
+ );
+ assert_eq!(harness.raw_soup_calls.load(Ordering::SeqCst), 1);
+}
diff --git a/crates/complete_graph/src/schema/test/soup_patches.rs b/crates/complete_graph/src/schema/test/soup_patches.rs
index f519bd5f85..6a7e965cd3 100644
--- a/crates/complete_graph/src/schema/test/soup_patches.rs
+++ b/crates/complete_graph/src/schema/test/soup_patches.rs
@@ -357,3 +357,28 @@ async fn mutation_effects_share_non_nullable_hydration_and_omit_misses() {
let data = response.data.into_json().unwrap();
assert!(data["result"]["effects"].as_array().unwrap().is_empty());
}
+
+#[tokio::test]
+async fn initiative_patches_hydrate_and_delete_the_soup_record() {
+ let soup = CountingSoupService::default();
+ let id = Uuid::from_u128(42);
+ let removed_id = Uuid::from_u128(44);
+ soup.set_raw_response(vec![soup_initiative(id)]);
+ let responses = subscription_responses(
+ soup,
+ vec![
+ Patch::Updated(ModelEntityType::Initiative.with_entity_string(id.to_string())),
+ Patch::Deleted(ModelEntityType::Initiative.with_entity_string(removed_id.to_string())),
+ ],
+ )
+ .await;
+ assert_eq!(responses.len(), 1);
+ assert!(responses[0].errors.is_empty(), "{:?}", responses[0].errors);
+ let data = responses[0].data.clone().into_json().unwrap();
+ let patches = data["soupUpdates"].as_array().unwrap();
+ assert_eq!(patches.len(), 2);
+ assert_eq!(patches[0]["item"]["__typename"], "GraphqlSoupInitiative");
+ assert_eq!(patches[0]["item"]["id"], id.to_string());
+ assert_eq!(patches[1]["graphqlTypeName"], "GraphqlSoupInitiative");
+ assert_eq!(patches[1]["entityId"], removed_id.to_string());
+}
diff --git a/crates/complete_graph/src/sdl_test.rs b/crates/complete_graph/src/sdl_test.rs
index f5801dcb57..13e585d49c 100644
--- a/crates/complete_graph/src/sdl_test.rs
+++ b/crates/complete_graph/src/sdl_test.rs
@@ -72,6 +72,9 @@ fn soup_response_schema_exposes_frontend_fields() {
"type GraphqlSoupChat implements GraphqlSoupEntity {",
"deletedAt: String",
"type GraphqlSoupProject implements GraphqlSoupEntity {",
+ "type GraphqlSoupInitiative implements GraphqlSoupEntity {",
+ "initiativeFilter: GraphqlInitiativeExpr",
+ "descriptionDocumentId: ID",
"parent: GraphqlEntity",
"type GraphqlCacheDeletion {",
"graphqlTypeName: String!",
@@ -279,6 +282,7 @@ fn soup_interface_exposes_the_complete_shared_entity_contract() {
"GraphqlSoupDocument",
"GraphqlSoupChat",
"GraphqlSoupProject",
+ "GraphqlSoupInitiative",
"GraphqlSoupEmailThread",
"GraphqlSoupChannel",
"GraphqlSoupChannelMessage",
@@ -394,6 +398,74 @@ fn property_values_are_a_typed_union_without_soup_names() {
assert!(!sdl.contains("GraphqlSoupDataType"));
}
+#[test]
+fn initiative_reads_and_mutations_share_the_canonical_soup_entity() {
+ let sdl = crate::build_schema().sdl();
+ let object = |name: &str| {
+ let declaration = format!("type {name}");
+ sdl.split_once(&declaration)
+ .expect("GraphQL object exists")
+ .1
+ .split_once('{')
+ .unwrap()
+ .1
+ .split_once("\n}")
+ .unwrap()
+ .0
+ };
+ assert_sdl_line(
+ object("GraphqlUser"),
+ "initiative(initiativeId: ID!): GraphqlSoupInitiative!",
+ );
+ assert!(!object("SoupQueryRoot").contains("initiative"));
+ for field in [
+ "id: ID!",
+ "properties: [GraphqlProperty!]!",
+ "memberIds: [String!]!",
+ "taskIds: [ID!]!",
+ "sharePermission: InitiativeSharePermission!",
+ "taskCount: Int!",
+ "completedTaskCount: Int!",
+ ] {
+ assert_sdl_line(object("GraphqlSoupInitiative"), field);
+ }
+ assert_sdl_line(
+ object("TaskInitiativeReference"),
+ "initiative: GraphqlSoupInitiative",
+ );
+ assert_sdl_line(
+ &sdl,
+ "createInitiative(input: CreateInitiativeInput!): GraphqlSoupInitiative!",
+ );
+ assert_sdl_line(
+ &sdl,
+ "updateInitiative(initiativeId: ID!, input: UpdateInitiativeInput!): GraphqlSoupInitiative!",
+ );
+ for obsolete in [
+ "type GraphqlInitiative {",
+ "type InitiativePage {",
+ "input InitiativePageInput {",
+ "enum InitiativeSort {",
+ "type InitiativePropertySnapshot {",
+ "initiatives(input:",
+ ] {
+ assert!(!sdl.contains(obsolete), "obsolete API remains: {obsolete}");
+ }
+ for duplicate in [
+ "name:",
+ "ownerId:",
+ "createdAt:",
+ "updatedAt:",
+ "userAccessLevel:",
+ "propertySnapshot:",
+ ] {
+ assert!(
+ !object("GraphqlSoupInitiative").contains(duplicate),
+ "duplicate initiative field remains: {duplicate}"
+ );
+ }
+}
+
/// The exported SDL is a frontend contract: `schema.graphql` feeds the client
/// codegen and the normalized-cache metadata. Splitting the schema across
/// crates must never change it silently — regenerate with
diff --git a/crates/frecency/src/outbound/postgres/dynamic_tests.rs b/crates/frecency/src/outbound/postgres/dynamic_tests.rs
index aa0ffe28bd..13687f3636 100644
--- a/crates/frecency/src/outbound/postgres/dynamic_tests.rs
+++ b/crates/frecency/src/outbound/postgres/dynamic_tests.rs
@@ -966,6 +966,7 @@ async fn test_dynamic_filter_document_date_created_at_gt(pool: PgPool) {
crm_company_filter: None,
foreign_entity_filter: None,
reminder_filter: None,
+ initiative_filter: None,
agent_session_filter: None,
properties_filter: None,
};
@@ -1063,6 +1064,7 @@ async fn test_dynamic_filter_document_date_created_at_lt(pool: PgPool) {
crm_company_filter: None,
foreign_entity_filter: None,
reminder_filter: None,
+ initiative_filter: None,
agent_session_filter: None,
properties_filter: None,
};
@@ -1156,6 +1158,7 @@ async fn test_dynamic_filter_document_date_updated_at_gt(pool: PgPool) {
crm_company_filter: None,
foreign_entity_filter: None,
reminder_filter: None,
+ initiative_filter: None,
agent_session_filter: None,
properties_filter: None,
};
@@ -1254,6 +1257,7 @@ async fn test_dynamic_filter_document_date_updated_at_lt(pool: PgPool) {
crm_company_filter: None,
foreign_entity_filter: None,
reminder_filter: None,
+ initiative_filter: None,
agent_session_filter: None,
properties_filter: None,
};
diff --git a/crates/graphql_common/src/entity_type.rs b/crates/graphql_common/src/entity_type.rs
index 74424da85c..69b2fd3fbf 100644
--- a/crates/graphql_common/src/entity_type.rs
+++ b/crates/graphql_common/src/entity_type.rs
@@ -4,6 +4,8 @@ use model_entity::{Entity, EntityType};
/// GraphQL representation of Soup entity types.
#[derive(Enum, Copy, Clone, Eq, PartialEq, Hash)]
pub enum GraphqlSoupEntityType {
+ /// Initiative entity, presented as a project in the frontend.
+ Initiative,
/// Document entity.
Document,
/// Chat entity.
@@ -97,13 +99,13 @@ impl GraphqlSoupEntityType {
EntityType::CalendarEvent => Self::CalendarEvent,
EntityType::Reminder => Self::Reminder,
EntityType::AgentSession => Self::AgentSession,
+ EntityType::Initiative => Self::Initiative,
EntityType::User
| EntityType::Team
| EntityType::StaticFile
| EntityType::CrmContact
| EntityType::Skill
- | EntityType::ScheduledAction
- | EntityType::Initiative => return None,
+ | EntityType::ScheduledAction => return None,
})
}
@@ -122,6 +124,7 @@ impl GraphqlSoupEntityType {
Self::CalendarEvent => EntityType::CalendarEvent,
Self::Reminder => EntityType::Reminder,
Self::AgentSession => EntityType::AgentSession,
+ Self::Initiative => EntityType::Initiative,
}
}
}
@@ -243,7 +246,9 @@ mod test {
}
#[test]
- fn initiative_is_not_a_soup_entity_type() {
- assert!(GraphqlSoupEntityType::try_new(EntityType::Initiative).is_none());
+ fn initiative_round_trips_through_soup_entity_type() {
+ let graphql = GraphqlSoupEntityType::try_new(EntityType::Initiative).unwrap();
+ assert!(matches!(graphql, GraphqlSoupEntityType::Initiative));
+ assert_eq!(graphql.into_model(), EntityType::Initiative);
}
}
diff --git a/crates/graphql_common/src/property_filter.rs b/crates/graphql_common/src/property_filter.rs
index c8ead291b5..e34aee19bd 100644
--- a/crates/graphql_common/src/property_filter.rs
+++ b/crates/graphql_common/src/property_filter.rs
@@ -13,6 +13,9 @@ use serde::{Deserialize, Serialize};
use crate::{IntoFilterExpr, filter_expr_input, parse_id};
+#[cfg(test)]
+mod test;
+
filter_expr_input!(
GraphqlPropertiesExpr,
GraphqlPropertiesBinaryExpr,
@@ -38,7 +41,14 @@ impl IntoFilterExpr<PropertiesLiteral> for GraphqlPropertiesLiteral {
property_definition_id: parse_id(self.property_definition_id, "propertyDefinitionId")?,
entity_type: self
.entity_type
- .and_then(|et| PropertyEntityType::try_from(et).ok()),
+ .map(|entity_type| {
+ PropertyEntityType::try_from(entity_type).map_err(|unsupported| {
+ async_graphql::Error::new(format!(
+ "Property filtering is not supported for {unsupported:?}"
+ ))
+ })
+ })
+ .transpose()?,
value: self.value.into_ast()?,
}))
}
@@ -85,6 +95,8 @@ pub enum GraphqlPropertyEntityType {
Company,
/// Document entity.
Document,
+ /// Initiative entity.
+ Initiative,
/// Project entity.
Project,
/// Task entity.
@@ -105,6 +117,7 @@ impl GraphqlPropertyEntityType {
models_properties::EntityType::Chat => Self::Chat,
models_properties::EntityType::Company => Self::Company,
models_properties::EntityType::Document => Self::Document,
+ models_properties::EntityType::Initiative => Self::Initiative,
models_properties::EntityType::Project => Self::Project,
models_properties::EntityType::Task => Self::Task,
models_properties::EntityType::Thread => Self::Thread,
@@ -121,6 +134,7 @@ impl GraphqlPropertyEntityType {
Self::Chat => models_properties::EntityType::Chat,
Self::Company => models_properties::EntityType::Company,
Self::Document => models_properties::EntityType::Document,
+ Self::Initiative => models_properties::EntityType::Initiative,
Self::Project => models_properties::EntityType::Project,
Self::Task => models_properties::EntityType::Task,
Self::Thread => models_properties::EntityType::Thread,
@@ -143,8 +157,7 @@ impl TryFrom<GraphqlPropertyEntityType> for PropertyEntityType {
GraphqlPropertyEntityType::Task => Self::Task,
GraphqlPropertyEntityType::Thread => Self::Thread,
GraphqlPropertyEntityType::User => Self::User,
- // Call records are not part of the generic property-filter AST.
- // They are filtered through a dedicated call query instead.
+ GraphqlPropertyEntityType::Initiative => Self::Initiative,
other @ GraphqlPropertyEntityType::CallRecord => return Err(other),
})
}
diff --git a/crates/graphql_common/src/property_filter/test.rs b/crates/graphql_common/src/property_filter/test.rs
new file mode 100644
index 0000000000..9f718725c8
--- /dev/null
+++ b/crates/graphql_common/src/property_filter/test.rs
@@ -0,0 +1,23 @@
+use super::*;
+
+#[test]
+fn initiative_property_filter_preserves_its_scope() {
+ let input = GraphqlPropertiesLiteral {
+ property_definition_id: ID::from("00000001-0000-0000-0000-000000000002"),
+ entity_type: Some(GraphqlPropertyEntityType::Initiative),
+ value: GraphqlPropertyMatchValue::SelectOption(ID::from(
+ "00000001-0000-0000-0002-000000000001",
+ )),
+ };
+ assert!(matches!(
+ input.into_expr().unwrap(),
+ Expr::Literal(PropertiesLiteral {
+ entity_type: Some(PropertyEntityType::Initiative),
+ ..
+ })
+ ));
+ assert_eq!(
+ GraphqlPropertyEntityType::new(models_properties::EntityType::Initiative).into_model(),
+ models_properties::EntityType::Initiative,
+ );
+}
diff --git a/crates/graphql_entity_mutation/src/mutations/test.rs b/crates/graphql_entity_mutation/src/mutations/test.rs
index 78e0c2324f..5c139905a2 100644
--- a/crates/graphql_entity_mutation/src/mutations/test.rs
+++ b/crates/graphql_entity_mutation/src/mutations/test.rs
@@ -39,12 +39,17 @@ impl SoupEntityEdges for TestSoupEdges {
type NotificationFilter = String;
type ActivityEvent = String;
type EmailThreadEdges = TestEmailThreadEdges;
+ type InitiativeEdges = TestEmailThreadEdges;
type AgentSessionEdges = TestAgentSessionEdges;
fn from_entity(_entity: Entity<'static>) -> Self {
Self { available: true }
}
+ fn initiative_edges(_initiative_id: uuid::Uuid) -> Self::InitiativeEdges {
+ TestEmailThreadEdges { available: true }
+ }
+
fn email_thread_edges(_email_thread_id: uuid::Uuid) -> Self::EmailThreadEdges {
TestEmailThreadEdges { available: true }
}
diff --git a/crates/graphql_favorite/src/mutations/test.rs b/crates/graphql_favorite/src/mutations/test.rs
index c15c71b4f5..ca40dceed9 100644
--- a/crates/graphql_favorite/src/mutations/test.rs
+++ b/crates/graphql_favorite/src/mutations/test.rs
@@ -43,12 +43,17 @@ impl SoupEntityEdges for TestSoupEdges {
type NotificationFilter = String;
type ActivityEvent = String;
type EmailThreadEdges = TestEmailEdges;
+ type InitiativeEdges = TestEmailEdges;
type AgentSessionEdges = TestAgentSessionEdges;
fn from_entity(_entity: Entity<'static>) -> Self {
Self { available: true }
}
+ fn initiative_edges(_initiative_id: Uuid) -> Self::InitiativeEdges {
+ TestEmailEdges { available: true }
+ }
+
fn email_thread_edges(_email_thread_id: Uuid) -> Self::EmailThreadEdges {
TestEmailEdges { available: true }
}
diff --git a/crates/graphql_initiative/Cargo.toml b/crates/graphql_initiative/Cargo.toml
new file mode 100644
index 0000000000..be193d463d
--- /dev/null
+++ b/crates/graphql_initiative/Cargo.toml
@@ -0,0 +1,32 @@
+[package]
+name = "graphql_initiative"
+version = "0.1.0"
+edition = "2024"
+publish = false
+
+[dependencies]
+async-graphql = { workspace = true, features = ["dataloader"] }
+entity_access = { path = "../entity_access", default-features = false, features = ["ports"] }
+futures = { workspace = true }
+graphql_common = { path = "../graphql_common" }
+graphql_permission = { path = "../graphql_permission" }
+graphql_soup = { path = "../graphql_soup" }
+initiative = { path = "../initiative", default-features = false, features = ["ports"] }
+macro_user_id = { path = "../macro_user_id" }
+models_permissions = { path = "../models_permissions" }
+model-entity = { path = "../model-entity" }
+tokio = { workspace = true, features = ["sync"] }
+tracing = { workspace = true }
+uuid = { workspace = true }
+workspace-hack = { version = "0.1", path = "../workspace-hack" }
+
+[dev-dependencies]
+soup = { path = "../soup", default-features = false, features = ["ports"] }
+models_soup = { path = "../models_soup" }
+models_pagination = { path = "../models_pagination" }
+models_properties = { path = "../models_properties" }
+model_owner = { path = "../model_owner" }
+serde = { workspace = true }
+chrono = { workspace = true }
+rootcause = { workspace = true }
+tokio = { workspace = true, features = ["macros", "rt"] }
diff --git a/crates/graphql_initiative/src/context.rs b/crates/graphql_initiative/src/context.rs
new file mode 100644
index 0000000000..e51800a524
--- /dev/null
+++ b/crates/graphql_initiative/src/context.rs
@@ -0,0 +1,258 @@
+//! Request capabilities supplied by the application composition root.
+
+use std::{future::Future, pin::Pin, sync::Arc};
+
+use entity_access::domain::{
+ models::{
+ AccessError, EditAccessLevel, EntityAccessReceipt, EntityType, OwnerAccessLevel,
+ RequiredPermission, ViewAccessLevel,
+ },
+ ports::EntityAccessService,
+};
+use futures::{StreamExt, TryStreamExt, stream};
+use initiative::domain::{
+ models::{
+ AssignTasksResponse, CreateInitiativeRequest, InitiativeDetail, InitiativeError,
+ TaskAssignment, TaskAssignmentBatch, UpdateInitiativeRequest,
+ },
+ ports::InitiativeService,
+ reads::{
+ InitiativePageRow, InitiativeTasksPage, InitiativeTasksRequest, TaskInitiativeReferences,
+ TaskInitiativeReferencesRequest,
+ },
+};
+use macro_user_id::user_id::MacroUserIdStr;
+use uuid::Uuid;
+
+const MAX_CONCURRENT_TASK_AUTHORIZATIONS: usize = 16;
+
+/// Object-safe forwarding future for the request's concrete domain services.
+pub(crate) type ApiFuture<'a, T> =
+ Pin<Box<dyn Future<Output = Result<T, InitiativeError>> + Send + 'a>>;
+
+/// Transport-facing service bundle; implementations mint receipts and delegate policy.
+pub(crate) trait InitiativeApi: Send + Sync {
+ fn summary(&self, user: MacroUserIdStr<'static>, id: Uuid) -> ApiFuture<'_, InitiativePageRow>;
+ fn get(&self, user: MacroUserIdStr<'static>, id: Uuid) -> ApiFuture<'_, InitiativeDetail>;
+ fn tasks(
+ &self,
+ user: MacroUserIdStr<'static>,
+ id: Uuid,
+ input: InitiativeTasksRequest,
+ ) -> ApiFuture<'_, InitiativeTasksPage>;
+ fn references(
+ &self,
+ user: MacroUserIdStr<'static>,
+ ids: Vec<String>,
+ ) -> ApiFuture<'_, TaskInitiativeReferences>;
+ fn create(
+ &self,
+ user: MacroUserIdStr<'static>,
+ input: CreateInitiativeRequest,
+ ) -> ApiFuture<'_, InitiativeDetail>;
+ fn update(
+ &self,
+ user: MacroUserIdStr<'static>,
+ id: Uuid,
+ input: UpdateInitiativeRequest,
+ ) -> ApiFuture<'_, InitiativeDetail>;
+ fn delete(&self, user: MacroUserIdStr<'static>, id: Uuid) -> ApiFuture<'_, ()>;
+ fn assign(
+ &self,
+ user: MacroUserIdStr<'static>,
+ id: Uuid,
+ task_ids: Vec<String>,
+ ) -> ApiFuture<'_, AssignTasksResponse>;
+ fn unassign(
+ &self,
+ user: MacroUserIdStr<'static>,
+ id: Uuid,
+ task_id: String,
+ ) -> ApiFuture<'_, ()>;
+ fn clear(&self, user: MacroUserIdStr<'static>, task_id: String) -> ApiFuture<'_, ()>;
+}
+
+/// Request-scoped initiative capability, shared by viewer reads and mutations.
+///
+/// Type erasure keeps domain implementation parameters out of the schema's public type.
+#[derive(Clone)]
+pub struct InitiativeGraphqlContext(pub(crate) Arc<dyn InitiativeApi>);
+
+/// Typed capability-minting boundary shared by all initiative GraphQL operations.
+pub trait InitiativeAuthorizer: Send + Sync + 'static {
+ /// Verify the authenticated viewer's required capability for an entity.
+ fn authorize<T: RequiredPermission>(
+ &self,
+ user: &MacroUserIdStr<'static>,
+ id: &str,
+ entity_type: EntityType,
+ ) -> impl Future<Output = Result<EntityAccessReceipt<T>, AccessError>> + Send;
+}
+
+impl<A: EntityAccessService> InitiativeAuthorizer for A {
+ async fn authorize<T: RequiredPermission>(
+ &self,
+ user: &MacroUserIdStr<'static>,
+ id: &str,
+ entity_type: EntityType,
+ ) -> Result<EntityAccessReceipt<T>, AccessError> {
+ self.generate_entity_access_receipt::<T>(user, None, id, entity_type)
+ .await
+ }
+}
+
+impl InitiativeGraphqlContext {
+ /// Compose the initiative use cases and receipt-minting boundary.
+ pub fn new<S: InitiativeService, A: InitiativeAuthorizer>(
+ service: Arc<S>,
+ access: Arc<A>,
+ ) -> Self {
+ Self(Arc::new(InitiativeApiAdapter { service, access }))
+ }
+}
+
+/// Thin inbound bridge from GraphQL identity to domain capabilities.
+struct InitiativeApiAdapter<S, A> {
+ service: Arc<S>,
+ access: Arc<A>,
+}
+
+impl<S: InitiativeService, A: InitiativeAuthorizer> InitiativeApi for InitiativeApiAdapter<S, A> {
+ fn summary(&self, user: MacroUserIdStr<'static>, id: Uuid) -> ApiFuture<'_, InitiativePageRow> {
+ Box::pin(async move {
+ let receipt = self
+ .access
+ .authorize::<ViewAccessLevel>(&user, &id.to_string(), EntityType::Initiative)
+ .await?;
+ self.service.summary(receipt).await
+ })
+ }
+
+ fn get(&self, user: MacroUserIdStr<'static>, id: Uuid) -> ApiFuture<'_, InitiativeDetail> {
+ Box::pin(async move {
+ let receipt = self
+ .access
+ .authorize::<ViewAccessLevel>(&user, &id.to_string(), EntityType::Initiative)
+ .await?;
+ self.service.get(receipt).await
+ })
+ }
+
+ fn tasks(
+ &self,
+ user: MacroUserIdStr<'static>,
+ id: Uuid,
+ input: InitiativeTasksRequest,
+ ) -> ApiFuture<'_, InitiativeTasksPage> {
+ Box::pin(async move {
+ let receipt = self
+ .access
+ .authorize::<ViewAccessLevel>(&user, &id.to_string(), EntityType::Initiative)
+ .await?;
+ self.service.tasks_page(receipt, input).await
+ })
+ }
+
+ fn references(
+ &self,
+ user: MacroUserIdStr<'static>,
+ ids: Vec<String>,
+ ) -> ApiFuture<'_, TaskInitiativeReferences> {
+ Box::pin(async move {
+ self.service
+ .task_references(&user, TaskInitiativeReferencesRequest { task_ids: ids })
+ .await
+ })
+ }
+
+ fn create(
+ &self,
+ user: MacroUserIdStr<'static>,
+ input: CreateInitiativeRequest,
+ ) -> ApiFuture<'_, InitiativeDetail> {
+ Box::pin(async move { self.service.create(&user, input).await })
+ }
+
+ fn update(
+ &self,
+ user: MacroUserIdStr<'static>,
+ id: Uuid,
+ input: UpdateInitiativeRequest,
+ ) -> ApiFuture<'_, InitiativeDetail> {
+ Box::pin(async move {
+ let receipt = self
+ .access
+ .authorize::<EditAccessLevel>(&user, &id.to_string(), EntityType::Initiative)
+ .await?;
+ self.service.update(receipt, input).await
+ })
+ }
+
+ fn delete(&self, user: MacroUserIdStr<'static>, id: Uuid) -> ApiFuture<'_, ()> {
+ Box::pin(async move {
+ let receipt = self
+ .access
+ .authorize::<OwnerAccessLevel>(&user, &id.to_string(), EntityType::Initiative)
+ .await?;
+ self.service.delete(receipt).await
+ })
+ }
+
+ fn assign(
+ &self,
+ user: MacroUserIdStr<'static>,
+ id: Uuid,
+ task_ids: Vec<String>,
+ ) -> ApiFuture<'_, AssignTasksResponse> {
+ Box::pin(async move {
+ let batch = TaskAssignmentBatch::try_new(task_ids)?;
+ let receipt = self
+ .access
+ .authorize::<EditAccessLevel>(&user, &id.to_string(), EntityType::Initiative)
+ .await?;
+ let tasks = stream::iter(batch.into_task_ids().into_iter().map(|task_id| {
+ let user = &user;
+ async move {
+ let access = self
+ .access
+ .authorize::<EditAccessLevel>(user, &task_id, EntityType::Document)
+ .await;
+ TaskAssignment::from_access(task_id, access)
+ }
+ }))
+ .buffered(MAX_CONCURRENT_TASK_AUTHORIZATIONS)
+ .try_collect()
+ .await?;
+ self.service.assign_tasks(receipt, tasks).await
+ })
+ }
+
+ fn unassign(
+ &self,
+ user: MacroUserIdStr<'static>,
+ id: Uuid,
+ task_id: String,
+ ) -> ApiFuture<'_, ()> {
+ Box::pin(async move {
+ let receipt = self
+ .access
+ .authorize::<EditAccessLevel>(&user, &id.to_string(), EntityType::Initiative)
+ .await?;
+ let task_receipt = self
+ .access
+ .authorize::<EditAccessLevel>(&user, &task_id, EntityType::Document)
+ .await?;
+ self.service.unassign_task(receipt, task_receipt).await
+ })
+ }
+
+ fn clear(&self, user: MacroUserIdStr<'static>, task_id: String) -> ApiFuture<'_, ()> {
+ Box::pin(async move {
+ let task_receipt = self
+ .access
+ .authorize::<EditAccessLevel>(&user, &task_id, EntityType::Document)
+ .await?;
+ self.service.clear_task(task_receipt).await
+ })
+ }
+}
diff --git a/crates/graphql_initiative/src/inputs.rs b/crates/graphql_initiative/src/inputs.rs
new file mode 100644
index 0000000000..914ba29832
--- /dev/null
+++ b/crates/graphql_initiative/src/inputs.rs
@@ -0,0 +1,182 @@
+//! Typed input objects and lossless transport-to-domain conversion.
+
+use async_graphql::{Enum, ID, InputObject, MaybeUndefined};
+use graphql_permission::GraphqlEntityAccessLevel;
+use initiative::domain::{
+ models::{CreateInitiativeRequest, UpdateInitiativeRequest},
+ reads::InitiativeTasksRequest,
+};
+use models_permissions::share_permission::{
+ LinkShare, UpdateSharePermissionRequestV2,
+ channel_share_permission::{UpdateChannelSharePermission, UpdateOperation},
+};
+
+/// Cursor pagination for visible initiative tasks.
+#[derive(Default, InputObject)]
+pub struct InitiativeTasksInput {
+ /// Page size, one through one hundred.
+ pub limit: Option<u16>,
+ /// Opaque continuation from the previous page.
+ pub cursor: Option<String>,
+}
+
+impl From<InitiativeTasksInput> for InitiativeTasksRequest {
+ fn from(value: InitiativeTasksInput) -> Self {
+ Self {
+ limit: value.limit,
+ cursor: value.cursor,
+ }
+ }
+}
+
+/// Create an initiative owned by the authenticated viewer.
+#[derive(InputObject)]
+pub struct CreateInitiativeInput {
+ /// Initial name.
+ pub name: String,
+ /// Initial description Markdown.
+ pub description: Option<String>,
+ /// Initial collaborators.
+ pub member_ids: Option<Vec<String>>,
+ /// Whether to share with the owner's team, defaulting to true.
+ pub share_with_team: Option<bool>,
+}
+
+impl From<CreateInitiativeInput> for CreateInitiativeRequest {
+ fn from(value: CreateInitiativeInput) -> Self {
+ Self {
+ name: value.name,
+ description: value.description,
+ member_ids: value.member_ids,
+ share_with_team: value.share_with_team,
+ }
+ }
+}
+
+/// Link recipients supported by the sharing domain.
+#[derive(Clone, Copy, Enum, Eq, PartialEq)]
+#[graphql(name = "InitiativeLinkShare")]
+pub enum GraphqlInitiativeLinkShare {
+ /// Everyone with the link.
+ Public,
+ /// Members of the owner's team with the link.
+ Team,
+}
+
+impl From<LinkShare> for GraphqlInitiativeLinkShare {
+ fn from(value: LinkShare) -> Self {
+ match value {
+ LinkShare::Public => Self::Public,
+ LinkShare::Team => Self::Team,
+ }
+ }
+}
+
+impl From<GraphqlInitiativeLinkShare> for LinkShare {
+ fn from(value: GraphqlInitiativeLinkShare) -> Self {
+ match value {
+ GraphqlInitiativeLinkShare::Public => Self::Public,
+ GraphqlInitiativeLinkShare::Team => Self::Team,
+ }
+ }
+}
+
+/// Mutation of one channel grant.
+#[derive(Clone, Copy, Enum, Eq, PartialEq)]
+#[graphql(name = "InitiativeChannelShareOperation")]
+pub enum GraphqlInitiativeChannelShareOperation {
+ /// Add a grant.
+ Add,
+ /// Remove a grant.
+ Remove,
+ /// Replace a grant.
+ Replace,
+}
+
+/// A channel sharing patch.
+#[derive(InputObject)]
+pub struct InitiativeChannelShareInput {
+ /// Kind of channel grant change.
+ pub operation: GraphqlInitiativeChannelShareOperation,
+ /// Channel identifier.
+ pub channel_id: ID,
+ /// Grant level for add or replace.
+ pub access_level: Option<GraphqlEntityAccessLevel>,
+}
+
+/// Sharing patch; omitted and null fields have distinct meanings.
+#[derive(InputObject)]
+pub struct InitiativeSharePermissionInput {
+ /// Omit to preserve, null to disable link sharing.
+ pub link_share: MaybeUndefined<GraphqlInitiativeLinkShare>,
+ /// Omit to preserve, null to reset to the domain default.
+ pub link_share_access_level: MaybeUndefined<GraphqlEntityAccessLevel>,
+ /// Omit to preserve, null to disable team sharing.
+ pub team_share_access_level: MaybeUndefined<GraphqlEntityAccessLevel>,
+ /// Changes to channel grants.
+ pub channel_share_permissions: Option<Vec<InitiativeChannelShareInput>>,
+}
+
+impl From<InitiativeSharePermissionInput> for UpdateSharePermissionRequestV2 {
+ fn from(value: InitiativeSharePermissionInput) -> Self {
+ Self {
+ link_share: patch(value.link_share, LinkShare::from),
+ link_share_access_level: patch(
+ value.link_share_access_level,
+ GraphqlEntityAccessLevel::into_model,
+ ),
+ team_share_access_level: patch(
+ value.team_share_access_level,
+ GraphqlEntityAccessLevel::into_model,
+ ),
+ channel_share_permissions: value.channel_share_permissions.map(|items| {
+ items
+ .into_iter()
+ .map(|item| UpdateChannelSharePermission {
+ operation: match item.operation {
+ GraphqlInitiativeChannelShareOperation::Add => UpdateOperation::Add,
+ GraphqlInitiativeChannelShareOperation::Remove => {
+ UpdateOperation::Remove
+ }
+ GraphqlInitiativeChannelShareOperation::Replace => {
+ UpdateOperation::Replace
+ }
+ },
+ channel_id: item.channel_id.to_string(),
+ access_level: item.access_level.map(GraphqlEntityAccessLevel::into_model),
+ })
+ .collect()
+ }),
+ }
+ }
+}
+
+/// Keep absent, cleared, and replaced share fields distinct through the domain boundary.
+fn patch<T, U>(value: MaybeUndefined<T>, convert: impl FnOnce(T) -> U) -> Option<Option<U>> {
+ match value {
+ MaybeUndefined::Undefined => None,
+ MaybeUndefined::Null => Some(None),
+ MaybeUndefined::Value(value) => Some(Some(convert(value))),
+ }
+}
+
+/// Partial initiative update; collaborator lists replace the previous list.
+#[derive(InputObject)]
+pub struct UpdateInitiativeInput {
+ /// Replacement name.
+ pub name: Option<String>,
+ /// Full replacement collaborator list, authorized by the domain service.
+ pub member_ids: Option<Vec<String>>,
+ /// Sharing patch, authorized by the domain service.
+ pub share_permission: Option<InitiativeSharePermissionInput>,
+}
+
+impl From<UpdateInitiativeInput> for UpdateInitiativeRequest {
+ fn from(value: UpdateInitiativeInput) -> Self {
+ Self {
+ name: value.name,
+ member_ids: value.member_ids,
+ share_permission: value.share_permission.map(Into::into),
+ }
+ }
+}
diff --git a/crates/graphql_initiative/src/lib.rs b/crates/graphql_initiative/src/lib.rs
new file mode 100644
index 0000000000..9d050cd557
--- /dev/null
+++ b/crates/graphql_initiative/src/lib.rs
@@ -0,0 +1,48 @@
+//! Typed GraphQL inbound adapter for initiatives and their task membership.
+#![deny(missing_docs)]
+
+mod context;
+mod inputs;
+mod loaders;
+mod mutation;
+mod objects;
+mod query;
+
+#[cfg(test)]
+mod test;
+
+pub use context::{InitiativeAuthorizer, InitiativeGraphqlContext};
+pub use inputs::InitiativeTasksInput;
+pub use loaders::{
+ InitiativeDetailLoader, InitiativeSummaryLoader, initiative_detail_loader,
+ initiative_summary_loader, load_initiative_detail, load_initiative_summary,
+};
+pub use mutation::{InitiativeEntityLoader, InitiativeMutationRoot};
+pub use objects::{
+ GraphqlInitiativeSharePermission, GraphqlInitiativeTasksPage, GraphqlTaskInitiativeReference,
+};
+pub use query::{resolve_initiative, resolve_initiative_tasks, resolve_task_initiative_references};
+
+use async_graphql::ErrorExtensions;
+use initiative::domain::models::InitiativeError;
+
+/// Preserve actionable domain failures while hiding infrastructure details.
+fn graphql_error(error: InitiativeError) -> async_graphql::Error {
+ let (message, code) = match error {
+ InitiativeError::NotFound => ("initiative not found".to_string(), "NOT_FOUND"),
+ InitiativeError::Unauthorized => ("unauthorized".to_string(), "FORBIDDEN"),
+ InitiativeError::BadRequest(message) => (message, "BAD_USER_INPUT"),
+ InitiativeError::Conflict(message) => (message, "CONFLICT"),
+ InitiativeError::NameTooLong { max } => (
+ format!("name must contain at most {max} characters"),
+ "BAD_USER_INPUT",
+ ),
+ InitiativeError::Internal(error) => {
+ tracing::error!(error=?error, "initiative GraphQL request failed");
+ ("internal server error".to_string(), "INTERNAL_SERVER_ERROR")
+ }
+ };
+ async_graphql::Error::new(message).extend_with(|_, extensions| {
+ extensions.set("code", code);
+ })
+}
diff --git a/crates/graphql_initiative/src/loaders.rs b/crates/graphql_initiative/src/loaders.rs
new file mode 100644
index 0000000000..35a9f4ce61
--- /dev/null
+++ b/crates/graphql_initiative/src/loaders.rs
@@ -0,0 +1,123 @@
+//! Lazy, viewer-scoped initiative details composed onto Soup entities.
+
+use std::{collections::HashMap, convert::Infallible, sync::Arc};
+
+use async_graphql::{
+ Context,
+ dataloader::{DataLoader, Loader},
+};
+use futures::{StreamExt, stream};
+use initiative::domain::{models::InitiativeDetail, reads::InitiativePageRow};
+use macro_user_id::user_id::MacroUserIdStr;
+use uuid::Uuid;
+
+use crate::{InitiativeGraphqlContext, graphql_error};
+
+/// Bound concurrent domain reads until the domain exposes bulk detail/summary reads.
+const MAX_CONCURRENT_READS: usize = 16;
+
+/// Viewer-scoped detail reader; authorization remains in the capability bridge.
+pub struct InitiativeDetailLoader {
+ context: InitiativeGraphqlContext,
+ user: MacroUserIdStr<'static>,
+}
+
+impl Loader<Uuid> for InitiativeDetailLoader {
+ type Value = async_graphql::Result<Arc<InitiativeDetail>>;
+ type Error = Infallible;
+
+ async fn load(&self, keys: &[Uuid]) -> Result<HashMap<Uuid, Self::Value>, Self::Error> {
+ Ok(stream::iter(keys.iter().copied().map(|id| async move {
+ let result = self
+ .context
+ .0
+ .get(self.user.clone(), id)
+ .await
+ .map(Arc::new)
+ .map_err(graphql_error);
+ (id, result)
+ }))
+ .buffer_unordered(MAX_CONCURRENT_READS)
+ .collect()
+ .await)
+ }
+}
+
+/// Viewer-scoped task progress reader, selected independently of project details.
+pub struct InitiativeSummaryLoader {
+ context: InitiativeGraphqlContext,
+ user: MacroUserIdStr<'static>,
+}
+
+impl Loader<Uuid> for InitiativeSummaryLoader {
+ type Value = async_graphql::Result<Arc<InitiativePageRow>>;
+ type Error = Infallible;
+
+ async fn load(&self, keys: &[Uuid]) -> Result<HashMap<Uuid, Self::Value>, Self::Error> {
+ Ok(stream::iter(keys.iter().copied().map(|id| async move {
+ let result = self
+ .context
+ .0
+ .summary(self.user.clone(), id)
+ .await
+ .map(Arc::new)
+ .map_err(graphql_error);
+ (id, result)
+ }))
+ .buffer_unordered(MAX_CONCURRENT_READS)
+ .collect()
+ .await)
+ }
+}
+
+/// Coalesce concurrent detail fields without retaining data across mutations or subscription events.
+pub fn initiative_detail_loader(
+ context: InitiativeGraphqlContext,
+ user: MacroUserIdStr<'static>,
+) -> DataLoader<InitiativeDetailLoader> {
+ DataLoader::new(InitiativeDetailLoader { context, user }, tokio::spawn)
+}
+
+/// Coalesce progress fields without retaining data across mutations or subscription events.
+pub fn initiative_summary_loader(
+ context: InitiativeGraphqlContext,
+ user: MacroUserIdStr<'static>,
+) -> DataLoader<InitiativeSummaryLoader> {
+ DataLoader::new(InitiativeSummaryLoader { context, user }, tokio::spawn)
+}
+
+/// Load authorized initiative details only when a detail field is requested.
+pub async fn load_initiative_detail(
+ ctx: &Context<'_>,
+ id: Uuid,
+) -> async_graphql::Result<Arc<InitiativeDetail>> {
+ match ctx
+ .data::<DataLoader<InitiativeDetailLoader>>()?
+ .load_one(id)
+ .await
+ {
+ Ok(Some(result)) => result,
+ Ok(None) => Err(async_graphql::Error::new(
+ "initiative detail is unavailable",
+ )),
+ Err(impossible) => match impossible {},
+ }
+}
+
+/// Load permission-filtered task progress only when a count field is requested.
+pub async fn load_initiative_summary(
+ ctx: &Context<'_>,
+ id: Uuid,
+) -> async_graphql::Result<Arc<InitiativePageRow>> {
+ match ctx
+ .data::<DataLoader<InitiativeSummaryLoader>>()?
+ .load_one(id)
+ .await
+ {
+ Ok(Some(result)) => result,
+ Ok(None) => Err(async_graphql::Error::new(
+ "initiative progress is unavailable",
+ )),
+ Err(impossible) => match impossible {},
+ }
+}
diff --git a/crates/graphql_initiative/src/mutation.rs b/crates/graphql_initiative/src/mutation.rs
new file mode 100644
index 0000000000..c0833357aa
--- /dev/null
+++ b/crates/graphql_initiative/src/mutation.rs
@@ -0,0 +1,148 @@
+//! Initiative mutation fields delegating to the owning domain service.
+
+use std::marker::PhantomData;
+
+use async_graphql::{Context, ID, Object};
+use graphql_common::{parse_id, require_authenticated_user};
+use graphql_soup::{GraphqlSoupInitiative, SoupEntityEdges, SoupItemDataLoader};
+
+use crate::{
+ InitiativeGraphqlContext, graphql_error,
+ inputs::{CreateInitiativeInput, UpdateInitiativeInput},
+ objects::GraphqlInitiativeTaskAssignment,
+ query::load_from_soup,
+};
+
+/// Primary-backed canonical Soup reader for initiative detail, references, and mutation replies.
+/// List queries and subscriptions retain their replica-backed Soup reader.
+#[derive(Clone)]
+pub struct InitiativeEntityLoader(pub SoupItemDataLoader);
+
+/// Root initiative mutations composed into the complete schema.
+pub struct InitiativeMutationRoot<E: SoupEntityEdges>(PhantomData<E>);
+
+impl<E: SoupEntityEdges> Default for InitiativeMutationRoot<E> {
+ fn default() -> Self {
+ Self(PhantomData)
+ }
+}
+
+/// Authenticated initiative lifecycle, sharing, and task relationship mutations.
+#[Object]
+impl<E: SoupEntityEdges> InitiativeMutationRoot<E> {
+ /// Create an initiative owned by the authenticated user.
+ async fn create_initiative(
+ &self,
+ ctx: &Context<'_>,
+ input: CreateInitiativeInput,
+ ) -> async_graphql::Result<GraphqlSoupInitiative<E>> {
+ let user = require_authenticated_user(ctx)?;
+ let detail = ctx
+ .data::<InitiativeGraphqlContext>()?
+ .0
+ .create(user.clone(), input.into())
+ .await
+ .map_err(graphql_error)?;
+ load_from_soup(
+ &ctx.data::<InitiativeEntityLoader>()?.0,
+ user,
+ detail.id.as_uuid(),
+ )
+ .await?
+ .ok_or_else(|| graphql_error(initiative::domain::models::InitiativeError::NotFound))
+ }
+
+ /// Update project fields; owner-only sharing and membership policy remains in the domain.
+ async fn update_initiative(
+ &self,
+ ctx: &Context<'_>,
+ initiative_id: ID,
+ input: UpdateInitiativeInput,
+ ) -> async_graphql::Result<GraphqlSoupInitiative<E>> {
+ let user = require_authenticated_user(ctx)?;
+ let id = parse_id(initiative_id, "initiativeId")?;
+ let detail = ctx
+ .data::<InitiativeGraphqlContext>()?
+ .0
+ .update(user.clone(), id, input.into())
+ .await
+ .map_err(graphql_error)?;
+ load_from_soup(
+ &ctx.data::<InitiativeEntityLoader>()?.0,
+ user,
+ detail.id.as_uuid(),
+ )
+ .await?
+ .ok_or_else(|| graphql_error(initiative::domain::models::InitiativeError::NotFound))
+ }
+
+ /// Delete an initiative after its owner capability has been verified.
+ async fn delete_initiative(
+ &self,
+ ctx: &Context<'_>,
+ initiative_id: ID,
+ ) -> async_graphql::Result<bool> {
+ let user = require_authenticated_user(ctx)?;
+ let id = parse_id(initiative_id, "initiativeId")?;
+ ctx.data::<InitiativeGraphqlContext>()?
+ .0
+ .delete(user, id)
+ .await
+ .map_err(graphql_error)?;
+ Ok(true)
+ }
+
+ /// Assign or move tasks, preserving partial task authorization results.
+ async fn assign_initiative_tasks(
+ &self,
+ ctx: &Context<'_>,
+ initiative_id: ID,
+ task_ids: Vec<ID>,
+ ) -> async_graphql::Result<Vec<GraphqlInitiativeTaskAssignment>> {
+ let user = require_authenticated_user(ctx)?;
+ let id = parse_id(initiative_id, "initiativeId")?;
+ let result = ctx
+ .data::<InitiativeGraphqlContext>()?
+ .0
+ .assign(
+ user,
+ id,
+ task_ids.into_iter().map(|id| id.to_string()).collect(),
+ )
+ .await
+ .map_err(graphql_error)?;
+ Ok(result.results.into_iter().map(Into::into).collect())
+ }
+
+ /// Remove a task using project and task edit capabilities.
+ async fn unassign_initiative_task(
+ &self,
+ ctx: &Context<'_>,
+ initiative_id: ID,
+ task_id: ID,
+ ) -> async_graphql::Result<bool> {
+ let user = require_authenticated_user(ctx)?;
+ let id = parse_id(initiative_id, "initiativeId")?;
+ ctx.data::<InitiativeGraphqlContext>()?
+ .0
+ .unassign(user, id, task_id.to_string())
+ .await
+ .map_err(graphql_error)?;
+ Ok(true)
+ }
+
+ /// Clear a task's project using task edit access, even after project access is revoked.
+ async fn clear_task_initiative(
+ &self,
+ ctx: &Context<'_>,
+ task_id: ID,
+ ) -> async_graphql::Result<bool> {
+ let user = require_authenticated_user(ctx)?;
+ ctx.data::<InitiativeGraphqlContext>()?
+ .0
+ .clear(user, task_id.to_string())
+ .await
+ .map_err(graphql_error)?;
+ Ok(true)
+ }
+}
diff --git a/crates/graphql_initiative/src/objects.rs b/crates/graphql_initiative/src/objects.rs
new file mode 100644
index 0000000000..1b404c68a5
--- /dev/null
+++ b/crates/graphql_initiative/src/objects.rs
@@ -0,0 +1,224 @@
+//! Initiative sharing values and task relationships.
+
+use async_graphql::{Context, Enum, ID, Object, SimpleObject};
+use graphql_permission::GraphqlEntityAccessLevel;
+use graphql_soup::{GraphqlSoupInitiative, SoupEntityEdges};
+use initiative::domain::{
+ models::{AssignTaskStatus, AssignTasksResult, InitiativeId},
+ reads::{InitiativeTasksPage, TaskInitiativeReference},
+};
+use models_permissions::share_permission::SharePermissionV2;
+use tokio::sync::OnceCell;
+
+use crate::{inputs::GraphqlInitiativeLinkShare, query::load_initiative};
+
+/// Typed sharing state for an initiative.
+#[derive(SimpleObject)]
+#[graphql(name = "InitiativeSharePermission")]
+pub struct GraphqlInitiativeSharePermission {
+ /// Stable identifier of the sharing policy.
+ id: ID,
+ /// Audience permitted through the link, when enabled.
+ link_share: Option<GraphqlInitiativeLinkShare>,
+ /// Permission granted to the link audience.
+ link_share_access_level: Option<GraphqlEntityAccessLevel>,
+ /// Explicit permission granted to the owner's team.
+ team_share_access_level: Option<GraphqlEntityAccessLevel>,
+ /// Owner of the shared initiative.
+ owner: String,
+ /// Explicit channel sharing grants.
+ channel_share_permissions: Vec<GraphqlInitiativeChannelShare>,
+}
+
+/// Grant to a shared channel.
+#[derive(SimpleObject)]
+#[graphql(name = "InitiativeChannelShare")]
+pub struct GraphqlInitiativeChannelShare {
+ /// Channel receiving access.
+ channel_id: ID,
+ /// Access granted to the channel.
+ access_level: GraphqlEntityAccessLevel,
+}
+
+impl From<SharePermissionV2> for GraphqlInitiativeSharePermission {
+ fn from(value: SharePermissionV2) -> Self {
+ Self {
+ id: ID(value.id),
+ owner: value.owner,
+ link_share: value.link_share.map(Into::into),
+ link_share_access_level: value
+ .link_share_access_level
+ .map(GraphqlEntityAccessLevel::new),
+ team_share_access_level: value
+ .team_share_access_level
+ .map(GraphqlEntityAccessLevel::new),
+ channel_share_permissions: value
+ .channel_share_permissions
+ .unwrap_or_default()
+ .into_iter()
+ .map(|grant| GraphqlInitiativeChannelShare {
+ channel_id: ID(grant.channel_id),
+ access_level: GraphqlEntityAccessLevel::new(grant.access_level),
+ })
+ .collect(),
+ }
+ }
+}
+
+/// A page of visible task references.
+#[derive(SimpleObject)]
+#[graphql(name = "InitiativeTasksPage")]
+pub struct GraphqlInitiativeTasksPage {
+ /// Visible task identifiers in the current page.
+ task_ids: Vec<ID>,
+ /// Continuation when another visible page exists.
+ next_cursor: Option<String>,
+ /// Total tasks visible to this viewer.
+ total: u32,
+}
+
+impl From<InitiativeTasksPage> for GraphqlInitiativeTasksPage {
+ fn from(value: InitiativeTasksPage) -> Self {
+ Self {
+ task_ids: value.task_ids.into_iter().map(ID).collect(),
+ next_cursor: value.next_cursor,
+ total: value.total,
+ }
+ }
+}
+
+/// Visibility state of a task's initiative.
+#[derive(Clone, Copy, Enum, Eq, PartialEq)]
+#[graphql(name = "TaskInitiativeReferenceState")]
+pub enum GraphqlTaskInitiativeReferenceState {
+ /// Visible task without an initiative.
+ None,
+ /// Task or initiative cannot be viewed.
+ Unavailable,
+ /// Both task and initiative can be viewed.
+ Visible,
+}
+
+/// Permission-filtered task-to-initiative relationship.
+pub struct GraphqlTaskInitiativeReference<E: SoupEntityEdges> {
+ task_id: String,
+ state: GraphqlTaskInitiativeReferenceState,
+ initiative_id: Option<InitiativeId>,
+ initiative: OnceCell<Option<GraphqlSoupInitiative<E>>>,
+}
+
+impl<E: SoupEntityEdges> From<TaskInitiativeReference> for GraphqlTaskInitiativeReference<E> {
+ fn from(value: TaskInitiativeReference) -> Self {
+ let (task_id, state, initiative) = match value {
+ TaskInitiativeReference::None { task_id } => {
+ (task_id, GraphqlTaskInitiativeReferenceState::None, None)
+ }
+ TaskInitiativeReference::Unavailable { task_id } => (
+ task_id,
+ GraphqlTaskInitiativeReferenceState::Unavailable,
+ None,
+ ),
+ TaskInitiativeReference::Visible {
+ task_id,
+ initiative,
+ } => (
+ task_id,
+ GraphqlTaskInitiativeReferenceState::Visible,
+ Some(initiative.id),
+ ),
+ };
+ Self {
+ task_id,
+ state,
+ initiative_id: initiative,
+ initiative: OnceCell::new(),
+ }
+ }
+}
+
+impl<E: SoupEntityEdges> GraphqlTaskInitiativeReference<E> {
+ async fn hydrated_initiative(
+ &self,
+ ctx: &Context<'_>,
+ ) -> async_graphql::Result<&Option<GraphqlSoupInitiative<E>>> {
+ self.initiative
+ .get_or_try_init(|| async {
+ match self.initiative_id {
+ Some(id) => load_initiative(ctx, id.as_uuid()).await,
+ None => Ok(None),
+ }
+ })
+ .await
+ }
+}
+
+/// Permission-filtered relationship between a task and its project.
+#[Object(name = "TaskInitiativeReference")]
+impl<E: SoupEntityEdges> GraphqlTaskInitiativeReference<E> {
+ /// Task whose relationship is described, never this object's identity.
+ async fn task_id(&self) -> ID {
+ ID(self.task_id.clone())
+ }
+ /// Permission-filtered relationship state.
+ async fn state(
+ &self,
+ ctx: &Context<'_>,
+ ) -> async_graphql::Result<GraphqlTaskInitiativeReferenceState> {
+ if self.state == GraphqlTaskInitiativeReferenceState::Visible
+ && self.hydrated_initiative(ctx).await?.is_none()
+ {
+ return Ok(GraphqlTaskInitiativeReferenceState::Unavailable);
+ }
+ Ok(self.state)
+ }
+ /// The same initiative entity used by collection/detail queries.
+ async fn initiative(
+ &self,
+ ctx: &Context<'_>,
+ ) -> async_graphql::Result<Option<&GraphqlSoupInitiative<E>>> {
+ Ok(self.hydrated_initiative(ctx).await?.as_ref())
+ }
+}
+
+/// Per-task result of an assignment request.
+#[derive(Clone, Copy, Enum, Eq, PartialEq)]
+#[graphql(name = "InitiativeTaskAssignmentStatus")]
+pub enum GraphqlInitiativeTaskAssignmentStatus {
+ /// Newly assigned or already assigned here.
+ Assigned,
+ /// Moved from another initiative.
+ Moved,
+ /// Document exists but is not a task.
+ NotATask,
+ /// Task could not be found.
+ NotFound,
+ /// Viewer cannot edit this task.
+ SkippedNoPermission,
+}
+
+/// One result in the deduplicated request order.
+#[derive(SimpleObject)]
+#[graphql(name = "InitiativeTaskAssignment")]
+pub struct GraphqlInitiativeTaskAssignment {
+ /// Task whose assignment was attempted.
+ task_id: ID,
+ /// Domain result of this assignment.
+ status: GraphqlInitiativeTaskAssignmentStatus,
+}
+
+impl From<AssignTasksResult> for GraphqlInitiativeTaskAssignment {
+ fn from(value: AssignTasksResult) -> Self {
+ Self {
+ task_id: ID(value.task_id),
+ status: match value.status {
+ AssignTaskStatus::Assigned => GraphqlInitiativeTaskAssignmentStatus::Assigned,
+ AssignTaskStatus::Moved => GraphqlInitiativeTaskAssignmentStatus::Moved,
+ AssignTaskStatus::NotATask => GraphqlInitiativeTaskAssignmentStatus::NotATask,
+ AssignTaskStatus::NotFound => GraphqlInitiativeTaskAssignmentStatus::NotFound,
+ AssignTaskStatus::SkippedNoPermission => {
+ GraphqlInitiativeTaskAssignmentStatus::SkippedNoPermission
+ }
+ },
+ }
+ }
+}
diff --git a/crates/graphql_initiative/src/query.rs b/crates/graphql_initiative/src/query.rs
new file mode 100644
index 0000000000..26a7e66c1b
--- /dev/null
+++ b/crates/graphql_initiative/src/query.rs
@@ -0,0 +1,90 @@
+//! Viewer-scoped initiative query resolvers.
+
+use async_graphql::{Context, ID};
+use graphql_common::{parse_id, require_authenticated_user};
+use graphql_soup::{GraphqlSoupEntity, GraphqlSoupInitiative, SoupEntityEdges, SoupItemDataLoader};
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::EntityType;
+use uuid::Uuid;
+
+use crate::{
+ GraphqlInitiativeTasksPage, GraphqlTaskInitiativeReference, InitiativeEntityLoader,
+ InitiativeGraphqlContext, InitiativeTasksInput, graphql_error,
+};
+
+/// Hydrate the canonical Soup object from the primary for read-after-write consistency.
+pub(crate) async fn load_initiative<E: SoupEntityEdges>(
+ ctx: &Context<'_>,
+ id: Uuid,
+) -> async_graphql::Result<Option<GraphqlSoupInitiative<E>>> {
+ load_from_soup(
+ &ctx.data::<InitiativeEntityLoader>()?.0,
+ require_authenticated_user(ctx)?,
+ id,
+ )
+ .await
+}
+
+/// Resolve a canonical initiative from a permission-filtered Soup reader.
+pub(crate) async fn load_from_soup<E: SoupEntityEdges>(
+ loader: &SoupItemDataLoader,
+ user: MacroUserIdStr<'static>,
+ id: Uuid,
+) -> async_graphql::Result<Option<GraphqlSoupInitiative<E>>> {
+ let entity = EntityType::Initiative.with_entity_string(id.to_string());
+ let Some(item) = loader.load_one((user, entity)).await? else {
+ return Ok(None);
+ };
+ match GraphqlSoupEntity::<E>::new_with_projection(item) {
+ GraphqlSoupEntity::Initiative(initiative) => Ok(Some(initiative)),
+ _ => Err(async_graphql::Error::new(
+ "Soup returned a non-initiative entity for an initiative request",
+ )),
+ }
+}
+
+/// Resolve a project visible to the authenticated viewer without loading its details.
+pub async fn resolve_initiative<E: SoupEntityEdges>(
+ ctx: &Context<'_>,
+ initiative_id: ID,
+) -> async_graphql::Result<GraphqlSoupInitiative<E>> {
+ let id = parse_id(initiative_id, "initiativeId")?;
+ load_initiative(ctx, id)
+ .await?
+ .ok_or_else(|| graphql_error(initiative::domain::models::InitiativeError::NotFound))
+}
+
+/// Resolve visible tasks from an authorized initiative.
+pub async fn resolve_initiative_tasks(
+ ctx: &Context<'_>,
+ user: MacroUserIdStr<'static>,
+ initiative_id: ID,
+ input: InitiativeTasksInput,
+) -> async_graphql::Result<GraphqlInitiativeTasksPage> {
+ let id = parse_id(initiative_id, "initiativeId")?;
+ let page = ctx
+ .data::<InitiativeGraphqlContext>()?
+ .0
+ .tasks(user, id, input.into())
+ .await
+ .map_err(graphql_error)?;
+ Ok(page.into())
+}
+
+/// Resolve project chips without exposing inaccessible project identifiers.
+pub async fn resolve_task_initiative_references<E: SoupEntityEdges>(
+ ctx: &Context<'_>,
+ user: MacroUserIdStr<'static>,
+ task_ids: Vec<ID>,
+) -> async_graphql::Result<Vec<GraphqlTaskInitiativeReference<E>>> {
+ let references = ctx
+ .data::<InitiativeGraphqlContext>()?
+ .0
+ .references(
+ user,
+ task_ids.into_iter().map(|id| id.to_string()).collect(),
+ )
+ .await
+ .map_err(graphql_error)?;
+ Ok(references.references.into_iter().map(Into::into).collect())
+}
diff --git a/crates/graphql_initiative/src/test.rs b/crates/graphql_initiative/src/test.rs
new file mode 100644
index 0000000000..7bfe2ca213
--- /dev/null
+++ b/crates/graphql_initiative/src/test.rs
@@ -0,0 +1,726 @@
+use crate::context::{ApiFuture, InitiativeApi};
+use crate::*;
+use async_graphql::{Context, EmptySubscription, ID, Object, Request, Schema, SimpleObject};
+use graphql_common::require_authenticated_user;
+use graphql_soup::{GraphqlSoupInitiative, SoupEntityEdges};
+use initiative::domain::{models::*, reads::*};
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::Entity;
+use models_permissions::share_permission::{
+ LinkShareState, SharePermissionV2, access_level::AccessLevel,
+};
+use std::sync::{Arc, Mutex};
+use uuid::Uuid;
+
+mod access;
+mod soup;
+
+use self::soup::RecordingSoupService;
+
+/// Minimal composed Soup edge object used by the isolated mutation schema.
+#[derive(Clone, SimpleObject)]
+struct TestSoupEdges {
+ /// Keeps the GraphQL object non-empty.
+ available: bool,
+}
+
+/// Minimal email-specific edge object used by the isolated mutation schema.
+#[derive(Clone, SimpleObject)]
+struct TestEmailThreadEdges {
+ /// Keeps the GraphQL object non-empty.
+ available: bool,
+}
+
+/// Minimal agent-session-specific edge object used by the isolated schema.
+#[derive(Clone, SimpleObject)]
+struct TestAgentSessionEdges {
+ /// Keeps the GraphQL object non-empty.
+ available: bool,
+}
+
+#[derive(Clone)]
+struct TestInitiativeEdges {
+ id: Uuid,
+}
+
+#[Object]
+impl TestInitiativeEdges {
+ async fn member_ids(&self, ctx: &Context<'_>) -> async_graphql::Result<Vec<String>> {
+ Ok(load_initiative_detail(ctx, self.id)
+ .await?
+ .member_ids
+ .iter()
+ .map(ToString::to_string)
+ .collect())
+ }
+ async fn task_ids(&self, ctx: &Context<'_>) -> async_graphql::Result<Vec<ID>> {
+ Ok(load_initiative_detail(ctx, self.id)
+ .await?
+ .task_ids
+ .iter()
+ .cloned()
+ .map(ID)
+ .collect())
+ }
+ async fn share_permission(
+ &self,
+ ctx: &Context<'_>,
+ ) -> async_graphql::Result<GraphqlInitiativeSharePermission> {
+ Ok(load_initiative_detail(ctx, self.id)
+ .await?
+ .share_permission
+ .clone()
+ .into())
+ }
+ async fn task_count(&self, ctx: &Context<'_>) -> async_graphql::Result<u32> {
+ Ok(load_initiative_summary(ctx, self.id).await?.task_count)
+ }
+ async fn completed_task_count(&self, ctx: &Context<'_>) -> async_graphql::Result<u32> {
+ Ok(load_initiative_summary(ctx, self.id)
+ .await?
+ .completed_task_count)
+ }
+}
+
+impl SoupEntityEdges for TestSoupEdges {
+ type Property = String;
+ type Notification = String;
+ type NotificationFilter = String;
+ type ActivityEvent = String;
+ type EmailThreadEdges = TestEmailThreadEdges;
+ type AgentSessionEdges = TestAgentSessionEdges;
+ type InitiativeEdges = TestInitiativeEdges;
+
+ fn initiative_edges(id: Uuid) -> Self::InitiativeEdges {
+ TestInitiativeEdges { id }
+ }
+
+ fn from_entity(_entity: Entity<'static>) -> Self {
+ Self { available: true }
+ }
+
+ fn email_thread_edges(_email_thread_id: uuid::Uuid) -> Self::EmailThreadEdges {
+ TestEmailThreadEdges { available: true }
+ }
+
+ async fn resolve_email_cache_projection(
+ &self,
+ _ctx: &Context<'_>,
+ _email_thread_id: uuid::Uuid,
+ ) -> async_graphql::Result<Option<String>> {
+ Ok(None)
+ }
+
+ fn agent_session_edges(_bot_id: uuid::Uuid) -> Self::AgentSessionEdges {
+ TestAgentSessionEdges { available: true }
+ }
+
+ async fn resolve_properties(
+ &self,
+ _ctx: &Context<'_>,
+ ) -> async_graphql::Result<Vec<Self::Property>> {
+ Ok(Vec::new())
+ }
+
+ async fn resolve_notifications(
+ &self,
+ _ctx: &Context<'_>,
+ _filter: Option<Self::NotificationFilter>,
+ _limit: Option<i32>,
+ ) -> async_graphql::Result<Vec<Self::Notification>> {
+ Ok(Vec::new())
+ }
+
+ async fn resolve_is_favorited(&self, _ctx: &Context<'_>) -> async_graphql::Result<bool> {
+ Ok(false)
+ }
+
+ async fn resolve_viewer_permission(
+ &self,
+ _ctx: &Context<'_>,
+ ) -> async_graphql::Result<Option<graphql_permission::GraphqlEntityPermission>> {
+ Ok(None)
+ }
+
+ async fn resolve_activity(
+ &self,
+ _ctx: &Context<'_>,
+ _limit: Option<i32>,
+ ) -> async_graphql::Result<Vec<Self::ActivityEvent>> {
+ Ok(Vec::new())
+ }
+}
+
+struct Query;
+struct Viewer(MacroUserIdStr<'static>);
+
+#[Object]
+impl Query {
+ async fn user(&self, ctx: &Context<'_>) -> async_graphql::Result<Viewer> {
+ Ok(Viewer(require_authenticated_user(ctx)?))
+ }
+}
+
+#[Object]
+impl Viewer {
+ async fn id(&self) -> ID {
+ ID(self.0.to_string())
+ }
+ async fn initiative(
+ &self,
+ ctx: &Context<'_>,
+ initiative_id: ID,
+ ) -> async_graphql::Result<GraphqlSoupInitiative<TestSoupEdges>> {
+ resolve_initiative(ctx, initiative_id).await
+ }
+
+ async fn task_initiative_references(
+ &self,
+ ctx: &Context<'_>,
+ task_ids: Vec<ID>,
+ ) -> async_graphql::Result<Vec<GraphqlTaskInitiativeReference<TestSoupEdges>>> {
+ resolve_task_initiative_references(ctx, self.0.clone(), task_ids).await
+ }
+}
+
+const PROJECT_ID: &str = "00000000-0000-4000-8000-000000000001";
+
+fn user() -> MacroUserIdStr<'static> {
+ MacroUserIdStr::try_from_email("[email protected]").unwrap()
+}
+
+fn detail() -> InitiativeDetail {
+ InitiativeDetail {
+ id: InitiativeId::from_uuid(Uuid::parse_str(PROJECT_ID).unwrap()),
+ name: "Launch".into(),
+ description_document_id: DescriptionDocumentId::from_uuid(Uuid::from_u128(2)),
+ owner_id: user(),
+ member_ids: vec![],
+ task_ids: vec![],
+ share_permission: SharePermissionV2::from_link_share_state(LinkShareState::Off),
+ user_access_level: AccessLevel::Edit,
+ created_at: chrono::Utc::now(),
+ updated_at: chrono::Utc::now(),
+ }
+}
+
+fn row() -> InitiativePageRow {
+ let detail = detail();
+ InitiativePageRow {
+ initiative: InitiativeSummary {
+ id: detail.id,
+ name: detail.name,
+ description_document_id: detail.description_document_id,
+ updated_at: detail.updated_at,
+ },
+ user_access_level: AccessLevel::Edit,
+ properties: InitiativePropertySnapshot::default(),
+ task_count: 3,
+ completed_task_count: 2,
+ }
+}
+
+#[derive(Default)]
+struct RecordingApi {
+ calls: Mutex<Vec<String>>,
+ updates: Mutex<Vec<UpdateInitiativeRequest>>,
+ denied: bool,
+ fail: bool,
+ name: Mutex<Option<String>>,
+ members: Mutex<Vec<MacroUserIdStr<'static>>>,
+ viewers: Mutex<Vec<String>>,
+ denied_ids: Mutex<Vec<Uuid>>,
+ task_count: Mutex<Option<u32>>,
+}
+
+impl RecordingApi {
+ fn current_detail(&self) -> InitiativeDetail {
+ let mut current = detail();
+ if let Some(name) = &*self.name.lock().unwrap() {
+ current.name = name.clone();
+ }
+ current.member_ids = self.members.lock().unwrap().clone();
+ current
+ }
+
+ fn record(&self, user: &MacroUserIdStr<'static>, call: &str) -> Result<(), InitiativeError> {
+ self.viewers.lock().unwrap().push(user.to_string());
+ self.calls.lock().unwrap().push(call.to_string());
+ if self.denied {
+ return Err(InitiativeError::Unauthorized);
+ }
+ if self.fail {
+ return Err(InitiativeError::Internal(rootcause::report!(
+ "private persistence details"
+ )));
+ }
+ Ok(())
+ }
+}
+
+impl InitiativeApi for RecordingApi {
+ fn get(&self, user: MacroUserIdStr<'static>, id: Uuid) -> ApiFuture<'_, InitiativeDetail> {
+ Box::pin(async move {
+ self.record(&user, "get")?;
+ if self.denied_ids.lock().unwrap().contains(&id) {
+ return Err(InitiativeError::Unauthorized);
+ }
+ let mut detail = self.current_detail();
+ detail.id = InitiativeId::from_uuid(id);
+ Ok(detail)
+ })
+ }
+ fn summary(&self, user: MacroUserIdStr<'static>, id: Uuid) -> ApiFuture<'_, InitiativePageRow> {
+ Box::pin(async move {
+ self.record(&user, "summary")?;
+ if self.denied_ids.lock().unwrap().contains(&id) {
+ return Err(InitiativeError::Unauthorized);
+ }
+ let mut summary = row();
+ if let Some(count) = *self.task_count.lock().unwrap() {
+ summary.task_count = count;
+ }
+ Ok(summary)
+ })
+ }
+ fn update(
+ &self,
+ user: MacroUserIdStr<'static>,
+ _id: Uuid,
+ input: UpdateInitiativeRequest,
+ ) -> ApiFuture<'_, InitiativeDetail> {
+ Box::pin(async move {
+ self.record(&user, "update")?;
+ if let Some(name) = &input.name {
+ *self.name.lock().unwrap() = Some(name.clone());
+ }
+ if let Some(members) = &input.member_ids {
+ *self.members.lock().unwrap() = members
+ .iter()
+ .map(|id| MacroUserIdStr::try_from(id.clone()).unwrap())
+ .collect();
+ }
+ self.updates.lock().unwrap().push(input);
+ Ok(self.current_detail())
+ })
+ }
+ fn create(
+ &self,
+ user: MacroUserIdStr<'static>,
+ input: CreateInitiativeRequest,
+ ) -> ApiFuture<'_, InitiativeDetail> {
+ Box::pin(async move {
+ self.record(&user, "create")?;
+ *self.name.lock().unwrap() = Some(input.name);
+ Ok(self.current_detail())
+ })
+ }
+ fn tasks(
+ &self,
+ user: MacroUserIdStr<'static>,
+ _id: Uuid,
+ _input: InitiativeTasksRequest,
+ ) -> ApiFuture<'_, InitiativeTasksPage> {
+ Box::pin(async move {
+ self.record(&user, "tasks")?;
+ Ok(InitiativeTasksPage {
+ task_ids: vec![],
+ next_cursor: None,
+ total: 0,
+ })
+ })
+ }
+ fn references(
+ &self,
+ user: MacroUserIdStr<'static>,
+ _ids: Vec<String>,
+ ) -> ApiFuture<'_, TaskInitiativeReferences> {
+ Box::pin(async move {
+ self.record(&user, "references")?;
+ Ok(TaskInitiativeReferences {
+ references: vec![
+ TaskInitiativeReference::Visible {
+ task_id: "visible".into(),
+ initiative: InitiativeReference {
+ id: detail().id,
+ name: "Launch".into(),
+ },
+ },
+ TaskInitiativeReference::Unavailable {
+ task_id: "hidden".into(),
+ },
+ TaskInitiativeReference::None {
+ task_id: "unassigned".into(),
+ },
+ ],
+ })
+ })
+ }
+ fn delete(&self, user: MacroUserIdStr<'static>, _id: Uuid) -> ApiFuture<'_, ()> {
+ Box::pin(async move { self.record(&user, "delete") })
+ }
+ fn assign(
+ &self,
+ user: MacroUserIdStr<'static>,
+ _id: Uuid,
+ _ids: Vec<String>,
+ ) -> ApiFuture<'_, AssignTasksResponse> {
+ Box::pin(async move {
+ self.record(&user, "assign")?;
+ Ok(AssignTasksResponse { results: vec![] })
+ })
+ }
+ fn unassign(
+ &self,
+ user: MacroUserIdStr<'static>,
+ _id: Uuid,
+ _task: String,
+ ) -> ApiFuture<'_, ()> {
+ Box::pin(async move { self.record(&user, "unassign") })
+ }
+ fn clear(&self, user: MacroUserIdStr<'static>, _task: String) -> ApiFuture<'_, ()> {
+ Box::pin(async move { self.record(&user, "clear") })
+ }
+}
+
+fn schema(
+ api: Arc<RecordingApi>,
+) -> Schema<Query, InitiativeMutationRoot<TestSoupEdges>, EmptySubscription> {
+ let replica = RecordingSoupService::replica();
+ schema_with_soup(api, replica)
+}
+
+fn schema_with_soup(
+ api: Arc<RecordingApi>,
+ replica: RecordingSoupService,
+) -> Schema<Query, InitiativeMutationRoot<TestSoupEdges>, EmptySubscription> {
+ let primary = RecordingSoupService::primary(api.clone());
+ schema_with_readers(api, replica, primary)
+}
+
+fn schema_with_readers(
+ api: Arc<RecordingApi>,
+ replica: RecordingSoupService,
+ primary: RecordingSoupService,
+) -> Schema<Query, InitiativeMutationRoot<TestSoupEdges>, EmptySubscription> {
+ let context = InitiativeGraphqlContext(api);
+ Schema::build(Query, InitiativeMutationRoot::default(), EmptySubscription)
+ .data(context.clone())
+ .data(replica.loader())
+ .data(InitiativeEntityLoader(primary.loader()))
+ .data(initiative_detail_loader(context.clone(), user()))
+ .data(initiative_summary_loader(context, user()))
+ .finish()
+}
+
+#[tokio::test]
+async fn anonymous_queries_and_mutations_never_call_domain() {
+ let api = Arc::new(RecordingApi::default());
+ let schema = schema(api.clone());
+ for query in [
+ "{ user { id initiative(initiativeId: \"00000000-0000-4000-8000-000000000001\") { id } } }",
+ "mutation { createInitiative(input: { name: \"Launch\" }) { id } }",
+ ] {
+ let response = schema.execute(query).await;
+ assert_eq!(response.errors[0].message, "authentication required");
+ }
+ assert!(api.calls.lock().unwrap().is_empty());
+}
+
+#[tokio::test]
+async fn invalid_project_identifier_never_calls_domain() {
+ let api = Arc::new(RecordingApi::default());
+ let response = schema(api.clone())
+ .execute(
+ Request::new("{ user { initiative(initiativeId: \"invalid\") { id } } }").data(user()),
+ )
+ .await;
+ assert!(!response.errors.is_empty());
+ assert!(api.calls.lock().unwrap().is_empty());
+}
+
+#[tokio::test]
+async fn domain_access_errors_and_internal_errors_preserve_safe_codes() {
+ for (api, expected_message, expected_code) in [
+ (
+ RecordingApi {
+ denied: true,
+ ..Default::default()
+ },
+ "unauthorized",
+ "FORBIDDEN",
+ ),
+ (
+ RecordingApi {
+ fail: true,
+ ..Default::default()
+ },
+ "internal server error",
+ "INTERNAL_SERVER_ERROR",
+ ),
+ ] {
+ let response = schema(Arc::new(api))
+ .execute(
+ Request::new(format!(
+ "{{ user {{ initiative(initiativeId: \"{PROJECT_ID}\") {{ memberIds }} }} }}"
+ ))
+ .data(user()),
+ )
+ .await;
+ assert_eq!(response.errors[0].message, expected_message);
+ assert_eq!(
+ response.errors[0].extensions.as_ref().unwrap().get("code"),
+ Some(&async_graphql::Value::from(expected_code))
+ );
+ }
+}
+
+#[tokio::test]
+async fn share_patch_distinguishes_omission_null_and_value() {
+ let api = Arc::new(RecordingApi::default());
+ let schema = schema(api.clone());
+ for input in [
+ "{}",
+ "{ linkShare: null, teamShareAccessLevel: null }",
+ "{ linkShare: TEAM, linkShareAccessLevel: COMMENT, teamShareAccessLevel: EDIT }",
+ ] {
+ let response = schema.execute(Request::new(format!("mutation {{ updateInitiative(initiativeId: \"{PROJECT_ID}\", input: {{ sharePermission: {input} }}) {{ id }} }}")).data(user())).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ }
+ let updates = api.updates.lock().unwrap();
+ let omitted = updates[0].share_permission.as_ref().unwrap();
+ assert_eq!(omitted.link_share, None);
+ assert_eq!(omitted.team_share_access_level, None);
+ let cleared = updates[1].share_permission.as_ref().unwrap();
+ assert_eq!(cleared.link_share, Some(None));
+ assert_eq!(cleared.team_share_access_level, Some(None));
+ assert_eq!(cleared.link_share_access_level, None);
+ let set = updates[2].share_permission.as_ref().unwrap();
+ assert_eq!(
+ set.link_share,
+ Some(Some(models_permissions::share_permission::LinkShare::Team))
+ );
+ assert_eq!(
+ set.link_share_access_level,
+ Some(Some(AccessLevel::Comment))
+ );
+ assert_eq!(set.team_share_access_level, Some(Some(AccessLevel::Edit)));
+}
+
+#[tokio::test]
+async fn detail_fields_load_only_when_selected_and_share_one_domain_read() {
+ let api = Arc::new(RecordingApi::default());
+ let schema = schema(api.clone());
+ let response = schema.execute(Request::new(format!(
+ "{{ user {{ initiative(initiativeId: \"{PROJECT_ID}\") {{ __typename id displayName metadata {{ ownerId updatedAt viewedAt }} }} }} }}"
+ )).data(user())).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ let item = &data["user"]["initiative"];
+ assert_eq!(item["__typename"], "GraphqlSoupInitiative");
+ assert_eq!(item["id"], PROJECT_ID);
+ assert_eq!(item["displayName"], "Launch");
+ assert!(api.calls.lock().unwrap().is_empty());
+
+ let response = schema.execute(Request::new(format!(
+ "{{ user {{ initiative(initiativeId: \"{PROJECT_ID}\") {{ memberIds taskIds taskCount completedTaskCount sharePermission {{ owner }} }} }} }}"
+ )).data(user())).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ assert_eq!(data["user"]["initiative"]["taskCount"], 3);
+ assert_eq!(data["user"]["initiative"]["completedTaskCount"], 2);
+ let mut calls = api.calls.lock().unwrap().clone();
+ calls.sort();
+ assert_eq!(calls, ["get", "summary"]);
+}
+
+#[tokio::test]
+async fn task_references_use_the_canonical_soup_entity_and_hide_inaccessible_projects() {
+ let api = Arc::new(RecordingApi::default());
+ let replica = RecordingSoupService::replica();
+ let primary = RecordingSoupService::primary(api.clone());
+ let response = schema_with_readers(api.clone(), replica.clone(), primary.clone()).execute(Request::new(
+ "{ user { taskInitiativeReferences(taskIds: [\"visible\",\"hidden\",\"unassigned\"]) { taskId state initiative { __typename id displayName metadata { ownerId } } } } }"
+ ).data(user())).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ let references = &data["user"]["taskInitiativeReferences"];
+ assert_eq!(references[0]["state"], "VISIBLE");
+ assert_eq!(references[1]["state"], "UNAVAILABLE");
+ assert_eq!(references[2]["state"], "NONE");
+ assert_eq!(
+ references[0]["initiative"]["__typename"],
+ "GraphqlSoupInitiative"
+ );
+ assert_eq!(references[0]["initiative"]["id"], PROJECT_ID);
+ assert_eq!(references[0]["initiative"]["displayName"], "Launch");
+ assert!(references[1]["initiative"].is_null());
+ assert!(references[2]["initiative"].is_null());
+ assert_eq!(*api.calls.lock().unwrap(), ["references"]);
+ assert!(replica.calls.lock().unwrap().is_empty());
+ assert_eq!(primary.calls.lock().unwrap().len(), 1);
+}
+
+#[tokio::test]
+async fn mutation_replies_use_primary_state_and_preserve_viewed_metadata() {
+ let api = Arc::new(RecordingApi::default());
+ let replica = RecordingSoupService::replica();
+ let schema = schema_with_soup(api.clone(), replica.clone());
+ let response = schema.execute(Request::new(format!(
+ "mutation {{ first: updateInitiative(initiativeId: \"{PROJECT_ID}\", input: {{ name: \"First\", memberIds: [\"macro|[email protected]\"] }}) {{ __typename id displayName memberIds metadata {{ viewedAt }} }} second: updateInitiative(initiativeId: \"{PROJECT_ID}\", input: {{ name: \"Second\", memberIds: [\"macro|[email protected]\"] }}) {{ __typename id displayName memberIds metadata {{ viewedAt }} }} }}"
+ )).data(user())).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ for (alias, name, member) in [
+ ("first", "First", "macro|[email protected]"),
+ ("second", "Second", "macro|[email protected]"),
+ ] {
+ assert_eq!(data[alias]["__typename"], "GraphqlSoupInitiative");
+ assert_eq!(data[alias]["id"], PROJECT_ID);
+ assert_eq!(data[alias]["displayName"], name);
+ assert_eq!(data[alias]["memberIds"][0], member);
+ assert_eq!(data[alias]["metadata"]["viewedAt"], soup::VIEWED_AT);
+ }
+ assert!(replica.calls.lock().unwrap().is_empty());
+ assert_eq!(
+ *api.calls.lock().unwrap(),
+ ["update", "get", "update", "get"]
+ );
+ let response = schema.execute(Request::new(format!(
+ "{{ user {{ initiative(initiativeId: \"{PROJECT_ID}\") {{ displayName memberIds }} }} }}"
+ )).data(user())).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ assert_eq!(data["user"]["initiative"]["displayName"], "Second");
+ assert_eq!(
+ data["user"]["initiative"]["memberIds"][0],
+ );
+ assert!(replica.calls.lock().unwrap().is_empty());
+}
+
+#[tokio::test]
+async fn newly_created_project_uses_primary_hydration_before_replica_catches_up() {
+ let api = Arc::new(RecordingApi::default());
+ let replica = RecordingSoupService::empty();
+ let schema = schema_with_soup(api, replica.clone());
+ let response = schema.execute(Request::new(
+ "mutation { createInitiative(input: { name: \"New launch\" }) { __typename id displayName metadata { viewedAt } } }"
+ ).data(user())).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ assert_eq!(
+ data["createInitiative"]["__typename"],
+ "GraphqlSoupInitiative"
+ );
+ assert_eq!(data["createInitiative"]["id"], PROJECT_ID);
+ assert_eq!(data["createInitiative"]["displayName"], "New launch");
+ assert_eq!(
+ data["createInitiative"]["metadata"]["viewedAt"],
+ soup::VIEWED_AT
+ );
+ // Opening the newly created route immediately performs another network read.
+ let opened = schema.execute(Request::new(format!(
+ "{{ user {{ initiative(initiativeId: \"{PROJECT_ID}\") {{ __typename id displayName metadata {{ viewedAt }} }} }} }}"
+ )).data(user())).await;
+ assert!(opened.errors.is_empty(), "{:?}", opened.errors);
+ assert_eq!(
+ opened.data.into_json().unwrap()["user"]["initiative"],
+ data["createInitiative"]
+ );
+ assert!(replica.calls.lock().unwrap().is_empty());
+}
+
+#[tokio::test]
+async fn missing_or_revoked_project_is_not_exposed_by_detail_or_reference() {
+ let api = Arc::new(RecordingApi::default());
+ let replica = RecordingSoupService::replica();
+ let primary = RecordingSoupService::empty();
+ let schema = schema_with_readers(api.clone(), replica.clone(), primary.clone());
+ let response = schema
+ .execute(
+ Request::new(format!(
+ "{{ user {{ initiative(initiativeId: \"{PROJECT_ID}\") {{ id }} }} }}"
+ ))
+ .data(user()),
+ )
+ .await;
+ assert_eq!(response.errors[0].message, "initiative not found");
+ assert!(api.calls.lock().unwrap().is_empty());
+ primary.calls.lock().unwrap().clear();
+
+ let response = schema.execute(Request::new(
+ "{ user { taskInitiativeReferences(taskIds: [\"visible\"]) { state initiative { id displayName } } } }"
+ ).data(user())).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ let reference = &data["user"]["taskInitiativeReferences"][0];
+ assert!(reference["initiative"].is_null());
+ assert_eq!(reference["state"], "UNAVAILABLE");
+ assert_eq!(primary.calls.lock().unwrap().len(), 1);
+ assert!(
+ replica.calls.lock().unwrap().is_empty(),
+ "revoked primary access must not fall back to stale replica data"
+ );
+
+ let response = schema
+ .execute(
+ Request::new("{ user { taskInitiativeReferences(taskIds: [\"visible\"]) { state } } }")
+ .data(user()),
+ )
+ .await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ assert_eq!(
+ response.data.into_json().unwrap()["user"]["taskInitiativeReferences"][0]["state"],
+ "UNAVAILABLE"
+ );
+}
+
+#[tokio::test]
+async fn detail_loaders_isolate_viewers_failures_and_subsequent_reads() {
+ let api = Arc::new(RecordingApi::default());
+ let project = Uuid::parse_str(PROJECT_ID).unwrap();
+ let hidden = Uuid::from_u128(99);
+ api.denied_ids.lock().unwrap().push(hidden);
+ let other = MacroUserIdStr::try_from_email("[email protected]").unwrap();
+ let context = InitiativeGraphqlContext(api.clone());
+ let viewer_loader = initiative_detail_loader(context.clone(), user());
+ let other_loader = initiative_detail_loader(context.clone(), other);
+ let summary_loader = initiative_summary_loader(context, user());
+ let results = viewer_loader.load_many([project, hidden]).await.unwrap();
+ assert!(results[&project].is_ok());
+ assert!(results[&hidden].is_err());
+ let summaries = summary_loader.load_many([project, hidden]).await.unwrap();
+ assert_eq!(summaries[&project].as_ref().unwrap().task_count, 3);
+ assert!(summaries[&hidden].is_err());
+ other_loader
+ .load_one(project)
+ .await
+ .unwrap()
+ .unwrap()
+ .unwrap();
+ assert!(
+ api.viewers
+ .lock()
+ .unwrap()
+ .iter()
+ .any(|viewer| viewer == "macro|[email protected]")
+ );
+
+ *api.name.lock().unwrap() = Some("Updated after first read".into());
+ let refreshed = viewer_loader
+ .load_one(project)
+ .await
+ .unwrap()
+ .unwrap()
+ .unwrap();
+ assert_eq!(refreshed.name, "Updated after first read");
+ *api.task_count.lock().unwrap() = Some(4);
+ let refreshed_summary = summary_loader
+ .load_one(project)
+ .await
+ .unwrap()
+ .unwrap()
+ .unwrap();
+ assert_eq!(refreshed_summary.task_count, 4);
+}
diff --git a/crates/graphql_initiative/src/test/access.rs b/crates/graphql_initiative/src/test/access.rs
new file mode 100644
index 0000000000..4e0870a2b6
--- /dev/null
+++ b/crates/graphql_initiative/src/test/access.rs
@@ -0,0 +1,316 @@
+use super::*;
+use entity_access::domain::models::{
+ AccessError, EditAccessLevel, EntityAccessAuth, EntityAccessReceipt, EntityPermission,
+ EntityType, OwnerAccessLevel, RequiredPermission, ViewAccessLevel,
+};
+use initiative::domain::ports::InitiativeService;
+
+#[derive(Default)]
+struct ReceiptService {
+ receipts: Mutex<Vec<(String, String)>>,
+ assignments: Mutex<Vec<String>>,
+}
+
+#[allow(unused_variables)]
+impl InitiativeService for ReceiptService {
+ async fn summary(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ ) -> Result<InitiativePageRow, InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn page(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ request: InitiativePageRequest,
+ ) -> Result<InitiativePage, InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn tasks_page(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ request: InitiativeTasksRequest,
+ ) -> Result<InitiativeTasksPage, InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn task_references(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ request: TaskInitiativeReferencesRequest,
+ ) -> Result<TaskInitiativeReferences, InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn create(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ request: CreateInitiativeRequest,
+ ) -> Result<InitiativeDetail, InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+
+ async fn internal_get_basic(
+ &self,
+ id: InitiativeId,
+ ) -> Result<InitiativeBasic, InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn get(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ ) -> Result<InitiativeDetail, InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn list(&self, user_id: &MacroUserIdStr<'_>) -> Result<InitiativeList, InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn update(
+ &self,
+ receipt: EntityAccessReceipt<EditAccessLevel>,
+ request: UpdateInitiativeRequest,
+ ) -> Result<InitiativeDetail, InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn assign_tasks(
+ &self,
+ receipt: EntityAccessReceipt<EditAccessLevel>,
+ assignments: Vec<TaskAssignment>,
+ ) -> Result<AssignTasksResponse, InitiativeError> {
+ *self.assignments.lock().unwrap() = assignments
+ .iter()
+ .map(|assignment| assignment.task_id().to_owned())
+ .collect();
+ Ok(AssignTasksResponse {
+ results: assignments
+ .into_iter()
+ .map(|assignment| AssignTasksResult {
+ task_id: assignment.task_id().to_owned(),
+ status: match assignment {
+ TaskAssignment::Authorized { .. } => AssignTaskStatus::Assigned,
+ TaskAssignment::NotFound { .. } => AssignTaskStatus::NotFound,
+ TaskAssignment::SkippedNoPermission { .. } => {
+ AssignTaskStatus::SkippedNoPermission
+ }
+ },
+ })
+ .collect(),
+ })
+ }
+ async fn unassign_task(
+ &self,
+ receipt: EntityAccessReceipt<EditAccessLevel>,
+ task_receipt: EntityAccessReceipt<EditAccessLevel>,
+ ) -> Result<(), InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn clear_task(
+ &self,
+ task_receipt: EntityAccessReceipt<EditAccessLevel>,
+ ) -> Result<(), InitiativeError> {
+ self.receipts.lock().unwrap().push((
+ task_receipt.entity().entity_id.clone(),
+ task_receipt.get_authenticated_user().unwrap().to_string(),
+ ));
+ Ok(())
+ }
+ async fn grant_assignees(
+ &self,
+ receipt: EntityAccessReceipt<EditAccessLevel>,
+ user_ids: Vec<MacroUserIdStr<'static>>,
+ ) -> Result<(), InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+ async fn delete(
+ &self,
+ receipt: EntityAccessReceipt<OwnerAccessLevel>,
+ ) -> Result<(), InitiativeError> {
+ unreachable!("unexpected domain call")
+ }
+}
+
+struct TaskOnlyAccess {
+ level: AccessLevel,
+ calls: Mutex<Vec<(String, EntityType)>>,
+}
+
+impl InitiativeAuthorizer for TaskOnlyAccess {
+ async fn authorize<T: RequiredPermission>(
+ &self,
+ user: &MacroUserIdStr<'static>,
+ id: &str,
+ entity_type: EntityType,
+ ) -> Result<EntityAccessReceipt<T>, AccessError> {
+ self.calls
+ .lock()
+ .unwrap()
+ .push((id.to_string(), entity_type));
+ assert_eq!(
+ entity_type,
+ EntityType::Document,
+ "clearing a task must not depend on project access"
+ );
+ EntityAccessReceipt::try_new(
+ EntityAccessAuth::Authenticated(user.clone()),
+ entity_access::domain::models::Entity {
+ entity_id: id.to_string(),
+ entity_type,
+ },
+ EntityPermission::AccessLevel {
+ access_level: self.level,
+ },
+ )
+ }
+}
+
+#[tokio::test]
+async fn clear_task_succeeds_using_only_task_edit_access() {
+ let service = Arc::new(ReceiptService::default());
+ let access = Arc::new(TaskOnlyAccess {
+ level: AccessLevel::Edit,
+ calls: Mutex::new(Vec::new()),
+ });
+ let context = InitiativeGraphqlContext::new(service.clone(), access.clone());
+ let schema = Schema::build(
+ Query,
+ InitiativeMutationRoot::<TestSoupEdges>::default(),
+ EmptySubscription,
+ )
+ .data(context)
+ .finish();
+ let response = schema
+ .execute(Request::new("mutation { clearTaskInitiative(taskId: \"task-1\") }").data(user()))
+ .await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ assert_eq!(
+ *service.receipts.lock().unwrap(),
+ [("task-1".into(), "macro|[email protected]".into())]
+ );
+ assert_eq!(
+ *access.calls.lock().unwrap(),
+ [("task-1".into(), EntityType::Document)]
+ );
+}
+
+#[tokio::test]
+async fn clear_task_denied_edit_access_never_calls_service() {
+ let service = Arc::new(ReceiptService::default());
+ let access = Arc::new(TaskOnlyAccess {
+ level: AccessLevel::View,
+ calls: Mutex::new(Vec::new()),
+ });
+ let context = InitiativeGraphqlContext::new(service.clone(), access);
+ let schema = Schema::build(
+ Query,
+ InitiativeMutationRoot::<TestSoupEdges>::default(),
+ EmptySubscription,
+ )
+ .data(context)
+ .finish();
+ let response = schema
+ .execute(Request::new("mutation { clearTaskInitiative(taskId: \"task-1\") }").data(user()))
+ .await;
+ assert_eq!(response.errors[0].message, "unauthorized");
+ assert!(service.receipts.lock().unwrap().is_empty());
+}
+
+#[derive(Default)]
+struct ConcurrentAccess {
+ destination_checked: std::sync::atomic::AtomicBool,
+ inflight: std::sync::atomic::AtomicUsize,
+ peak: std::sync::atomic::AtomicUsize,
+ calls: Mutex<Vec<String>>,
+ deny_destination: bool,
+}
+
+impl InitiativeAuthorizer for ConcurrentAccess {
+ async fn authorize<T: RequiredPermission>(
+ &self,
+ user: &MacroUserIdStr<'static>,
+ id: &str,
+ entity_type: EntityType,
+ ) -> Result<EntityAccessReceipt<T>, AccessError> {
+ use std::sync::atomic::Ordering::SeqCst;
+ self.calls.lock().unwrap().push(id.to_owned());
+ if entity_type == EntityType::Initiative {
+ self.destination_checked.store(true, SeqCst);
+ if self.deny_destination {
+ return Err(AccessError::Unauthorized);
+ }
+ } else {
+ assert!(self.destination_checked.load(SeqCst));
+ let running = self.inflight.fetch_add(1, SeqCst) + 1;
+ self.peak.fetch_max(running, SeqCst);
+ tokio::task::yield_now().await;
+ if id.ends_with('0') {
+ tokio::task::yield_now().await;
+ }
+ self.inflight.fetch_sub(1, SeqCst);
+ if id == "task-1" {
+ return Err(AccessError::Unauthorized);
+ }
+ }
+ EntityAccessReceipt::try_new(
+ EntityAccessAuth::Authenticated(user.clone()),
+ entity_access::domain::models::Entity {
+ entity_id: id.to_owned(),
+ entity_type,
+ },
+ EntityPermission::AccessLevel {
+ access_level: AccessLevel::Edit,
+ },
+ )
+ }
+}
+
+#[tokio::test]
+async fn task_assignment_authorization_is_bounded_concurrent_and_keeps_input_order() {
+ let service = Arc::new(ReceiptService::default());
+ let access = Arc::new(ConcurrentAccess::default());
+ let context = InitiativeGraphqlContext::new(service.clone(), access.clone());
+ let ids: Vec<_> = (0..40).map(|index| format!("task-{index}")).collect();
+ let result = context
+ .0
+ .assign(user(), Uuid::from_u128(1), ids.clone())
+ .await
+ .unwrap();
+ assert_eq!(*service.assignments.lock().unwrap(), ids);
+ assert_eq!(
+ result.results[1].status,
+ AssignTaskStatus::SkippedNoPermission
+ );
+ let peak = access.peak.load(std::sync::atomic::Ordering::SeqCst);
+ assert!(
+ peak > 1 && peak <= 16,
+ "expected bounded parallel checks; observed {peak}"
+ );
+}
+
+#[tokio::test]
+async fn task_assignment_validates_batch_and_destination_before_authorizing_tasks() {
+ let service = Arc::new(ReceiptService::default());
+ let access = Arc::new(ConcurrentAccess {
+ deny_destination: true,
+ ..Default::default()
+ });
+ let context = InitiativeGraphqlContext::new(service.clone(), access.clone());
+ assert!(
+ context
+ .0
+ .assign(
+ user(),
+ Uuid::from_u128(1),
+ (0..101).map(|id| id.to_string()).collect()
+ )
+ .await
+ .is_err()
+ );
+ assert!(access.calls.lock().unwrap().is_empty());
+ assert!(
+ context
+ .0
+ .assign(user(), Uuid::from_u128(1), vec!["task-0".into()])
+ .await
+ .is_err()
+ );
+ assert_eq!(access.calls.lock().unwrap().len(), 1);
+ assert!(service.assignments.lock().unwrap().is_empty());
+}
diff --git a/crates/graphql_initiative/src/test/soup.rs b/crates/graphql_initiative/src/test/soup.rs
new file mode 100644
index 0000000000..f794c12802
--- /dev/null
+++ b/crates/graphql_initiative/src/test/soup.rs
@@ -0,0 +1,173 @@
+//! Soup service fixtures keep replica reads distinct from primary mutation replies.
+
+use std::sync::{Arc, Mutex};
+
+use chrono::{DateTime, Utc};
+use entity_access::domain::models::{EntityAccessReceipt, MemberTeamRole};
+use graphql_soup::{SoupInboxReader, SoupItemDataLoader, SoupItemLoader, SoupItemLoaderError};
+use macro_user_id::user_id::MacroUserIdStr;
+use model_owner::Owner;
+use models_pagination::{Paginated, PaginatedCursor, SimpleSortMethod};
+use models_properties::service::property_definition_with_options::PropertyDefinitionWithOptions;
+use models_soup::{initiative::SoupInitiative, item::SoupItem};
+use soup::domain::{
+ models::{
+ EnrichedSoupItem, GroupedSortRequest, IntoSoupReqAst, SoupErr, SoupPropertiesField,
+ SoupRequest, grouping::ItemGroupingInfo,
+ },
+ ports::{SoupOutput, SoupService},
+};
+use uuid::Uuid;
+
+use super::{RecordingApi, detail, user};
+
+pub(super) const VIEWED_AT: &str = "2026-09-20T12:00:00+00:00";
+
+#[derive(Clone)]
+pub(super) struct RecordingSoupService {
+ pub(super) calls: Arc<Mutex<Vec<String>>>,
+ source: Source,
+}
+
+#[derive(Clone)]
+enum Source {
+ Replica,
+ Empty,
+ Primary(Arc<RecordingApi>),
+}
+
+impl RecordingSoupService {
+ pub(super) fn replica() -> Self {
+ Self {
+ calls: Arc::default(),
+ source: Source::Replica,
+ }
+ }
+
+ pub(super) fn empty() -> Self {
+ Self {
+ calls: Arc::default(),
+ source: Source::Empty,
+ }
+ }
+
+ pub(super) fn primary(api: Arc<RecordingApi>) -> Self {
+ Self {
+ calls: Arc::default(),
+ source: Source::Primary(api),
+ }
+ }
+
+ pub(super) fn loader(&self) -> SoupItemDataLoader {
+ SoupItemDataLoader::new(SoupItemLoader::new(self.clone(), NoInboxes))
+ }
+}
+
+impl SoupService for RecordingSoupService {
+ async fn get_user_soup<T>(
+ &self,
+ req: SoupRequest<T>,
+ team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
+ ) -> Result<SoupOutput<T>, SoupErr>
+ where
+ SoupRequest<T>: IntoSoupReqAst,
+ T: Clone + serde::Serialize + Send,
+ {
+ assert!(team_receipt.is_none());
+ self.calls.lock().unwrap().push(req.user.to_string());
+ let snapshot = match &self.source {
+ Source::Replica => Some(detail()),
+ Source::Empty => None,
+ Source::Primary(api) => Some(api.current_detail()),
+ };
+ let items = snapshot
+ .filter(|_| req.user == user())
+ .map(|detail| {
+ SoupItem::Initiative(SoupInitiative {
+ id: detail.id.as_uuid(),
+ name: detail.name,
+ owner_id: Owner::from_principal_str(detail.owner_id.as_ref()).unwrap(),
+ description_document_id: Some(detail.description_document_id.as_uuid()),
+ created_at: detail.created_at,
+ updated_at: detail.updated_at,
+ viewed_at: Some(
+ DateTime::parse_from_rfc3339(VIEWED_AT)
+ .unwrap()
+ .with_timezone(&Utc),
+ ),
+ extra: (),
+ })
+ })
+ .into_iter()
+ .collect();
+ let page: PaginatedCursor<SoupItem<()>, String, SimpleSortMethod, T> =
+ Paginated::from_parts(items, None);
+ Ok(SoupOutput::Simple(page))
+ }
+
+ async fn get_user_soup_with_properties<T>(
+ &self,
+ _req: SoupRequest<T>,
+ _team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
+ ) -> Result<SoupOutput<T, EnrichedSoupItem>, SoupErr>
+ where
+ SoupRequest<T>: IntoSoupReqAst,
+ T: Clone + serde::Serialize + Send,
+ {
+ unreachable!("initiative hydration uses raw Soup")
+ }
+
+ async fn get_user_soup_with_frecency<T>(
+ &self,
+ _req: SoupRequest<T>,
+ _team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
+ ) -> Result<SoupOutput<T, EnrichedSoupItem>, SoupErr>
+ where
+ SoupRequest<T>: IntoSoupReqAst,
+ T: Clone + serde::Serialize + Send,
+ {
+ unreachable!("initiative hydration uses raw Soup")
+ }
+
+ async fn get_user_soup_with_properties_and_frecency<T>(
+ &self,
+ _req: SoupRequest<T>,
+ _team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
+ ) -> Result<SoupOutput<T, EnrichedSoupItem>, SoupErr>
+ where
+ SoupRequest<T>: IntoSoupReqAst,
+ T: Clone + serde::Serialize + Send,
+ {
+ unreachable!("initiative hydration uses raw Soup")
+ }
+
+ async fn get_user_soup_grouped(
+ &self,
+ _req: GroupedSortRequest<'_>,
+ ) -> Result<impl Iterator<Item = ItemGroupingInfo<SoupPropertiesField>> + Send, SoupErr> {
+ unreachable!("initiative hydration uses raw Soup");
+ #[expect(
+ unreachable_code,
+ reason = "the unreachable stub still needs a concrete iterator type"
+ )]
+ Ok(Vec::<ItemGroupingInfo<SoupPropertiesField>>::new().into_iter())
+ }
+
+ async fn caller_tag_sets<'a>(
+ &self,
+ _user_id: MacroUserIdStr<'a>,
+ ) -> Result<Vec<PropertyDefinitionWithOptions>, SoupErr> {
+ unreachable!("initiative hydration does not read tag definitions")
+ }
+}
+
+struct NoInboxes;
+
+impl SoupInboxReader for NoInboxes {
+ async fn get_inbox_ids(
+ &self,
+ _user_id: MacroUserIdStr<'static>,
+ ) -> Result<Vec<Uuid>, SoupItemLoaderError> {
+ unreachable!("initiative hydration must not request email inboxes")
+ }
+}
diff --git a/crates/graphql_properties/src/definitions.rs b/crates/graphql_properties/src/definitions.rs
new file mode 100644
index 0000000000..e139952d05
--- /dev/null
+++ b/crates/graphql_properties/src/definitions.rs
@@ -0,0 +1,243 @@
+//! Typed property definition and option reads through the properties domain.
+
+use std::marker::PhantomData;
+
+use async_graphql::{Context, Enum, ID, Object, SimpleObject, Union, dataloader::DataLoader};
+use graphql_common::{GraphqlPropertyEntityType, parse_id};
+use models_properties::{
+ PropertyOwner,
+ service::{
+ property_definition::PropertyDefinition,
+ property_option::{PropertyOption, PropertyOptionValue},
+ },
+};
+
+use crate::{EntityPropertiesLoader, EntityPropertyReader, GraphqlPropertyDataType};
+
+/// Which authenticated-caller property definitions to list.
+#[derive(Enum, Debug, Clone, Copy, PartialEq, Eq)]
+pub enum GraphqlPropertyDefinitionScope {
+ /// Definitions owned by the viewer.
+ User,
+ /// Definitions owned by the viewer's team.
+ Team,
+ /// System definitions shared by all viewers.
+ System,
+ /// The viewer's personal, team, and system definitions.
+ All,
+}
+
+/// The kind of principal owning a property definition.
+#[derive(Enum, Clone, Copy, PartialEq, Eq)]
+pub enum GraphqlPropertyOwnerScope {
+ /// A personal definition.
+ User,
+ /// A team definition.
+ Team,
+ /// A system definition.
+ System,
+}
+
+/// Ownership facts embedded in a property definition.
+#[derive(SimpleObject)]
+pub struct GraphqlPropertyDefinitionOwner {
+ /// Kind of owning principal.
+ scope: GraphqlPropertyOwnerScope,
+ /// User or team identifier; absent for system definitions.
+ principal_id: Option<String>,
+}
+
+impl From<&PropertyOwner> for GraphqlPropertyDefinitionOwner {
+ fn from(owner: &PropertyOwner) -> Self {
+ let (scope, principal_id) = match owner {
+ PropertyOwner::User { user_id } => {
+ (GraphqlPropertyOwnerScope::User, Some(user_id.clone()))
+ }
+ PropertyOwner::Team { team_id } => {
+ (GraphqlPropertyOwnerScope::Team, Some(team_id.to_string()))
+ }
+ PropertyOwner::System => (GraphqlPropertyOwnerScope::System, None),
+ };
+ Self {
+ scope,
+ principal_id,
+ }
+ }
+}
+
+/// A globally identified property definition, independent of any assignment.
+pub struct GraphqlPropertyDefinition<R> {
+ /// Definition returned by the owning domain service.
+ definition: PropertyDefinition,
+ /// Reader used only if the options edge is selected.
+ reader: PhantomData<R>,
+}
+
+/// A globally identified property definition, independent of any assignment.
+#[Object(name = "GraphqlPropertyDefinition")]
+impl<R: EntityPropertyReader> GraphqlPropertyDefinition<R> {
+ /// Global identity of the shared definition, not an entity assignment.
+ async fn id(&self) -> ID {
+ ID(self.definition.id.to_string())
+ }
+
+ /// Principal owning the definition.
+ async fn owner(&self) -> GraphqlPropertyDefinitionOwner {
+ (&self.definition.owner).into()
+ }
+
+ /// User-visible property name.
+ async fn display_name(&self) -> &str {
+ &self.definition.display_name
+ }
+
+ /// The type of value accepted by this property.
+ async fn data_type(&self) -> GraphqlPropertyDataType {
+ GraphqlPropertyDataType::new(self.definition.data_type)
+ }
+
+ /// Whether more than one selected value is supported.
+ async fn is_multi_select(&self) -> bool {
+ self.definition.is_multi_select
+ }
+
+ /// Entity-reference type constraint, if any.
+ async fn specific_entity_type(&self) -> Option<GraphqlPropertyEntityType> {
+ self.definition
+ .specific_entity_type
+ .map(GraphqlPropertyEntityType::new)
+ }
+
+ /// Whether the system manages this definition.
+ async fn is_system(&self) -> bool {
+ self.definition.is_system
+ }
+
+ /// Whether the property represents generated entity metadata.
+ async fn is_metadata(&self) -> bool {
+ self.definition.is_metadata
+ }
+
+ /// When this definition was created, as RFC 3339.
+ async fn created_at(&self) -> String {
+ self.definition.created_at.to_rfc3339()
+ }
+
+ /// When this definition last changed, as RFC 3339.
+ async fn updated_at(&self) -> String {
+ self.definition.updated_at.to_rfc3339()
+ }
+
+ /// Selectable options, loaded only when requested.
+ async fn options(
+ &self,
+ ctx: &Context<'_>,
+ ) -> async_graphql::Result<Vec<GraphqlPropertyOption>> {
+ load_property_options::<R>(ctx, ID(self.definition.id.to_string())).await
+ }
+}
+
+/// A globally identified selectable option belonging to one property definition.
+#[derive(SimpleObject)]
+pub struct GraphqlPropertyOption {
+ /// Stable global identity of this selectable option.
+ id: ID,
+ /// Definition to which the option belongs.
+ property_definition_id: ID,
+ /// Ordering within the definition's available options.
+ display_order: i32,
+ /// Typed option value.
+ value: GraphqlPropertyOptionValue,
+ /// Optional display color.
+ color: Option<String>,
+ /// Creation time as RFC 3339.
+ created_at: String,
+ /// Last update time as RFC 3339.
+ updated_at: String,
+}
+
+impl From<PropertyOption> for GraphqlPropertyOption {
+ fn from(option: PropertyOption) -> Self {
+ Self {
+ id: ID(option.id.to_string()),
+ property_definition_id: ID(option.property_definition_id.to_string()),
+ display_order: option.display_order,
+ value: match option.value {
+ PropertyOptionValue::String(value) => {
+ GraphqlPropertyOptionValue::String(GraphqlStringPropertyOptionValue { value })
+ }
+ PropertyOptionValue::Number(value) => {
+ GraphqlPropertyOptionValue::Number(GraphqlNumberPropertyOptionValue { value })
+ }
+ },
+ color: option.color,
+ created_at: option.created_at.to_rfc3339(),
+ updated_at: option.updated_at.to_rfc3339(),
+ }
+ }
+}
+
+/// Exactly one of the supported option value types.
+#[derive(Union)]
+pub enum GraphqlPropertyOptionValue {
+ /// String select option.
+ String(GraphqlStringPropertyOptionValue),
+ /// Numeric select option.
+ Number(GraphqlNumberPropertyOptionValue),
+}
+
+/// Text stored by a string select option.
+#[derive(SimpleObject)]
+pub struct GraphqlStringPropertyOptionValue {
+ /// Stored text.
+ value: String,
+}
+
+/// Number stored by a numeric select option.
+#[derive(SimpleObject)]
+pub struct GraphqlNumberPropertyOptionValue {
+ /// Stored number.
+ value: f64,
+}
+
+/// Resolve a viewer's definitions through the request-scoped authenticated reader.
+pub async fn load_property_definitions<R: EntityPropertyReader>(
+ ctx: &Context<'_>,
+ scope: GraphqlPropertyDefinitionScope,
+ for_entity_type: Option<GraphqlPropertyEntityType>,
+) -> async_graphql::Result<Vec<GraphqlPropertyDefinition<R>>> {
+ let loader = ctx.data::<DataLoader<EntityPropertiesLoader<R>>>()?;
+ let definitions = loader
+ .loader()
+ .definitions(
+ scope,
+ for_entity_type.map(GraphqlPropertyEntityType::into_model),
+ )
+ .await
+ .map_err(|err| async_graphql::Error::new(err.to_string()))?;
+ Ok(definitions
+ .into_iter()
+ .map(|definition| GraphqlPropertyDefinition {
+ definition,
+ reader: PhantomData,
+ })
+ .collect())
+}
+
+/// Resolve options after the owning domain checks definition visibility.
+pub async fn load_property_options<R: EntityPropertyReader>(
+ ctx: &Context<'_>,
+ property_definition_id: ID,
+) -> async_graphql::Result<Vec<GraphqlPropertyOption>> {
+ let definition_id = parse_id(property_definition_id, "propertyDefinitionId")?;
+ let loader = ctx.data::<DataLoader<EntityPropertiesLoader<R>>>()?;
+ let options = loader
+ .load_one(definition_id)
+ .await
+ .map_err(|err| async_graphql::Error::new(err.to_string()))?
+ .ok_or_else(|| async_graphql::Error::new("property definition is not visible"))?;
+ Ok(options.into_iter().map(Into::into).collect())
+}
+
+#[cfg(test)]
+mod test;
diff --git a/crates/graphql_properties/src/definitions/test.rs b/crates/graphql_properties/src/definitions/test.rs
new file mode 100644
index 0000000000..998b57779b
--- /dev/null
+++ b/crates/graphql_properties/src/definitions/test.rs
@@ -0,0 +1,216 @@
+//! Contract coverage for property definition identity, authorization context, and lazy options.
+
+use std::{
+ collections::HashMap,
+ sync::{
+ Arc,
+ atomic::{AtomicUsize, Ordering},
+ },
+};
+
+use async_graphql::{EmptyMutation, EmptySubscription, Schema};
+use macro_user_id::user_id::MacroUserIdStr;
+use models_properties::service::entity_property_with_definition::EntityPropertyWithDefinition;
+use uuid::Uuid;
+
+use super::*;
+use crate::{NoOpEntityPropertyReader, entity_properties_loader};
+
+/// Request reader recording option work for lazy-field assertions.
+struct TestReader(Arc<AtomicUsize>);
+
+impl EntityPropertyReader for TestReader {
+ async fn get_definitions(
+ &self,
+ user_id: &MacroUserIdStr<'static>,
+ scope: GraphqlPropertyDefinitionScope,
+ for_entity_type: Option<models_properties::EntityType>,
+ ) -> Result<Vec<PropertyDefinition>, rootcause::Report> {
+ assert_eq!(user_id.as_ref(), "macro|[email protected]");
+ assert_eq!(scope, GraphqlPropertyDefinitionScope::System);
+ assert_eq!(
+ for_entity_type,
+ Some(models_properties::EntityType::Initiative)
+ );
+ let now = chrono::Utc::now();
+ Ok(vec![PropertyDefinition {
+ id: Uuid::from_u128(1),
+ owner: PropertyOwner::System,
+ display_name: "Status".to_owned(),
+ data_type: models_properties::DataType::SelectString,
+ is_multi_select: false,
+ specific_entity_type: None,
+ created_at: now,
+ updated_at: now,
+ is_system: true,
+ is_metadata: false,
+ }])
+ }
+
+ async fn get_options(
+ &self,
+ user_id: &MacroUserIdStr<'static>,
+ property_definition_ids: &[Uuid],
+ ) -> Result<HashMap<Uuid, Vec<PropertyOption>>, rootcause::Report> {
+ assert_eq!(user_id.as_ref(), "macro|[email protected]");
+ self.0.fetch_add(1, Ordering::Relaxed);
+ let now = chrono::Utc::now();
+ Ok(property_definition_ids
+ .iter()
+ .filter_map(|id| match id.as_u128() {
+ 1 => Some((
+ *id,
+ vec![PropertyOption {
+ id: Uuid::from_u128(2),
+ property_definition_id: *id,
+ display_order: 3,
+ value: PropertyOptionValue::String("In Progress".to_owned()),
+ color: None,
+ created_at: now,
+ updated_at: now,
+ }],
+ )),
+ 4 => Some((*id, Vec::new())),
+ _ => None,
+ })
+ .collect())
+ }
+
+ async fn get_properties(
+ &self,
+ _user_id: &MacroUserIdStr<'static>,
+ _keys: &[model_entity::Entity<'static>],
+ ) -> Result<
+ HashMap<model_entity::Entity<'static>, Vec<EntityPropertyWithDefinition>>,
+ rootcause::Report,
+ > {
+ Ok(HashMap::new())
+ }
+}
+
+/// Minimal schema exposing the same viewer-edge resolver functions.
+struct Query;
+
+#[Object]
+impl Query {
+ /// Definitions scoped to the authenticated caller.
+ async fn definitions(
+ &self,
+ ctx: &Context<'_>,
+ ) -> async_graphql::Result<Vec<GraphqlPropertyDefinition<TestReader>>> {
+ load_property_definitions::<TestReader>(
+ ctx,
+ GraphqlPropertyDefinitionScope::System,
+ Some(GraphqlPropertyEntityType::Initiative),
+ )
+ .await
+ }
+
+ /// Read an option list by definition reference.
+ async fn options(
+ &self,
+ ctx: &Context<'_>,
+ definition_id: ID,
+ ) -> async_graphql::Result<Vec<GraphqlPropertyOption>> {
+ load_property_options::<TestReader>(ctx, definition_id).await
+ }
+}
+
+/// Construct an isolated request-scoped schema.
+fn schema(calls: Arc<AtomicUsize>) -> Schema<Query, EmptyMutation, EmptySubscription> {
+ Schema::build(Query, EmptyMutation, EmptySubscription)
+ .data(entity_properties_loader(
+ MacroUserIdStr::parse_from_str("macro|[email protected]").expect("valid user"),
+ TestReader(calls),
+ ))
+ .finish()
+}
+
+#[tokio::test]
+async fn definitions_do_not_read_unselected_options() {
+ let calls = Arc::new(AtomicUsize::new(0));
+ let response = schema(calls.clone())
+ .execute("{ definitions { id displayName owner { scope principalId } } }")
+ .await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().expect("JSON result");
+ assert_eq!(data["definitions"][0]["id"], Uuid::from_u128(1).to_string());
+ assert_eq!(data["definitions"][0]["owner"]["scope"], "SYSTEM");
+ assert!(data["definitions"][0]["owner"]["principalId"].is_null());
+ assert_eq!(calls.load(Ordering::Relaxed), 0);
+}
+
+#[tokio::test]
+async fn selected_options_have_distinct_global_identity_and_typed_values() {
+ let response = schema(Arc::default()).execute("{ definitions { id options { id propertyDefinitionId value { __typename ... on GraphqlStringPropertyOptionValue { value } } } } }").await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().expect("JSON result");
+ let option = &data["definitions"][0]["options"][0];
+ assert_eq!(option["id"], Uuid::from_u128(2).to_string());
+ assert_eq!(
+ option["propertyDefinitionId"],
+ Uuid::from_u128(1).to_string()
+ );
+ assert_eq!(
+ option["value"]["__typename"],
+ "GraphqlStringPropertyOptionValue"
+ );
+ assert_eq!(option["value"]["value"], "In Progress");
+}
+
+#[tokio::test]
+async fn invalid_option_reference_is_rejected_before_reading() {
+ let calls = Arc::new(AtomicUsize::new(0));
+ let response = schema(calls.clone())
+ .execute("{ options(definitionId: \"not-a-uuid\") { id } }")
+ .await;
+ assert_eq!(response.errors.len(), 1);
+ assert_eq!(calls.load(Ordering::Relaxed), 0);
+}
+
+#[tokio::test]
+async fn invisible_definition_error_is_not_returned_as_an_empty_option_list() {
+ let response = schema(Arc::default())
+ .execute(format!(
+ "{{ options(definitionId: \"{}\") {{ id }} }}",
+ Uuid::from_u128(3)
+ ))
+ .await;
+ assert_eq!(response.errors.len(), 1);
+ assert!(
+ response.errors[0]
+ .message
+ .contains("definition is not visible")
+ );
+}
+
+#[tokio::test]
+async fn schema_only_reader_fails_closed_if_executed() {
+ let user = MacroUserIdStr::parse_from_str("macro|[email protected]").expect("valid user");
+ assert!(
+ NoOpEntityPropertyReader
+ .get_definitions(&user, GraphqlPropertyDefinitionScope::All, None)
+ .await
+ .is_err()
+ );
+ assert!(
+ NoOpEntityPropertyReader
+ .get_options(&user, &[Uuid::from_u128(1)])
+ .await
+ .is_err()
+ );
+}
+
+#[tokio::test]
+async fn concurrent_option_edges_share_one_batch_and_keep_empty_lists() {
+ let calls = Arc::new(AtomicUsize::new(0));
+ let response = schema(calls.clone()).execute(format!(
+ "{{ first: options(definitionId: \"{}\") {{ id }} empty: options(definitionId: \"{}\") {{ id }} }}",
+ Uuid::from_u128(1), Uuid::from_u128(4),
+ )).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ assert_eq!(data["first"][0]["id"], Uuid::from_u128(2).to_string());
+ assert!(data["empty"].as_array().unwrap().is_empty());
+ assert_eq!(calls.load(Ordering::Relaxed), 1);
+}
diff --git a/crates/graphql_properties/src/lib.rs b/crates/graphql_properties/src/lib.rs
index c5b5a54ee7..6864177e90 100644
--- a/crates/graphql_properties/src/lib.rs
+++ b/crates/graphql_properties/src/lib.rs
@@ -3,6 +3,8 @@
#![deny(missing_docs)]
#![deny(clippy::missing_docs_in_private_items)]
+/// Shared property definitions and selectable options.
+mod definitions;
/// DataLoader implementations for entity property edges.
mod loaders;
/// GraphQL mutations for assigning entity properties.
@@ -10,6 +12,12 @@ mod mutations;
/// GraphQL property objects, values, and edge resolver.
mod objects;
+pub use definitions::{
+ GraphqlNumberPropertyOptionValue, GraphqlPropertyDefinition, GraphqlPropertyDefinitionOwner,
+ GraphqlPropertyDefinitionScope, GraphqlPropertyOption, GraphqlPropertyOptionValue,
+ GraphqlPropertyOwnerScope, GraphqlStringPropertyOptionValue, load_property_definitions,
+ load_property_options,
+};
pub use graphql_common::{
GraphqlPropertiesBinaryExpr, GraphqlPropertiesExpr, GraphqlPropertyEntityType,
};
diff --git a/crates/graphql_properties/src/loaders.rs b/crates/graphql_properties/src/loaders.rs
index 24ec7f43e3..e285d3093b 100644
--- a/crates/graphql_properties/src/loaders.rs
+++ b/crates/graphql_properties/src/loaders.rs
@@ -1,11 +1,17 @@
use std::{collections::HashMap, sync::Arc};
use async_graphql::dataloader::{DataLoader, Loader};
-use entity_access::domain::models::ViewAccessLevel;
+use entity_access::domain::models::{EntityAccessReceipt, EntityPermission, ViewAccessLevel};
use entity_access::domain::ports::EntityAccessService;
use macro_user_id::user_id::MacroUserIdStr;
use models_properties::service::entity_property_with_definition::EntityPropertyWithDefinition;
+use models_properties::service::{
+ property_definition::PropertyDefinition, property_option::PropertyOption,
+};
use rootcause::markers::{Cloneable, Dynamic};
+use uuid::Uuid;
+
+use crate::definitions::GraphqlPropertyDefinitionScope;
/// Whether the canonical entity type supports property targets.
fn is_property_target(entity_type: model_entity::EntityType) -> bool {
@@ -19,12 +25,28 @@ fn is_property_target(entity_type: model_entity::EntityType) -> bool {
| EntityType::Chat
| EntityType::Channel
| EntityType::Project
+ | EntityType::Initiative
| EntityType::User
)
}
/// Reader used by GraphQL property edges.
pub trait EntityPropertyReader: Send + Sync + 'static {
+ /// List definitions visible to the authenticated caller in the requested scope.
+ fn get_definitions(
+ &self,
+ user_id: &MacroUserIdStr<'static>,
+ scope: GraphqlPropertyDefinitionScope,
+ for_entity_type: Option<models_properties::EntityType>,
+ ) -> impl Future<Output = Result<Vec<PropertyDefinition>, rootcause::Report>> + Send;
+
+ /// Read options after the properties service verifies definition visibility.
+ fn get_options(
+ &self,
+ user_id: &MacroUserIdStr<'static>,
+ property_definition_ids: &[Uuid],
+ ) -> impl Future<Output = Result<HashMap<Uuid, Vec<PropertyOption>>, rootcause::Report>> + Send;
+
/// Load properties for the requested entity keys on behalf of the given
/// user. Entities the user cannot view yield an empty property list.
fn get_properties(
@@ -44,6 +66,23 @@ pub trait EntityPropertyReader: Send + Sync + 'static {
pub struct NoOpEntityPropertyReader;
impl EntityPropertyReader for NoOpEntityPropertyReader {
+ async fn get_definitions(
+ &self,
+ _user_id: &MacroUserIdStr<'static>,
+ _scope: GraphqlPropertyDefinitionScope,
+ _for_entity_type: Option<models_properties::EntityType>,
+ ) -> Result<Vec<PropertyDefinition>, rootcause::Report> {
+ Err(rootcause::report!("property reader is not configured"))
+ }
+
+ async fn get_options(
+ &self,
+ _user_id: &MacroUserIdStr<'static>,
+ _property_definition_ids: &[Uuid],
+ ) -> Result<HashMap<Uuid, Vec<PropertyOption>>, rootcause::Report> {
+ Err(rootcause::report!("property reader is not configured"))
+ }
+
async fn get_properties(
&self,
_user_id: &MacroUserIdStr<'static>,
@@ -76,11 +115,76 @@ impl<P, A> PropertiesEntityPropertyReader<P, A> {
}
}
+impl<P, A: EntityAccessService> PropertiesEntityPropertyReader<P, A> {
+ /// Mint membership proof from the canonical access service for owner-scoped reads.
+ async fn caller_team_receipt(
+ &self,
+ user_id: &MacroUserIdStr<'static>,
+ ) -> Result<Option<properties::domain::service::TeamReceipt>, rootcause::Report> {
+ let Some(team) = self
+ .entity_access_service
+ .get_user_team(user_id)
+ .await
+ .map_err(|err| rootcause::report!(err))?
+ else {
+ return Ok(None);
+ };
+ Ok(EntityAccessReceipt::try_new_authenticated_user(
+ user_id.clone(),
+ entity_access::domain::models::Entity {
+ entity_id: team.team_id.to_string(),
+ entity_type: model_entity::EntityType::Team,
+ },
+ EntityPermission::TeamRole { role: team.role },
+ )
+ .map(Some)
+ .map_err(|err| rootcause::report!(err))?)
+ }
+}
+
impl<P, A> EntityPropertyReader for PropertiesEntityPropertyReader<P, A>
where
P: properties::PropertiesService,
A: EntityAccessService,
{
+ async fn get_definitions(
+ &self,
+ user_id: &MacroUserIdStr<'static>,
+ scope: GraphqlPropertyDefinitionScope,
+ for_entity_type: Option<models_properties::EntityType>,
+ ) -> Result<Vec<PropertyDefinition>, rootcause::Report> {
+ let team = match scope {
+ GraphqlPropertyDefinitionScope::Team | GraphqlPropertyDefinitionScope::All => {
+ self.caller_team_receipt(user_id).await?
+ }
+ GraphqlPropertyDefinitionScope::User | GraphqlPropertyDefinitionScope::System => None,
+ };
+ let (user, include_system) = match scope {
+ GraphqlPropertyDefinitionScope::User => (Some(user_id), false),
+ GraphqlPropertyDefinitionScope::Team => (None, false),
+ GraphqlPropertyDefinitionScope::System => (None, true),
+ GraphqlPropertyDefinitionScope::All => (Some(user_id), true),
+ };
+ Ok(self
+ .properties_service
+ .list_property_definitions(team.as_ref(), user, include_system, for_entity_type)
+ .await
+ .map_err(|err| rootcause::report!(err))?)
+ }
+
+ async fn get_options(
+ &self,
+ user_id: &MacroUserIdStr<'static>,
+ property_definition_ids: &[Uuid],
+ ) -> Result<HashMap<Uuid, Vec<PropertyOption>>, rootcause::Report> {
+ let team = self.caller_team_receipt(user_id).await?;
+ Ok(self
+ .properties_service
+ .get_property_options_batch(property_definition_ids, user_id, team.as_ref())
+ .await
+ .map_err(|err| rootcause::report!(err))?)
+ }
+
async fn get_properties(
&self,
user_id: &MacroUserIdStr<'static>,
@@ -167,6 +271,31 @@ impl<R> EntityPropertiesLoader<R> {
}
}
+impl<R: EntityPropertyReader> EntityPropertiesLoader<R> {
+ /// Load definitions using the same authenticated identity as property edges.
+ pub(crate) async fn definitions(
+ &self,
+ scope: GraphqlPropertyDefinitionScope,
+ for_entity_type: Option<models_properties::EntityType>,
+ ) -> Result<Vec<PropertyDefinition>, rootcause::Report> {
+ self.reader
+ .get_definitions(&self.user_id, scope, for_entity_type)
+ .await
+ }
+}
+
+impl<R: EntityPropertyReader> Loader<Uuid> for EntityPropertiesLoader<R> {
+ type Value = Vec<PropertyOption>;
+ type Error = rootcause::Report<Dynamic, Cloneable>;
+
+ async fn load(&self, keys: &[Uuid]) -> Result<HashMap<Uuid, Self::Value>, Self::Error> {
+ self.reader
+ .get_options(&self.user_id, keys)
+ .await
+ .map_err(|error| error.into_cloneable())
+ }
+}
+
impl<R> Loader<model_entity::OwnedEntity> for EntityPropertiesLoader<R>
where
R: EntityPropertyReader,
diff --git a/crates/graphql_properties/src/mutations.rs b/crates/graphql_properties/src/mutations.rs
index 9b4a711d5b..329ce6787c 100644
--- a/crates/graphql_properties/src/mutations.rs
+++ b/crates/graphql_properties/src/mutations.rs
@@ -1,7 +1,7 @@
use async_graphql::{Context, ID, Object};
use entity_access::domain::models::{EditAccessLevel, ViewAccessLevel};
use entity_access::domain::ports::EntityAccessService;
-use graphql_common::{GraphqlPropertyEntityType, parse_id};
+use graphql_common::{GraphqlCacheDeletion, GraphqlPropertyEntityType, parse_id};
use macro_user_id::user_id::MacroUserIdStr;
use models_properties::api::requests::SetPropertyValue;
use models_properties::service::entity_property_with_definition::EntityPropertyWithDefinition;
@@ -13,6 +13,9 @@ use uuid::Uuid;
use crate::objects::GraphqlProperty;
+#[cfg(test)]
+mod delete_test;
+
/// Mutation root for entity property writes.
#[derive(Default)]
pub struct PropertiesMutationRoot<T>(PhantomData<T>);
@@ -37,6 +40,14 @@ pub struct EntityPropertyOptionDelta {
/// GraphQL boundary for setting an entity property.
pub trait EntityPropertyWriter: Send + Sync + 'static {
+ /// Delete one property assignment after checking edit access to its entity.
+ fn delete_entity_property(
+ &self,
+ entity_type: model_entity::EntityType,
+ entity_id: String,
+ entity_property_id: Uuid,
+ ) -> impl Future<Output = Result<(), rootcause::Report>> + Send;
+
/// Set or attach one property on an entity.
fn set_entity_property(
&self,
@@ -64,6 +75,15 @@ pub trait EntityPropertyWriter: Send + Sync + 'static {
pub struct NoOpEntityPropertyWriter;
impl EntityPropertyWriter for NoOpEntityPropertyWriter {
+ async fn delete_entity_property(
+ &self,
+ _entity_type: model_entity::EntityType,
+ _entity_id: String,
+ _entity_property_id: Uuid,
+ ) -> Result<(), rootcause::Report> {
+ Err(rootcause::report!("property writer is not configured"))
+ }
+
async fn set_entity_property(
&self,
_entity_type: model_entity::EntityType,
@@ -114,6 +134,29 @@ where
P: PropertiesService,
A: EntityAccessService,
{
+ async fn delete_entity_property(
+ &self,
+ entity_type: model_entity::EntityType,
+ entity_id: String,
+ entity_property_id: Uuid,
+ ) -> Result<(), rootcause::Report> {
+ let access = self
+ .entity_access_service
+ .generate_entity_access_receipt::<EditAccessLevel>(
+ &self.user_id,
+ None,
+ &entity_id,
+ entity_type,
+ )
+ .await
+ .map_err(|err| rootcause::report!(err))?;
+ Ok(self
+ .properties_service
+ .delete_entity_property(&access, entity_property_id)
+ .await
+ .map_err(|err| rootcause::report!(err))?)
+ }
+
async fn set_entity_property(
&self,
entity_type: model_entity::EntityType,
@@ -210,7 +253,9 @@ pub enum GraphqlPropertyTargetEntityType {
Company,
/// Document target, including tasks and snippets.
Document,
- /// Project target.
+ /// Initiative target, displayed as a Project in the application.
+ Initiative,
+ /// Folder project target.
Project,
/// Email thread target.
Thread,
@@ -227,6 +272,7 @@ impl GraphqlPropertyTargetEntityType {
Self::Chat => model_entity::EntityType::Chat,
Self::Company => model_entity::EntityType::CrmCompany,
Self::Document => model_entity::EntityType::Document,
+ Self::Initiative => model_entity::EntityType::Initiative,
Self::Project => model_entity::EntityType::Project,
Self::Thread => model_entity::EntityType::EmailThread,
Self::User => model_entity::EntityType::User,
@@ -384,6 +430,26 @@ impl<T> PropertiesMutationRoot<T>
where
T: EntityPropertyWriter,
{
+ /// Remove a property assignment and identify its normalized cache record.
+ async fn delete_entity_property(
+ &self,
+ ctx: &Context<'_>,
+ entity_type: GraphqlPropertyTargetEntityType,
+ entity_id: String,
+ entity_property_id: ID,
+ ) -> async_graphql::Result<GraphqlCacheDeletion> {
+ let writer = ctx.data::<T>()?;
+ let assignment_id = parse_id(entity_property_id.clone(), "entityPropertyId")?;
+ writer
+ .delete_entity_property(entity_type.into_model(), entity_id, assignment_id)
+ .await
+ .map_err(|err| async_graphql::Error::new(err.to_string()))?;
+ Ok(GraphqlCacheDeletion::new(
+ "GraphqlProperty",
+ entity_property_id,
+ ))
+ }
+
/// Set or attach one property on an entity.
async fn set_entity_property(
&self,
@@ -476,6 +542,15 @@ mod tests {
}
impl EntityPropertyWriter for CapturingWriter {
+ async fn delete_entity_property(
+ &self,
+ _entity_type: model_entity::EntityType,
+ _entity_id: String,
+ _entity_property_id: Uuid,
+ ) -> Result<(), rootcause::Report> {
+ Ok(())
+ }
+
async fn set_entity_property(
&self,
entity_type: model_entity::EntityType,
diff --git a/crates/graphql_properties/src/mutations/delete_test.rs b/crates/graphql_properties/src/mutations/delete_test.rs
new file mode 100644
index 0000000000..26c477c742
--- /dev/null
+++ b/crates/graphql_properties/src/mutations/delete_test.rs
@@ -0,0 +1,90 @@
+//! Assignment deletion preserves the normalized cache identity and domain errors.
+
+use async_graphql::{EmptySubscription, Schema};
+
+use super::*;
+
+/// Minimal query root needed by the mutation schema.
+struct Query;
+
+#[Object]
+impl Query {
+ /// Whether the fixture schema is available.
+ async fn ready(&self) -> bool {
+ true
+ }
+}
+
+/// Writer accepting only the exact authorized fixture assignment.
+struct DeleteWriter;
+
+impl EntityPropertyWriter for DeleteWriter {
+ async fn delete_entity_property(
+ &self,
+ entity_type: model_entity::EntityType,
+ entity_id: String,
+ entity_property_id: Uuid,
+ ) -> Result<(), rootcause::Report> {
+ assert_eq!(entity_type, model_entity::EntityType::Initiative);
+ assert_eq!(entity_id, "initiative-1");
+ if entity_property_id != Uuid::from_u128(1) {
+ return Err(rootcause::report!("required property cannot be deleted"));
+ }
+ Ok(())
+ }
+
+ async fn set_entity_property(
+ &self,
+ _entity_type: model_entity::EntityType,
+ _entity_id: String,
+ _property_definition_id: Uuid,
+ _value: Option<SetPropertyValue>,
+ ) -> Result<EntityPropertyWithDefinition, rootcause::Report> {
+ Err(rootcause::report!("unexpected assignment write"))
+ }
+
+ async fn update_entity_property_options(
+ &self,
+ _entity_type: model_entity::EntityType,
+ _entity_id: String,
+ _updates: Vec<EntityPropertyOptionDelta>,
+ ) -> Result<Vec<EntityPropertyWithDefinition>, rootcause::Report> {
+ Err(rootcause::report!("unexpected option write"))
+ }
+}
+
+#[tokio::test]
+async fn deletion_marks_the_assignment_record_and_preserves_rejections() {
+ let schema = Schema::build(
+ Query,
+ PropertiesMutationRoot::<DeleteWriter>::new(),
+ EmptySubscription,
+ )
+ .data(DeleteWriter)
+ .finish();
+ let mutation = |id: Uuid| {
+ format!(
+ "mutation {{ deleteEntityProperty(entityType: INITIATIVE, entityId: \"initiative-1\", entityPropertyId: \"{id}\") {{ graphqlTypeName entityId }} }}"
+ )
+ };
+ let response = schema.execute(mutation(Uuid::from_u128(1))).await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ assert_eq!(
+ response.data,
+ async_graphql::value!({
+ "deleteEntityProperty": {
+ "graphqlTypeName": "GraphqlProperty",
+ "entityId": Uuid::from_u128(1).to_string(),
+ }
+ })
+ );
+ let rejected = schema.execute(mutation(Uuid::from_u128(2))).await;
+ assert_eq!(rejected.errors.len(), 1);
+ assert!(rejected.errors[0].message.contains("required property"));
+ assert!(matches!(rejected.data, async_graphql::Value::Null));
+
+ let malformed = schema.execute("mutation { deleteEntityProperty(entityType: INITIATIVE, entityId: \"initiative-1\", entityPropertyId: \"not-a-uuid\") { graphqlTypeName entityId } }").await;
+ assert_eq!(malformed.errors.len(), 1);
+ assert!(malformed.errors[0].message.contains("entityPropertyId"));
+ assert!(matches!(malformed.data, async_graphql::Value::Null));
+}
diff --git a/crates/graphql_soup/src/lib.rs b/crates/graphql_soup/src/lib.rs
index 23b289860b..65b5cced5e 100644
--- a/crates/graphql_soup/src/lib.rs
+++ b/crates/graphql_soup/src/lib.rs
@@ -30,8 +30,8 @@ pub use objects::{
GraphqlSoupBin, GraphqlSoupCall, GraphqlSoupChannel, GraphqlSoupChannelMessage,
GraphqlSoupChannelMessagePreview, GraphqlSoupChat, GraphqlSoupCrmCompany, GraphqlSoupDocument,
GraphqlSoupDocumentSubType, GraphqlSoupEmailThread, GraphqlSoupEntity,
- GraphqlSoupForeignEntity, GraphqlSoupProject, GroupedSoup, SoupCacheProjection,
- SoupEntityEdges, SoupPage, SoupPatch, SoupUpdated,
+ GraphqlSoupForeignEntity, GraphqlSoupInitiative, GraphqlSoupProject, GroupedSoup,
+ SoupCacheProjection, SoupEntityEdges, SoupPage, SoupPatch, SoupUpdated,
};
pub use resolvers::{
SoupEmailThreadMutationOutput, resolve_grouped_soup, resolve_soup, resolve_soup_email_thread,
diff --git a/crates/graphql_soup/src/loaders.rs b/crates/graphql_soup/src/loaders.rs
index 94721dde7a..bb4968030c 100644
--- a/crates/graphql_soup/src/loaders.rs
+++ b/crates/graphql_soup/src/loaders.rs
@@ -29,6 +29,7 @@ use item_filters::{
document::DocumentLiteral,
email::EmailLiteral,
foreign_entity::ForeignEntityLiteral,
+ initiative::InitiativeLiteral,
project::ProjectLiteral,
reminder::ReminderLiteral,
},
@@ -281,7 +282,7 @@ pub struct SoupItemDataLoader {
impl SoupItemDataLoader {
/// Construct a type-erased DataLoader from a concrete loader implementation.
- fn new<S, I>(loader: SoupItemLoader<S, I>) -> Self
+ pub fn new<S, I>(loader: SoupItemLoader<S, I>) -> Self
where
S: SoupService,
I: SoupInboxReader,
@@ -336,6 +337,7 @@ fn entity_filter_ast(entities: &[Entity<'static>]) -> Result<EntityFilterAst, So
let mut documents = Vec::new();
let mut chats = Vec::new();
let mut projects = Vec::new();
+ let mut initiatives = Vec::new();
let mut email_threads = Vec::new();
let mut channels = Vec::new();
let mut channel_threads = Vec::new();
@@ -359,6 +361,7 @@ fn entity_filter_ast(entities: &[Entity<'static>]) -> Result<EntityFilterAst, So
EntityType::Document => documents.push(DocumentLiteral::Id(id)),
EntityType::Chat => chats.push(ChatLiteral::ChatId(id)),
EntityType::Project => projects.push(ProjectLiteral::ProjectIdSelf(id)),
+ EntityType::Initiative => initiatives.push(InitiativeLiteral::Id(id)),
EntityType::EmailThread => email_threads.push(EmailLiteral::ThreadId(id)),
EntityType::Channel => channels.push(ChannelLiteral::ChannelId(id)),
EntityType::ChannelMessage => {
@@ -375,8 +378,7 @@ fn entity_filter_ast(entities: &[Entity<'static>]) -> Result<EntityFilterAst, So
| EntityType::StaticFile
| EntityType::CrmContact
| EntityType::Skill
- | EntityType::ScheduledAction
- | EntityType::Initiative => {
+ | EntityType::ScheduledAction => {
return Err(rootcause::report!(
"entity type {} is not represented in Soup",
entity.entity_type
@@ -414,6 +416,7 @@ fn entity_filter_ast(entities: &[Entity<'static>]) -> Result<EntityFilterAst, So
)),
reminder_filter: Some(literal_tree(reminders, ReminderLiteral::Id(nil))),
agent_session_filter: Some(literal_tree(agent_sessions, AgentSessionLiteral::Id(nil))),
+ initiative_filter: Some(literal_tree(initiatives, InitiativeLiteral::Id(nil))),
properties_filter: None,
})
}
diff --git a/crates/graphql_soup/src/loaders/test.rs b/crates/graphql_soup/src/loaders/test.rs
index 35f2cc585b..38a239e6d8 100644
--- a/crates/graphql_soup/src/loaders/test.rs
+++ b/crates/graphql_soup/src/loaders/test.rs
@@ -527,3 +527,18 @@ fn encodes_requested_ids_and_disables_unrequested_entity_branches() {
HashSet::from([nil])
);
}
+
+#[test]
+fn initiative_hydration_targets_exact_ids_and_disables_unrequested_initiatives() {
+ let id = Uuid::from_u128(42);
+ let entities = vec![EntityType::Initiative.with_entity_string(id.to_string())];
+ let ast = entity_filter_ast(&entities).unwrap();
+ assert!(
+ matches!(ast.initiative_filter.as_deref(), Some(Expr::Literal(InitiativeLiteral::Id(actual))) if *actual == id)
+ );
+ let ast =
+ entity_filter_ast(&[EntityType::Document.with_entity_string(id.to_string())]).unwrap();
+ assert!(
+ matches!(ast.initiative_filter.as_deref(), Some(Expr::Literal(InitiativeLiteral::Id(actual))) if actual.is_nil())
+ );
+}
diff --git a/crates/graphql_soup/src/objects.rs b/crates/graphql_soup/src/objects.rs
index 526a3eaecf..325b759129 100644
--- a/crates/graphql_soup/src/objects.rs
+++ b/crates/graphql_soup/src/objects.rs
@@ -23,6 +23,7 @@ use models_soup::{
SoupLabelType, SoupMessageListVisibility,
},
foreign_entity::SoupForeignEntity,
+ initiative::SoupInitiative,
item::SoupItem,
project::SoupProject,
reminder::{SoupReminder, SoupReminderSchedule},
@@ -100,6 +101,12 @@ pub trait SoupEntityEdges: ObjectType + Clone + Send + Sync + 'static {
email_thread_id: Uuid,
) -> impl Future<Output = async_graphql::Result<Option<String>>> + Send;
+ /// Additional fields attached only to initiative entities.
+ type InitiativeEdges: ObjectType + Clone + Send + Sync + 'static;
+
+ /// Construct initiative-specific detail fields without loading them.
+ fn initiative_edges(initiative_id: Uuid) -> Self::InitiativeEdges;
+
/// Additional fields attached only to agent-session entities.
type AgentSessionEdges: ObjectType + Clone + Send + Sync + 'static;
@@ -269,6 +276,7 @@ impl<E: SoupEntityEdges> GraphqlSoupEntity<E> {
Self::Document(entity) => entity.2 = score,
Self::Chat(entity) => entity.2 = score,
Self::Project(entity) => entity.2 = score,
+ Self::Initiative(entity) => entity.2 = score,
Self::EmailThread(entity) => entity.2 = score,
Self::Channel(entity) => entity.2 = score,
Self::ChannelMessage(entity) => entity.2 = score,
@@ -289,6 +297,7 @@ impl<E: SoupEntityEdges> GraphqlSoupEntity<E> {
Self::Document(entity) => entity.3 = supplement,
Self::Chat(_)
| Self::Project(_)
+ | Self::Initiative(_)
| Self::EmailThread(_)
| Self::Channel(_)
| Self::ChannelMessage(_)
@@ -407,6 +416,8 @@ pub enum GraphqlSoupEntity<E: SoupEntityEdges> {
Chat(GraphqlSoupChat<E>),
/// Project entity.
Project(GraphqlSoupProject<E>),
+ /// Initiative entity, presented as a project in the frontend.
+ Initiative(GraphqlSoupInitiative<E>),
/// Email thread entity.
EmailThread(GraphqlSoupEmailThread<E>),
/// Channel entity.
@@ -439,6 +450,7 @@ where
GraphqlSoupEntityType::Document => GraphqlSoupDocument::<E>::type_name(),
GraphqlSoupEntityType::Chat => GraphqlSoupChat::<E>::type_name(),
GraphqlSoupEntityType::Project => GraphqlSoupProject::<E>::type_name(),
+ GraphqlSoupEntityType::Initiative => GraphqlSoupInitiative::<E>::type_name(),
GraphqlSoupEntityType::EmailThread => GraphqlSoupEmailThread::<E>::type_name(),
GraphqlSoupEntityType::Channel => GraphqlSoupChannel::<E>::type_name(),
GraphqlSoupEntityType::ChannelMessage => {
@@ -495,6 +507,12 @@ where
);
Self::Document(GraphqlSoupDocument(item, edges, None, None))
}
+ SoupItem::Initiative(item) => {
+ let edges = E::from_entity(
+ model_entity::EntityType::Initiative.with_entity_string(item.id.to_string()),
+ );
+ Self::Initiative(GraphqlSoupInitiative(item, edges, None))
+ }
SoupItem::Chat(item) => {
let edges = E::from_entity(
model_entity::EntityType::Chat.with_entity_string(item.id.to_string()),
@@ -955,6 +973,68 @@ where
}
}
+/// GraphQL initiative entity, presented as a project in the frontend.
+pub struct GraphqlSoupInitiative<E: SoupEntityEdges>(SoupInitiative<()>, E, Option<f64>);
+
+/// GraphQL representation of a Soup initiative.
+#[Object(name = "GraphqlSoupInitiative")]
+impl<E: SoupEntityEdges> GraphqlSoupInitiative<E> {
+ /// The canonical initiative identifier.
+ async fn id(&self) -> ID {
+ ID(self.0.id.to_string())
+ }
+
+ /// Canonical entity kind.
+ async fn entity_type(&self) -> GraphqlSoupEntityType {
+ GraphqlSoupEntityType::Initiative
+ }
+
+ /// Opaque cache projection metadata, unavailable for this entity variant.
+ async fn cache_projection(&self) -> Option<SoupCacheProjection> {
+ None
+ }
+
+ /// User-visible project name.
+ async fn display_name(&self) -> Option<String> {
+ Some(self.0.name.clone())
+ }
+
+ /// Common initiative metadata.
+ async fn metadata(&self) -> GraphqlEntityMetadata {
+ GraphqlEntityMetadata {
+ owner_id: Some(self.0.owner_id.principal_id()),
+ owner_type: Some(self.0.owner_id.owner_type().into()),
+ parent: None,
+ created_at: Some(self.0.created_at.to_rfc3339()),
+ updated_at: Some(self.0.updated_at.to_rfc3339()),
+ viewed_at: self.0.viewed_at.map(|ts| ts.to_rfc3339()),
+ deleted_at: None,
+ }
+ }
+
+ /// Document backing the project's description, when one exists.
+ async fn description_document_id(&self) -> Option<ID> {
+ self.0.description_document_id.map(|id| ID(id.to_string()))
+ }
+
+ /// Common entity edges, including properties and viewer permissions.
+ #[graphql(flatten)]
+ async fn edges(&self) -> E {
+ self.1.clone()
+ }
+
+ /// Initiative-specific details supplied by the composition crate.
+ #[graphql(flatten)]
+ async fn initiative_edges(&self) -> E::InitiativeEdges {
+ E::initiative_edges(self.0.id)
+ }
+
+ /// The viewer's frecency score for this entity, when loaded.
+ async fn frecency_score(&self) -> Option<f64> {
+ self.2
+ }
+}
+
/// GraphQL agent session entity.
pub struct GraphqlSoupAgentSession<E: SoupEntityEdges>(SoupAgentSession<()>, E, Option<f64>);
@@ -2515,6 +2595,7 @@ impl_common_interface_edges!(
GraphqlSoupDocument,
GraphqlSoupChat,
GraphqlSoupProject,
+ GraphqlSoupInitiative,
GraphqlSoupEmailThread,
GraphqlSoupChannel,
GraphqlSoupChannelMessage,
diff --git a/crates/graphql_soup_filter_input/src/lib.rs b/crates/graphql_soup_filter_input/src/lib.rs
index 26d226d4a6..17825490a9 100644
--- a/crates/graphql_soup_filter_input/src/lib.rs
+++ b/crates/graphql_soup_filter_input/src/lib.rs
@@ -30,6 +30,7 @@ use item_filters::{
document::DocumentLiteral,
email::{Email, EmailLiteral},
foreign_entity::ForeignEntityLiteral,
+ initiative::InitiativeLiteral,
project::ProjectLiteral,
properties::{EntityRefId, PropertiesLiteral, PropertyEntityType, PropertyMatchValue},
reminder::ReminderLiteral,
@@ -300,6 +301,8 @@ enum GraphqlPropertyEntityType {
Company,
/// Document entity.
Document,
+ /// Initiative entity.
+ Initiative,
/// Project entity.
Project,
/// Task entity.
@@ -325,6 +328,7 @@ impl TryFrom<GraphqlPropertyEntityType> for PropertyEntityType {
GraphqlPropertyEntityType::Task => Self::Task,
GraphqlPropertyEntityType::Thread => Self::Thread,
GraphqlPropertyEntityType::User => Self::User,
+ GraphqlPropertyEntityType::Initiative => Self::Initiative,
other @ GraphqlPropertyEntityType::CallRecord => return Err(other),
})
}
@@ -359,6 +363,8 @@ pub struct GraphqlEntityFilterAst {
reminder_filter: Option<GraphqlReminderExpr>,
/// The agent session filter to apply.
agent_session_filter: Option<GraphqlAgentSessionExpr>,
+ /// The initiative filter to apply. Initiatives are opt-in.
+ initiative_filter: Option<GraphqlInitiativeExpr>,
/// The properties filter to apply.
properties_filter: Option<GraphqlFilterPropertiesExpr>,
}
@@ -393,6 +399,7 @@ impl GraphqlEntityFilterAst {
reminder_filter: optional_tree(self.reminder_filter)?,
agent_session_filter: optional_tree(self.agent_session_filter)?,
properties_filter: optional_tree(self.properties_filter)?,
+ initiative_filter: optional_tree(self.initiative_filter)?,
})
}
}
@@ -1223,3 +1230,49 @@ impl IntoFilterExpr<ForeignEntityLiteral> for GraphqlForeignEntityLiteral {
Ok(Expr::val(literal))
}
}
+
+filter_expr_input!(
+ GraphqlInitiativeExpr,
+ GraphqlInitiativeBinaryExpr,
+ GraphqlInitiativeLiteral,
+ InitiativeLiteral,
+ "InitiativeFilterExpr"
+);
+
+/// GraphQL input for selecting initiatives through Soup.
+#[cfg_attr(feature = "server", derive(async_graphql::OneofObject))]
+#[derive(Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+enum GraphqlInitiativeLiteral {
+ /// Opt into initiatives; must be true. Omit the filter to exclude them.
+ Include(bool),
+ /// Match an initiative identifier.
+ Id(ID),
+ /// Match the owning principal.
+ Owner(String),
+ /// Match a case-insensitive substring of the name.
+ NameContains(String),
+ /// Match projects due before this RFC 3339 timestamp.
+ DueBefore(String),
+ /// Match projects due after this RFC 3339 timestamp.
+ DueAfter(String),
+}
+
+impl IntoFilterExpr<InitiativeLiteral> for GraphqlInitiativeLiteral {
+ fn into_expr(self) -> InputResult<Expr<InitiativeLiteral>> {
+ let literal = match self {
+ Self::Include(false) => {
+ return Err(InputError::new(
+ "initiative `include` must be true; omit the filter to exclude initiatives",
+ ));
+ }
+ Self::Include(true) => InitiativeLiteral::Include,
+ Self::Id(id) => InitiativeLiteral::Id(parse_id(id, "id")?),
+ Self::Owner(owner) => InitiativeLiteral::Owner(parse_owner(owner, "owner")?),
+ Self::NameContains(name) => InitiativeLiteral::NameContains(name),
+ Self::DueBefore(date) => InitiativeLiteral::DueBefore(GraphqlDateLiteral::parse(date)?),
+ Self::DueAfter(date) => InitiativeLiteral::DueAfter(GraphqlDateLiteral::parse(date)?),
+ };
+ Ok(Expr::val(literal))
+ }
+}
diff --git a/crates/graphql_soup_filter_input/src/test.rs b/crates/graphql_soup_filter_input/src/test.rs
index f330c65545..2e33812996 100644
--- a/crates/graphql_soup_filter_input/src/test.rs
+++ b/crates/graphql_soup_filter_input/src/test.rs
@@ -120,3 +120,60 @@ fn property_entity_type_conversion_rejects_unsupported_variants() {
};
assert!(literal.entity_type.is_none());
}
+
+#[test]
+fn initiative_filters_materialize_for_browser_and_server() {
+ let id = Uuid::from_u128(42);
+ for literal in [
+ json!({"include": true}),
+ json!({"id": id.to_string()}),
+ json!({"owner": "macro|[email protected]"}),
+ json!({"nameContains": "Launch"}),
+ json!({"dueBefore": "2026-10-01T00:00:00Z"}),
+ json!({"dueAfter": "2026-09-01T00:00:00Z"}),
+ ] {
+ let value = json!({"initiativeFilter": {"literal": literal}});
+ let ast = materialize_graphql_filter(value.clone()).unwrap();
+ let input: GraphqlEntityFilterAst = serde_json::from_value(value).unwrap();
+ assert!(ast.initiative_filter.is_some());
+ assert_eq!(
+ serde_json::to_value(ast).unwrap(),
+ serde_json::to_value(input.into_ast().unwrap()).unwrap()
+ );
+ }
+ for literal in [
+ json!({"include": false}),
+ json!({"id": "invalid"}),
+ json!({"dueBefore": "invalid"}),
+ ] {
+ assert!(
+ materialize_graphql_filter(json!({"initiativeFilter": {"literal": literal}})).is_err()
+ );
+ }
+ assert!(
+ materialize_graphql_filter(json!({}))
+ .unwrap()
+ .initiative_filter
+ .is_none()
+ );
+}
+
+#[test]
+fn initiative_property_filters_preserve_entity_scope() {
+ let ast = materialize_graphql_filter(json!({
+ "initiativeFilter": {"literal": {"include": true}},
+ "propertiesFilter": {"literal": {
+ "propertyDefinitionId": "00000001-0000-0000-0000-000000000002",
+ "entityType": "INITIATIVE",
+ "value": {"selectOption": "00000001-0000-0000-0002-000000000001"}
+ }}
+ }))
+ .unwrap();
+ assert!(matches!(
+ ast.properties_filter.as_deref(),
+ Some(Expr::Literal(PropertiesLiteral {
+ entity_type: Some(PropertyEntityType::Initiative),
+ ..
+ }))
+ ));
+}
diff --git a/crates/initiative/Cargo.toml b/crates/initiative/Cargo.toml
index 8593a4a4c0..42b8a167f5 100644
--- a/crates/initiative/Cargo.toml
+++ b/crates/initiative/Cargo.toml
@@ -15,6 +15,7 @@ inbound = [
"ports",
]
outbound = ["ports"]
+resources = ["outbound", "dep:properties", "dep:system_properties", "dep:models_properties"]
ports = ["dep:entity_access", "dep:tracing"]
postgres = [
"dep:sqlx",
@@ -22,11 +23,13 @@ postgres = [
"dep:share_permission_db_utils",
"dep:model-entity",
"dep:macro_uuid",
- "dep:serde_json",
"outbound",
]
[dependencies]
+properties = { path = "../properties", optional = true, default-features = false }
+system_properties = { path = "../system_properties", optional = true }
+models_properties = { path = "../models_properties", optional = true }
axum = { workspace = true, optional = true }
chrono = { workspace = true, features = ["serde"] }
entity_access = { path = "../entity_access", optional = true, default-features = false, features = ["ports"] }
@@ -39,7 +42,7 @@ model-error-response = { path = "../model-error-response", optional = true }
models_permissions = { path = "../models_permissions" }
rootcause = { workspace = true }
serde = { workspace = true }
-serde_json = { workspace = true, optional = true }
+serde_json = { workspace = true }
share_permission_db_utils = { path = "../share_permission_db_utils", optional = true }
sqlx = { workspace = true, optional = true }
thiserror = { workspace = true }
diff --git a/crates/initiative/src/domain.rs b/crates/initiative/src/domain.rs
index bd7275fb48..b04f303789 100644
--- a/crates/initiative/src/domain.rs
+++ b/crates/initiative/src/domain.rs
@@ -1,7 +1,12 @@
//! Domain layer for initiatives.
+#[cfg(feature = "ports")]
+pub mod assignees;
pub mod models;
#[cfg(feature = "ports")]
pub mod ports;
+pub mod reads;
+#[cfg(feature = "ports")]
+pub mod resources;
#[cfg(feature = "ports")]
pub mod service;
diff --git a/crates/initiative/src/domain/assignees.rs b/crates/initiative/src/domain/assignees.rs
new file mode 100644
index 0000000000..17a8be0fec
--- /dev/null
+++ b/crates/initiative/src/domain/assignees.rs
@@ -0,0 +1,46 @@
+//! Initiative-owned policy for assignee access grants.
+
+use super::{models::InitiativeError, ports::InitiativeRepo, service::initiative_id_from_receipt};
+use entity_access::domain::models::{EditAccessLevel, EntityAccessReceipt};
+use macro_user_id::user_id::MacroUserIdStr;
+use std::collections::HashSet;
+
+/// Minimal owning service for property compositions that grant assignee access.
+pub struct InitiativeAssignees<R>(R);
+
+impl<R> std::fmt::Debug for InitiativeAssignees<R> {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.write_str("InitiativeAssignees")
+ }
+}
+
+impl<R: InitiativeRepo> InitiativeAssignees<R> {
+ /// Compose with the initiative repository at the application root.
+ pub fn new(repo: R) -> Self {
+ Self(repo)
+ }
+
+ /// Add grants and non-owner collaborators on project and description. Existing
+ /// collaborators remain, and clearing an assignee does not revoke their access.
+ pub async fn grant(
+ &self,
+ receipt: &EntityAccessReceipt<EditAccessLevel>,
+ users: Vec<MacroUserIdStr<'static>>,
+ ) -> Result<(), InitiativeError> {
+ grant(&self.0, receipt, users).await
+ }
+}
+
+pub(super) async fn grant<R: InitiativeRepo>(
+ repo: &R,
+ receipt: &EntityAccessReceipt<EditAccessLevel>,
+ users: Vec<MacroUserIdStr<'static>>,
+) -> Result<(), InitiativeError> {
+ let id = initiative_id_from_receipt(receipt)?;
+ let mut seen = HashSet::new();
+ let users = users
+ .into_iter()
+ .filter(|id| seen.insert(id.clone()))
+ .collect();
+ repo.grant_assignees(id, users).await.map_err(Into::into)
+}
diff --git a/crates/initiative/src/domain/ports.rs b/crates/initiative/src/domain/ports.rs
index f9c13ba292..48a378c7b9 100644
--- a/crates/initiative/src/domain/ports.rs
+++ b/crates/initiative/src/domain/ports.rs
@@ -1,11 +1,16 @@
//! Ports (trait contracts) for the initiative domain.
+use super::reads::{
+ InitiativePage, InitiativePageRequest, InitiativePageRow, InitiativeTasksPage,
+ InitiativeTasksRequest, TaskInitiativeReferences, TaskInitiativeReferencesRequest,
+};
use entity_access::domain::models::{
EditAccessLevel, EntityAccessReceipt, OwnerAccessLevel, ViewAccessLevel,
};
use macro_user_id::user_id::MacroUserIdStr;
use models_permissions::share_permission::team_share::TeamShareCreation;
use models_permissions::share_permission::{SharePermissionV2, TeamLinkShareDefault};
+use std::collections::HashMap;
use crate::domain::models::{
AssignTasksResponse, AssignTasksResult, CreateInitiativeRepoArgs, CreateInitiativeRequest,
@@ -39,6 +44,12 @@ pub trait InitiativeRepo: Send + Sync + 'static {
/// The error type returned by repository operations.
type Err: Into<InitiativeError> + Send + std::fmt::Debug;
+ /// Read task membership in one batch. Callers authorize both ends before displaying it.
+ fn task_memberships(
+ &self,
+ task_ids: Vec<String>,
+ ) -> impl Future<Output = Result<HashMap<String, InitiativeId>, Self::Err>> + Send;
+
/// Persist a new initiative, its members, and initial share state, mirroring the member
/// and team grants onto `args.description_document_id` in the same transaction.
fn create(
@@ -103,6 +114,15 @@ pub trait InitiativeRepo: Send + Sync + 'static {
/// Clear any initiative association for a task. Already unassigned tasks succeed.
fn clear_task(&self, task_id: &str) -> impl Future<Output = Result<(), Self::Err>> + Send;
+ /// Grant assignees edit access to the initiative and description in one transaction,
+ /// recording non-owner recipients as collaborators without removing anyone or
+ /// downgrading existing grants. Clearing the property does not undo this share.
+ fn grant_assignees(
+ &self,
+ id: InitiativeId,
+ user_ids: Vec<MacroUserIdStr<'static>>,
+ ) -> impl Future<Output = Result<(), Self::Err>> + Send;
+
/// Delete the initiative and clean up its own rows in one transaction, returning the
/// description document id for the caller to purge afterwards.
fn delete(
@@ -113,6 +133,32 @@ pub trait InitiativeRepo: Send + Sync + 'static {
/// Inbound service port: the initiative API used by drivers (HTTP).
pub trait InitiativeService: Send + Sync + 'static {
+ /// Read canonical properties and visible task progress for one authorized initiative.
+ fn summary(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ ) -> impl Future<Output = Result<InitiativePageRow, InitiativeError>> + Send;
+
+ /// Filter, order and page the caller's discoverable initiatives.
+ fn page(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ request: InitiativePageRequest,
+ ) -> impl Future<Output = Result<InitiativePage, InitiativeError>> + Send;
+
+ /// Page visible tasks within an authorized initiative.
+ fn tasks_page(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ request: InitiativeTasksRequest,
+ ) -> impl Future<Output = Result<InitiativeTasksPage, InitiativeError>> + Send;
+
+ /// Resolve task chips without revealing inaccessible initiative metadata.
+ fn task_references(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ request: TaskInitiativeReferencesRequest,
+ ) -> impl Future<Output = Result<TaskInitiativeReferences, InitiativeError>> + Send;
/// Create an initiative owned by `user_id`.
fn create(
&self,
@@ -167,6 +213,14 @@ pub trait InitiativeService: Send + Sync + 'static {
task_receipt: EntityAccessReceipt<EditAccessLevel>,
) -> impl Future<Output = Result<(), InitiativeError>> + Send;
+ /// Share both project entities with assignees, adding non-owner collaborators.
+ /// Clearing an assignee does not revoke access or membership, matching task sharing.
+ fn grant_assignees(
+ &self,
+ receipt: EntityAccessReceipt<EditAccessLevel>,
+ user_ids: Vec<MacroUserIdStr<'static>>,
+ ) -> impl Future<Output = Result<(), InitiativeError>> + Send;
+
/// Delete the initiative the receipt already authorized as owner.
fn delete(
&self,
diff --git a/crates/initiative/src/domain/reads.rs b/crates/initiative/src/domain/reads.rs
new file mode 100644
index 0000000000..c8ef6b97ff
--- /dev/null
+++ b/crates/initiative/src/domain/reads.rs
@@ -0,0 +1,233 @@
+//! Project collection and task-reference read contracts.
+
+use chrono::{DateTime, Utc};
+use models_permissions::share_permission::access_level::AccessLevel;
+use serde::{Deserialize, Serialize};
+use uuid::Uuid;
+
+use super::models::{InitiativeDetail, InitiativeError, InitiativeId, InitiativeSummary};
+
+const DEFAULT_PAGE_SIZE: u16 = 50;
+const MAX_PAGE_SIZE: u16 = 100;
+pub(super) const MAX_CURSOR_LENGTH: usize = 2048;
+
+pub(super) fn page_size(limit: Option<u16>) -> Result<usize, InitiativeError> {
+ let size = limit.unwrap_or(DEFAULT_PAGE_SIZE);
+ if !(1..=MAX_PAGE_SIZE).contains(&size) {
+ return Err(InitiativeError::BadRequest(
+ "limit must be between 1 and 100".into(),
+ ));
+ }
+ Ok(usize::from(size))
+}
+
+/// Snapshot of canonical property values, never a second writable store.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct InitiativePropertySnapshot {
+ /// Status option id, or unset.
+ pub status: Option<Uuid>,
+ /// Priority option id, or unset.
+ pub priority: Option<Uuid>,
+ /// Assigned user ids, independent of sharing membership.
+ pub assignees: Vec<String>,
+ /// Due timestamp, or unset.
+ pub due_date: Option<DateTime<Utc>>,
+ /// Whether the canonical task status represents completion.
+ pub completed: bool,
+}
+
+/// Supported collection ordering. Every ordering uses id as its final tie breaker.
+#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub enum InitiativeSort {
+ /// Last update time.
+ #[default]
+ Updated,
+ /// Case-insensitive name.
+ Name,
+ /// Due date, with unset dates last.
+ Due,
+}
+
+/// Filters are applied before cursor pagination.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::IntoParams, utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct InitiativePageRequest {
+ /// Maximum rows, between one and one hundred; defaults to fifty.
+ pub limit: Option<u16>,
+ /// Opaque continuation returned by the previous page.
+ pub cursor: Option<String>,
+ /// Case-insensitive name substring.
+ pub query: Option<String>,
+ /// Required status option id.
+ pub status: Option<Uuid>,
+ /// Required priority option id.
+ pub priority: Option<Uuid>,
+ /// Required assignee user id.
+ pub assignee: Option<String>,
+ /// Inclusive due-date lower bound.
+ pub due_after: Option<DateTime<Utc>>,
+ /// Inclusive due-date upper bound.
+ pub due_before: Option<DateTime<Utc>>,
+ /// Sort key; defaults to updated time.
+ #[serde(default)]
+ pub sort: InitiativeSort,
+ /// Descending order; defaults to true for updated time.
+ pub descending: Option<bool>,
+}
+
+/// A project row with caller-specific permissions, properties and visible task progress.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct InitiativePageRow {
+ /// Existing initiative identity and timestamps.
+ #[serde(flatten)]
+ pub initiative: InitiativeSummary,
+ /// Verified effective access for the caller.
+ pub user_access_level: AccessLevel,
+ /// Canonical property values.
+ pub properties: InitiativePropertySnapshot,
+ /// Number of associated tasks the caller may view.
+ pub task_count: u32,
+ /// Number of visible tasks whose status is completed.
+ pub completed_task_count: u32,
+}
+
+/// One authorized project collection page.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct InitiativePage {
+ /// Rows in requested order.
+ pub initiatives: Vec<InitiativePageRow>,
+ /// Continuation, absent when exhausted.
+ pub next_cursor: Option<String>,
+}
+
+/// Task page inputs.
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::IntoParams, utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct InitiativeTasksRequest {
+ /// Maximum rows, one through one hundred.
+ pub limit: Option<u16>,
+ /// Last task id returned by the preceding page.
+ pub cursor: Option<String>,
+}
+
+/// Visible tasks with visibility applied before paging and counting.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct InitiativeTasksPage {
+ /// Visible task ids; hydrate through existing task reads.
+ pub task_ids: Vec<String>,
+ /// Continuation when another visible page exists.
+ pub next_cursor: Option<String>,
+ /// Total associated tasks visible to the caller.
+ pub total: u32,
+}
+
+impl InitiativeTasksRequest {
+ pub(crate) fn validate(&self) -> Result<usize, InitiativeError> {
+ let size = page_size(self.limit)?;
+ if self
+ .cursor
+ .as_ref()
+ .is_some_and(|cursor| cursor.len() > MAX_CURSOR_LENGTH)
+ {
+ return Err(InitiativeError::BadRequest("invalid cursor".into()));
+ }
+ Ok(size)
+ }
+}
+
+impl InitiativeDetail {
+ /// Page task IDs already filtered by `InitiativeService::get`, without another access scan.
+ pub fn task_page(
+ &self,
+ request: InitiativeTasksRequest,
+ ) -> Result<InitiativeTasksPage, InitiativeError> {
+ let size = request.validate()?;
+ let total = u32::try_from(self.task_ids.len()).unwrap_or(u32::MAX);
+ let mut ids = self.task_ids.clone();
+ ids.sort();
+ if let Some(cursor) = request.cursor {
+ ids.retain(|id| id > &cursor);
+ }
+ let has_more = ids.len() > size;
+ ids.truncate(size);
+ let next_cursor = has_more.then(|| ids.last().cloned()).flatten();
+ Ok(InitiativeTasksPage {
+ task_ids: ids,
+ next_cursor,
+ total,
+ })
+ }
+}
+
+/// Bounded batch of task ids to resolve.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct TaskInitiativeReferencesRequest {
+ /// At most one hundred distinct task ids.
+ pub task_ids: Vec<String>,
+}
+
+/// Minimal project display reference.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+pub struct InitiativeReference {
+ /// Project id.
+ pub id: InitiativeId,
+ /// Authorized project name.
+ pub name: String,
+}
+
+/// A task's project. An inaccessible project never exposes its id or name.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(
+ tag = "state",
+ rename_all = "camelCase",
+ rename_all_fields = "camelCase"
+)]
+pub enum TaskInitiativeReference {
+ /// The visible task has no project.
+ None {
+ /// Task id.
+ #[serde(rename = "taskId")]
+ task_id: String,
+ },
+ /// The task or its project is not visible to the caller.
+ Unavailable {
+ /// Requested task id, with no inaccessible metadata.
+ #[serde(rename = "taskId")]
+ task_id: String,
+ },
+ /// Both task and project are visible.
+ Visible {
+ /// Task id.
+ #[serde(rename = "taskId")]
+ task_id: String,
+ /// Authorized project reference.
+ initiative: InitiativeReference,
+ },
+}
+
+/// Task references in deduplicated request order.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+pub struct TaskInitiativeReferences {
+ /// Per-task visibility-aware references.
+ pub references: Vec<TaskInitiativeReference>,
+}
+
+#[cfg(all(test, feature = "inbound"))]
+mod test;
diff --git a/crates/initiative/src/domain/reads/test.rs b/crates/initiative/src/domain/reads/test.rs
new file mode 100644
index 0000000000..887c68cdd4
--- /dev/null
+++ b/crates/initiative/src/domain/reads/test.rs
@@ -0,0 +1,15 @@
+use super::TaskInitiativeReference;
+
+#[test]
+fn task_reference_schema_matches_runtime_field_names() {
+ let serialized = serde_json::to_value(TaskInitiativeReference::None {
+ task_id: "task".into(),
+ })
+ .unwrap();
+ assert_eq!(serialized["taskId"], "task");
+ let schema =
+ serde_json::to_value(<TaskInitiativeReference as utoipa::PartialSchema>::schema()).unwrap();
+ let schema = schema.to_string();
+ assert!(schema.contains("taskId"));
+ assert!(!schema.contains("task_id"));
+}
diff --git a/crates/initiative/src/domain/resources.rs b/crates/initiative/src/domain/resources.rs
new file mode 100644
index 0000000000..9f64152337
--- /dev/null
+++ b/crates/initiative/src/domain/resources.rs
@@ -0,0 +1,37 @@
+//! Owning-domain capabilities used to enrich and clean up initiatives.
+
+use std::{collections::HashMap, future::Future, pin::Pin};
+
+use entity_access::domain::models::{
+ EditAccessLevel, Entity, EntityAccessAuth, EntityAccessReceipt, ViewAccessLevel,
+};
+
+use super::{
+ models::{InitiativeError, InitiativeId},
+ reads::InitiativePropertySnapshot,
+};
+
+/// Boxed asynchronous operation on an initiative dependency.
+pub type ResourceFuture<'a, T> =
+ Pin<Box<dyn Future<Output = Result<T, InitiativeError>> + Send + 'a>>;
+
+/// Access and property operations supplied by the composition root.
+/// Implementations delegate to the owning services, never their persistence adapters.
+pub trait InitiativeResources: std::fmt::Debug + Send + Sync + 'static {
+ /// Initialize the four canonical task-style properties without clearing existing values.
+ fn initialize(&self, id: InitiativeId) -> ResourceFuture<'_, ()>;
+ /// Clean up properties after the initiative is deleted using its already-verified capability.
+ fn purge(&self, receipt: EntityAccessReceipt<EditAccessLevel>) -> ResourceFuture<'_, ()>;
+ /// Return a view capability for a related entity under the same user/bot scope.
+ /// Missing and inaccessible entities return `None`; infrastructure failures remain errors.
+ fn view(
+ &self,
+ auth: EntityAccessAuth,
+ entity: Entity,
+ ) -> ResourceFuture<'_, Option<EntityAccessReceipt<ViewAccessLevel>>>;
+ /// Read canonical property snapshots in a batch for verified entities.
+ fn properties(
+ &self,
+ receipts: Vec<EntityAccessReceipt<ViewAccessLevel>>,
+ ) -> ResourceFuture<'_, HashMap<String, InitiativePropertySnapshot>>;
+}
diff --git a/crates/initiative/src/domain/service.rs b/crates/initiative/src/domain/service.rs
index ec8bcc9ca1..e3b14d5eef 100644
--- a/crates/initiative/src/domain/service.rs
+++ b/crates/initiative/src/domain/service.rs
@@ -5,6 +5,9 @@ mod test;
use std::collections::{HashMap, HashSet};
use std::str::FromStr;
+use std::sync::Arc;
+
+mod reads;
use entity_access::domain::models::{
AccessLevel, EditAccessLevel, EntityAccessAuth, EntityAccessReceipt, EntityPermission,
@@ -26,6 +29,7 @@ use crate::domain::models::{
UpdateInitiativeRepoArgs, UpdateInitiativeRequest,
};
use crate::domain::ports::{InitiativeDescriptionDocuments, InitiativeRepo, InitiativeService};
+use crate::domain::resources::InitiativeResources;
/// Concrete initiative service backed by an [`InitiativeRepo`] and the description document
/// port.
@@ -33,6 +37,7 @@ use crate::domain::ports::{InitiativeDescriptionDocuments, InitiativeRepo, Initi
pub struct InitiativeServiceImpl<R, D> {
repo: R,
description_documents: D,
+ resources: Arc<dyn InitiativeResources>,
}
impl<R, D> std::fmt::Debug for InitiativeServiceImpl<R, D> {
@@ -47,10 +52,11 @@ where
D: InitiativeDescriptionDocuments,
{
/// Create an initiative service backed by the provided repository and document port.
- pub fn new(repo: R, description_documents: D) -> Self {
+ pub fn new(repo: R, description_documents: D, resources: Arc<dyn InitiativeResources>) -> Self {
Self {
repo,
description_documents,
+ resources,
}
}
@@ -100,6 +106,36 @@ where
R::Err: Into<InitiativeError>,
D: InitiativeDescriptionDocuments,
{
+ async fn summary(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ ) -> Result<crate::domain::reads::InitiativePageRow, InitiativeError> {
+ self.read_summary(receipt).await
+ }
+
+ async fn page(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ request: crate::domain::reads::InitiativePageRequest,
+ ) -> Result<crate::domain::reads::InitiativePage, InitiativeError> {
+ self.read_page(user_id, request).await
+ }
+
+ async fn tasks_page(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ request: crate::domain::reads::InitiativeTasksRequest,
+ ) -> Result<crate::domain::reads::InitiativeTasksPage, InitiativeError> {
+ self.read_tasks_page(receipt, request).await
+ }
+
+ async fn task_references(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ request: crate::domain::reads::TaskInitiativeReferencesRequest,
+ ) -> Result<crate::domain::reads::TaskInitiativeReferences, InitiativeError> {
+ self.read_task_references(user_id, request).await
+ }
/// Two commits with compensation. The documents side commits first. A failed
/// initiative write purges the document so nothing orphaned survives an `Err`.
#[tracing::instrument(err, skip_all)]
@@ -151,6 +187,14 @@ where
.await;
match created {
Ok(mut detail) => {
+ if let Err(error) = self.resources.initialize(id).await {
+ if self.repo.delete(id).await.inspect_err(|cleanup| {
+ tracing::error!(error=?cleanup, %id, "failed to compensate initiative initialization");
+ }).is_ok() {
+ let _ = self.description_documents.purge(description_document_id).await.inspect_err(|cleanup| tracing::error!(error=?cleanup, %id, "failed to compensate initiative initialization"));
+ }
+ return Err(error);
+ }
detail.user_access_level = AccessLevel::Owner;
Ok(detail)
@@ -198,6 +242,7 @@ where
.map_err(Into::into)?
.ok_or(InitiativeError::NotFound)?;
detail.user_access_level = receipt_access_level(&receipt)?;
+ detail.task_ids = self.visible_tasks(receipt.auth(), detail.task_ids).await?;
Ok(detail)
}
@@ -265,6 +310,7 @@ where
.map_err(Into::into)?;
detail.user_access_level = receipt_access_level(&receipt)?;
+ detail.task_ids = self.visible_tasks(receipt.auth(), detail.task_ids).await?;
Ok(detail)
}
@@ -336,6 +382,15 @@ where
.map_err(Into::into)
}
+ #[tracing::instrument(err, skip_all)]
+ async fn grant_assignees(
+ &self,
+ receipt: EntityAccessReceipt<EditAccessLevel>,
+ user_ids: Vec<MacroUserIdStr<'static>>,
+ ) -> Result<(), InitiativeError> {
+ super::assignees::grant(&self.repo, &receipt, user_ids).await
+ }
+
/// Initiative rows first, then the document. The FK's `ON DELETE RESTRICT`
/// would reject a document-first purge while the initiative still names it.
#[tracing::instrument(err, skip_all)]
@@ -345,16 +400,21 @@ where
) -> Result<(), InitiativeError> {
let id = initiative_id_from_receipt(&receipt)?;
let description_document_id = self.repo.delete(id).await.map_err(Into::into)?;
- self.description_documents
- .purge(description_document_id)
- .await
- .inspect_err(|_| {
- tracing::error!(
- %description_document_id,
- %id,
- "description document orphaned after initiative delete"
- );
- })
+
+ // Cleanup follows an authorized deletion and is not a fresh user edit.
+ let cleanup_receipt = EntityAccessReceipt::try_new(
+ EntityAccessAuth::Internal,
+ receipt.entity().clone(),
+ EntityPermission::AccessLevel {
+ access_level: AccessLevel::Owner,
+ },
+ )
+ .map_err(|_| InitiativeError::Unauthorized)?;
+ let properties_cleanup = self.resources.purge(cleanup_receipt).await;
+ let document_cleanup = self.description_documents.purge(description_document_id).await.inspect_err(|error| {
+ tracing::error!(?error, %description_document_id, %id, "description document orphaned after initiative delete");
+ });
+ properties_cleanup.and(document_cleanup)
}
}
diff --git a/crates/initiative/src/domain/service/reads.rs b/crates/initiative/src/domain/service/reads.rs
new file mode 100644
index 0000000000..a3e9819316
--- /dev/null
+++ b/crates/initiative/src/domain/service/reads.rs
@@ -0,0 +1,480 @@
+//! Read-use-case policy, pagination and visibility.
+
+use std::{cmp::Ordering, collections::HashMap};
+
+use chrono::{DateTime, Utc};
+use entity_access::domain::models::{
+ Entity, EntityAccessAuth, EntityAccessReceipt, EntityType, ViewAccessLevel,
+};
+use macro_user_id::{cowlike::CowLike, user_id::MacroUserIdStr};
+use serde::{Deserialize, Serialize};
+
+use super::{InitiativeServiceImpl, receipt_access_level};
+use crate::domain::{
+ models::{InitiativeError, InitiativeId, MAX_TASKS_PER_ASSIGN},
+ ports::{InitiativeDescriptionDocuments, InitiativeRepo, InitiativeService},
+ reads::{
+ InitiativePage, InitiativePageRequest, InitiativePageRow, InitiativeReference,
+ InitiativeSort, InitiativeTasksPage, InitiativeTasksRequest, MAX_CURSOR_LENGTH,
+ TaskInitiativeReference, TaskInitiativeReferences, TaskInitiativeReferencesRequest,
+ page_size as limit,
+ },
+};
+
+struct Position {
+ id: InitiativeId,
+ name: String,
+ updated_at: DateTime<Utc>,
+ due_date: Option<DateTime<Utc>>,
+}
+
+impl From<&InitiativePageRow> for Position {
+ fn from(row: &InitiativePageRow) -> Self {
+ Self {
+ id: row.initiative.id,
+ name: row.initiative.name.to_lowercase(),
+ updated_at: row.initiative.updated_at,
+ due_date: row.properties.due_date,
+ }
+ }
+}
+
+#[derive(Serialize, Deserialize)]
+struct Cursor {
+ sort: InitiativeSort,
+ descending: bool,
+ position: CursorPosition,
+}
+
+/// Keep continuation tokens bounded independently of Unicode name byte length.
+#[derive(Serialize, Deserialize)]
+#[serde(tag = "key", rename_all = "camelCase")]
+enum CursorPosition {
+ Updated {
+ id: InitiativeId,
+ updated_at: DateTime<Utc>,
+ },
+ Name {
+ id: InitiativeId,
+ updated_at: DateTime<Utc>,
+ },
+ Due {
+ id: InitiativeId,
+ due_date: Option<DateTime<Utc>>,
+ },
+}
+
+impl CursorPosition {
+ fn from_row(row: &InitiativePageRow, sort: InitiativeSort) -> Self {
+ let id = row.initiative.id;
+ match sort {
+ InitiativeSort::Updated => Self::Updated {
+ id,
+ updated_at: row.initiative.updated_at,
+ },
+ InitiativeSort::Name => Self::Name {
+ id,
+ updated_at: row.initiative.updated_at,
+ },
+ InitiativeSort::Due => Self::Due {
+ id,
+ due_date: row.properties.due_date,
+ },
+ }
+ }
+
+ fn resolve(
+ self,
+ sort: InitiativeSort,
+ rows: &[InitiativePageRow],
+ ) -> Result<Position, InitiativeError> {
+ match (self, sort) {
+ (Self::Updated { id, updated_at }, InitiativeSort::Updated) => Ok(Position {
+ id,
+ name: String::new(),
+ updated_at,
+ due_date: None,
+ }),
+ (Self::Due { id, due_date }, InitiativeSort::Due) => Ok(Position {
+ id,
+ name: String::new(),
+ updated_at: DateTime::UNIX_EPOCH,
+ due_date,
+ }),
+ (Self::Name { id, updated_at }, InitiativeSort::Name) => rows
+ .iter()
+ // A renamed anchor must not silently move the continuation point.
+ // Names have no byte bound, so keep a bounded row version instead
+ // of embedding their potentially unbounded sort key in the cursor.
+ .find(|row| row.initiative.id == id && row.initiative.updated_at == updated_at)
+ .map(Into::into)
+ .ok_or_else(|| {
+ InitiativeError::BadRequest(
+ "cursor anchor changed or is unavailable; restart pagination".into(),
+ )
+ }),
+ _ => Err(InitiativeError::BadRequest(
+ "cursor ordering differs from request".into(),
+ )),
+ }
+ }
+}
+
+fn order(left: &Position, right: &Position, sort: InitiativeSort, descending: bool) -> Ordering {
+ if sort == InitiativeSort::Due {
+ match (left.due_date, right.due_date) {
+ (None, Some(_)) => return Ordering::Greater,
+ (Some(_), None) => return Ordering::Less,
+ _ => (),
+ }
+ }
+ let order = match sort {
+ InitiativeSort::Updated => left.updated_at.cmp(&right.updated_at),
+ InitiativeSort::Name => left.name.cmp(&right.name),
+ InitiativeSort::Due => left.due_date.cmp(&right.due_date),
+ }
+ .then_with(|| left.id.as_uuid().cmp(&right.id.as_uuid()));
+ if descending { order.reverse() } else { order }
+}
+
+impl<R: InitiativeRepo, D: InitiativeDescriptionDocuments> InitiativeServiceImpl<R, D> {
+ pub(super) async fn read_summary(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ ) -> Result<InitiativePageRow, InitiativeError> {
+ let detail = self.get(receipt.clone()).await?;
+ let mut receipts = vec![receipt.clone()];
+ for task_id in &detail.task_ids {
+ if let Some(task_receipt) = self
+ .resources
+ .view(
+ receipt.auth().clone(),
+ Entity {
+ entity_id: task_id.clone(),
+ entity_type: EntityType::Document,
+ },
+ )
+ .await?
+ {
+ receipts.push(task_receipt);
+ }
+ }
+ let mut properties = self.resources.properties(receipts.clone()).await?;
+ let task_count = receipts.len().saturating_sub(1);
+ let completed_task_count = receipts
+ .iter()
+ .skip(1)
+ .filter(|task| {
+ properties
+ .get(&task.entity().entity_id)
+ .is_some_and(|value| value.completed)
+ })
+ .count();
+ Ok(InitiativePageRow {
+ initiative: crate::domain::models::InitiativeSummary {
+ id: detail.id,
+ name: detail.name,
+ description_document_id: detail.description_document_id,
+ updated_at: detail.updated_at,
+ },
+ user_access_level: detail.user_access_level,
+ properties: properties
+ .remove(&detail.id.to_string())
+ .unwrap_or_default(),
+ task_count: u32::try_from(task_count).unwrap_or(u32::MAX),
+ completed_task_count: u32::try_from(completed_task_count).unwrap_or(u32::MAX),
+ })
+ }
+
+ pub(super) async fn visible_tasks(
+ &self,
+ auth: &EntityAccessAuth,
+ ids: Vec<String>,
+ ) -> Result<Vec<String>, InitiativeError> {
+ let mut visible = Vec::new();
+ for id in ids {
+ if self
+ .resources
+ .view(
+ auth.clone(),
+ Entity {
+ entity_id: id.clone(),
+ entity_type: EntityType::Document,
+ },
+ )
+ .await?
+ .is_some()
+ {
+ visible.push(id);
+ }
+ }
+ Ok(visible)
+ }
+
+ pub(super) async fn read_page(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ request: InitiativePageRequest,
+ ) -> Result<InitiativePage, InitiativeError> {
+ let size = limit(request.limit)?;
+ if request
+ .query
+ .as_ref()
+ .is_some_and(|query| query.len() > 400)
+ {
+ return Err(InitiativeError::BadRequest("search query too long".into()));
+ }
+ if matches!((request.due_after, request.due_before), (Some(after), Some(before)) if after > before)
+ {
+ return Err(InitiativeError::BadRequest(
+ "dueAfter must precede dueBefore".into(),
+ ));
+ }
+ let descending = request
+ .descending
+ .unwrap_or(request.sort == InitiativeSort::Updated);
+ let cursor: Option<Cursor> = request
+ .cursor
+ .as_ref()
+ .map(|cursor| {
+ if cursor.len() > MAX_CURSOR_LENGTH {
+ return Err(InitiativeError::BadRequest("invalid cursor".into()));
+ }
+ serde_json::from_str(cursor)
+ .map_err(|_| InitiativeError::BadRequest("invalid cursor".into()))
+ })
+ .transpose()?;
+ if cursor
+ .as_ref()
+ .is_some_and(|cursor| cursor.sort != request.sort || cursor.descending != descending)
+ {
+ return Err(InitiativeError::BadRequest(
+ "cursor ordering differs from request".into(),
+ ));
+ }
+ let auth = EntityAccessAuth::Authenticated(user_id.clone().into_owned());
+ let query = request.query.as_deref().unwrap_or("").trim().to_lowercase();
+ let candidates = self
+ .repo
+ .list_accessible(&user_id.clone().into_owned())
+ .await
+ .map_err(Into::into)?;
+ let mut authorized = Vec::new();
+ for project in candidates.initiatives {
+ if !project.name.to_lowercase().contains(&query) {
+ continue;
+ }
+ if let Some(receipt) = self
+ .resources
+ .view(
+ auth.clone(),
+ Entity {
+ entity_id: project.id.to_string(),
+ entity_type: EntityType::Initiative,
+ },
+ )
+ .await?
+ {
+ authorized.push((project, receipt));
+ }
+ }
+ let mut properties = self
+ .resources
+ .properties(
+ authorized
+ .iter()
+ .map(|(_, receipt)| receipt.clone())
+ .collect(),
+ )
+ .await?;
+ let mut rows = Vec::new();
+ for (initiative, receipt) in authorized {
+ let values = properties
+ .remove(&initiative.id.to_string())
+ .unwrap_or_default();
+ if request
+ .status
+ .is_some_and(|status| values.status != Some(status))
+ || request
+ .priority
+ .is_some_and(|priority| values.priority != Some(priority))
+ || request
+ .assignee
+ .as_ref()
+ .is_some_and(|id| !values.assignees.contains(id))
+ || request
+ .due_after
+ .is_some_and(|date| values.due_date.is_none_or(|due| due < date))
+ || request
+ .due_before
+ .is_some_and(|date| values.due_date.is_none_or(|due| due > date))
+ {
+ continue;
+ }
+ rows.push(InitiativePageRow {
+ initiative,
+ user_access_level: receipt_access_level(&receipt)?,
+ properties: values,
+ task_count: 0,
+ completed_task_count: 0,
+ });
+ }
+ rows.sort_by(|left, right| order(&left.into(), &right.into(), request.sort, descending));
+ if let Some(cursor) = cursor {
+ let position = cursor.position.resolve(request.sort, &rows)?;
+ rows.retain(|row| {
+ order(&row.into(), &position, request.sort, descending) == Ordering::Greater
+ });
+ }
+ let has_more = rows.len() > size;
+ rows.truncate(size);
+ let next_cursor = if has_more {
+ rows.last()
+ .map(|last| {
+ serde_json::to_string(&Cursor {
+ sort: request.sort,
+ descending,
+ position: CursorPosition::from_row(last, request.sort),
+ })
+ .map_err(|error| InitiativeError::Internal(rootcause::report!(error).into()))
+ })
+ .transpose()?
+ } else {
+ None
+ };
+ // Hydrate progress only for the selected page, using current task access.
+ let mut tasks_by_project = HashMap::new();
+ let mut task_receipts = Vec::new();
+ for row in &rows {
+ let Some(detail) = self
+ .repo
+ .get_detail(row.initiative.id)
+ .await
+ .map_err(Into::into)?
+ else {
+ continue;
+ };
+ let mut ids = Vec::new();
+ for id in detail.task_ids {
+ if let Some(receipt) = self
+ .resources
+ .view(
+ auth.clone(),
+ Entity {
+ entity_id: id.clone(),
+ entity_type: EntityType::Document,
+ },
+ )
+ .await?
+ {
+ ids.push(id);
+ task_receipts.push(receipt);
+ }
+ }
+ tasks_by_project.insert(row.initiative.id, ids);
+ }
+ let task_properties = self.resources.properties(task_receipts).await?;
+ for row in &mut rows {
+ if let Some(ids) = tasks_by_project.get(&row.initiative.id) {
+ row.task_count = u32::try_from(ids.len()).unwrap_or(u32::MAX);
+ row.completed_task_count = u32::try_from(
+ ids.iter()
+ .filter(|id| {
+ task_properties
+ .get(*id)
+ .is_some_and(|properties| properties.completed)
+ })
+ .count(),
+ )
+ .unwrap_or(u32::MAX);
+ }
+ }
+ Ok(InitiativePage {
+ initiatives: rows,
+ next_cursor,
+ })
+ }
+
+ pub(super) async fn read_tasks_page(
+ &self,
+ receipt: EntityAccessReceipt<ViewAccessLevel>,
+ request: InitiativeTasksRequest,
+ ) -> Result<InitiativeTasksPage, InitiativeError> {
+ request.validate()?;
+ self.get(receipt).await?.task_page(request)
+ }
+
+ pub(super) async fn read_task_references(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ request: TaskInitiativeReferencesRequest,
+ ) -> Result<TaskInitiativeReferences, InitiativeError> {
+ let mut seen = std::collections::HashSet::new();
+ let mut ids = Vec::new();
+ for id in request.task_ids {
+ if id.is_empty() || id.len() > 128 {
+ return Err(InitiativeError::BadRequest("invalid task id".into()));
+ }
+ if seen.insert(id.clone()) {
+ if ids.len() == MAX_TASKS_PER_ASSIGN {
+ return Err(InitiativeError::BadRequest(
+ "at most 100 task ids are allowed".into(),
+ ));
+ }
+ ids.push(id);
+ }
+ }
+ let auth = EntityAccessAuth::Authenticated(user_id.clone().into_owned());
+ let visible = self.visible_tasks(&auth, ids.clone()).await?;
+ let memberships = self
+ .repo
+ .task_memberships(visible.clone())
+ .await
+ .map_err(Into::into)?;
+ let mut projects = HashMap::new();
+ for id in memberships.values() {
+ if projects.contains_key(id) {
+ continue;
+ }
+ let basic = if self
+ .resources
+ .view(
+ auth.clone(),
+ Entity {
+ entity_id: id.to_string(),
+ entity_type: EntityType::Initiative,
+ },
+ )
+ .await?
+ .is_some()
+ {
+ self.repo.get_basic(*id).await.map_err(Into::into)?
+ } else {
+ None
+ };
+ projects.insert(*id, basic);
+ }
+ let references = ids
+ .into_iter()
+ .map(|task_id| {
+ if !visible.contains(&task_id) {
+ return TaskInitiativeReference::Unavailable { task_id };
+ }
+ match memberships.get(&task_id) {
+ None => TaskInitiativeReference::None { task_id },
+ Some(id) => match projects.get(id).and_then(Option::as_ref) {
+ Some(project) => TaskInitiativeReference::Visible {
+ task_id,
+ initiative: InitiativeReference {
+ id: *id,
+ name: project.name.clone(),
+ },
+ },
+ None => TaskInitiativeReference::Unavailable { task_id },
+ },
+ }
+ })
+ .collect();
+ Ok(TaskInitiativeReferences { references })
+ }
+}
diff --git a/crates/initiative/src/domain/service/test.rs b/crates/initiative/src/domain/service/test.rs
index 0c207dee1b..3dd63119b6 100644
--- a/crates/initiative/src/domain/service/test.rs
+++ b/crates/initiative/src/domain/service/test.rs
@@ -1,6 +1,7 @@
use chrono::{TimeZone, Utc};
mod access;
+mod reads;
use entity_access::domain::models::{
AccessLevel, EditAccessLevel, Entity, EntityAccessReceipt, EntityPermission, EntityType,
OwnerAccessLevel, ViewAccessLevel,
@@ -131,7 +132,11 @@ fn service_with_documents(
repo: MockInitiativeRepo,
documents: MockInitiativeDescriptionDocuments,
) -> InitiativeServiceImpl<MockInitiativeRepo, MockInitiativeDescriptionDocuments> {
- InitiativeServiceImpl::new(repo, documents)
+ InitiativeServiceImpl::new(
+ repo,
+ documents,
+ std::sync::Arc::new(reads::FakeResources::default()),
+ )
}
fn share_update() -> UpdateSharePermissionRequestV2 {
diff --git a/crates/initiative/src/domain/service/test/access.rs b/crates/initiative/src/domain/service/test/access.rs
index 926c160d30..5b9d3f81de 100644
--- a/crates/initiative/src/domain/service/test/access.rs
+++ b/crates/initiative/src/domain/service/test/access.rs
@@ -186,3 +186,19 @@ async fn all_lifecycle_operations_validate_initiative_entity_type() {
Err(InitiativeError::BadRequest(_))
));
}
+
+#[tokio::test]
+async fn assignee_sharing_deduplicates_and_keeps_owner_assignable() {
+ let mut repo = MockInitiativeRepo::new();
+ repo.expect_grant_assignees()
+ .withf(|id, users| *id == initiative_id() && users == &vec![user(OWNER), user(MEMBER)])
+ .times(1)
+ .return_once(|_, _| Box::pin(async { Ok(()) }));
+ service(repo)
+ .grant_assignees(
+ edit_receipt(),
+ vec![user(OWNER), user(MEMBER), user(MEMBER)],
+ )
+ .await
+ .expect("granted");
+}
diff --git a/crates/initiative/src/domain/service/test/reads.rs b/crates/initiative/src/domain/service/test/reads.rs
new file mode 100644
index 0000000000..0f3d302aa5
--- /dev/null
+++ b/crates/initiative/src/domain/service/test/reads.rs
@@ -0,0 +1,525 @@
+use super::*;
+use crate::domain::{
+ reads::*,
+ resources::{InitiativeResources, ResourceFuture},
+};
+use entity_access::domain::models::{Entity, EntityAccessAuth};
+use std::{
+ collections::{HashMap, HashSet},
+ sync::Arc,
+};
+
+#[derive(Debug, Default)]
+pub(super) struct FakeResources {
+ denied: HashSet<String>,
+ values: HashMap<String, InitiativePropertySnapshot>,
+ fail_initialization: bool,
+}
+
+impl InitiativeResources for FakeResources {
+ fn initialize(&self, _id: InitiativeId) -> ResourceFuture<'_, ()> {
+ Box::pin(async {
+ if self.fail_initialization {
+ Err(InitiativeError::Internal(rootcause::report!(
+ "initialization failed"
+ )))
+ } else {
+ Ok(())
+ }
+ })
+ }
+ fn purge(&self, _receipt: EntityAccessReceipt<EditAccessLevel>) -> ResourceFuture<'_, ()> {
+ Box::pin(async { Ok(()) })
+ }
+ fn view(
+ &self,
+ auth: EntityAccessAuth,
+ entity: Entity,
+ ) -> ResourceFuture<'_, Option<EntityAccessReceipt<ViewAccessLevel>>> {
+ Box::pin(async move {
+ if self.denied.contains(&entity.entity_id) {
+ return Ok(None);
+ }
+ Ok(Some(
+ EntityAccessReceipt::try_new(
+ auth,
+ entity,
+ EntityPermission::AccessLevel {
+ access_level: AccessLevel::Owner,
+ },
+ )
+ .unwrap(),
+ ))
+ })
+ }
+ fn properties(
+ &self,
+ _receipts: Vec<EntityAccessReceipt<ViewAccessLevel>>,
+ ) -> ResourceFuture<'_, HashMap<String, InitiativePropertySnapshot>> {
+ Box::pin(async { Ok(self.values.clone()) })
+ }
+}
+
+fn service_with_resources(
+ repo: MockInitiativeRepo,
+ resources: FakeResources,
+) -> InitiativeServiceImpl<MockInitiativeRepo, MockInitiativeDescriptionDocuments> {
+ InitiativeServiceImpl::new(
+ repo,
+ MockInitiativeDescriptionDocuments::new(),
+ Arc::new(resources),
+ )
+}
+
+fn summary(id: u128, name: &str) -> InitiativeSummary {
+ InitiativeSummary {
+ id: InitiativeId::from_uuid(uuid::Uuid::from_u128(id)),
+ name: name.into(),
+ description_document_id: description_document_id(),
+ updated_at: now(),
+ }
+}
+
+#[tokio::test]
+async fn single_summary_counts_only_visible_tasks_and_uses_canonical_properties() {
+ let mut repo = MockInitiativeRepo::new();
+ repo.expect_get_detail().times(1).return_once(|_| {
+ Box::pin(async {
+ let mut d = detail(Vec::new());
+ d.task_ids = vec!["open".into(), "done".into(), "hidden".into()];
+ Ok(Some(d))
+ })
+ });
+ let status = uuid::Uuid::from_u128(50);
+ let project_id = detail(Vec::new()).id.to_string();
+ let svc = service_with_resources(
+ repo,
+ FakeResources {
+ denied: HashSet::from(["hidden".into()]),
+ values: HashMap::from([
+ (
+ project_id,
+ InitiativePropertySnapshot {
+ status: Some(status),
+ ..Default::default()
+ },
+ ),
+ (
+ "done".into(),
+ InitiativePropertySnapshot {
+ completed: true,
+ ..Default::default()
+ },
+ ),
+ (
+ "hidden".into(),
+ InitiativePropertySnapshot {
+ completed: true,
+ ..Default::default()
+ },
+ ),
+ ]),
+ ..Default::default()
+ },
+ );
+ let summary = svc.summary(view_receipt()).await.unwrap();
+ assert_eq!(summary.task_count, 2);
+ assert_eq!(summary.completed_task_count, 1);
+ assert_eq!(summary.properties.status, Some(status));
+}
+
+#[tokio::test]
+async fn failed_property_initialization_compensates_project_and_description() {
+ let mut repo = MockInitiativeRepo::new();
+ repo.expect_get_team_default_link_share()
+ .return_once(|_| Box::pin(async { Ok(None) }));
+ repo.expect_create()
+ .return_once(|_, _, _| Box::pin(async { Ok(detail(Vec::new())) }));
+ repo.expect_delete()
+ .times(1)
+ .return_once(|_| Box::pin(async { Ok(description_document_id()) }));
+ let mut documents = MockInitiativeDescriptionDocuments::new();
+ documents
+ .expect_create()
+ .return_once(|_| Box::pin(async { Ok(description_document_id()) }));
+ documents
+ .expect_purge()
+ .withf(|id| *id == description_document_id())
+ .times(1)
+ .return_once(|_| Box::pin(async { Ok(()) }));
+ let svc = InitiativeServiceImpl::new(
+ repo,
+ documents,
+ Arc::new(FakeResources {
+ fail_initialization: true,
+ ..Default::default()
+ }),
+ );
+ assert!(matches!(
+ svc.create(
+ &user(OWNER),
+ CreateInitiativeRequest {
+ name: "Launch".into(),
+ ..Default::default()
+ }
+ )
+ .await,
+ Err(InitiativeError::Internal(_))
+ ));
+}
+
+#[tokio::test]
+async fn task_paging_filters_visibility_before_counting_and_page_boundaries() {
+ let mut repo = MockInitiativeRepo::new();
+ repo.expect_get_detail().times(2).returning(|_| {
+ Box::pin(async {
+ let mut d = detail(Vec::new());
+ d.task_ids = vec!["z".into(), "hidden".into(), "a".into()];
+ Ok(Some(d))
+ })
+ });
+ let svc = service_with_resources(
+ repo,
+ FakeResources {
+ denied: HashSet::from(["hidden".into()]),
+ ..Default::default()
+ },
+ );
+ let first = svc
+ .tasks_page(
+ view_receipt(),
+ InitiativeTasksRequest {
+ limit: Some(1),
+ cursor: None,
+ },
+ )
+ .await
+ .unwrap();
+ assert_eq!(first.task_ids, ["a"]);
+ assert_eq!(first.total, 2);
+ assert_eq!(first.next_cursor.as_deref(), Some("a"));
+ let last = svc
+ .tasks_page(
+ view_receipt(),
+ InitiativeTasksRequest {
+ limit: Some(1),
+ cursor: first.next_cursor,
+ },
+ )
+ .await
+ .unwrap();
+ assert_eq!(last.task_ids, ["z"]);
+ assert!(last.next_cursor.is_none());
+}
+
+#[tokio::test]
+async fn collection_filters_properties_before_paging_and_counts_only_visible_tasks() {
+ let status = uuid::Uuid::from_u128(50);
+ let mut repo = MockInitiativeRepo::new();
+ repo.expect_list_accessible().times(2).returning(|_| {
+ Box::pin(async {
+ Ok(InitiativeList {
+ initiatives: vec![summary(3, "Gamma"), summary(2, "Beta"), summary(1, "Alpha")],
+ })
+ })
+ });
+ repo.expect_get_detail().times(2).returning(|id| {
+ Box::pin(async move {
+ let mut d = detail(Vec::new());
+ d.id = id;
+ d.task_ids = vec!["visible".into(), "hidden".into()];
+ Ok(Some(d))
+ })
+ });
+ let selected = InitiativePropertySnapshot {
+ status: Some(status),
+ ..Default::default()
+ };
+ let svc = service_with_resources(
+ repo,
+ FakeResources {
+ denied: HashSet::from(["hidden".into()]),
+ values: HashMap::from([
+ (summary(1, "").id.to_string(), selected.clone()),
+ (summary(2, "").id.to_string(), selected),
+ (
+ "visible".into(),
+ InitiativePropertySnapshot {
+ completed: true,
+ ..Default::default()
+ },
+ ),
+ ]),
+ ..Default::default()
+ },
+ );
+ let request = InitiativePageRequest {
+ limit: Some(1),
+ status: Some(status),
+ sort: InitiativeSort::Name,
+ ..Default::default()
+ };
+ let first = svc.page(&user(OWNER), request.clone()).await.unwrap();
+ assert_eq!(first.initiatives[0].initiative.name, "Alpha");
+ assert_eq!(first.initiatives[0].task_count, 1);
+ assert_eq!(first.initiatives[0].completed_task_count, 1);
+ let last = svc
+ .page(
+ &user(OWNER),
+ InitiativePageRequest {
+ cursor: first.next_cursor,
+ ..request
+ },
+ )
+ .await
+ .unwrap();
+ assert_eq!(last.initiatives[0].initiative.name, "Beta");
+ assert!(last.next_cursor.is_none());
+}
+
+#[tokio::test]
+async fn task_references_distinguish_unassigned_from_inaccessible_without_metadata_leaks() {
+ let visible_project = summary(1, "Visible").id;
+ let hidden_project = summary(2, "Secret").id;
+ let mut repo = MockInitiativeRepo::new();
+ repo.expect_task_memberships()
+ .withf(|ids| ids == &["unassigned", "visible", "secret"])
+ .return_once(move |_| {
+ Box::pin(async move {
+ Ok(HashMap::from([
+ ("visible".into(), visible_project),
+ ("secret".into(), hidden_project),
+ ]))
+ })
+ });
+ repo.expect_get_basic()
+ .withf(move |id| *id == visible_project)
+ .times(1)
+ .return_once(move |_| {
+ Box::pin(async move {
+ Ok(Some(InitiativeBasic {
+ id: visible_project,
+ name: "Visible".into(),
+ owner_id: user(OWNER),
+ }))
+ })
+ });
+ let svc = service_with_resources(
+ repo,
+ FakeResources {
+ denied: HashSet::from([hidden_project.to_string(), "hidden-task".into()]),
+ ..Default::default()
+ },
+ );
+ let response = svc
+ .task_references(
+ &user(OWNER),
+ TaskInitiativeReferencesRequest {
+ task_ids: vec![
+ "unassigned".into(),
+ "visible".into(),
+ "secret".into(),
+ "hidden-task".into(),
+ "visible".into(),
+ ],
+ },
+ )
+ .await
+ .unwrap();
+ assert_eq!(response.references.len(), 4);
+ assert!(matches!(
+ response.references[0],
+ TaskInitiativeReference::None { .. }
+ ));
+ assert!(matches!(
+ response.references[1],
+ TaskInitiativeReference::Visible { .. }
+ ));
+ assert!(matches!(
+ response.references[2],
+ TaskInitiativeReference::Unavailable { .. }
+ ));
+ assert!(matches!(
+ response.references[3],
+ TaskInitiativeReference::Unavailable { .. }
+ ));
+ assert!(
+ !serde_json::to_string(&response)
+ .unwrap()
+ .contains(&hidden_project.to_string())
+ );
+}
+
+#[tokio::test]
+async fn cursors_remain_bounded_and_preserve_full_unicode_name_ordering() {
+ let prefix = format!("A{}", "\u{301}".repeat(1500));
+ let names = [
+ format!("{prefix}a"),
+ format!("{prefix}a"),
+ format!("{prefix}b"),
+ ];
+ for name in &names {
+ super::super::normalize_name(name).expect("valid short grapheme count");
+ assert!(name.len() > 2048);
+ }
+ let mut repo = MockInitiativeRepo::new();
+ repo.expect_list_accessible().returning(move |_| {
+ let initiatives = names
+ .iter()
+ .enumerate()
+ .rev()
+ .map(|(i, name)| summary(i as u128 + 1, name))
+ .collect();
+ Box::pin(async move { Ok(InitiativeList { initiatives }) })
+ });
+ repo.expect_get_detail().returning(|id| {
+ Box::pin(async move {
+ let mut value = detail(Vec::new());
+ value.id = id;
+ Ok(Some(value))
+ })
+ });
+ let svc = service_with_resources(repo, FakeResources::default());
+ for sort in [
+ InitiativeSort::Name,
+ InitiativeSort::Updated,
+ InitiativeSort::Due,
+ ] {
+ for descending in [false, true] {
+ let mut request = InitiativePageRequest {
+ limit: Some(1),
+ sort,
+ descending: Some(descending),
+ ..Default::default()
+ };
+ let mut ids = Vec::new();
+ loop {
+ let page = svc.page(&user(OWNER), request.clone()).await.unwrap();
+ ids.extend(
+ page.initiatives
+ .into_iter()
+ .map(|row| row.initiative.id.as_uuid().as_u128()),
+ );
+ request.cursor = page.next_cursor;
+ let Some(cursor) = &request.cursor else {
+ break;
+ };
+ assert!(cursor.len() <= 2048);
+ assert!(ids.len() < 3, "cursor must advance");
+ }
+ assert_eq!(
+ ids,
+ if descending {
+ vec![3, 2, 1]
+ } else {
+ vec![1, 2, 3]
+ }
+ );
+ }
+ }
+}
+
+#[tokio::test]
+async fn removed_name_cursor_anchor_requires_restarting_instead_of_silently_skipping_rows() {
+ let mut repo = MockInitiativeRepo::new();
+ let mut sequence = Sequence::new();
+ repo.expect_list_accessible()
+ .times(1)
+ .in_sequence(&mut sequence)
+ .return_once(|_| {
+ Box::pin(async {
+ Ok(InitiativeList {
+ initiatives: vec![summary(1, "Alpha"), summary(2, "Beta")],
+ })
+ })
+ });
+ repo.expect_list_accessible()
+ .times(1)
+ .in_sequence(&mut sequence)
+ .return_once(|_| {
+ Box::pin(async {
+ Ok(InitiativeList {
+ initiatives: vec![summary(2, "Beta")],
+ })
+ })
+ });
+ repo.expect_get_detail()
+ .times(1)
+ .return_once(|_| Box::pin(async { Ok(Some(detail(Vec::new()))) }));
+ let svc = service_with_resources(repo, FakeResources::default());
+ let mut request = InitiativePageRequest {
+ limit: Some(1),
+ sort: InitiativeSort::Name,
+ ..Default::default()
+ };
+ request.cursor = svc
+ .page(&user(OWNER), request.clone())
+ .await
+ .unwrap()
+ .next_cursor;
+ let error = svc.page(&user(OWNER), request).await.unwrap_err();
+ assert!(
+ matches!(error, InitiativeError::BadRequest(message) if message.contains("restart pagination"))
+ );
+}
+
+#[tokio::test]
+async fn renamed_name_cursor_anchor_requires_restarting_in_both_directions() {
+ for descending in [false, true] {
+ let mut repo = MockInitiativeRepo::new();
+ let mut sequence = Sequence::new();
+ repo.expect_list_accessible()
+ .times(1)
+ .in_sequence(&mut sequence)
+ .return_once(|_| {
+ Box::pin(async {
+ Ok(InitiativeList {
+ initiatives: vec![summary(1, "Alpha"), summary(2, "Beta")],
+ })
+ })
+ });
+ repo.expect_list_accessible()
+ .times(1)
+ .in_sequence(&mut sequence)
+ .return_once(move |_| {
+ Box::pin(async move {
+ let mut renamed = if descending {
+ summary(2, "Aaron")
+ } else {
+ summary(1, "Zulu")
+ };
+ renamed.updated_at += chrono::Duration::seconds(1);
+ Ok(InitiativeList {
+ initiatives: vec![
+ renamed,
+ if descending {
+ summary(1, "Alpha")
+ } else {
+ summary(2, "Beta")
+ },
+ ],
+ })
+ })
+ });
+ repo.expect_get_detail()
+ .times(1)
+ .return_once(|_| Box::pin(async { Ok(Some(detail(Vec::new()))) }));
+ let svc = service_with_resources(repo, FakeResources::default());
+ let mut request = InitiativePageRequest {
+ limit: Some(1),
+ sort: InitiativeSort::Name,
+ descending: Some(descending),
+ ..Default::default()
+ };
+ let first = svc.page(&user(OWNER), request.clone()).await.unwrap();
+ assert_eq!(first.initiatives.len(), 1);
+ request.cursor = first.next_cursor;
+ assert!(request.cursor.is_some());
+ // Continuing from the anchor's new name would silently skip Beta/Alpha.
+ let error = svc.page(&user(OWNER), request).await.unwrap_err();
+ assert!(matches!(
+ error,
+ InitiativeError::BadRequest(message) if message.contains("restart pagination")
+ ));
+ }
+}
diff --git a/crates/initiative/src/inbound/axum_router/test.rs b/crates/initiative/src/inbound/axum_router/test.rs
index c0ca92dab6..bd300773c9 100644
--- a/crates/initiative/src/inbound/axum_router/test.rs
+++ b/crates/initiative/src/inbound/axum_router/test.rs
@@ -324,6 +324,46 @@ fn reject_name(name: &str) -> Result<(), InitiativeError> {
}
impl InitiativeService for FakeInitiativeService {
+ async fn summary(
+ &self,
+ _receipt: EntityAccessReceipt<ViewAccessLevel>,
+ ) -> Result<crate::domain::reads::InitiativePageRow, InitiativeError> {
+ Err(InitiativeError::NotFound)
+ }
+
+ async fn page(
+ &self,
+ _user_id: &MacroUserIdStr<'_>,
+ _request: crate::domain::reads::InitiativePageRequest,
+ ) -> Result<crate::domain::reads::InitiativePage, InitiativeError> {
+ Ok(crate::domain::reads::InitiativePage {
+ initiatives: Vec::new(),
+ next_cursor: None,
+ })
+ }
+
+ async fn tasks_page(
+ &self,
+ _receipt: EntityAccessReceipt<ViewAccessLevel>,
+ _request: crate::domain::reads::InitiativeTasksRequest,
+ ) -> Result<crate::domain::reads::InitiativeTasksPage, InitiativeError> {
+ Ok(crate::domain::reads::InitiativeTasksPage {
+ task_ids: Vec::new(),
+ next_cursor: None,
+ total: 0,
+ })
+ }
+
+ async fn task_references(
+ &self,
+ _user_id: &MacroUserIdStr<'_>,
+ _request: crate::domain::reads::TaskInitiativeReferencesRequest,
+ ) -> Result<crate::domain::reads::TaskInitiativeReferences, InitiativeError> {
+ Ok(crate::domain::reads::TaskInitiativeReferences {
+ references: Vec::new(),
+ })
+ }
+
async fn create(
&self,
_user_id: &MacroUserIdStr<'_>,
@@ -416,6 +456,14 @@ impl InitiativeService for FakeInitiativeService {
Ok(())
}
+ async fn grant_assignees(
+ &self,
+ _receipt: EntityAccessReceipt<EditAccessLevel>,
+ _user_ids: Vec<MacroUserIdStr<'static>>,
+ ) -> Result<(), InitiativeError> {
+ Ok(())
+ }
+
async fn delete(
&self,
_receipt: EntityAccessReceipt<OwnerAccessLevel>,
diff --git a/crates/initiative/src/outbound.rs b/crates/initiative/src/outbound.rs
index 4ca91468d4..0f42d8f212 100644
--- a/crates/initiative/src/outbound.rs
+++ b/crates/initiative/src/outbound.rs
@@ -1,7 +1,13 @@
//! Outbound (driven) adapters for initiatives.
+#[cfg(feature = "resources")]
+pub mod resources;
+
#[cfg(feature = "postgres")]
mod pg_initiative_repo;
#[cfg(feature = "postgres")]
pub use pg_initiative_repo::PgInitiativeRepo;
+
+#[cfg(feature = "resources")]
+mod assignees;
diff --git a/crates/initiative/src/outbound/assignees.rs b/crates/initiative/src/outbound/assignees.rs
new file mode 100644
index 0000000000..4567af9169
--- /dev/null
+++ b/crates/initiative/src/outbound/assignees.rs
@@ -0,0 +1,27 @@
+//! Adapter from property assignment commands to the initiative owning service.
+
+use crate::domain::{
+ assignees::InitiativeAssignees, models::InitiativeError, ports::InitiativeRepo,
+};
+use macro_user_id::user_id::MacroUserIdStr;
+use properties::{EditReceipt, InitiativeAssigneeService, PropertiesErr};
+use std::{future::Future, pin::Pin};
+
+impl<R: InitiativeRepo> InitiativeAssigneeService for InitiativeAssignees<R> {
+ fn grant_assignees<'a>(
+ &'a self,
+ access: &'a EditReceipt,
+ users: Vec<MacroUserIdStr<'static>>,
+ ) -> Pin<Box<dyn Future<Output = Result<(), PropertiesErr>> + Send + 'a>> {
+ Box::pin(async move {
+ self.grant(access, users)
+ .await
+ .map_err(|error| match error {
+ InitiativeError::Unauthorized => PropertiesErr::PermissionDenied,
+ InitiativeError::NotFound => PropertiesErr::NotFound,
+ InitiativeError::BadRequest(message) => PropertiesErr::Validation(message),
+ other => PropertiesErr::Repo(other.into()),
+ })
+ })
+ }
+}
diff --git a/crates/initiative/src/outbound/pg_initiative_repo.rs b/crates/initiative/src/outbound/pg_initiative_repo.rs
index ba4c2eae09..93d47dfe80 100644
--- a/crates/initiative/src/outbound/pg_initiative_repo.rs
+++ b/crates/initiative/src/outbound/pg_initiative_repo.rs
@@ -89,6 +89,23 @@ impl InitiativeRepo for PgInitiativeRepo {
list::list_accessible(&self.pool, user_id).await
}
+ async fn task_memberships(
+ &self,
+ task_ids: Vec<String>,
+ ) -> Result<std::collections::HashMap<String, InitiativeId>, Self::Err> {
+ let rows = sqlx::query!(
+ "SELECT task_id, initiative_id FROM task_initiative WHERE task_id = ANY($1)",
+ &task_ids
+ )
+ .fetch_all(&self.pool)
+ .await
+ .map_err(classify_sqlx)?;
+ Ok(rows
+ .into_iter()
+ .map(|row| (row.task_id, InitiativeId::from_uuid(row.initiative_id)))
+ .collect())
+ }
+
#[tracing::instrument(err, skip(self, args))]
async fn update(&self, args: UpdateInitiativeRepoArgs) -> Result<InitiativeDetail, Self::Err> {
create::update(&self.pool, args).await
@@ -129,6 +146,15 @@ impl InitiativeRepo for PgInitiativeRepo {
tasks::clear_task(&self.pool, task_id).await
}
+ #[tracing::instrument(err, skip_all)]
+ async fn grant_assignees(
+ &self,
+ id: InitiativeId,
+ user_ids: Vec<MacroUserIdStr<'static>>,
+ ) -> Result<(), Self::Err> {
+ members::grant_assignees(&self.pool, id, &user_ids).await
+ }
+
#[tracing::instrument(err, skip(self))]
async fn delete(&self, id: InitiativeId) -> Result<DescriptionDocumentId, Self::Err> {
create::delete(&self.pool, id).await
diff --git a/crates/initiative/src/outbound/pg_initiative_repo/members.rs b/crates/initiative/src/outbound/pg_initiative_repo/members.rs
index d7ffe561de..f7b3ac263c 100644
--- a/crates/initiative/src/outbound/pg_initiative_repo/members.rs
+++ b/crates/initiative/src/outbound/pg_initiative_repo/members.rs
@@ -2,11 +2,55 @@ use entity_access_db_utils::{
AccessLevel, delete_user_entity_access_rows, upsert_user_entity_access_bulk,
};
use macro_user_id::user_id::MacroUserIdStr;
-use sqlx::{Postgres, Transaction};
+use sqlx::{PgPool, Postgres, Transaction};
use uuid::Uuid;
-use super::{AdapterError, GrantTargets, map_sqlx};
-use crate::domain::models::InitiativeError;
+use super::{AdapterError, GrantTargets, map_sqlx, parse_description_document_id};
+use crate::domain::models::{InitiativeError, InitiativeId};
+
+pub(super) async fn grant_assignees(
+ pool: &PgPool,
+ id: InitiativeId,
+ user_ids: &[MacroUserIdStr<'static>],
+) -> Result<(), InitiativeError> {
+ if user_ids.is_empty() {
+ return Ok(());
+ }
+ let mut tx = pool
+ .begin()
+ .await
+ .map_err(AdapterError::Sqlx)
+ .map_err(map_sqlx)?;
+ let row = sqlx::query!(
+ "SELECT description_document_id, owner_user_id FROM initiative WHERE id = $1 FOR UPDATE",
+ id.as_uuid(),
+ )
+ .fetch_optional(tx.as_mut())
+ .await
+ .map_err(AdapterError::Sqlx)
+ .map_err(map_sqlx)?
+ .ok_or(InitiativeError::NotFound)?;
+ let description_id = parse_description_document_id(id.as_uuid(), &row.description_document_id)?;
+ let collaborators = user_ids
+ .iter()
+ .filter(|user_id| user_id.as_ref() != row.owner_user_id)
+ .cloned()
+ .collect::<Vec<_>>();
+ // Assignment grants remain after the property is cleared, just like task sharing.
+ // Record those grants as collaborators so the owner can explicitly revoke them.
+ apply_member_diff(
+ &mut tx,
+ &GrantTargets::new(id, description_id),
+ &collaborators,
+ &[],
+ )
+ .await?;
+ tx.commit()
+ .await
+ .map_err(AdapterError::Sqlx)
+ .map_err(map_sqlx)?;
+ Ok(())
+}
pub(super) async fn insert_members(
tx: &mut Transaction<'_, Postgres>,
diff --git a/crates/initiative/src/outbound/pg_initiative_repo/test/access.rs b/crates/initiative/src/outbound/pg_initiative_repo/test/access.rs
index de5b12a0e1..f90db550eb 100644
--- a/crates/initiative/src/outbound/pg_initiative_repo/test/access.rs
+++ b/crates/initiative/src/outbound/pg_initiative_repo/test/access.rs
@@ -1,5 +1,68 @@
use super::*;
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn assignee_sharing_adds_manageable_collaborators_without_owner_downgrade(
+ pool: PgPool,
+) -> anyhow::Result<()> {
+ insert_user(&pool, OWNER).await?;
+ insert_user(&pool, MEMBER).await?;
+ insert_user(&pool, TEAMMATE).await?;
+ let repo = repo(pool.clone());
+ let created = repo
+ .create(
+ create_args(&pool, OWNER, "Launch", &[TEAMMATE]).await?,
+ share_off(),
+ TeamShareCreation::Unshared,
+ )
+ .await?;
+
+ repo.grant_assignees(created.id, vec![user(OWNER), user(MEMBER)])
+ .await?;
+ repo.grant_assignees(created.id, vec![user(MEMBER)]).await?;
+
+ let detail = repo.get_detail(created.id).await?.expect("project exists");
+ assert_eq!(detail.member_ids.len(), 2);
+ assert!(detail.member_ids.contains(&user(MEMBER)));
+ assert!(detail.member_ids.contains(&user(TEAMMATE)));
+ assert_eq!(
+ mirrored_access(&pool, created.id, created.description_document_id, MEMBER).await?,
+ (Some("edit".into()), Some("edit".into()))
+ );
+ assert_eq!(
+ mirrored_access(&pool, created.id, created.description_document_id, OWNER).await?,
+ (Some("owner".into()), Some("owner".into()))
+ );
+
+ // Clearing the assignee property sends an empty grant set and keeps the share.
+ repo.grant_assignees(created.id, vec![]).await?;
+ assert_eq!(
+ repo.get_detail(created.id)
+ .await?
+ .expect("project exists")
+ .member_ids,
+ detail.member_ids
+ );
+
+ // The existing collaborator update is the owner's explicit access-revocation path.
+ repo.update(UpdateInitiativeRepoArgs {
+ member_ids_removed: vec![user(MEMBER)],
+ ..update_args(created.id)
+ })
+ .await?;
+ assert_eq!(
+ repo.get_detail(created.id)
+ .await?
+ .expect("project exists")
+ .member_ids,
+ vec![user(TEAMMATE)]
+ );
+ assert_eq!(
+ mirrored_access(&pool, created.id, created.description_document_id, MEMBER).await?,
+ (None, None)
+ );
+ Ok(())
+}
+
#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
async fn task_side_clear_is_idempotent_and_preserves_the_task(pool: PgPool) -> anyhow::Result<()> {
insert_user(&pool, OWNER).await?;
diff --git a/crates/initiative/src/outbound/resources.rs b/crates/initiative/src/outbound/resources.rs
new file mode 100644
index 0000000000..8736ab72e0
--- /dev/null
+++ b/crates/initiative/src/outbound/resources.rs
@@ -0,0 +1,192 @@
+//! Adapters over the access and properties owning services.
+
+use entity_access::domain::{
+ models::{
+ AccessError, AccessLevel, BotAccessScope, BotReceiptScope, EditAccessLevel, Entity,
+ EntityAccessAuth, EntityAccessReceipt, EntityPermission, ViewAccessLevel,
+ },
+ ports::EntityAccessService,
+};
+use models_properties::service::property_value::PropertyValue;
+use properties::PropertiesService;
+use std::{collections::HashMap, sync::Arc};
+use system_properties::{StatusOption, SystemPropertiesService, SystemPropertyKey};
+
+use crate::domain::{
+ models::{InitiativeError, InitiativeId},
+ reads::InitiativePropertySnapshot,
+ resources::{InitiativeResources, ResourceFuture},
+};
+
+/// Composes initiative dependencies using domain ports from their owners.
+pub struct ProjectResources<P, S, A> {
+ properties: Arc<P>,
+ system_properties: Arc<S>,
+ access: Arc<A>,
+}
+
+impl<P, S, A> std::fmt::Debug for ProjectResources<P, S, A> {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.write_str("ProjectResources")
+ }
+}
+
+impl<P, S, A> ProjectResources<P, S, A> {
+ /// Supply owning domain services from the application composition root.
+ pub fn new(properties: Arc<P>, system_properties: Arc<S>, access: Arc<A>) -> Self {
+ Self {
+ properties,
+ system_properties,
+ access,
+ }
+ }
+}
+
+impl<P: PropertiesService, S: SystemPropertiesService, A: EntityAccessService> InitiativeResources
+ for ProjectResources<P, S, A>
+{
+ fn initialize(&self, id: InitiativeId) -> ResourceFuture<'_, ()> {
+ Box::pin(async move {
+ self.system_properties
+ .attach_initiative_properties(vec![id.to_string()])
+ .await
+ .map_err(|error| InitiativeError::Internal(rootcause::report!(error).into()))
+ })
+ }
+ fn purge(&self, receipt: EntityAccessReceipt<EditAccessLevel>) -> ResourceFuture<'_, ()> {
+ Box::pin(async move {
+ self.properties
+ .delete_entity_properties(&receipt)
+ .await
+ .map_err(|error| InitiativeError::Internal(rootcause::report!(error).into()))
+ })
+ }
+ fn view(
+ &self,
+ auth: EntityAccessAuth,
+ entity: Entity,
+ ) -> ResourceFuture<'_, Option<EntityAccessReceipt<ViewAccessLevel>>> {
+ Box::pin(async move {
+ let result = match &auth {
+ EntityAccessAuth::Authenticated(user) => {
+ self.access
+ .generate_entity_access_receipt::<ViewAccessLevel>(
+ user,
+ None,
+ &entity.entity_id,
+ entity.entity_type,
+ )
+ .await
+ }
+ EntityAccessAuth::Bot(bot) => {
+ let scope = match bot.scope() {
+ BotReceiptScope::User { acting_user } => {
+ BotAccessScope::user(acting_user.clone())
+ }
+ BotReceiptScope::Team { team_id } => {
+ BotAccessScope::Team { team_id: *team_id }
+ }
+ BotReceiptScope::Channel { .. } => return Ok(None),
+ };
+ self.access
+ .generate_bot_entity_access_receipt::<ViewAccessLevel>(
+ bot.bot_id(),
+ scope,
+ &entity.entity_id,
+ entity.entity_type,
+ )
+ .await
+ }
+ EntityAccessAuth::Unauthenticated => match self
+ .access
+ .get_access_level(None, &entity.entity_id, entity.entity_type)
+ .await
+ {
+ Ok(Some(level)) => EntityAccessReceipt::try_new(
+ auth,
+ entity,
+ EntityPermission::AccessLevel {
+ access_level: level,
+ },
+ ),
+ Ok(None) => return Ok(None),
+ Err(error) => Err(error),
+ },
+ // Explicitly internal receipts retain their internal scope; no user is impersonated.
+ EntityAccessAuth::Internal => EntityAccessReceipt::try_new(
+ auth,
+ entity,
+ EntityPermission::AccessLevel {
+ access_level: AccessLevel::Owner,
+ },
+ ),
+ };
+ match result {
+ Ok(receipt) => Ok(Some(receipt)),
+ Err(
+ AccessError::Unauthorized
+ | AccessError::UnauthorizedWithMessage(_)
+ | AccessError::NotFound(_)
+ | AccessError::BadRequest(_),
+ ) => Ok(None),
+ Err(error) => Err(InitiativeError::Internal(rootcause::report!(error).into())),
+ }
+ })
+ }
+ fn properties(
+ &self,
+ receipts: Vec<EntityAccessReceipt<ViewAccessLevel>>,
+ ) -> ResourceFuture<'_, HashMap<String, InitiativePropertySnapshot>> {
+ Box::pin(async move {
+ let ids = vec![
+ SystemPropertyKey::STATUS_UUID,
+ SystemPropertyKey::PRIORITY_UUID,
+ SystemPropertyKey::ASSIGNEES_UUID,
+ SystemPropertyKey::DUE_DATE_UUID,
+ ];
+ let mut output = HashMap::new();
+ for batch in receipts.chunks(100) {
+ let values = self
+ .properties
+ .get_bulk_entity_properties(batch, ids.clone())
+ .await
+ .map_err(|error| InitiativeError::Internal(rootcause::report!(error).into()))?;
+ for (key, properties) in values {
+ let mut snapshot = InitiativePropertySnapshot::default();
+ for property in properties {
+ match (
+ SystemPropertyKey::from_uuid(property.definition.id),
+ property.value,
+ ) {
+ (
+ Some(SystemPropertyKey::Status),
+ Some(PropertyValue::SelectOption(options)),
+ ) => {
+ snapshot.status = options.first().copied();
+ snapshot.completed =
+ snapshot.status == Some(StatusOption::COMPLETED_UUID);
+ }
+ (
+ Some(SystemPropertyKey::Priority),
+ Some(PropertyValue::SelectOption(options)),
+ ) => snapshot.priority = options.first().copied(),
+ (
+ Some(SystemPropertyKey::Assignees),
+ Some(PropertyValue::EntityRef(refs)),
+ ) => {
+ snapshot.assignees =
+ refs.into_iter().map(|entity| entity.entity_id).collect()
+ }
+ (Some(SystemPropertyKey::DueDate), Some(PropertyValue::Date(date))) => {
+ snapshot.due_date = Some(date)
+ }
+ _ => (),
+ }
+ }
+ output.insert(key.entity_id, snapshot);
+ }
+ }
+ Ok(output)
+ })
+ }
+}
diff --git a/crates/item_filter_index/src/lib.rs b/crates/item_filter_index/src/lib.rs
index 639c096473..67d9f6723b 100644
--- a/crates/item_filter_index/src/lib.rs
+++ b/crates/item_filter_index/src/lib.rs
@@ -272,6 +272,9 @@ fn check_soup_flat(
supports_status_properties: bool,
supports_notifications: bool,
) -> Eligibility {
+ if ast.initiative_filter.is_some() {
+ return Eligibility::Unsupported(UnsupportedReason::Partition("initiative"));
+ }
if request.has_cursor {
return Eligibility::Unsupported(UnsupportedReason::Cursor);
}
diff --git a/crates/item_filter_index/src/test.rs b/crates/item_filter_index/src/test.rs
index 47f84128e0..dac737a349 100644
--- a/crates/item_filter_index/src/test.rs
+++ b/crates/item_filter_index/src/test.rs
@@ -397,3 +397,15 @@ fn invalid_limit_is_a_validation_error_not_unsupported() {
Err(CompileError::Validation(ValidationError::Limit(0)))
);
}
+
+#[test]
+fn initiative_queries_use_server_instead_of_incomplete_local_index() {
+ let mut ast = excluded_deferred_partitions();
+ ast.initiative_filter = Some(Arc::new(Expr::val(
+ item_filters::ast::initiative::InitiativeLiteral::Include,
+ )));
+ assert_eq!(
+ check_soup_flat_v3(&ast, request()),
+ Eligibility::Unsupported(UnsupportedReason::Partition("initiative"))
+ );
+}
diff --git a/crates/item_filters/src/ast.rs b/crates/item_filters/src/ast.rs
index e5346795f3..93f43c8630 100644
--- a/crates/item_filters/src/ast.rs
+++ b/crates/item_filters/src/ast.rs
@@ -4,7 +4,7 @@
use crate::{
AgentSessionFilters, CalendarEventFilters, CallFilters, ChannelFilters, ChannelThreadFilters,
ChatFilters, CrmCompanyFilters, DocumentFilters, EmailFilters, EntityFilters,
- ForeignEntityFilters, ProjectFilters, PropertyFilter, ReminderFilters,
+ ForeignEntityFilters, InitiativeFilters, ProjectFilters, PropertyFilter, ReminderFilters,
ast::{
agent_session::AgentSessionLiteral,
calendar_event::CalendarEventLiteral,
@@ -14,6 +14,7 @@ use crate::{
crm_company::CrmCompanyLiteral,
email::EmailLiteral,
foreign_entity::ForeignEntityLiteral,
+ initiative::InitiativeLiteral,
project::ProjectLiteral,
properties::PropertiesLiteral,
reminder::ReminderLiteral,
@@ -46,6 +47,8 @@ pub mod document;
pub mod email;
/// contains the ast literal value for foreign entities
pub mod foreign_entity;
+/// Initiative filter literals.
+pub mod initiative;
/// contains the ast literal value for projects
pub mod project;
/// contains the ast literal value for property-based filtering
@@ -236,6 +239,10 @@ pub struct EntityFilterAst {
#[serde(default, rename = "asf")]
#[cfg_attr(feature = "schema", schema(value_type = serde_json::Value))]
pub agent_session_filter: LiteralTree<AgentSessionLiteral>,
+ /// Initiative filter, absent for queries that do not request initiatives.
+ #[serde(default, rename = "if")]
+ #[cfg_attr(feature = "schema", schema(value_type = serde_json::Value))]
+ pub initiative_filter: LiteralTree<InitiativeLiteral>,
/// the filters that should be applied based on entity properties
#[serde(default, rename = "propf")]
#[cfg_attr(feature = "schema", schema(value_type = serde_json::Value))]
@@ -291,6 +298,8 @@ impl EntityFilterAst {
entity_filter.agent_session_filters,
)?
.map(Arc::new),
+ initiative_filter: InitiativeFilters::expand_ast(entity_filter.initiative_filters)?
+ .map(Arc::new),
properties_filter: Vec::<PropertyFilter>::expand_ast(entity_filter.property_filters)?
.map(Arc::new),
}))
@@ -330,6 +339,7 @@ impl EntityFilterAst {
foreign_entity_filter: None,
reminder_filter: None,
agent_session_filter: None,
+ initiative_filter: None,
properties_filter: None,
}
}
@@ -365,6 +375,7 @@ impl IsEmpty for EntityFilterAst {
foreign_entity_filter,
reminder_filter,
agent_session_filter,
+ initiative_filter,
properties_filter,
} = self;
calendar_event_filter.is_none()
@@ -379,6 +390,7 @@ impl IsEmpty for EntityFilterAst {
&& foreign_entity_filter.is_none()
&& reminder_filter.is_none()
&& agent_session_filter.is_none()
+ && initiative_filter.is_none()
&& properties_filter.is_none()
}
}
diff --git a/crates/item_filters/src/ast/initiative.rs b/crates/item_filters/src/ast/initiative.rs
new file mode 100644
index 0000000000..b019be6c3a
--- /dev/null
+++ b/crates/item_filters/src/ast/initiative.rs
@@ -0,0 +1,84 @@
+use chrono::{DateTime, Utc};
+use filter_ast::{ExpandFrame, Expr, FoldTree, TryExpandNode};
+use model_owner::Owner;
+use serde::{Deserialize, Serialize};
+use uuid::Uuid;
+
+use crate::{InitiativeFilters, ast::ExpandErr};
+
+/// The possible literal values in an initiative filter AST.
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub enum InitiativeLiteral {
+ /// Opt this query into initiatives at all.
+ ///
+ /// Like reminders, initiatives are **off by default** — a query that
+ /// says nothing about them gets none, so adding them to Soup did not
+ /// change what pre-existing Soup views return. Asking for specific ids
+ /// or owners also counts as opting in.
+ #[serde(rename = "inc")]
+ Include,
+ /// Case-insensitive substring of the initiative name.
+ NameContains(String),
+ /// Inclusive upper due-date bound.
+ DueBefore(DateTime<Utc>),
+ /// Inclusive lower due-date bound.
+ DueAfter(DateTime<Utc>),
+ /// Filter by initiative id.
+ #[serde(rename = "id")]
+ Id(Uuid),
+ /// Filter by the initiative's owner.
+ #[serde(rename = "o")]
+ Owner(Owner),
+}
+
+impl ExpandFrame<InitiativeLiteral> for InitiativeFilters {
+ type Err = ExpandErr;
+
+ fn expand_ast(
+ filter_request: InitiativeFilters,
+ ) -> Result<Option<Expr<InitiativeLiteral>>, Self::Err> {
+ let InitiativeFilters {
+ include,
+ initiative_ids,
+ owners,
+ name,
+ due_before,
+ due_after,
+ } = filter_request;
+
+ let include = include.then_some(Expr::val(InitiativeLiteral::Include));
+
+ let ids = initiative_ids
+ .iter()
+ .map(|s| Uuid::parse_str(s))
+ .try_expand(|r| r.map(InitiativeLiteral::Id), Expr::or)?;
+
+ let owners = owners
+ .iter()
+ .map(|owner| Owner::from_principal_str(owner))
+ .try_expand(|r| r.map(InitiativeLiteral::Owner), Expr::or)?;
+
+ Ok([
+ include,
+ ids,
+ owners,
+ name.map(|v| Expr::val(InitiativeLiteral::NameContains(v))),
+ due_before.map(|v| Expr::val(InitiativeLiteral::DueBefore(v))),
+ due_after.map(|v| Expr::val(InitiativeLiteral::DueAfter(v))),
+ ]
+ .into_iter()
+ .fold_with(Expr::and))
+ }
+}
+
+/// Whether this expression explicitly requests initiatives. A missing filter or
+/// a solely negative expression preserves the default exclusion.
+pub fn initiatives_requested(filter: Option<&Expr<InitiativeLiteral>>) -> bool {
+ match filter {
+ Some(Expr::Literal(_)) => true,
+ Some(Expr::And(a, b) | Expr::Or(a, b)) => {
+ initiatives_requested(Some(a)) || initiatives_requested(Some(b))
+ }
+ Some(Expr::Not(_)) | None => false,
+ }
+}
diff --git a/crates/item_filters/src/ast/properties.rs b/crates/item_filters/src/ast/properties.rs
index 960a196116..13db210e9f 100644
--- a/crates/item_filters/src/ast/properties.rs
+++ b/crates/item_filters/src/ast/properties.rs
@@ -25,6 +25,8 @@ pub enum PropertyEntityType {
Company,
/// Document entity
Document,
+ /// Initiative entity
+ Initiative,
/// Project entity
Project,
/// Task entity
@@ -49,6 +51,7 @@ impl FromStr for PropertyEntityType {
"CHAT" => Ok(Self::Chat),
"COMPANY" => Ok(Self::Company),
"DOCUMENT" => Ok(Self::Document),
+ "INITIATIVE" => Ok(Self::Initiative),
"PROJECT" => Ok(Self::Project),
"TASK" => Ok(Self::Task),
"THREAD" => Ok(Self::Thread),
@@ -66,6 +69,7 @@ impl fmt::Display for PropertyEntityType {
Self::Chat => write!(f, "CHAT"),
Self::Company => write!(f, "COMPANY"),
Self::Document => write!(f, "DOCUMENT"),
+ Self::Initiative => write!(f, "INITIATIVE"),
Self::Project => write!(f, "PROJECT"),
Self::Task => write!(f, "TASK"),
Self::Thread => write!(f, "THREAD"),
diff --git a/crates/item_filters/src/ast/tests.rs b/crates/item_filters/src/ast/tests.rs
index 510165fb72..ec289b6a21 100644
--- a/crates/item_filters/src/ast/tests.rs
+++ b/crates/item_filters/src/ast/tests.rs
@@ -1631,3 +1631,26 @@ fn requests_crm_scope_reflects_email_crm_scope_tag() {
ast.email_filter.crm_scope = Some(CrmScope::Domains(vec!["example.com".into()]));
assert!(ast.requests_crm_scope());
}
+
+#[test]
+fn initiatives_expand_with_properties_without_enabling_legacy_queries() {
+ let empty = EntityFilterAst::new_from_filters(EntityFilters::default()).unwrap();
+ assert!(empty.is_none());
+ let filter = EntityFilters {
+ initiative_filters: crate::InitiativeFilters {
+ include: true,
+ name: Some("Launch".into()),
+ ..Default::default()
+ },
+ property_filters: vec![crate::PropertyFilter {
+ property_definition_id: "00000001-0000-0000-0000-000000000002".into(),
+ entity_type: Some("INITIATIVE".into()),
+ option_ids: vec!["00000000-0000-0000-0000-000000000001".into()],
+ ..Default::default()
+ }],
+ ..Default::default()
+ };
+ let ast = EntityFilterAst::new_from_filters(filter).unwrap().unwrap();
+ assert!(ast.initiative_filter.is_some());
+ assert!(ast.properties_filter.is_some());
+}
diff --git a/crates/item_filters/src/lib.rs b/crates/item_filters/src/lib.rs
index 1056e7b78c..6b48802e5e 100644
--- a/crates/item_filters/src/lib.rs
+++ b/crates/item_filters/src/lib.rs
@@ -471,6 +471,53 @@ impl IsEmpty for ReminderFilters {
}
}
+/// Filters for initiatives.
+#[derive(Debug, Serialize, Deserialize, Default, PartialEq, Clone)]
+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema, schemars::JsonSchema))]
+pub struct InitiativeFilters {
+ /// Opt this query into initiatives at all. Initiatives are off by
+ /// default — see [`crate::ast::initiative::InitiativeLiteral::Include`].
+ /// Asking for specific `initiative_ids` or `owners` also opts in.
+ #[serde(default, skip_serializing_if = "std::ops::Not::not")]
+ pub include: bool,
+ /// Initiative ids to filter by. Empty to include all accessible initiatives.
+ #[serde(default, skip_serializing_if = "Vec::is_empty")]
+ pub initiative_ids: Vec<String>,
+ /// Filter by initiative owner principal — a user ('macro|[email protected]'), a bot
+ /// ('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every
+ /// owner.
+ #[serde(default, skip_serializing_if = "Vec::is_empty")]
+ pub owners: Vec<String>,
+ /// Case-insensitive name substring.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub name: Option<String>,
+ /// Inclusive upper due-date bound.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub due_before: Option<chrono::DateTime<chrono::Utc>>,
+ /// Inclusive lower due-date bound.
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub due_after: Option<chrono::DateTime<chrono::Utc>>,
+}
+
+impl IsEmpty for InitiativeFilters {
+ fn is_empty(&self) -> bool {
+ let InitiativeFilters {
+ include,
+ initiative_ids,
+ owners,
+ name,
+ due_before,
+ due_after,
+ } = self;
+ !include
+ && initiative_ids.is_empty()
+ && owners.is_empty()
+ && name.is_none()
+ && due_before.is_none()
+ && due_after.is_none()
+ }
+}
+
/// Filters for agent sessions.
#[derive(Debug, Serialize, Deserialize, Default, PartialEq, Clone)]
#[cfg_attr(feature = "schema", derive(utoipa::ToSchema, schemars::JsonSchema))]
@@ -802,6 +849,9 @@ pub struct EntityFilters {
/// the bundled [ReminderFilters]
#[serde(default)]
pub reminder_filters: ReminderFilters,
+ /// Initiative filters. Initiatives are opt-in.
+ #[serde(default)]
+ pub initiative_filters: InitiativeFilters,
/// the bundled [AgentSessionFilters]
#[serde(default)]
pub agent_session_filters: AgentSessionFilters,
@@ -834,6 +884,7 @@ impl IsEmpty for EntityFilters {
foreign_entity_filters,
reminder_filters,
agent_session_filters,
+ initiative_filters,
property_filters,
tag_option_ids,
// Mode is a modifier on tag_option_ids, not a filter by itself.
@@ -851,6 +902,7 @@ impl IsEmpty for EntityFilters {
&& foreign_entity_filters.is_empty()
&& reminder_filters.is_empty()
&& agent_session_filters.is_empty()
+ && initiative_filters.is_empty()
&& property_filters.iter().all(IsEmpty::is_empty)
&& tag_option_ids.is_empty()
}
diff --git a/crates/macro_db_client/migrations/20260922164805_add_initiative_property_entity_type.sql b/crates/macro_db_client/migrations/20260922164805_add_initiative_property_entity_type.sql
new file mode 100644
index 0000000000..603c753571
--- /dev/null
+++ b/crates/macro_db_client/migrations/20260922164805_add_initiative_property_entity_type.sql
@@ -0,0 +1,3 @@
+-- PROJECT continues to mean a folder. The new frontend Projects use INITIATIVE.
+-- Keep this separate from its backfill: enum values must be committed before use.
+ALTER TYPE property_entity_type ADD VALUE IF NOT EXISTS 'INITIATIVE';
diff --git a/crates/macro_db_client/migrations/20260922164832_backfill_initiative_system_properties.sql b/crates/macro_db_client/migrations/20260922164832_backfill_initiative_system_properties.sql
new file mode 100644
index 0000000000..95f4223400
--- /dev/null
+++ b/crates/macro_db_client/migrations/20260922164832_backfill_initiative_system_properties.sql
@@ -0,0 +1,12 @@
+-- Reuse the task definitions and null defaults for existing initiatives.
+INSERT INTO entity_properties (id, entity_id, entity_type, property_definition_id, values)
+SELECT gen_random_uuid(), initiative.id::text, 'INITIATIVE'::property_entity_type, definition.id, 'null'::jsonb
+FROM initiative
+CROSS JOIN property_definitions AS definition
+WHERE definition.id IN (
+ '00000001-0000-0000-0000-000000000001'::uuid, -- Assignees
+ '00000001-0000-0000-0000-000000000002'::uuid, -- Status
+ '00000001-0000-0000-0000-000000000003'::uuid, -- Priority
+ '00000001-0000-0000-0000-000000000004'::uuid -- Due Date
+)
+ON CONFLICT (entity_id, entity_type, property_definition_id) DO NOTHING;
diff --git a/crates/models_properties/src/api/property_target.rs b/crates/models_properties/src/api/property_target.rs
index 61813e4b7e..fb563958f1 100644
--- a/crates/models_properties/src/api/property_target.rs
+++ b/crates/models_properties/src/api/property_target.rs
@@ -21,7 +21,9 @@ pub enum PropertyTargetEntityType {
Company,
/// Document, including tasks and snippets.
Document,
- /// Project.
+ /// Initiative, displayed as a Project in the application.
+ Initiative,
+ /// Folder project.
Project,
/// Email thread.
Thread,
diff --git a/crates/models_properties/src/shared/entity_type.rs b/crates/models_properties/src/shared/entity_type.rs
index 18a0657f14..d74dbf8b34 100644
--- a/crates/models_properties/src/shared/entity_type.rs
+++ b/crates/models_properties/src/shared/entity_type.rs
@@ -5,6 +5,9 @@ use serde::{Deserialize, Serialize};
use std::{fmt, str::FromStr};
use utoipa::ToSchema;
+#[cfg(test)]
+mod test;
+
/// Type of entity that can be referenced by entity properties.
#[derive(Debug, Clone, Copy, Serialize, Deserialize, ToSchema, PartialEq, Eq, Hash, sqlx::Type)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
@@ -19,6 +22,8 @@ pub enum EntityType {
Chat,
Company,
Document,
+ /// Initiative, displayed as a Project in the application.
+ Initiative,
Project,
Task,
Thread,
@@ -34,6 +39,7 @@ impl fmt::Display for EntityType {
EntityType::Chat => write!(f, "chat"),
EntityType::Company => write!(f, "company"),
EntityType::Document => write!(f, "document"),
+ EntityType::Initiative => write!(f, "initiative"),
EntityType::Project => write!(f, "project"),
EntityType::Task => write!(f, "task"),
EntityType::Thread => write!(f, "thread"),
@@ -56,6 +62,7 @@ impl FromStr for EntityType {
"chat" => Ok(Self::Chat),
"company" => Ok(Self::Company),
"document" => Ok(Self::Document),
+ "initiative" => Ok(Self::Initiative),
"project" => Ok(Self::Project),
"task" => Ok(Self::Task),
"thread" => Ok(Self::Thread),
diff --git a/crates/models_properties/src/shared/entity_type/test.rs b/crates/models_properties/src/shared/entity_type/test.rs
new file mode 100644
index 0000000000..0e77409e30
--- /dev/null
+++ b/crates/models_properties/src/shared/entity_type/test.rs
@@ -0,0 +1,24 @@
+use super::*;
+use crate::api::PropertyTargetEntityType;
+
+#[test]
+fn initiative_storage_and_target_spelling_is_distinct_from_folder_projects() {
+ assert_eq!(
+ serde_json::to_string(&EntityType::Initiative).unwrap(),
+ "\"INITIATIVE\""
+ );
+ assert_eq!(
+ serde_json::to_string(&PropertyTargetEntityType::Initiative).unwrap(),
+ "\"INITIATIVE\""
+ );
+ assert_eq!(
+ EntityType::from_str("INITIATIVE").unwrap(),
+ EntityType::Initiative
+ );
+ assert_eq!(EntityType::Initiative.to_string(), "initiative");
+ assert_eq!(
+ EntityType::from_str("project").unwrap(),
+ EntityType::Project
+ );
+ assert_ne!(EntityType::Initiative, EntityType::Project);
+}
diff --git a/crates/models_soup/src/initiative.rs b/crates/models_soup/src/initiative.rs
new file mode 100644
index 0000000000..d440151644
--- /dev/null
+++ b/crates/models_soup/src/initiative.rs
@@ -0,0 +1,29 @@
+use chrono::{DateTime, Utc};
+use model_owner::Owner;
+use serde::{Deserialize, Serialize};
+use uuid::Uuid;
+
+/// An initiative (called a project in the frontend) in the Soup feed.
+#[derive(Serialize, Clone, Deserialize, Debug)]
+#[serde(rename_all = "camelCase")]
+#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]
+pub struct SoupInitiative<T = ()> {
+ /// Initiative identifier.
+ pub id: Uuid,
+ /// Initiative display name.
+ pub name: String,
+ /// Initiative owner.
+ #[cfg_attr(feature = "schema", schema(value_type = String))]
+ pub owner_id: Owner,
+ /// Document holding the initiative description.
+ pub description_document_id: Option<Uuid>,
+ /// Creation timestamp.
+ pub created_at: DateTime<Utc>,
+ /// Last modification timestamp.
+ pub updated_at: DateTime<Utc>,
+ /// Last time the requesting user viewed the initiative.
+ pub viewed_at: Option<DateTime<Utc>>,
+ /// Enrichment attached by the caller.
+ #[serde(flatten)]
+ pub extra: T,
+}
diff --git a/crates/models_soup/src/item.rs b/crates/models_soup/src/item.rs
index 1264743275..9cbe4d6044 100644
--- a/crates/models_soup/src/item.rs
+++ b/crates/models_soup/src/item.rs
@@ -5,6 +5,7 @@ use crate::crm_company::SoupCrmCompany;
use crate::document::SoupDocument;
use crate::email_thread::SoupEnrichedEmailThreadPreview;
use crate::foreign_entity::SoupForeignEntity;
+use crate::initiative::SoupInitiative;
use crate::project::SoupProject;
use crate::reminder::SoupReminder;
use crate::{
@@ -32,6 +33,8 @@ pub enum SoupItem<T = ()> {
Chat(SoupChat<T>),
/// Project item.
Project(SoupProject<T>),
+ /// Initiative entity.
+ Initiative(SoupInitiative<T>),
/// Email thread item.
EmailThread(SoupEnrichedEmailThreadPreview<T>),
/// Channel item.
@@ -62,6 +65,9 @@ impl<T> SoupItem<T> {
SoupItem::Chat(soup_chat) => {
EntityType::Chat.with_entity_string(soup_chat.id.to_string())
}
+ SoupItem::Initiative(initiative) => {
+ EntityType::Initiative.with_entity_string(initiative.id.to_string())
+ }
SoupItem::Project(soup_project) => {
EntityType::Project.with_entity_string(soup_project.id.to_string())
}
@@ -101,6 +107,7 @@ impl<T> SoupItem<T> {
SoupItem::Document(soup_document) => soup_document.updated_at,
SoupItem::Chat(soup_chat) => soup_chat.updated_at,
SoupItem::Project(soup_project) => soup_project.updated_at,
+ SoupItem::Initiative(initiative) => initiative.updated_at,
SoupItem::EmailThread(soup_thread) => soup_thread.thread.updated_at,
SoupItem::Channel(soup_channel) => soup_channel.channel.channel.updated_at,
SoupItem::ChannelThread(thread) => thread.effective_updated_at(),
@@ -140,6 +147,18 @@ impl<T> SoupItem<T> {
(SoupItem::Chat(soup_chat), SimpleSortMethod::ViewedUpdated) => {
soup_chat.viewed_at.unwrap_or(soup_chat.updated_at)
}
+ (SoupItem::Initiative(initiative), SimpleSortMethod::ViewedAt) => {
+ initiative.viewed_at.unwrap_or_default()
+ }
+ (SoupItem::Initiative(initiative), SimpleSortMethod::UpdatedAt) => {
+ initiative.updated_at
+ }
+ (SoupItem::Initiative(initiative), SimpleSortMethod::CreatedAt) => {
+ initiative.created_at
+ }
+ (SoupItem::Initiative(initiative), SimpleSortMethod::ViewedUpdated) => {
+ initiative.viewed_at.unwrap_or(initiative.updated_at)
+ }
(SoupItem::Project(soup_project), SimpleSortMethod::ViewedAt) => {
soup_project.viewed_at.unwrap_or_default()
}
@@ -221,6 +240,10 @@ impl<T> SoupItem<T> {
SoupItem::Document(doc) => {
Some(EntityReference::new(doc.id.to_string(), doc.entity_type()))
}
+ SoupItem::Initiative(initiative) => Some(EntityReference::new(
+ initiative.id.to_string(),
+ PropertiesEntityType::Initiative,
+ )),
SoupItem::Project(p) => Some(EntityReference::new(
p.id.to_string(),
PropertiesEntityType::Project,
@@ -320,6 +343,25 @@ impl<T> SoupItem<T> {
deleted_at,
extra: f(extra),
}),
+ SoupItem::Initiative(SoupInitiative {
+ id,
+ name,
+ owner_id,
+ description_document_id,
+ created_at,
+ updated_at,
+ viewed_at,
+ extra,
+ }) => SoupItem::Initiative(SoupInitiative {
+ id,
+ name,
+ owner_id,
+ description_document_id,
+ created_at,
+ updated_at,
+ viewed_at,
+ extra: f(extra),
+ }),
SoupItem::Project(SoupProject {
id,
name,
@@ -534,6 +576,7 @@ impl<T> Identify for SoupItem<T> {
SoupItem::Document(soup_document) => soup_document.id,
SoupItem::Chat(soup_chat) => soup_chat.id,
SoupItem::Project(soup_project) => soup_project.id,
+ SoupItem::Initiative(initiative) => initiative.id,
SoupItem::EmailThread(thread) => thread.thread.id,
SoupItem::Channel(soup_channel) => soup_channel.channel.channel.id.0,
SoupItem::ChannelThread(thread) => thread.id,
diff --git a/crates/models_soup/src/lib.rs b/crates/models_soup/src/lib.rs
index 4ed26d75e9..82f75143db 100644
--- a/crates/models_soup/src/lib.rs
+++ b/crates/models_soup/src/lib.rs
@@ -20,6 +20,8 @@ pub mod document;
pub mod email_thread;
/// Foreign entity models for Soup responses.
pub mod foreign_entity;
+/// Initiative models for Soup responses.
+pub mod initiative;
/// Unified Soup feed item model.
pub mod item;
/// Project models for Soup responses.
diff --git a/crates/properties/src/domain/activity.rs b/crates/properties/src/domain/activity.rs
index a03db2f160..a37ea86f52 100644
--- a/crates/properties/src/domain/activity.rs
+++ b/crates/properties/src/domain/activity.rs
@@ -25,6 +25,7 @@ fn entity_type(property_entity: &PropertyEntityType) -> Option<EntityType> {
// Tasks are documents with a task sub-type.
PropertyEntityType::Document | PropertyEntityType::Task => Some(EntityType::Document),
PropertyEntityType::Project => Some(EntityType::Project),
+ PropertyEntityType::Initiative => Some(EntityType::Initiative),
PropertyEntityType::Chat => Some(EntityType::Chat),
PropertyEntityType::Channel => Some(EntityType::Channel),
PropertyEntityType::Thread => Some(EntityType::EmailThread),
diff --git a/crates/properties/src/domain/activity/test.rs b/crates/properties/src/domain/activity/test.rs
index 82f8dbff26..c95a14d6ef 100644
--- a/crates/properties/src/domain/activity/test.rs
+++ b/crates/properties/src/domain/activity/test.rs
@@ -87,6 +87,18 @@ fn unattributed_property_update_is_dropped() {
assert_eq!(event.event.ingest(event.event_id), Ingest::Ignore);
}
+#[test]
+fn initiative_property_changes_keep_the_initiative_identity() {
+ let mut metadata = update(Some(user("macro|[email protected]")));
+ metadata.entity_type = PropertyEntityType::Initiative;
+ let event = envelope(PropertyTopicEvent::EntityPropertyUpdated(metadata));
+ let Ingest::Insert(activities) = event.event.ingest(event.event_id) else {
+ panic!("expected initiative activity");
+ };
+ assert_eq!(activities[0].entity_type, ActivityEntityType::Initiative);
+ assert!(matches!(activities[0].action, Action::PropertyChanged(_)));
+}
+
#[test]
fn delegated_property_update_keeps_the_user_as_subject() {
let mut metadata = update(None);
diff --git a/crates/properties/src/domain/model.rs b/crates/properties/src/domain/model.rs
index c4fac1b688..cd0473e41f 100644
--- a/crates/properties/src/domain/model.rs
+++ b/crates/properties/src/domain/model.rs
@@ -25,6 +25,7 @@ pub fn canonical_entity_type(entity_type: EntityType) -> AccessEntityType {
EntityType::CallRecord => AccessEntityType::Call,
EntityType::Chat => AccessEntityType::Chat,
EntityType::Project => AccessEntityType::Project,
+ EntityType::Initiative => AccessEntityType::Initiative,
EntityType::Thread => AccessEntityType::EmailThread,
EntityType::Channel => AccessEntityType::Channel,
EntityType::Company => AccessEntityType::CrmCompany,
@@ -44,6 +45,7 @@ pub fn storage_entity_type(entity_type: AccessEntityType) -> Option<EntityType>
AccessEntityType::Call => Some(EntityType::CallRecord),
AccessEntityType::Chat => Some(EntityType::Chat),
AccessEntityType::Project => Some(EntityType::Project),
+ AccessEntityType::Initiative => Some(EntityType::Initiative),
AccessEntityType::EmailThread => Some(EntityType::Thread),
AccessEntityType::Channel => Some(EntityType::Channel),
AccessEntityType::CrmCompany => Some(EntityType::Company),
@@ -56,8 +58,7 @@ pub fn storage_entity_type(entity_type: AccessEntityType) -> Option<EntityType>
| AccessEntityType::Reminder
| AccessEntityType::Skill
| AccessEntityType::AgentSession
- | AccessEntityType::ScheduledAction
- | AccessEntityType::Initiative => None,
+ | AccessEntityType::ScheduledAction => None,
}
}
diff --git a/crates/properties/src/domain/model/test.rs b/crates/properties/src/domain/model/test.rs
index e6682ef7c4..35dc21e867 100644
--- a/crates/properties/src/domain/model/test.rs
+++ b/crates/properties/src/domain/model/test.rs
@@ -1,12 +1,13 @@
use super::*;
-const STORAGE_TYPES: [EntityType; 10] = [
+const STORAGE_TYPES: [EntityType; 11] = [
EntityType::CalendarEvent,
EntityType::CallRecord,
EntityType::Channel,
EntityType::Chat,
EntityType::Company,
EntityType::Document,
+ EntityType::Initiative,
EntityType::Project,
EntityType::Task,
EntityType::Thread,
@@ -52,7 +53,6 @@ fn canonical_types_without_properties_storage_map_to_none() {
AccessEntityType::Skill,
AccessEntityType::AgentSession,
AccessEntityType::ScheduledAction,
- AccessEntityType::Initiative,
] {
assert_eq!(storage_entity_type(unsupported), None, "{unsupported:?}");
}
diff --git a/crates/properties/src/domain/ports.rs b/crates/properties/src/domain/ports.rs
index 3cb5235956..ee304807db 100644
--- a/crates/properties/src/domain/ports.rs
+++ b/crates/properties/src/domain/ports.rs
@@ -4,6 +4,7 @@
//! Implementations live in the outbound module.
use std::collections::HashMap;
+use std::pin::Pin;
use document_sub_type::DocumentSubType;
use entity_access::domain::models::EntityType as AccessEntityType;
@@ -112,6 +113,15 @@ pub trait PropertiesRepo: Send + Sync + 'static {
property_definition_id: Uuid,
) -> impl Future<Output = Result<Vec<PropertyOption>, Self::Err>> + Send;
+ /// Read options for requested system, caller-owned, or caller-team definitions.
+ /// Missing or inaccessible definitions are omitted; visible definitions with no options remain.
+ fn get_visible_property_options_batch<'a>(
+ &self,
+ property_definition_ids: &[Uuid],
+ user_id: &MacroUserIdStr<'a>,
+ team_id: Option<Uuid>,
+ ) -> impl Future<Output = Result<HashMap<Uuid, Vec<PropertyOption>>, Self::Err>> + Send;
+
/// Create a new property option.
fn create_property_option(
&self,
@@ -459,3 +469,15 @@ pub trait NotificationService: Send + Sync + 'static {
notification: TaskAssignedNotification<'a>,
) -> impl Future<Output = Result<(), Self::Err>> + Send;
}
+
+/// Initiative-owned sharing operations required when assigning a project.
+/// The implementation keeps grants on the initiative and its description in
+/// sync while leaving the owning initiative service in charge of sharing side effects.
+pub trait InitiativeAssigneeService: std::fmt::Debug + Send + Sync + 'static {
+ /// Grant assignees edit access, preserving existing grants when cleared.
+ fn grant_assignees<'a>(
+ &'a self,
+ access: &'a EditReceipt,
+ user_ids: Vec<MacroUserIdStr<'static>>,
+ ) -> Pin<Box<dyn Future<Output = Result<(), super::error::PropertiesErr>> + Send + 'a>>;
+}
diff --git a/crates/properties/src/domain/service.rs b/crates/properties/src/domain/service.rs
index 0236cdc653..852af45524 100644
--- a/crates/properties/src/domain/service.rs
+++ b/crates/properties/src/domain/service.rs
@@ -205,6 +205,15 @@ pub trait PropertiesService: Send + Sync + 'static {
team: Option<&TeamReceipt>,
) -> impl Future<Output = Result<Vec<PropertyOption>, PropertiesErr>> + Send;
+ /// Batch options for requested definitions readable by the caller.
+ /// Missing or inaccessible definitions are omitted, including their options.
+ fn get_property_options_batch(
+ &self,
+ property_definition_ids: &[Uuid],
+ user_id: &MacroUserIdStr<'_>,
+ team: Option<&TeamReceipt>,
+ ) -> impl Future<Output = Result<HashMap<Uuid, Vec<PropertyOption>>, PropertiesErr>> + Send;
+
/// Add a new option to a select property owned by the caller.
/// Validates the request against the property's data type, including the
/// tag color rules.
diff --git a/crates/properties/src/domain/service_impl.rs b/crates/properties/src/domain/service_impl.rs
index 29463c92f9..3e334f2728 100644
--- a/crates/properties/src/domain/service_impl.rs
+++ b/crates/properties/src/domain/service_impl.rs
@@ -5,6 +5,7 @@ mod options;
mod task_properties;
use std::collections::{HashMap, HashSet};
+use std::sync::Arc;
use activity::Actor;
use document_sub_type::DocumentSubType;
@@ -29,7 +30,7 @@ use models_properties::service::property_definition_with_options::PropertyDefini
use models_properties::service::property_option::{PropertyOption, PropertyOptionValue};
use models_properties::service::property_value::PropertyValue;
use models_properties::{EntityReference, EntityType};
-use system_properties::SystemPropertyKey;
+use system_properties::{StatusOption, SystemPropertyKey};
use uuid::Uuid;
use super::error::PropertiesErr;
@@ -46,7 +47,9 @@ use super::model::{
ResolvedPropertySubject, TagPromotionOutcome, TagRemapOutcome, TagScope, TagSet,
UpdatePropertyOptionOutcome, ViewReceipt,
};
-use super::ports::{NotificationService, PermissionService, PropertiesRepo};
+use super::ports::{
+ InitiativeAssigneeService, NotificationService, PermissionService, PropertiesRepo,
+};
use super::service::{PropertiesService, TeamReceipt, team_id_from_receipt};
use helpers::{
@@ -102,6 +105,7 @@ where
permission_service: Option<P>,
notification_service: Option<N>,
event_broker: B,
+ initiative_assignees: Option<Arc<dyn InitiativeAssigneeService>>,
}
impl<R, P, N> PropertiesServiceImpl<R, P, N>
@@ -121,6 +125,7 @@ where
permission_service,
notification_service,
event_broker: NoopMacroEventBroker,
+ initiative_assignees: None,
}
}
}
@@ -142,9 +147,19 @@ where
permission_service: self.permission_service,
notification_service: self.notification_service,
event_broker,
+ initiative_assignees: self.initiative_assignees,
}
}
+ /// Supply the initiative domain's assignee-sharing capability.
+ pub fn with_initiative_assignees(
+ mut self,
+ initiative_assignees: Arc<dyn InitiativeAssigneeService>,
+ ) -> Self {
+ self.initiative_assignees = Some(initiative_assignees);
+ self
+ }
+
/// Publish a property lifecycle event without coupling broker availability
/// to a completed mutation.
fn publish_property_event(&self, event: PropertyMacroEvent) {
@@ -639,6 +654,23 @@ where
// Validate property options at service layer (before upserting)
let option_ids = extract_option_ids_from_property_value(&property_value);
+ if entity_type == EntityType::Initiative
+ && property_definition_id == SystemPropertyKey::STATUS_UUID
+ && option_ids.iter().any(|option_id| {
+ !matches!(
+ StatusOption::from_uuid(*option_id),
+ Some(
+ StatusOption::NotStarted
+ | StatusOption::InProgress
+ | StatusOption::Completed
+ )
+ )
+ })
+ {
+ return Err(PropertiesErr::Validation(
+ "Project status must be Not Started, In Progress, or Completed".to_string(),
+ ));
+ }
if !option_ids.is_empty() {
self.validate_property_options(property_definition_id, &option_ids)
.await?;
@@ -684,6 +716,13 @@ where
.await?;
}
+ if property_definition_id == SystemPropertyKey::ASSIGNEES_UUID
+ && entity_type == EntityType::Initiative
+ {
+ self.handle_initiative_assignees_property(access, &property_value)
+ .await?;
+ }
+
let snapshot = self
.repository
.upsert_entity_property(
@@ -1223,6 +1262,24 @@ where
.map_err(anyhow::Error::from)?)
}
+ #[tracing::instrument(skip(self, team), err)]
+ async fn get_property_options_batch(
+ &self,
+ property_definition_ids: &[Uuid],
+ user_id: &MacroUserIdStr<'_>,
+ team: Option<&TeamReceipt>,
+ ) -> Result<HashMap<Uuid, Vec<PropertyOption>>, PropertiesErr> {
+ Ok(self
+ .repository
+ .get_visible_property_options_batch(
+ property_definition_ids,
+ user_id,
+ team_id_from_receipt(team),
+ )
+ .await
+ .map_err(anyhow::Error::from)?)
+ }
+
#[tracing::instrument(skip(self, team, request), fields(request = ?request), err)]
async fn add_property_option(
&self,
diff --git a/crates/properties/src/domain/service_impl/task_properties.rs b/crates/properties/src/domain/service_impl/task_properties.rs
index 75ab4b14ad..ff85216afa 100644
--- a/crates/properties/src/domain/service_impl/task_properties.rs
+++ b/crates/properties/src/domain/service_impl/task_properties.rs
@@ -25,6 +25,40 @@ where
B: MacroEventBroker,
anyhow::Error: From<R::Err> + From<P::Err> + From<N::Err>,
{
+ /// Share the initiative through its owner domain before persisting assignees.
+ /// Clearing responsibility leaves previously granted edit access intact,
+ /// just as task assignment does.
+ pub(crate) async fn handle_initiative_assignees_property(
+ &self,
+ access: &EditReceipt,
+ value: &Option<PropertyValue>,
+ ) -> Result<(), PropertiesErr> {
+ let Some(PropertyValue::EntityRef(references)) = value else {
+ return Ok(());
+ };
+ let assignee_ids = references
+ .iter()
+ .map(|reference| {
+ if reference.entity_type != EntityType::User {
+ return Err(PropertiesErr::Validation(
+ "Assignees must reference users".to_string(),
+ ));
+ }
+ MacroUserIdStr::parse_from_str(&reference.entity_id)
+ .map(|user_id| user_id.into_owned())
+ .map_err(|error| PropertiesErr::Validation(error.to_string()))
+ })
+ .collect::<Result<Vec<_>, _>>()?;
+ if assignee_ids.is_empty() {
+ return Ok(());
+ }
+ self.initiative_assignees
+ .as_ref()
+ .ok_or(PropertiesErr::PermissionServiceNotConfigured)?
+ .grant_assignees(access, assignee_ids)
+ .await
+ }
+
/// Require edit access to every referenced task before linking: linking
/// mutates the referenced task's Parent Task / Subtasks property, so edit
/// access to the primary task alone is not enough. Internal (machine)
diff --git a/crates/properties/src/domain/test.rs b/crates/properties/src/domain/test.rs
index ac4614d0ab..77972da201 100644
--- a/crates/properties/src/domain/test.rs
+++ b/crates/properties/src/domain/test.rs
@@ -1,5 +1,8 @@
//! Unit tests for PropertiesServiceImpl using mockall-generated repo.
+mod initiatives;
+mod options_batch;
+
use super::service_impl::PropertiesServiceImpl;
use crate::domain::error::PropertiesErr;
use crate::domain::model::{
diff --git a/crates/properties/src/domain/test/initiatives.rs b/crates/properties/src/domain/test/initiatives.rs
new file mode 100644
index 0000000000..2e86d72ab1
--- /dev/null
+++ b/crates/properties/src/domain/test/initiatives.rs
@@ -0,0 +1,327 @@
+use super::*;
+use crate::domain::ports::InitiativeAssigneeService;
+use models_properties::EntityReference;
+use models_properties::api::requests::SetPropertyValue;
+use std::pin::Pin;
+
+#[derive(Debug, Default)]
+struct InitiativeSharing {
+ calls: Mutex<Vec<(String, Vec<String>)>>,
+ deny: bool,
+}
+
+impl InitiativeAssigneeService for InitiativeSharing {
+ fn grant_assignees<'a>(
+ &'a self,
+ access: &'a EditReceipt,
+ user_ids: Vec<MacroUserIdStr<'static>>,
+ ) -> Pin<Box<dyn Future<Output = Result<(), PropertiesErr>> + Send + 'a>> {
+ Box::pin(async move {
+ assert_eq!(access.entity_type(), AccessEntityType::Initiative);
+ if self.deny {
+ return Err(PropertiesErr::PermissionDenied);
+ }
+ self.calls.lock().unwrap().push((
+ access.entity_id().to_string(),
+ user_ids.iter().map(ToString::to_string).collect(),
+ ));
+ Ok(())
+ })
+ }
+}
+
+fn assignees_definition() -> PropertyDefinition {
+ PropertyDefinition {
+ id: SystemPropertyKey::ASSIGNEES_UUID,
+ owner: PropertyOwner::System,
+ display_name: "Assignees".into(),
+ data_type: DataType::Entity,
+ is_multi_select: true,
+ specific_entity_type: Some(EntityType::User),
+ created_at: chrono::Utc::now(),
+ updated_at: chrono::Utc::now(),
+ is_system: true,
+ is_metadata: false,
+ }
+}
+
+fn status_definition() -> PropertyDefinition {
+ PropertyDefinition {
+ id: SystemPropertyKey::STATUS_UUID,
+ display_name: "Status".into(),
+ data_type: DataType::SelectString,
+ is_multi_select: false,
+ specific_entity_type: None,
+ ..assignees_definition()
+ }
+}
+
+#[tokio::test]
+async fn initiative_status_rejects_review_and_canceled_without_writing() {
+ for status in [StatusOption::InReview, StatusOption::Canceled] {
+ let mut repo = MockPropertiesRepo::new();
+ repo.expect_get_property_definition()
+ .return_once(|_| Box::pin(async { Ok(Some(status_definition())) }));
+ repo.expect_count_valid_property_options()
+ .returning(|_, _| Box::pin(async { Ok(1) }));
+ repo.expect_upsert_entity_property().times(0);
+ let events = RecordingEventBroker::default();
+ let service = service_with_event_broker(repo, events.clone());
+
+ let result = service
+ .set_entity_property(
+ &edit_receipt("initiative1", EntityType::Initiative),
+ SystemPropertyKey::STATUS_UUID,
+ Some(SetPropertyValue::SelectOption {
+ option_id: status.uuid(),
+ }),
+ )
+ .await;
+
+ assert!(matches!(result, Err(PropertiesErr::Validation(_))));
+ assert!(events.events().is_empty());
+ }
+}
+
+#[tokio::test]
+async fn initiative_status_accepts_not_started_in_progress_and_completed() {
+ for status in [
+ StatusOption::NotStarted,
+ StatusOption::InProgress,
+ StatusOption::Completed,
+ ] {
+ let mut repo = MockPropertiesRepo::new();
+ repo.expect_get_property_definition()
+ .return_once(|_| Box::pin(async { Ok(Some(status_definition())) }));
+ repo.expect_count_valid_property_options()
+ .withf(move |property_id, options| {
+ *property_id == SystemPropertyKey::STATUS_UUID && options == [status.uuid()]
+ })
+ .return_once(|_, _| Box::pin(async { Ok(1) }));
+ repo.expect_upsert_entity_property()
+ .withf(move |_, kind, property_id, value| {
+ *kind == EntityType::Initiative
+ && *property_id == SystemPropertyKey::STATUS_UUID
+ && *value == Some(PropertyValue::SelectOption(vec![status.uuid()]))
+ })
+ .return_once(|id, kind, property_id, value| {
+ let snapshot = entity_property_mutation(id, kind, property_id, value);
+ Box::pin(async move { Ok(snapshot) })
+ });
+ let service = service_with_event_broker(repo, RecordingEventBroker::default());
+
+ let property = service
+ .set_entity_property(
+ &edit_receipt("initiative1", EntityType::Initiative),
+ SystemPropertyKey::STATUS_UUID,
+ Some(SetPropertyValue::SelectOption {
+ option_id: status.uuid(),
+ }),
+ )
+ .await
+ .unwrap();
+
+ assert_eq!(
+ property.value,
+ Some(PropertyValue::SelectOption(vec![status.uuid()]))
+ );
+ }
+}
+
+#[tokio::test]
+async fn task_status_still_accepts_review_and_canceled() {
+ for status in [StatusOption::InReview, StatusOption::Canceled] {
+ let task_id = Uuid::now_v7();
+ let mut repo = MockPropertiesRepo::new();
+ repo.expect_get_document_sub_types().return_once(move |_| {
+ Box::pin(async move { Ok(HashMap::from([(task_id, DocumentSubType::Task)])) })
+ });
+ repo.expect_get_property_definition()
+ .return_once(|_| Box::pin(async { Ok(Some(status_definition())) }));
+ repo.expect_count_valid_property_options()
+ .withf(move |property_id, options| {
+ *property_id == SystemPropertyKey::STATUS_UUID && options == [status.uuid()]
+ })
+ .return_once(|_, _| Box::pin(async { Ok(1) }));
+ repo.expect_upsert_entity_property()
+ .withf(move |_, kind, _, value| {
+ *kind == EntityType::Task
+ && *value == Some(PropertyValue::SelectOption(vec![status.uuid()]))
+ })
+ .return_once(|id, kind, property_id, value| {
+ let snapshot = entity_property_mutation(id, kind, property_id, value);
+ Box::pin(async move { Ok(snapshot) })
+ });
+ let service = service_with_event_broker(repo, RecordingEventBroker::default());
+
+ let property = service
+ .set_entity_property(
+ &edit_receipt(&task_id.to_string(), EntityType::Document),
+ SystemPropertyKey::STATUS_UUID,
+ Some(SetPropertyValue::SelectOption {
+ option_id: status.uuid(),
+ }),
+ )
+ .await
+ .unwrap();
+
+ assert_eq!(
+ property.value,
+ Some(PropertyValue::SelectOption(vec![status.uuid()]))
+ );
+ }
+}
+
+#[tokio::test]
+async fn assignees_share_the_initiative_and_allow_assigning_the_owner() {
+ let sharing = Arc::new(InitiativeSharing::default());
+ let expected_sharing = sharing.clone();
+ let mut repo = MockPropertiesRepo::new();
+ repo.expect_get_property_definition()
+ .return_once(|_| Box::pin(async { Ok(Some(assignees_definition())) }));
+ repo.expect_upsert_entity_property()
+ .return_once(move |id, kind, property_id, value| {
+ assert_eq!(kind, EntityType::Initiative);
+ assert_eq!(
+ expected_sharing.calls.lock().unwrap().len(),
+ 1,
+ "grants precede persistence"
+ );
+ let snapshot = entity_property_mutation(id, kind, property_id, value);
+ Box::pin(async move { Ok(snapshot) })
+ });
+ let service = PropertiesServiceImpl::new(
+ repo,
+ None::<MockPermissionService>,
+ None::<MockNotificationService>,
+ )
+ .with_initiative_assignees(sharing.clone());
+ let owner = caller_user_id();
+ let result = service
+ .set_entity_property(
+ &edit_receipt("initiative1", EntityType::Initiative),
+ SystemPropertyKey::ASSIGNEES_UUID,
+ Some(SetPropertyValue::MultiEntityReference {
+ references: vec![
+ EntityReference::new(owner.as_ref(), EntityType::User),
+ EntityReference::new("macro|[email protected]", EntityType::User),
+ ],
+ }),
+ )
+ .await
+ .unwrap();
+ assert_eq!(result.property.entity_type, EntityType::Initiative);
+ assert_eq!(
+ sharing.calls.lock().unwrap()[0],
+ (
+ "initiative1".into(),
+ vec![owner.to_string(), "macro|[email protected]".into()],
+ )
+ );
+}
+
+#[tokio::test]
+async fn assignee_grant_failure_does_not_persist_or_publish() {
+ let mut repo = MockPropertiesRepo::new();
+ repo.expect_get_property_definition()
+ .return_once(|_| Box::pin(async { Ok(Some(assignees_definition())) }));
+ repo.expect_upsert_entity_property().times(0);
+ let events = RecordingEventBroker::default();
+ let service = service_with_event_broker(repo, events.clone()).with_initiative_assignees(
+ Arc::new(InitiativeSharing {
+ deny: true,
+ ..Default::default()
+ }),
+ );
+ let result = service
+ .set_entity_property(
+ &edit_receipt("initiative1", EntityType::Initiative),
+ SystemPropertyKey::ASSIGNEES_UUID,
+ Some(SetPropertyValue::MultiEntityReference {
+ references: vec![EntityReference::new(
+ EntityType::User,
+ )],
+ }),
+ )
+ .await;
+ assert!(matches!(result, Err(PropertiesErr::PermissionDenied)));
+ assert!(events.events().is_empty());
+}
+
+#[tokio::test]
+async fn assignees_reject_non_user_references_without_granting() {
+ let mut repo = MockPropertiesRepo::new();
+ repo.expect_get_property_definition()
+ .return_once(|_| Box::pin(async { Ok(Some(assignees_definition())) }));
+ repo.expect_upsert_entity_property().times(0);
+ let sharing = Arc::new(InitiativeSharing::default());
+ let service = service_with_event_broker(repo, RecordingEventBroker::default())
+ .with_initiative_assignees(sharing.clone());
+ let result = service
+ .set_entity_property(
+ &edit_receipt("initiative1", EntityType::Initiative),
+ SystemPropertyKey::ASSIGNEES_UUID,
+ Some(SetPropertyValue::MultiEntityReference {
+ references: vec![EntityReference::new(
+ caller_user_id().as_ref(),
+ EntityType::Document,
+ )],
+ }),
+ )
+ .await;
+ assert!(matches!(result, Err(PropertiesErr::Validation(_))));
+ assert!(sharing.calls.lock().unwrap().is_empty());
+}
+
+#[tokio::test]
+async fn required_properties_can_be_cleared_but_not_detached() {
+ for (key, data_type) in [
+ (SystemPropertyKey::Assignees, DataType::Entity),
+ (SystemPropertyKey::Status, DataType::SelectString),
+ (SystemPropertyKey::Priority, DataType::SelectString),
+ (SystemPropertyKey::DueDate, DataType::Date),
+ ] {
+ let mut repo = MockPropertiesRepo::new();
+ repo.expect_get_property_definition().return_once(move |_| {
+ Box::pin(async move {
+ Ok(Some(PropertyDefinition {
+ id: key.uuid(),
+ data_type,
+ ..assignees_definition()
+ }))
+ })
+ });
+ repo.expect_upsert_entity_property()
+ .withf(move |_, kind, id, value| {
+ *kind == EntityType::Initiative && *id == key.uuid() && value.is_none()
+ })
+ .return_once(|id, kind, property_id, value| {
+ let snapshot = entity_property_mutation(id, kind, property_id, value);
+ Box::pin(async move { Ok(snapshot) })
+ });
+ repo.expect_lookup_entity_property().return_once(move |_| {
+ Box::pin(async move {
+ Ok(Some(models_properties::EntityPropertyReference {
+ entity_id: "initiative1".into(),
+ entity_type: EntityType::Initiative,
+ property_definition_id: key.uuid(),
+ }))
+ })
+ });
+ repo.expect_delete_entity_property().times(0);
+ let service = service_with_event_broker(repo, RecordingEventBroker::default());
+ let receipt = edit_receipt("initiative1", EntityType::Initiative);
+ let property = service
+ .set_entity_property(&receipt, key.uuid(), None)
+ .await
+ .unwrap();
+ assert!(property.value.is_none());
+ assert!(matches!(
+ service
+ .delete_entity_property(&receipt, property.property.id)
+ .await,
+ Err(PropertiesErr::RequiredProperty)
+ ));
+ }
+}
diff --git a/crates/properties/src/domain/test/options_batch.rs b/crates/properties/src/domain/test/options_batch.rs
new file mode 100644
index 0000000000..ddf9fe1ace
--- /dev/null
+++ b/crates/properties/src/domain/test/options_batch.rs
@@ -0,0 +1,40 @@
+use super::*;
+
+#[tokio::test]
+async fn options_batch_passes_caller_and_verified_team_to_one_repository_read() {
+ let ids = vec![Uuid::from_u128(1), Uuid::from_u128(2)];
+ let expected_ids = ids.clone();
+ let mut repo = MockPropertiesRepo::new();
+ repo.expect_get_visible_property_options_batch()
+ .times(1)
+ .withf(move |ids, user, team| {
+ ids == expected_ids && user == &caller_user_id() && *team == Some(team_id())
+ })
+ .returning(|_, _, _| {
+ Box::pin(async { Ok(HashMap::from([(Uuid::from_u128(1), Vec::new())])) })
+ });
+ let service = service_with_event_broker(repo, RecordingEventBroker::default());
+ let options = service
+ .get_property_options_batch(&ids, &caller_user_id(), Some(&team_receipt()))
+ .await
+ .unwrap();
+ assert_eq!(options.len(), 1);
+ assert!(options[&ids[0]].is_empty());
+ assert!(!options.contains_key(&ids[1]));
+}
+
+#[tokio::test]
+async fn options_batch_propagates_repository_failure_without_a_team() {
+ let mut repo = MockPropertiesRepo::new();
+ repo.expect_get_visible_property_options_batch()
+ .times(1)
+ .withf(|_, user, team| user == &caller_user_id() && team.is_none())
+ .returning(|_, _, _| Box::pin(async { Err(anyhow!("options unavailable")) }));
+ let service = service_with_event_broker(repo, RecordingEventBroker::default());
+ assert!(
+ service
+ .get_property_options_batch(&[Uuid::from_u128(1)], &caller_user_id(), None)
+ .await
+ .is_err()
+ );
+}
diff --git a/crates/properties/src/inbound/axum_router/extract.rs b/crates/properties/src/inbound/axum_router/extract.rs
index 58d68468a5..4e89345f45 100644
--- a/crates/properties/src/inbound/axum_router/extract.rs
+++ b/crates/properties/src/inbound/axum_router/extract.rs
@@ -92,6 +92,7 @@ pub(crate) fn target_entity_type(entity_type: PropertyTargetEntityType) -> Acces
PropertyTargetEntityType::Company => AccessEntityType::CrmCompany,
PropertyTargetEntityType::Document => AccessEntityType::Document,
PropertyTargetEntityType::Project => AccessEntityType::Project,
+ PropertyTargetEntityType::Initiative => AccessEntityType::Initiative,
PropertyTargetEntityType::Thread => AccessEntityType::EmailThread,
PropertyTargetEntityType::User => AccessEntityType::User,
}
diff --git a/crates/properties/src/lib.rs b/crates/properties/src/lib.rs
index df54c872e5..b7d0d148f1 100644
--- a/crates/properties/src/lib.rs
+++ b/crates/properties/src/lib.rs
@@ -22,7 +22,9 @@ pub use domain::model::{
PropertyAccessReceiptExt, PropertyOptionInfo, PropertyTargetKey, ViewReceipt,
canonical_entity_type,
};
-pub use domain::ports::{NotificationService, PermissionService, PropertiesRepo};
+pub use domain::ports::{
+ InitiativeAssigneeService, NotificationService, PermissionService, PropertiesRepo,
+};
pub use domain::service::{PropertiesService, TeamReceipt};
pub use domain::service_impl::PropertiesServiceImpl;
#[cfg(feature = "outbound")]
diff --git a/crates/properties/src/outbound/definitions_test.rs b/crates/properties/src/outbound/definitions_test.rs
index 1fd85b0476..64cce3dd19 100644
--- a/crates/properties/src/outbound/definitions_test.rs
+++ b/crates/properties/src/outbound/definitions_test.rs
@@ -43,6 +43,56 @@ fn new_option(display_order: i32, value: PropertyOptionValue) -> PropertyOption
}
}
+#[sqlx::test(
+ migrator = "MACRO_DB_MIGRATIONS",
+ fixtures(path = "../../fixtures", scripts("properties"))
+)]
+async fn option_batches_filter_requested_ids_and_caller_visibility(
+ pool: Pool<Postgres>,
+) -> anyhow::Result<()> {
+ let repo = PropertiesPgRepo::new(pool);
+ let priority = Uuid::parse_str("11111111-1111-1111-1111-111111111111")?;
+ let personal = Uuid::parse_str("bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb")?;
+ let empty = Uuid::parse_str("88888888-8888-8888-8888-888888888888")?;
+ let foreign = Uuid::parse_str("dddddddd-dddd-dddd-dddd-dddddddddddd")?;
+ let system = repo.list_property_definitions(None, None, true).await?[0].id;
+ let missing = Uuid::new_v4();
+ let ids = [priority, personal, empty, foreign, system, missing];
+
+ let options = repo
+ .get_visible_property_options_batch(&ids, &user_1(), Some(team_1()))
+ .await?;
+ assert_eq!(options.len(), 4);
+ assert_eq!(options[&personal].len(), 2);
+ assert!(options[&empty].is_empty());
+ assert!(options.contains_key(&system));
+ assert!(!options.contains_key(&foreign));
+ assert!(!options.contains_key(&missing));
+ assert_eq!(
+ options[&priority]
+ .iter()
+ .map(|option| option.display_order)
+ .collect::<Vec<_>>(),
+ vec![0, 1, 2, 3]
+ );
+ assert_eq!(
+ options[&priority][0].value,
+ PropertyOptionValue::String("Low".into())
+ );
+
+ let outsider_options = repo
+ .get_visible_property_options_batch(&ids, &user_2(), None)
+ .await?;
+ assert_eq!(outsider_options.len(), 1);
+ assert!(outsider_options.contains_key(&system));
+ assert!(
+ repo.get_visible_property_options_batch(&[], &user_1(), Some(team_1()))
+ .await?
+ .is_empty()
+ );
+ Ok(())
+}
+
#[sqlx::test(
migrator = "MACRO_DB_MIGRATIONS",
fixtures(path = "../../fixtures", scripts("properties"))
diff --git a/crates/properties/src/outbound/permission_queries.rs b/crates/properties/src/outbound/permission_queries.rs
index 895df84641..2946adc1f4 100644
--- a/crates/properties/src/outbound/permission_queries.rs
+++ b/crates/properties/src/outbound/permission_queries.rs
@@ -21,6 +21,7 @@ pub async fn get_owner_and_deleted(
// owning channel (see `access_entity_type`), so the caller skips this
// path for them entirely.
EntityType::CallRecord
+ | EntityType::Initiative
| EntityType::Channel
| EntityType::Company
| EntityType::User
diff --git a/crates/properties/src/outbound/permission_service.rs b/crates/properties/src/outbound/permission_service.rs
index 7b01a6d771..0c23d4c87b 100644
--- a/crates/properties/src/outbound/permission_service.rs
+++ b/crates/properties/src/outbound/permission_service.rs
@@ -130,6 +130,7 @@ impl<Svc: EntityAccessService> PermissionService for PermissionServiceImpl<Svc>
// entities are only visible to their owner.
match entity_type {
AccessEntityType::Call
+ | AccessEntityType::Initiative
| AccessEntityType::Channel
| AccessEntityType::CrmCompany
| AccessEntityType::User
diff --git a/crates/properties/src/outbound/properties_pg_repo.rs b/crates/properties/src/outbound/properties_pg_repo.rs
index 2c74cf5bc0..3e561d10ce 100644
--- a/crates/properties/src/outbound/properties_pg_repo.rs
+++ b/crates/properties/src/outbound/properties_pg_repo.rs
@@ -170,6 +170,22 @@ impl PropertiesRepo for PropertiesPgRepo {
property_option_queries::get_property_options(&self.pool, property_definition_id).await
}
+ #[tracing::instrument(skip(self), err)]
+ async fn get_visible_property_options_batch(
+ &self,
+ property_definition_ids: &[Uuid],
+ user_id: &MacroUserIdStr<'_>,
+ team_id: Option<Uuid>,
+ ) -> Result<HashMap<Uuid, Vec<PropertyOption>>, Self::Err> {
+ property_definition_queries::get_visible_property_options_batch(
+ &self.pool,
+ property_definition_ids,
+ user_id,
+ team_id,
+ )
+ .await
+ }
+
#[tracing::instrument(skip(self), err)]
async fn create_property_option(
&self,
diff --git a/crates/properties/src/outbound/property_definition_queries.rs b/crates/properties/src/outbound/property_definition_queries.rs
index 8b4146d95d..9cfe9c5179 100644
--- a/crates/properties/src/outbound/property_definition_queries.rs
+++ b/crates/properties/src/outbound/property_definition_queries.rs
@@ -181,6 +181,39 @@ pub async fn list_property_definitions_with_options(
team_id: Option<Uuid>,
user_id: Option<&MacroUserIdStr<'_>>,
include_system: bool,
+) -> anyhow::Result<Vec<PropertyDefinitionWithOptions>> {
+ read_property_definitions_with_options(pool, team_id, user_id, include_system, None).await
+}
+
+/// Read options for requested definitions visible to the caller, retaining empty option lists.
+pub async fn get_visible_property_options_batch(
+ pool: &Pool<Postgres>,
+ property_definition_ids: &[Uuid],
+ user_id: &MacroUserIdStr<'_>,
+ team_id: Option<Uuid>,
+) -> anyhow::Result<HashMap<Uuid, Vec<PropertyOption>>> {
+ if property_definition_ids.is_empty() {
+ return Ok(HashMap::new());
+ }
+ Ok(read_property_definitions_with_options(
+ pool,
+ team_id,
+ Some(user_id),
+ true,
+ Some(property_definition_ids),
+ )
+ .await?
+ .into_iter()
+ .map(|row| (row.definition.id, row.property_options))
+ .collect())
+}
+
+async fn read_property_definitions_with_options(
+ pool: &Pool<Postgres>,
+ team_id: Option<Uuid>,
+ user_id: Option<&MacroUserIdStr<'_>>,
+ include_system: bool,
+ property_definition_ids: Option<&[Uuid]>,
) -> anyhow::Result<Vec<PropertyDefinitionWithOptions>> {
let user_id: Option<&str> = user_id.map(|u| u.as_ref());
let rows = sqlx::query!(
@@ -206,16 +239,18 @@ pub async fn list_property_definitions_with_options(
FROM property_definitions pd
LEFT JOIN property_options po ON pd.id = po.property_definition_id
WHERE
- ($3 AND pd.is_system)
- OR (
- ($1::uuid IS NOT NULL AND pd.team_id = $1)
+ ($4::uuid[] IS NULL OR pd.id = ANY($4))
+ AND (
+ ($3 AND pd.is_system)
+ OR ($1::uuid IS NOT NULL AND pd.team_id = $1)
OR ($2::text IS NOT NULL AND pd.user_id = $2)
)
ORDER BY LOWER(pd.display_name), po.display_order, po.number_value, LOWER(po.string_value)
"#,
team_id,
user_id,
- include_system
+ include_system,
+ property_definition_ids
)
.fetch_all(pool)
.await?;
diff --git a/crates/skills/src/outbound/soup_skill_lister.rs b/crates/skills/src/outbound/soup_skill_lister.rs
index fdf6e2a87d..1ec42c97c9 100644
--- a/crates/skills/src/outbound/soup_skill_lister.rs
+++ b/crates/skills/src/outbound/soup_skill_lister.rs
@@ -69,6 +69,7 @@ fn skill_only_filter() -> EntityFilterAst {
calendar_event_filter: Some(Arc::new(Expr::val(CalendarEventLiteral::Id(Uuid::nil())))),
// Reminders are opt-in: leaving the filter empty excludes them.
reminder_filter: None,
+ initiative_filter: None,
// Agent sessions are opt-in as well.
agent_session_filter: None,
properties_filter: None,
diff --git a/crates/soup/src/domain/service.rs b/crates/soup/src/domain/service.rs
index ca1d020274..f5b2611fde 100644
--- a/crates/soup/src/domain/service.rs
+++ b/crates/soup/src/domain/service.rs
@@ -463,6 +463,12 @@ where
Some((s, f)) => (Some(s), f),
};
+ let include_initiatives = item_filters::ast::initiative::initiatives_requested(
+ filters
+ .as_ref()
+ .and_then(|filter| filter.initiative_filter.as_deref()),
+ );
+
let res = self
.frecency
.get_frecency_page(FrecencyPageRequest {
@@ -473,7 +479,11 @@ where
})
.await?;
- let entities: Vec<_> = res.ids().map(|f| f.entity.copied()).collect();
+ let entities: Vec<_> = res
+ .ids()
+ .filter(|f| include_initiatives || f.entity.entity_type != EntityType::Initiative)
+ .map(|f| f.entity.copied())
+ .collect();
let res = self
.handle_soup_by_ids(
@@ -572,7 +582,7 @@ where
let mut email_ids = Vec::new();
for candidate in &touched {
match candidate.entity.entity_type {
- EntityType::Document | EntityType::Chat => {
+ EntityType::Document | EntityType::Chat | EntityType::Initiative => {
main_entities.push(candidate.entity.copied())
}
// Projects are rows of this feed in both soup types, but the
@@ -848,7 +858,8 @@ where
EntityType::Document
| EntityType::Chat
| EntityType::CalendarEvent
- | EntityType::AgentSession => main_entities.push(candidate.entity.copied()),
+ | EntityType::AgentSession
+ | EntityType::Initiative => main_entities.push(candidate.entity.copied()),
// Same split as the touched feed: the expanded by-ids query
// omits project rows, so they hydrate unexpanded separately.
EntityType::Project => match soup_type {
diff --git a/crates/soup/src/inbound/axum_router.rs b/crates/soup/src/inbound/axum_router.rs
index 0df398f7d0..5378eee4a0 100644
--- a/crates/soup/src/inbound/axum_router.rs
+++ b/crates/soup/src/inbound/axum_router.rs
@@ -1415,6 +1415,7 @@ impl ApiEntityFilterAst {
reminder_filter,
agent_session_filter,
properties_filter,
+ initiative_filter: None,
})
}
}
diff --git a/crates/soup/src/inbound/toolset/list_entities.rs b/crates/soup/src/inbound/toolset/list_entities.rs
index d64c2ad536..067708a936 100644
--- a/crates/soup/src/inbound/toolset/list_entities.rs
+++ b/crates/soup/src/inbound/toolset/list_entities.rs
@@ -312,6 +312,9 @@ impl EntityItem {
SoupItem::Reminder(_) => {
unreachable!("ListEntities tool does not surface Reminder rows")
}
+ SoupItem::Initiative(_) => {
+ unreachable!("ListEntities tool does not surface Initiative rows")
+ }
SoupItem::AgentSession(_) => {
unreachable!("ListEntities tool does not surface AgentSession rows")
}
@@ -357,6 +360,7 @@ fn any_item_has_tags(items: &[EnrichedSoupItem]) -> bool {
SoupItem::Document(doc) => &doc.extra.properties,
SoupItem::Chat(chat) => &chat.extra.properties,
SoupItem::Project(project) => &project.extra.properties,
+ SoupItem::Initiative(initiative) => &initiative.extra.properties,
SoupItem::EmailThread(thread) => &thread.extra.properties,
SoupItem::CalendarEvent(event) => &event.extra.properties,
SoupItem::CrmCompany(company) => &company.extra.properties,
@@ -570,6 +574,7 @@ impl ListEntities {
reminder_filter: None,
// Agent sessions are opt-in too; unset keeps them off the tool surface.
agent_session_filter: None,
+ initiative_filter: None,
properties_filter,
};
@@ -645,6 +650,7 @@ impl ListEntities {
// Same as CrmCompany — no ItemType::Reminder to toggle against.
reminder_filter: ast.reminder_filter,
agent_session_filter: ast.agent_session_filter,
+ initiative_filter: None,
properties_filter: ast.properties_filter,
}
}
diff --git a/crates/soup/src/outbound/pg_soup_repo.rs b/crates/soup/src/outbound/pg_soup_repo.rs
index 224926d538..804c415046 100644
--- a/crates/soup/src/outbound/pg_soup_repo.rs
+++ b/crates/soup/src/outbound/pg_soup_repo.rs
@@ -24,6 +24,7 @@ mod calendar_event;
mod candidate_gates;
mod expanded;
pub mod grouping;
+mod initiative;
mod notified;
mod touched;
mod unexpanded;
@@ -221,7 +222,16 @@ impl SoupRepo for PgSoupRepo {
}),
);
items.extend(
- agent_session::by_ids(&self.pool.0, calendar_req)
+ agent_session::by_ids(&self.pool.0, calendar_req.clone())
+ .await?
+ .into_iter()
+ .map(|item| SoupProjectionHydration {
+ item,
+ document_server_facts: None,
+ }),
+ );
+ items.extend(
+ initiative::by_ids(&self.pool.0, calendar_req)
.await?
.into_iter()
.map(|item| SoupProjectionHydration {
@@ -241,7 +251,8 @@ impl SoupRepo for PgSoupRepo {
unexpanded::by_ids::unexpanded_soup_by_ids(&self.pool.0, req.user_id, req.entities)
.await?;
items.extend(calendar_event::by_ids(&self.pool.0, calendar_req.clone()).await?);
- items.extend(agent_session::by_ids(&self.pool.0, calendar_req).await?);
+ items.extend(agent_session::by_ids(&self.pool.0, calendar_req.clone()).await?);
+ items.extend(initiative::by_ids(&self.pool.0, calendar_req).await?);
Ok(items)
}
@@ -384,6 +395,7 @@ pub(crate) async fn populate_properties(
let properties = match &item {
SoupItem::Document(x) => properties_map.get(&x.id.to_string()),
SoupItem::Project(x) => properties_map.get(&x.id.to_string()),
+ SoupItem::Initiative(x) => properties_map.get(&x.id.to_string()),
SoupItem::EmailThread(x) => properties_map.get(&x.thread.id.to_string()),
SoupItem::Chat(x) => properties_map.get(&x.id.to_string()),
SoupItem::CrmCompany(x) => properties_map.get(&x.id.to_string()),
diff --git a/crates/soup/src/outbound/pg_soup_repo/candidate_gates.rs b/crates/soup/src/outbound/pg_soup_repo/candidate_gates.rs
index 512f76345d..9429613df7 100644
--- a/crates/soup/src/outbound/pg_soup_repo/candidate_gates.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/candidate_gates.rs
@@ -327,3 +327,26 @@ pub(super) fn includes_email_threads(filter: Option<&EntityFilterAst>, link_ids:
&[PropertyEntityType::Thread],
)
}
+
+/// Initiative candidates use the same listing policy and filters as normal Soup pages.
+pub(super) fn initiative_gate(id_sql: &str, filter: Option<&EntityFilterAst>) -> String {
+ use super::expanded::dynamic::{build_initiative_filter, initiative_access_clause};
+ format!(
+ "EXISTS (SELECT 1 FROM initiative i WHERE i.id::text = {id_sql} AND {} {} {})",
+ initiative_access_clause(),
+ build_initiative_filter(filter.and_then(|f| f.initiative_filter.as_deref())),
+ build_properties_filter(
+ filter.and_then(|f| f.properties_filter.as_deref()),
+ "i.id::text"
+ )
+ )
+}
+
+pub(super) fn includes_initiatives(filter: Option<&EntityFilterAst>) -> bool {
+ super::expanded::dynamic::initiative_opted_in(
+ filter.and_then(|f| f.initiative_filter.as_deref()),
+ ) && properties_filter_can_apply_to(
+ filter.and_then(|f| f.properties_filter.as_deref()),
+ &[PropertyEntityType::Initiative],
+ )
+}
diff --git a/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic.rs b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic.rs
index dee2671fb0..db378e81ae 100644
--- a/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic.rs
@@ -4,6 +4,15 @@
#[cfg(test)]
mod test;
+mod initiative;
+
+use initiative::initiative_top_clause;
+pub(in crate::outbound::pg_soup_repo) use initiative::{
+ build_initiative_filter, initiative_access_clause, initiative_opted_in,
+};
+
+#[cfg(test)]
+use item_filters::ast::initiative::InitiativeLiteral;
use std::str::FromStr;
use chrono::{DateTime, Utc};
@@ -25,6 +34,7 @@ use models_soup::{
calendar_event::SoupCalendarEvent,
chat::SoupChat,
document::{SoupDocument, SoupDocumentSubType},
+ initiative::SoupInitiative,
item::SoupItem,
project::SoupProject,
};
@@ -169,6 +179,7 @@ static DOCUMENT_DETAIL_CLAUSE: &str = r#"
'document' as "item_type",
d.id as "id",
CAST(COALESCE(di.id, db.id) as TEXT) as "document_version_id",
+ NULL::text as "description_document_id",
d.owner as "user_id",
d.name as "name",
d."branchedFromId" as "branched_from_id",
@@ -253,6 +264,7 @@ static CHAT_DETAIL_CLAUSE: &str = r#"
'chat' as "item_type",
c.id as "id",
NULL as "document_version_id",
+ NULL::text as "description_document_id",
c."userId" as "user_id",
c.name as "name",
NULL as "branched_from_id",
@@ -285,6 +297,7 @@ static PROJECT_DETAIL_CLAUSE: &str = r#"
'project' as "item_type",
p.id as "id",
NULL as "document_version_id",
+ NULL::text as "description_document_id",
p."userId" as "user_id",
p.name as "name",
NULL as "branched_from_id",
@@ -314,6 +327,8 @@ static PROJECT_DETAIL_CLAUSE: &str = r#"
WHERE t.item_type = 'project'
"#;
+static INITIATIVE_DETAIL_CLAUSE: &str = include_str!("dynamic/initiative_detail.sql");
+
static DETAIL_SUFFIX: &str = r#"
)
SELECT * FROM Combined
@@ -328,6 +343,7 @@ static GROUPED_DOCUMENT_DETAIL_CLAUSE: &str = r#"
'document' as "item_type",
d.id as "id",
CAST(COALESCE(di.id, db.id) as TEXT) as "document_version_id",
+ NULL::text as "description_document_id",
d.owner as "user_id",
d.name as "name",
d."branchedFromId" as "branched_from_id",
@@ -388,6 +404,7 @@ static GROUPED_CHAT_DETAIL_CLAUSE: &str = r#"
'chat' as "item_type",
c.id as "id",
NULL::text as "document_version_id",
+ NULL::text as "description_document_id",
c."userId" as "user_id",
c.name as "name",
NULL::text as "branched_from_id",
@@ -421,6 +438,7 @@ static GROUPED_PROJECT_DETAIL_CLAUSE: &str = r#"
'project' as "item_type",
p.id as "id",
NULL::text as "document_version_id",
+ NULL::text as "description_document_id",
p."userId" as "user_id",
p.name as "name",
NULL::text as "branched_from_id",
@@ -451,11 +469,15 @@ static GROUPED_PROJECT_DETAIL_CLAUSE: &str = r#"
WHERE gi.item_type = 'project'
"#;
+static GROUPED_INITIATIVE_DETAIL_CLAUSE: &str =
+ include_str!("dynamic/initiative_grouped_detail.sql");
+
static GROUPED_CALENDAR_EVENT_DETAIL_CLAUSE: &str = r#"
SELECT
'calendar_event' as "item_type",
event.id::text as "id",
NULL::text as "document_version_id",
+ NULL::text as "description_document_id",
event.owner_id as "user_id",
event.title as "name",
NULL::text as "branched_from_id",
@@ -519,6 +541,7 @@ static GROUPED_EMPTY_COMBINED_CLAUSE: &str = r#"
'document' as "item_type",
NULL::text as "id",
NULL::text as "document_version_id",
+ NULL::text as "description_document_id",
NULL::text as "user_id",
NULL::text as "name",
NULL::text as "branched_from_id",
@@ -1323,6 +1346,11 @@ fn build_query(
) -> QueryBuilder<'_, Postgres> {
let mut builder = sqlx::QueryBuilder::new(PREFIX);
+ let include_initiatives = initiative_opted_in(filter_ast.initiative_filter.as_deref())
+ && properties_filter_can_apply_to(
+ filter_ast.properties_filter.as_deref(),
+ &[PropertyEntityType::Initiative],
+ );
let include_documents = !document_filter_is_impossible(filter_ast.document_filter.as_deref())
&& properties_filter_can_apply_to(
filter_ast.properties_filter.as_deref(),
@@ -1468,6 +1496,18 @@ fn build_query(
));
}
+ if include_initiatives {
+ push_union_separator(&mut builder, &mut needs_separator);
+ builder.push(initiative_top_clause(sort_method, false));
+ builder.push(build_initiative_filter(
+ filter_ast.initiative_filter.as_deref(),
+ ));
+ builder.push(build_properties_filter(
+ filter_ast.properties_filter.as_deref(),
+ "i.id::text",
+ ));
+ }
+
if !needs_separator {
builder.push(
"SELECT 'document'::text as item_type, NULL::text as id, NULL::timestamptz as sort_ts WHERE false",
@@ -1521,12 +1561,17 @@ fn build_query(
push_union_separator(&mut builder, &mut needs_separator);
builder.push(PROJECT_DETAIL_CLAUSE);
}
+ if include_initiatives {
+ push_union_separator(&mut builder, &mut needs_separator);
+ builder.push(INITIATIVE_DETAIL_CLAUSE);
+ }
if !needs_separator {
builder.push(
r#"SELECT
'document' as "item_type",
NULL::text as "id",
NULL::text as "document_version_id",
+ NULL::text as "description_document_id",
NULL::text as "user_id",
NULL::text as "name",
NULL::text as "branched_from_id",
@@ -1608,11 +1653,23 @@ struct ProjectRow {
deleted_at: Option<DateTime<Utc>>,
}
+#[derive(Debug, FromRow)]
+struct InitiativeRow {
+ id: String,
+ user_id: String,
+ name: String,
+ description_document_id: Option<String>,
+ created_at: DateTime<Utc>,
+ updated_at: DateTime<Utc>,
+ viewed_at: Option<DateTime<Utc>>,
+}
+
#[derive(Debug)]
enum SoupRow {
Document(DocumentRow),
Chat(ChatRow),
Project(ProjectRow),
+ Initiative(InitiativeRow),
CalendarEvent(SoupCalendarEvent<()>),
}
@@ -1623,6 +1680,7 @@ impl<'a> FromRow<'a, PgRow> for SoupRow {
"document" => Ok(SoupRow::Document(DocumentRow::from_row(row)?)),
"chat" => Ok(SoupRow::Chat(ChatRow::from_row(row)?)),
"project" => Ok(SoupRow::Project(ProjectRow::from_row(row)?)),
+ "initiative" => Ok(SoupRow::Initiative(InitiativeRow::from_row(row)?)),
"calendar_event" => {
let value: serde_json::Value = row.try_get("calendar_event")?;
let event = serde_json::from_value(value)
@@ -1644,7 +1702,7 @@ impl SoupRow {
is_important: row.is_important,
status_option_ids: row.status_option_ids.clone(),
}),
- Self::Chat(_) | Self::Project(_) | Self::CalendarEvent(_) => None,
+ Self::Chat(_) | Self::Project(_) | Self::Initiative(_) | Self::CalendarEvent(_) => None,
}
}
@@ -1760,6 +1818,20 @@ impl SoupRow {
deleted_at,
extra: (),
}),
+ SoupRow::Initiative(row) => SoupItem::Initiative(SoupInitiative {
+ id: row.id.parse().map_err(type_err)?,
+ name: row.name,
+ owner_id: Owner::from_principal_str(&row.user_id).map_err(type_err)?,
+ description_document_id: row
+ .description_document_id
+ .map(|id| id.parse())
+ .transpose()
+ .map_err(type_err)?,
+ created_at: row.created_at,
+ updated_at: row.updated_at,
+ viewed_at: row.viewed_at,
+ extra: (),
+ }),
SoupRow::CalendarEvent(event) => SoupItem::CalendarEvent(event),
})
}
@@ -1944,6 +2016,11 @@ fn build_grouped_query<'a>(
let mut builder = sqlx::QueryBuilder::new(PREFIX);
// Determine which entity types to include based on filters (same logic as build_query)
+ let include_initiatives = initiative_opted_in(filter_ast.initiative_filter.as_deref())
+ && properties_filter_can_apply_to(
+ filter_ast.properties_filter.as_deref(),
+ &[PropertyEntityType::Initiative],
+ );
let include_documents = !document_filter_is_impossible(filter_ast.document_filter.as_deref())
&& properties_filter_can_apply_to(
filter_ast.properties_filter.as_deref(),
@@ -2025,6 +2102,18 @@ fn build_grouped_query<'a>(
));
}
+ if include_initiatives {
+ push_union_separator(&mut builder, &mut needs_separator);
+ builder.push(initiative_top_clause(sort_method, true));
+ builder.push(build_initiative_filter(
+ filter_ast.initiative_filter.as_deref(),
+ ));
+ builder.push(build_properties_filter(
+ filter_ast.properties_filter.as_deref(),
+ "i.id::text",
+ ));
+ }
+
// Fallback when all entity types are filtered out
if !needs_separator {
builder.push(
@@ -2102,6 +2191,13 @@ fn build_grouped_query<'a>(
.replace("GroupedItems gi", &format!("{} gi", source_table)),
);
}
+ if include_initiatives {
+ push_union_separator(&mut builder, &mut combined_needs_separator);
+ builder.push(
+ GROUPED_INITIATIVE_DETAIL_CLAUSE
+ .replace("GroupedItems gi", &format!("{} gi", source_table)),
+ );
+ }
if !combined_needs_separator {
builder.push(GROUPED_EMPTY_COMBINED_CLAUSE);
}
diff --git a/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/initiative.rs b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/initiative.rs
new file mode 100644
index 0000000000..4f67aa2d81
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/initiative.rs
@@ -0,0 +1,88 @@
+//! Initiative SQL clauses for the shared flat and grouped Soup queries.
+
+use chrono::{DateTime, Utc};
+use filter_ast::Expr;
+use item_filters::ast::initiative::InitiativeLiteral;
+use models_pagination::SimpleSortMethod;
+use system_properties::SystemPropertyKey;
+
+use super::{access_semi_join, sql_string_literal, top_needs_user_history};
+
+/// The initiative listing policy: explicit grants and the owner's team link.
+/// Public links do not enumerate otherwise undiscovered initiatives.
+pub(in crate::outbound::pg_soup_repo) fn initiative_access_clause() -> String {
+ format!(
+ r#"({} OR EXISTS (
+ SELECT 1 FROM "SharePermission" sp
+ JOIN team_user owner_team ON owner_team.user_id = i.owner_user_id
+ WHERE sp.id = i.share_permission_id AND sp."linkShare" = 'TEAM'
+ AND owner_team.team_id::text IN (SELECT source_id FROM user_source_ids)
+ ))"#,
+ access_semi_join("i.id::text", "initiative")
+ )
+}
+
+pub(in crate::outbound::pg_soup_repo) use item_filters::ast::initiative::initiatives_requested as initiative_opted_in;
+
+pub(in crate::outbound::pg_soup_repo) fn build_initiative_filter(
+ filter: Option<&Expr<InitiativeLiteral>>,
+) -> String {
+ fn fold(expr: &Expr<InitiativeLiteral>) -> String {
+ match expr {
+ Expr::And(a, b) => format!("({} AND {})", fold(a), fold(b)),
+ Expr::Or(a, b) => format!("({} OR {})", fold(a), fold(b)),
+ Expr::Not(a) => format!("NOT ({})", fold(a)),
+ Expr::Literal(InitiativeLiteral::Include) => "TRUE".into(),
+ Expr::Literal(InitiativeLiteral::Id(id)) => format!("i.id = '{id}'"),
+ Expr::Literal(InitiativeLiteral::Owner(owner)) => format!(
+ "i.owner_user_id = {}",
+ sql_string_literal(&owner.to_string())
+ ),
+ Expr::Literal(InitiativeLiteral::NameContains(name)) => format!(
+ "strpos(lower(i.name), lower({})) > 0",
+ sql_string_literal(name)
+ ),
+ Expr::Literal(InitiativeLiteral::DueBefore(date)) => due_date_filter("<=", date),
+ Expr::Literal(InitiativeLiteral::DueAfter(date)) => due_date_filter(">=", date),
+ }
+ }
+ fn due_date_filter(operator: &str, date: &DateTime<Utc>) -> String {
+ format!(
+ "EXISTS (SELECT 1 FROM entity_properties ep_due WHERE ep_due.entity_id = i.id::text AND ep_due.entity_type = 'INITIATIVE' AND ep_due.property_definition_id = '{}' AND (ep_due.values->>'value')::timestamptz {operator} '{}'::timestamptz)",
+ SystemPropertyKey::DUE_DATE_UUID,
+ date.to_rfc3339()
+ )
+ }
+ filter
+ .map(|expr| format!(" AND ({})", fold(expr)))
+ .unwrap_or_default()
+}
+
+pub(super) fn initiative_top_clause(sort: SimpleSortMethod, grouped: bool) -> String {
+ let sort_ts = match sort {
+ SimpleSortMethod::CreatedAt => "i.created_at",
+ SimpleSortMethod::UpdatedAt => "i.updated_at",
+ SimpleSortMethod::ViewedAt => {
+ "COALESCE(uh.\"updatedAt\"::timestamptz, '1970-01-01'::timestamptz)"
+ }
+ SimpleSortMethod::ViewedUpdated => "COALESCE(uh.\"updatedAt\"::timestamptz, i.updated_at)",
+ };
+ let group_columns = if grouped {
+ ", NULL::text as project_id, 'INITIATIVE'::property_entity_type as property_entity_type"
+ } else {
+ ""
+ };
+ let history_join = if top_needs_user_history(sort) {
+ r#"LEFT JOIN "UserHistory" uh ON uh."itemId" = i.id::text AND uh."itemType" = 'initiative' AND uh."userId" = $1"#
+ } else {
+ ""
+ };
+ format!(
+ r#"SELECT 'initiative'::text as item_type, i.id::text as id,
+ {sort_ts}::timestamptz as sort_ts {group_columns}
+ FROM initiative i
+ {history_join}
+ WHERE {}"#,
+ initiative_access_clause()
+ )
+}
diff --git a/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/initiative_detail.sql b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/initiative_detail.sql
new file mode 100644
index 0000000000..4160881215
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/initiative_detail.sql
@@ -0,0 +1,33 @@
+
+ SELECT
+ 'initiative' as "item_type",
+ i.id::text as "id",
+ NULL as "document_version_id",
+ i.description_document_id as "description_document_id",
+ i.owner_user_id as "user_id",
+ i.name as "name",
+ NULL as "branched_from_id",
+ NULL as "branched_from_version_id",
+ NULL as "document_family_id",
+ NULL as "file_type",
+ i.created_at::timestamptz as "created_at",
+ i.updated_at::timestamptz as "updated_at",
+ NULL::text as "project_id",
+ NULL as "is_persistent",
+ NULL::text as "model",
+ NULL as "sha",
+ NULL as "sub_type",
+ false as "is_email_attachment",
+ true as "is_important",
+ ARRAY[]::uuid[] as "status_option_ids",
+ uh."updatedAt"::timestamptz as "viewed_at",
+ t.sort_ts as "sort_ts",
+ NULL as "is_completed",
+ NULL::timestamptz as "deleted_at"
+ FROM TopItems t
+ INNER JOIN initiative i ON i.id::text = t.id
+ LEFT JOIN "UserHistory" uh
+ ON uh."itemId" = i.id::text
+ AND uh."itemType" = 'initiative'
+ AND uh."userId" = $1
+ WHERE t.item_type = 'initiative'
diff --git a/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/initiative_grouped_detail.sql b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/initiative_grouped_detail.sql
new file mode 100644
index 0000000000..a6750529be
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/initiative_grouped_detail.sql
@@ -0,0 +1,34 @@
+
+ SELECT
+ 'initiative' as "item_type",
+ i.id::text as "id",
+ NULL::text as "document_version_id",
+ i.description_document_id as "description_document_id",
+ i.owner_user_id as "user_id",
+ i.name as "name",
+ NULL::text as "branched_from_id",
+ NULL::bigint as "branched_from_version_id",
+ NULL::bigint as "document_family_id",
+ NULL::text as "file_type",
+ i.created_at::timestamptz as "created_at",
+ i.updated_at::timestamptz as "updated_at",
+ NULL::text as "project_id",
+ NULL::boolean as "is_persistent",
+ NULL::text as "model",
+ NULL::text as "sha",
+ NULL::document_sub_type_value as "sub_type",
+ uh."updatedAt"::timestamptz as "viewed_at",
+ gi.sort_ts as "sort_ts",
+ NULL::boolean as "is_completed",
+ NULL::timestamptz as "deleted_at",
+ NULL::jsonb as "calendar_event",
+ gi.group_key as "group_key",
+ gi.group_total_count as "group_total_count",
+ gi.row_in_group as "row_in_group"
+ FROM GroupedItems gi
+ INNER JOIN initiative i ON i.id::text = gi.id
+ LEFT JOIN "UserHistory" uh
+ ON uh."itemId" = i.id::text
+ AND uh."itemType" = 'initiative'
+ AND uh."userId" = $1
+ WHERE gi.item_type = 'initiative'
diff --git a/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/test.rs b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/test.rs
index 57ef9fa1b9..fae97c6f88 100644
--- a/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/test.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/expanded/dynamic/test.rs
@@ -194,3 +194,37 @@ async fn grouped_query_explain_local(pool: PgPool) -> anyhow::Result<()> {
}
Ok(())
}
+
+#[test]
+fn initiatives_are_opt_in_and_share_the_existing_sql_pagination() {
+ let mut filter = EntityFilterAst::default();
+ assert!(
+ !build_query(&filter, false, SimpleSortMethod::UpdatedAt)
+ .sql()
+ .contains("FROM initiative")
+ );
+ filter.initiative_filter = Some(Arc::new(Expr::is_not(Expr::val(
+ InitiativeLiteral::Include,
+ ))));
+ assert!(
+ !build_query(&filter, false, SimpleSortMethod::UpdatedAt)
+ .sql()
+ .contains("FROM initiative")
+ );
+ filter.initiative_filter = Some(Arc::new(Expr::val(InitiativeLiteral::Include)));
+ let query = build_query(&filter, false, SimpleSortMethod::UpdatedAt);
+ let (candidates, details) = query.sql().split_once("Combined AS").unwrap();
+ assert!(candidates.contains("FROM initiative i"));
+ assert!(candidates.contains("LIMIT $3"));
+ assert!(candidates.contains("ea.entity_type = 'initiative'"));
+ assert!(candidates.contains("sp.\"linkShare\" = 'TEAM'"));
+ assert!(details.contains("INNER JOIN initiative i ON i.id::text = t.id"));
+}
+
+#[test]
+fn initiative_name_literals_are_escaped_and_not_like_patterns() {
+ let expr = Expr::val(InitiativeLiteral::NameContains("O'Reilly_%".into()));
+ let sql = build_initiative_filter(Some(&expr));
+ assert!(sql.contains("'O''Reilly_%'"));
+ assert!(sql.contains("strpos("));
+}
diff --git a/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs b/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs
index 4d2102ed49..f9045dcc8c 100644
--- a/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs
@@ -5910,6 +5910,7 @@ fn mock_empty_ast() -> EntityFilterAst {
foreign_entity_filter: None,
reminder_filter: None,
agent_session_filter: None,
+ initiative_filter: None,
properties_filter: None,
}
}
diff --git a/crates/soup/src/outbound/pg_soup_repo/grouping.rs b/crates/soup/src/outbound/pg_soup_repo/grouping.rs
index acca06a756..64d4a3e375 100644
--- a/crates/soup/src/outbound/pg_soup_repo/grouping.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/grouping.rs
@@ -69,7 +69,10 @@ pub fn group_join_clause(field: &GroupByField) -> Option<GroupJoinClause> {
entity_type,
} => {
let (entity_type_filter, entity_type_bind) = match entity_type {
- Some(et) => ("AND ep.entity_type = $10".to_string(), Some(et.clone())),
+ Some(et) => (
+ "AND ep.entity_type = $10::property_entity_type".to_string(),
+ Some(et.clone()),
+ ),
None => (String::new(), None),
};
diff --git a/crates/soup/src/outbound/pg_soup_repo/grouping/test/pagination.rs b/crates/soup/src/outbound/pg_soup_repo/grouping/test/pagination.rs
index 02f65b4443..9219609d57 100644
--- a/crates/soup/src/outbound/pg_soup_repo/grouping/test/pagination.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/grouping/test/pagination.rs
@@ -107,22 +107,6 @@ async fn fanout_caps_counts_and_tied_cursor_pages(pool: Pool<Postgres>) -> anyho
grouping.clone(),
)
.await;
- if matches!(
- grouping.field,
- GroupByField::Property {
- entity_type: Some(_),
- ..
- }
- ) {
- // Existing API binds $10 as text, but compares it to a PostgreSQL
- // enum without a cast. Preserve this baseline error in this perf-only change.
- let error = result.unwrap_err();
- assert_eq!(
- error.as_database_error().and_then(|e| e.code()).as_deref(),
- Some("42883")
- );
- continue;
- }
let initial = result?.collect::<Vec<_>>();
assert_eq!(initial.len(), 33); // Three full bins plus three unset items, not a global limit of 2.
for key in ["", "a", "b", "c"] {
diff --git a/crates/soup/src/outbound/pg_soup_repo/initiative.rs b/crates/soup/src/outbound/pg_soup_repo/initiative.rs
new file mode 100644
index 0000000000..7e84eee2b4
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/initiative.rs
@@ -0,0 +1,52 @@
+//! Initiative hydration for Soup's ID-based query modes.
+
+#[cfg(test)]
+mod test;
+
+use model_entity::EntityType;
+use model_owner::Owner;
+use models_soup::{initiative::SoupInitiative, item::SoupItem};
+use sqlx::PgPool;
+use uuid::Uuid;
+
+use crate::domain::models::AdvancedSortParams;
+
+pub(super) async fn by_ids(
+ db: &PgPool,
+ req: AdvancedSortParams<'_>,
+) -> Result<Vec<SoupItem<()>>, sqlx::Error> {
+ let ids = req
+ .entities
+ .iter()
+ .filter(|entity| entity.entity_type == EntityType::Initiative)
+ .filter_map(|entity| entity.entity_id.parse::<Uuid>().ok())
+ .collect::<Vec<_>>();
+ if ids.is_empty() {
+ return Ok(Vec::new());
+ }
+ let rows = sqlx::query_file!(
+ "src/outbound/pg_soup_repo/initiative/by_ids.sql",
+ req.user_id.as_ref(),
+ &ids,
+ )
+ .fetch_all(db)
+ .await?;
+ rows.into_iter()
+ .map(|row| {
+ Ok(SoupItem::Initiative(SoupInitiative {
+ id: row.id,
+ name: row.name,
+ owner_id: Owner::from_principal_str(&row.owner_user_id).map_err(super::type_err)?,
+ description_document_id: Some(
+ row.description_document_id
+ .parse()
+ .map_err(super::type_err)?,
+ ),
+ created_at: row.created_at,
+ updated_at: row.updated_at,
+ viewed_at: row.viewed_at,
+ extra: (),
+ }))
+ })
+ .collect()
+}
diff --git a/crates/soup/src/outbound/pg_soup_repo/initiative/by_ids.sql b/crates/soup/src/outbound/pg_soup_repo/initiative/by_ids.sql
new file mode 100644
index 0000000000..a88b361d85
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/initiative/by_ids.sql
@@ -0,0 +1,21 @@
+
+ WITH user_source_ids AS (
+ SELECT cp.channel_id::text AS source_id FROM comms_channel_participants cp
+ WHERE cp.user_id = $1 AND cp.left_at IS NULL
+ UNION ALL SELECT team_id::text FROM team_user WHERE user_id = $1
+ UNION ALL SELECT $1
+ )
+ SELECT i.id, i.name, i.owner_user_id, i.description_document_id,
+ i.created_at, i.updated_at, uh."updatedAt"::timestamptz AS viewed_at
+ FROM initiative i
+ LEFT JOIN "UserHistory" uh ON uh."itemId" = i.id::text
+ AND uh."itemType" = 'initiative' AND uh."userId" = $1
+ WHERE i.id = ANY($2) AND (
+ EXISTS (SELECT 1 FROM entity_access ea
+ WHERE ea.entity_id = i.id AND ea.entity_type = 'initiative'
+ AND ea.source_id IN (SELECT source_id FROM user_source_ids))
+ OR EXISTS (SELECT 1 FROM "SharePermission" sp
+ JOIN team_user owner_team ON owner_team.user_id = i.owner_user_id
+ WHERE sp.id = i.share_permission_id AND sp."linkShare" = 'TEAM'
+ AND owner_team.team_id::text IN (SELECT source_id FROM user_source_ids))
+ )
diff --git a/crates/soup/src/outbound/pg_soup_repo/initiative/test.rs b/crates/soup/src/outbound/pg_soup_repo/initiative/test.rs
new file mode 100644
index 0000000000..f2a0435f34
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/initiative/test.rs
@@ -0,0 +1,222 @@
+use super::*;
+use crate::outbound::pg_soup_repo::expanded::dynamic::{
+ ExpandedDynamicCursorArgs, GroupedDynamicCursorArgs, expanded_dynamic_cursor_soup,
+ expanded_dynamic_cursor_soup_grouped,
+};
+use filter_ast::Expr;
+use item_filters::ast::{
+ EntityFilterAst, calendar_event::CalendarEventLiteral, chat::ChatLiteral,
+ document::DocumentLiteral, initiative::InitiativeLiteral, project::ProjectLiteral,
+};
+use macro_db_migrator::MACRO_DB_MIGRATIONS;
+use macro_user_id::user_id::MacroUserIdStr;
+use models_grouping::{GroupByField, GroupingConfig};
+use models_pagination::Identify;
+use models_pagination::{CursorWithValAndFilter, Query, SimpleSortMethod, SortOn};
+use std::sync::Arc;
+
+fn filters() -> EntityFilterAst {
+ EntityFilterAst {
+ initiative_filter: Some(Arc::new(Expr::val(InitiativeLiteral::Include))),
+ document_filter: Some(Arc::new(Expr::val(DocumentLiteral::Id(Uuid::nil())))),
+ chat_filter: Some(Arc::new(Expr::val(ChatLiteral::Importance(false)))),
+ project_filter: Some(Arc::new(Expr::val(ProjectLiteral::Importance(false)))),
+ calendar_event_filter: Some(Arc::new(Expr::val(CalendarEventLiteral::Id(Uuid::nil())))),
+ ..EntityFilterAst::default()
+ }
+}
+
+fn user() -> MacroUserIdStr<'static> {
+ MacroUserIdStr::parse_from_str("macro|[email protected]").unwrap()
+}
+
+#[sqlx::test(
+ fixtures(
+ path = "../../../../../macro_db_client/fixtures",
+ scripts("mixed_items_expanded")
+ ),
+ fixtures("test/initiatives.sql"),
+ migrator = "MACRO_DB_MIGRATIONS"
+)]
+async fn initiatives_access_cursor_and_hydration(pool: PgPool) -> anyhow::Result<()> {
+ let mut without_initiatives = filters();
+ without_initiatives.initiative_filter = None;
+ assert!(
+ expanded_dynamic_cursor_soup(
+ &pool,
+ ExpandedDynamicCursorArgs {
+ user_id: user(),
+ limit: 20,
+ cursor: Query::Sort(SimpleSortMethod::UpdatedAt, without_initiatives),
+ exclude_frecency: false,
+ }
+ )
+ .await?
+ .is_empty(),
+ "existing views do not opt into initiatives by default"
+ );
+ let sort = SimpleSortMethod::UpdatedAt;
+ let first = expanded_dynamic_cursor_soup(
+ &pool,
+ ExpandedDynamicCursorArgs {
+ user_id: user(),
+ limit: 2,
+ cursor: Query::Sort(sort, filters()),
+ exclude_frecency: false,
+ },
+ )
+ .await?;
+ assert_eq!(first.len(), 2);
+ assert_eq!(
+ first[0].id(),
+ Uuid::from_u128(0xad000000000000000000000000000004)
+ );
+ assert_eq!(
+ first[1].id(),
+ Uuid::from_u128(0xad000000000000000000000000000003)
+ );
+ let second = expanded_dynamic_cursor_soup(
+ &pool,
+ ExpandedDynamicCursorArgs {
+ user_id: user(),
+ limit: 2,
+ cursor: Query::Cursor(CursorWithValAndFilter {
+ id: first[1].id(),
+ limit: 2,
+ val: SoupItem::sort_on(sort)(&first[1]),
+ filter: filters(),
+ }),
+ exclude_frecency: false,
+ },
+ )
+ .await?;
+ assert_eq!(
+ second.iter().map(Identify::id).collect::<Vec<_>>(),
+ vec![
+ Uuid::from_u128(0xad000000000000000000000000000002),
+ Uuid::from_u128(0xad000000000000000000000000000001)
+ ]
+ );
+ let SoupItem::Initiative(item) = &first[0] else {
+ panic!("expected initiative")
+ };
+ assert_eq!(
+ item.description_document_id,
+ Some(Uuid::from_u128(0xaf000000000000000000000000000004))
+ );
+ let ids = (1..=6)
+ .map(|id| {
+ EntityType::Initiative.with_entity_string(
+ Uuid::from_u128(0xad000000000000000000000000000000 + id).to_string(),
+ )
+ })
+ .collect::<Vec<_>>();
+ let hydrated = by_ids(
+ &pool,
+ AdvancedSortParams {
+ user_id: user(),
+ entities: &ids,
+ },
+ )
+ .await?;
+ assert_eq!(
+ hydrated.len(),
+ 4,
+ "by-ID reads preserve the same access rules"
+ );
+ Ok(())
+}
+
+#[sqlx::test(
+ fixtures(
+ path = "../../../../../macro_db_client/fixtures",
+ scripts("mixed_items_expanded")
+ ),
+ fixtures("test/initiatives.sql"),
+ migrator = "MACRO_DB_MIGRATIONS"
+)]
+async fn initiatives_grouping_and_property_enrichment(pool: PgPool) -> anyhow::Result<()> {
+ let rows = expanded_dynamic_cursor_soup_grouped(
+ &pool,
+ GroupedDynamicCursorArgs {
+ user_id: user(),
+ limit: 20,
+ cursor: Query::Sort(SimpleSortMethod::UpdatedAt, filters()),
+ exclude_frecency: false,
+ grouping: GroupingConfig {
+ field: GroupByField::Property {
+ property_definition_id: system_properties::SystemPropertyKey::STATUS_UUID,
+ entity_type: Some("INITIATIVE".into()),
+ },
+ group_key: None,
+ per_group_limit: None,
+ },
+ },
+ )
+ .await?
+ .collect::<Vec<_>>();
+ assert_eq!(rows.len(), 4);
+ assert_eq!(rows[0].total_group_count, 4);
+ let enriched = crate::outbound::pg_soup_repo::populate_properties(
+ &pool,
+ user(),
+ rows.into_iter().map(|row| row.item).collect(),
+ )
+ .await?;
+ let SoupItem::Initiative(item) = &enriched[0] else {
+ panic!("expected initiative")
+ };
+ assert!(!item.extra.properties.is_empty());
+ let mut filtered = filters();
+ filtered.initiative_filter = Some(Arc::new(Expr::val(InitiativeLiteral::NameContains(
+ "launch 2".into(),
+ ))));
+ let items = expanded_dynamic_cursor_soup(
+ &pool,
+ ExpandedDynamicCursorArgs {
+ user_id: user(),
+ limit: 20,
+ cursor: Query::Sort(SimpleSortMethod::UpdatedAt, filtered),
+ exclude_frecency: false,
+ },
+ )
+ .await?;
+ assert_eq!(items.len(), 1);
+ assert_eq!(
+ items[0].id(),
+ Uuid::from_u128(0xad000000000000000000000000000002)
+ );
+ for (literal, expected) in [
+ (
+ InitiativeLiteral::DueBefore("2026-02-10T00:00:00Z".parse()?),
+ 1,
+ ),
+ (
+ InitiativeLiteral::DueAfter("2026-02-10T00:00:00Z".parse()?),
+ 1,
+ ),
+ (
+ InitiativeLiteral::DueBefore("2026-02-09T00:00:00Z".parse()?),
+ 0,
+ ),
+ ] {
+ let mut filter = filters();
+ filter.initiative_filter = Some(Arc::new(Expr::val(literal)));
+ let items = expanded_dynamic_cursor_soup(
+ &pool,
+ ExpandedDynamicCursorArgs {
+ user_id: user(),
+ limit: 20,
+ cursor: Query::Sort(SimpleSortMethod::UpdatedAt, filter),
+ exclude_frecency: false,
+ },
+ )
+ .await?;
+ assert_eq!(
+ items.len(),
+ expected,
+ "due-date bounds exclude missing dates and include exact matches"
+ );
+ }
+ Ok(())
+}
diff --git a/crates/soup/src/outbound/pg_soup_repo/initiative/test/initiatives.sql b/crates/soup/src/outbound/pg_soup_repo/initiative/test/initiatives.sql
new file mode 100644
index 0000000000..ef71543ed1
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/initiative/test/initiatives.sql
@@ -0,0 +1,38 @@
+INSERT INTO "User" (id, email, macro_user_id) VALUES
+('macro|[email protected]', '[email protected]', 'a1111111-1111-1111-1111-111111111111');
+INSERT INTO team (id, name, owner_id) VALUES ('ae000000-0000-0000-0000-000000000001', 'initiative team', 'macro|[email protected]');
+INSERT INTO team_user (team_id, user_id, team_role) VALUES
+('ae000000-0000-0000-0000-000000000001', 'macro|[email protected]', 'owner'),
+('ae000000-0000-0000-0000-000000000001', 'macro|[email protected]', 'member');
+INSERT INTO comms_channels (id, channel_type, name, owner_id) VALUES
+('ae000000-0000-0000-0000-000000000002', 'private', 'active', 'macro|[email protected]'),
+('ae000000-0000-0000-0000-000000000003', 'private', 'left', 'macro|[email protected]');
+INSERT INTO comms_channel_participants (channel_id, role, user_id, left_at) VALUES
+('ae000000-0000-0000-0000-000000000002', 'member', 'macro|[email protected]', NULL),
+('ae000000-0000-0000-0000-000000000003', 'member', 'macro|[email protected]', now());
+INSERT INTO "SharePermission" (id, "linkShare", "linkShareAccessLevel")
+SELECT 'soup-initiative-share-' || n, CASE WHEN n = 4 THEN 'TEAM' ELSE NULL END, CASE WHEN n = 4 THEN 'view'::"AccessLevel" ELSE NULL END
+FROM generate_series(1, 6) n;
+INSERT INTO "Document" (id, name, owner, "fileType")
+SELECT ('af000000-0000-0000-0000-' || lpad(n::text, 12, '0')), 'description', 'macro|[email protected]', 'md'
+FROM generate_series(1, 6) n;
+INSERT INTO initiative (id, name, owner_user_id, share_permission_id, description_document_id, created_at, updated_at)
+SELECT ('ad000000-0000-0000-0000-' || lpad(n::text, 12, '0'))::uuid, 'Launch ' || n,
+'macro|[email protected]', 'soup-initiative-share-' || n,
+'af000000-0000-0000-0000-' || lpad(n::text, 12, '0'), '2026-01-01', '2026-01-02'
+FROM generate_series(1, 6) n;
+-- Individual, active-channel and explicit-team grants. Row 4 uses the team link.
+INSERT INTO entity_access (entity_id, entity_type, source_id, source_type, access_level) VALUES
+('ad000000-0000-0000-0000-000000000001', 'initiative', 'macro|[email protected]', 'user', 'view'),
+('ad000000-0000-0000-0000-000000000002', 'initiative', 'ae000000-0000-0000-0000-000000000002', 'channel', 'view'),
+('ad000000-0000-0000-0000-000000000003', 'initiative', 'ae000000-0000-0000-0000-000000000001', 'team', 'edit'),
+-- Duplicate source must not consume an extra page slot.
+('ad000000-0000-0000-0000-000000000003', 'initiative', 'macro|[email protected]', 'user', 'view'),
+-- Left-channel grants and an inaccessible row must never leak.
+('ad000000-0000-0000-0000-000000000005', 'initiative', 'ae000000-0000-0000-0000-000000000003', 'channel', 'view');
+INSERT INTO entity_properties (id, entity_id, entity_type, property_definition_id, values)
+SELECT replace(id::text, 'ad000000', 'ab000000')::uuid, id::text, 'INITIATIVE', '00000001-0000-0000-0000-000000000002',
+'{"type":"SelectOption","value":["00000001-0000-0000-0002-000000000001"]}'::jsonb
+FROM initiative WHERE id::text LIKE 'ad000000%';
+INSERT INTO entity_properties (id, entity_id, entity_type, property_definition_id, values) VALUES
+('ac000000-0000-0000-0000-000000000001', 'ad000000-0000-0000-0000-000000000002', 'INITIATIVE', '00000001-0000-0000-0000-000000000004', '{"type":"Date","value":"2026-02-10T00:00:00Z"}');
diff --git a/crates/soup/src/outbound/pg_soup_repo/notified.rs b/crates/soup/src/outbound/pg_soup_repo/notified.rs
index afc7dc479a..1ec1667346 100644
--- a/crates/soup/src/outbound/pg_soup_repo/notified.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/notified.rs
@@ -33,7 +33,7 @@ use crate::domain::models::{NotifiedEntity, NotifiedSoupRequest};
use crate::outbound::pg_soup_repo::candidate_gates::{
channel_gate, channel_thread_gate, chat_gate, document_gate, email_gate, implied_conjuncts_sql,
includes_channels, includes_chats, includes_documents, includes_email_threads,
- includes_projects, project_gate, uuid_guarded,
+ includes_initiatives, includes_projects, initiative_gate, project_gate, uuid_guarded,
};
use crate::outbound::pg_soup_repo::expanded::dynamic::{
build_notification_state_clause, build_properties_filter, calendar_event_filter_is_impossible,
@@ -198,6 +198,9 @@ fn included_types(req: &NotifiedSoupRequest<'_>) -> Vec<&'static str> {
if includes_chats(req.filter) {
types.push(EntityType::Chat.into());
}
+ if includes_initiatives(req.filter) {
+ types.push(EntityType::Initiative.into());
+ }
if includes_projects(req.filter) {
types.push(EntityType::Project.into());
}
@@ -247,6 +250,7 @@ fn build_query(filter: Option<&EntityFilterAst>) -> String {
document_gate = document_gate(ID_SQL, filter),
chat_gate = chat_gate(ID_SQL, filter),
project_gate = project_gate(ID_SQL, filter),
+ initiative_gate = initiative_gate(ID_SQL, filter),
channel_gate = channel_gate(ID_SQL, filter),
channel_thread_gate = channel_thread_gate(ID_SQL, filter),
email_gate = email_gate(ID_SQL, filter),
diff --git a/crates/soup/src/outbound/pg_soup_repo/notified/query.sql b/crates/soup/src/outbound/pg_soup_repo/notified/query.sql
index 72c7a9ae66..19d32ec2ca 100644
--- a/crates/soup/src/outbound/pg_soup_repo/notified/query.sql
+++ b/crates/soup/src/outbound/pg_soup_repo/notified/query.sql
@@ -44,6 +44,7 @@ WHERE CASE nc.entity_type
WHEN 'document' THEN {document_gate}
WHEN 'chat' THEN {chat_gate}
WHEN 'project' THEN {project_gate}
+ WHEN 'initiative' THEN {initiative_gate}
WHEN 'channel' THEN {channel_gate}
WHEN 'channel_message' THEN {channel_thread_gate}
WHEN 'email_thread' THEN {email_gate}
diff --git a/crates/soup/src/outbound/pg_soup_repo/touched.rs b/crates/soup/src/outbound/pg_soup_repo/touched.rs
index e7a25c9412..9918a28c3a 100644
--- a/crates/soup/src/outbound/pg_soup_repo/touched.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/touched.rs
@@ -14,7 +14,8 @@ use std::str::FromStr;
use crate::domain::models::{TouchedEntity, TouchedSoupRequest};
use crate::outbound::pg_soup_repo::candidate_gates::{
channel_gate, chat_gate, document_gate, email_gate, includes_channels, includes_chats,
- includes_documents, includes_email_threads, includes_projects, project_gate,
+ includes_documents, includes_email_threads, includes_initiatives, includes_projects,
+ initiative_gate, project_gate,
};
use crate::outbound::pg_soup_repo::type_err;
@@ -46,6 +47,9 @@ fn included_types(req: &TouchedSoupRequest<'_>) -> Vec<&'static str> {
if includes_chats(req.filter) {
types.push(EntityType::Chat.into());
}
+ if includes_initiatives(req.filter) {
+ types.push(EntityType::Initiative.into());
+ }
if includes_projects(req.filter) {
types.push(EntityType::Project.into());
}
@@ -104,6 +108,7 @@ pub(super) async fn touched_soup_page(
WHEN 'document' THEN {document_gate}
WHEN 'chat' THEN {chat_gate}
WHEN 'project' THEN {project_gate}
+ WHEN 'initiative' THEN {initiative_gate}
WHEN 'channel' THEN {channel_gate}
WHEN 'email_thread' THEN {email_gate}
ELSE FALSE
@@ -114,6 +119,7 @@ pub(super) async fn touched_soup_page(
document_gate = document_gate(ID_SQL, req.filter),
chat_gate = chat_gate(ID_SQL, req.filter),
project_gate = project_gate(ID_SQL, req.filter),
+ initiative_gate = initiative_gate(ID_SQL, req.filter),
channel_gate = channel_gate(ID_SQL, req.filter),
email_gate = email_gate(ID_SQL, req.filter),
);
diff --git a/crates/soup_filter_projection/src/lib.rs b/crates/soup_filter_projection/src/lib.rs
index 1e23f17d84..7305a4af26 100644
--- a/crates/soup_filter_projection/src/lib.rs
+++ b/crates/soup_filter_projection/src/lib.rs
@@ -367,7 +367,8 @@ pub fn project_soup_item<T>(
| SoupItem::CrmCompany(_)
| SoupItem::ForeignEntity(_)
| SoupItem::Reminder(_)
- | SoupItem::AgentSession(_) => Ok(None),
+ | SoupItem::AgentSession(_)
+ | SoupItem::Initiative(_) => Ok(None),
}
}
diff --git a/crates/soup_realtime/src/inbound/kafka_consumer.rs b/crates/soup_realtime/src/inbound/kafka_consumer.rs
index 2b73a846dc..96f2d9eb4d 100644
--- a/crates/soup_realtime/src/inbound/kafka_consumer.rs
+++ b/crates/soup_realtime/src/inbound/kafka_consumer.rs
@@ -428,7 +428,9 @@ fn soup_entity_type_from_property(entity_type: PropertyEntityType) -> Option<Ent
PropertyEntityType::Project => Some(EntityType::Project),
PropertyEntityType::Thread => Some(EntityType::EmailThread),
// Soup channels do not expose properties, and users are not Soup items.
- PropertyEntityType::Channel | PropertyEntityType::User => None,
+ PropertyEntityType::Channel | PropertyEntityType::User | PropertyEntityType::Initiative => {
+ None
+ }
}
}
diff --git a/crates/system_properties/src/domain/model/constants/system_property_key.rs b/crates/system_properties/src/domain/model/constants/system_property_key.rs
index 228d12b9bc..46d19dd230 100644
--- a/crates/system_properties/src/domain/model/constants/system_property_key.rs
+++ b/crates/system_properties/src/domain/model/constants/system_property_key.rs
@@ -126,6 +126,12 @@ impl SystemPropertyKey {
Self::COMPANY_OWNER_UUID,
Self::REVENUE_UUID,
],
+ EntityType::Initiative => &[
+ Self::ASSIGNEES_UUID,
+ Self::STATUS_UUID,
+ Self::PRIORITY_UUID,
+ Self::DUE_DATE_UUID,
+ ],
// Other entity types don't have required properties yet
// Add new cases here as needed:
// EntityType::Email => &[...],
diff --git a/crates/system_properties/src/domain/service.rs b/crates/system_properties/src/domain/service.rs
index 29a5a4d7d7..e57647c19d 100644
--- a/crates/system_properties/src/domain/service.rs
+++ b/crates/system_properties/src/domain/service.rs
@@ -2,6 +2,9 @@
use models_properties::EntityType;
+#[cfg(test)]
+mod test;
+
use crate::{
StatusOption,
domain::{
@@ -34,6 +37,13 @@ pub trait SystemPropertiesService: Clone + Send + Sync + 'static {
entity_ids: Vec<String>,
) -> impl Future<Output = Result<(), SystemPropertyError>> + Send;
+ /// Attach the task-style initiative properties with null default values.
+ /// Existing assignments are preserved so retries never clear edited values.
+ fn attach_initiative_properties(
+ &self,
+ entity_ids: Vec<String>,
+ ) -> impl Future<Output = Result<(), SystemPropertyError>> + Send;
+
/// Copy all task properties from one entity to another.
///
/// Copies all task-related system properties from the source entity
@@ -101,6 +111,19 @@ where
self.repository.bulk_upsert_properties(rows).await
}
+ #[tracing::instrument(skip(self, entity_ids))]
+ async fn attach_initiative_properties(
+ &self,
+ entity_ids: Vec<String>,
+ ) -> Result<(), SystemPropertyError> {
+ let rows = entity_ids
+ .iter()
+ .flat_map(|entity_id| collect_required_property_rows(entity_id, EntityType::Initiative))
+ .collect();
+
+ self.repository.bulk_insert_properties_if_absent(rows).await
+ }
+
#[tracing::instrument(skip(self))]
async fn copy_task_properties(
&self,
@@ -199,36 +222,12 @@ fn collect_email_property_rows(
/// All task properties are initialized with null values.
/// Tasks are always applied to Task entities.
fn collect_task_property_rows(entity_id: &str) -> Vec<PropertyRow> {
- let entity_type = EntityType::Task;
-
- vec![
- // Assignees
- PropertyRow::null_value(entity_id, entity_type, SystemPropertyKey::Assignees.uuid()),
- // Status
- PropertyRow::null_value(entity_id, entity_type, SystemPropertyKey::Status.uuid()),
- // Priority
- PropertyRow::null_value(entity_id, entity_type, SystemPropertyKey::Priority.uuid()),
- // Due Date
- PropertyRow::null_value(entity_id, entity_type, SystemPropertyKey::DueDate.uuid()),
- // Parent Task
- PropertyRow::null_value(entity_id, entity_type, SystemPropertyKey::ParentTask.uuid()),
- // Subtasks
- PropertyRow::null_value(entity_id, entity_type, SystemPropertyKey::Subtasks.uuid()),
- // Depends On
- PropertyRow::null_value(entity_id, entity_type, SystemPropertyKey::DependsOn.uuid()),
- // Effort
- PropertyRow::null_value(entity_id, entity_type, SystemPropertyKey::Effort.uuid()),
- // Story Points
- PropertyRow::null_value(
- entity_id,
- entity_type,
- SystemPropertyKey::StoryPoints.uuid(),
- ),
- // Relevant Documents
- PropertyRow::null_value(
- entity_id,
- entity_type,
- SystemPropertyKey::RelevantDocuments.uuid(),
- ),
- ]
+ collect_required_property_rows(entity_id, EntityType::Task)
+}
+
+fn collect_required_property_rows(entity_id: &str, entity_type: EntityType) -> Vec<PropertyRow> {
+ SystemPropertyKey::required_property_ids_for_entity(entity_type)
+ .iter()
+ .map(|property_id| PropertyRow::null_value(entity_id, entity_type, *property_id))
+ .collect()
}
diff --git a/crates/system_properties/src/domain/service/test.rs b/crates/system_properties/src/domain/service/test.rs
new file mode 100644
index 0000000000..5e1cc40a76
--- /dev/null
+++ b/crates/system_properties/src/domain/service/test.rs
@@ -0,0 +1,40 @@
+use super::*;
+
+#[test]
+fn initiatives_share_task_property_definitions_and_null_defaults() {
+ let task_rows = collect_task_property_rows("task");
+ let initiative_rows = collect_required_property_rows("initiative", EntityType::Initiative);
+
+ assert_eq!(initiative_rows.len(), 4);
+ for key in [
+ SystemPropertyKey::Status,
+ SystemPropertyKey::Priority,
+ SystemPropertyKey::Assignees,
+ SystemPropertyKey::DueDate,
+ ] {
+ let row = initiative_rows
+ .iter()
+ .find(|row| row.property_definition_id() == key.uuid())
+ .unwrap();
+ let task_row = task_rows
+ .iter()
+ .find(|row| row.property_definition_id() == key.uuid())
+ .unwrap();
+ assert_eq!(row.entity_id(), "initiative");
+ assert_eq!(row.entity_type(), EntityType::Initiative);
+ assert_eq!(row.values(), task_row.values());
+ assert!(row.values().is_null());
+ assert!(SystemPropertyKey::is_required_for_entity(
+ key.uuid(),
+ EntityType::Initiative
+ ));
+ assert!(!SystemPropertyKey::is_required_for_entity(
+ key.uuid(),
+ EntityType::Project
+ ));
+ }
+ assert!(!SystemPropertyKey::is_required_for_entity(
+ SystemPropertyKey::PARENT_TASK_UUID,
+ EntityType::Initiative,
+ ));
+}
diff --git a/crates/system_properties/src/outbound/pgpool/test.rs b/crates/system_properties/src/outbound/pgpool/test.rs
index d4e7ef1a52..d719997f62 100644
--- a/crates/system_properties/src/outbound/pgpool/test.rs
+++ b/crates/system_properties/src/outbound/pgpool/test.rs
@@ -7,6 +7,77 @@ use crate::domain::model::{PropertyRow, SystemPropertyKey};
use macro_db_migrator::MACRO_DB_MIGRATIONS;
use sqlx::{Pool, Postgres};
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn initiative_initialization_preserves_values_and_folder_namespace(
+ pool: Pool<Postgres>,
+) -> anyhow::Result<()> {
+ use crate::domain::service::{SystemPropertiesService, SystemPropertiesServiceImpl};
+ let repo = PgSystemPropertiesRepository::new(pool.clone());
+ let service = SystemPropertiesServiceImpl::new(repo.clone());
+ let entity_id = "initiative-initialization";
+ // An identical legacy folder id is a separate property owner.
+ repo.bulk_upsert_properties(vec![PropertyRow::entity_reference(
+ entity_id,
+ EntityType::Project,
+ SystemPropertyKey::ASSIGNEES_UUID,
+ EntityType::User,
+ vec!["macro|[email protected]".into()],
+ None,
+ )])
+ .await?;
+ service
+ .attach_initiative_properties(vec![entity_id.into()])
+ .await?;
+ repo.bulk_upsert_properties(vec![PropertyRow::entity_reference(
+ entity_id,
+ EntityType::Initiative,
+ SystemPropertyKey::ASSIGNEES_UUID,
+ EntityType::User,
+ vec!["macro|[email protected]".into()],
+ None,
+ )])
+ .await?;
+ service
+ .attach_initiative_properties(vec![entity_id.into()])
+ .await?;
+
+ let rows = sqlx::query!(
+ r#"
+ SELECT entity_type AS "entity_type: EntityType", property_definition_id, values
+ FROM entity_properties
+ WHERE entity_id = $1
+ "#,
+ entity_id,
+ )
+ .fetch_all(&pool)
+ .await?;
+ assert_eq!(rows.len(), 5);
+ let initiatives: Vec<_> = rows
+ .iter()
+ .filter(|row| row.entity_type == EntityType::Initiative)
+ .collect();
+ assert_eq!(initiatives.len(), 4);
+ for row in initiatives {
+ if row.property_definition_id == SystemPropertyKey::ASSIGNEES_UUID {
+ assert_eq!(
+ row.values.as_ref().unwrap()["value"][0]["entity_id"],
+ );
+ } else {
+ assert!(row.values.as_ref().unwrap().is_null());
+ }
+ }
+ let folder = rows
+ .iter()
+ .find(|row| row.entity_type == EntityType::Project)
+ .unwrap();
+ assert_eq!(
+ folder.values.as_ref().unwrap()["value"][0]["entity_id"],
+ );
+ Ok(())
+}
+
/// Helper to count task properties
async fn count_task_properties(pool: &Pool<Postgres>, entity_id: &str) -> i64 {
sqlx::query_scalar::<_, i64>(
diff --git a/packages/sdk/generated/properties/types.gen.ts b/packages/sdk/generated/properties/types.gen.ts
index bfc51b7f6c..6fbb06e510 100644
--- a/packages/sdk/generated/properties/types.gen.ts
+++ b/packages/sdk/generated/properties/types.gen.ts
@@ -273,7 +273,7 @@ export type EntityReference = {
/**
* Type of entity that can be referenced by entity properties.
*/
-export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';
+export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'INITIATIVE' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';
/**
* Query parameters for listing properties
@@ -473,7 +473,7 @@ export type PropertyScope = 'user' | 'team' | 'system' | 'all';
* here; task classification is resolved by the properties domain from the
* document subtype.
*/
-export type PropertyTargetEntityType = 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'THREAD' | 'USER';
+export type PropertyTargetEntityType = 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'INITIATIVE' | 'PROJECT' | 'THREAD' | 'USER';
/**
* Canonical reference to an entity receiving properties.
diff --git a/packages/sdk/generated/search/index.ts b/packages/sdk/generated/search/index.ts
index 16966b0303..af48f90f40 100644
--- a/packages/sdk/generated/search/index.ts
+++ b/packages/sdk/generated/search/index.ts
@@ -1,4 +1,4 @@
// This file is auto-generated by @hey-api/openapi-ts
export { type Options, Sdk } from './sdk.gen';
-export type { AgentSessionAuthor, AgentSessionFilters, AgentSessionSearchResponseItem, AgentSessionSearchResult, CalendarEventFilters, CalendarEventMetadata, CalendarEventOrganizer, CalendarEventSearchOccurrence, CalendarEventSearchResponseItem, CalendarEventSearchResponseItemWithMetadata, CalendarEventSearchResult, CalendarEventSearchTime, CallFilters, CallRecordMetadata, CallRecordSearchResponseItem, CallRecordSearchResponseItemWithMetadata, CallRecordSearchResult, CallStatus, ChannelFilters, ChannelMessageSearchResponseItem, ChannelMetadata, ChannelNameSearchResponseItem, ChannelSearchRequest, ChannelSearchResponse, ChannelSearchResponseItem, ChannelSearchResponseItemWithMetadata, ChannelSearchResult, ChannelSortTimestamp, ChannelThreadFilters, ChatFilters, ChatMessageSearchResult, ChatMetadata, ChatSearchRequest, ChatSearchResponse, ChatSearchResponseItem, ChatSearchResponseItemWithMetadata, ClientOptions, CrmCompanyFilters, CrmCompanySearchDomain, CrmCompanySearchResponseItem, DataType, DocumentFilters, DocumentMetadata, DocumentSearchRequest, DocumentSearchResponse, DocumentSearchResponseItem, DocumentSearchResponseItemWithMetadata, DocumentSearchResult, DocumentSubType, EmailFilters, EmailSearchParticipant, EmailSearchRequest, EmailSearchResponse, EmailSearchResponseItem, EmailSearchResponseItemWithMetadata, EmailSearchResult, EmptyResponse, EntityFilters, EntityReference, EntityType, ErrorResponse, FileType, ForeignEntityFilters, Highlight, MatchType, NotificationFilters, NotificationState, ProjectFilters, ProjectMetadata, ProjectSearchMetadata, ProjectSearchRequest, ProjectSearchResponseItem, ProjectSearchResponseItemWithMetadata, ProjectSearchResult, PropertyDefinition, PropertyFilter, PropertyOwner, PropertyValue, ReminderFilters, SearchGotoAgentSession, SearchGotoCallRecord, SearchGotoChannel, SearchGotoChat, SearchGotoContent, SearchGotoDocument, SearchGotoEmail, SearchHighlight, SearchOn, SearchResponse, SharedEmailFilter, SimpleCalendarEventSearchResponseBaseItemHumanReadableTimestamp, SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp, SimpleChannelSearchReponseBaseItem, SimpleChannelSearchReponseBaseItemHumanReadableTimestamp, SimpleChannelSearchResponse, SimpleChatSearchResponse, SimpleChatSearchResponseBaseItem, SimpleChatSearchResponseBaseItemHumanReadableTimestamp, SimpleDocumentSearchResponse, SimpleDocumentSearchResponseBaseItem, SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp, SimpleEmailSearchResponse, SimpleEmailSearchResponseBaseItem, SimpleEmailSearchResponseBaseItemHumanReadableTimestamp, SimpleProjectSearchResponse, SimpleProjectSearchResponseBaseItem, SimpleProjectSearchResponseBaseItemHumanReadableTimestamp, SimpleSearchResponse, SimpleSearchResponseItem, SimpleUnifiedSearchBaseResponse, SimpleUnifiedSearchData, SimpleUnifiedSearchError, SimpleUnifiedSearchErrors, SimpleUnifiedSearchResponse, SimpleUnifiedSearchResponseBaseItem, SimpleUnifiedSearchResponseBaseItemHumanReadableTimestamp, SimpleUnifiedSearchResponses, SoupProperty, TagFilterMode, TaskFilters, UnifiedSearchData, UnifiedSearchError, UnifiedSearchErrors, UnifiedSearchRequest, UnifiedSearchResponse, UnifiedSearchResponse2, UnifiedSearchResponseItem, UnifiedSearchResponses } from './types.gen';
+export type { AgentSessionAuthor, AgentSessionFilters, AgentSessionSearchResponseItem, AgentSessionSearchResult, CalendarEventFilters, CalendarEventMetadata, CalendarEventOrganizer, CalendarEventSearchOccurrence, CalendarEventSearchResponseItem, CalendarEventSearchResponseItemWithMetadata, CalendarEventSearchResult, CalendarEventSearchTime, CallFilters, CallRecordMetadata, CallRecordSearchResponseItem, CallRecordSearchResponseItemWithMetadata, CallRecordSearchResult, CallStatus, ChannelFilters, ChannelMessageSearchResponseItem, ChannelMetadata, ChannelNameSearchResponseItem, ChannelSearchRequest, ChannelSearchResponse, ChannelSearchResponseItem, ChannelSearchResponseItemWithMetadata, ChannelSearchResult, ChannelSortTimestamp, ChannelThreadFilters, ChatFilters, ChatMessageSearchResult, ChatMetadata, ChatSearchRequest, ChatSearchResponse, ChatSearchResponseItem, ChatSearchResponseItemWithMetadata, ClientOptions, CrmCompanyFilters, CrmCompanySearchDomain, CrmCompanySearchResponseItem, DataType, DocumentFilters, DocumentMetadata, DocumentSearchRequest, DocumentSearchResponse, DocumentSearchResponseItem, DocumentSearchResponseItemWithMetadata, DocumentSearchResult, DocumentSubType, EmailFilters, EmailSearchParticipant, EmailSearchRequest, EmailSearchResponse, EmailSearchResponseItem, EmailSearchResponseItemWithMetadata, EmailSearchResult, EmptyResponse, EntityFilters, EntityReference, EntityType, ErrorResponse, FileType, ForeignEntityFilters, Highlight, InitiativeFilters, MatchType, NotificationFilters, NotificationState, ProjectFilters, ProjectMetadata, ProjectSearchMetadata, ProjectSearchRequest, ProjectSearchResponseItem, ProjectSearchResponseItemWithMetadata, ProjectSearchResult, PropertyDefinition, PropertyFilter, PropertyOwner, PropertyValue, ReminderFilters, SearchGotoAgentSession, SearchGotoCallRecord, SearchGotoChannel, SearchGotoChat, SearchGotoContent, SearchGotoDocument, SearchGotoEmail, SearchHighlight, SearchOn, SearchResponse, SharedEmailFilter, SimpleCalendarEventSearchResponseBaseItemHumanReadableTimestamp, SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp, SimpleChannelSearchReponseBaseItem, SimpleChannelSearchReponseBaseItemHumanReadableTimestamp, SimpleChannelSearchResponse, SimpleChatSearchResponse, SimpleChatSearchResponseBaseItem, SimpleChatSearchResponseBaseItemHumanReadableTimestamp, SimpleDocumentSearchResponse, SimpleDocumentSearchResponseBaseItem, SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp, SimpleEmailSearchResponse, SimpleEmailSearchResponseBaseItem, SimpleEmailSearchResponseBaseItemHumanReadableTimestamp, SimpleProjectSearchResponse, SimpleProjectSearchResponseBaseItem, SimpleProjectSearchResponseBaseItemHumanReadableTimestamp, SimpleSearchResponse, SimpleSearchResponseItem, SimpleUnifiedSearchBaseResponse, SimpleUnifiedSearchData, SimpleUnifiedSearchError, SimpleUnifiedSearchErrors, SimpleUnifiedSearchResponse, SimpleUnifiedSearchResponseBaseItem, SimpleUnifiedSearchResponseBaseItemHumanReadableTimestamp, SimpleUnifiedSearchResponses, SoupProperty, TagFilterMode, TaskFilters, UnifiedSearchData, UnifiedSearchError, UnifiedSearchErrors, UnifiedSearchRequest, UnifiedSearchResponse, UnifiedSearchResponse2, UnifiedSearchResponseItem, UnifiedSearchResponses } from './types.gen';
diff --git a/packages/sdk/generated/search/types.gen.ts b/packages/sdk/generated/search/types.gen.ts
index 790dba6641..46440d805b 100644
--- a/packages/sdk/generated/search/types.gen.ts
+++ b/packages/sdk/generated/search/types.gen.ts
@@ -1324,6 +1324,10 @@ export type EntityFilters = {
* the bundled [ForeignEntityFilters]
*/
foreign_entity_filters?: ForeignEntityFilters;
+ /**
+ * Initiative filters. Initiatives are opt-in.
+ */
+ initiative_filters?: InitiativeFilters;
/**
* the bundled [ProjectFilters]
*/
@@ -1365,7 +1369,7 @@ export type EntityReference = {
/**
* Type of entity that can be referenced by entity properties.
*/
-export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';
+export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'INITIATIVE' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';
/**
* A plain old json error response for use with axum.
@@ -1440,6 +1444,40 @@ export type Highlight = {
name?: string | null;
};
+/**
+ * Filters for initiatives.
+ */
+export type InitiativeFilters = {
+ /**
+ * Inclusive lower due-date bound.
+ */
+ due_after?: string | null;
+ /**
+ * Inclusive upper due-date bound.
+ */
+ due_before?: string | null;
+ /**
+ * Opt this query into initiatives at all. Initiatives are off by
+ * default — see [`crate::ast::initiative::InitiativeLiteral::Include`].
+ * Asking for specific `initiative_ids` or `owners` also opts in.
+ */
+ include?: boolean;
+ /**
+ * Initiative ids to filter by. Empty to include all accessible initiatives.
+ */
+ initiative_ids?: Array<string>;
+ /**
+ * Case-insensitive name substring.
+ */
+ name?: string | null;
+ /**
+ * Filter by initiative owner principal — a user ('macro|[email protected]'), a bot
+ * ('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every
+ * owner.
+ */
+ owners?: Array<string>;
+};
+
export type MatchType = 'exact' | 'partial' | 'regexp' | 'query';
/**
diff --git a/packages/sdk/generated/storage/index.ts b/packages/sdk/generated/storage/index.ts
index 0b3d6eabb0..4646c4d67a 100644
--- a/packages/sdk/generated/storage/index.ts
+++ b/packages/sdk/generated/storage/index.ts
@@ -1,4 +1,4 @@
// This file is auto-generated by @hey-api/openapi-ts
export { type Options, Sdk } from './sdk.gen';
-export type { AccessLevel, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionFilters, AgentSessionLifecycleEvent, Anchor, AnchorId, AnchorRequest, AnchorResponse, AnnotationIncrementalUpdate, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelContextMessage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelMessage, ApiChannelMessageKind, ApiChannelMessagesPage, ApiChannelParticipant, ApiChannelWithLatest, ApiCountedReaction, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiMessageAttachment, ApiMessageSender, ApiMessageSenderType, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, ApiResolvedChannelMessage, ApiThreadInfo, ApiThreadReply, ApproveHarnessPairingData, ApproveHarnessPairingError, ApproveHarnessPairingErrors, ApproveHarnessPairingResponse, ApproveHarnessPairingResponses, ApprovePairingRequest, AssignInitiativeTasksData, AssignInitiativeTasksError, AssignInitiativeTasksErrors, AssignInitiativeTasksResponse, AssignInitiativeTasksResponses, AssignTasksRequest, AssignTasksResponse, AssignTasksResult, AssignTaskStatus, AttachmentChange, AttendeeResponseStatus, BasicDocument, BasicDocumentSubType, BomPart, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallFilters, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelEventAttachment, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelsList, ChannelMentionedMetadata, ChannelMessage, ChannelMessageAttachmentCreatedMetadata, ChannelMessageAttachmentRemovedMetadata, ChannelMessageDeletedMetadata, ChannelMessageFilters, ChannelMessagePatchedMetadata, ChannelMessagePostedMetadata, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollabSurfaceResponse, CollabSurfaceTokenResponse, Comment, CommentThread, ConferenceProvider, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CountedReaction, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentRequest, CreateAgentResponse, CreateAgentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBotRequest, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelError, CreateChannelLabelErrors, CreateChannelLabelRequest, CreateChannelLabelResponse, CreateChannelLabelResponses, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenError, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponse, CreateCollabSurfaceTokenResponses, CreateCommentData, CreateCommentError, CreateCommentErrors, CreateCommentRequest, CreateCommentResponse, CreateCommentResponse2, CreateCommentResponses, CreateCrmCommentData, CreateCrmCommentError, CreateCrmCommentErrors, CreateCrmCommentRequest, CreateCrmCommentResponse, CreateCrmCommentResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreatedPairing, CreatedUserApiKey, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateHarnessPairingData, CreateHarnessPairingError, CreateHarnessPairingErrors, CreateHarnessPairingResponse, CreateHarnessPairingResponses, CreateInitiativeData, CreateInitiativeError, CreateInitiativeErrors, CreateInitiativeRequest, CreateInitiativeResponse, CreateInitiativeResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateMeetingRequest, CreatePairingRequest, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateReminderData, CreateReminderError, CreateReminderErrors, CreateReminderRequest, CreateReminderResponse, CreateReminderResponses, CreateSkillHandlerData, CreateSkillHandlerError, CreateSkillHandlerErrors, CreateSkillHandlerResponse, CreateSkillHandlerResponses, CreateSkillRequest, CreateSkillResponse, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateUserApiKeyData, CreateUserApiKeyError, CreateUserApiKeyErrors, CreateUserApiKeyRequest, CreateUserApiKeyResponse, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmComment, CrmCommentEntityType, CrmCommentThread, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CrmThread, CustomSpeakerAssignment, DataType, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorInfo, DeleteAnchorResponse, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelError, DeleteChannelLabelErrors, DeleteChannelLabelResponse, DeleteChannelLabelResponses, DeleteChannelResponse, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceError, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponse, DeleteCollabSurfaceResponses, DeleteCommentData, DeleteCommentError, DeleteCommentErrors, DeleteCommentRequest, DeleteCommentResponse, DeleteCommentResponse2, DeleteCommentResponses, DeleteCrmCommentData, DeleteCrmCommentError, DeleteCrmCommentErrors, DeleteCrmCommentResponse, DeleteCrmCommentResponses, DeleteCrmCommentResult, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessError, DeleteHarnessErrors, DeleteHarnessResponse, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeError, DeleteInitiativeErrors, DeleteInitiativeResponse, DeleteInitiativeResponses, DeleteMessageData, DeleteMessageError, DeleteMessageErrors, DeleteMessageQuery, DeleteMessageResponse, DeleteMessageResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteReminderData, DeleteReminderError, DeleteReminderErrors, DeleteReminderResponse, DeleteReminderResponses, DeleteSelfHarnessData, DeleteSelfHarnessError, DeleteSelfHarnessErrors, DeleteSelfHarnessResponse, DeleteSelfHarnessResponses, DeleteThreadInfo, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserApiKeyData, DeleteUserApiKeyError, DeleteUserApiKeyErrors, DeleteUserApiKeyResponse, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DescriptionDocumentId, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentId, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentSyncEditor, DocumentTeamShareResponse, DocumentTopicEvent, DocumentUpdatedMetadata, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditCommentData, EditCommentError, EditCommentErrors, EditCommentRequest, EditCommentResponse, EditCommentResponse2, EditCommentResponses, EditCrmCommentData, EditCrmCommentError, EditCrmCommentErrors, EditCrmCommentRequest, EditCrmCommentResponse, EditCrmCommentResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmptyResponse, EnsureCollabSurfaceData, EnsureCollabSurfaceError, EnsureCollabSurfaceErrors, EnsureCollabSurfaceRequest, EnsureCollabSurfaceResponse, EnsureCollabSurfaceResponses, EntityFilters, EntityMessageCreateData, EntityMessageCreateResponse, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponse, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponse, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponse, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponse, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponse, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponse, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponse, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponse, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponse, EntityMessageTypingResponses, EntityPermission, EntityPermissionResponse, EntityReference, EntityType, ErrorResponse, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileSystemNodeWithIds, FileType, FileTypeUpdate, FolderItem, ForeignEntity, ForeignEntityFilters, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActiveCallsData, GetActiveCallsError, GetActiveCallsErrors, GetActiveCallsResponse, GetActiveCallsResponses, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelMessagesCatchUpData, GetChannelMessagesCatchUpError, GetChannelMessagesCatchUpErrors, GetChannelMessagesCatchUpResponse, GetChannelMessagesCatchUpResponses, GetChannelMessagesData, GetChannelMessagesError, GetChannelMessagesErrors, GetChannelMessagesResponse, GetChannelMessagesResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceError, GetCollabSurfaceErrors, GetCollabSurfaceResponse, GetCollabSurfaceResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactByEmailData, GetContactByEmailError, GetContactByEmailErrors, GetContactByEmailResponse, GetContactByEmailResponse2, GetContactByEmailResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentCommentsData, GetDocumentCommentsError, GetDocumentCommentsErrors, GetDocumentCommentsResponse, GetDocumentCommentsResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceError, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponse, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetHarnessPairingData, GetHarnessPairingError, GetHarnessPairingErrors, GetHarnessPairingResponse, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeError, GetInitiativeErrors, GetInitiativeResponse, GetInitiativeResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMessageWithContextData, GetMessageWithContextError, GetMessageWithContextErrors, GetMessageWithContextResponse, GetMessageWithContextResponse2, GetMessageWithContextResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetReminderData, GetReminderError, GetReminderErrors, GetReminderResponse, GetReminderResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessError, GetSelfHarnessErrors, GetSelfHarnessResponse, GetSelfHarnessResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerError, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponse, GetSystemSkillsHandlerResponses, GetThreadRepliesData, GetThreadRepliesError, GetThreadRepliesErrors, GetThreadRepliesResponse, GetThreadRepliesResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubPullRequest, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestsResponse, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, GuestId, GuestJoinRequest, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, Harness, HarnessAgent, HarnessId, HarnessOwner, HarnessSession, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, ImportedAuthor, InFlightTurnSummary, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InitiativeDetail, InitiativeId, InitiativeList, InitiativeSummary, InputReceivedMetadata, InstallSyncData, InstallSyncErrors, InteractionReason, InviteMeetingRequest, InviteMeetingUsersRequest, Item, ItemWithUserAccessLevel, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, LatestMessage, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, LinkShare, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmCommentsData, ListCrmCommentsError, ListCrmCommentsErrors, ListCrmCommentsResponse, ListCrmCommentsResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListHarnessAgentsData, ListHarnessAgentsError, ListHarnessAgentsErrors, ListHarnessAgentsResponse, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesError, ListHarnessesErrors, ListHarnessesResponse, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsError, ListHarnessSessionsErrors, ListHarnessSessionsResponse, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesError, ListInitiativesErrors, ListInitiativesResponse, ListInitiativesResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListRemindersData, ListRemindersError, ListRemindersErrors, ListRemindersResponse, ListRemindersResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponse, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysError, ListUserApiKeysErrors, ListUserApiKeysResponse, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, Meeting, MeetingCancelData, MeetingCancelError, MeetingCancelErrors, MeetingCancelResponse, MeetingCancelResponses, MeetingCreateData, MeetingCreateError, MeetingCreateErrors, MeetingCreateResponse, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinError, MeetingGuestJoinErrors, MeetingGuestJoinResponse, MeetingGuestJoinResponses, MeetingInviteData, MeetingInviteError, MeetingInviteErrors, MeetingInvitePermissions, MeetingInvitePermissionsData, MeetingInvitePermissionsError, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponse, MeetingInvitePermissionsResponses, MeetingInviteResponse, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersError, MeetingInviteUsersErrors, MeetingInviteUsersResponse, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinError, MeetingJoinErrors, MeetingJoinResponse, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveError, MeetingLeaveErrors, MeetingLeaveResponse, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveError, MeetingListActiveErrors, MeetingListActiveResponse, MeetingListActiveResponses, MeetingListData, MeetingListError, MeetingListErrors, MeetingListResponse, MeetingListResponses, MeetingLookupData, MeetingLookupError, MeetingLookupErrors, MeetingLookupResponse, MeetingLookupResponses, MeetingShareData, MeetingShareError, MeetingShareErrors, MeetingShareResponse, MeetingShareResponses, MeetingsResponse, MeetingToken, MeetingUpdateData, MeetingUpdateError, MeetingUpdateErrors, MeetingUpdateResponse, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponse, MentionPreviewsResponses, Mentions, Message, MessageAttachment, MessageChange, MessageCursor, MessageDirection, MessageEvent, MessageListItem, MessagePage, MessageParent, MessagePatch, MessageThread, MessageThreadPreview, MessageTimelineData, MessageTimelineQuery, MessageTimelineResponse, MessageTimelineResponses, NewAttachment, NewChannelAttachment, NewThreadAnchor, NotificationFilters, NotificationState, PairingDetails, Params, ParticipantRole, PatchBotRequest, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchMessageData, PatchMessageError, PatchMessageErrors, PatchMessageNotificationPolicy, PatchMessageRequest, PatchMessageResponse, PatchMessageResponses, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfAnchorRequest, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PdfPlaceableCommentAnchorRequest, PendingClaimResponse, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostChannelMessagesData, PostChannelMessagesError, PostChannelMessagesErrors, PostChannelMessagesResponse, PostChannelMessagesResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessage, PostMessageData, PostMessageError, PostMessageErrors, PostMessageNotificationPolicy, PostMessageRequest, PostMessageResponse, PostMessageResponse2, PostMessageResponses, PostReactionData, PostReactionError, PostReactionErrors, PostReactionRequest, PostReactionResponse, PostReactionResponses, PostSoupAstRequest, PostSoupRequest, PostTypingData, PostTypingError, PostTypingErrors, PostTypingRequest, PostTypingResponse, PostTypingResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresignedUrl, PreviewSmartTagData, PreviewSmartTagError, PreviewSmartTagErrors, PreviewSmartTagResponse, PreviewSmartTagResponses, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyDefinition, PropertyFilter, PropertyInput, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesError, PutCrmTeamStagesErrors, PutCrmTeamStagesResponse, PutCrmTeamStagesResponses, ReactionAction, ReactionInput, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, Reminder, ReminderFilters, ReminderSchedule, RemindersList, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelError, RenameChannelLabelErrors, RenameChannelLabelRequest, RenameChannelLabelResponse, RenameChannelLabelResponses, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ReplaceCrmStagesRequest, RequestedHarnessScope, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, ResolveChannelMessageData, ResolveChannelMessageError, ResolveChannelMessageErrors, ResolveChannelMessageResponse, ResolveChannelMessageResponses, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RingStatus, RingStatusResponse, S3ObjectInfo, SaveBomPart, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SessionDeletedMetadata, SessionIdentity, SessionMentionedMetadata, SessionOpenedMetadata, SessionRenamedMetadata, SessionSettledMetadata, SessionStoppedMetadata, SetChannelLabelData, SetChannelLabelError, SetChannelLabelErrors, SetChannelLabelRequest, SetChannelLabelResponse, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureError, SetChannelPictureErrors, SetChannelPictureRequest, SetChannelPictureResponse, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetPropertyValue, SharedEmailFilter, SharePermissionV2, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SmartTagChannelMatch, SmartTagPreview, SoupAgentSessionSoupPropertiesField, SoupApiItem, SoupApiSort, SoupApiSortDirection, SoupAttachment, SoupCalendarEventSoupPropertiesField, SoupCalendarEventTime, SoupCallRecordGuest, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmDomain, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupReminderReference, SoupReminderSchedule, SoupReminderSoupPropertiesField, SoupThreadInfo, SoupThreadReply, StarterDocumentsResponse, StreamEventsData, StreamEventsError, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, String, SuccessResponse, SurfaceState, SyncServiceVersionId, SystemSkillSummary, TagFilterMode, TaskFilters, TeamOutOfOfficeItem, TeamOutOfOfficeResponse, TeamRole, Thread, ThreadAnchor, ThreadOrigin, ThreadPatch, ThreadResponse, ThreadState, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationError, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeResponse, TranscriptSegmentRequest, TurnEndedMetadata, TurnStartedMetadata, TurnSummary, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingAction, TypingInput, UnassignInitiativeTaskData, UnassignInitiativeTaskError, UnassignInitiativeTaskErrors, UnassignInitiativeTaskResponse, UnassignInitiativeTaskResponses, UnthreadedPdfUuidRequest, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentRequest, UpdateAgentResponse, UpdateAgentResponses, UpdateChannelSharePermission, UpdateCrmTeamSettingsRequest, UpdateInitiativeData, UpdateInitiativeError, UpdateInitiativeErrors, UpdateInitiativeRequest, UpdateInitiativeResponse, UpdateInitiativeResponses, UpdateMeetingRequest, UpdateOperation, UpdateReminderData, UpdateReminderError, UpdateReminderErrors, UpdateReminderRequest, UpdateReminderResponse, UpdateReminderResponses, UpdateSharePermissionRequestV2, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserApiKeyId, UserApiKeyInfo, UserApiKeysList, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, View, ViewPatch, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';
+export type { AccessLevel, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionFilters, AgentSessionLifecycleEvent, Anchor, AnchorId, AnchorRequest, AnchorResponse, AnnotationIncrementalUpdate, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelContextMessage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelMessage, ApiChannelMessageKind, ApiChannelMessagesPage, ApiChannelParticipant, ApiChannelWithLatest, ApiCountedReaction, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiMessageAttachment, ApiMessageSender, ApiMessageSenderType, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, ApiResolvedChannelMessage, ApiThreadInfo, ApiThreadReply, ApproveHarnessPairingData, ApproveHarnessPairingError, ApproveHarnessPairingErrors, ApproveHarnessPairingResponse, ApproveHarnessPairingResponses, ApprovePairingRequest, AssignInitiativeTasksData, AssignInitiativeTasksError, AssignInitiativeTasksErrors, AssignInitiativeTasksResponse, AssignInitiativeTasksResponses, AssignTasksRequest, AssignTasksResponse, AssignTasksResult, AssignTaskStatus, AttachmentChange, AttendeeResponseStatus, BasicDocument, BasicDocumentSubType, BomPart, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallFilters, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelEventAttachment, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelsList, ChannelMentionedMetadata, ChannelMessage, ChannelMessageAttachmentCreatedMetadata, ChannelMessageAttachmentRemovedMetadata, ChannelMessageDeletedMetadata, ChannelMessageFilters, ChannelMessagePatchedMetadata, ChannelMessagePostedMetadata, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollabSurfaceResponse, CollabSurfaceTokenResponse, Comment, CommentThread, ConferenceProvider, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CountedReaction, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentRequest, CreateAgentResponse, CreateAgentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBotRequest, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelError, CreateChannelLabelErrors, CreateChannelLabelRequest, CreateChannelLabelResponse, CreateChannelLabelResponses, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenError, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponse, CreateCollabSurfaceTokenResponses, CreateCommentData, CreateCommentError, CreateCommentErrors, CreateCommentRequest, CreateCommentResponse, CreateCommentResponse2, CreateCommentResponses, CreateCrmCommentData, CreateCrmCommentError, CreateCrmCommentErrors, CreateCrmCommentRequest, CreateCrmCommentResponse, CreateCrmCommentResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreatedPairing, CreatedUserApiKey, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateHarnessPairingData, CreateHarnessPairingError, CreateHarnessPairingErrors, CreateHarnessPairingResponse, CreateHarnessPairingResponses, CreateInitiativeData, CreateInitiativeError, CreateInitiativeErrors, CreateInitiativeRequest, CreateInitiativeResponse, CreateInitiativeResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateMeetingRequest, CreatePairingRequest, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateReminderData, CreateReminderError, CreateReminderErrors, CreateReminderRequest, CreateReminderResponse, CreateReminderResponses, CreateSkillHandlerData, CreateSkillHandlerError, CreateSkillHandlerErrors, CreateSkillHandlerResponse, CreateSkillHandlerResponses, CreateSkillRequest, CreateSkillResponse, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateUserApiKeyData, CreateUserApiKeyError, CreateUserApiKeyErrors, CreateUserApiKeyRequest, CreateUserApiKeyResponse, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmComment, CrmCommentEntityType, CrmCommentThread, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CrmThread, CustomSpeakerAssignment, DataType, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorInfo, DeleteAnchorResponse, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelError, DeleteChannelLabelErrors, DeleteChannelLabelResponse, DeleteChannelLabelResponses, DeleteChannelResponse, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceError, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponse, DeleteCollabSurfaceResponses, DeleteCommentData, DeleteCommentError, DeleteCommentErrors, DeleteCommentRequest, DeleteCommentResponse, DeleteCommentResponse2, DeleteCommentResponses, DeleteCrmCommentData, DeleteCrmCommentError, DeleteCrmCommentErrors, DeleteCrmCommentResponse, DeleteCrmCommentResponses, DeleteCrmCommentResult, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessError, DeleteHarnessErrors, DeleteHarnessResponse, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeError, DeleteInitiativeErrors, DeleteInitiativeResponse, DeleteInitiativeResponses, DeleteMessageData, DeleteMessageError, DeleteMessageErrors, DeleteMessageQuery, DeleteMessageResponse, DeleteMessageResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteReminderData, DeleteReminderError, DeleteReminderErrors, DeleteReminderResponse, DeleteReminderResponses, DeleteSelfHarnessData, DeleteSelfHarnessError, DeleteSelfHarnessErrors, DeleteSelfHarnessResponse, DeleteSelfHarnessResponses, DeleteThreadInfo, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserApiKeyData, DeleteUserApiKeyError, DeleteUserApiKeyErrors, DeleteUserApiKeyResponse, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DescriptionDocumentId, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentId, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentSyncEditor, DocumentTeamShareResponse, DocumentTopicEvent, DocumentUpdatedMetadata, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditCommentData, EditCommentError, EditCommentErrors, EditCommentRequest, EditCommentResponse, EditCommentResponse2, EditCommentResponses, EditCrmCommentData, EditCrmCommentError, EditCrmCommentErrors, EditCrmCommentRequest, EditCrmCommentResponse, EditCrmCommentResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmptyResponse, EnsureCollabSurfaceData, EnsureCollabSurfaceError, EnsureCollabSurfaceErrors, EnsureCollabSurfaceRequest, EnsureCollabSurfaceResponse, EnsureCollabSurfaceResponses, EntityFilters, EntityMessageCreateData, EntityMessageCreateResponse, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponse, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponse, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponse, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponse, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponse, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponse, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponse, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponse, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponse, EntityMessageTypingResponses, EntityPermission, EntityPermissionResponse, EntityReference, EntityType, ErrorResponse, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileSystemNodeWithIds, FileType, FileTypeUpdate, FolderItem, ForeignEntity, ForeignEntityFilters, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActiveCallsData, GetActiveCallsError, GetActiveCallsErrors, GetActiveCallsResponse, GetActiveCallsResponses, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelMessagesCatchUpData, GetChannelMessagesCatchUpError, GetChannelMessagesCatchUpErrors, GetChannelMessagesCatchUpResponse, GetChannelMessagesCatchUpResponses, GetChannelMessagesData, GetChannelMessagesError, GetChannelMessagesErrors, GetChannelMessagesResponse, GetChannelMessagesResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceError, GetCollabSurfaceErrors, GetCollabSurfaceResponse, GetCollabSurfaceResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactByEmailData, GetContactByEmailError, GetContactByEmailErrors, GetContactByEmailResponse, GetContactByEmailResponse2, GetContactByEmailResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentCommentsData, GetDocumentCommentsError, GetDocumentCommentsErrors, GetDocumentCommentsResponse, GetDocumentCommentsResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceError, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponse, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetHarnessPairingData, GetHarnessPairingError, GetHarnessPairingErrors, GetHarnessPairingResponse, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeError, GetInitiativeErrors, GetInitiativeResponse, GetInitiativeResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMessageWithContextData, GetMessageWithContextError, GetMessageWithContextErrors, GetMessageWithContextResponse, GetMessageWithContextResponse2, GetMessageWithContextResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetReminderData, GetReminderError, GetReminderErrors, GetReminderResponse, GetReminderResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessError, GetSelfHarnessErrors, GetSelfHarnessResponse, GetSelfHarnessResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerError, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponse, GetSystemSkillsHandlerResponses, GetThreadRepliesData, GetThreadRepliesError, GetThreadRepliesErrors, GetThreadRepliesResponse, GetThreadRepliesResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubPullRequest, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestsResponse, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, GuestId, GuestJoinRequest, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, Harness, HarnessAgent, HarnessId, HarnessOwner, HarnessSession, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, ImportedAuthor, InFlightTurnSummary, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InitiativeDetail, InitiativeFilters, InitiativeId, InitiativeList, InitiativeSummary, InputReceivedMetadata, InstallSyncData, InstallSyncErrors, InteractionReason, InviteMeetingRequest, InviteMeetingUsersRequest, Item, ItemWithUserAccessLevel, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, LatestMessage, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, LinkShare, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmCommentsData, ListCrmCommentsError, ListCrmCommentsErrors, ListCrmCommentsResponse, ListCrmCommentsResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListHarnessAgentsData, ListHarnessAgentsError, ListHarnessAgentsErrors, ListHarnessAgentsResponse, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesError, ListHarnessesErrors, ListHarnessesResponse, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsError, ListHarnessSessionsErrors, ListHarnessSessionsResponse, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesError, ListInitiativesErrors, ListInitiativesResponse, ListInitiativesResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListRemindersData, ListRemindersError, ListRemindersErrors, ListRemindersResponse, ListRemindersResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponse, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysError, ListUserApiKeysErrors, ListUserApiKeysResponse, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, Meeting, MeetingCancelData, MeetingCancelError, MeetingCancelErrors, MeetingCancelResponse, MeetingCancelResponses, MeetingCreateData, MeetingCreateError, MeetingCreateErrors, MeetingCreateResponse, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinError, MeetingGuestJoinErrors, MeetingGuestJoinResponse, MeetingGuestJoinResponses, MeetingInviteData, MeetingInviteError, MeetingInviteErrors, MeetingInvitePermissions, MeetingInvitePermissionsData, MeetingInvitePermissionsError, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponse, MeetingInvitePermissionsResponses, MeetingInviteResponse, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersError, MeetingInviteUsersErrors, MeetingInviteUsersResponse, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinError, MeetingJoinErrors, MeetingJoinResponse, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveError, MeetingLeaveErrors, MeetingLeaveResponse, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveError, MeetingListActiveErrors, MeetingListActiveResponse, MeetingListActiveResponses, MeetingListData, MeetingListError, MeetingListErrors, MeetingListResponse, MeetingListResponses, MeetingLookupData, MeetingLookupError, MeetingLookupErrors, MeetingLookupResponse, MeetingLookupResponses, MeetingShareData, MeetingShareError, MeetingShareErrors, MeetingShareResponse, MeetingShareResponses, MeetingsResponse, MeetingToken, MeetingUpdateData, MeetingUpdateError, MeetingUpdateErrors, MeetingUpdateResponse, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponse, MentionPreviewsResponses, Mentions, Message, MessageAttachment, MessageChange, MessageCursor, MessageDirection, MessageEvent, MessageListItem, MessagePage, MessageParent, MessagePatch, MessageThread, MessageThreadPreview, MessageTimelineData, MessageTimelineQuery, MessageTimelineResponse, MessageTimelineResponses, NewAttachment, NewChannelAttachment, NewThreadAnchor, NotificationFilters, NotificationState, PairingDetails, Params, ParticipantRole, PatchBotRequest, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchMessageData, PatchMessageError, PatchMessageErrors, PatchMessageNotificationPolicy, PatchMessageRequest, PatchMessageResponse, PatchMessageResponses, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfAnchorRequest, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PdfPlaceableCommentAnchorRequest, PendingClaimResponse, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostChannelMessagesData, PostChannelMessagesError, PostChannelMessagesErrors, PostChannelMessagesResponse, PostChannelMessagesResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessage, PostMessageData, PostMessageError, PostMessageErrors, PostMessageNotificationPolicy, PostMessageRequest, PostMessageResponse, PostMessageResponse2, PostMessageResponses, PostReactionData, PostReactionError, PostReactionErrors, PostReactionRequest, PostReactionResponse, PostReactionResponses, PostSoupAstRequest, PostSoupRequest, PostTypingData, PostTypingError, PostTypingErrors, PostTypingRequest, PostTypingResponse, PostTypingResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresignedUrl, PreviewSmartTagData, PreviewSmartTagError, PreviewSmartTagErrors, PreviewSmartTagResponse, PreviewSmartTagResponses, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyDefinition, PropertyFilter, PropertyInput, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesError, PutCrmTeamStagesErrors, PutCrmTeamStagesResponse, PutCrmTeamStagesResponses, ReactionAction, ReactionInput, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, Reminder, ReminderFilters, ReminderSchedule, RemindersList, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelError, RenameChannelLabelErrors, RenameChannelLabelRequest, RenameChannelLabelResponse, RenameChannelLabelResponses, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ReplaceCrmStagesRequest, RequestedHarnessScope, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, ResolveChannelMessageData, ResolveChannelMessageError, ResolveChannelMessageErrors, ResolveChannelMessageResponse, ResolveChannelMessageResponses, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RingStatus, RingStatusResponse, S3ObjectInfo, SaveBomPart, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SessionDeletedMetadata, SessionIdentity, SessionMentionedMetadata, SessionOpenedMetadata, SessionRenamedMetadata, SessionSettledMetadata, SessionStoppedMetadata, SetChannelLabelData, SetChannelLabelError, SetChannelLabelErrors, SetChannelLabelRequest, SetChannelLabelResponse, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureError, SetChannelPictureErrors, SetChannelPictureRequest, SetChannelPictureResponse, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetPropertyValue, SharedEmailFilter, SharePermissionV2, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SmartTagChannelMatch, SmartTagPreview, SoupAgentSessionSoupPropertiesField, SoupApiItem, SoupApiSort, SoupApiSortDirection, SoupAttachment, SoupCalendarEventSoupPropertiesField, SoupCalendarEventTime, SoupCallRecordGuest, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmDomain, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupInitiativeSoupPropertiesField, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupReminderReference, SoupReminderSchedule, SoupReminderSoupPropertiesField, SoupThreadInfo, SoupThreadReply, StarterDocumentsResponse, StreamEventsData, StreamEventsError, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, String, SuccessResponse, SurfaceState, SyncServiceVersionId, SystemSkillSummary, TagFilterMode, TaskFilters, TeamOutOfOfficeItem, TeamOutOfOfficeResponse, TeamRole, Thread, ThreadAnchor, ThreadOrigin, ThreadPatch, ThreadResponse, ThreadState, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationError, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeResponse, TranscriptSegmentRequest, TurnEndedMetadata, TurnStartedMetadata, TurnSummary, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingAction, TypingInput, UnassignInitiativeTaskData, UnassignInitiativeTaskError, UnassignInitiativeTaskErrors, UnassignInitiativeTaskResponse, UnassignInitiativeTaskResponses, UnthreadedPdfUuidRequest, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentRequest, UpdateAgentResponse, UpdateAgentResponses, UpdateChannelSharePermission, UpdateCrmTeamSettingsRequest, UpdateInitiativeData, UpdateInitiativeError, UpdateInitiativeErrors, UpdateInitiativeRequest, UpdateInitiativeResponse, UpdateInitiativeResponses, UpdateMeetingRequest, UpdateOperation, UpdateReminderData, UpdateReminderError, UpdateReminderErrors, UpdateReminderRequest, UpdateReminderResponse, UpdateReminderResponses, UpdateSharePermissionRequestV2, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserApiKeyId, UserApiKeyInfo, UserApiKeysList, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, View, ViewPatch, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';
diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.ts
index 4760ee69b4..462f1df7d7 100644
--- a/packages/sdk/generated/storage/types.gen.ts
+++ b/packages/sdk/generated/storage/types.gen.ts
@@ -5475,6 +5475,10 @@ export type EntityFilters = {
* the bundled [ForeignEntityFilters]
*/
foreign_entity_filters?: ForeignEntityFilters;
+ /**
+ * Initiative filters. Initiatives are opt-in.
+ */
+ initiative_filters?: InitiativeFilters;
/**
* the bundled [ProjectFilters]
*/
@@ -5554,7 +5558,7 @@ export type EntityReference = {
/**
* Type of entity that can be referenced by entity properties.
*/
-export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';
+export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DOCUMENT' | 'INITIATIVE' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';
/**
* A plain old json error response for use with axum.
@@ -6726,6 +6730,40 @@ export type InitiativeDetail = {
userAccessLevel: AccessLevel;
};
+/**
+ * Filters for initiatives.
+ */
+export type InitiativeFilters = {
+ /**
+ * Inclusive lower due-date bound.
+ */
+ due_after?: string | null;
+ /**
+ * Inclusive upper due-date bound.
+ */
+ due_before?: string | null;
+ /**
+ * Opt this query into initiatives at all. Initiatives are off by
+ * default — see [`crate::ast::initiative::InitiativeLiteral::Include`].
+ * Asking for specific `initiative_ids` or `owners` also opts in.
+ */
+ include?: boolean;
+ /**
+ * Initiative ids to filter by. Empty to include all accessible initiatives.
+ */
+ initiative_ids?: Array<string>;
+ /**
+ * Case-insensitive name substring.
+ */
+ name?: string | null;
+ /**
+ * Filter by initiative owner principal — a user ('macro|[email protected]'), a bot
+ * ('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every
+ * owner.
+ */
+ owners?: Array<string>;
+};
+
/**
* Opaque identifier for an initiative. Minted as UUIDv7 in application code.
*/
@@ -9651,6 +9689,45 @@ export type SoupForeignEntity = {
updatedAt: string;
};
+/**
+ * An initiative (called a project in the frontend) in the Soup feed.
+ */
+export type SoupInitiativeSoupPropertiesField = {
+ /**
+ * Properties attached to the entity.
+ */
+ properties: Array<SoupProperty>;
+} & {
+ /**
+ * Creation timestamp.
+ */
+ createdAt: string;
+ /**
+ * Document holding the initiative description.
+ */
+ descriptionDocumentId?: string | null;
+ /**
+ * Initiative identifier.
+ */
+ id: string;
+ /**
+ * Initiative display name.
+ */
+ name: string;
+ /**
+ * Initiative owner.
+ */
+ ownerId: string;
+ /**
+ * Last modification timestamp.
+ */
+ updatedAt: string;
+ /**
+ * Last time the requesting user viewed the initiative.
+ */
+ viewedAt?: string | null;
+};
+
/**
* A single item in the Soup feed.
*/
@@ -9672,6 +9749,12 @@ export type SoupItem = {
*/
data: SoupProjectSoupPropertiesField;
tag: 'project';
+} | {
+ /**
+ * Initiative entity.
+ */
+ data: SoupInitiativeSoupPropertiesField;
+ tag: 'initiative';
} | {
/**
* Email thread item.
diff --git a/packages/sdk/specs/properties.json b/packages/sdk/specs/properties.json
index a71d891cdf..2c22ce8fcc 100644
--- a/packages/sdk/specs/properties.json
+++ b/packages/sdk/specs/properties.json
@@ -1421,6 +1421,7 @@
"CHAT",
"COMPANY",
"DOCUMENT",
+ "INITIATIVE",
"PROJECT",
"TASK",
"THREAD",
@@ -1931,6 +1932,7 @@
"CHAT",
"COMPANY",
"DOCUMENT",
+ "INITIATIVE",
"PROJECT",
"THREAD",
"USER"
diff --git a/packages/sdk/specs/search.json b/packages/sdk/specs/search.json
index f90d825f2e..476c2eee6f 100644
--- a/packages/sdk/specs/search.json
+++ b/packages/sdk/specs/search.json
@@ -2167,6 +2167,10 @@
"$ref": "#/components/schemas/ForeignEntityFilters",
"description": "the bundled [ForeignEntityFilters]"
},
+ "initiative_filters": {
+ "$ref": "#/components/schemas/InitiativeFilters",
+ "description": "Initiative filters. Initiatives are opt-in."
+ },
"project_filters": {
"$ref": "#/components/schemas/ProjectFilters",
"description": "the bundled [ProjectFilters]"
@@ -2223,6 +2227,7 @@
"CHAT",
"COMPANY",
"DOCUMENT",
+ "INITIATIVE",
"PROJECT",
"TASK",
"THREAD",
@@ -2721,6 +2726,44 @@
}
}
},
+ "InitiativeFilters": {
+ "type": "object",
+ "description": "Filters for initiatives.",
+ "properties": {
+ "due_after": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Inclusive lower due-date bound."
+ },
+ "due_before": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Inclusive upper due-date bound."
+ },
+ "include": {
+ "type": "boolean",
+ "description": "Opt this query into initiatives at all. Initiatives are off by\ndefault — see [`crate::ast::initiative::InitiativeLiteral::Include`].\nAsking for specific `initiative_ids` or `owners` also opts in."
+ },
+ "initiative_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Initiative ids to filter by. Empty to include all accessible initiatives."
+ },
+ "name": {
+ "type": ["string", "null"],
+ "description": "Case-insensitive name substring."
+ },
+ "owners": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Filter by initiative owner principal — a user ('macro|[email protected]'), a bot\n('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every\nowner."
+ }
+ }
+ },
"MatchType": {
"type": "string",
"enum": ["exact", "partial", "regexp", "query"]
diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.json
index ef70322726..b1371384d0 100644
--- a/packages/sdk/specs/storage.json
+++ b/packages/sdk/specs/storage.json
@@ -23463,6 +23463,10 @@
"$ref": "#/components/schemas/ForeignEntityFilters",
"description": "the bundled [ForeignEntityFilters]"
},
+ "initiative_filters": {
+ "$ref": "#/components/schemas/InitiativeFilters",
+ "description": "Initiative filters. Initiatives are opt-in."
+ },
"project_filters": {
"$ref": "#/components/schemas/ProjectFilters",
"description": "the bundled [ProjectFilters]"
@@ -23608,6 +23612,7 @@
"CHAT",
"COMPANY",
"DOCUMENT",
+ "INITIATIVE",
"PROJECT",
"TASK",
"THREAD",
@@ -25761,6 +25766,44 @@
}
}
},
+ "InitiativeFilters": {
+ "type": "object",
+ "description": "Filters for initiatives.",
+ "properties": {
+ "due_after": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Inclusive lower due-date bound."
+ },
+ "due_before": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Inclusive upper due-date bound."
+ },
+ "include": {
+ "type": "boolean",
+ "description": "Opt this query into initiatives at all. Initiatives are off by\ndefault — see [`crate::ast::initiative::InitiativeLiteral::Include`].\nAsking for specific `initiative_ids` or `owners` also opts in."
+ },
+ "initiative_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Initiative ids to filter by. Empty to include all accessible initiatives."
+ },
+ "name": {
+ "type": ["string", "null"],
+ "description": "Case-insensitive name substring."
+ },
+ "owners": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Filter by initiative owner principal — a user ('macro|[email protected]'), a bot\n('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every\nowner."
+ }
+ }
+ },
"InitiativeId": {
"type": "string",
"format": "uuid",
@@ -30539,6 +30582,64 @@
}
}
},
+ "SoupInitiative_SoupPropertiesField": {
+ "allOf": [
+ {
+ "type": "object",
+ "description": "Property fields that can be flattened into property-bearing Soup items.",
+ "required": ["properties"],
+ "properties": {
+ "properties": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/SoupProperty"
+ },
+ "description": "Properties attached to the entity."
+ }
+ }
+ },
+ {
+ "type": "object",
+ "required": ["id", "name", "ownerId", "createdAt", "updatedAt"],
+ "properties": {
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Creation timestamp."
+ },
+ "descriptionDocumentId": {
+ "type": ["string", "null"],
+ "format": "uuid",
+ "description": "Document holding the initiative description."
+ },
+ "id": {
+ "type": "string",
+ "format": "uuid",
+ "description": "Initiative identifier."
+ },
+ "name": {
+ "type": "string",
+ "description": "Initiative display name."
+ },
+ "ownerId": {
+ "type": "string",
+ "description": "Initiative owner."
+ },
+ "updatedAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Last modification timestamp."
+ },
+ "viewedAt": {
+ "type": ["string", "null"],
+ "format": "date-time",
+ "description": "Last time the requesting user viewed the initiative."
+ }
+ }
+ }
+ ],
+ "description": "An initiative (called a project in the frontend) in the Soup feed."
+ },
"SoupItem": {
"oneOf": [
{
@@ -30586,6 +30687,21 @@
}
}
},
+ {
+ "type": "object",
+ "description": "Initiative entity.",
+ "required": ["data", "tag"],
+ "properties": {
+ "data": {
+ "$ref": "#/components/schemas/SoupInitiative_SoupPropertiesField",
+ "description": "Initiative entity."
+ },
+ "tag": {
+ "type": "string",
+ "enum": ["initiative"]
+ }
+ }
+ },
{
"type": "object",
"description": "Email thread item.",
diff --git a/services/document_storage_service/Cargo.toml b/services/document_storage_service/Cargo.toml
index f706e26fea..3c5392e694 100644
--- a/services/document_storage_service/Cargo.toml
+++ b/services/document_storage_service/Cargo.toml
@@ -120,10 +120,11 @@ github = { path = "../../crates/github", default-features = false, features = [
"sync",
] }
graphql_soup = { path = "../../crates/graphql_soup" }
+graphql_initiative = { path = "../../crates/graphql_initiative" }
harnesses = { path = "../../crates/harnesses" }
hex = { workspace = true }
http-body-util = { workspace = true }
-initiative = { path = "../../crates/initiative", features = ["inbound", "postgres"] }
+initiative = { path = "../../crates/initiative", features = ["inbound", "postgres", "resources"] }
jsonwebtoken = { workspace = true }
last_online_tracker = { path = "../../crates/last_online_tracker" }
lazy_static = { workspace = true }
diff --git a/services/document_storage_service/src/api/context.rs b/services/document_storage_service/src/api/context.rs
index c87f7a002b..2264e3efff 100644
--- a/services/document_storage_service/src/api/context.rs
+++ b/services/document_storage_service/src/api/context.rs
@@ -601,6 +601,8 @@ pub(crate) struct ApiContext {
pub user_api_key_state: DssUserApiKeyState,
pub reminders_state: DssRemindersState,
pub initiative_state: DssInitiativeState,
+ pub graphql_initiative_context: graphql_initiative::InitiativeGraphqlContext,
+ pub graphql_initiative_entity_loader: graphql_initiative::InitiativeEntityLoader,
pub collab_surface_state: DssCollabSurfaceState,
pub foreign_entity_state: DssForeignEntityState,
pub macro_event_broker: DssEventBroker,
diff --git a/services/document_storage_service/src/api/graphql_soup.rs b/services/document_storage_service/src/api/graphql_soup.rs
index 7c1dc88b80..e16aed5107 100644
--- a/services/document_storage_service/src/api/graphql_soup.rs
+++ b/services/document_storage_service/src/api/graphql_soup.rs
@@ -165,6 +165,16 @@ fn insert_graphql_context_data(
data.insert(state.favorites_mutation_service.clone());
data.insert(state.favorites_service.clone());
data.insert(state.channel_service.clone());
+ data.insert(state.graphql_initiative_context.clone());
+ data.insert(state.graphql_initiative_entity_loader.clone());
+ data.insert(graphql_initiative::initiative_detail_loader(
+ state.graphql_initiative_context.clone(),
+ macro_user_id.clone(),
+ ));
+ data.insert(graphql_initiative::initiative_summary_loader(
+ state.graphql_initiative_context.clone(),
+ macro_user_id.clone(),
+ ));
data.insert(state.graphql_notification_reader.clone());
data.insert(state.soup_router_state.email_service());
data.insert(state.entity_access_service.clone());
diff --git a/services/document_storage_service/src/main.rs b/services/document_storage_service/src/main.rs
index 16509c5809..2d3eb560dc 100644
--- a/services/document_storage_service/src/main.rs
+++ b/services/document_storage_service/src/main.rs
@@ -440,7 +440,12 @@ async fn run() -> anyhow::Result<()> {
Some(permission_checker),
Some(notification_service),
)
- .with_event_broker(macro_event_broker.clone()),
+ .with_event_broker(macro_event_broker.clone())
+ .with_initiative_assignees(Arc::new(
+ initiative::domain::assignees::InitiativeAssignees::new(PgInitiativeRepo::new(
+ db.clone(),
+ )),
+ )),
);
// Create the channel list service used by soup.
@@ -1223,6 +1228,11 @@ async fn run() -> anyhow::Result<()> {
macro_event_broker.clone(),
),
),
+ Arc::new(initiative::outbound::resources::ProjectResources::new(
+ properties_service.clone(),
+ system_properties_service.clone(),
+ entity_access_service.clone(),
+ )),
));
let collab_surface_service = CollabSurfaceServiceImpl::new(
@@ -1234,6 +1244,29 @@ async fn run() -> anyhow::Result<()> {
config.document_permission_jwt.as_ref().to_string(),
);
+ // Individual initiative reads preserve read-after-write consistency when a
+ // newly created project opens immediately. Lists retain the replica reader.
+ // Reuse Soup hydration so detail and mutation metadata include viewer history.
+ let initiative_entity_soup = Arc::new(
+ SoupImpl::new(
+ PgSoupRepo::new(readonly_pool::ReadOnlyPool(db.clone())),
+ frecency_service.clone(),
+ ReadonlyEmailPreviewAdapter(email_service.clone()),
+ ChannelListServiceImpl::new(
+ PgChannelsRepo::new(db.clone()),
+ PgChannelsRepo::new(db.clone()),
+ frecency_storage.clone(),
+ ),
+ call::domain::service::CallRecordQueryServiceImpl::new(PgCallRepo::new(db.clone())),
+ crm_service.clone(),
+ ForeignEntityServiceImpl::new(PgForeignEntityRepo::new(db.clone())),
+ reminders_service.clone(),
+ )
+ .with_agent_branches(agent_changes::outbound::postgres::PgChangesetRepo::new(
+ db.clone(),
+ )),
+ );
+
// Keep the replica-backed Soup reader alongside the primary-backed email
// writer in SoupRouterState. REST, GraphQL lists, and realtime hydration
// share this reader; only email mutations and their reply loader use the
@@ -1533,7 +1566,7 @@ async fn run() -> anyhow::Result<()> {
contacts_ingress: contacts_ingress.clone(),
soup_router_state: SoupRouterState::from_arc(
soup_service.clone(),
- email_service,
+ email_service.clone(),
entity_access_service.clone(),
authorization_state.clone(),
)
@@ -1563,6 +1596,13 @@ async fn run() -> anyhow::Result<()> {
entity_access_service.clone(),
authorization_state.clone(),
),
+ graphql_initiative_entity_loader: graphql_initiative::InitiativeEntityLoader(
+ graphql_soup::soup_item_loader(initiative_entity_soup, Arc::new(email_service.clone())),
+ ),
+ graphql_initiative_context: graphql_initiative::InitiativeGraphqlContext::new(
+ initiative_service.clone(),
+ entity_access_service.clone(),
+ ),
initiative_state: InitiativeRouterState::new(
initiative_service,
entity_access_service.clone(),
diff --git a/static_assets/schema.graphql b/static_assets/schema.graphql
index 893327b588..b91ab9439b 100644
--- a/static_assets/schema.graphql
+++ b/static_assets/schema.graphql
@@ -59,6 +59,10 @@ input ChannelSharePolicyInput {
Mutation root combining independent domain GraphQL adapters.
"""
type CompleteMutationRoot {
+ """
+ Remove a property assignment and identify its normalized cache record.
+ """
+ deleteEntityProperty(entityType: GraphqlPropertyTargetEntityType!, entityId: String!, entityPropertyId: ID!): GraphqlCacheDeletion!
"""
Set or attach one property on an entity.
"""
@@ -150,6 +154,30 @@ type CompleteMutationRoot {
`DRAFT_ALREADY_SENT`.
"""
deleteEmailDraft(input: DeleteEmailDraftInput!): DeleteEmailDraftPayload!
+ """
+ Create an initiative owned by the authenticated user.
+ """
+ createInitiative(input: CreateInitiativeInput!): GraphqlSoupInitiative!
+ """
+ Update project fields; owner-only sharing and membership policy remains in the domain.
+ """
+ updateInitiative(initiativeId: ID!, input: UpdateInitiativeInput!): GraphqlSoupInitiative!
+ """
+ Delete an initiative after its owner capability has been verified.
+ """
+ deleteInitiative(initiativeId: ID!): Boolean!
+ """
+ Assign or move tasks, preserving partial task authorization results.
+ """
+ assignInitiativeTasks(initiativeId: ID!, taskIds: [ID!]!): [InitiativeTaskAssignment!]!
+ """
+ Remove a task using project and task edit capabilities.
+ """
+ unassignInitiativeTask(initiativeId: ID!, taskId: ID!): Boolean!
+ """
+ Clear a task's project using task edit access, even after project access is revoked.
+ """
+ clearTaskInitiative(taskId: ID!): Boolean!
}
"""
@@ -171,6 +199,28 @@ type CompleteSubscriptionRoot {
activityUpdates: GraphqlActivityPatch!
}
+"""
+Create an initiative owned by the authenticated viewer.
+"""
+input CreateInitiativeInput {
+ """
+ Initial name.
+ """
+ name: String!
+ """
+ Initial description Markdown.
+ """
+ description: String
+ """
+ Initial collaborators.
+ """
+ memberIds: [String!]
+ """
+ Whether to share with the owner's team, defaulting to true.
+ """
+ shareWithTeam: Boolean
+}
+
"""
Input for deleting an email draft.
"""
@@ -2153,6 +2203,10 @@ input GraphqlEntityFilterAst {
"""
agentSessionFilter: GraphqlAgentSessionExpr
"""
+ The initiative filter to apply. Initiatives are opt-in.
+ """
+ initiativeFilter: GraphqlInitiativeExpr
+ """
The properties filter to apply.
"""
propertiesFilter: GraphqlFilterPropertiesExpr
@@ -3080,6 +3134,20 @@ type GraphqlInboxReauthRequiredMetadata {
emailAddress: String!
}
+"""
+The two operands of a recursive `InitiativeFilterExpr` binary expression.
+"""
+input GraphqlInitiativeBinaryExpr {
+ """
+ Left expression.
+ """
+ left: GraphqlInitiativeExpr!
+ """
+ Right expression.
+ """
+ right: GraphqlInitiativeExpr!
+}
+
"""
represents the initiative description subtype fields
"""
@@ -3090,6 +3158,58 @@ type GraphqlInitiativeDescriptionSubType {
nothing: Boolean!
}
+"""
+A recursive `InitiativeFilterExpr` filter expression.
+"""
+input GraphqlInitiativeExpr @oneOf {
+ """
+ Both expressions must match.
+ """
+ and: GraphqlInitiativeBinaryExpr
+ """
+ Either expression may match.
+ """
+ or: GraphqlInitiativeBinaryExpr
+ """
+ Negate an expression.
+ """
+ not: GraphqlInitiativeExpr
+ """
+ Match a literal.
+ """
+ literal: GraphqlInitiativeLiteral
+}
+
+"""
+GraphQL input for selecting initiatives through Soup.
+"""
+input GraphqlInitiativeLiteral @oneOf {
+ """
+ Opt into initiatives; must be true. Omit the filter to exclude them.
+ """
+ include: Boolean
+ """
+ Match an initiative identifier.
+ """
+ id: ID
+ """
+ Match the owning principal.
+ """
+ owner: String
+ """
+ Match a case-insensitive substring of the name.
+ """
+ nameContains: String
+ """
+ Match projects due before this RFC 3339 timestamp.
+ """
+ dueBefore: String
+ """
+ Match projects due after this RFC 3339 timestamp.
+ """
+ dueAfter: String
+}
+
"""
Metadata for a team invitation.
"""
@@ -3406,6 +3526,16 @@ Realtime notification patch represented as a new, updated, or deleted notificati
"""
union GraphqlNotificationPatch = GraphqlNewNotification | GraphqlUpdatedNotification | GraphqlCacheDeletion
+"""
+Number stored by a numeric select option.
+"""
+type GraphqlNumberPropertyOptionValue {
+ """
+ Stored number.
+ """
+ value: Float!
+}
+
"""
A numeric property value.
"""
@@ -3591,6 +3721,92 @@ enum GraphqlPropertyDataType {
LINK
}
+"""
+A globally identified property definition, independent of any assignment.
+"""
+type GraphqlPropertyDefinition {
+ """
+ Global identity of the shared definition, not an entity assignment.
+ """
+ id: ID!
+ """
+ Principal owning the definition.
+ """
+ owner: GraphqlPropertyDefinitionOwner!
+ """
+ User-visible property name.
+ """
+ displayName: String!
+ """
+ The type of value accepted by this property.
+ """
+ dataType: GraphqlPropertyDataType!
+ """
+ Whether more than one selected value is supported.
+ """
+ isMultiSelect: Boolean!
+ """
+ Entity-reference type constraint, if any.
+ """
+ specificEntityType: GraphqlPropertyEntityType
+ """
+ Whether the system manages this definition.
+ """
+ isSystem: Boolean!
+ """
+ Whether the property represents generated entity metadata.
+ """
+ isMetadata: Boolean!
+ """
+ When this definition was created, as RFC 3339.
+ """
+ createdAt: String!
+ """
+ When this definition last changed, as RFC 3339.
+ """
+ updatedAt: String!
+ """
+ Selectable options, loaded only when requested.
+ """
+ options: [GraphqlPropertyOption!]!
+}
+
+"""
+Ownership facts embedded in a property definition.
+"""
+type GraphqlPropertyDefinitionOwner {
+ """
+ Kind of owning principal.
+ """
+ scope: GraphqlPropertyOwnerScope!
+ """
+ User or team identifier; absent for system definitions.
+ """
+ principalId: String
+}
+
+"""
+Which authenticated-caller property definitions to list.
+"""
+enum GraphqlPropertyDefinitionScope {
+ """
+ Definitions owned by the viewer.
+ """
+ USER
+ """
+ Definitions owned by the viewer's team.
+ """
+ TEAM
+ """
+ System definitions shared by all viewers.
+ """
+ SYSTEM
+ """
+ The viewer's personal, team, and system definitions.
+ """
+ ALL
+}
+
"""
An entity reference stored in a property value.
"""
@@ -3638,6 +3854,10 @@ enum GraphqlPropertyEntityType {
"""
DOCUMENT
"""
+ Initiative entity.
+ """
+ INITIATIVE
+ """
Project entity.
"""
PROJECT
@@ -3655,6 +3875,63 @@ enum GraphqlPropertyEntityType {
USER
}
+"""
+A globally identified selectable option belonging to one property definition.
+"""
+type GraphqlPropertyOption {
+ """
+ Stable global identity of this selectable option.
+ """
+ id: ID!
+ """
+ Definition to which the option belongs.
+ """
+ propertyDefinitionId: ID!
+ """
+ Ordering within the definition's available options.
+ """
+ displayOrder: Int!
+ """
+ Typed option value.
+ """
+ value: GraphqlPropertyOptionValue!
+ """
+ Optional display color.
+ """
+ color: String
+ """
+ Creation time as RFC 3339.
+ """
+ createdAt: String!
+ """
+ Last update time as RFC 3339.
+ """
+ updatedAt: String!
+}
+
+"""
+Exactly one of the supported option value types.
+"""
+union GraphqlPropertyOptionValue = GraphqlStringPropertyOptionValue | GraphqlNumberPropertyOptionValue
+
+"""
+The kind of principal owning a property definition.
+"""
+enum GraphqlPropertyOwnerScope {
+ """
+ A personal definition.
+ """
+ USER
+ """
+ A team definition.
+ """
+ TEAM
+ """
+ A system definition.
+ """
+ SYSTEM
+}
+
"""
Canonical entity type accepted for property targets.
"""
@@ -3680,7 +3957,11 @@ enum GraphqlPropertyTargetEntityType {
"""
DOCUMENT
"""
- Project target.
+ Initiative target, displayed as a Project in the application.
+ """
+ INITIATIVE
+ """
+ Folder project target.
"""
PROJECT
"""
@@ -5536,6 +5817,10 @@ interface GraphqlSoupEntity {
GraphQL representation of Soup entity types.
"""
enum GraphqlSoupEntityType {
+ """
+ Initiative entity, presented as a project in the frontend.
+ """
+ INITIATIVE
"""
Document entity.
"""
@@ -5666,6 +5951,82 @@ type GraphqlSoupForeignEntity implements GraphqlSoupEntity {
frecencyScore: Float
}
+"""
+GraphQL representation of a Soup initiative.
+"""
+type GraphqlSoupInitiative implements GraphqlSoupEntity {
+ """
+ The canonical initiative identifier.
+ """
+ id: ID!
+ """
+ Canonical entity kind.
+ """
+ entityType: GraphqlSoupEntityType!
+ """
+ Opaque cache projection metadata, unavailable for this entity variant.
+ """
+ cacheProjection: SoupCacheProjection
+ """
+ User-visible project name.
+ """
+ displayName: String
+ """
+ Common initiative metadata.
+ """
+ metadata: GraphqlEntityMetadata!
+ """
+ Document backing the project's description, when one exists.
+ """
+ descriptionDocumentId: ID
+ """
+ Properties assigned to this entity that the authenticated user may view.
+ """
+ properties: [GraphqlProperty!]!
+ """
+ Notifications associated with this entity for the authenticated user.
+ """
+ notifications(filter: GraphqlNotificationFilter, limit: Int): [GraphqlNotification!]!
+ """
+ Whether the authenticated viewer has favorited this entity.
+ """
+ isFavorited: Boolean!
+ """
+ The authenticated viewer's effective permission for this entity.
+ """
+ viewerPermission: GraphqlEntityPermission
+ """
+ The newest activity on this entity, newest first. Loaded lazily and
+ batched across entities; an activity outage degrades to an empty
+ timeline. Deeper history belongs to the viewer's activity feed.
+ """
+ activity(limit: Int): [GraphqlActivityEvent!]!
+ """
+ Collaborators, independent of assignees.
+ """
+ memberIds: [String!]!
+ """
+ Associated task identifiers visible to this viewer.
+ """
+ taskIds: [ID!]!
+ """
+ Current sharing state.
+ """
+ sharePermission: InitiativeSharePermission!
+ """
+ Number of associated tasks this viewer can see.
+ """
+ taskCount: Int!
+ """
+ Number of completed associated tasks this viewer can see.
+ """
+ completedTaskCount: Int!
+ """
+ The viewer's frecency score for this entity, when loaded.
+ """
+ frecencyScore: Float
+}
+
"""
GraphQL representation of the soup project.
"""
@@ -5879,6 +6240,16 @@ type GraphqlSoupReminderReference {
subType: String
}
+"""
+Text stored by a string select option.
+"""
+type GraphqlStringPropertyOptionValue {
+ """
+ Stored text.
+ """
+ value: String!
+}
+
"""
A string property value.
"""
@@ -5972,6 +6343,26 @@ type GraphqlUser {
"""
id: ID!
"""
+ One initiative accessible to the authenticated viewer.
+ """
+ initiative(initiativeId: ID!): GraphqlSoupInitiative!
+ """
+ A permission-filtered page of task identifiers within an initiative.
+ """
+ initiativeTasks(initiativeId: ID!, input: InitiativeTasksInput): InitiativeTasksPage!
+ """
+ Initiative chips for tasks, without inaccessible project metadata.
+ """
+ taskInitiativeReferences(taskIds: [ID!]!): [TaskInitiativeReference!]!
+ """
+ Authorized property definitions available to this viewer.
+ """
+ propertyDefinitions(scope: GraphqlPropertyDefinitionScope!, forEntityType: GraphqlPropertyEntityType): [GraphqlPropertyDefinition!]!
+ """
+ Select options available to the viewer for one property definition.
+ """
+ propertyOptions(propertyDefinitionId: ID!): [GraphqlPropertyOption!]!
+ """
The authenticated user's favorites in manual order, optionally
restricted by entity type and entity id.
"""
@@ -6072,6 +6463,194 @@ input GroupedSoupInput @oneOf {
continuation: GroupedSoupContinuationInput
}
+"""
+Grant to a shared channel.
+"""
+type InitiativeChannelShare {
+ """
+ Channel receiving access.
+ """
+ channelId: ID!
+ """
+ Access granted to the channel.
+ """
+ accessLevel: GraphqlEntityAccessLevel!
+}
+
+"""
+A channel sharing patch.
+"""
+input InitiativeChannelShareInput {
+ """
+ Kind of channel grant change.
+ """
+ operation: InitiativeChannelShareOperation!
+ """
+ Channel identifier.
+ """
+ channelId: ID!
+ """
+ Grant level for add or replace.
+ """
+ accessLevel: GraphqlEntityAccessLevel
+}
+
+"""
+Mutation of one channel grant.
+"""
+enum InitiativeChannelShareOperation {
+ """
+ Add a grant.
+ """
+ ADD
+ """
+ Remove a grant.
+ """
+ REMOVE
+ """
+ Replace a grant.
+ """
+ REPLACE
+}
+
+"""
+Link recipients supported by the sharing domain.
+"""
+enum InitiativeLinkShare {
+ """
+ Everyone with the link.
+ """
+ PUBLIC
+ """
+ Members of the owner's team with the link.
+ """
+ TEAM
+}
+
+"""
+Typed sharing state for an initiative.
+"""
+type InitiativeSharePermission {
+ """
+ Stable identifier of the sharing policy.
+ """
+ id: ID!
+ """
+ Audience permitted through the link, when enabled.
+ """
+ linkShare: InitiativeLinkShare
+ """
+ Permission granted to the link audience.
+ """
+ linkShareAccessLevel: GraphqlEntityAccessLevel
+ """
+ Explicit permission granted to the owner's team.
+ """
+ teamShareAccessLevel: GraphqlEntityAccessLevel
+ """
+ Owner of the shared initiative.
+ """
+ owner: String!
+ """
+ Explicit channel sharing grants.
+ """
+ channelSharePermissions: [InitiativeChannelShare!]!
+}
+
+"""
+Sharing patch; omitted and null fields have distinct meanings.
+"""
+input InitiativeSharePermissionInput {
+ """
+ Omit to preserve, null to disable link sharing.
+ """
+ linkShare: InitiativeLinkShare
+ """
+ Omit to preserve, null to reset to the domain default.
+ """
+ linkShareAccessLevel: GraphqlEntityAccessLevel
+ """
+ Omit to preserve, null to disable team sharing.
+ """
+ teamShareAccessLevel: GraphqlEntityAccessLevel
+ """
+ Changes to channel grants.
+ """
+ channelSharePermissions: [InitiativeChannelShareInput!]
+}
+
+"""
+One result in the deduplicated request order.
+"""
+type InitiativeTaskAssignment {
+ """
+ Task whose assignment was attempted.
+ """
+ taskId: ID!
+ """
+ Domain result of this assignment.
+ """
+ status: InitiativeTaskAssignmentStatus!
+}
+
+"""
+Per-task result of an assignment request.
+"""
+enum InitiativeTaskAssignmentStatus {
+ """
+ Newly assigned or already assigned here.
+ """
+ ASSIGNED
+ """
+ Moved from another initiative.
+ """
+ MOVED
+ """
+ Document exists but is not a task.
+ """
+ NOT_A_TASK
+ """
+ Task could not be found.
+ """
+ NOT_FOUND
+ """
+ Viewer cannot edit this task.
+ """
+ SKIPPED_NO_PERMISSION
+}
+
+"""
+Cursor pagination for visible initiative tasks.
+"""
+input InitiativeTasksInput {
+ """
+ Page size, one through one hundred.
+ """
+ limit: Int
+ """
+ Opaque continuation from the previous page.
+ """
+ cursor: String
+}
+
+"""
+A page of visible task references.
+"""
+type InitiativeTasksPage {
+ """
+ Visible task identifiers in the current page.
+ """
+ taskIds: [ID!]!
+ """
+ Continuation when another visible page exists.
+ """
+ nextCursor: String
+ """
+ Total tasks visible to this viewer.
+ """
+ total: Int!
+}
+
"""
A scalar that can represent any JSON value.
"""
@@ -6481,6 +7060,42 @@ type SoupUpdated {
item: GraphqlSoupEntity!
}
+"""
+Permission-filtered relationship between a task and its project.
+"""
+type TaskInitiativeReference {
+ """
+ Task whose relationship is described, never this object's identity.
+ """
+ taskId: ID!
+ """
+ Permission-filtered relationship state.
+ """
+ state: TaskInitiativeReferenceState!
+ """
+ The same initiative entity used by collection/detail queries.
+ """
+ initiative: GraphqlSoupInitiative
+}
+
+"""
+Visibility state of a task's initiative.
+"""
+enum TaskInitiativeReferenceState {
+ """
+ Visible task without an initiative.
+ """
+ NONE
+ """
+ Task or initiative cannot be viewed.
+ """
+ UNAVAILABLE
+ """
+ Both task and initiative can be viewed.
+ """
+ VISIBLE
+}
+
"""
Input for adding or removing a label from an email thread.
"""
@@ -6531,6 +7146,24 @@ input UpdateEntitySharePolicyInput {
policy: EntitySharePolicyInput!
}
+"""
+Partial initiative update; collaborator lists replace the previous list.
+"""
+input UpdateInitiativeInput {
+ """
+ Replacement name.
+ """
+ name: String
+ """
+ Full replacement collaborator list, authorized by the domain service.
+ """
+ memberIds: [String!]
+ """
+ Sharing patch, authorized by the domain service.
+ """
+ sharePermission: InitiativeSharePermissionInput
+}
+
"""
Input for updating all notifications associated with any requested entity.
"""