@cloudpdf/contract 3.0.0-next.1 → 3.0.0-next.2

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.
package/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "CloudPDF Engine API",
5
- "version": "3.0.0-next.1",
5
+ "version": "3.0.0-next.2",
6
6
  "description": "The backend-callable surface of the CloudPDF document engine: deployment and tenant administration plus the document operations (reads, annotations, forms, page operations, redaction, download). Interactive viewing goes through the CloudPDF viewer SDKs, whose session protocol is deliberately not part of this API. Generated from the @cloudpdf/contract operation registry — do not edit by hand.",
7
7
  "license": {
8
8
  "name": "Apache-2.0",
@@ -15,6 +15,7 @@
15
15
  "operationId": "deployment.licenseStatus",
16
16
  "x-fern-sdk-group-name": ["deployment"],
17
17
  "x-fern-sdk-method-name": "licenseStatus",
18
+ "x-docs-title": "License status",
18
19
  "summary": "License decision plus usage-reporting and meter snapshots for this deployment.",
19
20
  "security": [
20
21
  {
@@ -51,6 +52,7 @@
51
52
  "operationId": "doc.head",
52
53
  "x-fern-sdk-group-name": ["doc"],
53
54
  "x-fern-sdk-method-name": "head",
55
+ "x-docs-title": "Open document",
54
56
  "summary": "Open a document and return its head (versions, page count, security).",
55
57
  "security": [
56
58
  {
@@ -121,6 +123,7 @@
121
123
  "operationId": "doc.annotations.list",
122
124
  "x-fern-sdk-group-name": ["doc", "annotations"],
123
125
  "x-fern-sdk-method-name": "list",
126
+ "x-docs-title": "List annotations",
124
127
  "summary": "One page's annotations at the current layer version.",
125
128
  "security": [
126
129
  {
@@ -207,6 +210,7 @@
207
210
  "operationId": "doc.annotations.create",
208
211
  "x-fern-sdk-group-name": ["doc", "annotations"],
209
212
  "x-fern-sdk-method-name": "create",
213
+ "x-docs-title": "Create annotation",
210
214
  "summary": "Create an annotation on a page.",
211
215
  "description": "Doc JWTs may instead carry collab scopes (annotations:create:self, …) that refine per-annotation authorship rules; the API token is exempt from both.",
212
216
  "security": [
@@ -316,6 +320,7 @@
316
320
  "operationId": "doc.annotations.update",
317
321
  "x-fern-sdk-group-name": ["doc", "annotations"],
318
322
  "x-fern-sdk-method-name": "update",
323
+ "x-docs-title": "Update annotation",
319
324
  "summary": "Update one annotation by key.",
320
325
  "security": [
321
326
  {
@@ -431,6 +436,7 @@
431
436
  "operationId": "doc.annotations.delete",
432
437
  "x-fern-sdk-group-name": ["doc", "annotations"],
433
438
  "x-fern-sdk-method-name": "delete",
439
+ "x-docs-title": "Delete annotation",
434
440
  "summary": "Delete one annotation by key.",
435
441
  "security": [
436
442
  {
@@ -528,6 +534,7 @@
528
534
  "operationId": "doc.download",
529
535
  "x-fern-sdk-group-name": ["doc"],
530
536
  "x-fern-sdk-method-name": "download",
537
+ "x-docs-title": "Download PDF",
531
538
  "summary": "Download the layer's current PDF (base plus layer edits).",
532
539
  "security": [
533
540
  {
@@ -608,6 +615,7 @@
608
615
  "operationId": "doc.forms.get",
609
616
  "x-fern-sdk-group-name": ["doc", "forms"],
610
617
  "x-fern-sdk-method-name": "get",
618
+ "x-docs-title": "Get form snapshot",
611
619
  "summary": "Reconciled form snapshot: fields, widgets, values.",
612
620
  "security": [
613
621
  {
@@ -687,6 +695,7 @@
687
695
  "operationId": "doc.forms.exportData",
688
696
  "x-fern-sdk-group-name": ["doc", "forms"],
689
697
  "x-fern-sdk-method-name": "exportData",
698
+ "x-docs-title": "Export form data",
690
699
  "summary": "Export form data as FDF or XFDF.",
691
700
  "security": [
692
701
  {
@@ -780,6 +789,7 @@
780
789
  "operationId": "doc.forms.importData",
781
790
  "x-fern-sdk-group-name": ["doc", "forms"],
782
791
  "x-fern-sdk-method-name": "importData",
792
+ "x-docs-title": "Import form data",
783
793
  "summary": "Import form data (FDF/XFDF), filling matching fields.",
784
794
  "security": [
785
795
  {
@@ -879,6 +889,7 @@
879
889
  "operationId": "doc.forms.reset",
880
890
  "x-fern-sdk-group-name": ["doc", "forms"],
881
891
  "x-fern-sdk-method-name": "reset",
892
+ "x-docs-title": "Reset form field",
882
893
  "summary": "Reset one form field to its default value.",
883
894
  "security": [
884
895
  {
@@ -967,6 +978,7 @@
967
978
  "operationId": "doc.forms.setValue",
968
979
  "x-fern-sdk-group-name": ["doc", "forms"],
969
980
  "x-fern-sdk-method-name": "setValue",
981
+ "x-docs-title": "Set form value",
970
982
  "summary": "Set one form field's value.",
971
983
  "security": [
972
984
  {
@@ -1075,6 +1087,7 @@
1075
1087
  "operationId": "doc.manifest",
1076
1088
  "x-fern-sdk-group-name": ["doc"],
1077
1089
  "x-fern-sdk-method-name": "manifest",
1090
+ "x-docs-title": "Get manifest",
1078
1091
  "summary": "Full layer manifest at the layer's current version.",
1079
1092
  "security": [
1080
1093
  {
@@ -1154,6 +1167,7 @@
1154
1167
  "operationId": "doc.metadata.get",
1155
1168
  "x-fern-sdk-group-name": ["doc", "metadata"],
1156
1169
  "x-fern-sdk-method-name": "get",
1170
+ "x-docs-title": "Get metadata",
1157
1171
  "summary": "Document metadata (PDF info dictionary view) for a layer.",
1158
1172
  "security": [
1159
1173
  {
@@ -1233,6 +1247,7 @@
1233
1247
  "operationId": "doc.pages.delete",
1234
1248
  "x-fern-sdk-group-name": ["doc", "pages"],
1235
1249
  "x-fern-sdk-method-name": "delete",
1250
+ "x-docs-title": "Delete pages",
1236
1251
  "summary": "Delete pages.",
1237
1252
  "security": [
1238
1253
  {
@@ -1332,6 +1347,7 @@
1332
1347
  "operationId": "doc.pages.flatten",
1333
1348
  "x-fern-sdk-group-name": ["doc", "pages"],
1334
1349
  "x-fern-sdk-method-name": "flatten",
1350
+ "x-docs-title": "Flatten pages",
1335
1351
  "summary": "Flatten annotations and form fields into page content.",
1336
1352
  "security": [
1337
1353
  {
@@ -1431,6 +1447,7 @@
1431
1447
  "operationId": "doc.pages.move",
1432
1448
  "x-fern-sdk-group-name": ["doc", "pages"],
1433
1449
  "x-fern-sdk-method-name": "move",
1450
+ "x-docs-title": "Move pages",
1434
1451
  "summary": "Reorder pages.",
1435
1452
  "security": [
1436
1453
  {
@@ -1530,6 +1547,7 @@
1530
1547
  "operationId": "doc.pages.rotate",
1531
1548
  "x-fern-sdk-group-name": ["doc", "pages"],
1532
1549
  "x-fern-sdk-method-name": "rotate",
1550
+ "x-docs-title": "Rotate pages",
1533
1551
  "summary": "Set absolute rotation on pages.",
1534
1552
  "security": [
1535
1553
  {
@@ -1629,6 +1647,7 @@
1629
1647
  "operationId": "doc.redactions.apply",
1630
1648
  "x-fern-sdk-group-name": ["doc", "redactions"],
1631
1649
  "x-fern-sdk-method-name": "apply",
1650
+ "x-docs-title": "Apply redactions",
1632
1651
  "summary": "Apply pending redactions, permanently removing content.",
1633
1652
  "security": [
1634
1653
  {
@@ -1728,6 +1747,7 @@
1728
1747
  "operationId": "doc.render",
1729
1748
  "x-fern-sdk-group-name": ["doc"],
1730
1749
  "x-fern-sdk-method-name": "render",
1750
+ "x-docs-title": "Render page",
1731
1751
  "summary": "Render one page as an image at the current layer version.",
1732
1752
  "description": "Render parameters (viewport, format) pass as flat dotted query keys, e.g. `?viewport.kind=width&viewport.width=800`; the full grammar is documented with the viewer.",
1733
1753
  "security": [
@@ -1818,6 +1838,7 @@
1818
1838
  "operationId": "doc.text",
1819
1839
  "x-fern-sdk-group-name": ["doc"],
1820
1840
  "x-fern-sdk-method-name": "text",
1841
+ "x-docs-title": "Extract page text",
1821
1842
  "summary": "Extracted text content for one page.",
1822
1843
  "security": [
1823
1844
  {
@@ -1901,11 +1922,106 @@
1901
1922
  }
1902
1923
  }
1903
1924
  },
1925
+ "/v1/share-sessions": {
1926
+ "post": {
1927
+ "operationId": "shares.exchange",
1928
+ "x-fern-sdk-group-name": ["shares"],
1929
+ "x-fern-sdk-method-name": "exchange",
1930
+ "x-docs-title": "Exchange share token",
1931
+ "summary": "Trade a public share token for a short-lived document session JWT.",
1932
+ "description": "Unauthenticated, but requires a browser Origin header, checked against the grant allowlist. Unknown, revoked, and disabled tokens are indistinguishable (404). Passphrase-protected grants return 422 SharePasswordRequired until `password` is supplied. Mounted only when the deployment can sign (HS256 mode).",
1933
+ "security": [],
1934
+ "x-required-scope": [],
1935
+ "requestBody": {
1936
+ "required": true,
1937
+ "content": {
1938
+ "application/json": {
1939
+ "schema": {
1940
+ "$ref": "#/components/schemas/SharesExchangeRequest"
1941
+ }
1942
+ }
1943
+ }
1944
+ },
1945
+ "responses": {
1946
+ "200": {
1947
+ "description": "OK",
1948
+ "content": {
1949
+ "application/json": {
1950
+ "schema": {
1951
+ "$ref": "#/components/schemas/SharesExchange200Response"
1952
+ }
1953
+ }
1954
+ }
1955
+ },
1956
+ "400": {
1957
+ "description": "Bad request",
1958
+ "content": {
1959
+ "application/json": {
1960
+ "schema": {
1961
+ "$ref": "#/components/schemas/SharesExchange400Response"
1962
+ }
1963
+ }
1964
+ }
1965
+ },
1966
+ "403": {
1967
+ "description": "Forbidden",
1968
+ "content": {
1969
+ "application/json": {
1970
+ "schema": {
1971
+ "$ref": "#/components/schemas/SharesExchange403Response"
1972
+ }
1973
+ }
1974
+ }
1975
+ },
1976
+ "404": {
1977
+ "description": "Not found",
1978
+ "content": {
1979
+ "application/json": {
1980
+ "schema": {
1981
+ "$ref": "#/components/schemas/SharesExchange404Response"
1982
+ }
1983
+ }
1984
+ }
1985
+ },
1986
+ "410": {
1987
+ "description": "Gone",
1988
+ "content": {
1989
+ "application/json": {
1990
+ "schema": {
1991
+ "$ref": "#/components/schemas/SharesExchange410Response"
1992
+ }
1993
+ }
1994
+ }
1995
+ },
1996
+ "422": {
1997
+ "description": "Unprocessable",
1998
+ "content": {
1999
+ "application/json": {
2000
+ "schema": {
2001
+ "$ref": "#/components/schemas/SharesExchange422Response"
2002
+ }
2003
+ }
2004
+ }
2005
+ },
2006
+ "default": {
2007
+ "description": "Error",
2008
+ "content": {
2009
+ "application/json": {
2010
+ "schema": {
2011
+ "$ref": "#/components/schemas/AdminErrorPayload"
2012
+ }
2013
+ }
2014
+ }
2015
+ }
2016
+ }
2017
+ }
2018
+ },
1904
2019
  "/v1/tenants": {
1905
2020
  "post": {
1906
2021
  "operationId": "tenants.create",
1907
2022
  "x-fern-sdk-group-name": ["tenants"],
1908
2023
  "x-fern-sdk-method-name": "create",
2024
+ "x-docs-title": "Create tenant",
1909
2025
  "summary": "Create a tenant, or confirm it already exists — ensure-style, idempotent.",
1910
2026
  "security": [
1911
2027
  {
@@ -1960,6 +2076,7 @@
1960
2076
  "operationId": "tenants.list",
1961
2077
  "x-fern-sdk-group-name": ["tenants"],
1962
2078
  "x-fern-sdk-method-name": "list",
2079
+ "x-docs-title": "List tenants",
1963
2080
  "summary": "List tenants, newest first, cursor-paginated.",
1964
2081
  "security": [
1965
2082
  {
@@ -2028,6 +2145,7 @@
2028
2145
  "operationId": "tenants.get",
2029
2146
  "x-fern-sdk-group-name": ["tenants"],
2030
2147
  "x-fern-sdk-method-name": "get",
2148
+ "x-docs-title": "Get tenant",
2031
2149
  "summary": "Fetch one tenant record.",
2032
2150
  "security": [
2033
2151
  {
@@ -2083,6 +2201,7 @@
2083
2201
  "operationId": "tenants.delete",
2084
2202
  "x-fern-sdk-group-name": ["tenants"],
2085
2203
  "x-fern-sdk-method-name": "delete",
2204
+ "x-docs-title": "Delete tenant",
2086
2205
  "summary": "Delete a tenant and everything under it.",
2087
2206
  "description": "Destroys the tenant and everything in its namespace — documents, layers, stored bytes, audit history. Irreversible.",
2088
2207
  "security": [
@@ -2134,6 +2253,7 @@
2134
2253
  "operationId": "documents.list",
2135
2254
  "x-fern-sdk-group-name": ["documents"],
2136
2255
  "x-fern-sdk-method-name": "list",
2256
+ "x-docs-title": "List documents",
2137
2257
  "summary": "List documents in the tenant, newest first, cursor-paginated.",
2138
2258
  "security": [
2139
2259
  {
@@ -2223,6 +2343,7 @@
2223
2343
  "operationId": "documents.get",
2224
2344
  "x-fern-sdk-group-name": ["documents"],
2225
2345
  "x-fern-sdk-method-name": "get",
2346
+ "x-docs-title": "Get document",
2226
2347
  "summary": "Fetch one document record.",
2227
2348
  "security": [
2228
2349
  {
@@ -2300,6 +2421,7 @@
2300
2421
  "operationId": "documents.delete",
2301
2422
  "x-fern-sdk-group-name": ["documents"],
2302
2423
  "x-fern-sdk-method-name": "delete",
2424
+ "x-docs-title": "Delete document",
2303
2425
  "summary": "Delete a document and its stored artifacts.",
2304
2426
  "security": [
2305
2427
  {
@@ -2372,6 +2494,7 @@
2372
2494
  "operationId": "documents.commit",
2373
2495
  "x-fern-sdk-group-name": ["documents"],
2374
2496
  "x-fern-sdk-method-name": "commit",
2497
+ "x-docs-title": "Commit upload",
2375
2498
  "summary": "Finish an upload: verify the SHA-256 and promote the document to ready.",
2376
2499
  "security": [
2377
2500
  {
@@ -2461,6 +2584,7 @@
2461
2584
  "operationId": "documents.download",
2462
2585
  "x-fern-sdk-group-name": ["documents"],
2463
2586
  "x-fern-sdk-method-name": "download",
2587
+ "x-docs-title": "Download document",
2464
2588
  "summary": "Download the stored base PDF bytes.",
2465
2589
  "security": [
2466
2590
  {
@@ -2541,6 +2665,7 @@
2541
2665
  "operationId": "documents.thumbnail",
2542
2666
  "x-fern-sdk-group-name": ["documents"],
2543
2667
  "x-fern-sdk-method-name": "thumbnail",
2668
+ "x-docs-title": "Get thumbnail",
2544
2669
  "summary": "Fetch the warmed dashboard-tile render for a document.",
2545
2670
  "security": [
2546
2671
  {
@@ -2612,12 +2737,14 @@
2612
2737
  }
2613
2738
  }
2614
2739
  },
2615
- "/v1/tenants/{tenantId}/documents/{id}/upload-direct": {
2740
+ "/v1/tenants/{tenantId}/documents/{id}/upload-proxy": {
2616
2741
  "post": {
2617
- "operationId": "documents.uploadDirect",
2742
+ "operationId": "documents.uploadProxy",
2618
2743
  "x-fern-sdk-group-name": ["documents"],
2619
- "x-fern-sdk-method-name": "uploadDirect",
2620
- "summary": "Upload the PDF bytes through the origin instead of a presigned URL.",
2744
+ "x-fern-sdk-method-name": "uploadProxy",
2745
+ "x-docs-title": "Upload document through the origin",
2746
+ "summary": "Upload a bounded PDF through the API when the initialized transfer kind is proxy.",
2747
+ "description": "This bounded origin-mediated fallback must only be used after documents.init returns upload.kind=proxy. Auto mode prefers a presigned object-store PUT whenever available.",
2621
2748
  "security": [
2622
2749
  {
2623
2750
  "apiToken": []
@@ -2650,18 +2777,6 @@
2650
2777
  "requestBody": {
2651
2778
  "required": true,
2652
2779
  "content": {
2653
- "application/pdf": {
2654
- "schema": {
2655
- "type": "string",
2656
- "format": "binary"
2657
- }
2658
- },
2659
- "application/octet-stream": {
2660
- "schema": {
2661
- "type": "string",
2662
- "format": "binary"
2663
- }
2664
- },
2665
2780
  "multipart/form-data": {
2666
2781
  "schema": {
2667
2782
  "type": "object",
@@ -2682,7 +2797,7 @@
2682
2797
  "content": {
2683
2798
  "application/json": {
2684
2799
  "schema": {
2685
- "$ref": "#/components/schemas/DocumentsUploadDirect200Response"
2800
+ "$ref": "#/components/schemas/DocumentsUploadProxy200Response"
2686
2801
  }
2687
2802
  }
2688
2803
  }
@@ -2692,7 +2807,17 @@
2692
2807
  "content": {
2693
2808
  "application/json": {
2694
2809
  "schema": {
2695
- "$ref": "#/components/schemas/DocumentsUploadDirect400Response"
2810
+ "$ref": "#/components/schemas/DocumentsUploadProxy400Response"
2811
+ }
2812
+ }
2813
+ }
2814
+ },
2815
+ "409": {
2816
+ "description": "Conflict",
2817
+ "content": {
2818
+ "application/json": {
2819
+ "schema": {
2820
+ "$ref": "#/components/schemas/DocumentsUploadProxy409Response"
2696
2821
  }
2697
2822
  }
2698
2823
  }
@@ -2715,6 +2840,7 @@
2715
2840
  "operationId": "documents.init",
2716
2841
  "x-fern-sdk-group-name": ["documents"],
2717
2842
  "x-fern-sdk-method-name": "init",
2843
+ "x-docs-title": "Initialize upload",
2718
2844
  "summary": "Begin an upload: create (or resume/dedupe) a pending document and issue upload access.",
2719
2845
  "security": [
2720
2846
  {
@@ -2780,13 +2906,65 @@
2780
2906
  }
2781
2907
  }
2782
2908
  },
2783
- "/v1/tenants/{tenantId}/tokens": {
2909
+ "/v1/tenants/{tenantId}/resume": {
2784
2910
  "post": {
2785
- "operationId": "tokens.issue",
2786
- "x-fern-sdk-group-name": ["tokens"],
2787
- "x-fern-sdk-method-name": "issue",
2788
- "summary": "Mint a delegated JWT: a doc token, or (API token only) a tenant token.",
2789
- "description": "kind \"tenant\" requires the API token — authority mints only downward. Mounted only when the deployment can sign (HS256 mode); asymmetric deployments mint with their own private key.",
2911
+ "operationId": "tenants.resume",
2912
+ "x-fern-sdk-group-name": ["tenants"],
2913
+ "x-fern-sdk-method-name": "resume",
2914
+ "x-docs-title": "Resume tenant",
2915
+ "summary": "Lift a suspension; credentials for the tenant verify again.",
2916
+ "security": [
2917
+ {
2918
+ "apiToken": []
2919
+ }
2920
+ ],
2921
+ "x-required-scope": [],
2922
+ "parameters": [
2923
+ {
2924
+ "name": "tenantId",
2925
+ "in": "path",
2926
+ "required": true,
2927
+ "schema": {
2928
+ "type": "string",
2929
+ "pattern": "^[A-Za-z0-9_-]+$"
2930
+ }
2931
+ }
2932
+ ],
2933
+ "responses": {
2934
+ "204": {
2935
+ "description": "No content"
2936
+ },
2937
+ "404": {
2938
+ "description": "Not found",
2939
+ "content": {
2940
+ "application/json": {
2941
+ "schema": {
2942
+ "$ref": "#/components/schemas/TenantsResumeResponse"
2943
+ }
2944
+ }
2945
+ }
2946
+ },
2947
+ "default": {
2948
+ "description": "Error",
2949
+ "content": {
2950
+ "application/json": {
2951
+ "schema": {
2952
+ "$ref": "#/components/schemas/AdminErrorPayload"
2953
+ }
2954
+ }
2955
+ }
2956
+ }
2957
+ }
2958
+ }
2959
+ },
2960
+ "/v1/tenants/{tenantId}/shares": {
2961
+ "post": {
2962
+ "operationId": "shares.create",
2963
+ "x-fern-sdk-group-name": ["shares"],
2964
+ "x-fern-sdk-method-name": "create",
2965
+ "x-docs-title": "Create share",
2966
+ "summary": "Create a standing share grant for one document — the no-backend embed credential.",
2967
+ "description": "The returned share id IS the public share token. Mounted only when the deployment can sign (HS256 mode) — exchange mints session JWTs, so grants exist only where minting does.",
2790
2968
  "security": [
2791
2969
  {
2792
2970
  "apiToken": []
@@ -2795,7 +2973,7 @@
2795
2973
  "tenantToken": []
2796
2974
  }
2797
2975
  ],
2798
- "x-required-scope": ["tokens.issue-doc"],
2976
+ "x-required-scope": ["shares.manage"],
2799
2977
  "parameters": [
2800
2978
  {
2801
2979
  "name": "tenantId",
@@ -2812,7 +2990,7 @@
2812
2990
  "content": {
2813
2991
  "application/json": {
2814
2992
  "schema": {
2815
- "$ref": "#/components/schemas/TokensIssueRequest"
2993
+ "$ref": "#/components/schemas/SharesCreateRequest"
2816
2994
  }
2817
2995
  }
2818
2996
  }
@@ -2823,7 +3001,7 @@
2823
3001
  "content": {
2824
3002
  "application/json": {
2825
3003
  "schema": {
2826
- "$ref": "#/components/schemas/TokensIssue200Response"
3004
+ "$ref": "#/components/schemas/SharesCreate200Response"
2827
3005
  }
2828
3006
  }
2829
3007
  }
@@ -2833,7 +3011,7 @@
2833
3011
  "content": {
2834
3012
  "application/json": {
2835
3013
  "schema": {
2836
- "$ref": "#/components/schemas/TokensIssue400Response"
3014
+ "$ref": "#/components/schemas/SharesCreate400Response"
2837
3015
  }
2838
3016
  }
2839
3017
  }
@@ -2843,7 +3021,7 @@
2843
3021
  "content": {
2844
3022
  "application/json": {
2845
3023
  "schema": {
2846
- "$ref": "#/components/schemas/TokensIssue403Response"
3024
+ "$ref": "#/components/schemas/SharesCreate403Response"
2847
3025
  }
2848
3026
  }
2849
3027
  }
@@ -2853,7 +3031,7 @@
2853
3031
  "content": {
2854
3032
  "application/json": {
2855
3033
  "schema": {
2856
- "$ref": "#/components/schemas/TokensIssue404Response"
3034
+ "$ref": "#/components/schemas/SharesCreate404Response"
2857
3035
  }
2858
3036
  }
2859
3037
  }
@@ -2869,15 +3047,13 @@
2869
3047
  }
2870
3048
  }
2871
3049
  }
2872
- }
2873
- },
2874
- "/v1/tenants/{tenantId}/tokens/{jti}/revoke": {
2875
- "post": {
2876
- "operationId": "tokens.revoke",
2877
- "x-fern-sdk-group-name": ["tokens"],
2878
- "x-fern-sdk-method-name": "revoke",
2879
- "summary": "Revoke a token by jti; live sessions drop on their next heartbeat.",
2880
- "description": "Mounted only when the deployment enables token revocation.",
3050
+ },
3051
+ "get": {
3052
+ "operationId": "shares.list",
3053
+ "x-fern-sdk-group-name": ["shares"],
3054
+ "x-fern-sdk-method-name": "list",
3055
+ "x-docs-title": "List shares",
3056
+ "summary": "List share grants in the tenant, newest first, cursor-paginated.",
2881
3057
  "security": [
2882
3058
  {
2883
3059
  "apiToken": []
@@ -2886,7 +3062,7 @@
2886
3062
  "tenantToken": []
2887
3063
  }
2888
3064
  ],
2889
- "x-required-scope": ["tokens.revoke"],
3065
+ "x-required-scope": ["shares.manage"],
2890
3066
  "parameters": [
2891
3067
  {
2892
3068
  "name": "tenantId",
@@ -2898,36 +3074,52 @@
2898
3074
  }
2899
3075
  },
2900
3076
  {
2901
- "name": "jti",
2902
- "in": "path",
2903
- "required": true,
3077
+ "name": "limit",
3078
+ "in": "query",
3079
+ "required": false,
3080
+ "schema": {
3081
+ "type": "integer",
3082
+ "minimum": 1,
3083
+ "maximum": 200,
3084
+ "default": 100
3085
+ }
3086
+ },
3087
+ {
3088
+ "name": "cursor",
3089
+ "in": "query",
3090
+ "required": false,
2904
3091
  "schema": {
2905
3092
  "type": "string",
2906
- "minLength": 1,
2907
- "maxLength": 256
3093
+ "minLength": 1
3094
+ }
3095
+ },
3096
+ {
3097
+ "name": "docId",
3098
+ "in": "query",
3099
+ "required": false,
3100
+ "schema": {
3101
+ "type": "string",
3102
+ "pattern": "^[A-Za-z0-9_-]+$"
2908
3103
  }
2909
3104
  }
2910
3105
  ],
2911
- "requestBody": {
2912
- "required": false,
2913
- "content": {
2914
- "application/json": {
2915
- "schema": {
2916
- "$ref": "#/components/schemas/TokensRevokeRequest"
3106
+ "responses": {
3107
+ "200": {
3108
+ "description": "OK",
3109
+ "content": {
3110
+ "application/json": {
3111
+ "schema": {
3112
+ "$ref": "#/components/schemas/SharesList200Response"
3113
+ }
2917
3114
  }
2918
3115
  }
2919
- }
2920
- },
2921
- "responses": {
2922
- "204": {
2923
- "description": "No content"
2924
3116
  },
2925
3117
  "400": {
2926
3118
  "description": "Bad request",
2927
3119
  "content": {
2928
3120
  "application/json": {
2929
3121
  "schema": {
2930
- "$ref": "#/components/schemas/TokensRevokeResponse"
3122
+ "$ref": "#/components/schemas/SharesList400Response"
2931
3123
  }
2932
3124
  }
2933
3125
  }
@@ -2944,136 +3136,1771 @@
2944
3136
  }
2945
3137
  }
2946
3138
  }
2947
- }
2948
- },
2949
- "components": {
2950
- "securitySchemes": {
2951
- "apiToken": {
2952
- "type": "http",
2953
- "scheme": "bearer",
2954
- "description": "The deployment's static root credential (CLOUDPDF_API_AUTH_TOKENS), valid on every surface."
2955
- },
2956
- "tenantToken": {
2957
- "type": "http",
2958
- "scheme": "bearer",
2959
- "bearerFormat": "JWT",
2960
- "description": "Delegated tenant JWT, valid only under its own /v1/tenants/{tenantId}/ subtree — the path tenant must equal the token's tenant_id. Doc-scoped viewer tokens are rejected on every admin route."
2961
- },
2962
- "docToken": {
2963
- "type": "http",
2964
- "scheme": "bearer",
2965
- "bearerFormat": "JWT",
2966
- "description": "Doc-scoped JWT, valid only on the /v1/docs/{docId} subtree it names, gated by the capability scopes it carries (each operation's x-required-capability)."
2967
- }
2968
3139
  },
2969
- "schemas": {
2970
- "AdminErrorPayload": {
2971
- "type": "object",
2972
- "properties": {
2973
- "error": {
2974
- "type": "object",
2975
- "properties": {
2976
- "code": {
2977
- "type": "string"
2978
- },
2979
- "message": {
2980
- "type": "string"
2981
- }
2982
- },
2983
- "required": ["code", "message"],
2984
- "additionalProperties": false
3140
+ "/v1/tenants/{tenantId}/shares/{shareId}": {
3141
+ "get": {
3142
+ "operationId": "shares.get",
3143
+ "x-fern-sdk-group-name": ["shares"],
3144
+ "x-fern-sdk-method-name": "get",
3145
+ "x-docs-title": "Get share",
3146
+ "summary": "Fetch one share grant.",
3147
+ "security": [
3148
+ {
3149
+ "apiToken": []
3150
+ },
3151
+ {
3152
+ "tenantToken": []
2985
3153
  }
2986
- },
2987
- "required": ["error"],
3154
+ ],
3155
+ "x-required-scope": ["shares.manage"],
3156
+ "parameters": [
3157
+ {
3158
+ "name": "tenantId",
3159
+ "in": "path",
3160
+ "required": true,
3161
+ "schema": {
3162
+ "type": "string",
3163
+ "pattern": "^[A-Za-z0-9_-]+$"
3164
+ }
3165
+ },
3166
+ {
3167
+ "name": "shareId",
3168
+ "in": "path",
3169
+ "required": true,
3170
+ "schema": {
3171
+ "type": "string",
3172
+ "pattern": "^shr_[A-Za-z0-9_-]{24}$"
3173
+ }
3174
+ }
3175
+ ],
3176
+ "responses": {
3177
+ "200": {
3178
+ "description": "OK",
3179
+ "content": {
3180
+ "application/json": {
3181
+ "schema": {
3182
+ "$ref": "#/components/schemas/SharesGet200Response"
3183
+ }
3184
+ }
3185
+ }
3186
+ },
3187
+ "404": {
3188
+ "description": "Not found",
3189
+ "content": {
3190
+ "application/json": {
3191
+ "schema": {
3192
+ "$ref": "#/components/schemas/SharesGet404Response"
3193
+ }
3194
+ }
3195
+ }
3196
+ },
3197
+ "default": {
3198
+ "description": "Error",
3199
+ "content": {
3200
+ "application/json": {
3201
+ "schema": {
3202
+ "$ref": "#/components/schemas/AdminErrorPayload"
3203
+ }
3204
+ }
3205
+ }
3206
+ }
3207
+ }
3208
+ },
3209
+ "patch": {
3210
+ "operationId": "shares.update",
3211
+ "x-fern-sdk-group-name": ["shares"],
3212
+ "x-fern-sdk-method-name": "update",
3213
+ "x-docs-title": "Update share",
3214
+ "summary": "Edit a grant in place — every embedded copy of the token follows the row.",
3215
+ "security": [
3216
+ {
3217
+ "apiToken": []
3218
+ },
3219
+ {
3220
+ "tenantToken": []
3221
+ }
3222
+ ],
3223
+ "x-required-scope": ["shares.manage"],
3224
+ "parameters": [
3225
+ {
3226
+ "name": "tenantId",
3227
+ "in": "path",
3228
+ "required": true,
3229
+ "schema": {
3230
+ "type": "string",
3231
+ "pattern": "^[A-Za-z0-9_-]+$"
3232
+ }
3233
+ },
3234
+ {
3235
+ "name": "shareId",
3236
+ "in": "path",
3237
+ "required": true,
3238
+ "schema": {
3239
+ "type": "string",
3240
+ "pattern": "^shr_[A-Za-z0-9_-]{24}$"
3241
+ }
3242
+ }
3243
+ ],
3244
+ "requestBody": {
3245
+ "required": true,
3246
+ "content": {
3247
+ "application/json": {
3248
+ "schema": {
3249
+ "$ref": "#/components/schemas/SharesUpdateRequest"
3250
+ }
3251
+ }
3252
+ }
3253
+ },
3254
+ "responses": {
3255
+ "200": {
3256
+ "description": "OK",
3257
+ "content": {
3258
+ "application/json": {
3259
+ "schema": {
3260
+ "$ref": "#/components/schemas/SharesUpdate200Response"
3261
+ }
3262
+ }
3263
+ }
3264
+ },
3265
+ "400": {
3266
+ "description": "Bad request",
3267
+ "content": {
3268
+ "application/json": {
3269
+ "schema": {
3270
+ "$ref": "#/components/schemas/SharesUpdate400Response"
3271
+ }
3272
+ }
3273
+ }
3274
+ },
3275
+ "404": {
3276
+ "description": "Not found",
3277
+ "content": {
3278
+ "application/json": {
3279
+ "schema": {
3280
+ "$ref": "#/components/schemas/SharesUpdate404Response"
3281
+ }
3282
+ }
3283
+ }
3284
+ },
3285
+ "default": {
3286
+ "description": "Error",
3287
+ "content": {
3288
+ "application/json": {
3289
+ "schema": {
3290
+ "$ref": "#/components/schemas/AdminErrorPayload"
3291
+ }
3292
+ }
3293
+ }
3294
+ }
3295
+ }
3296
+ },
3297
+ "delete": {
3298
+ "operationId": "shares.delete",
3299
+ "x-fern-sdk-group-name": ["shares"],
3300
+ "x-fern-sdk-method-name": "delete",
3301
+ "x-docs-title": "Revoke share",
3302
+ "summary": "Delete a grant; exchange stops immediately, live sessions lapse at their exp.",
3303
+ "security": [
3304
+ {
3305
+ "apiToken": []
3306
+ },
3307
+ {
3308
+ "tenantToken": []
3309
+ }
3310
+ ],
3311
+ "x-required-scope": ["shares.manage"],
3312
+ "parameters": [
3313
+ {
3314
+ "name": "tenantId",
3315
+ "in": "path",
3316
+ "required": true,
3317
+ "schema": {
3318
+ "type": "string",
3319
+ "pattern": "^[A-Za-z0-9_-]+$"
3320
+ }
3321
+ },
3322
+ {
3323
+ "name": "shareId",
3324
+ "in": "path",
3325
+ "required": true,
3326
+ "schema": {
3327
+ "type": "string",
3328
+ "pattern": "^shr_[A-Za-z0-9_-]{24}$"
3329
+ }
3330
+ }
3331
+ ],
3332
+ "responses": {
3333
+ "204": {
3334
+ "description": "No content"
3335
+ },
3336
+ "404": {
3337
+ "description": "Not found",
3338
+ "content": {
3339
+ "application/json": {
3340
+ "schema": {
3341
+ "$ref": "#/components/schemas/SharesDeleteResponse"
3342
+ }
3343
+ }
3344
+ }
3345
+ },
3346
+ "default": {
3347
+ "description": "Error",
3348
+ "content": {
3349
+ "application/json": {
3350
+ "schema": {
3351
+ "$ref": "#/components/schemas/AdminErrorPayload"
3352
+ }
3353
+ }
3354
+ }
3355
+ }
3356
+ }
3357
+ }
3358
+ },
3359
+ "/v1/tenants/{tenantId}/suspend": {
3360
+ "post": {
3361
+ "operationId": "tenants.suspend",
3362
+ "x-fern-sdk-group-name": ["tenants"],
3363
+ "x-fern-sdk-method-name": "suspend",
3364
+ "x-docs-title": "Suspend tenant",
3365
+ "summary": "Fail the tenant closed: refuse every tenant JWT, doc JWT, and share exchange.",
3366
+ "description": "Instantly reversible with resume. The API token is exempt, so a suspended tenant can still be inspected, exported, resumed, or deleted.",
3367
+ "security": [
3368
+ {
3369
+ "apiToken": []
3370
+ }
3371
+ ],
3372
+ "x-required-scope": [],
3373
+ "parameters": [
3374
+ {
3375
+ "name": "tenantId",
3376
+ "in": "path",
3377
+ "required": true,
3378
+ "schema": {
3379
+ "type": "string",
3380
+ "pattern": "^[A-Za-z0-9_-]+$"
3381
+ }
3382
+ }
3383
+ ],
3384
+ "requestBody": {
3385
+ "required": false,
3386
+ "content": {
3387
+ "application/json": {
3388
+ "schema": {
3389
+ "$ref": "#/components/schemas/TenantsSuspendRequest"
3390
+ }
3391
+ }
3392
+ }
3393
+ },
3394
+ "responses": {
3395
+ "204": {
3396
+ "description": "No content"
3397
+ },
3398
+ "404": {
3399
+ "description": "Not found",
3400
+ "content": {
3401
+ "application/json": {
3402
+ "schema": {
3403
+ "$ref": "#/components/schemas/TenantsSuspendResponse"
3404
+ }
3405
+ }
3406
+ }
3407
+ },
3408
+ "default": {
3409
+ "description": "Error",
3410
+ "content": {
3411
+ "application/json": {
3412
+ "schema": {
3413
+ "$ref": "#/components/schemas/AdminErrorPayload"
3414
+ }
3415
+ }
3416
+ }
3417
+ }
3418
+ }
3419
+ }
3420
+ },
3421
+ "/v1/tenants/{tenantId}/tokens": {
3422
+ "post": {
3423
+ "operationId": "tokens.issue",
3424
+ "x-fern-sdk-group-name": ["tokens"],
3425
+ "x-fern-sdk-method-name": "issue",
3426
+ "x-docs-title": "Issue token",
3427
+ "summary": "Mint a delegated JWT: a doc token, or (API token only) a tenant token.",
3428
+ "description": "kind \"tenant\" requires the API token — authority mints only downward. Mounted only when the deployment can sign (HS256 mode); asymmetric deployments mint with their own private key.",
3429
+ "security": [
3430
+ {
3431
+ "apiToken": []
3432
+ },
3433
+ {
3434
+ "tenantToken": []
3435
+ }
3436
+ ],
3437
+ "x-required-scope": ["tokens.issue-doc"],
3438
+ "parameters": [
3439
+ {
3440
+ "name": "tenantId",
3441
+ "in": "path",
3442
+ "required": true,
3443
+ "schema": {
3444
+ "type": "string",
3445
+ "pattern": "^[A-Za-z0-9_-]+$"
3446
+ }
3447
+ }
3448
+ ],
3449
+ "requestBody": {
3450
+ "required": true,
3451
+ "content": {
3452
+ "application/json": {
3453
+ "schema": {
3454
+ "$ref": "#/components/schemas/TokensIssueRequest"
3455
+ }
3456
+ }
3457
+ }
3458
+ },
3459
+ "responses": {
3460
+ "200": {
3461
+ "description": "OK",
3462
+ "content": {
3463
+ "application/json": {
3464
+ "schema": {
3465
+ "$ref": "#/components/schemas/TokensIssue200Response"
3466
+ }
3467
+ }
3468
+ }
3469
+ },
3470
+ "400": {
3471
+ "description": "Bad request",
3472
+ "content": {
3473
+ "application/json": {
3474
+ "schema": {
3475
+ "$ref": "#/components/schemas/TokensIssue400Response"
3476
+ }
3477
+ }
3478
+ }
3479
+ },
3480
+ "403": {
3481
+ "description": "Forbidden",
3482
+ "content": {
3483
+ "application/json": {
3484
+ "schema": {
3485
+ "$ref": "#/components/schemas/TokensIssue403Response"
3486
+ }
3487
+ }
3488
+ }
3489
+ },
3490
+ "404": {
3491
+ "description": "Not found",
3492
+ "content": {
3493
+ "application/json": {
3494
+ "schema": {
3495
+ "$ref": "#/components/schemas/TokensIssue404Response"
3496
+ }
3497
+ }
3498
+ }
3499
+ },
3500
+ "default": {
3501
+ "description": "Error",
3502
+ "content": {
3503
+ "application/json": {
3504
+ "schema": {
3505
+ "$ref": "#/components/schemas/AdminErrorPayload"
3506
+ }
3507
+ }
3508
+ }
3509
+ }
3510
+ }
3511
+ }
3512
+ },
3513
+ "/v1/tenants/{tenantId}/tokens/{jti}/revoke": {
3514
+ "post": {
3515
+ "operationId": "tokens.revoke",
3516
+ "x-fern-sdk-group-name": ["tokens"],
3517
+ "x-fern-sdk-method-name": "revoke",
3518
+ "x-docs-title": "Revoke token",
3519
+ "summary": "Revoke a token by jti; live sessions drop on their next heartbeat.",
3520
+ "description": "Mounted only when the deployment enables token revocation.",
3521
+ "security": [
3522
+ {
3523
+ "apiToken": []
3524
+ },
3525
+ {
3526
+ "tenantToken": []
3527
+ }
3528
+ ],
3529
+ "x-required-scope": ["tokens.revoke"],
3530
+ "parameters": [
3531
+ {
3532
+ "name": "tenantId",
3533
+ "in": "path",
3534
+ "required": true,
3535
+ "schema": {
3536
+ "type": "string",
3537
+ "pattern": "^[A-Za-z0-9_-]+$"
3538
+ }
3539
+ },
3540
+ {
3541
+ "name": "jti",
3542
+ "in": "path",
3543
+ "required": true,
3544
+ "schema": {
3545
+ "type": "string",
3546
+ "minLength": 1,
3547
+ "maxLength": 256
3548
+ }
3549
+ }
3550
+ ],
3551
+ "requestBody": {
3552
+ "required": false,
3553
+ "content": {
3554
+ "application/json": {
3555
+ "schema": {
3556
+ "$ref": "#/components/schemas/TokensRevokeRequest"
3557
+ }
3558
+ }
3559
+ }
3560
+ },
3561
+ "responses": {
3562
+ "204": {
3563
+ "description": "No content"
3564
+ },
3565
+ "400": {
3566
+ "description": "Bad request",
3567
+ "content": {
3568
+ "application/json": {
3569
+ "schema": {
3570
+ "$ref": "#/components/schemas/TokensRevokeResponse"
3571
+ }
3572
+ }
3573
+ }
3574
+ },
3575
+ "default": {
3576
+ "description": "Error",
3577
+ "content": {
3578
+ "application/json": {
3579
+ "schema": {
3580
+ "$ref": "#/components/schemas/AdminErrorPayload"
3581
+ }
3582
+ }
3583
+ }
3584
+ }
3585
+ }
3586
+ }
3587
+ },
3588
+ "/v1/tenants/{tenantId}/usage": {
3589
+ "get": {
3590
+ "operationId": "tenants.usage",
3591
+ "x-fern-sdk-group-name": ["tenants"],
3592
+ "x-fern-sdk-method-name": "usage",
3593
+ "x-docs-title": "Tenant usage",
3594
+ "summary": "Per-tenant usage facts (views, uploads, stored bytes) for one UTC month.",
3595
+ "description": "Facts only — no limits or billing state. Views count share exchanges plus authorized /v1/access grants, deduplicated across the two.",
3596
+ "security": [
3597
+ {
3598
+ "apiToken": []
3599
+ },
3600
+ {
3601
+ "tenantToken": []
3602
+ }
3603
+ ],
3604
+ "x-required-scope": ["docs.read"],
3605
+ "parameters": [
3606
+ {
3607
+ "name": "tenantId",
3608
+ "in": "path",
3609
+ "required": true,
3610
+ "schema": {
3611
+ "type": "string",
3612
+ "pattern": "^[A-Za-z0-9_-]+$"
3613
+ }
3614
+ },
3615
+ {
3616
+ "name": "period",
3617
+ "in": "query",
3618
+ "required": false,
3619
+ "schema": {
3620
+ "type": "string",
3621
+ "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
3622
+ }
3623
+ }
3624
+ ],
3625
+ "responses": {
3626
+ "200": {
3627
+ "description": "OK",
3628
+ "content": {
3629
+ "application/json": {
3630
+ "schema": {
3631
+ "$ref": "#/components/schemas/TenantsUsage200Response"
3632
+ }
3633
+ }
3634
+ }
3635
+ },
3636
+ "400": {
3637
+ "description": "Bad request",
3638
+ "content": {
3639
+ "application/json": {
3640
+ "schema": {
3641
+ "$ref": "#/components/schemas/TenantsUsage400Response"
3642
+ }
3643
+ }
3644
+ }
3645
+ },
3646
+ "404": {
3647
+ "description": "Not found",
3648
+ "content": {
3649
+ "application/json": {
3650
+ "schema": {
3651
+ "$ref": "#/components/schemas/TenantsUsage404Response"
3652
+ }
3653
+ }
3654
+ }
3655
+ },
3656
+ "default": {
3657
+ "description": "Error",
3658
+ "content": {
3659
+ "application/json": {
3660
+ "schema": {
3661
+ "$ref": "#/components/schemas/AdminErrorPayload"
3662
+ }
3663
+ }
3664
+ }
3665
+ }
3666
+ }
3667
+ }
3668
+ }
3669
+ },
3670
+ "x-docs-groups": {
3671
+ "deployment": {
3672
+ "title": "Deployment"
3673
+ },
3674
+ "tenants": {
3675
+ "title": "Tenants"
3676
+ },
3677
+ "documents": {
3678
+ "title": "Tenant documents"
3679
+ },
3680
+ "tokens": {
3681
+ "title": "Tokens"
3682
+ },
3683
+ "shares": {
3684
+ "title": "Shares"
3685
+ },
3686
+ "doc": {
3687
+ "title": "Document operations",
3688
+ "slug": "document-operations"
3689
+ },
3690
+ "doc.annotations": {
3691
+ "title": "Annotations"
3692
+ },
3693
+ "doc.forms": {
3694
+ "title": "Forms"
3695
+ },
3696
+ "doc.metadata": {
3697
+ "title": "Metadata"
3698
+ },
3699
+ "doc.pages": {
3700
+ "title": "Pages"
3701
+ },
3702
+ "doc.redactions": {
3703
+ "title": "Redactions"
3704
+ }
3705
+ },
3706
+ "components": {
3707
+ "securitySchemes": {
3708
+ "apiToken": {
3709
+ "type": "http",
3710
+ "scheme": "bearer",
3711
+ "x-docs-title": "API token",
3712
+ "description": "The deployment's static root credential (CLOUDPDF_API_AUTH_TOKENS), valid on every surface."
3713
+ },
3714
+ "tenantToken": {
3715
+ "type": "http",
3716
+ "scheme": "bearer",
3717
+ "bearerFormat": "JWT",
3718
+ "x-docs-title": "Tenant token",
3719
+ "description": "Delegated tenant JWT, valid only under its own /v1/tenants/{tenantId}/ subtree — the path tenant must equal the token's tenant_id. Doc-scoped viewer tokens are rejected on every admin route."
3720
+ },
3721
+ "docToken": {
3722
+ "type": "http",
3723
+ "scheme": "bearer",
3724
+ "bearerFormat": "JWT",
3725
+ "x-docs-title": "Document token",
3726
+ "description": "Doc-scoped JWT, valid only on the /v1/docs/{docId} subtree it names, gated by the capability scopes it carries (each operation's x-required-capability)."
3727
+ }
3728
+ },
3729
+ "schemas": {
3730
+ "AdminErrorPayload": {
3731
+ "type": "object",
3732
+ "properties": {
3733
+ "error": {
3734
+ "type": "object",
3735
+ "properties": {
3736
+ "code": {
3737
+ "type": "string"
3738
+ },
3739
+ "message": {
3740
+ "type": "string"
3741
+ }
3742
+ },
3743
+ "required": ["code", "message"],
3744
+ "additionalProperties": false
3745
+ }
3746
+ },
3747
+ "required": ["error"],
3748
+ "additionalProperties": false
3749
+ },
3750
+ "EngineErrorPayload": {
3751
+ "type": "object",
3752
+ "properties": {
3753
+ "name": {
3754
+ "type": "string",
3755
+ "enum": ["EngineError"]
3756
+ },
3757
+ "code": {
3758
+ "type": "string",
3759
+ "enum": [
3760
+ "Unknown",
3761
+ "InvalidArg",
3762
+ "DocNotOpen",
3763
+ "DocOpenFailed",
3764
+ "DocPasswordRequired",
3765
+ "DocPasswordIncorrect",
3766
+ "Aborted",
3767
+ "Network",
3768
+ "Unauthenticated",
3769
+ "Forbidden",
3770
+ "NotFound",
3771
+ "WireFormat",
3772
+ "RuntimeUnavailable",
3773
+ "InvalidReference",
3774
+ "WeakAnnotationSessionConflict",
3775
+ "LayerVersionConflict",
3776
+ "NotImplemented",
3777
+ "MalformedPdf"
3778
+ ]
3779
+ },
3780
+ "message": {
3781
+ "type": "string"
3782
+ },
3783
+ "details": {
3784
+ "type": "object",
3785
+ "additionalProperties": {}
3786
+ }
3787
+ },
3788
+ "required": ["name", "code", "message"],
3789
+ "additionalProperties": false
3790
+ },
3791
+ "TenantsCreateRequest": {
3792
+ "type": "object",
3793
+ "properties": {
3794
+ "id": {
3795
+ "type": "string",
3796
+ "pattern": "^[A-Za-z0-9_-]+$"
3797
+ },
3798
+ "name": {
3799
+ "type": "string",
3800
+ "minLength": 1,
3801
+ "maxLength": 256
3802
+ }
3803
+ },
3804
+ "required": ["id"],
3805
+ "additionalProperties": false
3806
+ },
3807
+ "TenantsCreate200Response": {
3808
+ "type": "object",
3809
+ "properties": {
3810
+ "tenant": {
3811
+ "type": "object",
3812
+ "properties": {
3813
+ "id": {
3814
+ "type": "string"
3815
+ },
3816
+ "name": {
3817
+ "type": "string"
3818
+ },
3819
+ "autoProvisioned": {
3820
+ "type": "boolean"
3821
+ },
3822
+ "status": {
3823
+ "type": "string",
3824
+ "enum": ["active", "suspended"]
3825
+ },
3826
+ "createdAt": {
3827
+ "type": "number"
3828
+ }
3829
+ },
3830
+ "required": ["id", "name", "autoProvisioned", "createdAt"],
3831
+ "additionalProperties": false
3832
+ },
3833
+ "created": {
3834
+ "type": "boolean"
3835
+ }
3836
+ },
3837
+ "required": ["tenant", "created"],
3838
+ "additionalProperties": false
3839
+ },
3840
+ "TenantsCreate400Response": {
3841
+ "type": "object",
3842
+ "properties": {
3843
+ "error": {
3844
+ "type": "object",
3845
+ "properties": {
3846
+ "code": {
3847
+ "type": "string"
3848
+ },
3849
+ "message": {
3850
+ "type": "string"
3851
+ }
3852
+ },
3853
+ "required": ["code", "message"],
3854
+ "additionalProperties": false
3855
+ }
3856
+ },
3857
+ "required": ["error"],
3858
+ "additionalProperties": false
3859
+ },
3860
+ "TenantsList200Response": {
3861
+ "type": "object",
3862
+ "properties": {
3863
+ "tenants": {
3864
+ "type": "array",
3865
+ "items": {
3866
+ "type": "object",
3867
+ "properties": {
3868
+ "id": {
3869
+ "type": "string"
3870
+ },
3871
+ "name": {
3872
+ "type": "string"
3873
+ },
3874
+ "autoProvisioned": {
3875
+ "type": "boolean"
3876
+ },
3877
+ "status": {
3878
+ "type": "string",
3879
+ "enum": ["active", "suspended"]
3880
+ },
3881
+ "createdAt": {
3882
+ "type": "number"
3883
+ }
3884
+ },
3885
+ "required": ["id", "name", "autoProvisioned", "createdAt"],
3886
+ "additionalProperties": false
3887
+ }
3888
+ },
3889
+ "nextCursor": {
3890
+ "type": "string",
3891
+ "nullable": true
3892
+ }
3893
+ },
3894
+ "required": ["tenants"],
3895
+ "additionalProperties": false
3896
+ },
3897
+ "TenantsList400Response": {
3898
+ "type": "object",
3899
+ "properties": {
3900
+ "error": {
3901
+ "type": "object",
3902
+ "properties": {
3903
+ "code": {
3904
+ "type": "string"
3905
+ },
3906
+ "message": {
3907
+ "type": "string"
3908
+ }
3909
+ },
3910
+ "required": ["code", "message"],
3911
+ "additionalProperties": false
3912
+ }
3913
+ },
3914
+ "required": ["error"],
3915
+ "additionalProperties": false
3916
+ },
3917
+ "TenantsGet200Response": {
3918
+ "type": "object",
3919
+ "properties": {
3920
+ "tenant": {
3921
+ "type": "object",
3922
+ "properties": {
3923
+ "id": {
3924
+ "type": "string"
3925
+ },
3926
+ "name": {
3927
+ "type": "string"
3928
+ },
3929
+ "autoProvisioned": {
3930
+ "type": "boolean"
3931
+ },
3932
+ "status": {
3933
+ "type": "string",
3934
+ "enum": ["active", "suspended"]
3935
+ },
3936
+ "createdAt": {
3937
+ "type": "number"
3938
+ }
3939
+ },
3940
+ "required": ["id", "name", "autoProvisioned", "createdAt"],
3941
+ "additionalProperties": false
3942
+ }
3943
+ },
3944
+ "required": ["tenant"],
3945
+ "additionalProperties": false
3946
+ },
3947
+ "TenantsGet404Response": {
3948
+ "type": "object",
3949
+ "properties": {
3950
+ "error": {
3951
+ "type": "object",
3952
+ "properties": {
3953
+ "code": {
3954
+ "type": "string"
3955
+ },
3956
+ "message": {
3957
+ "type": "string"
3958
+ }
3959
+ },
3960
+ "required": ["code", "message"],
3961
+ "additionalProperties": false
3962
+ }
3963
+ },
3964
+ "required": ["error"],
3965
+ "additionalProperties": false
3966
+ },
3967
+ "TenantsDeleteResponse": {
3968
+ "type": "object",
3969
+ "properties": {
3970
+ "error": {
3971
+ "type": "object",
3972
+ "properties": {
3973
+ "code": {
3974
+ "type": "string"
3975
+ },
3976
+ "message": {
3977
+ "type": "string"
3978
+ }
3979
+ },
3980
+ "required": ["code", "message"],
3981
+ "additionalProperties": false
3982
+ }
3983
+ },
3984
+ "required": ["error"],
3985
+ "additionalProperties": false
3986
+ },
3987
+ "DocumentsInitRequest": {
3988
+ "type": "object",
3989
+ "properties": {
3990
+ "contentLength": {
3991
+ "type": "number",
3992
+ "minimum": 1
3993
+ },
3994
+ "contentSha256": {
3995
+ "type": "string",
3996
+ "pattern": "^[0-9a-f]{64}$"
3997
+ },
3998
+ "metadata": {
3999
+ "type": "object",
4000
+ "additionalProperties": {}
4001
+ },
4002
+ "idempotencyKey": {
4003
+ "type": "string"
4004
+ },
4005
+ "dedupMode": {
4006
+ "type": "string",
4007
+ "enum": ["always-create", "reuse-existing"]
4008
+ },
4009
+ "docId": {
4010
+ "type": "string",
4011
+ "pattern": "^[A-Za-z0-9_-]+$"
4012
+ },
4013
+ "uploadTtlSec": {
4014
+ "type": "number",
4015
+ "minimum": 60,
4016
+ "maximum": 3600
4017
+ },
4018
+ "uploadPreference": {
4019
+ "type": "string",
4020
+ "enum": ["auto", "presigned", "proxy"]
4021
+ }
4022
+ },
4023
+ "required": ["contentLength", "contentSha256"],
4024
+ "additionalProperties": false
4025
+ },
4026
+ "DocumentsInit200Response": {
4027
+ "anyOf": [
4028
+ {
4029
+ "type": "object",
4030
+ "properties": {
4031
+ "tag": {
4032
+ "type": "string",
4033
+ "enum": ["created"]
4034
+ },
4035
+ "document": {
4036
+ "type": "object",
4037
+ "properties": {
4038
+ "id": {
4039
+ "type": "string"
4040
+ },
4041
+ "tenantId": {
4042
+ "type": "string"
4043
+ },
4044
+ "state": {
4045
+ "type": "string",
4046
+ "enum": ["pending", "ready", "failed", "deleting"]
4047
+ },
4048
+ "baseSha": {
4049
+ "type": "string",
4050
+ "nullable": true
4051
+ },
4052
+ "storageSizeBytes": {
4053
+ "type": "number",
4054
+ "nullable": true
4055
+ },
4056
+ "metadata": {
4057
+ "type": "object",
4058
+ "additionalProperties": {},
4059
+ "nullable": true
4060
+ },
4061
+ "idempotencyKey": {
4062
+ "type": "string",
4063
+ "nullable": true
4064
+ },
4065
+ "failureReason": {
4066
+ "type": "string",
4067
+ "nullable": true
4068
+ },
4069
+ "thumbnailState": {
4070
+ "type": "string",
4071
+ "enum": ["pending", "ready", "locked", "failed"]
4072
+ },
4073
+ "thumbnailUrl": {
4074
+ "type": "string",
4075
+ "nullable": true
4076
+ },
4077
+ "createdAt": {
4078
+ "type": "number"
4079
+ },
4080
+ "updatedAt": {
4081
+ "type": "number"
4082
+ },
4083
+ "createdBy": {
4084
+ "type": "string",
4085
+ "nullable": true
4086
+ }
4087
+ },
4088
+ "required": [
4089
+ "id",
4090
+ "tenantId",
4091
+ "state",
4092
+ "baseSha",
4093
+ "storageSizeBytes",
4094
+ "metadata",
4095
+ "idempotencyKey",
4096
+ "failureReason",
4097
+ "createdAt",
4098
+ "updatedAt",
4099
+ "createdBy"
4100
+ ],
4101
+ "additionalProperties": false
4102
+ },
4103
+ "upload": {
4104
+ "anyOf": [
4105
+ {
4106
+ "type": "object",
4107
+ "properties": {
4108
+ "kind": {
4109
+ "type": "string",
4110
+ "enum": ["presigned"]
4111
+ },
4112
+ "presigned": {
4113
+ "type": "object",
4114
+ "properties": {
4115
+ "url": {
4116
+ "type": "string"
4117
+ },
4118
+ "headers": {
4119
+ "type": "object",
4120
+ "additionalProperties": {
4121
+ "type": "string"
4122
+ }
4123
+ },
4124
+ "method": {
4125
+ "type": "string",
4126
+ "enum": ["PUT"]
4127
+ },
4128
+ "expiresAt": {
4129
+ "type": "number"
4130
+ }
4131
+ },
4132
+ "required": ["url", "headers", "method", "expiresAt"],
4133
+ "additionalProperties": false
4134
+ },
4135
+ "key": {
4136
+ "type": "string"
4137
+ }
4138
+ },
4139
+ "required": ["kind", "presigned", "key"],
4140
+ "additionalProperties": false
4141
+ },
4142
+ {
4143
+ "type": "object",
4144
+ "properties": {
4145
+ "kind": {
4146
+ "type": "string",
4147
+ "enum": ["proxy"]
4148
+ },
4149
+ "url": {
4150
+ "type": "string"
4151
+ },
4152
+ "key": {
4153
+ "type": "string"
4154
+ }
4155
+ },
4156
+ "required": ["kind", "url", "key"],
4157
+ "additionalProperties": false
4158
+ }
4159
+ ]
4160
+ }
4161
+ },
4162
+ "required": ["tag", "document", "upload"],
4163
+ "additionalProperties": false
4164
+ },
4165
+ {
4166
+ "type": "object",
4167
+ "properties": {
4168
+ "tag": {
4169
+ "type": "string",
4170
+ "enum": ["resumed"]
4171
+ },
4172
+ "document": {
4173
+ "$ref": "#/components/schemas/DocumentsInit200Response/anyOf/0/properties/document"
4174
+ },
4175
+ "upload": {
4176
+ "$ref": "#/components/schemas/DocumentsInit200Response/anyOf/0/properties/upload"
4177
+ }
4178
+ },
4179
+ "required": ["tag", "document", "upload"],
4180
+ "additionalProperties": false
4181
+ },
4182
+ {
4183
+ "type": "object",
4184
+ "properties": {
4185
+ "tag": {
4186
+ "type": "string",
4187
+ "enum": ["deduped"]
4188
+ },
4189
+ "document": {
4190
+ "$ref": "#/components/schemas/DocumentsInit200Response/anyOf/0/properties/document"
4191
+ }
4192
+ },
4193
+ "required": ["tag", "document"],
4194
+ "additionalProperties": false
4195
+ }
4196
+ ]
4197
+ },
4198
+ "DocumentsInit400Response": {
4199
+ "type": "object",
4200
+ "properties": {
4201
+ "error": {
4202
+ "type": "object",
4203
+ "properties": {
4204
+ "code": {
4205
+ "type": "string"
4206
+ },
4207
+ "message": {
4208
+ "type": "string"
4209
+ }
4210
+ },
4211
+ "required": ["code", "message"],
4212
+ "additionalProperties": false
4213
+ }
4214
+ },
4215
+ "required": ["error"],
4216
+ "additionalProperties": false
4217
+ },
4218
+ "DocumentsCommitRequest": {
4219
+ "type": "object",
4220
+ "properties": {
4221
+ "sha256": {
4222
+ "type": "string",
4223
+ "pattern": "^[0-9a-f]{64}$"
4224
+ }
4225
+ },
4226
+ "required": ["sha256"],
4227
+ "additionalProperties": false
4228
+ },
4229
+ "DocumentsCommit200Response": {
4230
+ "type": "object",
4231
+ "properties": {
4232
+ "document": {
4233
+ "type": "object",
4234
+ "properties": {
4235
+ "id": {
4236
+ "type": "string"
4237
+ },
4238
+ "tenantId": {
4239
+ "type": "string"
4240
+ },
4241
+ "state": {
4242
+ "type": "string",
4243
+ "enum": ["pending", "ready", "failed", "deleting"]
4244
+ },
4245
+ "baseSha": {
4246
+ "type": "string",
4247
+ "nullable": true
4248
+ },
4249
+ "storageSizeBytes": {
4250
+ "type": "number",
4251
+ "nullable": true
4252
+ },
4253
+ "metadata": {
4254
+ "type": "object",
4255
+ "additionalProperties": {},
4256
+ "nullable": true
4257
+ },
4258
+ "idempotencyKey": {
4259
+ "type": "string",
4260
+ "nullable": true
4261
+ },
4262
+ "failureReason": {
4263
+ "type": "string",
4264
+ "nullable": true
4265
+ },
4266
+ "thumbnailState": {
4267
+ "type": "string",
4268
+ "enum": ["pending", "ready", "locked", "failed"]
4269
+ },
4270
+ "thumbnailUrl": {
4271
+ "type": "string",
4272
+ "nullable": true
4273
+ },
4274
+ "createdAt": {
4275
+ "type": "number"
4276
+ },
4277
+ "updatedAt": {
4278
+ "type": "number"
4279
+ },
4280
+ "createdBy": {
4281
+ "type": "string",
4282
+ "nullable": true
4283
+ }
4284
+ },
4285
+ "required": [
4286
+ "id",
4287
+ "tenantId",
4288
+ "state",
4289
+ "baseSha",
4290
+ "storageSizeBytes",
4291
+ "metadata",
4292
+ "idempotencyKey",
4293
+ "failureReason",
4294
+ "createdAt",
4295
+ "updatedAt",
4296
+ "createdBy"
4297
+ ],
4298
+ "additionalProperties": false
4299
+ }
4300
+ },
4301
+ "required": ["document"],
4302
+ "additionalProperties": false
4303
+ },
4304
+ "DocumentsCommit400Response": {
4305
+ "type": "object",
4306
+ "properties": {
4307
+ "error": {
4308
+ "type": "object",
4309
+ "properties": {
4310
+ "code": {
4311
+ "type": "string"
4312
+ },
4313
+ "message": {
4314
+ "type": "string"
4315
+ }
4316
+ },
4317
+ "required": ["code", "message"],
4318
+ "additionalProperties": false
4319
+ }
4320
+ },
4321
+ "required": ["error"],
4322
+ "additionalProperties": false
4323
+ },
4324
+ "DocumentsCommit404Response": {
4325
+ "type": "object",
4326
+ "properties": {
4327
+ "error": {
4328
+ "type": "object",
4329
+ "properties": {
4330
+ "code": {
4331
+ "type": "string"
4332
+ },
4333
+ "message": {
4334
+ "type": "string"
4335
+ }
4336
+ },
4337
+ "required": ["code", "message"],
4338
+ "additionalProperties": false
4339
+ }
4340
+ },
4341
+ "required": ["error"],
4342
+ "additionalProperties": false
4343
+ },
4344
+ "DocumentsUploadProxy200Response": {
4345
+ "type": "object",
4346
+ "properties": {
4347
+ "sha256": {
4348
+ "type": "string",
4349
+ "pattern": "^[0-9a-f]{64}$"
4350
+ }
4351
+ },
4352
+ "required": ["sha256"],
4353
+ "additionalProperties": false
4354
+ },
4355
+ "DocumentsUploadProxy400Response": {
4356
+ "type": "object",
4357
+ "properties": {
4358
+ "error": {
4359
+ "type": "object",
4360
+ "properties": {
4361
+ "code": {
4362
+ "type": "string"
4363
+ },
4364
+ "message": {
4365
+ "type": "string"
4366
+ }
4367
+ },
4368
+ "required": ["code", "message"],
4369
+ "additionalProperties": false
4370
+ }
4371
+ },
4372
+ "required": ["error"],
4373
+ "additionalProperties": false
4374
+ },
4375
+ "DocumentsUploadProxy409Response": {
4376
+ "type": "object",
4377
+ "properties": {
4378
+ "error": {
4379
+ "type": "object",
4380
+ "properties": {
4381
+ "code": {
4382
+ "type": "string"
4383
+ },
4384
+ "message": {
4385
+ "type": "string"
4386
+ }
4387
+ },
4388
+ "required": ["code", "message"],
4389
+ "additionalProperties": false
4390
+ }
4391
+ },
4392
+ "required": ["error"],
4393
+ "additionalProperties": false
4394
+ },
4395
+ "DocumentsList200Response": {
4396
+ "type": "object",
4397
+ "properties": {
4398
+ "documents": {
4399
+ "type": "array",
4400
+ "items": {
4401
+ "type": "object",
4402
+ "properties": {
4403
+ "id": {
4404
+ "type": "string"
4405
+ },
4406
+ "tenantId": {
4407
+ "type": "string"
4408
+ },
4409
+ "state": {
4410
+ "type": "string",
4411
+ "enum": ["pending", "ready", "failed", "deleting"]
4412
+ },
4413
+ "baseSha": {
4414
+ "type": "string",
4415
+ "nullable": true
4416
+ },
4417
+ "storageSizeBytes": {
4418
+ "type": "number",
4419
+ "nullable": true
4420
+ },
4421
+ "metadata": {
4422
+ "type": "object",
4423
+ "additionalProperties": {},
4424
+ "nullable": true
4425
+ },
4426
+ "idempotencyKey": {
4427
+ "type": "string",
4428
+ "nullable": true
4429
+ },
4430
+ "failureReason": {
4431
+ "type": "string",
4432
+ "nullable": true
4433
+ },
4434
+ "thumbnailState": {
4435
+ "type": "string",
4436
+ "enum": ["pending", "ready", "locked", "failed"]
4437
+ },
4438
+ "thumbnailUrl": {
4439
+ "type": "string",
4440
+ "nullable": true
4441
+ },
4442
+ "createdAt": {
4443
+ "type": "number"
4444
+ },
4445
+ "updatedAt": {
4446
+ "type": "number"
4447
+ },
4448
+ "createdBy": {
4449
+ "type": "string",
4450
+ "nullable": true
4451
+ }
4452
+ },
4453
+ "required": [
4454
+ "id",
4455
+ "tenantId",
4456
+ "state",
4457
+ "baseSha",
4458
+ "storageSizeBytes",
4459
+ "metadata",
4460
+ "idempotencyKey",
4461
+ "failureReason",
4462
+ "createdAt",
4463
+ "updatedAt",
4464
+ "createdBy"
4465
+ ],
4466
+ "additionalProperties": false
4467
+ }
4468
+ },
4469
+ "nextCursor": {
4470
+ "type": "string",
4471
+ "nullable": true
4472
+ }
4473
+ },
4474
+ "required": ["documents"],
4475
+ "additionalProperties": false
4476
+ },
4477
+ "DocumentsList400Response": {
4478
+ "type": "object",
4479
+ "properties": {
4480
+ "error": {
4481
+ "type": "object",
4482
+ "properties": {
4483
+ "code": {
4484
+ "type": "string"
4485
+ },
4486
+ "message": {
4487
+ "type": "string"
4488
+ }
4489
+ },
4490
+ "required": ["code", "message"],
4491
+ "additionalProperties": false
4492
+ }
4493
+ },
4494
+ "required": ["error"],
4495
+ "additionalProperties": false
4496
+ },
4497
+ "DocumentsGet200Response": {
4498
+ "type": "object",
4499
+ "properties": {
4500
+ "document": {
4501
+ "type": "object",
4502
+ "properties": {
4503
+ "id": {
4504
+ "type": "string"
4505
+ },
4506
+ "tenantId": {
4507
+ "type": "string"
4508
+ },
4509
+ "state": {
4510
+ "type": "string",
4511
+ "enum": ["pending", "ready", "failed", "deleting"]
4512
+ },
4513
+ "baseSha": {
4514
+ "type": "string",
4515
+ "nullable": true
4516
+ },
4517
+ "storageSizeBytes": {
4518
+ "type": "number",
4519
+ "nullable": true
4520
+ },
4521
+ "metadata": {
4522
+ "type": "object",
4523
+ "additionalProperties": {},
4524
+ "nullable": true
4525
+ },
4526
+ "idempotencyKey": {
4527
+ "type": "string",
4528
+ "nullable": true
4529
+ },
4530
+ "failureReason": {
4531
+ "type": "string",
4532
+ "nullable": true
4533
+ },
4534
+ "thumbnailState": {
4535
+ "type": "string",
4536
+ "enum": ["pending", "ready", "locked", "failed"]
4537
+ },
4538
+ "thumbnailUrl": {
4539
+ "type": "string",
4540
+ "nullable": true
4541
+ },
4542
+ "createdAt": {
4543
+ "type": "number"
4544
+ },
4545
+ "updatedAt": {
4546
+ "type": "number"
4547
+ },
4548
+ "createdBy": {
4549
+ "type": "string",
4550
+ "nullable": true
4551
+ }
4552
+ },
4553
+ "required": [
4554
+ "id",
4555
+ "tenantId",
4556
+ "state",
4557
+ "baseSha",
4558
+ "storageSizeBytes",
4559
+ "metadata",
4560
+ "idempotencyKey",
4561
+ "failureReason",
4562
+ "createdAt",
4563
+ "updatedAt",
4564
+ "createdBy"
4565
+ ],
4566
+ "additionalProperties": false
4567
+ }
4568
+ },
4569
+ "required": ["document"],
4570
+ "additionalProperties": false
4571
+ },
4572
+ "DocumentsGet403Response": {
4573
+ "type": "object",
4574
+ "properties": {
4575
+ "error": {
4576
+ "type": "object",
4577
+ "properties": {
4578
+ "code": {
4579
+ "type": "string"
4580
+ },
4581
+ "message": {
4582
+ "type": "string"
4583
+ }
4584
+ },
4585
+ "required": ["code", "message"],
4586
+ "additionalProperties": false
4587
+ }
4588
+ },
4589
+ "required": ["error"],
4590
+ "additionalProperties": false
4591
+ },
4592
+ "DocumentsGet404Response": {
4593
+ "type": "object",
4594
+ "properties": {
4595
+ "error": {
4596
+ "type": "object",
4597
+ "properties": {
4598
+ "code": {
4599
+ "type": "string"
4600
+ },
4601
+ "message": {
4602
+ "type": "string"
4603
+ }
4604
+ },
4605
+ "required": ["code", "message"],
4606
+ "additionalProperties": false
4607
+ }
4608
+ },
4609
+ "required": ["error"],
4610
+ "additionalProperties": false
4611
+ },
4612
+ "DocumentsDownload403Response": {
4613
+ "type": "object",
4614
+ "properties": {
4615
+ "error": {
4616
+ "type": "object",
4617
+ "properties": {
4618
+ "code": {
4619
+ "type": "string"
4620
+ },
4621
+ "message": {
4622
+ "type": "string"
4623
+ }
4624
+ },
4625
+ "required": ["code", "message"],
4626
+ "additionalProperties": false
4627
+ }
4628
+ },
4629
+ "required": ["error"],
4630
+ "additionalProperties": false
4631
+ },
4632
+ "DocumentsDownload404Response": {
4633
+ "type": "object",
4634
+ "properties": {
4635
+ "error": {
4636
+ "type": "object",
4637
+ "properties": {
4638
+ "code": {
4639
+ "type": "string"
4640
+ },
4641
+ "message": {
4642
+ "type": "string"
4643
+ }
4644
+ },
4645
+ "required": ["code", "message"],
4646
+ "additionalProperties": false
4647
+ }
4648
+ },
4649
+ "required": ["error"],
4650
+ "additionalProperties": false
4651
+ },
4652
+ "DocumentsDelete403Response": {
4653
+ "type": "object",
4654
+ "properties": {
4655
+ "error": {
4656
+ "type": "object",
4657
+ "properties": {
4658
+ "code": {
4659
+ "type": "string"
4660
+ },
4661
+ "message": {
4662
+ "type": "string"
4663
+ }
4664
+ },
4665
+ "required": ["code", "message"],
4666
+ "additionalProperties": false
4667
+ }
4668
+ },
4669
+ "required": ["error"],
2988
4670
  "additionalProperties": false
2989
4671
  },
2990
- "EngineErrorPayload": {
4672
+ "DocumentsDelete404Response": {
2991
4673
  "type": "object",
2992
4674
  "properties": {
2993
- "name": {
2994
- "type": "string",
2995
- "enum": ["EngineError"]
4675
+ "error": {
4676
+ "type": "object",
4677
+ "properties": {
4678
+ "code": {
4679
+ "type": "string"
4680
+ },
4681
+ "message": {
4682
+ "type": "string"
4683
+ }
4684
+ },
4685
+ "required": ["code", "message"],
4686
+ "additionalProperties": false
4687
+ }
4688
+ },
4689
+ "required": ["error"],
4690
+ "additionalProperties": false
4691
+ },
4692
+ "DocumentsThumbnailResponse": {
4693
+ "type": "object",
4694
+ "properties": {
4695
+ "error": {
4696
+ "type": "object",
4697
+ "properties": {
4698
+ "code": {
4699
+ "type": "string"
4700
+ },
4701
+ "message": {
4702
+ "type": "string"
4703
+ },
4704
+ "state": {
4705
+ "type": "string"
4706
+ }
4707
+ },
4708
+ "required": ["code", "message", "state"],
4709
+ "additionalProperties": false
4710
+ }
4711
+ },
4712
+ "required": ["error"],
4713
+ "additionalProperties": false
4714
+ },
4715
+ "DeploymentLicenseStatusResponse": {
4716
+ "type": "object",
4717
+ "properties": {
4718
+ "license": {},
4719
+ "reporting": {
4720
+ "nullable": true
2996
4721
  },
2997
- "code": {
2998
- "type": "string",
2999
- "enum": [
3000
- "Unknown",
3001
- "InvalidArg",
3002
- "DocNotOpen",
3003
- "DocOpenFailed",
3004
- "DocPasswordRequired",
3005
- "DocPasswordIncorrect",
3006
- "Aborted",
3007
- "Network",
3008
- "Unauthenticated",
3009
- "Forbidden",
3010
- "NotFound",
3011
- "WireFormat",
3012
- "RuntimeUnavailable",
3013
- "InvalidReference",
3014
- "WeakAnnotationSessionConflict",
3015
- "LayerVersionConflict",
3016
- "NotImplemented",
3017
- "MalformedPdf"
3018
- ]
4722
+ "usage": {
4723
+ "nullable": true
4724
+ }
4725
+ },
4726
+ "additionalProperties": false
4727
+ },
4728
+ "TokensIssueRequest": {
4729
+ "anyOf": [
4730
+ {
4731
+ "type": "object",
4732
+ "properties": {
4733
+ "kind": {
4734
+ "type": "string",
4735
+ "enum": ["doc"]
4736
+ },
4737
+ "sub": {
4738
+ "type": "string",
4739
+ "minLength": 1,
4740
+ "maxLength": 256
4741
+ },
4742
+ "docId": {
4743
+ "type": "string",
4744
+ "pattern": "^[A-Za-z0-9_-]+$"
4745
+ },
4746
+ "layerName": {
4747
+ "type": "string",
4748
+ "minLength": 1,
4749
+ "maxLength": 256
4750
+ },
4751
+ "scope": {
4752
+ "type": "array",
4753
+ "items": {
4754
+ "type": "string",
4755
+ "minLength": 1,
4756
+ "maxLength": 128
4757
+ },
4758
+ "minItems": 1,
4759
+ "maxItems": 64
4760
+ },
4761
+ "userId": {
4762
+ "type": "string",
4763
+ "maxLength": 256
4764
+ },
4765
+ "displayName": {
4766
+ "type": "string",
4767
+ "maxLength": 256
4768
+ },
4769
+ "groupId": {
4770
+ "type": "string",
4771
+ "maxLength": 256
4772
+ },
4773
+ "groups": {
4774
+ "type": "array",
4775
+ "items": {
4776
+ "type": "string",
4777
+ "maxLength": 256
4778
+ },
4779
+ "maxItems": 64
4780
+ },
4781
+ "origins": {
4782
+ "type": "array",
4783
+ "items": {
4784
+ "type": "string",
4785
+ "maxLength": 262,
4786
+ "pattern": "^https?:\\/\\/(\\*\\.)?[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*(:\\d{1,5})?$"
4787
+ },
4788
+ "minItems": 1,
4789
+ "maxItems": 32
4790
+ },
4791
+ "expiresIn": {
4792
+ "type": "integer",
4793
+ "minimum": 60,
4794
+ "maximum": 7776000
4795
+ }
4796
+ },
4797
+ "required": ["kind", "sub", "docId", "scope", "expiresIn"],
4798
+ "additionalProperties": false
3019
4799
  },
3020
- "message": {
4800
+ {
4801
+ "type": "object",
4802
+ "properties": {
4803
+ "kind": {
4804
+ "type": "string",
4805
+ "enum": ["tenant"]
4806
+ },
4807
+ "sub": {
4808
+ "type": "string",
4809
+ "minLength": 1,
4810
+ "maxLength": 256
4811
+ },
4812
+ "scope": {
4813
+ "type": "array",
4814
+ "items": {
4815
+ "anyOf": [
4816
+ {
4817
+ "type": "string",
4818
+ "enum": ["*"]
4819
+ },
4820
+ {
4821
+ "type": "string",
4822
+ "enum": [
4823
+ "docs.create",
4824
+ "docs.read",
4825
+ "docs.delete",
4826
+ "tokens.issue-doc",
4827
+ "tokens.revoke",
4828
+ "shares.manage"
4829
+ ]
4830
+ }
4831
+ ]
4832
+ },
4833
+ "minItems": 1,
4834
+ "maxItems": 16
4835
+ },
4836
+ "expiresIn": {
4837
+ "type": "integer",
4838
+ "minimum": 60,
4839
+ "maximum": 7776000
4840
+ }
4841
+ },
4842
+ "required": ["kind", "sub", "scope", "expiresIn"],
4843
+ "additionalProperties": false
4844
+ }
4845
+ ]
4846
+ },
4847
+ "TokensIssue200Response": {
4848
+ "type": "object",
4849
+ "properties": {
4850
+ "token": {
3021
4851
  "type": "string"
3022
4852
  },
3023
- "details": {
3024
- "type": "object",
3025
- "additionalProperties": {}
4853
+ "jti": {
4854
+ "type": "string"
4855
+ },
4856
+ "expiresAt": {
4857
+ "type": "number"
3026
4858
  }
3027
4859
  },
3028
- "required": ["name", "code", "message"],
4860
+ "required": ["token", "jti", "expiresAt"],
3029
4861
  "additionalProperties": false
3030
4862
  },
3031
- "TenantsCreateRequest": {
4863
+ "TokensIssue400Response": {
3032
4864
  "type": "object",
3033
4865
  "properties": {
3034
- "id": {
3035
- "type": "string",
3036
- "pattern": "^[A-Za-z0-9_-]+$"
3037
- },
3038
- "name": {
3039
- "type": "string",
3040
- "minLength": 1,
3041
- "maxLength": 256
4866
+ "error": {
4867
+ "type": "object",
4868
+ "properties": {
4869
+ "code": {
4870
+ "type": "string"
4871
+ },
4872
+ "message": {
4873
+ "type": "string"
4874
+ }
4875
+ },
4876
+ "required": ["code", "message"],
4877
+ "additionalProperties": false
3042
4878
  }
3043
4879
  },
3044
- "required": ["id"],
4880
+ "required": ["error"],
3045
4881
  "additionalProperties": false
3046
4882
  },
3047
- "TenantsCreate200Response": {
4883
+ "TokensIssue403Response": {
3048
4884
  "type": "object",
3049
4885
  "properties": {
3050
- "tenant": {
4886
+ "error": {
3051
4887
  "type": "object",
3052
4888
  "properties": {
3053
- "id": {
4889
+ "code": {
3054
4890
  "type": "string"
3055
4891
  },
3056
- "name": {
4892
+ "message": {
3057
4893
  "type": "string"
3058
- },
3059
- "autoProvisioned": {
3060
- "type": "boolean"
3061
- },
3062
- "createdAt": {
3063
- "type": "number"
3064
4894
  }
3065
4895
  },
3066
- "required": ["id", "name", "autoProvisioned", "createdAt"],
4896
+ "required": ["code", "message"],
3067
4897
  "additionalProperties": false
3068
- },
3069
- "created": {
3070
- "type": "boolean"
3071
4898
  }
3072
4899
  },
3073
- "required": ["tenant", "created"],
4900
+ "required": ["error"],
3074
4901
  "additionalProperties": false
3075
4902
  },
3076
- "TenantsCreate400Response": {
4903
+ "TokensIssue404Response": {
3077
4904
  "type": "object",
3078
4905
  "properties": {
3079
4906
  "error": {
@@ -3093,40 +4920,22 @@
3093
4920
  "required": ["error"],
3094
4921
  "additionalProperties": false
3095
4922
  },
3096
- "TenantsList200Response": {
4923
+ "TokensRevokeRequest": {
3097
4924
  "type": "object",
3098
4925
  "properties": {
3099
- "tenants": {
3100
- "type": "array",
3101
- "items": {
3102
- "type": "object",
3103
- "properties": {
3104
- "id": {
3105
- "type": "string"
3106
- },
3107
- "name": {
3108
- "type": "string"
3109
- },
3110
- "autoProvisioned": {
3111
- "type": "boolean"
3112
- },
3113
- "createdAt": {
3114
- "type": "number"
3115
- }
3116
- },
3117
- "required": ["id", "name", "autoProvisioned", "createdAt"],
3118
- "additionalProperties": false
3119
- }
3120
- },
3121
- "nextCursor": {
4926
+ "reason": {
3122
4927
  "type": "string",
3123
- "nullable": true
4928
+ "maxLength": 1024
4929
+ },
4930
+ "expiresAtSeconds": {
4931
+ "type": "integer",
4932
+ "exclusiveMinimum": true,
4933
+ "minimum": 0
3124
4934
  }
3125
4935
  },
3126
- "required": ["tenants"],
3127
4936
  "additionalProperties": false
3128
4937
  },
3129
- "TenantsList400Response": {
4938
+ "TokensRevokeResponse": {
3130
4939
  "type": "object",
3131
4940
  "properties": {
3132
4941
  "error": {
@@ -3146,33 +4955,39 @@
3146
4955
  "required": ["error"],
3147
4956
  "additionalProperties": false
3148
4957
  },
3149
- "TenantsGet200Response": {
4958
+ "TenantsUsage200Response": {
3150
4959
  "type": "object",
3151
4960
  "properties": {
3152
- "tenant": {
4961
+ "tenantId": {
4962
+ "type": "string"
4963
+ },
4964
+ "periodStart": {
4965
+ "type": "string"
4966
+ },
4967
+ "periodEnd": {
4968
+ "type": "string"
4969
+ },
4970
+ "metrics": {
3153
4971
  "type": "object",
3154
4972
  "properties": {
3155
- "id": {
3156
- "type": "string"
3157
- },
3158
- "name": {
3159
- "type": "string"
4973
+ "pdf.views": {
4974
+ "type": "number"
3160
4975
  },
3161
- "autoProvisioned": {
3162
- "type": "boolean"
4976
+ "pdf.uploads": {
4977
+ "type": "number"
3163
4978
  },
3164
- "createdAt": {
4979
+ "storage.bytes": {
3165
4980
  "type": "number"
3166
4981
  }
3167
4982
  },
3168
- "required": ["id", "name", "autoProvisioned", "createdAt"],
4983
+ "required": ["pdf.views", "pdf.uploads", "storage.bytes"],
3169
4984
  "additionalProperties": false
3170
4985
  }
3171
4986
  },
3172
- "required": ["tenant"],
4987
+ "required": ["tenantId", "periodStart", "periodEnd", "metrics"],
3173
4988
  "additionalProperties": false
3174
4989
  },
3175
- "TenantsGet404Response": {
4990
+ "TenantsUsage400Response": {
3176
4991
  "type": "object",
3177
4992
  "properties": {
3178
4993
  "error": {
@@ -3192,7 +5007,7 @@
3192
5007
  "required": ["error"],
3193
5008
  "additionalProperties": false
3194
5009
  },
3195
- "TenantsDeleteResponse": {
5010
+ "TenantsUsage404Response": {
3196
5011
  "type": "object",
3197
5012
  "properties": {
3198
5013
  "error": {
@@ -3212,214 +5027,37 @@
3212
5027
  "required": ["error"],
3213
5028
  "additionalProperties": false
3214
5029
  },
3215
- "DocumentsInitRequest": {
5030
+ "TenantsSuspendRequest": {
3216
5031
  "type": "object",
3217
5032
  "properties": {
3218
- "contentLength": {
3219
- "type": "number",
3220
- "minimum": 1
3221
- },
3222
- "contentSha256": {
3223
- "type": "string",
3224
- "pattern": "^[0-9a-f]{64}$"
3225
- },
3226
- "metadata": {
3227
- "type": "object",
3228
- "additionalProperties": {}
3229
- },
3230
- "idempotencyKey": {
3231
- "type": "string"
3232
- },
3233
- "dedupMode": {
3234
- "type": "string",
3235
- "enum": ["always-create", "reuse-existing"]
3236
- },
3237
- "docId": {
5033
+ "reason": {
3238
5034
  "type": "string",
3239
- "pattern": "^[A-Za-z0-9_-]+$"
3240
- },
3241
- "uploadTtlSec": {
3242
- "type": "number",
3243
- "minimum": 60,
3244
- "maximum": 3600
5035
+ "maxLength": 1024
3245
5036
  }
3246
5037
  },
3247
- "required": ["contentLength", "contentSha256"],
3248
5038
  "additionalProperties": false
3249
5039
  },
3250
- "DocumentsInit200Response": {
3251
- "anyOf": [
3252
- {
3253
- "type": "object",
3254
- "properties": {
3255
- "tag": {
3256
- "type": "string",
3257
- "enum": ["created"]
3258
- },
3259
- "document": {
3260
- "type": "object",
3261
- "properties": {
3262
- "id": {
3263
- "type": "string"
3264
- },
3265
- "tenantId": {
3266
- "type": "string"
3267
- },
3268
- "state": {
3269
- "type": "string",
3270
- "enum": ["pending", "ready", "failed", "deleting"]
3271
- },
3272
- "baseSha": {
3273
- "type": "string",
3274
- "nullable": true
3275
- },
3276
- "storageSizeBytes": {
3277
- "type": "number",
3278
- "nullable": true
3279
- },
3280
- "metadata": {
3281
- "type": "object",
3282
- "additionalProperties": {},
3283
- "nullable": true
3284
- },
3285
- "idempotencyKey": {
3286
- "type": "string",
3287
- "nullable": true
3288
- },
3289
- "failureReason": {
3290
- "type": "string",
3291
- "nullable": true
3292
- },
3293
- "thumbnailState": {
3294
- "type": "string",
3295
- "enum": ["pending", "ready", "locked", "failed"]
3296
- },
3297
- "thumbnailUrl": {
3298
- "type": "string",
3299
- "nullable": true
3300
- },
3301
- "createdAt": {
3302
- "type": "number"
3303
- },
3304
- "updatedAt": {
3305
- "type": "number"
3306
- },
3307
- "createdBy": {
3308
- "type": "string",
3309
- "nullable": true
3310
- }
3311
- },
3312
- "required": [
3313
- "id",
3314
- "tenantId",
3315
- "state",
3316
- "baseSha",
3317
- "storageSizeBytes",
3318
- "metadata",
3319
- "idempotencyKey",
3320
- "failureReason",
3321
- "createdAt",
3322
- "updatedAt",
3323
- "createdBy"
3324
- ],
3325
- "additionalProperties": false
3326
- },
3327
- "upload": {
3328
- "anyOf": [
3329
- {
3330
- "type": "object",
3331
- "properties": {
3332
- "kind": {
3333
- "type": "string",
3334
- "enum": ["presigned"]
3335
- },
3336
- "presigned": {
3337
- "type": "object",
3338
- "properties": {
3339
- "url": {
3340
- "type": "string"
3341
- },
3342
- "headers": {
3343
- "type": "object",
3344
- "additionalProperties": {
3345
- "type": "string"
3346
- }
3347
- },
3348
- "method": {
3349
- "type": "string",
3350
- "enum": ["PUT"]
3351
- },
3352
- "expiresAt": {
3353
- "type": "number"
3354
- }
3355
- },
3356
- "required": ["url", "headers", "method", "expiresAt"],
3357
- "additionalProperties": false
3358
- },
3359
- "key": {
3360
- "type": "string"
3361
- }
3362
- },
3363
- "required": ["kind", "presigned", "key"],
3364
- "additionalProperties": false
3365
- },
3366
- {
3367
- "type": "object",
3368
- "properties": {
3369
- "kind": {
3370
- "type": "string",
3371
- "enum": ["direct"]
3372
- },
3373
- "url": {
3374
- "type": "string"
3375
- },
3376
- "key": {
3377
- "type": "string"
3378
- }
3379
- },
3380
- "required": ["kind", "url", "key"],
3381
- "additionalProperties": false
3382
- }
3383
- ]
3384
- }
3385
- },
3386
- "required": ["tag", "document", "upload"],
3387
- "additionalProperties": false
3388
- },
3389
- {
3390
- "type": "object",
3391
- "properties": {
3392
- "tag": {
3393
- "type": "string",
3394
- "enum": ["resumed"]
3395
- },
3396
- "document": {
3397
- "$ref": "#/components/schemas/DocumentsInit200Response/anyOf/0/properties/document"
3398
- },
3399
- "upload": {
3400
- "$ref": "#/components/schemas/DocumentsInit200Response/anyOf/0/properties/upload"
3401
- }
3402
- },
3403
- "required": ["tag", "document", "upload"],
3404
- "additionalProperties": false
3405
- },
3406
- {
5040
+ "TenantsSuspendResponse": {
5041
+ "type": "object",
5042
+ "properties": {
5043
+ "error": {
3407
5044
  "type": "object",
3408
5045
  "properties": {
3409
- "tag": {
3410
- "type": "string",
3411
- "enum": ["deduped"]
3412
- },
3413
- "document": {
3414
- "$ref": "#/components/schemas/DocumentsInit200Response/anyOf/0/properties/document"
5046
+ "code": {
5047
+ "type": "string"
5048
+ },
5049
+ "message": {
5050
+ "type": "string"
3415
5051
  }
3416
5052
  },
3417
- "required": ["tag", "document"],
5053
+ "required": ["code", "message"],
3418
5054
  "additionalProperties": false
3419
5055
  }
3420
- ]
5056
+ },
5057
+ "required": ["error"],
5058
+ "additionalProperties": false
3421
5059
  },
3422
- "DocumentsInit400Response": {
5060
+ "TenantsResumeResponse": {
3423
5061
  "type": "object",
3424
5062
  "properties": {
3425
5063
  "error": {
@@ -3439,21 +5077,61 @@
3439
5077
  "required": ["error"],
3440
5078
  "additionalProperties": false
3441
5079
  },
3442
- "DocumentsCommitRequest": {
5080
+ "SharesCreateRequest": {
3443
5081
  "type": "object",
3444
5082
  "properties": {
3445
- "sha256": {
5083
+ "docId": {
3446
5084
  "type": "string",
3447
- "pattern": "^[0-9a-f]{64}$"
5085
+ "pattern": "^[A-Za-z0-9_-]+$"
5086
+ },
5087
+ "layerName": {
5088
+ "type": "string",
5089
+ "minLength": 1,
5090
+ "maxLength": 256
5091
+ },
5092
+ "scope": {
5093
+ "type": "array",
5094
+ "items": {
5095
+ "type": "string",
5096
+ "minLength": 1,
5097
+ "maxLength": 128
5098
+ },
5099
+ "minItems": 1,
5100
+ "maxItems": 64
5101
+ },
5102
+ "origins": {
5103
+ "type": "array",
5104
+ "items": {
5105
+ "type": "string",
5106
+ "maxLength": 262,
5107
+ "pattern": "^https?:\\/\\/(\\*\\.)?[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*(:\\d{1,5})?$"
5108
+ },
5109
+ "minItems": 1,
5110
+ "maxItems": 32
5111
+ },
5112
+ "password": {
5113
+ "type": "string",
5114
+ "minLength": 1,
5115
+ "maxLength": 1024
5116
+ },
5117
+ "sessionTtlSeconds": {
5118
+ "type": "integer",
5119
+ "minimum": 60,
5120
+ "maximum": 3600
5121
+ },
5122
+ "expiresAt": {
5123
+ "type": "integer",
5124
+ "exclusiveMinimum": true,
5125
+ "minimum": 0
3448
5126
  }
3449
5127
  },
3450
- "required": ["sha256"],
5128
+ "required": ["docId", "scope"],
3451
5129
  "additionalProperties": false
3452
5130
  },
3453
- "DocumentsCommit200Response": {
5131
+ "SharesCreate200Response": {
3454
5132
  "type": "object",
3455
5133
  "properties": {
3456
- "document": {
5134
+ "share": {
3457
5135
  "type": "object",
3458
5136
  "properties": {
3459
5137
  "id": {
@@ -3462,70 +5140,79 @@
3462
5140
  "tenantId": {
3463
5141
  "type": "string"
3464
5142
  },
3465
- "state": {
3466
- "type": "string",
3467
- "enum": ["pending", "ready", "failed", "deleting"]
5143
+ "docId": {
5144
+ "type": "string"
3468
5145
  },
3469
- "baseSha": {
3470
- "type": "string",
3471
- "nullable": true
5146
+ "layerName": {
5147
+ "type": "string"
3472
5148
  },
3473
- "storageSizeBytes": {
3474
- "type": "number",
3475
- "nullable": true
5149
+ "scope": {
5150
+ "type": "array",
5151
+ "items": {
5152
+ "type": "string"
5153
+ }
3476
5154
  },
3477
- "metadata": {
3478
- "type": "object",
3479
- "additionalProperties": {},
5155
+ "origins": {
5156
+ "type": "array",
5157
+ "items": {
5158
+ "type": "string"
5159
+ },
3480
5160
  "nullable": true
3481
5161
  },
3482
- "idempotencyKey": {
3483
- "type": "string",
3484
- "nullable": true
5162
+ "passwordProtected": {
5163
+ "type": "boolean"
3485
5164
  },
3486
- "failureReason": {
3487
- "type": "string",
5165
+ "sessionTtlSeconds": {
5166
+ "type": "number"
5167
+ },
5168
+ "disabled": {
5169
+ "type": "boolean"
5170
+ },
5171
+ "expiresAt": {
5172
+ "type": "number",
3488
5173
  "nullable": true
3489
5174
  },
3490
- "thumbnailState": {
3491
- "type": "string",
3492
- "enum": ["pending", "ready", "locked", "failed"]
5175
+ "exchangeCount": {
5176
+ "type": "number"
3493
5177
  },
3494
- "thumbnailUrl": {
3495
- "type": "string",
5178
+ "lastExchangedAt": {
5179
+ "type": "number",
3496
5180
  "nullable": true
3497
5181
  },
5182
+ "createdBy": {
5183
+ "type": "string"
5184
+ },
3498
5185
  "createdAt": {
3499
5186
  "type": "number"
3500
5187
  },
3501
5188
  "updatedAt": {
3502
5189
  "type": "number"
3503
- },
3504
- "createdBy": {
3505
- "type": "string",
3506
- "nullable": true
3507
5190
  }
3508
5191
  },
3509
5192
  "required": [
3510
5193
  "id",
3511
5194
  "tenantId",
3512
- "state",
3513
- "baseSha",
3514
- "storageSizeBytes",
3515
- "metadata",
3516
- "idempotencyKey",
3517
- "failureReason",
5195
+ "docId",
5196
+ "layerName",
5197
+ "scope",
5198
+ "origins",
5199
+ "passwordProtected",
5200
+ "sessionTtlSeconds",
5201
+ "disabled",
5202
+ "expiresAt",
5203
+ "exchangeCount",
5204
+ "lastExchangedAt",
5205
+ "createdBy",
3518
5206
  "createdAt",
3519
- "updatedAt",
3520
- "createdBy"
5207
+ "updatedAt"
3521
5208
  ],
3522
5209
  "additionalProperties": false
3523
5210
  }
3524
5211
  },
3525
- "required": ["document"],
5212
+ "required": ["share"],
3526
5213
  "additionalProperties": false
3527
5214
  },
3528
- "DocumentsCommit400Response": {
5215
+ "SharesCreate400Response": {
3529
5216
  "type": "object",
3530
5217
  "properties": {
3531
5218
  "error": {
@@ -3545,7 +5232,7 @@
3545
5232
  "required": ["error"],
3546
5233
  "additionalProperties": false
3547
5234
  },
3548
- "DocumentsCommit404Response": {
5235
+ "SharesCreate403Response": {
3549
5236
  "type": "object",
3550
5237
  "properties": {
3551
5238
  "error": {
@@ -3565,18 +5252,7 @@
3565
5252
  "required": ["error"],
3566
5253
  "additionalProperties": false
3567
5254
  },
3568
- "DocumentsUploadDirect200Response": {
3569
- "type": "object",
3570
- "properties": {
3571
- "sha256": {
3572
- "type": "string",
3573
- "pattern": "^[0-9a-f]{64}$"
3574
- }
3575
- },
3576
- "required": ["sha256"],
3577
- "additionalProperties": false
3578
- },
3579
- "DocumentsUploadDirect400Response": {
5255
+ "SharesCreate404Response": {
3580
5256
  "type": "object",
3581
5257
  "properties": {
3582
5258
  "error": {
@@ -3596,10 +5272,10 @@
3596
5272
  "required": ["error"],
3597
5273
  "additionalProperties": false
3598
5274
  },
3599
- "DocumentsList200Response": {
5275
+ "SharesList200Response": {
3600
5276
  "type": "object",
3601
5277
  "properties": {
3602
- "documents": {
5278
+ "shares": {
3603
5279
  "type": "array",
3604
5280
  "items": {
3605
5281
  "type": "object",
@@ -3610,62 +5286,71 @@
3610
5286
  "tenantId": {
3611
5287
  "type": "string"
3612
5288
  },
3613
- "state": {
3614
- "type": "string",
3615
- "enum": ["pending", "ready", "failed", "deleting"]
5289
+ "docId": {
5290
+ "type": "string"
3616
5291
  },
3617
- "baseSha": {
3618
- "type": "string",
3619
- "nullable": true
5292
+ "layerName": {
5293
+ "type": "string"
3620
5294
  },
3621
- "storageSizeBytes": {
3622
- "type": "number",
3623
- "nullable": true
5295
+ "scope": {
5296
+ "type": "array",
5297
+ "items": {
5298
+ "type": "string"
5299
+ }
3624
5300
  },
3625
- "metadata": {
3626
- "type": "object",
3627
- "additionalProperties": {},
5301
+ "origins": {
5302
+ "type": "array",
5303
+ "items": {
5304
+ "type": "string"
5305
+ },
3628
5306
  "nullable": true
3629
5307
  },
3630
- "idempotencyKey": {
3631
- "type": "string",
3632
- "nullable": true
5308
+ "passwordProtected": {
5309
+ "type": "boolean"
3633
5310
  },
3634
- "failureReason": {
3635
- "type": "string",
5311
+ "sessionTtlSeconds": {
5312
+ "type": "number"
5313
+ },
5314
+ "disabled": {
5315
+ "type": "boolean"
5316
+ },
5317
+ "expiresAt": {
5318
+ "type": "number",
3636
5319
  "nullable": true
3637
5320
  },
3638
- "thumbnailState": {
3639
- "type": "string",
3640
- "enum": ["pending", "ready", "locked", "failed"]
5321
+ "exchangeCount": {
5322
+ "type": "number"
3641
5323
  },
3642
- "thumbnailUrl": {
3643
- "type": "string",
5324
+ "lastExchangedAt": {
5325
+ "type": "number",
3644
5326
  "nullable": true
3645
5327
  },
5328
+ "createdBy": {
5329
+ "type": "string"
5330
+ },
3646
5331
  "createdAt": {
3647
5332
  "type": "number"
3648
5333
  },
3649
5334
  "updatedAt": {
3650
5335
  "type": "number"
3651
- },
3652
- "createdBy": {
3653
- "type": "string",
3654
- "nullable": true
3655
5336
  }
3656
5337
  },
3657
5338
  "required": [
3658
5339
  "id",
3659
5340
  "tenantId",
3660
- "state",
3661
- "baseSha",
3662
- "storageSizeBytes",
3663
- "metadata",
3664
- "idempotencyKey",
3665
- "failureReason",
5341
+ "docId",
5342
+ "layerName",
5343
+ "scope",
5344
+ "origins",
5345
+ "passwordProtected",
5346
+ "sessionTtlSeconds",
5347
+ "disabled",
5348
+ "expiresAt",
5349
+ "exchangeCount",
5350
+ "lastExchangedAt",
5351
+ "createdBy",
3666
5352
  "createdAt",
3667
- "updatedAt",
3668
- "createdBy"
5353
+ "updatedAt"
3669
5354
  ],
3670
5355
  "additionalProperties": false
3671
5356
  }
@@ -3675,10 +5360,10 @@
3675
5360
  "nullable": true
3676
5361
  }
3677
5362
  },
3678
- "required": ["documents"],
5363
+ "required": ["shares"],
3679
5364
  "additionalProperties": false
3680
5365
  },
3681
- "DocumentsList400Response": {
5366
+ "SharesList400Response": {
3682
5367
  "type": "object",
3683
5368
  "properties": {
3684
5369
  "error": {
@@ -3698,10 +5383,10 @@
3698
5383
  "required": ["error"],
3699
5384
  "additionalProperties": false
3700
5385
  },
3701
- "DocumentsGet200Response": {
5386
+ "SharesGet200Response": {
3702
5387
  "type": "object",
3703
5388
  "properties": {
3704
- "document": {
5389
+ "share": {
3705
5390
  "type": "object",
3706
5391
  "properties": {
3707
5392
  "id": {
@@ -3710,90 +5395,79 @@
3710
5395
  "tenantId": {
3711
5396
  "type": "string"
3712
5397
  },
3713
- "state": {
3714
- "type": "string",
3715
- "enum": ["pending", "ready", "failed", "deleting"]
5398
+ "docId": {
5399
+ "type": "string"
3716
5400
  },
3717
- "baseSha": {
3718
- "type": "string",
3719
- "nullable": true
5401
+ "layerName": {
5402
+ "type": "string"
3720
5403
  },
3721
- "storageSizeBytes": {
3722
- "type": "number",
3723
- "nullable": true
5404
+ "scope": {
5405
+ "type": "array",
5406
+ "items": {
5407
+ "type": "string"
5408
+ }
3724
5409
  },
3725
- "metadata": {
3726
- "type": "object",
3727
- "additionalProperties": {},
5410
+ "origins": {
5411
+ "type": "array",
5412
+ "items": {
5413
+ "type": "string"
5414
+ },
3728
5415
  "nullable": true
3729
5416
  },
3730
- "idempotencyKey": {
3731
- "type": "string",
3732
- "nullable": true
5417
+ "passwordProtected": {
5418
+ "type": "boolean"
3733
5419
  },
3734
- "failureReason": {
3735
- "type": "string",
5420
+ "sessionTtlSeconds": {
5421
+ "type": "number"
5422
+ },
5423
+ "disabled": {
5424
+ "type": "boolean"
5425
+ },
5426
+ "expiresAt": {
5427
+ "type": "number",
3736
5428
  "nullable": true
3737
5429
  },
3738
- "thumbnailState": {
3739
- "type": "string",
3740
- "enum": ["pending", "ready", "locked", "failed"]
5430
+ "exchangeCount": {
5431
+ "type": "number"
3741
5432
  },
3742
- "thumbnailUrl": {
3743
- "type": "string",
5433
+ "lastExchangedAt": {
5434
+ "type": "number",
3744
5435
  "nullable": true
3745
5436
  },
5437
+ "createdBy": {
5438
+ "type": "string"
5439
+ },
3746
5440
  "createdAt": {
3747
5441
  "type": "number"
3748
5442
  },
3749
5443
  "updatedAt": {
3750
5444
  "type": "number"
3751
- },
3752
- "createdBy": {
3753
- "type": "string",
3754
- "nullable": true
3755
5445
  }
3756
5446
  },
3757
5447
  "required": [
3758
- "id",
3759
- "tenantId",
3760
- "state",
3761
- "baseSha",
3762
- "storageSizeBytes",
3763
- "metadata",
3764
- "idempotencyKey",
3765
- "failureReason",
3766
- "createdAt",
3767
- "updatedAt",
3768
- "createdBy"
3769
- ],
3770
- "additionalProperties": false
3771
- }
3772
- },
3773
- "required": ["document"],
3774
- "additionalProperties": false
3775
- },
3776
- "DocumentsGet403Response": {
3777
- "type": "object",
3778
- "properties": {
3779
- "error": {
3780
- "type": "object",
3781
- "properties": {
3782
- "code": {
3783
- "type": "string"
3784
- },
3785
- "message": {
3786
- "type": "string"
3787
- }
3788
- },
3789
- "required": ["code", "message"],
5448
+ "id",
5449
+ "tenantId",
5450
+ "docId",
5451
+ "layerName",
5452
+ "scope",
5453
+ "origins",
5454
+ "passwordProtected",
5455
+ "sessionTtlSeconds",
5456
+ "disabled",
5457
+ "expiresAt",
5458
+ "exchangeCount",
5459
+ "lastExchangedAt",
5460
+ "createdBy",
5461
+ "createdAt",
5462
+ "updatedAt"
5463
+ ],
3790
5464
  "additionalProperties": false
3791
5465
  }
3792
5466
  },
3793
- "required": ["error"],
5467
+ "required": ["share"],
3794
5468
  "additionalProperties": false
3795
5469
  },
3796
- "DocumentsGet404Response": {
5470
+ "SharesGet404Response": {
3797
5471
  "type": "object",
3798
5472
  "properties": {
3799
5473
  "error": {
@@ -3813,47 +5487,138 @@
3813
5487
  "required": ["error"],
3814
5488
  "additionalProperties": false
3815
5489
  },
3816
- "DocumentsDownload403Response": {
5490
+ "SharesUpdateRequest": {
3817
5491
  "type": "object",
3818
5492
  "properties": {
3819
- "error": {
3820
- "type": "object",
3821
- "properties": {
3822
- "code": {
3823
- "type": "string"
3824
- },
3825
- "message": {
3826
- "type": "string"
3827
- }
5493
+ "scope": {
5494
+ "type": "array",
5495
+ "items": {
5496
+ "type": "string",
5497
+ "minLength": 1,
5498
+ "maxLength": 128
3828
5499
  },
3829
- "required": ["code", "message"],
3830
- "additionalProperties": false
5500
+ "minItems": 1,
5501
+ "maxItems": 64
5502
+ },
5503
+ "origins": {
5504
+ "type": "array",
5505
+ "items": {
5506
+ "type": "string",
5507
+ "maxLength": 262,
5508
+ "pattern": "^https?:\\/\\/(\\*\\.)?[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*(:\\d{1,5})?$"
5509
+ },
5510
+ "minItems": 1,
5511
+ "maxItems": 32,
5512
+ "nullable": true
5513
+ },
5514
+ "password": {
5515
+ "type": "string",
5516
+ "minLength": 1,
5517
+ "maxLength": 1024,
5518
+ "nullable": true
5519
+ },
5520
+ "sessionTtlSeconds": {
5521
+ "type": "integer",
5522
+ "minimum": 60,
5523
+ "maximum": 3600
5524
+ },
5525
+ "disabled": {
5526
+ "type": "boolean"
5527
+ },
5528
+ "expiresAt": {
5529
+ "type": "integer",
5530
+ "exclusiveMinimum": true,
5531
+ "minimum": 0,
5532
+ "nullable": true
3831
5533
  }
3832
5534
  },
3833
- "required": ["error"],
3834
5535
  "additionalProperties": false
3835
5536
  },
3836
- "DocumentsDownload404Response": {
5537
+ "SharesUpdate200Response": {
3837
5538
  "type": "object",
3838
5539
  "properties": {
3839
- "error": {
5540
+ "share": {
3840
5541
  "type": "object",
3841
5542
  "properties": {
3842
- "code": {
5543
+ "id": {
3843
5544
  "type": "string"
3844
5545
  },
3845
- "message": {
5546
+ "tenantId": {
5547
+ "type": "string"
5548
+ },
5549
+ "docId": {
5550
+ "type": "string"
5551
+ },
5552
+ "layerName": {
5553
+ "type": "string"
5554
+ },
5555
+ "scope": {
5556
+ "type": "array",
5557
+ "items": {
5558
+ "type": "string"
5559
+ }
5560
+ },
5561
+ "origins": {
5562
+ "type": "array",
5563
+ "items": {
5564
+ "type": "string"
5565
+ },
5566
+ "nullable": true
5567
+ },
5568
+ "passwordProtected": {
5569
+ "type": "boolean"
5570
+ },
5571
+ "sessionTtlSeconds": {
5572
+ "type": "number"
5573
+ },
5574
+ "disabled": {
5575
+ "type": "boolean"
5576
+ },
5577
+ "expiresAt": {
5578
+ "type": "number",
5579
+ "nullable": true
5580
+ },
5581
+ "exchangeCount": {
5582
+ "type": "number"
5583
+ },
5584
+ "lastExchangedAt": {
5585
+ "type": "number",
5586
+ "nullable": true
5587
+ },
5588
+ "createdBy": {
3846
5589
  "type": "string"
5590
+ },
5591
+ "createdAt": {
5592
+ "type": "number"
5593
+ },
5594
+ "updatedAt": {
5595
+ "type": "number"
3847
5596
  }
3848
5597
  },
3849
- "required": ["code", "message"],
5598
+ "required": [
5599
+ "id",
5600
+ "tenantId",
5601
+ "docId",
5602
+ "layerName",
5603
+ "scope",
5604
+ "origins",
5605
+ "passwordProtected",
5606
+ "sessionTtlSeconds",
5607
+ "disabled",
5608
+ "expiresAt",
5609
+ "exchangeCount",
5610
+ "lastExchangedAt",
5611
+ "createdBy",
5612
+ "createdAt",
5613
+ "updatedAt"
5614
+ ],
3850
5615
  "additionalProperties": false
3851
5616
  }
3852
5617
  },
3853
- "required": ["error"],
5618
+ "required": ["share"],
3854
5619
  "additionalProperties": false
3855
5620
  },
3856
- "DocumentsDelete403Response": {
5621
+ "SharesUpdate400Response": {
3857
5622
  "type": "object",
3858
5623
  "properties": {
3859
5624
  "error": {
@@ -3873,7 +5638,7 @@
3873
5638
  "required": ["error"],
3874
5639
  "additionalProperties": false
3875
5640
  },
3876
- "DocumentsDelete404Response": {
5641
+ "SharesUpdate404Response": {
3877
5642
  "type": "object",
3878
5643
  "properties": {
3879
5644
  "error": {
@@ -3893,7 +5658,7 @@
3893
5658
  "required": ["error"],
3894
5659
  "additionalProperties": false
3895
5660
  },
3896
- "DocumentsThumbnailResponse": {
5661
+ "SharesDeleteResponse": {
3897
5662
  "type": "object",
3898
5663
  "properties": {
3899
5664
  "error": {
@@ -3904,156 +5669,51 @@
3904
5669
  },
3905
5670
  "message": {
3906
5671
  "type": "string"
3907
- },
3908
- "state": {
3909
- "type": "string"
3910
5672
  }
3911
5673
  },
3912
- "required": ["code", "message", "state"],
5674
+ "required": ["code", "message"],
3913
5675
  "additionalProperties": false
3914
5676
  }
3915
5677
  },
3916
5678
  "required": ["error"],
3917
5679
  "additionalProperties": false
3918
5680
  },
3919
- "DeploymentLicenseStatusResponse": {
5681
+ "SharesExchangeRequest": {
3920
5682
  "type": "object",
3921
5683
  "properties": {
3922
- "license": {},
3923
- "reporting": {
3924
- "nullable": true
5684
+ "shareToken": {
5685
+ "type": "string",
5686
+ "pattern": "^shr_[A-Za-z0-9_-]{24}$"
3925
5687
  },
3926
- "usage": {
3927
- "nullable": true
5688
+ "password": {
5689
+ "type": "string",
5690
+ "minLength": 1,
5691
+ "maxLength": 1024
3928
5692
  }
3929
5693
  },
5694
+ "required": ["shareToken"],
3930
5695
  "additionalProperties": false
3931
5696
  },
3932
- "TokensIssueRequest": {
3933
- "anyOf": [
3934
- {
3935
- "type": "object",
3936
- "properties": {
3937
- "kind": {
3938
- "type": "string",
3939
- "enum": ["doc"]
3940
- },
3941
- "sub": {
3942
- "type": "string",
3943
- "minLength": 1,
3944
- "maxLength": 256
3945
- },
3946
- "docId": {
3947
- "type": "string",
3948
- "pattern": "^[A-Za-z0-9_-]+$"
3949
- },
3950
- "layerName": {
3951
- "type": "string",
3952
- "minLength": 1,
3953
- "maxLength": 256
3954
- },
3955
- "scope": {
3956
- "type": "array",
3957
- "items": {
3958
- "type": "string",
3959
- "minLength": 1,
3960
- "maxLength": 128
3961
- },
3962
- "minItems": 1,
3963
- "maxItems": 64
3964
- },
3965
- "userId": {
3966
- "type": "string",
3967
- "maxLength": 256
3968
- },
3969
- "displayName": {
3970
- "type": "string",
3971
- "maxLength": 256
3972
- },
3973
- "groupId": {
3974
- "type": "string",
3975
- "maxLength": 256
3976
- },
3977
- "groups": {
3978
- "type": "array",
3979
- "items": {
3980
- "type": "string",
3981
- "maxLength": 256
3982
- },
3983
- "maxItems": 64
3984
- },
3985
- "expiresIn": {
3986
- "type": "integer",
3987
- "minimum": 60,
3988
- "maximum": 7776000
3989
- }
3990
- },
3991
- "required": ["kind", "sub", "docId", "scope", "expiresIn"],
3992
- "additionalProperties": false
3993
- },
3994
- {
3995
- "type": "object",
3996
- "properties": {
3997
- "kind": {
3998
- "type": "string",
3999
- "enum": ["tenant"]
4000
- },
4001
- "sub": {
4002
- "type": "string",
4003
- "minLength": 1,
4004
- "maxLength": 256
4005
- },
4006
- "scope": {
4007
- "type": "array",
4008
- "items": {
4009
- "anyOf": [
4010
- {
4011
- "type": "string",
4012
- "enum": ["*"]
4013
- },
4014
- {
4015
- "type": "string",
4016
- "enum": [
4017
- "docs.create",
4018
- "docs.read",
4019
- "docs.delete",
4020
- "tokens.issue-doc",
4021
- "tokens.revoke"
4022
- ]
4023
- }
4024
- ]
4025
- },
4026
- "minItems": 1,
4027
- "maxItems": 16
4028
- },
4029
- "expiresIn": {
4030
- "type": "integer",
4031
- "minimum": 60,
4032
- "maximum": 7776000
4033
- }
4034
- },
4035
- "required": ["kind", "sub", "scope", "expiresIn"],
4036
- "additionalProperties": false
4037
- }
4038
- ]
4039
- },
4040
- "TokensIssue200Response": {
5697
+ "SharesExchange200Response": {
4041
5698
  "type": "object",
4042
5699
  "properties": {
4043
5700
  "token": {
4044
5701
  "type": "string"
4045
5702
  },
4046
- "jti": {
5703
+ "docId": {
5704
+ "type": "string"
5705
+ },
5706
+ "layerName": {
4047
5707
  "type": "string"
4048
5708
  },
4049
5709
  "expiresAt": {
4050
5710
  "type": "number"
4051
5711
  }
4052
5712
  },
4053
- "required": ["token", "jti", "expiresAt"],
5713
+ "required": ["token", "docId", "layerName", "expiresAt"],
4054
5714
  "additionalProperties": false
4055
5715
  },
4056
- "TokensIssue400Response": {
5716
+ "SharesExchange400Response": {
4057
5717
  "type": "object",
4058
5718
  "properties": {
4059
5719
  "error": {
@@ -4073,7 +5733,7 @@
4073
5733
  "required": ["error"],
4074
5734
  "additionalProperties": false
4075
5735
  },
4076
- "TokensIssue403Response": {
5736
+ "SharesExchange403Response": {
4077
5737
  "type": "object",
4078
5738
  "properties": {
4079
5739
  "error": {
@@ -4093,7 +5753,7 @@
4093
5753
  "required": ["error"],
4094
5754
  "additionalProperties": false
4095
5755
  },
4096
- "TokensIssue404Response": {
5756
+ "SharesExchange404Response": {
4097
5757
  "type": "object",
4098
5758
  "properties": {
4099
5759
  "error": {
@@ -4113,22 +5773,27 @@
4113
5773
  "required": ["error"],
4114
5774
  "additionalProperties": false
4115
5775
  },
4116
- "TokensRevokeRequest": {
5776
+ "SharesExchange410Response": {
4117
5777
  "type": "object",
4118
5778
  "properties": {
4119
- "reason": {
4120
- "type": "string",
4121
- "maxLength": 1024
4122
- },
4123
- "expiresAtSeconds": {
4124
- "type": "integer",
4125
- "exclusiveMinimum": true,
4126
- "minimum": 0
5779
+ "error": {
5780
+ "type": "object",
5781
+ "properties": {
5782
+ "code": {
5783
+ "type": "string"
5784
+ },
5785
+ "message": {
5786
+ "type": "string"
5787
+ }
5788
+ },
5789
+ "required": ["code", "message"],
5790
+ "additionalProperties": false
4127
5791
  }
4128
5792
  },
5793
+ "required": ["error"],
4129
5794
  "additionalProperties": false
4130
5795
  },
4131
- "TokensRevokeResponse": {
5796
+ "SharesExchange422Response": {
4132
5797
  "type": "object",
4133
5798
  "properties": {
4134
5799
  "error": {