@teemill/gfn-catalog 3.5.0 → 3.6.1
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 +73 -2
- package/api.ts +50 -25
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +53 -28
- package/dist/api.js +1 -1
- 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 +53 -28
- package/dist/esm/api.js +1 -1
- 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/ApiError.md +22 -0
- package/docs/ApiValidationError.md +22 -0
- package/docs/Attribute.md +26 -0
- package/docs/AttributeThumbnail.md +23 -0
- package/docs/ExportTransactionsRequest.md +20 -0
- package/docs/Fulfillment.md +26 -0
- package/docs/Image.md +33 -0
- package/docs/InlineObject.md +22 -0
- package/docs/InlineObject1.md +22 -0
- package/docs/InlineObject2.md +22 -0
- package/docs/Location.md +22 -0
- package/docs/Product.md +40 -0
- package/docs/ProductAttribute.md +24 -0
- package/docs/ProductAttributeValuesInner.md +22 -0
- package/docs/ProductBrand.md +22 -0
- package/docs/ProductImagesInner.md +26 -0
- package/docs/ProductVariantsInner.md +22 -0
- package/docs/ProductsApi.md +138 -0
- package/docs/ProductsResponse.md +22 -0
- package/docs/Statement.md +34 -0
- package/docs/StatementsApi.md +132 -0
- package/docs/Stock.md +22 -0
- package/docs/StockResponse.md +22 -0
- package/docs/Transaction.md +38 -0
- package/docs/TransactionsApi.md +205 -0
- package/docs/Variant.md +34 -0
- package/docs/VariantManufacturerOrigin.md +23 -0
- package/docs/VariantProduct.md +22 -0
- package/docs/VariantStock.md +26 -0
- package/docs/VariantsApi.md +268 -0
- package/docs/VariantsResponse.md +22 -0
- package/index.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# TransactionsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.podos.io*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**exportTransactions**](#exporttransactions) | **POST** /v1/gfn/transactions/export | Export GFN transactions|
|
|
8
|
+
|[**listFulfillments**](#listfulfillments) | **GET** /v1/gfn/transactions/fulfillments | Lists the GFN fulfillments of the project|
|
|
9
|
+
|[**listTransactions**](#listtransactions) | **GET** /v1/gfn/transactions | List GFN transactions|
|
|
10
|
+
|
|
11
|
+
# **exportTransactions**
|
|
12
|
+
> File exportTransactions(exportTransactionsRequest)
|
|
13
|
+
|
|
14
|
+
Exports all GFN transactions available to the project
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import {
|
|
20
|
+
TransactionsApi,
|
|
21
|
+
Configuration,
|
|
22
|
+
ExportTransactionsRequest
|
|
23
|
+
} from '@teemill/gfn-catalog';
|
|
24
|
+
|
|
25
|
+
const configuration = new Configuration();
|
|
26
|
+
const apiInstance = new TransactionsApi(configuration);
|
|
27
|
+
|
|
28
|
+
let project: string; //What project it is (default to undefined)
|
|
29
|
+
let exportTransactionsRequest: ExportTransactionsRequest; //Period selection data for the export
|
|
30
|
+
|
|
31
|
+
const { status, data } = await apiInstance.exportTransactions(
|
|
32
|
+
project,
|
|
33
|
+
exportTransactionsRequest
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Parameters
|
|
38
|
+
|
|
39
|
+
|Name | Type | Description | Notes|
|
|
40
|
+
|------------- | ------------- | ------------- | -------------|
|
|
41
|
+
| **exportTransactionsRequest** | **ExportTransactionsRequest**| Period selection data for the export | |
|
|
42
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Return type
|
|
46
|
+
|
|
47
|
+
**File**
|
|
48
|
+
|
|
49
|
+
### Authorization
|
|
50
|
+
|
|
51
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
52
|
+
|
|
53
|
+
### HTTP request headers
|
|
54
|
+
|
|
55
|
+
- **Content-Type**: application/json
|
|
56
|
+
- **Accept**: text/csv; charset=utf-8, application/json
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### HTTP response details
|
|
60
|
+
| Status code | Description | Response headers |
|
|
61
|
+
|-------------|-------------|------------------|
|
|
62
|
+
|**200** | Returns the CSV export | - |
|
|
63
|
+
|**202** | The export has been queued and will be available shortly | - |
|
|
64
|
+
|**204** | Export contains no data | - |
|
|
65
|
+
|**400** | Failed validation. | - |
|
|
66
|
+
|**401** | Not authorised to access this resource. | - |
|
|
67
|
+
|**403** | Refuse to authorize. | - |
|
|
68
|
+
|**500** | Unknown server error. | - |
|
|
69
|
+
|
|
70
|
+
[[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)
|
|
71
|
+
|
|
72
|
+
# **listFulfillments**
|
|
73
|
+
> InlineObject2 listFulfillments()
|
|
74
|
+
|
|
75
|
+
Lists all the fulfillments in the project with GFN transactions
|
|
76
|
+
|
|
77
|
+
### Example
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import {
|
|
81
|
+
TransactionsApi,
|
|
82
|
+
Configuration
|
|
83
|
+
} from '@teemill/gfn-catalog';
|
|
84
|
+
|
|
85
|
+
const configuration = new Configuration();
|
|
86
|
+
const apiInstance = new TransactionsApi(configuration);
|
|
87
|
+
|
|
88
|
+
let project: string; //What project it is (default to undefined)
|
|
89
|
+
let pageToken: number; //Page reference token (optional) (default to 1)
|
|
90
|
+
let pageSize: number; //Max page size. This is the maximum page size that will be returned, but it might be smaller. (optional) (default to 100)
|
|
91
|
+
let statementId: string; // (optional) (default to undefined)
|
|
92
|
+
|
|
93
|
+
const { status, data } = await apiInstance.listFulfillments(
|
|
94
|
+
project,
|
|
95
|
+
pageToken,
|
|
96
|
+
pageSize,
|
|
97
|
+
statementId
|
|
98
|
+
);
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Parameters
|
|
102
|
+
|
|
103
|
+
|Name | Type | Description | Notes|
|
|
104
|
+
|------------- | ------------- | ------------- | -------------|
|
|
105
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
106
|
+
| **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
|
|
107
|
+
| **pageSize** | [**number**] | Max page size. This is the maximum page size that will be returned, but it might be smaller. | (optional) defaults to 100|
|
|
108
|
+
| **statementId** | [**string**] | | (optional) defaults to undefined|
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### Return type
|
|
112
|
+
|
|
113
|
+
**InlineObject2**
|
|
114
|
+
|
|
115
|
+
### Authorization
|
|
116
|
+
|
|
117
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
118
|
+
|
|
119
|
+
### HTTP request headers
|
|
120
|
+
|
|
121
|
+
- **Content-Type**: Not defined
|
|
122
|
+
- **Accept**: application/json
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### HTTP response details
|
|
126
|
+
| Status code | Description | Response headers |
|
|
127
|
+
|-------------|-------------|------------------|
|
|
128
|
+
|**200** | Successfully retrieved GFN fulfillments. | - |
|
|
129
|
+
|**400** | Failed validation. | - |
|
|
130
|
+
|**401** | Not authorised to access this resource. | - |
|
|
131
|
+
|**403** | Refuse to authorize. | - |
|
|
132
|
+
|**500** | Unknown server error. | - |
|
|
133
|
+
|
|
134
|
+
[[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)
|
|
135
|
+
|
|
136
|
+
# **listTransactions**
|
|
137
|
+
> InlineObject1 listTransactions()
|
|
138
|
+
|
|
139
|
+
Lists all GFN transactions available to the project
|
|
140
|
+
|
|
141
|
+
### Example
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
import {
|
|
145
|
+
TransactionsApi,
|
|
146
|
+
Configuration
|
|
147
|
+
} from '@teemill/gfn-catalog';
|
|
148
|
+
|
|
149
|
+
const configuration = new Configuration();
|
|
150
|
+
const apiInstance = new TransactionsApi(configuration);
|
|
151
|
+
|
|
152
|
+
let project: string; //What project it is (default to undefined)
|
|
153
|
+
let pageToken: number; //Page reference token (optional) (default to 1)
|
|
154
|
+
let pageSize: number; //Max page size. This is the maximum page size that will be returned, but it might be smaller. (optional) (default to 100)
|
|
155
|
+
let statementId: string; // (optional) (default to undefined)
|
|
156
|
+
let fulfillmentId: string; // (optional) (default to undefined)
|
|
157
|
+
let search: string; //Search by fulfillment id (optional) (default to undefined)
|
|
158
|
+
|
|
159
|
+
const { status, data } = await apiInstance.listTransactions(
|
|
160
|
+
project,
|
|
161
|
+
pageToken,
|
|
162
|
+
pageSize,
|
|
163
|
+
statementId,
|
|
164
|
+
fulfillmentId,
|
|
165
|
+
search
|
|
166
|
+
);
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Parameters
|
|
170
|
+
|
|
171
|
+
|Name | Type | Description | Notes|
|
|
172
|
+
|------------- | ------------- | ------------- | -------------|
|
|
173
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
174
|
+
| **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
|
|
175
|
+
| **pageSize** | [**number**] | Max page size. This is the maximum page size that will be returned, but it might be smaller. | (optional) defaults to 100|
|
|
176
|
+
| **statementId** | [**string**] | | (optional) defaults to undefined|
|
|
177
|
+
| **fulfillmentId** | [**string**] | | (optional) defaults to undefined|
|
|
178
|
+
| **search** | [**string**] | Search by fulfillment id | (optional) defaults to undefined|
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
### Return type
|
|
182
|
+
|
|
183
|
+
**InlineObject1**
|
|
184
|
+
|
|
185
|
+
### Authorization
|
|
186
|
+
|
|
187
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
188
|
+
|
|
189
|
+
### HTTP request headers
|
|
190
|
+
|
|
191
|
+
- **Content-Type**: Not defined
|
|
192
|
+
- **Accept**: application/json
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
### HTTP response details
|
|
196
|
+
| Status code | Description | Response headers |
|
|
197
|
+
|-------------|-------------|------------------|
|
|
198
|
+
|**200** | Successfully retrieved GFN transactions. | - |
|
|
199
|
+
|**400** | Failed validation. | - |
|
|
200
|
+
|**401** | Not authorised to access this resource. | - |
|
|
201
|
+
|**403** | Refuse to authorize. | - |
|
|
202
|
+
|**500** | Unknown server error. | - |
|
|
203
|
+
|
|
204
|
+
[[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)
|
|
205
|
+
|
package/docs/Variant.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Variant
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | Unique object identifier | [optional] [default to undefined]
|
|
9
|
+
**ref** | **string** | A reference to the resource location | [optional] [default to undefined]
|
|
10
|
+
**product** | [**VariantProduct**](VariantProduct.md) | | [optional] [default to undefined]
|
|
11
|
+
**sku** | **string** | | [default to undefined]
|
|
12
|
+
**attributes** | [**Array<Attribute>**](Attribute.md) | Attributes associated to a variant such as Colour and Size. An attribute can have thumbnail type of `text`, `color`, or `image`. Attribute tags are intended for grouping and filtering, e.g. by a group of colours. | [default to undefined]
|
|
13
|
+
**manufacturerOrigin** | [**VariantManufacturerOrigin**](VariantManufacturerOrigin.md) | | [optional] [default to undefined]
|
|
14
|
+
**stock** | [**Stock**](Stock.md) | | [optional] [default to undefined]
|
|
15
|
+
**images** | [**Array<Image>**](Image.md) | Images | [optional] [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { Variant } from '@teemill/gfn-catalog';
|
|
21
|
+
|
|
22
|
+
const instance: Variant = {
|
|
23
|
+
id,
|
|
24
|
+
ref,
|
|
25
|
+
product,
|
|
26
|
+
sku,
|
|
27
|
+
attributes,
|
|
28
|
+
manufacturerOrigin,
|
|
29
|
+
stock,
|
|
30
|
+
images,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[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,23 @@
|
|
|
1
|
+
# VariantManufacturerOrigin
|
|
2
|
+
|
|
3
|
+
Where the product was originally produced or manufactured
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**country** | **string** | Country of origin (ISO 3166-1 alpha-2). | [optional] [default to undefined]
|
|
10
|
+
**name** | **string** | Name of the country of origin | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { VariantManufacturerOrigin } from '@teemill/gfn-catalog';
|
|
16
|
+
|
|
17
|
+
const instance: VariantManufacturerOrigin = {
|
|
18
|
+
country,
|
|
19
|
+
name,
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[[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
|
+
# VariantProduct
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | Unique object identifier | [optional] [default to undefined]
|
|
9
|
+
**ref** | **string** | A reference to the resource location | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { VariantProduct } from '@teemill/gfn-catalog';
|
|
15
|
+
|
|
16
|
+
const instance: VariantProduct = {
|
|
17
|
+
id,
|
|
18
|
+
ref,
|
|
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,26 @@
|
|
|
1
|
+
# VariantStock
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**id** | **string** | Unique object identifier | [optional] [default to undefined]
|
|
9
|
+
**ref** | **string** | A reference to the resource location | [optional] [default to undefined]
|
|
10
|
+
**productRef** | **string** | A reference to the resource location | [optional] [default to undefined]
|
|
11
|
+
**stock** | [**Stock**](Stock.md) | | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { VariantStock } from '@teemill/gfn-catalog';
|
|
17
|
+
|
|
18
|
+
const instance: VariantStock = {
|
|
19
|
+
id,
|
|
20
|
+
ref,
|
|
21
|
+
productRef,
|
|
22
|
+
stock,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[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,268 @@
|
|
|
1
|
+
# VariantsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.podos.io*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**getStock**](#getstock) | **GET** /v1/gfn/catalog/stock/{variantId} | Get GFN variant stock|
|
|
8
|
+
|[**getVariant**](#getvariant) | **GET** /v1/gfn/catalog/variants/{variantId} | Get a GFN variant|
|
|
9
|
+
|[**listStock**](#liststock) | **GET** /v1/gfn/catalog/stock | List GFN variant stock|
|
|
10
|
+
|[**listVariants**](#listvariants) | **GET** /v1/gfn/catalog/variants | List GFN variants|
|
|
11
|
+
|
|
12
|
+
# **getStock**
|
|
13
|
+
> VariantStock getStock()
|
|
14
|
+
|
|
15
|
+
Gets the stock level for the GFN variant with the given ID.
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import {
|
|
21
|
+
VariantsApi,
|
|
22
|
+
Configuration
|
|
23
|
+
} from '@teemill/gfn-catalog';
|
|
24
|
+
|
|
25
|
+
const configuration = new Configuration();
|
|
26
|
+
const apiInstance = new VariantsApi(configuration);
|
|
27
|
+
|
|
28
|
+
let project: string; //What project it is (default to undefined)
|
|
29
|
+
let variantId: string; //Variants unique identifier (default to undefined)
|
|
30
|
+
let fulfillmentProjects: string; //Fetch stock levels from specific fulfiller projects (optional) (default to undefined)
|
|
31
|
+
|
|
32
|
+
const { status, data } = await apiInstance.getStock(
|
|
33
|
+
project,
|
|
34
|
+
variantId,
|
|
35
|
+
fulfillmentProjects
|
|
36
|
+
);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Parameters
|
|
40
|
+
|
|
41
|
+
|Name | Type | Description | Notes|
|
|
42
|
+
|------------- | ------------- | ------------- | -------------|
|
|
43
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
44
|
+
| **variantId** | [**string**] | Variants unique identifier | defaults to undefined|
|
|
45
|
+
| **fulfillmentProjects** | [**string**] | Fetch stock levels from specific fulfiller projects | (optional) defaults to undefined|
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Return type
|
|
49
|
+
|
|
50
|
+
**VariantStock**
|
|
51
|
+
|
|
52
|
+
### Authorization
|
|
53
|
+
|
|
54
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
55
|
+
|
|
56
|
+
### HTTP request headers
|
|
57
|
+
|
|
58
|
+
- **Content-Type**: Not defined
|
|
59
|
+
- **Accept**: application/json
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### HTTP response details
|
|
63
|
+
| Status code | Description | Response headers |
|
|
64
|
+
|-------------|-------------|------------------|
|
|
65
|
+
|**200** | Successfully retrieved a GFN variant stock level. | - |
|
|
66
|
+
|**400** | Failed validation. | - |
|
|
67
|
+
|**401** | Not authorised to access this resource. | - |
|
|
68
|
+
|**403** | Refuse to authorize. | - |
|
|
69
|
+
|**500** | Unknown server error. | - |
|
|
70
|
+
|
|
71
|
+
[[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)
|
|
72
|
+
|
|
73
|
+
# **getVariant**
|
|
74
|
+
> Variant getVariant()
|
|
75
|
+
|
|
76
|
+
Gets a GFN variant by the given ID.
|
|
77
|
+
|
|
78
|
+
### Example
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
import {
|
|
82
|
+
VariantsApi,
|
|
83
|
+
Configuration
|
|
84
|
+
} from '@teemill/gfn-catalog';
|
|
85
|
+
|
|
86
|
+
const configuration = new Configuration();
|
|
87
|
+
const apiInstance = new VariantsApi(configuration);
|
|
88
|
+
|
|
89
|
+
let project: string; //What project it is (default to undefined)
|
|
90
|
+
let variantId: string; //Variants unique identifier (default to undefined)
|
|
91
|
+
let fields: string; //Filter response fields to only include a subset of the resource. (optional) (default to undefined)
|
|
92
|
+
|
|
93
|
+
const { status, data } = await apiInstance.getVariant(
|
|
94
|
+
project,
|
|
95
|
+
variantId,
|
|
96
|
+
fields
|
|
97
|
+
);
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Parameters
|
|
101
|
+
|
|
102
|
+
|Name | Type | Description | Notes|
|
|
103
|
+
|------------- | ------------- | ------------- | -------------|
|
|
104
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
105
|
+
| **variantId** | [**string**] | Variants unique identifier | defaults to undefined|
|
|
106
|
+
| **fields** | [**string**] | Filter response fields to only include a subset of the resource. | (optional) defaults to undefined|
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Return type
|
|
110
|
+
|
|
111
|
+
**Variant**
|
|
112
|
+
|
|
113
|
+
### Authorization
|
|
114
|
+
|
|
115
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
116
|
+
|
|
117
|
+
### HTTP request headers
|
|
118
|
+
|
|
119
|
+
- **Content-Type**: Not defined
|
|
120
|
+
- **Accept**: application/json
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### HTTP response details
|
|
124
|
+
| Status code | Description | Response headers |
|
|
125
|
+
|-------------|-------------|------------------|
|
|
126
|
+
|**200** | Successfully retrieved a GFN variant. | - |
|
|
127
|
+
|**400** | Failed validation. | - |
|
|
128
|
+
|**401** | Not authorised to access this resource. | - |
|
|
129
|
+
|**403** | Refuse to authorize. | - |
|
|
130
|
+
|**404** | Resource not found. | - |
|
|
131
|
+
|**500** | Unknown server error. | - |
|
|
132
|
+
|
|
133
|
+
[[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)
|
|
134
|
+
|
|
135
|
+
# **listStock**
|
|
136
|
+
> StockResponse listStock()
|
|
137
|
+
|
|
138
|
+
Lists the stock levels for all GFN variants available to the project.
|
|
139
|
+
|
|
140
|
+
### Example
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import {
|
|
144
|
+
VariantsApi,
|
|
145
|
+
Configuration
|
|
146
|
+
} from '@teemill/gfn-catalog';
|
|
147
|
+
|
|
148
|
+
const configuration = new Configuration();
|
|
149
|
+
const apiInstance = new VariantsApi(configuration);
|
|
150
|
+
|
|
151
|
+
let project: string; //What project it is (default to undefined)
|
|
152
|
+
let fulfillmentProjects: string; //Fetch stock levels from specific fulfiller projects (optional) (default to undefined)
|
|
153
|
+
let pageToken: number; //Page reference token (optional) (default to 1)
|
|
154
|
+
let pageSize: number; //Max page size. This is the maximum page size that will be returned, but it might be smaller. (optional) (default to 100)
|
|
155
|
+
let search: string; //Search terms to filter based on. (optional) (default to undefined)
|
|
156
|
+
|
|
157
|
+
const { status, data } = await apiInstance.listStock(
|
|
158
|
+
project,
|
|
159
|
+
fulfillmentProjects,
|
|
160
|
+
pageToken,
|
|
161
|
+
pageSize,
|
|
162
|
+
search
|
|
163
|
+
);
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Parameters
|
|
167
|
+
|
|
168
|
+
|Name | Type | Description | Notes|
|
|
169
|
+
|------------- | ------------- | ------------- | -------------|
|
|
170
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
171
|
+
| **fulfillmentProjects** | [**string**] | Fetch stock levels from specific fulfiller projects | (optional) defaults to undefined|
|
|
172
|
+
| **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
|
|
173
|
+
| **pageSize** | [**number**] | Max page size. This is the maximum page size that will be returned, but it might be smaller. | (optional) defaults to 100|
|
|
174
|
+
| **search** | [**string**] | Search terms to filter based on. | (optional) defaults to undefined|
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### Return type
|
|
178
|
+
|
|
179
|
+
**StockResponse**
|
|
180
|
+
|
|
181
|
+
### Authorization
|
|
182
|
+
|
|
183
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
184
|
+
|
|
185
|
+
### HTTP request headers
|
|
186
|
+
|
|
187
|
+
- **Content-Type**: Not defined
|
|
188
|
+
- **Accept**: application/json
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### HTTP response details
|
|
192
|
+
| Status code | Description | Response headers |
|
|
193
|
+
|-------------|-------------|------------------|
|
|
194
|
+
|**200** | Successfully retrieved all GFN variant stock levels. | - |
|
|
195
|
+
|**400** | Failed validation. | - |
|
|
196
|
+
|**401** | Not authorised to access this resource. | - |
|
|
197
|
+
|**403** | Refuse to authorize. | - |
|
|
198
|
+
|**500** | Unknown server error. | - |
|
|
199
|
+
|
|
200
|
+
[[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)
|
|
201
|
+
|
|
202
|
+
# **listVariants**
|
|
203
|
+
> VariantsResponse listVariants()
|
|
204
|
+
|
|
205
|
+
Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
|
|
206
|
+
|
|
207
|
+
### Example
|
|
208
|
+
|
|
209
|
+
```typescript
|
|
210
|
+
import {
|
|
211
|
+
VariantsApi,
|
|
212
|
+
Configuration
|
|
213
|
+
} from '@teemill/gfn-catalog';
|
|
214
|
+
|
|
215
|
+
const configuration = new Configuration();
|
|
216
|
+
const apiInstance = new VariantsApi(configuration);
|
|
217
|
+
|
|
218
|
+
let project: string; //What project it is (default to undefined)
|
|
219
|
+
let pageToken: number; //Page reference token (optional) (default to 1)
|
|
220
|
+
let pageSize: number; //Max page size. This is the maximum page size that will be returned, but it might be smaller. (optional) (default to 100)
|
|
221
|
+
let fields: string; //Filter response fields to only include a subset of the resource. (optional) (default to undefined)
|
|
222
|
+
let search: string; //Search terms to filter based on. (optional) (default to undefined)
|
|
223
|
+
|
|
224
|
+
const { status, data } = await apiInstance.listVariants(
|
|
225
|
+
project,
|
|
226
|
+
pageToken,
|
|
227
|
+
pageSize,
|
|
228
|
+
fields,
|
|
229
|
+
search
|
|
230
|
+
);
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Parameters
|
|
234
|
+
|
|
235
|
+
|Name | Type | Description | Notes|
|
|
236
|
+
|------------- | ------------- | ------------- | -------------|
|
|
237
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
238
|
+
| **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
|
|
239
|
+
| **pageSize** | [**number**] | Max page size. This is the maximum page size that will be returned, but it might be smaller. | (optional) defaults to 100|
|
|
240
|
+
| **fields** | [**string**] | Filter response fields to only include a subset of the resource. | (optional) defaults to undefined|
|
|
241
|
+
| **search** | [**string**] | Search terms to filter based on. | (optional) defaults to undefined|
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
### Return type
|
|
245
|
+
|
|
246
|
+
**VariantsResponse**
|
|
247
|
+
|
|
248
|
+
### Authorization
|
|
249
|
+
|
|
250
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
251
|
+
|
|
252
|
+
### HTTP request headers
|
|
253
|
+
|
|
254
|
+
- **Content-Type**: Not defined
|
|
255
|
+
- **Accept**: application/json
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
### HTTP response details
|
|
259
|
+
| Status code | Description | Response headers |
|
|
260
|
+
|-------------|-------------|------------------|
|
|
261
|
+
|**200** | Successfully retrieved all GFN variants. | - |
|
|
262
|
+
|**400** | Failed validation. | - |
|
|
263
|
+
|**401** | Not authorised to access this resource. | - |
|
|
264
|
+
|**403** | Refuse to authorize. | - |
|
|
265
|
+
|**500** | Unknown server error. | - |
|
|
266
|
+
|
|
267
|
+
[[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)
|
|
268
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# VariantsResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**variants** | [**Array<Variant>**](Variant.md) | | [optional] [default to undefined]
|
|
9
|
+
**nextPageToken** | **number** | | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { VariantsResponse } from '@teemill/gfn-catalog';
|
|
15
|
+
|
|
16
|
+
const instance: VariantsResponse = {
|
|
17
|
+
variants,
|
|
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/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* GFN Catalog API
|
|
5
5
|
* Use this API to access the Global Fulfillment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 3.
|
|
7
|
+
* The version of the OpenAPI document: 3.6.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|