@wix/auto_sdk_seo_robots-txt 1.0.6 → 1.0.8
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 +6 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +6 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +137 -1
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +6 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +6 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +137 -1
- package/build/es/meta.mjs +17 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js +6 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +6 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +137 -1
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs +6 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +6 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +137 -1
- package/build/internal/es/meta.mjs +17 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/index.js
CHANGED
|
@@ -145,6 +145,9 @@ function getRobotsTxt(payload) {
|
|
|
145
145
|
method: "GET",
|
|
146
146
|
methodFqn: "com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt",
|
|
147
147
|
packageName: PACKAGE_NAME,
|
|
148
|
+
migrationOptions: {
|
|
149
|
+
optInTransformResponse: true
|
|
150
|
+
},
|
|
148
151
|
url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({
|
|
149
152
|
protoPath: "/v2/robots",
|
|
150
153
|
data: payload,
|
|
@@ -163,6 +166,9 @@ function updateRobotsTxt(payload) {
|
|
|
163
166
|
method: "PUT",
|
|
164
167
|
methodFqn: "com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt",
|
|
165
168
|
packageName: PACKAGE_NAME,
|
|
169
|
+
migrationOptions: {
|
|
170
|
+
optInTransformResponse: true
|
|
171
|
+
},
|
|
166
172
|
url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({
|
|
167
173
|
protoPath: "/v2/robots",
|
|
168
174
|
data: payload,
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/promote-seo-v2-robots-txt-robots-txt.public.ts","../../src/promote-seo-v2-robots-txt-robots-txt.universal.ts","../../src/promote-seo-v2-robots-txt-robots-txt.http.ts","../../src/promote-seo-v2-robots-txt-robots-txt.context.ts"],"sourcesContent":["export * from './src/promote-seo-v2-robots-txt-robots-txt.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetRobotsTxtOptions,\n GetRobotsTxtResponse,\n RobotsTxtUpdatedEnvelope,\n UpdateRobotsTxtOptions,\n UpdateRobotsTxtResponse,\n getRobotsTxt as universalGetRobotsTxt,\n updateRobotsTxt as universalUpdateRobotsTxt,\n} from './promote-seo-v2-robots-txt-robots-txt.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/seo' };\n\nexport function getRobotsTxt(httpClient: HttpClient): GetRobotsTxtSignature {\n return (options?: GetRobotsTxtOptions) =>\n universalGetRobotsTxt(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetRobotsTxtSignature {\n /**\n * Retrieves the `robots.txt` file entity.\n * @returns The response of the Robots.txt file request\n */\n (options?: GetRobotsTxtOptions): Promise<\n NonNullablePaths<\n GetRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n >;\n}\n\nexport function updateRobotsTxt(\n httpClient: HttpClient\n): UpdateRobotsTxtSignature {\n return (options?: UpdateRobotsTxtOptions) =>\n universalUpdateRobotsTxt(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateRobotsTxtSignature {\n /**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n */\n (options?: UpdateRobotsTxtOptions): Promise<\n NonNullablePaths<\n UpdateRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n >;\n}\n\nexport const onRobotsTxtUpdated = EventDefinition(\n 'wix.promote.seo.robots_txt_updated',\n true,\n (event: RobotsTxtUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<RobotsTxtUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetRobotsTxtOptions,\n GetRobotsTxtRequest,\n GetRobotsTxtResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n RestoreInfo,\n RobotsTxt,\n RobotsTxtUpdatedEnvelope,\n UpdateRobotsTxtOptions,\n UpdateRobotsTxtRequest,\n UpdateRobotsTxtResponse,\n WebhookIdentityType,\n} from './promote-seo-v2-robots-txt-robots-txt.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 ambassadorWixPromoteSeoV2RobotsTxt from './promote-seo-v2-robots-txt-robots-txt.http.js';\n\n/** Represents a `robots.txt` file entity that controls web crawler access to a website or subdomain. It defines crawling rules and directives for search engines and other automated agents, ensuring proper indexing behavior and preventing unauthorized access to specific site areas. */\nexport interface RobotsTxt {\n /**\n * Full text content of the `robots.txt` file.\n * @maxLength 720000\n */\n content?: string;\n /** Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file). */\n default?: boolean;\n /**\n * If applicable, target subdomain for the `robots.txt` file. For example, a site can have multiple subdomains like `www.example.com`, `es.example.com`, `fr.example.com`. Each subdomain can have its own `robots.txt` file with different rules. Default: 'www'\n * @maxLength 63\n */\n subdomain?: string;\n}\n\n/** The request to get the Robots.txt file content */\nexport interface GetRobotsTxtRequest {\n /** Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`. */\n subdomain?: string;\n}\n\n/** The response of the Robots.txt file request */\nexport interface GetRobotsTxtResponse {\n /** Retrieved `robots.txt` file entity. */\n robotsTxt?: RobotsTxt;\n}\n\n/** The request to update the content of the Robots.txt file */\nexport interface UpdateRobotsTxtRequest {\n /** `robots.txt` file to update. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface UpdateRobotsTxtResponse {\n /** Updated `robots.txt` file. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface RobotsTxtUpdatedEnvelope {\n entity: RobotsTxt;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when the `robots.txt` file entity is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope View SEO Settings\n * @permissionScopeId SCOPE.PROMOTE.VIEW-SEO\n * @permissionId wix-seo.read\n * @webhook\n * @eventType wix.promote.seo.robots_txt_updated\n * @serviceIdentifier com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onRobotsTxtUpdated(\n handler: (event: RobotsTxtUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the `robots.txt` file entity.\n * @public\n * @documentationMaturity preview\n * @permissionId wix-seo.read\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @returns The response of the Robots.txt file request\n * @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt\n */\nexport async function getRobotsTxt(\n options?: GetRobotsTxtOptions\n): Promise<\n NonNullablePaths<\n GetRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subdomain: options?.subdomain,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV2RobotsTxt.getRobotsTxt(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: { subdomain: '$[0].subdomain' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetRobotsTxtOptions {\n /** Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`. */\n subdomain?: string;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n * @public\n * @documentationMaturity preview\n * @permissionId wix-seo.edit\n * @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt\n */\nexport async function updateRobotsTxt(\n options?: UpdateRobotsTxtOptions\n): Promise<\n NonNullablePaths<\n UpdateRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n robotsTxt: options?.robotsTxt,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV2RobotsTxt.updateRobotsTxt(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: { robotsTxt: '$[0].robotsTxt' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateRobotsTxtOptions {\n /** `robots.txt` file to update. */\n robotsTxt?: RobotsTxt;\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 resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/promote-seo-robots-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n _: [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_robots-txt';\n\n/** Retrieves the `robots.txt` file entity. */\nexport function getRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __getRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getRobotsTxt;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n */\nexport function updateRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __updateRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateRobotsTxt;\n}\n","import {\n getRobotsTxt as publicGetRobotsTxt,\n updateRobotsTxt as publicUpdateRobotsTxt,\n} from './promote-seo-v2-robots-txt-robots-txt.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onRobotsTxtUpdated as publicOnRobotsTxtUpdated } from './promote-seo-v2-robots-txt-robots-txt.public.js';\n\nexport const getRobotsTxt: MaybeContext<\n BuildRESTFunction<typeof publicGetRobotsTxt> & typeof publicGetRobotsTxt\n> = /*#__PURE__*/ createRESTModule(publicGetRobotsTxt);\nexport const updateRobotsTxt: MaybeContext<\n BuildRESTFunction<typeof publicUpdateRobotsTxt> & typeof publicUpdateRobotsTxt\n> = /*#__PURE__*/ createRESTModule(publicUpdateRobotsTxt);\n/**\n * Triggered when the `robots.txt` file entity is updated.\n */\nexport const onRobotsTxtUpdated: BuildEventDefinition<\n typeof publicOnRobotsTxtUpdated\n> &\n typeof publicOnRobotsTxtUpdated = createEventModule(publicOnRobotsTxtUpdated);\n\nexport { WebhookIdentityType } from './promote-seo-v2-robots-txt-robots-txt.universal.js';\nexport {\n RobotsTxt,\n GetRobotsTxtRequest,\n GetRobotsTxtResponse,\n UpdateRobotsTxtRequest,\n UpdateRobotsTxtResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n RobotsTxtUpdatedEnvelope,\n GetRobotsTxtOptions,\n UpdateRobotsTxtOptions,\n} from './promote-seo-v2-robots-txt-robots-txt.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './promote-seo-v2-robots-txt-robots-txt.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,sBAAAA;AAAA,EAAA,0BAAAC;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAAqD;AACrD,6BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAA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AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;ADzWO,SAASE,cAAa,YAA+C;AAC1E,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAgBO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,IAAM,yBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,uCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA4B;;;AG3E5B,IAAAC,uBAAiC;AACjC,sCAAkC;AAQ3B,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AAIjD,IAAMC,0BAGuB,mDAAkB,kBAAwB;","names":["getRobotsTxt","onRobotsTxtUpdated","updateRobotsTxt","import_rename_all_nested_keys","import_rest_modules","WebhookIdentityType","getRobotsTxt","sdkTransformError","updateRobotsTxt","getRobotsTxt","updateRobotsTxt","import_rest_modules","getRobotsTxt","updateRobotsTxt","onRobotsTxtUpdated"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/promote-seo-v2-robots-txt-robots-txt.public.ts","../../src/promote-seo-v2-robots-txt-robots-txt.universal.ts","../../src/promote-seo-v2-robots-txt-robots-txt.http.ts","../../src/promote-seo-v2-robots-txt-robots-txt.context.ts"],"sourcesContent":["export * from './src/promote-seo-v2-robots-txt-robots-txt.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n GetRobotsTxtOptions,\n GetRobotsTxtResponse,\n RobotsTxtUpdatedEnvelope,\n UpdateRobotsTxtOptions,\n UpdateRobotsTxtResponse,\n getRobotsTxt as universalGetRobotsTxt,\n updateRobotsTxt as universalUpdateRobotsTxt,\n} from './promote-seo-v2-robots-txt-robots-txt.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/seo' };\n\nexport function getRobotsTxt(httpClient: HttpClient): GetRobotsTxtSignature {\n return (options?: GetRobotsTxtOptions) =>\n universalGetRobotsTxt(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetRobotsTxtSignature {\n /**\n * Retrieves the `robots.txt` file entity.\n * @returns The response of the Robots.txt file request\n */\n (options?: GetRobotsTxtOptions): Promise<\n NonNullablePaths<\n GetRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n >;\n}\n\nexport function updateRobotsTxt(\n httpClient: HttpClient\n): UpdateRobotsTxtSignature {\n return (options?: UpdateRobotsTxtOptions) =>\n universalUpdateRobotsTxt(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateRobotsTxtSignature {\n /**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n */\n (options?: UpdateRobotsTxtOptions): Promise<\n NonNullablePaths<\n UpdateRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n >;\n}\n\nexport const onRobotsTxtUpdated = EventDefinition(\n 'wix.promote.seo.robots_txt_updated',\n true,\n (event: RobotsTxtUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<RobotsTxtUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetRobotsTxtOptions,\n GetRobotsTxtRequest,\n GetRobotsTxtResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n RestoreInfo,\n RobotsTxt,\n RobotsTxtUpdatedEnvelope,\n UpdateRobotsTxtOptions,\n UpdateRobotsTxtRequest,\n UpdateRobotsTxtResponse,\n WebhookIdentityType,\n} from './promote-seo-v2-robots-txt-robots-txt.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 ambassadorWixPromoteSeoV2RobotsTxt from './promote-seo-v2-robots-txt-robots-txt.http.js';\n\n/** Represents a `robots.txt` file entity that controls web crawler access to a website or subdomain. It defines crawling rules and directives for search engines and other automated agents, ensuring proper indexing behavior and preventing unauthorized access to specific site areas. */\nexport interface RobotsTxt {\n /**\n * Full text content of the `robots.txt` file.\n * @maxLength 720000\n */\n content?: string;\n /** Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file). */\n default?: boolean;\n /**\n * If applicable, target subdomain for the `robots.txt` file. For example, a site can have multiple subdomains like `www.example.com`, `es.example.com`, `fr.example.com`. Each subdomain can have its own `robots.txt` file with different rules. Default: 'www'\n * @maxLength 63\n */\n subdomain?: string;\n}\n\n/** The request to get the Robots.txt file content */\nexport interface GetRobotsTxtRequest {\n /** Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`. */\n subdomain?: string;\n}\n\n/** The response of the Robots.txt file request */\nexport interface GetRobotsTxtResponse {\n /** Retrieved `robots.txt` file entity. */\n robotsTxt?: RobotsTxt;\n}\n\n/** The request to update the content of the Robots.txt file */\nexport interface UpdateRobotsTxtRequest {\n /** `robots.txt` file to update. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface UpdateRobotsTxtResponse {\n /** Updated `robots.txt` file. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface RobotsTxtUpdatedEnvelope {\n entity: RobotsTxt;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when the `robots.txt` file entity is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope View SEO Settings\n * @permissionScopeId SCOPE.PROMOTE.VIEW-SEO\n * @permissionId wix-seo.read\n * @webhook\n * @eventType wix.promote.seo.robots_txt_updated\n * @serviceIdentifier com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onRobotsTxtUpdated(\n handler: (event: RobotsTxtUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the `robots.txt` file entity.\n * @public\n * @documentationMaturity preview\n * @permissionId wix-seo.read\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @returns The response of the Robots.txt file request\n * @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt\n */\nexport async function getRobotsTxt(\n options?: GetRobotsTxtOptions\n): Promise<\n NonNullablePaths<\n GetRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subdomain: options?.subdomain,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV2RobotsTxt.getRobotsTxt(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: { subdomain: '$[0].subdomain' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetRobotsTxtOptions {\n /** Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`. */\n subdomain?: string;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n * @public\n * @documentationMaturity preview\n * @permissionId wix-seo.edit\n * @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt\n */\nexport async function updateRobotsTxt(\n options?: UpdateRobotsTxtOptions\n): Promise<\n NonNullablePaths<\n UpdateRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n robotsTxt: options?.robotsTxt,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV2RobotsTxt.updateRobotsTxt(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: { robotsTxt: '$[0].robotsTxt' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateRobotsTxtOptions {\n /** `robots.txt` file to update. */\n robotsTxt?: RobotsTxt;\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 resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/promote-seo-robots-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n _: [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_robots-txt';\n\n/** Retrieves the `robots.txt` file entity. */\nexport function getRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __getRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getRobotsTxt;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n */\nexport function updateRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __updateRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateRobotsTxt;\n}\n","import {\n getRobotsTxt as publicGetRobotsTxt,\n updateRobotsTxt as publicUpdateRobotsTxt,\n} from './promote-seo-v2-robots-txt-robots-txt.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onRobotsTxtUpdated as publicOnRobotsTxtUpdated } from './promote-seo-v2-robots-txt-robots-txt.public.js';\n\nexport const getRobotsTxt: MaybeContext<\n BuildRESTFunction<typeof publicGetRobotsTxt> & typeof publicGetRobotsTxt\n> = /*#__PURE__*/ createRESTModule(publicGetRobotsTxt);\nexport const updateRobotsTxt: MaybeContext<\n BuildRESTFunction<typeof publicUpdateRobotsTxt> & typeof publicUpdateRobotsTxt\n> = /*#__PURE__*/ createRESTModule(publicUpdateRobotsTxt);\n/**\n * Triggered when the `robots.txt` file entity is updated.\n */\nexport const onRobotsTxtUpdated: BuildEventDefinition<\n typeof publicOnRobotsTxtUpdated\n> &\n typeof publicOnRobotsTxtUpdated = createEventModule(publicOnRobotsTxtUpdated);\n\nexport { WebhookIdentityType } from './promote-seo-v2-robots-txt-robots-txt.universal.js';\nexport {\n RobotsTxt,\n GetRobotsTxtRequest,\n GetRobotsTxtResponse,\n UpdateRobotsTxtRequest,\n UpdateRobotsTxtResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n RobotsTxtUpdatedEnvelope,\n GetRobotsTxtOptions,\n UpdateRobotsTxtOptions,\n} from './promote-seo-v2-robots-txt-robots-txt.universal.js';\nexport { WebhookIdentityTypeWithLiterals } from './promote-seo-v2-robots-txt-robots-txt.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,sBAAAA;AAAA,EAAA,0BAAAC;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAAqD;AACrD,6BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ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,IAAMC,mBAEK,2DAAiBA,gBAAqB;AAIjD,IAAMC,0BAGuB,mDAAkB,kBAAwB;","names":["getRobotsTxt","onRobotsTxtUpdated","updateRobotsTxt","import_rename_all_nested_keys","import_rest_modules","WebhookIdentityType","getRobotsTxt","sdkTransformError","updateRobotsTxt","getRobotsTxt","updateRobotsTxt","import_rest_modules","getRobotsTxt","updateRobotsTxt","onRobotsTxtUpdated"]}
|
|
@@ -138,6 +138,9 @@ function getRobotsTxt(payload) {
|
|
|
138
138
|
method: "GET",
|
|
139
139
|
methodFqn: "com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt",
|
|
140
140
|
packageName: PACKAGE_NAME,
|
|
141
|
+
migrationOptions: {
|
|
142
|
+
optInTransformResponse: true
|
|
143
|
+
},
|
|
141
144
|
url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({
|
|
142
145
|
protoPath: "/v2/robots",
|
|
143
146
|
data: payload,
|
|
@@ -156,6 +159,9 @@ function updateRobotsTxt(payload) {
|
|
|
156
159
|
method: "PUT",
|
|
157
160
|
methodFqn: "com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt",
|
|
158
161
|
packageName: PACKAGE_NAME,
|
|
162
|
+
migrationOptions: {
|
|
163
|
+
optInTransformResponse: true
|
|
164
|
+
},
|
|
159
165
|
url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({
|
|
160
166
|
protoPath: "/v2/robots",
|
|
161
167
|
data: payload,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/promote-seo-v2-robots-txt-robots-txt.universal.ts","../../src/promote-seo-v2-robots-txt-robots-txt.http.ts"],"sourcesContent":["export * from './src/promote-seo-v2-robots-txt-robots-txt.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 ambassadorWixPromoteSeoV2RobotsTxt from './promote-seo-v2-robots-txt-robots-txt.http.js';\n\n/** Represents a `robots.txt` file entity that controls web crawler access to a website or subdomain. It defines crawling rules and directives for search engines and other automated agents, ensuring proper indexing behavior and preventing unauthorized access to specific site areas. */\nexport interface RobotsTxt {\n /**\n * Full text content of the `robots.txt` file.\n * @maxLength 720000\n */\n content?: string;\n /** Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file). */\n default?: boolean;\n /**\n * If applicable, target subdomain for the `robots.txt` file. For example, a site can have multiple subdomains like `www.example.com`, `es.example.com`, `fr.example.com`. Each subdomain can have its own `robots.txt` file with different rules. Default: 'www'\n * @maxLength 63\n */\n subdomain?: string;\n}\n\n/** The request to get the Robots.txt file content */\nexport interface GetRobotsTxtRequest {\n /** Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`. */\n subdomain?: string;\n}\n\n/** The response of the Robots.txt file request */\nexport interface GetRobotsTxtResponse {\n /** Retrieved `robots.txt` file entity. */\n robotsTxt?: RobotsTxt;\n}\n\n/** The request to update the content of the Robots.txt file */\nexport interface UpdateRobotsTxtRequest {\n /** `robots.txt` file to update. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface UpdateRobotsTxtResponse {\n /** Updated `robots.txt` file. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface RobotsTxtUpdatedEnvelope {\n entity: RobotsTxt;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when the `robots.txt` file entity is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope View SEO Settings\n * @permissionScopeId SCOPE.PROMOTE.VIEW-SEO\n * @permissionId wix-seo.read\n * @webhook\n * @eventType wix.promote.seo.robots_txt_updated\n * @serviceIdentifier com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onRobotsTxtUpdated(\n handler: (event: RobotsTxtUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the `robots.txt` file entity.\n * @public\n * @documentationMaturity preview\n * @permissionId wix-seo.read\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @returns The response of the Robots.txt file request\n * @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt\n */\nexport async function getRobotsTxt(\n options?: GetRobotsTxtOptions\n): Promise<\n NonNullablePaths<\n GetRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subdomain: options?.subdomain,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV2RobotsTxt.getRobotsTxt(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: { subdomain: '$[0].subdomain' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetRobotsTxtOptions {\n /** Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`. */\n subdomain?: string;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n * @public\n * @documentationMaturity preview\n * @permissionId wix-seo.edit\n * @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt\n */\nexport async function updateRobotsTxt(\n options?: UpdateRobotsTxtOptions\n): Promise<\n NonNullablePaths<\n UpdateRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n robotsTxt: options?.robotsTxt,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV2RobotsTxt.updateRobotsTxt(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: { robotsTxt: '$[0].robotsTxt' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateRobotsTxtOptions {\n /** `robots.txt` file to update. */\n robotsTxt?: RobotsTxt;\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 resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/promote-seo-robots-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n _: [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_robots-txt';\n\n/** Retrieves the `robots.txt` file entity. */\nexport function getRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __getRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getRobotsTxt;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n */\nexport function updateRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __updateRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateRobotsTxt;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,sBAAAA;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE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_rest_modules","WebhookIdentityType","getRobotsTxt","sdkTransformError","updateRobotsTxt"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/promote-seo-v2-robots-txt-robots-txt.universal.ts","../../src/promote-seo-v2-robots-txt-robots-txt.http.ts"],"sourcesContent":["export * from './src/promote-seo-v2-robots-txt-robots-txt.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 ambassadorWixPromoteSeoV2RobotsTxt from './promote-seo-v2-robots-txt-robots-txt.http.js';\n\n/** Represents a `robots.txt` file entity that controls web crawler access to a website or subdomain. It defines crawling rules and directives for search engines and other automated agents, ensuring proper indexing behavior and preventing unauthorized access to specific site areas. */\nexport interface RobotsTxt {\n /**\n * Full text content of the `robots.txt` file.\n * @maxLength 720000\n */\n content?: string;\n /** Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file). */\n default?: boolean;\n /**\n * If applicable, target subdomain for the `robots.txt` file. For example, a site can have multiple subdomains like `www.example.com`, `es.example.com`, `fr.example.com`. Each subdomain can have its own `robots.txt` file with different rules. Default: 'www'\n * @maxLength 63\n */\n subdomain?: string;\n}\n\n/** The request to get the Robots.txt file content */\nexport interface GetRobotsTxtRequest {\n /** Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`. */\n subdomain?: string;\n}\n\n/** The response of the Robots.txt file request */\nexport interface GetRobotsTxtResponse {\n /** Retrieved `robots.txt` file entity. */\n robotsTxt?: RobotsTxt;\n}\n\n/** The request to update the content of the Robots.txt file */\nexport interface UpdateRobotsTxtRequest {\n /** `robots.txt` file to update. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface UpdateRobotsTxtResponse {\n /** Updated `robots.txt` file. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface RobotsTxtUpdatedEnvelope {\n entity: RobotsTxt;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when the `robots.txt` file entity is updated.\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope View SEO Settings\n * @permissionScopeId SCOPE.PROMOTE.VIEW-SEO\n * @permissionId wix-seo.read\n * @webhook\n * @eventType wix.promote.seo.robots_txt_updated\n * @serviceIdentifier com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onRobotsTxtUpdated(\n handler: (event: RobotsTxtUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves the `robots.txt` file entity.\n * @public\n * @documentationMaturity preview\n * @permissionId wix-seo.read\n * @applicableIdentity APP\n * @applicableIdentity MEMBER\n * @returns The response of the Robots.txt file request\n * @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt\n */\nexport async function getRobotsTxt(\n options?: GetRobotsTxtOptions\n): Promise<\n NonNullablePaths<\n GetRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n subdomain: options?.subdomain,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV2RobotsTxt.getRobotsTxt(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: { subdomain: '$[0].subdomain' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetRobotsTxtOptions {\n /** Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`. */\n subdomain?: string;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n * @public\n * @documentationMaturity preview\n * @permissionId wix-seo.edit\n * @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt\n */\nexport async function updateRobotsTxt(\n options?: UpdateRobotsTxtOptions\n): Promise<\n NonNullablePaths<\n UpdateRobotsTxtResponse,\n `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n robotsTxt: options?.robotsTxt,\n });\n\n const reqOpts = ambassadorWixPromoteSeoV2RobotsTxt.updateRobotsTxt(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: { robotsTxt: '$[0].robotsTxt' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateRobotsTxtOptions {\n /** `robots.txt` file to update. */\n robotsTxt?: RobotsTxt;\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 resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/promote-seo-robots-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n _: [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_robots-txt';\n\n/** Retrieves the `robots.txt` file entity. */\nexport function getRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __getRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getRobotsTxt;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n */\nexport function updateRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __updateRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateRobotsTxt;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,sBAAAA;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AA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,IACpD,WAAW,SAAS;AAAA,EACtB,CAAC;AAED,QAAM,UAA6C,gBAAgB,OAAO;AAE1E,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,uBAAAD;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,WAAW,iBAAiB;AAAA,QACxD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["getRobotsTxt","updateRobotsTxt","import_rest_modules","WebhookIdentityType","getRobotsTxt","sdkTransformError","updateRobotsTxt"]}
|
package/build/cjs/meta.d.ts
CHANGED
|
@@ -35,6 +35,142 @@ interface UpdateRobotsTxtResponse {
|
|
|
35
35
|
/** Updated `robots.txt` file. */
|
|
36
36
|
robotsTxt?: RobotsTxt;
|
|
37
37
|
}
|
|
38
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
39
|
+
createdEvent?: EntityCreatedEvent;
|
|
40
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
41
|
+
deletedEvent?: EntityDeletedEvent;
|
|
42
|
+
actionEvent?: ActionEvent;
|
|
43
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
44
|
+
id?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
47
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
48
|
+
*/
|
|
49
|
+
entityFqdn?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
52
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
53
|
+
*/
|
|
54
|
+
slug?: string;
|
|
55
|
+
/** ID of the entity associated with the event. */
|
|
56
|
+
entityId?: string;
|
|
57
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
58
|
+
eventTime?: Date | null;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
61
|
+
* (for example, GDPR).
|
|
62
|
+
*/
|
|
63
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
64
|
+
/** If present, indicates the action that triggered the event. */
|
|
65
|
+
originatedFrom?: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
|
|
68
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
69
|
+
*/
|
|
70
|
+
entityEventSequence?: string | null;
|
|
71
|
+
}
|
|
72
|
+
/** @oneof */
|
|
73
|
+
interface DomainEventBodyOneOf {
|
|
74
|
+
createdEvent?: EntityCreatedEvent;
|
|
75
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
76
|
+
deletedEvent?: EntityDeletedEvent;
|
|
77
|
+
actionEvent?: ActionEvent;
|
|
78
|
+
}
|
|
79
|
+
interface EntityCreatedEvent {
|
|
80
|
+
entityAsJson?: string;
|
|
81
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
82
|
+
restoreInfo?: RestoreInfo;
|
|
83
|
+
}
|
|
84
|
+
interface RestoreInfo {
|
|
85
|
+
deletedDate?: Date | null;
|
|
86
|
+
}
|
|
87
|
+
interface EntityUpdatedEvent {
|
|
88
|
+
/**
|
|
89
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
90
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
91
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
92
|
+
*/
|
|
93
|
+
currentEntityAsJson?: string;
|
|
94
|
+
}
|
|
95
|
+
interface EntityDeletedEvent {
|
|
96
|
+
/** Entity that was deleted. */
|
|
97
|
+
deletedEntityAsJson?: string | null;
|
|
98
|
+
}
|
|
99
|
+
interface ActionEvent {
|
|
100
|
+
bodyAsJson?: string;
|
|
101
|
+
}
|
|
102
|
+
interface MessageEnvelope {
|
|
103
|
+
/**
|
|
104
|
+
* App instance ID.
|
|
105
|
+
* @format GUID
|
|
106
|
+
*/
|
|
107
|
+
instanceId?: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* Event type.
|
|
110
|
+
* @maxLength 150
|
|
111
|
+
*/
|
|
112
|
+
eventType?: string;
|
|
113
|
+
/** The identification type and identity data. */
|
|
114
|
+
identity?: IdentificationData;
|
|
115
|
+
/** Stringify payload. */
|
|
116
|
+
data?: string;
|
|
117
|
+
}
|
|
118
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
119
|
+
/**
|
|
120
|
+
* ID of a site visitor that has not logged in to the site.
|
|
121
|
+
* @format GUID
|
|
122
|
+
*/
|
|
123
|
+
anonymousVisitorId?: string;
|
|
124
|
+
/**
|
|
125
|
+
* ID of a site visitor that has logged in to the site.
|
|
126
|
+
* @format GUID
|
|
127
|
+
*/
|
|
128
|
+
memberId?: string;
|
|
129
|
+
/**
|
|
130
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
131
|
+
* @format GUID
|
|
132
|
+
*/
|
|
133
|
+
wixUserId?: string;
|
|
134
|
+
/**
|
|
135
|
+
* ID of an app.
|
|
136
|
+
* @format GUID
|
|
137
|
+
*/
|
|
138
|
+
appId?: string;
|
|
139
|
+
/** @readonly */
|
|
140
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
141
|
+
}
|
|
142
|
+
/** @oneof */
|
|
143
|
+
interface IdentificationDataIdOneOf {
|
|
144
|
+
/**
|
|
145
|
+
* ID of a site visitor that has not logged in to the site.
|
|
146
|
+
* @format GUID
|
|
147
|
+
*/
|
|
148
|
+
anonymousVisitorId?: string;
|
|
149
|
+
/**
|
|
150
|
+
* ID of a site visitor that has logged in to the site.
|
|
151
|
+
* @format GUID
|
|
152
|
+
*/
|
|
153
|
+
memberId?: string;
|
|
154
|
+
/**
|
|
155
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
156
|
+
* @format GUID
|
|
157
|
+
*/
|
|
158
|
+
wixUserId?: string;
|
|
159
|
+
/**
|
|
160
|
+
* ID of an app.
|
|
161
|
+
* @format GUID
|
|
162
|
+
*/
|
|
163
|
+
appId?: string;
|
|
164
|
+
}
|
|
165
|
+
declare enum WebhookIdentityType {
|
|
166
|
+
UNKNOWN = "UNKNOWN",
|
|
167
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
168
|
+
MEMBER = "MEMBER",
|
|
169
|
+
WIX_USER = "WIX_USER",
|
|
170
|
+
APP = "APP"
|
|
171
|
+
}
|
|
172
|
+
/** @enumType */
|
|
173
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
38
174
|
|
|
39
175
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
40
176
|
getUrl: (context: any) => string;
|
|
@@ -49,4 +185,4 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
49
185
|
declare function getRobotsTxt(): __PublicMethodMetaInfo<'GET', {}, GetRobotsTxtRequest$1, GetRobotsTxtRequest, GetRobotsTxtResponse$1, GetRobotsTxtResponse>;
|
|
50
186
|
declare function updateRobotsTxt(): __PublicMethodMetaInfo<'PUT', {}, UpdateRobotsTxtRequest$1, UpdateRobotsTxtRequest, UpdateRobotsTxtResponse$1, UpdateRobotsTxtResponse>;
|
|
51
187
|
|
|
52
|
-
export { type __PublicMethodMetaInfo, getRobotsTxt, updateRobotsTxt };
|
|
188
|
+
export { type ActionEvent as ActionEventOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetRobotsTxtRequest as GetRobotsTxtRequestOriginal, type GetRobotsTxtResponse as GetRobotsTxtResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type RestoreInfo as RestoreInfoOriginal, type RobotsTxt as RobotsTxtOriginal, type UpdateRobotsTxtRequest as UpdateRobotsTxtRequestOriginal, type UpdateRobotsTxtResponse as UpdateRobotsTxtResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, getRobotsTxt, updateRobotsTxt };
|
package/build/cjs/meta.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// meta.ts
|
|
21
21
|
var meta_exports = {};
|
|
22
22
|
__export(meta_exports, {
|
|
23
|
+
WebhookIdentityTypeOriginal: () => WebhookIdentityType,
|
|
23
24
|
getRobotsTxt: () => getRobotsTxt2,
|
|
24
25
|
updateRobotsTxt: () => updateRobotsTxt2
|
|
25
26
|
});
|
|
@@ -133,6 +134,9 @@ function getRobotsTxt(payload) {
|
|
|
133
134
|
method: "GET",
|
|
134
135
|
methodFqn: "com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt",
|
|
135
136
|
packageName: PACKAGE_NAME,
|
|
137
|
+
migrationOptions: {
|
|
138
|
+
optInTransformResponse: true
|
|
139
|
+
},
|
|
136
140
|
url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({
|
|
137
141
|
protoPath: "/v2/robots",
|
|
138
142
|
data: payload,
|
|
@@ -151,6 +155,9 @@ function updateRobotsTxt(payload) {
|
|
|
151
155
|
method: "PUT",
|
|
152
156
|
methodFqn: "com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt",
|
|
153
157
|
packageName: PACKAGE_NAME,
|
|
158
|
+
migrationOptions: {
|
|
159
|
+
optInTransformResponse: true
|
|
160
|
+
},
|
|
154
161
|
url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({
|
|
155
162
|
protoPath: "/v2/robots",
|
|
156
163
|
data: payload,
|
|
@@ -163,6 +170,16 @@ function updateRobotsTxt(payload) {
|
|
|
163
170
|
return __updateRobotsTxt;
|
|
164
171
|
}
|
|
165
172
|
|
|
173
|
+
// src/promote-seo-v2-robots-txt-robots-txt.types.ts
|
|
174
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
175
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
176
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
177
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
178
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
179
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
180
|
+
return WebhookIdentityType2;
|
|
181
|
+
})(WebhookIdentityType || {});
|
|
182
|
+
|
|
166
183
|
// src/promote-seo-v2-robots-txt-robots-txt.meta.ts
|
|
167
184
|
function getRobotsTxt2() {
|
|
168
185
|
const payload = {};
|
|
@@ -202,6 +219,7 @@ function updateRobotsTxt2() {
|
|
|
202
219
|
}
|
|
203
220
|
// Annotate the CommonJS export names for ESM import in node:
|
|
204
221
|
0 && (module.exports = {
|
|
222
|
+
WebhookIdentityTypeOriginal,
|
|
205
223
|
getRobotsTxt,
|
|
206
224
|
updateRobotsTxt
|
|
207
225
|
});
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../meta.ts","../../src/promote-seo-v2-robots-txt-robots-txt.http.ts","../../src/promote-seo-v2-robots-txt-robots-txt.meta.ts"],"sourcesContent":["export * from './src/promote-seo-v2-robots-txt-robots-txt.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 resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/promote-seo-robots-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n _: [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_robots-txt';\n\n/** Retrieves the `robots.txt` file entity. */\nexport function getRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __getRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getRobotsTxt;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n */\nexport function updateRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __updateRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateRobotsTxt;\n}\n","import * as ambassadorWixPromoteSeoV2RobotsTxt from './promote-seo-v2-robots-txt-robots-txt.http.js';\nimport * as ambassadorWixPromoteSeoV2RobotsTxtTypes from './promote-seo-v2-robots-txt-robots-txt.types.js';\nimport * as ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes from './promote-seo-v2-robots-txt-robots-txt.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 getRobotsTxt(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes.GetRobotsTxtRequest,\n ambassadorWixPromoteSeoV2RobotsTxtTypes.GetRobotsTxtRequest,\n ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes.GetRobotsTxtResponse,\n ambassadorWixPromoteSeoV2RobotsTxtTypes.GetRobotsTxtResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPromoteSeoV2RobotsTxt.getRobotsTxt(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/robots',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateRobotsTxt(): __PublicMethodMetaInfo<\n 'PUT',\n {},\n ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes.UpdateRobotsTxtRequest,\n ambassadorWixPromoteSeoV2RobotsTxtTypes.UpdateRobotsTxtRequest,\n ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes.UpdateRobotsTxtResponse,\n ambassadorWixPromoteSeoV2RobotsTxtTypes.UpdateRobotsTxtResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPromoteSeoV2RobotsTxt.updateRobotsTxt(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PUT',\n path: '/v2/robots',\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,sBAAAA;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SA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MACF,aAAa;AAAA,MACb,KAAK,6DAA6D;AAAA,QAChE,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACxIO,SAASC,gBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC+B,aAAa,OAAO;AAEzD,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,mBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC+B,gBAAgB,OAAO;AAE5D,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":["getRobotsTxt","updateRobotsTxt","import_rest_modules","getRobotsTxt","updateRobotsTxt"]}
|
|
1
|
+
{"version":3,"sources":["../../meta.ts","../../src/promote-seo-v2-robots-txt-robots-txt.http.ts","../../src/promote-seo-v2-robots-txt-robots-txt.types.ts","../../src/promote-seo-v2-robots-txt-robots-txt.meta.ts"],"sourcesContent":["export * from './src/promote-seo-v2-robots-txt-robots-txt.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 resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/promote-seo-robots-server',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/promote-seo-robots-server',\n destPath: '/api',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/_api/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/promote-seo-robots-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote-seo-txt-file-server/v2/robots',\n destPath: '/v2/robots',\n },\n {\n srcPath: '/promote-seo-robots-server/v2/llms',\n destPath: '/v2/llms',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n _: [\n {\n srcPath: '/promote/marketing/v2/ads',\n destPath: '/v2/ads',\n },\n {\n srcPath: '/promote/seo/v2/llms',\n destPath: '/v2/llms',\n },\n {\n srcPath: '/promote/seo/v2/robots',\n destPath: '/v2/robots',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_seo_robots-txt';\n\n/** Retrieves the `robots.txt` file entity. */\nexport function getRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __getRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getRobotsTxt;\n}\n\n/**\n * Updates the `robots.txt` file entity.\n *\n * The content can be set to an empty string to create a blank file.\n *\n * To restore Wix's default content, set the `default` field to `true` and omit the `content` field.\n */\nexport function updateRobotsTxt(payload: object): RequestOptionsFactory<any> {\n function __updateRobotsTxt({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.promote.seo.v2.robots_txt',\n method: 'PUT' as any,\n methodFqn:\n 'com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({\n protoPath: '/v2/robots',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __updateRobotsTxt;\n}\n","/** Represents a `robots.txt` file entity that controls web crawler access to a website or subdomain. It defines crawling rules and directives for search engines and other automated agents, ensuring proper indexing behavior and preventing unauthorized access to specific site areas. */\nexport interface RobotsTxt {\n /**\n * Full text content of the `robots.txt` file.\n * @maxLength 720000\n */\n content?: string;\n /** Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file). */\n default?: boolean;\n /**\n * If applicable, target subdomain for the `robots.txt` file. For example, a site can have multiple subdomains like `www.example.com`, `es.example.com`, `fr.example.com`. Each subdomain can have its own `robots.txt` file with different rules. Default: 'www'\n * @maxLength 63\n */\n subdomain?: string;\n}\n\n/** The request to get the Robots.txt file content */\nexport interface GetRobotsTxtRequest {\n /** Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`. */\n subdomain?: string;\n}\n\n/** The response of the Robots.txt file request */\nexport interface GetRobotsTxtResponse {\n /** Retrieved `robots.txt` file entity. */\n robotsTxt?: RobotsTxt;\n}\n\n/** The request to update the content of the Robots.txt file */\nexport interface UpdateRobotsTxtRequest {\n /** `robots.txt` file to update. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface UpdateRobotsTxtResponse {\n /** Updated `robots.txt` file. */\n robotsTxt?: RobotsTxt;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n","import * as ambassadorWixPromoteSeoV2RobotsTxt from './promote-seo-v2-robots-txt-robots-txt.http.js';\nimport * as ambassadorWixPromoteSeoV2RobotsTxtTypes from './promote-seo-v2-robots-txt-robots-txt.types.js';\nimport * as ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes from './promote-seo-v2-robots-txt-robots-txt.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 getRobotsTxt(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes.GetRobotsTxtRequest,\n ambassadorWixPromoteSeoV2RobotsTxtTypes.GetRobotsTxtRequest,\n ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes.GetRobotsTxtResponse,\n ambassadorWixPromoteSeoV2RobotsTxtTypes.GetRobotsTxtResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPromoteSeoV2RobotsTxt.getRobotsTxt(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/robots',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateRobotsTxt(): __PublicMethodMetaInfo<\n 'PUT',\n {},\n ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes.UpdateRobotsTxtRequest,\n ambassadorWixPromoteSeoV2RobotsTxtTypes.UpdateRobotsTxtRequest,\n ambassadorWixPromoteSeoV2RobotsTxtUniversalTypes.UpdateRobotsTxtResponse,\n ambassadorWixPromoteSeoV2RobotsTxtTypes.UpdateRobotsTxtResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixPromoteSeoV2RobotsTxt.updateRobotsTxt(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PUT',\n path: '/v2/robots',\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 RobotsTxt as RobotsTxtOriginal,\n GetRobotsTxtRequest as GetRobotsTxtRequestOriginal,\n GetRobotsTxtResponse as GetRobotsTxtResponseOriginal,\n UpdateRobotsTxtRequest as UpdateRobotsTxtRequestOriginal,\n UpdateRobotsTxtResponse as UpdateRobotsTxtResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n} from './promote-seo-v2-robots-txt-robots-txt.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,sBAAAA;AAAA,EAAA,uBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,6DACP,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,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F,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;ACYO,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,uBAAoB;AACpB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,SAAM;AALI,SAAAA;AAAA,GAAA;;;AC1JL,SAASC,gBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC+B,aAAa,OAAO;AAEzD,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,mBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC+B,gBAAgB,OAAO;AAE5D,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":["getRobotsTxt","updateRobotsTxt","import_rest_modules","WebhookIdentityType","getRobotsTxt","updateRobotsTxt"]}
|
package/build/es/index.mjs
CHANGED
|
@@ -119,6 +119,9 @@ function getRobotsTxt(payload) {
|
|
|
119
119
|
method: "GET",
|
|
120
120
|
methodFqn: "com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.GetRobotsTxt",
|
|
121
121
|
packageName: PACKAGE_NAME,
|
|
122
|
+
migrationOptions: {
|
|
123
|
+
optInTransformResponse: true
|
|
124
|
+
},
|
|
122
125
|
url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({
|
|
123
126
|
protoPath: "/v2/robots",
|
|
124
127
|
data: payload,
|
|
@@ -137,6 +140,9 @@ function updateRobotsTxt(payload) {
|
|
|
137
140
|
method: "PUT",
|
|
138
141
|
methodFqn: "com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt",
|
|
139
142
|
packageName: PACKAGE_NAME,
|
|
143
|
+
migrationOptions: {
|
|
144
|
+
optInTransformResponse: true
|
|
145
|
+
},
|
|
140
146
|
url: resolveComWixpressPromoteSeoRobotsServerV2RobotsServiceV2Url({
|
|
141
147
|
protoPath: "/v2/robots",
|
|
142
148
|
data: payload,
|