@longvansoftware/service-js-client 2.8.1 → 2.8.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/config/config.js +1 -1
- package/dist/src/graphql/campaign/queries.d.ts +11 -13
- package/dist/src/graphql/campaign/queries.js +111 -39
- package/dist/src/graphql/paymentV2/mutations.d.ts +0 -1
- package/dist/src/graphql/paymentV2/mutations.js +1 -15
- package/dist/src/graphql/paymentV2/queries.d.ts +0 -2
- package/dist/src/graphql/paymentV2/queries.js +1 -58
- package/dist/src/lib/campaign/index.d.ts +0 -1
- package/dist/src/lib/campaign/index.js +12 -69
- package/dist/src/lib/paymentV2/index.d.ts +0 -10
- package/dist/src/lib/paymentV2/index.js +0 -39
- package/dist/src/lib/portal/index.d.ts +0 -3
- package/dist/src/lib/portal/index.js +0 -50
- package/dist/src/lib/service.d.ts +14 -0
- package/dist/src/lib/service.js +101 -0
- package/dist/src/utils/build-field-string.d.ts +1 -0
- package/dist/src/utils/build-field-string.js +16 -0
- package/package.json +1 -1
- package/dist/src/graphql/marketplace/mutations.d.ts +0 -3
- package/dist/src/graphql/marketplace/mutations.js +0 -54
- package/dist/src/graphql/marketplace/queries.d.ts +0 -2
- package/dist/src/graphql/marketplace/queries.js +0 -42
- package/dist/src/graphql/storefont/mutation.d.ts +0 -0
- package/dist/src/graphql/storefont/mutation.js +0 -1
- package/dist/src/graphql/storefont/queries.d.ts +0 -2
- package/dist/src/graphql/storefont/queries.js +0 -46
- package/dist/src/graphql/tag/mutations.d.ts +0 -2
- package/dist/src/graphql/tag/mutations.js +0 -44
- package/dist/src/graphql/tag/queries.d.ts +0 -1
- package/dist/src/graphql/tag/queries.js +0 -20
- package/dist/src/lib/marketplace/index.d.ts +0 -9
- package/dist/src/lib/marketplace/index.js +0 -106
- package/dist/src/lib/storefont/index.d.ts +0 -6
- package/dist/src/lib/storefont/index.js +0 -51
- package/dist/src/lib/tag/index.d.ts +0 -7
- package/dist/src/lib/tag/index.js +0 -61
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.TagService = void 0;
|
|
13
|
-
const serviceSDK_1 = require("../serviceSDK");
|
|
14
|
-
const mutations_1 = require("../../graphql/tag/mutations");
|
|
15
|
-
const queries_1 = require("../../graphql/tag/queries");
|
|
16
|
-
class TagService extends serviceSDK_1.Service {
|
|
17
|
-
constructor(endpoint, orgId, storeId) {
|
|
18
|
-
super(endpoint, orgId, storeId);
|
|
19
|
-
}
|
|
20
|
-
addTagToTagGroup(data) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const mutation = mutations_1.ADD_TAG_TO_TAG_GROUP;
|
|
23
|
-
try {
|
|
24
|
-
const response = yield this.graphqlMutation(mutation, data);
|
|
25
|
-
return response.addTagToTagGroup;
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
throw error;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
removeTagToTagGroup(data) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
const mutation = mutations_1.REMOVE_TAG_TO_TAG_GROUP;
|
|
35
|
-
try {
|
|
36
|
-
const response = yield this.graphqlMutation(mutation, data);
|
|
37
|
-
return response.removeTagToTagGroup;
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
throw error;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
getResultTag(resourceId, resourceType) {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
const queries = queries_1.GET_RESULT_TAG;
|
|
47
|
-
const variables = {
|
|
48
|
-
resourceId,
|
|
49
|
-
resourceType,
|
|
50
|
-
};
|
|
51
|
-
try {
|
|
52
|
-
const response = yield this.graphqlMutationV3(queries, variables);
|
|
53
|
-
return response.getResultTag;
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
throw error;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports.TagService = TagService;
|