Comparing version
@@ -5,2 +5,3 @@ import { models, type AiAdapter } from "@inngest/ai"; | ||
import { type Jsonify } from "../helpers/jsonify.js"; | ||
import { type InstantLike } from "../helpers/temporal.js"; | ||
import { type ExclusiveKeys, type ParametersExceptFirst, type SendEventPayload, type SimplifyDeep, type WithoutInternalStr } from "../helpers/types.js"; | ||
@@ -191,3 +192,3 @@ import { type EventPayload, type HashedOp, type InvocationResult, type InvokeTargetFunctionDefinition, type SendEventOutput, type StepOptions, type StepOptionsOrId, type TriggerEventFromFunction, type TriggersFromClient } from "../types.js"; | ||
*/ | ||
sleep: (idOrOptions: StepOptionsOrId, time: number | string | Temporal.Duration) => Promise<void>; | ||
sleep: (idOrOptions: StepOptionsOrId, time: number | string | Temporal.DurationLike) => Promise<void>; | ||
/** | ||
@@ -199,3 +200,3 @@ * Wait until a particular date before continuing by passing a `Date`. | ||
*/ | ||
sleepUntil: (idOrOptions: StepOptionsOrId, time: Date | string | Temporal.Instant | Temporal.ZonedDateTime) => Promise<void>; | ||
sleepUntil: (idOrOptions: StepOptionsOrId, time: Date | string | InstantLike | Temporal.ZonedDateTimeLike) => Promise<void>; | ||
/** | ||
@@ -202,0 +203,0 @@ * Invoke a passed Inngest `function` with the given `data`. Returns the |
@@ -262,3 +262,5 @@ "use strict"; | ||
// TODO PrettyError | ||
throw new Error(`Invalid date or date string passed to sleepUntil: ${time.toString()}`); | ||
throw new Error( | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
`Invalid date or date string passed to sleepUntil: ${time}`); | ||
} | ||
@@ -265,0 +267,0 @@ }), |
import { type Temporal } from "temporal-polyfill"; | ||
/** | ||
* A type that represents a `Temporal.Duration` object. | ||
* | ||
* *Like types are available for many temporal objects, but not all of them. | ||
*/ | ||
export type InstantLike = { | ||
epochSeconds?: number; | ||
epochMilliseconds?: number; | ||
epochMicroseconds?: number; | ||
epochNanoseconds?: number; | ||
}; | ||
/** | ||
* Asserts that the given `input` is a `Temporal.Duration` object. | ||
@@ -30,3 +41,3 @@ */ | ||
*/ | ||
export declare const getISOString: (time: Date | string | Temporal.Instant | Temporal.ZonedDateTime) => string; | ||
export declare const getISOString: (time: Date | string | InstantLike | Temporal.ZonedDateTimeLike) => string; | ||
//# sourceMappingURL=temporal.d.ts.map |
{ | ||
"name": "inngest", | ||
"version": "3.32.10-pr-918.2", | ||
"version": "3.32.10-pr-918.3", | ||
"description": "Official SDK for Inngest.com. Inngest is the reliability layer for modern applications. Inngest combines durable execution, events, and queues into a zero-infra platform with built-in observability.", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -1,2 +0,2 @@ | ||
export declare const version = "3.32.10-pr-918.2"; | ||
export declare const version = "3.32.10-pr-918.3"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
// Generated by genversion. | ||
exports.version = "3.32.10-pr-918.2"; | ||
exports.version = "3.32.10-pr-918.3"; | ||
//# sourceMappingURL=version.js.map |
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
1380098
0.05%20366
0.07%