@wix/auto_sdk_ecom_tip-settings 1.0.33 → 1.0.35
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.d.ts +8 -26
- package/build/cjs/index.js +43 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +25 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +8 -26
- package/build/es/index.mjs +43 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +24 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -26
- package/build/internal/cjs/index.js +43 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -1
- package/build/internal/cjs/index.typings.js +25 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -26
- package/build/internal/es/index.mjs +43 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -1
- package/build/internal/es/index.typings.mjs +24 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export { ActionEvent, CreateDefaultTipSettingsRequest, CreateTipSettingsRequest, CreateTipSettingsResponse, CursorPaging, Cursors, DeleteTipSettingsRequest, DeleteTipSettingsResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, Paging, PagingMetadataV2, Preset, QueryTipSettingsRequest, QueryTipSettingsResponse,
|
|
2
|
+
import { TipSettings, UpdateTipSettingsApplicationErrors, CreateTipSettingsApplicationErrors, CreateDefaultTipSettingsResponse, CreateDefaultTipSettingsApplicationErrors, DeleteTipSettingsApplicationErrors, TipSettingsQueryBuilder, QueryV2, typedQueryTipSettings } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, CreateDefaultTipSettingsRequest, CreateTipSettingsRequest, CreateTipSettingsResponse, CursorPaging, Cursors, DeleteTipSettingsRequest, DeleteTipSettingsResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, Paging, PagingMetadataV2, Preset, QueryTipSettingsRequest, QueryTipSettingsResponse, QueryV2PagingMethodOneOf, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, StaffDistributionMethod, StaffDistributionMethodWithLiterals, TipSettingsIdentifierOneOf, TipSettingsQueryResult, TipType, TipTypeWithLiterals, UpdateTipSettingsRequest, UpdateTipSettingsResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
|
-
declare function queryTipSettings$1(httpClient: HttpClient): QueryTipSettingsSignature;
|
|
6
|
-
interface QueryTipSettingsSignature {
|
|
7
|
-
/**
|
|
8
|
-
* Creates a query to retrieve a list of tip settings.
|
|
9
|
-
*
|
|
10
|
-
* The `queryTipSettings()` function builds a query to retrieve a list of tip settings and returns a `TipSettingsQueryBuilder` object.
|
|
11
|
-
*
|
|
12
|
-
* 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.
|
|
13
|
-
*
|
|
14
|
-
* 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.
|
|
15
|
-
*
|
|
16
|
-
* `queryTipSettings()` runs with the following `TipSettingsQueryBuilder` default that you can override:
|
|
17
|
-
*
|
|
18
|
-
* + `limit` is `50`.
|
|
19
|
-
* + Sorted by `id` in ascending order.
|
|
20
|
-
*
|
|
21
|
-
* 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"`.
|
|
22
|
-
*
|
|
23
|
-
* 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`.
|
|
24
|
-
*/
|
|
25
|
-
(): TipSettingsQueryBuilder;
|
|
26
|
-
}
|
|
27
5
|
declare function updateTipSettings$1(httpClient: HttpClient): UpdateTipSettingsSignature;
|
|
28
6
|
interface UpdateTipSettingsSignature {
|
|
29
7
|
/**
|
|
@@ -80,10 +58,14 @@ interface DeleteTipSettingsSignature {
|
|
|
80
58
|
}>;
|
|
81
59
|
}
|
|
82
60
|
|
|
83
|
-
declare
|
|
61
|
+
declare function customQueryTipSettings(httpClient: HttpClient): {
|
|
62
|
+
(): TipSettingsQueryBuilder;
|
|
63
|
+
(query: QueryV2): ReturnType<typeof typedQueryTipSettings>;
|
|
64
|
+
};
|
|
84
65
|
declare const updateTipSettings: MaybeContext<BuildRESTFunction<typeof updateTipSettings$1> & typeof updateTipSettings$1>;
|
|
85
66
|
declare const createTipSettings: MaybeContext<BuildRESTFunction<typeof createTipSettings$1> & typeof createTipSettings$1>;
|
|
86
67
|
declare const createDefaultTipSettings: MaybeContext<BuildRESTFunction<typeof createDefaultTipSettings$1> & typeof createDefaultTipSettings$1>;
|
|
87
68
|
declare const deleteTipSettings: MaybeContext<BuildRESTFunction<typeof deleteTipSettings$1> & typeof deleteTipSettings$1>;
|
|
69
|
+
declare const queryTipSettings: MaybeContext<BuildRESTFunction<typeof customQueryTipSettings> & typeof customQueryTipSettings>;
|
|
88
70
|
|
|
89
|
-
export { CreateDefaultTipSettingsApplicationErrors, CreateDefaultTipSettingsResponse, CreateTipSettingsApplicationErrors, DeleteTipSettingsApplicationErrors, TipSettings, TipSettingsQueryBuilder, UpdateTipSettingsApplicationErrors, createDefaultTipSettings, createTipSettings, deleteTipSettings, queryTipSettings, updateTipSettings };
|
|
71
|
+
export { CreateDefaultTipSettingsApplicationErrors, CreateDefaultTipSettingsResponse, CreateTipSettingsApplicationErrors, DeleteTipSettingsApplicationErrors, QueryV2, TipSettings, TipSettingsQueryBuilder, UpdateTipSettingsApplicationErrors, createDefaultTipSettings, createTipSettings, deleteTipSettings, queryTipSettings, updateTipSettings };
|
package/build/cjs/index.js
CHANGED
|
@@ -353,6 +353,29 @@ function queryTipSettings2() {
|
|
|
353
353
|
transformationPaths: {}
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
+
async function typedQueryTipSettings(query) {
|
|
357
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
358
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
359
|
+
const reqOpts = queryTipSettings(payload);
|
|
360
|
+
sideEffects?.onSiteCall?.();
|
|
361
|
+
try {
|
|
362
|
+
const result = await httpClient.request(reqOpts);
|
|
363
|
+
sideEffects?.onSuccess?.(result);
|
|
364
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
365
|
+
} catch (err) {
|
|
366
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
367
|
+
err,
|
|
368
|
+
{
|
|
369
|
+
spreadPathsToArguments: {},
|
|
370
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
371
|
+
singleArgumentUnchanged: false
|
|
372
|
+
},
|
|
373
|
+
["query"]
|
|
374
|
+
);
|
|
375
|
+
sideEffects?.onError?.(err);
|
|
376
|
+
throw transformedError;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
356
379
|
async function updateTipSettings2(tipSettings) {
|
|
357
380
|
const { httpClient, sideEffects } = arguments[1];
|
|
358
381
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -461,6 +484,13 @@ function queryTipSettings3(httpClient) {
|
|
|
461
484
|
{ httpClient }
|
|
462
485
|
);
|
|
463
486
|
}
|
|
487
|
+
function typedQueryTipSettings2(httpClient) {
|
|
488
|
+
return (query) => typedQueryTipSettings(
|
|
489
|
+
query,
|
|
490
|
+
// @ts-ignore
|
|
491
|
+
{ httpClient }
|
|
492
|
+
);
|
|
493
|
+
}
|
|
464
494
|
function updateTipSettings3(httpClient) {
|
|
465
495
|
return (tipSettings) => updateTipSettings2(
|
|
466
496
|
tipSettings,
|
|
@@ -492,11 +522,23 @@ function deleteTipSettings3(httpClient) {
|
|
|
492
522
|
|
|
493
523
|
// src/tips-settings-v1-tip-settings-tip-settings.context.ts
|
|
494
524
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
495
|
-
var
|
|
525
|
+
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
526
|
+
function customQueryTipSettings(httpClient) {
|
|
527
|
+
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
528
|
+
builderQueryFunction: () => queryTipSettings3(httpClient)(),
|
|
529
|
+
typedQueryFunction: (query) => typedQueryTipSettings2(httpClient)(query),
|
|
530
|
+
hasOptionsParameter: false
|
|
531
|
+
});
|
|
532
|
+
function overloadedQuery(query) {
|
|
533
|
+
return router(...arguments);
|
|
534
|
+
}
|
|
535
|
+
return overloadedQuery;
|
|
536
|
+
}
|
|
496
537
|
var updateTipSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateTipSettings3);
|
|
497
538
|
var createTipSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createTipSettings3);
|
|
498
539
|
var createDefaultTipSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDefaultTipSettings3);
|
|
499
540
|
var deleteTipSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteTipSettings3);
|
|
541
|
+
var queryTipSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryTipSettings);
|
|
500
542
|
// Annotate the CommonJS export names for ESM import in node:
|
|
501
543
|
0 && (module.exports = {
|
|
502
544
|
SortOrder,
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/tips-settings-v1-tip-settings-tip-settings.universal.ts","../../src/tips-settings-v1-tip-settings-tip-settings.http.ts","../../src/tips-settings-v1-tip-settings-tip-settings.public.ts","../../src/tips-settings-v1-tip-settings-tip-settings.context.ts"],"sourcesContent":["export * from './src/tips-settings-v1-tip-settings-tip-settings.context.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 * 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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateDefaultTipSettingsApplicationErrors,\n CreateDefaultTipSettingsResponse,\n CreateTipSettingsApplicationErrors,\n DeleteTipSettingsApplicationErrors,\n TipSettings,\n TipSettingsQueryBuilder,\n UpdateTipSettingsApplicationErrors,\n createDefaultTipSettings as universalCreateDefaultTipSettings,\n createTipSettings as universalCreateTipSettings,\n deleteTipSettings as universalDeleteTipSettings,\n queryTipSettings as universalQueryTipSettings,\n updateTipSettings as universalUpdateTipSettings,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function queryTipSettings(\n httpClient: HttpClient\n): QueryTipSettingsSignature {\n return () =>\n universalQueryTipSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryTipSettingsSignature {\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 */\n (): TipSettingsQueryBuilder;\n}\n\nexport function updateTipSettings(\n httpClient: HttpClient\n): UpdateTipSettingsSignature {\n return (tipSettings: TipSettings) =>\n universalUpdateTipSettings(\n tipSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateTipSettingsSignature {\n /**\n * Updates a `tipSettings` object.\n *\n *\n * You can't update the `default` field.\n * @param - Tip settings to update.\n * @param - Options to use when updating tip settings.\n * @returns Updated tip settings.\n */\n (tipSettings: TipSettings): Promise<\n NonNullablePaths<\n TipSettings,\n `tipType` | `presets` | `staffDistributionMethod`,\n 2\n > & {\n __applicationErrorsType?: UpdateTipSettingsApplicationErrors;\n }\n >;\n}\n\nexport function createTipSettings(\n httpClient: HttpClient\n): CreateTipSettingsSignature {\n return (tipSettings: TipSettings) =>\n universalCreateTipSettings(\n tipSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateTipSettingsSignature {\n /**\n * Creates a `tipSettings` object.\n *\n *\n * You can't create a `tipSettings` object with `{\"default\": true}`.\n * @param - Tip settings to create.\n * @returns Created tip settings.\n */\n (tipSettings: TipSettings): Promise<\n NonNullablePaths<\n TipSettings,\n `tipType` | `presets` | `staffDistributionMethod`,\n 2\n > & {\n __applicationErrorsType?: CreateTipSettingsApplicationErrors;\n }\n >;\n}\n\nexport function createDefaultTipSettings(\n httpClient: HttpClient\n): CreateDefaultTipSettingsSignature {\n return (tipSettings: TipSettings) =>\n universalCreateDefaultTipSettings(\n tipSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateDefaultTipSettingsSignature {\n /**\n * Creates a default `tipSettings` object.\n *\n *\n * The call fails if there is already an existing default `tipSettings` object.\n * @param - Default tip settings to create.\n */\n (tipSettings: TipSettings): Promise<\n NonNullablePaths<\n CreateDefaultTipSettingsResponse,\n | `tipSettings.tipType`\n | `tipSettings.presets`\n | `tipSettings.staffDistributionMethod`,\n 3\n > & {\n __applicationErrorsType?: CreateDefaultTipSettingsApplicationErrors;\n }\n >;\n}\n\nexport function deleteTipSettings(\n httpClient: HttpClient\n): DeleteTipSettingsSignature {\n return (tipSettingsId: string) =>\n universalDeleteTipSettings(\n tipSettingsId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteTipSettingsSignature {\n /**\n * Deletes a `tipSettings` object.\n *\n *\n * You can't delete the default `tipSettings` object.\n * @param - ID of the `tipSettings` object to delete.\n */\n (tipSettingsId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteTipSettingsApplicationErrors;\n }\n >;\n}\n\nexport {\n ActionEvent,\n CreateDefaultTipSettingsRequest,\n CreateDefaultTipSettingsResponse,\n CreateTipSettingsRequest,\n CreateTipSettingsResponse,\n CursorPaging,\n Cursors,\n DeleteTipSettingsRequest,\n DeleteTipSettingsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n Paging,\n PagingMetadataV2,\n Preset,\n QueryTipSettingsRequest,\n QueryTipSettingsResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n RestoreInfo,\n SortOrder,\n Sorting,\n StaffDistributionMethod,\n TipSettings,\n TipSettingsIdentifierOneOf,\n TipSettingsQueryBuilder,\n TipSettingsQueryResult,\n TipType,\n UpdateTipSettingsRequest,\n UpdateTipSettingsResponse,\n WebhookIdentityType,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.js';\n","import {\n queryTipSettings as publicQueryTipSettings,\n updateTipSettings as publicUpdateTipSettings,\n createTipSettings as publicCreateTipSettings,\n createDefaultTipSettings as publicCreateDefaultTipSettings,\n deleteTipSettings as publicDeleteTipSettings,\n} from './tips-settings-v1-tip-settings-tip-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const queryTipSettings: MaybeContext<\n BuildRESTFunction<typeof publicQueryTipSettings> &\n typeof publicQueryTipSettings\n> = /*#__PURE__*/ createRESTModule(publicQueryTipSettings);\nexport const updateTipSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateTipSettings> &\n typeof publicUpdateTipSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateTipSettings);\nexport const createTipSettings: MaybeContext<\n BuildRESTFunction<typeof publicCreateTipSettings> &\n typeof publicCreateTipSettings\n> = /*#__PURE__*/ createRESTModule(publicCreateTipSettings);\nexport const createDefaultTipSettings: MaybeContext<\n BuildRESTFunction<typeof publicCreateDefaultTipSettings> &\n typeof publicCreateDefaultTipSettings\n> = /*#__PURE__*/ createRESTModule(publicCreateDefaultTipSettings);\nexport const deleteTipSettings: MaybeContext<\n BuildRESTFunction<typeof publicDeleteTipSettings> &\n typeof publicDeleteTipSettings\n> = /*#__PURE__*/ createRESTModule(publicDeleteTipSettings);\n\nexport {\n TipType,\n StaffDistributionMethod,\n SortOrder,\n WebhookIdentityType,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.js';\nexport {\n TipSettings,\n TipSettingsIdentifierOneOf,\n Preset,\n ExtendedFields,\n QueryTipSettingsRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n Paging,\n CursorPaging,\n QueryTipSettingsResponse,\n PagingMetadataV2,\n Cursors,\n UpdateTipSettingsRequest,\n UpdateTipSettingsResponse,\n CreateTipSettingsRequest,\n CreateTipSettingsResponse,\n CreateDefaultTipSettingsRequest,\n CreateDefaultTipSettingsResponse,\n DeleteTipSettingsRequest,\n DeleteTipSettingsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n TipSettingsQueryResult,\n TipSettingsQueryBuilder,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.js';\nexport {\n TipTypeWithLiterals,\n StaffDistributionMethodWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpdateTipSettingsApplicationErrors,\n CreateTipSettingsApplicationErrors,\n CreateDefaultTipSettingsApplicationErrors,\n DeleteTipSettingsApplicationErrors,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.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,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;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,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAoBd,SAAS,iBAAiB,SAA6C;AAC5E,WAAS,mBAAmB,EAAE,KAAK,GAAQ;AACzC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,kBAAkB;AAAA,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;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;;;AEniCO,SAASK,kBACd,YAC2B;AAC3B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAwBO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CAAC,gBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CAAC,gBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAsBO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,gBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CAAC,kBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnJA,IAAAC,uBAAiC;AAG1B,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,qBAGK,2DAAiBA,kBAAuB;","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","queryTipSettings","updateTipSettings","createTipSettings","createDefaultTipSettings","deleteTipSettings","import_rest_modules","queryTipSettings","updateTipSettings","createTipSettings","createDefaultTipSettings","deleteTipSettings"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/tips-settings-v1-tip-settings-tip-settings.universal.ts","../../src/tips-settings-v1-tip-settings-tip-settings.http.ts","../../src/tips-settings-v1-tip-settings-tip-settings.public.ts","../../src/tips-settings-v1-tip-settings-tip-settings.context.ts"],"sourcesContent":["export * from './src/tips-settings-v1-tip-settings-tip-settings.context.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","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateDefaultTipSettingsApplicationErrors,\n CreateDefaultTipSettingsResponse,\n CreateTipSettingsApplicationErrors,\n DeleteTipSettingsApplicationErrors,\n QueryTipSettingsResponse,\n QueryV2,\n TipSettings,\n TipSettingsQueryBuilder,\n UpdateTipSettingsApplicationErrors,\n createDefaultTipSettings as universalCreateDefaultTipSettings,\n createTipSettings as universalCreateTipSettings,\n deleteTipSettings as universalDeleteTipSettings,\n queryTipSettings as universalQueryTipSettings,\n typedQueryTipSettings as universalTypedQueryTipSettings,\n updateTipSettings as universalUpdateTipSettings,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/ecom' };\n\nexport function queryTipSettings(\n httpClient: HttpClient\n): QueryTipSettingsSignature {\n return () =>\n universalQueryTipSettings(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryTipSettingsSignature {\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 */\n (): TipSettingsQueryBuilder;\n}\n\nexport function typedQueryTipSettings(\n httpClient: HttpClient\n): TypedQueryTipSettingsSignature {\n return (query: QueryV2) =>\n universalTypedQueryTipSettings(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryTipSettingsSignature {\n /** */\n (query: QueryV2): Promise<\n NonNullablePaths<\n QueryTipSettingsResponse,\n | `tipSettings`\n | `tipSettings.${number}.tipType`\n | `tipSettings.${number}.staffDistributionMethod`,\n 4\n >\n >;\n}\n\nexport function updateTipSettings(\n httpClient: HttpClient\n): UpdateTipSettingsSignature {\n return (tipSettings: TipSettings) =>\n universalUpdateTipSettings(\n tipSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateTipSettingsSignature {\n /**\n * Updates a `tipSettings` object.\n *\n *\n * You can't update the `default` field.\n * @param - Tip settings to update.\n * @param - Options to use when updating tip settings.\n * @returns Updated tip settings.\n */\n (tipSettings: TipSettings): Promise<\n NonNullablePaths<\n TipSettings,\n `tipType` | `presets` | `staffDistributionMethod`,\n 2\n > & {\n __applicationErrorsType?: UpdateTipSettingsApplicationErrors;\n }\n >;\n}\n\nexport function createTipSettings(\n httpClient: HttpClient\n): CreateTipSettingsSignature {\n return (tipSettings: TipSettings) =>\n universalCreateTipSettings(\n tipSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateTipSettingsSignature {\n /**\n * Creates a `tipSettings` object.\n *\n *\n * You can't create a `tipSettings` object with `{\"default\": true}`.\n * @param - Tip settings to create.\n * @returns Created tip settings.\n */\n (tipSettings: TipSettings): Promise<\n NonNullablePaths<\n TipSettings,\n `tipType` | `presets` | `staffDistributionMethod`,\n 2\n > & {\n __applicationErrorsType?: CreateTipSettingsApplicationErrors;\n }\n >;\n}\n\nexport function createDefaultTipSettings(\n httpClient: HttpClient\n): CreateDefaultTipSettingsSignature {\n return (tipSettings: TipSettings) =>\n universalCreateDefaultTipSettings(\n tipSettings,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateDefaultTipSettingsSignature {\n /**\n * Creates a default `tipSettings` object.\n *\n *\n * The call fails if there is already an existing default `tipSettings` object.\n * @param - Default tip settings to create.\n */\n (tipSettings: TipSettings): Promise<\n NonNullablePaths<\n CreateDefaultTipSettingsResponse,\n | `tipSettings.tipType`\n | `tipSettings.presets`\n | `tipSettings.staffDistributionMethod`,\n 3\n > & {\n __applicationErrorsType?: CreateDefaultTipSettingsApplicationErrors;\n }\n >;\n}\n\nexport function deleteTipSettings(\n httpClient: HttpClient\n): DeleteTipSettingsSignature {\n return (tipSettingsId: string) =>\n universalDeleteTipSettings(\n tipSettingsId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteTipSettingsSignature {\n /**\n * Deletes a `tipSettings` object.\n *\n *\n * You can't delete the default `tipSettings` object.\n * @param - ID of the `tipSettings` object to delete.\n */\n (tipSettingsId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteTipSettingsApplicationErrors;\n }\n >;\n}\n\nexport {\n ActionEvent,\n CreateDefaultTipSettingsRequest,\n CreateDefaultTipSettingsResponse,\n CreateTipSettingsRequest,\n CreateTipSettingsResponse,\n CursorPaging,\n Cursors,\n DeleteTipSettingsRequest,\n DeleteTipSettingsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n Paging,\n PagingMetadataV2,\n Preset,\n QueryTipSettingsRequest,\n QueryTipSettingsResponse,\n QueryV2,\n QueryV2PagingMethodOneOf,\n RestoreInfo,\n SortOrder,\n Sorting,\n StaffDistributionMethod,\n TipSettings,\n TipSettingsIdentifierOneOf,\n TipSettingsQueryBuilder,\n TipSettingsQueryResult,\n TipType,\n UpdateTipSettingsRequest,\n UpdateTipSettingsResponse,\n WebhookIdentityType,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.js';\n","import {\n queryTipSettings as publicQueryTipSettings,\n typedQueryTipSettings as publicTypedQueryTipSettings,\n updateTipSettings as publicUpdateTipSettings,\n createTipSettings as publicCreateTipSettings,\n createDefaultTipSettings as publicCreateDefaultTipSettings,\n deleteTipSettings as publicDeleteTipSettings,\n} from './tips-settings-v1-tip-settings-tip-settings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n QueryV2,\n TipSettingsQueryBuilder,\n typedQueryTipSettings as universalTypedQueryTipSettings,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.js';\n\nfunction customQueryTipSettings(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryTipSettings(httpClient)(),\n typedQueryFunction: (query: QueryV2) =>\n publicTypedQueryTipSettings(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): TipSettingsQueryBuilder;\n function overloadedQuery(\n query: QueryV2\n ): ReturnType<typeof universalTypedQueryTipSettings>;\n function overloadedQuery(query?: QueryV2): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const updateTipSettings: MaybeContext<\n BuildRESTFunction<typeof publicUpdateTipSettings> &\n typeof publicUpdateTipSettings\n> = /*#__PURE__*/ createRESTModule(publicUpdateTipSettings);\nexport const createTipSettings: MaybeContext<\n BuildRESTFunction<typeof publicCreateTipSettings> &\n typeof publicCreateTipSettings\n> = /*#__PURE__*/ createRESTModule(publicCreateTipSettings);\nexport const createDefaultTipSettings: MaybeContext<\n BuildRESTFunction<typeof publicCreateDefaultTipSettings> &\n typeof publicCreateDefaultTipSettings\n> = /*#__PURE__*/ createRESTModule(publicCreateDefaultTipSettings);\nexport const deleteTipSettings: MaybeContext<\n BuildRESTFunction<typeof publicDeleteTipSettings> &\n typeof publicDeleteTipSettings\n> = /*#__PURE__*/ createRESTModule(publicDeleteTipSettings);\nexport const queryTipSettings: MaybeContext<\n BuildRESTFunction<typeof customQueryTipSettings> &\n typeof customQueryTipSettings\n> = /*#__PURE__*/ createRESTModule(customQueryTipSettings);\n\nexport {\n TipType,\n StaffDistributionMethod,\n SortOrder,\n WebhookIdentityType,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.js';\nexport {\n TipSettings,\n TipSettingsIdentifierOneOf,\n Preset,\n ExtendedFields,\n QueryTipSettingsRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n Paging,\n CursorPaging,\n QueryTipSettingsResponse,\n PagingMetadataV2,\n Cursors,\n UpdateTipSettingsRequest,\n UpdateTipSettingsResponse,\n CreateTipSettingsRequest,\n CreateTipSettingsResponse,\n CreateDefaultTipSettingsRequest,\n CreateDefaultTipSettingsResponse,\n DeleteTipSettingsRequest,\n DeleteTipSettingsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n TipSettingsQueryResult,\n TipSettingsQueryBuilder,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.js';\nexport {\n TipTypeWithLiterals,\n StaffDistributionMethodWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpdateTipSettingsApplicationErrors,\n CreateTipSettingsApplicationErrors,\n CreateDefaultTipSettingsApplicationErrors,\n DeleteTipSettingsApplicationErrors,\n} from './tips-settings-v1-tip-settings-tip-settings.universal.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,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;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,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAoBd,SAAS,iBAAiB,SAA6C;AAC5E,WAAS,mBAAmB,EAAE,KAAK,GAAQ;AACzC,UAAM,WAAW;AAAA,MACf,YAAY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;AAAA,EACf;AACJ;AAsBO,SAASC,0BACd,YACmC;AACnC,SAAO,CAAC,gBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAuBO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CAAC,kBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC7KA,IAAAC,uBAAiC;AAGjC,iCAA0C;AAO1C,SAAS,uBAAuB,YAAwB;AACtD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,kBAAuB,UAAU,EAAE;AAAA,IAC/D,oBAAoB,CAAC,UACnBC,uBAA4B,UAAU,EAAE,KAAK;AAAA,IAC/C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAAsB;AAC7C,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAML,oBAGK,2DAAiB,sBAAsB;","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","queryTipSettings","typedQueryTipSettings","updateTipSettings","createTipSettings","createDefaultTipSettings","deleteTipSettings","import_rest_modules","queryTipSettings","typedQueryTipSettings","updateTipSettings","createTipSettings","createDefaultTipSettings","deleteTipSettings"]}
|
|
@@ -618,6 +618,12 @@ interface TipSettingsQueryBuilder {
|
|
|
618
618
|
/** @documentationMaturity preview */
|
|
619
619
|
find: () => Promise<TipSettingsQueryResult>;
|
|
620
620
|
}
|
|
621
|
+
/**
|
|
622
|
+
* @hidden
|
|
623
|
+
* @fqn wix.tips.settings.v1.TipSettingsService.QueryTipSettings
|
|
624
|
+
* @requiredField query
|
|
625
|
+
*/
|
|
626
|
+
declare function typedQueryTipSettings(query: QueryV2): Promise<NonNullablePaths<QueryTipSettingsResponse, `tipSettings` | `tipSettings.${number}.tipType` | `tipSettings.${number}.staffDistributionMethod`, 4>>;
|
|
621
627
|
/**
|
|
622
628
|
* Updates a `tipSettings` object.
|
|
623
629
|
*
|
|
@@ -686,4 +692,4 @@ declare function deleteTipSettings(tipSettingsId: string): Promise<void & {
|
|
|
686
692
|
__applicationErrorsType?: DeleteTipSettingsApplicationErrors;
|
|
687
693
|
}>;
|
|
688
694
|
|
|
689
|
-
export { type ActionEvent, type CreateDefaultTipSettingsApplicationErrors, type CreateDefaultTipSettingsRequest, type CreateDefaultTipSettingsResponse, type CreateTipSettingsApplicationErrors, type CreateTipSettingsRequest, type CreateTipSettingsResponse, type CursorPaging, type Cursors, type DeleteTipSettingsApplicationErrors, type DeleteTipSettingsRequest, type DeleteTipSettingsResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type Paging, type PagingMetadataV2, type Preset, type QueryTipSettingsRequest, type QueryTipSettingsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, StaffDistributionMethod, type StaffDistributionMethodWithLiterals, type TipSettings, type TipSettingsIdentifierOneOf, type TipSettingsQueryBuilder, type TipSettingsQueryResult, TipType, type TipTypeWithLiterals, type UpdateTipSettingsApplicationErrors, type UpdateTipSettingsRequest, type UpdateTipSettingsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createDefaultTipSettings, createTipSettings, deleteTipSettings, queryTipSettings, updateTipSettings };
|
|
695
|
+
export { type ActionEvent, type CreateDefaultTipSettingsApplicationErrors, type CreateDefaultTipSettingsRequest, type CreateDefaultTipSettingsResponse, type CreateTipSettingsApplicationErrors, type CreateTipSettingsRequest, type CreateTipSettingsResponse, type CursorPaging, type Cursors, type DeleteTipSettingsApplicationErrors, type DeleteTipSettingsRequest, type DeleteTipSettingsResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type Paging, type PagingMetadataV2, type Preset, type QueryTipSettingsRequest, type QueryTipSettingsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, StaffDistributionMethod, type StaffDistributionMethodWithLiterals, type TipSettings, type TipSettingsIdentifierOneOf, type TipSettingsQueryBuilder, type TipSettingsQueryResult, TipType, type TipTypeWithLiterals, type UpdateTipSettingsApplicationErrors, type UpdateTipSettingsRequest, type UpdateTipSettingsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createDefaultTipSettings, createTipSettings, deleteTipSettings, queryTipSettings, typedQueryTipSettings, updateTipSettings };
|
|
@@ -28,6 +28,7 @@ __export(index_typings_exports, {
|
|
|
28
28
|
createTipSettings: () => createTipSettings2,
|
|
29
29
|
deleteTipSettings: () => deleteTipSettings2,
|
|
30
30
|
queryTipSettings: () => queryTipSettings2,
|
|
31
|
+
typedQueryTipSettings: () => typedQueryTipSettings,
|
|
31
32
|
updateTipSettings: () => updateTipSettings2
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(index_typings_exports);
|
|
@@ -353,6 +354,29 @@ function queryTipSettings2() {
|
|
|
353
354
|
transformationPaths: {}
|
|
354
355
|
});
|
|
355
356
|
}
|
|
357
|
+
async function typedQueryTipSettings(query) {
|
|
358
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
359
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
360
|
+
const reqOpts = queryTipSettings(payload);
|
|
361
|
+
sideEffects?.onSiteCall?.();
|
|
362
|
+
try {
|
|
363
|
+
const result = await httpClient.request(reqOpts);
|
|
364
|
+
sideEffects?.onSuccess?.(result);
|
|
365
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
366
|
+
} catch (err) {
|
|
367
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
368
|
+
err,
|
|
369
|
+
{
|
|
370
|
+
spreadPathsToArguments: {},
|
|
371
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
372
|
+
singleArgumentUnchanged: false
|
|
373
|
+
},
|
|
374
|
+
["query"]
|
|
375
|
+
);
|
|
376
|
+
sideEffects?.onError?.(err);
|
|
377
|
+
throw transformedError;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
356
380
|
async function updateTipSettings2(tipSettings) {
|
|
357
381
|
const { httpClient, sideEffects } = arguments[1];
|
|
358
382
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -463,6 +487,7 @@ async function deleteTipSettings2(tipSettingsId) {
|
|
|
463
487
|
createTipSettings,
|
|
464
488
|
deleteTipSettings,
|
|
465
489
|
queryTipSettings,
|
|
490
|
+
typedQueryTipSettings,
|
|
466
491
|
updateTipSettings
|
|
467
492
|
});
|
|
468
493
|
//# sourceMappingURL=index.typings.js.map
|