@stacksjs/api 0.75.519 → 0.75.522

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/digest.d.ts CHANGED
@@ -2,3 +2,4 @@
2
2
  export declare function digestAuthorization(header: string, credentials: DigestCredentials, method: string, url: string, body: Uint8Array): Promise<string | null>;
3
3
  export declare interface DigestCredentials { username: string, password: string }
4
4
  declare type Challenge = Record<string, string>;
5
+ export {};
package/dist/fetcher.d.ts CHANGED
@@ -24,6 +24,14 @@ declare class FetcherResponseImpl<T> implements FetcherResponse<T> {
24
24
  serverError(): boolean;
25
25
  }
26
26
  declare class Fetcher {
27
+ private defaultHeaders;
28
+ private queryParams;
29
+ private bodyData;
30
+ private isFormData;
31
+ private customHeaders;
32
+ private attachments;
33
+ private isMultipart;
34
+ private digestAuth;
27
35
  withQueryParams(params: QueryParams): this;
28
36
  withHeaders(headers: Record<string, string>): this;
29
37
  accept(contentType: string): this;
@@ -34,9 +42,16 @@ declare class Fetcher {
34
42
  withBody<D extends BodyData>(data: D): this;
35
43
  asForm(): this;
36
44
  attach(name: string, content: string | Blob | File, filename?: string, headers?: Record<string, string>): this;
45
+ private getHeaders;
46
+ private addQueryParams;
47
+ private formatBody;
48
+ private resetState;
49
+ private request;
50
+ private perform;
37
51
  get<T = string>(url: string): Promise<FetcherResponse<T>>;
38
52
  post<T = string, D extends BodyData = BodyData>(url: string, body?: D): Promise<FetcherResponse<T>>;
39
53
  put<T = string, D extends BodyData = BodyData>(url: string, body?: D): Promise<FetcherResponse<T>>;
40
54
  patch<T = string, D extends BodyData = BodyData>(url: string, body?: D): Promise<FetcherResponse<T>>;
41
55
  delete<T = string>(url: string): Promise<FetcherResponse<T>>;
42
56
  }
57
+ export {};
@@ -80,3 +80,4 @@ declare type ResponseMap = Record<string, {
80
80
  content?: Record<string, { schema?: SchemaObject }>
81
81
  headers?: Record<string, { description: string, schema?: SchemaObject }>
82
82
  }>;
83
+ export {};
@@ -123,3 +123,4 @@ export declare class PaginatedResourceCollection<T = unknown, R extends JsonReso
123
123
  }): PaginatedResourceCollection<T, R>;
124
124
  toResponse(request?: Request): Record<string, any>;
125
125
  }
126
+ export {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/api",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.519",
5
+ "version": "0.75.522",
6
6
  "description": "The Stacks API utilities.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -61,17 +61,17 @@
61
61
  "prepublishOnly": "bun run build"
62
62
  },
63
63
  "dependencies": {
64
- "@stacksjs/config": "0.75.519",
65
- "@stacksjs/path": "0.75.519",
66
- "@stacksjs/pagination": "0.75.519",
64
+ "@stacksjs/config": "0.75.522",
65
+ "@stacksjs/path": "0.75.522",
66
+ "@stacksjs/pagination": "0.75.522",
67
67
  "hash-wasm": "^4.12.0"
68
68
  },
69
69
  "devDependencies": {
70
- "@stacksjs/utils": "0.75.519",
70
+ "@stacksjs/utils": "0.75.522",
71
71
  "better-dx": "^0.2.24"
72
72
  },
73
73
  "peerDependencies": {
74
- "@stacksjs/router": "0.75.519"
74
+ "@stacksjs/router": "0.75.522"
75
75
  },
76
76
  "peerDependenciesMeta": {
77
77
  "@stacksjs/router": {