зеркало из https://github.com/Azure/ms-rest-js.git
Родитель
a02da26a5f
Коммит
dec6160128
|
@ -100,3 +100,5 @@ coverage/
|
|||
# Tests
|
||||
coverage
|
||||
.nyc_output
|
||||
temp/
|
||||
tsdoc-metadata.json
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "es/lib/msRest.d.ts",
|
||||
"docModel": {
|
||||
"enabled": true
|
||||
},
|
||||
"apiReport": {
|
||||
"enabled": true,
|
||||
"reportFolder": "./review"
|
||||
},
|
||||
"dtsRollup": {
|
||||
"enabled": true,
|
||||
"untrimmedFilePath": "",
|
||||
"publicTrimmedFilePath": "./types/ms-rest-js.d.ts"
|
||||
},
|
||||
"messages": {
|
||||
"tsdocMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
},
|
||||
"extractorMessageReporting": {
|
||||
"ae-missing-release-tag": {
|
||||
"logLevel": "none"
|
||||
},
|
||||
"ae-unresolved-link": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -63,6 +63,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@azure/logger-js": "^1.1.0",
|
||||
"@microsoft/api-extractor": "^7.18.11",
|
||||
"@ts-common/azure-js-dev-tools": "^19.4.0",
|
||||
"@types/chai": "^4.1.7",
|
||||
"@types/express": "^4.17.0",
|
||||
|
@ -142,7 +143,8 @@
|
|||
"build:rollup": "rollup -c rollup.config.ts",
|
||||
"build:minify-browser": "terser -c -m --comments --source-map \"content='./dist/msRest.browser.js.map'\" -o ./dist/msRest.browser.min.js ./dist/msRest.browser.js",
|
||||
"build:test-browser": "webpack --config webpack.testconfig.ts",
|
||||
"format": "prettier --write \"./**/*.ts\"",
|
||||
"extract-api": "api-extractor run --local",
|
||||
"format": "prettier --write \"./**/*.ts\" *.json",
|
||||
"test": "run-p test:tslint test:unit test:karma",
|
||||
"test:tslint": "tslint -p .",
|
||||
"test:unit": "cross-env TS_NODE_FILES=true nyc mocha",
|
||||
|
|
|
@ -0,0 +1,834 @@
|
|||
## API Report File for "@azure/ms-rest-js"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import { Agent } from 'http';
|
||||
import { TokenCredential } from '@azure/core-auth';
|
||||
|
||||
// @public
|
||||
export interface AbortSignalLike {
|
||||
// (undocumented)
|
||||
readonly aborted: boolean;
|
||||
// (undocumented)
|
||||
addEventListener: (type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;
|
||||
// (undocumented)
|
||||
dispatchEvent: (event: Event) => boolean;
|
||||
// (undocumented)
|
||||
onabort: ((this: AbortSignalLike, ev: Event) => any) | null;
|
||||
// (undocumented)
|
||||
removeEventListener: (type: "abort", listener: (this: AbortSignalLike, ev: Event) => any, options?: any) => void;
|
||||
}
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "AgentSettings" needs to be exported by the entry point msRest.d.ts
|
||||
//
|
||||
// @public (undocumented)
|
||||
export function agentPolicy(agentSettings?: AgentSettings): RequestPolicyFactory;
|
||||
|
||||
// @public
|
||||
export interface ApiKeyCredentialOptions {
|
||||
inHeader?: {
|
||||
[x: string]: any;
|
||||
};
|
||||
inQuery?: {
|
||||
[x: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
// @public
|
||||
export class ApiKeyCredentials implements ServiceClientCredentials {
|
||||
constructor(options: ApiKeyCredentialOptions);
|
||||
signRequest(webResource: WebResourceLike): Promise<WebResourceLike>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export function applyMixins(targetCtor: any, sourceCtors: any[]): void;
|
||||
|
||||
// @public (undocumented)
|
||||
export type Authenticator = (challenge: object) => Promise<string>;
|
||||
|
||||
// @public
|
||||
export class AzureIdentityCredentialAdapter implements ServiceClientCredentials {
|
||||
constructor(azureTokenCredential: TokenCredential, scopes?: string | string[]);
|
||||
// Warning: (ae-forgotten-export) The symbol "TokenResponse" needs to be exported by the entry point msRest.d.ts
|
||||
//
|
||||
// (undocumented)
|
||||
getToken(): Promise<TokenResponse>;
|
||||
// (undocumented)
|
||||
signRequest(webResource: WebResource): Promise<WebResource>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface BaseMapper {
|
||||
// (undocumented)
|
||||
constraints?: MapperConstraints;
|
||||
// (undocumented)
|
||||
defaultValue?: any;
|
||||
// (undocumented)
|
||||
isConstant?: boolean;
|
||||
// (undocumented)
|
||||
nullable?: boolean;
|
||||
// (undocumented)
|
||||
readOnly?: boolean;
|
||||
// (undocumented)
|
||||
required?: boolean;
|
||||
// (undocumented)
|
||||
serializedName?: string;
|
||||
// (undocumented)
|
||||
type: MapperType;
|
||||
// (undocumented)
|
||||
xmlElementName?: string;
|
||||
// (undocumented)
|
||||
xmlIsAttribute?: boolean;
|
||||
// (undocumented)
|
||||
xmlIsWrapped?: boolean;
|
||||
// (undocumented)
|
||||
xmlName?: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export abstract class BaseRequestPolicy implements RequestPolicy {
|
||||
protected constructor(_nextPolicy: RequestPolicy, _options: RequestPolicyOptionsLike);
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
// (undocumented)
|
||||
readonly _nextPolicy: RequestPolicy;
|
||||
// (undocumented)
|
||||
readonly _options: RequestPolicyOptionsLike;
|
||||
// (undocumented)
|
||||
abstract sendRequest(webResource: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
shouldLog(logLevel: HttpPipelineLogLevel): boolean;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class BasicAuthenticationCredentials implements ServiceClientCredentials {
|
||||
constructor(userName: string, password: string, authorizationScheme?: string);
|
||||
// (undocumented)
|
||||
authorizationScheme: string;
|
||||
// (undocumented)
|
||||
password: string;
|
||||
signRequest(webResource: WebResourceLike): Promise<WebResourceLike>;
|
||||
// (undocumented)
|
||||
userName: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface CompositeMapper extends BaseMapper {
|
||||
// (undocumented)
|
||||
type: CompositeMapperType;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface CompositeMapperType {
|
||||
// (undocumented)
|
||||
additionalProperties?: Mapper;
|
||||
// (undocumented)
|
||||
className?: string;
|
||||
// (undocumented)
|
||||
modelProperties?: {
|
||||
[propertyName: string]: Mapper;
|
||||
};
|
||||
// (undocumented)
|
||||
name: "Composite";
|
||||
// (undocumented)
|
||||
polymorphicDiscriminator?: PolymorphicDiscriminator;
|
||||
// (undocumented)
|
||||
uberParent?: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const Constants: {
|
||||
msRestVersion: string;
|
||||
HTTP: string;
|
||||
HTTPS: string;
|
||||
HTTP_PROXY: string;
|
||||
HTTPS_PROXY: string;
|
||||
NO_PROXY: string;
|
||||
ALL_PROXY: string;
|
||||
HttpConstants: {
|
||||
HttpVerbs: {
|
||||
PUT: string;
|
||||
GET: string;
|
||||
DELETE: string;
|
||||
POST: string;
|
||||
MERGE: string;
|
||||
HEAD: string;
|
||||
PATCH: string;
|
||||
};
|
||||
StatusCodes: {
|
||||
TooManyRequests: number;
|
||||
};
|
||||
};
|
||||
HeaderConstants: {
|
||||
AUTHORIZATION: string;
|
||||
AUTHORIZATION_SCHEME: string;
|
||||
RETRY_AFTER: string;
|
||||
USER_AGENT: string;
|
||||
};
|
||||
};
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "FetchHttpClient" needs to be exported by the entry point msRest.d.ts
|
||||
//
|
||||
// @public (undocumented)
|
||||
export class DefaultHttpClient extends FetchHttpClient {
|
||||
// Warning: (ae-forgotten-export) The symbol "CommonRequestInfo" needs to be exported by the entry point msRest.d.ts
|
||||
// Warning: (ae-forgotten-export) The symbol "CommonRequestInit" needs to be exported by the entry point msRest.d.ts
|
||||
// Warning: (ae-forgotten-export) The symbol "CommonResponse" needs to be exported by the entry point msRest.d.ts
|
||||
//
|
||||
// (undocumented)
|
||||
fetch(input: CommonRequestInfo, init?: CommonRequestInit): Promise<CommonResponse>;
|
||||
// (undocumented)
|
||||
prepareRequest(httpRequest: WebResourceLike): Promise<Partial<RequestInit>>;
|
||||
// (undocumented)
|
||||
processRequest(operationResponse: HttpOperationResponse): Promise<void>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export function delay<T>(t: number, value?: T): Promise<T>;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "DeserializationContentTypes" needs to be exported by the entry point msRest.d.ts
|
||||
//
|
||||
// @public
|
||||
export function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes): RequestPolicyFactory;
|
||||
|
||||
// @public (undocumented)
|
||||
export function deserializeResponseBody(jsonContentTypes: string[], xmlContentTypes: string[], response: HttpOperationResponse): Promise<HttpOperationResponse>;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface DictionaryMapper extends BaseMapper {
|
||||
// (undocumented)
|
||||
headerCollectionPrefix?: string;
|
||||
// (undocumented)
|
||||
type: DictionaryMapperType;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface DictionaryMapperType {
|
||||
// (undocumented)
|
||||
name: "Dictionary";
|
||||
// (undocumented)
|
||||
value: Mapper;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class DomainCredentials extends ApiKeyCredentials {
|
||||
constructor(domainKey: string);
|
||||
}
|
||||
|
||||
// @public
|
||||
export function encodeUri(uri: string): string;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface EnumMapper extends BaseMapper {
|
||||
// (undocumented)
|
||||
type: EnumMapperType;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface EnumMapperType {
|
||||
// (undocumented)
|
||||
allowedValues: any[];
|
||||
// (undocumented)
|
||||
name: "Enum";
|
||||
}
|
||||
|
||||
// @public
|
||||
export function executePromisesSequentially(promiseFactories: Array<any>, kickstart: any): Promise<any>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function exponentialRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory;
|
||||
|
||||
// @public (undocumented)
|
||||
export function flattenResponse(_response: HttpOperationResponse, responseSpec: OperationResponse | undefined): RestResponse;
|
||||
|
||||
// @public (undocumented)
|
||||
export function generateClientRequestIdPolicy(requestIdHeaderName?: string): RequestPolicyFactory;
|
||||
|
||||
// @public
|
||||
export function generateUuid(): string;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "ProxySettings" needs to be exported by the entry point msRest.d.ts
|
||||
//
|
||||
// @public (undocumented)
|
||||
export function getDefaultProxySettings(proxyUrl?: string): ProxySettings | undefined;
|
||||
|
||||
// @public (undocumented)
|
||||
export function getDefaultUserAgentValue(): string;
|
||||
|
||||
// @public
|
||||
export interface HttpClient extends RequestPolicy {
|
||||
}
|
||||
|
||||
// @public
|
||||
export class HttpHeaders {
|
||||
// Warning: (ae-forgotten-export) The symbol "RawHttpHeaders" needs to be exported by the entry point msRest.d.ts
|
||||
constructor(rawHeaders?: RawHttpHeaders);
|
||||
clone(): HttpHeaders;
|
||||
contains(headerName: string): boolean;
|
||||
get(headerName: string): string | undefined;
|
||||
headerNames(): string[];
|
||||
// Warning: (ae-forgotten-export) The symbol "HttpHeader" needs to be exported by the entry point msRest.d.ts
|
||||
headersArray(): HttpHeader[];
|
||||
headerValues(): string[];
|
||||
rawHeaders(): RawHttpHeaders;
|
||||
remove(headerName: string): boolean;
|
||||
set(headerName: string, headerValue: string | number): void;
|
||||
toJson(): RawHttpHeaders;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface HttpHeadersLike {
|
||||
clone(): HttpHeadersLike;
|
||||
contains(headerName: string): boolean;
|
||||
get(headerName: string): string | undefined;
|
||||
headerNames(): string[];
|
||||
headersArray(): HttpHeader[];
|
||||
headerValues(): string[];
|
||||
rawHeaders(): RawHttpHeaders;
|
||||
remove(headerName: string): boolean;
|
||||
set(headerName: string, headerValue: string | number): void;
|
||||
toJson(): RawHttpHeaders;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type HttpMethods = "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE";
|
||||
|
||||
// @public
|
||||
export interface HttpOperationResponse extends HttpResponse {
|
||||
blobBody?: Promise<Blob>;
|
||||
bodyAsText?: string | null;
|
||||
parsedBody?: any;
|
||||
parsedHeaders?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
readableStreamBody?: NodeJS.ReadableStream;
|
||||
redirected?: boolean;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface HttpPipelineLogger {
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
minimumLogLevel: HttpPipelineLogLevel;
|
||||
}
|
||||
|
||||
// @public
|
||||
export enum HttpPipelineLogLevel {
|
||||
ERROR = 1,
|
||||
INFO = 3,
|
||||
OFF = 0,
|
||||
WARNING = 2
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type HttpRequestBody = Blob | string | ArrayBuffer | ArrayBufferView | (() => NodeJS.ReadableStream);
|
||||
|
||||
// @public
|
||||
export interface HttpResponse {
|
||||
headers: HttpHeadersLike;
|
||||
request: WebResourceLike;
|
||||
status: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export function isDuration(value: string): boolean;
|
||||
|
||||
// @public
|
||||
export const isNode: boolean;
|
||||
|
||||
// @public
|
||||
export function isValidUuid(uuid: string): boolean;
|
||||
|
||||
// @public (undocumented)
|
||||
export function logPolicy(logger?: any): RequestPolicyFactory;
|
||||
|
||||
// @public (undocumented)
|
||||
export type Mapper = BaseMapper | CompositeMapper | SequenceMapper | DictionaryMapper | EnumMapper;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface MapperConstraints {
|
||||
// (undocumented)
|
||||
ExclusiveMaximum?: number;
|
||||
// (undocumented)
|
||||
ExclusiveMinimum?: number;
|
||||
// (undocumented)
|
||||
InclusiveMaximum?: number;
|
||||
// (undocumented)
|
||||
InclusiveMinimum?: number;
|
||||
// (undocumented)
|
||||
MaxItems?: number;
|
||||
// (undocumented)
|
||||
MaxLength?: number;
|
||||
// (undocumented)
|
||||
MinItems?: number;
|
||||
// (undocumented)
|
||||
MinLength?: number;
|
||||
// (undocumented)
|
||||
MultipleOf?: number;
|
||||
// (undocumented)
|
||||
Pattern?: RegExp;
|
||||
// (undocumented)
|
||||
UniqueItems?: true;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type MapperType = SimpleMapperType | CompositeMapperType | SequenceMapperType | DictionaryMapperType | EnumMapperType;
|
||||
|
||||
// @public (undocumented)
|
||||
export const MapperType: {
|
||||
Base64Url: "Base64Url";
|
||||
Boolean: "Boolean";
|
||||
ByteArray: "ByteArray";
|
||||
Date: "Date";
|
||||
DateTime: "DateTime";
|
||||
DateTimeRfc1123: "DateTimeRfc1123";
|
||||
Object: "Object";
|
||||
Stream: "Stream";
|
||||
String: "String";
|
||||
TimeSpan: "TimeSpan";
|
||||
UnixTime: "UnixTime";
|
||||
Number: "Number";
|
||||
Composite: "Composite";
|
||||
Sequence: "Sequence";
|
||||
Dictionary: "Dictionary";
|
||||
Enum: "Enum";
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface OperationArguments {
|
||||
[parameterName: string]: any;
|
||||
options?: RequestOptionsBase;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationParameter {
|
||||
mapper: Mapper;
|
||||
// Warning: (ae-forgotten-export) The symbol "ParameterPath" needs to be exported by the entry point msRest.d.ts
|
||||
parameterPath: ParameterPath;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationQueryParameter extends OperationParameter {
|
||||
collectionFormat?: QueryCollectionFormat;
|
||||
skipEncoding?: boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationResponse {
|
||||
bodyMapper?: Mapper;
|
||||
headersMapper?: Mapper;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationSpec {
|
||||
readonly baseUrl?: string;
|
||||
readonly contentType?: string;
|
||||
readonly formDataParameters?: ReadonlyArray<OperationParameter>;
|
||||
readonly headerParameters?: ReadonlyArray<OperationParameter>;
|
||||
readonly httpMethod: HttpMethods;
|
||||
readonly isXML?: boolean;
|
||||
readonly path?: string;
|
||||
readonly queryParameters?: ReadonlyArray<OperationQueryParameter>;
|
||||
readonly requestBody?: OperationParameter;
|
||||
readonly responses: {
|
||||
[responseCode: string]: OperationResponse;
|
||||
};
|
||||
readonly serializer: Serializer;
|
||||
readonly urlParameters?: ReadonlyArray<OperationURLParameter>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface OperationURLParameter extends OperationParameter {
|
||||
skipEncoding?: boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ParameterValue {
|
||||
// (undocumented)
|
||||
[key: string]: any;
|
||||
// (undocumented)
|
||||
skipUrlEncoding: boolean;
|
||||
// (undocumented)
|
||||
value: any;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface PolymorphicDiscriminator {
|
||||
// (undocumented)
|
||||
[key: string]: string;
|
||||
// (undocumented)
|
||||
clientName: string;
|
||||
// (undocumented)
|
||||
serializedName: string;
|
||||
}
|
||||
|
||||
// @public @deprecated
|
||||
export function promiseToCallback(promise: Promise<any>): Function;
|
||||
|
||||
// @public
|
||||
export function promiseToServiceCallback<T>(promise: Promise<HttpOperationResponse>): Function;
|
||||
|
||||
// @public (undocumented)
|
||||
export function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory;
|
||||
|
||||
// @public
|
||||
export enum QueryCollectionFormat {
|
||||
// (undocumented)
|
||||
Csv = ",",
|
||||
// (undocumented)
|
||||
Multi = "Multi",
|
||||
// (undocumented)
|
||||
Pipes = "|",
|
||||
// (undocumented)
|
||||
Ssv = " ",
|
||||
// (undocumented)
|
||||
Tsv = "\t"
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export function redirectPolicy(maximumRetries?: number): RequestPolicyFactory;
|
||||
|
||||
// @public
|
||||
export interface RequestOptionsBase {
|
||||
// (undocumented)
|
||||
[key: string]: any;
|
||||
abortSignal?: AbortSignalLike;
|
||||
customHeaders?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
onDownloadProgress?: (progress: TransferProgressEvent) => void;
|
||||
onUploadProgress?: (progress: TransferProgressEvent) => void;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RequestPolicy {
|
||||
// (undocumented)
|
||||
sendRequest(httpRequest: WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type RequestPolicyFactory = {
|
||||
create(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike): RequestPolicy;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class RequestPolicyOptions implements RequestPolicyOptionsLike {
|
||||
constructor(_logger?: HttpPipelineLogger | undefined);
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
shouldLog(logLevel: HttpPipelineLogLevel): boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface RequestPolicyOptionsLike {
|
||||
log(logLevel: HttpPipelineLogLevel, message: string): void;
|
||||
shouldLog(logLevel: HttpPipelineLogLevel): boolean;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RequestPrepareOptions {
|
||||
// (undocumented)
|
||||
abortSignal?: AbortSignalLike;
|
||||
baseUrl?: string;
|
||||
body?: any;
|
||||
bodyIsStream?: boolean;
|
||||
deserializationMapper?: object;
|
||||
disableClientRequestId?: boolean;
|
||||
disableJsonStringifyOnBody?: boolean;
|
||||
// (undocumented)
|
||||
formData?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
headers?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
mappers?: {
|
||||
[x: string]: any;
|
||||
};
|
||||
method: HttpMethods;
|
||||
// (undocumented)
|
||||
onDownloadProgress?: (progress: TransferProgressEvent) => void;
|
||||
// (undocumented)
|
||||
onUploadProgress?: (progress: TransferProgressEvent) => void;
|
||||
pathParameters?: {
|
||||
[key: string]: any | ParameterValue;
|
||||
};
|
||||
pathTemplate?: string;
|
||||
queryParameters?: {
|
||||
[key: string]: any | ParameterValue;
|
||||
};
|
||||
redirectLimit?: number;
|
||||
serializationMapper?: Mapper;
|
||||
// (undocumented)
|
||||
streamResponseBody?: boolean;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class RestError extends Error {
|
||||
constructor(message: string, code?: string, statusCode?: number, request?: WebResourceLike, response?: HttpOperationResponse, body?: any);
|
||||
// (undocumented)
|
||||
body?: any;
|
||||
// (undocumented)
|
||||
code?: string;
|
||||
// (undocumented)
|
||||
static readonly PARSE_ERROR: string;
|
||||
// (undocumented)
|
||||
request?: WebResourceLike;
|
||||
// (undocumented)
|
||||
static readonly REQUEST_ABORTED_ERROR: string;
|
||||
// (undocumented)
|
||||
static readonly REQUEST_SEND_ERROR: string;
|
||||
// (undocumented)
|
||||
response?: HttpOperationResponse;
|
||||
// (undocumented)
|
||||
statusCode?: number;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface RestResponse {
|
||||
// (undocumented)
|
||||
[key: string]: any;
|
||||
_response: HttpOperationResponse;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface SequenceMapper extends BaseMapper {
|
||||
// (undocumented)
|
||||
type: SequenceMapperType;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface SequenceMapperType {
|
||||
// (undocumented)
|
||||
element: Mapper;
|
||||
// (undocumented)
|
||||
name: "Sequence";
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export function serializeObject(toSerialize: any): any;
|
||||
|
||||
// @public (undocumented)
|
||||
export class Serializer {
|
||||
constructor(modelMappers?: {
|
||||
[key: string]: any;
|
||||
}, isXML?: boolean | undefined);
|
||||
deserialize(mapper: Mapper, responseBody: any, objectName: string): any;
|
||||
// (undocumented)
|
||||
readonly isXML?: boolean | undefined;
|
||||
// (undocumented)
|
||||
readonly modelMappers: {
|
||||
[key: string]: any;
|
||||
};
|
||||
serialize(mapper: Mapper, object: any, objectName?: string): any;
|
||||
// (undocumented)
|
||||
validateConstraints(mapper: Mapper, value: any, objectName: string): void;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ServiceCallback<TResult> {
|
||||
(err: Error | RestError | null, result?: TResult, request?: WebResourceLike, response?: HttpOperationResponse): void;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class ServiceClient {
|
||||
constructor(credentials?: ServiceClientCredentials | TokenCredential, options?: ServiceClientOptions);
|
||||
protected baseUri?: string;
|
||||
protected requestContentType?: string;
|
||||
sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback<any>): Promise<RestResponse>;
|
||||
sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise<HttpOperationResponse>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ServiceClientCredentials {
|
||||
signRequest(webResource: WebResourceLike): Promise<WebResourceLike>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ServiceClientOptions {
|
||||
agentSettings?: AgentSettings;
|
||||
baseUri?: string;
|
||||
clientRequestIdHeaderName?: string;
|
||||
deserializationContentTypes?: DeserializationContentTypes;
|
||||
generateClientRequestIdHeader?: boolean;
|
||||
httpClient?: HttpClient;
|
||||
httpPipelineLogger?: HttpPipelineLogger;
|
||||
noRetryPolicy?: boolean;
|
||||
proxySettings?: ProxySettings;
|
||||
// Warning: (ae-forgotten-export) The symbol "RedirectOptions" needs to be exported by the entry point msRest.d.ts
|
||||
redirectOptions?: RedirectOptions;
|
||||
requestPolicyFactories?: RequestPolicyFactory[] | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);
|
||||
rpRegistrationRetryTimeout?: number;
|
||||
userAgent?: string | ((defaultUserAgent: string) => string);
|
||||
userAgentHeaderName?: string | ((defaultUserAgentHeaderName: string) => string);
|
||||
withCredentials?: boolean;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export function signingPolicy(authenticationProvider: ServiceClientCredentials): RequestPolicyFactory;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface SimpleMapperType {
|
||||
// (undocumented)
|
||||
name: "Base64Url" | "Boolean" | "ByteArray" | "Date" | "DateTime" | "DateTimeRfc1123" | "Object" | "Stream" | "String" | "TimeSpan" | "UnixTime" | "Uuid" | "Number" | "any";
|
||||
}
|
||||
|
||||
// @public
|
||||
export function stripRequest(request: WebResourceLike): WebResourceLike;
|
||||
|
||||
// @public
|
||||
export function stripResponse(response: HttpOperationResponse): any;
|
||||
|
||||
// @public (undocumented)
|
||||
export function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory;
|
||||
|
||||
// @public (undocumented)
|
||||
export function throttlingRetryPolicy(maxRetries?: number): RequestPolicyFactory;
|
||||
|
||||
// @public
|
||||
export class TokenCredentials implements ServiceClientCredentials {
|
||||
constructor(token: string, authorizationScheme?: string);
|
||||
// (undocumented)
|
||||
authorizationScheme: string;
|
||||
signRequest(webResource: WebResourceLike): Promise<WebResourceLike>;
|
||||
// (undocumented)
|
||||
token: string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class TopicCredentials extends ApiKeyCredentials {
|
||||
constructor(topicKey: string);
|
||||
}
|
||||
|
||||
// @public
|
||||
export type TransferProgressEvent = {
|
||||
loadedBytes: number;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class URLBuilder {
|
||||
appendPath(path: string | undefined): void;
|
||||
getHost(): string | undefined;
|
||||
getPath(): string | undefined;
|
||||
getPort(): string | undefined;
|
||||
getQuery(): string | undefined;
|
||||
getQueryParameterValue(queryParameterName: string): string | string[] | undefined;
|
||||
getScheme(): string | undefined;
|
||||
// (undocumented)
|
||||
static parse(text: string): URLBuilder;
|
||||
replaceAll(searchValue: string, replaceValue: string): void;
|
||||
setHost(host: string | undefined): void;
|
||||
setPath(path: string | undefined): void;
|
||||
setPort(port: number | string | undefined): void;
|
||||
setQuery(query: string | undefined): void;
|
||||
setQueryParameter(queryParameterName: string, queryParameterValue: any): void;
|
||||
setScheme(scheme: string | undefined): void;
|
||||
// (undocumented)
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface UrlParameterValue {
|
||||
// (undocumented)
|
||||
skipUrlEncoding: boolean;
|
||||
// (undocumented)
|
||||
value: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class URLQuery {
|
||||
any(): boolean;
|
||||
get(parameterName: string): string | string[] | undefined;
|
||||
static parse(text: string): URLQuery;
|
||||
set(parameterName: string, parameterValue: any): void;
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "TelemetryInfo" needs to be exported by the entry point msRest.d.ts
|
||||
//
|
||||
// @public (undocumented)
|
||||
export function userAgentPolicy(userAgentData?: TelemetryInfo): RequestPolicyFactory;
|
||||
|
||||
// @public
|
||||
export class WebResource {
|
||||
constructor(url?: string, method?: HttpMethods, body?: any, query?: {
|
||||
[key: string]: any;
|
||||
}, headers?: {
|
||||
[key: string]: any;
|
||||
} | HttpHeadersLike, streamResponseBody?: boolean, withCredentials?: boolean, abortSignal?: AbortSignalLike, timeout?: number, onUploadProgress?: (progress: TransferProgressEvent) => void, onDownloadProgress?: (progress: TransferProgressEvent) => void, proxySettings?: ProxySettings, keepAlive?: boolean, agentSettings?: AgentSettings, redirectLimit?: number);
|
||||
// (undocumented)
|
||||
abortSignal?: AbortSignalLike;
|
||||
// (undocumented)
|
||||
agentSettings?: AgentSettings;
|
||||
// (undocumented)
|
||||
body?: any;
|
||||
clone(): WebResource;
|
||||
// (undocumented)
|
||||
formData?: any;
|
||||
// (undocumented)
|
||||
headers: HttpHeadersLike;
|
||||
// (undocumented)
|
||||
keepAlive?: boolean;
|
||||
// (undocumented)
|
||||
method: HttpMethods;
|
||||
onDownloadProgress?: (progress: TransferProgressEvent) => void;
|
||||
onUploadProgress?: (progress: TransferProgressEvent) => void;
|
||||
operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => undefined | OperationResponse;
|
||||
// (undocumented)
|
||||
operationSpec?: OperationSpec;
|
||||
prepare(options: RequestPrepareOptions): WebResource;
|
||||
// (undocumented)
|
||||
proxySettings?: ProxySettings;
|
||||
// (undocumented)
|
||||
query?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
// (undocumented)
|
||||
redirectLimit?: number;
|
||||
shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);
|
||||
streamResponseBody?: boolean;
|
||||
// (undocumented)
|
||||
timeout: number;
|
||||
// (undocumented)
|
||||
url: string;
|
||||
validateRequestProperties(): void;
|
||||
// (undocumented)
|
||||
withCredentials: boolean;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface WebResourceLike {
|
||||
abortSignal?: AbortSignalLike;
|
||||
agentSettings?: AgentSettings;
|
||||
body?: any;
|
||||
clone(): WebResourceLike;
|
||||
// (undocumented)
|
||||
formData?: any;
|
||||
headers: HttpHeadersLike;
|
||||
keepAlive?: boolean;
|
||||
method: HttpMethods;
|
||||
onDownloadProgress?: (progress: TransferProgressEvent) => void;
|
||||
onUploadProgress?: (progress: TransferProgressEvent) => void;
|
||||
operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => undefined | OperationResponse;
|
||||
operationSpec?: OperationSpec;
|
||||
prepare(options: RequestPrepareOptions): WebResourceLike;
|
||||
proxySettings?: ProxySettings;
|
||||
query?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
redirectLimit?: number;
|
||||
shouldDeserialize?: boolean | ((response: HttpOperationResponse) => boolean);
|
||||
streamResponseBody?: boolean;
|
||||
timeout: number;
|
||||
url: string;
|
||||
validateRequestProperties(): void;
|
||||
withCredentials: boolean;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
|
@ -15,22 +15,9 @@
|
|||
"importHelpers": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"lib": [
|
||||
"es5",
|
||||
"es6",
|
||||
"es7",
|
||||
"esnext",
|
||||
"esnext.asynciterable",
|
||||
"es2015.iterable"
|
||||
]
|
||||
"lib": ["es5", "es6", "es7", "esnext", "esnext.asynciterable", "es2015.iterable"]
|
||||
},
|
||||
"compileOnSave": true,
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
],
|
||||
"include": [
|
||||
"./lib/**/*.ts",
|
||||
"./samples/**/*.ts",
|
||||
"./test/**/*.ts"
|
||||
]
|
||||
"exclude": ["node_modules"],
|
||||
"include": ["./lib/**/*.ts", "./samples/**/*.ts", "./test/**/*.ts"]
|
||||
}
|
||||
|
|
111
tslint.json
111
tslint.json
|
@ -1,62 +1,55 @@
|
|||
{
|
||||
"extends": [
|
||||
"tslint-eslint-rules"
|
||||
"extends": ["tslint-eslint-rules"],
|
||||
"rules": {
|
||||
"class-name": true,
|
||||
"comment-format": [true, "check-space"],
|
||||
"indent": [true, "spaces"],
|
||||
"ter-indent": [
|
||||
true,
|
||||
2,
|
||||
{
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"rules": {
|
||||
"class-name": true,
|
||||
"comment-format": [true, "check-space"],
|
||||
"indent": [true, "spaces"],
|
||||
"ter-indent": [
|
||||
true,
|
||||
2,
|
||||
{
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"linebreak-style": [true, "LF"],
|
||||
"one-line": [true,
|
||||
"check-open-brace",
|
||||
"check-whitespace"
|
||||
],
|
||||
"no-var-keyword": true,
|
||||
"quotemark": [true,
|
||||
"double",
|
||||
"avoid-escape"
|
||||
],
|
||||
"semicolon": [true, "always", "ignore-bound-class-methods"],
|
||||
"whitespace": [true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-module",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
},
|
||||
{
|
||||
"call-signature": "onespace",
|
||||
"index-signature": "onespace",
|
||||
"parameter": "onespace",
|
||||
"property-declaration": "onespace",
|
||||
"variable-declaration": "onespace"
|
||||
}
|
||||
],
|
||||
"jsdoc-format": true,
|
||||
"no-inferrable-types": [true],
|
||||
"no-internal-module": true,
|
||||
"no-null-keyword": true,
|
||||
"no-return-await": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"prefer-const": true,
|
||||
"triple-equals": [true, "allow-undefined-check"]
|
||||
}
|
||||
"linebreak-style": [true, "LF"],
|
||||
"one-line": [true, "check-open-brace", "check-whitespace"],
|
||||
"no-var-keyword": true,
|
||||
"quotemark": [true, "double", "avoid-escape"],
|
||||
"semicolon": [true, "always", "ignore-bound-class-methods"],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-module",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
},
|
||||
{
|
||||
"call-signature": "onespace",
|
||||
"index-signature": "onespace",
|
||||
"parameter": "onespace",
|
||||
"property-declaration": "onespace",
|
||||
"variable-declaration": "onespace"
|
||||
}
|
||||
],
|
||||
"jsdoc-format": true,
|
||||
"no-inferrable-types": [true],
|
||||
"no-internal-module": true,
|
||||
"no-null-keyword": true,
|
||||
"no-return-await": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"prefer-const": true,
|
||||
"triple-equals": [true, "allow-undefined-check"]
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче