@teemill/platform 0.12.3 → 0.14.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/README.md +2 -2
- package/api.ts +400 -11
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +2 -2
- package/dist/api.d.ts +229 -5
- package/dist/api.js +282 -12
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +2 -2
- package/dist/esm/api.d.ts +229 -5
- package/dist/esm/api.js +277 -11
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Platform API
|
|
5
5
|
* Manage Your podOS platform
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
7
|
+
* The version of the OpenAPI document: 0.14.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -56,6 +56,9 @@ export const OutputFileFormatEnum = {
|
|
|
56
56
|
Webp: 'webp',
|
|
57
57
|
Pdf: 'pdf'
|
|
58
58
|
};
|
|
59
|
+
export const PaymentAccountMethodEnum = {
|
|
60
|
+
Stripe: 'stripe'
|
|
61
|
+
};
|
|
59
62
|
export const ProductAttributeValuesInnerThumbnailTypeEnum = {
|
|
60
63
|
Text: 'text',
|
|
61
64
|
Color: 'color',
|
|
@@ -78,13 +81,14 @@ export const CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
78
81
|
* @param {string} project Project unique identifier
|
|
79
82
|
* @param {string} platformId The platform identifier
|
|
80
83
|
* @param {number} [totalOrderCount] Filter customers by total order count equal to the value provided
|
|
84
|
+
* @param {number} [lifetimeValue] Filter customers by lifetime value less than or equal to the value provided
|
|
81
85
|
* @param {Array<ExportCustomersSortByEnum>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
82
86
|
* @param {string} [lastPurchasedStart] Start of date range to filter customers by last purchase date
|
|
83
87
|
* @param {string} [lastPurchasedEnd] End of date range to filter customers by last purchase date
|
|
84
88
|
* @param {*} [options] Override http request option.
|
|
85
89
|
* @throws {RequiredError}
|
|
86
90
|
*/
|
|
87
|
-
exportCustomers: (project_1, platformId_1, totalOrderCount_1, sortBy_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1) => __awaiter(this, [project_1, platformId_1, totalOrderCount_1, sortBy_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1], void 0, function* (project, platformId, totalOrderCount, sortBy, lastPurchasedStart, lastPurchasedEnd, options = {}) {
|
|
91
|
+
exportCustomers: (project_1, platformId_1, totalOrderCount_1, lifetimeValue_1, sortBy_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1) => __awaiter(this, [project_1, platformId_1, totalOrderCount_1, lifetimeValue_1, sortBy_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1], void 0, function* (project, platformId, totalOrderCount, lifetimeValue, sortBy, lastPurchasedStart, lastPurchasedEnd, options = {}) {
|
|
88
92
|
// verify required parameter 'project' is not null or undefined
|
|
89
93
|
assertParamExists('exportCustomers', 'project', project);
|
|
90
94
|
// verify required parameter 'platformId' is not null or undefined
|
|
@@ -111,6 +115,9 @@ export const CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
111
115
|
if (totalOrderCount !== undefined) {
|
|
112
116
|
localVarQueryParameter['totalOrderCount'] = totalOrderCount;
|
|
113
117
|
}
|
|
118
|
+
if (lifetimeValue !== undefined) {
|
|
119
|
+
localVarQueryParameter['lifetimeValue'] = lifetimeValue;
|
|
120
|
+
}
|
|
114
121
|
if (sortBy) {
|
|
115
122
|
localVarQueryParameter['sortBy'] = sortBy;
|
|
116
123
|
}
|
|
@@ -184,12 +191,13 @@ export const CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
184
191
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
185
192
|
* @param {Array<ListCustomersSortByEnum>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
186
193
|
* @param {number} [totalOrderCount] Filter customers by total order count equal to the value provided
|
|
194
|
+
* @param {number} [lifetimeValue] Filter customers by lifetime value less than or equal to the value provided
|
|
187
195
|
* @param {string} [lastPurchasedStart] Start of date range to filter customers by last purchase date
|
|
188
196
|
* @param {string} [lastPurchasedEnd] End of date range to filter customers by last purchase date
|
|
189
197
|
* @param {*} [options] Override http request option.
|
|
190
198
|
* @throws {RequiredError}
|
|
191
199
|
*/
|
|
192
|
-
listCustomers: (project_1, platformId_1, pageToken_1, pageSize_1, search_1, sortBy_1, totalOrderCount_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1) => __awaiter(this, [project_1, platformId_1, pageToken_1, pageSize_1, search_1, sortBy_1, totalOrderCount_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1], void 0, function* (project, platformId, pageToken, pageSize, search, sortBy, totalOrderCount, lastPurchasedStart, lastPurchasedEnd, options = {}) {
|
|
200
|
+
listCustomers: (project_1, platformId_1, pageToken_1, pageSize_1, search_1, sortBy_1, totalOrderCount_1, lifetimeValue_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1) => __awaiter(this, [project_1, platformId_1, pageToken_1, pageSize_1, search_1, sortBy_1, totalOrderCount_1, lifetimeValue_1, lastPurchasedStart_1, lastPurchasedEnd_1, ...args_1], void 0, function* (project, platformId, pageToken, pageSize, search, sortBy, totalOrderCount, lifetimeValue, lastPurchasedStart, lastPurchasedEnd, options = {}) {
|
|
193
201
|
// verify required parameter 'project' is not null or undefined
|
|
194
202
|
assertParamExists('listCustomers', 'project', project);
|
|
195
203
|
// verify required parameter 'platformId' is not null or undefined
|
|
@@ -228,6 +236,9 @@ export const CustomersApiAxiosParamCreator = function (configuration) {
|
|
|
228
236
|
if (totalOrderCount !== undefined) {
|
|
229
237
|
localVarQueryParameter['totalOrderCount'] = totalOrderCount;
|
|
230
238
|
}
|
|
239
|
+
if (lifetimeValue !== undefined) {
|
|
240
|
+
localVarQueryParameter['lifetimeValue'] = lifetimeValue;
|
|
241
|
+
}
|
|
231
242
|
if (lastPurchasedStart !== undefined) {
|
|
232
243
|
localVarQueryParameter['lastPurchasedStart'] = (lastPurchasedStart instanceof Date) ?
|
|
233
244
|
lastPurchasedStart.toISOString() :
|
|
@@ -259,16 +270,17 @@ export const CustomersApiFp = function (configuration) {
|
|
|
259
270
|
* @param {string} project Project unique identifier
|
|
260
271
|
* @param {string} platformId The platform identifier
|
|
261
272
|
* @param {number} [totalOrderCount] Filter customers by total order count equal to the value provided
|
|
273
|
+
* @param {number} [lifetimeValue] Filter customers by lifetime value less than or equal to the value provided
|
|
262
274
|
* @param {Array<ExportCustomersSortByEnum>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
263
275
|
* @param {string} [lastPurchasedStart] Start of date range to filter customers by last purchase date
|
|
264
276
|
* @param {string} [lastPurchasedEnd] End of date range to filter customers by last purchase date
|
|
265
277
|
* @param {*} [options] Override http request option.
|
|
266
278
|
* @throws {RequiredError}
|
|
267
279
|
*/
|
|
268
|
-
exportCustomers(project, platformId, totalOrderCount, sortBy, lastPurchasedStart, lastPurchasedEnd, options) {
|
|
280
|
+
exportCustomers(project, platformId, totalOrderCount, lifetimeValue, sortBy, lastPurchasedStart, lastPurchasedEnd, options) {
|
|
269
281
|
return __awaiter(this, void 0, void 0, function* () {
|
|
270
282
|
var _a, _b, _c;
|
|
271
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportCustomers(project, platformId, totalOrderCount, sortBy, lastPurchasedStart, lastPurchasedEnd, options);
|
|
283
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.exportCustomers(project, platformId, totalOrderCount, lifetimeValue, sortBy, lastPurchasedStart, lastPurchasedEnd, options);
|
|
272
284
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
273
285
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CustomersApi.exportCustomers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
274
286
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -302,15 +314,16 @@ export const CustomersApiFp = function (configuration) {
|
|
|
302
314
|
* @param {string} [search] Search term to filter based on order reference, customer name and email
|
|
303
315
|
* @param {Array<ListCustomersSortByEnum>} [sortBy] An array of fields to sort by, prefixed with a \'-\' for descending order or \'+\' for ascending. Default is ascending.
|
|
304
316
|
* @param {number} [totalOrderCount] Filter customers by total order count equal to the value provided
|
|
317
|
+
* @param {number} [lifetimeValue] Filter customers by lifetime value less than or equal to the value provided
|
|
305
318
|
* @param {string} [lastPurchasedStart] Start of date range to filter customers by last purchase date
|
|
306
319
|
* @param {string} [lastPurchasedEnd] End of date range to filter customers by last purchase date
|
|
307
320
|
* @param {*} [options] Override http request option.
|
|
308
321
|
* @throws {RequiredError}
|
|
309
322
|
*/
|
|
310
|
-
listCustomers(project, platformId, pageToken, pageSize, search, sortBy, totalOrderCount, lastPurchasedStart, lastPurchasedEnd, options) {
|
|
323
|
+
listCustomers(project, platformId, pageToken, pageSize, search, sortBy, totalOrderCount, lifetimeValue, lastPurchasedStart, lastPurchasedEnd, options) {
|
|
311
324
|
return __awaiter(this, void 0, void 0, function* () {
|
|
312
325
|
var _a, _b, _c;
|
|
313
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listCustomers(project, platformId, pageToken, pageSize, search, sortBy, totalOrderCount, lastPurchasedStart, lastPurchasedEnd, options);
|
|
326
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listCustomers(project, platformId, pageToken, pageSize, search, sortBy, totalOrderCount, lifetimeValue, lastPurchasedStart, lastPurchasedEnd, options);
|
|
314
327
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
315
328
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CustomersApi.listCustomers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
316
329
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -333,7 +346,7 @@ export const CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
333
346
|
* @throws {RequiredError}
|
|
334
347
|
*/
|
|
335
348
|
exportCustomers(requestParameters, options) {
|
|
336
|
-
return localVarFp.exportCustomers(requestParameters.project, requestParameters.platformId, requestParameters.totalOrderCount, requestParameters.sortBy, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(axios, basePath));
|
|
349
|
+
return localVarFp.exportCustomers(requestParameters.project, requestParameters.platformId, requestParameters.totalOrderCount, requestParameters.lifetimeValue, requestParameters.sortBy, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(axios, basePath));
|
|
337
350
|
},
|
|
338
351
|
/**
|
|
339
352
|
* Get a customer for a platform by a given customer ID.
|
|
@@ -353,7 +366,7 @@ export const CustomersApiFactory = function (configuration, basePath, axios) {
|
|
|
353
366
|
* @throws {RequiredError}
|
|
354
367
|
*/
|
|
355
368
|
listCustomers(requestParameters, options) {
|
|
356
|
-
return localVarFp.listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.totalOrderCount, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(axios, basePath));
|
|
369
|
+
return localVarFp.listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.totalOrderCount, requestParameters.lifetimeValue, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(axios, basePath));
|
|
357
370
|
},
|
|
358
371
|
};
|
|
359
372
|
};
|
|
@@ -373,7 +386,7 @@ export class CustomersApi extends BaseAPI {
|
|
|
373
386
|
* @memberof CustomersApi
|
|
374
387
|
*/
|
|
375
388
|
exportCustomers(requestParameters, options) {
|
|
376
|
-
return CustomersApiFp(this.configuration).exportCustomers(requestParameters.project, requestParameters.platformId, requestParameters.totalOrderCount, requestParameters.sortBy, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(this.axios, this.basePath));
|
|
389
|
+
return CustomersApiFp(this.configuration).exportCustomers(requestParameters.project, requestParameters.platformId, requestParameters.totalOrderCount, requestParameters.lifetimeValue, requestParameters.sortBy, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(this.axios, this.basePath));
|
|
377
390
|
}
|
|
378
391
|
/**
|
|
379
392
|
* Get a customer for a platform by a given customer ID.
|
|
@@ -395,7 +408,7 @@ export class CustomersApi extends BaseAPI {
|
|
|
395
408
|
* @memberof CustomersApi
|
|
396
409
|
*/
|
|
397
410
|
listCustomers(requestParameters, options) {
|
|
398
|
-
return CustomersApiFp(this.configuration).listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.totalOrderCount, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(this.axios, this.basePath));
|
|
411
|
+
return CustomersApiFp(this.configuration).listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.sortBy, requestParameters.totalOrderCount, requestParameters.lifetimeValue, requestParameters.lastPurchasedStart, requestParameters.lastPurchasedEnd, options).then((request) => request(this.axios, this.basePath));
|
|
399
412
|
}
|
|
400
413
|
}
|
|
401
414
|
/**
|
|
@@ -998,6 +1011,259 @@ export class OrdersApi extends BaseAPI {
|
|
|
998
1011
|
return OrdersApiFp(this.configuration).updateFulfillment(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, requestParameters.updateFulfillmentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
999
1012
|
}
|
|
1000
1013
|
}
|
|
1014
|
+
/**
|
|
1015
|
+
* PaymentApi - axios parameter creator
|
|
1016
|
+
* @export
|
|
1017
|
+
*/
|
|
1018
|
+
export const PaymentApiAxiosParamCreator = function (configuration) {
|
|
1019
|
+
return {
|
|
1020
|
+
/**
|
|
1021
|
+
* Authorize a Stripe payment account
|
|
1022
|
+
* @summary Authorize Stripe
|
|
1023
|
+
* @param {string} project Project unique identifier
|
|
1024
|
+
* @param {*} [options] Override http request option.
|
|
1025
|
+
* @throws {RequiredError}
|
|
1026
|
+
*/
|
|
1027
|
+
authorizeStripe: (project_1, ...args_1) => __awaiter(this, [project_1, ...args_1], void 0, function* (project, options = {}) {
|
|
1028
|
+
// verify required parameter 'project' is not null or undefined
|
|
1029
|
+
assertParamExists('authorizeStripe', 'project', project);
|
|
1030
|
+
const localVarPath = `/v1/platform/payment/stripe/authorize`;
|
|
1031
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1032
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1033
|
+
let baseOptions;
|
|
1034
|
+
if (configuration) {
|
|
1035
|
+
baseOptions = configuration.baseOptions;
|
|
1036
|
+
}
|
|
1037
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1038
|
+
const localVarHeaderParameter = {};
|
|
1039
|
+
const localVarQueryParameter = {};
|
|
1040
|
+
// authentication session-oauth required
|
|
1041
|
+
// oauth required
|
|
1042
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
1043
|
+
// authentication api-key required
|
|
1044
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
1045
|
+
if (project !== undefined) {
|
|
1046
|
+
localVarQueryParameter['project'] = project;
|
|
1047
|
+
}
|
|
1048
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1049
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1050
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1051
|
+
return {
|
|
1052
|
+
url: toPathString(localVarUrlObj),
|
|
1053
|
+
options: localVarRequestOptions,
|
|
1054
|
+
};
|
|
1055
|
+
}),
|
|
1056
|
+
/**
|
|
1057
|
+
* Deauthorize a Stripe payment account
|
|
1058
|
+
* @summary Deauthorize Stripe
|
|
1059
|
+
* @param {string} project Project unique identifier
|
|
1060
|
+
* @param {*} [options] Override http request option.
|
|
1061
|
+
* @throws {RequiredError}
|
|
1062
|
+
*/
|
|
1063
|
+
deauthorizeStripe: (project_1, ...args_1) => __awaiter(this, [project_1, ...args_1], void 0, function* (project, options = {}) {
|
|
1064
|
+
// verify required parameter 'project' is not null or undefined
|
|
1065
|
+
assertParamExists('deauthorizeStripe', 'project', project);
|
|
1066
|
+
const localVarPath = `/v1/platform/payment/stripe/deauthorize`;
|
|
1067
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1068
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1069
|
+
let baseOptions;
|
|
1070
|
+
if (configuration) {
|
|
1071
|
+
baseOptions = configuration.baseOptions;
|
|
1072
|
+
}
|
|
1073
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
1074
|
+
const localVarHeaderParameter = {};
|
|
1075
|
+
const localVarQueryParameter = {};
|
|
1076
|
+
// authentication session-oauth required
|
|
1077
|
+
// oauth required
|
|
1078
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
1079
|
+
// authentication api-key required
|
|
1080
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
1081
|
+
if (project !== undefined) {
|
|
1082
|
+
localVarQueryParameter['project'] = project;
|
|
1083
|
+
}
|
|
1084
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1085
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1086
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1087
|
+
return {
|
|
1088
|
+
url: toPathString(localVarUrlObj),
|
|
1089
|
+
options: localVarRequestOptions,
|
|
1090
|
+
};
|
|
1091
|
+
}),
|
|
1092
|
+
/**
|
|
1093
|
+
* Get the Stripe payment account for the project
|
|
1094
|
+
* @summary Get Stripe Payment Account
|
|
1095
|
+
* @param {string} project Project unique identifier
|
|
1096
|
+
* @param {*} [options] Override http request option.
|
|
1097
|
+
* @throws {RequiredError}
|
|
1098
|
+
*/
|
|
1099
|
+
getStripePaymentAccount: (project_1, ...args_1) => __awaiter(this, [project_1, ...args_1], void 0, function* (project, options = {}) {
|
|
1100
|
+
// verify required parameter 'project' is not null or undefined
|
|
1101
|
+
assertParamExists('getStripePaymentAccount', 'project', project);
|
|
1102
|
+
const localVarPath = `/v1/platform/payment/stripe`;
|
|
1103
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1104
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1105
|
+
let baseOptions;
|
|
1106
|
+
if (configuration) {
|
|
1107
|
+
baseOptions = configuration.baseOptions;
|
|
1108
|
+
}
|
|
1109
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1110
|
+
const localVarHeaderParameter = {};
|
|
1111
|
+
const localVarQueryParameter = {};
|
|
1112
|
+
// authentication session-oauth required
|
|
1113
|
+
// oauth required
|
|
1114
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
1115
|
+
// authentication api-key required
|
|
1116
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
1117
|
+
if (project !== undefined) {
|
|
1118
|
+
localVarQueryParameter['project'] = project;
|
|
1119
|
+
}
|
|
1120
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1121
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1122
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1123
|
+
return {
|
|
1124
|
+
url: toPathString(localVarUrlObj),
|
|
1125
|
+
options: localVarRequestOptions,
|
|
1126
|
+
};
|
|
1127
|
+
}),
|
|
1128
|
+
};
|
|
1129
|
+
};
|
|
1130
|
+
/**
|
|
1131
|
+
* PaymentApi - functional programming interface
|
|
1132
|
+
* @export
|
|
1133
|
+
*/
|
|
1134
|
+
export const PaymentApiFp = function (configuration) {
|
|
1135
|
+
const localVarAxiosParamCreator = PaymentApiAxiosParamCreator(configuration);
|
|
1136
|
+
return {
|
|
1137
|
+
/**
|
|
1138
|
+
* Authorize a Stripe payment account
|
|
1139
|
+
* @summary Authorize Stripe
|
|
1140
|
+
* @param {string} project Project unique identifier
|
|
1141
|
+
* @param {*} [options] Override http request option.
|
|
1142
|
+
* @throws {RequiredError}
|
|
1143
|
+
*/
|
|
1144
|
+
authorizeStripe(project, options) {
|
|
1145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1146
|
+
var _a, _b, _c;
|
|
1147
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authorizeStripe(project, options);
|
|
1148
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1149
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentApi.authorizeStripe']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1150
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1151
|
+
});
|
|
1152
|
+
},
|
|
1153
|
+
/**
|
|
1154
|
+
* Deauthorize a Stripe payment account
|
|
1155
|
+
* @summary Deauthorize Stripe
|
|
1156
|
+
* @param {string} project Project unique identifier
|
|
1157
|
+
* @param {*} [options] Override http request option.
|
|
1158
|
+
* @throws {RequiredError}
|
|
1159
|
+
*/
|
|
1160
|
+
deauthorizeStripe(project, options) {
|
|
1161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1162
|
+
var _a, _b, _c;
|
|
1163
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deauthorizeStripe(project, options);
|
|
1164
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1165
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentApi.deauthorizeStripe']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1166
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1167
|
+
});
|
|
1168
|
+
},
|
|
1169
|
+
/**
|
|
1170
|
+
* Get the Stripe payment account for the project
|
|
1171
|
+
* @summary Get Stripe Payment Account
|
|
1172
|
+
* @param {string} project Project unique identifier
|
|
1173
|
+
* @param {*} [options] Override http request option.
|
|
1174
|
+
* @throws {RequiredError}
|
|
1175
|
+
*/
|
|
1176
|
+
getStripePaymentAccount(project, options) {
|
|
1177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1178
|
+
var _a, _b, _c;
|
|
1179
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getStripePaymentAccount(project, options);
|
|
1180
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1181
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PaymentApi.getStripePaymentAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1182
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1183
|
+
});
|
|
1184
|
+
},
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
/**
|
|
1188
|
+
* PaymentApi - factory interface
|
|
1189
|
+
* @export
|
|
1190
|
+
*/
|
|
1191
|
+
export const PaymentApiFactory = function (configuration, basePath, axios) {
|
|
1192
|
+
const localVarFp = PaymentApiFp(configuration);
|
|
1193
|
+
return {
|
|
1194
|
+
/**
|
|
1195
|
+
* Authorize a Stripe payment account
|
|
1196
|
+
* @summary Authorize Stripe
|
|
1197
|
+
* @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
|
|
1198
|
+
* @param {*} [options] Override http request option.
|
|
1199
|
+
* @throws {RequiredError}
|
|
1200
|
+
*/
|
|
1201
|
+
authorizeStripe(requestParameters, options) {
|
|
1202
|
+
return localVarFp.authorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
1203
|
+
},
|
|
1204
|
+
/**
|
|
1205
|
+
* Deauthorize a Stripe payment account
|
|
1206
|
+
* @summary Deauthorize Stripe
|
|
1207
|
+
* @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
|
|
1208
|
+
* @param {*} [options] Override http request option.
|
|
1209
|
+
* @throws {RequiredError}
|
|
1210
|
+
*/
|
|
1211
|
+
deauthorizeStripe(requestParameters, options) {
|
|
1212
|
+
return localVarFp.deauthorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
1213
|
+
},
|
|
1214
|
+
/**
|
|
1215
|
+
* Get the Stripe payment account for the project
|
|
1216
|
+
* @summary Get Stripe Payment Account
|
|
1217
|
+
* @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
|
|
1218
|
+
* @param {*} [options] Override http request option.
|
|
1219
|
+
* @throws {RequiredError}
|
|
1220
|
+
*/
|
|
1221
|
+
getStripePaymentAccount(requestParameters, options) {
|
|
1222
|
+
return localVarFp.getStripePaymentAccount(requestParameters.project, options).then((request) => request(axios, basePath));
|
|
1223
|
+
},
|
|
1224
|
+
};
|
|
1225
|
+
};
|
|
1226
|
+
/**
|
|
1227
|
+
* PaymentApi - object-oriented interface
|
|
1228
|
+
* @export
|
|
1229
|
+
* @class PaymentApi
|
|
1230
|
+
* @extends {BaseAPI}
|
|
1231
|
+
*/
|
|
1232
|
+
export class PaymentApi extends BaseAPI {
|
|
1233
|
+
/**
|
|
1234
|
+
* Authorize a Stripe payment account
|
|
1235
|
+
* @summary Authorize Stripe
|
|
1236
|
+
* @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
|
|
1237
|
+
* @param {*} [options] Override http request option.
|
|
1238
|
+
* @throws {RequiredError}
|
|
1239
|
+
* @memberof PaymentApi
|
|
1240
|
+
*/
|
|
1241
|
+
authorizeStripe(requestParameters, options) {
|
|
1242
|
+
return PaymentApiFp(this.configuration).authorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
1243
|
+
}
|
|
1244
|
+
/**
|
|
1245
|
+
* Deauthorize a Stripe payment account
|
|
1246
|
+
* @summary Deauthorize Stripe
|
|
1247
|
+
* @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
|
|
1248
|
+
* @param {*} [options] Override http request option.
|
|
1249
|
+
* @throws {RequiredError}
|
|
1250
|
+
* @memberof PaymentApi
|
|
1251
|
+
*/
|
|
1252
|
+
deauthorizeStripe(requestParameters, options) {
|
|
1253
|
+
return PaymentApiFp(this.configuration).deauthorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Get the Stripe payment account for the project
|
|
1257
|
+
* @summary Get Stripe Payment Account
|
|
1258
|
+
* @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
|
|
1259
|
+
* @param {*} [options] Override http request option.
|
|
1260
|
+
* @throws {RequiredError}
|
|
1261
|
+
* @memberof PaymentApi
|
|
1262
|
+
*/
|
|
1263
|
+
getStripePaymentAccount(requestParameters, options) {
|
|
1264
|
+
return PaymentApiFp(this.configuration).getStripePaymentAccount(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1001
1267
|
/**
|
|
1002
1268
|
* PlatformApi - axios parameter creator
|
|
1003
1269
|
* @export
|
package/dist/esm/base.d.ts
CHANGED
package/dist/esm/base.js
CHANGED
package/dist/esm/common.d.ts
CHANGED
package/dist/esm/common.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Platform API
|
|
5
5
|
* Manage Your podOS platform
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
7
|
+
* The version of the OpenAPI document: 0.14.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -20,7 +20,7 @@ export class Configuration {
|
|
|
20
20
|
this.accessToken = param.accessToken;
|
|
21
21
|
this.basePath = param.basePath;
|
|
22
22
|
this.serverIndex = param.serverIndex;
|
|
23
|
-
this.baseOptions = Object.assign({ headers: Object.assign(Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers), { 'User-Agent': "OpenAPI-Generator/0.
|
|
23
|
+
this.baseOptions = Object.assign({ headers: Object.assign(Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers), { 'User-Agent': "OpenAPI-Generator/0.14.0/typescript-axios" }) }, param.baseOptions);
|
|
24
24
|
this.formDataCtor = param.formDataCtor;
|
|
25
25
|
}
|
|
26
26
|
/**
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/index.ts
CHANGED