@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
package/build/es/meta.d.mts
CHANGED
|
@@ -252,7 +252,7 @@ interface ButtonData {
|
|
|
252
252
|
/** Styling for the button's container. */
|
|
253
253
|
containerData?: PluginContainerData;
|
|
254
254
|
/** The button type. */
|
|
255
|
-
type?:
|
|
255
|
+
type?: ButtonDataTypeWithLiterals;
|
|
256
256
|
/** Styling for the button. */
|
|
257
257
|
styles?: Styles;
|
|
258
258
|
/** The text to display on the button. */
|
|
@@ -360,14 +360,14 @@ interface Height {
|
|
|
360
360
|
/** A custom height value in pixels. */
|
|
361
361
|
custom?: string | null;
|
|
362
362
|
}
|
|
363
|
-
declare enum
|
|
363
|
+
declare enum ButtonDataType {
|
|
364
364
|
/** Regular link button */
|
|
365
365
|
LINK = "LINK",
|
|
366
366
|
/** Triggers custom action that is defined in plugin configuration by the consumer */
|
|
367
367
|
ACTION = "ACTION"
|
|
368
368
|
}
|
|
369
369
|
/** @enumType */
|
|
370
|
-
type
|
|
370
|
+
type ButtonDataTypeWithLiterals = ButtonDataType | 'LINK' | 'ACTION';
|
|
371
371
|
interface Styles {
|
|
372
372
|
/**
|
|
373
373
|
* Deprecated: Use `borderWidth` and `borderRadius` instead.
|
|
@@ -500,7 +500,7 @@ interface DividerData {
|
|
|
500
500
|
/** Divider width. */
|
|
501
501
|
width?: WidthWithLiterals;
|
|
502
502
|
/** Divider alignment. */
|
|
503
|
-
alignment?:
|
|
503
|
+
alignment?: DividerDataAlignmentWithLiterals;
|
|
504
504
|
}
|
|
505
505
|
declare enum LineStyle {
|
|
506
506
|
/** Single Line */
|
|
@@ -524,7 +524,7 @@ declare enum Width {
|
|
|
524
524
|
}
|
|
525
525
|
/** @enumType */
|
|
526
526
|
type WidthWithLiterals = Width | 'LARGE' | 'MEDIUM' | 'SMALL';
|
|
527
|
-
declare enum
|
|
527
|
+
declare enum DividerDataAlignment {
|
|
528
528
|
/** Center alignment */
|
|
529
529
|
CENTER = "CENTER",
|
|
530
530
|
/** Left alignment */
|
|
@@ -533,7 +533,7 @@ declare enum Alignment {
|
|
|
533
533
|
RIGHT = "RIGHT"
|
|
534
534
|
}
|
|
535
535
|
/** @enumType */
|
|
536
|
-
type
|
|
536
|
+
type DividerDataAlignmentWithLiterals = DividerDataAlignment | 'CENTER' | 'LEFT' | 'RIGHT';
|
|
537
537
|
interface FileData {
|
|
538
538
|
/** Styling for the file's container. */
|
|
539
539
|
containerData?: PluginContainerData;
|
|
@@ -658,7 +658,7 @@ interface ItemDataOneOf {
|
|
|
658
658
|
}
|
|
659
659
|
interface GalleryOptions {
|
|
660
660
|
/** Gallery layout. */
|
|
661
|
-
layout?:
|
|
661
|
+
layout?: GalleryOptionsLayout;
|
|
662
662
|
/** Styling for gallery items. */
|
|
663
663
|
item?: ItemStyle;
|
|
664
664
|
/** Styling for gallery thumbnail images. */
|
|
@@ -718,7 +718,7 @@ declare enum ThumbnailsAlignment {
|
|
|
718
718
|
}
|
|
719
719
|
/** @enumType */
|
|
720
720
|
type ThumbnailsAlignmentWithLiterals = ThumbnailsAlignment | 'TOP' | 'RIGHT' | 'BOTTOM' | 'LEFT' | 'NONE';
|
|
721
|
-
interface
|
|
721
|
+
interface GalleryOptionsLayout {
|
|
722
722
|
/** Gallery layout type. */
|
|
723
723
|
type?: LayoutTypeWithLiterals;
|
|
724
724
|
/** Sets whether horizontal scroll is enabled. Defaults to `true` unless the layout `type` is set to `GRID` or `COLLAGE`. */
|
|
@@ -880,7 +880,7 @@ interface LinkPreviewData {
|
|
|
880
880
|
/** Styling for the link preview. */
|
|
881
881
|
styles?: LinkPreviewDataStyles;
|
|
882
882
|
}
|
|
883
|
-
declare enum
|
|
883
|
+
declare enum StylesPosition {
|
|
884
884
|
/** Thumbnail positioned at the start (left in LTR layouts, right in RTL layouts) */
|
|
885
885
|
START = "START",
|
|
886
886
|
/** Thumbnail positioned at the end (right in LTR layouts, left in RTL layouts) */
|
|
@@ -891,7 +891,7 @@ declare enum Position {
|
|
|
891
891
|
HIDDEN = "HIDDEN"
|
|
892
892
|
}
|
|
893
893
|
/** @enumType */
|
|
894
|
-
type
|
|
894
|
+
type StylesPositionWithLiterals = StylesPosition | 'START' | 'END' | 'TOP' | 'HIDDEN';
|
|
895
895
|
interface LinkPreviewDataStyles {
|
|
896
896
|
/**
|
|
897
897
|
* Background color as a hexadecimal value.
|
|
@@ -923,7 +923,7 @@ interface LinkPreviewDataStyles {
|
|
|
923
923
|
*/
|
|
924
924
|
borderColor?: string | null;
|
|
925
925
|
/** Position of thumbnail. Defaults to `START`. */
|
|
926
|
-
thumbnailPosition?:
|
|
926
|
+
thumbnailPosition?: StylesPositionWithLiterals;
|
|
927
927
|
}
|
|
928
928
|
interface MapData {
|
|
929
929
|
/** Styling for the map's container. */
|
|
@@ -1277,6 +1277,32 @@ interface AppEmbedData extends AppEmbedDataAppDataOneOf {
|
|
|
1277
1277
|
url?: string | null;
|
|
1278
1278
|
/** An image for the embedded content. */
|
|
1279
1279
|
image?: Media;
|
|
1280
|
+
/** Whether to hide the image. */
|
|
1281
|
+
hideImage?: boolean | null;
|
|
1282
|
+
/** Whether to hide the title. */
|
|
1283
|
+
hideTitle?: boolean | null;
|
|
1284
|
+
/** Whether to hide the price. */
|
|
1285
|
+
hidePrice?: boolean | null;
|
|
1286
|
+
/** Whether to hide the description (Event and Booking). */
|
|
1287
|
+
hideDescription?: boolean | null;
|
|
1288
|
+
/** Whether to hide the date and time (Event). */
|
|
1289
|
+
hideDateTime?: boolean | null;
|
|
1290
|
+
/** Whether to hide the location (Event). */
|
|
1291
|
+
hideLocation?: boolean | null;
|
|
1292
|
+
/** Whether to hide the duration (Booking). */
|
|
1293
|
+
hideDuration?: boolean | null;
|
|
1294
|
+
/** Whether to hide the button. */
|
|
1295
|
+
hideButton?: boolean | null;
|
|
1296
|
+
/** Whether to hide the ribbon. */
|
|
1297
|
+
hideRibbon?: boolean | null;
|
|
1298
|
+
/** Button styling options. */
|
|
1299
|
+
buttonStyles?: ButtonStyles;
|
|
1300
|
+
/** Image styling options. */
|
|
1301
|
+
imageStyles?: ImageStyles;
|
|
1302
|
+
/** Ribbon styling options. */
|
|
1303
|
+
ribbonStyles?: RibbonStyles;
|
|
1304
|
+
/** Card styling options. */
|
|
1305
|
+
cardStyles?: CardStyles;
|
|
1280
1306
|
}
|
|
1281
1307
|
/** @oneof */
|
|
1282
1308
|
interface AppEmbedDataAppDataOneOf {
|
|
@@ -1285,6 +1311,66 @@ interface AppEmbedDataAppDataOneOf {
|
|
|
1285
1311
|
/** Data for embedded Wix Events content. */
|
|
1286
1312
|
eventData?: EventData;
|
|
1287
1313
|
}
|
|
1314
|
+
declare enum Position {
|
|
1315
|
+
/** Image positioned at the start (left in LTR layouts, right in RTL layouts) */
|
|
1316
|
+
START = "START",
|
|
1317
|
+
/** Image positioned at the end (right in LTR layouts, left in RTL layouts) */
|
|
1318
|
+
END = "END",
|
|
1319
|
+
/** Image positioned at the top */
|
|
1320
|
+
TOP = "TOP"
|
|
1321
|
+
}
|
|
1322
|
+
/** @enumType */
|
|
1323
|
+
type PositionWithLiterals = Position | 'START' | 'END' | 'TOP';
|
|
1324
|
+
declare enum AspectRatio {
|
|
1325
|
+
/** 1:1 aspect ratio */
|
|
1326
|
+
SQUARE = "SQUARE",
|
|
1327
|
+
/** 16:9 aspect ratio */
|
|
1328
|
+
RECTANGLE = "RECTANGLE"
|
|
1329
|
+
}
|
|
1330
|
+
/** @enumType */
|
|
1331
|
+
type AspectRatioWithLiterals = AspectRatio | 'SQUARE' | 'RECTANGLE';
|
|
1332
|
+
declare enum Resizing {
|
|
1333
|
+
/** Fill the container, may crop the image */
|
|
1334
|
+
FILL = "FILL",
|
|
1335
|
+
/** Fit the image within the container */
|
|
1336
|
+
FIT = "FIT"
|
|
1337
|
+
}
|
|
1338
|
+
/** @enumType */
|
|
1339
|
+
type ResizingWithLiterals = Resizing | 'FILL' | 'FIT';
|
|
1340
|
+
declare enum Placement {
|
|
1341
|
+
/** Ribbon placed on the image */
|
|
1342
|
+
IMAGE = "IMAGE",
|
|
1343
|
+
/** Ribbon placed on the product information */
|
|
1344
|
+
PRODUCT_INFO = "PRODUCT_INFO"
|
|
1345
|
+
}
|
|
1346
|
+
/** @enumType */
|
|
1347
|
+
type PlacementWithLiterals = Placement | 'IMAGE' | 'PRODUCT_INFO';
|
|
1348
|
+
declare enum Type {
|
|
1349
|
+
/** Card with visible border and background */
|
|
1350
|
+
CONTAINED = "CONTAINED",
|
|
1351
|
+
/** Card without visible border */
|
|
1352
|
+
FRAMELESS = "FRAMELESS"
|
|
1353
|
+
}
|
|
1354
|
+
/** @enumType */
|
|
1355
|
+
type TypeWithLiterals = Type | 'CONTAINED' | 'FRAMELESS';
|
|
1356
|
+
declare enum Alignment {
|
|
1357
|
+
/** Content aligned to start (left in LTR layouts, right in RTL layouts) */
|
|
1358
|
+
START = "START",
|
|
1359
|
+
/** Content centered */
|
|
1360
|
+
CENTER = "CENTER",
|
|
1361
|
+
/** Content aligned to end (right in LTR layouts, left in RTL layouts) */
|
|
1362
|
+
END = "END"
|
|
1363
|
+
}
|
|
1364
|
+
/** @enumType */
|
|
1365
|
+
type AlignmentWithLiterals = Alignment | 'START' | 'CENTER' | 'END';
|
|
1366
|
+
declare enum Layout {
|
|
1367
|
+
/** Elements stacked vertically */
|
|
1368
|
+
STACKED = "STACKED",
|
|
1369
|
+
/** Elements arranged horizontally */
|
|
1370
|
+
SIDE_BY_SIDE = "SIDE_BY_SIDE"
|
|
1371
|
+
}
|
|
1372
|
+
/** @enumType */
|
|
1373
|
+
type LayoutWithLiterals = Layout | 'STACKED' | 'SIDE_BY_SIDE';
|
|
1288
1374
|
declare enum AppType {
|
|
1289
1375
|
PRODUCT = "PRODUCT",
|
|
1290
1376
|
EVENT = "EVENT",
|
|
@@ -1302,6 +1388,122 @@ interface EventData {
|
|
|
1302
1388
|
/** Event location. */
|
|
1303
1389
|
location?: string | null;
|
|
1304
1390
|
}
|
|
1391
|
+
interface ButtonStyles {
|
|
1392
|
+
/** Text to display on the button. */
|
|
1393
|
+
buttonText?: string | null;
|
|
1394
|
+
/** Border width in pixels. */
|
|
1395
|
+
borderWidth?: number | null;
|
|
1396
|
+
/** Border radius in pixels. */
|
|
1397
|
+
borderRadius?: number | null;
|
|
1398
|
+
/**
|
|
1399
|
+
* Border color as a hexadecimal value.
|
|
1400
|
+
* @format COLOR_HEX
|
|
1401
|
+
*/
|
|
1402
|
+
borderColor?: string | null;
|
|
1403
|
+
/**
|
|
1404
|
+
* Text color as a hexadecimal value.
|
|
1405
|
+
* @format COLOR_HEX
|
|
1406
|
+
*/
|
|
1407
|
+
textColor?: string | null;
|
|
1408
|
+
/**
|
|
1409
|
+
* Background color as a hexadecimal value.
|
|
1410
|
+
* @format COLOR_HEX
|
|
1411
|
+
*/
|
|
1412
|
+
backgroundColor?: string | null;
|
|
1413
|
+
/**
|
|
1414
|
+
* Border color as a hexadecimal value (hover state).
|
|
1415
|
+
* @format COLOR_HEX
|
|
1416
|
+
*/
|
|
1417
|
+
borderColorHover?: string | null;
|
|
1418
|
+
/**
|
|
1419
|
+
* Text color as a hexadecimal value (hover state).
|
|
1420
|
+
* @format COLOR_HEX
|
|
1421
|
+
*/
|
|
1422
|
+
textColorHover?: string | null;
|
|
1423
|
+
/**
|
|
1424
|
+
* Background color as a hexadecimal value (hover state).
|
|
1425
|
+
* @format COLOR_HEX
|
|
1426
|
+
*/
|
|
1427
|
+
backgroundColorHover?: string | null;
|
|
1428
|
+
/** Button size option, one of `SMALL`, `MEDIUM` or `LARGE`. Defaults to `MEDIUM`. */
|
|
1429
|
+
buttonSize?: string | null;
|
|
1430
|
+
}
|
|
1431
|
+
interface ImageStyles {
|
|
1432
|
+
/** Whether to hide the image. */
|
|
1433
|
+
hideImage?: boolean | null;
|
|
1434
|
+
/** Position of image. Defaults to `START`. */
|
|
1435
|
+
imagePosition?: PositionWithLiterals;
|
|
1436
|
+
/** Aspect ratio for the image. Defaults to `SQUARE`. */
|
|
1437
|
+
aspectRatio?: AspectRatioWithLiterals;
|
|
1438
|
+
/** How the image should be resized. Defaults to `FILL`. */
|
|
1439
|
+
resizing?: ResizingWithLiterals;
|
|
1440
|
+
/**
|
|
1441
|
+
* Image border color as a hexadecimal value.
|
|
1442
|
+
* @format COLOR_HEX
|
|
1443
|
+
*/
|
|
1444
|
+
borderColor?: string | null;
|
|
1445
|
+
/** Image border width in pixels. */
|
|
1446
|
+
borderWidth?: number | null;
|
|
1447
|
+
/** Image border radius in pixels. */
|
|
1448
|
+
borderRadius?: number | null;
|
|
1449
|
+
}
|
|
1450
|
+
interface RibbonStyles {
|
|
1451
|
+
/** Text to display on the ribbon. */
|
|
1452
|
+
ribbonText?: string | null;
|
|
1453
|
+
/**
|
|
1454
|
+
* Ribbon background color as a hexadecimal value.
|
|
1455
|
+
* @format COLOR_HEX
|
|
1456
|
+
*/
|
|
1457
|
+
backgroundColor?: string | null;
|
|
1458
|
+
/**
|
|
1459
|
+
* Ribbon text color as a hexadecimal value.
|
|
1460
|
+
* @format COLOR_HEX
|
|
1461
|
+
*/
|
|
1462
|
+
textColor?: string | null;
|
|
1463
|
+
/**
|
|
1464
|
+
* Ribbon border color as a hexadecimal value.
|
|
1465
|
+
* @format COLOR_HEX
|
|
1466
|
+
*/
|
|
1467
|
+
borderColor?: string | null;
|
|
1468
|
+
/** Ribbon border width in pixels. */
|
|
1469
|
+
borderWidth?: number | null;
|
|
1470
|
+
/** Ribbon border radius in pixels. */
|
|
1471
|
+
borderRadius?: number | null;
|
|
1472
|
+
/** Placement of the ribbon. Defaults to `IMAGE`. */
|
|
1473
|
+
ribbonPlacement?: PlacementWithLiterals;
|
|
1474
|
+
}
|
|
1475
|
+
interface CardStyles {
|
|
1476
|
+
/**
|
|
1477
|
+
* Card background color as a hexadecimal value.
|
|
1478
|
+
* @format COLOR_HEX
|
|
1479
|
+
*/
|
|
1480
|
+
backgroundColor?: string | null;
|
|
1481
|
+
/**
|
|
1482
|
+
* Card border color as a hexadecimal value.
|
|
1483
|
+
* @format COLOR_HEX
|
|
1484
|
+
*/
|
|
1485
|
+
borderColor?: string | null;
|
|
1486
|
+
/** Card border width in pixels. */
|
|
1487
|
+
borderWidth?: number | null;
|
|
1488
|
+
/** Card border radius in pixels. */
|
|
1489
|
+
borderRadius?: number | null;
|
|
1490
|
+
/** Card type. Defaults to `CONTAINED`. */
|
|
1491
|
+
type?: TypeWithLiterals;
|
|
1492
|
+
/** Content alignment. Defaults to `START`. */
|
|
1493
|
+
alignment?: AlignmentWithLiterals;
|
|
1494
|
+
/** Layout for title and price. Defaults to `STACKED`. */
|
|
1495
|
+
titlePriceLayout?: LayoutWithLiterals;
|
|
1496
|
+
/**
|
|
1497
|
+
* Title text color as a hexadecimal value.
|
|
1498
|
+
* @format COLOR_HEX
|
|
1499
|
+
*/
|
|
1500
|
+
titleColor?: string | null;
|
|
1501
|
+
/**
|
|
1502
|
+
* Text color as a hexadecimal value.
|
|
1503
|
+
* @format COLOR_HEX
|
|
1504
|
+
*/
|
|
1505
|
+
textColor?: string | null;
|
|
1506
|
+
}
|
|
1305
1507
|
interface VideoData {
|
|
1306
1508
|
/** Styling for the video's container. */
|
|
1307
1509
|
containerData?: PluginContainerData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { ValidateDocumentOptions, ValidateDocumentResponse, ConvertToRicosDocumentOptions, ConvertToRicosDocumentResponse,
|
|
3
|
-
export { Alignment, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AudioData, Background, BackgroundBackgroundOneOf, BackgroundType, BlockquoteData, BookingData, Border, BorderColors, BulletedListData, ButtonData, CaptionData, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, ConvertFromRicosDocumentOptionsOptionsOneOf, ConvertFromRicosDocumentRequest, ConvertFromRicosDocumentRequestOptionsOneOf, ConvertFromRicosDocumentResponseResultOneOf, ConvertToRicosDocumentOptionsSourceOneOf, ConvertToRicosDocumentRequest, ConvertToRicosDocumentRequestSourceOneOf, Crop, Decoration, DecorationDataOneOf, DecorationType, Design, Dimensions, Direction, DividerData, DocumentStyle, EmbedData, EventData, FileData, FileSource, FileSourceDataOneOf, FontSizeData, FontType, GIF, GIFData, GIFType, GalleryData, GalleryOptions, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, Image, ImageData, ImageDataStyles, InitialExpandedItems, Item, ItemDataOneOf, ItemStyle, Layout, LayoutCellData, LayoutType, LineStyle, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListValue, MapData, MapSettings, MapType, Media, MentionData, Metadata, Node, NodeDataOneOf, NodeStyle, NodeType, NullValue, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, Orientation, PDFSettings, ParagraphData, Permissions, PlainTextOptions, PlaybackOptions, Plugin, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutType, Position, Rel, RicosDocumentOptions, RicosDocumentPlaceholder, RicosDocumentViolation, Settings, Source, Spoiler, SpoilerData, Styles, StylesBorder, TableCellData, TableData, Target, TargetFormat, TextAlignment, TextData, TextNodeStyle, TextStyle, Thumbnails, ThumbnailsAlignment, Type, ValidateDocumentRequest, VerticalAlignment, Video, VideoData, ViewMode, ViewRole, VoteRole, Width, WidthType } from './index.typings.js';
|
|
2
|
+
import { ValidateDocumentOptions, ValidateDocumentResponse, ConvertToRicosDocumentOptions, ConvertToRicosDocumentResponse, TargetFormatWithLiterals, ConvertFromRicosDocumentOptions, ConvertFromRicosDocumentResponse } from './index.typings.js';
|
|
3
|
+
export { Alignment, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AspectRatio, AudioData, Background, BackgroundBackgroundOneOf, BackgroundType, BlockquoteData, BookingData, Border, BorderColors, BulletedListData, ButtonData, ButtonDataType, ButtonStyles, CaptionData, CardStyles, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, ConvertFromRicosDocumentOptionsOptionsOneOf, ConvertFromRicosDocumentRequest, ConvertFromRicosDocumentRequestOptionsOneOf, ConvertFromRicosDocumentResponseResultOneOf, ConvertToRicosDocumentOptionsSourceOneOf, ConvertToRicosDocumentRequest, ConvertToRicosDocumentRequestSourceOneOf, Crop, Decoration, DecorationDataOneOf, DecorationType, Design, Dimensions, Direction, DividerData, DividerDataAlignment, DocumentStyle, EmbedData, EventData, FileData, FileSource, FileSourceDataOneOf, FontSizeData, FontType, GIF, GIFData, GIFType, GalleryData, GalleryOptions, GalleryOptionsLayout, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, Image, ImageData, ImageDataStyles, ImageStyles, InitialExpandedItems, Item, ItemDataOneOf, ItemStyle, Layout, LayoutCellData, LayoutType, LineStyle, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListValue, MapData, MapSettings, MapType, Media, MentionData, Metadata, Node, NodeDataOneOf, NodeStyle, NodeType, NullValue, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, Orientation, PDFSettings, ParagraphData, Permissions, Placement, PlainTextOptions, PlaybackOptions, Plugin, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutType, Position, Rel, Resizing, RibbonStyles, RichContent, RicosDocumentOptions, RicosDocumentPlaceholder, RicosDocumentViolation, Settings, Source, Spoiler, SpoilerData, Styles, StylesBorder, StylesPosition, TableCellData, TableData, Target, TargetFormat, TextAlignment, TextData, TextNodeStyle, TextStyle, Thumbnails, ThumbnailsAlignment, Type, ValidateDocumentRequest, VerticalAlignment, Video, VideoData, ViewMode, ViewRole, VoteRole, Width, WidthType } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function validateDocument$1(httpClient: HttpClient): ValidateDocumentSignature;
|
|
6
6
|
interface ValidateDocumentSignature {
|
|
@@ -23,13 +23,13 @@ declare function convertFromRicosDocument$1(httpClient: HttpClient): ConvertFrom
|
|
|
23
23
|
interface ConvertFromRicosDocumentSignature {
|
|
24
24
|
/**
|
|
25
25
|
* Converts a Ricos document to the specified format.
|
|
26
|
-
* @param -
|
|
26
|
+
* @param - Format to convert the document to.
|
|
27
27
|
*/
|
|
28
|
-
(
|
|
28
|
+
(targetFormat: TargetFormatWithLiterals, options?: NonNullablePaths<ConvertFromRicosDocumentOptions, `document`>): Promise<NonNullablePaths<ConvertFromRicosDocumentResponse, `markdown` | `html` | `plainText`>>;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
declare const validateDocument: MaybeContext<BuildRESTFunction<typeof validateDocument$1> & typeof validateDocument$1>;
|
|
32
32
|
declare const convertToRicosDocument: MaybeContext<BuildRESTFunction<typeof convertToRicosDocument$1> & typeof convertToRicosDocument$1>;
|
|
33
33
|
declare const convertFromRicosDocument: MaybeContext<BuildRESTFunction<typeof convertFromRicosDocument$1> & typeof convertFromRicosDocument$1>;
|
|
34
34
|
|
|
35
|
-
export { ConvertFromRicosDocumentOptions, ConvertFromRicosDocumentResponse, ConvertToRicosDocumentOptions, ConvertToRicosDocumentResponse,
|
|
35
|
+
export { ConvertFromRicosDocumentOptions, ConvertFromRicosDocumentResponse, ConvertToRicosDocumentOptions, ConvertToRicosDocumentResponse, ValidateDocumentOptions, ValidateDocumentResponse, convertFromRicosDocument, convertToRicosDocument, validateDocument };
|
|
@@ -22,25 +22,32 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_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;
|
|
@@ -627,8 +671,8 @@ function convertToRicosDocument3(httpClient) {
|
|
|
627
671
|
);
|
|
628
672
|
}
|
|
629
673
|
function convertFromRicosDocument3(httpClient) {
|
|
630
|
-
return (
|
|
631
|
-
|
|
674
|
+
return (targetFormat, options) => convertFromRicosDocument2(
|
|
675
|
+
targetFormat,
|
|
632
676
|
options,
|
|
633
677
|
// @ts-ignore
|
|
634
678
|
{ httpClient }
|
|
@@ -644,25 +688,32 @@ var convertFromRicosDocument4 = /* @__PURE__ */ (0, import_rest_modules2.createR
|
|
|
644
688
|
0 && (module.exports = {
|
|
645
689
|
Alignment,
|
|
646
690
|
AppType,
|
|
691
|
+
AspectRatio,
|
|
647
692
|
BackgroundType,
|
|
693
|
+
ButtonDataType,
|
|
648
694
|
Crop,
|
|
649
695
|
DecorationType,
|
|
650
696
|
Direction,
|
|
697
|
+
DividerDataAlignment,
|
|
651
698
|
FontType,
|
|
652
699
|
GIFType,
|
|
653
700
|
InitialExpandedItems,
|
|
701
|
+
Layout,
|
|
654
702
|
LayoutType,
|
|
655
703
|
LineStyle,
|
|
656
704
|
MapType,
|
|
657
705
|
NodeType,
|
|
658
706
|
NullValue,
|
|
659
707
|
Orientation,
|
|
708
|
+
Placement,
|
|
660
709
|
Plugin,
|
|
661
710
|
PluginContainerDataAlignment,
|
|
662
711
|
PollLayoutDirection,
|
|
663
712
|
PollLayoutType,
|
|
664
713
|
Position,
|
|
714
|
+
Resizing,
|
|
665
715
|
Source,
|
|
716
|
+
StylesPosition,
|
|
666
717
|
Target,
|
|
667
718
|
TargetFormat,
|
|
668
719
|
TextAlignment,
|