@wix/auto_sdk_promote-growth-tools-publisher_generated-content 1.0.0 → 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.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +3 -14
  2. package/build/cjs/index.js +0 -61
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +18 -27
  5. package/build/cjs/index.typings.js +0 -52
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +18 -6
  8. package/build/cjs/meta.js +0 -41
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +1 -14
  11. package/build/cjs/schemas.js +4 -16
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +3 -14
  14. package/build/es/index.mjs +0 -60
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +18 -27
  17. package/build/es/index.typings.mjs +0 -51
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +18 -6
  20. package/build/es/meta.mjs +0 -40
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +1 -14
  23. package/build/es/schemas.mjs +4 -14
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +3 -14
  26. package/build/internal/cjs/index.js +0 -61
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +18 -27
  29. package/build/internal/cjs/index.typings.js +0 -52
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +18 -6
  32. package/build/internal/cjs/meta.js +0 -41
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +1 -14
  35. package/build/internal/cjs/schemas.js +4 -16
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +3 -14
  38. package/build/internal/es/index.mjs +0 -60
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +18 -27
  41. package/build/internal/es/index.typings.mjs +0 -51
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +18 -6
  44. package/build/internal/es/meta.mjs +0 -40
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +1 -14
  47. package/build/internal/es/schemas.mjs +4 -14
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { GenerateTextOptions, GenerateTextResponse, GenerateImageOptions, GenerateImageResponse, GeneratePostDataOptions, GeneratePostDataResponse } from './index.typings.js';
3
- export { AdditionalContent, ChannelName, ChannelNameWithLiterals, ChannelPostData, ChannelPostDataDataOneOf, FacebokActivity, FacebookImpressions, FacebookInsights, FacebookInteractions, FacebookPost, FacebookPostUrlOneOf, FacebookReactions, GbpInsights, GbpPost, GbpPostCallToAction, GbpPostCallToActionType, GbpPostCallToActionTypeWithLiterals, GenerateImageRequest, GenerateMediaStatus, GenerateMediaStatusWithLiterals, GeneratePostDataRequest, GenerateTextRequest, GenerateTextResult, GenerateVideoRequest, GenerateVideoResponse, GeneratedContent, InstagramInsights, InstagramPost, InstagramPostUrlOneOf, LinkMetadata, LinkedinPost, LinkedinPostInsights, LinkedinPostUrlOneOf, Media, MediaType, MediaTypeWithLiterals, MediaWrapper, PinterestInsights, PinterestPost, SiteAsset, TikTokInsights, TikTokPhoto, TikTokPrivacyLevel, TikTokPrivacyLevelWithLiterals, TwitterInsights, TwitterPost, TwitterPostUrlOneOf, Type, TypeWithLiterals } from './index.typings.js';
2
+ import { GenerateTextOptions, GenerateTextResponse, GeneratePostDataOptions, GeneratePostDataResponse } from './index.typings.js';
3
+ export { AdditionalContent, ChannelName, ChannelNameWithLiterals, ChannelPostData, ChannelPostDataDataOneOf, FacebokActivity, FacebookImpressions, FacebookInsights, FacebookInteractions, FacebookPost, FacebookPostUrlOneOf, FacebookReactions, GbpInsights, GbpPost, GbpPostCallToAction, GbpPostCallToActionType, GbpPostCallToActionTypeWithLiterals, GenerateImageRequest, GenerateImageResponse, GenerateMediaStatus, GenerateMediaStatusWithLiterals, GeneratePostDataRequest, GenerateTextRequest, GenerateTextResult, GenerateVideoRequest, GenerateVideoResponse, GeneratedContent, InstagramInsights, InstagramPost, InstagramPostUrlOneOf, LinkMetadata, LinkedinPost, LinkedinPostInsights, LinkedinPostUrlOneOf, Media, MediaType, MediaTypeWithLiterals, MediaWrapper, PinterestInsights, PinterestPost, SiteAsset, TikTokInsights, TikTokPhoto, TikTokPrivacyLevel, TikTokPrivacyLevelWithLiterals, TwitterInsights, TwitterPost, TwitterPostUrlOneOf, Type, TypeWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function generateText$1(httpClient: HttpClient): GenerateTextSignature;
6
6
  interface GenerateTextSignature {
@@ -12,16 +12,6 @@ interface GenerateTextSignature {
12
12
  */
13
13
  (userInput: string, options?: GenerateTextOptions): Promise<NonNullablePaths<GenerateTextResponse, `results`, 2>>;
14
14
  }
15
- declare function generateImage$1(httpClient: HttpClient): GenerateImageSignature;
16
- interface GenerateImageSignature {
17
- /**
18
- * Generates an image from a text prompt and a source image.
19
- *
20
- * Image generation runs asynchronously. This method starts the process and returns an `executionId`. When generation completes, the generated image is added to the "Social Marketing AI Media" folder in the site's Media Manager.
21
- * @param - Text prompt describing the image to generate.
22
- */
23
- (userInput: string, options: NonNullablePaths<GenerateImageOptions, `imageUrl`, 2>): Promise<NonNullablePaths<GenerateImageResponse, `status`, 2>>;
24
- }
25
15
  declare function generatePostData$1(httpClient: HttpClient): GeneratePostDataSignature;
26
16
  interface GeneratePostDataSignature {
27
17
  /**
@@ -33,7 +23,6 @@ interface GeneratePostDataSignature {
33
23
  }
34
24
 
35
25
  declare const generateText: MaybeContext<BuildRESTFunction<typeof generateText$1> & typeof generateText$1>;
36
- declare const generateImage: MaybeContext<BuildRESTFunction<typeof generateImage$1> & typeof generateImage$1>;
37
26
  declare const generatePostData: MaybeContext<BuildRESTFunction<typeof generatePostData$1> & typeof generatePostData$1>;
38
27
 
39
- export { GenerateImageOptions, GenerateImageResponse, GeneratePostDataOptions, GeneratePostDataResponse, GenerateTextOptions, GenerateTextResponse, generateImage, generatePostData, generateText };
28
+ export { GeneratePostDataOptions, GeneratePostDataResponse, GenerateTextOptions, GenerateTextResponse, generatePostData, generateText };
@@ -26,7 +26,6 @@ __export(index_exports, {
26
26
  MediaType: () => MediaType,
27
27
  TikTokPrivacyLevel: () => TikTokPrivacyLevel,
28
28
  Type: () => Type,
29
- generateImage: () => generateImage4,
30
29
  generatePostData: () => generatePostData4,
31
30
  generateText: () => generateText4
32
31
  });
@@ -152,27 +151,6 @@ function generateText(payload) {
152
151
  }
153
152
  return __generateText;
154
153
  }
155
- function generateImage(payload) {
156
- function __generateImage({ host }) {
157
- const metadata = {
158
- entityFqdn: "wix.promote.publisher.v1.generated_content",
159
- method: "POST",
160
- methodFqn: "com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateImage",
161
- packageName: PACKAGE_NAME,
162
- migrationOptions: {
163
- optInTransformResponse: true
164
- },
165
- url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({
166
- protoPath: "/v1/generate-image",
167
- data: payload,
168
- host
169
- }),
170
- data: payload
171
- };
172
- return metadata;
173
- }
174
- return __generateImage;
175
- }
176
154
  function generatePostData(payload) {
177
155
  function __generatePostData({ host }) {
178
156
  const metadata = {
@@ -293,35 +271,6 @@ async function generateText2(userInput, options) {
293
271
  throw transformedError;
294
272
  }
295
273
  }
296
- async function generateImage2(userInput, options) {
297
- const { httpClient, sideEffects } = arguments[2];
298
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
299
- userInput,
300
- imageUrl: options?.imageUrl
301
- });
302
- const reqOpts = generateImage(payload);
303
- sideEffects?.onSiteCall?.();
304
- try {
305
- const result = await httpClient.request(reqOpts);
306
- sideEffects?.onSuccess?.(result);
307
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
308
- } catch (err) {
309
- const transformedError = (0, import_transform_error.transformError)(
310
- err,
311
- {
312
- spreadPathsToArguments: {},
313
- explicitPathsToArguments: {
314
- userInput: "$[0]",
315
- imageUrl: "$[1].imageUrl"
316
- },
317
- singleArgumentUnchanged: false
318
- },
319
- ["userInput", "options"]
320
- );
321
- sideEffects?.onError?.(err);
322
- throw transformedError;
323
- }
324
- }
325
274
  async function generatePostData2(options) {
326
275
  const { httpClient, sideEffects } = arguments[1];
327
276
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -367,14 +316,6 @@ function generateText3(httpClient) {
367
316
  { httpClient }
368
317
  );
369
318
  }
370
- function generateImage3(httpClient) {
371
- return (userInput, options) => generateImage2(
372
- userInput,
373
- options,
374
- // @ts-ignore
375
- { httpClient }
376
- );
377
- }
378
319
  function generatePostData3(httpClient) {
379
320
  return (options) => generatePostData2(
380
321
  options,
@@ -386,7 +327,6 @@ function generatePostData3(httpClient) {
386
327
  // src/promote-publisher-v1-generated-content-generated-content.context.ts
387
328
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
388
329
  var generateText4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(generateText3);
389
- var generateImage4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(generateImage3);
390
330
  var generatePostData4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(generatePostData3);
391
331
  // Annotate the CommonJS export names for ESM import in node:
392
332
  0 && (module.exports = {
@@ -396,7 +336,6 @@ var generatePostData4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModul
396
336
  MediaType,
397
337
  TikTokPrivacyLevel,
398
338
  Type,
399
- generateImage,
400
339
  generatePostData,
401
340
  generateText
402
341
  });
@@ -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 an image from a text prompt and a source image.\n *\n * Image generation runs asynchronously. This method starts the process and returns an `executionId`. When generation completes, the generated image is added to the \"Social Marketing AI Media\" folder in the site's Media Manager.\n * @param userInput - Text prompt describing the image to generate.\n * @public\n * @documentationMaturity preview\n * @requiredField options\n * @requiredField options.imageUrl\n * @requiredField userInput\n * @permissionId promote:publisher:v1:generated_content:generate_image\n * @applicableIdentity APP\n * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateImage\n */\nexport async function generateImage(\n userInput: string,\n options: NonNullablePaths<GenerateImageOptions, `imageUrl`, 2>\n): Promise<NonNullablePaths<GenerateImageResponse, `status`, 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 imageUrl: options?.imageUrl,\n });\n\n const reqOpts =\n ambassadorWixPromotePublisherV1GeneratedContent.generateImage(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 imageUrl: '$[1].imageUrl',\n },\n singleArgumentUnchanged: false,\n },\n ['userInput', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateImageOptions {\n /**\n * URL of the source image to generate from.\n * @format WEB_URL\n */\n imageUrl: string | null;\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 an image from a text prompt and a source image.\n *\n * Image generation runs asynchronously. This method starts the process and returns an `executionId`. When generation completes, the generated image is added to the \"Social Marketing AI Media\" folder in the site's Media Manager.\n */\nexport function generateImage(payload: object): RequestOptionsFactory<any> {\n function __generateImage({ 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.GenerateImage',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({\n protoPath: '/v1/generate-image',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __generateImage;\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 GenerateImageOptions,\n GenerateImageResponse,\n GeneratePostDataOptions,\n GeneratePostDataResponse,\n GenerateTextOptions,\n GenerateTextResponse,\n generateImage as universalGenerateImage,\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 generateImage(httpClient: HttpClient): GenerateImageSignature {\n return (\n userInput: string,\n options: NonNullablePaths<GenerateImageOptions, `imageUrl`, 2>\n ) =>\n universalGenerateImage(\n userInput,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateImageSignature {\n /**\n * Generates an image from a text prompt and a source image.\n *\n * Image generation runs asynchronously. This method starts the process and returns an `executionId`. When generation completes, the generated image is added to the \"Social Marketing AI Media\" folder in the site's Media Manager.\n * @param - Text prompt describing the image to generate.\n */\n (\n userInput: string,\n options: NonNullablePaths<GenerateImageOptions, `imageUrl`, 2>\n ): Promise<NonNullablePaths<GenerateImageResponse, `status`, 2>>;\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 GenerateImageOptions,\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 generateImage as publicGenerateImage,\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 generateImage: MaybeContext<\n BuildRESTFunction<typeof publicGenerateImage> & typeof publicGenerateImage\n> = /*#__PURE__*/ createRESTModule(publicGenerateImage);\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 GenerateImageOptions,\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,uBAAAA;AAAA,EAAA,wBAAAC;AAAA,EAAA,oBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,+DACP,MACA;AACA,Q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AAcO,SAASC,eAAc,YAAgD;AAC5E,SAAO,CACL,WACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAeO,SAASC,kBACd,YAC2B;AAC3B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACrEA,IAAAC,uBAAiC;AAG1B,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,iBAEK,2DAAiBA,cAAmB;AAC/C,IAAMC,oBAGK,2DAAiBA,iBAAsB;","names":["generateImage","generatePostData","generateText","payload","ChannelName","GenerateMediaStatus","Type","MediaType","GbpPostCallToActionType","TikTokPrivacyLevel","generateText","sdkTransformError","generateImage","generatePostData","generateText","generateImage","generatePostData","import_rest_modules","generateText","generateImage","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;;;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,QAC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BAAa,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. */
@@ -76,12 +77,12 @@ interface GenerateImageRequest {
76
77
  * Text prompt describing the image to generate.
77
78
  * @maxLength 3000
78
79
  */
79
- userInput: string | null;
80
+ userInput?: string | null;
80
81
  /**
81
82
  * URL of the source image to generate from.
82
83
  * @format WEB_URL
83
84
  */
84
- imageUrl: string | null;
85
+ imageUrl?: string | null;
85
86
  }
86
87
  interface GenerateImageResponse {
87
88
  /** Status of the generation request. */
@@ -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, Twitter, Pinterest, Google Business Profile, and TikTok. A non-empty value narrows the response to the requested channels.
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;
@@ -608,28 +621,6 @@ interface GenerateTextOptions {
608
621
  /** Additional content to incorporate into the captions. */
609
622
  additionalContent?: AdditionalContent;
610
623
  }
611
- /**
612
- * Generates an image from a text prompt and a source image.
613
- *
614
- * Image generation runs asynchronously. This method starts the process and returns an `executionId`. When generation completes, the generated image is added to the "Social Marketing AI Media" folder in the site's Media Manager.
615
- * @param userInput - Text prompt describing the image to generate.
616
- * @public
617
- * @documentationMaturity preview
618
- * @requiredField options
619
- * @requiredField options.imageUrl
620
- * @requiredField userInput
621
- * @permissionId promote:publisher:v1:generated_content:generate_image
622
- * @applicableIdentity APP
623
- * @fqn com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateImage
624
- */
625
- declare function generateImage(userInput: string, options: NonNullablePaths<GenerateImageOptions, `imageUrl`, 2>): Promise<NonNullablePaths<GenerateImageResponse, `status`, 2>>;
626
- interface GenerateImageOptions {
627
- /**
628
- * URL of the source image to generate from.
629
- * @format WEB_URL
630
- */
631
- imageUrl: string | null;
632
- }
633
624
  /**
634
625
  * Generates post content for one or more social channels.
635
626
  *
@@ -660,10 +651,10 @@ interface GeneratePostDataOptions {
660
651
  /** Additional context to incorporate into the generated content. */
661
652
  context?: Record<string, any> | null;
662
653
  /**
663
- * 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.
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.
664
655
  * @maxSize 10
665
656
  */
666
657
  channels?: ChannelNameWithLiterals[];
667
658
  }
668
659
 
669
- export { type AdditionalContent, ChannelName, type ChannelNameWithLiterals, type ChannelPostData, type ChannelPostDataDataOneOf, type FacebokActivity, type FacebookImpressions, type FacebookInsights, type FacebookInteractions, type FacebookPost, type FacebookPostUrlOneOf, type FacebookReactions, type GbpInsights, type GbpPost, type GbpPostCallToAction, GbpPostCallToActionType, type GbpPostCallToActionTypeWithLiterals, type GenerateImageOptions, type GenerateImageRequest, type GenerateImageResponse, GenerateMediaStatus, type GenerateMediaStatusWithLiterals, type GeneratePostDataOptions, type GeneratePostDataRequest, type GeneratePostDataResponse, type GenerateTextOptions, type GenerateTextRequest, type GenerateTextResponse, type GenerateTextResult, type GenerateVideoRequest, type GenerateVideoResponse, type GeneratedContent, type InstagramInsights, type InstagramPost, type InstagramPostUrlOneOf, type LinkMetadata, type LinkedinPost, type LinkedinPostInsights, type LinkedinPostUrlOneOf, type Media, MediaType, type MediaTypeWithLiterals, type MediaWrapper, type PinterestInsights, type PinterestPost, type SiteAsset, type TikTokInsights, type TikTokPhoto, TikTokPrivacyLevel, type TikTokPrivacyLevelWithLiterals, type TwitterInsights, type TwitterPost, type TwitterPostUrlOneOf, Type, type TypeWithLiterals, generateImage, generatePostData, generateText };
660
+ export { type AdditionalContent, ChannelName, type ChannelNameWithLiterals, type ChannelPostData, type ChannelPostDataDataOneOf, type FacebokActivity, type FacebookImpressions, type FacebookInsights, type FacebookInteractions, type FacebookPost, type FacebookPostUrlOneOf, type FacebookReactions, type GbpInsights, type GbpPost, type GbpPostCallToAction, GbpPostCallToActionType, type GbpPostCallToActionTypeWithLiterals, type GenerateImageRequest, type GenerateImageResponse, GenerateMediaStatus, type GenerateMediaStatusWithLiterals, type GeneratePostDataOptions, type GeneratePostDataRequest, type GeneratePostDataResponse, type GenerateTextOptions, type GenerateTextRequest, type GenerateTextResponse, type GenerateTextResult, type GenerateVideoRequest, type GenerateVideoResponse, type GeneratedContent, type InstagramInsights, type InstagramPost, type InstagramPostUrlOneOf, type LinkMetadata, type LinkedinPost, type LinkedinPostInsights, type LinkedinPostUrlOneOf, type Media, MediaType, type MediaTypeWithLiterals, type MediaWrapper, type PinterestInsights, type PinterestPost, type SiteAsset, type TikTokInsights, type TikTokPhoto, TikTokPrivacyLevel, type TikTokPrivacyLevelWithLiterals, type TwitterInsights, type TwitterPost, type TwitterPostUrlOneOf, Type, type TypeWithLiterals, generatePostData, generateText };
@@ -26,7 +26,6 @@ __export(index_typings_exports, {
26
26
  MediaType: () => MediaType,
27
27
  TikTokPrivacyLevel: () => TikTokPrivacyLevel,
28
28
  Type: () => Type,
29
- generateImage: () => generateImage2,
30
29
  generatePostData: () => generatePostData2,
31
30
  generateText: () => generateText2
32
31
  });
@@ -152,27 +151,6 @@ function generateText(payload) {
152
151
  }
153
152
  return __generateText;
154
153
  }
155
- function generateImage(payload) {
156
- function __generateImage({ host }) {
157
- const metadata = {
158
- entityFqdn: "wix.promote.publisher.v1.generated_content",
159
- method: "POST",
160
- methodFqn: "com.wixpress.promote.publisher.v1.GeneratedContentService.GenerateImage",
161
- packageName: PACKAGE_NAME,
162
- migrationOptions: {
163
- optInTransformResponse: true
164
- },
165
- url: resolveComWixpressPromotePublisherV1GeneratedContentServiceUrl({
166
- protoPath: "/v1/generate-image",
167
- data: payload,
168
- host
169
- }),
170
- data: payload
171
- };
172
- return metadata;
173
- }
174
- return __generateImage;
175
- }
176
154
  function generatePostData(payload) {
177
155
  function __generatePostData({ host }) {
178
156
  const metadata = {
@@ -293,35 +271,6 @@ async function generateText2(userInput, options) {
293
271
  throw transformedError;
294
272
  }
295
273
  }
296
- async function generateImage2(userInput, options) {
297
- const { httpClient, sideEffects } = arguments[2];
298
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
299
- userInput,
300
- imageUrl: options?.imageUrl
301
- });
302
- const reqOpts = generateImage(payload);
303
- sideEffects?.onSiteCall?.();
304
- try {
305
- const result = await httpClient.request(reqOpts);
306
- sideEffects?.onSuccess?.(result);
307
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
308
- } catch (err) {
309
- const transformedError = (0, import_transform_error.transformError)(
310
- err,
311
- {
312
- spreadPathsToArguments: {},
313
- explicitPathsToArguments: {
314
- userInput: "$[0]",
315
- imageUrl: "$[1].imageUrl"
316
- },
317
- singleArgumentUnchanged: false
318
- },
319
- ["userInput", "options"]
320
- );
321
- sideEffects?.onError?.(err);
322
- throw transformedError;
323
- }
324
- }
325
274
  async function generatePostData2(options) {
326
275
  const { httpClient, sideEffects } = arguments[1];
327
276
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -365,7 +314,6 @@ async function generatePostData2(options) {
365
314
  MediaType,
366
315
  TikTokPrivacyLevel,
367
316
  Type,
368
- generateImage,
369
317
  generatePostData,
370
318
  generateText
371
319
  });