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

Regenerate all packages #485

Merged
merged 2 commits into from
Nov 14, 2018
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 0 additions & 35 deletions packages/@azure/applicationinsights-query/.npmignore

This file was deleted.

59 changes: 38 additions & 21 deletions packages/@azure/applicationinsights-query/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
# An isomorphic javascript sdk for - ApplicationInsightsDataClient
This project provides an isomorphic javascript package. Right now it supports:
- node.js version 6.x.x or higher
- browser javascript
## An isomorphic javascript sdk for - ApplicationInsightsDataClient

## How to Install
This package contains an isomorphic SDK for ApplicationInsightsDataClient.

### Currently supported environments

- Node.js version 6.x.x or higher
- Browser JavaScript

### How to Install

- nodejs
```
npm install @azure/applicationinsights-query
```
- browser
```html
<script type="text/javascript" src="@azure/applicationinsights-query/dist/applicationinsights-query.js"></script>
```

## How to use
### How to use

### nodejs - Authentication, client creation and get metrics as an example written in TypeScript.
#### nodejs - Authentication, client creation and get metrics as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

```
npm install @azure/ms-rest-nodeauth
```

##### Sample code

```ts
import * as msRest from "ms-rest-js";
import * as msRestNodeAuth from "ms-rest-nodeauth";
import * as msRest from "@azure/ms-rest-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { ApplicationInsightsDataClient, ApplicationInsightsDataModels, ApplicationInsightsDataMappers } from "@azure/applicationinsights-query";
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

Expand All @@ -44,16 +51,26 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

### browser - Authentication, client creation and get metrics as an example written in javascript.
#### browser - Authentication, client creation and get metrics as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

```
npm install @azure/ms-rest-browserauth
```

##### Sample code

See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.

- index.html
```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>@azure/applicationinsights-query sample</title>
<script src="node_modules/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
<script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
<script src="node_modules/@azure/applicationinsights-query/dist/applicationinsights-query.js"></script>
<script type="text/javascript">
const subscriptionId = "<Subscription_Id>";
Expand Down Expand Up @@ -86,10 +103,10 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
</script>
</head>
<body>
</body>
<body></body>
</html>
```

# Related projects
- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
## Related projects

- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRest from "@azure/ms-rest-js";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import * as operations from "./operations";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRest from "@azure/ms-rest-js";
import * as Models from "./models";

const packageName = "@azure/applicationinsights-query";
const packageVersion = "1.0.0-preview";
const packageVersion = "0.1.0";

export class ApplicationInsightsDataClientContext extends msRest.ServiceClient {
credentials: msRest.ServiceClientCredentials;
Expand All @@ -30,13 +30,16 @@ export class ApplicationInsightsDataClientContext extends msRest.ServiceClient {
if (!options) {
options = {};
}
if(!options.userAgent) {
const defaultUserAgent = msRest.getDefaultUserAgentValue();
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
}

super(credentials, options);

this.baseUri = options.baseUri || this.baseUri || "https://api.applicationinsights.io";
this.requestContentType = "application/json; charset=utf-8";
this.credentials = credentials;

this.addUserAgentInfo(`${packageName}/${packageVersion}`);
}
}
140 changes: 23 additions & 117 deletions packages/@azure/applicationinsights-query/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* regenerated.
*/

import { ServiceClientOptions } from "ms-rest-js";
import * as msRest from "ms-rest-js";
import { ServiceClientOptions } from "@azure/ms-rest-js";
import * as msRest from "@azure/ms-rest-js";


/**
Expand Down Expand Up @@ -1920,145 +1920,51 @@ export interface EventsGetOptionalParams extends msRest.RequestOptionsBase {

/**
* Defines values for MetricId.
* Possible values include: 'requests/count', 'requests/duration',
* 'requests/failed', 'users/count', 'users/authenticated', 'pageViews/count',
* 'pageViews/duration', 'client/processingDuration', 'client/receiveDuration',
* 'client/networkDuration', 'client/sendDuration', 'client/totalDuration',
* 'dependencies/count', 'dependencies/failed', 'dependencies/duration',
* 'exceptions/count', 'exceptions/browser', 'exceptions/server',
* Possible values include: 'requests/count', 'requests/duration', 'requests/failed',
* 'users/count', 'users/authenticated', 'pageViews/count', 'pageViews/duration',
* 'client/processingDuration', 'client/receiveDuration', 'client/networkDuration',
* 'client/sendDuration', 'client/totalDuration', 'dependencies/count', 'dependencies/failed',
* 'dependencies/duration', 'exceptions/count', 'exceptions/browser', 'exceptions/server',
* 'sessions/count', 'performanceCounters/requestExecutionTime',
* 'performanceCounters/requestsPerSecond',
* 'performanceCounters/requestsInQueue',
* 'performanceCounters/memoryAvailableBytes',
* 'performanceCounters/exceptionsPerSecond',
* 'performanceCounters/processCpuPercentage',
* 'performanceCounters/processIOBytesPerSecond',
* 'performanceCounters/processPrivateBytes',
* 'performanceCounters/processorCpuPercentage',
* 'availabilityResults/availabilityPercentage',
* 'availabilityResults/duration', 'billing/telemetryCount',
* 'customEvents/count'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: MetricId = <MetricId>"someUnknownValueThatWillStillBeValid";
* 'performanceCounters/requestsPerSecond', 'performanceCounters/requestsInQueue',
* 'performanceCounters/memoryAvailableBytes', 'performanceCounters/exceptionsPerSecond',
* 'performanceCounters/processCpuPercentage', 'performanceCounters/processIOBytesPerSecond',
* 'performanceCounters/processPrivateBytes', 'performanceCounters/processorCpuPercentage',
* 'availabilityResults/availabilityPercentage', 'availabilityResults/duration',
* 'billing/telemetryCount', 'customEvents/count'
* @readonly
* @enum {string}
*/
export enum MetricId {
Requestscount = 'requests/count',
Requestsduration = 'requests/duration',
Requestsfailed = 'requests/failed',
Userscount = 'users/count',
Usersauthenticated = 'users/authenticated',
PageViewscount = 'pageViews/count',
PageViewsduration = 'pageViews/duration',
ClientprocessingDuration = 'client/processingDuration',
ClientreceiveDuration = 'client/receiveDuration',
ClientnetworkDuration = 'client/networkDuration',
ClientsendDuration = 'client/sendDuration',
ClienttotalDuration = 'client/totalDuration',
Dependenciescount = 'dependencies/count',
Dependenciesfailed = 'dependencies/failed',
Dependenciesduration = 'dependencies/duration',
Exceptionscount = 'exceptions/count',
Exceptionsbrowser = 'exceptions/browser',
Exceptionsserver = 'exceptions/server',
Sessionscount = 'sessions/count',
PerformanceCountersrequestExecutionTime = 'performanceCounters/requestExecutionTime',
PerformanceCountersrequestsPerSecond = 'performanceCounters/requestsPerSecond',
PerformanceCountersrequestsInQueue = 'performanceCounters/requestsInQueue',
PerformanceCountersmemoryAvailableBytes = 'performanceCounters/memoryAvailableBytes',
PerformanceCountersexceptionsPerSecond = 'performanceCounters/exceptionsPerSecond',
PerformanceCountersprocessCpuPercentage = 'performanceCounters/processCpuPercentage',
PerformanceCountersprocessIOBytesPerSecond = 'performanceCounters/processIOBytesPerSecond',
PerformanceCountersprocessPrivateBytes = 'performanceCounters/processPrivateBytes',
PerformanceCountersprocessorCpuPercentage = 'performanceCounters/processorCpuPercentage',
AvailabilityResultsavailabilityPercentage = 'availabilityResults/availabilityPercentage',
AvailabilityResultsduration = 'availabilityResults/duration',
BillingtelemetryCount = 'billing/telemetryCount',
CustomEventscount = 'customEvents/count',
}
export type MetricId = 'requests/count' | 'requests/duration' | 'requests/failed' | 'users/count' | 'users/authenticated' | 'pageViews/count' | 'pageViews/duration' | 'client/processingDuration' | 'client/receiveDuration' | 'client/networkDuration' | 'client/sendDuration' | 'client/totalDuration' | 'dependencies/count' | 'dependencies/failed' | 'dependencies/duration' | 'exceptions/count' | 'exceptions/browser' | 'exceptions/server' | 'sessions/count' | 'performanceCounters/requestExecutionTime' | 'performanceCounters/requestsPerSecond' | 'performanceCounters/requestsInQueue' | 'performanceCounters/memoryAvailableBytes' | 'performanceCounters/exceptionsPerSecond' | 'performanceCounters/processCpuPercentage' | 'performanceCounters/processIOBytesPerSecond' | 'performanceCounters/processPrivateBytes' | 'performanceCounters/processorCpuPercentage' | 'availabilityResults/availabilityPercentage' | 'availabilityResults/duration' | 'billing/telemetryCount' | 'customEvents/count';

/**
* Defines values for MetricsAggregation.
* Possible values include: 'min', 'max', 'avg', 'sum', 'count', 'unique'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: MetricsAggregation =
* <MetricsAggregation>"someUnknownValueThatWillStillBeValid";
* @readonly
* @enum {string}
*/
export enum MetricsAggregation {
Min = 'min',
Max = 'max',
Avg = 'avg',
Sum = 'sum',
Count = 'count',
Unique = 'unique',
}
export type MetricsAggregation = 'min' | 'max' | 'avg' | 'sum' | 'count' | 'unique';

/**
* Defines values for MetricsSegment.
* Possible values include: 'applicationBuild', 'applicationVersion',
* 'authenticatedOrAnonymousTraffic', 'browser', 'browserVersion', 'city',
* 'cloudRoleName', 'cloudServiceName', 'continent', 'countryOrRegion',
* 'deploymentId', 'deploymentUnit', 'deviceType', 'environment',
* 'hostingLocation', 'instanceName'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: MetricsSegment =
* <MetricsSegment>"someUnknownValueThatWillStillBeValid";
* 'authenticatedOrAnonymousTraffic', 'browser', 'browserVersion', 'city', 'cloudRoleName',
* 'cloudServiceName', 'continent', 'countryOrRegion', 'deploymentId', 'deploymentUnit',
* 'deviceType', 'environment', 'hostingLocation', 'instanceName'
* @readonly
* @enum {string}
*/
export enum MetricsSegment {
ApplicationBuild = 'applicationBuild',
ApplicationVersion = 'applicationVersion',
AuthenticatedOrAnonymousTraffic = 'authenticatedOrAnonymousTraffic',
Browser = 'browser',
BrowserVersion = 'browserVersion',
City = 'city',
CloudRoleName = 'cloudRoleName',
CloudServiceName = 'cloudServiceName',
Continent = 'continent',
CountryOrRegion = 'countryOrRegion',
DeploymentId = 'deploymentId',
DeploymentUnit = 'deploymentUnit',
DeviceType = 'deviceType',
Environment = 'environment',
HostingLocation = 'hostingLocation',
InstanceName = 'instanceName',
}
export type MetricsSegment = 'applicationBuild' | 'applicationVersion' | 'authenticatedOrAnonymousTraffic' | 'browser' | 'browserVersion' | 'city' | 'cloudRoleName' | 'cloudServiceName' | 'continent' | 'countryOrRegion' | 'deploymentId' | 'deploymentUnit' | 'deviceType' | 'environment' | 'hostingLocation' | 'instanceName';

/**
* Defines values for EventType.
* Possible values include: '$all', 'traces', 'customEvents', 'pageViews',
* 'browserTimings', 'requests', 'dependencies', 'exceptions',
* 'availabilityResults', 'performanceCounters', 'customMetrics'
* There could be more values for this enum apart from the ones defined here.If
* you want to set a value that is not from the known values then you can do
* the following:
* let param: EventType = <EventType>"someUnknownValueThatWillStillBeValid";
* Possible values include: '$all', 'traces', 'customEvents', 'pageViews', 'browserTimings',
* 'requests', 'dependencies', 'exceptions', 'availabilityResults', 'performanceCounters',
* 'customMetrics'
* @readonly
* @enum {string}
*/
export enum EventType {
All = '$all',
Traces = 'traces',
CustomEvents = 'customEvents',
PageViews = 'pageViews',
BrowserTimings = 'browserTimings',
Requests = 'requests',
Dependencies = 'dependencies',
Exceptions = 'exceptions',
AvailabilityResults = 'availabilityResults',
PerformanceCounters = 'performanceCounters',
CustomMetrics = 'customMetrics',
}
export type EventType = '$all' | 'traces' | 'customEvents' | 'pageViews' | 'browserTimings' | 'requests' | 'dependencies' | 'exceptions' | 'availabilityResults' | 'performanceCounters' | 'customMetrics';

/**
* Contains response data for the get operation.
Expand Down
12 changes: 1 addition & 11 deletions packages/@azure/applicationinsights-query/lib/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRest from "@azure/ms-rest-js";


export const MetricsPostBodySchemaParameters: msRest.CompositeMapper = {
Expand Down Expand Up @@ -729,11 +729,6 @@ export const EventsResults: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "type",
clientName: "type"
},
uberParent: "EventsResultData",
className: "EventsResultData"
}
}
Expand Down Expand Up @@ -765,11 +760,6 @@ export const EventsResult: msRest.CompositeMapper = {
serializedName: "value",
type: {
name: "Composite",
polymorphicDiscriminator: {
serializedName: "type",
clientName: "type"
},
uberParent: "EventsResultData",
className: "EventsResultData"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* regenerated.
*/

import * as msRest from "ms-rest-js";
import * as msRest from "@azure/ms-rest-js";

export const aggregation: msRest.OperationQueryParameter = {
parameterPath: [
Expand Down
Loading