@wix/auto_sdk_domains_domain-suggestions 1.0.16 → 1.0.18
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.
- package/build/cjs/index.js +11 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +11 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/cjs/meta.js +11 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +11 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +11 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1 -1
- package/build/es/meta.mjs +11 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +11 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +11 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +1 -1
- package/build/internal/cjs/meta.js +11 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +11 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +11 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +1 -1
- package/build/internal/es/meta.mjs +11 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/index.js
CHANGED
|
@@ -121,12 +121,20 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
|
|
|
121
121
|
{
|
|
122
122
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
123
123
|
destPath: "/v2/suggest-domains"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
127
|
+
destPath: "/v2/check-domain-availability"
|
|
124
128
|
}
|
|
125
129
|
],
|
|
126
130
|
_: [
|
|
127
131
|
{
|
|
128
132
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
129
133
|
destPath: "/v2/suggest-domains"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
137
|
+
destPath: "/v2/check-domain-availability"
|
|
130
138
|
}
|
|
131
139
|
]
|
|
132
140
|
};
|
|
@@ -140,6 +148,9 @@ function suggestDomains(payload) {
|
|
|
140
148
|
method: "GET",
|
|
141
149
|
methodFqn: "com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains",
|
|
142
150
|
packageName: PACKAGE_NAME,
|
|
151
|
+
migrationOptions: {
|
|
152
|
+
optInTransformResponse: true
|
|
153
|
+
},
|
|
143
154
|
url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(
|
|
144
155
|
{ protoPath: "/v2/suggest-domains", data: payload, host }
|
|
145
156
|
),
|
package/build/cjs/index.js.map
CHANGED
|
@@ -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\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `20`\n * @min 1\n * @max 20\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\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 4\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","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 _: [\n {\n srcPath: '/premium/domains/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 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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SuggestDomainsOptions,\n SuggestDomainsResponse,\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 4\n >\n >;\n}\n\nexport {\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DomainSuggestion,\n SuggestDomainsOptions,\n SuggestDomainsRequest,\n SuggestDomainsResponse,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n","import { suggestDomains as publicSuggestDomains } 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\nexport {\n DomainSuggestion,\n SuggestDomainsRequest,\n CursorPaging,\n SuggestDomainsResponse,\n CursorPagingMetadata,\n Cursors,\n SuggestDomainsOptions,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;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,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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;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ADCA,eAAsBC,gBACpB,OACA,SASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,MAAM,SAAS;AAAA,IACf,OAAO,SAAS;AAAA,IAChB,QAAQ,SAAS;AAAA,IACjB,WAAW,SAAS;AAAA,EACtB,CAAC;AAED,QAAM,UACoC,eAAe,OAAO;AAEhE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE1LO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,OAAe,YACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AClBA,IAAAC,uBAAiC;AAG1B,IAAMC,kBAEK,2DAAiBA,eAAoB;","names":["suggestDomains","import_rest_modules","suggestDomains","sdkTransformError","suggestDomains","import_rest_modules","suggestDomains"]}
|
|
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\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `20`\n * @min 1\n * @max 20\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\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 4\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","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 };\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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SuggestDomainsOptions,\n SuggestDomainsResponse,\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 4\n >\n >;\n}\n\nexport {\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DomainSuggestion,\n SuggestDomainsOptions,\n SuggestDomainsRequest,\n SuggestDomainsResponse,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n","import { suggestDomains as publicSuggestDomains } 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\nexport {\n DomainSuggestion,\n SuggestDomainsRequest,\n CursorPaging,\n SuggestDomainsResponse,\n CursorPagingMetadata,\n Cursors,\n SuggestDomainsOptions,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA;AAAA;;;ACAA,6BAAoD;AAC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EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE1LO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,OAAe,YACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AClBA,IAAAC,uBAAiC;AAG1B,IAAMC,kBAEK,2DAAiBA,eAAoB;","names":["suggestDomains","import_rest_modules","suggestDomains","sdkTransformError","suggestDomains","import_rest_modules","suggestDomains"]}
|
|
@@ -121,12 +121,20 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
|
|
|
121
121
|
{
|
|
122
122
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
123
123
|
destPath: "/v2/suggest-domains"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
127
|
+
destPath: "/v2/check-domain-availability"
|
|
124
128
|
}
|
|
125
129
|
],
|
|
126
130
|
_: [
|
|
127
131
|
{
|
|
128
132
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
129
133
|
destPath: "/v2/suggest-domains"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
137
|
+
destPath: "/v2/check-domain-availability"
|
|
130
138
|
}
|
|
131
139
|
]
|
|
132
140
|
};
|
|
@@ -140,6 +148,9 @@ function suggestDomains(payload) {
|
|
|
140
148
|
method: "GET",
|
|
141
149
|
methodFqn: "com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains",
|
|
142
150
|
packageName: PACKAGE_NAME,
|
|
151
|
+
migrationOptions: {
|
|
152
|
+
optInTransformResponse: true
|
|
153
|
+
},
|
|
143
154
|
url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(
|
|
144
155
|
{ protoPath: "/v2/suggest-domains", data: payload, host }
|
|
145
156
|
),
|
|
@@ -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\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `20`\n * @min 1\n * @max 20\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\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 4\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","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 _: [\n {\n srcPath: '/premium/domains/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 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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;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,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;AAAA,QACE,SAAS;AAAA,QACT,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AS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["suggestDomains","import_rest_modules","suggestDomains","sdkTransformError"]}
|
|
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\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `20`\n * @min 1\n * @max 20\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\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 4\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","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 };\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;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,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,SA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;ADVA,eAAsBC,gBACpB,OACA,SASA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,MAAM,SAAS;AAAA,IACf,OAAO,SAAS;AAAA,IAChB,QAAQ,SAAS;AAAA,IACjB,WAAW,SAAS;AAAA,EACtB,CAAC;AAED,QAAM,UACoC,eAAe,OAAO;AAEhE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["suggestDomains","import_rest_modules","suggestDomains","sdkTransformError"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -122,4 +122,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
122
122
|
};
|
|
123
123
|
declare function suggestDomains(): __PublicMethodMetaInfo<'GET', {}, SuggestDomainsRequest$1, SuggestDomainsRequest, SuggestDomainsResponse$1, SuggestDomainsResponse>;
|
|
124
124
|
|
|
125
|
-
export { type __PublicMethodMetaInfo, suggestDomains };
|
|
125
|
+
export { type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DomainSuggestion as DomainSuggestionOriginal, type SuggestDomainsRequest as SuggestDomainsRequestOriginal, type SuggestDomainsResponse as SuggestDomainsResponseOriginal, type __PublicMethodMetaInfo, suggestDomains };
|
package/build/cjs/meta.js
CHANGED
|
@@ -117,12 +117,20 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
|
|
|
117
117
|
{
|
|
118
118
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
119
119
|
destPath: "/v2/suggest-domains"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
123
|
+
destPath: "/v2/check-domain-availability"
|
|
120
124
|
}
|
|
121
125
|
],
|
|
122
126
|
_: [
|
|
123
127
|
{
|
|
124
128
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
125
129
|
destPath: "/v2/suggest-domains"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
133
|
+
destPath: "/v2/check-domain-availability"
|
|
126
134
|
}
|
|
127
135
|
]
|
|
128
136
|
};
|
|
@@ -136,6 +144,9 @@ function suggestDomains(payload) {
|
|
|
136
144
|
method: "GET",
|
|
137
145
|
methodFqn: "com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains",
|
|
138
146
|
packageName: PACKAGE_NAME,
|
|
147
|
+
migrationOptions: {
|
|
148
|
+
optInTransformResponse: true
|
|
149
|
+
},
|
|
139
150
|
url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(
|
|
140
151
|
{ protoPath: "/v2/suggest-domains", data: payload, host }
|
|
141
152
|
),
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -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 _: [\n {\n srcPath: '/premium/domains/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 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","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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;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,QAC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EACT;AAEA,SAAO;AACT;;;
|
|
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 };\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","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 {\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} from './premium-domains-v2-suggestion-domain-suggestions.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA;AAAA;;;ACAA,0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A,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAWd,SAAS,eAAe,SAA6C;AAC1E,WAAS,iBAAiB,EAAE,KAAK,GAAQ;AACvC,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,uBAAuB,MAAM,SAAS,KAAK;AAAA,MAC1D;AAAA,MACA,YAAQ,uCAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AChIO,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;","names":["suggestDomains","import_rest_modules","suggestDomains"]}
|
package/build/es/index.mjs
CHANGED
|
@@ -98,12 +98,20 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
|
|
|
98
98
|
{
|
|
99
99
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
100
100
|
destPath: "/v2/suggest-domains"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
104
|
+
destPath: "/v2/check-domain-availability"
|
|
101
105
|
}
|
|
102
106
|
],
|
|
103
107
|
_: [
|
|
104
108
|
{
|
|
105
109
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
106
110
|
destPath: "/v2/suggest-domains"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
114
|
+
destPath: "/v2/check-domain-availability"
|
|
107
115
|
}
|
|
108
116
|
]
|
|
109
117
|
};
|
|
@@ -117,6 +125,9 @@ function suggestDomains(payload) {
|
|
|
117
125
|
method: "GET",
|
|
118
126
|
methodFqn: "com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains",
|
|
119
127
|
packageName: PACKAGE_NAME,
|
|
128
|
+
migrationOptions: {
|
|
129
|
+
optInTransformResponse: true
|
|
130
|
+
},
|
|
120
131
|
url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(
|
|
121
132
|
{ protoPath: "/v2/suggest-domains", data: payload, host }
|
|
122
133
|
),
|
package/build/es/index.mjs.map
CHANGED
|
@@ -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\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `20`\n * @min 1\n * @max 20\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\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 4\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","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 _: [\n {\n srcPath: '/premium/domains/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 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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SuggestDomainsOptions,\n SuggestDomainsResponse,\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 4\n >\n >;\n}\n\nexport {\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DomainSuggestion,\n SuggestDomainsOptions,\n SuggestDomainsRequest,\n SuggestDomainsResponse,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n","import { suggestDomains as publicSuggestDomains } 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\nexport {\n DomainSuggestion,\n SuggestDomainsRequest,\n CursorPaging,\n SuggestDomainsResponse,\n CursorPagingMetadata,\n Cursors,\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;A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estDomains","suggestDomains","suggestDomains"]}
|
|
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\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `20`\n * @min 1\n * @max 20\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\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 4\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","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 };\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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n SuggestDomainsOptions,\n SuggestDomainsResponse,\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 4\n >\n >;\n}\n\nexport {\n CursorPaging,\n CursorPagingMetadata,\n Cursors,\n DomainSuggestion,\n SuggestDomainsOptions,\n SuggestDomainsRequest,\n SuggestDomainsResponse,\n} from './premium-domains-v2-suggestion-domain-suggestions.universal.js';\n","import { suggestDomains as publicSuggestDomains } 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\nexport {\n DomainSuggestion,\n SuggestDomainsRequest,\n CursorPaging,\n SuggestDomainsResponse,\n CursorPagingMetadata,\n Cursors,\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,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;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MAC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,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;AAAA,UACxB,OAAO;AAAA,UACP,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AE1LO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,OAAe,YACrBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AClBA,SAAS,wBAAwB;AAG1B,IAAMC,kBAEK,iCAAiBA,eAAoB;","names":["suggestDomains","suggestDomains","suggestDomains"]}
|
|
@@ -98,12 +98,20 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
|
|
|
98
98
|
{
|
|
99
99
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
100
100
|
destPath: "/v2/suggest-domains"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
104
|
+
destPath: "/v2/check-domain-availability"
|
|
101
105
|
}
|
|
102
106
|
],
|
|
103
107
|
_: [
|
|
104
108
|
{
|
|
105
109
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
106
110
|
destPath: "/v2/suggest-domains"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
114
|
+
destPath: "/v2/check-domain-availability"
|
|
107
115
|
}
|
|
108
116
|
]
|
|
109
117
|
};
|
|
@@ -117,6 +125,9 @@ function suggestDomains(payload) {
|
|
|
117
125
|
method: "GET",
|
|
118
126
|
methodFqn: "com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains",
|
|
119
127
|
packageName: PACKAGE_NAME,
|
|
128
|
+
migrationOptions: {
|
|
129
|
+
optInTransformResponse: true
|
|
130
|
+
},
|
|
120
131
|
url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(
|
|
121
132
|
{ protoPath: "/v2/suggest-domains", data: payload, host }
|
|
122
133
|
),
|
|
@@ -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\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `20`\n * @min 1\n * @max 20\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\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 4\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","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 _: [\n {\n srcPath: '/premium/domains/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 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"],"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;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;AAAA,QACE,SAAS;AAA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5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,OAAO;AAAA,UACP,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["suggestDomains"]}
|
|
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\nexport interface CursorPaging {\n /**\n * Maximum number of domains to return in the results.\n *\n * Min: `0`\n * Max: `20`\n * @min 1\n * @max 20\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\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 4\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","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 };\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"],"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;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UA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C;AAAA,IACpD;AAAA,IACA,MAAM,SAAS;AAAA,IACf,OAAO,SAAS;AAAA,IAChB,QAAQ,SAAS;AAAA,IACjB,WAAW,SAAS;AAAA,EACtB,CAAC;AAED,QAAM,UACoC,eAAe,OAAO;AAEhE,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;AAAA,UACxB,OAAO;AAAA,UACP,MAAM;AAAA,UACN,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,WAAW;AAAA,QACb;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["suggestDomains"]}
|
package/build/es/meta.d.mts
CHANGED
|
@@ -122,4 +122,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
122
122
|
};
|
|
123
123
|
declare function suggestDomains(): __PublicMethodMetaInfo<'GET', {}, SuggestDomainsRequest$1, SuggestDomainsRequest, SuggestDomainsResponse$1, SuggestDomainsResponse>;
|
|
124
124
|
|
|
125
|
-
export { type __PublicMethodMetaInfo, suggestDomains };
|
|
125
|
+
export { type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DomainSuggestion as DomainSuggestionOriginal, type SuggestDomainsRequest as SuggestDomainsRequestOriginal, type SuggestDomainsResponse as SuggestDomainsResponseOriginal, type __PublicMethodMetaInfo, suggestDomains };
|
package/build/es/meta.mjs
CHANGED
|
@@ -91,12 +91,20 @@ function resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(op
|
|
|
91
91
|
{
|
|
92
92
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
93
93
|
destPath: "/v2/suggest-domains"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
97
|
+
destPath: "/v2/check-domain-availability"
|
|
94
98
|
}
|
|
95
99
|
],
|
|
96
100
|
_: [
|
|
97
101
|
{
|
|
98
102
|
srcPath: "/premium/domains/v2/suggest-domains",
|
|
99
103
|
destPath: "/v2/suggest-domains"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
srcPath: "/premium/domains/v2/check-domain-availability",
|
|
107
|
+
destPath: "/v2/check-domain-availability"
|
|
100
108
|
}
|
|
101
109
|
]
|
|
102
110
|
};
|
|
@@ -110,6 +118,9 @@ function suggestDomains(payload) {
|
|
|
110
118
|
method: "GET",
|
|
111
119
|
methodFqn: "com.wixpress.premium.domain.search.suggest.v2.DomainSearchService.SuggestDomains",
|
|
112
120
|
packageName: PACKAGE_NAME,
|
|
121
|
+
migrationOptions: {
|
|
122
|
+
optInTransformResponse: true
|
|
123
|
+
},
|
|
113
124
|
url: resolveComWixpressPremiumDomainSearchSuggestV2DomainSearchServiceUrl(
|
|
114
125
|
{ protoPath: "/v2/suggest-domains", data: payload, host }
|
|
115
126
|
),
|