@teemill/platform 0.28.0 → 0.29.2
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/README.md +2 -2
- package/api.ts +230 -64
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +148 -42
- package/dist/api.js +113 -49
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +148 -42
- package/dist/esm/api.js +112 -48
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/CustomersApi.md +59 -23
- package/docs/Statistics.md +2 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Platform API
|
|
5
5
|
* Manage Your podOS platform
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
7
|
+
* The version of the OpenAPI document: 0.29.2
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -71,18 +71,24 @@ export const CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
71
71
|
* @summary Export customers
|
|
72
72
|
* @param {string} project Project unique identifier
|
|
73
73
|
* @param {string} platformId The platform identifier
|
|
74
|
+
* @param {Array<ExportCustomersSortByEnum>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
74
75
|
* @param {Array<string>} [countries] Filter customers by country code
|
|
76
|
+
* @param {Array<string>} [projects] Filter customers by project. In the absence of this field, all projects will be included in the export.
|
|
75
77
|
* @param {ExportCustomersGenderEnum} [gender] Filter customers by gender equal to the value provided
|
|
76
|
-
* @param {number} [
|
|
77
|
-
* @param {
|
|
78
|
-
* @param {number} [
|
|
79
|
-
* @param {
|
|
78
|
+
* @param {Array<number>} [productTypes] Filter customers by purchased product types. In the absence of this field, all customers will be included in the export.
|
|
79
|
+
* @param {boolean} [usedDiscount] Filter customers by whether they have used a discount
|
|
80
|
+
* @param {number} [minimumTotalOrderCount] Filter customers by total order count greater than or equal to the value provided
|
|
81
|
+
* @param {number} [maximumTotalOrderCount] Filter customers by total order count less than or equal to the value provided
|
|
82
|
+
* @param {number} [minimumRefundedOrderCount] Filter customers by refunded order count greater than or equal to the value provided
|
|
83
|
+
* @param {number} [maximumRefundedOrderCount] Filter customers by refunded order count less than or equal to the value provided
|
|
84
|
+
* @param {number} [minimumLifetimeValue] Filter customers by lifetime value greater than or equal to the value provided
|
|
85
|
+
* @param {number} [maximumLifetimeValue] Filter customers by lifetime value less than or equal to the value provided
|
|
80
86
|
* @param {string} [lastPurchasedStart] Start of date range to filter customers by last purchase date
|
|
81
87
|
* @param {string} [lastPurchasedEnd] End of date range to filter customers by last purchase date
|
|
82
88
|
* @param {*} [options] Override http request option.
|
|
83
89
|
* @throws {RequiredError}
|
|
84
90
|
*/
|
|
85
|
-
exportCustomers: (project_1, platformId_1, countries_1, gender_1,
|
|
91
|
+
exportCustomers: (project_1, platformId_1, sortBy_1, countries_1, projects_1, gender_1, productTypes_1, usedDiscount_1, minimumTotalOrderCount_1, maximumTotalOrderCount_1, minimumRefundedOrderCount_1, maximumRefundedOrderCount_1, minimumLifetimeValue_1, maximumLifetimeValue_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1) => __awaiter(this, [project_1, platformId_1, sortBy_1, countries_1, projects_1, gender_1, productTypes_1, usedDiscount_1, minimumTotalOrderCount_1, maximumTotalOrderCount_1, minimumRefundedOrderCount_1, maximumRefundedOrderCount_1, minimumLifetimeValue_1, maximumLifetimeValue_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1], void 0, function* (project, platformId, sortBy, countries, projects, gender, productTypes, usedDiscount, minimumTotalOrderCount, maximumTotalOrderCount, minimumRefundedOrderCount, maximumRefundedOrderCount, minimumLifetimeValue, maximumLifetimeValue, lastPurchasedStart, lastPurchasedEnd, options = {}) {
|
|
86
92
|
// verify required parameter 'project' is not null or undefined
|
|
87
93
|
assertParamExists('exportCustomers', 'project', project);
|
|
88
94
|
// verify required parameter 'platformId' is not null or undefined
|
|
@@ -106,23 +112,41 @@ export const CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
106
112
|
if (project !== undefined) {
|
|
107
113
|
localVarQueryParameter['project'] = project;
|
|
108
114
|
}
|
|
115
|
+
if (sortBy) {
|
|
116
|
+
localVarQueryParameter['sortBy'] = sortBy;
|
|
117
|
+
}
|
|
109
118
|
if (countries) {
|
|
110
119
|
localVarQueryParameter['countries'] = countries;
|
|
111
120
|
}
|
|
121
|
+
if (projects) {
|
|
122
|
+
localVarQueryParameter['projects'] = projects;
|
|
123
|
+
}
|
|
112
124
|
if (gender !== undefined) {
|
|
113
125
|
localVarQueryParameter['gender'] = gender;
|
|
114
126
|
}
|
|
115
|
-
if (
|
|
116
|
-
localVarQueryParameter['
|
|
127
|
+
if (productTypes) {
|
|
128
|
+
localVarQueryParameter['productTypes'] = productTypes;
|
|
117
129
|
}
|
|
118
|
-
if (
|
|
119
|
-
localVarQueryParameter['
|
|
130
|
+
if (usedDiscount !== undefined) {
|
|
131
|
+
localVarQueryParameter['usedDiscount'] = usedDiscount;
|
|
120
132
|
}
|
|
121
|
-
if (
|
|
122
|
-
localVarQueryParameter['
|
|
133
|
+
if (minimumTotalOrderCount !== undefined) {
|
|
134
|
+
localVarQueryParameter['minimumTotalOrderCount'] = minimumTotalOrderCount;
|
|
123
135
|
}
|
|
124
|
-
if (
|
|
125
|
-
localVarQueryParameter['
|
|
136
|
+
if (maximumTotalOrderCount !== undefined) {
|
|
137
|
+
localVarQueryParameter['maximumTotalOrderCount'] = maximumTotalOrderCount;
|
|
138
|
+
}
|
|
139
|
+
if (minimumRefundedOrderCount !== undefined) {
|
|
140
|
+
localVarQueryParameter['minimumRefundedOrderCount'] = minimumRefundedOrderCount;
|
|
141
|
+
}
|
|
142
|
+
if (maximumRefundedOrderCount !== undefined) {
|
|
143
|
+
localVarQueryParameter['maximumRefundedOrderCount'] = maximumRefundedOrderCount;
|
|
144
|
+
}
|
|
145
|
+
if (minimumLifetimeValue !== undefined) {
|
|
146
|
+
localVarQueryParameter['minimumLifetimeValue'] = minimumLifetimeValue;
|
|
147
|
+
}
|
|
148
|
+
if (maximumLifetimeValue !== undefined) {
|
|
149
|
+
localVarQueryParameter['maximumLifetimeValue'] = maximumLifetimeValue;
|
|
126
150
|
}
|
|
127
151
|
if (lastPurchasedStart !== undefined) {
|
|
128
152
|
localVarQueryParameter['lastPurchasedStart'] = (lastPurchasedStart instanceof Date) ?
|
|
@@ -194,16 +218,22 @@ export const CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
194
218
|
* @param {string} [search] Search term to filter results
|
|
195
219
|
* @param {Array<ListCustomersSortByEnum>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
196
220
|
* @param {Array<string>} [countries] Filter customers by country code
|
|
221
|
+
* @param {Array<string>} [projects] Filter customers by project. In the absence of this field, all projects will be included in the export.
|
|
197
222
|
* @param {ListCustomersGenderEnum} [gender] Filter customers by gender equal to the value provided
|
|
198
|
-
* @param {number} [
|
|
199
|
-
* @param {
|
|
200
|
-
* @param {number} [
|
|
223
|
+
* @param {Array<number>} [productTypes] Filter customers by purchased product types. In the absence of this field, all customers will be included in the export.
|
|
224
|
+
* @param {boolean} [usedDiscount] Filter customers by whether they have used a discount
|
|
225
|
+
* @param {number} [minimumTotalOrderCount] Filter customers by total order count greater than or equal to the value provided
|
|
226
|
+
* @param {number} [maximumTotalOrderCount] Filter customers by total order count less than or equal to the value provided
|
|
227
|
+
* @param {number} [minimumRefundedOrderCount] Filter customers by refunded order count greater than or equal to the value provided
|
|
228
|
+
* @param {number} [maximumRefundedOrderCount] Filter customers by refunded order count less than or equal to the value provided
|
|
229
|
+
* @param {number} [minimumLifetimeValue] Filter customers by lifetime value greater than or equal to the value provided
|
|
230
|
+
* @param {number} [maximumLifetimeValue] Filter customers by lifetime value less than or equal to the value provided
|
|
201
231
|
* @param {string} [lastPurchasedStart] Start of date range to filter customers by last purchase date
|
|
202
232
|
* @param {string} [lastPurchasedEnd] End of date range to filter customers by last purchase date
|
|
203
233
|
* @param {*} [options] Override http request option.
|
|
204
234
|
* @throws {RequiredError}
|
|
205
235
|
*/
|
|
206
|
-
listCustomers: (project_1, platformId_1, pageToken_1, pageSize_1, search_1, sortBy_1, countries_1, gender_1,
|
|
236
|
+
listCustomers: (project_1, platformId_1, pageToken_1, pageSize_1, search_1, sortBy_1, countries_1, projects_1, gender_1, productTypes_1, usedDiscount_1, minimumTotalOrderCount_1, maximumTotalOrderCount_1, minimumRefundedOrderCount_1, maximumRefundedOrderCount_1, minimumLifetimeValue_1, maximumLifetimeValue_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1) => __awaiter(this, [project_1, platformId_1, pageToken_1, pageSize_1, search_1, sortBy_1, countries_1, projects_1, gender_1, productTypes_1, usedDiscount_1, minimumTotalOrderCount_1, maximumTotalOrderCount_1, minimumRefundedOrderCount_1, maximumRefundedOrderCount_1, minimumLifetimeValue_1, maximumLifetimeValue_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1], void 0, function* (project, platformId, pageToken, pageSize, search, sortBy, countries, projects, gender, productTypes, usedDiscount, minimumTotalOrderCount, maximumTotalOrderCount, minimumRefundedOrderCount, maximumRefundedOrderCount, minimumLifetimeValue, maximumLifetimeValue, lastPurchasedStart, lastPurchasedEnd, options = {}) {
|
|
207
237
|
// verify required parameter 'project' is not null or undefined
|
|
208
238
|
assertParamExists('listCustomers', 'project', project);
|
|
209
239
|
// verify required parameter 'platformId' is not null or undefined
|
|
@@ -242,17 +272,35 @@ export const CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
242
272
|
if (countries) {
|
|
243
273
|
localVarQueryParameter['countries'] = countries;
|
|
244
274
|
}
|
|
275
|
+
if (projects) {
|
|
276
|
+
localVarQueryParameter['projects'] = projects;
|
|
277
|
+
}
|
|
245
278
|
if (gender !== undefined) {
|
|
246
279
|
localVarQueryParameter['gender'] = gender;
|
|
247
280
|
}
|
|
248
|
-
if (
|
|
249
|
-
localVarQueryParameter['
|
|
281
|
+
if (productTypes) {
|
|
282
|
+
localVarQueryParameter['productTypes'] = productTypes;
|
|
283
|
+
}
|
|
284
|
+
if (usedDiscount !== undefined) {
|
|
285
|
+
localVarQueryParameter['usedDiscount'] = usedDiscount;
|
|
286
|
+
}
|
|
287
|
+
if (minimumTotalOrderCount !== undefined) {
|
|
288
|
+
localVarQueryParameter['minimumTotalOrderCount'] = minimumTotalOrderCount;
|
|
289
|
+
}
|
|
290
|
+
if (maximumTotalOrderCount !== undefined) {
|
|
291
|
+
localVarQueryParameter['maximumTotalOrderCount'] = maximumTotalOrderCount;
|
|
292
|
+
}
|
|
293
|
+
if (minimumRefundedOrderCount !== undefined) {
|
|
294
|
+
localVarQueryParameter['minimumRefundedOrderCount'] = minimumRefundedOrderCount;
|
|
250
295
|
}
|
|
251
|
-
if (
|
|
252
|
-
localVarQueryParameter['
|
|
296
|
+
if (maximumRefundedOrderCount !== undefined) {
|
|
297
|
+
localVarQueryParameter['maximumRefundedOrderCount'] = maximumRefundedOrderCount;
|
|
253
298
|
}
|
|
254
|
-
if (
|
|
255
|
-
localVarQueryParameter['
|
|
299
|
+
if (minimumLifetimeValue !== undefined) {
|
|
300
|
+
localVarQueryParameter['minimumLifetimeValue'] = minimumLifetimeValue;
|
|
301
|
+
}
|
|
302
|
+
if (maximumLifetimeValue !== undefined) {
|
|
303
|
+
localVarQueryParameter['maximumLifetimeValue'] = maximumLifetimeValue;
|
|
256
304
|
}
|
|
257
305
|
if (lastPurchasedStart !== undefined) {
|
|
258
306
|
localVarQueryParameter['lastPurchasedStart'] = (lastPurchasedStart instanceof Date) ?
|
|
@@ -284,21 +332,27 @@ export const CustomersApiFp = function (configuration) {
|
|
|
284
332
|
* @summary Export customers
|
|
285
333
|
* @param {string} project Project unique identifier
|
|
286
334
|
* @param {string} platformId The platform identifier
|
|
335
|
+
* @param {Array<ExportCustomersSortByEnum>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
287
336
|
* @param {Array<string>} [countries] Filter customers by country code
|
|
337
|
+
* @param {Array<string>} [projects] Filter customers by project. In the absence of this field, all projects will be included in the export.
|
|
288
338
|
* @param {ExportCustomersGenderEnum} [gender] Filter customers by gender equal to the value provided
|
|
289
|
-
* @param {number} [
|
|
290
|
-
* @param {
|
|
291
|
-
* @param {number} [
|
|
292
|
-
* @param {
|
|
339
|
+
* @param {Array<number>} [productTypes] Filter customers by purchased product types. In the absence of this field, all customers will be included in the export.
|
|
340
|
+
* @param {boolean} [usedDiscount] Filter customers by whether they have used a discount
|
|
341
|
+
* @param {number} [minimumTotalOrderCount] Filter customers by total order count greater than or equal to the value provided
|
|
342
|
+
* @param {number} [maximumTotalOrderCount] Filter customers by total order count less than or equal to the value provided
|
|
343
|
+
* @param {number} [minimumRefundedOrderCount] Filter customers by refunded order count greater than or equal to the value provided
|
|
344
|
+
* @param {number} [maximumRefundedOrderCount] Filter customers by refunded order count less than or equal to the value provided
|
|
345
|
+
* @param {number} [minimumLifetimeValue] Filter customers by lifetime value greater than or equal to the value provided
|
|
346
|
+
* @param {number} [maximumLifetimeValue] Filter customers by lifetime value less than or equal to the value provided
|
|
293
347
|
* @param {string} [lastPurchasedStart] Start of date range to filter customers by last purchase date
|
|
294
348
|
* @param {string} [lastPurchasedEnd] End of date range to filter customers by last purchase date
|
|
295
349
|
* @param {*} [options] Override http request option.
|
|
296
350
|
* @throws {RequiredError}
|
|
297
351
|
*/
|
|
298
|
-
exportCustomers(project, platformId, countries, gender,
|
|
352
|
+
exportCustomers(project, platformId, sortBy, countries, projects, gender, productTypes, usedDiscount, minimumTotalOrderCount, maximumTotalOrderCount, minimumRefundedOrderCount, maximumRefundedOrderCount, minimumLifetimeValue, maximumLifetimeValue, lastPurchasedStart, lastPurchasedEnd, options) {
|
|
299
353
|
return __awaiter(this, void 0, void 0, function* () {
|
|
300
354
|
var _a, _b, _c;
|
|
301
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportCustomers(project, platformId, countries, gender,
|
|
355
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportCustomers(project, platformId, sortBy, countries, projects, gender, productTypes, usedDiscount, minimumTotalOrderCount, maximumTotalOrderCount, minimumRefundedOrderCount, maximumRefundedOrderCount, minimumLifetimeValue, maximumLifetimeValue, lastPurchasedStart, lastPurchasedEnd, options);
|
|
302
356
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
303
357
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CustomersApi.exportCustomers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
304
358
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -332,19 +386,25 @@ export const CustomersApiFp = function (configuration) {
|
|
|
332
386
|
* @param {string} [search] Search term to filter results
|
|
333
387
|
* @param {Array<ListCustomersSortByEnum>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
334
388
|
* @param {Array<string>} [countries] Filter customers by country code
|
|
389
|
+
* @param {Array<string>} [projects] Filter customers by project. In the absence of this field, all projects will be included in the export.
|
|
335
390
|
* @param {ListCustomersGenderEnum} [gender] Filter customers by gender equal to the value provided
|
|
336
|
-
* @param {number} [
|
|
337
|
-
* @param {
|
|
338
|
-
* @param {number} [
|
|
391
|
+
* @param {Array<number>} [productTypes] Filter customers by purchased product types. In the absence of this field, all customers will be included in the export.
|
|
392
|
+
* @param {boolean} [usedDiscount] Filter customers by whether they have used a discount
|
|
393
|
+
* @param {number} [minimumTotalOrderCount] Filter customers by total order count greater than or equal to the value provided
|
|
394
|
+
* @param {number} [maximumTotalOrderCount] Filter customers by total order count less than or equal to the value provided
|
|
395
|
+
* @param {number} [minimumRefundedOrderCount] Filter customers by refunded order count greater than or equal to the value provided
|
|
396
|
+
* @param {number} [maximumRefundedOrderCount] Filter customers by refunded order count less than or equal to the value provided
|
|
397
|
+
* @param {number} [minimumLifetimeValue] Filter customers by lifetime value greater than or equal to the value provided
|
|
398
|
+
* @param {number} [maximumLifetimeValue] Filter customers by lifetime value less than or equal to the value provided
|
|
339
399
|
* @param {string} [lastPurchasedStart] Start of date range to filter customers by last purchase date
|
|
340
400
|
* @param {string} [lastPurchasedEnd] End of date range to filter customers by last purchase date
|
|
341
401
|
* @param {*} [options] Override http request option.
|
|
342
402
|
* @throws {RequiredError}
|
|
343
403
|
*/
|
|
344
|
-
listCustomers(project, platformId, pageToken, pageSize, search, sortBy, countries, gender,
|
|
404
|
+
listCustomers(project, platformId, pageToken, pageSize, search, sortBy, countries, projects, gender, productTypes, usedDiscount, minimumTotalOrderCount, maximumTotalOrderCount, minimumRefundedOrderCount, maximumRefundedOrderCount, minimumLifetimeValue, maximumLifetimeValue, lastPurchasedStart, lastPurchasedEnd, options) {
|
|
345
405
|
return __awaiter(this, void 0, void 0, function* () {
|
|
346
406
|
var _a, _b, _c;
|
|
347
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listCustomers(project, platformId, pageToken, pageSize, search, sortBy, countries, gender,
|
|
407
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listCustomers(project, platformId, pageToken, pageSize, search, sortBy, countries, projects, gender, productTypes, usedDiscount, minimumTotalOrderCount, maximumTotalOrderCount, minimumRefundedOrderCount, maximumRefundedOrderCount, minimumLifetimeValue, maximumLifetimeValue, lastPurchasedStart, lastPurchasedEnd, options);
|
|
348
408
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
349
409
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CustomersApi.listCustomers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
350
410
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -367,7 +427,7 @@ export const CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
367
427
|
* @throws {RequiredError}
|
|
368
428
|
*/
|
|
369
429
|
exportCustomers(requestParameters, options) {
|
|
370
|
-
return localVarFp.exportCustomers(requestParameters.project, requestParameters.platformId, requestParameters.countries, requestParameters.gender, requestParameters.
|
|
430
|
+
return localVarFp.exportCustomers(requestParameters.project, requestParameters.platformId, requestParameters.sortBy, requestParameters.countries, requestParameters.projects, requestParameters.gender, requestParameters.productTypes, requestParameters.usedDiscount, requestParameters.minimumTotalOrderCount, requestParameters.maximumTotalOrderCount, requestParameters.minimumRefundedOrderCount, requestParameters.maximumRefundedOrderCount, requestParameters.minimumLifetimeValue, requestParameters.maximumLifetimeValue, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(axios, basePath));
|
|
371
431
|
},
|
|
372
432
|
/**
|
|
373
433
|
* Get a customer for a platform by a given customer ID.
|
|
@@ -387,7 +447,7 @@ export const CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
387
447
|
* @throws {RequiredError}
|
|
388
448
|
*/
|
|
389
449
|
listCustomers(requestParameters, options) {
|
|
390
|
-
return localVarFp.listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.countries, requestParameters.gender, requestParameters.
|
|
450
|
+
return localVarFp.listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.countries, requestParameters.projects, requestParameters.gender, requestParameters.productTypes, requestParameters.usedDiscount, requestParameters.minimumTotalOrderCount, requestParameters.maximumTotalOrderCount, requestParameters.minimumRefundedOrderCount, requestParameters.maximumRefundedOrderCount, requestParameters.minimumLifetimeValue, requestParameters.maximumLifetimeValue, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(axios, basePath));
|
|
391
451
|
},
|
|
392
452
|
};
|
|
393
453
|
};
|
|
@@ -407,7 +467,7 @@ export class CustomersApi extends BaseAPI {
|
|
|
407
467
|
* @memberof CustomersApi
|
|
408
468
|
*/
|
|
409
469
|
exportCustomers(requestParameters, options) {
|
|
410
|
-
return CustomersApiFp(this.configuration).exportCustomers(requestParameters.project, requestParameters.platformId, requestParameters.countries, requestParameters.gender, requestParameters.
|
|
470
|
+
return CustomersApiFp(this.configuration).exportCustomers(requestParameters.project, requestParameters.platformId, requestParameters.sortBy, requestParameters.countries, requestParameters.projects, requestParameters.gender, requestParameters.productTypes, requestParameters.usedDiscount, requestParameters.minimumTotalOrderCount, requestParameters.maximumTotalOrderCount, requestParameters.minimumRefundedOrderCount, requestParameters.maximumRefundedOrderCount, requestParameters.minimumLifetimeValue, requestParameters.maximumLifetimeValue, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(this.axios, this.basePath));
|
|
411
471
|
}
|
|
412
472
|
/**
|
|
413
473
|
* Get a customer for a platform by a given customer ID.
|
|
@@ -429,16 +489,9 @@ export class CustomersApi extends BaseAPI {
|
|
|
429
489
|
* @memberof CustomersApi
|
|
430
490
|
*/
|
|
431
491
|
listCustomers(requestParameters, options) {
|
|
432
|
-
return CustomersApiFp(this.configuration).listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.countries, requestParameters.gender, requestParameters.
|
|
492
|
+
return CustomersApiFp(this.configuration).listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.countries, requestParameters.projects, requestParameters.gender, requestParameters.productTypes, requestParameters.usedDiscount, requestParameters.minimumTotalOrderCount, requestParameters.maximumTotalOrderCount, requestParameters.minimumRefundedOrderCount, requestParameters.maximumRefundedOrderCount, requestParameters.minimumLifetimeValue, requestParameters.maximumLifetimeValue, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(this.axios, this.basePath));
|
|
433
493
|
}
|
|
434
494
|
}
|
|
435
|
-
/**
|
|
436
|
-
* @export
|
|
437
|
-
*/
|
|
438
|
-
export const ExportCustomersGenderEnum = {
|
|
439
|
-
Male: 'male',
|
|
440
|
-
Female: 'female'
|
|
441
|
-
};
|
|
442
495
|
/**
|
|
443
496
|
* @export
|
|
444
497
|
*/
|
|
@@ -450,7 +503,16 @@ export const ExportCustomersSortByEnum = {
|
|
|
450
503
|
RefundedOrderCount: '+refundedOrderCount',
|
|
451
504
|
RefundedOrderCount2: '-refundedOrderCount',
|
|
452
505
|
LastPurchased: '+lastPurchased',
|
|
453
|
-
LastPurchased2: '-lastPurchased'
|
|
506
|
+
LastPurchased2: '-lastPurchased',
|
|
507
|
+
UsedDiscount: '+usedDiscount',
|
|
508
|
+
UsedDiscount2: '-usedDiscount'
|
|
509
|
+
};
|
|
510
|
+
/**
|
|
511
|
+
* @export
|
|
512
|
+
*/
|
|
513
|
+
export const ExportCustomersGenderEnum = {
|
|
514
|
+
Male: 'male',
|
|
515
|
+
Female: 'female'
|
|
454
516
|
};
|
|
455
517
|
/**
|
|
456
518
|
* @export
|
|
@@ -463,7 +525,9 @@ export const ListCustomersSortByEnum = {
|
|
|
463
525
|
RefundedOrderCount: '+refundedOrderCount',
|
|
464
526
|
RefundedOrderCount2: '-refundedOrderCount',
|
|
465
527
|
LastPurchased: '+lastPurchased',
|
|
466
|
-
LastPurchased2: '-lastPurchased'
|
|
528
|
+
LastPurchased2: '-lastPurchased',
|
|
529
|
+
UsedDiscount: '+usedDiscount',
|
|
530
|
+
UsedDiscount2: '-usedDiscount'
|
|
467
531
|
};
|
|
468
532
|
/**
|
|
469
533
|
* @export
|
package/dist/esm/base.d.ts
CHANGED
package/dist/esm/base.js
CHANGED
package/dist/esm/common.d.ts
CHANGED
package/dist/esm/common.js
CHANGED
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/docs/CustomersApi.md
CHANGED
|
@@ -26,24 +26,36 @@ const apiInstance = new CustomersApi(configuration);
|
|
|
26
26
|
|
|
27
27
|
let project: string; //Project unique identifier (default to undefined)
|
|
28
28
|
let platformId: string; //The platform identifier (default to undefined)
|
|
29
|
+
let sortBy: Array<'+lifetimeValue' | '-lifetimeValue' | '+totalOrderCount' | '-totalOrderCount' | '+refundedOrderCount' | '-refundedOrderCount' | '+lastPurchased' | '-lastPurchased' | '+usedDiscount' | '-usedDiscount'>; //An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending. (optional) (default to undefined)
|
|
29
30
|
let countries: Array<string>; //Filter customers by country code (optional) (default to undefined)
|
|
31
|
+
let projects: Array<string>; //Filter customers by project. In the absence of this field, all projects will be included in the export. (optional) (default to undefined)
|
|
30
32
|
let gender: 'male' | 'female'; //Filter customers by gender equal to the value provided (optional) (default to undefined)
|
|
31
|
-
let
|
|
32
|
-
let
|
|
33
|
-
let
|
|
34
|
-
let
|
|
33
|
+
let productTypes: Array<number>; //Filter customers by purchased product types. In the absence of this field, all customers will be included in the export. (optional) (default to undefined)
|
|
34
|
+
let usedDiscount: boolean; //Filter customers by whether they have used a discount (optional) (default to undefined)
|
|
35
|
+
let minimumTotalOrderCount: number; //Filter customers by total order count greater than or equal to the value provided (optional) (default to undefined)
|
|
36
|
+
let maximumTotalOrderCount: number; //Filter customers by total order count less than or equal to the value provided (optional) (default to undefined)
|
|
37
|
+
let minimumRefundedOrderCount: number; //Filter customers by refunded order count greater than or equal to the value provided (optional) (default to undefined)
|
|
38
|
+
let maximumRefundedOrderCount: number; //Filter customers by refunded order count less than or equal to the value provided (optional) (default to undefined)
|
|
39
|
+
let minimumLifetimeValue: number; //Filter customers by lifetime value greater than or equal to the value provided (optional) (default to undefined)
|
|
40
|
+
let maximumLifetimeValue: number; //Filter customers by lifetime value less than or equal to the value provided (optional) (default to undefined)
|
|
35
41
|
let lastPurchasedStart: string; //Start of date range to filter customers by last purchase date (optional) (default to undefined)
|
|
36
42
|
let lastPurchasedEnd: string; //End of date range to filter customers by last purchase date (optional) (default to undefined)
|
|
37
43
|
|
|
38
44
|
const { status, data } = await apiInstance.exportCustomers(
|
|
39
45
|
project,
|
|
40
46
|
platformId,
|
|
47
|
+
sortBy,
|
|
41
48
|
countries,
|
|
49
|
+
projects,
|
|
42
50
|
gender,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
productTypes,
|
|
52
|
+
usedDiscount,
|
|
53
|
+
minimumTotalOrderCount,
|
|
54
|
+
maximumTotalOrderCount,
|
|
55
|
+
minimumRefundedOrderCount,
|
|
56
|
+
maximumRefundedOrderCount,
|
|
57
|
+
minimumLifetimeValue,
|
|
58
|
+
maximumLifetimeValue,
|
|
47
59
|
lastPurchasedStart,
|
|
48
60
|
lastPurchasedEnd
|
|
49
61
|
);
|
|
@@ -55,12 +67,18 @@ const { status, data } = await apiInstance.exportCustomers(
|
|
|
55
67
|
|------------- | ------------- | ------------- | -------------|
|
|
56
68
|
| **project** | [**string**] | Project unique identifier | defaults to undefined|
|
|
57
69
|
| **platformId** | [**string**] | The platform identifier | defaults to undefined|
|
|
70
|
+
| **sortBy** | **Array<'+lifetimeValue' | '-lifetimeValue' | '+totalOrderCount' | '-totalOrderCount' | '+refundedOrderCount' | '-refundedOrderCount' | '+lastPurchased' | '-lastPurchased' | '+usedDiscount' | '-usedDiscount'>** | An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending. | (optional) defaults to undefined|
|
|
58
71
|
| **countries** | **Array<string>** | Filter customers by country code | (optional) defaults to undefined|
|
|
72
|
+
| **projects** | **Array<string>** | Filter customers by project. In the absence of this field, all projects will be included in the export. | (optional) defaults to undefined|
|
|
59
73
|
| **gender** | [**'male' | 'female'**]**Array<'male' | 'female'>** | Filter customers by gender equal to the value provided | (optional) defaults to undefined|
|
|
60
|
-
| **
|
|
61
|
-
| **
|
|
62
|
-
| **
|
|
63
|
-
| **
|
|
74
|
+
| **productTypes** | **Array<number>** | Filter customers by purchased product types. In the absence of this field, all customers will be included in the export. | (optional) defaults to undefined|
|
|
75
|
+
| **usedDiscount** | [**boolean**] | Filter customers by whether they have used a discount | (optional) defaults to undefined|
|
|
76
|
+
| **minimumTotalOrderCount** | [**number**] | Filter customers by total order count greater than or equal to the value provided | (optional) defaults to undefined|
|
|
77
|
+
| **maximumTotalOrderCount** | [**number**] | Filter customers by total order count less than or equal to the value provided | (optional) defaults to undefined|
|
|
78
|
+
| **minimumRefundedOrderCount** | [**number**] | Filter customers by refunded order count greater than or equal to the value provided | (optional) defaults to undefined|
|
|
79
|
+
| **maximumRefundedOrderCount** | [**number**] | Filter customers by refunded order count less than or equal to the value provided | (optional) defaults to undefined|
|
|
80
|
+
| **minimumLifetimeValue** | [**number**] | Filter customers by lifetime value greater than or equal to the value provided | (optional) defaults to undefined|
|
|
81
|
+
| **maximumLifetimeValue** | [**number**] | Filter customers by lifetime value less than or equal to the value provided | (optional) defaults to undefined|
|
|
64
82
|
| **lastPurchasedStart** | [**string**] | Start of date range to filter customers by last purchase date | (optional) defaults to undefined|
|
|
65
83
|
| **lastPurchasedEnd** | [**string**] | End of date range to filter customers by last purchase date | (optional) defaults to undefined|
|
|
66
84
|
|
|
@@ -174,12 +192,18 @@ let platformId: string; //The platform identifier (default to undefined)
|
|
|
174
192
|
let pageToken: number; //Page reference token (optional) (default to 1)
|
|
175
193
|
let pageSize: number; //Max page size. This is the maximum page size that will be returned, but it might be smaller. (optional) (default to 100)
|
|
176
194
|
let search: string; //Search term to filter results (optional) (default to undefined)
|
|
177
|
-
let sortBy: Array<'+lifetimeValue' | '-lifetimeValue' | '+totalOrderCount' | '-totalOrderCount' | '+refundedOrderCount' | '-refundedOrderCount' | '+lastPurchased' | '-lastPurchased'>; //An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending. (optional) (default to undefined)
|
|
195
|
+
let sortBy: Array<'+lifetimeValue' | '-lifetimeValue' | '+totalOrderCount' | '-totalOrderCount' | '+refundedOrderCount' | '-refundedOrderCount' | '+lastPurchased' | '-lastPurchased' | '+usedDiscount' | '-usedDiscount'>; //An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending. (optional) (default to undefined)
|
|
178
196
|
let countries: Array<string>; //Filter customers by country code (optional) (default to undefined)
|
|
197
|
+
let projects: Array<string>; //Filter customers by project. In the absence of this field, all projects will be included in the export. (optional) (default to undefined)
|
|
179
198
|
let gender: 'male' | 'female'; //Filter customers by gender equal to the value provided (optional) (default to undefined)
|
|
180
|
-
let
|
|
181
|
-
let
|
|
182
|
-
let
|
|
199
|
+
let productTypes: Array<number>; //Filter customers by purchased product types. In the absence of this field, all customers will be included in the export. (optional) (default to undefined)
|
|
200
|
+
let usedDiscount: boolean; //Filter customers by whether they have used a discount (optional) (default to undefined)
|
|
201
|
+
let minimumTotalOrderCount: number; //Filter customers by total order count greater than or equal to the value provided (optional) (default to undefined)
|
|
202
|
+
let maximumTotalOrderCount: number; //Filter customers by total order count less than or equal to the value provided (optional) (default to undefined)
|
|
203
|
+
let minimumRefundedOrderCount: number; //Filter customers by refunded order count greater than or equal to the value provided (optional) (default to undefined)
|
|
204
|
+
let maximumRefundedOrderCount: number; //Filter customers by refunded order count less than or equal to the value provided (optional) (default to undefined)
|
|
205
|
+
let minimumLifetimeValue: number; //Filter customers by lifetime value greater than or equal to the value provided (optional) (default to undefined)
|
|
206
|
+
let maximumLifetimeValue: number; //Filter customers by lifetime value less than or equal to the value provided (optional) (default to undefined)
|
|
183
207
|
let lastPurchasedStart: string; //Start of date range to filter customers by last purchase date (optional) (default to undefined)
|
|
184
208
|
let lastPurchasedEnd: string; //End of date range to filter customers by last purchase date (optional) (default to undefined)
|
|
185
209
|
|
|
@@ -191,10 +215,16 @@ const { status, data } = await apiInstance.listCustomers(
|
|
|
191
215
|
search,
|
|
192
216
|
sortBy,
|
|
193
217
|
countries,
|
|
218
|
+
projects,
|
|
194
219
|
gender,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
220
|
+
productTypes,
|
|
221
|
+
usedDiscount,
|
|
222
|
+
minimumTotalOrderCount,
|
|
223
|
+
maximumTotalOrderCount,
|
|
224
|
+
minimumRefundedOrderCount,
|
|
225
|
+
maximumRefundedOrderCount,
|
|
226
|
+
minimumLifetimeValue,
|
|
227
|
+
maximumLifetimeValue,
|
|
198
228
|
lastPurchasedStart,
|
|
199
229
|
lastPurchasedEnd
|
|
200
230
|
);
|
|
@@ -209,12 +239,18 @@ const { status, data } = await apiInstance.listCustomers(
|
|
|
209
239
|
| **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
|
|
210
240
|
| **pageSize** | [**number**] | Max page size. This is the maximum page size that will be returned, but it might be smaller. | (optional) defaults to 100|
|
|
211
241
|
| **search** | [**string**] | Search term to filter results | (optional) defaults to undefined|
|
|
212
|
-
| **sortBy** | **Array<'+lifetimeValue' | '-lifetimeValue' | '+totalOrderCount' | '-totalOrderCount' | '+refundedOrderCount' | '-refundedOrderCount' | '+lastPurchased' | '-lastPurchased'>** | An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending. | (optional) defaults to undefined|
|
|
242
|
+
| **sortBy** | **Array<'+lifetimeValue' | '-lifetimeValue' | '+totalOrderCount' | '-totalOrderCount' | '+refundedOrderCount' | '-refundedOrderCount' | '+lastPurchased' | '-lastPurchased' | '+usedDiscount' | '-usedDiscount'>** | An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending. | (optional) defaults to undefined|
|
|
213
243
|
| **countries** | **Array<string>** | Filter customers by country code | (optional) defaults to undefined|
|
|
244
|
+
| **projects** | **Array<string>** | Filter customers by project. In the absence of this field, all projects will be included in the export. | (optional) defaults to undefined|
|
|
214
245
|
| **gender** | [**'male' | 'female'**]**Array<'male' | 'female'>** | Filter customers by gender equal to the value provided | (optional) defaults to undefined|
|
|
215
|
-
| **
|
|
216
|
-
| **
|
|
217
|
-
| **
|
|
246
|
+
| **productTypes** | **Array<number>** | Filter customers by purchased product types. In the absence of this field, all customers will be included in the export. | (optional) defaults to undefined|
|
|
247
|
+
| **usedDiscount** | [**boolean**] | Filter customers by whether they have used a discount | (optional) defaults to undefined|
|
|
248
|
+
| **minimumTotalOrderCount** | [**number**] | Filter customers by total order count greater than or equal to the value provided | (optional) defaults to undefined|
|
|
249
|
+
| **maximumTotalOrderCount** | [**number**] | Filter customers by total order count less than or equal to the value provided | (optional) defaults to undefined|
|
|
250
|
+
| **minimumRefundedOrderCount** | [**number**] | Filter customers by refunded order count greater than or equal to the value provided | (optional) defaults to undefined|
|
|
251
|
+
| **maximumRefundedOrderCount** | [**number**] | Filter customers by refunded order count less than or equal to the value provided | (optional) defaults to undefined|
|
|
252
|
+
| **minimumLifetimeValue** | [**number**] | Filter customers by lifetime value greater than or equal to the value provided | (optional) defaults to undefined|
|
|
253
|
+
| **maximumLifetimeValue** | [**number**] | Filter customers by lifetime value less than or equal to the value provided | (optional) defaults to undefined|
|
|
218
254
|
| **lastPurchasedStart** | [**string**] | Start of date range to filter customers by last purchase date | (optional) defaults to undefined|
|
|
219
255
|
| **lastPurchasedEnd** | [**string**] | End of date range to filter customers by last purchase date | (optional) defaults to undefined|
|
|
220
256
|
|
package/docs/Statistics.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**totalOrderCount** | **number** | | [default to undefined]
|
|
10
10
|
**refundedOrderCount** | **number** | | [default to undefined]
|
|
11
11
|
**lastPurchased** | **string** | | [default to undefined]
|
|
12
|
+
**usedDiscount** | **boolean** | | [default to undefined]
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,6 +21,7 @@ const instance: Statistics = {
|
|
|
20
21
|
totalOrderCount,
|
|
21
22
|
refundedOrderCount,
|
|
22
23
|
lastPurchased,
|
|
24
|
+
usedDiscount,
|
|
23
25
|
};
|
|
24
26
|
```
|
|
25
27
|
|
package/index.ts
CHANGED