WsgClient Class

Beta  

Base class for Client implementations of services that are based on WSG

Extends

Methods

Name Description
constructor(apiVersion: string): WsgClient Protected Creates an instance of Client.  
deleteInstance<T extends WsgInstance<T>>(requestContext: AuthorizedClientRequestContext, relativeUrlPath: string, instance?: T, requestOptions?: WsgRequestOptions, httpRequestOptions?: HttpRequestOptions): Promise<void> Protected used by clients to delete strongly typed instances through the standard WSG REST API  
getInstances<T extends WsgInstance<T>>(requestContext: AuthorizedClientRequestContext, typedConstructor: () => T, relativeUrlPath: string, queryOptions?: RequestQueryOptions, httpRequestOptions?: HttpRequestOptions): Promise<T[]> Protected Used by clients to get strongly typed instances from standard WSG REST queries that return EC JSON instances.  
getInstancesChunk<T extends WsgInstance<T>>(requestContext: AuthorizedClientRequestContext, url: string, chunkedQueryContext: undefined | ChunkedQueryContext, typedConstructor: () => T, queryOptions?: RequestQueryOptions, httpRequestOptions?: HttpRequestOptions): Promise<T[]> Protected Used by clients to get a chunk of strongly typed instances from standard WSG REST queries that return EC JSON instances.  
getRelyingPartyUrl(): string ProtectedAbstract Implemented by clients to specify the relyingPartyUrl for the service.  
getUrl(requestContext: ClientRequestContext, excludeApiVersion?: boolean): Promise<string> Gets the URL of the service.  
postInstance<T extends WsgInstance<T>>(requestContext: AuthorizedClientRequestContext, typedConstructor: () => T, relativeUrlPath: string, instance: T, requestOptions?: WsgRequestOptions, httpRequestOptions?: HttpRequestOptions): Promise<T> Protected Used by clients to post strongly typed instances through standard WSG REST API  
postInstances<T extends WsgInstance<T>>(requestContext: AuthorizedClientRequestContext, typedConstructor: () => T, relativeUrlPath: string, instances: T[], requestOptions?: WsgRequestOptions, httpRequestOptions?: HttpRequestOptions): Promise<T[]> Protected Used by clients to post multiple strongly typed instances through standard WSG REST API  
postQuery<T extends WsgInstance<T>>(requestContext: AuthorizedClientRequestContext, typedConstructor: () => T, relativeUrlPath: string, queryOptions: RequestQueryOptions, httpRequestOptions?: HttpRequestOptions): Promise<T[]> Protected Used by clients to get strongly typed instances from standard WSG REST queries that return EC JSON instances.  
setupOptionDefaults(options: RequestOptions): Promise<void> Protected Augments request options with defaults returned by the DefaultWsgRequestOptionsProvider.  

Inherited methods

Name Inherited from Description
applyUserConfiguredHttpRequestOptions(requestOptions: RequestOptions, userDefinedRequestOptions?: HttpRequestOptions): void Protected Client Configures request options based on user defined values in HttpRequestOptions
delete(requestContext: AuthorizedClientRequestContext, relativeUrlPath: string, httpRequestOptions?: HttpRequestOptions): Promise<void> Protected Client used by clients to send delete requests
getUrlSearchKey(): string ProtectedAbstract Client Implemented by clients to specify the name/key to query the service URLs from

Properties

Name Type Description
_url Protected undefined | string    
apiVersion string    
configHostRelyingPartyUri StaticReadonly "imjs_default_relying_party_uri"    
configUseHostRelyingPartyUriAsFallback StaticReadonly "imjs_use_default_relying_party_uri_as_fallback"    

Inherited properties

Name Type Inherited from Description
baseUrl Protected undefined | string Client Sets the default base URL to use with this client.

Defined in

Last Updated: 12 June, 2024