@teemill/orders 1.26.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/README.md +15 -3
- package/api.ts +476 -7
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +288 -6
- package/dist/api.js +287 -7
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +288 -6
- package/dist/esm/api.js +286 -6
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/ImportOrders202Response.md +1 -1
- package/docs/OrderImport.md +32 -0
- package/docs/OrderImportCounts.md +32 -0
- package/docs/OrderImportError.md +30 -0
- package/docs/OrderImportErrorCode.md +17 -0
- package/docs/OrderImportGroup.md +40 -0
- package/docs/OrderImportGroupStatus.md +17 -0
- package/docs/OrderImportGroupsResponse.md +22 -0
- package/docs/OrderImportStatus.md +19 -0
- package/docs/OrderImportsResponse.md +22 -0
- package/docs/OrdersApi.md +190 -2
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @teemill/orders@1.
|
|
1
|
+
## @teemill/orders@1.27.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @teemill/orders@1.
|
|
39
|
+
npm install @teemill/orders@1.27.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -57,8 +57,11 @@ Class | Method | HTTP request | Description
|
|
|
57
57
|
*OrdersApi* | [**downloadInvoice**](docs/OrdersApi.md#downloadinvoice) | **GET** /v1/orders/{orderId}/invoice | Download order invoice
|
|
58
58
|
*OrdersApi* | [**exportOrders**](docs/OrdersApi.md#exportorders) | **GET** /v1/orders/export | Export orders
|
|
59
59
|
*OrdersApi* | [**getOrder**](docs/OrdersApi.md#getorder) | **GET** /v1/orders/{orderId} | Get order
|
|
60
|
+
*OrdersApi* | [**getOrderImport**](docs/OrdersApi.md#getorderimport) | **GET** /v1/orders/imports/{importId} | Get order import
|
|
60
61
|
*OrdersApi* | [**getOrders**](docs/OrdersApi.md#getorders) | **GET** /v1/orders | List orders
|
|
61
|
-
*OrdersApi* | [**importOrders**](docs/OrdersApi.md#importorders) | **POST** /v1/orders/
|
|
62
|
+
*OrdersApi* | [**importOrders**](docs/OrdersApi.md#importorders) | **POST** /v1/orders/imports | Import orders
|
|
63
|
+
*OrdersApi* | [**listOrderImportGroups**](docs/OrdersApi.md#listorderimportgroups) | **GET** /v1/orders/imports/{importId}/groups | List order import groups
|
|
64
|
+
*OrdersApi* | [**listOrderImports**](docs/OrdersApi.md#listorderimports) | **GET** /v1/orders/imports | List order imports
|
|
62
65
|
*OrdersApi* | [**retryPlatformPayment**](docs/OrdersApi.md#retryplatformpayment) | **POST** /v1/orders/{orderId}/retryPlatformPayment | Retry
|
|
63
66
|
|
|
64
67
|
|
|
@@ -88,6 +91,15 @@ Class | Method | HTTP request | Description
|
|
|
88
91
|
- [ImportOrders202Response](docs/ImportOrders202Response.md)
|
|
89
92
|
- [Option](docs/Option.md)
|
|
90
93
|
- [Order](docs/Order.md)
|
|
94
|
+
- [OrderImport](docs/OrderImport.md)
|
|
95
|
+
- [OrderImportCounts](docs/OrderImportCounts.md)
|
|
96
|
+
- [OrderImportError](docs/OrderImportError.md)
|
|
97
|
+
- [OrderImportErrorCode](docs/OrderImportErrorCode.md)
|
|
98
|
+
- [OrderImportGroup](docs/OrderImportGroup.md)
|
|
99
|
+
- [OrderImportGroupStatus](docs/OrderImportGroupStatus.md)
|
|
100
|
+
- [OrderImportGroupsResponse](docs/OrderImportGroupsResponse.md)
|
|
101
|
+
- [OrderImportStatus](docs/OrderImportStatus.md)
|
|
102
|
+
- [OrderImportsResponse](docs/OrderImportsResponse.md)
|
|
91
103
|
- [OrderItem](docs/OrderItem.md)
|
|
92
104
|
- [OrderPaymentMethod](docs/OrderPaymentMethod.md)
|
|
93
105
|
- [OrderTracking](docs/OrderTracking.md)
|
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.
|
|
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).
|
|
@@ -373,7 +373,7 @@ export interface Image {
|
|
|
373
373
|
}
|
|
374
374
|
export interface ImportOrders202Response {
|
|
375
375
|
/**
|
|
376
|
-
*
|
|
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
|
*/
|
|
@@ -1128,6 +1269,54 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1128
1269
|
options: localVarRequestOptions,
|
|
1129
1270
|
};
|
|
1130
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
|
+
},
|
|
1131
1320
|
/**
|
|
1132
1321
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
1133
1322
|
* @summary List orders
|
|
@@ -1222,7 +1411,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1222
1411
|
};
|
|
1223
1412
|
},
|
|
1224
1413
|
/**
|
|
1225
|
-
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
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.
|
|
1226
1415
|
* @summary Import orders
|
|
1227
1416
|
* @param {string} project The project identifier to scope the request to.
|
|
1228
1417
|
* @param {File} file CSV file containing order data
|
|
@@ -1234,7 +1423,7 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1234
1423
|
assertParamExists('importOrders', 'project', project)
|
|
1235
1424
|
// verify required parameter 'file' is not null or undefined
|
|
1236
1425
|
assertParamExists('importOrders', 'file', file)
|
|
1237
|
-
const localVarPath = `/v1/orders/
|
|
1426
|
+
const localVarPath = `/v1/orders/imports`;
|
|
1238
1427
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1239
1428
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1240
1429
|
let baseOptions;
|
|
@@ -1275,6 +1464,118 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1275
1464
|
options: localVarRequestOptions,
|
|
1276
1465
|
};
|
|
1277
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
|
+
},
|
|
1278
1579
|
/**
|
|
1279
1580
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
1280
1581
|
* @summary Retry
|
|
@@ -1428,6 +1729,20 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1428
1729
|
const localVarOperationServerBasePath = operationServerMap['OrdersApi.getOrder']?.[localVarOperationServerIndex]?.url;
|
|
1429
1730
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1430
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
|
+
},
|
|
1431
1746
|
/**
|
|
1432
1747
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
1433
1748
|
* @summary List orders
|
|
@@ -1451,7 +1766,7 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1451
1766
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1452
1767
|
},
|
|
1453
1768
|
/**
|
|
1454
|
-
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
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.
|
|
1455
1770
|
* @summary Import orders
|
|
1456
1771
|
* @param {string} project The project identifier to scope the request to.
|
|
1457
1772
|
* @param {File} file CSV file containing order data
|
|
@@ -1464,6 +1779,37 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1464
1779
|
const localVarOperationServerBasePath = operationServerMap['OrdersApi.importOrders']?.[localVarOperationServerIndex]?.url;
|
|
1465
1780
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1466
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
|
+
},
|
|
1467
1813
|
/**
|
|
1468
1814
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
1469
1815
|
* @summary Retry
|
|
@@ -1548,6 +1894,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
|
|
|
1548
1894
|
getOrder(requestParameters: OrdersApiGetOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise<Order> {
|
|
1549
1895
|
return localVarFp.getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(axios, basePath));
|
|
1550
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
|
+
},
|
|
1551
1907
|
/**
|
|
1552
1908
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
1553
1909
|
* @summary List orders
|
|
@@ -1559,7 +1915,7 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
|
|
|
1559
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));
|
|
1560
1916
|
},
|
|
1561
1917
|
/**
|
|
1562
|
-
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
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.
|
|
1563
1919
|
* @summary Import orders
|
|
1564
1920
|
* @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
|
|
1565
1921
|
* @param {*} [options] Override http request option.
|
|
@@ -1568,6 +1924,26 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
|
|
|
1568
1924
|
importOrders(requestParameters: OrdersApiImportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ImportOrders202Response> {
|
|
1569
1925
|
return localVarFp.importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(axios, basePath));
|
|
1570
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
|
+
},
|
|
1571
1947
|
/**
|
|
1572
1948
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
1573
1949
|
* @summary Retry
|
|
@@ -1706,6 +2082,21 @@ export interface OrdersApiGetOrderRequest {
|
|
|
1706
2082
|
readonly fields?: string
|
|
1707
2083
|
}
|
|
1708
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
|
+
|
|
1709
2100
|
/**
|
|
1710
2101
|
* Request parameters for getOrders operation in OrdersApi.
|
|
1711
2102
|
*/
|
|
@@ -1776,6 +2167,51 @@ export interface OrdersApiImportOrdersRequest {
|
|
|
1776
2167
|
readonly file: File
|
|
1777
2168
|
}
|
|
1778
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
|
+
|
|
1779
2215
|
/**
|
|
1780
2216
|
* Request parameters for retryPlatformPayment operation in OrdersApi.
|
|
1781
2217
|
*/
|
|
@@ -1866,6 +2302,17 @@ export class OrdersApi extends BaseAPI {
|
|
|
1866
2302
|
return OrdersApiFp(this.configuration).getOrder(requestParameters.project, requestParameters.orderId, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
|
|
1867
2303
|
}
|
|
1868
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
|
+
|
|
1869
2316
|
/**
|
|
1870
2317
|
* Lists all orders placed on this project, paginated into configurable chunks.
|
|
1871
2318
|
* @summary List orders
|
|
@@ -1878,7 +2325,7 @@ export class OrdersApi extends BaseAPI {
|
|
|
1878
2325
|
}
|
|
1879
2326
|
|
|
1880
2327
|
/**
|
|
1881
|
-
* Initiates an order import from a CSV file. The import is processed asynchronously.
|
|
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.
|
|
1882
2329
|
* @summary Import orders
|
|
1883
2330
|
* @param {OrdersApiImportOrdersRequest} requestParameters Request parameters.
|
|
1884
2331
|
* @param {*} [options] Override http request option.
|
|
@@ -1888,6 +2335,28 @@ export class OrdersApi extends BaseAPI {
|
|
|
1888
2335
|
return OrdersApiFp(this.configuration).importOrders(requestParameters.project, requestParameters.file, options).then((request) => request(this.axios, this.basePath));
|
|
1889
2336
|
}
|
|
1890
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
|
+
|
|
1891
2360
|
/**
|
|
1892
2361
|
* Retries failed platform payment, so fulfillment can proceed.
|
|
1893
2362
|
* @summary Retry
|
package/base.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.
|
|
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).
|
package/common.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.
|
|
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).
|
package/configuration.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Orders API
|
|
4
4
|
* 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.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 1.
|
|
6
|
+
* The version of the OpenAPI document: 1.27.0
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|