2021-02-11 13:58:05 +00:00
|
|
|
export const urlList = {
|
|
|
|
apiUri: Cypress.env("API_URI"),
|
2021-07-15 11:22:04 +00:00
|
|
|
addProduct: "products/add",
|
|
|
|
apps: "apps/",
|
|
|
|
attributes: "attributes/",
|
2021-02-11 13:58:05 +00:00
|
|
|
channels: "channels/",
|
2021-07-15 11:22:04 +00:00
|
|
|
categories: "categories/",
|
|
|
|
collections: "collections/",
|
2021-02-11 13:58:05 +00:00
|
|
|
configuration: "configuration/",
|
2021-07-15 11:22:04 +00:00
|
|
|
customers: "customers/",
|
2021-03-15 13:16:02 +00:00
|
|
|
draftOrders: "orders/drafts/",
|
2021-09-08 11:32:05 +00:00
|
|
|
giftCards: "gift-cards/",
|
2021-02-11 13:58:05 +00:00
|
|
|
homePage: "/",
|
2021-07-15 11:22:04 +00:00
|
|
|
newPassword: "new-password/",
|
2021-07-15 12:31:05 +00:00
|
|
|
navigation: "navigation/",
|
2021-02-11 13:58:05 +00:00
|
|
|
orders: "orders/",
|
2021-07-27 08:57:17 +00:00
|
|
|
pages: "pages/",
|
2021-07-15 11:22:04 +00:00
|
|
|
pageTypes: "page-types/",
|
|
|
|
permissionsGroups: "permission-groups/",
|
2021-09-10 09:03:42 +00:00
|
|
|
plugins: "plugins/",
|
2022-01-14 10:08:25 +00:00
|
|
|
priceRate: "price/",
|
2021-02-11 13:58:05 +00:00
|
|
|
products: "products/",
|
2021-07-15 11:22:04 +00:00
|
|
|
productTypes: "product-types/",
|
2021-03-12 14:57:02 +00:00
|
|
|
sales: "discounts/sales/",
|
2021-07-15 11:22:04 +00:00
|
|
|
shippingMethods: "shipping/",
|
2021-07-20 10:59:23 +00:00
|
|
|
siteSettings: "site-settings/",
|
2021-06-02 07:59:34 +00:00
|
|
|
staffMembers: "staff/",
|
2021-10-28 12:14:07 +00:00
|
|
|
stripeApiPaymentMethods: "https://api.stripe.com/v1/payment_methods",
|
2021-09-02 10:36:46 +00:00
|
|
|
translations: "translations/",
|
2021-11-22 11:59:50 +00:00
|
|
|
variants: "variant/",
|
2021-09-02 10:36:46 +00:00
|
|
|
vouchers: "discounts/vouchers/",
|
2021-11-26 10:42:59 +00:00
|
|
|
variant: "variant/",
|
2021-07-15 11:22:04 +00:00
|
|
|
warehouses: "warehouses/",
|
2021-09-02 10:36:46 +00:00
|
|
|
weightRete: "weight/"
|
2021-02-11 13:58:05 +00:00
|
|
|
};
|
2021-07-12 08:50:50 +00:00
|
|
|
|
2021-08-18 11:58:07 +00:00
|
|
|
export const appDetailsUrl = appId => `${urlList.apps}custom/${appId}`;
|
2021-06-07 11:35:53 +00:00
|
|
|
|
2021-08-18 11:58:07 +00:00
|
|
|
export const attributeDetailsUrl = attributeId =>
|
|
|
|
`${urlList.attributes}${attributeId}`;
|
2021-06-07 11:35:53 +00:00
|
|
|
|
2021-08-18 11:58:07 +00:00
|
|
|
export const categoryDetailsUrl = categoryId =>
|
|
|
|
`${urlList.categories}${categoryId}`;
|
|
|
|
|
2021-12-22 11:27:28 +00:00
|
|
|
export const collectionDetailsUrl = collectionId =>
|
|
|
|
`${urlList.collections}${collectionId}`;
|
|
|
|
|
2021-08-18 11:58:07 +00:00
|
|
|
export const customerDetailsUrl = customerId =>
|
|
|
|
`${urlList.customers}${customerId}`;
|
|
|
|
|
2021-11-22 11:59:50 +00:00
|
|
|
export const giftCardDetailsUrl = giftCardId =>
|
|
|
|
`${urlList.giftCards}${giftCardId}`;
|
|
|
|
|
2021-08-18 11:58:07 +00:00
|
|
|
export const menuDetailsUrl = menuId => `${urlList.navigation}${menuId}`;
|
|
|
|
|
2021-12-22 13:55:08 +00:00
|
|
|
export const pageDetailsUrl = pageId => `${urlList.pages}${pageId}`;
|
|
|
|
|
2021-08-18 11:58:07 +00:00
|
|
|
export const pageTypeDetailsUrl = pageTypeId =>
|
|
|
|
`${urlList.pageTypes}${pageTypeId}`;
|
2021-06-07 11:35:53 +00:00
|
|
|
|
2021-06-02 07:59:34 +00:00
|
|
|
export const permissionGroupDetails = permissionGroupId =>
|
|
|
|
`${urlList.permissionsGroups}${permissionGroupId}`;
|
2021-07-05 10:21:35 +00:00
|
|
|
|
2021-08-18 11:58:07 +00:00
|
|
|
export const productDetailsUrl = productId => `${urlList.products}${productId}`;
|
|
|
|
|
2021-11-22 11:59:50 +00:00
|
|
|
export const productVariantDetailUrl = (productId, variantId) =>
|
|
|
|
`${urlList.products}${productId}/${urlList.variants}${variantId}`;
|
|
|
|
|
|
|
|
export const productTypeDetailsUrl = productTypeId =>
|
|
|
|
`${urlList.productTypes}${productTypeId}`;
|
|
|
|
|
2021-08-18 11:58:07 +00:00
|
|
|
export const staffMemberDetailsUrl = staffMemberId =>
|
|
|
|
`${urlList.staffMembers}${staffMemberId}`;
|
2021-07-15 11:17:56 +00:00
|
|
|
|
2021-07-06 10:32:09 +00:00
|
|
|
export const shippingZoneDetailsUrl = shippingZoneId =>
|
|
|
|
`${urlList.shippingMethods}${shippingZoneId}`;
|
|
|
|
|
2021-08-18 11:58:07 +00:00
|
|
|
export const userDetailsUrl = userId => `${urlList.staffMembers}${userId}`;
|
|
|
|
|
2021-07-12 08:50:50 +00:00
|
|
|
export const weightRateUrl = (shippingZoneId, weightRateId) =>
|
|
|
|
`${urlList.shippingMethods}${shippingZoneId}/${urlList.weightRete}${weightRateId}`;
|
|
|
|
|
2022-01-14 10:08:25 +00:00
|
|
|
export const priceRateUrl = (shippingZoneId, priceRateId) =>
|
|
|
|
`${urlList.shippingMethods}${shippingZoneId}/${urlList.priceRate}${priceRateId}`;
|
|
|
|
|
2021-07-06 10:32:09 +00:00
|
|
|
export const warehouseDetailsUrl = warehouseId =>
|
|
|
|
`${urlList.warehouses}${warehouseId}`;
|
|
|
|
|
2021-10-28 14:43:26 +00:00
|
|
|
export const saleDetailsUrl = saleId => `${urlList.sales}${saleId}`;
|
|
|
|
|
2021-11-26 10:42:59 +00:00
|
|
|
export const variantDetailsUrl = (productId, variantId) =>
|
2021-12-05 15:03:04 +00:00
|
|
|
`${urlList.products}${productId}/${urlList.variants}${variantId}`;
|
|
|
|
|
|
|
|
export const voucherDetailsUrl = voucherId => `${urlList.vouchers}${voucherId}`;
|
2021-11-26 10:42:59 +00:00
|
|
|
|
2021-10-28 12:14:07 +00:00
|
|
|
export const stripeConfirmationUrl = id =>
|
|
|
|
`https://api.stripe.com/v1/payment_intents/${id}/confirm`;
|