@celigo/api-specs 0.2.289 → 0.2.291

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.
Files changed (53) hide show
  1. package/dist/account.yml +70 -59
  2. package/dist/agent.yml +30 -19
  3. package/dist/agentgroup.yml +30 -19
  4. package/dist/ai-agent.yml +46 -30
  5. package/dist/alert.yml +30 -19
  6. package/dist/api.yml +31 -20
  7. package/dist/apim.yml +30 -19
  8. package/dist/asynchelper.yml +48 -37
  9. package/dist/audit.yml +30 -19
  10. package/dist/bartendertemplate.yml +30 -19
  11. package/dist/connection.yml +92 -64
  12. package/dist/connector.yml +30 -19
  13. package/dist/ediprofile.yml +43 -32
  14. package/dist/editransaction.yml +30 -19
  15. package/dist/enduser.yml +30 -19
  16. package/dist/environment.yml +30 -19
  17. package/dist/eventreport.yml +70 -59
  18. package/dist/export.yml +71 -60
  19. package/dist/filedefinition.yml +65 -54
  20. package/dist/fileserver.yml +30 -19
  21. package/dist/filestorage.yml +30 -19
  22. package/dist/flow.yml +31 -20
  23. package/dist/guardrail.yml +85 -68
  24. package/dist/httpconnector.yml +71 -60
  25. package/dist/httpconnectorendpoint.yml +30 -19
  26. package/dist/httpconnectorresource.yml +31 -20
  27. package/dist/iclient.yml +51 -40
  28. package/dist/import.yml +103 -81
  29. package/dist/integration.yml +37 -26
  30. package/dist/job.yml +30 -19
  31. package/dist/lookupcache.yml +35 -24
  32. package/dist/marketplace.yml +30 -19
  33. package/dist/mcp-oauth-provider.yml +42 -31
  34. package/dist/mcp-server.yml +52 -41
  35. package/dist/networkpolicy.yml +30 -19
  36. package/dist/notification.yml +30 -19
  37. package/dist/processor.yml +70 -59
  38. package/dist/profile.yml +43 -32
  39. package/dist/recyclebin.yml +30 -19
  40. package/dist/script.yml +70 -59
  41. package/dist/stack.yml +30 -19
  42. package/dist/state.yml +30 -19
  43. package/dist/storagequery.yml +30 -19
  44. package/dist/subscription.yml +70 -19
  45. package/dist/sync.yml +30 -19
  46. package/dist/tag.yml +46 -35
  47. package/dist/template.yml +30 -19
  48. package/dist/tool.yml +72 -50
  49. package/dist/topic.yml +30 -19
  50. package/dist/tradingpartnerconnector.yml +31 -20
  51. package/dist/user.yml +30 -19
  52. package/package.json +1 -1
  53. package/schemas.json +1 -1
@@ -657,29 +657,34 @@ components:
657
657
  responses:
658
658
  401-unauthorized:
659
659
  description: |-
660
- Unauthorized. The request lacks a valid bearer token, or the provided token
661
- failed to authenticate.
660
+ Unauthorized, in one of two shapes.
662
661
 
663
- Note: the 401 response is produced by the auth middleware **before** the
664
- request reaches the endpoint handler, so it does **not** follow the
665
- standard `{errors: [...]}` envelope. Instead the body is a bare
666
- `{message: string}` object with no `code`, no `errors` array. Callers
667
- handling 401s should key off the HTTP status and the `message` string,
668
- not try to destructure an `errors[]`.
662
+ No valid bearer token: the auth middleware answers before the endpoint
663
+ handler runs, with a bare `{message: string}` body — no `code`, no
664
+ `errors` array — so key off the HTTP status and `message`.
665
+
666
+ An API token with a custom scope calling an operation its scope does not
667
+ grant: the token authenticated, and the body is the standard
668
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
669
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
670
+ passed both, a personal access token `GET /v1/exports/{_id}`.
669
671
  content:
670
672
  application/json:
671
673
  schema:
672
- type: object
673
- properties:
674
- message:
675
- type: string
676
- description: |-
677
- Human-readable description of the auth failure. Known values:
678
- - `"Unauthorized"` — no `Authorization` header on the request.
679
- - `"Bearer Authentication Failed"` — header present but token
680
- is invalid, revoked, or expired.
681
- required:
682
- - message
674
+ oneOf:
675
+ - type: object
676
+ description: The auth middleware's bare body for a missing or invalid token.
677
+ properties:
678
+ message:
679
+ type: string
680
+ description: |-
681
+ Human-readable description of the auth failure. Known values:
682
+ - `"Unauthorized"` — no `Authorization` header on the request.
683
+ - `"Bearer Authentication Failed"` — header present but token
684
+ is invalid, revoked, or expired.
685
+ required:
686
+ - message
687
+ - $ref: '#/components/schemas/Error'
683
688
  examples:
684
689
  missing_token:
685
690
  summary: No Authorization header sent
@@ -689,6 +694,12 @@ components:
689
694
  summary: Bearer token invalid or revoked
690
695
  value:
691
696
  message: Bearer Authentication Failed
697
+ scoped_token:
698
+ summary: An API token with a custom scope reading a resource
699
+ value:
700
+ errors:
701
+ - code: access_restricted
702
+ message: You don't have the required permissions to perform the action.
692
703
  400-bad-request:
693
704
  description: |
694
705
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
package/dist/script.yml CHANGED
@@ -979,6 +979,46 @@ components:
979
979
  description: Timestamp when the script was last updated.
980
980
  examples:
981
981
  - '2026-04-18T13:52:49.729Z'
982
+ Error:
983
+ type: object
984
+ description: Standard error response envelope returned by integrator.io APIs.
985
+ properties:
986
+ errors:
987
+ type: array
988
+ description: List of errors that occurred while processing the request.
989
+ items:
990
+ type: object
991
+ properties:
992
+ code:
993
+ oneOf:
994
+ - type: string
995
+ - type: integer
996
+ description: |-
997
+ Machine-readable error code. Usually a string like
998
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
999
+ may be an **integer** when the error mirrors an upstream HTTP
1000
+ status (e.g. `500`) — most commonly returned by connection-ping
1001
+ and adaptor-proxy responses.
1002
+ message:
1003
+ type: string
1004
+ description: Human-readable description of the error.
1005
+ field:
1006
+ type: string
1007
+ description: |-
1008
+ Optional pointer to the document field that caused the error.
1009
+ Used by structural validation errors (`missing_required_field`,
1010
+ `invalid_ref`) to indicate which field is at fault
1011
+ (e.g. `_id`, `type`, `http.baseURI`).
1012
+ source:
1013
+ type: string
1014
+ description: |-
1015
+ Optional origin layer for the error — e.g. `application` when
1016
+ the error came from the remote system the adaptor called,
1017
+ `connector` when the adaptor itself rejected the request.
1018
+ required:
1019
+ - message
1020
+ required:
1021
+ - errors
982
1022
  Request:
983
1023
  type: object
984
1024
  description: Fields for creating or updating a script.
@@ -1025,46 +1065,6 @@ components:
1025
1065
  format: objectId
1026
1066
  x-celigo-refModel: templates
1027
1067
  description: Optional template identifier used to generate or structure script content.
1028
- Error:
1029
- type: object
1030
- description: Standard error response envelope returned by integrator.io APIs.
1031
- properties:
1032
- errors:
1033
- type: array
1034
- description: List of errors that occurred while processing the request.
1035
- items:
1036
- type: object
1037
- properties:
1038
- code:
1039
- oneOf:
1040
- - type: string
1041
- - type: integer
1042
- description: |-
1043
- Machine-readable error code. Usually a string like
1044
- `invalid_ref`, `missing_required_field`, or `unauthorized`;
1045
- may be an **integer** when the error mirrors an upstream HTTP
1046
- status (e.g. `500`) — most commonly returned by connection-ping
1047
- and adaptor-proxy responses.
1048
- message:
1049
- type: string
1050
- description: Human-readable description of the error.
1051
- field:
1052
- type: string
1053
- description: |-
1054
- Optional pointer to the document field that caused the error.
1055
- Used by structural validation errors (`missing_required_field`,
1056
- `invalid_ref`) to indicate which field is at fault
1057
- (e.g. `_id`, `type`, `http.baseURI`).
1058
- source:
1059
- type: string
1060
- description: |-
1061
- Optional origin layer for the error — e.g. `application` when
1062
- the error came from the remote system the adaptor called,
1063
- `connector` when the adaptor itself rejected the request.
1064
- required:
1065
- - message
1066
- required:
1067
- - errors
1068
1068
  DependencyEntry:
1069
1069
  type: object
1070
1070
  description: A single resource that depends on the queried resource.
@@ -1151,29 +1151,34 @@ components:
1151
1151
  responses:
1152
1152
  401-unauthorized:
1153
1153
  description: |-
1154
- Unauthorized. The request lacks a valid bearer token, or the provided token
1155
- failed to authenticate.
1154
+ Unauthorized, in one of two shapes.
1156
1155
 
1157
- Note: the 401 response is produced by the auth middleware **before** the
1158
- request reaches the endpoint handler, so it does **not** follow the
1159
- standard `{errors: [...]}` envelope. Instead the body is a bare
1160
- `{message: string}` object with no `code`, no `errors` array. Callers
1161
- handling 401s should key off the HTTP status and the `message` string,
1162
- not try to destructure an `errors[]`.
1156
+ No valid bearer token: the auth middleware answers before the endpoint
1157
+ handler runs, with a bare `{message: string}` body — no `code`, no
1158
+ `errors` array — so key off the HTTP status and `message`.
1159
+
1160
+ An API token with a custom scope calling an operation its scope does not
1161
+ grant: the token authenticated, and the body is the standard
1162
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1163
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1164
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1163
1165
  content:
1164
1166
  application/json:
1165
1167
  schema:
1166
- type: object
1167
- properties:
1168
- message:
1169
- type: string
1170
- description: |-
1171
- Human-readable description of the auth failure. Known values:
1172
- - `"Unauthorized"` — no `Authorization` header on the request.
1173
- - `"Bearer Authentication Failed"` — header present but token
1174
- is invalid, revoked, or expired.
1175
- required:
1176
- - message
1168
+ oneOf:
1169
+ - type: object
1170
+ description: The auth middleware's bare body for a missing or invalid token.
1171
+ properties:
1172
+ message:
1173
+ type: string
1174
+ description: |-
1175
+ Human-readable description of the auth failure. Known values:
1176
+ - `"Unauthorized"` — no `Authorization` header on the request.
1177
+ - `"Bearer Authentication Failed"` — header present but token
1178
+ is invalid, revoked, or expired.
1179
+ required:
1180
+ - message
1181
+ - $ref: '#/components/schemas/Error'
1177
1182
  examples:
1178
1183
  missing_token:
1179
1184
  summary: No Authorization header sent
@@ -1183,6 +1188,12 @@ components:
1183
1188
  summary: Bearer token invalid or revoked
1184
1189
  value:
1185
1190
  message: Bearer Authentication Failed
1191
+ scoped_token:
1192
+ summary: An API token with a custom scope reading a resource
1193
+ value:
1194
+ errors:
1195
+ - code: access_restricted
1196
+ message: You don't have the required permissions to perform the action.
1186
1197
  400-bad-request:
1187
1198
  description: |
1188
1199
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
package/dist/stack.yml CHANGED
@@ -1891,29 +1891,34 @@ components:
1891
1891
  responses:
1892
1892
  401-unauthorized:
1893
1893
  description: |-
1894
- Unauthorized. The request lacks a valid bearer token, or the provided token
1895
- failed to authenticate.
1894
+ Unauthorized, in one of two shapes.
1896
1895
 
1897
- Note: the 401 response is produced by the auth middleware **before** the
1898
- request reaches the endpoint handler, so it does **not** follow the
1899
- standard `{errors: [...]}` envelope. Instead the body is a bare
1900
- `{message: string}` object with no `code`, no `errors` array. Callers
1901
- handling 401s should key off the HTTP status and the `message` string,
1902
- not try to destructure an `errors[]`.
1896
+ No valid bearer token: the auth middleware answers before the endpoint
1897
+ handler runs, with a bare `{message: string}` body — no `code`, no
1898
+ `errors` array — so key off the HTTP status and `message`.
1899
+
1900
+ An API token with a custom scope calling an operation its scope does not
1901
+ grant: the token authenticated, and the body is the standard
1902
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1903
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1904
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1903
1905
  content:
1904
1906
  application/json:
1905
1907
  schema:
1906
- type: object
1907
- properties:
1908
- message:
1909
- type: string
1910
- description: |-
1911
- Human-readable description of the auth failure. Known values:
1912
- - `"Unauthorized"` — no `Authorization` header on the request.
1913
- - `"Bearer Authentication Failed"` — header present but token
1914
- is invalid, revoked, or expired.
1915
- required:
1916
- - message
1908
+ oneOf:
1909
+ - type: object
1910
+ description: The auth middleware's bare body for a missing or invalid token.
1911
+ properties:
1912
+ message:
1913
+ type: string
1914
+ description: |-
1915
+ Human-readable description of the auth failure. Known values:
1916
+ - `"Unauthorized"` — no `Authorization` header on the request.
1917
+ - `"Bearer Authentication Failed"` — header present but token
1918
+ is invalid, revoked, or expired.
1919
+ required:
1920
+ - message
1921
+ - $ref: '#/components/schemas/Error'
1917
1922
  examples:
1918
1923
  missing_token:
1919
1924
  summary: No Authorization header sent
@@ -1923,6 +1928,12 @@ components:
1923
1928
  summary: Bearer token invalid or revoked
1924
1929
  value:
1925
1930
  message: Bearer Authentication Failed
1931
+ scoped_token:
1932
+ summary: An API token with a custom scope reading a resource
1933
+ value:
1934
+ errors:
1935
+ - code: access_restricted
1936
+ message: You don't have the required permissions to perform the action.
1926
1937
  422-unprocessable-entity:
1927
1938
  description: |
1928
1939
  Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
package/dist/state.yml CHANGED
@@ -881,29 +881,34 @@ components:
881
881
  responses:
882
882
  401-unauthorized:
883
883
  description: |-
884
- Unauthorized. The request lacks a valid bearer token, or the provided token
885
- failed to authenticate.
884
+ Unauthorized, in one of two shapes.
886
885
 
887
- Note: the 401 response is produced by the auth middleware **before** the
888
- request reaches the endpoint handler, so it does **not** follow the
889
- standard `{errors: [...]}` envelope. Instead the body is a bare
890
- `{message: string}` object with no `code`, no `errors` array. Callers
891
- handling 401s should key off the HTTP status and the `message` string,
892
- not try to destructure an `errors[]`.
886
+ No valid bearer token: the auth middleware answers before the endpoint
887
+ handler runs, with a bare `{message: string}` body — no `code`, no
888
+ `errors` array — so key off the HTTP status and `message`.
889
+
890
+ An API token with a custom scope calling an operation its scope does not
891
+ grant: the token authenticated, and the body is the standard
892
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
893
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
894
+ passed both, a personal access token `GET /v1/exports/{_id}`.
893
895
  content:
894
896
  application/json:
895
897
  schema:
896
- type: object
897
- properties:
898
- message:
899
- type: string
900
- description: |-
901
- Human-readable description of the auth failure. Known values:
902
- - `"Unauthorized"` — no `Authorization` header on the request.
903
- - `"Bearer Authentication Failed"` — header present but token
904
- is invalid, revoked, or expired.
905
- required:
906
- - message
898
+ oneOf:
899
+ - type: object
900
+ description: The auth middleware's bare body for a missing or invalid token.
901
+ properties:
902
+ message:
903
+ type: string
904
+ description: |-
905
+ Human-readable description of the auth failure. Known values:
906
+ - `"Unauthorized"` — no `Authorization` header on the request.
907
+ - `"Bearer Authentication Failed"` — header present but token
908
+ is invalid, revoked, or expired.
909
+ required:
910
+ - message
911
+ - $ref: '#/components/schemas/Error'
907
912
  examples:
908
913
  missing_token:
909
914
  summary: No Authorization header sent
@@ -913,5 +918,11 @@ components:
913
918
  summary: Bearer token invalid or revoked
914
919
  value:
915
920
  message: Bearer Authentication Failed
921
+ scoped_token:
922
+ summary: An API token with a custom scope reading a resource
923
+ value:
924
+ errors:
925
+ - code: access_restricted
926
+ message: You don't have the required permissions to perform the action.
916
927
  x-enable-proxy: true
917
928
  x-internal: false
@@ -1050,29 +1050,34 @@ components:
1050
1050
  responses:
1051
1051
  401-unauthorized:
1052
1052
  description: |-
1053
- Unauthorized. The request lacks a valid bearer token, or the provided token
1054
- failed to authenticate.
1053
+ Unauthorized, in one of two shapes.
1055
1054
 
1056
- Note: the 401 response is produced by the auth middleware **before** the
1057
- request reaches the endpoint handler, so it does **not** follow the
1058
- standard `{errors: [...]}` envelope. Instead the body is a bare
1059
- `{message: string}` object with no `code`, no `errors` array. Callers
1060
- handling 401s should key off the HTTP status and the `message` string,
1061
- not try to destructure an `errors[]`.
1055
+ No valid bearer token: the auth middleware answers before the endpoint
1056
+ handler runs, with a bare `{message: string}` body — no `code`, no
1057
+ `errors` array — so key off the HTTP status and `message`.
1058
+
1059
+ An API token with a custom scope calling an operation its scope does not
1060
+ grant: the token authenticated, and the body is the standard
1061
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1062
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1063
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1062
1064
  content:
1063
1065
  application/json:
1064
1066
  schema:
1065
- type: object
1066
- properties:
1067
- message:
1068
- type: string
1069
- description: |-
1070
- Human-readable description of the auth failure. Known values:
1071
- - `"Unauthorized"` — no `Authorization` header on the request.
1072
- - `"Bearer Authentication Failed"` — header present but token
1073
- is invalid, revoked, or expired.
1074
- required:
1075
- - message
1067
+ oneOf:
1068
+ - type: object
1069
+ description: The auth middleware's bare body for a missing or invalid token.
1070
+ properties:
1071
+ message:
1072
+ type: string
1073
+ description: |-
1074
+ Human-readable description of the auth failure. Known values:
1075
+ - `"Unauthorized"` — no `Authorization` header on the request.
1076
+ - `"Bearer Authentication Failed"` — header present but token
1077
+ is invalid, revoked, or expired.
1078
+ required:
1079
+ - message
1080
+ - $ref: '#/components/schemas/Error'
1076
1081
  examples:
1077
1082
  missing_token:
1078
1083
  summary: No Authorization header sent
@@ -1082,5 +1087,11 @@ components:
1082
1087
  summary: Bearer token invalid or revoked
1083
1088
  value:
1084
1089
  message: Bearer Authentication Failed
1090
+ scoped_token:
1091
+ summary: An API token with a custom scope reading a resource
1092
+ value:
1093
+ errors:
1094
+ - code: access_restricted
1095
+ message: You don't have the required permissions to perform the action.
1085
1096
  x-internal: false
1086
1097
  x-enable-proxy: true
@@ -1217,6 +1217,46 @@ components:
1217
1217
  then:
1218
1218
  required:
1219
1219
  - _connectorId
1220
+ Error:
1221
+ type: object
1222
+ description: Standard error response envelope returned by integrator.io APIs.
1223
+ properties:
1224
+ errors:
1225
+ type: array
1226
+ description: List of errors that occurred while processing the request.
1227
+ items:
1228
+ type: object
1229
+ properties:
1230
+ code:
1231
+ oneOf:
1232
+ - type: string
1233
+ - type: integer
1234
+ description: |-
1235
+ Machine-readable error code. Usually a string like
1236
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
1237
+ may be an **integer** when the error mirrors an upstream HTTP
1238
+ status (e.g. `500`) — most commonly returned by connection-ping
1239
+ and adaptor-proxy responses.
1240
+ message:
1241
+ type: string
1242
+ description: Human-readable description of the error.
1243
+ field:
1244
+ type: string
1245
+ description: |-
1246
+ Optional pointer to the document field that caused the error.
1247
+ Used by structural validation errors (`missing_required_field`,
1248
+ `invalid_ref`) to indicate which field is at fault
1249
+ (e.g. `_id`, `type`, `http.baseURI`).
1250
+ source:
1251
+ type: string
1252
+ description: |-
1253
+ Optional origin layer for the error — e.g. `application` when
1254
+ the error came from the remote system the adaptor called,
1255
+ `connector` when the adaptor itself rejected the request.
1256
+ required:
1257
+ - message
1258
+ required:
1259
+ - errors
1220
1260
  FlowUsage:
1221
1261
  type: object
1222
1262
  description: Flow entitlement usage.
@@ -1771,29 +1811,34 @@ components:
1771
1811
  responses:
1772
1812
  401-unauthorized:
1773
1813
  description: |-
1774
- Unauthorized. The request lacks a valid bearer token, or the provided token
1775
- failed to authenticate.
1814
+ Unauthorized, in one of two shapes.
1815
+
1816
+ No valid bearer token: the auth middleware answers before the endpoint
1817
+ handler runs, with a bare `{message: string}` body — no `code`, no
1818
+ `errors` array — so key off the HTTP status and `message`.
1776
1819
 
1777
- Note: the 401 response is produced by the auth middleware **before** the
1778
- request reaches the endpoint handler, so it does **not** follow the
1779
- standard `{errors: [...]}` envelope. Instead the body is a bare
1780
- `{message: string}` object with no `code`, no `errors` array. Callers
1781
- handling 401s should key off the HTTP status and the `message` string,
1782
- not try to destructure an `errors[]`.
1820
+ An API token with a custom scope calling an operation its scope does not
1821
+ grant: the token authenticated, and the body is the standard
1822
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
1823
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
1824
+ passed both, a personal access token `GET /v1/exports/{_id}`.
1783
1825
  content:
1784
1826
  application/json:
1785
1827
  schema:
1786
- type: object
1787
- properties:
1788
- message:
1789
- type: string
1790
- description: |-
1791
- Human-readable description of the auth failure. Known values:
1792
- - `"Unauthorized"` — no `Authorization` header on the request.
1793
- - `"Bearer Authentication Failed"` — header present but token
1794
- is invalid, revoked, or expired.
1795
- required:
1796
- - message
1828
+ oneOf:
1829
+ - type: object
1830
+ description: The auth middleware's bare body for a missing or invalid token.
1831
+ properties:
1832
+ message:
1833
+ type: string
1834
+ description: |-
1835
+ Human-readable description of the auth failure. Known values:
1836
+ - `"Unauthorized"` — no `Authorization` header on the request.
1837
+ - `"Bearer Authentication Failed"` — header present but token
1838
+ is invalid, revoked, or expired.
1839
+ required:
1840
+ - message
1841
+ - $ref: '#/components/schemas/Error'
1797
1842
  examples:
1798
1843
  missing_token:
1799
1844
  summary: No Authorization header sent
@@ -1803,5 +1848,11 @@ components:
1803
1848
  summary: Bearer token invalid or revoked
1804
1849
  value:
1805
1850
  message: Bearer Authentication Failed
1851
+ scoped_token:
1852
+ summary: An API token with a custom scope reading a resource
1853
+ value:
1854
+ errors:
1855
+ - code: access_restricted
1856
+ message: You don't have the required permissions to perform the action.
1806
1857
  x-enable-proxy: true
1807
1858
  x-internal: false
package/dist/sync.yml CHANGED
@@ -5598,29 +5598,34 @@ components:
5598
5598
  message: The requested resource was not found.
5599
5599
  401-unauthorized:
5600
5600
  description: |-
5601
- Unauthorized. The request lacks a valid bearer token, or the provided token
5602
- failed to authenticate.
5601
+ Unauthorized, in one of two shapes.
5603
5602
 
5604
- Note: the 401 response is produced by the auth middleware **before** the
5605
- request reaches the endpoint handler, so it does **not** follow the
5606
- standard `{errors: [...]}` envelope. Instead the body is a bare
5607
- `{message: string}` object with no `code`, no `errors` array. Callers
5608
- handling 401s should key off the HTTP status and the `message` string,
5609
- not try to destructure an `errors[]`.
5603
+ No valid bearer token: the auth middleware answers before the endpoint
5604
+ handler runs, with a bare `{message: string}` body — no `code`, no
5605
+ `errors` array — so key off the HTTP status and `message`.
5606
+
5607
+ An API token with a custom scope calling an operation its scope does not
5608
+ grant: the token authenticated, and the body is the standard
5609
+ `{errors: [...]}` envelope with code `access_restricted`. Observed on
5610
+ `GET /v1/connections` and `GET /v1/exports/{_id}`: a full-access API token
5611
+ passed both, a personal access token `GET /v1/exports/{_id}`.
5610
5612
  content:
5611
5613
  application/json:
5612
5614
  schema:
5613
- type: object
5614
- properties:
5615
- message:
5616
- type: string
5617
- description: |-
5618
- Human-readable description of the auth failure. Known values:
5619
- - `"Unauthorized"` — no `Authorization` header on the request.
5620
- - `"Bearer Authentication Failed"` — header present but token
5621
- is invalid, revoked, or expired.
5622
- required:
5623
- - message
5615
+ oneOf:
5616
+ - type: object
5617
+ description: The auth middleware's bare body for a missing or invalid token.
5618
+ properties:
5619
+ message:
5620
+ type: string
5621
+ description: |-
5622
+ Human-readable description of the auth failure. Known values:
5623
+ - `"Unauthorized"` — no `Authorization` header on the request.
5624
+ - `"Bearer Authentication Failed"` — header present but token
5625
+ is invalid, revoked, or expired.
5626
+ required:
5627
+ - message
5628
+ - $ref: '#/components/schemas/Error'
5624
5629
  examples:
5625
5630
  missing_token:
5626
5631
  summary: No Authorization header sent
@@ -5630,6 +5635,12 @@ components:
5630
5635
  summary: Bearer token invalid or revoked
5631
5636
  value:
5632
5637
  message: Bearer Authentication Failed
5638
+ scoped_token:
5639
+ summary: An API token with a custom scope reading a resource
5640
+ value:
5641
+ errors:
5642
+ - code: access_restricted
5643
+ message: You don't have the required permissions to perform the action.
5633
5644
  400-bad-request:
5634
5645
  description: |
5635
5646
  Bad request. The server could not understand the request because of malformed syntax or invalid parameters.