@longvansoftware/storefront-js-client 3.1.2 → 3.1.3
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.
|
@@ -98,7 +98,7 @@ exports.UPDATE_PASSWORD_MUTATION = `
|
|
|
98
98
|
}
|
|
99
99
|
`;
|
|
100
100
|
exports.CREATE_PASSWORD_MUTATION = (0, graphql_tag_1.gql) `
|
|
101
|
-
mutation CreatePassword($orgId: String
|
|
101
|
+
mutation CreatePassword($orgId: String, $accessToken: String, $password: String) {
|
|
102
102
|
updateInfo(orgId: $orgId, accessToken: $accessToken, password: $password) {
|
|
103
103
|
partyId
|
|
104
104
|
fullName
|
|
@@ -528,4 +528,21 @@ export declare class OrderService extends Service {
|
|
|
528
528
|
* @throws If an error occurs while updating the customer information
|
|
529
529
|
*/
|
|
530
530
|
updateCustomerInfoFront(orderId: string, customerInfo: CustomerInfo): Promise<any>;
|
|
531
|
+
/**
|
|
532
|
+
* Creates a store channel.
|
|
533
|
+
*
|
|
534
|
+
* @param storeChannelData - The data for creating the store channel.
|
|
535
|
+
* @returns A promise that resolves to the created store channel response.
|
|
536
|
+
* @throws If an error occurs while creating the store channel.
|
|
537
|
+
*/
|
|
538
|
+
createStoreChannel(storeChannelData: any): Promise<any>;
|
|
539
|
+
/**
|
|
540
|
+
* Gets available store channels for an employee.
|
|
541
|
+
*
|
|
542
|
+
* @param partnerId - The partner ID.
|
|
543
|
+
* @param empId - The employee ID.
|
|
544
|
+
* @returns A promise that resolves to the available store channels.
|
|
545
|
+
* @throws If an error occurs while fetching the store channels.
|
|
546
|
+
*/
|
|
547
|
+
getAvailableStoreChannels(empId: string): Promise<any>;
|
|
531
548
|
}
|
|
@@ -1590,5 +1590,48 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
});
|
|
1592
1592
|
}
|
|
1593
|
+
/**
|
|
1594
|
+
* Creates a store channel.
|
|
1595
|
+
*
|
|
1596
|
+
* @param storeChannelData - The data for creating the store channel.
|
|
1597
|
+
* @returns A promise that resolves to the created store channel response.
|
|
1598
|
+
* @throws If an error occurs while creating the store channel.
|
|
1599
|
+
*/
|
|
1600
|
+
createStoreChannel(storeChannelData) {
|
|
1601
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1602
|
+
const endpoint = `/store-channels/${this.orgId}`;
|
|
1603
|
+
const method = "POST";
|
|
1604
|
+
try {
|
|
1605
|
+
const response = yield this.restApiCallWithToken(endpoint, method, Object.assign(Object.assign({}, storeChannelData), { partyId: this.orgId }));
|
|
1606
|
+
return response;
|
|
1607
|
+
}
|
|
1608
|
+
catch (error) {
|
|
1609
|
+
console.log(`Error in createStoreChannel: ${error}`);
|
|
1610
|
+
throw error;
|
|
1611
|
+
}
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
/**
|
|
1615
|
+
* Gets available store channels for an employee.
|
|
1616
|
+
*
|
|
1617
|
+
* @param partnerId - The partner ID.
|
|
1618
|
+
* @param empId - The employee ID.
|
|
1619
|
+
* @returns A promise that resolves to the available store channels.
|
|
1620
|
+
* @throws If an error occurs while fetching the store channels.
|
|
1621
|
+
*/
|
|
1622
|
+
getAvailableStoreChannels(empId) {
|
|
1623
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1624
|
+
const endpoint = `/store-channels/${this.orgId}/available/${empId}`;
|
|
1625
|
+
const method = "GET";
|
|
1626
|
+
try {
|
|
1627
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1628
|
+
return response;
|
|
1629
|
+
}
|
|
1630
|
+
catch (error) {
|
|
1631
|
+
console.log(`Error in getAvailableStoreChannels: ${error}`);
|
|
1632
|
+
throw error;
|
|
1633
|
+
}
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1593
1636
|
}
|
|
1594
1637
|
exports.OrderService = OrderService;
|