@infisale-client/api 1.2.13 → 1.2.16
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/dist/api/api.d.ts +712 -86
- package/dist/api/api.js +304 -4
- package/dist/api/api.mjs +297 -1
- package/package.json +2 -2
package/dist/api/api.js
CHANGED
|
@@ -16,9 +16,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.ThemeApi = exports.ThemeApiFactory = void 0;
|
|
19
|
+
exports.BrandApiFp = exports.BrandApiAxiosParamCreator = exports.BasketApi = exports.BasketApiFactory = exports.BasketApiFp = exports.BasketApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.AddressApi = exports.AddressApiFactory = exports.AddressApiFp = exports.AddressApiAxiosParamCreator = exports.UserStatusEnum = exports.UserRoleEnum = exports.TimezoneEnum = exports.ThemeTypeEnum = exports.TemplateTypeEnum = exports.SitemapTypeEnum = exports.ProductDetailImageZoomTypeEnum = exports.PlanTypeEnum = exports.PlanStatusEnum = exports.PlanCurrencyEnum = exports.PaymentMethodEnum = exports.PageTypeEnum = exports.OrderStatusEnum = exports.OrderEnum = exports.OperationStatusEnum = exports.NotificationStatusEnum = exports.NotificationMessageEnum = exports.NavigationUrlTargetEnum = exports.LanguageEnum = exports.FontSizeEnum = exports.FileTypeEnum = exports.FileStatusEnum = exports.FileKeywordEnum = exports.EmailConfigDnsRecordTypeEnum = exports.CurrencyRateTypeEnum = exports.CurrencyEnum = exports.CountryEnum = exports.ContentStatusEnum = exports.ComponentTypeEnum = exports.ComponentProductTypeEnum = exports.ComponentProductOrderEnum = exports.ComponentProductListTypeEnum = exports.ComponentContentTypeEnum = exports.CompanyUserStatusEnum = exports.CompanyTypeEnum = exports.CompanyStatusEnum = void 0;
|
|
20
|
+
exports.SitemapApi = exports.SitemapApiFactory = exports.SitemapApiFp = exports.SitemapApiAxiosParamCreator = exports.ProductApi = exports.ProductApiFactory = exports.ProductApiFp = exports.ProductApiAxiosParamCreator = exports.PlanApi = exports.PlanApiFactory = exports.PlanApiFp = exports.PlanApiAxiosParamCreator = exports.PageApi = exports.PageApiFactory = exports.PageApiFp = exports.PageApiAxiosParamCreator = exports.OrderApi = exports.OrderApiFactory = exports.OrderApiFp = exports.OrderApiAxiosParamCreator = exports.OperationApi = exports.OperationApiFactory = exports.OperationApiFp = exports.OperationApiAxiosParamCreator = exports.NotificationApi = exports.NotificationApiFactory = exports.NotificationApiFp = exports.NotificationApiAxiosParamCreator = exports.FileApi = exports.FileApiFactory = exports.FileApiFp = exports.FileApiAxiosParamCreator = exports.ContactFormApi = exports.ContactFormApiFactory = exports.ContactFormApiFp = exports.ContactFormApiAxiosParamCreator = exports.CompanyApi = exports.CompanyApiFactory = exports.CompanyApiFp = exports.CompanyApiAxiosParamCreator = exports.CollectionApi = exports.CollectionApiFactory = exports.CollectionApiFp = exports.CollectionApiAxiosParamCreator = exports.CategoryApi = exports.CategoryApiFactory = exports.CategoryApiFp = exports.CategoryApiAxiosParamCreator = exports.BrandApi = exports.BrandApiFactory = void 0;
|
|
21
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.ThemeApi = exports.ThemeApiFactory = exports.ThemeApiFp = exports.ThemeApiAxiosParamCreator = exports.TemplateApi = exports.TemplateApiFactory = exports.TemplateApiFp = exports.TemplateApiAxiosParamCreator = void 0;
|
|
22
22
|
const axios_1 = __importDefault(require("axios"));
|
|
23
23
|
// Some imports not used depending on template conditions
|
|
24
24
|
// @ts-ignore
|
|
@@ -133,7 +133,9 @@ exports.ComponentTypeEnum = {
|
|
|
133
133
|
FOOTER: 'footer',
|
|
134
134
|
EMAIL_SIGNUP: 'email-signup',
|
|
135
135
|
CONTACT_FORM: 'contact-form',
|
|
136
|
-
|
|
136
|
+
CART_DETAIL: 'cart-detail',
|
|
137
|
+
CHECKOUT_DETAIL: 'checkout-detail',
|
|
138
|
+
NOT_FOUND_DETAIL: 'not-found-detail'
|
|
137
139
|
};
|
|
138
140
|
/**
|
|
139
141
|
*
|
|
@@ -531,6 +533,18 @@ exports.OrderEnum = {
|
|
|
531
533
|
ASC: 'asc',
|
|
532
534
|
DESC: 'desc'
|
|
533
535
|
};
|
|
536
|
+
/**
|
|
537
|
+
*
|
|
538
|
+
* @export
|
|
539
|
+
* @enum {string}
|
|
540
|
+
*/
|
|
541
|
+
exports.OrderStatusEnum = {
|
|
542
|
+
WAITING_PAYMENT: 'waiting_payment',
|
|
543
|
+
PAID: 'paid',
|
|
544
|
+
CANCELED: 'canceled',
|
|
545
|
+
DELIVERED: 'delivered',
|
|
546
|
+
COMPLETED: 'completed'
|
|
547
|
+
};
|
|
534
548
|
/**
|
|
535
549
|
*
|
|
536
550
|
* @export
|
|
@@ -544,6 +558,17 @@ exports.PageTypeEnum = {
|
|
|
544
558
|
CHECKOUT: 'checkout',
|
|
545
559
|
NOT_FOUND: 'not-found'
|
|
546
560
|
};
|
|
561
|
+
/**
|
|
562
|
+
*
|
|
563
|
+
* @export
|
|
564
|
+
* @enum {string}
|
|
565
|
+
*/
|
|
566
|
+
exports.PaymentMethodEnum = {
|
|
567
|
+
CREDIT_CARD: 'credit_card',
|
|
568
|
+
BANK_TRANSFER: 'bank_transfer',
|
|
569
|
+
CASH_ON_DELIVERY: 'cash_on_delivery',
|
|
570
|
+
CARD_ON_DELIVERY: 'card_on_delivery'
|
|
571
|
+
};
|
|
547
572
|
/**
|
|
548
573
|
*
|
|
549
574
|
* @export
|
|
@@ -6351,6 +6376,281 @@ class OperationApi extends base_1.BaseAPI {
|
|
|
6351
6376
|
}
|
|
6352
6377
|
}
|
|
6353
6378
|
exports.OperationApi = OperationApi;
|
|
6379
|
+
/**
|
|
6380
|
+
* OrderApi - axios parameter creator
|
|
6381
|
+
* @export
|
|
6382
|
+
*/
|
|
6383
|
+
const OrderApiAxiosParamCreator = function (configuration) {
|
|
6384
|
+
return {
|
|
6385
|
+
/**
|
|
6386
|
+
*
|
|
6387
|
+
* @param {IOrderPostRequest} iOrderPostRequest
|
|
6388
|
+
* @param {*} [options] Override http request option.
|
|
6389
|
+
* @throws {RequiredError}
|
|
6390
|
+
*/
|
|
6391
|
+
createOrder: async (iOrderPostRequest, options = {}) => {
|
|
6392
|
+
// verify required parameter 'iOrderPostRequest' is not null or undefined
|
|
6393
|
+
(0, common_1.assertParamExists)('createOrder', 'iOrderPostRequest', iOrderPostRequest);
|
|
6394
|
+
const localVarPath = `/api/orders`;
|
|
6395
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6396
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
6397
|
+
let baseOptions;
|
|
6398
|
+
if (configuration) {
|
|
6399
|
+
baseOptions = configuration.baseOptions;
|
|
6400
|
+
}
|
|
6401
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
6402
|
+
const localVarHeaderParameter = {};
|
|
6403
|
+
const localVarQueryParameter = {};
|
|
6404
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
6405
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
6406
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6407
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
6408
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(iOrderPostRequest, localVarRequestOptions, configuration);
|
|
6409
|
+
return {
|
|
6410
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
6411
|
+
options: localVarRequestOptions,
|
|
6412
|
+
};
|
|
6413
|
+
},
|
|
6414
|
+
/**
|
|
6415
|
+
*
|
|
6416
|
+
* @param {string} id
|
|
6417
|
+
* @param {*} [options] Override http request option.
|
|
6418
|
+
* @throws {RequiredError}
|
|
6419
|
+
*/
|
|
6420
|
+
getOrderById: async (id, options = {}) => {
|
|
6421
|
+
// verify required parameter 'id' is not null or undefined
|
|
6422
|
+
(0, common_1.assertParamExists)('getOrderById', 'id', id);
|
|
6423
|
+
const localVarPath = `/api/orders/{id}`
|
|
6424
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
6425
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6426
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
6427
|
+
let baseOptions;
|
|
6428
|
+
if (configuration) {
|
|
6429
|
+
baseOptions = configuration.baseOptions;
|
|
6430
|
+
}
|
|
6431
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
6432
|
+
const localVarHeaderParameter = {};
|
|
6433
|
+
const localVarQueryParameter = {};
|
|
6434
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
6435
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6436
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
6437
|
+
return {
|
|
6438
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
6439
|
+
options: localVarRequestOptions,
|
|
6440
|
+
};
|
|
6441
|
+
},
|
|
6442
|
+
/**
|
|
6443
|
+
*
|
|
6444
|
+
* @param {number} [page]
|
|
6445
|
+
* @param {number} [itemsPerPage]
|
|
6446
|
+
* @param {string} [search]
|
|
6447
|
+
* @param {string} [startDate]
|
|
6448
|
+
* @param {string} [endDate]
|
|
6449
|
+
* @param {string} [dateField]
|
|
6450
|
+
* @param {OrderEnum} [order]
|
|
6451
|
+
* @param {string} [sort]
|
|
6452
|
+
* @param {string} [companyId]
|
|
6453
|
+
* @param {string} [domain]
|
|
6454
|
+
* @param {string} [userId]
|
|
6455
|
+
* @param {OrderStatusEnum} [status]
|
|
6456
|
+
* @param {*} [options] Override http request option.
|
|
6457
|
+
* @throws {RequiredError}
|
|
6458
|
+
*/
|
|
6459
|
+
getOrders: async (page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options = {}) => {
|
|
6460
|
+
const localVarPath = `/api/orders`;
|
|
6461
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6462
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
6463
|
+
let baseOptions;
|
|
6464
|
+
if (configuration) {
|
|
6465
|
+
baseOptions = configuration.baseOptions;
|
|
6466
|
+
}
|
|
6467
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
6468
|
+
const localVarHeaderParameter = {};
|
|
6469
|
+
const localVarQueryParameter = {};
|
|
6470
|
+
if (page !== undefined) {
|
|
6471
|
+
localVarQueryParameter['page'] = page;
|
|
6472
|
+
}
|
|
6473
|
+
if (itemsPerPage !== undefined) {
|
|
6474
|
+
localVarQueryParameter['itemsPerPage'] = itemsPerPage;
|
|
6475
|
+
}
|
|
6476
|
+
if (search !== undefined) {
|
|
6477
|
+
localVarQueryParameter['search'] = search;
|
|
6478
|
+
}
|
|
6479
|
+
if (startDate !== undefined) {
|
|
6480
|
+
localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
|
|
6481
|
+
startDate.toISOString() :
|
|
6482
|
+
startDate;
|
|
6483
|
+
}
|
|
6484
|
+
if (endDate !== undefined) {
|
|
6485
|
+
localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
|
|
6486
|
+
endDate.toISOString() :
|
|
6487
|
+
endDate;
|
|
6488
|
+
}
|
|
6489
|
+
if (dateField !== undefined) {
|
|
6490
|
+
localVarQueryParameter['dateField'] = dateField;
|
|
6491
|
+
}
|
|
6492
|
+
if (order !== undefined) {
|
|
6493
|
+
localVarQueryParameter['order'] = order;
|
|
6494
|
+
}
|
|
6495
|
+
if (sort !== undefined) {
|
|
6496
|
+
localVarQueryParameter['sort'] = sort;
|
|
6497
|
+
}
|
|
6498
|
+
if (companyId !== undefined) {
|
|
6499
|
+
localVarQueryParameter['companyId'] = companyId;
|
|
6500
|
+
}
|
|
6501
|
+
if (domain !== undefined) {
|
|
6502
|
+
localVarQueryParameter['domain'] = domain;
|
|
6503
|
+
}
|
|
6504
|
+
if (userId !== undefined) {
|
|
6505
|
+
localVarQueryParameter['userId'] = userId;
|
|
6506
|
+
}
|
|
6507
|
+
if (status !== undefined) {
|
|
6508
|
+
localVarQueryParameter['status'] = status;
|
|
6509
|
+
}
|
|
6510
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
6511
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6512
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
6513
|
+
return {
|
|
6514
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
6515
|
+
options: localVarRequestOptions,
|
|
6516
|
+
};
|
|
6517
|
+
},
|
|
6518
|
+
};
|
|
6519
|
+
};
|
|
6520
|
+
exports.OrderApiAxiosParamCreator = OrderApiAxiosParamCreator;
|
|
6521
|
+
/**
|
|
6522
|
+
* OrderApi - functional programming interface
|
|
6523
|
+
* @export
|
|
6524
|
+
*/
|
|
6525
|
+
const OrderApiFp = function (configuration) {
|
|
6526
|
+
const localVarAxiosParamCreator = (0, exports.OrderApiAxiosParamCreator)(configuration);
|
|
6527
|
+
return {
|
|
6528
|
+
/**
|
|
6529
|
+
*
|
|
6530
|
+
* @param {IOrderPostRequest} iOrderPostRequest
|
|
6531
|
+
* @param {*} [options] Override http request option.
|
|
6532
|
+
* @throws {RequiredError}
|
|
6533
|
+
*/
|
|
6534
|
+
async createOrder(iOrderPostRequest, options) {
|
|
6535
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createOrder(iOrderPostRequest, options);
|
|
6536
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6537
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.createOrder']?.[localVarOperationServerIndex]?.url;
|
|
6538
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6539
|
+
},
|
|
6540
|
+
/**
|
|
6541
|
+
*
|
|
6542
|
+
* @param {string} id
|
|
6543
|
+
* @param {*} [options] Override http request option.
|
|
6544
|
+
* @throws {RequiredError}
|
|
6545
|
+
*/
|
|
6546
|
+
async getOrderById(id, options) {
|
|
6547
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(id, options);
|
|
6548
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6549
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.getOrderById']?.[localVarOperationServerIndex]?.url;
|
|
6550
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6551
|
+
},
|
|
6552
|
+
/**
|
|
6553
|
+
*
|
|
6554
|
+
* @param {number} [page]
|
|
6555
|
+
* @param {number} [itemsPerPage]
|
|
6556
|
+
* @param {string} [search]
|
|
6557
|
+
* @param {string} [startDate]
|
|
6558
|
+
* @param {string} [endDate]
|
|
6559
|
+
* @param {string} [dateField]
|
|
6560
|
+
* @param {OrderEnum} [order]
|
|
6561
|
+
* @param {string} [sort]
|
|
6562
|
+
* @param {string} [companyId]
|
|
6563
|
+
* @param {string} [domain]
|
|
6564
|
+
* @param {string} [userId]
|
|
6565
|
+
* @param {OrderStatusEnum} [status]
|
|
6566
|
+
* @param {*} [options] Override http request option.
|
|
6567
|
+
* @throws {RequiredError}
|
|
6568
|
+
*/
|
|
6569
|
+
async getOrders(page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options) {
|
|
6570
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrders(page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options);
|
|
6571
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6572
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.getOrders']?.[localVarOperationServerIndex]?.url;
|
|
6573
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6574
|
+
},
|
|
6575
|
+
};
|
|
6576
|
+
};
|
|
6577
|
+
exports.OrderApiFp = OrderApiFp;
|
|
6578
|
+
/**
|
|
6579
|
+
* OrderApi - factory interface
|
|
6580
|
+
* @export
|
|
6581
|
+
*/
|
|
6582
|
+
const OrderApiFactory = function (configuration, basePath, axios) {
|
|
6583
|
+
const localVarFp = (0, exports.OrderApiFp)(configuration);
|
|
6584
|
+
return {
|
|
6585
|
+
/**
|
|
6586
|
+
*
|
|
6587
|
+
* @param {OrderApiCreateOrderRequest} requestParameters Request parameters.
|
|
6588
|
+
* @param {*} [options] Override http request option.
|
|
6589
|
+
* @throws {RequiredError}
|
|
6590
|
+
*/
|
|
6591
|
+
createOrder(requestParameters, options) {
|
|
6592
|
+
return localVarFp.createOrder(requestParameters.iOrderPostRequest, options).then((request) => request(axios, basePath));
|
|
6593
|
+
},
|
|
6594
|
+
/**
|
|
6595
|
+
*
|
|
6596
|
+
* @param {OrderApiGetOrderByIdRequest} requestParameters Request parameters.
|
|
6597
|
+
* @param {*} [options] Override http request option.
|
|
6598
|
+
* @throws {RequiredError}
|
|
6599
|
+
*/
|
|
6600
|
+
getOrderById(requestParameters, options) {
|
|
6601
|
+
return localVarFp.getOrderById(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
6602
|
+
},
|
|
6603
|
+
/**
|
|
6604
|
+
*
|
|
6605
|
+
* @param {OrderApiGetOrdersRequest} requestParameters Request parameters.
|
|
6606
|
+
* @param {*} [options] Override http request option.
|
|
6607
|
+
* @throws {RequiredError}
|
|
6608
|
+
*/
|
|
6609
|
+
getOrders(requestParameters = {}, options) {
|
|
6610
|
+
return localVarFp.getOrders(requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.sort, requestParameters.companyId, requestParameters.domain, requestParameters.userId, requestParameters.status, options).then((request) => request(axios, basePath));
|
|
6611
|
+
},
|
|
6612
|
+
};
|
|
6613
|
+
};
|
|
6614
|
+
exports.OrderApiFactory = OrderApiFactory;
|
|
6615
|
+
/**
|
|
6616
|
+
* OrderApi - object-oriented interface
|
|
6617
|
+
* @export
|
|
6618
|
+
* @class OrderApi
|
|
6619
|
+
* @extends {BaseAPI}
|
|
6620
|
+
*/
|
|
6621
|
+
class OrderApi extends base_1.BaseAPI {
|
|
6622
|
+
/**
|
|
6623
|
+
*
|
|
6624
|
+
* @param {OrderApiCreateOrderRequest} requestParameters Request parameters.
|
|
6625
|
+
* @param {*} [options] Override http request option.
|
|
6626
|
+
* @throws {RequiredError}
|
|
6627
|
+
* @memberof OrderApi
|
|
6628
|
+
*/
|
|
6629
|
+
createOrder(requestParameters, options) {
|
|
6630
|
+
return (0, exports.OrderApiFp)(this.configuration).createOrder(requestParameters.iOrderPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
6631
|
+
}
|
|
6632
|
+
/**
|
|
6633
|
+
*
|
|
6634
|
+
* @param {OrderApiGetOrderByIdRequest} requestParameters Request parameters.
|
|
6635
|
+
* @param {*} [options] Override http request option.
|
|
6636
|
+
* @throws {RequiredError}
|
|
6637
|
+
* @memberof OrderApi
|
|
6638
|
+
*/
|
|
6639
|
+
getOrderById(requestParameters, options) {
|
|
6640
|
+
return (0, exports.OrderApiFp)(this.configuration).getOrderById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
6641
|
+
}
|
|
6642
|
+
/**
|
|
6643
|
+
*
|
|
6644
|
+
* @param {OrderApiGetOrdersRequest} requestParameters Request parameters.
|
|
6645
|
+
* @param {*} [options] Override http request option.
|
|
6646
|
+
* @throws {RequiredError}
|
|
6647
|
+
* @memberof OrderApi
|
|
6648
|
+
*/
|
|
6649
|
+
getOrders(requestParameters = {}, options) {
|
|
6650
|
+
return (0, exports.OrderApiFp)(this.configuration).getOrders(requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.sort, requestParameters.companyId, requestParameters.domain, requestParameters.userId, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
|
|
6651
|
+
}
|
|
6652
|
+
}
|
|
6653
|
+
exports.OrderApi = OrderApi;
|
|
6354
6654
|
/**
|
|
6355
6655
|
* PageApi - axios parameter creator
|
|
6356
6656
|
* @export
|
package/dist/api/api.mjs
CHANGED
|
@@ -122,7 +122,9 @@ export const ComponentTypeEnum = {
|
|
|
122
122
|
FOOTER: 'footer',
|
|
123
123
|
EMAIL_SIGNUP: 'email-signup',
|
|
124
124
|
CONTACT_FORM: 'contact-form',
|
|
125
|
-
|
|
125
|
+
CART_DETAIL: 'cart-detail',
|
|
126
|
+
CHECKOUT_DETAIL: 'checkout-detail',
|
|
127
|
+
NOT_FOUND_DETAIL: 'not-found-detail'
|
|
126
128
|
};
|
|
127
129
|
/**
|
|
128
130
|
*
|
|
@@ -520,6 +522,18 @@ export const OrderEnum = {
|
|
|
520
522
|
ASC: 'asc',
|
|
521
523
|
DESC: 'desc'
|
|
522
524
|
};
|
|
525
|
+
/**
|
|
526
|
+
*
|
|
527
|
+
* @export
|
|
528
|
+
* @enum {string}
|
|
529
|
+
*/
|
|
530
|
+
export const OrderStatusEnum = {
|
|
531
|
+
WAITING_PAYMENT: 'waiting_payment',
|
|
532
|
+
PAID: 'paid',
|
|
533
|
+
CANCELED: 'canceled',
|
|
534
|
+
DELIVERED: 'delivered',
|
|
535
|
+
COMPLETED: 'completed'
|
|
536
|
+
};
|
|
523
537
|
/**
|
|
524
538
|
*
|
|
525
539
|
* @export
|
|
@@ -533,6 +547,17 @@ export const PageTypeEnum = {
|
|
|
533
547
|
CHECKOUT: 'checkout',
|
|
534
548
|
NOT_FOUND: 'not-found'
|
|
535
549
|
};
|
|
550
|
+
/**
|
|
551
|
+
*
|
|
552
|
+
* @export
|
|
553
|
+
* @enum {string}
|
|
554
|
+
*/
|
|
555
|
+
export const PaymentMethodEnum = {
|
|
556
|
+
CREDIT_CARD: 'credit_card',
|
|
557
|
+
BANK_TRANSFER: 'bank_transfer',
|
|
558
|
+
CASH_ON_DELIVERY: 'cash_on_delivery',
|
|
559
|
+
CARD_ON_DELIVERY: 'card_on_delivery'
|
|
560
|
+
};
|
|
536
561
|
/**
|
|
537
562
|
*
|
|
538
563
|
* @export
|
|
@@ -6296,6 +6321,277 @@ export class OperationApi extends BaseAPI {
|
|
|
6296
6321
|
return OperationApiFp(this.configuration).updateOperation(requestParameters.id, requestParameters.iOperationPatchRequest, options).then((request) => request(this.axios, this.basePath));
|
|
6297
6322
|
}
|
|
6298
6323
|
}
|
|
6324
|
+
/**
|
|
6325
|
+
* OrderApi - axios parameter creator
|
|
6326
|
+
* @export
|
|
6327
|
+
*/
|
|
6328
|
+
export const OrderApiAxiosParamCreator = function (configuration) {
|
|
6329
|
+
return {
|
|
6330
|
+
/**
|
|
6331
|
+
*
|
|
6332
|
+
* @param {IOrderPostRequest} iOrderPostRequest
|
|
6333
|
+
* @param {*} [options] Override http request option.
|
|
6334
|
+
* @throws {RequiredError}
|
|
6335
|
+
*/
|
|
6336
|
+
createOrder: async (iOrderPostRequest, options = {}) => {
|
|
6337
|
+
// verify required parameter 'iOrderPostRequest' is not null or undefined
|
|
6338
|
+
assertParamExists('createOrder', 'iOrderPostRequest', iOrderPostRequest);
|
|
6339
|
+
const localVarPath = `/api/orders`;
|
|
6340
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6341
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
6342
|
+
let baseOptions;
|
|
6343
|
+
if (configuration) {
|
|
6344
|
+
baseOptions = configuration.baseOptions;
|
|
6345
|
+
}
|
|
6346
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
6347
|
+
const localVarHeaderParameter = {};
|
|
6348
|
+
const localVarQueryParameter = {};
|
|
6349
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
6350
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6351
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6352
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
6353
|
+
localVarRequestOptions.data = serializeDataIfNeeded(iOrderPostRequest, localVarRequestOptions, configuration);
|
|
6354
|
+
return {
|
|
6355
|
+
url: toPathString(localVarUrlObj),
|
|
6356
|
+
options: localVarRequestOptions,
|
|
6357
|
+
};
|
|
6358
|
+
},
|
|
6359
|
+
/**
|
|
6360
|
+
*
|
|
6361
|
+
* @param {string} id
|
|
6362
|
+
* @param {*} [options] Override http request option.
|
|
6363
|
+
* @throws {RequiredError}
|
|
6364
|
+
*/
|
|
6365
|
+
getOrderById: async (id, options = {}) => {
|
|
6366
|
+
// verify required parameter 'id' is not null or undefined
|
|
6367
|
+
assertParamExists('getOrderById', 'id', id);
|
|
6368
|
+
const localVarPath = `/api/orders/{id}`
|
|
6369
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
6370
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6371
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
6372
|
+
let baseOptions;
|
|
6373
|
+
if (configuration) {
|
|
6374
|
+
baseOptions = configuration.baseOptions;
|
|
6375
|
+
}
|
|
6376
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
6377
|
+
const localVarHeaderParameter = {};
|
|
6378
|
+
const localVarQueryParameter = {};
|
|
6379
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6380
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6381
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
6382
|
+
return {
|
|
6383
|
+
url: toPathString(localVarUrlObj),
|
|
6384
|
+
options: localVarRequestOptions,
|
|
6385
|
+
};
|
|
6386
|
+
},
|
|
6387
|
+
/**
|
|
6388
|
+
*
|
|
6389
|
+
* @param {number} [page]
|
|
6390
|
+
* @param {number} [itemsPerPage]
|
|
6391
|
+
* @param {string} [search]
|
|
6392
|
+
* @param {string} [startDate]
|
|
6393
|
+
* @param {string} [endDate]
|
|
6394
|
+
* @param {string} [dateField]
|
|
6395
|
+
* @param {OrderEnum} [order]
|
|
6396
|
+
* @param {string} [sort]
|
|
6397
|
+
* @param {string} [companyId]
|
|
6398
|
+
* @param {string} [domain]
|
|
6399
|
+
* @param {string} [userId]
|
|
6400
|
+
* @param {OrderStatusEnum} [status]
|
|
6401
|
+
* @param {*} [options] Override http request option.
|
|
6402
|
+
* @throws {RequiredError}
|
|
6403
|
+
*/
|
|
6404
|
+
getOrders: async (page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options = {}) => {
|
|
6405
|
+
const localVarPath = `/api/orders`;
|
|
6406
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6407
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
6408
|
+
let baseOptions;
|
|
6409
|
+
if (configuration) {
|
|
6410
|
+
baseOptions = configuration.baseOptions;
|
|
6411
|
+
}
|
|
6412
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
6413
|
+
const localVarHeaderParameter = {};
|
|
6414
|
+
const localVarQueryParameter = {};
|
|
6415
|
+
if (page !== undefined) {
|
|
6416
|
+
localVarQueryParameter['page'] = page;
|
|
6417
|
+
}
|
|
6418
|
+
if (itemsPerPage !== undefined) {
|
|
6419
|
+
localVarQueryParameter['itemsPerPage'] = itemsPerPage;
|
|
6420
|
+
}
|
|
6421
|
+
if (search !== undefined) {
|
|
6422
|
+
localVarQueryParameter['search'] = search;
|
|
6423
|
+
}
|
|
6424
|
+
if (startDate !== undefined) {
|
|
6425
|
+
localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
|
|
6426
|
+
startDate.toISOString() :
|
|
6427
|
+
startDate;
|
|
6428
|
+
}
|
|
6429
|
+
if (endDate !== undefined) {
|
|
6430
|
+
localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
|
|
6431
|
+
endDate.toISOString() :
|
|
6432
|
+
endDate;
|
|
6433
|
+
}
|
|
6434
|
+
if (dateField !== undefined) {
|
|
6435
|
+
localVarQueryParameter['dateField'] = dateField;
|
|
6436
|
+
}
|
|
6437
|
+
if (order !== undefined) {
|
|
6438
|
+
localVarQueryParameter['order'] = order;
|
|
6439
|
+
}
|
|
6440
|
+
if (sort !== undefined) {
|
|
6441
|
+
localVarQueryParameter['sort'] = sort;
|
|
6442
|
+
}
|
|
6443
|
+
if (companyId !== undefined) {
|
|
6444
|
+
localVarQueryParameter['companyId'] = companyId;
|
|
6445
|
+
}
|
|
6446
|
+
if (domain !== undefined) {
|
|
6447
|
+
localVarQueryParameter['domain'] = domain;
|
|
6448
|
+
}
|
|
6449
|
+
if (userId !== undefined) {
|
|
6450
|
+
localVarQueryParameter['userId'] = userId;
|
|
6451
|
+
}
|
|
6452
|
+
if (status !== undefined) {
|
|
6453
|
+
localVarQueryParameter['status'] = status;
|
|
6454
|
+
}
|
|
6455
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6456
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6457
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
6458
|
+
return {
|
|
6459
|
+
url: toPathString(localVarUrlObj),
|
|
6460
|
+
options: localVarRequestOptions,
|
|
6461
|
+
};
|
|
6462
|
+
},
|
|
6463
|
+
};
|
|
6464
|
+
};
|
|
6465
|
+
/**
|
|
6466
|
+
* OrderApi - functional programming interface
|
|
6467
|
+
* @export
|
|
6468
|
+
*/
|
|
6469
|
+
export const OrderApiFp = function (configuration) {
|
|
6470
|
+
const localVarAxiosParamCreator = OrderApiAxiosParamCreator(configuration);
|
|
6471
|
+
return {
|
|
6472
|
+
/**
|
|
6473
|
+
*
|
|
6474
|
+
* @param {IOrderPostRequest} iOrderPostRequest
|
|
6475
|
+
* @param {*} [options] Override http request option.
|
|
6476
|
+
* @throws {RequiredError}
|
|
6477
|
+
*/
|
|
6478
|
+
async createOrder(iOrderPostRequest, options) {
|
|
6479
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createOrder(iOrderPostRequest, options);
|
|
6480
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6481
|
+
const localVarOperationServerBasePath = operationServerMap['OrderApi.createOrder']?.[localVarOperationServerIndex]?.url;
|
|
6482
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6483
|
+
},
|
|
6484
|
+
/**
|
|
6485
|
+
*
|
|
6486
|
+
* @param {string} id
|
|
6487
|
+
* @param {*} [options] Override http request option.
|
|
6488
|
+
* @throws {RequiredError}
|
|
6489
|
+
*/
|
|
6490
|
+
async getOrderById(id, options) {
|
|
6491
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(id, options);
|
|
6492
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6493
|
+
const localVarOperationServerBasePath = operationServerMap['OrderApi.getOrderById']?.[localVarOperationServerIndex]?.url;
|
|
6494
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6495
|
+
},
|
|
6496
|
+
/**
|
|
6497
|
+
*
|
|
6498
|
+
* @param {number} [page]
|
|
6499
|
+
* @param {number} [itemsPerPage]
|
|
6500
|
+
* @param {string} [search]
|
|
6501
|
+
* @param {string} [startDate]
|
|
6502
|
+
* @param {string} [endDate]
|
|
6503
|
+
* @param {string} [dateField]
|
|
6504
|
+
* @param {OrderEnum} [order]
|
|
6505
|
+
* @param {string} [sort]
|
|
6506
|
+
* @param {string} [companyId]
|
|
6507
|
+
* @param {string} [domain]
|
|
6508
|
+
* @param {string} [userId]
|
|
6509
|
+
* @param {OrderStatusEnum} [status]
|
|
6510
|
+
* @param {*} [options] Override http request option.
|
|
6511
|
+
* @throws {RequiredError}
|
|
6512
|
+
*/
|
|
6513
|
+
async getOrders(page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options) {
|
|
6514
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrders(page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options);
|
|
6515
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6516
|
+
const localVarOperationServerBasePath = operationServerMap['OrderApi.getOrders']?.[localVarOperationServerIndex]?.url;
|
|
6517
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6518
|
+
},
|
|
6519
|
+
};
|
|
6520
|
+
};
|
|
6521
|
+
/**
|
|
6522
|
+
* OrderApi - factory interface
|
|
6523
|
+
* @export
|
|
6524
|
+
*/
|
|
6525
|
+
export const OrderApiFactory = function (configuration, basePath, axios) {
|
|
6526
|
+
const localVarFp = OrderApiFp(configuration);
|
|
6527
|
+
return {
|
|
6528
|
+
/**
|
|
6529
|
+
*
|
|
6530
|
+
* @param {OrderApiCreateOrderRequest} requestParameters Request parameters.
|
|
6531
|
+
* @param {*} [options] Override http request option.
|
|
6532
|
+
* @throws {RequiredError}
|
|
6533
|
+
*/
|
|
6534
|
+
createOrder(requestParameters, options) {
|
|
6535
|
+
return localVarFp.createOrder(requestParameters.iOrderPostRequest, options).then((request) => request(axios, basePath));
|
|
6536
|
+
},
|
|
6537
|
+
/**
|
|
6538
|
+
*
|
|
6539
|
+
* @param {OrderApiGetOrderByIdRequest} requestParameters Request parameters.
|
|
6540
|
+
* @param {*} [options] Override http request option.
|
|
6541
|
+
* @throws {RequiredError}
|
|
6542
|
+
*/
|
|
6543
|
+
getOrderById(requestParameters, options) {
|
|
6544
|
+
return localVarFp.getOrderById(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
6545
|
+
},
|
|
6546
|
+
/**
|
|
6547
|
+
*
|
|
6548
|
+
* @param {OrderApiGetOrdersRequest} requestParameters Request parameters.
|
|
6549
|
+
* @param {*} [options] Override http request option.
|
|
6550
|
+
* @throws {RequiredError}
|
|
6551
|
+
*/
|
|
6552
|
+
getOrders(requestParameters = {}, options) {
|
|
6553
|
+
return localVarFp.getOrders(requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.sort, requestParameters.companyId, requestParameters.domain, requestParameters.userId, requestParameters.status, options).then((request) => request(axios, basePath));
|
|
6554
|
+
},
|
|
6555
|
+
};
|
|
6556
|
+
};
|
|
6557
|
+
/**
|
|
6558
|
+
* OrderApi - object-oriented interface
|
|
6559
|
+
* @export
|
|
6560
|
+
* @class OrderApi
|
|
6561
|
+
* @extends {BaseAPI}
|
|
6562
|
+
*/
|
|
6563
|
+
export class OrderApi extends BaseAPI {
|
|
6564
|
+
/**
|
|
6565
|
+
*
|
|
6566
|
+
* @param {OrderApiCreateOrderRequest} requestParameters Request parameters.
|
|
6567
|
+
* @param {*} [options] Override http request option.
|
|
6568
|
+
* @throws {RequiredError}
|
|
6569
|
+
* @memberof OrderApi
|
|
6570
|
+
*/
|
|
6571
|
+
createOrder(requestParameters, options) {
|
|
6572
|
+
return OrderApiFp(this.configuration).createOrder(requestParameters.iOrderPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
6573
|
+
}
|
|
6574
|
+
/**
|
|
6575
|
+
*
|
|
6576
|
+
* @param {OrderApiGetOrderByIdRequest} requestParameters Request parameters.
|
|
6577
|
+
* @param {*} [options] Override http request option.
|
|
6578
|
+
* @throws {RequiredError}
|
|
6579
|
+
* @memberof OrderApi
|
|
6580
|
+
*/
|
|
6581
|
+
getOrderById(requestParameters, options) {
|
|
6582
|
+
return OrderApiFp(this.configuration).getOrderById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
6583
|
+
}
|
|
6584
|
+
/**
|
|
6585
|
+
*
|
|
6586
|
+
* @param {OrderApiGetOrdersRequest} requestParameters Request parameters.
|
|
6587
|
+
* @param {*} [options] Override http request option.
|
|
6588
|
+
* @throws {RequiredError}
|
|
6589
|
+
* @memberof OrderApi
|
|
6590
|
+
*/
|
|
6591
|
+
getOrders(requestParameters = {}, options) {
|
|
6592
|
+
return OrderApiFp(this.configuration).getOrders(requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.sort, requestParameters.companyId, requestParameters.domain, requestParameters.userId, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
|
|
6593
|
+
}
|
|
6594
|
+
}
|
|
6299
6595
|
/**
|
|
6300
6596
|
* PageApi - axios parameter creator
|
|
6301
6597
|
* @export
|