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