-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathschema.ts
278 lines (275 loc) · 7.21 KB
/
schema.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/pins": {
/**
* List all the pin objects, matching optional filters; when no filter is provided, only successful pins are returned
*/
get: {
parameters: {
query: {
cid?: components["parameters"]["cid"];
name?: components["parameters"]["name"];
match?: components["parameters"]["match"];
status?: components["parameters"]["status"];
before?: components["parameters"]["before"];
after?: components["parameters"]["after"];
limit?: components["parameters"]["limit"];
meta?: components["parameters"]["meta"];
};
};
responses: {
/**
* Successful response (PinResults object)
*/
"200": {
"application/json": components["schemas"]["PinResults"];
};
"400": unknown;
"401": unknown;
"404": unknown;
"409": unknown;
"4XX": unknown;
"5XX": unknown;
};
};
/**
* Add a new pin object for the current access token
*/
post: {
requestBody: {
"application/json": components["schemas"]["Pin"];
};
responses: {
/**
* Successful response (PinStatus object)
*/
"202": {
"application/json": components["schemas"]["PinStatus"];
};
"400": unknown;
"401": unknown;
"404": unknown;
"409": unknown;
"4XX": unknown;
"5XX": unknown;
};
};
};
"/pins/{requestid}": {
/**
* Get a pin object and its status
*/
get: {
responses: {
/**
* Successful response (PinStatus object)
*/
"200": {
"application/json": components["schemas"]["PinStatus"];
};
"400": unknown;
"401": unknown;
"404": unknown;
"409": unknown;
"4XX": unknown;
"5XX": unknown;
};
};
/**
* Replace an existing pin object (shortcut for executing remove and add operations in one step to avoid unnecessary garbage collection of blocks present in both recursive pins)
*/
post: {
requestBody: {
"application/json": components["schemas"]["Pin"];
};
responses: {
/**
* Successful response (PinStatus object)
*/
"202": {
"application/json": components["schemas"]["PinStatus"];
};
"400": unknown;
"401": unknown;
"404": unknown;
"409": unknown;
"4XX": unknown;
"5XX": unknown;
};
};
/**
* Remove a pin object
*/
delete: {
responses: {
/**
* Successful response (no body, pin removed)
*/
"202": unknown;
"400": unknown;
"401": unknown;
"404": unknown;
"409": unknown;
"4XX": unknown;
"5XX": unknown;
};
};
parameters: {
path: {
requestid: string;
};
};
};
}
export interface operations {}
export interface components {
parameters: {
/**
* Return results created (queued) before provided timestamp
*/
before: string;
/**
* Return results created (queued) after provided timestamp
*/
after: string;
/**
* Max records to return
*/
limit: number;
/**
* Return pin objects responsible for pinning the specified CID(s); be aware that using longer hash functions introduces further constraints on the number of CIDs that will fit under the limit of 2000 characters per URL in browser contexts
*/
cid: string[];
/**
* Return pin objects with specified name (by default a case-sensitive, exact match)
*/
name: string;
/**
* Customize the text matching strategy applied when name filter is present
*/
match: components["schemas"]["TextMatchingStrategy"];
/**
* Return pin objects for pins with the specified status
*/
status: components["schemas"]["Status"][];
/**
* Return pin objects that match specified metadata
*/
meta: { [key: string]: any };
};
schemas: {
/**
* Response used for listing pin objects matching request
*/
PinResults: {
/**
* The total number of pin objects that exist for passed query filters
*/
count: number;
/**
* An array of PinStatus results
*/
results: components["schemas"]["PinStatus"][];
};
/**
* Pin object with status
*/
PinStatus: {
/**
* Globally unique identifier of the pin request; can be used to check the status of ongoing pinning, or pin removal
*/
requestid: string;
status: components["schemas"]["Status"];
/**
* Immutable timestamp indicating when a pin request entered a pinning service; can be used for filtering results and pagination
*/
created: string;
pin: components["schemas"]["Pin"];
delegates: components["schemas"]["Delegates"];
info?: components["schemas"]["StatusInfo"];
};
/**
* Pin object
*/
Pin: {
/**
* Content Identifier (CID) to be pinned recursively
*/
cid: string;
/**
* Optional name for pinned data; can be used for lookups later
*/
name?: string;
origins?: components["schemas"]["Origins"];
meta?: components["schemas"]["PinMeta"];
};
/**
* Status a pin object can have at a pinning service
*/
Status: "queued" | "pinning" | "pinned" | "failed";
/**
* List of multiaddrs designated by pinning service for transferring any new data from external peers
*/
Delegates: string[];
/**
* Optional list of multiaddrs known to provide the data
*/
Origins: string[];
/**
* Optional metadata for pin object
*/
PinMeta: { [key: string]: string };
/**
* Optional info for PinStatus response
*/
StatusInfo: { [key: string]: string };
/**
* Alternative text matching strategy
*/
TextMatchingStrategy: "exact" | "iexact" | "partial" | "ipartial";
/**
* Response for a failed request
*/
Failure: {
error: {
/**
* Mandatory string identifying the type of error
*/
reason: string;
/**
* Optional, longer description of the error; may include UUID of transaction for support, links to documentation etc
*/
details?: string;
};
};
};
responses: {
/**
* Error response (Bad request)
*/
BadRequest: { [key: string]: any };
/**
* Error response (Unauthorized; access token is missing or invalid)
*/
Unauthorized: { [key: string]: any };
/**
* Error response (The specified resource was not found)
*/
NotFound: { [key: string]: any };
/**
* Error response (Insufficient funds)
*/
InsufficientFunds: { [key: string]: any };
/**
* Error response (Custom service error)
*/
CustomServiceError: { [key: string]: any };
/**
* Error response (Unexpected internal server error)
*/
InternalServerError: { [key: string]: any };
};
}