@cmssy/react 2.3.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.cts +3 -3
- package/dist/client.d.ts +3 -3
- package/dist/commerce-queries-CfjwkgfE.d.cts +223 -0
- package/dist/commerce-queries-CfjwkgfE.d.ts +223 -0
- package/dist/index.d.cts +140 -11
- package/dist/index.d.ts +140 -11
- package/package.json +2 -2
- package/dist/commerce-queries-CQgJBHMK.d.cts +0 -557
- package/dist/commerce-queries-CQgJBHMK.d.ts +0 -557
|
@@ -1,557 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { FieldConditionGroup, FieldType } from '@cmssy/types';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The cmssy cloud GraphQL delivery endpoint. It is the same for every workspace,
|
|
6
|
-
* so consumers never need to set it - `apiUrl` defaults to this. Self-hosted /
|
|
7
|
-
* staging deployments override it via config.
|
|
8
|
-
*/
|
|
9
|
-
declare const DEFAULT_CMSSY_API_URL = "https://api.cmssy.io/graphql";
|
|
10
|
-
declare function resolveApiUrl(apiUrl: string | undefined): string;
|
|
11
|
-
/**
|
|
12
|
-
* Public delivery endpoint for a workspace: the org-scoped path
|
|
13
|
-
* `{base}/public/{orgSlug}/{workspaceSlug}/graphql`. `apiUrl` is the GraphQL
|
|
14
|
-
* base (its trailing `/graphql` is stripped); the org path is what tells the
|
|
15
|
-
* backend which workspace to serve, so slugs only need to be unique per org.
|
|
16
|
-
*/
|
|
17
|
-
declare function resolvePublicUrl(config: CmssyClientConfig): string;
|
|
18
|
-
interface CmssyClientConfig {
|
|
19
|
-
/**
|
|
20
|
-
* Full GraphQL endpoint (used as-is for authenticated requests). Defaults to
|
|
21
|
-
* {@link DEFAULT_CMSSY_API_URL}. Public reads strip its trailing `/graphql`
|
|
22
|
-
* and append the org-scoped path (see {@link resolvePublicUrl}).
|
|
23
|
-
*/
|
|
24
|
-
apiUrl?: string;
|
|
25
|
-
/** Organization slug - part of the org-scoped delivery path. */
|
|
26
|
-
org: string;
|
|
27
|
-
workspaceSlug: string;
|
|
28
|
-
}
|
|
29
|
-
interface FetchLikeResponse {
|
|
30
|
-
ok: boolean;
|
|
31
|
-
status: number;
|
|
32
|
-
json: () => Promise<unknown>;
|
|
33
|
-
}
|
|
34
|
-
type FetchLike = (url: string, init: {
|
|
35
|
-
method: string;
|
|
36
|
-
headers: Record<string, string>;
|
|
37
|
-
body: string;
|
|
38
|
-
signal?: AbortSignal;
|
|
39
|
-
}) => Promise<FetchLikeResponse>;
|
|
40
|
-
interface FetchPageOptions {
|
|
41
|
-
previewSecret?: string;
|
|
42
|
-
devPreview?: boolean;
|
|
43
|
-
devToken?: string;
|
|
44
|
-
workspaceId?: string;
|
|
45
|
-
fetch?: FetchLike;
|
|
46
|
-
signal?: AbortSignal;
|
|
47
|
-
}
|
|
48
|
-
interface RawBlock {
|
|
49
|
-
id: string;
|
|
50
|
-
type: string;
|
|
51
|
-
content: unknown;
|
|
52
|
-
style?: unknown;
|
|
53
|
-
advanced?: unknown;
|
|
54
|
-
}
|
|
55
|
-
interface CmssyPageData {
|
|
56
|
-
id: string;
|
|
57
|
-
blocks: RawBlock[];
|
|
58
|
-
}
|
|
59
|
-
interface RawLayoutBlock {
|
|
60
|
-
id: string;
|
|
61
|
-
type: string;
|
|
62
|
-
content: unknown;
|
|
63
|
-
style?: unknown;
|
|
64
|
-
advanced?: unknown;
|
|
65
|
-
order: number;
|
|
66
|
-
isActive: boolean;
|
|
67
|
-
}
|
|
68
|
-
interface CmssyLayoutSettings {
|
|
69
|
-
desktopWidth: number | null;
|
|
70
|
-
mobileBehavior: string;
|
|
71
|
-
}
|
|
72
|
-
interface CmssyLayoutGroup {
|
|
73
|
-
position: string;
|
|
74
|
-
blocks: RawLayoutBlock[];
|
|
75
|
-
settings?: CmssyLayoutSettings | null;
|
|
76
|
-
}
|
|
77
|
-
declare function normalizeSlug(path: string | string[] | undefined): string;
|
|
78
|
-
declare function fetchPage(config: CmssyClientConfig, path: string | string[] | undefined, options?: FetchPageOptions): Promise<CmssyPageData | null>;
|
|
79
|
-
declare function fetchPageById(config: CmssyClientConfig, pageId: string, options?: Pick<FetchPageOptions, "fetch" | "signal">): Promise<CmssyPageData | null>;
|
|
80
|
-
interface CmssyPageSummary {
|
|
81
|
-
id: string;
|
|
82
|
-
slug: string;
|
|
83
|
-
updatedAt: string | null;
|
|
84
|
-
publishedAt: string | null;
|
|
85
|
-
}
|
|
86
|
-
declare function fetchPages(config: CmssyClientConfig, options?: Pick<FetchPageOptions, "fetch" | "signal">): Promise<CmssyPageSummary[]>;
|
|
87
|
-
type CmssyLocalizedValue = Record<string, string> | string | null;
|
|
88
|
-
interface CmssyPageMeta {
|
|
89
|
-
id: string;
|
|
90
|
-
seoTitle: CmssyLocalizedValue;
|
|
91
|
-
seoDescription: CmssyLocalizedValue;
|
|
92
|
-
seoKeywords: string[] | null;
|
|
93
|
-
displayName: CmssyLocalizedValue;
|
|
94
|
-
}
|
|
95
|
-
declare function fetchPageMeta(config: CmssyClientConfig, path: string | string[] | undefined, options?: Pick<FetchPageOptions, "fetch" | "signal">): Promise<CmssyPageMeta | null>;
|
|
96
|
-
declare function fetchLayouts(config: CmssyClientConfig, path: string | string[] | undefined, options?: FetchPageOptions): Promise<CmssyLayoutGroup[]>;
|
|
97
|
-
|
|
98
|
-
interface CmssyBranding {
|
|
99
|
-
brandName: string | null;
|
|
100
|
-
logoUrl: string | null;
|
|
101
|
-
faviconUrl: string | null;
|
|
102
|
-
ogImageUrl: string | null;
|
|
103
|
-
}
|
|
104
|
-
interface CmssySiteConfig {
|
|
105
|
-
id: string;
|
|
106
|
-
workspaceId: string;
|
|
107
|
-
siteName: unknown;
|
|
108
|
-
defaultLanguage: string | null;
|
|
109
|
-
enabledLanguages: string[];
|
|
110
|
-
enabledFeatures: string[];
|
|
111
|
-
notFoundPageId: string | null;
|
|
112
|
-
previewUrl: string | null;
|
|
113
|
-
branding: CmssyBranding | null;
|
|
114
|
-
}
|
|
115
|
-
declare const SITE_CONFIG_QUERY = "query PublicSiteConfig($workspaceSlug: String!) {\n public {\n siteConfig(workspaceSlug: $workspaceSlug) {\n id\n workspaceId\n siteName\n defaultLanguage\n enabledLanguages\n enabledFeatures\n notFoundPageId\n previewUrl\n branding {\n brandName\n logoUrl\n faviconUrl\n ogImageUrl\n }\n }\n }\n}";
|
|
116
|
-
interface CmssyModelDefinition {
|
|
117
|
-
id: string;
|
|
118
|
-
name: string;
|
|
119
|
-
slug: string;
|
|
120
|
-
description: string | null;
|
|
121
|
-
icon: string | null;
|
|
122
|
-
color: string | null;
|
|
123
|
-
displayField: string | null;
|
|
124
|
-
recordCount: number | null;
|
|
125
|
-
}
|
|
126
|
-
interface CmssyModelRecord {
|
|
127
|
-
id: string;
|
|
128
|
-
modelId: string;
|
|
129
|
-
data: Record<string, unknown>;
|
|
130
|
-
status: string | null;
|
|
131
|
-
createdAt: string | null;
|
|
132
|
-
updatedAt: string | null;
|
|
133
|
-
}
|
|
134
|
-
interface CmssyRecordList {
|
|
135
|
-
items: CmssyModelRecord[];
|
|
136
|
-
total: number;
|
|
137
|
-
hasMore: boolean;
|
|
138
|
-
}
|
|
139
|
-
declare const MODEL_DEFINITIONS_QUERY = "query PublicModelDefinitions($workspaceId: String!) {\n public {\n model {\n definitions(workspaceId: $workspaceId) {\n id name slug description icon color displayField recordCount\n }\n }\n }\n}";
|
|
140
|
-
declare const MODEL_RECORDS_QUERY = "query PublicModelRecords($workspaceId: String!, $modelSlug: String!, $filter: JSON, $sort: String, $limit: Int, $offset: Int, $populate: [String!]) {\n public {\n model {\n records(workspaceId: $workspaceId, modelSlug: $modelSlug, filter: $filter, sort: $sort, limit: $limit, offset: $offset, populate: $populate) {\n items { id modelId data status createdAt updatedAt }\n total\n hasMore\n }\n }\n }\n}";
|
|
141
|
-
interface CmssyFormField {
|
|
142
|
-
id: string;
|
|
143
|
-
name: string;
|
|
144
|
-
fieldType: string;
|
|
145
|
-
label: string | null;
|
|
146
|
-
placeholder: string | null;
|
|
147
|
-
helpText: string | null;
|
|
148
|
-
defaultValue: unknown;
|
|
149
|
-
options: unknown;
|
|
150
|
-
validation: unknown;
|
|
151
|
-
width: string | null;
|
|
152
|
-
order: number | null;
|
|
153
|
-
showWhen: FieldConditionGroup | null;
|
|
154
|
-
requiredWhen: FieldConditionGroup | null;
|
|
155
|
-
}
|
|
156
|
-
interface CmssyFormSettings {
|
|
157
|
-
actionType: string | null;
|
|
158
|
-
submitButtonLabel: unknown;
|
|
159
|
-
successMessage: unknown;
|
|
160
|
-
errorMessage: unknown;
|
|
161
|
-
redirectUrl: string | null;
|
|
162
|
-
requireLogin: boolean | null;
|
|
163
|
-
enableCaptcha: boolean | null;
|
|
164
|
-
}
|
|
165
|
-
interface CmssyFormDefinition {
|
|
166
|
-
id: string;
|
|
167
|
-
name: string;
|
|
168
|
-
slug: string | null;
|
|
169
|
-
description: string | null;
|
|
170
|
-
fields: CmssyFormField[];
|
|
171
|
-
settings: CmssyFormSettings | null;
|
|
172
|
-
}
|
|
173
|
-
interface CmssyFormSubmitResponse {
|
|
174
|
-
success: boolean;
|
|
175
|
-
message: string | null;
|
|
176
|
-
submissionId: string | null;
|
|
177
|
-
redirectUrl: string | null;
|
|
178
|
-
accessToken: string | null;
|
|
179
|
-
customer: unknown;
|
|
180
|
-
}
|
|
181
|
-
interface SubmitFormInput {
|
|
182
|
-
data: Record<string, unknown>;
|
|
183
|
-
website?: string;
|
|
184
|
-
}
|
|
185
|
-
declare const FORM_QUERY = "query PublicForm($formId: ID!) {\n public {\n form {\n get(formId: $formId) {\n id\n name\n slug\n description\n fields {\n id name fieldType label placeholder helpText\n defaultValue width order showWhen requiredWhen\n options { value label disabled }\n validation { required minLength maxLength minValue maxValue pattern customMessage }\n }\n settings {\n actionType submitButtonLabel successMessage errorMessage\n redirectUrl requireLogin enableCaptcha\n }\n }\n }\n }\n}";
|
|
186
|
-
declare const SUBMIT_FORM_MUTATION = "mutation SubmitForm($formId: ID!, $input: SubmitFormInput!) {\n public {\n form {\n submit(formId: $formId, input: $input) {\n success message submissionId redirectUrl accessToken customer\n }\n }\n }\n}";
|
|
187
|
-
|
|
188
|
-
interface CmssyLocaleContext {
|
|
189
|
-
current: string;
|
|
190
|
-
default: string;
|
|
191
|
-
enabled: string[];
|
|
192
|
-
}
|
|
193
|
-
interface CmssyBlockMember {
|
|
194
|
-
recordId: string;
|
|
195
|
-
email: string;
|
|
196
|
-
}
|
|
197
|
-
interface CmssyBlockAuthContext {
|
|
198
|
-
isAuthenticated: boolean;
|
|
199
|
-
member: CmssyBlockMember | null;
|
|
200
|
-
}
|
|
201
|
-
interface CmssyBlockWorkspace {
|
|
202
|
-
id: string;
|
|
203
|
-
slug: string;
|
|
204
|
-
}
|
|
205
|
-
interface CmssyBlockContext {
|
|
206
|
-
locale: CmssyLocaleContext;
|
|
207
|
-
isPreview: boolean;
|
|
208
|
-
forms?: Record<string, CmssyFormDefinition>;
|
|
209
|
-
auth?: CmssyBlockAuthContext;
|
|
210
|
-
workspace?: CmssyBlockWorkspace;
|
|
211
|
-
}
|
|
212
|
-
interface BuildBlockContextExtra {
|
|
213
|
-
auth?: CmssyBlockAuthContext;
|
|
214
|
-
workspace?: CmssyBlockWorkspace;
|
|
215
|
-
}
|
|
216
|
-
declare function buildBlockContext(locale: string, defaultLocale: string, enabledLocales?: string[], isPreview?: boolean, forms?: Record<string, CmssyFormDefinition>, extra?: BuildBlockContextExtra): CmssyBlockContext;
|
|
217
|
-
|
|
218
|
-
declare const PROTOCOL_VERSION = 2;
|
|
219
|
-
|
|
220
|
-
interface FieldDefinition {
|
|
221
|
-
type: FieldType;
|
|
222
|
-
label: string;
|
|
223
|
-
defaultValue?: unknown;
|
|
224
|
-
helperText?: string;
|
|
225
|
-
required?: boolean;
|
|
226
|
-
placeholder?: string;
|
|
227
|
-
tab?: string;
|
|
228
|
-
options?: string[];
|
|
229
|
-
itemSchema?: Record<string, FieldDefinition>;
|
|
230
|
-
itemLabel?: string;
|
|
231
|
-
addButtonLabel?: string;
|
|
232
|
-
minItems?: number;
|
|
233
|
-
maxItems?: number;
|
|
234
|
-
collapsible?: boolean;
|
|
235
|
-
multiple?: boolean;
|
|
236
|
-
pageType?: string;
|
|
237
|
-
}
|
|
238
|
-
type BlockSchema = Record<string, FieldDefinition>;
|
|
239
|
-
interface BlockMeta {
|
|
240
|
-
label: string;
|
|
241
|
-
category?: string;
|
|
242
|
-
icon?: string;
|
|
243
|
-
layoutPositions?: string[];
|
|
244
|
-
/** One-line block description; surfaced to the AI page composer. */
|
|
245
|
-
description?: string;
|
|
246
|
-
}
|
|
247
|
-
interface BlockRect {
|
|
248
|
-
x: number;
|
|
249
|
-
y: number;
|
|
250
|
-
width: number;
|
|
251
|
-
height: number;
|
|
252
|
-
}
|
|
253
|
-
interface ReadyMessage {
|
|
254
|
-
type: "cmssy:ready";
|
|
255
|
-
protocolVersion: number;
|
|
256
|
-
blocks: Array<{
|
|
257
|
-
id: string;
|
|
258
|
-
type: string;
|
|
259
|
-
bounds: BlockRect;
|
|
260
|
-
layoutPosition?: string;
|
|
261
|
-
}>;
|
|
262
|
-
schemas: Record<string, BlockSchema>;
|
|
263
|
-
blockMeta?: Record<string, BlockMeta>;
|
|
264
|
-
}
|
|
265
|
-
interface BoundsMessage {
|
|
266
|
-
type: "cmssy:bounds";
|
|
267
|
-
blockId: string;
|
|
268
|
-
rect: BlockRect;
|
|
269
|
-
}
|
|
270
|
-
interface ClickMessage {
|
|
271
|
-
type: "cmssy:click";
|
|
272
|
-
blockId: string;
|
|
273
|
-
rect: BlockRect;
|
|
274
|
-
layoutPosition?: string;
|
|
275
|
-
}
|
|
276
|
-
interface MoveMessage {
|
|
277
|
-
type: "cmssy:move";
|
|
278
|
-
protocolVersion: number;
|
|
279
|
-
blockId: string;
|
|
280
|
-
index: number;
|
|
281
|
-
}
|
|
282
|
-
interface DragIndexMessage {
|
|
283
|
-
type: "cmssy:drag-index";
|
|
284
|
-
protocolVersion: number;
|
|
285
|
-
index: number;
|
|
286
|
-
}
|
|
287
|
-
type AppToEditorMessage = ReadyMessage | BoundsMessage | ClickMessage | MoveMessage | DragIndexMessage;
|
|
288
|
-
interface SelectMessage {
|
|
289
|
-
type: "cmssy:select";
|
|
290
|
-
protocolVersion: number;
|
|
291
|
-
blockId: string;
|
|
292
|
-
}
|
|
293
|
-
interface PatchMessage {
|
|
294
|
-
type: "cmssy:patch";
|
|
295
|
-
protocolVersion: number;
|
|
296
|
-
blockId: string;
|
|
297
|
-
content: Record<string, unknown>;
|
|
298
|
-
style?: Record<string, unknown>;
|
|
299
|
-
advanced?: Record<string, unknown>;
|
|
300
|
-
layoutPosition?: string;
|
|
301
|
-
}
|
|
302
|
-
interface ParentReadyMessage {
|
|
303
|
-
type: "cmssy:parent-ready";
|
|
304
|
-
protocolVersion: number;
|
|
305
|
-
}
|
|
306
|
-
interface InsertMessage {
|
|
307
|
-
type: "cmssy:insert";
|
|
308
|
-
protocolVersion: number;
|
|
309
|
-
blockId: string;
|
|
310
|
-
blockType: string;
|
|
311
|
-
content: Record<string, unknown>;
|
|
312
|
-
style?: Record<string, unknown>;
|
|
313
|
-
advanced?: Record<string, unknown>;
|
|
314
|
-
index: number;
|
|
315
|
-
}
|
|
316
|
-
interface ReorderMessage {
|
|
317
|
-
type: "cmssy:reorder";
|
|
318
|
-
protocolVersion: number;
|
|
319
|
-
blockIds: string[];
|
|
320
|
-
}
|
|
321
|
-
interface RemoveMessage {
|
|
322
|
-
type: "cmssy:remove";
|
|
323
|
-
protocolVersion: number;
|
|
324
|
-
blockId: string;
|
|
325
|
-
}
|
|
326
|
-
interface DragOverMessage {
|
|
327
|
-
type: "cmssy:drag-over";
|
|
328
|
-
protocolVersion: number;
|
|
329
|
-
y: number;
|
|
330
|
-
}
|
|
331
|
-
interface DragEndMessage {
|
|
332
|
-
type: "cmssy:drag-end";
|
|
333
|
-
protocolVersion: number;
|
|
334
|
-
}
|
|
335
|
-
type EditorToAppMessage = SelectMessage | PatchMessage | ParentReadyMessage | InsertMessage | ReorderMessage | RemoveMessage | DragOverMessage | DragEndMessage;
|
|
336
|
-
declare function isProtocolCompatible(version: number): boolean;
|
|
337
|
-
|
|
338
|
-
interface BlockLoaderArgs {
|
|
339
|
-
content: Record<string, unknown>;
|
|
340
|
-
context?: CmssyBlockContext;
|
|
341
|
-
}
|
|
342
|
-
type BlockLoader = (args: BlockLoaderArgs) => Promise<unknown> | unknown;
|
|
343
|
-
interface BlockDefinition {
|
|
344
|
-
type: string;
|
|
345
|
-
label?: string;
|
|
346
|
-
category?: string;
|
|
347
|
-
icon?: string;
|
|
348
|
-
layoutPositions?: string[];
|
|
349
|
-
/**
|
|
350
|
-
* One-line semantic description of what the block is and when it belongs on a
|
|
351
|
-
* page. Surfaced to the AI page composer to guide block selection and order.
|
|
352
|
-
*/
|
|
353
|
-
description?: string;
|
|
354
|
-
props: Record<string, FieldDefinition>;
|
|
355
|
-
/**
|
|
356
|
-
* Optional server-side data loader. Run by CmssyServerPage during SSR; its
|
|
357
|
-
* result is passed to the component as the `data` prop. Not run in the
|
|
358
|
-
* editor (the component receives `data: undefined` there).
|
|
359
|
-
*
|
|
360
|
-
* The result crosses the server→client boundary when the block component is a
|
|
361
|
-
* Client Component, so it must be RSC-serializable (plain objects, arrays and
|
|
362
|
-
* primitives - no functions, class instances, etc.).
|
|
363
|
-
*/
|
|
364
|
-
loader?: BlockLoader;
|
|
365
|
-
component: ComponentType<{
|
|
366
|
-
content: Record<string, unknown>;
|
|
367
|
-
style?: Record<string, unknown>;
|
|
368
|
-
advanced?: Record<string, unknown>;
|
|
369
|
-
context?: CmssyBlockContext;
|
|
370
|
-
data?: unknown;
|
|
371
|
-
}>;
|
|
372
|
-
}
|
|
373
|
-
declare function defineBlock<C extends Record<string, unknown>, D = unknown, S extends Record<string, unknown> = Record<string, unknown>, A extends Record<string, unknown> = Record<string, unknown>>(def: {
|
|
374
|
-
type: string;
|
|
375
|
-
label?: string;
|
|
376
|
-
category?: string;
|
|
377
|
-
icon?: string;
|
|
378
|
-
layoutPositions?: string[];
|
|
379
|
-
description?: string;
|
|
380
|
-
props: Record<string, FieldDefinition>;
|
|
381
|
-
loader?: (args: {
|
|
382
|
-
content: C;
|
|
383
|
-
context?: CmssyBlockContext;
|
|
384
|
-
}) => Promise<D> | D;
|
|
385
|
-
component: ComponentType<{
|
|
386
|
-
content: C;
|
|
387
|
-
style?: S;
|
|
388
|
-
advanced?: A;
|
|
389
|
-
context?: CmssyBlockContext;
|
|
390
|
-
data?: D;
|
|
391
|
-
}>;
|
|
392
|
-
}): BlockDefinition;
|
|
393
|
-
type BlockMap = Record<string, ComponentType<{
|
|
394
|
-
content: Record<string, unknown>;
|
|
395
|
-
style?: Record<string, unknown>;
|
|
396
|
-
advanced?: Record<string, unknown>;
|
|
397
|
-
context?: CmssyBlockContext;
|
|
398
|
-
data?: unknown;
|
|
399
|
-
}>>;
|
|
400
|
-
declare function buildBlockMap(blocks: BlockDefinition[]): BlockMap;
|
|
401
|
-
declare function blocksToSchemas(blocks: BlockDefinition[]): Record<string, BlockSchema>;
|
|
402
|
-
declare function blocksToMeta(blocks: BlockDefinition[], defaults?: {
|
|
403
|
-
category?: string;
|
|
404
|
-
}): Record<string, BlockMeta>;
|
|
405
|
-
|
|
406
|
-
interface CmssyPriceTier {
|
|
407
|
-
minQty: number;
|
|
408
|
-
price: number;
|
|
409
|
-
}
|
|
410
|
-
interface CmssyCartItemSnapshot {
|
|
411
|
-
name: string;
|
|
412
|
-
price: number;
|
|
413
|
-
currency: string;
|
|
414
|
-
imageUrl: string | null;
|
|
415
|
-
sku: string | null;
|
|
416
|
-
tiers: CmssyPriceTier[];
|
|
417
|
-
}
|
|
418
|
-
interface CmssyCartItem {
|
|
419
|
-
id: string;
|
|
420
|
-
recordId: string;
|
|
421
|
-
quantity: number;
|
|
422
|
-
variantSelections: Record<string, string> | null;
|
|
423
|
-
snapshot: CmssyCartItemSnapshot;
|
|
424
|
-
unitPrice: number;
|
|
425
|
-
currentPrice: number | null;
|
|
426
|
-
priceMismatch: boolean;
|
|
427
|
-
}
|
|
428
|
-
interface CmssyShippingMethod {
|
|
429
|
-
id: string;
|
|
430
|
-
label: string;
|
|
431
|
-
price: number;
|
|
432
|
-
etaLabel: string | null;
|
|
433
|
-
}
|
|
434
|
-
interface CmssyTaxSummaryLine {
|
|
435
|
-
rateId: string | null;
|
|
436
|
-
name: string | null;
|
|
437
|
-
rate: number;
|
|
438
|
-
base: number;
|
|
439
|
-
amount: number;
|
|
440
|
-
}
|
|
441
|
-
interface CmssyAddress {
|
|
442
|
-
name: string;
|
|
443
|
-
company?: string | null;
|
|
444
|
-
line1: string;
|
|
445
|
-
line2?: string | null;
|
|
446
|
-
postalCode: string;
|
|
447
|
-
city: string;
|
|
448
|
-
region?: string | null;
|
|
449
|
-
country: string;
|
|
450
|
-
phone?: string | null;
|
|
451
|
-
vatId?: string | null;
|
|
452
|
-
}
|
|
453
|
-
interface CmssyCartDiscount {
|
|
454
|
-
code: string;
|
|
455
|
-
type: string;
|
|
456
|
-
value: number;
|
|
457
|
-
computedAmount: number;
|
|
458
|
-
}
|
|
459
|
-
interface CmssyCart {
|
|
460
|
-
id: string;
|
|
461
|
-
status: string;
|
|
462
|
-
items: CmssyCartItem[];
|
|
463
|
-
itemCount: number;
|
|
464
|
-
subtotal: number;
|
|
465
|
-
currency: string | null;
|
|
466
|
-
appliedDiscount: CmssyCartDiscount | null;
|
|
467
|
-
discountedTotal: number;
|
|
468
|
-
tax: number;
|
|
469
|
-
taxSummary: CmssyTaxSummaryLine[];
|
|
470
|
-
totalGross: number;
|
|
471
|
-
pricesIncludeTax: boolean;
|
|
472
|
-
shippingMethod: CmssyShippingMethod | null;
|
|
473
|
-
shippingTotal: number;
|
|
474
|
-
availableShippingMethods: CmssyShippingMethod[];
|
|
475
|
-
}
|
|
476
|
-
interface CmssyProductVariant {
|
|
477
|
-
id: string;
|
|
478
|
-
sku: string | null;
|
|
479
|
-
price: number;
|
|
480
|
-
inventory: number | null;
|
|
481
|
-
selectedOptions: Array<{
|
|
482
|
-
name: string;
|
|
483
|
-
value: string;
|
|
484
|
-
}>;
|
|
485
|
-
tiers: CmssyPriceTier[];
|
|
486
|
-
}
|
|
487
|
-
interface CmssyProduct {
|
|
488
|
-
id: string;
|
|
489
|
-
data: Record<string, unknown>;
|
|
490
|
-
variants: CmssyProductVariant[];
|
|
491
|
-
priceTiers: CmssyPriceTier[];
|
|
492
|
-
}
|
|
493
|
-
interface CmssyOrderItem {
|
|
494
|
-
name: string;
|
|
495
|
-
price: number;
|
|
496
|
-
listPrice?: number | null;
|
|
497
|
-
tierMinQty?: number | null;
|
|
498
|
-
currency: string;
|
|
499
|
-
quantity: number;
|
|
500
|
-
sku: string | null;
|
|
501
|
-
}
|
|
502
|
-
interface CmssyOrderPayment {
|
|
503
|
-
amount: number;
|
|
504
|
-
reference: string;
|
|
505
|
-
provider: string | null;
|
|
506
|
-
at: string;
|
|
507
|
-
}
|
|
508
|
-
type CmssyOrderTaxSummaryLine = CmssyTaxSummaryLine;
|
|
509
|
-
interface CmssyOrderDiscount {
|
|
510
|
-
code: string;
|
|
511
|
-
type: string;
|
|
512
|
-
value: number;
|
|
513
|
-
amount: number;
|
|
514
|
-
}
|
|
515
|
-
interface CmssyOrder {
|
|
516
|
-
id: string;
|
|
517
|
-
status: string;
|
|
518
|
-
subtotal: number;
|
|
519
|
-
discount?: number;
|
|
520
|
-
appliedDiscount?: CmssyOrderDiscount | null;
|
|
521
|
-
total: number;
|
|
522
|
-
currency: string;
|
|
523
|
-
customerEmail: string;
|
|
524
|
-
tax?: number;
|
|
525
|
-
pricesIncludeTax?: boolean;
|
|
526
|
-
taxSummary?: CmssyOrderTaxSummaryLine[];
|
|
527
|
-
refundedAmount?: number;
|
|
528
|
-
items?: CmssyOrderItem[];
|
|
529
|
-
paymentProvider?: string | null;
|
|
530
|
-
paymentStatus?: string;
|
|
531
|
-
fulfillmentStatus?: string;
|
|
532
|
-
amountPaid?: number;
|
|
533
|
-
balanceDue?: number;
|
|
534
|
-
paymentReference?: string | null;
|
|
535
|
-
trackingNumber?: string | null;
|
|
536
|
-
trackingCarrier?: string | null;
|
|
537
|
-
invoiceNumber?: string | null;
|
|
538
|
-
invoiceUrl?: string | null;
|
|
539
|
-
invoiceProvider?: string | null;
|
|
540
|
-
payments?: CmssyOrderPayment[];
|
|
541
|
-
paidAt?: string | null;
|
|
542
|
-
fulfilledAt?: string | null;
|
|
543
|
-
createdAt?: string;
|
|
544
|
-
orderNumber?: number | null;
|
|
545
|
-
poNumber?: string | null;
|
|
546
|
-
customerNote?: string | null;
|
|
547
|
-
shippingAddress?: CmssyAddress | null;
|
|
548
|
-
shippingMethod?: {
|
|
549
|
-
id: string;
|
|
550
|
-
label: string;
|
|
551
|
-
price: number;
|
|
552
|
-
} | null;
|
|
553
|
-
shippingTotal?: number;
|
|
554
|
-
accessToken?: string | null;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
export { MODEL_RECORDS_QUERY as $, type AppToEditorMessage as A, type BlockSchema as B, type CmssyPageData as C, type CmssyBranding as D, type EditorToAppMessage as E, type FieldDefinition as F, type CmssyFormField as G, type CmssyFormSettings as H, type CmssyFormSubmitResponse as I, type CmssyLayoutSettings as J, type CmssyLocalizedValue as K, type CmssyModelDefinition as L, type CmssyModelRecord as M, type CmssyOrderDiscount as N, type CmssyOrderTaxSummaryLine as O, type CmssyPageMeta as P, type CmssyPageSummary as Q, type RawBlock as R, type CmssyPriceTier as S, type CmssyRecordList as T, type CmssyShippingMethod as U, type CmssyTaxSummaryLine as V, DEFAULT_CMSSY_API_URL as W, FORM_QUERY as X, type FetchLikeResponse as Y, type FetchPageOptions as Z, MODEL_DEFINITIONS_QUERY as _, type BlockMeta as a, PROTOCOL_VERSION as a0, type ParentReadyMessage as a1, type PatchMessage as a2, type RawLayoutBlock as a3, type ReadyMessage as a4, SITE_CONFIG_QUERY as a5, SUBMIT_FORM_MUTATION as a6, type SelectMessage as a7, type SubmitFormInput as a8, blocksToMeta as a9, blocksToSchemas as aa, buildBlockContext as ab, buildBlockMap as ac, defineBlock as ad, fetchLayouts as ae, fetchPage as af, fetchPageById as ag, fetchPageMeta as ah, fetchPages as ai, isProtocolCompatible as aj, normalizeSlug as ak, resolveApiUrl as al, resolvePublicUrl as am, type BlockDefinition as b, type CmssyFormDefinition as c, type CmssyLayoutGroup as d, type CmssyLocaleContext as e, type CmssyAddress as f, type CmssyCart as g, type CmssyOrder as h, type CmssyProduct as i, type CmssyCartDiscount as j, type CmssyCartItem as k, type CmssyCartItemSnapshot as l, type CmssyOrderItem as m, type CmssyProductVariant as n, type CmssyBlockAuthContext as o, type CmssyBlockWorkspace as p, type FetchLike as q, type CmssyClientConfig as r, type CmssySiteConfig as s, type BlockMap as t, type CmssyBlockContext as u, type BlockRect as v, type BoundsMessage as w, type BuildBlockContextExtra as x, type ClickMessage as y, type CmssyBlockMember as z };
|