@stack0/sdk 0.2.9 → 0.3.1

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 (42) hide show
  1. package/README.md +233 -10
  2. package/dist/cdn/index.d.mts +239 -26
  3. package/dist/cdn/index.d.ts +239 -26
  4. package/dist/cdn/index.js +219 -20
  5. package/dist/cdn/index.js.map +1 -1
  6. package/dist/cdn/index.mjs +219 -20
  7. package/dist/cdn/index.mjs.map +1 -1
  8. package/dist/extraction/index.d.mts +1 -1
  9. package/dist/extraction/index.d.ts +1 -1
  10. package/dist/extraction/index.js +33 -29
  11. package/dist/extraction/index.js.map +1 -1
  12. package/dist/extraction/index.mjs +33 -29
  13. package/dist/extraction/index.mjs.map +1 -1
  14. package/dist/http-client-Cgie_Rv6.d.mts +25 -0
  15. package/dist/http-client-Cgie_Rv6.d.ts +25 -0
  16. package/dist/index.d.mts +1006 -3
  17. package/dist/index.d.ts +1006 -3
  18. package/dist/index.js +958 -69
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +957 -70
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/mail/index.d.mts +1 -1
  23. package/dist/mail/index.d.ts +1 -1
  24. package/dist/mail/index.js +13 -5
  25. package/dist/mail/index.js.map +1 -1
  26. package/dist/mail/index.mjs +13 -5
  27. package/dist/mail/index.mjs.map +1 -1
  28. package/dist/screenshots/index.d.mts +1 -1
  29. package/dist/screenshots/index.d.ts +1 -1
  30. package/dist/screenshots/index.js +32 -26
  31. package/dist/screenshots/index.js.map +1 -1
  32. package/dist/screenshots/index.mjs +32 -26
  33. package/dist/screenshots/index.mjs.map +1 -1
  34. package/dist/webdata/index.d.mts +1 -1
  35. package/dist/webdata/index.d.ts +1 -1
  36. package/dist/webdata/index.js +37 -8
  37. package/dist/webdata/index.js.map +1 -1
  38. package/dist/webdata/index.mjs +37 -8
  39. package/dist/webdata/index.mjs.map +1 -1
  40. package/package.json +1 -1
  41. package/dist/http-client-Wr9lXo9_.d.mts +0 -10
  42. package/dist/http-client-Wr9lXo9_.d.ts +0 -10
@@ -0,0 +1,25 @@
1
+ /**
2
+ * HTTP client for Stack0 API
3
+ * Handles authentication, request/response formatting, and error handling
4
+ */
5
+ interface HttpClientConfig {
6
+ apiKey: string;
7
+ baseUrl?: string;
8
+ }
9
+ declare class HttpClient {
10
+ private apiKey;
11
+ private baseUrl;
12
+ constructor(config: HttpClientConfig);
13
+ private getHeaders;
14
+ request<T>(method: string, path: string, body?: unknown): Promise<T>;
15
+ private handleErrorResponse;
16
+ private createError;
17
+ get<T>(path: string): Promise<T>;
18
+ post<T>(path: string, body: unknown): Promise<T>;
19
+ put<T>(path: string, body: unknown): Promise<T>;
20
+ delete<T>(path: string): Promise<T>;
21
+ deleteWithBody<T>(path: string, body: unknown): Promise<T>;
22
+ patch<T>(path: string, body: unknown): Promise<T>;
23
+ }
24
+
25
+ export { HttpClient as H, type HttpClientConfig as a };