@longvansoftware/storefront-js-client 3.4.7 → 3.4.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/config/config.js +2 -2
- package/dist/src/graphql/accounting_service/mutations.d.ts +2 -0
- package/dist/src/graphql/accounting_service/mutations.js +102 -0
- package/dist/src/graphql/accounting_service/queries.d.ts +1 -0
- package/dist/src/graphql/accounting_service/queries.js +62 -0
- package/dist/src/graphql/crm_camping/mutations.d.ts +1 -0
- package/dist/src/graphql/crm_camping/mutations.js +37 -0
- package/dist/src/graphql/crm_camping/queries.d.ts +8 -0
- package/dist/src/graphql/crm_camping/queries.js +279 -0
- package/dist/src/graphql/orderGraphQL/mutations.d.ts +4 -0
- package/dist/src/graphql/orderGraphQL/mutations.js +359 -0
- package/dist/src/graphql/orderGraphQL/queries.d.ts +7 -0
- package/dist/src/graphql/orderGraphQL/queries.js +402 -0
- package/dist/src/graphql/paymentLV/mutations.d.ts +2 -0
- package/dist/src/graphql/paymentLV/mutations.js +25 -0
- package/dist/src/graphql/paymentLV/queries.d.ts +4 -0
- package/dist/src/graphql/paymentLV/queries.js +83 -0
- package/dist/src/graphql/quicklab_service/mutations.d.ts +8 -0
- package/dist/src/graphql/quicklab_service/mutations.js +171 -0
- package/dist/src/graphql/quicklab_service/queries.d.ts +6 -0
- package/dist/src/graphql/quicklab_service/queries.js +121 -0
- package/dist/src/graphql/resource_permission/mutations.d.ts +2 -0
- package/dist/src/graphql/resource_permission/mutations.js +63 -0
- package/dist/src/graphql/resource_permission/queries.d.ts +1 -0
- package/dist/src/graphql/resource_permission/queries.js +18 -0
- package/dist/src/lib/accounting_service/index.d.ts +9 -0
- package/dist/src/lib/accounting_service/index.js +69 -0
- package/dist/src/lib/cloud_rest/index.d.ts +17 -0
- package/dist/src/lib/cloud_rest/index.js +101 -0
- package/dist/src/lib/crm_camping/index.d.ts +16 -0
- package/dist/src/lib/crm_camping/index.js +227 -0
- package/dist/src/lib/dns/index.d.ts +7 -0
- package/dist/src/lib/dns/index.js +40 -0
- package/dist/src/lib/fileService/index.js +2 -2
- package/dist/src/lib/orderGraphQL/index.d.ts +16 -0
- package/dist/src/lib/orderGraphQL/index.js +192 -0
- package/dist/src/lib/order_cloud_rest/index.d.ts +7 -0
- package/dist/src/lib/order_cloud_rest/index.js +39 -0
- package/dist/src/lib/paymentLV/index.d.ts +12 -0
- package/dist/src/lib/paymentLV/index.js +132 -0
- package/dist/src/lib/quicklab_service/index.d.ts +18 -0
- package/dist/src/lib/quicklab_service/index.js +197 -0
- package/dist/src/lib/resource_permission/index.d.ts +9 -0
- package/dist/src/lib/resource_permission/index.js +81 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Service } from "../serviceSDK";
|
|
2
|
+
export declare class ResourcePermissionService extends Service {
|
|
3
|
+
constructor(endpoint: string, orgId: string, storeId: string);
|
|
4
|
+
setToken(token: string): void;
|
|
5
|
+
setStoreId(storeId: string): void;
|
|
6
|
+
shareResource(createModel: any, partnerId: string): Promise<any>;
|
|
7
|
+
removeShareParty(resourceId: string, sharePartyId: string, resourceType: string, partnerId: string): Promise<any>;
|
|
8
|
+
getSharedUserByService(resourceType: string, resourceId: string): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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.ResourcePermissionService = void 0;
|
|
13
|
+
const mutations_1 = require("../../graphql/resource_permission/mutations");
|
|
14
|
+
const queries_1 = require("../../graphql/resource_permission/queries");
|
|
15
|
+
const serviceSDK_1 = require("../serviceSDK");
|
|
16
|
+
class ResourcePermissionService extends serviceSDK_1.Service {
|
|
17
|
+
constructor(endpoint, orgId, storeId) {
|
|
18
|
+
super(endpoint, orgId, storeId);
|
|
19
|
+
}
|
|
20
|
+
setToken(token) {
|
|
21
|
+
this.token = token;
|
|
22
|
+
}
|
|
23
|
+
setStoreId(storeId) {
|
|
24
|
+
this.storeId = storeId;
|
|
25
|
+
}
|
|
26
|
+
shareResource(createModel, partnerId) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const mutation = mutations_1.SHARE_RESOURCE;
|
|
29
|
+
const variables = {
|
|
30
|
+
partnerId: partnerId,
|
|
31
|
+
createModel,
|
|
32
|
+
};
|
|
33
|
+
try {
|
|
34
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
35
|
+
return response.shareResource;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.log(`Error in shareResource: ${error}`);
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
removeShareParty(resourceId, sharePartyId, resourceType, partnerId) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const mutation = mutations_1.REMOVE_SHARE_PARTY;
|
|
46
|
+
const variables = {
|
|
47
|
+
partnerId: partnerId,
|
|
48
|
+
orgId: this.orgId,
|
|
49
|
+
resourceType,
|
|
50
|
+
resourceId,
|
|
51
|
+
sharePartyId,
|
|
52
|
+
};
|
|
53
|
+
try {
|
|
54
|
+
const response = yield this.graphqlMutationV2(mutation, variables);
|
|
55
|
+
return response.removeShareParty;
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
console.log(`Error in removeShareParty: ${error}`);
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
getSharedUserByService(resourceType, resourceId) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const query = queries_1.GET_SHARED_USER_BY_SERVICE;
|
|
66
|
+
const variables = {
|
|
67
|
+
resourceType,
|
|
68
|
+
resourceId,
|
|
69
|
+
};
|
|
70
|
+
try {
|
|
71
|
+
const response = yield this.graphqlQueryV2(query, variables);
|
|
72
|
+
return response.getSharedUserByService;
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
console.log(`Error in getSharedUserByService: ${error}`);
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.ResourcePermissionService = ResourcePermissionService;
|