import { QueryTipSettingsRequest as QueryTipSettingsRequest$1, QueryTipSettingsResponse as QueryTipSettingsResponse$1, UpdateTipSettingsRequest as UpdateTipSettingsRequest$1, UpdateTipSettingsResponse as UpdateTipSettingsResponse$1, CreateTipSettingsRequest as CreateTipSettingsRequest$1, CreateTipSettingsResponse as CreateTipSettingsResponse$1, CreateDefaultTipSettingsRequest as CreateDefaultTipSettingsRequest$1, CreateDefaultTipSettingsResponse as CreateDefaultTipSettingsResponse$1, DeleteTipSettingsRequest as DeleteTipSettingsRequest$1, DeleteTipSettingsResponse as DeleteTipSettingsResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** * Tip settings define how tips are calculated and distributed among staff. When * Wix Tips is installed, default settings are automatically created. You can't * delete these default settings but you can update them. Creating additional * settings allows Wix users to customize tip screens for different payment * terminals or set specific presets for various products or services. */ interface TipSettings extends TipSettingsIdentifierOneOf { /** * ID of the location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/location-object)) * for which the tip settings apply. * @format GUID */ locationId?: string | null; /** * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't * validate the ID you provide. * * Max: 30 characters * @maxLength 30 */ paymentTerminalId?: string | null; /** * ID of the Wix user for whom the tip settings apply. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). * @format GUID */ userId?: string | null; /** * ID of the tip settings. * @format GUID * @readonly */ id?: string | null; /** Tip type. */ tipType?: TipTypeWithLiterals; /** * Information about the tip choices that Wix Tips displays to customers during the * eCommerce checkout ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)). * * Min: `1` preset * Max: `3` presets * @minSize 1 * @maxSize 3 */ presets?: Preset[]; /** * Whether customers are allowed to tip during the * eCommerce checkout ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)). * * Default: `true` */ allowCustomerTip?: boolean | null; /** * Whether the Wix users are given the option to add a tip during the * payment collection flow in their dashboard. * * Default: `true` */ allowBusinessTipAtPayment?: boolean | null; /** * Whether customers can enter a custom tip amount. If set to `false`, customers * can only select a tip value from the available `presets` and can't enter a * custom amount. * * Default: `true` */ allowCustomAmount?: boolean | null; /** * Whether Wix users are allowed to edit tip distributions. If set to * `false`, Wix users can't edit distributions after they were created. * * Default: `true` */ allowEditDistribution?: boolean | null; /** * How the tip is distributed among staff. * * Supported values: * `UNKNOWN_SPLIT_METHOD`: There is no information about the staff distribution method. * `EQUAL`: The tip is distributed equally among all staff. * `PROPORTIONAL`: The tip is distributed proportionally among staff. */ staffDistributionMethod?: StaffDistributionMethodWithLiterals; /** * Revision number, which increments by 1 each time `tipSettings` object is * updated. To prevent conflicting changes, the current revision must be passed * when updating `tipSettings`. Ignored when creating a `tipSettings` object. * @readonly */ revision?: string | null; /** * Date and time the tip settings were created in * `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ createdDate?: Date | null; /** * Date and time the tip settings were last updated in * `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ updatedDate?: Date | null; /** * Whether these are the default tip settings. * * Wix Tips automatically creates the default settings during * the app's installation. You can't delete these default settings * but you can update them. Wix Tips uses the default settings * to calculate tips, unless you specify other settings. * @readonly */ default?: boolean | null; /** * ID of the app that has created the settings. See the list of app IDs for * Wix business solutions ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/apps-created-by-wix) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/apps-created-by-wix)). * @format GUID */ appId?: string | null; /** * Custom field data for the `tipSettings` object. Extended fields must be * configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; } /** @oneof */ interface TipSettingsIdentifierOneOf { /** * ID of the location ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/location-object)) * for which the tip settings apply. * @format GUID */ locationId?: string | null; /** * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't * validate the ID you provide. * * Max: 30 characters * @maxLength 30 */ paymentTerminalId?: string | null; /** * ID of the Wix user for whom the tip settings apply. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). * @format GUID */ userId?: string | null; } declare enum TipType { /** There is no information about the tip type. */ UNKNOWN_TIP_TYPE = "UNKNOWN_TIP_TYPE", /** The tip is calculated as a percentage of the subtotal of all related line items. */ PERCENTAGE = "PERCENTAGE", /** The tip is a fixed amount. */ AMOUNT = "AMOUNT" } /** @enumType */ type TipTypeWithLiterals = TipType | 'UNKNOWN_TIP_TYPE' | 'PERCENTAGE' | 'AMOUNT'; interface Preset { /** * Value of the preset tip choice that's displayed to customers in the * eCommerce checkout ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)). * For example, `5`, `10`, and `15` percent or `1`, `3`, and `5` USD. * * Min: `0` */ value?: number | null; /** * Whether this tip choice value is the default preset that's highlighted automatically in the * eCommerce checkout ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction)). * * Default: `false` */ default?: boolean | null; } declare enum StaffDistributionMethod { /** There is no information about the staff distribution method. */ UNKNOWN_SPLIT_METHOD = "UNKNOWN_SPLIT_METHOD", /** All staff receive an equal amount of the tip. */ EQUAL = "EQUAL", /** Staff receive a proportional amount of the tip. */ PROPORTIONAL = "PROPORTIONAL" } /** @enumType */ type StaffDistributionMethodWithLiterals = StaffDistributionMethod | 'UNKNOWN_SPLIT_METHOD' | 'EQUAL' | 'PROPORTIONAL'; interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface QueryTipSettingsRequest { /** WQL expression */ query: QueryV2; } interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 10 */ sort?: Sorting[]; /** * Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. * @maxLength 200 * @maxSize 10 */ fields?: string[]; /** * Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. * @maxLength 200 * @maxSize 10 */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: 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 QueryTipSettingsResponse { /** Retrieved `tipSettings` objects. */ tipSettings?: TipSettings[]; /** Metadata for the paged set of retrieved `tipSettings` objects. */ pagingMetadata?: PagingMetadataV2; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } 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 UpdateTipSettingsRequest { /** Tip settings to update. */ tipSettings: TipSettings; } interface UpdateTipSettingsResponse { /** Updated tip settings. */ tipSettings?: TipSettings; } interface CreateTipSettingsRequest { /** Tip settings to create. */ tipSettings: TipSettings; } interface CreateTipSettingsResponse { /** Created tip settings. */ tipSettings?: TipSettings; } interface CreateDefaultTipSettingsRequest { /** Default tip settings to create. */ tipSettings: TipSettings; } interface CreateDefaultTipSettingsResponse { /** Created default tip settings. */ tipSettings?: TipSettings; } interface DeleteTipSettingsRequest { /** * ID of the `tipSettings` object to delete. * @format GUID */ tipSettingsId: string | null; } interface DeleteTipSettingsResponse { } 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 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 UpdateTipSettingsApplicationErrors = { code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS'; description?: string; data?: Record; } | { code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET'; description?: string; data?: Record; } | { code?: 'PRESET_PERCENTAGE_TOO_HIGH'; description?: string; data?: Record; }; /** @docsIgnore */ type CreateTipSettingsApplicationErrors = { code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET'; description?: string; data?: Record; } | { code?: 'PRESET_PERCENTAGE_TOO_HIGH'; description?: string; data?: Record; }; /** @docsIgnore */ type CreateDefaultTipSettingsApplicationErrors = { code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS'; description?: string; data?: Record; } | { code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET'; description?: string; data?: Record; } | { code?: 'PRESET_PERCENTAGE_TOO_HIGH'; description?: string; data?: Record; }; /** @docsIgnore */ type DeleteTipSettingsApplicationErrors = { code?: 'CANNOT_DELETE_DEFAULT_SETTINGS'; 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 queryTipSettings(): __PublicMethodMetaInfo<'POST', {}, QueryTipSettingsRequest$1, QueryTipSettingsRequest, QueryTipSettingsResponse$1, QueryTipSettingsResponse>; declare function updateTipSettings(): __PublicMethodMetaInfo<'PATCH', {}, UpdateTipSettingsRequest$1, UpdateTipSettingsRequest, UpdateTipSettingsResponse$1, UpdateTipSettingsResponse>; declare function createTipSettings(): __PublicMethodMetaInfo<'POST', {}, CreateTipSettingsRequest$1, CreateTipSettingsRequest, CreateTipSettingsResponse$1, CreateTipSettingsResponse>; declare function createDefaultTipSettings(): __PublicMethodMetaInfo<'POST', {}, CreateDefaultTipSettingsRequest$1, CreateDefaultTipSettingsRequest, CreateDefaultTipSettingsResponse$1, CreateDefaultTipSettingsResponse>; declare function deleteTipSettings(): __PublicMethodMetaInfo<'DELETE', { tipSettingsId: string; }, DeleteTipSettingsRequest$1, DeleteTipSettingsRequest, DeleteTipSettingsResponse$1, DeleteTipSettingsResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type CreateDefaultTipSettingsApplicationErrors as CreateDefaultTipSettingsApplicationErrorsOriginal, type CreateDefaultTipSettingsRequest as CreateDefaultTipSettingsRequestOriginal, type CreateDefaultTipSettingsResponse as CreateDefaultTipSettingsResponseOriginal, type CreateTipSettingsApplicationErrors as CreateTipSettingsApplicationErrorsOriginal, type CreateTipSettingsRequest as CreateTipSettingsRequestOriginal, type CreateTipSettingsResponse as CreateTipSettingsResponseOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DeleteTipSettingsApplicationErrors as DeleteTipSettingsApplicationErrorsOriginal, type DeleteTipSettingsRequest as DeleteTipSettingsRequestOriginal, type DeleteTipSettingsResponse as DeleteTipSettingsResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type ExtendedFields as ExtendedFieldsOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type Preset as PresetOriginal, type QueryTipSettingsRequest as QueryTipSettingsRequestOriginal, type QueryTipSettingsResponse as QueryTipSettingsResponseOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, StaffDistributionMethod as StaffDistributionMethodOriginal, type StaffDistributionMethodWithLiterals as StaffDistributionMethodWithLiteralsOriginal, type TipSettingsIdentifierOneOf as TipSettingsIdentifierOneOfOriginal, type TipSettings as TipSettingsOriginal, TipType as TipTypeOriginal, type TipTypeWithLiterals as TipTypeWithLiteralsOriginal, type UpdateTipSettingsApplicationErrors as UpdateTipSettingsApplicationErrorsOriginal, type UpdateTipSettingsRequest as UpdateTipSettingsRequestOriginal, type UpdateTipSettingsResponse as UpdateTipSettingsResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createDefaultTipSettings, createTipSettings, deleteTipSettings, queryTipSettings, updateTipSettings };