@carlonicora/nextjs-jsonapi 5.3.0 → 5.5.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/dist/{BlockNoteEditor-WTSQANKI.mjs → BlockNoteEditor-GVQCKRMU.mjs} +9 -8
- package/dist/BlockNoteEditor-GVQCKRMU.mjs.map +1 -0
- package/dist/{BlockNoteEditor-UJ6363LC.js → BlockNoteEditor-THBJH2UR.js} +24 -23
- package/dist/BlockNoteEditor-THBJH2UR.js.map +1 -0
- package/dist/{BlockNoteViewer-JVKWJZ6J.mjs → BlockNoteViewer-U6E3DS4F.mjs} +3 -3
- package/dist/{BlockNoteViewer-EL4JFB6P.js → BlockNoteViewer-VZOVKTFO.js} +4 -4
- package/dist/{BlockNoteViewer-EL4JFB6P.js.map → BlockNoteViewer-VZOVKTFO.js.map} +1 -1
- package/dist/BlogCategoryFields-DO48vOTE.d.mts +14 -0
- package/dist/BlogCategoryFields-DO48vOTE.d.ts +14 -0
- package/dist/BlogPostInterface-BB_4wcDR.d.mts +124 -0
- package/dist/BlogPostInterface-bWAT1rfR.d.ts +124 -0
- package/dist/billing/index.js +442 -442
- package/dist/billing/index.mjs +4 -4
- package/dist/blog-public.types-BbrzsC1c.d.mts +30 -0
- package/dist/blog-public.types-BbrzsC1c.d.ts +30 -0
- package/dist/chunk-3CGROPF3.mjs +107 -0
- package/dist/chunk-3CGROPF3.mjs.map +1 -0
- package/dist/{chunk-QKZUE5OF.mjs → chunk-3YW35YHQ.mjs} +1 -101
- package/dist/chunk-3YW35YHQ.mjs.map +1 -0
- package/dist/{chunk-6WU74VFU.mjs → chunk-6SQYXUVP.mjs} +2 -2
- package/dist/{chunk-CRI4T47Y.js → chunk-G6UE6MEP.js} +814 -59
- package/dist/chunk-G6UE6MEP.js.map +1 -0
- package/dist/{chunk-XGTQWBDJ.js → chunk-KSYQEKJX.js} +11 -111
- package/dist/chunk-KSYQEKJX.js.map +1 -0
- package/dist/{chunk-EO75CV76.js → chunk-S4YJ5WCW.js} +8 -8
- package/dist/{chunk-EO75CV76.js.map → chunk-S4YJ5WCW.js.map} +1 -1
- package/dist/{chunk-3BAM23VA.js → chunk-TY5FYP3G.js} +930 -883
- package/dist/chunk-TY5FYP3G.js.map +1 -0
- package/dist/{chunk-JQWI62NV.mjs → chunk-VC5A3AUZ.mjs} +776 -21
- package/dist/chunk-VC5A3AUZ.mjs.map +1 -0
- package/dist/{chunk-FNTQQFLH.mjs → chunk-W7F5BDSV.mjs} +2 -2
- package/dist/{chunk-QQQE3N2X.js → chunk-WPYT4UKJ.js} +3 -3
- package/dist/{chunk-QQQE3N2X.js.map → chunk-WPYT4UKJ.js.map} +1 -1
- package/dist/{chunk-MIZTWBPX.mjs → chunk-X5WIUUNG.mjs} +1485 -1438
- package/dist/chunk-X5WIUUNG.mjs.map +1 -0
- package/dist/chunk-YDYVJM4I.js +107 -0
- package/dist/chunk-YDYVJM4I.js.map +1 -0
- package/dist/client/index.js +5 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +4 -4
- package/dist/components/editors/server.d.mts +15 -0
- package/dist/components/editors/server.d.ts +15 -0
- package/dist/components/editors/server.js +38 -0
- package/dist/components/editors/server.js.map +1 -0
- package/dist/components/editors/server.mjs +38 -0
- package/dist/components/editors/server.mjs.map +1 -0
- package/dist/components/index.d.mts +46 -12
- package/dist/components/index.d.ts +46 -12
- package/dist/components/index.js +7 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +8 -6
- package/dist/contexts/index.d.mts +9 -1
- package/dist/contexts/index.d.ts +9 -1
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.d.mts +214 -3
- package/dist/core/index.d.ts +214 -3
- package/dist/core/index.js +38 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +37 -3
- package/dist/email-automations/index.d.mts +3 -0
- package/dist/email-automations/index.d.ts +3 -0
- package/dist/email-automations/index.js +99 -95
- package/dist/email-automations/index.js.map +1 -1
- package/dist/email-automations/index.mjs +30 -26
- package/dist/email-automations/index.mjs.map +1 -1
- package/dist/features/analytics/index.d.mts +11 -4
- package/dist/features/analytics/index.d.ts +11 -4
- package/dist/features/analytics/index.js +127 -135
- package/dist/features/analytics/index.js.map +1 -1
- package/dist/features/analytics/index.mjs +16 -24
- package/dist/features/analytics/index.mjs.map +1 -1
- package/dist/features/analytics/server.d.mts +5 -2
- package/dist/features/analytics/server.d.ts +5 -2
- package/dist/features/analytics/server.js +9 -8
- package/dist/features/analytics/server.js.map +1 -1
- package/dist/features/analytics/server.mjs +7 -6
- package/dist/features/analytics/server.mjs.map +1 -1
- package/dist/features/blog/index.css +30 -0
- package/dist/features/blog/index.css.map +1 -0
- package/dist/features/blog/index.d.mts +276 -0
- package/dist/features/blog/index.d.ts +276 -0
- package/dist/features/blog/index.js +1810 -0
- package/dist/features/blog/index.js.map +1 -0
- package/dist/features/blog/index.mjs +1810 -0
- package/dist/features/blog/index.mjs.map +1 -0
- package/dist/features/blog/server.d.mts +36 -0
- package/dist/features/blog/server.d.ts +36 -0
- package/dist/features/blog/server.js +167 -0
- package/dist/features/blog/server.js.map +1 -0
- package/dist/features/blog/server.mjs +167 -0
- package/dist/features/blog/server.mjs.map +1 -0
- package/dist/features/help/index.js +38 -38
- package/dist/features/help/index.mjs +4 -4
- package/dist/features/tokenusage/index.d.mts +1 -3
- package/dist/features/tokenusage/index.d.ts +1 -3
- package/dist/features/tokenusage/index.js +127 -135
- package/dist/features/tokenusage/index.js.map +1 -1
- package/dist/features/tokenusage/index.mjs +10 -18
- package/dist/features/tokenusage/index.mjs.map +1 -1
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +39 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -4
- package/dist/{s3.service-CY-jgOAM.d.ts → s3.service-Bz_K-tjz.d.ts} +11 -0
- package/dist/{s3.service-Sri0QP7Z.d.mts → s3.service-D5zNCEW3.d.mts} +11 -0
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +9 -7
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +13 -11
- package/messages/en.json +93 -0
- package/messages/it.json +93 -0
- package/package.json +19 -1
- package/src/components/editors/BlockNoteEditor.tsx +13 -3
- package/src/components/editors/server/BlockNoteServerContent.tsx +28 -0
- package/src/components/editors/server/__tests__/renderBlockNoteHTML.spec.ts +44 -0
- package/src/components/editors/server/renderBlockNoteHTML.ts +26 -0
- package/src/components/editors/server-entry.ts +7 -0
- package/src/components/forms/FormBlockNote.tsx +4 -0
- package/src/components/index.ts +1 -0
- package/src/components/navigations/ContentTitle.tsx +14 -3
- package/src/components/viewers/BlockNoteStaticViewer.tsx +44 -0
- package/src/core/index.ts +4 -0
- package/src/core/registry/ModuleRegistry.ts +6 -0
- package/src/features/administration/components/AdminIndexContainer.tsx +61 -33
- package/src/features/administration/components/__tests__/AdminIndexContainer.spec.tsx +61 -1
- package/src/features/administration/components/index.ts +2 -1
- package/src/features/administration/contexts/AdministrationContext.tsx +11 -3
- package/src/features/administration/contexts/__tests__/AdministrationContext.spec.tsx +40 -0
- package/src/features/ai-connection/ai-connection.module.ts +2 -0
- package/src/features/ai-connection/contexts/AiConnectionsContext.tsx +3 -16
- package/src/features/ai-connection/contexts/__tests__/AiConnectionsContext.spec.tsx +33 -0
- package/src/features/analytics/__tests__/server-entry.spec.tsx +2 -1
- package/src/features/analytics/analytics.modules.ts +22 -5
- package/src/features/analytics/components/AnalyticsAdminContainer.tsx +4 -3
- package/src/features/analytics/components/AnalyticsAdminPageContainer.tsx +6 -3
- package/src/features/analytics/components/AnalyticsJourneyContainer.tsx +4 -3
- package/src/features/analytics/components/__tests__/AnalyticsJourneyContainer.spec.tsx +11 -0
- package/src/features/analytics/components/__tests__/AnalyticsPageContainers.spec.tsx +12 -1
- package/src/features/analytics/components/server/AnalyticsAdminPage.tsx +6 -3
- package/src/features/analytics/contexts/AnalyticsAdminContext.tsx +8 -17
- package/src/features/analytics/contexts/__tests__/AnalyticsAdminContext.spec.tsx +17 -0
- package/src/features/billing/stripe-price/stripe-price.module.ts +2 -0
- package/src/features/billing/stripe-product/stripe-product.module.ts +2 -0
- package/src/features/blog/BlogModules.ts +49 -0
- package/src/features/blog/components/admin/BlogAdminContainer.tsx +39 -0
- package/src/features/blog/components/admin/BlogCategoriesList.tsx +56 -0
- package/src/features/blog/components/admin/BlogCategoryEditor.tsx +230 -0
- package/src/features/blog/components/admin/BlogCoverImageField.tsx +123 -0
- package/src/features/blog/components/admin/BlogLayoutSetting.tsx +86 -0
- package/src/features/blog/components/admin/BlogPostComparison.tsx +54 -0
- package/src/features/blog/components/admin/BlogPostContainer.tsx +101 -0
- package/src/features/blog/components/admin/BlogPostDeleter.tsx +35 -0
- package/src/features/blog/components/admin/BlogPostEditor.tsx +216 -0
- package/src/features/blog/components/admin/BlogPostPublishButton.tsx +50 -0
- package/src/features/blog/components/admin/BlogPostTranslationEditor.tsx +118 -0
- package/src/features/blog/components/admin/BlogPostTranslationPanel.tsx +136 -0
- package/src/features/blog/components/admin/BlogPostsList.tsx +58 -0
- package/src/features/blog/components/admin/BlogTranslationStatus.tsx +104 -0
- package/src/features/blog/components/admin/__tests__/BlogPostTranslationPanel.spec.tsx +100 -0
- package/src/features/blog/components/admin/__tests__/BlogPostsList.spec.tsx +30 -0
- package/src/features/blog/components/admin/index.ts +14 -0
- package/src/features/blog/components/public/BlogCategoryChips.tsx +59 -0
- package/src/features/blog/components/public/BlogList.tsx +21 -0
- package/src/features/blog/components/public/BlogListColumn.tsx +53 -0
- package/src/features/blog/components/public/BlogListFeatured.tsx +57 -0
- package/src/features/blog/components/public/BlogListParts.tsx +74 -0
- package/src/features/blog/components/public/BlogListRail.tsx +62 -0
- package/src/features/blog/components/public/BlogPostCard.tsx +125 -0
- package/src/features/blog/components/public/BlogPostMeta.tsx +49 -0
- package/src/features/blog/components/public/BlogPostView.tsx +80 -0
- package/src/features/blog/components/public/BlogSearchBox.tsx +52 -0
- package/src/features/blog/components/public/__tests__/BlogList.spec.tsx +175 -0
- package/src/features/blog/components/public/__tests__/BlogPostView.spec.tsx +134 -0
- package/src/features/blog/components/public/blogPublicHelpers.ts +30 -0
- package/src/features/blog/components/public/index.ts +3 -0
- package/src/features/blog/contexts/BlogPostContext.tsx +66 -0
- package/src/features/blog/contexts/index.ts +1 -0
- package/src/features/blog/data/BlogCategory.ts +93 -0
- package/src/features/blog/data/BlogCategoryFields.ts +4 -0
- package/src/features/blog/data/BlogCategoryInterface.ts +24 -0
- package/src/features/blog/data/BlogCategoryService.ts +54 -0
- package/src/features/blog/data/BlogCategoryTranslation.ts +90 -0
- package/src/features/blog/data/BlogCategoryTranslationInterface.ts +22 -0
- package/src/features/blog/data/BlogCategoryTranslationService.ts +30 -0
- package/src/features/blog/data/BlogPost.spec.ts +123 -0
- package/src/features/blog/data/BlogPost.ts +159 -0
- package/src/features/blog/data/BlogPostFields.ts +7 -0
- package/src/features/blog/data/BlogPostInterface.ts +39 -0
- package/src/features/blog/data/BlogPostService.ts +82 -0
- package/src/features/blog/data/BlogPostTranslation.spec.ts +73 -0
- package/src/features/blog/data/BlogPostTranslation.ts +110 -0
- package/src/features/blog/data/BlogPostTranslationInterface.ts +27 -0
- package/src/features/blog/data/BlogPostTranslationService.ts +30 -0
- package/src/features/blog/data/BlogSettings.ts +37 -0
- package/src/features/blog/data/BlogSettingsInterface.ts +11 -0
- package/src/features/blog/data/BlogSettingsService.ts +24 -0
- package/src/features/blog/data/index.ts +17 -0
- package/src/features/blog/hooks/index.ts +3 -0
- package/src/features/blog/hooks/useBlogCategoryNames.ts +34 -0
- package/src/features/blog/hooks/useBlogCategoryTableStructure.tsx +84 -0
- package/src/features/blog/hooks/useBlogPostTableStructure.tsx +126 -0
- package/src/features/blog/index.ts +15 -0
- package/src/features/blog/server/fetchers.ts +169 -0
- package/src/features/blog/server/toPublic.spec.ts +91 -0
- package/src/features/blog/server/toPublic.ts +36 -0
- package/src/features/blog/server-entry.ts +17 -0
- package/src/features/blog/types/blog-public.types.ts +34 -0
- package/src/features/blog/types/blog.constants.ts +40 -0
- package/src/features/email-automation/components/containers/EmailAutomationsListContainer.tsx +12 -3
- package/src/features/rbac/contexts/RbacContext.tsx +4 -7
- package/src/features/rbac/contexts/__tests__/RbacContext.spec.tsx +42 -0
- package/src/features/s3/data/s3.service.ts +17 -0
- package/src/features/tokenusage/components/TokenUsageAdminContainer.tsx +4 -3
- package/src/features/tokenusage/contexts/TokenUsageAdminContext.tsx +3 -18
- package/src/features/tokenusage/contexts/__tests__/TokenUsageAdminContext.spec.tsx +17 -0
- package/src/features/tokenusage/tokenusage-admin.module.ts +4 -3
- package/src/features/tokenusage/tokenusage.modules.ts +12 -2
- package/src/features/user/contexts/UserContext.tsx +18 -3
- package/src/features/user/contexts/__tests__/UserContext.spec.tsx +95 -0
- package/dist/BlockNoteEditor-UJ6363LC.js.map +0 -1
- package/dist/BlockNoteEditor-WTSQANKI.mjs.map +0 -1
- package/dist/chunk-3BAM23VA.js.map +0 -1
- package/dist/chunk-CRI4T47Y.js.map +0 -1
- package/dist/chunk-JQWI62NV.mjs.map +0 -1
- package/dist/chunk-MIZTWBPX.mjs.map +0 -1
- package/dist/chunk-QKZUE5OF.mjs.map +0 -1
- package/dist/chunk-XGTQWBDJ.js.map +0 -1
- /package/dist/{BlockNoteViewer-JVKWJZ6J.mjs.map → BlockNoteViewer-U6E3DS4F.mjs.map} +0 -0
- /package/dist/{chunk-6WU74VFU.mjs.map → chunk-6SQYXUVP.mjs.map} +0 -0
- /package/dist/{chunk-FNTQQFLH.mjs.map → chunk-W7F5BDSV.mjs.map} +0 -0
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getClientToken
|
|
3
|
-
} from "./chunk-AUXK7QSA.mjs";
|
|
4
|
-
import {
|
|
5
|
-
directFetch
|
|
6
|
-
} from "./chunk-PI56A4DG.mjs";
|
|
7
1
|
import {
|
|
8
2
|
DataClassRegistry,
|
|
9
3
|
ENV,
|
|
@@ -16,6 +10,12 @@ import {
|
|
|
16
10
|
translateResponse,
|
|
17
11
|
tryBootstrap
|
|
18
12
|
} from "./chunk-V5MI7RNB.mjs";
|
|
13
|
+
import {
|
|
14
|
+
getClientToken
|
|
15
|
+
} from "./chunk-AUXK7QSA.mjs";
|
|
16
|
+
import {
|
|
17
|
+
directFetch
|
|
18
|
+
} from "./chunk-PI56A4DG.mjs";
|
|
19
19
|
import {
|
|
20
20
|
__name
|
|
21
21
|
} from "./chunk-PAWJFY3S.mjs";
|
|
@@ -4366,6 +4366,7 @@ var StripePriceService = class extends AbstractService {
|
|
|
4366
4366
|
};
|
|
4367
4367
|
|
|
4368
4368
|
// src/features/billing/stripe-price/stripe-price.module.ts
|
|
4369
|
+
import { CreditCardIcon } from "lucide-react";
|
|
4369
4370
|
var StripePriceModule = /* @__PURE__ */ __name((factory) => factory({
|
|
4370
4371
|
name: "stripe-prices",
|
|
4371
4372
|
// The administration route this entity is served at. `name` above stays the
|
|
@@ -4374,7 +4375,8 @@ var StripePriceModule = /* @__PURE__ */ __name((factory) => factory({
|
|
|
4374
4375
|
// rewrites the URL to a 404 on the first tab change.
|
|
4375
4376
|
pageUrl: "/administration/prices",
|
|
4376
4377
|
model: StripePrice,
|
|
4377
|
-
moduleId: "a7d3e5f1-8c9b-4a2e-b6d7-3f1c8e9a4b5d"
|
|
4378
|
+
moduleId: "a7d3e5f1-8c9b-4a2e-b6d7-3f1c8e9a4b5d",
|
|
4379
|
+
icon: CreditCardIcon
|
|
4378
4380
|
}), "StripePriceModule");
|
|
4379
4381
|
|
|
4380
4382
|
// src/features/billing/stripe-product/data/stripe-product.ts
|
|
@@ -4542,6 +4544,7 @@ var StripeProductService = class extends AbstractService {
|
|
|
4542
4544
|
};
|
|
4543
4545
|
|
|
4544
4546
|
// src/features/billing/stripe-product/stripe-product.module.ts
|
|
4547
|
+
import { CreditCardIcon as CreditCardIcon2 } from "lucide-react";
|
|
4545
4548
|
var StripeProductModule = /* @__PURE__ */ __name((factory) => factory({
|
|
4546
4549
|
name: "stripe-products",
|
|
4547
4550
|
// The administration route this entity is served at. `name` above stays the
|
|
@@ -4550,7 +4553,8 @@ var StripeProductModule = /* @__PURE__ */ __name((factory) => factory({
|
|
|
4550
4553
|
// rewrites the URL to a 404 on the first tab change.
|
|
4551
4554
|
pageUrl: "/administration/products",
|
|
4552
4555
|
model: StripeProduct,
|
|
4553
|
-
moduleId: "f8c4a1e9-3b2d-4f7a-9e5c-1d8a6b3c9f2e"
|
|
4556
|
+
moduleId: "f8c4a1e9-3b2d-4f7a-9e5c-1d8a6b3c9f2e",
|
|
4557
|
+
icon: CreditCardIcon2
|
|
4554
4558
|
}), "StripeProductModule");
|
|
4555
4559
|
|
|
4556
4560
|
// src/features/billing/stripe-subscription/data/stripe-subscription.ts
|
|
@@ -5460,6 +5464,7 @@ var AiConnectionService = class extends AbstractService {
|
|
|
5460
5464
|
};
|
|
5461
5465
|
|
|
5462
5466
|
// src/features/ai-connection/ai-connection.module.ts
|
|
5467
|
+
import { PlugZapIcon } from "lucide-react";
|
|
5463
5468
|
var AiConnectionModule = /* @__PURE__ */ __name((factory) => factory({
|
|
5464
5469
|
name: "ai-connections",
|
|
5465
5470
|
// The administration route this entity is served at. `name` above stays the
|
|
@@ -5468,7 +5473,8 @@ var AiConnectionModule = /* @__PURE__ */ __name((factory) => factory({
|
|
|
5468
5473
|
// rewrites the URL to a 404 on the first tab change.
|
|
5469
5474
|
pageUrl: "/administration/ai-connections",
|
|
5470
5475
|
model: AiConnection,
|
|
5471
|
-
moduleId: "7d3f2b8a-91c4-4e6d-a5f0-2c9b8e4d1a37"
|
|
5476
|
+
moduleId: "7d3f2b8a-91c4-4e6d-a5f0-2c9b8e4d1a37",
|
|
5477
|
+
icon: PlugZapIcon
|
|
5472
5478
|
}), "AiConnectionModule");
|
|
5473
5479
|
|
|
5474
5480
|
// src/features/company/company.module.ts
|
|
@@ -6711,6 +6717,679 @@ var EmailAutomationEnrollmentFields = /* @__PURE__ */ ((EmailAutomationEnrollmen
|
|
|
6711
6717
|
return EmailAutomationEnrollmentFields2;
|
|
6712
6718
|
})(EmailAutomationEnrollmentFields || {});
|
|
6713
6719
|
|
|
6720
|
+
// src/features/blog/BlogModules.ts
|
|
6721
|
+
import { NewspaperIcon } from "lucide-react";
|
|
6722
|
+
|
|
6723
|
+
// src/features/blog/data/BlogCategory.ts
|
|
6724
|
+
var BlogCategory = class extends AbstractApiData {
|
|
6725
|
+
static {
|
|
6726
|
+
__name(this, "BlogCategory");
|
|
6727
|
+
}
|
|
6728
|
+
_originalLanguage;
|
|
6729
|
+
_image;
|
|
6730
|
+
_translations;
|
|
6731
|
+
_language;
|
|
6732
|
+
_name;
|
|
6733
|
+
_slug;
|
|
6734
|
+
_description;
|
|
6735
|
+
get originalLanguage() {
|
|
6736
|
+
return this._originalLanguage ?? "";
|
|
6737
|
+
}
|
|
6738
|
+
get image() {
|
|
6739
|
+
return this._image;
|
|
6740
|
+
}
|
|
6741
|
+
get translations() {
|
|
6742
|
+
return this._translations ?? [];
|
|
6743
|
+
}
|
|
6744
|
+
get original() {
|
|
6745
|
+
return this.translations.find((translation) => translation.isOriginal);
|
|
6746
|
+
}
|
|
6747
|
+
get language() {
|
|
6748
|
+
return this._language;
|
|
6749
|
+
}
|
|
6750
|
+
get name() {
|
|
6751
|
+
return this._name;
|
|
6752
|
+
}
|
|
6753
|
+
get slug() {
|
|
6754
|
+
return this._slug;
|
|
6755
|
+
}
|
|
6756
|
+
get description() {
|
|
6757
|
+
return this._description;
|
|
6758
|
+
}
|
|
6759
|
+
rehydrate(data) {
|
|
6760
|
+
super.rehydrate(data);
|
|
6761
|
+
const attributes = data.jsonApi.attributes ?? {};
|
|
6762
|
+
const meta = data.jsonApi.meta ?? {};
|
|
6763
|
+
const resolved = /* @__PURE__ */ __name((key) => attributes[key] ?? meta[key] ?? void 0, "resolved");
|
|
6764
|
+
this._originalLanguage = attributes.originalLanguage;
|
|
6765
|
+
this._image = attributes.image ?? void 0;
|
|
6766
|
+
this._language = resolved("language");
|
|
6767
|
+
this._name = resolved("name");
|
|
6768
|
+
this._slug = resolved("slug");
|
|
6769
|
+
this._description = resolved("description");
|
|
6770
|
+
this._translations = this._readIncluded(
|
|
6771
|
+
data,
|
|
6772
|
+
"translations",
|
|
6773
|
+
Modules.BlogCategoryTranslation
|
|
6774
|
+
);
|
|
6775
|
+
return this;
|
|
6776
|
+
}
|
|
6777
|
+
createJsonApi(data) {
|
|
6778
|
+
const response = {
|
|
6779
|
+
data: {
|
|
6780
|
+
type: Modules.BlogCategory.name,
|
|
6781
|
+
id: data.id,
|
|
6782
|
+
attributes: {},
|
|
6783
|
+
meta: {},
|
|
6784
|
+
relationships: {}
|
|
6785
|
+
},
|
|
6786
|
+
included: []
|
|
6787
|
+
};
|
|
6788
|
+
if (data.originalLanguage !== void 0) response.data.attributes.originalLanguage = data.originalLanguage;
|
|
6789
|
+
if (data.name !== void 0) response.data.attributes.name = data.name;
|
|
6790
|
+
if (data.slug !== void 0) response.data.attributes.slug = data.slug;
|
|
6791
|
+
if (data.description !== void 0) response.data.attributes.description = data.description;
|
|
6792
|
+
if (data.image !== void 0) response.data.attributes.image = data.image;
|
|
6793
|
+
return response;
|
|
6794
|
+
}
|
|
6795
|
+
};
|
|
6796
|
+
|
|
6797
|
+
// src/features/blog/data/BlogCategoryTranslation.ts
|
|
6798
|
+
var BlogCategoryTranslation = class extends AbstractApiData {
|
|
6799
|
+
static {
|
|
6800
|
+
__name(this, "BlogCategoryTranslation");
|
|
6801
|
+
}
|
|
6802
|
+
_language;
|
|
6803
|
+
_isOriginal;
|
|
6804
|
+
_source;
|
|
6805
|
+
_aiStatus;
|
|
6806
|
+
_name;
|
|
6807
|
+
_slug;
|
|
6808
|
+
_description;
|
|
6809
|
+
_translatedAt;
|
|
6810
|
+
_category;
|
|
6811
|
+
get language() {
|
|
6812
|
+
return this._language ?? "";
|
|
6813
|
+
}
|
|
6814
|
+
get isOriginal() {
|
|
6815
|
+
return this._isOriginal ?? false;
|
|
6816
|
+
}
|
|
6817
|
+
get source() {
|
|
6818
|
+
return this._source ?? "ai";
|
|
6819
|
+
}
|
|
6820
|
+
get aiStatus() {
|
|
6821
|
+
return this._aiStatus ?? "pending";
|
|
6822
|
+
}
|
|
6823
|
+
get name() {
|
|
6824
|
+
return this._name ?? "";
|
|
6825
|
+
}
|
|
6826
|
+
get slug() {
|
|
6827
|
+
return this._slug ?? "";
|
|
6828
|
+
}
|
|
6829
|
+
get description() {
|
|
6830
|
+
return this._description;
|
|
6831
|
+
}
|
|
6832
|
+
get translatedAt() {
|
|
6833
|
+
return this._translatedAt;
|
|
6834
|
+
}
|
|
6835
|
+
get category() {
|
|
6836
|
+
return this._category;
|
|
6837
|
+
}
|
|
6838
|
+
rehydrate(data) {
|
|
6839
|
+
super.rehydrate(data);
|
|
6840
|
+
const attributes = data.jsonApi.attributes ?? {};
|
|
6841
|
+
this._language = attributes.language;
|
|
6842
|
+
this._isOriginal = attributes.isOriginal === true;
|
|
6843
|
+
this._source = attributes.source;
|
|
6844
|
+
this._aiStatus = attributes.aiStatus;
|
|
6845
|
+
this._name = attributes.name ?? void 0;
|
|
6846
|
+
this._slug = attributes.slug ?? void 0;
|
|
6847
|
+
this._description = attributes.description ?? void 0;
|
|
6848
|
+
this._translatedAt = attributes.translatedAt ? new Date(attributes.translatedAt) : void 0;
|
|
6849
|
+
this._category = this._readIncluded(data, "category", Modules.BlogCategory);
|
|
6850
|
+
return this;
|
|
6851
|
+
}
|
|
6852
|
+
createJsonApi(data) {
|
|
6853
|
+
const response = {
|
|
6854
|
+
data: {
|
|
6855
|
+
type: Modules.BlogCategoryTranslation.name,
|
|
6856
|
+
id: data.id,
|
|
6857
|
+
attributes: {},
|
|
6858
|
+
meta: {},
|
|
6859
|
+
relationships: {}
|
|
6860
|
+
},
|
|
6861
|
+
included: []
|
|
6862
|
+
};
|
|
6863
|
+
if (data.name !== void 0) response.data.attributes.name = data.name;
|
|
6864
|
+
if (data.slug !== void 0) response.data.attributes.slug = data.slug;
|
|
6865
|
+
if (data.description !== void 0) response.data.attributes.description = data.description;
|
|
6866
|
+
return response;
|
|
6867
|
+
}
|
|
6868
|
+
};
|
|
6869
|
+
|
|
6870
|
+
// src/features/blog/data/BlogPost.ts
|
|
6871
|
+
var BlogPost = class extends AbstractApiData {
|
|
6872
|
+
static {
|
|
6873
|
+
__name(this, "BlogPost");
|
|
6874
|
+
}
|
|
6875
|
+
_status;
|
|
6876
|
+
_originalLanguage;
|
|
6877
|
+
_coverImage;
|
|
6878
|
+
_publishedAt;
|
|
6879
|
+
_author;
|
|
6880
|
+
_categories;
|
|
6881
|
+
_translations;
|
|
6882
|
+
_language;
|
|
6883
|
+
_title;
|
|
6884
|
+
_slug;
|
|
6885
|
+
_summary;
|
|
6886
|
+
_body;
|
|
6887
|
+
_coverImageAlt;
|
|
6888
|
+
_readingMinutes;
|
|
6889
|
+
_authorName;
|
|
6890
|
+
_categoryIds;
|
|
6891
|
+
get status() {
|
|
6892
|
+
return this._status ?? "draft";
|
|
6893
|
+
}
|
|
6894
|
+
get originalLanguage() {
|
|
6895
|
+
return this._originalLanguage ?? "";
|
|
6896
|
+
}
|
|
6897
|
+
get coverImage() {
|
|
6898
|
+
return this._coverImage;
|
|
6899
|
+
}
|
|
6900
|
+
get publishedAt() {
|
|
6901
|
+
return this._publishedAt;
|
|
6902
|
+
}
|
|
6903
|
+
get author() {
|
|
6904
|
+
return this._author;
|
|
6905
|
+
}
|
|
6906
|
+
get categories() {
|
|
6907
|
+
return this._categories ?? [];
|
|
6908
|
+
}
|
|
6909
|
+
get translations() {
|
|
6910
|
+
return this._translations ?? [];
|
|
6911
|
+
}
|
|
6912
|
+
get original() {
|
|
6913
|
+
return this.translations.find((translation) => translation.isOriginal);
|
|
6914
|
+
}
|
|
6915
|
+
get language() {
|
|
6916
|
+
return this._language;
|
|
6917
|
+
}
|
|
6918
|
+
get title() {
|
|
6919
|
+
return this._title;
|
|
6920
|
+
}
|
|
6921
|
+
get slug() {
|
|
6922
|
+
return this._slug;
|
|
6923
|
+
}
|
|
6924
|
+
get summary() {
|
|
6925
|
+
return this._summary;
|
|
6926
|
+
}
|
|
6927
|
+
get body() {
|
|
6928
|
+
return this._body ?? [];
|
|
6929
|
+
}
|
|
6930
|
+
get coverImageAlt() {
|
|
6931
|
+
return this._coverImageAlt;
|
|
6932
|
+
}
|
|
6933
|
+
get readingMinutes() {
|
|
6934
|
+
return this._readingMinutes;
|
|
6935
|
+
}
|
|
6936
|
+
get authorName() {
|
|
6937
|
+
return this._authorName;
|
|
6938
|
+
}
|
|
6939
|
+
get categoryIds() {
|
|
6940
|
+
return this._categoryIds ?? [];
|
|
6941
|
+
}
|
|
6942
|
+
rehydrate(data) {
|
|
6943
|
+
super.rehydrate(data);
|
|
6944
|
+
const attributes = data.jsonApi.attributes ?? {};
|
|
6945
|
+
const meta = data.jsonApi.meta ?? {};
|
|
6946
|
+
const resolved = /* @__PURE__ */ __name((key) => attributes[key] ?? meta[key] ?? void 0, "resolved");
|
|
6947
|
+
this._status = attributes.status;
|
|
6948
|
+
this._originalLanguage = attributes.originalLanguage;
|
|
6949
|
+
this._coverImage = attributes.coverImage ?? void 0;
|
|
6950
|
+
this._publishedAt = attributes.publishedAt ? new Date(attributes.publishedAt) : void 0;
|
|
6951
|
+
this._language = resolved("language");
|
|
6952
|
+
this._title = resolved("title");
|
|
6953
|
+
this._slug = resolved("slug");
|
|
6954
|
+
this._summary = resolved("summary");
|
|
6955
|
+
const body = resolved("body");
|
|
6956
|
+
this._body = body ? JSON.parse(body) : void 0;
|
|
6957
|
+
this._coverImageAlt = resolved("coverImageAlt");
|
|
6958
|
+
this._readingMinutes = resolved("readingMinutes");
|
|
6959
|
+
this._authorName = resolved("authorName");
|
|
6960
|
+
this._categoryIds = resolved("categoryIds") ?? [];
|
|
6961
|
+
this._author = this._readIncluded(data, "author", Modules.User);
|
|
6962
|
+
this._categories = this._readIncluded(data, "categories", Modules.BlogCategory);
|
|
6963
|
+
this._translations = this._readIncluded(
|
|
6964
|
+
data,
|
|
6965
|
+
"translations",
|
|
6966
|
+
Modules.BlogPostTranslation
|
|
6967
|
+
);
|
|
6968
|
+
return this;
|
|
6969
|
+
}
|
|
6970
|
+
createJsonApi(data) {
|
|
6971
|
+
const response = {
|
|
6972
|
+
data: {
|
|
6973
|
+
type: Modules.BlogPost.name,
|
|
6974
|
+
id: data.id,
|
|
6975
|
+
attributes: {},
|
|
6976
|
+
meta: {},
|
|
6977
|
+
relationships: {}
|
|
6978
|
+
},
|
|
6979
|
+
included: []
|
|
6980
|
+
};
|
|
6981
|
+
if (data.originalLanguage !== void 0) response.data.attributes.originalLanguage = data.originalLanguage;
|
|
6982
|
+
if (data.title !== void 0) response.data.attributes.title = data.title;
|
|
6983
|
+
if (data.slug !== void 0) response.data.attributes.slug = data.slug;
|
|
6984
|
+
if (data.summary !== void 0) response.data.attributes.summary = data.summary;
|
|
6985
|
+
if (data.body !== void 0) response.data.attributes.body = JSON.stringify(data.body);
|
|
6986
|
+
if (data.coverImage !== void 0) response.data.attributes.coverImage = data.coverImage;
|
|
6987
|
+
if (data.coverImageAlt !== void 0) response.data.attributes.coverImageAlt = data.coverImageAlt;
|
|
6988
|
+
if (data.categoryIds !== void 0) {
|
|
6989
|
+
response.data.relationships.categories = {
|
|
6990
|
+
data: data.categoryIds.map((id) => ({ type: Modules.BlogCategory.name, id }))
|
|
6991
|
+
};
|
|
6992
|
+
}
|
|
6993
|
+
return response;
|
|
6994
|
+
}
|
|
6995
|
+
};
|
|
6996
|
+
|
|
6997
|
+
// src/features/blog/data/BlogPostTranslation.ts
|
|
6998
|
+
var BlogPostTranslation = class extends AbstractApiData {
|
|
6999
|
+
static {
|
|
7000
|
+
__name(this, "BlogPostTranslation");
|
|
7001
|
+
}
|
|
7002
|
+
_language;
|
|
7003
|
+
_isOriginal;
|
|
7004
|
+
_source;
|
|
7005
|
+
_aiStatus;
|
|
7006
|
+
_title;
|
|
7007
|
+
_slug;
|
|
7008
|
+
_summary;
|
|
7009
|
+
_body;
|
|
7010
|
+
_coverImageAlt;
|
|
7011
|
+
_readingMinutes;
|
|
7012
|
+
_translatedAt;
|
|
7013
|
+
_post;
|
|
7014
|
+
get language() {
|
|
7015
|
+
return this._language ?? "";
|
|
7016
|
+
}
|
|
7017
|
+
get isOriginal() {
|
|
7018
|
+
return this._isOriginal ?? false;
|
|
7019
|
+
}
|
|
7020
|
+
get source() {
|
|
7021
|
+
return this._source ?? "ai";
|
|
7022
|
+
}
|
|
7023
|
+
get aiStatus() {
|
|
7024
|
+
return this._aiStatus ?? "pending";
|
|
7025
|
+
}
|
|
7026
|
+
get title() {
|
|
7027
|
+
return this._title ?? "";
|
|
7028
|
+
}
|
|
7029
|
+
get slug() {
|
|
7030
|
+
return this._slug ?? "";
|
|
7031
|
+
}
|
|
7032
|
+
get summary() {
|
|
7033
|
+
return this._summary;
|
|
7034
|
+
}
|
|
7035
|
+
get body() {
|
|
7036
|
+
return this._body ?? [];
|
|
7037
|
+
}
|
|
7038
|
+
get coverImageAlt() {
|
|
7039
|
+
return this._coverImageAlt;
|
|
7040
|
+
}
|
|
7041
|
+
get readingMinutes() {
|
|
7042
|
+
return this._readingMinutes ?? 1;
|
|
7043
|
+
}
|
|
7044
|
+
get translatedAt() {
|
|
7045
|
+
return this._translatedAt;
|
|
7046
|
+
}
|
|
7047
|
+
get post() {
|
|
7048
|
+
return this._post;
|
|
7049
|
+
}
|
|
7050
|
+
rehydrate(data) {
|
|
7051
|
+
super.rehydrate(data);
|
|
7052
|
+
const attributes = data.jsonApi.attributes ?? {};
|
|
7053
|
+
this._language = attributes.language;
|
|
7054
|
+
this._isOriginal = attributes.isOriginal === true;
|
|
7055
|
+
this._source = attributes.source;
|
|
7056
|
+
this._aiStatus = attributes.aiStatus;
|
|
7057
|
+
this._title = attributes.title ?? void 0;
|
|
7058
|
+
this._slug = attributes.slug ?? void 0;
|
|
7059
|
+
this._summary = attributes.summary ?? void 0;
|
|
7060
|
+
this._body = attributes.body ? JSON.parse(attributes.body) : void 0;
|
|
7061
|
+
this._coverImageAlt = attributes.coverImageAlt ?? void 0;
|
|
7062
|
+
this._readingMinutes = attributes.readingMinutes ?? void 0;
|
|
7063
|
+
this._translatedAt = attributes.translatedAt ? new Date(attributes.translatedAt) : void 0;
|
|
7064
|
+
this._post = this._readIncluded(data, "post", Modules.BlogPost);
|
|
7065
|
+
return this;
|
|
7066
|
+
}
|
|
7067
|
+
createJsonApi(data) {
|
|
7068
|
+
const response = {
|
|
7069
|
+
data: {
|
|
7070
|
+
type: Modules.BlogPostTranslation.name,
|
|
7071
|
+
id: data.id,
|
|
7072
|
+
attributes: {},
|
|
7073
|
+
meta: {},
|
|
7074
|
+
relationships: {}
|
|
7075
|
+
},
|
|
7076
|
+
included: []
|
|
7077
|
+
};
|
|
7078
|
+
if (data.title !== void 0) response.data.attributes.title = data.title;
|
|
7079
|
+
if (data.slug !== void 0) response.data.attributes.slug = data.slug;
|
|
7080
|
+
if (data.summary !== void 0) response.data.attributes.summary = data.summary;
|
|
7081
|
+
if (data.body !== void 0) response.data.attributes.body = JSON.stringify(data.body);
|
|
7082
|
+
if (data.coverImageAlt !== void 0) response.data.attributes.coverImageAlt = data.coverImageAlt;
|
|
7083
|
+
return response;
|
|
7084
|
+
}
|
|
7085
|
+
};
|
|
7086
|
+
|
|
7087
|
+
// src/features/blog/types/blog.constants.ts
|
|
7088
|
+
var BLOG_LIST_LAYOUTS = ["featured", "column", "rail"];
|
|
7089
|
+
var BLOG_POST_STATUSES = ["draft", "published", "unpublished"];
|
|
7090
|
+
var BLOG_TRANSLATION_SOURCES = ["original", "ai", "manual"];
|
|
7091
|
+
var BLOG_SETTINGS_ID = "5f3c2a9e-8d41-4b7a-9c2e-1a6b0d4e7f13";
|
|
7092
|
+
var BLOG_MODULE_ID = "c1d0e6a2-4b8f-4f3e-9a7d-2e5b8c6f1a90";
|
|
7093
|
+
var BLOG_UPLOAD_ROOT = "blog";
|
|
7094
|
+
var BLOG_POST_UPLOAD_PREFIX = `${BLOG_UPLOAD_ROOT}/blog-posts`;
|
|
7095
|
+
var BLOG_CATEGORY_UPLOAD_PREFIX = `${BLOG_UPLOAD_ROOT}/blog-categories`;
|
|
7096
|
+
var BLOG_PUBLIC_PREFIX = "public";
|
|
7097
|
+
var BLOG_ACTION = {
|
|
7098
|
+
publish: "publish",
|
|
7099
|
+
unpublish: "unpublish",
|
|
7100
|
+
retranslate: "retranslate",
|
|
7101
|
+
related: "related"
|
|
7102
|
+
};
|
|
7103
|
+
|
|
7104
|
+
// src/features/blog/data/BlogSettings.ts
|
|
7105
|
+
var BlogSettings = class extends AbstractApiData {
|
|
7106
|
+
static {
|
|
7107
|
+
__name(this, "BlogSettings");
|
|
7108
|
+
}
|
|
7109
|
+
_listLayout;
|
|
7110
|
+
get listLayout() {
|
|
7111
|
+
return this._listLayout ?? "featured";
|
|
7112
|
+
}
|
|
7113
|
+
rehydrate(data) {
|
|
7114
|
+
super.rehydrate(data);
|
|
7115
|
+
const listLayout = data.jsonApi.attributes?.listLayout;
|
|
7116
|
+
this._listLayout = BLOG_LIST_LAYOUTS.includes(listLayout) ? listLayout : void 0;
|
|
7117
|
+
return this;
|
|
7118
|
+
}
|
|
7119
|
+
createJsonApi(data) {
|
|
7120
|
+
const response = {
|
|
7121
|
+
data: {
|
|
7122
|
+
type: Modules.BlogSettings.name,
|
|
7123
|
+
id: data.id,
|
|
7124
|
+
attributes: {},
|
|
7125
|
+
meta: {},
|
|
7126
|
+
relationships: {}
|
|
7127
|
+
},
|
|
7128
|
+
included: []
|
|
7129
|
+
};
|
|
7130
|
+
response.data.attributes.listLayout = data.listLayout;
|
|
7131
|
+
return response;
|
|
7132
|
+
}
|
|
7133
|
+
};
|
|
7134
|
+
|
|
7135
|
+
// src/features/blog/BlogModules.ts
|
|
7136
|
+
var BlogPostModule = /* @__PURE__ */ __name((factory) => factory({
|
|
7137
|
+
moduleId: BLOG_MODULE_ID,
|
|
7138
|
+
pageUrl: "/administration/blog",
|
|
7139
|
+
name: "blog-posts",
|
|
7140
|
+
model: BlogPost,
|
|
7141
|
+
icon: NewspaperIcon
|
|
7142
|
+
}), "BlogPostModule");
|
|
7143
|
+
var BlogPostTranslationModule = /* @__PURE__ */ __name((factory) => factory({
|
|
7144
|
+
moduleId: BLOG_MODULE_ID,
|
|
7145
|
+
name: "blog-post-translations",
|
|
7146
|
+
model: BlogPostTranslation,
|
|
7147
|
+
icon: NewspaperIcon
|
|
7148
|
+
}), "BlogPostTranslationModule");
|
|
7149
|
+
var BlogCategoryModule = /* @__PURE__ */ __name((factory) => factory({
|
|
7150
|
+
moduleId: BLOG_MODULE_ID,
|
|
7151
|
+
name: "blog-categories",
|
|
7152
|
+
model: BlogCategory,
|
|
7153
|
+
icon: NewspaperIcon
|
|
7154
|
+
}), "BlogCategoryModule");
|
|
7155
|
+
var BlogCategoryTranslationModule = /* @__PURE__ */ __name((factory) => factory({
|
|
7156
|
+
moduleId: BLOG_MODULE_ID,
|
|
7157
|
+
name: "blog-category-translations",
|
|
7158
|
+
model: BlogCategoryTranslation,
|
|
7159
|
+
icon: NewspaperIcon
|
|
7160
|
+
}), "BlogCategoryTranslationModule");
|
|
7161
|
+
var BlogSettingsModule = /* @__PURE__ */ __name((factory) => factory({
|
|
7162
|
+
moduleId: BLOG_MODULE_ID,
|
|
7163
|
+
name: "blog-settings",
|
|
7164
|
+
model: BlogSettings,
|
|
7165
|
+
icon: NewspaperIcon
|
|
7166
|
+
}), "BlogSettingsModule");
|
|
7167
|
+
|
|
7168
|
+
// src/features/blog/data/BlogPostService.ts
|
|
7169
|
+
var BlogPostService = class extends AbstractService {
|
|
7170
|
+
static {
|
|
7171
|
+
__name(this, "BlogPostService");
|
|
7172
|
+
}
|
|
7173
|
+
static async findMany(params = {}) {
|
|
7174
|
+
const endpoint = new EndpointCreator({ endpoint: Modules.BlogPost });
|
|
7175
|
+
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
7176
|
+
return this.callApi({
|
|
7177
|
+
type: Modules.BlogPost,
|
|
7178
|
+
method: "GET" /* GET */,
|
|
7179
|
+
endpoint: endpoint.generate(),
|
|
7180
|
+
next: params.next
|
|
7181
|
+
});
|
|
7182
|
+
}
|
|
7183
|
+
static async findOne(params) {
|
|
7184
|
+
return this.callApi({
|
|
7185
|
+
type: Modules.BlogPost,
|
|
7186
|
+
method: "GET" /* GET */,
|
|
7187
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogPost, id: params.id }).generate()
|
|
7188
|
+
});
|
|
7189
|
+
}
|
|
7190
|
+
static async create(params) {
|
|
7191
|
+
return this.callApi({
|
|
7192
|
+
type: Modules.BlogPost,
|
|
7193
|
+
method: "POST" /* POST */,
|
|
7194
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogPost }).generate(),
|
|
7195
|
+
input: params
|
|
7196
|
+
});
|
|
7197
|
+
}
|
|
7198
|
+
static async update(params) {
|
|
7199
|
+
return this.callApi({
|
|
7200
|
+
type: Modules.BlogPost,
|
|
7201
|
+
method: "PUT" /* PUT */,
|
|
7202
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogPost, id: params.id }).generate(),
|
|
7203
|
+
input: params
|
|
7204
|
+
});
|
|
7205
|
+
}
|
|
7206
|
+
static async delete(params) {
|
|
7207
|
+
await this.callApi({
|
|
7208
|
+
type: Modules.BlogPost,
|
|
7209
|
+
method: "DELETE" /* DELETE */,
|
|
7210
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogPost, id: params.id }).generate()
|
|
7211
|
+
});
|
|
7212
|
+
}
|
|
7213
|
+
/**
|
|
7214
|
+
* POST blog-posts/:id/publish. Sends no body; replies with the post.
|
|
7215
|
+
*/
|
|
7216
|
+
static async publish(params) {
|
|
7217
|
+
return this.callApi({
|
|
7218
|
+
type: Modules.BlogPost,
|
|
7219
|
+
method: "POST" /* POST */,
|
|
7220
|
+
endpoint: new EndpointCreator({
|
|
7221
|
+
endpoint: Modules.BlogPost,
|
|
7222
|
+
id: params.id,
|
|
7223
|
+
childEndpoint: BLOG_ACTION.publish
|
|
7224
|
+
}).generate()
|
|
7225
|
+
});
|
|
7226
|
+
}
|
|
7227
|
+
/**
|
|
7228
|
+
* POST blog-posts/:id/unpublish. Sends no body; replies with the post.
|
|
7229
|
+
*/
|
|
7230
|
+
static async unpublish(params) {
|
|
7231
|
+
return this.callApi({
|
|
7232
|
+
type: Modules.BlogPost,
|
|
7233
|
+
method: "POST" /* POST */,
|
|
7234
|
+
endpoint: new EndpointCreator({
|
|
7235
|
+
endpoint: Modules.BlogPost,
|
|
7236
|
+
id: params.id,
|
|
7237
|
+
childEndpoint: BLOG_ACTION.unpublish
|
|
7238
|
+
}).generate()
|
|
7239
|
+
});
|
|
7240
|
+
}
|
|
7241
|
+
};
|
|
7242
|
+
|
|
7243
|
+
// src/features/blog/data/BlogPostTranslationService.ts
|
|
7244
|
+
var BlogPostTranslationService = class extends AbstractService {
|
|
7245
|
+
static {
|
|
7246
|
+
__name(this, "BlogPostTranslationService");
|
|
7247
|
+
}
|
|
7248
|
+
static async update(params) {
|
|
7249
|
+
return this.callApi({
|
|
7250
|
+
type: Modules.BlogPostTranslation,
|
|
7251
|
+
method: "PUT" /* PUT */,
|
|
7252
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogPostTranslation, id: params.id }).generate(),
|
|
7253
|
+
input: params
|
|
7254
|
+
});
|
|
7255
|
+
}
|
|
7256
|
+
/**
|
|
7257
|
+
* POST blog-post-translations/:id/retranslate. Re-queues this one language
|
|
7258
|
+
* from the current original. Replies 204.
|
|
7259
|
+
*/
|
|
7260
|
+
static async retranslate(params) {
|
|
7261
|
+
await this.callApi({
|
|
7262
|
+
type: Modules.BlogPostTranslation,
|
|
7263
|
+
method: "POST" /* POST */,
|
|
7264
|
+
endpoint: new EndpointCreator({
|
|
7265
|
+
endpoint: Modules.BlogPostTranslation,
|
|
7266
|
+
id: params.id,
|
|
7267
|
+
childEndpoint: BLOG_ACTION.retranslate
|
|
7268
|
+
}).generate()
|
|
7269
|
+
});
|
|
7270
|
+
}
|
|
7271
|
+
};
|
|
7272
|
+
|
|
7273
|
+
// src/features/blog/data/BlogCategoryService.ts
|
|
7274
|
+
var BlogCategoryService = class extends AbstractService {
|
|
7275
|
+
static {
|
|
7276
|
+
__name(this, "BlogCategoryService");
|
|
7277
|
+
}
|
|
7278
|
+
static async findMany(params = {}) {
|
|
7279
|
+
const endpoint = new EndpointCreator({ endpoint: Modules.BlogCategory });
|
|
7280
|
+
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
7281
|
+
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
7282
|
+
return this.callApi({
|
|
7283
|
+
type: Modules.BlogCategory,
|
|
7284
|
+
method: "GET" /* GET */,
|
|
7285
|
+
endpoint: endpoint.generate(),
|
|
7286
|
+
next: params.next
|
|
7287
|
+
});
|
|
7288
|
+
}
|
|
7289
|
+
static async findOne(params) {
|
|
7290
|
+
return this.callApi({
|
|
7291
|
+
type: Modules.BlogCategory,
|
|
7292
|
+
method: "GET" /* GET */,
|
|
7293
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogCategory, id: params.id }).generate()
|
|
7294
|
+
});
|
|
7295
|
+
}
|
|
7296
|
+
static async create(params) {
|
|
7297
|
+
return this.callApi({
|
|
7298
|
+
type: Modules.BlogCategory,
|
|
7299
|
+
method: "POST" /* POST */,
|
|
7300
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogCategory }).generate(),
|
|
7301
|
+
input: params
|
|
7302
|
+
});
|
|
7303
|
+
}
|
|
7304
|
+
static async update(params) {
|
|
7305
|
+
return this.callApi({
|
|
7306
|
+
type: Modules.BlogCategory,
|
|
7307
|
+
method: "PUT" /* PUT */,
|
|
7308
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogCategory, id: params.id }).generate(),
|
|
7309
|
+
input: params
|
|
7310
|
+
});
|
|
7311
|
+
}
|
|
7312
|
+
static async delete(params) {
|
|
7313
|
+
await this.callApi({
|
|
7314
|
+
type: Modules.BlogCategory,
|
|
7315
|
+
method: "DELETE" /* DELETE */,
|
|
7316
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogCategory, id: params.id }).generate()
|
|
7317
|
+
});
|
|
7318
|
+
}
|
|
7319
|
+
};
|
|
7320
|
+
|
|
7321
|
+
// src/features/blog/data/BlogCategoryTranslationService.ts
|
|
7322
|
+
var BlogCategoryTranslationService = class extends AbstractService {
|
|
7323
|
+
static {
|
|
7324
|
+
__name(this, "BlogCategoryTranslationService");
|
|
7325
|
+
}
|
|
7326
|
+
static async update(params) {
|
|
7327
|
+
return this.callApi({
|
|
7328
|
+
type: Modules.BlogCategoryTranslation,
|
|
7329
|
+
method: "PUT" /* PUT */,
|
|
7330
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogCategoryTranslation, id: params.id }).generate(),
|
|
7331
|
+
input: params
|
|
7332
|
+
});
|
|
7333
|
+
}
|
|
7334
|
+
/**
|
|
7335
|
+
* POST blog-category-translations/:id/retranslate. Re-queues this one
|
|
7336
|
+
* language from the current original. Replies 204.
|
|
7337
|
+
*/
|
|
7338
|
+
static async retranslate(params) {
|
|
7339
|
+
await this.callApi({
|
|
7340
|
+
type: Modules.BlogCategoryTranslation,
|
|
7341
|
+
method: "POST" /* POST */,
|
|
7342
|
+
endpoint: new EndpointCreator({
|
|
7343
|
+
endpoint: Modules.BlogCategoryTranslation,
|
|
7344
|
+
id: params.id,
|
|
7345
|
+
childEndpoint: BLOG_ACTION.retranslate
|
|
7346
|
+
}).generate()
|
|
7347
|
+
});
|
|
7348
|
+
}
|
|
7349
|
+
};
|
|
7350
|
+
|
|
7351
|
+
// src/features/blog/data/BlogSettingsService.ts
|
|
7352
|
+
var BlogSettingsService = class extends AbstractService {
|
|
7353
|
+
static {
|
|
7354
|
+
__name(this, "BlogSettingsService");
|
|
7355
|
+
}
|
|
7356
|
+
/**
|
|
7357
|
+
* GET blog-settings: the stored singleton, or the API's default.
|
|
7358
|
+
*/
|
|
7359
|
+
static async get() {
|
|
7360
|
+
return this.callApi({
|
|
7361
|
+
type: Modules.BlogSettings,
|
|
7362
|
+
method: "GET" /* GET */,
|
|
7363
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogSettings }).generate()
|
|
7364
|
+
});
|
|
7365
|
+
}
|
|
7366
|
+
static async save(params) {
|
|
7367
|
+
return this.callApi({
|
|
7368
|
+
type: Modules.BlogSettings,
|
|
7369
|
+
method: "PUT" /* PUT */,
|
|
7370
|
+
endpoint: new EndpointCreator({ endpoint: Modules.BlogSettings, id: params.id }).generate(),
|
|
7371
|
+
input: params
|
|
7372
|
+
});
|
|
7373
|
+
}
|
|
7374
|
+
};
|
|
7375
|
+
|
|
7376
|
+
// src/features/blog/data/BlogPostFields.ts
|
|
7377
|
+
var BlogPostFields = /* @__PURE__ */ ((BlogPostFields2) => {
|
|
7378
|
+
BlogPostFields2["title"] = "title";
|
|
7379
|
+
BlogPostFields2["status"] = "status";
|
|
7380
|
+
BlogPostFields2["categories"] = "categories";
|
|
7381
|
+
BlogPostFields2["publishedAt"] = "publishedAt";
|
|
7382
|
+
BlogPostFields2["languages"] = "languages";
|
|
7383
|
+
return BlogPostFields2;
|
|
7384
|
+
})(BlogPostFields || {});
|
|
7385
|
+
|
|
7386
|
+
// src/features/blog/data/BlogCategoryFields.ts
|
|
7387
|
+
var BlogCategoryFields = /* @__PURE__ */ ((BlogCategoryFields2) => {
|
|
7388
|
+
BlogCategoryFields2["name"] = "name";
|
|
7389
|
+
BlogCategoryFields2["languages"] = "languages";
|
|
7390
|
+
return BlogCategoryFields2;
|
|
7391
|
+
})(BlogCategoryFields || {});
|
|
7392
|
+
|
|
6714
7393
|
// src/features/handbook/HandbookPageModule.ts
|
|
6715
7394
|
import { BookOpenIcon } from "lucide-react";
|
|
6716
7395
|
|
|
@@ -8492,6 +9171,20 @@ var S3Service = class extends AbstractService {
|
|
|
8492
9171
|
if (params.isPublic) endpoint.addAdditionalParam("isPublic", "true");
|
|
8493
9172
|
return this.callApi({ type: Modules.S3, method: "GET" /* GET */, endpoint: endpoint.generate() });
|
|
8494
9173
|
}
|
|
9174
|
+
/**
|
|
9175
|
+
* Presigns `key` and PUTs `file` to the presigned S3 URL. The PUT goes straight
|
|
9176
|
+
* to object storage (not the JSON:API backend), so it cannot use callApi.
|
|
9177
|
+
* Throws when the upload is rejected.
|
|
9178
|
+
*/
|
|
9179
|
+
static async upload(params) {
|
|
9180
|
+
const s3 = await this.getPreSignedUrl({
|
|
9181
|
+
key: params.key,
|
|
9182
|
+
contentType: params.contentType,
|
|
9183
|
+
isPublic: params.isPublic
|
|
9184
|
+
});
|
|
9185
|
+
const response = await fetch(s3.url, { method: "PUT", headers: s3.headers, body: params.file });
|
|
9186
|
+
if (!response.ok) throw new Error(`S3 upload failed: ${response.status}`);
|
|
9187
|
+
}
|
|
8495
9188
|
static async getSignedUrl(params) {
|
|
8496
9189
|
const endpoint = new EndpointCreator({ endpoint: Modules.S3, id: "sign" }).addAdditionalParam("key", params.key);
|
|
8497
9190
|
if (params.isPublic) endpoint.addAdditionalParam("isPublic", "true");
|
|
@@ -9688,6 +10381,9 @@ var ReferralStatsModule = /* @__PURE__ */ __name((factory) => factory({
|
|
|
9688
10381
|
model: ReferralStats
|
|
9689
10382
|
}), "ReferralStatsModule");
|
|
9690
10383
|
|
|
10384
|
+
// src/features/tokenusage/tokenusage-admin.module.ts
|
|
10385
|
+
import { CoinsIcon } from "lucide-react";
|
|
10386
|
+
|
|
9691
10387
|
// src/features/tokenusage/data/tokenusage-admin-breakdown.ts
|
|
9692
10388
|
var TokenUsageAdminBreakdown = class extends AbstractApiData {
|
|
9693
10389
|
static {
|
|
@@ -9924,9 +10620,12 @@ var TokenUsageAdminTimeline = class extends AbstractApiData {
|
|
|
9924
10620
|
};
|
|
9925
10621
|
|
|
9926
10622
|
// src/features/tokenusage/tokenusage-admin.module.ts
|
|
9927
|
-
var TokenUsageAdminSummaryModule = /* @__PURE__ */ __name((factory) => factory({ name: "tokenusages/administration/summary", model: TokenUsageAdminSummary }), "TokenUsageAdminSummaryModule");
|
|
9928
|
-
var TokenUsageAdminTimelineModule = /* @__PURE__ */ __name((factory) => factory({ name: "tokenusages/administration/timeline", model: TokenUsageAdminTimeline }), "TokenUsageAdminTimelineModule");
|
|
9929
|
-
var TokenUsageAdminBreakdownModule = /* @__PURE__ */ __name((factory) => factory({ name: "tokenusages/administration/breakdown", model: TokenUsageAdminBreakdown }), "TokenUsageAdminBreakdownModule");
|
|
10623
|
+
var TokenUsageAdminSummaryModule = /* @__PURE__ */ __name((factory) => factory({ name: "tokenusages/administration/summary", model: TokenUsageAdminSummary, icon: CoinsIcon }), "TokenUsageAdminSummaryModule");
|
|
10624
|
+
var TokenUsageAdminTimelineModule = /* @__PURE__ */ __name((factory) => factory({ name: "tokenusages/administration/timeline", model: TokenUsageAdminTimeline, icon: CoinsIcon }), "TokenUsageAdminTimelineModule");
|
|
10625
|
+
var TokenUsageAdminBreakdownModule = /* @__PURE__ */ __name((factory) => factory({ name: "tokenusages/administration/breakdown", model: TokenUsageAdminBreakdown, icon: CoinsIcon }), "TokenUsageAdminBreakdownModule");
|
|
10626
|
+
|
|
10627
|
+
// src/features/tokenusage/tokenusage.modules.ts
|
|
10628
|
+
import { CoinsIcon as CoinsIcon2 } from "lucide-react";
|
|
9930
10629
|
|
|
9931
10630
|
// src/features/tokenusage/data/tokenusage-report-breakdown.ts
|
|
9932
10631
|
var TokenUsageReportBreakdown = class extends AbstractApiData {
|
|
@@ -10140,17 +10839,29 @@ var TokenUsageReportTimeline = class extends AbstractApiData {
|
|
|
10140
10839
|
|
|
10141
10840
|
// src/features/tokenusage/tokenusage.modules.ts
|
|
10142
10841
|
var tokenUsageModules = /* @__PURE__ */ __name((factory) => ({
|
|
10143
|
-
TokenUsageAdminSummary: factory({
|
|
10144
|
-
|
|
10842
|
+
TokenUsageAdminSummary: factory({
|
|
10843
|
+
name: "tokenusages/administration/summary",
|
|
10844
|
+
model: TokenUsageAdminSummary,
|
|
10845
|
+
icon: CoinsIcon2
|
|
10846
|
+
}),
|
|
10847
|
+
TokenUsageAdminTimeline: factory({
|
|
10848
|
+
name: "tokenusages/administration/timeline",
|
|
10849
|
+
model: TokenUsageAdminTimeline,
|
|
10850
|
+
icon: CoinsIcon2
|
|
10851
|
+
}),
|
|
10145
10852
|
TokenUsageAdminBreakdown: factory({
|
|
10146
10853
|
name: "tokenusages/administration/breakdown",
|
|
10147
|
-
model: TokenUsageAdminBreakdown
|
|
10854
|
+
model: TokenUsageAdminBreakdown,
|
|
10855
|
+
icon: CoinsIcon2
|
|
10148
10856
|
}),
|
|
10149
10857
|
TokenUsageReportSummary: factory({ name: "tokenusages/reports/summary", model: TokenUsageReportSummary }),
|
|
10150
10858
|
TokenUsageReportTimeline: factory({ name: "tokenusages/reports/timeline", model: TokenUsageReportTimeline }),
|
|
10151
10859
|
TokenUsageReportBreakdown: factory({ name: "tokenusages/reports/breakdown", model: TokenUsageReportBreakdown })
|
|
10152
10860
|
}), "tokenUsageModules");
|
|
10153
10861
|
|
|
10862
|
+
// src/features/analytics/analytics.modules.ts
|
|
10863
|
+
import { ChartNoAxesCombinedIcon } from "lucide-react";
|
|
10864
|
+
|
|
10154
10865
|
// src/features/analytics/data/analytics-breakdown.ts
|
|
10155
10866
|
var AnalyticsBreakdown = class extends AbstractApiData {
|
|
10156
10867
|
static {
|
|
@@ -10535,11 +11246,27 @@ var AnalyticsTimeline = class extends AbstractApiData {
|
|
|
10535
11246
|
// src/features/analytics/analytics.modules.ts
|
|
10536
11247
|
var analyticsModules = /* @__PURE__ */ __name((factory) => ({
|
|
10537
11248
|
AnalyticsEvent: factory({ name: "analytics/events", model: AnalyticsEvent }),
|
|
10538
|
-
AnalyticsSummary: factory({
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
|
|
11249
|
+
AnalyticsSummary: factory({
|
|
11250
|
+
name: "analytics/administration/summary",
|
|
11251
|
+
model: AnalyticsSummary,
|
|
11252
|
+
icon: ChartNoAxesCombinedIcon
|
|
11253
|
+
}),
|
|
11254
|
+
AnalyticsTimeline: factory({
|
|
11255
|
+
name: "analytics/administration/timeline",
|
|
11256
|
+
model: AnalyticsTimeline,
|
|
11257
|
+
icon: ChartNoAxesCombinedIcon
|
|
11258
|
+
}),
|
|
11259
|
+
AnalyticsBreakdown: factory({
|
|
11260
|
+
name: "analytics/administration/breakdown",
|
|
11261
|
+
model: AnalyticsBreakdown,
|
|
11262
|
+
icon: ChartNoAxesCombinedIcon
|
|
11263
|
+
}),
|
|
11264
|
+
AnalyticsSession: factory({
|
|
11265
|
+
name: "analytics/administration/sessions",
|
|
11266
|
+
model: AnalyticsSession,
|
|
11267
|
+
icon: ChartNoAxesCombinedIcon
|
|
11268
|
+
}),
|
|
11269
|
+
AnalyticsPageView: factory({ name: "pageviews", model: AnalyticsPageView, icon: ChartNoAxesCombinedIcon })
|
|
10543
11270
|
}), "analyticsModules");
|
|
10544
11271
|
|
|
10545
11272
|
// src/features/tokenusage/lib/config.ts
|
|
@@ -10649,6 +11376,7 @@ export {
|
|
|
10649
11376
|
getI18nLink,
|
|
10650
11377
|
useI18nLocale,
|
|
10651
11378
|
useI18nDateFnsLocale,
|
|
11379
|
+
getI18nSupportedLocales,
|
|
10652
11380
|
HttpMethod,
|
|
10653
11381
|
setGlobalErrorHandler,
|
|
10654
11382
|
getGlobalErrorHandler,
|
|
@@ -10813,6 +11541,33 @@ export {
|
|
|
10813
11541
|
EmailAutomationEnrollmentService,
|
|
10814
11542
|
EmailAutomationFields,
|
|
10815
11543
|
EmailAutomationEnrollmentFields,
|
|
11544
|
+
BlogCategory,
|
|
11545
|
+
BlogCategoryTranslation,
|
|
11546
|
+
BlogPost,
|
|
11547
|
+
BlogPostTranslation,
|
|
11548
|
+
BLOG_LIST_LAYOUTS,
|
|
11549
|
+
BLOG_POST_STATUSES,
|
|
11550
|
+
BLOG_TRANSLATION_SOURCES,
|
|
11551
|
+
BLOG_SETTINGS_ID,
|
|
11552
|
+
BLOG_MODULE_ID,
|
|
11553
|
+
BLOG_UPLOAD_ROOT,
|
|
11554
|
+
BLOG_POST_UPLOAD_PREFIX,
|
|
11555
|
+
BLOG_CATEGORY_UPLOAD_PREFIX,
|
|
11556
|
+
BLOG_PUBLIC_PREFIX,
|
|
11557
|
+
BLOG_ACTION,
|
|
11558
|
+
BlogSettings,
|
|
11559
|
+
BlogPostModule,
|
|
11560
|
+
BlogPostTranslationModule,
|
|
11561
|
+
BlogCategoryModule,
|
|
11562
|
+
BlogCategoryTranslationModule,
|
|
11563
|
+
BlogSettingsModule,
|
|
11564
|
+
BlogPostService,
|
|
11565
|
+
BlogPostTranslationService,
|
|
11566
|
+
BlogCategoryService,
|
|
11567
|
+
BlogCategoryTranslationService,
|
|
11568
|
+
BlogSettingsService,
|
|
11569
|
+
BlogPostFields,
|
|
11570
|
+
BlogCategoryFields,
|
|
10816
11571
|
HandbookPage,
|
|
10817
11572
|
HandbookPageModule,
|
|
10818
11573
|
HandbookSection,
|
|
@@ -10912,4 +11667,4 @@ export {
|
|
|
10912
11667
|
AuditLogService,
|
|
10913
11668
|
AuditLogModule
|
|
10914
11669
|
};
|
|
10915
|
-
//# sourceMappingURL=chunk-
|
|
11670
|
+
//# sourceMappingURL=chunk-VC5A3AUZ.mjs.map
|