@lokalise/content-conversion-schemas 1.0.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/README.md +3 -0
- package/dist/api/contentObjects.d.ts +448 -0
- package/dist/api/contentObjects.d.ts.map +1 -0
- package/dist/api/contentObjects.js +106 -0
- package/dist/api/contentObjects.js.map +1 -0
- package/dist/api/enums.d.ts +32 -0
- package/dist/api/enums.d.ts.map +1 -0
- package/dist/api/enums.js +26 -0
- package/dist/api/enums.js.map +1 -0
- package/dist/api/exportObjects.d.ts +1599 -0
- package/dist/api/exportObjects.d.ts.map +1 -0
- package/dist/api/exportObjects.js +186 -0
- package/dist/api/exportObjects.js.map +1 -0
- package/dist/common.d.ts +48 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +45 -0
- package/dist/common.js.map +1 -0
- package/dist/events/export.d.ts +4279 -0
- package/dist/events/export.d.ts.map +1 -0
- package/dist/events/export.js +235 -0
- package/dist/events/export.js.map +1 -0
- package/dist/events/upload.d.ts +1255 -0
- package/dist/events/upload.d.ts.map +1 -0
- package/dist/events/upload.js +133 -0
- package/dist/events/upload.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains schemas for content-related objects.
|
|
3
|
+
*
|
|
4
|
+
* A Content Item is a piece of generic content that can be imported and handled by the system.
|
|
5
|
+
* It consists of content units, which are the smallest parts of the content that a user can manipulate (import, export).
|
|
6
|
+
*
|
|
7
|
+
* When parsed, each content unit is split into text units, which represent the individual pieces of text that can be translated.
|
|
8
|
+
* Each text unit can be further segmented into segments (e.g., individual sentences).
|
|
9
|
+
* Users cannot manipulate text units or segments directly (e.g., remove or add them, otherwise, the system won't be able to
|
|
10
|
+
* reconstruct the content unit properly), but they should be able to influence the text unit extraction process or segmentation rules.
|
|
11
|
+
*
|
|
12
|
+
* In the context of Shopify, a Product would correspond to a Content Item.
|
|
13
|
+
* Two properties of the product, "title" and "description," would be the content units.
|
|
14
|
+
* "title" would be regular text (example: "Premium Cotton T-Shirt"), a single sentence, so it will consist of a single text unit and a single segment.
|
|
15
|
+
* "description" would be HTML content (example: <h1>Product Overview</h1><p>This is a premium cotton t-shirt. It is available in multiple colors.</p>),
|
|
16
|
+
* so it will consist of two text units: one for the <h1> element and another for the <p> element.
|
|
17
|
+
* The <p> element's text unit will contain two segments because it has two sentences.
|
|
18
|
+
*
|
|
19
|
+
* RawContentItem represents the content item before parsing, while ParsedContentItem represents the content item after parsing.
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
export declare const TEXT_SEGMENT_SCHEMA: z.ZodString;
|
|
23
|
+
export declare const TEXT_UNIT_SCHEMA: z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
source: z.ZodObject<{
|
|
26
|
+
hasBeenSegmented: z.ZodBoolean;
|
|
27
|
+
segments: z.ZodArray<z.ZodString, "many">;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
hasBeenSegmented: boolean;
|
|
30
|
+
segments: string[];
|
|
31
|
+
}, {
|
|
32
|
+
hasBeenSegmented: boolean;
|
|
33
|
+
segments: string[];
|
|
34
|
+
}>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
id: string;
|
|
37
|
+
source: {
|
|
38
|
+
hasBeenSegmented: boolean;
|
|
39
|
+
segments: string[];
|
|
40
|
+
};
|
|
41
|
+
}, {
|
|
42
|
+
id: string;
|
|
43
|
+
source: {
|
|
44
|
+
hasBeenSegmented: boolean;
|
|
45
|
+
segments: string[];
|
|
46
|
+
};
|
|
47
|
+
}>;
|
|
48
|
+
export declare const RAW_CONTENT_UNIT_SCHEMA: z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
type: z.ZodNativeEnum<{
|
|
51
|
+
readonly TEXT: "TEXT";
|
|
52
|
+
readonly HTML: "HTML";
|
|
53
|
+
readonly JSON: "JSON";
|
|
54
|
+
readonly CONTENTFUL_RICH_TEXT: "CONTENTFUL_RICH_TEXT";
|
|
55
|
+
}>;
|
|
56
|
+
source: z.ZodString;
|
|
57
|
+
context: z.ZodOptional<z.ZodString>;
|
|
58
|
+
characterLimit: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
id: string;
|
|
62
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
63
|
+
source: string;
|
|
64
|
+
context?: string | undefined;
|
|
65
|
+
characterLimit?: number | undefined;
|
|
66
|
+
metadata?: Record<string, any> | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
id: string;
|
|
69
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
70
|
+
source: string;
|
|
71
|
+
context?: string | undefined;
|
|
72
|
+
characterLimit?: number | undefined;
|
|
73
|
+
metadata?: Record<string, any> | undefined;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const PARSED_CONTENT_UNIT_METADATA_SCHEMA: z.ZodObject<{
|
|
76
|
+
pptxAttributes: z.ZodObject<{
|
|
77
|
+
slideNumber: z.ZodNumber;
|
|
78
|
+
slideType: z.ZodString;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
slideNumber: number;
|
|
81
|
+
slideType: string;
|
|
82
|
+
}, {
|
|
83
|
+
slideNumber: number;
|
|
84
|
+
slideType: string;
|
|
85
|
+
}>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
pptxAttributes: {
|
|
88
|
+
slideNumber: number;
|
|
89
|
+
slideType: string;
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
pptxAttributes: {
|
|
93
|
+
slideNumber: number;
|
|
94
|
+
slideType: string;
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
export declare const PARSED_CONTENT_UNIT_SCHEMA: z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
type: z.ZodNativeEnum<{
|
|
100
|
+
readonly TEXT: "TEXT";
|
|
101
|
+
readonly HTML: "HTML";
|
|
102
|
+
readonly JSON: "JSON";
|
|
103
|
+
readonly CONTENTFUL_RICH_TEXT: "CONTENTFUL_RICH_TEXT";
|
|
104
|
+
}>;
|
|
105
|
+
context: z.ZodOptional<z.ZodString>;
|
|
106
|
+
characterLimit: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
108
|
+
} & {
|
|
109
|
+
source: z.ZodString;
|
|
110
|
+
sourceWordCount: z.ZodNumber;
|
|
111
|
+
textUnits: z.ZodArray<z.ZodObject<{
|
|
112
|
+
id: z.ZodString;
|
|
113
|
+
source: z.ZodObject<{
|
|
114
|
+
hasBeenSegmented: z.ZodBoolean;
|
|
115
|
+
segments: z.ZodArray<z.ZodString, "many">;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
hasBeenSegmented: boolean;
|
|
118
|
+
segments: string[];
|
|
119
|
+
}, {
|
|
120
|
+
hasBeenSegmented: boolean;
|
|
121
|
+
segments: string[];
|
|
122
|
+
}>;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
id: string;
|
|
125
|
+
source: {
|
|
126
|
+
hasBeenSegmented: boolean;
|
|
127
|
+
segments: string[];
|
|
128
|
+
};
|
|
129
|
+
}, {
|
|
130
|
+
id: string;
|
|
131
|
+
source: {
|
|
132
|
+
hasBeenSegmented: boolean;
|
|
133
|
+
segments: string[];
|
|
134
|
+
};
|
|
135
|
+
}>, "many">;
|
|
136
|
+
position: z.ZodNumber;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
id: string;
|
|
139
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
140
|
+
source: string;
|
|
141
|
+
sourceWordCount: number;
|
|
142
|
+
textUnits: {
|
|
143
|
+
id: string;
|
|
144
|
+
source: {
|
|
145
|
+
hasBeenSegmented: boolean;
|
|
146
|
+
segments: string[];
|
|
147
|
+
};
|
|
148
|
+
}[];
|
|
149
|
+
position: number;
|
|
150
|
+
context?: string | undefined;
|
|
151
|
+
characterLimit?: number | undefined;
|
|
152
|
+
metadata?: Record<string, any> | undefined;
|
|
153
|
+
}, {
|
|
154
|
+
id: string;
|
|
155
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
156
|
+
source: string;
|
|
157
|
+
sourceWordCount: number;
|
|
158
|
+
textUnits: {
|
|
159
|
+
id: string;
|
|
160
|
+
source: {
|
|
161
|
+
hasBeenSegmented: boolean;
|
|
162
|
+
segments: string[];
|
|
163
|
+
};
|
|
164
|
+
}[];
|
|
165
|
+
position: number;
|
|
166
|
+
context?: string | undefined;
|
|
167
|
+
characterLimit?: number | undefined;
|
|
168
|
+
metadata?: Record<string, any> | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
export declare const RAW_CONTENT_ITEM_SCHEMA: z.ZodObject<{
|
|
171
|
+
id: z.ZodString;
|
|
172
|
+
name: z.ZodOptional<z.ZodString>;
|
|
173
|
+
priority: z.ZodNumber;
|
|
174
|
+
contentUnits: z.ZodArray<z.ZodObject<{
|
|
175
|
+
id: z.ZodString;
|
|
176
|
+
type: z.ZodNativeEnum<{
|
|
177
|
+
readonly TEXT: "TEXT";
|
|
178
|
+
readonly HTML: "HTML";
|
|
179
|
+
readonly JSON: "JSON";
|
|
180
|
+
readonly CONTENTFUL_RICH_TEXT: "CONTENTFUL_RICH_TEXT";
|
|
181
|
+
}>;
|
|
182
|
+
source: z.ZodString;
|
|
183
|
+
context: z.ZodOptional<z.ZodString>;
|
|
184
|
+
characterLimit: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
186
|
+
}, "strip", z.ZodTypeAny, {
|
|
187
|
+
id: string;
|
|
188
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
189
|
+
source: string;
|
|
190
|
+
context?: string | undefined;
|
|
191
|
+
characterLimit?: number | undefined;
|
|
192
|
+
metadata?: Record<string, any> | undefined;
|
|
193
|
+
}, {
|
|
194
|
+
id: string;
|
|
195
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
196
|
+
source: string;
|
|
197
|
+
context?: string | undefined;
|
|
198
|
+
characterLimit?: number | undefined;
|
|
199
|
+
metadata?: Record<string, any> | undefined;
|
|
200
|
+
}>, "many">;
|
|
201
|
+
categoryHierarchy: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
202
|
+
origin: z.ZodNativeEnum<{
|
|
203
|
+
readonly SHOPIFY: "SHOPIFY";
|
|
204
|
+
}>;
|
|
205
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
id: string;
|
|
208
|
+
priority: number;
|
|
209
|
+
contentUnits: {
|
|
210
|
+
id: string;
|
|
211
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
212
|
+
source: string;
|
|
213
|
+
context?: string | undefined;
|
|
214
|
+
characterLimit?: number | undefined;
|
|
215
|
+
metadata?: Record<string, any> | undefined;
|
|
216
|
+
}[];
|
|
217
|
+
categoryHierarchy: string[];
|
|
218
|
+
origin: "SHOPIFY";
|
|
219
|
+
name?: string | undefined;
|
|
220
|
+
metadata?: Record<string, unknown> | undefined;
|
|
221
|
+
}, {
|
|
222
|
+
id: string;
|
|
223
|
+
priority: number;
|
|
224
|
+
contentUnits: {
|
|
225
|
+
id: string;
|
|
226
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
227
|
+
source: string;
|
|
228
|
+
context?: string | undefined;
|
|
229
|
+
characterLimit?: number | undefined;
|
|
230
|
+
metadata?: Record<string, any> | undefined;
|
|
231
|
+
}[];
|
|
232
|
+
categoryHierarchy: string[];
|
|
233
|
+
origin: "SHOPIFY";
|
|
234
|
+
name?: string | undefined;
|
|
235
|
+
metadata?: Record<string, unknown> | undefined;
|
|
236
|
+
}>;
|
|
237
|
+
export declare const PARSED_CONTENT_ITEM_SCHEMA: z.ZodObject<{
|
|
238
|
+
id: z.ZodString;
|
|
239
|
+
name: z.ZodOptional<z.ZodString>;
|
|
240
|
+
priority: z.ZodNumber;
|
|
241
|
+
categoryHierarchy: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
242
|
+
origin: z.ZodNativeEnum<{
|
|
243
|
+
readonly SHOPIFY: "SHOPIFY";
|
|
244
|
+
}>;
|
|
245
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
246
|
+
} & {
|
|
247
|
+
contentUnits: z.ZodArray<z.ZodObject<{
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
type: z.ZodNativeEnum<{
|
|
250
|
+
readonly TEXT: "TEXT";
|
|
251
|
+
readonly HTML: "HTML";
|
|
252
|
+
readonly JSON: "JSON";
|
|
253
|
+
readonly CONTENTFUL_RICH_TEXT: "CONTENTFUL_RICH_TEXT";
|
|
254
|
+
}>;
|
|
255
|
+
context: z.ZodOptional<z.ZodString>;
|
|
256
|
+
characterLimit: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
258
|
+
} & {
|
|
259
|
+
source: z.ZodString;
|
|
260
|
+
sourceWordCount: z.ZodNumber;
|
|
261
|
+
textUnits: z.ZodArray<z.ZodObject<{
|
|
262
|
+
id: z.ZodString;
|
|
263
|
+
source: z.ZodObject<{
|
|
264
|
+
hasBeenSegmented: z.ZodBoolean;
|
|
265
|
+
segments: z.ZodArray<z.ZodString, "many">;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
hasBeenSegmented: boolean;
|
|
268
|
+
segments: string[];
|
|
269
|
+
}, {
|
|
270
|
+
hasBeenSegmented: boolean;
|
|
271
|
+
segments: string[];
|
|
272
|
+
}>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
id: string;
|
|
275
|
+
source: {
|
|
276
|
+
hasBeenSegmented: boolean;
|
|
277
|
+
segments: string[];
|
|
278
|
+
};
|
|
279
|
+
}, {
|
|
280
|
+
id: string;
|
|
281
|
+
source: {
|
|
282
|
+
hasBeenSegmented: boolean;
|
|
283
|
+
segments: string[];
|
|
284
|
+
};
|
|
285
|
+
}>, "many">;
|
|
286
|
+
position: z.ZodNumber;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
id: string;
|
|
289
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
290
|
+
source: string;
|
|
291
|
+
sourceWordCount: number;
|
|
292
|
+
textUnits: {
|
|
293
|
+
id: string;
|
|
294
|
+
source: {
|
|
295
|
+
hasBeenSegmented: boolean;
|
|
296
|
+
segments: string[];
|
|
297
|
+
};
|
|
298
|
+
}[];
|
|
299
|
+
position: number;
|
|
300
|
+
context?: string | undefined;
|
|
301
|
+
characterLimit?: number | undefined;
|
|
302
|
+
metadata?: Record<string, any> | undefined;
|
|
303
|
+
}, {
|
|
304
|
+
id: string;
|
|
305
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
306
|
+
source: string;
|
|
307
|
+
sourceWordCount: number;
|
|
308
|
+
textUnits: {
|
|
309
|
+
id: string;
|
|
310
|
+
source: {
|
|
311
|
+
hasBeenSegmented: boolean;
|
|
312
|
+
segments: string[];
|
|
313
|
+
};
|
|
314
|
+
}[];
|
|
315
|
+
position: number;
|
|
316
|
+
context?: string | undefined;
|
|
317
|
+
characterLimit?: number | undefined;
|
|
318
|
+
metadata?: Record<string, any> | undefined;
|
|
319
|
+
}>, "many">;
|
|
320
|
+
failedContentUnits: z.ZodArray<z.ZodObject<{
|
|
321
|
+
error: z.ZodString;
|
|
322
|
+
rawContentUnit: z.ZodObject<{
|
|
323
|
+
id: z.ZodString;
|
|
324
|
+
type: z.ZodNativeEnum<{
|
|
325
|
+
readonly TEXT: "TEXT";
|
|
326
|
+
readonly HTML: "HTML";
|
|
327
|
+
readonly JSON: "JSON";
|
|
328
|
+
readonly CONTENTFUL_RICH_TEXT: "CONTENTFUL_RICH_TEXT";
|
|
329
|
+
}>;
|
|
330
|
+
source: z.ZodString;
|
|
331
|
+
context: z.ZodOptional<z.ZodString>;
|
|
332
|
+
characterLimit: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
334
|
+
}, "strip", z.ZodTypeAny, {
|
|
335
|
+
id: string;
|
|
336
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
337
|
+
source: string;
|
|
338
|
+
context?: string | undefined;
|
|
339
|
+
characterLimit?: number | undefined;
|
|
340
|
+
metadata?: Record<string, any> | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
id: string;
|
|
343
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
344
|
+
source: string;
|
|
345
|
+
context?: string | undefined;
|
|
346
|
+
characterLimit?: number | undefined;
|
|
347
|
+
metadata?: Record<string, any> | undefined;
|
|
348
|
+
}>;
|
|
349
|
+
}, "strip", z.ZodTypeAny, {
|
|
350
|
+
error: string;
|
|
351
|
+
rawContentUnit: {
|
|
352
|
+
id: string;
|
|
353
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
354
|
+
source: string;
|
|
355
|
+
context?: string | undefined;
|
|
356
|
+
characterLimit?: number | undefined;
|
|
357
|
+
metadata?: Record<string, any> | undefined;
|
|
358
|
+
};
|
|
359
|
+
}, {
|
|
360
|
+
error: string;
|
|
361
|
+
rawContentUnit: {
|
|
362
|
+
id: string;
|
|
363
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
364
|
+
source: string;
|
|
365
|
+
context?: string | undefined;
|
|
366
|
+
characterLimit?: number | undefined;
|
|
367
|
+
metadata?: Record<string, any> | undefined;
|
|
368
|
+
};
|
|
369
|
+
}>, "many">;
|
|
370
|
+
}, "strip", z.ZodTypeAny, {
|
|
371
|
+
id: string;
|
|
372
|
+
priority: number;
|
|
373
|
+
contentUnits: {
|
|
374
|
+
id: string;
|
|
375
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
376
|
+
source: string;
|
|
377
|
+
sourceWordCount: number;
|
|
378
|
+
textUnits: {
|
|
379
|
+
id: string;
|
|
380
|
+
source: {
|
|
381
|
+
hasBeenSegmented: boolean;
|
|
382
|
+
segments: string[];
|
|
383
|
+
};
|
|
384
|
+
}[];
|
|
385
|
+
position: number;
|
|
386
|
+
context?: string | undefined;
|
|
387
|
+
characterLimit?: number | undefined;
|
|
388
|
+
metadata?: Record<string, any> | undefined;
|
|
389
|
+
}[];
|
|
390
|
+
categoryHierarchy: string[];
|
|
391
|
+
origin: "SHOPIFY";
|
|
392
|
+
failedContentUnits: {
|
|
393
|
+
error: string;
|
|
394
|
+
rawContentUnit: {
|
|
395
|
+
id: string;
|
|
396
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
397
|
+
source: string;
|
|
398
|
+
context?: string | undefined;
|
|
399
|
+
characterLimit?: number | undefined;
|
|
400
|
+
metadata?: Record<string, any> | undefined;
|
|
401
|
+
};
|
|
402
|
+
}[];
|
|
403
|
+
name?: string | undefined;
|
|
404
|
+
metadata?: Record<string, unknown> | undefined;
|
|
405
|
+
}, {
|
|
406
|
+
id: string;
|
|
407
|
+
priority: number;
|
|
408
|
+
contentUnits: {
|
|
409
|
+
id: string;
|
|
410
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
411
|
+
source: string;
|
|
412
|
+
sourceWordCount: number;
|
|
413
|
+
textUnits: {
|
|
414
|
+
id: string;
|
|
415
|
+
source: {
|
|
416
|
+
hasBeenSegmented: boolean;
|
|
417
|
+
segments: string[];
|
|
418
|
+
};
|
|
419
|
+
}[];
|
|
420
|
+
position: number;
|
|
421
|
+
context?: string | undefined;
|
|
422
|
+
characterLimit?: number | undefined;
|
|
423
|
+
metadata?: Record<string, any> | undefined;
|
|
424
|
+
}[];
|
|
425
|
+
categoryHierarchy: string[];
|
|
426
|
+
origin: "SHOPIFY";
|
|
427
|
+
failedContentUnits: {
|
|
428
|
+
error: string;
|
|
429
|
+
rawContentUnit: {
|
|
430
|
+
id: string;
|
|
431
|
+
type: "TEXT" | "HTML" | "JSON" | "CONTENTFUL_RICH_TEXT";
|
|
432
|
+
source: string;
|
|
433
|
+
context?: string | undefined;
|
|
434
|
+
characterLimit?: number | undefined;
|
|
435
|
+
metadata?: Record<string, any> | undefined;
|
|
436
|
+
};
|
|
437
|
+
}[];
|
|
438
|
+
name?: string | undefined;
|
|
439
|
+
metadata?: Record<string, unknown> | undefined;
|
|
440
|
+
}>;
|
|
441
|
+
export type RawContentItem = z.infer<typeof RAW_CONTENT_ITEM_SCHEMA>;
|
|
442
|
+
export type RawContentUnit = z.infer<typeof RAW_CONTENT_UNIT_SCHEMA>;
|
|
443
|
+
export type ParsedContentUnitMetadata = z.infer<typeof PARSED_CONTENT_UNIT_METADATA_SCHEMA>;
|
|
444
|
+
export type ParsedContentItem = z.infer<typeof PARSED_CONTENT_ITEM_SCHEMA>;
|
|
445
|
+
export type ParsedContentUnit = z.infer<typeof PARSED_CONTENT_UNIT_SCHEMA>;
|
|
446
|
+
export type TextUnit = z.infer<typeof TEXT_UNIT_SCHEMA>;
|
|
447
|
+
export type TextSegment = z.infer<typeof TEXT_SEGMENT_SCHEMA>;
|
|
448
|
+
//# sourceMappingURL=contentObjects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentObjects.d.ts","sourceRoot":"","sources":["../../src/api/contentObjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,mBAAmB,aAI/B,CAAA;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;EAc1B,CAAA;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BlC,CAAA;AAEF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;EAO9C,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BlC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUG,CAAA;AAE1C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AACpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AACpE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAC3F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAC1E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAC1E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AACvD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains schemas for content-related objects.
|
|
3
|
+
*
|
|
4
|
+
* A Content Item is a piece of generic content that can be imported and handled by the system.
|
|
5
|
+
* It consists of content units, which are the smallest parts of the content that a user can manipulate (import, export).
|
|
6
|
+
*
|
|
7
|
+
* When parsed, each content unit is split into text units, which represent the individual pieces of text that can be translated.
|
|
8
|
+
* Each text unit can be further segmented into segments (e.g., individual sentences).
|
|
9
|
+
* Users cannot manipulate text units or segments directly (e.g., remove or add them, otherwise, the system won't be able to
|
|
10
|
+
* reconstruct the content unit properly), but they should be able to influence the text unit extraction process or segmentation rules.
|
|
11
|
+
*
|
|
12
|
+
* In the context of Shopify, a Product would correspond to a Content Item.
|
|
13
|
+
* Two properties of the product, "title" and "description," would be the content units.
|
|
14
|
+
* "title" would be regular text (example: "Premium Cotton T-Shirt"), a single sentence, so it will consist of a single text unit and a single segment.
|
|
15
|
+
* "description" would be HTML content (example: <h1>Product Overview</h1><p>This is a premium cotton t-shirt. It is available in multiple colors.</p>),
|
|
16
|
+
* so it will consist of two text units: one for the <h1> element and another for the <p> element.
|
|
17
|
+
* The <p> element's text unit will contain two segments because it has two sentences.
|
|
18
|
+
*
|
|
19
|
+
* RawContentItem represents the content item before parsing, while ParsedContentItem represents the content item after parsing.
|
|
20
|
+
*/
|
|
21
|
+
import { z } from 'zod';
|
|
22
|
+
import { ContentUnitTypeEnum, ItemOriginEnum } from './enums.js';
|
|
23
|
+
export const TEXT_SEGMENT_SCHEMA = z.string().describe(`Represents a text segment, a smaller part of a larger text.
|
|
24
|
+
Segments are created through segmentation, where a text is broken down into smaller units, such as sentences,
|
|
25
|
+
to facilitate operations like translation and leveraging translation memory.`);
|
|
26
|
+
export const TEXT_UNIT_SCHEMA = z
|
|
27
|
+
.object({
|
|
28
|
+
id: z.string().min(1).describe('Unique identifier of the text unit within a content unit.'),
|
|
29
|
+
source: z.object({
|
|
30
|
+
hasBeenSegmented: z
|
|
31
|
+
.boolean()
|
|
32
|
+
.describe('Indicates whether the segmentation was applied to the text unit.'),
|
|
33
|
+
segments: TEXT_SEGMENT_SCHEMA.array().describe('The text parts that make up the text unit. If the text unit has not been segmented, the array will contain a single segment.'),
|
|
34
|
+
}),
|
|
35
|
+
})
|
|
36
|
+
.describe('Represents a text unit, the basic unit of extraction from a parser. May be split further into segments.');
|
|
37
|
+
export const RAW_CONTENT_UNIT_SCHEMA = z.object({
|
|
38
|
+
id: z
|
|
39
|
+
.string()
|
|
40
|
+
.min(1)
|
|
41
|
+
.describe('Identifier of the unit, unique across other contentUnits belonging to a single item, usually human-readable, e.g. "welcome_message" or "header.welcome_message.title".'),
|
|
42
|
+
type: z
|
|
43
|
+
.nativeEnum(ContentUnitTypeEnum)
|
|
44
|
+
.describe('The type of content, which may determine requirements for processing, storage, or display.'),
|
|
45
|
+
source: z.string().describe('The source text of the unit.'),
|
|
46
|
+
context: z
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('Optional context providing additional information about the content.'),
|
|
50
|
+
characterLimit: z
|
|
51
|
+
.number()
|
|
52
|
+
.positive()
|
|
53
|
+
.optional()
|
|
54
|
+
.describe('Optional maximum number of characters allowed for the content unit.'),
|
|
55
|
+
metadata: z
|
|
56
|
+
.record(z.string(), z.any())
|
|
57
|
+
.optional()
|
|
58
|
+
.describe('Optional metadata associated with the content unit.'),
|
|
59
|
+
});
|
|
60
|
+
export const PARSED_CONTENT_UNIT_METADATA_SCHEMA = z.object({
|
|
61
|
+
pptxAttributes: z
|
|
62
|
+
.object({
|
|
63
|
+
slideNumber: z.number(),
|
|
64
|
+
slideType: z.string(),
|
|
65
|
+
})
|
|
66
|
+
.describe('PPTX-specific attributes of the content unit.'),
|
|
67
|
+
});
|
|
68
|
+
export const PARSED_CONTENT_UNIT_SCHEMA = RAW_CONTENT_UNIT_SCHEMA.extend({
|
|
69
|
+
source: z.string().describe('The source text of the unit.'),
|
|
70
|
+
sourceWordCount: z.number().gte(0).describe('The total word count of the source text.'),
|
|
71
|
+
textUnits: TEXT_UNIT_SCHEMA.array().describe('The text units extracted from the content unit.'),
|
|
72
|
+
position: z.number().int().nonnegative(), // >= 0
|
|
73
|
+
});
|
|
74
|
+
export const RAW_CONTENT_ITEM_SCHEMA = z.object({
|
|
75
|
+
id: z
|
|
76
|
+
.string()
|
|
77
|
+
.min(1)
|
|
78
|
+
.describe('Identifier of the item, unique across other items belonging to a single project.'),
|
|
79
|
+
name: z
|
|
80
|
+
.string()
|
|
81
|
+
.min(1)
|
|
82
|
+
.max(256)
|
|
83
|
+
.optional()
|
|
84
|
+
.describe('Human-readable name of the item. Maximum length is dictated by TSS item name limit.'),
|
|
85
|
+
priority: z
|
|
86
|
+
.number()
|
|
87
|
+
.min(0)
|
|
88
|
+
.describe("Number indicating how important it is to have this item translated in user's store. It is relevant in case not all items fit within the user's current limit defined by their subscription plan. The higher the number, the higher the priority, and so the more likely the item is to be translated."),
|
|
89
|
+
contentUnits: RAW_CONTENT_UNIT_SCHEMA.array(),
|
|
90
|
+
categoryHierarchy: z.array(z.string()).refine((data) => {
|
|
91
|
+
const set = new Set(data);
|
|
92
|
+
return set.size === data.length;
|
|
93
|
+
}, 'Category names must be unique'),
|
|
94
|
+
origin: z.nativeEnum(ItemOriginEnum).describe('Source the item was got from.'),
|
|
95
|
+
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
96
|
+
});
|
|
97
|
+
export const PARSED_CONTENT_ITEM_SCHEMA = RAW_CONTENT_ITEM_SCHEMA.extend({
|
|
98
|
+
contentUnits: PARSED_CONTENT_UNIT_SCHEMA.array(),
|
|
99
|
+
failedContentUnits: z
|
|
100
|
+
.array(z.object({
|
|
101
|
+
error: z.string().describe('Error message.'),
|
|
102
|
+
rawContentUnit: RAW_CONTENT_UNIT_SCHEMA,
|
|
103
|
+
}))
|
|
104
|
+
.describe('Content units that failed to be parsed.'),
|
|
105
|
+
}).describe('Content item after parsing.');
|
|
106
|
+
//# sourceMappingURL=contentObjects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentObjects.js","sourceRoot":"","sources":["../../src/api/contentObjects.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type ObjectValues<T> = T[keyof T];
|
|
2
|
+
export declare const ItemTypeEnum: {
|
|
3
|
+
readonly FILE: "FILE";
|
|
4
|
+
readonly GENERIC_CONTENT_ITEM: "GENERIC_CONTENT_ITEM";
|
|
5
|
+
};
|
|
6
|
+
export type ItemType = ObjectValues<typeof ItemTypeEnum>;
|
|
7
|
+
export declare const ItemOriginEnum: {
|
|
8
|
+
readonly SHOPIFY: "SHOPIFY";
|
|
9
|
+
};
|
|
10
|
+
export type ItemOrigin = ObjectValues<typeof ItemOriginEnum>;
|
|
11
|
+
export declare const ContentUnitTypeEnum: {
|
|
12
|
+
readonly TEXT: "TEXT";
|
|
13
|
+
readonly HTML: "HTML";
|
|
14
|
+
readonly JSON: "JSON";
|
|
15
|
+
readonly CONTENTFUL_RICH_TEXT: "CONTENTFUL_RICH_TEXT";
|
|
16
|
+
};
|
|
17
|
+
export type ContentUnitType = ObjectValues<typeof ContentUnitTypeEnum>;
|
|
18
|
+
export declare const OutputTypeEnum: {
|
|
19
|
+
readonly FILE: "FILE";
|
|
20
|
+
readonly GIT: "GIT";
|
|
21
|
+
readonly SHOPIFY: "SHOPIFY";
|
|
22
|
+
};
|
|
23
|
+
export type OutputType = ObjectValues<typeof OutputTypeEnum>;
|
|
24
|
+
export declare const SegmentStatusEnum: {
|
|
25
|
+
readonly TRANSLATING: "TRANSLATING";
|
|
26
|
+
readonly TRANSLATION_FAILED: "TRANSLATION_FAILED";
|
|
27
|
+
readonly LQA_IN_PROGRESS: "LQA_IN_PROGRESS";
|
|
28
|
+
readonly PENDING_REVIEW: "PENDING_REVIEW";
|
|
29
|
+
readonly APPROVED: "APPROVED";
|
|
30
|
+
};
|
|
31
|
+
export type SegmentStatus = ObjectValues<typeof SegmentStatusEnum>;
|
|
32
|
+
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/api/enums.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAExC,eAAO,MAAM,YAAY;;;CAGf,CAAA;AACV,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAA;AAExD,eAAO,MAAM,cAAc;;CAEjB,CAAA;AACV,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AAE5D,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAA;AACV,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAEtE,eAAO,MAAM,cAAc;;;;CAIjB,CAAA;AACV,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AAE5D,eAAO,MAAM,iBAAiB;;;;;;CAMpB,CAAA;AACV,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export const ItemTypeEnum = {
|
|
2
|
+
FILE: 'FILE',
|
|
3
|
+
GENERIC_CONTENT_ITEM: 'GENERIC_CONTENT_ITEM',
|
|
4
|
+
};
|
|
5
|
+
export const ItemOriginEnum = {
|
|
6
|
+
SHOPIFY: 'SHOPIFY',
|
|
7
|
+
};
|
|
8
|
+
export const ContentUnitTypeEnum = {
|
|
9
|
+
TEXT: 'TEXT',
|
|
10
|
+
HTML: 'HTML',
|
|
11
|
+
JSON: 'JSON',
|
|
12
|
+
CONTENTFUL_RICH_TEXT: 'CONTENTFUL_RICH_TEXT',
|
|
13
|
+
};
|
|
14
|
+
export const OutputTypeEnum = {
|
|
15
|
+
FILE: 'FILE',
|
|
16
|
+
GIT: 'GIT',
|
|
17
|
+
SHOPIFY: 'SHOPIFY',
|
|
18
|
+
};
|
|
19
|
+
export const SegmentStatusEnum = {
|
|
20
|
+
TRANSLATING: 'TRANSLATING',
|
|
21
|
+
TRANSLATION_FAILED: 'TRANSLATION_FAILED',
|
|
22
|
+
LQA_IN_PROGRESS: 'LQA_IN_PROGRESS',
|
|
23
|
+
PENDING_REVIEW: 'PENDING_REVIEW',
|
|
24
|
+
APPROVED: 'APPROVED',
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/api/enums.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,oBAAoB,EAAE,sBAAsB;CACpC,CAAA;AAGV,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,SAAS;CACV,CAAA;AAGV,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,oBAAoB,EAAE,sBAAsB;CACpC,CAAA;AAGV,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;CACV,CAAA;AAGV,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa;IAC1B,kBAAkB,EAAE,oBAAoB;IACxC,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAAE,gBAAgB;IAChC,QAAQ,EAAE,UAAU;CACZ,CAAA"}
|