@wix/gift-vouchers 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/context.d.ts +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +2 -0
- package/build/cjs/index.js +29 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +28 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +2 -0
- package/build/es/index.js +3 -0
- package/build/es/index.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/context/package.json +7 -0
- package/meta/package.json +7 -0
- package/package.json +47 -0
- package/type-bundles/context.bundle.d.ts +1137 -0
- package/type-bundles/index.bundle.d.ts +1137 -0
- package/type-bundles/meta.bundle.d.ts +638 -0
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
interface GiftCardProduct$1 extends GiftCardProductExpirationDateOneOf$1 {
|
|
2
|
+
/** Fixed expiration date. */
|
|
3
|
+
fixedExpirationDate?: Date | null;
|
|
4
|
+
/** Relative expiration date from date of purchase. */
|
|
5
|
+
relativeExpirationDate?: RelativeExpirationDate$1;
|
|
6
|
+
/**
|
|
7
|
+
* Gift card product unique ID.
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
id?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Revision number, which increments by 1 each time the GiftCardProduct is updated.
|
|
13
|
+
* To prevent conflicting changes, the current revision must be passed when updating the product.
|
|
14
|
+
* @readonly
|
|
15
|
+
*/
|
|
16
|
+
revision?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Date and time the product was created.
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
createdDate?: Date | null;
|
|
22
|
+
/**
|
|
23
|
+
* Date and time the product was last updated.
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
26
|
+
updatedDate?: Date | null;
|
|
27
|
+
/** Gift card product name. */
|
|
28
|
+
name?: string;
|
|
29
|
+
/** Gift card product description. */
|
|
30
|
+
description?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Gift card product image.
|
|
33
|
+
* + Pass at least media ID, width, and height. You should be able to get these values when you upload an image to Wix media manager.
|
|
34
|
+
* + Given a full image URL of https://static.wixstatic.com/media/5cc69183e7954e2c9760fa2383870992.jpg, `media.id` would be "5cc69183e7954e2c9760fa2383870992.jpg".
|
|
35
|
+
* + We only support images coming from Wix media manager, if you want to use an image from another source you must first upload it to Wix media manager.
|
|
36
|
+
*/
|
|
37
|
+
image?: Image;
|
|
38
|
+
/** Gift card product expiration type */
|
|
39
|
+
expirationType?: ExpirationType$1;
|
|
40
|
+
/** Array of preset product variants. */
|
|
41
|
+
presetVariants?: PresetVariant$1[];
|
|
42
|
+
/** Gift card product custom variants */
|
|
43
|
+
customVariant?: CustomVariant$1;
|
|
44
|
+
/**
|
|
45
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.
|
|
46
|
+
* Enabling users to save custom data related to the gift card product.
|
|
47
|
+
*/
|
|
48
|
+
extendedFields?: ExtendedFields$1;
|
|
49
|
+
}
|
|
50
|
+
/** @oneof */
|
|
51
|
+
interface GiftCardProductExpirationDateOneOf$1 {
|
|
52
|
+
/** Fixed expiration date. */
|
|
53
|
+
fixedExpirationDate?: Date | null;
|
|
54
|
+
/** Relative expiration date from date of purchase. */
|
|
55
|
+
relativeExpirationDate?: RelativeExpirationDate$1;
|
|
56
|
+
}
|
|
57
|
+
interface Image {
|
|
58
|
+
/** WixMedia image ID. */
|
|
59
|
+
id?: string;
|
|
60
|
+
/** WixMedia image ID. */
|
|
61
|
+
url?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Original image height.
|
|
64
|
+
* @readonly
|
|
65
|
+
*/
|
|
66
|
+
height?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Original image width.
|
|
69
|
+
* @readonly
|
|
70
|
+
*/
|
|
71
|
+
width?: number;
|
|
72
|
+
/** Image alt text. */
|
|
73
|
+
altText?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Image filename.
|
|
76
|
+
* @readonly
|
|
77
|
+
*/
|
|
78
|
+
filename?: string | null;
|
|
79
|
+
}
|
|
80
|
+
declare enum ExpirationType$1 {
|
|
81
|
+
UNKNOWN_EXPIRATION_TYPE = "UNKNOWN_EXPIRATION_TYPE",
|
|
82
|
+
NONE = "NONE",
|
|
83
|
+
FIXED = "FIXED",
|
|
84
|
+
RELATIVE = "RELATIVE"
|
|
85
|
+
}
|
|
86
|
+
interface RelativeExpirationDate$1 {
|
|
87
|
+
/** Value until expiration. */
|
|
88
|
+
value?: number;
|
|
89
|
+
/** Time period until expiration */
|
|
90
|
+
period?: TimePeriod$1;
|
|
91
|
+
}
|
|
92
|
+
declare enum TimePeriod$1 {
|
|
93
|
+
UNKNOWN_TIME_PERIOD = "UNKNOWN_TIME_PERIOD",
|
|
94
|
+
DAYS = "DAYS",
|
|
95
|
+
WEEKS = "WEEKS",
|
|
96
|
+
MONTHS = "MONTHS",
|
|
97
|
+
YEARS = "YEARS"
|
|
98
|
+
}
|
|
99
|
+
interface PresetVariant$1 {
|
|
100
|
+
/**
|
|
101
|
+
* Gift card product variant unique ID.
|
|
102
|
+
* @readonly
|
|
103
|
+
*/
|
|
104
|
+
id?: string | null;
|
|
105
|
+
/** Gift card product variant price. */
|
|
106
|
+
price?: MultiCurrencyPrice$1;
|
|
107
|
+
/** Gift card product variant actual value. */
|
|
108
|
+
value?: MultiCurrencyPrice$1;
|
|
109
|
+
/**
|
|
110
|
+
* Gift card product variant image.
|
|
111
|
+
* + Pass at least media ID, width, and height. You should be able to get these values when you upload an image to Wix media manager.
|
|
112
|
+
* + Given a full image URL of https://static.wixstatic.com/media/5cc69183e7954e2c9760fa2383870992.jpg, `media.id` would be "5cc69183e7954e2c9760fa2383870992.jpg".
|
|
113
|
+
* + We only support images coming from Wix media manager, if you want to use an image from another source you must first upload it to Wix media manager.
|
|
114
|
+
*/
|
|
115
|
+
image?: Image;
|
|
116
|
+
}
|
|
117
|
+
interface MultiCurrencyPrice$1 {
|
|
118
|
+
/** Amount. */
|
|
119
|
+
amount?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Converted amount.
|
|
122
|
+
* @readonly
|
|
123
|
+
*/
|
|
124
|
+
convertedAmount?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Amount formatted with currency symbol.
|
|
127
|
+
* @readonly
|
|
128
|
+
*/
|
|
129
|
+
formattedAmount?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Converted amount formatted with currency symbol.
|
|
132
|
+
* @readonly
|
|
133
|
+
*/
|
|
134
|
+
formattedConvertedAmount?: string;
|
|
135
|
+
}
|
|
136
|
+
interface CustomVariant$1 {
|
|
137
|
+
/** Gift card product variant min value. */
|
|
138
|
+
minValue?: MultiCurrencyPrice$1;
|
|
139
|
+
/** Gift card product variant max value. */
|
|
140
|
+
maxValue?: MultiCurrencyPrice$1;
|
|
141
|
+
/**
|
|
142
|
+
* Gift card product variant image.
|
|
143
|
+
* + Pass at least media ID, width, and height. You should be able to get these values when you upload an image to Wix media manager.
|
|
144
|
+
* + Given a full image URL of https://static.wixstatic.com/media/5cc69183e7954e2c9760fa2383870992.jpg, `media.id` would be "5cc69183e7954e2c9760fa2383870992.jpg".
|
|
145
|
+
* + We only support images coming from Wix media manager, if you want to use an image from another source you must first upload it to Wix media manager.
|
|
146
|
+
*/
|
|
147
|
+
image?: Image;
|
|
148
|
+
}
|
|
149
|
+
interface ExtendedFields$1 {
|
|
150
|
+
/**
|
|
151
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
152
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
153
|
+
*
|
|
154
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
155
|
+
*
|
|
156
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
157
|
+
*/
|
|
158
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
159
|
+
}
|
|
160
|
+
interface CreateGiftCardProductRequest$1 {
|
|
161
|
+
/** Gift card product to be created. */
|
|
162
|
+
giftCardProduct: GiftCardProduct$1;
|
|
163
|
+
}
|
|
164
|
+
interface CreateGiftCardProductResponse$1 {
|
|
165
|
+
/** The created gift card product. */
|
|
166
|
+
giftCardProduct?: GiftCardProduct$1;
|
|
167
|
+
}
|
|
168
|
+
interface GetGiftCardProductRequest$1 {
|
|
169
|
+
/** ID of the gift card product to retrieve. */
|
|
170
|
+
giftCardProductId: string;
|
|
171
|
+
}
|
|
172
|
+
interface GetGiftCardProductResponse$1 {
|
|
173
|
+
/** The requested gift card product. */
|
|
174
|
+
giftCardProduct?: GiftCardProduct$1;
|
|
175
|
+
}
|
|
176
|
+
interface UpdateGiftCardProductRequest$1 {
|
|
177
|
+
/** Gift card product to be updated, may be partial. */
|
|
178
|
+
giftCardProduct: GiftCardProduct$1;
|
|
179
|
+
}
|
|
180
|
+
interface UpdateGiftCardProductResponse$1 {
|
|
181
|
+
/** Updated gift card product. */
|
|
182
|
+
giftCardProduct?: GiftCardProduct$1;
|
|
183
|
+
}
|
|
184
|
+
interface DeleteGiftCardProductRequest$1 {
|
|
185
|
+
/** Id of the gift card product to delete. */
|
|
186
|
+
giftCardProductId: string;
|
|
187
|
+
}
|
|
188
|
+
interface DeleteGiftCardProductResponse$1 {
|
|
189
|
+
}
|
|
190
|
+
interface QueryGiftCardProductsRequest$1 {
|
|
191
|
+
/** WQL expression. */
|
|
192
|
+
query?: CursorQuery$1;
|
|
193
|
+
}
|
|
194
|
+
interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
|
|
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$1;
|
|
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$1[];
|
|
211
|
+
}
|
|
212
|
+
/** @oneof */
|
|
213
|
+
interface CursorQueryPagingMethodOneOf$1 {
|
|
214
|
+
/** 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`. */
|
|
215
|
+
cursorPaging?: CursorPaging$1;
|
|
216
|
+
}
|
|
217
|
+
interface Sorting$1 {
|
|
218
|
+
/** Name of the field to sort by. */
|
|
219
|
+
fieldName?: string;
|
|
220
|
+
/** Sort order. */
|
|
221
|
+
order?: SortOrder$1;
|
|
222
|
+
}
|
|
223
|
+
declare enum SortOrder$1 {
|
|
224
|
+
ASC = "ASC",
|
|
225
|
+
DESC = "DESC"
|
|
226
|
+
}
|
|
227
|
+
interface CursorPaging$1 {
|
|
228
|
+
/** Maximum number of items to return in the results. */
|
|
229
|
+
limit?: number | null;
|
|
230
|
+
/**
|
|
231
|
+
* Pointer to the next or previous page in the list of results.
|
|
232
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
233
|
+
* Not relevant for the first request.
|
|
234
|
+
*/
|
|
235
|
+
cursor?: string | null;
|
|
236
|
+
}
|
|
237
|
+
interface QueryGiftCardProductsResponse$1 {
|
|
238
|
+
/** List of gift card products. */
|
|
239
|
+
giftCardProducts?: GiftCardProduct$1[];
|
|
240
|
+
/** Paging metadata */
|
|
241
|
+
pagingMetadata?: CursorPagingMetadata$1;
|
|
242
|
+
}
|
|
243
|
+
interface CursorPagingMetadata$1 {
|
|
244
|
+
/** Number of items returned in the response. */
|
|
245
|
+
count?: number | null;
|
|
246
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
247
|
+
cursors?: Cursors$1;
|
|
248
|
+
/**
|
|
249
|
+
* Whether there are more pages to retrieve following the current page.
|
|
250
|
+
* + `true`: Another page of results can be retrieved.
|
|
251
|
+
* + `false`: This is the last page.
|
|
252
|
+
*/
|
|
253
|
+
hasNext?: boolean | null;
|
|
254
|
+
}
|
|
255
|
+
interface Cursors$1 {
|
|
256
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
257
|
+
next?: string | null;
|
|
258
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
259
|
+
prev?: string | null;
|
|
260
|
+
}
|
|
261
|
+
interface IsInWixGiftCardsAppPopulationRequest$1 {
|
|
262
|
+
}
|
|
263
|
+
interface IsInWixGiftCardsAppPopulationResponse$1 {
|
|
264
|
+
/** true if site is in the new Wix Gift Cards App population. */
|
|
265
|
+
shouldUseNewGiftCardServices?: boolean;
|
|
266
|
+
}
|
|
267
|
+
interface RelativeExpirationDateNonNullableFields$1 {
|
|
268
|
+
value: number;
|
|
269
|
+
period: TimePeriod$1;
|
|
270
|
+
}
|
|
271
|
+
interface ImageNonNullableFields {
|
|
272
|
+
id: string;
|
|
273
|
+
url: string;
|
|
274
|
+
height: number;
|
|
275
|
+
width: number;
|
|
276
|
+
}
|
|
277
|
+
interface MultiCurrencyPriceNonNullableFields$1 {
|
|
278
|
+
amount: string;
|
|
279
|
+
convertedAmount: string;
|
|
280
|
+
formattedAmount: string;
|
|
281
|
+
formattedConvertedAmount: string;
|
|
282
|
+
}
|
|
283
|
+
interface PresetVariantNonNullableFields$1 {
|
|
284
|
+
price?: MultiCurrencyPriceNonNullableFields$1;
|
|
285
|
+
value?: MultiCurrencyPriceNonNullableFields$1;
|
|
286
|
+
image?: ImageNonNullableFields;
|
|
287
|
+
}
|
|
288
|
+
interface CustomVariantNonNullableFields$1 {
|
|
289
|
+
minValue?: MultiCurrencyPriceNonNullableFields$1;
|
|
290
|
+
maxValue?: MultiCurrencyPriceNonNullableFields$1;
|
|
291
|
+
image?: ImageNonNullableFields;
|
|
292
|
+
}
|
|
293
|
+
interface GiftCardProductNonNullableFields$1 {
|
|
294
|
+
relativeExpirationDate?: RelativeExpirationDateNonNullableFields$1;
|
|
295
|
+
name: string;
|
|
296
|
+
image?: ImageNonNullableFields;
|
|
297
|
+
expirationType: ExpirationType$1;
|
|
298
|
+
presetVariants: PresetVariantNonNullableFields$1[];
|
|
299
|
+
customVariant?: CustomVariantNonNullableFields$1;
|
|
300
|
+
}
|
|
301
|
+
interface CreateGiftCardProductResponseNonNullableFields$1 {
|
|
302
|
+
giftCardProduct?: GiftCardProductNonNullableFields$1;
|
|
303
|
+
}
|
|
304
|
+
interface GetGiftCardProductResponseNonNullableFields$1 {
|
|
305
|
+
giftCardProduct?: GiftCardProductNonNullableFields$1;
|
|
306
|
+
}
|
|
307
|
+
interface UpdateGiftCardProductResponseNonNullableFields$1 {
|
|
308
|
+
giftCardProduct?: GiftCardProductNonNullableFields$1;
|
|
309
|
+
}
|
|
310
|
+
interface QueryGiftCardProductsResponseNonNullableFields$1 {
|
|
311
|
+
giftCardProducts: GiftCardProductNonNullableFields$1[];
|
|
312
|
+
}
|
|
313
|
+
interface IsInWixGiftCardsAppPopulationResponseNonNullableFields$1 {
|
|
314
|
+
shouldUseNewGiftCardServices: boolean;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
interface GiftCardProduct extends GiftCardProductExpirationDateOneOf {
|
|
318
|
+
/** Fixed expiration date. */
|
|
319
|
+
fixedExpirationDate?: Date | null;
|
|
320
|
+
/** Relative expiration date from date of purchase. */
|
|
321
|
+
relativeExpirationDate?: RelativeExpirationDate;
|
|
322
|
+
/**
|
|
323
|
+
* Gift card product unique ID.
|
|
324
|
+
* @readonly
|
|
325
|
+
*/
|
|
326
|
+
_id?: string | null;
|
|
327
|
+
/**
|
|
328
|
+
* Revision number, which increments by 1 each time the GiftCardProduct is updated.
|
|
329
|
+
* To prevent conflicting changes, the current revision must be passed when updating the product.
|
|
330
|
+
* @readonly
|
|
331
|
+
*/
|
|
332
|
+
revision?: string | null;
|
|
333
|
+
/**
|
|
334
|
+
* Date and time the product was created.
|
|
335
|
+
* @readonly
|
|
336
|
+
*/
|
|
337
|
+
_createdDate?: Date | null;
|
|
338
|
+
/**
|
|
339
|
+
* Date and time the product was last updated.
|
|
340
|
+
* @readonly
|
|
341
|
+
*/
|
|
342
|
+
_updatedDate?: Date | null;
|
|
343
|
+
/** Gift card product name. */
|
|
344
|
+
name?: string;
|
|
345
|
+
/** Gift card product description. */
|
|
346
|
+
description?: string | null;
|
|
347
|
+
/**
|
|
348
|
+
* Gift card product image.
|
|
349
|
+
* + Pass at least media ID, width, and height. You should be able to get these values when you upload an image to Wix media manager.
|
|
350
|
+
* + Given a full image URL of https://static.wixstatic.com/media/5cc69183e7954e2c9760fa2383870992.jpg, `media.id` would be "5cc69183e7954e2c9760fa2383870992.jpg".
|
|
351
|
+
* + We only support images coming from Wix media manager, if you want to use an image from another source you must first upload it to Wix media manager.
|
|
352
|
+
*/
|
|
353
|
+
image?: string;
|
|
354
|
+
/** Gift card product expiration type */
|
|
355
|
+
expirationType?: ExpirationType;
|
|
356
|
+
/** Array of preset product variants. */
|
|
357
|
+
presetVariants?: PresetVariant[];
|
|
358
|
+
/** Gift card product custom variants */
|
|
359
|
+
customVariant?: CustomVariant;
|
|
360
|
+
/**
|
|
361
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the Wix Dev Center before they can be accessed with API calls.
|
|
362
|
+
* Enabling users to save custom data related to the gift card product.
|
|
363
|
+
*/
|
|
364
|
+
extendedFields?: ExtendedFields;
|
|
365
|
+
}
|
|
366
|
+
/** @oneof */
|
|
367
|
+
interface GiftCardProductExpirationDateOneOf {
|
|
368
|
+
/** Fixed expiration date. */
|
|
369
|
+
fixedExpirationDate?: Date | null;
|
|
370
|
+
/** Relative expiration date from date of purchase. */
|
|
371
|
+
relativeExpirationDate?: RelativeExpirationDate;
|
|
372
|
+
}
|
|
373
|
+
declare enum ExpirationType {
|
|
374
|
+
UNKNOWN_EXPIRATION_TYPE = "UNKNOWN_EXPIRATION_TYPE",
|
|
375
|
+
NONE = "NONE",
|
|
376
|
+
FIXED = "FIXED",
|
|
377
|
+
RELATIVE = "RELATIVE"
|
|
378
|
+
}
|
|
379
|
+
interface RelativeExpirationDate {
|
|
380
|
+
/** Value until expiration. */
|
|
381
|
+
value?: number;
|
|
382
|
+
/** Time period until expiration */
|
|
383
|
+
period?: TimePeriod;
|
|
384
|
+
}
|
|
385
|
+
declare enum TimePeriod {
|
|
386
|
+
UNKNOWN_TIME_PERIOD = "UNKNOWN_TIME_PERIOD",
|
|
387
|
+
DAYS = "DAYS",
|
|
388
|
+
WEEKS = "WEEKS",
|
|
389
|
+
MONTHS = "MONTHS",
|
|
390
|
+
YEARS = "YEARS"
|
|
391
|
+
}
|
|
392
|
+
interface PresetVariant {
|
|
393
|
+
/**
|
|
394
|
+
* Gift card product variant unique ID.
|
|
395
|
+
* @readonly
|
|
396
|
+
*/
|
|
397
|
+
_id?: string | null;
|
|
398
|
+
/** Gift card product variant price. */
|
|
399
|
+
price?: MultiCurrencyPrice;
|
|
400
|
+
/** Gift card product variant actual value. */
|
|
401
|
+
value?: MultiCurrencyPrice;
|
|
402
|
+
/**
|
|
403
|
+
* Gift card product variant image.
|
|
404
|
+
* + Pass at least media ID, width, and height. You should be able to get these values when you upload an image to Wix media manager.
|
|
405
|
+
* + Given a full image URL of https://static.wixstatic.com/media/5cc69183e7954e2c9760fa2383870992.jpg, `media.id` would be "5cc69183e7954e2c9760fa2383870992.jpg".
|
|
406
|
+
* + We only support images coming from Wix media manager, if you want to use an image from another source you must first upload it to Wix media manager.
|
|
407
|
+
*/
|
|
408
|
+
image?: string;
|
|
409
|
+
}
|
|
410
|
+
interface MultiCurrencyPrice {
|
|
411
|
+
/** Amount. */
|
|
412
|
+
amount?: string;
|
|
413
|
+
/**
|
|
414
|
+
* Converted amount.
|
|
415
|
+
* @readonly
|
|
416
|
+
*/
|
|
417
|
+
convertedAmount?: string;
|
|
418
|
+
/**
|
|
419
|
+
* Amount formatted with currency symbol.
|
|
420
|
+
* @readonly
|
|
421
|
+
*/
|
|
422
|
+
formattedAmount?: string;
|
|
423
|
+
/**
|
|
424
|
+
* Converted amount formatted with currency symbol.
|
|
425
|
+
* @readonly
|
|
426
|
+
*/
|
|
427
|
+
formattedConvertedAmount?: string;
|
|
428
|
+
}
|
|
429
|
+
interface CustomVariant {
|
|
430
|
+
/** Gift card product variant min value. */
|
|
431
|
+
minValue?: MultiCurrencyPrice;
|
|
432
|
+
/** Gift card product variant max value. */
|
|
433
|
+
maxValue?: MultiCurrencyPrice;
|
|
434
|
+
/**
|
|
435
|
+
* Gift card product variant image.
|
|
436
|
+
* + Pass at least media ID, width, and height. You should be able to get these values when you upload an image to Wix media manager.
|
|
437
|
+
* + Given a full image URL of https://static.wixstatic.com/media/5cc69183e7954e2c9760fa2383870992.jpg, `media.id` would be "5cc69183e7954e2c9760fa2383870992.jpg".
|
|
438
|
+
* + We only support images coming from Wix media manager, if you want to use an image from another source you must first upload it to Wix media manager.
|
|
439
|
+
*/
|
|
440
|
+
image?: string;
|
|
441
|
+
}
|
|
442
|
+
interface ExtendedFields {
|
|
443
|
+
/**
|
|
444
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
445
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
446
|
+
*
|
|
447
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
448
|
+
*
|
|
449
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
450
|
+
*/
|
|
451
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
452
|
+
}
|
|
453
|
+
interface CreateGiftCardProductRequest {
|
|
454
|
+
/** Gift card product to be created. */
|
|
455
|
+
giftCardProduct: GiftCardProduct;
|
|
456
|
+
}
|
|
457
|
+
interface CreateGiftCardProductResponse {
|
|
458
|
+
/** The created gift card product. */
|
|
459
|
+
giftCardProduct?: GiftCardProduct;
|
|
460
|
+
}
|
|
461
|
+
interface GetGiftCardProductRequest {
|
|
462
|
+
/** ID of the gift card product to retrieve. */
|
|
463
|
+
giftCardProductId: string;
|
|
464
|
+
}
|
|
465
|
+
interface GetGiftCardProductResponse {
|
|
466
|
+
/** The requested gift card product. */
|
|
467
|
+
giftCardProduct?: GiftCardProduct;
|
|
468
|
+
}
|
|
469
|
+
interface UpdateGiftCardProductRequest {
|
|
470
|
+
/** Gift card product to be updated, may be partial. */
|
|
471
|
+
giftCardProduct: GiftCardProduct;
|
|
472
|
+
}
|
|
473
|
+
interface UpdateGiftCardProductResponse {
|
|
474
|
+
/** Updated gift card product. */
|
|
475
|
+
giftCardProduct?: GiftCardProduct;
|
|
476
|
+
}
|
|
477
|
+
interface DeleteGiftCardProductRequest {
|
|
478
|
+
/** Id of the gift card product to delete. */
|
|
479
|
+
giftCardProductId: string;
|
|
480
|
+
}
|
|
481
|
+
interface DeleteGiftCardProductResponse {
|
|
482
|
+
}
|
|
483
|
+
interface QueryGiftCardProductsRequest {
|
|
484
|
+
/** WQL expression. */
|
|
485
|
+
query?: CursorQuery;
|
|
486
|
+
}
|
|
487
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
488
|
+
/** 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`. */
|
|
489
|
+
cursorPaging?: CursorPaging;
|
|
490
|
+
/**
|
|
491
|
+
* Filter object in the following format:
|
|
492
|
+
* `"filter" : {
|
|
493
|
+
* "fieldName1": "value1",
|
|
494
|
+
* "fieldName2":{"$operator":"value2"}
|
|
495
|
+
* }`
|
|
496
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
497
|
+
*/
|
|
498
|
+
filter?: Record<string, any> | null;
|
|
499
|
+
/**
|
|
500
|
+
* Sort object in the following format:
|
|
501
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
502
|
+
*/
|
|
503
|
+
sort?: Sorting[];
|
|
504
|
+
}
|
|
505
|
+
/** @oneof */
|
|
506
|
+
interface CursorQueryPagingMethodOneOf {
|
|
507
|
+
/** 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`. */
|
|
508
|
+
cursorPaging?: CursorPaging;
|
|
509
|
+
}
|
|
510
|
+
interface Sorting {
|
|
511
|
+
/** Name of the field to sort by. */
|
|
512
|
+
fieldName?: string;
|
|
513
|
+
/** Sort order. */
|
|
514
|
+
order?: SortOrder;
|
|
515
|
+
}
|
|
516
|
+
declare enum SortOrder {
|
|
517
|
+
ASC = "ASC",
|
|
518
|
+
DESC = "DESC"
|
|
519
|
+
}
|
|
520
|
+
interface CursorPaging {
|
|
521
|
+
/** Maximum number of items to return in the results. */
|
|
522
|
+
limit?: number | null;
|
|
523
|
+
/**
|
|
524
|
+
* Pointer to the next or previous page in the list of results.
|
|
525
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
526
|
+
* Not relevant for the first request.
|
|
527
|
+
*/
|
|
528
|
+
cursor?: string | null;
|
|
529
|
+
}
|
|
530
|
+
interface QueryGiftCardProductsResponse {
|
|
531
|
+
/** List of gift card products. */
|
|
532
|
+
giftCardProducts?: GiftCardProduct[];
|
|
533
|
+
/** Paging metadata */
|
|
534
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
535
|
+
}
|
|
536
|
+
interface CursorPagingMetadata {
|
|
537
|
+
/** Number of items returned in the response. */
|
|
538
|
+
count?: number | null;
|
|
539
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
540
|
+
cursors?: Cursors;
|
|
541
|
+
/**
|
|
542
|
+
* Whether there are more pages to retrieve following the current page.
|
|
543
|
+
* + `true`: Another page of results can be retrieved.
|
|
544
|
+
* + `false`: This is the last page.
|
|
545
|
+
*/
|
|
546
|
+
hasNext?: boolean | null;
|
|
547
|
+
}
|
|
548
|
+
interface Cursors {
|
|
549
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
550
|
+
next?: string | null;
|
|
551
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
552
|
+
prev?: string | null;
|
|
553
|
+
}
|
|
554
|
+
interface IsInWixGiftCardsAppPopulationRequest {
|
|
555
|
+
}
|
|
556
|
+
interface IsInWixGiftCardsAppPopulationResponse {
|
|
557
|
+
/** true if site is in the new Wix Gift Cards App population. */
|
|
558
|
+
shouldUseNewGiftCardServices?: boolean;
|
|
559
|
+
}
|
|
560
|
+
interface RelativeExpirationDateNonNullableFields {
|
|
561
|
+
value: number;
|
|
562
|
+
period: TimePeriod;
|
|
563
|
+
}
|
|
564
|
+
interface MultiCurrencyPriceNonNullableFields {
|
|
565
|
+
amount: string;
|
|
566
|
+
convertedAmount: string;
|
|
567
|
+
formattedAmount: string;
|
|
568
|
+
formattedConvertedAmount: string;
|
|
569
|
+
}
|
|
570
|
+
interface PresetVariantNonNullableFields {
|
|
571
|
+
price?: MultiCurrencyPriceNonNullableFields;
|
|
572
|
+
value?: MultiCurrencyPriceNonNullableFields;
|
|
573
|
+
image: string;
|
|
574
|
+
}
|
|
575
|
+
interface CustomVariantNonNullableFields {
|
|
576
|
+
minValue?: MultiCurrencyPriceNonNullableFields;
|
|
577
|
+
maxValue?: MultiCurrencyPriceNonNullableFields;
|
|
578
|
+
image: string;
|
|
579
|
+
}
|
|
580
|
+
interface GiftCardProductNonNullableFields {
|
|
581
|
+
relativeExpirationDate?: RelativeExpirationDateNonNullableFields;
|
|
582
|
+
name: string;
|
|
583
|
+
image: string;
|
|
584
|
+
expirationType: ExpirationType;
|
|
585
|
+
presetVariants: PresetVariantNonNullableFields[];
|
|
586
|
+
customVariant?: CustomVariantNonNullableFields;
|
|
587
|
+
}
|
|
588
|
+
interface CreateGiftCardProductResponseNonNullableFields {
|
|
589
|
+
giftCardProduct?: GiftCardProductNonNullableFields;
|
|
590
|
+
}
|
|
591
|
+
interface GetGiftCardProductResponseNonNullableFields {
|
|
592
|
+
giftCardProduct?: GiftCardProductNonNullableFields;
|
|
593
|
+
}
|
|
594
|
+
interface UpdateGiftCardProductResponseNonNullableFields {
|
|
595
|
+
giftCardProduct?: GiftCardProductNonNullableFields;
|
|
596
|
+
}
|
|
597
|
+
interface QueryGiftCardProductsResponseNonNullableFields {
|
|
598
|
+
giftCardProducts: GiftCardProductNonNullableFields[];
|
|
599
|
+
}
|
|
600
|
+
interface IsInWixGiftCardsAppPopulationResponseNonNullableFields {
|
|
601
|
+
shouldUseNewGiftCardServices: boolean;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
605
|
+
getUrl: (context: any) => string;
|
|
606
|
+
httpMethod: K;
|
|
607
|
+
path: string;
|
|
608
|
+
pathParams: M;
|
|
609
|
+
__requestType: T;
|
|
610
|
+
__originalRequestType: S;
|
|
611
|
+
__responseType: Q;
|
|
612
|
+
__originalResponseType: R;
|
|
613
|
+
};
|
|
614
|
+
declare function createGiftCardProduct(): __PublicMethodMetaInfo<'POST', {}, CreateGiftCardProductRequest, CreateGiftCardProductRequest$1, CreateGiftCardProductResponse & CreateGiftCardProductResponseNonNullableFields, CreateGiftCardProductResponse$1 & CreateGiftCardProductResponseNonNullableFields$1>;
|
|
615
|
+
declare function getGiftCardProduct(): __PublicMethodMetaInfo<'GET', {
|
|
616
|
+
giftCardProductId: string;
|
|
617
|
+
}, GetGiftCardProductRequest, GetGiftCardProductRequest$1, GetGiftCardProductResponse & GetGiftCardProductResponseNonNullableFields, GetGiftCardProductResponse$1 & GetGiftCardProductResponseNonNullableFields$1>;
|
|
618
|
+
declare function updateGiftCardProduct(): __PublicMethodMetaInfo<'PATCH', {
|
|
619
|
+
giftCardProductId: string;
|
|
620
|
+
}, UpdateGiftCardProductRequest, UpdateGiftCardProductRequest$1, UpdateGiftCardProductResponse & UpdateGiftCardProductResponseNonNullableFields, UpdateGiftCardProductResponse$1 & UpdateGiftCardProductResponseNonNullableFields$1>;
|
|
621
|
+
declare function deleteGiftCardProduct(): __PublicMethodMetaInfo<'DELETE', {
|
|
622
|
+
giftCardProductId: string;
|
|
623
|
+
}, DeleteGiftCardProductRequest, DeleteGiftCardProductRequest$1, DeleteGiftCardProductResponse, DeleteGiftCardProductResponse$1>;
|
|
624
|
+
declare function queryGiftCardProducts(): __PublicMethodMetaInfo<'GET', {}, QueryGiftCardProductsRequest, QueryGiftCardProductsRequest$1, QueryGiftCardProductsResponse & QueryGiftCardProductsResponseNonNullableFields, QueryGiftCardProductsResponse$1 & QueryGiftCardProductsResponseNonNullableFields$1>;
|
|
625
|
+
declare function isInWixGiftCardsAppPopulation(): __PublicMethodMetaInfo<'GET', {}, IsInWixGiftCardsAppPopulationRequest, IsInWixGiftCardsAppPopulationRequest$1, IsInWixGiftCardsAppPopulationResponse & IsInWixGiftCardsAppPopulationResponseNonNullableFields, IsInWixGiftCardsAppPopulationResponse$1 & IsInWixGiftCardsAppPopulationResponseNonNullableFields$1>;
|
|
626
|
+
|
|
627
|
+
type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
|
|
628
|
+
declare const meta_createGiftCardProduct: typeof createGiftCardProduct;
|
|
629
|
+
declare const meta_deleteGiftCardProduct: typeof deleteGiftCardProduct;
|
|
630
|
+
declare const meta_getGiftCardProduct: typeof getGiftCardProduct;
|
|
631
|
+
declare const meta_isInWixGiftCardsAppPopulation: typeof isInWixGiftCardsAppPopulation;
|
|
632
|
+
declare const meta_queryGiftCardProducts: typeof queryGiftCardProducts;
|
|
633
|
+
declare const meta_updateGiftCardProduct: typeof updateGiftCardProduct;
|
|
634
|
+
declare namespace meta {
|
|
635
|
+
export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_createGiftCardProduct as createGiftCardProduct, meta_deleteGiftCardProduct as deleteGiftCardProduct, meta_getGiftCardProduct as getGiftCardProduct, meta_isInWixGiftCardsAppPopulation as isInWixGiftCardsAppPopulation, meta_queryGiftCardProducts as queryGiftCardProducts, meta_updateGiftCardProduct as updateGiftCardProduct };
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
export { meta as giftVoucherProducts };
|