
Security News
upm Launches as a Fast, Tiny Package Manager Written in TypeScript
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.
@chronary/schemas
Advanced tools
Zod schemas and types for the Chronary calendar API, including webhook event payload validation
Zod schemas and types for the Chronary calendar API — use them to validate incoming webhook payloads at runtime, or to share request/response shapes between your client and server code.
npm install @chronary/schemas zod
# pnpm add @chronary/schemas zod
# yarn add @chronary/schemas zod
zod is a peer of this package and is already a transitive dep of @chronary/sdk and @chronary/toolkit, so you likely have it installed.
Chronary webhooks put the event type in the X-Chronary-Event-Type header and the payload in the body. Pass both to parseWebhookEvent to get a typed, discriminated result.
import { parseWebhookEvent } from '@chronary/schemas/events';
import { verifySignature } from '@chronary/sdk';
app.post('/webhook', async (req, res) => {
// 1. Authenticate with the HMAC signature before trusting anything.
const ok = await verifySignature(
process.env.CHRONARY_WEBHOOK_SECRET!,
req.header('x-timestamp')!,
await req.text(),
req.header('x-signature')!,
);
if (!ok) return res.status(401).end();
// 2. Parse into a typed event.
const event = parseWebhookEvent(
req.header('x-chronary-event-type'),
req.body,
);
if (!event.success) {
console.warn('webhook parse failed:', event.error);
return res.status(400).json({ error: event.error });
}
// 3. Narrow by event.type.
switch (event.event.type) {
case 'event.created':
// ^ TypeScript narrows `event.event.data` to the created payload
console.log('New event:', event.event.data.event);
break;
case 'event.deleted':
console.log('Deleted:', event.event.data.event_id);
break;
case 'proposal.responded':
console.log(
`Agent ${event.event.data.agent_id} responded: ${event.event.data.response}`,
);
break;
default:
console.log('Unhandled event:', event.event.type);
}
res.status(200).end();
});
POST to your webhook URL.X-Signature — HMAC-SHA256 signature of timestamp + "." + body (verify with @chronary/sdk's verifySignature).X-Timestamp — ISO 8601 timestamp used in the signature.X-Delivery-Id — unique delivery ID (useful for idempotency + debugging).X-Chronary-Event-Type — one of the 17 event types in WEBHOOK_EVENT_TYPES.Every payload schema uses .passthrough(). Fields added server-side in the future won't cause existing consumer code to fail parsing — the unknown fields are preserved on the result so you can opt in to reading them.
The package re-exports the Zod schemas used by the REST API for creating and updating resources:
import { CreateEventSchema, CreateCalendarSchema } from '@chronary/schemas';
const parsed = CreateEventSchema.parse(req.body);
// parsed is typed as CreateEventInput
Available:
CreateCalendarSchema, UpdateCalendarSchema, ListCalendarsQuerySchemaCreateEventSchema, UpdateEventSchema, ListEventsQuerySchemaCreateAgentSchema, UpdateAgentSchema, ListAgentsQuerySchemaCreateWebhookSchema, UpdateWebhookSchema, ListWebhooksQuerySchema, ListDeliveriesQuerySchemaCreateICalSubscriptionSchema, UpdateICalSubscriptionSchema, ListICalSubscriptionsQuerySchemaCreateProposalSchema, RespondToProposalSchemaWorkingHoursSchema, UpdateAvailabilityRulesSchema, AvailabilityQuerySchema, CrossAgentAvailabilityQuerySchemaPlus type exports (z.infer on each schema) like CreateEventInput, CreateCalendarInput, etc.
Apache-2.0. See LICENSE.
FAQs
Zod schemas and types for the Chronary calendar API, including webhook event payload validation
The npm package @chronary/schemas receives a total of 0 weekly downloads. As such, @chronary/schemas popularity was classified as not popular.
We found that @chronary/schemas demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.