@vite-hub/schedule 0.0.1 → 0.0.3

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/nitro.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { NitroModule } from "nitro/types";
2
-
3
- //#region src/nitro/module.d.ts
4
- declare const scheduleNitroModule: NitroModule;
5
- //#endregion
6
- export { scheduleNitroModule as default };
package/dist/nitro.js DELETED
@@ -1,2 +0,0 @@
1
- import { t as scheduleNitroModule } from "./module-C_j2ahfg.js";
2
- export { scheduleNitroModule as default };
@@ -1,63 +0,0 @@
1
- import { a as RuntimeScheduleStore, f as ScheduleRunAttemptRecord, g as ScheduleRunRecord, i as RuntimeScheduleRecord, n as RuntimeScheduleCreateInput, o as RuntimeScheduleUpdateInput, v as ScheduleRunStore, y as ScheduleTargetName } from "./types-DOjXDq0s.js";
2
- import * as _$_vite_hub_schedule0 from "@vite-hub/schedule";
3
-
4
- //#region src/registry-module.d.ts
5
- declare module "#vitehub/schedule/registry" {
6
- const registry: _$_vite_hub_schedule0.ScheduleDefinitionRegistry;
7
- export default registry;
8
- }
9
- declare module "#vitehub/schedule/targets" {
10
- export const scheduleTargetNames: _$_vite_hub_schedule0.ScheduleTargetName[];
11
- export type ScheduleTargetName = _$_vite_hub_schedule0.ScheduleTargetName;
12
- }
13
- //#endregion
14
- //#region src/errors.d.ts
15
- interface ScheduleErrorOptions {
16
- cause?: unknown;
17
- code?: string;
18
- details?: unknown;
19
- httpStatus?: number;
20
- }
21
- declare class ScheduleError extends Error {
22
- code?: string;
23
- details?: unknown;
24
- httpStatus?: number;
25
- constructor(message: string, options?: ScheduleErrorOptions);
26
- }
27
- //#endregion
28
- //#region src/runtime/client.d.ts
29
- declare function validateRuntimeScheduleCron(cron: unknown): void;
30
- declare const schedules: {
31
- create<TTarget extends ScheduleTargetName>(input: RuntimeScheduleCreateInput<TTarget>): Promise<RuntimeScheduleRecord>;
32
- delete(id: string): Promise<boolean>;
33
- disable(id: string): Promise<RuntimeScheduleRecord>;
34
- enable(id: string): Promise<RuntimeScheduleRecord>;
35
- get(id: string): Promise<RuntimeScheduleRecord | undefined>;
36
- getRun(id: string): Promise<ScheduleRunRecord | undefined>;
37
- list(): Promise<RuntimeScheduleRecord[]>;
38
- listAttempts(runId: string): Promise<ScheduleRunAttemptRecord[]>;
39
- listRuns(): Promise<ScheduleRunRecord[]>;
40
- run(id: string, options?: {
41
- scheduledAt?: Date;
42
- }): Promise<ScheduleRunRecord>;
43
- update<TTarget extends ScheduleTargetName>(id: string, input: RuntimeScheduleUpdateInput<TTarget>): Promise<RuntimeScheduleRecord>;
44
- };
45
- //#endregion
46
- //#region src/runtime/store.d.ts
47
- interface ScheduleKVStorage {
48
- del(key: string): boolean | Promise<boolean> | Promise<void> | void;
49
- get<T = unknown>(key: string): Promise<T | null | undefined> | T | null | undefined;
50
- has(key: string): boolean | Promise<boolean>;
51
- keys(base?: string): Promise<string[]> | string[];
52
- set<T = unknown>(key: string, value: T): Promise<void> | void;
53
- }
54
- interface KVScheduleStoreOptions {
55
- kvStore?: ScheduleKVStorage;
56
- prefix?: string;
57
- }
58
- declare function createMemoryRuntimeScheduleStore(): RuntimeScheduleStore;
59
- declare function createKVRuntimeScheduleStore(options?: KVScheduleStoreOptions): RuntimeScheduleStore;
60
- declare function createMemoryScheduleRunStore(): ScheduleRunStore;
61
- declare function createKVScheduleRunStore(options?: KVScheduleStoreOptions): ScheduleRunStore;
62
- //#endregion
63
- export { createMemoryRuntimeScheduleStore as a, validateRuntimeScheduleCron as c, createKVScheduleRunStore as i, ScheduleError as l, ScheduleKVStorage as n, createMemoryScheduleRunStore as o, createKVRuntimeScheduleStore as r, schedules as s, KVScheduleStoreOptions as t };