@nexgencloud/hyperstack-sdk-typescript 1.52.0-alpha → 1.54.7-alpha

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
@@ -1383,6 +1383,361 @@ export class AuthApi extends BaseAPI {
1383
1383
  return AuthApiFp(this.configuration).retrieveAuthenticatedUserDetails(options).then((request) => request(this.axios, this.basePath));
1384
1384
  }
1385
1385
  }
1386
+ /**
1387
+ * AutoTopupApi - axios parameter creator
1388
+ * @export
1389
+ */
1390
+ export const AutoTopupApiAxiosParamCreator = function (configuration) {
1391
+ return {
1392
+ /**
1393
+ *
1394
+ * @summary Create an auto top up configuration and initiate Stripe setup
1395
+ * @param {CreateAutoTopupPayload} payload
1396
+ * @param {*} [options] Override http request option.
1397
+ * @throws {RequiredError}
1398
+ */
1399
+ createAutoTopUp: (payload_1, ...args_1) => __awaiter(this, [payload_1, ...args_1], void 0, function* (payload, options = {}) {
1400
+ // verify required parameter 'payload' is not null or undefined
1401
+ assertParamExists('createAutoTopUp', 'payload', payload);
1402
+ const localVarPath = `/billing/auto-topup`;
1403
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1404
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1405
+ let baseOptions;
1406
+ if (configuration) {
1407
+ baseOptions = configuration.baseOptions;
1408
+ }
1409
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1410
+ const localVarHeaderParameter = {};
1411
+ const localVarQueryParameter = {};
1412
+ // authentication apiKey required
1413
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
1414
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1415
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1416
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1417
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1418
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
1419
+ return {
1420
+ url: toPathString(localVarUrlObj),
1421
+ options: localVarRequestOptions,
1422
+ };
1423
+ }),
1424
+ /**
1425
+ *
1426
+ * @summary Disable auto top up, preventing any future automatic charges
1427
+ * @param {*} [options] Override http request option.
1428
+ * @throws {RequiredError}
1429
+ */
1430
+ disableAutoTopUp: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1431
+ const localVarPath = `/billing/auto-topup`;
1432
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1433
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1434
+ let baseOptions;
1435
+ if (configuration) {
1436
+ baseOptions = configuration.baseOptions;
1437
+ }
1438
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1439
+ const localVarHeaderParameter = {};
1440
+ const localVarQueryParameter = {};
1441
+ // authentication apiKey required
1442
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
1443
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1444
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1445
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1446
+ return {
1447
+ url: toPathString(localVarUrlObj),
1448
+ options: localVarRequestOptions,
1449
+ };
1450
+ }),
1451
+ /**
1452
+ *
1453
+ * @summary Retrieve the current auto top up configuration and transaction history
1454
+ * @param {*} [options] Override http request option.
1455
+ * @throws {RequiredError}
1456
+ */
1457
+ getAutoTopUp: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1458
+ const localVarPath = `/billing/auto-topup`;
1459
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1460
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1461
+ let baseOptions;
1462
+ if (configuration) {
1463
+ baseOptions = configuration.baseOptions;
1464
+ }
1465
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1466
+ const localVarHeaderParameter = {};
1467
+ const localVarQueryParameter = {};
1468
+ // authentication apiKey required
1469
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
1470
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1471
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1472
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1473
+ return {
1474
+ url: toPathString(localVarUrlObj),
1475
+ options: localVarRequestOptions,
1476
+ };
1477
+ }),
1478
+ /**
1479
+ * Retrieves the current auto top-up configuration and status for your organization. Returns the status (active, disabled, pending_setup, or null if never configured), along with the threshold and top-up amounts. For additional information, [**click here**](None/docs/api-reference/billing-resources/).
1480
+ * @summary Get auto top-up status and configuration
1481
+ * @param {*} [options] Override http request option.
1482
+ * @throws {RequiredError}
1483
+ */
1484
+ getAutoTopUpStatus: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
1485
+ const localVarPath = `/billing/auto-topup/status`;
1486
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1487
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1488
+ let baseOptions;
1489
+ if (configuration) {
1490
+ baseOptions = configuration.baseOptions;
1491
+ }
1492
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1493
+ const localVarHeaderParameter = {};
1494
+ const localVarQueryParameter = {};
1495
+ // authentication apiKey required
1496
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
1497
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1498
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1499
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1500
+ return {
1501
+ url: toPathString(localVarUrlObj),
1502
+ options: localVarRequestOptions,
1503
+ };
1504
+ }),
1505
+ /**
1506
+ *
1507
+ * @summary Update an existing active auto top up configuration
1508
+ * @param {UpdateAutoTopupPayload} payload
1509
+ * @param {*} [options] Override http request option.
1510
+ * @throws {RequiredError}
1511
+ */
1512
+ updateAutoTopUp: (payload_1, ...args_1) => __awaiter(this, [payload_1, ...args_1], void 0, function* (payload, options = {}) {
1513
+ // verify required parameter 'payload' is not null or undefined
1514
+ assertParamExists('updateAutoTopUp', 'payload', payload);
1515
+ const localVarPath = `/billing/auto-topup`;
1516
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1517
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1518
+ let baseOptions;
1519
+ if (configuration) {
1520
+ baseOptions = configuration.baseOptions;
1521
+ }
1522
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
1523
+ const localVarHeaderParameter = {};
1524
+ const localVarQueryParameter = {};
1525
+ // authentication apiKey required
1526
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
1527
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1528
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1529
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1530
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1531
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
1532
+ return {
1533
+ url: toPathString(localVarUrlObj),
1534
+ options: localVarRequestOptions,
1535
+ };
1536
+ }),
1537
+ };
1538
+ };
1539
+ /**
1540
+ * AutoTopupApi - functional programming interface
1541
+ * @export
1542
+ */
1543
+ export const AutoTopupApiFp = function (configuration) {
1544
+ const localVarAxiosParamCreator = AutoTopupApiAxiosParamCreator(configuration);
1545
+ return {
1546
+ /**
1547
+ *
1548
+ * @summary Create an auto top up configuration and initiate Stripe setup
1549
+ * @param {CreateAutoTopupPayload} payload
1550
+ * @param {*} [options] Override http request option.
1551
+ * @throws {RequiredError}
1552
+ */
1553
+ createAutoTopUp(payload, options) {
1554
+ return __awaiter(this, void 0, void 0, function* () {
1555
+ var _a, _b, _c;
1556
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createAutoTopUp(payload, options);
1557
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1558
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AutoTopupApi.createAutoTopUp']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1559
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1560
+ });
1561
+ },
1562
+ /**
1563
+ *
1564
+ * @summary Disable auto top up, preventing any future automatic charges
1565
+ * @param {*} [options] Override http request option.
1566
+ * @throws {RequiredError}
1567
+ */
1568
+ disableAutoTopUp(options) {
1569
+ return __awaiter(this, void 0, void 0, function* () {
1570
+ var _a, _b, _c;
1571
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.disableAutoTopUp(options);
1572
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1573
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AutoTopupApi.disableAutoTopUp']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1574
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1575
+ });
1576
+ },
1577
+ /**
1578
+ *
1579
+ * @summary Retrieve the current auto top up configuration and transaction history
1580
+ * @param {*} [options] Override http request option.
1581
+ * @throws {RequiredError}
1582
+ */
1583
+ getAutoTopUp(options) {
1584
+ return __awaiter(this, void 0, void 0, function* () {
1585
+ var _a, _b, _c;
1586
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAutoTopUp(options);
1587
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1588
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AutoTopupApi.getAutoTopUp']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1589
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1590
+ });
1591
+ },
1592
+ /**
1593
+ * Retrieves the current auto top-up configuration and status for your organization. Returns the status (active, disabled, pending_setup, or null if never configured), along with the threshold and top-up amounts. For additional information, [**click here**](None/docs/api-reference/billing-resources/).
1594
+ * @summary Get auto top-up status and configuration
1595
+ * @param {*} [options] Override http request option.
1596
+ * @throws {RequiredError}
1597
+ */
1598
+ getAutoTopUpStatus(options) {
1599
+ return __awaiter(this, void 0, void 0, function* () {
1600
+ var _a, _b, _c;
1601
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAutoTopUpStatus(options);
1602
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1603
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AutoTopupApi.getAutoTopUpStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1604
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1605
+ });
1606
+ },
1607
+ /**
1608
+ *
1609
+ * @summary Update an existing active auto top up configuration
1610
+ * @param {UpdateAutoTopupPayload} payload
1611
+ * @param {*} [options] Override http request option.
1612
+ * @throws {RequiredError}
1613
+ */
1614
+ updateAutoTopUp(payload, options) {
1615
+ return __awaiter(this, void 0, void 0, function* () {
1616
+ var _a, _b, _c;
1617
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateAutoTopUp(payload, options);
1618
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1619
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AutoTopupApi.updateAutoTopUp']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1620
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1621
+ });
1622
+ },
1623
+ };
1624
+ };
1625
+ /**
1626
+ * AutoTopupApi - factory interface
1627
+ * @export
1628
+ */
1629
+ export const AutoTopupApiFactory = function (configuration, basePath, axios) {
1630
+ const localVarFp = AutoTopupApiFp(configuration);
1631
+ return {
1632
+ /**
1633
+ *
1634
+ * @summary Create an auto top up configuration and initiate Stripe setup
1635
+ * @param {CreateAutoTopupPayload} payload
1636
+ * @param {*} [options] Override http request option.
1637
+ * @throws {RequiredError}
1638
+ */
1639
+ createAutoTopUp(payload, options) {
1640
+ return localVarFp.createAutoTopUp(payload, options).then((request) => request(axios, basePath));
1641
+ },
1642
+ /**
1643
+ *
1644
+ * @summary Disable auto top up, preventing any future automatic charges
1645
+ * @param {*} [options] Override http request option.
1646
+ * @throws {RequiredError}
1647
+ */
1648
+ disableAutoTopUp(options) {
1649
+ return localVarFp.disableAutoTopUp(options).then((request) => request(axios, basePath));
1650
+ },
1651
+ /**
1652
+ *
1653
+ * @summary Retrieve the current auto top up configuration and transaction history
1654
+ * @param {*} [options] Override http request option.
1655
+ * @throws {RequiredError}
1656
+ */
1657
+ getAutoTopUp(options) {
1658
+ return localVarFp.getAutoTopUp(options).then((request) => request(axios, basePath));
1659
+ },
1660
+ /**
1661
+ * Retrieves the current auto top-up configuration and status for your organization. Returns the status (active, disabled, pending_setup, or null if never configured), along with the threshold and top-up amounts. For additional information, [**click here**](None/docs/api-reference/billing-resources/).
1662
+ * @summary Get auto top-up status and configuration
1663
+ * @param {*} [options] Override http request option.
1664
+ * @throws {RequiredError}
1665
+ */
1666
+ getAutoTopUpStatus(options) {
1667
+ return localVarFp.getAutoTopUpStatus(options).then((request) => request(axios, basePath));
1668
+ },
1669
+ /**
1670
+ *
1671
+ * @summary Update an existing active auto top up configuration
1672
+ * @param {UpdateAutoTopupPayload} payload
1673
+ * @param {*} [options] Override http request option.
1674
+ * @throws {RequiredError}
1675
+ */
1676
+ updateAutoTopUp(payload, options) {
1677
+ return localVarFp.updateAutoTopUp(payload, options).then((request) => request(axios, basePath));
1678
+ },
1679
+ };
1680
+ };
1681
+ /**
1682
+ * AutoTopupApi - object-oriented interface
1683
+ * @export
1684
+ * @class AutoTopupApi
1685
+ * @extends {BaseAPI}
1686
+ */
1687
+ export class AutoTopupApi extends BaseAPI {
1688
+ /**
1689
+ *
1690
+ * @summary Create an auto top up configuration and initiate Stripe setup
1691
+ * @param {CreateAutoTopupPayload} payload
1692
+ * @param {*} [options] Override http request option.
1693
+ * @throws {RequiredError}
1694
+ * @memberof AutoTopupApi
1695
+ */
1696
+ createAutoTopUp(payload, options) {
1697
+ return AutoTopupApiFp(this.configuration).createAutoTopUp(payload, options).then((request) => request(this.axios, this.basePath));
1698
+ }
1699
+ /**
1700
+ *
1701
+ * @summary Disable auto top up, preventing any future automatic charges
1702
+ * @param {*} [options] Override http request option.
1703
+ * @throws {RequiredError}
1704
+ * @memberof AutoTopupApi
1705
+ */
1706
+ disableAutoTopUp(options) {
1707
+ return AutoTopupApiFp(this.configuration).disableAutoTopUp(options).then((request) => request(this.axios, this.basePath));
1708
+ }
1709
+ /**
1710
+ *
1711
+ * @summary Retrieve the current auto top up configuration and transaction history
1712
+ * @param {*} [options] Override http request option.
1713
+ * @throws {RequiredError}
1714
+ * @memberof AutoTopupApi
1715
+ */
1716
+ getAutoTopUp(options) {
1717
+ return AutoTopupApiFp(this.configuration).getAutoTopUp(options).then((request) => request(this.axios, this.basePath));
1718
+ }
1719
+ /**
1720
+ * Retrieves the current auto top-up configuration and status for your organization. Returns the status (active, disabled, pending_setup, or null if never configured), along with the threshold and top-up amounts. For additional information, [**click here**](None/docs/api-reference/billing-resources/).
1721
+ * @summary Get auto top-up status and configuration
1722
+ * @param {*} [options] Override http request option.
1723
+ * @throws {RequiredError}
1724
+ * @memberof AutoTopupApi
1725
+ */
1726
+ getAutoTopUpStatus(options) {
1727
+ return AutoTopupApiFp(this.configuration).getAutoTopUpStatus(options).then((request) => request(this.axios, this.basePath));
1728
+ }
1729
+ /**
1730
+ *
1731
+ * @summary Update an existing active auto top up configuration
1732
+ * @param {UpdateAutoTopupPayload} payload
1733
+ * @param {*} [options] Override http request option.
1734
+ * @throws {RequiredError}
1735
+ * @memberof AutoTopupApi
1736
+ */
1737
+ updateAutoTopUp(payload, options) {
1738
+ return AutoTopupApiFp(this.configuration).updateAutoTopUp(payload, options).then((request) => request(this.axios, this.basePath));
1739
+ }
1740
+ }
1386
1741
  /**
1387
1742
  * BetaAccessApi - axios parameter creator
1388
1743
  * @export
@@ -1987,6 +2342,130 @@ export const BillingApiAxiosParamCreator = function (configuration) {
1987
2342
  options: localVarRequestOptions,
1988
2343
  };
1989
2344
  }),
2345
+ /**
2346
+ * User will receive billing history of image_generation for the specified billing cycle.
2347
+ * @summary Retrieve Billing History of image generation for a specific Billing Cycle
2348
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
2349
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
2350
+ * @param {string} [search] Search by resource \"Name\" or \"ID\"
2351
+ * @param {number} [perPage] Number of items to return per page
2352
+ * @param {number} [page] Page number
2353
+ * @param {*} [options] Override http request option.
2354
+ * @throws {RequiredError}
2355
+ */
2356
+ getImageGenerationBillingHistory: (startDate_1, endDate_1, search_1, perPage_1, page_1, ...args_1) => __awaiter(this, [startDate_1, endDate_1, search_1, perPage_1, page_1, ...args_1], void 0, function* (startDate, endDate, search, perPage, page, options = {}) {
2357
+ const localVarPath = `/billing/billing/history/image_generation`;
2358
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2359
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2360
+ let baseOptions;
2361
+ if (configuration) {
2362
+ baseOptions = configuration.baseOptions;
2363
+ }
2364
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2365
+ const localVarHeaderParameter = {};
2366
+ const localVarQueryParameter = {};
2367
+ // authentication apiKey required
2368
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
2369
+ if (startDate !== undefined) {
2370
+ localVarQueryParameter['start_date'] = startDate;
2371
+ }
2372
+ if (endDate !== undefined) {
2373
+ localVarQueryParameter['end_date'] = endDate;
2374
+ }
2375
+ if (search !== undefined) {
2376
+ localVarQueryParameter['search'] = search;
2377
+ }
2378
+ if (perPage !== undefined) {
2379
+ localVarQueryParameter['per_page'] = perPage;
2380
+ }
2381
+ if (page !== undefined) {
2382
+ localVarQueryParameter['page'] = page;
2383
+ }
2384
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2385
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2386
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2387
+ return {
2388
+ url: toPathString(localVarUrlObj),
2389
+ options: localVarRequestOptions,
2390
+ };
2391
+ }),
2392
+ /**
2393
+ * User will receive hourly cost datapoints for an image generation job for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints. billing cycle
2394
+ * @summary Retrieve hourly cost datapoints of a Specific Image Generation for a specific
2395
+ * @param {number} resourceId
2396
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
2397
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
2398
+ * @param {*} [options] Override http request option.
2399
+ * @throws {RequiredError}
2400
+ */
2401
+ getImageGenerationBillingHistoryGraph: (resourceId_1, startDate_1, endDate_1, ...args_1) => __awaiter(this, [resourceId_1, startDate_1, endDate_1, ...args_1], void 0, function* (resourceId, startDate, endDate, options = {}) {
2402
+ // verify required parameter 'resourceId' is not null or undefined
2403
+ assertParamExists('getImageGenerationBillingHistoryGraph', 'resourceId', resourceId);
2404
+ const localVarPath = `/billing/billing/history/image_generation/{resource_id}/graph`
2405
+ .replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId)));
2406
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2407
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2408
+ let baseOptions;
2409
+ if (configuration) {
2410
+ baseOptions = configuration.baseOptions;
2411
+ }
2412
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2413
+ const localVarHeaderParameter = {};
2414
+ const localVarQueryParameter = {};
2415
+ // authentication apiKey required
2416
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
2417
+ if (startDate !== undefined) {
2418
+ localVarQueryParameter['start_date'] = startDate;
2419
+ }
2420
+ if (endDate !== undefined) {
2421
+ localVarQueryParameter['end_date'] = endDate;
2422
+ }
2423
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2424
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2425
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2426
+ return {
2427
+ url: toPathString(localVarUrlObj),
2428
+ options: localVarRequestOptions,
2429
+ };
2430
+ }),
2431
+ /**
2432
+ * Retrieve billing history for a specific Image Generation resource. Includes: \'resource_name\', \'infrahub_id\', \'base_model\', \'base_model_display_name\', \'lora_adapter\', \'incurred_bill\', \'non_discounted_bill\', \'usage_time\', \'input_tokens\', \'output_tokens\', \'input_tokens_incurred_bill\', \'input_tokens_non_discounted_bill\', \'output_tokens_incurred_bill\', \'output_tokens_non_discounted_bill\'
2433
+ * @param {number} resourceId
2434
+ * @param {string} [startDate] YYYY-MM-DDTHH:MM:SS
2435
+ * @param {string} [endDate] YYYY-MM-DDTHH:MM:SS
2436
+ * @param {*} [options] Override http request option.
2437
+ * @throws {RequiredError}
2438
+ */
2439
+ getImageGenerationHistoryForResource: (resourceId_1, startDate_1, endDate_1, ...args_1) => __awaiter(this, [resourceId_1, startDate_1, endDate_1, ...args_1], void 0, function* (resourceId, startDate, endDate, options = {}) {
2440
+ // verify required parameter 'resourceId' is not null or undefined
2441
+ assertParamExists('getImageGenerationHistoryForResource', 'resourceId', resourceId);
2442
+ const localVarPath = `/billing/billing/history/image_generation/{resource_id}`
2443
+ .replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId)));
2444
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2445
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2446
+ let baseOptions;
2447
+ if (configuration) {
2448
+ baseOptions = configuration.baseOptions;
2449
+ }
2450
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2451
+ const localVarHeaderParameter = {};
2452
+ const localVarQueryParameter = {};
2453
+ // authentication apiKey required
2454
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
2455
+ if (startDate !== undefined) {
2456
+ localVarQueryParameter['start_date'] = startDate;
2457
+ }
2458
+ if (endDate !== undefined) {
2459
+ localVarQueryParameter['end_date'] = endDate;
2460
+ }
2461
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2462
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2463
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2464
+ return {
2465
+ url: toPathString(localVarUrlObj),
2466
+ options: localVarRequestOptions,
2467
+ };
2468
+ }),
1990
2469
  /**
1991
2470
  * Retrieve the previous day\'s costs for instances, volumes, and clusters. Returns a breakdown of the costs and the total cost for the last day. For additional information on Retrieve Previous Day Usage Costs, [**click here**](None/docs/api-reference/billing-resources/last-day-usage/)
1992
2471
  * @summary GET: Last Day Cost
@@ -3276,6 +3755,61 @@ export const BillingApiFp = function (configuration) {
3276
3755
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3277
3756
  });
3278
3757
  },
3758
+ /**
3759
+ * User will receive billing history of image_generation for the specified billing cycle.
3760
+ * @summary Retrieve Billing History of image generation for a specific Billing Cycle
3761
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
3762
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
3763
+ * @param {string} [search] Search by resource \"Name\" or \"ID\"
3764
+ * @param {number} [perPage] Number of items to return per page
3765
+ * @param {number} [page] Page number
3766
+ * @param {*} [options] Override http request option.
3767
+ * @throws {RequiredError}
3768
+ */
3769
+ getImageGenerationBillingHistory(startDate, endDate, search, perPage, page, options) {
3770
+ return __awaiter(this, void 0, void 0, function* () {
3771
+ var _a, _b, _c;
3772
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getImageGenerationBillingHistory(startDate, endDate, search, perPage, page, options);
3773
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3774
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BillingApi.getImageGenerationBillingHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3775
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3776
+ });
3777
+ },
3778
+ /**
3779
+ * User will receive hourly cost datapoints for an image generation job for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints. billing cycle
3780
+ * @summary Retrieve hourly cost datapoints of a Specific Image Generation for a specific
3781
+ * @param {number} resourceId
3782
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
3783
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
3784
+ * @param {*} [options] Override http request option.
3785
+ * @throws {RequiredError}
3786
+ */
3787
+ getImageGenerationBillingHistoryGraph(resourceId, startDate, endDate, options) {
3788
+ return __awaiter(this, void 0, void 0, function* () {
3789
+ var _a, _b, _c;
3790
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getImageGenerationBillingHistoryGraph(resourceId, startDate, endDate, options);
3791
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3792
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BillingApi.getImageGenerationBillingHistoryGraph']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3793
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3794
+ });
3795
+ },
3796
+ /**
3797
+ * Retrieve billing history for a specific Image Generation resource. Includes: \'resource_name\', \'infrahub_id\', \'base_model\', \'base_model_display_name\', \'lora_adapter\', \'incurred_bill\', \'non_discounted_bill\', \'usage_time\', \'input_tokens\', \'output_tokens\', \'input_tokens_incurred_bill\', \'input_tokens_non_discounted_bill\', \'output_tokens_incurred_bill\', \'output_tokens_non_discounted_bill\'
3798
+ * @param {number} resourceId
3799
+ * @param {string} [startDate] YYYY-MM-DDTHH:MM:SS
3800
+ * @param {string} [endDate] YYYY-MM-DDTHH:MM:SS
3801
+ * @param {*} [options] Override http request option.
3802
+ * @throws {RequiredError}
3803
+ */
3804
+ getImageGenerationHistoryForResource(resourceId, startDate, endDate, options) {
3805
+ return __awaiter(this, void 0, void 0, function* () {
3806
+ var _a, _b, _c;
3807
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getImageGenerationHistoryForResource(resourceId, startDate, endDate, options);
3808
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3809
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['BillingApi.getImageGenerationHistoryForResource']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3810
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3811
+ });
3812
+ },
3279
3813
  /**
3280
3814
  * Retrieve the previous day\'s costs for instances, volumes, and clusters. Returns a breakdown of the costs and the total cost for the last day. For additional information on Retrieve Previous Day Usage Costs, [**click here**](None/docs/api-reference/billing-resources/last-day-usage/)
3281
3815
  * @summary GET: Last Day Cost
@@ -3904,6 +4438,43 @@ export const BillingApiFactory = function (configuration, basePath, axios) {
3904
4438
  getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options) {
3905
4439
  return localVarFp.getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(axios, basePath));
3906
4440
  },
4441
+ /**
4442
+ * User will receive billing history of image_generation for the specified billing cycle.
4443
+ * @summary Retrieve Billing History of image generation for a specific Billing Cycle
4444
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4445
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4446
+ * @param {string} [search] Search by resource \"Name\" or \"ID\"
4447
+ * @param {number} [perPage] Number of items to return per page
4448
+ * @param {number} [page] Page number
4449
+ * @param {*} [options] Override http request option.
4450
+ * @throws {RequiredError}
4451
+ */
4452
+ getImageGenerationBillingHistory(startDate, endDate, search, perPage, page, options) {
4453
+ return localVarFp.getImageGenerationBillingHistory(startDate, endDate, search, perPage, page, options).then((request) => request(axios, basePath));
4454
+ },
4455
+ /**
4456
+ * User will receive hourly cost datapoints for an image generation job for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints. billing cycle
4457
+ * @summary Retrieve hourly cost datapoints of a Specific Image Generation for a specific
4458
+ * @param {number} resourceId
4459
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4460
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4461
+ * @param {*} [options] Override http request option.
4462
+ * @throws {RequiredError}
4463
+ */
4464
+ getImageGenerationBillingHistoryGraph(resourceId, startDate, endDate, options) {
4465
+ return localVarFp.getImageGenerationBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(axios, basePath));
4466
+ },
4467
+ /**
4468
+ * Retrieve billing history for a specific Image Generation resource. Includes: \'resource_name\', \'infrahub_id\', \'base_model\', \'base_model_display_name\', \'lora_adapter\', \'incurred_bill\', \'non_discounted_bill\', \'usage_time\', \'input_tokens\', \'output_tokens\', \'input_tokens_incurred_bill\', \'input_tokens_non_discounted_bill\', \'output_tokens_incurred_bill\', \'output_tokens_non_discounted_bill\'
4469
+ * @param {number} resourceId
4470
+ * @param {string} [startDate] YYYY-MM-DDTHH:MM:SS
4471
+ * @param {string} [endDate] YYYY-MM-DDTHH:MM:SS
4472
+ * @param {*} [options] Override http request option.
4473
+ * @throws {RequiredError}
4474
+ */
4475
+ getImageGenerationHistoryForResource(resourceId, startDate, endDate, options) {
4476
+ return localVarFp.getImageGenerationHistoryForResource(resourceId, startDate, endDate, options).then((request) => request(axios, basePath));
4477
+ },
3907
4478
  /**
3908
4479
  * Retrieve the previous day\'s costs for instances, volumes, and clusters. Returns a breakdown of the costs and the total cost for the last day. For additional information on Retrieve Previous Day Usage Costs, [**click here**](None/docs/api-reference/billing-resources/last-day-usage/)
3909
4480
  * @summary GET: Last Day Cost
@@ -4357,21 +4928,61 @@ export class BillingApi extends BaseAPI {
4357
4928
  * @throws {RequiredError}
4358
4929
  * @memberof BillingApi
4359
4930
  */
4360
- getFineTuningBillingHistory(startDate, endDate, search, perPage, page, options) {
4361
- return BillingApiFp(this.configuration).getFineTuningBillingHistory(startDate, endDate, search, perPage, page, options).then((request) => request(this.axios, this.basePath));
4931
+ getFineTuningBillingHistory(startDate, endDate, search, perPage, page, options) {
4932
+ return BillingApiFp(this.configuration).getFineTuningBillingHistory(startDate, endDate, search, perPage, page, options).then((request) => request(this.axios, this.basePath));
4933
+ }
4934
+ /**
4935
+ * User will receive hourly cost datapoints for a Fine Tunings for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints.
4936
+ * @summary Retrieve hourly cost datapoints of a Specific Fine Tuning for a specific billing cycle
4937
+ * @param {number} resourceId
4938
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4939
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4940
+ * @param {*} [options] Override http request option.
4941
+ * @throws {RequiredError}
4942
+ * @memberof BillingApi
4943
+ */
4944
+ getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options) {
4945
+ return BillingApiFp(this.configuration).getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
4946
+ }
4947
+ /**
4948
+ * User will receive billing history of image_generation for the specified billing cycle.
4949
+ * @summary Retrieve Billing History of image generation for a specific Billing Cycle
4950
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4951
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4952
+ * @param {string} [search] Search by resource \"Name\" or \"ID\"
4953
+ * @param {number} [perPage] Number of items to return per page
4954
+ * @param {number} [page] Page number
4955
+ * @param {*} [options] Override http request option.
4956
+ * @throws {RequiredError}
4957
+ * @memberof BillingApi
4958
+ */
4959
+ getImageGenerationBillingHistory(startDate, endDate, search, perPage, page, options) {
4960
+ return BillingApiFp(this.configuration).getImageGenerationBillingHistory(startDate, endDate, search, perPage, page, options).then((request) => request(this.axios, this.basePath));
4961
+ }
4962
+ /**
4963
+ * User will receive hourly cost datapoints for an image generation job for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints. billing cycle
4964
+ * @summary Retrieve hourly cost datapoints of a Specific Image Generation for a specific
4965
+ * @param {number} resourceId
4966
+ * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4967
+ * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4968
+ * @param {*} [options] Override http request option.
4969
+ * @throws {RequiredError}
4970
+ * @memberof BillingApi
4971
+ */
4972
+ getImageGenerationBillingHistoryGraph(resourceId, startDate, endDate, options) {
4973
+ return BillingApiFp(this.configuration).getImageGenerationBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
4362
4974
  }
4363
4975
  /**
4364
- * User will receive hourly cost datapoints for a Fine Tunings for a specified billing cycle. This data will include \'incurred_bill\' graph datapoints.
4365
- * @summary Retrieve hourly cost datapoints of a Specific Fine Tuning for a specific billing cycle
4976
+ * Retrieve billing history for a specific Image Generation resource. Includes: \'resource_name\', \'infrahub_id\', \'base_model\', \'base_model_display_name\', \'lora_adapter\', \'incurred_bill\', \'non_discounted_bill\', \'usage_time\', \'input_tokens\', \'output_tokens\', \'input_tokens_incurred_bill\', \'input_tokens_non_discounted_bill\', \'output_tokens_incurred_bill\', \'output_tokens_non_discounted_bill\'
4366
4977
  * @param {number} resourceId
4367
- * @param {string} [startDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4368
- * @param {string} [endDate] Date should be formatted in YYYY-MM-DDTHH:MM:SS
4978
+ * @param {string} [startDate] YYYY-MM-DDTHH:MM:SS
4979
+ * @param {string} [endDate] YYYY-MM-DDTHH:MM:SS
4369
4980
  * @param {*} [options] Override http request option.
4370
4981
  * @throws {RequiredError}
4371
4982
  * @memberof BillingApi
4372
4983
  */
4373
- getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options) {
4374
- return BillingApiFp(this.configuration).getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
4984
+ getImageGenerationHistoryForResource(resourceId, startDate, endDate, options) {
4985
+ return BillingApiFp(this.configuration).getImageGenerationHistoryForResource(resourceId, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
4375
4986
  }
4376
4987
  /**
4377
4988
  * Retrieve the previous day\'s costs for instances, volumes, and clusters. Returns a breakdown of the costs and the total cost for the last day. For additional information on Retrieve Previous Day Usage Costs, [**click here**](None/docs/api-reference/billing-resources/last-day-usage/)
@@ -8005,6 +8616,246 @@ export class DeploymentApi extends BaseAPI {
8005
8616
  return DeploymentApiFp(this.configuration).startDeployment(payload, options).then((request) => request(this.axios, this.basePath));
8006
8617
  }
8007
8618
  }
8619
+ /**
8620
+ * EmailOptInOutApi - axios parameter creator
8621
+ * @export
8622
+ */
8623
+ export const EmailOptInOutApiAxiosParamCreator = function (configuration) {
8624
+ return {
8625
+ /**
8626
+ * Returns all email categories with the user\'s opt-in status. Categories without an explicit preference default to opted_in=true.
8627
+ * @summary Get all email preferences for the authenticated user
8628
+ * @param {*} [options] Override http request option.
8629
+ * @throws {RequiredError}
8630
+ */
8631
+ getEmailPreferencesForAUser: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
8632
+ const localVarPath = `/auth/email/opt-out`;
8633
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8634
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8635
+ let baseOptions;
8636
+ if (configuration) {
8637
+ baseOptions = configuration.baseOptions;
8638
+ }
8639
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
8640
+ const localVarHeaderParameter = {};
8641
+ const localVarQueryParameter = {};
8642
+ // authentication apiKey required
8643
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
8644
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8645
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8646
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
8647
+ return {
8648
+ url: toPathString(localVarUrlObj),
8649
+ options: localVarRequestOptions,
8650
+ };
8651
+ }),
8652
+ /**
8653
+ * Sets opted_in to the given value for every non-required, non-deleted email category. Required categories are not affected.
8654
+ * @summary Toggle all optional email preferences for the authenticated user
8655
+ * @param {UpdateEmailPreferenceInput} payload
8656
+ * @param {*} [options] Override http request option.
8657
+ * @throws {RequiredError}
8658
+ */
8659
+ toggleAllOptionalEmailPreferencesForTheUser: (payload_1, ...args_1) => __awaiter(this, [payload_1, ...args_1], void 0, function* (payload, options = {}) {
8660
+ // verify required parameter 'payload' is not null or undefined
8661
+ assertParamExists('toggleAllOptionalEmailPreferencesForTheUser', 'payload', payload);
8662
+ const localVarPath = `/auth/email/opt-out`;
8663
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8664
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8665
+ let baseOptions;
8666
+ if (configuration) {
8667
+ baseOptions = configuration.baseOptions;
8668
+ }
8669
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
8670
+ const localVarHeaderParameter = {};
8671
+ const localVarQueryParameter = {};
8672
+ // authentication apiKey required
8673
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
8674
+ localVarHeaderParameter['Content-Type'] = 'application/json';
8675
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8676
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8677
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
8678
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
8679
+ return {
8680
+ url: toPathString(localVarUrlObj),
8681
+ options: localVarRequestOptions,
8682
+ };
8683
+ }),
8684
+ /**
8685
+ * Updates the opted_in status for the given email category slug. If the slug belongs to a parent category (email_category_id is null), all non-deleted child categories are updated. If the slug belongs to a child category, only that category is updated.
8686
+ * @summary Update email preference opted_in status for a category slug
8687
+ * @param {string} slug
8688
+ * @param {UpdateEmailPreferenceInput} payload
8689
+ * @param {*} [options] Override http request option.
8690
+ * @throws {RequiredError}
8691
+ */
8692
+ updateEmailPreferenceForACategoryBySlug: (slug_1, payload_1, ...args_1) => __awaiter(this, [slug_1, payload_1, ...args_1], void 0, function* (slug, payload, options = {}) {
8693
+ // verify required parameter 'slug' is not null or undefined
8694
+ assertParamExists('updateEmailPreferenceForACategoryBySlug', 'slug', slug);
8695
+ // verify required parameter 'payload' is not null or undefined
8696
+ assertParamExists('updateEmailPreferenceForACategoryBySlug', 'payload', payload);
8697
+ const localVarPath = `/auth/email/opt-out/{slug}`
8698
+ .replace(`{${"slug"}}`, encodeURIComponent(String(slug)));
8699
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8700
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8701
+ let baseOptions;
8702
+ if (configuration) {
8703
+ baseOptions = configuration.baseOptions;
8704
+ }
8705
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
8706
+ const localVarHeaderParameter = {};
8707
+ const localVarQueryParameter = {};
8708
+ // authentication apiKey required
8709
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
8710
+ localVarHeaderParameter['Content-Type'] = 'application/json';
8711
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8712
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8713
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
8714
+ localVarRequestOptions.data = serializeDataIfNeeded(payload, localVarRequestOptions, configuration);
8715
+ return {
8716
+ url: toPathString(localVarUrlObj),
8717
+ options: localVarRequestOptions,
8718
+ };
8719
+ }),
8720
+ };
8721
+ };
8722
+ /**
8723
+ * EmailOptInOutApi - functional programming interface
8724
+ * @export
8725
+ */
8726
+ export const EmailOptInOutApiFp = function (configuration) {
8727
+ const localVarAxiosParamCreator = EmailOptInOutApiAxiosParamCreator(configuration);
8728
+ return {
8729
+ /**
8730
+ * Returns all email categories with the user\'s opt-in status. Categories without an explicit preference default to opted_in=true.
8731
+ * @summary Get all email preferences for the authenticated user
8732
+ * @param {*} [options] Override http request option.
8733
+ * @throws {RequiredError}
8734
+ */
8735
+ getEmailPreferencesForAUser(options) {
8736
+ return __awaiter(this, void 0, void 0, function* () {
8737
+ var _a, _b, _c;
8738
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getEmailPreferencesForAUser(options);
8739
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8740
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['EmailOptInOutApi.getEmailPreferencesForAUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8741
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8742
+ });
8743
+ },
8744
+ /**
8745
+ * Sets opted_in to the given value for every non-required, non-deleted email category. Required categories are not affected.
8746
+ * @summary Toggle all optional email preferences for the authenticated user
8747
+ * @param {UpdateEmailPreferenceInput} payload
8748
+ * @param {*} [options] Override http request option.
8749
+ * @throws {RequiredError}
8750
+ */
8751
+ toggleAllOptionalEmailPreferencesForTheUser(payload, options) {
8752
+ return __awaiter(this, void 0, void 0, function* () {
8753
+ var _a, _b, _c;
8754
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.toggleAllOptionalEmailPreferencesForTheUser(payload, options);
8755
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8756
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['EmailOptInOutApi.toggleAllOptionalEmailPreferencesForTheUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8757
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8758
+ });
8759
+ },
8760
+ /**
8761
+ * Updates the opted_in status for the given email category slug. If the slug belongs to a parent category (email_category_id is null), all non-deleted child categories are updated. If the slug belongs to a child category, only that category is updated.
8762
+ * @summary Update email preference opted_in status for a category slug
8763
+ * @param {string} slug
8764
+ * @param {UpdateEmailPreferenceInput} payload
8765
+ * @param {*} [options] Override http request option.
8766
+ * @throws {RequiredError}
8767
+ */
8768
+ updateEmailPreferenceForACategoryBySlug(slug, payload, options) {
8769
+ return __awaiter(this, void 0, void 0, function* () {
8770
+ var _a, _b, _c;
8771
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateEmailPreferenceForACategoryBySlug(slug, payload, options);
8772
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
8773
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['EmailOptInOutApi.updateEmailPreferenceForACategoryBySlug']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
8774
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8775
+ });
8776
+ },
8777
+ };
8778
+ };
8779
+ /**
8780
+ * EmailOptInOutApi - factory interface
8781
+ * @export
8782
+ */
8783
+ export const EmailOptInOutApiFactory = function (configuration, basePath, axios) {
8784
+ const localVarFp = EmailOptInOutApiFp(configuration);
8785
+ return {
8786
+ /**
8787
+ * Returns all email categories with the user\'s opt-in status. Categories without an explicit preference default to opted_in=true.
8788
+ * @summary Get all email preferences for the authenticated user
8789
+ * @param {*} [options] Override http request option.
8790
+ * @throws {RequiredError}
8791
+ */
8792
+ getEmailPreferencesForAUser(options) {
8793
+ return localVarFp.getEmailPreferencesForAUser(options).then((request) => request(axios, basePath));
8794
+ },
8795
+ /**
8796
+ * Sets opted_in to the given value for every non-required, non-deleted email category. Required categories are not affected.
8797
+ * @summary Toggle all optional email preferences for the authenticated user
8798
+ * @param {UpdateEmailPreferenceInput} payload
8799
+ * @param {*} [options] Override http request option.
8800
+ * @throws {RequiredError}
8801
+ */
8802
+ toggleAllOptionalEmailPreferencesForTheUser(payload, options) {
8803
+ return localVarFp.toggleAllOptionalEmailPreferencesForTheUser(payload, options).then((request) => request(axios, basePath));
8804
+ },
8805
+ /**
8806
+ * Updates the opted_in status for the given email category slug. If the slug belongs to a parent category (email_category_id is null), all non-deleted child categories are updated. If the slug belongs to a child category, only that category is updated.
8807
+ * @summary Update email preference opted_in status for a category slug
8808
+ * @param {string} slug
8809
+ * @param {UpdateEmailPreferenceInput} payload
8810
+ * @param {*} [options] Override http request option.
8811
+ * @throws {RequiredError}
8812
+ */
8813
+ updateEmailPreferenceForACategoryBySlug(slug, payload, options) {
8814
+ return localVarFp.updateEmailPreferenceForACategoryBySlug(slug, payload, options).then((request) => request(axios, basePath));
8815
+ },
8816
+ };
8817
+ };
8818
+ /**
8819
+ * EmailOptInOutApi - object-oriented interface
8820
+ * @export
8821
+ * @class EmailOptInOutApi
8822
+ * @extends {BaseAPI}
8823
+ */
8824
+ export class EmailOptInOutApi extends BaseAPI {
8825
+ /**
8826
+ * Returns all email categories with the user\'s opt-in status. Categories without an explicit preference default to opted_in=true.
8827
+ * @summary Get all email preferences for the authenticated user
8828
+ * @param {*} [options] Override http request option.
8829
+ * @throws {RequiredError}
8830
+ * @memberof EmailOptInOutApi
8831
+ */
8832
+ getEmailPreferencesForAUser(options) {
8833
+ return EmailOptInOutApiFp(this.configuration).getEmailPreferencesForAUser(options).then((request) => request(this.axios, this.basePath));
8834
+ }
8835
+ /**
8836
+ * Sets opted_in to the given value for every non-required, non-deleted email category. Required categories are not affected.
8837
+ * @summary Toggle all optional email preferences for the authenticated user
8838
+ * @param {UpdateEmailPreferenceInput} payload
8839
+ * @param {*} [options] Override http request option.
8840
+ * @throws {RequiredError}
8841
+ * @memberof EmailOptInOutApi
8842
+ */
8843
+ toggleAllOptionalEmailPreferencesForTheUser(payload, options) {
8844
+ return EmailOptInOutApiFp(this.configuration).toggleAllOptionalEmailPreferencesForTheUser(payload, options).then((request) => request(this.axios, this.basePath));
8845
+ }
8846
+ /**
8847
+ * Updates the opted_in status for the given email category slug. If the slug belongs to a parent category (email_category_id is null), all non-deleted child categories are updated. If the slug belongs to a child category, only that category is updated.
8848
+ * @summary Update email preference opted_in status for a category slug
8849
+ * @param {string} slug
8850
+ * @param {UpdateEmailPreferenceInput} payload
8851
+ * @param {*} [options] Override http request option.
8852
+ * @throws {RequiredError}
8853
+ * @memberof EmailOptInOutApi
8854
+ */
8855
+ updateEmailPreferenceForACategoryBySlug(slug, payload, options) {
8856
+ return EmailOptInOutApiFp(this.configuration).updateEmailPreferenceForACategoryBySlug(slug, payload, options).then((request) => request(this.axios, this.basePath));
8857
+ }
8858
+ }
8008
8859
  /**
8009
8860
  * EnvironmentApi - axios parameter creator
8010
8861
  * @export
@@ -10436,6 +11287,33 @@ export const KeypairApiAxiosParamCreator = function (configuration) {
10436
11287
  options: localVarRequestOptions,
10437
11288
  };
10438
11289
  }),
11290
+ /**
11291
+ * Retrieves the SSH public key types supported for import.
11292
+ * @summary List supported key pair types
11293
+ * @param {*} [options] Override http request option.
11294
+ * @throws {RequiredError}
11295
+ */
11296
+ listSupportedKeyPairTypes: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
11297
+ const localVarPath = `/core/supported-keypairs`;
11298
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
11299
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
11300
+ let baseOptions;
11301
+ if (configuration) {
11302
+ baseOptions = configuration.baseOptions;
11303
+ }
11304
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
11305
+ const localVarHeaderParameter = {};
11306
+ const localVarQueryParameter = {};
11307
+ // authentication apiKey required
11308
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
11309
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
11310
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
11311
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
11312
+ return {
11313
+ url: toPathString(localVarUrlObj),
11314
+ options: localVarRequestOptions,
11315
+ };
11316
+ }),
10439
11317
  /**
10440
11318
  * Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
10441
11319
  * @summary Update key pair name
@@ -10531,6 +11409,21 @@ export const KeypairApiFp = function (configuration) {
10531
11409
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
10532
11410
  });
10533
11411
  },
11412
+ /**
11413
+ * Retrieves the SSH public key types supported for import.
11414
+ * @summary List supported key pair types
11415
+ * @param {*} [options] Override http request option.
11416
+ * @throws {RequiredError}
11417
+ */
11418
+ listSupportedKeyPairTypes(options) {
11419
+ return __awaiter(this, void 0, void 0, function* () {
11420
+ var _a, _b, _c;
11421
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listSupportedKeyPairTypes(options);
11422
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
11423
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['KeypairApi.listSupportedKeyPairTypes']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
11424
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
11425
+ });
11426
+ },
10534
11427
  /**
10535
11428
  * Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
10536
11429
  * @summary Update key pair name
@@ -10589,6 +11482,15 @@ export const KeypairApiFactory = function (configuration, basePath, axios) {
10589
11482
  listKeyPairs(page, pageSize, search, options) {
10590
11483
  return localVarFp.listKeyPairs(page, pageSize, search, options).then((request) => request(axios, basePath));
10591
11484
  },
11485
+ /**
11486
+ * Retrieves the SSH public key types supported for import.
11487
+ * @summary List supported key pair types
11488
+ * @param {*} [options] Override http request option.
11489
+ * @throws {RequiredError}
11490
+ */
11491
+ listSupportedKeyPairTypes(options) {
11492
+ return localVarFp.listSupportedKeyPairTypes(options).then((request) => request(axios, basePath));
11493
+ },
10592
11494
  /**
10593
11495
  * Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
10594
11496
  * @summary Update key pair name
@@ -10644,6 +11546,16 @@ export class KeypairApi extends BaseAPI {
10644
11546
  listKeyPairs(page, pageSize, search, options) {
10645
11547
  return KeypairApiFp(this.configuration).listKeyPairs(page, pageSize, search, options).then((request) => request(this.axios, this.basePath));
10646
11548
  }
11549
+ /**
11550
+ * Retrieves the SSH public key types supported for import.
11551
+ * @summary List supported key pair types
11552
+ * @param {*} [options] Override http request option.
11553
+ * @throws {RequiredError}
11554
+ * @memberof KeypairApi
11555
+ */
11556
+ listSupportedKeyPairTypes(options) {
11557
+ return KeypairApiFp(this.configuration).listSupportedKeyPairTypes(options).then((request) => request(this.axios, this.basePath));
11558
+ }
10647
11559
  /**
10648
11560
  * Updates the name of a specified key pair. Provide the key pair ID in the path, and include the new `name` in the request body.
10649
11561
  * @summary Update key pair name
@@ -13644,6 +14556,33 @@ export const UserApiAxiosParamCreator = function (configuration) {
13644
14556
  options: localVarRequestOptions,
13645
14557
  };
13646
14558
  }),
14559
+ /**
14560
+ * Retrieve the list of allowed ISO 3166-1 alpha-2 country codes that can be used for billing information.
14561
+ * @summary GET: Retrieve allowed country codes
14562
+ * @param {*} [options] Override http request option.
14563
+ * @throws {RequiredError}
14564
+ */
14565
+ getAllowedCountryCodes: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
14566
+ const localVarPath = `/billing/user/countries`;
14567
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
14568
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
14569
+ let baseOptions;
14570
+ if (configuration) {
14571
+ baseOptions = configuration.baseOptions;
14572
+ }
14573
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
14574
+ const localVarHeaderParameter = {};
14575
+ const localVarQueryParameter = {};
14576
+ // authentication apiKey required
14577
+ yield setApiKeyToObject(localVarHeaderParameter, "api_key", configuration);
14578
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
14579
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
14580
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
14581
+ return {
14582
+ url: toPathString(localVarUrlObj),
14583
+ options: localVarRequestOptions,
14584
+ };
14585
+ }),
13647
14586
  /**
13648
14587
  * Retrieve the billing details associated with your user.
13649
14588
  * @summary GET: Retrieve billing info
@@ -13728,6 +14667,21 @@ export const UserApiFp = function (configuration) {
13728
14667
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
13729
14668
  });
13730
14669
  },
14670
+ /**
14671
+ * Retrieve the list of allowed ISO 3166-1 alpha-2 country codes that can be used for billing information.
14672
+ * @summary GET: Retrieve allowed country codes
14673
+ * @param {*} [options] Override http request option.
14674
+ * @throws {RequiredError}
14675
+ */
14676
+ getAllowedCountryCodes(options) {
14677
+ return __awaiter(this, void 0, void 0, function* () {
14678
+ var _a, _b, _c;
14679
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllowedCountryCodes(options);
14680
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
14681
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserApi.getAllowedCountryCodes']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
14682
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
14683
+ });
14684
+ },
13731
14685
  /**
13732
14686
  * Retrieve the billing details associated with your user.
13733
14687
  * @summary GET: Retrieve billing info
@@ -13778,6 +14732,15 @@ export const UserApiFactory = function (configuration, basePath, axios) {
13778
14732
  addUserBillingInfo(payload, options) {
13779
14733
  return localVarFp.addUserBillingInfo(payload, options).then((request) => request(axios, basePath));
13780
14734
  },
14735
+ /**
14736
+ * Retrieve the list of allowed ISO 3166-1 alpha-2 country codes that can be used for billing information.
14737
+ * @summary GET: Retrieve allowed country codes
14738
+ * @param {*} [options] Override http request option.
14739
+ * @throws {RequiredError}
14740
+ */
14741
+ getAllowedCountryCodes(options) {
14742
+ return localVarFp.getAllowedCountryCodes(options).then((request) => request(axios, basePath));
14743
+ },
13781
14744
  /**
13782
14745
  * Retrieve the billing details associated with your user.
13783
14746
  * @summary GET: Retrieve billing info
@@ -13817,6 +14780,16 @@ export class UserApi extends BaseAPI {
13817
14780
  addUserBillingInfo(payload, options) {
13818
14781
  return UserApiFp(this.configuration).addUserBillingInfo(payload, options).then((request) => request(this.axios, this.basePath));
13819
14782
  }
14783
+ /**
14784
+ * Retrieve the list of allowed ISO 3166-1 alpha-2 country codes that can be used for billing information.
14785
+ * @summary GET: Retrieve allowed country codes
14786
+ * @param {*} [options] Override http request option.
14787
+ * @throws {RequiredError}
14788
+ * @memberof UserApi
14789
+ */
14790
+ getAllowedCountryCodes(options) {
14791
+ return UserApiFp(this.configuration).getAllowedCountryCodes(options).then((request) => request(this.axios, this.basePath));
14792
+ }
13820
14793
  /**
13821
14794
  * Retrieve the billing details associated with your user.
13822
14795
  * @summary GET: Retrieve billing info