op-client-api-proof-of-concept
Version:
OP Client API Proof of concept
124 lines (123 loc) • 4.89 kB
TypeScript
export declare class EntityPlatformClient {
private http;
private baseUrl;
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
constructor(baseUrl?: string, http?: {
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
});
/**
* Gets generic Entity list with OData Query
* @param body (optional)
* @return Entity List
*/
entities(applicationName: string, entityDefinitionName: string, body: ODataQuery_1OfOfEntityAndEntityPlatformAnd_0AndCulture_neutralAndPublicKeyToken_ec022811a512dd5f | undefined): Promise<Entity[]>;
protected processEntities(response: Response): Promise<Entity[]>;
/**
* Gets Platform state.
* @return State values
*/
state(): Promise<{
[key: string]: string;
}>;
protected processState(response: Response): Promise<{
[key: string]: string;
}>;
/**
* Gets the authentication configuration.
* @return Authentication configuration
*/
authentication(): Promise<AuthenticationConfiguration>;
protected processAuthentication(response: Response): Promise<AuthenticationConfiguration>;
}
export declare class AuthenticationConfiguration implements IAuthenticationConfiguration {
authenticationProvider?: string | undefined;
keycloak?: Keycloak | undefined;
azureAd?: AzureAd | undefined;
constructor(data?: IAuthenticationConfiguration);
init(_data?: any): void;
static fromJS(data: any): AuthenticationConfiguration;
toJSON(data?: any): any;
}
export interface IAuthenticationConfiguration {
authenticationProvider?: string | undefined;
keycloak?: Keycloak | undefined;
azureAd?: AzureAd | undefined;
}
export declare class AzureAd implements IAzureAd {
readonly authAppName?: string | undefined;
readonly callbackPath?: string | undefined;
readonly clientId?: string | undefined;
readonly domain?: string | undefined;
readonly instance?: string | undefined;
readonly scope?: string | undefined;
readonly signedOutCallbackPath?: string | undefined;
readonly tenantId?: string | undefined;
constructor(data?: IAzureAd);
init(_data?: any): void;
static fromJS(data: any): AzureAd;
toJSON(data?: any): any;
}
export interface IAzureAd {
authAppName?: string | undefined;
callbackPath?: string | undefined;
clientId?: string | undefined;
domain?: string | undefined;
instance?: string | undefined;
scope?: string | undefined;
signedOutCallbackPath?: string | undefined;
tenantId?: string | undefined;
}
export declare class Keycloak implements IKeycloak {
readonly authAppName?: string | undefined;
readonly authority?: string | undefined;
readonly clientId?: string | undefined;
readonly realmName?: string | undefined;
readonly validAudiences?: string[] | undefined;
constructor(data?: IKeycloak);
init(_data?: any): void;
static fromJS(data: any): Keycloak;
toJSON(data?: any): any;
}
export interface IKeycloak {
authAppName?: string | undefined;
authority?: string | undefined;
clientId?: string | undefined;
realmName?: string | undefined;
validAudiences?: string[] | undefined;
}
export declare class Entity implements IEntity {
id?: string | undefined;
constructor(data?: IEntity);
init(_data?: any): void;
static fromJS(data: any): Entity;
toJSON(data?: any): any;
}
export interface IEntity {
id?: string | undefined;
}
export declare class ODataQuery_1OfOfEntityAndEntityPlatformAnd_0AndCulture_neutralAndPublicKeyToken_ec022811a512dd5f implements IODataQuery_1OfOfEntityAndEntityPlatformAnd_0AndCulture_neutralAndPublicKeyToken_ec022811a512dd5f {
readonly count?: boolean | undefined;
readonly skipToken?: string | undefined;
constructor(data?: IODataQuery_1OfOfEntityAndEntityPlatformAnd_0AndCulture_neutralAndPublicKeyToken_ec022811a512dd5f);
init(_data?: any): void;
static fromJS(data: any): ODataQuery_1OfOfEntityAndEntityPlatformAnd_0AndCulture_neutralAndPublicKeyToken_ec022811a512dd5f;
toJSON(data?: any): any;
}
export interface IODataQuery_1OfOfEntityAndEntityPlatformAnd_0AndCulture_neutralAndPublicKeyToken_ec022811a512dd5f {
count?: boolean | undefined;
skipToken?: string | undefined;
}
export declare class EntityPlatformApiException extends Error {
message: string;
status: number;
response: string;
headers: {
[key: string]: any;
};
result: any;
constructor(message: string, status: number, response: string, headers: {
[key: string]: any;
}, result: any);
protected isApiException: boolean;
static isApiException(obj: any): obj is EntityPlatformApiException;
}