@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.
@@ -0,0 +1,30 @@
1
+ # OrderImportError
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **code** | [**OrderImportErrorCode**](OrderImportErrorCode.md) | | [default to undefined]
9
+ **message** | **string** | A human-readable description of the error. | [default to undefined]
10
+ **fieldPath** | **string** | Dot-notation path to the field that caused the error (e.g. `items.sku`). | [optional] [default to undefined]
11
+ **sku** | **string** | The SKU that triggered the error, if applicable. | [optional] [default to undefined]
12
+ **suggestedFix** | **string** | A human-readable suggestion for how to resolve the error. | [optional] [default to undefined]
13
+ **referenceCode** | **string** | A unique reference code for this error occurrence, useful for support enquiries. | [optional] [default to undefined]
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import { OrderImportError } from '@teemill/orders';
19
+
20
+ const instance: OrderImportError = {
21
+ code,
22
+ message,
23
+ fieldPath,
24
+ sku,
25
+ suggestedFix,
26
+ referenceCode,
27
+ };
28
+ ```
29
+
30
+ [[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
+ # OrderImportErrorCode
2
+
3
+ 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
4
+
5
+ ## Enum
6
+
7
+ * `VariantNotFound` (value: `'VARIANT_NOT_FOUND'`)
8
+
9
+ * `MissingSku` (value: `'MISSING_SKU'`)
10
+
11
+ * `ShippingMethodUnavailable` (value: `'SHIPPING_METHOD_UNAVAILABLE'`)
12
+
13
+ * `TransientSystemError` (value: `'TRANSIENT_SYSTEM_ERROR'`)
14
+
15
+ * `ImportFailed` (value: `'IMPORT_FAILED'`)
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,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)
@@ -0,0 +1,21 @@
1
+ # OrderPaymentMethod
2
+
3
+ The payment method used for this order.
4
+
5
+ ## Properties
6
+
7
+ Name | Type | Description | Notes
8
+ ------------ | ------------- | ------------- | -------------
9
+ **type** | **string** | The type of payment method used. | [optional] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { OrderPaymentMethod } from '@teemill/orders';
15
+
16
+ const instance: OrderPaymentMethod = {
17
+ type,
18
+ };
19
+ ```
20
+
21
+ [[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,7 +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|
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|
14
18
  |[**retryPlatformPayment**](#retryplatformpayment) | **POST** /v1/orders/{orderId}/retryPlatformPayment | Retry|
15
19
 
16
20
  # **cancelOrder**
@@ -390,6 +394,65 @@ const { status, data } = await apiInstance.getOrder(
390
394
 
391
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)
392
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
+
393
456
  # **getOrders**
394
457
  > OrdersResponse getOrders()
395
458
 
@@ -472,6 +535,191 @@ const { status, data } = await apiInstance.getOrders(
472
535
 
473
536
  [[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)
474
537
 
538
+ # **importOrders**
539
+ > ImportOrders202Response importOrders()
540
+
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.
542
+
543
+ ### Example
544
+
545
+ ```typescript
546
+ import {
547
+ OrdersApi,
548
+ Configuration
549
+ } from '@teemill/orders';
550
+
551
+ const configuration = new Configuration();
552
+ const apiInstance = new OrdersApi(configuration);
553
+
554
+ let project: string; //The project identifier to scope the request to. (default to undefined)
555
+ let file: File; //CSV file containing order data (default to undefined)
556
+
557
+ const { status, data } = await apiInstance.importOrders(
558
+ project,
559
+ file
560
+ );
561
+ ```
562
+
563
+ ### Parameters
564
+
565
+ |Name | Type | Description | Notes|
566
+ |------------- | ------------- | ------------- | -------------|
567
+ | **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
568
+ | **file** | [**File**] | CSV file containing order data | defaults to undefined|
569
+
570
+
571
+ ### Return type
572
+
573
+ **ImportOrders202Response**
574
+
575
+ ### Authorization
576
+
577
+ [session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
578
+
579
+ ### HTTP request headers
580
+
581
+ - **Content-Type**: multipart/form-data
582
+ - **Accept**: application/json
583
+
584
+
585
+ ### HTTP response details
586
+ | Status code | Description | Response headers |
587
+ |-------------|-------------|------------------|
588
+ |**202** | CSV file was accepted; orders will be imported asynchronously. | - |
589
+ |**400** | Failed validation | - |
590
+ |**401** | Not authorised to access this resource | - |
591
+ |**403** | Refuse to authorize | - |
592
+ |**404** | Resource not found | - |
593
+ |**500** | Unknown server error | - |
594
+
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)
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
+
475
723
  # **retryPlatformPayment**
476
724
  > Order retryPlatformPayment()
477
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.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).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teemill/orders",
3
- "version": "1.25.0",
3
+ "version": "1.27.0",
4
4
  "description": "OpenAPI client for @teemill/orders",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {