@wix/auto_sdk_rich-content_ricos-conversations 1.0.9 → 1.0.11

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +34 -3
  2. package/build/cjs/index.js +500 -7
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +88 -1
  5. package/build/cjs/index.typings.js +478 -2
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +40 -2
  8. package/build/cjs/meta.js +449 -2
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +34 -3
  11. package/build/es/index.mjs +491 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +88 -1
  14. package/build/es/index.typings.mjs +474 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +40 -2
  17. package/build/es/meta.mjs +445 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +34 -3
  20. package/build/internal/cjs/index.js +500 -7
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +88 -1
  23. package/build/internal/cjs/index.typings.js +478 -2
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +40 -2
  26. package/build/internal/cjs/meta.js +449 -2
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +34 -3
  29. package/build/internal/es/index.mjs +491 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +88 -1
  32. package/build/internal/es/index.typings.mjs +474 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +40 -2
  35. package/build/internal/es/meta.mjs +445 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { CreateConversationStreamedOptions, ConversationResponse, CreateRicosConversationOptions, CreateRicosConversationResponse, CreateRicosConversationHtmlOptions, CreateRicosConversationHTMLResponse } from './index.typings.js';
3
- export { Action, ActionEvent, ActionWithLiterals, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundBackgroundType, BackgroundBackgroundTypeWithLiterals, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BlockquoteData, BookingData, Border, BorderColors, BorderWidths, BulletedListData, Button, ButtonBorder, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonSize, ButtonSizeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, Center, ChunkType, ChunkTypeWithLiterals, CodeBlockData, CollapsibleListData, ColorData, ColorOptions, ColorSwatch, ColorSwatchColorTypeOptionsOneOf, ColorSwatchType, ColorSwatchTypeWithLiterals, Colors, CreateConversationStreamedRequest, CreateRicosConversationHTMLRequest, CreateRicosConversationRequest, Crop, CropWithLiterals, DebugOptions, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, Design, Dimensions, Direction, DirectionWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, ExplainOption, File, FileData, FileSource, FileSourceDataOneOf, FontFamilyData, FontSizeData, FontType, FontTypeWithLiterals, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, Gradient, GradientStop, GradientType, GradientTypeWithLiterals, HTMLData, HTMLDataDataOneOf, HeadingData, Height, HorizontalPaddingType, HorizontalPaddingTypeWithLiterals, Hover, IdentificationData, IdentificationDataIdOneOf, Image, ImageBorder, ImageData, ImageDataStyles, ImageOptions, ImageOptionsImagePosition, ImageOptionsImagePositionWithLiterals, ImagePosition, ImagePositionWithLiterals, ImageScaling, ImageScalingWithLiterals, ImageStyles, InitialExpandedItems, InitialExpandedItemsWithLiterals, InsertOptions, Item, ItemDataOneOf, ItemStyle, Layout, LayoutCellData, LayoutData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListConversationSuggestionsOptions, ListConversationSuggestionsRequest, ListConversationSuggestionsResponse, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, Media, MentionData, MessageEnvelope, Metadata, MetadataOptions, Name, NameWithLiterals, Node, NodeDataOneOf, NodeOptions, NodeStyle, NodeTextOptions, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, Orientation, OrientationWithLiterals, PDFSettings, PageSetup, ParagraphData, PatchOptions, Permissions, Placement, PlacementWithLiterals, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, Position, PositionWithLiterals, PositionsPosition, PositionsPositionWithLiterals, PricingData, ProgressOptions, PromptConfiguration, RangeDetails, Rel, ReplaceOptions, Resizing, ResizingWithLiterals, ResponsivenessBehaviour, ResponsivenessBehaviourWithLiterals, RestoreInfo, RibbonStyles, RichContent, RicosConversation, RicosConversationChunk, RicosConversationChunkTypeDataOneOf, RicosConversationUserMessageOneOf, Scaling, ScalingWithLiterals, Settings, Source, SourceWithLiterals, Spoiler, SpoilerData, Styles, StylesBorder, StylesPosition, StylesPositionWithLiterals, Suggestion, SuggestionAction, SuggestionActionWithLiterals, SuggestionOptions, SuggestionPositionDetailsOneOf, SummaryOptions, TableCellData, TableData, Target, TargetWithLiterals, TemplateSearchConfiguration, TextAlignment, TextAlignmentWithLiterals, TextData, TextNodeStyle, TextStyle, Theme, ThemeOptions, Thumbnails, ThumbnailsAlignment, ThumbnailsAlignmentWithLiterals, Tool, ToolConfigurationOneOf, ToolUseOptions, Type, TypeWithLiterals, Typography, TypographyTextStyle, V1Background, V1BackgroundBackgroundTypeOptionsOneOf, V1Gradient, V1GradientGradientTypeOptionsOneOf, V1Image, VerticalAlignment, VerticalAlignmentAlignment, VerticalAlignmentAlignmentWithLiterals, VerticalAlignmentWithLiterals, VerticalPaddingType, VerticalPaddingTypeWithLiterals, Video, VideoData, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals } from './index.typings.js';
2
+ import { CreateConversationStreamedOptions, ConversationResponse, CreateConversationAsyncOptions, CreateConversationAsyncResponse, GetConversationStreamOptions, CreateRicosConversationOptions, CreateRicosConversationResponse, CreateRicosConversationHtmlOptions, CreateRicosConversationHTMLResponse } from './index.typings.js';
3
+ export { Action, ActionEvent, ActionWithLiterals, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundBackgroundType, BackgroundBackgroundTypeWithLiterals, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BlockquoteData, BookingData, Border, BorderColors, BorderWidths, BulletedListData, Button, ButtonBorder, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonSize, ButtonSizeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, Center, ChunkType, ChunkTypeWithLiterals, CodeBlockData, CollapsibleListData, ColorData, ColorOptions, ColorSwatch, ColorSwatchColorTypeOptionsOneOf, ColorSwatchType, ColorSwatchTypeWithLiterals, Colors, CreateConversationAsyncRequest, CreateConversationStreamedRequest, CreateRicosConversationHTMLRequest, CreateRicosConversationRequest, Crop, CropWithLiterals, DebugOptions, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, Design, Dimensions, Direction, DirectionWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, ExplainOption, File, FileData, FileSource, FileSourceDataOneOf, FontFamilyData, FontSizeData, FontType, FontTypeWithLiterals, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, GetConversationStreamRequest, Gradient, GradientStop, GradientType, GradientTypeWithLiterals, HTMLData, HTMLDataDataOneOf, HeadingData, Height, HorizontalPaddingType, HorizontalPaddingTypeWithLiterals, Hover, IdentificationData, IdentificationDataIdOneOf, Image, ImageBorder, ImageData, ImageDataStyles, ImageOptions, ImageOptionsImagePosition, ImageOptionsImagePositionWithLiterals, ImagePosition, ImagePositionWithLiterals, ImageScaling, ImageScalingWithLiterals, ImageStyles, InitialExpandedItems, InitialExpandedItemsWithLiterals, InsertOptions, Item, ItemDataOneOf, ItemStyle, Layout, LayoutCellData, LayoutData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListConversationSuggestionsOptions, ListConversationSuggestionsRequest, ListConversationSuggestionsResponse, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, Media, MentionData, MessageEnvelope, Metadata, MetadataOptions, Name, NameWithLiterals, Node, NodeDataOneOf, NodeOptions, NodeStyle, NodeTextOptions, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, Orientation, OrientationWithLiterals, PDFSettings, PageSetup, ParagraphData, PatchOptions, Permissions, Placement, PlacementWithLiterals, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, Position, PositionWithLiterals, PositionsPosition, PositionsPositionWithLiterals, PricingData, ProgressOptions, PromptConfiguration, RangeDetails, Rel, ReplaceOptions, Resizing, ResizingWithLiterals, ResponsivenessBehaviour, ResponsivenessBehaviourWithLiterals, RestoreInfo, RibbonStyles, RichContent, RicosConversation, RicosConversationChunk, RicosConversationChunkTypeDataOneOf, RicosConversationUserMessageOneOf, Scaling, ScalingWithLiterals, Settings, Source, SourceWithLiterals, Spoiler, SpoilerData, Styles, StylesBorder, StylesPosition, StylesPositionWithLiterals, Suggestion, SuggestionAction, SuggestionActionWithLiterals, SuggestionOptions, SuggestionPositionDetailsOneOf, SummaryOptions, TableCellData, TableData, Target, TargetWithLiterals, TemplateSearchConfiguration, TextAlignment, TextAlignmentWithLiterals, TextData, TextNodeStyle, TextStyle, Theme, ThemeOptions, Thumbnails, ThumbnailsAlignment, ThumbnailsAlignmentWithLiterals, Tool, ToolConfigurationOneOf, ToolUseOptions, Type, TypeWithLiterals, Typography, TypographyTextStyle, V1Background, V1BackgroundBackgroundTypeOptionsOneOf, V1Gradient, V1GradientGradientTypeOptionsOneOf, V1Image, VerticalAlignment, VerticalAlignmentAlignment, VerticalAlignmentAlignmentWithLiterals, VerticalAlignmentWithLiterals, VerticalPaddingType, VerticalPaddingTypeWithLiterals, Video, VideoData, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function createConversationStreamed$1(httpClient: HttpClient): CreateConversationStreamedSignature;
6
6
  interface CreateConversationStreamedSignature {
@@ -20,6 +20,35 @@ interface CreateConversationStreamedSignature {
20
20
  */
21
21
  (options?: CreateConversationStreamedOptions): Promise<ConversationResponse>;
22
22
  }
23
+ declare function createConversationAsync$1(httpClient: HttpClient): CreateConversationAsyncSignature;
24
+ interface CreateConversationAsyncSignature {
25
+ /**
26
+ * Creates a new conversation asynchronously and returns a conversation identifier.
27
+ * This method initiates conversation processing in the background and returns immediately
28
+ * with a conversation_id that can be used to retrieve the streaming response via GetConversationStream.
29
+ *
30
+ * Use this method when you need to start a conversation without waiting for processing to begin,
31
+ * allowing for better resource management and the ability to retrieve results on-demand.
32
+ * The conversation is automatically persisted and can be streamed using the returned conversation_id.
33
+ */
34
+ (options?: CreateConversationAsyncOptions): Promise<CreateConversationAsyncResponse>;
35
+ }
36
+ declare function getConversationStream$1(httpClient: HttpClient): GetConversationStreamSignature;
37
+ interface GetConversationStreamSignature {
38
+ /**
39
+ * Retrieves the streaming response for an existing conversation.
40
+ * This method streams back response chunks for a conversation that was previously created
41
+ * using CreateConversationAsync, enabling clients to receive incremental updates as they become available.
42
+ *
43
+ * Use this method to retrieve the streaming results of an asynchronously created conversation,
44
+ * or to resume streaming from a specific point using the optional cursor parameter.
45
+ * This enables flexible consumption patterns where clients can poll for results or resume
46
+ * interrupted streams without losing progress.
47
+ * @param - Conversation Id
48
+ * @returns Streaming response message containing individual chunks of the AI's response
49
+ */
50
+ (conversationId: string, options?: GetConversationStreamOptions): Promise<ConversationResponse>;
51
+ }
23
52
  declare function createRicosConversation$1(httpClient: HttpClient): CreateRicosConversationSignature;
24
53
  interface CreateRicosConversationSignature {
25
54
  /**
@@ -50,7 +79,9 @@ interface CreateRicosConversationHtmlSignature {
50
79
  }
51
80
 
52
81
  declare const createConversationStreamed: MaybeContext<BuildRESTFunction<typeof createConversationStreamed$1> & typeof createConversationStreamed$1>;
82
+ declare const createConversationAsync: MaybeContext<BuildRESTFunction<typeof createConversationAsync$1> & typeof createConversationAsync$1>;
83
+ declare const getConversationStream: MaybeContext<BuildRESTFunction<typeof getConversationStream$1> & typeof getConversationStream$1>;
53
84
  declare const createRicosConversation: MaybeContext<BuildRESTFunction<typeof createRicosConversation$1> & typeof createRicosConversation$1>;
54
85
  declare const createRicosConversationHtml: MaybeContext<BuildRESTFunction<typeof createRicosConversationHtml$1> & typeof createRicosConversationHtml$1>;
55
86
 
56
- export { ConversationResponse, CreateConversationStreamedOptions, CreateRicosConversationHTMLResponse, CreateRicosConversationHtmlOptions, CreateRicosConversationOptions, CreateRicosConversationResponse, createConversationStreamed, createRicosConversation, createRicosConversationHtml };
87
+ export { ConversationResponse, CreateConversationAsyncOptions, CreateConversationAsyncResponse, CreateConversationStreamedOptions, CreateRicosConversationHTMLResponse, CreateRicosConversationHtmlOptions, CreateRicosConversationOptions, CreateRicosConversationResponse, GetConversationStreamOptions, createConversationAsync, createConversationStreamed, createRicosConversation, createRicosConversationHtml, getConversationStream };
@@ -75,9 +75,11 @@ __export(index_exports, {
75
75
  WebhookIdentityType: () => WebhookIdentityType,
76
76
  Width: () => Width,
77
77
  WidthType: () => WidthType,
78
+ createConversationAsync: () => createConversationAsync4,
78
79
  createConversationStreamed: () => createConversationStreamed4,
79
80
  createRicosConversation: () => createRicosConversation4,
80
81
  createRicosConversationHtml: () => createRicosConversationHtml4,
82
+ getConversationStream: () => getConversationStream4,
81
83
  listConversationSuggestions: () => listConversationSuggestions4
82
84
  });
83
85
  module.exports = __toCommonJS(index_exports);
@@ -87,12 +89,13 @@ var import_transform_error = require("@wix/sdk-runtime/transform-error");
87
89
  var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
88
90
 
89
91
  // src/ricos-v1-ricos-conversation-ricos-conversations.http.ts
92
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
90
93
  var import_float = require("@wix/sdk-runtime/transformations/float");
91
94
  var import_float2 = require("@wix/sdk-runtime/transformations/float");
92
95
  var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
93
96
  var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
94
97
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
95
- var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
98
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
96
99
  function resolveWixRicosV1RicosAiAssistantUrl(opts) {
97
100
  const domainToMappings = {
98
101
  "bo._base_domain_": [
@@ -126,7 +129,7 @@ function resolveWixRicosV1RicosAiAssistantUrl(opts) {
126
129
  }
127
130
  ]
128
131
  };
129
- return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
132
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
130
133
  }
131
134
  var PACKAGE_NAME = "@wix/auto_sdk_rich-content_ricos-conversations";
132
135
  function createConversationStreamed(payload) {
@@ -514,6 +517,412 @@ function createConversationStreamed(payload) {
514
517
  }
515
518
  return __createConversationStreamed;
516
519
  }
520
+ function createConversationAsync(payload) {
521
+ function __createConversationAsync({ host }) {
522
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
523
+ {
524
+ transformFn: import_float.transformSDKFloatToRESTFloat,
525
+ paths: [
526
+ {
527
+ path: "ricosConversation.messageInRichContent.nodes.galleryData.items.image.media.duration"
528
+ },
529
+ {
530
+ path: "ricosConversation.messageInRichContent.nodes.galleryData.items.video.media.duration"
531
+ },
532
+ {
533
+ path: "ricosConversation.messageInRichContent.nodes.galleryData.items.video.thumbnail.duration"
534
+ },
535
+ {
536
+ path: "ricosConversation.messageInRichContent.nodes.galleryData.options.item.ratio"
537
+ },
538
+ {
539
+ path: "ricosConversation.messageInRichContent.nodes.imageData.image.duration"
540
+ },
541
+ {
542
+ path: "ricosConversation.messageInRichContent.nodes.mapData.mapSettings.lat"
543
+ },
544
+ {
545
+ path: "ricosConversation.messageInRichContent.nodes.mapData.mapSettings.lng"
546
+ },
547
+ {
548
+ path: "ricosConversation.messageInRichContent.nodes.pollData.poll.image.duration"
549
+ },
550
+ {
551
+ path: "ricosConversation.messageInRichContent.nodes.pollData.poll.options.image.duration"
552
+ },
553
+ {
554
+ path: "ricosConversation.messageInRichContent.nodes.pollData.design.poll.background.image.duration"
555
+ },
556
+ {
557
+ path: "ricosConversation.messageInRichContent.nodes.appEmbedData.image.duration"
558
+ },
559
+ {
560
+ path: "ricosConversation.messageInRichContent.nodes.videoData.video.duration"
561
+ },
562
+ {
563
+ path: "ricosConversation.messageInRichContent.nodes.videoData.thumbnail.duration"
564
+ },
565
+ {
566
+ path: "ricosConversation.messageInRichContent.nodes.audioData.audio.duration"
567
+ },
568
+ {
569
+ path: "ricosConversation.messageInRichContent.nodes.audioData.coverImage.duration"
570
+ },
571
+ {
572
+ path: "ricosConversation.messageInRichContent.nodes.layoutData.backgroundImage.media.duration"
573
+ },
574
+ {
575
+ path: "ricosConversation.messageInRichContent.nodes.layoutData.backdropImage.media.duration"
576
+ },
577
+ {
578
+ path: "ricosConversation.document.nodes.galleryData.items.image.media.duration"
579
+ },
580
+ {
581
+ path: "ricosConversation.document.nodes.galleryData.items.video.media.duration"
582
+ },
583
+ {
584
+ path: "ricosConversation.document.nodes.galleryData.items.video.thumbnail.duration"
585
+ },
586
+ {
587
+ path: "ricosConversation.document.nodes.galleryData.options.item.ratio"
588
+ },
589
+ { path: "ricosConversation.document.nodes.imageData.image.duration" },
590
+ { path: "ricosConversation.document.nodes.mapData.mapSettings.lat" },
591
+ { path: "ricosConversation.document.nodes.mapData.mapSettings.lng" },
592
+ {
593
+ path: "ricosConversation.document.nodes.pollData.poll.image.duration"
594
+ },
595
+ {
596
+ path: "ricosConversation.document.nodes.pollData.poll.options.image.duration"
597
+ },
598
+ {
599
+ path: "ricosConversation.document.nodes.pollData.design.poll.background.image.duration"
600
+ },
601
+ {
602
+ path: "ricosConversation.document.nodes.appEmbedData.image.duration"
603
+ },
604
+ { path: "ricosConversation.document.nodes.videoData.video.duration" },
605
+ {
606
+ path: "ricosConversation.document.nodes.videoData.thumbnail.duration"
607
+ },
608
+ { path: "ricosConversation.document.nodes.audioData.audio.duration" },
609
+ {
610
+ path: "ricosConversation.document.nodes.audioData.coverImage.duration"
611
+ },
612
+ {
613
+ path: "ricosConversation.document.nodes.layoutData.backgroundImage.media.duration"
614
+ },
615
+ {
616
+ path: "ricosConversation.document.nodes.layoutData.backdropImage.media.duration"
617
+ },
618
+ {
619
+ path: "ricosConversation.documentSelection.nodes.galleryData.items.image.media.duration"
620
+ },
621
+ {
622
+ path: "ricosConversation.documentSelection.nodes.galleryData.items.video.media.duration"
623
+ },
624
+ {
625
+ path: "ricosConversation.documentSelection.nodes.galleryData.items.video.thumbnail.duration"
626
+ },
627
+ {
628
+ path: "ricosConversation.documentSelection.nodes.galleryData.options.item.ratio"
629
+ },
630
+ {
631
+ path: "ricosConversation.documentSelection.nodes.imageData.image.duration"
632
+ },
633
+ {
634
+ path: "ricosConversation.documentSelection.nodes.mapData.mapSettings.lat"
635
+ },
636
+ {
637
+ path: "ricosConversation.documentSelection.nodes.mapData.mapSettings.lng"
638
+ },
639
+ {
640
+ path: "ricosConversation.documentSelection.nodes.pollData.poll.image.duration"
641
+ },
642
+ {
643
+ path: "ricosConversation.documentSelection.nodes.pollData.poll.options.image.duration"
644
+ },
645
+ {
646
+ path: "ricosConversation.documentSelection.nodes.pollData.design.poll.background.image.duration"
647
+ },
648
+ {
649
+ path: "ricosConversation.documentSelection.nodes.appEmbedData.image.duration"
650
+ },
651
+ {
652
+ path: "ricosConversation.documentSelection.nodes.videoData.video.duration"
653
+ },
654
+ {
655
+ path: "ricosConversation.documentSelection.nodes.videoData.thumbnail.duration"
656
+ },
657
+ {
658
+ path: "ricosConversation.documentSelection.nodes.audioData.audio.duration"
659
+ },
660
+ {
661
+ path: "ricosConversation.documentSelection.nodes.audioData.coverImage.duration"
662
+ },
663
+ {
664
+ path: "ricosConversation.documentSelection.nodes.layoutData.backgroundImage.media.duration"
665
+ },
666
+ {
667
+ path: "ricosConversation.documentSelection.nodes.layoutData.backdropImage.media.duration"
668
+ },
669
+ { path: "ricosConversation.promptConfiguration.temperature" },
670
+ { path: "ricosConversation.promptConfiguration.topP" },
671
+ {
672
+ path: "ricosConversation.theme.background.colorOptions.color.gradientOptions.opacity"
673
+ },
674
+ {
675
+ path: "ricosConversation.theme.background.colorOptions.color.gradientOptions.radialOptions.x"
676
+ },
677
+ {
678
+ path: "ricosConversation.theme.background.colorOptions.color.gradientOptions.radialOptions.y"
679
+ },
680
+ {
681
+ path: "ricosConversation.theme.background.colorOptions.color.gradientOptions.stops.opacity"
682
+ },
683
+ {
684
+ path: "ricosConversation.theme.background.colorOptions.color.gradientOptions.stops.position"
685
+ },
686
+ { path: "ricosConversation.theme.background.imageOptions.opacity" },
687
+ {
688
+ path: "ricosConversation.theme.background.imageOptions.color.gradientOptions.opacity"
689
+ },
690
+ {
691
+ path: "ricosConversation.theme.background.imageOptions.color.gradientOptions.radialOptions.x"
692
+ },
693
+ {
694
+ path: "ricosConversation.theme.background.imageOptions.color.gradientOptions.radialOptions.y"
695
+ },
696
+ {
697
+ path: "ricosConversation.theme.background.imageOptions.color.gradientOptions.stops.opacity"
698
+ },
699
+ {
700
+ path: "ricosConversation.theme.background.imageOptions.color.gradientOptions.stops.position"
701
+ },
702
+ { path: "ricosConversation.theme.typography.heading1.lineHeight" },
703
+ { path: "ricosConversation.theme.typography.heading1.letterSpacing" },
704
+ { path: "ricosConversation.theme.typography.heading2.lineHeight" },
705
+ { path: "ricosConversation.theme.typography.heading2.letterSpacing" },
706
+ { path: "ricosConversation.theme.typography.heading3.lineHeight" },
707
+ { path: "ricosConversation.theme.typography.heading3.letterSpacing" },
708
+ { path: "ricosConversation.theme.typography.heading4.lineHeight" },
709
+ { path: "ricosConversation.theme.typography.heading4.letterSpacing" },
710
+ { path: "ricosConversation.theme.typography.heading5.lineHeight" },
711
+ { path: "ricosConversation.theme.typography.heading5.letterSpacing" },
712
+ { path: "ricosConversation.theme.typography.heading6.lineHeight" },
713
+ { path: "ricosConversation.theme.typography.heading6.letterSpacing" },
714
+ { path: "ricosConversation.theme.typography.paragraph.lineHeight" },
715
+ {
716
+ path: "ricosConversation.theme.typography.paragraph.letterSpacing"
717
+ }
718
+ ]
719
+ },
720
+ {
721
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
722
+ paths: [
723
+ {
724
+ path: "ricosConversation.messageInRichContent.metadata.createdTimestamp"
725
+ },
726
+ {
727
+ path: "ricosConversation.messageInRichContent.metadata.updatedTimestamp"
728
+ },
729
+ { path: "ricosConversation.document.metadata.createdTimestamp" },
730
+ { path: "ricosConversation.document.metadata.updatedTimestamp" },
731
+ {
732
+ path: "ricosConversation.documentSelection.metadata.createdTimestamp"
733
+ },
734
+ {
735
+ path: "ricosConversation.documentSelection.metadata.updatedTimestamp"
736
+ }
737
+ ]
738
+ }
739
+ ]);
740
+ const metadata = {
741
+ entityFqdn: "wix.ricos.v1.ricos_conversation",
742
+ method: "POST",
743
+ methodFqn: "wix.ricos.v1.RicosAiAssistant.CreateConversationAsync",
744
+ packageName: PACKAGE_NAME,
745
+ migrationOptions: {
746
+ optInTransformResponse: true
747
+ },
748
+ url: resolveWixRicosV1RicosAiAssistantUrl({
749
+ protoPath: "/v1/ricos-conversations/async",
750
+ data: serializedData,
751
+ host
752
+ }),
753
+ data: serializedData
754
+ };
755
+ return metadata;
756
+ }
757
+ return __createConversationAsync;
758
+ }
759
+ function getConversationStream(payload) {
760
+ function __getConversationStream({ host }) {
761
+ const metadata = {
762
+ entityFqdn: "wix.ricos.v1.ricos_conversation",
763
+ method: "GET",
764
+ methodFqn: "wix.ricos.v1.RicosAiAssistant.GetConversationStream",
765
+ packageName: PACKAGE_NAME,
766
+ migrationOptions: {
767
+ optInTransformResponse: true
768
+ },
769
+ url: resolveWixRicosV1RicosAiAssistantUrl({
770
+ protoPath: "/v1/ricos-conversations/{conversationId}",
771
+ data: payload,
772
+ host
773
+ }),
774
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
775
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
776
+ {
777
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
778
+ paths: [
779
+ {
780
+ path: "chunk.nodeOptions.node.galleryData.items.image.media.duration"
781
+ },
782
+ {
783
+ path: "chunk.nodeOptions.node.galleryData.items.video.media.duration"
784
+ },
785
+ {
786
+ path: "chunk.nodeOptions.node.galleryData.items.video.thumbnail.duration"
787
+ },
788
+ { path: "chunk.nodeOptions.node.galleryData.options.item.ratio" },
789
+ { path: "chunk.nodeOptions.node.imageData.image.duration" },
790
+ { path: "chunk.nodeOptions.node.mapData.mapSettings.lat" },
791
+ { path: "chunk.nodeOptions.node.mapData.mapSettings.lng" },
792
+ { path: "chunk.nodeOptions.node.pollData.poll.image.duration" },
793
+ {
794
+ path: "chunk.nodeOptions.node.pollData.poll.options.image.duration"
795
+ },
796
+ {
797
+ path: "chunk.nodeOptions.node.pollData.design.poll.background.image.duration"
798
+ },
799
+ { path: "chunk.nodeOptions.node.appEmbedData.image.duration" },
800
+ { path: "chunk.nodeOptions.node.videoData.video.duration" },
801
+ { path: "chunk.nodeOptions.node.videoData.thumbnail.duration" },
802
+ { path: "chunk.nodeOptions.node.audioData.audio.duration" },
803
+ { path: "chunk.nodeOptions.node.audioData.coverImage.duration" },
804
+ {
805
+ path: "chunk.nodeOptions.node.layoutData.backgroundImage.media.duration"
806
+ },
807
+ {
808
+ path: "chunk.nodeOptions.node.layoutData.backdropImage.media.duration"
809
+ },
810
+ {
811
+ path: "chunk.patchOptions.node.galleryData.items.image.media.duration"
812
+ },
813
+ {
814
+ path: "chunk.patchOptions.node.galleryData.items.video.media.duration"
815
+ },
816
+ {
817
+ path: "chunk.patchOptions.node.galleryData.items.video.thumbnail.duration"
818
+ },
819
+ {
820
+ path: "chunk.patchOptions.node.galleryData.options.item.ratio"
821
+ },
822
+ { path: "chunk.patchOptions.node.imageData.image.duration" },
823
+ { path: "chunk.patchOptions.node.mapData.mapSettings.lat" },
824
+ { path: "chunk.patchOptions.node.mapData.mapSettings.lng" },
825
+ { path: "chunk.patchOptions.node.pollData.poll.image.duration" },
826
+ {
827
+ path: "chunk.patchOptions.node.pollData.poll.options.image.duration"
828
+ },
829
+ {
830
+ path: "chunk.patchOptions.node.pollData.design.poll.background.image.duration"
831
+ },
832
+ { path: "chunk.patchOptions.node.appEmbedData.image.duration" },
833
+ { path: "chunk.patchOptions.node.videoData.video.duration" },
834
+ { path: "chunk.patchOptions.node.videoData.thumbnail.duration" },
835
+ { path: "chunk.patchOptions.node.audioData.audio.duration" },
836
+ { path: "chunk.patchOptions.node.audioData.coverImage.duration" },
837
+ {
838
+ path: "chunk.patchOptions.node.layoutData.backgroundImage.media.duration"
839
+ },
840
+ {
841
+ path: "chunk.patchOptions.node.layoutData.backdropImage.media.duration"
842
+ },
843
+ {
844
+ path: "chunk.themeOptions.theme.background.colorOptions.color.gradientOptions.opacity"
845
+ },
846
+ {
847
+ path: "chunk.themeOptions.theme.background.colorOptions.color.gradientOptions.radialOptions.x"
848
+ },
849
+ {
850
+ path: "chunk.themeOptions.theme.background.colorOptions.color.gradientOptions.radialOptions.y"
851
+ },
852
+ {
853
+ path: "chunk.themeOptions.theme.background.colorOptions.color.gradientOptions.stops.opacity"
854
+ },
855
+ {
856
+ path: "chunk.themeOptions.theme.background.colorOptions.color.gradientOptions.stops.position"
857
+ },
858
+ {
859
+ path: "chunk.themeOptions.theme.background.imageOptions.opacity"
860
+ },
861
+ {
862
+ path: "chunk.themeOptions.theme.background.imageOptions.color.gradientOptions.opacity"
863
+ },
864
+ {
865
+ path: "chunk.themeOptions.theme.background.imageOptions.color.gradientOptions.radialOptions.x"
866
+ },
867
+ {
868
+ path: "chunk.themeOptions.theme.background.imageOptions.color.gradientOptions.radialOptions.y"
869
+ },
870
+ {
871
+ path: "chunk.themeOptions.theme.background.imageOptions.color.gradientOptions.stops.opacity"
872
+ },
873
+ {
874
+ path: "chunk.themeOptions.theme.background.imageOptions.color.gradientOptions.stops.position"
875
+ },
876
+ {
877
+ path: "chunk.themeOptions.theme.typography.heading1.lineHeight"
878
+ },
879
+ {
880
+ path: "chunk.themeOptions.theme.typography.heading1.letterSpacing"
881
+ },
882
+ {
883
+ path: "chunk.themeOptions.theme.typography.heading2.lineHeight"
884
+ },
885
+ {
886
+ path: "chunk.themeOptions.theme.typography.heading2.letterSpacing"
887
+ },
888
+ {
889
+ path: "chunk.themeOptions.theme.typography.heading3.lineHeight"
890
+ },
891
+ {
892
+ path: "chunk.themeOptions.theme.typography.heading3.letterSpacing"
893
+ },
894
+ {
895
+ path: "chunk.themeOptions.theme.typography.heading4.lineHeight"
896
+ },
897
+ {
898
+ path: "chunk.themeOptions.theme.typography.heading4.letterSpacing"
899
+ },
900
+ {
901
+ path: "chunk.themeOptions.theme.typography.heading5.lineHeight"
902
+ },
903
+ {
904
+ path: "chunk.themeOptions.theme.typography.heading5.letterSpacing"
905
+ },
906
+ {
907
+ path: "chunk.themeOptions.theme.typography.heading6.lineHeight"
908
+ },
909
+ {
910
+ path: "chunk.themeOptions.theme.typography.heading6.letterSpacing"
911
+ },
912
+ {
913
+ path: "chunk.themeOptions.theme.typography.paragraph.lineHeight"
914
+ },
915
+ {
916
+ path: "chunk.themeOptions.theme.typography.paragraph.letterSpacing"
917
+ }
918
+ ]
919
+ }
920
+ ])
921
+ };
922
+ return metadata;
923
+ }
924
+ return __getConversationStream;
925
+ }
517
926
  function createRicosConversation(payload) {
518
927
  function __createRicosConversation({ host }) {
519
928
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -1588,6 +1997,71 @@ async function createConversationStreamed2(options) {
1588
1997
  throw transformedError;
1589
1998
  }
1590
1999
  }
2000
+ async function createConversationAsync2(options) {
2001
+ const { httpClient, sideEffects } = arguments[1];
2002
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
2003
+ {
2004
+ ricosConversation: options?.ricosConversation,
2005
+ invocationId: options?.invocationId
2006
+ },
2007
+ [
2008
+ "ricosConversation.messageInRichContent",
2009
+ "ricosConversation.document",
2010
+ "ricosConversation.documentSelection"
2011
+ ]
2012
+ );
2013
+ const reqOpts = createConversationAsync(payload);
2014
+ sideEffects?.onSiteCall?.();
2015
+ try {
2016
+ const result = await httpClient.request(reqOpts);
2017
+ sideEffects?.onSuccess?.(result);
2018
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data, []);
2019
+ } catch (err) {
2020
+ const transformedError = (0, import_transform_error.transformError)(
2021
+ err,
2022
+ {
2023
+ spreadPathsToArguments: {},
2024
+ explicitPathsToArguments: {
2025
+ ricosConversation: "$[0].ricosConversation",
2026
+ invocationId: "$[0].invocationId"
2027
+ },
2028
+ singleArgumentUnchanged: false
2029
+ },
2030
+ ["options"]
2031
+ );
2032
+ sideEffects?.onError?.(err);
2033
+ throw transformedError;
2034
+ }
2035
+ }
2036
+ async function getConversationStream2(conversationId, options) {
2037
+ const { httpClient, sideEffects } = arguments[2];
2038
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
2039
+ { conversationId, cursor: options?.cursor },
2040
+ []
2041
+ );
2042
+ const reqOpts = getConversationStream(payload);
2043
+ sideEffects?.onSiteCall?.();
2044
+ try {
2045
+ const result = await httpClient.request(reqOpts);
2046
+ sideEffects?.onSuccess?.(result);
2047
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data, []);
2048
+ } catch (err) {
2049
+ const transformedError = (0, import_transform_error.transformError)(
2050
+ err,
2051
+ {
2052
+ spreadPathsToArguments: {},
2053
+ explicitPathsToArguments: {
2054
+ conversationId: "$[0]",
2055
+ cursor: "$[1].cursor"
2056
+ },
2057
+ singleArgumentUnchanged: false
2058
+ },
2059
+ ["conversationId", "options"]
2060
+ );
2061
+ sideEffects?.onError?.(err);
2062
+ throw transformedError;
2063
+ }
2064
+ }
1591
2065
  async function createRicosConversation2(options) {
1592
2066
  const { httpClient, sideEffects } = arguments[1];
1593
2067
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
@@ -1694,6 +2168,21 @@ function createConversationStreamed3(httpClient) {
1694
2168
  { httpClient }
1695
2169
  );
1696
2170
  }
2171
+ function createConversationAsync3(httpClient) {
2172
+ return (options) => createConversationAsync2(
2173
+ options,
2174
+ // @ts-ignore
2175
+ { httpClient }
2176
+ );
2177
+ }
2178
+ function getConversationStream3(httpClient) {
2179
+ return (conversationId, options) => getConversationStream2(
2180
+ conversationId,
2181
+ options,
2182
+ // @ts-ignore
2183
+ { httpClient }
2184
+ );
2185
+ }
1697
2186
  function createRicosConversation3(httpClient) {
1698
2187
  return (options) => createRicosConversation2(
1699
2188
  options,
@@ -1718,11 +2207,13 @@ function createRicosConversationHtml3(httpClient) {
1718
2207
  }
1719
2208
 
1720
2209
  // src/ricos-v1-ricos-conversation-ricos-conversations.context.ts
1721
- var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
1722
- var createConversationStreamed4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(createConversationStreamed3);
1723
- var createRicosConversation4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(createRicosConversation3);
1724
- var listConversationSuggestions4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(listConversationSuggestions3);
1725
- var createRicosConversationHtml4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(createRicosConversationHtml3);
2210
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
2211
+ var createConversationStreamed4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createConversationStreamed3);
2212
+ var createConversationAsync4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createConversationAsync3);
2213
+ var getConversationStream4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getConversationStream3);
2214
+ var createRicosConversation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createRicosConversation3);
2215
+ var listConversationSuggestions4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listConversationSuggestions3);
2216
+ var createRicosConversationHtml4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createRicosConversationHtml3);
1726
2217
  // Annotate the CommonJS export names for ESM import in node:
1727
2218
  0 && (module.exports = {
1728
2219
  Action,
@@ -1780,9 +2271,11 @@ var createRicosConversationHtml4 = /* @__PURE__ */ (0, import_rest_modules2.crea
1780
2271
  WebhookIdentityType,
1781
2272
  Width,
1782
2273
  WidthType,
2274
+ createConversationAsync,
1783
2275
  createConversationStreamed,
1784
2276
  createRicosConversation,
1785
2277
  createRicosConversationHtml,
2278
+ getConversationStream,
1786
2279
  listConversationSuggestions
1787
2280
  });
1788
2281
  //# sourceMappingURL=index.js.map