diff --git a/packages/@azure/eventgrid/LICENSE.txt b/packages/@azure/eventgrid/LICENSE.txt index a70e8cf66038..8f3d856145c5 100644 --- a/packages/@azure/eventgrid/LICENSE.txt +++ b/packages/@azure/eventgrid/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +Copyright (c) 2019 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/eventgrid/README.md b/packages/@azure/eventgrid/README.md index dd2af23da53e..767fffb2dba2 100644 --- a/packages/@azure/eventgrid/README.md +++ b/packages/@azure/eventgrid/README.md @@ -1,119 +1,116 @@ -## Azure EventGridClient SDK for JavaScript - -This package contains an isomorphic SDK for EventGridClient. - -### Currently supported environments - -- Node.js version 6.x.x or higher -- Browser JavaScript - -### How to Install - -``` -npm install @azure/eventgrid -``` - -### How to use - -#### nodejs - Authentication, client creation and publishEvents as an example written in TypeScript. - -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` - -##### Sample code - -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { EventGridClient, EventGridModels, EventGridMappers } from "@azure/eventgrid"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new EventGridClient(creds, subscriptionId); - const topicHostname = "testtopicHostname"; - const events = [{ - id: "testid", - topic: "testtopic", - subject: "testsubject", - data: {}, - eventType: "testeventType", - eventTime: new Date().toISOString(), - dataVersion: "testdataVersion" - }]; - client.publishEvents(topicHostname, events).then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.error(err); -}); -``` - -#### browser - Authentication, client creation and publishEvents 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 - - - - @azure/eventgrid sample - - - - - - - - -``` - -## Related projects - -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fpackages%2F%40azure%2Feventgrid%2FREADME.png) +## Azure EventGridClient SDK for JavaScript + +This package contains an isomorphic SDK for EventGridClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/eventgrid +``` + +### How to use + +#### nodejs - Authentication, client creation and publishEvents as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +```bash +npm install @azure/ms-rest-nodeauth +``` + +##### Sample code + +```typescript +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { EventGridClient, EventGridModels, EventGridMappers } from "@azure/eventgrid"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new EventGridClient(creds, subscriptionId); + const topicHostname = "testtopicHostname"; + const events = [{ + id: "testid", + topic: "testtopic", + subject: "testsubject", + data: {}, + eventType: "testeventType", + eventTime: new Date().toISOString(), + dataVersion: "testdataVersion" + }]; + client.publishEvents(topicHostname, events).then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and publishEvents as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +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 + + + + @azure/eventgrid sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/eventgrid/lib/eventGridClientContext.ts b/packages/@azure/eventgrid/lib/eventGridClientContext.ts index 2847ccadf7e7..accf9a8c5e70 100644 --- a/packages/@azure/eventgrid/lib/eventGridClientContext.ts +++ b/packages/@azure/eventgrid/lib/eventGridClientContext.ts @@ -12,7 +12,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/eventgrid"; -const packageVersion = "0.1.0"; +const packageVersion = "1.5.0"; export class EventGridClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/packages/@azure/eventgrid/lib/models/index.ts b/packages/@azure/eventgrid/lib/models/index.ts index 8a5b88bd2814..194e5ec0143d 100644 --- a/packages/@azure/eventgrid/lib/models/index.ts +++ b/packages/@azure/eventgrid/lib/models/index.ts @@ -898,6 +898,41 @@ export interface IotHubDeviceConnectedEventData extends DeviceConnectionStateEve export interface IotHubDeviceDisconnectedEventData extends DeviceConnectionStateEventProperties { } +/** + * @interface + * An interface representing DeviceTelemetryEventProperties. + * Schema of the Data property of an EventGridEvent for a device telemetry + * event (DeviceTelemetry). + * + */ +export interface DeviceTelemetryEventProperties { + /** + * @member {any} [body] The content of the message from the device. + */ + body?: any; + /** + * @member {{ [propertyName: string]: string }} [properties] Application + * properties are user-defined strings that can be added to the message. + * These fields are optional. + */ + properties?: { [propertyName: string]: string }; + /** + * @member {{ [propertyName: string]: string }} [systemProperties] System + * properties help identify contents and source of the messages. + */ + systemProperties?: { [propertyName: string]: string }; +} + +/** + * @interface + * An interface representing IotHubDeviceTelemetryEventData. + * Event data for Microsoft.Devices.DeviceTelemetry event. + * + * @extends DeviceTelemetryEventProperties + */ +export interface IotHubDeviceTelemetryEventData extends DeviceTelemetryEventProperties { +} + /** * @interface * An interface representing DeviceTwinMetadata. @@ -1117,6 +1152,54 @@ export interface ContainerRegistryImagePushedEventData extends ContainerRegistry export interface ContainerRegistryImageDeletedEventData extends ContainerRegistryEventData { } +/** + * @interface + * An interface representing ContainerRegistryArtifactEventData. + * The content of the event request message. + * + */ +export interface ContainerRegistryArtifactEventData { + /** + * @member {string} [id] The event ID. + */ + id?: string; + /** + * @member {Date} [timestamp] The time at which the event occurred. + */ + timestamp?: Date; + /** + * @member {string} [action] The action that encompasses the provided event. + */ + action?: string; + /** + * @member {ContainerRegistryArtifactEventTarget} [target] The target of the + * event. + */ + target?: ContainerRegistryArtifactEventTarget; +} + +/** + * @interface + * An interface representing ContainerRegistryChartPushedEventData. + * Schema of the Data property of an EventGridEvent for a + * Microsoft.ContainerRegistry.ChartPushed event. + * + * @extends ContainerRegistryArtifactEventData + */ +export interface ContainerRegistryChartPushedEventData extends ContainerRegistryArtifactEventData { +} + +/** + * @interface + * An interface representing ContainerRegistryChartDeletedEventData. + * Schema of the Data property of an EventGridEvent for a + * Microsoft.ContainerRegistry.ChartDeleted event. + * + * @extends ContainerRegistryArtifactEventData + */ +export interface ContainerRegistryChartDeletedEventData extends ContainerRegistryArtifactEventData { +} + /** * @interface * An interface representing ContainerRegistryEventTarget. @@ -1225,6 +1308,43 @@ export interface ContainerRegistryEventSource { instanceID?: string; } +/** + * @interface + * An interface representing ContainerRegistryArtifactEventTarget. + * The target of the event. + * + */ +export interface ContainerRegistryArtifactEventTarget { + /** + * @member {string} [mediaType] The MIME type of the artifact. + */ + mediaType?: string; + /** + * @member {number} [size] The size in bytes of the artifact. + */ + size?: number; + /** + * @member {string} [digest] The digest of the artifact. + */ + digest?: string; + /** + * @member {string} [repository] The repository name of the artifact. + */ + repository?: string; + /** + * @member {string} [tag] The tag of the artifact. + */ + tag?: string; + /** + * @member {string} [name] The name of the artifact. + */ + name?: string; + /** + * @member {string} [version] The version of the artifact. + */ + version?: string; +} + /** * @interface * An interface representing ServiceBusActiveMessagesAvailableWithNoListenersEventData. @@ -1479,6 +1599,28 @@ export interface MediaJobOutputAsset { assetName?: string; } +/** + * @interface + * An interface representing MediaJobOutputProgressEventData. + * Job Output Progress Event Data. + * + */ +export interface MediaJobOutputProgressEventData { + /** + * @member {string} [label] Gets the Job output label. + */ + label?: string; + /** + * @member {number} [progress] Gets the Job output progress. + */ + progress?: number; + /** + * @member {{ [propertyName: string]: string }} [jobCorrelationData] Gets the + * Job correlation data. + */ + jobCorrelationData?: { [propertyName: string]: string }; +} + /** * @interface * An interface representing MediaJobOutputStateChangeEventData. @@ -1916,7 +2058,7 @@ export interface MediaLiveEventIncomingVideoStreamsOutOfSyncEventData { /** * @interface * An interface representing MediaLiveEventIncomingDataChunkDroppedEventData. - * Ingest fragment dropped event event data. + * Ingest fragment dropped event data. * */ export interface MediaLiveEventIncomingDataChunkDroppedEventData { @@ -1963,7 +2105,7 @@ export interface MediaLiveEventIncomingDataChunkDroppedEventData { /** * @interface * An interface representing MediaLiveEventIngestHeartbeatEventData. - * Ingest fragment dropped event event data. + * Ingest fragment dropped event data. * */ export interface MediaLiveEventIngestHeartbeatEventData { @@ -2099,6 +2241,167 @@ export interface MediaLiveEventTrackDiscontinuityDetectedEventData { readonly discontinuityGap?: string; } +/** + * @interface + * An interface representing MapsGeofenceEventProperties. + * Schema of the Data property of an EventGridEvent for a Geofence event + * (GeofenceEntered, GeofenceExited, GeofenceResult). + * + */ +export interface MapsGeofenceEventProperties { + /** + * @member {string[]} [expiredGeofenceGeometryId] Lists of the geometry ID of + * the geofence which is expired relative to the user time in the request. + */ + expiredGeofenceGeometryId?: string[]; + /** + * @member {MapsGeofenceGeometry[]} [geometries] Lists the fence geometries + * that either fully contain the coordinate position or have an overlap with + * the searchBuffer around the fence. + */ + geometries?: MapsGeofenceGeometry[]; + /** + * @member {string[]} [invalidPeriodGeofenceGeometryId] Lists of the geometry + * ID of the geofence which is in invalid period relative to the user time in + * the request. + */ + invalidPeriodGeofenceGeometryId?: string[]; + /** + * @member {boolean} [isEventPublished] True if at least one event is + * published to the Azure Maps event subscriber, false if no event is + * published to the Azure Maps event subscriber. + */ + isEventPublished?: boolean; +} + +/** + * @interface + * An interface representing MapsGeofenceEnteredEventData. + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceEntered event. + * + * @extends MapsGeofenceEventProperties + */ +export interface MapsGeofenceEnteredEventData extends MapsGeofenceEventProperties { +} + +/** + * @interface + * An interface representing MapsGeofenceExitedEventData. + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceExited event. + * + * @extends MapsGeofenceEventProperties + */ +export interface MapsGeofenceExitedEventData extends MapsGeofenceEventProperties { +} + +/** + * @interface + * An interface representing MapsGeofenceResultEventData. + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Maps.GeofenceResult event. + * + * @extends MapsGeofenceEventProperties + */ +export interface MapsGeofenceResultEventData extends MapsGeofenceEventProperties { +} + +/** + * @interface + * An interface representing MapsGeofenceGeometry. + * The geofence geometry. + * + */ +export interface MapsGeofenceGeometry { + /** + * @member {string} [deviceId] ID of the device. + */ + deviceId?: string; + /** + * @member {number} [distance] Distance from the coordinate to the closest + * border of the geofence. Positive means the coordinate is outside of the + * geofence. If the coordinate is outside of the geofence, but more than the + * value of searchBuffer away from the closest geofence border, then the + * value is 999. Negative means the coordinate is inside of the geofence. If + * the coordinate is inside the polygon, but more than the value of + * searchBuffer away from the closest geofencing border,then the value is + * -999. A value of 999 means that there is great confidence the coordinate + * is well outside the geofence. A value of -999 means that there is great + * confidence the coordinate is well within the geofence. + */ + distance?: number; + /** + * @member {string} [geometryId] The unique ID for the geofence geometry. + */ + geometryId?: string; + /** + * @member {number} [nearestLat] Latitude of the nearest point of the + * geometry. + */ + nearestLat?: number; + /** + * @member {number} [nearestLon] Longitude of the nearest point of the + * geometry. + */ + nearestLon?: number; + /** + * @member {string} [udId] The unique id returned from user upload service + * when uploading a geofence. Will not be included in geofencing post API. + */ + udId?: string; +} + +/** + * @interface + * An interface representing AppConfigurationKeyValueModifiedEventData. + * Schema of the Data property of an EventGridEvent for an + * Microsoft.AppConfiguration.KeyValueModified event. + * + */ +export interface AppConfigurationKeyValueModifiedEventData { + /** + * @member {string} [key] The key used to identify the key-value that was + * modified. + */ + key?: string; + /** + * @member {string} [label] The label, if any, used to identify the key-value + * that was modified. + */ + label?: string; + /** + * @member {string} [etag] The etag representing the new state of the + * key-value. + */ + etag?: string; +} + +/** + * @interface + * An interface representing AppConfigurationKeyValueDeletedEventData. + * Schema of the Data property of an EventGridEvent for an + * Microsoft.AppConfiguration.KeyValueDeleted event. + * + */ +export interface AppConfigurationKeyValueDeletedEventData { + /** + * @member {string} [key] The key used to identify the key-value that was + * deleted. + */ + key?: string; + /** + * @member {string} [label] The label, if any, used to identify the key-value + * that was deleted. + */ + label?: string; + /** + * @member {string} [etag] The etag representing the key-value that was + * deleted. + */ + etag?: string; +} + /** * Defines values for MediaJobState. diff --git a/packages/@azure/eventgrid/lib/models/mappers.ts b/packages/@azure/eventgrid/lib/models/mappers.ts index 1c19fb168b5f..ca27b3b4e6e7 100644 --- a/packages/@azure/eventgrid/lib/models/mappers.ts +++ b/packages/@azure/eventgrid/lib/models/mappers.ts @@ -1120,6 +1120,55 @@ export const IotHubDeviceDisconnectedEventData: msRest.CompositeMapper = { } }; +export const DeviceTelemetryEventProperties: msRest.CompositeMapper = { + serializedName: "DeviceTelemetryEventProperties", + type: { + name: "Composite", + className: "DeviceTelemetryEventProperties", + modelProperties: { + body: { + serializedName: "body", + type: { + name: "Object" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + systemProperties: { + serializedName: "systemProperties", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const IotHubDeviceTelemetryEventData: msRest.CompositeMapper = { + serializedName: "IotHubDeviceTelemetryEventData", + type: { + name: "Composite", + className: "IotHubDeviceTelemetryEventData", + modelProperties: { + ...DeviceTelemetryEventProperties.type.modelProperties + } + } +}; + export const DeviceTwinMetadata: msRest.CompositeMapper = { serializedName: "DeviceTwinMetadata", type: { @@ -1377,6 +1426,63 @@ export const ContainerRegistryImageDeletedEventData: msRest.CompositeMapper = { } }; +export const ContainerRegistryArtifactEventData: msRest.CompositeMapper = { + serializedName: "ContainerRegistryArtifactEventData", + type: { + name: "Composite", + className: "ContainerRegistryArtifactEventData", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "Composite", + className: "ContainerRegistryArtifactEventTarget" + } + } + } + } +}; + +export const ContainerRegistryChartPushedEventData: msRest.CompositeMapper = { + serializedName: "ContainerRegistryChartPushedEventData", + type: { + name: "Composite", + className: "ContainerRegistryChartPushedEventData", + modelProperties: { + ...ContainerRegistryArtifactEventData.type.modelProperties + } + } +}; + +export const ContainerRegistryChartDeletedEventData: msRest.CompositeMapper = { + serializedName: "ContainerRegistryChartDeletedEventData", + type: { + name: "Composite", + className: "ContainerRegistryChartDeletedEventData", + modelProperties: { + ...ContainerRegistryArtifactEventData.type.modelProperties + } + } +}; + export const ContainerRegistryEventTarget: msRest.CompositeMapper = { serializedName: "ContainerRegistryEventTarget", type: { @@ -1507,6 +1613,58 @@ export const ContainerRegistryEventSource: msRest.CompositeMapper = { } }; +export const ContainerRegistryArtifactEventTarget: msRest.CompositeMapper = { + serializedName: "ContainerRegistryArtifactEventTarget", + type: { + name: "Composite", + className: "ContainerRegistryArtifactEventTarget", + modelProperties: { + mediaType: { + serializedName: "mediaType", + type: { + name: "String" + } + }, + size: { + serializedName: "size", + type: { + name: "Number" + } + }, + digest: { + serializedName: "digest", + type: { + name: "String" + } + }, + repository: { + serializedName: "repository", + type: { + name: "String" + } + }, + tag: { + serializedName: "tag", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "String" + } + } + } + } +}; + export const ServiceBusActiveMessagesAvailableWithNoListenersEventData: msRest.CompositeMapper = { serializedName: "ServiceBusActiveMessagesAvailableWithNoListenersEventData", type: { @@ -1831,6 +1989,39 @@ export const MediaJobOutputAsset: msRest.CompositeMapper = { } }; +export const MediaJobOutputProgressEventData: msRest.CompositeMapper = { + serializedName: "#Microsoft.Media.JobOutputProgress", + type: { + name: "Composite", + className: "MediaJobOutputProgressEventData", + modelProperties: { + label: { + serializedName: "label", + type: { + name: "String" + } + }, + progress: { + serializedName: "progress", + type: { + name: "Number" + } + }, + jobCorrelationData: { + serializedName: "jobCorrelationData", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const MediaJobOutputStateChangeEventData: msRest.CompositeMapper = { serializedName: "MediaJobOutputStateChangeEventData", type: { @@ -2547,6 +2738,191 @@ export const MediaLiveEventTrackDiscontinuityDetectedEventData: msRest.Composite } }; +export const MapsGeofenceEventProperties: msRest.CompositeMapper = { + serializedName: "MapsGeofenceEventProperties", + type: { + name: "Composite", + className: "MapsGeofenceEventProperties", + modelProperties: { + expiredGeofenceGeometryId: { + serializedName: "expiredGeofenceGeometryId", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + geometries: { + serializedName: "geometries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MapsGeofenceGeometry" + } + } + } + }, + invalidPeriodGeofenceGeometryId: { + serializedName: "invalidPeriodGeofenceGeometryId", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + isEventPublished: { + serializedName: "isEventPublished", + type: { + name: "Boolean" + } + } + } + } +}; + +export const MapsGeofenceEnteredEventData: msRest.CompositeMapper = { + serializedName: "MapsGeofenceEnteredEventData", + type: { + name: "Composite", + className: "MapsGeofenceEnteredEventData", + modelProperties: { + ...MapsGeofenceEventProperties.type.modelProperties + } + } +}; + +export const MapsGeofenceExitedEventData: msRest.CompositeMapper = { + serializedName: "MapsGeofenceExitedEventData", + type: { + name: "Composite", + className: "MapsGeofenceExitedEventData", + modelProperties: { + ...MapsGeofenceEventProperties.type.modelProperties + } + } +}; + +export const MapsGeofenceResultEventData: msRest.CompositeMapper = { + serializedName: "MapsGeofenceResultEventData", + type: { + name: "Composite", + className: "MapsGeofenceResultEventData", + modelProperties: { + ...MapsGeofenceEventProperties.type.modelProperties + } + } +}; + +export const MapsGeofenceGeometry: msRest.CompositeMapper = { + serializedName: "MapsGeofenceGeometry", + type: { + name: "Composite", + className: "MapsGeofenceGeometry", + modelProperties: { + deviceId: { + serializedName: "deviceId", + type: { + name: "String" + } + }, + distance: { + serializedName: "distance", + type: { + name: "Number" + } + }, + geometryId: { + serializedName: "geometryId", + type: { + name: "String" + } + }, + nearestLat: { + serializedName: "nearestLat", + type: { + name: "Number" + } + }, + nearestLon: { + serializedName: "nearestLon", + type: { + name: "Number" + } + }, + udId: { + serializedName: "udId", + type: { + name: "String" + } + } + } + } +}; + +export const AppConfigurationKeyValueModifiedEventData: msRest.CompositeMapper = { + serializedName: "AppConfigurationKeyValueModifiedEventData", + type: { + name: "Composite", + className: "AppConfigurationKeyValueModifiedEventData", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "String" + } + }, + label: { + serializedName: "label", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + +export const AppConfigurationKeyValueDeletedEventData: msRest.CompositeMapper = { + serializedName: "AppConfigurationKeyValueDeletedEventData", + type: { + name: "Composite", + className: "AppConfigurationKeyValueDeletedEventData", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "String" + } + }, + label: { + serializedName: "label", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + type: { + name: "String" + } + } + } + } +}; + export const discriminators = { 'MediaJobOutput' : MediaJobOutput, 'MediaJobOutput.#Microsoft.Media.JobOutputAsset' : MediaJobOutputAsset diff --git a/packages/@azure/eventgrid/package.json b/packages/@azure/eventgrid/package.json index a5178cdbc22f..8af13d16ab7d 100644 --- a/packages/@azure/eventgrid/package.json +++ b/packages/@azure/eventgrid/package.json @@ -4,8 +4,8 @@ "description": "EventGridClient Library with typescript type definitions for node.js and browser.", "version": "1.5.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/eventgrid", @@ -51,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/eventgrid.js.map'\" -o ./dist/eventgrid.min.js ./dist/eventgrid.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "authPublish": true + "sideEffects": false } diff --git a/packages/@azure/eventgrid/rollup.config.js b/packages/@azure/eventgrid/rollup.config.js index 39cb715f189b..17ee8655d7c9 100644 --- a/packages/@azure/eventgrid/rollup.config.js +++ b/packages/@azure/eventgrid/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/eventGridClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/eventGridClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/eventgrid.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config;