@uptrademedia/site-kit 1.0.3 → 1.0.5
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/README.md +96 -25
- package/dist/SetupWizard-Cki06kB0.d.mts +12 -0
- package/dist/SetupWizard-Cki06kB0.d.ts +12 -0
- package/dist/analytics/index.d.mts +87 -0
- package/dist/analytics/index.d.ts +87 -0
- package/dist/blog/index.d.mts +179 -0
- package/dist/blog/index.d.ts +179 -0
- package/dist/blog/index.js +1131 -17
- package/dist/blog/index.js.map +1 -1
- package/dist/blog/index.mjs +1121 -17
- package/dist/blog/index.mjs.map +1 -1
- package/dist/blog/server.d.mts +228 -0
- package/dist/blog/server.d.ts +228 -0
- package/dist/blog/server.js +685 -0
- package/dist/blog/server.js.map +1 -0
- package/dist/blog/server.mjs +659 -0
- package/dist/blog/server.mjs.map +1 -0
- package/dist/{chunk-6EXHT7PS.mjs → chunk-2IHTEKHU.mjs} +5 -3
- package/dist/chunk-2IHTEKHU.mjs.map +1 -0
- package/dist/{chunk-63JNO4QN.mjs → chunk-DOHML47I.mjs} +2 -2
- package/dist/chunk-DOHML47I.mjs.map +1 -0
- package/dist/{chunk-YKMCG3DS.js → chunk-GAJLEDRD.js} +5 -3
- package/dist/chunk-GAJLEDRD.js.map +1 -0
- package/dist/{chunk-PYYEPAHL.js → chunk-K2HWVOEO.js} +2 -2
- package/dist/chunk-K2HWVOEO.js.map +1 -0
- package/dist/{chunk-JG2K4S2I.js → chunk-O2OHHBUD.js} +9 -9
- package/dist/chunk-O2OHHBUD.js.map +1 -0
- package/dist/chunk-QD66FTXZ.mjs +278 -0
- package/dist/chunk-QD66FTXZ.mjs.map +1 -0
- package/dist/chunk-UJQ73OS6.js +282 -0
- package/dist/chunk-UJQ73OS6.js.map +1 -0
- package/dist/{chunk-P7LGOKGI.mjs → chunk-XQJX252G.mjs} +9 -9
- package/dist/chunk-XQJX252G.mjs.map +1 -0
- package/dist/commerce/index.d.mts +168 -0
- package/dist/commerce/index.d.ts +168 -0
- package/dist/commerce/index.js +38 -38
- package/dist/commerce/index.mjs +1 -1
- package/dist/commerce/server.d.mts +98 -0
- package/dist/commerce/server.d.ts +98 -0
- package/dist/engage/index.d.mts +27 -0
- package/dist/engage/index.d.ts +27 -0
- package/dist/forms/index.d.mts +437 -0
- package/dist/forms/index.d.ts +437 -0
- package/dist/images/index.d.mts +133 -0
- package/dist/images/index.d.ts +133 -0
- package/dist/images/index.js +8 -8
- package/dist/images/index.mjs +1 -1
- package/dist/index.d.mts +650 -0
- package/dist/index.d.ts +650 -0
- package/dist/index.js +108 -95
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/dist/redirects/index.d.mts +72 -0
- package/dist/redirects/index.d.ts +72 -0
- package/dist/reputation/index.d.mts +57 -0
- package/dist/reputation/index.d.ts +57 -0
- package/dist/reputation/index.js +21 -0
- package/dist/reputation/index.js.map +1 -0
- package/dist/reputation/index.mjs +4 -0
- package/dist/reputation/index.mjs.map +1 -0
- package/dist/routing-BWjUF7lp.d.ts +105 -0
- package/dist/routing-CgmRi9tD.d.mts +105 -0
- package/dist/seo/index.d.mts +273 -0
- package/dist/seo/index.d.ts +273 -0
- package/dist/seo/server.d.mts +89 -0
- package/dist/seo/server.d.ts +89 -0
- package/dist/setup/client.d.mts +60 -0
- package/dist/setup/client.d.ts +60 -0
- package/dist/setup/index.d.mts +5 -0
- package/dist/setup/index.d.ts +5 -0
- package/dist/setup/index.js +2 -2
- package/dist/setup/index.mjs +1 -1
- package/dist/setup/server.d.mts +14 -0
- package/dist/setup/server.d.ts +14 -0
- package/dist/setup/server.js +2 -2
- package/dist/setup/server.mjs +1 -1
- package/dist/sitemap/index.d.mts +78 -0
- package/dist/sitemap/index.d.ts +78 -0
- package/dist/types-BN4OwtCO.d.mts +177 -0
- package/dist/types-BN4OwtCO.d.ts +177 -0
- package/dist/types-BmzutFwy.d.mts +227 -0
- package/dist/types-BmzutFwy.d.ts +227 -0
- package/dist/types-C0pJGfbH.d.mts +155 -0
- package/dist/types-C0pJGfbH.d.ts +155 -0
- package/dist/types-DA_Kocle.d.mts +127 -0
- package/dist/types-DA_Kocle.d.ts +127 -0
- package/dist/types-lFLKKn0G.d.mts +163 -0
- package/dist/types-lFLKKn0G.d.ts +163 -0
- package/dist/types-nB206tPK.d.mts +309 -0
- package/dist/types-nB206tPK.d.ts +309 -0
- package/dist/useEventModal-6U1pF3_g.d.mts +209 -0
- package/dist/useEventModal-BA8g-1-P.d.ts +209 -0
- package/package.json +14 -9
- package/dist/chunk-63JNO4QN.mjs.map +0 -1
- package/dist/chunk-6EXHT7PS.mjs.map +0 -1
- package/dist/chunk-JG2K4S2I.js.map +0 -1
- package/dist/chunk-P7LGOKGI.mjs.map +0 -1
- package/dist/chunk-PYYEPAHL.js.map +0 -1
- package/dist/chunk-YKMCG3DS.js.map +0 -1
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Metadata } from 'next';
|
|
2
|
+
|
|
3
|
+
interface UptradeSEOConfig {
|
|
4
|
+
projectId: string;
|
|
5
|
+
supabaseUrl?: string;
|
|
6
|
+
supabaseKey?: string;
|
|
7
|
+
}
|
|
8
|
+
interface SEOPageData {
|
|
9
|
+
id: string;
|
|
10
|
+
project_id: string;
|
|
11
|
+
path: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
managed_title?: string;
|
|
14
|
+
managed_description?: string;
|
|
15
|
+
managed_og_title?: string;
|
|
16
|
+
managed_og_description?: string;
|
|
17
|
+
managed_og_image?: string;
|
|
18
|
+
managed_canonical?: string;
|
|
19
|
+
managed_robots?: string;
|
|
20
|
+
managed_keywords?: string[];
|
|
21
|
+
updated_at: string;
|
|
22
|
+
}
|
|
23
|
+
interface GetManagedMetadataOptions {
|
|
24
|
+
projectId: string;
|
|
25
|
+
path: string;
|
|
26
|
+
fallback?: Metadata;
|
|
27
|
+
/** Override specific fields even if managed values exist */
|
|
28
|
+
overrides?: Partial<Metadata>;
|
|
29
|
+
}
|
|
30
|
+
interface ManagedMetadataResult extends Metadata {
|
|
31
|
+
_managed: boolean;
|
|
32
|
+
_source: 'database' | 'fallback';
|
|
33
|
+
}
|
|
34
|
+
interface SchemaMarkup {
|
|
35
|
+
id: string;
|
|
36
|
+
project_id: string;
|
|
37
|
+
page_id?: string;
|
|
38
|
+
page_path?: string;
|
|
39
|
+
schema_type: string;
|
|
40
|
+
schema_json: Record<string, unknown>;
|
|
41
|
+
is_implemented: boolean;
|
|
42
|
+
validation_status: 'valid' | 'warning' | 'error';
|
|
43
|
+
}
|
|
44
|
+
interface ManagedSchemaProps {
|
|
45
|
+
projectId: string;
|
|
46
|
+
path: string;
|
|
47
|
+
/** Additional schemas to merge */
|
|
48
|
+
additionalSchemas?: Record<string, unknown>[];
|
|
49
|
+
/** Schema types to include (default: all) */
|
|
50
|
+
includeTypes?: string[];
|
|
51
|
+
/** Schema types to exclude */
|
|
52
|
+
excludeTypes?: string[];
|
|
53
|
+
}
|
|
54
|
+
interface FAQItem {
|
|
55
|
+
id: string;
|
|
56
|
+
question: string;
|
|
57
|
+
answer: string;
|
|
58
|
+
order: number;
|
|
59
|
+
is_visible: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface ManagedFAQData {
|
|
62
|
+
id: string;
|
|
63
|
+
project_id: string;
|
|
64
|
+
path: string;
|
|
65
|
+
title?: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
items: FAQItem[];
|
|
68
|
+
include_schema: boolean;
|
|
69
|
+
updated_at: string;
|
|
70
|
+
}
|
|
71
|
+
interface ManagedFAQProps {
|
|
72
|
+
projectId: string;
|
|
73
|
+
path: string;
|
|
74
|
+
/** Custom wrapper className */
|
|
75
|
+
className?: string;
|
|
76
|
+
/** Render FAQ item (custom rendering) */
|
|
77
|
+
renderItem?: (item: FAQItem, index: number) => React.ReactNode;
|
|
78
|
+
/** Include FAQ schema in page */
|
|
79
|
+
includeSchema?: boolean;
|
|
80
|
+
/** Show section title */
|
|
81
|
+
showTitle?: boolean;
|
|
82
|
+
}
|
|
83
|
+
interface ManagedLink {
|
|
84
|
+
id: string;
|
|
85
|
+
project_id: string;
|
|
86
|
+
source_path: string;
|
|
87
|
+
target_path: string;
|
|
88
|
+
target_url?: string;
|
|
89
|
+
anchor_text: string;
|
|
90
|
+
position: 'inline' | 'sidebar' | 'bottom' | 'related';
|
|
91
|
+
context?: string;
|
|
92
|
+
is_active: boolean;
|
|
93
|
+
priority: number;
|
|
94
|
+
}
|
|
95
|
+
interface ManagedInternalLinksProps {
|
|
96
|
+
projectId: string;
|
|
97
|
+
path: string;
|
|
98
|
+
position?: 'inline' | 'sidebar' | 'bottom' | 'related';
|
|
99
|
+
/** Maximum links to show */
|
|
100
|
+
limit?: number;
|
|
101
|
+
className?: string;
|
|
102
|
+
/** Custom link renderer */
|
|
103
|
+
renderLink?: (link: ManagedLink) => React.ReactNode;
|
|
104
|
+
}
|
|
105
|
+
interface ManagedContentBlock {
|
|
106
|
+
id: string;
|
|
107
|
+
project_id: string;
|
|
108
|
+
path: string;
|
|
109
|
+
section: string;
|
|
110
|
+
content_type: 'html' | 'markdown' | 'json' | 'react';
|
|
111
|
+
content: string | Record<string, unknown>;
|
|
112
|
+
is_published: boolean;
|
|
113
|
+
published_at?: string;
|
|
114
|
+
updated_at: string;
|
|
115
|
+
}
|
|
116
|
+
interface ManagedContentProps {
|
|
117
|
+
projectId: string;
|
|
118
|
+
path: string;
|
|
119
|
+
section: string;
|
|
120
|
+
/** Fallback content if none found */
|
|
121
|
+
fallback?: React.ReactNode;
|
|
122
|
+
className?: string;
|
|
123
|
+
/** For 'react' type, map of component names to components */
|
|
124
|
+
components?: Record<string, React.ComponentType<unknown>>;
|
|
125
|
+
}
|
|
126
|
+
interface ABTest {
|
|
127
|
+
id: string;
|
|
128
|
+
project_id: string;
|
|
129
|
+
path: string;
|
|
130
|
+
field: 'title' | 'description' | 'content';
|
|
131
|
+
variant_a: string;
|
|
132
|
+
variant_b: string;
|
|
133
|
+
traffic_split: number;
|
|
134
|
+
status: 'draft' | 'running' | 'paused' | 'completed';
|
|
135
|
+
winner?: 'a' | 'b';
|
|
136
|
+
started_at?: string;
|
|
137
|
+
ended_at?: string;
|
|
138
|
+
}
|
|
139
|
+
interface ABTestResult {
|
|
140
|
+
testId: string;
|
|
141
|
+
variant: 'a' | 'b';
|
|
142
|
+
value: string;
|
|
143
|
+
}
|
|
144
|
+
interface GetABVariantOptions {
|
|
145
|
+
projectId: string;
|
|
146
|
+
path: string;
|
|
147
|
+
field: 'title' | 'description' | 'content';
|
|
148
|
+
/** Session/visitor ID for consistent variant assignment */
|
|
149
|
+
sessionId?: string;
|
|
150
|
+
}
|
|
151
|
+
interface ManagedRedirect {
|
|
152
|
+
id: string;
|
|
153
|
+
project_id: string;
|
|
154
|
+
source_path: string;
|
|
155
|
+
destination_path: string;
|
|
156
|
+
destination_url?: string;
|
|
157
|
+
status_code: 301 | 302 | 307 | 308;
|
|
158
|
+
is_active: boolean;
|
|
159
|
+
is_regex: boolean;
|
|
160
|
+
priority: number;
|
|
161
|
+
expires_at?: string;
|
|
162
|
+
}
|
|
163
|
+
interface GetRedirectOptions {
|
|
164
|
+
projectId: string;
|
|
165
|
+
path: string;
|
|
166
|
+
}
|
|
167
|
+
interface RedirectResult {
|
|
168
|
+
destination: string;
|
|
169
|
+
statusCode: 301 | 302 | 307 | 308;
|
|
170
|
+
isExternal: boolean;
|
|
171
|
+
}
|
|
172
|
+
interface ManagedScript {
|
|
173
|
+
id: string;
|
|
174
|
+
project_id: string;
|
|
175
|
+
name: string;
|
|
176
|
+
script_type: 'inline' | 'external';
|
|
177
|
+
position: 'head' | 'body-start' | 'body-end';
|
|
178
|
+
content?: string;
|
|
179
|
+
src?: string;
|
|
180
|
+
async?: boolean;
|
|
181
|
+
defer?: boolean;
|
|
182
|
+
attributes?: Record<string, string>;
|
|
183
|
+
is_active: boolean;
|
|
184
|
+
load_on?: 'all' | 'specific';
|
|
185
|
+
paths?: string[];
|
|
186
|
+
priority: number;
|
|
187
|
+
}
|
|
188
|
+
interface ManagedScriptsProps {
|
|
189
|
+
projectId: string;
|
|
190
|
+
position: 'head' | 'body-start' | 'body-end';
|
|
191
|
+
/** Current path for path-specific scripts */
|
|
192
|
+
path?: string;
|
|
193
|
+
}
|
|
194
|
+
interface RobotsDirective {
|
|
195
|
+
index: boolean;
|
|
196
|
+
follow: boolean;
|
|
197
|
+
noarchive?: boolean;
|
|
198
|
+
nosnippet?: boolean;
|
|
199
|
+
noimageindex?: boolean;
|
|
200
|
+
max_snippet?: number;
|
|
201
|
+
max_image_preview?: 'none' | 'standard' | 'large';
|
|
202
|
+
max_video_preview?: number;
|
|
203
|
+
}
|
|
204
|
+
interface GetRobotsOptions {
|
|
205
|
+
projectId: string;
|
|
206
|
+
path: string;
|
|
207
|
+
}
|
|
208
|
+
interface SitemapEntry {
|
|
209
|
+
path: string;
|
|
210
|
+
url: string;
|
|
211
|
+
lastmod?: string;
|
|
212
|
+
changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
|
|
213
|
+
priority?: number;
|
|
214
|
+
images?: Array<{
|
|
215
|
+
url: string;
|
|
216
|
+
title?: string;
|
|
217
|
+
caption?: string;
|
|
218
|
+
}>;
|
|
219
|
+
}
|
|
220
|
+
interface GetSitemapEntriesOptions {
|
|
221
|
+
projectId: string;
|
|
222
|
+
baseUrl: string;
|
|
223
|
+
/** Include only published/indexed pages */
|
|
224
|
+
publishedOnly?: boolean;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export type { ABTest as A, FAQItem as F, GetManagedMetadataOptions as G, ManagedMetadataResult as M, RedirectResult as R, SEOPageData as S, UptradeSEOConfig as U, SchemaMarkup as a, ManagedSchemaProps as b, ManagedFAQData as c, ManagedFAQProps as d, ManagedLink as e, ManagedInternalLinksProps as f, ManagedContentBlock as g, ManagedContentProps as h, ABTestResult as i, GetABVariantOptions as j, ManagedRedirect as k, GetRedirectOptions as l, ManagedScript as m, ManagedScriptsProps as n, RobotsDirective as o, GetRobotsOptions as p, SitemapEntry as q, GetSitemapEntriesOptions as r };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Metadata } from 'next';
|
|
2
|
+
|
|
3
|
+
interface UptradeSEOConfig {
|
|
4
|
+
projectId: string;
|
|
5
|
+
supabaseUrl?: string;
|
|
6
|
+
supabaseKey?: string;
|
|
7
|
+
}
|
|
8
|
+
interface SEOPageData {
|
|
9
|
+
id: string;
|
|
10
|
+
project_id: string;
|
|
11
|
+
path: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
managed_title?: string;
|
|
14
|
+
managed_description?: string;
|
|
15
|
+
managed_og_title?: string;
|
|
16
|
+
managed_og_description?: string;
|
|
17
|
+
managed_og_image?: string;
|
|
18
|
+
managed_canonical?: string;
|
|
19
|
+
managed_robots?: string;
|
|
20
|
+
managed_keywords?: string[];
|
|
21
|
+
updated_at: string;
|
|
22
|
+
}
|
|
23
|
+
interface GetManagedMetadataOptions {
|
|
24
|
+
projectId: string;
|
|
25
|
+
path: string;
|
|
26
|
+
fallback?: Metadata;
|
|
27
|
+
/** Override specific fields even if managed values exist */
|
|
28
|
+
overrides?: Partial<Metadata>;
|
|
29
|
+
}
|
|
30
|
+
interface ManagedMetadataResult extends Metadata {
|
|
31
|
+
_managed: boolean;
|
|
32
|
+
_source: 'database' | 'fallback';
|
|
33
|
+
}
|
|
34
|
+
interface SchemaMarkup {
|
|
35
|
+
id: string;
|
|
36
|
+
project_id: string;
|
|
37
|
+
page_id?: string;
|
|
38
|
+
page_path?: string;
|
|
39
|
+
schema_type: string;
|
|
40
|
+
schema_json: Record<string, unknown>;
|
|
41
|
+
is_implemented: boolean;
|
|
42
|
+
validation_status: 'valid' | 'warning' | 'error';
|
|
43
|
+
}
|
|
44
|
+
interface ManagedSchemaProps {
|
|
45
|
+
projectId: string;
|
|
46
|
+
path: string;
|
|
47
|
+
/** Additional schemas to merge */
|
|
48
|
+
additionalSchemas?: Record<string, unknown>[];
|
|
49
|
+
/** Schema types to include (default: all) */
|
|
50
|
+
includeTypes?: string[];
|
|
51
|
+
/** Schema types to exclude */
|
|
52
|
+
excludeTypes?: string[];
|
|
53
|
+
}
|
|
54
|
+
interface FAQItem {
|
|
55
|
+
id: string;
|
|
56
|
+
question: string;
|
|
57
|
+
answer: string;
|
|
58
|
+
order: number;
|
|
59
|
+
is_visible: boolean;
|
|
60
|
+
}
|
|
61
|
+
interface ManagedFAQData {
|
|
62
|
+
id: string;
|
|
63
|
+
project_id: string;
|
|
64
|
+
path: string;
|
|
65
|
+
title?: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
items: FAQItem[];
|
|
68
|
+
include_schema: boolean;
|
|
69
|
+
updated_at: string;
|
|
70
|
+
}
|
|
71
|
+
interface ManagedFAQProps {
|
|
72
|
+
projectId: string;
|
|
73
|
+
path: string;
|
|
74
|
+
/** Custom wrapper className */
|
|
75
|
+
className?: string;
|
|
76
|
+
/** Render FAQ item (custom rendering) */
|
|
77
|
+
renderItem?: (item: FAQItem, index: number) => React.ReactNode;
|
|
78
|
+
/** Include FAQ schema in page */
|
|
79
|
+
includeSchema?: boolean;
|
|
80
|
+
/** Show section title */
|
|
81
|
+
showTitle?: boolean;
|
|
82
|
+
}
|
|
83
|
+
interface ManagedLink {
|
|
84
|
+
id: string;
|
|
85
|
+
project_id: string;
|
|
86
|
+
source_path: string;
|
|
87
|
+
target_path: string;
|
|
88
|
+
target_url?: string;
|
|
89
|
+
anchor_text: string;
|
|
90
|
+
position: 'inline' | 'sidebar' | 'bottom' | 'related';
|
|
91
|
+
context?: string;
|
|
92
|
+
is_active: boolean;
|
|
93
|
+
priority: number;
|
|
94
|
+
}
|
|
95
|
+
interface ManagedInternalLinksProps {
|
|
96
|
+
projectId: string;
|
|
97
|
+
path: string;
|
|
98
|
+
position?: 'inline' | 'sidebar' | 'bottom' | 'related';
|
|
99
|
+
/** Maximum links to show */
|
|
100
|
+
limit?: number;
|
|
101
|
+
className?: string;
|
|
102
|
+
/** Custom link renderer */
|
|
103
|
+
renderLink?: (link: ManagedLink) => React.ReactNode;
|
|
104
|
+
}
|
|
105
|
+
interface ManagedContentBlock {
|
|
106
|
+
id: string;
|
|
107
|
+
project_id: string;
|
|
108
|
+
path: string;
|
|
109
|
+
section: string;
|
|
110
|
+
content_type: 'html' | 'markdown' | 'json' | 'react';
|
|
111
|
+
content: string | Record<string, unknown>;
|
|
112
|
+
is_published: boolean;
|
|
113
|
+
published_at?: string;
|
|
114
|
+
updated_at: string;
|
|
115
|
+
}
|
|
116
|
+
interface ManagedContentProps {
|
|
117
|
+
projectId: string;
|
|
118
|
+
path: string;
|
|
119
|
+
section: string;
|
|
120
|
+
/** Fallback content if none found */
|
|
121
|
+
fallback?: React.ReactNode;
|
|
122
|
+
className?: string;
|
|
123
|
+
/** For 'react' type, map of component names to components */
|
|
124
|
+
components?: Record<string, React.ComponentType<unknown>>;
|
|
125
|
+
}
|
|
126
|
+
interface ABTest {
|
|
127
|
+
id: string;
|
|
128
|
+
project_id: string;
|
|
129
|
+
path: string;
|
|
130
|
+
field: 'title' | 'description' | 'content';
|
|
131
|
+
variant_a: string;
|
|
132
|
+
variant_b: string;
|
|
133
|
+
traffic_split: number;
|
|
134
|
+
status: 'draft' | 'running' | 'paused' | 'completed';
|
|
135
|
+
winner?: 'a' | 'b';
|
|
136
|
+
started_at?: string;
|
|
137
|
+
ended_at?: string;
|
|
138
|
+
}
|
|
139
|
+
interface ABTestResult {
|
|
140
|
+
testId: string;
|
|
141
|
+
variant: 'a' | 'b';
|
|
142
|
+
value: string;
|
|
143
|
+
}
|
|
144
|
+
interface GetABVariantOptions {
|
|
145
|
+
projectId: string;
|
|
146
|
+
path: string;
|
|
147
|
+
field: 'title' | 'description' | 'content';
|
|
148
|
+
/** Session/visitor ID for consistent variant assignment */
|
|
149
|
+
sessionId?: string;
|
|
150
|
+
}
|
|
151
|
+
interface ManagedRedirect {
|
|
152
|
+
id: string;
|
|
153
|
+
project_id: string;
|
|
154
|
+
source_path: string;
|
|
155
|
+
destination_path: string;
|
|
156
|
+
destination_url?: string;
|
|
157
|
+
status_code: 301 | 302 | 307 | 308;
|
|
158
|
+
is_active: boolean;
|
|
159
|
+
is_regex: boolean;
|
|
160
|
+
priority: number;
|
|
161
|
+
expires_at?: string;
|
|
162
|
+
}
|
|
163
|
+
interface GetRedirectOptions {
|
|
164
|
+
projectId: string;
|
|
165
|
+
path: string;
|
|
166
|
+
}
|
|
167
|
+
interface RedirectResult {
|
|
168
|
+
destination: string;
|
|
169
|
+
statusCode: 301 | 302 | 307 | 308;
|
|
170
|
+
isExternal: boolean;
|
|
171
|
+
}
|
|
172
|
+
interface ManagedScript {
|
|
173
|
+
id: string;
|
|
174
|
+
project_id: string;
|
|
175
|
+
name: string;
|
|
176
|
+
script_type: 'inline' | 'external';
|
|
177
|
+
position: 'head' | 'body-start' | 'body-end';
|
|
178
|
+
content?: string;
|
|
179
|
+
src?: string;
|
|
180
|
+
async?: boolean;
|
|
181
|
+
defer?: boolean;
|
|
182
|
+
attributes?: Record<string, string>;
|
|
183
|
+
is_active: boolean;
|
|
184
|
+
load_on?: 'all' | 'specific';
|
|
185
|
+
paths?: string[];
|
|
186
|
+
priority: number;
|
|
187
|
+
}
|
|
188
|
+
interface ManagedScriptsProps {
|
|
189
|
+
projectId: string;
|
|
190
|
+
position: 'head' | 'body-start' | 'body-end';
|
|
191
|
+
/** Current path for path-specific scripts */
|
|
192
|
+
path?: string;
|
|
193
|
+
}
|
|
194
|
+
interface RobotsDirective {
|
|
195
|
+
index: boolean;
|
|
196
|
+
follow: boolean;
|
|
197
|
+
noarchive?: boolean;
|
|
198
|
+
nosnippet?: boolean;
|
|
199
|
+
noimageindex?: boolean;
|
|
200
|
+
max_snippet?: number;
|
|
201
|
+
max_image_preview?: 'none' | 'standard' | 'large';
|
|
202
|
+
max_video_preview?: number;
|
|
203
|
+
}
|
|
204
|
+
interface GetRobotsOptions {
|
|
205
|
+
projectId: string;
|
|
206
|
+
path: string;
|
|
207
|
+
}
|
|
208
|
+
interface SitemapEntry {
|
|
209
|
+
path: string;
|
|
210
|
+
url: string;
|
|
211
|
+
lastmod?: string;
|
|
212
|
+
changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
|
|
213
|
+
priority?: number;
|
|
214
|
+
images?: Array<{
|
|
215
|
+
url: string;
|
|
216
|
+
title?: string;
|
|
217
|
+
caption?: string;
|
|
218
|
+
}>;
|
|
219
|
+
}
|
|
220
|
+
interface GetSitemapEntriesOptions {
|
|
221
|
+
projectId: string;
|
|
222
|
+
baseUrl: string;
|
|
223
|
+
/** Include only published/indexed pages */
|
|
224
|
+
publishedOnly?: boolean;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export type { ABTest as A, FAQItem as F, GetManagedMetadataOptions as G, ManagedMetadataResult as M, RedirectResult as R, SEOPageData as S, UptradeSEOConfig as U, SchemaMarkup as a, ManagedSchemaProps as b, ManagedFAQData as c, ManagedFAQProps as d, ManagedLink as e, ManagedInternalLinksProps as f, ManagedContentBlock as g, ManagedContentProps as h, ABTestResult as i, GetABVariantOptions as j, ManagedRedirect as k, GetRedirectOptions as l, ManagedScript as m, ManagedScriptsProps as n, RobotsDirective as o, GetRobotsOptions as p, SitemapEntry as q, GetSitemapEntriesOptions as r };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @uptrade/site-kit/engage - Type definitions
|
|
3
|
+
*/
|
|
4
|
+
type WidgetType = 'popup' | 'nudge' | 'bar' | 'chat';
|
|
5
|
+
interface EngageElement {
|
|
6
|
+
id: string;
|
|
7
|
+
project_id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
type: WidgetType;
|
|
10
|
+
config: WidgetConfig;
|
|
11
|
+
targeting: TargetingRules;
|
|
12
|
+
trigger: TriggerConfig;
|
|
13
|
+
is_active: boolean;
|
|
14
|
+
priority: number;
|
|
15
|
+
created_at: string;
|
|
16
|
+
updated_at: string;
|
|
17
|
+
}
|
|
18
|
+
interface WidgetConfig {
|
|
19
|
+
/** Visual style */
|
|
20
|
+
theme?: 'light' | 'dark' | 'custom';
|
|
21
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
22
|
+
/** Content */
|
|
23
|
+
title?: string;
|
|
24
|
+
message?: string;
|
|
25
|
+
imageUrl?: string;
|
|
26
|
+
/** CTA */
|
|
27
|
+
ctaText?: string;
|
|
28
|
+
ctaUrl?: string;
|
|
29
|
+
ctaAction?: 'link' | 'close' | 'form' | 'chat';
|
|
30
|
+
/** Form (if ctaAction is 'form') */
|
|
31
|
+
formId?: string;
|
|
32
|
+
/** Styling */
|
|
33
|
+
backgroundColor?: string;
|
|
34
|
+
textColor?: string;
|
|
35
|
+
ctaBackgroundColor?: string;
|
|
36
|
+
ctaTextColor?: string;
|
|
37
|
+
borderRadius?: number;
|
|
38
|
+
/** Behavior */
|
|
39
|
+
closable?: boolean;
|
|
40
|
+
showOverlay?: boolean;
|
|
41
|
+
overlayOpacity?: number;
|
|
42
|
+
}
|
|
43
|
+
interface TargetingRules {
|
|
44
|
+
/** Page targeting */
|
|
45
|
+
pages?: {
|
|
46
|
+
include?: string[];
|
|
47
|
+
exclude?: string[];
|
|
48
|
+
};
|
|
49
|
+
/** Device targeting */
|
|
50
|
+
devices?: ('desktop' | 'mobile' | 'tablet')[];
|
|
51
|
+
/** Visitor targeting */
|
|
52
|
+
visitor?: {
|
|
53
|
+
type?: 'new' | 'returning' | 'all';
|
|
54
|
+
minSessions?: number;
|
|
55
|
+
maxSessions?: number;
|
|
56
|
+
};
|
|
57
|
+
/** Source targeting */
|
|
58
|
+
source?: {
|
|
59
|
+
utm_source?: string[];
|
|
60
|
+
utm_medium?: string[];
|
|
61
|
+
utm_campaign?: string[];
|
|
62
|
+
referrer?: string[];
|
|
63
|
+
};
|
|
64
|
+
/** Time targeting */
|
|
65
|
+
schedule?: {
|
|
66
|
+
startDate?: string;
|
|
67
|
+
endDate?: string;
|
|
68
|
+
daysOfWeek?: number[];
|
|
69
|
+
startTime?: string;
|
|
70
|
+
endTime?: string;
|
|
71
|
+
timezone?: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
interface TriggerConfig {
|
|
75
|
+
type: 'immediate' | 'delay' | 'scroll' | 'exit-intent' | 'click' | 'custom';
|
|
76
|
+
/** Delay in seconds (for 'delay' type) */
|
|
77
|
+
delay?: number;
|
|
78
|
+
/** Scroll percentage (for 'scroll' type) */
|
|
79
|
+
scrollPercentage?: number;
|
|
80
|
+
/** CSS selector (for 'click' type) */
|
|
81
|
+
clickSelector?: string;
|
|
82
|
+
/** Custom event name (for 'custom' type) */
|
|
83
|
+
customEvent?: string;
|
|
84
|
+
/** Frequency capping */
|
|
85
|
+
frequency?: {
|
|
86
|
+
type: 'always' | 'once' | 'once-per-session' | 'every-n-days';
|
|
87
|
+
days?: number;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
interface ChatConfig {
|
|
91
|
+
/** Widget position */
|
|
92
|
+
position: 'bottom-right' | 'bottom-left';
|
|
93
|
+
/** Widget appearance */
|
|
94
|
+
buttonIcon?: 'chat' | 'help' | 'custom';
|
|
95
|
+
buttonColor?: string;
|
|
96
|
+
buttonText?: string;
|
|
97
|
+
/** Welcome message */
|
|
98
|
+
welcomeMessage?: string;
|
|
99
|
+
/** Operating hours */
|
|
100
|
+
operatingHours?: {
|
|
101
|
+
enabled: boolean;
|
|
102
|
+
timezone: string;
|
|
103
|
+
hours: {
|
|
104
|
+
[day: number]: {
|
|
105
|
+
start: string;
|
|
106
|
+
end: string;
|
|
107
|
+
} | null;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/** AI vs Live Chat */
|
|
111
|
+
mode: 'ai' | 'live' | 'hybrid';
|
|
112
|
+
/** AI settings (if mode is 'ai' or 'hybrid') */
|
|
113
|
+
aiSettings?: {
|
|
114
|
+
skillId?: string;
|
|
115
|
+
handoffToLive?: boolean;
|
|
116
|
+
handoffKeywords?: string[];
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
interface ChatMessage {
|
|
120
|
+
id: string;
|
|
121
|
+
conversation_id: string;
|
|
122
|
+
role: 'user' | 'assistant' | 'agent' | 'system';
|
|
123
|
+
content: string;
|
|
124
|
+
metadata?: Record<string, unknown>;
|
|
125
|
+
created_at: string;
|
|
126
|
+
}
|
|
127
|
+
interface ChatConversation {
|
|
128
|
+
id: string;
|
|
129
|
+
project_id: string;
|
|
130
|
+
visitor_id: string;
|
|
131
|
+
status: 'active' | 'pending' | 'resolved' | 'closed';
|
|
132
|
+
assigned_to?: string;
|
|
133
|
+
last_message_at: string;
|
|
134
|
+
created_at: string;
|
|
135
|
+
}
|
|
136
|
+
interface EngageConfig {
|
|
137
|
+
projectId: string;
|
|
138
|
+
/** Widget position */
|
|
139
|
+
position?: 'bottom-right' | 'bottom-left';
|
|
140
|
+
/** Z-index for widgets */
|
|
141
|
+
zIndex?: number;
|
|
142
|
+
/** Enable chat */
|
|
143
|
+
chatEnabled?: boolean;
|
|
144
|
+
/** Debug mode */
|
|
145
|
+
debug?: boolean;
|
|
146
|
+
}
|
|
147
|
+
interface EngageAnalytics {
|
|
148
|
+
element_id: string;
|
|
149
|
+
event_type: 'impression' | 'click' | 'close' | 'submit' | 'dismiss';
|
|
150
|
+
session_id: string;
|
|
151
|
+
metadata?: Record<string, unknown>;
|
|
152
|
+
created_at: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type { ChatConfig as C, EngageElement as E, TargetingRules as T, WidgetType as W, WidgetConfig as a, TriggerConfig as b, ChatMessage as c, ChatConversation as d, EngageConfig as e, EngageAnalytics as f };
|