@stacksjs/api 0.70.37 → 0.70.43
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/src/types.d.ts +34 -0
- package/package.json +2 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The response shape from any Fetcher request
|
|
3
|
+
* @template T The type of data expected in the response
|
|
4
|
+
*/
|
|
5
|
+
export declare interface FetcherResponse<T = any> {
|
|
6
|
+
data: T
|
|
7
|
+
status: number
|
|
8
|
+
headers: Headers
|
|
9
|
+
isOk: boolean
|
|
10
|
+
ok: () => boolean
|
|
11
|
+
created: () => boolean
|
|
12
|
+
accepted: () => boolean
|
|
13
|
+
noContent: () => boolean
|
|
14
|
+
movedPermanently: () => boolean
|
|
15
|
+
found: () => boolean
|
|
16
|
+
badRequest: () => boolean
|
|
17
|
+
unauthorized: () => boolean
|
|
18
|
+
paymentRequired: () => boolean
|
|
19
|
+
forbidden: () => boolean
|
|
20
|
+
notFound: () => boolean
|
|
21
|
+
requestTimeout: () => boolean
|
|
22
|
+
conflict: () => boolean
|
|
23
|
+
unprocessableEntity: () => boolean
|
|
24
|
+
tooManyRequests: () => boolean
|
|
25
|
+
serverError: () => boolean
|
|
26
|
+
}
|
|
27
|
+
export declare interface FileAttachment {
|
|
28
|
+
name: string
|
|
29
|
+
content: Blob
|
|
30
|
+
filename?: string
|
|
31
|
+
headers?: Record<string, string>
|
|
32
|
+
}
|
|
33
|
+
export type QueryParams = Record<string, string | number | boolean | null | undefined>;
|
|
34
|
+
export type BodyData = Record<string, any>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.70.
|
|
4
|
+
"version": "0.70.43",
|
|
5
5
|
"description": "The Stacks array utilities.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": [
|
|
@@ -51,6 +51,6 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"better-dx": "^0.2.12",
|
|
54
|
-
"@stacksjs/utils": "0.70.
|
|
54
|
+
"@stacksjs/utils": "^0.70.43"
|
|
55
55
|
}
|
|
56
56
|
}
|