Skip to content

Commit

Permalink
chore: update api report, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
zeyu2001 committed Aug 1, 2024
1 parent 8abcc74 commit f8a0458
Show file tree
Hide file tree
Showing 9 changed files with 185 additions and 3 deletions.
11 changes: 11 additions & 0 deletions apps/docs/api/starter-kitty-validators.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ Invalid email error.
Validates emails against RFC 5322 and a whitelist of domains.


</td></tr>
<tr><td>

[OptionsError](./starter-kitty-validators.optionserror.md)


</td><td>

Invalid options error.


</td></tr>
<tr><td>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@opengovsg/starter-kitty-validators](./starter-kitty-validators.md) &gt; [OptionsError](./starter-kitty-validators.optionserror.md) &gt; [(constructor)](./starter-kitty-validators.optionserror._constructor_.md)

## OptionsError.(constructor)

Constructs a new instance of the `OptionsError` class

**Signature:**

```typescript
constructor(message: string);
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

message


</td><td>

string


</td><td>


</td></tr>
</tbody></table>
48 changes: 48 additions & 0 deletions apps/docs/api/starter-kitty-validators.optionserror.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@opengovsg/starter-kitty-validators](./starter-kitty-validators.md) &gt; [OptionsError](./starter-kitty-validators.optionserror.md)

## OptionsError class

Invalid options error.

**Signature:**

```typescript
export declare class OptionsError extends Error
```
**Extends:** Error
## Constructors
<table><thead><tr><th>
Constructor
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[(constructor)(message)](./starter-kitty-validators.optionserror._constructor_.md)
</td><td>
</td><td>
Constructs a new instance of the `OptionsError` class
</td></tr>
</tbody></table>
Original file line number Diff line number Diff line change
Expand Up @@ -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

5 changes: 5 additions & 0 deletions etc/starter-kitty-validators.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/validators/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 2 additions & 0 deletions packages/validators/src/email/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { createEmailSchema } from './schema'

/**
* Validates emails against RFC 5322 and a whitelist of domains.
*
* @public
*/
export class EmailValidator {
private schema
Expand Down
66 changes: 65 additions & 1 deletion packages/validators/temp/starter-kitty-validators.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/validators/temp/starter-kitty-validators.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f8a0458

Please sign in to comment.