Skip to content

Commit

Permalink
export missing types on public api surface
Browse files Browse the repository at this point in the history
make extract-api part of build:lib
  • Loading branch information
jeremymeng authored Feb 12, 2022
1 parent dec6160 commit df5d874
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 24 deletions.
27 changes: 22 additions & 5 deletions lib/msRest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export {
AbortSignalLike,
} from "./webResource";
export { DefaultHttpClient } from "./defaultHttpClient";
export { CommonRequestInfo, CommonRequestInit, CommonResponse } from "./fetchHttpClient";
export { HttpClient } from "./httpClient";
export { HttpHeaders, HttpHeadersLike } from "./httpHeaders";
export { HttpHeader, HttpHeaders, HttpHeadersLike, RawHttpHeaders } from "./httpHeaders";
export { HttpOperationResponse, HttpResponse, RestResponse } from "./httpOperationResponse";
export { HttpPipelineLogger } from "./httpPipelineLogger";
export { HttpPipelineLogLevel } from "./httpPipelineLogLevel";
Expand All @@ -26,10 +27,17 @@ export {
OperationParameter,
OperationQueryParameter,
OperationURLParameter,
ParameterPath,
} from "./operationParameter";
export { OperationResponse } from "./operationResponse";
export { OperationSpec } from "./operationSpec";
export { ServiceClient, ServiceClientOptions, flattenResponse } from "./serviceClient";
export {
AgentSettings,
ProxySettings,
ServiceClient,
ServiceClientOptions,
flattenResponse,
} from "./serviceClient";
export { QueryCollectionFormat } from "./queryCollectionFormat";
export { Constants } from "./util/constants";
export { logPolicy } from "./policies/logPolicy";
Expand All @@ -46,10 +54,18 @@ export { systemErrorRetryPolicy } from "./policies/systemErrorRetryPolicy";
export { throttlingRetryPolicy } from "./policies/throttlingRetryPolicy";
export { agentPolicy } from "./policies/agentPolicy";
export { getDefaultProxySettings, proxyPolicy } from "./policies/proxyPolicy";
export { redirectPolicy } from "./policies/redirectPolicy";
export { RedirectOptions, redirectPolicy } from "./policies/redirectPolicy";
export { signingPolicy } from "./policies/signingPolicy";
export { userAgentPolicy, getDefaultUserAgentValue } from "./policies/userAgentPolicy";
export { deserializationPolicy, deserializeResponseBody } from "./policies/deserializationPolicy";
export {
TelemetryInfo,
userAgentPolicy,
getDefaultUserAgentValue,
} from "./policies/userAgentPolicy";
export {
DeserializationContentTypes,
deserializationPolicy,
deserializeResponseBody,
} from "./policies/deserializationPolicy";
export {
MapperType,
SimpleMapperType,
Expand Down Expand Up @@ -88,6 +104,7 @@ export { URLBuilder, URLQuery } from "./url";

// Credentials
export { TokenCredentials } from "./credentials/tokenCredentials";
export { TokenResponse } from "./credentials/tokenResponse";
export { BasicAuthenticationCredentials } from "./credentials/basicAuthenticationCredentials";
export { ApiKeyCredentials, ApiKeyCredentialOptions } from "./credentials/apiKeyCredentials";
export { ServiceClientCredentials } from "./credentials/serviceClientCredentials";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"scripts": {
"build": "run-p build:scripts build:lib",
"build:scripts": "tsc -p ./.scripts/",
"build:lib": "run-s build:tsc build:rollup build:minify-browser",
"build:lib": "run-s build:tsc build:rollup build:minify-browser extract-api",
"build:tsc": "tsc -p tsconfig.es.json",
"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",
Expand Down
101 changes: 83 additions & 18 deletions review/ms-rest-js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ export interface AbortSignalLike {
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 AgentSettings {
// (undocumented)
http: Agent;
// (undocumented)
https: Agent;
}

// @public
export interface ApiKeyCredentialOptions {
inHeader?: {
Expand All @@ -53,8 +59,6 @@ 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)
Expand Down Expand Up @@ -114,6 +118,23 @@ export class BasicAuthenticationCredentials implements ServiceClientCredentials
userName: string;
}

// @public (undocumented)
export type CommonRequestInfo = string;

// @public (undocumented)
export type CommonRequestInit = Omit<RequestInit, "body" | "headers" | "signal"> & {
body?: any;
headers?: any;
signal?: any;
};

// @public (undocumented)
export type CommonResponse = Omit<Response, "body" | "trailer" | "formData"> & {
body: any;
trailer: any;
formData: any;
};

// @public (undocumented)
export interface CompositeMapper extends BaseMapper {
// (undocumented)
Expand Down Expand Up @@ -173,10 +194,6 @@ export const Constants: {
//
// @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)
Expand All @@ -188,8 +205,12 @@ export class DefaultHttpClient extends FetchHttpClient {
// @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 interface DeserializationContentTypes {
json?: string[];
xml?: string[];
}

// @public
export function deserializationPolicy(deserializationContentTypes?: DeserializationContentTypes): RequestPolicyFactory;

Expand Down Expand Up @@ -249,8 +270,6 @@ export function generateClientRequestIdPolicy(requestIdHeaderName?: string): Req
// @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;

Expand All @@ -261,15 +280,19 @@ export function getDefaultUserAgentValue(): string;
export interface HttpClient extends RequestPolicy {
}

// @public
export interface HttpHeader {
name: string;
value: string;
}

// @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;
Expand Down Expand Up @@ -406,7 +429,6 @@ export interface OperationArguments {
// @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;
}

Expand Down Expand Up @@ -445,6 +467,11 @@ export interface OperationURLParameter extends OperationParameter {
skipEncoding?: boolean;
}

// @public (undocumented)
export type ParameterPath = string | string[] | {
[propertyName: string]: ParameterPath;
};

// @public
export interface ParameterValue {
// (undocumented)
Expand Down Expand Up @@ -474,6 +501,18 @@ export function promiseToServiceCallback<T>(promise: Promise<HttpOperationRespon
// @public (undocumented)
export function proxyPolicy(proxySettings?: ProxySettings): RequestPolicyFactory;

// @public
export interface ProxySettings {
// (undocumented)
host: string;
// (undocumented)
password?: string;
// (undocumented)
port: number;
// (undocumented)
username?: string;
}

// @public
export enum QueryCollectionFormat {
// (undocumented)
Expand All @@ -488,6 +527,19 @@ export enum QueryCollectionFormat {
Tsv = "\t"
}

// @public
export type RawHttpHeaders = {
[headerName: string]: string;
};

// @public
export interface RedirectOptions {
// (undocumented)
handleRedirects: boolean;
// (undocumented)
maxRetries?: number;
}

// @public (undocumented)
export function redirectPolicy(maximumRetries?: number): RequestPolicyFactory;

Expand Down Expand Up @@ -659,7 +711,6 @@ export interface ServiceClientOptions {
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;
Expand All @@ -686,6 +737,12 @@ export function stripResponse(response: HttpOperationResponse): any;
// @public (undocumented)
export function systemErrorRetryPolicy(retryCount?: number, retryInterval?: number, minRetryInterval?: number, maxRetryInterval?: number): RequestPolicyFactory;

// @public (undocumented)
export type TelemetryInfo = {
key?: string;
value?: string;
};

// @public (undocumented)
export function throttlingRetryPolicy(maxRetries?: number): RequestPolicyFactory;

Expand All @@ -699,6 +756,16 @@ export class TokenCredentials implements ServiceClientCredentials {
token: string;
}

// @public
export interface TokenResponse {
// (undocumented)
readonly [x: string]: any;
// (undocumented)
readonly accessToken: string;
// (undocumented)
readonly tokenType: string;
}

// @public (undocumented)
export class TopicCredentials extends ApiKeyCredentials {
constructor(topicKey: string);
Expand Down Expand Up @@ -748,8 +815,6 @@ export class URLQuery {
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;

Expand Down

0 comments on commit df5d874

Please sign in to comment.