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