@wix/auto_sdk_loyalty_imports 1.0.11 → 1.0.13
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/index.d.mts +88 -0
- package/build/index.d.ts +88 -0
- package/build/index.js +539 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +505 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +88 -0
- package/build/internal/index.d.ts +88 -0
- package/build/internal/index.js +539 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +505 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/{cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → loyalty-imports-v1-loyalty-import-imports.universal-CPUezeMW.d.mts} +65 -174
- package/build/{cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → internal/loyalty-imports-v1-loyalty-import-imports.universal-CPUezeMW.d.ts} +65 -174
- package/build/{es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → internal/meta.d.mts} +59 -186
- package/build/internal/{es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.ts} +59 -186
- package/build/internal/meta.js +348 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +316 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{es/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → loyalty-imports-v1-loyalty-import-imports.universal-CPUezeMW.d.mts} +65 -174
- package/build/{internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts → loyalty-imports-v1-loyalty-import-imports.universal-CPUezeMW.d.ts} +65 -174
- package/build/{cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.mts} +59 -186
- package/build/{internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.ts} +59 -186
- package/build/meta.js +348 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +316 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +0 -16
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js +0 -23
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +0 -1
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +0 -46
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js +0 -243
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +0 -1
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +0 -18
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js +0 -142
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +0 -1
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +0 -77
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js +0 -61
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +0 -1
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js +0 -41
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +0 -1
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js +0 -340
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +0 -16
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.js +0 -16
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +0 -1
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +0 -46
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.js +0 -234
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +0 -1
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +0 -18
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js +0 -110
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +0 -1
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +0 -77
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.js +0 -48
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +0 -1
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.js +0 -38
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +0 -1
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js +0 -308
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +0 -16
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js +0 -23
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +0 -1
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +0 -46
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js +0 -243
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +0 -1
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +0 -18
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js +0 -142
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +0 -77
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js +0 -61
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +0 -1
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js +0 -41
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +0 -1
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js +0 -340
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +0 -16
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.js +0 -16
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +0 -1
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +0 -46
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.js +0 -234
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +0 -1
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +0 -18
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js +0 -110
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +0 -1
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +0 -77
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.js +0 -48
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +0 -1
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.js +0 -38
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +0 -1
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js +0 -308
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
1
|
/**
|
|
3
2
|
* An Import object is a batch import of loyalty points for existing customers.
|
|
4
3
|
* You can use Loyalty Imports to import loyalty points from 3rd-party providers or update existing customer point balances.
|
|
5
4
|
* This object tracks the entire import process from file upload to data processing.
|
|
6
5
|
*/
|
|
7
|
-
|
|
6
|
+
interface LoyaltyImport {
|
|
8
7
|
/**
|
|
9
8
|
* The ID of the import.
|
|
10
9
|
* @format GUID
|
|
@@ -39,7 +38,7 @@ export interface LoyaltyImport {
|
|
|
39
38
|
* Current status of the import process.
|
|
40
39
|
* @readonly
|
|
41
40
|
*/
|
|
42
|
-
status?:
|
|
41
|
+
status?: ImportStatusWithLiterals;
|
|
43
42
|
/** Metadata of the uploaded file containing loyalty points data. */
|
|
44
43
|
fileMetadata?: FileMetadata;
|
|
45
44
|
/** Results of parsing the uploaded file, including the number of rows parsed and any parse errors. */
|
|
@@ -47,7 +46,7 @@ export interface LoyaltyImport {
|
|
|
47
46
|
/** Results of the import process, including success and failure counts. */
|
|
48
47
|
importResult?: ImportResult;
|
|
49
48
|
}
|
|
50
|
-
|
|
49
|
+
declare enum ImportStatus {
|
|
51
50
|
/** Status is unknown or not specified. */
|
|
52
51
|
UNKNOWN = "UNKNOWN",
|
|
53
52
|
/** The import has been initiated but processing has not yet begun. */
|
|
@@ -63,7 +62,9 @@ export declare enum ImportStatus {
|
|
|
63
62
|
/** The import process has failed. */
|
|
64
63
|
FAILED = "FAILED"
|
|
65
64
|
}
|
|
66
|
-
|
|
65
|
+
/** @enumType */
|
|
66
|
+
type ImportStatusWithLiterals = ImportStatus | 'UNKNOWN' | 'INITIATED' | 'PARSING' | 'PARSED' | 'IMPORTING' | 'IMPORTED' | 'FAILED';
|
|
67
|
+
interface FileMetadata {
|
|
67
68
|
/**
|
|
68
69
|
* Size of the uploaded file in bytes. Max: `10 MB`.
|
|
69
70
|
* @max 104857600
|
|
@@ -96,7 +97,7 @@ export interface FileMetadata {
|
|
|
96
97
|
*/
|
|
97
98
|
sampleDataRows?: SampleDataRow[];
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
+
interface FileHeader {
|
|
100
101
|
/**
|
|
101
102
|
* Column headings from the first row of the uploaded file.
|
|
102
103
|
* @maxSize 100
|
|
@@ -104,7 +105,7 @@ export interface FileHeader {
|
|
|
104
105
|
*/
|
|
105
106
|
values?: string[];
|
|
106
107
|
}
|
|
107
|
-
|
|
108
|
+
interface HeaderMappingInfo {
|
|
108
109
|
/**
|
|
109
110
|
* Mappings between required loyalty data fields and file columns.
|
|
110
111
|
* Must contain exactly 2 mappings: one for `EMAIL` and one for `POINTS`.
|
|
@@ -113,22 +114,24 @@ export interface HeaderMappingInfo {
|
|
|
113
114
|
*/
|
|
114
115
|
headerMappings?: HeaderMapping[];
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
+
interface HeaderMapping {
|
|
117
118
|
/** The required loyalty data field that this mapping corresponds to. Must be either `EMAIL` or `POINTS`. */
|
|
118
|
-
columnName?:
|
|
119
|
+
columnName?: ColumnNameWithLiterals;
|
|
119
120
|
/**
|
|
120
121
|
* The zero-based index of the column in the uploaded file that contains the data for this loyalty field.
|
|
121
122
|
* For example, if the email addresses are in the second column of the CSV file, this value would be 1.
|
|
122
123
|
*/
|
|
123
124
|
columnIndex?: number;
|
|
124
125
|
}
|
|
125
|
-
|
|
126
|
+
declare enum ColumnName {
|
|
126
127
|
/** Column containing the customer's email address. */
|
|
127
128
|
EMAIL = "EMAIL",
|
|
128
129
|
/** Column containing the customer's loyalty point balance to be imported or updated. */
|
|
129
130
|
POINTS = "POINTS"
|
|
130
131
|
}
|
|
131
|
-
|
|
132
|
+
/** @enumType */
|
|
133
|
+
type ColumnNameWithLiterals = ColumnName | 'EMAIL' | 'POINTS';
|
|
134
|
+
interface SampleDataRow {
|
|
132
135
|
/**
|
|
133
136
|
* Values in one sample data row. Each value corresponds to a column in the CSV file.
|
|
134
137
|
* The number of values matches the number of columns in the file.
|
|
@@ -137,7 +140,7 @@ export interface SampleDataRow {
|
|
|
137
140
|
*/
|
|
138
141
|
values?: string[];
|
|
139
142
|
}
|
|
140
|
-
|
|
143
|
+
interface ParseResult {
|
|
141
144
|
/**
|
|
142
145
|
* Number of rows parsed from the uploaded import file.
|
|
143
146
|
* @readonly
|
|
@@ -150,7 +153,7 @@ export interface ParseResult {
|
|
|
150
153
|
*/
|
|
151
154
|
parseErrorReason?: string | null;
|
|
152
155
|
}
|
|
153
|
-
|
|
156
|
+
interface ImportResult {
|
|
154
157
|
/** Whether an error file detailing import failures is available for download. The file includes row-by-row import status, error reasons, and original data. */
|
|
155
158
|
errorFileExists?: boolean;
|
|
156
159
|
/**
|
|
@@ -164,7 +167,7 @@ export interface ImportResult {
|
|
|
164
167
|
*/
|
|
165
168
|
failureCount?: number | null;
|
|
166
169
|
}
|
|
167
|
-
|
|
170
|
+
interface CreateLoyaltyImportRequest {
|
|
168
171
|
/** URL of the file to import. */
|
|
169
172
|
fileUrl: string | null;
|
|
170
173
|
/** Name of the file to import. */
|
|
@@ -172,45 +175,45 @@ export interface CreateLoyaltyImportRequest {
|
|
|
172
175
|
/** Size of the file to import, in bytes. */
|
|
173
176
|
fileSize?: number | null;
|
|
174
177
|
}
|
|
175
|
-
|
|
178
|
+
interface CreateLoyaltyImportResponse {
|
|
176
179
|
/** Created loyalty import. */
|
|
177
180
|
loyaltyImport?: LoyaltyImport;
|
|
178
181
|
}
|
|
179
|
-
|
|
182
|
+
interface GetLoyaltyImportRequest {
|
|
180
183
|
/** Loyalty import ID. */
|
|
181
184
|
loyaltyImportId: string;
|
|
182
185
|
}
|
|
183
|
-
|
|
186
|
+
interface GetLoyaltyImportResponse {
|
|
184
187
|
/** Retrieved loyalty import. */
|
|
185
188
|
loyaltyImport?: LoyaltyImport;
|
|
186
189
|
}
|
|
187
|
-
|
|
190
|
+
interface GetErrorFileDownloadUrlRequest {
|
|
188
191
|
/** Loyalty import ID. */
|
|
189
192
|
loyaltyImportId: string;
|
|
190
193
|
}
|
|
191
|
-
|
|
194
|
+
interface GetErrorFileDownloadUrlResponse {
|
|
192
195
|
/** URL for downloading the error file. */
|
|
193
196
|
url?: string | null;
|
|
194
197
|
}
|
|
195
|
-
|
|
198
|
+
interface ExecuteLoyaltyImportRequest {
|
|
196
199
|
/** Loyalty import ID. */
|
|
197
200
|
loyaltyImportId: string;
|
|
198
201
|
/** Header mapping information for the import file. */
|
|
199
202
|
headerMappingInfo?: HeaderMappingInfo;
|
|
200
203
|
}
|
|
201
|
-
|
|
204
|
+
interface ExecuteLoyaltyImportResponse {
|
|
202
205
|
/** Executed loyalty import. */
|
|
203
206
|
loyaltyImport?: LoyaltyImport;
|
|
204
207
|
}
|
|
205
|
-
|
|
208
|
+
interface CreateLoyaltyImportFileUrlRequest {
|
|
206
209
|
}
|
|
207
|
-
|
|
210
|
+
interface CreateLoyaltyImportFileUrlResponse {
|
|
208
211
|
/** Path where the file will be stored. */
|
|
209
212
|
filePath?: string | null;
|
|
210
213
|
/** URL for uploading the loyalty import file. */
|
|
211
214
|
uploadUrl?: string | null;
|
|
212
215
|
}
|
|
213
|
-
|
|
216
|
+
interface QueryLoyaltyImportsRequest {
|
|
214
217
|
/**
|
|
215
218
|
* Filter object.
|
|
216
219
|
* See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
@@ -221,7 +224,7 @@ export interface QueryLoyaltyImportsRequest {
|
|
|
221
224
|
*/
|
|
222
225
|
query: CursorQuery;
|
|
223
226
|
}
|
|
224
|
-
|
|
227
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
225
228
|
/**
|
|
226
229
|
* Cursor paging options.
|
|
227
230
|
*
|
|
@@ -243,7 +246,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
243
246
|
sort?: Sorting[];
|
|
244
247
|
}
|
|
245
248
|
/** @oneof */
|
|
246
|
-
|
|
249
|
+
interface CursorQueryPagingMethodOneOf {
|
|
247
250
|
/**
|
|
248
251
|
* Cursor paging options.
|
|
249
252
|
*
|
|
@@ -251,20 +254,22 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
251
254
|
*/
|
|
252
255
|
cursorPaging?: CursorPaging;
|
|
253
256
|
}
|
|
254
|
-
|
|
257
|
+
interface Sorting {
|
|
255
258
|
/**
|
|
256
259
|
* Name of the field to sort by.
|
|
257
260
|
* @maxLength 512
|
|
258
261
|
*/
|
|
259
262
|
fieldName?: string;
|
|
260
263
|
/** Sort order. */
|
|
261
|
-
order?:
|
|
264
|
+
order?: SortOrderWithLiterals;
|
|
262
265
|
}
|
|
263
|
-
|
|
266
|
+
declare enum SortOrder {
|
|
264
267
|
ASC = "ASC",
|
|
265
268
|
DESC = "DESC"
|
|
266
269
|
}
|
|
267
|
-
|
|
270
|
+
/** @enumType */
|
|
271
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
272
|
+
interface CursorPaging {
|
|
268
273
|
/**
|
|
269
274
|
* Maximum number of items to return in the results.
|
|
270
275
|
* @max 100
|
|
@@ -279,13 +284,13 @@ export interface CursorPaging {
|
|
|
279
284
|
*/
|
|
280
285
|
cursor?: string | null;
|
|
281
286
|
}
|
|
282
|
-
|
|
287
|
+
interface QueryLoyaltyImportsResponse {
|
|
283
288
|
/** List of loyalty imports matching the query. */
|
|
284
289
|
loyaltyImports?: LoyaltyImport[];
|
|
285
290
|
/** Paging metadata. */
|
|
286
291
|
pagingMetadata?: CursorPagingMetadata;
|
|
287
292
|
}
|
|
288
|
-
|
|
293
|
+
interface CursorPagingMetadata {
|
|
289
294
|
/** Number of items returned in current page. */
|
|
290
295
|
count?: number | null;
|
|
291
296
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -298,7 +303,7 @@ export interface CursorPagingMetadata {
|
|
|
298
303
|
*/
|
|
299
304
|
hasNext?: boolean | null;
|
|
300
305
|
}
|
|
301
|
-
|
|
306
|
+
interface Cursors {
|
|
302
307
|
/**
|
|
303
308
|
* Cursor string pointing to the next page in the list of results.
|
|
304
309
|
* @maxLength 16000
|
|
@@ -310,7 +315,7 @@ export interface Cursors {
|
|
|
310
315
|
*/
|
|
311
316
|
prev?: string | null;
|
|
312
317
|
}
|
|
313
|
-
|
|
318
|
+
interface DeleteLoyaltyImportRequest {
|
|
314
319
|
/**
|
|
315
320
|
* Loyalty import ID.
|
|
316
321
|
* @format GUID
|
|
@@ -322,9 +327,9 @@ export interface DeleteLoyaltyImportRequest {
|
|
|
322
327
|
*/
|
|
323
328
|
revision?: string;
|
|
324
329
|
}
|
|
325
|
-
|
|
330
|
+
interface DeleteLoyaltyImportResponse {
|
|
326
331
|
}
|
|
327
|
-
|
|
332
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
328
333
|
createdEvent?: EntityCreatedEvent;
|
|
329
334
|
updatedEvent?: EntityUpdatedEvent;
|
|
330
335
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -359,19 +364,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
359
364
|
entityEventSequence?: string | null;
|
|
360
365
|
}
|
|
361
366
|
/** @oneof */
|
|
362
|
-
|
|
367
|
+
interface DomainEventBodyOneOf {
|
|
363
368
|
createdEvent?: EntityCreatedEvent;
|
|
364
369
|
updatedEvent?: EntityUpdatedEvent;
|
|
365
370
|
deletedEvent?: EntityDeletedEvent;
|
|
366
371
|
actionEvent?: ActionEvent;
|
|
367
372
|
}
|
|
368
|
-
|
|
373
|
+
interface EntityCreatedEvent {
|
|
369
374
|
entity?: string;
|
|
370
375
|
}
|
|
371
|
-
|
|
376
|
+
interface RestoreInfo {
|
|
372
377
|
deletedDate?: Date | null;
|
|
373
378
|
}
|
|
374
|
-
|
|
379
|
+
interface EntityUpdatedEvent {
|
|
375
380
|
/**
|
|
376
381
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
377
382
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -379,20 +384,20 @@ export interface EntityUpdatedEvent {
|
|
|
379
384
|
*/
|
|
380
385
|
currentEntity?: string;
|
|
381
386
|
}
|
|
382
|
-
|
|
387
|
+
interface EntityDeletedEvent {
|
|
383
388
|
/** Entity that was deleted. */
|
|
384
389
|
deletedEntity?: string | null;
|
|
385
390
|
}
|
|
386
|
-
|
|
391
|
+
interface ActionEvent {
|
|
387
392
|
body?: string;
|
|
388
393
|
}
|
|
389
|
-
|
|
394
|
+
interface Empty {
|
|
390
395
|
}
|
|
391
|
-
|
|
396
|
+
interface ImportFinished {
|
|
392
397
|
/** Completed loyalty import. */
|
|
393
398
|
loyaltyImport?: LoyaltyImport;
|
|
394
399
|
}
|
|
395
|
-
|
|
400
|
+
interface MessageEnvelope {
|
|
396
401
|
/**
|
|
397
402
|
* App instance ID.
|
|
398
403
|
* @format GUID
|
|
@@ -408,7 +413,7 @@ export interface MessageEnvelope {
|
|
|
408
413
|
/** Stringify payload. */
|
|
409
414
|
data?: string;
|
|
410
415
|
}
|
|
411
|
-
|
|
416
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
412
417
|
/**
|
|
413
418
|
* ID of a site visitor that has not logged in to the site.
|
|
414
419
|
* @format GUID
|
|
@@ -430,10 +435,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
430
435
|
*/
|
|
431
436
|
appId?: string;
|
|
432
437
|
/** @readonly */
|
|
433
|
-
identityType?:
|
|
438
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
434
439
|
}
|
|
435
440
|
/** @oneof */
|
|
436
|
-
|
|
441
|
+
interface IdentificationDataIdOneOf {
|
|
437
442
|
/**
|
|
438
443
|
* ID of a site visitor that has not logged in to the site.
|
|
439
444
|
* @format GUID
|
|
@@ -455,14 +460,16 @@ export interface IdentificationDataIdOneOf {
|
|
|
455
460
|
*/
|
|
456
461
|
appId?: string;
|
|
457
462
|
}
|
|
458
|
-
|
|
463
|
+
declare enum WebhookIdentityType {
|
|
459
464
|
UNKNOWN = "UNKNOWN",
|
|
460
465
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
461
466
|
MEMBER = "MEMBER",
|
|
462
467
|
WIX_USER = "WIX_USER",
|
|
463
468
|
APP = "APP"
|
|
464
469
|
}
|
|
465
|
-
|
|
470
|
+
/** @enumType */
|
|
471
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
472
|
+
interface BaseEventMetadata {
|
|
466
473
|
/**
|
|
467
474
|
* App instance ID.
|
|
468
475
|
* @format GUID
|
|
@@ -476,7 +483,7 @@ export interface BaseEventMetadata {
|
|
|
476
483
|
/** The identification type and identity data. */
|
|
477
484
|
identity?: IdentificationData;
|
|
478
485
|
}
|
|
479
|
-
|
|
486
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
480
487
|
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
481
488
|
_id?: string;
|
|
482
489
|
/**
|
|
@@ -506,137 +513,20 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
506
513
|
*/
|
|
507
514
|
entityEventSequence?: string | null;
|
|
508
515
|
}
|
|
509
|
-
|
|
516
|
+
interface LoyaltyImportCreatedEnvelope {
|
|
510
517
|
entity: LoyaltyImport;
|
|
511
518
|
metadata: EventMetadata;
|
|
512
519
|
}
|
|
513
|
-
|
|
514
|
-
* Triggered when a loyalty import is created.
|
|
515
|
-
* @webhook
|
|
516
|
-
* @eventType wix.loyalty.imports.v1.loyalty_import_created
|
|
517
|
-
* @serviceIdentifier wix.loyalty.imports.v1.LoyaltyImports
|
|
518
|
-
* @slug created
|
|
519
|
-
*/
|
|
520
|
-
export declare function onLoyaltyImportCreated(handler: (event: LoyaltyImportCreatedEnvelope) => void | Promise<void>): void;
|
|
521
|
-
type LoyaltyImportNonNullablePaths = `status` | `fileMetadata.url` | `fileMetadata.header.values` | `fileMetadata.headerMappingInfo.headerMappings` | `fileMetadata.headerMappingInfo.headerMappings.${number}.columnName` | `fileMetadata.headerMappingInfo.headerMappings.${number}.columnIndex` | `fileMetadata.sampleDataRows` | `importResult.errorFileExists`;
|
|
522
|
-
/**
|
|
523
|
-
* Creates an import object based on an uploaded file.
|
|
524
|
-
*
|
|
525
|
-
* Call this method after uploading your file to the URL obtained from `createLoyaltyImportFileUrl()`.
|
|
526
|
-
* @param fileUrl - URL of the file to import.
|
|
527
|
-
* @public
|
|
528
|
-
* @requiredField fileUrl
|
|
529
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
530
|
-
* @permissionScope Manage Loyalty
|
|
531
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
532
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
533
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
534
|
-
* @applicableIdentity APP
|
|
535
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImport
|
|
536
|
-
*/
|
|
537
|
-
export declare function createLoyaltyImport(fileUrl: string, options?: CreateLoyaltyImportOptions): Promise<NonNullablePaths<CreateLoyaltyImportResponse, {
|
|
538
|
-
[P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;
|
|
539
|
-
}[LoyaltyImportNonNullablePaths]>>;
|
|
540
|
-
export interface CreateLoyaltyImportOptions {
|
|
520
|
+
interface CreateLoyaltyImportOptions {
|
|
541
521
|
/** Name of the file to import. */
|
|
542
522
|
fileName?: string | null;
|
|
543
523
|
/** Size of the file to import, in bytes. */
|
|
544
524
|
fileSize?: number | null;
|
|
545
525
|
}
|
|
546
|
-
|
|
547
|
-
* Retrieves a loyalty import.
|
|
548
|
-
* @param loyaltyImportId - Loyalty import ID.
|
|
549
|
-
* @public
|
|
550
|
-
* @requiredField loyaltyImportId
|
|
551
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
552
|
-
* @permissionScope Manage Loyalty
|
|
553
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
554
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
555
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
556
|
-
* @applicableIdentity APP
|
|
557
|
-
* @returns Retrieved loyalty import.
|
|
558
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.GetLoyaltyImport
|
|
559
|
-
*/
|
|
560
|
-
export declare function getLoyaltyImport(loyaltyImportId: string): Promise<NonNullablePaths<LoyaltyImport, LoyaltyImportNonNullablePaths>>;
|
|
561
|
-
/**
|
|
562
|
-
* Retrieves the download URL for the error file of a failed loyalty import.
|
|
563
|
-
*
|
|
564
|
-
* If an import fails, the `importResult.errorFileExists` field in the `LoyaltyImport` object is set to `true`.
|
|
565
|
-
*
|
|
566
|
-
* Use this method to get the URL of the error file, which contains details about which items couldn't be imported and why.
|
|
567
|
-
* @param loyaltyImportId - Loyalty import ID.
|
|
568
|
-
* @public
|
|
569
|
-
* @requiredField loyaltyImportId
|
|
570
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
571
|
-
* @permissionScope Manage Loyalty
|
|
572
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
573
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
574
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
575
|
-
* @applicableIdentity APP
|
|
576
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.GetErrorFileDownloadUrl
|
|
577
|
-
*/
|
|
578
|
-
export declare function getErrorFileDownloadUrl(loyaltyImportId: string): Promise<GetErrorFileDownloadUrlResponse>;
|
|
579
|
-
/**
|
|
580
|
-
* Starts the actual import process for a loyalty import.
|
|
581
|
-
*
|
|
582
|
-
* Call this method after the loyalty import object reaches the `PARSED` status.
|
|
583
|
-
* @param loyaltyImportId - Loyalty import ID.
|
|
584
|
-
* @public
|
|
585
|
-
* @requiredField loyaltyImportId
|
|
586
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
587
|
-
* @permissionScope Manage Loyalty
|
|
588
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
589
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
590
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
591
|
-
* @applicableIdentity APP
|
|
592
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.ExecuteLoyaltyImport
|
|
593
|
-
*/
|
|
594
|
-
export declare function executeLoyaltyImport(loyaltyImportId: string, options?: ExecuteLoyaltyImportOptions): Promise<NonNullablePaths<ExecuteLoyaltyImportResponse, {
|
|
595
|
-
[P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;
|
|
596
|
-
}[LoyaltyImportNonNullablePaths]>>;
|
|
597
|
-
export interface ExecuteLoyaltyImportOptions {
|
|
526
|
+
interface ExecuteLoyaltyImportOptions {
|
|
598
527
|
/** Header mapping information for the import file. */
|
|
599
528
|
headerMappingInfo?: HeaderMappingInfo;
|
|
600
529
|
}
|
|
601
|
-
/**
|
|
602
|
-
* Creates a URL for uploading a loyalty import file.
|
|
603
|
-
*
|
|
604
|
-
* This method is the first step in the loyalty import process. It returns a file path and an upload URL, which you'll use in subsequent steps of the import process.
|
|
605
|
-
* @public
|
|
606
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
607
|
-
* @permissionScope Manage Loyalty
|
|
608
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
609
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
610
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
611
|
-
* @applicableIdentity APP
|
|
612
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImportFileUrl
|
|
613
|
-
*/
|
|
614
|
-
export declare function createLoyaltyImportFileUrl(): Promise<CreateLoyaltyImportFileUrlResponse>;
|
|
615
|
-
/**
|
|
616
|
-
* Creates a query to retrieve a list of loyalty imports.
|
|
617
|
-
*
|
|
618
|
-
* The `queryLoyaltyImports()` function builds a query to retrieve a list of imports and returns a `LoyaltyImportsQueryBuilder` object.
|
|
619
|
-
*
|
|
620
|
-
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
621
|
-
*
|
|
622
|
-
* You can refine the query by chaining `LoyaltyImportsQueryBuilder` functions onto the query. `LoyaltyImportsQueryBuilder` functions enable you to sort, filter, and control the results `queryLoyaltyImports()` returns.
|
|
623
|
-
*
|
|
624
|
-
* `queryLoyaltyImports()` runs with these `LoyaltyImportsQueryBuilder` defaults, which you can override:
|
|
625
|
-
*
|
|
626
|
-
* - `limit(50)`
|
|
627
|
-
* - `descending("_createdDate")`
|
|
628
|
-
*
|
|
629
|
-
* The functions that are chained to `queryLoyaltyImports()` are applied in the order they're called. For example, if you apply ascending('status') and then descending('_createdDate'), the results are sorted first by the status, and then, if there are multiple results with the same status, the items are sorted by the created date.
|
|
630
|
-
* @public
|
|
631
|
-
* @permissionScope Manage Loyalty
|
|
632
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
633
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
634
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
635
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
636
|
-
* @applicableIdentity APP
|
|
637
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.QueryLoyaltyImports
|
|
638
|
-
*/
|
|
639
|
-
export declare function queryLoyaltyImports(): LoyaltyImportsQueryBuilder;
|
|
640
530
|
interface QueryCursorResult {
|
|
641
531
|
cursors: Cursors;
|
|
642
532
|
hasNext: () => boolean;
|
|
@@ -644,13 +534,13 @@ interface QueryCursorResult {
|
|
|
644
534
|
length: number;
|
|
645
535
|
pageSize: number;
|
|
646
536
|
}
|
|
647
|
-
|
|
537
|
+
interface LoyaltyImportsQueryResult extends QueryCursorResult {
|
|
648
538
|
items: LoyaltyImport[];
|
|
649
539
|
query: LoyaltyImportsQueryBuilder;
|
|
650
540
|
next: () => Promise<LoyaltyImportsQueryResult>;
|
|
651
541
|
prev: () => Promise<LoyaltyImportsQueryResult>;
|
|
652
542
|
}
|
|
653
|
-
|
|
543
|
+
interface LoyaltyImportsQueryBuilder {
|
|
654
544
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
655
545
|
* @param value - Value to compare against.
|
|
656
546
|
*/
|
|
@@ -691,4 +581,5 @@ export interface LoyaltyImportsQueryBuilder {
|
|
|
691
581
|
skipTo: (cursor: string) => LoyaltyImportsQueryBuilder;
|
|
692
582
|
find: () => Promise<LoyaltyImportsQueryResult>;
|
|
693
583
|
}
|
|
694
|
-
|
|
584
|
+
|
|
585
|
+
export { type EntityCreatedEvent as A, type EntityUpdatedEvent as B, type CreateLoyaltyImportOptions as C, type DeleteLoyaltyImportRequest as D, type ExecuteLoyaltyImportOptions as E, type FileMetadata as F, type GetErrorFileDownloadUrlResponse as G, type HeaderMappingInfo as H, ImportStatus as I, type EntityDeletedEvent as J, type ActionEvent as K, type LoyaltyImport as L, type Empty as M, type ImportFinished as N, type MessageEnvelope as O, type ParseResult as P, type QueryLoyaltyImportsRequest as Q, type RestoreInfo as R, SortOrder as S, type IdentificationData as T, type IdentificationDataIdOneOf as U, type BaseEventMetadata as V, WebhookIdentityType as W, type EventMetadata as X, type LoyaltyImportsQueryResult as Y, type CreateLoyaltyImportResponse as a, type ExecuteLoyaltyImportResponse as b, type CreateLoyaltyImportFileUrlResponse as c, type LoyaltyImportsQueryBuilder as d, type LoyaltyImportCreatedEnvelope as e, ColumnName as f, type FileHeader as g, type HeaderMapping as h, type SampleDataRow as i, type ImportResult as j, type CreateLoyaltyImportRequest as k, type GetLoyaltyImportRequest as l, type GetLoyaltyImportResponse as m, type GetErrorFileDownloadUrlRequest as n, type ExecuteLoyaltyImportRequest as o, type CreateLoyaltyImportFileUrlRequest as p, type CursorQuery as q, type CursorQueryPagingMethodOneOf as r, type Sorting as s, type CursorPaging as t, type QueryLoyaltyImportsResponse as u, type CursorPagingMetadata as v, type Cursors as w, type DeleteLoyaltyImportResponse as x, type DomainEvent as y, type DomainEventBodyOneOf as z };
|