export interface AdsTxt { /** Content of Ads.txt. */ content?: string; /** Whether the current Ads.txt file is Wix's default. */ default?: boolean; /** * Subdomain of the Ads.txt file. For example, `www`, `es`, or `fr`. * * Default: `www` */ subdomain?: string; } /** The request to get the Ads.txt file content */ export interface GetAdsTxtRequest { /** * Subdomain of the Ads.txt file. For example, `www`, `es`, or `fr`. * * Default: `www` */ subdomain?: string; } /** The response of the Ads.txt file request */ export interface GetAdsTxtResponse { /** Retrieved `adsTxt` object. */ adsTxt?: AdsTxt; } /** The request to update the content of the Ads.txt file */ export interface UpdateAdsTxtRequest { /** * Details about how to replace the existing Ads.txt file. * To reset the Ads.txt file to Wix's default, set `default` to `true` and omit `content`. */ adsTxt?: AdsTxt; } export interface UpdateAdsTxtResponse { /** Updated `adsTxt` object. */ adsTxt?: AdsTxt; } /** The request to append the content of the Ads.txt file */ export interface AppendAdsTxtRequest { /** * Details to add to the existing Ads.txt file. * To reset the Ads.txt file to Wix's default, set `default` to `true` and omit `content`. */ adsTxt?: AdsTxt; } export interface AppendAdsTxtResponse { /** Updated `adsTxt` object. */ adsTxt?: AdsTxt; } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; /** Triggered when the Ads.txt file is updated. */ updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; /** Triggered when the Ads.txt file is updated. */ actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entity?: string; } export interface RestoreInfo { deletedDate?: Date | null; } export interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } export interface ActionEvent { body?: string; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface AdsTxtNonNullableFields { content: string; default: boolean; subdomain: string; _id: string; } export interface GetAdsTxtResponseNonNullableFields { adsTxt?: AdsTxtNonNullableFields; } export interface UpdateAdsTxtResponseNonNullableFields { adsTxt?: AdsTxtNonNullableFields; } export interface AppendAdsTxtResponseNonNullableFields { adsTxt?: AdsTxtNonNullableFields; } export interface BaseEventMetadata { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; } export interface EventMetadata extends BaseEventMetadata { /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } export interface AdsTxtUpdatedEnvelope { entity: AdsTxt; metadata: EventMetadata; } /** @permissionScope Manage Ads.txt * @permissionScopeId SCOPE.DC-PROMOTE.MANAGE-ADS-TXT * @permissionId PROMOTE.ADS_TXT_WRITE * @webhook * @eventType wix.promote.marketing.ads_txt_updated */ export declare function onAdsTxtUpdated(handler: (event: AdsTxtUpdatedEnvelope) => void | Promise): void; /** * Retrieves the Ads.txt file. * @public * @param options - Options to use when retrieving the Ads.txt file. * @permissionId PROMOTE.ADS_TXT_READ * @permissionScope Manage Ads.txt * @permissionScopeId SCOPE.DC-PROMOTE.MANAGE-ADS-TXT * @applicableIdentity APP * @returns The response of the Ads.txt file request * @fqn com.wixpress.promote.seo.robots.server.v2.AdsServiceV2.GetAdsTxt */ export declare function getAdsTxt(options?: GetAdsTxtOptions): Promise; export interface GetAdsTxtOptions { /** * Subdomain of the Ads.txt file. For example, `www`, `es`, or `fr`. * * Default: `www` */ subdomain?: string; } /** * Replaces the Ads.txt file. * * When setting `content` to an empty string, an empty Ads.txt file is created. To reset Ads.txt to Wix's default, set `default` to `true` and omit `content`. * @public * @param options - Options to use when replacing the Ads.txt file. * @permissionId PROMOTE.ADS_TXT_WRITE * @permissionScope Manage Ads.txt * @permissionScopeId SCOPE.DC-PROMOTE.MANAGE-ADS-TXT * @applicableIdentity APP * @fqn com.wixpress.promote.seo.robots.server.v2.AdsServiceV2.UpdateAdsTxt */ export declare function updateAdsTxt(options?: UpdateAdsTxtOptions): Promise; export interface UpdateAdsTxtOptions { /** * Details about how to replace the existing Ads.txt file. * To reset the Ads.txt file to Wix's default, set `default` to `true` and omit `content`. */ adsTxt?: AdsTxt; } /** * Adds `content` to the Ads.txt file. * * To reset the Ads.txt file to Wix's default, set `default` to `true` and omit `content`. * @public * @param options - Options to use when appending the Ads.txt file. * @permissionId PROMOTE.ADS_TXT_WRITE * @permissionScope Manage Ads.txt * @permissionScopeId SCOPE.DC-PROMOTE.MANAGE-ADS-TXT * @applicableIdentity APP * @fqn com.wixpress.promote.seo.robots.server.v2.AdsServiceV2.AppendAdsTxt */ export declare function appendAdsTxt(options?: AppendAdsTxtOptions): Promise; export interface AppendAdsTxtOptions { /** * Details to add to the existing Ads.txt file. * To reset the Ads.txt file to Wix's default, set `default` to `true` and omit `content`. */ adsTxt?: AdsTxt; } export {};