# configuration/constants/catalog.constants.ts

> 62 lines of code and 45 definitions.

Tree: Bane's Lab Build Scripts
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/build-scripts#file-build-scripts-configuration-constants-catalog-constants-ts
Source text: https://banes-lab.com/source/build-scripts/configuration/constants/catalog.constants.ts.txt

Listed in [configuration/constants](https://banes-lab.com/api/source/build-scripts/configuration/constants.md), after [configuration/constants/browser.constants.ts](https://banes-lab.com/source/build-scripts/configuration/constants/browser.constants.ts.md) and before [configuration/constants/config.constants.ts](https://banes-lab.com/source/build-scripts/configuration/constants/config.constants.ts.md).

## Definitions

- `API_SEGMENT` (lexical_declaration, line 7, exported)
- `PAGES_SEGMENT` (lexical_declaration, line 8, exported)
- `FACETS_SEGMENT` (lexical_declaration, line 9, exported)
- `SOURCE_SEGMENT` (lexical_declaration, line 10, exported)
- `RESOLVE_SEGMENT` (lexical_declaration, line 11, exported)
- `CLOSURE_SEGMENT` (lexical_declaration, line 12, exported)
- `ROUTE_SEGMENT` (lexical_declaration, line 13, exported)
- `NUMBERS_SEGMENT` (lexical_declaration, line 14, exported)
- `IDS_SEGMENT` (lexical_declaration, line 15, exported)
- `SEARCH_SEGMENT` (lexical_declaration, line 16, exported)
- `SEARCH_KIND` (lexical_declaration, line 17, exported)
- `CONTACT_SEGMENT` (lexical_declaration, line 18, exported)
- `SCHEMA_SEGMENT` (lexical_declaration, line 19, exported)
- `MOVED_SEGMENT` (lexical_declaration, line 20, exported)
- `QUERY_SEGMENT` (lexical_declaration, line 21, exported)
- `QUERY_ENDPOINT` (lexical_declaration, line 22, exported)
- `QUERY_LIMITS` (lexical_declaration, line 23, exported)
- `QUERY_FUZZY` (lexical_declaration, line 24, exported)
- `SCHEMA_DIALECT` (lexical_declaration, line 29, exported)
- `SCHEMA_KIND` (lexical_declaration, line 30, exported)
- `MAP_KEY_THRESHOLD` (lexical_declaration, line 31, exported)
- `SLUGS_SEGMENT` (lexical_declaration, line 32, exported)
- `TEXT_EXTENSION` (lexical_declaration, line 33, exported)
- `CATALOG_VERSION` (lexical_declaration, line 34, exported)
- `PATH_PLACEHOLDER` (lexical_declaration, line 35, exported)
- `FOLDER_PLACEHOLDER` (lexical_declaration, line 36, exported)
- `SPANNING_PLACEHOLDERS` (lexical_declaration, line 37, exported)
- `CATALOG_FILE_BUDGET` (lexical_declaration, line 38, exported)
- `INDEX_PART_BUDGET` (lexical_declaration, line 39, exported)
- `INDEX_PART_MARK` (lexical_declaration, line 40, exported)
- `INDEX_PART_KIND` (lexical_declaration, line 41, exported)
- `SLUG_CHARACTERS` (lexical_declaration, line 42, exported)
- `SLUG_SEPARATOR` (lexical_declaration, line 43, exported)
- `LEADING_ARTICLES` (lexical_declaration, line 44, exported)
- `RESOLVE_FIRST` (lexical_declaration, line 45, exported)
- `RESOLVE_LAST` (lexical_declaration, line 46, exported)
- `SECTION_SEARCH` (lexical_declaration, line 47, exported)
- `RECORD_SEARCH` (lexical_declaration, line 48, exported)
- `FILE_SEARCH` (lexical_declaration, line 49, exported)
- `RESOLVE_REF` (lexical_declaration, line 50, exported)
- `RESOLVE_PREFIX` (lexical_declaration, line 51, exported)
- `INDEX_KIND` (lexical_declaration, line 52, exported)
- `API_PREFIX` (lexical_declaration, line 53, exported)
- `QUERY_REFS` (lexical_declaration, line 54, exported)
- `RESERVED_SEGMENTS` (lexical_declaration, line 63, exported)

## Contained in

- [configuration/constants](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-configuration-constants.md)

## Source

```typescript
import { ALGO_FACE, ARCH_FACE, LEX_FACE, REASON_FACE } from "@govlab/constants";
import { ANATOMY_FACE, CHAPTER_FACE } from "@banes-lab/web/constants/vocabulary.constants";
import type { GrammarKind } from "#types/catalog.types";
import { RECORDS_SEGMENT } from "@banes-lab/web/assets/link.assets";

export { RECORDS_SEGMENT };
export const API_SEGMENT = "api";
export const PAGES_SEGMENT = "pages";
export const FACETS_SEGMENT = "facets";
export const SOURCE_SEGMENT = "source";
export const RESOLVE_SEGMENT = "resolve";
export const CLOSURE_SEGMENT = "closure";
export const ROUTE_SEGMENT = "route";
export const NUMBERS_SEGMENT = "numbers";
export const IDS_SEGMENT = "ids";
export const SEARCH_SEGMENT = "search";
export const SEARCH_KIND = "search";
export const CONTACT_SEGMENT = "contact";
export const SCHEMA_SEGMENT = "schema";
export const MOVED_SEGMENT = "moved";
export const QUERY_SEGMENT = "query";
export const QUERY_ENDPOINT = "/q";
export const QUERY_LIMITS = { defaultLimit: 50, depth: 3, limit: 200 } as const;
export const QUERY_FUZZY = {
    stemMinimum: 5,
    suffixes: ["ation", "ency", "ence", "ment", "ness", "ity", "ent", "ing", "ion", "ive", "al"],
    suggestions: 5,
} as const;
export const SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
export const SCHEMA_KIND = "schema" satisfies GrammarKind;
export const MAP_KEY_THRESHOLD = 32;
export const SLUGS_SEGMENT = "slugs";
export const TEXT_EXTENSION = ".txt";
export const CATALOG_VERSION = 2;
export const PATH_PLACEHOLDER = "{path}";
export const FOLDER_PLACEHOLDER = "{folder}";
export const SPANNING_PLACEHOLDERS: ReadonlySet<string> = new Set([PATH_PLACEHOLDER, FOLDER_PLACEHOLDER]);
export const CATALOG_FILE_BUDGET = 512 * 1024;
export const INDEX_PART_BUDGET = CATALOG_FILE_BUDGET / 2;
export const INDEX_PART_MARK = "_";
export const INDEX_PART_KIND = "index-part";
export const SLUG_CHARACTERS = "abcdefghijklmnopqrstuvwxyz0123456789";
export const SLUG_SEPARATOR = "-";
export const LEADING_ARTICLES: ReadonlySet<string> = new Set(["the", "a", "an"]);
export const RESOLVE_FIRST: readonly string[] = [CHAPTER_FACE, ARCH_FACE, LEX_FACE, ALGO_FACE, REASON_FACE];
export const RESOLVE_LAST: readonly string[] = [ANATOMY_FACE];
export const SECTION_SEARCH = "sections";
export const RECORD_SEARCH = "records";
export const FILE_SEARCH = "files";
export const RESOLVE_REF = "api:resolve";
export const RESOLVE_PREFIX = `${RESOLVE_REF}/`;
export const INDEX_KIND = "index";
export const API_PREFIX = "api:";
export const QUERY_REFS: ReadonlySet<string> = new Set([
    "api:route",
    "api:search",
    "api:resolve",
    "api:contact",
    "api:ids",
    "api:moved",
    "api:query",
]);
export const RESERVED_SEGMENTS: ReadonlySet<string> = new Set([API_SEGMENT, RECORDS_SEGMENT, SOURCE_SEGMENT]);
```
