@teemill/website 0.2.6 → 0.4.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.
package/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Website API
6
6
  * Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 0.2.6
8
+ * The version of the OpenAPI document: 0.4.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,17 +22,241 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.PaymentApi = exports.PaymentApiFactory = exports.PaymentApiFp = exports.PaymentApiAxiosParamCreator = exports.MenuApi = exports.MenuApiFactory = exports.MenuApiFp = exports.MenuApiAxiosParamCreator = exports.PaymentAccountMethodEnum = void 0;
25
+ exports.PaymentApi = exports.PaymentApiFactory = exports.PaymentApiFp = exports.PaymentApiAxiosParamCreator = exports.MenuApi = exports.MenuApiFactory = exports.MenuApiFp = exports.MenuApiAxiosParamCreator = exports.CrossSellApi = exports.CrossSellApiFactory = exports.CrossSellApiFp = exports.CrossSellApiAxiosParamCreator = exports.PriceCurrencyCodeEnum = exports.PaymentAccountMethodEnum = exports.AttributeThumbnailTypeEnum = exports.ApplicationPlacementEnum = exports.ApplicationTechnologyEnum = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
29
29
  const common_1 = require("./common");
30
30
  // @ts-ignore
31
31
  const base_1 = require("./base");
32
+ exports.ApplicationTechnologyEnum = {
33
+ Dtg: 'dtg',
34
+ Embroidery: 'embroidery',
35
+ Dtf: 'dtf',
36
+ Pretreat: 'pretreat',
37
+ MugSublimation: 'mug_sublimation',
38
+ ManualPrint: 'manual_print',
39
+ AdditionalApplication: 'additional_application',
40
+ NotebookSublimation: 'notebook_sublimation',
41
+ DuplexPrint: 'duplex_print'
42
+ };
43
+ exports.ApplicationPlacementEnum = {
44
+ Front: 'front',
45
+ Back: 'back',
46
+ Left: 'left',
47
+ Right: 'right',
48
+ Neck: 'neck'
49
+ };
50
+ exports.AttributeThumbnailTypeEnum = {
51
+ Text: 'text',
52
+ Color: 'color',
53
+ Image: 'image'
54
+ };
32
55
  exports.PaymentAccountMethodEnum = {
33
56
  Stripe: 'stripe',
34
57
  Paypal: 'paypal'
35
58
  };
59
+ exports.PriceCurrencyCodeEnum = {
60
+ Gbp: 'GBP'
61
+ };
62
+ /**
63
+ * CrossSellApi - axios parameter creator
64
+ * @export
65
+ */
66
+ const CrossSellApiAxiosParamCreator = function (configuration) {
67
+ return {
68
+ /**
69
+ * Attaches a list of products to the given product as cross-sell products.
70
+ * @summary Attach cross-sell products
71
+ * @param {string} project What project it is
72
+ * @param {string} productId Product\'s unique identifier
73
+ * @param {AttachCrossSellProductsRequest} [attachCrossSellProductsRequest]
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ */
77
+ attachCrossSellProducts: (project_1, productId_1, attachCrossSellProductsRequest_1, ...args_1) => __awaiter(this, [project_1, productId_1, attachCrossSellProductsRequest_1, ...args_1], void 0, function* (project, productId, attachCrossSellProductsRequest, options = {}) {
78
+ // verify required parameter 'project' is not null or undefined
79
+ (0, common_1.assertParamExists)('attachCrossSellProducts', 'project', project);
80
+ // verify required parameter 'productId' is not null or undefined
81
+ (0, common_1.assertParamExists)('attachCrossSellProducts', 'productId', productId);
82
+ const localVarPath = `/v1/website/products/{productId}/cross-sell/products`
83
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
84
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
85
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
86
+ let baseOptions;
87
+ if (configuration) {
88
+ baseOptions = configuration.baseOptions;
89
+ }
90
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
91
+ const localVarHeaderParameter = {};
92
+ const localVarQueryParameter = {};
93
+ // authentication session-oauth required
94
+ // oauth required
95
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
96
+ // authentication api-key required
97
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
98
+ if (project !== undefined) {
99
+ localVarQueryParameter['project'] = project;
100
+ }
101
+ localVarHeaderParameter['Content-Type'] = 'application/json';
102
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
103
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
104
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
105
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(attachCrossSellProductsRequest, localVarRequestOptions, configuration);
106
+ return {
107
+ url: (0, common_1.toPathString)(localVarUrlObj),
108
+ options: localVarRequestOptions,
109
+ };
110
+ }),
111
+ /**
112
+ *
113
+ * @summary Get cross-sell products linked to a product
114
+ * @param {string} project What project it is
115
+ * @param {string} productId Product\'s unique identifier
116
+ * @param {*} [options] Override http request option.
117
+ * @throws {RequiredError}
118
+ */
119
+ getCrossSellProducts: (project_1, productId_1, ...args_1) => __awaiter(this, [project_1, productId_1, ...args_1], void 0, function* (project, productId, options = {}) {
120
+ // verify required parameter 'project' is not null or undefined
121
+ (0, common_1.assertParamExists)('getCrossSellProducts', 'project', project);
122
+ // verify required parameter 'productId' is not null or undefined
123
+ (0, common_1.assertParamExists)('getCrossSellProducts', 'productId', productId);
124
+ const localVarPath = `/v1/website/products/{productId}/cross-sell/products`
125
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
126
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
127
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
128
+ let baseOptions;
129
+ if (configuration) {
130
+ baseOptions = configuration.baseOptions;
131
+ }
132
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
133
+ const localVarHeaderParameter = {};
134
+ const localVarQueryParameter = {};
135
+ // authentication session-oauth required
136
+ // oauth required
137
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
138
+ // authentication api-key required
139
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
140
+ if (project !== undefined) {
141
+ localVarQueryParameter['project'] = project;
142
+ }
143
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
144
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
145
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
146
+ return {
147
+ url: (0, common_1.toPathString)(localVarUrlObj),
148
+ options: localVarRequestOptions,
149
+ };
150
+ }),
151
+ };
152
+ };
153
+ exports.CrossSellApiAxiosParamCreator = CrossSellApiAxiosParamCreator;
154
+ /**
155
+ * CrossSellApi - functional programming interface
156
+ * @export
157
+ */
158
+ const CrossSellApiFp = function (configuration) {
159
+ const localVarAxiosParamCreator = (0, exports.CrossSellApiAxiosParamCreator)(configuration);
160
+ return {
161
+ /**
162
+ * Attaches a list of products to the given product as cross-sell products.
163
+ * @summary Attach cross-sell products
164
+ * @param {string} project What project it is
165
+ * @param {string} productId Product\'s unique identifier
166
+ * @param {AttachCrossSellProductsRequest} [attachCrossSellProductsRequest]
167
+ * @param {*} [options] Override http request option.
168
+ * @throws {RequiredError}
169
+ */
170
+ attachCrossSellProducts(project, productId, attachCrossSellProductsRequest, options) {
171
+ return __awaiter(this, void 0, void 0, function* () {
172
+ var _a, _b, _c;
173
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.attachCrossSellProducts(project, productId, attachCrossSellProductsRequest, options);
174
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
175
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CrossSellApi.attachCrossSellProducts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
176
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
177
+ });
178
+ },
179
+ /**
180
+ *
181
+ * @summary Get cross-sell products linked to a product
182
+ * @param {string} project What project it is
183
+ * @param {string} productId Product\'s unique identifier
184
+ * @param {*} [options] Override http request option.
185
+ * @throws {RequiredError}
186
+ */
187
+ getCrossSellProducts(project, productId, options) {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ var _a, _b, _c;
190
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCrossSellProducts(project, productId, options);
191
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
192
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CrossSellApi.getCrossSellProducts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
193
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
194
+ });
195
+ },
196
+ };
197
+ };
198
+ exports.CrossSellApiFp = CrossSellApiFp;
199
+ /**
200
+ * CrossSellApi - factory interface
201
+ * @export
202
+ */
203
+ const CrossSellApiFactory = function (configuration, basePath, axios) {
204
+ const localVarFp = (0, exports.CrossSellApiFp)(configuration);
205
+ return {
206
+ /**
207
+ * Attaches a list of products to the given product as cross-sell products.
208
+ * @summary Attach cross-sell products
209
+ * @param {CrossSellApiAttachCrossSellProductsRequest} requestParameters Request parameters.
210
+ * @param {*} [options] Override http request option.
211
+ * @throws {RequiredError}
212
+ */
213
+ attachCrossSellProducts(requestParameters, options) {
214
+ return localVarFp.attachCrossSellProducts(requestParameters.project, requestParameters.productId, requestParameters.attachCrossSellProductsRequest, options).then((request) => request(axios, basePath));
215
+ },
216
+ /**
217
+ *
218
+ * @summary Get cross-sell products linked to a product
219
+ * @param {CrossSellApiGetCrossSellProductsRequest} requestParameters Request parameters.
220
+ * @param {*} [options] Override http request option.
221
+ * @throws {RequiredError}
222
+ */
223
+ getCrossSellProducts(requestParameters, options) {
224
+ return localVarFp.getCrossSellProducts(requestParameters.project, requestParameters.productId, options).then((request) => request(axios, basePath));
225
+ },
226
+ };
227
+ };
228
+ exports.CrossSellApiFactory = CrossSellApiFactory;
229
+ /**
230
+ * CrossSellApi - object-oriented interface
231
+ * @export
232
+ * @class CrossSellApi
233
+ * @extends {BaseAPI}
234
+ */
235
+ class CrossSellApi extends base_1.BaseAPI {
236
+ /**
237
+ * Attaches a list of products to the given product as cross-sell products.
238
+ * @summary Attach cross-sell products
239
+ * @param {CrossSellApiAttachCrossSellProductsRequest} requestParameters Request parameters.
240
+ * @param {*} [options] Override http request option.
241
+ * @throws {RequiredError}
242
+ * @memberof CrossSellApi
243
+ */
244
+ attachCrossSellProducts(requestParameters, options) {
245
+ return (0, exports.CrossSellApiFp)(this.configuration).attachCrossSellProducts(requestParameters.project, requestParameters.productId, requestParameters.attachCrossSellProductsRequest, options).then((request) => request(this.axios, this.basePath));
246
+ }
247
+ /**
248
+ *
249
+ * @summary Get cross-sell products linked to a product
250
+ * @param {CrossSellApiGetCrossSellProductsRequest} requestParameters Request parameters.
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ * @memberof CrossSellApi
254
+ */
255
+ getCrossSellProducts(requestParameters, options) {
256
+ return (0, exports.CrossSellApiFp)(this.configuration).getCrossSellProducts(requestParameters.project, requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
257
+ }
258
+ }
259
+ exports.CrossSellApi = CrossSellApi;
36
260
  /**
37
261
  * MenuApi - axios parameter creator
38
262
  * @export
package/dist/base.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Website API
3
3
  * Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 0.2.6
5
+ * The version of the OpenAPI document: 0.4.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/base.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Website API
6
6
  * Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 0.2.6
8
+ * The version of the OpenAPI document: 0.4.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Website API
3
3
  * Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 0.2.6
5
+ * The version of the OpenAPI document: 0.4.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Website API
6
6
  * Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 0.2.6
8
+ * The version of the OpenAPI document: 0.4.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Website API
3
3
  * Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 0.2.6
5
+ * The version of the OpenAPI document: 0.4.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Website API
6
6
  * Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 0.2.6
8
+ * The version of the OpenAPI document: 0.4.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).