@teemill/orders 0.3.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +24 -6
- package/README.md +3 -3
- package/dist/apis/OrdersApi.d.ts +79 -0
- package/dist/apis/OrdersApi.js +319 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +19 -0
- package/dist/index.d.ts +3 -13
- package/dist/index.js +5 -15
- package/dist/models/Address.d.ts +73 -0
- package/dist/models/Address.js +68 -0
- package/dist/models/ApiError.d.ts +37 -0
- package/dist/models/ApiError.js +53 -0
- package/dist/models/ConfirmOrderFulfillment.d.ts +37 -0
- package/dist/models/ConfirmOrderFulfillment.js +53 -0
- package/dist/models/ConfirmOrderRequest.d.ts +32 -0
- package/dist/models/ConfirmOrderRequest.js +51 -0
- package/dist/models/ConfirmOrderValidationError.d.ts +47 -0
- package/dist/models/ConfirmOrderValidationError.js +62 -0
- package/dist/models/ContactInformation.d.ts +37 -0
- package/dist/models/ContactInformation.js +53 -0
- package/dist/models/DeliveryEstimates.d.ts +37 -0
- package/dist/models/DeliveryEstimates.js +52 -0
- package/dist/models/Fulfillment.d.ts +71 -0
- package/dist/models/Fulfillment.js +66 -0
- package/dist/models/FulfillmentItem.d.ts +43 -0
- package/dist/models/FulfillmentItem.js +54 -0
- package/dist/models/Order.d.ts +128 -0
- package/dist/models/Order.js +89 -0
- package/dist/models/OrderItem.d.ts +75 -0
- package/dist/models/OrderItem.js +64 -0
- package/dist/models/OrderItemTaxPrice.d.ts +37 -0
- package/dist/models/OrderItemTaxPrice.js +52 -0
- package/dist/models/OrderTracking.d.ts +43 -0
- package/dist/models/OrderTracking.js +54 -0
- package/dist/models/OrdersResponse.d.ts +38 -0
- package/dist/models/OrdersResponse.js +53 -0
- package/dist/models/Origin.d.ts +37 -0
- package/dist/models/Origin.js +52 -0
- package/dist/models/Price.d.ts +37 -0
- package/dist/models/Price.js +52 -0
- package/dist/models/ShippingMethod.d.ts +75 -0
- package/dist/models/ShippingMethod.js +66 -0
- package/dist/models/Status.d.ts +26 -0
- package/dist/models/Status.js +39 -0
- package/dist/models/index.d.ts +18 -0
- package/dist/models/index.js +36 -0
- package/dist/runtime.d.ts +182 -0
- package/dist/runtime.js +562 -0
- package/package.json +3 -15
- package/src/apis/OrdersApi.ts +269 -0
- package/src/apis/index.ts +3 -0
- package/src/index.ts +5 -0
- package/src/models/Address.ts +125 -0
- package/src/models/ApiError.ts +74 -0
- package/src/models/ConfirmOrderFulfillment.ts +75 -0
- package/src/models/ConfirmOrderRequest.ts +73 -0
- package/src/models/ConfirmOrderValidationError.ts +88 -0
- package/src/models/ContactInformation.ts +74 -0
- package/src/models/DeliveryEstimates.ts +73 -0
- package/src/models/Fulfillment.ts +138 -0
- package/src/models/FulfillmentItem.ts +81 -0
- package/src/models/Order.ts +230 -0
- package/src/models/OrderItem.ts +132 -0
- package/src/models/OrderItemTaxPrice.ts +73 -0
- package/src/models/OrderTracking.ts +81 -0
- package/src/models/OrdersResponse.ts +80 -0
- package/src/models/Origin.ts +73 -0
- package/src/models/Price.ts +73 -0
- package/src/models/ShippingMethod.ts +134 -0
- package/src/models/Status.ts +41 -0
- package/src/models/index.ts +20 -0
- package/src/runtime.ts +431 -0
- package/tsconfig.json +2 -3
- package/api.ts +0 -988
- package/base.ts +0 -72
- package/common.ts +0 -150
- package/configuration.ts +0 -101
- package/dist/api.d.ts +0 -750
- package/dist/api.js +0 -560
- package/dist/base.d.ts +0 -54
- package/dist/base.js +0 -80
- package/dist/common.d.ts +0 -65
- package/dist/common.js +0 -252
- package/dist/configuration.d.ts +0 -83
- package/dist/configuration.js +0 -44
- package/git_push.sh +0 -57
- package/index.ts +0 -18
package/dist/api.js
DELETED
|
@@ -1,560 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Orders API
|
|
6
|
-
* Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.3.1
|
|
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 __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __assign = (this && this.__assign) || function () {
|
|
31
|
-
__assign = Object.assign || function(t) {
|
|
32
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
-
s = arguments[i];
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
return __assign.apply(this, arguments);
|
|
40
|
-
};
|
|
41
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
-
function step(op) {
|
|
55
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
-
switch (op[0]) {
|
|
60
|
-
case 0: case 1: t = op; break;
|
|
61
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
-
default:
|
|
65
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
-
if (t[2]) _.ops.pop();
|
|
70
|
-
_.trys.pop(); continue;
|
|
71
|
-
}
|
|
72
|
-
op = body.call(thisArg, _);
|
|
73
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
|
-
exports.OrdersApi = exports.OrdersApiFactory = exports.OrdersApiFp = exports.OrdersApiAxiosParamCreator = exports.Status = void 0;
|
|
79
|
-
var axios_1 = require("axios");
|
|
80
|
-
// Some imports not used depending on template conditions
|
|
81
|
-
// @ts-ignore
|
|
82
|
-
var common_1 = require("./common");
|
|
83
|
-
// @ts-ignore
|
|
84
|
-
var base_1 = require("./base");
|
|
85
|
-
/**
|
|
86
|
-
*
|
|
87
|
-
* @export
|
|
88
|
-
* @enum {string}
|
|
89
|
-
*/
|
|
90
|
-
exports.Status = {
|
|
91
|
-
New: 'new',
|
|
92
|
-
Paid: 'paid',
|
|
93
|
-
Processing: 'processing',
|
|
94
|
-
Complete: 'complete',
|
|
95
|
-
Refunded: 'refunded'
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* OrdersApi - axios parameter creator
|
|
99
|
-
* @export
|
|
100
|
-
*/
|
|
101
|
-
var OrdersApiAxiosParamCreator = function (configuration) {
|
|
102
|
-
var _this = this;
|
|
103
|
-
return {
|
|
104
|
-
/**
|
|
105
|
-
* Confirms and order, and submits it as ready to take payment and begin processing.
|
|
106
|
-
* @summary Confirm order
|
|
107
|
-
* @param {any} project What project it is
|
|
108
|
-
* @param {string} orderId Unique identifier of an order
|
|
109
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
|
|
110
|
-
* @param {*} [options] Override http request option.
|
|
111
|
-
* @throws {RequiredError}
|
|
112
|
-
*/
|
|
113
|
-
confirmOrder: function (project, orderId, confirmOrderRequest, options) {
|
|
114
|
-
if (options === void 0) { options = {}; }
|
|
115
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
116
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, _i, _a, param, headersFromBaseOptions;
|
|
117
|
-
return __generator(this, function (_b) {
|
|
118
|
-
switch (_b.label) {
|
|
119
|
-
case 0:
|
|
120
|
-
// verify required parameter 'project' is not null or undefined
|
|
121
|
-
(0, common_1.assertParamExists)('confirmOrder', 'project', project);
|
|
122
|
-
// verify required parameter 'orderId' is not null or undefined
|
|
123
|
-
(0, common_1.assertParamExists)('confirmOrder', 'orderId', orderId);
|
|
124
|
-
// verify required parameter 'confirmOrderRequest' is not null or undefined
|
|
125
|
-
(0, common_1.assertParamExists)('confirmOrder', 'confirmOrderRequest', confirmOrderRequest);
|
|
126
|
-
localVarPath = "/v1/orders/{orderId}/confirm"
|
|
127
|
-
.replace("{".concat("orderId", "}"), encodeURIComponent(String(orderId)));
|
|
128
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
129
|
-
if (configuration) {
|
|
130
|
-
baseOptions = configuration.baseOptions;
|
|
131
|
-
}
|
|
132
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
133
|
-
localVarHeaderParameter = {};
|
|
134
|
-
localVarQueryParameter = {};
|
|
135
|
-
// authentication api-key required
|
|
136
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
137
|
-
case 1:
|
|
138
|
-
// authentication api-key required
|
|
139
|
-
_b.sent();
|
|
140
|
-
if (project !== undefined) {
|
|
141
|
-
for (_i = 0, _a = Object.keys(project); _i < _a.length; _i++) {
|
|
142
|
-
param = _a[_i];
|
|
143
|
-
localVarQueryParameter[param] = project === null || project === void 0 ? void 0 : project[param];
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
147
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
148
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
149
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
150
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(confirmOrderRequest, localVarRequestOptions, configuration);
|
|
151
|
-
return [2 /*return*/, {
|
|
152
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
153
|
-
options: localVarRequestOptions,
|
|
154
|
-
}];
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
},
|
|
159
|
-
/**
|
|
160
|
-
* Creates a new order for the provided variants.
|
|
161
|
-
* @summary Create order
|
|
162
|
-
* @param {any} project What project it is
|
|
163
|
-
* @param {Order} order Order schema
|
|
164
|
-
* @param {*} [options] Override http request option.
|
|
165
|
-
* @throws {RequiredError}
|
|
166
|
-
*/
|
|
167
|
-
createOrder: function (project, order, options) {
|
|
168
|
-
if (options === void 0) { options = {}; }
|
|
169
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
170
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, _i, _a, param, headersFromBaseOptions;
|
|
171
|
-
return __generator(this, function (_b) {
|
|
172
|
-
switch (_b.label) {
|
|
173
|
-
case 0:
|
|
174
|
-
// verify required parameter 'project' is not null or undefined
|
|
175
|
-
(0, common_1.assertParamExists)('createOrder', 'project', project);
|
|
176
|
-
// verify required parameter 'order' is not null or undefined
|
|
177
|
-
(0, common_1.assertParamExists)('createOrder', 'order', order);
|
|
178
|
-
localVarPath = "/v1/orders";
|
|
179
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
180
|
-
if (configuration) {
|
|
181
|
-
baseOptions = configuration.baseOptions;
|
|
182
|
-
}
|
|
183
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
184
|
-
localVarHeaderParameter = {};
|
|
185
|
-
localVarQueryParameter = {};
|
|
186
|
-
// authentication api-key required
|
|
187
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
188
|
-
case 1:
|
|
189
|
-
// authentication api-key required
|
|
190
|
-
_b.sent();
|
|
191
|
-
if (project !== undefined) {
|
|
192
|
-
for (_i = 0, _a = Object.keys(project); _i < _a.length; _i++) {
|
|
193
|
-
param = _a[_i];
|
|
194
|
-
localVarQueryParameter[param] = project === null || project === void 0 ? void 0 : project[param];
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
198
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
199
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
200
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
201
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(order, localVarRequestOptions, configuration);
|
|
202
|
-
return [2 /*return*/, {
|
|
203
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
204
|
-
options: localVarRequestOptions,
|
|
205
|
-
}];
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
});
|
|
209
|
-
},
|
|
210
|
-
/**
|
|
211
|
-
* Get an order
|
|
212
|
-
* @summary Get order
|
|
213
|
-
* @param {any} project What project it is
|
|
214
|
-
* @param {string} orderId Unique identifier of an order
|
|
215
|
-
* @param {*} [options] Override http request option.
|
|
216
|
-
* @throws {RequiredError}
|
|
217
|
-
*/
|
|
218
|
-
getOrder: function (project, orderId, options) {
|
|
219
|
-
if (options === void 0) { options = {}; }
|
|
220
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
221
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, _i, _a, param, headersFromBaseOptions;
|
|
222
|
-
return __generator(this, function (_b) {
|
|
223
|
-
switch (_b.label) {
|
|
224
|
-
case 0:
|
|
225
|
-
// verify required parameter 'project' is not null or undefined
|
|
226
|
-
(0, common_1.assertParamExists)('getOrder', 'project', project);
|
|
227
|
-
// verify required parameter 'orderId' is not null or undefined
|
|
228
|
-
(0, common_1.assertParamExists)('getOrder', 'orderId', orderId);
|
|
229
|
-
localVarPath = "/v1/orders/{orderId}"
|
|
230
|
-
.replace("{".concat("orderId", "}"), encodeURIComponent(String(orderId)));
|
|
231
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
232
|
-
if (configuration) {
|
|
233
|
-
baseOptions = configuration.baseOptions;
|
|
234
|
-
}
|
|
235
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
236
|
-
localVarHeaderParameter = {};
|
|
237
|
-
localVarQueryParameter = {};
|
|
238
|
-
// authentication api-key required
|
|
239
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
240
|
-
case 1:
|
|
241
|
-
// authentication api-key required
|
|
242
|
-
_b.sent();
|
|
243
|
-
if (project !== undefined) {
|
|
244
|
-
for (_i = 0, _a = Object.keys(project); _i < _a.length; _i++) {
|
|
245
|
-
param = _a[_i];
|
|
246
|
-
localVarQueryParameter[param] = project === null || project === void 0 ? void 0 : project[param];
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
250
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
251
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
252
|
-
return [2 /*return*/, {
|
|
253
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
254
|
-
options: localVarRequestOptions,
|
|
255
|
-
}];
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
},
|
|
260
|
-
/**
|
|
261
|
-
* Lists all orders available paginated into chunks
|
|
262
|
-
* @summary List orders
|
|
263
|
-
* @param {any} [pageToken] Page reference token
|
|
264
|
-
* @param {any} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
265
|
-
* @param {any} [start] Start of date range to filter by when orders were placed
|
|
266
|
-
* @param {any} [end] End of date range to filter by when orders were placed
|
|
267
|
-
* @param {any} [search] Search term to filter based on order reference, customer name and email
|
|
268
|
-
* @param {*} [options] Override http request option.
|
|
269
|
-
* @throws {RequiredError}
|
|
270
|
-
*/
|
|
271
|
-
getOrders: function (pageToken, pageSize, start, end, search, options) {
|
|
272
|
-
if (options === void 0) { options = {}; }
|
|
273
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
274
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, _i, _a, param, _b, _c, param, _d, _e, param, _f, _g, param, _h, _j, param, headersFromBaseOptions;
|
|
275
|
-
return __generator(this, function (_k) {
|
|
276
|
-
switch (_k.label) {
|
|
277
|
-
case 0:
|
|
278
|
-
localVarPath = "/v1/orders";
|
|
279
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
280
|
-
if (configuration) {
|
|
281
|
-
baseOptions = configuration.baseOptions;
|
|
282
|
-
}
|
|
283
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
284
|
-
localVarHeaderParameter = {};
|
|
285
|
-
localVarQueryParameter = {};
|
|
286
|
-
// authentication api-key required
|
|
287
|
-
return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration)];
|
|
288
|
-
case 1:
|
|
289
|
-
// authentication api-key required
|
|
290
|
-
_k.sent();
|
|
291
|
-
if (pageToken !== undefined) {
|
|
292
|
-
for (_i = 0, _a = Object.keys(pageToken); _i < _a.length; _i++) {
|
|
293
|
-
param = _a[_i];
|
|
294
|
-
localVarQueryParameter[param] = pageToken === null || pageToken === void 0 ? void 0 : pageToken[param];
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
if (pageSize !== undefined) {
|
|
298
|
-
for (_b = 0, _c = Object.keys(pageSize); _b < _c.length; _b++) {
|
|
299
|
-
param = _c[_b];
|
|
300
|
-
localVarQueryParameter[param] = pageSize === null || pageSize === void 0 ? void 0 : pageSize[param];
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
if (start !== undefined) {
|
|
304
|
-
for (_d = 0, _e = Object.keys(start); _d < _e.length; _d++) {
|
|
305
|
-
param = _e[_d];
|
|
306
|
-
localVarQueryParameter[param] = start === null || start === void 0 ? void 0 : start[param];
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
if (end !== undefined) {
|
|
310
|
-
for (_f = 0, _g = Object.keys(end); _f < _g.length; _f++) {
|
|
311
|
-
param = _g[_f];
|
|
312
|
-
localVarQueryParameter[param] = end === null || end === void 0 ? void 0 : end[param];
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
if (search !== undefined) {
|
|
316
|
-
for (_h = 0, _j = Object.keys(search); _h < _j.length; _h++) {
|
|
317
|
-
param = _j[_h];
|
|
318
|
-
localVarQueryParameter[param] = search === null || search === void 0 ? void 0 : search[param];
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
322
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
323
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
324
|
-
return [2 /*return*/, {
|
|
325
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
326
|
-
options: localVarRequestOptions,
|
|
327
|
-
}];
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
});
|
|
331
|
-
},
|
|
332
|
-
};
|
|
333
|
-
};
|
|
334
|
-
exports.OrdersApiAxiosParamCreator = OrdersApiAxiosParamCreator;
|
|
335
|
-
/**
|
|
336
|
-
* OrdersApi - functional programming interface
|
|
337
|
-
* @export
|
|
338
|
-
*/
|
|
339
|
-
var OrdersApiFp = function (configuration) {
|
|
340
|
-
var localVarAxiosParamCreator = (0, exports.OrdersApiAxiosParamCreator)(configuration);
|
|
341
|
-
return {
|
|
342
|
-
/**
|
|
343
|
-
* Confirms and order, and submits it as ready to take payment and begin processing.
|
|
344
|
-
* @summary Confirm order
|
|
345
|
-
* @param {any} project What project it is
|
|
346
|
-
* @param {string} orderId Unique identifier of an order
|
|
347
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
|
|
348
|
-
* @param {*} [options] Override http request option.
|
|
349
|
-
* @throws {RequiredError}
|
|
350
|
-
*/
|
|
351
|
-
confirmOrder: function (project, orderId, confirmOrderRequest, options) {
|
|
352
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
353
|
-
var localVarAxiosArgs;
|
|
354
|
-
return __generator(this, function (_a) {
|
|
355
|
-
switch (_a.label) {
|
|
356
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.confirmOrder(project, orderId, confirmOrderRequest, options)];
|
|
357
|
-
case 1:
|
|
358
|
-
localVarAxiosArgs = _a.sent();
|
|
359
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
});
|
|
363
|
-
},
|
|
364
|
-
/**
|
|
365
|
-
* Creates a new order for the provided variants.
|
|
366
|
-
* @summary Create order
|
|
367
|
-
* @param {any} project What project it is
|
|
368
|
-
* @param {Order} order Order schema
|
|
369
|
-
* @param {*} [options] Override http request option.
|
|
370
|
-
* @throws {RequiredError}
|
|
371
|
-
*/
|
|
372
|
-
createOrder: function (project, order, options) {
|
|
373
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
374
|
-
var localVarAxiosArgs;
|
|
375
|
-
return __generator(this, function (_a) {
|
|
376
|
-
switch (_a.label) {
|
|
377
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createOrder(project, order, options)];
|
|
378
|
-
case 1:
|
|
379
|
-
localVarAxiosArgs = _a.sent();
|
|
380
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
},
|
|
385
|
-
/**
|
|
386
|
-
* Get an order
|
|
387
|
-
* @summary Get order
|
|
388
|
-
* @param {any} project What project it is
|
|
389
|
-
* @param {string} orderId Unique identifier of an order
|
|
390
|
-
* @param {*} [options] Override http request option.
|
|
391
|
-
* @throws {RequiredError}
|
|
392
|
-
*/
|
|
393
|
-
getOrder: function (project, orderId, options) {
|
|
394
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
395
|
-
var localVarAxiosArgs;
|
|
396
|
-
return __generator(this, function (_a) {
|
|
397
|
-
switch (_a.label) {
|
|
398
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getOrder(project, orderId, options)];
|
|
399
|
-
case 1:
|
|
400
|
-
localVarAxiosArgs = _a.sent();
|
|
401
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
});
|
|
405
|
-
},
|
|
406
|
-
/**
|
|
407
|
-
* Lists all orders available paginated into chunks
|
|
408
|
-
* @summary List orders
|
|
409
|
-
* @param {any} [pageToken] Page reference token
|
|
410
|
-
* @param {any} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
411
|
-
* @param {any} [start] Start of date range to filter by when orders were placed
|
|
412
|
-
* @param {any} [end] End of date range to filter by when orders were placed
|
|
413
|
-
* @param {any} [search] Search term to filter based on order reference, customer name and email
|
|
414
|
-
* @param {*} [options] Override http request option.
|
|
415
|
-
* @throws {RequiredError}
|
|
416
|
-
*/
|
|
417
|
-
getOrders: function (pageToken, pageSize, start, end, search, options) {
|
|
418
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
419
|
-
var localVarAxiosArgs;
|
|
420
|
-
return __generator(this, function (_a) {
|
|
421
|
-
switch (_a.label) {
|
|
422
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getOrders(pageToken, pageSize, start, end, search, options)];
|
|
423
|
-
case 1:
|
|
424
|
-
localVarAxiosArgs = _a.sent();
|
|
425
|
-
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
});
|
|
429
|
-
},
|
|
430
|
-
};
|
|
431
|
-
};
|
|
432
|
-
exports.OrdersApiFp = OrdersApiFp;
|
|
433
|
-
/**
|
|
434
|
-
* OrdersApi - factory interface
|
|
435
|
-
* @export
|
|
436
|
-
*/
|
|
437
|
-
var OrdersApiFactory = function (configuration, basePath, axios) {
|
|
438
|
-
var localVarFp = (0, exports.OrdersApiFp)(configuration);
|
|
439
|
-
return {
|
|
440
|
-
/**
|
|
441
|
-
* Confirms and order, and submits it as ready to take payment and begin processing.
|
|
442
|
-
* @summary Confirm order
|
|
443
|
-
* @param {any} project What project it is
|
|
444
|
-
* @param {string} orderId Unique identifier of an order
|
|
445
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
|
|
446
|
-
* @param {*} [options] Override http request option.
|
|
447
|
-
* @throws {RequiredError}
|
|
448
|
-
*/
|
|
449
|
-
confirmOrder: function (project, orderId, confirmOrderRequest, options) {
|
|
450
|
-
return localVarFp.confirmOrder(project, orderId, confirmOrderRequest, options).then(function (request) { return request(axios, basePath); });
|
|
451
|
-
},
|
|
452
|
-
/**
|
|
453
|
-
* Creates a new order for the provided variants.
|
|
454
|
-
* @summary Create order
|
|
455
|
-
* @param {any} project What project it is
|
|
456
|
-
* @param {Order} order Order schema
|
|
457
|
-
* @param {*} [options] Override http request option.
|
|
458
|
-
* @throws {RequiredError}
|
|
459
|
-
*/
|
|
460
|
-
createOrder: function (project, order, options) {
|
|
461
|
-
return localVarFp.createOrder(project, order, options).then(function (request) { return request(axios, basePath); });
|
|
462
|
-
},
|
|
463
|
-
/**
|
|
464
|
-
* Get an order
|
|
465
|
-
* @summary Get order
|
|
466
|
-
* @param {any} project What project it is
|
|
467
|
-
* @param {string} orderId Unique identifier of an order
|
|
468
|
-
* @param {*} [options] Override http request option.
|
|
469
|
-
* @throws {RequiredError}
|
|
470
|
-
*/
|
|
471
|
-
getOrder: function (project, orderId, options) {
|
|
472
|
-
return localVarFp.getOrder(project, orderId, options).then(function (request) { return request(axios, basePath); });
|
|
473
|
-
},
|
|
474
|
-
/**
|
|
475
|
-
* Lists all orders available paginated into chunks
|
|
476
|
-
* @summary List orders
|
|
477
|
-
* @param {any} [pageToken] Page reference token
|
|
478
|
-
* @param {any} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
479
|
-
* @param {any} [start] Start of date range to filter by when orders were placed
|
|
480
|
-
* @param {any} [end] End of date range to filter by when orders were placed
|
|
481
|
-
* @param {any} [search] Search term to filter based on order reference, customer name and email
|
|
482
|
-
* @param {*} [options] Override http request option.
|
|
483
|
-
* @throws {RequiredError}
|
|
484
|
-
*/
|
|
485
|
-
getOrders: function (pageToken, pageSize, start, end, search, options) {
|
|
486
|
-
return localVarFp.getOrders(pageToken, pageSize, start, end, search, options).then(function (request) { return request(axios, basePath); });
|
|
487
|
-
},
|
|
488
|
-
};
|
|
489
|
-
};
|
|
490
|
-
exports.OrdersApiFactory = OrdersApiFactory;
|
|
491
|
-
/**
|
|
492
|
-
* OrdersApi - object-oriented interface
|
|
493
|
-
* @export
|
|
494
|
-
* @class OrdersApi
|
|
495
|
-
* @extends {BaseAPI}
|
|
496
|
-
*/
|
|
497
|
-
var OrdersApi = /** @class */ (function (_super) {
|
|
498
|
-
__extends(OrdersApi, _super);
|
|
499
|
-
function OrdersApi() {
|
|
500
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Confirms and order, and submits it as ready to take payment and begin processing.
|
|
504
|
-
* @summary Confirm order
|
|
505
|
-
* @param {any} project What project it is
|
|
506
|
-
* @param {string} orderId Unique identifier of an order
|
|
507
|
-
* @param {ConfirmOrderRequest} confirmOrderRequest ConfirmFulfillment schema
|
|
508
|
-
* @param {*} [options] Override http request option.
|
|
509
|
-
* @throws {RequiredError}
|
|
510
|
-
* @memberof OrdersApi
|
|
511
|
-
*/
|
|
512
|
-
OrdersApi.prototype.confirmOrder = function (project, orderId, confirmOrderRequest, options) {
|
|
513
|
-
var _this = this;
|
|
514
|
-
return (0, exports.OrdersApiFp)(this.configuration).confirmOrder(project, orderId, confirmOrderRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
515
|
-
};
|
|
516
|
-
/**
|
|
517
|
-
* Creates a new order for the provided variants.
|
|
518
|
-
* @summary Create order
|
|
519
|
-
* @param {any} project What project it is
|
|
520
|
-
* @param {Order} order Order schema
|
|
521
|
-
* @param {*} [options] Override http request option.
|
|
522
|
-
* @throws {RequiredError}
|
|
523
|
-
* @memberof OrdersApi
|
|
524
|
-
*/
|
|
525
|
-
OrdersApi.prototype.createOrder = function (project, order, options) {
|
|
526
|
-
var _this = this;
|
|
527
|
-
return (0, exports.OrdersApiFp)(this.configuration).createOrder(project, order, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
528
|
-
};
|
|
529
|
-
/**
|
|
530
|
-
* Get an order
|
|
531
|
-
* @summary Get order
|
|
532
|
-
* @param {any} project What project it is
|
|
533
|
-
* @param {string} orderId Unique identifier of an order
|
|
534
|
-
* @param {*} [options] Override http request option.
|
|
535
|
-
* @throws {RequiredError}
|
|
536
|
-
* @memberof OrdersApi
|
|
537
|
-
*/
|
|
538
|
-
OrdersApi.prototype.getOrder = function (project, orderId, options) {
|
|
539
|
-
var _this = this;
|
|
540
|
-
return (0, exports.OrdersApiFp)(this.configuration).getOrder(project, orderId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
541
|
-
};
|
|
542
|
-
/**
|
|
543
|
-
* Lists all orders available paginated into chunks
|
|
544
|
-
* @summary List orders
|
|
545
|
-
* @param {any} [pageToken] Page reference token
|
|
546
|
-
* @param {any} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
|
|
547
|
-
* @param {any} [start] Start of date range to filter by when orders were placed
|
|
548
|
-
* @param {any} [end] End of date range to filter by when orders were placed
|
|
549
|
-
* @param {any} [search] Search term to filter based on order reference, customer name and email
|
|
550
|
-
* @param {*} [options] Override http request option.
|
|
551
|
-
* @throws {RequiredError}
|
|
552
|
-
* @memberof OrdersApi
|
|
553
|
-
*/
|
|
554
|
-
OrdersApi.prototype.getOrders = function (pageToken, pageSize, start, end, search, options) {
|
|
555
|
-
var _this = this;
|
|
556
|
-
return (0, exports.OrdersApiFp)(this.configuration).getOrders(pageToken, pageSize, start, end, search, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
557
|
-
};
|
|
558
|
-
return OrdersApi;
|
|
559
|
-
}(base_1.BaseAPI));
|
|
560
|
-
exports.OrdersApi = OrdersApi;
|
package/dist/base.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Orders API
|
|
3
|
-
* Manage Teemill Orders For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.3.1
|
|
6
|
-
* Contact: hello@teemill.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import type { Configuration } from './configuration';
|
|
13
|
-
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
|
-
export declare const BASE_PATH: string;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @export
|
|
18
|
-
*/
|
|
19
|
-
export declare const COLLECTION_FORMATS: {
|
|
20
|
-
csv: string;
|
|
21
|
-
ssv: string;
|
|
22
|
-
tsv: string;
|
|
23
|
-
pipes: string;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
*
|
|
27
|
-
* @export
|
|
28
|
-
* @interface RequestArgs
|
|
29
|
-
*/
|
|
30
|
-
export interface RequestArgs {
|
|
31
|
-
url: string;
|
|
32
|
-
options: AxiosRequestConfig;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @export
|
|
37
|
-
* @class BaseAPI
|
|
38
|
-
*/
|
|
39
|
-
export declare class BaseAPI {
|
|
40
|
-
protected basePath: string;
|
|
41
|
-
protected axios: AxiosInstance;
|
|
42
|
-
protected configuration: Configuration | undefined;
|
|
43
|
-
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @export
|
|
48
|
-
* @class RequiredError
|
|
49
|
-
* @extends {Error}
|
|
50
|
-
*/
|
|
51
|
-
export declare class RequiredError extends Error {
|
|
52
|
-
field: string;
|
|
53
|
-
constructor(field: string, msg?: string);
|
|
54
|
-
}
|