Ability to skip resource validation with RP calls (#73)

* Support ability to skip resource validation

* Use request options
This commit is contained in:
Vignesh Rangaishenvi
2020-07-07 14:31:19 -07:00
committed by GitHub
parent 84ea3796ec
commit a08890aadf
3 changed files with 103 additions and 35 deletions

View File

@@ -1,9 +1,28 @@
export interface IResourceProviderClient<TResource> {
deleteAsync(url: string, apiVersion: string): Promise<void>;
getAsync(url: string, apiVersion: string, queryString?: string): Promise<TResource | TResource[]>;
postAsync(url: string, apiVersion: string, body: any): Promise<any>;
putAsync(url: string, apiVersion: string, body: any): Promise<TResource>;
patchAsync(url: string, apiVersion: string, body: any): Promise<TResource>;
deleteAsync(url: string, apiVersion: string, requestOptions?: IResourceProviderRequestOptions): Promise<void>;
getAsync(
url: string,
apiVersion: string,
queryString?: string,
requestOptions?: IResourceProviderRequestOptions
): Promise<TResource | TResource[]>;
postAsync(url: string, apiVersion: string, body: any, requestOptions?: IResourceProviderRequestOptions): Promise<any>;
putAsync(
url: string,
apiVersion: string,
body: any,
requestOptions?: IResourceProviderRequestOptions
): Promise<TResource>;
patchAsync(
url: string,
apiVersion: string,
body: any,
requestOptions?: IResourceProviderRequestOptions
): Promise<TResource>;
}
export interface IResourceProviderRequestOptions {
skipResourceValidation: boolean;
}
export interface IResourceProviderClientFactory<TResult> {