@nexgencloud/hyperstack-sdk-typescript 1.52.0-alpha → 1.52.3-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
@@ -4373,6 +4944,46 @@ export class BillingApi extends BaseAPI {
4373
4944
  getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options) {
4374
4945
  return BillingApiFp(this.configuration).getFineTuningBillingHistoryGraph(resourceId, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
4375
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));
4974
+ }
4975
+ /**
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\'
4977
+ * @param {number} resourceId
4978
+ * @param {string} [startDate] YYYY-MM-DDTHH:MM:SS
4979
+ * @param {string} [endDate] YYYY-MM-DDTHH:MM:SS
4980
+ * @param {*} [options] Override http request option.
4981
+ * @throws {RequiredError}
4982
+ * @memberof BillingApi
4983
+ */
4984
+ getImageGenerationHistoryForResource(resourceId, startDate, endDate, options) {
4985
+ return BillingApiFp(this.configuration).getImageGenerationHistoryForResource(resourceId, startDate, endDate, options).then((request) => request(this.axios, this.basePath));
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/)
4378
4989
  * @summary GET: Last Day Cost
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexgencloud/hyperstack-sdk-typescript",
3
- "version": "v1.52.0-alpha",
3
+ "version": "v1.52.3-alpha",
4
4
  "description": "Leverage the Infrahub API and Hyperstack platform to easily create, manage, and scale powerful GPU virtual machines and their associated resources. Access this SDK to automate the deployment of your workloads and streamline your infrastructure management. To contribute, please raise an issue with a bug report, feature request, feedback, or general inquiry.",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {