cloreai 2.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +111 -75
  2. package/dist/Cloreai.d.ts +42 -0
  3. package/dist/Cloreai.js +267 -0
  4. package/dist/CloreaiError.d.ts +17 -0
  5. package/dist/CloreaiError.js +13 -0
  6. package/dist/Gigaspot.d.ts +14 -0
  7. package/dist/Gigaspot.js +74 -0
  8. package/dist/constants.d.ts +20 -0
  9. package/{build → dist}/constants.js +8 -9
  10. package/dist/index.d.ts +22 -0
  11. package/dist/index.js +5 -0
  12. package/{build → dist}/resources/cancelOrder.d.ts +1 -1
  13. package/{build → dist}/resources/cancelOrders.d.ts +1 -1
  14. package/{build → dist}/resources/createGigaspotOrders.d.ts +4 -11
  15. package/{build → dist}/resources/createOrder.d.ts +10 -10
  16. package/dist/resources/editGigaspotOrders.d.ts +12 -0
  17. package/{build → dist}/resources/getGigaspot.d.ts +27 -27
  18. package/{build → dist}/resources/marketplace.d.ts +5 -6
  19. package/{build → dist}/resources/myOrders.d.ts +6 -7
  20. package/dist/resources/myServers.d.ts +16 -0
  21. package/{build → dist}/resources/pohBalance.d.ts +18 -18
  22. package/dist/resources/renterFees.d.ts +22 -0
  23. package/{build → dist}/resources/serverConfig.d.ts +14 -11
  24. package/dist/resources/setServerSettings.d.ts +18 -0
  25. package/dist/resources/setSpotPrice.d.ts +15 -0
  26. package/{build → dist}/resources/spotMarketplace.d.ts +15 -15
  27. package/{build → dist}/resources/wallets.d.ts +5 -5
  28. package/dist/resources/wallets.js +1 -0
  29. package/{build → dist}/types.d.ts +18 -22
  30. package/dist/types.js +1 -0
  31. package/package.json +23 -24
  32. package/build/CloreAI.d.ts +0 -34
  33. package/build/CloreAI.js +0 -133
  34. package/build/Gigaspot.d.ts +0 -17
  35. package/build/Gigaspot.js +0 -46
  36. package/build/constants.d.ts +0 -21
  37. package/build/errors.d.ts +0 -22
  38. package/build/errors.js +0 -43
  39. package/build/getQueueOptions.d.ts +0 -5
  40. package/build/getQueueOptions.js +0 -15
  41. package/build/index.d.ts +0 -20
  42. package/build/index.js +0 -4
  43. package/build/resources/editGigaspotOrders.d.ts +0 -19
  44. package/build/resources/myServers.d.ts +0 -15
  45. package/build/resources/setServerSettings.d.ts +0 -11
  46. package/build/resources/setSpotPrice.d.ts +0 -17
  47. package/build/resources/setSpotPrice.js +0 -2
  48. /package/{build → dist}/resources/cancelOrder.js +0 -0
  49. /package/{build → dist}/resources/cancelOrders.js +0 -0
  50. /package/{build → dist}/resources/createGigaspotOrders.js +0 -0
  51. /package/{build → dist}/resources/createOrder.js +0 -0
  52. /package/{build → dist}/resources/editGigaspotOrders.js +0 -0
  53. /package/{build → dist}/resources/getGigaspot.js +0 -0
  54. /package/{build → dist}/resources/marketplace.js +0 -0
  55. /package/{build → dist}/resources/myOrders.js +0 -0
  56. /package/{build → dist}/resources/myServers.js +0 -0
  57. /package/{build → dist}/resources/pohBalance.js +0 -0
  58. /package/{build/resources/serverConfig.js → dist/resources/renterFees.js} +0 -0
  59. /package/{build/resources/setServerSettings.js → dist/resources/serverConfig.js} +0 -0
  60. /package/{build/resources/spotMarketplace.js → dist/resources/setServerSettings.js} +0 -0
  61. /package/{build/resources/wallets.js → dist/resources/setSpotPrice.js} +0 -0
  62. /package/{build/types.js → dist/resources/spotMarketplace.js} +0 -0
package/package.json CHANGED
@@ -1,45 +1,44 @@
1
1
  {
2
2
  "name": "cloreai",
3
- "version": "2.0.0",
4
- "type": "module",
3
+ "version": "4.0.0",
5
4
  "description": "CLORE.AI API client",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/vladpuz/cloreai.git"
9
- },
10
- "author": "Vladislav Puzyrev",
11
- "license": "MIT",
12
- "main": "build/index.js",
13
- "types": "build/index.d.ts",
14
5
  "keywords": [
15
6
  "cloreai",
16
7
  "clore",
17
8
  "api"
18
9
  ],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/vladpuz/cloreai.git"
13
+ },
14
+ "license": "MIT",
15
+ "author": "Vladislav Puzyrev",
16
+ "type": "module",
17
+ "main": "dist/index.js",
18
+ "types": "dist/index.d.ts",
19
19
  "scripts": {
20
- "build": "tsc --project tsconfig.build.json",
20
+ "build": "rimraf dist && tsc --project tsconfig.build.json",
21
21
  "check": "npm run typecheck && npm run lint && npm run format",
22
- "clean": "rimraf build",
23
22
  "format": "prettier --check .",
24
23
  "lint": "eslint .",
25
- "prepack": "npm run clean && npm run build && npm run check",
24
+ "prepack": "npm run build && npm run check",
26
25
  "prepare": "husky",
27
26
  "typecheck": "tsc --noEmit"
28
27
  },
29
28
  "dependencies": {
30
- "axios": "^1.10.0",
31
- "p-queue": "^8.1.0"
29
+ "p-queue": "^9.1.2"
32
30
  },
33
31
  "devDependencies": {
34
- "@tsconfig/node-lts": "^22.0.2",
35
- "@tsconfig/strictest": "^2.0.5",
36
- "@types/node": "^24.0.12",
37
- "eslint": "^9.30.1",
38
- "eslint-config-vladpuz": "^2.0.2",
32
+ "@tsconfig/node-lts": "^24.0.0",
33
+ "@tsconfig/node-ts": "^23.6.4",
34
+ "@tsconfig/strictest": "^2.0.8",
35
+ "@types/node": "^25.6.0",
36
+ "eslint": "^10.2.0",
37
+ "eslint-config-vladpuz": "^4.0.1",
39
38
  "husky": "^9.1.7",
40
- "prettier": "^3.6.2",
41
- "prettier-config-vladpuz": "^1.0.2",
42
- "rimraf": "^6.0.1",
43
- "typescript": "^5.8.3"
39
+ "prettier": "^3.8.2",
40
+ "prettier-config-vladpuz": "^3.0.0",
41
+ "rimraf": "^6.1.3",
42
+ "typescript": "^6.0.2"
44
43
  }
45
44
  }
@@ -1,34 +0,0 @@
1
- import { type AxiosInstance, type AxiosRequestConfig } from 'axios';
2
- import PQueue from 'p-queue';
3
- import type { CancelOrderRequestData, CancelOrderResponseData } from './resources/cancelOrder.js';
4
- import type { CreateOrderRequestData, CreateOrderResponseData } from './resources/createOrder.js';
5
- import type { MarketplaceResponseData } from './resources/marketplace.js';
6
- import type { MyOrdersRequestParams, MyOrdersResponseData } from './resources/myOrders.js';
7
- import type { MyServersResponseData } from './resources/myServers.js';
8
- import type { PohBalanceResponseData } from './resources/pohBalance.js';
9
- import type { ServerConfigRequestData, ServerConfigResponseData } from './resources/serverConfig.js';
10
- import type { SetServerSettingsRequestData, SetServerSettingsResponseData } from './resources/setServerSettings.js';
11
- import type { SetSpotPriceRequestData, SetSpotPriceResponseData } from './resources/setSpotPrice.js';
12
- import type { SpotMarketplaceRequestParams, SpotMarketplaceResponseData } from './resources/spotMarketplace.js';
13
- import type { WalletsResponseData } from './resources/wallets.js';
14
- import type { Options } from './types.js';
15
- import Gigaspot from './Gigaspot.js';
16
- declare class CloreAI {
17
- axios: AxiosInstance;
18
- queue: PQueue;
19
- queueCreateOrder: PQueue;
20
- gigaspot: Gigaspot;
21
- constructor(apiKey: string, options?: Options);
22
- wallets(config?: AxiosRequestConfig): Promise<WalletsResponseData>;
23
- myServers(config?: AxiosRequestConfig): Promise<MyServersResponseData>;
24
- serverConfig(data: ServerConfigRequestData, config?: AxiosRequestConfig): Promise<ServerConfigResponseData>;
25
- marketplace(config?: AxiosRequestConfig): Promise<MarketplaceResponseData>;
26
- myOrders(params?: MyOrdersRequestParams, config?: AxiosRequestConfig): Promise<MyOrdersResponseData>;
27
- spotMarketplace(params: SpotMarketplaceRequestParams, config?: AxiosRequestConfig): Promise<SpotMarketplaceResponseData>;
28
- setServerSettings(data: SetServerSettingsRequestData, config?: AxiosRequestConfig): Promise<SetServerSettingsResponseData>;
29
- setSpotPrice(data: SetSpotPriceRequestData, config?: AxiosRequestConfig): Promise<SetSpotPriceResponseData>;
30
- cancelOrder(data: CancelOrderRequestData, config?: AxiosRequestConfig): Promise<CancelOrderResponseData>;
31
- createOrder(data: CreateOrderRequestData, config?: AxiosRequestConfig): Promise<CreateOrderResponseData>;
32
- pohBalance(config?: AxiosRequestConfig): Promise<PohBalanceResponseData>;
33
- }
34
- export default CloreAI;
package/build/CloreAI.js DELETED
@@ -1,133 +0,0 @@
1
- import axios from 'axios';
2
- import PQueue from 'p-queue';
3
- import { priorityLevels, RATE_LIMIT, RATE_LIMIT_CREATE_ORDER, statusCodes } from './constants.js';
4
- import { DatabaseError, ExceededError, InvalidApiTokenError, InvalidEndpointError, InvalidInputDataError, OtherError, UnknownError } from './errors.js';
5
- import { getQueueOptions } from './getQueueOptions.js';
6
- import Gigaspot from './Gigaspot.js';
7
- class CloreAI {
8
- axios;
9
- queue;
10
- queueCreateOrder;
11
- gigaspot;
12
- constructor(apiKey, options = {}) {
13
- this.queue = new PQueue({
14
- interval: RATE_LIMIT,
15
- intervalCap: 1,
16
- concurrency: 1,
17
- ...options.queueOptions,
18
- });
19
- this.queueCreateOrder = new PQueue({
20
- interval: RATE_LIMIT_CREATE_ORDER,
21
- intervalCap: 1,
22
- concurrency: 1,
23
- ...options.queueOptionsCreateOrder,
24
- });
25
- this.axios = axios.create({
26
- ...options.axiosOptions,
27
- baseURL: 'https://api.clore.ai/v1',
28
- });
29
- this.axios.interceptors.request.use((request) => {
30
- request.headers.set('auth', apiKey);
31
- return request;
32
- });
33
- this.axios.interceptors.response.use((response) => {
34
- if (response.data.code === statusCodes.NORMAL) {
35
- return response;
36
- }
37
- const errorMessage = response.data.error != null
38
- ? `Code "${response.data.code}", error "${response.data.error}"`
39
- : `Code "${response.data.code}"`;
40
- const axiosErrorParameters = [
41
- errorMessage,
42
- undefined,
43
- response.config,
44
- response.request,
45
- response,
46
- ];
47
- switch (response.data.code) {
48
- case statusCodes.DATABASE_ERROR:
49
- throw new DatabaseError(...axiosErrorParameters);
50
- case statusCodes.INVALID_INPUT_DATA:
51
- throw new InvalidInputDataError(...axiosErrorParameters);
52
- case statusCodes.INVALID_API_TOKEN:
53
- throw new InvalidApiTokenError(...axiosErrorParameters);
54
- case statusCodes.INVALID_ENDPOINT:
55
- throw new InvalidEndpointError(...axiosErrorParameters);
56
- case statusCodes.EXCEEDED:
57
- throw new ExceededError(...axiosErrorParameters);
58
- case statusCodes.OTHER:
59
- throw new OtherError(...axiosErrorParameters);
60
- default:
61
- throw new UnknownError(...axiosErrorParameters);
62
- }
63
- });
64
- this.gigaspot = new Gigaspot(options, this.axios);
65
- }
66
- async wallets(config) {
67
- const response = await this.queue.add(async () => {
68
- return await this.axios.get('/wallets', config);
69
- }, getQueueOptions(priorityLevels.NORMAL, config));
70
- return response.data;
71
- }
72
- async myServers(config) {
73
- const response = await this.queue.add(async () => {
74
- return await this.axios.get('/my_servers', config);
75
- }, getQueueOptions(priorityLevels.NORMAL, config));
76
- return response.data;
77
- }
78
- async serverConfig(data, config) {
79
- const response = await this.queue.add(async () => {
80
- return await this.axios.get('/server_config', { ...config, data });
81
- }, getQueueOptions(priorityLevels.NORMAL, config));
82
- return response.data;
83
- }
84
- async marketplace(config) {
85
- const response = await this.queue.add(async () => {
86
- return await this.axios.get('/marketplace', config);
87
- }, getQueueOptions(priorityLevels.NORMAL, config));
88
- return response.data;
89
- }
90
- async myOrders(params, config) {
91
- const response = await this.queue.add(async () => {
92
- return await this.axios.get('/my_orders', { ...config, params });
93
- }, getQueueOptions(priorityLevels.NORMAL, config));
94
- return response.data;
95
- }
96
- async spotMarketplace(params, config) {
97
- const response = await this.queue.add(async () => {
98
- return await this.axios.get('/spot_marketplace', { ...config, params });
99
- }, getQueueOptions(priorityLevels.NORMAL, config));
100
- return response.data;
101
- }
102
- async setServerSettings(data, config) {
103
- const response = await this.queue.add(async () => {
104
- return await this.axios.post('/set_server_settings', data, config);
105
- }, getQueueOptions(priorityLevels.HIGH, config));
106
- return response.data;
107
- }
108
- async setSpotPrice(data, config) {
109
- const response = await this.queue.add(async () => {
110
- return await this.axios.post('/set_spot_price', data, config);
111
- }, getQueueOptions(priorityLevels.HIGH, config));
112
- return response.data;
113
- }
114
- async cancelOrder(data, config) {
115
- const response = await this.queue.add(async () => {
116
- return await this.axios.post('/cancel_order', data, config);
117
- }, getQueueOptions(priorityLevels.HIGH, config));
118
- return response.data;
119
- }
120
- async createOrder(data, config) {
121
- const response = await this.queueCreateOrder.add(async () => {
122
- return await this.axios.post('/create_order', data, config);
123
- }, getQueueOptions(priorityLevels.HIGHEST, config));
124
- return response.data;
125
- }
126
- async pohBalance(config) {
127
- const response = await this.queue.add(async () => {
128
- return await this.axios.get('/poh_balance', config);
129
- }, getQueueOptions(priorityLevels.NORMAL, config));
130
- return response.data;
131
- }
132
- }
133
- export default CloreAI;
@@ -1,17 +0,0 @@
1
- import { type AxiosInstance, type AxiosRequestConfig } from 'axios';
2
- import PQueue from 'p-queue';
3
- import type { CancelOrdersRequestData, CancelOrdersResponseData } from './resources/cancelOrders.js';
4
- import type { CreateGigaspotOrdersRequestData, CreateGigaspotOrdersResponseData } from './resources/createGigaspotOrders.js';
5
- import type { EditGigaspotOrdersRequestData, EditGigaspotOrdersResponseData } from './resources/editGigaspotOrders.js';
6
- import type { GetGigaspotResponseData } from './resources/getGigaspot.js';
7
- import type { Options } from './types.js';
8
- declare class Gigaspot {
9
- queue: PQueue;
10
- private axios;
11
- constructor(options: Options, axios: AxiosInstance);
12
- getGigaspot(config?: AxiosRequestConfig): Promise<GetGigaspotResponseData>;
13
- createGigaspotOrders(data: CreateGigaspotOrdersRequestData, config?: AxiosRequestConfig): Promise<CreateGigaspotOrdersResponseData>;
14
- editGigaspotOrders(data: EditGigaspotOrdersRequestData, config?: AxiosRequestConfig): Promise<EditGigaspotOrdersResponseData>;
15
- cancelOrders(data: CancelOrdersRequestData, config?: AxiosRequestConfig): Promise<CancelOrdersResponseData>;
16
- }
17
- export default Gigaspot;
package/build/Gigaspot.js DELETED
@@ -1,46 +0,0 @@
1
- import axios from 'axios';
2
- import PQueue from 'p-queue';
3
- import { priorityLevels, RATE_LIMIT_GIGASPOT } from './constants.js';
4
- import { getQueueOptions } from './getQueueOptions.js';
5
- class Gigaspot {
6
- queue;
7
- axios;
8
- constructor(options, axios) {
9
- this.queue = new PQueue({
10
- interval: RATE_LIMIT_GIGASPOT,
11
- intervalCap: 1,
12
- concurrency: 1,
13
- ...options.queueOptionsGigaspot,
14
- });
15
- this.axios = axios;
16
- }
17
- async getGigaspot(config) {
18
- return await this.queue.add(async () => {
19
- const response = await this.axios.get('/get_gigaspot', config);
20
- const snapshot = await axios.get(response.data.v1_snapshot_url);
21
- return {
22
- ...response.data,
23
- snapshot: snapshot.data,
24
- };
25
- }, getQueueOptions(priorityLevels.NORMAL, config));
26
- }
27
- async createGigaspotOrders(data, config) {
28
- const response = await this.queue.add(async () => {
29
- return await this.axios.post('/create_gigaspot_orders', data, config);
30
- }, getQueueOptions(priorityLevels.HIGH, config));
31
- return response.data;
32
- }
33
- async editGigaspotOrders(data, config) {
34
- const response = await this.queue.add(async () => {
35
- return await this.axios.post('/edit_gigaspot_orders', data, config);
36
- }, getQueueOptions(priorityLevels.HIGH, config));
37
- return response.data;
38
- }
39
- async cancelOrders(data, config) {
40
- const response = await this.queue.add(async () => {
41
- return await this.axios.post('/cancel_orders', data, config);
42
- }, getQueueOptions(priorityLevels.HIGH, config));
43
- return response.data;
44
- }
45
- }
46
- export default Gigaspot;
@@ -1,21 +0,0 @@
1
- export declare const RATE_LIMIT = 1800;
2
- export declare const RATE_LIMIT_CREATE_ORDER = 5000;
3
- export declare const RATE_LIMIT_GIGASPOT = 1800;
4
- export declare const gigaspotBaseImages: {
5
- UBUNTU: string;
6
- HIVEOS: string;
7
- };
8
- export declare const statusCodes: {
9
- NORMAL: number;
10
- DATABASE_ERROR: number;
11
- INVALID_INPUT_DATA: number;
12
- INVALID_API_TOKEN: number;
13
- INVALID_ENDPOINT: number;
14
- EXCEEDED: number;
15
- OTHER: number;
16
- };
17
- export declare const priorityLevels: {
18
- NORMAL: number;
19
- HIGH: number;
20
- HIGHEST: number;
21
- };
package/build/errors.d.ts DELETED
@@ -1,22 +0,0 @@
1
- import { AxiosError } from 'axios';
2
- export declare class DatabaseError extends AxiosError {
3
- constructor(...args: ConstructorParameters<typeof AxiosError>);
4
- }
5
- export declare class InvalidInputDataError extends AxiosError {
6
- constructor(...args: ConstructorParameters<typeof AxiosError>);
7
- }
8
- export declare class InvalidApiTokenError extends AxiosError {
9
- constructor(...args: ConstructorParameters<typeof AxiosError>);
10
- }
11
- export declare class InvalidEndpointError extends AxiosError {
12
- constructor(...args: ConstructorParameters<typeof AxiosError>);
13
- }
14
- export declare class ExceededError extends AxiosError {
15
- constructor(...args: ConstructorParameters<typeof AxiosError>);
16
- }
17
- export declare class OtherError extends AxiosError {
18
- constructor(...args: ConstructorParameters<typeof AxiosError>);
19
- }
20
- export declare class UnknownError extends AxiosError {
21
- constructor(...args: ConstructorParameters<typeof AxiosError>);
22
- }
package/build/errors.js DELETED
@@ -1,43 +0,0 @@
1
- import { AxiosError } from 'axios';
2
- export class DatabaseError extends AxiosError {
3
- constructor(...args) {
4
- super(...args);
5
- this.name = 'DatabaseError';
6
- }
7
- }
8
- export class InvalidInputDataError extends AxiosError {
9
- constructor(...args) {
10
- super(...args);
11
- this.name = 'InvalidInputDataError';
12
- }
13
- }
14
- export class InvalidApiTokenError extends AxiosError {
15
- constructor(...args) {
16
- super(...args);
17
- this.name = 'InvalidApiTokenError';
18
- }
19
- }
20
- export class InvalidEndpointError extends AxiosError {
21
- constructor(...args) {
22
- super(...args);
23
- this.name = 'InvalidEndpointError';
24
- }
25
- }
26
- export class ExceededError extends AxiosError {
27
- constructor(...args) {
28
- super(...args);
29
- this.name = 'ExceededError';
30
- }
31
- }
32
- export class OtherError extends AxiosError {
33
- constructor(...args) {
34
- super(...args);
35
- this.name = 'OtherError';
36
- }
37
- }
38
- export class UnknownError extends AxiosError {
39
- constructor(...args) {
40
- super(...args);
41
- this.name = 'UnknownError';
42
- }
43
- }
@@ -1,5 +0,0 @@
1
- import type { AxiosRequestConfig } from 'axios';
2
- import type { QueueAddOptions } from 'p-queue';
3
- export declare function getQueueOptions(priority: number, config?: AxiosRequestConfig): QueueAddOptions & {
4
- throwOnTimeout: true;
5
- };
@@ -1,15 +0,0 @@
1
- export function getQueueOptions(priority, config) {
2
- const defaultQueueOptions = {
3
- throwOnTimeout: true,
4
- priority,
5
- };
6
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
7
- const signal = config?.signal;
8
- if (signal == null) {
9
- return defaultQueueOptions;
10
- }
11
- return {
12
- ...defaultQueueOptions,
13
- signal,
14
- };
15
- }
package/build/index.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import CloreAI from './CloreAI.js';
2
- export * from './constants.js';
3
- export * from './errors.js';
4
- export type * from './resources/cancelOrder.js';
5
- export type * from './resources/cancelOrders.js';
6
- export type * from './resources/createGigaspotOrders.js';
7
- export type * from './resources/createOrder.js';
8
- export type * from './resources/editGigaspotOrders.js';
9
- export type * from './resources/getGigaspot.js';
10
- export type * from './resources/marketplace.js';
11
- export type * from './resources/myOrders.js';
12
- export type * from './resources/myServers.js';
13
- export type * from './resources/pohBalance.js';
14
- export type * from './resources/serverConfig.js';
15
- export type * from './resources/setServerSettings.js';
16
- export type * from './resources/setSpotPrice.js';
17
- export type * from './resources/spotMarketplace.js';
18
- export type * from './resources/wallets.js';
19
- export type * from './types.js';
20
- export default CloreAI;
package/build/index.js DELETED
@@ -1,4 +0,0 @@
1
- import CloreAI from './CloreAI.js';
2
- export * from './constants.js';
3
- export * from './errors.js';
4
- export default CloreAI;
@@ -1,19 +0,0 @@
1
- import type { ResponseData } from '../types.js';
2
- export interface EditGigaspotOrdersRequestDataOrderOverclock {
3
- pl: number;
4
- core_offset?: number;
5
- mem_offset?: number;
6
- core_lock?: number;
7
- mem_lock?: number;
8
- }
9
- export interface EditGigaspotOrdersRequestDataOrder {
10
- order_id: number;
11
- price: number;
12
- oc: EditGigaspotOrdersRequestDataOrderOverclock[];
13
- }
14
- export type EditGigaspotOrdersRequestData = EditGigaspotOrdersRequestDataOrder[];
15
- export interface EditGigaspotOrdersResponseData extends ResponseData {
16
- success_to_update_ids: number[];
17
- failed_to_update_ids: number[];
18
- too_low_bid_ids: number[];
19
- }
@@ -1,15 +0,0 @@
1
- import type { Pricing, ResponseData, Specs, Visibility } from '../types.js';
2
- export interface MyServersResponseDataServer {
3
- name: string;
4
- connected: boolean;
5
- visibility: Visibility;
6
- pricing: Pricing;
7
- online: boolean;
8
- min_spot_pricing: Pricing;
9
- init_token: string;
10
- specs: Specs;
11
- }
12
- export interface MyServersResponseData extends ResponseData {
13
- servers: MyServersResponseDataServer[];
14
- limit: number;
15
- }
@@ -1,11 +0,0 @@
1
- import type { ResponseData } from '../types.js';
2
- export interface SetServerSettingsRequestData {
3
- 'name': string;
4
- 'availability': boolean;
5
- 'mrl': number;
6
- 'on_demand': number;
7
- 'spot': number;
8
- 'CLORE-Blockchain_on_demand': number;
9
- 'CLORE-Blockchain_spot': number;
10
- }
11
- export type SetServerSettingsResponseData = ResponseData;
@@ -1,17 +0,0 @@
1
- import type { ResponseData } from '../types.js';
2
- export interface SetSpotPriceRequestData {
3
- order_id: number;
4
- desired_price: number;
5
- }
6
- export interface SetSpotPriceResponseDataMaxStep extends ResponseData {
7
- error: 'exceeded_max_step';
8
- max_step: number;
9
- }
10
- export interface SetSpotPriceResponseDataTimeToLowering extends ResponseData {
11
- error: 'can_lower_every_600_seconds';
12
- time_to_lowering: number;
13
- }
14
- export interface SetSpotPriceResponseDataNormal extends ResponseData {
15
- error: null;
16
- }
17
- export type SetSpotPriceResponseData = SetSpotPriceResponseDataMaxStep | SetSpotPriceResponseDataTimeToLowering | SetSpotPriceResponseDataNormal;
@@ -1,2 +0,0 @@
1
- /* RequestData */
2
- export {};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes