@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.
@@ -0,0 +1,40 @@
1
+ # OrderImportGroup
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **id** | **string** | Unique object identifier | [default to undefined]
9
+ **status** | [**OrderImportGroupStatus**](OrderImportGroupStatus.md) | | [default to undefined]
10
+ **merchantReference** | **string** | The merchant reference from the CSV rows belonging to this group. | [optional] [default to undefined]
11
+ **resultReference** | **string** | A URI reference to the order created by this group. Only present when the group status is `success`. | [optional] [default to undefined]
12
+ **message** | **string** | A human-readable message describing the outcome of this group. | [optional] [default to undefined]
13
+ **rowsCount** | **number** | The number of CSV rows that belong to this group. | [default to undefined]
14
+ **skus** | **Array<string>** | The distinct SKUs referenced by rows in this group. | [default to undefined]
15
+ **errors** | [**Array<OrderImportError>**](OrderImportError.md) | Errors encountered while processing this group. Empty when the group succeeded. | [default to undefined]
16
+ **createdAt** | **string** | | [optional] [default to undefined]
17
+ **startedAt** | **string** | | [optional] [default to undefined]
18
+ **finishedAt** | **string** | | [optional] [default to undefined]
19
+
20
+ ## Example
21
+
22
+ ```typescript
23
+ import { OrderImportGroup } from '@teemill/orders';
24
+
25
+ const instance: OrderImportGroup = {
26
+ id,
27
+ status,
28
+ merchantReference,
29
+ resultReference,
30
+ message,
31
+ rowsCount,
32
+ skus,
33
+ errors,
34
+ createdAt,
35
+ startedAt,
36
+ finishedAt,
37
+ };
38
+ ```
39
+
40
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,17 @@
1
+ # OrderImportGroupStatus
2
+
3
+ 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)
4
+
5
+ ## Enum
6
+
7
+ * `Pending` (value: `'pending'`)
8
+
9
+ * `Processing` (value: `'processing'`)
10
+
11
+ * `Success` (value: `'success'`)
12
+
13
+ * `Failed` (value: `'failed'`)
14
+
15
+ * `Cancelled` (value: `'cancelled'`)
16
+
17
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,22 @@
1
+ # OrderImportGroupsResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **groups** | [**Array<OrderImportGroup>**](OrderImportGroup.md) | | [optional] [default to undefined]
9
+ **nextPageToken** | **number** | | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { OrderImportGroupsResponse } from '@teemill/orders';
15
+
16
+ const instance: OrderImportGroupsResponse = {
17
+ groups,
18
+ nextPageToken,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,19 @@
1
+ # OrderImportStatus
2
+
3
+ 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
4
+
5
+ ## Enum
6
+
7
+ * `Queued` (value: `'queued'`)
8
+
9
+ * `Processing` (value: `'processing'`)
10
+
11
+ * `CompletedSuccess` (value: `'completedSuccess'`)
12
+
13
+ * `CompletedPartial` (value: `'completedPartial'`)
14
+
15
+ * `CompletedFailed` (value: `'completedFailed'`)
16
+
17
+ * `Cancelled` (value: `'cancelled'`)
18
+
19
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -0,0 +1,22 @@
1
+ # OrderImportsResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **imports** | [**Array<OrderImport>**](OrderImport.md) | | [optional] [default to undefined]
9
+ **nextPageToken** | **number** | | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { OrderImportsResponse } from '@teemill/orders';
15
+
16
+ const instance: OrderImportsResponse = {
17
+ imports,
18
+ nextPageToken,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/docs/OrdersApi.md CHANGED
@@ -10,8 +10,11 @@ All URIs are relative to *https://api.localhost:8080*
10
10
  |[**downloadInvoice**](#downloadinvoice) | **GET** /v1/orders/{orderId}/invoice | Download order invoice|
11
11
  |[**exportOrders**](#exportorders) | **GET** /v1/orders/export | Export orders|
12
12
  |[**getOrder**](#getorder) | **GET** /v1/orders/{orderId} | Get order|
13
+ |[**getOrderImport**](#getorderimport) | **GET** /v1/orders/imports/{importId} | Get order import|
13
14
  |[**getOrders**](#getorders) | **GET** /v1/orders | List orders|
14
- |[**importOrders**](#importorders) | **POST** /v1/orders/import | Import orders|
15
+ |[**importOrders**](#importorders) | **POST** /v1/orders/imports | Import orders|
16
+ |[**listOrderImportGroups**](#listorderimportgroups) | **GET** /v1/orders/imports/{importId}/groups | List order import groups|
17
+ |[**listOrderImports**](#listorderimports) | **GET** /v1/orders/imports | List order imports|
15
18
  |[**retryPlatformPayment**](#retryplatformpayment) | **POST** /v1/orders/{orderId}/retryPlatformPayment | Retry|
16
19
 
17
20
  # **cancelOrder**
@@ -391,6 +394,65 @@ const { status, data } = await apiInstance.getOrder(
391
394
 
392
395
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
393
396
 
397
+ # **getOrderImport**
398
+ > OrderImport getOrderImport()
399
+
400
+ Gets the latest status and summary for an order import.
401
+
402
+ ### Example
403
+
404
+ ```typescript
405
+ import {
406
+ OrdersApi,
407
+ Configuration
408
+ } from '@teemill/orders';
409
+
410
+ const configuration = new Configuration();
411
+ const apiInstance = new OrdersApi(configuration);
412
+
413
+ let project: string; //The project identifier to scope the request to. (default to undefined)
414
+ let importId: string; //Unique identifier of an order import (default to undefined)
415
+
416
+ const { status, data } = await apiInstance.getOrderImport(
417
+ project,
418
+ importId
419
+ );
420
+ ```
421
+
422
+ ### Parameters
423
+
424
+ |Name | Type | Description | Notes|
425
+ |------------- | ------------- | ------------- | -------------|
426
+ | **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
427
+ | **importId** | [**string**] | Unique identifier of an order import | defaults to undefined|
428
+
429
+
430
+ ### Return type
431
+
432
+ **OrderImport**
433
+
434
+ ### Authorization
435
+
436
+ [session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
437
+
438
+ ### HTTP request headers
439
+
440
+ - **Content-Type**: Not defined
441
+ - **Accept**: application/json
442
+
443
+
444
+ ### HTTP response details
445
+ | Status code | Description | Response headers |
446
+ |-------------|-------------|------------------|
447
+ |**200** | Summary status for a single order import. | - |
448
+ |**400** | Failed validation | - |
449
+ |**401** | Not authorised to access this resource | - |
450
+ |**403** | Refuse to authorize | - |
451
+ |**404** | Resource not found | - |
452
+ |**500** | Unknown server error | - |
453
+
454
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
455
+
394
456
  # **getOrders**
395
457
  > OrdersResponse getOrders()
396
458
 
@@ -476,7 +538,7 @@ const { status, data } = await apiInstance.getOrders(
476
538
  # **importOrders**
477
539
  > ImportOrders202Response importOrders()
478
540
 
479
- Initiates an order import from a CSV file. The import is processed asynchronously.
541
+ Initiates an order import from a CSV file. The import is processed asynchronously. Use the returned `importId` with the GET endpoints to track progress.
480
542
 
481
543
  ### Example
482
544
 
@@ -532,6 +594,132 @@ const { status, data } = await apiInstance.importOrders(
532
594
 
533
595
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
534
596
 
597
+ # **listOrderImportGroups**
598
+ > OrderImportGroupsResponse listOrderImportGroups()
599
+
600
+ Lists group-level outcomes for a specific order import. Each group represents one order from the CSV (grouped by merchant reference).
601
+
602
+ ### Example
603
+
604
+ ```typescript
605
+ import {
606
+ OrdersApi,
607
+ Configuration
608
+ } from '@teemill/orders';
609
+
610
+ const configuration = new Configuration();
611
+ const apiInstance = new OrdersApi(configuration);
612
+
613
+ let project: string; //The project identifier to scope the request to. (default to undefined)
614
+ let importId: string; //Unique identifier of an order import (default to undefined)
615
+ let pageToken: number; //Page reference token (optional) (default to 1)
616
+ let pageSize: number; //Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller. (optional) (default to 25)
617
+
618
+ const { status, data } = await apiInstance.listOrderImportGroups(
619
+ project,
620
+ importId,
621
+ pageToken,
622
+ pageSize
623
+ );
624
+ ```
625
+
626
+ ### Parameters
627
+
628
+ |Name | Type | Description | Notes|
629
+ |------------- | ------------- | ------------- | -------------|
630
+ | **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
631
+ | **importId** | [**string**] | Unique identifier of an order import | defaults to undefined|
632
+ | **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
633
+ | **pageSize** | [**number**] | Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller. | (optional) defaults to 25|
634
+
635
+
636
+ ### Return type
637
+
638
+ **OrderImportGroupsResponse**
639
+
640
+ ### Authorization
641
+
642
+ [session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
643
+
644
+ ### HTTP request headers
645
+
646
+ - **Content-Type**: Not defined
647
+ - **Accept**: application/json
648
+
649
+
650
+ ### HTTP response details
651
+ | Status code | Description | Response headers |
652
+ |-------------|-------------|------------------|
653
+ |**200** | Paginated group-level outcomes for an order import. | - |
654
+ |**400** | Failed validation | - |
655
+ |**401** | Not authorised to access this resource | - |
656
+ |**403** | Refuse to authorize | - |
657
+ |**404** | Resource not found | - |
658
+ |**500** | Unknown server error | - |
659
+
660
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
661
+
662
+ # **listOrderImports**
663
+ > OrderImportsResponse listOrderImports()
664
+
665
+ Lists recent order imports for this project, ordered by most recent first.
666
+
667
+ ### Example
668
+
669
+ ```typescript
670
+ import {
671
+ OrdersApi,
672
+ Configuration
673
+ } from '@teemill/orders';
674
+
675
+ const configuration = new Configuration();
676
+ const apiInstance = new OrdersApi(configuration);
677
+
678
+ let project: string; //The project identifier to scope the request to. (default to undefined)
679
+ let pageToken: number; //Page reference token (optional) (default to 1)
680
+ let pageSize: number; //Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller. (optional) (default to 25)
681
+
682
+ const { status, data } = await apiInstance.listOrderImports(
683
+ project,
684
+ pageToken,
685
+ pageSize
686
+ );
687
+ ```
688
+
689
+ ### Parameters
690
+
691
+ |Name | Type | Description | Notes|
692
+ |------------- | ------------- | ------------- | -------------|
693
+ | **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
694
+ | **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
695
+ | **pageSize** | [**number**] | Max page size for import endpoints. This is the maximum that will be returned, but it might be smaller. | (optional) defaults to 25|
696
+
697
+
698
+ ### Return type
699
+
700
+ **OrderImportsResponse**
701
+
702
+ ### Authorization
703
+
704
+ [session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
705
+
706
+ ### HTTP request headers
707
+
708
+ - **Content-Type**: Not defined
709
+ - **Accept**: application/json
710
+
711
+
712
+ ### HTTP response details
713
+ | Status code | Description | Response headers |
714
+ |-------------|-------------|------------------|
715
+ |**200** | Paginated list of order imports and their status summaries. | - |
716
+ |**400** | Failed validation | - |
717
+ |**401** | Not authorised to access this resource | - |
718
+ |**403** | Refuse to authorize | - |
719
+ |**500** | Unknown server error | - |
720
+
721
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
722
+
535
723
  # **retryPlatformPayment**
536
724
  > Order retryPlatformPayment()
537
725
 
package/index.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.26.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).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teemill/orders",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "OpenAPI client for @teemill/orders",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {