Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support collection format in modular #1983

Merged
merged 17 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/rlc-common/src/helpers/nameUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const ReservedModelNames: ReservedName[] = [
{ name: "else", reservedFor: [NameType.Parameter] },
{ name: "enum", reservedFor: [NameType.Parameter] },
{ name: "error", reservedFor: [NameType.Parameter, ...Newable] },
{ name: "export", reservedFor: [NameType.Parameter] },
{ name: "export", reservedFor: [NameType.Parameter, NameType.Operation] },
{ name: "extends", reservedFor: [NameType.Parameter] },
{ name: "false", reservedFor: [NameType.Parameter] },
{ name: "finally", reservedFor: [NameType.Parameter] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,43 +268,43 @@ export type DeployProjectParameters = DeployProjectBodyParam & RequestParameters

// @public (undocumented)
export interface Export {
post(options: ExportParameters): StreamableMethod<Export202Response | ExportDefaultResponse>;
post(options: ExportParameters): StreamableMethod<ExportOperation202Response | ExportOperationDefaultResponse>;
}

// @public
export interface ExportLogicalResponse extends HttpResponse {
// (undocumented)
status: "200";
}

// @public (undocumented)
export interface Export202Headers {
export interface ExportOperation202Headers {
"operation-location": string;
}

// @public
export interface Export202Response extends HttpResponse {
export interface ExportOperation202Response extends HttpResponse {
// (undocumented)
headers: RawHttpHeaders & Export202Headers;
headers: RawHttpHeaders & ExportOperation202Headers;
// (undocumented)
status: "202";
}

// @public (undocumented)
export interface ExportDefaultHeaders {
export interface ExportOperationDefaultHeaders {
"x-ms-error-code"?: string;
}

// @public (undocumented)
export interface ExportDefaultResponse extends HttpResponse {
export interface ExportOperationDefaultResponse extends HttpResponse {
// (undocumented)
body: ErrorResponse;
// (undocumented)
headers: RawHttpHeaders & ExportDefaultHeaders;
headers: RawHttpHeaders & ExportOperationDefaultHeaders;
// (undocumented)
status: string;
}

// @public
export interface ExportLogicalResponse extends HttpResponse {
// (undocumented)
status: "200";
}

// @public (undocumented)
export type ExportParameters = ExportQueryParam & RequestParameters;

Expand Down Expand Up @@ -416,7 +416,7 @@ export function getLongRunningPoller<TResult extends CreateOrUpdateLogicalRespon
export function getLongRunningPoller<TResult extends DeleteLogicalResponse | DeleteOperationDefaultResponse>(client: Client, initialResponse: DeleteOperation202Response | DeleteOperationDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;

// @public (undocumented)
export function getLongRunningPoller<TResult extends ExportLogicalResponse | ExportDefaultResponse>(client: Client, initialResponse: Export202Response | ExportDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
export function getLongRunningPoller<TResult extends ExportLogicalResponse | ExportOperationDefaultResponse>(client: Client, initialResponse: ExportOperation202Response | ExportOperationDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;

// @public (undocumented)
export function getLongRunningPoller<TResult extends ImportxLogicalResponse | ImportxDefaultResponse>(client: Client, initialResponse: Importx202Response | ImportxDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
Expand Down Expand Up @@ -572,7 +572,7 @@ export function isUnexpected(response: DeleteOperation202Response | DeleteLogica
export function isUnexpected(response: ListProjects200Response | ListProjectsDefaultResponse): response is ListProjectsDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: Export202Response | ExportLogicalResponse | ExportDefaultResponse): response is ExportDefaultResponse;
export function isUnexpected(response: ExportOperation202Response | ExportLogicalResponse | ExportOperationDefaultResponse): response is ExportOperationDefaultResponse;

// @public (undocumented)
export function isUnexpected(response: Importx202Response | ImportxLogicalResponse | ImportxDefaultResponse): response is ImportxDefaultResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import {
DeleteOperationDefaultResponse,
ListProjects200Response,
ListProjectsDefaultResponse,
Export202Response,
ExportDefaultResponse,
ExportOperation202Response,
ExportOperationDefaultResponse,
Importx202Response,
ImportxDefaultResponse,
Train202Response,
Expand Down Expand Up @@ -89,7 +89,9 @@ export interface Export {
/** Triggers a job to export a project's data. */
post(
options: ExportParameters
): StreamableMethod<Export202Response | ExportDefaultResponse>;
): StreamableMethod<
ExportOperation202Response | ExportOperationDefaultResponse
>;
}

export interface Importx {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
DeleteOperationDefaultResponse,
ListProjects200Response,
ListProjectsDefaultResponse,
Export202Response,
ExportOperation202Response,
ExportLogicalResponse,
ExportDefaultResponse,
ExportOperationDefaultResponse,
Importx202Response,
ImportxLogicalResponse,
ImportxDefaultResponse,
Expand Down Expand Up @@ -101,8 +101,11 @@ export function isUnexpected(
response: ListProjects200Response | ListProjectsDefaultResponse
): response is ListProjectsDefaultResponse;
export function isUnexpected(
response: Export202Response | ExportLogicalResponse | ExportDefaultResponse
): response is ExportDefaultResponse;
response:
| ExportOperation202Response
| ExportLogicalResponse
| ExportOperationDefaultResponse
): response is ExportOperationDefaultResponse;
export function isUnexpected(
response: Importx202Response | ImportxLogicalResponse | ImportxDefaultResponse
): response is ImportxDefaultResponse;
Expand Down Expand Up @@ -165,9 +168,9 @@ export function isUnexpected(
| DeleteOperationDefaultResponse
| ListProjects200Response
| ListProjectsDefaultResponse
| Export202Response
| ExportOperation202Response
| ExportLogicalResponse
| ExportDefaultResponse
| ExportOperationDefaultResponse
| Importx202Response
| ImportxLogicalResponse
| ImportxDefaultResponse
Expand Down Expand Up @@ -201,7 +204,7 @@ export function isUnexpected(
| GetDefaultResponse
| DeleteOperationDefaultResponse
| ListProjectsDefaultResponse
| ExportDefaultResponse
| ExportOperationDefaultResponse
| ImportxDefaultResponse
| TrainDefaultResponse
| GetDeploymentDefaultResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
DeleteOperation202Response,
DeleteOperationDefaultResponse,
DeleteLogicalResponse,
Export202Response,
ExportDefaultResponse,
ExportOperation202Response,
ExportOperationDefaultResponse,
ExportLogicalResponse,
Importx202Response,
ImportxDefaultResponse,
Expand Down Expand Up @@ -63,10 +63,10 @@ export async function getLongRunningPoller<
options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>
): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
export async function getLongRunningPoller<
TResult extends ExportLogicalResponse | ExportDefaultResponse
TResult extends ExportLogicalResponse | ExportOperationDefaultResponse
>(
client: Client,
initialResponse: Export202Response | ExportDefaultResponse,
initialResponse: ExportOperation202Response | ExportOperationDefaultResponse,
options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>
): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
export async function getLongRunningPoller<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,26 +119,26 @@ export interface ListProjectsDefaultResponse extends HttpResponse {
headers: RawHttpHeaders & ListProjectsDefaultHeaders;
}

export interface Export202Headers {
export interface ExportOperation202Headers {
/** The location for monitoring the operation state. */
"operation-location": string;
}

/** The request has been accepted for processing, but processing has not yet completed. */
export interface Export202Response extends HttpResponse {
export interface ExportOperation202Response extends HttpResponse {
status: "202";
headers: RawHttpHeaders & Export202Headers;
headers: RawHttpHeaders & ExportOperation202Headers;
}

export interface ExportDefaultHeaders {
export interface ExportOperationDefaultHeaders {
/** String error code indicating what went wrong. */
"x-ms-error-code"?: string;
}

export interface ExportDefaultResponse extends HttpResponse {
export interface ExportOperationDefaultResponse extends HttpResponse {
status: string;
body: ErrorResponse;
headers: RawHttpHeaders & ExportDefaultHeaders;
headers: RawHttpHeaders & ExportOperationDefaultHeaders;
}

/** The final response for long-running export operation */
Expand Down

This file was deleted.

Loading
Loading