@firestitch/api
Advanced tools
Comparing version 13.1.0 to 13.1.1
import { Queue } from '@firestitch/common'; | ||
import { HttpContext } from '@angular/common/http'; | ||
import { ResponseType } from '../enums/response-type.enum'; | ||
import * as i0 from "@angular/core"; | ||
import { RequestConfig } from '../interfaces'; | ||
export declare class FsApiConfig { | ||
private config?; | ||
private _config; | ||
private _method; | ||
private _data; | ||
/** A key value store for the request headers. */ | ||
@@ -15,9 +18,19 @@ headers?: Record<string, string | string[]>; | ||
responseType: ResponseType; | ||
customQueue: Queue; | ||
queue: Queue; | ||
data: any; | ||
constructor(config?: any); | ||
stream: boolean; | ||
cache?: boolean; | ||
mapHttpResponseBody?: boolean; | ||
context?: HttpContext; | ||
constructor(_config: RequestConfig, _method: string, _data: any); | ||
get method(): string; | ||
get methodGet(): boolean; | ||
/** Adds or overrides a header value based on the name */ | ||
appendHeader(name: string, value: string): void; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<FsApiConfig, [{ optional: true; }]>; | ||
static ɵprov: i0.ɵɵInjectableDeclaration<FsApiConfig>; | ||
/** | ||
* Sanitize the passed object | ||
* | ||
* @param obj | ||
*/ | ||
private _sanitize; | ||
} |
export * from './response-type.enum'; | ||
export * from './stream-event-type.enum'; |
@@ -1,5 +0,5 @@ | ||
import { FsApiBaseHander } from '../interfaces/handler.interface'; | ||
import { HttpRequest, HttpResponse } from '@angular/common/http'; | ||
import { ApiCache } from '../classes/api-cache'; | ||
import { RequestConfig } from '../interfaces'; | ||
import { ApiCache } from '../classes/api-cache'; | ||
import { FsApiBaseHander } from '../interfaces/handler.interface'; | ||
export declare class FsApiCacheHandler implements FsApiBaseHander { | ||
@@ -6,0 +6,0 @@ private _cache; |
@@ -0,7 +1,9 @@ | ||
import { HttpResponse } from '@angular/common/http'; | ||
import { FsApiConfig } from '../classes'; | ||
import { FsApiBaseHander } from '../interfaces/handler.interface'; | ||
export declare class FsApiResponseBodyHandler implements FsApiBaseHander { | ||
success(event: any, config: any): void; | ||
error(error: any, config: any): void; | ||
complete(config: any): void; | ||
success(event: HttpResponse<any>, config: FsApiConfig): void; | ||
error(error: any, config: FsApiConfig): void; | ||
complete(config: FsApiConfig): void; | ||
processData(data: any): void; | ||
} |
@@ -0,3 +1,3 @@ | ||
import { Observable } from 'rxjs'; | ||
import { HttpEvent, HttpHandler, HttpRequest } from '@angular/common/http'; | ||
import { Observable } from 'rxjs'; | ||
import { RequestInterceptor } from './base/request.interceptor'; | ||
@@ -4,0 +4,0 @@ export declare class BodyHandlerInterceptor extends RequestInterceptor { |
@@ -0,3 +1,3 @@ | ||
import { Observable } from 'rxjs'; | ||
import { HttpEvent, HttpHandler, HttpRequest } from '@angular/common/http'; | ||
import { Observable } from 'rxjs'; | ||
import { RequestInterceptor } from './base/request.interceptor'; | ||
@@ -4,0 +4,0 @@ export declare class HeadersHandlerInterceptor extends RequestInterceptor { |
@@ -1,7 +0,7 @@ | ||
import { HttpRequest, HttpResponse, HttpErrorResponse } from '@angular/common/http'; | ||
import { RequestConfig } from './request-config.interface'; | ||
import { HttpErrorResponse, HttpRequest, HttpResponse } from '@angular/common/http'; | ||
import { FsApiConfig } from '../classes'; | ||
export interface FsApiBaseHander { | ||
success(event?: HttpResponse<any>, config?: RequestConfig, request?: HttpRequest<any>): any; | ||
error(error?: HttpErrorResponse, config?: RequestConfig): any; | ||
complete(config?: RequestConfig): any; | ||
success(event?: HttpResponse<any>, config?: FsApiConfig, request?: HttpRequest<any>): any; | ||
error(error?: HttpErrorResponse, config?: FsApiConfig): any; | ||
complete(config?: FsApiConfig): any; | ||
} |
@@ -0,2 +1,5 @@ | ||
export * from './handler.interface'; | ||
export * from './module-config.interface'; | ||
export * from './request-config.interface'; | ||
export * from './stream-event-data.interface'; | ||
export * from './stream-event-http-response.interface'; |
import { Queue } from '@firestitch/common'; | ||
import { HttpContext } from '@angular/common/http'; | ||
import { ResponseType } from '../enums/response-type.enum'; | ||
import { HttpContext } from '@angular/common/http'; | ||
export interface RequestConfig { | ||
@@ -14,6 +14,7 @@ headers?: Record<string, string | string[]>; | ||
cache?: boolean; | ||
customQueue?: Queue; | ||
queue?: Queue; | ||
data?: any; | ||
context?: HttpContext; | ||
mapHttpResponseBody?: boolean; | ||
stream?: boolean; | ||
} |
@@ -7,3 +7,2 @@ import { DomSanitizer } from '@angular/platform-browser'; | ||
import { ApiCache } from '../classes/api-cache'; | ||
import { FsApiConfig } from '../classes/api-config'; | ||
import { FsApiResponseBodyHandler } from '../handlers/response-body.handler'; | ||
@@ -13,5 +12,5 @@ import { FsApiResponseHandler } from '../handlers/response.handler'; | ||
import { IModuleConfig } from '../interfaces/module-config.interface'; | ||
import { StreamEvent } from '../types'; | ||
import * as i0 from "@angular/core"; | ||
export declare class FsApi { | ||
private _apiConfig; | ||
private _http; | ||
@@ -29,3 +28,3 @@ private _sanitizer; | ||
private _responseBodyHandlers; | ||
constructor(_apiConfig: FsApiConfig, _http: HttpXhrBackend, _sanitizer: DomSanitizer, _config: IModuleConfig, _httpInterceptors: any, _requestInterceptors: any, _responseHandler: FsApiResponseHandler, _responseBodyHandler: FsApiResponseBodyHandler); | ||
constructor(_http: HttpXhrBackend, _sanitizer: DomSanitizer, _config: IModuleConfig, _httpInterceptors: any, _requestInterceptors: any, _responseHandler: FsApiResponseHandler, _responseBodyHandler: FsApiResponseBodyHandler); | ||
createApiFile(url: string, filename?: string): FsApiFile; | ||
@@ -39,11 +38,9 @@ get queue(): Queue; | ||
delete(url: any, data?: any, config?: RequestConfig): Observable<any>; | ||
request(method: string, url: string, data?: object, config?: RequestConfig): Observable<any>; | ||
/** | ||
* Sanitize the passed object | ||
* | ||
* @param obj | ||
*/ | ||
private _sanitize; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<FsApi, [null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>; | ||
stream(method: string, url: string, data?: any, requestConfig?: RequestConfig): Observable<StreamEvent>; | ||
request(method: string, url: string, data?: any, requestConfig?: RequestConfig): Observable<any>; | ||
private _createHttpRequest; | ||
private _getHandlers; | ||
private _getInterceptorChain; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<FsApi, [null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>; | ||
static ɵprov: i0.ɵɵInjectableDeclaration<FsApi>; | ||
} |
{ | ||
"name": "@firestitch/api", | ||
"version": "13.1.0", | ||
"version": "13.1.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
export { FsApiModule } from './app/fs-api.module'; | ||
export { CustomParamsEncoder, FsApiFile, RequestHandler } from './app/classes'; | ||
export { FsApi } from './app/services/api.service'; | ||
export { RequestHandler, CustomParamsEncoder, FsApiConfig, FsApiFile } from './app/classes'; | ||
export { FS_API_REQUEST_INTERCEPTOR, FS_API_RESPONSE_HANDLER, FS_API_CONFIG } from './app/fs-api-providers'; | ||
export { FS_API_CONFIG, FS_API_REQUEST_INTERCEPTOR, FS_API_RESPONSE_HANDLER } from './app/fs-api-providers'; | ||
export { makeInterceptorFactory } from './app/helpers/interceptor.factory'; | ||
export { FsApiResponseBodyHandler } from './app/handlers/response-body.handler'; | ||
export { FsApiResponseHandler } from './app/handlers/response.handler'; | ||
export { RequestInterceptor } from './app/interceptors/base/request.interceptor'; | ||
export { BodyHandlerInterceptor } from './app/interceptors/body-handler.interceptor'; | ||
export { HeadersHandlerInterceptor } from './app/interceptors/headers-handler.interceptor'; | ||
export { ParamsHandlerInterceptor } from './app/interceptors/params-handler.interceptor'; | ||
export { HeadersHandlerInterceptor } from './app/interceptors/headers-handler.interceptor'; | ||
export { FsApiResponseHandler } from './app/handlers/response.handler'; | ||
export { FsApiResponseBodyHandler } from './app/handlers/response-body.handler'; | ||
export { RequestInterceptor } from './app/interceptors/base/request.interceptor'; | ||
export { IModuleConfig } from './app/interfaces/module-config.interface'; | ||
export { RequestConfig } from './app/interfaces/request-config.interface'; | ||
export { FsApiBaseHander } from './app/interfaces/handler.interface'; | ||
export { ResponseType } from './app/enums/response-type.enum'; | ||
export { ResponseType, StreamEventType } from './app/enums'; | ||
export { FsApiBaseHander, IModuleConfig, RequestConfig } from './app/interfaces'; | ||
export { StreamEvent } from './app/types'; | ||
export { FsApiImageDirective } from './app/directives'; | ||
export { FsApiImagePipe } from './app/pipes'; | ||
export { DisplayApiError } from './app/consts'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
294989
87
2684
0