@heyframe/composables
Version:
HeyFrame Frontends composables for Vue
775 lines (773 loc) • 24 kB
text/typescript
const Cart = {
extensions: {
"cart-promotions": {
addedCodes: [],
blockedPromotionIds: [],
apiAlias:
"heyframe_core_checkout_promotion_cart_extension_cart_extension",
},
},
price: {
netPrice: 15.06,
totalPrice: 16.11,
calculatedTaxes: [
{
tax: 1.05,
taxRate: 7,
price: 16.11,
apiAlias: "cart_tax_calculated",
},
],
taxRules: [
{
taxRate: 7,
percentage: 100,
apiAlias: "cart_tax_rule",
},
],
positionPrice: 16.11,
taxStatus: "gross",
rawTotal: 16.11,
apiAlias: "cart_price",
},
lineItems: [
{
payload: {
isCloseout: false,
customFields: [],
createdAt: "2020-08-06 06:26:45.454",
releaseDate: null,
isNew: false,
markAsTopseller: null,
productNumber: "943280",
manufacturerId: "05cd4e976df14c4d90e351f345ff5aa3",
taxId: "94f1e03140d24698a894320e258e6d83",
tagIds: null,
categoryIds: [
"525abe8981214bd2ba94fd33942333ec",
"bda4b60e845240b2b9d6b60e71196e14",
"79f30922410344cca284b80be225cbfe",
"6bb2662482fe42fb90129f32cdd645bb",
],
propertyIds: [
"88592e7788484990b5a7389751eafebe",
"dbc078734b5b49a9a05a07646ccb8cdc",
],
optionIds: null,
options: [],
streamIds: [
"1318833f46df457981763b94179d9ef0",
"5675448d6b3a4dd2a659d31a3dde74da",
"e8a363db4d1542dca933ffde1ebeace4",
],
parentId: null,
stock: 49485,
features: [],
},
label: "Smoking Board Cedar Wood ",
quantity: 1,
priceDefinition: {
price: 17.9,
taxRules: [
{
taxRate: 7,
percentage: 100,
apiAlias: "cart_tax_rule",
},
],
quantity: 1,
isCalculated: true,
referencePriceDefinition: null,
listPrice: null,
regulationPrice: null,
type: "quantity",
apiAlias: "cart_price_quantity",
},
price: {
unitPrice: 17.9,
quantity: 1,
totalPrice: 17.9,
calculatedTaxes: [
{
tax: 1.17,
taxRate: 7,
price: 17.9,
apiAlias: "cart_tax_calculated",
},
],
taxRules: [
{
taxRate: 7,
percentage: 100,
apiAlias: "cart_tax_rule",
},
],
referencePrice: null,
listPrice: null,
regulationPrice: null,
apiAlias: "calculated_price",
},
good: true,
description: null,
cover: {
translated: {
alt: null,
title: null,
customFields: {},
},
createdAt: "2020-08-06T06:25:50.000+00:00",
updatedAt: "2020-08-06T06:26:45.419+00:00",
mimeType: "image/jpeg",
fileExtension: "jpg",
fileSize: 369797,
title: null,
metaData: {
type: 2,
width: 1248,
height: 848,
},
uploadedAt: null,
alt: null,
url: "https://cdn.heyframe.store/a/B/m/pPkDE/media/7e/8c/b2/PT_Ra-ucherbretter_Stein.jpg?1596695205",
fileName: "PT_Ra-ucherbretter_Stein",
translations: null,
thumbnails: [
{
translated: [],
createdAt: "2020-08-06T06:25:49.998+00:00",
updatedAt: "2020-08-06T06:26:45.417+00:00",
width: 400,
path: "thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_400x400.jpg",
height: 400,
url: "https://cdn.heyframe.store/a/B/m/pPkDE/thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_400x400.jpg?1596695205",
mediaId: "0c25b06daa244618b342284498dc35ea",
customFields: null,
id: "6385b30ea2df41359c43393cbd1c4e7a",
apiAlias: "media_thumbnail",
},
{
translated: [],
createdAt: "2020-08-06T06:25:49.998+00:00",
updatedAt: "2020-08-06T06:26:45.418+00:00",
width: 800,
path: "thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_800x800.jpg",
height: 800,
url: "https://cdn.heyframe.store/a/B/m/pPkDE/thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_800x800.jpg?1596695205",
mediaId: "0c25b06daa244618b342284498dc35ea",
customFields: null,
id: "678bf56ab659463881007faff7271744",
apiAlias: "media_thumbnail",
},
{
translated: [],
createdAt: "2020-08-06T06:25:49.999+00:00",
updatedAt: "2020-08-06T06:26:45.419+00:00",
width: 1920,
path: "thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_1920x1920.jpg",
height: 1920,
url: "https://cdn.heyframe.store/a/B/m/pPkDE/thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_1920x1920.jpg?1596695205",
mediaId: "0c25b06daa244618b342284498dc35ea",
customFields: null,
id: "a980475a6bf14f4086b50ac4ebe6e39e",
apiAlias: "media_thumbnail",
},
],
hasFile: true,
private: false,
path: "media/7e/8c/b2/PT_Ra-ucherbretter_Stein.jpg",
config: null,
customFields: null,
id: "0c25b06daa244618b342284498dc35ea",
apiAlias: "media",
},
deliveryInformation: {
stock: 49485,
weight: null,
freeDelivery: false,
restockTime: 1,
deliveryTime: {
name: "1-3 days",
min: 1,
max: 3,
unit: "day",
apiAlias: "cart_delivery_time",
},
height: 140,
width: 300,
length: 8,
apiAlias: "cart_delivery_information",
},
children: [],
requirement: null,
removable: true,
stackable: true,
quantityInformation: {
minPurchase: 1,
maxPurchase: 5,
purchaseSteps: 1,
apiAlias: "cart_quantity_information",
},
modified: false,
dataTimestamp: "2024-06-07T11:20:57.749+00:00",
dataContextHash: "2f271a8e884e48d3a80a6cd2371fe573",
uniqueIdentifier: "018ff26e2c6970c2b690d6b041233454",
states: ["is-physical"],
modifiedByApp: false,
id: "65666d2629744f65b981cc6263d3ef0a",
type: "product",
referencedId: "65666d2629744f65b981cc6263d3ef0a",
apiAlias: "cart_line_item",
},
{
payload: {
promotionId: "b2a7e27856ea4f93977e3ba58b8c32bd",
priority: 1,
discountId: "1326f60448d84aed964d77ca1c2dde90",
discountType: "percentage",
code: "",
value: "10",
promotionCodeType: "global",
maxValue: "",
discountScope: "cart",
preventCombination: false,
exclusions: [],
groupId: "",
setGroups: [],
filter: {
sorterKey: null,
applierKey: null,
usageKey: null,
pickerKey: null,
},
composition: [
{
id: "65666d2629744f65b981cc6263d3ef0a",
quantity: 1,
discount: 1.79,
},
],
},
label: "Your lucky day!",
quantity: 1,
priceDefinition: {
percentage: -10,
filter: null,
type: "percentage",
apiAlias: "cart_price_percentage",
},
price: {
unitPrice: -1.79,
quantity: 1,
totalPrice: -1.79,
calculatedTaxes: [
{
tax: -0.12,
taxRate: 7,
price: -1.79,
apiAlias: "cart_tax_calculated",
},
],
taxRules: [
{
taxRate: 7,
percentage: 100,
apiAlias: "cart_tax_rule",
},
],
referencePrice: null,
listPrice: null,
regulationPrice: null,
apiAlias: "calculated_price",
},
good: false,
description: "Your lucky day!",
cover: null,
deliveryInformation: null,
children: [],
requirement: {
_name: "andContainer",
rules: [],
apiAlias: "rule_andContainer",
},
removable: true,
stackable: false,
quantityInformation: null,
modified: false,
dataTimestamp: null,
dataContextHash: null,
uniqueIdentifier: "018ff26e2cb47374ae97ab8c671bf525",
states: [],
modifiedByApp: false,
id: "1326f60448d84aed964d77ca1c2dde90",
type: "promotion",
referencedId: "",
apiAlias: "cart_line_item",
},
],
errors: {
"promotion-discount-added-1326f60448d84aed964d77ca1c2dde90": {
message: "Discount Your lucky day! has been added",
code: 0,
key: "promotion-discount-added-1326f60448d84aed964d77ca1c2dde90",
level: 0,
messageKey: "promotion-discount-added",
},
},
deliveries: [
{
positions: [
{
lineItem: {
payload: {
isCloseout: false,
customFields: [],
createdAt: "2020-08-06 06:26:45.454",
releaseDate: null,
isNew: false,
markAsTopseller: null,
productNumber: "943280",
manufacturerId: "05cd4e976df14c4d90e351f345ff5aa3",
taxId: "94f1e03140d24698a894320e258e6d83",
tagIds: null,
categoryIds: [
"525abe8981214bd2ba94fd33942333ec",
"bda4b60e845240b2b9d6b60e71196e14",
"79f30922410344cca284b80be225cbfe",
"6bb2662482fe42fb90129f32cdd645bb",
],
propertyIds: [
"88592e7788484990b5a7389751eafebe",
"dbc078734b5b49a9a05a07646ccb8cdc",
],
optionIds: null,
options: [],
streamIds: [
"1318833f46df457981763b94179d9ef0",
"5675448d6b3a4dd2a659d31a3dde74da",
"e8a363db4d1542dca933ffde1ebeace4",
],
parentId: null,
stock: 49485,
features: [],
},
label: "Smoking Board Cedar Wood ",
quantity: 1,
priceDefinition: {
price: 17.9,
taxRules: [
{
taxRate: 7,
percentage: 100,
apiAlias: "cart_tax_rule",
},
],
quantity: 1,
isCalculated: true,
referencePriceDefinition: null,
listPrice: null,
regulationPrice: null,
type: "quantity",
apiAlias: "cart_price_quantity",
},
price: {
unitPrice: 17.9,
quantity: 1,
totalPrice: 17.9,
calculatedTaxes: [
{
tax: 1.17,
taxRate: 7,
price: 17.9,
apiAlias: "cart_tax_calculated",
},
],
taxRules: [
{
taxRate: 7,
percentage: 100,
apiAlias: "cart_tax_rule",
},
],
referencePrice: null,
listPrice: null,
regulationPrice: null,
apiAlias: "calculated_price",
},
good: true,
description: null,
cover: {
translated: {
alt: null,
title: null,
customFields: {},
},
createdAt: "2020-08-06T06:25:50.000+00:00",
updatedAt: "2020-08-06T06:26:45.419+00:00",
mimeType: "image/jpeg",
fileExtension: "jpg",
fileSize: 369797,
title: null,
metaData: {
type: 2,
width: 1248,
height: 848,
},
uploadedAt: null,
alt: null,
url: "https://cdn.heyframe.store/a/B/m/pPkDE/media/7e/8c/b2/PT_Ra-ucherbretter_Stein.jpg?1596695205",
fileName: "PT_Ra-ucherbretter_Stein",
translations: null,
thumbnails: [
{
translated: [],
createdAt: "2020-08-06T06:25:49.998+00:00",
updatedAt: "2020-08-06T06:26:45.417+00:00",
width: 400,
path: "thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_400x400.jpg",
height: 400,
url: "https://cdn.heyframe.store/a/B/m/pPkDE/thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_400x400.jpg?1596695205",
mediaId: "0c25b06daa244618b342284498dc35ea",
customFields: null,
id: "6385b30ea2df41359c43393cbd1c4e7a",
apiAlias: "media_thumbnail",
},
{
translated: [],
createdAt: "2020-08-06T06:25:49.998+00:00",
updatedAt: "2020-08-06T06:26:45.418+00:00",
width: 800,
path: "thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_800x800.jpg",
height: 800,
url: "https://cdn.heyframe.store/a/B/m/pPkDE/thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_800x800.jpg?1596695205",
mediaId: "0c25b06daa244618b342284498dc35ea",
customFields: null,
id: "678bf56ab659463881007faff7271744",
apiAlias: "media_thumbnail",
},
{
translated: [],
createdAt: "2020-08-06T06:25:49.999+00:00",
updatedAt: "2020-08-06T06:26:45.419+00:00",
width: 1920,
path: "thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_1920x1920.jpg",
height: 1920,
url: "https://cdn.heyframe.store/a/B/m/pPkDE/thumbnail/7e/8c/b2/PT_Ra-ucherbretter_Stein_1920x1920.jpg?1596695205",
mediaId: "0c25b06daa244618b342284498dc35ea",
customFields: null,
id: "a980475a6bf14f4086b50ac4ebe6e39e",
apiAlias: "media_thumbnail",
},
],
hasFile: true,
private: false,
path: "media/7e/8c/b2/PT_Ra-ucherbretter_Stein.jpg",
config: null,
customFields: null,
id: "0c25b06daa244618b342284498dc35ea",
apiAlias: "media",
},
deliveryInformation: {
stock: 49485,
weight: null,
freeDelivery: false,
restockTime: 1,
deliveryTime: {
name: "1-3 days",
min: 1,
max: 3,
unit: "day",
apiAlias: "cart_delivery_time",
},
height: 140,
width: 300,
length: 8,
apiAlias: "cart_delivery_information",
},
children: [],
requirement: null,
removable: true,
stackable: true,
quantityInformation: {
minPurchase: 1,
maxPurchase: 5,
purchaseSteps: 1,
apiAlias: "cart_quantity_information",
},
modified: true,
dataTimestamp: "2024-06-07T11:20:57.749+00:00",
dataContextHash: "2f271a8e884e48d3a80a6cd2371fe573",
uniqueIdentifier: "018ff26e2c6970c2b690d6b041233454",
states: ["is-physical"],
modifiedByApp: false,
id: "65666d2629744f65b981cc6263d3ef0a",
type: "product",
referencedId: "65666d2629744f65b981cc6263d3ef0a",
apiAlias: "cart_line_item",
},
quantity: 1,
price: {
unitPrice: 17.9,
quantity: 1,
totalPrice: 17.9,
calculatedTaxes: [
{
tax: 1.17,
taxRate: 7,
price: 17.9,
apiAlias: "cart_tax_calculated",
},
],
taxRules: [
{
taxRate: 7,
percentage: 100,
apiAlias: "cart_tax_rule",
},
],
referencePrice: null,
listPrice: null,
regulationPrice: null,
apiAlias: "calculated_price",
},
identifier: "65666d2629744f65b981cc6263d3ef0a",
deliveryDate: {
earliest: "2024-06-08T16:00:00.000+00:00",
latest: "2024-06-10T16:00:00.000+00:00",
apiAlias: "cart_delivery_date",
},
apiAlias: "cart_delivery_position",
},
],
location: {
country: {
translated: {
name: "Germany",
customFields: {},
addressFormat: [
["address/company", "symbol/dash", "address/department"],
["address/first_name", "address/last_name"],
["address/street"],
["address/zipcode", "address/city"],
["address/country", "address/country_state"],
],
},
createdAt: "2020-08-06T06:23:29.788+00:00",
updatedAt: "2023-07-18T09:16:36.937+00:00",
name: "Germany",
iso: "DE",
position: 1,
active: true,
shippingAvailable: true,
iso3: "DEU",
displayStateInRegistration: false,
forceStateInRegistration: false,
checkVatIdPattern: false,
vatIdPattern: "(DE)?[0-9]{9}",
vatIdRequired: false,
customerTax: {
enabled: false,
currencyId: "b7d2554b0ce847cd82f3ac9bd1c0dfca",
amount: 0,
apiAlias:
"heyframe_core_framework_data_abstraction_layer_tax_free_config",
},
companyTax: {
enabled: false,
currencyId: "b7d2554b0ce847cd82f3ac9bd1c0dfca",
amount: 0,
apiAlias:
"heyframe_core_framework_data_abstraction_layer_tax_free_config",
},
states: null,
translations: null,
postalCodeRequired: false,
checkPostalCodePattern: false,
checkAdvancedPostalCodePattern: false,
advancedPostalCodePattern: null,
defaultPostalCodePattern: "\\d{5}",
addressFormat: [
["address/company", "symbol/dash", "address/department"],
["address/first_name", "address/last_name"],
["address/street"],
["address/zipcode", "address/city"],
["address/country", "address/country_state"],
],
customFields: null,
id: "a5a0a68c168d4a33894f9ce5d6950045",
apiAlias: "country",
},
state: null,
address: null,
apiAlias: "cart_delivery_shipping_location",
},
deliveryDate: {
earliest: "2024-06-08T16:00:00.000+00:00",
latest: "2024-06-10T16:00:00.000+00:00",
apiAlias: "cart_delivery_date",
},
shippingMethod: {
translated: {
name: "Standard",
customFields: {
sendcloud_service_point_enabled: "0",
},
description: null,
trackingUrl: null,
},
createdAt: "2020-08-06T06:23:32.016+00:00",
updatedAt: "2023-05-16T15:31:50.158+00:00",
name: "Standard",
active: true,
position: 0,
description: null,
trackingUrl: null,
deliveryTimeId: "aca1d61eafd74b2095035bb4f9a373dc",
deliveryTime: {
translated: {
name: "Instant download",
customFields: {},
},
createdAt: "2023-02-06T14:41:50.564+00:00",
updatedAt: null,
name: "Instant download",
min: 0,
max: 0,
unit: "hour",
customFields: null,
id: "aca1d61eafd74b2095035bb4f9a373dc",
apiAlias: "delivery_time",
},
translations: null,
availabilityRule: null,
prices: [
{
translated: [],
createdAt: "2020-08-06T06:23:32.029+00:00",
updatedAt: null,
shippingMethodId: "a9d9cc502b3547f4a89eb2830c032c78",
ruleId: null,
calculation: 1,
quantityStart: 0,
quantityEnd: null,
calculationRuleId: null,
currencyPrice: [
{
currencyId: "b7d2554b0ce847cd82f3ac9bd1c0dfca",
net: 0,
gross: 0,
linked: false,
listPrice: null,
percentage: null,
regulationPrice: null,
apiAlias: "price",
},
],
customFields: null,
id: "09163f081c0246e2b3348bedce814c75",
apiAlias: "shipping_method_price",
},
{
translated: [],
createdAt: "2020-08-06T06:26:54.179+00:00",
updatedAt: null,
shippingMethodId: "a9d9cc502b3547f4a89eb2830c032c78",
ruleId: null,
calculation: 1,
quantityStart: 0,
quantityEnd: null,
calculationRuleId: null,
currencyPrice: [
{
currencyId: "b7d2554b0ce847cd82f3ac9bd1c0dfca",
net: 0,
gross: 0,
linked: false,
listPrice: null,
percentage: null,
regulationPrice: null,
apiAlias: "price",
},
],
customFields: null,
id: "0b4ce04df7f847be809e2835541ea63f",
apiAlias: "shipping_method_price",
},
],
mediaId: null,
media: null,
tags: null,
taxType: "auto",
technicalName: "shipping_standard",
tax: null,
customFields: {
sendcloud_service_point_enabled: "0",
},
id: "a9d9cc502b3547f4a89eb2830c032c78",
apiAlias: "shipping_method",
},
shippingCosts: {
unitPrice: 0,
quantity: 1,
totalPrice: 0,
calculatedTaxes: [
{
tax: 0,
taxRate: 7,
price: 0,
apiAlias: "cart_tax_calculated",
},
],
taxRules: [
{
taxRate: 7,
percentage: 100,
apiAlias: "cart_tax_rule",
},
],
referencePrice: null,
listPrice: null,
regulationPrice: null,
apiAlias: "calculated_price",
},
apiAlias: "cart_delivery",
},
],
transactions: [
{
amount: {
unitPrice: 16.11,
quantity: 1,
totalPrice: 16.11,
calculatedTaxes: [
{
tax: 1.05,
taxRate: 7,
price: 16.11,
apiAlias: "cart_tax_calculated",
},
],
taxRules: [
{
taxRate: 7,
percentage: 100,
apiAlias: "cart_tax_rule",
},
],
referencePrice: null,
listPrice: null,
regulationPrice: null,
apiAlias: "calculated_price",
},
paymentMethodId: "b7f6cd663b774e9485e33ed1a776c8d9",
apiAlias: "cart_transaction",
},
],
modified: false,
customerComment: null,
affiliateCode: null,
campaignCode: null,
source: null,
token: "RgICfwdUJgNxOgjH9t7HVx2Al6kMavaw",
apiAlias: "cart",
};
export default Cart;