Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions docs-src/docs/040-test-data/domain/000-domain-test-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ Date
date.between(from=1577836800000, to=1659312000000)
```

```txt
CreatedAt
autoIncrement.timestamp(start="2026-06-12T12:39:23Z", step=1, type="seconds")
```

```txt
IBAN
finance.iban(formatted=true, countryCode="GB")
Expand All @@ -67,9 +62,9 @@ For faker helper templates and utility functions, use faker helpers:

## Domains

- [autoIncrement](/docs/test-data/domain/autoIncrement)
- [airline](/docs/test-data/domain/airline)
- [animal](/docs/test-data/domain/animal)
- [autoIncrement](/docs/test-data/domain/autoIncrement)
- [book](/docs/test-data/domain/book)
- [color](/docs/test-data/domain/color)
- [commerce](/docs/test-data/domain/commerce)
Expand All @@ -94,4 +89,4 @@ For faker helper templates and utility functions, use faker helpers:
- [string](/docs/test-data/domain/string)
- [system](/docs/test-data/domain/system)
- [vehicle](/docs/test-data/domain/vehicle)
- [word](/docs/test-data/domain/word)
- [word](/docs/test-data/domain/word)
21 changes: 11 additions & 10 deletions docs-src/docs/040-test-data/domain/040-autoIncrement.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "Domain keyword reference for autoIncrement."

# autoIncrement Domain

The `autoIncrement` domain provides deterministic values that move forward for each generated row.
The `autoIncrement` domain provides stateful sequence helpers for accepted generated rows.

## Methods

Expand All @@ -20,7 +20,7 @@ Generates an incrementing sequence. Values only advance when a generated row is
| Arg | Type | Required | Description |
| --- | --- | --- | --- |
| `start` | `integer` | no | Starting integer in the sequence. Defaults to 1. |
| `step` | `integer` | no | Amount added after each accepted row. Defaults to 1. |
| `step` | `integer` | no | Non-zero amount added after each accepted row. Defaults to 1. |
| `prefix` | `string` | no | Optional text added before the numeric portion. |
| `suffix` | `string` | no | Optional text added after the numeric portion. |
| `zeropadding` | `integer` | no | Total digit width for the numeric portion. A value of 3 renders 1 as 001, while 100 stays 100. Defaults to 0. |
Expand Down Expand Up @@ -49,14 +49,15 @@ Example return values:
Generates a timestamp that starts from a fixed point and increments by the configured amount for each generated row.

- Canonical: `awd.domain.autoIncrement.timestamp`
- Docs: [https://anywaydata.com/docs/test-data/domain/autoIncrement](https://anywaydata.com/docs/test-data/domain/autoIncrement)

| Arg | Type | Required | Description |
| --- | --- | --- | --- |
| `start` | `string\|number` | no | Starting timestamp. Defaults to the generation run start time. Valid examples include `2026-06-12T12:39:23Z`, `20/03/1969`, `12-06-2026 12:39:23`, or a Unix timestamp such as `1718195963000`. |
| `step` | `number` | no | Amount added for each generated row. Defaults to `1`. |
| `type` | `string` | no | Unit applied to `step` for each row. Supports `milliseconds`, `seconds`, `minutes`, `hours`, `days`, `weeks`, `months`, or `years`. Defaults to `seconds`. |
| `outputFormat` | `string` | no | Output format. Defaults to ISO-8601 without milliseconds. Use `iso8601` for the default behaviour or a custom pattern such as `yyyy-MM-dd HH:mm:ss`. |
| `inputFormat` | `string` | no | Optional parse pattern used only for `start` when you want to match a specific text shape such as `dd/MM/yyyy` or `dd-MM-yyyy HH:mm:ss`. |
| `start` | `string\|number` | no | Starting timestamp. Defaults to the generation run start time. Valid examples include "2026-06-12T12:39:23Z", "20/03/1969", "12-06-2026 12:39:23", or a Unix timestamp like 1718195963000. |
| `step` | `number` | no | Amount added for each generated row. Defaults to 1. |
| `type` | `string` | no | Unit applied to step for each row. Supports milliseconds, seconds, minutes, hours, days, weeks, months, or years. Defaults to seconds. |
| `outputFormat` | `string` | no | Output format. Defaults to ISO-8601 without milliseconds. Use "iso8601" for the default behaviour or a custom pattern such as "yyyy-MM-dd HH:mm:ss". |
| `inputFormat` | `string` | no | Optional parse pattern used only for the start argument when you want to match a specific text shape such as "dd/MM/yyyy" or "dd-MM-yyyy HH:mm:ss". |

Examples:

Expand All @@ -65,15 +66,15 @@ autoIncrement.timestamp()
```

```txt
autoIncrement.timestamp(start="2026-06-12T12:39:23Z", step=1, type="seconds")
autoIncrement.timestamp(start="20/03/1969", step=1, type="days")
```

```txt
autoIncrement.timestamp(start="20/03/1969", step=1, type="days", outputFormat="yyyy-MM-dd")
autoIncrement.timestamp(start="2026-06-12 12:39:23", step=15, type="minutes", outputFormat="yyyy-MM-dd HH:mm:ss")
```

```txt
autoIncrement.timestamp(start="12-06-2026 12:39:23", step=15, type="minutes", outputFormat="yyyy-MM-dd HH:mm:ss", inputFormat="dd-MM-yyyy HH:mm:ss")
autoIncrement.timestamp(start="20/03/1969", inputFormat="dd/MM/yyyy", step=1, type="days")
```

Example return values:
Expand Down
20 changes: 20 additions & 0 deletions docs-src/docs/040-test-data/domain/070-commerce.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,23 @@ commerce.productName()

Example return values:
- `Soft Bronze Towels`

### `commerce.upc`

Returns a valid UPC-A (12 digits).

- Canonical: `awd.domain.commerce.upc`
- Faker docs: [https://fakerjs.dev/api/commerce](https://fakerjs.dev/api/commerce)

| Arg | Type | Required | Description |
| --- | --- | --- | --- |
| `prefix` | `string` | no | Optional numeric prefix for the UPC body (0-11 digits). |

Examples:

```txt
commerce.upc()
```

Example return values:
- `036000291452`
24 changes: 0 additions & 24 deletions docs-src/docs/040-test-data/domain/120-finance.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,30 +339,6 @@ finance.litecoinAddress()
Example return values:
- `M7nWopfUfSjA8cmGWvuENRLu6GU4C1iTK`

### `finance.maskedNumber`

Generates a random masked number.

- Canonical: `awd.domain.finance.maskedNumber`
- Faker docs: [https://fakerjs.dev/api/finance](https://fakerjs.dev/api/finance)

| Arg | Type | Required | Description |
| --- | --- | --- | --- |
| `length` | `number` | no | Desired length of the generated value. |

Examples:

```txt
finance.maskedNumber()
```

```txt
finance.maskedNumber(length=1)
```

Example return values:
- `(...0934)`

### `finance.pin`

Generates a random PIN number.
Expand Down
36 changes: 0 additions & 36 deletions docs-src/docs/040-test-data/domain/160-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ image.avatarGitHub()
Example return values:
- `https://avatars.githubusercontent.com/u/22969292`

### `image.avatarLegacy`

Generates a random avatar from `https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar`.

- Canonical: `awd.domain.image.avatarLegacy`
- Faker docs: [https://fakerjs.dev/api/image](https://fakerjs.dev/api/image)

No parameters.

Examples:

```txt
image.avatarLegacy()
```

Example return values:
- `https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/1198.jpg`

### `image.dataUri`

Generates a random data uri containing an URL-encoded SVG image or a Base64-encoded SVG image.
Expand Down Expand Up @@ -164,21 +146,3 @@ image.urlPicsumPhotos()

Example return values:
- `https://picsum.photos/seed/UBLQun43/2068/162?blur=8`

### `image.urlPlaceholder`

Generates a random image url provided via https://via.placeholder.com/.

- Canonical: `awd.domain.image.urlPlaceholder`
- Faker docs: [https://fakerjs.dev/api/image](https://fakerjs.dev/api/image)

No parameters.

Examples:

```txt
image.urlPlaceholder()
```

Example return values:
- `https://via.placeholder.com/2302x1759/a80adf/2de69f.gif?text=utrimque%20summa%20dolores`
36 changes: 0 additions & 36 deletions docs-src/docs/040-test-data/domain/170-internet.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,6 @@ The `internet` domain maps domain keywords to underlying faker implementations.

## Methods

### `internet.color`

Generates a random css hex color code in aesthetically pleasing color palette.

- Canonical: `awd.domain.internet.color`
- Faker docs: [https://fakerjs.dev/api/internet](https://fakerjs.dev/api/internet)

No parameters.

Examples:

```txt
internet.color()
```

Example return values:
- `#290551`

### `internet.displayName`

Generates a display name using the given person's name as base.
Expand Down Expand Up @@ -464,21 +446,3 @@ internet.username(firstName="Alex", lastName="Taylor")

Example return values:
- `Deanna51`

### `internet.userName`

Generates a username using the given person's name as base.

- Canonical: `awd.domain.internet.userName`
- Faker docs: [https://fakerjs.dev/api/internet](https://fakerjs.dev/api/internet)

No parameters.

Examples:

```txt
internet.userName()
```

Example return values:
- `Ana_Keebler`
11 changes: 9 additions & 2 deletions docs-src/docs/040-test-data/domain/260-string.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,18 +327,25 @@ Example return values:

### `string.uuid`

Returns a UUID v4 (Universally Unique Identifier).
Returns a UUID (Universally Unique Identifier).

- Canonical: `awd.domain.string.uuid`
- Faker docs: [https://fakerjs.dev/api/string](https://fakerjs.dev/api/string)

No parameters.
| Arg | Type | Required | Description |
| --- | --- | --- | --- |
| `version` | `4\|7` | no | The specific UUID version to use. If `refDate` is supplied and `version` is omitted, version `7` is used automatically. |
| `refDate` | `string\|number\|date` | no | The timestamp to encode into the UUID. This is only valid for UUID v7. If `refDate` is supplied and `version` is omitted, version `7` is used automatically. Providing `refDate` with version `4` is invalid. |

Examples:

```txt
string.uuid()
```

```txt
string.uuid(refDate=1)
```

Example return values:
- `0628ae51-7b6c-4d33-9f24-dae19fb245df`
Loading