cloreai 1.0.1 → 3.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 (56) hide show
  1. package/README.md +78 -65
  2. package/build/{CloreAI.d.ts → Cloreai.d.ts} +26 -18
  3. package/build/{CloreAI.js → Cloreai.js} +41 -49
  4. package/build/CloreaiError.d.ts +12 -0
  5. package/build/CloreaiError.js +16 -0
  6. package/build/Gigaspot.d.ts +7 -7
  7. package/build/Gigaspot.js +10 -10
  8. package/build/constants.d.ts +20 -6
  9. package/build/constants.js +18 -4
  10. package/build/getQueueOptions.d.ts +3 -0
  11. package/build/getQueueOptions.js +8 -0
  12. package/build/index.d.ts +22 -20
  13. package/build/index.js +5 -4
  14. package/build/{endpoints → resources}/cancelOrder.d.ts +1 -1
  15. package/build/{endpoints → resources}/cancelOrders.d.ts +1 -1
  16. package/build/{endpoints → resources}/createGigaspotOrders.d.ts +4 -11
  17. package/build/{endpoints → resources}/createOrder.d.ts +5 -5
  18. package/build/resources/editGigaspotOrders.d.ts +12 -0
  19. package/build/{endpoints → resources}/getGigaspot.d.ts +8 -8
  20. package/build/{endpoints → resources}/marketplace.d.ts +4 -5
  21. package/build/{endpoints → resources}/myOrders.d.ts +6 -7
  22. package/build/resources/myServers.d.ts +16 -0
  23. package/build/{endpoints → resources}/pohBalance.d.ts +7 -7
  24. package/build/resources/renterFees.d.ts +22 -0
  25. package/build/{endpoints → resources}/serverConfig.d.ts +8 -5
  26. package/build/resources/setServerSettings.d.ts +18 -0
  27. package/build/resources/setSpotPrice.d.ts +15 -0
  28. package/build/{endpoints → resources}/spotMarketplace.d.ts +10 -10
  29. package/build/resources/spotMarketplace.js +1 -0
  30. package/build/{endpoints → resources}/wallets.d.ts +3 -3
  31. package/build/resources/wallets.js +1 -0
  32. package/build/types.d.ts +20 -25
  33. package/package.json +20 -20
  34. package/build/endpoints/editGigaspotOrders.d.ts +0 -19
  35. package/build/endpoints/myServers.d.ts +0 -15
  36. package/build/endpoints/setServerSettings.d.ts +0 -11
  37. package/build/endpoints/setSpotPrice.d.ts +0 -17
  38. package/build/endpoints/setSpotPrice.js +0 -2
  39. package/build/errors.d.ts +0 -22
  40. package/build/errors.js +0 -43
  41. package/build/helpers.d.ts +0 -19
  42. package/build/helpers.js +0 -29
  43. /package/build/{endpoints → resources}/cancelOrder.js +0 -0
  44. /package/build/{endpoints → resources}/cancelOrders.js +0 -0
  45. /package/build/{endpoints → resources}/createGigaspotOrders.js +0 -0
  46. /package/build/{endpoints → resources}/createOrder.js +0 -0
  47. /package/build/{endpoints → resources}/editGigaspotOrders.js +0 -0
  48. /package/build/{endpoints → resources}/getGigaspot.js +0 -0
  49. /package/build/{endpoints → resources}/marketplace.js +0 -0
  50. /package/build/{endpoints → resources}/myOrders.js +0 -0
  51. /package/build/{endpoints → resources}/myServers.js +0 -0
  52. /package/build/{endpoints → resources}/pohBalance.js +0 -0
  53. /package/build/{endpoints/serverConfig.js → resources/renterFees.js} +0 -0
  54. /package/build/{endpoints/setServerSettings.js → resources/serverConfig.js} +0 -0
  55. /package/build/{endpoints/spotMarketplace.js → resources/setServerSettings.js} +0 -0
  56. /package/build/{endpoints/wallets.js → resources/setSpotPrice.js} +0 -0
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,19 +0,0 @@
1
- import type { AxiosRequestConfig } from 'axios';
2
- import type { QueueAddOptions } from 'p-queue';
3
- export declare const statusCodes: {
4
- NORMAL: number;
5
- DATABASE_ERROR: number;
6
- INVALID_INPUT_DATA: number;
7
- INVALID_API_TOKEN: number;
8
- INVALID_ENDPOINT: number;
9
- EXCEEDED: number;
10
- OTHER: number;
11
- };
12
- export declare const priorityLevels: {
13
- NORMAL: number;
14
- HIGH: number;
15
- HIGHEST: number;
16
- };
17
- export declare function getQueueOptions(priority: number, config?: AxiosRequestConfig): QueueAddOptions & {
18
- throwOnTimeout: true;
19
- };
package/build/helpers.js DELETED
@@ -1,29 +0,0 @@
1
- export const statusCodes = {
2
- NORMAL: 0,
3
- DATABASE_ERROR: 1,
4
- INVALID_INPUT_DATA: 2,
5
- INVALID_API_TOKEN: 3,
6
- INVALID_ENDPOINT: 4,
7
- EXCEEDED: 5,
8
- OTHER: 6,
9
- };
10
- export const priorityLevels = {
11
- NORMAL: 0,
12
- HIGH: 1,
13
- HIGHEST: 2,
14
- };
15
- export function getQueueOptions(priority, config) {
16
- const defaultQueueOptions = {
17
- throwOnTimeout: true,
18
- priority,
19
- };
20
- // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
21
- const signal = config?.signal;
22
- if (signal == null) {
23
- return defaultQueueOptions;
24
- }
25
- return {
26
- ...defaultQueueOptions,
27
- signal,
28
- };
29
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes