cloreai 0.1.0 → 0.1.1
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/build/WebAPI.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type AxiosInstance } from 'axios';
|
|
2
2
|
import { type WebOptions } from './types/options.js';
|
|
3
3
|
import { type WebCreateOrderBody, type WebCreateOrderOutput } from './types/webapi/createOrder.js';
|
|
4
|
+
import { type WebMarketplaceOrdersBody, type WebMarketplaceOrdersOutput } from './types/webapi/marketplaceOrders.js';
|
|
4
5
|
import { type WebMarketplaceServersOutput } from './types/webapi/marketplaceServers.js';
|
|
5
6
|
export declare class WebAPI {
|
|
6
7
|
readonly api: AxiosInstance;
|
|
7
8
|
constructor(options: WebOptions);
|
|
8
9
|
marketplaceServers(): Promise<WebMarketplaceServersOutput>;
|
|
10
|
+
marketplaceOrders(body: WebMarketplaceOrdersBody): Promise<WebMarketplaceOrdersOutput>;
|
|
9
11
|
createOrder(body: WebCreateOrderBody): Promise<WebCreateOrderOutput>;
|
|
10
12
|
}
|
package/build/WebAPI.js
CHANGED
|
@@ -33,6 +33,10 @@ export class WebAPI {
|
|
|
33
33
|
const response = await this.api.post('/marketplace/servers');
|
|
34
34
|
return response.data;
|
|
35
35
|
}
|
|
36
|
+
async marketplaceOrders(body) {
|
|
37
|
+
const response = await this.api.post('/marketplace/orders', body);
|
|
38
|
+
return response.data;
|
|
39
|
+
}
|
|
36
40
|
async createOrder(body) {
|
|
37
41
|
const response = await this.api.post('/create_order', body);
|
|
38
42
|
return response.data;
|
package/build/index.d.ts
CHANGED
|
@@ -15,5 +15,6 @@ export * from './types/common.js';
|
|
|
15
15
|
export * from './types/options.js';
|
|
16
16
|
export * from './types/output.js';
|
|
17
17
|
export * from './types/webapi/createOrder.js';
|
|
18
|
+
export * from './types/webapi/marketplaceOrders.js';
|
|
18
19
|
export * from './types/webapi/marketplaceServers.js';
|
|
19
20
|
export * from './WebAPI.js';
|
package/build/index.js
CHANGED
|
@@ -15,5 +15,6 @@ export * from './types/common.js';
|
|
|
15
15
|
export * from './types/options.js';
|
|
16
16
|
export * from './types/output.js';
|
|
17
17
|
export * from './types/webapi/createOrder.js';
|
|
18
|
+
export * from './types/webapi/marketplaceOrders.js';
|
|
18
19
|
export * from './types/webapi/marketplaceServers.js';
|
|
19
20
|
export * from './WebAPI.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type Currency, type Price, type Specs } from '../common.js';
|
|
2
|
+
import { type WebOutput } from '../output.js';
|
|
3
|
+
export interface WebMarketplaceOrdersBody {
|
|
4
|
+
rc: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface WebMarketplaceOrdersOrder {
|
|
7
|
+
id: number;
|
|
8
|
+
fee: number;
|
|
9
|
+
creation_fee: number;
|
|
10
|
+
price: number;
|
|
11
|
+
mrl: number;
|
|
12
|
+
image: string;
|
|
13
|
+
currency: Currency;
|
|
14
|
+
spend: number;
|
|
15
|
+
ct: number;
|
|
16
|
+
p: number;
|
|
17
|
+
specs: Specs;
|
|
18
|
+
si: number;
|
|
19
|
+
mon_container: number;
|
|
20
|
+
online: boolean;
|
|
21
|
+
spot: boolean;
|
|
22
|
+
pub_cluster: string[];
|
|
23
|
+
tcp_ports: string[];
|
|
24
|
+
http_port: string;
|
|
25
|
+
}
|
|
26
|
+
export interface WebMarketplaceOrdersOutput extends WebOutput {
|
|
27
|
+
orders: WebMarketplaceOrdersOrder[];
|
|
28
|
+
ol: number;
|
|
29
|
+
eo: boolean;
|
|
30
|
+
http_endpoint_by_proxy: Record<string, string>;
|
|
31
|
+
PoH_rates: Record<string, Record<string, Price>>;
|
|
32
|
+
PoH_active: boolean;
|
|
33
|
+
allowed_features: string[];
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|