🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@nldoc/event-types

Package Overview
Dependencies
Maintainers
3
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nldoc/event-types - npm Package Compare versions

Comparing version
2.0.63
to
2.0.64
+46
-284
dist/events.d.ts

@@ -10,23 +10,11 @@ import { z } from 'zod';

export declare const QueuedEvent: z.ZodObject<{
timestamp: z.ZodString;
timestamp: z.ZodISODateTime;
traceId: z.ZodString;
} & {
type: z.ZodLiteral<"https://event.spec.nldoc.nl/queued">;
context: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/queued";
context: {};
}, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/queued";
context: {};
}>;
context: z.ZodObject<{}, z.core.$strict>;
}, z.core.$strip>;
export type QueuedEvent = z.infer<typeof QueuedEvent>;
export declare const DoneEvent: z.ZodObject<{
timestamp: z.ZodString;
timestamp: z.ZodISODateTime;
traceId: z.ZodString;
} & {
type: z.ZodLiteral<"https://event.spec.nldoc.nl/done">;

@@ -36,185 +24,56 @@ context: z.ZodObject<{

location: z.ZodString;
}, "strict", z.ZodTypeAny, {
contentType: string;
location: string;
}, {
contentType: string;
location: string;
}>;
}, "strip", z.ZodTypeAny, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/done";
context: {
contentType: string;
location: string;
};
}, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/done";
context: {
contentType: string;
location: string;
};
}>;
}, z.core.$strict>;
}, z.core.$strip>;
export type DoneEvent = z.infer<typeof DoneEvent>;
export declare const ProgressEvent: z.ZodObject<{
timestamp: z.ZodString;
timestamp: z.ZodISODateTime;
traceId: z.ZodString;
} & {
type: z.ZodLiteral<"https://event.spec.nldoc.nl/progress">;
context: z.ZodObject<{
subject: z.ZodEnum<["page", "document"]>;
subject: z.ZodEnum<{
page: "page";
document: "document";
}>;
target: z.ZodNumber;
position: z.ZodNumber;
}, "strict", z.ZodTypeAny, {
subject: "page" | "document";
target: number;
position: number;
}, {
subject: "page" | "document";
target: number;
position: number;
}>;
}, "strip", z.ZodTypeAny, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/progress";
context: {
subject: "page" | "document";
target: number;
position: number;
};
}, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/progress";
context: {
subject: "page" | "document";
target: number;
position: number;
};
}>;
}, z.core.$strict>;
}, z.core.$strip>;
export type ProgressEvent = z.infer<typeof ProgressEvent>;
export declare const ErrorContext: z.ZodDiscriminatedUnion<"code", [z.ZodObject<{
export declare const ErrorContext: z.ZodDiscriminatedUnion<[z.ZodObject<{
code: z.ZodLiteral<"invalid_content_type">;
actual: z.ZodString;
expected: z.ZodArray<z.ZodString, "many">;
}, "strict", z.ZodTypeAny, {
code: "invalid_content_type";
expected: string[];
actual: string;
}, {
code: "invalid_content_type";
expected: string[];
actual: string;
}>, z.ZodObject<{
expected: z.ZodArray<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
code: z.ZodLiteral<"too_many_pages">;
actual: z.ZodNumber;
limit: z.ZodNumber;
}, "strict", z.ZodTypeAny, {
code: "too_many_pages";
actual: number;
limit: number;
}, {
code: "too_many_pages";
actual: number;
limit: number;
}>, z.ZodObject<{
}, z.core.$strict>, z.ZodObject<{
code: z.ZodLiteral<"unexpected">;
}, "strict", z.ZodTypeAny, {
code: "unexpected";
}, {
code: "unexpected";
}>]>;
}, z.core.$strict>]>;
export type ErrorContext = z.infer<typeof ErrorContext>;
export declare const ErrorEvent: z.ZodObject<{
timestamp: z.ZodString;
timestamp: z.ZodISODateTime;
traceId: z.ZodString;
} & {
type: z.ZodLiteral<"https://event.spec.nldoc.nl/error">;
context: z.ZodDiscriminatedUnion<"code", [z.ZodObject<{
context: z.ZodDiscriminatedUnion<[z.ZodObject<{
code: z.ZodLiteral<"invalid_content_type">;
actual: z.ZodString;
expected: z.ZodArray<z.ZodString, "many">;
}, "strict", z.ZodTypeAny, {
code: "invalid_content_type";
expected: string[];
actual: string;
}, {
code: "invalid_content_type";
expected: string[];
actual: string;
}>, z.ZodObject<{
expected: z.ZodArray<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
code: z.ZodLiteral<"too_many_pages">;
actual: z.ZodNumber;
limit: z.ZodNumber;
}, "strict", z.ZodTypeAny, {
code: "too_many_pages";
actual: number;
limit: number;
}, {
code: "too_many_pages";
actual: number;
limit: number;
}>, z.ZodObject<{
}, z.core.$strict>, z.ZodObject<{
code: z.ZodLiteral<"unexpected">;
}, "strict", z.ZodTypeAny, {
code: "unexpected";
}, {
code: "unexpected";
}>]>;
}, "strip", z.ZodTypeAny, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/error";
context: {
code: "invalid_content_type";
expected: string[];
actual: string;
} | {
code: "too_many_pages";
actual: number;
limit: number;
} | {
code: "unexpected";
};
}, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/error";
context: {
code: "invalid_content_type";
expected: string[];
actual: string;
} | {
code: "too_many_pages";
actual: number;
limit: number;
} | {
code: "unexpected";
};
}>;
}, z.core.$strict>]>;
}, z.core.$strip>;
export type ErrorEvent = z.infer<typeof ErrorEvent>;
export declare const Event: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
timestamp: z.ZodString;
export declare const Event: z.ZodDiscriminatedUnion<[z.ZodObject<{
timestamp: z.ZodISODateTime;
traceId: z.ZodString;
} & {
type: z.ZodLiteral<"https://event.spec.nldoc.nl/queued">;
context: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/queued";
context: {};
}, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/queued";
context: {};
}>, z.ZodObject<{
timestamp: z.ZodString;
context: z.ZodObject<{}, z.core.$strict>;
}, z.core.$strip>, z.ZodObject<{
timestamp: z.ZodISODateTime;
traceId: z.ZodString;
} & {
type: z.ZodLiteral<"https://event.spec.nldoc.nl/done">;

@@ -224,128 +83,31 @@ context: z.ZodObject<{

location: z.ZodString;
}, "strict", z.ZodTypeAny, {
contentType: string;
location: string;
}, {
contentType: string;
location: string;
}>;
}, "strip", z.ZodTypeAny, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/done";
context: {
contentType: string;
location: string;
};
}, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/done";
context: {
contentType: string;
location: string;
};
}>, z.ZodObject<{
timestamp: z.ZodString;
}, z.core.$strict>;
}, z.core.$strip>, z.ZodObject<{
timestamp: z.ZodISODateTime;
traceId: z.ZodString;
} & {
type: z.ZodLiteral<"https://event.spec.nldoc.nl/progress">;
context: z.ZodObject<{
subject: z.ZodEnum<["page", "document"]>;
subject: z.ZodEnum<{
page: "page";
document: "document";
}>;
target: z.ZodNumber;
position: z.ZodNumber;
}, "strict", z.ZodTypeAny, {
subject: "page" | "document";
target: number;
position: number;
}, {
subject: "page" | "document";
target: number;
position: number;
}>;
}, "strip", z.ZodTypeAny, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/progress";
context: {
subject: "page" | "document";
target: number;
position: number;
};
}, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/progress";
context: {
subject: "page" | "document";
target: number;
position: number;
};
}>, z.ZodObject<{
timestamp: z.ZodString;
}, z.core.$strict>;
}, z.core.$strip>, z.ZodObject<{
timestamp: z.ZodISODateTime;
traceId: z.ZodString;
} & {
type: z.ZodLiteral<"https://event.spec.nldoc.nl/error">;
context: z.ZodDiscriminatedUnion<"code", [z.ZodObject<{
context: z.ZodDiscriminatedUnion<[z.ZodObject<{
code: z.ZodLiteral<"invalid_content_type">;
actual: z.ZodString;
expected: z.ZodArray<z.ZodString, "many">;
}, "strict", z.ZodTypeAny, {
code: "invalid_content_type";
expected: string[];
actual: string;
}, {
code: "invalid_content_type";
expected: string[];
actual: string;
}>, z.ZodObject<{
expected: z.ZodArray<z.ZodString>;
}, z.core.$strict>, z.ZodObject<{
code: z.ZodLiteral<"too_many_pages">;
actual: z.ZodNumber;
limit: z.ZodNumber;
}, "strict", z.ZodTypeAny, {
code: "too_many_pages";
actual: number;
limit: number;
}, {
code: "too_many_pages";
actual: number;
limit: number;
}>, z.ZodObject<{
}, z.core.$strict>, z.ZodObject<{
code: z.ZodLiteral<"unexpected">;
}, "strict", z.ZodTypeAny, {
code: "unexpected";
}, {
code: "unexpected";
}>]>;
}, "strip", z.ZodTypeAny, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/error";
context: {
code: "invalid_content_type";
expected: string[];
actual: string;
} | {
code: "too_many_pages";
actual: number;
limit: number;
} | {
code: "unexpected";
};
}, {
timestamp: string;
traceId: string;
type: "https://event.spec.nldoc.nl/error";
context: {
code: "invalid_content_type";
expected: string[];
actual: string;
} | {
code: "too_many_pages";
actual: number;
limit: number;
} | {
code: "unexpected";
};
}>]>;
}, z.core.$strict>]>;
}, z.core.$strip>]>;
export type Event = z.infer<typeof Event>;
+1
-1
import { z } from 'zod';
const timestampSchema = z.string().datetime();
const timestampSchema = z.iso.datetime();
const traceIdSchema = z.string().min(1);

@@ -4,0 +4,0 @@ export const eventPrefix = 'https://event.spec.nldoc.nl';

@@ -1,1 +0,1 @@

{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAA;AAC7C,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AAEvC,MAAM,CAAC,MAAM,WAAW,GAAG,6BAA6B,CAAA;AAExD,MAAM,CAAC,MAAM,SAAS,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4B,GAAG,CAAC;KACjC,MAAM,CAAC;IACJ,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;CAChC,CAAC;KACD,MAAM,EAAE,CAAA;AAEb,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACrD,oCAAoC;IACpC,8BAA8B;IAC9B,4BAA4B;CAC/B,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC;IAChC,OAAO,EAAE,YAAY;CACxB,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC9C,WAAW;IACX,SAAS;IACT,aAAa;IACb,UAAU;CACb,CAAC,CAAA"}
{
"name": "@nldoc/event-types",
"version": "2.0.63",
"version": "2.0.64",
"description": "NLdoc's Type Definitions for Events",

@@ -27,6 +27,6 @@ "author": "NLdoc",

"dependencies": {
"zod": "^3.23.8"
"zod": "^4.0.0"
},
"devDependencies": {
"@nldoc/configs": "^1.2.5",
"@nldoc/configs": "^1.4.43",
"@nldoc/event-specification": "^3.0.23",

@@ -38,3 +38,2 @@ "@nldoc/openapi-test-set-generator": "^1.2.4",

"typescript": "^5.5.4",
"typescript-eslint": "^8.0.0",
"vitest": "^3.0.0"

@@ -41,0 +40,0 @@ },