@teemill/gfn-catalog 1.4.0 → 2.0.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.
Files changed (164) hide show
  1. package/.openapi-generator/FILES +7 -28
  2. package/README.md +3 -3
  3. package/api.ts +1646 -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 +1074 -0
  8. package/dist/api.js +1014 -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 +1074 -0
  16. package/dist/esm/api.js +995 -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
@@ -0,0 +1,995 @@
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: 2.0.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 globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
+ export const AttributeThumbnailTypeEnum = {
30
+ Text: 'text',
31
+ Color: 'color',
32
+ Image: 'image'
33
+ };
34
+ /**
35
+ * ProductsApi - axios parameter creator
36
+ * @export
37
+ */
38
+ export const ProductsApiAxiosParamCreator = function (configuration) {
39
+ return {
40
+ /**
41
+ * Lists all GFN products available to the project. Can be filtered by style codes using the search parameter.
42
+ * @summary List GFN products
43
+ * @param {string} project What project it is
44
+ * @param {number} [pageToken] Page reference token
45
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
46
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
47
+ * @param {string} [search] Search terms to filter based on.
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ listProducts: (project_1, pageToken_1, pageSize_1, fields_1, search_1, ...args_1) => __awaiter(this, [project_1, pageToken_1, pageSize_1, fields_1, search_1, ...args_1], void 0, function* (project, pageToken, pageSize, fields, search, options = {}) {
52
+ // verify required parameter 'project' is not null or undefined
53
+ assertParamExists('listProducts', 'project', project);
54
+ const localVarPath = `/v1/gfn/catalog/products`;
55
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57
+ let baseOptions;
58
+ if (configuration) {
59
+ baseOptions = configuration.baseOptions;
60
+ }
61
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
62
+ const localVarHeaderParameter = {};
63
+ const localVarQueryParameter = {};
64
+ // authentication session-oauth required
65
+ // oauth required
66
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
67
+ // authentication api-key required
68
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
69
+ if (project !== undefined) {
70
+ localVarQueryParameter['project'] = project;
71
+ }
72
+ if (pageToken !== undefined) {
73
+ localVarQueryParameter['pageToken'] = pageToken;
74
+ }
75
+ if (pageSize !== undefined) {
76
+ localVarQueryParameter['pageSize'] = pageSize;
77
+ }
78
+ if (fields !== undefined) {
79
+ localVarQueryParameter['fields'] = fields;
80
+ }
81
+ if (search !== undefined) {
82
+ localVarQueryParameter['search'] = search;
83
+ }
84
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
85
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
86
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ }),
92
+ };
93
+ };
94
+ /**
95
+ * ProductsApi - functional programming interface
96
+ * @export
97
+ */
98
+ export const ProductsApiFp = function (configuration) {
99
+ const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration);
100
+ return {
101
+ /**
102
+ * Lists all GFN products available to the project. Can be filtered by style codes using the search parameter.
103
+ * @summary List GFN products
104
+ * @param {string} project What project it is
105
+ * @param {number} [pageToken] Page reference token
106
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
107
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
108
+ * @param {string} [search] Search terms to filter based on.
109
+ * @param {*} [options] Override http request option.
110
+ * @throws {RequiredError}
111
+ */
112
+ listProducts(project, pageToken, pageSize, fields, search, options) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ var _a, _b, _c;
115
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listProducts(project, pageToken, pageSize, fields, search, options);
116
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
117
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProductsApi.listProducts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
118
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
119
+ });
120
+ },
121
+ };
122
+ };
123
+ /**
124
+ * ProductsApi - factory interface
125
+ * @export
126
+ */
127
+ export const ProductsApiFactory = function (configuration, basePath, axios) {
128
+ const localVarFp = ProductsApiFp(configuration);
129
+ return {
130
+ /**
131
+ * Lists all GFN products available to the project. Can be filtered by style codes using the search parameter.
132
+ * @summary List GFN products
133
+ * @param {string} project What project it is
134
+ * @param {number} [pageToken] Page reference token
135
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
136
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
137
+ * @param {string} [search] Search terms to filter based on.
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ */
141
+ listProducts(project, pageToken, pageSize, fields, search, options) {
142
+ return localVarFp.listProducts(project, pageToken, pageSize, fields, search, options).then((request) => request(axios, basePath));
143
+ },
144
+ };
145
+ };
146
+ /**
147
+ * ProductsApi - object-oriented interface
148
+ * @export
149
+ * @class ProductsApi
150
+ * @extends {BaseAPI}
151
+ */
152
+ export class ProductsApi extends BaseAPI {
153
+ /**
154
+ * Lists all GFN products available to the project. Can be filtered by style codes using the search parameter.
155
+ * @summary List GFN products
156
+ * @param {string} project What project it is
157
+ * @param {number} [pageToken] Page reference token
158
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
159
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
160
+ * @param {string} [search] Search terms to filter based on.
161
+ * @param {*} [options] Override http request option.
162
+ * @throws {RequiredError}
163
+ * @memberof ProductsApi
164
+ */
165
+ listProducts(project, pageToken, pageSize, fields, search, options) {
166
+ return ProductsApiFp(this.configuration).listProducts(project, pageToken, pageSize, fields, search, options).then((request) => request(this.axios, this.basePath));
167
+ }
168
+ }
169
+ /**
170
+ * StatementsApi - axios parameter creator
171
+ * @export
172
+ */
173
+ export const StatementsApiAxiosParamCreator = function (configuration) {
174
+ return {
175
+ /**
176
+ * Gets a GFN statement by the given ID.
177
+ * @summary Get a GFN statement
178
+ * @param {string} project What project it is
179
+ * @param {string} statementId
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ getStatement: (project_1, statementId_1, ...args_1) => __awaiter(this, [project_1, statementId_1, ...args_1], void 0, function* (project, statementId, options = {}) {
184
+ // verify required parameter 'project' is not null or undefined
185
+ assertParamExists('getStatement', 'project', project);
186
+ // verify required parameter 'statementId' is not null or undefined
187
+ assertParamExists('getStatement', 'statementId', statementId);
188
+ const localVarPath = `/v1/gfn/statements/{statementId}`
189
+ .replace(`{${"statementId"}}`, encodeURIComponent(String(statementId)));
190
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
191
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
192
+ let baseOptions;
193
+ if (configuration) {
194
+ baseOptions = configuration.baseOptions;
195
+ }
196
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
197
+ const localVarHeaderParameter = {};
198
+ const localVarQueryParameter = {};
199
+ // authentication session-oauth required
200
+ // oauth required
201
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
202
+ // authentication api-key required
203
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
204
+ if (project !== undefined) {
205
+ localVarQueryParameter['project'] = project;
206
+ }
207
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
208
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
209
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
210
+ return {
211
+ url: toPathString(localVarUrlObj),
212
+ options: localVarRequestOptions,
213
+ };
214
+ }),
215
+ /**
216
+ * Lists GFN statements available to the project
217
+ * @summary List GFN statements
218
+ * @param {string} project What project it is
219
+ * @param {number} [pageToken] Page reference token
220
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
221
+ * @param {string} [search] Search term used to filter results by
222
+ * @param {*} [options] Override http request option.
223
+ * @throws {RequiredError}
224
+ */
225
+ listStatements: (project_2, pageToken_1, pageSize_1, search_1, ...args_2) => __awaiter(this, [project_2, pageToken_1, pageSize_1, search_1, ...args_2], void 0, function* (project, pageToken, pageSize, search, options = {}) {
226
+ // verify required parameter 'project' is not null or undefined
227
+ assertParamExists('listStatements', 'project', project);
228
+ const localVarPath = `/v1/gfn/statements`;
229
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
230
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
231
+ let baseOptions;
232
+ if (configuration) {
233
+ baseOptions = configuration.baseOptions;
234
+ }
235
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
236
+ const localVarHeaderParameter = {};
237
+ const localVarQueryParameter = {};
238
+ // authentication session-oauth required
239
+ // oauth required
240
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
241
+ // authentication api-key required
242
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
243
+ if (project !== undefined) {
244
+ localVarQueryParameter['project'] = project;
245
+ }
246
+ if (pageToken !== undefined) {
247
+ localVarQueryParameter['pageToken'] = pageToken;
248
+ }
249
+ if (pageSize !== undefined) {
250
+ localVarQueryParameter['pageSize'] = pageSize;
251
+ }
252
+ if (search !== undefined) {
253
+ localVarQueryParameter['search'] = search;
254
+ }
255
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
256
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
257
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
258
+ return {
259
+ url: toPathString(localVarUrlObj),
260
+ options: localVarRequestOptions,
261
+ };
262
+ }),
263
+ };
264
+ };
265
+ /**
266
+ * StatementsApi - functional programming interface
267
+ * @export
268
+ */
269
+ export const StatementsApiFp = function (configuration) {
270
+ const localVarAxiosParamCreator = StatementsApiAxiosParamCreator(configuration);
271
+ return {
272
+ /**
273
+ * Gets a GFN statement by the given ID.
274
+ * @summary Get a GFN statement
275
+ * @param {string} project What project it is
276
+ * @param {string} statementId
277
+ * @param {*} [options] Override http request option.
278
+ * @throws {RequiredError}
279
+ */
280
+ getStatement(project, statementId, options) {
281
+ return __awaiter(this, void 0, void 0, function* () {
282
+ var _a, _b, _c;
283
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getStatement(project, statementId, options);
284
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
285
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['StatementsApi.getStatement']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
286
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
287
+ });
288
+ },
289
+ /**
290
+ * Lists GFN statements available to the project
291
+ * @summary List GFN statements
292
+ * @param {string} project What project it is
293
+ * @param {number} [pageToken] Page reference token
294
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
295
+ * @param {string} [search] Search term used to filter results by
296
+ * @param {*} [options] Override http request option.
297
+ * @throws {RequiredError}
298
+ */
299
+ listStatements(project, pageToken, pageSize, search, options) {
300
+ return __awaiter(this, void 0, void 0, function* () {
301
+ var _a, _b, _c;
302
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listStatements(project, pageToken, pageSize, search, options);
303
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
304
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['StatementsApi.listStatements']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
305
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
306
+ });
307
+ },
308
+ };
309
+ };
310
+ /**
311
+ * StatementsApi - factory interface
312
+ * @export
313
+ */
314
+ export const StatementsApiFactory = function (configuration, basePath, axios) {
315
+ const localVarFp = StatementsApiFp(configuration);
316
+ return {
317
+ /**
318
+ * Gets a GFN statement by the given ID.
319
+ * @summary Get a GFN statement
320
+ * @param {string} project What project it is
321
+ * @param {string} statementId
322
+ * @param {*} [options] Override http request option.
323
+ * @throws {RequiredError}
324
+ */
325
+ getStatement(project, statementId, options) {
326
+ return localVarFp.getStatement(project, statementId, options).then((request) => request(axios, basePath));
327
+ },
328
+ /**
329
+ * Lists GFN statements available to the project
330
+ * @summary List GFN statements
331
+ * @param {string} project What project it is
332
+ * @param {number} [pageToken] Page reference token
333
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
334
+ * @param {string} [search] Search term used to filter results by
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ listStatements(project, pageToken, pageSize, search, options) {
339
+ return localVarFp.listStatements(project, pageToken, pageSize, search, options).then((request) => request(axios, basePath));
340
+ },
341
+ };
342
+ };
343
+ /**
344
+ * StatementsApi - object-oriented interface
345
+ * @export
346
+ * @class StatementsApi
347
+ * @extends {BaseAPI}
348
+ */
349
+ export class StatementsApi extends BaseAPI {
350
+ /**
351
+ * Gets a GFN statement by the given ID.
352
+ * @summary Get a GFN statement
353
+ * @param {string} project What project it is
354
+ * @param {string} statementId
355
+ * @param {*} [options] Override http request option.
356
+ * @throws {RequiredError}
357
+ * @memberof StatementsApi
358
+ */
359
+ getStatement(project, statementId, options) {
360
+ return StatementsApiFp(this.configuration).getStatement(project, statementId, options).then((request) => request(this.axios, this.basePath));
361
+ }
362
+ /**
363
+ * Lists GFN statements available to the project
364
+ * @summary List GFN statements
365
+ * @param {string} project What project it is
366
+ * @param {number} [pageToken] Page reference token
367
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
368
+ * @param {string} [search] Search term used to filter results by
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ * @memberof StatementsApi
372
+ */
373
+ listStatements(project, pageToken, pageSize, search, options) {
374
+ return StatementsApiFp(this.configuration).listStatements(project, pageToken, pageSize, search, options).then((request) => request(this.axios, this.basePath));
375
+ }
376
+ }
377
+ /**
378
+ * TransactionsApi - axios parameter creator
379
+ * @export
380
+ */
381
+ export const TransactionsApiAxiosParamCreator = function (configuration) {
382
+ return {
383
+ /**
384
+ * Exports all GFN transactions available to the project
385
+ * @summary Export GFN transactions
386
+ * @param {string} project What project it is
387
+ * @param {ExportTransactionsRequest} exportTransactionsRequest Period selection data for the export
388
+ * @param {*} [options] Override http request option.
389
+ * @throws {RequiredError}
390
+ */
391
+ exportTransactions: (project_1, exportTransactionsRequest_1, ...args_1) => __awaiter(this, [project_1, exportTransactionsRequest_1, ...args_1], void 0, function* (project, exportTransactionsRequest, options = {}) {
392
+ // verify required parameter 'project' is not null or undefined
393
+ assertParamExists('exportTransactions', 'project', project);
394
+ // verify required parameter 'exportTransactionsRequest' is not null or undefined
395
+ assertParamExists('exportTransactions', 'exportTransactionsRequest', exportTransactionsRequest);
396
+ const localVarPath = `/v1/gfn/transactions/export`;
397
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
398
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
399
+ let baseOptions;
400
+ if (configuration) {
401
+ baseOptions = configuration.baseOptions;
402
+ }
403
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
404
+ const localVarHeaderParameter = {};
405
+ const localVarQueryParameter = {};
406
+ // authentication session-oauth required
407
+ // oauth required
408
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
409
+ // authentication api-key required
410
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
411
+ if (project !== undefined) {
412
+ localVarQueryParameter['project'] = project;
413
+ }
414
+ localVarHeaderParameter['Content-Type'] = 'application/json';
415
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
416
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
417
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
418
+ localVarRequestOptions.data = serializeDataIfNeeded(exportTransactionsRequest, localVarRequestOptions, configuration);
419
+ return {
420
+ url: toPathString(localVarUrlObj),
421
+ options: localVarRequestOptions,
422
+ };
423
+ }),
424
+ /**
425
+ * Lists all GFN transactions available to the project
426
+ * @summary List GFN transactions
427
+ * @param {string} project What project it is
428
+ * @param {number} [pageToken] Page reference token
429
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
430
+ * @param {string} [statementId]
431
+ * @param {*} [options] Override http request option.
432
+ * @throws {RequiredError}
433
+ */
434
+ listTransactions: (project_2, pageToken_1, pageSize_1, statementId_1, ...args_2) => __awaiter(this, [project_2, pageToken_1, pageSize_1, statementId_1, ...args_2], void 0, function* (project, pageToken, pageSize, statementId, options = {}) {
435
+ // verify required parameter 'project' is not null or undefined
436
+ assertParamExists('listTransactions', 'project', project);
437
+ const localVarPath = `/v1/gfn/transactions`;
438
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
439
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
440
+ let baseOptions;
441
+ if (configuration) {
442
+ baseOptions = configuration.baseOptions;
443
+ }
444
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
445
+ const localVarHeaderParameter = {};
446
+ const localVarQueryParameter = {};
447
+ // authentication session-oauth required
448
+ // oauth required
449
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
450
+ // authentication api-key required
451
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
452
+ if (project !== undefined) {
453
+ localVarQueryParameter['project'] = project;
454
+ }
455
+ if (pageToken !== undefined) {
456
+ localVarQueryParameter['pageToken'] = pageToken;
457
+ }
458
+ if (pageSize !== undefined) {
459
+ localVarQueryParameter['pageSize'] = pageSize;
460
+ }
461
+ if (statementId !== undefined) {
462
+ localVarQueryParameter['statementId'] = statementId;
463
+ }
464
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
465
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
466
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
467
+ return {
468
+ url: toPathString(localVarUrlObj),
469
+ options: localVarRequestOptions,
470
+ };
471
+ }),
472
+ };
473
+ };
474
+ /**
475
+ * TransactionsApi - functional programming interface
476
+ * @export
477
+ */
478
+ export const TransactionsApiFp = function (configuration) {
479
+ const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration);
480
+ return {
481
+ /**
482
+ * Exports all GFN transactions available to the project
483
+ * @summary Export GFN transactions
484
+ * @param {string} project What project it is
485
+ * @param {ExportTransactionsRequest} exportTransactionsRequest Period selection data for the export
486
+ * @param {*} [options] Override http request option.
487
+ * @throws {RequiredError}
488
+ */
489
+ exportTransactions(project, exportTransactionsRequest, options) {
490
+ return __awaiter(this, void 0, void 0, function* () {
491
+ var _a, _b, _c;
492
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.exportTransactions(project, exportTransactionsRequest, options);
493
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
494
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TransactionsApi.exportTransactions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
495
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
496
+ });
497
+ },
498
+ /**
499
+ * Lists all GFN transactions available to the project
500
+ * @summary List GFN transactions
501
+ * @param {string} project What project it is
502
+ * @param {number} [pageToken] Page reference token
503
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
504
+ * @param {string} [statementId]
505
+ * @param {*} [options] Override http request option.
506
+ * @throws {RequiredError}
507
+ */
508
+ listTransactions(project, pageToken, pageSize, statementId, options) {
509
+ return __awaiter(this, void 0, void 0, function* () {
510
+ var _a, _b, _c;
511
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactions(project, pageToken, pageSize, statementId, options);
512
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
513
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['TransactionsApi.listTransactions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
514
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
515
+ });
516
+ },
517
+ };
518
+ };
519
+ /**
520
+ * TransactionsApi - factory interface
521
+ * @export
522
+ */
523
+ export const TransactionsApiFactory = function (configuration, basePath, axios) {
524
+ const localVarFp = TransactionsApiFp(configuration);
525
+ return {
526
+ /**
527
+ * Exports all GFN transactions available to the project
528
+ * @summary Export GFN transactions
529
+ * @param {string} project What project it is
530
+ * @param {ExportTransactionsRequest} exportTransactionsRequest Period selection data for the export
531
+ * @param {*} [options] Override http request option.
532
+ * @throws {RequiredError}
533
+ */
534
+ exportTransactions(project, exportTransactionsRequest, options) {
535
+ return localVarFp.exportTransactions(project, exportTransactionsRequest, options).then((request) => request(axios, basePath));
536
+ },
537
+ /**
538
+ * Lists all GFN transactions available to the project
539
+ * @summary List GFN transactions
540
+ * @param {string} project What project it is
541
+ * @param {number} [pageToken] Page reference token
542
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
543
+ * @param {string} [statementId]
544
+ * @param {*} [options] Override http request option.
545
+ * @throws {RequiredError}
546
+ */
547
+ listTransactions(project, pageToken, pageSize, statementId, options) {
548
+ return localVarFp.listTransactions(project, pageToken, pageSize, statementId, options).then((request) => request(axios, basePath));
549
+ },
550
+ };
551
+ };
552
+ /**
553
+ * TransactionsApi - object-oriented interface
554
+ * @export
555
+ * @class TransactionsApi
556
+ * @extends {BaseAPI}
557
+ */
558
+ export class TransactionsApi extends BaseAPI {
559
+ /**
560
+ * Exports all GFN transactions available to the project
561
+ * @summary Export GFN transactions
562
+ * @param {string} project What project it is
563
+ * @param {ExportTransactionsRequest} exportTransactionsRequest Period selection data for the export
564
+ * @param {*} [options] Override http request option.
565
+ * @throws {RequiredError}
566
+ * @memberof TransactionsApi
567
+ */
568
+ exportTransactions(project, exportTransactionsRequest, options) {
569
+ return TransactionsApiFp(this.configuration).exportTransactions(project, exportTransactionsRequest, options).then((request) => request(this.axios, this.basePath));
570
+ }
571
+ /**
572
+ * Lists all GFN transactions available to the project
573
+ * @summary List GFN transactions
574
+ * @param {string} project What project it is
575
+ * @param {number} [pageToken] Page reference token
576
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
577
+ * @param {string} [statementId]
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ * @memberof TransactionsApi
581
+ */
582
+ listTransactions(project, pageToken, pageSize, statementId, options) {
583
+ return TransactionsApiFp(this.configuration).listTransactions(project, pageToken, pageSize, statementId, options).then((request) => request(this.axios, this.basePath));
584
+ }
585
+ }
586
+ /**
587
+ * VariantsApi - axios parameter creator
588
+ * @export
589
+ */
590
+ export const VariantsApiAxiosParamCreator = function (configuration) {
591
+ return {
592
+ /**
593
+ * Gets the stock level for the GFN variant with the given ID.
594
+ * @summary Get GFN variant stock
595
+ * @param {string} project What project it is
596
+ * @param {string} variantId Variants unique identifier
597
+ * @param {string} [fulfillmentProjects] Fetch stock levels from specific fulfiller projects
598
+ * @param {*} [options] Override http request option.
599
+ * @throws {RequiredError}
600
+ */
601
+ getStock: (project_1, variantId_1, fulfillmentProjects_1, ...args_1) => __awaiter(this, [project_1, variantId_1, fulfillmentProjects_1, ...args_1], void 0, function* (project, variantId, fulfillmentProjects, options = {}) {
602
+ // verify required parameter 'project' is not null or undefined
603
+ assertParamExists('getStock', 'project', project);
604
+ // verify required parameter 'variantId' is not null or undefined
605
+ assertParamExists('getStock', 'variantId', variantId);
606
+ const localVarPath = `/v1/gfn/catalog/stock/{variantId}`
607
+ .replace(`{${"variantId"}}`, encodeURIComponent(String(variantId)));
608
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
609
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
610
+ let baseOptions;
611
+ if (configuration) {
612
+ baseOptions = configuration.baseOptions;
613
+ }
614
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
615
+ const localVarHeaderParameter = {};
616
+ const localVarQueryParameter = {};
617
+ // authentication session-oauth required
618
+ // oauth required
619
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
620
+ // authentication api-key required
621
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
622
+ if (project !== undefined) {
623
+ localVarQueryParameter['project'] = project;
624
+ }
625
+ if (fulfillmentProjects !== undefined) {
626
+ localVarQueryParameter['fulfillmentProjects'] = fulfillmentProjects;
627
+ }
628
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
629
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
630
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
631
+ return {
632
+ url: toPathString(localVarUrlObj),
633
+ options: localVarRequestOptions,
634
+ };
635
+ }),
636
+ /**
637
+ * Gets a GFN variant by the given ID.
638
+ * @summary Get a GFN variant
639
+ * @param {string} project What project it is
640
+ * @param {string} variantId Variants unique identifier
641
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
642
+ * @param {*} [options] Override http request option.
643
+ * @throws {RequiredError}
644
+ */
645
+ getVariant: (project_2, variantId_2, fields_1, ...args_2) => __awaiter(this, [project_2, variantId_2, fields_1, ...args_2], void 0, function* (project, variantId, fields, options = {}) {
646
+ // verify required parameter 'project' is not null or undefined
647
+ assertParamExists('getVariant', 'project', project);
648
+ // verify required parameter 'variantId' is not null or undefined
649
+ assertParamExists('getVariant', 'variantId', variantId);
650
+ const localVarPath = `/v1/gfn/catalog/variants/{variantId}`
651
+ .replace(`{${"variantId"}}`, encodeURIComponent(String(variantId)));
652
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
653
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
654
+ let baseOptions;
655
+ if (configuration) {
656
+ baseOptions = configuration.baseOptions;
657
+ }
658
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
659
+ const localVarHeaderParameter = {};
660
+ const localVarQueryParameter = {};
661
+ // authentication session-oauth required
662
+ // oauth required
663
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
664
+ // authentication api-key required
665
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
666
+ if (project !== undefined) {
667
+ localVarQueryParameter['project'] = project;
668
+ }
669
+ if (fields !== undefined) {
670
+ localVarQueryParameter['fields'] = fields;
671
+ }
672
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
673
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
674
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
675
+ return {
676
+ url: toPathString(localVarUrlObj),
677
+ options: localVarRequestOptions,
678
+ };
679
+ }),
680
+ /**
681
+ * Lists the stock levels for all GFN variants available to the project.
682
+ * @summary List GFN variant stock
683
+ * @param {string} project What project it is
684
+ * @param {string} [fulfillmentProjects] Fetch stock levels from specific fulfiller projects
685
+ * @param {number} [pageToken] Page reference token
686
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
687
+ * @param {string} [search] Search terms to filter based on.
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ */
691
+ listStock: (project_3, fulfillmentProjects_2, pageToken_1, pageSize_1, search_1, ...args_3) => __awaiter(this, [project_3, fulfillmentProjects_2, pageToken_1, pageSize_1, search_1, ...args_3], void 0, function* (project, fulfillmentProjects, pageToken, pageSize, search, options = {}) {
692
+ // verify required parameter 'project' is not null or undefined
693
+ assertParamExists('listStock', 'project', project);
694
+ const localVarPath = `/v1/gfn/catalog/stock`;
695
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
696
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
697
+ let baseOptions;
698
+ if (configuration) {
699
+ baseOptions = configuration.baseOptions;
700
+ }
701
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
702
+ const localVarHeaderParameter = {};
703
+ const localVarQueryParameter = {};
704
+ // authentication session-oauth required
705
+ // oauth required
706
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
707
+ // authentication api-key required
708
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
709
+ if (project !== undefined) {
710
+ localVarQueryParameter['project'] = project;
711
+ }
712
+ if (fulfillmentProjects !== undefined) {
713
+ localVarQueryParameter['fulfillmentProjects'] = fulfillmentProjects;
714
+ }
715
+ if (pageToken !== undefined) {
716
+ localVarQueryParameter['pageToken'] = pageToken;
717
+ }
718
+ if (pageSize !== undefined) {
719
+ localVarQueryParameter['pageSize'] = pageSize;
720
+ }
721
+ if (search !== undefined) {
722
+ localVarQueryParameter['search'] = search;
723
+ }
724
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
725
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
726
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
727
+ return {
728
+ url: toPathString(localVarUrlObj),
729
+ options: localVarRequestOptions,
730
+ };
731
+ }),
732
+ /**
733
+ * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
734
+ * @summary List GFN variants
735
+ * @param {string} project What project it is
736
+ * @param {number} [pageToken] Page reference token
737
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
738
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
739
+ * @param {string} [search] Search terms to filter based on.
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ */
743
+ listVariants: (project_4, pageToken_2, pageSize_2, fields_2, search_2, ...args_4) => __awaiter(this, [project_4, pageToken_2, pageSize_2, fields_2, search_2, ...args_4], void 0, function* (project, pageToken, pageSize, fields, search, options = {}) {
744
+ // verify required parameter 'project' is not null or undefined
745
+ assertParamExists('listVariants', 'project', project);
746
+ const localVarPath = `/v1/gfn/catalog/variants`;
747
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
748
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
749
+ let baseOptions;
750
+ if (configuration) {
751
+ baseOptions = configuration.baseOptions;
752
+ }
753
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
754
+ const localVarHeaderParameter = {};
755
+ const localVarQueryParameter = {};
756
+ // authentication session-oauth required
757
+ // oauth required
758
+ yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
759
+ // authentication api-key required
760
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
761
+ if (project !== undefined) {
762
+ localVarQueryParameter['project'] = project;
763
+ }
764
+ if (pageToken !== undefined) {
765
+ localVarQueryParameter['pageToken'] = pageToken;
766
+ }
767
+ if (pageSize !== undefined) {
768
+ localVarQueryParameter['pageSize'] = pageSize;
769
+ }
770
+ if (fields !== undefined) {
771
+ localVarQueryParameter['fields'] = fields;
772
+ }
773
+ if (search !== undefined) {
774
+ localVarQueryParameter['search'] = search;
775
+ }
776
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
777
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
778
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
779
+ return {
780
+ url: toPathString(localVarUrlObj),
781
+ options: localVarRequestOptions,
782
+ };
783
+ }),
784
+ };
785
+ };
786
+ /**
787
+ * VariantsApi - functional programming interface
788
+ * @export
789
+ */
790
+ export const VariantsApiFp = function (configuration) {
791
+ const localVarAxiosParamCreator = VariantsApiAxiosParamCreator(configuration);
792
+ return {
793
+ /**
794
+ * Gets the stock level for the GFN variant with the given ID.
795
+ * @summary Get GFN variant stock
796
+ * @param {string} project What project it is
797
+ * @param {string} variantId Variants unique identifier
798
+ * @param {string} [fulfillmentProjects] Fetch stock levels from specific fulfiller projects
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ */
802
+ getStock(project, variantId, fulfillmentProjects, options) {
803
+ return __awaiter(this, void 0, void 0, function* () {
804
+ var _a, _b, _c;
805
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getStock(project, variantId, fulfillmentProjects, options);
806
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
807
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VariantsApi.getStock']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
808
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
809
+ });
810
+ },
811
+ /**
812
+ * Gets a GFN variant by the given ID.
813
+ * @summary Get a GFN variant
814
+ * @param {string} project What project it is
815
+ * @param {string} variantId Variants unique identifier
816
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
817
+ * @param {*} [options] Override http request option.
818
+ * @throws {RequiredError}
819
+ */
820
+ getVariant(project, variantId, fields, options) {
821
+ return __awaiter(this, void 0, void 0, function* () {
822
+ var _a, _b, _c;
823
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getVariant(project, variantId, fields, options);
824
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
825
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VariantsApi.getVariant']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
826
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
827
+ });
828
+ },
829
+ /**
830
+ * Lists the stock levels for all GFN variants available to the project.
831
+ * @summary List GFN variant stock
832
+ * @param {string} project What project it is
833
+ * @param {string} [fulfillmentProjects] Fetch stock levels from specific fulfiller projects
834
+ * @param {number} [pageToken] Page reference token
835
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
836
+ * @param {string} [search] Search terms to filter based on.
837
+ * @param {*} [options] Override http request option.
838
+ * @throws {RequiredError}
839
+ */
840
+ listStock(project, fulfillmentProjects, pageToken, pageSize, search, options) {
841
+ return __awaiter(this, void 0, void 0, function* () {
842
+ var _a, _b, _c;
843
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listStock(project, fulfillmentProjects, pageToken, pageSize, search, options);
844
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
845
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VariantsApi.listStock']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
846
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
847
+ });
848
+ },
849
+ /**
850
+ * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
851
+ * @summary List GFN variants
852
+ * @param {string} project What project it is
853
+ * @param {number} [pageToken] Page reference token
854
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
855
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
856
+ * @param {string} [search] Search terms to filter based on.
857
+ * @param {*} [options] Override http request option.
858
+ * @throws {RequiredError}
859
+ */
860
+ listVariants(project, pageToken, pageSize, fields, search, options) {
861
+ return __awaiter(this, void 0, void 0, function* () {
862
+ var _a, _b, _c;
863
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listVariants(project, pageToken, pageSize, fields, search, options);
864
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
865
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['VariantsApi.listVariants']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
866
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
867
+ });
868
+ },
869
+ };
870
+ };
871
+ /**
872
+ * VariantsApi - factory interface
873
+ * @export
874
+ */
875
+ export const VariantsApiFactory = function (configuration, basePath, axios) {
876
+ const localVarFp = VariantsApiFp(configuration);
877
+ return {
878
+ /**
879
+ * Gets the stock level for the GFN variant with the given ID.
880
+ * @summary Get GFN variant stock
881
+ * @param {string} project What project it is
882
+ * @param {string} variantId Variants unique identifier
883
+ * @param {string} [fulfillmentProjects] Fetch stock levels from specific fulfiller projects
884
+ * @param {*} [options] Override http request option.
885
+ * @throws {RequiredError}
886
+ */
887
+ getStock(project, variantId, fulfillmentProjects, options) {
888
+ return localVarFp.getStock(project, variantId, fulfillmentProjects, options).then((request) => request(axios, basePath));
889
+ },
890
+ /**
891
+ * Gets a GFN variant by the given ID.
892
+ * @summary Get a GFN variant
893
+ * @param {string} project What project it is
894
+ * @param {string} variantId Variants unique identifier
895
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
896
+ * @param {*} [options] Override http request option.
897
+ * @throws {RequiredError}
898
+ */
899
+ getVariant(project, variantId, fields, options) {
900
+ return localVarFp.getVariant(project, variantId, fields, options).then((request) => request(axios, basePath));
901
+ },
902
+ /**
903
+ * Lists the stock levels for all GFN variants available to the project.
904
+ * @summary List GFN variant stock
905
+ * @param {string} project What project it is
906
+ * @param {string} [fulfillmentProjects] Fetch stock levels from specific fulfiller projects
907
+ * @param {number} [pageToken] Page reference token
908
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
909
+ * @param {string} [search] Search terms to filter based on.
910
+ * @param {*} [options] Override http request option.
911
+ * @throws {RequiredError}
912
+ */
913
+ listStock(project, fulfillmentProjects, pageToken, pageSize, search, options) {
914
+ return localVarFp.listStock(project, fulfillmentProjects, pageToken, pageSize, search, options).then((request) => request(axios, basePath));
915
+ },
916
+ /**
917
+ * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
918
+ * @summary List GFN variants
919
+ * @param {string} project What project it is
920
+ * @param {number} [pageToken] Page reference token
921
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
922
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
923
+ * @param {string} [search] Search terms to filter based on.
924
+ * @param {*} [options] Override http request option.
925
+ * @throws {RequiredError}
926
+ */
927
+ listVariants(project, pageToken, pageSize, fields, search, options) {
928
+ return localVarFp.listVariants(project, pageToken, pageSize, fields, search, options).then((request) => request(axios, basePath));
929
+ },
930
+ };
931
+ };
932
+ /**
933
+ * VariantsApi - object-oriented interface
934
+ * @export
935
+ * @class VariantsApi
936
+ * @extends {BaseAPI}
937
+ */
938
+ export class VariantsApi extends BaseAPI {
939
+ /**
940
+ * Gets the stock level for the GFN variant with the given ID.
941
+ * @summary Get GFN variant stock
942
+ * @param {string} project What project it is
943
+ * @param {string} variantId Variants unique identifier
944
+ * @param {string} [fulfillmentProjects] Fetch stock levels from specific fulfiller projects
945
+ * @param {*} [options] Override http request option.
946
+ * @throws {RequiredError}
947
+ * @memberof VariantsApi
948
+ */
949
+ getStock(project, variantId, fulfillmentProjects, options) {
950
+ return VariantsApiFp(this.configuration).getStock(project, variantId, fulfillmentProjects, options).then((request) => request(this.axios, this.basePath));
951
+ }
952
+ /**
953
+ * Gets a GFN variant by the given ID.
954
+ * @summary Get a GFN variant
955
+ * @param {string} project What project it is
956
+ * @param {string} variantId Variants unique identifier
957
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
958
+ * @param {*} [options] Override http request option.
959
+ * @throws {RequiredError}
960
+ * @memberof VariantsApi
961
+ */
962
+ getVariant(project, variantId, fields, options) {
963
+ return VariantsApiFp(this.configuration).getVariant(project, variantId, fields, options).then((request) => request(this.axios, this.basePath));
964
+ }
965
+ /**
966
+ * Lists the stock levels for all GFN variants available to the project.
967
+ * @summary List GFN variant stock
968
+ * @param {string} project What project it is
969
+ * @param {string} [fulfillmentProjects] Fetch stock levels from specific fulfiller projects
970
+ * @param {number} [pageToken] Page reference token
971
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
972
+ * @param {string} [search] Search terms to filter based on.
973
+ * @param {*} [options] Override http request option.
974
+ * @throws {RequiredError}
975
+ * @memberof VariantsApi
976
+ */
977
+ listStock(project, fulfillmentProjects, pageToken, pageSize, search, options) {
978
+ return VariantsApiFp(this.configuration).listStock(project, fulfillmentProjects, pageToken, pageSize, search, options).then((request) => request(this.axios, this.basePath));
979
+ }
980
+ /**
981
+ * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
982
+ * @summary List GFN variants
983
+ * @param {string} project What project it is
984
+ * @param {number} [pageToken] Page reference token
985
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
986
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
987
+ * @param {string} [search] Search terms to filter based on.
988
+ * @param {*} [options] Override http request option.
989
+ * @throws {RequiredError}
990
+ * @memberof VariantsApi
991
+ */
992
+ listVariants(project, pageToken, pageSize, fields, search, options) {
993
+ return VariantsApiFp(this.configuration).listVariants(project, pageToken, pageSize, fields, search, options).then((request) => request(this.axios, this.basePath));
994
+ }
995
+ }