@teemill/gfn-catalog 1.4.0 → 2.0.0

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