@teemill/orders 1.26.0 → 1.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Orders API
4
+ * Orders
5
5
  * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
6
6
  *
7
- * The version of the OpenAPI document: 1.26.0
7
+ * The version of the OpenAPI document: 1.28.2
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -373,7 +373,7 @@ export interface Image {
373
373
  }
374
374
  export interface ImportOrders202Response {
375
375
  /**
376
- * Id of the order import
376
+ * Unique object identifier
377
377
  */
378
378
  'importId'?: string;
379
379
  }
@@ -470,6 +470,147 @@ export interface Order {
470
470
  }
471
471
 
472
472
 
473
+ export interface OrderImport {
474
+ /**
475
+ * Unique object identifier
476
+ */
477
+ 'importId': string;
478
+ 'status': OrderImportStatus;
479
+ 'counts': OrderImportCounts;
480
+ /**
481
+ * ISO 8601 Timestamp
482
+ */
483
+ 'createdAt': string;
484
+ 'cancelledAt'?: string | null;
485
+ 'startedAt'?: string | null;
486
+ 'finishedAt'?: string | null;
487
+ }
488
+
489
+
490
+ export interface OrderImportCounts {
491
+ 'total': number;
492
+ 'pending': number;
493
+ 'processing': number;
494
+ 'success': number;
495
+ 'failed': number;
496
+ 'cancelled': number;
497
+ 'completed': number;
498
+ }
499
+ export interface OrderImportError {
500
+ 'code': OrderImportErrorCode;
501
+ /**
502
+ * A human-readable description of the error.
503
+ */
504
+ 'message': string;
505
+ /**
506
+ * Dot-notation path to the field that caused the error (e.g. `items.sku`).
507
+ */
508
+ 'fieldPath'?: string | null;
509
+ /**
510
+ * The SKU that triggered the error, if applicable.
511
+ */
512
+ 'sku'?: string | null;
513
+ /**
514
+ * A human-readable suggestion for how to resolve the error.
515
+ */
516
+ 'suggestedFix'?: string | null;
517
+ /**
518
+ * A unique reference code for this error occurrence, useful for support enquiries.
519
+ */
520
+ 'referenceCode'?: string | null;
521
+ }
522
+
523
+
524
+ /**
525
+ * Machine-readable error code identifying the type of import failure: - `VARIANT_NOT_FOUND` — The SKU does not match any variant in the project\'s catalog - `MISSING_SKU` — A required SKU field was empty or missing - `SHIPPING_METHOD_UNAVAILABLE` — No shipping methods are available for the fulfillment - `TRANSIENT_SYSTEM_ERROR` — A temporary system issue occurred; the import may succeed on retry - `IMPORT_FAILED` — A general import failure that does not match a more specific code
526
+ */
527
+
528
+ export const OrderImportErrorCode = {
529
+ VariantNotFound: 'VARIANT_NOT_FOUND',
530
+ MissingSku: 'MISSING_SKU',
531
+ ShippingMethodUnavailable: 'SHIPPING_METHOD_UNAVAILABLE',
532
+ TransientSystemError: 'TRANSIENT_SYSTEM_ERROR',
533
+ ImportFailed: 'IMPORT_FAILED'
534
+ } as const;
535
+
536
+ export type OrderImportErrorCode = typeof OrderImportErrorCode[keyof typeof OrderImportErrorCode];
537
+
538
+
539
+ export interface OrderImportGroup {
540
+ /**
541
+ * Unique object identifier
542
+ */
543
+ 'id': string;
544
+ 'status': OrderImportGroupStatus;
545
+ /**
546
+ * The merchant reference from the CSV rows belonging to this group.
547
+ */
548
+ 'merchantReference'?: string | null;
549
+ /**
550
+ * A URI reference to the order created by this group. Only present when the group status is `success`.
551
+ */
552
+ 'resultReference'?: string | null;
553
+ /**
554
+ * A human-readable message describing the outcome of this group.
555
+ */
556
+ 'message'?: string | null;
557
+ /**
558
+ * The number of CSV rows that belong to this group.
559
+ */
560
+ 'rowsCount': number;
561
+ /**
562
+ * The distinct SKUs referenced by rows in this group.
563
+ */
564
+ 'skus': Array<string>;
565
+ /**
566
+ * Errors encountered while processing this group. Empty when the group succeeded.
567
+ */
568
+ 'errors': Array<OrderImportError>;
569
+ 'createdAt'?: string | null;
570
+ 'startedAt'?: string | null;
571
+ 'finishedAt'?: string | null;
572
+ }
573
+
574
+
575
+ /**
576
+ * The lifecycle status of a single group (order) within an import: - `pending` — Group is queued and has not started processing - `processing` — Group is currently being processed - `success` — Order was created and confirmed successfully - `failed` — Order creation or confirmation failed - `cancelled` — Group was cancelled (e.g. parent import was cancelled)
577
+ */
578
+
579
+ export const OrderImportGroupStatus = {
580
+ Pending: 'pending',
581
+ Processing: 'processing',
582
+ Success: 'success',
583
+ Failed: 'failed',
584
+ Cancelled: 'cancelled'
585
+ } as const;
586
+
587
+ export type OrderImportGroupStatus = typeof OrderImportGroupStatus[keyof typeof OrderImportGroupStatus];
588
+
589
+
590
+ export interface OrderImportGroupsResponse {
591
+ 'groups'?: Array<OrderImportGroup>;
592
+ 'nextPageToken'?: number | null;
593
+ }
594
+ /**
595
+ * The lifecycle status of an order import: - `queued` — Import has been accepted but no groups have started processing yet - `processing` — One or more groups are currently being processed - `completedSuccess` — All groups were imported successfully - `completedPartial` — Some groups succeeded but others failed or were cancelled - `completedFailed` — All groups failed or were cancelled, with none succeeding - `cancelled` — The entire import was cancelled before completion
596
+ */
597
+
598
+ export const OrderImportStatus = {
599
+ Queued: 'queued',
600
+ Processing: 'processing',
601
+ CompletedSuccess: 'completedSuccess',
602
+ CompletedPartial: 'completedPartial',
603
+ CompletedFailed: 'completedFailed',
604
+ Cancelled: 'cancelled'
605
+ } as const;
606
+
607
+ export type OrderImportStatus = typeof OrderImportStatus[keyof typeof OrderImportStatus];
608
+
609
+
610
+ export interface OrderImportsResponse {
611
+ 'imports'?: Array<OrderImport>;
612
+ 'nextPageToken'?: number | null;
613
+ }
473
614
  /**
474
615
  * A line item in an order, representing a specific product variant and quantity.
475
616
  */
@@ -1017,10 +1158,11 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1017
1158
  * @param {string} start Start of the date range to filter by when orders were placed.
1018
1159
  * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1019
1160
  * @param {string} [search] Search term to filter based on order reference, customer name and email
1161
+ * @param {ExportOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the &#x60;start&#x60; and &#x60;end&#x60; fields should query.
1020
1162
  * @param {*} [options] Override http request option.
1021
1163
  * @throws {RequiredError}
1022
1164
  */
1023
- exportOrders: async (project: string, start: string, end?: string, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1165
+ exportOrders: async (project: string, start: string, end?: string, search?: string, dateFilterType?: ExportOrdersDateFilterTypeEnum, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1024
1166
  // verify required parameter 'project' is not null or undefined
1025
1167
  assertParamExists('exportOrders', 'project', project)
1026
1168
  // verify required parameter 'start' is not null or undefined
@@ -1064,6 +1206,10 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1064
1206
  localVarQueryParameter['search'] = search;
1065
1207
  }
1066
1208
 
1209
+ if (dateFilterType !== undefined) {
1210
+ localVarQueryParameter['dateFilterType'] = dateFilterType;
1211
+ }
1212
+
1067
1213
  localVarHeaderParameter['Accept'] = 'text/csv; charset=utf-8,application/json';
1068
1214
 
1069
1215
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -1128,6 +1274,54 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1128
1274
  options: localVarRequestOptions,
1129
1275
  };
1130
1276
  },
1277
+ /**
1278
+ * Gets the latest status and summary for an order import.
1279
+ * @summary Get order import
1280
+ * @param {string} project The project identifier to scope the request to.
1281
+ * @param {string} importId Unique identifier of an order import
1282
+ * @param {*} [options] Override http request option.
1283
+ * @throws {RequiredError}
1284
+ */
1285
+ getOrderImport: async (project: string, importId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1286
+ // verify required parameter 'project' is not null or undefined
1287
+ assertParamExists('getOrderImport', 'project', project)
1288
+ // verify required parameter 'importId' is not null or undefined
1289
+ assertParamExists('getOrderImport', 'importId', importId)
1290
+ const localVarPath = `/v1/orders/imports/{importId}`
1291
+ .replace(`{${"importId"}}`, encodeURIComponent(String(importId)));
1292
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1293
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1294
+ let baseOptions;
1295
+ if (configuration) {
1296
+ baseOptions = configuration.baseOptions;
1297
+ }
1298
+
1299
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1300
+ const localVarHeaderParameter = {} as any;
1301
+ const localVarQueryParameter = {} as any;
1302
+
1303
+ // authentication session-oauth required
1304
+ // oauth required
1305
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1306
+
1307
+ // authentication api-key required
1308
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1309
+
1310
+ if (project !== undefined) {
1311
+ localVarQueryParameter['project'] = project;
1312
+ }
1313
+
1314
+ localVarHeaderParameter['Accept'] = 'application/json';
1315
+
1316
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1317
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1318
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1319
+
1320
+ return {
1321
+ url: toPathString(localVarUrlObj),
1322
+ options: localVarRequestOptions,
1323
+ };
1324
+ },
1131
1325
  /**
1132
1326
  * Lists all orders placed on this project, paginated into configurable chunks.
1133
1327
  * @summary List orders
@@ -1222,7 +1416,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1222
1416
  };
1223
1417
  },
1224
1418
  /**
1225
- * Initiates an order import from a CSV file. The import is processed asynchronously.
1419
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
1226
1420
  * @summary Import orders
1227
1421
  * @param {string} project The project identifier to scope the request to.
1228
1422
  * @param {File} file CSV file containing order data
@@ -1234,7 +1428,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1234
1428
  assertParamExists('importOrders', 'project', project)
1235
1429
  // verify required parameter 'file' is not null or undefined
1236
1430
  assertParamExists('importOrders', 'file', file)
1237
- const localVarPath = `/v1/orders/import`;
1431
+ const localVarPath = `/v1/orders/imports`;
1238
1432
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1239
1433
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1240
1434
  let baseOptions;
@@ -1275,6 +1469,118 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1275
1469
  options: localVarRequestOptions,
1276
1470
  };
1277
1471
  },
1472
+ /**
1473
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
1474
+ * @summary List order import groups
1475
+ * @param {string} project The project identifier to scope the request to.
1476
+ * @param {string} importId Unique identifier of an order import
1477
+ * @param {number} [pageToken] Page reference token
1478
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
1479
+ * @param {*} [options] Override http request option.
1480
+ * @throws {RequiredError}
1481
+ */
1482
+ listOrderImportGroups: async (project: string, importId: string, pageToken?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1483
+ // verify required parameter 'project' is not null or undefined
1484
+ assertParamExists('listOrderImportGroups', 'project', project)
1485
+ // verify required parameter 'importId' is not null or undefined
1486
+ assertParamExists('listOrderImportGroups', 'importId', importId)
1487
+ const localVarPath = `/v1/orders/imports/{importId}/groups`
1488
+ .replace(`{${"importId"}}`, encodeURIComponent(String(importId)));
1489
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1490
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1491
+ let baseOptions;
1492
+ if (configuration) {
1493
+ baseOptions = configuration.baseOptions;
1494
+ }
1495
+
1496
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1497
+ const localVarHeaderParameter = {} as any;
1498
+ const localVarQueryParameter = {} as any;
1499
+
1500
+ // authentication session-oauth required
1501
+ // oauth required
1502
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1503
+
1504
+ // authentication api-key required
1505
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1506
+
1507
+ if (project !== undefined) {
1508
+ localVarQueryParameter['project'] = project;
1509
+ }
1510
+
1511
+ if (pageToken !== undefined) {
1512
+ localVarQueryParameter['pageToken'] = pageToken;
1513
+ }
1514
+
1515
+ if (pageSize !== undefined) {
1516
+ localVarQueryParameter['pageSize'] = pageSize;
1517
+ }
1518
+
1519
+ localVarHeaderParameter['Accept'] = 'application/json';
1520
+
1521
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1522
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1523
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1524
+
1525
+ return {
1526
+ url: toPathString(localVarUrlObj),
1527
+ options: localVarRequestOptions,
1528
+ };
1529
+ },
1530
+ /**
1531
+ * Lists recent order imports for this project, ordered by most recent first.
1532
+ * @summary List order imports
1533
+ * @param {string} project The project identifier to scope the request to.
1534
+ * @param {number} [pageToken] Page reference token
1535
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
1536
+ * @param {*} [options] Override http request option.
1537
+ * @throws {RequiredError}
1538
+ */
1539
+ listOrderImports: async (project: string, pageToken?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1540
+ // verify required parameter 'project' is not null or undefined
1541
+ assertParamExists('listOrderImports', 'project', project)
1542
+ const localVarPath = `/v1/orders/imports`;
1543
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1544
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1545
+ let baseOptions;
1546
+ if (configuration) {
1547
+ baseOptions = configuration.baseOptions;
1548
+ }
1549
+
1550
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1551
+ const localVarHeaderParameter = {} as any;
1552
+ const localVarQueryParameter = {} as any;
1553
+
1554
+ // authentication session-oauth required
1555
+ // oauth required
1556
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1557
+
1558
+ // authentication api-key required
1559
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1560
+
1561
+ if (project !== undefined) {
1562
+ localVarQueryParameter['project'] = project;
1563
+ }
1564
+
1565
+ if (pageToken !== undefined) {
1566
+ localVarQueryParameter['pageToken'] = pageToken;
1567
+ }
1568
+
1569
+ if (pageSize !== undefined) {
1570
+ localVarQueryParameter['pageSize'] = pageSize;
1571
+ }
1572
+
1573
+ localVarHeaderParameter['Accept'] = 'application/json';
1574
+
1575
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1576
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1577
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1578
+
1579
+ return {
1580
+ url: toPathString(localVarUrlObj),
1581
+ options: localVarRequestOptions,
1582
+ };
1583
+ },
1278
1584
  /**
1279
1585
  * Retries failed platform payment, so fulfillment can proceed.
1280
1586
  * @summary Retry
@@ -1404,11 +1710,12 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1404
1710
  * @param {string} start Start of the date range to filter by when orders were placed.
1405
1711
  * @param {string} [end] End of date range filter. Which date field this applies to is controlled by the &#x60;dateFilterType&#x60; parameter.
1406
1712
  * @param {string} [search] Search term to filter based on order reference, customer name and email
1713
+ * @param {ExportOrdersDateFilterTypeEnum} [dateFilterType] Specifies the type of date range filter to apply. Determines which date field the &#x60;start&#x60; and &#x60;end&#x60; fields should query.
1407
1714
  * @param {*} [options] Override http request option.
1408
1715
  * @throws {RequiredError}
1409
1716
  */
1410
- async exportOrders(project: string, start: string, end?: string, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
1411
- const localVarAxiosArgs = await localVarAxiosParamCreator.exportOrders(project, start, end, search, options);
1717
+ async exportOrders(project: string, start: string, end?: string, search?: string, dateFilterType?: ExportOrdersDateFilterTypeEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
1718
+ const localVarAxiosArgs = await localVarAxiosParamCreator.exportOrders(project, start, end, search, dateFilterType, options);
1412
1719
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1413
1720
  const localVarOperationServerBasePath = operationServerMap['OrdersApi.exportOrders']?.[localVarOperationServerIndex]?.url;
1414
1721
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -1428,6 +1735,20 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1428
1735
  const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrder']?.[localVarOperationServerIndex]?.url;
1429
1736
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1430
1737
  },
1738
+ /**
1739
+ * Gets the latest status and summary for an order import.
1740
+ * @summary Get order import
1741
+ * @param {string} project The project identifier to scope the request to.
1742
+ * @param {string} importId Unique identifier of an order import
1743
+ * @param {*} [options] Override http request option.
1744
+ * @throws {RequiredError}
1745
+ */
1746
+ async getOrderImport(project: string, importId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderImport>> {
1747
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderImport(project, importId, options);
1748
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1749
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrderImport']?.[localVarOperationServerIndex]?.url;
1750
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1751
+ },
1431
1752
  /**
1432
1753
  * Lists all orders placed on this project, paginated into configurable chunks.
1433
1754
  * @summary List orders
@@ -1451,7 +1772,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1451
1772
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1452
1773
  },
1453
1774
  /**
1454
- * Initiates an order import from a CSV file. The import is processed asynchronously.
1775
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
1455
1776
  * @summary Import orders
1456
1777
  * @param {string} project The project identifier to scope the request to.
1457
1778
  * @param {File} file CSV file containing order data
@@ -1464,6 +1785,37 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1464
1785
  const localVarOperationServerBasePath = operationServerMap['OrdersApi.importOrders']?.[localVarOperationServerIndex]?.url;
1465
1786
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1466
1787
  },
1788
+ /**
1789
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
1790
+ * @summary List order import groups
1791
+ * @param {string} project The project identifier to scope the request to.
1792
+ * @param {string} importId Unique identifier of an order import
1793
+ * @param {number} [pageToken] Page reference token
1794
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
1795
+ * @param {*} [options] Override http request option.
1796
+ * @throws {RequiredError}
1797
+ */
1798
+ async listOrderImportGroups(project: string, importId: string, pageToken?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderImportGroupsResponse>> {
1799
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listOrderImportGroups(project, importId, pageToken, pageSize, options);
1800
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1801
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.listOrderImportGroups']?.[localVarOperationServerIndex]?.url;
1802
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1803
+ },
1804
+ /**
1805
+ * Lists recent order imports for this project, ordered by most recent first.
1806
+ * @summary List order imports
1807
+ * @param {string} project The project identifier to scope the request to.
1808
+ * @param {number} [pageToken] Page reference token
1809
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
1810
+ * @param {*} [options] Override http request option.
1811
+ * @throws {RequiredError}
1812
+ */
1813
+ async listOrderImports(project: string, pageToken?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderImportsResponse>> {
1814
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listOrderImports(project, pageToken, pageSize, options);
1815
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1816
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.listOrderImports']?.[localVarOperationServerIndex]?.url;
1817
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1818
+ },
1467
1819
  /**
1468
1820
  * Retries failed platform payment, so fulfillment can proceed.
1469
1821
  * @summary Retry
@@ -1536,7 +1888,7 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1536
1888
  * @throws {RequiredError}
1537
1889
  */
1538
1890
  exportOrders(requestParameters: OrdersApiExportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<File> {
1539
- return localVarFp.exportOrders(requestParameters.project, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(axios, basePath));
1891
+ return localVarFp.exportOrders(requestParameters.project, requestParameters.start, requestParameters.end, requestParameters.search, requestParameters.dateFilterType, options).then((request) => request(axios, basePath));
1540
1892
  },
1541
1893
  /**
1542
1894
  * Get an order by a given ID.
@@ -1548,6 +1900,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1548
1900
  getOrder(requestParameters: OrdersApiGetOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise<Order> {
1549
1901
  return localVarFp.getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(axios, basePath));
1550
1902
  },
1903
+ /**
1904
+ * Gets the latest status and summary for an order import.
1905
+ * @summary Get order import
1906
+ * @param {OrdersApiGetOrderImportRequest} requestParameters Request parameters.
1907
+ * @param {*} [options] Override http request option.
1908
+ * @throws {RequiredError}
1909
+ */
1910
+ getOrderImport(requestParameters: OrdersApiGetOrderImportRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrderImport> {
1911
+ return localVarFp.getOrderImport(requestParameters.project, requestParameters.importId, options).then((request) => request(axios, basePath));
1912
+ },
1551
1913
  /**
1552
1914
  * Lists all orders placed on this project, paginated into configurable chunks.
1553
1915
  * @summary List orders
@@ -1559,7 +1921,7 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1559
1921
  return localVarFp.getOrders(requestParameters.project, requestParameters.fields, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.ids, requestParameters.statuses, requestParameters.start, requestParameters.end, requestParameters.dateFilterType, options).then((request) => request(axios, basePath));
1560
1922
  },
1561
1923
  /**
1562
- * Initiates an order import from a CSV file. The import is processed asynchronously.
1924
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
1563
1925
  * @summary Import orders
1564
1926
  * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1565
1927
  * @param {*} [options] Override http request option.
@@ -1568,6 +1930,26 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1568
1930
  importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportOrders202Response> {
1569
1931
  return localVarFp.importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(axios, basePath));
1570
1932
  },
1933
+ /**
1934
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
1935
+ * @summary List order import groups
1936
+ * @param {OrdersApiListOrderImportGroupsRequest} requestParameters Request parameters.
1937
+ * @param {*} [options] Override http request option.
1938
+ * @throws {RequiredError}
1939
+ */
1940
+ listOrderImportGroups(requestParameters: OrdersApiListOrderImportGroupsRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrderImportGroupsResponse> {
1941
+ return localVarFp.listOrderImportGroups(requestParameters.project, requestParameters.importId, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1942
+ },
1943
+ /**
1944
+ * Lists recent order imports for this project, ordered by most recent first.
1945
+ * @summary List order imports
1946
+ * @param {OrdersApiListOrderImportsRequest} requestParameters Request parameters.
1947
+ * @param {*} [options] Override http request option.
1948
+ * @throws {RequiredError}
1949
+ */
1950
+ listOrderImports(requestParameters: OrdersApiListOrderImportsRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrderImportsResponse> {
1951
+ return localVarFp.listOrderImports(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1952
+ },
1571
1953
  /**
1572
1954
  * Retries failed platform payment, so fulfillment can proceed.
1573
1955
  * @summary Retry
@@ -1684,6 +2066,11 @@ export interface OrdersApiExportOrdersRequest {
1684
2066
  * Search term to filter based on order reference, customer name and email
1685
2067
  */
1686
2068
  readonly search?: string
2069
+
2070
+ /**
2071
+ * Specifies the type of date range filter to apply. Determines which date field the &#x60;start&#x60; and &#x60;end&#x60; fields should query.
2072
+ */
2073
+ readonly dateFilterType?: ExportOrdersDateFilterTypeEnum
1687
2074
  }
1688
2075
 
1689
2076
  /**
@@ -1706,6 +2093,21 @@ export interface OrdersApiGetOrderRequest {
1706
2093
  readonly fields?: string
1707
2094
  }
1708
2095
 
2096
+ /**
2097
+ * Request parameters for getOrderImport operation in OrdersApi.
2098
+ */
2099
+ export interface OrdersApiGetOrderImportRequest {
2100
+ /**
2101
+ * The project identifier to scope the request to.
2102
+ */
2103
+ readonly project: string
2104
+
2105
+ /**
2106
+ * Unique identifier of an order import
2107
+ */
2108
+ readonly importId: string
2109
+ }
2110
+
1709
2111
  /**
1710
2112
  * Request parameters for getOrders operation in OrdersApi.
1711
2113
  */
@@ -1776,6 +2178,51 @@ export interface OrdersApiImportOrdersRequest {
1776
2178
  readonly file: File
1777
2179
  }
1778
2180
 
2181
+ /**
2182
+ * Request parameters for listOrderImportGroups operation in OrdersApi.
2183
+ */
2184
+ export interface OrdersApiListOrderImportGroupsRequest {
2185
+ /**
2186
+ * The project identifier to scope the request to.
2187
+ */
2188
+ readonly project: string
2189
+
2190
+ /**
2191
+ * Unique identifier of an order import
2192
+ */
2193
+ readonly importId: string
2194
+
2195
+ /**
2196
+ * Page reference token
2197
+ */
2198
+ readonly pageToken?: number
2199
+
2200
+ /**
2201
+ * Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
2202
+ */
2203
+ readonly pageSize?: number
2204
+ }
2205
+
2206
+ /**
2207
+ * Request parameters for listOrderImports operation in OrdersApi.
2208
+ */
2209
+ export interface OrdersApiListOrderImportsRequest {
2210
+ /**
2211
+ * The project identifier to scope the request to.
2212
+ */
2213
+ readonly project: string
2214
+
2215
+ /**
2216
+ * Page reference token
2217
+ */
2218
+ readonly pageToken?: number
2219
+
2220
+ /**
2221
+ * Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
2222
+ */
2223
+ readonly pageSize?: number
2224
+ }
2225
+
1779
2226
  /**
1780
2227
  * Request parameters for retryPlatformPayment operation in OrdersApi.
1781
2228
  */
@@ -1852,7 +2299,7 @@ export class OrdersApi extends BaseAPI {
1852
2299
  * @throws {RequiredError}
1853
2300
  */
1854
2301
  public exportOrders(requestParameters: OrdersApiExportOrdersRequest, options?: RawAxiosRequestConfig) {
1855
- return OrdersApiFp(this.configuration).exportOrders(requestParameters.project, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
2302
+ return OrdersApiFp(this.configuration).exportOrders(requestParameters.project, requestParameters.start, requestParameters.end, requestParameters.search, requestParameters.dateFilterType, options).then((request) => request(this.axios, this.basePath));
1856
2303
  }
1857
2304
 
1858
2305
  /**
@@ -1866,6 +2313,17 @@ export class OrdersApi extends BaseAPI {
1866
2313
  return OrdersApiFp(this.configuration).getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
1867
2314
  }
1868
2315
 
2316
+ /**
2317
+ * Gets the latest status and summary for an order import.
2318
+ * @summary Get order import
2319
+ * @param {OrdersApiGetOrderImportRequest} requestParameters Request parameters.
2320
+ * @param {*} [options] Override http request option.
2321
+ * @throws {RequiredError}
2322
+ */
2323
+ public getOrderImport(requestParameters: OrdersApiGetOrderImportRequest, options?: RawAxiosRequestConfig) {
2324
+ return OrdersApiFp(this.configuration).getOrderImport(requestParameters.project, requestParameters.importId, options).then((request) => request(this.axios, this.basePath));
2325
+ }
2326
+
1869
2327
  /**
1870
2328
  * Lists all orders placed on this project, paginated into configurable chunks.
1871
2329
  * @summary List orders
@@ -1878,7 +2336,7 @@ export class OrdersApi extends BaseAPI {
1878
2336
  }
1879
2337
 
1880
2338
  /**
1881
- * Initiates an order import from a CSV file. The import is processed asynchronously.
2339
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
1882
2340
  * @summary Import orders
1883
2341
  * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1884
2342
  * @param {*} [options] Override http request option.
@@ -1888,6 +2346,28 @@ export class OrdersApi extends BaseAPI {
1888
2346
  return OrdersApiFp(this.configuration).importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
1889
2347
  }
1890
2348
 
2349
+ /**
2350
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
2351
+ * @summary List order import groups
2352
+ * @param {OrdersApiListOrderImportGroupsRequest} requestParameters Request parameters.
2353
+ * @param {*} [options] Override http request option.
2354
+ * @throws {RequiredError}
2355
+ */
2356
+ public listOrderImportGroups(requestParameters: OrdersApiListOrderImportGroupsRequest, options?: RawAxiosRequestConfig) {
2357
+ return OrdersApiFp(this.configuration).listOrderImportGroups(requestParameters.project, requestParameters.importId, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
2358
+ }
2359
+
2360
+ /**
2361
+ * Lists recent order imports for this project, ordered by most recent first.
2362
+ * @summary List order imports
2363
+ * @param {OrdersApiListOrderImportsRequest} requestParameters Request parameters.
2364
+ * @param {*} [options] Override http request option.
2365
+ * @throws {RequiredError}
2366
+ */
2367
+ public listOrderImports(requestParameters: OrdersApiListOrderImportsRequest, options?: RawAxiosRequestConfig) {
2368
+ return OrdersApiFp(this.configuration).listOrderImports(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
2369
+ }
2370
+
1891
2371
  /**
1892
2372
  * Retries failed platform payment, so fulfillment can proceed.
1893
2373
  * @summary Retry
@@ -1900,10 +2380,24 @@ export class OrdersApi extends BaseAPI {
1900
2380
  }
1901
2381
  }
1902
2382
 
2383
+ export const ExportOrdersDateFilterTypeEnum = {
2384
+ CreatedAt: 'createdAt',
2385
+ UpdatedAt: 'updatedAt',
2386
+ PaidAt: 'paidAt',
2387
+ StatusChangedAt: 'statusChangedAt',
2388
+ CompletedAt: 'completedAt',
2389
+ RefundedAt: 'refundedAt',
2390
+ QuoteAt: 'quoteAt'
2391
+ } as const;
2392
+ export type ExportOrdersDateFilterTypeEnum = typeof ExportOrdersDateFilterTypeEnum[keyof typeof ExportOrdersDateFilterTypeEnum];
1903
2393
  export const GetOrdersDateFilterTypeEnum = {
1904
2394
  CreatedAt: 'createdAt',
1905
2395
  UpdatedAt: 'updatedAt',
1906
- StatusChangedAt: 'statusChangedAt'
2396
+ PaidAt: 'paidAt',
2397
+ StatusChangedAt: 'statusChangedAt',
2398
+ CompletedAt: 'completedAt',
2399
+ RefundedAt: 'refundedAt',
2400
+ QuoteAt: 'quoteAt'
1907
2401
  } as const;
1908
2402
  export type GetOrdersDateFilterTypeEnum = typeof GetOrdersDateFilterTypeEnum[keyof typeof GetOrdersDateFilterTypeEnum];
1909
2403