@longvansoftware/service-js-client 1.2.6 → 1.2.7
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/auth/mutations.d.ts +2 -1
- package/dist/src/graphql/auth/mutations.js +36 -4
- package/dist/src/graphql/computing/queries.d.ts +4 -0
- package/dist/src/graphql/computing/queries.js +69 -1
- package/dist/src/graphql/paymentLV/queries.js +11 -2
- package/dist/src/lib/auth/index.d.ts +1 -0
- package/dist/src/lib/auth/index.js +16 -0
- package/dist/src/lib/computing/index.d.ts +4 -0
- package/dist/src/lib/computing/index.js +74 -0
- package/dist/src/lib/paymentLV/index.d.ts +1 -1
- package/dist/src/lib/paymentLV/index.js +2 -1
- package/package.json +1 -1
@@ -4,4 +4,5 @@ export declare const SEND_SMS_VERIFY_CODE_MUTATION: import("graphql").DocumentNo
|
|
4
4
|
export declare const VERIFY_CODE_MUTATION: import("graphql").DocumentNode;
|
5
5
|
export declare const RESET_PASSWORD_MUTATION: import("graphql").DocumentNode;
|
6
6
|
export declare const UPDATE_INFO_MUTATION: import("graphql").DocumentNode;
|
7
|
-
export declare const UPDATE_PASSWORD_MUTATION
|
7
|
+
export declare const UPDATE_PASSWORD_MUTATION: import("graphql").DocumentNode;
|
8
|
+
export declare const LOGIN_v2: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.UPDATE_PASSWORD_MUTATION = exports.UPDATE_INFO_MUTATION = exports.RESET_PASSWORD_MUTATION = exports.VERIFY_CODE_MUTATION = exports.SEND_SMS_VERIFY_CODE_MUTATION = exports.REGISTER_MUTATION = exports.LOGIN_MUTATION = void 0;
|
3
|
+
exports.LOGIN_v2 = exports.UPDATE_PASSWORD_MUTATION = exports.UPDATE_INFO_MUTATION = exports.RESET_PASSWORD_MUTATION = exports.VERIFY_CODE_MUTATION = exports.SEND_SMS_VERIFY_CODE_MUTATION = exports.REGISTER_MUTATION = exports.LOGIN_MUTATION = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.LOGIN_MUTATION = (0, graphql_tag_1.gql) `
|
6
6
|
mutation Login($loginRequest: LoginRequest!) {
|
@@ -92,8 +92,40 @@ exports.UPDATE_INFO_MUTATION = (0, graphql_tag_1.gql) `
|
|
92
92
|
}
|
93
93
|
}
|
94
94
|
`;
|
95
|
-
exports.UPDATE_PASSWORD_MUTATION = `
|
96
|
-
mutation UpdatePassword(
|
97
|
-
|
95
|
+
exports.UPDATE_PASSWORD_MUTATION = (0, graphql_tag_1.gql) `
|
96
|
+
mutation UpdatePassword(
|
97
|
+
$orgId: String!
|
98
|
+
$accessToken: String!
|
99
|
+
$currentPassword: String!
|
100
|
+
$newPassword: String!
|
101
|
+
) {
|
102
|
+
updatePassword(
|
103
|
+
orgId: $orgId
|
104
|
+
accessToken: $accessToken
|
105
|
+
currentPassword: $currentPassword
|
106
|
+
newPassword: $newPassword
|
107
|
+
)
|
108
|
+
}
|
109
|
+
`;
|
110
|
+
exports.LOGIN_v2 = (0, graphql_tag_1.gql) `
|
111
|
+
mutation LoginV2($loginRequest: LoginRequest!) {
|
112
|
+
loginV2(loginRequest: $loginRequest) {
|
113
|
+
partyId
|
114
|
+
orgId
|
115
|
+
fullName
|
116
|
+
email
|
117
|
+
phone
|
118
|
+
address
|
119
|
+
identityNumber
|
120
|
+
gender
|
121
|
+
birthDate
|
122
|
+
avatarUrl
|
123
|
+
accessToken
|
124
|
+
username
|
125
|
+
readyV2
|
126
|
+
orgPermissionsMap
|
127
|
+
orgPositionsMap
|
128
|
+
orgRolesMap
|
129
|
+
}
|
98
130
|
}
|
99
131
|
`;
|
@@ -3,6 +3,10 @@ export declare const PORTNATS: import("graphql").DocumentNode;
|
|
3
3
|
export declare const SNAP_SHOTS: import("graphql").DocumentNode;
|
4
4
|
export declare const RAM_USAGE_START_TIME: import("graphql").DocumentNode;
|
5
5
|
export declare const CPU_USAGE_START_TIME: import("graphql").DocumentNode;
|
6
|
+
export declare const NETWORK_USAGE_START_TIME: import("graphql").DocumentNode;
|
7
|
+
export declare const DISK_USAGE_START_TIME: import("graphql").DocumentNode;
|
6
8
|
export declare const RAM_USAGE_DATE_RANGE: import("graphql").DocumentNode;
|
7
9
|
export declare const CPU_USAGE_DATE_RANGE: import("graphql").DocumentNode;
|
10
|
+
export declare const NETWORK_USAGE_DATE_RANGE: import("graphql").DocumentNode;
|
11
|
+
export declare const DISK_USAGE_DATE_RANGE: import("graphql").DocumentNode;
|
8
12
|
export declare const BACKUP_POINT: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.BACKUP_POINT = exports.CPU_USAGE_DATE_RANGE = exports.RAM_USAGE_DATE_RANGE = exports.CPU_USAGE_START_TIME = exports.RAM_USAGE_START_TIME = exports.SNAP_SHOTS = exports.PORTNATS = exports.COMPUTING_DETAIL = void 0;
|
3
|
+
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!) {
|
@@ -68,6 +68,38 @@ exports.CPU_USAGE_START_TIME = (0, graphql_tag_1.gql) `
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
`;
|
71
|
+
exports.NETWORK_USAGE_START_TIME = (0, graphql_tag_1.gql) `
|
72
|
+
query NetworkUsageStartTime(
|
73
|
+
$computingId: String!
|
74
|
+
$type: String!
|
75
|
+
$startTime: String!
|
76
|
+
) {
|
77
|
+
networkUsageStartTime(
|
78
|
+
computingId: $computingId
|
79
|
+
type: $type
|
80
|
+
startTime: $startTime
|
81
|
+
) {
|
82
|
+
time
|
83
|
+
value
|
84
|
+
}
|
85
|
+
}
|
86
|
+
`;
|
87
|
+
exports.DISK_USAGE_START_TIME = (0, graphql_tag_1.gql) `
|
88
|
+
query DiskUsageStartTime(
|
89
|
+
$computingId: String!
|
90
|
+
$type: String!
|
91
|
+
$startTime: String!
|
92
|
+
) {
|
93
|
+
diskUsageStartTime(
|
94
|
+
computingId: $computingId
|
95
|
+
type: $type
|
96
|
+
startTime: $startTime
|
97
|
+
) {
|
98
|
+
time
|
99
|
+
value
|
100
|
+
}
|
101
|
+
}
|
102
|
+
`;
|
71
103
|
exports.RAM_USAGE_DATE_RANGE = (0, graphql_tag_1.gql) `
|
72
104
|
query RamUsageDateRange(
|
73
105
|
$computingId: String!
|
@@ -100,6 +132,42 @@ exports.CPU_USAGE_DATE_RANGE = (0, graphql_tag_1.gql) `
|
|
100
132
|
}
|
101
133
|
}
|
102
134
|
`;
|
135
|
+
exports.NETWORK_USAGE_DATE_RANGE = (0, graphql_tag_1.gql) `
|
136
|
+
query NetworkUsageDateRange(
|
137
|
+
$computingId: String!
|
138
|
+
$type: String!
|
139
|
+
$fromDate: DateCustom!
|
140
|
+
$toDate: DateCustom!
|
141
|
+
) {
|
142
|
+
networkUsageDateRange(
|
143
|
+
computingId: $computingId
|
144
|
+
type: $type
|
145
|
+
fromDate: $fromDate
|
146
|
+
toDate: $toDate
|
147
|
+
) {
|
148
|
+
time
|
149
|
+
value
|
150
|
+
}
|
151
|
+
}
|
152
|
+
`;
|
153
|
+
exports.DISK_USAGE_DATE_RANGE = (0, graphql_tag_1.gql) `
|
154
|
+
query DiskUsageDateRange(
|
155
|
+
$computingId: String!
|
156
|
+
$type: String!
|
157
|
+
$fromDate: DateCustom!
|
158
|
+
$toDate: DateCustom!
|
159
|
+
) {
|
160
|
+
diskUsageDateRange(
|
161
|
+
computingId: $computingId
|
162
|
+
type: $type
|
163
|
+
fromDate: $fromDate
|
164
|
+
toDate: $toDate
|
165
|
+
) {
|
166
|
+
time
|
167
|
+
value
|
168
|
+
}
|
169
|
+
}
|
170
|
+
`;
|
103
171
|
exports.BACKUP_POINT = (0, graphql_tag_1.gql) `
|
104
172
|
query BackupPoint($computingId: String!) {
|
105
173
|
backupPoint(computingId: $computingId) {
|
@@ -41,13 +41,22 @@ exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
|
|
41
41
|
}
|
42
42
|
`;
|
43
43
|
exports.GET_TRANSFER_INFO = (0, graphql_tag_1.gql) `
|
44
|
-
query GetTransferInfor(
|
45
|
-
|
44
|
+
query GetTransferInfor(
|
45
|
+
$partnerId: String!
|
46
|
+
$storeId: String!
|
47
|
+
$paymentId: String
|
48
|
+
) {
|
49
|
+
getTransferInfo(
|
50
|
+
partnerId: $partnerId
|
51
|
+
storeId: $storeId
|
52
|
+
paymentId: $paymentId
|
53
|
+
) {
|
46
54
|
bankCode
|
47
55
|
bankName
|
48
56
|
accountNumber
|
49
57
|
accountName
|
50
58
|
description
|
59
|
+
transferInfo
|
51
60
|
}
|
52
61
|
}
|
53
62
|
`;
|
@@ -68,5 +68,21 @@ class AuthService extends serviceSDK_1.Service {
|
|
68
68
|
}
|
69
69
|
});
|
70
70
|
}
|
71
|
+
loginV2(loginRequest) {
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
73
|
+
const mutation = mutations_1.LOGIN_v2;
|
74
|
+
const variables = {
|
75
|
+
loginRequest: Object.assign({ orgId: this.orgId }, loginRequest),
|
76
|
+
};
|
77
|
+
try {
|
78
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
79
|
+
return response.loginV2;
|
80
|
+
}
|
81
|
+
catch (error) {
|
82
|
+
console.log(`Error in loginV2: ${error}`);
|
83
|
+
throw error;
|
84
|
+
}
|
85
|
+
});
|
86
|
+
}
|
71
87
|
}
|
72
88
|
exports.AuthService = AuthService;
|
@@ -27,4 +27,8 @@ export declare class ComputingService extends Service {
|
|
27
27
|
ramUsageDateRange(computingId: string, fromDate: any, toDate: any): Promise<any>;
|
28
28
|
cpuUsageDateRange(computingId: string, fromDate: any, toDate: any): Promise<any>;
|
29
29
|
backupPoint(computingId: string): Promise<any>;
|
30
|
+
networkUsageDateRange(computingId: string, type: string, fromDate: any, toDate: any): Promise<any>;
|
31
|
+
diskUsageDateRange(computingId: string, type: string, fromDate: any, toDate: any): Promise<any>;
|
32
|
+
networkUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
|
33
|
+
diskUsageStartTime(computingId: string, type: string, startTime: string): Promise<any>;
|
30
34
|
}
|
@@ -336,5 +336,79 @@ class ComputingService extends serviceSDK_1.Service {
|
|
336
336
|
}
|
337
337
|
});
|
338
338
|
}
|
339
|
+
networkUsageDateRange(computingId, type, fromDate, toDate) {
|
340
|
+
return __awaiter(this, void 0, void 0, function* () {
|
341
|
+
const query = queries_1.NETWORK_USAGE_DATE_RANGE;
|
342
|
+
const variables = {
|
343
|
+
computingId,
|
344
|
+
type,
|
345
|
+
fromDate,
|
346
|
+
toDate,
|
347
|
+
};
|
348
|
+
try {
|
349
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
350
|
+
return response.networkUsageDateRange;
|
351
|
+
}
|
352
|
+
catch (error) {
|
353
|
+
console.log(`Error fetching get networkUsageDateRange method: ${error}`);
|
354
|
+
throw error;
|
355
|
+
}
|
356
|
+
});
|
357
|
+
}
|
358
|
+
diskUsageDateRange(computingId, type, fromDate, toDate) {
|
359
|
+
return __awaiter(this, void 0, void 0, function* () {
|
360
|
+
const query = queries_1.DISK_USAGE_DATE_RANGE;
|
361
|
+
const variables = {
|
362
|
+
computingId,
|
363
|
+
type,
|
364
|
+
fromDate,
|
365
|
+
toDate,
|
366
|
+
};
|
367
|
+
try {
|
368
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
369
|
+
return response.diskUsageDateRange;
|
370
|
+
}
|
371
|
+
catch (error) {
|
372
|
+
console.log(`Error fetching get diskUsageDateRange method: ${error}`);
|
373
|
+
throw error;
|
374
|
+
}
|
375
|
+
});
|
376
|
+
}
|
377
|
+
networkUsageStartTime(computingId, type, startTime) {
|
378
|
+
return __awaiter(this, void 0, void 0, function* () {
|
379
|
+
const query = queries_1.NETWORK_USAGE_START_TIME;
|
380
|
+
const variables = {
|
381
|
+
computingId,
|
382
|
+
type,
|
383
|
+
startTime,
|
384
|
+
};
|
385
|
+
try {
|
386
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
387
|
+
return response.networkUsageStartTime;
|
388
|
+
}
|
389
|
+
catch (error) {
|
390
|
+
console.log(`Error fetching get networkUsageStartTime method: ${error}`);
|
391
|
+
throw error;
|
392
|
+
}
|
393
|
+
});
|
394
|
+
}
|
395
|
+
diskUsageStartTime(computingId, type, startTime) {
|
396
|
+
return __awaiter(this, void 0, void 0, function* () {
|
397
|
+
const query = queries_1.DISK_USAGE_START_TIME;
|
398
|
+
const variables = {
|
399
|
+
computingId,
|
400
|
+
type,
|
401
|
+
startTime,
|
402
|
+
};
|
403
|
+
try {
|
404
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
405
|
+
return response.diskUsageStartTime;
|
406
|
+
}
|
407
|
+
catch (error) {
|
408
|
+
console.log(`Error fetching get diskUsageStartTime method: ${error}`);
|
409
|
+
throw error;
|
410
|
+
}
|
411
|
+
});
|
412
|
+
}
|
339
413
|
}
|
340
414
|
exports.ComputingService = ComputingService;
|
@@ -3,7 +3,7 @@ export declare class PaymentLVService extends Service {
|
|
3
3
|
constructor(endpoint: string, orgId: string, storeId: string);
|
4
4
|
setToken(token: string): void;
|
5
5
|
paymentsByOrders(orderIds: [string]): Promise<any>;
|
6
|
-
getTransferInfo(): Promise<any>;
|
6
|
+
getTransferInfo(paymentId: string): Promise<any>;
|
7
7
|
cancelPayment(paymentId: string, reason: string, createBy: string): Promise<any>;
|
8
8
|
confirmPaidManual(paymentId: string, confirmBy: string): Promise<any>;
|
9
9
|
getPaymentMethodTypes(): Promise<any>;
|
@@ -39,12 +39,13 @@ class PaymentLVService extends serviceSDK_1.Service {
|
|
39
39
|
}
|
40
40
|
});
|
41
41
|
}
|
42
|
-
getTransferInfo() {
|
42
|
+
getTransferInfo(paymentId) {
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
44
44
|
const query = queries_1.GET_TRANSFER_INFO;
|
45
45
|
const variables = {
|
46
46
|
partnerId: this.orgId,
|
47
47
|
storeId: this.storeId,
|
48
|
+
paymentId,
|
48
49
|
};
|
49
50
|
try {
|
50
51
|
const response = yield this.graphqlQueryCustomHeader(query, variables);
|