@codesoul-co/hypha-core / contracts/runtime-timer-schemas
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/runtime-timer-schemas.ts - Exports: 12
Using this module
Use the Runtime timer schemas module for declaring and runtime-validating contracts. It exports 10 constants, 2 functions.
Import from the package entrypoint
import {
runtimeTimerContractDefinitions,
runtimeTimerContractJsonSchemas,
runtimeTimerSweepRequestDefinition,
runtimeTimerSweepRequestExample,
runtimeTimerSweepRequestJsonSchema,
runtimeTimerSweepRequestSchema,
runtimeTimerSweepResultDefinition,
runtimeTimerSweepResultExample,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- The module exposes 2 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 10 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Runtime validation example
import { runtimeTimerSweepRequestSchema } from '@codesoul-co/hypha-core';
declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = runtimeTimerSweepRequestSchema.parse(input);Parse untrusted configuration, network, or persisted input with the runtime schema before passing it to functions or classes that expect a validated contract.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
runtimeTimerContractDefinitions | constant | const runtimeTimerContractDefinitions: readonly [SpecSchemaDefinition<RuntimeTimerSweepRequest>, SpecSchemaDefinition<RuntimeTimerSweepResult>] | Runtime Timer Contract Definitions constant exported by the contracts/runtime-timer-schemas module. |
runtimeTimerContractJsonSchemas | constant | const runtimeTimerContractJsonSchemas: Record<string, JsonSchema> | Runtime Timer Contract JSON Schemas constant exported by the contracts/runtime-timer-schemas module. |
runtimeTimerSweepRequestDefinition | constant | const runtimeTimerSweepRequestDefinition: SpecSchemaDefinition<RuntimeTimerSweepRequest> | Runtime Timer Sweep Request Definition constant exported by the contracts/runtime-timer-schemas module. |
runtimeTimerSweepRequestExample | constant | const runtimeTimerSweepRequestExample: RuntimeTimerSweepRequest | Valid example value for Runtime Timer Sweep Request. |
runtimeTimerSweepRequestJsonSchema | constant | const runtimeTimerSweepRequestJsonSchema: JsonSchema | JSON Schema for Runtime Timer Sweep Request. |
runtimeTimerSweepRequestSchema | constant | const runtimeTimerSweepRequestSchema: z.ZodObject<{ ownerId: z.ZodString; leaseTtlMs: z.ZodNumber; limit: z.ZodNumber; cursor: z.ZodOptional<z.ZodString>; firedAt: z.ZodString; }, "strict", z.ZodTypeAny, { limit: number; ownerId: string; leaseTtlMs: number; firedAt: string; cursor?: string | undefined; }, { limit: number; ownerId: string; leaseTtlMs: number; firedAt: string; cursor?: string | undefined; }> | Runtime schema for Runtime Timer Sweep Request. |
runtimeTimerSweepResultDefinition | constant | const runtimeTimerSweepResultDefinition: SpecSchemaDefinition<RuntimeTimerSweepResult> | Runtime Timer Sweep Result Definition constant exported by the contracts/runtime-timer-schemas module. |
runtimeTimerSweepResultExample | constant | const runtimeTimerSweepResultExample: RuntimeTimerSweepResult | Valid example value for Runtime Timer Sweep Result. |
runtimeTimerSweepResultJsonSchema | constant | const runtimeTimerSweepResultJsonSchema: JsonSchema | JSON Schema for Runtime Timer Sweep Result. |
runtimeTimerSweepResultSchema | constant | const runtimeTimerSweepResultSchema: z.ZodEffects<z.ZodObject<{ scanned: z.ZodNumber; fired: z.ZodNumber; notDue: z.ZodNumber; leaseUnavailable: z.ZodNumber; alreadyResolved: z.ZodNumber; results: z.ZodArray<z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; tenantId?: string | undefined; }, {... | Runtime schema for Runtime Timer Sweep Result. |
validateRuntimeTimerSweepRequest | function | validateRuntimeTimerSweepRequest(input: unknown): RuntimeTimerSweepRequest | Validate Runtime Timer Sweep Request function with 1 public call signature; parameters and return types are listed below. |
validateRuntimeTimerSweepResult | function | validateRuntimeTimerSweepResult(input: unknown): RuntimeTimerSweepResult | Validate Runtime Timer Sweep Result function with 1 public call signature; parameters and return types are listed below. |
runtimeTimerContractDefinitions
Runtime Timer Contract Definitions constant exported by the contracts/runtime-timer-schemas module.
- Kind: constant
- Import:
import { runtimeTimerContractDefinitions } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerContractDefinitions: readonly [SpecSchemaDefinition<RuntimeTimerSweepRequest>, SpecSchemaDefinition<RuntimeTimerSweepResult>];runtimeTimerContractJsonSchemas
Runtime Timer Contract JSON Schemas constant exported by the contracts/runtime-timer-schemas module.
- Kind: constant
- Import:
import { runtimeTimerContractJsonSchemas } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerContractJsonSchemas: Record<string, JsonSchema>;runtimeTimerSweepRequestDefinition
Runtime Timer Sweep Request Definition constant exported by the contracts/runtime-timer-schemas module.
- Kind: constant
- Import:
import { runtimeTimerSweepRequestDefinition } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerSweepRequestDefinition: SpecSchemaDefinition<RuntimeTimerSweepRequest>;runtimeTimerSweepRequestExample
Valid example value for Runtime Timer Sweep Request.
- Kind: constant
- Import:
import { runtimeTimerSweepRequestExample } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerSweepRequestExample: RuntimeTimerSweepRequest;runtimeTimerSweepRequestJsonSchema
JSON Schema for Runtime Timer Sweep Request.
- Kind: constant
- Import:
import { runtimeTimerSweepRequestJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerSweepRequestJsonSchema: JsonSchema;runtimeTimerSweepRequestSchema
Runtime schema for Runtime Timer Sweep Request.
- Kind: constant
- Import:
import { runtimeTimerSweepRequestSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerSweepRequestSchema: z.ZodObject<{ ownerId: z.ZodString; leaseTtlMs: z.ZodNumber; limit: z.ZodNumber; cursor: z.ZodOptional<z.ZodString>; firedAt: z.ZodString; }, "strict", z.ZodTypeAny, { limit: number; ownerId: string; leaseTtlMs: number; firedAt: string; cursor?: string | undefined; }, { limit: number; ownerId: string; leaseTtlMs: number; firedAt: string; cursor?: string | undefined; }>;runtimeTimerSweepResultDefinition
Runtime Timer Sweep Result Definition constant exported by the contracts/runtime-timer-schemas module.
- Kind: constant
- Import:
import { runtimeTimerSweepResultDefinition } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerSweepResultDefinition: SpecSchemaDefinition<RuntimeTimerSweepResult>;runtimeTimerSweepResultExample
Valid example value for Runtime Timer Sweep Result.
- Kind: constant
- Import:
import { runtimeTimerSweepResultExample } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerSweepResultExample: RuntimeTimerSweepResult;runtimeTimerSweepResultJsonSchema
JSON Schema for Runtime Timer Sweep Result.
- Kind: constant
- Import:
import { runtimeTimerSweepResultJsonSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerSweepResultJsonSchema: JsonSchema;runtimeTimerSweepResultSchema
Runtime schema for Runtime Timer Sweep Result.
- Kind: constant
- Import:
import { runtimeTimerSweepResultSchema } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare const runtimeTimerSweepResultSchema: z.ZodEffects<z.ZodObject<{ scanned: z.ZodNumber; fired: z.ZodNumber; notDue: z.ZodNumber; leaseUnavailable: z.ZodNumber; alreadyResolved: z.ZodNumber; results: z.ZodArray<z.ZodObject<{ scope: z.ZodObject<{ tenantId: z.ZodOptional<z.ZodString>; userId: z.ZodString; runId: z.ZodString; }, "strict", z.ZodTypeAny, { userId: string; runId: string; tenantId?: string | undefined; }, { userId: string; runId: string; tenantId?: string | undefined; }>; disposition: z.ZodEnum<["fired", "not_due", "lease_unavailable", "already_resolved"]>; eventIds: z.ZodArray<z.ZodString, "many">; }, "strict", z.ZodTypeAny, { scope: { userId: string; runId: string; tenantId?: string | undefined; }; disposition: "not_due" | "lease_unavailable" | "fired" | "already_resolved"; eventIds: string[]; }, { scope: { userId: string; runId: string; tenantId?: string | undefined; }; disposition: "not_due" | "lease_unavailable" | "fired" | "already_resolved"; eventIds: string[]; }>, "many">; nextCursor: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { fired: number; scanned: number; notDue: number; leaseUnavailable: number; alreadyResolved: number; results: { scope: { userId: string; runId: string; tenantId?: string | undefined; }; disposition: "not_due" | "lease_unavailable" | "fired" | "already_resolved"; eventIds: string[]; }[]; nextCursor?: string | undefined; }, { fired: number; scanned: number; notDue: number; leaseUnavailable: number; alreadyResolved: number; results: { scope: { userId: string; runId: string; tenantId?: string | undefined; }; disposition: "not_due" | "lease_unavailable" | "fired" | "already_resolved"; eventIds: string[]; }[]; nextCursor?: string | undefined; }>, { fired: number; scanned: number; notDue: number; leaseUnavailable: number; alreadyResolved: number; results: { scope: { userId: string; runId: string; tenantId?: string | undefined; }; disposition: "not_due" | "lease_unavailable" | "fired" | "already_resolved"; eventIds: string[]; }[]; nextCursor?: string | undefined; }, { fired: number; scanned: number; notDue: number; leaseUnavailable: number; alreadyResolved: number; results: { scope: { userId: string; runId: string; tenantId?: string | undefined; }; disposition: "not_due" | "lease_unavailable" | "fired" | "already_resolved"; eventIds: string[]; }[]; nextCursor?: string | undefined; }>;validateRuntimeTimerSweepRequest
Validate Runtime Timer Sweep Request function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateRuntimeTimerSweepRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare function validateRuntimeTimerSweepRequest(input: unknown): RuntimeTimerSweepRequest;Call signature
validateRuntimeTimerSweepRequest(input: unknown): RuntimeTimerSweepRequestParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
RuntimeTimerSweepRequest - Description: The return contract is defined by the type shown above.
validateRuntimeTimerSweepResult
Validate Runtime Timer Sweep Result function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateRuntimeTimerSweepResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-timer-schemas
Declaration
export declare function validateRuntimeTimerSweepResult(input: unknown): RuntimeTimerSweepResult;Call signature
validateRuntimeTimerSweepResult(input: unknown): RuntimeTimerSweepResultParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
RuntimeTimerSweepResult - Description: The return contract is defined by the type shown above.
