Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 52 additions & 8 deletions sdk/eventgrid/eventgrid/review/eventgrid.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,36 +122,41 @@ export type AcsSmsReceivedEventData = AcsSmsEventBase & {
};

// @public
export type AppAction = "Restarted" | "Stopped" | "ChangedAppSettings" | "Started" | "Completed" | "Failed";
export type AppAction = string;

// @public
export interface AppConfigurationKeyValueDeletedEventData {
etag?: string;
key?: string;
label?: string;
syncToken?: string;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have this new property?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added with this commit: Azure/azure-rest-api-specs#11819 2 months back. The swagger is pointing to master branch. So, it is picking up new changes. The changes seemed minimal. So, I took them it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, this is not a breaking change since the new properties are optional, however I would like @ellismg to confirm if we want to start exposing these properties now. Other than this I think the changes look reasonable and all checks pass

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposing these now is great!

}

// @public
export interface AppConfigurationKeyValueModifiedEventData {
etag?: string;
key?: string;
label?: string;
syncToken?: string;
}

// @public
export interface AppEventTypeDetail {
action?: AppAction;
}

// @public
export type AppServicePlanAction = string;

// @public
export interface AppServicePlanEventTypeDetail {
action?: "Updated";
action?: AppServicePlanAction;
stampKind?: StampKind;
status?: AsyncStatus;
}

// @public
export type AsyncStatus = "Started" | "Completed" | "Failed";
export type AsyncStatus = string;

export { AzureKeyCredential }

Expand Down Expand Up @@ -347,7 +352,6 @@ export class EventGridPublisherClient {
readonly endpointUrl: string;
sendCloudEvents(events: SendCloudEventInput<any>[], options?: SendCloudEventsOptions): Promise<SendEventsResponse>;
sendCustomSchemaEvents(events: Record<string, any>[], options?: SendCustomSchemaEventsOptions): Promise<SendEventsResponse>;
// Warning: (ae-forgotten-export) The symbol "SendEventsResponse" needs to be exported by the entry point index.d.ts
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line of code change is not really related to Version Upgrade. I just found a forgotten export and added it. Please let me know if this is not exported intentionally. I can revert the changes. Thanks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, this was just me forgetting to export something. Thank you for fixing!

sendEvents(events: SendEventGridEventInput<any>[], options?: SendEventsOptions): Promise<SendEventsResponse>;
}

Expand Down Expand Up @@ -513,6 +517,35 @@ export interface KeyVaultSecretNewVersionCreatedEventData {
version?: string;
}

// @public
export const enum KnownAppAction {
ChangedAppSettings = "ChangedAppSettings",
Completed = "Completed",
Failed = "Failed",
Restarted = "Restarted",
Started = "Started",
Stopped = "Stopped"
}

// @public
export const enum KnownAppServicePlanAction {
Updated = "Updated"
}

// @public
export const enum KnownAsyncStatus {
Completed = "Completed",
Failed = "Failed",
Started = "Started"
}

// @public
export const enum KnownStampKind {
AseV1 = "AseV1",
AseV2 = "AseV2",
Public = "Public"
}

// @public
export type KnownSystemEventTypes = "Microsoft.AppConfiguration.KeyValueDeleted" | "Microsoft.AppConfiguration.KeyValueModified" | "Microsoft.Communication.ChatMessageReceived" | "Microsoft.Communication.ChatMessageEdited" | "Microsoft.Communication.ChatMessageDeleted" | "Microsoft.Communication.ChatThreadCreatedWithUser" | "Microsoft.Communication.ChatThreadWithUserDeleted" | "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser" | "Microsoft.Communication.ChatMemberAddedToThreadWithUser" | "Microsoft.Communication.ChatMemberRemovedFromThreadWithUser" | "Microsoft.Communication.SMSDeliveryReportReceived" | "Microsoft.Communication.SMSReceived" | "Microsoft.ContainerRegistry.ImagePushed" | "Microsoft.ContainerRegistry.ImageDeleted" | "Microsoft.ContainerRegistry.ChartDeleted" | "Microsoft.ContainerRegistry.ChartPushed" | "Microsoft.Devices.DeviceCreated" | "Microsoft.Devices.DeviceDeleted" | "Microsoft.Devices.DeviceConnected" | "Microsoft.Devices.DeviceDisconnected" | "Microsoft.Devices.DeviceTelemetry" | "Microsoft.EventGrid.SubscriptionValidationEvent" | "Microsoft.EventGrid.SubscriptionDeletedEvent" | "Microsoft.EventHub.CaptureFileCreated" | "Microsoft.KeyVault.CertificateNewVersionCreated" | "Microsoft.KeyVault.CertificateNearExpiry" | "Microsoft.KeyVault.CertificateExpired" | "Microsoft.KeyVault.KeyNewVersionCreated" | "Microsoft.KeyVault.KeyNearExpiry" | "Microsoft.KeyVault.KeyExpired" | "Microsoft.KeyVault.SecretNewVersionCreated" | "Microsoft.KeyVault.SecretNearExpiry" | "Microsoft.KeyVault.SecretExpired" | "Microsoft.KeyVault.VaultAccessPolicyChanged" | "Microsoft.MachineLearningServices.DatasetDriftDetected" | "Microsoft.MachineLearningServices.ModelDeployed" | "Microsoft.MachineLearningServices.ModelRegistered" | "Microsoft.MachineLearningServices.RunCompleted" | "Microsoft.MachineLearningServices.RunStatusChanged" | "Microsoft.Maps.GeofenceEntered" | "Microsoft.Maps.GeofenceExited" | "Microsoft.Maps.GeofenceResult" | "Microsoft.Media.JobStateChange" | "Microsoft.Media.JobOutputStateChange" | "Microsoft.Media.JobScheduled" | "Microsoft.Media.JobProcessing" | "Microsoft.Media.JobCanceling" | "Microsoft.Media.JobFinished" | "Microsoft.Media.JobCanceled" | "Microsoft.Media.JobErrored" | "Microsoft.Media.JobOutputCanceled" | "Microsoft.Media.JobOutputCanceling" | "Microsoft.Media.JobOutputErrored" | "Microsoft.Media.JobOutputFinished" | "Microsoft.Media.JobOutputProcessing" | "Microsoft.Media.JobOutputScheduled" | "Microsoft.Media.JobOutputProgress" | "Microsoft.Media.LiveEventEncoderConnected" | "Microsoft.Media.LiveEventConnectionRejected" | "Microsoft.Media.LiveEventEncoderDisconnected" | "Microsoft.Media.LiveEventIncomingStreamReceived" | "Microsoft.Media.LiveEventIncomingStreamsOutOfSync" | "Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync" | "Microsoft.Media.LiveEventIncomingDataChunkDropped" | "Microsoft.Media.LiveEventIngestHeartbeat" | "Microsoft.Media.LiveEventTrackDiscontinuityDetected" | "Microsoft.Resources.ResourceWriteSuccess" | "Microsoft.Resources.ResourceWriteFailure" | "Microsoft.Resources.ResourceWriteCancel" | "Microsoft.Resources.ResourceDeleteSuccess" | "Microsoft.Resources.ResourceDeleteFailure" | "Microsoft.Resources.ResourceDeleteCancel" | "Microsoft.Resources.ResourceActionSuccess" | "Microsoft.Resources.ResourceActionFailure" | "Microsoft.Resources.ResourceActionCancel" | "Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners" | "Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListener" | "Microsoft.Storage.BlobCreated" | "Microsoft.Storage.BlobDeleted" | "Microsoft.Storage.BlobRenamed" | "Microsoft.Storage.DirectoryCreated" | "Microsoft.Storage.DirectoryDeleted" | "Microsoft.Storage.DirectoryRenamed" | "Microsoft.Storage.LifecyclePolicyCompleted" | "Microsoft.Web.AppUpdated" | "Microsoft.Web.BackupOperationStarted" | "Microsoft.Web.BackupOperationCompleted" | "Microsoft.Web.BackupOperationFailed" | "Microsoft.Web.RestoreOperationStarted" | "Microsoft.Web.RestoreOperationCompleted" | "Microsoft.Web.RestoreOperationFailed" | "Microsoft.Web.SlotSwapStarted" | "Microsoft.Web.SlotSwapCompleted" | "Microsoft.Web.SlotSwapFailed" | "Microsoft.Web.SlotSwapWithPreviewStarted" | "Microsoft.Web.SlotSwapWithPreviewCancelled" | "Microsoft.Web.AppServicePlanUpdated";

Expand Down Expand Up @@ -634,16 +667,16 @@ export type MediaJobFinishedEventData = MediaJobStateChangeEventData & {

// @public
export interface MediaJobOutput {
"@odata.type": "#Microsoft.Media.JobOutputAsset";
error?: MediaJobError;
label?: string;
odataType?: string;
odataType: "#Microsoft.Media.JobOutputAsset";
progress: number;
state: MediaJobState;
}

// @public
export type MediaJobOutputAsset = MediaJobOutput & {
odataType: "#Microsoft.Media.JobOutputAsset";
assetName?: string;
};

Expand Down Expand Up @@ -970,6 +1003,11 @@ export interface SendEventGridEventInput<T> {
// @public
export type SendEventsOptions = OperationOptions;

// @public
export interface SendEventsResponse {
_response: HttpResponse;
}

// @public
export interface ServiceBusActiveMessagesAvailableWithNoListenersEventData {
entityType?: string;
Expand All @@ -996,7 +1034,7 @@ export interface SignatureCredential {
}

// @public
export type StampKind = "Public" | "AseV1" | "AseV2";
export type StampKind = string;

// @public
export interface StorageBlobCreatedEventData {
Expand Down Expand Up @@ -1075,9 +1113,15 @@ export interface StorageDirectoryRenamedEventData {
storageDiagnostics?: any;
}

// @public
export interface StorageLifecyclePolicyActionSummaryDetail {
errorList?: string;
successCount?: number;
totalObjectsCount?: number;
}

// @public
export interface StorageLifecyclePolicyCompletedEventData {
// Warning: (ae-forgotten-export) The symbol "StorageLifecyclePolicyActionSummaryDetail" needs to be exported by the entry point index.d.ts
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line of code change is not really related to Version Upgrade. I just found a forgotten export and added it. Please let me know if this is not exported intentionally. I can revert the changes. Thanks

deleteSummary?: StorageLifecyclePolicyActionSummaryDetail;
scheduleTime?: string;
tierToArchiveSummary?: StorageLifecyclePolicyActionSummaryDetail;
Expand Down
3 changes: 3 additions & 0 deletions sdk/eventgrid/eventgrid/src/eventGridClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export type SendCustomSchemaEventsOptions = OperationOptions;
* The response when sending events to the Event Grid service.
*/
export interface SendEventsResponse {
/**
* Event Response
*/
_response: HttpResponse;
}

Expand Down
44 changes: 20 additions & 24 deletions sdk/eventgrid/eventgrid/src/generated/generatedClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import * as coreHttp from "@azure/core-http";
import * as Parameters from "./models/parameters";
import * as Models from "./models";
import * as Mappers from "./models/mappers";
import { GeneratedClientContext } from "./generatedClientContext";
import {
Expand All @@ -17,7 +16,8 @@ import {
CloudEvent
} from "./models";

class GeneratedClient extends GeneratedClientContext {
/** @hidden */
export class GeneratedClient extends GeneratedClientContext {
/**
* Initializes a new instance of the GeneratedClient class.
* @param options The parameter options
Expand All @@ -37,11 +37,13 @@ class GeneratedClient extends GeneratedClientContext {
events: EventGridEvent[],
options?: coreHttp.OperationOptions
): Promise<coreHttp.RestResponse> {
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
options || {}
);
const operationArguments: coreHttp.OperationArguments = {
topicHostname,
events,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
};
return this.sendOperationRequest(
{ topicHostname, events, options: operationOptions },
operationArguments,
publishEventsOperationSpec
) as Promise<coreHttp.RestResponse>;
}
Expand All @@ -57,11 +59,13 @@ class GeneratedClient extends GeneratedClientContext {
events: CloudEvent[],
options?: coreHttp.OperationOptions
): Promise<coreHttp.RestResponse> {
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
options || {}
);
const operationArguments: coreHttp.OperationArguments = {
topicHostname,
events,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
};
return this.sendOperationRequest(
{ topicHostname, events, options: operationOptions },
operationArguments,
publishCloudEventEventsOperationSpec
) as Promise<coreHttp.RestResponse>;
}
Expand All @@ -77,17 +81,18 @@ class GeneratedClient extends GeneratedClientContext {
events: any[],
options?: coreHttp.OperationOptions
): Promise<coreHttp.RestResponse> {
const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase(
options || {}
);
const operationArguments: coreHttp.OperationArguments = {
topicHostname,
events,
options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
};
return this.sendOperationRequest(
{ topicHostname, events, options: operationOptions },
operationArguments,
publishCustomEventEventsOperationSpec
) as Promise<coreHttp.RestResponse>;
}
}
// Operation Specifications

const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);

const publishEventsOperationSpec: coreHttp.OperationSpec = {
Expand Down Expand Up @@ -123,12 +128,3 @@ const publishCustomEventEventsOperationSpec: coreHttp.OperationSpec = {
mediaType: "json",
serializer
};

// Operation Specifications

export {
GeneratedClient,
GeneratedClientContext,
Models as GeneratedModels,
Mappers as GeneratedMappers
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { GeneratedClientOptionalParams } from "./models";
const packageName = "@azure/eventgrid";
const packageVersion = "3.0.0-beta.3";

/** @hidden */
export class GeneratedClientContext extends coreHttp.ServiceClient {
apiVersion: string;

Expand Down
11 changes: 11 additions & 0 deletions sdk/eventgrid/eventgrid/src/generated/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* 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.
*/

export * from "./models";
export { GeneratedClient } from "./generatedClient";
export { GeneratedClientContext } from "./generatedClientContext";
Loading