UNPKG

applicationinsights

Version:

Microsoft Application Insights module for Node.js

72 lines 2.44 kB
"use strict"; /* * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ApplicationInsightsClient = void 0; const coreClient = require("@azure/core-client"); const Parameters = require("./models/parameters"); const Mappers = require("./models/mappers"); const applicationInsightsClientContext_1 = require("./applicationInsightsClientContext"); class ApplicationInsightsClient extends applicationInsightsClientContext_1.ApplicationInsightsClientContext { /** * Initializes a new instance of the ApplicationInsightsClient class. * @param options The parameter options */ constructor(options) { super(options); } /** * This operation sends a sequence of telemetry events that will be monitored by Azure Monitor. * @param body The list of telemetry events to track. * @param options The options parameters. */ track(body, options) { return this.sendOperationRequest({ body, options }, trackOperationSpec); } } exports.ApplicationInsightsClient = ApplicationInsightsClient; // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const trackOperationSpec = { path: "/track", httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.TrackResponse, }, 206: { bodyMapper: Mappers.TrackResponse, }, 400: { bodyMapper: Mappers.TrackResponse, isError: true, }, 402: { bodyMapper: Mappers.TrackResponse, isError: true, }, 429: { bodyMapper: Mappers.TrackResponse, isError: true, }, 500: { bodyMapper: Mappers.TrackResponse, isError: true, }, 503: { bodyMapper: Mappers.TrackResponse, isError: true, }, }, requestBody: Parameters.body, urlParameters: [Parameters.host], headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; //# sourceMappingURL=applicationInsightsClient.js.map