@teemill/orders 1.25.0 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Orders API
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.25.0
7
+ * The version of the OpenAPI document: 1.27.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -371,6 +371,12 @@ export interface Image {
371
371
  */
372
372
  'sortOrder'?: number;
373
373
  }
374
+ export interface ImportOrders202Response {
375
+ /**
376
+ * Unique object identifier
377
+ */
378
+ 'importId'?: string;
379
+ }
374
380
  export interface Option {
375
381
  /**
376
382
  * Option name
@@ -398,7 +404,7 @@ export interface Order {
398
404
  */
399
405
  'status'?: Status;
400
406
  'contactInformation': ContactInformation;
401
- 'paymentMethod'?: PaymentMethod;
407
+ 'paymentMethod'?: OrderPaymentMethod;
402
408
  /**
403
409
  * The address the order will be shipped to.
404
410
  */
@@ -464,6 +470,147 @@ export interface Order {
464
470
  }
465
471
 
466
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
+ }
467
614
  /**
468
615
  * A line item in an order, representing a specific product variant and quantity.
469
616
  */
@@ -513,6 +660,15 @@ export interface OrderItem {
513
660
  */
514
661
  'recipientCost'?: Price;
515
662
  }
663
+ /**
664
+ * The payment method used for this order.
665
+ */
666
+ export interface OrderPaymentMethod {
667
+ /**
668
+ * The type of payment method used.
669
+ */
670
+ 'type'?: string | null;
671
+ }
516
672
  /**
517
673
  * Shipment tracking information. Available once the fulfillment has been dispatched.
518
674
  */
@@ -589,15 +745,6 @@ export const PaymentAttemptStatusEnum = {
589
745
 
590
746
  export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
591
747
 
592
- /**
593
- * The payment method used for this order.
594
- */
595
- export interface PaymentMethod {
596
- /**
597
- * The type of payment method used.
598
- */
599
- 'type'?: string | null;
600
- }
601
748
  /**
602
749
  * A monetary value with its currency.
603
750
  */
@@ -1122,6 +1269,54 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1122
1269
  options: localVarRequestOptions,
1123
1270
  };
1124
1271
  },
1272
+ /**
1273
+ * Gets the latest status and summary for an order import.
1274
+ * @summary Get order import
1275
+ * @param {string} project The project identifier to scope the request to.
1276
+ * @param {string} importId Unique identifier of an order import
1277
+ * @param {*} [options] Override http request option.
1278
+ * @throws {RequiredError}
1279
+ */
1280
+ getOrderImport: async (project: string, importId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1281
+ // verify required parameter 'project' is not null or undefined
1282
+ assertParamExists('getOrderImport', 'project', project)
1283
+ // verify required parameter 'importId' is not null or undefined
1284
+ assertParamExists('getOrderImport', 'importId', importId)
1285
+ const localVarPath = `/v1/orders/imports/{importId}`
1286
+ .replace(`{${"importId"}}`, encodeURIComponent(String(importId)));
1287
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1288
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1289
+ let baseOptions;
1290
+ if (configuration) {
1291
+ baseOptions = configuration.baseOptions;
1292
+ }
1293
+
1294
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1295
+ const localVarHeaderParameter = {} as any;
1296
+ const localVarQueryParameter = {} as any;
1297
+
1298
+ // authentication session-oauth required
1299
+ // oauth required
1300
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1301
+
1302
+ // authentication api-key required
1303
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1304
+
1305
+ if (project !== undefined) {
1306
+ localVarQueryParameter['project'] = project;
1307
+ }
1308
+
1309
+ localVarHeaderParameter['Accept'] = 'application/json';
1310
+
1311
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1312
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1313
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1314
+
1315
+ return {
1316
+ url: toPathString(localVarUrlObj),
1317
+ options: localVarRequestOptions,
1318
+ };
1319
+ },
1125
1320
  /**
1126
1321
  * Lists all orders placed on this project, paginated into configurable chunks.
1127
1322
  * @summary List orders
@@ -1215,6 +1410,172 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1215
1410
  options: localVarRequestOptions,
1216
1411
  };
1217
1412
  },
1413
+ /**
1414
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
1415
+ * @summary Import orders
1416
+ * @param {string} project The project identifier to scope the request to.
1417
+ * @param {File} file CSV file containing order data
1418
+ * @param {*} [options] Override http request option.
1419
+ * @throws {RequiredError}
1420
+ */
1421
+ importOrders: async (project: string, file: File, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1422
+ // verify required parameter 'project' is not null or undefined
1423
+ assertParamExists('importOrders', 'project', project)
1424
+ // verify required parameter 'file' is not null or undefined
1425
+ assertParamExists('importOrders', 'file', file)
1426
+ const localVarPath = `/v1/orders/imports`;
1427
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1428
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1429
+ let baseOptions;
1430
+ if (configuration) {
1431
+ baseOptions = configuration.baseOptions;
1432
+ }
1433
+
1434
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
1435
+ const localVarHeaderParameter = {} as any;
1436
+ const localVarQueryParameter = {} as any;
1437
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1438
+
1439
+ // authentication session-oauth required
1440
+ // oauth required
1441
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1442
+
1443
+ // authentication api-key required
1444
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1445
+
1446
+ if (project !== undefined) {
1447
+ localVarQueryParameter['project'] = project;
1448
+ }
1449
+
1450
+
1451
+ if (file !== undefined) {
1452
+ localVarFormParams.append('file', file as any);
1453
+ }
1454
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
1455
+ localVarHeaderParameter['Accept'] = 'application/json';
1456
+
1457
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1458
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1459
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1460
+ localVarRequestOptions.data = localVarFormParams;
1461
+
1462
+ return {
1463
+ url: toPathString(localVarUrlObj),
1464
+ options: localVarRequestOptions,
1465
+ };
1466
+ },
1467
+ /**
1468
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
1469
+ * @summary List order import groups
1470
+ * @param {string} project The project identifier to scope the request to.
1471
+ * @param {string} importId Unique identifier of an order import
1472
+ * @param {number} [pageToken] Page reference token
1473
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
1474
+ * @param {*} [options] Override http request option.
1475
+ * @throws {RequiredError}
1476
+ */
1477
+ listOrderImportGroups: async (project: string, importId: string, pageToken?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1478
+ // verify required parameter 'project' is not null or undefined
1479
+ assertParamExists('listOrderImportGroups', 'project', project)
1480
+ // verify required parameter 'importId' is not null or undefined
1481
+ assertParamExists('listOrderImportGroups', 'importId', importId)
1482
+ const localVarPath = `/v1/orders/imports/{importId}/groups`
1483
+ .replace(`{${"importId"}}`, encodeURIComponent(String(importId)));
1484
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1485
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1486
+ let baseOptions;
1487
+ if (configuration) {
1488
+ baseOptions = configuration.baseOptions;
1489
+ }
1490
+
1491
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1492
+ const localVarHeaderParameter = {} as any;
1493
+ const localVarQueryParameter = {} as any;
1494
+
1495
+ // authentication session-oauth required
1496
+ // oauth required
1497
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1498
+
1499
+ // authentication api-key required
1500
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1501
+
1502
+ if (project !== undefined) {
1503
+ localVarQueryParameter['project'] = project;
1504
+ }
1505
+
1506
+ if (pageToken !== undefined) {
1507
+ localVarQueryParameter['pageToken'] = pageToken;
1508
+ }
1509
+
1510
+ if (pageSize !== undefined) {
1511
+ localVarQueryParameter['pageSize'] = pageSize;
1512
+ }
1513
+
1514
+ localVarHeaderParameter['Accept'] = 'application/json';
1515
+
1516
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1517
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1518
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1519
+
1520
+ return {
1521
+ url: toPathString(localVarUrlObj),
1522
+ options: localVarRequestOptions,
1523
+ };
1524
+ },
1525
+ /**
1526
+ * Lists recent order imports for this project, ordered by most recent first.
1527
+ * @summary List order imports
1528
+ * @param {string} project The project identifier to scope the request to.
1529
+ * @param {number} [pageToken] Page reference token
1530
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
1531
+ * @param {*} [options] Override http request option.
1532
+ * @throws {RequiredError}
1533
+ */
1534
+ listOrderImports: async (project: string, pageToken?: number, pageSize?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1535
+ // verify required parameter 'project' is not null or undefined
1536
+ assertParamExists('listOrderImports', 'project', project)
1537
+ const localVarPath = `/v1/orders/imports`;
1538
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1539
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1540
+ let baseOptions;
1541
+ if (configuration) {
1542
+ baseOptions = configuration.baseOptions;
1543
+ }
1544
+
1545
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1546
+ const localVarHeaderParameter = {} as any;
1547
+ const localVarQueryParameter = {} as any;
1548
+
1549
+ // authentication session-oauth required
1550
+ // oauth required
1551
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1552
+
1553
+ // authentication api-key required
1554
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1555
+
1556
+ if (project !== undefined) {
1557
+ localVarQueryParameter['project'] = project;
1558
+ }
1559
+
1560
+ if (pageToken !== undefined) {
1561
+ localVarQueryParameter['pageToken'] = pageToken;
1562
+ }
1563
+
1564
+ if (pageSize !== undefined) {
1565
+ localVarQueryParameter['pageSize'] = pageSize;
1566
+ }
1567
+
1568
+ localVarHeaderParameter['Accept'] = 'application/json';
1569
+
1570
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1571
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1572
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1573
+
1574
+ return {
1575
+ url: toPathString(localVarUrlObj),
1576
+ options: localVarRequestOptions,
1577
+ };
1578
+ },
1218
1579
  /**
1219
1580
  * Retries failed platform payment, so fulfillment can proceed.
1220
1581
  * @summary Retry
@@ -1368,6 +1729,20 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1368
1729
  const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrder']?.[localVarOperationServerIndex]?.url;
1369
1730
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1370
1731
  },
1732
+ /**
1733
+ * Gets the latest status and summary for an order import.
1734
+ * @summary Get order import
1735
+ * @param {string} project The project identifier to scope the request to.
1736
+ * @param {string} importId Unique identifier of an order import
1737
+ * @param {*} [options] Override http request option.
1738
+ * @throws {RequiredError}
1739
+ */
1740
+ async getOrderImport(project: string, importId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderImport>> {
1741
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderImport(project, importId, options);
1742
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1743
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrderImport']?.[localVarOperationServerIndex]?.url;
1744
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1745
+ },
1371
1746
  /**
1372
1747
  * Lists all orders placed on this project, paginated into configurable chunks.
1373
1748
  * @summary List orders
@@ -1390,6 +1765,51 @@ export const OrdersApiFp = function(configuration?: Configuration) {
1390
1765
  const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrders']?.[localVarOperationServerIndex]?.url;
1391
1766
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1392
1767
  },
1768
+ /**
1769
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
1770
+ * @summary Import orders
1771
+ * @param {string} project The project identifier to scope the request to.
1772
+ * @param {File} file CSV file containing order data
1773
+ * @param {*} [options] Override http request option.
1774
+ * @throws {RequiredError}
1775
+ */
1776
+ async importOrders(project: string, file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportOrders202Response>> {
1777
+ const localVarAxiosArgs = await localVarAxiosParamCreator.importOrders(project, file, options);
1778
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1779
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.importOrders']?.[localVarOperationServerIndex]?.url;
1780
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1781
+ },
1782
+ /**
1783
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
1784
+ * @summary List order import groups
1785
+ * @param {string} project The project identifier to scope the request to.
1786
+ * @param {string} importId Unique identifier of an order import
1787
+ * @param {number} [pageToken] Page reference token
1788
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
1789
+ * @param {*} [options] Override http request option.
1790
+ * @throws {RequiredError}
1791
+ */
1792
+ async listOrderImportGroups(project: string, importId: string, pageToken?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderImportGroupsResponse>> {
1793
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listOrderImportGroups(project, importId, pageToken, pageSize, options);
1794
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1795
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.listOrderImportGroups']?.[localVarOperationServerIndex]?.url;
1796
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1797
+ },
1798
+ /**
1799
+ * Lists recent order imports for this project, ordered by most recent first.
1800
+ * @summary List order imports
1801
+ * @param {string} project The project identifier to scope the request to.
1802
+ * @param {number} [pageToken] Page reference token
1803
+ * @param {number} [pageSize] Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
1804
+ * @param {*} [options] Override http request option.
1805
+ * @throws {RequiredError}
1806
+ */
1807
+ async listOrderImports(project: string, pageToken?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderImportsResponse>> {
1808
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listOrderImports(project, pageToken, pageSize, options);
1809
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1810
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.listOrderImports']?.[localVarOperationServerIndex]?.url;
1811
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1812
+ },
1393
1813
  /**
1394
1814
  * Retries failed platform payment, so fulfillment can proceed.
1395
1815
  * @summary Retry
@@ -1474,6 +1894,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1474
1894
  getOrder(requestParameters: OrdersApiGetOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise<Order> {
1475
1895
  return localVarFp.getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(axios, basePath));
1476
1896
  },
1897
+ /**
1898
+ * Gets the latest status and summary for an order import.
1899
+ * @summary Get order import
1900
+ * @param {OrdersApiGetOrderImportRequest} requestParameters Request parameters.
1901
+ * @param {*} [options] Override http request option.
1902
+ * @throws {RequiredError}
1903
+ */
1904
+ getOrderImport(requestParameters: OrdersApiGetOrderImportRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrderImport> {
1905
+ return localVarFp.getOrderImport(requestParameters.project, requestParameters.importId, options).then((request) => request(axios, basePath));
1906
+ },
1477
1907
  /**
1478
1908
  * Lists all orders placed on this project, paginated into configurable chunks.
1479
1909
  * @summary List orders
@@ -1484,6 +1914,36 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
1484
1914
  getOrders(requestParameters: OrdersApiGetOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrdersResponse> {
1485
1915
  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));
1486
1916
  },
1917
+ /**
1918
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
1919
+ * @summary Import orders
1920
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
1921
+ * @param {*} [options] Override http request option.
1922
+ * @throws {RequiredError}
1923
+ */
1924
+ importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportOrders202Response> {
1925
+ return localVarFp.importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(axios, basePath));
1926
+ },
1927
+ /**
1928
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
1929
+ * @summary List order import groups
1930
+ * @param {OrdersApiListOrderImportGroupsRequest} requestParameters Request parameters.
1931
+ * @param {*} [options] Override http request option.
1932
+ * @throws {RequiredError}
1933
+ */
1934
+ listOrderImportGroups(requestParameters: OrdersApiListOrderImportGroupsRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrderImportGroupsResponse> {
1935
+ return localVarFp.listOrderImportGroups(requestParameters.project, requestParameters.importId, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1936
+ },
1937
+ /**
1938
+ * Lists recent order imports for this project, ordered by most recent first.
1939
+ * @summary List order imports
1940
+ * @param {OrdersApiListOrderImportsRequest} requestParameters Request parameters.
1941
+ * @param {*} [options] Override http request option.
1942
+ * @throws {RequiredError}
1943
+ */
1944
+ listOrderImports(requestParameters: OrdersApiListOrderImportsRequest, options?: RawAxiosRequestConfig): AxiosPromise<OrderImportsResponse> {
1945
+ return localVarFp.listOrderImports(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1946
+ },
1487
1947
  /**
1488
1948
  * Retries failed platform payment, so fulfillment can proceed.
1489
1949
  * @summary Retry
@@ -1622,6 +2082,21 @@ export interface OrdersApiGetOrderRequest {
1622
2082
  readonly fields?: string
1623
2083
  }
1624
2084
 
2085
+ /**
2086
+ * Request parameters for getOrderImport operation in OrdersApi.
2087
+ */
2088
+ export interface OrdersApiGetOrderImportRequest {
2089
+ /**
2090
+ * The project identifier to scope the request to.
2091
+ */
2092
+ readonly project: string
2093
+
2094
+ /**
2095
+ * Unique identifier of an order import
2096
+ */
2097
+ readonly importId: string
2098
+ }
2099
+
1625
2100
  /**
1626
2101
  * Request parameters for getOrders operation in OrdersApi.
1627
2102
  */
@@ -1677,6 +2152,66 @@ export interface OrdersApiGetOrdersRequest {
1677
2152
  readonly dateFilterType?: GetOrdersDateFilterTypeEnum
1678
2153
  }
1679
2154
 
2155
+ /**
2156
+ * Request parameters for importOrders operation in OrdersApi.
2157
+ */
2158
+ export interface OrdersApiImportOrdersRequest {
2159
+ /**
2160
+ * The project identifier to scope the request to.
2161
+ */
2162
+ readonly project: string
2163
+
2164
+ /**
2165
+ * CSV file containing order data
2166
+ */
2167
+ readonly file: File
2168
+ }
2169
+
2170
+ /**
2171
+ * Request parameters for listOrderImportGroups operation in OrdersApi.
2172
+ */
2173
+ export interface OrdersApiListOrderImportGroupsRequest {
2174
+ /**
2175
+ * The project identifier to scope the request to.
2176
+ */
2177
+ readonly project: string
2178
+
2179
+ /**
2180
+ * Unique identifier of an order import
2181
+ */
2182
+ readonly importId: string
2183
+
2184
+ /**
2185
+ * Page reference token
2186
+ */
2187
+ readonly pageToken?: number
2188
+
2189
+ /**
2190
+ * Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
2191
+ */
2192
+ readonly pageSize?: number
2193
+ }
2194
+
2195
+ /**
2196
+ * Request parameters for listOrderImports operation in OrdersApi.
2197
+ */
2198
+ export interface OrdersApiListOrderImportsRequest {
2199
+ /**
2200
+ * The project identifier to scope the request to.
2201
+ */
2202
+ readonly project: string
2203
+
2204
+ /**
2205
+ * Page reference token
2206
+ */
2207
+ readonly pageToken?: number
2208
+
2209
+ /**
2210
+ * Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller.
2211
+ */
2212
+ readonly pageSize?: number
2213
+ }
2214
+
1680
2215
  /**
1681
2216
  * Request parameters for retryPlatformPayment operation in OrdersApi.
1682
2217
  */
@@ -1767,6 +2302,17 @@ export class OrdersApi extends BaseAPI {
1767
2302
  return OrdersApiFp(this.configuration).getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
1768
2303
  }
1769
2304
 
2305
+ /**
2306
+ * Gets the latest status and summary for an order import.
2307
+ * @summary Get order import
2308
+ * @param {OrdersApiGetOrderImportRequest} requestParameters Request parameters.
2309
+ * @param {*} [options] Override http request option.
2310
+ * @throws {RequiredError}
2311
+ */
2312
+ public getOrderImport(requestParameters: OrdersApiGetOrderImportRequest, options?: RawAxiosRequestConfig) {
2313
+ return OrdersApiFp(this.configuration).getOrderImport(requestParameters.project, requestParameters.importId, options).then((request) => request(this.axios, this.basePath));
2314
+ }
2315
+
1770
2316
  /**
1771
2317
  * Lists all orders placed on this project, paginated into configurable chunks.
1772
2318
  * @summary List orders
@@ -1778,6 +2324,39 @@ export class OrdersApi extends BaseAPI {
1778
2324
  return OrdersApiFp(this.configuration).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(this.axios, this.basePath));
1779
2325
  }
1780
2326
 
2327
+ /**
2328
+ * Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
2329
+ * @summary Import orders
2330
+ * @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
2331
+ * @param {*} [options] Override http request option.
2332
+ * @throws {RequiredError}
2333
+ */
2334
+ public importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig) {
2335
+ return OrdersApiFp(this.configuration).importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
2336
+ }
2337
+
2338
+ /**
2339
+ * Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
2340
+ * @summary List order import groups
2341
+ * @param {OrdersApiListOrderImportGroupsRequest} requestParameters Request parameters.
2342
+ * @param {*} [options] Override http request option.
2343
+ * @throws {RequiredError}
2344
+ */
2345
+ public listOrderImportGroups(requestParameters: OrdersApiListOrderImportGroupsRequest, options?: RawAxiosRequestConfig) {
2346
+ return OrdersApiFp(this.configuration).listOrderImportGroups(requestParameters.project, requestParameters.importId, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
2347
+ }
2348
+
2349
+ /**
2350
+ * Lists recent order imports for this project, ordered by most recent first.
2351
+ * @summary List order imports
2352
+ * @param {OrdersApiListOrderImportsRequest} requestParameters Request parameters.
2353
+ * @param {*} [options] Override http request option.
2354
+ * @throws {RequiredError}
2355
+ */
2356
+ public listOrderImports(requestParameters: OrdersApiListOrderImportsRequest, options?: RawAxiosRequestConfig) {
2357
+ return OrdersApiFp(this.configuration).listOrderImports(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
2358
+ }
2359
+
1781
2360
  /**
1782
2361
  * Retries failed platform payment, so fulfillment can proceed.
1783
2362
  * @summary Retry