@maestro_io/maestro-web-sdk 2.2.9 → 2.3.0

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.
@@ -14,7 +14,15 @@ declare class AxiosNetworkClient implements INetworkClient {
14
14
  });
15
15
  private retry;
16
16
  get<TResponseData = any>(endpoint: string, params?: Record<string, any>, headers?: Record<string, string>): Promise<TResponseData>;
17
+ getWithHeaders<TResponseData = any>(endpoint: string, params?: Record<string, any>, headers?: Record<string, string>): Promise<{
18
+ data: TResponseData;
19
+ headers: Record<string, string>;
20
+ }>;
17
21
  post<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData, params?: Record<string, any>, headers?: Record<string, string>): Promise<TResponseData>;
22
+ postWithHeaders<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData, params?: Record<string, any>, headers?: Record<string, string>): Promise<{
23
+ data: TResponseData;
24
+ headers: Record<string, string>;
25
+ }>;
18
26
  setAuthentication(token: string | null, apiKey: string | null): void;
19
27
  }
20
28
  export default AxiosNetworkClient;
@@ -78,10 +78,24 @@ declare class MockNetworkClient implements INetworkClient {
78
78
  * Mock implementation of the get method
79
79
  */
80
80
  get<TResponseData = any>(endpoint: string, params?: Record<string, any>, headers?: Record<string, string>): Promise<TResponseData>;
81
+ /**
82
+ * Mock implementation of the getWithHeaders method
83
+ */
84
+ getWithHeaders<TResponseData = any>(endpoint: string, params?: Record<string, any>, headers?: Record<string, string>): Promise<{
85
+ data: TResponseData;
86
+ headers: Record<string, string>;
87
+ }>;
81
88
  /**
82
89
  * Mock implementation of the post method
83
90
  */
84
- post<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData): Promise<TResponseData>;
91
+ post<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData, params?: Record<string, any>, headers?: Record<string, string>): Promise<TResponseData>;
92
+ /**
93
+ * Mock implementation of the postWithHeaders method
94
+ */
95
+ postWithHeaders<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData, params?: Record<string, any>, headers?: Record<string, string>): Promise<{
96
+ data: TResponseData;
97
+ headers: Record<string, string>;
98
+ }>;
85
99
  /**
86
100
  * Mock implementation of setAuthentication
87
101
  */
@@ -1,5 +1,19 @@
1
1
  export interface INetworkClient {
2
2
  get<TResponseData = any>(endpoint: string, params?: Record<string, any>, headers?: Record<string, string>): Promise<TResponseData>;
3
3
  post<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData, params?: Record<string, any>, headers?: Record<string, string>): Promise<TResponseData>;
4
+ /**
5
+ * Get request that returns both data and headers
6
+ */
7
+ getWithHeaders<TResponseData = any>(endpoint: string, params?: Record<string, any>, headers?: Record<string, string>): Promise<{
8
+ data: TResponseData;
9
+ headers: Record<string, string>;
10
+ }>;
11
+ /**
12
+ * Post request that returns both data and headers
13
+ */
14
+ postWithHeaders<TRequestData = any, TResponseData = any>(endpoint: string, data: TRequestData, params?: Record<string, any>, headers?: Record<string, string>): Promise<{
15
+ data: TResponseData;
16
+ headers: Record<string, string>;
17
+ }>;
4
18
  setAuthentication(token: string | null, apiKey: string | null): void;
5
19
  }