@wix/auto_sdk_ecom_tip-settings 1.0.0
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 +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.context.d.ts +9 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.context.js +16 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.context.js.map +1 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.http.d.ts +48 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.http.js +274 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.http.js.map +1 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.meta.d.ts +19 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.meta.js +123 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.meta.js.map +1 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.public.d.ts +75 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.public.js +41 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.public.js.map +1 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.types.d.ts +432 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.types.js +35 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.types.js.map +1 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.universal.d.ts +589 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.universal.js +300 -0
- package/build/cjs/src/tips-settings-v1-tip-settings-tip-settings.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.context.d.ts +9 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.context.js +9 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.context.js.map +1 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.http.d.ts +48 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.http.js +266 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.http.js.map +1 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.meta.d.ts +19 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.meta.js +92 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.meta.js.map +1 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.public.d.ts +75 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.public.js +29 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.public.js.map +1 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.types.d.ts +432 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.types.js +32 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.types.js.map +1 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.universal.d.ts +589 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.universal.js +269 -0
- package/build/es/src/tips-settings-v1-tip-settings-tip-settings.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.context.d.ts +9 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.context.js +16 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.context.js.map +1 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.http.d.ts +48 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.http.js +274 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.http.js.map +1 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.meta.d.ts +19 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.meta.js +123 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.meta.js.map +1 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.public.d.ts +75 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.public.js +41 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.public.js.map +1 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.types.d.ts +432 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.types.js +35 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.types.js.map +1 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.universal.d.ts +589 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.universal.js +300 -0
- package/build/internal/cjs/src/tips-settings-v1-tip-settings-tip-settings.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.context.d.ts +9 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.context.js +9 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.context.js.map +1 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.http.d.ts +48 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.http.js +266 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.http.js.map +1 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.meta.d.ts +19 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.meta.js +92 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.meta.js.map +1 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.public.d.ts +75 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.public.js +29 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.public.js.map +1 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.types.d.ts +432 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.types.js +32 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.types.js.map +1 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.universal.d.ts +589 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.universal.js +269 -0
- package/build/internal/es/src/tips-settings-v1-tip-settings-tip-settings.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tip settings define how tips are calculated and distributed among staff. When
|
|
3
|
+
* Wix Tips is installed, default settings are automatically created. You can't
|
|
4
|
+
* delete these default settings but you can update them. Creating additional
|
|
5
|
+
* settings allows business owners to customize tip screens for different payment
|
|
6
|
+
* terminals or set specific presets for various products or services.
|
|
7
|
+
*/
|
|
8
|
+
export interface TipSettings extends TipSettingsIdentifierOneOf {
|
|
9
|
+
/**
|
|
10
|
+
* ID of the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object)
|
|
11
|
+
* for which the tip settings apply.
|
|
12
|
+
*/
|
|
13
|
+
locationId?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* ID of the payment terminal for which the tip settings apply. Wix Tips doesn't
|
|
16
|
+
* validate the ID you provide.
|
|
17
|
+
*
|
|
18
|
+
* Max: 30 characters
|
|
19
|
+
*/
|
|
20
|
+
paymentTerminalId?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* ID of the Wix user for whom the tip settings apply. For example, the site owner or a
|
|
23
|
+
* [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).
|
|
24
|
+
*/
|
|
25
|
+
userId?: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* ID of the tip settings.
|
|
28
|
+
* @readonly
|
|
29
|
+
*/
|
|
30
|
+
id?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Tip type.
|
|
33
|
+
*
|
|
34
|
+
* Supported values:
|
|
35
|
+
* + `UNKNOWN_TIP_TYPE`: There is no information about the tip type.
|
|
36
|
+
* + `PERCENTAGE`: The tip is calculated as a percentage of the subtotal for all related line items.
|
|
37
|
+
* + `AMOUNT`: The tip is a fixed amount.
|
|
38
|
+
*/
|
|
39
|
+
tipType?: TipType;
|
|
40
|
+
/**
|
|
41
|
+
* Information about the tip choices that Wix Tips displays to customers during the
|
|
42
|
+
* [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/checkout-object).
|
|
43
|
+
*
|
|
44
|
+
* Min: `1` preset
|
|
45
|
+
* Max: `3` presets
|
|
46
|
+
*/
|
|
47
|
+
presets?: Preset[];
|
|
48
|
+
/**
|
|
49
|
+
* Whether customer are allowed to tip during the
|
|
50
|
+
* [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/checkout-object).
|
|
51
|
+
*
|
|
52
|
+
* Default: `true`
|
|
53
|
+
*/
|
|
54
|
+
allowCustomerTip?: boolean | null;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the business owners are given the option to add a tip during the
|
|
57
|
+
* payment collection flow in their dashboard.
|
|
58
|
+
*
|
|
59
|
+
* Default: `true`
|
|
60
|
+
*/
|
|
61
|
+
allowBusinessTipAtPayment?: boolean | null;
|
|
62
|
+
/**
|
|
63
|
+
* Whether customers can enter a custom tip amount. If set to `false`, customers
|
|
64
|
+
* can only select a tip value from the available `presets` and can't enter a
|
|
65
|
+
* custom amount.
|
|
66
|
+
*
|
|
67
|
+
* Default: `true`
|
|
68
|
+
*/
|
|
69
|
+
allowCustomAmount?: boolean | null;
|
|
70
|
+
/**
|
|
71
|
+
* Whether business owners are allowed to edit tip distributions. If set to
|
|
72
|
+
* `false`, owners can't edit distributions after they were created.
|
|
73
|
+
*
|
|
74
|
+
* Default: `true`
|
|
75
|
+
*/
|
|
76
|
+
allowEditDistribution?: boolean | null;
|
|
77
|
+
/**
|
|
78
|
+
* How the tip is distributed among staff.
|
|
79
|
+
*
|
|
80
|
+
* Supported values:
|
|
81
|
+
* `UNKNOWN_SPLIT_METHOD`: There is no information about the staff distribution method.
|
|
82
|
+
* `EQUAL`: The tip is distributed equally among all staff.
|
|
83
|
+
* `PROPORTIONAL`: The tip is distributed proportionally among staff.
|
|
84
|
+
*/
|
|
85
|
+
staffDistributionMethod?: StaffDistributionMethod;
|
|
86
|
+
/**
|
|
87
|
+
* Revision number, which increments by 1 each time `tipSettings` object is
|
|
88
|
+
* updated. To prevent conflicting changes, the current revision must be passed
|
|
89
|
+
* when updating `tipSettings`. Ignored when creating a `tipSettings` object.
|
|
90
|
+
* @readonly
|
|
91
|
+
*/
|
|
92
|
+
revision?: string | null;
|
|
93
|
+
/**
|
|
94
|
+
* Date and time the tip settings were created in
|
|
95
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
96
|
+
* @readonly
|
|
97
|
+
*/
|
|
98
|
+
createdDate?: Date | null;
|
|
99
|
+
/**
|
|
100
|
+
* Date and time the tip settings were last updated
|
|
101
|
+
* `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
102
|
+
* @readonly
|
|
103
|
+
*/
|
|
104
|
+
updatedDate?: Date | null;
|
|
105
|
+
/**
|
|
106
|
+
* Whether these are the default tip settings. Wix Tips automatically creates
|
|
107
|
+
* the default settings during the app's installation. You can't delete these
|
|
108
|
+
* default settings but you can update them. Wix Tips uses the default settings
|
|
109
|
+
* to calculate tips, unless you specify other settings.
|
|
110
|
+
* @readonly
|
|
111
|
+
*/
|
|
112
|
+
default?: boolean | null;
|
|
113
|
+
/**
|
|
114
|
+
* ID of the app that has created the settings. See the list of app IDs for
|
|
115
|
+
* [Wix business solutions](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions).
|
|
116
|
+
*/
|
|
117
|
+
appId?: string | null;
|
|
118
|
+
/**
|
|
119
|
+
* Custom field data for the `tipSettings` object. Extended fields must be
|
|
120
|
+
* configured in the app dashboard before they can be accessed with API calls.
|
|
121
|
+
*/
|
|
122
|
+
extendedFields?: ExtendedFields;
|
|
123
|
+
}
|
|
124
|
+
/** @oneof */
|
|
125
|
+
export interface TipSettingsIdentifierOneOf {
|
|
126
|
+
/**
|
|
127
|
+
* ID of the [location](https://dev.wix.com/docs/rest/business-management/locations/location-object)
|
|
128
|
+
* for which the tip settings apply.
|
|
129
|
+
*/
|
|
130
|
+
locationId?: string | null;
|
|
131
|
+
/**
|
|
132
|
+
* ID of the payment terminal for which the tip settings apply. Wix Tips doesn't
|
|
133
|
+
* validate the ID you provide.
|
|
134
|
+
*
|
|
135
|
+
* Max: 30 characters
|
|
136
|
+
*/
|
|
137
|
+
paymentTerminalId?: string | null;
|
|
138
|
+
/**
|
|
139
|
+
* ID of the Wix user for whom the tip settings apply. For example, the site owner or a
|
|
140
|
+
* [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).
|
|
141
|
+
*/
|
|
142
|
+
userId?: string | null;
|
|
143
|
+
}
|
|
144
|
+
export declare enum TipType {
|
|
145
|
+
/** There is no information about the tip type. */
|
|
146
|
+
UNKNOWN_TIP_TYPE = "UNKNOWN_TIP_TYPE",
|
|
147
|
+
/** The tip is calculated as a percentage of the subtotal of all related line items. */
|
|
148
|
+
PERCENTAGE = "PERCENTAGE",
|
|
149
|
+
/** The tip is a fixed amount. */
|
|
150
|
+
AMOUNT = "AMOUNT"
|
|
151
|
+
}
|
|
152
|
+
export interface Preset {
|
|
153
|
+
/**
|
|
154
|
+
* Value of the preset tip choice that's displayed to customers in the
|
|
155
|
+
* [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/checkout-object).
|
|
156
|
+
* For example, `5`, `10`, and `15` percent or `1`, `3`, and `5` USD.
|
|
157
|
+
*
|
|
158
|
+
* Min: `0`
|
|
159
|
+
*/
|
|
160
|
+
value?: number | null;
|
|
161
|
+
/**
|
|
162
|
+
* Whether this tip choice value is the dafault preset that's highlighted automatically in the
|
|
163
|
+
* [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/checkout-object).
|
|
164
|
+
*
|
|
165
|
+
* Default: `false`
|
|
166
|
+
*/
|
|
167
|
+
default?: boolean | null;
|
|
168
|
+
}
|
|
169
|
+
export declare enum StaffDistributionMethod {
|
|
170
|
+
/** There is no information about the staff distribution method. */
|
|
171
|
+
UNKNOWN_SPLIT_METHOD = "UNKNOWN_SPLIT_METHOD",
|
|
172
|
+
/** All staff receive an equal amount of the tip. */
|
|
173
|
+
EQUAL = "EQUAL",
|
|
174
|
+
/** Staff receive a proportional amount of the tip. */
|
|
175
|
+
PROPORTIONAL = "PROPORTIONAL"
|
|
176
|
+
}
|
|
177
|
+
export interface ExtendedFields {
|
|
178
|
+
/**
|
|
179
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
180
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
181
|
+
*
|
|
182
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
183
|
+
*
|
|
184
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
185
|
+
*/
|
|
186
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
187
|
+
}
|
|
188
|
+
export interface QueryTipSettingsRequest {
|
|
189
|
+
/** WQL expression */
|
|
190
|
+
query: QueryV2;
|
|
191
|
+
}
|
|
192
|
+
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
193
|
+
/** Paging options to limit and skip the number of items. */
|
|
194
|
+
paging?: Paging;
|
|
195
|
+
/** 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`. */
|
|
196
|
+
cursorPaging?: CursorPaging;
|
|
197
|
+
/**
|
|
198
|
+
* Filter object in the following format:
|
|
199
|
+
* `"filter" : {
|
|
200
|
+
* "fieldName1": "value1",
|
|
201
|
+
* "fieldName2":{"$operator":"value2"}
|
|
202
|
+
* }`
|
|
203
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
204
|
+
*/
|
|
205
|
+
filter?: Record<string, any> | null;
|
|
206
|
+
/**
|
|
207
|
+
* Sort object in the following format:
|
|
208
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
209
|
+
*/
|
|
210
|
+
sort?: Sorting[];
|
|
211
|
+
/** 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. */
|
|
212
|
+
fields?: string[];
|
|
213
|
+
/** 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. */
|
|
214
|
+
fieldsets?: string[];
|
|
215
|
+
}
|
|
216
|
+
/** @oneof */
|
|
217
|
+
export interface QueryV2PagingMethodOneOf {
|
|
218
|
+
/** Paging options to limit and skip the number of items. */
|
|
219
|
+
paging?: Paging;
|
|
220
|
+
/** 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`. */
|
|
221
|
+
cursorPaging?: CursorPaging;
|
|
222
|
+
}
|
|
223
|
+
export interface Sorting {
|
|
224
|
+
/** Name of the field to sort by. */
|
|
225
|
+
fieldName?: string;
|
|
226
|
+
/** Sort order. */
|
|
227
|
+
order?: SortOrder;
|
|
228
|
+
}
|
|
229
|
+
export declare enum SortOrder {
|
|
230
|
+
ASC = "ASC",
|
|
231
|
+
DESC = "DESC"
|
|
232
|
+
}
|
|
233
|
+
export interface Paging {
|
|
234
|
+
/** Number of items to load. */
|
|
235
|
+
limit?: number | null;
|
|
236
|
+
/** Number of items to skip in the current sort order. */
|
|
237
|
+
offset?: number | null;
|
|
238
|
+
}
|
|
239
|
+
export interface CursorPaging {
|
|
240
|
+
/** Maximum number of items to return in the results. */
|
|
241
|
+
limit?: number | null;
|
|
242
|
+
/**
|
|
243
|
+
* Pointer to the next or previous page in the list of results.
|
|
244
|
+
*
|
|
245
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
246
|
+
* Not relevant for the first request.
|
|
247
|
+
*/
|
|
248
|
+
cursor?: string | null;
|
|
249
|
+
}
|
|
250
|
+
export interface QueryTipSettingsResponse {
|
|
251
|
+
/** Retrieved `tipSettings` objects. */
|
|
252
|
+
tipSettings?: TipSettings[];
|
|
253
|
+
/** Metadate for the paged set of retrieved `tipSettings` objects. */
|
|
254
|
+
pagingMetadata?: PagingMetadataV2;
|
|
255
|
+
}
|
|
256
|
+
export interface PagingMetadataV2 {
|
|
257
|
+
/** Number of items returned in the response. */
|
|
258
|
+
count?: number | null;
|
|
259
|
+
/** Offset that was requested. */
|
|
260
|
+
offset?: number | null;
|
|
261
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
262
|
+
total?: number | null;
|
|
263
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
264
|
+
tooManyToCount?: boolean | null;
|
|
265
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
266
|
+
cursors?: Cursors;
|
|
267
|
+
}
|
|
268
|
+
export interface Cursors {
|
|
269
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
270
|
+
next?: string | null;
|
|
271
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
272
|
+
prev?: string | null;
|
|
273
|
+
}
|
|
274
|
+
export interface UpdateTipSettingsRequest {
|
|
275
|
+
/** Tip settings to update. */
|
|
276
|
+
tipSettings: TipSettings;
|
|
277
|
+
}
|
|
278
|
+
export interface UpdateTipSettingsResponse {
|
|
279
|
+
/** Updated tip settings. */
|
|
280
|
+
tipSettings?: TipSettings;
|
|
281
|
+
}
|
|
282
|
+
export interface CreateTipSettingsRequest {
|
|
283
|
+
/** Tip settings to create. */
|
|
284
|
+
tipSettings: TipSettings;
|
|
285
|
+
}
|
|
286
|
+
export interface CreateTipSettingsResponse {
|
|
287
|
+
/** Created tip settings. */
|
|
288
|
+
tipSettings?: TipSettings;
|
|
289
|
+
}
|
|
290
|
+
export interface CreateDefaultTipSettingsRequest {
|
|
291
|
+
/** Dafault tip settings to create. */
|
|
292
|
+
tipSettings: TipSettings;
|
|
293
|
+
}
|
|
294
|
+
export interface CreateDefaultTipSettingsResponse {
|
|
295
|
+
/** Created default tip settings. */
|
|
296
|
+
tipSettings?: TipSettings;
|
|
297
|
+
}
|
|
298
|
+
export interface DeleteTipSettingsRequest {
|
|
299
|
+
/** ID of the `tipSettings` object to delete. */
|
|
300
|
+
tipSettingsId: string | null;
|
|
301
|
+
}
|
|
302
|
+
export interface DeleteTipSettingsResponse {
|
|
303
|
+
}
|
|
304
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
305
|
+
createdEvent?: EntityCreatedEvent;
|
|
306
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
307
|
+
deletedEvent?: EntityDeletedEvent;
|
|
308
|
+
actionEvent?: ActionEvent;
|
|
309
|
+
/**
|
|
310
|
+
* Unique event ID.
|
|
311
|
+
* Allows clients to ignore duplicate webhooks.
|
|
312
|
+
*/
|
|
313
|
+
id?: string;
|
|
314
|
+
/**
|
|
315
|
+
* Assumes actions are also always typed to an entity_type
|
|
316
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
317
|
+
*/
|
|
318
|
+
entityFqdn?: string;
|
|
319
|
+
/**
|
|
320
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
321
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
322
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
323
|
+
*/
|
|
324
|
+
slug?: string;
|
|
325
|
+
/** ID of the entity associated with the event. */
|
|
326
|
+
entityId?: string;
|
|
327
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
328
|
+
eventTime?: Date | null;
|
|
329
|
+
/**
|
|
330
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
331
|
+
* (for example, GDPR).
|
|
332
|
+
*/
|
|
333
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
334
|
+
/** If present, indicates the action that triggered the event. */
|
|
335
|
+
originatedFrom?: string | null;
|
|
336
|
+
/**
|
|
337
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
338
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
339
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
340
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
341
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
342
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
343
|
+
*/
|
|
344
|
+
entityEventSequence?: string | null;
|
|
345
|
+
}
|
|
346
|
+
/** @oneof */
|
|
347
|
+
export interface DomainEventBodyOneOf {
|
|
348
|
+
createdEvent?: EntityCreatedEvent;
|
|
349
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
350
|
+
deletedEvent?: EntityDeletedEvent;
|
|
351
|
+
actionEvent?: ActionEvent;
|
|
352
|
+
}
|
|
353
|
+
export interface EntityCreatedEvent {
|
|
354
|
+
entityAsJson?: string;
|
|
355
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
356
|
+
restoreInfo?: RestoreInfo;
|
|
357
|
+
}
|
|
358
|
+
export interface RestoreInfo {
|
|
359
|
+
deletedDate?: Date | null;
|
|
360
|
+
}
|
|
361
|
+
export interface EntityUpdatedEvent {
|
|
362
|
+
/**
|
|
363
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
364
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
365
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
366
|
+
*/
|
|
367
|
+
currentEntityAsJson?: string;
|
|
368
|
+
}
|
|
369
|
+
export interface EntityDeletedEvent {
|
|
370
|
+
/** Entity that was deleted */
|
|
371
|
+
deletedEntityAsJson?: string | null;
|
|
372
|
+
}
|
|
373
|
+
export interface ActionEvent {
|
|
374
|
+
bodyAsJson?: string;
|
|
375
|
+
}
|
|
376
|
+
export interface MessageEnvelope {
|
|
377
|
+
/** App instance ID. */
|
|
378
|
+
instanceId?: string | null;
|
|
379
|
+
/** Event type. */
|
|
380
|
+
eventType?: string;
|
|
381
|
+
/** The identification type and identity data. */
|
|
382
|
+
identity?: IdentificationData;
|
|
383
|
+
/** Stringify payload. */
|
|
384
|
+
data?: string;
|
|
385
|
+
}
|
|
386
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
387
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
388
|
+
anonymousVisitorId?: string;
|
|
389
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
390
|
+
memberId?: string;
|
|
391
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
392
|
+
wixUserId?: string;
|
|
393
|
+
/** ID of an app. */
|
|
394
|
+
appId?: string;
|
|
395
|
+
/** @readonly */
|
|
396
|
+
identityType?: WebhookIdentityType;
|
|
397
|
+
}
|
|
398
|
+
/** @oneof */
|
|
399
|
+
export interface IdentificationDataIdOneOf {
|
|
400
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
401
|
+
anonymousVisitorId?: string;
|
|
402
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
403
|
+
memberId?: string;
|
|
404
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
405
|
+
wixUserId?: string;
|
|
406
|
+
/** ID of an app. */
|
|
407
|
+
appId?: string;
|
|
408
|
+
}
|
|
409
|
+
export declare enum WebhookIdentityType {
|
|
410
|
+
UNKNOWN = "UNKNOWN",
|
|
411
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
412
|
+
MEMBER = "MEMBER",
|
|
413
|
+
WIX_USER = "WIX_USER",
|
|
414
|
+
APP = "APP"
|
|
415
|
+
}
|
|
416
|
+
interface TipSettingsNonNullableFields {
|
|
417
|
+
tipType: TipType;
|
|
418
|
+
staffDistributionMethod: StaffDistributionMethod;
|
|
419
|
+
}
|
|
420
|
+
export interface QueryTipSettingsResponseNonNullableFields {
|
|
421
|
+
tipSettings: TipSettingsNonNullableFields[];
|
|
422
|
+
}
|
|
423
|
+
export interface UpdateTipSettingsResponseNonNullableFields {
|
|
424
|
+
tipSettings?: TipSettingsNonNullableFields;
|
|
425
|
+
}
|
|
426
|
+
export interface CreateTipSettingsResponseNonNullableFields {
|
|
427
|
+
tipSettings?: TipSettingsNonNullableFields;
|
|
428
|
+
}
|
|
429
|
+
export interface CreateDefaultTipSettingsResponseNonNullableFields {
|
|
430
|
+
tipSettings?: TipSettingsNonNullableFields;
|
|
431
|
+
}
|
|
432
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export var TipType;
|
|
2
|
+
(function (TipType) {
|
|
3
|
+
/** There is no information about the tip type. */
|
|
4
|
+
TipType["UNKNOWN_TIP_TYPE"] = "UNKNOWN_TIP_TYPE";
|
|
5
|
+
/** The tip is calculated as a percentage of the subtotal of all related line items. */
|
|
6
|
+
TipType["PERCENTAGE"] = "PERCENTAGE";
|
|
7
|
+
/** The tip is a fixed amount. */
|
|
8
|
+
TipType["AMOUNT"] = "AMOUNT";
|
|
9
|
+
})(TipType || (TipType = {}));
|
|
10
|
+
export var StaffDistributionMethod;
|
|
11
|
+
(function (StaffDistributionMethod) {
|
|
12
|
+
/** There is no information about the staff distribution method. */
|
|
13
|
+
StaffDistributionMethod["UNKNOWN_SPLIT_METHOD"] = "UNKNOWN_SPLIT_METHOD";
|
|
14
|
+
/** All staff receive an equal amount of the tip. */
|
|
15
|
+
StaffDistributionMethod["EQUAL"] = "EQUAL";
|
|
16
|
+
/** Staff receive a proportional amount of the tip. */
|
|
17
|
+
StaffDistributionMethod["PROPORTIONAL"] = "PROPORTIONAL";
|
|
18
|
+
})(StaffDistributionMethod || (StaffDistributionMethod = {}));
|
|
19
|
+
export var SortOrder;
|
|
20
|
+
(function (SortOrder) {
|
|
21
|
+
SortOrder["ASC"] = "ASC";
|
|
22
|
+
SortOrder["DESC"] = "DESC";
|
|
23
|
+
})(SortOrder || (SortOrder = {}));
|
|
24
|
+
export var WebhookIdentityType;
|
|
25
|
+
(function (WebhookIdentityType) {
|
|
26
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
27
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
28
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
29
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
30
|
+
WebhookIdentityType["APP"] = "APP";
|
|
31
|
+
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
32
|
+
//# sourceMappingURL=tips-settings-v1-tip-settings-tip-settings.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tips-settings-v1-tip-settings-tip-settings.types.js","sourceRoot":"","sources":["../../../../src/tips-settings-v1-tip-settings-tip-settings.types.ts"],"names":[],"mappings":"AAiJA,MAAM,CAAN,IAAY,OAOX;AAPD,WAAY,OAAO;IACjB,kDAAkD;IAClD,gDAAqC,CAAA;IACrC,uFAAuF;IACvF,oCAAyB,CAAA;IACzB,iCAAiC;IACjC,4BAAiB,CAAA;AACnB,CAAC,EAPW,OAAO,KAAP,OAAO,QAOlB;AAoBD,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,mEAAmE;IACnE,wEAA6C,CAAA;IAC7C,oDAAoD;IACpD,0CAAe,CAAA;IACf,sDAAsD;IACtD,wDAA6B,CAAA;AAC/B,CAAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC;AA2DD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAwMD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|