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

[@azure/eventgrid] - Azure EventGrid Beta Release V4.13.0-beta.1 #25906

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
14 changes: 13 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@
},
{
"filename": "sdk/formrecognizer/ai-form-recognizer/README.md",
"words": ["iddocument"]
"words": [
"iddocument"
]
},
{
"filename": "sdk/formrecognizer/ai-form-recognizer/review/**/*.md",
Expand Down Expand Up @@ -405,6 +407,16 @@
"words": [
"protobuf"
]
},
{
"filename": "sdk/eventgrid/eventgrid/**/**/**.**",
"words": [
"Dicom",
"Agri",
"cadl",
"deseralization",
"tsdoc"
]
}
]
}
29 changes: 23 additions & 6 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion sdk/eventgrid/eventgrid/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"plugins": ["@azure/azure-sdk"],
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"],
"rules": {
"@typescript-eslint/ban-types": "warn"
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/naming-convention": "warn"
}
}
6 changes: 6 additions & 0 deletions sdk/eventgrid/eventgrid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 4.13.0-beta.1 (2023-05-22)

### Features Added

- Added a new client `EventGridClient` to the `@azure/eventgrid` with `publishCloudEvent`, `publishCloudEvents`, `receiveCloudEvents`, `acknowledgeCloudEvents`, `releaseCloudEvents` and `rejectCloudEvents` apis.

## 4.12.0 (2023-05-17)

- No new changes for this release. This is to update the minor version of the release to indicate the new system events that were added in the `4.11.1` version.
Expand Down
5 changes: 3 additions & 2 deletions sdk/eventgrid/eventgrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "client",
"author": "Microsoft Corporation",
"description": "An isomorphic client library for the Azure Event Grid service.",
"version": "4.12.0",
"version": "4.13.0-beta.1",
"keywords": [
"node",
"azure",
Expand Down Expand Up @@ -93,7 +93,8 @@
"dependencies": {
"@azure/core-auth": "^1.3.0",
"@azure/core-client": "^1.5.0",
"@azure/core-rest-pipeline": "^1.1.0",
"@azure/core-rest-pipeline": "^1.1.3",
"@azure-rest/core-client": "^1.1.3",
"@azure/core-tracing": "^1.0.0",
"@azure/logger": "^1.0.0",
"tslib": "^2.2.0",
Expand Down
122 changes: 122 additions & 0 deletions sdk/eventgrid/eventgrid/review/eventgrid.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,31 @@

import { AzureKeyCredential } from '@azure/core-auth';
import { AzureSASCredential } from '@azure/core-auth';
import { ClientOptions as ClientOptions_2 } from '@azure-rest/core-client';
import { CommonClientOptions } from '@azure/core-client';
import { HttpResponse } from '@azure-rest/core-client';
import { KeyCredential } from '@azure/core-auth';
import { OperationOptions } from '@azure/core-client';
import { RawHttpHeadersInput } from '@azure/core-rest-pipeline';
import { SASCredential } from '@azure/core-auth';
import { TokenCredential } from '@azure/core-auth';

// @public (undocumented)
sarangan12 marked this conversation as resolved.
Show resolved Hide resolved
export interface AcknowledgeCloudEventsOptions extends RequestOptions {
contentType?: string;
}

// @public
export interface AcknowledgeOptions {
lockTokens: string[];
}

// @public
export interface AcknowledgeResult {
failedLockTokens: FailedLockToken[];
succeededLockTokens: string[];
}

// @public
export interface AcsChatEventBase {
recipientCommunicationIdentifier: CommunicationIdentifierModel;
Expand Down Expand Up @@ -438,6 +457,16 @@ export { AzureKeyCredential }

export { AzureSASCredential }

// @public
export interface BrokerProperties {
deliveryCount: number;
lockToken: string;
}

// @public (undocumented)
export interface ClientOptions extends ClientOptions_2 {
}

// @public
export interface CloudEvent<T> {
data?: T;
Expand All @@ -446,6 +475,7 @@ export interface CloudEvent<T> {
extensionAttributes?: Record<string, unknown>;
id: string;
source: string;
specversion?: string | "1.0";
Copy link
Member

Choose a reason for hiding this comment

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

any chance to name this specVersion?

Copy link
Member Author

Choose a reason for hiding this comment

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

But it is actually specversion in tsp file

subject?: string;
time?: Date;
type: string;
Expand Down Expand Up @@ -655,6 +685,17 @@ export interface DeviceTwinMetadata {
lastUpdated: string;
}

// @public
export class EventGridClient {
constructor(endpoint: string, credential: AzureKeyCredential, options?: ClientOptions);
acknowledgeCloudEvents(lockTokens: string[], topicName: string, eventSubscriptionName: string, options?: AcknowledgeCloudEventsOptions): Promise<AcknowledgeResult>;
publishCloudEvent<T>(event: CloudEvent<T>, topicName: string, options?: PublishCloudEventOptions): Promise<PublishResultOutput>;
publishCloudEvents<T>(events: CloudEvent<T>[], topicName: string, options?: PublishCloudEventsOptions): Promise<PublishResultOutput>;
receiveCloudEvents<T>(topicName: string, eventSubscriptionName: string, options?: ReceiveCloudEventsOptions): Promise<ReceiveResult<T>>;
rejectCloudEvents(lockTokens: string[], topicName: string, eventSubscriptionName: string, options?: RejectCloudEventsOptions): Promise<RejectResult>;
releaseCloudEvents(lockTokens: string[], topicName: string, eventSubscriptionName: string, options?: ReleaseCloudEventsOptions): Promise<ReleaseResult>;
}

// @public
export class EventGridDeserializer {
deserializeCloudEvents(encodedEvents: string): Promise<CloudEvent<unknown>[]>;
Expand Down Expand Up @@ -698,6 +739,13 @@ export interface EventHubCaptureFileCreatedEventData {
sizeInBytes: number;
}

// @public
export interface FailedLockToken {
errorCode: string;
errorDescription: string;
lockToken: string;
}

// @public
export function generateSharedAccessSignature(endpointUrl: string, credential: KeyCredential, expiresOnUtc: Date, options?: GenerateSharedAccessSignatureOptions): Promise<string>;

Expand Down Expand Up @@ -1284,6 +1332,37 @@ export interface PolicyInsightsPolicyStateDeletedEventData {
timestamp: string;
}

// @public (undocumented)
export interface PublishCloudEventOptions extends RequestOptions {
contentType?: string;
}

// @public (undocumented)
export interface PublishCloudEventsOptions extends RequestOptions {
contentType?: string;
}

// @public
export interface PublishResultOutput {
}

// @public (undocumented)
export interface ReceiveCloudEventsOptions extends RequestOptions {
maxEvents?: number;
maxWaitTime?: number;
}

// @public
export interface ReceiveDetails<T> {
brokerProperties: BrokerProperties;
event: CloudEvent<T>;
}

// @public
export interface ReceiveResult<T> {
value: ReceiveDetails<T>[];
}

// @public
export type RecordingChannelType = string;

Expand All @@ -1293,6 +1372,49 @@ export type RecordingContentType = string;
// @public
export type RecordingFormatType = string;

// @public (undocumented)
export interface RejectCloudEventsOptions extends RequestOptions {
contentType?: string;
}

// @public
export interface RejectOptions {
lockTokens: string[];
}

// @public
export interface RejectResult {
failedLockTokens: FailedLockToken[];
succeededLockTokens: string[];
}

// @public (undocumented)
export interface ReleaseCloudEventsOptions extends RequestOptions {
contentType?: string;
}

// @public
export interface ReleaseOptions {
lockTokens: string[];
}

// @public
export interface ReleaseResult {
failedLockTokens: FailedLockToken[];
succeededLockTokens: string[];
}

// @public (undocumented)
export interface RequestOptions {
// (undocumented)
requestOptions?: {
headers?: RawHttpHeadersInput;
allowInsecureConnection?: boolean;
skipUrlEncoding?: boolean;
onResponse?: (response: HttpResponse) => void;
};
}

// @public
export interface ResourceActionCancelEventData {
authorization: ResourceAuthorization;
Expand Down
Loading