@localess/client 3.0.6 → 3.0.7-dev.20260513180146
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 +15 -15
- package/dist/client.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,15 +50,15 @@ const client = localessClient({
|
|
|
50
50
|
|
|
51
51
|
### Client Options
|
|
52
52
|
|
|
53
|
-
| Option | Type
|
|
54
|
-
|
|
55
|
-
| `origin` | `string`
|
|
56
|
-
| `spaceId` | `string`
|
|
57
|
-
| `token` | `string`
|
|
58
|
-
| `version` | `'draft'
|
|
59
|
-
| `debug` | `boolean`
|
|
60
|
-
| `cacheTTL` | `number \| false`
|
|
61
|
-
| `fileSystemCache` | `boolean`
|
|
53
|
+
| Option | Type | Required | Default | Description |
|
|
54
|
+
|-------------------|-------------------|----------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
55
|
+
| `origin` | `string` | ✅ | — | Fully qualified domain with protocol (e.g., `https://my-localess.web.app`) |
|
|
56
|
+
| `spaceId` | `string` | ✅ | — | Localess Space ID, found in Space settings |
|
|
57
|
+
| `token` | `string` | ✅ | — | Localess API token, found in Space settings |
|
|
58
|
+
| `version` | `'draft'` | ❌ | `'published'` | Default content version to fetch |
|
|
59
|
+
| `debug` | `boolean` | ❌ | `false` | Enable debug logging |
|
|
60
|
+
| `cacheTTL` | `number \| false` | ❌ | `300` | Cache TTL in **seconds** (default: 5 minutes). Set `false` to disable caching entirely — takes precedence over `fileSystemCache` |
|
|
61
|
+
| `fileSystemCache` | `boolean` | ❌ | `false` | Use a file-system cache instead of the default in-memory cache. Shared across all processes pointing to the same working directory (e.g. Next.js parallel build workers). Respects `cacheTTL` for TTL value |
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
@@ -95,12 +95,12 @@ const content = await client.getContentById<Page>('FRnIT7CUABoRCdSVVGGs', {
|
|
|
95
95
|
|
|
96
96
|
### Content Fetch Parameters
|
|
97
97
|
|
|
98
|
-
| Parameter | Type
|
|
99
|
-
|
|
100
|
-
| `version` | `'draft'
|
|
101
|
-
| `locale` | `string`
|
|
102
|
-
| `resolveReference` | `boolean`
|
|
103
|
-
| `resolveLink` | `boolean`
|
|
98
|
+
| Parameter | Type | Default | Description |
|
|
99
|
+
|--------------------|------------|----------------|-----------------------------------------------|
|
|
100
|
+
| `version` | `'draft'` | Client default | Override the client's default content version |
|
|
101
|
+
| `locale` | `string` | — | ISO 639-1 locale code (e.g., `'en'`, `'de'`) |
|
|
102
|
+
| `resolveReference` | `boolean` | `false` | Resolve content references inline |
|
|
103
|
+
| `resolveLink` | `boolean` | `false` | Resolve content links inline |
|
|
104
104
|
|
|
105
105
|
---
|
|
106
106
|
|
package/dist/client.d.ts
CHANGED