@longvansoftware/storefront-js-client 1.5.4 → 1.5.6
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.d.ts +2 -0
- package/dist/config/config.js +9 -7
- package/dist/src/graphql/cloud/mutations.d.ts +8 -0
- package/dist/src/graphql/cloud/mutations.js +115 -0
- package/dist/src/graphql/cloud/queries.d.ts +5 -0
- package/dist/src/graphql/cloud/queries.js +121 -0
- package/dist/src/graphql/computing/mutations.d.ts +10 -0
- package/dist/src/graphql/computing/mutations.js +110 -0
- package/dist/src/graphql/computing/queries.d.ts +1 -0
- package/dist/src/graphql/computing/queries.js +27 -14
- package/dist/src/graphql/crm/mutations.d.ts +2 -0
- package/dist/src/graphql/crm/mutations.js +54 -1
- package/dist/src/graphql/crm/queries.d.ts +4 -0
- package/dist/src/graphql/crm/queries.js +187 -61
- package/dist/src/graphql/payment/queries.d.ts +1 -0
- package/dist/src/graphql/payment/queries.js +25 -3
- package/dist/src/graphql/product/queries.d.ts +2 -0
- package/dist/src/graphql/product/queries.js +57 -1
- package/dist/src/lib/SDK.d.ts +5 -1
- package/dist/src/lib/SDK.js +9 -3
- package/dist/src/lib/cloud/index.d.ts +25 -0
- package/dist/src/lib/cloud/index.js +248 -0
- package/dist/src/lib/computing/index.d.ts +12 -0
- package/dist/src/lib/computing/index.js +195 -2
- package/dist/src/lib/crm/index.d.ts +8 -2
- package/dist/src/lib/crm/index.js +123 -15
- package/dist/src/lib/order/index.js +3 -3
- package/dist/src/lib/payment/index.d.ts +1 -0
- package/dist/src/lib/payment/index.js +16 -0
- package/dist/src/lib/product/index.d.ts +2 -0
- package/dist/src/lib/product/index.js +33 -0
- package/dist/src/lib/serviceSDK.js +7 -0
- package/dist/src/types/cloud.d.ts +40 -0
- package/dist/src/types/cloud.js +2 -0
- package/dist/src/types/computing.d.ts +16 -0
- package/dist/src/types/computing.js +2 -0
- package/dist/src/types/crm.d.ts +71 -0
- package/package.json +1 -1
|
@@ -1,47 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_LIST_WORK_EFFORT_TYPE = exports.GET_LIST_TODO = exports.GET_LIST_OPPORTUNITY_QUERY = void 0;
|
|
3
|
+
exports.GET_LIST_COMMENT = exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = exports.GET_TICKET_BY_ID = exports.GET_LIST_TICKET = exports.GET_LIST_WORK_EFFORT_TYPE = exports.GET_LIST_TODO = exports.GET_LIST_OPPORTUNITY_QUERY = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.GET_LIST_OPPORTUNITY_QUERY = (0, graphql_tag_1.gql) `
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
6
|
+
query GetListOpportunity(
|
|
7
|
+
$partyId: String!
|
|
8
|
+
$performerId: String!
|
|
9
|
+
$getOpportunityRequest: GetOpportunityRequest!
|
|
10
|
+
) {
|
|
11
|
+
getListOpportunity(
|
|
12
|
+
partyId: $partyId
|
|
13
|
+
performerId: $performerId
|
|
14
|
+
getOpportunityRequest: $getOpportunityRequest
|
|
15
|
+
) {
|
|
16
|
+
total
|
|
17
|
+
data {
|
|
18
|
+
goal
|
|
19
|
+
campaignId
|
|
20
|
+
valueReal
|
|
21
|
+
valueExpect
|
|
22
|
+
successRate
|
|
23
|
+
referName
|
|
24
|
+
referPhone
|
|
25
|
+
referEmail
|
|
26
|
+
id
|
|
27
|
+
createdBy
|
|
28
|
+
ownerId
|
|
29
|
+
workEffortTypeId
|
|
30
|
+
partyId
|
|
31
|
+
name
|
|
32
|
+
description
|
|
33
|
+
parentId
|
|
34
|
+
status
|
|
35
|
+
stmId
|
|
36
|
+
createdStamp
|
|
37
|
+
updatedStamp
|
|
38
|
+
endDateExpect
|
|
39
|
+
priorityName
|
|
40
|
+
targetId
|
|
41
|
+
targetType
|
|
42
|
+
targetUrl
|
|
43
|
+
extSource
|
|
44
|
+
connectorId
|
|
45
|
+
processResult
|
|
46
|
+
}
|
|
44
47
|
}
|
|
48
|
+
}
|
|
45
49
|
`;
|
|
46
50
|
exports.GET_LIST_TODO = (0, graphql_tag_1.gql) `
|
|
47
51
|
query GetListTodo($partyId: String!, $workEffortId: [String]!) {
|
|
@@ -124,32 +128,154 @@ exports.GET_LIST_TODO = (0, graphql_tag_1.gql) `
|
|
|
124
128
|
}
|
|
125
129
|
`;
|
|
126
130
|
exports.GET_LIST_WORK_EFFORT_TYPE = (0, graphql_tag_1.gql) `
|
|
127
|
-
query GetListWorkEffortType($partyId: String!, $id: String!){
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
query GetListWorkEffortType($partyId: String!, $id: String!) {
|
|
132
|
+
getListWorkEffortType(
|
|
133
|
+
partyId: $partyId
|
|
134
|
+
getWorkEffortTypeRequest: { id: $id, isPagination: true }
|
|
135
|
+
) {
|
|
136
|
+
id
|
|
137
|
+
name
|
|
138
|
+
group
|
|
139
|
+
createdStamp
|
|
140
|
+
updatedStamp
|
|
141
|
+
updatedBy
|
|
142
|
+
createdBy
|
|
143
|
+
partyId
|
|
144
|
+
actionLinkId
|
|
145
|
+
partyGroupIds
|
|
146
|
+
description
|
|
147
|
+
workFlow {
|
|
148
|
+
stages {
|
|
149
|
+
id
|
|
150
|
+
name
|
|
151
|
+
mode
|
|
152
|
+
workEffortTypeId
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
`;
|
|
158
|
+
exports.GET_LIST_TICKET = (0, graphql_tag_1.gql) `
|
|
159
|
+
query GetListTicket(
|
|
160
|
+
$partyId: String!
|
|
161
|
+
$performerId: String!
|
|
162
|
+
$getTicketRequest: GetTicketRequest!
|
|
133
163
|
) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
partyId
|
|
142
|
-
actionLinkId
|
|
143
|
-
partyGroupIds
|
|
144
|
-
description
|
|
145
|
-
workFlow {
|
|
146
|
-
stages{
|
|
164
|
+
getListTicket(
|
|
165
|
+
partyId: $partyId
|
|
166
|
+
performerId: $performerId
|
|
167
|
+
getTicketRequest: $getTicketRequest
|
|
168
|
+
) {
|
|
169
|
+
total
|
|
170
|
+
data {
|
|
147
171
|
id
|
|
148
|
-
|
|
149
|
-
mode
|
|
172
|
+
ownerId
|
|
150
173
|
workEffortTypeId
|
|
174
|
+
partyId
|
|
175
|
+
name
|
|
176
|
+
description
|
|
177
|
+
status
|
|
178
|
+
parentId
|
|
179
|
+
stmId
|
|
180
|
+
createdStamp
|
|
181
|
+
updatedStamp
|
|
182
|
+
endDateExpect
|
|
183
|
+
endDateActual
|
|
184
|
+
priorityName
|
|
185
|
+
targetId
|
|
186
|
+
targetType
|
|
187
|
+
extSource
|
|
188
|
+
connectorId
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
`;
|
|
193
|
+
exports.GET_TICKET_BY_ID = (0, graphql_tag_1.gql) `
|
|
194
|
+
query GetTicketById($ticketId: String!) {
|
|
195
|
+
getTicketById(ticketId: $ticketId) {
|
|
196
|
+
id
|
|
197
|
+
accountable {
|
|
198
|
+
id
|
|
199
|
+
status
|
|
200
|
+
partyId
|
|
201
|
+
salutation
|
|
202
|
+
firstName
|
|
203
|
+
middleName
|
|
204
|
+
lastName
|
|
205
|
+
fullName
|
|
206
|
+
}
|
|
207
|
+
workEffortTypeId
|
|
208
|
+
workEffortType {
|
|
209
|
+
id
|
|
210
|
+
name
|
|
211
|
+
group
|
|
212
|
+
createdStamp
|
|
213
|
+
updatedStamp
|
|
214
|
+
}
|
|
215
|
+
partyId
|
|
216
|
+
name
|
|
217
|
+
description
|
|
218
|
+
status
|
|
219
|
+
parentId
|
|
220
|
+
createdStamp
|
|
221
|
+
updatedStamp
|
|
222
|
+
endDateExpect
|
|
223
|
+
endDateActual
|
|
224
|
+
priorityName
|
|
225
|
+
targetId
|
|
226
|
+
targetType
|
|
227
|
+
extSource
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
`;
|
|
231
|
+
exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = (0, graphql_tag_1.gql) `
|
|
232
|
+
query GetAttachmentByWorkEffortId(
|
|
233
|
+
$partyId: String!
|
|
234
|
+
$workEffortIds: [String]!
|
|
235
|
+
) {
|
|
236
|
+
getAttachmentByWorkEffortId(
|
|
237
|
+
partyId: $partyId
|
|
238
|
+
workEffortIds: $workEffortIds
|
|
239
|
+
) {
|
|
240
|
+
id
|
|
241
|
+
createdStamp
|
|
242
|
+
updatedStamp
|
|
243
|
+
updatedBy
|
|
244
|
+
createdBy
|
|
245
|
+
partyId
|
|
246
|
+
path
|
|
247
|
+
srcId
|
|
248
|
+
srcName
|
|
249
|
+
srcPath
|
|
250
|
+
srcConfigPathId
|
|
251
|
+
name
|
|
252
|
+
fileType
|
|
253
|
+
type
|
|
254
|
+
status
|
|
255
|
+
referId
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
`;
|
|
259
|
+
exports.GET_LIST_COMMENT = (0, graphql_tag_1.gql) `
|
|
260
|
+
query GetListComment($partyId: String!, $getCommentRequest: GetCommentRequest!) {
|
|
261
|
+
getListComment(partyId: $partyId, getCommentRequest: $getCommentRequest) {
|
|
262
|
+
total
|
|
263
|
+
data {
|
|
264
|
+
id
|
|
265
|
+
createdStamp
|
|
266
|
+
updatedStamp
|
|
267
|
+
updatedBy
|
|
268
|
+
createdBy{
|
|
269
|
+
id
|
|
270
|
+
fullName
|
|
271
|
+
}
|
|
272
|
+
type
|
|
273
|
+
format
|
|
274
|
+
content
|
|
275
|
+
referId
|
|
276
|
+
referSource
|
|
277
|
+
attachId
|
|
151
278
|
}
|
|
152
279
|
}
|
|
153
280
|
}
|
|
154
|
-
}
|
|
155
281
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GEN_QR_PAYMENT = exports.GET_PAYMENT_METHOD = void 0;
|
|
3
|
+
exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = exports.GEN_QR_PAYMENT = exports.GET_PAYMENT_METHOD = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.GET_PAYMENT_METHOD = (0, graphql_tag_1.gql) `
|
|
6
6
|
query GetPaymentMethod($orgId: String!, $storeChannelId: String) {
|
|
@@ -12,12 +12,34 @@ exports.GET_PAYMENT_METHOD = (0, graphql_tag_1.gql) `
|
|
|
12
12
|
}
|
|
13
13
|
`;
|
|
14
14
|
exports.GEN_QR_PAYMENT = (0, graphql_tag_1.gql) `
|
|
15
|
-
query GenQRPayment(
|
|
15
|
+
query GenQRPayment(
|
|
16
|
+
$orgId: String!
|
|
17
|
+
$orderId: String!
|
|
18
|
+
$storeId: String!
|
|
19
|
+
$totalAmount: BigDecimal
|
|
20
|
+
) {
|
|
16
21
|
genQRPayment(
|
|
17
22
|
orgId: $orgId
|
|
18
23
|
orderId: $orderId
|
|
19
24
|
storeId: $storeId
|
|
20
25
|
totalAmount: $totalAmount
|
|
21
26
|
)
|
|
22
|
-
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
exports.GET_PAYMENT_METHOD_OF_STORE_CHANNEL = (0, graphql_tag_1.gql) `
|
|
30
|
+
query GetPaymentMethodOfStoreChannel(
|
|
31
|
+
$orgId: String!
|
|
32
|
+
$storeChannelId: String!
|
|
33
|
+
) {
|
|
34
|
+
getPaymentMethodOfStoreChannel(
|
|
35
|
+
orgId: $orgId
|
|
36
|
+
storeChannelId: $storeChannelId
|
|
37
|
+
) {
|
|
38
|
+
id
|
|
39
|
+
code
|
|
40
|
+
name
|
|
41
|
+
image
|
|
42
|
+
description
|
|
43
|
+
}
|
|
44
|
+
}
|
|
23
45
|
`;
|
|
@@ -9,3 +9,5 @@ export declare const GET_BRANDS_BY_CATEGORY_QUERY = "\nquery GetBrandsByCategory
|
|
|
9
9
|
export declare const GET_BRAND_DETAIL_QUERY = "\n query GetBrandDetail($partnerId: String!, $brandId: String!, $storeChannel: String!) {\n getDetail(partnerId: $partnerId, brandId: $brandId, storeChannel: $storeChannel) {\n id\n name\n image\n imageIcon\n }\n }\n";
|
|
10
10
|
export declare const GET_PRODUCT_OPTION: import("graphql").DocumentNode;
|
|
11
11
|
export declare const GET_POLICY: import("graphql").DocumentNode;
|
|
12
|
+
export declare const GET_STORES: import("graphql").DocumentNode;
|
|
13
|
+
export declare const GET_DETAIL_STORES: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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_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(
|
|
@@ -390,3 +390,59 @@ exports.GET_POLICY = (0, graphql_tag_1.gql) `
|
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
`;
|
|
393
|
+
exports.GET_STORES = (0, graphql_tag_1.gql) `
|
|
394
|
+
query GetStores($partnerId: String!) {
|
|
395
|
+
getStores(partnerId: $partnerId) {
|
|
396
|
+
id
|
|
397
|
+
createdStamp
|
|
398
|
+
name
|
|
399
|
+
type
|
|
400
|
+
enable
|
|
401
|
+
partyId
|
|
402
|
+
warehouses
|
|
403
|
+
warehouseIdDefault
|
|
404
|
+
enableOrderAbleFuture
|
|
405
|
+
enableOrderNegativeQuantity
|
|
406
|
+
storeEcommerceName
|
|
407
|
+
shippingCompanies
|
|
408
|
+
shippingCompanyIdPrimary
|
|
409
|
+
customerIdPrimary
|
|
410
|
+
paymentMethodIdPrimary
|
|
411
|
+
enableCustomProductPrice
|
|
412
|
+
enablePaymentPartial
|
|
413
|
+
paymentPartialPercent
|
|
414
|
+
productStoreLink
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
`;
|
|
418
|
+
exports.GET_DETAIL_STORES = (0, graphql_tag_1.gql) `
|
|
419
|
+
query GetDetailStores(
|
|
420
|
+
$partnerId: String!
|
|
421
|
+
$storeId: String!
|
|
422
|
+
) {
|
|
423
|
+
getDetailStores(
|
|
424
|
+
partnerId: $partnerId
|
|
425
|
+
storeId: $storeId
|
|
426
|
+
){
|
|
427
|
+
id
|
|
428
|
+
createdStamp
|
|
429
|
+
name
|
|
430
|
+
type
|
|
431
|
+
enable
|
|
432
|
+
partyId
|
|
433
|
+
warehouses
|
|
434
|
+
warehouseIdDefault
|
|
435
|
+
enableOrderAbleFuture
|
|
436
|
+
enableOrderNegativeQuantity
|
|
437
|
+
storeEcommerceName
|
|
438
|
+
shippingCompanies
|
|
439
|
+
shippingCompanyIdPrimary
|
|
440
|
+
customerIdPrimary
|
|
441
|
+
paymentMethodIdPrimary
|
|
442
|
+
enableCustomProductPrice
|
|
443
|
+
enablePaymentPartial
|
|
444
|
+
paymentPartialPercent
|
|
445
|
+
productStoreLink
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
`;
|
package/dist/src/lib/SDK.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { CrmService } from "../lib/crm/index";
|
|
|
8
8
|
import { WarehouseService } from "../lib/warehouse/index";
|
|
9
9
|
import { ComputingService } from "../lib/computing/index";
|
|
10
10
|
import { CampaignService } from "./campaign";
|
|
11
|
+
import { CloudService } from "./cloud";
|
|
11
12
|
export interface Endpoints {
|
|
12
13
|
product: string;
|
|
13
14
|
crm: string;
|
|
@@ -19,11 +20,13 @@ export interface Endpoints {
|
|
|
19
20
|
warehouse: string;
|
|
20
21
|
computing: string;
|
|
21
22
|
campaign: string;
|
|
23
|
+
cloud: string;
|
|
22
24
|
}
|
|
23
25
|
export declare class SDK {
|
|
24
26
|
orgId: string;
|
|
25
27
|
storeId: string;
|
|
26
28
|
storefrontAccessToken: string;
|
|
29
|
+
environment: string;
|
|
27
30
|
product: ProductService;
|
|
28
31
|
auth: AuthService;
|
|
29
32
|
order: OrderService;
|
|
@@ -34,8 +37,9 @@ export declare class SDK {
|
|
|
34
37
|
warehouse: WarehouseService;
|
|
35
38
|
computing: ComputingService;
|
|
36
39
|
campaign: CampaignService;
|
|
40
|
+
cloud: CloudService;
|
|
37
41
|
token: string | null;
|
|
38
|
-
constructor(orgId: string, storeId: string, storefrontAccessToken: string);
|
|
42
|
+
constructor(orgId: string, storeId: string, storefrontAccessToken: string, environment: string);
|
|
39
43
|
setToken(token: string): void;
|
|
40
44
|
setStoreId(storeId: string): void;
|
|
41
45
|
}
|
package/dist/src/lib/SDK.js
CHANGED
|
@@ -14,15 +14,19 @@ const index_7 = require("../lib/crm/index");
|
|
|
14
14
|
const index_8 = require("../lib/warehouse/index");
|
|
15
15
|
const index_9 = require("../lib/computing/index");
|
|
16
16
|
const campaign_1 = require("./campaign");
|
|
17
|
+
const cloud_1 = require("./cloud");
|
|
17
18
|
class SDK {
|
|
18
|
-
constructor(orgId, storeId, storefrontAccessToken) {
|
|
19
|
+
constructor(orgId, storeId, storefrontAccessToken, environment) {
|
|
19
20
|
this.orgId = orgId;
|
|
20
21
|
this.storeId = storeId;
|
|
21
22
|
this.storefrontAccessToken = storefrontAccessToken;
|
|
23
|
+
this.environment = environment;
|
|
22
24
|
this.token = null;
|
|
23
25
|
(0, helpers_1.validateStorefrontAccessToken)(storefrontAccessToken);
|
|
24
|
-
const endpoints =
|
|
25
|
-
|
|
26
|
+
const endpoints = environment == "live"
|
|
27
|
+
? config_1.environmentEndpoints.live
|
|
28
|
+
: config_1.environmentEndpoints.dev;
|
|
29
|
+
//console.log("🚀 ~ SDK ~ endpoints:", endpoints.computing);
|
|
26
30
|
this.product = new index_1.ProductService(endpoints.product, orgId, storeId);
|
|
27
31
|
this.auth = new index_2.AuthService(endpoints.auth, orgId, storeId);
|
|
28
32
|
this.order = new index_3.OrderService(endpoints.order, orgId, storeId);
|
|
@@ -33,6 +37,7 @@ class SDK {
|
|
|
33
37
|
this.warehouse = new index_8.WarehouseService(endpoints.warehouse, orgId, storeId);
|
|
34
38
|
this.computing = new index_9.ComputingService(endpoints.computing, orgId, storeId);
|
|
35
39
|
this.campaign = new campaign_1.CampaignService(endpoints.campaign, orgId, storeId);
|
|
40
|
+
this.cloud = new cloud_1.CloudService(endpoints.cloud, orgId, storeId);
|
|
36
41
|
// Initialize other services here
|
|
37
42
|
}
|
|
38
43
|
setToken(token) {
|
|
@@ -47,6 +52,7 @@ class SDK {
|
|
|
47
52
|
this.service.setToken(token);
|
|
48
53
|
this.warehouse.setToken(token);
|
|
49
54
|
this.computing.setToken(token);
|
|
55
|
+
this.cloud.setToken(token);
|
|
50
56
|
// Set token for other services here
|
|
51
57
|
}
|
|
52
58
|
// các module export từ serviceSDK.ts set storeId vào serviceSDK.ts
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CreateUserMailHosting, DeleteUserPassword, Filter, UpdateInforMationService, UpdateUserPassword } from "../../types/cloud";
|
|
2
|
+
import { Service } from "../serviceSDK";
|
|
3
|
+
export declare class CloudService extends Service {
|
|
4
|
+
/**
|
|
5
|
+
* Constructs a new OrderService instance.
|
|
6
|
+
* @param endpoint - The endpoint URL for the service.
|
|
7
|
+
* @param orgId - The organization ID.
|
|
8
|
+
* @param storeId - The store ID.
|
|
9
|
+
*/
|
|
10
|
+
constructor(endpoint: string, orgId: string, storeId: string);
|
|
11
|
+
setToken(token: string): void;
|
|
12
|
+
serviceDetail(serviceId: string): Promise<any>;
|
|
13
|
+
getMailResource(serviceId: string): Promise<any>;
|
|
14
|
+
changeServiceName(serviceId: string, updateBy: string, name: string): Promise<any>;
|
|
15
|
+
getUserMailHosting(serviceId: string): Promise<any>;
|
|
16
|
+
createUserMailHosting(payload: CreateUserMailHosting): Promise<any>;
|
|
17
|
+
updateUserPassword(payload: UpdateUserPassword): Promise<any>;
|
|
18
|
+
deleteUserMailHosting(payload: DeleteUserPassword): Promise<any>;
|
|
19
|
+
updateDomainName(payload: UpdateInforMationService): Promise<any>;
|
|
20
|
+
updateUsername(payload: UpdateInforMationService): Promise<any>;
|
|
21
|
+
updatePassword(payload: UpdateInforMationService): Promise<any>;
|
|
22
|
+
serviceTypes(): Promise<any>;
|
|
23
|
+
searchService(filter: Filter): Promise<any>;
|
|
24
|
+
updateDNS(payload: {}): Promise<any>;
|
|
25
|
+
}
|