@wix/auto_sdk_loyalty_imports 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +16 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js +23 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +1 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +46 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js +243 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +1 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +18 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js +142 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +1 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +77 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js +61 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +1 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts +473 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js +41 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +1 -0
- package/build/{internal/loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.mts → cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts} +170 -53
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js +338 -0
- package/build/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +16 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.js +16 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +1 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +46 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.js +234 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +1 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +18 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js +110 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +1 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +77 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.js +48 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +1 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts +473 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.js +38 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +1 -0
- package/build/{internal/loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.ts → es/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts} +170 -53
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js +306 -0
- package/build/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +16 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js +23 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +1 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +46 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js +243 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +1 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +18 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js +142 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +77 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js +61 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +1 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts +473 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js +41 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +1 -0
- package/build/{loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.mts → internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts} +170 -53
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js +338 -0
- package/build/internal/cjs/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.d.ts +16 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.js +16 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.context.js.map +1 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.d.ts +46 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.js +234 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.http.js.map +1 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.d.ts +18 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js +110 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.meta.js.map +1 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.d.ts +77 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.js +48 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.public.js.map +1 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.d.ts +473 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.js +38 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.types.js.map +1 -0
- package/build/{loyalty-imports-v1-loyalty-import-imports.universal-2D8oFVKm.d.ts → internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.d.ts} +170 -53
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js +306 -0
- package/build/internal/es/src/loyalty-imports-v1-loyalty-import-imports.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.d.mts +0 -88
- package/build/index.d.ts +0 -88
- package/build/index.js +0 -536
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -502
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -88
- package/build/internal/index.d.ts +0 -88
- package/build/internal/index.js +0 -536
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -502
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -332
- package/build/internal/meta.d.ts +0 -332
- package/build/internal/meta.js +0 -348
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -316
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -332
- package/build/meta.d.ts +0 -332
- package/build/meta.js +0 -348
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -316
- package/build/meta.mjs.map +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
1
2
|
/**
|
|
2
3
|
* An Import object is a batch import of loyalty points for existing customers.
|
|
3
4
|
* You can use Loyalty Imports to import loyalty points from 3rd-party providers or update existing customer point balances.
|
|
4
5
|
* This object tracks the entire import process from file upload to data processing.
|
|
5
6
|
*/
|
|
6
|
-
interface LoyaltyImport {
|
|
7
|
+
export interface LoyaltyImport {
|
|
7
8
|
/**
|
|
8
9
|
* The ID of the import.
|
|
9
10
|
* @format GUID
|
|
@@ -46,7 +47,7 @@ interface LoyaltyImport {
|
|
|
46
47
|
/** Results of the import process, including success and failure counts. */
|
|
47
48
|
importResult?: ImportResult;
|
|
48
49
|
}
|
|
49
|
-
declare enum ImportStatus {
|
|
50
|
+
export declare enum ImportStatus {
|
|
50
51
|
/** Status is unknown or not specified. */
|
|
51
52
|
UNKNOWN = "UNKNOWN",
|
|
52
53
|
/** The import has been initiated but processing has not yet begun. */
|
|
@@ -62,7 +63,7 @@ declare enum ImportStatus {
|
|
|
62
63
|
/** The import process has failed. */
|
|
63
64
|
FAILED = "FAILED"
|
|
64
65
|
}
|
|
65
|
-
interface FileMetadata {
|
|
66
|
+
export interface FileMetadata {
|
|
66
67
|
/**
|
|
67
68
|
* Size of the uploaded file in bytes. Max: `10 MB`.
|
|
68
69
|
* @max 104857600
|
|
@@ -95,7 +96,7 @@ interface FileMetadata {
|
|
|
95
96
|
*/
|
|
96
97
|
sampleDataRows?: SampleDataRow[];
|
|
97
98
|
}
|
|
98
|
-
interface FileHeader {
|
|
99
|
+
export interface FileHeader {
|
|
99
100
|
/**
|
|
100
101
|
* Column headings from the first row of the uploaded file.
|
|
101
102
|
* @maxSize 100
|
|
@@ -103,7 +104,7 @@ interface FileHeader {
|
|
|
103
104
|
*/
|
|
104
105
|
values?: string[];
|
|
105
106
|
}
|
|
106
|
-
interface HeaderMappingInfo {
|
|
107
|
+
export interface HeaderMappingInfo {
|
|
107
108
|
/**
|
|
108
109
|
* Mappings between required loyalty data fields and file columns.
|
|
109
110
|
* Must contain exactly 2 mappings: one for `EMAIL` and one for `POINTS`.
|
|
@@ -112,7 +113,7 @@ interface HeaderMappingInfo {
|
|
|
112
113
|
*/
|
|
113
114
|
headerMappings?: HeaderMapping[];
|
|
114
115
|
}
|
|
115
|
-
interface HeaderMapping {
|
|
116
|
+
export interface HeaderMapping {
|
|
116
117
|
/** The required loyalty data field that this mapping corresponds to. Must be either `EMAIL` or `POINTS`. */
|
|
117
118
|
columnName?: ColumnName;
|
|
118
119
|
/**
|
|
@@ -121,13 +122,13 @@ interface HeaderMapping {
|
|
|
121
122
|
*/
|
|
122
123
|
columnIndex?: number;
|
|
123
124
|
}
|
|
124
|
-
declare enum ColumnName {
|
|
125
|
+
export declare enum ColumnName {
|
|
125
126
|
/** Column containing the customer's email address. */
|
|
126
127
|
EMAIL = "EMAIL",
|
|
127
128
|
/** Column containing the customer's loyalty point balance to be imported or updated. */
|
|
128
129
|
POINTS = "POINTS"
|
|
129
130
|
}
|
|
130
|
-
interface SampleDataRow {
|
|
131
|
+
export interface SampleDataRow {
|
|
131
132
|
/**
|
|
132
133
|
* Values in one sample data row. Each value corresponds to a column in the CSV file.
|
|
133
134
|
* The number of values matches the number of columns in the file.
|
|
@@ -136,7 +137,7 @@ interface SampleDataRow {
|
|
|
136
137
|
*/
|
|
137
138
|
values?: string[];
|
|
138
139
|
}
|
|
139
|
-
interface ParseResult {
|
|
140
|
+
export interface ParseResult {
|
|
140
141
|
/**
|
|
141
142
|
* Number of rows parsed from the uploaded import file.
|
|
142
143
|
* @readonly
|
|
@@ -149,7 +150,7 @@ interface ParseResult {
|
|
|
149
150
|
*/
|
|
150
151
|
parseErrorReason?: string | null;
|
|
151
152
|
}
|
|
152
|
-
interface ImportResult {
|
|
153
|
+
export interface ImportResult {
|
|
153
154
|
/** Whether an error file detailing import failures is available for download. The file includes row-by-row import status, error reasons, and original data. */
|
|
154
155
|
errorFileExists?: boolean;
|
|
155
156
|
/**
|
|
@@ -163,7 +164,7 @@ interface ImportResult {
|
|
|
163
164
|
*/
|
|
164
165
|
failureCount?: number | null;
|
|
165
166
|
}
|
|
166
|
-
interface CreateLoyaltyImportRequest {
|
|
167
|
+
export interface CreateLoyaltyImportRequest {
|
|
167
168
|
/** URL of the file to import. */
|
|
168
169
|
fileUrl: string | null;
|
|
169
170
|
/** Name of the file to import. */
|
|
@@ -171,45 +172,45 @@ interface CreateLoyaltyImportRequest {
|
|
|
171
172
|
/** Size of the file to import, in bytes. */
|
|
172
173
|
fileSize?: number | null;
|
|
173
174
|
}
|
|
174
|
-
interface CreateLoyaltyImportResponse {
|
|
175
|
+
export interface CreateLoyaltyImportResponse {
|
|
175
176
|
/** Created loyalty import. */
|
|
176
177
|
loyaltyImport?: LoyaltyImport;
|
|
177
178
|
}
|
|
178
|
-
interface GetLoyaltyImportRequest {
|
|
179
|
+
export interface GetLoyaltyImportRequest {
|
|
179
180
|
/** Loyalty import ID. */
|
|
180
181
|
loyaltyImportId: string;
|
|
181
182
|
}
|
|
182
|
-
interface GetLoyaltyImportResponse {
|
|
183
|
+
export interface GetLoyaltyImportResponse {
|
|
183
184
|
/** Retrieved loyalty import. */
|
|
184
185
|
loyaltyImport?: LoyaltyImport;
|
|
185
186
|
}
|
|
186
|
-
interface GetErrorFileDownloadUrlRequest {
|
|
187
|
+
export interface GetErrorFileDownloadUrlRequest {
|
|
187
188
|
/** Loyalty import ID. */
|
|
188
189
|
loyaltyImportId: string;
|
|
189
190
|
}
|
|
190
|
-
interface GetErrorFileDownloadUrlResponse {
|
|
191
|
+
export interface GetErrorFileDownloadUrlResponse {
|
|
191
192
|
/** URL for downloading the error file. */
|
|
192
193
|
url?: string | null;
|
|
193
194
|
}
|
|
194
|
-
interface ExecuteLoyaltyImportRequest {
|
|
195
|
+
export interface ExecuteLoyaltyImportRequest {
|
|
195
196
|
/** Loyalty import ID. */
|
|
196
197
|
loyaltyImportId: string;
|
|
197
198
|
/** Header mapping information for the import file. */
|
|
198
199
|
headerMappingInfo?: HeaderMappingInfo;
|
|
199
200
|
}
|
|
200
|
-
interface ExecuteLoyaltyImportResponse {
|
|
201
|
+
export interface ExecuteLoyaltyImportResponse {
|
|
201
202
|
/** Executed loyalty import. */
|
|
202
203
|
loyaltyImport?: LoyaltyImport;
|
|
203
204
|
}
|
|
204
|
-
interface CreateLoyaltyImportFileUrlRequest {
|
|
205
|
+
export interface CreateLoyaltyImportFileUrlRequest {
|
|
205
206
|
}
|
|
206
|
-
interface CreateLoyaltyImportFileUrlResponse {
|
|
207
|
+
export interface CreateLoyaltyImportFileUrlResponse {
|
|
207
208
|
/** Path where the file will be stored. */
|
|
208
209
|
filePath?: string | null;
|
|
209
210
|
/** URL for uploading the loyalty import file. */
|
|
210
211
|
uploadUrl?: string | null;
|
|
211
212
|
}
|
|
212
|
-
interface QueryLoyaltyImportsRequest {
|
|
213
|
+
export interface QueryLoyaltyImportsRequest {
|
|
213
214
|
/**
|
|
214
215
|
* Filter object.
|
|
215
216
|
* See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
@@ -220,7 +221,7 @@ interface QueryLoyaltyImportsRequest {
|
|
|
220
221
|
*/
|
|
221
222
|
query: CursorQuery;
|
|
222
223
|
}
|
|
223
|
-
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
224
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
224
225
|
/**
|
|
225
226
|
* Cursor paging options.
|
|
226
227
|
*
|
|
@@ -242,7 +243,7 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
242
243
|
sort?: Sorting[];
|
|
243
244
|
}
|
|
244
245
|
/** @oneof */
|
|
245
|
-
interface CursorQueryPagingMethodOneOf {
|
|
246
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
246
247
|
/**
|
|
247
248
|
* Cursor paging options.
|
|
248
249
|
*
|
|
@@ -250,7 +251,7 @@ interface CursorQueryPagingMethodOneOf {
|
|
|
250
251
|
*/
|
|
251
252
|
cursorPaging?: CursorPaging;
|
|
252
253
|
}
|
|
253
|
-
interface Sorting {
|
|
254
|
+
export interface Sorting {
|
|
254
255
|
/**
|
|
255
256
|
* Name of the field to sort by.
|
|
256
257
|
* @maxLength 512
|
|
@@ -259,11 +260,11 @@ interface Sorting {
|
|
|
259
260
|
/** Sort order. */
|
|
260
261
|
order?: SortOrder;
|
|
261
262
|
}
|
|
262
|
-
declare enum SortOrder {
|
|
263
|
+
export declare enum SortOrder {
|
|
263
264
|
ASC = "ASC",
|
|
264
265
|
DESC = "DESC"
|
|
265
266
|
}
|
|
266
|
-
interface CursorPaging {
|
|
267
|
+
export interface CursorPaging {
|
|
267
268
|
/**
|
|
268
269
|
* Maximum number of items to return in the results.
|
|
269
270
|
* @max 100
|
|
@@ -278,13 +279,13 @@ interface CursorPaging {
|
|
|
278
279
|
*/
|
|
279
280
|
cursor?: string | null;
|
|
280
281
|
}
|
|
281
|
-
interface QueryLoyaltyImportsResponse {
|
|
282
|
+
export interface QueryLoyaltyImportsResponse {
|
|
282
283
|
/** List of loyalty imports matching the query. */
|
|
283
284
|
loyaltyImports?: LoyaltyImport[];
|
|
284
285
|
/** Paging metadata. */
|
|
285
286
|
pagingMetadata?: CursorPagingMetadata;
|
|
286
287
|
}
|
|
287
|
-
interface CursorPagingMetadata {
|
|
288
|
+
export interface CursorPagingMetadata {
|
|
288
289
|
/** Number of items returned in current page. */
|
|
289
290
|
count?: number | null;
|
|
290
291
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -297,7 +298,7 @@ interface CursorPagingMetadata {
|
|
|
297
298
|
*/
|
|
298
299
|
hasNext?: boolean | null;
|
|
299
300
|
}
|
|
300
|
-
interface Cursors {
|
|
301
|
+
export interface Cursors {
|
|
301
302
|
/**
|
|
302
303
|
* Cursor string pointing to the next page in the list of results.
|
|
303
304
|
* @maxLength 16000
|
|
@@ -309,7 +310,7 @@ interface Cursors {
|
|
|
309
310
|
*/
|
|
310
311
|
prev?: string | null;
|
|
311
312
|
}
|
|
312
|
-
interface DeleteLoyaltyImportRequest {
|
|
313
|
+
export interface DeleteLoyaltyImportRequest {
|
|
313
314
|
/**
|
|
314
315
|
* Loyalty import ID.
|
|
315
316
|
* @format GUID
|
|
@@ -321,9 +322,9 @@ interface DeleteLoyaltyImportRequest {
|
|
|
321
322
|
*/
|
|
322
323
|
revision?: string;
|
|
323
324
|
}
|
|
324
|
-
interface DeleteLoyaltyImportResponse {
|
|
325
|
+
export interface DeleteLoyaltyImportResponse {
|
|
325
326
|
}
|
|
326
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
327
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
327
328
|
createdEvent?: EntityCreatedEvent;
|
|
328
329
|
updatedEvent?: EntityUpdatedEvent;
|
|
329
330
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -366,19 +367,19 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
366
367
|
entityEventSequence?: string | null;
|
|
367
368
|
}
|
|
368
369
|
/** @oneof */
|
|
369
|
-
interface DomainEventBodyOneOf {
|
|
370
|
+
export interface DomainEventBodyOneOf {
|
|
370
371
|
createdEvent?: EntityCreatedEvent;
|
|
371
372
|
updatedEvent?: EntityUpdatedEvent;
|
|
372
373
|
deletedEvent?: EntityDeletedEvent;
|
|
373
374
|
actionEvent?: ActionEvent;
|
|
374
375
|
}
|
|
375
|
-
interface EntityCreatedEvent {
|
|
376
|
+
export interface EntityCreatedEvent {
|
|
376
377
|
entity?: string;
|
|
377
378
|
}
|
|
378
|
-
interface RestoreInfo {
|
|
379
|
+
export interface RestoreInfo {
|
|
379
380
|
deletedDate?: Date | null;
|
|
380
381
|
}
|
|
381
|
-
interface EntityUpdatedEvent {
|
|
382
|
+
export interface EntityUpdatedEvent {
|
|
382
383
|
/**
|
|
383
384
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
384
385
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -386,20 +387,20 @@ interface EntityUpdatedEvent {
|
|
|
386
387
|
*/
|
|
387
388
|
currentEntity?: string;
|
|
388
389
|
}
|
|
389
|
-
interface EntityDeletedEvent {
|
|
390
|
+
export interface EntityDeletedEvent {
|
|
390
391
|
/** Entity that was deleted */
|
|
391
392
|
deletedEntity?: string | null;
|
|
392
393
|
}
|
|
393
|
-
interface ActionEvent {
|
|
394
|
+
export interface ActionEvent {
|
|
394
395
|
body?: string;
|
|
395
396
|
}
|
|
396
|
-
interface Empty {
|
|
397
|
+
export interface Empty {
|
|
397
398
|
}
|
|
398
|
-
interface ImportFinished {
|
|
399
|
+
export interface ImportFinished {
|
|
399
400
|
/** Completed loyalty import. */
|
|
400
401
|
loyaltyImport?: LoyaltyImport;
|
|
401
402
|
}
|
|
402
|
-
interface MessageEnvelope {
|
|
403
|
+
export interface MessageEnvelope {
|
|
403
404
|
/**
|
|
404
405
|
* App instance ID.
|
|
405
406
|
* @format GUID
|
|
@@ -415,7 +416,7 @@ interface MessageEnvelope {
|
|
|
415
416
|
/** Stringify payload. */
|
|
416
417
|
data?: string;
|
|
417
418
|
}
|
|
418
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
419
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
419
420
|
/**
|
|
420
421
|
* ID of a site visitor that has not logged in to the site.
|
|
421
422
|
* @format GUID
|
|
@@ -440,7 +441,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
440
441
|
identityType?: WebhookIdentityType;
|
|
441
442
|
}
|
|
442
443
|
/** @oneof */
|
|
443
|
-
interface IdentificationDataIdOneOf {
|
|
444
|
+
export interface IdentificationDataIdOneOf {
|
|
444
445
|
/**
|
|
445
446
|
* ID of a site visitor that has not logged in to the site.
|
|
446
447
|
* @format GUID
|
|
@@ -462,14 +463,14 @@ interface IdentificationDataIdOneOf {
|
|
|
462
463
|
*/
|
|
463
464
|
appId?: string;
|
|
464
465
|
}
|
|
465
|
-
declare enum WebhookIdentityType {
|
|
466
|
+
export declare enum WebhookIdentityType {
|
|
466
467
|
UNKNOWN = "UNKNOWN",
|
|
467
468
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
468
469
|
MEMBER = "MEMBER",
|
|
469
470
|
WIX_USER = "WIX_USER",
|
|
470
471
|
APP = "APP"
|
|
471
472
|
}
|
|
472
|
-
interface BaseEventMetadata {
|
|
473
|
+
export interface BaseEventMetadata {
|
|
473
474
|
/**
|
|
474
475
|
* App instance ID.
|
|
475
476
|
* @format GUID
|
|
@@ -483,7 +484,7 @@ interface BaseEventMetadata {
|
|
|
483
484
|
/** The identification type and identity data. */
|
|
484
485
|
identity?: IdentificationData;
|
|
485
486
|
}
|
|
486
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
487
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
487
488
|
/**
|
|
488
489
|
* Unique event ID.
|
|
489
490
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -521,20 +522,137 @@ interface EventMetadata extends BaseEventMetadata {
|
|
|
521
522
|
*/
|
|
522
523
|
entityEventSequence?: string | null;
|
|
523
524
|
}
|
|
524
|
-
interface LoyaltyImportCreatedEnvelope {
|
|
525
|
+
export interface LoyaltyImportCreatedEnvelope {
|
|
525
526
|
entity: LoyaltyImport;
|
|
526
527
|
metadata: EventMetadata;
|
|
527
528
|
}
|
|
528
|
-
|
|
529
|
+
/**
|
|
530
|
+
* Triggered when a loyalty import is created.
|
|
531
|
+
* @webhook
|
|
532
|
+
* @eventType wix.loyalty.imports.v1.loyalty_import_created
|
|
533
|
+
* @serviceIdentifier wix.loyalty.imports.v1.LoyaltyImports
|
|
534
|
+
* @slug created
|
|
535
|
+
*/
|
|
536
|
+
export declare function onLoyaltyImportCreated(handler: (event: LoyaltyImportCreatedEnvelope) => void | Promise<void>): void;
|
|
537
|
+
type LoyaltyImportNonNullablePaths = `status` | `fileMetadata.url` | `fileMetadata.header.values` | `fileMetadata.headerMappingInfo.headerMappings` | `fileMetadata.headerMappingInfo.headerMappings.${number}.columnName` | `fileMetadata.headerMappingInfo.headerMappings.${number}.columnIndex` | `fileMetadata.sampleDataRows` | `fileMetadata.sampleDataRows.${number}.values` | `importResult.errorFileExists`;
|
|
538
|
+
/**
|
|
539
|
+
* Creates an import object based on an uploaded file.
|
|
540
|
+
*
|
|
541
|
+
* Call this method after uploading your file to the URL obtained from `createLoyaltyImportFileUrl()`.
|
|
542
|
+
* @param fileUrl - URL of the file to import.
|
|
543
|
+
* @public
|
|
544
|
+
* @requiredField fileUrl
|
|
545
|
+
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
546
|
+
* @permissionScope Manage Loyalty
|
|
547
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
548
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
549
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
550
|
+
* @applicableIdentity APP
|
|
551
|
+
* @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImport
|
|
552
|
+
*/
|
|
553
|
+
export declare function createLoyaltyImport(fileUrl: string, options?: CreateLoyaltyImportOptions): Promise<NonNullablePaths<CreateLoyaltyImportResponse, {
|
|
554
|
+
[P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;
|
|
555
|
+
}[LoyaltyImportNonNullablePaths]>>;
|
|
556
|
+
export interface CreateLoyaltyImportOptions {
|
|
529
557
|
/** Name of the file to import. */
|
|
530
558
|
fileName?: string | null;
|
|
531
559
|
/** Size of the file to import, in bytes. */
|
|
532
560
|
fileSize?: number | null;
|
|
533
561
|
}
|
|
534
|
-
|
|
562
|
+
/**
|
|
563
|
+
* Retrieves a loyalty import.
|
|
564
|
+
* @param loyaltyImportId - Loyalty import ID.
|
|
565
|
+
* @public
|
|
566
|
+
* @requiredField loyaltyImportId
|
|
567
|
+
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
568
|
+
* @permissionScope Manage Loyalty
|
|
569
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
570
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
571
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
572
|
+
* @applicableIdentity APP
|
|
573
|
+
* @returns Retrieved loyalty import.
|
|
574
|
+
* @fqn wix.loyalty.imports.v1.LoyaltyImports.GetLoyaltyImport
|
|
575
|
+
*/
|
|
576
|
+
export declare function getLoyaltyImport(loyaltyImportId: string): Promise<NonNullablePaths<LoyaltyImport, LoyaltyImportNonNullablePaths>>;
|
|
577
|
+
/**
|
|
578
|
+
* Retrieves the download URL for the error file of a failed loyalty import.
|
|
579
|
+
*
|
|
580
|
+
* If an import fails, the `importResult.errorFileExists` field in the `LoyaltyImport` object is set to `true`.
|
|
581
|
+
*
|
|
582
|
+
* Use this method to get the URL of the error file, which contains details about which items couldn't be imported and why.
|
|
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.GetErrorFileDownloadUrl
|
|
593
|
+
*/
|
|
594
|
+
export declare function getErrorFileDownloadUrl(loyaltyImportId: string): Promise<GetErrorFileDownloadUrlResponse>;
|
|
595
|
+
/**
|
|
596
|
+
* Starts the actual import process for a loyalty import.
|
|
597
|
+
*
|
|
598
|
+
* Call this method after the loyalty import object reaches the `PARSED` status.
|
|
599
|
+
* @param loyaltyImportId - Loyalty import ID.
|
|
600
|
+
* @public
|
|
601
|
+
* @requiredField loyaltyImportId
|
|
602
|
+
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
603
|
+
* @permissionScope Manage Loyalty
|
|
604
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
605
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
606
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
607
|
+
* @applicableIdentity APP
|
|
608
|
+
* @fqn wix.loyalty.imports.v1.LoyaltyImports.ExecuteLoyaltyImport
|
|
609
|
+
*/
|
|
610
|
+
export declare function executeLoyaltyImport(loyaltyImportId: string, options?: ExecuteLoyaltyImportOptions): Promise<NonNullablePaths<ExecuteLoyaltyImportResponse, {
|
|
611
|
+
[P in LoyaltyImportNonNullablePaths]: `loyaltyImport.${P}`;
|
|
612
|
+
}[LoyaltyImportNonNullablePaths]>>;
|
|
613
|
+
export interface ExecuteLoyaltyImportOptions {
|
|
535
614
|
/** Header mapping information for the import file. */
|
|
536
615
|
headerMappingInfo?: HeaderMappingInfo;
|
|
537
616
|
}
|
|
617
|
+
/**
|
|
618
|
+
* Creates a URL for uploading a loyalty import file.
|
|
619
|
+
*
|
|
620
|
+
* 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.
|
|
621
|
+
* @public
|
|
622
|
+
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
623
|
+
* @permissionScope Manage Loyalty
|
|
624
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
625
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
626
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
627
|
+
* @applicableIdentity APP
|
|
628
|
+
* @fqn wix.loyalty.imports.v1.LoyaltyImports.CreateLoyaltyImportFileUrl
|
|
629
|
+
*/
|
|
630
|
+
export declare function createLoyaltyImportFileUrl(): Promise<CreateLoyaltyImportFileUrlResponse>;
|
|
631
|
+
/**
|
|
632
|
+
* Creates a query to retrieve a list of loyalty imports.
|
|
633
|
+
*
|
|
634
|
+
* The `queryLoyaltyImports()` function builds a query to retrieve a list of imports and returns a `LoyaltyImportsQueryBuilder` object.
|
|
635
|
+
*
|
|
636
|
+
* The returned object contains the query definition, which is typically used to run the query using the `find()` function.
|
|
637
|
+
*
|
|
638
|
+
* 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.
|
|
639
|
+
*
|
|
640
|
+
* `queryLoyaltyImports()` runs with these `LoyaltyImportsQueryBuilder` defaults, which you can override:
|
|
641
|
+
*
|
|
642
|
+
* - `limit(50)`
|
|
643
|
+
* - `descending("_createdDate")`
|
|
644
|
+
*
|
|
645
|
+
* 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.
|
|
646
|
+
* @public
|
|
647
|
+
* @permissionScope Manage Loyalty
|
|
648
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
649
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
650
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
651
|
+
* @permissionId LOYALTY.MANAGE_IMPORTS
|
|
652
|
+
* @applicableIdentity APP
|
|
653
|
+
* @fqn wix.loyalty.imports.v1.LoyaltyImports.QueryLoyaltyImports
|
|
654
|
+
*/
|
|
655
|
+
export declare function queryLoyaltyImports(): LoyaltyImportsQueryBuilder;
|
|
538
656
|
interface QueryCursorResult {
|
|
539
657
|
cursors: Cursors;
|
|
540
658
|
hasNext: () => boolean;
|
|
@@ -542,13 +660,13 @@ interface QueryCursorResult {
|
|
|
542
660
|
length: number;
|
|
543
661
|
pageSize: number;
|
|
544
662
|
}
|
|
545
|
-
interface LoyaltyImportsQueryResult extends QueryCursorResult {
|
|
663
|
+
export interface LoyaltyImportsQueryResult extends QueryCursorResult {
|
|
546
664
|
items: LoyaltyImport[];
|
|
547
665
|
query: LoyaltyImportsQueryBuilder;
|
|
548
666
|
next: () => Promise<LoyaltyImportsQueryResult>;
|
|
549
667
|
prev: () => Promise<LoyaltyImportsQueryResult>;
|
|
550
668
|
}
|
|
551
|
-
interface LoyaltyImportsQueryBuilder {
|
|
669
|
+
export interface LoyaltyImportsQueryBuilder {
|
|
552
670
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
553
671
|
* @param value - Value to compare against.
|
|
554
672
|
*/
|
|
@@ -589,5 +707,4 @@ interface LoyaltyImportsQueryBuilder {
|
|
|
589
707
|
skipTo: (cursor: string) => LoyaltyImportsQueryBuilder;
|
|
590
708
|
find: () => Promise<LoyaltyImportsQueryResult>;
|
|
591
709
|
}
|
|
592
|
-
|
|
593
|
-
export { type EntityUpdatedEvent as A, type EntityDeletedEvent 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 ActionEvent as J, type Empty as K, type LoyaltyImport as L, type ImportFinished as M, type MessageEnvelope as N, type IdentificationData as O, type ParseResult as P, type QueryLoyaltyImportsRequest as Q, type RestoreInfo as R, SortOrder as S, type IdentificationDataIdOneOf as T, type BaseEventMetadata as U, type EventMetadata as V, WebhookIdentityType as W, type LoyaltyImportCreatedEnvelope as X, type LoyaltyImportsQueryResult as Y, type CreateLoyaltyImportResponse as a, type ExecuteLoyaltyImportResponse as b, type CreateLoyaltyImportFileUrlResponse as c, type LoyaltyImportsQueryBuilder as d, ColumnName as e, type FileHeader as f, type HeaderMapping as g, type SampleDataRow as h, type ImportResult as i, type CreateLoyaltyImportRequest as j, type GetLoyaltyImportRequest as k, type GetLoyaltyImportResponse as l, type GetErrorFileDownloadUrlRequest as m, type ExecuteLoyaltyImportRequest as n, type CreateLoyaltyImportFileUrlRequest as o, type CursorQuery as p, type CursorQueryPagingMethodOneOf as q, type Sorting as r, type CursorPaging as s, type QueryLoyaltyImportsResponse as t, type CursorPagingMetadata as u, type Cursors as v, type DeleteLoyaltyImportResponse as w, type DomainEvent as x, type DomainEventBodyOneOf as y, type EntityCreatedEvent as z };
|
|
710
|
+
export {};
|