@intelligo-dev/core 1.0.0-beta.1
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/LICENSE +201 -0
- package/dist/conversations/errors.d.ts +31 -0
- package/dist/conversations/errors.d.ts.map +1 -0
- package/dist/conversations/errors.js +25 -0
- package/dist/conversations/errors.js.map +1 -0
- package/dist/conversations/index.d.ts +13 -0
- package/dist/conversations/index.d.ts.map +1 -0
- package/dist/conversations/index.js +12 -0
- package/dist/conversations/index.js.map +1 -0
- package/dist/conversations/service.d.ts +132 -0
- package/dist/conversations/service.d.ts.map +1 -0
- package/dist/conversations/service.js +347 -0
- package/dist/conversations/service.js.map +1 -0
- package/dist/conversations/types.d.ts +10 -0
- package/dist/conversations/types.d.ts.map +1 -0
- package/dist/conversations/types.js +5 -0
- package/dist/conversations/types.js.map +1 -0
- package/dist/db/client.d.ts +19 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +52 -0
- package/dist/db/client.js.map +1 -0
- package/dist/db/index.d.ts +4 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +8 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/schema/agents.d.ts +400 -0
- package/dist/db/schema/agents.d.ts.map +1 -0
- package/dist/db/schema/agents.js +39 -0
- package/dist/db/schema/agents.js.map +1 -0
- package/dist/db/schema/ai.d.ts +2222 -0
- package/dist/db/schema/ai.d.ts.map +1 -0
- package/dist/db/schema/ai.js +313 -0
- package/dist/db/schema/ai.js.map +1 -0
- package/dist/db/schema/auth.d.ts +1222 -0
- package/dist/db/schema/auth.d.ts.map +1 -0
- package/dist/db/schema/auth.js +162 -0
- package/dist/db/schema/auth.js.map +1 -0
- package/dist/db/schema/billing.d.ts +1199 -0
- package/dist/db/schema/billing.d.ts.map +1 -0
- package/dist/db/schema/billing.js +150 -0
- package/dist/db/schema/billing.js.map +1 -0
- package/dist/db/schema/feature-flags.d.ts +143 -0
- package/dist/db/schema/feature-flags.d.ts.map +1 -0
- package/dist/db/schema/feature-flags.js +25 -0
- package/dist/db/schema/feature-flags.js.map +1 -0
- package/dist/db/schema/identity.d.ts +1295 -0
- package/dist/db/schema/identity.d.ts.map +1 -0
- package/dist/db/schema/identity.js +258 -0
- package/dist/db/schema/identity.js.map +1 -0
- package/dist/db/schema/index.d.ts +16 -0
- package/dist/db/schema/index.d.ts.map +1 -0
- package/dist/db/schema/index.js +43 -0
- package/dist/db/schema/index.js.map +1 -0
- package/dist/db/schema/notifications.d.ts +182 -0
- package/dist/db/schema/notifications.d.ts.map +1 -0
- package/dist/db/schema/notifications.js +38 -0
- package/dist/db/schema/notifications.js.map +1 -0
- package/dist/db/schema/rag.d.ts +171 -0
- package/dist/db/schema/rag.d.ts.map +1 -0
- package/dist/db/schema/rag.js +42 -0
- package/dist/db/schema/rag.js.map +1 -0
- package/dist/db/schema/usage.d.ts +1193 -0
- package/dist/db/schema/usage.d.ts.map +1 -0
- package/dist/db/schema/usage.js +224 -0
- package/dist/db/schema/usage.js.map +1 -0
- package/dist/db/validate.d.ts +19 -0
- package/dist/db/validate.d.ts.map +1 -0
- package/dist/db/validate.js +58 -0
- package/dist/db/validate.js.map +1 -0
- package/dist/db/workspace-queries.d.ts +75 -0
- package/dist/db/workspace-queries.d.ts.map +1 -0
- package/dist/db/workspace-queries.js +78 -0
- package/dist/db/workspace-queries.js.map +1 -0
- package/dist/documents/classifier.d.ts +31 -0
- package/dist/documents/classifier.d.ts.map +1 -0
- package/dist/documents/classifier.js +41 -0
- package/dist/documents/classifier.js.map +1 -0
- package/dist/documents/errors.d.ts +32 -0
- package/dist/documents/errors.d.ts.map +1 -0
- package/dist/documents/errors.js +27 -0
- package/dist/documents/errors.js.map +1 -0
- package/dist/documents/index.d.ts +14 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js +13 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/service.d.ts +54 -0
- package/dist/documents/service.d.ts.map +1 -0
- package/dist/documents/service.js +146 -0
- package/dist/documents/service.js.map +1 -0
- package/dist/documents/types.d.ts +27 -0
- package/dist/documents/types.d.ts.map +1 -0
- package/dist/documents/types.js +5 -0
- package/dist/documents/types.js.map +1 -0
- package/dist/email/index.d.ts +5 -0
- package/dist/email/index.d.ts.map +1 -0
- package/dist/email/index.js +5 -0
- package/dist/email/index.js.map +1 -0
- package/dist/email/provider.d.ts +68 -0
- package/dist/email/provider.d.ts.map +1 -0
- package/dist/email/provider.js +199 -0
- package/dist/email/provider.js.map +1 -0
- package/dist/email/send.d.ts +47 -0
- package/dist/email/send.d.ts.map +1 -0
- package/dist/email/send.js +110 -0
- package/dist/email/send.js.map +1 -0
- package/dist/email/senders.d.ts +93 -0
- package/dist/email/senders.d.ts.map +1 -0
- package/dist/email/senders.js +232 -0
- package/dist/email/senders.js.map +1 -0
- package/dist/email/templates/base-layout.d.ts +7 -0
- package/dist/email/templates/base-layout.d.ts.map +1 -0
- package/dist/email/templates/base-layout.js +69 -0
- package/dist/email/templates/base-layout.js.map +1 -0
- package/dist/email/templates/index.d.ts +11 -0
- package/dist/email/templates/index.d.ts.map +1 -0
- package/dist/email/templates/index.js +17 -0
- package/dist/email/templates/index.js.map +1 -0
- package/dist/email/templates/password-reset.d.ts +7 -0
- package/dist/email/templates/password-reset.d.ts.map +1 -0
- package/dist/email/templates/password-reset.js +59 -0
- package/dist/email/templates/password-reset.js.map +1 -0
- package/dist/email/templates/payment-failed.d.ts +8 -0
- package/dist/email/templates/payment-failed.d.ts.map +1 -0
- package/dist/email/templates/payment-failed.js +62 -0
- package/dist/email/templates/payment-failed.js.map +1 -0
- package/dist/email/templates/quota-warning.d.ts +11 -0
- package/dist/email/templates/quota-warning.d.ts.map +1 -0
- package/dist/email/templates/quota-warning.js +82 -0
- package/dist/email/templates/quota-warning.js.map +1 -0
- package/dist/email/templates/subscription-confirmed.d.ts +9 -0
- package/dist/email/templates/subscription-confirmed.d.ts.map +1 -0
- package/dist/email/templates/subscription-confirmed.js +72 -0
- package/dist/email/templates/subscription-confirmed.js.map +1 -0
- package/dist/email/templates/trial-expiry.d.ts +9 -0
- package/dist/email/templates/trial-expiry.d.ts.map +1 -0
- package/dist/email/templates/trial-expiry.js +86 -0
- package/dist/email/templates/trial-expiry.js.map +1 -0
- package/dist/email/templates/trial-warning.d.ts +11 -0
- package/dist/email/templates/trial-warning.d.ts.map +1 -0
- package/dist/email/templates/trial-warning.js +70 -0
- package/dist/email/templates/trial-warning.js.map +1 -0
- package/dist/email/templates/verify-email.d.ts +7 -0
- package/dist/email/templates/verify-email.d.ts.map +1 -0
- package/dist/email/templates/verify-email.js +59 -0
- package/dist/email/templates/verify-email.js.map +1 -0
- package/dist/email/templates/welcome.d.ts +7 -0
- package/dist/email/templates/welcome.d.ts.map +1 -0
- package/dist/email/templates/welcome.js +51 -0
- package/dist/email/templates/welcome.js.map +1 -0
- package/dist/email/templates/workspace-invitation.d.ts +10 -0
- package/dist/email/templates/workspace-invitation.d.ts.map +1 -0
- package/dist/email/templates/workspace-invitation.js +79 -0
- package/dist/email/templates/workspace-invitation.js.map +1 -0
- package/dist/env.d.ts +21 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +129 -0
- package/dist/env.js.map +1 -0
- package/dist/identity/audit.d.ts +39 -0
- package/dist/identity/audit.d.ts.map +1 -0
- package/dist/identity/audit.js +51 -0
- package/dist/identity/audit.js.map +1 -0
- package/dist/identity/errors.d.ts +32 -0
- package/dist/identity/errors.d.ts.map +1 -0
- package/dist/identity/errors.js +25 -0
- package/dist/identity/errors.js.map +1 -0
- package/dist/identity/index.d.ts +16 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/index.js +15 -0
- package/dist/identity/index.js.map +1 -0
- package/dist/identity/service.d.ts +70 -0
- package/dist/identity/service.d.ts.map +1 -0
- package/dist/identity/service.js +179 -0
- package/dist/identity/service.js.map +1 -0
- package/dist/identity/types.d.ts +27 -0
- package/dist/identity/types.d.ts.map +1 -0
- package/dist/identity/types.js +5 -0
- package/dist/identity/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +50 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +183 -0
- package/dist/logger.js.map +1 -0
- package/dist/notifications/index.d.ts +86 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +112 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/triggers.d.ts +68 -0
- package/dist/notifications/triggers.d.ts.map +1 -0
- package/dist/notifications/triggers.js +145 -0
- package/dist/notifications/triggers.js.map +1 -0
- package/dist/notifications/types.d.ts +19 -0
- package/dist/notifications/types.d.ts.map +1 -0
- package/dist/notifications/types.js +11 -0
- package/dist/notifications/types.js.map +1 -0
- package/package.json +101 -0
- package/src/db/migrations/0000_sharp_night_nurse.sql +52 -0
- package/src/db/migrations/0001_hesitant_vapor.sql +40 -0
- package/src/db/migrations/0002_numerous_lady_vermin.sql +235 -0
- package/src/db/migrations/0003_mighty_jean_grey.sql +37 -0
- package/src/db/migrations/0004_cynical_grandmaster.sql +2 -0
- package/src/db/migrations/0005_careful_switch.sql +8 -0
- package/src/db/migrations/0006_tense_blue_marvel.sql +16 -0
- package/src/db/migrations/0007_next_squadron_sinister.sql +1 -0
- package/src/db/migrations/0008_powerful_scream.sql +39 -0
- package/src/db/migrations/0009_sad_ink.sql +1 -0
- package/src/db/migrations/0010_shocking_omega_flight.sql +2 -0
- package/src/db/migrations/0011_ambiguous_otto_octavius.sql +151 -0
- package/src/db/migrations/0011_hnsw_vector_index.sql +17 -0
- package/src/db/migrations/0012_user_profiles.sql +30 -0
- package/src/db/migrations/0013_trending_seasonal_columns.sql +9 -0
- package/src/db/migrations/0014_add_product_type_to_agents.sql +6 -0
- package/src/db/migrations/0015_new_v1_tables.sql +149 -0
- package/src/db/migrations/0016_document_types.sql +30 -0
- package/src/db/migrations/0017_document_metadata.sql +2 -0
- package/src/db/migrations/0018_identity_graph.sql +200 -0
- package/src/db/migrations/0019_db_driven_prompts.sql +20 -0
- package/src/db/migrations/0020_pending_extractions.sql +35 -0
- package/src/db/migrations/0021_rag_documents.sql +39 -0
- package/src/db/migrations/0022_user_quotas_usage_jsonb.sql +70 -0
- package/src/db/migrations/0023_user_facts_user_scoped_unique.sql +17 -0
- package/src/db/migrations/0024_user_memories_hnsw.sql +23 -0
- package/src/db/migrations/0025_audit_trigger_errcode.sql +21 -0
- package/src/db/migrations/0026_user_profile_snapshots_composite_pk.sql +17 -0
- package/src/db/migrations/0027_billing_settings_mnt_columns.sql +54 -0
- package/src/db/migrations/0028_trial_credits_normalized_email.sql +37 -0
- package/src/db/migrations/0029_usage_records_conversation_idx.sql +13 -0
- package/src/db/migrations/0030_pending_extractions_composite_idx.sql +11 -0
- package/src/db/migrations/0031_rag_documents_hnsw.sql +16 -0
- package/src/db/migrations/0032_rate_limit_unique_idx.sql +16 -0
- package/src/db/migrations/0033_pending_extractions_partial_idx.sql +18 -0
- package/src/db/migrations/0034_rate_limit_count.sql +9 -0
- package/src/db/migrations/0035_credit_reservations.sql +24 -0
- package/src/db/migrations/0036_executions_audit_jobs.sql +96 -0
- package/src/db/migrations/0037_rate_limit_minute_bucket.sql +46 -0
- package/src/db/migrations/0038_user_quotas_generic_usage.sql +25 -0
- package/src/db/migrations/0039_platform_admin_impersonation.sql +27 -0
- package/src/db/migrations/0040_ee_audit_chain.sql +23 -0
- package/src/db/migrations/README.md +57 -0
- package/src/db/migrations/meta/0000_snapshot.json +348 -0
- package/src/db/migrations/meta/0001_snapshot.json +631 -0
- package/src/db/migrations/meta/0002_snapshot.json +2269 -0
- package/src/db/migrations/meta/0003_snapshot.json +2488 -0
- package/src/db/migrations/meta/0004_snapshot.json +2500 -0
- package/src/db/migrations/meta/0005_snapshot.json +2548 -0
- package/src/db/migrations/meta/0006_snapshot.json +2650 -0
- package/src/db/migrations/meta/0007_snapshot.json +2657 -0
- package/src/db/migrations/meta/0008_snapshot.json +2719 -0
- package/src/db/migrations/meta/0009_snapshot.json +2726 -0
- package/src/db/migrations/meta/0010_snapshot.json +2739 -0
- package/src/db/migrations/meta/0011_snapshot.json +3886 -0
- package/src/db/migrations/meta/_journal.json +300 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text } from "@react-email/components";
|
|
3
|
+
import { BaseLayout } from "./base-layout";
|
|
4
|
+
export function PasswordResetEmail({ userName, resetUrl, locale = "en", }) {
|
|
5
|
+
const text = locale === "mn"
|
|
6
|
+
? {
|
|
7
|
+
preview: "Нууц үг шинэчлэх",
|
|
8
|
+
heading: "Нууц үг шинэчлэх",
|
|
9
|
+
greeting: "Сайн байна уу",
|
|
10
|
+
body: "Бид таны нууц үг шинэчлэх хүсэлтийг хүлээн авлаа. Шинэ нууц үг сонгохын тулд доорх товчийг дарна уу.",
|
|
11
|
+
button: "Нууц үг шинэчлэх",
|
|
12
|
+
note: "Энэхүү холбоос 1 цагийн дараа хүчингүй болно. Хэрэв та нууц үг шинэчлэхийг хүсээгүй бол энэ имэйлийг үл тоомсорлож болно.",
|
|
13
|
+
}
|
|
14
|
+
: {
|
|
15
|
+
preview: "Reset your password",
|
|
16
|
+
heading: "Reset your password",
|
|
17
|
+
greeting: "Hi",
|
|
18
|
+
body: "We received a request to reset your password. Click the button below to choose a new one.",
|
|
19
|
+
button: "Reset Password",
|
|
20
|
+
note: "This link expires in 1 hour. If you didn't request a password reset, you can safely ignore this email.",
|
|
21
|
+
};
|
|
22
|
+
return (_jsxs(BaseLayout, { preview: text.preview, children: [_jsx(Text, { style: headingStyle, children: text.heading }), _jsxs(Text, { style: bodyTextStyle, children: [text.greeting, " ", userName, ","] }), _jsx(Text, { style: bodyTextStyle, children: text.body }), _jsx(Button, { href: resetUrl, style: buttonStyle, children: text.button }), _jsx(Text, { style: noteStyle, children: text.note })] }));
|
|
23
|
+
}
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// Inline Styles
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
const headingStyle = {
|
|
28
|
+
color: "#18181b",
|
|
29
|
+
fontSize: "22px",
|
|
30
|
+
fontWeight: 700,
|
|
31
|
+
lineHeight: "30px",
|
|
32
|
+
margin: "0 0 16px",
|
|
33
|
+
};
|
|
34
|
+
const bodyTextStyle = {
|
|
35
|
+
color: "#18181b",
|
|
36
|
+
fontSize: "15px",
|
|
37
|
+
lineHeight: "24px",
|
|
38
|
+
margin: "0 0 12px",
|
|
39
|
+
};
|
|
40
|
+
const buttonStyle = {
|
|
41
|
+
backgroundColor: "#7c3aed",
|
|
42
|
+
borderRadius: "6px",
|
|
43
|
+
color: "#ffffff",
|
|
44
|
+
display: "inline-block",
|
|
45
|
+
fontSize: "15px",
|
|
46
|
+
fontWeight: 600,
|
|
47
|
+
lineHeight: "100%",
|
|
48
|
+
padding: "12px 24px",
|
|
49
|
+
textDecoration: "none",
|
|
50
|
+
textAlign: "center",
|
|
51
|
+
marginTop: "8px",
|
|
52
|
+
};
|
|
53
|
+
const noteStyle = {
|
|
54
|
+
color: "#71717a",
|
|
55
|
+
fontSize: "13px",
|
|
56
|
+
lineHeight: "20px",
|
|
57
|
+
marginTop: "20px",
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=password-reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password-reset.js","sourceRoot":"","sources":["../../../src/email/templates/password-reset.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,MAAM,UAAU,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,EACR,MAAM,GAAG,IAAI,GACW;IACxB,MAAM,IAAI,GACR,MAAM,KAAK,IAA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;IACvC,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,WAAW;IACpB,cAAc,EAAE,MAAM;IACtB,SAAS,EAAE,QAAiB;IAC5B,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,SAAS,GAAwB;IACrC,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,MAAM;CAClB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface PaymentFailedEmailProps {
|
|
2
|
+
workspaceName: string;
|
|
3
|
+
amount: string;
|
|
4
|
+
updatePaymentUrl: string;
|
|
5
|
+
locale?: "en" | "mn";
|
|
6
|
+
}
|
|
7
|
+
export declare function PaymentFailedEmail({ workspaceName, amount, updatePaymentUrl, locale, }: PaymentFailedEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=payment-failed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-failed.d.ts","sourceRoot":"","sources":["../../../src/email/templates/payment-failed.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,uBAAuB;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,MAAM,EACN,gBAAgB,EAChB,MAAa,GACd,EAAE,uBAAuB,2CAqCzB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text } from "@react-email/components";
|
|
3
|
+
import { BaseLayout } from "./base-layout";
|
|
4
|
+
export function PaymentFailedEmail({ workspaceName, amount, updatePaymentUrl, locale = "en", }) {
|
|
5
|
+
const text = locale === "mn"
|
|
6
|
+
? {
|
|
7
|
+
preview: `${workspaceName}-ийн төлбөр амжилтгүй`,
|
|
8
|
+
heading: "Төлбөр амжилтгүй",
|
|
9
|
+
body1: "Бид таны ажлын орчин",
|
|
10
|
+
body2: "-ийн",
|
|
11
|
+
body3: "төлбөрийг боловсруулж чадсангүй.",
|
|
12
|
+
warning: "Хэрэв төлбөр шинэчлэгдэхгүй бол 3 хоногийн дараа захиалга нь үнэгүй хязгаарт шилжинэ.",
|
|
13
|
+
button: "Төлбөрийн хэрэгсэл шинэчлэх",
|
|
14
|
+
}
|
|
15
|
+
: {
|
|
16
|
+
preview: `Payment failed for ${workspaceName}`,
|
|
17
|
+
heading: "Payment Failed",
|
|
18
|
+
body1: "We were unable to process the payment of",
|
|
19
|
+
body2: "for your workspace",
|
|
20
|
+
body3: "",
|
|
21
|
+
warning: "Your subscription will be restricted to free limits after a 3-day grace period if payment is not updated.",
|
|
22
|
+
button: "Update Payment Method",
|
|
23
|
+
};
|
|
24
|
+
return (_jsxs(BaseLayout, { preview: text.preview, children: [_jsx(Text, { style: headingStyle, children: text.heading }), _jsxs(Text, { style: bodyTextStyle, children: [text.body1, " ", _jsx("strong", { children: amount }), " ", text.body2, " \u2018", workspaceName, "\u2019", text.body3] }), _jsx(Text, { style: warningTextStyle, children: text.warning }), _jsx(Button, { href: updatePaymentUrl, style: buttonStyle, children: text.button })] }));
|
|
25
|
+
}
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// Inline Styles
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
const headingStyle = {
|
|
30
|
+
color: "#18181b",
|
|
31
|
+
fontSize: "22px",
|
|
32
|
+
fontWeight: 700,
|
|
33
|
+
lineHeight: "30px",
|
|
34
|
+
margin: "0 0 16px",
|
|
35
|
+
};
|
|
36
|
+
const bodyTextStyle = {
|
|
37
|
+
color: "#18181b",
|
|
38
|
+
fontSize: "15px",
|
|
39
|
+
lineHeight: "24px",
|
|
40
|
+
margin: "0 0 12px",
|
|
41
|
+
};
|
|
42
|
+
const warningTextStyle = {
|
|
43
|
+
color: "#dc2626",
|
|
44
|
+
fontSize: "15px",
|
|
45
|
+
fontWeight: 600,
|
|
46
|
+
lineHeight: "24px",
|
|
47
|
+
margin: "0 0 12px",
|
|
48
|
+
};
|
|
49
|
+
const buttonStyle = {
|
|
50
|
+
backgroundColor: "#7c3aed",
|
|
51
|
+
borderRadius: "6px",
|
|
52
|
+
color: "#ffffff",
|
|
53
|
+
display: "inline-block",
|
|
54
|
+
fontSize: "15px",
|
|
55
|
+
fontWeight: 600,
|
|
56
|
+
lineHeight: "100%",
|
|
57
|
+
padding: "12px 24px",
|
|
58
|
+
textDecoration: "none",
|
|
59
|
+
textAlign: "center",
|
|
60
|
+
marginTop: "8px",
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=payment-failed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-failed.js","sourceRoot":"","sources":["../../../src/email/templates/payment-failed.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAe3C,MAAM,UAAU,kBAAkB,CAAC,EACjC,aAAa,EACb,MAAM,EACN,gBAAgB,EAChB,MAAM,GAAG,IAAI,GACW;IACxB,MAAM,IAAI,GACR,MAAM,KAAK,IAAI;QACb,CAAC,CAAC;YACE,OAAO,EAAE,GAAG,aAAa,uBAAuB;YAChD,OAAO,EAAE,kBAAkB;YAC3B,KAAK,EAAE,sBAAsB;YAC7B,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,kCAAkC;YACzC,OAAO,EACL,uFAAuF;YACzF,MAAM,EAAE,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C;AAEF,MAAM,WAAW,GAAwB;IACvC,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,WAAW;IACpB,cAAc,EAAE,MAAM;IACtB,SAAS,EAAE,QAAiB;IAC5B,SAAS,EAAE,KAAK;CACjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface QuotaWarningEmailProps {
|
|
2
|
+
workspaceName: string;
|
|
3
|
+
percentageUsed: number;
|
|
4
|
+
tokensUsed: number;
|
|
5
|
+
tokensLimit: number;
|
|
6
|
+
upgradeUrl: string;
|
|
7
|
+
isExceeded: boolean;
|
|
8
|
+
locale?: "en" | "mn";
|
|
9
|
+
}
|
|
10
|
+
export declare function QuotaWarningEmail({ workspaceName, percentageUsed, tokensUsed, tokensLimit, upgradeUrl, isExceeded, locale, }: QuotaWarningEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=quota-warning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quota-warning.d.ts","sourceRoot":"","sources":["../../../src/email/templates/quota-warning.tsx"],"names":[],"mappings":"AAWA,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,MAAa,GACd,EAAE,sBAAsB,2CAqExB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text } from "@react-email/components";
|
|
3
|
+
import { BaseLayout } from "./base-layout";
|
|
4
|
+
export function QuotaWarningEmail({ workspaceName, percentageUsed, tokensUsed, tokensLimit, upgradeUrl, isExceeded, locale = "en", }) {
|
|
5
|
+
const text = locale === "mn"
|
|
6
|
+
? {
|
|
7
|
+
previewExceeded: "Таны токены хязгаар хэтэрсэн байна",
|
|
8
|
+
previewWarning: `Та токены хязгаарынхаа ${percentageUsed}%-ийг ашигласан`,
|
|
9
|
+
headingExceeded: "Хязгаар хэтэрсэн",
|
|
10
|
+
headingWarning: "Хязгаарын сануулга",
|
|
11
|
+
bodyExceeded1: "Таны ажлын орчин",
|
|
12
|
+
bodyExceeded2: "энэ сард бүх",
|
|
13
|
+
bodyExceeded3: "токеныг ашигласан байна.",
|
|
14
|
+
warningText: "AI функцүүд одоогоор хязгаарлагдсан байна. Хязгаар шинэчлэгдэх эсвэл төлөвлөгөө сонгох хүртэл.",
|
|
15
|
+
bodyWarning1: "Таны ажлын орчин",
|
|
16
|
+
bodyWarning2: "нь",
|
|
17
|
+
bodyWarning3: "токены",
|
|
18
|
+
bodyWarning4: "токеныг ашигласан",
|
|
19
|
+
button: "Төлөвлөгөө сонгох",
|
|
20
|
+
note: "Таны хязгаар дараагийн төлбөрийн хугацаа эхлэхэд шинэчлэгдэнэ.",
|
|
21
|
+
}
|
|
22
|
+
: {
|
|
23
|
+
previewExceeded: "Your token quota is exceeded",
|
|
24
|
+
previewWarning: `You've used ${percentageUsed}% of your token quota`,
|
|
25
|
+
headingExceeded: "Quota Exceeded",
|
|
26
|
+
headingWarning: "Quota Warning",
|
|
27
|
+
bodyExceeded1: "Your workspace",
|
|
28
|
+
bodyExceeded2: "has used all",
|
|
29
|
+
bodyExceeded3: "tokens this month.",
|
|
30
|
+
warningText: "AI features are currently restricted until your quota resets or you upgrade.",
|
|
31
|
+
bodyWarning1: "Your workspace",
|
|
32
|
+
bodyWarning2: "has used",
|
|
33
|
+
bodyWarning3: "of",
|
|
34
|
+
bodyWarning4: "tokens",
|
|
35
|
+
button: "Upgrade Plan",
|
|
36
|
+
note: "Your quota resets at the start of your next billing period.",
|
|
37
|
+
};
|
|
38
|
+
return (_jsxs(BaseLayout, { preview: isExceeded ? text.previewExceeded : text.previewWarning, children: [_jsx(Text, { style: headingStyle, children: isExceeded ? text.headingExceeded : text.headingWarning }), isExceeded ? (_jsxs(_Fragment, { children: [_jsxs(Text, { style: bodyTextStyle, children: [text.bodyExceeded1, " \u2018", workspaceName, "\u2019", " ", text.bodyExceeded2, " ", tokensLimit.toLocaleString(), " ", text.bodyExceeded3] }), _jsx(Text, { style: warningTextStyle, children: text.warningText })] })) : (_jsxs(Text, { style: bodyTextStyle, children: [text.bodyWarning1, " \u2018", workspaceName, "\u2019 ", text.bodyWarning2, " ", tokensUsed.toLocaleString(), " ", text.bodyWarning3, " ", tokensLimit.toLocaleString(), " ", text.bodyWarning4, "(", percentageUsed, "%)."] })), _jsx(Button, { href: upgradeUrl, style: buttonStyle, children: text.button }), _jsx(Text, { style: noteStyle, children: text.note })] }));
|
|
39
|
+
}
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
// Inline Styles
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
const headingStyle = {
|
|
44
|
+
color: "#18181b",
|
|
45
|
+
fontSize: "22px",
|
|
46
|
+
fontWeight: 700,
|
|
47
|
+
lineHeight: "30px",
|
|
48
|
+
margin: "0 0 16px",
|
|
49
|
+
};
|
|
50
|
+
const bodyTextStyle = {
|
|
51
|
+
color: "#18181b",
|
|
52
|
+
fontSize: "15px",
|
|
53
|
+
lineHeight: "24px",
|
|
54
|
+
margin: "0 0 12px",
|
|
55
|
+
};
|
|
56
|
+
const warningTextStyle = {
|
|
57
|
+
color: "#dc2626",
|
|
58
|
+
fontSize: "15px",
|
|
59
|
+
fontWeight: 600,
|
|
60
|
+
lineHeight: "24px",
|
|
61
|
+
margin: "0 0 12px",
|
|
62
|
+
};
|
|
63
|
+
const buttonStyle = {
|
|
64
|
+
backgroundColor: "#7c3aed",
|
|
65
|
+
borderRadius: "6px",
|
|
66
|
+
color: "#ffffff",
|
|
67
|
+
display: "inline-block",
|
|
68
|
+
fontSize: "15px",
|
|
69
|
+
fontWeight: 600,
|
|
70
|
+
lineHeight: "100%",
|
|
71
|
+
padding: "12px 24px",
|
|
72
|
+
textDecoration: "none",
|
|
73
|
+
textAlign: "center",
|
|
74
|
+
marginTop: "8px",
|
|
75
|
+
};
|
|
76
|
+
const noteStyle = {
|
|
77
|
+
color: "#71717a",
|
|
78
|
+
fontSize: "13px",
|
|
79
|
+
lineHeight: "20px",
|
|
80
|
+
marginTop: "20px",
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=quota-warning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quota-warning.js","sourceRoot":"","sources":["../../../src/email/templates/quota-warning.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAmB3C,MAAM,UAAU,iBAAiB,CAAC,EAChC,aAAa,EACb,cAAc,EACd,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,MAAM,GAAG,IAAI,GACU;IACvB,MAAM,IAAI,GACR,MAAM,KAAK,IAAI;QACb,CAAC,CAAC;YACE,eAAe,EAAE,oCAAoC;YACrD,cAAc,EAAE,0BAA0B,cAAc,iBAAiB;YACzE,eAAe,EAAE,kBAAkB;YACnC,cAAc,EAAE,oBAAoB;YACpC,aAAa,EAAE,kBAAkB;YACjC,aAAa,EAAE,cAAc;YAC7B,aAAa,EAAE,0BAA0B;YACzC,WAAW,EACT,gGAAgG;YAClG,YAAY,EAAE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ChB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,MAAM;CAClB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SubscriptionConfirmedEmailProps {
|
|
2
|
+
workspaceName: string;
|
|
3
|
+
planName: string;
|
|
4
|
+
amount: string;
|
|
5
|
+
dashboardUrl: string;
|
|
6
|
+
locale?: "en" | "mn";
|
|
7
|
+
}
|
|
8
|
+
export declare function SubscriptionConfirmedEmail({ workspaceName, planName, amount, dashboardUrl, locale, }: SubscriptionConfirmedEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=subscription-confirmed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-confirmed.d.ts","sourceRoot":"","sources":["../../../src/email/templates/subscription-confirmed.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,aAAa,EACb,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,MAAa,GACd,EAAE,+BAA+B,2CA2CjC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text } from "@react-email/components";
|
|
3
|
+
import { BaseLayout } from "./base-layout";
|
|
4
|
+
export function SubscriptionConfirmedEmail({ workspaceName, planName, amount, dashboardUrl, locale = "en", }) {
|
|
5
|
+
const text = locale === "mn"
|
|
6
|
+
? {
|
|
7
|
+
preview: `${workspaceName}-ийн захиалга баталгаажлаа`,
|
|
8
|
+
heading: "Захиалга баталгаажлаа",
|
|
9
|
+
body1: "Таны ажлын орчин",
|
|
10
|
+
body2: "одоо",
|
|
11
|
+
body3: "төлөвлөгөөтэй болсон.",
|
|
12
|
+
amountLabel: "Дүн:",
|
|
13
|
+
perMonth: "/сар",
|
|
14
|
+
button: "Хянах самбар руу очих",
|
|
15
|
+
note: "Захиалгаа төлбөрийн тохиргооноос удирдаж болно.",
|
|
16
|
+
}
|
|
17
|
+
: {
|
|
18
|
+
preview: `Subscription confirmed for ${workspaceName}`,
|
|
19
|
+
heading: "Subscription Confirmed",
|
|
20
|
+
body1: "Your workspace",
|
|
21
|
+
body2: "is now on the",
|
|
22
|
+
body3: "plan.",
|
|
23
|
+
amountLabel: "Amount:",
|
|
24
|
+
perMonth: "/month",
|
|
25
|
+
button: "Go to Dashboard",
|
|
26
|
+
note: "You can manage your subscription from the billing settings.",
|
|
27
|
+
};
|
|
28
|
+
return (_jsxs(BaseLayout, { preview: text.preview, children: [_jsx(Text, { style: headingStyle, children: text.heading }), _jsxs(Text, { style: bodyTextStyle, children: [text.body1, " \u2018", workspaceName, "\u2019 ", text.body2, " ", _jsx("strong", { children: planName }), " ", text.body3] }), _jsxs(Text, { style: detailStyle, children: [text.amountLabel, " ", amount, text.perMonth] }), _jsx(Button, { href: dashboardUrl, style: buttonStyle, children: text.button }), _jsx(Text, { style: noteStyle, children: text.note })] }));
|
|
29
|
+
}
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
// Inline Styles
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
const headingStyle = {
|
|
34
|
+
color: "#18181b",
|
|
35
|
+
fontSize: "22px",
|
|
36
|
+
fontWeight: 700,
|
|
37
|
+
lineHeight: "30px",
|
|
38
|
+
margin: "0 0 16px",
|
|
39
|
+
};
|
|
40
|
+
const bodyTextStyle = {
|
|
41
|
+
color: "#18181b",
|
|
42
|
+
fontSize: "15px",
|
|
43
|
+
lineHeight: "24px",
|
|
44
|
+
margin: "0 0 12px",
|
|
45
|
+
};
|
|
46
|
+
const detailStyle = {
|
|
47
|
+
color: "#18181b",
|
|
48
|
+
fontSize: "15px",
|
|
49
|
+
fontWeight: 600,
|
|
50
|
+
lineHeight: "24px",
|
|
51
|
+
margin: "0 0 16px",
|
|
52
|
+
};
|
|
53
|
+
const buttonStyle = {
|
|
54
|
+
backgroundColor: "#7c3aed",
|
|
55
|
+
borderRadius: "6px",
|
|
56
|
+
color: "#ffffff",
|
|
57
|
+
display: "inline-block",
|
|
58
|
+
fontSize: "15px",
|
|
59
|
+
fontWeight: 600,
|
|
60
|
+
lineHeight: "100%",
|
|
61
|
+
padding: "12px 24px",
|
|
62
|
+
textDecoration: "none",
|
|
63
|
+
textAlign: "center",
|
|
64
|
+
marginTop: "8px",
|
|
65
|
+
};
|
|
66
|
+
const noteStyle = {
|
|
67
|
+
color: "#71717a",
|
|
68
|
+
fontSize: "13px",
|
|
69
|
+
lineHeight: "20px",
|
|
70
|
+
marginTop: "20px",
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=subscription-confirmed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-confirmed.js","sourceRoot":"","sources":["../../../src/email/templates/subscription-confirmed.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAgB3C,MAAM,UAAU,0BAA0B,CAAC,EACzC,aAAa,EACb,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,MAAM,GAAG,IAAI,GACmB;IAChC,MAAM,IAAI,GACR,MAAM,KAAK,IAAI;QACb,CAAC,CAAC;YACE,OAAO,EAAE,GAAG,aAAa,4BAA4B;YACrD,OAAO,EAAE,uBAAuB;YAChC,KAAK,EAAE,kBAAkB;YACzB,KAAK,EAAE,MAAM;YACb,KAAK,EAAE,uBAAuB;YAC9B,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,MAAM;YAChB,MAAM,EAAE,uBAAuB;YAC/B,IA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;CACnB,CAAC;AAEF,MAAM,WAAW,GAAwB;IACvC,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,UAAU;CACnB,CAAC;AAEF,MAAM,WAAW,GAAwB;IACvC,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,WAAW;IACpB,cAAc,EAAE,MAAM;IACtB,SAAS,EAAE,QAAiB;IAC5B,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,SAAS,GAAwB;IACrC,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,MAAM;CAClB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface TrialExpiryEmailProps {
|
|
2
|
+
workspaceName: string;
|
|
3
|
+
expiryDate: string;
|
|
4
|
+
daysRemaining: number;
|
|
5
|
+
upgradeUrl: string;
|
|
6
|
+
locale?: "en" | "mn";
|
|
7
|
+
}
|
|
8
|
+
export declare function TrialExpiryEmail({ workspaceName, expiryDate, daysRemaining, upgradeUrl, locale, }: TrialExpiryEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=trial-expiry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trial-expiry.d.ts","sourceRoot":"","sources":["../../../src/email/templates/trial-expiry.tsx"],"names":[],"mappings":"AAWA,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,aAAa,EACb,UAAU,EACV,aAAa,EACb,UAAU,EACV,MAAa,GACd,EAAE,qBAAqB,2CA4FvB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text } from "@react-email/components";
|
|
3
|
+
import { BaseLayout } from "./base-layout";
|
|
4
|
+
export function TrialExpiryEmail({ workspaceName, expiryDate, daysRemaining, upgradeUrl, locale = "en", }) {
|
|
5
|
+
const isExpired = daysRemaining <= 0;
|
|
6
|
+
const isUrgent = daysRemaining <= 1 && daysRemaining > 0;
|
|
7
|
+
const text = locale === "mn"
|
|
8
|
+
? {
|
|
9
|
+
previewExpired: "Таны Pro туршилт дууссан",
|
|
10
|
+
previewExpiring: `Таны Pro туршилт ${daysRemaining} өдрийн дараа дуусна`,
|
|
11
|
+
headingExpired: "Таны Pro туршилт дууссан",
|
|
12
|
+
headingExpiring: `Таны Pro туршилт ${daysRemaining} өдрийн дараа дуусна`,
|
|
13
|
+
buttonExpired: "Pro болох",
|
|
14
|
+
buttonUpgrade: "Одоо шинэчлэх",
|
|
15
|
+
}
|
|
16
|
+
: {
|
|
17
|
+
previewExpired: "Your Pro trial has expired",
|
|
18
|
+
previewExpiring: `Your Pro trial expires in ${daysRemaining} day${daysRemaining === 1 ? "" : "s"}`,
|
|
19
|
+
headingExpired: "Your Pro Trial Has Expired",
|
|
20
|
+
headingExpiring: `Your Pro Trial Expires in ${daysRemaining} Day${daysRemaining === 1 ? "" : "s"}`,
|
|
21
|
+
buttonExpired: "Upgrade to Pro",
|
|
22
|
+
buttonUpgrade: "Upgrade Now",
|
|
23
|
+
};
|
|
24
|
+
return (_jsxs(BaseLayout, { preview: isExpired ? text.previewExpired : text.previewExpiring, children: [_jsx(Text, { style: headingStyle, children: isExpired ? text.headingExpired : text.headingExpiring }), isExpired ? (_jsxs(_Fragment, { children: [_jsxs(Text, { style: bodyTextStyle, children: ["Your 14-day Pro trial for \u2018", workspaceName, "\u2019 has ended."] }), _jsx(Text, { style: bodyTextStyle, children: "Your workspace has been downgraded to the Free plan. All your data has been preserved and you can continue using Intelligo with the Free plan limits." }), _jsx(Text, { style: warningTextStyle, children: "What you\u2019ll be missing on the Free plan:" }), _jsx(Text, { style: listItemStyle, children: "\u2022 100K tokens/month instead of 2M" }), _jsx(Text, { style: listItemStyle, children: "\u2022 Access to basic models only (GPT-4o mini)" }), _jsx(Text, { style: listItemStyle, children: "\u2022 10 conversations instead of 100" }), _jsx(Text, { style: listItemStyle, children: "\u2022 Single workspace instead of 3" }), _jsx(Text, { style: bodyTextStyle, children: "Upgrade to Pro to restore full access and continue building with AI." })] })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { style: bodyTextStyle, children: ["Your 14-day Pro trial for \u2018", workspaceName, "\u2019 expires on", " ", _jsx("strong", { children: expiryDate }), "."] }), _jsx(Text, { style: bodyTextStyle, children: "When your trial ends, your workspace will be downgraded to the Free plan. All your data will be preserved." }), isUrgent && (_jsx(Text, { style: urgentTextStyle, children: "This is your last chance to upgrade before losing Pro features!" })), _jsx(Text, { style: warningTextStyle, children: "What happens after your trial expires:" }), _jsx(Text, { style: listItemStyle, children: "\u2022 Token quota: 2M \u2192 100K tokens/month" }), _jsx(Text, { style: listItemStyle, children: "\u2022 AI models: All models \u2192 Basic models only" }), _jsx(Text, { style: listItemStyle, children: "\u2022 Conversations: 100 \u2192 10" }), _jsx(Text, { style: listItemStyle, children: "\u2022 Workspaces: 3 \u2192 1" }), _jsx(Text, { style: secondaryTextStyle, children: "No action needed if you\u2019re happy with the Free plan. Your workspace will continue working with Free plan limits." })] })), _jsx(Button, { href: upgradeUrl, style: buttonStyle, children: isExpired ? text.buttonExpired : text.buttonUpgrade })] }));
|
|
25
|
+
}
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// Inline Styles
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
const headingStyle = {
|
|
30
|
+
color: "#18181b",
|
|
31
|
+
fontSize: "22px",
|
|
32
|
+
fontWeight: 700,
|
|
33
|
+
lineHeight: "30px",
|
|
34
|
+
margin: "0 0 16px",
|
|
35
|
+
};
|
|
36
|
+
const bodyTextStyle = {
|
|
37
|
+
color: "#18181b",
|
|
38
|
+
fontSize: "15px",
|
|
39
|
+
lineHeight: "24px",
|
|
40
|
+
margin: "0 0 12px",
|
|
41
|
+
};
|
|
42
|
+
const warningTextStyle = {
|
|
43
|
+
color: "#dc2626",
|
|
44
|
+
fontSize: "15px",
|
|
45
|
+
fontWeight: 600,
|
|
46
|
+
lineHeight: "24px",
|
|
47
|
+
margin: "12px 0 8px",
|
|
48
|
+
};
|
|
49
|
+
const urgentTextStyle = {
|
|
50
|
+
color: "#dc2626",
|
|
51
|
+
fontSize: "16px",
|
|
52
|
+
fontWeight: 700,
|
|
53
|
+
lineHeight: "24px",
|
|
54
|
+
margin: "12px 0",
|
|
55
|
+
padding: "12px",
|
|
56
|
+
backgroundColor: "#fef2f2",
|
|
57
|
+
borderRadius: "6px",
|
|
58
|
+
border: "1px solid #fecaca",
|
|
59
|
+
};
|
|
60
|
+
const listItemStyle = {
|
|
61
|
+
color: "#52525b",
|
|
62
|
+
fontSize: "14px",
|
|
63
|
+
lineHeight: "20px",
|
|
64
|
+
margin: "4px 0 4px 8px",
|
|
65
|
+
};
|
|
66
|
+
const secondaryTextStyle = {
|
|
67
|
+
color: "#71717a",
|
|
68
|
+
fontSize: "14px",
|
|
69
|
+
lineHeight: "20px",
|
|
70
|
+
margin: "12px 0 0",
|
|
71
|
+
fontStyle: "italic",
|
|
72
|
+
};
|
|
73
|
+
const buttonStyle = {
|
|
74
|
+
backgroundColor: "#7c3aed",
|
|
75
|
+
borderRadius: "6px",
|
|
76
|
+
color: "#ffffff",
|
|
77
|
+
display: "inline-block",
|
|
78
|
+
fontSize: "15px",
|
|
79
|
+
fontWeight: 600,
|
|
80
|
+
lineHeight: "100%",
|
|
81
|
+
padding: "12px 24px",
|
|
82
|
+
textDecoration: "none",
|
|
83
|
+
textAlign: "center",
|
|
84
|
+
marginTop: "16px",
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=trial-expiry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trial-expiry.js","sourceRoot":"","sources":["../../../src/email/templates/trial-expiry.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAiB3C,MAAM,UAAU,gBAAgB,CAAC,EAC/B,aAAa,EACb,UAAU,EACV,aAAa,EACb,UAAU,EACV,MAAM,GAAG,IAAI,GACS;IACtB,MAAM,SAAS,GAAG,aAAa,IAAI,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAG,aAAa,IAAI,CAAC,IAAI,aAAa,GAAG,CAAC,CAAC;IAEzD,MAAM,IAAI,GACR,MAAM,KAAK,IAAI;QACb,CAAC,CAAC;YACE,cAAc,EAAE,0BAA0B;YAC1C,eAAe,EAAE,oBAAoB,aAAa,sBAAsB;YACxE,cAAc,EAAE,0BAA0B;YAC1C,eAAe,EAAE,oBAAoB,aAAa,sBAAsB;YACxE,aAAa,EAAE,WAAW;YAC1B,aAAa,EAAE,eAAe;SAC/B;QACH,CAAC,CAAC;YACE,cAAc,EAAE,4BAA4B;YAC5C,eAAe,EAAE,6BAA6B,aAAa,OAAO,aAAa,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE;YAClG,cAAc,EAAE,4BAA4B;YAC5C,eAAe,EAAE,6BAA6B,aAAa,OAAO,aAAa,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE;YAClG,aAAa,EAAE,gBAAg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AAM;IAChB,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,UAAU;IAClB,SAAS,EAAE,QAAQ;CACpB,CAAC;AAEF,MAAM,WAAW,GAAwB;IACvC,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,WAAW;IACpB,cAAc,EAAE,MAAM;IACtB,SAAS,EAAE,QAAiB;IAC5B,SAAS,EAAE,MAAM;CAClB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface TrialWarningEmailProps {
|
|
2
|
+
workspaceName: string;
|
|
3
|
+
creditsRemaining: number;
|
|
4
|
+
totalCredits: number;
|
|
5
|
+
percentageRemaining: number;
|
|
6
|
+
upgradeUrl: string;
|
|
7
|
+
isDepleted: boolean;
|
|
8
|
+
locale?: "en" | "mn";
|
|
9
|
+
}
|
|
10
|
+
export declare function TrialWarningEmail({ workspaceName, creditsRemaining, totalCredits, percentageRemaining, upgradeUrl, isDepleted, locale, }: TrialWarningEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=trial-warning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trial-warning.d.ts","sourceRoot":"","sources":["../../../src/email/templates/trial-warning.tsx"],"names":[],"mappings":"AAWA,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,MAAa,GACd,EAAE,sBAAsB,2CA4DxB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text } from "@react-email/components";
|
|
3
|
+
import { BaseLayout } from "./base-layout";
|
|
4
|
+
export function TrialWarningEmail({ workspaceName, creditsRemaining, totalCredits, percentageRemaining, upgradeUrl, isDepleted, locale = "en", }) {
|
|
5
|
+
const text = locale === "mn"
|
|
6
|
+
? {
|
|
7
|
+
previewDepleted: "Таны туршилтын кредит дууссан",
|
|
8
|
+
previewWarning: "Таны туршилтын кредит дуусч байна",
|
|
9
|
+
headingDepleted: "Туршилтын кредит дууссан",
|
|
10
|
+
headingWarning: "Туршилтын кредит дуусч байна",
|
|
11
|
+
bodyDepleted1: "Таны ажлын орчин",
|
|
12
|
+
bodyDepleted2: "бүх туршилтын кредитийг ашигласан.",
|
|
13
|
+
warningText: "AI функцүүдийг үргэлжлүүлэхийн тулд төлөвлөгөө сонгоно уу.",
|
|
14
|
+
bodyWarning1: "Таны ажлын орчин",
|
|
15
|
+
bodyWarning2: "нь",
|
|
16
|
+
bodyWarning3: "туршилтын кредит үлдсэн",
|
|
17
|
+
button: "Төлөвлөгөө сонгох",
|
|
18
|
+
}
|
|
19
|
+
: {
|
|
20
|
+
previewDepleted: "Your trial credits are depleted",
|
|
21
|
+
previewWarning: "Your trial credits are running low",
|
|
22
|
+
headingDepleted: "Trial Credits Depleted",
|
|
23
|
+
headingWarning: "Trial Credits Running Low",
|
|
24
|
+
bodyDepleted1: "Your workspace",
|
|
25
|
+
bodyDepleted2: "has used all trial credits.",
|
|
26
|
+
warningText: "Subscribe to a plan to continue using AI features.",
|
|
27
|
+
bodyWarning1: "Your workspace",
|
|
28
|
+
bodyWarning2: "has",
|
|
29
|
+
bodyWarning3: "trial credits remaining",
|
|
30
|
+
button: "Subscribe Now",
|
|
31
|
+
};
|
|
32
|
+
return (_jsxs(BaseLayout, { preview: isDepleted ? text.previewDepleted : text.previewWarning, children: [_jsx(Text, { style: headingStyle, children: isDepleted ? text.headingDepleted : text.headingWarning }), isDepleted ? (_jsxs(_Fragment, { children: [_jsxs(Text, { style: bodyTextStyle, children: [text.bodyDepleted1, " \u2018", workspaceName, "\u2019", " ", text.bodyDepleted2] }), _jsx(Text, { style: warningTextStyle, children: text.warningText })] })) : (_jsxs(Text, { style: bodyTextStyle, children: [text.bodyWarning1, " \u2018", workspaceName, "\u2019 ", text.bodyWarning2, " ", creditsRemaining.toLocaleString(), " / ", totalCredits.toLocaleString(), " ", text.bodyWarning3, " (", percentageRemaining, "%)."] })), _jsx(Button, { href: upgradeUrl, style: buttonStyle, children: text.button })] }));
|
|
33
|
+
}
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// Inline Styles
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
const headingStyle = {
|
|
38
|
+
color: "#18181b",
|
|
39
|
+
fontSize: "22px",
|
|
40
|
+
fontWeight: 700,
|
|
41
|
+
lineHeight: "30px",
|
|
42
|
+
margin: "0 0 16px",
|
|
43
|
+
};
|
|
44
|
+
const bodyTextStyle = {
|
|
45
|
+
color: "#18181b",
|
|
46
|
+
fontSize: "15px",
|
|
47
|
+
lineHeight: "24px",
|
|
48
|
+
margin: "0 0 12px",
|
|
49
|
+
};
|
|
50
|
+
const warningTextStyle = {
|
|
51
|
+
color: "#dc2626",
|
|
52
|
+
fontSize: "15px",
|
|
53
|
+
fontWeight: 600,
|
|
54
|
+
lineHeight: "24px",
|
|
55
|
+
margin: "0 0 12px",
|
|
56
|
+
};
|
|
57
|
+
const buttonStyle = {
|
|
58
|
+
backgroundColor: "#7c3aed",
|
|
59
|
+
borderRadius: "6px",
|
|
60
|
+
color: "#ffffff",
|
|
61
|
+
display: "inline-block",
|
|
62
|
+
fontSize: "15px",
|
|
63
|
+
fontWeight: 600,
|
|
64
|
+
lineHeight: "100%",
|
|
65
|
+
padding: "12px 24px",
|
|
66
|
+
textDecoration: "none",
|
|
67
|
+
textAlign: "center",
|
|
68
|
+
marginTop: "8px",
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=trial-warning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trial-warning.js","sourceRoot":"","sources":["../../../src/email/templates/trial-warning.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAmB3C,MAAM,UAAU,iBAAiB,CAAC,EAChC,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,UAAU,EACV,MAAM,GAAG,IAAI,GACU;IACvB,MAAM,IAAI,GACR,MAAM,KAAK,IAAI;QACb,CAAC,CAAC;YACE,eAAe,EAAE,+BAA+B;YAChD,cAAc,EAAE,mCAAmC;YACnD,eAAe,EAAE,0BAA0B;YAC3C,cAAc,EAAE,8BAA8B;YAC9C,aAAa,EAAE,kBAAkB;YACjC,aAAa,EAAE,oCAAoC;YACnD,WAAW,EACT,4DAA4D;YAC9D,YAAY,EAAE,kBAAkB;YAChC,YAAY,EAAE,IAAI;YAClB,YAAY,EAAE,yBAAyB;YACvC,MAAM,EAAE,mBAAmB;SAC5B;QACH,CAAC,CAAC;YACE,eAAe,EAAE,iCAAiC;YAClD,cAAc,EAAE,oCAAoC;YACpD,eAAe,EAAE,wBAAwB;YACzC,cAAc,EAAE,2BAA2B;YAC3C,aAAa,EAAE,gBAAgB;YAC/B,aAAa,EAAE,6BAA6B;YAC5C,WAAW,EAAE,oDAAoD;YACjE,YAAY,EAAE,gBAAgB;YAC9B,YAAY,EAAE,KAAK;YACnB,YAAY,EAAE,yBAAyB;YACvC,MAAM,EAAE,eAAe;SACxB,CAA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B,GAAwB;IAC5C,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,UAAU;CACnB,CAAC;AAEF,MAAM,WAAW,GAAwB;IACvC,eAAe,EAAE,SAAS;IAC1B,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,WAAW;IACpB,cAAc,EAAE,MAAM;IACtB,SAAS,EAAE,QAAiB;IAC5B,SAAS,EAAE,KAAK;CACjB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface VerifyEmailEmailProps {
|
|
2
|
+
userName: string;
|
|
3
|
+
verificationUrl: string;
|
|
4
|
+
locale?: "en" | "mn";
|
|
5
|
+
}
|
|
6
|
+
export declare function VerifyEmailEmail({ userName, verificationUrl, locale, }: VerifyEmailEmailProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=verify-email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-email.d.ts","sourceRoot":"","sources":["../../../src/email/templates/verify-email.tsx"],"names":[],"mappings":"AAWA,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,eAAe,EACf,MAAa,GACd,EAAE,qBAAqB,2CAiCvB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Text } from "@react-email/components";
|
|
3
|
+
import { BaseLayout } from "./base-layout";
|
|
4
|
+
export function VerifyEmailEmail({ userName, verificationUrl, locale = "en", }) {
|
|
5
|
+
const text = locale === "mn"
|
|
6
|
+
? {
|
|
7
|
+
preview: "Имэйл хаягаа баталгаажуулна уу",
|
|
8
|
+
heading: "Имэйл баталгаажуулах",
|
|
9
|
+
greeting: "Сайн байна уу",
|
|
10
|
+
body: "Доорх товчийг дарж имэйл хаягаа баталгаажуулна уу.",
|
|
11
|
+
button: "Имэйл баталгаажуулах",
|
|
12
|
+
note: "Энэхүү холбоос 24 цагийн дараа хүчингүй болно. Хэрэв та данс үүсгээгүй бол энэ имэйлийг үл тоомсорлож болно.",
|
|
13
|
+
}
|
|
14
|
+
: {
|
|
15
|
+
preview: "Verify your email address",
|
|
16
|
+
heading: "Verify your email",
|
|
17
|
+
greeting: "Hi",
|
|
18
|
+
body: "Please verify your email address by clicking the button below.",
|
|
19
|
+
button: "Verify Email",
|
|
20
|
+
note: "This link expires in 24 hours. If you didn't create an account, you can safely ignore this email.",
|
|
21
|
+
};
|
|
22
|
+
return (_jsxs(BaseLayout, { preview: text.preview, children: [_jsx(Text, { style: headingStyle, children: text.heading }), _jsxs(Text, { style: bodyTextStyle, children: [text.greeting, " ", userName, ","] }), _jsx(Text, { style: bodyTextStyle, children: text.body }), _jsx(Button, { href: verificationUrl, style: buttonStyle, children: text.button }), _jsx(Text, { style: noteStyle, children: text.note })] }));
|
|
23
|
+
}
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// Inline Styles
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
const headingStyle = {
|
|
28
|
+
color: "#18181b",
|
|
29
|
+
fontSize: "22px",
|
|
30
|
+
fontWeight: 700,
|
|
31
|
+
lineHeight: "30px",
|
|
32
|
+
margin: "0 0 16px",
|
|
33
|
+
};
|
|
34
|
+
const bodyTextStyle = {
|
|
35
|
+
color: "#18181b",
|
|
36
|
+
fontSize: "15px",
|
|
37
|
+
lineHeight: "24px",
|
|
38
|
+
margin: "0 0 12px",
|
|
39
|
+
};
|
|
40
|
+
const buttonStyle = {
|
|
41
|
+
backgroundColor: "#7c3aed",
|
|
42
|
+
borderRadius: "6px",
|
|
43
|
+
color: "#ffffff",
|
|
44
|
+
display: "inline-block",
|
|
45
|
+
fontSize: "15px",
|
|
46
|
+
fontWeight: 600,
|
|
47
|
+
lineHeight: "100%",
|
|
48
|
+
padding: "12px 24px",
|
|
49
|
+
textDecoration: "none",
|
|
50
|
+
textAlign: "center",
|
|
51
|
+
marginTop: "8px",
|
|
52
|
+
};
|
|
53
|
+
const noteStyle = {
|
|
54
|
+
color: "#71717a",
|
|
55
|
+
fontSize: "13px",
|
|
56
|
+
lineHeight: "20px",
|
|
57
|
+
marginTop: "20px",
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=verify-email.js.map
|