@nvisy/sdk 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -299,61 +299,7 @@ interface paths {
299
299
  path?: never;
300
300
  cookie?: never;
301
301
  };
302
- /**
303
- * Get account avatar
304
- * @description Returns the account's avatar image (WebP). 404 when unset.
305
- */
306
- get: {
307
- parameters: {
308
- query?: never;
309
- header?: never;
310
- path: {
311
- /** @description Public handle of the account. */
312
- username: components["schemas"]["Handle"];
313
- };
314
- cookie?: never;
315
- };
316
- requestBody?: never;
317
- responses: {
318
- /** @description no content */
319
- 200: {
320
- headers: {
321
- [name: string]: unknown;
322
- };
323
- content?: never;
324
- };
325
- /**
326
- * @description HTTP error response representation with security-conscious design.
327
- *
328
- * This struct contains all the information needed to serialize an error
329
- * response, including the error name, message, HTTP status code, resource
330
- * information, and user-friendly messages.
331
- */
332
- 401: {
333
- headers: {
334
- [name: string]: unknown;
335
- };
336
- content: {
337
- "application/json": components["schemas"]["ErrorResponse"];
338
- };
339
- };
340
- /**
341
- * @description HTTP error response representation with security-conscious design.
342
- *
343
- * This struct contains all the information needed to serialize an error
344
- * response, including the error name, message, HTTP status code, resource
345
- * information, and user-friendly messages.
346
- */
347
- 404: {
348
- headers: {
349
- [name: string]: unknown;
350
- };
351
- content: {
352
- "application/json": components["schemas"]["ErrorResponse"];
353
- };
354
- };
355
- };
356
- };
302
+ get?: never;
357
303
  /**
358
304
  * Upload account avatar
359
305
  * @description Uploads and normalizes the account's avatar. Only the account itself may set it.
@@ -916,6 +862,128 @@ interface paths {
916
862
  };
917
863
  trace?: never;
918
864
  };
865
+ "/notifications/": {
866
+ parameters: {
867
+ query?: never;
868
+ header?: never;
869
+ path?: never;
870
+ cookie?: never;
871
+ };
872
+ /**
873
+ * List notifications
874
+ * @description Returns all notifications for the authenticated account and marks them as read.
875
+ */
876
+ get: {
877
+ parameters: {
878
+ query?: {
879
+ /**
880
+ * @description Cursor pointing to the last item of the previous page.
881
+ * Obtain this from the `nextCursor` field in the response.
882
+ */
883
+ after?: string;
884
+ /** @description The maximum number of records to return (1-100, default: 20). */
885
+ limit?: number;
886
+ };
887
+ header?: never;
888
+ path?: never;
889
+ cookie?: never;
890
+ };
891
+ requestBody?: never;
892
+ responses: {
893
+ /**
894
+ * @description Generic paginated response wrapper.
895
+ *
896
+ * Provides a consistent structure for all paginated API responses with
897
+ * cursor-based pagination support. When `next_cursor` is present, there
898
+ * are more items to fetch.
899
+ */
900
+ 200: {
901
+ headers: {
902
+ [name: string]: unknown;
903
+ };
904
+ content: {
905
+ "application/json": components["schemas"]["NotificationPage"];
906
+ };
907
+ };
908
+ /**
909
+ * @description HTTP error response representation with security-conscious design.
910
+ *
911
+ * This struct contains all the information needed to serialize an error
912
+ * response, including the error name, message, HTTP status code, resource
913
+ * information, and user-friendly messages.
914
+ */
915
+ 401: {
916
+ headers: {
917
+ [name: string]: unknown;
918
+ };
919
+ content: {
920
+ "application/json": components["schemas"]["ErrorResponse"];
921
+ };
922
+ };
923
+ };
924
+ };
925
+ put?: never;
926
+ post?: never;
927
+ delete?: never;
928
+ options?: never;
929
+ head?: never;
930
+ patch?: never;
931
+ trace?: never;
932
+ };
933
+ "/notifications/unread/": {
934
+ parameters: {
935
+ query?: never;
936
+ header?: never;
937
+ path?: never;
938
+ cookie?: never;
939
+ };
940
+ /**
941
+ * Get unread notifications count
942
+ * @description Returns the number of unread notifications for the authenticated account.
943
+ */
944
+ get: {
945
+ parameters: {
946
+ query?: never;
947
+ header?: never;
948
+ path?: never;
949
+ cookie?: never;
950
+ };
951
+ requestBody?: never;
952
+ responses: {
953
+ /** @description Response type for unread notifications status. */
954
+ 200: {
955
+ headers: {
956
+ [name: string]: unknown;
957
+ };
958
+ content: {
959
+ "application/json": components["schemas"]["UnreadStatus"];
960
+ };
961
+ };
962
+ /**
963
+ * @description HTTP error response representation with security-conscious design.
964
+ *
965
+ * This struct contains all the information needed to serialize an error
966
+ * response, including the error name, message, HTTP status code, resource
967
+ * information, and user-friendly messages.
968
+ */
969
+ 401: {
970
+ headers: {
971
+ [name: string]: unknown;
972
+ };
973
+ content: {
974
+ "application/json": components["schemas"]["ErrorResponse"];
975
+ };
976
+ };
977
+ };
978
+ };
979
+ put?: never;
980
+ post?: never;
981
+ delete?: never;
982
+ options?: never;
983
+ head?: never;
984
+ patch?: never;
985
+ trace?: never;
986
+ };
919
987
  "/workspaces/": {
920
988
  parameters: {
921
989
  query?: never;
@@ -1327,76 +1395,7 @@ interface paths {
1327
1395
  path?: never;
1328
1396
  cookie?: never;
1329
1397
  };
1330
- /**
1331
- * Get workspace avatar
1332
- * @description Returns the workspace's avatar image (WebP). 404 when unset.
1333
- */
1334
- get: {
1335
- parameters: {
1336
- query?: never;
1337
- header?: never;
1338
- path: {
1339
- /** @description URL-safe workspace identifier. */
1340
- workspaceSlug: string;
1341
- };
1342
- cookie?: never;
1343
- };
1344
- requestBody?: never;
1345
- responses: {
1346
- /** @description no content */
1347
- 200: {
1348
- headers: {
1349
- [name: string]: unknown;
1350
- };
1351
- content?: never;
1352
- };
1353
- /**
1354
- * @description HTTP error response representation with security-conscious design.
1355
- *
1356
- * This struct contains all the information needed to serialize an error
1357
- * response, including the error name, message, HTTP status code, resource
1358
- * information, and user-friendly messages.
1359
- */
1360
- 401: {
1361
- headers: {
1362
- [name: string]: unknown;
1363
- };
1364
- content: {
1365
- "application/json": components["schemas"]["ErrorResponse"];
1366
- };
1367
- };
1368
- /**
1369
- * @description HTTP error response representation with security-conscious design.
1370
- *
1371
- * This struct contains all the information needed to serialize an error
1372
- * response, including the error name, message, HTTP status code, resource
1373
- * information, and user-friendly messages.
1374
- */
1375
- 403: {
1376
- headers: {
1377
- [name: string]: unknown;
1378
- };
1379
- content: {
1380
- "application/json": components["schemas"]["ErrorResponse"];
1381
- };
1382
- };
1383
- /**
1384
- * @description HTTP error response representation with security-conscious design.
1385
- *
1386
- * This struct contains all the information needed to serialize an error
1387
- * response, including the error name, message, HTTP status code, resource
1388
- * information, and user-friendly messages.
1389
- */
1390
- 404: {
1391
- headers: {
1392
- [name: string]: unknown;
1393
- };
1394
- content: {
1395
- "application/json": components["schemas"]["ErrorResponse"];
1396
- };
1397
- };
1398
- };
1399
- };
1398
+ get?: never;
1400
1399
  /**
1401
1400
  * Upload workspace avatar
1402
1401
  * @description Uploads and normalizes the workspace's avatar. Requires UpdateWorkspace.
@@ -1815,7 +1814,7 @@ interface paths {
1815
1814
  patch?: never;
1816
1815
  trace?: never;
1817
1816
  };
1818
- "/workspaces/{workspaceSlug}/connections/": {
1817
+ "/workspaces/{workspaceSlug}/members/": {
1819
1818
  parameters: {
1820
1819
  query?: never;
1821
1820
  header?: never;
@@ -1823,24 +1822,27 @@ interface paths {
1823
1822
  cookie?: never;
1824
1823
  };
1825
1824
  /**
1826
- * List connections
1827
- * @description Returns all configured connections for the workspace. Only metadata is returned; encrypted credentials are never exposed.
1825
+ * List members
1826
+ * @description Returns a paginated list of workspace members with their roles and status.
1828
1827
  */
1829
1828
  get: {
1830
1829
  parameters: {
1831
1830
  query?: {
1831
+ /** @description Filter by 2FA status. */
1832
+ has2fa?: boolean;
1833
+ /** @description Sort order (asc or desc). */
1834
+ order?: components["schemas"]["SortOrder"];
1835
+ /** @description Filter by workspace role. */
1836
+ role?: components["schemas"]["WorkspaceRole"];
1837
+ /** @description Sort by field. */
1838
+ sortBy?: components["schemas"]["MemberSortField"];
1832
1839
  /**
1833
- * @description Cursor pointing to the last item of the previous page.
1834
- * Obtain this from the `nextCursor` field in the response.
1835
- */
1836
- after?: string;
1837
- /** @description The maximum number of records to return (1-100, default: 20). */
1838
- limit?: number;
1839
- /**
1840
- * @description Filter by provider (`s3`, `azure`, `gcs`). Repeatable; a connection
1841
- * matches if it uses any of the given providers. Empty means no filter.
1840
+ * @description Cursor pointing to the last item of the previous page.
1841
+ * Obtain this from the `nextCursor` field in the response.
1842
1842
  */
1843
- provider?: string[];
1843
+ after?: string;
1844
+ /** @description The maximum number of records to return (1-100, default: 20). */
1845
+ limit?: number;
1844
1846
  };
1845
1847
  header?: never;
1846
1848
  path: {
@@ -1863,7 +1865,7 @@ interface paths {
1863
1865
  [name: string]: unknown;
1864
1866
  };
1865
1867
  content: {
1866
- "application/json": components["schemas"]["ConnectionPage"];
1868
+ "application/json": components["schemas"]["MemberPage"];
1867
1869
  };
1868
1870
  };
1869
1871
  /**
@@ -1896,12 +1898,43 @@ interface paths {
1896
1898
  "application/json": components["schemas"]["ErrorResponse"];
1897
1899
  };
1898
1900
  };
1901
+ /**
1902
+ * @description HTTP error response representation with security-conscious design.
1903
+ *
1904
+ * This struct contains all the information needed to serialize an error
1905
+ * response, including the error name, message, HTTP status code, resource
1906
+ * information, and user-friendly messages.
1907
+ */
1908
+ 404: {
1909
+ headers: {
1910
+ [name: string]: unknown;
1911
+ };
1912
+ content: {
1913
+ "application/json": components["schemas"]["ErrorResponse"];
1914
+ };
1915
+ };
1899
1916
  };
1900
1917
  };
1901
1918
  put?: never;
1919
+ post?: never;
1920
+ delete?: never;
1921
+ options?: never;
1922
+ head?: never;
1923
+ patch?: never;
1924
+ trace?: never;
1925
+ };
1926
+ "/workspaces/{workspaceSlug}/members/leave/": {
1927
+ parameters: {
1928
+ query?: never;
1929
+ header?: never;
1930
+ path?: never;
1931
+ cookie?: never;
1932
+ };
1933
+ get?: never;
1934
+ put?: never;
1902
1935
  /**
1903
- * Create connection
1904
- * @description Creates a new provider connection for the workspace. Connection data is encrypted and stored securely. The response includes connection metadata but never exposes the encrypted credentials.
1936
+ * Leave workspace
1937
+ * @description Allows a member to voluntarily leave a workspace.
1905
1938
  */
1906
1939
  post: {
1907
1940
  parameters: {
@@ -1913,26 +1946,14 @@ interface paths {
1913
1946
  };
1914
1947
  cookie?: never;
1915
1948
  };
1916
- /** @description Request payload for creating a new workspace connection. */
1917
- requestBody: {
1918
- content: {
1919
- "application/json": components["schemas"]["CreateConnection"];
1920
- };
1921
- };
1949
+ requestBody?: never;
1922
1950
  responses: {
1923
- /**
1924
- * @description Response type for a workspace connection.
1925
- *
1926
- * Note: The encrypted connection data is never exposed in API responses.
1927
- * Only metadata about the connection is returned.
1928
- */
1929
- 201: {
1951
+ /** @description no content */
1952
+ 200: {
1930
1953
  headers: {
1931
1954
  [name: string]: unknown;
1932
1955
  };
1933
- content: {
1934
- "application/json": components["schemas"]["Connection"];
1935
- };
1956
+ content?: never;
1936
1957
  };
1937
1958
  /**
1938
1959
  * @description HTTP error response representation with security-conscious design.
@@ -1971,7 +1992,7 @@ interface paths {
1971
1992
  * response, including the error name, message, HTTP status code, resource
1972
1993
  * information, and user-friendly messages.
1973
1994
  */
1974
- 403: {
1995
+ 404: {
1975
1996
  headers: {
1976
1997
  [name: string]: unknown;
1977
1998
  };
@@ -1979,24 +2000,6 @@ interface paths {
1979
2000
  "application/json": components["schemas"]["ErrorResponse"];
1980
2001
  };
1981
2002
  };
1982
- /** @description Expected request with `Content-Type: application/json` */
1983
- 415: {
1984
- headers: {
1985
- [name: string]: unknown;
1986
- };
1987
- content: {
1988
- "text/plain": string;
1989
- };
1990
- };
1991
- /** @description Failed to deserialize the JSON body into the target type */
1992
- 422: {
1993
- headers: {
1994
- [name: string]: unknown;
1995
- };
1996
- content: {
1997
- "text/plain": string;
1998
- };
1999
- };
2000
2003
  };
2001
2004
  };
2002
2005
  delete?: never;
@@ -2005,7 +2008,7 @@ interface paths {
2005
2008
  patch?: never;
2006
2009
  trace?: never;
2007
2010
  };
2008
- "/workspaces/{workspaceSlug}/connections/{connectionId}/": {
2011
+ "/workspaces/{workspaceSlug}/members/{username}/": {
2009
2012
  parameters: {
2010
2013
  query?: never;
2011
2014
  header?: never;
@@ -2013,8 +2016,8 @@ interface paths {
2013
2016
  cookie?: never;
2014
2017
  };
2015
2018
  /**
2016
- * Get connection
2017
- * @description Returns connection metadata without encrypted credentials.
2019
+ * Get member
2020
+ * @description Returns detailed information about a specific workspace member.
2018
2021
  */
2019
2022
  get: {
2020
2023
  parameters: {
@@ -2023,25 +2026,20 @@ interface paths {
2023
2026
  path: {
2024
2027
  /** @description URL-safe workspace identifier. */
2025
2028
  workspaceSlug: string;
2026
- /** @description Opaque identifier of the connection. */
2027
- connectionId: components["schemas"]["ConnectionId"];
2029
+ /** @description Public handle of the member's account. */
2030
+ username: components["schemas"]["Handle"];
2028
2031
  };
2029
2032
  cookie?: never;
2030
2033
  };
2031
2034
  requestBody?: never;
2032
2035
  responses: {
2033
- /**
2034
- * @description Response type for a workspace connection.
2035
- *
2036
- * Note: The encrypted connection data is never exposed in API responses.
2037
- * Only metadata about the connection is returned.
2038
- */
2036
+ /** @description Represents a workspace member. */
2039
2037
  200: {
2040
2038
  headers: {
2041
2039
  [name: string]: unknown;
2042
2040
  };
2043
2041
  content: {
2044
- "application/json": components["schemas"]["Connection"];
2042
+ "application/json": components["schemas"]["Member"];
2045
2043
  };
2046
2044
  };
2047
2045
  /**
@@ -2094,8 +2092,8 @@ interface paths {
2094
2092
  put?: never;
2095
2093
  post?: never;
2096
2094
  /**
2097
- * Delete connection
2098
- * @description Soft-deletes the connection from the workspace.
2095
+ * Remove member
2096
+ * @description Permanently removes a member from the workspace. Cannot remove owners or yourself.
2099
2097
  */
2100
2098
  delete: {
2101
2099
  parameters: {
@@ -2104,20 +2102,35 @@ interface paths {
2104
2102
  path: {
2105
2103
  /** @description URL-safe workspace identifier. */
2106
2104
  workspaceSlug: string;
2107
- /** @description Opaque identifier of the connection. */
2108
- connectionId: components["schemas"]["ConnectionId"];
2105
+ /** @description Public handle of the member's account. */
2106
+ username: components["schemas"]["Handle"];
2109
2107
  };
2110
2108
  cookie?: never;
2111
2109
  };
2112
2110
  requestBody?: never;
2113
2111
  responses: {
2114
2112
  /** @description no content */
2115
- 204: {
2113
+ 200: {
2116
2114
  headers: {
2117
2115
  [name: string]: unknown;
2118
2116
  };
2119
2117
  content?: never;
2120
2118
  };
2119
+ /**
2120
+ * @description HTTP error response representation with security-conscious design.
2121
+ *
2122
+ * This struct contains all the information needed to serialize an error
2123
+ * response, including the error name, message, HTTP status code, resource
2124
+ * information, and user-friendly messages.
2125
+ */
2126
+ 400: {
2127
+ headers: {
2128
+ [name: string]: unknown;
2129
+ };
2130
+ content: {
2131
+ "application/json": components["schemas"]["ErrorResponse"];
2132
+ };
2133
+ };
2121
2134
  /**
2122
2135
  * @description HTTP error response representation with security-conscious design.
2123
2136
  *
@@ -2168,8 +2181,8 @@ interface paths {
2168
2181
  options?: never;
2169
2182
  head?: never;
2170
2183
  /**
2171
- * Update connection
2172
- * @description Updates connection name or encrypted data.
2184
+ * Update member role
2185
+ * @description Updates a workspace member's role. Cannot update your own role or demote owners.
2173
2186
  */
2174
2187
  patch: {
2175
2188
  parameters: {
@@ -2178,30 +2191,25 @@ interface paths {
2178
2191
  path: {
2179
2192
  /** @description URL-safe workspace identifier. */
2180
2193
  workspaceSlug: string;
2181
- /** @description Opaque identifier of the connection. */
2182
- connectionId: components["schemas"]["ConnectionId"];
2194
+ /** @description Public handle of the member's account. */
2195
+ username: components["schemas"]["Handle"];
2183
2196
  };
2184
2197
  cookie?: never;
2185
2198
  };
2186
- /** @description Request payload for updating an existing workspace connection. */
2199
+ /** @description Request to update a member's role. */
2187
2200
  requestBody: {
2188
2201
  content: {
2189
- "application/json": components["schemas"]["UpdateConnection"];
2202
+ "application/json": components["schemas"]["UpdateMember"];
2190
2203
  };
2191
2204
  };
2192
2205
  responses: {
2193
- /**
2194
- * @description Response type for a workspace connection.
2195
- *
2196
- * Note: The encrypted connection data is never exposed in API responses.
2197
- * Only metadata about the connection is returned.
2198
- */
2206
+ /** @description Represents a workspace member. */
2199
2207
  200: {
2200
2208
  headers: {
2201
2209
  [name: string]: unknown;
2202
2210
  };
2203
2211
  content: {
2204
- "application/json": components["schemas"]["Connection"];
2212
+ "application/json": components["schemas"]["Member"];
2205
2213
  };
2206
2214
  };
2207
2215
  /**
@@ -2286,40 +2294,56 @@ interface paths {
2286
2294
  };
2287
2295
  trace?: never;
2288
2296
  };
2289
- "/workspaces/{workspaceSlug}/connections/{connectionId}/verify/": {
2297
+ "/workspaces/{workspaceSlug}/invites/": {
2290
2298
  parameters: {
2291
2299
  query?: never;
2292
2300
  header?: never;
2293
2301
  path?: never;
2294
2302
  cookie?: never;
2295
2303
  };
2296
- get?: never;
2297
- put?: never;
2298
2304
  /**
2299
- * Verify connection
2300
- * @description Checks whether the connection's backing store is reachable with its stored credentials.
2305
+ * List invitations
2306
+ * @description Returns a paginated list of workspace invitations with their current status.
2301
2307
  */
2302
- post: {
2308
+ get: {
2303
2309
  parameters: {
2304
- query?: never;
2310
+ query?: {
2311
+ /** @description Sort order (asc or desc). */
2312
+ order?: components["schemas"]["SortOrder"];
2313
+ /** @description Filter by invited role. */
2314
+ role?: components["schemas"]["WorkspaceRole"];
2315
+ /** @description Sort by field. */
2316
+ sortBy?: components["schemas"]["InviteSortField"];
2317
+ /**
2318
+ * @description Cursor pointing to the last item of the previous page.
2319
+ * Obtain this from the `nextCursor` field in the response.
2320
+ */
2321
+ after?: string;
2322
+ /** @description The maximum number of records to return (1-100, default: 20). */
2323
+ limit?: number;
2324
+ };
2305
2325
  header?: never;
2306
2326
  path: {
2307
2327
  /** @description URL-safe workspace identifier. */
2308
2328
  workspaceSlug: string;
2309
- /** @description Opaque identifier of the connection. */
2310
- connectionId: components["schemas"]["ConnectionId"];
2311
2329
  };
2312
2330
  cookie?: never;
2313
2331
  };
2314
2332
  requestBody?: never;
2315
2333
  responses: {
2316
- /** @description Result of a connection reachability check. */
2334
+ /**
2335
+ * @description Generic paginated response wrapper.
2336
+ *
2337
+ * Provides a consistent structure for all paginated API responses with
2338
+ * cursor-based pagination support. When `next_cursor` is present, there
2339
+ * are more items to fetch.
2340
+ */
2317
2341
  200: {
2318
2342
  headers: {
2319
2343
  [name: string]: unknown;
2320
2344
  };
2321
2345
  content: {
2322
- "application/json": components["schemas"]["ConnectionVerification"];
2346
+ "application/json": components["schemas"]["InvitePage"];
2323
2347
  };
2324
2348
  };
2325
2349
  /**
@@ -2352,6 +2376,45 @@ interface paths {
2352
2376
  "application/json": components["schemas"]["ErrorResponse"];
2353
2377
  };
2354
2378
  };
2379
+ };
2380
+ };
2381
+ put?: never;
2382
+ /**
2383
+ * Send invitation
2384
+ * @description Invites an existing platform user to the workspace and delivers an in-app notification. No email is sent by this server. The response is identical whether or not the address belongs to a known account, so it cannot be used to determine whether an account exists.
2385
+ */
2386
+ post: {
2387
+ parameters: {
2388
+ query?: never;
2389
+ header?: never;
2390
+ path: {
2391
+ /** @description URL-safe workspace identifier. */
2392
+ workspaceSlug: string;
2393
+ };
2394
+ cookie?: never;
2395
+ };
2396
+ /** @description Request payload for creating a new workspace invite. */
2397
+ requestBody: {
2398
+ content: {
2399
+ "application/json": components["schemas"]["CreateInvite"];
2400
+ };
2401
+ };
2402
+ responses: {
2403
+ /**
2404
+ * @description Acknowledgement returned after sending a workspace invitation.
2405
+ *
2406
+ * The response is deliberately uniform: it carries no invite identifier or
2407
+ * status, so it is identical whether or not the address belonged to a known
2408
+ * account and cannot be used to probe for account existence.
2409
+ */
2410
+ 200: {
2411
+ headers: {
2412
+ [name: string]: unknown;
2413
+ };
2414
+ content: {
2415
+ "application/json": components["schemas"]["InviteSent"];
2416
+ };
2417
+ };
2355
2418
  /**
2356
2419
  * @description HTTP error response representation with security-conscious design.
2357
2420
  *
@@ -2359,7 +2422,7 @@ interface paths {
2359
2422
  * response, including the error name, message, HTTP status code, resource
2360
2423
  * information, and user-friendly messages.
2361
2424
  */
2362
- 404: {
2425
+ 400: {
2363
2426
  headers: {
2364
2427
  [name: string]: unknown;
2365
2428
  };
@@ -2367,68 +2430,6 @@ interface paths {
2367
2430
  "application/json": components["schemas"]["ErrorResponse"];
2368
2431
  };
2369
2432
  };
2370
- };
2371
- };
2372
- delete?: never;
2373
- options?: never;
2374
- head?: never;
2375
- patch?: never;
2376
- trace?: never;
2377
- };
2378
- "/workspaces/{workspaceSlug}/syncs/": {
2379
- parameters: {
2380
- query?: never;
2381
- header?: never;
2382
- path?: never;
2383
- cookie?: never;
2384
- };
2385
- /**
2386
- * List workspace syncs
2387
- * @description Returns all sync runs across the workspace's connections, most recent first, with optional status and provider filters.
2388
- */
2389
- get: {
2390
- parameters: {
2391
- query?: {
2392
- /**
2393
- * @description Cursor pointing to the last item of the previous page.
2394
- * Obtain this from the `nextCursor` field in the response.
2395
- */
2396
- after?: string;
2397
- /** @description The maximum number of records to return (1-100, default: 20). */
2398
- limit?: number;
2399
- /**
2400
- * @description Filter by connection provider (`s3`, `azure`, `gcs`). Repeatable; a sync
2401
- * matches if its connection uses any of the given providers. Empty means no
2402
- * provider filter.
2403
- */
2404
- provider?: string[];
2405
- /** @description Filter by sync status. */
2406
- status?: components["schemas"]["SyncStatus"];
2407
- };
2408
- header?: never;
2409
- path: {
2410
- /** @description URL-safe workspace identifier. */
2411
- workspaceSlug: string;
2412
- };
2413
- cookie?: never;
2414
- };
2415
- requestBody?: never;
2416
- responses: {
2417
- /**
2418
- * @description Generic paginated response wrapper.
2419
- *
2420
- * Provides a consistent structure for all paginated API responses with
2421
- * cursor-based pagination support. When `next_cursor` is present, there
2422
- * are more items to fetch.
2423
- */
2424
- 200: {
2425
- headers: {
2426
- [name: string]: unknown;
2427
- };
2428
- content: {
2429
- "application/json": components["schemas"]["ConnectionSyncPage"];
2430
- };
2431
- };
2432
2433
  /**
2433
2434
  * @description HTTP error response representation with security-conscious design.
2434
2435
  *
@@ -2466,7 +2467,7 @@ interface paths {
2466
2467
  * response, including the error name, message, HTTP status code, resource
2467
2468
  * information, and user-friendly messages.
2468
2469
  */
2469
- 404: {
2470
+ 409: {
2470
2471
  headers: {
2471
2472
  [name: string]: unknown;
2472
2473
  };
@@ -2474,17 +2475,33 @@ interface paths {
2474
2475
  "application/json": components["schemas"]["ErrorResponse"];
2475
2476
  };
2476
2477
  };
2478
+ /** @description Expected request with `Content-Type: application/json` */
2479
+ 415: {
2480
+ headers: {
2481
+ [name: string]: unknown;
2482
+ };
2483
+ content: {
2484
+ "text/plain": string;
2485
+ };
2486
+ };
2487
+ /** @description Failed to deserialize the JSON body into the target type */
2488
+ 422: {
2489
+ headers: {
2490
+ [name: string]: unknown;
2491
+ };
2492
+ content: {
2493
+ "text/plain": string;
2494
+ };
2495
+ };
2477
2496
  };
2478
2497
  };
2479
- put?: never;
2480
- post?: never;
2481
2498
  delete?: never;
2482
2499
  options?: never;
2483
2500
  head?: never;
2484
2501
  patch?: never;
2485
2502
  trace?: never;
2486
2503
  };
2487
- "/workspaces/{workspaceSlug}/connections/{connectionId}/sync/": {
2504
+ "/workspaces/{workspaceSlug}/invites/code/": {
2488
2505
  parameters: {
2489
2506
  query?: never;
2490
2507
  header?: never;
@@ -2494,8 +2511,8 @@ interface paths {
2494
2511
  get?: never;
2495
2512
  put?: never;
2496
2513
  /**
2497
- * Sync connection
2498
- * @description Imports an object from or exports a file to the connection. Returns the created sync; poll it for completion.
2514
+ * Generate invite code
2515
+ * @description Creates a shareable invite code that can be used by anyone to join the workspace.
2499
2516
  */
2500
2517
  post: {
2501
2518
  parameters: {
@@ -2504,33 +2521,23 @@ interface paths {
2504
2521
  path: {
2505
2522
  /** @description URL-safe workspace identifier. */
2506
2523
  workspaceSlug: string;
2507
- /** @description Opaque identifier of the connection. */
2508
- connectionId: components["schemas"]["ConnectionId"];
2509
2524
  };
2510
2525
  cookie?: never;
2511
2526
  };
2512
- /**
2513
- * @description Request payload to trigger a connection sync.
2514
- *
2515
- * The direction is determined by the connection's configured `sync_mode`.
2516
- * - Import connections need no body: the sync fetches every not-yet-imported
2517
- * object under the connection's root path.
2518
- * - Export connections push one workspace file (`file_id`) to one object
2519
- * `key`; both are required for export and ignored for import.
2520
- */
2527
+ /** @description Request to generate a shareable invite code for a workspace. */
2521
2528
  requestBody: {
2522
2529
  content: {
2523
- "application/json": components["schemas"]["SyncConnection"];
2530
+ "application/json": components["schemas"]["GenerateInviteCode"];
2524
2531
  };
2525
2532
  };
2526
2533
  responses: {
2527
- /** @description A connection sync run (import or export). */
2528
- 202: {
2534
+ /** @description Response containing a generated shareable invite code. */
2535
+ 201: {
2529
2536
  headers: {
2530
2537
  [name: string]: unknown;
2531
2538
  };
2532
2539
  content: {
2533
- "application/json": components["schemas"]["ConnectionSync"];
2540
+ "application/json": components["schemas"]["InviteCode"];
2534
2541
  };
2535
2542
  };
2536
2543
  /**
@@ -2578,21 +2585,6 @@ interface paths {
2578
2585
  "application/json": components["schemas"]["ErrorResponse"];
2579
2586
  };
2580
2587
  };
2581
- /**
2582
- * @description HTTP error response representation with security-conscious design.
2583
- *
2584
- * This struct contains all the information needed to serialize an error
2585
- * response, including the error name, message, HTTP status code, resource
2586
- * information, and user-friendly messages.
2587
- */
2588
- 404: {
2589
- headers: {
2590
- [name: string]: unknown;
2591
- };
2592
- content: {
2593
- "application/json": components["schemas"]["ErrorResponse"];
2594
- };
2595
- };
2596
2588
  /** @description Expected request with `Content-Type: application/json` */
2597
2589
  415: {
2598
2590
  headers: {
@@ -2619,52 +2611,53 @@ interface paths {
2619
2611
  patch?: never;
2620
2612
  trace?: never;
2621
2613
  };
2622
- "/workspaces/{workspaceSlug}/connections/{connectionId}/syncs/": {
2614
+ "/workspaces/{workspaceSlug}/invites/{inviteId}/": {
2623
2615
  parameters: {
2624
2616
  query?: never;
2625
2617
  header?: never;
2626
2618
  path?: never;
2627
2619
  cookie?: never;
2628
2620
  };
2621
+ get?: never;
2622
+ put?: never;
2629
2623
  /**
2630
- * List connection syncs
2631
- * @description Returns the connection's sync history, most recent first.
2624
+ * Reply to invitation
2625
+ * @description Accepts or declines a workspace invitation. On accept the user becomes a member and the new membership is returned; on decline no membership is created.
2632
2626
  */
2633
- get: {
2627
+ post: {
2634
2628
  parameters: {
2635
- query?: {
2636
- /**
2637
- * @description Cursor pointing to the last item of the previous page.
2638
- * Obtain this from the `nextCursor` field in the response.
2639
- */
2640
- after?: string;
2641
- /** @description The maximum number of records to return (1-100, default: 20). */
2642
- limit?: number;
2643
- };
2629
+ query?: never;
2644
2630
  header?: never;
2645
2631
  path: {
2646
2632
  /** @description URL-safe workspace identifier. */
2647
2633
  workspaceSlug: string;
2648
- /** @description Opaque identifier of the connection. */
2649
- connectionId: components["schemas"]["ConnectionId"];
2634
+ /** @description Unique identifier of the invite. */
2635
+ inviteId: string;
2650
2636
  };
2651
2637
  cookie?: never;
2652
2638
  };
2653
- requestBody?: never;
2639
+ /** @description Request to respond to a workspace invitation. */
2640
+ requestBody: {
2641
+ content: {
2642
+ "application/json": components["schemas"]["ReplyInvite"];
2643
+ };
2644
+ };
2654
2645
  responses: {
2655
- /**
2656
- * @description Generic paginated response wrapper.
2657
- *
2658
- * Provides a consistent structure for all paginated API responses with
2659
- * cursor-based pagination support. When `next_cursor` is present, there
2660
- * are more items to fetch.
2661
- */
2662
2646
  200: {
2663
2647
  headers: {
2664
2648
  [name: string]: unknown;
2665
2649
  };
2666
2650
  content: {
2667
- "application/json": components["schemas"]["ConnectionSyncPage"];
2651
+ "application/json": components["schemas"]["Member"] | null;
2652
+ };
2653
+ };
2654
+ /** @description Represents a workspace member. */
2655
+ 201: {
2656
+ headers: {
2657
+ [name: string]: unknown;
2658
+ };
2659
+ content: {
2660
+ "application/json": components["schemas"]["Member"];
2668
2661
  };
2669
2662
  };
2670
2663
  /**
@@ -2674,7 +2667,7 @@ interface paths {
2674
2667
  * response, including the error name, message, HTTP status code, resource
2675
2668
  * information, and user-friendly messages.
2676
2669
  */
2677
- 401: {
2670
+ 400: {
2678
2671
  headers: {
2679
2672
  [name: string]: unknown;
2680
2673
  };
@@ -2689,7 +2682,7 @@ interface paths {
2689
2682
  * response, including the error name, message, HTTP status code, resource
2690
2683
  * information, and user-friendly messages.
2691
2684
  */
2692
- 403: {
2685
+ 401: {
2693
2686
  headers: {
2694
2687
  [name: string]: unknown;
2695
2688
  };
@@ -2712,52 +2705,6 @@ interface paths {
2712
2705
  "application/json": components["schemas"]["ErrorResponse"];
2713
2706
  };
2714
2707
  };
2715
- };
2716
- };
2717
- put?: never;
2718
- post?: never;
2719
- delete?: never;
2720
- options?: never;
2721
- head?: never;
2722
- patch?: never;
2723
- trace?: never;
2724
- };
2725
- "/workspaces/{workspaceSlug}/connections/{connectionId}/syncs/{syncId}/": {
2726
- parameters: {
2727
- query?: never;
2728
- header?: never;
2729
- path?: never;
2730
- cookie?: never;
2731
- };
2732
- /**
2733
- * Get connection sync
2734
- * @description Returns a single sync run for the connection.
2735
- */
2736
- get: {
2737
- parameters: {
2738
- query?: never;
2739
- header?: never;
2740
- path: {
2741
- /** @description URL-safe workspace identifier. */
2742
- workspaceSlug: string;
2743
- /** @description Opaque identifier of the connection. */
2744
- connectionId: components["schemas"]["ConnectionId"];
2745
- /** @description Unique identifier of the sync run. */
2746
- syncId: string;
2747
- };
2748
- cookie?: never;
2749
- };
2750
- requestBody?: never;
2751
- responses: {
2752
- /** @description A connection sync run (import or export). */
2753
- 200: {
2754
- headers: {
2755
- [name: string]: unknown;
2756
- };
2757
- content: {
2758
- "application/json": components["schemas"]["ConnectionSync"];
2759
- };
2760
- };
2761
2708
  /**
2762
2709
  * @description HTTP error response representation with security-conscious design.
2763
2710
  *
@@ -2765,7 +2712,7 @@ interface paths {
2765
2712
  * response, including the error name, message, HTTP status code, resource
2766
2713
  * information, and user-friendly messages.
2767
2714
  */
2768
- 401: {
2715
+ 409: {
2769
2716
  headers: {
2770
2717
  [name: string]: unknown;
2771
2718
  };
@@ -2773,83 +2720,50 @@ interface paths {
2773
2720
  "application/json": components["schemas"]["ErrorResponse"];
2774
2721
  };
2775
2722
  };
2776
- /**
2777
- * @description HTTP error response representation with security-conscious design.
2778
- *
2779
- * This struct contains all the information needed to serialize an error
2780
- * response, including the error name, message, HTTP status code, resource
2781
- * information, and user-friendly messages.
2782
- */
2783
- 403: {
2723
+ /** @description Expected request with `Content-Type: application/json` */
2724
+ 415: {
2784
2725
  headers: {
2785
2726
  [name: string]: unknown;
2786
2727
  };
2787
2728
  content: {
2788
- "application/json": components["schemas"]["ErrorResponse"];
2729
+ "text/plain": string;
2789
2730
  };
2790
2731
  };
2791
- /**
2792
- * @description HTTP error response representation with security-conscious design.
2793
- *
2794
- * This struct contains all the information needed to serialize an error
2795
- * response, including the error name, message, HTTP status code, resource
2796
- * information, and user-friendly messages.
2797
- */
2798
- 404: {
2732
+ /** @description Failed to deserialize the JSON body into the target type */
2733
+ 422: {
2799
2734
  headers: {
2800
2735
  [name: string]: unknown;
2801
2736
  };
2802
2737
  content: {
2803
- "application/json": components["schemas"]["ErrorResponse"];
2738
+ "text/plain": string;
2804
2739
  };
2805
2740
  };
2806
2741
  };
2807
2742
  };
2808
- put?: never;
2809
- post?: never;
2810
- delete?: never;
2811
- options?: never;
2812
- head?: never;
2813
- patch?: never;
2814
- trace?: never;
2815
- };
2816
- "/workspaces/{workspaceSlug}/connections/{connectionId}/syncs/{syncId}/cancel/": {
2817
- parameters: {
2818
- query?: never;
2819
- header?: never;
2820
- path?: never;
2821
- cookie?: never;
2822
- };
2823
- get?: never;
2824
- put?: never;
2825
2743
  /**
2826
- * Cancel connection sync
2827
- * @description Cancels an in-progress sync run. A run that already finished returns 409.
2744
+ * Cancel invitation
2745
+ * @description Permanently cancels a pending invitation. The invitee will no longer be able to accept it.
2828
2746
  */
2829
- post: {
2747
+ delete: {
2830
2748
  parameters: {
2831
2749
  query?: never;
2832
2750
  header?: never;
2833
2751
  path: {
2834
2752
  /** @description URL-safe workspace identifier. */
2835
2753
  workspaceSlug: string;
2836
- /** @description Opaque identifier of the connection. */
2837
- connectionId: components["schemas"]["ConnectionId"];
2838
- /** @description Unique identifier of the sync run. */
2839
- syncId: string;
2754
+ /** @description Unique identifier of the invite. */
2755
+ inviteId: string;
2840
2756
  };
2841
2757
  cookie?: never;
2842
2758
  };
2843
2759
  requestBody?: never;
2844
2760
  responses: {
2845
- /** @description A connection sync run (import or export). */
2761
+ /** @description no content */
2846
2762
  200: {
2847
2763
  headers: {
2848
2764
  [name: string]: unknown;
2849
2765
  };
2850
- content: {
2851
- "application/json": components["schemas"]["ConnectionSync"];
2852
- };
2766
+ content?: never;
2853
2767
  };
2854
2768
  /**
2855
2769
  * @description HTTP error response representation with security-conscious design.
@@ -2896,30 +2810,14 @@ interface paths {
2896
2810
  "application/json": components["schemas"]["ErrorResponse"];
2897
2811
  };
2898
2812
  };
2899
- /**
2900
- * @description HTTP error response representation with security-conscious design.
2901
- *
2902
- * This struct contains all the information needed to serialize an error
2903
- * response, including the error name, message, HTTP status code, resource
2904
- * information, and user-friendly messages.
2905
- */
2906
- 409: {
2907
- headers: {
2908
- [name: string]: unknown;
2909
- };
2910
- content: {
2911
- "application/json": components["schemas"]["ErrorResponse"];
2912
- };
2913
- };
2914
2813
  };
2915
2814
  };
2916
- delete?: never;
2917
2815
  options?: never;
2918
2816
  head?: never;
2919
2817
  patch?: never;
2920
2818
  trace?: never;
2921
2819
  };
2922
- "/workspaces/{workspaceSlug}/invites/": {
2820
+ "/invites/code/{inviteCode}/": {
2923
2821
  parameters: {
2924
2822
  query?: never;
2925
2823
  header?: never;
@@ -2927,48 +2825,33 @@ interface paths {
2927
2825
  cookie?: never;
2928
2826
  };
2929
2827
  /**
2930
- * List invitations
2931
- * @description Returns a paginated list of workspace invitations with their current status.
2932
- */
2933
- get: {
2934
- parameters: {
2935
- query?: {
2936
- /** @description Sort order (asc or desc). */
2937
- order?: components["schemas"]["SortOrder"];
2938
- /** @description Filter by invited role. */
2939
- role?: components["schemas"]["WorkspaceRole"];
2940
- /** @description Sort by field. */
2941
- sortBy?: components["schemas"]["InviteSortField"];
2942
- /**
2943
- * @description Cursor pointing to the last item of the previous page.
2944
- * Obtain this from the `nextCursor` field in the response.
2945
- */
2946
- after?: string;
2947
- /** @description The maximum number of records to return (1-100, default: 20). */
2948
- limit?: number;
2949
- };
2828
+ * Preview invite
2829
+ * @description Returns workspace information for an invite code, allowing users to preview the workspace before joining. Does not require authentication.
2830
+ */
2831
+ get: {
2832
+ parameters: {
2833
+ query?: never;
2950
2834
  header?: never;
2951
2835
  path: {
2952
- /** @description URL-safe workspace identifier. */
2953
- workspaceSlug: string;
2836
+ /** @description The invite code to use for joining the workspace. */
2837
+ inviteCode: string;
2954
2838
  };
2955
2839
  cookie?: never;
2956
2840
  };
2957
2841
  requestBody?: never;
2958
2842
  responses: {
2959
2843
  /**
2960
- * @description Generic paginated response wrapper.
2844
+ * @description Preview of an invite with workspace details for display before joining.
2961
2845
  *
2962
- * Provides a consistent structure for all paginated API responses with
2963
- * cursor-based pagination support. When `next_cursor` is present, there
2964
- * are more items to fetch.
2846
+ * This is a public-facing response that shows workspace information
2847
+ * to help users decide whether to join via an invite code.
2965
2848
  */
2966
2849
  200: {
2967
2850
  headers: {
2968
2851
  [name: string]: unknown;
2969
2852
  };
2970
2853
  content: {
2971
- "application/json": components["schemas"]["InvitePage"];
2854
+ "application/json": components["schemas"]["InvitePreview"];
2972
2855
  };
2973
2856
  };
2974
2857
  /**
@@ -2978,7 +2861,7 @@ interface paths {
2978
2861
  * response, including the error name, message, HTTP status code, resource
2979
2862
  * information, and user-friendly messages.
2980
2863
  */
2981
- 401: {
2864
+ 400: {
2982
2865
  headers: {
2983
2866
  [name: string]: unknown;
2984
2867
  };
@@ -2993,7 +2876,7 @@ interface paths {
2993
2876
  * response, including the error name, message, HTTP status code, resource
2994
2877
  * information, and user-friendly messages.
2995
2878
  */
2996
- 403: {
2879
+ 404: {
2997
2880
  headers: {
2998
2881
  [name: string]: unknown;
2999
2882
  };
@@ -3005,39 +2888,40 @@ interface paths {
3005
2888
  };
3006
2889
  put?: never;
3007
2890
  /**
3008
- * Send invitation
3009
- * @description Invites an existing platform user to the workspace and delivers an in-app notification. No email is sent by this server. The response is identical whether or not the address belongs to a known account, so it cannot be used to determine whether an account exists.
2891
+ * Reply to invite code
2892
+ * @description Accepts or declines a workspace invite code. If accepted (the default when no body is provided), the user becomes a member with the role specified in the code. If declined, no action is taken.
3010
2893
  */
3011
2894
  post: {
3012
2895
  parameters: {
3013
2896
  query?: never;
3014
2897
  header?: never;
3015
2898
  path: {
3016
- /** @description URL-safe workspace identifier. */
3017
- workspaceSlug: string;
2899
+ /** @description The invite code to use for joining the workspace. */
2900
+ inviteCode: string;
3018
2901
  };
3019
2902
  cookie?: never;
3020
2903
  };
3021
- /** @description Request payload for creating a new workspace invite. */
3022
2904
  requestBody: {
3023
2905
  content: {
3024
- "application/json": components["schemas"]["CreateInvite"];
2906
+ "application/json": components["schemas"]["ReplyInvite"] | null;
3025
2907
  };
3026
2908
  };
3027
2909
  responses: {
3028
- /**
3029
- * @description Acknowledgement returned after sending a workspace invitation.
3030
- *
3031
- * The response is deliberately uniform: it carries no invite identifier or
3032
- * status, so it is identical whether or not the address belonged to a known
3033
- * account and cannot be used to probe for account existence.
3034
- */
3035
2910
  200: {
3036
2911
  headers: {
3037
2912
  [name: string]: unknown;
3038
2913
  };
3039
2914
  content: {
3040
- "application/json": components["schemas"]["InviteSent"];
2915
+ "application/json": components["schemas"]["Member"] | null;
2916
+ };
2917
+ };
2918
+ /** @description Represents a workspace member. */
2919
+ 201: {
2920
+ headers: {
2921
+ [name: string]: unknown;
2922
+ };
2923
+ content: {
2924
+ "application/json": components["schemas"]["Member"];
3041
2925
  };
3042
2926
  };
3043
2927
  /**
@@ -3077,7 +2961,7 @@ interface paths {
3077
2961
  * response, including the error name, message, HTTP status code, resource
3078
2962
  * information, and user-friendly messages.
3079
2963
  */
3080
- 403: {
2964
+ 404: {
3081
2965
  headers: {
3082
2966
  [name: string]: unknown;
3083
2967
  };
@@ -3126,22 +3010,33 @@ interface paths {
3126
3010
  patch?: never;
3127
3011
  trace?: never;
3128
3012
  };
3129
- "/workspaces/{workspaceSlug}/invites/code/": {
3013
+ "/workspaces/{workspaceSlug}/connections/": {
3130
3014
  parameters: {
3131
3015
  query?: never;
3132
3016
  header?: never;
3133
3017
  path?: never;
3134
3018
  cookie?: never;
3135
3019
  };
3136
- get?: never;
3137
- put?: never;
3138
3020
  /**
3139
- * Generate invite code
3140
- * @description Creates a shareable invite code that can be used by anyone to join the workspace.
3021
+ * List connections
3022
+ * @description Returns all configured connections for the workspace. Only metadata is returned; encrypted credentials are never exposed.
3141
3023
  */
3142
- post: {
3024
+ get: {
3143
3025
  parameters: {
3144
- query?: never;
3026
+ query?: {
3027
+ /**
3028
+ * @description Cursor pointing to the last item of the previous page.
3029
+ * Obtain this from the `nextCursor` field in the response.
3030
+ */
3031
+ after?: string;
3032
+ /** @description The maximum number of records to return (1-100, default: 20). */
3033
+ limit?: number;
3034
+ /**
3035
+ * @description Filter by provider (`s3`, `azure`, `gcs`). Repeatable; a connection
3036
+ * matches if it uses any of the given providers. Empty means no filter.
3037
+ */
3038
+ provider?: string[];
3039
+ };
3145
3040
  header?: never;
3146
3041
  path: {
3147
3042
  /** @description URL-safe workspace identifier. */
@@ -3149,35 +3044,21 @@ interface paths {
3149
3044
  };
3150
3045
  cookie?: never;
3151
3046
  };
3152
- /** @description Request to generate a shareable invite code for a workspace. */
3153
- requestBody: {
3154
- content: {
3155
- "application/json": components["schemas"]["GenerateInviteCode"];
3156
- };
3157
- };
3047
+ requestBody?: never;
3158
3048
  responses: {
3159
- /** @description Response containing a generated shareable invite code. */
3160
- 201: {
3161
- headers: {
3162
- [name: string]: unknown;
3163
- };
3164
- content: {
3165
- "application/json": components["schemas"]["InviteCode"];
3166
- };
3167
- };
3168
3049
  /**
3169
- * @description HTTP error response representation with security-conscious design.
3050
+ * @description Generic paginated response wrapper.
3170
3051
  *
3171
- * This struct contains all the information needed to serialize an error
3172
- * response, including the error name, message, HTTP status code, resource
3173
- * information, and user-friendly messages.
3052
+ * Provides a consistent structure for all paginated API responses with
3053
+ * cursor-based pagination support. When `next_cursor` is present, there
3054
+ * are more items to fetch.
3174
3055
  */
3175
- 400: {
3056
+ 200: {
3176
3057
  headers: {
3177
3058
  [name: string]: unknown;
3178
3059
  };
3179
3060
  content: {
3180
- "application/json": components["schemas"]["ErrorResponse"];
3061
+ "application/json": components["schemas"]["ConnectionPage"];
3181
3062
  };
3182
3063
  };
3183
3064
  /**
@@ -3210,44 +3091,12 @@ interface paths {
3210
3091
  "application/json": components["schemas"]["ErrorResponse"];
3211
3092
  };
3212
3093
  };
3213
- /** @description Expected request with `Content-Type: application/json` */
3214
- 415: {
3215
- headers: {
3216
- [name: string]: unknown;
3217
- };
3218
- content: {
3219
- "text/plain": string;
3220
- };
3221
- };
3222
- /** @description Failed to deserialize the JSON body into the target type */
3223
- 422: {
3224
- headers: {
3225
- [name: string]: unknown;
3226
- };
3227
- content: {
3228
- "text/plain": string;
3229
- };
3230
- };
3231
3094
  };
3232
3095
  };
3233
- delete?: never;
3234
- options?: never;
3235
- head?: never;
3236
- patch?: never;
3237
- trace?: never;
3238
- };
3239
- "/workspaces/{workspaceSlug}/invites/{inviteId}/": {
3240
- parameters: {
3241
- query?: never;
3242
- header?: never;
3243
- path?: never;
3244
- cookie?: never;
3245
- };
3246
- get?: never;
3247
3096
  put?: never;
3248
3097
  /**
3249
- * Reply to invitation
3250
- * @description Accepts or declines a workspace invitation. On accept the user becomes a member and the new membership is returned; on decline no membership is created.
3098
+ * Create connection
3099
+ * @description Creates a new provider connection for the workspace. Connection data is encrypted and stored securely. The response includes connection metadata but never exposes the encrypted credentials.
3251
3100
  */
3252
3101
  post: {
3253
3102
  parameters: {
@@ -3256,48 +3105,28 @@ interface paths {
3256
3105
  path: {
3257
3106
  /** @description URL-safe workspace identifier. */
3258
3107
  workspaceSlug: string;
3259
- /** @description Unique identifier of the invite. */
3260
- inviteId: string;
3261
3108
  };
3262
3109
  cookie?: never;
3263
3110
  };
3264
- /** @description Request to respond to a workspace invitation. */
3111
+ /** @description Request payload for creating a new workspace connection. */
3265
3112
  requestBody: {
3266
3113
  content: {
3267
- "application/json": components["schemas"]["ReplyInvite"];
3114
+ "application/json": components["schemas"]["CreateConnection"];
3268
3115
  };
3269
3116
  };
3270
3117
  responses: {
3271
- 200: {
3272
- headers: {
3273
- [name: string]: unknown;
3274
- };
3275
- content: {
3276
- "application/json": components["schemas"]["Member"] | null;
3277
- };
3278
- };
3279
- /** @description Represents a workspace member. */
3280
- 201: {
3281
- headers: {
3282
- [name: string]: unknown;
3283
- };
3284
- content: {
3285
- "application/json": components["schemas"]["Member"];
3286
- };
3287
- };
3288
3118
  /**
3289
- * @description HTTP error response representation with security-conscious design.
3119
+ * @description Response type for a workspace connection.
3290
3120
  *
3291
- * This struct contains all the information needed to serialize an error
3292
- * response, including the error name, message, HTTP status code, resource
3293
- * information, and user-friendly messages.
3121
+ * Note: The encrypted connection data is never exposed in API responses.
3122
+ * Only metadata about the connection is returned.
3294
3123
  */
3295
- 400: {
3124
+ 201: {
3296
3125
  headers: {
3297
3126
  [name: string]: unknown;
3298
3127
  };
3299
3128
  content: {
3300
- "application/json": components["schemas"]["ErrorResponse"];
3129
+ "application/json": components["schemas"]["Connection"];
3301
3130
  };
3302
3131
  };
3303
3132
  /**
@@ -3307,7 +3136,7 @@ interface paths {
3307
3136
  * response, including the error name, message, HTTP status code, resource
3308
3137
  * information, and user-friendly messages.
3309
3138
  */
3310
- 401: {
3139
+ 400: {
3311
3140
  headers: {
3312
3141
  [name: string]: unknown;
3313
3142
  };
@@ -3322,7 +3151,7 @@ interface paths {
3322
3151
  * response, including the error name, message, HTTP status code, resource
3323
3152
  * information, and user-friendly messages.
3324
3153
  */
3325
- 404: {
3154
+ 401: {
3326
3155
  headers: {
3327
3156
  [name: string]: unknown;
3328
3157
  };
@@ -3337,7 +3166,7 @@ interface paths {
3337
3166
  * response, including the error name, message, HTTP status code, resource
3338
3167
  * information, and user-friendly messages.
3339
3168
  */
3340
- 409: {
3169
+ 403: {
3341
3170
  headers: {
3342
3171
  [name: string]: unknown;
3343
3172
  };
@@ -3365,30 +3194,50 @@ interface paths {
3365
3194
  };
3366
3195
  };
3367
3196
  };
3197
+ delete?: never;
3198
+ options?: never;
3199
+ head?: never;
3200
+ patch?: never;
3201
+ trace?: never;
3202
+ };
3203
+ "/workspaces/{workspaceSlug}/connections/{connectionId}/": {
3204
+ parameters: {
3205
+ query?: never;
3206
+ header?: never;
3207
+ path?: never;
3208
+ cookie?: never;
3209
+ };
3368
3210
  /**
3369
- * Cancel invitation
3370
- * @description Permanently cancels a pending invitation. The invitee will no longer be able to accept it.
3211
+ * Get connection
3212
+ * @description Returns connection metadata without encrypted credentials.
3371
3213
  */
3372
- delete: {
3214
+ get: {
3373
3215
  parameters: {
3374
3216
  query?: never;
3375
3217
  header?: never;
3376
3218
  path: {
3377
3219
  /** @description URL-safe workspace identifier. */
3378
3220
  workspaceSlug: string;
3379
- /** @description Unique identifier of the invite. */
3380
- inviteId: string;
3221
+ /** @description Opaque identifier of the connection. */
3222
+ connectionId: components["schemas"]["ConnectionId"];
3381
3223
  };
3382
3224
  cookie?: never;
3383
3225
  };
3384
3226
  requestBody?: never;
3385
3227
  responses: {
3386
- /** @description no content */
3228
+ /**
3229
+ * @description Response type for a workspace connection.
3230
+ *
3231
+ * Note: The encrypted connection data is never exposed in API responses.
3232
+ * Only metadata about the connection is returned.
3233
+ */
3387
3234
  200: {
3388
3235
  headers: {
3389
3236
  [name: string]: unknown;
3390
3237
  };
3391
- content?: never;
3238
+ content: {
3239
+ "application/json": components["schemas"]["Connection"];
3240
+ };
3392
3241
  };
3393
3242
  /**
3394
3243
  * @description HTTP error response representation with security-conscious design.
@@ -3437,46 +3286,46 @@ interface paths {
3437
3286
  };
3438
3287
  };
3439
3288
  };
3440
- options?: never;
3441
- head?: never;
3442
- patch?: never;
3443
- trace?: never;
3444
- };
3445
- "/invites/code/{inviteCode}/": {
3446
- parameters: {
3447
- query?: never;
3448
- header?: never;
3449
- path?: never;
3450
- cookie?: never;
3451
- };
3289
+ put?: never;
3290
+ post?: never;
3452
3291
  /**
3453
- * Preview invite
3454
- * @description Returns workspace information for an invite code, allowing users to preview the workspace before joining. Does not require authentication.
3292
+ * Delete connection
3293
+ * @description Soft-deletes the connection from the workspace.
3455
3294
  */
3456
- get: {
3295
+ delete: {
3457
3296
  parameters: {
3458
3297
  query?: never;
3459
3298
  header?: never;
3460
3299
  path: {
3461
- /** @description The invite code to use for joining the workspace. */
3462
- inviteCode: string;
3300
+ /** @description URL-safe workspace identifier. */
3301
+ workspaceSlug: string;
3302
+ /** @description Opaque identifier of the connection. */
3303
+ connectionId: components["schemas"]["ConnectionId"];
3463
3304
  };
3464
3305
  cookie?: never;
3465
3306
  };
3466
3307
  requestBody?: never;
3467
3308
  responses: {
3309
+ /** @description no content */
3310
+ 204: {
3311
+ headers: {
3312
+ [name: string]: unknown;
3313
+ };
3314
+ content?: never;
3315
+ };
3468
3316
  /**
3469
- * @description Preview of an invite with workspace details for display before joining.
3317
+ * @description HTTP error response representation with security-conscious design.
3470
3318
  *
3471
- * This is a public-facing response that shows workspace information
3472
- * to help users decide whether to join via an invite code.
3319
+ * This struct contains all the information needed to serialize an error
3320
+ * response, including the error name, message, HTTP status code, resource
3321
+ * information, and user-friendly messages.
3473
3322
  */
3474
- 200: {
3323
+ 401: {
3475
3324
  headers: {
3476
3325
  [name: string]: unknown;
3477
3326
  };
3478
3327
  content: {
3479
- "application/json": components["schemas"]["InvitePreview"];
3328
+ "application/json": components["schemas"]["ErrorResponse"];
3480
3329
  };
3481
3330
  };
3482
3331
  /**
@@ -3486,7 +3335,7 @@ interface paths {
3486
3335
  * response, including the error name, message, HTTP status code, resource
3487
3336
  * information, and user-friendly messages.
3488
3337
  */
3489
- 400: {
3338
+ 403: {
3490
3339
  headers: {
3491
3340
  [name: string]: unknown;
3492
3341
  };
@@ -3511,42 +3360,43 @@ interface paths {
3511
3360
  };
3512
3361
  };
3513
3362
  };
3514
- put?: never;
3363
+ options?: never;
3364
+ head?: never;
3515
3365
  /**
3516
- * Reply to invite code
3517
- * @description Accepts or declines a workspace invite code. If accepted (the default when no body is provided), the user becomes a member with the role specified in the code. If declined, no action is taken.
3366
+ * Update connection
3367
+ * @description Updates connection name or encrypted data.
3518
3368
  */
3519
- post: {
3369
+ patch: {
3520
3370
  parameters: {
3521
3371
  query?: never;
3522
3372
  header?: never;
3523
3373
  path: {
3524
- /** @description The invite code to use for joining the workspace. */
3525
- inviteCode: string;
3374
+ /** @description URL-safe workspace identifier. */
3375
+ workspaceSlug: string;
3376
+ /** @description Opaque identifier of the connection. */
3377
+ connectionId: components["schemas"]["ConnectionId"];
3526
3378
  };
3527
3379
  cookie?: never;
3528
3380
  };
3381
+ /** @description Request payload for updating an existing workspace connection. */
3529
3382
  requestBody: {
3530
3383
  content: {
3531
- "application/json": components["schemas"]["ReplyInvite"] | null;
3384
+ "application/json": components["schemas"]["UpdateConnection"];
3532
3385
  };
3533
3386
  };
3534
3387
  responses: {
3388
+ /**
3389
+ * @description Response type for a workspace connection.
3390
+ *
3391
+ * Note: The encrypted connection data is never exposed in API responses.
3392
+ * Only metadata about the connection is returned.
3393
+ */
3535
3394
  200: {
3536
3395
  headers: {
3537
3396
  [name: string]: unknown;
3538
3397
  };
3539
3398
  content: {
3540
- "application/json": components["schemas"]["Member"] | null;
3541
- };
3542
- };
3543
- /** @description Represents a workspace member. */
3544
- 201: {
3545
- headers: {
3546
- [name: string]: unknown;
3547
- };
3548
- content: {
3549
- "application/json": components["schemas"]["Member"];
3399
+ "application/json": components["schemas"]["Connection"];
3550
3400
  };
3551
3401
  };
3552
3402
  /**
@@ -3586,7 +3436,7 @@ interface paths {
3586
3436
  * response, including the error name, message, HTTP status code, resource
3587
3437
  * information, and user-friendly messages.
3588
3438
  */
3589
- 404: {
3439
+ 403: {
3590
3440
  headers: {
3591
3441
  [name: string]: unknown;
3592
3442
  };
@@ -3601,7 +3451,7 @@ interface paths {
3601
3451
  * response, including the error name, message, HTTP status code, resource
3602
3452
  * information, and user-friendly messages.
3603
3453
  */
3604
- 409: {
3454
+ 404: {
3605
3455
  headers: {
3606
3456
  [name: string]: unknown;
3607
3457
  };
@@ -3629,13 +3479,98 @@ interface paths {
3629
3479
  };
3630
3480
  };
3631
3481
  };
3482
+ trace?: never;
3483
+ };
3484
+ "/workspaces/{workspaceSlug}/connections/{connectionId}/verify/": {
3485
+ parameters: {
3486
+ query?: never;
3487
+ header?: never;
3488
+ path?: never;
3489
+ cookie?: never;
3490
+ };
3491
+ get?: never;
3492
+ put?: never;
3493
+ /**
3494
+ * Verify connection
3495
+ * @description Checks whether the connection's backing store is reachable with its stored credentials.
3496
+ */
3497
+ post: {
3498
+ parameters: {
3499
+ query?: never;
3500
+ header?: never;
3501
+ path: {
3502
+ /** @description URL-safe workspace identifier. */
3503
+ workspaceSlug: string;
3504
+ /** @description Opaque identifier of the connection. */
3505
+ connectionId: components["schemas"]["ConnectionId"];
3506
+ };
3507
+ cookie?: never;
3508
+ };
3509
+ requestBody?: never;
3510
+ responses: {
3511
+ /** @description Result of a connection reachability check. */
3512
+ 200: {
3513
+ headers: {
3514
+ [name: string]: unknown;
3515
+ };
3516
+ content: {
3517
+ "application/json": components["schemas"]["ConnectionVerification"];
3518
+ };
3519
+ };
3520
+ /**
3521
+ * @description HTTP error response representation with security-conscious design.
3522
+ *
3523
+ * This struct contains all the information needed to serialize an error
3524
+ * response, including the error name, message, HTTP status code, resource
3525
+ * information, and user-friendly messages.
3526
+ */
3527
+ 401: {
3528
+ headers: {
3529
+ [name: string]: unknown;
3530
+ };
3531
+ content: {
3532
+ "application/json": components["schemas"]["ErrorResponse"];
3533
+ };
3534
+ };
3535
+ /**
3536
+ * @description HTTP error response representation with security-conscious design.
3537
+ *
3538
+ * This struct contains all the information needed to serialize an error
3539
+ * response, including the error name, message, HTTP status code, resource
3540
+ * information, and user-friendly messages.
3541
+ */
3542
+ 403: {
3543
+ headers: {
3544
+ [name: string]: unknown;
3545
+ };
3546
+ content: {
3547
+ "application/json": components["schemas"]["ErrorResponse"];
3548
+ };
3549
+ };
3550
+ /**
3551
+ * @description HTTP error response representation with security-conscious design.
3552
+ *
3553
+ * This struct contains all the information needed to serialize an error
3554
+ * response, including the error name, message, HTTP status code, resource
3555
+ * information, and user-friendly messages.
3556
+ */
3557
+ 404: {
3558
+ headers: {
3559
+ [name: string]: unknown;
3560
+ };
3561
+ content: {
3562
+ "application/json": components["schemas"]["ErrorResponse"];
3563
+ };
3564
+ };
3565
+ };
3566
+ };
3632
3567
  delete?: never;
3633
3568
  options?: never;
3634
3569
  head?: never;
3635
3570
  patch?: never;
3636
3571
  trace?: never;
3637
3572
  };
3638
- "/workspaces/{workspaceSlug}/members/": {
3573
+ "/workspaces/{workspaceSlug}/syncs/": {
3639
3574
  parameters: {
3640
3575
  query?: never;
3641
3576
  header?: never;
@@ -3643,20 +3578,12 @@ interface paths {
3643
3578
  cookie?: never;
3644
3579
  };
3645
3580
  /**
3646
- * List members
3647
- * @description Returns a paginated list of workspace members with their roles and status.
3581
+ * List workspace syncs
3582
+ * @description Returns all sync runs across the workspace's connections, most recent first, with optional status and provider filters.
3648
3583
  */
3649
3584
  get: {
3650
3585
  parameters: {
3651
3586
  query?: {
3652
- /** @description Filter by 2FA status. */
3653
- has2fa?: boolean;
3654
- /** @description Sort order (asc or desc). */
3655
- order?: components["schemas"]["SortOrder"];
3656
- /** @description Filter by workspace role. */
3657
- role?: components["schemas"]["WorkspaceRole"];
3658
- /** @description Sort by field. */
3659
- sortBy?: components["schemas"]["MemberSortField"];
3660
3587
  /**
3661
3588
  * @description Cursor pointing to the last item of the previous page.
3662
3589
  * Obtain this from the `nextCursor` field in the response.
@@ -3664,6 +3591,14 @@ interface paths {
3664
3591
  after?: string;
3665
3592
  /** @description The maximum number of records to return (1-100, default: 20). */
3666
3593
  limit?: number;
3594
+ /**
3595
+ * @description Filter by connection provider (`s3`, `azure`, `gcs`). Repeatable; a sync
3596
+ * matches if its connection uses any of the given providers. Empty means no
3597
+ * provider filter.
3598
+ */
3599
+ provider?: string[];
3600
+ /** @description Filter by sync status. */
3601
+ status?: components["schemas"]["SyncStatus"];
3667
3602
  };
3668
3603
  header?: never;
3669
3604
  path: {
@@ -3686,7 +3621,7 @@ interface paths {
3686
3621
  [name: string]: unknown;
3687
3622
  };
3688
3623
  content: {
3689
- "application/json": components["schemas"]["MemberPage"];
3624
+ "application/json": components["schemas"]["ConnectionSyncPage"];
3690
3625
  };
3691
3626
  };
3692
3627
  /**
@@ -3744,7 +3679,7 @@ interface paths {
3744
3679
  patch?: never;
3745
3680
  trace?: never;
3746
3681
  };
3747
- "/workspaces/{workspaceSlug}/members/leave/": {
3682
+ "/workspaces/{workspaceSlug}/connections/{connectionId}/sync/": {
3748
3683
  parameters: {
3749
3684
  query?: never;
3750
3685
  header?: never;
@@ -3754,8 +3689,8 @@ interface paths {
3754
3689
  get?: never;
3755
3690
  put?: never;
3756
3691
  /**
3757
- * Leave workspace
3758
- * @description Allows a member to voluntarily leave a workspace.
3692
+ * Sync connection
3693
+ * @description Imports an object from or exports a file to the connection. Returns the created sync; poll it for completion.
3759
3694
  */
3760
3695
  post: {
3761
3696
  parameters: {
@@ -3764,17 +3699,34 @@ interface paths {
3764
3699
  path: {
3765
3700
  /** @description URL-safe workspace identifier. */
3766
3701
  workspaceSlug: string;
3702
+ /** @description Opaque identifier of the connection. */
3703
+ connectionId: components["schemas"]["ConnectionId"];
3767
3704
  };
3768
3705
  cookie?: never;
3769
3706
  };
3770
- requestBody?: never;
3707
+ /**
3708
+ * @description Request payload to trigger a connection sync.
3709
+ *
3710
+ * The direction is determined by the connection's configured `sync_mode`.
3711
+ * - Import connections need no body: the sync fetches every not-yet-imported
3712
+ * object under the connection's root path.
3713
+ * - Export connections push one workspace file (`file_id`) to one object
3714
+ * `key`; both are required for export and ignored for import.
3715
+ */
3716
+ requestBody: {
3717
+ content: {
3718
+ "application/json": components["schemas"]["SyncConnection"];
3719
+ };
3720
+ };
3771
3721
  responses: {
3772
- /** @description no content */
3773
- 200: {
3722
+ /** @description A connection sync run (import or export). */
3723
+ 202: {
3774
3724
  headers: {
3775
3725
  [name: string]: unknown;
3776
3726
  };
3777
- content?: never;
3727
+ content: {
3728
+ "application/json": components["schemas"]["ConnectionSync"];
3729
+ };
3778
3730
  };
3779
3731
  /**
3780
3732
  * @description HTTP error response representation with security-conscious design.
@@ -3806,6 +3758,21 @@ interface paths {
3806
3758
  "application/json": components["schemas"]["ErrorResponse"];
3807
3759
  };
3808
3760
  };
3761
+ /**
3762
+ * @description HTTP error response representation with security-conscious design.
3763
+ *
3764
+ * This struct contains all the information needed to serialize an error
3765
+ * response, including the error name, message, HTTP status code, resource
3766
+ * information, and user-friendly messages.
3767
+ */
3768
+ 403: {
3769
+ headers: {
3770
+ [name: string]: unknown;
3771
+ };
3772
+ content: {
3773
+ "application/json": components["schemas"]["ErrorResponse"];
3774
+ };
3775
+ };
3809
3776
  /**
3810
3777
  * @description HTTP error response representation with security-conscious design.
3811
3778
  *
@@ -3821,6 +3788,24 @@ interface paths {
3821
3788
  "application/json": components["schemas"]["ErrorResponse"];
3822
3789
  };
3823
3790
  };
3791
+ /** @description Expected request with `Content-Type: application/json` */
3792
+ 415: {
3793
+ headers: {
3794
+ [name: string]: unknown;
3795
+ };
3796
+ content: {
3797
+ "text/plain": string;
3798
+ };
3799
+ };
3800
+ /** @description Failed to deserialize the JSON body into the target type */
3801
+ 422: {
3802
+ headers: {
3803
+ [name: string]: unknown;
3804
+ };
3805
+ content: {
3806
+ "text/plain": string;
3807
+ };
3808
+ };
3824
3809
  };
3825
3810
  };
3826
3811
  delete?: never;
@@ -3829,7 +3814,7 @@ interface paths {
3829
3814
  patch?: never;
3830
3815
  trace?: never;
3831
3816
  };
3832
- "/workspaces/{workspaceSlug}/members/{username}/": {
3817
+ "/workspaces/{workspaceSlug}/connections/{connectionId}/syncs/": {
3833
3818
  parameters: {
3834
3819
  query?: never;
3835
3820
  header?: never;
@@ -3837,30 +3822,44 @@ interface paths {
3837
3822
  cookie?: never;
3838
3823
  };
3839
3824
  /**
3840
- * Get member
3841
- * @description Returns detailed information about a specific workspace member.
3825
+ * List connection syncs
3826
+ * @description Returns the connection's sync history, most recent first.
3842
3827
  */
3843
3828
  get: {
3844
3829
  parameters: {
3845
- query?: never;
3830
+ query?: {
3831
+ /**
3832
+ * @description Cursor pointing to the last item of the previous page.
3833
+ * Obtain this from the `nextCursor` field in the response.
3834
+ */
3835
+ after?: string;
3836
+ /** @description The maximum number of records to return (1-100, default: 20). */
3837
+ limit?: number;
3838
+ };
3846
3839
  header?: never;
3847
3840
  path: {
3848
3841
  /** @description URL-safe workspace identifier. */
3849
3842
  workspaceSlug: string;
3850
- /** @description Public handle of the member's account. */
3851
- username: components["schemas"]["Handle"];
3843
+ /** @description Opaque identifier of the connection. */
3844
+ connectionId: components["schemas"]["ConnectionId"];
3852
3845
  };
3853
3846
  cookie?: never;
3854
3847
  };
3855
3848
  requestBody?: never;
3856
3849
  responses: {
3857
- /** @description Represents a workspace member. */
3850
+ /**
3851
+ * @description Generic paginated response wrapper.
3852
+ *
3853
+ * Provides a consistent structure for all paginated API responses with
3854
+ * cursor-based pagination support. When `next_cursor` is present, there
3855
+ * are more items to fetch.
3856
+ */
3858
3857
  200: {
3859
3858
  headers: {
3860
3859
  [name: string]: unknown;
3861
3860
  };
3862
3861
  content: {
3863
- "application/json": components["schemas"]["Member"];
3862
+ "application/json": components["schemas"]["ConnectionSyncPage"];
3864
3863
  };
3865
3864
  };
3866
3865
  /**
@@ -3910,46 +3909,48 @@ interface paths {
3910
3909
  };
3911
3910
  };
3912
3911
  };
3913
- put?: never;
3914
- post?: never;
3912
+ put?: never;
3913
+ post?: never;
3914
+ delete?: never;
3915
+ options?: never;
3916
+ head?: never;
3917
+ patch?: never;
3918
+ trace?: never;
3919
+ };
3920
+ "/workspaces/{workspaceSlug}/connections/{connectionId}/syncs/{syncId}/": {
3921
+ parameters: {
3922
+ query?: never;
3923
+ header?: never;
3924
+ path?: never;
3925
+ cookie?: never;
3926
+ };
3915
3927
  /**
3916
- * Remove member
3917
- * @description Permanently removes a member from the workspace. Cannot remove owners or yourself.
3928
+ * Get connection sync
3929
+ * @description Returns a single sync run for the connection.
3918
3930
  */
3919
- delete: {
3931
+ get: {
3920
3932
  parameters: {
3921
3933
  query?: never;
3922
3934
  header?: never;
3923
3935
  path: {
3924
3936
  /** @description URL-safe workspace identifier. */
3925
3937
  workspaceSlug: string;
3926
- /** @description Public handle of the member's account. */
3927
- username: components["schemas"]["Handle"];
3938
+ /** @description Opaque identifier of the connection. */
3939
+ connectionId: components["schemas"]["ConnectionId"];
3940
+ /** @description Unique identifier of the sync run. */
3941
+ syncId: string;
3928
3942
  };
3929
3943
  cookie?: never;
3930
3944
  };
3931
3945
  requestBody?: never;
3932
3946
  responses: {
3933
- /** @description no content */
3947
+ /** @description A connection sync run (import or export). */
3934
3948
  200: {
3935
- headers: {
3936
- [name: string]: unknown;
3937
- };
3938
- content?: never;
3939
- };
3940
- /**
3941
- * @description HTTP error response representation with security-conscious design.
3942
- *
3943
- * This struct contains all the information needed to serialize an error
3944
- * response, including the error name, message, HTTP status code, resource
3945
- * information, and user-friendly messages.
3946
- */
3947
- 400: {
3948
3949
  headers: {
3949
3950
  [name: string]: unknown;
3950
3951
  };
3951
3952
  content: {
3952
- "application/json": components["schemas"]["ErrorResponse"];
3953
+ "application/json": components["schemas"]["ConnectionSync"];
3953
3954
  };
3954
3955
  };
3955
3956
  /**
@@ -3999,38 +4000,50 @@ interface paths {
3999
4000
  };
4000
4001
  };
4001
4002
  };
4003
+ put?: never;
4004
+ post?: never;
4005
+ delete?: never;
4002
4006
  options?: never;
4003
4007
  head?: never;
4008
+ patch?: never;
4009
+ trace?: never;
4010
+ };
4011
+ "/workspaces/{workspaceSlug}/connections/{connectionId}/syncs/{syncId}/cancel/": {
4012
+ parameters: {
4013
+ query?: never;
4014
+ header?: never;
4015
+ path?: never;
4016
+ cookie?: never;
4017
+ };
4018
+ get?: never;
4019
+ put?: never;
4004
4020
  /**
4005
- * Update member role
4006
- * @description Updates a workspace member's role. Cannot update your own role or demote owners.
4021
+ * Cancel connection sync
4022
+ * @description Cancels an in-progress sync run. A run that already finished returns 409.
4007
4023
  */
4008
- patch: {
4024
+ post: {
4009
4025
  parameters: {
4010
4026
  query?: never;
4011
4027
  header?: never;
4012
4028
  path: {
4013
4029
  /** @description URL-safe workspace identifier. */
4014
4030
  workspaceSlug: string;
4015
- /** @description Public handle of the member's account. */
4016
- username: components["schemas"]["Handle"];
4031
+ /** @description Opaque identifier of the connection. */
4032
+ connectionId: components["schemas"]["ConnectionId"];
4033
+ /** @description Unique identifier of the sync run. */
4034
+ syncId: string;
4017
4035
  };
4018
4036
  cookie?: never;
4019
4037
  };
4020
- /** @description Request to update a member's role. */
4021
- requestBody: {
4022
- content: {
4023
- "application/json": components["schemas"]["UpdateMember"];
4024
- };
4025
- };
4038
+ requestBody?: never;
4026
4039
  responses: {
4027
- /** @description Represents a workspace member. */
4040
+ /** @description A connection sync run (import or export). */
4028
4041
  200: {
4029
4042
  headers: {
4030
4043
  [name: string]: unknown;
4031
4044
  };
4032
4045
  content: {
4033
- "application/json": components["schemas"]["Member"];
4046
+ "application/json": components["schemas"]["ConnectionSync"];
4034
4047
  };
4035
4048
  };
4036
4049
  /**
@@ -4040,7 +4053,7 @@ interface paths {
4040
4053
  * response, including the error name, message, HTTP status code, resource
4041
4054
  * information, and user-friendly messages.
4042
4055
  */
4043
- 400: {
4056
+ 401: {
4044
4057
  headers: {
4045
4058
  [name: string]: unknown;
4046
4059
  };
@@ -4055,7 +4068,7 @@ interface paths {
4055
4068
  * response, including the error name, message, HTTP status code, resource
4056
4069
  * information, and user-friendly messages.
4057
4070
  */
4058
- 401: {
4071
+ 403: {
4059
4072
  headers: {
4060
4073
  [name: string]: unknown;
4061
4074
  };
@@ -4070,7 +4083,7 @@ interface paths {
4070
4083
  * response, including the error name, message, HTTP status code, resource
4071
4084
  * information, and user-friendly messages.
4072
4085
  */
4073
- 403: {
4086
+ 404: {
4074
4087
  headers: {
4075
4088
  [name: string]: unknown;
4076
4089
  };
@@ -4085,7 +4098,7 @@ interface paths {
4085
4098
  * response, including the error name, message, HTTP status code, resource
4086
4099
  * information, and user-friendly messages.
4087
4100
  */
4088
- 404: {
4101
+ 409: {
4089
4102
  headers: {
4090
4103
  [name: string]: unknown;
4091
4104
  };
@@ -4093,26 +4106,12 @@ interface paths {
4093
4106
  "application/json": components["schemas"]["ErrorResponse"];
4094
4107
  };
4095
4108
  };
4096
- /** @description Expected request with `Content-Type: application/json` */
4097
- 415: {
4098
- headers: {
4099
- [name: string]: unknown;
4100
- };
4101
- content: {
4102
- "text/plain": string;
4103
- };
4104
- };
4105
- /** @description Failed to deserialize the JSON body into the target type */
4106
- 422: {
4107
- headers: {
4108
- [name: string]: unknown;
4109
- };
4110
- content: {
4111
- "text/plain": string;
4112
- };
4113
- };
4114
4109
  };
4115
4110
  };
4111
+ delete?: never;
4112
+ options?: never;
4113
+ head?: never;
4114
+ patch?: never;
4116
4115
  trace?: never;
4117
4116
  };
4118
4117
  "/workspaces/{workspaceSlug}/webhooks/": {
@@ -6135,30 +6134,27 @@ interface paths {
6135
6134
  /**
6136
6135
  * @description What detection found in one document.
6137
6136
  *
6138
- * The body group plus per-container-part groups (each tagged
6139
- * by modality) plus a snapshot of the recognition [`Scope`] the
6140
- * entities were scored against.
6137
+ * The body group plus per-container-part groups (each tagged by
6138
+ * modality) plus the recognition [`AuditContext`] the entities
6139
+ * were scored against.
6141
6140
  *
6142
- * The scope snapshot travels with the entities so anonymize
6143
- * can rebuild an orchestrator against exactly the vocabulary
6144
- * analyze used. Anything a policy predicate compares against
6145
- * (label catalog, document-level classification labels,
6146
- * asserted languages / jurisdictions) is here.
6141
+ * The context travels with the entities so anonymize can rebuild
6142
+ * an orchestrator against exactly the vocabulary analyze used.
6143
+ * Anything a policy predicate compares against beyond the label
6144
+ * catalog (asserted languages, jurisdictions, document tags) is
6145
+ * here; labels are re-derived from the policy set on each
6146
+ * anonymize call.
6147
6147
  *
6148
- * `correlation_id` on the persisted scope is always `None`; the
6149
- * anonymize call supplies a fresh id from the passed
6150
- * [`Document`] so anonymize-side tracing spans are distinct
6151
- * from the analyze-side ones.
6152
- *
6153
- * [`Document`]: nvisy_schema::file::Document
6154
- * [`Scope`]: elide::recognition::Scope
6148
+ * No [`Default`] a well-formed audit must carry a real
6149
+ * [`AuditContext`] with a real correlation id. Callers building
6150
+ * an audit outside the analyze path construct it explicitly.
6155
6151
  */
6156
6152
  200: {
6157
6153
  headers: {
6158
6154
  [name: string]: unknown;
6159
6155
  };
6160
6156
  content: {
6161
- "application/json": components["schemas"]["AnalyzedDocument"];
6157
+ "application/json": components["schemas"]["Audit"];
6162
6158
  };
6163
6159
  };
6164
6160
  /**
@@ -6436,9 +6432,9 @@ interface paths {
6436
6432
  /**
6437
6433
  * @description Request payload for creating a new workspace policy.
6438
6434
  *
6439
- * The `definition` is a structured policy the redaction engine consumes;
6440
- * its `name` and `description` drive the stored columns unless overridden
6441
- * here.
6435
+ * The body comes from a template or an inline definition (see [`PolicyBody`]).
6436
+ * The body's `name` and `description` drive the stored columns unless
6437
+ * overridden here.
6442
6438
  */
6443
6439
  requestBody: {
6444
6440
  content: {
@@ -6801,47 +6797,55 @@ interface paths {
6801
6797
  };
6802
6798
  trace?: never;
6803
6799
  };
6804
- "/notifications/": {
6800
+ "/auth/login/": {
6805
6801
  parameters: {
6806
6802
  query?: never;
6807
6803
  header?: never;
6808
6804
  path?: never;
6809
6805
  cookie?: never;
6810
6806
  };
6807
+ get?: never;
6808
+ put?: never;
6811
6809
  /**
6812
- * List notifications
6813
- * @description Returns all notifications for the authenticated account and marks them as read.
6810
+ * Login
6811
+ * @description Authenticates a user and returns an access token.
6814
6812
  */
6815
- get: {
6813
+ post: {
6816
6814
  parameters: {
6817
- query?: {
6818
- /**
6819
- * @description Cursor pointing to the last item of the previous page.
6820
- * Obtain this from the `nextCursor` field in the response.
6821
- */
6822
- after?: string;
6823
- /** @description The maximum number of records to return (1-100, default: 20). */
6824
- limit?: number;
6825
- };
6815
+ query?: never;
6826
6816
  header?: never;
6827
6817
  path?: never;
6828
6818
  cookie?: never;
6829
6819
  };
6830
- requestBody?: never;
6820
+ /** @description Request payload for login. */
6821
+ requestBody: {
6822
+ content: {
6823
+ "application/json": components["schemas"]["Login"];
6824
+ };
6825
+ };
6831
6826
  responses: {
6827
+ /** @description Response returned after successful authentication (login/signup). */
6828
+ 201: {
6829
+ headers: {
6830
+ [name: string]: unknown;
6831
+ };
6832
+ content: {
6833
+ "application/json": components["schemas"]["AuthToken"];
6834
+ };
6835
+ };
6832
6836
  /**
6833
- * @description Generic paginated response wrapper.
6837
+ * @description HTTP error response representation with security-conscious design.
6834
6838
  *
6835
- * Provides a consistent structure for all paginated API responses with
6836
- * cursor-based pagination support. When `next_cursor` is present, there
6837
- * are more items to fetch.
6839
+ * This struct contains all the information needed to serialize an error
6840
+ * response, including the error name, message, HTTP status code, resource
6841
+ * information, and user-friendly messages.
6838
6842
  */
6839
- 200: {
6843
+ 400: {
6840
6844
  headers: {
6841
6845
  [name: string]: unknown;
6842
6846
  };
6843
6847
  content: {
6844
- "application/json": components["schemas"]["NotificationPage"];
6848
+ "application/json": components["schemas"]["ErrorResponse"];
6845
6849
  };
6846
6850
  };
6847
6851
  /**
@@ -6859,71 +6863,33 @@ interface paths {
6859
6863
  "application/json": components["schemas"]["ErrorResponse"];
6860
6864
  };
6861
6865
  };
6862
- };
6863
- };
6864
- put?: never;
6865
- post?: never;
6866
- delete?: never;
6867
- options?: never;
6868
- head?: never;
6869
- patch?: never;
6870
- trace?: never;
6871
- };
6872
- "/notifications/unread/": {
6873
- parameters: {
6874
- query?: never;
6875
- header?: never;
6876
- path?: never;
6877
- cookie?: never;
6878
- };
6879
- /**
6880
- * Get unread notifications count
6881
- * @description Returns the number of unread notifications for the authenticated account.
6882
- */
6883
- get: {
6884
- parameters: {
6885
- query?: never;
6886
- header?: never;
6887
- path?: never;
6888
- cookie?: never;
6889
- };
6890
- requestBody?: never;
6891
- responses: {
6892
- /** @description Response type for unread notifications status. */
6893
- 200: {
6866
+ /** @description Expected request with `Content-Type: application/json` */
6867
+ 415: {
6894
6868
  headers: {
6895
6869
  [name: string]: unknown;
6896
6870
  };
6897
6871
  content: {
6898
- "application/json": components["schemas"]["UnreadStatus"];
6872
+ "text/plain": string;
6899
6873
  };
6900
6874
  };
6901
- /**
6902
- * @description HTTP error response representation with security-conscious design.
6903
- *
6904
- * This struct contains all the information needed to serialize an error
6905
- * response, including the error name, message, HTTP status code, resource
6906
- * information, and user-friendly messages.
6907
- */
6908
- 401: {
6875
+ /** @description Failed to deserialize the JSON body into the target type */
6876
+ 422: {
6909
6877
  headers: {
6910
6878
  [name: string]: unknown;
6911
6879
  };
6912
6880
  content: {
6913
- "application/json": components["schemas"]["ErrorResponse"];
6881
+ "text/plain": string;
6914
6882
  };
6915
6883
  };
6916
6884
  };
6917
6885
  };
6918
- put?: never;
6919
- post?: never;
6920
6886
  delete?: never;
6921
6887
  options?: never;
6922
6888
  head?: never;
6923
6889
  patch?: never;
6924
6890
  trace?: never;
6925
6891
  };
6926
- "/auth/login/": {
6892
+ "/auth/signup/": {
6927
6893
  parameters: {
6928
6894
  query?: never;
6929
6895
  header?: never;
@@ -6933,8 +6899,8 @@ interface paths {
6933
6899
  get?: never;
6934
6900
  put?: never;
6935
6901
  /**
6936
- * Login
6937
- * @description Authenticates a user and returns an access token.
6902
+ * Signup
6903
+ * @description Creates a new account and returns an access token.
6938
6904
  */
6939
6905
  post: {
6940
6906
  parameters: {
@@ -6943,10 +6909,10 @@ interface paths {
6943
6909
  path?: never;
6944
6910
  cookie?: never;
6945
6911
  };
6946
- /** @description Request payload for login. */
6912
+ /** @description Request payload for signup. */
6947
6913
  requestBody: {
6948
6914
  content: {
6949
- "application/json": components["schemas"]["Login"];
6915
+ "application/json": components["schemas"]["Signup"];
6950
6916
  };
6951
6917
  };
6952
6918
  responses: {
@@ -6981,7 +6947,7 @@ interface paths {
6981
6947
  * response, including the error name, message, HTTP status code, resource
6982
6948
  * information, and user-friendly messages.
6983
6949
  */
6984
- 401: {
6950
+ 409: {
6985
6951
  headers: {
6986
6952
  [name: string]: unknown;
6987
6953
  };
@@ -7015,7 +6981,7 @@ interface paths {
7015
6981
  patch?: never;
7016
6982
  trace?: never;
7017
6983
  };
7018
- "/auth/signup/": {
6984
+ "/auth/logout/": {
7019
6985
  parameters: {
7020
6986
  query?: never;
7021
6987
  header?: never;
@@ -7025,8 +6991,8 @@ interface paths {
7025
6991
  get?: never;
7026
6992
  put?: never;
7027
6993
  /**
7028
- * Signup
7029
- * @description Creates a new account and returns an access token.
6994
+ * Logout
6995
+ * @description Invalidates the current access token.
7030
6996
  */
7031
6997
  post: {
7032
6998
  parameters: {
@@ -7035,21 +7001,14 @@ interface paths {
7035
7001
  path?: never;
7036
7002
  cookie?: never;
7037
7003
  };
7038
- /** @description Request payload for signup. */
7039
- requestBody: {
7040
- content: {
7041
- "application/json": components["schemas"]["Signup"];
7042
- };
7043
- };
7004
+ requestBody?: never;
7044
7005
  responses: {
7045
- /** @description Response returned after successful authentication (login/signup). */
7046
- 201: {
7006
+ /** @description Logged out. */
7007
+ 200: {
7047
7008
  headers: {
7048
7009
  [name: string]: unknown;
7049
7010
  };
7050
- content: {
7051
- "application/json": components["schemas"]["AuthToken"];
7052
- };
7011
+ content?: never;
7053
7012
  };
7054
7013
  /**
7055
7014
  * @description HTTP error response representation with security-conscious design.
@@ -7058,7 +7017,7 @@ interface paths {
7058
7017
  * response, including the error name, message, HTTP status code, resource
7059
7018
  * information, and user-friendly messages.
7060
7019
  */
7061
- 400: {
7020
+ 401: {
7062
7021
  headers: {
7063
7022
  [name: string]: unknown;
7064
7023
  };
@@ -7066,70 +7025,91 @@ interface paths {
7066
7025
  "application/json": components["schemas"]["ErrorResponse"];
7067
7026
  };
7068
7027
  };
7069
- /**
7070
- * @description HTTP error response representation with security-conscious design.
7071
- *
7072
- * This struct contains all the information needed to serialize an error
7073
- * response, including the error name, message, HTTP status code, resource
7074
- * information, and user-friendly messages.
7075
- */
7076
- 409: {
7077
- headers: {
7078
- [name: string]: unknown;
7079
- };
7080
- content: {
7081
- "application/json": components["schemas"]["ErrorResponse"];
7082
- };
7028
+ };
7029
+ };
7030
+ delete?: never;
7031
+ options?: never;
7032
+ head?: never;
7033
+ patch?: never;
7034
+ trace?: never;
7035
+ };
7036
+ "/health/": {
7037
+ parameters: {
7038
+ query?: never;
7039
+ header?: never;
7040
+ path?: never;
7041
+ cookie?: never;
7042
+ };
7043
+ /**
7044
+ * Health status
7045
+ * @description Returns system health status. Unauthenticated requests use cache; authenticated requests perform real-time checks.
7046
+ */
7047
+ get: {
7048
+ parameters: {
7049
+ query?: never;
7050
+ header?: never;
7051
+ path: {
7052
+ /** @description The API version string (e.g., "v1", "v2"). */
7053
+ version: string;
7083
7054
  };
7084
- /** @description Expected request with `Content-Type: application/json` */
7085
- 415: {
7055
+ cookie?: never;
7056
+ };
7057
+ requestBody?: never;
7058
+ responses: {
7059
+ /** @description Response body for `GET /health/`. */
7060
+ 200: {
7086
7061
  headers: {
7087
7062
  [name: string]: unknown;
7088
7063
  };
7089
7064
  content: {
7090
- "text/plain": string;
7065
+ "application/json": components["schemas"]["Health"];
7091
7066
  };
7092
7067
  };
7093
- /** @description Failed to deserialize the JSON body into the target type */
7094
- 422: {
7068
+ /** @description Response body for `GET /health/`. */
7069
+ 503: {
7095
7070
  headers: {
7096
7071
  [name: string]: unknown;
7097
7072
  };
7098
7073
  content: {
7099
- "text/plain": string;
7074
+ "application/json": components["schemas"]["Health"];
7100
7075
  };
7101
7076
  };
7102
7077
  };
7103
7078
  };
7079
+ put?: never;
7080
+ post?: never;
7104
7081
  delete?: never;
7105
7082
  options?: never;
7106
7083
  head?: never;
7107
7084
  patch?: never;
7108
7085
  trace?: never;
7109
7086
  };
7110
- "/auth/logout/": {
7087
+ "/avatars/accounts/{id}/{version}/": {
7111
7088
  parameters: {
7112
7089
  query?: never;
7113
7090
  header?: never;
7114
7091
  path?: never;
7115
7092
  cookie?: never;
7116
7093
  };
7117
- get?: never;
7118
- put?: never;
7119
7094
  /**
7120
- * Logout
7121
- * @description Invalidates the current access token.
7095
+ * Get avatar
7096
+ * @description Returns the owner's avatar image (WebP), publicly. 404 when unset.
7122
7097
  */
7123
- post: {
7098
+ get: {
7124
7099
  parameters: {
7125
7100
  query?: never;
7126
7101
  header?: never;
7127
- path?: never;
7102
+ path: {
7103
+ /** @description Opaque id of the avatar's owner. */
7104
+ id: string;
7105
+ /** @description Content-hash version segment identifying the exact stored object. */
7106
+ version: string;
7107
+ };
7128
7108
  cookie?: never;
7129
7109
  };
7130
7110
  requestBody?: never;
7131
7111
  responses: {
7132
- /** @description Logged out. */
7112
+ /** @description no content */
7133
7113
  200: {
7134
7114
  headers: {
7135
7115
  [name: string]: unknown;
@@ -7143,7 +7123,7 @@ interface paths {
7143
7123
  * response, including the error name, message, HTTP status code, resource
7144
7124
  * information, and user-friendly messages.
7145
7125
  */
7146
- 401: {
7126
+ 404: {
7147
7127
  headers: {
7148
7128
  [name: string]: unknown;
7149
7129
  };
@@ -7153,13 +7133,15 @@ interface paths {
7153
7133
  };
7154
7134
  };
7155
7135
  };
7136
+ put?: never;
7137
+ post?: never;
7156
7138
  delete?: never;
7157
7139
  options?: never;
7158
7140
  head?: never;
7159
7141
  patch?: never;
7160
7142
  trace?: never;
7161
7143
  };
7162
- "/health/": {
7144
+ "/avatars/workspaces/{id}/{version}/": {
7163
7145
  parameters: {
7164
7146
  query?: never;
7165
7147
  header?: never;
@@ -7167,37 +7149,43 @@ interface paths {
7167
7149
  cookie?: never;
7168
7150
  };
7169
7151
  /**
7170
- * Health status
7171
- * @description Returns system health status. Unauthenticated requests use cache; authenticated requests perform real-time checks.
7152
+ * Get avatar
7153
+ * @description Returns the owner's avatar image (WebP), publicly. 404 when unset.
7172
7154
  */
7173
7155
  get: {
7174
7156
  parameters: {
7175
7157
  query?: never;
7176
7158
  header?: never;
7177
7159
  path: {
7178
- /** @description The API version string (e.g., "v1", "v2"). */
7160
+ /** @description Opaque id of the avatar's owner. */
7161
+ id: string;
7162
+ /** @description Content-hash version segment identifying the exact stored object. */
7179
7163
  version: string;
7180
7164
  };
7181
7165
  cookie?: never;
7182
7166
  };
7183
7167
  requestBody?: never;
7184
7168
  responses: {
7185
- /** @description Response body for `GET /health/`. */
7169
+ /** @description no content */
7186
7170
  200: {
7187
7171
  headers: {
7188
7172
  [name: string]: unknown;
7189
7173
  };
7190
- content: {
7191
- "application/json": components["schemas"]["Health"];
7192
- };
7174
+ content?: never;
7193
7175
  };
7194
- /** @description Response body for `GET /health/`. */
7195
- 503: {
7176
+ /**
7177
+ * @description HTTP error response representation with security-conscious design.
7178
+ *
7179
+ * This struct contains all the information needed to serialize an error
7180
+ * response, including the error name, message, HTTP status code, resource
7181
+ * information, and user-friendly messages.
7182
+ */
7183
+ 404: {
7196
7184
  headers: {
7197
7185
  [name: string]: unknown;
7198
7186
  };
7199
7187
  content: {
7200
- "application/json": components["schemas"]["Health"];
7188
+ "application/json": components["schemas"]["ErrorResponse"];
7201
7189
  };
7202
7190
  };
7203
7191
  };
@@ -7312,65 +7300,6 @@ interface components {
7312
7300
  * audit trail and activity tracking.
7313
7301
  */
7314
7302
  ActivityType: "workspace:created" | "workspace:updated" | "workspace:deleted" | "workspace:exported" | "workspace:imported" | "member:deleted" | "member:updated" | "invite:created" | "invite:accepted" | "invite:declined" | "invite:canceled" | "connection:created" | "connection:updated" | "connection:deleted" | "connection:synced" | "webhook:created" | "webhook:updated" | "webhook:deleted" | "webhook:triggered" | "file:created" | "file:updated" | "file:deleted" | "file:verified" | "custom";
7315
- /**
7316
- * @description What detection found in one document.
7317
- *
7318
- * The body group plus per-container-part groups (each tagged
7319
- * by modality) plus a snapshot of the recognition [`Scope`] the
7320
- * entities were scored against.
7321
- *
7322
- * The scope snapshot travels with the entities so anonymize
7323
- * can rebuild an orchestrator against exactly the vocabulary
7324
- * analyze used. Anything a policy predicate compares against
7325
- * (label catalog, document-level classification labels,
7326
- * asserted languages / jurisdictions) is here.
7327
- *
7328
- * `correlation_id` on the persisted scope is always `None`; the
7329
- * anonymize call supplies a fresh id from the passed
7330
- * [`Document`] so anonymize-side tracing spans are distinct
7331
- * from the analyze-side ones.
7332
- *
7333
- * [`Document`]: nvisy_schema::file::Document
7334
- * [`Scope`]: elide::recognition::Scope
7335
- */
7336
- AnalyzedDocument: {
7337
- /**
7338
- * @description The body group.
7339
- *
7340
- * `None` when no body pipeline produced entities (pre-analyze,
7341
- * or the codec resolved the doc to a modality with no
7342
- * pipeline).
7343
- */
7344
- body?: components["schemas"]["RecognizedGroup"];
7345
- /**
7346
- * @description One entry per container part the orchestrator surfaced.
7347
- *
7348
- * Keyed by the container-private part id (e.g. a DOCX zip
7349
- * entry name like `"word/media/image1.png"`); each value
7350
- * carries that part's modality + entities.
7351
- */
7352
- parts?: {
7353
- [key: string]: components["schemas"]["RecognizedGroup"];
7354
- };
7355
- /**
7356
- * @description Recognition scope snapshot.
7357
- *
7358
- * The resolved label catalog + asserted languages,
7359
- * countries, and document labels. Held so
7360
- * [`Engine::anonymize_document`] can compile against the same
7361
- * vocabulary analyze used without the caller re-passing an
7362
- * `AnalyzerParams`.
7363
- *
7364
- * Required on the wire. A missing scope on an incoming
7365
- * [`AnalyzedDocument`] would default to an empty catalog and
7366
- * silently underfire every `TagOneOf` policy predicate;
7367
- * rejecting at deserialize time surfaces the shape mismatch
7368
- * at load, not at apply.
7369
- *
7370
- * [`Engine::anonymize_document`]: super::Engine::anonymize_document
7371
- */
7372
- scope: components["schemas"]["Scope"];
7373
- };
7374
7303
  /** @description API token response structure. */
7375
7304
  ApiToken: {
7376
7305
  /**
@@ -7489,23 +7418,29 @@ interface components {
7489
7418
  */
7490
7419
  ArtifactType: "input" | "output" | "intermediate";
7491
7420
  /**
7492
- * @description Author-supplied rationale for a redaction: the policy it enforces and
7493
- * a reason.
7421
+ * @description Author-supplied rationale for a redaction: a policy name and an optional
7422
+ * description.
7494
7423
  *
7495
7424
  * Where the matched selection rule answers *which rule fired*, an
7496
7425
  * `Attribution` answers *under what authority* — a compliance clause, an
7497
7426
  * internal policy, a data-handling rule. A policy author attaches it to a
7498
- * selection rule (the anonymizer's `because`); the anonymizer records it on
7499
- * the entity's [`Redaction`] event so an audit can trace a change back to
7500
- * the policy that demanded it.
7427
+ * selection rule (`Rule::because` in `elide-redaction`); the anonymizer
7428
+ * records it on the entity's [`Redaction`] event so an audit can trace a
7429
+ * change back to the policy that demanded it.
7430
+ *
7431
+ * The `name` is the author's label for that policy (`"gdpr-art-17"`,
7432
+ * `"hipaa-safe-harbor"`, `"PII removal"`); an optional `description` adds
7433
+ * human context. Any stable machine identity a policy layer needs (a rule
7434
+ * UUID, a jurisdiction) is that layer's concern — it can encode it in the
7435
+ * name or carry it separately.
7501
7436
  *
7502
7437
  * [`Redaction`]: crate::entity::provenance::EventKind::Redaction
7503
7438
  */
7504
7439
  Attribution: {
7505
- /** @description Stable policy / rule identifier (e.g. `"gdpr-art-17"`, `"pci-dss-3.4"`). */
7506
- policy_id: string;
7507
- /** @description Human-readable reason (e.g. `"right to erasure"`), when given. */
7508
- reason?: string;
7440
+ /** @description Human-readable description (e.g. `"right to erasure"`), when given. */
7441
+ description?: string;
7442
+ /** @description The policy's name (e.g. `"gdpr-art-17"`, `"hipaa-safe-harbor"`). */
7443
+ name: string;
7509
7444
  };
7510
7445
  /**
7511
7446
  * @description Per-call payload a recognizer inspects for the [`Audio`] modality.
@@ -7610,12 +7545,17 @@ interface components {
7610
7545
  /** @description The elide entity, as recognition produced it. */
7611
7546
  entity: components["schemas"]["AudioEntity"];
7612
7547
  /**
7613
- * @description Reviewer-supplied override.
7548
+ * @description Reviewer-supplied redaction override.
7614
7549
  *
7615
- * `None` means "use the policy's decision"; `Some(action)`
7616
- * overrides it for this specific entity at apply time.
7550
+ * `None` means "use the matching policy rule's decision";
7551
+ * `Some(...)` overrides that rule for this specific entity
7552
+ * at apply time. Reviewer overrides take precedence over
7553
+ * every policy rule and inherit the authority of the
7554
+ * [`Review::policy_id`] they name — the audit event's
7555
+ * attribution stamps that policy so the trail names the
7556
+ * authority under which the override fired.
7617
7557
  */
7618
- reviewerOverride?: components["schemas"]["ModalityRedactions"];
7558
+ review?: components["schemas"]["Review"];
7619
7559
  };
7620
7560
  /**
7621
7561
  * @description One thing that happened to an entity, with its effect on confidence.
@@ -7853,6 +7793,117 @@ interface components {
7853
7793
  */
7854
7794
  waveform: components["schemas"]["Waveform"];
7855
7795
  };
7796
+ /**
7797
+ * @description What detection found in one document.
7798
+ *
7799
+ * The body group plus per-container-part groups (each tagged by
7800
+ * modality) plus the recognition [`AuditContext`] the entities
7801
+ * were scored against.
7802
+ *
7803
+ * The context travels with the entities so anonymize can rebuild
7804
+ * an orchestrator against exactly the vocabulary analyze used.
7805
+ * Anything a policy predicate compares against beyond the label
7806
+ * catalog (asserted languages, jurisdictions, document tags) is
7807
+ * here; labels are re-derived from the policy set on each
7808
+ * anonymize call.
7809
+ *
7810
+ * No [`Default`] — a well-formed audit must carry a real
7811
+ * [`AuditContext`] with a real correlation id. Callers building
7812
+ * an audit outside the analyze path construct it explicitly.
7813
+ */
7814
+ Audit: {
7815
+ /**
7816
+ * @description The body group.
7817
+ *
7818
+ * `None` when no body pipeline produced entities (pre-analyze,
7819
+ * or the codec resolved the doc to a modality with no
7820
+ * pipeline).
7821
+ */
7822
+ body?: components["schemas"]["EntityGroup"];
7823
+ /**
7824
+ * @description Recognition context.
7825
+ *
7826
+ * The asserted languages, countries, document tags, and the
7827
+ * analyze-side correlation id. Held so
7828
+ * [`Engine::anonymize`] can compile against the same
7829
+ * vocabulary analyze used without the caller re-passing an
7830
+ * `AnalyzerParams`.
7831
+ *
7832
+ * Required on the wire — a missing context on an incoming
7833
+ * [`Audit`] rejects at deserialize time so the shape
7834
+ * mismatch surfaces at load, not at apply.
7835
+ *
7836
+ * [`Engine::anonymize`]: super::Engine::anonymize
7837
+ */
7838
+ context: components["schemas"]["AuditContext"];
7839
+ /**
7840
+ * @description One entry per container part the orchestrator surfaced.
7841
+ *
7842
+ * Keyed by the container-private part id (e.g. a DOCX zip
7843
+ * entry name like `"word/media/image1.png"`); each value
7844
+ * carries that part's modality + entities.
7845
+ */
7846
+ parts?: {
7847
+ [key: string]: components["schemas"]["EntityGroup"];
7848
+ };
7849
+ };
7850
+ /**
7851
+ * @description Recognition-side facts that travel from analyze to anonymize.
7852
+ *
7853
+ * Mirrors elide's [`Scope`] shape one-for-one: direct fields
7854
+ * for `languages` and `countries` (typed, elide-native), a
7855
+ * [`metadata`] sub-struct for free-form classification strings
7856
+ * (`tags`, `purpose`, `audience`), and the analyze-time
7857
+ * [`correlation_id`]. The label catalog is not on here —
7858
+ * labels are policy-owned, and anonymize re-derives them from
7859
+ * the policy set it was handed.
7860
+ *
7861
+ * No [`Default`] — `correlation_id` has no meaningful default
7862
+ * (a nil UUID would silently collapse unrelated audits under
7863
+ * one bucket in downstream trace aggregators), so callers
7864
+ * supply one explicitly. Everything else defaults to empty.
7865
+ *
7866
+ * [`Scope`]: elide::recognition::Scope
7867
+ * [`metadata`]: Self::metadata
7868
+ * [`correlation_id`]: Self::correlation_id
7869
+ */
7870
+ AuditContext: {
7871
+ /**
7872
+ * Format: uuid
7873
+ * @description Analyze-time correlation id.
7874
+ *
7875
+ * Threaded into every tracing span on the recognition path;
7876
+ * carried over so the anonymize path can link its own spans
7877
+ * to the same request. The anonymize call supplies a fresh
7878
+ * id from the passed [`Document`] as the anonymize-side
7879
+ * correlation id — this one stays as the analyze-side
7880
+ * pointer.
7881
+ *
7882
+ * Required on the wire.
7883
+ *
7884
+ * [`Document`]: nvisy_schema::file::Document
7885
+ */
7886
+ correlationId: string;
7887
+ /**
7888
+ * @description Caller-asserted jurisdictions.
7889
+ *
7890
+ * Recorded from `AnalyzerParams.scope.countries`.
7891
+ */
7892
+ countries?: components["schemas"]["CountryCode"][];
7893
+ /**
7894
+ * @description Caller-asserted languages for the analysis.
7895
+ *
7896
+ * Recorded from `AnalyzerParams.scope.languages` at analyze
7897
+ * time; anonymize re-uses them verbatim.
7898
+ * @default []
7899
+ */
7900
+ languages: components["schemas"]["Languages"];
7901
+ /**
7902
+ * @description Free-form request context: document tags, request purpose,
7903
+ * output audience. See elide's [`ScopeMetadata`].
7904
+ */
7905
+ metadata?: components["schemas"]["ScopeMetadata"];
7906
+ };
7856
7907
  /** @description Response returned after successful authentication (login/signup). */
7857
7908
  AuthToken: {
7858
7909
  /** @description The JWT API token for authentication. */
@@ -7870,6 +7921,22 @@ interface components {
7870
7921
  /** @description Handle of the authenticated account. */
7871
7922
  username: components["schemas"]["Handle"];
7872
7923
  };
7924
+ /**
7925
+ * @description Path parameters for a public avatar route: the owner id and the avatar's
7926
+ * content-hash version.
7927
+ *
7928
+ * Each version is a distinct stored object, so an unknown version simply does
7929
+ * not resolve — the version needs no separate validation.
7930
+ */
7931
+ AvatarPathParams: {
7932
+ /**
7933
+ * Format: uuid
7934
+ * @description Opaque id of the avatar's owner.
7935
+ */
7936
+ id: string;
7937
+ /** @description Content-hash version segment identifying the exact stored object. */
7938
+ version: string;
7939
+ };
7873
7940
  /**
7874
7941
  * @description Typed credentials for Azure Blob Storage.
7875
7942
  *
@@ -7916,6 +7983,32 @@ interface components {
7916
7983
  /** @description Minimum corner (top-left, conventionally). */
7917
7984
  min: components["schemas"]["Point"];
7918
7985
  };
7986
+ /**
7987
+ * @description Text a [`TextRedaction::Clamp`] emits for out-of-range values.
7988
+ *
7989
+ * Three forms, deserialized untagged so callers can pick the
7990
+ * terser one for the case at hand:
7991
+ *
7992
+ * - **Plain string** (`"90 or older"`) — English-only shorthand.
7993
+ * - **Localized map** (`{"en": "90 or older", "fr": "90 ou plus"}`)
7994
+ * — one entry per language the deployment ships; missing
7995
+ * locales fall back to English at render time.
7996
+ * - **Format template** (`{"format": "{n} or older"}`) — the
7997
+ * engine substitutes `{n}` for the threshold, so a ceiling of
7998
+ * `90` renders `"90 or older"` without the caller repeating the
7999
+ * number. Same rendering in every language.
8000
+ *
8001
+ * Round-trips through serde as whichever form the caller wrote.
8002
+ */
8003
+ ClampBucket: string | {
8004
+ /**
8005
+ * @description The template string. `{n}` is substituted; other text
8006
+ * is literal.
8007
+ */
8008
+ format: string;
8009
+ } | {
8010
+ [key: string]: string;
8011
+ };
7919
8012
  /**
7920
8013
  * @description Color as 8-bit RGB.
7921
8014
  *
@@ -8269,20 +8362,33 @@ interface components {
8269
8362
  /**
8270
8363
  * @description Request payload for creating a new workspace policy.
8271
8364
  *
8272
- * The `definition` is a structured policy the redaction engine consumes;
8273
- * its `name` and `description` drive the stored columns unless overridden
8274
- * here.
8365
+ * The body comes from a template or an inline definition (see [`PolicyBody`]).
8366
+ * The body's `name` and `description` drive the stored columns unless
8367
+ * overridden here.
8275
8368
  */
8276
8369
  CreatePolicy: {
8277
- /** @description The structured policy body consumed by the engine. */
8278
- definition: components["schemas"]["PolicyDefinition"];
8279
8370
  /** @description Optional description override. Defaults to the policy's own description. */
8280
8371
  description?: string;
8281
8372
  /** @description Optional display name override. Defaults to the policy's own name. */
8282
8373
  displayName?: string;
8283
8374
  /** @description URL slug, unique within the workspace and immutable after creation. */
8284
8375
  slug: components["schemas"]["Handle"];
8285
- };
8376
+ } & ({
8377
+ /** @constant */
8378
+ source: "template";
8379
+ /** @description The built-in policy template to seed from. */
8380
+ template: components["schemas"]["PolicyTemplate"];
8381
+ } | {
8382
+ /**
8383
+ * @description The structured policy body.
8384
+ *
8385
+ * Boxed to keep the enum small: an inline body is much larger than a
8386
+ * template id, and most requests use a template.
8387
+ */
8388
+ definition: components["schemas"]["PolicyDefinition"];
8389
+ /** @constant */
8390
+ source: "inline";
8391
+ });
8286
8392
  /** @description Request payload for creating a new workspace webhook. */
8287
8393
  CreateWebhook: {
8288
8394
  /** @description Detailed description of the webhook's purpose (max 500 characters). */
@@ -8489,6 +8595,24 @@ interface components {
8489
8595
  */
8490
8596
  validator?: string;
8491
8597
  };
8598
+ /**
8599
+ * @description The coarseness a [`GeneralizeDate`] reduces a date/timestamp to.
8600
+ *
8601
+ * Every rendering is an ISO-8601 form, so the output is locale-independent
8602
+ * by construction — no localized month names or week markers to configure.
8603
+ */
8604
+ DateGranularity: "year" | "year_month" | "hour";
8605
+ /**
8606
+ * @description Which written date convention a [`GeneralizeDate`] accepts on *input*.
8607
+ *
8608
+ * This governs only how the entity value is *parsed*; the output mirrors
8609
+ * each value's own convention (see [`GeneralizeDate::render`]). The choice
8610
+ * is explicit, never inferred from the entity's language: `03/04/1987` is
8611
+ * a real date under both conventions (March 4 vs. April 3), so a wrong
8612
+ * guess would silently emit a plausible-but-wrong month. The policy
8613
+ * author, who knows the corpus's convention, sets it.
8614
+ */
8615
+ DateStyle: "iso" | "us";
8492
8616
  /**
8493
8617
  * @description Pixel dimensions of an image or any 2-D canvas.
8494
8618
  *
@@ -8556,6 +8680,36 @@ interface components {
8556
8680
  * mentions, not a global key.
8557
8681
  */
8558
8682
  EntityCoRef: string;
8683
+ /**
8684
+ * @description A modality-tagged group of recognised entities.
8685
+ *
8686
+ * The unit [`Audit`] stores in `body` and in every `parts`
8687
+ * entry.
8688
+ *
8689
+ * Tagged by `modality` (snake_case) so deserialization picks the
8690
+ * right variant and the entity vec inside is statically typed
8691
+ * per modality — apply-time we hand each variant back to elide
8692
+ * as a `Vec<Entity<M>>` for the appropriate `M`.
8693
+ *
8694
+ * [`Audit`]: crate::Audit
8695
+ */
8696
+ EntityGroup: {
8697
+ entities: components["schemas"]["TextEntityRecord"][];
8698
+ /** @constant */
8699
+ modality: "text";
8700
+ } | {
8701
+ entities: components["schemas"]["TabularEntityRecord"][];
8702
+ /** @constant */
8703
+ modality: "tabular";
8704
+ } | {
8705
+ entities: components["schemas"]["ImageEntityRecord"][];
8706
+ /** @constant */
8707
+ modality: "image";
8708
+ } | {
8709
+ entities: components["schemas"]["AudioEntityRecord"][];
8710
+ /** @constant */
8711
+ modality: "audio";
8712
+ };
8559
8713
  /**
8560
8714
  * @description HTTP error response representation with security-conscious design.
8561
8715
  *
@@ -8690,14 +8844,6 @@ interface components {
8690
8844
  };
8691
8845
  /** @description Lowercase, dash-separated identifier used in URLs and as account handles. */
8692
8846
  Handle: string;
8693
- /**
8694
- * @description SHA-2 variant for the [`TextRedaction::Hash`] operator.
8695
- *
8696
- * Wire mirror of elide's `Sha2Algorithm`; the runtime `From`
8697
- * conversion is on the engine side so this crate stays free
8698
- * of the elide-redaction dep.
8699
- */
8700
- HashAlgorithm: "sha256" | "sha512";
8701
8847
  /** @description Response body for `GET /health/`. */
8702
8848
  Health: {
8703
8849
  /** @description Per-component health checks. */
@@ -8810,12 +8956,17 @@ interface components {
8810
8956
  /** @description The elide entity, as recognition produced it. */
8811
8957
  entity: components["schemas"]["ImageEntity"];
8812
8958
  /**
8813
- * @description Reviewer-supplied override.
8959
+ * @description Reviewer-supplied redaction override.
8814
8960
  *
8815
- * `None` means "use the policy's decision"; `Some(action)`
8816
- * overrides it for this specific entity at apply time.
8961
+ * `None` means "use the matching policy rule's decision";
8962
+ * `Some(...)` overrides that rule for this specific entity
8963
+ * at apply time. Reviewer overrides take precedence over
8964
+ * every policy rule and inherit the authority of the
8965
+ * [`Review::policy_id`] they name — the audit event's
8966
+ * attribution stamps that policy so the trail names the
8967
+ * authority under which the override fired.
8817
8968
  */
8818
- reviewerOverride?: components["schemas"]["ModalityRedactions"];
8969
+ review?: components["schemas"]["Review"];
8819
8970
  };
8820
8971
  /**
8821
8972
  * @description One thing that happened to an entity, with its effect on confidence.
@@ -9200,76 +9351,163 @@ interface components {
9200
9351
  */
9201
9352
  InviteStatus: "pending" | "accepted" | "declined" | "canceled" | "expired" | "revoked";
9202
9353
  /**
9203
- * @description Kind of sensitive information: a name, an optional description, and
9204
- * zero or more tags.
9205
- *
9206
- * Names are conventionally `SCREAMING_SNAKE_CASE` (`"PHONE_NUMBER"`),
9207
- * matching Presidio, but this is convention, not enforcement. The
9208
- * taxonomy is open: a [`Label`] can be minted for any name a recognizer
9209
- * or configuration needs.
9354
+ * @description Kind of sensitive information: a stable [`id`], per-language
9355
+ * [`LabelLocale`]s, and zero or more tags.
9210
9356
  *
9211
9357
  * # Identity
9212
9358
  *
9213
- * Labels are identified by [`name`]; selectors match by name. Note that
9214
- * derived equality is *structural*: two labels with the same name but
9215
- * different descriptions or tags are not `==`. Code that wants
9216
- * name-only equality should compare [`name`] explicitly.
9359
+ * Labels are identified by [`id`] a stable lowercase `snake_case`
9360
+ * string (`"phone_number"`), never localized, and the catalog key that a
9361
+ * [`LabelRef`] resolves through. Selectors match by id. Derived equality
9362
+ * is *structural*: two labels with the same id but different
9363
+ * localizations or tags are not `==`; compare [`id`] for identity.
9364
+ *
9365
+ * # Localization
9366
+ *
9367
+ * The display name and description are localized per [`LanguageTag`].
9368
+ * English (`"en"`) is required at construction and is the fallback when a
9369
+ * requested locale is absent, so [`localization`] always returns some
9370
+ * text — NER and LLM read the analysis language's name and description to
9371
+ * prompt the model, keyed by the stable id.
9372
+ *
9373
+ * # Tags
9374
+ *
9375
+ * [`tags`] is a free-form list of short identifiers policy selectors can
9376
+ * match against. Built-in labels carry category tags (`personal_identity`,
9377
+ * `contact_info`, `financial`, …) plus cross-cutting tags where applicable
9378
+ * (`pii`, `phi`, `pci`). Custom labels can ship with zero tags.
9379
+ *
9380
+ * [`id`]: Label::id
9381
+ * [`localization`]: Label::localization
9382
+ * [`tags`]: Label::tags
9383
+ */
9384
+ Label: {
9385
+ id: string;
9386
+ localizations: components["schemas"]["LocalizedText"];
9387
+ tags: string[];
9388
+ };
9389
+ /**
9390
+ * @description One entry inside a [`TableRule`]: the label to match plus the
9391
+ * per-modality operators to run.
9392
+ *
9393
+ * Kept as a named struct rather than a `(LabelRef, ModalityRedactions)`
9394
+ * tuple so the wire JSON reads `{"label": "email", "action": {…}}`
9395
+ * instead of a positional pair.
9396
+ */
9397
+ LabelEntry: {
9398
+ /** @description Per-modality operators to run for matching entities. */
9399
+ action: components["schemas"]["ModalityRedactions"];
9400
+ /** @description Label the entry matches on. */
9401
+ label: components["schemas"]["LabelRef"];
9402
+ };
9403
+ /**
9404
+ * @description Named cluster of [`LabelRef`]s a policy's rules can reference
9405
+ * by name via [`Predicate::LabelInGroup`].
9406
+ *
9407
+ * Groups live on the [`PolicyDefinition`] that declares them
9408
+ * and are visible only to that policy's own rules. Templates
9409
+ * ship one group per canonical label list (`"hipaa_18"`,
9410
+ * `"gdpr_article_9"`, `"pci_chd"`, `"pci_sad"`), and every
9411
+ * rule that targets that list references the group by name
9412
+ * instead of respelling the labels. When elide adds a new label
9413
+ * to a category, extending the group covers every rule that
9414
+ * referenced it — no rule edit.
9415
+ *
9416
+ * **Compilation**: at request time the engine synthesises a
9417
+ * `group:<policy_id>:<name>` tag on every label listed in the
9418
+ * group, then rewrites [`Predicate::LabelInGroup { group }`]
9419
+ * into [`Predicate::TagOneOf { tags: ["group:<policy_id>:<name>"] }`].
9420
+ * That routes through the same `Anonymizer::with_tag` fast
9421
+ * path as any authored tag — no new engine machinery, no
9422
+ * per-request walk over group membership. Scoping the tag by
9423
+ * `policy_id` keeps two policies that both declare `hipaa_18`
9424
+ * with different labelsets from stepping on each other.
9217
9425
  *
9218
- * # Tags
9426
+ * **Unknown group names error at request validation**, not at
9427
+ * apply time. A typo doesn't silently underfire.
9219
9428
  *
9220
- * [`tags`] is a free-form list of short identifiers policy selectors
9221
- * can match against. Built-in labels carry category tags
9222
- * (`personal_identity`, `contact_info`, `financial`, …) plus
9223
- * cross-cutting tags where applicable (`pii`, `phi`, `pci`). Custom
9224
- * labels can ship with zero tags.
9429
+ * [`PolicyDefinition`]: super::PolicyDefinition
9430
+ * [`Predicate::LabelInGroup`]: super::predicate::Predicate::LabelInGroup
9431
+ * [`Predicate::LabelInGroup { group }`]: super::predicate::Predicate::LabelInGroup
9432
+ * [`Predicate::TagOneOf { tags: ["group:<policy_id>:<name>"] }`]: super::predicate::Predicate::TagOneOf
9433
+ */
9434
+ LabelGroup: {
9435
+ /** @description Optional description for reviewers. */
9436
+ description?: string;
9437
+ /**
9438
+ * @description Labels this group covers, by ref.
9439
+ *
9440
+ * A label that doesn't appear in the request's compiled
9441
+ * [`LabelCatalog`] is silently skipped at tag-synthesis time
9442
+ * — a group can safely list labels the current build
9443
+ * doesn't emit (e.g. modality-gated ones); rules keyed off
9444
+ * the group still fire on whatever labels *are* present.
9445
+ *
9446
+ * [`LabelCatalog`]: elide_core::entity::LabelCatalog
9447
+ */
9448
+ labels: components["schemas"]["LabelRef"][];
9449
+ /**
9450
+ * @description Stable name a [`Predicate::LabelInGroup`] references.
9451
+ *
9452
+ * Free-form; a policy layer picks the vocabulary. Recommend
9453
+ * snake_case identifiers (`hipaa_18`, `gdpr_article_9`) —
9454
+ * they compile to `group:hipaa_18` tags on the catalog and
9455
+ * read cleanly in audit provenance.
9456
+ *
9457
+ * [`Predicate::LabelInGroup`]: super::predicate::Predicate::LabelInGroup
9458
+ */
9459
+ name: string;
9460
+ };
9461
+ /**
9462
+ * @description A label's human-facing text in one language: a display name and an
9463
+ * optional fuller description.
9225
9464
  *
9226
- * [`name`]: Label::name
9227
- * [`tags`]: Label::tags
9465
+ * The `name` is a short, natural-language phrase (`"phone number"`) — the
9466
+ * label a zero-shot NER model like GLiNER matches on, and the primary
9467
+ * text an LLM prompt shows. The `description` is optional extra guidance
9468
+ * for backends that consume it (GLiNER-2.0's bi-encoder, an LLM); leave
9469
+ * it `None` when the name alone is clear.
9228
9470
  */
9229
- Label: {
9471
+ LabelLocale: {
9472
+ /**
9473
+ * @description Optional fuller description, for description-capable backends
9474
+ * (GLiNER-2.0, LLM). `None` when the name suffices.
9475
+ */
9230
9476
  description?: string;
9477
+ /**
9478
+ * @description Short natural-language display name (e.g. `"phone number"`). What a
9479
+ * zero-shot NER model matches on and an LLM prompt surfaces.
9480
+ */
9231
9481
  name: string;
9232
- tags: string[];
9233
9482
  };
9234
9483
  /**
9235
- * @description Registry of [`Label`]s, keyed by name.
9484
+ * @description Lightweight reference to a [`Label`], carrying only its id.
9236
9485
  *
9237
- * Holds the authoritative definitions (names + descriptions) for a run.
9238
- * A [`LabelRef`] carried on a detection or entity is resolved back to
9239
- * its full [`Label`] with [`get`].
9486
+ * This is what detections and entities hold: cloning is cheap (short
9487
+ * ids inline into the [`HipStr`]), and the full [`Label`], with its
9488
+ * localized names and descriptions, is resolved on demand from a
9489
+ * [`LabelCatalog`].
9240
9490
  *
9241
- * [`get`]: LabelCatalog::get
9491
+ * [`Label`]: crate::entity::Label
9492
+ * [`LabelCatalog`]: crate::entity::LabelCatalog
9242
9493
  */
9243
- LabelCatalog: {
9244
- [key: string]: components["schemas"]["Label"];
9245
- };
9494
+ LabelRef: string;
9246
9495
  /**
9247
- * @description Per-request label-catalog selection.
9496
+ * @description Per-policy label-catalog selection.
9248
9497
  *
9249
9498
  * Picks builtins by name + adds inline custom schemas.
9250
9499
  */
9251
- LabelCatalogParams: {
9500
+ Labels: {
9252
9501
  /**
9253
9502
  * @description Builtin label names to enable.
9254
9503
  *
9255
9504
  * E.g. `"email_address"`, `"phone_number"`. Unknown names
9256
9505
  * log a warning and are skipped.
9257
9506
  */
9258
- builtins?: string[];
9507
+ builtins?: components["schemas"]["LabelRef"][];
9259
9508
  /** @description Custom labels defined inline by the caller. */
9260
9509
  custom?: components["schemas"]["Label"][];
9261
9510
  };
9262
- /**
9263
- * @description Lightweight reference to a [`Label`], carrying only its name.
9264
- *
9265
- * This is what detections and entities hold: cloning is cheap (short
9266
- * names inline into the [`HipStr`]), and the full [`Label`], with its
9267
- * description, is resolved on demand from a [`LabelCatalog`].
9268
- *
9269
- * [`Label`]: crate::entity::Label
9270
- * [`LabelCatalog`]: crate::entity::LabelCatalog
9271
- */
9272
- LabelRef: string;
9273
9511
  /**
9274
9512
  * @description Single language detection result.
9275
9513
  *
@@ -9389,6 +9627,28 @@ interface components {
9389
9627
  /** @description Sort by field. */
9390
9628
  sortBy?: components["schemas"]["MemberSortField"];
9391
9629
  };
9630
+ /**
9631
+ * @description A value localized per [`LanguageTag`], with an English-first fallback.
9632
+ *
9633
+ * The reusable mechanism behind any text that varies by language: a
9634
+ * [`Label`]'s display name and description, a redaction operator's bucket
9635
+ * label, and so on. English (`"en"`) is the conventional anchor —
9636
+ * constructors seed it, and [`resolve`] falls back to it (then to any
9637
+ * entry) when a requested locale is absent, so a caller that supplied
9638
+ * English always gets *some* value.
9639
+ *
9640
+ * Generic over the stored value `T`, so it carries a bare `HipStr`
9641
+ * (a bucket label) or a richer struct (a label's name-plus-description)
9642
+ * equally. It is a thin wrapper over a `HashMap<LanguageTag, T>`; the
9643
+ * added value is the fallback policy in [`resolve`], kept in one place
9644
+ * rather than reimplemented at each use site.
9645
+ *
9646
+ * [`Label`]: crate::entity::Label
9647
+ * [`resolve`]: LocalizedText::resolve
9648
+ */
9649
+ LocalizedText: {
9650
+ [key: string]: components["schemas"]["LabelLocale"];
9651
+ };
9392
9652
  /** @description Request payload for login. */
9393
9653
  Login: {
9394
9654
  /** @description Email address or username of the account. */
@@ -9677,16 +9937,19 @@ interface components {
9677
9937
  /**
9678
9938
  * @description A pipeline's detection + governance intent.
9679
9939
  *
9680
- * Holds what a pipeline author decides — which recognizers to run, the entity
9681
- * labels, the default scope, and the policies to apply. Infrastructure config
9682
- * (enrichment backends, deduplication calibration) is server-wide and lives in
9683
- * the engine config, not here. Stored as JSON in the pipeline's `definition`
9684
- * column but validated against this schema at the API boundary.
9940
+ * Holds what a pipeline author decides — which recognizers to run, the default
9941
+ * scope, and the policies to apply. Infrastructure config (enrichment backends,
9942
+ * deduplication calibration) is server-wide and lives in the engine config, not
9943
+ * here. Stored as JSON in the pipeline's `definition` column but validated
9944
+ * against this schema at the API boundary.
9945
+ *
9946
+ * The label catalog is not part of this: the policies own the label vocabulary,
9947
+ * and the engine derives the detection catalog from them at run time.
9685
9948
  *
9686
9949
  * The split:
9687
9950
  *
9688
- * - `recognizers` / `deduplication` / `label_catalog` — the detection intent,
9689
- * merged with the server-wide engine defaults into an `AnalyzerParams`.
9951
+ * - `recognizers` / `deduplication` — the detection intent, merged with the
9952
+ * server-wide engine defaults into an `AnalyzerParams`.
9690
9953
  * - `default_scope` — optional pipeline-wide scope a document may override.
9691
9954
  * - `policy_slugs` — references to the workspace's policies, resolved at run
9692
9955
  * time.
@@ -9704,14 +9967,6 @@ interface components {
9704
9967
  * the document must assert its own.
9705
9968
  */
9706
9969
  defaultScope?: components["schemas"]["ScopeParams"];
9707
- /**
9708
- * @description Entity-label catalog: which entity types the recognizers emit.
9709
- *
9710
- * Reusable across the pipeline's documents, so it lives here rather than in
9711
- * per-document scope.
9712
- * @default {}
9713
- */
9714
- labelCatalog: components["schemas"]["LabelCatalogParams"];
9715
9970
  /**
9716
9971
  * @description Slugs of workspace policies applied at redaction.
9717
9972
  *
@@ -9924,27 +10179,40 @@ interface components {
9924
10179
  * fallback per policy" at the type level.
9925
10180
  */
9926
10181
  fallback?: components["schemas"]["ModalityRedactions"];
10182
+ /**
10183
+ * @description Named clusters of [`LabelRef`]s this policy's rules may
10184
+ * reference by name via [`Predicate::LabelInGroup`]. Scoped
10185
+ * to this policy — a rule can only name a group its own
10186
+ * policy declared; unknown references error at request
10187
+ * validation. Two policies that both declare `hipaa_18` with
10188
+ * different labelsets stay independent.
10189
+ *
10190
+ * [`LabelRef`]: elide_core::entity::LabelRef
10191
+ * [`Predicate::LabelInGroup`]: predicate::Predicate::LabelInGroup
10192
+ */
10193
+ groups?: components["schemas"]["LabelGroup"][];
9927
10194
  /**
9928
10195
  * Format: uuid
9929
10196
  * @description Stable identifier. UUIDv7 recommended (time-ordered);
9930
10197
  * customer-supplied so re-submissions carry the same id.
9931
10198
  * Engine stamps this into the redaction event's
9932
- * [`Attribution::policy_id`] so reviewers can find this
9933
- * policy from any redaction it drove.
10199
+ * [`Attribution::name`] so reviewers can find this policy
10200
+ * from any redaction it drove.
9934
10201
  *
9935
- * [`Attribution::policy_id`]: elide_core::entity::provenance::Attribution::policy_id
10202
+ * [`Attribution::name`]: elide_core::entity::provenance::Attribution::name
9936
10203
  */
9937
10204
  id: string;
9938
10205
  /**
9939
- * @description Vocabulary the policy operates over. Engine unions every
9940
- * submitted policy's `labels` into a per-request
10206
+ * @description Vocabulary the policy operates over: builtins picked by
10207
+ * name plus caller-authored custom label schemas. Engine
10208
+ * unions every submitted policy's `labels` into a per-request
9941
10209
  * [`LabelCatalog`] used to drive recognizer dispatch and
9942
10210
  * tag-based [`Predicate::TagOneOf`] matching.
9943
10211
  *
9944
10212
  * [`LabelCatalog`]: elide_core::entity::LabelCatalog
9945
10213
  * [`Predicate::TagOneOf`]: predicate::Predicate::TagOneOf
9946
10214
  */
9947
- labels?: components["schemas"]["Label"][];
10215
+ labels?: components["schemas"]["Labels"];
9948
10216
  /** @description Human-readable name. Display-only. Does not key anything. */
9949
10217
  name: string;
9950
10218
  /** @description Lifecycle rules for content under this policy. */
@@ -9971,41 +10239,16 @@ interface components {
9971
10239
  policySlug: string;
9972
10240
  };
9973
10241
  /**
9974
- * @description One rule inside a [`PolicyDefinition`]. Identity is the UUID; `name` /
9975
- * `description` are display-only.
10242
+ * @description One rule inside a [`PolicyDefinition`]. Identity is the UUID;
10243
+ * `name` / `description` are display-only.
10244
+ *
10245
+ * Untagged on the wire: distinguished by the presence of
10246
+ * `predicate` (predicated) vs. `operators` (table). Existing
10247
+ * JSON keeps working.
9976
10248
  *
9977
10249
  * [`PolicyDefinition`]: super::PolicyDefinition
9978
10250
  */
9979
- PolicyRule: {
9980
- /**
9981
- * @description Per-modality redaction operators applied when the
9982
- * predicate matches. Modalities the rule doesn't cover fall
9983
- * through to the policy fallback (or the next policy in the
9984
- * chain).
9985
- */
9986
- action: components["schemas"]["ModalityRedactions"];
9987
- /** @description Optional description for reviewers. */
9988
- description?: string;
9989
- /**
9990
- * Format: uuid
9991
- * @description Stable identifier. UUIDv7 recommended (time-ordered);
9992
- * customer-supplied so re-submissions carry the same id.
9993
- * Engine stamps this into the redaction event's
9994
- * [`Attribution::reason`] so reviewers can trace back which
9995
- * rule fired.
9996
- *
9997
- * [`Attribution::reason`]: elide_core::entity::provenance::Attribution::reason
9998
- */
9999
- id: string;
10000
- /** @description Human-readable name. Display-only. Does not key anything. */
10001
- name: string;
10002
- /**
10003
- * @description Entity-level predicate that decides whether the rule fires
10004
- * on a given recognised entity. Composable; see
10005
- * [`Predicate`] for the full grammar.
10006
- */
10007
- predicate: components["schemas"]["Predicate"];
10008
- };
10251
+ PolicyRule: components["schemas"]["PredicatedRule"] | components["schemas"]["TableRule"];
10009
10252
  /**
10010
10253
  * @description Lightweight policy view for lists.
10011
10254
  *
@@ -10053,6 +10296,17 @@ interface components {
10053
10296
  */
10054
10297
  total?: number;
10055
10298
  };
10299
+ /**
10300
+ * @description A regulatory posture this crate ships a [`Template`] for.
10301
+ *
10302
+ * Serialises as a snake_case string matching the produced
10303
+ * template's [`Template::id`] (`"hipaa_safe_harbor"`,
10304
+ * `"gdpr_article_9"`, ...) so a wire caller can round-trip
10305
+ * `template: "hipaa_safe_harbor"` through JSON directly into
10306
+ * a variant. Iterate every variant via `PolicyTemplate::iter()`
10307
+ * (from [`strum::IntoEnumIterator`]).
10308
+ */
10309
+ PolicyTemplate: "hipaa_safe_harbor" | "gdpr_article9" | "pci_dss_pan_truncate" | "pci_dss_pan_hmac" | "ccpa";
10056
10310
  /**
10057
10311
  * @description Closed polygon, given by its ordered vertices.
10058
10312
  *
@@ -10078,12 +10332,21 @@ interface components {
10078
10332
  /** @constant */
10079
10333
  kind: "labelOneOf";
10080
10334
  /** @description Allowed labels. */
10081
- labels: string[];
10335
+ labels: components["schemas"]["LabelRef"][];
10082
10336
  } | {
10083
10337
  /** @constant */
10084
10338
  kind: "tagOneOf";
10085
10339
  /** @description Allowed tags. */
10086
10340
  tags: string[];
10341
+ } | {
10342
+ /**
10343
+ * @description Name of the [`LabelGroup`] to match against.
10344
+ *
10345
+ * [`LabelGroup`]: super::LabelGroup
10346
+ */
10347
+ group: string;
10348
+ /** @constant */
10349
+ kind: "labelInGroup";
10087
10350
  } | {
10088
10351
  /** @description Cluster id to match. */
10089
10352
  coref: string;
@@ -10105,6 +10368,31 @@ interface components {
10105
10368
  /** @description Negated predicate. */
10106
10369
  not: components["schemas"]["Predicate"];
10107
10370
  };
10371
+ /** @description Predicate-gated rule: one predicate, one action. */
10372
+ PredicatedRule: {
10373
+ /**
10374
+ * @description Per-modality redaction operators applied when the
10375
+ * predicate matches. Modalities the rule doesn't cover fall
10376
+ * through to the policy fallback (or the next policy in the
10377
+ * chain).
10378
+ */
10379
+ action: components["schemas"]["ModalityRedactions"];
10380
+ /** @description Optional description for reviewers. */
10381
+ description?: string;
10382
+ /**
10383
+ * Format: uuid
10384
+ * @description Stable identifier. UUIDv7 recommended.
10385
+ */
10386
+ id: string;
10387
+ /** @description Human-readable name. Display-only. */
10388
+ name: string;
10389
+ /**
10390
+ * @description Entity-level predicate that decides whether the rule fires
10391
+ * on a given recognised entity. Composable; see
10392
+ * [`Predicate`] for the full grammar.
10393
+ */
10394
+ predicate: components["schemas"]["Predicate"];
10395
+ };
10108
10396
  /**
10109
10397
  * @description How to pick recognizers out of a deployment-configured lineup.
10110
10398
  *
@@ -10143,38 +10431,6 @@ interface components {
10143
10431
  /** Format: uint */
10144
10432
  start: number;
10145
10433
  };
10146
- /**
10147
- * @description A modality-tagged group of recognized entities.
10148
- *
10149
- * The unit [`AnalyzedDocument`] stores in `body` and in every
10150
- * `parts` entry.
10151
- *
10152
- * Tagged by `modality` (snake_case) so deserialization picks the
10153
- * right variant and the entity vec inside is statically typed
10154
- * per modality — apply-time we hand each variant back to elide
10155
- * as a `Vec<Entity<M>>` for the appropriate `M`.
10156
- */
10157
- RecognizedGroup: {
10158
- /** @description Recognized entities, in source-coordinate order. */
10159
- entities: components["schemas"]["TextEntityRecord"][];
10160
- /** @constant */
10161
- modality: "text";
10162
- } | {
10163
- /** @description Recognized entities, in source-coordinate order. */
10164
- entities: components["schemas"]["TabularEntityRecord"][];
10165
- /** @constant */
10166
- modality: "tabular";
10167
- } | {
10168
- /** @description Recognized entities, in source-coordinate order. */
10169
- entities: components["schemas"]["ImageEntityRecord"][];
10170
- /** @constant */
10171
- modality: "image";
10172
- } | {
10173
- /** @description Recognized entities, in source-coordinate order. */
10174
- entities: components["schemas"]["AudioEntityRecord"][];
10175
- /** @constant */
10176
- modality: "audio";
10177
- };
10178
10434
  /**
10179
10435
  * @description Recognizer slots an analyzer can fill.
10180
10436
  *
@@ -10248,6 +10504,38 @@ interface components {
10248
10504
  };
10249
10505
  /** @description What class of data a retention policy applies to. */
10250
10506
  RetentionScope: "original_content" | "redacted_output" | "audit_logs";
10507
+ /**
10508
+ * @description A reviewer-supplied redaction override with the policy
10509
+ * authority it draws from.
10510
+ *
10511
+ * The `policy_id` isn't just for audit — it also picks which
10512
+ * per-policy pseudonym vault and per-policy [`KeyProvider`] the
10513
+ * override's operator resolves against, so an override using
10514
+ * [`Pseudonymize`] or [`HmacHash`] stays consistent with the
10515
+ * authoring policy's other rules.
10516
+ *
10517
+ * [`KeyProvider`]: elide::redaction::operators::KeyProvider
10518
+ * [`Pseudonymize`]: elide::redaction::operators::Pseudonymize
10519
+ * [`HmacHash`]: elide::redaction::operators::HmacHash
10520
+ */
10521
+ Review: {
10522
+ /**
10523
+ * @description The per-modality redaction operators to run for this
10524
+ * entity. Overrides whatever the policy set would have
10525
+ * picked for the same entity.
10526
+ */
10527
+ action: components["schemas"]["ModalityRedactions"];
10528
+ /**
10529
+ * Format: uuid
10530
+ * @description The policy whose authority the reviewer exercises. Must
10531
+ * match the `id` of a [`PolicyDefinition`] submitted with
10532
+ * the anonymize request. The audit event stamps this UUID
10533
+ * as the attribution `name`.
10534
+ *
10535
+ * [`PolicyDefinition`]: nvisy_schema::policy::PolicyDefinition
10536
+ */
10537
+ policyId: string;
10538
+ };
10251
10539
  /**
10252
10540
  * @description A serializable summary of *which selection rule* bound an operator to an
10253
10541
  * entity — the automatic "why" behind a redaction.
@@ -10315,7 +10603,7 @@ interface components {
10315
10603
  * analyzer, which borrows it into a fresh [`RecognizerContext`] per
10316
10604
  * payload. It holds only what the *caller* asserts about the analysis as a
10317
10605
  * whole — languages, jurisdictions, document labels, the target catalog, a
10318
- * correlation id — none of which depends on the medium, so one `Scope`
10606
+ * correlation id — none of which depends on the medium, so one [`Scope`]
10319
10607
  * drives a text, image, or audio analysis alike.
10320
10608
  *
10321
10609
  * Per-medium regions (caller-supplied inclusions and exclusions, which are
@@ -10325,40 +10613,42 @@ interface components {
10325
10613
  *
10326
10614
  * [`RecognizerContext`]: super::RecognizerContext
10327
10615
  * [`Annotations`]: super::annotation::Annotations
10328
- */
10329
- Scope: {
10330
- /**
10331
- * @description The entity types recognizers are asked to emit. A zero-shot NER
10332
- * model requests exactly this set; an LLM prompt lists it as the
10333
- * labels to find. Empty means "the recognizer's own default" a
10334
- * recognizer with its own configured label set keeps it; one without
10335
- * emits whatever its backend natively produces.
10336
- * @default {}
10337
- */
10338
- catalog: components["schemas"]["LabelCatalog"];
10339
- /**
10340
- * Format: uuid
10341
- * @description Correlation UUID propagated through the tracing span for this
10342
- * analysis.
10343
- * @default null
10344
- */
10345
- correlation_id: string;
10346
- /**
10347
- * @description Caller-asserted jurisdictions. When non-empty, recognizers that
10348
- * carry per-rule country scopes skip rules that match none of them.
10349
- * An empty list means "any": rules that declare countries still run
10350
- * as a permissive fallback so callers who don't assert a jurisdiction
10351
- * don't lose detections. A document spanning several jurisdictions
10352
- * can assert all of them; a rule runs when any one matches.
10616
+ * Free-form, caller-asserted request context: the *document* it is about and
10617
+ * the *request* driving it.
10618
+ *
10619
+ * Three axes of opaque classification strings elide neither ships nor
10620
+ * interprets a downstream policy layer chooses what `"medical"` or
10621
+ * `"fraud_detection"` or `"auditor"` mean. They are read in two places: a
10622
+ * recognizer may bias its detection on them (the LLM prompt lists them so the
10623
+ * model attends to the right terms), and a scope-aware operator predicate may
10624
+ * branch on them at selection time (redact the same document differently per
10625
+ * [`audience`]).
10626
+ *
10627
+ * - [`tags`] classify the *document* (`"medical"`, `"gdpr-request"`).
10628
+ * - [`purpose`] is why the request exists (`"fraud_detection"`).
10629
+ * - [`audience`] is who the redacted output is for (`"support_agent"`,
10630
+ * `"auditor"`) — the axis PCI-style "same document, two masks" branches on.
10631
+ *
10632
+ * [`tags`]: Self::tags
10633
+ * [`purpose`]: Self::purpose
10634
+ * [`audience`]: Self::audience
10635
+ */
10636
+ ScopeMetadata: {
10637
+ /**
10638
+ * @description Who the redacted output is for (e.g. `"support_agent"`, `"auditor"`).
10639
+ * The axis a per-audience redaction branches on: one detected document,
10640
+ * selected differently per audience. May hold several.
10353
10641
  * @default []
10354
10642
  */
10355
- countries: components["schemas"]["CountryCode"][];
10643
+ audience: string[];
10356
10644
  /**
10357
- * @description Caller-asserted languages for the analysis. Empty means the caller
10358
- * asserted none, leaving detection (if an enricher runs) to fill in.
10359
- * @default []
10645
+ * @description The caller-asserted business purpose driving this request (e.g.
10646
+ * `"fraud_detection"`, `"gdpr_erasure_request"`). A scope-aware operator
10647
+ * predicate may skip or swap a rule based on it; a recognizer may bias
10648
+ * detection on it. `None` when the caller asserts no purpose.
10649
+ * @default null
10360
10650
  */
10361
- languages: components["schemas"]["Languages"];
10651
+ purpose: string;
10362
10652
  /**
10363
10653
  * @description Document-level classification tags (e.g. `"medical"`,
10364
10654
  * `"gdpr-request"`). Recognizers may use these to bias their behavior
@@ -10366,9 +10656,9 @@ interface components {
10366
10656
  *
10367
10657
  * Named `tags`, not `labels`, to keep "label" reserved for the entity
10368
10658
  * taxonomy ([`LabelRef`]/[`LabelCatalog`]): these classify the
10369
- * *document*, whereas [`catalog`] names the entity *types* to emit.
10659
+ * *document*, whereas the scope's catalog names the entity *types* to
10660
+ * emit.
10370
10661
  *
10371
- * [`catalog`]: Self::catalog
10372
10662
  * [`LabelRef`]: crate::entity::LabelRef
10373
10663
  * [`LabelCatalog`]: crate::entity::LabelCatalog
10374
10664
  * @default []
@@ -10378,10 +10668,12 @@ interface components {
10378
10668
  /**
10379
10669
  * @description Caller-asserted scope for one request.
10380
10670
  *
10381
- * Mirrors the wire-visible knobs of `elide::recognition::Scope`.
10382
- * The engine assembles this plus a server-minted
10383
- * `correlation_id` into the orchestrator's `Scope` at compile
10384
- * time.
10671
+ * A narrower wire projection of `elide::recognition::Scope`:
10672
+ * `languages` and `countries` (typed, elide-native), plus
10673
+ * elide's [`ScopeMetadata`] block for free-form classification
10674
+ * strings (`tags`, `purpose`, `audience`). The engine assembles
10675
+ * this plus a server-minted `correlation_id` and a policy-derived
10676
+ * label catalog into the orchestrator's `Scope` at compile time.
10385
10677
  */
10386
10678
  ScopeParams: {
10387
10679
  /**
@@ -10394,17 +10686,6 @@ interface components {
10394
10686
  * jurisdiction don't lose detections.
10395
10687
  */
10396
10688
  countries?: components["schemas"]["CountryCode"][];
10397
- /**
10398
- * @description Per-request entity-label catalog.
10399
- *
10400
- * Builtins selected by name + custom inline schemas. Drives
10401
- * what recognizers are asked to emit and tag-based selector
10402
- * matching in the anonymizer. Engine resolves this into the
10403
- * assembled `elide::recognition::Scope`'s `catalog` field at
10404
- * compile time.
10405
- * @default {}
10406
- */
10407
- labelCatalog: components["schemas"]["LabelCatalogParams"];
10408
10689
  /**
10409
10690
  * @description Caller-asserted languages for the analysis.
10410
10691
  *
@@ -10414,20 +10695,22 @@ interface components {
10414
10695
  */
10415
10696
  languages: components["schemas"]["Languages"];
10416
10697
  /**
10417
- * @description Document-level classification tags.
10418
- *
10419
- * E.g. `"medical"`, `"gdpr-request"`. Recognizers may use
10420
- * these to bias their behaviour for domain-specific terms;
10421
- * those that don't ignore the field.
10422
- *
10423
- * Distinct from [`label_catalog`]: tags classify the
10424
- * *document*, whereas the catalog names the entity *types*
10425
- * to emit.
10426
- *
10427
- * [`label_catalog`]: ScopeParams::label_catalog
10698
+ * @description Free-form request context: document tags, request purpose,
10699
+ * output audience. See elide's [`ScopeMetadata`].
10428
10700
  */
10429
- tags?: string[];
10701
+ metadata?: components["schemas"]["ScopeMetadata"];
10430
10702
  };
10703
+ /**
10704
+ * @description Which SHA-2 variant a hashing operator uses.
10705
+ *
10706
+ * Shared by [`Sha2Hash`] (unkeyed digest) and [`HmacHash`] (keyed HMAC):
10707
+ * both pick the same underlying width, so the choice lives in one enum
10708
+ * rather than one per operator.
10709
+ *
10710
+ * [`Sha2Hash`]: super::Sha2Hash
10711
+ * [`HmacHash`]: super::HmacHash
10712
+ */
10713
+ Sha2Algorithm: "sha256" | "sha512";
10431
10714
  /** @description Request payload for signup. */
10432
10715
  Signup: {
10433
10716
  /** @description Optional display name of the account. */
@@ -10504,6 +10787,42 @@ interface components {
10504
10787
  * to track whether a run was manually triggered, scheduled, or triggered by a webhook.
10505
10788
  */
10506
10789
  SyncTriggerType: "manual" | "scheduled" | "webhook";
10790
+ /**
10791
+ * @description Per-label table rule: N labels, N actions, one shared identity.
10792
+ *
10793
+ * Each entry compiles to an elide `Rule::label` attachment under
10794
+ * this rule's shared UUID / name / description — so the audit
10795
+ * trail records "rule X fired" without exposing the fan-out to
10796
+ * the reviewer. Meant for templates where a single policy intent
10797
+ * (e.g. "HIPAA Safe Harbor identifiers") routes different labels
10798
+ * to different operators.
10799
+ */
10800
+ TableRule: {
10801
+ /** @description Optional description for reviewers. */
10802
+ description?: string;
10803
+ /**
10804
+ * Format: uuid
10805
+ * @description Stable identifier — shared by every entry the table
10806
+ * expands into. UUIDv7 recommended.
10807
+ */
10808
+ id: string;
10809
+ /** @description Human-readable name. Display-only. */
10810
+ name: string;
10811
+ /**
10812
+ * @description Per-label operator dispatch. Every entity whose label
10813
+ * matches a listed [`LabelRef`] attaches the paired
10814
+ * [`ModalityRedactions`]. Labels absent from the list are not
10815
+ * affected by this rule and fall through to the next rule or
10816
+ * the policy fallback.
10817
+ *
10818
+ * A [`Vec`] rather than a map keeps the author-supplied
10819
+ * order — elide's anonymizer is first-match-wins, so wire
10820
+ * order determines which entry fires when two match the
10821
+ * same entity. Duplicate labels are the caller's bug; the
10822
+ * engine attaches every entry, and the first one wins.
10823
+ */
10824
+ operators: components["schemas"]["LabelEntry"][];
10825
+ };
10507
10826
  /**
10508
10827
  * @description Detected piece of sensitive information within some medium.
10509
10828
  *
@@ -10589,12 +10908,17 @@ interface components {
10589
10908
  /** @description The elide entity, as recognition produced it. */
10590
10909
  entity: components["schemas"]["TabularEntity"];
10591
10910
  /**
10592
- * @description Reviewer-supplied override.
10911
+ * @description Reviewer-supplied redaction override.
10593
10912
  *
10594
- * `None` means "use the policy's decision"; `Some(action)`
10595
- * overrides it for this specific entity at apply time.
10913
+ * `None` means "use the matching policy rule's decision";
10914
+ * `Some(...)` overrides that rule for this specific entity
10915
+ * at apply time. Reviewer overrides take precedence over
10916
+ * every policy rule and inherit the authority of the
10917
+ * [`Review::policy_id`] they name — the audit event's
10918
+ * attribution stamps that policy so the trail names the
10919
+ * authority under which the override fired.
10596
10920
  */
10597
- reviewerOverride?: components["schemas"]["ModalityRedactions"];
10921
+ review?: components["schemas"]["Review"];
10598
10922
  };
10599
10923
  /**
10600
10924
  * @description One thing that happened to an entity, with its effect on confidence.
@@ -10846,6 +11170,57 @@ interface components {
10846
11170
  /** @constant */
10847
11171
  kind: "drop_column";
10848
11172
  };
11173
+ /**
11174
+ * @description Fallback operator that runs when a declinable primary
11175
+ * ([`TextRedaction::Clamp`], [`TextRedaction::GeneralizeDate`])
11176
+ * doesn't apply to the entity value.
11177
+ *
11178
+ * The four operators that always apply and produce a deterministic
11179
+ * output without needing engine-side infrastructure (no key
11180
+ * provider, no vault). Enough to satisfy every regulatory
11181
+ * pattern I know: `Clamp/GeneralizeDate → Erase` (the safe
11182
+ * default), `→ Replace { template }` (an explicit placeholder),
11183
+ * or `→ Mask` / `→ Keep` on the rare occasion those fit.
11184
+ *
11185
+ * Absent from the primary's spec, elide's baked-in default is
11186
+ * [`Erase`] — a bare [`TextRedaction::Clamp`] without a `fallback`
11187
+ * erases values that aren't numeric.
11188
+ *
11189
+ * [`Erase`]: TerminalFallback::Erase
11190
+ */
11191
+ TerminalFallback: {
11192
+ /** @constant */
11193
+ kind: "erase";
11194
+ } | {
11195
+ /** @constant */
11196
+ kind: "keep";
11197
+ } | {
11198
+ /** @constant */
11199
+ kind: "replace";
11200
+ /**
11201
+ * @description Template string. Default `[{label}]`.
11202
+ * @default [{label}]
11203
+ */
11204
+ template: string;
11205
+ } | {
11206
+ /**
11207
+ * Format: uint
11208
+ * @description Characters to leave unmasked at the start of the value.
11209
+ */
11210
+ keep_prefix?: number;
11211
+ /**
11212
+ * Format: uint
11213
+ * @description Characters to leave unmasked at the end of the value.
11214
+ */
11215
+ keep_suffix?: number;
11216
+ /** @constant */
11217
+ kind: "mask";
11218
+ /**
11219
+ * @description The character that replaces masked positions.
11220
+ * @default *
11221
+ */
11222
+ mask_char: string;
11223
+ };
10849
11224
  /** @description Request payload for testing a webhook. */
10850
11225
  TestWebhook: {
10851
11226
  /**
@@ -10950,12 +11325,17 @@ interface components {
10950
11325
  /** @description The elide entity, as recognition produced it. */
10951
11326
  entity: components["schemas"]["TextEntity"];
10952
11327
  /**
10953
- * @description Reviewer-supplied override.
11328
+ * @description Reviewer-supplied redaction override.
10954
11329
  *
10955
- * `None` means "use the policy's decision"; `Some(action)`
10956
- * overrides it for this specific entity at apply time.
11330
+ * `None` means "use the matching policy rule's decision";
11331
+ * `Some(...)` overrides that rule for this specific entity
11332
+ * at apply time. Reviewer overrides take precedence over
11333
+ * every policy rule and inherit the authority of the
11334
+ * [`Review::policy_id`] they name — the audit event's
11335
+ * attribution stamps that policy so the trail names the
11336
+ * authority under which the override fired.
10957
11337
  */
10958
- reviewerOverride?: components["schemas"]["ModalityRedactions"];
11338
+ review?: components["schemas"]["Review"];
10959
11339
  };
10960
11340
  /**
10961
11341
  * @description One thing that happened to an entity, with its effect on confidence.
@@ -11207,7 +11587,7 @@ interface components {
11207
11587
  * @description SHA-256 (default) or SHA-512.
11208
11588
  * @default sha256
11209
11589
  */
11210
- algorithm: components["schemas"]["HashAlgorithm"];
11590
+ algorithm: components["schemas"]["Sha2Algorithm"];
11211
11591
  /** @constant */
11212
11592
  kind: "hash";
11213
11593
  /** @description Salt prepended to the value before hashing. */
@@ -11243,6 +11623,75 @@ interface components {
11243
11623
  } | {
11244
11624
  /** @constant */
11245
11625
  kind: "encrypt";
11626
+ } | {
11627
+ /**
11628
+ * @description HMAC-SHA-256 (default) or HMAC-SHA-512.
11629
+ * @default sha256
11630
+ */
11631
+ algorithm: components["schemas"]["Sha2Algorithm"];
11632
+ /** @constant */
11633
+ kind: "hmac_hash";
11634
+ } | {
11635
+ /**
11636
+ * Format: uint
11637
+ * @description Characters to keep at the start of the value.
11638
+ */
11639
+ keep_prefix?: number;
11640
+ /**
11641
+ * Format: uint
11642
+ * @description Characters to keep at the end of the value.
11643
+ */
11644
+ keep_suffix?: number;
11645
+ /** @constant */
11646
+ kind: "truncate";
11647
+ } | {
11648
+ /**
11649
+ * Format: double
11650
+ * @description Threshold at or above which values collapse to
11651
+ * `ceiling_bucket`. `None` disables the ceiling.
11652
+ */
11653
+ ceiling?: number;
11654
+ /**
11655
+ * @description Bucket label for values at or above `ceiling`. Required
11656
+ * when `ceiling` is set; ignored otherwise.
11657
+ */
11658
+ ceiling_bucket?: components["schemas"]["ClampBucket"];
11659
+ /**
11660
+ * @description Operator that runs when the entity value isn't a
11661
+ * finite number. `None` erases (elide's default).
11662
+ */
11663
+ fallback?: components["schemas"]["TerminalFallback"];
11664
+ /**
11665
+ * Format: double
11666
+ * @description Threshold at or below which values collapse to
11667
+ * `floor_bucket`. `None` disables the floor.
11668
+ */
11669
+ floor?: number;
11670
+ /**
11671
+ * @description Bucket label for values at or below `floor`. Required
11672
+ * when `floor` is set; ignored otherwise.
11673
+ */
11674
+ floor_bucket?: components["schemas"]["ClampBucket"];
11675
+ /** @constant */
11676
+ kind: "clamp";
11677
+ } | {
11678
+ /**
11679
+ * @description Operator that runs when the entity value isn't a
11680
+ * parseable date. `None` erases (elide's default).
11681
+ */
11682
+ fallback?: components["schemas"]["TerminalFallback"];
11683
+ /**
11684
+ * @description Coarseness of the output. Default `Year`.
11685
+ * @default year
11686
+ */
11687
+ granularity: components["schemas"]["DateGranularity"];
11688
+ /** @constant */
11689
+ kind: "generalize_date";
11690
+ /**
11691
+ * @description Which input convention to accept. Default `Iso`.
11692
+ * @default iso
11693
+ */
11694
+ style: components["schemas"]["DateStyle"];
11246
11695
  };
11247
11696
  /**
11248
11697
  * @description How the structural reconciler picks a winner across labels.
@@ -11571,7 +12020,7 @@ interface components {
11571
12020
  * This enumeration corresponds to the `WEBHOOK_EVENT` PostgreSQL enum and is used
11572
12021
  * to configure which events a webhook should receive notifications for.
11573
12022
  */
11574
- WebhookEvent: "file:created" | "file:updated" | "file:deleted" | "member:added" | "member:deleted" | "member:updated" | "connection:created" | "connection:updated" | "connection:deleted" | "connection:synced" | "connection:desynced";
12023
+ WebhookEvent: "file:created" | "file:updated" | "file:deleted" | "member:added" | "member:deleted" | "member:updated" | "connection:created" | "connection:updated" | "connection:deleted" | "connection:sync.started" | "connection:sync.completed" | "connection:sync.failed" | "pipeline:created" | "pipeline:updated" | "pipeline:deleted" | "pipeline:run.started" | "pipeline:run.completed" | "pipeline:run.failed" | "policy:created" | "policy:updated" | "policy:deleted";
11575
12024
  /** @description Opaque whk identifier (whk_<uuid>). */
11576
12025
  WebhookId: string;
11577
12026
  /**
@@ -11832,6 +12281,34 @@ type PolicyDefinition = Schemas$3["PolicyDefinition"];
11832
12281
  type CreatePolicy = Schemas$3["CreatePolicy"];
11833
12282
  type UpdatePolicy = Schemas$3["UpdatePolicy"];
11834
12283
  type PolicyRule = Schemas$3["PolicyRule"];
12284
+ type PolicyTemplate = Schemas$3["PolicyTemplate"];
12285
+ type PredicatedRule = Schemas$3["PredicatedRule"];
12286
+ type TableRule = Schemas$3["TableRule"];
12287
+ type Predicate = Schemas$3["Predicate"];
12288
+ type DocumentPredicate = Schemas$3["DocumentPredicate"];
12289
+ type ModalityRedactions = Schemas$3["ModalityRedactions"];
12290
+ type TextRedaction = Schemas$3["TextRedaction"];
12291
+ type ImageRedaction = Schemas$3["ImageRedaction"];
12292
+ type AudioRedaction = Schemas$3["AudioRedaction"];
12293
+ type TabularRedaction = Schemas$3["TabularRedaction"];
12294
+ type RetentionPolicy = Schemas$3["RetentionPolicy"];
12295
+ type Retention = Schemas$3["Retention"];
12296
+ type RetentionScope = Schemas$3["RetentionScope"];
12297
+ type Labels = Schemas$3["Labels"];
12298
+ type LabelGroup = Schemas$3["LabelGroup"];
12299
+ type LabelEntry = Schemas$3["LabelEntry"];
12300
+ type LabelLocale = Schemas$3["LabelLocale"];
12301
+ type Label = Schemas$3["Label"];
12302
+ type LocalizedText = Schemas$3["LocalizedText"];
12303
+ type Color = Schemas$3["Color"];
12304
+ type Waveform = Schemas$3["Waveform"];
12305
+ type ClampBucket = Schemas$3["ClampBucket"];
12306
+ type ConfidenceThreshold = Schemas$3["ConfidenceThreshold"];
12307
+ type DateStyle = Schemas$3["DateStyle"];
12308
+ type DateGranularity = Schemas$3["DateGranularity"];
12309
+ type LanguageTag = Schemas$3["LanguageTag"];
12310
+ type Sha2Algorithm = Schemas$3["Sha2Algorithm"];
12311
+ type TerminalFallback = Schemas$3["TerminalFallback"];
11835
12312
  //#endregion
11836
12313
  //#region src/datatypes/run.d.ts
11837
12314
  type Schemas$2 = components["schemas"];
@@ -11839,7 +12316,7 @@ type PipelineRun = Schemas$2["PipelineRun"];
11839
12316
  type CreatePipelineRun = Schemas$2["CreatePipelineRun"];
11840
12317
  type PipelineRunStatus = Schemas$2["PipelineRunStatus"];
11841
12318
  type PipelineRunPage = Schemas$2["PipelineRunPage"];
11842
- type AnalyzedDocument = Schemas$2["AnalyzedDocument"];
12319
+ type Audit = Schemas$2["Audit"];
11843
12320
  type Artifact = Schemas$2["Artifact"];
11844
12321
  //#endregion
11845
12322
  //#region src/datatypes/webhook.d.ts
@@ -11862,5 +12339,5 @@ type UpdateWorkspace = Schemas["UpdateWorkspace"];
11862
12339
  type WorkspaceRole = Schemas["WorkspaceRole"];
11863
12340
  type WorkspacePage = Schemas["WorkspacePage"];
11864
12341
  //#endregion
11865
- export { InviteExpiration as $, UpdateAccount as $t, PipelineDefinition as A, S3Credentials as At, NotificationPage as B, ApiToken as Bt, PolicyDefinition as C, ConnectionPage as Ct, UpdatePolicy as D, ConnectionsQuery as Dt, PolicySummaryPage as E, ConnectionVerification as Et, PipelineTriggerType as F, SyncTriggerType as Ft, Member as G, TokenExpiration as Gt, UnreadStatus as H, ApiTokenType as Ht, UpdatePipeline as I, UpdateConnection as It, UpdateMember as J, ActivityPage as Jt, MemberPage as K, UpdateApiToken as Kt, CursorPagination as L, AuthToken as Lt, PipelineStatus as M, SyncDeletionPolicy as Mt, PipelineSummary as N, SyncMode as Nt, CreatePipeline as O, CreateConnection as Ot, PipelineSummaryPage as P, SyncStatus as Pt, InviteCode as Q, PublicAccount as Qt, Notification as R, Login as Rt, Policy as S, ConnectionConfig as St, PolicySummary as T, ConnectionSyncPage as Tt, UpdateNotificationSettings as U, ApiTokenWithJWT as Ut, NotificationSettings as V, ApiTokenPage as Vt, ListMembers as W, CreateApiToken as Wt, GenerateInviteCode as X, Account as Xt, CreateInvite as Y, ActivityType as Yt, Invite as Z, AccountRef as Zt, CreatePipelineRun as _, UpdateFile as _t, WorkspaceRole as a, ListInvites as at, PipelineRunStatus as b, AzureCredentials as bt, UpdateWebhook as c, ComponentHealth as ct, WebhookEvent as d, File as dt, paths as en, InvitePage as et, WebhookPage as f, FilePage as ft, Artifact as g, ModalityToken as gt, AnalyzedDocument as h, ListFiles as ht, WorkspacePage as i, InviteStatus as it, PipelineFilter as j, SyncConnection as jt, Pipeline as k, GcsCredentials as kt, Webhook as l, Health as lt, WebhookStatus as m, FormatToken as mt, UpdateWorkspace as n, InviteSent as nt, CreateWebhook as o, ReplyInvite as ot, WebhookResult as p, FileSource as pt, MemberSortField as q, Activity as qt, Workspace as r, InviteSortField as rt, TestWebhook as s, SortOrder as st, CreateWorkspace as t, InvitePreview as tt, WebhookCreated as u, HealthStatus as ut, PipelineRun as v, ErrorResponse as vt, PolicyRule as w, ConnectionSync as wt, CreatePolicy as x, Connection as xt, PipelineRunPage as y, ValidationErrorDetail as yt, NotificationEvent as z, Signup as zt };
11866
- //# sourceMappingURL=index-DJSrXmm0.d.ts.map
12342
+ export { TextRedaction as $, ConnectionSyncPage as $t, Label as A, InviteSent as At, PolicyRule as B, FilePage as Bt, Color as C, ActivityType as Cn, CreateInvite as Ct, DateStyle as D, UpdateAccount as Dn, InviteExpiration as Dt, DateGranularity as E, PublicAccount as En, InviteCode as Et, LanguageTag as F, SortOrder as Ft, PredicatedRule as G, UpdateFile as Gt, PolicySummaryPage as H, FormatToken as Ht, LocalizedText as I, ComponentHealth as It, RetentionScope as J, AzureCredentials as Jt, Retention as K, ErrorResponse as Kt, ModalityRedactions as L, Health as Lt, LabelGroup as M, InviteStatus as Mt, LabelLocale as N, ListInvites as Nt, DocumentPredicate as O, paths as On, InvitePage as Ot, Labels as P, ReplyInvite as Pt, TerminalFallback as Q, ConnectionSync as Qt, Policy as R, HealthStatus as Rt, ClampBucket as S, ActivityPage as Sn, UpdateMember as St, CreatePolicy as T, AccountRef as Tn, Invite as Tt, PolicyTemplate as U, ListFiles as Ut, PolicySummary as V, FileSource as Vt, Predicate as W, ModalityToken as Wt, TableRule as X, ConnectionConfig as Xt, Sha2Algorithm as Y, Connection as Yt, TabularRedaction as Z, ConnectionPage as Zt, CreatePipelineRun as _, ApiTokenWithJWT as _n, UpdateNotificationSettings as _t, WorkspaceRole as a, SyncConnection as an, PipelineFilter as at, PipelineRunStatus as b, UpdateApiToken as bn, MemberPage as bt, UpdateWebhook as c, SyncStatus as cn, PipelineSummaryPage as ct, WebhookEvent as d, AuthToken as dn, CursorPagination as dt, ConnectionVerification as en, UpdatePolicy as et, WebhookPage as f, Login as fn, Notification as ft, Audit as g, ApiTokenType as gn, UnreadStatus as gt, Artifact as h, ApiTokenPage as hn, NotificationSettings as ht, WorkspacePage as i, S3Credentials as in, PipelineDefinition as it, LabelEntry as j, InviteSortField as jt, ImageRedaction as k, InvitePreview as kt, Webhook as l, SyncTriggerType as ln, PipelineTriggerType as lt, WebhookStatus as m, ApiToken as mn, NotificationPage as mt, UpdateWorkspace as n, CreateConnection as nn, CreatePipeline as nt, CreateWebhook as o, SyncDeletionPolicy as on, PipelineStatus as ot, WebhookResult as p, Signup as pn, NotificationEvent as pt, RetentionPolicy as q, ValidationErrorDetail as qt, Workspace as r, GcsCredentials as rn, Pipeline as rt, TestWebhook as s, SyncMode as sn, PipelineSummary as st, CreateWorkspace as t, ConnectionsQuery as tn, Waveform as tt, WebhookCreated as u, UpdateConnection as un, UpdatePipeline as ut, PipelineRun as v, CreateApiToken as vn, ListMembers as vt, ConfidenceThreshold as w, Account as wn, GenerateInviteCode as wt, AudioRedaction as x, Activity as xn, MemberSortField as xt, PipelineRunPage as y, TokenExpiration as yn, Member as yt, PolicyDefinition as z, File as zt };
12343
+ //# sourceMappingURL=index-DTr3_MW7.d.ts.map