@longvansoftware/service-js-client 1.4.4 → 1.4.5
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/src/graphql/cloud/queries.d.ts +1 -0
- package/dist/src/graphql/cloud/queries.js +9 -1
- package/dist/src/graphql/computing/queries.js +15 -2
- package/dist/src/lib/cloud/index.d.ts +1 -0
- package/dist/src/lib/cloud/index.js +16 -0
- package/dist/src/lib/computing/index.d.ts +2 -2
- package/dist/src/lib/computing/index.js +4 -2
- package/package.json +1 -1
| @@ -6,3 +6,4 @@ export declare const SEARCH_SERVICE: import("graphql").DocumentNode; | |
| 6 6 | 
             
            export declare const GET_PRODUCTS_OF_SERVICE: import("graphql").DocumentNode;
         | 
| 7 7 | 
             
            export declare const GET_IPS_OF_SERVICE: import("graphql").DocumentNode;
         | 
| 8 8 | 
             
            export declare const GET_SERVICES_BY_ORDER_ID: import("graphql").DocumentNode;
         | 
| 9 | 
            +
            export declare const CHECK_DOMAIN_NAME_AVAILABLE: import("graphql").DocumentNode;
         | 
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            "use strict";
         | 
| 2 2 | 
             
            Object.defineProperty(exports, "__esModule", { value: true });
         | 
| 3 | 
            -
            exports.GET_SERVICES_BY_ORDER_ID = exports.GET_IPS_OF_SERVICE = exports.GET_PRODUCTS_OF_SERVICE = exports.SEARCH_SERVICE = exports.SERVICE_TYPE = exports.GET_USER_MAIL_HOSTING = exports.GET_MAIL_RESOURCE = exports.SERVICE_DETAIL = void 0;
         | 
| 3 | 
            +
            exports.CHECK_DOMAIN_NAME_AVAILABLE = exports.GET_SERVICES_BY_ORDER_ID = exports.GET_IPS_OF_SERVICE = exports.GET_PRODUCTS_OF_SERVICE = exports.SEARCH_SERVICE = exports.SERVICE_TYPE = exports.GET_USER_MAIL_HOSTING = exports.GET_MAIL_RESOURCE = exports.SERVICE_DETAIL = void 0;
         | 
| 4 4 | 
             
            const graphql_tag_1 = require("graphql-tag");
         | 
| 5 5 | 
             
            exports.SERVICE_DETAIL = (0, graphql_tag_1.gql) `
         | 
| 6 6 | 
             
              query ServiceDetail($serviceId: String) {
         | 
| @@ -160,3 +160,11 @@ exports.GET_SERVICES_BY_ORDER_ID = (0, graphql_tag_1.gql) ` | |
| 160 160 | 
             
                }
         | 
| 161 161 | 
             
              }
         | 
| 162 162 | 
             
            `;
         | 
| 163 | 
            +
            exports.CHECK_DOMAIN_NAME_AVAILABLE = (0, graphql_tag_1.gql) `
         | 
| 164 | 
            +
              query CheckDomainNameAvailable($domainName: String!) {
         | 
| 165 | 
            +
                checkDomainNameAvailable(domainName: $domainName) {
         | 
| 166 | 
            +
                  domainName
         | 
| 167 | 
            +
                  isAvailable
         | 
| 168 | 
            +
                }
         | 
| 169 | 
            +
              }
         | 
| 170 | 
            +
            `;
         | 
| @@ -22,6 +22,7 @@ exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) ` | |
| 22 22 | 
             
                  protocolConnect
         | 
| 23 23 | 
             
                  lastBackup
         | 
| 24 24 | 
             
                  backupSequence
         | 
| 25 | 
            +
                  platform
         | 
| 25 26 | 
             
                }
         | 
| 26 27 | 
             
              }
         | 
| 27 28 | 
             
            `;
         | 
| @@ -63,8 +64,16 @@ exports.RAM_USAGE_START_TIME = (0, graphql_tag_1.gql) ` | |
| 63 64 | 
             
              }
         | 
| 64 65 | 
             
            `;
         | 
| 65 66 | 
             
            exports.CPU_USAGE_START_TIME = (0, graphql_tag_1.gql) `
         | 
| 66 | 
            -
              query CpuUsageStartTime( | 
| 67 | 
            -
                 | 
| 67 | 
            +
              query CpuUsageStartTime(
         | 
| 68 | 
            +
                $computingId: String!
         | 
| 69 | 
            +
                $startTime: String!
         | 
| 70 | 
            +
                $type: String
         | 
| 71 | 
            +
              ) {
         | 
| 72 | 
            +
                cpuUsageStartTime(
         | 
| 73 | 
            +
                  computingId: $computingId
         | 
| 74 | 
            +
                  startTime: $startTime
         | 
| 75 | 
            +
                  type: $type
         | 
| 76 | 
            +
                ) {
         | 
| 68 77 | 
             
                  time
         | 
| 69 78 | 
             
                  value
         | 
| 70 79 | 
             
                }
         | 
| @@ -123,9 +132,11 @@ exports.CPU_USAGE_DATE_RANGE = (0, graphql_tag_1.gql) ` | |
| 123 132 | 
             
                $computingId: String!
         | 
| 124 133 | 
             
                $fromDate: DateCustom!
         | 
| 125 134 | 
             
                $toDate: DateCustom!
         | 
| 135 | 
            +
                $type: String
         | 
| 126 136 | 
             
              ) {
         | 
| 127 137 | 
             
                cpuUsageDateRange(
         | 
| 128 138 | 
             
                  computingId: $computingId
         | 
| 139 | 
            +
                  type: $type
         | 
| 129 140 | 
             
                  fromDate: $fromDate
         | 
| 130 141 | 
             
                  toDate: $toDate
         | 
| 131 142 | 
             
                ) {
         | 
| @@ -207,6 +218,7 @@ exports.GET_COMPUTINGS = (0, graphql_tag_1.gql) ` | |
| 207 218 | 
             
                  serviceId
         | 
| 208 219 | 
             
                  status
         | 
| 209 220 | 
             
                  statusDetail
         | 
| 221 | 
            +
                  platform
         | 
| 210 222 | 
             
                }
         | 
| 211 223 | 
             
              }
         | 
| 212 224 | 
             
            `;
         | 
| @@ -303,6 +315,7 @@ exports.GET_COMPUTING_BY_SERVICE = (0, graphql_tag_1.gql) ` | |
| 303 315 | 
             
                  serviceId
         | 
| 304 316 | 
             
                  status
         | 
| 305 317 | 
             
                  statusDetail
         | 
| 318 | 
            +
                  platform
         | 
| 306 319 | 
             
                }
         | 
| 307 320 | 
             
              }
         | 
| 308 321 | 
             
            `;
         | 
| @@ -26,4 +26,5 @@ export declare class CloudService extends Service { | |
| 26 26 | 
             
                getProductsOfService(serviceId: string): Promise<any>;
         | 
| 27 27 | 
             
                getIpsOfService(serviceId: string): Promise<any>;
         | 
| 28 28 | 
             
                getServicesByOrderId(orderId: string): Promise<any>;
         | 
| 29 | 
            +
                checkDomainNameAvailable(domainName: string): Promise<any>;
         | 
| 29 30 | 
             
            }
         | 
| @@ -295,5 +295,21 @@ class CloudService extends serviceSDK_1.Service { | |
| 295 295 | 
             
                        }
         | 
| 296 296 | 
             
                    });
         | 
| 297 297 | 
             
                }
         | 
| 298 | 
            +
                checkDomainNameAvailable(domainName) {
         | 
| 299 | 
            +
                    return __awaiter(this, void 0, void 0, function* () {
         | 
| 300 | 
            +
                        const query = queries_1.CHECK_DOMAIN_NAME_AVAILABLE;
         | 
| 301 | 
            +
                        const variables = {
         | 
| 302 | 
            +
                            domainName,
         | 
| 303 | 
            +
                        };
         | 
| 304 | 
            +
                        try {
         | 
| 305 | 
            +
                            const response = yield this.graphqlQueryV2(query, variables);
         | 
| 306 | 
            +
                            return response.checkDomainNameAvailable;
         | 
| 307 | 
            +
                        }
         | 
| 308 | 
            +
                        catch (error) {
         | 
| 309 | 
            +
                            console.log(`Error in checkDomainNameAvailable: ${error}`);
         | 
| 310 | 
            +
                            throw error;
         | 
| 311 | 
            +
                        }
         | 
| 312 | 
            +
                    });
         | 
| 313 | 
            +
                }
         | 
| 298 314 | 
             
            }
         | 
| 299 315 | 
             
            exports.CloudService = CloudService;
         | 
| @@ -24,9 +24,9 @@ export declare class ComputingService extends Service { | |
| 24 24 | 
             
                rollbackSnapshot(payload: RollBackSnapShot, createBy: string): Promise<any>;
         | 
| 25 25 | 
             
                deleteSnapshot(payload: RollBackSnapShot, updateBy: string): Promise<any>;
         | 
| 26 26 | 
             
                ramUsageStartTime(computingId: string, startTime: string): Promise<any>;
         | 
| 27 | 
            -
                cpuUsageStartTime(computingId: string, startTime: string): Promise<any>;
         | 
| 27 | 
            +
                cpuUsageStartTime(computingId: string, startTime: string, type: string): Promise<any>;
         | 
| 28 28 | 
             
                ramUsageDateRange(computingId: string, fromDate: any, toDate: any): Promise<any>;
         | 
| 29 | 
            -
                cpuUsageDateRange(computingId: string, fromDate: any, toDate: any): Promise<any>;
         | 
| 29 | 
            +
                cpuUsageDateRange(computingId: string, fromDate: any, toDate: any, type: string): Promise<any>;
         | 
| 30 30 | 
             
                backupPoint(computingId: string): Promise<any>;
         | 
| 31 31 | 
             
                networkUsageDateRange(computingId: string, type: string, fromDate: any, toDate: any): Promise<any>;
         | 
| 32 32 | 
             
                diskUsageDateRange(computingId: string, type: string, fromDate: any, toDate: any): Promise<any>;
         | 
| @@ -270,12 +270,13 @@ class ComputingService extends serviceSDK_1.Service { | |
| 270 270 | 
             
                        }
         | 
| 271 271 | 
             
                    });
         | 
| 272 272 | 
             
                }
         | 
| 273 | 
            -
                cpuUsageStartTime(computingId, startTime) {
         | 
| 273 | 
            +
                cpuUsageStartTime(computingId, startTime, type) {
         | 
| 274 274 | 
             
                    return __awaiter(this, void 0, void 0, function* () {
         | 
| 275 275 | 
             
                        const query = queries_1.CPU_USAGE_START_TIME;
         | 
| 276 276 | 
             
                        const variables = {
         | 
| 277 277 | 
             
                            computingId,
         | 
| 278 278 | 
             
                            startTime,
         | 
| 279 | 
            +
                            type,
         | 
| 279 280 | 
             
                        };
         | 
| 280 281 | 
             
                        try {
         | 
| 281 282 | 
             
                            const response = yield this.graphqlQueryV2(query, variables);
         | 
| @@ -305,13 +306,14 @@ class ComputingService extends serviceSDK_1.Service { | |
| 305 306 | 
             
                        }
         | 
| 306 307 | 
             
                    });
         | 
| 307 308 | 
             
                }
         | 
| 308 | 
            -
                cpuUsageDateRange(computingId, fromDate, toDate) {
         | 
| 309 | 
            +
                cpuUsageDateRange(computingId, fromDate, toDate, type) {
         | 
| 309 310 | 
             
                    return __awaiter(this, void 0, void 0, function* () {
         | 
| 310 311 | 
             
                        const query = queries_1.CPU_USAGE_DATE_RANGE;
         | 
| 311 312 | 
             
                        const variables = {
         | 
| 312 313 | 
             
                            computingId,
         | 
| 313 314 | 
             
                            fromDate,
         | 
| 314 315 | 
             
                            toDate,
         | 
| 316 | 
            +
                            type,
         | 
| 315 317 | 
             
                        };
         | 
| 316 318 | 
             
                        try {
         | 
| 317 319 | 
             
                            const response = yield this.graphqlQueryV2(query, variables);
         |