Skip to content

Commit

Permalink
CodeGen from PR 22828 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 8fbf213ed823cb1c0bbbc16b5889b4a4c3c4437e into 66174681c09b101de03fd35399080cfbccc93e8f
  • Loading branch information
SDKAuto committed Mar 3, 2023
1 parent 0d7c054 commit 7940ede
Show file tree
Hide file tree
Showing 12 changed files with 1,005 additions and 321 deletions.
610 changes: 340 additions & 270 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

51 changes: 41 additions & 10 deletions sdk/devhub/arm-devhub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
# Release History

## 1.0.0-beta.3 (2023-03-03)

**Features**

## 1.0.0-beta.3 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added Interface ArtifactGenerationProperties
- Added Interface GeneratePreviewArtifactsOptionalParams
- Added Type Alias AuthorizationStatus
- Added Type Alias DockerfileGenerationMode
- Added Type Alias GeneratePreviewArtifactsResponse
- Added Type Alias GenerationLanguage
- Added Type Alias GenerationManifestType
- Added Type Alias ManifestGenerationMode
- Added Type Alias WorkflowRunStatus
- Interface Workflow has a new optional parameter appName
- Interface Workflow has a new optional parameter builderVersion
- Interface Workflow has a new optional parameter dockerfileGenerationMode
- Interface Workflow has a new optional parameter dockerfileOutputDirectory
- Interface Workflow has a new optional parameter generationLanguage
- Interface Workflow has a new optional parameter imageName
- Interface Workflow has a new optional parameter imageTag
- Interface Workflow has a new optional parameter languageVersion
- Interface Workflow has a new optional parameter manifestGenerationMode
- Interface Workflow has a new optional parameter manifestOutputDirectory
- Interface Workflow has a new optional parameter manifestType
- Interface Workflow has a new optional parameter namespacePropertiesArtifactGenerationPropertiesNamespace
- Interface Workflow has a new optional parameter namespacePropertiesGithubWorkflowProfileNamespace
- Interface Workflow has a new optional parameter port
- Interface WorkflowRun has a new optional parameter workflowRunStatus
- Added Enum KnownAuthorizationStatus
- Added Enum KnownDockerfileGenerationMode
- Added Enum KnownGenerationLanguage
- Added Enum KnownGenerationManifestType
- Added Enum KnownManifestGenerationMode
- Added Enum KnownWorkflowRunStatus

**Breaking Changes**

- Interface Workflow no longer has parameter namespace
- Type of parameter authStatus of interface Workflow is changed from ManifestType to AuthorizationStatus


## 1.0.0-beta.2 (2023-01-04)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/devhub/arm-devhub/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "a5a115b149512b8807eab9d02bfcbd3ac0db3477",
"commit": "4618caef770408e4419b39c6cbfad3df166c0922",
"readme": "specification/developerhub/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\developerhub\\resource-manager\\readme.md --use=@autorest/[email protected].20221215.1 --generate-sample=true",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/developerhub/resource-manager/readme.md --use=@autorest/[email protected]",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.4",
"use": "@autorest/[email protected].20221215.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
"use": "@autorest/[email protected]"
}
23 changes: 7 additions & 16 deletions sdk/devhub/arm-devhub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@
"types": "./types/arm-devhub.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-multi-entry": "^6.0.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.8.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"dotenv": "^16.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-recorder": "^2.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^7.1.1",
"@types/chai": "^4.2.8",
Expand All @@ -48,6 +47,7 @@
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devhub/arm-devhub",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
Expand Down Expand Up @@ -108,14 +108,5 @@
}
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devhub/arm-devhub",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-devhub?view=azure-node-preview"
}
}
"autoPublish": true
}
112 changes: 110 additions & 2 deletions sdk/devhub/arm-devhub/review/arm-devhub.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ export interface Acr {
// @public
export type ActionType = string;

// @public
export interface ArtifactGenerationProperties {
appName?: string;
builderVersion?: string;
dockerfileGenerationMode?: DockerfileGenerationMode;
dockerfileOutputDirectory?: string;
generationLanguage?: GenerationLanguage;
imageName?: string;
imageTag?: string;
languageVersion?: string;
manifestGenerationMode?: ManifestGenerationMode;
manifestOutputDirectory?: string;
manifestType?: GenerationManifestType;
namespace?: string;
port?: string;
}

// @public
export type AuthorizationStatus = string;

// @public
export type CreatedByType = string;

Expand Down Expand Up @@ -46,6 +66,7 @@ export class DeveloperHubServiceClient extends coreClient.ServiceClient {
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DeveloperHubServiceClientOptionalParams);
// (undocumented)
apiVersion: string;
generatePreviewArtifacts(location: string, parameters: ArtifactGenerationProperties, options?: GeneratePreviewArtifactsOptionalParams): Promise<GeneratePreviewArtifactsResponse>;
gitHubOAuth(location: string, options?: GitHubOAuthOptionalParams): Promise<GitHubOAuthOperationResponse>;
gitHubOAuthCallback(location: string, code: string, state: string, options?: GitHubOAuthCallbackOptionalParams): Promise<GitHubOAuthCallbackResponse>;
listGitHubOAuth(location: string, options?: ListGitHubOAuthOptionalParams): Promise<ListGitHubOAuthResponse>;
Expand All @@ -64,6 +85,9 @@ export interface DeveloperHubServiceClientOptionalParams extends coreClient.Serv
endpoint?: string;
}

// @public
export type DockerfileGenerationMode = string;

// @public
export interface ErrorAdditionalInfo {
readonly info?: Record<string, unknown>;
Expand All @@ -84,6 +108,21 @@ export interface ErrorResponse {
error?: ErrorDetail;
}

// @public
export interface GeneratePreviewArtifactsOptionalParams extends coreClient.OperationOptions {
}

// @public
export type GeneratePreviewArtifactsResponse = {
[propertyName: string]: string;
};

// @public
export type GenerationLanguage = string;

// @public
export type GenerationManifestType = string;

// @public
export function getContinuationToken(page: unknown): string | undefined;

Expand Down Expand Up @@ -134,6 +173,13 @@ export enum KnownActionType {
Internal = "Internal"
}

// @public
export enum KnownAuthorizationStatus {
Authorized = "Authorized",
Error = "Error",
NotFound = "NotFound"
}

// @public
export enum KnownCreatedByType {
Application = "Application",
Expand All @@ -142,6 +188,41 @@ export enum KnownCreatedByType {
User = "User"
}

// @public
export enum KnownDockerfileGenerationMode {
Disabled = "disabled",
Enabled = "enabled"
}

// @public
export enum KnownGenerationLanguage {
Clojure = "clojure",
Csharp = "csharp",
Erlang = "erlang",
Go = "go",
Gomodule = "gomodule",
Gradle = "gradle",
Java = "java",
Javascript = "javascript",
Php = "php",
Python = "python",
Ruby = "ruby",
Rust = "rust",
Swift = "swift"
}

// @public
export enum KnownGenerationManifestType {
Helm = "helm",
Kube = "kube"
}

// @public
export enum KnownManifestGenerationMode {
Disabled = "disabled",
Enabled = "enabled"
}

// @public
export enum KnownManifestType {
Helm = "helm",
Expand All @@ -163,13 +244,23 @@ export enum KnownPullRequestStatus {
Unknown = "unknown"
}

// @public
export enum KnownWorkflowRunStatus {
Completed = "completed",
Inprogress = "inprogress",
Queued = "queued"
}

// @public
export interface ListGitHubOAuthOptionalParams extends coreClient.OperationOptions {
}

// @public
export type ListGitHubOAuthResponse = GitHubOAuthListResponse;

// @public
export type ManifestGenerationMode = string;

// @public
export type ManifestType = string;

Expand Down Expand Up @@ -255,16 +346,29 @@ export interface TrackedResource extends Resource {
export interface Workflow extends TrackedResource {
acr?: Acr;
aksResourceId?: string;
authStatus?: ManifestType;
appName?: string;
readonly authStatus?: AuthorizationStatus;
branchName?: string;
builderVersion?: string;
// (undocumented)
deploymentProperties?: DeploymentProperties;
dockerBuildContext?: string;
dockerfile?: string;
dockerfileGenerationMode?: DockerfileGenerationMode;
dockerfileOutputDirectory?: string;
generationLanguage?: GenerationLanguage;
imageName?: string;
imageTag?: string;
languageVersion?: string;
// (undocumented)
lastWorkflowRun?: WorkflowRun;
namespace?: string;
manifestGenerationMode?: ManifestGenerationMode;
manifestOutputDirectory?: string;
manifestType?: GenerationManifestType;
namespacePropertiesArtifactGenerationPropertiesNamespace?: string;
namespacePropertiesGithubWorkflowProfileNamespace?: string;
oidcCredentials?: GitHubWorkflowProfileOidcCredentials;
port?: string;
readonly prStatus?: PullRequestStatus;
readonly prURL?: string;
readonly pullNumber?: number;
Expand Down Expand Up @@ -342,9 +446,13 @@ export interface WorkflowOperations {
export interface WorkflowRun {
readonly lastRunAt?: Date;
readonly succeeded?: boolean;
workflowRunStatus?: WorkflowRunStatus;
readonly workflowRunURL?: string;
}

// @public
export type WorkflowRunStatus = string;

// @public
export interface WorkflowUpdateTagsOptionalParams extends coreClient.OperationOptions {
}
Expand Down
49 changes: 47 additions & 2 deletions sdk/devhub/arm-devhub/src/developerHubServiceClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ import {
GitHubOAuthCallbackOptionalParams,
GitHubOAuthCallbackResponse,
ListGitHubOAuthOptionalParams,
ListGitHubOAuthResponse
ListGitHubOAuthResponse,
ArtifactGenerationProperties,
GeneratePreviewArtifactsOptionalParams,
GeneratePreviewArtifactsResponse
} from "./models";

export class DeveloperHubServiceClient extends coreClient.ServiceClient {
Expand Down Expand Up @@ -113,7 +116,7 @@ export class DeveloperHubServiceClient extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2022-04-01-preview";
this.apiVersion = options.apiVersion || "2022-10-11-preview";
this.operations = new OperationsImpl(this);
this.workflowOperations = new WorkflowOperationsImpl(this);
this.addCustomApiVersionPolicy(options.apiVersion);
Expand Down Expand Up @@ -196,6 +199,23 @@ export class DeveloperHubServiceClient extends coreClient.ServiceClient {
);
}

/**
* Generate preview dockerfile and manifests.
* @param location The name of Azure region.
* @param parameters Properties used for generating artifacts such as Dockerfiles and manifests.
* @param options The options parameters.
*/
generatePreviewArtifacts(
location: string,
parameters: ArtifactGenerationProperties,
options?: GeneratePreviewArtifactsOptionalParams
): Promise<GeneratePreviewArtifactsResponse> {
return this.sendOperationRequest(
{ location, parameters, options },
generatePreviewArtifactsOperationSpec
);
}

operations: Operations;
workflowOperations: WorkflowOperations;
}
Expand Down Expand Up @@ -267,3 +287,28 @@ const listGitHubOAuthOperationSpec: coreClient.OperationSpec = {
headerParameters: [Parameters.accept],
serializer
};
const generatePreviewArtifactsOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/Microsoft.DevHub/locations/{location}/generatePreviewArtifacts",
httpMethod: "POST",
responses: {
200: {
bodyMapper: {
type: { name: "Dictionary", value: { type: { name: "String" } } }
}
},
default: {
bodyMapper: Mappers.ErrorResponse
}
},
requestBody: Parameters.parameters1,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.location
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
Loading

0 comments on commit 7940ede

Please sign in to comment.