@paragraphcms/client 1.6.0 → 2.0.0
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/LICENSE +21 -0
- package/README.md +38 -500
- package/dist/client.d.ts +0 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +83 -44
- package/dist/types.d.ts +94 -96
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Paragraph CMS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,545 +1,83 @@
|
|
|
1
1
|
# @paragraphcms/client
|
|
2
2
|
|
|
3
|
-
Official TypeScript client for the Paragraph CMS
|
|
3
|
+
Official TypeScript client for the Paragraph CMS API.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<!--
|
|
6
|
+
Replace this block with the README image.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
<p align="center">
|
|
9
|
+
<img src="./assets/paragraph-client.png" alt="@paragraphcms/client" />
|
|
10
|
+
</p>
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
`@paragraphcms/client` is a small, typed SDK built on top of the standard Fetch API. It runs in Node.js 18+ and other server-side runtimes that expose `fetch`.
|
|
8
14
|
|
|
9
|
-
Install
|
|
15
|
+
## Install
|
|
10
16
|
|
|
11
17
|
```bash
|
|
12
18
|
npm install @paragraphcms/client
|
|
13
|
-
|
|
14
|
-
# Alternative package managers
|
|
19
|
+
# or
|
|
15
20
|
pnpm add @paragraphcms/client
|
|
21
|
+
# or
|
|
16
22
|
yarn add @paragraphcms/client
|
|
17
23
|
```
|
|
18
24
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
import { Client } from "@paragraphcms/client";
|
|
23
|
-
|
|
24
|
-
const client = new Client({
|
|
25
|
-
apiKey: process.env.PARAGRAPH_API_KEY!,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const pages = await client.pages.list();
|
|
29
|
-
const page = await client.pages.getBySlug("pricing");
|
|
30
|
-
|
|
31
|
-
console.log(pages.meta.total_items);
|
|
32
|
-
console.log(page.id);
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Table of Contents
|
|
36
|
-
|
|
37
|
-
- [Requirements](#requirements)
|
|
38
|
-
- [Features](#features)
|
|
39
|
-
- [Creating a Client Instance](#creating-a-client-instance)
|
|
40
|
-
- [Configuration](#configuration)
|
|
41
|
-
- [Per-request Options](#per-request-options)
|
|
42
|
-
- [Error Handling](#error-handling)
|
|
43
|
-
- [Rate Limiting](#rate-limiting)
|
|
44
|
-
- [Return Shapes](#return-shapes)
|
|
45
|
-
- [API](#api)
|
|
46
|
-
- [End-to-end Examples](#end-to-end-examples)
|
|
47
|
-
- [Exported Types](#exported-types)
|
|
48
|
-
- [Testing](#testing)
|
|
49
|
-
- [License](#license)
|
|
50
|
-
|
|
51
|
-
## Requirements
|
|
52
|
-
|
|
53
|
-
- Node.js `18+` for direct Node.js usage.
|
|
54
|
-
- A runtime with standard Fetch API primitives for edge and serverless usage.
|
|
55
|
-
- ESM support. The package is published as an ES module.
|
|
56
|
-
|
|
57
|
-
## Features
|
|
58
|
-
|
|
59
|
-
- Full coverage for the current Paragraph CMS v1 API surface.
|
|
60
|
-
- `new Client({ apiKey })` entrypoint with a compact, typed SDK.
|
|
61
|
-
- Built-in request queue that rate-limits each client instance to `5 req/s` by default.
|
|
62
|
-
- Automatic retries for `429 Too Many Requests` responses using `Retry-After` when available.
|
|
63
|
-
- Runtime-agnostic implementation with no runtime dependencies.
|
|
64
|
-
- First-class TypeScript types for payloads, list metadata, domain models, and API errors.
|
|
65
|
-
- Request cancellation with `AbortSignal`.
|
|
66
|
-
|
|
67
|
-
## Creating a Client Instance
|
|
68
|
-
|
|
69
|
-
`const client = new Client(options)`
|
|
70
|
-
|
|
71
|
-
Initialize the client with your Paragraph API key and optional runtime settings:
|
|
72
|
-
|
|
73
|
-
```ts
|
|
74
|
-
import { Client, type ClientOptions } from "@paragraphcms/client";
|
|
75
|
-
|
|
76
|
-
const config: ClientOptions = {
|
|
77
|
-
apiKey: process.env.PARAGRAPH_API_KEY!,
|
|
78
|
-
timeoutMs: 10_000,
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const client = new Client(config);
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
To target a local or staging API, pass `baseUrl` explicitly:
|
|
85
|
-
|
|
86
|
-
```ts
|
|
87
|
-
const client = new Client({
|
|
88
|
-
apiKey: process.env.PARAGRAPH_API_KEY!,
|
|
89
|
-
baseUrl: "http://localhost:3001",
|
|
90
|
-
});
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
Important runtime notes:
|
|
94
|
-
|
|
95
|
-
- The default API base URL is `https://api.paragraphcms.com/v1`.
|
|
96
|
-
- If you pass `baseUrl: "https://api.paragraphcms.com"` or another origin without `/v1`, the client normalizes it to the `/v1` API root automatically.
|
|
97
|
-
- The client authenticates requests with the `x-api-key` header.
|
|
98
|
-
- Request and response field names intentionally mirror the HTTP API, so payload keys remain in `snake_case`.
|
|
99
|
-
|
|
100
|
-
## Configuration
|
|
101
|
-
|
|
102
|
-
```ts
|
|
103
|
-
type ClientOptions = {
|
|
104
|
-
apiKey: string;
|
|
105
|
-
baseUrl?: string;
|
|
106
|
-
fetch?: typeof globalThis.fetch;
|
|
107
|
-
headers?: HeadersInit;
|
|
108
|
-
timeoutMs?: number;
|
|
109
|
-
maxRequestsPerSecond?: number;
|
|
110
|
-
};
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### `apiKey`
|
|
114
|
-
|
|
115
|
-
Required. Paragraph CMS organization API key.
|
|
116
|
-
|
|
117
|
-
### `baseUrl`
|
|
118
|
-
|
|
119
|
-
Optional. Defaults to `https://api.paragraphcms.com/v1`.
|
|
120
|
-
|
|
121
|
-
Accepted examples:
|
|
122
|
-
|
|
123
|
-
- `https://api.paragraphcms.com/v1`
|
|
124
|
-
- `https://api.paragraphcms.com`
|
|
125
|
-
- `http://localhost:3001/v1`
|
|
126
|
-
|
|
127
|
-
### `fetch`
|
|
128
|
-
|
|
129
|
-
Optional custom fetch implementation. Useful in tests or custom runtimes.
|
|
130
|
-
|
|
131
|
-
### `headers`
|
|
132
|
-
|
|
133
|
-
Optional default headers merged into every request.
|
|
134
|
-
|
|
135
|
-
### `timeoutMs`
|
|
136
|
-
|
|
137
|
-
Optional default request timeout in milliseconds. Per-request options can override it.
|
|
138
|
-
|
|
139
|
-
### `maxRequestsPerSecond`
|
|
140
|
-
|
|
141
|
-
Optional per-client limiter ceiling. Defaults to `5`.
|
|
142
|
-
|
|
143
|
-
### `maxRateLimitRetries`
|
|
144
|
-
|
|
145
|
-
Optional maximum number of automatic retries after a `429 Too Many Requests` response. Defaults to `2`. Set to `0` to disable retries.
|
|
146
|
-
|
|
147
|
-
## Per-request Options
|
|
148
|
-
|
|
149
|
-
Every SDK method accepts an optional final `RequestOptions` argument:
|
|
150
|
-
|
|
151
|
-
```ts
|
|
152
|
-
type RequestOptions = {
|
|
153
|
-
signal?: AbortSignal;
|
|
154
|
-
headers?: HeadersInit;
|
|
155
|
-
timeoutMs?: number;
|
|
156
|
-
maxRateLimitRetries?: number;
|
|
157
|
-
};
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
For methods that also accept a body or query object, pass request options as the last argument:
|
|
161
|
-
|
|
162
|
-
```ts
|
|
163
|
-
const controller = new AbortController();
|
|
164
|
-
|
|
165
|
-
const page = await client.pages.get("page-id", undefined, {
|
|
166
|
-
signal: controller.signal,
|
|
167
|
-
timeoutMs: 10_000,
|
|
168
|
-
});
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Error Handling
|
|
25
|
+
## Quick Start
|
|
172
26
|
|
|
173
|
-
|
|
27
|
+
Create a client instance with your API key:
|
|
174
28
|
|
|
175
29
|
```ts
|
|
176
|
-
import {
|
|
177
|
-
Client,
|
|
178
|
-
ParagraphApiError,
|
|
179
|
-
ParagraphClientError,
|
|
180
|
-
} from "@paragraphcms/client";
|
|
181
|
-
|
|
182
|
-
const client = new Client({
|
|
183
|
-
apiKey: process.env.PARAGRAPH_API_KEY!,
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
try {
|
|
187
|
-
await client.pages.get("missing-id");
|
|
188
|
-
} catch (error) {
|
|
189
|
-
if (error instanceof ParagraphApiError) {
|
|
190
|
-
console.error(error.status);
|
|
191
|
-
console.error(error.code);
|
|
192
|
-
console.error(error.message);
|
|
193
|
-
console.error(error.details);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (error instanceof ParagraphClientError) {
|
|
197
|
-
console.error(error.message);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
## Rate Limiting
|
|
203
|
-
|
|
204
|
-
Paragraph CMS v1 is rate-limited to `5 req/s`. Each `Client` instance includes an internal queue that spaces request starts so the instance stays within that budget by default.
|
|
205
|
-
|
|
206
|
-
Important details:
|
|
207
|
-
|
|
208
|
-
- The limiter is per client instance, not global across containers, lambdas, or workers.
|
|
209
|
-
- If your application creates many `Client` instances, each instance keeps its own queue.
|
|
210
|
-
- The safest production pattern is to reuse one shared `Client` instance per process or isolate when possible.
|
|
211
|
-
- If the API still returns `429 Too Many Requests`, the client retries automatically up to `maxRateLimitRetries` times and honors the `Retry-After` header when it is present.
|
|
212
|
-
- Request timeouts include retry wait time and all retry attempts, not just the first fetch.
|
|
213
|
-
|
|
214
|
-
You can lower the per-instance ceiling if needed:
|
|
30
|
+
import { Client } from "@paragraphcms/client";
|
|
215
31
|
|
|
216
|
-
```ts
|
|
217
32
|
const client = new Client({
|
|
218
33
|
apiKey: process.env.PARAGRAPH_API_KEY!,
|
|
219
|
-
maxRequestsPerSecond: 3,
|
|
220
34
|
});
|
|
221
35
|
```
|
|
222
36
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
- Single-resource endpoints return the unwrapped `data` payload.
|
|
226
|
-
- Paginated endpoints return `{ data, meta }`.
|
|
227
|
-
- `locales.list()` returns a plain `Locale[]` because the underlying API endpoint is not paginated.
|
|
228
|
-
|
|
229
|
-
## API
|
|
230
|
-
|
|
231
|
-
The SDK closely mirrors the Paragraph CMS HTTP API. Resource names stay familiar and request/response bodies are intentionally left in `snake_case` to match the wire format.
|
|
232
|
-
|
|
233
|
-
### Root
|
|
234
|
-
|
|
235
|
-
```ts
|
|
236
|
-
client.getInfo(options?)
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
Returns the public `/v1` info payload:
|
|
240
|
-
|
|
241
|
-
```ts
|
|
242
|
-
{
|
|
243
|
-
version: "v1",
|
|
244
|
-
openapi_url: "/v1/openapi.json",
|
|
245
|
-
authentication: {
|
|
246
|
-
type: "api_key",
|
|
247
|
-
supported_headers: ["x-api-key", "authorization"],
|
|
248
|
-
authorization_format: "Bearer <api-key>",
|
|
249
|
-
},
|
|
250
|
-
resources: [...],
|
|
251
|
-
}
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
### Pages
|
|
255
|
-
|
|
256
|
-
Page listing, detail, mutation, duplication, restore, and translation helpers:
|
|
37
|
+
### Get All Pages or Pages From a Collection
|
|
257
38
|
|
|
258
39
|
```ts
|
|
259
|
-
client.pages.list(
|
|
260
|
-
client.pages.create(body?, options?)
|
|
261
|
-
client.pages.get(pageId, query?, options?)
|
|
262
|
-
client.pages.getBySlug(slug, options?)
|
|
263
|
-
client.pages.update(pageId, body, options?)
|
|
264
|
-
client.pages.delete(pageId, options?)
|
|
265
|
-
client.pages.restore(pageId, options?)
|
|
266
|
-
client.pages.permanentlyDelete(pageId, options?)
|
|
267
|
-
client.pages.duplicate(pageId, options?)
|
|
268
|
-
client.pages.createTranslation(pageId, body, options?)
|
|
269
|
-
client.page.get(pageId, query?, options?)
|
|
270
|
-
client.page.getBySlug(slug, options?)
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
Supported `sort` fields for `pages.list()`:
|
|
274
|
-
|
|
275
|
-
- `title`
|
|
276
|
-
- `language`
|
|
277
|
-
- `created_at`
|
|
278
|
-
- `updated_at`
|
|
279
|
-
- `published_at`
|
|
40
|
+
const { data: allPages, meta } = await client.pages.list();
|
|
280
41
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
- If you omit both `limit` and `page`, `pages.list()` returns the full matching result set.
|
|
284
|
-
- `collection` is a convenience alias for `collection_id` in `pages.list()` queries.
|
|
285
|
-
- `label_id` is passed as `string[]` in the SDK and serialized to the API CSV format automatically.
|
|
286
|
-
- `pages.list()` sends `include_content: false` by default. Set `include_content: true` to include `content` in list responses.
|
|
287
|
-
- Page responses should be treated as Tiptap JSON arrays. `content_format` is no longer required in the response shape.
|
|
288
|
-
- `page.get()` is a short alias for `pages.get()`.
|
|
289
|
-
- `pages.getBySlug()` is an SDK convenience lookup built on top of `pages.list({ slug })`, then fetches the full page details by ID.
|
|
290
|
-
- `page.getBySlug()` is a short alias for the same lookup.
|
|
291
|
-
|
|
292
|
-
### Collections
|
|
293
|
-
|
|
294
|
-
```ts
|
|
295
|
-
client.collections.list(query?, options?)
|
|
296
|
-
client.collections.create(body, options?)
|
|
297
|
-
client.collections.get(collectionId, options?)
|
|
298
|
-
client.collections.update(collectionId, body, options?)
|
|
299
|
-
client.collections.delete(collectionId, options?)
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
Supported `sort` fields for `collections.list()`:
|
|
303
|
-
|
|
304
|
-
- `name`
|
|
305
|
-
- `page_count`
|
|
306
|
-
- `last_modified_at`
|
|
307
|
-
|
|
308
|
-
### Media
|
|
309
|
-
|
|
310
|
-
```ts
|
|
311
|
-
client.media.list(query?, options?)
|
|
312
|
-
client.media.upload(body, options?)
|
|
313
|
-
client.media.get(mediaId, options?)
|
|
314
|
-
client.media.update(mediaId, body, options?)
|
|
315
|
-
client.media.delete(mediaId, options?)
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
Supported `sort` fields for `media.list()`:
|
|
319
|
-
|
|
320
|
-
- `file_name`
|
|
321
|
-
- `size`
|
|
322
|
-
- `created_at`
|
|
323
|
-
- `updated_at`
|
|
324
|
-
|
|
325
|
-
`media.upload()` accepts:
|
|
326
|
-
|
|
327
|
-
- `File`
|
|
328
|
-
- `Blob`
|
|
329
|
-
- `ArrayBuffer`
|
|
330
|
-
- Typed arrays such as `Uint8Array`
|
|
331
|
-
- Node.js `Buffer`
|
|
332
|
-
|
|
333
|
-
Example:
|
|
334
|
-
|
|
335
|
-
```ts
|
|
336
|
-
const file = new File([imageBytes], "hero.png", {
|
|
337
|
-
type: "image/png",
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
const upload = await client.media.upload({
|
|
341
|
-
file,
|
|
342
|
-
page_id: "page-id",
|
|
343
|
-
alt: "Homepage hero",
|
|
344
|
-
});
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
If you upload from a raw `Buffer`, `Uint8Array`, or `ArrayBuffer`, you can also pass `file_name` and `content_type`:
|
|
348
|
-
|
|
349
|
-
```ts
|
|
350
|
-
await client.media.upload({
|
|
351
|
-
file: imageBuffer,
|
|
352
|
-
file_name: "hero.png",
|
|
353
|
-
content_type: "image/png",
|
|
354
|
-
page_id: "page-id",
|
|
42
|
+
const { data: collectionPages } = await client.pages.list({
|
|
43
|
+
collectionId: "collection-id",
|
|
355
44
|
});
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
### Members, Authors, Reviewers
|
|
359
|
-
|
|
360
|
-
```ts
|
|
361
|
-
client.members.list(query?, options?)
|
|
362
|
-
client.members.get(memberId, options?)
|
|
363
|
-
client.authors.list(query?, options?)
|
|
364
|
-
client.authors.get(authorId, options?)
|
|
365
|
-
client.reviewers.list(query?, options?)
|
|
366
|
-
client.reviewers.get(reviewerId, options?)
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
Supported `sort` fields:
|
|
370
|
-
|
|
371
|
-
- `name`
|
|
372
|
-
- `email`
|
|
373
|
-
- `created_at`
|
|
374
|
-
|
|
375
|
-
Notes:
|
|
376
45
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
### Statuses
|
|
381
|
-
|
|
382
|
-
```ts
|
|
383
|
-
client.statuses.list(query?, options?)
|
|
384
|
-
client.statuses.create(body, options?)
|
|
385
|
-
client.statuses.get(statusId, options?)
|
|
386
|
-
client.statuses.update(statusId, body, options?)
|
|
387
|
-
client.statuses.reorder(body, options?)
|
|
388
|
-
client.statuses.delete(statusId, options?)
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
Supported `sort` fields for `statuses.list()`:
|
|
392
|
-
|
|
393
|
-
- `type`
|
|
394
|
-
- `order`
|
|
395
|
-
- `name`
|
|
396
|
-
- `created_at`
|
|
397
|
-
|
|
398
|
-
### Labels
|
|
399
|
-
|
|
400
|
-
```ts
|
|
401
|
-
client.labels.list(query?, options?)
|
|
402
|
-
client.labels.create(body, options?)
|
|
403
|
-
client.labels.get(labelId, options?)
|
|
404
|
-
client.labels.update(labelId, body, options?)
|
|
405
|
-
client.labels.reorder(body, options?)
|
|
406
|
-
client.labels.delete(labelId, options?)
|
|
46
|
+
console.log(meta.totalItems);
|
|
47
|
+
console.log(collectionPages.map((page) => page.title));
|
|
407
48
|
```
|
|
408
49
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
- `order`
|
|
412
|
-
- `name`
|
|
413
|
-
- `created_at`
|
|
414
|
-
|
|
415
|
-
### Data Models
|
|
50
|
+
### Get a Page by Slug
|
|
416
51
|
|
|
417
52
|
```ts
|
|
418
|
-
client.
|
|
419
|
-
client.dataModels.create(body, options?)
|
|
420
|
-
client.dataModels.get(dataModelId, options?)
|
|
421
|
-
client.dataModels.update(dataModelId, body, options?)
|
|
422
|
-
client.dataModels.delete(dataModelId, options?)
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
Supported `sort` fields for `dataModels.list()`:
|
|
426
|
-
|
|
427
|
-
- `name`
|
|
428
|
-
- `created_at`
|
|
429
|
-
- `updated_at`
|
|
430
|
-
|
|
431
|
-
### Locales
|
|
432
|
-
|
|
433
|
-
```ts
|
|
434
|
-
client.locales.list(options?)
|
|
435
|
-
client.locales.get(code, options?)
|
|
436
|
-
client.locales.create(body, options?)
|
|
437
|
-
client.locales.delete(code, options?)
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
`locales.get()` is an SDK convenience lookup over `locales.list()` because the HTTP API exposes locale listing and deletion by code, but not a dedicated locale detail endpoint.
|
|
441
|
-
|
|
442
|
-
### AI
|
|
443
|
-
|
|
444
|
-
```ts
|
|
445
|
-
client.ai.generateMetaName(body, options?)
|
|
446
|
-
client.ai.generateMetaDescription(body, options?)
|
|
447
|
-
client.ai.generateContent(body, options?)
|
|
448
|
-
```
|
|
449
|
-
|
|
450
|
-
## End-to-end Examples
|
|
451
|
-
|
|
452
|
-
### Create a Page and Upload Its Hero Image
|
|
453
|
-
|
|
454
|
-
```ts
|
|
455
|
-
const pageResult = await client.pages.create({
|
|
456
|
-
title: "About",
|
|
457
|
-
language: "en",
|
|
458
|
-
content: [
|
|
459
|
-
{
|
|
460
|
-
type: "paragraph",
|
|
461
|
-
content: [{ type: "text", text: "About" }],
|
|
462
|
-
},
|
|
463
|
-
],
|
|
464
|
-
});
|
|
465
|
-
|
|
466
|
-
await client.media.upload({
|
|
467
|
-
file: heroBytes,
|
|
468
|
-
file_name: "about-hero.png",
|
|
469
|
-
content_type: "image/png",
|
|
470
|
-
page_id: pageResult.page.id,
|
|
471
|
-
alt: "About page hero image",
|
|
472
|
-
});
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
### Create a Translated Page Variant
|
|
53
|
+
const page = await client.pages.getBySlug("pricing");
|
|
476
54
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
language: "de",
|
|
480
|
-
mode: "translate",
|
|
481
|
-
model: "openai/gpt-5.4",
|
|
482
|
-
});
|
|
55
|
+
console.log(page.id);
|
|
56
|
+
console.log(page.title);
|
|
483
57
|
```
|
|
484
58
|
|
|
485
|
-
###
|
|
59
|
+
### Get All Supported Languages
|
|
486
60
|
|
|
487
61
|
```ts
|
|
488
|
-
const
|
|
489
|
-
model: "openai/gpt-5.4",
|
|
490
|
-
title: "Platform overview",
|
|
491
|
-
content: [],
|
|
492
|
-
});
|
|
62
|
+
const locales = await client.locales.list();
|
|
493
63
|
|
|
494
|
-
console.log(
|
|
64
|
+
console.log(locales.map((locale) => locale.code));
|
|
495
65
|
```
|
|
496
66
|
|
|
497
|
-
##
|
|
498
|
-
|
|
499
|
-
The package exports `Client`, `ParagraphApiError`, `ParagraphClientError`, and the main request, response, and domain types used by the SDK, including:
|
|
500
|
-
|
|
501
|
-
- `ClientOptions`
|
|
502
|
-
- `RequestOptions`
|
|
503
|
-
- `ListResponse`
|
|
504
|
-
- `PaginationMeta`
|
|
505
|
-
- `Page`
|
|
506
|
-
- `PageSummary`
|
|
507
|
-
- `Collection`
|
|
508
|
-
- `Media`
|
|
509
|
-
- `MediaDetail`
|
|
510
|
-
- `Status`
|
|
511
|
-
- `Label`
|
|
512
|
-
- `DataModel`
|
|
513
|
-
- `Locale`
|
|
514
|
-
- `Member`
|
|
515
|
-
- `CreatePageRequest`
|
|
516
|
-
- `UpdatePageRequest`
|
|
517
|
-
- `UploadMediaRequest`
|
|
518
|
-
- `GenerateContentRequest`
|
|
519
|
-
|
|
520
|
-
## Testing
|
|
67
|
+
## Framework Guides
|
|
521
68
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
- Unit tests for request serialization, multipart uploads, error handling, and rate limiting.
|
|
525
|
-
- Live integration tests that create, update, fetch, reorder, delete, and clean up real resources against the Paragraph API.
|
|
526
|
-
|
|
527
|
-
Commands:
|
|
528
|
-
|
|
529
|
-
```bash
|
|
530
|
-
npm test
|
|
531
|
-
npm run test:unit
|
|
532
|
-
npm run test:integration
|
|
533
|
-
```
|
|
69
|
+
Build with:
|
|
534
70
|
|
|
535
|
-
|
|
71
|
+
- [Next.js](https://paragraphcms.com)
|
|
72
|
+
- [Nuxt](https://paragraphcms.com)
|
|
73
|
+
- [Astro](https://paragraphcms.com)
|
|
74
|
+
- [SvelteKit](https://paragraphcms.com)
|
|
75
|
+
- [Remix](https://paragraphcms.com)
|
|
536
76
|
|
|
537
|
-
|
|
538
|
-
- `PARAGRAPH_API_BASE_URL` optionally overrides the API target for local or staging environments.
|
|
539
|
-
- `PARAGRAPH_AI_MODEL` optionally sets the model used by AI endpoint tests. If omitted, AI integration tests are skipped.
|
|
77
|
+
## Documentation
|
|
540
78
|
|
|
541
|
-
|
|
79
|
+
For full guides and API reference, see [paragraphcms.com](https://paragraphcms.com).
|
|
542
80
|
|
|
543
81
|
## License
|
|
544
82
|
|
|
545
|
-
|
|
83
|
+
MIT
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { AiContentResult, AiMetaDescriptionResult, AiMetaNameResult, ApiInfo, ClientOptions, Collection, CollectionListQuery, CollectionMutationResult, CreateCollectionRequest, CreateDataModelRequest, CreateLabelRequest, CreateLocaleRequest, CreatePageRequest, CreatePageTranslationRequest, CreateStatusRequest, DataModel, DataModelListQuery, DataModelMutationResult, DeleteByCodeResult, DeleteResult, GenerateContentRequest, GenerateMetaRequest, GetPageQuery, Label, LabelMutationResult, LabelListQuery, ListResponse, Locale, LocaleMutationResult, Media, MediaDeleteResult, MediaDetail, MediaListQuery, MediaMutationResult, MediaUploadResult, Member, MemberListQuery, Page, PageListQuery, PageSummary, PageMutationResult, PageRestoreResult, PermanentDeleteResult, ReorderLabelsRequest, ReorderResult, ReorderStatusesRequest, RequestOptions, Status, StatusListQuery, StatusMutationResult, UpdateCollectionRequest, UpdateDataModelRequest, UpdateLabelRequest, UpdateMediaRequest, UpdatePageRequest, UpdateStatusRequest, UploadMediaRequest } from "./types.js";
|
|
2
2
|
export declare class Client {
|
|
3
3
|
private readonly apiKey;
|
|
4
|
-
private readonly baseUrl;
|
|
5
4
|
private readonly fetchImpl;
|
|
6
5
|
private readonly defaultHeaders;
|
|
7
6
|
private readonly timeoutMs?;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAEhB,OAAO,EACP,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,YAAY,EACZ,KAAK,EACL,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,oBAAoB,EACpB,KAAK,EACL,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,MAAM,EACN,eAAe,EACf,IAAI,EACJ,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EAEtB,cAAc,EACd,MAAM,EACN,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAEhB,OAAO,EACP,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,YAAY,EACZ,KAAK,EACL,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,oBAAoB,EACpB,KAAK,EACL,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,MAAM,EACN,eAAe,EACf,IAAI,EACJ,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EA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AWL,aAAa;YAoBb,YAAY;YA+CZ,aAAa;IA0B3B,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,WAAW;CAyJpB"}
|
package/dist/client.js
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import { ParagraphApiError, ParagraphClientError, } from "./errors.js";
|
|
2
2
|
import { RequestRateLimiter } from "./rate-limiter.js";
|
|
3
|
-
const
|
|
3
|
+
const API_BASE_URL = "https://api.paragraphcms.com/v1";
|
|
4
4
|
const DEFAULT_REQUESTS_PER_SECOND = 5;
|
|
5
5
|
const DEFAULT_RATE_LIMIT_RETRIES = 2;
|
|
6
6
|
const DEFAULT_RATE_LIMIT_RETRY_DELAY_MS = 1000;
|
|
7
7
|
const LOOKUP_PAGE_SIZE = 100;
|
|
8
|
+
const PRESERVED_TRANSFORM_KEYS = new Set([
|
|
9
|
+
"content",
|
|
10
|
+
"editorNode",
|
|
11
|
+
"fields",
|
|
12
|
+
]);
|
|
13
|
+
const SPECIAL_API_KEY_MAP = {
|
|
14
|
+
labelIds: "label_id",
|
|
15
|
+
};
|
|
16
|
+
const SPECIAL_SDK_KEY_MAP = {
|
|
17
|
+
label_id: "labelIds",
|
|
18
|
+
};
|
|
8
19
|
function resolveFetchImplementation(customFetch) {
|
|
9
20
|
const fetchImpl = customFetch ?? globalThis.fetch;
|
|
10
21
|
if (typeof fetchImpl !== "function") {
|
|
@@ -15,26 +26,59 @@ function resolveFetchImplementation(customFetch) {
|
|
|
15
26
|
}
|
|
16
27
|
return fetchImpl;
|
|
17
28
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
function isPlainObject(value) {
|
|
30
|
+
if (typeof value !== "object" || value === null) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
const prototype = Object.getPrototypeOf(value);
|
|
34
|
+
return prototype === Object.prototype || prototype === null;
|
|
35
|
+
}
|
|
36
|
+
function toCamelCaseKey(key) {
|
|
37
|
+
const mappedKey = SPECIAL_SDK_KEY_MAP[key];
|
|
38
|
+
if (mappedKey) {
|
|
39
|
+
return mappedKey;
|
|
22
40
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
41
|
+
return key.replace(/_([a-z])/g, (_match, letter) => letter.toUpperCase());
|
|
42
|
+
}
|
|
43
|
+
function toSnakeCaseKey(key) {
|
|
44
|
+
const mappedKey = SPECIAL_API_KEY_MAP[key];
|
|
45
|
+
if (mappedKey) {
|
|
46
|
+
return mappedKey;
|
|
27
47
|
}
|
|
28
|
-
|
|
29
|
-
|
|
48
|
+
return key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
|
|
49
|
+
}
|
|
50
|
+
function transformKeysDeep(value, transformKey) {
|
|
51
|
+
if (Array.isArray(value)) {
|
|
52
|
+
return value.map((item) => transformKeysDeep(item, transformKey));
|
|
53
|
+
}
|
|
54
|
+
if (!isPlainObject(value)) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
57
|
+
const transformed = {};
|
|
58
|
+
for (const [key, nestedValue] of Object.entries(value)) {
|
|
59
|
+
const transformedKey = transformKey(key);
|
|
60
|
+
if (PRESERVED_TRANSFORM_KEYS.has(transformedKey)) {
|
|
61
|
+
transformed[transformedKey] = nestedValue;
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
transformed[transformedKey] = transformKeysDeep(nestedValue, transformKey);
|
|
30
65
|
}
|
|
31
|
-
return
|
|
66
|
+
return transformed;
|
|
67
|
+
}
|
|
68
|
+
function toApiPayload(value) {
|
|
69
|
+
return transformKeysDeep(value, toSnakeCaseKey);
|
|
32
70
|
}
|
|
33
|
-
function
|
|
71
|
+
function toSdkPayload(value) {
|
|
72
|
+
return transformKeysDeep(value, toCamelCaseKey);
|
|
73
|
+
}
|
|
74
|
+
function buildUrl(path, query) {
|
|
34
75
|
const normalizedPath = path ? `/${path.replace(/^\/+/, "")}` : "";
|
|
35
|
-
const url = new URL(`${
|
|
36
|
-
|
|
37
|
-
|
|
76
|
+
const url = new URL(`${API_BASE_URL}${normalizedPath}`);
|
|
77
|
+
const apiQuery = query
|
|
78
|
+
? toApiPayload(query)
|
|
79
|
+
: undefined;
|
|
80
|
+
if (apiQuery) {
|
|
81
|
+
for (const [key, rawValue] of Object.entries(apiQuery)) {
|
|
38
82
|
if (rawValue === undefined || rawValue === null) {
|
|
39
83
|
continue;
|
|
40
84
|
}
|
|
@@ -215,11 +259,11 @@ function toBlobPart(file) {
|
|
|
215
259
|
}
|
|
216
260
|
function buildUploadFilePart(input) {
|
|
217
261
|
const source = toBlobPart(input.file);
|
|
218
|
-
const fileName = input.
|
|
262
|
+
const fileName = input.fileName ??
|
|
219
263
|
(typeof File !== "undefined" && input.file instanceof File
|
|
220
264
|
? input.file.name
|
|
221
265
|
: "upload.bin");
|
|
222
|
-
const contentType = input.
|
|
266
|
+
const contentType = input.contentType ??
|
|
223
267
|
("type" in source.value &&
|
|
224
268
|
typeof source.value.type === "string" &&
|
|
225
269
|
source.value.type.length > 0
|
|
@@ -265,7 +309,7 @@ function createUploadFormData(input) {
|
|
|
265
309
|
else {
|
|
266
310
|
formData.append("file", filePart.value);
|
|
267
311
|
}
|
|
268
|
-
formData.append("page_id", input.
|
|
312
|
+
formData.append("page_id", input.pageId);
|
|
269
313
|
if (input.alt !== undefined && input.alt !== null) {
|
|
270
314
|
formData.append("alt", input.alt);
|
|
271
315
|
}
|
|
@@ -273,7 +317,6 @@ function createUploadFormData(input) {
|
|
|
273
317
|
}
|
|
274
318
|
export class Client {
|
|
275
319
|
apiKey;
|
|
276
|
-
baseUrl;
|
|
277
320
|
fetchImpl;
|
|
278
321
|
defaultHeaders;
|
|
279
322
|
timeoutMs;
|
|
@@ -488,11 +531,15 @@ export class Client {
|
|
|
488
531
|
}),
|
|
489
532
|
};
|
|
490
533
|
constructor(options) {
|
|
491
|
-
if (
|
|
534
|
+
if ("baseUrl" in options ||
|
|
535
|
+
"apiUrl" in options) {
|
|
536
|
+
throw new ParagraphClientError("`baseUrl` and `apiUrl` are not supported. The client always uses the official Paragraph CMS API endpoint.");
|
|
537
|
+
}
|
|
538
|
+
if (typeof options.apiKey !== "string" ||
|
|
539
|
+
!options.apiKey.trim()) {
|
|
492
540
|
throw new ParagraphClientError("`apiKey` is required.");
|
|
493
541
|
}
|
|
494
542
|
this.apiKey = options.apiKey.trim();
|
|
495
|
-
this.baseUrl = normalizeBaseUrl(options.baseUrl ?? DEFAULT_BASE_URL);
|
|
496
543
|
this.fetchImpl = resolveFetchImplementation(options.fetch);
|
|
497
544
|
this.defaultHeaders = new Headers(options.headers);
|
|
498
545
|
this.timeoutMs = options.timeoutMs;
|
|
@@ -510,13 +557,13 @@ export class Client {
|
|
|
510
557
|
});
|
|
511
558
|
if (pageListQuery.limit !== undefined ||
|
|
512
559
|
pageListQuery.page !== undefined ||
|
|
513
|
-
!response.meta.
|
|
560
|
+
!response.meta.hasNextPage) {
|
|
514
561
|
return response;
|
|
515
562
|
}
|
|
516
563
|
const items = [...response.data];
|
|
517
564
|
let nextPage = response.meta.page + 1;
|
|
518
565
|
let lastMeta = response.meta;
|
|
519
|
-
while (lastMeta.
|
|
566
|
+
while (lastMeta.hasNextPage) {
|
|
520
567
|
const nextResponse = await this.requestList("GET", "/pages", {
|
|
521
568
|
query: {
|
|
522
569
|
...pageListQuery,
|
|
@@ -534,25 +581,17 @@ export class Client {
|
|
|
534
581
|
meta: {
|
|
535
582
|
page: 1,
|
|
536
583
|
limit: items.length,
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
584
|
+
totalItems: items.length,
|
|
585
|
+
totalPages: items.length > 0 ? 1 : 0,
|
|
586
|
+
hasNextPage: false,
|
|
587
|
+
hasPrevPage: false,
|
|
541
588
|
},
|
|
542
589
|
};
|
|
543
590
|
}
|
|
544
591
|
createPageListQuery(query) {
|
|
545
|
-
const collection = query?.collection_id ?? query?.collection;
|
|
546
|
-
if (query?.collection !== undefined &&
|
|
547
|
-
query?.collection_id !== undefined &&
|
|
548
|
-
query.collection !== query.collection_id) {
|
|
549
|
-
throw new ParagraphClientError("`collection` and `collection_id` must match when both are provided.");
|
|
550
|
-
}
|
|
551
592
|
return {
|
|
552
593
|
...(query ?? {}),
|
|
553
|
-
|
|
554
|
-
collection_id: collection,
|
|
555
|
-
include_content: query?.include_content ?? false,
|
|
594
|
+
includeContent: query?.includeContent ?? false,
|
|
556
595
|
};
|
|
557
596
|
}
|
|
558
597
|
requestData(method, path, config) {
|
|
@@ -585,7 +624,7 @@ export class Client {
|
|
|
585
624
|
if (match) {
|
|
586
625
|
return match;
|
|
587
626
|
}
|
|
588
|
-
if (!response.meta.
|
|
627
|
+
if (!response.meta.hasNextPage) {
|
|
589
628
|
break;
|
|
590
629
|
}
|
|
591
630
|
page += 1;
|
|
@@ -621,11 +660,11 @@ export class Client {
|
|
|
621
660
|
code: config.code,
|
|
622
661
|
message: config.message,
|
|
623
662
|
details: config.details,
|
|
624
|
-
request: createRequestDescriptor(method, buildUrl(
|
|
663
|
+
request: createRequestDescriptor(method, buildUrl(path, config.query)),
|
|
625
664
|
});
|
|
626
665
|
}
|
|
627
666
|
requestJson(method, path, config) {
|
|
628
|
-
const url = buildUrl(
|
|
667
|
+
const url = buildUrl(path, config?.query);
|
|
629
668
|
const request = createRequestDescriptor(method, url);
|
|
630
669
|
const headers = new Headers(this.defaultHeaders);
|
|
631
670
|
const timeoutMs = config?.options?.timeoutMs ?? this.timeoutMs;
|
|
@@ -644,7 +683,7 @@ export class Client {
|
|
|
644
683
|
if (!headers.has("content-type")) {
|
|
645
684
|
headers.set("content-type", "application/json");
|
|
646
685
|
}
|
|
647
|
-
body = JSON.stringify(config.body);
|
|
686
|
+
body = JSON.stringify(toApiPayload(config.body));
|
|
648
687
|
}
|
|
649
688
|
const optionHeaders = new Headers(config?.options?.headers);
|
|
650
689
|
for (const [key, value] of optionHeaders.entries()) {
|
|
@@ -667,18 +706,18 @@ export class Client {
|
|
|
667
706
|
}));
|
|
668
707
|
const payload = await parseResponse(response);
|
|
669
708
|
if (response.ok) {
|
|
670
|
-
return payload;
|
|
709
|
+
return toSdkPayload(payload);
|
|
671
710
|
}
|
|
672
711
|
const responseHeaders = new Headers(response.headers);
|
|
673
712
|
const apiError = isApiErrorPayload(payload)
|
|
674
713
|
? new ParagraphApiError({
|
|
714
|
+
body: toSdkPayload(payload),
|
|
675
715
|
status: response.status,
|
|
676
716
|
code: payload.error.code,
|
|
677
717
|
message: payload.error.message,
|
|
678
|
-
details: payload.error.details,
|
|
718
|
+
details: toSdkPayload(payload.error.details),
|
|
679
719
|
headers: responseHeaders,
|
|
680
720
|
request,
|
|
681
|
-
body: payload,
|
|
682
721
|
})
|
|
683
722
|
: new ParagraphApiError({
|
|
684
723
|
status: response.status,
|
package/dist/types.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ export type Uploadable = File | Blob | ArrayBuffer | ArrayBufferView;
|
|
|
10
10
|
export interface PaginationMeta {
|
|
11
11
|
page: number;
|
|
12
12
|
limit: number;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
totalItems: number;
|
|
14
|
+
totalPages: number;
|
|
15
|
+
hasNextPage: boolean;
|
|
16
|
+
hasPrevPage: boolean;
|
|
17
17
|
}
|
|
18
18
|
export interface ListResponse<T> {
|
|
19
19
|
data: T[];
|
|
@@ -21,11 +21,11 @@ export interface ListResponse<T> {
|
|
|
21
21
|
}
|
|
22
22
|
export interface ApiInfo {
|
|
23
23
|
version: string;
|
|
24
|
-
|
|
24
|
+
openapiUrl: string;
|
|
25
25
|
authentication: {
|
|
26
26
|
type: "api_key";
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
supportedHeaders: ["x-api-key", "authorization"];
|
|
28
|
+
authorizationFormat: "Bearer <api-key>";
|
|
29
29
|
};
|
|
30
30
|
resources: string[];
|
|
31
31
|
}
|
|
@@ -49,7 +49,6 @@ export interface RequestOptions {
|
|
|
49
49
|
}
|
|
50
50
|
export interface ClientOptions {
|
|
51
51
|
apiKey: string;
|
|
52
|
-
baseUrl?: string;
|
|
53
52
|
fetch?: typeof globalThis.fetch;
|
|
54
53
|
headers?: HeadersInit;
|
|
55
54
|
timeoutMs?: number;
|
|
@@ -64,12 +63,12 @@ export interface ListQuery {
|
|
|
64
63
|
}
|
|
65
64
|
export interface Member {
|
|
66
65
|
id: string;
|
|
67
|
-
|
|
66
|
+
userId: string;
|
|
68
67
|
role: string;
|
|
69
68
|
name: string | null;
|
|
70
69
|
email: string | null;
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
imageUrl: string | null;
|
|
71
|
+
createdAt: string | null;
|
|
73
72
|
}
|
|
74
73
|
export interface Status {
|
|
75
74
|
id: string;
|
|
@@ -78,8 +77,8 @@ export interface Status {
|
|
|
78
77
|
type: StatusType;
|
|
79
78
|
description: string | null;
|
|
80
79
|
order: number;
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
createdAt: string | null;
|
|
81
|
+
updatedAt: string | null;
|
|
83
82
|
}
|
|
84
83
|
export interface Label {
|
|
85
84
|
id: string;
|
|
@@ -87,8 +86,8 @@ export interface Label {
|
|
|
87
86
|
color: string;
|
|
88
87
|
description: string | null;
|
|
89
88
|
order: number;
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
createdAt: string | null;
|
|
90
|
+
lastAppliedAt: string | null;
|
|
92
91
|
}
|
|
93
92
|
export interface DataModelField {
|
|
94
93
|
id: string;
|
|
@@ -104,57 +103,57 @@ export interface DataModelSummary {
|
|
|
104
103
|
}
|
|
105
104
|
export interface DataModel extends DataModelSummary {
|
|
106
105
|
fields: DataModelField[];
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
createdAt: string | null;
|
|
107
|
+
updatedAt: string | null;
|
|
109
108
|
}
|
|
110
109
|
export interface CollectionSummary {
|
|
111
110
|
id: string;
|
|
112
111
|
name: string;
|
|
113
112
|
description: string | null;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
defaultDataModelId: string | null;
|
|
114
|
+
teamIds: string[];
|
|
115
|
+
pageCount: number;
|
|
116
|
+
lastModifiedAt: string | null;
|
|
118
117
|
}
|
|
119
118
|
export interface Collection extends CollectionSummary {
|
|
120
|
-
|
|
119
|
+
defaultDataModel: DataModel | null;
|
|
121
120
|
}
|
|
122
121
|
export interface PageTranslation {
|
|
123
122
|
id: string;
|
|
124
123
|
title: string;
|
|
125
124
|
language: string;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
deletedAt: string | null;
|
|
126
|
+
createdAt: string | null;
|
|
127
|
+
updatedAt: string | null;
|
|
128
|
+
isCurrent: boolean;
|
|
130
129
|
}
|
|
131
130
|
export interface PageSummary {
|
|
132
131
|
id: string;
|
|
133
132
|
title: string;
|
|
134
133
|
slug: string | null;
|
|
135
134
|
language: string;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
contentFormat?: PageContentFormat;
|
|
136
|
+
heroUrl: string | null;
|
|
137
|
+
collectionId: string | null;
|
|
139
138
|
collection: Collection | null;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
translationGroupId: string;
|
|
140
|
+
dataModelId: string | null;
|
|
141
|
+
dataModel: DataModel | null;
|
|
142
|
+
statusId: string | null;
|
|
144
143
|
status: Status | null;
|
|
145
|
-
|
|
144
|
+
authorId: string | null;
|
|
146
145
|
author: Member | null;
|
|
147
|
-
|
|
146
|
+
reviewerId: string | null;
|
|
148
147
|
reviewer: Member | null;
|
|
149
148
|
labels: Label[];
|
|
150
149
|
fields: Record<string, unknown>;
|
|
151
150
|
content?: PageContent;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
151
|
+
metaName: string | null;
|
|
152
|
+
metaDescription: string | null;
|
|
153
|
+
publishedAt: string | null;
|
|
154
|
+
deletedAt: string | null;
|
|
155
|
+
createdAt: string | null;
|
|
156
|
+
updatedAt: string | null;
|
|
158
157
|
}
|
|
159
158
|
export interface Page extends PageSummary {
|
|
160
159
|
content: PageContent;
|
|
@@ -162,30 +161,30 @@ export interface Page extends PageSummary {
|
|
|
162
161
|
}
|
|
163
162
|
export interface Media {
|
|
164
163
|
id: string;
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
pageId: string | null;
|
|
165
|
+
fileName: string;
|
|
167
166
|
alt: string | null;
|
|
168
|
-
|
|
167
|
+
mimeType: string;
|
|
169
168
|
size: number;
|
|
170
169
|
width: number | null;
|
|
171
170
|
height: number | null;
|
|
172
171
|
url: string;
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
createdAt: string | null;
|
|
173
|
+
updatedAt: string | null;
|
|
175
174
|
}
|
|
176
175
|
export interface MediaReferencePage {
|
|
177
176
|
id: string;
|
|
178
177
|
title: string;
|
|
179
178
|
slug: string | null;
|
|
180
179
|
language: string | null;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
translationGroupId: string | null;
|
|
181
|
+
updatedAt: string | null;
|
|
182
|
+
isUnassigned: boolean;
|
|
184
183
|
}
|
|
185
184
|
export interface MediaDetail extends Media {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
referencePageCount: number;
|
|
186
|
+
lastModifiedAt: string | null;
|
|
187
|
+
referencePages: MediaReferencePage[];
|
|
189
188
|
}
|
|
190
189
|
export interface Locale {
|
|
191
190
|
id: string;
|
|
@@ -206,7 +205,7 @@ export interface CollectionMutationResult {
|
|
|
206
205
|
export interface MediaUploadResult {
|
|
207
206
|
message: string;
|
|
208
207
|
media: Media;
|
|
209
|
-
|
|
208
|
+
editorNode: EditorNode;
|
|
210
209
|
}
|
|
211
210
|
export interface MediaMutationResult {
|
|
212
211
|
message: string;
|
|
@@ -215,7 +214,7 @@ export interface MediaMutationResult {
|
|
|
215
214
|
export interface MediaDeleteResult {
|
|
216
215
|
id: string;
|
|
217
216
|
deleted: boolean;
|
|
218
|
-
|
|
217
|
+
deletedCount: number;
|
|
219
218
|
message: string;
|
|
220
219
|
}
|
|
221
220
|
export interface StatusMutationResult {
|
|
@@ -228,7 +227,7 @@ export interface LabelMutationResult {
|
|
|
228
227
|
}
|
|
229
228
|
export interface DataModelMutationResult {
|
|
230
229
|
message: string;
|
|
231
|
-
|
|
230
|
+
dataModel: DataModel;
|
|
232
231
|
}
|
|
233
232
|
export interface LocaleMutationResult {
|
|
234
233
|
message: string;
|
|
@@ -240,11 +239,11 @@ export interface LocaleMutationResult {
|
|
|
240
239
|
}
|
|
241
240
|
export interface AiMetaNameResult {
|
|
242
241
|
message: string;
|
|
243
|
-
|
|
242
|
+
metaName: string;
|
|
244
243
|
}
|
|
245
244
|
export interface AiMetaDescriptionResult {
|
|
246
245
|
message: string;
|
|
247
|
-
|
|
246
|
+
metaDescription: string;
|
|
248
247
|
}
|
|
249
248
|
export interface AiContentResult {
|
|
250
249
|
message: string;
|
|
@@ -269,7 +268,7 @@ export interface PageRestoreResult {
|
|
|
269
268
|
}
|
|
270
269
|
export interface PermanentDeleteResult {
|
|
271
270
|
id: string;
|
|
272
|
-
|
|
271
|
+
permanentlyDeleted: boolean;
|
|
273
272
|
message: string;
|
|
274
273
|
}
|
|
275
274
|
export interface ReorderResult {
|
|
@@ -277,46 +276,45 @@ export interface ReorderResult {
|
|
|
277
276
|
message: string;
|
|
278
277
|
}
|
|
279
278
|
export interface PageListQuery extends ListQuery {
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
includeContent?: boolean;
|
|
280
|
+
collectionId?: string;
|
|
282
281
|
deleted?: DeletedFilter;
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
reviewer_id?: string;
|
|
282
|
+
withoutCollection?: boolean;
|
|
283
|
+
dataModelId?: string;
|
|
284
|
+
statusId?: string;
|
|
285
|
+
statusType?: StatusType;
|
|
286
|
+
authorId?: string;
|
|
287
|
+
reviewerId?: string;
|
|
290
288
|
language?: string;
|
|
291
|
-
|
|
289
|
+
translationGroupId?: string;
|
|
292
290
|
slug?: string;
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
291
|
+
labelIds?: string[];
|
|
292
|
+
updatedAfter?: string;
|
|
293
|
+
updatedBefore?: string;
|
|
294
|
+
publishedAfter?: string;
|
|
295
|
+
publishedBefore?: string;
|
|
298
296
|
published?: boolean;
|
|
299
297
|
}
|
|
300
298
|
export interface GetPageQuery {
|
|
301
|
-
|
|
299
|
+
includeDeleted?: boolean;
|
|
302
300
|
}
|
|
303
301
|
export interface CreatePageRequest {
|
|
304
302
|
title?: string;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
303
|
+
heroUrl?: string | null;
|
|
304
|
+
collectionId?: string | null;
|
|
305
|
+
dataModelId?: string | null;
|
|
308
306
|
language?: string;
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
307
|
+
statusId?: string | null;
|
|
308
|
+
authorId?: string | null;
|
|
309
|
+
reviewerId?: string | null;
|
|
310
|
+
publishedAt?: string | null;
|
|
311
|
+
contentFormat?: PageContentFormat;
|
|
314
312
|
content?: PageContent;
|
|
315
313
|
fields?: Record<string, unknown>;
|
|
316
314
|
slug?: string | null;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
315
|
+
metaName?: string | null;
|
|
316
|
+
metaDescription?: string | null;
|
|
317
|
+
labelIds?: string[];
|
|
320
318
|
}
|
|
321
319
|
export type UpdatePageRequest = CreatePageRequest;
|
|
322
320
|
export interface CreatePageTranslationRequest {
|
|
@@ -325,28 +323,28 @@ export interface CreatePageTranslationRequest {
|
|
|
325
323
|
model?: string;
|
|
326
324
|
}
|
|
327
325
|
export interface CollectionListQuery extends ListQuery {
|
|
328
|
-
|
|
326
|
+
defaultDataModelId?: string;
|
|
329
327
|
}
|
|
330
328
|
export interface CreateCollectionRequest {
|
|
331
329
|
name: string;
|
|
332
330
|
description?: string | null;
|
|
333
|
-
|
|
334
|
-
|
|
331
|
+
defaultDataModelId?: string | null;
|
|
332
|
+
teamIds?: string[];
|
|
335
333
|
}
|
|
336
334
|
export type UpdateCollectionRequest = Partial<CreateCollectionRequest>;
|
|
337
335
|
export interface MediaListQuery extends ListQuery {
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
pageId?: string;
|
|
337
|
+
mimeType?: string;
|
|
340
338
|
}
|
|
341
339
|
export interface UploadMediaRequest {
|
|
342
340
|
file: Uploadable;
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
341
|
+
fileName?: string;
|
|
342
|
+
contentType?: string;
|
|
343
|
+
pageId: string;
|
|
346
344
|
alt?: string | null;
|
|
347
345
|
}
|
|
348
346
|
export interface UpdateMediaRequest {
|
|
349
|
-
|
|
347
|
+
fileName?: string;
|
|
350
348
|
alt?: string | null;
|
|
351
349
|
}
|
|
352
350
|
export interface MemberListQuery extends ListQuery {
|
|
@@ -364,7 +362,7 @@ export interface CreateStatusRequest {
|
|
|
364
362
|
export type UpdateStatusRequest = Partial<CreateStatusRequest>;
|
|
365
363
|
export interface ReorderStatusesRequest {
|
|
366
364
|
type: StatusType;
|
|
367
|
-
|
|
365
|
+
statusIds: string[];
|
|
368
366
|
}
|
|
369
367
|
export interface CreateLabelRequest {
|
|
370
368
|
name: string;
|
|
@@ -375,7 +373,7 @@ export type UpdateLabelRequest = Partial<CreateLabelRequest>;
|
|
|
375
373
|
export interface LabelListQuery extends ListQuery {
|
|
376
374
|
}
|
|
377
375
|
export interface ReorderLabelsRequest {
|
|
378
|
-
|
|
376
|
+
labelIds: string[];
|
|
379
377
|
}
|
|
380
378
|
export interface DataModelListQuery extends ListQuery {
|
|
381
379
|
}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src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
{
|
|
2
2
|
"name": "@paragraphcms/client",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Official
|
|
5
|
-
"license": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Official TypeScript client for the Paragraph CMS API.",
|
|
5
|
+
"license": "MIT",
|
|
6
6
|
"author": "Paragraph CMS",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/index.js",
|