@wix/auto_sdk_rich-content_ricos-documents 1.0.2 → 1.0.4
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/build/cjs/index.d.ts +5 -5
- package/build/cjs/index.js +77 -26
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +220 -18
- package/build/cjs/index.typings.js +75 -24
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +213 -11
- package/build/es/index.d.mts +5 -5
- package/build/es/index.mjs +70 -26
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +220 -18
- package/build/es/index.typings.mjs +68 -24
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +213 -11
- package/build/internal/cjs/index.d.ts +5 -5
- package/build/internal/cjs/index.js +77 -26
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +220 -18
- package/build/internal/cjs/index.typings.js +75 -24
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +213 -11
- package/build/internal/es/index.d.mts +5 -5
- package/build/internal/es/index.mjs +70 -26
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +220 -18
- package/build/internal/es/index.typings.mjs +68 -24
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +213 -11
- package/package.json +3 -2
|
@@ -258,7 +258,7 @@ interface ButtonData {
|
|
|
258
258
|
/** Styling for the button's container. */
|
|
259
259
|
containerData?: PluginContainerData;
|
|
260
260
|
/** The button type. */
|
|
261
|
-
type?:
|
|
261
|
+
type?: ButtonDataTypeWithLiterals;
|
|
262
262
|
/** Styling for the button. */
|
|
263
263
|
styles?: Styles;
|
|
264
264
|
/** The text to display on the button. */
|
|
@@ -366,14 +366,14 @@ interface Height {
|
|
|
366
366
|
/** A custom height value in pixels. */
|
|
367
367
|
custom?: string | null;
|
|
368
368
|
}
|
|
369
|
-
declare enum
|
|
369
|
+
declare enum ButtonDataType {
|
|
370
370
|
/** Regular link button */
|
|
371
371
|
LINK = "LINK",
|
|
372
372
|
/** Triggers custom action that is defined in plugin configuration by the consumer */
|
|
373
373
|
ACTION = "ACTION"
|
|
374
374
|
}
|
|
375
375
|
/** @enumType */
|
|
376
|
-
type
|
|
376
|
+
type ButtonDataTypeWithLiterals = ButtonDataType | 'LINK' | 'ACTION';
|
|
377
377
|
interface Styles {
|
|
378
378
|
/**
|
|
379
379
|
* Deprecated: Use `borderWidth` and `borderRadius` instead.
|
|
@@ -506,7 +506,7 @@ interface DividerData {
|
|
|
506
506
|
/** Divider width. */
|
|
507
507
|
width?: WidthWithLiterals;
|
|
508
508
|
/** Divider alignment. */
|
|
509
|
-
alignment?:
|
|
509
|
+
alignment?: DividerDataAlignmentWithLiterals;
|
|
510
510
|
}
|
|
511
511
|
declare enum LineStyle {
|
|
512
512
|
/** Single Line */
|
|
@@ -530,7 +530,7 @@ declare enum Width {
|
|
|
530
530
|
}
|
|
531
531
|
/** @enumType */
|
|
532
532
|
type WidthWithLiterals = Width | 'LARGE' | 'MEDIUM' | 'SMALL';
|
|
533
|
-
declare enum
|
|
533
|
+
declare enum DividerDataAlignment {
|
|
534
534
|
/** Center alignment */
|
|
535
535
|
CENTER = "CENTER",
|
|
536
536
|
/** Left alignment */
|
|
@@ -539,7 +539,7 @@ declare enum Alignment {
|
|
|
539
539
|
RIGHT = "RIGHT"
|
|
540
540
|
}
|
|
541
541
|
/** @enumType */
|
|
542
|
-
type
|
|
542
|
+
type DividerDataAlignmentWithLiterals = DividerDataAlignment | 'CENTER' | 'LEFT' | 'RIGHT';
|
|
543
543
|
interface FileData {
|
|
544
544
|
/** Styling for the file's container. */
|
|
545
545
|
containerData?: PluginContainerData;
|
|
@@ -664,7 +664,7 @@ interface ItemDataOneOf {
|
|
|
664
664
|
}
|
|
665
665
|
interface GalleryOptions {
|
|
666
666
|
/** Gallery layout. */
|
|
667
|
-
layout?:
|
|
667
|
+
layout?: GalleryOptionsLayout;
|
|
668
668
|
/** Styling for gallery items. */
|
|
669
669
|
item?: ItemStyle;
|
|
670
670
|
/** Styling for gallery thumbnail images. */
|
|
@@ -724,7 +724,7 @@ declare enum ThumbnailsAlignment {
|
|
|
724
724
|
}
|
|
725
725
|
/** @enumType */
|
|
726
726
|
type ThumbnailsAlignmentWithLiterals = ThumbnailsAlignment | 'TOP' | 'RIGHT' | 'BOTTOM' | 'LEFT' | 'NONE';
|
|
727
|
-
interface
|
|
727
|
+
interface GalleryOptionsLayout {
|
|
728
728
|
/** Gallery layout type. */
|
|
729
729
|
type?: LayoutTypeWithLiterals;
|
|
730
730
|
/** Sets whether horizontal scroll is enabled. Defaults to `true` unless the layout `type` is set to `GRID` or `COLLAGE`. */
|
|
@@ -886,7 +886,7 @@ interface LinkPreviewData {
|
|
|
886
886
|
/** Styling for the link preview. */
|
|
887
887
|
styles?: LinkPreviewDataStyles;
|
|
888
888
|
}
|
|
889
|
-
declare enum
|
|
889
|
+
declare enum StylesPosition {
|
|
890
890
|
/** Thumbnail positioned at the start (left in LTR layouts, right in RTL layouts) */
|
|
891
891
|
START = "START",
|
|
892
892
|
/** Thumbnail positioned at the end (right in LTR layouts, left in RTL layouts) */
|
|
@@ -897,7 +897,7 @@ declare enum Position {
|
|
|
897
897
|
HIDDEN = "HIDDEN"
|
|
898
898
|
}
|
|
899
899
|
/** @enumType */
|
|
900
|
-
type
|
|
900
|
+
type StylesPositionWithLiterals = StylesPosition | 'START' | 'END' | 'TOP' | 'HIDDEN';
|
|
901
901
|
interface LinkPreviewDataStyles {
|
|
902
902
|
/**
|
|
903
903
|
* Background color as a hexadecimal value.
|
|
@@ -929,7 +929,7 @@ interface LinkPreviewDataStyles {
|
|
|
929
929
|
*/
|
|
930
930
|
borderColor?: string | null;
|
|
931
931
|
/** Position of thumbnail. Defaults to `START`. */
|
|
932
|
-
thumbnailPosition?:
|
|
932
|
+
thumbnailPosition?: StylesPositionWithLiterals;
|
|
933
933
|
}
|
|
934
934
|
interface MapData {
|
|
935
935
|
/** Styling for the map's container. */
|
|
@@ -1283,6 +1283,32 @@ interface AppEmbedData extends AppEmbedDataAppDataOneOf {
|
|
|
1283
1283
|
url?: string | null;
|
|
1284
1284
|
/** An image for the embedded content. */
|
|
1285
1285
|
image?: Media;
|
|
1286
|
+
/** Whether to hide the image. */
|
|
1287
|
+
hideImage?: boolean | null;
|
|
1288
|
+
/** Whether to hide the title. */
|
|
1289
|
+
hideTitle?: boolean | null;
|
|
1290
|
+
/** Whether to hide the price. */
|
|
1291
|
+
hidePrice?: boolean | null;
|
|
1292
|
+
/** Whether to hide the description (Event and Booking). */
|
|
1293
|
+
hideDescription?: boolean | null;
|
|
1294
|
+
/** Whether to hide the date and time (Event). */
|
|
1295
|
+
hideDateTime?: boolean | null;
|
|
1296
|
+
/** Whether to hide the location (Event). */
|
|
1297
|
+
hideLocation?: boolean | null;
|
|
1298
|
+
/** Whether to hide the duration (Booking). */
|
|
1299
|
+
hideDuration?: boolean | null;
|
|
1300
|
+
/** Whether to hide the button. */
|
|
1301
|
+
hideButton?: boolean | null;
|
|
1302
|
+
/** Whether to hide the ribbon. */
|
|
1303
|
+
hideRibbon?: boolean | null;
|
|
1304
|
+
/** Button styling options. */
|
|
1305
|
+
buttonStyles?: ButtonStyles;
|
|
1306
|
+
/** Image styling options. */
|
|
1307
|
+
imageStyles?: ImageStyles;
|
|
1308
|
+
/** Ribbon styling options. */
|
|
1309
|
+
ribbonStyles?: RibbonStyles;
|
|
1310
|
+
/** Card styling options. */
|
|
1311
|
+
cardStyles?: CardStyles;
|
|
1286
1312
|
}
|
|
1287
1313
|
/** @oneof */
|
|
1288
1314
|
interface AppEmbedDataAppDataOneOf {
|
|
@@ -1291,6 +1317,66 @@ interface AppEmbedDataAppDataOneOf {
|
|
|
1291
1317
|
/** Data for embedded Wix Events content. */
|
|
1292
1318
|
eventData?: EventData;
|
|
1293
1319
|
}
|
|
1320
|
+
declare enum Position {
|
|
1321
|
+
/** Image positioned at the start (left in LTR layouts, right in RTL layouts) */
|
|
1322
|
+
START = "START",
|
|
1323
|
+
/** Image positioned at the end (right in LTR layouts, left in RTL layouts) */
|
|
1324
|
+
END = "END",
|
|
1325
|
+
/** Image positioned at the top */
|
|
1326
|
+
TOP = "TOP"
|
|
1327
|
+
}
|
|
1328
|
+
/** @enumType */
|
|
1329
|
+
type PositionWithLiterals = Position | 'START' | 'END' | 'TOP';
|
|
1330
|
+
declare enum AspectRatio {
|
|
1331
|
+
/** 1:1 aspect ratio */
|
|
1332
|
+
SQUARE = "SQUARE",
|
|
1333
|
+
/** 16:9 aspect ratio */
|
|
1334
|
+
RECTANGLE = "RECTANGLE"
|
|
1335
|
+
}
|
|
1336
|
+
/** @enumType */
|
|
1337
|
+
type AspectRatioWithLiterals = AspectRatio | 'SQUARE' | 'RECTANGLE';
|
|
1338
|
+
declare enum Resizing {
|
|
1339
|
+
/** Fill the container, may crop the image */
|
|
1340
|
+
FILL = "FILL",
|
|
1341
|
+
/** Fit the image within the container */
|
|
1342
|
+
FIT = "FIT"
|
|
1343
|
+
}
|
|
1344
|
+
/** @enumType */
|
|
1345
|
+
type ResizingWithLiterals = Resizing | 'FILL' | 'FIT';
|
|
1346
|
+
declare enum Placement {
|
|
1347
|
+
/** Ribbon placed on the image */
|
|
1348
|
+
IMAGE = "IMAGE",
|
|
1349
|
+
/** Ribbon placed on the product information */
|
|
1350
|
+
PRODUCT_INFO = "PRODUCT_INFO"
|
|
1351
|
+
}
|
|
1352
|
+
/** @enumType */
|
|
1353
|
+
type PlacementWithLiterals = Placement | 'IMAGE' | 'PRODUCT_INFO';
|
|
1354
|
+
declare enum Type {
|
|
1355
|
+
/** Card with visible border and background */
|
|
1356
|
+
CONTAINED = "CONTAINED",
|
|
1357
|
+
/** Card without visible border */
|
|
1358
|
+
FRAMELESS = "FRAMELESS"
|
|
1359
|
+
}
|
|
1360
|
+
/** @enumType */
|
|
1361
|
+
type TypeWithLiterals = Type | 'CONTAINED' | 'FRAMELESS';
|
|
1362
|
+
declare enum Alignment {
|
|
1363
|
+
/** Content aligned to start (left in LTR layouts, right in RTL layouts) */
|
|
1364
|
+
START = "START",
|
|
1365
|
+
/** Content centered */
|
|
1366
|
+
CENTER = "CENTER",
|
|
1367
|
+
/** Content aligned to end (right in LTR layouts, left in RTL layouts) */
|
|
1368
|
+
END = "END"
|
|
1369
|
+
}
|
|
1370
|
+
/** @enumType */
|
|
1371
|
+
type AlignmentWithLiterals = Alignment | 'START' | 'CENTER' | 'END';
|
|
1372
|
+
declare enum Layout {
|
|
1373
|
+
/** Elements stacked vertically */
|
|
1374
|
+
STACKED = "STACKED",
|
|
1375
|
+
/** Elements arranged horizontally */
|
|
1376
|
+
SIDE_BY_SIDE = "SIDE_BY_SIDE"
|
|
1377
|
+
}
|
|
1378
|
+
/** @enumType */
|
|
1379
|
+
type LayoutWithLiterals = Layout | 'STACKED' | 'SIDE_BY_SIDE';
|
|
1294
1380
|
declare enum AppType {
|
|
1295
1381
|
PRODUCT = "PRODUCT",
|
|
1296
1382
|
EVENT = "EVENT",
|
|
@@ -1308,6 +1394,122 @@ interface EventData {
|
|
|
1308
1394
|
/** Event location. */
|
|
1309
1395
|
location?: string | null;
|
|
1310
1396
|
}
|
|
1397
|
+
interface ButtonStyles {
|
|
1398
|
+
/** Text to display on the button. */
|
|
1399
|
+
buttonText?: string | null;
|
|
1400
|
+
/** Border width in pixels. */
|
|
1401
|
+
borderWidth?: number | null;
|
|
1402
|
+
/** Border radius in pixels. */
|
|
1403
|
+
borderRadius?: number | null;
|
|
1404
|
+
/**
|
|
1405
|
+
* Border color as a hexadecimal value.
|
|
1406
|
+
* @format COLOR_HEX
|
|
1407
|
+
*/
|
|
1408
|
+
borderColor?: string | null;
|
|
1409
|
+
/**
|
|
1410
|
+
* Text color as a hexadecimal value.
|
|
1411
|
+
* @format COLOR_HEX
|
|
1412
|
+
*/
|
|
1413
|
+
textColor?: string | null;
|
|
1414
|
+
/**
|
|
1415
|
+
* Background color as a hexadecimal value.
|
|
1416
|
+
* @format COLOR_HEX
|
|
1417
|
+
*/
|
|
1418
|
+
backgroundColor?: string | null;
|
|
1419
|
+
/**
|
|
1420
|
+
* Border color as a hexadecimal value (hover state).
|
|
1421
|
+
* @format COLOR_HEX
|
|
1422
|
+
*/
|
|
1423
|
+
borderColorHover?: string | null;
|
|
1424
|
+
/**
|
|
1425
|
+
* Text color as a hexadecimal value (hover state).
|
|
1426
|
+
* @format COLOR_HEX
|
|
1427
|
+
*/
|
|
1428
|
+
textColorHover?: string | null;
|
|
1429
|
+
/**
|
|
1430
|
+
* Background color as a hexadecimal value (hover state).
|
|
1431
|
+
* @format COLOR_HEX
|
|
1432
|
+
*/
|
|
1433
|
+
backgroundColorHover?: string | null;
|
|
1434
|
+
/** Button size option, one of `SMALL`, `MEDIUM` or `LARGE`. Defaults to `MEDIUM`. */
|
|
1435
|
+
buttonSize?: string | null;
|
|
1436
|
+
}
|
|
1437
|
+
interface ImageStyles {
|
|
1438
|
+
/** Whether to hide the image. */
|
|
1439
|
+
hideImage?: boolean | null;
|
|
1440
|
+
/** Position of image. Defaults to `START`. */
|
|
1441
|
+
imagePosition?: PositionWithLiterals;
|
|
1442
|
+
/** Aspect ratio for the image. Defaults to `SQUARE`. */
|
|
1443
|
+
aspectRatio?: AspectRatioWithLiterals;
|
|
1444
|
+
/** How the image should be resized. Defaults to `FILL`. */
|
|
1445
|
+
resizing?: ResizingWithLiterals;
|
|
1446
|
+
/**
|
|
1447
|
+
* Image border color as a hexadecimal value.
|
|
1448
|
+
* @format COLOR_HEX
|
|
1449
|
+
*/
|
|
1450
|
+
borderColor?: string | null;
|
|
1451
|
+
/** Image border width in pixels. */
|
|
1452
|
+
borderWidth?: number | null;
|
|
1453
|
+
/** Image border radius in pixels. */
|
|
1454
|
+
borderRadius?: number | null;
|
|
1455
|
+
}
|
|
1456
|
+
interface RibbonStyles {
|
|
1457
|
+
/** Text to display on the ribbon. */
|
|
1458
|
+
ribbonText?: string | null;
|
|
1459
|
+
/**
|
|
1460
|
+
* Ribbon background color as a hexadecimal value.
|
|
1461
|
+
* @format COLOR_HEX
|
|
1462
|
+
*/
|
|
1463
|
+
backgroundColor?: string | null;
|
|
1464
|
+
/**
|
|
1465
|
+
* Ribbon text color as a hexadecimal value.
|
|
1466
|
+
* @format COLOR_HEX
|
|
1467
|
+
*/
|
|
1468
|
+
textColor?: string | null;
|
|
1469
|
+
/**
|
|
1470
|
+
* Ribbon border color as a hexadecimal value.
|
|
1471
|
+
* @format COLOR_HEX
|
|
1472
|
+
*/
|
|
1473
|
+
borderColor?: string | null;
|
|
1474
|
+
/** Ribbon border width in pixels. */
|
|
1475
|
+
borderWidth?: number | null;
|
|
1476
|
+
/** Ribbon border radius in pixels. */
|
|
1477
|
+
borderRadius?: number | null;
|
|
1478
|
+
/** Placement of the ribbon. Defaults to `IMAGE`. */
|
|
1479
|
+
ribbonPlacement?: PlacementWithLiterals;
|
|
1480
|
+
}
|
|
1481
|
+
interface CardStyles {
|
|
1482
|
+
/**
|
|
1483
|
+
* Card background color as a hexadecimal value.
|
|
1484
|
+
* @format COLOR_HEX
|
|
1485
|
+
*/
|
|
1486
|
+
backgroundColor?: string | null;
|
|
1487
|
+
/**
|
|
1488
|
+
* Card border color as a hexadecimal value.
|
|
1489
|
+
* @format COLOR_HEX
|
|
1490
|
+
*/
|
|
1491
|
+
borderColor?: string | null;
|
|
1492
|
+
/** Card border width in pixels. */
|
|
1493
|
+
borderWidth?: number | null;
|
|
1494
|
+
/** Card border radius in pixels. */
|
|
1495
|
+
borderRadius?: number | null;
|
|
1496
|
+
/** Card type. Defaults to `CONTAINED`. */
|
|
1497
|
+
type?: TypeWithLiterals;
|
|
1498
|
+
/** Content alignment. Defaults to `START`. */
|
|
1499
|
+
alignment?: AlignmentWithLiterals;
|
|
1500
|
+
/** Layout for title and price. Defaults to `STACKED`. */
|
|
1501
|
+
titlePriceLayout?: LayoutWithLiterals;
|
|
1502
|
+
/**
|
|
1503
|
+
* Title text color as a hexadecimal value.
|
|
1504
|
+
* @format COLOR_HEX
|
|
1505
|
+
*/
|
|
1506
|
+
titleColor?: string | null;
|
|
1507
|
+
/**
|
|
1508
|
+
* Text color as a hexadecimal value.
|
|
1509
|
+
* @format COLOR_HEX
|
|
1510
|
+
*/
|
|
1511
|
+
textColor?: string | null;
|
|
1512
|
+
}
|
|
1311
1513
|
interface VideoData {
|
|
1312
1514
|
/** Styling for the video's container. */
|
|
1313
1515
|
containerData?: PluginContainerData;
|
|
@@ -1759,19 +1961,19 @@ interface ConvertToRicosDocumentOptionsSourceOneOf {
|
|
|
1759
1961
|
}
|
|
1760
1962
|
/**
|
|
1761
1963
|
* Converts a Ricos document to the specified format.
|
|
1762
|
-
* @param
|
|
1964
|
+
* @param targetFormat - Format to convert the document to.
|
|
1763
1965
|
* @public
|
|
1764
1966
|
* @documentationMaturity preview
|
|
1765
|
-
* @requiredField document
|
|
1766
|
-
* @requiredField
|
|
1967
|
+
* @requiredField options.document
|
|
1968
|
+
* @requiredField targetFormat
|
|
1767
1969
|
* @permissionId RICOS.RICOS_DOCUMENT_CONVERT_FROM
|
|
1768
1970
|
* @applicableIdentity APP
|
|
1769
1971
|
* @fqn wix.ricos.v1.RicosDocument.ConvertFromRicosDocument
|
|
1770
1972
|
*/
|
|
1771
|
-
declare function convertFromRicosDocument(
|
|
1973
|
+
declare function convertFromRicosDocument(targetFormat: TargetFormatWithLiterals, options?: NonNullablePaths<ConvertFromRicosDocumentOptions, `document`>): Promise<NonNullablePaths<ConvertFromRicosDocumentResponse, `markdown` | `html` | `plainText`>>;
|
|
1772
1974
|
interface ConvertFromRicosDocumentOptions extends ConvertFromRicosDocumentOptionsOptionsOneOf {
|
|
1773
|
-
/**
|
|
1774
|
-
|
|
1975
|
+
/** Ricos document to convert. */
|
|
1976
|
+
document: RichContent;
|
|
1775
1977
|
/** Options for converting to plain text. */
|
|
1776
1978
|
plainTextOptions?: PlainTextOptions;
|
|
1777
1979
|
}
|
|
@@ -1781,4 +1983,4 @@ interface ConvertFromRicosDocumentOptionsOptionsOneOf {
|
|
|
1781
1983
|
plainTextOptions?: PlainTextOptions;
|
|
1782
1984
|
}
|
|
1783
1985
|
|
|
1784
|
-
export { Alignment, type AlignmentWithLiterals, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AppTypeWithLiterals, type AudioData, type Background, type BackgroundBackgroundOneOf, BackgroundType, type BackgroundTypeWithLiterals, type BlockquoteData, type BookingData, type Border, type BorderColors, type BulletedListData, type ButtonData, type CaptionData, type CellStyle, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type ConvertFromRicosDocumentOptions, type ConvertFromRicosDocumentOptionsOptionsOneOf, type ConvertFromRicosDocumentRequest, type ConvertFromRicosDocumentRequestOptionsOneOf, type ConvertFromRicosDocumentResponse, type ConvertFromRicosDocumentResponseResultOneOf, type ConvertToRicosDocumentOptions, type ConvertToRicosDocumentOptionsSourceOneOf, type ConvertToRicosDocumentRequest, type ConvertToRicosDocumentRequestSourceOneOf, type ConvertToRicosDocumentResponse, Crop, type CropWithLiterals, type Decoration, type DecorationDataOneOf, DecorationType, type DecorationTypeWithLiterals, type Design, type Dimensions, Direction, type DirectionWithLiterals, type DividerData, type DocumentStyle, type EmbedData, type EventData, type FileData, type FileSource, type FileSourceDataOneOf, type FontSizeData, FontType, type FontTypeWithLiterals, type GIF, type GIFData, GIFType, type GIFTypeWithLiterals, type GalleryData, type GalleryOptions, type Gradient, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type Image, type ImageData, type ImageDataStyles, InitialExpandedItems, type InitialExpandedItemsWithLiterals, type Item, type ItemDataOneOf, type ItemStyle,
|
|
1986
|
+
export { Alignment, type AlignmentWithLiterals, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AppTypeWithLiterals, AspectRatio, type AspectRatioWithLiterals, type AudioData, type Background, type BackgroundBackgroundOneOf, BackgroundType, type BackgroundTypeWithLiterals, type BlockquoteData, type BookingData, type Border, type BorderColors, type BulletedListData, type ButtonData, ButtonDataType, type ButtonDataTypeWithLiterals, type ButtonStyles, type CaptionData, type CardStyles, type CellStyle, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type ConvertFromRicosDocumentOptions, type ConvertFromRicosDocumentOptionsOptionsOneOf, type ConvertFromRicosDocumentRequest, type ConvertFromRicosDocumentRequestOptionsOneOf, type ConvertFromRicosDocumentResponse, type ConvertFromRicosDocumentResponseResultOneOf, type ConvertToRicosDocumentOptions, type ConvertToRicosDocumentOptionsSourceOneOf, type ConvertToRicosDocumentRequest, type ConvertToRicosDocumentRequestSourceOneOf, type ConvertToRicosDocumentResponse, Crop, type CropWithLiterals, type Decoration, type DecorationDataOneOf, DecorationType, type DecorationTypeWithLiterals, type Design, type Dimensions, Direction, type DirectionWithLiterals, type DividerData, DividerDataAlignment, type DividerDataAlignmentWithLiterals, type DocumentStyle, type EmbedData, type EventData, type FileData, type FileSource, type FileSourceDataOneOf, type FontSizeData, FontType, type FontTypeWithLiterals, type GIF, type GIFData, GIFType, type GIFTypeWithLiterals, type GalleryData, type GalleryOptions, type GalleryOptionsLayout, type Gradient, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type Image, type ImageData, type ImageDataStyles, type ImageStyles, InitialExpandedItems, type InitialExpandedItemsWithLiterals, type Item, type ItemDataOneOf, type ItemStyle, Layout, type LayoutCellData, LayoutType, type LayoutTypeWithLiterals, type LayoutWithLiterals, LineStyle, type LineStyleWithLiterals, type Link, type LinkData, type LinkDataOneOf, type LinkPreviewData, type LinkPreviewDataStyles, type ListValue, type MapData, type MapSettings, MapType, type MapTypeWithLiterals, type Media, type MentionData, type Metadata, type Node, type NodeDataOneOf, type NodeStyle, NodeType, type NodeTypeWithLiterals, NullValue, type NullValueWithLiterals, type Oembed, type Option, type OptionDesign, type OptionLayout, type OrderedListData, Orientation, type OrientationWithLiterals, type PDFSettings, type ParagraphData, type Permissions, Placement, type PlacementWithLiterals, type PlainTextOptions, type PlaybackOptions, Plugin, type PluginContainerData, PluginContainerDataAlignment, type PluginContainerDataAlignmentWithLiterals, type PluginContainerDataWidth, type PluginContainerDataWidthDataOneOf, type PluginWithLiterals, type Poll, type PollData, type PollDataLayout, type PollDesign, type PollLayout, PollLayoutDirection, type PollLayoutDirectionWithLiterals, PollLayoutType, type PollLayoutTypeWithLiterals, Position, type PositionWithLiterals, type Rel, Resizing, type ResizingWithLiterals, type RibbonStyles, type RichContent, type RicosDocumentOptions, type RicosDocumentPlaceholder, type RicosDocumentViolation, type Settings, Source, type SourceWithLiterals, type Spoiler, type SpoilerData, type Styles, type StylesBorder, StylesPosition, type StylesPositionWithLiterals, type TableCellData, type TableData, Target, TargetFormat, type TargetFormatWithLiterals, type TargetWithLiterals, TextAlignment, type TextAlignmentWithLiterals, type TextData, type TextNodeStyle, type TextStyle, type Thumbnails, ThumbnailsAlignment, type ThumbnailsAlignmentWithLiterals, Type, type TypeWithLiterals, type ValidateDocumentOptions, type ValidateDocumentRequest, type ValidateDocumentResponse, VerticalAlignment, type VerticalAlignmentWithLiterals, type Video, type VideoData, ViewMode, type ViewModeWithLiterals, ViewRole, type ViewRoleWithLiterals, VoteRole, type VoteRoleWithLiterals, Width, WidthType, type WidthTypeWithLiterals, type WidthWithLiterals, convertFromRicosDocument, convertToRicosDocument, validateDocument };
|
|
@@ -22,25 +22,32 @@ var index_typings_exports = {};
|
|
|
22
22
|
__export(index_typings_exports, {
|
|
23
23
|
Alignment: () => Alignment,
|
|
24
24
|
AppType: () => AppType,
|
|
25
|
+
AspectRatio: () => AspectRatio,
|
|
25
26
|
BackgroundType: () => BackgroundType,
|
|
27
|
+
ButtonDataType: () => ButtonDataType,
|
|
26
28
|
Crop: () => Crop,
|
|
27
29
|
DecorationType: () => DecorationType,
|
|
28
30
|
Direction: () => Direction,
|
|
31
|
+
DividerDataAlignment: () => DividerDataAlignment,
|
|
29
32
|
FontType: () => FontType,
|
|
30
33
|
GIFType: () => GIFType,
|
|
31
34
|
InitialExpandedItems: () => InitialExpandedItems,
|
|
35
|
+
Layout: () => Layout,
|
|
32
36
|
LayoutType: () => LayoutType,
|
|
33
37
|
LineStyle: () => LineStyle,
|
|
34
38
|
MapType: () => MapType,
|
|
35
39
|
NodeType: () => NodeType,
|
|
36
40
|
NullValue: () => NullValue,
|
|
37
41
|
Orientation: () => Orientation,
|
|
42
|
+
Placement: () => Placement,
|
|
38
43
|
Plugin: () => Plugin,
|
|
39
44
|
PluginContainerDataAlignment: () => PluginContainerDataAlignment,
|
|
40
45
|
PollLayoutDirection: () => PollLayoutDirection,
|
|
41
46
|
PollLayoutType: () => PollLayoutType,
|
|
42
47
|
Position: () => Position,
|
|
48
|
+
Resizing: () => Resizing,
|
|
43
49
|
Source: () => Source,
|
|
50
|
+
StylesPosition: () => StylesPosition,
|
|
44
51
|
Target: () => Target,
|
|
45
52
|
TargetFormat: () => TargetFormat,
|
|
46
53
|
TextAlignment: () => TextAlignment,
|
|
@@ -332,11 +339,11 @@ var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignmen
|
|
|
332
339
|
PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
|
|
333
340
|
return PluginContainerDataAlignment2;
|
|
334
341
|
})(PluginContainerDataAlignment || {});
|
|
335
|
-
var
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
return
|
|
339
|
-
})(
|
|
342
|
+
var ButtonDataType = /* @__PURE__ */ ((ButtonDataType2) => {
|
|
343
|
+
ButtonDataType2["LINK"] = "LINK";
|
|
344
|
+
ButtonDataType2["ACTION"] = "ACTION";
|
|
345
|
+
return ButtonDataType2;
|
|
346
|
+
})(ButtonDataType || {});
|
|
340
347
|
var Target = /* @__PURE__ */ ((Target2) => {
|
|
341
348
|
Target2["SELF"] = "SELF";
|
|
342
349
|
Target2["BLANK"] = "BLANK";
|
|
@@ -365,12 +372,12 @@ var Width = /* @__PURE__ */ ((Width2) => {
|
|
|
365
372
|
Width2["SMALL"] = "SMALL";
|
|
366
373
|
return Width2;
|
|
367
374
|
})(Width || {});
|
|
368
|
-
var
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
return
|
|
373
|
-
})(
|
|
375
|
+
var DividerDataAlignment = /* @__PURE__ */ ((DividerDataAlignment2) => {
|
|
376
|
+
DividerDataAlignment2["CENTER"] = "CENTER";
|
|
377
|
+
DividerDataAlignment2["LEFT"] = "LEFT";
|
|
378
|
+
DividerDataAlignment2["RIGHT"] = "RIGHT";
|
|
379
|
+
return DividerDataAlignment2;
|
|
380
|
+
})(DividerDataAlignment || {});
|
|
374
381
|
var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
|
|
375
382
|
ViewMode2["NONE"] = "NONE";
|
|
376
383
|
ViewMode2["FULL"] = "FULL";
|
|
@@ -418,13 +425,13 @@ var Source = /* @__PURE__ */ ((Source2) => {
|
|
|
418
425
|
Source2["ADSENSE"] = "ADSENSE";
|
|
419
426
|
return Source2;
|
|
420
427
|
})(Source || {});
|
|
421
|
-
var
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
return
|
|
427
|
-
})(
|
|
428
|
+
var StylesPosition = /* @__PURE__ */ ((StylesPosition2) => {
|
|
429
|
+
StylesPosition2["START"] = "START";
|
|
430
|
+
StylesPosition2["END"] = "END";
|
|
431
|
+
StylesPosition2["TOP"] = "TOP";
|
|
432
|
+
StylesPosition2["HIDDEN"] = "HIDDEN";
|
|
433
|
+
return StylesPosition2;
|
|
434
|
+
})(StylesPosition || {});
|
|
428
435
|
var MapType = /* @__PURE__ */ ((MapType2) => {
|
|
429
436
|
MapType2["ROADMAP"] = "ROADMAP";
|
|
430
437
|
MapType2["SATELITE"] = "SATELITE";
|
|
@@ -480,6 +487,43 @@ var FontType = /* @__PURE__ */ ((FontType2) => {
|
|
|
480
487
|
FontType2["EM"] = "EM";
|
|
481
488
|
return FontType2;
|
|
482
489
|
})(FontType || {});
|
|
490
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
491
|
+
Position2["START"] = "START";
|
|
492
|
+
Position2["END"] = "END";
|
|
493
|
+
Position2["TOP"] = "TOP";
|
|
494
|
+
return Position2;
|
|
495
|
+
})(Position || {});
|
|
496
|
+
var AspectRatio = /* @__PURE__ */ ((AspectRatio2) => {
|
|
497
|
+
AspectRatio2["SQUARE"] = "SQUARE";
|
|
498
|
+
AspectRatio2["RECTANGLE"] = "RECTANGLE";
|
|
499
|
+
return AspectRatio2;
|
|
500
|
+
})(AspectRatio || {});
|
|
501
|
+
var Resizing = /* @__PURE__ */ ((Resizing2) => {
|
|
502
|
+
Resizing2["FILL"] = "FILL";
|
|
503
|
+
Resizing2["FIT"] = "FIT";
|
|
504
|
+
return Resizing2;
|
|
505
|
+
})(Resizing || {});
|
|
506
|
+
var Placement = /* @__PURE__ */ ((Placement2) => {
|
|
507
|
+
Placement2["IMAGE"] = "IMAGE";
|
|
508
|
+
Placement2["PRODUCT_INFO"] = "PRODUCT_INFO";
|
|
509
|
+
return Placement2;
|
|
510
|
+
})(Placement || {});
|
|
511
|
+
var Type = /* @__PURE__ */ ((Type2) => {
|
|
512
|
+
Type2["CONTAINED"] = "CONTAINED";
|
|
513
|
+
Type2["FRAMELESS"] = "FRAMELESS";
|
|
514
|
+
return Type2;
|
|
515
|
+
})(Type || {});
|
|
516
|
+
var Alignment = /* @__PURE__ */ ((Alignment2) => {
|
|
517
|
+
Alignment2["START"] = "START";
|
|
518
|
+
Alignment2["CENTER"] = "CENTER";
|
|
519
|
+
Alignment2["END"] = "END";
|
|
520
|
+
return Alignment2;
|
|
521
|
+
})(Alignment || {});
|
|
522
|
+
var Layout = /* @__PURE__ */ ((Layout2) => {
|
|
523
|
+
Layout2["STACKED"] = "STACKED";
|
|
524
|
+
Layout2["SIDE_BY_SIDE"] = "SIDE_BY_SIDE";
|
|
525
|
+
return Layout2;
|
|
526
|
+
})(Layout || {});
|
|
483
527
|
var AppType = /* @__PURE__ */ ((AppType2) => {
|
|
484
528
|
AppType2["PRODUCT"] = "PRODUCT";
|
|
485
529
|
AppType2["EVENT"] = "EVENT";
|
|
@@ -578,11 +622,11 @@ async function convertToRicosDocument2(options) {
|
|
|
578
622
|
throw transformedError;
|
|
579
623
|
}
|
|
580
624
|
}
|
|
581
|
-
async function convertFromRicosDocument2(
|
|
625
|
+
async function convertFromRicosDocument2(targetFormat, options) {
|
|
582
626
|
const { httpClient, sideEffects } = arguments[2];
|
|
583
627
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
584
|
-
|
|
585
|
-
|
|
628
|
+
targetFormat,
|
|
629
|
+
document: options?.document,
|
|
586
630
|
plainTextOptions: options?.plainTextOptions
|
|
587
631
|
});
|
|
588
632
|
const reqOpts = convertFromRicosDocument(payload);
|
|
@@ -597,13 +641,13 @@ async function convertFromRicosDocument2(document, options) {
|
|
|
597
641
|
{
|
|
598
642
|
spreadPathsToArguments: {},
|
|
599
643
|
explicitPathsToArguments: {
|
|
600
|
-
|
|
601
|
-
|
|
644
|
+
targetFormat: "$[0]",
|
|
645
|
+
document: "$[1].document",
|
|
602
646
|
plainTextOptions: "$[1].plainTextOptions"
|
|
603
647
|
},
|
|
604
648
|
singleArgumentUnchanged: false
|
|
605
649
|
},
|
|
606
|
-
["
|
|
650
|
+
["targetFormat", "options"]
|
|
607
651
|
);
|
|
608
652
|
sideEffects?.onError?.(err);
|
|
609
653
|
throw transformedError;
|
|
@@ -613,25 +657,32 @@ async function convertFromRicosDocument2(document, options) {
|
|
|
613
657
|
0 && (module.exports = {
|
|
614
658
|
Alignment,
|
|
615
659
|
AppType,
|
|
660
|
+
AspectRatio,
|
|
616
661
|
BackgroundType,
|
|
662
|
+
ButtonDataType,
|
|
617
663
|
Crop,
|
|
618
664
|
DecorationType,
|
|
619
665
|
Direction,
|
|
666
|
+
DividerDataAlignment,
|
|
620
667
|
FontType,
|
|
621
668
|
GIFType,
|
|
622
669
|
InitialExpandedItems,
|
|
670
|
+
Layout,
|
|
623
671
|
LayoutType,
|
|
624
672
|
LineStyle,
|
|
625
673
|
MapType,
|
|
626
674
|
NodeType,
|
|
627
675
|
NullValue,
|
|
628
676
|
Orientation,
|
|
677
|
+
Placement,
|
|
629
678
|
Plugin,
|
|
630
679
|
PluginContainerDataAlignment,
|
|
631
680
|
PollLayoutDirection,
|
|
632
681
|
PollLayoutType,
|
|
633
682
|
Position,
|
|
683
|
+
Resizing,
|
|
634
684
|
Source,
|
|
685
|
+
StylesPosition,
|
|
635
686
|
Target,
|
|
636
687
|
TargetFormat,
|
|
637
688
|
TextAlignment,
|