@wix/auto_sdk_loyalty_imports 1.0.12 → 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} +57 -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} +57 -174
- package/build/{es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → internal/meta.d.mts} +53 -188
- package/build/internal/{es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.ts} +53 -188
- 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} +57 -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} +57 -174
- package/build/{cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.mts} +53 -188
- package/build/{internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts → meta.d.ts} +53 -188
- 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
|
|
@@ -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. */
|
|
@@ -64,8 +63,8 @@ export declare enum ImportStatus {
|
|
|
64
63
|
FAILED = "FAILED"
|
|
65
64
|
}
|
|
66
65
|
/** @enumType */
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
type ImportStatusWithLiterals = ImportStatus | 'UNKNOWN' | 'INITIATED' | 'PARSING' | 'PARSED' | 'IMPORTING' | 'IMPORTED' | 'FAILED';
|
|
67
|
+
interface FileMetadata {
|
|
69
68
|
/**
|
|
70
69
|
* Size of the uploaded file in bytes. Max: `10 MB`.
|
|
71
70
|
* @max 104857600
|
|
@@ -98,7 +97,7 @@ export interface FileMetadata {
|
|
|
98
97
|
*/
|
|
99
98
|
sampleDataRows?: SampleDataRow[];
|
|
100
99
|
}
|
|
101
|
-
|
|
100
|
+
interface FileHeader {
|
|
102
101
|
/**
|
|
103
102
|
* Column headings from the first row of the uploaded file.
|
|
104
103
|
* @maxSize 100
|
|
@@ -106,7 +105,7 @@ export interface FileHeader {
|
|
|
106
105
|
*/
|
|
107
106
|
values?: string[];
|
|
108
107
|
}
|
|
109
|
-
|
|
108
|
+
interface HeaderMappingInfo {
|
|
110
109
|
/**
|
|
111
110
|
* Mappings between required loyalty data fields and file columns.
|
|
112
111
|
* Must contain exactly 2 mappings: one for `EMAIL` and one for `POINTS`.
|
|
@@ -115,7 +114,7 @@ export interface HeaderMappingInfo {
|
|
|
115
114
|
*/
|
|
116
115
|
headerMappings?: HeaderMapping[];
|
|
117
116
|
}
|
|
118
|
-
|
|
117
|
+
interface HeaderMapping {
|
|
119
118
|
/** The required loyalty data field that this mapping corresponds to. Must be either `EMAIL` or `POINTS`. */
|
|
120
119
|
columnName?: ColumnNameWithLiterals;
|
|
121
120
|
/**
|
|
@@ -124,15 +123,15 @@ export interface HeaderMapping {
|
|
|
124
123
|
*/
|
|
125
124
|
columnIndex?: number;
|
|
126
125
|
}
|
|
127
|
-
|
|
126
|
+
declare enum ColumnName {
|
|
128
127
|
/** Column containing the customer's email address. */
|
|
129
128
|
EMAIL = "EMAIL",
|
|
130
129
|
/** Column containing the customer's loyalty point balance to be imported or updated. */
|
|
131
130
|
POINTS = "POINTS"
|
|
132
131
|
}
|
|
133
132
|
/** @enumType */
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
type ColumnNameWithLiterals = ColumnName | 'EMAIL' | 'POINTS';
|
|
134
|
+
interface SampleDataRow {
|
|
136
135
|
/**
|
|
137
136
|
* Values in one sample data row. Each value corresponds to a column in the CSV file.
|
|
138
137
|
* The number of values matches the number of columns in the file.
|
|
@@ -141,7 +140,7 @@ export interface SampleDataRow {
|
|
|
141
140
|
*/
|
|
142
141
|
values?: string[];
|
|
143
142
|
}
|
|
144
|
-
|
|
143
|
+
interface ParseResult {
|
|
145
144
|
/**
|
|
146
145
|
* Number of rows parsed from the uploaded import file.
|
|
147
146
|
* @readonly
|
|
@@ -154,7 +153,7 @@ export interface ParseResult {
|
|
|
154
153
|
*/
|
|
155
154
|
parseErrorReason?: string | null;
|
|
156
155
|
}
|
|
157
|
-
|
|
156
|
+
interface ImportResult {
|
|
158
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. */
|
|
159
158
|
errorFileExists?: boolean;
|
|
160
159
|
/**
|
|
@@ -168,7 +167,7 @@ export interface ImportResult {
|
|
|
168
167
|
*/
|
|
169
168
|
failureCount?: number | null;
|
|
170
169
|
}
|
|
171
|
-
|
|
170
|
+
interface CreateLoyaltyImportRequest {
|
|
172
171
|
/** URL of the file to import. */
|
|
173
172
|
fileUrl: string | null;
|
|
174
173
|
/** Name of the file to import. */
|
|
@@ -176,45 +175,45 @@ export interface CreateLoyaltyImportRequest {
|
|
|
176
175
|
/** Size of the file to import, in bytes. */
|
|
177
176
|
fileSize?: number | null;
|
|
178
177
|
}
|
|
179
|
-
|
|
178
|
+
interface CreateLoyaltyImportResponse {
|
|
180
179
|
/** Created loyalty import. */
|
|
181
180
|
loyaltyImport?: LoyaltyImport;
|
|
182
181
|
}
|
|
183
|
-
|
|
182
|
+
interface GetLoyaltyImportRequest {
|
|
184
183
|
/** Loyalty import ID. */
|
|
185
184
|
loyaltyImportId: string;
|
|
186
185
|
}
|
|
187
|
-
|
|
186
|
+
interface GetLoyaltyImportResponse {
|
|
188
187
|
/** Retrieved loyalty import. */
|
|
189
188
|
loyaltyImport?: LoyaltyImport;
|
|
190
189
|
}
|
|
191
|
-
|
|
190
|
+
interface GetErrorFileDownloadUrlRequest {
|
|
192
191
|
/** Loyalty import ID. */
|
|
193
192
|
loyaltyImportId: string;
|
|
194
193
|
}
|
|
195
|
-
|
|
194
|
+
interface GetErrorFileDownloadUrlResponse {
|
|
196
195
|
/** URL for downloading the error file. */
|
|
197
196
|
url?: string | null;
|
|
198
197
|
}
|
|
199
|
-
|
|
198
|
+
interface ExecuteLoyaltyImportRequest {
|
|
200
199
|
/** Loyalty import ID. */
|
|
201
200
|
loyaltyImportId: string;
|
|
202
201
|
/** Header mapping information for the import file. */
|
|
203
202
|
headerMappingInfo?: HeaderMappingInfo;
|
|
204
203
|
}
|
|
205
|
-
|
|
204
|
+
interface ExecuteLoyaltyImportResponse {
|
|
206
205
|
/** Executed loyalty import. */
|
|
207
206
|
loyaltyImport?: LoyaltyImport;
|
|
208
207
|
}
|
|
209
|
-
|
|
208
|
+
interface CreateLoyaltyImportFileUrlRequest {
|
|
210
209
|
}
|
|
211
|
-
|
|
210
|
+
interface CreateLoyaltyImportFileUrlResponse {
|
|
212
211
|
/** Path where the file will be stored. */
|
|
213
212
|
filePath?: string | null;
|
|
214
213
|
/** URL for uploading the loyalty import file. */
|
|
215
214
|
uploadUrl?: string | null;
|
|
216
215
|
}
|
|
217
|
-
|
|
216
|
+
interface QueryLoyaltyImportsRequest {
|
|
218
217
|
/**
|
|
219
218
|
* Filter object.
|
|
220
219
|
* See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
@@ -225,7 +224,7 @@ export interface QueryLoyaltyImportsRequest {
|
|
|
225
224
|
*/
|
|
226
225
|
query: CursorQuery;
|
|
227
226
|
}
|
|
228
|
-
|
|
227
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
229
228
|
/**
|
|
230
229
|
* Cursor paging options.
|
|
231
230
|
*
|
|
@@ -247,7 +246,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
247
246
|
sort?: Sorting[];
|
|
248
247
|
}
|
|
249
248
|
/** @oneof */
|
|
250
|
-
|
|
249
|
+
interface CursorQueryPagingMethodOneOf {
|
|
251
250
|
/**
|
|
252
251
|
* Cursor paging options.
|
|
253
252
|
*
|
|
@@ -255,7 +254,7 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
255
254
|
*/
|
|
256
255
|
cursorPaging?: CursorPaging;
|
|
257
256
|
}
|
|
258
|
-
|
|
257
|
+
interface Sorting {
|
|
259
258
|
/**
|
|
260
259
|
* Name of the field to sort by.
|
|
261
260
|
* @maxLength 512
|
|
@@ -264,13 +263,13 @@ export interface Sorting {
|
|
|
264
263
|
/** Sort order. */
|
|
265
264
|
order?: SortOrderWithLiterals;
|
|
266
265
|
}
|
|
267
|
-
|
|
266
|
+
declare enum SortOrder {
|
|
268
267
|
ASC = "ASC",
|
|
269
268
|
DESC = "DESC"
|
|
270
269
|
}
|
|
271
270
|
/** @enumType */
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
272
|
+
interface CursorPaging {
|
|
274
273
|
/**
|
|
275
274
|
* Maximum number of items to return in the results.
|
|
276
275
|
* @max 100
|
|
@@ -285,13 +284,13 @@ export interface CursorPaging {
|
|
|
285
284
|
*/
|
|
286
285
|
cursor?: string | null;
|
|
287
286
|
}
|
|
288
|
-
|
|
287
|
+
interface QueryLoyaltyImportsResponse {
|
|
289
288
|
/** List of loyalty imports matching the query. */
|
|
290
289
|
loyaltyImports?: LoyaltyImport[];
|
|
291
290
|
/** Paging metadata. */
|
|
292
291
|
pagingMetadata?: CursorPagingMetadata;
|
|
293
292
|
}
|
|
294
|
-
|
|
293
|
+
interface CursorPagingMetadata {
|
|
295
294
|
/** Number of items returned in current page. */
|
|
296
295
|
count?: number | null;
|
|
297
296
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -304,7 +303,7 @@ export interface CursorPagingMetadata {
|
|
|
304
303
|
*/
|
|
305
304
|
hasNext?: boolean | null;
|
|
306
305
|
}
|
|
307
|
-
|
|
306
|
+
interface Cursors {
|
|
308
307
|
/**
|
|
309
308
|
* Cursor string pointing to the next page in the list of results.
|
|
310
309
|
* @maxLength 16000
|
|
@@ -316,7 +315,7 @@ export interface Cursors {
|
|
|
316
315
|
*/
|
|
317
316
|
prev?: string | null;
|
|
318
317
|
}
|
|
319
|
-
|
|
318
|
+
interface DeleteLoyaltyImportRequest {
|
|
320
319
|
/**
|
|
321
320
|
* Loyalty import ID.
|
|
322
321
|
* @format GUID
|
|
@@ -328,9 +327,9 @@ export interface DeleteLoyaltyImportRequest {
|
|
|
328
327
|
*/
|
|
329
328
|
revision?: string;
|
|
330
329
|
}
|
|
331
|
-
|
|
330
|
+
interface DeleteLoyaltyImportResponse {
|
|
332
331
|
}
|
|
333
|
-
|
|
332
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
334
333
|
createdEvent?: EntityCreatedEvent;
|
|
335
334
|
updatedEvent?: EntityUpdatedEvent;
|
|
336
335
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -365,19 +364,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
365
364
|
entityEventSequence?: string | null;
|
|
366
365
|
}
|
|
367
366
|
/** @oneof */
|
|
368
|
-
|
|
367
|
+
interface DomainEventBodyOneOf {
|
|
369
368
|
createdEvent?: EntityCreatedEvent;
|
|
370
369
|
updatedEvent?: EntityUpdatedEvent;
|
|
371
370
|
deletedEvent?: EntityDeletedEvent;
|
|
372
371
|
actionEvent?: ActionEvent;
|
|
373
372
|
}
|
|
374
|
-
|
|
373
|
+
interface EntityCreatedEvent {
|
|
375
374
|
entity?: string;
|
|
376
375
|
}
|
|
377
|
-
|
|
376
|
+
interface RestoreInfo {
|
|
378
377
|
deletedDate?: Date | null;
|
|
379
378
|
}
|
|
380
|
-
|
|
379
|
+
interface EntityUpdatedEvent {
|
|
381
380
|
/**
|
|
382
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.
|
|
383
382
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -385,20 +384,20 @@ export interface EntityUpdatedEvent {
|
|
|
385
384
|
*/
|
|
386
385
|
currentEntity?: string;
|
|
387
386
|
}
|
|
388
|
-
|
|
387
|
+
interface EntityDeletedEvent {
|
|
389
388
|
/** Entity that was deleted. */
|
|
390
389
|
deletedEntity?: string | null;
|
|
391
390
|
}
|
|
392
|
-
|
|
391
|
+
interface ActionEvent {
|
|
393
392
|
body?: string;
|
|
394
393
|
}
|
|
395
|
-
|
|
394
|
+
interface Empty {
|
|
396
395
|
}
|
|
397
|
-
|
|
396
|
+
interface ImportFinished {
|
|
398
397
|
/** Completed loyalty import. */
|
|
399
398
|
loyaltyImport?: LoyaltyImport;
|
|
400
399
|
}
|
|
401
|
-
|
|
400
|
+
interface MessageEnvelope {
|
|
402
401
|
/**
|
|
403
402
|
* App instance ID.
|
|
404
403
|
* @format GUID
|
|
@@ -414,7 +413,7 @@ export interface MessageEnvelope {
|
|
|
414
413
|
/** Stringify payload. */
|
|
415
414
|
data?: string;
|
|
416
415
|
}
|
|
417
|
-
|
|
416
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
418
417
|
/**
|
|
419
418
|
* ID of a site visitor that has not logged in to the site.
|
|
420
419
|
* @format GUID
|
|
@@ -439,7 +438,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
439
438
|
identityType?: WebhookIdentityTypeWithLiterals;
|
|
440
439
|
}
|
|
441
440
|
/** @oneof */
|
|
442
|
-
|
|
441
|
+
interface IdentificationDataIdOneOf {
|
|
443
442
|
/**
|
|
444
443
|
* ID of a site visitor that has not logged in to the site.
|
|
445
444
|
* @format GUID
|
|
@@ -461,7 +460,7 @@ export interface IdentificationDataIdOneOf {
|
|
|
461
460
|
*/
|
|
462
461
|
appId?: string;
|
|
463
462
|
}
|
|
464
|
-
|
|
463
|
+
declare enum WebhookIdentityType {
|
|
465
464
|
UNKNOWN = "UNKNOWN",
|
|
466
465
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
467
466
|
MEMBER = "MEMBER",
|
|
@@ -469,8 +468,8 @@ export declare enum WebhookIdentityType {
|
|
|
469
468
|
APP = "APP"
|
|
470
469
|
}
|
|
471
470
|
/** @enumType */
|
|
472
|
-
|
|
473
|
-
|
|
471
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
472
|
+
interface BaseEventMetadata {
|
|
474
473
|
/**
|
|
475
474
|
* App instance ID.
|
|
476
475
|
* @format GUID
|
|
@@ -484,7 +483,7 @@ export interface BaseEventMetadata {
|
|
|
484
483
|
/** The identification type and identity data. */
|
|
485
484
|
identity?: IdentificationData;
|
|
486
485
|
}
|
|
487
|
-
|
|
486
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
488
487
|
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
489
488
|
_id?: string;
|
|
490
489
|
/**
|
|
@@ -514,137 +513,20 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
514
513
|
*/
|
|
515
514
|
entityEventSequence?: string | null;
|
|
516
515
|
}
|
|
517
|
-
|
|
516
|
+
interface LoyaltyImportCreatedEnvelope {
|
|
518
517
|
entity: LoyaltyImport;
|
|
519
518
|
metadata: EventMetadata;
|
|
520
519
|
}
|
|
521
|
-
|
|
522
|
-
* Triggered when a loyalty import is created.
|
|
523
|
-
* @webhook
|
|
524
|
-
* @eventType wix.loyalty.imports.v1.loyalty_import_created
|
|
525
|
-
* @serviceIdentifier wix.loyalty.imports.v1.LoyaltyImports
|
|
526
|
-
* @slug created
|
|
527
|
-
*/
|
|
528
|
-
export declare function onLoyaltyImportCreated(handler: (event: LoyaltyImportCreatedEnvelope) => void | Promise<void>): void;
|
|
529
|
-
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`;
|
|
530
|
-
/**
|
|
531
|
-
* Creates an import object based on an uploaded file.
|
|
532
|
-
*
|
|
533
|
-
* Call this method after uploading your file to the URL obtained from `createLoyaltyImportFileUrl()`.
|
|
534
|
-
* @param fileUrl - URL of the file to import.
|
|
535
|
-
* @public
|
|
536
|
-
* @requiredField fileUrl
|
|
537
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
538
|
-
* @permissionScope Manage Loyalty
|
|
539
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
540
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
541
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
542
|
-
* @applicableIdentity APP
|
|
543
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImport
|
|
544
|
-
*/
|
|
545
|
-
export declare function createLoyaltyImport(fileUrl: string, options?: CreateLoyaltyImportOptions): Promise<NonNullablePaths<CreateLoyaltyImportResponse, {
|
|
546
|
-
[P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;
|
|
547
|
-
}[LoyaltyImportNonNullablePaths]>>;
|
|
548
|
-
export interface CreateLoyaltyImportOptions {
|
|
520
|
+
interface CreateLoyaltyImportOptions {
|
|
549
521
|
/** Name of the file to import. */
|
|
550
522
|
fileName?: string | null;
|
|
551
523
|
/** Size of the file to import, in bytes. */
|
|
552
524
|
fileSize?: number | null;
|
|
553
525
|
}
|
|
554
|
-
|
|
555
|
-
* Retrieves a loyalty import.
|
|
556
|
-
* @param loyaltyImportId - Loyalty import ID.
|
|
557
|
-
* @public
|
|
558
|
-
* @requiredField loyaltyImportId
|
|
559
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
560
|
-
* @permissionScope Manage Loyalty
|
|
561
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
562
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
563
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
564
|
-
* @applicableIdentity APP
|
|
565
|
-
* @returns Retrieved loyalty import.
|
|
566
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.GetLoyaltyImport
|
|
567
|
-
*/
|
|
568
|
-
export declare function getLoyaltyImport(loyaltyImportId: string): Promise<NonNullablePaths<LoyaltyImport, LoyaltyImportNonNullablePaths>>;
|
|
569
|
-
/**
|
|
570
|
-
* Retrieves the download URL for the error file of a failed loyalty import.
|
|
571
|
-
*
|
|
572
|
-
* If an import fails, the `importResult.errorFileExists` field in the `LoyaltyImport` object is set to `true`.
|
|
573
|
-
*
|
|
574
|
-
* Use this method to get the URL of the error file, which contains details about which items couldn't be imported and why.
|
|
575
|
-
* @param loyaltyImportId - Loyalty import ID.
|
|
576
|
-
* @public
|
|
577
|
-
* @requiredField loyaltyImportId
|
|
578
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
579
|
-
* @permissionScope Manage Loyalty
|
|
580
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
581
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
582
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
583
|
-
* @applicableIdentity APP
|
|
584
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.GetErrorFileDownloadUrl
|
|
585
|
-
*/
|
|
586
|
-
export declare function getErrorFileDownloadUrl(loyaltyImportId: string): Promise<GetErrorFileDownloadUrlResponse>;
|
|
587
|
-
/**
|
|
588
|
-
* Starts the actual import process for a loyalty import.
|
|
589
|
-
*
|
|
590
|
-
* Call this method after the loyalty import object reaches the `PARSED` status.
|
|
591
|
-
* @param loyaltyImportId - Loyalty import ID.
|
|
592
|
-
* @public
|
|
593
|
-
* @requiredField loyaltyImportId
|
|
594
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
595
|
-
* @permissionScope Manage Loyalty
|
|
596
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
597
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
598
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
599
|
-
* @applicableIdentity APP
|
|
600
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.ExecuteLoyaltyImport
|
|
601
|
-
*/
|
|
602
|
-
export declare function executeLoyaltyImport(loyaltyImportId: string, options?: ExecuteLoyaltyImportOptions): Promise<NonNullablePaths<ExecuteLoyaltyImportResponse, {
|
|
603
|
-
[P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;
|
|
604
|
-
}[LoyaltyImportNonNullablePaths]>>;
|
|
605
|
-
export interface ExecuteLoyaltyImportOptions {
|
|
526
|
+
interface ExecuteLoyaltyImportOptions {
|
|
606
527
|
/** Header mapping information for the import file. */
|
|
607
528
|
headerMappingInfo?: HeaderMappingInfo;
|
|
608
529
|
}
|
|
609
|
-
/**
|
|
610
|
-
* Creates a URL for uploading a loyalty import file.
|
|
611
|
-
*
|
|
612
|
-
* 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.
|
|
613
|
-
* @public
|
|
614
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
615
|
-
* @permissionScope Manage Loyalty
|
|
616
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
617
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
618
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
619
|
-
* @applicableIdentity APP
|
|
620
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImportFileUrl
|
|
621
|
-
*/
|
|
622
|
-
export declare function createLoyaltyImportFileUrl(): Promise<CreateLoyaltyImportFileUrlResponse>;
|
|
623
|
-
/**
|
|
624
|
-
* Creates a query to retrieve a list of loyalty imports.
|
|
625
|
-
*
|
|
626
|
-
* The `queryLoyaltyImports()` function builds a query to retrieve a list of imports and returns a `LoyaltyImportsQueryBuilder` object.
|
|
627
|
-
*
|
|
628
|
-
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
629
|
-
*
|
|
630
|
-
* 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.
|
|
631
|
-
*
|
|
632
|
-
* `queryLoyaltyImports()` runs with these `LoyaltyImportsQueryBuilder` defaults, which you can override:
|
|
633
|
-
*
|
|
634
|
-
* - `limit(50)`
|
|
635
|
-
* - `descending("_createdDate")`
|
|
636
|
-
*
|
|
637
|
-
* 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.
|
|
638
|
-
* @public
|
|
639
|
-
* @permissionScope Manage Loyalty
|
|
640
|
-
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
641
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
642
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
643
|
-
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
644
|
-
* @applicableIdentity APP
|
|
645
|
-
* @fqn wix.loyalty.imports.v1.LoyaltyImports.QueryLoyaltyImports
|
|
646
|
-
*/
|
|
647
|
-
export declare function queryLoyaltyImports(): LoyaltyImportsQueryBuilder;
|
|
648
530
|
interface QueryCursorResult {
|
|
649
531
|
cursors: Cursors;
|
|
650
532
|
hasNext: () => boolean;
|
|
@@ -652,13 +534,13 @@ interface QueryCursorResult {
|
|
|
652
534
|
length: number;
|
|
653
535
|
pageSize: number;
|
|
654
536
|
}
|
|
655
|
-
|
|
537
|
+
interface LoyaltyImportsQueryResult extends QueryCursorResult {
|
|
656
538
|
items: LoyaltyImport[];
|
|
657
539
|
query: LoyaltyImportsQueryBuilder;
|
|
658
540
|
next: () => Promise<LoyaltyImportsQueryResult>;
|
|
659
541
|
prev: () => Promise<LoyaltyImportsQueryResult>;
|
|
660
542
|
}
|
|
661
|
-
|
|
543
|
+
interface LoyaltyImportsQueryBuilder {
|
|
662
544
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
663
545
|
* @param value - Value to compare against.
|
|
664
546
|
*/
|
|
@@ -699,4 +581,5 @@ export interface LoyaltyImportsQueryBuilder {
|
|
|
699
581
|
skipTo: (cursor: string) => LoyaltyImportsQueryBuilder;
|
|
700
582
|
find: () => Promise<LoyaltyImportsQueryResult>;
|
|
701
583
|
}
|
|
702
|
-
|
|
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 };
|