@teemill/platform 0.30.5 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts 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.30.5
7
+ * The version of the OpenAPI document: 0.32.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -130,6 +130,57 @@ export const AmendOrderRequestAmendmentsInnerActionEnum = {
130
130
 
131
131
  export type AmendOrderRequestAmendmentsInnerActionEnum = typeof AmendOrderRequestAmendmentsInnerActionEnum[keyof typeof AmendOrderRequestAmendmentsInnerActionEnum];
132
132
 
133
+ /**
134
+ *
135
+ * @export
136
+ * @interface AmendmentLog
137
+ */
138
+ export interface AmendmentLog {
139
+ /**
140
+ * Unique object identifier
141
+ * @type {string}
142
+ * @memberof AmendmentLog
143
+ */
144
+ 'id': string;
145
+ /**
146
+ * A reference to the order item that was amended.
147
+ * @type {string}
148
+ * @memberof AmendmentLog
149
+ */
150
+ 'orderItemId': string;
151
+ /**
152
+ * A reference to the top level order item that was amended, useful for finding the original item within a chain of exchanges, for example.
153
+ * @type {string}
154
+ * @memberof AmendmentLog
155
+ */
156
+ 'originalOrderItemId': string;
157
+ /**
158
+ *
159
+ * @type {string}
160
+ * @memberof AmendmentLog
161
+ */
162
+ 'amendmentType': AmendmentLogAmendmentTypeEnum;
163
+ /**
164
+ *
165
+ * @type {number}
166
+ * @memberof AmendmentLog
167
+ */
168
+ 'quantity': number;
169
+ /**
170
+ * ISO 8601 Timestamp
171
+ * @type {string}
172
+ * @memberof AmendmentLog
173
+ */
174
+ 'createdAt': string;
175
+ }
176
+
177
+ export const AmendmentLogAmendmentTypeEnum = {
178
+ Refund: 'refund',
179
+ Exchange: 'exchange'
180
+ } as const;
181
+
182
+ export type AmendmentLogAmendmentTypeEnum = typeof AmendmentLogAmendmentTypeEnum[keyof typeof AmendmentLogAmendmentTypeEnum];
183
+
133
184
  /**
134
185
  *
135
186
  * @export
@@ -149,6 +200,32 @@ export interface ApiError {
149
200
  */
150
201
  'message': string;
151
202
  }
203
+ /**
204
+ *
205
+ * @export
206
+ * @interface BulkCreateReviewPayload
207
+ */
208
+ export interface BulkCreateReviewPayload {
209
+ /**
210
+ *
211
+ * @type {Array<CreateReviewPayload>}
212
+ * @memberof BulkCreateReviewPayload
213
+ */
214
+ 'reviews': Array<CreateReviewPayload>;
215
+ }
216
+ /**
217
+ *
218
+ * @export
219
+ * @interface BulkCreatedReviews
220
+ */
221
+ export interface BulkCreatedReviews {
222
+ /**
223
+ *
224
+ * @type {Array<Review>}
225
+ * @memberof BulkCreatedReviews
226
+ */
227
+ 'reviews': Array<Review>;
228
+ }
152
229
  /**
153
230
  *
154
231
  * @export
@@ -357,6 +434,92 @@ export interface CreateOrderContactInformation {
357
434
  */
358
435
  'phone'?: string | null;
359
436
  }
437
+ /**
438
+ * @type CreateReview201Response
439
+ * @export
440
+ */
441
+ export type CreateReview201Response = BulkCreatedReviews | Review;
442
+
443
+ /**
444
+ *
445
+ * @export
446
+ * @interface CreateReviewPayload
447
+ */
448
+ export interface CreateReviewPayload {
449
+ /**
450
+ *
451
+ * @type {CreateReviewPayloadAuthor}
452
+ * @memberof CreateReviewPayload
453
+ */
454
+ 'author': CreateReviewPayloadAuthor;
455
+ /**
456
+ * The title of the review
457
+ * @type {string}
458
+ * @memberof CreateReviewPayload
459
+ */
460
+ 'title'?: string;
461
+ /**
462
+ * The text of the review
463
+ * @type {string}
464
+ * @memberof CreateReviewPayload
465
+ */
466
+ 'text': string;
467
+ /**
468
+ * A reference to the product being ordered
469
+ * @type {string}
470
+ * @memberof CreateReviewPayload
471
+ */
472
+ 'productRef': string;
473
+ /**
474
+ * The rating of the review
475
+ * @type {number}
476
+ * @memberof CreateReviewPayload
477
+ */
478
+ 'rating': number;
479
+ /**
480
+ *
481
+ * @type {Array<Image>}
482
+ * @memberof CreateReviewPayload
483
+ */
484
+ 'images'?: Array<Image>;
485
+ /**
486
+ * Whether the review has been approved or not. If the review is not enabled, it will not be visible to the public.
487
+ * @type {boolean}
488
+ * @memberof CreateReviewPayload
489
+ */
490
+ 'enabled': boolean;
491
+ /**
492
+ * A reference to the project being ordered
493
+ * @type {string}
494
+ * @memberof CreateReviewPayload
495
+ */
496
+ 'projectRef': string;
497
+ }
498
+ /**
499
+ *
500
+ * @export
501
+ * @interface CreateReviewPayloadAuthor
502
+ */
503
+ export interface CreateReviewPayloadAuthor {
504
+ /**
505
+ * The name of the author
506
+ * @type {string}
507
+ * @memberof CreateReviewPayloadAuthor
508
+ */
509
+ 'name'?: string;
510
+ /**
511
+ * The email of the author
512
+ * @type {string}
513
+ * @memberof CreateReviewPayloadAuthor
514
+ */
515
+ 'email'?: string;
516
+ }
517
+ /**
518
+ * @type CreateReviewRequest
519
+ * @export
520
+ */
521
+ export type CreateReviewRequest = BulkCreateReviewPayload | CreateReviewPayload;
522
+
360
523
  /**
361
524
  * The customer that has placed an order on your platform
362
525
  * @export
@@ -463,6 +626,49 @@ export const CustomsInformationPreRegistrationTypeEnum = {
463
626
 
464
627
  export type CustomsInformationPreRegistrationTypeEnum = typeof CustomsInformationPreRegistrationTypeEnum[keyof typeof CustomsInformationPreRegistrationTypeEnum];
465
628
 
629
+ /**
630
+ *
631
+ * @export
632
+ * @interface DashboardItem
633
+ */
634
+ export interface DashboardItem {
635
+ /**
636
+ *
637
+ * @type {string}
638
+ * @memberof DashboardItem
639
+ */
640
+ 'id': string;
641
+ /**
642
+ *
643
+ * @type {string}
644
+ * @memberof DashboardItem
645
+ */
646
+ 'type': string;
647
+ /**
648
+ *
649
+ * @type {{ [key: string]: any; }}
650
+ * @memberof DashboardItem
651
+ */
652
+ 'properties': { [key: string]: any; } | null;
653
+ /**
654
+ *
655
+ * @type {boolean}
656
+ * @memberof DashboardItem
657
+ */
658
+ 'published': boolean;
659
+ /**
660
+ *
661
+ * @type {number}
662
+ * @memberof DashboardItem
663
+ */
664
+ 'sortOrder': number;
665
+ /**
666
+ *
667
+ * @type {Array<DashboardItem>}
668
+ * @memberof DashboardItem
669
+ */
670
+ 'items'?: Array<DashboardItem> | null;
671
+ }
466
672
  /**
467
673
  *
468
674
  * @export
@@ -796,6 +1002,19 @@ export interface FulfillmentItem {
796
1002
  */
797
1003
  'quantity'?: number;
798
1004
  }
1005
+ /**
1006
+ *
1007
+ * @export
1008
+ * @interface GetDashboardResponse
1009
+ */
1010
+ export interface GetDashboardResponse {
1011
+ /**
1012
+ *
1013
+ * @type {Array<DashboardItem>}
1014
+ * @memberof GetDashboardResponse
1015
+ */
1016
+ 'items'?: Array<DashboardItem>;
1017
+ }
799
1018
  /**
800
1019
  * Image description
801
1020
  * @export
@@ -1193,6 +1412,12 @@ export interface OrderItem {
1193
1412
  * @memberof OrderItem
1194
1413
  */
1195
1414
  'recipientCost'?: Price;
1415
+ /**
1416
+ *
1417
+ * @type {Array<AmendmentLog>}
1418
+ * @memberof OrderItem
1419
+ */
1420
+ 'amendmentLogs'?: Array<AmendmentLog>;
1196
1421
  }
1197
1422
  /**
1198
1423
  *
@@ -1612,7 +1837,7 @@ export interface Review {
1612
1837
  * @type {Array<ReviewReply>}
1613
1838
  * @memberof Review
1614
1839
  */
1615
- 'replies'?: Array<ReviewReply>;
1840
+ 'replies'?: Array<ReviewReply> | null;
1616
1841
  }
1617
1842
  /**
1618
1843
  *
@@ -1734,6 +1959,19 @@ export interface ReviewsResponse {
1734
1959
  */
1735
1960
  'nextPageToken'?: number | null;
1736
1961
  }
1962
+ /**
1963
+ *
1964
+ * @export
1965
+ * @interface SaveDashboardRequest
1966
+ */
1967
+ export interface SaveDashboardRequest {
1968
+ /**
1969
+ *
1970
+ * @type {Array<DashboardItem>}
1971
+ * @memberof SaveDashboardRequest
1972
+ */
1973
+ 'items'?: Array<DashboardItem>;
1974
+ }
1737
1975
  /**
1738
1976
  *
1739
1977
  * @export
@@ -2757,115 +2995,378 @@ export interface CustomersApiListCustomersRequest {
2757
2995
  * @type {number}
2758
2996
  * @memberof CustomersApiListCustomers
2759
2997
  */
2760
- readonly maximumLifetimeValue?: number
2998
+ readonly maximumLifetimeValue?: number
2999
+
3000
+ /**
3001
+ * Start of date range to filter customers by last purchase date
3002
+ * @type {string}
3003
+ * @memberof CustomersApiListCustomers
3004
+ */
3005
+ readonly lastPurchasedStart?: string
3006
+
3007
+ /**
3008
+ * End of date range to filter customers by last purchase date
3009
+ * @type {string}
3010
+ * @memberof CustomersApiListCustomers
3011
+ */
3012
+ readonly lastPurchasedEnd?: string
3013
+ }
3014
+
3015
+ /**
3016
+ * CustomersApi - object-oriented interface
3017
+ * @export
3018
+ * @class CustomersApi
3019
+ * @extends {BaseAPI}
3020
+ */
3021
+ export class CustomersApi extends BaseAPI {
3022
+ /**
3023
+ * Export customers as a CSV file
3024
+ * @summary Export customers
3025
+ * @param {CustomersApiExportCustomersRequest} requestParameters Request parameters.
3026
+ * @param {*} [options] Override http request option.
3027
+ * @throws {RequiredError}
3028
+ * @memberof CustomersApi
3029
+ */
3030
+ public exportCustomers(requestParameters: CustomersApiExportCustomersRequest, options?: RawAxiosRequestConfig) {
3031
+ 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));
3032
+ }
3033
+
3034
+ /**
3035
+ * Get a customer for a platform by a given customer ID.
3036
+ * @summary Get customer
3037
+ * @param {CustomersApiGetCustomerRequest} requestParameters Request parameters.
3038
+ * @param {*} [options] Override http request option.
3039
+ * @throws {RequiredError}
3040
+ * @memberof CustomersApi
3041
+ */
3042
+ public getCustomer(requestParameters: CustomersApiGetCustomerRequest, options?: RawAxiosRequestConfig) {
3043
+ return CustomersApiFp(this.configuration).getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(this.axios, this.basePath));
3044
+ }
3045
+
3046
+ /**
3047
+ * List customers for a platform
3048
+ * @summary List customers
3049
+ * @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
3050
+ * @param {*} [options] Override http request option.
3051
+ * @throws {RequiredError}
3052
+ * @memberof CustomersApi
3053
+ */
3054
+ public listCustomers(requestParameters: CustomersApiListCustomersRequest, options?: RawAxiosRequestConfig) {
3055
+ 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));
3056
+ }
3057
+ }
3058
+
3059
+ /**
3060
+ * @export
3061
+ */
3062
+ export const ExportCustomersSortByEnum = {
3063
+ LifetimeValue: '+lifetimeValue',
3064
+ LifetimeValue2: '-lifetimeValue',
3065
+ TotalOrderCount: '+totalOrderCount',
3066
+ TotalOrderCount2: '-totalOrderCount',
3067
+ RefundedOrderCount: '+refundedOrderCount',
3068
+ RefundedOrderCount2: '-refundedOrderCount',
3069
+ LastPurchased: '+lastPurchased',
3070
+ LastPurchased2: '-lastPurchased',
3071
+ UsedDiscount: '+usedDiscount',
3072
+ UsedDiscount2: '-usedDiscount'
3073
+ } as const;
3074
+ export type ExportCustomersSortByEnum = typeof ExportCustomersSortByEnum[keyof typeof ExportCustomersSortByEnum];
3075
+ /**
3076
+ * @export
3077
+ */
3078
+ export const ExportCustomersGenderEnum = {
3079
+ Male: 'male',
3080
+ Female: 'female'
3081
+ } as const;
3082
+ export type ExportCustomersGenderEnum = typeof ExportCustomersGenderEnum[keyof typeof ExportCustomersGenderEnum];
3083
+ /**
3084
+ * @export
3085
+ */
3086
+ export const ListCustomersSortByEnum = {
3087
+ LifetimeValue: '+lifetimeValue',
3088
+ LifetimeValue2: '-lifetimeValue',
3089
+ TotalOrderCount: '+totalOrderCount',
3090
+ TotalOrderCount2: '-totalOrderCount',
3091
+ RefundedOrderCount: '+refundedOrderCount',
3092
+ RefundedOrderCount2: '-refundedOrderCount',
3093
+ LastPurchased: '+lastPurchased',
3094
+ LastPurchased2: '-lastPurchased',
3095
+ UsedDiscount: '+usedDiscount',
3096
+ UsedDiscount2: '-usedDiscount'
3097
+ } as const;
3098
+ export type ListCustomersSortByEnum = typeof ListCustomersSortByEnum[keyof typeof ListCustomersSortByEnum];
3099
+ /**
3100
+ * @export
3101
+ */
3102
+ export const ListCustomersGenderEnum = {
3103
+ Male: 'male',
3104
+ Female: 'female'
3105
+ } as const;
3106
+ export type ListCustomersGenderEnum = typeof ListCustomersGenderEnum[keyof typeof ListCustomersGenderEnum];
3107
+
3108
+
3109
+ /**
3110
+ * DashboardApi - axios parameter creator
3111
+ * @export
3112
+ */
3113
+ export const DashboardApiAxiosParamCreator = function (configuration?: Configuration) {
3114
+ return {
3115
+ /**
3116
+ *
3117
+ * @summary Get the platform\'s dashboard
3118
+ * @param {string} project Project unique identifier
3119
+ * @param {string} platformId The platform identifier
3120
+ * @param {*} [options] Override http request option.
3121
+ * @throws {RequiredError}
3122
+ */
3123
+ getDashboard: async (project: string, platformId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3124
+ // verify required parameter 'project' is not null or undefined
3125
+ assertParamExists('getDashboard', 'project', project)
3126
+ // verify required parameter 'platformId' is not null or undefined
3127
+ assertParamExists('getDashboard', 'platformId', platformId)
3128
+ const localVarPath = `/v1/platform/{platformId}/dashboard`
3129
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
3130
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3131
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3132
+ let baseOptions;
3133
+ if (configuration) {
3134
+ baseOptions = configuration.baseOptions;
3135
+ }
3136
+
3137
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3138
+ const localVarHeaderParameter = {} as any;
3139
+ const localVarQueryParameter = {} as any;
3140
+
3141
+ // authentication session-oauth required
3142
+ // oauth required
3143
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
3144
+
3145
+ // authentication api-key required
3146
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
3147
+
3148
+ if (project !== undefined) {
3149
+ localVarQueryParameter['project'] = project;
3150
+ }
3151
+
3152
+
3153
+
3154
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3155
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3156
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3157
+
3158
+ return {
3159
+ url: toPathString(localVarUrlObj),
3160
+ options: localVarRequestOptions,
3161
+ };
3162
+ },
3163
+ /**
3164
+ *
3165
+ * @summary Save the platform\'s dashboard
3166
+ * @param {string} project Project unique identifier
3167
+ * @param {string} platformId The platform identifier
3168
+ * @param {SaveDashboardRequest} saveDashboardRequest Save dashboard
3169
+ * @param {*} [options] Override http request option.
3170
+ * @throws {RequiredError}
3171
+ */
3172
+ saveDashboard: async (project: string, platformId: string, saveDashboardRequest: SaveDashboardRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3173
+ // verify required parameter 'project' is not null or undefined
3174
+ assertParamExists('saveDashboard', 'project', project)
3175
+ // verify required parameter 'platformId' is not null or undefined
3176
+ assertParamExists('saveDashboard', 'platformId', platformId)
3177
+ // verify required parameter 'saveDashboardRequest' is not null or undefined
3178
+ assertParamExists('saveDashboard', 'saveDashboardRequest', saveDashboardRequest)
3179
+ const localVarPath = `/v1/platform/{platformId}/dashboard`
3180
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
3181
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3182
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3183
+ let baseOptions;
3184
+ if (configuration) {
3185
+ baseOptions = configuration.baseOptions;
3186
+ }
3187
+
3188
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
3189
+ const localVarHeaderParameter = {} as any;
3190
+ const localVarQueryParameter = {} as any;
3191
+
3192
+ // authentication session-oauth required
3193
+ // oauth required
3194
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
3195
+
3196
+ // authentication api-key required
3197
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
3198
+
3199
+ if (project !== undefined) {
3200
+ localVarQueryParameter['project'] = project;
3201
+ }
3202
+
3203
+
3204
+
3205
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3206
+
3207
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3208
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3209
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3210
+ localVarRequestOptions.data = serializeDataIfNeeded(saveDashboardRequest, localVarRequestOptions, configuration)
3211
+
3212
+ return {
3213
+ url: toPathString(localVarUrlObj),
3214
+ options: localVarRequestOptions,
3215
+ };
3216
+ },
3217
+ }
3218
+ };
3219
+
3220
+ /**
3221
+ * DashboardApi - functional programming interface
3222
+ * @export
3223
+ */
3224
+ export const DashboardApiFp = function(configuration?: Configuration) {
3225
+ const localVarAxiosParamCreator = DashboardApiAxiosParamCreator(configuration)
3226
+ return {
3227
+ /**
3228
+ *
3229
+ * @summary Get the platform\'s dashboard
3230
+ * @param {string} project Project unique identifier
3231
+ * @param {string} platformId The platform identifier
3232
+ * @param {*} [options] Override http request option.
3233
+ * @throws {RequiredError}
3234
+ */
3235
+ async getDashboard(project: string, platformId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDashboardResponse>> {
3236
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDashboard(project, platformId, options);
3237
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3238
+ const localVarOperationServerBasePath = operationServerMap['DashboardApi.getDashboard']?.[localVarOperationServerIndex]?.url;
3239
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3240
+ },
3241
+ /**
3242
+ *
3243
+ * @summary Save the platform\'s dashboard
3244
+ * @param {string} project Project unique identifier
3245
+ * @param {string} platformId The platform identifier
3246
+ * @param {SaveDashboardRequest} saveDashboardRequest Save dashboard
3247
+ * @param {*} [options] Override http request option.
3248
+ * @throws {RequiredError}
3249
+ */
3250
+ async saveDashboard(project: string, platformId: string, saveDashboardRequest: SaveDashboardRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDashboardResponse>> {
3251
+ const localVarAxiosArgs = await localVarAxiosParamCreator.saveDashboard(project, platformId, saveDashboardRequest, options);
3252
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3253
+ const localVarOperationServerBasePath = operationServerMap['DashboardApi.saveDashboard']?.[localVarOperationServerIndex]?.url;
3254
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3255
+ },
3256
+ }
3257
+ };
3258
+
3259
+ /**
3260
+ * DashboardApi - factory interface
3261
+ * @export
3262
+ */
3263
+ export const DashboardApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3264
+ const localVarFp = DashboardApiFp(configuration)
3265
+ return {
3266
+ /**
3267
+ *
3268
+ * @summary Get the platform\'s dashboard
3269
+ * @param {DashboardApiGetDashboardRequest} requestParameters Request parameters.
3270
+ * @param {*} [options] Override http request option.
3271
+ * @throws {RequiredError}
3272
+ */
3273
+ getDashboard(requestParameters: DashboardApiGetDashboardRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetDashboardResponse> {
3274
+ return localVarFp.getDashboard(requestParameters.project, requestParameters.platformId, options).then((request) => request(axios, basePath));
3275
+ },
3276
+ /**
3277
+ *
3278
+ * @summary Save the platform\'s dashboard
3279
+ * @param {DashboardApiSaveDashboardRequest} requestParameters Request parameters.
3280
+ * @param {*} [options] Override http request option.
3281
+ * @throws {RequiredError}
3282
+ */
3283
+ saveDashboard(requestParameters: DashboardApiSaveDashboardRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetDashboardResponse> {
3284
+ return localVarFp.saveDashboard(requestParameters.project, requestParameters.platformId, requestParameters.saveDashboardRequest, options).then((request) => request(axios, basePath));
3285
+ },
3286
+ };
3287
+ };
3288
+
3289
+ /**
3290
+ * Request parameters for getDashboard operation in DashboardApi.
3291
+ * @export
3292
+ * @interface DashboardApiGetDashboardRequest
3293
+ */
3294
+ export interface DashboardApiGetDashboardRequest {
3295
+ /**
3296
+ * Project unique identifier
3297
+ * @type {string}
3298
+ * @memberof DashboardApiGetDashboard
3299
+ */
3300
+ readonly project: string
3301
+
3302
+ /**
3303
+ * The platform identifier
3304
+ * @type {string}
3305
+ * @memberof DashboardApiGetDashboard
3306
+ */
3307
+ readonly platformId: string
3308
+ }
3309
+
3310
+ /**
3311
+ * Request parameters for saveDashboard operation in DashboardApi.
3312
+ * @export
3313
+ * @interface DashboardApiSaveDashboardRequest
3314
+ */
3315
+ export interface DashboardApiSaveDashboardRequest {
3316
+ /**
3317
+ * Project unique identifier
3318
+ * @type {string}
3319
+ * @memberof DashboardApiSaveDashboard
3320
+ */
3321
+ readonly project: string
2761
3322
 
2762
3323
  /**
2763
- * Start of date range to filter customers by last purchase date
3324
+ * The platform identifier
2764
3325
  * @type {string}
2765
- * @memberof CustomersApiListCustomers
3326
+ * @memberof DashboardApiSaveDashboard
2766
3327
  */
2767
- readonly lastPurchasedStart?: string
3328
+ readonly platformId: string
2768
3329
 
2769
3330
  /**
2770
- * End of date range to filter customers by last purchase date
2771
- * @type {string}
2772
- * @memberof CustomersApiListCustomers
3331
+ * Save dashboard
3332
+ * @type {SaveDashboardRequest}
3333
+ * @memberof DashboardApiSaveDashboard
2773
3334
  */
2774
- readonly lastPurchasedEnd?: string
3335
+ readonly saveDashboardRequest: SaveDashboardRequest
2775
3336
  }
2776
3337
 
2777
3338
  /**
2778
- * CustomersApi - object-oriented interface
3339
+ * DashboardApi - object-oriented interface
2779
3340
  * @export
2780
- * @class CustomersApi
3341
+ * @class DashboardApi
2781
3342
  * @extends {BaseAPI}
2782
3343
  */
2783
- export class CustomersApi extends BaseAPI {
3344
+ export class DashboardApi extends BaseAPI {
2784
3345
  /**
2785
- * Export customers as a CSV file
2786
- * @summary Export customers
2787
- * @param {CustomersApiExportCustomersRequest} requestParameters Request parameters.
2788
- * @param {*} [options] Override http request option.
2789
- * @throws {RequiredError}
2790
- * @memberof CustomersApi
2791
- */
2792
- public exportCustomers(requestParameters: CustomersApiExportCustomersRequest, options?: RawAxiosRequestConfig) {
2793
- 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));
2794
- }
2795
-
2796
- /**
2797
- * Get a customer for a platform by a given customer ID.
2798
- * @summary Get customer
2799
- * @param {CustomersApiGetCustomerRequest} requestParameters Request parameters.
3346
+ *
3347
+ * @summary Get the platform\'s dashboard
3348
+ * @param {DashboardApiGetDashboardRequest} requestParameters Request parameters.
2800
3349
  * @param {*} [options] Override http request option.
2801
3350
  * @throws {RequiredError}
2802
- * @memberof CustomersApi
3351
+ * @memberof DashboardApi
2803
3352
  */
2804
- public getCustomer(requestParameters: CustomersApiGetCustomerRequest, options?: RawAxiosRequestConfig) {
2805
- return CustomersApiFp(this.configuration).getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(this.axios, this.basePath));
3353
+ public getDashboard(requestParameters: DashboardApiGetDashboardRequest, options?: RawAxiosRequestConfig) {
3354
+ return DashboardApiFp(this.configuration).getDashboard(requestParameters.project, requestParameters.platformId, options).then((request) => request(this.axios, this.basePath));
2806
3355
  }
2807
3356
 
2808
3357
  /**
2809
- * List customers for a platform
2810
- * @summary List customers
2811
- * @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
3358
+ *
3359
+ * @summary Save the platform\'s dashboard
3360
+ * @param {DashboardApiSaveDashboardRequest} requestParameters Request parameters.
2812
3361
  * @param {*} [options] Override http request option.
2813
3362
  * @throws {RequiredError}
2814
- * @memberof CustomersApi
3363
+ * @memberof DashboardApi
2815
3364
  */
2816
- public listCustomers(requestParameters: CustomersApiListCustomersRequest, options?: RawAxiosRequestConfig) {
2817
- 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));
3365
+ public saveDashboard(requestParameters: DashboardApiSaveDashboardRequest, options?: RawAxiosRequestConfig) {
3366
+ return DashboardApiFp(this.configuration).saveDashboard(requestParameters.project, requestParameters.platformId, requestParameters.saveDashboardRequest, options).then((request) => request(this.axios, this.basePath));
2818
3367
  }
2819
3368
  }
2820
3369
 
2821
- /**
2822
- * @export
2823
- */
2824
- export const ExportCustomersSortByEnum = {
2825
- LifetimeValue: '+lifetimeValue',
2826
- LifetimeValue2: '-lifetimeValue',
2827
- TotalOrderCount: '+totalOrderCount',
2828
- TotalOrderCount2: '-totalOrderCount',
2829
- RefundedOrderCount: '+refundedOrderCount',
2830
- RefundedOrderCount2: '-refundedOrderCount',
2831
- LastPurchased: '+lastPurchased',
2832
- LastPurchased2: '-lastPurchased',
2833
- UsedDiscount: '+usedDiscount',
2834
- UsedDiscount2: '-usedDiscount'
2835
- } as const;
2836
- export type ExportCustomersSortByEnum = typeof ExportCustomersSortByEnum[keyof typeof ExportCustomersSortByEnum];
2837
- /**
2838
- * @export
2839
- */
2840
- export const ExportCustomersGenderEnum = {
2841
- Male: 'male',
2842
- Female: 'female'
2843
- } as const;
2844
- export type ExportCustomersGenderEnum = typeof ExportCustomersGenderEnum[keyof typeof ExportCustomersGenderEnum];
2845
- /**
2846
- * @export
2847
- */
2848
- export const ListCustomersSortByEnum = {
2849
- LifetimeValue: '+lifetimeValue',
2850
- LifetimeValue2: '-lifetimeValue',
2851
- TotalOrderCount: '+totalOrderCount',
2852
- TotalOrderCount2: '-totalOrderCount',
2853
- RefundedOrderCount: '+refundedOrderCount',
2854
- RefundedOrderCount2: '-refundedOrderCount',
2855
- LastPurchased: '+lastPurchased',
2856
- LastPurchased2: '-lastPurchased',
2857
- UsedDiscount: '+usedDiscount',
2858
- UsedDiscount2: '-usedDiscount'
2859
- } as const;
2860
- export type ListCustomersSortByEnum = typeof ListCustomersSortByEnum[keyof typeof ListCustomersSortByEnum];
2861
- /**
2862
- * @export
2863
- */
2864
- export const ListCustomersGenderEnum = {
2865
- Male: 'male',
2866
- Female: 'female'
2867
- } as const;
2868
- export type ListCustomersGenderEnum = typeof ListCustomersGenderEnum[keyof typeof ListCustomersGenderEnum];
2869
3370
 
2870
3371
 
2871
3372
  /**
@@ -6488,6 +6989,94 @@ export class PlatformApi extends BaseAPI {
6488
6989
  */
6489
6990
  export const ReviewsApiAxiosParamCreator = function (configuration?: Configuration) {
6490
6991
  return {
6992
+ /**
6993
+ *
6994
+ * @summary Create a review
6995
+ * @param {string} project Project unique identifier
6996
+ * @param {string} platformId The platform identifier
6997
+ * @param {CreateReviewRequest} createReviewRequest
6998
+ * @param {number} [pageToken] Page reference token
6999
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
7000
+ * @param {string} [search] Search term to filter results
7001
+ * @param {Array<string>} [sortBy] An array of fields to sort by, prefixed with a \&#39;-\&#39; for descending order or \&#39;+\&#39; for ascending. Default is ascending.
7002
+ * @param {string} [start] Start of date range to filter by
7003
+ * @param {string} [end] End of date range to filter by
7004
+ * @param {*} [options] Override http request option.
7005
+ * @throws {RequiredError}
7006
+ */
7007
+ createReview: async (project: string, platformId: string, createReviewRequest: CreateReviewRequest, pageToken?: number, pageSize?: number, search?: string, sortBy?: Array<string>, start?: string, end?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7008
+ // verify required parameter 'project' is not null or undefined
7009
+ assertParamExists('createReview', 'project', project)
7010
+ // verify required parameter 'platformId' is not null or undefined
7011
+ assertParamExists('createReview', 'platformId', platformId)
7012
+ // verify required parameter 'createReviewRequest' is not null or undefined
7013
+ assertParamExists('createReview', 'createReviewRequest', createReviewRequest)
7014
+ const localVarPath = `/v1/platform/{platformId}/reviews`
7015
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
7016
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7017
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7018
+ let baseOptions;
7019
+ if (configuration) {
7020
+ baseOptions = configuration.baseOptions;
7021
+ }
7022
+
7023
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
7024
+ const localVarHeaderParameter = {} as any;
7025
+ const localVarQueryParameter = {} as any;
7026
+
7027
+ // authentication session-oauth required
7028
+ // oauth required
7029
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
7030
+
7031
+ // authentication api-key required
7032
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
7033
+
7034
+ if (project !== undefined) {
7035
+ localVarQueryParameter['project'] = project;
7036
+ }
7037
+
7038
+ if (pageToken !== undefined) {
7039
+ localVarQueryParameter['pageToken'] = pageToken;
7040
+ }
7041
+
7042
+ if (pageSize !== undefined) {
7043
+ localVarQueryParameter['pageSize'] = pageSize;
7044
+ }
7045
+
7046
+ if (search !== undefined) {
7047
+ localVarQueryParameter['search'] = search;
7048
+ }
7049
+
7050
+ if (sortBy) {
7051
+ localVarQueryParameter['sortBy'] = sortBy;
7052
+ }
7053
+
7054
+ if (start !== undefined) {
7055
+ localVarQueryParameter['start'] = (start as any instanceof Date) ?
7056
+ (start as any).toISOString() :
7057
+ start;
7058
+ }
7059
+
7060
+ if (end !== undefined) {
7061
+ localVarQueryParameter['end'] = (end as any instanceof Date) ?
7062
+ (end as any).toISOString() :
7063
+ end;
7064
+ }
7065
+
7066
+
7067
+
7068
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7069
+
7070
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7071
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7072
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7073
+ localVarRequestOptions.data = serializeDataIfNeeded(createReviewRequest, localVarRequestOptions, configuration)
7074
+
7075
+ return {
7076
+ url: toPathString(localVarUrlObj),
7077
+ options: localVarRequestOptions,
7078
+ };
7079
+ },
6491
7080
  /**
6492
7081
  * Export reviews as a CSV file.
6493
7082
  * @summary Export reviews
@@ -6752,6 +7341,27 @@ export const ReviewsApiAxiosParamCreator = function (configuration?: Configurati
6752
7341
  export const ReviewsApiFp = function(configuration?: Configuration) {
6753
7342
  const localVarAxiosParamCreator = ReviewsApiAxiosParamCreator(configuration)
6754
7343
  return {
7344
+ /**
7345
+ *
7346
+ * @summary Create a review
7347
+ * @param {string} project Project unique identifier
7348
+ * @param {string} platformId The platform identifier
7349
+ * @param {CreateReviewRequest} createReviewRequest
7350
+ * @param {number} [pageToken] Page reference token
7351
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
7352
+ * @param {string} [search] Search term to filter results
7353
+ * @param {Array<string>} [sortBy] An array of fields to sort by, prefixed with a \&#39;-\&#39; for descending order or \&#39;+\&#39; for ascending. Default is ascending.
7354
+ * @param {string} [start] Start of date range to filter by
7355
+ * @param {string} [end] End of date range to filter by
7356
+ * @param {*} [options] Override http request option.
7357
+ * @throws {RequiredError}
7358
+ */
7359
+ async createReview(project: string, platformId: string, createReviewRequest: CreateReviewRequest, pageToken?: number, pageSize?: number, search?: string, sortBy?: Array<string>, start?: string, end?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateReview201Response>> {
7360
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createReview(project, platformId, createReviewRequest, pageToken, pageSize, search, sortBy, start, end, options);
7361
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7362
+ const localVarOperationServerBasePath = operationServerMap['ReviewsApi.createReview']?.[localVarOperationServerIndex]?.url;
7363
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7364
+ },
6755
7365
  /**
6756
7366
  * Export reviews as a CSV file.
6757
7367
  * @summary Export reviews
@@ -6829,6 +7439,16 @@ export const ReviewsApiFp = function(configuration?: Configuration) {
6829
7439
  export const ReviewsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
6830
7440
  const localVarFp = ReviewsApiFp(configuration)
6831
7441
  return {
7442
+ /**
7443
+ *
7444
+ * @summary Create a review
7445
+ * @param {ReviewsApiCreateReviewRequest} requestParameters Request parameters.
7446
+ * @param {*} [options] Override http request option.
7447
+ * @throws {RequiredError}
7448
+ */
7449
+ createReview(requestParameters: ReviewsApiCreateReviewRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateReview201Response> {
7450
+ return localVarFp.createReview(requestParameters.project, requestParameters.platformId, requestParameters.createReviewRequest, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.start, requestParameters.end, options).then((request) => request(axios, basePath));
7451
+ },
6832
7452
  /**
6833
7453
  * Export reviews as a CSV file.
6834
7454
  * @summary Export reviews
@@ -6872,6 +7492,76 @@ export const ReviewsApiFactory = function (configuration?: Configuration, basePa
6872
7492
  };
6873
7493
  };
6874
7494
 
7495
+ /**
7496
+ * Request parameters for createReview operation in ReviewsApi.
7497
+ * @export
7498
+ * @interface ReviewsApiCreateReviewRequest
7499
+ */
7500
+ export interface ReviewsApiCreateReviewRequest {
7501
+ /**
7502
+ * Project unique identifier
7503
+ * @type {string}
7504
+ * @memberof ReviewsApiCreateReview
7505
+ */
7506
+ readonly project: string
7507
+
7508
+ /**
7509
+ * The platform identifier
7510
+ * @type {string}
7511
+ * @memberof ReviewsApiCreateReview
7512
+ */
7513
+ readonly platformId: string
7514
+
7515
+ /**
7516
+ *
7517
+ * @type {CreateReviewRequest}
7518
+ * @memberof ReviewsApiCreateReview
7519
+ */
7520
+ readonly createReviewRequest: CreateReviewRequest
7521
+
7522
+ /**
7523
+ * Page reference token
7524
+ * @type {number}
7525
+ * @memberof ReviewsApiCreateReview
7526
+ */
7527
+ readonly pageToken?: number
7528
+
7529
+ /**
7530
+ * Max page size. This is the maximum page size that will be returned, but it might be smaller.
7531
+ * @type {number}
7532
+ * @memberof ReviewsApiCreateReview
7533
+ */
7534
+ readonly pageSize?: number
7535
+
7536
+ /**
7537
+ * Search term to filter results
7538
+ * @type {string}
7539
+ * @memberof ReviewsApiCreateReview
7540
+ */
7541
+ readonly search?: string
7542
+
7543
+ /**
7544
+ * An array of fields to sort by, prefixed with a \&#39;-\&#39; for descending order or \&#39;+\&#39; for ascending. Default is ascending.
7545
+ * @type {Array<string>}
7546
+ * @memberof ReviewsApiCreateReview
7547
+ */
7548
+ readonly sortBy?: Array<string>
7549
+
7550
+ /**
7551
+ * Start of date range to filter by
7552
+ * @type {string}
7553
+ * @memberof ReviewsApiCreateReview
7554
+ */
7555
+ readonly start?: string
7556
+
7557
+ /**
7558
+ * End of date range to filter by
7559
+ * @type {string}
7560
+ * @memberof ReviewsApiCreateReview
7561
+ */
7562
+ readonly end?: string
7563
+ }
7564
+
6875
7565
  /**
6876
7566
  * Request parameters for exportReviews operation in ReviewsApi.
6877
7567
  * @export
@@ -7040,6 +7730,18 @@ export interface ReviewsApiModerateReviewRequest {
7040
7730
  * @extends {BaseAPI}
7041
7731
  */
7042
7732
  export class ReviewsApi extends BaseAPI {
7733
+ /**
7734
+ *
7735
+ * @summary Create a review
7736
+ * @param {ReviewsApiCreateReviewRequest} requestParameters Request parameters.
7737
+ * @param {*} [options] Override http request option.
7738
+ * @throws {RequiredError}
7739
+ * @memberof ReviewsApi
7740
+ */
7741
+ public createReview(requestParameters: ReviewsApiCreateReviewRequest, options?: RawAxiosRequestConfig) {
7742
+ return ReviewsApiFp(this.configuration).createReview(requestParameters.project, requestParameters.platformId, requestParameters.createReviewRequest, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.start, requestParameters.end, options).then((request) => request(this.axios, this.basePath));
7743
+ }
7744
+
7043
7745
  /**
7044
7746
  * Export reviews as a CSV file.
7045
7747
  * @summary Export reviews