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