@teemill/gfn-catalog 1.4.0 → 2.0.2

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.
Files changed (164) hide show
  1. package/.openapi-generator/FILES +6 -28
  2. package/README.md +3 -3
  3. package/api.ts +1892 -0
  4. package/base.ts +86 -0
  5. package/common.ts +150 -0
  6. package/configuration.ts +110 -0
  7. package/dist/api.d.ts +1287 -0
  8. package/dist/api.js +966 -0
  9. package/dist/base.d.ts +66 -0
  10. package/dist/base.js +65 -0
  11. package/dist/common.d.ts +65 -0
  12. package/dist/common.js +161 -0
  13. package/dist/configuration.d.ts +91 -0
  14. package/dist/configuration.js +43 -0
  15. package/dist/esm/api.d.ts +1287 -0
  16. package/dist/esm/api.js +947 -0
  17. package/dist/esm/base.d.ts +66 -0
  18. package/dist/esm/{models/AttributeThumbnail.js → base.js} +38 -26
  19. package/dist/esm/common.d.ts +65 -0
  20. package/dist/esm/common.js +149 -0
  21. package/dist/esm/configuration.d.ts +91 -0
  22. package/dist/esm/configuration.js +39 -0
  23. package/dist/esm/index.d.ts +13 -3
  24. package/dist/esm/index.js +13 -3
  25. package/dist/index.d.ts +13 -3
  26. package/dist/index.js +15 -5
  27. package/git_push.sh +57 -0
  28. package/{dist/models/Stock.d.ts → index.ts} +8 -21
  29. package/package.json +14 -2
  30. package/tsconfig.json +4 -6
  31. package/dist/apis/ProductsApi.d.ts +0 -35
  32. package/dist/apis/ProductsApi.js +0 -85
  33. package/dist/apis/StatementsApi.d.ts +0 -48
  34. package/dist/apis/StatementsApi.js +0 -127
  35. package/dist/apis/TransactionsApi.d.ts +0 -48
  36. package/dist/apis/TransactionsApi.js +0 -129
  37. package/dist/apis/VariantsApi.d.ts +0 -82
  38. package/dist/apis/VariantsApi.js +0 -229
  39. package/dist/apis/index.d.ts +0 -4
  40. package/dist/apis/index.js +0 -22
  41. package/dist/esm/apis/ProductsApi.d.ts +0 -35
  42. package/dist/esm/apis/ProductsApi.js +0 -81
  43. package/dist/esm/apis/StatementsApi.d.ts +0 -48
  44. package/dist/esm/apis/StatementsApi.js +0 -123
  45. package/dist/esm/apis/TransactionsApi.d.ts +0 -48
  46. package/dist/esm/apis/TransactionsApi.js +0 -125
  47. package/dist/esm/apis/VariantsApi.d.ts +0 -82
  48. package/dist/esm/apis/VariantsApi.js +0 -225
  49. package/dist/esm/apis/index.d.ts +0 -4
  50. package/dist/esm/apis/index.js +0 -6
  51. package/dist/esm/models/ApiError.d.ts +0 -37
  52. package/dist/esm/models/ApiError.js +0 -42
  53. package/dist/esm/models/ApiValidationError.d.ts +0 -39
  54. package/dist/esm/models/ApiValidationError.js +0 -44
  55. package/dist/esm/models/Attribute.d.ts +0 -50
  56. package/dist/esm/models/Attribute.js +0 -49
  57. package/dist/esm/models/AttributeThumbnail.d.ts +0 -46
  58. package/dist/esm/models/ExportTransactionsRequest.d.ts +0 -43
  59. package/dist/esm/models/ExportTransactionsRequest.js +0 -42
  60. package/dist/esm/models/Image.d.ts +0 -67
  61. package/dist/esm/models/Image.js +0 -50
  62. package/dist/esm/models/ListStatements200Response.d.ts +0 -38
  63. package/dist/esm/models/ListStatements200Response.js +0 -41
  64. package/dist/esm/models/ListTransactions200Response.d.ts +0 -38
  65. package/dist/esm/models/ListTransactions200Response.js +0 -41
  66. package/dist/esm/models/Product.d.ts +0 -67
  67. package/dist/esm/models/Product.js +0 -52
  68. package/dist/esm/models/ProductsResponse.d.ts +0 -38
  69. package/dist/esm/models/ProductsResponse.js +0 -41
  70. package/dist/esm/models/Statement.d.ts +0 -61
  71. package/dist/esm/models/Statement.js +0 -60
  72. package/dist/esm/models/Stock.d.ts +0 -31
  73. package/dist/esm/models/Stock.js +0 -38
  74. package/dist/esm/models/StockResponse.d.ts +0 -38
  75. package/dist/esm/models/StockResponse.js +0 -41
  76. package/dist/esm/models/Transaction.d.ts +0 -68
  77. package/dist/esm/models/Transaction.js +0 -61
  78. package/dist/esm/models/TransactionOrder.d.ts +0 -37
  79. package/dist/esm/models/TransactionOrder.js +0 -44
  80. package/dist/esm/models/Variant.d.ts +0 -78
  81. package/dist/esm/models/Variant.js +0 -61
  82. package/dist/esm/models/VariantManufacturerOrigin.d.ts +0 -37
  83. package/dist/esm/models/VariantManufacturerOrigin.js +0 -40
  84. package/dist/esm/models/VariantProduct.d.ts +0 -37
  85. package/dist/esm/models/VariantProduct.js +0 -40
  86. package/dist/esm/models/VariantStock.d.ts +0 -50
  87. package/dist/esm/models/VariantStock.js +0 -45
  88. package/dist/esm/models/VariantsResponse.d.ts +0 -38
  89. package/dist/esm/models/VariantsResponse.js +0 -41
  90. package/dist/esm/models/index.d.ts +0 -20
  91. package/dist/esm/models/index.js +0 -22
  92. package/dist/esm/runtime.d.ts +0 -187
  93. package/dist/esm/runtime.js +0 -333
  94. package/dist/models/ApiError.d.ts +0 -37
  95. package/dist/models/ApiError.js +0 -49
  96. package/dist/models/ApiValidationError.d.ts +0 -39
  97. package/dist/models/ApiValidationError.js +0 -51
  98. package/dist/models/Attribute.d.ts +0 -50
  99. package/dist/models/Attribute.js +0 -56
  100. package/dist/models/AttributeThumbnail.d.ts +0 -46
  101. package/dist/models/AttributeThumbnail.js +0 -55
  102. package/dist/models/ExportTransactionsRequest.d.ts +0 -43
  103. package/dist/models/ExportTransactionsRequest.js +0 -49
  104. package/dist/models/Image.d.ts +0 -67
  105. package/dist/models/Image.js +0 -57
  106. package/dist/models/ListStatements200Response.d.ts +0 -38
  107. package/dist/models/ListStatements200Response.js +0 -48
  108. package/dist/models/ListTransactions200Response.d.ts +0 -38
  109. package/dist/models/ListTransactions200Response.js +0 -48
  110. package/dist/models/Product.d.ts +0 -67
  111. package/dist/models/Product.js +0 -59
  112. package/dist/models/ProductsResponse.d.ts +0 -38
  113. package/dist/models/ProductsResponse.js +0 -48
  114. package/dist/models/Statement.d.ts +0 -61
  115. package/dist/models/Statement.js +0 -67
  116. package/dist/models/Stock.js +0 -45
  117. package/dist/models/StockResponse.d.ts +0 -38
  118. package/dist/models/StockResponse.js +0 -48
  119. package/dist/models/Transaction.d.ts +0 -68
  120. package/dist/models/Transaction.js +0 -68
  121. package/dist/models/TransactionOrder.d.ts +0 -37
  122. package/dist/models/TransactionOrder.js +0 -51
  123. package/dist/models/Variant.d.ts +0 -78
  124. package/dist/models/Variant.js +0 -68
  125. package/dist/models/VariantManufacturerOrigin.d.ts +0 -37
  126. package/dist/models/VariantManufacturerOrigin.js +0 -47
  127. package/dist/models/VariantProduct.d.ts +0 -37
  128. package/dist/models/VariantProduct.js +0 -47
  129. package/dist/models/VariantStock.d.ts +0 -50
  130. package/dist/models/VariantStock.js +0 -52
  131. package/dist/models/VariantsResponse.d.ts +0 -38
  132. package/dist/models/VariantsResponse.js +0 -48
  133. package/dist/models/index.d.ts +0 -20
  134. package/dist/models/index.js +0 -38
  135. package/dist/runtime.d.ts +0 -187
  136. package/dist/runtime.js +0 -349
  137. package/src/apis/ProductsApi.ts +0 -116
  138. package/src/apis/StatementsApi.ts +0 -177
  139. package/src/apis/TransactionsApi.ts +0 -180
  140. package/src/apis/VariantsApi.ts +0 -345
  141. package/src/apis/index.ts +0 -6
  142. package/src/index.ts +0 -5
  143. package/src/models/ApiError.ts +0 -69
  144. package/src/models/ApiValidationError.ts +0 -70
  145. package/src/models/Attribute.ts +0 -93
  146. package/src/models/AttributeThumbnail.ts +0 -80
  147. package/src/models/ExportTransactionsRequest.ts +0 -76
  148. package/src/models/Image.ts +0 -108
  149. package/src/models/ListStatements200Response.ts +0 -75
  150. package/src/models/ListTransactions200Response.ts +0 -75
  151. package/src/models/Product.ts +0 -109
  152. package/src/models/ProductsResponse.ts +0 -75
  153. package/src/models/Statement.ts +0 -106
  154. package/src/models/Stock.ts +0 -60
  155. package/src/models/StockResponse.ts +0 -75
  156. package/src/models/Transaction.ts +0 -120
  157. package/src/models/TransactionOrder.ts +0 -70
  158. package/src/models/Variant.ts +0 -149
  159. package/src/models/VariantManufacturerOrigin.ts +0 -68
  160. package/src/models/VariantProduct.ts +0 -68
  161. package/src/models/VariantStock.ts +0 -91
  162. package/src/models/VariantsResponse.ts +0 -75
  163. package/src/models/index.ts +0 -22
  164. package/src/runtime.ts +0 -441
@@ -1,125 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * GFN Catalog API
5
- * Use this API to access the Global Fulfilment 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
- *
7
- * The version of the OpenAPI document: 1.4.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- import * as runtime from '../runtime';
24
- import { ExportTransactionsRequestToJSON, ListTransactions200ResponseFromJSON, } from '../models/index';
25
- /**
26
- *
27
- */
28
- export class TransactionsApi extends runtime.BaseAPI {
29
- /**
30
- * Exports all GFN transactions available to the project
31
- * Export GFN transactions
32
- */
33
- exportTransactionsRaw(requestParameters, initOverrides) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- if (requestParameters.project === null || requestParameters.project === undefined) {
36
- throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling exportTransactions.');
37
- }
38
- if (requestParameters.exportTransactionsRequest === null || requestParameters.exportTransactionsRequest === undefined) {
39
- throw new runtime.RequiredError('exportTransactionsRequest', 'Required parameter requestParameters.exportTransactionsRequest was null or undefined when calling exportTransactions.');
40
- }
41
- const queryParameters = {};
42
- if (requestParameters.project !== undefined) {
43
- queryParameters['project'] = requestParameters.project;
44
- }
45
- const headerParameters = {};
46
- headerParameters['Content-Type'] = 'application/json';
47
- if (this.configuration && this.configuration.accessToken) {
48
- // oauth required
49
- headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
50
- }
51
- if (this.configuration && this.configuration.apiKey) {
52
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
53
- }
54
- const response = yield this.request({
55
- path: `/v1/gfn/transactions/export`,
56
- method: 'POST',
57
- headers: headerParameters,
58
- query: queryParameters,
59
- body: ExportTransactionsRequestToJSON(requestParameters.exportTransactionsRequest),
60
- }, initOverrides);
61
- return new runtime.BlobApiResponse(response);
62
- });
63
- }
64
- /**
65
- * Exports all GFN transactions available to the project
66
- * Export GFN transactions
67
- */
68
- exportTransactions(project, exportTransactionsRequest, initOverrides) {
69
- return __awaiter(this, void 0, void 0, function* () {
70
- const response = yield this.exportTransactionsRaw({
71
- project: project, exportTransactionsRequest: exportTransactionsRequest,
72
- }, initOverrides);
73
- return yield response.value();
74
- });
75
- }
76
- /**
77
- * Lists all GFN transactions available to the project
78
- * List GFN transactions
79
- */
80
- listTransactionsRaw(requestParameters, initOverrides) {
81
- return __awaiter(this, void 0, void 0, function* () {
82
- if (requestParameters.project === null || requestParameters.project === undefined) {
83
- throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listTransactions.');
84
- }
85
- const queryParameters = {};
86
- if (requestParameters.project !== undefined) {
87
- queryParameters['project'] = requestParameters.project;
88
- }
89
- if (requestParameters.pageToken !== undefined) {
90
- queryParameters['pageToken'] = requestParameters.pageToken;
91
- }
92
- if (requestParameters.pageSize !== undefined) {
93
- queryParameters['pageSize'] = requestParameters.pageSize;
94
- }
95
- if (requestParameters.statementId !== undefined) {
96
- queryParameters['statementId'] = requestParameters.statementId;
97
- }
98
- const headerParameters = {};
99
- if (this.configuration && this.configuration.accessToken) {
100
- // oauth required
101
- headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
102
- }
103
- if (this.configuration && this.configuration.apiKey) {
104
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
105
- }
106
- const response = yield this.request({
107
- path: `/v1/gfn/transactions`,
108
- method: 'GET',
109
- headers: headerParameters,
110
- query: queryParameters,
111
- }, initOverrides);
112
- return new runtime.JSONApiResponse(response, (jsonValue) => ListTransactions200ResponseFromJSON(jsonValue));
113
- });
114
- }
115
- /**
116
- * Lists all GFN transactions available to the project
117
- * List GFN transactions
118
- */
119
- listTransactions(project_1) {
120
- return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
121
- const response = yield this.listTransactionsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
122
- return yield response.value();
123
- });
124
- }
125
- }
@@ -1,82 +0,0 @@
1
- /**
2
- * GFN Catalog API
3
- * Use this API to access the Global Fulfilment 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.
4
- *
5
- * The version of the OpenAPI document: 1.4.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import * as runtime from '../runtime';
13
- import type { StockResponse, Variant, VariantStock, VariantsResponse } from '../models/index';
14
- export interface GetStockRequest {
15
- project: string;
16
- variantId: string;
17
- fulfillmentProjects?: string;
18
- }
19
- export interface GetVariantRequest {
20
- project: string;
21
- variantId: string;
22
- fields?: string;
23
- }
24
- export interface ListStockRequest {
25
- project: string;
26
- fulfillmentProjects?: string;
27
- pageToken?: number;
28
- pageSize?: number;
29
- search?: string;
30
- }
31
- export interface ListVariantsRequest {
32
- project: string;
33
- pageToken?: number;
34
- pageSize?: number;
35
- fields?: string;
36
- search?: string;
37
- }
38
- /**
39
- *
40
- */
41
- export declare class VariantsApi extends runtime.BaseAPI {
42
- /**
43
- * Gets the stock level for the GFN variant with the given ID.
44
- * Get GFN variant stock
45
- */
46
- getStockRaw(requestParameters: GetStockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VariantStock>>;
47
- /**
48
- * Gets the stock level for the GFN variant with the given ID.
49
- * Get GFN variant stock
50
- */
51
- getStock(project: string, variantId: string, optionalParameters?: runtime.OptionalOnly<GetStockRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantStock>;
52
- /**
53
- * Gets a GFN variant by the given ID.
54
- * Get a GFN variant
55
- */
56
- getVariantRaw(requestParameters: GetVariantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Variant>>;
57
- /**
58
- * Gets a GFN variant by the given ID.
59
- * Get a GFN variant
60
- */
61
- getVariant(project: string, variantId: string, optionalParameters?: runtime.OptionalOnly<GetVariantRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Variant>;
62
- /**
63
- * Lists the stock levels for all GFN variants available to the project.
64
- * List GFN variant stock
65
- */
66
- listStockRaw(requestParameters: ListStockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StockResponse>>;
67
- /**
68
- * Lists the stock levels for all GFN variants available to the project.
69
- * List GFN variant stock
70
- */
71
- listStock(project: string, optionalParameters?: runtime.OptionalOnly<ListStockRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StockResponse>;
72
- /**
73
- * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
74
- * List GFN variants
75
- */
76
- listVariantsRaw(requestParameters: ListVariantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VariantsResponse>>;
77
- /**
78
- * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
79
- * List GFN variants
80
- */
81
- listVariants(project: string, optionalParameters?: runtime.OptionalOnly<ListVariantsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantsResponse>;
82
- }
@@ -1,225 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * GFN Catalog API
5
- * Use this API to access the Global Fulfilment 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
- *
7
- * The version of the OpenAPI document: 1.4.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- import * as runtime from '../runtime';
24
- import { StockResponseFromJSON, VariantFromJSON, VariantStockFromJSON, VariantsResponseFromJSON, } from '../models/index';
25
- /**
26
- *
27
- */
28
- export class VariantsApi extends runtime.BaseAPI {
29
- /**
30
- * Gets the stock level for the GFN variant with the given ID.
31
- * Get GFN variant stock
32
- */
33
- getStockRaw(requestParameters, initOverrides) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- if (requestParameters.project === null || requestParameters.project === undefined) {
36
- throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getStock.');
37
- }
38
- if (requestParameters.variantId === null || requestParameters.variantId === undefined) {
39
- throw new runtime.RequiredError('variantId', 'Required parameter requestParameters.variantId was null or undefined when calling getStock.');
40
- }
41
- const queryParameters = {};
42
- if (requestParameters.project !== undefined) {
43
- queryParameters['project'] = requestParameters.project;
44
- }
45
- if (requestParameters.fulfillmentProjects !== undefined) {
46
- queryParameters['fulfillmentProjects'] = requestParameters.fulfillmentProjects;
47
- }
48
- const headerParameters = {};
49
- if (this.configuration && this.configuration.accessToken) {
50
- // oauth required
51
- headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
52
- }
53
- if (this.configuration && this.configuration.apiKey) {
54
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
55
- }
56
- const response = yield this.request({
57
- path: `/v1/gfn/catalog/stock/{variantId}`.replace(`{${"variantId"}}`, encodeURIComponent(String(requestParameters.variantId))),
58
- method: 'GET',
59
- headers: headerParameters,
60
- query: queryParameters,
61
- }, initOverrides);
62
- return new runtime.JSONApiResponse(response, (jsonValue) => VariantStockFromJSON(jsonValue));
63
- });
64
- }
65
- /**
66
- * Gets the stock level for the GFN variant with the given ID.
67
- * Get GFN variant stock
68
- */
69
- getStock(project_1, variantId_1) {
70
- return __awaiter(this, arguments, void 0, function* (project, variantId, optionalParameters = {}, initOverrides) {
71
- const response = yield this.getStockRaw(Object.assign({ project: project, variantId: variantId }, optionalParameters), initOverrides);
72
- return yield response.value();
73
- });
74
- }
75
- /**
76
- * Gets a GFN variant by the given ID.
77
- * Get a GFN variant
78
- */
79
- getVariantRaw(requestParameters, initOverrides) {
80
- return __awaiter(this, void 0, void 0, function* () {
81
- if (requestParameters.project === null || requestParameters.project === undefined) {
82
- throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getVariant.');
83
- }
84
- if (requestParameters.variantId === null || requestParameters.variantId === undefined) {
85
- throw new runtime.RequiredError('variantId', 'Required parameter requestParameters.variantId was null or undefined when calling getVariant.');
86
- }
87
- const queryParameters = {};
88
- if (requestParameters.project !== undefined) {
89
- queryParameters['project'] = requestParameters.project;
90
- }
91
- if (requestParameters.fields !== undefined) {
92
- queryParameters['fields'] = requestParameters.fields;
93
- }
94
- const headerParameters = {};
95
- if (this.configuration && this.configuration.accessToken) {
96
- // oauth required
97
- headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
98
- }
99
- if (this.configuration && this.configuration.apiKey) {
100
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
101
- }
102
- const response = yield this.request({
103
- path: `/v1/gfn/catalog/variants/{variantId}`.replace(`{${"variantId"}}`, encodeURIComponent(String(requestParameters.variantId))),
104
- method: 'GET',
105
- headers: headerParameters,
106
- query: queryParameters,
107
- }, initOverrides);
108
- return new runtime.JSONApiResponse(response, (jsonValue) => VariantFromJSON(jsonValue));
109
- });
110
- }
111
- /**
112
- * Gets a GFN variant by the given ID.
113
- * Get a GFN variant
114
- */
115
- getVariant(project_1, variantId_1) {
116
- return __awaiter(this, arguments, void 0, function* (project, variantId, optionalParameters = {}, initOverrides) {
117
- const response = yield this.getVariantRaw(Object.assign({ project: project, variantId: variantId }, optionalParameters), initOverrides);
118
- return yield response.value();
119
- });
120
- }
121
- /**
122
- * Lists the stock levels for all GFN variants available to the project.
123
- * List GFN variant stock
124
- */
125
- listStockRaw(requestParameters, initOverrides) {
126
- return __awaiter(this, void 0, void 0, function* () {
127
- if (requestParameters.project === null || requestParameters.project === undefined) {
128
- throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listStock.');
129
- }
130
- const queryParameters = {};
131
- if (requestParameters.project !== undefined) {
132
- queryParameters['project'] = requestParameters.project;
133
- }
134
- if (requestParameters.fulfillmentProjects !== undefined) {
135
- queryParameters['fulfillmentProjects'] = requestParameters.fulfillmentProjects;
136
- }
137
- if (requestParameters.pageToken !== undefined) {
138
- queryParameters['pageToken'] = requestParameters.pageToken;
139
- }
140
- if (requestParameters.pageSize !== undefined) {
141
- queryParameters['pageSize'] = requestParameters.pageSize;
142
- }
143
- if (requestParameters.search !== undefined) {
144
- queryParameters['search'] = requestParameters.search;
145
- }
146
- const headerParameters = {};
147
- if (this.configuration && this.configuration.accessToken) {
148
- // oauth required
149
- headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
150
- }
151
- if (this.configuration && this.configuration.apiKey) {
152
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
153
- }
154
- const response = yield this.request({
155
- path: `/v1/gfn/catalog/stock`,
156
- method: 'GET',
157
- headers: headerParameters,
158
- query: queryParameters,
159
- }, initOverrides);
160
- return new runtime.JSONApiResponse(response, (jsonValue) => StockResponseFromJSON(jsonValue));
161
- });
162
- }
163
- /**
164
- * Lists the stock levels for all GFN variants available to the project.
165
- * List GFN variant stock
166
- */
167
- listStock(project_1) {
168
- return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
169
- const response = yield this.listStockRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
170
- return yield response.value();
171
- });
172
- }
173
- /**
174
- * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
175
- * List GFN variants
176
- */
177
- listVariantsRaw(requestParameters, initOverrides) {
178
- return __awaiter(this, void 0, void 0, function* () {
179
- if (requestParameters.project === null || requestParameters.project === undefined) {
180
- throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listVariants.');
181
- }
182
- const queryParameters = {};
183
- if (requestParameters.project !== undefined) {
184
- queryParameters['project'] = requestParameters.project;
185
- }
186
- if (requestParameters.pageToken !== undefined) {
187
- queryParameters['pageToken'] = requestParameters.pageToken;
188
- }
189
- if (requestParameters.pageSize !== undefined) {
190
- queryParameters['pageSize'] = requestParameters.pageSize;
191
- }
192
- if (requestParameters.fields !== undefined) {
193
- queryParameters['fields'] = requestParameters.fields;
194
- }
195
- if (requestParameters.search !== undefined) {
196
- queryParameters['search'] = requestParameters.search;
197
- }
198
- const headerParameters = {};
199
- if (this.configuration && this.configuration.accessToken) {
200
- // oauth required
201
- headerParameters["Authorization"] = yield this.configuration.accessToken("session-oauth", []);
202
- }
203
- if (this.configuration && this.configuration.apiKey) {
204
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
205
- }
206
- const response = yield this.request({
207
- path: `/v1/gfn/catalog/variants`,
208
- method: 'GET',
209
- headers: headerParameters,
210
- query: queryParameters,
211
- }, initOverrides);
212
- return new runtime.JSONApiResponse(response, (jsonValue) => VariantsResponseFromJSON(jsonValue));
213
- });
214
- }
215
- /**
216
- * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
217
- * List GFN variants
218
- */
219
- listVariants(project_1) {
220
- return __awaiter(this, arguments, void 0, function* (project, optionalParameters = {}, initOverrides) {
221
- const response = yield this.listVariantsRaw(Object.assign({ project: project }, optionalParameters), initOverrides);
222
- return yield response.value();
223
- });
224
- }
225
- }
@@ -1,4 +0,0 @@
1
- export * from './ProductsApi';
2
- export * from './StatementsApi';
3
- export * from './TransactionsApi';
4
- export * from './VariantsApi';
@@ -1,6 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- export * from './ProductsApi';
4
- export * from './StatementsApi';
5
- export * from './TransactionsApi';
6
- export * from './VariantsApi';
@@ -1,37 +0,0 @@
1
- /**
2
- * GFN Catalog API
3
- * Use this API to access the Global Fulfilment 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.
4
- *
5
- * The version of the OpenAPI document: 1.4.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface ApiError
16
- */
17
- export interface ApiError {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof ApiError
22
- */
23
- code?: string;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof ApiError
28
- */
29
- message: string;
30
- }
31
- /**
32
- * Check if a given object implements the ApiError interface.
33
- */
34
- export declare function instanceOfApiError(value: object): value is ApiError;
35
- export declare function ApiErrorFromJSON(json: any): ApiError;
36
- export declare function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError;
37
- export declare function ApiErrorToJSON(value?: ApiError | null): any;
@@ -1,42 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * GFN Catalog API
5
- * Use this API to access the Global Fulfilment 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
- *
7
- * The version of the OpenAPI document: 1.4.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- /**
15
- * Check if a given object implements the ApiError interface.
16
- */
17
- export function instanceOfApiError(value) {
18
- if (!('message' in value) || value['message'] === undefined)
19
- return false;
20
- return true;
21
- }
22
- export function ApiErrorFromJSON(json) {
23
- return ApiErrorFromJSONTyped(json, false);
24
- }
25
- export function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
26
- if (json == null) {
27
- return json;
28
- }
29
- return {
30
- 'code': json['code'] == null ? undefined : json['code'],
31
- 'message': json['message'],
32
- };
33
- }
34
- export function ApiErrorToJSON(value) {
35
- if (value == null) {
36
- return value;
37
- }
38
- return {
39
- 'code': value['code'],
40
- 'message': value['message'],
41
- };
42
- }
@@ -1,39 +0,0 @@
1
- /**
2
- * GFN Catalog API
3
- * Use this API to access the Global Fulfilment 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.
4
- *
5
- * The version of the OpenAPI document: 1.4.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface ApiValidationError
16
- */
17
- export interface ApiValidationError {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof ApiValidationError
22
- */
23
- message: string;
24
- /**
25
- *
26
- * @type {{ [key: string]: Array<string>; }}
27
- * @memberof ApiValidationError
28
- */
29
- errors: {
30
- [key: string]: Array<string>;
31
- };
32
- }
33
- /**
34
- * Check if a given object implements the ApiValidationError interface.
35
- */
36
- export declare function instanceOfApiValidationError(value: object): value is ApiValidationError;
37
- export declare function ApiValidationErrorFromJSON(json: any): ApiValidationError;
38
- export declare function ApiValidationErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiValidationError;
39
- export declare function ApiValidationErrorToJSON(value?: ApiValidationError | null): any;
@@ -1,44 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * GFN Catalog API
5
- * Use this API to access the Global Fulfilment 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
- *
7
- * The version of the OpenAPI document: 1.4.0
8
- * Contact: hello@teemill.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- /**
15
- * Check if a given object implements the ApiValidationError interface.
16
- */
17
- export function instanceOfApiValidationError(value) {
18
- if (!('message' in value) || value['message'] === undefined)
19
- return false;
20
- if (!('errors' in value) || value['errors'] === undefined)
21
- return false;
22
- return true;
23
- }
24
- export function ApiValidationErrorFromJSON(json) {
25
- return ApiValidationErrorFromJSONTyped(json, false);
26
- }
27
- export function ApiValidationErrorFromJSONTyped(json, ignoreDiscriminator) {
28
- if (json == null) {
29
- return json;
30
- }
31
- return {
32
- 'message': json['message'],
33
- 'errors': json['errors'],
34
- };
35
- }
36
- export function ApiValidationErrorToJSON(value) {
37
- if (value == null) {
38
- return value;
39
- }
40
- return {
41
- 'message': value['message'],
42
- 'errors': value['errors'],
43
- };
44
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * GFN Catalog API
3
- * Use this API to access the Global Fulfilment 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.
4
- *
5
- * The version of the OpenAPI document: 1.4.0
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { AttributeThumbnail } from './AttributeThumbnail';
13
- /**
14
- *
15
- * @export
16
- * @interface Attribute
17
- */
18
- export interface Attribute {
19
- /**
20
- * Attribute name
21
- * @type {string}
22
- * @memberof Attribute
23
- */
24
- name: string;
25
- /**
26
- * Attribute value
27
- * @type {string}
28
- * @memberof Attribute
29
- */
30
- value: string;
31
- /**
32
- *
33
- * @type {AttributeThumbnail}
34
- * @memberof Attribute
35
- */
36
- thumbnail?: AttributeThumbnail;
37
- /**
38
- * Attribute tags
39
- * @type {Array<string>}
40
- * @memberof Attribute
41
- */
42
- tags?: Array<string>;
43
- }
44
- /**
45
- * Check if a given object implements the Attribute interface.
46
- */
47
- export declare function instanceOfAttribute(value: object): value is Attribute;
48
- export declare function AttributeFromJSON(json: any): Attribute;
49
- export declare function AttributeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Attribute;
50
- export declare function AttributeToJSON(value?: Attribute | null): any;