@infisale-client/api-client 1.2.14 → 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 +303 -3
- package/dist/api/api.mjs +297 -1
- package/package.json +2 -2
package/dist/api/api.js
CHANGED
|
@@ -16,8 +16,8 @@ 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.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.SitemapApi = exports.SitemapApiFactory = exports.SitemapApiFp = exports.SitemapApiAxiosParamCreator = exports.ProductApi = exports.ProductApiFactory = exports.ProductApiFp = exports.ProductApiAxiosParamCreator = exports.PageApi = exports.PageApiFactory = exports.PageApiFp = exports.PageApiAxiosParamCreator = exports.ContactFormApi = exports.ContactFormApiFactory = exports.ContactFormApiFp = exports.ContactFormApiAxiosParamCreator = exports.CompanyApi = exports.CompanyApiFactory = exports.CompanyApiFp = exports.CompanyApiAxiosParamCreator = void 0;
|
|
19
|
+
exports.CollectionApiFp = exports.CollectionApiAxiosParamCreator = 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.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.SitemapApi = exports.SitemapApiFactory = exports.SitemapApiFp = exports.SitemapApiAxiosParamCreator = exports.ProductApi = exports.ProductApiFactory = exports.ProductApiFp = exports.ProductApiAxiosParamCreator = exports.PageApi = exports.PageApiFactory = exports.PageApiFp = exports.PageApiAxiosParamCreator = exports.OrderApi = exports.OrderApiFactory = exports.OrderApiFp = exports.OrderApiAxiosParamCreator = exports.ContactFormApi = exports.ContactFormApiFactory = exports.ContactFormApiFp = exports.ContactFormApiAxiosParamCreator = exports.CompanyApi = exports.CompanyApiFactory = exports.CompanyApiFp = exports.CompanyApiAxiosParamCreator = exports.CollectionApi = exports.CollectionApiFactory = void 0;
|
|
21
21
|
const axios_1 = __importDefault(require("axios"));
|
|
22
22
|
// Some imports not used depending on template conditions
|
|
23
23
|
// @ts-ignore
|
|
@@ -132,7 +132,9 @@ exports.ComponentTypeEnum = {
|
|
|
132
132
|
FOOTER: 'footer',
|
|
133
133
|
EMAIL_SIGNUP: 'email-signup',
|
|
134
134
|
CONTACT_FORM: 'contact-form',
|
|
135
|
-
|
|
135
|
+
CART_DETAIL: 'cart-detail',
|
|
136
|
+
CHECKOUT_DETAIL: 'checkout-detail',
|
|
137
|
+
NOT_FOUND_DETAIL: 'not-found-detail'
|
|
136
138
|
};
|
|
137
139
|
/**
|
|
138
140
|
*
|
|
@@ -530,6 +532,18 @@ exports.OrderEnum = {
|
|
|
530
532
|
ASC: 'asc',
|
|
531
533
|
DESC: 'desc'
|
|
532
534
|
};
|
|
535
|
+
/**
|
|
536
|
+
*
|
|
537
|
+
* @export
|
|
538
|
+
* @enum {string}
|
|
539
|
+
*/
|
|
540
|
+
exports.OrderStatusEnum = {
|
|
541
|
+
WAITING_PAYMENT: 'waiting_payment',
|
|
542
|
+
PAID: 'paid',
|
|
543
|
+
CANCELED: 'canceled',
|
|
544
|
+
DELIVERED: 'delivered',
|
|
545
|
+
COMPLETED: 'completed'
|
|
546
|
+
};
|
|
533
547
|
/**
|
|
534
548
|
*
|
|
535
549
|
* @export
|
|
@@ -543,6 +557,17 @@ exports.PageTypeEnum = {
|
|
|
543
557
|
CHECKOUT: 'checkout',
|
|
544
558
|
NOT_FOUND: 'not-found'
|
|
545
559
|
};
|
|
560
|
+
/**
|
|
561
|
+
*
|
|
562
|
+
* @export
|
|
563
|
+
* @enum {string}
|
|
564
|
+
*/
|
|
565
|
+
exports.PaymentMethodEnum = {
|
|
566
|
+
CREDIT_CARD: 'credit_card',
|
|
567
|
+
BANK_TRANSFER: 'bank_transfer',
|
|
568
|
+
CASH_ON_DELIVERY: 'cash_on_delivery',
|
|
569
|
+
CARD_ON_DELIVERY: 'card_on_delivery'
|
|
570
|
+
};
|
|
546
571
|
/**
|
|
547
572
|
*
|
|
548
573
|
* @export
|
|
@@ -2162,6 +2187,281 @@ class ContactFormApi extends base_1.BaseAPI {
|
|
|
2162
2187
|
}
|
|
2163
2188
|
}
|
|
2164
2189
|
exports.ContactFormApi = ContactFormApi;
|
|
2190
|
+
/**
|
|
2191
|
+
* OrderApi - axios parameter creator
|
|
2192
|
+
* @export
|
|
2193
|
+
*/
|
|
2194
|
+
const OrderApiAxiosParamCreator = function (configuration) {
|
|
2195
|
+
return {
|
|
2196
|
+
/**
|
|
2197
|
+
*
|
|
2198
|
+
* @param {IOrderPostRequest} iOrderPostRequest
|
|
2199
|
+
* @param {*} [options] Override http request option.
|
|
2200
|
+
* @throws {RequiredError}
|
|
2201
|
+
*/
|
|
2202
|
+
createOrder: async (iOrderPostRequest, options = {}) => {
|
|
2203
|
+
// verify required parameter 'iOrderPostRequest' is not null or undefined
|
|
2204
|
+
(0, common_1.assertParamExists)('createOrder', 'iOrderPostRequest', iOrderPostRequest);
|
|
2205
|
+
const localVarPath = `/api/orders`;
|
|
2206
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2207
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2208
|
+
let baseOptions;
|
|
2209
|
+
if (configuration) {
|
|
2210
|
+
baseOptions = configuration.baseOptions;
|
|
2211
|
+
}
|
|
2212
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
2213
|
+
const localVarHeaderParameter = {};
|
|
2214
|
+
const localVarQueryParameter = {};
|
|
2215
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2216
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2217
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2218
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2219
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(iOrderPostRequest, localVarRequestOptions, configuration);
|
|
2220
|
+
return {
|
|
2221
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2222
|
+
options: localVarRequestOptions,
|
|
2223
|
+
};
|
|
2224
|
+
},
|
|
2225
|
+
/**
|
|
2226
|
+
*
|
|
2227
|
+
* @param {string} id
|
|
2228
|
+
* @param {*} [options] Override http request option.
|
|
2229
|
+
* @throws {RequiredError}
|
|
2230
|
+
*/
|
|
2231
|
+
getOrderById: async (id, options = {}) => {
|
|
2232
|
+
// verify required parameter 'id' is not null or undefined
|
|
2233
|
+
(0, common_1.assertParamExists)('getOrderById', 'id', id);
|
|
2234
|
+
const localVarPath = `/api/orders/{id}`
|
|
2235
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2236
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2237
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2238
|
+
let baseOptions;
|
|
2239
|
+
if (configuration) {
|
|
2240
|
+
baseOptions = configuration.baseOptions;
|
|
2241
|
+
}
|
|
2242
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
2243
|
+
const localVarHeaderParameter = {};
|
|
2244
|
+
const localVarQueryParameter = {};
|
|
2245
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2246
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2247
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2248
|
+
return {
|
|
2249
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2250
|
+
options: localVarRequestOptions,
|
|
2251
|
+
};
|
|
2252
|
+
},
|
|
2253
|
+
/**
|
|
2254
|
+
*
|
|
2255
|
+
* @param {number} [page]
|
|
2256
|
+
* @param {number} [itemsPerPage]
|
|
2257
|
+
* @param {string} [search]
|
|
2258
|
+
* @param {string} [startDate]
|
|
2259
|
+
* @param {string} [endDate]
|
|
2260
|
+
* @param {string} [dateField]
|
|
2261
|
+
* @param {OrderEnum} [order]
|
|
2262
|
+
* @param {string} [sort]
|
|
2263
|
+
* @param {string} [companyId]
|
|
2264
|
+
* @param {string} [domain]
|
|
2265
|
+
* @param {string} [userId]
|
|
2266
|
+
* @param {OrderStatusEnum} [status]
|
|
2267
|
+
* @param {*} [options] Override http request option.
|
|
2268
|
+
* @throws {RequiredError}
|
|
2269
|
+
*/
|
|
2270
|
+
getOrders: async (page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options = {}) => {
|
|
2271
|
+
const localVarPath = `/api/orders`;
|
|
2272
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2273
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2274
|
+
let baseOptions;
|
|
2275
|
+
if (configuration) {
|
|
2276
|
+
baseOptions = configuration.baseOptions;
|
|
2277
|
+
}
|
|
2278
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
2279
|
+
const localVarHeaderParameter = {};
|
|
2280
|
+
const localVarQueryParameter = {};
|
|
2281
|
+
if (page !== undefined) {
|
|
2282
|
+
localVarQueryParameter['page'] = page;
|
|
2283
|
+
}
|
|
2284
|
+
if (itemsPerPage !== undefined) {
|
|
2285
|
+
localVarQueryParameter['itemsPerPage'] = itemsPerPage;
|
|
2286
|
+
}
|
|
2287
|
+
if (search !== undefined) {
|
|
2288
|
+
localVarQueryParameter['search'] = search;
|
|
2289
|
+
}
|
|
2290
|
+
if (startDate !== undefined) {
|
|
2291
|
+
localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
|
|
2292
|
+
startDate.toISOString() :
|
|
2293
|
+
startDate;
|
|
2294
|
+
}
|
|
2295
|
+
if (endDate !== undefined) {
|
|
2296
|
+
localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
|
|
2297
|
+
endDate.toISOString() :
|
|
2298
|
+
endDate;
|
|
2299
|
+
}
|
|
2300
|
+
if (dateField !== undefined) {
|
|
2301
|
+
localVarQueryParameter['dateField'] = dateField;
|
|
2302
|
+
}
|
|
2303
|
+
if (order !== undefined) {
|
|
2304
|
+
localVarQueryParameter['order'] = order;
|
|
2305
|
+
}
|
|
2306
|
+
if (sort !== undefined) {
|
|
2307
|
+
localVarQueryParameter['sort'] = sort;
|
|
2308
|
+
}
|
|
2309
|
+
if (companyId !== undefined) {
|
|
2310
|
+
localVarQueryParameter['companyId'] = companyId;
|
|
2311
|
+
}
|
|
2312
|
+
if (domain !== undefined) {
|
|
2313
|
+
localVarQueryParameter['domain'] = domain;
|
|
2314
|
+
}
|
|
2315
|
+
if (userId !== undefined) {
|
|
2316
|
+
localVarQueryParameter['userId'] = userId;
|
|
2317
|
+
}
|
|
2318
|
+
if (status !== undefined) {
|
|
2319
|
+
localVarQueryParameter['status'] = status;
|
|
2320
|
+
}
|
|
2321
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2322
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2323
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2324
|
+
return {
|
|
2325
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2326
|
+
options: localVarRequestOptions,
|
|
2327
|
+
};
|
|
2328
|
+
},
|
|
2329
|
+
};
|
|
2330
|
+
};
|
|
2331
|
+
exports.OrderApiAxiosParamCreator = OrderApiAxiosParamCreator;
|
|
2332
|
+
/**
|
|
2333
|
+
* OrderApi - functional programming interface
|
|
2334
|
+
* @export
|
|
2335
|
+
*/
|
|
2336
|
+
const OrderApiFp = function (configuration) {
|
|
2337
|
+
const localVarAxiosParamCreator = (0, exports.OrderApiAxiosParamCreator)(configuration);
|
|
2338
|
+
return {
|
|
2339
|
+
/**
|
|
2340
|
+
*
|
|
2341
|
+
* @param {IOrderPostRequest} iOrderPostRequest
|
|
2342
|
+
* @param {*} [options] Override http request option.
|
|
2343
|
+
* @throws {RequiredError}
|
|
2344
|
+
*/
|
|
2345
|
+
async createOrder(iOrderPostRequest, options) {
|
|
2346
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createOrder(iOrderPostRequest, options);
|
|
2347
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2348
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.createOrder']?.[localVarOperationServerIndex]?.url;
|
|
2349
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2350
|
+
},
|
|
2351
|
+
/**
|
|
2352
|
+
*
|
|
2353
|
+
* @param {string} id
|
|
2354
|
+
* @param {*} [options] Override http request option.
|
|
2355
|
+
* @throws {RequiredError}
|
|
2356
|
+
*/
|
|
2357
|
+
async getOrderById(id, options) {
|
|
2358
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(id, options);
|
|
2359
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2360
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.getOrderById']?.[localVarOperationServerIndex]?.url;
|
|
2361
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2362
|
+
},
|
|
2363
|
+
/**
|
|
2364
|
+
*
|
|
2365
|
+
* @param {number} [page]
|
|
2366
|
+
* @param {number} [itemsPerPage]
|
|
2367
|
+
* @param {string} [search]
|
|
2368
|
+
* @param {string} [startDate]
|
|
2369
|
+
* @param {string} [endDate]
|
|
2370
|
+
* @param {string} [dateField]
|
|
2371
|
+
* @param {OrderEnum} [order]
|
|
2372
|
+
* @param {string} [sort]
|
|
2373
|
+
* @param {string} [companyId]
|
|
2374
|
+
* @param {string} [domain]
|
|
2375
|
+
* @param {string} [userId]
|
|
2376
|
+
* @param {OrderStatusEnum} [status]
|
|
2377
|
+
* @param {*} [options] Override http request option.
|
|
2378
|
+
* @throws {RequiredError}
|
|
2379
|
+
*/
|
|
2380
|
+
async getOrders(page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options) {
|
|
2381
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrders(page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options);
|
|
2382
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2383
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.getOrders']?.[localVarOperationServerIndex]?.url;
|
|
2384
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2385
|
+
},
|
|
2386
|
+
};
|
|
2387
|
+
};
|
|
2388
|
+
exports.OrderApiFp = OrderApiFp;
|
|
2389
|
+
/**
|
|
2390
|
+
* OrderApi - factory interface
|
|
2391
|
+
* @export
|
|
2392
|
+
*/
|
|
2393
|
+
const OrderApiFactory = function (configuration, basePath, axios) {
|
|
2394
|
+
const localVarFp = (0, exports.OrderApiFp)(configuration);
|
|
2395
|
+
return {
|
|
2396
|
+
/**
|
|
2397
|
+
*
|
|
2398
|
+
* @param {OrderApiCreateOrderRequest} requestParameters Request parameters.
|
|
2399
|
+
* @param {*} [options] Override http request option.
|
|
2400
|
+
* @throws {RequiredError}
|
|
2401
|
+
*/
|
|
2402
|
+
createOrder(requestParameters, options) {
|
|
2403
|
+
return localVarFp.createOrder(requestParameters.iOrderPostRequest, options).then((request) => request(axios, basePath));
|
|
2404
|
+
},
|
|
2405
|
+
/**
|
|
2406
|
+
*
|
|
2407
|
+
* @param {OrderApiGetOrderByIdRequest} requestParameters Request parameters.
|
|
2408
|
+
* @param {*} [options] Override http request option.
|
|
2409
|
+
* @throws {RequiredError}
|
|
2410
|
+
*/
|
|
2411
|
+
getOrderById(requestParameters, options) {
|
|
2412
|
+
return localVarFp.getOrderById(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
2413
|
+
},
|
|
2414
|
+
/**
|
|
2415
|
+
*
|
|
2416
|
+
* @param {OrderApiGetOrdersRequest} requestParameters Request parameters.
|
|
2417
|
+
* @param {*} [options] Override http request option.
|
|
2418
|
+
* @throws {RequiredError}
|
|
2419
|
+
*/
|
|
2420
|
+
getOrders(requestParameters = {}, options) {
|
|
2421
|
+
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));
|
|
2422
|
+
},
|
|
2423
|
+
};
|
|
2424
|
+
};
|
|
2425
|
+
exports.OrderApiFactory = OrderApiFactory;
|
|
2426
|
+
/**
|
|
2427
|
+
* OrderApi - object-oriented interface
|
|
2428
|
+
* @export
|
|
2429
|
+
* @class OrderApi
|
|
2430
|
+
* @extends {BaseAPI}
|
|
2431
|
+
*/
|
|
2432
|
+
class OrderApi extends base_1.BaseAPI {
|
|
2433
|
+
/**
|
|
2434
|
+
*
|
|
2435
|
+
* @param {OrderApiCreateOrderRequest} requestParameters Request parameters.
|
|
2436
|
+
* @param {*} [options] Override http request option.
|
|
2437
|
+
* @throws {RequiredError}
|
|
2438
|
+
* @memberof OrderApi
|
|
2439
|
+
*/
|
|
2440
|
+
createOrder(requestParameters, options) {
|
|
2441
|
+
return (0, exports.OrderApiFp)(this.configuration).createOrder(requestParameters.iOrderPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2442
|
+
}
|
|
2443
|
+
/**
|
|
2444
|
+
*
|
|
2445
|
+
* @param {OrderApiGetOrderByIdRequest} requestParameters Request parameters.
|
|
2446
|
+
* @param {*} [options] Override http request option.
|
|
2447
|
+
* @throws {RequiredError}
|
|
2448
|
+
* @memberof OrderApi
|
|
2449
|
+
*/
|
|
2450
|
+
getOrderById(requestParameters, options) {
|
|
2451
|
+
return (0, exports.OrderApiFp)(this.configuration).getOrderById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
2452
|
+
}
|
|
2453
|
+
/**
|
|
2454
|
+
*
|
|
2455
|
+
* @param {OrderApiGetOrdersRequest} requestParameters Request parameters.
|
|
2456
|
+
* @param {*} [options] Override http request option.
|
|
2457
|
+
* @throws {RequiredError}
|
|
2458
|
+
* @memberof OrderApi
|
|
2459
|
+
*/
|
|
2460
|
+
getOrders(requestParameters = {}, options) {
|
|
2461
|
+
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));
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
exports.OrderApi = OrderApi;
|
|
2165
2465
|
/**
|
|
2166
2466
|
* PageApi - axios parameter creator
|
|
2167
2467
|
* @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
|
|
@@ -2128,6 +2153,277 @@ export class ContactFormApi extends BaseAPI {
|
|
|
2128
2153
|
return ContactFormApiFp(this.configuration).createContactForm(requestParameters.iContactFormPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2129
2154
|
}
|
|
2130
2155
|
}
|
|
2156
|
+
/**
|
|
2157
|
+
* OrderApi - axios parameter creator
|
|
2158
|
+
* @export
|
|
2159
|
+
*/
|
|
2160
|
+
export const OrderApiAxiosParamCreator = function (configuration) {
|
|
2161
|
+
return {
|
|
2162
|
+
/**
|
|
2163
|
+
*
|
|
2164
|
+
* @param {IOrderPostRequest} iOrderPostRequest
|
|
2165
|
+
* @param {*} [options] Override http request option.
|
|
2166
|
+
* @throws {RequiredError}
|
|
2167
|
+
*/
|
|
2168
|
+
createOrder: async (iOrderPostRequest, options = {}) => {
|
|
2169
|
+
// verify required parameter 'iOrderPostRequest' is not null or undefined
|
|
2170
|
+
assertParamExists('createOrder', 'iOrderPostRequest', iOrderPostRequest);
|
|
2171
|
+
const localVarPath = `/api/orders`;
|
|
2172
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2173
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2174
|
+
let baseOptions;
|
|
2175
|
+
if (configuration) {
|
|
2176
|
+
baseOptions = configuration.baseOptions;
|
|
2177
|
+
}
|
|
2178
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
2179
|
+
const localVarHeaderParameter = {};
|
|
2180
|
+
const localVarQueryParameter = {};
|
|
2181
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2182
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2183
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2184
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2185
|
+
localVarRequestOptions.data = serializeDataIfNeeded(iOrderPostRequest, localVarRequestOptions, configuration);
|
|
2186
|
+
return {
|
|
2187
|
+
url: toPathString(localVarUrlObj),
|
|
2188
|
+
options: localVarRequestOptions,
|
|
2189
|
+
};
|
|
2190
|
+
},
|
|
2191
|
+
/**
|
|
2192
|
+
*
|
|
2193
|
+
* @param {string} id
|
|
2194
|
+
* @param {*} [options] Override http request option.
|
|
2195
|
+
* @throws {RequiredError}
|
|
2196
|
+
*/
|
|
2197
|
+
getOrderById: async (id, options = {}) => {
|
|
2198
|
+
// verify required parameter 'id' is not null or undefined
|
|
2199
|
+
assertParamExists('getOrderById', 'id', id);
|
|
2200
|
+
const localVarPath = `/api/orders/{id}`
|
|
2201
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2202
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2203
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2204
|
+
let baseOptions;
|
|
2205
|
+
if (configuration) {
|
|
2206
|
+
baseOptions = configuration.baseOptions;
|
|
2207
|
+
}
|
|
2208
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
2209
|
+
const localVarHeaderParameter = {};
|
|
2210
|
+
const localVarQueryParameter = {};
|
|
2211
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2212
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2213
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2214
|
+
return {
|
|
2215
|
+
url: toPathString(localVarUrlObj),
|
|
2216
|
+
options: localVarRequestOptions,
|
|
2217
|
+
};
|
|
2218
|
+
},
|
|
2219
|
+
/**
|
|
2220
|
+
*
|
|
2221
|
+
* @param {number} [page]
|
|
2222
|
+
* @param {number} [itemsPerPage]
|
|
2223
|
+
* @param {string} [search]
|
|
2224
|
+
* @param {string} [startDate]
|
|
2225
|
+
* @param {string} [endDate]
|
|
2226
|
+
* @param {string} [dateField]
|
|
2227
|
+
* @param {OrderEnum} [order]
|
|
2228
|
+
* @param {string} [sort]
|
|
2229
|
+
* @param {string} [companyId]
|
|
2230
|
+
* @param {string} [domain]
|
|
2231
|
+
* @param {string} [userId]
|
|
2232
|
+
* @param {OrderStatusEnum} [status]
|
|
2233
|
+
* @param {*} [options] Override http request option.
|
|
2234
|
+
* @throws {RequiredError}
|
|
2235
|
+
*/
|
|
2236
|
+
getOrders: async (page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options = {}) => {
|
|
2237
|
+
const localVarPath = `/api/orders`;
|
|
2238
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2239
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2240
|
+
let baseOptions;
|
|
2241
|
+
if (configuration) {
|
|
2242
|
+
baseOptions = configuration.baseOptions;
|
|
2243
|
+
}
|
|
2244
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
2245
|
+
const localVarHeaderParameter = {};
|
|
2246
|
+
const localVarQueryParameter = {};
|
|
2247
|
+
if (page !== undefined) {
|
|
2248
|
+
localVarQueryParameter['page'] = page;
|
|
2249
|
+
}
|
|
2250
|
+
if (itemsPerPage !== undefined) {
|
|
2251
|
+
localVarQueryParameter['itemsPerPage'] = itemsPerPage;
|
|
2252
|
+
}
|
|
2253
|
+
if (search !== undefined) {
|
|
2254
|
+
localVarQueryParameter['search'] = search;
|
|
2255
|
+
}
|
|
2256
|
+
if (startDate !== undefined) {
|
|
2257
|
+
localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
|
|
2258
|
+
startDate.toISOString() :
|
|
2259
|
+
startDate;
|
|
2260
|
+
}
|
|
2261
|
+
if (endDate !== undefined) {
|
|
2262
|
+
localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
|
|
2263
|
+
endDate.toISOString() :
|
|
2264
|
+
endDate;
|
|
2265
|
+
}
|
|
2266
|
+
if (dateField !== undefined) {
|
|
2267
|
+
localVarQueryParameter['dateField'] = dateField;
|
|
2268
|
+
}
|
|
2269
|
+
if (order !== undefined) {
|
|
2270
|
+
localVarQueryParameter['order'] = order;
|
|
2271
|
+
}
|
|
2272
|
+
if (sort !== undefined) {
|
|
2273
|
+
localVarQueryParameter['sort'] = sort;
|
|
2274
|
+
}
|
|
2275
|
+
if (companyId !== undefined) {
|
|
2276
|
+
localVarQueryParameter['companyId'] = companyId;
|
|
2277
|
+
}
|
|
2278
|
+
if (domain !== undefined) {
|
|
2279
|
+
localVarQueryParameter['domain'] = domain;
|
|
2280
|
+
}
|
|
2281
|
+
if (userId !== undefined) {
|
|
2282
|
+
localVarQueryParameter['userId'] = userId;
|
|
2283
|
+
}
|
|
2284
|
+
if (status !== undefined) {
|
|
2285
|
+
localVarQueryParameter['status'] = status;
|
|
2286
|
+
}
|
|
2287
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2288
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2289
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2290
|
+
return {
|
|
2291
|
+
url: toPathString(localVarUrlObj),
|
|
2292
|
+
options: localVarRequestOptions,
|
|
2293
|
+
};
|
|
2294
|
+
},
|
|
2295
|
+
};
|
|
2296
|
+
};
|
|
2297
|
+
/**
|
|
2298
|
+
* OrderApi - functional programming interface
|
|
2299
|
+
* @export
|
|
2300
|
+
*/
|
|
2301
|
+
export const OrderApiFp = function (configuration) {
|
|
2302
|
+
const localVarAxiosParamCreator = OrderApiAxiosParamCreator(configuration);
|
|
2303
|
+
return {
|
|
2304
|
+
/**
|
|
2305
|
+
*
|
|
2306
|
+
* @param {IOrderPostRequest} iOrderPostRequest
|
|
2307
|
+
* @param {*} [options] Override http request option.
|
|
2308
|
+
* @throws {RequiredError}
|
|
2309
|
+
*/
|
|
2310
|
+
async createOrder(iOrderPostRequest, options) {
|
|
2311
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createOrder(iOrderPostRequest, options);
|
|
2312
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2313
|
+
const localVarOperationServerBasePath = operationServerMap['OrderApi.createOrder']?.[localVarOperationServerIndex]?.url;
|
|
2314
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2315
|
+
},
|
|
2316
|
+
/**
|
|
2317
|
+
*
|
|
2318
|
+
* @param {string} id
|
|
2319
|
+
* @param {*} [options] Override http request option.
|
|
2320
|
+
* @throws {RequiredError}
|
|
2321
|
+
*/
|
|
2322
|
+
async getOrderById(id, options) {
|
|
2323
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderById(id, options);
|
|
2324
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2325
|
+
const localVarOperationServerBasePath = operationServerMap['OrderApi.getOrderById']?.[localVarOperationServerIndex]?.url;
|
|
2326
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2327
|
+
},
|
|
2328
|
+
/**
|
|
2329
|
+
*
|
|
2330
|
+
* @param {number} [page]
|
|
2331
|
+
* @param {number} [itemsPerPage]
|
|
2332
|
+
* @param {string} [search]
|
|
2333
|
+
* @param {string} [startDate]
|
|
2334
|
+
* @param {string} [endDate]
|
|
2335
|
+
* @param {string} [dateField]
|
|
2336
|
+
* @param {OrderEnum} [order]
|
|
2337
|
+
* @param {string} [sort]
|
|
2338
|
+
* @param {string} [companyId]
|
|
2339
|
+
* @param {string} [domain]
|
|
2340
|
+
* @param {string} [userId]
|
|
2341
|
+
* @param {OrderStatusEnum} [status]
|
|
2342
|
+
* @param {*} [options] Override http request option.
|
|
2343
|
+
* @throws {RequiredError}
|
|
2344
|
+
*/
|
|
2345
|
+
async getOrders(page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options) {
|
|
2346
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrders(page, itemsPerPage, search, startDate, endDate, dateField, order, sort, companyId, domain, userId, status, options);
|
|
2347
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2348
|
+
const localVarOperationServerBasePath = operationServerMap['OrderApi.getOrders']?.[localVarOperationServerIndex]?.url;
|
|
2349
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2350
|
+
},
|
|
2351
|
+
};
|
|
2352
|
+
};
|
|
2353
|
+
/**
|
|
2354
|
+
* OrderApi - factory interface
|
|
2355
|
+
* @export
|
|
2356
|
+
*/
|
|
2357
|
+
export const OrderApiFactory = function (configuration, basePath, axios) {
|
|
2358
|
+
const localVarFp = OrderApiFp(configuration);
|
|
2359
|
+
return {
|
|
2360
|
+
/**
|
|
2361
|
+
*
|
|
2362
|
+
* @param {OrderApiCreateOrderRequest} requestParameters Request parameters.
|
|
2363
|
+
* @param {*} [options] Override http request option.
|
|
2364
|
+
* @throws {RequiredError}
|
|
2365
|
+
*/
|
|
2366
|
+
createOrder(requestParameters, options) {
|
|
2367
|
+
return localVarFp.createOrder(requestParameters.iOrderPostRequest, options).then((request) => request(axios, basePath));
|
|
2368
|
+
},
|
|
2369
|
+
/**
|
|
2370
|
+
*
|
|
2371
|
+
* @param {OrderApiGetOrderByIdRequest} requestParameters Request parameters.
|
|
2372
|
+
* @param {*} [options] Override http request option.
|
|
2373
|
+
* @throws {RequiredError}
|
|
2374
|
+
*/
|
|
2375
|
+
getOrderById(requestParameters, options) {
|
|
2376
|
+
return localVarFp.getOrderById(requestParameters.id, options).then((request) => request(axios, basePath));
|
|
2377
|
+
},
|
|
2378
|
+
/**
|
|
2379
|
+
*
|
|
2380
|
+
* @param {OrderApiGetOrdersRequest} requestParameters Request parameters.
|
|
2381
|
+
* @param {*} [options] Override http request option.
|
|
2382
|
+
* @throws {RequiredError}
|
|
2383
|
+
*/
|
|
2384
|
+
getOrders(requestParameters = {}, options) {
|
|
2385
|
+
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));
|
|
2386
|
+
},
|
|
2387
|
+
};
|
|
2388
|
+
};
|
|
2389
|
+
/**
|
|
2390
|
+
* OrderApi - object-oriented interface
|
|
2391
|
+
* @export
|
|
2392
|
+
* @class OrderApi
|
|
2393
|
+
* @extends {BaseAPI}
|
|
2394
|
+
*/
|
|
2395
|
+
export class OrderApi extends BaseAPI {
|
|
2396
|
+
/**
|
|
2397
|
+
*
|
|
2398
|
+
* @param {OrderApiCreateOrderRequest} requestParameters Request parameters.
|
|
2399
|
+
* @param {*} [options] Override http request option.
|
|
2400
|
+
* @throws {RequiredError}
|
|
2401
|
+
* @memberof OrderApi
|
|
2402
|
+
*/
|
|
2403
|
+
createOrder(requestParameters, options) {
|
|
2404
|
+
return OrderApiFp(this.configuration).createOrder(requestParameters.iOrderPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2405
|
+
}
|
|
2406
|
+
/**
|
|
2407
|
+
*
|
|
2408
|
+
* @param {OrderApiGetOrderByIdRequest} requestParameters Request parameters.
|
|
2409
|
+
* @param {*} [options] Override http request option.
|
|
2410
|
+
* @throws {RequiredError}
|
|
2411
|
+
* @memberof OrderApi
|
|
2412
|
+
*/
|
|
2413
|
+
getOrderById(requestParameters, options) {
|
|
2414
|
+
return OrderApiFp(this.configuration).getOrderById(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
|
|
2415
|
+
}
|
|
2416
|
+
/**
|
|
2417
|
+
*
|
|
2418
|
+
* @param {OrderApiGetOrdersRequest} requestParameters Request parameters.
|
|
2419
|
+
* @param {*} [options] Override http request option.
|
|
2420
|
+
* @throws {RequiredError}
|
|
2421
|
+
* @memberof OrderApi
|
|
2422
|
+
*/
|
|
2423
|
+
getOrders(requestParameters = {}, options) {
|
|
2424
|
+
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));
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2131
2427
|
/**
|
|
2132
2428
|
* PageApi - axios parameter creator
|
|
2133
2429
|
* @export
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infisale-client/api-client",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
4
4
|
"description": "api-client-sdk",
|
|
5
5
|
"author": "Muhammet KÖKLÜ <105980019+byhipernova@users.noreply.github.com>",
|
|
6
6
|
"homepage": "https://github.com/infisale/infisale-client#readme",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"bugs": {
|
|
38
38
|
"url": "https://github.com/infisale/infisale-client/issues"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "0a602ba7398ae5c54ed3bdb1e68e2c2031759d8b"
|
|
41
41
|
}
|