New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@azure/eventgrid

Package Overview
Dependencies
Maintainers
5
Versions
368
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/eventgrid - npm Package Compare versions

Comparing version 5.10.0-alpha.20250131.1 to 5.10.0-alpha.20250203.1

8

dist/browser/eventGridClient.d.ts

@@ -85,9 +85,9 @@ import type { KeyCredential, SASCredential } from "@azure/core-auth";

* Example usage:
* ```ts
* ```ts snippet:ReadmeSampleCreateClient_KeyCredential
* import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
*
* const client = new EventGridPublisherClient(
* "<service endpoint>",
* "EventGrid",
* new AzureKeyCredential("<api key>")
* "<endpoint>",
* "EventGrid",
* new AzureKeyCredential("<Access Key>"),
* );

@@ -94,0 +94,0 @@ * ```

@@ -21,9 +21,9 @@ // Copyright (c) Microsoft Corporation.

* Example usage:
* ```ts
* ```ts snippet:ReadmeSampleCreateClient_KeyCredential
* import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
*
* const client = new EventGridPublisherClient(
* "<service endpoint>",
* "EventGrid",
* new AzureKeyCredential("<api key>")
* "<endpoint>",
* "EventGrid",
* new AzureKeyCredential("<Access Key>"),
* );

@@ -30,0 +30,0 @@ * ```

@@ -85,9 +85,9 @@ import type { KeyCredential, SASCredential } from "@azure/core-auth";

* Example usage:
* ```ts
* ```ts snippet:ReadmeSampleCreateClient_KeyCredential
* import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
*
* const client = new EventGridPublisherClient(
* "<service endpoint>",
* "EventGrid",
* new AzureKeyCredential("<api key>")
* "<endpoint>",
* "EventGrid",
* new AzureKeyCredential("<Access Key>"),
* );

@@ -94,0 +94,0 @@ * ```

@@ -26,9 +26,9 @@ "use strict";

* Example usage:
* ```ts
* ```ts snippet:ReadmeSampleCreateClient_KeyCredential
* import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
*
* const client = new EventGridPublisherClient(
* "<service endpoint>",
* "EventGrid",
* new AzureKeyCredential("<api key>")
* "<endpoint>",
* "EventGrid",
* new AzureKeyCredential("<Access Key>"),
* );

@@ -35,0 +35,0 @@ * ```

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.49.1"
"packageVersion": "7.49.2"
}
]
}

@@ -85,9 +85,9 @@ import type { KeyCredential, SASCredential } from "@azure/core-auth";

* Example usage:
* ```ts
* ```ts snippet:ReadmeSampleCreateClient_KeyCredential
* import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
*
* const client = new EventGridPublisherClient(
* "<service endpoint>",
* "EventGrid",
* new AzureKeyCredential("<api key>")
* "<endpoint>",
* "EventGrid",
* new AzureKeyCredential("<Access Key>"),
* );

@@ -94,0 +94,0 @@ * ```

@@ -21,9 +21,9 @@ // Copyright (c) Microsoft Corporation.

* Example usage:
* ```ts
* ```ts snippet:ReadmeSampleCreateClient_KeyCredential
* import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
*
* const client = new EventGridPublisherClient(
* "<service endpoint>",
* "EventGrid",
* new AzureKeyCredential("<api key>")
* "<endpoint>",
* "EventGrid",
* new AzureKeyCredential("<Access Key>"),
* );

@@ -30,0 +30,0 @@ * ```

@@ -85,9 +85,9 @@ import type { KeyCredential, SASCredential } from "@azure/core-auth";

* Example usage:
* ```ts
* ```ts snippet:ReadmeSampleCreateClient_KeyCredential
* import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
*
* const client = new EventGridPublisherClient(
* "<service endpoint>",
* "EventGrid",
* new AzureKeyCredential("<api key>")
* "<endpoint>",
* "EventGrid",
* new AzureKeyCredential("<Access Key>"),
* );

@@ -94,0 +94,0 @@ * ```

@@ -21,9 +21,9 @@ // Copyright (c) Microsoft Corporation.

* Example usage:
* ```ts
* ```ts snippet:ReadmeSampleCreateClient_KeyCredential
* import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
*
* const client = new EventGridPublisherClient(
* "<service endpoint>",
* "EventGrid",
* new AzureKeyCredential("<api key>")
* "<endpoint>",
* "EventGrid",
* new AzureKeyCredential("<Access Key>"),
* );

@@ -30,0 +30,0 @@ * ```

@@ -6,3 +6,3 @@ {

"description": "An isomorphic client library for the Azure Event Grid service.",
"version": "5.10.0-alpha.20250131.1",
"version": "5.10.0-alpha.20250203.1",
"keywords": [

@@ -84,3 +84,3 @@ "node",

"unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
"update-snippets": "dev-tool run update-snippets"
},

@@ -92,3 +92,3 @@ "sideEffects": false,

"@azure/core-client": "^1.9.2",
"@azure/core-rest-pipeline": "^1.18.0",
"@azure/core-rest-pipeline": "^1.18.2",
"@azure/core-tracing": "^1.2.0",

@@ -105,2 +105,3 @@ "@azure/core-util": "^1.11.0",

"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
"@azure/identity": "^4.6.0",
"@azure/service-bus": "^7.9.5",

@@ -112,3 +113,3 @@ "@types/node": "^18.0.0",

"eslint": "^9.9.0",
"playwright": "^1.49.0",
"playwright": "^1.50.1",
"typescript": "~5.7.2",

@@ -119,2 +120,3 @@ "vitest": "^3.0.3"

"tshy": {
"project": "./tsconfig.src.json",
"exports": {

@@ -132,4 +134,3 @@ "./package.json": "./package.json",

],
"selfLink": false,
"project": "./tsconfig.src.json"
"selfLink": false
},

@@ -156,3 +157,4 @@ "exports": {

}
}
},
"react-native": "./dist/react-native/index.js"
}

@@ -75,8 +75,8 @@ # Azure Event Grid client library for JavaScript

```js
const { EventGridPublisherClient, AzureKeyCredential } = require("@azure/eventgrid");
```ts snippet:ReadmeSampleCreateClient_KeyCredential
import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
const client = new EventGridPublisherClient(
"<endpoint>",
"<endpoint schema>",
"EventGrid",
new AzureKeyCredential("<Access Key>"),

@@ -90,8 +90,8 @@ );

```js
const { EventGridPublisherClient, AzureSASCredential } = require("@azure/eventgrid");
```ts snippet:ReadmeSampleCreateClient_SASCredential
import { EventGridPublisherClient, AzureSASCredential } from "@azure/eventgrid";
const client = new EventGridPublisherClient(
"<endpoint>",
"<endpoint schema>",
"EventGrid",
new AzureSASCredential("<SAS Token>"),

@@ -103,4 +103,4 @@ );

```js
const { generateSharedAccessSignature, AzureKeyCredential } = require("@azure/eventgrid");
```ts snippet:ReadmeSample_GenerateSasToken
import { generateSharedAccessSignature, AzureKeyCredential } from "@azure/eventgrid";

@@ -125,9 +125,9 @@ // Create a SAS Token which expires on 2020-01-01 at Midnight.

```js
const { EventGridPublisherClient } = require("@azure/eventgrid");
const { DefaultAzureCredential } = require("@azure/identity");
```ts snippet:ReadmeSampleCreateClient_TokenCredential
import { EventGridPublisherClient } from "@azure/eventgrid";
import { DefaultAzureCredential } from "@azure/identity";
const client = new EventGridPublisherClient(
"<endpoint>",
"<endpoint schema>",
"CloudEvent",
new DefaultAzureCredential(),

@@ -149,3 +149,5 @@ );

```js
```ts snippet:ReadmeSampleCreateClient_EventGrid
import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
const client = new EventGridPublisherClient(

@@ -160,3 +162,5 @@ "<endpoint>",

```js
```ts snippet:ReadmeSampleCreateClient_CloudEvent
import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
const client = new EventGridPublisherClient(

@@ -171,3 +175,5 @@ "<endpoint>",

```js
```ts snippet:ReadmeSampleCreateClient_Custom
import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";
const client = new EventGridPublisherClient(

@@ -213,4 +219,4 @@ "<endpoint>",

```js
const { EventGridPublisherClient, AzureKeyCredential } = require("@azure/eventgrid");
```ts snippet:ReadmeSample_PublishCustomEvent
import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";

@@ -239,4 +245,4 @@ const client = new EventGridPublisherClient(

```js
const { EventGridPublisherClient, AzureKeyCredential } = require("@azure/eventgrid");
```ts snippet:ReadmeSample_PublishCustomEventToDomain
import { EventGridPublisherClient, AzureKeyCredential } from "@azure/eventgrid";

@@ -266,32 +272,27 @@ const client = new EventGridPublisherClient(

```js
const { EventGridDeserializer, isSystemEvent } = require("@azure/eventgrid");
```ts snippet:ReadmeSample_DeserializeEvent
import { EventGridDeserializer, isSystemEvent } from "@azure/eventgrid";
async function main() {
const deserializer = new EventGridDeserializer();
const message = {
id: "5bc888aa-c2f4-11ea-b3de-0242ac130004",
source:
"/subscriptions/<subscriptionid>/resourceGroups/dummy-rg/providers/Microsoft.EventGrid/topics/dummy-topic",
specversion: "1.0",
type: "Microsoft.ContainerRegistry.ImagePushed",
subject: "Test Subject",
time: "2020-07-10T21:27:12.925Z",
data: {
hello: "world",
},
};
const deserializedMessage = await deserializer.deserializeCloudEvents(message);
console.log(deserializedMessage);
if (
deserializedMessage != null &&
deserializedMessage.length !== 0 &&
isSystemEvent("Microsoft.ContainerRegistry.ImagePushed", deserializedMessage[0])
) {
console.log("This is a Microsoft.ContainerRegistry.ImagePushed event");
}
const deserializer = new EventGridDeserializer();
const message = {
id: "5bc888aa-c2f4-11ea-b3de-0242ac130004",
source:
"/subscriptions/<subscriptionid>/resourceGroups/dummy-rg/providers/Microsoft.EventGrid/topics/dummy-topic",
specversion: "1.0",
type: "Microsoft.ContainerRegistry.ImagePushed",
subject: "Test Subject",
time: "2020-07-10T21:27:12.925Z",
data: {
hello: "world",
},
};
const deserializedMessage = await deserializer.deserializeCloudEvents(message);
console.log(deserializedMessage);
if (
deserializedMessage != null &&
deserializedMessage.length !== 0 &&
isSystemEvent("Microsoft.ContainerRegistry.ImagePushed", deserializedMessage[0])
) {
console.log("This is a Microsoft.ContainerRegistry.ImagePushed event");
}
main();
```

@@ -305,4 +306,4 @@

```javascript
const { setLogLevel } = require("@azure/logger");
```ts snippet:SetLogLevel
import { setLogLevel } from "@azure/logger";

@@ -309,0 +310,0 @@ setLogLevel("info");

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc