@wix/auto_sdk_seo_robots-txt 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +3 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/schemas.d.ts +32 -0
- package/build/cjs/schemas.js +91 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +3 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/schemas.d.mts +32 -0
- package/build/es/schemas.mjs +51 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +3 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +32 -0
- package/build/internal/cjs/schemas.js +91 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +3 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +32 -0
- package/build/internal/es/schemas.mjs +51 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +12 -5
- package/schemas/package.json +3 -0
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 AccountInfo,\n AccountInfoMetadata,\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\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 */\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 * @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 * @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 AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\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;AACx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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 AccountInfo,\n AccountInfoMetadata,\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\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 * @permissionScope Manage SEO Settings\n * @permissionScopeId SCOPE.PROMOTE.MANAGE-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 */\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 * @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 * @permissionId wix-seo.edit\n * @applicableIdentity APP\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 AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\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;;;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E,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"]}
|
|
@@ -252,6 +252,8 @@ interface RobotsTxtUpdatedEnvelope {
|
|
|
252
252
|
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
253
253
|
* @permissionScope View SEO Settings
|
|
254
254
|
* @permissionScopeId SCOPE.PROMOTE.VIEW-SEO
|
|
255
|
+
* @permissionScope Manage SEO Settings
|
|
256
|
+
* @permissionScopeId SCOPE.PROMOTE.MANAGE-SEO
|
|
255
257
|
* @permissionId wix-seo.read
|
|
256
258
|
* @webhook
|
|
257
259
|
* @eventType wix.promote.seo.robots_txt_updated
|
|
@@ -281,6 +283,7 @@ interface GetRobotsTxtOptions {
|
|
|
281
283
|
* To restore Wix's default content, set the `default` field to `true` and omit the `content` field.
|
|
282
284
|
* @public
|
|
283
285
|
* @permissionId wix-seo.edit
|
|
286
|
+
* @applicableIdentity APP
|
|
284
287
|
* @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt
|
|
285
288
|
*/
|
|
286
289
|
declare function updateRobotsTxt(options?: UpdateRobotsTxtOptions): Promise<NonNullablePaths<UpdateRobotsTxtResponse, `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`, 3>>;
|
|
@@ -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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\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 */\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 * @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 * @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,6DAC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AU,qEAAsC;AAAA,IACpD,WAAW,SAAS;AAAA,EACtB,CAAC;AAED,QAAM,UAA6C,aAAa,OAAO;AAEvE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,WAAW,iBAAiB;AAAA,QACxD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAiBA,eAAsBC,iBACpB,SAOA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,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"]}
|
|
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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\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 * @permissionScope Manage SEO Settings\n * @permissionScopeId SCOPE.PROMOTE.MANAGE-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 */\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 * @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 * @permissionId wix-seo.edit\n * @applicableIdentity APP\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,QAC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,KAAU;AACjB,UAAM,uBAAmB,uBAAAC;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;AAkBA,eAAsBC,iBACpB,SAOA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,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"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const GetRobotsTxtRequest: z.ZodObject<{
|
|
4
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
declare const GetRobotsTxtResponse: z.ZodObject<{
|
|
9
|
+
robotsTxt: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
content: z.ZodOptional<z.ZodString>;
|
|
11
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
declare const UpdateRobotsTxtRequest: z.ZodObject<{
|
|
16
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
robotsTxt: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
content: z.ZodOptional<z.ZodString>;
|
|
19
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
declare const UpdateRobotsTxtResponse: z.ZodObject<{
|
|
25
|
+
robotsTxt: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
content: z.ZodOptional<z.ZodString>;
|
|
27
|
+
default: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
|
|
32
|
+
export { GetRobotsTxtRequest, GetRobotsTxtResponse, UpdateRobotsTxtRequest, UpdateRobotsTxtResponse };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// schemas.ts
|
|
31
|
+
var schemas_exports = {};
|
|
32
|
+
__export(schemas_exports, {
|
|
33
|
+
GetRobotsTxtRequest: () => GetRobotsTxtRequest,
|
|
34
|
+
GetRobotsTxtResponse: () => GetRobotsTxtResponse,
|
|
35
|
+
UpdateRobotsTxtRequest: () => UpdateRobotsTxtRequest,
|
|
36
|
+
UpdateRobotsTxtResponse: () => UpdateRobotsTxtResponse
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(schemas_exports);
|
|
39
|
+
|
|
40
|
+
// src/promote-seo-v2-robots-txt-robots-txt.schemas.ts
|
|
41
|
+
var z = __toESM(require("zod"));
|
|
42
|
+
var GetRobotsTxtRequest = z.object({
|
|
43
|
+
options: z.object({
|
|
44
|
+
subdomain: z.string().describe(
|
|
45
|
+
"Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`."
|
|
46
|
+
).optional()
|
|
47
|
+
}).optional()
|
|
48
|
+
});
|
|
49
|
+
var GetRobotsTxtResponse = z.object({
|
|
50
|
+
robotsTxt: z.object({
|
|
51
|
+
content: z.string().describe("Full text content of the `robots.txt` file.").max(72e4).optional(),
|
|
52
|
+
default: z.boolean().describe(
|
|
53
|
+
"Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file)."
|
|
54
|
+
).optional(),
|
|
55
|
+
subdomain: z.string().describe(
|
|
56
|
+
"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'"
|
|
57
|
+
).max(63).optional()
|
|
58
|
+
}).describe("Retrieved `robots.txt` file entity.").optional()
|
|
59
|
+
});
|
|
60
|
+
var UpdateRobotsTxtRequest = z.object({
|
|
61
|
+
options: z.object({
|
|
62
|
+
robotsTxt: z.object({
|
|
63
|
+
content: z.string().describe("Full text content of the `robots.txt` file.").max(72e4).optional(),
|
|
64
|
+
default: z.boolean().describe(
|
|
65
|
+
"Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file)."
|
|
66
|
+
).optional(),
|
|
67
|
+
subdomain: z.string().describe(
|
|
68
|
+
"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'"
|
|
69
|
+
).max(63).optional()
|
|
70
|
+
}).describe("`robots.txt` file to update.").optional()
|
|
71
|
+
}).optional()
|
|
72
|
+
});
|
|
73
|
+
var UpdateRobotsTxtResponse = z.object({
|
|
74
|
+
robotsTxt: z.object({
|
|
75
|
+
content: z.string().describe("Full text content of the `robots.txt` file.").max(72e4).optional(),
|
|
76
|
+
default: z.boolean().describe(
|
|
77
|
+
"Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file)."
|
|
78
|
+
).optional(),
|
|
79
|
+
subdomain: z.string().describe(
|
|
80
|
+
"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'"
|
|
81
|
+
).max(63).optional()
|
|
82
|
+
}).describe("Updated `robots.txt` file.").optional()
|
|
83
|
+
});
|
|
84
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
+
0 && (module.exports = {
|
|
86
|
+
GetRobotsTxtRequest,
|
|
87
|
+
GetRobotsTxtResponse,
|
|
88
|
+
UpdateRobotsTxtRequest,
|
|
89
|
+
UpdateRobotsTxtResponse
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../schemas.ts","../../src/promote-seo-v2-robots-txt-robots-txt.schemas.ts"],"sourcesContent":["export * from './src/promote-seo-v2-robots-txt-robots-txt.schemas.js';\n","import * as z from 'zod';\n\nexport const GetRobotsTxtRequest = z.object({\n options: z\n .object({\n subdomain: z\n .string()\n .describe(\n 'Subdomain of the requested `robots.txt file`. For example, `www`, `es`, `fr`. Default: `www`.'\n )\n .optional(),\n })\n .optional(),\n});\nexport const GetRobotsTxtResponse = z.object({\n robotsTxt: z\n .object({\n content: z\n .string()\n .describe('Full text content of the `robots.txt` file.')\n .max(720000)\n .optional(),\n default: z\n .boolean()\n .describe(\n \"Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file).\"\n )\n .optional(),\n subdomain: z\n .string()\n .describe(\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 )\n .max(63)\n .optional(),\n })\n .describe('Retrieved `robots.txt` file entity.')\n .optional(),\n});\nexport const UpdateRobotsTxtRequest = z.object({\n options: z\n .object({\n robotsTxt: z\n .object({\n content: z\n .string()\n .describe('Full text content of the `robots.txt` file.')\n .max(720000)\n .optional(),\n default: z\n .boolean()\n .describe(\n \"Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file).\"\n )\n .optional(),\n subdomain: z\n .string()\n .describe(\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 )\n .max(63)\n .optional(),\n })\n .describe('`robots.txt` file to update.')\n .optional(),\n })\n .optional(),\n});\nexport const UpdateRobotsTxtResponse = z.object({\n robotsTxt: z\n .object({\n content: z\n .string()\n .describe('Full text content of the `robots.txt` file.')\n .max(720000)\n .optional(),\n default: z\n .boolean()\n .describe(\n \"Whether this `robots.txt` file uses Wix's [default content](https://support.wix.com/en/article/editing-your-sites-robotstxt-file).\"\n )\n .optional(),\n subdomain: z\n .string()\n .describe(\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 )\n .max(63)\n .optional(),\n })\n .describe('Updated `robots.txt` file.')\n .optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAEZ,IAAM,sBAAwB,SAAO;AAAA,EAC1C,SACG,SAAO;AAAA,IACN,WACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,uBAAyB,SAAO;AAAA,EAC3C,WACG,SAAO;AAAA,IACN,SACG,SAAO,EACP,SAAS,6CAA6C,EACtD,IAAI,IAAM,EACV,SAAS;AAAA,IACZ,SACG,UAAQ,EACR;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,IACZ,WACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,IAAI,EAAE,EACN,SAAS;AAAA,EACd,CAAC,EACA,SAAS,qCAAqC,EAC9C,SAAS;AACd,CAAC;AACM,IAAM,yBAA2B,SAAO;AAAA,EAC7C,SACG,SAAO;AAAA,IACN,WACG,SAAO;AAAA,MACN,SACG,SAAO,EACP,SAAS,6CAA6C,EACtD,IAAI,IAAM,EACV,SAAS;AAAA,MACZ,SACG,UAAQ,EACR;AAAA,QACC;AAAA,MACF,EACC,SAAS;AAAA,MACZ,WACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,EAAE,EACN,SAAS;AAAA,IACd,CAAC,EACA,SAAS,8BAA8B,EACvC,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,0BAA4B,SAAO;AAAA,EAC9C,WACG,SAAO;AAAA,IACN,SACG,SAAO,EACP,SAAS,6CAA6C,EACtD,IAAI,IAAM,EACV,SAAS;AAAA,IACZ,SACG,UAAQ,EACR;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,IACZ,WACG,SAAO,EACP;AAAA,MACC;AAAA,IACF,EACC,IAAI,EAAE,EACN,SAAS;AAAA,EACd,CAAC,EACA,SAAS,4BAA4B,EACrC,SAAS;AACd,CAAC;","names":[]}
|
package/build/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../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":["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 AccountInfo,\n AccountInfoMetadata,\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\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 */\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 * @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 * @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 AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\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,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,uBAAqD;;;ACH9D,SAAS,kBAAkB,yBAAyB;AACpD;AAA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A,EACf;AACJ;AAgBO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,IAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA,CAAC,UACCC;AAAA,IACE,eAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA4B;;;AG3E5B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,gBAEK,iCAAiBA,aAAkB;AAC9C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AAIjD,IAAMC,sBAGuB,kBAAkB,kBAAwB;","names":["renameKeysFromRESTResponseToSDKResponse","WebhookIdentityType","getRobotsTxt","updateRobotsTxt","getRobotsTxt","updateRobotsTxt","renameKeysFromRESTResponseToSDKResponse","getRobotsTxt","updateRobotsTxt","onRobotsTxtUpdated"]}
|
|
1
|
+
{"version":3,"sources":["../../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":["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 AccountInfo,\n AccountInfoMetadata,\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\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 * @permissionScope Manage SEO Settings\n * @permissionScopeId SCOPE.PROMOTE.MANAGE-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 */\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 * @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 * @permissionId wix-seo.edit\n * @applicableIdentity APP\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 AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\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,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,uBAAqD;;;ACH9D,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,6DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU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AC,UACCC;AAAA,IACE,eAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA4B;;;AG3E5B,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAQ3B,IAAMC,gBAEK,iCAAiBA,aAAkB;AAC9C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AAIjD,IAAMC,sBAGuB,kBAAkB,kBAAwB;","names":["renameKeysFromRESTResponseToSDKResponse","WebhookIdentityType","getRobotsTxt","updateRobotsTxt","getRobotsTxt","updateRobotsTxt","renameKeysFromRESTResponseToSDKResponse","getRobotsTxt","updateRobotsTxt","onRobotsTxtUpdated"]}
|
|
@@ -252,6 +252,8 @@ interface RobotsTxtUpdatedEnvelope {
|
|
|
252
252
|
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
253
253
|
* @permissionScope View SEO Settings
|
|
254
254
|
* @permissionScopeId SCOPE.PROMOTE.VIEW-SEO
|
|
255
|
+
* @permissionScope Manage SEO Settings
|
|
256
|
+
* @permissionScopeId SCOPE.PROMOTE.MANAGE-SEO
|
|
255
257
|
* @permissionId wix-seo.read
|
|
256
258
|
* @webhook
|
|
257
259
|
* @eventType wix.promote.seo.robots_txt_updated
|
|
@@ -281,6 +283,7 @@ interface GetRobotsTxtOptions {
|
|
|
281
283
|
* To restore Wix's default content, set the `default` field to `true` and omit the `content` field.
|
|
282
284
|
* @public
|
|
283
285
|
* @permissionId wix-seo.edit
|
|
286
|
+
* @applicableIdentity APP
|
|
284
287
|
* @fqn com.wixpress.promote.seo.robots.server.v2.RobotsServiceV2.UpdateRobotsTxt
|
|
285
288
|
*/
|
|
286
289
|
declare function updateRobotsTxt(options?: UpdateRobotsTxtOptions): Promise<NonNullablePaths<UpdateRobotsTxtResponse, `robotsTxt.content` | `robotsTxt.default` | `robotsTxt.subdomain`, 3>>;
|