@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.
- package/dist/external/AxiosNetworkClient.d.ts +8 -0
- package/dist/external/mocks/MockExternalNetworkClient.d.ts +15 -1
- package/dist/external/ports/networkClient.d.ts +14 -0
- package/dist/maestro-web-sdk.umd.js +2 -2
- package/dist/maestro-web-sdk.umd.js.map +1 -1
- package/dist/modules/bets/interfaces/IBets.d.ts +2 -1
- package/dist/modules/bets/view/components/PromoCodeBanner/PromoCodeBanner.d.ts +2 -9
- package/dist/modules/bets/view/components/PromoCodeBanner/index.d.ts +0 -1
- package/dist/modules/bets/view-model/BetsViewModel.d.ts +18 -6
- package/dist/services/BetsService.d.ts +27 -7
- package/dist/services/NetworkManager/NetworkManager.d.ts +34 -0
- package/dist/services/NetworkManager/types.d.ts +28 -0
- package/dist/services/PageService/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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
|
}
|