@arcgis/workflow-manager
Version:
ArcGIS Workflow Manager JavaScript API
131 lines (130 loc) • 3.15 kB
TypeScript
import { Attachment, KeyValue } from './shared';
export declare enum AuthorizationLocationType {
Header = "Header",
QueryParams = "QueryParams"
}
export declare enum AuthorizationType {
NoAuth = "NoAuth",
ApiKey = "ApiKey",
BearerToken = "BearerToken",
BasicAuth = "BasicAuth",
DigestAuth = "DigestAuth",
ApiKeyGenerated = "ApiKeyGenerated",
BearerTokenGenerated = "BearerTokenGenerated",
FederatedToken = "FederatedToken"
}
export declare enum BodyType {
NONE = "None",
FORM_DATA = "FormData",
URL_ENCODED = "UrlEncoded",
RAW = "Raw"
}
export declare enum ContentType {
JSON = "application/json",
XML = "application/xml",
TEXT = "text/plain"
}
export declare enum RequestType {
POST = "POST",
PUT = "PUT",
GET = "GET",
DELETE = "DELETE",
HEAD = "HEAD",
PATCH = "PATCH",
OPTIONS = "OPTIONS"
}
export interface ApiKey {
key: string;
value: string;
addedTo: AuthorizationLocationType;
}
export interface Authorization {
apiKey?: ApiKey;
credentials?: Credentials;
authorizationType?: AuthorizationType;
advancedOptions?: AuthorizationAdvanced;
tokenRequest?: GenerateTokenWebRequest;
}
export interface AuthorizationAdvanced {
requestType: RequestType;
url: string;
params: KeyValue[];
}
export interface Body {
urlEncoded?: {
keyValues: KeyValue[];
};
formData?: {
keyValues: KeyValue[];
};
raw?: {
content: string;
contentType: ContentType;
};
}
export interface Credentials {
username?: string;
password?: string;
token?: string;
}
export interface OutputValue {
value: string;
path: string;
result: string;
}
export interface RetrySettings {
retrySeconds: number;
maxRetryCount: number;
endExpression: string;
expressionVariables?: KeyValue[];
}
export interface WebRequest {
baseUrl: string;
requestType: RequestType;
pathParams: KeyValue[];
queryParams: KeyValue[];
headers: KeyValue[];
body?: Body;
authorization?: Authorization;
attachment?: Attachment;
outputValues?: KeyValue[];
isAsync?: boolean;
retrySettings?: RetrySettings;
}
export interface GenerateTokenWebRequest {
baseUrl: string;
requestType: RequestType;
pathParams: KeyValue[];
queryParams: KeyValue[];
headers: KeyValue[];
body?: Body;
outputValues?: KeyValue[];
}
export interface TestWebRequest {
webRequest: WebRequest;
jobId?: string | null;
}
export interface WebRequestParsed {
headers: KeyValue[];
body?: string;
}
export interface WebRequestResponse {
status: number;
body: string;
headers: KeyValue[];
outputs?: StepOutputs;
requestUrl: string;
requestDetails: WebRequestParsed;
}
export interface StepOutputs {
outputs?: DefaultStepOutput[] | null;
returnValue?: string | null;
isUserSpecifiedReturnValue?: boolean | null;
comment?: string | null;
}
export interface DefaultStepOutput {
value?: string | null;
name?: string | null;
dataType?: string | null;
isEncoded?: boolean | null;
}