{"version":3,"sources":["jsdelivr-header.js","/npm/@wix/auto_sdk_portfolio_portfolio-settings@1.0.36/index.ts","/npm/@wix/auto_sdk_portfolio_portfolio-settings@1.0.36/src/portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.public.ts","/npm/@wix/auto_sdk_portfolio_portfolio-settings@1.0.36/src/portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.universal.ts","/npm/@wix/auto_sdk_portfolio_portfolio-settings@1.0.36/src/portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.http.ts","/npm/@wix/auto_sdk_portfolio_portfolio-settings@1.0.36/src/portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.context.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,8iBCNA,cAAA,GAAA,SAAA,cAAA,CAAA,iBAAA,IAAA,iBAAA,gBAAA,IAAA,gBAAA,oBAAA,IAAA,oBAAA,wBAAA,IAAA,yBAAA,qBAAA,IAAA,sBAAA,2BAAA,IAAA,4BAAA,wBAAA,IAAA,2BAAA,OAAA,QAAA,aAAA,eCAA,IAAA,+BAAwD,QAAA,2CACxD,kBAAqD,QAAA,8CACrD,wBAA+B,QAAA,oDAC/B,iBAA8D,QAAA,kBCH9D,uBAAoD,QAAA,oCACpD,8BAGO,QAAA,2CCJP,oBAAkC,QAAA,iCAClC,iBAAqD,QAAA,8CACrD,kBAAqD,QAAA,8CACrD,kBAAqD,QAAA,+CACrD,uBAA+B,QAAA,oDAC/B,qBAA2B,QAAA,iCAI3B,SAAS,mEACP,GAmEA,SAAO,qBAAA,YAAW,OAAO,OAAO,EAAM,CAAE,iBAjEf,CACvB,uBAAwB,CACtB,CACE,QAAS,8BACT,SAAU,SAGd,uBAAwB,CACtB,CACE,QAAS,8BACT,SAAU,SAGd,uBAAwB,CACtB,CACE,QAAS,8BACT,SAAU,SAGd,iBAAkB,CAChB,CACE,QAAS,8BACT,SAAU,SAGd,EAAG,CACD,CACE,QAAS,8BACT,SAAU,SA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KACxD,OAAS,GACP,MAAM,GAAA,EAAmB,uBAAA,gBACvB,EACA,CACE,uBAAwB,CAAC,EACzB,yBAA0B,CAAC,EAC3B,yBAAyB,GAE3B,IAIF,MAFA,GAAa,UAAU,GAEjB,CACR,CACF,CAYA,eAAsB,yBACpB,GAUA,MAAM,WAAE,EAAA,YAAY,GAAgB,UAAU,GASxC,EACkD,yBALlD,EAAU,8BAAA,uCAAsC,CACpD,uBAQF,GAAa,eACb,IACE,MAAM,QAAe,EAAW,QAAQ,GAGxC,OAFA,GAAa,YAAY,IAEzB,EAAO,8BAAA,yCAAwC,EAAO,KACxD,OAAS,GACP,MAAM,GAAA,EAAmB,uBAAA,gBACvB,EACA,CACE,uBAAwB,CAAC,EACzB,yBAA0B,CAAE,kBAAmB,QAC/C,yBAAyB,GAE3B,CAAC,sBAIH,MAFA,GAAa,UAAU,GAEjB,CACR,CACF,CDxfO,SAAS,yBACd,GAEA,OACE,GAMA,yBACE,EAEA,CAAE,cAER,CA4BO,SAAS,sBACd,GAEA,MAAO,IACL,sBAEE,CAAE,cAER,CAgBO,SAAS,yBACd,GAEA,OACE,GAEA,yBACE,EAEA,CAAE,cAER,CAmBO,IAAM,4BAAA,EAA6B,iBAAA,iBACxC,6DACA,EACC,IAAA,EACC,+BAAA,0CAAA,EACE,wBAAA,gBAAe,EAAO,CACpB,CACE,YAAa,kBAAA,qCACb,MAAO,CACL,CAAE,KAAM,sBACR,CAAE,KAAM,sBACR,CAAE,KAAM,2BAXP,GG5Gb,qBAAiC,QAAA,iCACjC,gCAAkC,QAAA,6CAQrB,0BAGK,EAAA,qBAAA,kBAAiB,0BACtB,uBAGK,EAAA,qBAAA,kBAAiB,uBACtB,0BAGK,EAAA,qBAAA,kBAAiB,0BAItB,+BAG+B,gCAAA,mBAC1C","file":"/npm/@wix/auto_sdk_portfolio_portfolio-settings@1.0.36/build/cjs/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/@wix/auto_sdk_portfolio_portfolio-settings@1.0.36/build/cjs/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export * from './src/portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  GetPortfolioSettingsResponse,\n  PortfolioSettings,\n  PortfolioSettingsCreatedEnvelope,\n  UpdatePortfolioSettingsResponse,\n  createPortfolioSettings as universalCreatePortfolioSettings,\n  getPortfolioSettings as universalGetPortfolioSettings,\n  updatePortfolioSettings as universalUpdatePortfolioSettings,\n} from './portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/portfolio' };\n\nexport function createPortfolioSettings(\n  httpClient: HttpClient\n): CreatePortfolioSettingsSignature {\n  return (\n    portfolioSettings: NonNullablePaths<\n      PortfolioSettings,\n      `projectItemSettings`,\n      2\n    >\n  ) =>\n    universalCreatePortfolioSettings(\n      portfolioSettings,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface CreatePortfolioSettingsSignature {\n  /**\n   * Creates a site's portfolio settings.\n   *\n   * > **Note:**\n   * >\n   * > This method is intended for creating portfolio settings. If settings already exist, the request will return an error. To update existing settings, call [Update Portfolio Settings](https://dev.wix.com/docs/rest/business-solutions/portfolio/portfolio-settings/update-portfolio-settings).\n   * @param - The portfolio settings to create.\n   * @returns Newly created portfolio settings.\n   */\n  (\n    portfolioSettings: NonNullablePaths<\n      PortfolioSettings,\n      `projectItemSettings`,\n      2\n    >\n  ): Promise<\n    NonNullablePaths<\n      PortfolioSettings,\n      | `projectItemSettings.addItemDirection`\n      | `projectItemSettings.defaultItemName`,\n      3\n    >\n  >;\n}\n\nexport function getPortfolioSettings(\n  httpClient: HttpClient\n): GetPortfolioSettingsSignature {\n  return () =>\n    universalGetPortfolioSettings(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface GetPortfolioSettingsSignature {\n  /**\n   * Retrieves a site's portfolio settings.\n   */\n  (): Promise<\n    NonNullablePaths<\n      GetPortfolioSettingsResponse,\n      | `portfolioSettings.projectItemSettings.addItemDirection`\n      | `portfolioSettings.projectItemSettings.defaultItemName`,\n      4\n    >\n  >;\n}\n\nexport function updatePortfolioSettings(\n  httpClient: HttpClient\n): UpdatePortfolioSettingsSignature {\n  return (\n    portfolioSettings: NonNullablePaths<PortfolioSettings, `revision`, 2>\n  ) =>\n    universalUpdatePortfolioSettings(\n      portfolioSettings,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface UpdatePortfolioSettingsSignature {\n  /**\n   * Updates a site's portfolio settings.\n   * @param - The portfolio settings to update.\n   */\n  (\n    portfolioSettings: NonNullablePaths<PortfolioSettings, `revision`, 2>\n  ): Promise<\n    NonNullablePaths<\n      UpdatePortfolioSettingsResponse,\n      | `updatedPortfolioSettings.projectItemSettings.addItemDirection`\n      | `updatedPortfolioSettings.projectItemSettings.defaultItemName`,\n      4\n    >\n  >;\n}\n\nexport const onPortfolioSettingsCreated = EventDefinition(\n  'wix.portfolio.portfolio_app.v1.portfolio_settings_created',\n  true,\n  (event: PortfolioSettingsCreatedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'entity.createdDate' },\n            { path: 'entity.updatedDate' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<PortfolioSettingsCreatedEnvelope>();\n\nexport {\n  AccountInfo,\n  AccountInfoMetadata,\n  ActionEvent,\n  AddItemDirection,\n  BaseEventMetadata,\n  CreatePortfolioSettingsRequest,\n  CreatePortfolioSettingsResponse,\n  DefaultItemName,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  GetPortfolioSettingsRequest,\n  GetPortfolioSettingsResponse,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  MediaSettings,\n  MessageEnvelope,\n  PortfolioSettings,\n  PortfolioSettingsCreatedEnvelope,\n  ProjectItemSettings,\n  RestoreInfo,\n  SiteMenuSettings,\n  UpdatePortfolioSettingsRequest,\n  UpdatePortfolioSettingsResponse,\n  WebhookIdentityType,\n} from './portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixPortfolioPortfolioAppV1PortfolioSettings from './portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.http.js';\n\nexport interface PortfolioSettings {\n  /**\n   * Revision number. Increments by 1 each time the portfolio settings object is updated. To prevent conflicting changes, the existing revision must be passed when updating the portfolio settings object.\n   * @readonly\n   */\n  revision?: string | null;\n  /** Portfolio's project item settings. */\n  projectItemSettings?: ProjectItemSettings;\n  /** Portfolio's media settings. */\n  mediaSettings?: MediaSettings;\n  /**\n   * Date and time the portfolio settings were created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the portfolio settings were updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n}\n\nexport interface ProjectItemSettings {\n  /** The direction in which to add new project items to a gallery. Default: `GALLERY_START` */\n  addItemDirection?: AddItemDirectionWithLiterals;\n  /** Default title assigned to a project item if no title is provided. Default: `FILE_NAME` */\n  defaultItemName?: DefaultItemNameWithLiterals;\n}\n\nexport enum AddItemDirection {\n  /** Add new project items to the beginning of the gallery. */\n  GALLERY_START = 'GALLERY_START',\n  /** Add new project items to the end of the gallery. */\n  GALLERY_END = 'GALLERY_END',\n}\n\n/** @enumType */\nexport type AddItemDirectionWithLiterals =\n  | AddItemDirection\n  | 'GALLERY_START'\n  | 'GALLERY_END';\n\nexport enum DefaultItemName {\n  /** File name assigned as the title. */\n  FILE_NAME = 'FILE_NAME',\n  /** No title assigned. */\n  EMPTY = 'EMPTY',\n}\n\n/** @enumType */\nexport type DefaultItemNameWithLiterals =\n  | DefaultItemName\n  | 'FILE_NAME'\n  | 'EMPTY';\n\nexport interface MediaSettings {\n  /** ID of the folder containing the media. */\n  folderId?: string | null;\n}\n\nexport interface SiteMenuSettings {\n  /** Whether to automatically update the site menu */\n  autoUpdateMenu?: boolean | null;\n}\n\nexport interface CreatePortfolioSettingsRequest {\n  /** The portfolio settings to create. */\n  portfolioSettings: PortfolioSettings;\n}\n\nexport interface CreatePortfolioSettingsResponse {\n  /** Newly created portfolio settings. */\n  portfolioSettings?: PortfolioSettings;\n}\n\nexport interface GetPortfolioSettingsRequest {}\n\nexport interface GetPortfolioSettingsResponse {\n  /** Portfolio settings. */\n  portfolioSettings?: PortfolioSettings;\n}\n\nexport interface UpdatePortfolioSettingsRequest {\n  /** The portfolio settings to update. */\n  portfolioSettings: PortfolioSettings;\n}\n\nexport interface UpdatePortfolioSettingsResponse {\n  /** Updated portfolio settings. */\n  updatedPortfolioSettings?: PortfolioSettings;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entity?: string;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n  body?: string;\n}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n\nexport interface BaseEventMetadata {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n   * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n   */\n  entityEventSequence?: string | null;\n  accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n  /** ID of the Wix account associated with the event */\n  accountId: string;\n  /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n  siteId?: string;\n  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n  parentAccountId?: string;\n}\n\nexport interface PortfolioSettingsCreatedEnvelope {\n  entity: PortfolioSettings;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when portfolio settings are created.\n * @permissionScope Manage Portfolio\n * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO\n * @permissionId PORTFOLIO.SETTINGS_READ\n * @webhook\n * @eventType wix.portfolio.portfolio_app.v1.portfolio_settings_created\n * @slug created\n */\nexport declare function onPortfolioSettingsCreated(\n  handler: (event: PortfolioSettingsCreatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a site's portfolio settings.\n *\n * > **Note:**\n * >\n * > This method is intended for creating portfolio settings. If settings already exist, the request will return an error. To update existing settings, call [Update Portfolio Settings](https://dev.wix.com/docs/rest/business-solutions/portfolio/portfolio-settings/update-portfolio-settings).\n * @param portfolioSettings - The portfolio settings to create.\n * @public\n * @requiredField portfolioSettings\n * @requiredField portfolioSettings.projectItemSettings\n * @permissionId PORTFOLIO.SETTINGS_CREATE\n * @applicableIdentity APP\n * @returns Newly created portfolio settings.\n * @fqn com.wixpress.portfolio.portfolioapp.PortfolioSettingsService.CreatePortfolioSettings\n */\nexport async function createPortfolioSettings(\n  portfolioSettings: NonNullablePaths<\n    PortfolioSettings,\n    `projectItemSettings`,\n    2\n  >\n): Promise<\n  NonNullablePaths<\n    PortfolioSettings,\n    | `projectItemSettings.addItemDirection`\n    | `projectItemSettings.defaultItemName`,\n    3\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    portfolioSettings: portfolioSettings,\n  });\n\n  const reqOpts =\n    ambassadorWixPortfolioPortfolioAppV1PortfolioSettings.createPortfolioSettings(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.portfolioSettings!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { portfolioSettings: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['portfolioSettings']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Retrieves a site's portfolio settings.\n * @public\n * @permissionId PORTFOLIO.SETTINGS_READ\n * @applicableIdentity APP\n * @fqn com.wixpress.portfolio.portfolioapp.PortfolioSettingsService.GetPortfolioSettings\n */\nexport async function getPortfolioSettings(): Promise<\n  NonNullablePaths<\n    GetPortfolioSettingsResponse,\n    | `portfolioSettings.projectItemSettings.addItemDirection`\n    | `portfolioSettings.projectItemSettings.defaultItemName`,\n    4\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({});\n\n  const reqOpts =\n    ambassadorWixPortfolioPortfolioAppV1PortfolioSettings.getPortfolioSettings(\n      payload\n    );\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        singleArgumentUnchanged: false,\n      },\n      []\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\n/**\n * Updates a site's portfolio settings.\n * @param portfolioSettings - The portfolio settings to update.\n * @public\n * @requiredField portfolioSettings\n * @requiredField portfolioSettings.revision\n * @permissionId PORTFOLIO.SETTINGS_UPDATE\n * @applicableIdentity APP\n * @fqn com.wixpress.portfolio.portfolioapp.PortfolioSettingsService.UpdatePortfolioSettings\n */\nexport async function updatePortfolioSettings(\n  portfolioSettings: NonNullablePaths<PortfolioSettings, `revision`, 2>\n): Promise<\n  NonNullablePaths<\n    UpdatePortfolioSettingsResponse,\n    | `updatedPortfolioSettings.projectItemSettings.addItemDirection`\n    | `updatedPortfolioSettings.projectItemSettings.defaultItemName`,\n    4\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    portfolioSettings: portfolioSettings,\n  });\n\n  const reqOpts =\n    ambassadorWixPortfolioPortfolioAppV1PortfolioSettings.updatePortfolioSettings(\n      payload\n    );\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: { portfolioSettings: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['portfolioSettings']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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 resolveComWixpressPortfolioPortfolioappPortfolioSettingsServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/portfolio-app-service',\n        destPath: '/api',\n      },\n    ],\n    'editor._base_domain_': [\n      {\n        srcPath: '/_api/portfolio-app-service',\n        destPath: '/api',\n      },\n    ],\n    'blocks._base_domain_': [\n      {\n        srcPath: '/_api/portfolio-app-service',\n        destPath: '/api',\n      },\n    ],\n    'create.editorx': [\n      {\n        srcPath: '/_api/portfolio-app-service',\n        destPath: '/api',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/_api/portfolio-app-service',\n        destPath: '/api',\n      },\n    ],\n    'api._api_base_domain_': [\n      {\n        srcPath: '/_api/portfolio-app-service',\n        destPath: '/api',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/portfolio/v1/settings',\n        destPath: '/api/v1/portfolio/settings',\n      },\n      {\n        srcPath: '/portfolio/portfolio-app/api/v1/portfolio/settings',\n        destPath: '/api/v1/portfolio/settings',\n      },\n      {\n        srcPath:\n          '/portfolio/project-items/api/v1/portfolio/project/items/media',\n        destPath: '/api/v1/portfolio/project/items/media',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/portfolio/portfolio-app/api/v1/portfolio/settings',\n        destPath: '/api/v1/portfolio/settings',\n      },\n      {\n        srcPath:\n          '/portfolio/project-items/api/v1/portfolio/project/items/media',\n        destPath: '/api/v1/portfolio/project/items/media',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_portfolio_portfolio-settings';\n\n/**\n * Creates a site's portfolio settings.\n *\n * > **Note:**\n * >\n * > This method is intended for creating portfolio settings. If settings already exist, the request will return an error. To update existing settings, call [Update Portfolio Settings](https://dev.wix.com/docs/rest/business-solutions/portfolio/portfolio-settings/update-portfolio-settings).\n */\nexport function createPortfolioSettings(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __createPortfolioSettings({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'portfolioSettings.createdDate' },\n          { path: 'portfolioSettings.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.portfolio.portfolio_app.v1.portfolio_settings',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.portfolio.portfolioapp.PortfolioSettingsService.CreatePortfolioSettings',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPortfolioPortfolioappPortfolioSettingsServiceUrl({\n        protoPath: '/api/v1/portfolio/settings',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'portfolioSettings.createdDate' },\n              { path: 'portfolioSettings.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __createPortfolioSettings;\n}\n\n/** Retrieves a site's portfolio settings. */\nexport function getPortfolioSettings(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getPortfolioSettings({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.portfolio.portfolio_app.v1.portfolio_settings',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.portfolio.portfolioapp.PortfolioSettingsService.GetPortfolioSettings',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPortfolioPortfolioappPortfolioSettingsServiceUrl({\n        protoPath: '/api/v1/portfolio/settings',\n        data: payload,\n        host,\n      }),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'portfolioSettings.createdDate' },\n              { path: 'portfolioSettings.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getPortfolioSettings;\n}\n\n/** Updates a site's portfolio settings. */\nexport function updatePortfolioSettings(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __updatePortfolioSettings({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'mask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'portfolioSettings.createdDate' },\n          { path: 'portfolioSettings.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.portfolio.portfolio_app.v1.portfolio_settings',\n      method: 'PATCH' as any,\n      methodFqn:\n        'com.wixpress.portfolio.portfolioapp.PortfolioSettingsService.UpdatePortfolioSettings',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressPortfolioPortfolioappPortfolioSettingsServiceUrl({\n        protoPath: '/api/v1/portfolio/settings',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'updatedPortfolioSettings.createdDate' },\n              { path: 'updatedPortfolioSettings.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __updatePortfolioSettings;\n}\n","import {\n  createPortfolioSettings as publicCreatePortfolioSettings,\n  getPortfolioSettings as publicGetPortfolioSettings,\n  updatePortfolioSettings as publicUpdatePortfolioSettings,\n} from './portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n  BuildRESTFunction,\n  MaybeContext,\n  BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onPortfolioSettingsCreated as publicOnPortfolioSettingsCreated } from './portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.public.js';\n\nexport const createPortfolioSettings: MaybeContext<\n  BuildRESTFunction<typeof publicCreatePortfolioSettings> &\n    typeof publicCreatePortfolioSettings\n> = /*#__PURE__*/ createRESTModule(publicCreatePortfolioSettings);\nexport const getPortfolioSettings: MaybeContext<\n  BuildRESTFunction<typeof publicGetPortfolioSettings> &\n    typeof publicGetPortfolioSettings\n> = /*#__PURE__*/ createRESTModule(publicGetPortfolioSettings);\nexport const updatePortfolioSettings: MaybeContext<\n  BuildRESTFunction<typeof publicUpdatePortfolioSettings> &\n    typeof publicUpdatePortfolioSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdatePortfolioSettings);\n/**\n * Triggered when portfolio settings are created.\n */\nexport const onPortfolioSettingsCreated: BuildEventDefinition<\n  typeof publicOnPortfolioSettingsCreated\n> &\n  typeof publicOnPortfolioSettingsCreated = createEventModule(\n  publicOnPortfolioSettingsCreated\n);\n\nexport {\n  AddItemDirection,\n  DefaultItemName,\n  WebhookIdentityType,\n} from './portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.universal.js';\nexport {\n  PortfolioSettings,\n  ProjectItemSettings,\n  MediaSettings,\n  SiteMenuSettings,\n  CreatePortfolioSettingsRequest,\n  CreatePortfolioSettingsResponse,\n  GetPortfolioSettingsRequest,\n  GetPortfolioSettingsResponse,\n  UpdatePortfolioSettingsRequest,\n  UpdatePortfolioSettingsResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  AccountInfo,\n  BaseEventMetadata,\n  EventMetadata,\n  AccountInfoMetadata,\n  PortfolioSettingsCreatedEnvelope,\n} from './portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.universal.js';\nexport {\n  AddItemDirectionWithLiterals,\n  DefaultItemNameWithLiterals,\n  WebhookIdentityTypeWithLiterals,\n} from './portfolio-portfolio-app-v1-portfolio-settings-portfolio-settings.universal.js';\n"]}