diff --git a/generated_types.json b/generated_types.json index 26e0ae4a..c8062c14 100644 --- a/generated_types.json +++ b/generated_types.json @@ -498,6 +498,14 @@ "format": "uuid", "description": "Unique identifier for the organization" }, + "last_used_at": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Approximate time this credential was last used to authenticate. Updates are limited to once every 10 minutes and may be delayed by authorization caches. If null, no usage has been recorded." + }, "expires_at": { "type": [ "string", @@ -7328,6 +7336,39 @@ "description": "Path to the application's end-user identifier in metadata or span_attributes, for example [\"metadata\", \"customer_id\"]. This identifies an end user, not a session, request, organization, or the Braintrust user who created the project." } }, + "pattern_alert_mention": { + "type": [ + "object", + "null" + ], + "properties": { + "workspace_id": { + "type": "string", + "minLength": 1 + }, + "mention_user_id": { + "type": "string", + "pattern": "^[UW][A-Z0-9]+$", + "description": "Slack member ID of the user or agent to mention in a Pattern alert's thread to investigate the pattern." + }, + "mention_handle": { + "type": "string", + "maxLength": 80, + "description": "Username shown for the selected user or agent. Mentions use mention_user_id." + }, + "mention_prompt": { + "type": "string", + "maxLength": 2000, + "pattern": "\\{\\{pattern\\}\\}", + "description": "Message posted after the mention in a Pattern alert's thread. {{pattern}} is replaced with a link to the pattern. Defaults to \"Please investigate this pattern: {{pattern}}. Review the evidence, identify the root cause, and suggest a fix.\"" + } + }, + "required": [ + "workspace_id", + "mention_user_id" + ], + "description": "Project-wide Slack user or agent and prompt for Pattern alert threads. Applies only to destinations in the selected workspace. Unset or null disables mentions." + }, "pattern_alert_destinations": { "type": [ "array", @@ -9227,6 +9268,14 @@ "format": "uuid", "description": "Unique identifier for the organization" }, + "last_used_at": { + "type": [ + "string", + "null" + ], + "format": "date-time", + "description": "Approximate time this credential was last used to authenticate. Updates are limited to once every 10 minutes and may be delayed by authorization caches. If null, no usage has been recorded." + }, "expires_at": { "type": [ "string", diff --git a/py/src/braintrust/_generated_types.py b/py/src/braintrust/_generated_types.py index 1a22c324..66af4ecd 100644 --- a/py/src/braintrust/_generated_types.py +++ b/py/src/braintrust/_generated_types.py @@ -160,6 +160,10 @@ class ApiKey(TypedDict): """ Unique identifier for the organization """ + last_used_at: NotRequired[str | None] + """ + Approximate time this credential was last used to authenticate. Updates are limited to once every 10 minutes and may be delayed by authorization caches. If null, no usage has been recorded. + """ expires_at: NotRequired[str | None] """ Date at which the API key expires. If null, the key never expires. @@ -2186,6 +2190,22 @@ class ProjectSettingsRemoteEvalSource(TypedDict): ProjectSettingsUserIdField: TypeAlias = str +class ProjectSettingsPatternAlertMention(TypedDict): + workspace_id: str + mention_user_id: str + """ + Slack member ID of the user or agent to mention in a Pattern alert's thread to investigate the pattern. + """ + mention_handle: NotRequired[str | None] + """ + Username shown for the selected user or agent. Mentions use mention_user_id. + """ + mention_prompt: NotRequired[str | None] + """ + Message posted after the mention in a Pattern alert's thread. {{pattern}} is replaced with a link to the pattern. Defaults to "Please investigate this pattern: {{pattern}}. Review the evidence, identify the root cause, and suggest a fix." + """ + + class ProjectSettingsPatternAlertDestinations(TypedDict): type: Literal['webhook'] """ @@ -2281,6 +2301,10 @@ class ProjectSettings(TypedDict): If true, automatically complete a review after every assigned reviewer fills all human review scores visible to them. """ user_id_fields: NotRequired[Sequence[Sequence[ProjectSettingsUserIdField]] | None] + pattern_alert_mention: NotRequired[ProjectSettingsPatternAlertMention | None] + """ + Project-wide Slack user or agent and prompt for Pattern alert threads. Applies only to destinations in the selected workspace. Unset or null disables mentions. + """ pattern_alert_destinations: NotRequired[ Sequence[ ProjectSettingsPatternAlertDestinations @@ -2918,6 +2942,10 @@ class ServiceToken(TypedDict): """ Unique identifier for the organization """ + last_used_at: NotRequired[str | None] + """ + Approximate time this credential was last used to authenticate. Updates are limited to once every 10 minutes and may be delayed by authorization caches. If null, no usage has been recorded. + """ expires_at: NotRequired[str | None] """ Date and time at which the service token expires. If null, the token never expires. diff --git a/py/src/braintrust/generated_types.py b/py/src/braintrust/generated_types.py index 4b5037b3..10dad423 100644 --- a/py/src/braintrust/generated_types.py +++ b/py/src/braintrust/generated_types.py @@ -1,4 +1,4 @@ -"""Auto-generated file (content hash a21d9c9b623cbae8) -- do not modify""" +"""Auto-generated file (content hash c7c18e0d397cf334) -- do not modify""" from ._generated_types import ( Acl,