@dani-builder/strapi-client 0.1.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 (153) hide show
  1. package/dist/api/articles.d.ts +29 -0
  2. package/dist/api/articles.d.ts.map +1 -0
  3. package/dist/api/articles.js +54 -0
  4. package/dist/api/articles.js.map +1 -0
  5. package/dist/api/authors.d.ts +15 -0
  6. package/dist/api/authors.d.ts.map +1 -0
  7. package/dist/api/authors.js +27 -0
  8. package/dist/api/authors.js.map +1 -0
  9. package/dist/api/categories.d.ts +12 -0
  10. package/dist/api/categories.d.ts.map +1 -0
  11. package/dist/api/categories.js +14 -0
  12. package/dist/api/categories.js.map +1 -0
  13. package/dist/api/faqs.d.ts +13 -0
  14. package/dist/api/faqs.d.ts.map +1 -0
  15. package/dist/api/faqs.js +20 -0
  16. package/dist/api/faqs.js.map +1 -0
  17. package/dist/api/global.d.ts +15 -0
  18. package/dist/api/global.d.ts.map +1 -0
  19. package/dist/api/global.js +25 -0
  20. package/dist/api/global.js.map +1 -0
  21. package/dist/api/index.d.ts +21 -0
  22. package/dist/api/index.d.ts.map +1 -0
  23. package/dist/api/index.js +12 -0
  24. package/dist/api/index.js.map +1 -0
  25. package/dist/api/inquiry.d.ts +7 -0
  26. package/dist/api/inquiry.d.ts.map +1 -0
  27. package/dist/api/inquiry.js +9 -0
  28. package/dist/api/inquiry.js.map +1 -0
  29. package/dist/api/navigation.d.ts +10 -0
  30. package/dist/api/navigation.d.ts.map +1 -0
  31. package/dist/api/navigation.js +15 -0
  32. package/dist/api/navigation.js.map +1 -0
  33. package/dist/api/pages.d.ts +30 -0
  34. package/dist/api/pages.d.ts.map +1 -0
  35. package/dist/api/pages.js +53 -0
  36. package/dist/api/pages.js.map +1 -0
  37. package/dist/api/series.d.ts +16 -0
  38. package/dist/api/series.d.ts.map +1 -0
  39. package/dist/api/series.js +29 -0
  40. package/dist/api/series.js.map +1 -0
  41. package/dist/api/site-settings.d.ts +7 -0
  42. package/dist/api/site-settings.d.ts.map +1 -0
  43. package/dist/api/site-settings.js +14 -0
  44. package/dist/api/site-settings.js.map +1 -0
  45. package/dist/api/tags.d.ts +12 -0
  46. package/dist/api/tags.d.ts.map +1 -0
  47. package/dist/api/tags.js +14 -0
  48. package/dist/api/tags.js.map +1 -0
  49. package/dist/client/create-client.d.ts +25 -0
  50. package/dist/client/create-client.d.ts.map +1 -0
  51. package/dist/client/create-client.js +31 -0
  52. package/dist/client/create-client.js.map +1 -0
  53. package/dist/client/index.d.ts +3 -0
  54. package/dist/client/index.d.ts.map +1 -0
  55. package/dist/client/index.js +2 -0
  56. package/dist/client/index.js.map +1 -0
  57. package/dist/index.d.ts +8 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +10 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/populate/builders.d.ts +125 -0
  62. package/dist/populate/builders.d.ts.map +1 -0
  63. package/dist/populate/builders.js +139 -0
  64. package/dist/populate/builders.js.map +1 -0
  65. package/dist/populate/core-blocks.d.ts +25 -0
  66. package/dist/populate/core-blocks.d.ts.map +1 -0
  67. package/dist/populate/core-blocks.js +167 -0
  68. package/dist/populate/core-blocks.js.map +1 -0
  69. package/dist/populate/index.d.ts +3 -0
  70. package/dist/populate/index.d.ts.map +1 -0
  71. package/dist/populate/index.js +3 -0
  72. package/dist/populate/index.js.map +1 -0
  73. package/dist/types/components/blocks.d.ts +94 -0
  74. package/dist/types/components/blocks.d.ts.map +1 -0
  75. package/dist/types/components/blocks.js +4 -0
  76. package/dist/types/components/blocks.js.map +1 -0
  77. package/dist/types/components/elements.d.ts +21 -0
  78. package/dist/types/components/elements.d.ts.map +1 -0
  79. package/dist/types/components/elements.js +4 -0
  80. package/dist/types/components/elements.js.map +1 -0
  81. package/dist/types/components/index.d.ts +4 -0
  82. package/dist/types/components/index.d.ts.map +1 -0
  83. package/dist/types/components/index.js +2 -0
  84. package/dist/types/components/index.js.map +1 -0
  85. package/dist/types/components/shared.d.ts +116 -0
  86. package/dist/types/components/shared.d.ts.map +1 -0
  87. package/dist/types/components/shared.js +4 -0
  88. package/dist/types/components/shared.js.map +1 -0
  89. package/dist/types/content-types/article.d.ts +26 -0
  90. package/dist/types/content-types/article.d.ts.map +1 -0
  91. package/dist/types/content-types/article.js +4 -0
  92. package/dist/types/content-types/article.js.map +1 -0
  93. package/dist/types/content-types/author.d.ts +12 -0
  94. package/dist/types/content-types/author.d.ts.map +1 -0
  95. package/dist/types/content-types/author.js +4 -0
  96. package/dist/types/content-types/author.js.map +1 -0
  97. package/dist/types/content-types/category.d.ts +9 -0
  98. package/dist/types/content-types/category.d.ts.map +1 -0
  99. package/dist/types/content-types/category.js +4 -0
  100. package/dist/types/content-types/category.js.map +1 -0
  101. package/dist/types/content-types/faq.d.ts +10 -0
  102. package/dist/types/content-types/faq.d.ts.map +1 -0
  103. package/dist/types/content-types/faq.js +4 -0
  104. package/dist/types/content-types/faq.js.map +1 -0
  105. package/dist/types/content-types/global.d.ts +19 -0
  106. package/dist/types/content-types/global.d.ts.map +1 -0
  107. package/dist/types/content-types/global.js +4 -0
  108. package/dist/types/content-types/global.js.map +1 -0
  109. package/dist/types/content-types/index.d.ts +12 -0
  110. package/dist/types/content-types/index.d.ts.map +1 -0
  111. package/dist/types/content-types/index.js +2 -0
  112. package/dist/types/content-types/index.js.map +1 -0
  113. package/dist/types/content-types/inquiry.d.ts +18 -0
  114. package/dist/types/content-types/inquiry.d.ts.map +1 -0
  115. package/dist/types/content-types/inquiry.js +4 -0
  116. package/dist/types/content-types/inquiry.js.map +1 -0
  117. package/dist/types/content-types/navigation.d.ts +12 -0
  118. package/dist/types/content-types/navigation.d.ts.map +1 -0
  119. package/dist/types/content-types/navigation.js +4 -0
  120. package/dist/types/content-types/navigation.js.map +1 -0
  121. package/dist/types/content-types/page.d.ts +15 -0
  122. package/dist/types/content-types/page.d.ts.map +1 -0
  123. package/dist/types/content-types/page.js +4 -0
  124. package/dist/types/content-types/page.js.map +1 -0
  125. package/dist/types/content-types/series.d.ts +9 -0
  126. package/dist/types/content-types/series.d.ts.map +1 -0
  127. package/dist/types/content-types/series.js +4 -0
  128. package/dist/types/content-types/series.js.map +1 -0
  129. package/dist/types/content-types/site-settings.d.ts +10 -0
  130. package/dist/types/content-types/site-settings.d.ts.map +1 -0
  131. package/dist/types/content-types/site-settings.js +4 -0
  132. package/dist/types/content-types/site-settings.js.map +1 -0
  133. package/dist/types/content-types/tag.d.ts +10 -0
  134. package/dist/types/content-types/tag.d.ts.map +1 -0
  135. package/dist/types/content-types/tag.js +4 -0
  136. package/dist/types/content-types/tag.js.map +1 -0
  137. package/dist/types/index.d.ts +4 -0
  138. package/dist/types/index.d.ts.map +1 -0
  139. package/dist/types/index.js +2 -0
  140. package/dist/types/index.js.map +1 -0
  141. package/dist/types/strapi.d.ts +126 -0
  142. package/dist/types/strapi.d.ts.map +1 -0
  143. package/dist/types/strapi.js +4 -0
  144. package/dist/types/strapi.js.map +1 -0
  145. package/dist/utils/index.d.ts +2 -0
  146. package/dist/utils/index.d.ts.map +1 -0
  147. package/dist/utils/index.js +2 -0
  148. package/dist/utils/index.js.map +1 -0
  149. package/dist/utils/media.d.ts +12 -0
  150. package/dist/utils/media.d.ts.map +1 -0
  151. package/dist/utils/media.js +25 -0
  152. package/dist/utils/media.js.map +1 -0
  153. package/package.json +56 -0
@@ -0,0 +1,29 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { StrapiCollectionResponse } from '../types/strapi.js';
3
+ import type { ArticleDocument } from '../types/content-types/article.js';
4
+ export interface ArticleQueryOptions {
5
+ locale?: string;
6
+ }
7
+ export interface ArticleListOptions {
8
+ locale?: string;
9
+ page?: number;
10
+ pageSize?: number;
11
+ category?: string;
12
+ tag?: string;
13
+ author?: string;
14
+ series?: string;
15
+ sort?: string | string[];
16
+ }
17
+ /**
18
+ * Get a single article by documentId.
19
+ */
20
+ export declare function getArticle(client: AxiosInstance, documentId: string, options?: ArticleQueryOptions): Promise<ArticleDocument>;
21
+ /**
22
+ * Get an article by slug.
23
+ */
24
+ export declare function getArticleBySlug(client: AxiosInstance, slug: string, options?: ArticleQueryOptions): Promise<ArticleDocument | null>;
25
+ /**
26
+ * List articles with filtering, sorting, and pagination.
27
+ */
28
+ export declare function listArticles(client: AxiosInstance, options?: ArticleListOptions): Promise<StrapiCollectionResponse<ArticleDocument>>;
29
+ //# sourceMappingURL=articles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"articles.d.ts","sourceRoot":"","sources":["../../src/api/articles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAkB,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAGzE,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,4BASlG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,mCAUlG;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,kBAAkB,sDAkB/E"}
@@ -0,0 +1,54 @@
1
+ import { getArticlePopulate, getArticleListPopulate } from '../populate/builders.js';
2
+ /**
3
+ * Get a single article by documentId.
4
+ */
5
+ export function getArticle(client, documentId, options) {
6
+ return client
7
+ .get(`/api/articles/${documentId}`, {
8
+ params: {
9
+ populate: getArticlePopulate(),
10
+ locale: options?.locale,
11
+ },
12
+ })
13
+ .then((res) => res.data.data);
14
+ }
15
+ /**
16
+ * Get an article by slug.
17
+ */
18
+ export function getArticleBySlug(client, slug, options) {
19
+ return client
20
+ .get('/api/articles', {
21
+ params: {
22
+ filters: { slug: { $eq: slug } },
23
+ populate: getArticlePopulate(),
24
+ locale: options?.locale,
25
+ },
26
+ })
27
+ .then((res) => res.data.data[0] ?? null);
28
+ }
29
+ /**
30
+ * List articles with filtering, sorting, and pagination.
31
+ */
32
+ export function listArticles(client, options) {
33
+ const filters = {};
34
+ if (options?.category)
35
+ filters['categories'] = { slug: { $eq: options.category } };
36
+ if (options?.tag)
37
+ filters['tags'] = { slug: { $eq: options.tag } };
38
+ if (options?.author)
39
+ filters['author'] = { slug: { $eq: options.author } };
40
+ if (options?.series)
41
+ filters['series'] = { slug: { $eq: options.series } };
42
+ return client
43
+ .get('/api/articles', {
44
+ params: {
45
+ populate: getArticleListPopulate(),
46
+ filters: Object.keys(filters).length > 0 ? filters : undefined,
47
+ sort: options?.sort ?? 'firstPublishedAt:desc',
48
+ locale: options?.locale,
49
+ pagination: options?.page != null ? { page: options.page, pageSize: options.pageSize } : undefined,
50
+ },
51
+ })
52
+ .then((res) => res.data);
53
+ }
54
+ //# sourceMappingURL=articles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"articles.js","sourceRoot":"","sources":["../../src/api/articles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAiBrF;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,MAAqB,EAAE,UAAkB,EAAE,OAA6B;IACjG,OAAO,MAAM;SACV,GAAG,CAAkC,iBAAiB,UAAU,EAAE,EAAE;QACnE,MAAM,EAAE;YACN,QAAQ,EAAE,kBAAkB,EAAE;YAC9B,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAqB,EAAE,IAAY,EAAE,OAA6B;IACjG,OAAO,MAAM;SACV,GAAG,CAA4C,eAAe,EAAE;QAC/D,MAAM,EAAE;YACN,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAChC,QAAQ,EAAE,kBAAkB,EAAE;YAC9B,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,MAAqB,EAAE,OAA4B;IAC9E,MAAM,OAAO,GAA4B,EAAE,CAAC;IAC5C,IAAI,OAAO,EAAE,QAAQ;QAAE,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;IACnF,IAAI,OAAO,EAAE,GAAG;QAAE,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;IACnE,IAAI,OAAO,EAAE,MAAM;QAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;IAC3E,IAAI,OAAO,EAAE,MAAM;QAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;IAE3E,OAAO,MAAM;SACV,GAAG,CAA4C,eAAe,EAAE;QAC/D,MAAM,EAAE;YACN,QAAQ,EAAE,sBAAsB,EAAE;YAClC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;YAC9D,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,uBAAuB;YAC9C,MAAM,EAAE,OAAO,EAAE,MAAM;YACvB,UAAU,EAAE,OAAO,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;SACnG;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { StrapiCollectionResponse } from '../types/strapi.js';
3
+ import type { AuthorDocument } from '../types/content-types/author.js';
4
+ export interface AuthorListOptions {
5
+ sort?: string | string[];
6
+ }
7
+ /**
8
+ * List all authors.
9
+ */
10
+ export declare function listAuthors(client: AxiosInstance, options?: AuthorListOptions): Promise<StrapiCollectionResponse<AuthorDocument>>;
11
+ /**
12
+ * Get an author by slug.
13
+ */
14
+ export declare function getAuthorBySlug(client: AxiosInstance, slug: string): Promise<AuthorDocument | null>;
15
+ //# sourceMappingURL=authors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authors.d.ts","sourceRoot":"","sources":["../../src/api/authors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,iBAAiB,qDAS7E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,kCASlE"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * List all authors.
3
+ */
4
+ export function listAuthors(client, options) {
5
+ return client
6
+ .get('/api/authors', {
7
+ params: {
8
+ populate: { avatar: true },
9
+ sort: options?.sort ?? 'name:asc',
10
+ },
11
+ })
12
+ .then((res) => res.data);
13
+ }
14
+ /**
15
+ * Get an author by slug.
16
+ */
17
+ export function getAuthorBySlug(client, slug) {
18
+ return client
19
+ .get('/api/authors', {
20
+ params: {
21
+ filters: { slug: { $eq: slug } },
22
+ populate: { avatar: true },
23
+ },
24
+ })
25
+ .then((res) => res.data.data[0] ?? null);
26
+ }
27
+ //# sourceMappingURL=authors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authors.js","sourceRoot":"","sources":["../../src/api/authors.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAqB,EAAE,OAA2B;IAC5E,OAAO,MAAM;SACV,GAAG,CAA2C,cAAc,EAAE;QAC7D,MAAM,EAAE;YACN,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;YAC1B,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,UAAU;SAClC;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAqB,EAAE,IAAY;IACjE,OAAO,MAAM;SACV,GAAG,CAA2C,cAAc,EAAE;QAC7D,MAAM,EAAE;YACN,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAChC,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;SAC3B;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { StrapiCollectionResponse } from '../types/strapi.js';
3
+ import type { CategoryDocument } from '../types/content-types/category.js';
4
+ export interface CategoryListOptions {
5
+ locale?: string;
6
+ sort?: string | string[];
7
+ }
8
+ /**
9
+ * List all categories.
10
+ */
11
+ export declare function listCategories(client: AxiosInstance, options?: CategoryListOptions): Promise<StrapiCollectionResponse<CategoryDocument>>;
12
+ //# sourceMappingURL=categories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../../src/api/categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,mBAAmB,uDASlF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * List all categories.
3
+ */
4
+ export function listCategories(client, options) {
5
+ return client
6
+ .get('/api/categories', {
7
+ params: {
8
+ sort: options?.sort ?? 'sortOrder:asc',
9
+ locale: options?.locale,
10
+ },
11
+ })
12
+ .then((res) => res.data);
13
+ }
14
+ //# sourceMappingURL=categories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"categories.js","sourceRoot":"","sources":["../../src/api/categories.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAqB,EAAE,OAA6B;IACjF,OAAO,MAAM;SACV,GAAG,CAA6C,iBAAiB,EAAE;QAClE,MAAM,EAAE;YACN,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,eAAe;YACtC,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { StrapiCollectionResponse } from '../types/strapi.js';
3
+ import type { FaqDocument } from '../types/content-types/faq.js';
4
+ export interface FaqListOptions {
5
+ locale?: string;
6
+ category?: string;
7
+ sort?: string | string[];
8
+ }
9
+ /**
10
+ * List FAQs with optional category filter.
11
+ */
12
+ export declare function listFaqs(client: AxiosInstance, options?: FaqListOptions): Promise<StrapiCollectionResponse<FaqDocument>>;
13
+ //# sourceMappingURL=faqs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"faqs.d.ts","sourceRoot":"","sources":["../../src/api/faqs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAGjE,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc,kDAcvE"}
@@ -0,0 +1,20 @@
1
+ import { getFaqPopulate } from '../populate/builders.js';
2
+ /**
3
+ * List FAQs with optional category filter.
4
+ */
5
+ export function listFaqs(client, options) {
6
+ const filters = {};
7
+ if (options?.category)
8
+ filters['category'] = { slug: { $eq: options.category } };
9
+ return client
10
+ .get('/api/faqs', {
11
+ params: {
12
+ populate: getFaqPopulate(),
13
+ filters: Object.keys(filters).length > 0 ? filters : undefined,
14
+ sort: options?.sort ?? 'sortOrder:asc',
15
+ locale: options?.locale,
16
+ },
17
+ })
18
+ .then((res) => res.data);
19
+ }
20
+ //# sourceMappingURL=faqs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"faqs.js","sourceRoot":"","sources":["../../src/api/faqs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAQzD;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAqB,EAAE,OAAwB;IACtE,MAAM,OAAO,GAA4B,EAAE,CAAC;IAC5C,IAAI,OAAO,EAAE,QAAQ;QAAE,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;IAEjF,OAAO,MAAM;SACV,GAAG,CAAwC,WAAW,EAAE;QACvD,MAAM,EAAE;YACN,QAAQ,EAAE,cAAc,EAAE;YAC1B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;YAC9D,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,eAAe;YACtC,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { GlobalDocument } from '../types/content-types/global.js';
3
+ export interface GlobalQueryOptions {
4
+ locale?: string;
5
+ customBlocks?: Record<string, object>;
6
+ }
7
+ /**
8
+ * Get Global single type via Smart endpoint (server-side populate).
9
+ */
10
+ export declare function getGlobal(client: AxiosInstance, options?: GlobalQueryOptions): Promise<GlobalDocument>;
11
+ /**
12
+ * Get Global via standard REST (client-side populate).
13
+ */
14
+ export declare function getGlobalRest(client: AxiosInstance, options?: GlobalQueryOptions): Promise<GlobalDocument>;
15
+ //# sourceMappingURL=global.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/api/global.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGvE,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,kBAAkB,2BAM5E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,kBAAkB,2BAShF"}
@@ -0,0 +1,25 @@
1
+ import { getGlobalPopulate } from '../populate/builders.js';
2
+ /**
3
+ * Get Global single type via Smart endpoint (server-side populate).
4
+ */
5
+ export function getGlobal(client, options) {
6
+ return client
7
+ .get('/api/builder/global', {
8
+ params: { locale: options?.locale },
9
+ })
10
+ .then((res) => res.data.data);
11
+ }
12
+ /**
13
+ * Get Global via standard REST (client-side populate).
14
+ */
15
+ export function getGlobalRest(client, options) {
16
+ return client
17
+ .get('/api/global', {
18
+ params: {
19
+ populate: getGlobalPopulate(options?.customBlocks),
20
+ locale: options?.locale,
21
+ },
22
+ })
23
+ .then((res) => res.data.data);
24
+ }
25
+ //# sourceMappingURL=global.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/api/global.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO5D;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,MAAqB,EAAE,OAA4B;IAC3E,OAAO,MAAM;SACV,GAAG,CAAiC,qBAAqB,EAAE;QAC1D,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;KACpC,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,OAA4B;IAC/E,OAAO,MAAM;SACV,GAAG,CAAiC,aAAa,EAAE;QAClD,MAAM,EAAE;YACN,QAAQ,EAAE,iBAAiB,CAAC,OAAO,EAAE,YAAY,CAAC;YAClD,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,21 @@
1
+ export { getPage, getPageBySlug, listPages, listPagesRest } from './pages.js';
2
+ export type { PageQueryOptions, PageListOptions } from './pages.js';
3
+ export { getArticle, getArticleBySlug, listArticles } from './articles.js';
4
+ export type { ArticleQueryOptions, ArticleListOptions } from './articles.js';
5
+ export { getGlobal, getGlobalRest } from './global.js';
6
+ export type { GlobalQueryOptions } from './global.js';
7
+ export { getNavigation } from './navigation.js';
8
+ export type { NavigationQueryOptions } from './navigation.js';
9
+ export { getSiteSettings } from './site-settings.js';
10
+ export { listFaqs } from './faqs.js';
11
+ export type { FaqListOptions } from './faqs.js';
12
+ export { listCategories } from './categories.js';
13
+ export type { CategoryListOptions } from './categories.js';
14
+ export { listTags } from './tags.js';
15
+ export type { TagListOptions } from './tags.js';
16
+ export { listAuthors, getAuthorBySlug } from './authors.js';
17
+ export type { AuthorListOptions } from './authors.js';
18
+ export { listSeries, getSeriesBySlug } from './series.js';
19
+ export type { SeriesListOptions } from './series.js';
20
+ export { postInquiry } from './inquiry.js';
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC9E,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3E,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE7E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,12 @@
1
+ export { getPage, getPageBySlug, listPages, listPagesRest } from './pages.js';
2
+ export { getArticle, getArticleBySlug, listArticles } from './articles.js';
3
+ export { getGlobal, getGlobalRest } from './global.js';
4
+ export { getNavigation } from './navigation.js';
5
+ export { getSiteSettings } from './site-settings.js';
6
+ export { listFaqs } from './faqs.js';
7
+ export { listCategories } from './categories.js';
8
+ export { listTags } from './tags.js';
9
+ export { listAuthors, getAuthorBySlug } from './authors.js';
10
+ export { listSeries, getSeriesBySlug } from './series.js';
11
+ export { postInquiry } from './inquiry.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG9E,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG3E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { InquiryDocument, InquiryFormData } from '../types/content-types/inquiry.js';
3
+ /**
4
+ * Submit an inquiry form (POST).
5
+ */
6
+ export declare function postInquiry(client: AxiosInstance, data: InquiryFormData): Promise<InquiryDocument>;
7
+ //# sourceMappingURL=inquiry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inquiry.d.ts","sourceRoot":"","sources":["../../src/api/inquiry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAE1F;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,4BAIvE"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Submit an inquiry form (POST).
3
+ */
4
+ export function postInquiry(client, data) {
5
+ return client
6
+ .post('/api/inquiries', { data })
7
+ .then((res) => res.data.data);
8
+ }
9
+ //# sourceMappingURL=inquiry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inquiry.js","sourceRoot":"","sources":["../../src/api/inquiry.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,MAAqB,EAAE,IAAqB;IACtE,OAAO,MAAM;SACV,IAAI,CAAkC,gBAAgB,EAAE,EAAE,IAAI,EAAE,CAAC;SACjE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { NavigationDocument } from '../types/content-types/navigation.js';
3
+ export interface NavigationQueryOptions {
4
+ locale?: string;
5
+ }
6
+ /**
7
+ * Get Navigation single type.
8
+ */
9
+ export declare function getNavigation(client: AxiosInstance, options?: NavigationQueryOptions): Promise<NavigationDocument>;
10
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/api/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,sBAAsB,+BASpF"}
@@ -0,0 +1,15 @@
1
+ import { getNavigationPopulate } from '../populate/builders.js';
2
+ /**
3
+ * Get Navigation single type.
4
+ */
5
+ export function getNavigation(client, options) {
6
+ return client
7
+ .get('/api/navigation', {
8
+ params: {
9
+ populate: getNavigationPopulate(),
10
+ locale: options?.locale,
11
+ },
12
+ })
13
+ .then((res) => res.data.data);
14
+ }
15
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/api/navigation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAMhE;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,OAAgC;IACnF,OAAO,MAAM;SACV,GAAG,CAAqC,iBAAiB,EAAE;QAC1D,MAAM,EAAE;YACN,QAAQ,EAAE,qBAAqB,EAAE;YACjC,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { StrapiCollectionResponse } from '../types/strapi.js';
3
+ import type { PageDocument } from '../types/content-types/page.js';
4
+ export interface PageQueryOptions {
5
+ locale?: string;
6
+ }
7
+ export interface PageListOptions {
8
+ locale?: string;
9
+ page?: number;
10
+ pageSize?: number;
11
+ }
12
+ /**
13
+ * Get a single page by documentId via Smart endpoint (server-side populate).
14
+ */
15
+ export declare function getPage(client: AxiosInstance, documentId: string, options?: PageQueryOptions): Promise<PageDocument>;
16
+ /**
17
+ * Get a page by slug via standard REST (client-side populate).
18
+ */
19
+ export declare function getPageBySlug(client: AxiosInstance, slug: string, options?: PageQueryOptions & {
20
+ customBlocks?: Record<string, object>;
21
+ }): Promise<PageDocument | null>;
22
+ /**
23
+ * List pages via Smart endpoint (minimal populate, no blocks).
24
+ */
25
+ export declare function listPages(client: AxiosInstance, options?: PageListOptions): Promise<StrapiCollectionResponse<PageDocument>>;
26
+ /**
27
+ * List pages via standard REST (with populate control).
28
+ */
29
+ export declare function listPagesRest(client: AxiosInstance, options?: PageListOptions): Promise<StrapiCollectionResponse<PageDocument>>;
30
+ //# sourceMappingURL=pages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/api/pages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAkB,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAGnE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,yBAM5F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,gBAAgB,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,gCAWvE;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,eAAe,mDASzE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,eAAe,mDAU7E"}
@@ -0,0 +1,53 @@
1
+ import { getPagePopulate, getPageListPopulate } from '../populate/builders.js';
2
+ /**
3
+ * Get a single page by documentId via Smart endpoint (server-side populate).
4
+ */
5
+ export function getPage(client, documentId, options) {
6
+ return client
7
+ .get(`/api/builder/pages/${documentId}`, {
8
+ params: { locale: options?.locale },
9
+ })
10
+ .then((res) => res.data.data);
11
+ }
12
+ /**
13
+ * Get a page by slug via standard REST (client-side populate).
14
+ */
15
+ export function getPageBySlug(client, slug, options) {
16
+ return client
17
+ .get('/api/pages', {
18
+ params: {
19
+ filters: { slug: { $eq: slug } },
20
+ populate: getPagePopulate(options?.customBlocks),
21
+ locale: options?.locale,
22
+ },
23
+ })
24
+ .then((res) => res.data.data[0] ?? null);
25
+ }
26
+ /**
27
+ * List pages via Smart endpoint (minimal populate, no blocks).
28
+ */
29
+ export function listPages(client, options) {
30
+ return client
31
+ .get('/api/builder/pages', {
32
+ params: {
33
+ locale: options?.locale,
34
+ pagination: options?.page != null ? { page: options.page, pageSize: options.pageSize } : undefined,
35
+ },
36
+ })
37
+ .then((res) => res.data);
38
+ }
39
+ /**
40
+ * List pages via standard REST (with populate control).
41
+ */
42
+ export function listPagesRest(client, options) {
43
+ return client
44
+ .get('/api/pages', {
45
+ params: {
46
+ populate: getPageListPopulate(),
47
+ locale: options?.locale,
48
+ pagination: options?.page != null ? { page: options.page, pageSize: options.pageSize } : undefined,
49
+ },
50
+ })
51
+ .then((res) => res.data);
52
+ }
53
+ //# sourceMappingURL=pages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages.js","sourceRoot":"","sources":["../../src/api/pages.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAY/E;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,MAAqB,EAAE,UAAkB,EAAE,OAA0B;IAC3F,OAAO,MAAM;SACV,GAAG,CAA+B,sBAAsB,UAAU,EAAE,EAAE;QACrE,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE;KACpC,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAqB,EACrB,IAAY,EACZ,OAAsE;IAEtE,OAAO,MAAM;SACV,GAAG,CAAyC,YAAY,EAAE;QACzD,MAAM,EAAE;YACN,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAChC,QAAQ,EAAE,eAAe,CAAC,OAAO,EAAE,YAAY,CAAC;YAChD,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,MAAqB,EAAE,OAAyB;IACxE,OAAO,MAAM;SACV,GAAG,CAAyC,oBAAoB,EAAE;QACjE,MAAM,EAAE;YACN,MAAM,EAAE,OAAO,EAAE,MAAM;YACvB,UAAU,EAAE,OAAO,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;SACnG;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,OAAyB;IAC5E,OAAO,MAAM;SACV,GAAG,CAAyC,YAAY,EAAE;QACzD,MAAM,EAAE;YACN,QAAQ,EAAE,mBAAmB,EAAE;YAC/B,MAAM,EAAE,OAAO,EAAE,MAAM;YACvB,UAAU,EAAE,OAAO,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;SACnG;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { StrapiCollectionResponse } from '../types/strapi.js';
3
+ import type { SeriesDocument } from '../types/content-types/series.js';
4
+ export interface SeriesListOptions {
5
+ locale?: string;
6
+ sort?: string | string[];
7
+ }
8
+ /**
9
+ * List all series.
10
+ */
11
+ export declare function listSeries(client: AxiosInstance, options?: SeriesListOptions): Promise<StrapiCollectionResponse<SeriesDocument>>;
12
+ /**
13
+ * Get a series by slug.
14
+ */
15
+ export declare function getSeriesBySlug(client: AxiosInstance, slug: string, locale?: string): Promise<SeriesDocument | null>;
16
+ //# sourceMappingURL=series.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series.d.ts","sourceRoot":"","sources":["../../src/api/series.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,iBAAiB,qDAU5E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,kCAUnF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * List all series.
3
+ */
4
+ export function listSeries(client, options) {
5
+ return client
6
+ .get('/api/all-series', {
7
+ params: {
8
+ populate: { cover: true },
9
+ sort: options?.sort ?? 'name:asc',
10
+ locale: options?.locale,
11
+ },
12
+ })
13
+ .then((res) => res.data);
14
+ }
15
+ /**
16
+ * Get a series by slug.
17
+ */
18
+ export function getSeriesBySlug(client, slug, locale) {
19
+ return client
20
+ .get('/api/all-series', {
21
+ params: {
22
+ filters: { slug: { $eq: slug } },
23
+ populate: { cover: true },
24
+ locale,
25
+ },
26
+ })
27
+ .then((res) => res.data.data[0] ?? null);
28
+ }
29
+ //# sourceMappingURL=series.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series.js","sourceRoot":"","sources":["../../src/api/series.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,MAAqB,EAAE,OAA2B;IAC3E,OAAO,MAAM;SACV,GAAG,CAA2C,iBAAiB,EAAE;QAChE,MAAM,EAAE;YACN,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;YACzB,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,UAAU;YACjC,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAqB,EAAE,IAAY,EAAE,MAAe;IAClF,OAAO,MAAM;SACV,GAAG,CAA2C,iBAAiB,EAAE;QAChE,MAAM,EAAE;YACN,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAChC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;YACzB,MAAM;SACP;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { SiteSettingsDocument } from '../types/content-types/site-settings.js';
3
+ /**
4
+ * Get SiteSettings single type.
5
+ */
6
+ export declare function getSiteSettings(client: AxiosInstance): Promise<SiteSettingsDocument>;
7
+ //# sourceMappingURL=site-settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"site-settings.d.ts","sourceRoot":"","sources":["../../src/api/site-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAGpF;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,iCAQpD"}
@@ -0,0 +1,14 @@
1
+ import { getSiteSettingsPopulate } from '../populate/builders.js';
2
+ /**
3
+ * Get SiteSettings single type.
4
+ */
5
+ export function getSiteSettings(client) {
6
+ return client
7
+ .get('/api/site-setting', {
8
+ params: {
9
+ populate: getSiteSettingsPopulate(),
10
+ },
11
+ })
12
+ .then((res) => res.data.data);
13
+ }
14
+ //# sourceMappingURL=site-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"site-settings.js","sourceRoot":"","sources":["../../src/api/site-settings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAqB;IACnD,OAAO,MAAM;SACV,GAAG,CAAuC,mBAAmB,EAAE;QAC9D,MAAM,EAAE;YACN,QAAQ,EAAE,uBAAuB,EAAE;SACpC;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import type { StrapiCollectionResponse } from '../types/strapi.js';
3
+ import type { TagDocument } from '../types/content-types/tag.js';
4
+ export interface TagListOptions {
5
+ locale?: string;
6
+ sort?: string | string[];
7
+ }
8
+ /**
9
+ * List all tags.
10
+ */
11
+ export declare function listTags(client: AxiosInstance, options?: TagListOptions): Promise<StrapiCollectionResponse<TagDocument>>;
12
+ //# sourceMappingURL=tags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../src/api/tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc,kDASvE"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * List all tags.
3
+ */
4
+ export function listTags(client, options) {
5
+ return client
6
+ .get('/api/tags', {
7
+ params: {
8
+ sort: options?.sort ?? 'name:asc',
9
+ locale: options?.locale,
10
+ },
11
+ })
12
+ .then((res) => res.data);
13
+ }
14
+ //# sourceMappingURL=tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/api/tags.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAqB,EAAE,OAAwB;IACtE,OAAO,MAAM;SACV,GAAG,CAAwC,WAAW,EAAE;QACvD,MAAM,EAAE;YACN,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,UAAU;YACjC,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB;KACF,CAAC;SACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC"}