@rovela-ai/sdk 0.20.0 → 0.21.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/admin/api/index.d.ts +2 -0
- package/dist/admin/api/index.d.ts.map +1 -1
- package/dist/admin/api/index.js +2 -0
- package/dist/admin/api/index.js.map +1 -1
- package/dist/admin/api/integrations.d.ts +60 -0
- package/dist/admin/api/integrations.d.ts.map +1 -0
- package/dist/admin/api/integrations.js +337 -0
- package/dist/admin/api/integrations.js.map +1 -0
- package/dist/admin/components/AdminNav.d.ts.map +1 -1
- package/dist/admin/components/AdminNav.js +3 -1
- package/dist/admin/components/AdminNav.js.map +1 -1
- package/dist/admin/components/AdminSelect.d.ts.map +1 -1
- package/dist/admin/components/AdminSelect.js +2 -0
- package/dist/admin/components/AdminSelect.js.map +1 -1
- package/dist/admin/components/DiscountsManager.d.ts.map +1 -1
- package/dist/admin/components/DiscountsManager.js +2 -2
- package/dist/admin/components/DiscountsManager.js.map +1 -1
- package/dist/admin/components/IntegrationsManager.d.ts +5 -0
- package/dist/admin/components/IntegrationsManager.d.ts.map +1 -0
- package/dist/admin/components/IntegrationsManager.js +138 -0
- package/dist/admin/components/IntegrationsManager.js.map +1 -0
- package/dist/admin/components/OrderDetails.d.ts.map +1 -1
- package/dist/admin/components/OrderDetails.js +8 -4
- package/dist/admin/components/OrderDetails.js.map +1 -1
- package/dist/admin/components/ShippingSettings.d.ts.map +1 -1
- package/dist/admin/components/ShippingSettings.js +21 -21
- package/dist/admin/components/ShippingSettings.js.map +1 -1
- package/dist/admin/components/UsersTable.d.ts.map +1 -1
- package/dist/admin/components/UsersTable.js +2 -0
- package/dist/admin/components/UsersTable.js.map +1 -1
- package/dist/admin/components/VariantManager.d.ts.map +1 -1
- package/dist/admin/components/VariantManager.js +8 -2
- package/dist/admin/components/VariantManager.js.map +1 -1
- package/dist/admin/components/index.d.ts +2 -0
- package/dist/admin/components/index.d.ts.map +1 -1
- package/dist/admin/components/index.js +1 -0
- package/dist/admin/components/index.js.map +1 -1
- package/dist/admin/index.d.ts +1 -1
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +2 -0
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/integrations/brevo-logo.d.ts +11 -0
- package/dist/admin/integrations/brevo-logo.d.ts.map +1 -0
- package/dist/admin/integrations/brevo-logo.js +11 -0
- package/dist/admin/integrations/brevo-logo.js.map +1 -0
- package/dist/admin/integrations/registry.d.ts +116 -0
- package/dist/admin/integrations/registry.d.ts.map +1 -0
- package/dist/admin/integrations/registry.js +389 -0
- package/dist/admin/integrations/registry.js.map +1 -0
- package/dist/checkout/components/CheckoutFlow.d.ts.map +1 -1
- package/dist/checkout/components/CheckoutFlow.js +0 -1
- package/dist/checkout/components/CheckoutFlow.js.map +1 -1
- package/dist/core/db/queries.d.ts +25 -25
- package/dist/core/db/queries.d.ts.map +1 -1
- package/dist/core/db/queries.js +5 -0
- package/dist/core/db/queries.js.map +1 -1
- package/dist/core/i18n/messages/en.d.ts.map +1 -1
- package/dist/core/i18n/messages/en.js +123 -0
- package/dist/core/i18n/messages/en.js.map +1 -1
- package/dist/core/i18n/messages/fr.d.ts.map +1 -1
- package/dist/core/i18n/messages/fr.js +123 -0
- package/dist/core/i18n/messages/fr.js.map +1 -1
- package/dist/products/api/products.d.ts +3 -1
- package/dist/products/api/products.d.ts.map +1 -1
- package/dist/products/api/products.js +29 -3
- package/dist/products/api/products.js.map +1 -1
- package/dist/products/components/VariantSelector.d.ts.map +1 -1
- package/dist/products/components/VariantSelector.js +4 -1
- package/dist/products/components/VariantSelector.js.map +1 -1
- package/dist/products/hooks/useProducts.d.ts +3 -1
- package/dist/products/hooks/useProducts.d.ts.map +1 -1
- package/dist/products/hooks/useProducts.js +4 -2
- package/dist/products/hooks/useProducts.js.map +1 -1
- package/docs/changelog/epoch-08-integrations.md +125 -0
- package/package.json +1 -1
- package/templates/store-template/.claude/skills/build-feature/SKILL.md +19 -0
- package/templates/store-template/app/admin/(dashboard)/integrations/page.tsx +17 -0
- package/templates/store-template/app/api/admin/integrations/route.ts +9 -0
- package/templates/store-template/app/faq/page.tsx +42 -56
- package/templates/store-template/app/privacy/page.tsx +65 -105
- package/templates/store-template/app/products/[slug]/ProductDetailClient.tsx +6 -3
- package/templates/store-template/app/products/page.tsx +63 -1
- package/templates/store-template/app/terms/page.tsx +70 -198
- package/templates/store-template/package.json +1 -1
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import type { Metadata } from 'next'
|
|
2
|
-
import { LocaleLink as Link } from '@rovela-ai/sdk/core'
|
|
3
|
-
import {
|
|
2
|
+
import { LocaleLink as Link, getT } from '@rovela-ai/sdk/core'
|
|
3
|
+
import {
|
|
4
|
+
getBlueprint,
|
|
5
|
+
localizedAlternates,
|
|
6
|
+
findSettings,
|
|
7
|
+
getRequestLocale,
|
|
8
|
+
} from '@rovela-ai/sdk/core/server'
|
|
4
9
|
|
|
5
10
|
/**
|
|
6
11
|
* Terms of Service Page
|
|
7
12
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
13
|
+
* Standard e-commerce terms, personalized with the store name. All copy
|
|
14
|
+
* comes from the i18n catalogs (`terms.*` keys) so a French-default store
|
|
15
|
+
* serves French terms — the body was English literals pre-0.21.
|
|
10
16
|
*/
|
|
11
17
|
|
|
12
18
|
// =============================================================================
|
|
@@ -14,6 +20,8 @@ import { getBlueprint, localizedAlternates, findSettings } from '@rovela-ai/sdk/
|
|
|
14
20
|
// =============================================================================
|
|
15
21
|
|
|
16
22
|
export async function generateMetadata(): Promise<Metadata> {
|
|
23
|
+
const { locale } = await getRequestLocale()
|
|
24
|
+
const t = getT(locale)
|
|
17
25
|
let storeName = 'Our Store'
|
|
18
26
|
try {
|
|
19
27
|
const blueprint = getBlueprint()
|
|
@@ -23,8 +31,8 @@ export async function generateMetadata(): Promise<Metadata> {
|
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
return {
|
|
26
|
-
title: '
|
|
27
|
-
description:
|
|
34
|
+
title: t('terms.title'),
|
|
35
|
+
description: t('terms.metaDescription', { storeName }),
|
|
28
36
|
alternates: await localizedAlternates('/terms'),
|
|
29
37
|
}
|
|
30
38
|
}
|
|
@@ -34,6 +42,9 @@ export async function generateMetadata(): Promise<Metadata> {
|
|
|
34
42
|
// =============================================================================
|
|
35
43
|
|
|
36
44
|
export default async function TermsPage() {
|
|
45
|
+
const { locale } = await getRequestLocale()
|
|
46
|
+
const t = getT(locale)
|
|
47
|
+
|
|
37
48
|
// Get store name for display — LIVE settings first (store_settings is what
|
|
38
49
|
// the merchant edits in /admin; blueprint + env are build-time fallbacks
|
|
39
50
|
// that go stale after a rename). Fail-open on DB errors.
|
|
@@ -72,226 +83,87 @@ export default async function TermsPage() {
|
|
|
72
83
|
process.env.SUPPORT_EMAIL?.trim() ||
|
|
73
84
|
(hasOwnDomain ? `support@${storeHost}` : '')
|
|
74
85
|
|
|
86
|
+
const vars = { storeName }
|
|
87
|
+
const sections: Array<{ title: string; body?: string; intro?: string; list?: string[] }> = [
|
|
88
|
+
{ title: t('terms.s1.title'), body: t('terms.s1.body') },
|
|
89
|
+
{
|
|
90
|
+
title: t('terms.s2.title'),
|
|
91
|
+
intro: t('terms.s2.intro'),
|
|
92
|
+
list: [1, 2, 3, 4, 5].map((i) => t(`terms.s2.li${i}`)),
|
|
93
|
+
},
|
|
94
|
+
{ title: t('terms.s3.title'), body: t('terms.s3.body') },
|
|
95
|
+
{
|
|
96
|
+
title: t('terms.s4.title'),
|
|
97
|
+
intro: t('terms.s4.intro'),
|
|
98
|
+
list: [1, 2, 3, 4].map((i) => t(`terms.s4.li${i}`)),
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: t('terms.s5.title'),
|
|
102
|
+
intro: t('terms.s5.intro'),
|
|
103
|
+
list: [1, 2, 3, 4, 5].map((i) => t(`terms.s5.li${i}`)),
|
|
104
|
+
},
|
|
105
|
+
{ title: t('terms.s6.title'), body: t('terms.s6.body') },
|
|
106
|
+
{ title: t('terms.s7.title'), body: t('terms.s7.body') },
|
|
107
|
+
{ title: t('terms.s8.title'), body: t('terms.s8.body', vars) },
|
|
108
|
+
{ title: t('terms.s9.title'), body: t('terms.s9.body', vars) },
|
|
109
|
+
{ title: t('terms.s10.title'), body: t('terms.s10.body') },
|
|
110
|
+
{ title: t('terms.s11.title'), body: t('terms.s11.body', vars) },
|
|
111
|
+
{ title: t('terms.s12.title'), body: t('terms.s12.body') },
|
|
112
|
+
{ title: t('terms.s13.title'), body: t('terms.s13.body') },
|
|
113
|
+
]
|
|
114
|
+
|
|
75
115
|
return (
|
|
76
116
|
<div className="container mx-auto px-4 sm:px-6 lg:px-8 py-16">
|
|
77
117
|
<div className="max-w-3xl mx-auto">
|
|
78
118
|
{/* Header */}
|
|
79
119
|
<div className="mb-12">
|
|
80
|
-
<h1 className="text-3xl font-bold font-heading">
|
|
120
|
+
<h1 className="text-3xl font-bold font-heading">{t('terms.title')}</h1>
|
|
81
121
|
</div>
|
|
82
122
|
|
|
83
123
|
{/* Content */}
|
|
84
124
|
<div className="prose prose-neutral dark:prose-invert max-w-none">
|
|
85
125
|
{/* Introduction */}
|
|
86
126
|
<section className="mb-10">
|
|
87
|
-
<p className="text-muted-foreground leading-relaxed">
|
|
88
|
-
Welcome to {storeName}. By accessing or using our website, you agree to be bound
|
|
89
|
-
by these Terms of Service. Please read them carefully before making any purchases
|
|
90
|
-
or using our services.
|
|
91
|
-
</p>
|
|
92
|
-
</section>
|
|
93
|
-
|
|
94
|
-
{/* Acceptance of Terms */}
|
|
95
|
-
<section className="mb-10">
|
|
96
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
97
|
-
1. Acceptance of Terms
|
|
98
|
-
</h2>
|
|
99
|
-
<p className="text-muted-foreground">
|
|
100
|
-
By accessing and using this website, you accept and agree to be bound by these
|
|
101
|
-
Terms of Service and our Privacy Policy. If you do not agree to these terms,
|
|
102
|
-
please do not use our website or services.
|
|
103
|
-
</p>
|
|
104
|
-
</section>
|
|
105
|
-
|
|
106
|
-
{/* Use of Website */}
|
|
107
|
-
<section className="mb-10">
|
|
108
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
109
|
-
2. Use of Website
|
|
110
|
-
</h2>
|
|
111
|
-
<p className="text-muted-foreground mb-4">
|
|
112
|
-
You agree to use this website only for lawful purposes and in accordance with
|
|
113
|
-
these Terms. You agree not to:
|
|
114
|
-
</p>
|
|
115
|
-
<ul className="list-disc pl-6 space-y-2 text-muted-foreground">
|
|
116
|
-
<li>Use the website in any way that violates applicable laws or regulations</li>
|
|
117
|
-
<li>Attempt to interfere with the proper functioning of the website</li>
|
|
118
|
-
<li>Use automated systems or software to extract data from the website</li>
|
|
119
|
-
<li>Impersonate any person or entity or misrepresent your affiliation</li>
|
|
120
|
-
<li>Transmit any viruses, malware, or other harmful code</li>
|
|
121
|
-
</ul>
|
|
122
|
-
</section>
|
|
123
|
-
|
|
124
|
-
{/* Account Registration */}
|
|
125
|
-
<section className="mb-10">
|
|
126
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
127
|
-
3. Account Registration
|
|
128
|
-
</h2>
|
|
129
|
-
<p className="text-muted-foreground">
|
|
130
|
-
If you create an account with us, you are responsible for maintaining the
|
|
131
|
-
confidentiality of your account credentials and for all activities that occur
|
|
132
|
-
under your account. You must provide accurate and complete information when
|
|
133
|
-
creating an account. You agree to notify us immediately of any unauthorized
|
|
134
|
-
use of your account.
|
|
135
|
-
</p>
|
|
127
|
+
<p className="text-muted-foreground leading-relaxed">{t('terms.intro', vars)}</p>
|
|
136
128
|
</section>
|
|
137
129
|
|
|
138
|
-
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
</section>
|
|
153
|
-
|
|
154
|
-
{/* Orders and Payment */}
|
|
155
|
-
<section className="mb-10">
|
|
156
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
157
|
-
5. Orders and Payment
|
|
158
|
-
</h2>
|
|
159
|
-
<p className="text-muted-foreground mb-4">
|
|
160
|
-
When you place an order:
|
|
161
|
-
</p>
|
|
162
|
-
<ul className="list-disc pl-6 space-y-2 text-muted-foreground">
|
|
163
|
-
<li>You are making an offer to purchase products at the listed price</li>
|
|
164
|
-
<li>We reserve the right to accept or decline any order</li>
|
|
165
|
-
<li>Payment must be made at the time of purchase</li>
|
|
166
|
-
<li>All payments are processed securely through our payment provider</li>
|
|
167
|
-
<li>You are responsible for any applicable taxes and shipping fees</li>
|
|
168
|
-
</ul>
|
|
169
|
-
</section>
|
|
170
|
-
|
|
171
|
-
{/* Shipping and Delivery */}
|
|
172
|
-
<section className="mb-10">
|
|
173
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
174
|
-
6. Shipping and Delivery
|
|
175
|
-
</h2>
|
|
176
|
-
<p className="text-muted-foreground">
|
|
177
|
-
Shipping times and costs are estimates and may vary based on your location and
|
|
178
|
-
the shipping method selected. We are not responsible for delays caused by
|
|
179
|
-
shipping carriers or customs processing. Risk of loss and title for products
|
|
180
|
-
pass to you upon delivery to the carrier.
|
|
181
|
-
</p>
|
|
182
|
-
</section>
|
|
183
|
-
|
|
184
|
-
{/* Returns and Refunds */}
|
|
185
|
-
<section className="mb-10">
|
|
186
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
187
|
-
7. Returns and Refunds
|
|
188
|
-
</h2>
|
|
189
|
-
<p className="text-muted-foreground">
|
|
190
|
-
We want you to be satisfied with your purchase. If you are not happy with your
|
|
191
|
-
order, please contact us within 30 days of delivery. Return eligibility depends
|
|
192
|
-
on the product condition and type. Refunds will be processed to the original
|
|
193
|
-
payment method within 5-10 business days after we receive the returned item.
|
|
194
|
-
</p>
|
|
195
|
-
</section>
|
|
196
|
-
|
|
197
|
-
{/* Intellectual Property */}
|
|
198
|
-
<section className="mb-10">
|
|
199
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
200
|
-
8. Intellectual Property
|
|
201
|
-
</h2>
|
|
202
|
-
<p className="text-muted-foreground">
|
|
203
|
-
All content on this website, including text, graphics, logos, images, and software,
|
|
204
|
-
is the property of {storeName} or its content suppliers and is protected by
|
|
205
|
-
intellectual property laws. You may not use, reproduce, or distribute any content
|
|
206
|
-
without our prior written permission.
|
|
207
|
-
</p>
|
|
208
|
-
</section>
|
|
209
|
-
|
|
210
|
-
{/* Limitation of Liability */}
|
|
211
|
-
<section className="mb-10">
|
|
212
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
213
|
-
9. Limitation of Liability
|
|
214
|
-
</h2>
|
|
215
|
-
<p className="text-muted-foreground">
|
|
216
|
-
To the fullest extent permitted by law, {storeName} shall not be liable for any
|
|
217
|
-
indirect, incidental, special, consequential, or punitive damages arising from
|
|
218
|
-
your use of the website or purchase of products. Our total liability shall not
|
|
219
|
-
exceed the amount you paid for the products in question.
|
|
220
|
-
</p>
|
|
221
|
-
</section>
|
|
222
|
-
|
|
223
|
-
{/* Disclaimer of Warranties */}
|
|
224
|
-
<section className="mb-10">
|
|
225
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
226
|
-
10. Disclaimer of Warranties
|
|
227
|
-
</h2>
|
|
228
|
-
<p className="text-muted-foreground">
|
|
229
|
-
This website and all products are provided "as is" without warranties of any kind,
|
|
230
|
-
either express or implied. We do not warrant that the website will be
|
|
231
|
-
uninterrupted, error-free, or free of viruses or other harmful components.
|
|
232
|
-
</p>
|
|
233
|
-
</section>
|
|
234
|
-
|
|
235
|
-
{/* Indemnification */}
|
|
236
|
-
<section className="mb-10">
|
|
237
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
238
|
-
11. Indemnification
|
|
239
|
-
</h2>
|
|
240
|
-
<p className="text-muted-foreground">
|
|
241
|
-
You agree to indemnify and hold harmless {storeName} and its affiliates, officers,
|
|
242
|
-
directors, employees, and agents from any claims, damages, losses, or expenses
|
|
243
|
-
arising from your use of the website or violation of these Terms.
|
|
244
|
-
</p>
|
|
245
|
-
</section>
|
|
246
|
-
|
|
247
|
-
{/* Governing Law */}
|
|
248
|
-
<section className="mb-10">
|
|
249
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
250
|
-
12. Governing Law
|
|
251
|
-
</h2>
|
|
252
|
-
<p className="text-muted-foreground">
|
|
253
|
-
These Terms of Service shall be governed by and construed in accordance with
|
|
254
|
-
applicable laws, without regard to conflict of law principles. Any disputes
|
|
255
|
-
arising from these terms shall be resolved through binding arbitration or in
|
|
256
|
-
the courts of competent jurisdiction.
|
|
257
|
-
</p>
|
|
258
|
-
</section>
|
|
259
|
-
|
|
260
|
-
{/* Changes to Terms */}
|
|
261
|
-
<section className="mb-10">
|
|
262
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
263
|
-
13. Changes to Terms
|
|
264
|
-
</h2>
|
|
265
|
-
<p className="text-muted-foreground">
|
|
266
|
-
We reserve the right to modify these Terms of Service at any time. Changes will
|
|
267
|
-
be effective immediately upon posting on this page. Your continued use of the
|
|
268
|
-
website after any changes constitutes acceptance of the new terms.
|
|
269
|
-
</p>
|
|
270
|
-
</section>
|
|
130
|
+
{sections.map((s) => (
|
|
131
|
+
<section key={s.title} className="mb-10">
|
|
132
|
+
<h2 className="text-xl font-semibold font-heading mb-4">{s.title}</h2>
|
|
133
|
+
{s.intro && <p className="text-muted-foreground mb-4">{s.intro}</p>}
|
|
134
|
+
{s.body && <p className="text-muted-foreground">{s.body}</p>}
|
|
135
|
+
{s.list && (
|
|
136
|
+
<ul className="list-disc pl-6 space-y-2 text-muted-foreground">
|
|
137
|
+
{s.list.map((item) => (
|
|
138
|
+
<li key={item}>{item}</li>
|
|
139
|
+
))}
|
|
140
|
+
</ul>
|
|
141
|
+
)}
|
|
142
|
+
</section>
|
|
143
|
+
))}
|
|
271
144
|
|
|
272
145
|
{/* Contact Information */}
|
|
273
146
|
<section className="mb-10">
|
|
274
|
-
<h2 className="text-xl font-semibold font-heading mb-4">
|
|
275
|
-
14. Contact Information
|
|
276
|
-
</h2>
|
|
147
|
+
<h2 className="text-xl font-semibold font-heading mb-4">{t('terms.s14.title')}</h2>
|
|
277
148
|
<p className="text-muted-foreground">
|
|
278
|
-
|
|
149
|
+
{t('terms.s14.lead')}
|
|
279
150
|
{supportEmail ? (
|
|
280
151
|
<>
|
|
281
|
-
{' '}
|
|
152
|
+
{' '}
|
|
153
|
+
{t('legal.contactVia.email')}{' '}
|
|
282
154
|
<a
|
|
283
155
|
href={`mailto:${supportEmail}`}
|
|
284
156
|
className="text-primary hover:underline"
|
|
285
157
|
>
|
|
286
158
|
{supportEmail}
|
|
287
159
|
</a>{' '}
|
|
288
|
-
or
|
|
160
|
+
{t('legal.contactVia.or')}{' '}
|
|
289
161
|
</>
|
|
290
162
|
) : (
|
|
291
|
-
<>{'
|
|
163
|
+
<> {t('legal.contactVia.page')} </>
|
|
292
164
|
)}
|
|
293
165
|
<Link href="/contact" className="text-primary hover:underline">
|
|
294
|
-
|
|
166
|
+
{t('legal.contactPageLink')}
|
|
295
167
|
</Link>
|
|
296
168
|
.
|
|
297
169
|
</p>
|
|
@@ -304,7 +176,7 @@ export default async function TermsPage() {
|
|
|
304
176
|
href="/"
|
|
305
177
|
className="text-sm text-primary hover:underline"
|
|
306
178
|
>
|
|
307
|
-
←
|
|
179
|
+
← {t('legal.backToHome')}
|
|
308
180
|
</Link>
|
|
309
181
|
</div>
|
|
310
182
|
</div>
|