{"version":3,"sources":["../../src/members-v1-custom-field-suggestion-custom-field-suggestions.http.ts","../../src/members-v1-custom-field-suggestion-custom-field-suggestions.types.ts","../../src/members-v1-custom-field-suggestion-custom-field-suggestions.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressMembersCustomfieldsSuggestionsCustomFieldSuggestionsUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'api._api_base_domain_': [\n      {\n        srcPath: '/members-custom-fields-suggestions-api',\n        destPath: '',\n      },\n    ],\n    'www.wixapis.com': [\n      {\n        srcPath: '/members/v1/custom-field-suggestions',\n        destPath: '/v1/custom-field-suggestions',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/members/v1/custom-field-suggestions',\n        destPath: '/v1/custom-field-suggestions',\n      },\n    ],\n    'editor.wixapps.net': [\n      {\n        srcPath: '/_api/members/v1/custom-field-suggestions',\n        destPath: '/v1/custom-field-suggestions',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_members_custom-field-suggestions';\n\n/** Retrieves a list of suggestions for both custom fields and existing fields available from the Wix Members Area. */\nexport function listCustomFieldSuggestions(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __listCustomFieldSuggestions({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.members.v1.custom_field_suggestion',\n      method: 'GET' as any,\n      methodFqn:\n        'com.wixpress.members.customfields.suggestions.CustomFieldSuggestions.ListCustomFieldSuggestions',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembersCustomfieldsSuggestionsCustomFieldSuggestionsUrl(\n        { protoPath: '/v1/custom-field-suggestions', data: payload, host }\n      ),\n      params: toURLSearchParams(payload, true),\n    };\n\n    return metadata;\n  }\n\n  return __listCustomFieldSuggestions;\n}\n\n/**\n * Retrieves a list of up to 100 custom field suggestions, given the provided filters, fieldsets, sorting and paging, and returns a [`SuggestionsQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/members/custom-field-suggestions/suggestions-query-builder/find) object.\n *\n * The returned object contains the query definition which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/members/custom-field-suggestions/suggestions-query-builder/find) method.\n *\n * You can refine the query by chaining `SuggestionsQueryBuilder` methods onto the query. `SuggestionsQueryBuilder` methods enable you to sort, filter, and control the results that `queryCustomFieldSuggestions()` returns. The methods that are chained to `queryCustomFieldSuggestions()` are applied in the order they are called.\n *\n * `queryCustomFieldSuggestions()` runs with the following `SuggestionsQueryBuilder` defaults that you can override:\n * - [`skip`: `0`](https://dev.wix.com/docs/sdk/backend-modules/members/custom-field-suggestions/suggestions-query-builder/skip)\n * - [`limit`: `50`](https://dev.wix.com/docs/sdk/backend-modules/members/custom-field-suggestions/suggestions-query-builder/limit)\n *\n *\n */\nexport function queryCustomFieldSuggestions(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __queryCustomFieldSuggestions({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.members.v1.custom_field_suggestion',\n      method: 'POST' as any,\n      methodFqn:\n        'com.wixpress.members.customfields.suggestions.CustomFieldSuggestions.QueryCustomFieldSuggestions',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressMembersCustomfieldsSuggestionsCustomFieldSuggestionsUrl(\n        { protoPath: '/v1/custom-field-suggestions/query', data: payload, host }\n      ),\n      data: payload,\n    };\n\n    return metadata;\n  }\n\n  return __queryCustomFieldSuggestions;\n}\n","/** A custom field that can be suggested for Wix users to add to member profiles. */\nexport interface CustomFieldSuggestion {\n  /**\n   * Custom field name.\n   * @maxLength 150\n   */\n  name?: string | null;\n  /** Privacy level of the custom field. */\n  defaultPrivacy?: PrivacyWithLiterals;\n  /** Type of information to provide for members. */\n  fieldType?: TypeWithLiterals;\n  /** Social network type. */\n  socialType?: SocialTypeTypeWithLiterals;\n  /** Field origin. */\n  fieldOrigin?: OriginWithLiterals;\n  /**\n   * Custom field ID.\n   * @format GUID\n   */\n  customFieldId?: string | null;\n}\n\nexport enum Privacy {\n  /** Unknown privacy. This value isn't used. */\n  UNKNOWN = 'UNKNOWN',\n  /** The information appears on the members' public profile pages. */\n  PUBLIC = 'PUBLIC',\n  /** Only the member can see this information. */\n  PRIVATE = 'PRIVATE',\n}\n\n/** @enumType */\nexport type PrivacyWithLiterals = Privacy | 'UNKNOWN' | 'PUBLIC' | 'PRIVATE';\n\nexport enum Type {\n  /** Unknown field type. This value isn't used. */\n  UNKNOWN = 'UNKNOWN',\n  /** A text box to write text. */\n  TEXT = 'TEXT',\n  /** Only a number can be entered into the field. */\n  NUMBER = 'NUMBER',\n  /** Only a date can be entered into the field. */\n  DATE = 'DATE',\n  /** Only a URL can be entered into the field. */\n  URL = 'URL',\n  /** Only a link from the selected social media platform can be entered into the field. */\n  SOCIAL = 'SOCIAL',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n  | Type\n  | 'UNKNOWN'\n  | 'TEXT'\n  | 'NUMBER'\n  | 'DATE'\n  | 'URL'\n  | 'SOCIAL';\n\nexport enum SocialTypeType {\n  /** Unknown social type. This value isn't used. */\n  UNKNOWN = 'UNKNOWN',\n  /** Facebook social media platform. */\n  FACEBOOK = 'FACEBOOK',\n  /** Instagram social media platform. */\n  INSTAGRAM = 'INSTAGRAM',\n  /** LinkedIn social media platform. */\n  LINKEDIN = 'LINKEDIN',\n  /** X (formerly Twitter) social media platform. */\n  TWITTER = 'TWITTER',\n  /** Youtube social media platform. */\n  YOUTUBE = 'YOUTUBE',\n  /** Pinterest social media platform. */\n  PINTEREST = 'PINTEREST',\n  /** TikTok social media platform. */\n  TIKTOK = 'TIKTOK',\n  /** DeviantArt social media platform. */\n  DEVIANTART = 'DEVIANTART',\n  /** SoundCloud social media platform. */\n  SOUNDCLOUD = 'SOUNDCLOUD',\n  /** Tumblr social media platform. */\n  TUMBLR = 'TUMBLR',\n  /** Vimeo social media platform. */\n  VIMEO = 'VIMEO',\n  /** VKontakte social media platform. */\n  VKONTAKTE = 'VKONTAKTE',\n  /** Odnoklassniki social media platform. */\n  ODNOKLASSNIKI = 'ODNOKLASSNIKI',\n  /** Other social media platform. */\n  OTHER = 'OTHER',\n}\n\n/** @enumType */\nexport type SocialTypeTypeWithLiterals =\n  | SocialTypeType\n  | 'UNKNOWN'\n  | 'FACEBOOK'\n  | 'INSTAGRAM'\n  | 'LINKEDIN'\n  | 'TWITTER'\n  | 'YOUTUBE'\n  | 'PINTEREST'\n  | 'TIKTOK'\n  | 'DEVIANTART'\n  | 'SOUNDCLOUD'\n  | 'TUMBLR'\n  | 'VIMEO'\n  | 'VKONTAKTE'\n  | 'ODNOKLASSNIKI'\n  | 'OTHER';\n\nexport enum Origin {\n  /** Unknown field origin. This value isn't used. */\n  UNKNOWN = 'UNKNOWN',\n  /** Custom field created by a Wix user. */\n  CUSTOM = 'CUSTOM',\n  /** Contact type of field. These are default fields that are already provided by Members Area, such as: \"birth date\", \"position\", \"company\". */\n  CONTACT = 'CONTACT',\n  /** System fields, such as: \"first name\", \"last name\", \"email\", \"phone\", \"address\", and  \"title\". Some system fields are only available from the dashboard. */\n  SYSTEM = 'SYSTEM',\n}\n\n/** @enumType */\nexport type OriginWithLiterals =\n  | Origin\n  | 'UNKNOWN'\n  | 'CUSTOM'\n  | 'CONTACT'\n  | 'SYSTEM';\n\nexport interface ListCustomFieldSuggestionsRequest {\n  paging?: Paging;\n  sorting?: Sorting[];\n}\n\nexport interface Paging {\n  /** Number of items to load. */\n  limit?: number | null;\n  /** Number of items to skip in the current sort order. */\n  offset?: number | null;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface ListCustomFieldSuggestionsResponse {\n  /** Custom field suggestions. */\n  suggestions?: CustomFieldSuggestion[];\n  /** Metadata for the paginated results. */\n  metadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. */\n  total?: number | null;\n  /** Flag that indicates the server failed to calculate the `total` field. */\n  tooManyToCount?: boolean | null;\n}\n\nexport interface QueryCustomFieldSuggestionsRequest {\n  /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */\n  query?: Query;\n}\n\nexport interface Query {\n  /**\n   * Filter object.\n   *\n   * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n   */\n  filter?: any;\n  /**\n   * Cursor paging options.\n   *\n   * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n   */\n  paging?: Paging;\n  /**\n   * Sort object.\n   *\n   * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n   */\n  sorting?: Sorting[];\n}\n\nexport interface QueryCustomFieldSuggestionsResponse {\n  /** Custom field suggestion. */\n  suggestions?: CustomFieldSuggestion[];\n  /** Metadata for the paginated results. */\n  metadata?: PagingMetadata;\n}\n","import * as ambassadorWixMembersV1CustomFieldSuggestion from './members-v1-custom-field-suggestion-custom-field-suggestions.http.js';\nimport * as ambassadorWixMembersV1CustomFieldSuggestionTypes from './members-v1-custom-field-suggestion-custom-field-suggestions.types.js';\nimport * as ambassadorWixMembersV1CustomFieldSuggestionUniversalTypes from './members-v1-custom-field-suggestion-custom-field-suggestions.universal.js';\n\nexport type __PublicMethodMetaInfo<\n  K = string,\n  M = unknown,\n  T = unknown,\n  S = unknown,\n  Q = unknown,\n  R = unknown\n> = {\n  getUrl: (context: any) => string;\n  httpMethod: K;\n  path: string;\n  pathParams: M;\n  __requestType: T;\n  __originalRequestType: S;\n  __responseType: Q;\n  __originalResponseType: R;\n};\n\nexport function listCustomFieldSuggestions(): __PublicMethodMetaInfo<\n  'GET',\n  {},\n  ambassadorWixMembersV1CustomFieldSuggestionUniversalTypes.ListCustomFieldSuggestionsRequest,\n  ambassadorWixMembersV1CustomFieldSuggestionTypes.ListCustomFieldSuggestionsRequest,\n  ambassadorWixMembersV1CustomFieldSuggestionUniversalTypes.ListCustomFieldSuggestionsResponse,\n  ambassadorWixMembersV1CustomFieldSuggestionTypes.ListCustomFieldSuggestionsResponse\n> {\n  const payload = {} as any;\n\n  const getRequestOptions =\n    ambassadorWixMembersV1CustomFieldSuggestion.listCustomFieldSuggestions(\n      payload\n    );\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'GET',\n    path: '/v1/custom-field-suggestions',\n    pathParams: {},\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport function queryCustomFieldSuggestions(): __PublicMethodMetaInfo<\n  'POST',\n  {},\n  ambassadorWixMembersV1CustomFieldSuggestionUniversalTypes.QueryCustomFieldSuggestionsRequest,\n  ambassadorWixMembersV1CustomFieldSuggestionTypes.QueryCustomFieldSuggestionsRequest,\n  ambassadorWixMembersV1CustomFieldSuggestionUniversalTypes.QueryCustomFieldSuggestionsResponse,\n  ambassadorWixMembersV1CustomFieldSuggestionTypes.QueryCustomFieldSuggestionsResponse\n> {\n  const payload = {} as any;\n\n  const getRequestOptions =\n    ambassadorWixMembersV1CustomFieldSuggestion.queryCustomFieldSuggestions(\n      payload\n    );\n\n  const getUrl = (context: any): string => {\n    const { url } = getRequestOptions(context);\n    return url!;\n  };\n\n  return {\n    getUrl,\n    httpMethod: 'POST',\n    path: '/v1/custom-field-suggestions/query',\n    pathParams: {},\n    __requestType: null as any,\n    __originalRequestType: null as any,\n    __responseType: null as any,\n    __originalResponseType: null as any,\n  };\n}\n\nexport {\n  CustomFieldSuggestion as CustomFieldSuggestionOriginal,\n  Privacy as PrivacyOriginal,\n  PrivacyWithLiterals as PrivacyWithLiteralsOriginal,\n  Type as TypeOriginal,\n  TypeWithLiterals as TypeWithLiteralsOriginal,\n  SocialTypeType as SocialTypeTypeOriginal,\n  SocialTypeTypeWithLiterals as SocialTypeTypeWithLiteralsOriginal,\n  Origin as OriginOriginal,\n  OriginWithLiterals as OriginWithLiteralsOriginal,\n  ListCustomFieldSuggestionsRequest as ListCustomFieldSuggestionsRequestOriginal,\n  Paging as PagingOriginal,\n  Sorting as SortingOriginal,\n  SortOrder as SortOrderOriginal,\n  SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n  ListCustomFieldSuggestionsResponse as ListCustomFieldSuggestionsResponseOriginal,\n  PagingMetadata as PagingMetadataOriginal,\n  QueryCustomFieldSuggestionsRequest as QueryCustomFieldSuggestionsRequestOriginal,\n  Query as QueryOriginal,\n  QueryCustomFieldSuggestionsResponse as QueryCustomFieldSuggestionsResponseOriginal,\n} from './members-v1-custom-field-suggestion-custom-field-suggestions.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ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