applicationinsights
Version:
Microsoft Application Insights module for Node.js
1 lines • 3.97 kB
Source Map (JSON)
{"version":3,"file":"applicationInsightsClient.js","sourceRoot":"","sources":["../../../../src/declarations/generated/applicationInsightsClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,iDAAiD;AACjD,kDAAkD;AAClD,4CAA4C;AAC5C,yFAAsF;AAQtF,MAAa,yBAA0B,SAAQ,mEAAgC;IAC3E;;;OAGG;IACH,YAAY,OAAiD;QACzD,KAAK,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAqB,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,oBAAoB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,kBAAkB,CAAC,CAAC;IAC5E,CAAC;CACJ;AAjBD,8DAiBC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,kBAAkB,GAA6B;IACjD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACP,GAAG,EAAE;YACD,UAAU,EAAE,OAAO,CAAC,aAAa;SACpC;QACD,GAAG,EAAE;YACD,UAAU,EAAE,OAAO,CAAC,aAAa;SACpC;QACD,GAAG,EAAE;YACD,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,OAAO,EAAE,IAAI;SAChB;QACD,GAAG,EAAE;YACD,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,OAAO,EAAE,IAAI;SAChB;QACD,GAAG,EAAE;YACD,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,OAAO,EAAE,IAAI;SAChB;QACD,GAAG,EAAE;YACD,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,OAAO,EAAE,IAAI;SAChB;QACD,GAAG,EAAE;YACD,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,OAAO,EAAE,IAAI;SAChB;KACJ;IACD,WAAW,EAAE,UAAU,CAAC,IAAI;IAC5B,aAAa,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;IAChC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACb,CAAC","sourcesContent":["/*\r\n * Copyright (c) Microsoft Corporation.\r\n * Licensed under the MIT License.\r\n *\r\n * Code generated by Microsoft (R) AutoRest Code Generator.\r\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\r\n */\r\n\r\nimport * as coreClient from \"@azure/core-client\";\r\nimport * as Parameters from \"./models/parameters\";\r\nimport * as Mappers from \"./models/mappers\";\r\nimport { ApplicationInsightsClientContext } from \"./applicationInsightsClientContext\";\r\nimport {\r\n ApplicationInsightsClientOptionalParams,\r\n TelemetryItem,\r\n TrackOptionalParams,\r\n TrackOperationResponse,\r\n} from \"./models\";\r\n\r\nexport class ApplicationInsightsClient extends ApplicationInsightsClientContext {\r\n /**\r\n * Initializes a new instance of the ApplicationInsightsClient class.\r\n * @param options The parameter options\r\n */\r\n constructor(options?: ApplicationInsightsClientOptionalParams) {\r\n super(options);\r\n }\r\n\r\n /**\r\n * This operation sends a sequence of telemetry events that will be monitored by Azure Monitor.\r\n * @param body The list of telemetry events to track.\r\n * @param options The options parameters.\r\n */\r\n track(body: TelemetryItem[], options?: TrackOptionalParams): Promise<TrackOperationResponse> {\r\n return this.sendOperationRequest({ body, options }, trackOperationSpec);\r\n }\r\n}\r\n// Operation Specifications\r\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\r\n\r\nconst trackOperationSpec: coreClient.OperationSpec = {\r\n path: \"/track\",\r\n httpMethod: \"POST\",\r\n responses: {\r\n 200: {\r\n bodyMapper: Mappers.TrackResponse,\r\n },\r\n 206: {\r\n bodyMapper: Mappers.TrackResponse,\r\n },\r\n 400: {\r\n bodyMapper: Mappers.TrackResponse,\r\n isError: true,\r\n },\r\n 402: {\r\n bodyMapper: Mappers.TrackResponse,\r\n isError: true,\r\n },\r\n 429: {\r\n bodyMapper: Mappers.TrackResponse,\r\n isError: true,\r\n },\r\n 500: {\r\n bodyMapper: Mappers.TrackResponse,\r\n isError: true,\r\n },\r\n 503: {\r\n bodyMapper: Mappers.TrackResponse,\r\n isError: true,\r\n },\r\n },\r\n requestBody: Parameters.body,\r\n urlParameters: [Parameters.host],\r\n headerParameters: [Parameters.contentType, Parameters.accept],\r\n mediaType: \"json\",\r\n serializer,\r\n};\r\n"]}