@chainfuse/types 2.12.0 → 2.12.1

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.
@@ -1,6 +1,7 @@
1
1
  import type { Buffer } from 'node:buffer';
2
- import type { DOCombinedLocations } from '..';
3
- import type { ShardType } from '../d0';
2
+ import * as z from 'zod/mini';
3
+ import { ShardType } from '../d0/index.js';
4
+ import { DOCombinedLocations } from '../index.js';
4
5
  export type PrefixedUuid = `${'t_' | 'd_' | 'u_'}${UuidExport['utf8']}${'' | '_p'}`;
5
6
  export interface UuidExport {
6
7
  utf8: ReturnType<typeof crypto.randomUUID>;
@@ -9,20 +10,20 @@ export interface UuidExport {
9
10
  base64: string;
10
11
  base64url: string;
11
12
  }
12
- export interface UUIDExtract7 {
13
- date: Date;
14
- }
15
- export interface UUIDExtract8 {
16
- date: Date;
17
- location: DOCombinedLocations;
18
- shardType: ShardType;
19
- suffix?: {
20
- hex: string;
21
- base64?: string;
22
- base64url?: string;
23
- };
24
- }
25
- export type UUIDExtract = UUIDExtract7 | UUIDExtract8;
13
+ export declare const UUIDExtract7: z.ZodMiniObject<{
14
+ date: z.ZodMiniDate<unknown>;
15
+ }, z.core.$strip>;
16
+ export declare const UUIDExtract8: z.ZodMiniObject<{
17
+ date: z.ZodMiniDate<unknown>;
18
+ location: z.ZodMiniEnum<typeof DOCombinedLocations>;
19
+ shardType: z.ZodMiniEnum<typeof ShardType>;
20
+ suffix: z.ZodMiniOptional<z.ZodMiniObject<{
21
+ hex: z.ZodMiniCustomStringFormat<"hex">;
22
+ base64: z.ZodMiniBase64;
23
+ base64url: z.ZodMiniBase64URL;
24
+ }, z.core.$strip>>;
25
+ }, z.core.$strip>;
26
+ export type UUIDExtract = z.output<typeof UUIDExtract7> | z.output<typeof UUIDExtract8>;
26
27
  export type ISODateString = `${number}-${number}-${number}T${number}:${number}:${number}.${number}Z`;
27
28
  /**
28
29
  * Represents a cron expression string (in UTC time).
package/dist/d1/index.js CHANGED
@@ -1 +1,15 @@
1
- export {};
1
+ import * as z from 'zod/mini';
2
+ import { ShardType } from '../d0/index.js';
3
+ import { DOCombinedLocations } from '../index.js';
4
+ export const UUIDExtract7 = z.object({
5
+ date: z.coerce.date(),
6
+ });
7
+ export const UUIDExtract8 = z.extend(UUIDExtract7, {
8
+ location: z.enum(DOCombinedLocations),
9
+ shardType: z.enum(ShardType),
10
+ suffix: z.optional(z.object({
11
+ hex: z.hex().check(z.length(3)),
12
+ base64: z.base64(),
13
+ base64url: z.base64url(),
14
+ })),
15
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainfuse/types",
3
- "version": "2.12.0",
3
+ "version": "2.12.1",
4
4
  "description": "",
5
5
  "author": "ChainFuse",
6
6
  "homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
@@ -101,5 +101,5 @@
101
101
  "@cloudflare/workers-types": "^4.20250909.0",
102
102
  "@types/validator": "^13.15.3"
103
103
  },
104
- "gitHead": "fe95f7c82786f19dda1e465f38b19be98613f981"
104
+ "gitHead": "4259cf9c169a4aced88159526927fe52bde6d658"
105
105
  }