@carlonicora/nextjs-jsonapi 6.7.0 → 6.9.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/{AssistantMessageInterface-0ZQ1EJKO.d.mts → AssistantMessageInterface-BE3QxI54.d.mts} +1 -1
- package/dist/{AssistantMessageInterface-CA-hZ5Wj.d.ts → AssistantMessageInterface-nXpD_d-m.d.ts} +1 -1
- package/dist/{BlockNoteEditor-HWJBQAKG.mjs → BlockNoteEditor-WN73IHXR.mjs} +4 -4
- package/dist/{BlockNoteEditor-BSFR2GPI.js → BlockNoteEditor-XXH3VBZ7.js} +19 -19
- package/dist/{BlockNoteEditor-BSFR2GPI.js.map → BlockNoteEditor-XXH3VBZ7.js.map} +1 -1
- package/dist/{BlockNoteViewer-NHS6CCMS.js → BlockNoteViewer-EKAWVLIR.js} +3 -3
- package/dist/{BlockNoteViewer-NHS6CCMS.js.map → BlockNoteViewer-EKAWVLIR.js.map} +1 -1
- package/dist/{BlockNoteViewer-IIBUU7J7.mjs → BlockNoteViewer-RWRI3QO2.mjs} +2 -2
- package/dist/{BlogPostInterface-CTGfsR1I.d.ts → BlogPostInterface-2sVqvXFd.d.ts} +1 -1
- package/dist/{BlogPostInterface-BN2mXc46.d.mts → BlogPostInterface-BgJLFpaa.d.mts} +1 -1
- package/dist/{HandbookSectionInterface-BYsmnPEz.d.mts → HandbookSectionInterface-BPgqqwgw.d.mts} +20 -1
- package/dist/{HandbookSectionInterface-OePKPbqN.d.ts → HandbookSectionInterface-_51oA3om.d.ts} +20 -1
- package/dist/{auth.interface-DuX87BZ3.d.mts → auth.interface-BAYLbYjs.d.mts} +1 -1
- package/dist/{auth.interface-B4tRE0k0.d.ts → auth.interface-BjYwwfy9.d.ts} +1 -1
- package/dist/billing/index.js +492 -492
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-EC4PQ44E.mjs → chunk-3TNGKMJU.mjs} +2 -2
- package/dist/{chunk-QNIWATQD.mjs → chunk-6HFRXEF5.mjs} +331 -3
- package/dist/chunk-6HFRXEF5.mjs.map +1 -0
- package/dist/{chunk-OYRJ32KR.mjs → chunk-AWLTSKMM.mjs} +2 -2
- package/dist/{chunk-XYKDBOCE.mjs → chunk-DPAM7BCE.mjs} +2 -2
- package/dist/{chunk-PYDDFFQM.js → chunk-G3YKDIAL.js} +3 -3
- package/dist/{chunk-PYDDFFQM.js.map → chunk-G3YKDIAL.js.map} +1 -1
- package/dist/{chunk-3HOJNAZB.js → chunk-KRQRJA4J.js} +8 -8
- package/dist/{chunk-3HOJNAZB.js.map → chunk-KRQRJA4J.js.map} +1 -1
- package/dist/{chunk-S4NKWMX5.mjs → chunk-Q4XLE3QO.mjs} +1738 -1308
- package/dist/chunk-Q4XLE3QO.mjs.map +1 -0
- package/dist/{chunk-73XWQA6U.js → chunk-RNZ3IK5J.js} +4 -4
- package/dist/{chunk-73XWQA6U.js.map → chunk-RNZ3IK5J.js.map} +1 -1
- package/dist/{chunk-6KE7UBYY.js → chunk-SQTXJPRE.js} +505 -177
- package/dist/chunk-SQTXJPRE.js.map +1 -0
- package/dist/{chunk-PCCUPEBU.js → chunk-ZCM4JLM7.js} +1381 -951
- package/dist/chunk-ZCM4JLM7.js.map +1 -0
- package/dist/client/index.d.mts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +62 -8
- package/dist/components/index.d.ts +62 -8
- package/dist/components/index.js +14 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +13 -3
- package/dist/contexts/index.d.mts +4 -4
- package/dist/contexts/index.d.ts +4 -4
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +146 -13
- package/dist/core/index.d.ts +146 -13
- package/dist/core/index.js +24 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +23 -1
- package/dist/email-automations/index.d.mts +6 -1
- package/dist/email-automations/index.d.ts +6 -1
- package/dist/email-automations/index.js +101 -94
- package/dist/email-automations/index.js.map +1 -1
- package/dist/email-automations/index.mjs +12 -5
- package/dist/email-automations/index.mjs.map +1 -1
- package/dist/features/analytics/index.d.mts +1 -1
- package/dist/features/analytics/index.d.ts +1 -1
- package/dist/features/analytics/index.js +121 -121
- package/dist/features/analytics/index.mjs +4 -4
- package/dist/features/analytics/server.js +4 -4
- package/dist/features/analytics/server.mjs +2 -2
- package/dist/features/blog/index.d.mts +3 -3
- package/dist/features/blog/index.d.ts +3 -3
- package/dist/features/blog/index.js +150 -150
- package/dist/features/blog/index.mjs +3 -3
- package/dist/features/blog/server.d.mts +3 -3
- package/dist/features/blog/server.d.ts +3 -3
- package/dist/features/blog/server.js +16 -16
- package/dist/features/blog/server.mjs +1 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +127 -127
- package/dist/features/tokenusage/index.mjs +4 -4
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +25 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -2
- package/dist/{notification.interface-DQReXAD7.d.ts → notification.interface-DQItyY_Q.d.ts} +1 -1
- package/dist/{notification.interface-CF5h90U2.d.mts → notification.interface-DoVS5RZB.d.mts} +1 -1
- package/dist/{s3.service-CRGJbO-6.d.mts → s3.service-BG136Btz.d.mts} +3 -3
- package/dist/{s3.service-DZG-VyLY.d.ts → s3.service-CsrsRPRn.d.ts} +3 -3
- package/dist/server/index.d.mts +4 -4
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/{useSocket-CwSoq6VS.d.mts → useSocket-C8fqU4od.d.mts} +1 -1
- package/dist/{useSocket-BM3q9A0C.d.ts → useSocket-IRHtk2xc.d.ts} +1 -1
- package/dist/{user.interface-BYnGJ7ss.d.mts → user.interface-Bm-0TbsB.d.mts} +6 -0
- package/dist/{user.interface-BqPjVyJI.d.ts → user.interface-CKBIEvNu.d.ts} +6 -0
- package/messages/en.json +62 -0
- package/messages/it.json +62 -0
- package/package.json +1 -1
- package/src/components/index.ts +1 -0
- package/src/core/index.ts +3 -0
- package/src/core/registry/ModuleRegistry.ts +4 -0
- package/src/features/company/data/company.interface.ts +7 -0
- package/src/features/company/data/company.spec.ts +23 -0
- package/src/features/company/data/company.ts +6 -0
- package/src/features/company/hooks/useSubscriptionStatus.spec.ts +59 -0
- package/src/features/company/hooks/useSubscriptionStatus.ts +5 -3
- package/src/features/email-automation/components/unsubscribe/EmailUnsubscribe.tsx +14 -2
- package/src/features/email-blast/EmailBlastAudienceModule.ts +12 -0
- package/src/features/email-blast/EmailBlastDeliveryModule.ts +12 -0
- package/src/features/email-blast/EmailBlastModule.ts +28 -0
- package/src/features/email-blast/components/containers/EmailBlastContainer.tsx +145 -0
- package/src/features/email-blast/components/containers/EmailBlastsListContainer.tsx +36 -0
- package/src/features/email-blast/components/forms/EmailBlastEditor.tsx +132 -0
- package/src/features/email-blast/components/forms/EmailBlastSendDialog.tsx +104 -0
- package/src/features/email-blast/components/index.ts +5 -0
- package/src/features/email-blast/components/lists/EmailBlastsList.tsx +57 -0
- package/src/features/email-blast/data/EmailBlast.ts +89 -0
- package/src/features/email-blast/data/EmailBlastAudience.ts +22 -0
- package/src/features/email-blast/data/EmailBlastAudienceInterface.ts +5 -0
- package/src/features/email-blast/data/EmailBlastDelivery.ts +36 -0
- package/src/features/email-blast/data/EmailBlastDeliveryInterface.ts +7 -0
- package/src/features/email-blast/data/EmailBlastDeliveryService.ts +25 -0
- package/src/features/email-blast/data/EmailBlastInterface.ts +22 -0
- package/src/features/email-blast/data/EmailBlastService.ts +101 -0
- package/src/features/email-blast/data/__tests__/EmailBlast.spec.ts +73 -0
- package/src/features/email-blast/data/email-blast.fields.ts +8 -0
- package/src/features/email-blast/data/email-blast.segments.ts +10 -0
- package/src/features/email-blast/data/index.ts +10 -0
- package/src/features/email-blast/hooks/useEmailBlastTableStructure.tsx +104 -0
- package/src/features/email-blast/index.ts +4 -0
- package/src/features/index.ts +1 -0
- package/dist/chunk-6KE7UBYY.js.map +0 -1
- package/dist/chunk-PCCUPEBU.js.map +0 -1
- package/dist/chunk-QNIWATQD.mjs.map +0 -1
- package/dist/chunk-S4NKWMX5.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-HWJBQAKG.mjs.map → BlockNoteEditor-WN73IHXR.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-IIBUU7J7.mjs.map → BlockNoteViewer-RWRI3QO2.mjs.map} +0 -0
- /package/dist/{chunk-EC4PQ44E.mjs.map → chunk-3TNGKMJU.mjs.map} +0 -0
- /package/dist/{chunk-OYRJ32KR.mjs.map → chunk-AWLTSKMM.mjs.map} +0 -0
- /package/dist/{chunk-XYKDBOCE.mjs.map → chunk-DPAM7BCE.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -81,10 +81,10 @@ import {
|
|
|
81
81
|
useCurrentUserContext,
|
|
82
82
|
useDataListRetriever,
|
|
83
83
|
usePageUrlGenerator
|
|
84
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-Q4XLE3QO.mjs";
|
|
85
85
|
import {
|
|
86
86
|
getStripePublishableKey
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-AWLTSKMM.mjs";
|
|
88
88
|
import {
|
|
89
89
|
getRoleId
|
|
90
90
|
} from "../chunk-PW42LRSL.mjs";
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
toPromotionCodeResult,
|
|
115
115
|
useI18nLocale,
|
|
116
116
|
useI18nRouter
|
|
117
|
-
} from "../chunk-
|
|
117
|
+
} from "../chunk-6HFRXEF5.mjs";
|
|
118
118
|
import "../chunk-V5MI7RNB.mjs";
|
|
119
119
|
import "../chunk-AUXK7QSA.mjs";
|
|
120
120
|
import "../chunk-PI56A4DG.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTokenUsageCurrency
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6HFRXEF5.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__name
|
|
6
6
|
} from "./chunk-PAWJFY3S.mjs";
|
|
@@ -112,4 +112,4 @@ export {
|
|
|
112
112
|
seriesColor,
|
|
113
113
|
seriesTheme
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=chunk-
|
|
115
|
+
//# sourceMappingURL=chunk-3TNGKMJU.mjs.map
|
|
@@ -6419,6 +6419,7 @@ var Company = class extends AbstractApiData {
|
|
|
6419
6419
|
_logoUrl;
|
|
6420
6420
|
_configurations;
|
|
6421
6421
|
_isActiveSubscription = false;
|
|
6422
|
+
_trialEndsAt;
|
|
6422
6423
|
_monthlyCredits = 0;
|
|
6423
6424
|
_availableMonthlyCredits = 0;
|
|
6424
6425
|
_availableExtraCredits = 0;
|
|
@@ -6452,6 +6453,9 @@ var Company = class extends AbstractApiData {
|
|
|
6452
6453
|
get isActiveSubscription() {
|
|
6453
6454
|
return this._isActiveSubscription ?? false;
|
|
6454
6455
|
}
|
|
6456
|
+
get trialEndsAt() {
|
|
6457
|
+
return this._trialEndsAt;
|
|
6458
|
+
}
|
|
6455
6459
|
get monthlyCredits() {
|
|
6456
6460
|
return this._monthlyCredits ?? 0;
|
|
6457
6461
|
}
|
|
@@ -6522,6 +6526,7 @@ var Company = class extends AbstractApiData {
|
|
|
6522
6526
|
this._logo = data.jsonApi.attributes.logo;
|
|
6523
6527
|
this._logoUrl = data.jsonApi.attributes.logoUrl;
|
|
6524
6528
|
this._isActiveSubscription = data.jsonApi.attributes.isActiveSubscription ?? false;
|
|
6529
|
+
this._trialEndsAt = data.jsonApi.attributes.trialEndsAt ? new Date(data.jsonApi.attributes.trialEndsAt) : void 0;
|
|
6525
6530
|
this._monthlyCredits = data.jsonApi.attributes.monthlyCredits ?? 0;
|
|
6526
6531
|
this._availableMonthlyCredits = data.jsonApi.attributes.availableMonthlyCredits ?? 0;
|
|
6527
6532
|
this._availableExtraCredits = data.jsonApi.attributes.availableExtraCredits ?? 0;
|
|
@@ -7681,6 +7686,318 @@ var EmailAutomationEnrollmentFields = /* @__PURE__ */ ((EmailAutomationEnrollmen
|
|
|
7681
7686
|
return EmailAutomationEnrollmentFields2;
|
|
7682
7687
|
})(EmailAutomationEnrollmentFields || {});
|
|
7683
7688
|
|
|
7689
|
+
// src/features/email-blast/EmailBlastModule.ts
|
|
7690
|
+
import { SendIcon } from "lucide-react";
|
|
7691
|
+
|
|
7692
|
+
// src/features/email-blast/data/EmailBlast.ts
|
|
7693
|
+
var EmailBlast = class extends AbstractApiData {
|
|
7694
|
+
static {
|
|
7695
|
+
__name(this, "EmailBlast");
|
|
7696
|
+
}
|
|
7697
|
+
_subject;
|
|
7698
|
+
_body;
|
|
7699
|
+
_replyTo;
|
|
7700
|
+
_status = "draft";
|
|
7701
|
+
_sentAt;
|
|
7702
|
+
_recipientCount;
|
|
7703
|
+
_sentCount;
|
|
7704
|
+
_failedCount;
|
|
7705
|
+
_unsubscribedCount;
|
|
7706
|
+
get subject() {
|
|
7707
|
+
return this._subject ?? "";
|
|
7708
|
+
}
|
|
7709
|
+
get body() {
|
|
7710
|
+
return this._body ?? "";
|
|
7711
|
+
}
|
|
7712
|
+
get replyTo() {
|
|
7713
|
+
return this._replyTo;
|
|
7714
|
+
}
|
|
7715
|
+
get status() {
|
|
7716
|
+
return this._status;
|
|
7717
|
+
}
|
|
7718
|
+
get sentAt() {
|
|
7719
|
+
return this._sentAt;
|
|
7720
|
+
}
|
|
7721
|
+
get recipientCount() {
|
|
7722
|
+
return this._recipientCount;
|
|
7723
|
+
}
|
|
7724
|
+
get sentCount() {
|
|
7725
|
+
return this._sentCount ?? 0;
|
|
7726
|
+
}
|
|
7727
|
+
get failedCount() {
|
|
7728
|
+
return this._failedCount ?? 0;
|
|
7729
|
+
}
|
|
7730
|
+
get unsubscribedCount() {
|
|
7731
|
+
return this._unsubscribedCount ?? 0;
|
|
7732
|
+
}
|
|
7733
|
+
rehydrate(data) {
|
|
7734
|
+
super.rehydrate(data);
|
|
7735
|
+
const attributes = data.jsonApi.attributes;
|
|
7736
|
+
this._subject = attributes.subject;
|
|
7737
|
+
this._body = attributes.body;
|
|
7738
|
+
this._replyTo = attributes.replyTo ?? void 0;
|
|
7739
|
+
this._status = attributes.status ?? "draft";
|
|
7740
|
+
this._sentAt = attributes.sentAt ? new Date(attributes.sentAt) : void 0;
|
|
7741
|
+
this._recipientCount = attributes.recipientCount ?? void 0;
|
|
7742
|
+
this._sentCount = attributes.sentCount;
|
|
7743
|
+
this._failedCount = attributes.failedCount;
|
|
7744
|
+
this._unsubscribedCount = attributes.unsubscribedCount;
|
|
7745
|
+
return this;
|
|
7746
|
+
}
|
|
7747
|
+
/**
|
|
7748
|
+
* Only the editable text travels: status, counters and sentAt are set by the API.
|
|
7749
|
+
*/
|
|
7750
|
+
createJsonApi(data) {
|
|
7751
|
+
const response = {
|
|
7752
|
+
data: {
|
|
7753
|
+
type: Modules.EmailBlast.name,
|
|
7754
|
+
id: data.id,
|
|
7755
|
+
attributes: {},
|
|
7756
|
+
meta: {},
|
|
7757
|
+
relationships: {}
|
|
7758
|
+
},
|
|
7759
|
+
included: []
|
|
7760
|
+
};
|
|
7761
|
+
if (data.subject !== void 0) response.data.attributes.subject = data.subject;
|
|
7762
|
+
if (data.body !== void 0) response.data.attributes.body = data.body;
|
|
7763
|
+
if (data.replyTo !== void 0) response.data.attributes.replyTo = data.replyTo;
|
|
7764
|
+
return response;
|
|
7765
|
+
}
|
|
7766
|
+
};
|
|
7767
|
+
|
|
7768
|
+
// src/features/email-blast/EmailBlastModule.ts
|
|
7769
|
+
var EmailBlastModule = /* @__PURE__ */ __name((factory) => factory({
|
|
7770
|
+
moduleId: "8a1f4c2e-6b3d-4e9a-b7c5-2d0e9f1a6b48",
|
|
7771
|
+
pageUrl: "/administration/email-blasts",
|
|
7772
|
+
name: "email-blasts",
|
|
7773
|
+
model: EmailBlast,
|
|
7774
|
+
icon: SendIcon,
|
|
7775
|
+
inclusions: {
|
|
7776
|
+
lists: {
|
|
7777
|
+
fields: [
|
|
7778
|
+
createJsonApiInclusion("email-blasts", [
|
|
7779
|
+
"subject",
|
|
7780
|
+
"status",
|
|
7781
|
+
"sentAt",
|
|
7782
|
+
"recipientCount",
|
|
7783
|
+
"sentCount",
|
|
7784
|
+
"failedCount",
|
|
7785
|
+
"unsubscribedCount"
|
|
7786
|
+
])
|
|
7787
|
+
]
|
|
7788
|
+
}
|
|
7789
|
+
}
|
|
7790
|
+
}), "EmailBlastModule");
|
|
7791
|
+
|
|
7792
|
+
// src/features/email-blast/EmailBlastDeliveryModule.ts
|
|
7793
|
+
import { MailIcon as MailIcon3 } from "lucide-react";
|
|
7794
|
+
|
|
7795
|
+
// src/features/email-blast/data/EmailBlastDelivery.ts
|
|
7796
|
+
var EMAIL_BLAST_UNSUBSCRIBE_TYPE = "email-blast-unsubscribes";
|
|
7797
|
+
var EmailBlastDelivery = class extends AbstractApiData {
|
|
7798
|
+
static {
|
|
7799
|
+
__name(this, "EmailBlastDelivery");
|
|
7800
|
+
}
|
|
7801
|
+
_status = "pending";
|
|
7802
|
+
get status() {
|
|
7803
|
+
return this._status;
|
|
7804
|
+
}
|
|
7805
|
+
rehydrate(data) {
|
|
7806
|
+
super.rehydrate(data);
|
|
7807
|
+
this._status = data.jsonApi.attributes.status ?? "pending";
|
|
7808
|
+
return this;
|
|
7809
|
+
}
|
|
7810
|
+
createJsonApi(_data) {
|
|
7811
|
+
throw new Error("EmailBlastDelivery is created by the API and cannot be created from the client");
|
|
7812
|
+
}
|
|
7813
|
+
/**
|
|
7814
|
+
* Body of POST email-blasts/unsubscribe/:token.
|
|
7815
|
+
*/
|
|
7816
|
+
createUnsubscribeJsonApi() {
|
|
7817
|
+
return {
|
|
7818
|
+
data: {
|
|
7819
|
+
type: EMAIL_BLAST_UNSUBSCRIBE_TYPE
|
|
7820
|
+
}
|
|
7821
|
+
};
|
|
7822
|
+
}
|
|
7823
|
+
};
|
|
7824
|
+
|
|
7825
|
+
// src/features/email-blast/EmailBlastDeliveryModule.ts
|
|
7826
|
+
var EmailBlastDeliveryModule = /* @__PURE__ */ __name((factory) => factory({
|
|
7827
|
+
moduleId: "c47e9b1d-2a5f-4c83-9e60-1b7d4a3f8e25",
|
|
7828
|
+
pageUrl: void 0,
|
|
7829
|
+
name: "email-blast-deliveries",
|
|
7830
|
+
model: EmailBlastDelivery,
|
|
7831
|
+
icon: MailIcon3
|
|
7832
|
+
}), "EmailBlastDeliveryModule");
|
|
7833
|
+
|
|
7834
|
+
// src/features/email-blast/EmailBlastAudienceModule.ts
|
|
7835
|
+
import { UsersIcon as UsersIcon2 } from "lucide-react";
|
|
7836
|
+
|
|
7837
|
+
// src/features/email-blast/data/EmailBlastAudience.ts
|
|
7838
|
+
var EmailBlastAudience = class extends AbstractApiData {
|
|
7839
|
+
static {
|
|
7840
|
+
__name(this, "EmailBlastAudience");
|
|
7841
|
+
}
|
|
7842
|
+
_recipientCount;
|
|
7843
|
+
get recipientCount() {
|
|
7844
|
+
return this._recipientCount ?? 0;
|
|
7845
|
+
}
|
|
7846
|
+
rehydrate(data) {
|
|
7847
|
+
super.rehydrate(data);
|
|
7848
|
+
this._recipientCount = data.jsonApi.attributes.recipientCount;
|
|
7849
|
+
return this;
|
|
7850
|
+
}
|
|
7851
|
+
createJsonApi(_data) {
|
|
7852
|
+
throw new Error("EmailBlastAudience is computed by the API and is read-only");
|
|
7853
|
+
}
|
|
7854
|
+
};
|
|
7855
|
+
|
|
7856
|
+
// src/features/email-blast/EmailBlastAudienceModule.ts
|
|
7857
|
+
var EmailBlastAudienceModule = /* @__PURE__ */ __name((factory) => factory({
|
|
7858
|
+
moduleId: "e2b6d8f0-4c19-4a7e-8d35-6f9a0c2b7e14",
|
|
7859
|
+
pageUrl: void 0,
|
|
7860
|
+
name: "email-blast-audiences",
|
|
7861
|
+
model: EmailBlastAudience,
|
|
7862
|
+
icon: UsersIcon2
|
|
7863
|
+
}), "EmailBlastAudienceModule");
|
|
7864
|
+
|
|
7865
|
+
// src/features/email-blast/data/email-blast.segments.ts
|
|
7866
|
+
var EMAIL_BLAST_SEGMENTS = {
|
|
7867
|
+
audience: "recipient-count",
|
|
7868
|
+
test: "test",
|
|
7869
|
+
send: "send",
|
|
7870
|
+
unsubscribe: "unsubscribe"
|
|
7871
|
+
};
|
|
7872
|
+
|
|
7873
|
+
// src/features/email-blast/data/EmailBlastService.ts
|
|
7874
|
+
var EmailBlastService = class extends AbstractService {
|
|
7875
|
+
static {
|
|
7876
|
+
__name(this, "EmailBlastService");
|
|
7877
|
+
}
|
|
7878
|
+
static async findMany(params = {}) {
|
|
7879
|
+
const endpoint = new EndpointCreator({ endpoint: Modules.EmailBlast });
|
|
7880
|
+
if (Modules.EmailBlast.inclusions?.lists?.fields)
|
|
7881
|
+
endpoint.limitToFields(Modules.EmailBlast.inclusions.lists.fields);
|
|
7882
|
+
if (Modules.EmailBlast.inclusions?.lists?.types) endpoint.limitToType(Modules.EmailBlast.inclusions.lists.types);
|
|
7883
|
+
return this.callApi({
|
|
7884
|
+
type: Modules.EmailBlast,
|
|
7885
|
+
method: "GET" /* GET */,
|
|
7886
|
+
endpoint: endpoint.generate(),
|
|
7887
|
+
next: params.next,
|
|
7888
|
+
previous: params.previous
|
|
7889
|
+
});
|
|
7890
|
+
}
|
|
7891
|
+
static async findOne(params) {
|
|
7892
|
+
return this.callApi({
|
|
7893
|
+
type: Modules.EmailBlast,
|
|
7894
|
+
method: "GET" /* GET */,
|
|
7895
|
+
endpoint: new EndpointCreator({ endpoint: Modules.EmailBlast, id: params.id }).generate()
|
|
7896
|
+
});
|
|
7897
|
+
}
|
|
7898
|
+
static async create(params) {
|
|
7899
|
+
return this.callApi({
|
|
7900
|
+
type: Modules.EmailBlast,
|
|
7901
|
+
method: "POST" /* POST */,
|
|
7902
|
+
endpoint: new EndpointCreator({ endpoint: Modules.EmailBlast }).generate(),
|
|
7903
|
+
input: params
|
|
7904
|
+
});
|
|
7905
|
+
}
|
|
7906
|
+
static async update(params) {
|
|
7907
|
+
return this.callApi({
|
|
7908
|
+
type: Modules.EmailBlast,
|
|
7909
|
+
method: "PATCH" /* PATCH */,
|
|
7910
|
+
endpoint: new EndpointCreator({ endpoint: Modules.EmailBlast, id: params.id }).generate(),
|
|
7911
|
+
input: params
|
|
7912
|
+
});
|
|
7913
|
+
}
|
|
7914
|
+
static async delete(params) {
|
|
7915
|
+
await this.callApi({
|
|
7916
|
+
type: Modules.EmailBlast,
|
|
7917
|
+
method: "DELETE" /* DELETE */,
|
|
7918
|
+
endpoint: new EndpointCreator({ endpoint: Modules.EmailBlast, id: params.id }).generate()
|
|
7919
|
+
});
|
|
7920
|
+
}
|
|
7921
|
+
/**
|
|
7922
|
+
* GET email-blasts/:id/recipient-count: how many people the blast would reach now.
|
|
7923
|
+
*/
|
|
7924
|
+
static async findAudience(params) {
|
|
7925
|
+
return this.callApi({
|
|
7926
|
+
type: Modules.EmailBlastAudience,
|
|
7927
|
+
method: "GET" /* GET */,
|
|
7928
|
+
endpoint: new EndpointCreator({
|
|
7929
|
+
endpoint: Modules.EmailBlast,
|
|
7930
|
+
id: params.id,
|
|
7931
|
+
childEndpoint: EMAIL_BLAST_SEGMENTS.audience
|
|
7932
|
+
}).generate()
|
|
7933
|
+
});
|
|
7934
|
+
}
|
|
7935
|
+
/**
|
|
7936
|
+
* POST email-blasts/:id/test: sends the draft to the calling administrator. Replies 204.
|
|
7937
|
+
*/
|
|
7938
|
+
static async sendTest(params) {
|
|
7939
|
+
await this.callApi({
|
|
7940
|
+
type: Modules.EmailBlast,
|
|
7941
|
+
method: "POST" /* POST */,
|
|
7942
|
+
endpoint: new EndpointCreator({
|
|
7943
|
+
endpoint: Modules.EmailBlast,
|
|
7944
|
+
id: params.id,
|
|
7945
|
+
childEndpoint: EMAIL_BLAST_SEGMENTS.test
|
|
7946
|
+
}).generate()
|
|
7947
|
+
});
|
|
7948
|
+
}
|
|
7949
|
+
/**
|
|
7950
|
+
* POST email-blasts/:id/send: starts the send and returns the blast, now `sending`.
|
|
7951
|
+
*/
|
|
7952
|
+
static async send(params) {
|
|
7953
|
+
return this.callApi({
|
|
7954
|
+
type: Modules.EmailBlast,
|
|
7955
|
+
method: "POST" /* POST */,
|
|
7956
|
+
endpoint: new EndpointCreator({
|
|
7957
|
+
endpoint: Modules.EmailBlast,
|
|
7958
|
+
id: params.id,
|
|
7959
|
+
childEndpoint: EMAIL_BLAST_SEGMENTS.send
|
|
7960
|
+
}).generate()
|
|
7961
|
+
});
|
|
7962
|
+
}
|
|
7963
|
+
};
|
|
7964
|
+
|
|
7965
|
+
// src/features/email-blast/data/EmailBlastDeliveryService.ts
|
|
7966
|
+
var EmailBlastDeliveryService = class extends AbstractService {
|
|
7967
|
+
static {
|
|
7968
|
+
__name(this, "EmailBlastDeliveryService");
|
|
7969
|
+
}
|
|
7970
|
+
/**
|
|
7971
|
+
* POST email-blasts/unsubscribe/:token (public). Replies 204: the token holder
|
|
7972
|
+
* receives nothing back.
|
|
7973
|
+
*/
|
|
7974
|
+
static async unsubscribe(params) {
|
|
7975
|
+
const delivery = new EmailBlastDelivery();
|
|
7976
|
+
await this.callApi({
|
|
7977
|
+
type: Modules.EmailBlastDelivery,
|
|
7978
|
+
method: "POST" /* POST */,
|
|
7979
|
+
endpoint: new EndpointCreator({
|
|
7980
|
+
endpoint: Modules.EmailBlast,
|
|
7981
|
+
id: EMAIL_BLAST_SEGMENTS.unsubscribe,
|
|
7982
|
+
childEndpoint: params.token
|
|
7983
|
+
}).generate(),
|
|
7984
|
+
input: delivery.createUnsubscribeJsonApi(),
|
|
7985
|
+
overridesJsonApiCreation: true
|
|
7986
|
+
});
|
|
7987
|
+
}
|
|
7988
|
+
};
|
|
7989
|
+
|
|
7990
|
+
// src/features/email-blast/data/email-blast.fields.ts
|
|
7991
|
+
var EmailBlastFields = /* @__PURE__ */ ((EmailBlastFields2) => {
|
|
7992
|
+
EmailBlastFields2["subject"] = "subject";
|
|
7993
|
+
EmailBlastFields2["status"] = "status";
|
|
7994
|
+
EmailBlastFields2["sentAt"] = "sentAt";
|
|
7995
|
+
EmailBlastFields2["sent"] = "sent";
|
|
7996
|
+
EmailBlastFields2["failed"] = "failed";
|
|
7997
|
+
EmailBlastFields2["unsubscribed"] = "unsubscribed";
|
|
7998
|
+
return EmailBlastFields2;
|
|
7999
|
+
})(EmailBlastFields || {});
|
|
8000
|
+
|
|
7684
8001
|
// src/features/blog/BlogModules.ts
|
|
7685
8002
|
import { NewspaperIcon } from "lucide-react";
|
|
7686
8003
|
|
|
@@ -10529,13 +10846,13 @@ var AuthorModule = /* @__PURE__ */ __name((factory) => factory({
|
|
|
10529
10846
|
}), "AuthorModule");
|
|
10530
10847
|
|
|
10531
10848
|
// src/features/user/user.module.ts
|
|
10532
|
-
import { UsersIcon as
|
|
10849
|
+
import { UsersIcon as UsersIcon3 } from "lucide-react";
|
|
10533
10850
|
var UserModule = /* @__PURE__ */ __name((factory) => factory({
|
|
10534
10851
|
pageUrl: "/users",
|
|
10535
10852
|
name: "users",
|
|
10536
10853
|
model: User,
|
|
10537
10854
|
moduleId: "04cfc677-0fd2-4f5e-adf4-2483a00c0277",
|
|
10538
|
-
icon:
|
|
10855
|
+
icon: UsersIcon3,
|
|
10539
10856
|
inclusions: {
|
|
10540
10857
|
lists: {
|
|
10541
10858
|
fields: [
|
|
@@ -12537,6 +12854,17 @@ export {
|
|
|
12537
12854
|
EmailAutomationEnrollmentService,
|
|
12538
12855
|
EmailAutomationFields,
|
|
12539
12856
|
EmailAutomationEnrollmentFields,
|
|
12857
|
+
EmailBlast,
|
|
12858
|
+
EmailBlastModule,
|
|
12859
|
+
EMAIL_BLAST_UNSUBSCRIBE_TYPE,
|
|
12860
|
+
EmailBlastDelivery,
|
|
12861
|
+
EmailBlastDeliveryModule,
|
|
12862
|
+
EmailBlastAudience,
|
|
12863
|
+
EmailBlastAudienceModule,
|
|
12864
|
+
EMAIL_BLAST_SEGMENTS,
|
|
12865
|
+
EmailBlastService,
|
|
12866
|
+
EmailBlastDeliveryService,
|
|
12867
|
+
EmailBlastFields,
|
|
12540
12868
|
BlogCategory,
|
|
12541
12869
|
BlogCategoryTranslation,
|
|
12542
12870
|
BlogPost,
|
|
@@ -12663,4 +12991,4 @@ export {
|
|
|
12663
12991
|
AuditLogService,
|
|
12664
12992
|
AuditLogModule
|
|
12665
12993
|
};
|
|
12666
|
-
//# sourceMappingURL=chunk-
|
|
12994
|
+
//# sourceMappingURL=chunk-6HFRXEF5.mjs.map
|