@longvansoftware/service-js-client 1.2.6 → 1.2.8

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.
@@ -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 = "\n mutation UpdatePassword($orgId: String!, $accessToken: String!, $currentPassword: String!, $newPassword: String!) {\n updatePassword(orgId: $orgId, accessToken: $accessToken, currentPassword: $currentPassword, newPassword: $newPassword)\n }\n";
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($orgId: String!, $accessToken: String!, $currentPassword: String!, $newPassword: String!) {
97
- updatePassword(orgId: $orgId, accessToken: $accessToken, currentPassword: $currentPassword, newPassword: $newPassword)
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!) {
@@ -20,6 +20,8 @@ exports.COMPUTING_DETAIL = (0, graphql_tag_1.gql) `
20
20
  ipConnect
21
21
  portConnect
22
22
  protocolConnect
23
+ lastBackup
24
+ backupSequence
23
25
  }
24
26
  }
25
27
  `;
@@ -68,6 +70,38 @@ exports.CPU_USAGE_START_TIME = (0, graphql_tag_1.gql) `
68
70
  }
69
71
  }
70
72
  `;
73
+ exports.NETWORK_USAGE_START_TIME = (0, graphql_tag_1.gql) `
74
+ query NetworkUsageStartTime(
75
+ $computingId: String!
76
+ $type: String!
77
+ $startTime: String!
78
+ ) {
79
+ networkUsageStartTime(
80
+ computingId: $computingId
81
+ type: $type
82
+ startTime: $startTime
83
+ ) {
84
+ time
85
+ value
86
+ }
87
+ }
88
+ `;
89
+ exports.DISK_USAGE_START_TIME = (0, graphql_tag_1.gql) `
90
+ query DiskUsageStartTime(
91
+ $computingId: String!
92
+ $type: String!
93
+ $startTime: String!
94
+ ) {
95
+ diskUsageStartTime(
96
+ computingId: $computingId
97
+ type: $type
98
+ startTime: $startTime
99
+ ) {
100
+ time
101
+ value
102
+ }
103
+ }
104
+ `;
71
105
  exports.RAM_USAGE_DATE_RANGE = (0, graphql_tag_1.gql) `
72
106
  query RamUsageDateRange(
73
107
  $computingId: String!
@@ -100,6 +134,42 @@ exports.CPU_USAGE_DATE_RANGE = (0, graphql_tag_1.gql) `
100
134
  }
101
135
  }
102
136
  `;
137
+ exports.NETWORK_USAGE_DATE_RANGE = (0, graphql_tag_1.gql) `
138
+ query NetworkUsageDateRange(
139
+ $computingId: String!
140
+ $type: String!
141
+ $fromDate: DateCustom!
142
+ $toDate: DateCustom!
143
+ ) {
144
+ networkUsageDateRange(
145
+ computingId: $computingId
146
+ type: $type
147
+ fromDate: $fromDate
148
+ toDate: $toDate
149
+ ) {
150
+ time
151
+ value
152
+ }
153
+ }
154
+ `;
155
+ exports.DISK_USAGE_DATE_RANGE = (0, graphql_tag_1.gql) `
156
+ query DiskUsageDateRange(
157
+ $computingId: String!
158
+ $type: String!
159
+ $fromDate: DateCustom!
160
+ $toDate: DateCustom!
161
+ ) {
162
+ diskUsageDateRange(
163
+ computingId: $computingId
164
+ type: $type
165
+ fromDate: $fromDate
166
+ toDate: $toDate
167
+ ) {
168
+ time
169
+ value
170
+ }
171
+ }
172
+ `;
103
173
  exports.BACKUP_POINT = (0, graphql_tag_1.gql) `
104
174
  query BackupPoint($computingId: String!) {
105
175
  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($partnerId: String!, $storeId: String!) {
45
- getTransferInfo(partnerId: $partnerId, storeId: $storeId) {
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
  `;
@@ -24,4 +24,5 @@ export declare class AuthService extends Service {
24
24
  */
25
25
  register(registerRequest: RegisterRequest): Promise<void>;
26
26
  getUserDetail(accessToken: string): Promise<any>;
27
+ loginV2(loginRequest: LoginRequest): Promise<LoginResponse>;
27
28
  }
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [