@withmarfa/client 0.0.25 → 0.0.27
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/dist/index.d.ts +595 -14
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1607,7 +1607,7 @@ interface paths {
|
|
|
1607
1607
|
head?: never;
|
|
1608
1608
|
/**
|
|
1609
1609
|
* Update the owner
|
|
1610
|
-
* @description Updates the owner's email
|
|
1610
|
+
* @description Updates the owner's email or name, or removes the picture. Requires a direct owner sign-in within five minutes or private machine authority. Changing email needs no confirmation; credentials, sessions, and grants keep their identity.
|
|
1611
1611
|
*/
|
|
1612
1612
|
patch: operations["updateOwner"];
|
|
1613
1613
|
trace?: never;
|
|
@@ -1627,11 +1627,55 @@ interface paths {
|
|
|
1627
1627
|
head?: never;
|
|
1628
1628
|
/**
|
|
1629
1629
|
* Update the owner's profile
|
|
1630
|
-
* @description Updates the owner's name or
|
|
1630
|
+
* @description Updates the owner's name or removes the picture and returns `ok: true`. Requires profile write permission for every submitted field; email cannot be changed here. All fields commit together.
|
|
1631
1631
|
*/
|
|
1632
1632
|
patch: operations["updateProfile"];
|
|
1633
1633
|
trace?: never;
|
|
1634
1634
|
};
|
|
1635
|
+
"/owner/picture": {
|
|
1636
|
+
parameters: {
|
|
1637
|
+
query?: never;
|
|
1638
|
+
header?: never;
|
|
1639
|
+
path?: never;
|
|
1640
|
+
cookie?: never;
|
|
1641
|
+
};
|
|
1642
|
+
/**
|
|
1643
|
+
* Get the owner's picture
|
|
1644
|
+
* @description Returns the owner's picture as an image download. Requires an owner sign-in or a credential with profile read permission for the avatar. Send `If-None-Match` to revalidate.
|
|
1645
|
+
*/
|
|
1646
|
+
get: operations["getOwnerPicture"];
|
|
1647
|
+
/**
|
|
1648
|
+
* Replace the owner's picture
|
|
1649
|
+
* @description Stores the request body as the owner's picture and returns the owner. Requires a direct owner sign-in within five minutes or private machine authority.
|
|
1650
|
+
*/
|
|
1651
|
+
put: operations["replaceOwnerPicture"];
|
|
1652
|
+
post?: never;
|
|
1653
|
+
delete?: never;
|
|
1654
|
+
options?: never;
|
|
1655
|
+
head?: never;
|
|
1656
|
+
patch?: never;
|
|
1657
|
+
trace?: never;
|
|
1658
|
+
};
|
|
1659
|
+
"/profile/picture": {
|
|
1660
|
+
parameters: {
|
|
1661
|
+
query?: never;
|
|
1662
|
+
header?: never;
|
|
1663
|
+
path?: never;
|
|
1664
|
+
cookie?: never;
|
|
1665
|
+
};
|
|
1666
|
+
get?: never;
|
|
1667
|
+
/**
|
|
1668
|
+
* Replace the picture as an app
|
|
1669
|
+
* @description Stores the request body as the owner's picture and returns `ok: true`. Requires profile write permission for the avatar.
|
|
1670
|
+
*/
|
|
1671
|
+
put: operations["replaceProfilePicture"];
|
|
1672
|
+
post?: never;
|
|
1673
|
+
delete?: never;
|
|
1674
|
+
options?: never;
|
|
1675
|
+
head?: never;
|
|
1676
|
+
patch?: never;
|
|
1677
|
+
trace?: never;
|
|
1678
|
+
};
|
|
1635
1679
|
"/owner/sign-ins": {
|
|
1636
1680
|
parameters: {
|
|
1637
1681
|
query?: never;
|
|
@@ -2050,7 +2094,7 @@ interface components {
|
|
|
2050
2094
|
*/
|
|
2051
2095
|
email?: "read";
|
|
2052
2096
|
/**
|
|
2053
|
-
* @description Access to the owner's
|
|
2097
|
+
* @description Access to the owner's profile picture.
|
|
2054
2098
|
* @enum {string}
|
|
2055
2099
|
*/
|
|
2056
2100
|
avatar?: "read" | "write";
|
|
@@ -4759,7 +4803,7 @@ interface components {
|
|
|
4759
4803
|
email: string;
|
|
4760
4804
|
/** @description Display name of the owner. */
|
|
4761
4805
|
name: string;
|
|
4762
|
-
/** @description The owner's picture
|
|
4806
|
+
/** @description The address of the owner's picture on this instance, or `null` when none is set. Fetch it with `GET /owner/picture`. */
|
|
4763
4807
|
avatar: string | null;
|
|
4764
4808
|
/** @description When the owner was created, in UTC. */
|
|
4765
4809
|
created_at: string;
|
|
@@ -4940,6 +4984,23 @@ interface components {
|
|
|
4940
4984
|
};
|
|
4941
4985
|
};
|
|
4942
4986
|
/** @description An error response. */
|
|
4987
|
+
NotFoundRefusal: {
|
|
4988
|
+
/** @description What went wrong. */
|
|
4989
|
+
error: {
|
|
4990
|
+
/**
|
|
4991
|
+
* @description A machine-readable code for the error. Use it in your logic.
|
|
4992
|
+
* @enum {string}
|
|
4993
|
+
*/
|
|
4994
|
+
code: "not_found";
|
|
4995
|
+
/** @description A description of the error for a person to read. It can change, so don't match on it. */
|
|
4996
|
+
message: string;
|
|
4997
|
+
/** @description More about the error, such as the field it concerns. Each code defines its own details. */
|
|
4998
|
+
details?: {
|
|
4999
|
+
[key: string]: unknown;
|
|
5000
|
+
};
|
|
5001
|
+
};
|
|
5002
|
+
};
|
|
5003
|
+
/** @description An error response. */
|
|
4943
5004
|
ExportRowsUnrestorableRefusal: {
|
|
4944
5005
|
/** @description What went wrong. */
|
|
4945
5006
|
error: {
|
|
@@ -24450,11 +24511,8 @@ interface operations {
|
|
|
24450
24511
|
email?: string;
|
|
24451
24512
|
/** @description Display name, without control or bidirectional formatting characters. Spaces at each end are trimmed. */
|
|
24452
24513
|
name?: string;
|
|
24453
|
-
/**
|
|
24454
|
-
|
|
24455
|
-
* @description The owner's picture URL. Use HTTP or HTTPS. Set `avatar` to `null` to clear it, or omit it to leave it unchanged. Marfa does not fetch the URL.
|
|
24456
|
-
*/
|
|
24457
|
-
avatar?: string | null;
|
|
24514
|
+
/** @description Set `avatar` to `null` to remove the owner's picture, or omit it to leave it unchanged. To set a picture, send its bytes to `PUT /owner/picture` or `PUT /profile/picture`. */
|
|
24515
|
+
avatar?: null;
|
|
24458
24516
|
};
|
|
24459
24517
|
};
|
|
24460
24518
|
};
|
|
@@ -24638,11 +24696,8 @@ interface operations {
|
|
|
24638
24696
|
"application/json": {
|
|
24639
24697
|
/** @description Display name, without control or bidirectional formatting characters. Spaces at each end are trimmed. */
|
|
24640
24698
|
name?: string;
|
|
24641
|
-
/**
|
|
24642
|
-
|
|
24643
|
-
* @description The owner's picture URL. Use HTTP or HTTPS. Set `avatar` to `null` to clear it, or omit it to leave it unchanged. Marfa does not fetch the URL.
|
|
24644
|
-
*/
|
|
24645
|
-
avatar?: string | null;
|
|
24699
|
+
/** @description Set `avatar` to `null` to remove the owner's picture, or omit it to leave it unchanged. To set a picture, send its bytes to `PUT /owner/picture` or `PUT /profile/picture`. */
|
|
24700
|
+
avatar?: null;
|
|
24646
24701
|
};
|
|
24647
24702
|
};
|
|
24648
24703
|
};
|
|
@@ -24811,6 +24866,532 @@ interface operations {
|
|
|
24811
24866
|
};
|
|
24812
24867
|
};
|
|
24813
24868
|
};
|
|
24869
|
+
getOwnerPicture: {
|
|
24870
|
+
parameters: {
|
|
24871
|
+
query?: never;
|
|
24872
|
+
header?: never;
|
|
24873
|
+
path?: never;
|
|
24874
|
+
cookie?: never;
|
|
24875
|
+
};
|
|
24876
|
+
requestBody?: never;
|
|
24877
|
+
responses: {
|
|
24878
|
+
/** @description Returns the picture's bytes. */
|
|
24879
|
+
200: {
|
|
24880
|
+
headers: {
|
|
24881
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
24882
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
24883
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
24884
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
24885
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
24886
|
+
/** @description The quoted SHA-256 of the picture's bytes. */
|
|
24887
|
+
ETag?: string;
|
|
24888
|
+
[name: string]: unknown;
|
|
24889
|
+
};
|
|
24890
|
+
content: {
|
|
24891
|
+
"image/png": string;
|
|
24892
|
+
"image/jpeg": string;
|
|
24893
|
+
"image/webp": string;
|
|
24894
|
+
};
|
|
24895
|
+
};
|
|
24896
|
+
/** @description The picture still matches the `If-None-Match` value. */
|
|
24897
|
+
304: {
|
|
24898
|
+
headers: {
|
|
24899
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
24900
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
24901
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
24902
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
24903
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
24904
|
+
/** @description The quoted SHA-256 of the picture's bytes. */
|
|
24905
|
+
ETag?: string;
|
|
24906
|
+
[name: string]: unknown;
|
|
24907
|
+
};
|
|
24908
|
+
content?: never;
|
|
24909
|
+
};
|
|
24910
|
+
/** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
|
|
24911
|
+
400: {
|
|
24912
|
+
headers: {
|
|
24913
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
24914
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
24915
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
24916
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
24917
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
24918
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
24919
|
+
[name: string]: unknown;
|
|
24920
|
+
};
|
|
24921
|
+
content: {
|
|
24922
|
+
"application/json": components["schemas"]["ValidationErrorRefusal"];
|
|
24923
|
+
};
|
|
24924
|
+
};
|
|
24925
|
+
/** @description `unauthorized`: the request has no credential, or its credential is not valid. */
|
|
24926
|
+
401: {
|
|
24927
|
+
headers: {
|
|
24928
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
24929
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
24930
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
24931
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
24932
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
24933
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
24934
|
+
[name: string]: unknown;
|
|
24935
|
+
};
|
|
24936
|
+
content: {
|
|
24937
|
+
"application/json": components["schemas"]["UnauthorizedRefusal"];
|
|
24938
|
+
};
|
|
24939
|
+
};
|
|
24940
|
+
/** @description The credential lacks profile read permission for the avatar. */
|
|
24941
|
+
403: {
|
|
24942
|
+
headers: {
|
|
24943
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
24944
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
24945
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
24946
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
24947
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
24948
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
24949
|
+
[name: string]: unknown;
|
|
24950
|
+
};
|
|
24951
|
+
content: {
|
|
24952
|
+
"application/json": components["schemas"]["ForbiddenRefusal"];
|
|
24953
|
+
};
|
|
24954
|
+
};
|
|
24955
|
+
/** @description No picture is set. */
|
|
24956
|
+
404: {
|
|
24957
|
+
headers: {
|
|
24958
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
24959
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
24960
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
24961
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
24962
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
24963
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
24964
|
+
[name: string]: unknown;
|
|
24965
|
+
};
|
|
24966
|
+
content: {
|
|
24967
|
+
"application/json": components["schemas"]["NotFoundRefusal"];
|
|
24968
|
+
};
|
|
24969
|
+
};
|
|
24970
|
+
/** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
|
|
24971
|
+
429: {
|
|
24972
|
+
headers: {
|
|
24973
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
24974
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
24975
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
24976
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
24977
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
24978
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
24979
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
24980
|
+
[name: string]: unknown;
|
|
24981
|
+
};
|
|
24982
|
+
content: {
|
|
24983
|
+
"application/json": components["schemas"]["RateLimitedRefusal"];
|
|
24984
|
+
};
|
|
24985
|
+
};
|
|
24986
|
+
/** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
|
|
24987
|
+
500: {
|
|
24988
|
+
headers: {
|
|
24989
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
24990
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
24991
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
24992
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
24993
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
24994
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
24995
|
+
[name: string]: unknown;
|
|
24996
|
+
};
|
|
24997
|
+
content: {
|
|
24998
|
+
"application/json": components["schemas"]["InternalErrorRefusal"];
|
|
24999
|
+
};
|
|
25000
|
+
};
|
|
25001
|
+
/** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
|
|
25002
|
+
503: {
|
|
25003
|
+
headers: {
|
|
25004
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25005
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25006
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25007
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25008
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25009
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25010
|
+
[name: string]: unknown;
|
|
25011
|
+
};
|
|
25012
|
+
content: {
|
|
25013
|
+
"application/json": components["schemas"]["WriteContentionRefusal"];
|
|
25014
|
+
};
|
|
25015
|
+
};
|
|
25016
|
+
/** @description `insufficient_storage`: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless `details.write_outcome` is `unknown`, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again. */
|
|
25017
|
+
507: {
|
|
25018
|
+
headers: {
|
|
25019
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25020
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25021
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25022
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25023
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25024
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25025
|
+
[name: string]: unknown;
|
|
25026
|
+
};
|
|
25027
|
+
content: {
|
|
25028
|
+
"application/json": components["schemas"]["InsufficientStorageRefusal"];
|
|
25029
|
+
};
|
|
25030
|
+
};
|
|
25031
|
+
};
|
|
25032
|
+
};
|
|
25033
|
+
replaceOwnerPicture: {
|
|
25034
|
+
parameters: {
|
|
25035
|
+
query?: never;
|
|
25036
|
+
header?: {
|
|
25037
|
+
/** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
|
|
25038
|
+
"X-Marfa-Instance-Id"?: string;
|
|
25039
|
+
};
|
|
25040
|
+
path?: never;
|
|
25041
|
+
cookie?: never;
|
|
25042
|
+
};
|
|
25043
|
+
/** @description The picture's bytes, sent as they are, not as `multipart/form-data`. Marfa decides the kind from the bytes and ignores `Content-Type` and any file name. A PNG, JPEG or WebP of 2 MiB or less, 1 to 4096 pixels on each side. */
|
|
25044
|
+
requestBody: {
|
|
25045
|
+
content: {
|
|
25046
|
+
"application/octet-stream": Blob | ArrayBuffer | ArrayBufferView | ReadableStream<Uint8Array>;
|
|
25047
|
+
};
|
|
25048
|
+
};
|
|
25049
|
+
responses: {
|
|
25050
|
+
/** @description The updated owner, whose `avatar` is the picture's address. */
|
|
25051
|
+
200: {
|
|
25052
|
+
headers: {
|
|
25053
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25054
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25055
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25056
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25057
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25058
|
+
[name: string]: unknown;
|
|
25059
|
+
};
|
|
25060
|
+
content: {
|
|
25061
|
+
"application/json": components["schemas"]["Owner"];
|
|
25062
|
+
};
|
|
25063
|
+
};
|
|
25064
|
+
/** @description The body is empty, damaged, not a PNG, JPEG or WebP, or larger than 4096 pixels on a side. For example, a GIF, an AVIF or an SVG. */
|
|
25065
|
+
400: {
|
|
25066
|
+
headers: {
|
|
25067
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25068
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25069
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25070
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25071
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25072
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25073
|
+
[name: string]: unknown;
|
|
25074
|
+
};
|
|
25075
|
+
content: {
|
|
25076
|
+
"application/json": components["schemas"]["ValidationErrorRefusal"];
|
|
25077
|
+
};
|
|
25078
|
+
};
|
|
25079
|
+
/** @description `unauthorized`: the request has no credential, or its credential is not valid. */
|
|
25080
|
+
401: {
|
|
25081
|
+
headers: {
|
|
25082
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25083
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25084
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25085
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25086
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25087
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25088
|
+
[name: string]: unknown;
|
|
25089
|
+
};
|
|
25090
|
+
content: {
|
|
25091
|
+
"application/json": components["schemas"]["UnauthorizedRefusal"];
|
|
25092
|
+
};
|
|
25093
|
+
};
|
|
25094
|
+
/** @description The request needs private machine authority or direct owner authentication within five minutes. */
|
|
25095
|
+
403: {
|
|
25096
|
+
headers: {
|
|
25097
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25098
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25099
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25100
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25101
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25102
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25103
|
+
[name: string]: unknown;
|
|
25104
|
+
};
|
|
25105
|
+
content: {
|
|
25106
|
+
"application/json": components["schemas"]["ForbiddenRefusal"];
|
|
25107
|
+
};
|
|
25108
|
+
};
|
|
25109
|
+
/** @description The owner is unavailable. */
|
|
25110
|
+
404: {
|
|
25111
|
+
headers: {
|
|
25112
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25113
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25114
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25115
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25116
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25117
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25118
|
+
[name: string]: unknown;
|
|
25119
|
+
};
|
|
25120
|
+
content: {
|
|
25121
|
+
"application/json": components["schemas"]["OwnerNotFoundRefusal"];
|
|
25122
|
+
};
|
|
25123
|
+
};
|
|
25124
|
+
/** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
|
|
25125
|
+
409: {
|
|
25126
|
+
headers: {
|
|
25127
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25128
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25129
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25130
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25131
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25132
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25133
|
+
[name: string]: unknown;
|
|
25134
|
+
};
|
|
25135
|
+
content: {
|
|
25136
|
+
"application/json": components["schemas"]["InstanceChangedRefusal"];
|
|
25137
|
+
};
|
|
25138
|
+
};
|
|
25139
|
+
/** @description `request_too_large`: the request body is larger than this instance accepts. */
|
|
25140
|
+
413: {
|
|
25141
|
+
headers: {
|
|
25142
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25143
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25144
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25145
|
+
[name: string]: unknown;
|
|
25146
|
+
};
|
|
25147
|
+
content: {
|
|
25148
|
+
"application/json": components["schemas"]["RequestTooLargeRefusal"];
|
|
25149
|
+
};
|
|
25150
|
+
};
|
|
25151
|
+
/** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
|
|
25152
|
+
429: {
|
|
25153
|
+
headers: {
|
|
25154
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25155
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25156
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25157
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25158
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25159
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25160
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
25161
|
+
[name: string]: unknown;
|
|
25162
|
+
};
|
|
25163
|
+
content: {
|
|
25164
|
+
"application/json": components["schemas"]["RateLimitedRefusal"];
|
|
25165
|
+
};
|
|
25166
|
+
};
|
|
25167
|
+
/** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
|
|
25168
|
+
500: {
|
|
25169
|
+
headers: {
|
|
25170
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25171
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25172
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25173
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25174
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25175
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25176
|
+
[name: string]: unknown;
|
|
25177
|
+
};
|
|
25178
|
+
content: {
|
|
25179
|
+
"application/json": components["schemas"]["InternalErrorRefusal"];
|
|
25180
|
+
};
|
|
25181
|
+
};
|
|
25182
|
+
/** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
|
|
25183
|
+
503: {
|
|
25184
|
+
headers: {
|
|
25185
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25186
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25187
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25188
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25189
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25190
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25191
|
+
[name: string]: unknown;
|
|
25192
|
+
};
|
|
25193
|
+
content: {
|
|
25194
|
+
"application/json": components["schemas"]["WriteContentionRefusal"];
|
|
25195
|
+
};
|
|
25196
|
+
};
|
|
25197
|
+
/** @description `insufficient_storage`: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless `details.write_outcome` is `unknown`, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again. */
|
|
25198
|
+
507: {
|
|
25199
|
+
headers: {
|
|
25200
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25201
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25202
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25203
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25204
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25205
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25206
|
+
[name: string]: unknown;
|
|
25207
|
+
};
|
|
25208
|
+
content: {
|
|
25209
|
+
"application/json": components["schemas"]["InsufficientStorageRefusal"];
|
|
25210
|
+
};
|
|
25211
|
+
};
|
|
25212
|
+
};
|
|
25213
|
+
};
|
|
25214
|
+
replaceProfilePicture: {
|
|
25215
|
+
parameters: {
|
|
25216
|
+
query?: never;
|
|
25217
|
+
header?: {
|
|
25218
|
+
/** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
|
|
25219
|
+
"X-Marfa-Instance-Id"?: string;
|
|
25220
|
+
};
|
|
25221
|
+
path?: never;
|
|
25222
|
+
cookie?: never;
|
|
25223
|
+
};
|
|
25224
|
+
/** @description The picture's bytes, sent as they are, not as `multipart/form-data`. Marfa decides the kind from the bytes and ignores `Content-Type` and any file name. A PNG, JPEG or WebP of 2 MiB or less, 1 to 4096 pixels on each side. */
|
|
25225
|
+
requestBody: {
|
|
25226
|
+
content: {
|
|
25227
|
+
"application/octet-stream": Blob | ArrayBuffer | ArrayBufferView | ReadableStream<Uint8Array>;
|
|
25228
|
+
};
|
|
25229
|
+
};
|
|
25230
|
+
responses: {
|
|
25231
|
+
/** @description Returns ok: true. The picture was stored. */
|
|
25232
|
+
200: {
|
|
25233
|
+
headers: {
|
|
25234
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25235
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25236
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25237
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25238
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25239
|
+
[name: string]: unknown;
|
|
25240
|
+
};
|
|
25241
|
+
content: {
|
|
25242
|
+
"application/json": components["schemas"]["Ok"];
|
|
25243
|
+
};
|
|
25244
|
+
};
|
|
25245
|
+
/** @description The body is empty, damaged, not a PNG, JPEG or WebP, or larger than 4096 pixels on a side. For example, a GIF, an AVIF or an SVG. */
|
|
25246
|
+
400: {
|
|
25247
|
+
headers: {
|
|
25248
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25249
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25250
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25251
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25252
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25253
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25254
|
+
[name: string]: unknown;
|
|
25255
|
+
};
|
|
25256
|
+
content: {
|
|
25257
|
+
"application/json": components["schemas"]["ValidationErrorRefusal"];
|
|
25258
|
+
};
|
|
25259
|
+
};
|
|
25260
|
+
/** @description `unauthorized`: the request has no credential, or its credential is not valid. */
|
|
25261
|
+
401: {
|
|
25262
|
+
headers: {
|
|
25263
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25264
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25265
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25266
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25267
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25268
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25269
|
+
[name: string]: unknown;
|
|
25270
|
+
};
|
|
25271
|
+
content: {
|
|
25272
|
+
"application/json": components["schemas"]["UnauthorizedRefusal"];
|
|
25273
|
+
};
|
|
25274
|
+
};
|
|
25275
|
+
/** @description The credential lacks profile write permission for the avatar. */
|
|
25276
|
+
403: {
|
|
25277
|
+
headers: {
|
|
25278
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25279
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25280
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25281
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25282
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25283
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25284
|
+
[name: string]: unknown;
|
|
25285
|
+
};
|
|
25286
|
+
content: {
|
|
25287
|
+
"application/json": components["schemas"]["ForbiddenRefusal"];
|
|
25288
|
+
};
|
|
25289
|
+
};
|
|
25290
|
+
/** @description The owner is unavailable. */
|
|
25291
|
+
404: {
|
|
25292
|
+
headers: {
|
|
25293
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25294
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25295
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25296
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25297
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25298
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25299
|
+
[name: string]: unknown;
|
|
25300
|
+
};
|
|
25301
|
+
content: {
|
|
25302
|
+
"application/json": components["schemas"]["OwnerNotFoundRefusal"];
|
|
25303
|
+
};
|
|
25304
|
+
};
|
|
25305
|
+
/** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
|
|
25306
|
+
409: {
|
|
25307
|
+
headers: {
|
|
25308
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25309
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25310
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25311
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25312
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25313
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25314
|
+
[name: string]: unknown;
|
|
25315
|
+
};
|
|
25316
|
+
content: {
|
|
25317
|
+
"application/json": components["schemas"]["InstanceChangedRefusal"];
|
|
25318
|
+
};
|
|
25319
|
+
};
|
|
25320
|
+
/** @description `request_too_large`: the request body is larger than this instance accepts. */
|
|
25321
|
+
413: {
|
|
25322
|
+
headers: {
|
|
25323
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25324
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25325
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25326
|
+
[name: string]: unknown;
|
|
25327
|
+
};
|
|
25328
|
+
content: {
|
|
25329
|
+
"application/json": components["schemas"]["RequestTooLargeRefusal"];
|
|
25330
|
+
};
|
|
25331
|
+
};
|
|
25332
|
+
/** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
|
|
25333
|
+
429: {
|
|
25334
|
+
headers: {
|
|
25335
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25336
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25337
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25338
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25339
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25340
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25341
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
25342
|
+
[name: string]: unknown;
|
|
25343
|
+
};
|
|
25344
|
+
content: {
|
|
25345
|
+
"application/json": components["schemas"]["RateLimitedRefusal"];
|
|
25346
|
+
};
|
|
25347
|
+
};
|
|
25348
|
+
/** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
|
|
25349
|
+
500: {
|
|
25350
|
+
headers: {
|
|
25351
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25352
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25353
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25354
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25355
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25356
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25357
|
+
[name: string]: unknown;
|
|
25358
|
+
};
|
|
25359
|
+
content: {
|
|
25360
|
+
"application/json": components["schemas"]["InternalErrorRefusal"];
|
|
25361
|
+
};
|
|
25362
|
+
};
|
|
25363
|
+
/** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
|
|
25364
|
+
503: {
|
|
25365
|
+
headers: {
|
|
25366
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25367
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25368
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25369
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25370
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25371
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25372
|
+
[name: string]: unknown;
|
|
25373
|
+
};
|
|
25374
|
+
content: {
|
|
25375
|
+
"application/json": components["schemas"]["WriteContentionRefusal"];
|
|
25376
|
+
};
|
|
25377
|
+
};
|
|
25378
|
+
/** @description `insufficient_storage`: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless `details.write_outcome` is `unknown`, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again. */
|
|
25379
|
+
507: {
|
|
25380
|
+
headers: {
|
|
25381
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
25382
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
25383
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
25384
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
25385
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
25386
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
25387
|
+
[name: string]: unknown;
|
|
25388
|
+
};
|
|
25389
|
+
content: {
|
|
25390
|
+
"application/json": components["schemas"]["InsufficientStorageRefusal"];
|
|
25391
|
+
};
|
|
25392
|
+
};
|
|
25393
|
+
};
|
|
25394
|
+
};
|
|
24814
25395
|
listSignIns: {
|
|
24815
25396
|
parameters: {
|
|
24816
25397
|
query?: never;
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,8 @@ import createFetchClient, {
|
|
|
7
7
|
// src/generated/byte-bodies.ts
|
|
8
8
|
var BYTE_BODIES = {
|
|
9
9
|
"POST /blobs": "application/octet-stream",
|
|
10
|
+
"PUT /owner/picture": "application/octet-stream",
|
|
11
|
+
"PUT /profile/picture": "application/octet-stream",
|
|
10
12
|
"POST /restore": "application/gzip"
|
|
11
13
|
};
|
|
12
14
|
|