@wix/auto_sdk_promote-growth-tools-publisher_generated-content 1.0.1 → 1.0.2
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.js.map +1 -1
- package/build/cjs/index.typings.d.ts +15 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +14 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +4 -2
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +15 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +14 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +4 -2
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +15 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +14 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.js +4 -2
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +15 -2
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +14 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.mjs +4 -2
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/promote-publisher-v1-generated-content-generated-content.universal.ts","../../src/promote-publisher-v1-generated-content-generated-content.http.ts","../../src/promote-publisher-v1-generated-content-generated-content.public.ts","../../src/promote-publisher-v1-generated-content-generated-content.context.ts"],"sourcesContent":["export * from './src/promote-publisher-v1-generated-content-generated-content.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPromotePublisherV1GeneratedContent from './promote-publisher-v1-generated-content-generated-content.http.js';\n\n/** Generated content is AI-created post material, such as captions, titles, and images, produced from a text prompt or a site's assets. Use generated content to build a post and then publish it as an item. */\nexport interface GeneratedContent {\n /**\n * Generated content ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n}\n\nexport interface GenerateTextRequest {\n /**\n * Text prompt describing the post to generate captions for.\n * @maxLength 3000\n */\n userInput: string | null;\n /** Social channel to tailor the captions for. */\n channelName?: ChannelNameWithLiterals;\n /**\n * Tone of voice for the captions. For example, `professional` or `playful`.\n * @maxLength 30\n */\n tone?: string | null;\n /**\n * 2-letter language code for the generated captions in ISO 639-1 alpha-2 format.\n * @maxLength 2\n */\n languageCode?: string | null;\n /** Additional content to incorporate into the captions. */\n additionalContent?: AdditionalContent;\n}\n\n/** Supported social channel. */\nexport enum ChannelName {\n INSTAGRAM = 'INSTAGRAM',\n FACEBOOK = 'FACEBOOK',\n YOUTUBE = 'YOUTUBE',\n LINKEDIN = 'LINKEDIN',\n TWITTER = 'TWITTER',\n PINTEREST = 'PINTEREST',\n /** Google Business Profile. */\n GBP = 'GBP',\n TIKTOK = 'TIKTOK',\n}\n\n/** @enumType */\nexport type ChannelNameWithLiterals =\n | ChannelName\n | 'INSTAGRAM'\n | 'FACEBOOK'\n | 'YOUTUBE'\n | 'LINKEDIN'\n | 'TWITTER'\n | 'PINTEREST'\n | 'GBP'\n | 'TIKTOK';\n\nexport interface AdditionalContent {\n /**\n * URL to reference in the captions, such as a link to promote.\n * @format WEB_URL\n */\n url?: string | null;\n /** Whether to include hashtags in the captions. */\n withHashtags?: boolean | null;\n /** Whether to add a \"link in bio\" reference to the captions. */\n addLinkInBio?: boolean | null;\n}\n\nexport interface GenerateTextResponse {\n /** Generated caption suggestions. */\n results?: GenerateTextResult[];\n}\n\nexport interface GenerateTextResult {\n /**\n * Generated caption.\n * @maxLength 1000\n */\n caption?: string | null;\n /**\n * Generated title.\n * @maxLength 1000\n */\n title?: string | null;\n}\n\nexport interface GenerateImageRequest {\n /**\n * Text prompt describing the image to generate.\n * @maxLength 3000\n */\n userInput?: string | null;\n /**\n * URL of the source image to generate from.\n * @format WEB_URL\n */\n imageUrl?: string | null;\n}\n\nexport interface GenerateImageResponse {\n /** Status of the generation request. */\n status?: GenerateMediaStatusWithLiterals;\n /**\n * Identifies the asynchronous image-generation process.\n * @maxLength 1000\n */\n executionId?: string | null;\n}\n\n/** Status of a media generation request. */\nexport enum GenerateMediaStatus {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** The generation request was accepted. */\n OK = 'OK',\n}\n\n/** @enumType */\nexport type GenerateMediaStatusWithLiterals =\n | GenerateMediaStatus\n | 'UNKNOWN_STATUS'\n | 'OK';\n\nexport interface GenerateVideoRequest {\n /** @maxLength 3000 */\n userInput?: string | null;\n /** @format WEB_URL */\n imageUrl?: string | null;\n}\n\nexport interface GenerateVideoResponse {\n status?: GenerateMediaStatusWithLiterals;\n /** @maxLength 1000 */\n executionId?: string | null;\n}\n\n/** Request for GeneratePostData. Provide at least one of `siteAssets` or `userInput`. */\nexport interface GeneratePostDataRequest {\n /**\n * Site assets the generated post is based on.\n * @maxSize 10\n */\n siteAssets?: SiteAsset[];\n /**\n * Free-form guidance for the generated post content.\n * @maxLength 5000\n */\n userInput?: string | null;\n /**\n * Candidate media for the generated post. Accepts images only. Each item carries a `type` (must be image), a `url`, and an optional Wix Media Manager `fileId` for media already in Wix.\n * @maxSize 10\n */\n media?: Media[];\n /** Additional context to incorporate into the generated content. */\n context?: Record<string, any> | null;\n /**\n * Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Twitter, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.\n * @maxSize 10\n */\n channels?: ChannelNameWithLiterals[];\n}\n\n/** A site asset, such as a product or a blog post, that post content can be generated from. */\nexport interface SiteAsset {\n /**\n * ID of the asset in the Wix app that owns it. For example, a product ID for a `STORES_PRODUCT` asset.\n * @maxLength 256\n */\n _id?: string | null;\n /** Type of asset. */\n type?: TypeWithLiterals;\n}\n\n/** Type of site asset. */\nexport enum Type {\n /** A Wix Blog post. */\n BLOG_POST = 'BLOG_POST',\n /** A Wix Events event. */\n EVENT = 'EVENT',\n /** A Wix Stores product. */\n STORES_PRODUCT = 'STORES_PRODUCT',\n /** A Wix Bookings service. */\n BOOKINGS_SERVICE = 'BOOKINGS_SERVICE',\n /** A Wix Stores coupon. */\n STORES_COUPON = 'STORES_COUPON',\n /** A Wix Stores category. */\n STORES_CATEGORY = 'STORES_CATEGORY',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'BLOG_POST'\n | 'EVENT'\n | 'STORES_PRODUCT'\n | 'BOOKINGS_SERVICE'\n | 'STORES_COUPON'\n | 'STORES_CATEGORY';\n\nexport interface Media {\n /** Media type. */\n type?: MediaTypeWithLiterals;\n /**\n * Media URL.\n * @format WEB_URL\n */\n url?: string | null;\n /**\n * Media Manager file ID backing the media. Available only when the media is stored in the Media Manager.\n * @maxLength 1000\n */\n fileId?: string | null;\n}\n\nexport enum MediaType {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals = MediaType | 'IMAGE' | 'VIDEO';\n\nexport interface GeneratePostDataResponse {\n /** Generated post content, one entry per requested channel. */\n results?: ChannelPostData[];\n}\n\n/** Channel-specific post content. Use it to create a draft or publish an item. */\nexport interface ChannelPostData extends ChannelPostDataDataOneOf {\n instagramPost?: InstagramPost;\n facebookPost?: FacebookPost;\n linkedinPost?: LinkedinPost;\n twitterPost?: TwitterPost;\n pinterestPost?: PinterestPost;\n gbpPost?: GbpPost;\n tiktokPhoto?: TikTokPhoto;\n /** Channel the content is generated for. */\n channelName?: ChannelNameWithLiterals;\n}\n\n/** @oneof */\nexport interface ChannelPostDataDataOneOf {\n instagramPost?: InstagramPost;\n facebookPost?: FacebookPost;\n linkedinPost?: LinkedinPost;\n twitterPost?: TwitterPost;\n pinterestPost?: PinterestPost;\n gbpPost?: GbpPost;\n tiktokPhoto?: TikTokPhoto;\n}\n\nexport interface InstagramPost extends InstagramPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /**\n * Caption for the post. Can include hashtags (for example, `#crazywildebeest`) and mentions of Instagram users (for example, `@natgeo`). Mentioned users are notified when the post is published. Supports up to 30 hashtags and 20 mentions.\n * @maxLength 2200\n */\n caption?: string | null;\n /**\n * The post URL on Instagram.\n * @readonly\n */\n postUrl?: string | null;\n /** Insights from Instagram. */\n insights?: InstagramInsights;\n}\n\n/** @oneof */\nexport interface InstagramPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface MediaWrapper {\n /** List of media items. */\n media?: Media[];\n}\n\nexport interface InstagramInsights {\n /** Number of likes. */\n likes?: number;\n /** Number of engagements. */\n engagement?: number;\n /** Number of impressions. */\n impressions?: number;\n /** Number of plays. */\n plays?: number;\n /** Number of accounts reached. */\n reach?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of shares. */\n shares?: number;\n /** Number of saves. */\n saved?: number;\n /** Total number of interactions. */\n totalInteractions?: number;\n}\n\nexport interface FacebookPost extends FacebookPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** The page ID to publish the post to. */\n pageId?: string | null;\n /** Caption for the post. */\n caption?: string | null;\n /**\n * The post URL on Facebook.\n * @readonly\n */\n postUrl?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from Facebook. */\n insights?: FacebookInsights;\n}\n\n/** @oneof */\nexport interface FacebookPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface LinkMetadata {\n /** Thumbnail URL for the link preview. */\n thumbnailUrl?: string | null;\n /** Title for the link preview. */\n title?: string | null;\n /** Description for the link preview. */\n description?: string | null;\n}\n\nexport interface FacebookInsights {\n /** Impression counts. */\n impressions?: FacebookImpressions;\n /** Interaction counts. */\n interactions?: FacebookInteractions;\n /** Reaction counts. */\n reactions?: FacebookReactions;\n /** Activity counts. */\n activity?: FacebokActivity;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface FacebookImpressions {\n /** Number of unique impressions. */\n unique?: number;\n /** Total number of impressions. */\n total?: number;\n}\n\nexport interface FacebookInteractions {\n /** Number of unique interactions. */\n unique?: number;\n /** Total number of interactions. */\n total?: number;\n}\n\nexport interface FacebookReactions {\n /** Number of \"like\" reactions. */\n like?: number;\n /** Number of \"love\" reactions. */\n love?: number;\n /** Number of \"wow\" reactions. */\n wow?: number;\n /** Number of \"haha\" reactions. */\n haha?: number;\n /** Number of \"sad\" reactions. */\n sad?: number;\n /** Number of \"angry\" reactions. */\n anger?: number;\n}\n\nexport interface FacebokActivity {\n /** Number of shares. */\n share?: number;\n /** Number of likes. */\n like?: number;\n /** Number of comments. */\n comment?: number;\n}\n\nexport interface LinkedinPost extends LinkedinPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Author ID of the post. Can be an organization page or a personal feed. */\n authorId?: string | null;\n /** Caption for the post. */\n caption?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from LinkedIn. */\n insights?: LinkedinPostInsights;\n}\n\n/** @oneof */\nexport interface LinkedinPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface LinkedinPostInsights {\n /** Number of unique impressions. */\n uniqueImpressions?: number;\n /** Total number of impressions. */\n impression?: number;\n /** Number of shares. */\n shares?: number;\n /** Engagement rate. */\n engagement?: number;\n /** Number of clicks. */\n clicks?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of comments. */\n comments?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface TwitterPost extends TwitterPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Caption for the post. */\n caption?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from X (Twitter). */\n insights?: TwitterInsights;\n}\n\n/** @oneof */\nexport interface TwitterPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface TwitterInsights {\n /** Number of retweets. */\n retweets?: number;\n /** Number of replies. */\n replies?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of quote posts. */\n quotes?: number;\n /** Number of bookmarks. */\n bookmarks?: number;\n /** Number of impressions. */\n impressions?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface PinterestPost {\n /**\n * The board ID to publish the post to.\n * @maxLength 128\n */\n boardId?: string | null;\n /**\n * The title of the post.\n * @maxLength 100\n */\n title?: string | null;\n /**\n * The description of the post.\n * @maxLength 800\n */\n description?: string | null;\n /**\n * The link to include in the post.\n * @maxLength 2048\n */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from Pinterest. */\n insights?: PinterestInsights;\n}\n\nexport interface PinterestInsights {\n /** Number of impressions. */\n impressions?: number;\n /** Number of clicks. */\n clicks?: number;\n /** Number of saves. */\n saves?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of reactions. */\n reactions?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface GbpPost {\n /**\n * The location ID to publish the post to.\n * @maxLength 128\n */\n locationId?: string | null;\n /**\n * Account (group) ID of the location.\n * @maxLength 128\n */\n locationAccountId?: string | null;\n /**\n * The description of the post.\n * @maxLength 1500\n */\n description?: string | null;\n /** Call to action type and URL to include in the post. */\n callToAction?: GbpPostCallToAction;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from Google Business Profile. */\n insights?: GbpInsights;\n}\n\nexport interface GbpPostCallToAction {\n /** Type of the call to action. */\n actionType?: GbpPostCallToActionTypeWithLiterals;\n /**\n * URL of the call to action.\n * @maxLength 2048\n */\n url?: string | null;\n}\n\n/** Type of call to action button shown on the post. */\nexport enum GbpPostCallToActionType {\n BOOK = 'BOOK',\n ORDER = 'ORDER',\n SHOP = 'SHOP',\n LEARN_MORE = 'LEARN_MORE',\n SIGN_UP = 'SIGN_UP',\n}\n\n/** @enumType */\nexport type GbpPostCallToActionTypeWithLiterals =\n | GbpPostCallToActionType\n | 'BOOK'\n | 'ORDER'\n | 'SHOP'\n | 'LEARN_MORE'\n | 'SIGN_UP';\n\nexport interface GbpInsights {\n /** Number of shares. Google Business Profile post insights aren't currently available, so this returns `-1`. */\n shares?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface TikTokPhoto {\n /**\n * The account ID to publish the photo to.\n * @maxLength 128\n */\n accountId?: string | null;\n /** Privacy level for the photo. */\n privacyLevel?: TikTokPrivacyLevelWithLiterals;\n /**\n * A title for the photo.\n * @maxLength 90\n */\n title?: string | null;\n /**\n * A description for the photo.\n * @maxLength 4000\n */\n description?: string | null;\n /** Whether comments are disabled for the photo. */\n disableComment?: boolean;\n /** Whether to automatically add music to the photo. */\n autoAddMusic?: boolean;\n /** Whether the content is a paid partnership promoting a third-party business. */\n brandContentToggle?: boolean;\n /** Whether the content promotes the creator's own business. */\n brandOrganicToggle?: boolean;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from TikTok. */\n insights?: TikTokInsights;\n}\n\nexport enum TikTokPrivacyLevel {\n PUBLIC_TO_EVERYONE = 'PUBLIC_TO_EVERYONE',\n FOLLOWER_OF_CREATOR = 'FOLLOWER_OF_CREATOR',\n MUTUAL_FOLLOW_FRIENDS = 'MUTUAL_FOLLOW_FRIENDS',\n SELF_ONLY = 'SELF_ONLY',\n}\n\n/** @enumType */\nexport type TikTokPrivacyLevelWithLiterals =\n | TikTokPrivacyLevel\n | 'PUBLIC_TO_EVERYONE'\n | 'FOLLOWER_OF_CREATOR'\n | 'MUTUAL_FOLLOW_FRIENDS'\n | 'SELF_ONLY';\n\nexport interface TikTokInsights {\n /** Number of views. */\n views?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of shares. */\n shares?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\n/**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n * @param userInput - Text prompt describing the post to generate captions for.\n * @public\n * @documentationMaturity preview\n * @requiredField userInput\n * @permissionId PROMOTE.PUBLISHER_ITEM_CREATE\n * @applicableIdentity APP\n * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateText\n */\nexport async function generateText(\n userInput: string,\n options?: GenerateTextOptions\n): Promise<NonNullablePaths<GenerateTextResponse, `results`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n userInput: userInput,\n channelName: options?.channelName,\n tone: options?.tone,\n languageCode: options?.languageCode,\n additionalContent: options?.additionalContent,\n });\n\n const reqOpts =\n ambassadorWixPromotePublisherV1GeneratedContent.generateText(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n userInput: '$[0]',\n channelName: '$[1].channelName',\n tone: '$[1].tone',\n languageCode: '$[1].languageCode',\n additionalContent: '$[1].additionalContent',\n },\n singleArgumentUnchanged: false,\n },\n ['userInput', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateTextOptions {\n /** Social channel to tailor the captions for. */\n channelName?: ChannelNameWithLiterals;\n /**\n * Tone of voice for the captions. For example, `professional` or `playful`.\n * @maxLength 30\n */\n tone?: string | null;\n /**\n * 2-letter language code for the generated captions in ISO 639-1 alpha-2 format.\n * @maxLength 2\n */\n languageCode?: string | null;\n /** Additional content to incorporate into the captions. */\n additionalContent?: AdditionalContent;\n}\n\n/**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n * @public\n * @documentationMaturity preview\n * @permissionId promote:publisher:v1:generated_content:generate_post_data\n * @applicableIdentity APP\n * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GeneratePostData\n */\nexport async function generatePostData(\n options?: GeneratePostDataOptions\n): Promise<\n NonNullablePaths<\n GeneratePostDataResponse,\n | `results`\n | `results.${number}.instagramPost.insights.likes`\n | `results.${number}.instagramPost.insights.engagement`\n | `results.${number}.instagramPost.insights.impressions`\n | `results.${number}.instagramPost.insights.plays`\n | `results.${number}.instagramPost.insights.reach`\n | `results.${number}.instagramPost.insights.comments`\n | `results.${number}.instagramPost.insights.shares`\n | `results.${number}.instagramPost.insights.saved`\n | `results.${number}.instagramPost.insights.totalInteractions`\n | `results.${number}.linkedinPost.insights.uniqueImpressions`\n | `results.${number}.linkedinPost.insights.impression`\n | `results.${number}.linkedinPost.insights.shares`\n | `results.${number}.linkedinPost.insights.engagement`\n | `results.${number}.linkedinPost.insights.clicks`\n | `results.${number}.linkedinPost.insights.likes`\n | `results.${number}.linkedinPost.insights.comments`\n | `results.${number}.twitterPost.insights.retweets`\n | `results.${number}.twitterPost.insights.replies`\n | `results.${number}.twitterPost.insights.likes`\n | `results.${number}.twitterPost.insights.quotes`\n | `results.${number}.twitterPost.insights.bookmarks`\n | `results.${number}.twitterPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.clicks`\n | `results.${number}.pinterestPost.insights.saves`\n | `results.${number}.pinterestPost.insights.comments`\n | `results.${number}.pinterestPost.insights.reactions`\n | `results.${number}.gbpPost.callToAction.actionType`\n | `results.${number}.gbpPost.insights.shares`\n | `results.${number}.tiktokPhoto.privacyLevel`\n | `results.${number}.tiktokPhoto.disableComment`\n | `results.${number}.tiktokPhoto.autoAddMusic`\n | `results.${number}.tiktokPhoto.brandContentToggle`\n | `results.${number}.tiktokPhoto.brandOrganicToggle`\n | `results.${number}.tiktokPhoto.insights.views`\n | `results.${number}.tiktokPhoto.insights.likes`\n | `results.${number}.tiktokPhoto.insights.comments`\n | `results.${number}.tiktokPhoto.insights.shares`\n | `results.${number}.channelName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n siteAssets: options?.siteAssets,\n userInput: options?.userInput,\n media: options?.media,\n context: options?.context,\n channels: options?.channels,\n });\n\n const reqOpts =\n ambassadorWixPromotePublisherV1GeneratedContent.generatePostData(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n siteAssets: '$[0].siteAssets',\n userInput: '$[0].userInput',\n media: '$[0].media',\n context: '$[0].context',\n channels: '$[0].channels',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GeneratePostDataOptions {\n /**\n * Site assets the generated post is based on.\n * @maxSize 10\n */\n siteAssets?: SiteAsset[];\n /**\n * Free-form guidance for the generated post content.\n * @maxLength 5000\n */\n userInput?: string | null;\n /**\n * Candidate media for the generated post. Accepts images only. Each item carries a `type` (must be image), a `url`, and an optional Wix Media Manager `fileId` for media already in Wix.\n * @maxSize 10\n */\n media?: Media[];\n /** Additional context to incorporate into the generated content. */\n context?: Record<string, any> | null;\n /**\n * Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Twitter, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.\n * @maxSize 10\n */\n channels?: ChannelNameWithLiterals[];\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/social-publisher',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/social-publisher',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/social-publisher',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/social-publisher',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME =\n '@wix/auto_sdk_promote-growth-tools-publisher_generated-content';\n\n/**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n */\nexport function generateText(payload: object): RequestOptionsFactory<any> {\n function __generateText({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.publisher.v1.generated_content',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateText',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({\n protoPath: '/v1/generate-text',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateText;\n}\n\n/**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n */\nexport function generatePostData(payload: object): RequestOptionsFactory<any> {\n function __generatePostData({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.publisher.v1.generated_content',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.publisher.v1.GeneratedContentService.GeneratePostData',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({\n protoPath: '/v1/generate-post-data',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.facebookPost.insights.updatedDate' },\n { path: 'results.linkedinPost.insights.updatedDate' },\n { path: 'results.twitterPost.insights.updatedDate' },\n { path: 'results.pinterestPost.insights.updatedDate' },\n { path: 'results.gbpPost.insights.updatedDate' },\n { path: 'results.tiktokPhoto.insights.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'results.linkedinPost.insights.engagement' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generatePostData;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GeneratePostDataOptions,\n GeneratePostDataResponse,\n GenerateTextOptions,\n GenerateTextResponse,\n generatePostData as universalGeneratePostData,\n generateText as universalGenerateText,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\n\nexport const __metadata = {\n PACKAGE_NAME: '@wix/promote-growth-tools-publisher',\n};\n\nexport function generateText(httpClient: HttpClient): GenerateTextSignature {\n return (userInput: string, options?: GenerateTextOptions) =>\n universalGenerateText(\n userInput,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateTextSignature {\n /**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n * @param - Text prompt describing the post to generate captions for.\n */\n (userInput: string, options?: GenerateTextOptions): Promise<\n NonNullablePaths<GenerateTextResponse, `results`, 2>\n >;\n}\n\nexport function generatePostData(\n httpClient: HttpClient\n): GeneratePostDataSignature {\n return (options?: GeneratePostDataOptions) =>\n universalGeneratePostData(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GeneratePostDataSignature {\n /**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n */\n (options?: GeneratePostDataOptions): Promise<\n NonNullablePaths<\n GeneratePostDataResponse,\n | `results`\n | `results.${number}.instagramPost.insights.likes`\n | `results.${number}.instagramPost.insights.engagement`\n | `results.${number}.instagramPost.insights.impressions`\n | `results.${number}.instagramPost.insights.plays`\n | `results.${number}.instagramPost.insights.reach`\n | `results.${number}.instagramPost.insights.comments`\n | `results.${number}.instagramPost.insights.shares`\n | `results.${number}.instagramPost.insights.saved`\n | `results.${number}.instagramPost.insights.totalInteractions`\n | `results.${number}.linkedinPost.insights.uniqueImpressions`\n | `results.${number}.linkedinPost.insights.impression`\n | `results.${number}.linkedinPost.insights.shares`\n | `results.${number}.linkedinPost.insights.engagement`\n | `results.${number}.linkedinPost.insights.clicks`\n | `results.${number}.linkedinPost.insights.likes`\n | `results.${number}.linkedinPost.insights.comments`\n | `results.${number}.twitterPost.insights.retweets`\n | `results.${number}.twitterPost.insights.replies`\n | `results.${number}.twitterPost.insights.likes`\n | `results.${number}.twitterPost.insights.quotes`\n | `results.${number}.twitterPost.insights.bookmarks`\n | `results.${number}.twitterPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.clicks`\n | `results.${number}.pinterestPost.insights.saves`\n | `results.${number}.pinterestPost.insights.comments`\n | `results.${number}.pinterestPost.insights.reactions`\n | `results.${number}.gbpPost.callToAction.actionType`\n | `results.${number}.gbpPost.insights.shares`\n | `results.${number}.tiktokPhoto.privacyLevel`\n | `results.${number}.tiktokPhoto.disableComment`\n | `results.${number}.tiktokPhoto.autoAddMusic`\n | `results.${number}.tiktokPhoto.brandContentToggle`\n | `results.${number}.tiktokPhoto.brandOrganicToggle`\n | `results.${number}.tiktokPhoto.insights.views`\n | `results.${number}.tiktokPhoto.insights.likes`\n | `results.${number}.tiktokPhoto.insights.comments`\n | `results.${number}.tiktokPhoto.insights.shares`\n | `results.${number}.channelName`,\n 6\n >\n >;\n}\n\nexport {\n AdditionalContent,\n ChannelName,\n ChannelPostData,\n ChannelPostDataDataOneOf,\n FacebokActivity,\n FacebookImpressions,\n FacebookInsights,\n FacebookInteractions,\n FacebookPost,\n FacebookPostUrlOneOf,\n FacebookReactions,\n GbpInsights,\n GbpPost,\n GbpPostCallToAction,\n GbpPostCallToActionType,\n GenerateImageRequest,\n GenerateImageResponse,\n GenerateMediaStatus,\n GeneratePostDataOptions,\n GeneratePostDataRequest,\n GeneratePostDataResponse,\n GenerateTextOptions,\n GenerateTextRequest,\n GenerateTextResponse,\n GenerateTextResult,\n GenerateVideoRequest,\n GenerateVideoResponse,\n GeneratedContent,\n InstagramInsights,\n InstagramPost,\n InstagramPostUrlOneOf,\n LinkMetadata,\n LinkedinPost,\n LinkedinPostInsights,\n LinkedinPostUrlOneOf,\n Media,\n MediaType,\n MediaWrapper,\n PinterestInsights,\n PinterestPost,\n SiteAsset,\n TikTokInsights,\n TikTokPhoto,\n TikTokPrivacyLevel,\n TwitterInsights,\n TwitterPost,\n TwitterPostUrlOneOf,\n Type,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\n","import {\n generateText as publicGenerateText,\n generatePostData as publicGeneratePostData,\n} from './promote-publisher-v1-generated-content-generated-content.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const generateText: MaybeContext<\n BuildRESTFunction<typeof publicGenerateText> & typeof publicGenerateText\n> = /*#__PURE__*/ createRESTModule(publicGenerateText);\nexport const generatePostData: MaybeContext<\n BuildRESTFunction<typeof publicGeneratePostData> &\n typeof publicGeneratePostData\n> = /*#__PURE__*/ createRESTModule(publicGeneratePostData);\n\nexport {\n ChannelName,\n GenerateMediaStatus,\n Type,\n MediaType,\n GbpPostCallToActionType,\n TikTokPrivacyLevel,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\nexport {\n GeneratedContent,\n GenerateTextRequest,\n AdditionalContent,\n GenerateTextResponse,\n GenerateTextResult,\n GenerateImageRequest,\n GenerateImageResponse,\n GenerateVideoRequest,\n GenerateVideoResponse,\n GeneratePostDataRequest,\n SiteAsset,\n Media,\n GeneratePostDataResponse,\n ChannelPostData,\n ChannelPostDataDataOneOf,\n InstagramPost,\n InstagramPostUrlOneOf,\n MediaWrapper,\n InstagramInsights,\n FacebookPost,\n FacebookPostUrlOneOf,\n LinkMetadata,\n FacebookInsights,\n FacebookImpressions,\n FacebookInteractions,\n FacebookReactions,\n FacebokActivity,\n LinkedinPost,\n LinkedinPostUrlOneOf,\n LinkedinPostInsights,\n TwitterPost,\n TwitterPostUrlOneOf,\n TwitterInsights,\n PinterestPost,\n PinterestInsights,\n GbpPost,\n GbpPostCallToAction,\n GbpInsights,\n TikTokPhoto,\n TikTokInsights,\n GenerateTextOptions,\n GeneratePostDataOptions,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\nexport {\n ChannelNameWithLiterals,\n GenerateMediaStatusWithLiterals,\n TypeWithLiterals,\n MediaTypeWithLiterals,\n GbpPostCallToActionTypeWithLiterals,\n TikTokPrivacyLevelWithLiterals,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,oBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;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YAAY;AAAA,UACZ,WAAW;AAAA,UACX,OAAO;AAAA,UACP,SAAS;AAAA,UACT,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEl0BO,SAASE,cAAa,YAA+C;AAC1E,SAAO,CAAC,WAAmB,YACzBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAcO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACzCA,IAAAC,uBAAiC;AAG1B,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,oBAGK,2DAAiBA,iBAAsB;","names":["generatePostData","generateText","payload","ChannelName","GenerateMediaStatus","Type","MediaType","GbpPostCallToActionType","TikTokPrivacyLevel","generateText","sdkTransformError","generatePostData","generateText","generatePostData","import_rest_modules","generateText","generatePostData"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/promote-publisher-v1-generated-content-generated-content.universal.ts","../../src/promote-publisher-v1-generated-content-generated-content.http.ts","../../src/promote-publisher-v1-generated-content-generated-content.public.ts","../../src/promote-publisher-v1-generated-content-generated-content.context.ts"],"sourcesContent":["export * from './src/promote-publisher-v1-generated-content-generated-content.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPromotePublisherV1GeneratedContent from './promote-publisher-v1-generated-content-generated-content.http.js';\n\n/** Generated content is AI-created post material, such as captions, titles, and images, produced from a text prompt or a site's assets. Use generated content to build a post and then publish it as an item. */\nexport interface GeneratedContent {\n /**\n * Generated content ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n}\n\nexport interface GenerateTextRequest {\n /**\n * Text prompt describing the post to generate captions for.\n * @maxLength 3000\n */\n userInput: string | null;\n /** Social channel to tailor the captions for. */\n channelName?: ChannelNameWithLiterals;\n /**\n * Tone of voice for the captions. For example, `professional` or `playful`.\n * @maxLength 30\n */\n tone?: string | null;\n /**\n * 2-letter language code for the generated captions in ISO 639-1 alpha-2 format.\n * @maxLength 2\n */\n languageCode?: string | null;\n /** Additional content to incorporate into the captions. */\n additionalContent?: AdditionalContent;\n}\n\n/** Supported social channel. */\nexport enum ChannelName {\n INSTAGRAM = 'INSTAGRAM',\n FACEBOOK = 'FACEBOOK',\n YOUTUBE = 'YOUTUBE',\n LINKEDIN = 'LINKEDIN',\n /** Deprecated: No longer functional as of July 1, 2026. */\n TWITTER = 'TWITTER',\n PINTEREST = 'PINTEREST',\n /** Google Business Profile. */\n GBP = 'GBP',\n TIKTOK = 'TIKTOK',\n}\n\n/** @enumType */\nexport type ChannelNameWithLiterals =\n | ChannelName\n | 'INSTAGRAM'\n | 'FACEBOOK'\n | 'YOUTUBE'\n | 'LINKEDIN'\n | 'TWITTER'\n | 'PINTEREST'\n | 'GBP'\n | 'TIKTOK';\n\nexport interface AdditionalContent {\n /**\n * URL to reference in the captions, such as a link to promote.\n * @format WEB_URL\n */\n url?: string | null;\n /** Whether to include hashtags in the captions. */\n withHashtags?: boolean | null;\n /** Whether to add a \"link in bio\" reference to the captions. */\n addLinkInBio?: boolean | null;\n}\n\nexport interface GenerateTextResponse {\n /** Generated caption suggestions. */\n results?: GenerateTextResult[];\n}\n\nexport interface GenerateTextResult {\n /**\n * Generated caption.\n * @maxLength 1000\n */\n caption?: string | null;\n /**\n * Generated title.\n * @maxLength 1000\n */\n title?: string | null;\n}\n\nexport interface GenerateImageRequest {\n /**\n * Text prompt describing the image to generate.\n * @maxLength 3000\n */\n userInput?: string | null;\n /**\n * URL of the source image to generate from.\n * @format WEB_URL\n */\n imageUrl?: string | null;\n}\n\nexport interface GenerateImageResponse {\n /** Status of the generation request. */\n status?: GenerateMediaStatusWithLiterals;\n /**\n * Identifies the asynchronous image-generation process.\n * @maxLength 1000\n */\n executionId?: string | null;\n}\n\n/** Status of a media generation request. */\nexport enum GenerateMediaStatus {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** The generation request was accepted. */\n OK = 'OK',\n}\n\n/** @enumType */\nexport type GenerateMediaStatusWithLiterals =\n | GenerateMediaStatus\n | 'UNKNOWN_STATUS'\n | 'OK';\n\nexport interface GenerateVideoRequest {\n /** @maxLength 3000 */\n userInput?: string | null;\n /** @format WEB_URL */\n imageUrl?: string | null;\n}\n\nexport interface GenerateVideoResponse {\n status?: GenerateMediaStatusWithLiterals;\n /** @maxLength 1000 */\n executionId?: string | null;\n}\n\n/** Request for GeneratePostData. Provide at least one of `siteAssets` or `userInput`. */\nexport interface GeneratePostDataRequest {\n /**\n * Site assets the generated post is based on.\n * @maxSize 10\n */\n siteAssets?: SiteAsset[];\n /**\n * Free-form guidance for the generated post content.\n * @maxLength 5000\n */\n userInput?: string | null;\n /**\n * Candidate media for the generated post. Accepts images only. Each item carries a `type` (must be image), a `url`, and an optional Wix Media Manager `fileId` for media already in Wix.\n * @maxSize 10\n */\n media?: Media[];\n /** Additional context to incorporate into the generated content. */\n context?: Record<string, any> | null;\n /**\n * Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.\n * @maxSize 10\n */\n channels?: ChannelNameWithLiterals[];\n}\n\n/** A site asset, such as a product or a blog post, that post content can be generated from. */\nexport interface SiteAsset {\n /**\n * ID of the asset in the Wix app that owns it. For example, a product ID for a `STORES_PRODUCT` asset.\n * @maxLength 256\n */\n _id?: string | null;\n /** Type of asset. */\n type?: TypeWithLiterals;\n}\n\n/** Type of site asset. */\nexport enum Type {\n /** A Wix Blog post. */\n BLOG_POST = 'BLOG_POST',\n /** A Wix Events event. */\n EVENT = 'EVENT',\n /** A Wix Stores product. */\n STORES_PRODUCT = 'STORES_PRODUCT',\n /** A Wix Bookings service. */\n BOOKINGS_SERVICE = 'BOOKINGS_SERVICE',\n /** A Wix Stores coupon. */\n STORES_COUPON = 'STORES_COUPON',\n /** A Wix Stores category. */\n STORES_CATEGORY = 'STORES_CATEGORY',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'BLOG_POST'\n | 'EVENT'\n | 'STORES_PRODUCT'\n | 'BOOKINGS_SERVICE'\n | 'STORES_COUPON'\n | 'STORES_CATEGORY';\n\nexport interface Media {\n /** Media type. */\n type?: MediaTypeWithLiterals;\n /**\n * Media URL.\n * @format WEB_URL\n */\n url?: string | null;\n /**\n * Media Manager file ID backing the media. Available only when the media is stored in the Media Manager.\n * @maxLength 1000\n */\n fileId?: string | null;\n}\n\nexport enum MediaType {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals = MediaType | 'IMAGE' | 'VIDEO';\n\nexport interface GeneratePostDataResponse {\n /** Generated post content, one entry per requested channel. */\n results?: ChannelPostData[];\n}\n\n/** Channel-specific post content. Use it to create a draft or publish an item. */\nexport interface ChannelPostData extends ChannelPostDataDataOneOf {\n instagramPost?: InstagramPost;\n facebookPost?: FacebookPost;\n linkedinPost?: LinkedinPost;\n /**\n * Deprecated: No longer functional as of July 1, 2026.\n * @deprecated Deprecated: No longer functional as of July 1, 2026.\n * @targetRemovalDate 2026-07-01\n */\n twitterPost?: TwitterPost;\n pinterestPost?: PinterestPost;\n gbpPost?: GbpPost;\n tiktokPhoto?: TikTokPhoto;\n /** Channel the content is generated for. */\n channelName?: ChannelNameWithLiterals;\n}\n\n/** @oneof */\nexport interface ChannelPostDataDataOneOf {\n instagramPost?: InstagramPost;\n facebookPost?: FacebookPost;\n linkedinPost?: LinkedinPost;\n /**\n * Deprecated: No longer functional as of July 1, 2026.\n * @deprecated Deprecated: No longer functional as of July 1, 2026.\n * @targetRemovalDate 2026-07-01\n */\n twitterPost?: TwitterPost;\n pinterestPost?: PinterestPost;\n gbpPost?: GbpPost;\n tiktokPhoto?: TikTokPhoto;\n}\n\nexport interface InstagramPost extends InstagramPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /**\n * Caption for the post. Can include hashtags (for example, `#crazywildebeest`) and mentions of Instagram users (for example, `@natgeo`). Mentioned users are notified when the post is published. Supports up to 30 hashtags and 20 mentions.\n * @maxLength 2200\n */\n caption?: string | null;\n /**\n * The post URL on Instagram.\n * @readonly\n */\n postUrl?: string | null;\n /** Insights from Instagram. */\n insights?: InstagramInsights;\n}\n\n/** @oneof */\nexport interface InstagramPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface MediaWrapper {\n /** List of media items. */\n media?: Media[];\n}\n\nexport interface InstagramInsights {\n /** Number of likes. */\n likes?: number;\n /** Number of engagements. */\n engagement?: number;\n /** Number of impressions. */\n impressions?: number;\n /** Number of plays. */\n plays?: number;\n /** Number of accounts reached. */\n reach?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of shares. */\n shares?: number;\n /** Number of saves. */\n saved?: number;\n /** Total number of interactions. */\n totalInteractions?: number;\n}\n\nexport interface FacebookPost extends FacebookPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** The page ID to publish the post to. */\n pageId?: string | null;\n /** Caption for the post. */\n caption?: string | null;\n /**\n * The post URL on Facebook.\n * @readonly\n */\n postUrl?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from Facebook. */\n insights?: FacebookInsights;\n}\n\n/** @oneof */\nexport interface FacebookPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface LinkMetadata {\n /** Thumbnail URL for the link preview. */\n thumbnailUrl?: string | null;\n /** Title for the link preview. */\n title?: string | null;\n /** Description for the link preview. */\n description?: string | null;\n}\n\nexport interface FacebookInsights {\n /** Impression counts. */\n impressions?: FacebookImpressions;\n /** Interaction counts. */\n interactions?: FacebookInteractions;\n /** Reaction counts. */\n reactions?: FacebookReactions;\n /** Activity counts. */\n activity?: FacebokActivity;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface FacebookImpressions {\n /** Number of unique impressions. */\n unique?: number;\n /** Total number of impressions. */\n total?: number;\n}\n\nexport interface FacebookInteractions {\n /** Number of unique interactions. */\n unique?: number;\n /** Total number of interactions. */\n total?: number;\n}\n\nexport interface FacebookReactions {\n /** Number of \"like\" reactions. */\n like?: number;\n /** Number of \"love\" reactions. */\n love?: number;\n /** Number of \"wow\" reactions. */\n wow?: number;\n /** Number of \"haha\" reactions. */\n haha?: number;\n /** Number of \"sad\" reactions. */\n sad?: number;\n /** Number of \"angry\" reactions. */\n anger?: number;\n}\n\nexport interface FacebokActivity {\n /** Number of shares. */\n share?: number;\n /** Number of likes. */\n like?: number;\n /** Number of comments. */\n comment?: number;\n}\n\nexport interface LinkedinPost extends LinkedinPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Author ID of the post. Can be an organization page or a personal feed. */\n authorId?: string | null;\n /** Caption for the post. */\n caption?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from LinkedIn. */\n insights?: LinkedinPostInsights;\n}\n\n/** @oneof */\nexport interface LinkedinPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface LinkedinPostInsights {\n /** Number of unique impressions. */\n uniqueImpressions?: number;\n /** Total number of impressions. */\n impression?: number;\n /** Number of shares. */\n shares?: number;\n /** Engagement rate. */\n engagement?: number;\n /** Number of clicks. */\n clicks?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of comments. */\n comments?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\n/** Deprecated: No longer functional as of July 1, 2026. */\nexport interface TwitterPost extends TwitterPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Caption for the post. */\n caption?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from X (Twitter). */\n insights?: TwitterInsights;\n}\n\n/** @oneof */\nexport interface TwitterPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\n/** Deprecated: No longer functional as of July 1, 2026. */\nexport interface TwitterInsights {\n /** Number of retweets. */\n retweets?: number;\n /** Number of replies. */\n replies?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of quote posts. */\n quotes?: number;\n /** Number of bookmarks. */\n bookmarks?: number;\n /** Number of impressions. */\n impressions?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface PinterestPost {\n /**\n * The board ID to publish the post to.\n * @maxLength 128\n */\n boardId?: string | null;\n /**\n * The title of the post.\n * @maxLength 100\n */\n title?: string | null;\n /**\n * The description of the post.\n * @maxLength 800\n */\n description?: string | null;\n /**\n * The link to include in the post.\n * @maxLength 2048\n */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from Pinterest. */\n insights?: PinterestInsights;\n}\n\nexport interface PinterestInsights {\n /** Number of impressions. */\n impressions?: number;\n /** Number of clicks. */\n clicks?: number;\n /** Number of saves. */\n saves?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of reactions. */\n reactions?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface GbpPost {\n /**\n * The location ID to publish the post to.\n * @maxLength 128\n */\n locationId?: string | null;\n /**\n * Account (group) ID of the location.\n * @maxLength 128\n */\n locationAccountId?: string | null;\n /**\n * The description of the post.\n * @maxLength 1500\n */\n description?: string | null;\n /** Call to action type and URL to include in the post. */\n callToAction?: GbpPostCallToAction;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from Google Business Profile. */\n insights?: GbpInsights;\n}\n\nexport interface GbpPostCallToAction {\n /** Type of the call to action. */\n actionType?: GbpPostCallToActionTypeWithLiterals;\n /**\n * URL of the call to action.\n * @maxLength 2048\n */\n url?: string | null;\n}\n\n/** Type of call to action button shown on the post. */\nexport enum GbpPostCallToActionType {\n BOOK = 'BOOK',\n ORDER = 'ORDER',\n SHOP = 'SHOP',\n LEARN_MORE = 'LEARN_MORE',\n SIGN_UP = 'SIGN_UP',\n}\n\n/** @enumType */\nexport type GbpPostCallToActionTypeWithLiterals =\n | GbpPostCallToActionType\n | 'BOOK'\n | 'ORDER'\n | 'SHOP'\n | 'LEARN_MORE'\n | 'SIGN_UP';\n\nexport interface GbpInsights {\n /** Number of shares. Google Business Profile post insights aren't currently available, so this returns `-1`. */\n shares?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface TikTokPhoto {\n /**\n * The account ID to publish the photo to.\n * @maxLength 128\n */\n accountId?: string | null;\n /** Privacy level for the photo. */\n privacyLevel?: TikTokPrivacyLevelWithLiterals;\n /**\n * A title for the photo.\n * @maxLength 90\n */\n title?: string | null;\n /**\n * A description for the photo.\n * @maxLength 4000\n */\n description?: string | null;\n /** Whether comments are disabled for the photo. */\n disableComment?: boolean;\n /** Whether to automatically add music to the photo. */\n autoAddMusic?: boolean;\n /** Whether the content is a paid partnership promoting a third-party business. */\n brandContentToggle?: boolean;\n /** Whether the content promotes the creator's own business. */\n brandOrganicToggle?: boolean;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from TikTok. */\n insights?: TikTokInsights;\n}\n\nexport enum TikTokPrivacyLevel {\n PUBLIC_TO_EVERYONE = 'PUBLIC_TO_EVERYONE',\n FOLLOWER_OF_CREATOR = 'FOLLOWER_OF_CREATOR',\n MUTUAL_FOLLOW_FRIENDS = 'MUTUAL_FOLLOW_FRIENDS',\n SELF_ONLY = 'SELF_ONLY',\n}\n\n/** @enumType */\nexport type TikTokPrivacyLevelWithLiterals =\n | TikTokPrivacyLevel\n | 'PUBLIC_TO_EVERYONE'\n | 'FOLLOWER_OF_CREATOR'\n | 'MUTUAL_FOLLOW_FRIENDS'\n | 'SELF_ONLY';\n\nexport interface TikTokInsights {\n /** Number of views. */\n views?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of shares. */\n shares?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\n/**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n * @param userInput - Text prompt describing the post to generate captions for.\n * @public\n * @documentationMaturity preview\n * @requiredField userInput\n * @permissionId PROMOTE.PUBLISHER_ITEM_CREATE\n * @applicableIdentity APP\n * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateText\n */\nexport async function generateText(\n userInput: string,\n options?: GenerateTextOptions\n): Promise<NonNullablePaths<GenerateTextResponse, `results`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n userInput: userInput,\n channelName: options?.channelName,\n tone: options?.tone,\n languageCode: options?.languageCode,\n additionalContent: options?.additionalContent,\n });\n\n const reqOpts =\n ambassadorWixPromotePublisherV1GeneratedContent.generateText(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n userInput: '$[0]',\n channelName: '$[1].channelName',\n tone: '$[1].tone',\n languageCode: '$[1].languageCode',\n additionalContent: '$[1].additionalContent',\n },\n singleArgumentUnchanged: false,\n },\n ['userInput', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateTextOptions {\n /** Social channel to tailor the captions for. */\n channelName?: ChannelNameWithLiterals;\n /**\n * Tone of voice for the captions. For example, `professional` or `playful`.\n * @maxLength 30\n */\n tone?: string | null;\n /**\n * 2-letter language code for the generated captions in ISO 639-1 alpha-2 format.\n * @maxLength 2\n */\n languageCode?: string | null;\n /** Additional content to incorporate into the captions. */\n additionalContent?: AdditionalContent;\n}\n\n/**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n * @public\n * @documentationMaturity preview\n * @permissionId promote:publisher:v1:generated_content:generate_post_data\n * @applicableIdentity APP\n * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GeneratePostData\n */\nexport async function generatePostData(\n options?: GeneratePostDataOptions\n): Promise<\n NonNullablePaths<\n GeneratePostDataResponse,\n | `results`\n | `results.${number}.instagramPost.insights.likes`\n | `results.${number}.instagramPost.insights.engagement`\n | `results.${number}.instagramPost.insights.impressions`\n | `results.${number}.instagramPost.insights.plays`\n | `results.${number}.instagramPost.insights.reach`\n | `results.${number}.instagramPost.insights.comments`\n | `results.${number}.instagramPost.insights.shares`\n | `results.${number}.instagramPost.insights.saved`\n | `results.${number}.instagramPost.insights.totalInteractions`\n | `results.${number}.linkedinPost.insights.uniqueImpressions`\n | `results.${number}.linkedinPost.insights.impression`\n | `results.${number}.linkedinPost.insights.shares`\n | `results.${number}.linkedinPost.insights.engagement`\n | `results.${number}.linkedinPost.insights.clicks`\n | `results.${number}.linkedinPost.insights.likes`\n | `results.${number}.linkedinPost.insights.comments`\n | `results.${number}.twitterPost.insights.retweets`\n | `results.${number}.twitterPost.insights.replies`\n | `results.${number}.twitterPost.insights.likes`\n | `results.${number}.twitterPost.insights.quotes`\n | `results.${number}.twitterPost.insights.bookmarks`\n | `results.${number}.twitterPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.clicks`\n | `results.${number}.pinterestPost.insights.saves`\n | `results.${number}.pinterestPost.insights.comments`\n | `results.${number}.pinterestPost.insights.reactions`\n | `results.${number}.gbpPost.callToAction.actionType`\n | `results.${number}.gbpPost.insights.shares`\n | `results.${number}.tiktokPhoto.privacyLevel`\n | `results.${number}.tiktokPhoto.disableComment`\n | `results.${number}.tiktokPhoto.autoAddMusic`\n | `results.${number}.tiktokPhoto.brandContentToggle`\n | `results.${number}.tiktokPhoto.brandOrganicToggle`\n | `results.${number}.tiktokPhoto.insights.views`\n | `results.${number}.tiktokPhoto.insights.likes`\n | `results.${number}.tiktokPhoto.insights.comments`\n | `results.${number}.tiktokPhoto.insights.shares`\n | `results.${number}.channelName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n siteAssets: options?.siteAssets,\n userInput: options?.userInput,\n media: options?.media,\n context: options?.context,\n channels: options?.channels,\n });\n\n const reqOpts =\n ambassadorWixPromotePublisherV1GeneratedContent.generatePostData(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n siteAssets: '$[0].siteAssets',\n userInput: '$[0].userInput',\n media: '$[0].media',\n context: '$[0].context',\n channels: '$[0].channels',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GeneratePostDataOptions {\n /**\n * Site assets the generated post is based on.\n * @maxSize 10\n */\n siteAssets?: SiteAsset[];\n /**\n * Free-form guidance for the generated post content.\n * @maxLength 5000\n */\n userInput?: string | null;\n /**\n * Candidate media for the generated post. Accepts images only. Each item carries a `type` (must be image), a `url`, and an optional Wix Media Manager `fileId` for media already in Wix.\n * @maxSize 10\n */\n media?: Media[];\n /** Additional context to incorporate into the generated content. */\n context?: Record<string, any> | null;\n /**\n * Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.\n * @maxSize 10\n */\n channels?: ChannelNameWithLiterals[];\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/social-publisher',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/social-publisher',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/social-publisher',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/social-publisher',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME =\n '@wix/auto_sdk_promote-growth-tools-publisher_generated-content';\n\n/**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n */\nexport function generateText(payload: object): RequestOptionsFactory<any> {\n function __generateText({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.publisher.v1.generated_content',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateText',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({\n protoPath: '/v1/generate-text',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateText;\n}\n\n/**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n */\nexport function generatePostData(payload: object): RequestOptionsFactory<any> {\n function __generatePostData({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.publisher.v1.generated_content',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.publisher.v1.GeneratedContentService.GeneratePostData',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({\n protoPath: '/v1/generate-post-data',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.facebookPost.insights.updatedDate' },\n { path: 'results.linkedinPost.insights.updatedDate' },\n { path: 'results.twitterPost.insights.updatedDate' },\n { path: 'results.pinterestPost.insights.updatedDate' },\n { path: 'results.gbpPost.insights.updatedDate' },\n { path: 'results.tiktokPhoto.insights.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'results.linkedinPost.insights.engagement' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generatePostData;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GeneratePostDataOptions,\n GeneratePostDataResponse,\n GenerateTextOptions,\n GenerateTextResponse,\n generatePostData as universalGeneratePostData,\n generateText as universalGenerateText,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\n\nexport const __metadata = {\n PACKAGE_NAME: '@wix/promote-growth-tools-publisher',\n};\n\nexport function generateText(httpClient: HttpClient): GenerateTextSignature {\n return (userInput: string, options?: GenerateTextOptions) =>\n universalGenerateText(\n userInput,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateTextSignature {\n /**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n * @param - Text prompt describing the post to generate captions for.\n */\n (userInput: string, options?: GenerateTextOptions): Promise<\n NonNullablePaths<GenerateTextResponse, `results`, 2>\n >;\n}\n\nexport function generatePostData(\n httpClient: HttpClient\n): GeneratePostDataSignature {\n return (options?: GeneratePostDataOptions) =>\n universalGeneratePostData(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GeneratePostDataSignature {\n /**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n */\n (options?: GeneratePostDataOptions): Promise<\n NonNullablePaths<\n GeneratePostDataResponse,\n | `results`\n | `results.${number}.instagramPost.insights.likes`\n | `results.${number}.instagramPost.insights.engagement`\n | `results.${number}.instagramPost.insights.impressions`\n | `results.${number}.instagramPost.insights.plays`\n | `results.${number}.instagramPost.insights.reach`\n | `results.${number}.instagramPost.insights.comments`\n | `results.${number}.instagramPost.insights.shares`\n | `results.${number}.instagramPost.insights.saved`\n | `results.${number}.instagramPost.insights.totalInteractions`\n | `results.${number}.linkedinPost.insights.uniqueImpressions`\n | `results.${number}.linkedinPost.insights.impression`\n | `results.${number}.linkedinPost.insights.shares`\n | `results.${number}.linkedinPost.insights.engagement`\n | `results.${number}.linkedinPost.insights.clicks`\n | `results.${number}.linkedinPost.insights.likes`\n | `results.${number}.linkedinPost.insights.comments`\n | `results.${number}.twitterPost.insights.retweets`\n | `results.${number}.twitterPost.insights.replies`\n | `results.${number}.twitterPost.insights.likes`\n | `results.${number}.twitterPost.insights.quotes`\n | `results.${number}.twitterPost.insights.bookmarks`\n | `results.${number}.twitterPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.clicks`\n | `results.${number}.pinterestPost.insights.saves`\n | `results.${number}.pinterestPost.insights.comments`\n | `results.${number}.pinterestPost.insights.reactions`\n | `results.${number}.gbpPost.callToAction.actionType`\n | `results.${number}.gbpPost.insights.shares`\n | `results.${number}.tiktokPhoto.privacyLevel`\n | `results.${number}.tiktokPhoto.disableComment`\n | `results.${number}.tiktokPhoto.autoAddMusic`\n | `results.${number}.tiktokPhoto.brandContentToggle`\n | `results.${number}.tiktokPhoto.brandOrganicToggle`\n | `results.${number}.tiktokPhoto.insights.views`\n | `results.${number}.tiktokPhoto.insights.likes`\n | `results.${number}.tiktokPhoto.insights.comments`\n | `results.${number}.tiktokPhoto.insights.shares`\n | `results.${number}.channelName`,\n 6\n >\n >;\n}\n\nexport {\n AdditionalContent,\n ChannelName,\n ChannelPostData,\n ChannelPostDataDataOneOf,\n FacebokActivity,\n FacebookImpressions,\n FacebookInsights,\n FacebookInteractions,\n FacebookPost,\n FacebookPostUrlOneOf,\n FacebookReactions,\n GbpInsights,\n GbpPost,\n GbpPostCallToAction,\n GbpPostCallToActionType,\n GenerateImageRequest,\n GenerateImageResponse,\n GenerateMediaStatus,\n GeneratePostDataOptions,\n GeneratePostDataRequest,\n GeneratePostDataResponse,\n GenerateTextOptions,\n GenerateTextRequest,\n GenerateTextResponse,\n GenerateTextResult,\n GenerateVideoRequest,\n GenerateVideoResponse,\n GeneratedContent,\n InstagramInsights,\n InstagramPost,\n InstagramPostUrlOneOf,\n LinkMetadata,\n LinkedinPost,\n LinkedinPostInsights,\n LinkedinPostUrlOneOf,\n Media,\n MediaType,\n MediaWrapper,\n PinterestInsights,\n PinterestPost,\n SiteAsset,\n TikTokInsights,\n TikTokPhoto,\n TikTokPrivacyLevel,\n TwitterInsights,\n TwitterPost,\n TwitterPostUrlOneOf,\n Type,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\n","import {\n generateText as publicGenerateText,\n generatePostData as publicGeneratePostData,\n} from './promote-publisher-v1-generated-content-generated-content.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const generateText: MaybeContext<\n BuildRESTFunction<typeof publicGenerateText> & typeof publicGenerateText\n> = /*#__PURE__*/ createRESTModule(publicGenerateText);\nexport const generatePostData: MaybeContext<\n BuildRESTFunction<typeof publicGeneratePostData> &\n typeof publicGeneratePostData\n> = /*#__PURE__*/ createRESTModule(publicGeneratePostData);\n\nexport {\n ChannelName,\n GenerateMediaStatus,\n Type,\n MediaType,\n GbpPostCallToActionType,\n TikTokPrivacyLevel,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\nexport {\n GeneratedContent,\n GenerateTextRequest,\n AdditionalContent,\n GenerateTextResponse,\n GenerateTextResult,\n GenerateImageRequest,\n GenerateImageResponse,\n GenerateVideoRequest,\n GenerateVideoResponse,\n GeneratePostDataRequest,\n SiteAsset,\n Media,\n GeneratePostDataResponse,\n ChannelPostData,\n ChannelPostDataDataOneOf,\n InstagramPost,\n InstagramPostUrlOneOf,\n MediaWrapper,\n InstagramInsights,\n FacebookPost,\n FacebookPostUrlOneOf,\n LinkMetadata,\n FacebookInsights,\n FacebookImpressions,\n FacebookInteractions,\n FacebookReactions,\n FacebokActivity,\n LinkedinPost,\n LinkedinPostUrlOneOf,\n LinkedinPostInsights,\n TwitterPost,\n TwitterPostUrlOneOf,\n TwitterInsights,\n PinterestPost,\n PinterestInsights,\n GbpPost,\n GbpPostCallToAction,\n GbpInsights,\n TikTokPhoto,\n TikTokInsights,\n GenerateTextOptions,\n GeneratePostDataOptions,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\nexport {\n ChannelNameWithLiterals,\n GenerateMediaStatusWithLiterals,\n TypeWithLiterals,\n MediaTypeWithLiterals,\n GbpPostCallToActionTypeWithLiterals,\n TikTokPrivacyLevelWithLiterals,\n} from './promote-publisher-v1-generated-content-generated-content.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,oBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;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YAAY;AAAA,UACZ,WAAW;AAAA,UACX,OAAO;AAAA,UACP,SAAS;AAAA,UACT,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE/0BO,SAASE,cAAa,YAA+C;AAC1E,SAAO,CAAC,WAAmB,YACzBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAcO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACzCA,IAAAC,uBAAiC;AAG1B,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,oBAGK,2DAAiBA,iBAAsB;","names":["generatePostData","generateText","payload","ChannelName","GenerateMediaStatus","Type","MediaType","GbpPostCallToActionType","TikTokPrivacyLevel","generateText","sdkTransformError","generatePostData","generateText","generatePostData","import_rest_modules","generateText","generatePostData"]}
|
|
@@ -36,6 +36,7 @@ declare enum ChannelName {
|
|
|
36
36
|
FACEBOOK = "FACEBOOK",
|
|
37
37
|
YOUTUBE = "YOUTUBE",
|
|
38
38
|
LINKEDIN = "LINKEDIN",
|
|
39
|
+
/** Deprecated: No longer functional as of July 1, 2026. */
|
|
39
40
|
TWITTER = "TWITTER",
|
|
40
41
|
PINTEREST = "PINTEREST",
|
|
41
42
|
/** Google Business Profile. */
|
|
@@ -131,7 +132,7 @@ interface GeneratePostDataRequest {
|
|
|
131
132
|
/** Additional context to incorporate into the generated content. */
|
|
132
133
|
context?: Record<string, any> | null;
|
|
133
134
|
/**
|
|
134
|
-
* Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn,
|
|
135
|
+
* Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.
|
|
135
136
|
* @maxSize 10
|
|
136
137
|
*/
|
|
137
138
|
channels?: ChannelNameWithLiterals[];
|
|
@@ -192,6 +193,11 @@ interface ChannelPostData extends ChannelPostDataDataOneOf {
|
|
|
192
193
|
instagramPost?: InstagramPost;
|
|
193
194
|
facebookPost?: FacebookPost;
|
|
194
195
|
linkedinPost?: LinkedinPost;
|
|
196
|
+
/**
|
|
197
|
+
* Deprecated: No longer functional as of July 1, 2026.
|
|
198
|
+
* @deprecated Deprecated: No longer functional as of July 1, 2026.
|
|
199
|
+
* @targetRemovalDate 2026-07-01
|
|
200
|
+
*/
|
|
195
201
|
twitterPost?: TwitterPost;
|
|
196
202
|
pinterestPost?: PinterestPost;
|
|
197
203
|
gbpPost?: GbpPost;
|
|
@@ -204,6 +210,11 @@ interface ChannelPostDataDataOneOf {
|
|
|
204
210
|
instagramPost?: InstagramPost;
|
|
205
211
|
facebookPost?: FacebookPost;
|
|
206
212
|
linkedinPost?: LinkedinPost;
|
|
213
|
+
/**
|
|
214
|
+
* Deprecated: No longer functional as of July 1, 2026.
|
|
215
|
+
* @deprecated Deprecated: No longer functional as of July 1, 2026.
|
|
216
|
+
* @targetRemovalDate 2026-07-01
|
|
217
|
+
*/
|
|
207
218
|
twitterPost?: TwitterPost;
|
|
208
219
|
pinterestPost?: PinterestPost;
|
|
209
220
|
gbpPost?: GbpPost;
|
|
@@ -397,6 +408,7 @@ interface LinkedinPostInsights {
|
|
|
397
408
|
/** Date and time the insights were last updated. */
|
|
398
409
|
_updatedDate?: Date | null;
|
|
399
410
|
}
|
|
411
|
+
/** Deprecated: No longer functional as of July 1, 2026. */
|
|
400
412
|
interface TwitterPost extends TwitterPostUrlOneOf {
|
|
401
413
|
/** The image URL. */
|
|
402
414
|
imageUrl?: string | null;
|
|
@@ -424,6 +436,7 @@ interface TwitterPostUrlOneOf {
|
|
|
424
436
|
/** The media list. */
|
|
425
437
|
mediaWrapper?: MediaWrapper;
|
|
426
438
|
}
|
|
439
|
+
/** Deprecated: No longer functional as of July 1, 2026. */
|
|
427
440
|
interface TwitterInsights {
|
|
428
441
|
/** Number of retweets. */
|
|
429
442
|
retweets?: number;
|
|
@@ -638,7 +651,7 @@ interface GeneratePostDataOptions {
|
|
|
638
651
|
/** Additional context to incorporate into the generated content. */
|
|
639
652
|
context?: Record<string, any> | null;
|
|
640
653
|
/**
|
|
641
|
-
* Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn,
|
|
654
|
+
* Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.
|
|
642
655
|
* @maxSize 10
|
|
643
656
|
*/
|
|
644
657
|
channels?: ChannelNameWithLiterals[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/promote-publisher-v1-generated-content-generated-content.universal.ts","../../src/promote-publisher-v1-generated-content-generated-content.http.ts"],"sourcesContent":["export * from './src/promote-publisher-v1-generated-content-generated-content.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPromotePublisherV1GeneratedContent from './promote-publisher-v1-generated-content-generated-content.http.js';\n\n/** Generated content is AI-created post material, such as captions, titles, and images, produced from a text prompt or a site's assets. Use generated content to build a post and then publish it as an item. */\nexport interface GeneratedContent {\n /**\n * Generated content ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n}\n\nexport interface GenerateTextRequest {\n /**\n * Text prompt describing the post to generate captions for.\n * @maxLength 3000\n */\n userInput: string | null;\n /** Social channel to tailor the captions for. */\n channelName?: ChannelNameWithLiterals;\n /**\n * Tone of voice for the captions. For example, `professional` or `playful`.\n * @maxLength 30\n */\n tone?: string | null;\n /**\n * 2-letter language code for the generated captions in ISO 639-1 alpha-2 format.\n * @maxLength 2\n */\n languageCode?: string | null;\n /** Additional content to incorporate into the captions. */\n additionalContent?: AdditionalContent;\n}\n\n/** Supported social channel. */\nexport enum ChannelName {\n INSTAGRAM = 'INSTAGRAM',\n FACEBOOK = 'FACEBOOK',\n YOUTUBE = 'YOUTUBE',\n LINKEDIN = 'LINKEDIN',\n TWITTER = 'TWITTER',\n PINTEREST = 'PINTEREST',\n /** Google Business Profile. */\n GBP = 'GBP',\n TIKTOK = 'TIKTOK',\n}\n\n/** @enumType */\nexport type ChannelNameWithLiterals =\n | ChannelName\n | 'INSTAGRAM'\n | 'FACEBOOK'\n | 'YOUTUBE'\n | 'LINKEDIN'\n | 'TWITTER'\n | 'PINTEREST'\n | 'GBP'\n | 'TIKTOK';\n\nexport interface AdditionalContent {\n /**\n * URL to reference in the captions, such as a link to promote.\n * @format WEB_URL\n */\n url?: string | null;\n /** Whether to include hashtags in the captions. */\n withHashtags?: boolean | null;\n /** Whether to add a \"link in bio\" reference to the captions. */\n addLinkInBio?: boolean | null;\n}\n\nexport interface GenerateTextResponse {\n /** Generated caption suggestions. */\n results?: GenerateTextResult[];\n}\n\nexport interface GenerateTextResult {\n /**\n * Generated caption.\n * @maxLength 1000\n */\n caption?: string | null;\n /**\n * Generated title.\n * @maxLength 1000\n */\n title?: string | null;\n}\n\nexport interface GenerateImageRequest {\n /**\n * Text prompt describing the image to generate.\n * @maxLength 3000\n */\n userInput?: string | null;\n /**\n * URL of the source image to generate from.\n * @format WEB_URL\n */\n imageUrl?: string | null;\n}\n\nexport interface GenerateImageResponse {\n /** Status of the generation request. */\n status?: GenerateMediaStatusWithLiterals;\n /**\n * Identifies the asynchronous image-generation process.\n * @maxLength 1000\n */\n executionId?: string | null;\n}\n\n/** Status of a media generation request. */\nexport enum GenerateMediaStatus {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** The generation request was accepted. */\n OK = 'OK',\n}\n\n/** @enumType */\nexport type GenerateMediaStatusWithLiterals =\n | GenerateMediaStatus\n | 'UNKNOWN_STATUS'\n | 'OK';\n\nexport interface GenerateVideoRequest {\n /** @maxLength 3000 */\n userInput?: string | null;\n /** @format WEB_URL */\n imageUrl?: string | null;\n}\n\nexport interface GenerateVideoResponse {\n status?: GenerateMediaStatusWithLiterals;\n /** @maxLength 1000 */\n executionId?: string | null;\n}\n\n/** Request for GeneratePostData. Provide at least one of `siteAssets` or `userInput`. */\nexport interface GeneratePostDataRequest {\n /**\n * Site assets the generated post is based on.\n * @maxSize 10\n */\n siteAssets?: SiteAsset[];\n /**\n * Free-form guidance for the generated post content.\n * @maxLength 5000\n */\n userInput?: string | null;\n /**\n * Candidate media for the generated post. Accepts images only. Each item carries a `type` (must be image), a `url`, and an optional Wix Media Manager `fileId` for media already in Wix.\n * @maxSize 10\n */\n media?: Media[];\n /** Additional context to incorporate into the generated content. */\n context?: Record<string, any> | null;\n /**\n * Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Twitter, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.\n * @maxSize 10\n */\n channels?: ChannelNameWithLiterals[];\n}\n\n/** A site asset, such as a product or a blog post, that post content can be generated from. */\nexport interface SiteAsset {\n /**\n * ID of the asset in the Wix app that owns it. For example, a product ID for a `STORES_PRODUCT` asset.\n * @maxLength 256\n */\n _id?: string | null;\n /** Type of asset. */\n type?: TypeWithLiterals;\n}\n\n/** Type of site asset. */\nexport enum Type {\n /** A Wix Blog post. */\n BLOG_POST = 'BLOG_POST',\n /** A Wix Events event. */\n EVENT = 'EVENT',\n /** A Wix Stores product. */\n STORES_PRODUCT = 'STORES_PRODUCT',\n /** A Wix Bookings service. */\n BOOKINGS_SERVICE = 'BOOKINGS_SERVICE',\n /** A Wix Stores coupon. */\n STORES_COUPON = 'STORES_COUPON',\n /** A Wix Stores category. */\n STORES_CATEGORY = 'STORES_CATEGORY',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'BLOG_POST'\n | 'EVENT'\n | 'STORES_PRODUCT'\n | 'BOOKINGS_SERVICE'\n | 'STORES_COUPON'\n | 'STORES_CATEGORY';\n\nexport interface Media {\n /** Media type. */\n type?: MediaTypeWithLiterals;\n /**\n * Media URL.\n * @format WEB_URL\n */\n url?: string | null;\n /**\n * Media Manager file ID backing the media. Available only when the media is stored in the Media Manager.\n * @maxLength 1000\n */\n fileId?: string | null;\n}\n\nexport enum MediaType {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals = MediaType | 'IMAGE' | 'VIDEO';\n\nexport interface GeneratePostDataResponse {\n /** Generated post content, one entry per requested channel. */\n results?: ChannelPostData[];\n}\n\n/** Channel-specific post content. Use it to create a draft or publish an item. */\nexport interface ChannelPostData extends ChannelPostDataDataOneOf {\n instagramPost?: InstagramPost;\n facebookPost?: FacebookPost;\n linkedinPost?: LinkedinPost;\n twitterPost?: TwitterPost;\n pinterestPost?: PinterestPost;\n gbpPost?: GbpPost;\n tiktokPhoto?: TikTokPhoto;\n /** Channel the content is generated for. */\n channelName?: ChannelNameWithLiterals;\n}\n\n/** @oneof */\nexport interface ChannelPostDataDataOneOf {\n instagramPost?: InstagramPost;\n facebookPost?: FacebookPost;\n linkedinPost?: LinkedinPost;\n twitterPost?: TwitterPost;\n pinterestPost?: PinterestPost;\n gbpPost?: GbpPost;\n tiktokPhoto?: TikTokPhoto;\n}\n\nexport interface InstagramPost extends InstagramPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /**\n * Caption for the post. Can include hashtags (for example, `#crazywildebeest`) and mentions of Instagram users (for example, `@natgeo`). Mentioned users are notified when the post is published. Supports up to 30 hashtags and 20 mentions.\n * @maxLength 2200\n */\n caption?: string | null;\n /**\n * The post URL on Instagram.\n * @readonly\n */\n postUrl?: string | null;\n /** Insights from Instagram. */\n insights?: InstagramInsights;\n}\n\n/** @oneof */\nexport interface InstagramPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface MediaWrapper {\n /** List of media items. */\n media?: Media[];\n}\n\nexport interface InstagramInsights {\n /** Number of likes. */\n likes?: number;\n /** Number of engagements. */\n engagement?: number;\n /** Number of impressions. */\n impressions?: number;\n /** Number of plays. */\n plays?: number;\n /** Number of accounts reached. */\n reach?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of shares. */\n shares?: number;\n /** Number of saves. */\n saved?: number;\n /** Total number of interactions. */\n totalInteractions?: number;\n}\n\nexport interface FacebookPost extends FacebookPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** The page ID to publish the post to. */\n pageId?: string | null;\n /** Caption for the post. */\n caption?: string | null;\n /**\n * The post URL on Facebook.\n * @readonly\n */\n postUrl?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from Facebook. */\n insights?: FacebookInsights;\n}\n\n/** @oneof */\nexport interface FacebookPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface LinkMetadata {\n /** Thumbnail URL for the link preview. */\n thumbnailUrl?: string | null;\n /** Title for the link preview. */\n title?: string | null;\n /** Description for the link preview. */\n description?: string | null;\n}\n\nexport interface FacebookInsights {\n /** Impression counts. */\n impressions?: FacebookImpressions;\n /** Interaction counts. */\n interactions?: FacebookInteractions;\n /** Reaction counts. */\n reactions?: FacebookReactions;\n /** Activity counts. */\n activity?: FacebokActivity;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface FacebookImpressions {\n /** Number of unique impressions. */\n unique?: number;\n /** Total number of impressions. */\n total?: number;\n}\n\nexport interface FacebookInteractions {\n /** Number of unique interactions. */\n unique?: number;\n /** Total number of interactions. */\n total?: number;\n}\n\nexport interface FacebookReactions {\n /** Number of \"like\" reactions. */\n like?: number;\n /** Number of \"love\" reactions. */\n love?: number;\n /** Number of \"wow\" reactions. */\n wow?: number;\n /** Number of \"haha\" reactions. */\n haha?: number;\n /** Number of \"sad\" reactions. */\n sad?: number;\n /** Number of \"angry\" reactions. */\n anger?: number;\n}\n\nexport interface FacebokActivity {\n /** Number of shares. */\n share?: number;\n /** Number of likes. */\n like?: number;\n /** Number of comments. */\n comment?: number;\n}\n\nexport interface LinkedinPost extends LinkedinPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Author ID of the post. Can be an organization page or a personal feed. */\n authorId?: string | null;\n /** Caption for the post. */\n caption?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from LinkedIn. */\n insights?: LinkedinPostInsights;\n}\n\n/** @oneof */\nexport interface LinkedinPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface LinkedinPostInsights {\n /** Number of unique impressions. */\n uniqueImpressions?: number;\n /** Total number of impressions. */\n impression?: number;\n /** Number of shares. */\n shares?: number;\n /** Engagement rate. */\n engagement?: number;\n /** Number of clicks. */\n clicks?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of comments. */\n comments?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface TwitterPost extends TwitterPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Caption for the post. */\n caption?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from X (Twitter). */\n insights?: TwitterInsights;\n}\n\n/** @oneof */\nexport interface TwitterPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface TwitterInsights {\n /** Number of retweets. */\n retweets?: number;\n /** Number of replies. */\n replies?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of quote posts. */\n quotes?: number;\n /** Number of bookmarks. */\n bookmarks?: number;\n /** Number of impressions. */\n impressions?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface PinterestPost {\n /**\n * The board ID to publish the post to.\n * @maxLength 128\n */\n boardId?: string | null;\n /**\n * The title of the post.\n * @maxLength 100\n */\n title?: string | null;\n /**\n * The description of the post.\n * @maxLength 800\n */\n description?: string | null;\n /**\n * The link to include in the post.\n * @maxLength 2048\n */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from Pinterest. */\n insights?: PinterestInsights;\n}\n\nexport interface PinterestInsights {\n /** Number of impressions. */\n impressions?: number;\n /** Number of clicks. */\n clicks?: number;\n /** Number of saves. */\n saves?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of reactions. */\n reactions?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface GbpPost {\n /**\n * The location ID to publish the post to.\n * @maxLength 128\n */\n locationId?: string | null;\n /**\n * Account (group) ID of the location.\n * @maxLength 128\n */\n locationAccountId?: string | null;\n /**\n * The description of the post.\n * @maxLength 1500\n */\n description?: string | null;\n /** Call to action type and URL to include in the post. */\n callToAction?: GbpPostCallToAction;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from Google Business Profile. */\n insights?: GbpInsights;\n}\n\nexport interface GbpPostCallToAction {\n /** Type of the call to action. */\n actionType?: GbpPostCallToActionTypeWithLiterals;\n /**\n * URL of the call to action.\n * @maxLength 2048\n */\n url?: string | null;\n}\n\n/** Type of call to action button shown on the post. */\nexport enum GbpPostCallToActionType {\n BOOK = 'BOOK',\n ORDER = 'ORDER',\n SHOP = 'SHOP',\n LEARN_MORE = 'LEARN_MORE',\n SIGN_UP = 'SIGN_UP',\n}\n\n/** @enumType */\nexport type GbpPostCallToActionTypeWithLiterals =\n | GbpPostCallToActionType\n | 'BOOK'\n | 'ORDER'\n | 'SHOP'\n | 'LEARN_MORE'\n | 'SIGN_UP';\n\nexport interface GbpInsights {\n /** Number of shares. Google Business Profile post insights aren't currently available, so this returns `-1`. */\n shares?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface TikTokPhoto {\n /**\n * The account ID to publish the photo to.\n * @maxLength 128\n */\n accountId?: string | null;\n /** Privacy level for the photo. */\n privacyLevel?: TikTokPrivacyLevelWithLiterals;\n /**\n * A title for the photo.\n * @maxLength 90\n */\n title?: string | null;\n /**\n * A description for the photo.\n * @maxLength 4000\n */\n description?: string | null;\n /** Whether comments are disabled for the photo. */\n disableComment?: boolean;\n /** Whether to automatically add music to the photo. */\n autoAddMusic?: boolean;\n /** Whether the content is a paid partnership promoting a third-party business. */\n brandContentToggle?: boolean;\n /** Whether the content promotes the creator's own business. */\n brandOrganicToggle?: boolean;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from TikTok. */\n insights?: TikTokInsights;\n}\n\nexport enum TikTokPrivacyLevel {\n PUBLIC_TO_EVERYONE = 'PUBLIC_TO_EVERYONE',\n FOLLOWER_OF_CREATOR = 'FOLLOWER_OF_CREATOR',\n MUTUAL_FOLLOW_FRIENDS = 'MUTUAL_FOLLOW_FRIENDS',\n SELF_ONLY = 'SELF_ONLY',\n}\n\n/** @enumType */\nexport type TikTokPrivacyLevelWithLiterals =\n | TikTokPrivacyLevel\n | 'PUBLIC_TO_EVERYONE'\n | 'FOLLOWER_OF_CREATOR'\n | 'MUTUAL_FOLLOW_FRIENDS'\n | 'SELF_ONLY';\n\nexport interface TikTokInsights {\n /** Number of views. */\n views?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of shares. */\n shares?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\n/**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n * @param userInput - Text prompt describing the post to generate captions for.\n * @public\n * @documentationMaturity preview\n * @requiredField userInput\n * @permissionId PROMOTE.PUBLISHER_ITEM_CREATE\n * @applicableIdentity APP\n * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateText\n */\nexport async function generateText(\n userInput: string,\n options?: GenerateTextOptions\n): Promise<NonNullablePaths<GenerateTextResponse, `results`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n userInput: userInput,\n channelName: options?.channelName,\n tone: options?.tone,\n languageCode: options?.languageCode,\n additionalContent: options?.additionalContent,\n });\n\n const reqOpts =\n ambassadorWixPromotePublisherV1GeneratedContent.generateText(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n userInput: '$[0]',\n channelName: '$[1].channelName',\n tone: '$[1].tone',\n languageCode: '$[1].languageCode',\n additionalContent: '$[1].additionalContent',\n },\n singleArgumentUnchanged: false,\n },\n ['userInput', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateTextOptions {\n /** Social channel to tailor the captions for. */\n channelName?: ChannelNameWithLiterals;\n /**\n * Tone of voice for the captions. For example, `professional` or `playful`.\n * @maxLength 30\n */\n tone?: string | null;\n /**\n * 2-letter language code for the generated captions in ISO 639-1 alpha-2 format.\n * @maxLength 2\n */\n languageCode?: string | null;\n /** Additional content to incorporate into the captions. */\n additionalContent?: AdditionalContent;\n}\n\n/**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n * @public\n * @documentationMaturity preview\n * @permissionId promote:publisher:v1:generated_content:generate_post_data\n * @applicableIdentity APP\n * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GeneratePostData\n */\nexport async function generatePostData(\n options?: GeneratePostDataOptions\n): Promise<\n NonNullablePaths<\n GeneratePostDataResponse,\n | `results`\n | `results.${number}.instagramPost.insights.likes`\n | `results.${number}.instagramPost.insights.engagement`\n | `results.${number}.instagramPost.insights.impressions`\n | `results.${number}.instagramPost.insights.plays`\n | `results.${number}.instagramPost.insights.reach`\n | `results.${number}.instagramPost.insights.comments`\n | `results.${number}.instagramPost.insights.shares`\n | `results.${number}.instagramPost.insights.saved`\n | `results.${number}.instagramPost.insights.totalInteractions`\n | `results.${number}.linkedinPost.insights.uniqueImpressions`\n | `results.${number}.linkedinPost.insights.impression`\n | `results.${number}.linkedinPost.insights.shares`\n | `results.${number}.linkedinPost.insights.engagement`\n | `results.${number}.linkedinPost.insights.clicks`\n | `results.${number}.linkedinPost.insights.likes`\n | `results.${number}.linkedinPost.insights.comments`\n | `results.${number}.twitterPost.insights.retweets`\n | `results.${number}.twitterPost.insights.replies`\n | `results.${number}.twitterPost.insights.likes`\n | `results.${number}.twitterPost.insights.quotes`\n | `results.${number}.twitterPost.insights.bookmarks`\n | `results.${number}.twitterPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.clicks`\n | `results.${number}.pinterestPost.insights.saves`\n | `results.${number}.pinterestPost.insights.comments`\n | `results.${number}.pinterestPost.insights.reactions`\n | `results.${number}.gbpPost.callToAction.actionType`\n | `results.${number}.gbpPost.insights.shares`\n | `results.${number}.tiktokPhoto.privacyLevel`\n | `results.${number}.tiktokPhoto.disableComment`\n | `results.${number}.tiktokPhoto.autoAddMusic`\n | `results.${number}.tiktokPhoto.brandContentToggle`\n | `results.${number}.tiktokPhoto.brandOrganicToggle`\n | `results.${number}.tiktokPhoto.insights.views`\n | `results.${number}.tiktokPhoto.insights.likes`\n | `results.${number}.tiktokPhoto.insights.comments`\n | `results.${number}.tiktokPhoto.insights.shares`\n | `results.${number}.channelName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n siteAssets: options?.siteAssets,\n userInput: options?.userInput,\n media: options?.media,\n context: options?.context,\n channels: options?.channels,\n });\n\n const reqOpts =\n ambassadorWixPromotePublisherV1GeneratedContent.generatePostData(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n siteAssets: '$[0].siteAssets',\n userInput: '$[0].userInput',\n media: '$[0].media',\n context: '$[0].context',\n channels: '$[0].channels',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GeneratePostDataOptions {\n /**\n * Site assets the generated post is based on.\n * @maxSize 10\n */\n siteAssets?: SiteAsset[];\n /**\n * Free-form guidance for the generated post content.\n * @maxLength 5000\n */\n userInput?: string | null;\n /**\n * Candidate media for the generated post. Accepts images only. Each item carries a `type` (must be image), a `url`, and an optional Wix Media Manager `fileId` for media already in Wix.\n * @maxSize 10\n */\n media?: Media[];\n /** Additional context to incorporate into the generated content. */\n context?: Record<string, any> | null;\n /**\n * Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Twitter, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.\n * @maxSize 10\n */\n channels?: ChannelNameWithLiterals[];\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/social-publisher',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/social-publisher',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/social-publisher',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/social-publisher',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME =\n '@wix/auto_sdk_promote-growth-tools-publisher_generated-content';\n\n/**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n */\nexport function generateText(payload: object): RequestOptionsFactory<any> {\n function __generateText({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.publisher.v1.generated_content',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateText',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({\n protoPath: '/v1/generate-text',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateText;\n}\n\n/**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n */\nexport function generatePostData(payload: object): RequestOptionsFactory<any> {\n function __generatePostData({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.publisher.v1.generated_content',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.publisher.v1.GeneratedContentService.GeneratePostData',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({\n protoPath: '/v1/generate-post-data',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.facebookPost.insights.updatedDate' },\n { path: 'results.linkedinPost.insights.updatedDate' },\n { path: 'results.twitterPost.insights.updatedDate' },\n { path: 'results.pinterestPost.insights.updatedDate' },\n { path: 'results.gbpPost.insights.updatedDate' },\n { path: 'results.tiktokPhoto.insights.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'results.linkedinPost.insights.engagement' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generatePostData;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,oBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB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,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,YAAY,SAAS;AAAA,IACrB,WAAW,SAAS;AAAA,IACpB,OAAO,SAAS;AAAA,IAChB,SAAS,SAAS;AAAA,IAClB,UAAU,SAAS;AAAA,EACrB,CAAC;AAED,QAAM,UAC4C,iBAAiB,OAAO;AAE1E,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,OAAO;AAAA,UACP,SAAS;AAAA,UACT,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["generatePostData","generateText","payload","ChannelName","GenerateMediaStatus","Type","MediaType","GbpPostCallToActionType","TikTokPrivacyLevel","generateText","sdkTransformError","generatePostData"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/promote-publisher-v1-generated-content-generated-content.universal.ts","../../src/promote-publisher-v1-generated-content-generated-content.http.ts"],"sourcesContent":["export * from './src/promote-publisher-v1-generated-content-generated-content.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPromotePublisherV1GeneratedContent from './promote-publisher-v1-generated-content-generated-content.http.js';\n\n/** Generated content is AI-created post material, such as captions, titles, and images, produced from a text prompt or a site's assets. Use generated content to build a post and then publish it as an item. */\nexport interface GeneratedContent {\n /**\n * Generated content ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n}\n\nexport interface GenerateTextRequest {\n /**\n * Text prompt describing the post to generate captions for.\n * @maxLength 3000\n */\n userInput: string | null;\n /** Social channel to tailor the captions for. */\n channelName?: ChannelNameWithLiterals;\n /**\n * Tone of voice for the captions. For example, `professional` or `playful`.\n * @maxLength 30\n */\n tone?: string | null;\n /**\n * 2-letter language code for the generated captions in ISO 639-1 alpha-2 format.\n * @maxLength 2\n */\n languageCode?: string | null;\n /** Additional content to incorporate into the captions. */\n additionalContent?: AdditionalContent;\n}\n\n/** Supported social channel. */\nexport enum ChannelName {\n INSTAGRAM = 'INSTAGRAM',\n FACEBOOK = 'FACEBOOK',\n YOUTUBE = 'YOUTUBE',\n LINKEDIN = 'LINKEDIN',\n /** Deprecated: No longer functional as of July 1, 2026. */\n TWITTER = 'TWITTER',\n PINTEREST = 'PINTEREST',\n /** Google Business Profile. */\n GBP = 'GBP',\n TIKTOK = 'TIKTOK',\n}\n\n/** @enumType */\nexport type ChannelNameWithLiterals =\n | ChannelName\n | 'INSTAGRAM'\n | 'FACEBOOK'\n | 'YOUTUBE'\n | 'LINKEDIN'\n | 'TWITTER'\n | 'PINTEREST'\n | 'GBP'\n | 'TIKTOK';\n\nexport interface AdditionalContent {\n /**\n * URL to reference in the captions, such as a link to promote.\n * @format WEB_URL\n */\n url?: string | null;\n /** Whether to include hashtags in the captions. */\n withHashtags?: boolean | null;\n /** Whether to add a \"link in bio\" reference to the captions. */\n addLinkInBio?: boolean | null;\n}\n\nexport interface GenerateTextResponse {\n /** Generated caption suggestions. */\n results?: GenerateTextResult[];\n}\n\nexport interface GenerateTextResult {\n /**\n * Generated caption.\n * @maxLength 1000\n */\n caption?: string | null;\n /**\n * Generated title.\n * @maxLength 1000\n */\n title?: string | null;\n}\n\nexport interface GenerateImageRequest {\n /**\n * Text prompt describing the image to generate.\n * @maxLength 3000\n */\n userInput?: string | null;\n /**\n * URL of the source image to generate from.\n * @format WEB_URL\n */\n imageUrl?: string | null;\n}\n\nexport interface GenerateImageResponse {\n /** Status of the generation request. */\n status?: GenerateMediaStatusWithLiterals;\n /**\n * Identifies the asynchronous image-generation process.\n * @maxLength 1000\n */\n executionId?: string | null;\n}\n\n/** Status of a media generation request. */\nexport enum GenerateMediaStatus {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** The generation request was accepted. */\n OK = 'OK',\n}\n\n/** @enumType */\nexport type GenerateMediaStatusWithLiterals =\n | GenerateMediaStatus\n | 'UNKNOWN_STATUS'\n | 'OK';\n\nexport interface GenerateVideoRequest {\n /** @maxLength 3000 */\n userInput?: string | null;\n /** @format WEB_URL */\n imageUrl?: string | null;\n}\n\nexport interface GenerateVideoResponse {\n status?: GenerateMediaStatusWithLiterals;\n /** @maxLength 1000 */\n executionId?: string | null;\n}\n\n/** Request for GeneratePostData. Provide at least one of `siteAssets` or `userInput`. */\nexport interface GeneratePostDataRequest {\n /**\n * Site assets the generated post is based on.\n * @maxSize 10\n */\n siteAssets?: SiteAsset[];\n /**\n * Free-form guidance for the generated post content.\n * @maxLength 5000\n */\n userInput?: string | null;\n /**\n * Candidate media for the generated post. Accepts images only. Each item carries a `type` (must be image), a `url`, and an optional Wix Media Manager `fileId` for media already in Wix.\n * @maxSize 10\n */\n media?: Media[];\n /** Additional context to incorporate into the generated content. */\n context?: Record<string, any> | null;\n /**\n * Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.\n * @maxSize 10\n */\n channels?: ChannelNameWithLiterals[];\n}\n\n/** A site asset, such as a product or a blog post, that post content can be generated from. */\nexport interface SiteAsset {\n /**\n * ID of the asset in the Wix app that owns it. For example, a product ID for a `STORES_PRODUCT` asset.\n * @maxLength 256\n */\n _id?: string | null;\n /** Type of asset. */\n type?: TypeWithLiterals;\n}\n\n/** Type of site asset. */\nexport enum Type {\n /** A Wix Blog post. */\n BLOG_POST = 'BLOG_POST',\n /** A Wix Events event. */\n EVENT = 'EVENT',\n /** A Wix Stores product. */\n STORES_PRODUCT = 'STORES_PRODUCT',\n /** A Wix Bookings service. */\n BOOKINGS_SERVICE = 'BOOKINGS_SERVICE',\n /** A Wix Stores coupon. */\n STORES_COUPON = 'STORES_COUPON',\n /** A Wix Stores category. */\n STORES_CATEGORY = 'STORES_CATEGORY',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'BLOG_POST'\n | 'EVENT'\n | 'STORES_PRODUCT'\n | 'BOOKINGS_SERVICE'\n | 'STORES_COUPON'\n | 'STORES_CATEGORY';\n\nexport interface Media {\n /** Media type. */\n type?: MediaTypeWithLiterals;\n /**\n * Media URL.\n * @format WEB_URL\n */\n url?: string | null;\n /**\n * Media Manager file ID backing the media. Available only when the media is stored in the Media Manager.\n * @maxLength 1000\n */\n fileId?: string | null;\n}\n\nexport enum MediaType {\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n}\n\n/** @enumType */\nexport type MediaTypeWithLiterals = MediaType | 'IMAGE' | 'VIDEO';\n\nexport interface GeneratePostDataResponse {\n /** Generated post content, one entry per requested channel. */\n results?: ChannelPostData[];\n}\n\n/** Channel-specific post content. Use it to create a draft or publish an item. */\nexport interface ChannelPostData extends ChannelPostDataDataOneOf {\n instagramPost?: InstagramPost;\n facebookPost?: FacebookPost;\n linkedinPost?: LinkedinPost;\n /**\n * Deprecated: No longer functional as of July 1, 2026.\n * @deprecated Deprecated: No longer functional as of July 1, 2026.\n * @targetRemovalDate 2026-07-01\n */\n twitterPost?: TwitterPost;\n pinterestPost?: PinterestPost;\n gbpPost?: GbpPost;\n tiktokPhoto?: TikTokPhoto;\n /** Channel the content is generated for. */\n channelName?: ChannelNameWithLiterals;\n}\n\n/** @oneof */\nexport interface ChannelPostDataDataOneOf {\n instagramPost?: InstagramPost;\n facebookPost?: FacebookPost;\n linkedinPost?: LinkedinPost;\n /**\n * Deprecated: No longer functional as of July 1, 2026.\n * @deprecated Deprecated: No longer functional as of July 1, 2026.\n * @targetRemovalDate 2026-07-01\n */\n twitterPost?: TwitterPost;\n pinterestPost?: PinterestPost;\n gbpPost?: GbpPost;\n tiktokPhoto?: TikTokPhoto;\n}\n\nexport interface InstagramPost extends InstagramPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /**\n * Caption for the post. Can include hashtags (for example, `#crazywildebeest`) and mentions of Instagram users (for example, `@natgeo`). Mentioned users are notified when the post is published. Supports up to 30 hashtags and 20 mentions.\n * @maxLength 2200\n */\n caption?: string | null;\n /**\n * The post URL on Instagram.\n * @readonly\n */\n postUrl?: string | null;\n /** Insights from Instagram. */\n insights?: InstagramInsights;\n}\n\n/** @oneof */\nexport interface InstagramPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface MediaWrapper {\n /** List of media items. */\n media?: Media[];\n}\n\nexport interface InstagramInsights {\n /** Number of likes. */\n likes?: number;\n /** Number of engagements. */\n engagement?: number;\n /** Number of impressions. */\n impressions?: number;\n /** Number of plays. */\n plays?: number;\n /** Number of accounts reached. */\n reach?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of shares. */\n shares?: number;\n /** Number of saves. */\n saved?: number;\n /** Total number of interactions. */\n totalInteractions?: number;\n}\n\nexport interface FacebookPost extends FacebookPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** The page ID to publish the post to. */\n pageId?: string | null;\n /** Caption for the post. */\n caption?: string | null;\n /**\n * The post URL on Facebook.\n * @readonly\n */\n postUrl?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from Facebook. */\n insights?: FacebookInsights;\n}\n\n/** @oneof */\nexport interface FacebookPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface LinkMetadata {\n /** Thumbnail URL for the link preview. */\n thumbnailUrl?: string | null;\n /** Title for the link preview. */\n title?: string | null;\n /** Description for the link preview. */\n description?: string | null;\n}\n\nexport interface FacebookInsights {\n /** Impression counts. */\n impressions?: FacebookImpressions;\n /** Interaction counts. */\n interactions?: FacebookInteractions;\n /** Reaction counts. */\n reactions?: FacebookReactions;\n /** Activity counts. */\n activity?: FacebokActivity;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface FacebookImpressions {\n /** Number of unique impressions. */\n unique?: number;\n /** Total number of impressions. */\n total?: number;\n}\n\nexport interface FacebookInteractions {\n /** Number of unique interactions. */\n unique?: number;\n /** Total number of interactions. */\n total?: number;\n}\n\nexport interface FacebookReactions {\n /** Number of \"like\" reactions. */\n like?: number;\n /** Number of \"love\" reactions. */\n love?: number;\n /** Number of \"wow\" reactions. */\n wow?: number;\n /** Number of \"haha\" reactions. */\n haha?: number;\n /** Number of \"sad\" reactions. */\n sad?: number;\n /** Number of \"angry\" reactions. */\n anger?: number;\n}\n\nexport interface FacebokActivity {\n /** Number of shares. */\n share?: number;\n /** Number of likes. */\n like?: number;\n /** Number of comments. */\n comment?: number;\n}\n\nexport interface LinkedinPost extends LinkedinPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Author ID of the post. Can be an organization page or a personal feed. */\n authorId?: string | null;\n /** Caption for the post. */\n caption?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from LinkedIn. */\n insights?: LinkedinPostInsights;\n}\n\n/** @oneof */\nexport interface LinkedinPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\nexport interface LinkedinPostInsights {\n /** Number of unique impressions. */\n uniqueImpressions?: number;\n /** Total number of impressions. */\n impression?: number;\n /** Number of shares. */\n shares?: number;\n /** Engagement rate. */\n engagement?: number;\n /** Number of clicks. */\n clicks?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of comments. */\n comments?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\n/** Deprecated: No longer functional as of July 1, 2026. */\nexport interface TwitterPost extends TwitterPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Caption for the post. */\n caption?: string | null;\n /** Link preview metadata. Available only when the post contains a link. */\n linkMetadata?: LinkMetadata;\n /** Insights from X (Twitter). */\n insights?: TwitterInsights;\n}\n\n/** @oneof */\nexport interface TwitterPostUrlOneOf {\n /** The image URL. */\n imageUrl?: string | null;\n /** The video URL. */\n videoUrl?: string | null;\n /** The link URL. */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n}\n\n/** Deprecated: No longer functional as of July 1, 2026. */\nexport interface TwitterInsights {\n /** Number of retweets. */\n retweets?: number;\n /** Number of replies. */\n replies?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of quote posts. */\n quotes?: number;\n /** Number of bookmarks. */\n bookmarks?: number;\n /** Number of impressions. */\n impressions?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface PinterestPost {\n /**\n * The board ID to publish the post to.\n * @maxLength 128\n */\n boardId?: string | null;\n /**\n * The title of the post.\n * @maxLength 100\n */\n title?: string | null;\n /**\n * The description of the post.\n * @maxLength 800\n */\n description?: string | null;\n /**\n * The link to include in the post.\n * @maxLength 2048\n */\n link?: string | null;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from Pinterest. */\n insights?: PinterestInsights;\n}\n\nexport interface PinterestInsights {\n /** Number of impressions. */\n impressions?: number;\n /** Number of clicks. */\n clicks?: number;\n /** Number of saves. */\n saves?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of reactions. */\n reactions?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface GbpPost {\n /**\n * The location ID to publish the post to.\n * @maxLength 128\n */\n locationId?: string | null;\n /**\n * Account (group) ID of the location.\n * @maxLength 128\n */\n locationAccountId?: string | null;\n /**\n * The description of the post.\n * @maxLength 1500\n */\n description?: string | null;\n /** Call to action type and URL to include in the post. */\n callToAction?: GbpPostCallToAction;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from Google Business Profile. */\n insights?: GbpInsights;\n}\n\nexport interface GbpPostCallToAction {\n /** Type of the call to action. */\n actionType?: GbpPostCallToActionTypeWithLiterals;\n /**\n * URL of the call to action.\n * @maxLength 2048\n */\n url?: string | null;\n}\n\n/** Type of call to action button shown on the post. */\nexport enum GbpPostCallToActionType {\n BOOK = 'BOOK',\n ORDER = 'ORDER',\n SHOP = 'SHOP',\n LEARN_MORE = 'LEARN_MORE',\n SIGN_UP = 'SIGN_UP',\n}\n\n/** @enumType */\nexport type GbpPostCallToActionTypeWithLiterals =\n | GbpPostCallToActionType\n | 'BOOK'\n | 'ORDER'\n | 'SHOP'\n | 'LEARN_MORE'\n | 'SIGN_UP';\n\nexport interface GbpInsights {\n /** Number of shares. Google Business Profile post insights aren't currently available, so this returns `-1`. */\n shares?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\nexport interface TikTokPhoto {\n /**\n * The account ID to publish the photo to.\n * @maxLength 128\n */\n accountId?: string | null;\n /** Privacy level for the photo. */\n privacyLevel?: TikTokPrivacyLevelWithLiterals;\n /**\n * A title for the photo.\n * @maxLength 90\n */\n title?: string | null;\n /**\n * A description for the photo.\n * @maxLength 4000\n */\n description?: string | null;\n /** Whether comments are disabled for the photo. */\n disableComment?: boolean;\n /** Whether to automatically add music to the photo. */\n autoAddMusic?: boolean;\n /** Whether the content is a paid partnership promoting a third-party business. */\n brandContentToggle?: boolean;\n /** Whether the content promotes the creator's own business. */\n brandOrganicToggle?: boolean;\n /** The media list. */\n mediaWrapper?: MediaWrapper;\n /** Insights from TikTok. */\n insights?: TikTokInsights;\n}\n\nexport enum TikTokPrivacyLevel {\n PUBLIC_TO_EVERYONE = 'PUBLIC_TO_EVERYONE',\n FOLLOWER_OF_CREATOR = 'FOLLOWER_OF_CREATOR',\n MUTUAL_FOLLOW_FRIENDS = 'MUTUAL_FOLLOW_FRIENDS',\n SELF_ONLY = 'SELF_ONLY',\n}\n\n/** @enumType */\nexport type TikTokPrivacyLevelWithLiterals =\n | TikTokPrivacyLevel\n | 'PUBLIC_TO_EVERYONE'\n | 'FOLLOWER_OF_CREATOR'\n | 'MUTUAL_FOLLOW_FRIENDS'\n | 'SELF_ONLY';\n\nexport interface TikTokInsights {\n /** Number of views. */\n views?: number;\n /** Number of likes. */\n likes?: number;\n /** Number of comments. */\n comments?: number;\n /** Number of shares. */\n shares?: number;\n /** Date and time the insights were last updated. */\n _updatedDate?: Date | null;\n}\n\n/**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n * @param userInput - Text prompt describing the post to generate captions for.\n * @public\n * @documentationMaturity preview\n * @requiredField userInput\n * @permissionId PROMOTE.PUBLISHER_ITEM_CREATE\n * @applicableIdentity APP\n * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateText\n */\nexport async function generateText(\n userInput: string,\n options?: GenerateTextOptions\n): Promise<NonNullablePaths<GenerateTextResponse, `results`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n userInput: userInput,\n channelName: options?.channelName,\n tone: options?.tone,\n languageCode: options?.languageCode,\n additionalContent: options?.additionalContent,\n });\n\n const reqOpts =\n ambassadorWixPromotePublisherV1GeneratedContent.generateText(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n userInput: '$[0]',\n channelName: '$[1].channelName',\n tone: '$[1].tone',\n languageCode: '$[1].languageCode',\n additionalContent: '$[1].additionalContent',\n },\n singleArgumentUnchanged: false,\n },\n ['userInput', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateTextOptions {\n /** Social channel to tailor the captions for. */\n channelName?: ChannelNameWithLiterals;\n /**\n * Tone of voice for the captions. For example, `professional` or `playful`.\n * @maxLength 30\n */\n tone?: string | null;\n /**\n * 2-letter language code for the generated captions in ISO 639-1 alpha-2 format.\n * @maxLength 2\n */\n languageCode?: string | null;\n /** Additional content to incorporate into the captions. */\n additionalContent?: AdditionalContent;\n}\n\n/**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n * @public\n * @documentationMaturity preview\n * @permissionId promote:publisher:v1:generated_content:generate_post_data\n * @applicableIdentity APP\n * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GeneratePostData\n */\nexport async function generatePostData(\n options?: GeneratePostDataOptions\n): Promise<\n NonNullablePaths<\n GeneratePostDataResponse,\n | `results`\n | `results.${number}.instagramPost.insights.likes`\n | `results.${number}.instagramPost.insights.engagement`\n | `results.${number}.instagramPost.insights.impressions`\n | `results.${number}.instagramPost.insights.plays`\n | `results.${number}.instagramPost.insights.reach`\n | `results.${number}.instagramPost.insights.comments`\n | `results.${number}.instagramPost.insights.shares`\n | `results.${number}.instagramPost.insights.saved`\n | `results.${number}.instagramPost.insights.totalInteractions`\n | `results.${number}.linkedinPost.insights.uniqueImpressions`\n | `results.${number}.linkedinPost.insights.impression`\n | `results.${number}.linkedinPost.insights.shares`\n | `results.${number}.linkedinPost.insights.engagement`\n | `results.${number}.linkedinPost.insights.clicks`\n | `results.${number}.linkedinPost.insights.likes`\n | `results.${number}.linkedinPost.insights.comments`\n | `results.${number}.twitterPost.insights.retweets`\n | `results.${number}.twitterPost.insights.replies`\n | `results.${number}.twitterPost.insights.likes`\n | `results.${number}.twitterPost.insights.quotes`\n | `results.${number}.twitterPost.insights.bookmarks`\n | `results.${number}.twitterPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.impressions`\n | `results.${number}.pinterestPost.insights.clicks`\n | `results.${number}.pinterestPost.insights.saves`\n | `results.${number}.pinterestPost.insights.comments`\n | `results.${number}.pinterestPost.insights.reactions`\n | `results.${number}.gbpPost.callToAction.actionType`\n | `results.${number}.gbpPost.insights.shares`\n | `results.${number}.tiktokPhoto.privacyLevel`\n | `results.${number}.tiktokPhoto.disableComment`\n | `results.${number}.tiktokPhoto.autoAddMusic`\n | `results.${number}.tiktokPhoto.brandContentToggle`\n | `results.${number}.tiktokPhoto.brandOrganicToggle`\n | `results.${number}.tiktokPhoto.insights.views`\n | `results.${number}.tiktokPhoto.insights.likes`\n | `results.${number}.tiktokPhoto.insights.comments`\n | `results.${number}.tiktokPhoto.insights.shares`\n | `results.${number}.channelName`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n siteAssets: options?.siteAssets,\n userInput: options?.userInput,\n media: options?.media,\n context: options?.context,\n channels: options?.channels,\n });\n\n const reqOpts =\n ambassadorWixPromotePublisherV1GeneratedContent.generatePostData(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n siteAssets: '$[0].siteAssets',\n userInput: '$[0].userInput',\n media: '$[0].media',\n context: '$[0].context',\n channels: '$[0].channels',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GeneratePostDataOptions {\n /**\n * Site assets the generated post is based on.\n * @maxSize 10\n */\n siteAssets?: SiteAsset[];\n /**\n * Free-form guidance for the generated post content.\n * @maxLength 5000\n */\n userInput?: string | null;\n /**\n * Candidate media for the generated post. Accepts images only. Each item carries a `type` (must be image), a `url`, and an optional Wix Media Manager `fileId` for media already in Wix.\n * @maxSize 10\n */\n media?: Media[];\n /** Additional context to incorporate into the generated content. */\n context?: Record<string, any> | null;\n /**\n * Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.\n * @maxSize 10\n */\n channels?: ChannelNameWithLiterals[];\n}\n","import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n {\n srcPath: '/_mcp/social-publisher',\n destPath: '/mcp',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_serverless/publisher',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/social-publisher',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/social-publisher',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/social-publisher',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/social-publisher',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME =\n '@wix/auto_sdk_promote-growth-tools-publisher_generated-content';\n\n/**\n * Generates post captions from a text prompt.\n *\n * Returns suggested captions that you can add to an item's content.\n */\nexport function generateText(payload: object): RequestOptionsFactory<any> {\n function __generateText({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.publisher.v1.generated_content',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateText',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({\n protoPath: '/v1/generate-text',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateText;\n}\n\n/**\n * Generates post content for one or more social channels.\n *\n * Returns per-channel post payloads matching an item's content, so you can use the result to create a draft or publish. Provide site assets, a text prompt, or both.\n */\nexport function generatePostData(payload: object): RequestOptionsFactory<any> {\n function __generatePostData({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.publisher.v1.generated_content',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.promote.publisher.v1.GeneratedContentService.GeneratePostData',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({\n protoPath: '/v1/generate-post-data',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.facebookPost.insights.updatedDate' },\n { path: 'results.linkedinPost.insights.updatedDate' },\n { path: 'results.twitterPost.insights.updatedDate' },\n { path: 'results.pinterestPost.insights.updatedDate' },\n { path: 'results.gbpPost.insights.updatedDate' },\n { path: 'results.tiktokPhoto.insights.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'results.linkedinPost.insights.engagement' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generatePostData;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAAA;AAAA,EAAA,oBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;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AU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["generatePostData","generateText","payload","ChannelName","GenerateMediaStatus","Type","MediaType","GbpPostCallToActionType","TikTokPrivacyLevel","generateText","sdkTransformError","generatePostData"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ declare enum ChannelName {
|
|
|
37
37
|
FACEBOOK = "FACEBOOK",
|
|
38
38
|
YOUTUBE = "YOUTUBE",
|
|
39
39
|
LINKEDIN = "LINKEDIN",
|
|
40
|
+
/** Deprecated: No longer functional as of July 1, 2026. */
|
|
40
41
|
TWITTER = "TWITTER",
|
|
41
42
|
PINTEREST = "PINTEREST",
|
|
42
43
|
/** Google Business Profile. */
|
|
@@ -132,7 +133,7 @@ interface GeneratePostDataRequest {
|
|
|
132
133
|
/** Additional context to incorporate into the generated content. */
|
|
133
134
|
context?: Record<string, any> | null;
|
|
134
135
|
/**
|
|
135
|
-
* Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn,
|
|
136
|
+
* Channels to generate post content for. When empty, the response includes one entry for each supported channel: Instagram, Facebook, LinkedIn, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.
|
|
136
137
|
* @maxSize 10
|
|
137
138
|
*/
|
|
138
139
|
channels?: ChannelNameWithLiterals[];
|
|
@@ -193,6 +194,11 @@ interface ChannelPostData extends ChannelPostDataDataOneOf {
|
|
|
193
194
|
instagramPost?: InstagramPost;
|
|
194
195
|
facebookPost?: FacebookPost;
|
|
195
196
|
linkedinPost?: LinkedinPost;
|
|
197
|
+
/**
|
|
198
|
+
* Deprecated: No longer functional as of July 1, 2026.
|
|
199
|
+
* @deprecated Deprecated: No longer functional as of July 1, 2026.
|
|
200
|
+
* @targetRemovalDate 2026-07-01
|
|
201
|
+
*/
|
|
196
202
|
twitterPost?: TwitterPost;
|
|
197
203
|
pinterestPost?: PinterestPost;
|
|
198
204
|
gbpPost?: GbpPost;
|
|
@@ -205,6 +211,11 @@ interface ChannelPostDataDataOneOf {
|
|
|
205
211
|
instagramPost?: InstagramPost;
|
|
206
212
|
facebookPost?: FacebookPost;
|
|
207
213
|
linkedinPost?: LinkedinPost;
|
|
214
|
+
/**
|
|
215
|
+
* Deprecated: No longer functional as of July 1, 2026.
|
|
216
|
+
* @deprecated Deprecated: No longer functional as of July 1, 2026.
|
|
217
|
+
* @targetRemovalDate 2026-07-01
|
|
218
|
+
*/
|
|
208
219
|
twitterPost?: TwitterPost;
|
|
209
220
|
pinterestPost?: PinterestPost;
|
|
210
221
|
gbpPost?: GbpPost;
|
|
@@ -398,6 +409,7 @@ interface LinkedinPostInsights {
|
|
|
398
409
|
/** Date and time the insights were last updated. */
|
|
399
410
|
updatedDate?: Date | null;
|
|
400
411
|
}
|
|
412
|
+
/** Deprecated: No longer functional as of July 1, 2026. */
|
|
401
413
|
interface TwitterPost extends TwitterPostUrlOneOf {
|
|
402
414
|
/** The image URL. */
|
|
403
415
|
imageUrl?: string | null;
|
|
@@ -425,6 +437,7 @@ interface TwitterPostUrlOneOf {
|
|
|
425
437
|
/** The media list. */
|
|
426
438
|
mediaWrapper?: MediaWrapper;
|
|
427
439
|
}
|
|
440
|
+
/** Deprecated: No longer functional as of July 1, 2026. */
|
|
428
441
|
interface TwitterInsights {
|
|
429
442
|
/** Number of retweets. */
|
|
430
443
|
retweets?: number;
|