Comparing version 0.2.0 to 0.3.0
/** | ||
* An HTTP-like, standardised response format that allows Inngest to help | ||
* orchestrate steps and retries. | ||
*/ | ||
export interface InngestResponse { | ||
/** | ||
* A step response must contain an HTTP status code. | ||
* | ||
* A `2xx` response indicates success; this is not a failure and no retry is | ||
* necessary. | ||
* | ||
* A `4xx` response indicates a bad request; this step will not be retried as | ||
* it is deemed irrecoverable. Examples of this might be an event with | ||
* insufficient data or concerning a user that no longer exists. | ||
* | ||
* A `5xx` status indicates a temporary internal error; this will be retried | ||
* according to the step and function's retry policy (3 times, by default). | ||
* | ||
* @link https://www.inngest.com/docs/functions/function-input-and-output#response-format | ||
* @link https://www.inngest.com/docs/functions/retries | ||
*/ | ||
status: number; | ||
/** | ||
* The output of the function - the `body` - can be any arbitrary | ||
* JSON-compatible data. It is then usable by any future steps. | ||
* | ||
* @link https://www.inngest.com/docs/functions/function-input-and-output#response-format | ||
*/ | ||
body?: any; | ||
} | ||
/** | ||
* A single step within a function. | ||
*/ | ||
export declare type InngestStep<Context = any> = ( | ||
/** | ||
* The context for this step, including the triggering event and any previous | ||
* step output. | ||
*/ | ||
context: Context) => Promise<InngestResponse> | InngestResponse; | ||
/** | ||
* The event payload structure for sending data to Inngest | ||
@@ -3,0 +42,0 @@ */ |
@@ -7,4 +7,4 @@ "use strict"; | ||
exports.Inngest = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
const url_1 = require("url"); | ||
const axios_1 = __importDefault(require("axios")); | ||
/** | ||
@@ -11,0 +11,0 @@ * A client for the Inngest Source API |
{ | ||
"name": "inngest", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Official SDK for Inngest.com", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org" | ||
}, | ||
"bin": { | ||
"inngest-init": "./dist/init.js" | ||
}, | ||
"scripts": { | ||
@@ -11,2 +17,3 @@ "build": "yarn run clean && tsc", | ||
"clean": "rm -rf ./dist", | ||
"prepare": "yarn run test && yarn run build", | ||
"release": "yarn run np" | ||
@@ -13,0 +20,0 @@ }, |
@@ -40,4 +40,4 @@ # inngest-node | ||
} | ||
}}) | ||
}}); | ||
await inngest.send(events); | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49272
11
263
1
1