flexinet-api 0.0.319-prerelease0 → 0.0.321-prerelease0
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 +301 -80
- package/dist/api.d.ts +259 -58
- package/dist/api.js +117 -68
- package/dist/esm/api.d.ts +259 -58
- package/dist/esm/api.js +106 -62
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -22,8 +22,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
25
|
+
exports.ConfigurationApi = exports.ConfigurationApiFactory = exports.ConfigurationApiFp = exports.ConfigurationApiAxiosParamCreator = exports.ClientApi = exports.ClientApiFactory = exports.ClientApiFp = exports.ClientApiAxiosParamCreator = exports.CategoryApi = exports.CategoryApiFactory = exports.CategoryApiFp = exports.CategoryApiAxiosParamCreator = exports.BalanceApi = exports.BalanceApiFactory = exports.BalanceApiFp = exports.BalanceApiAxiosParamCreator = exports.AuditApi = exports.AuditApiFactory = exports.AuditApiFp = exports.AuditApiAxiosParamCreator = exports.WebhookKind = exports.UserSource = exports.UserRole = exports.TransactionKind = exports.TransactionEventKind = exports.TargetMu = exports.TagValidatorType = exports.TagRuleKind = exports.TagDataType = exports.RuleKind = exports.RuleGroupState = exports.Repetition = exports.PromotionType = exports.ProgressState = exports.ProductUsage = exports.ProductStatus = exports.ProductRequestStatus = exports.ProductRequestApprovalRequestStatusEnum = exports.ProductKind = exports.ProductAvailability = exports.OrderKindEnum = exports.NotificationStatus = exports.NotificationKind = exports.EventCreationRequestKindEnum = exports.CustomDealRestrictionPriority = exports.Condition = exports.BonusMu = exports.BeneficiaryKind = exports.AuditLogObjectType = exports.AuditLogActionEnum = void 0;
|
|
26
|
+
exports.UserApiAxiosParamCreator = exports.TransactionApi = exports.TransactionApiFactory = exports.TransactionApiFp = exports.TransactionApiAxiosParamCreator = exports.TagApi = exports.TagApiFactory = exports.TagApiFp = exports.TagApiAxiosParamCreator = exports.SegmentApi = exports.SegmentApiFactory = exports.SegmentApiFp = exports.SegmentApiAxiosParamCreator = exports.RewardApi = exports.RewardApiFactory = exports.RewardApiFp = exports.RewardApiAxiosParamCreator = exports.PromotionApi = exports.PromotionApiFactory = exports.PromotionApiFp = exports.PromotionApiAxiosParamCreator = exports.ListProgressIntervalEnum = exports.ProgressApi = exports.ProgressApiFactory = exports.ProgressApiFp = exports.ProgressApiAxiosParamCreator = exports.ProductApi = exports.ProductApiFactory = exports.ProductApiFp = exports.ProductApiAxiosParamCreator = exports.OrderApi = exports.OrderApiFactory = exports.OrderApiFp = exports.OrderApiAxiosParamCreator = exports.NotificationApi = exports.NotificationApiFactory = exports.NotificationApiFp = exports.NotificationApiAxiosParamCreator = exports.IntegrationApi = exports.IntegrationApiFactory = exports.IntegrationApiFp = exports.IntegrationApiAxiosParamCreator = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.CustomDealsApi = exports.CustomDealsApiFactory = exports.CustomDealsApiFp = exports.CustomDealsApiAxiosParamCreator = void 0;
|
|
27
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = void 0;
|
|
27
28
|
const axios_1 = require("axios");
|
|
28
29
|
// Some imports not used depending on template conditions
|
|
29
30
|
// @ts-ignore
|
|
@@ -242,6 +243,15 @@ exports.TargetMu = {
|
|
|
242
243
|
Product: 'product',
|
|
243
244
|
Liter: 'liter'
|
|
244
245
|
};
|
|
246
|
+
/**
|
|
247
|
+
*
|
|
248
|
+
* @export
|
|
249
|
+
* @enum {string}
|
|
250
|
+
*/
|
|
251
|
+
exports.TransactionEventKind = {
|
|
252
|
+
Pending: 'pending',
|
|
253
|
+
Completed: 'completed'
|
|
254
|
+
};
|
|
245
255
|
/**
|
|
246
256
|
*
|
|
247
257
|
* @export
|
|
@@ -277,7 +287,8 @@ exports.UserSource = {
|
|
|
277
287
|
* @enum {string}
|
|
278
288
|
*/
|
|
279
289
|
exports.WebhookKind = {
|
|
280
|
-
Order: 'order'
|
|
290
|
+
Order: 'order',
|
|
291
|
+
Prod: 'prod'
|
|
281
292
|
};
|
|
282
293
|
/**
|
|
283
294
|
* AuditApi - axios parameter creator
|
|
@@ -1459,13 +1470,16 @@ exports.CustomDealsApi = CustomDealsApi;
|
|
|
1459
1470
|
const DefaultApiAxiosParamCreator = function (configuration) {
|
|
1460
1471
|
return {
|
|
1461
1472
|
/**
|
|
1462
|
-
*
|
|
1463
|
-
* @summary
|
|
1473
|
+
* Import events to the system to be processed
|
|
1474
|
+
* @summary Add event
|
|
1475
|
+
* @param {Array<EventCreationRequest>} eventCreationRequest Entities
|
|
1464
1476
|
* @param {*} [options] Override http request option.
|
|
1465
1477
|
* @throws {RequiredError}
|
|
1466
1478
|
*/
|
|
1467
|
-
|
|
1468
|
-
|
|
1479
|
+
importEvents: (eventCreationRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1480
|
+
// verify required parameter 'eventCreationRequest' is not null or undefined
|
|
1481
|
+
(0, common_1.assertParamExists)('importEvents', 'eventCreationRequest', eventCreationRequest);
|
|
1482
|
+
const localVarPath = `/admins/events`;
|
|
1469
1483
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1470
1484
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1471
1485
|
let baseOptions;
|
|
@@ -1478,14 +1492,26 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1478
1492
|
// authentication jwt required
|
|
1479
1493
|
// http bearer authentication required
|
|
1480
1494
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1495
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1481
1496
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1482
1497
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1483
1498
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1499
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(eventCreationRequest, localVarRequestOptions, configuration);
|
|
1484
1500
|
return {
|
|
1485
1501
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1486
1502
|
options: localVarRequestOptions,
|
|
1487
1503
|
};
|
|
1488
1504
|
}),
|
|
1505
|
+
};
|
|
1506
|
+
};
|
|
1507
|
+
exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
|
|
1508
|
+
/**
|
|
1509
|
+
* DefaultApi - functional programming interface
|
|
1510
|
+
* @export
|
|
1511
|
+
*/
|
|
1512
|
+
const DefaultApiFp = function (configuration) {
|
|
1513
|
+
const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
|
|
1514
|
+
return {
|
|
1489
1515
|
/**
|
|
1490
1516
|
* Import events to the system to be processed
|
|
1491
1517
|
* @summary Add event
|
|
@@ -1493,10 +1519,69 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1493
1519
|
* @param {*} [options] Override http request option.
|
|
1494
1520
|
* @throws {RequiredError}
|
|
1495
1521
|
*/
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1522
|
+
importEvents(eventCreationRequest, options) {
|
|
1523
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1524
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.importEvents(eventCreationRequest, options);
|
|
1525
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1526
|
+
});
|
|
1527
|
+
},
|
|
1528
|
+
};
|
|
1529
|
+
};
|
|
1530
|
+
exports.DefaultApiFp = DefaultApiFp;
|
|
1531
|
+
/**
|
|
1532
|
+
* DefaultApi - factory interface
|
|
1533
|
+
* @export
|
|
1534
|
+
*/
|
|
1535
|
+
const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
1536
|
+
const localVarFp = (0, exports.DefaultApiFp)(configuration);
|
|
1537
|
+
return {
|
|
1538
|
+
/**
|
|
1539
|
+
* Import events to the system to be processed
|
|
1540
|
+
* @summary Add event
|
|
1541
|
+
* @param {Array<EventCreationRequest>} eventCreationRequest Entities
|
|
1542
|
+
* @param {*} [options] Override http request option.
|
|
1543
|
+
* @throws {RequiredError}
|
|
1544
|
+
*/
|
|
1545
|
+
importEvents(eventCreationRequest, options) {
|
|
1546
|
+
return localVarFp.importEvents(eventCreationRequest, options).then((request) => request(axios, basePath));
|
|
1547
|
+
},
|
|
1548
|
+
};
|
|
1549
|
+
};
|
|
1550
|
+
exports.DefaultApiFactory = DefaultApiFactory;
|
|
1551
|
+
/**
|
|
1552
|
+
* DefaultApi - object-oriented interface
|
|
1553
|
+
* @export
|
|
1554
|
+
* @class DefaultApi
|
|
1555
|
+
* @extends {BaseAPI}
|
|
1556
|
+
*/
|
|
1557
|
+
class DefaultApi extends base_1.BaseAPI {
|
|
1558
|
+
/**
|
|
1559
|
+
* Import events to the system to be processed
|
|
1560
|
+
* @summary Add event
|
|
1561
|
+
* @param {Array<EventCreationRequest>} eventCreationRequest Entities
|
|
1562
|
+
* @param {*} [options] Override http request option.
|
|
1563
|
+
* @throws {RequiredError}
|
|
1564
|
+
* @memberof DefaultApi
|
|
1565
|
+
*/
|
|
1566
|
+
importEvents(eventCreationRequest, options) {
|
|
1567
|
+
return (0, exports.DefaultApiFp)(this.configuration).importEvents(eventCreationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
exports.DefaultApi = DefaultApi;
|
|
1571
|
+
/**
|
|
1572
|
+
* IntegrationApi - axios parameter creator
|
|
1573
|
+
* @export
|
|
1574
|
+
*/
|
|
1575
|
+
const IntegrationApiAxiosParamCreator = function (configuration) {
|
|
1576
|
+
return {
|
|
1577
|
+
/**
|
|
1578
|
+
* Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
|
|
1579
|
+
* @summary Generate API key for the current tenant
|
|
1580
|
+
* @param {*} [options] Override http request option.
|
|
1581
|
+
* @throws {RequiredError}
|
|
1582
|
+
*/
|
|
1583
|
+
generateApiKey: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1584
|
+
const localVarPath = `/admins/integrations/apikey`;
|
|
1500
1585
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1501
1586
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1502
1587
|
let baseOptions;
|
|
@@ -1509,11 +1594,9 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1509
1594
|
// authentication jwt required
|
|
1510
1595
|
// http bearer authentication required
|
|
1511
1596
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1512
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1513
1597
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1514
1598
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1515
1599
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1516
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(eventCreationRequest, localVarRequestOptions, configuration);
|
|
1517
1600
|
return {
|
|
1518
1601
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1519
1602
|
options: localVarRequestOptions,
|
|
@@ -1609,13 +1692,13 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1609
1692
|
}),
|
|
1610
1693
|
};
|
|
1611
1694
|
};
|
|
1612
|
-
exports.
|
|
1695
|
+
exports.IntegrationApiAxiosParamCreator = IntegrationApiAxiosParamCreator;
|
|
1613
1696
|
/**
|
|
1614
|
-
*
|
|
1697
|
+
* IntegrationApi - functional programming interface
|
|
1615
1698
|
* @export
|
|
1616
1699
|
*/
|
|
1617
|
-
const
|
|
1618
|
-
const localVarAxiosParamCreator = (0, exports.
|
|
1700
|
+
const IntegrationApiFp = function (configuration) {
|
|
1701
|
+
const localVarAxiosParamCreator = (0, exports.IntegrationApiAxiosParamCreator)(configuration);
|
|
1619
1702
|
return {
|
|
1620
1703
|
/**
|
|
1621
1704
|
* Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
|
|
@@ -1629,19 +1712,6 @@ const DefaultApiFp = function (configuration) {
|
|
|
1629
1712
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1630
1713
|
});
|
|
1631
1714
|
},
|
|
1632
|
-
/**
|
|
1633
|
-
* Import events to the system to be processed
|
|
1634
|
-
* @summary Add event
|
|
1635
|
-
* @param {Array<EventCreationRequest>} eventCreationRequest Entities
|
|
1636
|
-
* @param {*} [options] Override http request option.
|
|
1637
|
-
* @throws {RequiredError}
|
|
1638
|
-
*/
|
|
1639
|
-
importEvent(eventCreationRequest, options) {
|
|
1640
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1641
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.importEvent(eventCreationRequest, options);
|
|
1642
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1643
|
-
});
|
|
1644
|
-
},
|
|
1645
1715
|
/**
|
|
1646
1716
|
* List all webhooks for current tenant
|
|
1647
1717
|
* @summary List webhooks
|
|
@@ -1681,13 +1751,13 @@ const DefaultApiFp = function (configuration) {
|
|
|
1681
1751
|
},
|
|
1682
1752
|
};
|
|
1683
1753
|
};
|
|
1684
|
-
exports.
|
|
1754
|
+
exports.IntegrationApiFp = IntegrationApiFp;
|
|
1685
1755
|
/**
|
|
1686
|
-
*
|
|
1756
|
+
* IntegrationApi - factory interface
|
|
1687
1757
|
* @export
|
|
1688
1758
|
*/
|
|
1689
|
-
const
|
|
1690
|
-
const localVarFp = (0, exports.
|
|
1759
|
+
const IntegrationApiFactory = function (configuration, basePath, axios) {
|
|
1760
|
+
const localVarFp = (0, exports.IntegrationApiFp)(configuration);
|
|
1691
1761
|
return {
|
|
1692
1762
|
/**
|
|
1693
1763
|
* Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
|
|
@@ -1698,16 +1768,6 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
1698
1768
|
generateApiKey(options) {
|
|
1699
1769
|
return localVarFp.generateApiKey(options).then((request) => request(axios, basePath));
|
|
1700
1770
|
},
|
|
1701
|
-
/**
|
|
1702
|
-
* Import events to the system to be processed
|
|
1703
|
-
* @summary Add event
|
|
1704
|
-
* @param {Array<EventCreationRequest>} eventCreationRequest Entities
|
|
1705
|
-
* @param {*} [options] Override http request option.
|
|
1706
|
-
* @throws {RequiredError}
|
|
1707
|
-
*/
|
|
1708
|
-
importEvent(eventCreationRequest, options) {
|
|
1709
|
-
return localVarFp.importEvent(eventCreationRequest, options).then((request) => request(axios, basePath));
|
|
1710
|
-
},
|
|
1711
1771
|
/**
|
|
1712
1772
|
* List all webhooks for current tenant
|
|
1713
1773
|
* @summary List webhooks
|
|
@@ -1738,44 +1798,33 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
1738
1798
|
},
|
|
1739
1799
|
};
|
|
1740
1800
|
};
|
|
1741
|
-
exports.
|
|
1801
|
+
exports.IntegrationApiFactory = IntegrationApiFactory;
|
|
1742
1802
|
/**
|
|
1743
|
-
*
|
|
1803
|
+
* IntegrationApi - object-oriented interface
|
|
1744
1804
|
* @export
|
|
1745
|
-
* @class
|
|
1805
|
+
* @class IntegrationApi
|
|
1746
1806
|
* @extends {BaseAPI}
|
|
1747
1807
|
*/
|
|
1748
|
-
class
|
|
1808
|
+
class IntegrationApi extends base_1.BaseAPI {
|
|
1749
1809
|
/**
|
|
1750
1810
|
* Generate a new API key, if one already exists it will be rotated, but the old one will still be valid for a short period of time. Important that API key is only returned once, so make sure to store it securely.
|
|
1751
1811
|
* @summary Generate API key for the current tenant
|
|
1752
1812
|
* @param {*} [options] Override http request option.
|
|
1753
1813
|
* @throws {RequiredError}
|
|
1754
|
-
* @memberof
|
|
1814
|
+
* @memberof IntegrationApi
|
|
1755
1815
|
*/
|
|
1756
1816
|
generateApiKey(options) {
|
|
1757
|
-
return (0, exports.
|
|
1758
|
-
}
|
|
1759
|
-
/**
|
|
1760
|
-
* Import events to the system to be processed
|
|
1761
|
-
* @summary Add event
|
|
1762
|
-
* @param {Array<EventCreationRequest>} eventCreationRequest Entities
|
|
1763
|
-
* @param {*} [options] Override http request option.
|
|
1764
|
-
* @throws {RequiredError}
|
|
1765
|
-
* @memberof DefaultApi
|
|
1766
|
-
*/
|
|
1767
|
-
importEvent(eventCreationRequest, options) {
|
|
1768
|
-
return (0, exports.DefaultApiFp)(this.configuration).importEvent(eventCreationRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1817
|
+
return (0, exports.IntegrationApiFp)(this.configuration).generateApiKey(options).then((request) => request(this.axios, this.basePath));
|
|
1769
1818
|
}
|
|
1770
1819
|
/**
|
|
1771
1820
|
* List all webhooks for current tenant
|
|
1772
1821
|
* @summary List webhooks
|
|
1773
1822
|
* @param {*} [options] Override http request option.
|
|
1774
1823
|
* @throws {RequiredError}
|
|
1775
|
-
* @memberof
|
|
1824
|
+
* @memberof IntegrationApi
|
|
1776
1825
|
*/
|
|
1777
1826
|
listWebhooks(options) {
|
|
1778
|
-
return (0, exports.
|
|
1827
|
+
return (0, exports.IntegrationApiFp)(this.configuration).listWebhooks(options).then((request) => request(this.axios, this.basePath));
|
|
1779
1828
|
}
|
|
1780
1829
|
/**
|
|
1781
1830
|
* Set up webhook url for a given integration
|
|
@@ -1783,23 +1832,23 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
1783
1832
|
* @param {Webhook} webhook webhook data
|
|
1784
1833
|
* @param {*} [options] Override http request option.
|
|
1785
1834
|
* @throws {RequiredError}
|
|
1786
|
-
* @memberof
|
|
1835
|
+
* @memberof IntegrationApi
|
|
1787
1836
|
*/
|
|
1788
1837
|
setWebhook(webhook, options) {
|
|
1789
|
-
return (0, exports.
|
|
1838
|
+
return (0, exports.IntegrationApiFp)(this.configuration).setWebhook(webhook, options).then((request) => request(this.axios, this.basePath));
|
|
1790
1839
|
}
|
|
1791
1840
|
/**
|
|
1792
1841
|
* Test API key security scheme
|
|
1793
1842
|
* @summary Test API key security scheme
|
|
1794
1843
|
* @param {*} [options] Override http request option.
|
|
1795
1844
|
* @throws {RequiredError}
|
|
1796
|
-
* @memberof
|
|
1845
|
+
* @memberof IntegrationApi
|
|
1797
1846
|
*/
|
|
1798
1847
|
testApiKey(options) {
|
|
1799
|
-
return (0, exports.
|
|
1848
|
+
return (0, exports.IntegrationApiFp)(this.configuration).testApiKey(options).then((request) => request(this.axios, this.basePath));
|
|
1800
1849
|
}
|
|
1801
1850
|
}
|
|
1802
|
-
exports.
|
|
1851
|
+
exports.IntegrationApi = IntegrationApi;
|
|
1803
1852
|
/**
|
|
1804
1853
|
* NotificationApi - axios parameter creator
|
|
1805
1854
|
* @export
|