import { CreateReferredFriendRequest as CreateReferredFriendRequest$1, CreateReferredFriendResponse as CreateReferredFriendResponse$1, GetReferredFriendRequest as GetReferredFriendRequest$1, GetReferredFriendResponse as GetReferredFriendResponse$1, GetReferredFriendByContactIdRequest as GetReferredFriendByContactIdRequest$1, GetReferredFriendByContactIdResponse as GetReferredFriendByContactIdResponse$1, UpdateReferredFriendRequest as UpdateReferredFriendRequest$1, UpdateReferredFriendResponse as UpdateReferredFriendResponse$1, DeleteReferredFriendRequest as DeleteReferredFriendRequest$1, DeleteReferredFriendResponse as DeleteReferredFriendResponse$1, QueryReferredFriendRequest as QueryReferredFriendRequest$1, QueryReferredFriendResponse as QueryReferredFriendResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface ReferredFriend { /** * ID of the referred friend. * @format GUID * @readonly */ id?: string; /** * Contact ID of the referred friend. * @format GUID * @readonly */ contactId?: string; /** * ID of the customer who referred this friend. * @format GUID * @readonly */ referringCustomerId?: string; /** Status of the referred friend. */ status?: StatusWithLiterals; /** * Revision number, which increments by 1 each time the referred friend is updated. * To prevent conflicting changes, the current revision must be passed when updating the referred friend. * @readonly * @immutable */ revision?: string | null; /** * Date and time the referred friend was created. * @readonly */ createdDate?: Date | null; /** * Date and time the referred friend was last updated. * @readonly */ updatedDate?: Date | null; } declare enum Status { /** Unknown status. */ UNKNOWN = "UNKNOWN", /** Initial status when the referred friend joins the site as a member. */ SIGN_UP_COMPLETED = "SIGN_UP_COMPLETED", /** Status after the referred friend completes a specific action, such as making a purchase. */ ACTIONS_COMPLETED = "ACTIONS_COMPLETED" } /** @enumType */ type StatusWithLiterals = Status | 'UNKNOWN' | 'SIGN_UP_COMPLETED' | 'ACTIONS_COMPLETED'; interface CreateReferredFriendRequest { /** * Referral code for the referred friend. * @minLength 12 * @maxLength 12 */ referralCode?: string | null; } interface CreateReferredFriendResponse { /** Created referred friend. */ referredFriend?: ReferredFriend; } interface GetReferredFriendRequest { /** * ID of the referred friend to retrieve. * @format GUID */ referredFriendId: string; } interface GetReferredFriendResponse { /** Retrieved referred friend. */ referredFriend?: ReferredFriend; } interface GetReferredFriendByContactIdRequest { /** * Contact ID or "me" to get the current identity's contact. * @minLength 2 */ contactId: string; } interface GetReferredFriendByContactIdResponse { /** Retrieved referred friend. */ referredFriend?: ReferredFriend; } interface UpdateReferredFriendRequest { /** Referred friend to be updated. May be partial. */ referredFriend: ReferredFriend; } interface UpdateReferredFriendResponse { /** Updated referred friend. */ referredFriend?: ReferredFriend; } interface DeleteReferredFriendRequest { /** * ID of the referred friend to delete. * @format GUID */ referredFriendId: string; /** * Revision number, which increments by 1 each time the referred friend is updated. * To prevent conflicting changes, the current revision must be passed when deleting the referred friend. */ revision?: string; } interface DeleteReferredFriendResponse { } interface QueryReferredFriendRequest { /** Query options. */ query: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; /** * Origin point for geo-distance sorting on a GEO field * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). */ origin?: AddressLocation; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryReferredFriendResponse { /** Retrieved referred friends. */ referredFriends?: ReferredFriend[]; /** Cursor paging metadata. */ metadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For 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 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } 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. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface Empty { } interface SuccessfulReferralEvent { /** Details of the referred friend who completed their referral. */ referredFriendDetails?: ReferredFriendDetails; } interface ReferredFriendDetails { /** * ID of the referred friend. * @format GUID * @readonly */ referredFriendId?: string; /** * Contact ID of the referred friend. * @format GUID * @readonly */ contactId?: string; /** * ID of the customer who referred this friend. * @format GUID * @readonly */ referringCustomerId?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type CreateReferredFriendApplicationErrors = { code?: 'MEMBER_NOT_ELIGIBLE'; description?: string; data?: Record; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createReferredFriend(): __PublicMethodMetaInfo<'POST', {}, CreateReferredFriendRequest$1, CreateReferredFriendRequest, CreateReferredFriendResponse$1, CreateReferredFriendResponse>; declare function getReferredFriend(): __PublicMethodMetaInfo<'GET', { referredFriendId: string; }, GetReferredFriendRequest$1, GetReferredFriendRequest, GetReferredFriendResponse$1, GetReferredFriendResponse>; declare function getReferredFriendByContactId(): __PublicMethodMetaInfo<'GET', { contactId: string; }, GetReferredFriendByContactIdRequest$1, GetReferredFriendByContactIdRequest, GetReferredFriendByContactIdResponse$1, GetReferredFriendByContactIdResponse>; declare function updateReferredFriend(): __PublicMethodMetaInfo<'PATCH', { referredFriendId: string; }, UpdateReferredFriendRequest$1, UpdateReferredFriendRequest, UpdateReferredFriendResponse$1, UpdateReferredFriendResponse>; declare function deleteReferredFriend(): __PublicMethodMetaInfo<'DELETE', { referredFriendId: string; }, DeleteReferredFriendRequest$1, DeleteReferredFriendRequest, DeleteReferredFriendResponse$1, DeleteReferredFriendResponse>; declare function queryReferredFriend(): __PublicMethodMetaInfo<'POST', {}, QueryReferredFriendRequest$1, QueryReferredFriendRequest, QueryReferredFriendResponse$1, QueryReferredFriendResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AddressLocation as AddressLocationOriginal, type CreateReferredFriendApplicationErrors as CreateReferredFriendApplicationErrorsOriginal, type CreateReferredFriendRequest as CreateReferredFriendRequestOriginal, type CreateReferredFriendResponse as CreateReferredFriendResponseOriginal, type CursorPagingMetadata as CursorPagingMetadataOriginal, type CursorPaging as CursorPagingOriginal, type CursorQuery as CursorQueryOriginal, type CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal, type Cursors as CursorsOriginal, type DeleteReferredFriendRequest as DeleteReferredFriendRequestOriginal, type DeleteReferredFriendResponse as DeleteReferredFriendResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetReferredFriendByContactIdRequest as GetReferredFriendByContactIdRequestOriginal, type GetReferredFriendByContactIdResponse as GetReferredFriendByContactIdResponseOriginal, type GetReferredFriendRequest as GetReferredFriendRequestOriginal, type GetReferredFriendResponse as GetReferredFriendResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type QueryReferredFriendRequest as QueryReferredFriendRequestOriginal, type QueryReferredFriendResponse as QueryReferredFriendResponseOriginal, type ReferredFriendDetails as ReferredFriendDetailsOriginal, type ReferredFriend as ReferredFriendOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type SuccessfulReferralEvent as SuccessfulReferralEventOriginal, type UpdateReferredFriendRequest as UpdateReferredFriendRequestOriginal, type UpdateReferredFriendResponse as UpdateReferredFriendResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createReferredFriend, deleteReferredFriend, getReferredFriend, getReferredFriendByContactId, queryReferredFriend, updateReferredFriend };