@nakanoaas/notion-valibot-schema 0.2.2 → 0.6.0
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.
- package/README.md +33 -10
- package/dist/_virtual/_rolldown/runtime.cjs +7 -13
- package/dist/checkbox.cjs +3 -4
- package/dist/checkbox.cjs.map +1 -1
- package/dist/checkbox.mjs +1 -2
- package/dist/checkbox.mjs.map +1 -1
- package/dist/created-by.cjs +4 -5
- package/dist/created-by.cjs.map +1 -1
- package/dist/created-by.mjs +1 -2
- package/dist/created-by.mjs.map +1 -1
- package/dist/created-time.cjs +3 -4
- package/dist/created-time.cjs.map +1 -1
- package/dist/created-time.mjs +1 -2
- package/dist/created-time.mjs.map +1 -1
- package/dist/date.cjs +3 -4
- package/dist/date.cjs.map +1 -1
- package/dist/date.mjs +1 -2
- package/dist/date.mjs.map +1 -1
- package/dist/email.cjs +3 -4
- package/dist/email.cjs.map +1 -1
- package/dist/email.mjs +1 -2
- package/dist/email.mjs.map +1 -1
- package/dist/files.cjs +123 -14
- package/dist/files.cjs.map +1 -1
- package/dist/files.d.cts +132 -4
- package/dist/files.d.mts +132 -4
- package/dist/files.mjs +119 -12
- package/dist/files.mjs.map +1 -1
- package/dist/formula.cjs +123 -23
- package/dist/formula.cjs.map +1 -1
- package/dist/formula.d.cts +150 -41
- package/dist/formula.d.mts +150 -41
- package/dist/formula.mjs +118 -22
- package/dist/formula.mjs.map +1 -1
- package/dist/index.cjs +32 -26
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -5
- package/dist/last-edited-by.cjs +4 -5
- package/dist/last-edited-by.cjs.map +1 -1
- package/dist/last-edited-by.mjs +1 -2
- package/dist/last-edited-by.mjs.map +1 -1
- package/dist/last-edited-time.cjs +3 -4
- package/dist/last-edited-time.cjs.map +1 -1
- package/dist/last-edited-time.mjs +1 -2
- package/dist/last-edited-time.mjs.map +1 -1
- package/dist/multi-select.cjs +3 -4
- package/dist/multi-select.cjs.map +1 -1
- package/dist/multi-select.mjs +1 -2
- package/dist/multi-select.mjs.map +1 -1
- package/dist/number.cjs +3 -4
- package/dist/number.cjs.map +1 -1
- package/dist/number.mjs +1 -2
- package/dist/number.mjs.map +1 -1
- package/dist/people.cjs +3 -4
- package/dist/people.cjs.map +1 -1
- package/dist/people.mjs +1 -2
- package/dist/people.mjs.map +1 -1
- package/dist/phone-number.cjs +3 -4
- package/dist/phone-number.cjs.map +1 -1
- package/dist/phone-number.mjs +1 -2
- package/dist/phone-number.mjs.map +1 -1
- package/dist/place.cjs +3 -4
- package/dist/place.cjs.map +1 -1
- package/dist/place.mjs +1 -2
- package/dist/place.mjs.map +1 -1
- package/dist/relation.cjs +3 -4
- package/dist/relation.cjs.map +1 -1
- package/dist/relation.mjs +1 -2
- package/dist/relation.mjs.map +1 -1
- package/dist/rollup.cjs +70 -5
- package/dist/rollup.cjs.map +1 -1
- package/dist/rollup.d.cts +70 -1
- package/dist/rollup.d.mts +70 -1
- package/dist/rollup.mjs +67 -3
- package/dist/rollup.mjs.map +1 -1
- package/dist/select.cjs +3 -4
- package/dist/select.cjs.map +1 -1
- package/dist/select.mjs +1 -2
- package/dist/select.mjs.map +1 -1
- package/dist/status.cjs +3 -4
- package/dist/status.cjs.map +1 -1
- package/dist/status.mjs +1 -2
- package/dist/status.mjs.map +1 -1
- package/dist/text.cjs +3 -4
- package/dist/text.cjs.map +1 -1
- package/dist/text.mjs +1 -2
- package/dist/text.mjs.map +1 -1
- package/dist/unique-id.cjs +3 -4
- package/dist/unique-id.cjs.map +1 -1
- package/dist/unique-id.mjs +1 -2
- package/dist/unique-id.mjs.map +1 -1
- package/dist/url.cjs +3 -4
- package/dist/url.cjs.map +1 -1
- package/dist/url.mjs +1 -2
- package/dist/url.mjs.map +1 -1
- package/dist/verification.cjs +5 -6
- package/dist/verification.cjs.map +1 -1
- package/dist/verification.mjs +1 -2
- package/dist/verification.mjs.map +1 -1
- package/package.json +4 -4
package/dist/select.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.cjs","names":["v"],"sources":["../src/select.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema factory to extract the `select` property from a Notion page property.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed select values. The select property in Notion contains an object with\n * a `name` field that can be validated using the provided schema.\n *\n * **Input:**\n * ```\n * {\n * select: {\n * name: string;\n * };\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter.\n * For example, if `v.string()` is passed, the output will be `string`.\n *\n * @param schema - A schema that validates the select option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { SelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: SelectSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { SelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusSchema = v.picklist([\"todo\", \"in-progress\", \"done\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: SelectSchema(StatusSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"todo\" | \"in-progress\" | \"done\"\n * ```\n */\nexport function SelectSchema<S extends v.GenericSchema<string>>(schema: S) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tselect: v.object({\n\t\t\t\tname: schema,\n\t\t\t}),\n\t\t}),\n\t\t// biome-ignore lint/style/noNonNullAssertion: valibot inference is not working correctly\n\t\tv.transform((v) => v.select.name!),\n\t);\n}\n\n/**\n * Schema factory to extract the `select` property from a Notion page property or `null`.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed select values. The select property in Notion contains an object with\n * a `name` field that can be validated using the provided schema, or `null` if not set.\n *\n * **Input:**\n * ```\n * {\n * select: {\n * name: string;\n * } | null;\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter, or `null`.\n * For example, if `v.string()` is passed, the output will be `string | null`.\n *\n * @param schema - A schema that validates the select option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableSelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableSelectSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableSelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusSchema = v.picklist([\"todo\", \"in-progress\", \"done\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableSelectSchema(StatusSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"todo\" | \"in-progress\" | \"done\" | null\n * ```\n */\nexport function NullableSelectSchema<S extends v.GenericSchema<string>>(\n\tschema: S,\n) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tselect: v.nullable(\n\t\t\t\tv.object({\n\t\t\t\t\tname: schema,\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t\tv.transform((v) => v.select?.name ?? null),\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.cjs","names":["v"],"sources":["../src/select.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema factory to extract the `select` property from a Notion page property.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed select values. The select property in Notion contains an object with\n * a `name` field that can be validated using the provided schema.\n *\n * **Input:**\n * ```\n * {\n * select: {\n * name: string;\n * };\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter.\n * For example, if `v.string()` is passed, the output will be `string`.\n *\n * @param schema - A schema that validates the select option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { SelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: SelectSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { SelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusSchema = v.picklist([\"todo\", \"in-progress\", \"done\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: SelectSchema(StatusSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"todo\" | \"in-progress\" | \"done\"\n * ```\n */\nexport function SelectSchema<S extends v.GenericSchema<string>>(schema: S) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tselect: v.object({\n\t\t\t\tname: schema,\n\t\t\t}),\n\t\t}),\n\t\t// biome-ignore lint/style/noNonNullAssertion: valibot inference is not working correctly\n\t\tv.transform((v) => v.select.name!),\n\t);\n}\n\n/**\n * Schema factory to extract the `select` property from a Notion page property or `null`.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed select values. The select property in Notion contains an object with\n * a `name` field that can be validated using the provided schema, or `null` if not set.\n *\n * **Input:**\n * ```\n * {\n * select: {\n * name: string;\n * } | null;\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter, or `null`.\n * For example, if `v.string()` is passed, the output will be `string | null`.\n *\n * @param schema - A schema that validates the select option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableSelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableSelectSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableSelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusSchema = v.picklist([\"todo\", \"in-progress\", \"done\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableSelectSchema(StatusSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"todo\" | \"in-progress\" | \"done\" | null\n * ```\n */\nexport function NullableSelectSchema<S extends v.GenericSchema<string>>(\n\tschema: S,\n) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tselect: v.nullable(\n\t\t\t\tv.object({\n\t\t\t\t\tname: schema,\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t\tv.transform((v) => v.select?.name ?? null),\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,aAAgD,QAAW;CAC1E,OAAOA,QAAE,KACRA,QAAE,OAAO,EACR,QAAQA,QAAE,OAAO,EAChB,MAAM,OACP,CAAC,EACF,CAAC,GAEDA,QAAE,WAAW,MAAM,EAAE,OAAO,IAAK,CAClC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,qBACf,QACC;CACD,OAAOA,QAAE,KACRA,QAAE,OAAO,EACR,QAAQA,QAAE,SACTA,QAAE,OAAO,EACR,MAAM,OACP,CAAC,CACF,EACD,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,QAAQ,QAAQ,IAAI,CAC1C;AACD"}
|
package/dist/select.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
2
|
//#region src/select.ts
|
|
4
3
|
/**
|
|
5
4
|
* Schema factory to extract the `select` property from a Notion page property.
|
|
@@ -127,7 +126,7 @@ function SelectSchema(schema) {
|
|
|
127
126
|
function NullableSelectSchema(schema) {
|
|
128
127
|
return v.pipe(v.object({ select: v.nullable(v.object({ name: schema })) }), v.transform((v) => v.select?.name ?? null));
|
|
129
128
|
}
|
|
130
|
-
|
|
131
129
|
//#endregion
|
|
132
130
|
export { NullableSelectSchema, SelectSchema };
|
|
131
|
+
|
|
133
132
|
//# sourceMappingURL=select.mjs.map
|
package/dist/select.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.mjs","names":[],"sources":["../src/select.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema factory to extract the `select` property from a Notion page property.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed select values. The select property in Notion contains an object with\n * a `name` field that can be validated using the provided schema.\n *\n * **Input:**\n * ```\n * {\n * select: {\n * name: string;\n * };\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter.\n * For example, if `v.string()` is passed, the output will be `string`.\n *\n * @param schema - A schema that validates the select option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { SelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: SelectSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { SelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusSchema = v.picklist([\"todo\", \"in-progress\", \"done\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: SelectSchema(StatusSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"todo\" | \"in-progress\" | \"done\"\n * ```\n */\nexport function SelectSchema<S extends v.GenericSchema<string>>(schema: S) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tselect: v.object({\n\t\t\t\tname: schema,\n\t\t\t}),\n\t\t}),\n\t\t// biome-ignore lint/style/noNonNullAssertion: valibot inference is not working correctly\n\t\tv.transform((v) => v.select.name!),\n\t);\n}\n\n/**\n * Schema factory to extract the `select` property from a Notion page property or `null`.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed select values. The select property in Notion contains an object with\n * a `name` field that can be validated using the provided schema, or `null` if not set.\n *\n * **Input:**\n * ```\n * {\n * select: {\n * name: string;\n * } | null;\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter, or `null`.\n * For example, if `v.string()` is passed, the output will be `string | null`.\n *\n * @param schema - A schema that validates the select option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableSelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableSelectSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableSelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusSchema = v.picklist([\"todo\", \"in-progress\", \"done\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableSelectSchema(StatusSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"todo\" | \"in-progress\" | \"done\" | null\n * ```\n */\nexport function NullableSelectSchema<S extends v.GenericSchema<string>>(\n\tschema: S,\n) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tselect: v.nullable(\n\t\t\t\tv.object({\n\t\t\t\t\tname: schema,\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t\tv.transform((v) => v.select?.name ?? null),\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.mjs","names":[],"sources":["../src/select.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema factory to extract the `select` property from a Notion page property.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed select values. The select property in Notion contains an object with\n * a `name` field that can be validated using the provided schema.\n *\n * **Input:**\n * ```\n * {\n * select: {\n * name: string;\n * };\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter.\n * For example, if `v.string()` is passed, the output will be `string`.\n *\n * @param schema - A schema that validates the select option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { SelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: SelectSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { SelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusSchema = v.picklist([\"todo\", \"in-progress\", \"done\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: SelectSchema(StatusSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"todo\" | \"in-progress\" | \"done\"\n * ```\n */\nexport function SelectSchema<S extends v.GenericSchema<string>>(schema: S) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tselect: v.object({\n\t\t\t\tname: schema,\n\t\t\t}),\n\t\t}),\n\t\t// biome-ignore lint/style/noNonNullAssertion: valibot inference is not working correctly\n\t\tv.transform((v) => v.select.name!),\n\t);\n}\n\n/**\n * Schema factory to extract the `select` property from a Notion page property or `null`.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed select values. The select property in Notion contains an object with\n * a `name` field that can be validated using the provided schema, or `null` if not set.\n *\n * **Input:**\n * ```\n * {\n * select: {\n * name: string;\n * } | null;\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter, or `null`.\n * For example, if `v.string()` is passed, the output will be `string | null`.\n *\n * @param schema - A schema that validates the select option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableSelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableSelectSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableSelectSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusSchema = v.picklist([\"todo\", \"in-progress\", \"done\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableSelectSchema(StatusSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"todo\" | \"in-progress\" | \"done\" | null\n * ```\n */\nexport function NullableSelectSchema<S extends v.GenericSchema<string>>(\n\tschema: S,\n) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tselect: v.nullable(\n\t\t\t\tv.object({\n\t\t\t\t\tname: schema,\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t\tv.transform((v) => v.select?.name ?? null),\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,aAAgD,QAAW;CAC1E,OAAO,EAAE,KACR,EAAE,OAAO,EACR,QAAQ,EAAE,OAAO,EAChB,MAAM,OACP,CAAC,EACF,CAAC,GAED,EAAE,WAAW,MAAM,EAAE,OAAO,IAAK,CAClC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,qBACf,QACC;CACD,OAAO,EAAE,KACR,EAAE,OAAO,EACR,QAAQ,EAAE,SACT,EAAE,OAAO,EACR,MAAM,OACP,CAAC,CACF,EACD,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,QAAQ,QAAQ,IAAI,CAC1C;AACD"}
|
package/dist/status.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
const require_runtime = require(
|
|
1
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
let valibot = require("valibot");
|
|
3
|
-
valibot = require_runtime.__toESM(valibot);
|
|
4
|
-
|
|
3
|
+
valibot = require_runtime.__toESM(valibot, 1);
|
|
5
4
|
//#region src/status.ts
|
|
6
5
|
/**
|
|
7
6
|
* Schema factory to extract the `status` property from a Notion page property.
|
|
@@ -129,8 +128,8 @@ function StatusSchema(schema) {
|
|
|
129
128
|
function NullableStatusSchema(schema) {
|
|
130
129
|
return valibot.pipe(valibot.object({ status: valibot.nullable(valibot.object({ name: schema })) }), valibot.transform((v) => v.status?.name ?? null));
|
|
131
130
|
}
|
|
132
|
-
|
|
133
131
|
//#endregion
|
|
134
132
|
exports.NullableStatusSchema = NullableStatusSchema;
|
|
135
133
|
exports.StatusSchema = StatusSchema;
|
|
134
|
+
|
|
136
135
|
//# sourceMappingURL=status.cjs.map
|
package/dist/status.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.cjs","names":["v"],"sources":["../src/status.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema factory to extract the `status` property from a Notion page property.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed status values. The status property in Notion contains an object with\n * a `name` field that can be validated using the provided schema.\n *\n * **Input:**\n * ```\n * {\n * status: {\n * name: string;\n * };\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter.\n * For example, if `v.string()` is passed, the output will be `string`.\n *\n * @param schema - A schema that validates the status option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { StatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: StatusSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { StatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusOptionSchema = v.picklist([\"not-started\", \"in-progress\", \"completed\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: StatusSchema(StatusOptionSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"not-started\" | \"in-progress\" | \"completed\"\n * ```\n */\nexport function StatusSchema<S extends v.GenericSchema<string>>(schema: S) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tstatus: v.object({\n\t\t\t\tname: schema,\n\t\t\t}),\n\t\t}),\n\t\t// biome-ignore lint/style/noNonNullAssertion: valibot inference is not working correctly\n\t\tv.transform((v) => v.status.name!),\n\t);\n}\n\n/**\n * Schema factory to extract the `status` property from a Notion page property or `null`.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed status values. The status property in Notion contains an object with\n * a `name` field that can be validated using the provided schema, or `null` if not set.\n *\n * **Input:**\n * ```\n * {\n * status: {\n * name: string;\n * } | null;\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter, or `null`.\n * For example, if `v.string()` is passed, the output will be `string | null`.\n *\n * @param schema - A schema that validates the status option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableStatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableStatusSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableStatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusOptionSchema = v.picklist([\"not-started\", \"in-progress\", \"completed\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableStatusSchema(StatusOptionSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"not-started\" | \"in-progress\" | \"completed\" | null\n * ```\n */\nexport function NullableStatusSchema<S extends v.GenericSchema<string>>(\n\tschema: S,\n) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tstatus: v.nullable(\n\t\t\t\tv.object({\n\t\t\t\t\tname: schema,\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t\tv.transform((v) => v.status?.name ?? null),\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.cjs","names":["v"],"sources":["../src/status.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema factory to extract the `status` property from a Notion page property.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed status values. The status property in Notion contains an object with\n * a `name` field that can be validated using the provided schema.\n *\n * **Input:**\n * ```\n * {\n * status: {\n * name: string;\n * };\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter.\n * For example, if `v.string()` is passed, the output will be `string`.\n *\n * @param schema - A schema that validates the status option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { StatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: StatusSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { StatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusOptionSchema = v.picklist([\"not-started\", \"in-progress\", \"completed\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: StatusSchema(StatusOptionSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"not-started\" | \"in-progress\" | \"completed\"\n * ```\n */\nexport function StatusSchema<S extends v.GenericSchema<string>>(schema: S) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tstatus: v.object({\n\t\t\t\tname: schema,\n\t\t\t}),\n\t\t}),\n\t\t// biome-ignore lint/style/noNonNullAssertion: valibot inference is not working correctly\n\t\tv.transform((v) => v.status.name!),\n\t);\n}\n\n/**\n * Schema factory to extract the `status` property from a Notion page property or `null`.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed status values. The status property in Notion contains an object with\n * a `name` field that can be validated using the provided schema, or `null` if not set.\n *\n * **Input:**\n * ```\n * {\n * status: {\n * name: string;\n * } | null;\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter, or `null`.\n * For example, if `v.string()` is passed, the output will be `string | null`.\n *\n * @param schema - A schema that validates the status option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableStatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableStatusSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableStatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusOptionSchema = v.picklist([\"not-started\", \"in-progress\", \"completed\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableStatusSchema(StatusOptionSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"not-started\" | \"in-progress\" | \"completed\" | null\n * ```\n */\nexport function NullableStatusSchema<S extends v.GenericSchema<string>>(\n\tschema: S,\n) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tstatus: v.nullable(\n\t\t\t\tv.object({\n\t\t\t\t\tname: schema,\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t\tv.transform((v) => v.status?.name ?? null),\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,aAAgD,QAAW;CAC1E,OAAOA,QAAE,KACRA,QAAE,OAAO,EACR,QAAQA,QAAE,OAAO,EAChB,MAAM,OACP,CAAC,EACF,CAAC,GAEDA,QAAE,WAAW,MAAM,EAAE,OAAO,IAAK,CAClC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,qBACf,QACC;CACD,OAAOA,QAAE,KACRA,QAAE,OAAO,EACR,QAAQA,QAAE,SACTA,QAAE,OAAO,EACR,MAAM,OACP,CAAC,CACF,EACD,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,QAAQ,QAAQ,IAAI,CAC1C;AACD"}
|
package/dist/status.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
2
|
//#region src/status.ts
|
|
4
3
|
/**
|
|
5
4
|
* Schema factory to extract the `status` property from a Notion page property.
|
|
@@ -127,7 +126,7 @@ function StatusSchema(schema) {
|
|
|
127
126
|
function NullableStatusSchema(schema) {
|
|
128
127
|
return v.pipe(v.object({ status: v.nullable(v.object({ name: schema })) }), v.transform((v) => v.status?.name ?? null));
|
|
129
128
|
}
|
|
130
|
-
|
|
131
129
|
//#endregion
|
|
132
130
|
export { NullableStatusSchema, StatusSchema };
|
|
131
|
+
|
|
133
132
|
//# sourceMappingURL=status.mjs.map
|
package/dist/status.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.mjs","names":[],"sources":["../src/status.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema factory to extract the `status` property from a Notion page property.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed status values. The status property in Notion contains an object with\n * a `name` field that can be validated using the provided schema.\n *\n * **Input:**\n * ```\n * {\n * status: {\n * name: string;\n * };\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter.\n * For example, if `v.string()` is passed, the output will be `string`.\n *\n * @param schema - A schema that validates the status option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { StatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: StatusSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { StatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusOptionSchema = v.picklist([\"not-started\", \"in-progress\", \"completed\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: StatusSchema(StatusOptionSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"not-started\" | \"in-progress\" | \"completed\"\n * ```\n */\nexport function StatusSchema<S extends v.GenericSchema<string>>(schema: S) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tstatus: v.object({\n\t\t\t\tname: schema,\n\t\t\t}),\n\t\t}),\n\t\t// biome-ignore lint/style/noNonNullAssertion: valibot inference is not working correctly\n\t\tv.transform((v) => v.status.name!),\n\t);\n}\n\n/**\n * Schema factory to extract the `status` property from a Notion page property or `null`.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed status values. The status property in Notion contains an object with\n * a `name` field that can be validated using the provided schema, or `null` if not set.\n *\n * **Input:**\n * ```\n * {\n * status: {\n * name: string;\n * } | null;\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter, or `null`.\n * For example, if `v.string()` is passed, the output will be `string | null`.\n *\n * @param schema - A schema that validates the status option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableStatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableStatusSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableStatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusOptionSchema = v.picklist([\"not-started\", \"in-progress\", \"completed\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableStatusSchema(StatusOptionSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"not-started\" | \"in-progress\" | \"completed\" | null\n * ```\n */\nexport function NullableStatusSchema<S extends v.GenericSchema<string>>(\n\tschema: S,\n) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tstatus: v.nullable(\n\t\t\t\tv.object({\n\t\t\t\t\tname: schema,\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t\tv.transform((v) => v.status?.name ?? null),\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.mjs","names":[],"sources":["../src/status.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema factory to extract the `status` property from a Notion page property.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed status values. The status property in Notion contains an object with\n * a `name` field that can be validated using the provided schema.\n *\n * **Input:**\n * ```\n * {\n * status: {\n * name: string;\n * };\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter.\n * For example, if `v.string()` is passed, the output will be `string`.\n *\n * @param schema - A schema that validates the status option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { StatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: StatusSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { StatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusOptionSchema = v.picklist([\"not-started\", \"in-progress\", \"completed\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: StatusSchema(StatusOptionSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"not-started\" | \"in-progress\" | \"completed\"\n * ```\n */\nexport function StatusSchema<S extends v.GenericSchema<string>>(schema: S) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tstatus: v.object({\n\t\t\t\tname: schema,\n\t\t\t}),\n\t\t}),\n\t\t// biome-ignore lint/style/noNonNullAssertion: valibot inference is not working correctly\n\t\tv.transform((v) => v.status.name!),\n\t);\n}\n\n/**\n * Schema factory to extract the `status` property from a Notion page property or `null`.\n *\n * This is a generic schema factory that accepts another schema as a parameter,\n * allowing you to combine it with other schemas in this library to extract\n * typed status values. The status property in Notion contains an object with\n * a `name` field that can be validated using the provided schema, or `null` if not set.\n *\n * **Input:**\n * ```\n * {\n * status: {\n * name: string;\n * } | null;\n * }\n * ```\n *\n * **Output:** The output type depends on the schema passed as a parameter, or `null`.\n * For example, if `v.string()` is passed, the output will be `string | null`.\n *\n * @param schema - A schema that validates the status option name.\n * Must accept a string value.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableStatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableStatusSchema(v.string()),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: string | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableStatusSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * // Custom schema for enum values\n * const StatusOptionSchema = v.picklist([\"not-started\", \"in-progress\", \"completed\"]);\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Status: NullableStatusSchema(StatusOptionSchema),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Status: \"not-started\" | \"in-progress\" | \"completed\" | null\n * ```\n */\nexport function NullableStatusSchema<S extends v.GenericSchema<string>>(\n\tschema: S,\n) {\n\treturn v.pipe(\n\t\tv.object({\n\t\t\tstatus: v.nullable(\n\t\t\t\tv.object({\n\t\t\t\t\tname: schema,\n\t\t\t\t}),\n\t\t\t),\n\t\t}),\n\t\tv.transform((v) => v.status?.name ?? null),\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,aAAgD,QAAW;CAC1E,OAAO,EAAE,KACR,EAAE,OAAO,EACR,QAAQ,EAAE,OAAO,EAChB,MAAM,OACP,CAAC,EACF,CAAC,GAED,EAAE,WAAW,MAAM,EAAE,OAAO,IAAK,CAClC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,SAAgB,qBACf,QACC;CACD,OAAO,EAAE,KACR,EAAE,OAAO,EACR,QAAQ,EAAE,SACT,EAAE,OAAO,EACR,MAAM,OACP,CAAC,CACF,EACD,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,QAAQ,QAAQ,IAAI,CAC1C;AACD"}
|
package/dist/text.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
const require_runtime = require(
|
|
1
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
let valibot = require("valibot");
|
|
3
|
-
valibot = require_runtime.__toESM(valibot);
|
|
4
|
-
|
|
3
|
+
valibot = require_runtime.__toESM(valibot, 1);
|
|
5
4
|
//#region src/text.ts
|
|
6
5
|
/**
|
|
7
6
|
* Schema for a Notion rich text array structure.
|
|
@@ -178,10 +177,10 @@ const RichTextSchema = valibot.pipe(valibot.object({ rich_text: RichTextItemArra
|
|
|
178
177
|
* ```
|
|
179
178
|
*/
|
|
180
179
|
const NullableRichTextSchema = valibot.pipe(valibot.object({ rich_text: RichTextItemArraySchema }), valibot.transform((v) => v.rich_text.map((v) => v.plain_text).join("") || null));
|
|
181
|
-
|
|
182
180
|
//#endregion
|
|
183
181
|
exports.NullableRichTextSchema = NullableRichTextSchema;
|
|
184
182
|
exports.NullableTitleSchema = NullableTitleSchema;
|
|
185
183
|
exports.RichTextSchema = RichTextSchema;
|
|
186
184
|
exports.TitleSchema = TitleSchema;
|
|
185
|
+
|
|
187
186
|
//# sourceMappingURL=text.cjs.map
|
package/dist/text.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.cjs","names":["v"],"sources":["../src/text.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema for a Notion rich text array structure.\n *\n * **Input:**\n * ```\n * Array<{\n * plain_text: string;\n * }>\n * ```\n *\n * **Output:**\n * ```\n * Array<{\n * plain_text: string;\n * }>\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { RichTextItemArraySchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Text: v.object({\n * rich_text: RichTextItemArraySchema,\n * }),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Text.rich_text: Array<{ plain_text: string }>\n * ```\n *\n * @internal\n */\nconst RichTextItemArraySchema = v.array(\n\tv.object({\n\t\tplain_text: v.string(),\n\t}),\n);\n\n/**\n * Schema to extract the `title` property from a Notion page property and transform it to a string.\n *\n * **Input:**\n * ```\n * {\n * title: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string` (non-empty)\n *\n * This schema validates that the resulting string is non-empty. Empty arrays or arrays with only empty `plain_text` values will be rejected.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { TitleSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Title: TitleSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Title: string\n * ```\n */\nexport const TitleSchema = v.pipe(\n\tv.object({\n\t\ttitle: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.title.map((v) => v.plain_text).join(\"\")),\n\tv.nonEmpty(),\n);\n\n/**\n * Schema to extract the `title` property from a Notion page property and transform it to a string or `null`.\n *\n * **Input:**\n * ```\n * {\n * title: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * If the `title` array is empty or all `plain_text` values are empty strings, this schema returns `null`. Otherwise, it joins all `plain_text` values into a single string.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableTitleSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Title: NullableTitleSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Title: string | null\n * ```\n */\nexport const NullableTitleSchema = v.pipe(\n\tv.object({\n\t\ttitle: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.title.map((v) => v.plain_text).join(\"\") || null),\n);\n\n/**\n * Schema to extract the `rich_text` property from a Notion page property and transform it to a string.\n *\n * **Input:**\n * ```\n * {\n * rich_text: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string` (non-empty)\n *\n * This schema validates that the resulting string is non-empty. Empty arrays or arrays with only empty `plain_text` values will be rejected.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { RichTextSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Description: RichTextSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Description: string\n * ```\n */\nexport const RichTextSchema = v.pipe(\n\tv.object({\n\t\trich_text: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.rich_text.map((v) => v.plain_text).join(\"\")),\n\tv.nonEmpty(),\n);\n\n/**\n * Schema to extract the `rich_text` property from a Notion page property and transform it to a string or `null`.\n *\n * **Input:**\n * ```\n * {\n * rich_text: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * If the `rich_text` array is empty or all `plain_text` values are empty strings, this schema returns `null`. Otherwise, it joins all `plain_text` values into a single string.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableRichTextSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Description: NullableRichTextSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Description: string | null\n * ```\n */\nexport const NullableRichTextSchema = v.pipe(\n\tv.object({\n\t\trich_text: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.rich_text.map((v) => v.plain_text).join(\"\") || null),\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"text.cjs","names":["v"],"sources":["../src/text.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema for a Notion rich text array structure.\n *\n * **Input:**\n * ```\n * Array<{\n * plain_text: string;\n * }>\n * ```\n *\n * **Output:**\n * ```\n * Array<{\n * plain_text: string;\n * }>\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { RichTextItemArraySchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Text: v.object({\n * rich_text: RichTextItemArraySchema,\n * }),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Text.rich_text: Array<{ plain_text: string }>\n * ```\n *\n * @internal\n */\nconst RichTextItemArraySchema = v.array(\n\tv.object({\n\t\tplain_text: v.string(),\n\t}),\n);\n\n/**\n * Schema to extract the `title` property from a Notion page property and transform it to a string.\n *\n * **Input:**\n * ```\n * {\n * title: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string` (non-empty)\n *\n * This schema validates that the resulting string is non-empty. Empty arrays or arrays with only empty `plain_text` values will be rejected.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { TitleSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Title: TitleSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Title: string\n * ```\n */\nexport const TitleSchema = v.pipe(\n\tv.object({\n\t\ttitle: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.title.map((v) => v.plain_text).join(\"\")),\n\tv.nonEmpty(),\n);\n\n/**\n * Schema to extract the `title` property from a Notion page property and transform it to a string or `null`.\n *\n * **Input:**\n * ```\n * {\n * title: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * If the `title` array is empty or all `plain_text` values are empty strings, this schema returns `null`. Otherwise, it joins all `plain_text` values into a single string.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableTitleSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Title: NullableTitleSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Title: string | null\n * ```\n */\nexport const NullableTitleSchema = v.pipe(\n\tv.object({\n\t\ttitle: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.title.map((v) => v.plain_text).join(\"\") || null),\n);\n\n/**\n * Schema to extract the `rich_text` property from a Notion page property and transform it to a string.\n *\n * **Input:**\n * ```\n * {\n * rich_text: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string` (non-empty)\n *\n * This schema validates that the resulting string is non-empty. Empty arrays or arrays with only empty `plain_text` values will be rejected.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { RichTextSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Description: RichTextSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Description: string\n * ```\n */\nexport const RichTextSchema = v.pipe(\n\tv.object({\n\t\trich_text: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.rich_text.map((v) => v.plain_text).join(\"\")),\n\tv.nonEmpty(),\n);\n\n/**\n * Schema to extract the `rich_text` property from a Notion page property and transform it to a string or `null`.\n *\n * **Input:**\n * ```\n * {\n * rich_text: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * If the `rich_text` array is empty or all `plain_text` values are empty strings, this schema returns `null`. Otherwise, it joins all `plain_text` values into a single string.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableRichTextSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Description: NullableRichTextSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Description: string | null\n * ```\n */\nexport const NullableRichTextSchema = v.pipe(\n\tv.object({\n\t\trich_text: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.rich_text.map((v) => v.plain_text).join(\"\") || null),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAM,0BAA0BA,QAAE,MACjCA,QAAE,OAAO,EACR,YAAYA,QAAE,OAAO,EACtB,CAAC,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAa,cAAcA,QAAE,KAC5BA,QAAE,OAAO,EACR,OAAO,wBACR,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,MAAM,KAAK,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,CAAC,GAC5DA,QAAE,SAAS,CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAa,sBAAsBA,QAAE,KACpCA,QAAE,OAAO,EACR,OAAO,wBACR,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,MAAM,KAAK,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,KAAK,IAAI,CACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAa,iBAAiBA,QAAE,KAC/BA,QAAE,OAAO,EACR,WAAW,wBACZ,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,UAAU,KAAK,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,CAAC,GAChEA,QAAE,SAAS,CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAa,yBAAyBA,QAAE,KACvCA,QAAE,OAAO,EACR,WAAW,wBACZ,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,UAAU,KAAK,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,KAAK,IAAI,CACzE"}
|
package/dist/text.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
2
|
//#region src/text.ts
|
|
4
3
|
/**
|
|
5
4
|
* Schema for a Notion rich text array structure.
|
|
@@ -176,7 +175,7 @@ const RichTextSchema = v.pipe(v.object({ rich_text: RichTextItemArraySchema }),
|
|
|
176
175
|
* ```
|
|
177
176
|
*/
|
|
178
177
|
const NullableRichTextSchema = v.pipe(v.object({ rich_text: RichTextItemArraySchema }), v.transform((v) => v.rich_text.map((v) => v.plain_text).join("") || null));
|
|
179
|
-
|
|
180
178
|
//#endregion
|
|
181
179
|
export { NullableRichTextSchema, NullableTitleSchema, RichTextSchema, TitleSchema };
|
|
180
|
+
|
|
182
181
|
//# sourceMappingURL=text.mjs.map
|
package/dist/text.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.mjs","names":[],"sources":["../src/text.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema for a Notion rich text array structure.\n *\n * **Input:**\n * ```\n * Array<{\n * plain_text: string;\n * }>\n * ```\n *\n * **Output:**\n * ```\n * Array<{\n * plain_text: string;\n * }>\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { RichTextItemArraySchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Text: v.object({\n * rich_text: RichTextItemArraySchema,\n * }),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Text.rich_text: Array<{ plain_text: string }>\n * ```\n *\n * @internal\n */\nconst RichTextItemArraySchema = v.array(\n\tv.object({\n\t\tplain_text: v.string(),\n\t}),\n);\n\n/**\n * Schema to extract the `title` property from a Notion page property and transform it to a string.\n *\n * **Input:**\n * ```\n * {\n * title: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string` (non-empty)\n *\n * This schema validates that the resulting string is non-empty. Empty arrays or arrays with only empty `plain_text` values will be rejected.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { TitleSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Title: TitleSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Title: string\n * ```\n */\nexport const TitleSchema = v.pipe(\n\tv.object({\n\t\ttitle: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.title.map((v) => v.plain_text).join(\"\")),\n\tv.nonEmpty(),\n);\n\n/**\n * Schema to extract the `title` property from a Notion page property and transform it to a string or `null`.\n *\n * **Input:**\n * ```\n * {\n * title: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * If the `title` array is empty or all `plain_text` values are empty strings, this schema returns `null`. Otherwise, it joins all `plain_text` values into a single string.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableTitleSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Title: NullableTitleSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Title: string | null\n * ```\n */\nexport const NullableTitleSchema = v.pipe(\n\tv.object({\n\t\ttitle: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.title.map((v) => v.plain_text).join(\"\") || null),\n);\n\n/**\n * Schema to extract the `rich_text` property from a Notion page property and transform it to a string.\n *\n * **Input:**\n * ```\n * {\n * rich_text: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string` (non-empty)\n *\n * This schema validates that the resulting string is non-empty. Empty arrays or arrays with only empty `plain_text` values will be rejected.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { RichTextSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Description: RichTextSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Description: string\n * ```\n */\nexport const RichTextSchema = v.pipe(\n\tv.object({\n\t\trich_text: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.rich_text.map((v) => v.plain_text).join(\"\")),\n\tv.nonEmpty(),\n);\n\n/**\n * Schema to extract the `rich_text` property from a Notion page property and transform it to a string or `null`.\n *\n * **Input:**\n * ```\n * {\n * rich_text: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * If the `rich_text` array is empty or all `plain_text` values are empty strings, this schema returns `null`. Otherwise, it joins all `plain_text` values into a single string.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableRichTextSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Description: NullableRichTextSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Description: string | null\n * ```\n */\nexport const NullableRichTextSchema = v.pipe(\n\tv.object({\n\t\trich_text: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.rich_text.map((v) => v.plain_text).join(\"\") || null),\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"text.mjs","names":[],"sources":["../src/text.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema for a Notion rich text array structure.\n *\n * **Input:**\n * ```\n * Array<{\n * plain_text: string;\n * }>\n * ```\n *\n * **Output:**\n * ```\n * Array<{\n * plain_text: string;\n * }>\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { RichTextItemArraySchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Text: v.object({\n * rich_text: RichTextItemArraySchema,\n * }),\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Text.rich_text: Array<{ plain_text: string }>\n * ```\n *\n * @internal\n */\nconst RichTextItemArraySchema = v.array(\n\tv.object({\n\t\tplain_text: v.string(),\n\t}),\n);\n\n/**\n * Schema to extract the `title` property from a Notion page property and transform it to a string.\n *\n * **Input:**\n * ```\n * {\n * title: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string` (non-empty)\n *\n * This schema validates that the resulting string is non-empty. Empty arrays or arrays with only empty `plain_text` values will be rejected.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { TitleSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Title: TitleSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Title: string\n * ```\n */\nexport const TitleSchema = v.pipe(\n\tv.object({\n\t\ttitle: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.title.map((v) => v.plain_text).join(\"\")),\n\tv.nonEmpty(),\n);\n\n/**\n * Schema to extract the `title` property from a Notion page property and transform it to a string or `null`.\n *\n * **Input:**\n * ```\n * {\n * title: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * If the `title` array is empty or all `plain_text` values are empty strings, this schema returns `null`. Otherwise, it joins all `plain_text` values into a single string.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableTitleSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Title: NullableTitleSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Title: string | null\n * ```\n */\nexport const NullableTitleSchema = v.pipe(\n\tv.object({\n\t\ttitle: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.title.map((v) => v.plain_text).join(\"\") || null),\n);\n\n/**\n * Schema to extract the `rich_text` property from a Notion page property and transform it to a string.\n *\n * **Input:**\n * ```\n * {\n * rich_text: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string` (non-empty)\n *\n * This schema validates that the resulting string is non-empty. Empty arrays or arrays with only empty `plain_text` values will be rejected.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { RichTextSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Description: RichTextSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Description: string\n * ```\n */\nexport const RichTextSchema = v.pipe(\n\tv.object({\n\t\trich_text: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.rich_text.map((v) => v.plain_text).join(\"\")),\n\tv.nonEmpty(),\n);\n\n/**\n * Schema to extract the `rich_text` property from a Notion page property and transform it to a string or `null`.\n *\n * **Input:**\n * ```\n * {\n * rich_text: Array<{\n * plain_text: string;\n * }>;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * If the `rich_text` array is empty or all `plain_text` values are empty strings, this schema returns `null`. Otherwise, it joins all `plain_text` values into a single string.\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableRichTextSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Description: NullableRichTextSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Description: string | null\n * ```\n */\nexport const NullableRichTextSchema = v.pipe(\n\tv.object({\n\t\trich_text: RichTextItemArraySchema,\n\t}),\n\tv.transform((v) => v.rich_text.map((v) => v.plain_text).join(\"\") || null),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAM,0BAA0B,EAAE,MACjC,EAAE,OAAO,EACR,YAAY,EAAE,OAAO,EACtB,CAAC,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAa,cAAc,EAAE,KAC5B,EAAE,OAAO,EACR,OAAO,wBACR,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,MAAM,KAAK,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,CAAC,GAC5D,EAAE,SAAS,CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAa,sBAAsB,EAAE,KACpC,EAAE,OAAO,EACR,OAAO,wBACR,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,MAAM,KAAK,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,KAAK,IAAI,CACrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAa,iBAAiB,EAAE,KAC/B,EAAE,OAAO,EACR,WAAW,wBACZ,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,UAAU,KAAK,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,CAAC,GAChE,EAAE,SAAS,CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAa,yBAAyB,EAAE,KACvC,EAAE,OAAO,EACR,WAAW,wBACZ,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,UAAU,KAAK,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,KAAK,IAAI,CACzE"}
|
package/dist/unique-id.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
const require_runtime = require(
|
|
1
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
let valibot = require("valibot");
|
|
3
|
-
valibot = require_runtime.__toESM(valibot);
|
|
4
|
-
|
|
3
|
+
valibot = require_runtime.__toESM(valibot, 1);
|
|
5
4
|
//#region src/unique-id.ts
|
|
6
5
|
/**
|
|
7
6
|
* Schema to extract the `unique_id` property number from a Notion page property.
|
|
@@ -77,8 +76,8 @@ const NullableUniqueIdSchema = valibot.pipe(valibot.object({ unique_id: valibot.
|
|
|
77
76
|
prefix: valibot.nullable(valibot.string()),
|
|
78
77
|
number: valibot.nullable(valibot.number())
|
|
79
78
|
}) }), valibot.transform((v) => v.unique_id));
|
|
80
|
-
|
|
81
79
|
//#endregion
|
|
82
80
|
exports.NullableUniqueIdSchema = NullableUniqueIdSchema;
|
|
83
81
|
exports.UniqueIdNumberSchema = UniqueIdNumberSchema;
|
|
82
|
+
|
|
84
83
|
//# sourceMappingURL=unique-id.cjs.map
|
package/dist/unique-id.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique-id.cjs","names":["v"],"sources":["../src/unique-id.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema to extract the `unique_id` property number from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * unique_id: {\n * number: number;\n * };\n * }\n * ```\n *\n * **Output:** `number`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { UniqueIdNumberSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * ID: UniqueIdNumberSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.ID: number\n * ```\n */\nexport const UniqueIdNumberSchema = v.pipe(\n\tv.object({\n\t\tunique_id: v.object({\n\t\t\tnumber: v.number(),\n\t\t}),\n\t}),\n\tv.transform((v) => v.unique_id.number),\n);\n\n/**\n * Schema to extract the `unique_id` property from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * unique_id: {\n * prefix: string | null;\n * number: number | null;\n * };\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * prefix: string | null;\n * number: number | null;\n * }\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableUniqueIdSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * ID: NullableUniqueIdSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.ID: { prefix: string | null; number: number | null }\n * ```\n */\nexport const NullableUniqueIdSchema = v.pipe(\n\tv.object({\n\t\tunique_id: v.object({\n\t\t\tprefix: v.nullable(v.string()),\n\t\t\tnumber: v.nullable(v.number()),\n\t\t}),\n\t}),\n\tv.transform((v) => v.unique_id),\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"unique-id.cjs","names":["v"],"sources":["../src/unique-id.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema to extract the `unique_id` property number from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * unique_id: {\n * number: number;\n * };\n * }\n * ```\n *\n * **Output:** `number`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { UniqueIdNumberSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * ID: UniqueIdNumberSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.ID: number\n * ```\n */\nexport const UniqueIdNumberSchema = v.pipe(\n\tv.object({\n\t\tunique_id: v.object({\n\t\t\tnumber: v.number(),\n\t\t}),\n\t}),\n\tv.transform((v) => v.unique_id.number),\n);\n\n/**\n * Schema to extract the `unique_id` property from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * unique_id: {\n * prefix: string | null;\n * number: number | null;\n * };\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * prefix: string | null;\n * number: number | null;\n * }\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableUniqueIdSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * ID: NullableUniqueIdSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.ID: { prefix: string | null; number: number | null }\n * ```\n */\nexport const NullableUniqueIdSchema = v.pipe(\n\tv.object({\n\t\tunique_id: v.object({\n\t\t\tprefix: v.nullable(v.string()),\n\t\t\tnumber: v.nullable(v.number()),\n\t\t}),\n\t}),\n\tv.transform((v) => v.unique_id),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAa,uBAAuBA,QAAE,KACrCA,QAAE,OAAO,EACR,WAAWA,QAAE,OAAO,EACnB,QAAQA,QAAE,OAAO,EAClB,CAAC,EACF,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,UAAU,MAAM,CACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,yBAAyBA,QAAE,KACvCA,QAAE,OAAO,EACR,WAAWA,QAAE,OAAO;CACnB,QAAQA,QAAE,SAASA,QAAE,OAAO,CAAC;CAC7B,QAAQA,QAAE,SAASA,QAAE,OAAO,CAAC;AAC9B,CAAC,EACF,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,SAAS,CAC/B"}
|
package/dist/unique-id.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
2
|
//#region src/unique-id.ts
|
|
4
3
|
/**
|
|
5
4
|
* Schema to extract the `unique_id` property number from a Notion page property.
|
|
@@ -75,7 +74,7 @@ const NullableUniqueIdSchema = v.pipe(v.object({ unique_id: v.object({
|
|
|
75
74
|
prefix: v.nullable(v.string()),
|
|
76
75
|
number: v.nullable(v.number())
|
|
77
76
|
}) }), v.transform((v) => v.unique_id));
|
|
78
|
-
|
|
79
77
|
//#endregion
|
|
80
78
|
export { NullableUniqueIdSchema, UniqueIdNumberSchema };
|
|
79
|
+
|
|
81
80
|
//# sourceMappingURL=unique-id.mjs.map
|
package/dist/unique-id.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique-id.mjs","names":[],"sources":["../src/unique-id.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema to extract the `unique_id` property number from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * unique_id: {\n * number: number;\n * };\n * }\n * ```\n *\n * **Output:** `number`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { UniqueIdNumberSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * ID: UniqueIdNumberSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.ID: number\n * ```\n */\nexport const UniqueIdNumberSchema = v.pipe(\n\tv.object({\n\t\tunique_id: v.object({\n\t\t\tnumber: v.number(),\n\t\t}),\n\t}),\n\tv.transform((v) => v.unique_id.number),\n);\n\n/**\n * Schema to extract the `unique_id` property from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * unique_id: {\n * prefix: string | null;\n * number: number | null;\n * };\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * prefix: string | null;\n * number: number | null;\n * }\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableUniqueIdSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * ID: NullableUniqueIdSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.ID: { prefix: string | null; number: number | null }\n * ```\n */\nexport const NullableUniqueIdSchema = v.pipe(\n\tv.object({\n\t\tunique_id: v.object({\n\t\t\tprefix: v.nullable(v.string()),\n\t\t\tnumber: v.nullable(v.number()),\n\t\t}),\n\t}),\n\tv.transform((v) => v.unique_id),\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"unique-id.mjs","names":[],"sources":["../src/unique-id.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema to extract the `unique_id` property number from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * unique_id: {\n * number: number;\n * };\n * }\n * ```\n *\n * **Output:** `number`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { UniqueIdNumberSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * ID: UniqueIdNumberSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.ID: number\n * ```\n */\nexport const UniqueIdNumberSchema = v.pipe(\n\tv.object({\n\t\tunique_id: v.object({\n\t\t\tnumber: v.number(),\n\t\t}),\n\t}),\n\tv.transform((v) => v.unique_id.number),\n);\n\n/**\n * Schema to extract the `unique_id` property from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * unique_id: {\n * prefix: string | null;\n * number: number | null;\n * };\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * prefix: string | null;\n * number: number | null;\n * }\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableUniqueIdSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * ID: NullableUniqueIdSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.ID: { prefix: string | null; number: number | null }\n * ```\n */\nexport const NullableUniqueIdSchema = v.pipe(\n\tv.object({\n\t\tunique_id: v.object({\n\t\t\tprefix: v.nullable(v.string()),\n\t\t\tnumber: v.nullable(v.number()),\n\t\t}),\n\t}),\n\tv.transform((v) => v.unique_id),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAa,uBAAuB,EAAE,KACrC,EAAE,OAAO,EACR,WAAW,EAAE,OAAO,EACnB,QAAQ,EAAE,OAAO,EAClB,CAAC,EACF,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,UAAU,MAAM,CACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,yBAAyB,EAAE,KACvC,EAAE,OAAO,EACR,WAAW,EAAE,OAAO;CACnB,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;CAC7B,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;AAC9B,CAAC,EACF,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,SAAS,CAC/B"}
|
package/dist/url.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
const require_runtime = require(
|
|
1
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
let valibot = require("valibot");
|
|
3
|
-
valibot = require_runtime.__toESM(valibot);
|
|
4
|
-
|
|
3
|
+
valibot = require_runtime.__toESM(valibot, 1);
|
|
5
4
|
//#region src/url.ts
|
|
6
5
|
/**
|
|
7
6
|
* Schema to extract the `url` property from a Notion page property or `null`.
|
|
@@ -63,8 +62,8 @@ const NullableUrlSchema = valibot.pipe(valibot.object({ url: valibot.nullable(va
|
|
|
63
62
|
* ```
|
|
64
63
|
*/
|
|
65
64
|
const UrlSchema = valibot.pipe(valibot.object({ url: valibot.string() }), valibot.transform((v) => v.url));
|
|
66
|
-
|
|
67
65
|
//#endregion
|
|
68
66
|
exports.NullableUrlSchema = NullableUrlSchema;
|
|
69
67
|
exports.UrlSchema = UrlSchema;
|
|
68
|
+
|
|
70
69
|
//# sourceMappingURL=url.cjs.map
|
package/dist/url.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.cjs","names":["v"],"sources":["../src/url.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema to extract the `url` property from a Notion page property or `null`.\n *\n * **Input:**\n * ```\n * {\n * url: string | null;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableUrlSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Website: NullableUrlSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Website: string | null\n * ```\n */\nexport const NullableUrlSchema = v.pipe(\n\tv.object({\n\t\turl: v.nullable(v.string()),\n\t}),\n\tv.transform((v) => v.url),\n);\n\n/**\n * Schema to extract the `url` property from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * url: string;\n * }\n * ```\n *\n * **Output:** `string`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { UrlSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Website: UrlSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Website: string\n * ```\n */\nexport const UrlSchema = v.pipe(\n\tv.object({\n\t\turl: v.string(),\n\t}),\n\tv.transform((v) => v.url),\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"url.cjs","names":["v"],"sources":["../src/url.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema to extract the `url` property from a Notion page property or `null`.\n *\n * **Input:**\n * ```\n * {\n * url: string | null;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableUrlSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Website: NullableUrlSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Website: string | null\n * ```\n */\nexport const NullableUrlSchema = v.pipe(\n\tv.object({\n\t\turl: v.nullable(v.string()),\n\t}),\n\tv.transform((v) => v.url),\n);\n\n/**\n * Schema to extract the `url` property from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * url: string;\n * }\n * ```\n *\n * **Output:** `string`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { UrlSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Website: UrlSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Website: string\n * ```\n */\nexport const UrlSchema = v.pipe(\n\tv.object({\n\t\turl: v.string(),\n\t}),\n\tv.transform((v) => v.url),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAa,oBAAoBA,QAAE,KAClCA,QAAE,OAAO,EACR,KAAKA,QAAE,SAASA,QAAE,OAAO,CAAC,EAC3B,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,GAAG,CACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAa,YAAYA,QAAE,KAC1BA,QAAE,OAAO,EACR,KAAKA,QAAE,OAAO,EACf,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,GAAG,CACzB"}
|
package/dist/url.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
2
|
//#region src/url.ts
|
|
4
3
|
/**
|
|
5
4
|
* Schema to extract the `url` property from a Notion page property or `null`.
|
|
@@ -61,7 +60,7 @@ const NullableUrlSchema = v.pipe(v.object({ url: v.nullable(v.string()) }), v.tr
|
|
|
61
60
|
* ```
|
|
62
61
|
*/
|
|
63
62
|
const UrlSchema = v.pipe(v.object({ url: v.string() }), v.transform((v) => v.url));
|
|
64
|
-
|
|
65
63
|
//#endregion
|
|
66
64
|
export { NullableUrlSchema, UrlSchema };
|
|
65
|
+
|
|
67
66
|
//# sourceMappingURL=url.mjs.map
|
package/dist/url.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.mjs","names":[],"sources":["../src/url.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema to extract the `url` property from a Notion page property or `null`.\n *\n * **Input:**\n * ```\n * {\n * url: string | null;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableUrlSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Website: NullableUrlSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Website: string | null\n * ```\n */\nexport const NullableUrlSchema = v.pipe(\n\tv.object({\n\t\turl: v.nullable(v.string()),\n\t}),\n\tv.transform((v) => v.url),\n);\n\n/**\n * Schema to extract the `url` property from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * url: string;\n * }\n * ```\n *\n * **Output:** `string`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { UrlSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Website: UrlSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Website: string\n * ```\n */\nexport const UrlSchema = v.pipe(\n\tv.object({\n\t\turl: v.string(),\n\t}),\n\tv.transform((v) => v.url),\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"url.mjs","names":[],"sources":["../src/url.ts"],"sourcesContent":["import * as v from \"valibot\";\n\n/**\n * Schema to extract the `url` property from a Notion page property or `null`.\n *\n * **Input:**\n * ```\n * {\n * url: string | null;\n * }\n * ```\n *\n * **Output:** `string | null`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableUrlSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Website: NullableUrlSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Website: string | null\n * ```\n */\nexport const NullableUrlSchema = v.pipe(\n\tv.object({\n\t\turl: v.nullable(v.string()),\n\t}),\n\tv.transform((v) => v.url),\n);\n\n/**\n * Schema to extract the `url` property from a Notion page property.\n *\n * **Input:**\n * ```\n * {\n * url: string;\n * }\n * ```\n *\n * **Output:** `string`\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { UrlSchema } from \"@nakanoaas/notion-valibot-utils\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Website: UrlSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Website: string\n * ```\n */\nexport const UrlSchema = v.pipe(\n\tv.object({\n\t\turl: v.string(),\n\t}),\n\tv.transform((v) => v.url),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAa,oBAAoB,EAAE,KAClC,EAAE,OAAO,EACR,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAC3B,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,GAAG,CACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAa,YAAY,EAAE,KAC1B,EAAE,OAAO,EACR,KAAK,EAAE,OAAO,EACf,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,GAAG,CACzB"}
|
package/dist/verification.cjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
const require_runtime = require(
|
|
2
|
-
const require_people = require(
|
|
3
|
-
const require_date = require(
|
|
1
|
+
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_people = require("./people.cjs");
|
|
3
|
+
const require_date = require("./date.cjs");
|
|
4
4
|
let valibot = require("valibot");
|
|
5
|
-
valibot = require_runtime.__toESM(valibot);
|
|
6
|
-
|
|
5
|
+
valibot = require_runtime.__toESM(valibot, 1);
|
|
7
6
|
//#region src/verification.ts
|
|
8
7
|
const InnerVerificationSchema = valibot.variant("state", [valibot.object({
|
|
9
8
|
state: valibot.literal("unverified"),
|
|
@@ -96,8 +95,8 @@ const VerificationSchema = valibot.pipe(valibot.object({ verification: InnerVeri
|
|
|
96
95
|
* ```
|
|
97
96
|
*/
|
|
98
97
|
const NullableVerificationSchema = valibot.pipe(valibot.object({ verification: valibot.nullable(InnerVerificationSchema) }), valibot.transform((v) => v.verification));
|
|
99
|
-
|
|
100
98
|
//#endregion
|
|
101
99
|
exports.NullableVerificationSchema = NullableVerificationSchema;
|
|
102
100
|
exports.VerificationSchema = VerificationSchema;
|
|
101
|
+
|
|
103
102
|
//# sourceMappingURL=verification.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.cjs","names":["v","DateObjectSchema","PersonSchema"],"sources":["../src/verification.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport { DateObjectSchema } from \"./date\";\nimport { PersonSchema } from \"./people\";\n\nconst InnerVerificationSchema = v.variant(\"state\", [\n\tv.object({\n\t\tstate: v.literal(\"unverified\"),\n\t\tdate: v.null_(),\n\t\tverified_by: v.null_(),\n\t}),\n\tv.object({\n\t\tstate: v.union([v.literal(\"verified\"), v.literal(\"expired\")]),\n\t\tdate: v.nullable(DateObjectSchema),\n\t\tverified_by: v.nullable(PersonSchema),\n\t}),\n]);\n\n/**\n * Schema to extract the `verification` object from a Notion property.\n *\n * **Input:**\n * ```\n * {\n * verification: {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * }\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * }\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { VerificationSchema } from \"@nakanoaas/notion-valibot-schema\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Verification: VerificationSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Verification: { state: \"unverified\" | \"verified\" | \"expired\"; date: DateObject | null; verified_by: Person | null }\n * ```\n */\nexport const VerificationSchema = v.pipe(\n\tv.object({\n\t\tverification: InnerVerificationSchema,\n\t}),\n\tv.transform((v) => v.verification),\n);\n\n/**\n * Schema to extract the `verification` object from a Notion property (nullable).\n *\n * **Input:**\n * ```\n * {\n * verification: {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * } | null\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * } | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableVerificationSchema } from \"@nakanoaas/notion-valibot-schema\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Verification: NullableVerificationSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Verification: { state: \"unverified\" | \"verified\" | \"expired\"; date: DateObject | null; verified_by: Person | null } | null\n * ```\n */\nexport const NullableVerificationSchema = v.pipe(\n\tv.object({\n\t\tverification: v.nullable(InnerVerificationSchema),\n\t}),\n\tv.transform((v) => v.verification),\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification.cjs","names":["v","DateObjectSchema","PersonSchema"],"sources":["../src/verification.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport { DateObjectSchema } from \"./date\";\nimport { PersonSchema } from \"./people\";\n\nconst InnerVerificationSchema = v.variant(\"state\", [\n\tv.object({\n\t\tstate: v.literal(\"unverified\"),\n\t\tdate: v.null_(),\n\t\tverified_by: v.null_(),\n\t}),\n\tv.object({\n\t\tstate: v.union([v.literal(\"verified\"), v.literal(\"expired\")]),\n\t\tdate: v.nullable(DateObjectSchema),\n\t\tverified_by: v.nullable(PersonSchema),\n\t}),\n]);\n\n/**\n * Schema to extract the `verification` object from a Notion property.\n *\n * **Input:**\n * ```\n * {\n * verification: {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * }\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * }\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { VerificationSchema } from \"@nakanoaas/notion-valibot-schema\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Verification: VerificationSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Verification: { state: \"unverified\" | \"verified\" | \"expired\"; date: DateObject | null; verified_by: Person | null }\n * ```\n */\nexport const VerificationSchema = v.pipe(\n\tv.object({\n\t\tverification: InnerVerificationSchema,\n\t}),\n\tv.transform((v) => v.verification),\n);\n\n/**\n * Schema to extract the `verification` object from a Notion property (nullable).\n *\n * **Input:**\n * ```\n * {\n * verification: {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * } | null\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * } | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableVerificationSchema } from \"@nakanoaas/notion-valibot-schema\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Verification: NullableVerificationSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Verification: { state: \"unverified\" | \"verified\" | \"expired\"; date: DateObject | null; verified_by: Person | null } | null\n * ```\n */\nexport const NullableVerificationSchema = v.pipe(\n\tv.object({\n\t\tverification: v.nullable(InnerVerificationSchema),\n\t}),\n\tv.transform((v) => v.verification),\n);\n"],"mappings":";;;;;;AAKA,MAAM,0BAA0BA,QAAE,QAAQ,SAAS,CAClDA,QAAE,OAAO;CACR,OAAOA,QAAE,QAAQ,YAAY;CAC7B,MAAMA,QAAE,MAAM;CACd,aAAaA,QAAE,MAAM;AACtB,CAAC,GACDA,QAAE,OAAO;CACR,OAAOA,QAAE,MAAM,CAACA,QAAE,QAAQ,UAAU,GAAGA,QAAE,QAAQ,SAAS,CAAC,CAAC;CAC5D,MAAMA,QAAE,SAASC,aAAAA,gBAAgB;CACjC,aAAaD,QAAE,SAASE,eAAAA,YAAY;AACrC,CAAC,CACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CD,MAAa,qBAAqBF,QAAE,KACnCA,QAAE,OAAO,EACR,cAAc,wBACf,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,YAAY,CAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAa,6BAA6BA,QAAE,KAC3CA,QAAE,OAAO,EACR,cAAcA,QAAE,SAAS,uBAAuB,EACjD,CAAC,GACDA,QAAE,WAAW,MAAM,EAAE,YAAY,CAClC"}
|
package/dist/verification.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PersonSchema } from "./people.mjs";
|
|
2
2
|
import { DateObjectSchema } from "./date.mjs";
|
|
3
3
|
import * as v from "valibot";
|
|
4
|
-
|
|
5
4
|
//#region src/verification.ts
|
|
6
5
|
const InnerVerificationSchema = v.variant("state", [v.object({
|
|
7
6
|
state: v.literal("unverified"),
|
|
@@ -94,7 +93,7 @@ const VerificationSchema = v.pipe(v.object({ verification: InnerVerificationSche
|
|
|
94
93
|
* ```
|
|
95
94
|
*/
|
|
96
95
|
const NullableVerificationSchema = v.pipe(v.object({ verification: v.nullable(InnerVerificationSchema) }), v.transform((v) => v.verification));
|
|
97
|
-
|
|
98
96
|
//#endregion
|
|
99
97
|
export { NullableVerificationSchema, VerificationSchema };
|
|
98
|
+
|
|
100
99
|
//# sourceMappingURL=verification.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.mjs","names":[],"sources":["../src/verification.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport { DateObjectSchema } from \"./date\";\nimport { PersonSchema } from \"./people\";\n\nconst InnerVerificationSchema = v.variant(\"state\", [\n\tv.object({\n\t\tstate: v.literal(\"unverified\"),\n\t\tdate: v.null_(),\n\t\tverified_by: v.null_(),\n\t}),\n\tv.object({\n\t\tstate: v.union([v.literal(\"verified\"), v.literal(\"expired\")]),\n\t\tdate: v.nullable(DateObjectSchema),\n\t\tverified_by: v.nullable(PersonSchema),\n\t}),\n]);\n\n/**\n * Schema to extract the `verification` object from a Notion property.\n *\n * **Input:**\n * ```\n * {\n * verification: {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * }\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * }\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { VerificationSchema } from \"@nakanoaas/notion-valibot-schema\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Verification: VerificationSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Verification: { state: \"unverified\" | \"verified\" | \"expired\"; date: DateObject | null; verified_by: Person | null }\n * ```\n */\nexport const VerificationSchema = v.pipe(\n\tv.object({\n\t\tverification: InnerVerificationSchema,\n\t}),\n\tv.transform((v) => v.verification),\n);\n\n/**\n * Schema to extract the `verification` object from a Notion property (nullable).\n *\n * **Input:**\n * ```\n * {\n * verification: {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * } | null\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * } | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableVerificationSchema } from \"@nakanoaas/notion-valibot-schema\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Verification: NullableVerificationSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Verification: { state: \"unverified\" | \"verified\" | \"expired\"; date: DateObject | null; verified_by: Person | null } | null\n * ```\n */\nexport const NullableVerificationSchema = v.pipe(\n\tv.object({\n\t\tverification: v.nullable(InnerVerificationSchema),\n\t}),\n\tv.transform((v) => v.verification),\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification.mjs","names":[],"sources":["../src/verification.ts"],"sourcesContent":["import * as v from \"valibot\";\n\nimport { DateObjectSchema } from \"./date\";\nimport { PersonSchema } from \"./people\";\n\nconst InnerVerificationSchema = v.variant(\"state\", [\n\tv.object({\n\t\tstate: v.literal(\"unverified\"),\n\t\tdate: v.null_(),\n\t\tverified_by: v.null_(),\n\t}),\n\tv.object({\n\t\tstate: v.union([v.literal(\"verified\"), v.literal(\"expired\")]),\n\t\tdate: v.nullable(DateObjectSchema),\n\t\tverified_by: v.nullable(PersonSchema),\n\t}),\n]);\n\n/**\n * Schema to extract the `verification` object from a Notion property.\n *\n * **Input:**\n * ```\n * {\n * verification: {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * }\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * }\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { VerificationSchema } from \"@nakanoaas/notion-valibot-schema\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Verification: VerificationSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Verification: { state: \"unverified\" | \"verified\" | \"expired\"; date: DateObject | null; verified_by: Person | null }\n * ```\n */\nexport const VerificationSchema = v.pipe(\n\tv.object({\n\t\tverification: InnerVerificationSchema,\n\t}),\n\tv.transform((v) => v.verification),\n);\n\n/**\n * Schema to extract the `verification` object from a Notion property (nullable).\n *\n * **Input:**\n * ```\n * {\n * verification: {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * } | null\n * }\n * ```\n *\n * **Output:**\n * ```\n * {\n * state: \"unverified\" | \"verified\" | \"expired\";\n * date: DateObject | null;\n * verified_by: Person | null;\n * } | null\n * ```\n *\n * @example\n * ```ts\n * import * as v from \"valibot\";\n * import { NullableVerificationSchema } from \"@nakanoaas/notion-valibot-schema\";\n *\n * const PageSchema = v.object({\n * id: v.string(),\n * properties: v.object({\n * Verification: NullableVerificationSchema,\n * }),\n * });\n *\n * const page = await notion.pages.retrieve({ page_id: \"...\" });\n * const parsed = v.parse(PageSchema, page);\n * // parsed.properties.Verification: { state: \"unverified\" | \"verified\" | \"expired\"; date: DateObject | null; verified_by: Person | null } | null\n * ```\n */\nexport const NullableVerificationSchema = v.pipe(\n\tv.object({\n\t\tverification: v.nullable(InnerVerificationSchema),\n\t}),\n\tv.transform((v) => v.verification),\n);\n"],"mappings":";;;;AAKA,MAAM,0BAA0B,EAAE,QAAQ,SAAS,CAClD,EAAE,OAAO;CACR,OAAO,EAAE,QAAQ,YAAY;CAC7B,MAAM,EAAE,MAAM;CACd,aAAa,EAAE,MAAM;AACtB,CAAC,GACD,EAAE,OAAO;CACR,OAAO,EAAE,MAAM,CAAC,EAAE,QAAQ,UAAU,GAAG,EAAE,QAAQ,SAAS,CAAC,CAAC;CAC5D,MAAM,EAAE,SAAS,gBAAgB;CACjC,aAAa,EAAE,SAAS,YAAY;AACrC,CAAC,CACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CD,MAAa,qBAAqB,EAAE,KACnC,EAAE,OAAO,EACR,cAAc,wBACf,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,YAAY,CAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAa,6BAA6B,EAAE,KAC3C,EAAE,OAAO,EACR,cAAc,EAAE,SAAS,uBAAuB,EACjD,CAAC,GACD,EAAE,WAAW,MAAM,EAAE,YAAY,CAClC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nakanoaas/notion-valibot-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Turn Notion's nested API responses into clean, typed JavaScript values.",
|
|
5
5
|
"author": "Nakano as a Service",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@biomejs/biome": "^2.3.7",
|
|
44
44
|
"@notionhq/client": "^5.6.0",
|
|
45
|
-
"@types/node": "^
|
|
46
|
-
"tsdown": "^0.
|
|
47
|
-
"typescript": "^
|
|
45
|
+
"@types/node": "^25.9.2",
|
|
46
|
+
"tsdown": "^0.22.2",
|
|
47
|
+
"typescript": "^6.0.3",
|
|
48
48
|
"vitest": "^4.0.16"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|