@faiber/faiber-modules 0.11.6 → 0.12.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.
Files changed (2) hide show
  1. package/README.md +8 -51
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -23,63 +23,15 @@ const client = new FaiberClient("modules", {
23
23
  const api = new ModulesApi(client);
24
24
 
25
25
  const products = await api.products.list({
26
- page_number: 1,
27
- page_size: 24,
28
- scope: "public-shop",
26
+ "page[number]": 1,
27
+ "page[size]": 24,
29
28
  });
30
29
  const posts = await api.posts.list();
31
30
  ```
32
31
 
33
- Images and videos can be persisted in Modules-managed object storage with the
34
- typed media helper. The service returns the object URL, key, MIME type, and size.
35
-
36
- ```ts
37
- const uploaded = await api.uploadMediaAsset(videoFile, "student-project", {
38
- signal: AbortSignal.timeout(120_000),
39
- });
40
- console.log(uploaded.data.url);
41
- ```
42
-
43
- Published CMS content and arbitrary-depth category trees are available through the
44
- public-role methods:
45
-
46
- ```ts
47
- const categories = await api.publicContentCategories("post", "fa");
48
- const articles = await api.publicContentList("post", "fa", {
49
- page_number: 1,
50
- page_size: 12,
51
- category: categories.data[0]?.slug,
52
- });
53
- const article = await api.publicContent(
54
- "post",
55
- "fa",
56
- "Iran-Teen-AI-&-Coding-Elites-2025", // retained legacy SEO slug is supported
57
- );
58
- renderTrustedCmsHtml(article.data.sanitized_html);
59
- ```
60
-
61
- Published posts and active products share one indexed autocomplete endpoint. Use
62
- `scope: "posts"`, `"products"`, or `"mixed"`; the full Axios response and request
63
- cancellation remain available.
64
-
65
- ```ts
66
- const suggestions = await api.autocomplete(
67
- { q: "برنامه نویسی", scope: "mixed", locale: "fa", limit: 8 },
68
- { signal: AbortSignal.timeout(5_000) },
69
- );
70
-
71
- for (const item of suggestions.data.items) {
72
- console.log(item.kind, item.title, item.slug);
73
- }
74
- ```
75
-
76
- Trusted migration operators can use `importContentCategory` and
77
- `importContentDocument` for deterministic, replay-safe imports. Those calls require
78
- `content:write`; importing a published document also requires `content:publish`.
79
-
80
32
  ## Complete capability
81
33
 
82
- This package exposes 170 generated registered operations plus curated public-content and migration methods from the content and commerce modules service. Common workflows have concise methods on `api`; every generated backend route is also available as a named function on `api.operations`. Generated operation input, query, response, path, verb, and permission contracts are exported from `operations.types`.
34
+ This package exposes 171 registered operations from the content and commerce modules service. Common workflows have concise methods on `api`; every registered backend route is also available as a named function on `api.operations`. Generated operation input, query, response, path, verb, and permission contracts are exported from `operations.types`.
83
35
 
84
36
  | Area | Operations | HTTP methods |
85
37
  |---|---:|---|
@@ -91,13 +43,18 @@ This package exposes 170 generated registered operations plus curated public-con
91
43
  | `category` | 9 | `DELETE`, `GET`, `PATCH`, `POST`, `PUT` |
92
44
  | `comment` | 8 | `DELETE`, `GET`, `PATCH`, `POST`, `PUT` |
93
45
  | `content` | 9 | `DELETE`, `GET`, `PATCH`, `POST`, `PUT` |
46
+ | `content-transfer` | 4 | `GET`, `PUT` |
94
47
  | `integration` | 1 | `GET` |
95
48
  | `inventory` | 12 | `DELETE`, `GET`, `PATCH`, `POST`, `PUT` |
49
+ | `management-api` | 17 | `GET`, `POST`, `PUT` |
50
+ | `media` | 3 | `GET`, `POST` |
96
51
  | `order` | 8 | `DELETE`, `GET`, `PATCH`, `POST`, `PUT` |
52
+ | `podcast` | 8 | `DELETE`, `GET`, `PATCH`, `POST` |
97
53
  | `product` | 13 | `DELETE`, `GET`, `PATCH`, `POST`, `PUT` |
98
54
  | `reaction` | 3 | `DELETE`, `GET`, `POST` |
99
55
  | `request` | 12 | `DELETE`, `GET`, `PATCH`, `POST`, `PUT` |
100
56
  | `router` | 3 | `GET` |
57
+ | `search` | 1 | `GET` |
101
58
  | `seo-content` | 9 | `DELETE`, `GET`, `PATCH`, `POST`, `PUT` |
102
59
  | `service-pricing` | 6 | `DELETE`, `GET`, `PATCH`, `POST`, `PUT` |
103
60
  | `session` | 1 | `GET` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faiber/faiber-modules",
3
- "version": "0.11.6",
3
+ "version": "0.12.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -16,6 +16,6 @@
16
16
  "README.md"
17
17
  ],
18
18
  "dependencies": {
19
- "@faiber/sdk-core": "0.11.6"
19
+ "@faiber/sdk-core": "0.12.0"
20
20
  }
21
21
  }