From f8a0458f5cecab3f6949ea3abcd4948f1893aae9 Mon Sep 17 00:00:00 2001 From: Zeyu Zhang <39144422+zeyu2001@users.noreply.github.com> Date: Thu, 1 Aug 2024 16:12:59 +0800 Subject: [PATCH] chore: update api report, bump version --- apps/docs/api/starter-kitty-validators.md | 11 ++++ ...y-validators.optionserror._constructor_.md | 47 +++++++++++++ .../starter-kitty-validators.optionserror.md | 48 ++++++++++++++ ...y-validators.urlvalidator._constructor_.md | 2 +- etc/starter-kitty-validators.api.md | 5 ++ packages/validators/package.json | 2 +- packages/validators/src/email/index.ts | 2 + .../temp/starter-kitty-validators.api.json | 66 ++++++++++++++++++- .../temp/starter-kitty-validators.api.md | 5 ++ 9 files changed, 185 insertions(+), 3 deletions(-) create mode 100644 apps/docs/api/starter-kitty-validators.optionserror._constructor_.md create mode 100644 apps/docs/api/starter-kitty-validators.optionserror.md diff --git a/apps/docs/api/starter-kitty-validators.md b/apps/docs/api/starter-kitty-validators.md index 89c3662..578137f 100644 --- a/apps/docs/api/starter-kitty-validators.md +++ b/apps/docs/api/starter-kitty-validators.md @@ -40,6 +40,17 @@ Invalid email error. Validates emails against RFC 5322 and a whitelist of domains. + + + +[OptionsError](./starter-kitty-validators.optionserror.md) + + + + +Invalid options error. + + diff --git a/apps/docs/api/starter-kitty-validators.optionserror._constructor_.md b/apps/docs/api/starter-kitty-validators.optionserror._constructor_.md new file mode 100644 index 0000000..8f66c96 --- /dev/null +++ b/apps/docs/api/starter-kitty-validators.optionserror._constructor_.md @@ -0,0 +1,47 @@ + + +[Home](./index.md) > [@opengovsg/starter-kitty-validators](./starter-kitty-validators.md) > [OptionsError](./starter-kitty-validators.optionserror.md) > [(constructor)](./starter-kitty-validators.optionserror._constructor_.md) + +## OptionsError.(constructor) + +Constructs a new instance of the `OptionsError` class + +**Signature:** + +```typescript +constructor(message: string); +``` + +## Parameters + + + +
+ +Parameter + + + + +Type + + + + +Description + + +
+ +message + + + + +string + + + + + +
diff --git a/apps/docs/api/starter-kitty-validators.optionserror.md b/apps/docs/api/starter-kitty-validators.optionserror.md new file mode 100644 index 0000000..d39f31d --- /dev/null +++ b/apps/docs/api/starter-kitty-validators.optionserror.md @@ -0,0 +1,48 @@ + + +[Home](./index.md) > [@opengovsg/starter-kitty-validators](./starter-kitty-validators.md) > [OptionsError](./starter-kitty-validators.optionserror.md) + +## OptionsError class + +Invalid options error. + +**Signature:** + +```typescript +export declare class OptionsError extends Error +``` +**Extends:** Error + +## Constructors + + + +
+ +Constructor + + + + +Modifiers + + + + +Description + + +
+ +[(constructor)(message)](./starter-kitty-validators.optionserror._constructor_.md) + + + + + + + +Constructs a new instance of the `OptionsError` class + + +
diff --git a/apps/docs/api/starter-kitty-validators.urlvalidator._constructor_.md b/apps/docs/api/starter-kitty-validators.urlvalidator._constructor_.md index ead7e30..33fee75 100644 --- a/apps/docs/api/starter-kitty-validators.urlvalidator._constructor_.md +++ b/apps/docs/api/starter-kitty-validators.urlvalidator._constructor_.md @@ -59,5 +59,5 @@ _(Optional)_ The options to use for validation ## Exceptions - If the options are invalid +[OptionsError](./starter-kitty-validators.optionserror.md) If the options are invalid diff --git a/etc/starter-kitty-validators.api.md b/etc/starter-kitty-validators.api.md index 7ab8095..4a3cac6 100644 --- a/etc/starter-kitty-validators.api.md +++ b/etc/starter-kitty-validators.api.md @@ -25,6 +25,11 @@ export interface EmailValidatorOptions { domains?: string[]; } +// @public +export class OptionsError extends Error { + constructor(message: string); +} + // @public export class UrlValidationError extends Error { constructor(message: string); diff --git a/packages/validators/package.json b/packages/validators/package.json index 54dbcef..94c1df3 100644 --- a/packages/validators/package.json +++ b/packages/validators/package.json @@ -1,6 +1,6 @@ { "name": "@opengovsg/starter-kitty-validators", - "version": "1.0.2", + "version": "1.1.0", "main": "./dist/index.js", "types": "./dist/index.d.ts", "files": [ diff --git a/packages/validators/src/email/index.ts b/packages/validators/src/email/index.ts index fb359e4..f7ada35 100644 --- a/packages/validators/src/email/index.ts +++ b/packages/validators/src/email/index.ts @@ -9,6 +9,8 @@ import { createEmailSchema } from './schema' /** * Validates emails against RFC 5322 and a whitelist of domains. + * + * @public */ export class EmailValidator { private schema diff --git a/packages/validators/temp/starter-kitty-validators.api.json b/packages/validators/temp/starter-kitty-validators.api.json index 676c867..47cfcc5 100644 --- a/packages/validators/temp/starter-kitty-validators.api.json +++ b/packages/validators/temp/starter-kitty-validators.api.json @@ -239,7 +239,7 @@ { "kind": "Class", "canonicalReference": "@opengovsg/starter-kitty-validators!EmailValidator:class", - "docComment": "/**\n * Validates emails against RFC 5322 and a whitelist of domains.\n */\n", + "docComment": "/**\n * Validates emails against RFC 5322 and a whitelist of domains.\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", @@ -408,6 +408,70 @@ ], "extendsTokenRanges": [] }, + { + "kind": "Class", + "canonicalReference": "@opengovsg/starter-kitty-validators!OptionsError:class", + "docComment": "/**\n * Invalid options error.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class OptionsError extends " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "dist/common/errors.d.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "OptionsError", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@opengovsg/starter-kitty-validators!OptionsError:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `OptionsError` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(message: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "message", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, { "kind": "Class", "canonicalReference": "@opengovsg/starter-kitty-validators!UrlValidationError:class", diff --git a/packages/validators/temp/starter-kitty-validators.api.md b/packages/validators/temp/starter-kitty-validators.api.md index 7ab8095..4a3cac6 100644 --- a/packages/validators/temp/starter-kitty-validators.api.md +++ b/packages/validators/temp/starter-kitty-validators.api.md @@ -25,6 +25,11 @@ export interface EmailValidatorOptions { domains?: string[]; } +// @public +export class OptionsError extends Error { + constructor(message: string); +} + // @public export class UrlValidationError extends Error { constructor(message: string);