@azure/eventgrid 4.12.0 → 4.13.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +430 -4
- package/dist/index.js.map +1 -1
- package/dist-esm/src/cadl-generated/EventGridClient.js +28 -0
- package/dist-esm/src/cadl-generated/EventGridClient.js.map +1 -0
- package/dist-esm/src/cadl-generated/api/EventGridContext.js +11 -0
- package/dist-esm/src/cadl-generated/api/EventGridContext.js.map +1 -0
- package/dist-esm/src/cadl-generated/api/index.js +5 -0
- package/dist-esm/src/cadl-generated/api/index.js.map +1 -0
- package/dist-esm/src/cadl-generated/api/models.js +2 -0
- package/dist-esm/src/cadl-generated/api/models.js.map +1 -0
- package/dist-esm/src/cadl-generated/api/operations.js +162 -0
- package/dist-esm/src/cadl-generated/api/operations.js.map +1 -0
- package/dist-esm/src/cadl-generated/common/interfaces.js +4 -0
- package/dist-esm/src/cadl-generated/common/interfaces.js.map +1 -0
- package/dist-esm/src/cadl-generated/index.js +4 -0
- package/dist-esm/src/cadl-generated/index.js.map +1 -0
- package/dist-esm/src/cadl-generated/logger.js +5 -0
- package/dist-esm/src/cadl-generated/logger.js.map +1 -0
- package/dist-esm/src/cadl-generated/rest/clientDefinitions.js +4 -0
- package/dist-esm/src/cadl-generated/rest/clientDefinitions.js.map +1 -0
- package/dist-esm/src/cadl-generated/rest/eventGridClient.js +30 -0
- package/dist-esm/src/cadl-generated/rest/eventGridClient.js.map +1 -0
- package/dist-esm/src/cadl-generated/rest/index.js +12 -0
- package/dist-esm/src/cadl-generated/rest/index.js.map +1 -0
- package/dist-esm/src/cadl-generated/rest/isUnexpected.js +74 -0
- package/dist-esm/src/cadl-generated/rest/isUnexpected.js.map +1 -0
- package/dist-esm/src/cadl-generated/rest/models.js +4 -0
- package/dist-esm/src/cadl-generated/rest/models.js.map +1 -0
- package/dist-esm/src/cadl-generated/rest/outputModels.js +4 -0
- package/dist-esm/src/cadl-generated/rest/outputModels.js.map +1 -0
- package/dist-esm/src/cadl-generated/rest/parameters.js +4 -0
- package/dist-esm/src/cadl-generated/rest/parameters.js.map +1 -0
- package/dist-esm/src/cadl-generated/rest/responses.js +4 -0
- package/dist-esm/src/cadl-generated/rest/responses.js.map +1 -0
- package/dist-esm/src/eventGridClientV2.js +128 -0
- package/dist-esm/src/eventGridClientV2.js.map +1 -0
- package/dist-esm/src/generated/generatedClientContext.js +1 -1
- package/dist-esm/src/generated/generatedClientContext.js.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/src/tracing.js +1 -1
- package/dist-esm/src/tracing.js.map +1 -1
- package/package.json +3 -2
- package/types/eventgrid.d.ts +216 -0
@@ -0,0 +1,128 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT license.
|
3
|
+
import { cloudEventReservedPropertyNames } from "./models";
|
4
|
+
import { v4 as uuidv4 } from "uuid";
|
5
|
+
import { EventGridClient as EventGridClientGenerated } from "./cadl-generated/EventGridClient";
|
6
|
+
/**
|
7
|
+
* Event Grid Client
|
8
|
+
*/
|
9
|
+
export class EventGridClient {
|
10
|
+
/** Azure Messaging EventGrid Client */
|
11
|
+
constructor(endpoint, credential, options = {}) {
|
12
|
+
credential.update(`SharedAccessKey ${credential.key}`);
|
13
|
+
this._client = new EventGridClientGenerated(endpoint, credential, options);
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
* Publish Single Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200
|
17
|
+
* status code with an empty JSON object in response. Otherwise, the server can return various error codes.
|
18
|
+
* For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message
|
19
|
+
* is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for
|
20
|
+
* internal server error.
|
21
|
+
*
|
22
|
+
* @param event - Event to publish
|
23
|
+
* @param topicName - Topic to publish the event
|
24
|
+
* @param options - Options to publish
|
25
|
+
*
|
26
|
+
*/
|
27
|
+
publishCloudEvent(event, topicName, options = { requestOptions: {} }) {
|
28
|
+
return this._client.publishCloudEvent(convertCloudEventToModelType(event), topicName, options);
|
29
|
+
}
|
30
|
+
/**
|
31
|
+
* Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200
|
32
|
+
* status code with an empty JSON object in response. Otherwise, the server can return various error codes.
|
33
|
+
* For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message
|
34
|
+
* is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for
|
35
|
+
* internal server error.
|
36
|
+
*
|
37
|
+
* @param events - Events to publish
|
38
|
+
* @param topicName - Topic to publish the event
|
39
|
+
* @param options - Options to publish
|
40
|
+
*
|
41
|
+
*/
|
42
|
+
publishCloudEvents(events, topicName, options = { requestOptions: {} }) {
|
43
|
+
const eventsWireModel = [];
|
44
|
+
for (const individualevent of events) {
|
45
|
+
eventsWireModel.concat(convertCloudEventToModelType(individualevent));
|
46
|
+
}
|
47
|
+
return this._client.publishCloudEvents(eventsWireModel, topicName, options);
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* Receive Batch of Cloud Events from the Event Subscription.
|
51
|
+
*
|
52
|
+
* @param topicName - Topic to receive
|
53
|
+
* @param eventSubscriptionName - Name of the Event Subscription
|
54
|
+
* @param options - Options to receive
|
55
|
+
*
|
56
|
+
*/
|
57
|
+
receiveCloudEvents(topicName, eventSubscriptionName, options = { requestOptions: {} }) {
|
58
|
+
return this._client.receiveCloudEvents(topicName, eventSubscriptionName, options);
|
59
|
+
}
|
60
|
+
/**
|
61
|
+
* Acknowledge batch of Cloud Events. The server responds with an HTTP 200 status code if at least one
|
62
|
+
* event is successfully acknowledged. The response body will include the set of successfully acknowledged
|
63
|
+
* lockTokens, along with other failed lockTokens with their corresponding error information. Successfully
|
64
|
+
* acknowledged events will no longer be available to any consumer.
|
65
|
+
*
|
66
|
+
* @param lockTokens - Lock Tokens
|
67
|
+
* @param topicName - Topic Name
|
68
|
+
* @param eventSubscriptionName - Name of the Event Subscription
|
69
|
+
* @param options - Options to Acknowledge
|
70
|
+
*
|
71
|
+
*/
|
72
|
+
acknowledgeCloudEvents(lockTokens, topicName, eventSubscriptionName, options = { requestOptions: {} }) {
|
73
|
+
return this._client.acknowledgeCloudEvents(lockTokens, topicName, eventSubscriptionName, options);
|
74
|
+
}
|
75
|
+
/**
|
76
|
+
* Release batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is
|
77
|
+
* successfully released. The response body will include the set of successfully released lockTokens, along
|
78
|
+
* with other failed lockTokens with their corresponding error information.
|
79
|
+
*
|
80
|
+
* @param lockTokens - Lock Tokens
|
81
|
+
* @param topicName - Topic Name
|
82
|
+
* @param eventSubscriptionName - Name of the Event Subscription
|
83
|
+
* @param options - Options to release
|
84
|
+
*
|
85
|
+
*/
|
86
|
+
releaseCloudEvents(lockTokens, topicName, eventSubscriptionName, options = { requestOptions: {} }) {
|
87
|
+
return this._client.releaseCloudEvents(lockTokens, topicName, eventSubscriptionName, options);
|
88
|
+
}
|
89
|
+
/**
|
90
|
+
* Reject batch of Cloud Events.
|
91
|
+
*
|
92
|
+
* @param lockTokens - Lock Tokens
|
93
|
+
* @param topicName - Topic Name
|
94
|
+
* @param eventSubscriptionName - Name of the Event Subscription
|
95
|
+
* @param options - Options to reject
|
96
|
+
*
|
97
|
+
*/
|
98
|
+
rejectCloudEvents(lockTokens, topicName, eventSubscriptionName, options = { requestOptions: {} }) {
|
99
|
+
return this._client.rejectCloudEvents(lockTokens, topicName, eventSubscriptionName, options);
|
100
|
+
}
|
101
|
+
}
|
102
|
+
export function convertCloudEventToModelType(event) {
|
103
|
+
var _a, _b, _c, _d, _e;
|
104
|
+
if (event.extensionAttributes) {
|
105
|
+
for (const propName in event.extensionAttributes) {
|
106
|
+
// Per the cloud events spec: "CloudEvents attribute names MUST consist of lower-case letters ('a' to 'z') or digits ('0' to '9') from the ASCII character set"
|
107
|
+
// they also can not match an existing defined property name.
|
108
|
+
if (!/^[a-z0-9]*$/.test(propName) ||
|
109
|
+
cloudEventReservedPropertyNames.indexOf(propName) !== -1) {
|
110
|
+
throw new Error(`invalid extension attribute name: ${propName}`);
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
const converted = Object.assign({ specversion: (_a = event.specversion) !== null && _a !== void 0 ? _a : "1.0", type: event.type, source: event.source, id: (_b = event.id) !== null && _b !== void 0 ? _b : uuidv4(), time: (_c = event.time) !== null && _c !== void 0 ? _c : new Date(), subject: event.subject, dataschema: event.dataschema }, ((_d = event.extensionAttributes) !== null && _d !== void 0 ? _d : []));
|
115
|
+
if (event.data instanceof Uint8Array) {
|
116
|
+
if (!event.datacontenttype) {
|
117
|
+
throw new Error("a data content type must be provided when sending an event with binary data");
|
118
|
+
}
|
119
|
+
converted.datacontenttype = event.datacontenttype;
|
120
|
+
converted.data_base64 = event.data;
|
121
|
+
}
|
122
|
+
else {
|
123
|
+
converted.datacontenttype = (_e = event.datacontenttype) !== null && _e !== void 0 ? _e : "application/json";
|
124
|
+
converted.data = event.data;
|
125
|
+
}
|
126
|
+
return converted;
|
127
|
+
}
|
128
|
+
//# sourceMappingURL=eventGridClientV2.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventGridClientV2.js","sourceRoot":"","sources":["../../src/eventGridClientV2.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AzureKeyCredential } from \"@azure/core-auth\";\nimport { ClientOptions } from \"./cadl-generated/common/interfaces\";\nimport {\n ReceiveResult,\n AcknowledgeResult,\n ReleaseResult,\n RejectResult,\n PublishCloudEventOptions,\n PublishCloudEventsOptions,\n ReceiveCloudEventsOptions,\n AcknowledgeCloudEventsOptions,\n ReleaseCloudEventsOptions,\n RejectCloudEventsOptions,\n PublishResultOutput,\n} from \"./cadl-generated/api/index\";\nimport { CloudEvent, cloudEventReservedPropertyNames } from \"./models\";\nimport { v4 as uuidv4 } from \"uuid\";\nimport { CloudEvent as CloudEventWireModel } from \"./cadl-generated/rest/index\";\nimport { EventGridClient as EventGridClientGenerated } from \"./cadl-generated/EventGridClient\";\n\n/**\n * Event Grid Client\n */\nexport class EventGridClient {\n private _client: EventGridClientGenerated;\n\n /** Azure Messaging EventGrid Client */\n constructor(endpoint: string, credential: AzureKeyCredential, options: ClientOptions = {}) {\n credential.update(`SharedAccessKey ${credential.key}`);\n this._client = new EventGridClientGenerated(endpoint, credential, options);\n }\n\n /**\n * Publish Single Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200\n * status code with an empty JSON object in response. Otherwise, the server can return various error codes.\n * For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message\n * is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for\n * internal server error.\n *\n * @param event - Event to publish\n * @param topicName - Topic to publish the event\n * @param options - Options to publish\n *\n */\n publishCloudEvent<T>(\n event: CloudEvent<T>,\n topicName: string,\n options: PublishCloudEventOptions = { requestOptions: {} }\n ): Promise<PublishResultOutput> {\n return this._client.publishCloudEvent(convertCloudEventToModelType(event), topicName, options);\n }\n\n /**\n * Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200\n * status code with an empty JSON object in response. Otherwise, the server can return various error codes.\n * For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message\n * is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for\n * internal server error.\n *\n * @param events - Events to publish\n * @param topicName - Topic to publish the event\n * @param options - Options to publish\n *\n */\n publishCloudEvents<T>(\n events: CloudEvent<T>[],\n topicName: string,\n options: PublishCloudEventsOptions = { requestOptions: {} }\n ): Promise<PublishResultOutput> {\n const eventsWireModel: Array<CloudEventWireModel> = [];\n for (const individualevent of events) {\n eventsWireModel.concat(convertCloudEventToModelType(individualevent));\n }\n return this._client.publishCloudEvents(eventsWireModel, topicName, options);\n }\n\n /**\n * Receive Batch of Cloud Events from the Event Subscription.\n *\n * @param topicName - Topic to receive\n * @param eventSubscriptionName - Name of the Event Subscription\n * @param options - Options to receive\n *\n */\n receiveCloudEvents<T>(\n topicName: string,\n eventSubscriptionName: string,\n options: ReceiveCloudEventsOptions = { requestOptions: {} }\n ): Promise<ReceiveResult<T>> {\n return this._client.receiveCloudEvents(topicName, eventSubscriptionName, options);\n }\n\n /**\n * Acknowledge batch of Cloud Events. The server responds with an HTTP 200 status code if at least one\n * event is successfully acknowledged. The response body will include the set of successfully acknowledged\n * lockTokens, along with other failed lockTokens with their corresponding error information. Successfully\n * acknowledged events will no longer be available to any consumer.\n *\n * @param lockTokens - Lock Tokens\n * @param topicName - Topic Name\n * @param eventSubscriptionName - Name of the Event Subscription\n * @param options - Options to Acknowledge\n *\n */\n acknowledgeCloudEvents(\n lockTokens: string[],\n topicName: string,\n eventSubscriptionName: string,\n options: AcknowledgeCloudEventsOptions = { requestOptions: {} }\n ): Promise<AcknowledgeResult> {\n return this._client.acknowledgeCloudEvents(\n lockTokens,\n topicName,\n eventSubscriptionName,\n options\n );\n }\n\n /**\n * Release batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is\n * successfully released. The response body will include the set of successfully released lockTokens, along\n * with other failed lockTokens with their corresponding error information.\n *\n * @param lockTokens - Lock Tokens\n * @param topicName - Topic Name\n * @param eventSubscriptionName - Name of the Event Subscription\n * @param options - Options to release\n *\n */\n releaseCloudEvents(\n lockTokens: string[],\n topicName: string,\n eventSubscriptionName: string,\n options: ReleaseCloudEventsOptions = { requestOptions: {} }\n ): Promise<ReleaseResult> {\n return this._client.releaseCloudEvents(lockTokens, topicName, eventSubscriptionName, options);\n }\n\n /**\n * Reject batch of Cloud Events.\n *\n * @param lockTokens - Lock Tokens\n * @param topicName - Topic Name\n * @param eventSubscriptionName - Name of the Event Subscription\n * @param options - Options to reject\n *\n */\n rejectCloudEvents(\n lockTokens: string[],\n topicName: string,\n eventSubscriptionName: string,\n options: RejectCloudEventsOptions = { requestOptions: {} }\n ): Promise<RejectResult> {\n return this._client.rejectCloudEvents(lockTokens, topicName, eventSubscriptionName, options);\n }\n}\n\nexport function convertCloudEventToModelType<T>(event: CloudEvent<T>): CloudEventWireModel {\n if (event.extensionAttributes) {\n for (const propName in event.extensionAttributes) {\n // Per the cloud events spec: \"CloudEvents attribute names MUST consist of lower-case letters ('a' to 'z') or digits ('0' to '9') from the ASCII character set\"\n // they also can not match an existing defined property name.\n\n if (\n !/^[a-z0-9]*$/.test(propName) ||\n cloudEventReservedPropertyNames.indexOf(propName) !== -1\n ) {\n throw new Error(`invalid extension attribute name: ${propName}`);\n }\n }\n }\n\n const converted: CloudEventWireModel = {\n specversion: event.specversion ?? \"1.0\",\n type: event.type,\n source: event.source,\n id: event.id ?? uuidv4(),\n time: event.time ?? new Date(),\n subject: event.subject,\n dataschema: event.dataschema,\n ...(event.extensionAttributes ?? []),\n };\n\n if (event.data instanceof Uint8Array) {\n if (!event.datacontenttype) {\n throw new Error(\n \"a data content type must be provided when sending an event with binary data\"\n );\n }\n\n converted.datacontenttype = event.datacontenttype;\n converted.data_base64 = event.data;\n } else {\n converted.datacontenttype = event.datacontenttype ?? \"application/json\";\n converted.data = event.data;\n }\n\n return converted;\n}\n"]}
|
@@ -20,7 +20,7 @@ export class GeneratedClientContext extends coreClient.ServiceClient {
|
|
20
20
|
const defaults = {
|
21
21
|
requestContentType: "application/json; charset=utf-8"
|
22
22
|
};
|
23
|
-
const packageDetails = `azsdk-js-eventgrid/4.
|
23
|
+
const packageDetails = `azsdk-js-eventgrid/4.13.0-beta.1`;
|
24
24
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
25
25
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
26
26
|
: `${packageDetails}`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAGlE;;;OAGG;IACH,YAAY,OAAuC;QACjD,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,
|
1
|
+
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAGlE;;;OAGG;IACH,YAAY,OAAuC;QACjD,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,kCAAkC,CAAC;QAC1D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,iBAAiB,GAC/C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAE3B,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport { GeneratedClientOptionalParams } from \"./models\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext class.\n * @param options The parameter options\n */\n constructor(options?: GeneratedClientOptionalParams) {\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-eventgrid/4.13.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint || \"{topicHostname}\"\n };\n super(optionsWithDefaults);\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2018-01-01\";\n }\n}\n"]}
|
package/dist-esm/src/index.js
CHANGED
@@ -5,4 +5,5 @@ export { EventGridPublisherClient, } from "./eventGridClient";
|
|
5
5
|
export { generateSharedAccessSignature, } from "./generateSharedAccessSignature";
|
6
6
|
export { EventGridDeserializer } from "./consumer";
|
7
7
|
export { isSystemEvent } from "./predicates";
|
8
|
+
export { EventGridClient } from "./eventGridClientV2";
|
8
9
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAI1E,OAAO,EACL,wBAAwB,GAOzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,6BAA6B,GAE9B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAqD,MAAM,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { AzureKeyCredential, AzureSASCredential } from \"@azure/core-auth\";\n\nexport { CloudEvent, EventGridEvent, SendCloudEventInput, SendEventGridEventInput } from \"./models\";\n\nexport {\n EventGridPublisherClient,\n EventGridPublisherClientOptions,\n SendOptions,\n CloudEventSendOptions,\n InputSchema,\n InputSchemaToInputTypeMap,\n InputSchemaToOptionsTypeMap,\n} from \"./eventGridClient\";\n\nexport {\n generateSharedAccessSignature,\n GenerateSharedAccessSignatureOptions,\n} from \"./generateSharedAccessSignature\";\n\nexport { EventGridDeserializer } from \"./consumer\";\n\nexport { isSystemEvent, KnownSystemEventTypes, SystemEventNameToEventData } from \"./predicates\";\n\nexport {\n AcsChatEventBase,\n AcsChatEventInThreadBase,\n AcsChatMessageEventInThreadBase,\n AcsChatMessageDeletedEventData,\n AcsChatMessageDeletedInThreadEventData,\n AcsChatMessageEditedEventData,\n AcsChatMessageEditedInThreadEventData,\n AcsChatMessageReceivedEventData,\n AcsChatMessageReceivedInThreadEventData,\n AcsChatMessageEventBase,\n AcsChatThreadCreatedWithUserEventData,\n AcsChatThreadPropertiesUpdatedPerUserEventData,\n AcsChatThreadWithUserDeletedEventData,\n AcsChatThreadEventBase,\n AcsChatParticipantAddedToThreadEventData,\n AcsChatParticipantAddedToThreadWithUserEventData,\n AcsChatParticipantRemovedFromThreadEventData,\n AcsChatParticipantRemovedFromThreadWithUserEventData,\n AcsRecordingFileStatusUpdatedEventData,\n AcsRecordingStorageInfo,\n AcsRecordingChunkInfo,\n ApiManagementApiCreatedEventData,\n ApiManagementApiDeletedEventData,\n ApiManagementApiReleaseCreatedEventData,\n ApiManagementApiReleaseDeletedEventData,\n ApiManagementApiReleaseUpdatedEventData,\n ApiManagementApiUpdatedEventData,\n ApiManagementProductCreatedEventData,\n ApiManagementProductDeletedEventData,\n ApiManagementProductUpdatedEventData,\n ApiManagementSubscriptionCreatedEventData,\n ApiManagementSubscriptionDeletedEventData,\n ApiManagementSubscriptionUpdatedEventData,\n ApiManagementUserCreatedEventData,\n ApiManagementUserDeletedEventData,\n ApiManagementUserUpdatedEventData,\n CommunicationIdentifierModel,\n CommunicationUserIdentifierModel,\n CommunicationCloudEnvironmentModel,\n MicrosoftTeamsUserIdentifierModel,\n PhoneNumberIdentifierModel,\n AcsChatThreadParticipant,\n AcsUserDisconnectedEventData,\n AcsSmsDeliveryAttempt,\n AcsSmsDeliveryReportReceivedEventData,\n AcsSmsEventBase,\n AcsSmsReceivedEventData,\n AppConfigurationKeyValueDeletedEventData,\n AppConfigurationKeyValueModifiedEventData,\n AppEventTypeDetail,\n AppServicePlanEventTypeDetail,\n ContainerRegistryArtifactEventTarget,\n ContainerRegistryEventData,\n ContainerRegistryImagePushedEventData,\n ContainerRegistryImageDeletedEventData,\n ContainerRegistryChartDeletedEventData,\n ContainerRegistryChartPushedEventData,\n ContainerServiceNewKubernetesVersionAvailableEventData,\n DeviceConnectionStateEventInfo,\n DeviceTwinInfo,\n DeviceTwinInfoProperties,\n DeviceTwinInfoX509Thumbprint,\n HealthcareDicomImageCreatedEventData,\n HealthcareDicomImageDeletedEventData,\n HealthcareFhirResourceCreatedEventData,\n HealthcareFhirResourceUpdatedEventData,\n HealthcareFhirResourceDeletedEventData,\n HealthcareFhirResourceType,\n IotHubDeviceCreatedEventData,\n IotHubDeviceDeletedEventData,\n IotHubDeviceConnectedEventData,\n IotHubDeviceDisconnectedEventData,\n IotHubDeviceTelemetryEventData,\n KeyVaultCertificateNewVersionCreatedEventData,\n KeyVaultCertificateNearExpiryEventData,\n KeyVaultCertificateExpiredEventData,\n KeyVaultKeyNewVersionCreatedEventData,\n KeyVaultKeyNearExpiryEventData,\n KeyVaultKeyExpiredEventData,\n KeyVaultSecretNewVersionCreatedEventData,\n KeyVaultSecretNearExpiryEventData,\n KeyVaultSecretExpiredEventData,\n KeyVaultAccessPolicyChangedEventData,\n SubscriptionValidationEventData,\n SubscriptionDeletedEventData,\n EventHubCaptureFileCreatedEventData,\n MachineLearningServicesDatasetDriftDetectedEventData,\n MachineLearningServicesModelDeployedEventData,\n MachineLearningServicesModelRegisteredEventData,\n MachineLearningServicesRunCompletedEventData,\n MachineLearningServicesRunStatusChangedEventData,\n MapsGeofenceEvent,\n MapsGeofenceEnteredEventData,\n MapsGeofenceExitedEventData,\n MapsGeofenceResultEventData,\n MediaJobStateChangeEventData,\n MediaJobOutputStateChangeEventData,\n MediaJobScheduledEventData,\n MediaJobProcessingEventData,\n MediaJobCancelingEventData,\n MediaJobFinishedEventData,\n MediaJobCanceledEventData,\n MediaJobError,\n MediaJobErrorCategory,\n MediaJobErrorDetail,\n MediaJobErrorCode,\n MediaJobRetry,\n MediaJobErroredEventData,\n MediaJobOutputCanceledEventData,\n MediaJobOutputCancelingEventData,\n MediaJobOutputErroredEventData,\n MediaJobOutputFinishedEventData,\n MediaJobOutputProcessingEventData,\n MediaJobOutputScheduledEventData,\n MediaJobOutputProgressEventData,\n MediaJobOutputUnion,\n MediaJobState,\n MediaLiveEventChannelArchiveHeartbeatEventData,\n MediaLiveEventEncoderConnectedEventData,\n MediaLiveEventConnectionRejectedEventData,\n MediaLiveEventEncoderDisconnectedEventData,\n MediaLiveEventIncomingStreamReceivedEventData,\n MediaLiveEventIncomingStreamsOutOfSyncEventData,\n MediaLiveEventIncomingVideoStreamsOutOfSyncEventData,\n MediaLiveEventIncomingDataChunkDroppedEventData,\n MediaLiveEventIngestHeartbeatEventData,\n MediaLiveEventTrackDiscontinuityDetectedEventData,\n ResourceWriteSuccessEventData,\n ResourceWriteFailureEventData,\n ResourceWriteCancelEventData,\n ResourceDeleteSuccessEventData,\n ResourceDeleteFailureEventData,\n ResourceDeleteCancelEventData,\n ResourceActionSuccessEventData,\n ResourceActionFailureEventData,\n ResourceActionCancelEventData,\n ServiceBusActiveMessagesAvailableWithNoListenersEventData,\n ServiceBusDeadletterMessagesAvailableWithNoListenersEventData,\n StorageBlobCreatedEventData,\n StorageBlobDeletedEventData,\n StorageBlobRenamedEventData,\n StorageDirectoryCreatedEventData,\n StorageDirectoryDeletedEventData,\n StorageDirectoryRenamedEventData,\n StorageLifecyclePolicyActionSummaryDetail,\n StorageLifecyclePolicyCompletedEventData,\n WebAppUpdatedEventData,\n WebBackupOperationStartedEventData,\n WebBackupOperationCompletedEventData,\n WebBackupOperationFailedEventData,\n WebRestoreOperationStartedEventData,\n WebRestoreOperationCompletedEventData,\n WebRestoreOperationFailedEventData,\n WebSlotSwapStartedEventData,\n WebSlotSwapCompletedEventData,\n WebSlotSwapFailedEventData,\n WebSlotSwapWithPreviewStartedEventData,\n WebSlotSwapWithPreviewCancelledEventData,\n WebAppServicePlanUpdatedEventData,\n WebAppServicePlanUpdatedEventDataSku,\n AppAction,\n KnownAppAction,\n StampKind,\n KnownStampKind,\n AsyncStatus,\n KnownAsyncStatus,\n ContainerRegistryArtifactEventData,\n ContainerRegistryEventActor,\n ContainerRegistryEventRequest,\n ContainerRegistryEventSource,\n ContainerRegistryEventTarget,\n DeviceConnectionStateEvent,\n DeviceLifeCycleEvent,\n DeviceTelemetryEvent,\n MapsGeofenceGeometry,\n MediaJobOutput,\n MediaJobOutputAsset,\n DeviceTwin,\n DeviceTwinMetadata,\n AppServicePlanAction,\n KnownAppServicePlanAction,\n PolicyInsightsPolicyStateChangedEventData,\n PolicyInsightsPolicyStateCreatedEventData,\n PolicyInsightsPolicyStateDeletedEventData,\n StorageAsyncOperationInitiatedEventData,\n StorageBlobTierChangedEventData,\n StorageBlobInventoryPolicyCompletedEventData,\n RecordingChannelType,\n RecordingContentType,\n RecordingFormatType,\n ResourceAuthorization,\n ResourceHttpRequest,\n ContainerRegistryEventConnectedRegistry,\n StorageTaskQueuedEventData,\n StorageTaskCompletedEventData,\n DataBoxCopyStartedEventData,\n DataBoxCopyCompletedEventData,\n DataBoxOrderCompletedEventData,\n AcsIncomingCallEventData,\n AcsEmailDeliveryReportReceivedEventData,\n AcsEmailEngagementTrackingReportReceivedEventData,\n ApiManagementGatewayCreatedEventData,\n ApiManagementGatewayUpdatedEventData,\n ApiManagementGatewayDeletedEventData,\n ApiManagementGatewayHostnameConfigurationCreatedEventData,\n ApiManagementGatewayHostnameConfigurationUpdatedEventData,\n ApiManagementGatewayHostnameConfigurationDeletedEventData,\n ApiManagementGatewayCertificateAuthorityCreatedEventData,\n ApiManagementGatewayCertificateAuthorityUpdatedEventData,\n ApiManagementGatewayCertificateAuthorityDeletedEventData,\n ApiManagementGatewayApiAddedEventData,\n ApiManagementGatewayApiRemovedEventData,\n HealthcareDicomImageUpdatedEventData,\n AcsEmailDeliveryReportStatusDetails,\n AcsEmailDeliveryReportStatus,\n AcsUserEngagement,\n AcsIncomingCallCustomContext,\n DataBoxStageName,\n StorageTaskCompletedStatus,\n} from \"./generated/models\";\n"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAI1E,OAAO,EACL,wBAAwB,GAOzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,6BAA6B,GAE9B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAqD,MAAM,cAAc,CAAC;AA8OhG,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { AzureKeyCredential, AzureSASCredential } from \"@azure/core-auth\";\n\nexport { CloudEvent, EventGridEvent, SendCloudEventInput, SendEventGridEventInput } from \"./models\";\n\nexport {\n EventGridPublisherClient,\n EventGridPublisherClientOptions,\n SendOptions,\n CloudEventSendOptions,\n InputSchema,\n InputSchemaToInputTypeMap,\n InputSchemaToOptionsTypeMap,\n} from \"./eventGridClient\";\n\nexport {\n generateSharedAccessSignature,\n GenerateSharedAccessSignatureOptions,\n} from \"./generateSharedAccessSignature\";\n\nexport { EventGridDeserializer } from \"./consumer\";\n\nexport { isSystemEvent, KnownSystemEventTypes, SystemEventNameToEventData } from \"./predicates\";\n\nexport {\n AcsChatEventBase,\n AcsChatEventInThreadBase,\n AcsChatMessageEventInThreadBase,\n AcsChatMessageDeletedEventData,\n AcsChatMessageDeletedInThreadEventData,\n AcsChatMessageEditedEventData,\n AcsChatMessageEditedInThreadEventData,\n AcsChatMessageReceivedEventData,\n AcsChatMessageReceivedInThreadEventData,\n AcsChatMessageEventBase,\n AcsChatThreadCreatedWithUserEventData,\n AcsChatThreadPropertiesUpdatedPerUserEventData,\n AcsChatThreadWithUserDeletedEventData,\n AcsChatThreadEventBase,\n AcsChatParticipantAddedToThreadEventData,\n AcsChatParticipantAddedToThreadWithUserEventData,\n AcsChatParticipantRemovedFromThreadEventData,\n AcsChatParticipantRemovedFromThreadWithUserEventData,\n AcsRecordingFileStatusUpdatedEventData,\n AcsRecordingStorageInfo,\n AcsRecordingChunkInfo,\n ApiManagementApiCreatedEventData,\n ApiManagementApiDeletedEventData,\n ApiManagementApiReleaseCreatedEventData,\n ApiManagementApiReleaseDeletedEventData,\n ApiManagementApiReleaseUpdatedEventData,\n ApiManagementApiUpdatedEventData,\n ApiManagementProductCreatedEventData,\n ApiManagementProductDeletedEventData,\n ApiManagementProductUpdatedEventData,\n ApiManagementSubscriptionCreatedEventData,\n ApiManagementSubscriptionDeletedEventData,\n ApiManagementSubscriptionUpdatedEventData,\n ApiManagementUserCreatedEventData,\n ApiManagementUserDeletedEventData,\n ApiManagementUserUpdatedEventData,\n CommunicationIdentifierModel,\n CommunicationUserIdentifierModel,\n CommunicationCloudEnvironmentModel,\n MicrosoftTeamsUserIdentifierModel,\n PhoneNumberIdentifierModel,\n AcsChatThreadParticipant,\n AcsUserDisconnectedEventData,\n AcsSmsDeliveryAttempt,\n AcsSmsDeliveryReportReceivedEventData,\n AcsSmsEventBase,\n AcsSmsReceivedEventData,\n AppConfigurationKeyValueDeletedEventData,\n AppConfigurationKeyValueModifiedEventData,\n AppEventTypeDetail,\n AppServicePlanEventTypeDetail,\n ContainerRegistryArtifactEventTarget,\n ContainerRegistryEventData,\n ContainerRegistryImagePushedEventData,\n ContainerRegistryImageDeletedEventData,\n ContainerRegistryChartDeletedEventData,\n ContainerRegistryChartPushedEventData,\n ContainerServiceNewKubernetesVersionAvailableEventData,\n DeviceConnectionStateEventInfo,\n DeviceTwinInfo,\n DeviceTwinInfoProperties,\n DeviceTwinInfoX509Thumbprint,\n HealthcareDicomImageCreatedEventData,\n HealthcareDicomImageDeletedEventData,\n HealthcareFhirResourceCreatedEventData,\n HealthcareFhirResourceUpdatedEventData,\n HealthcareFhirResourceDeletedEventData,\n HealthcareFhirResourceType,\n IotHubDeviceCreatedEventData,\n IotHubDeviceDeletedEventData,\n IotHubDeviceConnectedEventData,\n IotHubDeviceDisconnectedEventData,\n IotHubDeviceTelemetryEventData,\n KeyVaultCertificateNewVersionCreatedEventData,\n KeyVaultCertificateNearExpiryEventData,\n KeyVaultCertificateExpiredEventData,\n KeyVaultKeyNewVersionCreatedEventData,\n KeyVaultKeyNearExpiryEventData,\n KeyVaultKeyExpiredEventData,\n KeyVaultSecretNewVersionCreatedEventData,\n KeyVaultSecretNearExpiryEventData,\n KeyVaultSecretExpiredEventData,\n KeyVaultAccessPolicyChangedEventData,\n SubscriptionValidationEventData,\n SubscriptionDeletedEventData,\n EventHubCaptureFileCreatedEventData,\n MachineLearningServicesDatasetDriftDetectedEventData,\n MachineLearningServicesModelDeployedEventData,\n MachineLearningServicesModelRegisteredEventData,\n MachineLearningServicesRunCompletedEventData,\n MachineLearningServicesRunStatusChangedEventData,\n MapsGeofenceEvent,\n MapsGeofenceEnteredEventData,\n MapsGeofenceExitedEventData,\n MapsGeofenceResultEventData,\n MediaJobStateChangeEventData,\n MediaJobOutputStateChangeEventData,\n MediaJobScheduledEventData,\n MediaJobProcessingEventData,\n MediaJobCancelingEventData,\n MediaJobFinishedEventData,\n MediaJobCanceledEventData,\n MediaJobError,\n MediaJobErrorCategory,\n MediaJobErrorDetail,\n MediaJobErrorCode,\n MediaJobRetry,\n MediaJobErroredEventData,\n MediaJobOutputCanceledEventData,\n MediaJobOutputCancelingEventData,\n MediaJobOutputErroredEventData,\n MediaJobOutputFinishedEventData,\n MediaJobOutputProcessingEventData,\n MediaJobOutputScheduledEventData,\n MediaJobOutputProgressEventData,\n MediaJobOutputUnion,\n MediaJobState,\n MediaLiveEventChannelArchiveHeartbeatEventData,\n MediaLiveEventEncoderConnectedEventData,\n MediaLiveEventConnectionRejectedEventData,\n MediaLiveEventEncoderDisconnectedEventData,\n MediaLiveEventIncomingStreamReceivedEventData,\n MediaLiveEventIncomingStreamsOutOfSyncEventData,\n MediaLiveEventIncomingVideoStreamsOutOfSyncEventData,\n MediaLiveEventIncomingDataChunkDroppedEventData,\n MediaLiveEventIngestHeartbeatEventData,\n MediaLiveEventTrackDiscontinuityDetectedEventData,\n ResourceWriteSuccessEventData,\n ResourceWriteFailureEventData,\n ResourceWriteCancelEventData,\n ResourceDeleteSuccessEventData,\n ResourceDeleteFailureEventData,\n ResourceDeleteCancelEventData,\n ResourceActionSuccessEventData,\n ResourceActionFailureEventData,\n ResourceActionCancelEventData,\n ServiceBusActiveMessagesAvailableWithNoListenersEventData,\n ServiceBusDeadletterMessagesAvailableWithNoListenersEventData,\n StorageBlobCreatedEventData,\n StorageBlobDeletedEventData,\n StorageBlobRenamedEventData,\n StorageDirectoryCreatedEventData,\n StorageDirectoryDeletedEventData,\n StorageDirectoryRenamedEventData,\n StorageLifecyclePolicyActionSummaryDetail,\n StorageLifecyclePolicyCompletedEventData,\n WebAppUpdatedEventData,\n WebBackupOperationStartedEventData,\n WebBackupOperationCompletedEventData,\n WebBackupOperationFailedEventData,\n WebRestoreOperationStartedEventData,\n WebRestoreOperationCompletedEventData,\n WebRestoreOperationFailedEventData,\n WebSlotSwapStartedEventData,\n WebSlotSwapCompletedEventData,\n WebSlotSwapFailedEventData,\n WebSlotSwapWithPreviewStartedEventData,\n WebSlotSwapWithPreviewCancelledEventData,\n WebAppServicePlanUpdatedEventData,\n WebAppServicePlanUpdatedEventDataSku,\n AppAction,\n KnownAppAction,\n StampKind,\n KnownStampKind,\n AsyncStatus,\n KnownAsyncStatus,\n ContainerRegistryArtifactEventData,\n ContainerRegistryEventActor,\n ContainerRegistryEventRequest,\n ContainerRegistryEventSource,\n ContainerRegistryEventTarget,\n DeviceConnectionStateEvent,\n DeviceLifeCycleEvent,\n DeviceTelemetryEvent,\n MapsGeofenceGeometry,\n MediaJobOutput,\n MediaJobOutputAsset,\n DeviceTwin,\n DeviceTwinMetadata,\n AppServicePlanAction,\n KnownAppServicePlanAction,\n PolicyInsightsPolicyStateChangedEventData,\n PolicyInsightsPolicyStateCreatedEventData,\n PolicyInsightsPolicyStateDeletedEventData,\n StorageAsyncOperationInitiatedEventData,\n StorageBlobTierChangedEventData,\n StorageBlobInventoryPolicyCompletedEventData,\n RecordingChannelType,\n RecordingContentType,\n RecordingFormatType,\n ResourceAuthorization,\n ResourceHttpRequest,\n ContainerRegistryEventConnectedRegistry,\n StorageTaskQueuedEventData,\n StorageTaskCompletedEventData,\n DataBoxCopyStartedEventData,\n DataBoxCopyCompletedEventData,\n DataBoxOrderCompletedEventData,\n AcsIncomingCallEventData,\n AcsEmailDeliveryReportReceivedEventData,\n AcsEmailEngagementTrackingReportReceivedEventData,\n ApiManagementGatewayCreatedEventData,\n ApiManagementGatewayUpdatedEventData,\n ApiManagementGatewayDeletedEventData,\n ApiManagementGatewayHostnameConfigurationCreatedEventData,\n ApiManagementGatewayHostnameConfigurationUpdatedEventData,\n ApiManagementGatewayHostnameConfigurationDeletedEventData,\n ApiManagementGatewayCertificateAuthorityCreatedEventData,\n ApiManagementGatewayCertificateAuthorityUpdatedEventData,\n ApiManagementGatewayCertificateAuthorityDeletedEventData,\n ApiManagementGatewayApiAddedEventData,\n ApiManagementGatewayApiRemovedEventData,\n HealthcareDicomImageUpdatedEventData,\n AcsEmailDeliveryReportStatusDetails,\n AcsEmailDeliveryReportStatus,\n AcsUserEngagement,\n AcsIncomingCallCustomContext,\n DataBoxStageName,\n StorageTaskCompletedStatus,\n} from \"./generated/models\";\n\nexport {\n ReceiveResult,\n ReceiveDetails,\n BrokerProperties,\n AcknowledgeOptions,\n AcknowledgeResult,\n FailedLockToken,\n ReleaseOptions,\n ReleaseResult,\n RejectOptions,\n RejectResult,\n PublishResultOutput,\n} from \"./cadl-generated/api/models\";\n\nexport { EventGridClient } from \"./eventGridClientV2\";\n\nexport { ClientOptions, RequestOptions } from \"./cadl-generated/common/interfaces\";\n\nexport {\n PublishCloudEventOptions,\n PublishCloudEventsOptions,\n ReceiveCloudEventsOptions,\n AcknowledgeCloudEventsOptions,\n ReleaseCloudEventsOptions,\n RejectCloudEventsOptions,\n} from \"./cadl-generated/api/operations\";\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAgKlC;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,aAAa;IACb,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,iBAAiB;IACjB,YAAY;IACZ,SAAS;IACT,MAAM;IACN,MAAM;CACP,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * The shape of the input for EventGridProducerClient#sendEventGridEvents\n */\nexport interface SendEventGridEventInput<T> {\n /**\n * The type of the event.\n */\n eventType: string;\n /**\n * The time the event was generated. If not provided, the current time will be used.\n */\n eventTime?: Date;\n /**\n * An unique identifier for the event. If an ID is not provided, a random UUID will be generated\n * and used.\n */\n id?: string;\n /**\n * The resource path of the event source.\n */\n topic?: string;\n /**\n * A resource path relative to the topic path.\n */\n subject: string;\n /**\n * The schema version of the data object.\n */\n dataVersion: string;\n /**\n * Event data specific to the event type.\n */\n data: T;\n}\n\n/**\n * An event in the in the Event Grid Schema.\n */\nexport interface EventGridEvent<T> {\n /**\n * The type of the event.\n */\n eventType: string;\n /**\n * The time the event was generated.\n */\n eventTime: Date;\n /**\n * An unique identifier for the event.\n */\n id: string;\n /**\n * The resource path of the event source.\n */\n topic?: string;\n /**\n * A resource path relative to the topic path.\n */\n subject: string;\n /**\n * The schema version of the data object.\n */\n dataVersion: string;\n /**\n * Event data specific to the event type.\n */\n data: T;\n}\n\n/**\n * * The shape of the input for EventGridProducerClient#sendCloudEvents\n */\nexport interface SendCloudEventInput<T> {\n /**\n * Type of event related to the originating occurrence.\n */\n type: string;\n /**\n * Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event.\n */\n source: string;\n /**\n * An identifier for the event. The combination of id and source must be unique for each distinct event. If an ID is not provided,\n * a random UUID will be generated and used.\n */\n id?: string;\n /**\n * The time the event was generated. If not provided, the current time will be used.\n */\n time?: Date;\n /**\n * Identifies the schema that data adheres to.\n */\n dataschema?: string;\n /**\n * Content type of data value.\n */\n datacontenttype?: string;\n /**\n * Event data specific to the event type.\n */\n data?: T;\n /**\n * This describes the subject of the event in the context of the event producer (identified by source).\n */\n subject?: string;\n /**\n * Additional context attributes for the event. The Cloud Event specification refers to these as \"extension attributes\".\n */\n extensionAttributes?: Record<string, unknown>;\n}\n\n/**\n * An event in the Cloud Event 1.0 schema.\n */\nexport interface CloudEvent<T> {\n /**\n * Type of event related to the originating occurrence.\n */\n type: string;\n /**\n * Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event.\n */\n source: string;\n /**\n * An identifier for the event. The combination of id and source must be unique for each distinct event.\n */\n id: string;\n /**\n * The time the event was generated.\n */\n time?: Date;\n /**\n * Identifies the schema that data adheres to.\n */\n dataschema?: string;\n /**\n * Content type of data value.\n */\n datacontenttype?: string;\n /**\n * Event data specific to the event type.\n */\n data?: T;\n /**\n * This describes the subject of the event in the context of the event producer (identified by source).\n */\n subject?: string;\n /**\n * Additional context attributes for the event. The Cloud Event specification refers to these as \"extension attributes\".\n */\n extensionAttributes?: Record<string, unknown>;\n /**\n * The version of the CloudEvents specification which the event uses.\n */\n specversion?: string | \"1.0\";\n}\n\n/**\n * Property names defined by the CloudEvents 1.0 specification, these may not be reused as the names of extension properties.\n */\nexport const cloudEventReservedPropertyNames = [\n \"specversion\",\n \"id\",\n \"source\",\n \"type\",\n \"datacontenttype\",\n \"dataschema\",\n \"subject\",\n \"time\",\n \"data\",\n];\n\n/**\n * A function which provides custom logic to be used when decoding events.\n */\nexport type CustomEventDataDeserializer = (o: any) => Promise<any>;\n"]}
|
package/dist-esm/src/tracing.js
CHANGED
@@ -8,6 +8,6 @@ import { createTracingClient } from "@azure/core-tracing";
|
|
8
8
|
export const tracingClient = createTracingClient({
|
9
9
|
namespace: "Microsoft.Messaging.EventGrid",
|
10
10
|
packageName: "@azure/event-grid",
|
11
|
-
packageVersion: "4.
|
11
|
+
packageVersion: "4.13.0-beta.1",
|
12
12
|
});
|
13
13
|
//# sourceMappingURL=tracing.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,+BAA+B;IAC1C,WAAW,EAAE,mBAAmB;IAChC,cAAc,EAAE,
|
1
|
+
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,+BAA+B;IAC1C,WAAW,EAAE,mBAAmB;IAChC,cAAc,EAAE,eAAe;CAChC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\n/**\n * A tracing client to handle spans.\n * @internal\n */\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Messaging.EventGrid\",\n packageName: \"@azure/event-grid\",\n packageVersion: \"4.13.0-beta.1\",\n});\n"]}
|
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"sdk-type": "client",
|
4
4
|
"author": "Microsoft Corporation",
|
5
5
|
"description": "An isomorphic client library for the Azure Event Grid service.",
|
6
|
-
"version": "4.
|
6
|
+
"version": "4.13.0-beta.1",
|
7
7
|
"keywords": [
|
8
8
|
"node",
|
9
9
|
"azure",
|
@@ -93,7 +93,8 @@
|
|
93
93
|
"dependencies": {
|
94
94
|
"@azure/core-auth": "^1.3.0",
|
95
95
|
"@azure/core-client": "^1.5.0",
|
96
|
-
"@azure/core-rest-pipeline": "^1.1.
|
96
|
+
"@azure/core-rest-pipeline": "^1.1.3",
|
97
|
+
"@azure-rest/core-client": "^1.1.3",
|
97
98
|
"@azure/core-tracing": "^1.0.0",
|
98
99
|
"@azure/logger": "^1.0.0",
|
99
100
|
"tslib": "^2.2.0",
|
package/types/eventgrid.d.ts
CHANGED
@@ -1,11 +1,33 @@
|
|
1
1
|
import { AzureKeyCredential } from '@azure/core-auth';
|
2
2
|
import { AzureSASCredential } from '@azure/core-auth';
|
3
|
+
import { ClientOptions as ClientOptions_2 } from '@azure-rest/core-client';
|
3
4
|
import { CommonClientOptions } from '@azure/core-client';
|
5
|
+
import { HttpResponse } from '@azure-rest/core-client';
|
4
6
|
import { KeyCredential } from '@azure/core-auth';
|
5
7
|
import { OperationOptions } from '@azure/core-client';
|
8
|
+
import { RawHttpHeadersInput } from '@azure/core-rest-pipeline';
|
6
9
|
import { SASCredential } from '@azure/core-auth';
|
7
10
|
import { TokenCredential } from '@azure/core-auth';
|
8
11
|
|
12
|
+
export declare interface AcknowledgeCloudEventsOptions extends RequestOptions {
|
13
|
+
/** content type */
|
14
|
+
contentType?: string;
|
15
|
+
}
|
16
|
+
|
17
|
+
/** Array of lock token strings for the corresponding received Cloud Events to be acknowledged. */
|
18
|
+
export declare interface AcknowledgeOptions {
|
19
|
+
/** String array of lock tokens. */
|
20
|
+
lockTokens: string[];
|
21
|
+
}
|
22
|
+
|
23
|
+
/** The result of the Acknowledge operation. */
|
24
|
+
export declare interface AcknowledgeResult {
|
25
|
+
/** Array of LockToken values for failed cloud events. Each LockToken includes the lock token value along with the related error information (namely, the error code and description). */
|
26
|
+
failedLockTokens: FailedLockToken[];
|
27
|
+
/** Array of lock tokens values for the successfully acknowledged cloud events. */
|
28
|
+
succeededLockTokens: string[];
|
29
|
+
}
|
30
|
+
|
9
31
|
/** Schema of common properties of all chat events */
|
10
32
|
export declare interface AcsChatEventBase {
|
11
33
|
/** The communication identifier of the target user */
|
@@ -618,6 +640,17 @@ export { AzureKeyCredential }
|
|
618
640
|
|
619
641
|
export { AzureSASCredential }
|
620
642
|
|
643
|
+
/** Properties of the Event Broker operation. */
|
644
|
+
export declare interface BrokerProperties {
|
645
|
+
/** The token used to lock the event. */
|
646
|
+
lockToken: string;
|
647
|
+
/** The attempt count for delivering the event. */
|
648
|
+
deliveryCount: number;
|
649
|
+
}
|
650
|
+
|
651
|
+
export declare interface ClientOptions extends ClientOptions_2 {
|
652
|
+
}
|
653
|
+
|
621
654
|
/**
|
622
655
|
* An event in the Cloud Event 1.0 schema.
|
623
656
|
*/
|
@@ -658,6 +691,10 @@ export declare interface CloudEvent<T> {
|
|
658
691
|
* Additional context attributes for the event. The Cloud Event specification refers to these as "extension attributes".
|
659
692
|
*/
|
660
693
|
extensionAttributes?: Record<string, unknown>;
|
694
|
+
/**
|
695
|
+
* The version of the CloudEvents specification which the event uses.
|
696
|
+
*/
|
697
|
+
specversion?: string | "1.0";
|
661
698
|
}
|
662
699
|
|
663
700
|
/**
|
@@ -970,6 +1007,85 @@ export declare interface DeviceTwinMetadata {
|
|
970
1007
|
lastUpdated: string;
|
971
1008
|
}
|
972
1009
|
|
1010
|
+
/**
|
1011
|
+
* Event Grid Client
|
1012
|
+
*/
|
1013
|
+
export declare class EventGridClient {
|
1014
|
+
private _client;
|
1015
|
+
/** Azure Messaging EventGrid Client */
|
1016
|
+
constructor(endpoint: string, credential: AzureKeyCredential, options?: ClientOptions);
|
1017
|
+
/**
|
1018
|
+
* Publish Single Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200
|
1019
|
+
* status code with an empty JSON object in response. Otherwise, the server can return various error codes.
|
1020
|
+
* For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message
|
1021
|
+
* is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for
|
1022
|
+
* internal server error.
|
1023
|
+
*
|
1024
|
+
* @param event - Event to publish
|
1025
|
+
* @param topicName - Topic to publish the event
|
1026
|
+
* @param options - Options to publish
|
1027
|
+
*
|
1028
|
+
*/
|
1029
|
+
publishCloudEvent<T>(event: CloudEvent<T>, topicName: string, options?: PublishCloudEventOptions): Promise<PublishResultOutput>;
|
1030
|
+
/**
|
1031
|
+
* Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200
|
1032
|
+
* status code with an empty JSON object in response. Otherwise, the server can return various error codes.
|
1033
|
+
* For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message
|
1034
|
+
* is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for
|
1035
|
+
* internal server error.
|
1036
|
+
*
|
1037
|
+
* @param events - Events to publish
|
1038
|
+
* @param topicName - Topic to publish the event
|
1039
|
+
* @param options - Options to publish
|
1040
|
+
*
|
1041
|
+
*/
|
1042
|
+
publishCloudEvents<T>(events: CloudEvent<T>[], topicName: string, options?: PublishCloudEventsOptions): Promise<PublishResultOutput>;
|
1043
|
+
/**
|
1044
|
+
* Receive Batch of Cloud Events from the Event Subscription.
|
1045
|
+
*
|
1046
|
+
* @param topicName - Topic to receive
|
1047
|
+
* @param eventSubscriptionName - Name of the Event Subscription
|
1048
|
+
* @param options - Options to receive
|
1049
|
+
*
|
1050
|
+
*/
|
1051
|
+
receiveCloudEvents<T>(topicName: string, eventSubscriptionName: string, options?: ReceiveCloudEventsOptions): Promise<ReceiveResult<T>>;
|
1052
|
+
/**
|
1053
|
+
* Acknowledge batch of Cloud Events. The server responds with an HTTP 200 status code if at least one
|
1054
|
+
* event is successfully acknowledged. The response body will include the set of successfully acknowledged
|
1055
|
+
* lockTokens, along with other failed lockTokens with their corresponding error information. Successfully
|
1056
|
+
* acknowledged events will no longer be available to any consumer.
|
1057
|
+
*
|
1058
|
+
* @param lockTokens - Lock Tokens
|
1059
|
+
* @param topicName - Topic Name
|
1060
|
+
* @param eventSubscriptionName - Name of the Event Subscription
|
1061
|
+
* @param options - Options to Acknowledge
|
1062
|
+
*
|
1063
|
+
*/
|
1064
|
+
acknowledgeCloudEvents(lockTokens: string[], topicName: string, eventSubscriptionName: string, options?: AcknowledgeCloudEventsOptions): Promise<AcknowledgeResult>;
|
1065
|
+
/**
|
1066
|
+
* Release batch of Cloud Events. The server responds with an HTTP 200 status code if at least one event is
|
1067
|
+
* successfully released. The response body will include the set of successfully released lockTokens, along
|
1068
|
+
* with other failed lockTokens with their corresponding error information.
|
1069
|
+
*
|
1070
|
+
* @param lockTokens - Lock Tokens
|
1071
|
+
* @param topicName - Topic Name
|
1072
|
+
* @param eventSubscriptionName - Name of the Event Subscription
|
1073
|
+
* @param options - Options to release
|
1074
|
+
*
|
1075
|
+
*/
|
1076
|
+
releaseCloudEvents(lockTokens: string[], topicName: string, eventSubscriptionName: string, options?: ReleaseCloudEventsOptions): Promise<ReleaseResult>;
|
1077
|
+
/**
|
1078
|
+
* Reject batch of Cloud Events.
|
1079
|
+
*
|
1080
|
+
* @param lockTokens - Lock Tokens
|
1081
|
+
* @param topicName - Topic Name
|
1082
|
+
* @param eventSubscriptionName - Name of the Event Subscription
|
1083
|
+
* @param options - Options to reject
|
1084
|
+
*
|
1085
|
+
*/
|
1086
|
+
rejectCloudEvents(lockTokens: string[], topicName: string, eventSubscriptionName: string, options?: RejectCloudEventsOptions): Promise<RejectResult>;
|
1087
|
+
}
|
1088
|
+
|
973
1089
|
/**
|
974
1090
|
* EventGridDeserializer is used to aid in processing events delivered by EventGrid. It can deserialize a JSON encoded payload
|
975
1091
|
* of either a single event or batch of events as well as be used to convert the result of `JSON.parse` into an
|
@@ -1120,6 +1236,16 @@ export declare interface EventHubCaptureFileCreatedEventData {
|
|
1120
1236
|
lastEnqueueTime: string;
|
1121
1237
|
}
|
1122
1238
|
|
1239
|
+
/** Failed LockToken information. */
|
1240
|
+
export declare interface FailedLockToken {
|
1241
|
+
/** LockToken value */
|
1242
|
+
lockToken: string;
|
1243
|
+
/** Error code related to the token. Example of such error codes are BadToken: which indicates the Token is not formatted correctly, TokenLost: which indicates that token is not found, and InternalServerError: For any internal server errors. */
|
1244
|
+
errorCode: string;
|
1245
|
+
/** Description of the token error. */
|
1246
|
+
errorDescription: string;
|
1247
|
+
}
|
1248
|
+
|
1123
1249
|
/**
|
1124
1250
|
* Generate a shared access signature, which allows a client to send events to an Event Grid Topic or Domain for a limited period of time. This
|
1125
1251
|
* function may only be called when the EventGridPublisherClient was constructed with a KeyCredential instance.
|
@@ -2417,6 +2543,41 @@ export declare interface PolicyInsightsPolicyStateDeletedEventData {
|
|
2417
2543
|
complianceReasonCode: string;
|
2418
2544
|
}
|
2419
2545
|
|
2546
|
+
export declare interface PublishCloudEventOptions extends RequestOptions {
|
2547
|
+
/** content type */
|
2548
|
+
contentType?: string;
|
2549
|
+
}
|
2550
|
+
|
2551
|
+
export declare interface PublishCloudEventsOptions extends RequestOptions {
|
2552
|
+
/** content type */
|
2553
|
+
contentType?: string;
|
2554
|
+
}
|
2555
|
+
|
2556
|
+
/** The result of the Publish operation. */
|
2557
|
+
export declare interface PublishResultOutput {
|
2558
|
+
}
|
2559
|
+
|
2560
|
+
export declare interface ReceiveCloudEventsOptions extends RequestOptions {
|
2561
|
+
/** Max Events count to be received. Minimum value is 1, while maximum value is 100 events. If not specified, the default value is 1. */
|
2562
|
+
maxEvents?: number;
|
2563
|
+
/** Max wait time value for receive operation in Seconds. It is the time in seconds that the server approximately waits for the availability of an event and responds to the request. If an event is available, the broker responds immediately to the client. Minimum value is 10 seconds, while maximum value is 120 seconds. If not specified, the default value is 60 seconds. */
|
2564
|
+
maxWaitTime?: number;
|
2565
|
+
}
|
2566
|
+
|
2567
|
+
/** Receive operation details per Cloud Event. */
|
2568
|
+
export declare interface ReceiveDetails<T> {
|
2569
|
+
/** The Event Broker details. */
|
2570
|
+
brokerProperties: BrokerProperties;
|
2571
|
+
/** Cloud Event details. */
|
2572
|
+
event: CloudEvent<T>;
|
2573
|
+
}
|
2574
|
+
|
2575
|
+
/** Details of the Receive operation response. */
|
2576
|
+
export declare interface ReceiveResult<T> {
|
2577
|
+
/** Array of receive responses, one per cloud event. */
|
2578
|
+
value: ReceiveDetails<T>[];
|
2579
|
+
}
|
2580
|
+
|
2420
2581
|
/**
|
2421
2582
|
* Defines values for RecordingChannelType. \
|
2422
2583
|
* {@link KnownRecordingChannelType} can be used interchangeably with RecordingChannelType,
|
@@ -2448,6 +2609,61 @@ export declare type RecordingContentType = string;
|
|
2448
2609
|
*/
|
2449
2610
|
export declare type RecordingFormatType = string;
|
2450
2611
|
|
2612
|
+
export declare interface RejectCloudEventsOptions extends RequestOptions {
|
2613
|
+
/** content type */
|
2614
|
+
contentType?: string;
|
2615
|
+
}
|
2616
|
+
|
2617
|
+
/** Array of lock token strings for the corresponding received Cloud Events to be rejected. */
|
2618
|
+
export declare interface RejectOptions {
|
2619
|
+
/** String array of lock tokens. */
|
2620
|
+
lockTokens: string[];
|
2621
|
+
}
|
2622
|
+
|
2623
|
+
/** The result of the Reject operation. */
|
2624
|
+
export declare interface RejectResult {
|
2625
|
+
/** Array of LockToken values for failed cloud events. Each LockToken includes the lock token value along with the related error information (namely, the error code and description). */
|
2626
|
+
failedLockTokens: FailedLockToken[];
|
2627
|
+
/** Array of lock tokens values for the successfully rejected cloud events. */
|
2628
|
+
succeededLockTokens: string[];
|
2629
|
+
}
|
2630
|
+
|
2631
|
+
export declare interface ReleaseCloudEventsOptions extends RequestOptions {
|
2632
|
+
/** content type */
|
2633
|
+
contentType?: string;
|
2634
|
+
}
|
2635
|
+
|
2636
|
+
/** Array of lock token strings for the corresponding received Cloud Events to be released. */
|
2637
|
+
export declare interface ReleaseOptions {
|
2638
|
+
/** String array of lock tokens. */
|
2639
|
+
lockTokens: string[];
|
2640
|
+
}
|
2641
|
+
|
2642
|
+
/** The result of the Release operation. */
|
2643
|
+
export declare interface ReleaseResult {
|
2644
|
+
/** Array of LockToken values for failed cloud events. Each LockToken includes the lock token value along with the related error information (namely, the error code and description). */
|
2645
|
+
failedLockTokens: FailedLockToken[];
|
2646
|
+
/** Array of lock tokens values for the successfully released cloud events. */
|
2647
|
+
succeededLockTokens: string[];
|
2648
|
+
}
|
2649
|
+
|
2650
|
+
export declare interface RequestOptions {
|
2651
|
+
requestOptions?: {
|
2652
|
+
/**
|
2653
|
+
* Headers to send along with the request
|
2654
|
+
*/
|
2655
|
+
headers?: RawHttpHeadersInput;
|
2656
|
+
/** Set to true if the request is sent over HTTP instead of HTTPS */
|
2657
|
+
allowInsecureConnection?: boolean;
|
2658
|
+
/** Set to true if you want to skip encoding the path parameters */
|
2659
|
+
skipUrlEncoding?: boolean;
|
2660
|
+
/**
|
2661
|
+
* Callback to access the raw response object when the response is received
|
2662
|
+
*/
|
2663
|
+
onResponse?: (response: HttpResponse) => void;
|
2664
|
+
};
|
2665
|
+
}
|
2666
|
+
|
2451
2667
|
/** Schema of the Data property of an EventGridEvent for a Microsoft.Resources.ResourceActionCancel event. This is raised when a resource action operation is canceled. */
|
2452
2668
|
export declare interface ResourceActionCancelEventData {
|
2453
2669
|
/** The tenant ID of the resource. */
|