@longvansoftware/service-js-client 1.9.0 → 1.9.2
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/computing/mutations.d.ts +1 -0
- package/dist/src/graphql/computing/mutations.js +28 -1
- package/dist/src/graphql/computing/queries.d.ts +2 -0
- package/dist/src/graphql/computing/queries.js +29 -1
- package/dist/src/graphql/orderGraphQL/mutations.d.ts +1 -0
- package/dist/src/graphql/orderGraphQL/mutations.js +16 -1
- package/dist/src/lib/computing/index.d.ts +3 -0
- package/dist/src/lib/computing/index.js +46 -0
- package/dist/src/lib/orderGraphQL/index.d.ts +1 -0
- package/dist/src/lib/orderGraphQL/index.js +19 -0
- package/package.json +1 -1
@@ -12,3 +12,4 @@ export declare const CREATE_CLUSTER: import("graphql").DocumentNode;
|
|
12
12
|
export declare const ADD_COMPUTING_IN_CLUSTER: import("graphql").DocumentNode;
|
13
13
|
export declare const REMOVE_COMPUTING_IN_CLUSTER: import("graphql").DocumentNode;
|
14
14
|
export declare const STOP_USE_COMPUTING: import("graphql").DocumentNode;
|
15
|
+
export declare const ADD_PORT_NAT: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
|
3
|
+
exports.ADD_PORT_NAT = exports.STOP_USE_COMPUTING = exports.REMOVE_COMPUTING_IN_CLUSTER = exports.ADD_COMPUTING_IN_CLUSTER = exports.CREATE_CLUSTER = exports.DELETE_SNAPSHOT = exports.ROLLBACK_SNAPSHOT = exports.CREATE_SNAP_SHOT = exports.POWER_OFF = exports.POWER_ON = exports.REMOVE_PORT_NAT = exports.UPDATE_PORT_NAT = exports.CREATE_PORT_NAT = exports.UPDATE_DESCRIPTION_PORTNAT = exports.RESTARTVM = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.RESTARTVM = (0, graphql_tag_1.gql) `
|
6
6
|
mutation Restart($computingId: String!, $actor: String!) {
|
@@ -181,3 +181,30 @@ exports.STOP_USE_COMPUTING = (0, graphql_tag_1.gql) `
|
|
181
181
|
}
|
182
182
|
}
|
183
183
|
`;
|
184
|
+
exports.ADD_PORT_NAT = (0, graphql_tag_1.gql) `
|
185
|
+
mutation AddPortNat(
|
186
|
+
$edgeId: String!
|
187
|
+
$serviceId: String
|
188
|
+
$computingId: String
|
189
|
+
$originalAddress: String!
|
190
|
+
$originalPort: String!
|
191
|
+
$translatedAddress: String!
|
192
|
+
$translatedPort: String!
|
193
|
+
$action: String!
|
194
|
+
$description: String
|
195
|
+
$createBy: String
|
196
|
+
) {
|
197
|
+
addPortNat(
|
198
|
+
edgeId: $edgeId
|
199
|
+
serviceId: $serviceId
|
200
|
+
computingId: $computingId
|
201
|
+
originalAddress: $originalAddress
|
202
|
+
originalPort: $originalPort
|
203
|
+
translatedAddress: $translatedAddress
|
204
|
+
translatedPort: $translatedPort
|
205
|
+
action: $action
|
206
|
+
description: $description
|
207
|
+
createBy: $createBy
|
208
|
+
)
|
209
|
+
}
|
210
|
+
`;
|
@@ -16,3 +16,5 @@ export declare const GET_CLUSTERS: import("graphql").DocumentNode;
|
|
16
16
|
export declare const GET_CLUSTER: import("graphql").DocumentNode;
|
17
17
|
export declare const GET_COMPUTING_BY_CLUSTER: import("graphql").DocumentNode;
|
18
18
|
export declare const GET_COMPUTING_BY_SERVICE: import("graphql").DocumentNode;
|
19
|
+
export declare const GET_EDGES: import("graphql").DocumentNode;
|
20
|
+
export declare const GET_PORT_NATS_BY_SERVICE_ID: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_COMPUTING_BY_SERVICE = exports.GET_COMPUTING_BY_CLUSTER = exports.GET_CLUSTER = exports.GET_CLUSTERS = exports.GET_LAB_INSTANCE = exports.GET_COMPUTINGS = exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
|
3
|
+
exports.GET_PORT_NATS_BY_SERVICE_ID = exports.GET_EDGES = exports.GET_COMPUTING_BY_SERVICE = exports.GET_COMPUTING_BY_CLUSTER = exports.GET_CLUSTER = exports.GET_CLUSTERS = exports.GET_LAB_INSTANCE = exports.GET_COMPUTINGS = exports.BACKUP_POINT = exports.DISK_USAGE_DATE_RANGE = exports.NETWORK_USAGE_DATE_RANGE = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.DISK_USAGE_START_TIME = exports.NETWORK_USAGE_START_TIME = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) `
|
6
6
|
query ComputingDetail($computingId: String!) {
|
@@ -379,3 +379,31 @@ exports.GET_COMPUTING_BY_SERVICE = (0, graphql_tag_1.gql) `
|
|
379
379
|
}
|
380
380
|
}
|
381
381
|
`;
|
382
|
+
exports.GET_EDGES = (0, graphql_tag_1.gql) `
|
383
|
+
query getEdges($serviceId: String!) {
|
384
|
+
getEdges(serviceId: $serviceId) {
|
385
|
+
id
|
386
|
+
name
|
387
|
+
status
|
388
|
+
partnerId
|
389
|
+
createdStamp
|
390
|
+
description
|
391
|
+
}
|
392
|
+
}
|
393
|
+
`;
|
394
|
+
exports.GET_PORT_NATS_BY_SERVICE_ID = (0, graphql_tag_1.gql) `
|
395
|
+
query getPortNatsByServiceId($serviceId: String!) {
|
396
|
+
getPortNatsByServiceId(serviceId: $serviceId) {
|
397
|
+
id
|
398
|
+
action
|
399
|
+
protocol
|
400
|
+
originalAddress
|
401
|
+
originalPort
|
402
|
+
translatedAddress
|
403
|
+
translatedPort
|
404
|
+
description
|
405
|
+
status
|
406
|
+
domain
|
407
|
+
}
|
408
|
+
}
|
409
|
+
`;
|
@@ -1,3 +1,4 @@
|
|
1
1
|
export declare const CREATE_ORDER: import("graphql").DocumentNode;
|
2
2
|
export declare const UPDATE_QUANTITY_V2: import("graphql").DocumentNode;
|
3
3
|
export declare const ADD_TO_CART: import("graphql").DocumentNode;
|
4
|
+
export declare const REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.ADD_TO_CART = exports.UPDATE_QUANTITY_V2 = exports.CREATE_ORDER = void 0;
|
3
|
+
exports.REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM = exports.ADD_TO_CART = exports.UPDATE_QUANTITY_V2 = exports.CREATE_ORDER = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.CREATE_ORDER = (0, graphql_tag_1.gql) `
|
6
6
|
mutation CreateOrder($input: CreateOrderInput!) {
|
@@ -342,3 +342,18 @@ exports.ADD_TO_CART = (0, graphql_tag_1.gql) `
|
|
342
342
|
}
|
343
343
|
}
|
344
344
|
`;
|
345
|
+
exports.REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM = (0, graphql_tag_1.gql) `
|
346
|
+
mutation RemoveProductOptionOrderLineItem(
|
347
|
+
$partnerId: String!
|
348
|
+
$orderLineItemId: String!
|
349
|
+
$optionId: String!
|
350
|
+
$updateBy: String!
|
351
|
+
) {
|
352
|
+
removeProductOptionOrderLineItem(
|
353
|
+
partnerId: $partnerId
|
354
|
+
orderLineItemId: $orderLineItemId
|
355
|
+
optionId: $optionId
|
356
|
+
updateBy: $updateBy
|
357
|
+
)
|
358
|
+
}
|
359
|
+
`;
|
@@ -42,4 +42,7 @@ export declare class ComputingService extends Service {
|
|
42
42
|
getComputingByCluster(clusterId: string): Promise<any>;
|
43
43
|
getComputingByService(serviceId: string): Promise<any>;
|
44
44
|
stopUseComputing(computingId: string, userId: string): Promise<any>;
|
45
|
+
getEdges(serviceId: string): Promise<any>;
|
46
|
+
addPortNat(data: any): Promise<any>;
|
47
|
+
getPortNatsByServiceId(serviceId: any): Promise<any>;
|
45
48
|
}
|
@@ -583,5 +583,51 @@ class ComputingService extends serviceSDK_1.Service {
|
|
583
583
|
}
|
584
584
|
});
|
585
585
|
}
|
586
|
+
getEdges(serviceId) {
|
587
|
+
return __awaiter(this, void 0, void 0, function* () {
|
588
|
+
const query = queries_1.GET_EDGES;
|
589
|
+
const variables = {
|
590
|
+
serviceId
|
591
|
+
};
|
592
|
+
try {
|
593
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
594
|
+
return response.getEdges;
|
595
|
+
}
|
596
|
+
catch (error) {
|
597
|
+
console.log(`Error fetching get getEdges method: ${error}`);
|
598
|
+
throw error;
|
599
|
+
}
|
600
|
+
});
|
601
|
+
}
|
602
|
+
addPortNat(data) {
|
603
|
+
return __awaiter(this, void 0, void 0, function* () {
|
604
|
+
const mutation = mutations_1.ADD_PORT_NAT;
|
605
|
+
const variables = Object.assign({}, data);
|
606
|
+
try {
|
607
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
608
|
+
return response.addPortNat;
|
609
|
+
}
|
610
|
+
catch (error) {
|
611
|
+
console.log(`Error fetching get addPortNat method: ${error}`);
|
612
|
+
throw error;
|
613
|
+
}
|
614
|
+
});
|
615
|
+
}
|
616
|
+
getPortNatsByServiceId(serviceId) {
|
617
|
+
return __awaiter(this, void 0, void 0, function* () {
|
618
|
+
const query = queries_1.GET_PORT_NATS_BY_SERVICE_ID;
|
619
|
+
const variables = {
|
620
|
+
serviceId
|
621
|
+
};
|
622
|
+
try {
|
623
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
624
|
+
return response.getPortNatsByServiceId;
|
625
|
+
}
|
626
|
+
catch (error) {
|
627
|
+
console.log(`Error fetching get getPortNatsByServiceId method: ${error}`);
|
628
|
+
throw error;
|
629
|
+
}
|
630
|
+
});
|
631
|
+
}
|
586
632
|
}
|
587
633
|
exports.ComputingService = ComputingService;
|
@@ -9,4 +9,5 @@ export declare class OrderGraphQLService extends Service {
|
|
9
9
|
getOrderLineItemByServiceId(serviceId: string): Promise<any>;
|
10
10
|
getOrderByServiceId(serviceId: string): Promise<any>;
|
11
11
|
addToCart(serviceId: string, actorId: string, cartId: string): Promise<any>;
|
12
|
+
removeProductOptionOrderLineItem(orderLineItemId: string, optionId: string, updateBy: string): Promise<any>;
|
12
13
|
}
|
@@ -120,5 +120,24 @@ class OrderGraphQLService extends serviceSDK_1.Service {
|
|
120
120
|
}
|
121
121
|
});
|
122
122
|
}
|
123
|
+
removeProductOptionOrderLineItem(orderLineItemId, optionId, updateBy) {
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
125
|
+
const mutation = mutations_1.REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM;
|
126
|
+
const variables = {
|
127
|
+
partnerId: this.orgId,
|
128
|
+
orderLineItemId,
|
129
|
+
optionId,
|
130
|
+
updateBy
|
131
|
+
};
|
132
|
+
try {
|
133
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
134
|
+
return response.removeProductOptionOrderLineItem;
|
135
|
+
}
|
136
|
+
catch (error) {
|
137
|
+
console.log(`Error in removeProductOptionOrderLineItem: ${error}`);
|
138
|
+
throw error;
|
139
|
+
}
|
140
|
+
});
|
141
|
+
}
|
123
142
|
}
|
124
143
|
exports.OrderGraphQLService = OrderGraphQLService;
|