@dani-builder/strapi-client 0.2.0 → 0.4.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 (101) hide show
  1. package/AGENTS.md +9 -5
  2. package/LICENSE +21 -0
  3. package/README.md +50 -0
  4. package/dist/api/articles.d.ts +3 -0
  5. package/dist/api/articles.d.ts.map +1 -1
  6. package/dist/api/articles.js +8 -5
  7. package/dist/api/articles.js.map +1 -1
  8. package/dist/api/authors.d.ts +2 -0
  9. package/dist/api/authors.d.ts.map +1 -1
  10. package/dist/api/authors.js +5 -2
  11. package/dist/api/authors.js.map +1 -1
  12. package/dist/api/categories.d.ts +2 -0
  13. package/dist/api/categories.d.ts.map +1 -1
  14. package/dist/api/categories.js +4 -1
  15. package/dist/api/categories.js.map +1 -1
  16. package/dist/api/faqs.d.ts +2 -0
  17. package/dist/api/faqs.d.ts.map +1 -1
  18. package/dist/api/faqs.js +4 -1
  19. package/dist/api/faqs.js.map +1 -1
  20. package/dist/api/global.js +1 -1
  21. package/dist/api/global.js.map +1 -1
  22. package/dist/api/inquiry.js +1 -1
  23. package/dist/api/inquiry.js.map +1 -1
  24. package/dist/api/navigation.js +1 -1
  25. package/dist/api/navigation.js.map +1 -1
  26. package/dist/api/pages.d.ts +9 -1
  27. package/dist/api/pages.d.ts.map +1 -1
  28. package/dist/api/pages.js +26 -9
  29. package/dist/api/pages.js.map +1 -1
  30. package/dist/api/series.d.ts +2 -0
  31. package/dist/api/series.d.ts.map +1 -1
  32. package/dist/api/series.js +5 -2
  33. package/dist/api/series.js.map +1 -1
  34. package/dist/api/site-settings.js +1 -1
  35. package/dist/api/site-settings.js.map +1 -1
  36. package/dist/api/tags.d.ts +2 -0
  37. package/dist/api/tags.d.ts.map +1 -1
  38. package/dist/api/tags.js +4 -1
  39. package/dist/api/tags.js.map +1 -1
  40. package/dist/client/create-client.d.ts +7 -3
  41. package/dist/client/create-client.d.ts.map +1 -1
  42. package/dist/client/create-client.js +13 -5
  43. package/dist/client/create-client.js.map +1 -1
  44. package/dist/client/index.d.ts +2 -2
  45. package/dist/client/index.d.ts.map +1 -1
  46. package/dist/client/index.js +1 -1
  47. package/dist/client/index.js.map +1 -1
  48. package/dist/index.d.ts +7 -7
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/index.js +4 -4
  51. package/dist/index.js.map +1 -1
  52. package/dist/populate/builders.d.ts +12 -0
  53. package/dist/populate/builders.d.ts.map +1 -1
  54. package/dist/populate/builders.js +10 -0
  55. package/dist/populate/builders.js.map +1 -1
  56. package/dist/populate/core-blocks.d.ts.map +1 -1
  57. package/dist/populate/core-blocks.js +15 -9
  58. package/dist/populate/core-blocks.js.map +1 -1
  59. package/dist/types/components/blocks.d.ts +12 -11
  60. package/dist/types/components/blocks.d.ts.map +1 -1
  61. package/dist/types/components/index.d.ts +1 -1
  62. package/dist/types/components/index.d.ts.map +1 -1
  63. package/dist/types/components/shared.d.ts +14 -3
  64. package/dist/types/components/shared.d.ts.map +1 -1
  65. package/dist/types/components/shared.js +1 -1
  66. package/dist/types/content-types/article.d.ts +3 -1
  67. package/dist/types/content-types/article.d.ts.map +1 -1
  68. package/dist/types/content-types/article.js +1 -1
  69. package/dist/types/content-types/article.js.map +1 -1
  70. package/dist/types/content-types/author.js +1 -1
  71. package/dist/types/content-types/author.js.map +1 -1
  72. package/dist/types/content-types/category.js +1 -1
  73. package/dist/types/content-types/category.js.map +1 -1
  74. package/dist/types/content-types/faq.js +1 -1
  75. package/dist/types/content-types/faq.js.map +1 -1
  76. package/dist/types/content-types/global.js +1 -1
  77. package/dist/types/content-types/global.js.map +1 -1
  78. package/dist/types/content-types/inquiry.js +1 -1
  79. package/dist/types/content-types/inquiry.js.map +1 -1
  80. package/dist/types/content-types/navigation.js +1 -1
  81. package/dist/types/content-types/navigation.js.map +1 -1
  82. package/dist/types/content-types/page.d.ts +12 -3
  83. package/dist/types/content-types/page.d.ts.map +1 -1
  84. package/dist/types/content-types/page.js +1 -1
  85. package/dist/types/content-types/page.js.map +1 -1
  86. package/dist/types/content-types/series.js +1 -1
  87. package/dist/types/content-types/series.js.map +1 -1
  88. package/dist/types/content-types/site-settings.js +1 -1
  89. package/dist/types/content-types/site-settings.js.map +1 -1
  90. package/dist/types/content-types/tag.js +1 -1
  91. package/dist/types/content-types/tag.js.map +1 -1
  92. package/dist/types/index.d.ts +2 -2
  93. package/dist/types/index.d.ts.map +1 -1
  94. package/dist/types/strapi.d.ts +10 -0
  95. package/dist/types/strapi.d.ts.map +1 -1
  96. package/docs/api-guide.md +22 -22
  97. package/docs/block-reference.md +147 -554
  98. package/docs/components.md +234 -0
  99. package/docs/content-types.md +173 -382
  100. package/docs/elements.md +50 -0
  101. package/package.json +25 -8
@@ -1,393 +1,184 @@
1
- # Content Types
2
-
3
- ## Overview
4
-
5
- | Content Type | Kind | draftAndPublish | i18n | Slug | Key Relations |
6
- |-------------|------|----------------|------|------|---------------|
7
- | Page | collection | yes | yes | `slug` | blocks (DZ), seo |
8
- | Article | collection | yes | yes | `slug` | categories, tags, author, series, related_posts |
9
- | FAQ | collection | yes | yes | — | category |
10
- | Inquiry | collection | no | no | — | — |
11
- | Category | collection | no | yes | `slug` | — |
12
- | Tag | collection | no | yes | `slug` | — |
13
- | Author | collection | no | no | `slug` | — |
14
- | Series | collection | no | yes | `slug` | — |
15
- | Navigation | single | yes | yes | — | globalNavigation, primaryLink, secondaryLink |
16
- | Global | single | yes | yes | — | home (Page), footer, seo, siteWideBlocks (DZ) |
17
- | SiteSettings | single | no | no | — | analyticsSettings, chatbot, siteVerifications |
18
-
19
- ---
20
-
21
- ## Collection Types
22
-
23
- ### Page
24
-
25
- ```ts
26
- interface Page {
27
- title: string;
28
- slug: string;
29
- seo: Seo | null;
30
- blocks: PageBlocks[]; // DZ — 15 block types
31
- headerMode: 'overlay' | 'offset';
32
- }
33
- type PageDocument = StrapiI18nDocument & Page;
34
- ```
35
-
36
- | Field | Type | Description |
37
- |-------|------|-------------|
38
- | `title` | `string` | Page title |
39
- | `slug` | `string` | URL slug |
40
- | `seo` | `Seo \| null` | SEO metadata |
41
- | `blocks` | `PageBlocks[]` | Dynamic Zone — see [Block Reference](./block-reference.md) |
42
- | `headerMode` | `'overlay' \| 'offset'` | How the navigation header relates to the first block |
43
-
44
- `headerMode`:
45
- - `overlay` — Header overlaps the first block (hero with transparent header)
46
- - `offset` — Header takes its own space above the first block
47
-
48
- ### Article
49
-
50
- ```ts
51
- interface Article {
52
- title: string;
53
- slug: string;
54
- body: BlocksContent;
55
- summary: string | null;
56
- excerpt: string | null;
57
- cover: StrapiMedia | null;
58
- gallery: StrapiMedia[];
59
- reading_time: number;
60
- firstPublishedAt: string | null;
61
- seo: Seo | null;
62
- categories: CategoryDocument[];
63
- tags: TagDocument[];
64
- author: AuthorDocument | null;
65
- series: SeriesDocument | null;
66
- series_order: number;
67
- related_posts: ArticleDocument[];
68
- }
69
- type ArticleDocument = StrapiI18nDocument & Article;
70
- ```
71
-
72
- | Field | Type | Description |
73
- |-------|------|-------------|
74
- | `title` | `string` | Article title |
75
- | `slug` | `string` | URL slug |
76
- | `body` | `BlocksContent` | Article body — structured JSON (NOT HTML) |
77
- | `summary` | `string \| null` | Short summary for cards/lists |
78
- | `excerpt` | `string \| null` | Longer excerpt for previews |
79
- | `cover` | `StrapiMedia \| null` | Cover image — images only |
80
- | `gallery` | `StrapiMedia[]` | Image gallery — images only |
81
- | `reading_time` | `number` | Estimated reading time in minutes |
82
- | `firstPublishedAt` | `string \| null` | Original publish date (ISO string) |
83
- | `seo` | `Seo \| null` | SEO metadata |
84
- | `categories` | `CategoryDocument[]` | Related categories |
85
- | `tags` | `TagDocument[]` | Related tags |
86
- | `author` | `AuthorDocument \| null` | Article author |
87
- | `series` | `SeriesDocument \| null` | Article series |
88
- | `series_order` | `number` | Order within series |
89
- | `related_posts` | `ArticleDocument[]` | Related articles |
90
-
91
- - `summary` vs `excerpt`: `summary` is a 1–2 sentence blurb for card UIs; `excerpt` is a longer preview paragraph.
92
- - `body` is `BlocksContent` — use a Blocks renderer component.
93
-
94
- ### FAQ
95
-
96
- ```ts
97
- interface Faq {
98
- question: string | null;
99
- answer: BlocksContent | null;
100
- sortOrder: number | null;
101
- category: CategoryDocument | null;
102
- }
103
- type FaqDocument = StrapiI18nDocument & Faq;
104
- ```
105
-
106
- | Field | Type | Description |
107
- |-------|------|-------------|
108
- | `question` | `string \| null` | FAQ question |
109
- | `answer` | `BlocksContent \| null` | Answer — structured JSON (NOT HTML) |
110
- | `sortOrder` | `number \| null` | Display order |
111
- | `category` | `CategoryDocument \| null` | Related category |
112
-
113
- ### Inquiry
114
-
115
- ```ts
116
- interface Inquiry {
117
- name: string;
118
- email: string | null;
119
- phone: string | null;
120
- subject: string | null;
121
- message: string | null;
122
- }
123
- type InquiryDocument = StrapiDocument & Inquiry; // no i18n, no draftAndPublish
124
- ```
125
-
126
- | Field | Type | Description |
127
- |-------|------|-------------|
128
- | `name` | `string` | Submitter name (required) |
129
- | `email` | `string \| null` | Email address |
130
- | `phone` | `string \| null` | Phone number |
131
- | `subject` | `string \| null` | Inquiry subject |
132
- | `message` | `string \| null` | Message body |
133
-
134
- **POST body type:**
135
-
136
- ```ts
137
- interface InquiryFormData {
138
- name: string; // required
139
- email?: string;
140
- phone?: string;
141
- subject?: string;
142
- message?: string;
143
- }
144
- ```
145
-
146
- Inquiry is POST-only from the frontend. Records are created immediately (no publish step).
147
-
148
- ### Category
149
-
150
- ```ts
151
- interface Category {
152
- name: string;
153
- slug: string;
154
- description: string | null;
155
- sortOrder: number | null;
156
- }
157
- type CategoryDocument = StrapiI18nDocument & Category;
158
- ```
159
-
160
- | Field | Type | Description |
161
- |-------|------|-------------|
162
- | `name` | `string` | Category name |
163
- | `slug` | `string` | URL slug |
164
- | `description` | `string \| null` | Category description |
165
- | `sortOrder` | `number \| null` | Display order |
166
-
167
- ### Tag
168
-
169
- ```ts
170
- interface Tag {
171
- name: string;
172
- slug: string;
173
- color: string | null;
174
- description: string | null;
175
- }
176
- type TagDocument = StrapiI18nDocument & Tag;
177
- ```
178
-
179
- | Field | Type | Description |
180
- |-------|------|-------------|
181
- | `name` | `string` | Tag name |
182
- | `slug` | `string` | URL slug |
183
- | `color` | `string \| null` | Hex color string (color picker) |
184
- | `description` | `string \| null` | Tag description |
185
-
186
- ### Author
187
-
188
- ```ts
189
- interface Author {
190
- name: string;
191
- slug: string;
192
- role: string | null;
193
- bio: string | null; // Markdown richtext
194
- avatar: StrapiMedia | null;
195
- email: string | null;
196
- }
197
- type AuthorDocument = StrapiDocument & Author; // no i18n
198
- ```
199
-
200
- | Field | Type | Description |
201
- |-------|------|-------------|
202
- | `name` | `string` | Author name |
203
- | `slug` | `string` | URL slug |
204
- | `role` | `string \| null` | Title/role |
205
- | `bio` | `string \| null` | Bio (Markdown richtext) |
206
- | `avatar` | `StrapiMedia \| null` | Profile image — images only |
207
- | `email` | `string \| null` | Contact email |
208
-
209
- ### Series
210
-
211
- ```ts
212
- interface Series {
213
- name: string;
214
- slug: string;
215
- description: string | null;
216
- cover: StrapiMedia | null;
217
- }
218
- type SeriesDocument = StrapiI18nDocument & Series;
219
- ```
220
-
221
- | Field | Type | Description |
222
- |-------|------|-------------|
223
- | `name` | `string` | Series name |
224
- | `slug` | `string` | URL slug |
225
- | `description` | `string \| null` | Series description |
226
- | `cover` | `StrapiMedia \| null` | Cover image — images only |
227
-
228
- API endpoint: `/api/all-series` (pluralName `all-series` differs from singularName `series`).
229
-
230
1
  ---
231
-
232
- ## Single Types
233
-
234
- ### Navigation
235
-
236
- ```ts
237
- interface Navigation {
238
- mainLogo: StrapiMedia | null;
239
- darkLogo: StrapiMedia | null;
240
- globalNavigation: NavigationGroup[];
241
- primaryLink: Link | null;
242
- secondaryLink: Link | null;
243
- align: 'left' | 'center' | 'right';
244
- }
245
- type NavigationDocument = StrapiI18nDocument & Navigation;
246
- ```
247
-
248
- | Field | Type | Description |
249
- |-------|------|-------------|
250
- | `mainLogo` | `StrapiMedia \| null` | Main logo — images only |
251
- | `darkLogo` | `StrapiMedia \| null` | Dark mode logo — images only |
252
- | `globalNavigation` | `NavigationGroup[]` | Nav groups with nested links |
253
- | `primaryLink` | `Link \| null` | Primary action link (e.g. "Get Started") |
254
- | `secondaryLink` | `Link \| null` | Secondary link (e.g. "Login") |
255
- | `align` | `'left' \| 'center' \| 'right'` | Logo/nav alignment |
256
-
257
- ### Global
258
-
259
- ```ts
260
- interface Global {
261
- sitename: string;
262
- seo: Seo | null;
263
- home: PageDocument | null;
264
- footer: Footer | null;
265
- siteWideBlocks: SiteWideBlocks[];
266
- darkModeEnabled: boolean;
267
- defaultTheme: 'light' | 'dark' | null;
268
- favicon: StrapiMedia | null;
269
- }
270
- type GlobalDocument = StrapiI18nDocument & Global;
271
- ```
272
-
273
- | Field | Type | Description |
274
- |-------|------|-------------|
275
- | `sitename` | `string` | Site name |
276
- | `seo` | `Seo \| null` | Default SEO (fallback for pages without SEO) |
277
- | `home` | `PageDocument \| null` | Relation to homepage Page |
278
- | `footer` | `Footer \| null` | Footer component |
279
- | `siteWideBlocks` | `SiteWideBlocks[]` | DZ — blocks rendered on every page |
280
- | `darkModeEnabled` | `boolean` | Whether dark mode is enabled |
281
- | `defaultTheme` | `'light' \| 'dark' \| null` | Default color scheme |
282
- | `favicon` | `StrapiMedia \| null` | Site favicon — images only |
283
-
284
- `siteWideBlocks` accepts only 4 block types: `SliderBlock | InquiryFormBlock | HeroBlock | FeaturesBlock`.
285
-
286
- ### SiteSettings
287
-
288
- ```ts
289
- interface SiteSettings {
290
- analyticsSettings: AnalyticsSetting[];
291
- chatbot: ChatbotSetting | null;
292
- siteVerifications: SiteVerification[];
293
- }
294
- type SiteSettingsDocument = StrapiDocument & SiteSettings; // no i18n
295
- ```
296
-
297
- | Field | Type | Description |
298
- |-------|------|-------------|
299
- | `analyticsSettings` | `AnalyticsSetting[]` | Analytics providers (repeatable) |
300
- | `chatbot` | `ChatbotSetting \| null` | Chatbot configuration |
301
- | `siteVerifications` | `SiteVerification[]` | Search engine verification meta tags |
302
-
303
- API endpoint: `/api/site-setting` (singularName `site-setting`).
304
-
2
+ type: reference
3
+ status: current
4
+ generated: true
5
+ generator: .claude/skills/docs-steward/scripts/gen-reference.mjs
6
+ sources:
7
+ - packages/strapi-plugin-builder/server/src/content-types/*/schema.json
305
8
  ---
306
9
 
307
- ## Relation Map
308
-
309
- ```
310
- Page ──blocks──▶ [DZ: 14 blocks + Section]
311
- │ │
312
- │ blocks.faq ──items──▶ FAQ ──category──▶ Category
313
- │
314
- └──seo──▶ Seo
315
-
316
- Article ──┬──categories──▶ Category[]
317
- ├──tags──▶ Tag[]
318
- ├──author──▶ Author
319
- ├──series──▶ Series
320
- ├──related_posts──▶ Article[]
321
- └──seo──▶ Seo
10
+ <!-- DO NOT EDIT. Run `pnpm docs:gen` after changing the schemas. -->
322
11
 
323
- Global ──┬──home──▶ Page
324
- ├──footer──▶ Footer ──sitemap──▶ NavigationGroup[] ──links──▶ Link[]
325
- ├──siteWideBlocks──▶ [DZ: 4 block types]
326
- └──seo──▶ Seo
327
-
328
- Navigation ──globalNavigation──▶ NavigationGroup[] ──links──▶ Link[]
329
-
330
- SiteSettings ──┬──analyticsSettings──▶ AnalyticsSetting[]
331
- ├──chatbot──▶ ChatbotSetting
332
- └──siteVerifications──▶ SiteVerification[]
333
- ```
334
-
335
- ---
336
-
337
- ## BlocksContent Structure
338
-
339
- `BlocksContent` is the JSON output of Strapi's Blocks editor. It is an array of `BlockNode` objects.
340
-
341
- **Used in:** `Article.body`, `FAQ.answer`, `ContentBlock.body`
342
-
343
- ```ts
344
- type BlocksContent = BlockNode[];
345
-
346
- type BlockNode =
347
- | BlockParagraph // { type: 'paragraph', children: BlockInlineNode[] }
348
- | BlockHeading // { type: 'heading', level: 1-6, children: BlockInlineNode[] }
349
- | BlockList // { type: 'list', format: 'ordered'|'unordered', children: BlockListItem[] }
350
- | BlockQuote // { type: 'quote', children: BlockInlineNode[] }
351
- | BlockCode // { type: 'code', children: BlockTextChild[] }
352
- | BlockImage; // { type: 'image', image: StrapiMedia, children: [{ type: 'text', text: '' }] }
353
-
354
- type BlockInlineNode = BlockTextChild | BlockLinkChild;
355
-
356
- // BlockTextChild: { type: 'text', text: string, bold?, italic?, underline?, strikethrough?, code? }
357
- // BlockLinkChild: { type: 'link', url: string, children: BlockTextChild[] }
358
- ```
359
-
360
- DO NOT treat BlocksContent as HTML or Markdown. Use a dedicated renderer that walks the node tree.
361
-
362
- ---
363
-
364
- ## Document Base Fields
365
-
366
- ### StrapiDocument
367
-
368
- All content type documents extend this:
12
+ # Content Types
369
13
 
370
- | Field | Type | Description |
371
- |-------|------|-------------|
372
- | `id` | `number` | Internal database ID |
373
- | `documentId` | `string` | Stable document ID (use for API queries) |
374
- | `createdAt` | `string` | ISO date string |
375
- | `updatedAt` | `string` | ISO date string |
376
- | `publishedAt` | `string \| null` | Publish date (null if draft) |
14
+ Every content type provided by `@dani-builder/strapi-plugin-builder`.
15
+ REST endpoints use `singularName` for single types and `pluralName` for collection types.
16
+ Series' `pluralName` must differ from its `singularName`, hence `/api/builder/all-series`.
17
+ All routes are mounted under `/api/builder/` and use plugin-owned UIDs.
377
18
 
378
- ### StrapiI18nDocument
19
+ ## Overview
379
20
 
380
- Extends `StrapiDocument` with:
21
+ | Content Type | Kind | UID | Endpoint | i18n | draftAndPublish |
22
+ |---|---|---|---|---|---|
23
+ | Article | collection | `plugin::builder.article` | `api/builder/articles` | yes | yes |
24
+ | Author | collection | `plugin::builder.author` | `api/builder/authors` | — | — |
25
+ | Category | collection | `plugin::builder.category` | `api/builder/categories` | yes | — |
26
+ | FAQ | collection | `plugin::builder.faq` | `api/builder/faqs` | yes | yes |
27
+ | Global | single | `plugin::builder.global` | `api/builder/global` | yes | yes |
28
+ | Inquiry | collection | `plugin::builder.inquiry` | `api/builder/inquiries` | — | — |
29
+ | Navigation | single | `plugin::builder.navigation` | `api/builder/navigation` | yes | yes |
30
+ | Page | collection | `plugin::builder.page` | `api/builder/pages` | yes | yes |
31
+ | Series | collection | `plugin::builder.series` | `api/builder/all-series` | yes | — |
32
+ | Site Settings | single | `plugin::builder.site-setting` | `api/builder/site-setting` | — | — |
33
+ | Tag | collection | `plugin::builder.tag` | `api/builder/tags` | yes | — |
34
+
35
+ ## Article
36
+
37
+ Blog/news post with rich text body and relations
38
+
39
+ | Attribute | Type | Required | Default | Notes |
40
+ |---|---|---|---|---|
41
+ | `title` | string | yes | — | — |
42
+ | `slug` | uid ← `title` | yes | — | — |
43
+ | `body` | blocks | yes | — | — |
44
+ | `summary` | text | — | — | — |
45
+ | `excerpt` | text | — | — | — |
46
+ | `cover` | media (single) | — | — | allowed: images |
47
+ | `gallery` | media (multiple) | — | — | allowed: images |
48
+ | `reading_time` | integer | — | `5` | — |
49
+ | `firstPublishedAt` | datetime | — | — | — |
50
+ | `seo` | component `shared.seo` | — | — | — |
51
+ | `categories` | relation `manyToMany` → `plugin::builder.category` | — | — | — |
52
+ | `tags` | relation `manyToMany` → `plugin::builder.tag` | — | — | — |
53
+ | `author` | relation `manyToOne` → `plugin::builder.author` | — | — | — |
54
+ | `series` | relation `manyToOne` → `plugin::builder.series` | — | — | — |
55
+ | `series_order` | integer | — | `1` | — |
56
+ | `related_posts` | relation `manyToMany` → `plugin::builder.article` | — | — | — |
57
+
58
+ ## Author
59
+
60
+ Article author profile
61
+
62
+ | Attribute | Type | Required | Default | Notes |
63
+ |---|---|---|---|---|
64
+ | `name` | string | yes | — | — |
65
+ | `slug` | uid ← `name` | yes | — | — |
66
+ | `role` | string | — | — | — |
67
+ | `bio` | richtext | — | — | — |
68
+ | `avatar` | media (single) | — | — | allowed: images |
69
+ | `email` | email | — | — | — |
70
+ | `articles` | relation `oneToMany` → `plugin::builder.article` | — | — | — |
71
+
72
+ ## Category
73
+
74
+ Unified category for articles and FAQs
75
+
76
+ | Attribute | Type | Required | Default | Notes |
77
+ |---|---|---|---|---|
78
+ | `name` | string | yes | — | — |
79
+ | `slug` | uid ← `name` | yes | — | — |
80
+ | `description` | text | — | — | — |
81
+ | `sortOrder` | integer | — | — | — |
82
+ | `articles` | relation `manyToMany` → `plugin::builder.article` | — | — | — |
83
+
84
+ ## FAQ
85
+
86
+ Frequently asked question entry
87
+
88
+ | Attribute | Type | Required | Default | Notes |
89
+ |---|---|---|---|---|
90
+ | `question` | string | — | — | maxLength 255 |
91
+ | `answer` | blocks | — | — | — |
92
+ | `sortOrder` | integer | — | — | — |
93
+ | `category` | relation `oneToOne` → `plugin::builder.category` | — | — | — |
94
+
95
+ ## Global
96
+
97
+ Site-wide content, theme settings, footer, and common blocks
98
+
99
+ | Attribute | Type | Required | Default | Notes |
100
+ |---|---|---|---|---|
101
+ | `sitename` | string | yes | — | — |
102
+ | `seo` | component `shared.seo` | — | — | — |
103
+ | `home` | relation `oneToOne` → `plugin::builder.page` | — | — | — |
104
+ | `footer` | component `elements.footer` | — | — | — |
105
+ | `siteWideBlocks` | dynamiczone | — | — | — |
106
+ | `darkModeEnabled` | boolean | — | `false` | — |
107
+ | `defaultTheme` | enumeration | — | — | `light`, `dark` |
108
+ | `favicon` | media (single) | — | — | allowed: images |
109
+
110
+ **`siteWideBlocks` accepts:** `blocks.slider`, `blocks.inquiry-form`, `blocks.hero`, `blocks.features`
111
+
112
+ ## Inquiry
113
+
114
+ Contact form submission data
115
+
116
+ | Attribute | Type | Required | Default | Notes |
117
+ |---|---|---|---|---|
118
+ | `name` | string | yes | — | maxLength 120 |
119
+ | `email` | email | — | — | maxLength 254 |
120
+ | `phone` | string | — | — | maxLength 40 |
121
+ | `subject` | string | — | — | maxLength 200 |
122
+ | `message` | text | — | — | maxLength 5000 |
123
+
124
+ ## Navigation
125
+
126
+ Global navigation with logo, menu groups, and CTA links
127
+
128
+ | Attribute | Type | Required | Default | Notes |
129
+ |---|---|---|---|---|
130
+ | `mainLogo` | media (single) | — | — | allowed: images |
131
+ | `darkLogo` | media (single) | — | — | allowed: images |
132
+ | `globalNavigation` | component `shared.navigation-group` (repeatable) | — | — | — |
133
+ | `primaryLink` | component `shared.link` | — | — | — |
134
+ | `secondaryLink` | component `shared.link` | — | — | — |
135
+ | `align` | enumeration | — | `left` | `left`, `center`, `right` |
136
+
137
+ ## Page
138
+
139
+ Website page with dynamic zone block-based layout
140
+
141
+ | Attribute | Type | Required | Default | Notes |
142
+ |---|---|---|---|---|
143
+ | `title` | string | yes | — | — |
144
+ | `slug` | uid ← `title` | yes | — | — |
145
+ | `seo` | component `shared.seo` | — | — | — |
146
+ | `blocks` | dynamiczone | — | — | — |
147
+ | `headerMode` | enumeration | — | `offset` | `overlay`, `offset` |
148
+
149
+ **`blocks` accepts:** `elements.section`, `blocks.hero`, `blocks.features`, `blocks.cta`, `blocks.slider`, `blocks.inquiry-form`, `blocks.faq`, `blocks.highlights`, `blocks.bento-grid`, `blocks.testimonials`, `blocks.logo-cloud`, `blocks.stats`, `blocks.pricing`, `blocks.content`, `blocks.team`
150
+
151
+ ## Series
152
+
153
+ Article series/serial publication
381
154
 
382
- | Field | Type | Description |
383
- |-------|------|-------------|
384
- | `locale` | `string` | Locale code (e.g. `'ko'`, `'en'`) |
155
+ | Attribute | Type | Required | Default | Notes |
156
+ |---|---|---|---|---|
157
+ | `name` | string | yes | — | — |
158
+ | `slug` | uid ← `name` | yes | — | — |
159
+ | `description` | text | — | — | — |
160
+ | `cover` | media (single) | — | — | allowed: images |
161
+ | `articles` | relation `oneToMany` → `plugin::builder.article` | — | — | — |
162
+
163
+ ## Site Settings
164
+
165
+ Operational settings for analytics, chatbot, and site verification
385
166
 
386
- ### StrapiComponent
167
+ | Attribute | Type | Required | Default | Notes |
168
+ |---|---|---|---|---|
169
+ | `analyticsSettings` | component `shared.analytics-setting` (repeatable) | — | — | — |
170
+ | `chatbot` | component `shared.chatbot-setting` | — | — | — |
171
+ | `siteVerifications` | component `shared.site-verification` (repeatable) | — | — | — |
172
+ | `brandColors` | component `shared.brand-colors` | — | — | — |
387
173
 
388
- Base for all component instances:
174
+ ## Tag
389
175
 
390
- | Field | Type | Description |
391
- |-------|------|-------------|
392
- | `id` | `number` | Component instance ID |
393
- | `__component` | `string` | Component UID (e.g. `'blocks.hero'`, `'shared.link'`) |
176
+ Article tag with optional color
177
+
178
+ | Attribute | Type | Required | Default | Notes |
179
+ |---|---|---|---|---|
180
+ | `name` | string | yes | — | — |
181
+ | `slug` | uid ← `name` | yes | — | — |
182
+ | `color` | customField | — | — | custom field `plugin::color-picker.color` |
183
+ | `description` | text | — | — | — |
184
+ | `articles` | relation `manyToMany` → `plugin::builder.article` | — | — | — |
@@ -0,0 +1,50 @@
1
+ ---
2
+ type: reference
3
+ status: current
4
+ generated: true
5
+ generator: .claude/skills/docs-steward/scripts/gen-reference.mjs
6
+ sources:
7
+ - packages/strapi-plugin-builder/server/src/components/elements/*.json
8
+ ---
9
+
10
+ <!-- DO NOT EDIT. Run `pnpm docs:gen` after changing the schemas. -->
11
+
12
+ # Element Components
13
+
14
+ Structural wrappers. `elements.section` is the universal theming wrapper and is
15
+ kept flat (no sub-components) so the API does not require extra populate depth.
16
+
17
+ ## Quick reference
18
+
19
+ | Component | `__component` | Variants |
20
+ |---|---|---|
21
+ | Footer | `elements.footer` | — |
22
+ | Section | `elements.section` | — |
23
+
24
+ ## Footer
25
+
26
+ `elements.footer` — Footer layout with organization info, links, and sitemap
27
+
28
+ | Attribute | Type | Required | Default | Notes |
29
+ |---|---|---|---|---|
30
+ | `organization` | string | — | — | — |
31
+ | `businessInfo` | text | — | — | — |
32
+ | `socialLinks` | component `shared.link` (repeatable) | — | — | — |
33
+ | `otherLinks` | component `shared.link` (repeatable) | — | — | — |
34
+ | `sitemap` | component `shared.navigation-group` (repeatable) | — | — | — |
35
+ | `logo` | media (single) | — | — | allowed: images |
36
+
37
+ ## Section
38
+
39
+ `elements.section` — Section wrapper with heading, theme, and background
40
+
41
+ | Attribute | Type | Required | Default | Notes |
42
+ |---|---|---|---|---|
43
+ | `heading` | text | — | — | — |
44
+ | `subheading` | text | — | — | — |
45
+ | `kickerText` | string | — | — | — |
46
+ | `anchorId` | string | — | — | — |
47
+ | `headerAlign` | enumeration | — | — | `auto`, `left`, `center`, `right` |
48
+ | `theme` | enumeration | — | `default` | `default`, `light`, `dark`, `accent`, `muted`, `contrast` |
49
+ | `backgroundImage` | media (single) | — | — | allowed: images |
50
+ | `backgroundImageOpacity` | decimal | — | — | — |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dani-builder/strapi-client",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "TypeScript client for Daniworks Builder CMS (Strapi v5)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,26 +33,43 @@
33
33
  "files": [
34
34
  "dist",
35
35
  "AGENTS.md",
36
- "docs"
36
+ "docs",
37
+ "LICENSE",
38
+ "README.md"
37
39
  ],
38
40
  "publishConfig": {
39
41
  "access": "public"
40
42
  },
41
43
  "repository": {
42
44
  "type": "git",
43
- "url": "https://github.com/hojinzs/daniworks-builder-v2.git",
45
+ "url": "https://github.com/HJ-company/daniworks-builder-v2.git",
44
46
  "directory": "packages/strapi-client"
45
47
  },
46
48
  "dependencies": {
47
- "axios": "^1.7.0",
48
- "qs": "^6.13.0"
49
+ "axios": "^1.19.0",
50
+ "qs": "^6.15.3"
49
51
  },
50
52
  "devDependencies": {
51
- "@types/qs": "^6.9.0",
52
- "typescript": "5.9.2",
53
+ "@types/qs": "^6.15.1",
54
+ "typescript": "^6.0.3",
53
55
  "@repo/typescript-config": "0.0.0"
54
56
  },
57
+ "keywords": [
58
+ "strapi",
59
+ "strapi-v5",
60
+ "cms",
61
+ "headless-cms",
62
+ "daniworks-builder",
63
+ "typescript",
64
+ "strapi-client",
65
+ "api-client",
66
+ "axios",
67
+ "ssr"
68
+ ],
69
+ "homepage": "https://github.com/HJ-company/daniworks-builder-v2/tree/main/packages/strapi-client#readme",
70
+ "author": "HJ-company",
55
71
  "scripts": {
56
- "build": "tsc"
72
+ "build": "tsc",
73
+ "test": "vitest run"
57
74
  }
58
75
  }