diff --git a/_packages/types/package.json b/_packages/types/package.json index c2f119a..bf4c855 100644 --- a/_packages/types/package.json +++ b/_packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@initia/initia-registry-types", - "version": "0.0.13", + "version": "0.0.14", "description": "The package provides TypeScript type definitions and Zod integration for initia-registry.", "types": "./dist/types/index.d.ts", "exports": { diff --git a/_packages/types/src/zods/Chain.ts b/_packages/types/src/zods/Chain.ts index a3c52f3..1dc885d 100644 --- a/_packages/types/src/zods/Chain.ts +++ b/_packages/types/src/zods/Chain.ts @@ -7,7 +7,7 @@ export const ChainSchema = z .regex(new RegExp("^(\\.\\./)+chain\\.schema\\.json$")) .optional(), chain_name: z.string().regex(new RegExp("[a-z0-9]+")), - chain_id: z.string(), + chain_id: z.string().regex(new RegExp("[a-z0-9]+")), pre_fork_chain_name: z.string().regex(new RegExp("[a-z0-9]+")).optional(), pretty_name: z.string().optional(), website: z.string().url().optional(), @@ -333,7 +333,7 @@ export const ChainSchema = z .array( z .object({ - address: z.string(), + address: z.string().url(), provider: z.string().optional(), archive: z.boolean().default(false), }) @@ -344,7 +344,7 @@ export const ChainSchema = z .array( z .object({ - address: z.string(), + address: z.string().url(), provider: z.string().optional(), archive: z.boolean().default(false), }) @@ -355,7 +355,7 @@ export const ChainSchema = z .array( z .object({ - address: z.string(), + address: z.string().url(), provider: z.string().optional(), archive: z.boolean().default(false), }) @@ -366,7 +366,7 @@ export const ChainSchema = z .array( z .object({ - address: z.string(), + address: z.string().url(), provider: z.string().optional(), archive: z.boolean().default(false), }) @@ -377,7 +377,7 @@ export const ChainSchema = z .array( z .object({ - address: z.string(), + address: z.string().url(), provider: z.string().optional(), archive: z.boolean().default(false), }) @@ -388,7 +388,7 @@ export const ChainSchema = z .array( z .object({ - address: z.string(), + address: z.string().url(), provider: z.string().optional(), archive: z.boolean().default(false), }) @@ -399,7 +399,7 @@ export const ChainSchema = z .array( z .object({ - address: z.string(), + address: z.string().url(), provider: z.string().optional(), archive: z.boolean().default(false), }) @@ -414,7 +414,7 @@ export const ChainSchema = z z .object({ kind: z.string().optional(), - url: z.string().optional(), + url: z.string().url().optional(), tx_page: z.string().optional(), account_page: z.string().optional(), }) @@ -424,7 +424,10 @@ export const ChainSchema = z faucets: z .array( z - .object({ kind: z.string().optional(), url: z.string().optional() }) + .object({ + kind: z.string().optional(), + url: z.string().url().optional(), + }) .strict() ) .optional(), diff --git a/chain.schema.json b/chain.schema.json index 684c76e..21ee67b 100644 --- a/chain.schema.json +++ b/chain.schema.json @@ -18,7 +18,8 @@ "pattern": "[a-z0-9]+" }, "chain_id": { - "type": "string" + "type": "string", + "pattern": "[a-z0-9]+" }, "pre_fork_chain_name": { "type": "string", @@ -701,7 +702,8 @@ ], "properties": { "address": { - "type": "string" + "type": "string", + "format": "uri" }, "provider": { "type": "string" @@ -720,7 +722,8 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" }, "tx_page": { "type": "string" @@ -738,7 +741,8 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" } }, "additionalProperties": false