@cossistant/types 0.0.11 → 0.0.14

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 +1 @@
1
- {"version":3,"file":"upload.d.ts","names":[],"sources":["../../src/api/upload.ts"],"sourcesContent":[],"mappings":";;;;;;cAIa,4BAA0B;cAK1B,uBAAqB;cAKrB,4BAA0B;cAK1B,oBAAkB;cAKlB,uBAAqB;AApBrB,cAyBA,qBAtBX,EAsBgC,SAtBhC;AAEW,cAyBA,gBAtBX,EAsB2B,SAtB3B;AAEW,cA0BA,oBAvBX,EAuB+B,SA1BM;AAK1B,cAgCA,yBAhCkB,EAgCO,SA7BpC;AAEW,cA2CA,6BAxCX,EAwCwC,SAxCxC,CAAA;EAEW,IAAA,YAAA,CAAA,cAGX,CAAA;EAEW,cAAA,WAIX;EAEW,cAAA,WASV;EAEU,SAAA,WAAA;AAgBb,CAAA,QAAa,CAAA;cAWA,uBAAqB;;;;;CAXQ,QAAA,CAAA;AAAA,cAsB7B,wBAtB6B,EAsBL,SAtBK,CAAA;EAW7B,IAAA,YAAA,CAAA,SASV,CAAA;;;;;cAaU,0BAAwB;EAtBH,IAAA,YAAA,CAAA,SAAA,CAAA;EAAA,SAAA,WAAA;EAWrB,cAAA,WASV;;;cAaU,mBAAiB,uBAAA;;;EAtBO,cAAA,WAAA;EAAA,SAAA,WAAA;AAWrC,CAAA,QAAa,CAAA,WAAA,CASV;;;;;;EATkC,IAAA,YAAA,CAAA,SAAA,CAAA;EAAA,SAAA,WAAA;EAWxB,cAAA,WAUV;;;;;;EAV2B,SAAA,WAAA;;cAYjB,gCAA8B;;;;;;;;;;;;;;;;;IAZb,SAAA,WAAA;EAAA,CAAA,QAAA,CAAA,WAAA,CAAA;IAYjB,IAAA,YAAA,CAAA,SAAA,CA8BV;;;;;;;;;;;KAES,wBAAA,GAA2B,cAC/B;cAGK,iCAA+B;;;;;;;;KAmChC,yBAAA,GAA4B,cAChC"}
1
+ {"version":3,"file":"upload.d.ts","names":[],"sources":["../../src/api/upload.ts"],"sourcesContent":[],"mappings":";;;;;;cAIa,4BAA0B;cAK1B,uBAAqB;cAKrB,4BAA0B;cAK1B,oBAAkB;cAKlB,uBAAqB;AApBrB,cAyBA,qBAtBX,EAsBgC,SAzBK;AAK1B,cAyBA,gBAtBX,EAsB2B,SAzBK;AAKrB,cA0BA,oBAvBX,EAuB+B,SA1BM;AAK1B,cAgCA,yBAhCkB,EAgCO,SA7BpC;AAEW,cA2CA,6BA3CqB,EA2CQ,SAxCxC,CAAA;EAEW,IAAA,YAAA,CAAA,cAGX,CAAA;EAEW,cAAA,WAIX;EAEW,cAAA,WASV;EAEU,SAAA,WAAA;AAgBb,CAAA,QAAa,CAAA;cAWA,uBAAqB;;;;;CAXQ,QAAA,CAAA;AAAA,cAsB7B,wBAtB6B,EAsBL,SAtBK,CAAA;EAW7B,IAAA,YAAA,CAAA,SASV,CAAA;;;;;cAaU,0BAAwB;EAtBH,IAAA,YAAA,CAAA,SAAA,CAAA;EAAA,SAAA,WAAA;EAWrB,cAAA,WASV;;;cAaU,mBAAiB,uBAAA;;;EAtBO,cAAA,WAAA;EAAA,SAAA,WAAA;AAWrC,CAAA,QAAa,CAAA,WAAA,CASV;;;;;;EATkC,IAAA,YAAA,CAAA,SAAA,CAAA;EAAA,SAAA,WAAA;EAWxB,cAAA,WAUV;;;;;;EAV2B,SAAA,WAAA;;cAYjB,gCAA8B;;;;;;;;;;;;;;;;;IAZb,SAAA,WAAA;EAAA,CAAA,QAAA,CAAA,WAAA,CAAA;IAYjB,IAAA,YAAA,CAAA,SAAA,CA8BV;;;;;;;;;;;KAES,wBAAA,GAA2B,cAC/B;cAGK,iCAA+B;;;;;;;;KAmChC,yBAAA,GAA4B,cAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"website.js","names":[],"sources":["../../src/api/website.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\nimport { APIKeyType, WebsiteInstallationTarget, WebsiteStatus } from \"../enums\";\nimport { publicVisitorResponseSchema } from \"./visitor\";\n\n/**\n * Website creation request schema\n */\nexport const createWebsiteRequestSchema = z.object({\n\tname: z\n\t\t.string()\n\t\t.openapi({\n\t\t\tdescription: \"The website's name.\",\n\t\t\texample: \"Dub\",\n\t\t})\n\t\t.min(3, {\n\t\t\tmessage: \"Name must be at least 3 characters\",\n\t\t})\n\t\t.max(30, {\n\t\t\tmessage: \"Name must be less than 30 characters\",\n\t\t}),\n\tdomain: z\n\t\t.string()\n\t\t.regex(/^[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*$/)\n\t\t.openapi({\n\t\t\tdescription: \"The website's domain.\",\n\t\t\texample: \"dub.co\",\n\t\t}),\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tinstallationTarget: z.nativeEnum(WebsiteInstallationTarget).openapi({\n\t\tdescription: \"The website's library installation target.\",\n\t\texample: WebsiteInstallationTarget.NEXTJS,\n\t}),\n});\n\nexport type CreateWebsiteRequest = z.infer<typeof createWebsiteRequestSchema>;\n\nconst API_KEY_TYPE_VALUES = [APIKeyType.PUBLIC, APIKeyType.PRIVATE] as const;\n\nconst WEBSITE_STATUS_VALUES = [\n\tWebsiteStatus.ACTIVE,\n\tWebsiteStatus.INACTIVE,\n] as const;\n\nexport const websiteApiKeySchema = z\n\t.object({\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"The API key's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: z.string().openapi({\n\t\t\tdescription: \"The API key's display name.\",\n\t\t\texample: \"Production public key\",\n\t\t}),\n\t\tkey: z.string().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"The API key's raw value when available. Private keys will be null when fetched after creation.\",\n\t\t\texample: \"pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n\t\t}),\n\t\tkeyType: z.enum(API_KEY_TYPE_VALUES).openapi({\n\t\t\tdescription: \"The API key's type (public or private).\",\n\t\t\texample: APIKeyType.PUBLIC,\n\t\t}),\n\t\tisTest: z.boolean().openapi({\n\t\t\tdescription: \"Whether the API key is a test key.\",\n\t\t\texample: false,\n\t\t}),\n\t\tisActive: z.boolean().openapi({\n\t\t\tdescription: \"Whether the API key is active.\",\n\t\t\texample: true,\n\t\t}),\n\t\tcreatedAt: z.string().openapi({\n\t\t\tdescription: \"Timestamp indicating when the API key was created.\",\n\t\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t\t}),\n\t\tlastUsedAt: z.string().nullable().openapi({\n\t\t\tdescription: \"Timestamp indicating when the API key was last used.\",\n\t\t\texample: \"2024-01-10T12:00:00.000Z\",\n\t\t}),\n\t\trevokedAt: z.string().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Timestamp indicating when the API key was revoked, if applicable.\",\n\t\t\texample: null,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"A website API key summary.\",\n\t});\n\nexport type WebsiteApiKey = z.infer<typeof websiteApiKeySchema>;\n\nexport const websiteSummarySchema = z\n\t.object({\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"The website's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tslug: z.string().openapi({\n\t\t\tdescription: \"The website's slug.\",\n\t\t\texample: \"dub-co\",\n\t\t}),\n\t\tname: z.string().openapi({\n\t\t\tdescription: \"The website's name.\",\n\t\t\texample: \"Dub\",\n\t\t}),\n\t\tdomain: z.string().openapi({\n\t\t\tdescription: \"The website's domain.\",\n\t\t\texample: \"dub.co\",\n\t\t}),\n\t\tcontactEmail: z.string().email().nullable().openapi({\n\t\t\tdescription: \"The primary email visitors can use to reach you.\",\n\t\t\texample: \"support@dub.co\",\n\t\t}),\n\t\tlogoUrl: z.string().url().nullable().openapi({\n\t\t\tdescription: \"Public URL to the website's logo.\",\n\t\t\texample: \"https://cdn.example.com/logo.png\",\n\t\t}),\n\t\torganizationId: z.ulid().openapi({\n\t\t\tdescription: \"The owning organization's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\twhitelistedDomains: z.array(z.url()).openapi({\n\t\t\tdescription: \"The domains allowed to use the website's public keys.\",\n\t\t\texample: [\"https://dub.co\", \"http://localhost:3000\"],\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Summary information for a website used in settings screens.\",\n\t});\n\nexport type WebsiteSummary = z.infer<typeof websiteSummarySchema>;\n\nexport const websiteDeveloperSettingsResponseSchema = z\n\t.object({\n\t\twebsite: websiteSummarySchema,\n\t\tapiKeys: z.array(websiteApiKeySchema),\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Developer settings payload including website information and API keys.\",\n\t});\n\nexport type WebsiteDeveloperSettingsResponse = z.infer<\n\ttypeof websiteDeveloperSettingsResponseSchema\n>;\n\nexport const createWebsiteApiKeyRequestSchema = z\n\t.object({\n\t\torganizationId: z.ulid().openapi({\n\t\t\tdescription: \"The organization's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\twebsiteId: z.ulid().openapi({\n\t\t\tdescription: \"The website's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: z.string().min(3).max(80).openapi({\n\t\t\tdescription: \"A human-friendly label for the API key.\",\n\t\t\texample: \"Docs integration\",\n\t\t}),\n\t\tkeyType: z.enum(API_KEY_TYPE_VALUES).openapi({\n\t\t\tdescription: \"The type of API key to generate.\",\n\t\t\texample: APIKeyType.PRIVATE,\n\t\t}),\n\t\tisTest: z.boolean().openapi({\n\t\t\tdescription: \"Whether to generate a test key scoped to localhost.\",\n\t\t\texample: false,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload to create a website API key.\",\n\t});\n\nexport type CreateWebsiteApiKeyRequest = z.infer<\n\ttypeof createWebsiteApiKeyRequestSchema\n>;\n\nexport const revokeWebsiteApiKeyRequestSchema = z\n\t.object({\n\t\torganizationId: z.ulid().openapi({\n\t\t\tdescription: \"The organization's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\twebsiteId: z.ulid().openapi({\n\t\t\tdescription: \"The website's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tapiKeyId: z.ulid().openapi({\n\t\t\tdescription: \"The API key's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload to revoke a website API key.\",\n\t});\n\nexport type RevokeWebsiteApiKeyRequest = z.infer<\n\ttypeof revokeWebsiteApiKeyRequestSchema\n>;\n\nconst websiteUpdateDataSchema = z\n\t.object({\n\t\tname: z.string().min(1).max(120).optional(),\n\t\tslug: z.string().min(1).optional(),\n\t\tdomain: z.string().min(1).optional(),\n\t\tcontactEmail: z.string().email().nullable().optional(),\n\t\tdescription: z.string().nullable().optional(),\n\t\tlogoUrl: z.string().url().nullable().optional(),\n\t\twhitelistedDomains: z.array(z.url()).optional(),\n\t\tinstallationTarget: z.nativeEnum(WebsiteInstallationTarget).optional(),\n\t\tstatus: z.enum(WEBSITE_STATUS_VALUES).optional(),\n\t\tteamId: z.string().nullable().optional(),\n\t})\n\t.refine((value) => Object.keys(value).length > 0, {\n\t\tmessage: \"Provide at least one field to update.\",\n\t});\n\nexport const updateWebsiteRequestSchema = z\n .object({\n organizationId: z.ulid().openapi({\n description: \"The organization's unique identifier.\",\n example: \"01JG000000000000000000000\",\n }),\n websiteId: z.ulid().openapi({\n description: \"The website's unique identifier.\",\n example: \"01JG000000000000000000000\",\n }),\n data: websiteUpdateDataSchema.openapi({\n description: \"The fields to update on the website.\",\n }),\n })\n .openapi({\n description: \"Payload to update website settings.\",\n });\n\nexport type UpdateWebsiteRequest = z.infer<typeof updateWebsiteRequestSchema>;\n\n/**\n * Website creation response schema\n */\nexport const createWebsiteResponseSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The website's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The website's name.\",\n\t\texample: \"Dub\",\n\t}),\n\tslug: z.string().openapi({\n\t\tdescription: \"The website's slug.\",\n\t\texample: \"dubdotco\",\n\t}),\n\twhitelistedDomains: z.array(z.url()).openapi({\n\t\tdescription: \"The website's whitelisted domains.\",\n\t\texample: [\"http://localhost:3000\", \"https://dub.co\"],\n\t}),\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tapiKeys: z.array(websiteApiKeySchema).openapi({\n\t\tdescription: \"The website's API keys.\",\n\t\texample: [\n\t\t\t{\n\t\t\t\tid: \"01JG000000000000000000000\",\n\t\t\t\tkey: \"pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n\t\t\t\tcreatedAt: \"2021-01-01T00:00:00.000Z\",\n\t\t\t\tisTest: true,\n\t\t\t\tisActive: true,\n\t\t\t\tkeyType: APIKeyType.PUBLIC,\n\t\t\t\tlastUsedAt: null,\n\t\t\t\trevokedAt: null,\n\t\t\t},\n\t\t],\n\t}),\n});\n\nexport type CreateWebsiteResponse = z.infer<typeof createWebsiteResponseSchema>;\n\n/**\n * Website domain validation request schema\n */\nexport const checkWebsiteDomainRequestSchema = z.object({\n\tdomain: z\n\t\t.string()\n\t\t.regex(/^[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*$/)\n\t\t.openapi({\n\t\t\tdescription: \"The website's domain.\",\n\t\t\texample: \"dub.co\",\n\t\t}),\n});\n\nexport type CheckWebsiteDomainRequest = z.infer<\n\ttypeof checkWebsiteDomainRequestSchema\n>;\n\nexport const availableHumanAgentSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The human agent's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The agent's name.\",\n\t\texample: \"John Doe\",\n\t}),\n\timage: z.string().nullable().openapi({\n\t\tdescription: \"The agent's avatar URL.\",\n\t\texample: \"https://cossistant.com/avatar.png\",\n\t}),\n\tlastSeenAt: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"The agent's last online timestamp, used to determine if the agent is online. If the agent is offline, this will be null or more than 5 minutes ago.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n});\n\nexport const AvailableAIAgentSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The AI agent's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The AI agent's name.\",\n\t\texample: \"John Doe\",\n\t}),\n\timage: z.string().nullable().openapi({\n\t\tdescription: \"The AI agent's avatar URL.\",\n\t\texample: \"https://cossistant.com/avatar.png\",\n\t}),\n});\n\n/**\n * Website information response schema\n */\nexport const publicWebsiteResponseSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The website's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The website's name.\",\n\t\texample: \"Dub\",\n\t}),\n\tdomain: z.string().openapi({\n\t\tdescription: \"The website's domain.\",\n\t\texample: \"dub.co\",\n\t}),\n\tdescription: z.string().nullable().openapi({\n\t\tdescription: \"The website's description.\",\n\t\texample: \"Link management for modern marketing teams.\",\n\t}),\n\tlogoUrl: z.string().nullable().openapi({\n\t\tdescription: \"The website's logo URL.\",\n\t\texample: \"https://dub.co/logo.png\",\n\t}),\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tstatus: z.string().openapi({\n\t\tdescription: \"The website's status.\",\n\t\texample: \"active\",\n\t}),\n\tlastOnlineAt: z.string().nullable().openapi({\n\t\tdescription: \"The website's support last online date.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n\tavailableHumanAgents: z.array(availableHumanAgentSchema),\n\tavailableAIAgents: z.array(AvailableAIAgentSchema),\n\tvisitor: publicVisitorResponseSchema.openapi({\n\t\tdescription:\n\t\t\t\"The visitor information. Either existing visitor data or newly created visitor.\",\n\t}),\n});\n\nexport type PublicWebsiteResponse = z.infer<typeof publicWebsiteResponseSchema>;\nexport type AvailableHumanAgent = z.infer<typeof availableHumanAgentSchema>;\nexport type AvailableAIAgent = z.infer<typeof AvailableAIAgentSchema>;\n\n/**\n * List websites by organization request schema\n */\nexport const listByOrganizationRequestSchema = z.object({\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n});\n\nexport type ListByOrganizationRequest = z.infer<\n\ttypeof listByOrganizationRequestSchema\n>;\n\n/**\n * Website list item schema - simplified website info for listing\n */\nexport const websiteListItemSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The website's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The website's name.\",\n\t\texample: \"Dub\",\n\t}),\n\tslug: z.string().openapi({\n\t\tdescription: \"The website's slug.\",\n\t\texample: \"dub-co\",\n\t}),\n\tlogoUrl: z.string().url().nullable().openapi({\n\t\tdescription: \"Public URL to the website's logo.\",\n\t\texample: \"https://cdn.example.com/logo.png\",\n\t}),\n\tdomain: z.string().openapi({\n\t\tdescription: \"The website's domain.\",\n\t\texample: \"dub.co\",\n\t}),\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The owning organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n});\n\nexport type WebsiteListItem = z.infer<typeof websiteListItemSchema>;\n"],"mappings":";;;;;;;;AAOA,MAAa,6BAA6B,EAAE,OAAO;CAClD,MAAM,EACJ,QAAQ,CACR,QAAQ;EACR,aAAa;EACb,SAAS;EACT,CAAC,CACD,IAAI,GAAG,EACP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QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,QAAQ;EACxB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,QAAQ;EACxB,aAAa;EACb,SAAS;EACT,CAAC;CACF,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ;EAC5C,aAAa;EACb,SAAS;EACT,CAAC;CACF,QAAQ,EAAE,QAAQ,CAAC,QAAQ;EAC1B,aAAa;EACb,SAAS;EACT,CAAC;CACF,gBAAgB,EAAE,MAAM,CAAC,QAAQ;EAChC,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"website.js","names":[],"sources":["../../src/api/website.ts"],"sourcesContent":["import { z } from \"@hono/zod-openapi\";\nimport { APIKeyType, WebsiteInstallationTarget, WebsiteStatus } from \"../enums\";\nimport { publicVisitorResponseSchema } from \"./visitor\";\n\n/**\n * Website creation request schema\n */\nexport const createWebsiteRequestSchema = z.object({\n\tname: z\n\t\t.string()\n\t\t.openapi({\n\t\t\tdescription: \"The website's name.\",\n\t\t\texample: \"Dub\",\n\t\t})\n\t\t.min(3, {\n\t\t\tmessage: \"Name must be at least 3 characters\",\n\t\t})\n\t\t.max(30, {\n\t\t\tmessage: \"Name must be less than 30 characters\",\n\t\t}),\n\tdomain: z\n\t\t.string()\n\t\t.regex(/^[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*$/)\n\t\t.openapi({\n\t\t\tdescription: \"The website's domain.\",\n\t\t\texample: \"dub.co\",\n\t\t}),\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tinstallationTarget: z.nativeEnum(WebsiteInstallationTarget).openapi({\n\t\tdescription: \"The website's library installation target.\",\n\t\texample: WebsiteInstallationTarget.NEXTJS,\n\t}),\n});\n\nexport type CreateWebsiteRequest = z.infer<typeof createWebsiteRequestSchema>;\n\nconst API_KEY_TYPE_VALUES = [APIKeyType.PUBLIC, APIKeyType.PRIVATE] as const;\n\nconst WEBSITE_STATUS_VALUES = [\n\tWebsiteStatus.ACTIVE,\n\tWebsiteStatus.INACTIVE,\n] as const;\n\nexport const websiteApiKeySchema = z\n\t.object({\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"The API key's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: z.string().openapi({\n\t\t\tdescription: \"The API key's display name.\",\n\t\t\texample: \"Production public key\",\n\t\t}),\n\t\tkey: z.string().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"The API key's raw value when available. Private keys will be null when fetched after creation.\",\n\t\t\texample: \"pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n\t\t}),\n\t\tkeyType: z.enum(API_KEY_TYPE_VALUES).openapi({\n\t\t\tdescription: \"The API key's type (public or private).\",\n\t\t\texample: APIKeyType.PUBLIC,\n\t\t}),\n\t\tisTest: z.boolean().openapi({\n\t\t\tdescription: \"Whether the API key is a test key.\",\n\t\t\texample: false,\n\t\t}),\n\t\tisActive: z.boolean().openapi({\n\t\t\tdescription: \"Whether the API key is active.\",\n\t\t\texample: true,\n\t\t}),\n\t\tcreatedAt: z.string().openapi({\n\t\t\tdescription: \"Timestamp indicating when the API key was created.\",\n\t\t\texample: \"2024-01-01T00:00:00.000Z\",\n\t\t}),\n\t\tlastUsedAt: z.string().nullable().openapi({\n\t\t\tdescription: \"Timestamp indicating when the API key was last used.\",\n\t\t\texample: \"2024-01-10T12:00:00.000Z\",\n\t\t}),\n\t\trevokedAt: z.string().nullable().openapi({\n\t\t\tdescription:\n\t\t\t\t\"Timestamp indicating when the API key was revoked, if applicable.\",\n\t\t\texample: null,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"A website API key summary.\",\n\t});\n\nexport type WebsiteApiKey = z.infer<typeof websiteApiKeySchema>;\n\nexport const websiteSummarySchema = z\n\t.object({\n\t\tid: z.ulid().openapi({\n\t\t\tdescription: \"The website's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tslug: z.string().openapi({\n\t\t\tdescription: \"The website's slug.\",\n\t\t\texample: \"dub-co\",\n\t\t}),\n\t\tname: z.string().openapi({\n\t\t\tdescription: \"The website's name.\",\n\t\t\texample: \"Dub\",\n\t\t}),\n\t\tdomain: z.string().openapi({\n\t\t\tdescription: \"The website's domain.\",\n\t\t\texample: \"dub.co\",\n\t\t}),\n\t\tcontactEmail: z.string().email().nullable().openapi({\n\t\t\tdescription: \"The primary email visitors can use to reach you.\",\n\t\t\texample: \"support@dub.co\",\n\t\t}),\n\t\tlogoUrl: z.string().url().nullable().openapi({\n\t\t\tdescription: \"Public URL to the website's logo.\",\n\t\t\texample: \"https://cdn.example.com/logo.png\",\n\t\t}),\n\t\torganizationId: z.ulid().openapi({\n\t\t\tdescription: \"The owning organization's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\twhitelistedDomains: z.array(z.url()).openapi({\n\t\t\tdescription: \"The domains allowed to use the website's public keys.\",\n\t\t\texample: [\"https://dub.co\", \"http://localhost:3000\"],\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Summary information for a website used in settings screens.\",\n\t});\n\nexport type WebsiteSummary = z.infer<typeof websiteSummarySchema>;\n\nexport const websiteDeveloperSettingsResponseSchema = z\n\t.object({\n\t\twebsite: websiteSummarySchema,\n\t\tapiKeys: z.array(websiteApiKeySchema),\n\t})\n\t.openapi({\n\t\tdescription:\n\t\t\t\"Developer settings payload including website information and API keys.\",\n\t});\n\nexport type WebsiteDeveloperSettingsResponse = z.infer<\n\ttypeof websiteDeveloperSettingsResponseSchema\n>;\n\nexport const createWebsiteApiKeyRequestSchema = z\n\t.object({\n\t\torganizationId: z.ulid().openapi({\n\t\t\tdescription: \"The organization's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\twebsiteId: z.ulid().openapi({\n\t\t\tdescription: \"The website's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tname: z.string().min(3).max(80).openapi({\n\t\t\tdescription: \"A human-friendly label for the API key.\",\n\t\t\texample: \"Docs integration\",\n\t\t}),\n\t\tkeyType: z.enum(API_KEY_TYPE_VALUES).openapi({\n\t\t\tdescription: \"The type of API key to generate.\",\n\t\t\texample: APIKeyType.PRIVATE,\n\t\t}),\n\t\tisTest: z.boolean().openapi({\n\t\t\tdescription: \"Whether to generate a test key scoped to localhost.\",\n\t\t\texample: false,\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload to create a website API key.\",\n\t});\n\nexport type CreateWebsiteApiKeyRequest = z.infer<\n\ttypeof createWebsiteApiKeyRequestSchema\n>;\n\nexport const revokeWebsiteApiKeyRequestSchema = z\n\t.object({\n\t\torganizationId: z.ulid().openapi({\n\t\t\tdescription: \"The organization's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\twebsiteId: z.ulid().openapi({\n\t\t\tdescription: \"The website's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tapiKeyId: z.ulid().openapi({\n\t\t\tdescription: \"The API key's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload to revoke a website API key.\",\n\t});\n\nexport type RevokeWebsiteApiKeyRequest = z.infer<\n\ttypeof revokeWebsiteApiKeyRequestSchema\n>;\n\nconst websiteUpdateDataSchema = z\n\t.object({\n\t\tname: z.string().min(1).max(120).optional(),\n\t\tslug: z.string().min(1).optional(),\n\t\tdomain: z.string().min(1).optional(),\n\t\tcontactEmail: z.string().email().nullable().optional(),\n\t\tdescription: z.string().nullable().optional(),\n\t\tlogoUrl: z.string().url().nullable().optional(),\n\t\twhitelistedDomains: z.array(z.url()).optional(),\n\t\tinstallationTarget: z.nativeEnum(WebsiteInstallationTarget).optional(),\n\t\tstatus: z.enum(WEBSITE_STATUS_VALUES).optional(),\n\t\tteamId: z.string().nullable().optional(),\n\t})\n\t.refine((value) => Object.keys(value).length > 0, {\n\t\tmessage: \"Provide at least one field to update.\",\n\t});\n\nexport const updateWebsiteRequestSchema = z\n\t.object({\n\t\torganizationId: z.ulid().openapi({\n\t\t\tdescription: \"The organization's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\twebsiteId: z.ulid().openapi({\n\t\t\tdescription: \"The website's unique identifier.\",\n\t\t\texample: \"01JG000000000000000000000\",\n\t\t}),\n\t\tdata: websiteUpdateDataSchema.openapi({\n\t\t\tdescription: \"The fields to update on the website.\",\n\t\t}),\n\t})\n\t.openapi({\n\t\tdescription: \"Payload to update website settings.\",\n\t});\n\nexport type UpdateWebsiteRequest = z.infer<typeof updateWebsiteRequestSchema>;\n\n/**\n * Website creation response schema\n */\nexport const createWebsiteResponseSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The website's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The website's name.\",\n\t\texample: \"Dub\",\n\t}),\n\tslug: z.string().openapi({\n\t\tdescription: \"The website's slug.\",\n\t\texample: \"dubdotco\",\n\t}),\n\twhitelistedDomains: z.array(z.url()).openapi({\n\t\tdescription: \"The website's whitelisted domains.\",\n\t\texample: [\"http://localhost:3000\", \"https://dub.co\"],\n\t}),\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tapiKeys: z.array(websiteApiKeySchema).openapi({\n\t\tdescription: \"The website's API keys.\",\n\t\texample: [\n\t\t\t{\n\t\t\t\tid: \"01JG000000000000000000000\",\n\t\t\t\tkey: \"pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n\t\t\t\tcreatedAt: \"2021-01-01T00:00:00.000Z\",\n\t\t\t\tisTest: true,\n\t\t\t\tisActive: true,\n\t\t\t\tkeyType: APIKeyType.PUBLIC,\n\t\t\t\tlastUsedAt: null,\n\t\t\t\trevokedAt: null,\n\t\t\t},\n\t\t],\n\t}),\n});\n\nexport type CreateWebsiteResponse = z.infer<typeof createWebsiteResponseSchema>;\n\n/**\n * Website domain validation request schema\n */\nexport const checkWebsiteDomainRequestSchema = z.object({\n\tdomain: z\n\t\t.string()\n\t\t.regex(/^[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*$/)\n\t\t.openapi({\n\t\t\tdescription: \"The website's domain.\",\n\t\t\texample: \"dub.co\",\n\t\t}),\n});\n\nexport type CheckWebsiteDomainRequest = z.infer<\n\ttypeof checkWebsiteDomainRequestSchema\n>;\n\nexport const availableHumanAgentSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The human agent's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The agent's name.\",\n\t\texample: \"John Doe\",\n\t}),\n\timage: z.string().nullable().openapi({\n\t\tdescription: \"The agent's avatar URL.\",\n\t\texample: \"https://cossistant.com/avatar.png\",\n\t}),\n\tlastSeenAt: z.string().nullable().openapi({\n\t\tdescription:\n\t\t\t\"The agent's last online timestamp, used to determine if the agent is online. If the agent is offline, this will be null or more than 5 minutes ago.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n});\n\nexport const AvailableAIAgentSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The AI agent's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The AI agent's name.\",\n\t\texample: \"John Doe\",\n\t}),\n\timage: z.string().nullable().openapi({\n\t\tdescription: \"The AI agent's avatar URL.\",\n\t\texample: \"https://cossistant.com/avatar.png\",\n\t}),\n});\n\n/**\n * Website information response schema\n */\nexport const publicWebsiteResponseSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The website's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The website's name.\",\n\t\texample: \"Dub\",\n\t}),\n\tdomain: z.string().openapi({\n\t\tdescription: \"The website's domain.\",\n\t\texample: \"dub.co\",\n\t}),\n\tdescription: z.string().nullable().openapi({\n\t\tdescription: \"The website's description.\",\n\t\texample: \"Link management for modern marketing teams.\",\n\t}),\n\tlogoUrl: z.string().nullable().openapi({\n\t\tdescription: \"The website's logo URL.\",\n\t\texample: \"https://dub.co/logo.png\",\n\t}),\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tstatus: z.string().openapi({\n\t\tdescription: \"The website's status.\",\n\t\texample: \"active\",\n\t}),\n\tlastOnlineAt: z.string().nullable().openapi({\n\t\tdescription: \"The website's support last online date.\",\n\t\texample: \"2021-01-01T00:00:00.000Z\",\n\t}),\n\tavailableHumanAgents: z.array(availableHumanAgentSchema),\n\tavailableAIAgents: z.array(AvailableAIAgentSchema),\n\tvisitor: publicVisitorResponseSchema.openapi({\n\t\tdescription:\n\t\t\t\"The visitor information. Either existing visitor data or newly created visitor.\",\n\t}),\n});\n\nexport type PublicWebsiteResponse = z.infer<typeof publicWebsiteResponseSchema>;\nexport type AvailableHumanAgent = z.infer<typeof availableHumanAgentSchema>;\nexport type AvailableAIAgent = z.infer<typeof AvailableAIAgentSchema>;\n\n/**\n * List websites by organization request schema\n */\nexport const listByOrganizationRequestSchema = z.object({\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n});\n\nexport type ListByOrganizationRequest = z.infer<\n\ttypeof listByOrganizationRequestSchema\n>;\n\n/**\n * Website list item schema - simplified website info for listing\n */\nexport const websiteListItemSchema = z.object({\n\tid: z.ulid().openapi({\n\t\tdescription: \"The website's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n\tname: z.string().openapi({\n\t\tdescription: \"The website's name.\",\n\t\texample: \"Dub\",\n\t}),\n\tslug: z.string().openapi({\n\t\tdescription: \"The website's slug.\",\n\t\texample: \"dub-co\",\n\t}),\n\tlogoUrl: z.string().url().nullable().openapi({\n\t\tdescription: \"Public URL to the website's logo.\",\n\t\texample: \"https://cdn.example.com/logo.png\",\n\t}),\n\tdomain: z.string().openapi({\n\t\tdescription: \"The website's domain.\",\n\t\texample: \"dub.co\",\n\t}),\n\torganizationId: z.ulid().openapi({\n\t\tdescription: \"The owning organization's unique identifier.\",\n\t\texample: \"01JG000000000000000000000\",\n\t}),\n});\n\nexport type WebsiteListItem = z.infer<typeof websiteListItemSchema>;\n"],"mappings":";;;;;;;;AAOA,MAAa,6BAA6B,EAAE,OAAO;CAClD,MAAM,EACJ,QAAQ,CACR,QAAQ;EACR,aAAa;EACb,SAAS;EACT,CAAC,CACD,IAAI,GAAG,EACP,SAAS,sCACT,CAAC,CACD,IAAI,IAAI,EACR,SAAS,wCACT,CAAC;CACH,QAAQ,EACN,QAAQ,CACR,MAAM,oCAAoC,CAC1C,QAAQ;EACR,aAAa;EACb,SAAS;EACT,CAAC;CACH,gBAAgB,EAAE,MAAM,CAAC,QAAQ;EAChC,aAAa;EACb,SAAS;EACT,CAAC;CACF,oBAAoB,EAAE,WAAW,0BAA0B,CAAC,QAAQ;EACnE,aAAa;EACb,SAAS,0BAA0B;EACnC,CAAC;CACF,CAAC;AAIF,MAAM,sBAAsB,CAAC,WAAW,QAAQ,WAAW,QAAQ;AAEnE,MAAM,wBAAwB,CAC7B,cAAc,QACd,cAAc,SACd;AAED,MAAa,sBAAsB,EACjC,OAAO;CACP,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,QAAQ;EACxB,aAAa;EACb,SAAS;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EACT,CAAC;CACF,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EACtC,aAAa;EACb,SAAS;EACT,CAAC;CACF,gBAAgB,EAAE,MAAM,CAAC,QAAQ;EAChC,aAAa;EACb,SAAS;EACT,CAAC;CACF,QAAQ,EAAE,QAAQ,CAAC,QAAQ;EAC1B,aAAa;EACb,SAAS;EACT,CAAC;CACF,cAAc,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ;EAC3C,aAAa;EACb,SAAS;EACT,CAAC;CACF,sBAAsB,EAAE,MAAM,0BAA0B;CACxD,mBAAmB,EAAE,MAAM,uBAAuB;CAClD,SAAS,4BAA4B,QAAQ,EAC5C,aACC,mFACD,CAAC;CACF,CAAC;;;;AASF,MAAa,kCAAkC,EAAE,OAAO,EACvD,gBAAgB,EAAE,MAAM,CAAC,QAAQ;CAChC,aAAa;CACb,SAAS;CACT,CAAC,EACF,CAAC;;;;AASF,MAAa,wBAAwB,EAAE,OAAO;CAC7C,IAAI,EAAE,MAAM,CAAC,QAAQ;EACpB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,QAAQ;EACxB,aAAa;EACb,SAAS;EACT,CAAC;CACF,MAAM,EAAE,QAAQ,CAAC,QAAQ;EACxB,aAAa;EACb,SAAS;EACT,CAAC;CACF,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ;EAC5C,aAAa;EACb,SAAS;EACT,CAAC;CACF,QAAQ,EAAE,QAAQ,CAAC,QAAQ;EAC1B,aAAa;EACb,SAAS;EACT,CAAC;CACF,gBAAgB,EAAE,MAAM,CAAC,QAAQ;EAChC,aAAa;EACb,SAAS;EACT,CAAC;CACF,CAAC"}
package/core.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","names":["errors","schemas","Class","ZodTrait","$constructor","T","D","NEVER","$brand","$ZodBranded","Brand","SomeType","output","Record","$ZodAsyncError","Error","$ZodEncodeError","input","infer","$ZodConfig","$ZodErrorMap","globalConfig","config","Partial"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/core.d.cts"],"sourcesContent":["import type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nimport type { Class } from \"./util.cjs\";\ntype ZodTrait = {\n _zod: {\n def: any;\n [k: string]: any;\n };\n};\nexport interface $constructor<T extends ZodTrait, D = T[\"_zod\"][\"def\"]> {\n new (def: D): T;\n init(inst: T, def: D): asserts inst is T;\n}\n/** A special constant with type `never` */\nexport declare const NEVER: never;\nexport declare function $constructor<T extends ZodTrait, D = T[\"_zod\"][\"def\"]>(name: string, initializer: (inst: T, def: D) => void, params?: {\n Parent?: typeof Class;\n}): $constructor<T, D>;\nexport declare const $brand: unique symbol;\nexport type $brand<T extends string | number | symbol = string | number | symbol> = {\n [$brand]: {\n [k in T]: true;\n };\n};\nexport type $ZodBranded<T extends schemas.SomeType, Brand extends string | number | symbol> = T & Record<\"_zod\", Record<\"output\", output<T> & $brand<Brand>>>;\nexport declare class $ZodAsyncError extends Error {\n constructor();\n}\nexport declare class $ZodEncodeError extends Error {\n constructor(name: string);\n}\nexport type input<T> = T extends {\n _zod: {\n input: any;\n };\n} ? T[\"_zod\"][\"input\"] : unknown;\nexport type output<T> = T extends {\n _zod: {\n output: any;\n };\n} ? T[\"_zod\"][\"output\"] : unknown;\nexport type { output as infer };\nexport interface $ZodConfig {\n /** Custom error map. Overrides `config().localeError`. */\n customError?: errors.$ZodErrorMap | undefined;\n /** Localized error map. Lowest priority. */\n localeError?: errors.$ZodErrorMap | undefined;\n /** Disable JIT schema compilation. Useful in environments that disallow `eval`. */\n jitless?: boolean | undefined;\n}\nexport declare const globalConfig: $ZodConfig;\nexport declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;\n"],"x_google_ignoreList":[0],"mappings":";;;;KAGKG,QAAAA;EAAAA,IAAAA,EAAAA;IAMYC,GAAAA,EAAAA,GAAAA;IAAuBD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E,KAN3G,CAAA,CAAA,CAAA;AAM2GA,KAOzIO,KAPyIP,CAAAA,CAAAA,CAAAA,GAO9HL,CAP8HK,SAAAA;EAAPF,IAAAA,EAAAA;IAA7BK,KAAAA,EAAAA,GAAAA;EAAfA,CAAAA;CAAM,GAWpGR,CAXoG,CAAA,MAAA,CAAA,CAAA,OAAA,CAAA,GAAA,OAAA;AAO5FY,KAKAL,MALK,CAAAP,CAAAA,CAAAA,GAKOA,CALP,SAIZ;EACOO,IAAAA,EAAAA;;;IAIRP"}
1
+ {"version":3,"file":"core.d.ts","names":["errors","schemas","Class","ZodTrait","$constructor","T","D","NEVER","$brand","$ZodBranded","Brand","SomeType","output","Record","$ZodAsyncError","Error","$ZodEncodeError","input","infer","$ZodConfig","$ZodErrorMap","globalConfig","config","Partial"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/core.d.cts"],"sourcesContent":["import type * as errors from \"./errors.cjs\";\nimport type * as schemas from \"./schemas.cjs\";\nimport type { Class } from \"./util.cjs\";\ntype ZodTrait = {\n _zod: {\n def: any;\n [k: string]: any;\n };\n};\nexport interface $constructor<T extends ZodTrait, D = T[\"_zod\"][\"def\"]> {\n new (def: D): T;\n init(inst: T, def: D): asserts inst is T;\n}\n/** A special constant with type `never` */\nexport declare const NEVER: never;\nexport declare function $constructor<T extends ZodTrait, D = T[\"_zod\"][\"def\"]>(name: string, initializer: (inst: T, def: D) => void, params?: {\n Parent?: typeof Class;\n}): $constructor<T, D>;\nexport declare const $brand: unique symbol;\nexport type $brand<T extends string | number | symbol = string | number | symbol> = {\n [$brand]: {\n [k in T]: true;\n };\n};\nexport type $ZodBranded<T extends schemas.SomeType, Brand extends string | number | symbol> = T & Record<\"_zod\", Record<\"output\", output<T> & $brand<Brand>>>;\nexport declare class $ZodAsyncError extends Error {\n constructor();\n}\nexport declare class $ZodEncodeError extends Error {\n constructor(name: string);\n}\nexport type input<T> = T extends {\n _zod: {\n input: any;\n };\n} ? T[\"_zod\"][\"input\"] : unknown;\nexport type output<T> = T extends {\n _zod: {\n output: any;\n };\n} ? T[\"_zod\"][\"output\"] : unknown;\nexport type { output as infer };\nexport interface $ZodConfig {\n /** Custom error map. Overrides `config().localeError`. */\n customError?: errors.$ZodErrorMap | undefined;\n /** Localized error map. Lowest priority. */\n localeError?: errors.$ZodErrorMap | undefined;\n /** Disable JIT schema compilation. Useful in environments that disallow `eval`. */\n jitless?: boolean | undefined;\n}\nexport declare const globalConfig: $ZodConfig;\nexport declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;\n"],"x_google_ignoreList":[0],"mappings":";;;;KAGKG,QAAAA;EAAAA,IAAAA,EAAAA;IAMYC,GAAAA,EAAAA,GAAAA;IAAuBD,CAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAAAA,GAAAA;EAAcE,CAAAA;CACxCC;AAAID,UADDD,YACCC,CAAAA,UADsBF,QACtBE,EAAAA,IADoCA,CACpCA,CAAAA,MAAAA,CAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA;EACHA,KAAAA,GAAAA,EADDC,CACCD,CAAAA,EADGA,CACHA;EAAQC,IAAAA,CAAAA,IAAAA,EAARD,CAAQC,EAAAA,GAAAA,EAAAA,CAAAA,CAAAA,EAAAA,QAAAA,IAAAA,IAAoBD,CAApBC;;AAIwBH,iBAAvBC,YAAuBD,CAAAA,UAAAA,QAAAA,EAAAA,IAAcE,CAAdF,CAAAA,MAAAA,CAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,IAAAA,EAAAA,MAAAA,EAAAA,WAAAA,EAAAA,CAAAA,IAAAA,EAAkEE,CAAlEF,EAAAA,GAAAA,EAA0EG,CAA1EH,EAAAA,GAAAA,IAAAA,EAAAA,MAAkEE,CAAlEF,EAAAA;EAAcE,MAAAA,CAAAA,EAAAA,OACzCH,KADyCG;CAAoDA,CAAAA,EAE7GD,YAF6GC,CAEhGA,CAFgGA,EAE7FC,CAF6FD,CAAAA;AAAQC,cAGpGE,MAHoGF,EAAAA,OAAAA,MAAAA;AACrGJ,KAGRM,MAHQN,CAAAA,UAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,GAAAA,MAAAA,CAAAA,GAAAA;EACHG,CAGZG,MAAAA,CAHYH,EAAAA,QAIHA,CAJMC,GAAAA,IAAAA,EAAhBF;CAAY;AACKI,KAMTC,WAN8B,CAAA,UAMRR,QANQ,EAAA,cAAA,MAAA,GAAA,MAAA,GAAA,MAAA,CAAA,GAMoDI,CANpD,GAMwDQ,MANxD,CAAA,MAAA,EAMuEA,MANvE,CAAA,QAAA,EAMwFD,MANxF,CAM+FP,CAN/F,CAAA,GAMoGG,MANpG,CAM2GE,KAN3G,CAAA,CAAA,CAAA;AAM2GA,KAOzIO,KAPyIP,CAAAA,CAAAA,CAAAA,GAO9HL,CAP8HK,SAAAA;EAAPF,IAAAA,EAAAA;IAA7BK,KAAAA,EAAAA,GAAAA;EAAfA,CAAAA;CAAM,GAWpGR,CAXoG,CAAA,MAAA,CAAA,CAAA,OAAA,CAAA,GAAA,OAAA;AAO5FY,KAKAL,MALK,CAAA,CAAAP,CAAAA,GAKOA,CALPA,SAIZ;EACOO,IAAAA,EAAAA;;;IAIRP"}
package/errors.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","names":["$ZodCheck","$ZodStringFormats","$constructor","$ZodType","StandardSchemaV1","util","$ZodIssueBase","PropertyKey","$ZodIssueInvalidType","Input","$ZodIssueTooBig","$ZodIssueTooSmall","$ZodIssueInvalidStringFormat","$ZodIssueNotMultipleOf","$ZodIssueUnrecognizedKeys","Record","$ZodIssueInvalidUnion","$ZodIssue","$ZodIssueInvalidKey","$ZodIssueInvalidElement","$ZodIssueInvalidValue","Primitive","$ZodIssueCustom","$ZodIssueStringCommonFormats","Exclude","$ZodIssueStringInvalidRegex","$ZodIssueStringInvalidJWT","$ZodIssueStringStartsWith","$ZodIssueStringEndsWith","$ZodIssueStringIncludes","$ZodStringFormatIssues","$ZodIssueCode","$ZodInternalIssue","T","RawIssue","MakePartial","Flatten","$ZodRawIssue","$ZodErrorMap","$ZodError","Error","$ZodRealError","$ZodFlattenedError","U","_FlattenedError","flattenError","_ZodFormattedError","K","$ZodFormattedError","formatError","$ZodErrorTree","Array","treeifyError","toDotPath","PathSegment","prettifyError","FailureResult"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/errors.d.cts"],"sourcesContent":["import type { $ZodCheck, $ZodStringFormats } from \"./checks.cjs\";\nimport { $constructor } from \"./core.cjs\";\nimport type { $ZodType } from \"./schemas.cjs\";\nimport type { StandardSchemaV1 } from \"./standard-schema.cjs\";\nimport * as util from \"./util.cjs\";\nexport interface $ZodIssueBase {\n readonly code?: string;\n readonly input?: unknown;\n readonly path: PropertyKey[];\n readonly message: string;\n}\nexport interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_type\";\n readonly expected: $ZodType[\"_zod\"][\"def\"][\"type\"];\n readonly input?: Input;\n}\nexport interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {\n readonly code: \"too_big\";\n readonly origin: \"number\" | \"int\" | \"bigint\" | \"date\" | \"string\" | \"array\" | \"set\" | \"file\" | (string & {});\n readonly maximum: number | bigint;\n readonly inclusive?: boolean;\n readonly exact?: boolean;\n readonly input?: Input;\n}\nexport interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {\n readonly code: \"too_small\";\n readonly origin: \"number\" | \"int\" | \"bigint\" | \"date\" | \"string\" | \"array\" | \"set\" | \"file\" | (string & {});\n readonly minimum: number | bigint;\n /** True if the allowable range includes the minimum */\n readonly inclusive?: boolean;\n /** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */\n readonly exact?: boolean;\n readonly input?: Input;\n}\nexport interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {\n readonly code: \"invalid_format\";\n readonly format: $ZodStringFormats | (string & {});\n readonly pattern?: string;\n readonly input?: string;\n}\nexport interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {\n readonly code: \"not_multiple_of\";\n readonly divisor: number;\n readonly input?: Input;\n}\nexport interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {\n readonly code: \"unrecognized_keys\";\n readonly keys: string[];\n readonly input?: Record<string, unknown>;\n}\nexport interface $ZodIssueInvalidUnion extends $ZodIssueBase {\n readonly code: \"invalid_union\";\n readonly errors: $ZodIssue[][];\n readonly input?: unknown;\n readonly discriminator?: string | undefined;\n}\nexport interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_key\";\n readonly origin: \"map\" | \"record\";\n readonly issues: $ZodIssue[];\n readonly input?: Input;\n}\nexport interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_element\";\n readonly origin: \"map\" | \"set\";\n readonly key: unknown;\n readonly issues: $ZodIssue[];\n readonly input?: Input;\n}\nexport interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_value\";\n readonly values: util.Primitive[];\n readonly input?: Input;\n}\nexport interface $ZodIssueCustom extends $ZodIssueBase {\n readonly code: \"custom\";\n readonly params?: Record<string, any> | undefined;\n readonly input?: unknown;\n}\nexport interface $ZodIssueStringCommonFormats extends $ZodIssueInvalidStringFormat {\n format: Exclude<$ZodStringFormats, \"regex\" | \"jwt\" | \"starts_with\" | \"ends_with\" | \"includes\">;\n}\nexport interface $ZodIssueStringInvalidRegex extends $ZodIssueInvalidStringFormat {\n format: \"regex\";\n pattern: string;\n}\nexport interface $ZodIssueStringInvalidJWT extends $ZodIssueInvalidStringFormat {\n format: \"jwt\";\n algorithm?: string;\n}\nexport interface $ZodIssueStringStartsWith extends $ZodIssueInvalidStringFormat {\n format: \"starts_with\";\n prefix: string;\n}\nexport interface $ZodIssueStringEndsWith extends $ZodIssueInvalidStringFormat {\n format: \"ends_with\";\n suffix: string;\n}\nexport interface $ZodIssueStringIncludes extends $ZodIssueInvalidStringFormat {\n format: \"includes\";\n includes: string;\n}\nexport type $ZodStringFormatIssues = $ZodIssueStringCommonFormats | $ZodIssueStringInvalidRegex | $ZodIssueStringInvalidJWT | $ZodIssueStringStartsWith | $ZodIssueStringEndsWith | $ZodIssueStringIncludes;\nexport type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;\nexport type $ZodIssueCode = $ZodIssue[\"code\"];\nexport type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;\ntype RawIssue<T extends $ZodIssueBase> = T extends any ? util.Flatten<util.MakePartial<T, \"message\" | \"path\"> & {\n /** The input data */\n readonly input: unknown;\n /** The schema or check that originated this issue. */\n readonly inst?: $ZodType | $ZodCheck;\n /** If `true`, Zod will continue executing checks/refinements after this issue. */\n readonly continue?: boolean | undefined;\n} & Record<string, unknown>> : never;\nexport type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;\nexport interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {\n (issue: $ZodRawIssue<T>): {\n message: string;\n } | string | undefined | null;\n}\nexport interface $ZodError<T = unknown> extends Error {\n type: T;\n issues: $ZodIssue[];\n _zod: {\n output: T;\n def: $ZodIssue[];\n };\n stack?: string;\n name: string;\n}\nexport declare const $ZodError: $constructor<$ZodError>;\ninterface $ZodRealError<T = any> extends $ZodError<T> {\n}\nexport declare const $ZodRealError: $constructor<$ZodRealError>;\nexport type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;\ntype _FlattenedError<T, U = string> = {\n formErrors: U[];\n fieldErrors: {\n [P in keyof T]?: U[];\n };\n};\nexport declare function flattenError<T>(error: $ZodError<T>): _FlattenedError<T>;\nexport declare function flattenError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): _FlattenedError<T, U>;\ntype _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? {\n [K in keyof T]?: $ZodFormattedError<T[K], U>;\n} : T extends any[] ? {\n [k: number]: $ZodFormattedError<T[number], U>;\n} : T extends object ? util.Flatten<{\n [K in keyof T]?: $ZodFormattedError<T[K], U>;\n}> : any;\nexport type $ZodFormattedError<T, U = string> = {\n _errors: U[];\n} & util.Flatten<_ZodFormattedError<T, U>>;\nexport declare function formatError<T>(error: $ZodError<T>): $ZodFormattedError<T>;\nexport declare function formatError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;\nexport type $ZodErrorTree<T, U = string> = T extends util.Primitive ? {\n errors: U[];\n} : T extends [any, ...any[]] ? {\n errors: U[];\n items?: {\n [K in keyof T]?: $ZodErrorTree<T[K], U>;\n };\n} : T extends any[] ? {\n errors: U[];\n items?: Array<$ZodErrorTree<T[number], U>>;\n} : T extends object ? {\n errors: U[];\n properties?: {\n [K in keyof T]?: $ZodErrorTree<T[K], U>;\n };\n} : {\n errors: U[];\n};\nexport declare function treeifyError<T>(error: $ZodError<T>): $ZodErrorTree<T>;\nexport declare function treeifyError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodErrorTree<T, U>;\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport declare function toDotPath(_path: readonly (string | number | symbol | StandardSchemaV1.PathSegment)[]): string;\nexport declare function prettifyError(error: StandardSchemaV1.FailureResult): string;\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;UAKiBM,aAAAA;EAAAA,SAAAA,IAAAA,CAAAA,EAAa,MAAA;EAMbE,SAAAA,KAAAA,CAAAA,EAAAA,OAAoB;EAEdL,SAAAA,IAAAA,EALJI,WAKIJ,EAAAA;EACFM,SAAAA,OAAAA,EAAAA,MAAAA;;AAHuD,UAA3DD,oBAA2D,CAAA,QAAA,OAAA,CAAA,SAAbF,aAAa,CAAA;EAK3DI,SAAAA,IAAAA,EAAAA,cAAeD;EAQfE,SAAAA,QAAAA,EAXMR,QAWWM,CAAAA,MAAAA,CAAAA,CAAAA,KAQbA,CAAAA,CAAAA,MARuCH,CAAAA;EAU3CM,SAAAA,KAAAA,CAAAA,EApBIH,KAoBJG;AAMjB;AAKiBE,UA7BAJ,eA6ByB,CAAA,QAAA,OAGrBK,CAAAA,SAhCqCT,aA6BM,CAAA;EAK/CU,SAAAA,IAAAA,EAAAA,SAAqB;EAMrBE,SAAAA,MAAAA,EAAAA,QAAmB,GAAA,KAAAT,GAAAA,QAAA,GAAA,MAAA,GAAA,QAAA,GAAA,OAAA,GAAA,KAAA,GAAA,MAAA,GAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA;EAGfQ,SAAAA,OAAAA,EAAAA,MAAAA,GAAAA,MAAAA;EACAR,SAAAA,SAAAA,CAAAA,EAAAA,OAAAA;EAJyCH,SAAAA,KAAAA,CAAAA,EAAAA,OAAAA;EAAa,SAAA,KAAA,CAAA,EAlCtDG,KAkCsD;AAM3E;AAIqBQ,UA1CJN,iBA0CIM,CAAAA,QAAAA,OAAAA,CAAAA,SA1CuCX,aA0CvCW,CAAAA;EACAR,SAAAA,IAAAA,EAAAA,WAAAA;EAL6CH,SAAAA,MAAAA,EAAAA,QAAAA,GAAAA,KAAAA,GAAAA,QAAAA,GAAAA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6BAEIV,KAAKU;;KAKpBG,oCAAoCb,0CACzBA,KAAKe,mBAAmBf,EAAEc,IAAIJ,OAC1CV;eACae,mBAAmBf,WAAWU;IAC3CV,mBAAmB5B,sBACP4B,KAAKe,mBAAmBf,EAAEc,IAAIJ;KAElCK;WACCL;IACTtC,QAAayC,mBAAmBb,GAAGU"}
1
+ {"version":3,"file":"errors.d.ts","names":["$ZodCheck","$ZodStringFormats","$constructor","$ZodType","StandardSchemaV1","util","$ZodIssueBase","PropertyKey","$ZodIssueInvalidType","Input","$ZodIssueTooBig","$ZodIssueTooSmall","$ZodIssueInvalidStringFormat","$ZodIssueNotMultipleOf","$ZodIssueUnrecognizedKeys","Record","$ZodIssueInvalidUnion","$ZodIssue","$ZodIssueInvalidKey","$ZodIssueInvalidElement","$ZodIssueInvalidValue","Primitive","$ZodIssueCustom","$ZodIssueStringCommonFormats","Exclude","$ZodIssueStringInvalidRegex","$ZodIssueStringInvalidJWT","$ZodIssueStringStartsWith","$ZodIssueStringEndsWith","$ZodIssueStringIncludes","$ZodStringFormatIssues","$ZodIssueCode","$ZodInternalIssue","T","RawIssue","MakePartial","Flatten","$ZodRawIssue","$ZodErrorMap","$ZodError","Error","$ZodRealError","$ZodFlattenedError","U","_FlattenedError","flattenError","_ZodFormattedError","K","$ZodFormattedError","formatError","$ZodErrorTree","Array","treeifyError","toDotPath","PathSegment","prettifyError","FailureResult"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/errors.d.cts"],"sourcesContent":["import type { $ZodCheck, $ZodStringFormats } from \"./checks.cjs\";\nimport { $constructor } from \"./core.cjs\";\nimport type { $ZodType } from \"./schemas.cjs\";\nimport type { StandardSchemaV1 } from \"./standard-schema.cjs\";\nimport * as util from \"./util.cjs\";\nexport interface $ZodIssueBase {\n readonly code?: string;\n readonly input?: unknown;\n readonly path: PropertyKey[];\n readonly message: string;\n}\nexport interface $ZodIssueInvalidType<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_type\";\n readonly expected: $ZodType[\"_zod\"][\"def\"][\"type\"];\n readonly input?: Input;\n}\nexport interface $ZodIssueTooBig<Input = unknown> extends $ZodIssueBase {\n readonly code: \"too_big\";\n readonly origin: \"number\" | \"int\" | \"bigint\" | \"date\" | \"string\" | \"array\" | \"set\" | \"file\" | (string & {});\n readonly maximum: number | bigint;\n readonly inclusive?: boolean;\n readonly exact?: boolean;\n readonly input?: Input;\n}\nexport interface $ZodIssueTooSmall<Input = unknown> extends $ZodIssueBase {\n readonly code: \"too_small\";\n readonly origin: \"number\" | \"int\" | \"bigint\" | \"date\" | \"string\" | \"array\" | \"set\" | \"file\" | (string & {});\n readonly minimum: number | bigint;\n /** True if the allowable range includes the minimum */\n readonly inclusive?: boolean;\n /** True if the allowed value is fixed (e.g.` z.length(5)`), not a range (`z.minLength(5)`) */\n readonly exact?: boolean;\n readonly input?: Input;\n}\nexport interface $ZodIssueInvalidStringFormat extends $ZodIssueBase {\n readonly code: \"invalid_format\";\n readonly format: $ZodStringFormats | (string & {});\n readonly pattern?: string;\n readonly input?: string;\n}\nexport interface $ZodIssueNotMultipleOf<Input extends number | bigint = number | bigint> extends $ZodIssueBase {\n readonly code: \"not_multiple_of\";\n readonly divisor: number;\n readonly input?: Input;\n}\nexport interface $ZodIssueUnrecognizedKeys extends $ZodIssueBase {\n readonly code: \"unrecognized_keys\";\n readonly keys: string[];\n readonly input?: Record<string, unknown>;\n}\nexport interface $ZodIssueInvalidUnion extends $ZodIssueBase {\n readonly code: \"invalid_union\";\n readonly errors: $ZodIssue[][];\n readonly input?: unknown;\n readonly discriminator?: string | undefined;\n}\nexport interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_key\";\n readonly origin: \"map\" | \"record\";\n readonly issues: $ZodIssue[];\n readonly input?: Input;\n}\nexport interface $ZodIssueInvalidElement<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_element\";\n readonly origin: \"map\" | \"set\";\n readonly key: unknown;\n readonly issues: $ZodIssue[];\n readonly input?: Input;\n}\nexport interface $ZodIssueInvalidValue<Input = unknown> extends $ZodIssueBase {\n readonly code: \"invalid_value\";\n readonly values: util.Primitive[];\n readonly input?: Input;\n}\nexport interface $ZodIssueCustom extends $ZodIssueBase {\n readonly code: \"custom\";\n readonly params?: Record<string, any> | undefined;\n readonly input?: unknown;\n}\nexport interface $ZodIssueStringCommonFormats extends $ZodIssueInvalidStringFormat {\n format: Exclude<$ZodStringFormats, \"regex\" | \"jwt\" | \"starts_with\" | \"ends_with\" | \"includes\">;\n}\nexport interface $ZodIssueStringInvalidRegex extends $ZodIssueInvalidStringFormat {\n format: \"regex\";\n pattern: string;\n}\nexport interface $ZodIssueStringInvalidJWT extends $ZodIssueInvalidStringFormat {\n format: \"jwt\";\n algorithm?: string;\n}\nexport interface $ZodIssueStringStartsWith extends $ZodIssueInvalidStringFormat {\n format: \"starts_with\";\n prefix: string;\n}\nexport interface $ZodIssueStringEndsWith extends $ZodIssueInvalidStringFormat {\n format: \"ends_with\";\n suffix: string;\n}\nexport interface $ZodIssueStringIncludes extends $ZodIssueInvalidStringFormat {\n format: \"includes\";\n includes: string;\n}\nexport type $ZodStringFormatIssues = $ZodIssueStringCommonFormats | $ZodIssueStringInvalidRegex | $ZodIssueStringInvalidJWT | $ZodIssueStringStartsWith | $ZodIssueStringEndsWith | $ZodIssueStringIncludes;\nexport type $ZodIssue = $ZodIssueInvalidType | $ZodIssueTooBig | $ZodIssueTooSmall | $ZodIssueInvalidStringFormat | $ZodIssueNotMultipleOf | $ZodIssueUnrecognizedKeys | $ZodIssueInvalidUnion | $ZodIssueInvalidKey | $ZodIssueInvalidElement | $ZodIssueInvalidValue | $ZodIssueCustom;\nexport type $ZodIssueCode = $ZodIssue[\"code\"];\nexport type $ZodInternalIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;\ntype RawIssue<T extends $ZodIssueBase> = T extends any ? util.Flatten<util.MakePartial<T, \"message\" | \"path\"> & {\n /** The input data */\n readonly input: unknown;\n /** The schema or check that originated this issue. */\n readonly inst?: $ZodType | $ZodCheck;\n /** If `true`, Zod will continue executing checks/refinements after this issue. */\n readonly continue?: boolean | undefined;\n} & Record<string, unknown>> : never;\nexport type $ZodRawIssue<T extends $ZodIssueBase = $ZodIssue> = $ZodInternalIssue<T>;\nexport interface $ZodErrorMap<T extends $ZodIssueBase = $ZodIssue> {\n (issue: $ZodRawIssue<T>): {\n message: string;\n } | string | undefined | null;\n}\nexport interface $ZodError<T = unknown> extends Error {\n type: T;\n issues: $ZodIssue[];\n _zod: {\n output: T;\n def: $ZodIssue[];\n };\n stack?: string;\n name: string;\n}\nexport declare const $ZodError: $constructor<$ZodError>;\ninterface $ZodRealError<T = any> extends $ZodError<T> {\n}\nexport declare const $ZodRealError: $constructor<$ZodRealError>;\nexport type $ZodFlattenedError<T, U = string> = _FlattenedError<T, U>;\ntype _FlattenedError<T, U = string> = {\n formErrors: U[];\n fieldErrors: {\n [P in keyof T]?: U[];\n };\n};\nexport declare function flattenError<T>(error: $ZodError<T>): _FlattenedError<T>;\nexport declare function flattenError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): _FlattenedError<T, U>;\ntype _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? {\n [K in keyof T]?: $ZodFormattedError<T[K], U>;\n} : T extends any[] ? {\n [k: number]: $ZodFormattedError<T[number], U>;\n} : T extends object ? util.Flatten<{\n [K in keyof T]?: $ZodFormattedError<T[K], U>;\n}> : any;\nexport type $ZodFormattedError<T, U = string> = {\n _errors: U[];\n} & util.Flatten<_ZodFormattedError<T, U>>;\nexport declare function formatError<T>(error: $ZodError<T>): $ZodFormattedError<T>;\nexport declare function formatError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodFormattedError<T, U>;\nexport type $ZodErrorTree<T, U = string> = T extends util.Primitive ? {\n errors: U[];\n} : T extends [any, ...any[]] ? {\n errors: U[];\n items?: {\n [K in keyof T]?: $ZodErrorTree<T[K], U>;\n };\n} : T extends any[] ? {\n errors: U[];\n items?: Array<$ZodErrorTree<T[number], U>>;\n} : T extends object ? {\n errors: U[];\n properties?: {\n [K in keyof T]?: $ZodErrorTree<T[K], U>;\n };\n} : {\n errors: U[];\n};\nexport declare function treeifyError<T>(error: $ZodError<T>): $ZodErrorTree<T>;\nexport declare function treeifyError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): $ZodErrorTree<T, U>;\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport declare function toDotPath(_path: readonly (string | number | symbol | StandardSchemaV1.PathSegment)[]): string;\nexport declare function prettifyError(error: StandardSchemaV1.FailureResult): string;\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;UAKiBM,aAAAA;EAAAA,SAAAA,IAAAA,CAAAA,EAAa,MAAA;EAMbE,SAAAA,KAAAA,CAAAA,EAAAA,OAAoB;EAEdL,SAAAA,IAAAA,EALJI,WAKIJ,EAAAA;EACFM,SAAAA,OAAAA,EAAAA,MAAAA;;AAHuD,UAA3DD,oBAA2D,CAAA,QAAA,OAAA,CAAA,SAAbF,aAAa,CAAA;EAK3DI,SAAAA,IAAAA,EAAAA,cAAeD;EAQfE,SAAAA,QAAAA,EAXMR,QAWWM,CAAAA,MAAAA,CAAAA,CAAAA,KAQbA,CAAAA,CAAAA,MARuCH,CAAAA;EAU3CM,SAAAA,KAAAA,CAAAA,EApBIH,KAoBJG;AAMjB;AAKiBE,UA7BAJ,eA6ByB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,SAAA,QAAA,CAAA,EAAA,OAAA,GAAA,SAAA;AAGnC,CAAA,GArCIU,MAqCQiC,CAAAA,MAAAA,EAAAA,OAAkB,CAAA,CAAA,GAAA,KAAAL;AACjBA,KArCDN,YAqCCM,CAAAA,UArCsBrC,aAqCtBqC,GArCsC1B,SAqCtC0B,CAAAA,GArCmDX,iBAqCnDW,CArCqEV,CAqCrEU,CAAAA;AACuBV,UArCnBK,YAqCmBL,CAAAA,UArCI3B,aAqCJ2B,GArCoBhB,SAqCpBgB,CAAAA,CAAAA;EAAGU,CAAAA,KAAAA,EApC3BN,YAoC2BM,CApCdV,CAoCcU,CAAAA,CAAAA,EAAAA;IAAtBG,OAAAA,EAAAA,MAAAA;EAAbzC,CAAAA,GAAAA,MAAAA,GAAAA,SAAAA,GAAAA,IAAAA;;UAhCakC,+BAA+BC;QACtCP;UACEhB;;YAEIgB;SACHhB;;;;;cAKQsB,WAAWrC,aAAaqC;KAIjCG,oCAAoCE,gBAAgBX,GAAGU;KAC9DC;cACWD;6BAEIV,KAAKU;;KAKpBG,oCAAoCb,0CACzBA,KAAKe,mBAAmBf,EAAEc,IAAIJ,OAC1CV;eACae,mBAAmBf,WAAWU;IAC3CV,mBAAmB5B,sBACP4B,KAAKe,mBAAmBf,EAAEc,IAAIJ;KAElCK;WACCL;IACTtC,QAAayC,mBAAmBb,GAAGU"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cossistant/types",
3
3
  "type": "module",
4
- "version": "0.0.11",
4
+ "version": "0.0.14",
5
5
  "private": false,
6
6
  "author": "Cossistant Team",
7
7
  "description": "Shared TypeScript types for Cossistant packages",
@@ -1 +1 @@
1
- {"version":3,"file":"registries.d.ts","names":["core","$ZodType","$output","$input","$replace","Meta","S","output","input","M","P","K","R","MetadataType","$ZodRegistry","Schema","WeakMap","Map","JSONSchemaMeta","GlobalMeta","registry","T","globalRegistry"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/registries.d.cts"],"sourcesContent":["import type * as core from \"./core.cjs\";\nimport type { $ZodType } from \"./schemas.cjs\";\nexport declare const $output: unique symbol;\nexport type $output = typeof $output;\nexport declare const $input: unique symbol;\nexport type $input = typeof $input;\nexport type $replace<Meta, S extends $ZodType> = Meta extends $output ? core.output<S> : Meta extends $input ? core.input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends (...args: infer P) => infer R ? (...args: {\n [K in keyof P]: $replace<P[K], S>;\n}) => $replace<R, S> : Meta extends object ? {\n [K in keyof Meta]: $replace<Meta[K], S>;\n} : Meta;\ntype MetadataType = object | undefined;\nexport declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {\n _meta: Meta;\n _schema: Schema;\n _map: WeakMap<Schema, $replace<Meta, Schema>>;\n _idmap: Map<string, Schema>;\n add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;\n clear(): this;\n remove(schema: Schema): this;\n get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;\n has(schema: Schema): boolean;\n}\nexport interface JSONSchemaMeta {\n id?: string | undefined;\n title?: string | undefined;\n description?: string | undefined;\n deprecated?: boolean | undefined;\n [k: string]: unknown;\n}\nexport interface GlobalMeta extends JSONSchemaMeta {\n}\nexport declare function registry<T extends MetadataType = MetadataType, S extends $ZodType = $ZodType>(): $ZodRegistry<T, S>;\nexport declare const globalRegistry: $ZodRegistry<GlobalMeta>;\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;;cAEqBE;KACTA,OAAAA,UAAiBA;AADRA,cAEAC,MAFsB,EAAA,OAAA,MAAA;AAC/BD,KAEAC,MAAAA,GAFO,OAESA,MAFCD;AACRC,KAETC,QAF8B,CAAA,IAAA,EAAA,UAELH,QAFK,CAAA,GAEOI,IAFP,SAEoBH,OAFpB,GAE8BF,MAF9B,CAE0CM,CAF1C,CAAA,GAE+CD,IAF/C,SAE4DF,MAF5D,GAEqE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XAN,CAAAA,CAAAA,CAAAA,EAAAA,IAAAA;EAAgBK,KAAAA,CAAAA,CAAAA,EAAAA,IAAAA;EAAoCI,MAAAA,CAAAA,MAAAA,EAahJM,MAbgJN,CAAAA,EAAAA,IAAAA;EAAGH,GAAAA,CAAAA,UAcpJS,MAdoJT,CAAAA,CAAAA,MAAAA,EAcpIA,CAdoIA,CAAAA,EAchIF,QAdgIE,CAcvHD,IAduHC,EAcjHA,CAdiHA,CAAAA,GAAAA,SAAAA;EAAZF,GAAAA,CAAAA,MAAAA,EAe1IW,MAf0IX,CAAAA,EAAAA,OAAAA;;AAC1IM,UAgBCQ,cAAAA,CAhBDR;EAAaA,EAAAA,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAEC,KAAAA,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAIL,WAAAA,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAfF,UAAAA,CAAAA,EAAAA,OAAAA,GAAAA,SAAAA;EACLQ,CAAAA,CAAAA,EAAAA,MAAAA,CAAAA,EAAAA,OAAAA;;AAATR,UAsBWe,UAAAA,SAAmBD,cAtB9Bd,CAAAA"}
1
+ {"version":3,"file":"registries.d.ts","names":["core","$ZodType","$output","$input","$replace","Meta","S","output","input","M","P","K","R","MetadataType","$ZodRegistry","Schema","WeakMap","Map","JSONSchemaMeta","GlobalMeta","registry","T","globalRegistry"],"sources":["../../../node_modules/.bun/zod@4.1.12/node_modules/zod/v4/core/registries.d.cts"],"sourcesContent":["import type * as core from \"./core.cjs\";\nimport type { $ZodType } from \"./schemas.cjs\";\nexport declare const $output: unique symbol;\nexport type $output = typeof $output;\nexport declare const $input: unique symbol;\nexport type $input = typeof $input;\nexport type $replace<Meta, S extends $ZodType> = Meta extends $output ? core.output<S> : Meta extends $input ? core.input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends (...args: infer P) => infer R ? (...args: {\n [K in keyof P]: $replace<P[K], S>;\n}) => $replace<R, S> : Meta extends object ? {\n [K in keyof Meta]: $replace<Meta[K], S>;\n} : Meta;\ntype MetadataType = object | undefined;\nexport declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {\n _meta: Meta;\n _schema: Schema;\n _map: WeakMap<Schema, $replace<Meta, Schema>>;\n _idmap: Map<string, Schema>;\n add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;\n clear(): this;\n remove(schema: Schema): this;\n get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;\n has(schema: Schema): boolean;\n}\nexport interface JSONSchemaMeta {\n id?: string | undefined;\n title?: string | undefined;\n description?: string | undefined;\n deprecated?: boolean | undefined;\n [k: string]: unknown;\n}\nexport interface GlobalMeta extends JSONSchemaMeta {\n}\nexport declare function registry<T extends MetadataType = MetadataType, S extends $ZodType = $ZodType>(): $ZodRegistry<T, S>;\nexport declare const globalRegistry: $ZodRegistry<GlobalMeta>;\nexport {};\n"],"x_google_ignoreList":[0],"mappings":";;;;cAEqBE;KACTA,OAAAA,UAAiBA;AADRA,cAEAC,MAFsB,EAAA,OAAA,MAAA;AAC/BD,KAEAC,MAAAA,GAFO,OAESA,MAFCD;AACRC,KAETC,QAF8B,CAAA,IAAA,EAAA,UAELH,QAFK,CAAA,GAEOI,IAFP,SAEoBH,OAFpB,GAE8BF,MAF9B,CAE0CM,CAF1C,CAAA,GAE+CD,IAF/C,SAE4DF,MAF5D,GAEqEH,KAFrE,CAEgFM,CAFhF,CAAA,GAEqFD,IAFrF,SAAA,CAAA,KAAA,EAAA,CAAA,EAAA,GAEgHD,QAFhH,CAEyHK,CAFzH,EAE4HH,CAF5H,CAAA,EAAA,GAEmID,IAFnI,UAAA,CAAA,GAAA,IAAA,EAAA,KAAA,EAAA,EAAA,GAAA,KAAA,EAAA,IAAA,CAAA,GAAA,IAAA,EAAA,QAC9BF,MAEIO,CAFE,GAEEN,QAFQD,CAECO,CAFDP,CAEGQ,CAFHR,C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