@longvansoftware/storefront-js-client 3.9.6 → 3.9.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.
- package/dist/src/graphql/crm/mutations.d.ts +1 -0
- package/dist/src/graphql/crm/mutations.js +32 -1
- package/dist/src/graphql/product/queries.d.ts +1 -0
- package/dist/src/graphql/product/queries.js +33 -1
- package/dist/src/lib/crm/index.d.ts +1 -0
- package/dist/src/lib/crm/index.js +17 -0
- package/dist/src/lib/product/index.d.ts +1 -0
- package/dist/src/lib/product/index.js +17 -0
- package/package.json +1 -1
|
@@ -17,3 +17,4 @@ export declare const CLOSE_TOPIC: import("graphql").DocumentNode;
|
|
|
17
17
|
export declare const CREATE_TOPIC: import("graphql").DocumentNode;
|
|
18
18
|
export declare const ADD_TOPIC_RELATED_RESOURCE: import("graphql").DocumentNode;
|
|
19
19
|
export declare const CREATE_WORK_EFFORT_V2: import("graphql").DocumentNode;
|
|
20
|
+
export declare const CREATE_ORG_MUTATION: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CREATE_WORK_EFFORT_V2 = exports.ADD_TOPIC_RELATED_RESOURCE = exports.CREATE_TOPIC = exports.CLOSE_TOPIC = exports.REMOVE_TAG = exports.UPDATE_CONNECTOR_DESCRIPTION = exports.ADD_TAG = exports.CREATE_CONNECTOR = exports.UPDATE_WORK_EFFORT_PROCESS_STATUS = exports.CREATE_WORK_EFFORT = exports.ADD_COMMENT = exports.ADD_TICKED = exports.ADD_ATTACHMENT_FOR_WORK_EFFORT = exports.UPDATE_WORK_EFFORT_STATUS = exports.UPDATE_WORK_EFFORT_NAME = exports.UPDATE_WORK_EFFORT_DESCRIPTION = exports.UPDATE_STATUS_ATTACHMENT_BY_ID = exports.ADD_OPPORTUNITY_MUTATION_V2 = exports.ADD_OPPORTUNITY_MUTATION = void 0;
|
|
3
|
+
exports.CREATE_ORG_MUTATION = exports.CREATE_WORK_EFFORT_V2 = exports.ADD_TOPIC_RELATED_RESOURCE = exports.CREATE_TOPIC = exports.CLOSE_TOPIC = exports.REMOVE_TAG = exports.UPDATE_CONNECTOR_DESCRIPTION = exports.ADD_TAG = exports.CREATE_CONNECTOR = exports.UPDATE_WORK_EFFORT_PROCESS_STATUS = exports.CREATE_WORK_EFFORT = exports.ADD_COMMENT = exports.ADD_TICKED = exports.ADD_ATTACHMENT_FOR_WORK_EFFORT = exports.UPDATE_WORK_EFFORT_STATUS = exports.UPDATE_WORK_EFFORT_NAME = exports.UPDATE_WORK_EFFORT_DESCRIPTION = exports.UPDATE_STATUS_ATTACHMENT_BY_ID = exports.ADD_OPPORTUNITY_MUTATION_V2 = exports.ADD_OPPORTUNITY_MUTATION = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.ADD_OPPORTUNITY_MUTATION = (0, graphql_tag_1.gql) `
|
|
6
6
|
mutation AddOpportunity(
|
|
@@ -1055,3 +1055,34 @@ exports.CREATE_WORK_EFFORT_V2 = (0, graphql_tag_1.gql) `
|
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
1057
|
`;
|
|
1058
|
+
exports.CREATE_ORG_MUTATION = (0, graphql_tag_1.gql) `
|
|
1059
|
+
mutation CreateOrg(
|
|
1060
|
+
$orgName: String!
|
|
1061
|
+
$providerId: String!
|
|
1062
|
+
$groupTenantId: String!
|
|
1063
|
+
) {
|
|
1064
|
+
createOrg(
|
|
1065
|
+
orgName: $orgName
|
|
1066
|
+
providerId: $providerId
|
|
1067
|
+
groupTenantId: $groupTenantId
|
|
1068
|
+
) {
|
|
1069
|
+
id
|
|
1070
|
+
partyId
|
|
1071
|
+
codeId
|
|
1072
|
+
groupName
|
|
1073
|
+
groupType
|
|
1074
|
+
shortName
|
|
1075
|
+
groupNameLocal
|
|
1076
|
+
officeSiteName
|
|
1077
|
+
comments
|
|
1078
|
+
logoImageUrl
|
|
1079
|
+
isIncorporated
|
|
1080
|
+
federalTaxId
|
|
1081
|
+
description
|
|
1082
|
+
deleted
|
|
1083
|
+
status
|
|
1084
|
+
positionIndexId
|
|
1085
|
+
prefix
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
`;
|
|
@@ -21,3 +21,4 @@ export declare const GET_BRAND: import("graphql").DocumentNode;
|
|
|
21
21
|
export declare const GET_TAGS: import("graphql").DocumentNode;
|
|
22
22
|
export declare const GET_PRODUCT_BY_GROUPID: import("graphql").DocumentNode;
|
|
23
23
|
export declare const GET_CATEGORY_BY_ID: import("graphql").DocumentNode;
|
|
24
|
+
export declare const GET_CATEGORY_BY_HANDLE: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
|
|
3
|
+
exports.GET_CATEGORY_BY_HANDLE = exports.GET_CATEGORY_BY_ID = exports.GET_PRODUCT_BY_GROUPID = exports.GET_TAGS = exports.GET_BRAND = exports.GET_GROUPS = exports.GET_PRODUCT_TEMPLATES = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_UNITS = exports.GET_PRODUCT = exports.GET_PRODUCT_IMAGE = exports.GET_DETAIL_STORES = exports.GET_STORES = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
// export const GET_PRODUCT_BY_ID_QUERY = gql`
|
|
6
6
|
// query GetProductById(
|
|
@@ -864,3 +864,35 @@ exports.GET_CATEGORY_BY_ID = (0, graphql_tag_1.gql) `
|
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
866
|
`;
|
|
867
|
+
exports.GET_CATEGORY_BY_HANDLE = (0, graphql_tag_1.gql) `
|
|
868
|
+
query GetCategoryByHandle(
|
|
869
|
+
$partnerId: String!
|
|
870
|
+
$storeChannel: String!
|
|
871
|
+
$handle: String!
|
|
872
|
+
) {
|
|
873
|
+
getCategoryByHandle(
|
|
874
|
+
partnerId: $partnerId
|
|
875
|
+
storeChannel: $storeChannel
|
|
876
|
+
handle: $handle
|
|
877
|
+
) {
|
|
878
|
+
id
|
|
879
|
+
title
|
|
880
|
+
image
|
|
881
|
+
icon
|
|
882
|
+
parentId
|
|
883
|
+
level
|
|
884
|
+
handle
|
|
885
|
+
description
|
|
886
|
+
child {
|
|
887
|
+
id
|
|
888
|
+
title
|
|
889
|
+
image
|
|
890
|
+
icon
|
|
891
|
+
parentId
|
|
892
|
+
level
|
|
893
|
+
handle
|
|
894
|
+
description
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
`;
|
|
@@ -43,4 +43,5 @@ export declare class CrmService extends Service {
|
|
|
43
43
|
getResourceRelatedTopic(topicId: string, resourceType: string): Promise<any>;
|
|
44
44
|
addTopicRelatedResource(topicId: string, resourceId: string, resourceType: string, createdBy: string): Promise<any>;
|
|
45
45
|
getWorkflows(group: string, keyword: string): Promise<any>;
|
|
46
|
+
createOrg(orgName: string, providerId: string, groupTenantId: string): Promise<any>;
|
|
46
47
|
}
|
|
@@ -740,5 +740,22 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
740
740
|
}
|
|
741
741
|
});
|
|
742
742
|
}
|
|
743
|
+
createOrg(orgName, providerId, groupTenantId) {
|
|
744
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
745
|
+
const variables = {
|
|
746
|
+
orgName,
|
|
747
|
+
providerId,
|
|
748
|
+
groupTenantId,
|
|
749
|
+
};
|
|
750
|
+
try {
|
|
751
|
+
const response = yield this.graphqlMutationV2(mutations_1.CREATE_ORG_MUTATION, variables);
|
|
752
|
+
return response.createOrg;
|
|
753
|
+
}
|
|
754
|
+
catch (error) {
|
|
755
|
+
console.log(`Error in createOrg: ${error}`);
|
|
756
|
+
throw error;
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
}
|
|
743
760
|
}
|
|
744
761
|
exports.CrmService = CrmService;
|
|
@@ -77,4 +77,5 @@ export declare class ProductService extends Service {
|
|
|
77
77
|
RemoveProduct(productId: string): Promise<any>;
|
|
78
78
|
UpdateProductSubtype(productId: string, subType: string): Promise<any>;
|
|
79
79
|
getCategoryById(categoryId: string): Promise<any>;
|
|
80
|
+
getCategoryByHandle(handle: string): Promise<any>;
|
|
80
81
|
}
|
|
@@ -845,5 +845,22 @@ class ProductService extends serviceSDK_1.Service {
|
|
|
845
845
|
}
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
|
+
getCategoryByHandle(handle) {
|
|
849
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
850
|
+
const query = queries_1.GET_CATEGORY_BY_HANDLE;
|
|
851
|
+
const variables = {
|
|
852
|
+
partnerId: this.orgId,
|
|
853
|
+
storeChannel: this.storeId,
|
|
854
|
+
handle: handle,
|
|
855
|
+
};
|
|
856
|
+
try {
|
|
857
|
+
const response = yield this.graphqlQuery(query, variables);
|
|
858
|
+
return response.getCategoryByHandle;
|
|
859
|
+
}
|
|
860
|
+
catch (error) {
|
|
861
|
+
throw error;
|
|
862
|
+
}
|
|
863
|
+
});
|
|
864
|
+
}
|
|
848
865
|
}
|
|
849
866
|
exports.ProductService = ProductService;
|