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

inngest

Package Overview
Dependencies
Maintainers
1
Versions
680
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inngest - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

5

dist/index.d.ts

@@ -76,8 +76,9 @@ /**

constructor(apiKey: string, { inngestApiUrl }?: InngestClientOptions);
private getResponseError;
/**
* Send an event to Inngest
* Send event(s) to Inngest
*/
send(payload: EventPayload): Promise<boolean>;
send(payload: EventPayload | EventPayload[]): Promise<boolean>;
}
export { Inngest };
//# sourceMappingURL=index.d.ts.map

21

dist/index.js

@@ -29,10 +29,3 @@ "use strict";

}
/**
* Send an event to Inngest
*/
async send(payload) {
const response = await axios_1.default.post(this.inngestApiUrl, payload, this.axiosConfig);
if (response.status >= 200 && response.status < 300) {
return true;
}
getResponseError(response) {
let errorMessage = "Unknown error";

@@ -66,6 +59,16 @@ switch (response.status) {

}
throw new Error(`Inngest API Error: ${response.status} ${errorMessage}`);
return new Error(`Inngest API Error: ${response.status} ${errorMessage}`);
}
/**
* Send event(s) to Inngest
*/
async send(payload) {
const response = await axios_1.default.post(this.inngestApiUrl, payload, this.axiosConfig);
if (response.status >= 200 && response.status < 300) {
return true;
}
throw this.getResponseError(response);
}
}
exports.Inngest = Inngest;
//# sourceMappingURL=index.js.map
{
"name": "inngest",
"version": "0.1.0",
"version": "0.2.0",
"description": "Official SDK for Inngest.com",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -7,2 +7,4 @@ # inngest-node

👋 _**Have a question or feature request? [Join our Discord](https://www.inngest.com/discord)!**_
## Usage

@@ -18,2 +20,3 @@

// Send a single event
await inngest.send({

@@ -29,2 +32,14 @@ name: "user.signup",

});
// Send events in bulk
const events = ["+12125551234", "+13135555678"].map(phoneNumber => ({
name: "sms.response.requested",
data: {
message: "Are you available for work today? (y/n)"
},
user: {
phone: phoneNumber
}
}})
await inngest.send(events);
```

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