{"version":3,"sources":["../../src/members-v1-custom-field-suggestion-custom-field-suggestions.universal.ts","../../src/members-v1-custom-field-suggestion-custom-field-suggestions.http.ts","../../src/members-v1-custom-field-suggestion-custom-field-suggestions.public.ts","../../src/members-v1-custom-field-suggestion-custom-field-suggestions.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n  HttpClient,\n  HttpResponse,\n  NonNullablePaths,\n  QuerySpec,\n  Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixMembersV1CustomFieldSuggestion from './members-v1-custom-field-suggestion-custom-field-suggestions.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\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   * Origin point for geo-distance sorting on a GEO field\n   * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).\n   */\n  origin?: AddressLocation;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface AddressLocation {\n  /** Address latitude. */\n  latitude?: number | null;\n  /** Address longitude. */\n  longitude?: number | null;\n}\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\n/**\n * Retrieves a list of suggestions for both custom fields and existing fields available from the Wix Members Area.\n * @public\n * @permissionId MEMBERS.CUSTOM_FIELDS_SUGGESTIONS_READ\n * @applicableIdentity APP\n * @fqn com.wixpress.members.customfields.suggestions.CustomFieldSuggestions.ListCustomFieldSuggestions\n */\nexport async function listCustomFieldSuggestions(\n  options?: ListCustomFieldSuggestionsOptions\n): Promise<\n  NonNullablePaths<\n    ListCustomFieldSuggestionsResponse,\n    | `suggestions`\n    | `suggestions.${number}.defaultPrivacy`\n    | `suggestions.${number}.fieldType`\n    | `suggestions.${number}.socialType`\n    | `suggestions.${number}.fieldOrigin`,\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    paging: options?.paging,\n    sorting: options?.sorting,\n  });\n\n  const reqOpts =\n    ambassadorWixMembersV1CustomFieldSuggestion.listCustomFieldSuggestions(\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          paging: '$[0].paging',\n          sorting: '$[0].sorting',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ListCustomFieldSuggestionsOptions {\n  paging?: Paging;\n  sorting?: Sorting[];\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 * @public\n * @permissionId MEMBERS.CUSTOM_FIELDS_SUGGESTIONS_READ\n * @applicableIdentity APP\n * @fqn com.wixpress.members.customfields.suggestions.CustomFieldSuggestions.QueryCustomFieldSuggestions\n */\nexport function queryCustomFieldSuggestions(): SuggestionsQueryBuilder {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[0] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  return queryBuilder<\n    CustomFieldSuggestion,\n    'OFFSET',\n    QueryCustomFieldSuggestionsRequest,\n    QueryCustomFieldSuggestionsResponse\n  >({\n    func: async (payload: QueryCustomFieldSuggestionsRequest) => {\n      const reqOpts =\n        ambassadorWixMembersV1CustomFieldSuggestion.queryCustomFieldSuggestions(\n          payload\n        );\n\n      sideEffects?.onSiteCall?.();\n      try {\n        const result = await httpClient.request(reqOpts);\n        sideEffects?.onSuccess?.(result);\n        return result;\n      } catch (err) {\n        sideEffects?.onError?.(err);\n        throw err;\n      }\n    },\n    requestTransformer: (\n      query: QueryCustomFieldSuggestionsRequest['query']\n    ) => {\n      const args = [query, {}] as [\n        QueryCustomFieldSuggestionsRequest['query'],\n        {}\n      ];\n      return renameKeysFromSDKRequestToRESTRequest({\n        ...args?.[1],\n        query: args?.[0],\n      });\n    },\n    responseTransformer: ({\n      data,\n    }: HttpResponse<QueryCustomFieldSuggestionsResponse>) => {\n      const transformedData = renameKeysFromRESTResponseToSDKResponse(\n        transformPaths(data, [])\n      );\n\n      return {\n        items: transformedData?.suggestions,\n        pagingMetadata: transformedData?.metadata,\n      };\n    },\n    errorTransformer: (err: unknown) => {\n      const transformedError = sdkTransformError(err, {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      });\n\n      throw transformedError;\n    },\n    pagingMethod: 'OFFSET',\n    transformationPaths: {},\n  });\n}\n\ninterface QueryOffsetResult {\n  currentPage: number | undefined;\n  totalPages: number | undefined;\n  totalCount: number | undefined;\n  hasNext: () => boolean;\n  hasPrev: () => boolean;\n  length: number;\n  pageSize: number;\n}\n\nexport interface SuggestionsQueryResult extends QueryOffsetResult {\n  items: CustomFieldSuggestion[];\n  query: SuggestionsQueryBuilder;\n  next: () => Promise<SuggestionsQueryResult>;\n  prev: () => Promise<SuggestionsQueryResult>;\n}\n\nexport interface SuggestionsQueryBuilder {\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  eq: (\n    propertyName: 'name' | 'fieldType',\n    value: any\n  ) => SuggestionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  ne: (\n    propertyName: 'name' | 'fieldType',\n    value: any\n  ) => SuggestionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  ge: (propertyName: 'name', value: any) => SuggestionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  gt: (propertyName: 'name', value: any) => SuggestionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  le: (propertyName: 'name', value: any) => SuggestionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `value`.\n   * @param value - Value to compare against.\n   */\n  lt: (propertyName: 'name', value: any) => SuggestionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `string`.\n   * @param string - String to compare against. Case-insensitive.\n   */\n  startsWith: (propertyName: 'name', value: string) => SuggestionsQueryBuilder;\n  /** @param propertyName - Property whose value is compared with `values`.\n   * @param values - List of values to compare against.\n   */\n  hasSome: (\n    propertyName: 'name' | 'fieldType',\n    value: any[]\n  ) => SuggestionsQueryBuilder;\n  in: (\n    propertyName: 'name' | 'fieldType',\n    value: any\n  ) => SuggestionsQueryBuilder;\n  exists: (\n    propertyName: 'name' | 'fieldType',\n    value: boolean\n  ) => SuggestionsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n  ascending: (\n    ...propertyNames: Array<'name' | 'fieldType'>\n  ) => SuggestionsQueryBuilder;\n  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n  descending: (\n    ...propertyNames: Array<'name' | 'fieldType'>\n  ) => SuggestionsQueryBuilder;\n  /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n  limit: (limit: number) => SuggestionsQueryBuilder;\n  /** @param skip - Number of items to skip in the query results before returning the results. */\n  skip: (skip: number) => SuggestionsQueryBuilder;\n  find: () => Promise<SuggestionsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.members.customfields.suggestions.CustomFieldSuggestions.QueryCustomFieldSuggestions\n * @requiredField query\n */\nexport async function typedQueryCustomFieldSuggestions(\n  query: CustomFieldSuggestionQuery\n): Promise<\n  NonNullablePaths<\n    QueryCustomFieldSuggestionsResponse,\n    | `suggestions`\n    | `suggestions.${number}.defaultPrivacy`\n    | `suggestions.${number}.fieldType`\n    | `suggestions.${number}.socialType`\n    | `suggestions.${number}.fieldOrigin`,\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({ query: query });\n\n  const reqOpts =\n    ambassadorWixMembersV1CustomFieldSuggestion.queryCustomFieldSuggestions(\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: { query: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['query']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface CustomFieldSuggestionQuerySpec extends QuerySpec {\n  paging: 'offset';\n  wql: [\n    {\n      fields: ['fieldType', 'name'];\n      operators: '*';\n      sort: 'BOTH';\n    }\n  ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n  CustomFieldSuggestion,\n  CustomFieldSuggestionQuerySpec\n>;\nexport type CustomFieldSuggestionQuery = {\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?: CommonQueryWithEntityContext['filter'];\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?: {\n    /** \n  Number of items to load.  \n  */\n    limit?: NonNullable<CommonQueryWithEntityContext['paging']>['limit'] | null;\n    /** \n  Number of items to skip in the current sort order.  \n  */\n    offset?:\n      | NonNullable<CommonQueryWithEntityContext['paging']>['offset']\n      | null;\n  };\n};\n\nexport const utils = {\n  query: {\n    ...createQueryUtils<\n      CustomFieldSuggestion,\n      CustomFieldSuggestionQuerySpec,\n      CustomFieldSuggestionQuery\n    >(),\n  },\n};\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\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 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    '*.dev.wix-code.com': [\n      {\n        srcPath: '/members/v1/custom-field-suggestions',\n        destPath: '/v1/custom-field-suggestions',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/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 serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'sorting.origin.latitude' },\n          { path: 'sorting.origin.longitude' },\n        ],\n      },\n    ]);\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        {\n          protoPath: '/v1/custom-field-suggestions',\n          data: serializedData,\n          host,\n        }\n      ),\n      params: toURLSearchParams(serializedData, 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 serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'query.sorting.origin.latitude' },\n          { path: 'query.sorting.origin.longitude' },\n        ],\n      },\n    ]);\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        {\n          protoPath: '/v1/custom-field-suggestions/query',\n          data: serializedData,\n          host,\n        }\n      ),\n      data: serializedData,\n    };\n\n    return metadata;\n  }\n\n  return __queryCustomFieldSuggestions;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  CustomFieldSuggestionQuery,\n  ListCustomFieldSuggestionsOptions,\n  ListCustomFieldSuggestionsResponse,\n  QueryCustomFieldSuggestionsResponse,\n  SuggestionsQueryBuilder,\n  listCustomFieldSuggestions as universalListCustomFieldSuggestions,\n  queryCustomFieldSuggestions as universalQueryCustomFieldSuggestions,\n  typedQueryCustomFieldSuggestions as universalTypedQueryCustomFieldSuggestions,\n} from './members-v1-custom-field-suggestion-custom-field-suggestions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/members' };\n\nexport function listCustomFieldSuggestions(\n  httpClient: HttpClient\n): ListCustomFieldSuggestionsSignature {\n  return (options?: ListCustomFieldSuggestionsOptions) =>\n    universalListCustomFieldSuggestions(\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ListCustomFieldSuggestionsSignature {\n  /**\n   * Retrieves a list of suggestions for both custom fields and existing fields available from the Wix Members Area.\n   */\n  (options?: ListCustomFieldSuggestionsOptions): Promise<\n    NonNullablePaths<\n      ListCustomFieldSuggestionsResponse,\n      | `suggestions`\n      | `suggestions.${number}.defaultPrivacy`\n      | `suggestions.${number}.fieldType`\n      | `suggestions.${number}.socialType`\n      | `suggestions.${number}.fieldOrigin`,\n      4\n    >\n  >;\n}\n\nexport function queryCustomFieldSuggestions(\n  httpClient: HttpClient\n): QueryCustomFieldSuggestionsSignature {\n  return () =>\n    universalQueryCustomFieldSuggestions(\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface QueryCustomFieldSuggestionsSignature {\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   */\n  (): SuggestionsQueryBuilder;\n}\n\nexport function typedQueryCustomFieldSuggestions(\n  httpClient: HttpClient\n): TypedQueryCustomFieldSuggestionsSignature {\n  return (query: CustomFieldSuggestionQuery) =>\n    universalTypedQueryCustomFieldSuggestions(\n      query,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface TypedQueryCustomFieldSuggestionsSignature {\n  /** */\n  (query: CustomFieldSuggestionQuery): Promise<\n    NonNullablePaths<\n      QueryCustomFieldSuggestionsResponse,\n      | `suggestions`\n      | `suggestions.${number}.defaultPrivacy`\n      | `suggestions.${number}.fieldType`\n      | `suggestions.${number}.socialType`\n      | `suggestions.${number}.fieldOrigin`,\n      4\n    >\n  >;\n}\n\nexport {\n  AddressLocation,\n  CustomFieldSuggestion,\n  CustomFieldSuggestionQuerySpec,\n  ListCustomFieldSuggestionsOptions,\n  ListCustomFieldSuggestionsRequest,\n  ListCustomFieldSuggestionsResponse,\n  Origin,\n  Paging,\n  PagingMetadata,\n  Privacy,\n  Query,\n  QueryCustomFieldSuggestionsRequest,\n  QueryCustomFieldSuggestionsResponse,\n  SocialTypeType,\n  SortOrder,\n  Sorting,\n  SuggestionsQueryBuilder,\n  SuggestionsQueryResult,\n  Type,\n  utils,\n} from './members-v1-custom-field-suggestion-custom-field-suggestions.universal.js';\n","import {\n  listCustomFieldSuggestions as publicListCustomFieldSuggestions,\n  queryCustomFieldSuggestions as publicQueryCustomFieldSuggestions,\n  typedQueryCustomFieldSuggestions as publicTypedQueryCustomFieldSuggestions,\n} from './members-v1-custom-field-suggestion-custom-field-suggestions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n  CustomFieldSuggestionQuery,\n  SuggestionsQueryBuilder,\n  typedQueryCustomFieldSuggestions as universalTypedQueryCustomFieldSuggestions,\n} from './members-v1-custom-field-suggestion-custom-field-suggestions.universal.js';\n\nfunction customQueryCustomFieldSuggestions(httpClient: HttpClient) {\n  const router = createQueryOverloadRouter({\n    builderQueryFunction: () => publicQueryCustomFieldSuggestions(httpClient)(),\n    typedQueryFunction: (query: CustomFieldSuggestionQuery) =>\n      publicTypedQueryCustomFieldSuggestions(httpClient)(query),\n    hasOptionsParameter: false,\n  });\n\n  function overloadedQuery(): SuggestionsQueryBuilder;\n  function overloadedQuery(\n    query: CustomFieldSuggestionQuery\n  ): ReturnType<typeof universalTypedQueryCustomFieldSuggestions>;\n  function overloadedQuery(query?: CustomFieldSuggestionQuery): any {\n    return router(...arguments);\n  }\n\n  return overloadedQuery;\n}\n\nexport const listCustomFieldSuggestions: MaybeContext<\n  BuildRESTFunction<typeof publicListCustomFieldSuggestions> &\n    typeof publicListCustomFieldSuggestions\n> = /*#__PURE__*/ createRESTModule(publicListCustomFieldSuggestions);\nexport const queryCustomFieldSuggestions: MaybeContext<\n  BuildRESTFunction<typeof customQueryCustomFieldSuggestions> &\n    typeof customQueryCustomFieldSuggestions\n> = /*#__PURE__*/ createRESTModule(customQueryCustomFieldSuggestions);\n\nexport {\n  Privacy,\n  Type,\n  SocialTypeType,\n  Origin,\n  SortOrder,\n} from './members-v1-custom-field-suggestion-custom-field-suggestions.universal.js';\nexport {\n  CustomFieldSuggestion,\n  ListCustomFieldSuggestionsRequest,\n  Paging,\n  Sorting,\n  AddressLocation,\n  ListCustomFieldSuggestionsResponse,\n  PagingMetadata,\n  QueryCustomFieldSuggestionsRequest,\n  Query,\n  QueryCustomFieldSuggestionsResponse,\n  ListCustomFieldSuggestionsOptions,\n  SuggestionsQueryResult,\n  SuggestionsQueryBuilder,\n  CustomFieldSuggestionQuerySpec,\n} from './members-v1-custom-field-suggestion-custom-field-suggestions.universal.js';\nexport { utils } from './members-v1-custom-field-suggestion-custom-field-suggestions.universal.js';\nexport {\n  PrivacyWithLiterals,\n  TypeWithLiterals,\n  SocialTypeTypeWithLiterals,\n  OriginWithLiterals,\n  SortOrderWithLiterals,\n  CommonQueryWithEntityContext,\n  CustomFieldSuggestionQuery,\n} from './members-v1-custom-field-suggestion-custom-field-suggestions.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,sBAAsB;AAC/B,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;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,2BACd,SAC4B;AAC5B,WAAS,6BAA6B,EAAE,KAAK,GAAQ;AACnD,UAAM,iBAAiB,eAAe,SAAS;AAAA,MAC7C;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,0BAA0B;AAAA,UAClC,EAAE,MAAM,2BAA2B;AAAA,QACrC;AAAA,MACF;AAAA,I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SAAO;AACT;AAEO,IAAMC,8BAGK,iCAAiBA,2BAAgC;AAC5D,IAAMF,+BAGK,iCAAiB,iCAAiC;","names":["transformPaths","Privacy","Type","SocialTypeType","Origin","SortOrder","listCustomFieldSuggestions","queryCustomFieldSuggestions","listCustomFieldSuggestions","queryCustomFieldSuggestions","typedQueryCustomFieldSuggestions","queryCustomFieldSuggestions","typedQueryCustomFieldSuggestions","listCustomFieldSuggestions"]}