@wix/auto_sdk_ecom_tip-settings 1.0.35 → 1.0.37
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 +6 -30
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +6 -30
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +6 -30
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2 -2
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +6 -30
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +2 -2
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../index.typings.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.universal.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.http.ts"],"sourcesContent":["export * from './src/tips-settings-v1-tip-settings-tip-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixTipsSettingsV1TipSettings from './tips-settings-v1-tip-settings-tip-settings.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * Tip settings define how tips are calculated and distributed among staff. When\n * Wix Tips is installed, default settings are automatically created. You can't\n * delete these default settings but you can update them. Creating additional\n * settings allows Wix users to customize tip screens for different payment\n * terminals or set specific presets for various products or services.\n */\nexport interface TipSettings extends TipSettingsIdentifierOneOf {\n /**\n * 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))\n * for which the tip settings apply.\n * @format GUID\n */\n locationId?: string | null;\n /**\n * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't\n * validate the ID you provide.\n *\n * Max: 30 characters\n * @maxLength 30\n */\n paymentTerminalId?: string | null;\n /**\n * ID of the Wix user for whom the tip settings apply. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n userId?: string | null;\n /**\n * ID of the tip settings.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /** Tip type. */\n tipType?: TipTypeWithLiterals;\n /**\n * Information about the tip choices that Wix Tips displays to customers during the\n * 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)).\n *\n * Min: `1` preset\n * Max: `3` presets\n * @minSize 1\n * @maxSize 3\n */\n presets?: Preset[];\n /**\n * Whether customer are allowed to tip during the\n * 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)).\n *\n * Default: `true`\n */\n allowCustomerTip?: boolean | null;\n /**\n * Whether the Wix users are given the option to add a tip during the\n * payment collection flow in their dashboard.\n *\n * Default: `true`\n */\n allowBusinessTipAtPayment?: boolean | null;\n /**\n * Whether customers can enter a custom tip amount. If set to `false`, customers\n * can only select a tip value from the available `presets` and can't enter a\n * custom amount.\n *\n * Default: `true`\n */\n allowCustomAmount?: boolean | null;\n /**\n * Whether Wix users are allowed to edit tip distributions. If set to\n * `false`, Wix users can't edit distributions after they were created.\n *\n * Default: `true`\n */\n allowEditDistribution?: boolean | null;\n /**\n * How the tip is distributed among staff.\n *\n * Supported values:\n * `UNKNOWN_SPLIT_METHOD`: There is no information about the staff distribution method.\n * `EQUAL`: The tip is distributed equally among all staff.\n * `PROPORTIONAL`: The tip is distributed proportionally among staff.\n */\n staffDistributionMethod?: StaffDistributionMethodWithLiterals;\n /**\n * Revision number, which increments by 1 each time `tipSettings` object is\n * updated. To prevent conflicting changes, the current revision must be passed\n * when updating `tipSettings`. Ignored when creating a `tipSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the tip settings were created in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tip settings were last updated in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Whether these are the default tip settings.\n *\n * Wix Tips automatically creates the default settings during\n * the app's installation. You can't delete these default settings\n * but you can update them. Wix Tips uses the default settings\n * to calculate tips, unless you specify other settings.\n * @readonly\n */\n default?: boolean | null;\n /**\n * ID of the app that has created the settings. See the list of app IDs for\n * 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)).\n * @format GUID\n */\n appId?: string | null;\n /**\n * Custom field data for the `tipSettings` object. Extended fields must be\n * configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/** @oneof */\nexport interface TipSettingsIdentifierOneOf {\n /**\n * 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))\n * for which the tip settings apply.\n * @format GUID\n */\n locationId?: string | null;\n /**\n * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't\n * validate the ID you provide.\n *\n * Max: 30 characters\n * @maxLength 30\n */\n paymentTerminalId?: string | null;\n /**\n * ID of the Wix user for whom the tip settings apply. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n userId?: string | null;\n}\n\nexport enum TipType {\n /** There is no information about the tip type. */\n UNKNOWN_TIP_TYPE = 'UNKNOWN_TIP_TYPE',\n /** The tip is calculated as a percentage of the subtotal of all related line items. */\n PERCENTAGE = 'PERCENTAGE',\n /** The tip is a fixed amount. */\n AMOUNT = 'AMOUNT',\n}\n\n/** @enumType */\nexport type TipTypeWithLiterals =\n | TipType\n | 'UNKNOWN_TIP_TYPE'\n | 'PERCENTAGE'\n | 'AMOUNT';\n\nexport interface Preset {\n /**\n * Value of the preset tip choice that's displayed to customers in the\n * 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)).\n * For example, `5`, `10`, and `15` percent or `1`, `3`, and `5` USD.\n *\n * Min: `0`\n */\n value?: number | null;\n /**\n * Whether this tip choice value is the default preset that's highlighted automatically in the\n * 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)).\n *\n * Default: `false`\n */\n default?: boolean | null;\n}\n\nexport enum StaffDistributionMethod {\n /** There is no information about the staff distribution method. */\n UNKNOWN_SPLIT_METHOD = 'UNKNOWN_SPLIT_METHOD',\n /** All staff receive an equal amount of the tip. */\n EQUAL = 'EQUAL',\n /** Staff receive a proportional amount of the tip. */\n PROPORTIONAL = 'PROPORTIONAL',\n}\n\n/** @enumType */\nexport type StaffDistributionMethodWithLiterals =\n | StaffDistributionMethod\n | 'UNKNOWN_SPLIT_METHOD'\n | 'EQUAL'\n | 'PROPORTIONAL';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface QueryTipSettingsRequest {\n /** WQL expression */\n query: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** 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`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 10\n */\n sort?: Sorting[];\n /**\n * 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.\n * @maxLength 200\n * @maxSize 10\n */\n fields?: string[];\n /**\n * 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.\n * @maxLength 200\n * @maxSize 10\n */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** 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`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryTipSettingsResponse {\n /** Retrieved `tipSettings` objects. */\n tipSettings?: TipSettings[];\n /** Metadate for the paged set of retrieved `tipSettings` objects. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpdateTipSettingsRequest {\n /** Tip settings to update. */\n tipSettings: TipSettings;\n}\n\nexport interface UpdateTipSettingsResponse {\n /** Updated tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface CreateTipSettingsRequest {\n /** Tip settings to create. */\n tipSettings: TipSettings;\n}\n\nexport interface CreateTipSettingsResponse {\n /** Created tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface CreateDefaultTipSettingsRequest {\n /** Default tip settings to create. */\n tipSettings: TipSettings;\n}\n\nexport interface CreateDefaultTipSettingsResponse {\n /** Created default tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface DeleteTipSettingsRequest {\n /**\n * ID of the `tipSettings` object to delete.\n * @format GUID\n */\n tipSettingsId: string | null;\n}\n\nexport interface DeleteTipSettingsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type UpdateTipSettingsApplicationErrors =\n | {\n code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateTipSettingsApplicationErrors =\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateDefaultTipSettingsApplicationErrors =\n | {\n code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteTipSettingsApplicationErrors = {\n code?: 'CANNOT_DELETE_DEFAULT_SETTINGS';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates a query to retrieve a list of tip settings.\n *\n * The `queryTipSettings()` function builds a query to retrieve a list of tip settings and returns a `TipSettingsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-builder/find) function.\n *\n * You can refine the query by chaining `TipSettingsQueryBuilder` functions onto the query. `TipSettingsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTipSettings()` returns.\n *\n * `queryTipSettings()` runs with the following `TipSettingsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * The functions that are chained to `queryTipSettings()` are applied in the order they are called. For example, if you apply `ascending(\"tipType\")` and then `ascending(\"locationId\")`, the results are sorted first by the `\"tipType\"`, and then, if there are multiple results with the same `\"tipType\"`, the items are sorted by `\"locationId\"`.\n *\n * The following `TipSettingsQueryBuilder` functions are supported for the `queryTipSettings()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-result/items) property in `TipSettingsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_TIPS.TIP_SETTINGS_READ\n * @applicableIdentity APP\n * @fqn wix.tips.settings.v1.TipSettingsService.QueryTipSettings\n */\nexport function queryTipSettings(): TipSettingsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n TipSettings,\n 'CURSOR',\n QueryTipSettingsRequest,\n QueryTipSettingsResponse\n >({\n func: async (payload: QueryTipSettingsRequest) => {\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.queryTipSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryTipSettingsRequest['query']) => {\n const args = [query, {}] as [QueryTipSettingsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryTipSettingsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.tipSettings,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface TipSettingsQueryResult extends QueryCursorResult {\n items: TipSettings[];\n query: TipSettingsQueryBuilder;\n next: () => Promise<TipSettingsQueryResult>;\n prev: () => Promise<TipSettingsQueryResult>;\n}\n\nexport interface TipSettingsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: string\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: any[]\n ) => TipSettingsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: boolean\n ) => TipSettingsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default'\n >\n ) => TipSettingsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default'\n >\n ) => TipSettingsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => TipSettingsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => TipSettingsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<TipSettingsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.tips.settings.v1.TipSettingsService.QueryTipSettings\n * @requiredField query\n */\nexport async function typedQueryTipSettings(\n query: QueryV2\n): Promise<\n NonNullablePaths<\n QueryTipSettingsResponse,\n | `tipSettings`\n | `tipSettings.${number}.tipType`\n | `tipSettings.${number}.staffDistributionMethod`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.queryTipSettings(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: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a `tipSettings` object.\n *\n *\n * You can't update the `default` field.\n * @param tipSettings - Tip settings to update.\n * @public\n * @documentationMaturity preview\n * @requiredField tipSettings\n * @param options - Options to use when updating tip settings.\n * @permissionId WIX_TIPS.TIP_SETTINGS_UPDATE\n * @applicableIdentity APP\n * @returns Updated tip settings.\n * @fqn wix.tips.settings.v1.TipSettingsService.UpdateTipSettings\n */\nexport async function updateTipSettings(tipSettings: TipSettings): Promise<\n NonNullablePaths<\n TipSettings,\n `tipType` | `presets` | `staffDistributionMethod`,\n 2\n > & {\n __applicationErrorsType?: UpdateTipSettingsApplicationErrors;\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 tipSettings: tipSettings,\n });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.updateTipSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.tipSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { tipSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['tipSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a `tipSettings` object.\n *\n *\n * You can't create a `tipSettings` object with `{\"default\": true}`.\n * @param tipSettings - Tip settings to create.\n * @public\n * @documentationMaturity preview\n * @requiredField tipSettings\n * @permissionId WIX_TIPS.TIP_SETTINGS_CREATE\n * @applicableIdentity APP\n * @returns Created tip settings.\n * @fqn wix.tips.settings.v1.TipSettingsService.CreateTipSettings\n */\nexport async function createTipSettings(tipSettings: TipSettings): Promise<\n NonNullablePaths<\n TipSettings,\n `tipType` | `presets` | `staffDistributionMethod`,\n 2\n > & {\n __applicationErrorsType?: CreateTipSettingsApplicationErrors;\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 tipSettings: tipSettings,\n });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.createTipSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.tipSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { tipSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['tipSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a default `tipSettings` object.\n *\n *\n * The call fails if there is already an existing default `tipSettings` object.\n * @param tipSettings - Default tip settings to create.\n * @public\n * @documentationMaturity preview\n * @requiredField tipSettings\n * @permissionId WIX_TIPS.TIP_SETTINGS_CREATE\n * @applicableIdentity APP\n * @fqn wix.tips.settings.v1.TipSettingsService.CreateDefaultTipSettings\n */\nexport async function createDefaultTipSettings(\n tipSettings: TipSettings\n): Promise<\n NonNullablePaths<\n CreateDefaultTipSettingsResponse,\n | `tipSettings.tipType`\n | `tipSettings.presets`\n | `tipSettings.staffDistributionMethod`,\n 3\n > & {\n __applicationErrorsType?: CreateDefaultTipSettingsApplicationErrors;\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 tipSettings: tipSettings,\n });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.createDefaultTipSettings(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: { tipSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['tipSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes a `tipSettings` object.\n *\n *\n * You can't delete the default `tipSettings` object.\n * @param tipSettingsId - ID of the `tipSettings` object to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField tipSettingsId\n * @permissionId WIX_TIPS.TIP_SETTINGS_DELETE\n * @applicableIdentity APP\n * @fqn wix.tips.settings.v1.TipSettingsService.DeleteTipSettings\n */\nexport async function deleteTipSettings(tipSettingsId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteTipSettingsApplicationErrors;\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 tipSettingsId: tipSettingsId,\n });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.deleteTipSettings(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: { tipSettingsId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['tipSettingsId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixTipsSettingsV1TipSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/tip-settings',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_tip-settings';\n\n/**\n * Creates a query to retrieve a list of tip settings.\n *\n * The `queryTipSettings()` function builds a query to retrieve a list of tip settings and returns a `TipSettingsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-builder/find) function.\n *\n * You can refine the query by chaining `TipSettingsQueryBuilder` functions onto the query. `TipSettingsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTipSettings()` returns.\n *\n * `queryTipSettings()` runs with the following `TipSettingsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * The functions that are chained to `queryTipSettings()` are applied in the order they are called. For example, if you apply `ascending(\"tipType\")` and then `ascending(\"locationId\")`, the results are sorted first by the `\"tipType\"`, and then, if there are multiple results with the same `\"tipType\"`, the items are sorted by `\"locationId\"`.\n *\n * The following `TipSettingsQueryBuilder` functions are supported for the `queryTipSettings()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-result/items) property in `TipSettingsQueryResult`.\n */\nexport function queryTipSettings(payload: object): RequestOptionsFactory<any> {\n function __queryTipSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.QueryTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryTipSettings;\n}\n\n/**\n * Updates a `tipSettings` object.\n *\n *\n * You can't update the `default` field.\n */\nexport function updateTipSettings(payload: object): RequestOptionsFactory<any> {\n function __updateTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'PATCH' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.UpdateTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateTipSettings;\n}\n\n/**\n * Creates a `tipSettings` object.\n *\n *\n * You can't create a `tipSettings` object with `{\"default\": true}`.\n */\nexport function createTipSettings(payload: object): RequestOptionsFactory<any> {\n function __createTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.CreateTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createTipSettings;\n}\n\n/**\n * Creates a default `tipSettings` object.\n *\n *\n * The call fails if there is already an existing default `tipSettings` object.\n */\nexport function createDefaultTipSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __createDefaultTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.tips.settings.v1.TipSettingsService.CreateDefaultTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/create-default',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createDefaultTipSettings;\n}\n\n/**\n * Deletes a `tipSettings` object.\n *\n *\n * You can't delete the default `tipSettings` object.\n */\nexport function deleteTipSettings(payload: object): RequestOptionsFactory<any> {\n function __deleteTipSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'DELETE' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.DeleteTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/{tipSettingsId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteTipSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA;AAAA,2BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA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ElE,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,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,eAAe,OAAO;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,eAAe;AAAA,IAClB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createDefaultTipSettings","createTipSettings","deleteTipSettings","queryTipSettings","updateTipSettings","import_float","import_timestamp","import_rest_modules","payload","import_transform_paths","TipType","StaffDistributionMethod","SortOrder","WebhookIdentityType","queryTipSettings","sdkTransformError","updateTipSettings","createTipSettings","createDefaultTipSettings","deleteTipSettings"]}
|
|
1
|
+
{"version":3,"sources":["../../../index.typings.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.universal.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.http.ts"],"sourcesContent":["export * from './src/tips-settings-v1-tip-settings-tip-settings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixTipsSettingsV1TipSettings from './tips-settings-v1-tip-settings-tip-settings.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * Tip settings define how tips are calculated and distributed among staff. When\n * Wix Tips is installed, default settings are automatically created. You can't\n * delete these default settings but you can update them. Creating additional\n * settings allows Wix users to customize tip screens for different payment\n * terminals or set specific presets for various products or services.\n */\nexport interface TipSettings extends TipSettingsIdentifierOneOf {\n /**\n * 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))\n * for which the tip settings apply.\n * @format GUID\n */\n locationId?: string | null;\n /**\n * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't\n * validate the ID you provide.\n *\n * Max: 30 characters\n * @maxLength 30\n */\n paymentTerminalId?: string | null;\n /**\n * ID of the Wix user for whom the tip settings apply. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n userId?: string | null;\n /**\n * ID of the tip settings.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /** Tip type. */\n tipType?: TipTypeWithLiterals;\n /**\n * Information about the tip choices that Wix Tips displays to customers during the\n * 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)).\n *\n * Min: `1` preset\n * Max: `3` presets\n * @minSize 1\n * @maxSize 3\n */\n presets?: Preset[];\n /**\n * Whether customers are allowed to tip during the\n * 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)).\n *\n * Default: `true`\n */\n allowCustomerTip?: boolean | null;\n /**\n * Whether the Wix users are given the option to add a tip during the\n * payment collection flow in their dashboard.\n *\n * Default: `true`\n */\n allowBusinessTipAtPayment?: boolean | null;\n /**\n * Whether customers can enter a custom tip amount. If set to `false`, customers\n * can only select a tip value from the available `presets` and can't enter a\n * custom amount.\n *\n * Default: `true`\n */\n allowCustomAmount?: boolean | null;\n /**\n * Whether Wix users are allowed to edit tip distributions. If set to\n * `false`, Wix users can't edit distributions after they were created.\n *\n * Default: `true`\n */\n allowEditDistribution?: boolean | null;\n /**\n * How the tip is distributed among staff.\n *\n * Supported values:\n * `UNKNOWN_SPLIT_METHOD`: There is no information about the staff distribution method.\n * `EQUAL`: The tip is distributed equally among all staff.\n * `PROPORTIONAL`: The tip is distributed proportionally among staff.\n */\n staffDistributionMethod?: StaffDistributionMethodWithLiterals;\n /**\n * Revision number, which increments by 1 each time `tipSettings` object is\n * updated. To prevent conflicting changes, the current revision must be passed\n * when updating `tipSettings`. Ignored when creating a `tipSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the tip settings were created in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the tip settings were last updated in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Whether these are the default tip settings.\n *\n * Wix Tips automatically creates the default settings during\n * the app's installation. You can't delete these default settings\n * but you can update them. Wix Tips uses the default settings\n * to calculate tips, unless you specify other settings.\n * @readonly\n */\n default?: boolean | null;\n /**\n * ID of the app that has created the settings. See the list of app IDs for\n * 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)).\n * @format GUID\n */\n appId?: string | null;\n /**\n * Custom field data for the `tipSettings` object. Extended fields must be\n * configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/** @oneof */\nexport interface TipSettingsIdentifierOneOf {\n /**\n * 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))\n * for which the tip settings apply.\n * @format GUID\n */\n locationId?: string | null;\n /**\n * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't\n * validate the ID you provide.\n *\n * Max: 30 characters\n * @maxLength 30\n */\n paymentTerminalId?: string | null;\n /**\n * ID of the Wix user for whom the tip settings apply. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n userId?: string | null;\n}\n\nexport enum TipType {\n /** There is no information about the tip type. */\n UNKNOWN_TIP_TYPE = 'UNKNOWN_TIP_TYPE',\n /** The tip is calculated as a percentage of the subtotal of all related line items. */\n PERCENTAGE = 'PERCENTAGE',\n /** The tip is a fixed amount. */\n AMOUNT = 'AMOUNT',\n}\n\n/** @enumType */\nexport type TipTypeWithLiterals =\n | TipType\n | 'UNKNOWN_TIP_TYPE'\n | 'PERCENTAGE'\n | 'AMOUNT';\n\nexport interface Preset {\n /**\n * Value of the preset tip choice that's displayed to customers in the\n * 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)).\n * For example, `5`, `10`, and `15` percent or `1`, `3`, and `5` USD.\n *\n * Min: `0`\n */\n value?: number | null;\n /**\n * Whether this tip choice value is the default preset that's highlighted automatically in the\n * 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)).\n *\n * Default: `false`\n */\n default?: boolean | null;\n}\n\nexport enum StaffDistributionMethod {\n /** There is no information about the staff distribution method. */\n UNKNOWN_SPLIT_METHOD = 'UNKNOWN_SPLIT_METHOD',\n /** All staff receive an equal amount of the tip. */\n EQUAL = 'EQUAL',\n /** Staff receive a proportional amount of the tip. */\n PROPORTIONAL = 'PROPORTIONAL',\n}\n\n/** @enumType */\nexport type StaffDistributionMethodWithLiterals =\n | StaffDistributionMethod\n | 'UNKNOWN_SPLIT_METHOD'\n | 'EQUAL'\n | 'PROPORTIONAL';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface QueryTipSettingsRequest {\n /** WQL expression */\n query: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** 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`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 10\n */\n sort?: Sorting[];\n /**\n * 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.\n * @maxLength 200\n * @maxSize 10\n */\n fields?: string[];\n /**\n * 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.\n * @maxLength 200\n * @maxSize 10\n */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** 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`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryTipSettingsResponse {\n /** Retrieved `tipSettings` objects. */\n tipSettings?: TipSettings[];\n /** Metadata for the paged set of retrieved `tipSettings` objects. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpdateTipSettingsRequest {\n /** Tip settings to update. */\n tipSettings: TipSettings;\n}\n\nexport interface UpdateTipSettingsResponse {\n /** Updated tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface CreateTipSettingsRequest {\n /** Tip settings to create. */\n tipSettings: TipSettings;\n}\n\nexport interface CreateTipSettingsResponse {\n /** Created tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface CreateDefaultTipSettingsRequest {\n /** Default tip settings to create. */\n tipSettings: TipSettings;\n}\n\nexport interface CreateDefaultTipSettingsResponse {\n /** Created default tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface DeleteTipSettingsRequest {\n /**\n * ID of the `tipSettings` object to delete.\n * @format GUID\n */\n tipSettingsId: string | null;\n}\n\nexport interface DeleteTipSettingsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type UpdateTipSettingsApplicationErrors =\n | {\n code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateTipSettingsApplicationErrors =\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateDefaultTipSettingsApplicationErrors =\n | {\n code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteTipSettingsApplicationErrors = {\n code?: 'CANNOT_DELETE_DEFAULT_SETTINGS';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates a query to retrieve a list of tip settings.\n *\n * The `queryTipSettings()` function builds a query to retrieve a list of tip settings and returns a `TipSettingsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-builder/find) function.\n *\n * You can refine the query by chaining `TipSettingsQueryBuilder` functions onto the query. `TipSettingsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTipSettings()` returns.\n *\n * `queryTipSettings()` runs with the following `TipSettingsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * The functions that are chained to `queryTipSettings()` are applied in the order they are called. For example, if you apply `ascending(\"tipType\")` and then `ascending(\"locationId\")`, the results are sorted first by the `\"tipType\"`, and then, if there are multiple results with the same `\"tipType\"`, the items are sorted by `\"locationId\"`.\n *\n * The following `TipSettingsQueryBuilder` functions are supported for the `queryTipSettings()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-result/items) property in `TipSettingsQueryResult`.\n * @public\n * @permissionId WIX_TIPS.TIP_SETTINGS_READ\n * @applicableIdentity APP\n * @fqn wix.tips.settings.v1.TipSettingsService.QueryTipSettings\n */\nexport function queryTipSettings(): TipSettingsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n TipSettings,\n 'CURSOR',\n QueryTipSettingsRequest,\n QueryTipSettingsResponse\n >({\n func: async (payload: QueryTipSettingsRequest) => {\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.queryTipSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryTipSettingsRequest['query']) => {\n const args = [query, {}] as [QueryTipSettingsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryTipSettingsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.tipSettings,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface TipSettingsQueryResult extends QueryCursorResult {\n items: TipSettings[];\n query: TipSettingsQueryBuilder;\n next: () => Promise<TipSettingsQueryResult>;\n prev: () => Promise<TipSettingsQueryResult>;\n}\n\nexport interface TipSettingsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: any\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName: 'locationId' | 'paymentTerminalId' | '_id',\n value: string\n ) => TipSettingsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: any[]\n ) => TipSettingsQueryBuilder;\n in: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: any\n ) => TipSettingsQueryBuilder;\n exists: (\n propertyName:\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default',\n value: boolean\n ) => TipSettingsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default'\n >\n ) => TipSettingsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | 'locationId'\n | 'paymentTerminalId'\n | '_id'\n | 'tipType'\n | 'allowCustomerTip'\n | 'allowBusinessTipAtPayment'\n | 'allowCustomAmount'\n | 'allowEditDistribution'\n | 'default'\n >\n ) => TipSettingsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => TipSettingsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => TipSettingsQueryBuilder;\n find: () => Promise<TipSettingsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.tips.settings.v1.TipSettingsService.QueryTipSettings\n * @requiredField query\n */\nexport async function typedQueryTipSettings(\n query: QueryV2\n): Promise<\n NonNullablePaths<\n QueryTipSettingsResponse,\n | `tipSettings`\n | `tipSettings.${number}.tipType`\n | `tipSettings.${number}.staffDistributionMethod`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.queryTipSettings(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: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a `tipSettings` object.\n *\n *\n * You can't update the `default` field.\n * @param tipSettings - Tip settings to update.\n * @public\n * @requiredField tipSettings\n * @param options - Options to use when updating tip settings.\n * @permissionId WIX_TIPS.TIP_SETTINGS_UPDATE\n * @applicableIdentity APP\n * @returns Updated tip settings.\n * @fqn wix.tips.settings.v1.TipSettingsService.UpdateTipSettings\n */\nexport async function updateTipSettings(tipSettings: TipSettings): Promise<\n NonNullablePaths<\n TipSettings,\n `tipType` | `presets` | `staffDistributionMethod`,\n 2\n > & {\n __applicationErrorsType?: UpdateTipSettingsApplicationErrors;\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 tipSettings: tipSettings,\n });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.updateTipSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.tipSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { tipSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['tipSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a `tipSettings` object.\n *\n *\n * You can't create a `tipSettings` object with `{\"default\": true}`.\n * @param tipSettings - Tip settings to create.\n * @public\n * @requiredField tipSettings\n * @permissionId WIX_TIPS.TIP_SETTINGS_CREATE\n * @applicableIdentity APP\n * @returns Created tip settings.\n * @fqn wix.tips.settings.v1.TipSettingsService.CreateTipSettings\n */\nexport async function createTipSettings(tipSettings: TipSettings): Promise<\n NonNullablePaths<\n TipSettings,\n `tipType` | `presets` | `staffDistributionMethod`,\n 2\n > & {\n __applicationErrorsType?: CreateTipSettingsApplicationErrors;\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 tipSettings: tipSettings,\n });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.createTipSettings(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.tipSettings!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { tipSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['tipSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a default `tipSettings` object.\n *\n *\n * The call fails if there is already an existing default `tipSettings` object.\n * @param tipSettings - Default tip settings to create.\n * @public\n * @requiredField tipSettings\n * @permissionId WIX_TIPS.TIP_SETTINGS_CREATE\n * @applicableIdentity APP\n * @fqn wix.tips.settings.v1.TipSettingsService.CreateDefaultTipSettings\n */\nexport async function createDefaultTipSettings(\n tipSettings: TipSettings\n): Promise<\n NonNullablePaths<\n CreateDefaultTipSettingsResponse,\n | `tipSettings.tipType`\n | `tipSettings.presets`\n | `tipSettings.staffDistributionMethod`,\n 3\n > & {\n __applicationErrorsType?: CreateDefaultTipSettingsApplicationErrors;\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 tipSettings: tipSettings,\n });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.createDefaultTipSettings(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: { tipSettings: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['tipSettings']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes a `tipSettings` object.\n *\n *\n * You can't delete the default `tipSettings` object.\n * @param tipSettingsId - ID of the `tipSettings` object to delete.\n * @public\n * @requiredField tipSettingsId\n * @permissionId WIX_TIPS.TIP_SETTINGS_DELETE\n * @applicableIdentity APP\n * @fqn wix.tips.settings.v1.TipSettingsService.DeleteTipSettings\n */\nexport async function deleteTipSettings(tipSettingsId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteTipSettingsApplicationErrors;\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 tipSettingsId: tipSettingsId,\n });\n\n const reqOpts =\n ambassadorWixTipsSettingsV1TipSettings.deleteTipSettings(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: { tipSettingsId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['tipSettingsId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixTipsSettingsV1TipSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/tip-settings',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_tip-settings';\n\n/**\n * Creates a query to retrieve a list of tip settings.\n *\n * The `queryTipSettings()` function builds a query to retrieve a list of tip settings and returns a `TipSettingsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-builder/find) function.\n *\n * You can refine the query by chaining `TipSettingsQueryBuilder` functions onto the query. `TipSettingsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTipSettings()` returns.\n *\n * `queryTipSettings()` runs with the following `TipSettingsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * The functions that are chained to `queryTipSettings()` are applied in the order they are called. For example, if you apply `ascending(\"tipType\")` and then `ascending(\"locationId\")`, the results are sorted first by the `\"tipType\"`, and then, if there are multiple results with the same `\"tipType\"`, the items are sorted by `\"locationId\"`.\n *\n * The following `TipSettingsQueryBuilder` functions are supported for the `queryTipSettings()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-result/items) property in `TipSettingsQueryResult`.\n */\nexport function queryTipSettings(payload: object): RequestOptionsFactory<any> {\n function __queryTipSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.QueryTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryTipSettings;\n}\n\n/**\n * Updates a `tipSettings` object.\n *\n *\n * You can't update the `default` field.\n */\nexport function updateTipSettings(payload: object): RequestOptionsFactory<any> {\n function __updateTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'PATCH' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.UpdateTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateTipSettings;\n}\n\n/**\n * Creates a `tipSettings` object.\n *\n *\n * You can't create a `tipSettings` object with `{\"default\": true}`.\n */\nexport function createTipSettings(payload: object): RequestOptionsFactory<any> {\n function __createTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.CreateTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createTipSettings;\n}\n\n/**\n * Creates a default `tipSettings` object.\n *\n *\n * The call fails if there is already an existing default `tipSettings` object.\n */\nexport function createDefaultTipSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __createDefaultTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.tips.settings.v1.TipSettingsService.CreateDefaultTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/create-default',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createDefaultTipSettings;\n}\n\n/**\n * Deletes a `tipSettings` object.\n *\n *\n * You can't delete the default `tipSettings` object.\n */\nexport function deleteTipSettings(payload: object): RequestOptionsFactory<any> {\n function __deleteTipSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'DELETE' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.DeleteTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/{tipSettingsId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteTipSettings;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA;AAAA,2BAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAA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iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAcA,eAAsBG,0BACpB,aAWA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UACmC,yBAAyB,OAAO;AAEzE,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,uBAAAH;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,aAAa,OAAO;AAAA,QAChD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa;AAAA,IAChB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAcA,eAAsBI,mBAAkB,eAItC;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UACmC,kBAAkB,OAAO;AAElE,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,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,eAAe,OAAO;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,eAAe;AAAA,IAClB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createDefaultTipSettings","createTipSettings","deleteTipSettings","queryTipSettings","updateTipSettings","import_float","import_timestamp","import_rest_modules","payload","import_transform_paths","TipType","StaffDistributionMethod","SortOrder","WebhookIdentityType","queryTipSettings","sdkTransformError","updateTipSettings","createTipSettings","createDefaultTipSettings","deleteTipSettings"]}
|
|
@@ -48,7 +48,7 @@ interface TipSettings extends TipSettingsIdentifierOneOf {
|
|
|
48
48
|
*/
|
|
49
49
|
presets?: Preset[];
|
|
50
50
|
/**
|
|
51
|
-
* Whether
|
|
51
|
+
* Whether customers are allowed to tip during the
|
|
52
52
|
* 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)).
|
|
53
53
|
*
|
|
54
54
|
* Default: `true`
|
|
@@ -280,7 +280,7 @@ interface CursorPaging {
|
|
|
280
280
|
interface QueryTipSettingsResponse {
|
|
281
281
|
/** Retrieved `tipSettings` objects. */
|
|
282
282
|
tipSettings?: TipSettings[];
|
|
283
|
-
/**
|
|
283
|
+
/** Metadata for the paged set of retrieved `tipSettings` objects. */
|
|
284
284
|
pagingMetadata?: PagingMetadataV2;
|
|
285
285
|
}
|
|
286
286
|
interface PagingMetadataV2 {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../meta.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.http.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.types.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.meta.ts"],"sourcesContent":["export * from './src/tips-settings-v1-tip-settings-tip-settings.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixTipsSettingsV1TipSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/tip-settings',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_tip-settings';\n\n/**\n * Creates a query to retrieve a list of tip settings.\n *\n * The `queryTipSettings()` function builds a query to retrieve a list of tip settings and returns a `TipSettingsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-builder/find) function.\n *\n * You can refine the query by chaining `TipSettingsQueryBuilder` functions onto the query. `TipSettingsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTipSettings()` returns.\n *\n * `queryTipSettings()` runs with the following `TipSettingsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * The functions that are chained to `queryTipSettings()` are applied in the order they are called. For example, if you apply `ascending(\"tipType\")` and then `ascending(\"locationId\")`, the results are sorted first by the `\"tipType\"`, and then, if there are multiple results with the same `\"tipType\"`, the items are sorted by `\"locationId\"`.\n *\n * The following `TipSettingsQueryBuilder` functions are supported for the `queryTipSettings()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-result/items) property in `TipSettingsQueryResult`.\n */\nexport function queryTipSettings(payload: object): RequestOptionsFactory<any> {\n function __queryTipSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.QueryTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryTipSettings;\n}\n\n/**\n * Updates a `tipSettings` object.\n *\n *\n * You can't update the `default` field.\n */\nexport function updateTipSettings(payload: object): RequestOptionsFactory<any> {\n function __updateTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'PATCH' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.UpdateTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateTipSettings;\n}\n\n/**\n * Creates a `tipSettings` object.\n *\n *\n * You can't create a `tipSettings` object with `{\"default\": true}`.\n */\nexport function createTipSettings(payload: object): RequestOptionsFactory<any> {\n function __createTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.CreateTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createTipSettings;\n}\n\n/**\n * Creates a default `tipSettings` object.\n *\n *\n * The call fails if there is already an existing default `tipSettings` object.\n */\nexport function createDefaultTipSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __createDefaultTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.tips.settings.v1.TipSettingsService.CreateDefaultTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/create-default',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createDefaultTipSettings;\n}\n\n/**\n * Deletes a `tipSettings` object.\n *\n *\n * You can't delete the default `tipSettings` object.\n */\nexport function deleteTipSettings(payload: object): RequestOptionsFactory<any> {\n function __deleteTipSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'DELETE' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.DeleteTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/{tipSettingsId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteTipSettings;\n}\n","/**\n * Tip settings define how tips are calculated and distributed among staff. When\n * Wix Tips is installed, default settings are automatically created. You can't\n * delete these default settings but you can update them. Creating additional\n * settings allows Wix users to customize tip screens for different payment\n * terminals or set specific presets for various products or services.\n */\nexport interface TipSettings extends TipSettingsIdentifierOneOf {\n /**\n * 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))\n * for which the tip settings apply.\n * @format GUID\n */\n locationId?: string | null;\n /**\n * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't\n * validate the ID you provide.\n *\n * Max: 30 characters\n * @maxLength 30\n */\n paymentTerminalId?: string | null;\n /**\n * ID of the Wix user for whom the tip settings apply. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n userId?: string | null;\n /**\n * ID of the tip settings.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /** Tip type. */\n tipType?: TipTypeWithLiterals;\n /**\n * Information about the tip choices that Wix Tips displays to customers during the\n * 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)).\n *\n * Min: `1` preset\n * Max: `3` presets\n * @minSize 1\n * @maxSize 3\n */\n presets?: Preset[];\n /**\n * Whether customer are allowed to tip during the\n * 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)).\n *\n * Default: `true`\n */\n allowCustomerTip?: boolean | null;\n /**\n * Whether the Wix users are given the option to add a tip during the\n * payment collection flow in their dashboard.\n *\n * Default: `true`\n */\n allowBusinessTipAtPayment?: boolean | null;\n /**\n * Whether customers can enter a custom tip amount. If set to `false`, customers\n * can only select a tip value from the available `presets` and can't enter a\n * custom amount.\n *\n * Default: `true`\n */\n allowCustomAmount?: boolean | null;\n /**\n * Whether Wix users are allowed to edit tip distributions. If set to\n * `false`, Wix users can't edit distributions after they were created.\n *\n * Default: `true`\n */\n allowEditDistribution?: boolean | null;\n /**\n * How the tip is distributed among staff.\n *\n * Supported values:\n * `UNKNOWN_SPLIT_METHOD`: There is no information about the staff distribution method.\n * `EQUAL`: The tip is distributed equally among all staff.\n * `PROPORTIONAL`: The tip is distributed proportionally among staff.\n */\n staffDistributionMethod?: StaffDistributionMethodWithLiterals;\n /**\n * Revision number, which increments by 1 each time `tipSettings` object is\n * updated. To prevent conflicting changes, the current revision must be passed\n * when updating `tipSettings`. Ignored when creating a `tipSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the tip settings were created in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the tip settings were last updated in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Whether these are the default tip settings.\n *\n * Wix Tips automatically creates the default settings during\n * the app's installation. You can't delete these default settings\n * but you can update them. Wix Tips uses the default settings\n * to calculate tips, unless you specify other settings.\n * @readonly\n */\n default?: boolean | null;\n /**\n * ID of the app that has created the settings. See the list of app IDs for\n * 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)).\n * @format GUID\n */\n appId?: string | null;\n /**\n * Custom field data for the `tipSettings` object. Extended fields must be\n * configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/** @oneof */\nexport interface TipSettingsIdentifierOneOf {\n /**\n * 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))\n * for which the tip settings apply.\n * @format GUID\n */\n locationId?: string | null;\n /**\n * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't\n * validate the ID you provide.\n *\n * Max: 30 characters\n * @maxLength 30\n */\n paymentTerminalId?: string | null;\n /**\n * ID of the Wix user for whom the tip settings apply. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n userId?: string | null;\n}\n\nexport enum TipType {\n /** There is no information about the tip type. */\n UNKNOWN_TIP_TYPE = 'UNKNOWN_TIP_TYPE',\n /** The tip is calculated as a percentage of the subtotal of all related line items. */\n PERCENTAGE = 'PERCENTAGE',\n /** The tip is a fixed amount. */\n AMOUNT = 'AMOUNT',\n}\n\n/** @enumType */\nexport type TipTypeWithLiterals =\n | TipType\n | 'UNKNOWN_TIP_TYPE'\n | 'PERCENTAGE'\n | 'AMOUNT';\n\nexport interface Preset {\n /**\n * Value of the preset tip choice that's displayed to customers in the\n * 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)).\n * For example, `5`, `10`, and `15` percent or `1`, `3`, and `5` USD.\n *\n * Min: `0`\n */\n value?: number | null;\n /**\n * Whether this tip choice value is the default preset that's highlighted automatically in the\n * 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)).\n *\n * Default: `false`\n */\n default?: boolean | null;\n}\n\nexport enum StaffDistributionMethod {\n /** There is no information about the staff distribution method. */\n UNKNOWN_SPLIT_METHOD = 'UNKNOWN_SPLIT_METHOD',\n /** All staff receive an equal amount of the tip. */\n EQUAL = 'EQUAL',\n /** Staff receive a proportional amount of the tip. */\n PROPORTIONAL = 'PROPORTIONAL',\n}\n\n/** @enumType */\nexport type StaffDistributionMethodWithLiterals =\n | StaffDistributionMethod\n | 'UNKNOWN_SPLIT_METHOD'\n | 'EQUAL'\n | 'PROPORTIONAL';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface QueryTipSettingsRequest {\n /** WQL expression */\n query: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** 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`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 10\n */\n sort?: Sorting[];\n /**\n * 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.\n * @maxLength 200\n * @maxSize 10\n */\n fields?: string[];\n /**\n * 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.\n * @maxLength 200\n * @maxSize 10\n */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** 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`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryTipSettingsResponse {\n /** Retrieved `tipSettings` objects. */\n tipSettings?: TipSettings[];\n /** Metadate for the paged set of retrieved `tipSettings` objects. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpdateTipSettingsRequest {\n /** Tip settings to update. */\n tipSettings: TipSettings;\n}\n\nexport interface UpdateTipSettingsResponse {\n /** Updated tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface CreateTipSettingsRequest {\n /** Tip settings to create. */\n tipSettings: TipSettings;\n}\n\nexport interface CreateTipSettingsResponse {\n /** Created tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface CreateDefaultTipSettingsRequest {\n /** Default tip settings to create. */\n tipSettings: TipSettings;\n}\n\nexport interface CreateDefaultTipSettingsResponse {\n /** Created default tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface DeleteTipSettingsRequest {\n /**\n * ID of the `tipSettings` object to delete.\n * @format GUID\n */\n tipSettingsId: string | null;\n}\n\nexport interface DeleteTipSettingsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type UpdateTipSettingsApplicationErrors =\n | {\n code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateTipSettingsApplicationErrors =\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateDefaultTipSettingsApplicationErrors =\n | {\n code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteTipSettingsApplicationErrors = {\n code?: 'CANNOT_DELETE_DEFAULT_SETTINGS';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixTipsSettingsV1TipSettings from './tips-settings-v1-tip-settings-tip-settings.http.js';\nimport * as ambassadorWixTipsSettingsV1TipSettingsTypes from './tips-settings-v1-tip-settings-tip-settings.types.js';\nimport * as ambassadorWixTipsSettingsV1TipSettingsUniversalTypes from './tips-settings-v1-tip-settings-tip-settings.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function queryTipSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.QueryTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.QueryTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.QueryTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.QueryTipSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.queryTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/tip-settings/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateTipSettings(): __PublicMethodMetaInfo<\n 'PATCH',\n {},\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.UpdateTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.UpdateTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.UpdateTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.UpdateTipSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.updateTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/tip-settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createTipSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.CreateTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.CreateTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.CreateTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.CreateTipSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.createTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/tip-settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createDefaultTipSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.CreateDefaultTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.CreateDefaultTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.CreateDefaultTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.CreateDefaultTipSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.createDefaultTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/tip-settings/create-default',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteTipSettings(): __PublicMethodMetaInfo<\n 'DELETE',\n { tipSettingsId: string },\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.DeleteTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.DeleteTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.DeleteTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.DeleteTipSettingsResponse\n> {\n const payload = { tipSettingsId: ':tipSettingsId' } as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.deleteTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/tip-settings/{tipSettingsId}',\n pathParams: { tipSettingsId: 'tipSettingsId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n TipSettings as TipSettingsOriginal,\n TipSettingsIdentifierOneOf as TipSettingsIdentifierOneOfOriginal,\n TipType as TipTypeOriginal,\n TipTypeWithLiterals as TipTypeWithLiteralsOriginal,\n Preset as PresetOriginal,\n StaffDistributionMethod as StaffDistributionMethodOriginal,\n StaffDistributionMethodWithLiterals as StaffDistributionMethodWithLiteralsOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n QueryTipSettingsRequest as QueryTipSettingsRequestOriginal,\n QueryV2 as QueryV2Original,\n QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n Paging as PagingOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryTipSettingsResponse as QueryTipSettingsResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\n UpdateTipSettingsRequest as UpdateTipSettingsRequestOriginal,\n UpdateTipSettingsResponse as UpdateTipSettingsResponseOriginal,\n CreateTipSettingsRequest as CreateTipSettingsRequestOriginal,\n CreateTipSettingsResponse as CreateTipSettingsResponseOriginal,\n CreateDefaultTipSettingsRequest as CreateDefaultTipSettingsRequestOriginal,\n CreateDefaultTipSettingsResponse as CreateDefaultTipSettingsResponseOriginal,\n DeleteTipSettingsRequest as DeleteTipSettingsRequestOriginal,\n DeleteTipSettingsResponse as DeleteTipSettingsResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n UpdateTipSettingsApplicationErrors as UpdateTipSettingsApplicationErrorsOriginal,\n CreateTipSettingsApplicationErrors as CreateTipSettingsApplicationErrorsOriginal,\n CreateDefaultTipSettingsApplicationErrors as CreateDefaultTipSettingsApplicationErrorsOriginal,\n DeleteTipSettingsApplicationErrors as DeleteTipSettingsApplicationErrorsOriginal,\n} from './tips-settings-v1-tip-settings-tip-settings.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA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AASC,qBAOd;AACA,QAAM,UAAU,EAAE,eAAe,iBAAiB;AAElD,QAAM,oBACmC,kBAAkB,OAAO;AAElE,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,eAAe,gBAAgB;AAAA,IAC7C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createDefaultTipSettings","createTipSettings","deleteTipSettings","queryTipSettings","updateTipSettings","import_float","import_timestamp","import_rest_modules","payload","TipType","StaffDistributionMethod","SortOrder","WebhookIdentityType","queryTipSettings","updateTipSettings","createTipSettings","createDefaultTipSettings","deleteTipSettings"]}
|
|
1
|
+
{"version":3,"sources":["../../../meta.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.http.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.types.ts","../../../src/tips-settings-v1-tip-settings-tip-settings.meta.ts"],"sourcesContent":["export * from './src/tips-settings-v1-tip-settings-tip-settings.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixTipsSettingsV1TipSettingsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/tip-settings',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/tip-settings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_tip-settings';\n\n/**\n * Creates a query to retrieve a list of tip settings.\n *\n * The `queryTipSettings()` function builds a query to retrieve a list of tip settings and returns a `TipSettingsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-builder/find) function.\n *\n * You can refine the query by chaining `TipSettingsQueryBuilder` functions onto the query. `TipSettingsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTipSettings()` returns.\n *\n * `queryTipSettings()` runs with the following `TipSettingsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `id` in ascending order.\n *\n * The functions that are chained to `queryTipSettings()` are applied in the order they are called. For example, if you apply `ascending(\"tipType\")` and then `ascending(\"locationId\")`, the results are sorted first by the `\"tipType\"`, and then, if there are multiple results with the same `\"tipType\"`, the items are sorted by `\"locationId\"`.\n *\n * The following `TipSettingsQueryBuilder` functions are supported for the `queryTipSettings()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-result/items) property in `TipSettingsQueryResult`.\n */\nexport function queryTipSettings(payload: object): RequestOptionsFactory<any> {\n function __queryTipSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.QueryTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryTipSettings;\n}\n\n/**\n * Updates a `tipSettings` object.\n *\n *\n * You can't update the `default` field.\n */\nexport function updateTipSettings(payload: object): RequestOptionsFactory<any> {\n function __updateTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'PATCH' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.UpdateTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateTipSettings;\n}\n\n/**\n * Creates a `tipSettings` object.\n *\n *\n * You can't create a `tipSettings` object with `{\"default\": true}`.\n */\nexport function createTipSettings(payload: object): RequestOptionsFactory<any> {\n function __createTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.CreateTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createTipSettings;\n}\n\n/**\n * Creates a default `tipSettings` object.\n *\n *\n * The call fails if there is already an existing default `tipSettings` object.\n */\nexport function createDefaultTipSettings(\n payload: object\n): RequestOptionsFactory<any> {\n function __createDefaultTipSettings({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'POST' as any,\n methodFqn:\n 'wix.tips.settings.v1.TipSettingsService.CreateDefaultTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/create-default',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'tipSettings.createdDate' },\n { path: 'tipSettings.updatedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'tipSettings.presets.value' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createDefaultTipSettings;\n}\n\n/**\n * Deletes a `tipSettings` object.\n *\n *\n * You can't delete the default `tipSettings` object.\n */\nexport function deleteTipSettings(payload: object): RequestOptionsFactory<any> {\n function __deleteTipSettings({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.tips.settings.v1.tip_settings',\n method: 'DELETE' as any,\n methodFqn: 'wix.tips.settings.v1.TipSettingsService.DeleteTipSettings',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTipsSettingsV1TipSettingsServiceUrl({\n protoPath: '/v1/tip-settings/{tipSettingsId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteTipSettings;\n}\n","/**\n * Tip settings define how tips are calculated and distributed among staff. When\n * Wix Tips is installed, default settings are automatically created. You can't\n * delete these default settings but you can update them. Creating additional\n * settings allows Wix users to customize tip screens for different payment\n * terminals or set specific presets for various products or services.\n */\nexport interface TipSettings extends TipSettingsIdentifierOneOf {\n /**\n * 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))\n * for which the tip settings apply.\n * @format GUID\n */\n locationId?: string | null;\n /**\n * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't\n * validate the ID you provide.\n *\n * Max: 30 characters\n * @maxLength 30\n */\n paymentTerminalId?: string | null;\n /**\n * ID of the Wix user for whom the tip settings apply. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n userId?: string | null;\n /**\n * ID of the tip settings.\n * @format GUID\n * @readonly\n */\n id?: string | null;\n /** Tip type. */\n tipType?: TipTypeWithLiterals;\n /**\n * Information about the tip choices that Wix Tips displays to customers during the\n * 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)).\n *\n * Min: `1` preset\n * Max: `3` presets\n * @minSize 1\n * @maxSize 3\n */\n presets?: Preset[];\n /**\n * Whether customers are allowed to tip during the\n * 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)).\n *\n * Default: `true`\n */\n allowCustomerTip?: boolean | null;\n /**\n * Whether the Wix users are given the option to add a tip during the\n * payment collection flow in their dashboard.\n *\n * Default: `true`\n */\n allowBusinessTipAtPayment?: boolean | null;\n /**\n * Whether customers can enter a custom tip amount. If set to `false`, customers\n * can only select a tip value from the available `presets` and can't enter a\n * custom amount.\n *\n * Default: `true`\n */\n allowCustomAmount?: boolean | null;\n /**\n * Whether Wix users are allowed to edit tip distributions. If set to\n * `false`, Wix users can't edit distributions after they were created.\n *\n * Default: `true`\n */\n allowEditDistribution?: boolean | null;\n /**\n * How the tip is distributed among staff.\n *\n * Supported values:\n * `UNKNOWN_SPLIT_METHOD`: There is no information about the staff distribution method.\n * `EQUAL`: The tip is distributed equally among all staff.\n * `PROPORTIONAL`: The tip is distributed proportionally among staff.\n */\n staffDistributionMethod?: StaffDistributionMethodWithLiterals;\n /**\n * Revision number, which increments by 1 each time `tipSettings` object is\n * updated. To prevent conflicting changes, the current revision must be passed\n * when updating `tipSettings`. Ignored when creating a `tipSettings` object.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the tip settings were created in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the tip settings were last updated in\n * `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * Whether these are the default tip settings.\n *\n * Wix Tips automatically creates the default settings during\n * the app's installation. You can't delete these default settings\n * but you can update them. Wix Tips uses the default settings\n * to calculate tips, unless you specify other settings.\n * @readonly\n */\n default?: boolean | null;\n /**\n * ID of the app that has created the settings. See the list of app IDs for\n * 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)).\n * @format GUID\n */\n appId?: string | null;\n /**\n * Custom field data for the `tipSettings` object. Extended fields must be\n * configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n}\n\n/** @oneof */\nexport interface TipSettingsIdentifierOneOf {\n /**\n * 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))\n * for which the tip settings apply.\n * @format GUID\n */\n locationId?: string | null;\n /**\n * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't\n * validate the ID you provide.\n *\n * Max: 30 characters\n * @maxLength 30\n */\n paymentTerminalId?: string | null;\n /**\n * ID of the Wix user for whom the tip settings apply. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n userId?: string | null;\n}\n\nexport enum TipType {\n /** There is no information about the tip type. */\n UNKNOWN_TIP_TYPE = 'UNKNOWN_TIP_TYPE',\n /** The tip is calculated as a percentage of the subtotal of all related line items. */\n PERCENTAGE = 'PERCENTAGE',\n /** The tip is a fixed amount. */\n AMOUNT = 'AMOUNT',\n}\n\n/** @enumType */\nexport type TipTypeWithLiterals =\n | TipType\n | 'UNKNOWN_TIP_TYPE'\n | 'PERCENTAGE'\n | 'AMOUNT';\n\nexport interface Preset {\n /**\n * Value of the preset tip choice that's displayed to customers in the\n * 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)).\n * For example, `5`, `10`, and `15` percent or `1`, `3`, and `5` USD.\n *\n * Min: `0`\n */\n value?: number | null;\n /**\n * Whether this tip choice value is the default preset that's highlighted automatically in the\n * 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)).\n *\n * Default: `false`\n */\n default?: boolean | null;\n}\n\nexport enum StaffDistributionMethod {\n /** There is no information about the staff distribution method. */\n UNKNOWN_SPLIT_METHOD = 'UNKNOWN_SPLIT_METHOD',\n /** All staff receive an equal amount of the tip. */\n EQUAL = 'EQUAL',\n /** Staff receive a proportional amount of the tip. */\n PROPORTIONAL = 'PROPORTIONAL',\n}\n\n/** @enumType */\nexport type StaffDistributionMethodWithLiterals =\n | StaffDistributionMethod\n | 'UNKNOWN_SPLIT_METHOD'\n | 'EQUAL'\n | 'PROPORTIONAL';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface QueryTipSettingsRequest {\n /** WQL expression */\n query: QueryV2;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** 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`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 10\n */\n sort?: Sorting[];\n /**\n * 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.\n * @maxLength 200\n * @maxSize 10\n */\n fields?: string[];\n /**\n * 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.\n * @maxLength 200\n * @maxSize 10\n */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n /** 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`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryTipSettingsResponse {\n /** Retrieved `tipSettings` objects. */\n tipSettings?: TipSettings[];\n /** Metadata for the paged set of retrieved `tipSettings` objects. */\n pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface UpdateTipSettingsRequest {\n /** Tip settings to update. */\n tipSettings: TipSettings;\n}\n\nexport interface UpdateTipSettingsResponse {\n /** Updated tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface CreateTipSettingsRequest {\n /** Tip settings to create. */\n tipSettings: TipSettings;\n}\n\nexport interface CreateTipSettingsResponse {\n /** Created tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface CreateDefaultTipSettingsRequest {\n /** Default tip settings to create. */\n tipSettings: TipSettings;\n}\n\nexport interface CreateDefaultTipSettingsResponse {\n /** Created default tip settings. */\n tipSettings?: TipSettings;\n}\n\nexport interface DeleteTipSettingsRequest {\n /**\n * ID of the `tipSettings` object to delete.\n * @format GUID\n */\n tipSettingsId: string | null;\n}\n\nexport interface DeleteTipSettingsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type UpdateTipSettingsApplicationErrors =\n | {\n code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateTipSettingsApplicationErrors =\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CreateDefaultTipSettingsApplicationErrors =\n | {\n code?: 'DEFAULT_SETTINGS_ALREADY_EXISTS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_HAVE_MORE_THAN_ONE_DEFAULT_PRESET';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PRESET_PERCENTAGE_TOO_HIGH';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeleteTipSettingsApplicationErrors = {\n code?: 'CANNOT_DELETE_DEFAULT_SETTINGS';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixTipsSettingsV1TipSettings from './tips-settings-v1-tip-settings-tip-settings.http.js';\nimport * as ambassadorWixTipsSettingsV1TipSettingsTypes from './tips-settings-v1-tip-settings-tip-settings.types.js';\nimport * as ambassadorWixTipsSettingsV1TipSettingsUniversalTypes from './tips-settings-v1-tip-settings-tip-settings.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function queryTipSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.QueryTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.QueryTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.QueryTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.QueryTipSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.queryTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/tip-settings/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function updateTipSettings(): __PublicMethodMetaInfo<\n 'PATCH',\n {},\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.UpdateTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.UpdateTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.UpdateTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.UpdateTipSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.updateTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'PATCH',\n path: '/v1/tip-settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createTipSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.CreateTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.CreateTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.CreateTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.CreateTipSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.createTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/tip-settings',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function createDefaultTipSettings(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.CreateDefaultTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.CreateDefaultTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.CreateDefaultTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.CreateDefaultTipSettingsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.createDefaultTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/tip-settings/create-default',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function deleteTipSettings(): __PublicMethodMetaInfo<\n 'DELETE',\n { tipSettingsId: string },\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.DeleteTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsTypes.DeleteTipSettingsRequest,\n ambassadorWixTipsSettingsV1TipSettingsUniversalTypes.DeleteTipSettingsResponse,\n ambassadorWixTipsSettingsV1TipSettingsTypes.DeleteTipSettingsResponse\n> {\n const payload = { tipSettingsId: ':tipSettingsId' } as any;\n\n const getRequestOptions =\n ambassadorWixTipsSettingsV1TipSettings.deleteTipSettings(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/tip-settings/{tipSettingsId}',\n pathParams: { tipSettingsId: 'tipSettingsId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n TipSettings as TipSettingsOriginal,\n TipSettingsIdentifierOneOf as TipSettingsIdentifierOneOfOriginal,\n TipType as TipTypeOriginal,\n TipTypeWithLiterals as TipTypeWithLiteralsOriginal,\n Preset as PresetOriginal,\n StaffDistributionMethod as StaffDistributionMethodOriginal,\n StaffDistributionMethodWithLiterals as StaffDistributionMethodWithLiteralsOriginal,\n ExtendedFields as ExtendedFieldsOriginal,\n QueryTipSettingsRequest as QueryTipSettingsRequestOriginal,\n QueryV2 as QueryV2Original,\n QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n Paging as PagingOriginal,\n CursorPaging as CursorPagingOriginal,\n QueryTipSettingsResponse as QueryTipSettingsResponseOriginal,\n PagingMetadataV2 as PagingMetadataV2Original,\n Cursors as CursorsOriginal,\n UpdateTipSettingsRequest as UpdateTipSettingsRequestOriginal,\n UpdateTipSettingsResponse as UpdateTipSettingsResponseOriginal,\n CreateTipSettingsRequest as CreateTipSettingsRequestOriginal,\n CreateTipSettingsResponse as CreateTipSettingsResponseOriginal,\n CreateDefaultTipSettingsRequest as CreateDefaultTipSettingsRequestOriginal,\n CreateDefaultTipSettingsResponse as CreateDefaultTipSettingsResponseOriginal,\n DeleteTipSettingsRequest as DeleteTipSettingsRequestOriginal,\n DeleteTipSettingsResponse as DeleteTipSettingsResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n UpdateTipSettingsApplicationErrors as UpdateTipSettingsApplicationErrorsOriginal,\n CreateTipSettingsApplicationErrors as CreateTipSettingsApplicationErrorsOriginal,\n CreateDefaultTipSettingsApplicationErrors as CreateDefaultTipSettingsApplicationErrorsOriginal,\n DeleteTipSettingsApplicationErrors as DeleteTipSettingsApplicationErrorsOriginal,\n} from './tips-settings-v1-tip-settings-tip-settings.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAAAA;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,O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;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,eAAe,gBAAgB;AAAA,IAC7C,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createDefaultTipSettings","createTipSettings","deleteTipSettings","queryTipSettings","updateTipSettings","import_float","import_timestamp","import_rest_modules","payload","TipType","StaffDistributionMethod","SortOrder","WebhookIdentityType","queryTipSettings","updateTipSettings","createTipSettings","createDefaultTipSettings","deleteTipSettings"]}
|