Skip to content

Commit 15efae7

Browse files
feat(api): add workspace metadata and email attribution
1 parent 786e0a4 commit 15efae7

44 files changed

Lines changed: 1215 additions & 81 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/openapi-v2-files-audit.json

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -836,12 +836,13 @@
836836
}
837837
},
838838
{
839-
"name": "actorId",
839+
"name": "actorEmail",
840840
"in": "query",
841841
"required": false,
842-
"description": "Filter by the user who performed the action. Must be a member of your organization, otherwise the request returns 400.",
842+
"description": "Filter by the email snapshot recorded for the actor who performed the action.",
843843
"schema": {
844-
"type": "string"
844+
"type": "string",
845+
"format": "email"
845846
}
846847
},
847848
{
@@ -914,7 +915,6 @@
914915
{
915916
"id": "audit_2c3d4e5f6g",
916917
"workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64",
917-
"actorId": "user_abc123",
918918
"actorName": "Jane Smith",
919919
"actorEmail": "jane@example.com",
920920
"action": "file.uploaded",
@@ -935,7 +935,7 @@
935935
}
936936
},
937937
"400": {
938-
"description": "The request was malformed: an invalid query parameter, an `actorId` that is not a member of your organization, or a `workspaceId` that does not belong to your organization.",
938+
"description": "The request was malformed: an invalid query parameter or a `workspaceId` that does not belong to your organization.",
939939
"content": {
940940
"application/json": {
941941
"schema": {
@@ -944,7 +944,7 @@
944944
"example": {
945945
"error": {
946946
"code": "BAD_REQUEST",
947-
"message": "actorId is not a member of your organization"
947+
"message": "Invalid query parameter"
948948
}
949949
}
950950
}
@@ -1026,7 +1026,6 @@
10261026
"data": {
10271027
"id": "audit_2c3d4e5f6g",
10281028
"workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64",
1029-
"actorId": "user_abc123",
10301029
"actorName": "Jane Smith",
10311030
"actorEmail": "jane@example.com",
10321031
"action": "file.uploaded",
@@ -2019,7 +2018,7 @@
20192018
"key",
20202019
"folderPath",
20212020
"folderPath",
2022-
"uploadedBy",
2021+
"uploadedByEmail",
20232022
"uploadedAt",
20242023
"updatedAt"
20252024
],
@@ -2050,10 +2049,11 @@
20502049
"description": "Storage key for the file.",
20512050
"example": "workspace/a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64/1709571234-xyz-data.csv"
20522051
},
2053-
"uploadedBy": {
2052+
"uploadedByEmail": {
20542053
"type": "string",
2055-
"description": "User ID of the uploader.",
2056-
"example": "user_abc123"
2054+
"format": "email",
2055+
"description": "Current email address of the uploader.",
2056+
"example": "jane@example.com"
20572057
},
20582058
"uploadedAt": {
20592059
"type": "string",
@@ -2097,7 +2097,6 @@
20972097
"required": [
20982098
"id",
20992099
"workspaceId",
2100-
"actorId",
21012100
"actorName",
21022101
"actorEmail",
21032102
"action",
@@ -2118,18 +2117,14 @@
21182117
"description": "The workspace where the action occurred, or null for organization-level actions.",
21192118
"example": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64"
21202119
},
2121-
"actorId": {
2122-
"type": ["string", "null"],
2123-
"description": "The user ID of the person who performed the action, or null when not attributable.",
2124-
"example": "user_abc123"
2125-
},
21262120
"actorName": {
21272121
"type": ["string", "null"],
21282122
"description": "Display name of the person who performed the action.",
21292123
"example": "Jane Smith"
21302124
},
21312125
"actorEmail": {
21322126
"type": ["string", "null"],
2127+
"format": "email",
21332128
"description": "Email address of the person who performed the action.",
21342129
"example": "jane@example.com"
21352130
},

apps/docs/openapi-v2-logs.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@
355355
"name": "Customer Support Agent",
356356
"description": "Routes incoming support tickets and drafts responses",
357357
"folderPath": "/",
358-
"userId": "usr_1a2b3c4d5e",
358+
"ownerEmail": "jane@example.com",
359359
"workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64",
360360
"createdAt": "2025-01-10T09:00:00.000Z",
361361
"updatedAt": "2025-06-18T16:45:00.000Z",
@@ -540,7 +540,7 @@
540540
"name",
541541
"description",
542542
"folderPath",
543-
"userId",
543+
"ownerEmail",
544544
"workspaceId",
545545
"createdAt",
546546
"updatedAt",
@@ -567,10 +567,11 @@
567567
"description": "Canonical containing-folder path. `/` is the workspace root.",
568568
"example": "/Engineering"
569569
},
570-
"userId": {
570+
"ownerEmail": {
571571
"type": ["string", "null"],
572-
"description": "The user that owns the workflow. null if the workflow is gone.",
573-
"example": "usr_1a2b3c4d5e"
572+
"format": "email",
573+
"description": "Current email address of the workflow owner. null if the workflow is gone.",
574+
"example": "jane@example.com"
574575
},
575576
"workspaceId": {
576577
"type": ["string", "null"],

0 commit comments

Comments
 (0)