@placeos/ts-client 4.2.2 → 4.2.4

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.
@@ -60,4 +60,4 @@ export declare function transform(resp: Response, type: HttpResponseType, header
60
60
  * @param url URL of the request endpoint
61
61
  * @param options Options to add to the request
62
62
  */
63
- export declare function request(method: HttpVerb, url: string, options: HttpOptions, is_mock?: () => boolean, mock_handler?: (m: HttpVerb, url: string, body?: any) => Observable<HttpResponse> | null, success?: (e: Response, t: HttpResponseType) => Promise<HttpResponse>): Observable<HttpResponse>;
63
+ export declare function request(method: HttpVerb, url: string, options: HttpOptions, is_mock?: () => boolean, mock_handler?: (m: HttpVerb, url: string, body?: any) => Observable<HashMap | string | void> | null, success?: (e: Response, t: HttpResponseType) => Promise<HttpResponse>): Observable<HttpResponse>;
@@ -32,7 +32,7 @@ export declare function clearMockEndpoints(handler_map?: HashMap<MockHttpRequest
32
32
  * @param handler_map Handler map to query for the request handler.
33
33
  * Defaults to the global handler map
34
34
  */
35
- export declare function mockRequest<T>(method: HttpVerb, url: string, body?: any, handler_map?: HashMap<MockHttpRequestHandler>): Observable<T> | null;
35
+ export declare function mockRequest(method: HttpVerb, url: string, body?: any, handler_map?: HashMap<MockHttpRequestHandler>): Observable<HashMap | string | void> | null;
36
36
  /**
37
37
  * @private
38
38
  * Find a request handler for the given URL and method
@@ -55,3 +55,8 @@ export declare function processRequest<T = any>(url: string, handler: MockHttpRe
55
55
  * @param request Request contents
56
56
  */
57
57
  export declare function onMockRequest(handler: MockHttpRequestHandler, request: MockHttpRequest): Observable<any>;
58
+ /**
59
+ * Get a list of the method + endpoints that have been mocked
60
+ * @returns List of the method + endpoint that have been mocked
61
+ */
62
+ export declare function listMockedEndpoints(): string[];