@longvansoftware/storefront-js-client 4.6.3 → 4.6.5

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.
Files changed (82) hide show
  1. package/dist/config/config.d.ts +2 -0
  2. package/dist/config/config.js +2 -0
  3. package/dist/src/graphql/cloudService/queries.d.ts +1 -0
  4. package/dist/src/graphql/cloudService/queries.js +71 -0
  5. package/dist/src/graphql/marketplace/mutations.d.ts +3 -0
  6. package/dist/src/graphql/marketplace/mutations.js +54 -0
  7. package/dist/src/graphql/marketplace/queries.d.ts +2 -0
  8. package/dist/src/graphql/marketplace/queries.js +45 -0
  9. package/dist/src/graphql/product/mutations.js +0 -3
  10. package/dist/src/graphql/product/queries.js +0 -81
  11. package/dist/src/lib/SDK.d.ts +3 -0
  12. package/dist/src/lib/SDK.js +5 -0
  13. package/dist/src/lib/cloudService/index.d.ts +5 -0
  14. package/dist/src/lib/{dns → cloudService}/index.js +11 -16
  15. package/dist/src/lib/marketplace/index.d.ts +9 -0
  16. package/dist/src/lib/marketplace/index.js +106 -0
  17. package/package.json +1 -1
  18. package/dist/src/graphql/accounting_service/mutations.d.ts +0 -2
  19. package/dist/src/graphql/accounting_service/mutations.js +0 -100
  20. package/dist/src/graphql/accounting_service/queries.d.ts +0 -1
  21. package/dist/src/graphql/accounting_service/queries.js +0 -62
  22. package/dist/src/graphql/content_api/queries.d.ts +0 -2
  23. package/dist/src/graphql/content_api/queries.js +0 -23
  24. package/dist/src/graphql/crm_camping/mutations.d.ts +0 -1
  25. package/dist/src/graphql/crm_camping/mutations.js +0 -37
  26. package/dist/src/graphql/crm_camping/queries.d.ts +0 -14
  27. package/dist/src/graphql/crm_camping/queries.js +0 -420
  28. package/dist/src/graphql/orderGraphQL/mutations.d.ts +0 -10
  29. package/dist/src/graphql/orderGraphQL/mutations.js +0 -410
  30. package/dist/src/graphql/orderGraphQL/queries.d.ts +0 -10
  31. package/dist/src/graphql/orderGraphQL/queries.js +0 -480
  32. package/dist/src/graphql/paymentLV/mutations.d.ts +0 -2
  33. package/dist/src/graphql/paymentLV/mutations.js +0 -31
  34. package/dist/src/graphql/paymentLV/queries.d.ts +0 -5
  35. package/dist/src/graphql/paymentLV/queries.js +0 -135
  36. package/dist/src/graphql/quicklab_service/mutations.d.ts +0 -8
  37. package/dist/src/graphql/quicklab_service/mutations.js +0 -171
  38. package/dist/src/graphql/quicklab_service/queries.d.ts +0 -7
  39. package/dist/src/graphql/quicklab_service/queries.js +0 -131
  40. package/dist/src/graphql/remote_access_service/mutations.d.ts +0 -7
  41. package/dist/src/graphql/remote_access_service/mutations.js +0 -89
  42. package/dist/src/graphql/remote_access_service/queries.d.ts +0 -2
  43. package/dist/src/graphql/remote_access_service/queries.js +0 -34
  44. package/dist/src/graphql/resource_permission/mutations.d.ts +0 -2
  45. package/dist/src/graphql/resource_permission/mutations.js +0 -65
  46. package/dist/src/graphql/resource_permission/queries.d.ts +0 -1
  47. package/dist/src/graphql/resource_permission/queries.js +0 -18
  48. package/dist/src/graphql/storage_s3/mutations.d.ts +0 -27
  49. package/dist/src/graphql/storage_s3/mutations.js +0 -603
  50. package/dist/src/graphql/storage_s3/queries.d.ts +0 -12
  51. package/dist/src/graphql/storage_s3/queries.js +0 -129
  52. package/dist/src/lib/accounting_service/index.d.ts +0 -9
  53. package/dist/src/lib/accounting_service/index.js +0 -69
  54. package/dist/src/lib/cloud_rest/index.d.ts +0 -17
  55. package/dist/src/lib/cloud_rest/index.js +0 -101
  56. package/dist/src/lib/content_api/index.d.ts +0 -7
  57. package/dist/src/lib/content_api/index.js +0 -43
  58. package/dist/src/lib/crm_camping/index.d.ts +0 -21
  59. package/dist/src/lib/crm_camping/index.js +0 -302
  60. package/dist/src/lib/dns/index.d.ts +0 -7
  61. package/dist/src/lib/orderGraphQL/index.d.ts +0 -24
  62. package/dist/src/lib/orderGraphQL/index.js +0 -342
  63. package/dist/src/lib/order_cloud_rest/index.d.ts +0 -7
  64. package/dist/src/lib/order_cloud_rest/index.js +0 -39
  65. package/dist/src/lib/paymentLV/index.d.ts +0 -13
  66. package/dist/src/lib/paymentLV/index.js +0 -149
  67. package/dist/src/lib/quicklab_service/index.d.ts +0 -19
  68. package/dist/src/lib/quicklab_service/index.js +0 -211
  69. package/dist/src/lib/remote_access_service/index.d.ts +0 -16
  70. package/dist/src/lib/remote_access_service/index.js +0 -181
  71. package/dist/src/lib/resource_permission/index.d.ts +0 -9
  72. package/dist/src/lib/resource_permission/index.js +0 -82
  73. package/dist/src/lib/service.d.ts +0 -14
  74. package/dist/src/lib/service.js +0 -101
  75. package/dist/src/lib/storage_s3/index.d.ts +0 -42
  76. package/dist/src/lib/storage_s3/index.js +0 -736
  77. package/dist/src/types/remote_access_service.d.ts +0 -12
  78. package/dist/src/types/remote_access_service.js +0 -2
  79. package/dist/src/types/storage_s3.d.ts +0 -10
  80. package/dist/src/types/storage_s3.js +0 -2
  81. package/dist/src/utils/build-field-string.d.ts +0 -1
  82. package/dist/src/utils/build-field-string.js +0 -16
@@ -1,39 +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.OrderCloudRestService = void 0;
13
- const serviceSDK_1 = require("../serviceSDK");
14
- class OrderCloudRestService extends serviceSDK_1.Service {
15
- constructor(endpoint, orgId, storeId) {
16
- super(endpoint, orgId, storeId);
17
- }
18
- setToken(token) {
19
- this.token = token;
20
- }
21
- setStoreId(storeId) {
22
- this.storeId = storeId;
23
- }
24
- updateOrderConfirmation(orderId, createBy) {
25
- return __awaiter(this, void 0, void 0, function* () {
26
- const endpoint = `/service-webhook?partnerId=${this.orgId}&orderId=${orderId}&createBy=${createBy}`;
27
- const method = "GET";
28
- try {
29
- const response = yield this.restApiCallWithToken(endpoint, method);
30
- return response;
31
- }
32
- catch (error) {
33
- console.log(`Error in updateOrderConfirmation: ${error}`);
34
- throw error;
35
- }
36
- });
37
- }
38
- }
39
- exports.OrderCloudRestService = OrderCloudRestService;
@@ -1,13 +0,0 @@
1
- import { Service } from "../serviceSDK";
2
- export declare class PaymentLVService extends Service {
3
- constructor(endpoint: string, orgId: string, storeId: string);
4
- setToken(token: string): void;
5
- setStoreId(storeId: string): void;
6
- paymentsByOrders(orderIds: [string]): Promise<any>;
7
- getTransferInfo(paymentId: string, store: string): Promise<any>;
8
- cancelPayment(paymentId: string, reason: string, createBy: string): Promise<any>;
9
- confirmPaidManual(paymentId: string, confirmBy: string): Promise<any>;
10
- getPaymentMethodTypes(store: string): Promise<any>;
11
- paymentMethods(): Promise<any>;
12
- paymentStatus(paymentId: string): Promise<any>;
13
- }
@@ -1,149 +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.PaymentLVService = void 0;
13
- const mutations_1 = require("../../graphql/paymentLV/mutations");
14
- const queries_1 = require("../../graphql/paymentLV/queries");
15
- const serviceSDK_1 = require("../serviceSDK");
16
- class PaymentLVService 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
- paymentsByOrders(orderIds) {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- const query = queries_1.PAYMENTS_BY_ORDERS;
29
- const variables = {
30
- orderIds,
31
- };
32
- // const headers = { PartnerId: this.orgId };
33
- try {
34
- const response = yield this.graphqlQueryCustomHeader(query, variables
35
- // headers
36
- );
37
- return response.paymentsByOrders;
38
- }
39
- catch (error) {
40
- console.log(`Error in paymentsByOrders: ${error}`);
41
- throw error;
42
- }
43
- });
44
- }
45
- getTransferInfo(paymentId, store) {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- const query = queries_1.GET_TRANSFER_INFO;
48
- const variables = {
49
- partnerId: this.orgId,
50
- storeId: store ? store : this.storeId,
51
- paymentId,
52
- };
53
- try {
54
- const response = yield this.graphqlQueryCustomHeader(query, variables);
55
- return response.getTransferInfo;
56
- }
57
- catch (error) {
58
- console.log(`Error fetching get getTransferInfo method: ${error}`);
59
- throw error;
60
- }
61
- });
62
- }
63
- cancelPayment(paymentId, reason, createBy) {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- const mutation = mutations_1.CANCEL_PAYMENT;
66
- const variables = {
67
- paymentId,
68
- safeMode: true,
69
- reason,
70
- createBy,
71
- };
72
- try {
73
- const response = yield this.graphqlMutationCustomHeader(mutation, variables);
74
- return response.cancelPayment;
75
- }
76
- catch (error) {
77
- console.log(`Error fetching get cancelPayment method: ${error}`);
78
- throw error;
79
- }
80
- });
81
- }
82
- confirmPaidManual(paymentId, confirmBy) {
83
- return __awaiter(this, void 0, void 0, function* () {
84
- const mutation = mutations_1.CONFIRM_PAID_MANUAL;
85
- const variables = {
86
- paymentId,
87
- confirmBy,
88
- };
89
- try {
90
- const response = yield this.graphqlMutationCustomHeader(mutation, variables);
91
- return response.confirmPaidManual;
92
- }
93
- catch (error) {
94
- console.log(`Error fetching get confirmPaidManual method: ${error}`);
95
- throw error;
96
- }
97
- });
98
- }
99
- getPaymentMethodTypes(store) {
100
- return __awaiter(this, void 0, void 0, function* () {
101
- const query = queries_1.GET_PAYMENT_METHOD_TYPES;
102
- const variables = {
103
- partnerId: this.orgId,
104
- storeId: store ? store : this.storeId,
105
- };
106
- try {
107
- const response = yield this.graphqlQueryCustomHeader(query, variables);
108
- return response.getPaymentMethodTypes;
109
- }
110
- catch (error) {
111
- console.log(`Error fetching get getPaymentMethodTypes method: ${error}`);
112
- throw error;
113
- }
114
- });
115
- }
116
- paymentMethods() {
117
- return __awaiter(this, void 0, void 0, function* () {
118
- const query = queries_1.PAYMENT_METHODS;
119
- const variables = {
120
- partnerCode: this.orgId,
121
- };
122
- try {
123
- const response = yield this.graphqlQueryCustomHeader(query, variables);
124
- return response.paymentMethods;
125
- }
126
- catch (error) {
127
- console.log(`Error fetching get paymentMethods method: ${error}`);
128
- throw error;
129
- }
130
- });
131
- }
132
- paymentStatus(paymentId) {
133
- return __awaiter(this, void 0, void 0, function* () {
134
- const query = queries_1.PAYMENT_STATUS;
135
- const variables = {
136
- paymentId,
137
- };
138
- try {
139
- const response = yield this.graphqlQueryCustomHeader(query, variables);
140
- return response.paymentStatus;
141
- }
142
- catch (error) {
143
- console.log(`Error fetching get paymentStatus method: ${error}`);
144
- throw error;
145
- }
146
- });
147
- }
148
- }
149
- exports.PaymentLVService = PaymentLVService;
@@ -1,19 +0,0 @@
1
- import { Service } from "../serviceSDK";
2
- export declare class QuicklabService extends Service {
3
- constructor(endpoint: string, orgId: string, storeId: string);
4
- setToken(token: string): void;
5
- setStoreId(storeId: string): void;
6
- getTemplatesByArticleId(articleId: string): Promise<any>;
7
- getTypeLabSessions(): Promise<any>;
8
- getLabSessionsByUserId(userId: string): Promise<any>;
9
- getLabSessionsByUserIdAndArticleId(userId: string, articleId: string): Promise<any>;
10
- createLabSessionByTemplateId(templateId: string, userId: string, articleId: string, typeLabSessionCode: string): Promise<any>;
11
- createLabSessionByLabSessionId(labSessionId: string, userId: string, articleId: string): Promise<any>;
12
- createLabSessionByComputingId(computingId: string, userId: string, articleId: string): Promise<any>;
13
- updateEndTimeLabSession(labSessionId: string, userId: string): Promise<any>;
14
- stopLabSession(labSessionId: string, userId: string, note: string): Promise<any>;
15
- updateTypeLabSession(labSessionId: string, typeLabSessionCode: string, userId: string): Promise<any>;
16
- getLabSessionsChillByParent(labSessionId: string, userId: string): Promise<any>;
17
- stopLabSessionForCustomer(labSessionId: string, userId: string, note: string): Promise<any>;
18
- getLabDoingAndDoneByUserId(userId: string, fields: string[]): Promise<any>;
19
- }
@@ -1,211 +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.QuicklabService = void 0;
13
- const mutations_1 = require("../../graphql/quicklab_service/mutations");
14
- const queries_1 = require("../../graphql/quicklab_service/queries");
15
- const serviceSDK_1 = require("../serviceSDK");
16
- class QuicklabService 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
- getTemplatesByArticleId(articleId) {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- const query = queries_1.GET_TEMPLATE_BY_ARTICLE_ID;
29
- const variables = {
30
- articleId,
31
- };
32
- try {
33
- const response = yield this.graphqlQuery(query, variables);
34
- return response.getTemplatesByArticleId;
35
- }
36
- catch (error) {
37
- console.log(`Error in getTemplatesByArticleId : ${error}`);
38
- throw error;
39
- }
40
- });
41
- }
42
- getTypeLabSessions() {
43
- return __awaiter(this, void 0, void 0, function* () {
44
- const query = queries_1.GET_TYPE_LAB_SESSION;
45
- const variables = {};
46
- try {
47
- const response = yield this.graphqlQuery(query, variables);
48
- return response.getTypeLabSessions;
49
- }
50
- catch (error) {
51
- console.log(`Error in getTypeLabSessions : ${error}`);
52
- throw error;
53
- }
54
- });
55
- }
56
- getLabSessionsByUserId(userId) {
57
- return __awaiter(this, void 0, void 0, function* () {
58
- const query = queries_1.GET_LAB_SESSIONS_BY_USER_ID;
59
- const variables = { userId };
60
- try {
61
- const response = yield this.graphqlQuery(query, variables);
62
- return response.getLabSessionsByUserId;
63
- }
64
- catch (error) {
65
- console.log(`Error in getLabSessionsByUserId : ${error}`);
66
- throw error;
67
- }
68
- });
69
- }
70
- getLabSessionsByUserIdAndArticleId(userId, articleId) {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- const query = queries_1.GET_LAB_SESSIONS_BY_USER_ID_AND_ARTICLE_ID;
73
- const variables = { userId, articleId };
74
- try {
75
- const response = yield this.graphqlQuery(query, variables);
76
- return response.getLabSessionsByUserIdAndArticleId;
77
- }
78
- catch (error) {
79
- console.log(`Error in getLabSessionsByUserIdAndArticleId : ${error}`);
80
- throw error;
81
- }
82
- });
83
- }
84
- createLabSessionByTemplateId(templateId, userId, articleId, typeLabSessionCode) {
85
- return __awaiter(this, void 0, void 0, function* () {
86
- const mutation = mutations_1.CREATE_LAB_SESSION_BY_TEMPLATE_ID;
87
- const variables = { templateId, userId, articleId, typeLabSessionCode };
88
- try {
89
- const response = yield this.graphqlMutation(mutation, variables);
90
- return response.createLabSessionByTemplateId;
91
- }
92
- catch (error) {
93
- console.log(`Error in createLabSessionByTemplateId : ${error}`);
94
- throw error;
95
- }
96
- });
97
- }
98
- createLabSessionByLabSessionId(labSessionId, userId, articleId) {
99
- return __awaiter(this, void 0, void 0, function* () {
100
- const mutation = mutations_1.CREATE_LAB_SESSION_BY_LAB_SESSION_ID;
101
- const variables = { labSessionId, userId, articleId };
102
- try {
103
- const response = yield this.graphqlMutation(mutation, variables);
104
- return response.createLabSessionByLabSessionId;
105
- }
106
- catch (error) {
107
- console.log(`Error in createLabSessionByLabSessionId : ${error}`);
108
- throw error;
109
- }
110
- });
111
- }
112
- createLabSessionByComputingId(computingId, userId, articleId) {
113
- return __awaiter(this, void 0, void 0, function* () {
114
- const mutation = mutations_1.CREATE_LAB_SESSION_BY_COMPUTING_ID;
115
- const variables = { computingId, userId, articleId };
116
- try {
117
- const response = yield this.graphqlMutation(mutation, variables);
118
- return response.createLabSessionByComputingId;
119
- }
120
- catch (error) {
121
- console.log(`Error in createLabSessionByComputingId : ${error}`);
122
- throw error;
123
- }
124
- });
125
- }
126
- updateEndTimeLabSession(labSessionId, userId) {
127
- return __awaiter(this, void 0, void 0, function* () {
128
- const mutation = mutations_1.UPDATE_END_TIME_LAB_SESSION;
129
- const variables = { labSessionId, userId };
130
- try {
131
- const response = yield this.graphqlMutation(mutation, variables);
132
- return response.updateEndTimeLabSession;
133
- }
134
- catch (error) {
135
- console.log(`Error in updateEndTimeLabSession : ${error}`);
136
- throw error;
137
- }
138
- });
139
- }
140
- stopLabSession(labSessionId, userId, note) {
141
- return __awaiter(this, void 0, void 0, function* () {
142
- const mutation = mutations_1.STOP_LAB_SESSION;
143
- const variables = { labSessionId, userId, note };
144
- try {
145
- const response = yield this.graphqlMutation(mutation, variables);
146
- return response.stopLabSession;
147
- }
148
- catch (error) {
149
- console.log(`Error in stopLabSession : ${error}`);
150
- throw error;
151
- }
152
- });
153
- }
154
- updateTypeLabSession(labSessionId, typeLabSessionCode, userId) {
155
- return __awaiter(this, void 0, void 0, function* () {
156
- const mutation = mutations_1.UPDATE_TYPE_LAB_SESSION;
157
- const variables = { labSessionId, typeLabSessionCode, userId };
158
- try {
159
- const response = yield this.graphqlMutation(mutation, variables);
160
- return response.updateTypeLabSession;
161
- }
162
- catch (error) {
163
- console.log(`Error in updateTypeLabSession : ${error}`);
164
- throw error;
165
- }
166
- });
167
- }
168
- getLabSessionsChillByParent(labSessionId, userId) {
169
- return __awaiter(this, void 0, void 0, function* () {
170
- const query = queries_1.GET_LAB_SESSIONS_CHILL_BY_PARENT;
171
- const variables = { labSessionId, userId };
172
- try {
173
- const response = yield this.graphqlQuery(query, variables);
174
- return response.getLabSessionsChillByParent;
175
- }
176
- catch (error) {
177
- console.log(`Error in getLabSessionsChillByParent : ${error}`);
178
- throw error;
179
- }
180
- });
181
- }
182
- stopLabSessionForCustomer(labSessionId, userId, note) {
183
- return __awaiter(this, void 0, void 0, function* () {
184
- const mutation = mutations_1.STOP_LAB_SESSION_FOR_CUSTOMER;
185
- const variables = { labSessionId, userId, note };
186
- try {
187
- const response = yield this.graphqlMutation(mutation, variables);
188
- return response.stopLabSessionForCustomer;
189
- }
190
- catch (error) {
191
- console.log(`Error in stopLabSessionForCustomer : ${error}`);
192
- throw error;
193
- }
194
- });
195
- }
196
- getLabDoingAndDoneByUserId(userId, fields) {
197
- return __awaiter(this, void 0, void 0, function* () {
198
- const query = (0, queries_1.GET_LAB_DOING_AND_DONE_BY_USERID)(fields);
199
- const variables = { partnerId: this.orgId, userId };
200
- try {
201
- const response = yield this.graphqlQuery(query, variables);
202
- return response.getLabDoingAndDoneByUserId;
203
- }
204
- catch (error) {
205
- console.log(`Error in getLabDoingAndDoneByUserId : ${error}`);
206
- throw error;
207
- }
208
- });
209
- }
210
- }
211
- exports.QuicklabService = QuicklabService;
@@ -1,16 +0,0 @@
1
- import { UpdateRemoteAccessDTO } from "../../types/remote_access_service";
2
- import { Service } from "../serviceSDK";
3
- export declare class RemoteAccessService extends Service {
4
- constructor(endpoint: string, orgId: string, storeId: string);
5
- setToken(token: string): void;
6
- setStoreId(storeId: string): void;
7
- GetRemoteAccessByTargetIdAndTargetType(targetId: string, targetType: string): Promise<any>;
8
- GetConnectionInfoFromRemoteAccessById(remoteAccessId: string): Promise<any>;
9
- createRemoteAccess(data: any): Promise<any>;
10
- updateRemoteAccessName(remoteAccessId: string, name: string, updatedBy: string): Promise<any>;
11
- updateRemoteAccessDescription(remoteAccessId: string, description: string, updatedBy: string): Promise<any>;
12
- updateRemoteAccessType(remoteAccessId: string, type: string, updatedBy: string): Promise<any>;
13
- updateRemoteAccessInfo(remoteAccessId: string, remoteAccessInfoInput: any, updatedBy: string): Promise<any>;
14
- updateRemoteAccess(remoteAccessId: string, updateRemoteAccessDTO: UpdateRemoteAccessDTO, updatedBy: string): Promise<any>;
15
- deleteRemoteAccess(remoteAccessId: string, updatedBy: string): Promise<any>;
16
- }
@@ -1,181 +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.RemoteAccessService = void 0;
13
- const mutations_1 = require("../../graphql/remote_access_service/mutations");
14
- const queries_1 = require("../../graphql/remote_access_service/queries");
15
- const serviceSDK_1 = require("../serviceSDK");
16
- class RemoteAccessService 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
- GetRemoteAccessByTargetIdAndTargetType(targetId, targetType) {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- const query = queries_1.GET_REMOTE_ACCESS_BY_TARGETID_AND_TARGETTYPE;
29
- const variables = {
30
- targetId,
31
- targetType,
32
- };
33
- try {
34
- const response = yield this.graphqlQuery(query, variables);
35
- return response.getRemoteAccessByTargetIdAndTargetType;
36
- }
37
- catch (error) {
38
- console.log(`Error in GetRemoteAccessByTargetIdAndTargetType : ${error}`);
39
- throw error;
40
- }
41
- });
42
- }
43
- GetConnectionInfoFromRemoteAccessById(remoteAccessId) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- const query = queries_1.GET_CONNECTION_INFO_FROM_REMOTE_ACCESS_BY_ID;
46
- const variables = {
47
- remoteAccessId,
48
- };
49
- try {
50
- const response = yield this.graphqlQueryV2(query, variables);
51
- return response.getConnectionInfoFromRemoteAccessById;
52
- }
53
- catch (error) {
54
- console.log(`Error in GetConnectionInfoFromRemoteAccessById : ${error}`);
55
- throw error;
56
- }
57
- });
58
- }
59
- createRemoteAccess(data) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- const mutation = mutations_1.CREATE_REMOTE_ACCESS;
62
- const variables = Object.assign({}, data);
63
- try {
64
- const response = yield this.graphqlMutation(mutation, variables);
65
- return response.createRemoteAccess;
66
- }
67
- catch (error) {
68
- console.log(`Error in createRemoteAccess : ${error}`);
69
- throw error;
70
- }
71
- });
72
- }
73
- updateRemoteAccessName(remoteAccessId, name, updatedBy) {
74
- return __awaiter(this, void 0, void 0, function* () {
75
- const mutation = mutations_1.UPDATE_REMOTE_ACCESS_NAME;
76
- const variables = {
77
- remoteAccessId,
78
- name,
79
- updatedBy,
80
- };
81
- try {
82
- const response = yield this.graphqlMutation(mutation, variables);
83
- return response.updateRemoteAccessName;
84
- }
85
- catch (error) {
86
- console.log(`Error in updateRemoteAccessName : ${error}`);
87
- throw error;
88
- }
89
- });
90
- }
91
- updateRemoteAccessDescription(remoteAccessId, description, updatedBy) {
92
- return __awaiter(this, void 0, void 0, function* () {
93
- const mutation = mutations_1.UPDATE_REMOTE_ACCESS_DESCRIPTION;
94
- const variables = {
95
- remoteAccessId,
96
- description,
97
- updatedBy,
98
- };
99
- try {
100
- const response = yield this.graphqlMutation(mutation, variables);
101
- return response.updateRemoteAccessDescription;
102
- }
103
- catch (error) {
104
- console.log(`Error in updateRemoteAccessDescription : ${error}`);
105
- throw error;
106
- }
107
- });
108
- }
109
- updateRemoteAccessType(remoteAccessId, type, updatedBy) {
110
- return __awaiter(this, void 0, void 0, function* () {
111
- const mutation = mutations_1.UPDATE_REMOTE_ACCESS_TYPE;
112
- const variables = {
113
- remoteAccessId,
114
- type,
115
- updatedBy,
116
- };
117
- try {
118
- const response = yield this.graphqlMutation(mutation, variables);
119
- return response.updateRemoteAccessType;
120
- }
121
- catch (error) {
122
- console.log(`Error in updateRemoteAccessType : ${error}`);
123
- throw error;
124
- }
125
- });
126
- }
127
- updateRemoteAccessInfo(remoteAccessId, remoteAccessInfoInput, updatedBy) {
128
- return __awaiter(this, void 0, void 0, function* () {
129
- const mutation = mutations_1.UPDATE_REMOTE_ACCESS_INFO;
130
- const variables = {
131
- remoteAccessId,
132
- remoteAccessInfoInput,
133
- updatedBy,
134
- };
135
- try {
136
- const response = yield this.graphqlMutation(mutation, variables);
137
- return response.updateRemoteAccessInfo;
138
- }
139
- catch (error) {
140
- console.log(`Error in updateRemoteAccessInfo : ${error}`);
141
- throw error;
142
- }
143
- });
144
- }
145
- updateRemoteAccess(remoteAccessId, updateRemoteAccessDTO, updatedBy) {
146
- return __awaiter(this, void 0, void 0, function* () {
147
- const mutation = mutations_1.UPDATE_REMOTE_ACCESS;
148
- const variables = {
149
- remoteAccessId,
150
- updateRemoteAccessDTO,
151
- updatedBy,
152
- };
153
- try {
154
- const response = yield this.graphqlMutation(mutation, variables);
155
- return response.updateRemoteAccess;
156
- }
157
- catch (error) {
158
- console.log(`Error in updateRemoteAccess : ${error}`);
159
- throw error;
160
- }
161
- });
162
- }
163
- deleteRemoteAccess(remoteAccessId, updatedBy) {
164
- return __awaiter(this, void 0, void 0, function* () {
165
- const mutation = mutations_1.DELETE_REMOTE_ACCESS;
166
- const variables = {
167
- remoteAccessId,
168
- updatedBy,
169
- };
170
- try {
171
- const response = yield this.graphqlMutation(mutation, variables);
172
- return response.deleteRemoteAccess;
173
- }
174
- catch (error) {
175
- console.log(`Error in deleteRemoteAccess : ${error}`);
176
- throw error;
177
- }
178
- });
179
- }
180
- }
181
- exports.RemoteAccessService = RemoteAccessService;
@@ -1,9 +0,0 @@
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): Promise<any>;
7
- removeShareParty(resourceId: string, sharePartyId: string, resourceType: string, userLoginId: string): Promise<any>;
8
- getSharedUserByService(resourceType: string, resourceId: string): Promise<any>;
9
- }