@wix/auto_sdk_domains_domain-suggestions 1.0.34 → 1.0.36

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.
@@ -52,6 +52,10 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
52
52
  {
53
53
  srcPath: "/v2/suggest-domains",
54
54
  destPath: "/v2/suggest-domains"
55
+ },
56
+ {
57
+ srcPath: "/domain-search/v2",
58
+ destPath: "/v2/suggested-tld"
55
59
  }
56
60
  ],
57
61
  "premium._base_domain_": [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.universal.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.public.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.context.ts"],"sourcesContent":["export * from './src/premium-domains-v2-suggestion-domain-suggestions.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 ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\n\nexport interface DomainSuggestion {\n /**\n * Suggested domain name including TLD.\n * @format HOSTNAME\n */\n domain?: string;\n /** Whether the domain has a higher price due to its perceived value or demand. */\n premium?: boolean;\n}\n\nexport interface SuggestDomainsRequest {\n /**\n * Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n query: string;\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n /**\n * When set to `true`, domains with a higher price due to their perceived\n * value or demand are excluded from suggestions.\n *\n * Default: `false`\n * @internal\n */\n excludePremiumDomains?: boolean;\n /**\n * When set to `true`, only one suggestion per unique SLD\n * (second-level domain, the part before the TLD) is returned.\n * For example, if both `daniel.com` and `daniel.net` are available,\n * only the first one encountered is included.\n *\n * Default: `false`\n * @internal\n */\n uniqueSldsOnly?: boolean;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `50`\n * @min 1\n * @max 50\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 10000\n */\n cursor?: string | null;\n}\n\nexport interface SuggestDomainsResponse {\n /** List of suggested available domains. */\n suggestions?: DomainSuggestion[];\n /** Metadata about the returned list of suggested domains. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of domains returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface ListSuggestedTldsRequest {}\n\nexport interface ListSuggestedTldsResponse {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain) that suggestions are drawn from, without the dot. For example, `com`.\n * @maxLength 63\n */\n tlds?: string[];\n}\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param query - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @public\n * @requiredField query\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains\n */\nexport async function suggestDomains(\n query: string,\n options?: SuggestDomainsOptions\n): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n tlds: options?.tlds,\n limit: options?.limit,\n paging: options?.paging,\n maxLength: options?.maxLength,\n });\n\n const reqOpts =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(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 query: '$[0]',\n tlds: '$[1].tlds',\n limit: '$[1].limit',\n paging: '$[1].paging',\n maxLength: '$[1].maxLength',\n },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SuggestDomainsOptions {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @internal\n * @documentationMaturity preview\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds\n */\nexport async function listSuggestedTlds(): Promise<\n NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>\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 ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n SuggestDomainsResponse,\n listSuggestedTlds as universalListSuggestedTlds,\n suggestDomains as universalSuggestDomains,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/domains' };\n\nexport function suggestDomains(\n httpClient: HttpClient\n): SuggestDomainsSignature {\n return (query: string, options?: SuggestDomainsOptions) =>\n universalSuggestDomains(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SuggestDomainsSignature {\n /**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n */\n (query: string, options?: SuggestDomainsOptions): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n >;\n}\n\n/** @internal */\nexport function listSuggestedTlds(\n httpClient: HttpClient\n): ListSuggestedTldsSignature {\n return () =>\n universalListSuggestedTlds(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSuggestedTldsSignature {\n /**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\n (): Promise<NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>>;\n}\n\nexport {\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DomainSuggestion,\n ListSuggestedTldsRequest,\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n SuggestDomainsRequest,\n SuggestDomainsResponse,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n","import {\n suggestDomains as publicSuggestDomains,\n listSuggestedTlds as publicListSuggestedTlds,\n} from './premium-domains-v2-suggestion-domain-suggestions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const suggestDomains: MaybeContext<\n BuildRESTFunction<typeof publicSuggestDomains> & typeof publicSuggestDomains\n> = /*#__PURE__*/ createRESTModule(publicSuggestDomains);\n/** @internal */\nexport const listSuggestedTlds: MaybeContext<\n BuildRESTFunction<typeof publicListSuggestedTlds> &\n typeof publicListSuggestedTlds\n> = /*#__PURE__*/ createRESTModule(publicListSuggestedTlds);\n\nexport {\n DomainSuggestion,\n SuggestDomainsRequest,\n CursorPaging,\n SuggestDomainsResponse,\n CursorPagingMetadata,\n Cursors,\n ListSuggestedTldsRequest,\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,Q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BA,eAAoB;AAEhD,IAAMC,qBAGK,2DAAiBA,kBAAuB;","names":["listSuggestedTlds","suggestDomains","import_rest_modules","suggestDomains","sdkTransformError","listSuggestedTlds","suggestDomains","listSuggestedTlds","import_rest_modules","suggestDomains","listSuggestedTlds"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.universal.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.public.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.context.ts"],"sourcesContent":["export * from './src/premium-domains-v2-suggestion-domain-suggestions.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 ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\n\nexport interface DomainSuggestion {\n /**\n * Suggested domain name including TLD.\n * @format HOSTNAME\n */\n domain?: string;\n /** Whether the domain has a higher price due to its perceived value or demand. */\n premium?: boolean;\n}\n\nexport interface SuggestDomainsRequest {\n /**\n * Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n query: string;\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n /**\n * When set to `true`, domains with a higher price due to their perceived\n * value or demand are excluded from suggestions.\n *\n * Default: `false`\n * @internal\n */\n excludePremiumDomains?: boolean;\n /**\n * When set to `true`, only one suggestion per unique SLD\n * (second-level domain, the part before the TLD) is returned.\n * For example, if both `daniel.com` and `daniel.net` are available,\n * only the first one encountered is included.\n *\n * Default: `false`\n * @internal\n */\n uniqueSldsOnly?: boolean;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `50`\n * @min 1\n * @max 50\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 10000\n */\n cursor?: string | null;\n}\n\nexport interface SuggestDomainsResponse {\n /** List of suggested available domains. */\n suggestions?: DomainSuggestion[];\n /** Metadata about the returned list of suggested domains. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of domains returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface ListSuggestedTldsRequest {}\n\nexport interface ListSuggestedTldsResponse {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain) that suggestions are drawn from, without the dot. For example, `com`.\n * @maxLength 63\n */\n tlds?: string[];\n}\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param query - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @public\n * @requiredField query\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains\n */\nexport async function suggestDomains(\n query: string,\n options?: SuggestDomainsOptions\n): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n tlds: options?.tlds,\n limit: options?.limit,\n paging: options?.paging,\n maxLength: options?.maxLength,\n });\n\n const reqOpts =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(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 query: '$[0]',\n tlds: '$[1].tlds',\n limit: '$[1].limit',\n paging: '$[1].paging',\n maxLength: '$[1].maxLength',\n },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SuggestDomainsOptions {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @internal\n * @documentationMaturity preview\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds\n */\nexport async function listSuggestedTlds(): Promise<\n NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>\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 ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2/suggested-tld',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n SuggestDomainsResponse,\n listSuggestedTlds as universalListSuggestedTlds,\n suggestDomains as universalSuggestDomains,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/domains' };\n\nexport function suggestDomains(\n httpClient: HttpClient\n): SuggestDomainsSignature {\n return (query: string, options?: SuggestDomainsOptions) =>\n universalSuggestDomains(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SuggestDomainsSignature {\n /**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n */\n (query: string, options?: SuggestDomainsOptions): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n >;\n}\n\n/** @internal */\nexport function listSuggestedTlds(\n httpClient: HttpClient\n): ListSuggestedTldsSignature {\n return () =>\n universalListSuggestedTlds(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSuggestedTldsSignature {\n /**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\n (): Promise<NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>>;\n}\n\nexport {\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DomainSuggestion,\n ListSuggestedTldsRequest,\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n SuggestDomainsRequest,\n SuggestDomainsResponse,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n","import {\n suggestDomains as publicSuggestDomains,\n listSuggestedTlds as publicListSuggestedTlds,\n} from './premium-domains-v2-suggestion-domain-suggestions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const suggestDomains: MaybeContext<\n BuildRESTFunction<typeof publicSuggestDomains> & typeof publicSuggestDomains\n> = /*#__PURE__*/ createRESTModule(publicSuggestDomains);\n/** @internal */\nexport const listSuggestedTlds: MaybeContext<\n BuildRESTFunction<typeof publicListSuggestedTlds> &\n typeof publicListSuggestedTlds\n> = /*#__PURE__*/ createRESTModule(publicListSuggestedTlds);\n\nexport {\n DomainSuggestion,\n SuggestDomainsRequest,\n CursorPaging,\n SuggestDomainsResponse,\n CursorPagingMetadata,\n Cursors,\n ListSuggestedTldsRequest,\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;A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kTransformError","listSuggestedTlds","suggestDomains","listSuggestedTlds","import_rest_modules","suggestDomains","listSuggestedTlds"]}
@@ -52,6 +52,10 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
52
52
  {
53
53
  srcPath: "/v2/suggest-domains",
54
54
  destPath: "/v2/suggest-domains"
55
+ },
56
+ {
57
+ srcPath: "/domain-search/v2",
58
+ destPath: "/v2/suggested-tld"
55
59
  }
56
60
  ],
57
61
  "premium._base_domain_": [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.universal.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts"],"sourcesContent":["export * from './src/premium-domains-v2-suggestion-domain-suggestions.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 ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\n\nexport interface DomainSuggestion {\n /**\n * Suggested domain name including TLD.\n * @format HOSTNAME\n */\n domain?: string;\n /** Whether the domain has a higher price due to its perceived value or demand. */\n premium?: boolean;\n}\n\nexport interface SuggestDomainsRequest {\n /**\n * Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n query: string;\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n /**\n * When set to `true`, domains with a higher price due to their perceived\n * value or demand are excluded from suggestions.\n *\n * Default: `false`\n * @internal\n */\n excludePremiumDomains?: boolean;\n /**\n * When set to `true`, only one suggestion per unique SLD\n * (second-level domain, the part before the TLD) is returned.\n * For example, if both `daniel.com` and `daniel.net` are available,\n * only the first one encountered is included.\n *\n * Default: `false`\n * @internal\n */\n uniqueSldsOnly?: boolean;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `50`\n * @min 1\n * @max 50\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 10000\n */\n cursor?: string | null;\n}\n\nexport interface SuggestDomainsResponse {\n /** List of suggested available domains. */\n suggestions?: DomainSuggestion[];\n /** Metadata about the returned list of suggested domains. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of domains returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface ListSuggestedTldsRequest {}\n\nexport interface ListSuggestedTldsResponse {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain) that suggestions are drawn from, without the dot. For example, `com`.\n * @maxLength 63\n */\n tlds?: string[];\n}\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param query - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @public\n * @requiredField query\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains\n */\nexport async function suggestDomains(\n query: string,\n options?: SuggestDomainsOptions\n): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n tlds: options?.tlds,\n limit: options?.limit,\n paging: options?.paging,\n maxLength: options?.maxLength,\n });\n\n const reqOpts =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(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 query: '$[0]',\n tlds: '$[1].tlds',\n limit: '$[1].limit',\n paging: '$[1].paging',\n maxLength: '$[1].maxLength',\n },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SuggestDomainsOptions {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @internal\n * @documentationMaturity preview\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds\n */\nexport async function listSuggestedTlds(): Promise<\n NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>\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 ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB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Aa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["listSuggestedTlds","suggestDomains","import_rest_modules","suggestDomains","sdkTransformError","listSuggestedTlds"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.universal.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts"],"sourcesContent":["export * from './src/premium-domains-v2-suggestion-domain-suggestions.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 ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\n\nexport interface DomainSuggestion {\n /**\n * Suggested domain name including TLD.\n * @format HOSTNAME\n */\n domain?: string;\n /** Whether the domain has a higher price due to its perceived value or demand. */\n premium?: boolean;\n}\n\nexport interface SuggestDomainsRequest {\n /**\n * Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n query: string;\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n /**\n * When set to `true`, domains with a higher price due to their perceived\n * value or demand are excluded from suggestions.\n *\n * Default: `false`\n * @internal\n */\n excludePremiumDomains?: boolean;\n /**\n * When set to `true`, only one suggestion per unique SLD\n * (second-level domain, the part before the TLD) is returned.\n * For example, if both `daniel.com` and `daniel.net` are available,\n * only the first one encountered is included.\n *\n * Default: `false`\n * @internal\n */\n uniqueSldsOnly?: boolean;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `50`\n * @min 1\n * @max 50\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 10000\n */\n cursor?: string | null;\n}\n\nexport interface SuggestDomainsResponse {\n /** List of suggested available domains. */\n suggestions?: DomainSuggestion[];\n /** Metadata about the returned list of suggested domains. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of domains returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface ListSuggestedTldsRequest {}\n\nexport interface ListSuggestedTldsResponse {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain) that suggestions are drawn from, without the dot. For example, `com`.\n * @maxLength 63\n */\n tlds?: string[];\n}\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param query - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @public\n * @requiredField query\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains\n */\nexport async function suggestDomains(\n query: string,\n options?: SuggestDomainsOptions\n): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n tlds: options?.tlds,\n limit: options?.limit,\n paging: options?.paging,\n maxLength: options?.maxLength,\n });\n\n const reqOpts =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(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 query: '$[0]',\n tlds: '$[1].tlds',\n limit: '$[1].limit',\n paging: '$[1].paging',\n maxLength: '$[1].maxLength',\n },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SuggestDomainsOptions {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @internal\n * @documentationMaturity preview\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds\n */\nexport async function listSuggestedTlds(): Promise<\n NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>\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 ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2/suggested-tld',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AA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uggestedTlds"]}
package/build/cjs/meta.js CHANGED
@@ -48,6 +48,10 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
48
48
  {
49
49
  srcPath: "/v2/suggest-domains",
50
50
  destPath: "/v2/suggest-domains"
51
+ },
52
+ {
53
+ srcPath: "/domain-search/v2",
54
+ destPath: "/v2/suggested-tld"
51
55
  }
52
56
  ],
53
57
  "premium._base_domain_": [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../meta.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.meta.ts"],"sourcesContent":["export * from './src/premium-domains-v2-suggestion-domain-suggestions.meta.js';\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n","import * as ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\nimport * as ambassadorWixPremiumDomainsV2SuggestionTypes from './premium-domains-v2-suggestion-domain-suggestions.types.js';\nimport * as ambassadorWixPremiumDomainsV2SuggestionUniversalTypes from './premium-domains-v2-suggestion-domain-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 suggestDomains(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.SuggestDomainsRequest,\n ambassadorWixPremiumDomainsV2SuggestionTypes.SuggestDomainsRequest,\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.SuggestDomainsResponse,\n ambassadorWixPremiumDomainsV2SuggestionTypes.SuggestDomainsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(payload);\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: '/v2/suggest-domains',\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 listSuggestedTlds(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.ListSuggestedTldsRequest,\n ambassadorWixPremiumDomainsV2SuggestionTypes.ListSuggestedTldsRequest,\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.ListSuggestedTldsResponse,\n ambassadorWixPremiumDomainsV2SuggestionTypes.ListSuggestedTldsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(payload);\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: '/v2/suggested-tlds',\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 DomainSuggestion as DomainSuggestionOriginal,\n SuggestDomainsRequest as SuggestDomainsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n SuggestDomainsResponse as SuggestDomainsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n ListSuggestedTldsRequest as ListSuggestedTldsRequestOriginal,\n ListSuggestedTldsResponse as ListSuggestedTldsResponseOriginal,\n} from './premium-domains-v2-suggestion-domain-suggestions.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAA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estedTlds"]}
1
+ {"version":3,"sources":["../../meta.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.meta.ts"],"sourcesContent":["export * from './src/premium-domains-v2-suggestion-domain-suggestions.meta.js';\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2/suggested-tld',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n","import * as ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\nimport * as ambassadorWixPremiumDomainsV2SuggestionTypes from './premium-domains-v2-suggestion-domain-suggestions.types.js';\nimport * as ambassadorWixPremiumDomainsV2SuggestionUniversalTypes from './premium-domains-v2-suggestion-domain-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 suggestDomains(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.SuggestDomainsRequest,\n ambassadorWixPremiumDomainsV2SuggestionTypes.SuggestDomainsRequest,\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.SuggestDomainsResponse,\n ambassadorWixPremiumDomainsV2SuggestionTypes.SuggestDomainsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(payload);\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: '/v2/suggest-domains',\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 listSuggestedTlds(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.ListSuggestedTldsRequest,\n ambassadorWixPremiumDomainsV2SuggestionTypes.ListSuggestedTldsRequest,\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.ListSuggestedTldsResponse,\n ambassadorWixPremiumDomainsV2SuggestionTypes.ListSuggestedTldsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(payload);\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: '/v2/suggested-tlds',\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 DomainSuggestion as DomainSuggestionOriginal,\n SuggestDomainsRequest as SuggestDomainsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n SuggestDomainsResponse as SuggestDomainsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n ListSuggestedTldsRequest as ListSuggestedTldsRequestOriginal,\n ListSuggestedTldsResponse as ListSuggestedTldsResponseOriginal,\n} from './premium-domains-v2-suggestion-domain-suggestions.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,k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AK,GAAQ;AAC1C,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK;AAAA,QACH,EAAE,WAAW,sBAAsB,MAAM,SAAS,KAAK;AAAA,MACzD;AAAA,MACA,YAAQ,uCAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AC5KO,SAASC,kBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACoC,eAAe,OAAO;AAEhE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACoC,kBAAkB,OAAO;AAEnE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["listSuggestedTlds","suggestDomains","import_rest_modules","suggestDomains","listSuggestedTlds"]}
@@ -28,6 +28,10 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
28
28
  {
29
29
  srcPath: "/v2/suggest-domains",
30
30
  destPath: "/v2/suggest-domains"
31
+ },
32
+ {
33
+ srcPath: "/domain-search/v2",
34
+ destPath: "/v2/suggested-tld"
31
35
  }
32
36
  ],
33
37
  "premium._base_domain_": [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/premium-domains-v2-suggestion-domain-suggestions.universal.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.public.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.context.ts"],"sourcesContent":["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 ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\n\nexport interface DomainSuggestion {\n /**\n * Suggested domain name including TLD.\n * @format HOSTNAME\n */\n domain?: string;\n /** Whether the domain has a higher price due to its perceived value or demand. */\n premium?: boolean;\n}\n\nexport interface SuggestDomainsRequest {\n /**\n * Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n query: string;\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n /**\n * When set to `true`, domains with a higher price due to their perceived\n * value or demand are excluded from suggestions.\n *\n * Default: `false`\n * @internal\n */\n excludePremiumDomains?: boolean;\n /**\n * When set to `true`, only one suggestion per unique SLD\n * (second-level domain, the part before the TLD) is returned.\n * For example, if both `daniel.com` and `daniel.net` are available,\n * only the first one encountered is included.\n *\n * Default: `false`\n * @internal\n */\n uniqueSldsOnly?: boolean;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `50`\n * @min 1\n * @max 50\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 10000\n */\n cursor?: string | null;\n}\n\nexport interface SuggestDomainsResponse {\n /** List of suggested available domains. */\n suggestions?: DomainSuggestion[];\n /** Metadata about the returned list of suggested domains. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of domains returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface ListSuggestedTldsRequest {}\n\nexport interface ListSuggestedTldsResponse {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain) that suggestions are drawn from, without the dot. For example, `com`.\n * @maxLength 63\n */\n tlds?: string[];\n}\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param query - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @public\n * @requiredField query\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains\n */\nexport async function suggestDomains(\n query: string,\n options?: SuggestDomainsOptions\n): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n tlds: options?.tlds,\n limit: options?.limit,\n paging: options?.paging,\n maxLength: options?.maxLength,\n });\n\n const reqOpts =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(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 query: '$[0]',\n tlds: '$[1].tlds',\n limit: '$[1].limit',\n paging: '$[1].paging',\n maxLength: '$[1].maxLength',\n },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SuggestDomainsOptions {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @internal\n * @documentationMaturity preview\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds\n */\nexport async function listSuggestedTlds(): Promise<\n NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>\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 ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n SuggestDomainsResponse,\n listSuggestedTlds as universalListSuggestedTlds,\n suggestDomains as universalSuggestDomains,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/domains' };\n\nexport function suggestDomains(\n httpClient: HttpClient\n): SuggestDomainsSignature {\n return (query: string, options?: SuggestDomainsOptions) =>\n universalSuggestDomains(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SuggestDomainsSignature {\n /**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n */\n (query: string, options?: SuggestDomainsOptions): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n >;\n}\n\n/** @internal */\nexport function listSuggestedTlds(\n httpClient: HttpClient\n): ListSuggestedTldsSignature {\n return () =>\n universalListSuggestedTlds(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSuggestedTldsSignature {\n /**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\n (): Promise<NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>>;\n}\n\nexport {\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DomainSuggestion,\n ListSuggestedTldsRequest,\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n SuggestDomainsRequest,\n SuggestDomainsResponse,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n","import {\n suggestDomains as publicSuggestDomains,\n listSuggestedTlds as publicListSuggestedTlds,\n} from './premium-domains-v2-suggestion-domain-suggestions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const suggestDomains: MaybeContext<\n BuildRESTFunction<typeof publicSuggestDomains> & typeof publicSuggestDomains\n> = /*#__PURE__*/ createRESTModule(publicSuggestDomains);\n/** @internal */\nexport const listSuggestedTlds: MaybeContext<\n BuildRESTFunction<typeof publicListSuggestedTlds> &\n typeof publicListSuggestedTlds\n> = /*#__PURE__*/ createRESTModule(publicListSuggestedTlds);\n\nexport {\n DomainSuggestion,\n SuggestDomainsRequest,\n CursorPaging,\n SuggestDomainsResponse,\n CursorPagingMetadata,\n Cursors,\n ListSuggestedTldsRequest,\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAA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rB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA2DA,eAAsBC,qBAEpB;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC,CAAC,CAAC;AAExD,QAAM,UACoC,kBAAkB,OAAO;AAEnE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEjTO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,OAAe,YACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA6BO,SAASC,mBACd,YAC4B;AAC5B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtDA,SAAS,wBAAwB;AAG1B,IAAMC,kBAEK,iCAAiBA,eAAoB;AAEhD,IAAMC,qBAGK,iCAAiBA,kBAAuB;","names":["suggestDomains","listSuggestedTlds","suggestDomains","listSuggestedTlds","suggestDomains","listSuggestedTlds"]}
1
+ {"version":3,"sources":["../../src/premium-domains-v2-suggestion-domain-suggestions.universal.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.public.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.context.ts"],"sourcesContent":["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 ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\n\nexport interface DomainSuggestion {\n /**\n * Suggested domain name including TLD.\n * @format HOSTNAME\n */\n domain?: string;\n /** Whether the domain has a higher price due to its perceived value or demand. */\n premium?: boolean;\n}\n\nexport interface SuggestDomainsRequest {\n /**\n * Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n query: string;\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n /**\n * When set to `true`, domains with a higher price due to their perceived\n * value or demand are excluded from suggestions.\n *\n * Default: `false`\n * @internal\n */\n excludePremiumDomains?: boolean;\n /**\n * When set to `true`, only one suggestion per unique SLD\n * (second-level domain, the part before the TLD) is returned.\n * For example, if both `daniel.com` and `daniel.net` are available,\n * only the first one encountered is included.\n *\n * Default: `false`\n * @internal\n */\n uniqueSldsOnly?: boolean;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `50`\n * @min 1\n * @max 50\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 10000\n */\n cursor?: string | null;\n}\n\nexport interface SuggestDomainsResponse {\n /** List of suggested available domains. */\n suggestions?: DomainSuggestion[];\n /** Metadata about the returned list of suggested domains. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of domains returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface ListSuggestedTldsRequest {}\n\nexport interface ListSuggestedTldsResponse {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain) that suggestions are drawn from, without the dot. For example, `com`.\n * @maxLength 63\n */\n tlds?: string[];\n}\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param query - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @public\n * @requiredField query\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains\n */\nexport async function suggestDomains(\n query: string,\n options?: SuggestDomainsOptions\n): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n tlds: options?.tlds,\n limit: options?.limit,\n paging: options?.paging,\n maxLength: options?.maxLength,\n });\n\n const reqOpts =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(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 query: '$[0]',\n tlds: '$[1].tlds',\n limit: '$[1].limit',\n paging: '$[1].paging',\n maxLength: '$[1].maxLength',\n },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SuggestDomainsOptions {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @internal\n * @documentationMaturity preview\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds\n */\nexport async function listSuggestedTlds(): Promise<\n NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>\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 ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2/suggested-tld',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n SuggestDomainsResponse,\n listSuggestedTlds as universalListSuggestedTlds,\n suggestDomains as universalSuggestDomains,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/domains' };\n\nexport function suggestDomains(\n httpClient: HttpClient\n): SuggestDomainsSignature {\n return (query: string, options?: SuggestDomainsOptions) =>\n universalSuggestDomains(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SuggestDomainsSignature {\n /**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n */\n (query: string, options?: SuggestDomainsOptions): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n >;\n}\n\n/** @internal */\nexport function listSuggestedTlds(\n httpClient: HttpClient\n): ListSuggestedTldsSignature {\n return () =>\n universalListSuggestedTlds(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListSuggestedTldsSignature {\n /**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\n (): Promise<NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>>;\n}\n\nexport {\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DomainSuggestion,\n ListSuggestedTldsRequest,\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n SuggestDomainsRequest,\n SuggestDomainsResponse,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n","import {\n suggestDomains as publicSuggestDomains,\n listSuggestedTlds as publicListSuggestedTlds,\n} from './premium-domains-v2-suggestion-domain-suggestions.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const suggestDomains: MaybeContext<\n BuildRESTFunction<typeof publicSuggestDomains> & typeof publicSuggestDomains\n> = /*#__PURE__*/ createRESTModule(publicSuggestDomains);\n/** @internal */\nexport const listSuggestedTlds: MaybeContext<\n BuildRESTFunction<typeof publicListSuggestedTlds> &\n typeof publicListSuggestedTlds\n> = /*#__PURE__*/ createRESTModule(publicListSuggestedTlds);\n\nexport {\n DomainSuggestion,\n SuggestDomainsRequest,\n CursorPaging,\n SuggestDomainsResponse,\n CursorPagingMetadata,\n Cursors,\n ListSuggestedTldsRequest,\n ListSuggestedTldsResponse,\n SuggestDomainsOptions,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MACh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,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEjTO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,OAAe,YACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA6BO,SAASC,mBACd,YAC4B;AAC5B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtDA,SAAS,wBAAwB;AAG1B,IAAMC,kBAEK,iCAAiBA,eAAoB;AAEhD,IAAMC,qBAGK,iCAAiBA,kBAAuB;","names":["suggestDomains","listSuggestedTlds","suggestDomains","listSuggestedTlds","suggestDomains","listSuggestedTlds"]}
@@ -28,6 +28,10 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
28
28
  {
29
29
  srcPath: "/v2/suggest-domains",
30
30
  destPath: "/v2/suggest-domains"
31
+ },
32
+ {
33
+ srcPath: "/domain-search/v2",
34
+ destPath: "/v2/suggested-tld"
31
35
  }
32
36
  ],
33
37
  "premium._base_domain_": [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/premium-domains-v2-suggestion-domain-suggestions.universal.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts"],"sourcesContent":["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 ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\n\nexport interface DomainSuggestion {\n /**\n * Suggested domain name including TLD.\n * @format HOSTNAME\n */\n domain?: string;\n /** Whether the domain has a higher price due to its perceived value or demand. */\n premium?: boolean;\n}\n\nexport interface SuggestDomainsRequest {\n /**\n * Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n query: string;\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n /**\n * When set to `true`, domains with a higher price due to their perceived\n * value or demand are excluded from suggestions.\n *\n * Default: `false`\n * @internal\n */\n excludePremiumDomains?: boolean;\n /**\n * When set to `true`, only one suggestion per unique SLD\n * (second-level domain, the part before the TLD) is returned.\n * For example, if both `daniel.com` and `daniel.net` are available,\n * only the first one encountered is included.\n *\n * Default: `false`\n * @internal\n */\n uniqueSldsOnly?: boolean;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `50`\n * @min 1\n * @max 50\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 10000\n */\n cursor?: string | null;\n}\n\nexport interface SuggestDomainsResponse {\n /** List of suggested available domains. */\n suggestions?: DomainSuggestion[];\n /** Metadata about the returned list of suggested domains. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of domains returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface ListSuggestedTldsRequest {}\n\nexport interface ListSuggestedTldsResponse {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain) that suggestions are drawn from, without the dot. For example, `com`.\n * @maxLength 63\n */\n tlds?: string[];\n}\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param query - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @public\n * @requiredField query\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains\n */\nexport async function suggestDomains(\n query: string,\n options?: SuggestDomainsOptions\n): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n tlds: options?.tlds,\n limit: options?.limit,\n paging: options?.paging,\n maxLength: options?.maxLength,\n });\n\n const reqOpts =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(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 query: '$[0]',\n tlds: '$[1].tlds',\n limit: '$[1].limit',\n paging: '$[1].paging',\n maxLength: '$[1].maxLength',\n },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SuggestDomainsOptions {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @internal\n * @documentationMaturity preview\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds\n */\nexport async function listSuggestedTlds(): Promise<\n NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>\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 ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AA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ACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA2DA,eAAsBC,qBAEpB;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC,CAAC,CAAC;AAExD,QAAM,UACoC,kBAAkB,OAAO;AAEnE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["suggestDomains","listSuggestedTlds"]}
1
+ {"version":3,"sources":["../../src/premium-domains-v2-suggestion-domain-suggestions.universal.ts","../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts"],"sourcesContent":["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 ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\n\nexport interface DomainSuggestion {\n /**\n * Suggested domain name including TLD.\n * @format HOSTNAME\n */\n domain?: string;\n /** Whether the domain has a higher price due to its perceived value or demand. */\n premium?: boolean;\n}\n\nexport interface SuggestDomainsRequest {\n /**\n * Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n query: string;\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n /**\n * When set to `true`, domains with a higher price due to their perceived\n * value or demand are excluded from suggestions.\n *\n * Default: `false`\n * @internal\n */\n excludePremiumDomains?: boolean;\n /**\n * When set to `true`, only one suggestion per unique SLD\n * (second-level domain, the part before the TLD) is returned.\n * For example, if both `daniel.com` and `daniel.net` are available,\n * only the first one encountered is included.\n *\n * Default: `false`\n * @internal\n */\n uniqueSldsOnly?: boolean;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `50`\n * @min 1\n * @max 50\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 10000\n */\n cursor?: string | null;\n}\n\nexport interface SuggestDomainsResponse {\n /** List of suggested available domains. */\n suggestions?: DomainSuggestion[];\n /** Metadata about the returned list of suggested domains. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of domains returned in the response. */\n count?: number | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface ListSuggestedTldsRequest {}\n\nexport interface ListSuggestedTldsResponse {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain) that suggestions are drawn from, without the dot. For example, `com`.\n * @maxLength 63\n */\n tlds?: string[];\n}\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @param query - Input to base your domain suggestions on. May include\n * letters, numbers, spaces, dots, and hyphens. Must not include the TLD.\n *\n * Min: 1 characters\n * Max: 100 characters\n * @public\n * @requiredField query\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains\n */\nexport async function suggestDomains(\n query: string,\n options?: SuggestDomainsOptions\n): Promise<\n NonNullablePaths<\n SuggestDomainsResponse,\n | `suggestions`\n | `suggestions.${number}.domain`\n | `suggestions.${number}.premium`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n tlds: options?.tlds,\n limit: options?.limit,\n paging: options?.paging,\n maxLength: options?.maxLength,\n });\n\n const reqOpts =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(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 query: '$[0]',\n tlds: '$[1].tlds',\n limit: '$[1].limit',\n paging: '$[1].paging',\n maxLength: '$[1].maxLength',\n },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SuggestDomainsOptions {\n /**\n * [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must\n * not include the dot. For example, `com`, not `.com`. Not all TLDs can be\n * connected to Wix sites. Supported TLDS include `com`, `net`, and `org`.\n * Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more\n * information.\n *\n * Max: 10 TLDs\n * @maxSize 10\n * @maxLength 63\n */\n tlds?: string[];\n /**\n * Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @min 1\n * @max 20\n * @deprecated Number of domain suggestions to return. __Deprecated__: This field will be\n * removed on March 1, 2025. Use `paging.limit` instead.\n *\n * Min: `1`\n * Max: `20`\n * Default: `10`\n * @replacedBy paging.limit\n * @targetRemovalDate 2025-03-01\n */\n limit?: number | null;\n /** Cursor paging options. */\n paging?: CursorPaging;\n /**\n * Maximum number of characters for the domain name, excluding the TLD.\n *\n * Min: `3`\n * Max: `63`\n * Default: `63`\n * @min 3\n * @max 63\n */\n maxLength?: number | null;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n * @internal\n * @documentationMaturity preview\n * @permissionId DOMAINS.PUBLIC_API_PERMISSION\n * @fqn com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds\n */\nexport async function listSuggestedTlds(): Promise<\n NonNullablePaths<ListSuggestedTldsResponse, `tlds`, 0>\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 ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(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 singleArgumentUnchanged: false,\n },\n []\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2/suggested-tld',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;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AAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,CAAC;AAAA,QAC3B,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC;AAAA,IACH;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["suggestDomains","listSuggestedTlds"]}
package/build/es/meta.mjs CHANGED
@@ -21,6 +21,10 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
21
21
  {
22
22
  srcPath: "/v2/suggest-domains",
23
23
  destPath: "/v2/suggest-domains"
24
+ },
25
+ {
26
+ srcPath: "/domain-search/v2",
27
+ destPath: "/v2/suggested-tld"
24
28
  }
25
29
  ],
26
30
  "premium._base_domain_": [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts","../../src/premium-domains-v2-suggestion-domain-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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n","import * as ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\nimport * as ambassadorWixPremiumDomainsV2SuggestionTypes from './premium-domains-v2-suggestion-domain-suggestions.types.js';\nimport * as ambassadorWixPremiumDomainsV2SuggestionUniversalTypes from './premium-domains-v2-suggestion-domain-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 suggestDomains(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.SuggestDomainsRequest,\n ambassadorWixPremiumDomainsV2SuggestionTypes.SuggestDomainsRequest,\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.SuggestDomainsResponse,\n ambassadorWixPremiumDomainsV2SuggestionTypes.SuggestDomainsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(payload);\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: '/v2/suggest-domains',\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 listSuggestedTlds(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.ListSuggestedTldsRequest,\n ambassadorWixPremiumDomainsV2SuggestionTypes.ListSuggestedTldsRequest,\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.ListSuggestedTldsResponse,\n ambassadorWixPremiumDomainsV2SuggestionTypes.ListSuggestedTldsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(payload);\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: '/v2/suggested-tlds',\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 DomainSuggestion as DomainSuggestionOriginal,\n SuggestDomainsRequest as SuggestDomainsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n SuggestDomainsResponse as SuggestDomainsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n ListSuggestedTldsRequest as ListSuggestedTldsRequestOriginal,\n ListSuggestedTldsResponse as ListSuggestedTldsResponseOriginal,\n} from './premium-domains-v2-suggestion-domain-suggestions.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,M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,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["suggestDomains","listSuggestedTlds"]}
1
+ {"version":3,"sources":["../../src/premium-domains-v2-suggestion-domain-suggestions.http.ts","../../src/premium-domains-v2-suggestion-domain-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 resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2/suggested-tld',\n },\n ],\n 'premium._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/domain-search/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n 'vibe._base_domain_': [\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n _: [\n {\n srcPath: '/premium/domains/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n {\n srcPath: '/premium/domains/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n ],\n 'billing.base44.com': [\n {\n srcPath: '/v2/check-domain-availability',\n destPath: '/v2/check-domain-availability',\n },\n {\n srcPath: '/v2/suggest-domains',\n destPath: '/v2/suggest-domains',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_domains_domain-suggestions';\n\n/**\n * Suggests domains that are available for purchase, based on the provided query input.\n *\n * You may use this endpoint to get inspired and then call [Check Domain Availability()](/domainAvailability/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchase.\n *\n * The `tlds` must not include the dot. For example, `com` and not `.com`.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function suggestDomains(payload: object): RequestOptionsFactory<any> {\n function __suggestDomains({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggest-domains', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __suggestDomains;\n}\n\n/**\n * Retrieves the TLDs that [Suggest Domains()](/domainSuggestions/suggest-domains) draws its suggestions from. The TLDs don't include the dot. For example, `com` and not `.com`.\n *\n * > **Note:** Suggest Domains also filters suggestions by availability and caps the number it returns, so a given response won't contain every TLD listed here. TLDs derived from the search term itself are not included.\n *\n * > **Important:** This call requires an account level API key and cannot be authenticated with the standard authorization header.\n */\nexport function listSuggestedTlds(payload: object): RequestOptionsFactory<any> {\n function __listSuggestedTlds({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.premium.domains.v2.suggestion',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.ListSuggestedTlds',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(\n { protoPath: '/v2/suggested-tlds', data: payload, host }\n ),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listSuggestedTlds;\n}\n","import * as ambassadorWixPremiumDomainsV2Suggestion from './premium-domains-v2-suggestion-domain-suggestions.http.js';\nimport * as ambassadorWixPremiumDomainsV2SuggestionTypes from './premium-domains-v2-suggestion-domain-suggestions.types.js';\nimport * as ambassadorWixPremiumDomainsV2SuggestionUniversalTypes from './premium-domains-v2-suggestion-domain-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 suggestDomains(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.SuggestDomainsRequest,\n ambassadorWixPremiumDomainsV2SuggestionTypes.SuggestDomainsRequest,\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.SuggestDomainsResponse,\n ambassadorWixPremiumDomainsV2SuggestionTypes.SuggestDomainsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPremiumDomainsV2Suggestion.suggestDomains(payload);\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: '/v2/suggest-domains',\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 listSuggestedTlds(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.ListSuggestedTldsRequest,\n ambassadorWixPremiumDomainsV2SuggestionTypes.ListSuggestedTldsRequest,\n ambassadorWixPremiumDomainsV2SuggestionUniversalTypes.ListSuggestedTldsResponse,\n ambassadorWixPremiumDomainsV2SuggestionTypes.ListSuggestedTldsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPremiumDomainsV2Suggestion.listSuggestedTlds(payload);\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: '/v2/suggested-tlds',\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 DomainSuggestion as DomainSuggestionOriginal,\n SuggestDomainsRequest as SuggestDomainsRequestOriginal,\n CursorPaging as CursorPagingOriginal,\n SuggestDomainsResponse as SuggestDomainsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n ListSuggestedTldsRequest as ListSuggestedTldsRequestOriginal,\n ListSuggestedTldsResponse as ListSuggestedTldsResponseOriginal,\n} from './premium-domains-v2-suggestion-domain-suggestions.types.js';\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,qEACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;A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C;AAC7E,WAAS,oBAAoB,EAAE,KAAK,GAAQ;AAC1C,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK;AAAA,QACH,EAAE,WAAW,sBAAsB,MAAM,SAAS,KAAK;AAAA,MACzD;AAAA,MACA,QAAQ,kBAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AC5KO,SAASA,kBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACoC,eAAe,OAAO;AAEhE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBACoC,kBAAkB,OAAO;AAEnE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["suggestDomains","listSuggestedTlds"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_domains_domain-suggestions",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -50,5 +50,5 @@
50
50
  "fqdn": "wix.premium.domains.v2.suggestion"
51
51
  }
52
52
  },
53
- "falconPackageHash": "2dd5d7a90d474e1595304a9b1c63aae3f896ee3538e3b979cacbff3d"
53
+ "falconPackageHash": "78defb808ebd54b3643ae3facbd489f878fa27bf5325ca1ccec74978"
54
54
  }