@longvansoftware/service-js-client 2.8.2 → 2.8.3
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/mutations.d.ts +3 -0
- package/dist/src/graphql/cloud/mutations.js +62 -1
- package/dist/src/graphql/cloud/queries.d.ts +2 -0
- package/dist/src/graphql/cloud/queries.js +34 -1
- package/dist/src/lib/cloud/index.d.ts +6 -1
- package/dist/src/lib/cloud/index.js +84 -0
- package/dist/src/types/cloud.d.ts +37 -0
- package/package.json +1 -1
|
@@ -22,3 +22,6 @@ export declare const UPDATE_URL_PUBLIC: DocumentNode;
|
|
|
22
22
|
export declare const CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
23
23
|
export declare const CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
24
24
|
export declare const CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST: (fields?: string[]) => DocumentNode;
|
|
25
|
+
export declare const REMOVE_RECORD: DocumentNode;
|
|
26
|
+
export declare const UPDATE_RECORD: DocumentNode;
|
|
27
|
+
export declare const SAVE_RECORD: DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST = exports.CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC = exports.CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC = exports.UPDATE_URL_PUBLIC = exports.UPDATE_SERVICE_READY_DEPLOY = exports.UPDATE_SERVICE_NEW = exports.UPDATE_SERVICE_COMPLETED = exports.UPDATE_ACTION_CUSTOM_ATTRIBUTE = exports.UPDATE_ACTION_STATUS = exports.CREATE_ACTION_CHANGE_IP_OF_SERVICE = exports.GET_ORDER_CHANGE_RESOURCE_TERM = exports.CREATE_DOMAIN_CONTACT = exports.UPDATE_DNS = exports.UPDATE_USER_PASSWORD = exports.UPDATE_PASSWORD = exports.UPDATE_USER_NAME = exports.UPDATE_DOMAIN_NAME = exports.DELETE_USER_MAIL_HOSTING = exports.CREATE_USER_MAIL_HOSTING = exports.CHANGE_SERVICE_NAME = exports.CHECK_DOMAIN_NAME = exports.CHECK_LIST_DOMAIN_NAME = exports.GET_DOMAIN_INFO = void 0;
|
|
3
|
+
exports.SAVE_RECORD = exports.UPDATE_RECORD = exports.REMOVE_RECORD = exports.CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST = exports.CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC = exports.CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC = exports.UPDATE_URL_PUBLIC = exports.UPDATE_SERVICE_READY_DEPLOY = exports.UPDATE_SERVICE_NEW = exports.UPDATE_SERVICE_COMPLETED = exports.UPDATE_ACTION_CUSTOM_ATTRIBUTE = exports.UPDATE_ACTION_STATUS = exports.CREATE_ACTION_CHANGE_IP_OF_SERVICE = exports.GET_ORDER_CHANGE_RESOURCE_TERM = exports.CREATE_DOMAIN_CONTACT = exports.UPDATE_DNS = exports.UPDATE_USER_PASSWORD = exports.UPDATE_PASSWORD = exports.UPDATE_USER_NAME = exports.UPDATE_DOMAIN_NAME = exports.DELETE_USER_MAIL_HOSTING = exports.CREATE_USER_MAIL_HOSTING = exports.CHANGE_SERVICE_NAME = exports.CHECK_DOMAIN_NAME = exports.CHECK_LIST_DOMAIN_NAME = exports.GET_DOMAIN_INFO = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.GET_DOMAIN_INFO = (0, graphql_tag_1.gql) `
|
|
6
6
|
mutation GetDomainInfo($domainName: String! $isClearCache: Boolean) {
|
|
@@ -374,3 +374,64 @@ const CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST = (fields = []) => {
|
|
|
374
374
|
`;
|
|
375
375
|
};
|
|
376
376
|
exports.CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST = CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST;
|
|
377
|
+
exports.REMOVE_RECORD = (0, graphql_tag_1.gql) `
|
|
378
|
+
mutation RemoveRecord(
|
|
379
|
+
$serviceId: String!
|
|
380
|
+
$nameRecord: String!
|
|
381
|
+
$typeRecord: String!
|
|
382
|
+
) {
|
|
383
|
+
removeRecord(
|
|
384
|
+
serviceId: $serviceId
|
|
385
|
+
nameRecord: $nameRecord
|
|
386
|
+
typeRecord: $typeRecord
|
|
387
|
+
)
|
|
388
|
+
}
|
|
389
|
+
`;
|
|
390
|
+
exports.UPDATE_RECORD = (0, graphql_tag_1.gql) `
|
|
391
|
+
mutation UpdateRecord(
|
|
392
|
+
$serviceId: String!
|
|
393
|
+
$record: RecordDnsInput!
|
|
394
|
+
) {
|
|
395
|
+
updateRecord(
|
|
396
|
+
serviceId: $serviceId
|
|
397
|
+
record: $record
|
|
398
|
+
) {
|
|
399
|
+
id
|
|
400
|
+
domainName
|
|
401
|
+
domainId
|
|
402
|
+
name
|
|
403
|
+
type
|
|
404
|
+
content
|
|
405
|
+
ttl
|
|
406
|
+
prio
|
|
407
|
+
changeDate
|
|
408
|
+
disabled
|
|
409
|
+
ordername
|
|
410
|
+
auth
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
`;
|
|
414
|
+
exports.SAVE_RECORD = (0, graphql_tag_1.gql) `
|
|
415
|
+
mutation SaveRecord(
|
|
416
|
+
$serviceId: String!
|
|
417
|
+
$record: RecordDnsInput!
|
|
418
|
+
) {
|
|
419
|
+
saveRecord(
|
|
420
|
+
serviceId: $serviceId
|
|
421
|
+
record: $record
|
|
422
|
+
) {
|
|
423
|
+
id
|
|
424
|
+
domainName
|
|
425
|
+
domainId
|
|
426
|
+
name
|
|
427
|
+
type
|
|
428
|
+
content
|
|
429
|
+
ttl
|
|
430
|
+
prio
|
|
431
|
+
changeDate
|
|
432
|
+
disabled
|
|
433
|
+
ordername
|
|
434
|
+
auth
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
`;
|
|
@@ -22,3 +22,5 @@ export declare const GET_ELASTIC_CLOUD_RESOURCE: DocumentNode;
|
|
|
22
22
|
export declare const SEARCH_SERVICE_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
23
23
|
export declare const SEARCH_ACTIONS_DYNAMIC: (fields?: string[]) => DocumentNode;
|
|
24
24
|
export declare const ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING: DocumentNode;
|
|
25
|
+
export declare const GET_RECORD: DocumentNode;
|
|
26
|
+
export declare const GET_DOMAIN_DNS: DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING = exports.SEARCH_ACTIONS_DYNAMIC = exports.SEARCH_SERVICE_DYNAMIC = exports.GET_ELASTIC_CLOUD_RESOURCE = exports.SEARCH_ACTIONS = exports.CHECK_DOMAIN_EXIST = exports.GET_DOMAIN_SUPPLIER = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = 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_DYNAMIC = exports.SERVICE_DETAIL = exports.GET_WHOIS_DOMAIN_INFO = exports.CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC = exports.CHECK_DOMAIN_NAME_AVAILABLE = void 0;
|
|
3
|
+
exports.GET_DOMAIN_DNS = exports.GET_RECORD = exports.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING = exports.SEARCH_ACTIONS_DYNAMIC = exports.SEARCH_SERVICE_DYNAMIC = exports.GET_ELASTIC_CLOUD_RESOURCE = exports.SEARCH_ACTIONS = exports.CHECK_DOMAIN_EXIST = exports.GET_DOMAIN_SUPPLIER = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = 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_DYNAMIC = exports.SERVICE_DETAIL = exports.GET_WHOIS_DOMAIN_INFO = exports.CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC = exports.CHECK_DOMAIN_NAME_AVAILABLE = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.CHECK_DOMAIN_NAME_AVAILABLE = (0, graphql_tag_1.gql) `
|
|
6
6
|
query CheckDomainNameAvailable($domainName: String!) {
|
|
@@ -408,3 +408,36 @@ exports.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING = (0, graphql_tag_1.gql) `
|
|
|
408
408
|
addLetsEncryptSSLForMailHosting(serviceId: $serviceId, actorId: $actorId)
|
|
409
409
|
}
|
|
410
410
|
`;
|
|
411
|
+
exports.GET_RECORD = (0, graphql_tag_1.gql) `
|
|
412
|
+
query GetRecord($serviceId: String!) {
|
|
413
|
+
getRecord(serviceId: $serviceId) {
|
|
414
|
+
id
|
|
415
|
+
domainName
|
|
416
|
+
domainId
|
|
417
|
+
name
|
|
418
|
+
type
|
|
419
|
+
content
|
|
420
|
+
ttl
|
|
421
|
+
prio
|
|
422
|
+
changeDate
|
|
423
|
+
disabled
|
|
424
|
+
ordername
|
|
425
|
+
auth
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
`;
|
|
429
|
+
exports.GET_DOMAIN_DNS = (0, graphql_tag_1.gql) `
|
|
430
|
+
query GetDomainDns($serviceId: String!) {
|
|
431
|
+
getDomainDns(serviceId: $serviceId) {
|
|
432
|
+
id
|
|
433
|
+
name
|
|
434
|
+
master
|
|
435
|
+
lastCheck
|
|
436
|
+
type
|
|
437
|
+
notifiedSerial
|
|
438
|
+
account
|
|
439
|
+
email
|
|
440
|
+
nameServer
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateUserMailHosting, DeleteUserPassword, Filter, UpdateInforMationService, UpdateUserPassword } from "../../types/cloud";
|
|
1
|
+
import { CreateUserMailHosting, DeleteUserPassword, DomainDns, Filter, RecordDns, RecordDnsInput, UpdateInforMationService, UpdateUserPassword } from "../../types/cloud";
|
|
2
2
|
import { Service } from "../serviceSDK";
|
|
3
3
|
export declare class CloudService extends Service {
|
|
4
4
|
/**
|
|
@@ -56,4 +56,9 @@ export declare class CloudService extends Service {
|
|
|
56
56
|
convertProductResourceOutputsToProductJsonList(productResourceInput: any, fields: string[]): Promise<any>;
|
|
57
57
|
searchActionsDynamic(parameter: any, fields: string[]): Promise<any>;
|
|
58
58
|
addLetsEncryptSSLForMailHosting(serviceId: string, actorId: string): Promise<any>;
|
|
59
|
+
removeRecord(serviceId: string, nameRecord: string, typeRecord: string): Promise<boolean>;
|
|
60
|
+
updateRecord(serviceId: string, record: RecordDnsInput): Promise<RecordDns>;
|
|
61
|
+
saveRecord(serviceId: string, record: RecordDnsInput): Promise<RecordDns>;
|
|
62
|
+
getRecord(serviceId: string): Promise<RecordDns[]>;
|
|
63
|
+
getDomainDns(serviceId: string): Promise<DomainDns | null>;
|
|
59
64
|
}
|
|
@@ -818,5 +818,89 @@ class CloudService extends serviceSDK_1.Service {
|
|
|
818
818
|
}
|
|
819
819
|
});
|
|
820
820
|
}
|
|
821
|
+
removeRecord(serviceId, nameRecord, typeRecord) {
|
|
822
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
823
|
+
const mutation = mutations_1.REMOVE_RECORD;
|
|
824
|
+
const variables = {
|
|
825
|
+
serviceId,
|
|
826
|
+
nameRecord,
|
|
827
|
+
typeRecord,
|
|
828
|
+
};
|
|
829
|
+
try {
|
|
830
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
831
|
+
return response.removeRecord;
|
|
832
|
+
}
|
|
833
|
+
catch (error) {
|
|
834
|
+
console.log(`Error in removeRecord: ${error}`);
|
|
835
|
+
throw error;
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
updateRecord(serviceId, record) {
|
|
840
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
841
|
+
const mutation = mutations_1.UPDATE_RECORD;
|
|
842
|
+
const variables = {
|
|
843
|
+
serviceId,
|
|
844
|
+
record,
|
|
845
|
+
};
|
|
846
|
+
try {
|
|
847
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
848
|
+
return response.updateRecord;
|
|
849
|
+
}
|
|
850
|
+
catch (error) {
|
|
851
|
+
console.log(`Error in updateRecord: ${error}`);
|
|
852
|
+
throw error;
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
saveRecord(serviceId, record) {
|
|
857
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
858
|
+
const mutation = mutations_1.SAVE_RECORD;
|
|
859
|
+
const variables = {
|
|
860
|
+
serviceId,
|
|
861
|
+
record,
|
|
862
|
+
};
|
|
863
|
+
try {
|
|
864
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
865
|
+
return response.saveRecord;
|
|
866
|
+
}
|
|
867
|
+
catch (error) {
|
|
868
|
+
console.log(`Error in saveRecord: ${error}`);
|
|
869
|
+
throw error;
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
getRecord(serviceId) {
|
|
874
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
875
|
+
const query = queries_1.GET_RECORD;
|
|
876
|
+
const variables = {
|
|
877
|
+
serviceId,
|
|
878
|
+
};
|
|
879
|
+
try {
|
|
880
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
|
881
|
+
return response.getRecord;
|
|
882
|
+
}
|
|
883
|
+
catch (error) {
|
|
884
|
+
console.log(`Error in getRecord: ${error}`);
|
|
885
|
+
throw error;
|
|
886
|
+
}
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
getDomainDns(serviceId) {
|
|
890
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
891
|
+
const query = queries_1.GET_DOMAIN_DNS;
|
|
892
|
+
const variables = {
|
|
893
|
+
serviceId,
|
|
894
|
+
};
|
|
895
|
+
try {
|
|
896
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
|
897
|
+
return response.getDomainDns;
|
|
898
|
+
}
|
|
899
|
+
catch (error) {
|
|
900
|
+
console.log(`Error in getDomainDns: ${error}`);
|
|
901
|
+
throw error;
|
|
902
|
+
}
|
|
903
|
+
});
|
|
904
|
+
}
|
|
821
905
|
}
|
|
822
906
|
exports.CloudService = CloudService;
|
|
@@ -40,3 +40,40 @@ export interface ServiceStatus {
|
|
|
40
40
|
CANCELLED: "CANCELLED";
|
|
41
41
|
CLOSED: "CLOSED";
|
|
42
42
|
}
|
|
43
|
+
export interface RecordDnsInput {
|
|
44
|
+
id?: number;
|
|
45
|
+
name: string;
|
|
46
|
+
type: string;
|
|
47
|
+
content?: string;
|
|
48
|
+
ttl?: number;
|
|
49
|
+
prio?: number;
|
|
50
|
+
changeDate?: number;
|
|
51
|
+
disabled?: number;
|
|
52
|
+
ordername?: string;
|
|
53
|
+
auth?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface RecordDns {
|
|
56
|
+
id?: number;
|
|
57
|
+
domainName?: string;
|
|
58
|
+
domainId?: number;
|
|
59
|
+
name?: string;
|
|
60
|
+
type?: string;
|
|
61
|
+
content?: string;
|
|
62
|
+
ttl?: number;
|
|
63
|
+
prio?: number;
|
|
64
|
+
changeDate?: number;
|
|
65
|
+
disabled?: number;
|
|
66
|
+
ordername?: string;
|
|
67
|
+
auth?: number;
|
|
68
|
+
}
|
|
69
|
+
export interface DomainDns {
|
|
70
|
+
id?: number;
|
|
71
|
+
name?: string;
|
|
72
|
+
master?: string;
|
|
73
|
+
lastCheck?: number;
|
|
74
|
+
type?: string;
|
|
75
|
+
notifiedSerial?: number;
|
|
76
|
+
account?: string;
|
|
77
|
+
email?: string;
|
|
78
|
+
nameServer?: string;
|
|
79
|
+
}
|