Родитель
34e1a67577
Коммит
cbbbcf14ed
|
@ -8880,7 +8880,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-quota.tgz:
|
||||
resolution: {integrity: sha512-RJGVETIX2qgGkOUIUbQYPGibXuG90MlgaNKhIzFC7qrkXt9JXg+xooy69EZ7OeGCOwBu3qpiqRAESPu4jL8qDw==, tarball: file:projects/arm-quota.tgz}
|
||||
resolution: {integrity: sha512-TMLTjmhxzJGCxaKcAU/0C+jUAfbWIeW9ttHy+6QTqAckGdVS9VuKuFih7CH0CwWl/3+Z6wGGaHwsoKF77DqJ/Q==, tarball: file:projects/arm-quota.tgz}
|
||||
name: '@rush-temp/arm-quota'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -8892,6 +8892,7 @@ packages:
|
|||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1
|
||||
tslib: 2.3.1
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
## Release History
|
||||
# Release History
|
||||
|
||||
## 1.0.0-beta.3 (2021-12-22)
|
||||
|
||||
**Features**
|
||||
|
||||
### 1.0.0-beta.3 (Unreleased)
|
||||
- Class AzureQuotaExtensionAPI has a new parameter $host
|
||||
- Class AzureQuotaExtensionAPI has a new parameter apiVersion
|
||||
|
||||
#### Features Added
|
||||
**Breaking Changes**
|
||||
|
||||
#### Breaking Changes
|
||||
|
||||
#### Bugs Fixed
|
||||
|
||||
#### Other Changes
|
||||
|
||||
### 1.0.0-beta.2 (2021-11-01)
|
||||
- Deleted Class AzureQuotaExtensionAPIContext
|
||||
|
||||
## 1.0.0-beta.2 (2021-11-01)
|
||||
|
||||
**Features**
|
||||
|
||||
|
@ -27,6 +28,6 @@
|
|||
- Removed operation group Operation
|
||||
- Class AzureQuotaExtensionAPI no longer has parameter operation
|
||||
|
||||
### 1.0.0-beta.1 (2021-09-28)
|
||||
## 1.0.0-beta.1 (2021-09-28)
|
||||
|
||||
- Initial Release
|
||||
|
|
|
@ -6,7 +6,7 @@ Microsoft Azure Quota Resource Provider
|
|||
|
||||
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/quota/arm-quota) |
|
||||
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-quota) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-quota) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-quota?view=azure-node-preview) |
|
||||
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
||||
|
||||
## Getting started
|
||||
|
@ -53,6 +53,10 @@ const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|||
const client = new AzureQuotaExtensionAPI(new DefaultAzureCredential(), subscriptionId);
|
||||
```
|
||||
|
||||
|
||||
### JavaScript Bundle
|
||||
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
|
||||
|
||||
## Key concepts
|
||||
|
||||
### AzureQuotaExtensionAPI
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"commit": "4a2c1e8f277dd11a0da89d56eab8ff1a922d3a69",
|
||||
"commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf",
|
||||
"readme": "specification/quota/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/quota/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.13",
|
||||
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/quota/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211217.1",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-beta.13"
|
||||
"use": "@autorest/typescript@6.0.0-alpha.16.20211217.1"
|
||||
}
|
|
@ -4,25 +4,17 @@
|
|||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for AzureQuotaExtensionAPI.",
|
||||
"version": "1.0.0-beta.3",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"engines": { "node": ">=12.0.0" },
|
||||
"dependencies": {
|
||||
"@azure/core-lro": "^2.2.0",
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-paging": "^1.1.1",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.0.0",
|
||||
"@azure/core-auth": "^1.3.0",
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"azure",
|
||||
"typescript",
|
||||
"browser",
|
||||
"isomorphic"
|
||||
],
|
||||
"keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist-esm/src/index.js",
|
||||
|
@ -38,6 +30,7 @@
|
|||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^3.0.0",
|
||||
"@azure/identity": "^2.0.1",
|
||||
"@azure-tools/test-recorder": "^1.0.0",
|
||||
"mocha": "^7.1.1",
|
||||
|
@ -48,9 +41,7 @@
|
|||
"type": "git",
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
||||
},
|
||||
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
|
||||
"files": [
|
||||
"dist/**/*.js",
|
||||
"dist/**/*.js.map",
|
||||
|
@ -70,14 +61,14 @@
|
|||
"types/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
|
||||
"build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
|
||||
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
|
||||
"prepack": "npm run build",
|
||||
"pack": "npm pack 2>&1",
|
||||
"extract-api": "api-extractor run --local",
|
||||
"lint": "echo skipped",
|
||||
"audit": "echo skipped",
|
||||
"clean": "echo skipped",
|
||||
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
||||
"build:node": "echo skipped",
|
||||
"build:browser": "echo skipped",
|
||||
"build:test": "echo skipped",
|
||||
|
@ -86,14 +77,13 @@
|
|||
"execute:samples": "echo skipped",
|
||||
"format": "echo skipped",
|
||||
"test": "npm run integration-test",
|
||||
"prebuild": "echo skipped",
|
||||
"test:node": "echo skipped",
|
||||
"test:browser": "echo skipped",
|
||||
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
||||
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
|
||||
"unit-test:browser": "echo skipped",
|
||||
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
||||
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts",
|
||||
"integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
|
||||
"integration-test:browser": "echo skipped",
|
||||
"docs": "echo skipped"
|
||||
},
|
||||
|
|
|
@ -11,9 +11,13 @@ import { PollerLike } from '@azure/core-lro';
|
|||
import { PollOperationState } from '@azure/core-lro';
|
||||
|
||||
// @public (undocumented)
|
||||
export class AzureQuotaExtensionAPI extends AzureQuotaExtensionAPIContext {
|
||||
export class AzureQuotaExtensionAPI extends coreClient.ServiceClient {
|
||||
// (undocumented)
|
||||
$host: string;
|
||||
constructor(credentials: coreAuth.TokenCredential, options?: AzureQuotaExtensionAPIOptionalParams);
|
||||
// (undocumented)
|
||||
apiVersion: string;
|
||||
// (undocumented)
|
||||
quota: Quota;
|
||||
// (undocumented)
|
||||
quotaOperation: QuotaOperation;
|
||||
|
@ -23,15 +27,6 @@ export class AzureQuotaExtensionAPI extends AzureQuotaExtensionAPIContext {
|
|||
usages: Usages;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class AzureQuotaExtensionAPIContext extends coreClient.ServiceClient {
|
||||
// (undocumented)
|
||||
$host: string;
|
||||
constructor(credentials: coreAuth.TokenCredential, options?: AzureQuotaExtensionAPIOptionalParams);
|
||||
// (undocumented)
|
||||
apiVersion: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface AzureQuotaExtensionAPIOptionalParams extends coreClient.ServiceClientOptions {
|
||||
$host?: string;
|
||||
|
@ -463,7 +458,6 @@ export interface UsagesProperties {
|
|||
// @public
|
||||
export type UsagesTypes = string;
|
||||
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import {
|
||||
UsagesImpl,
|
||||
|
@ -19,10 +20,12 @@ import {
|
|||
QuotaRequestStatus,
|
||||
QuotaOperation
|
||||
} from "./operationsInterfaces";
|
||||
import { AzureQuotaExtensionAPIContext } from "./azureQuotaExtensionAPIContext";
|
||||
import { AzureQuotaExtensionAPIOptionalParams } from "./models";
|
||||
|
||||
export class AzureQuotaExtensionAPI extends AzureQuotaExtensionAPIContext {
|
||||
export class AzureQuotaExtensionAPI extends coreClient.ServiceClient {
|
||||
$host: string;
|
||||
apiVersion: string;
|
||||
|
||||
/**
|
||||
* Initializes a new instance of the AzureQuotaExtensionAPI class.
|
||||
* @param credentials Subscription credentials which uniquely identify client subscription.
|
||||
|
@ -32,7 +35,41 @@ export class AzureQuotaExtensionAPI extends AzureQuotaExtensionAPIContext {
|
|||
credentials: coreAuth.TokenCredential,
|
||||
options?: AzureQuotaExtensionAPIOptionalParams
|
||||
) {
|
||||
super(credentials, options);
|
||||
if (credentials === undefined) {
|
||||
throw new Error("'credentials' cannot be null");
|
||||
}
|
||||
|
||||
// Initializing default values for options
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
const defaults: AzureQuotaExtensionAPIOptionalParams = {
|
||||
requestContentType: "application/json; charset=utf-8",
|
||||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-quota/1.0.0-beta.1`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
: `${packageDetails}`;
|
||||
|
||||
if (!options.credentialScopes) {
|
||||
options.credentialScopes = ["https://management.azure.com/.default"];
|
||||
}
|
||||
const optionsWithDefaults = {
|
||||
...defaults,
|
||||
...options,
|
||||
userAgentOptions: {
|
||||
userAgentPrefix
|
||||
},
|
||||
baseUri: options.endpoint || "https://management.azure.com"
|
||||
};
|
||||
super(optionsWithDefaults);
|
||||
|
||||
// Assigning values to Constant parameters
|
||||
this.$host = options.$host || "https://management.azure.com";
|
||||
this.apiVersion = options.apiVersion || "2021-03-15-preview";
|
||||
this.usages = new UsagesImpl(this);
|
||||
this.quota = new QuotaImpl(this);
|
||||
this.quotaRequestStatus = new QuotaRequestStatusImpl(this);
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
import * as coreClient from "@azure/core-client";
|
||||
import * as coreAuth from "@azure/core-auth";
|
||||
import { AzureQuotaExtensionAPIOptionalParams } from "./models";
|
||||
|
||||
export class AzureQuotaExtensionAPIContext extends coreClient.ServiceClient {
|
||||
$host: string;
|
||||
apiVersion: string;
|
||||
|
||||
/**
|
||||
* Initializes a new instance of the AzureQuotaExtensionAPIContext class.
|
||||
* @param credentials Subscription credentials which uniquely identify client subscription.
|
||||
* @param options The parameter options
|
||||
*/
|
||||
constructor(
|
||||
credentials: coreAuth.TokenCredential,
|
||||
options?: AzureQuotaExtensionAPIOptionalParams
|
||||
) {
|
||||
if (credentials === undefined) {
|
||||
throw new Error("'credentials' cannot be null");
|
||||
}
|
||||
|
||||
// Initializing default values for options
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
const defaults: AzureQuotaExtensionAPIOptionalParams = {
|
||||
requestContentType: "application/json; charset=utf-8",
|
||||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-quota/1.0.0-beta.2`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
: `${packageDetails}`;
|
||||
|
||||
if (!options.credentialScopes) {
|
||||
options.credentialScopes = ["https://management.azure.com/.default"];
|
||||
}
|
||||
const optionsWithDefaults = {
|
||||
...defaults,
|
||||
...options,
|
||||
userAgentOptions: {
|
||||
userAgentPrefix
|
||||
},
|
||||
baseUri: options.endpoint || "https://management.azure.com"
|
||||
};
|
||||
super(optionsWithDefaults);
|
||||
|
||||
// Assigning values to Constant parameters
|
||||
this.$host = options.$host || "https://management.azure.com";
|
||||
this.apiVersion = options.apiVersion || "2021-03-15-preview";
|
||||
}
|
||||
}
|
|
@ -9,5 +9,4 @@
|
|||
/// <reference lib="esnext.asynciterable" />
|
||||
export * from "./models";
|
||||
export { AzureQuotaExtensionAPI } from "./azureQuotaExtensionAPI";
|
||||
export { AzureQuotaExtensionAPIContext } from "./azureQuotaExtensionAPIContext";
|
||||
export * from "./operationsInterfaces";
|
||||
|
|
|
@ -11,7 +11,7 @@ import { Quota } from "../operationsInterfaces";
|
|||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { AzureQuotaExtensionAPIContext } from "../azureQuotaExtensionAPIContext";
|
||||
import { AzureQuotaExtensionAPI } from "../azureQuotaExtensionAPI";
|
||||
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
||||
import { LroImpl } from "../lroImpl";
|
||||
import {
|
||||
|
@ -31,13 +31,13 @@ import {
|
|||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing Quota operations. */
|
||||
export class QuotaImpl implements Quota {
|
||||
private readonly client: AzureQuotaExtensionAPIContext;
|
||||
private readonly client: AzureQuotaExtensionAPI;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class Quota class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: AzureQuotaExtensionAPIContext) {
|
||||
constructor(client: AzureQuotaExtensionAPI) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { QuotaOperation } from "../operationsInterfaces";
|
|||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { AzureQuotaExtensionAPIContext } from "../azureQuotaExtensionAPIContext";
|
||||
import { AzureQuotaExtensionAPI } from "../azureQuotaExtensionAPI";
|
||||
import {
|
||||
OperationResponse,
|
||||
QuotaOperationListNextOptionalParams,
|
||||
|
@ -23,13 +23,13 @@ import {
|
|||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing QuotaOperation operations. */
|
||||
export class QuotaOperationImpl implements QuotaOperation {
|
||||
private readonly client: AzureQuotaExtensionAPIContext;
|
||||
private readonly client: AzureQuotaExtensionAPI;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class QuotaOperation class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: AzureQuotaExtensionAPIContext) {
|
||||
constructor(client: AzureQuotaExtensionAPI) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { QuotaRequestStatus } from "../operationsInterfaces";
|
|||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { AzureQuotaExtensionAPIContext } from "../azureQuotaExtensionAPIContext";
|
||||
import { AzureQuotaExtensionAPI } from "../azureQuotaExtensionAPI";
|
||||
import {
|
||||
QuotaRequestDetails,
|
||||
QuotaRequestStatusListNextOptionalParams,
|
||||
|
@ -25,13 +25,13 @@ import {
|
|||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing QuotaRequestStatus operations. */
|
||||
export class QuotaRequestStatusImpl implements QuotaRequestStatus {
|
||||
private readonly client: AzureQuotaExtensionAPIContext;
|
||||
private readonly client: AzureQuotaExtensionAPI;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class QuotaRequestStatus class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: AzureQuotaExtensionAPIContext) {
|
||||
constructor(client: AzureQuotaExtensionAPI) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import { Usages } from "../operationsInterfaces";
|
|||
import * as coreClient from "@azure/core-client";
|
||||
import * as Mappers from "../models/mappers";
|
||||
import * as Parameters from "../models/parameters";
|
||||
import { AzureQuotaExtensionAPIContext } from "../azureQuotaExtensionAPIContext";
|
||||
import { AzureQuotaExtensionAPI } from "../azureQuotaExtensionAPI";
|
||||
import {
|
||||
CurrentUsagesBase,
|
||||
UsagesListNextOptionalParams,
|
||||
|
@ -25,13 +25,13 @@ import {
|
|||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing Usages operations. */
|
||||
export class UsagesImpl implements Usages {
|
||||
private readonly client: AzureQuotaExtensionAPIContext;
|
||||
private readonly client: AzureQuotaExtensionAPI;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class Usages class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: AzureQuotaExtensionAPIContext) {
|
||||
constructor(client: AzureQuotaExtensionAPI) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче